(t0)
| 726 | return 'discover'; |
| 727 | } |
| 728 | export function PluginSettings(t0) { |
| 729 | const $ = _c(75); |
| 730 | const { |
| 731 | onComplete, |
| 732 | args, |
| 733 | showMcpRedirectMessage |
| 734 | } = t0; |
| 735 | let parsedCommand; |
| 736 | let t1; |
| 737 | if ($[0] !== args) { |
| 738 | parsedCommand = parsePluginArgs(args); |
| 739 | t1 = getInitialViewState(parsedCommand); |
| 740 | $[0] = args; |
| 741 | $[1] = parsedCommand; |
| 742 | $[2] = t1; |
| 743 | } else { |
| 744 | parsedCommand = $[1]; |
| 745 | t1 = $[2]; |
| 746 | } |
| 747 | const initialViewState = t1; |
| 748 | const [viewState, setViewState] = useState(initialViewState); |
| 749 | let t2; |
| 750 | if ($[3] !== initialViewState) { |
| 751 | t2 = getInitialTab(initialViewState); |
| 752 | $[3] = initialViewState; |
| 753 | $[4] = t2; |
| 754 | } else { |
| 755 | t2 = $[4]; |
| 756 | } |
| 757 | const [activeTab, setActiveTab] = useState(t2); |
| 758 | const [inputValue, setInputValue] = useState(viewState.type === "add-marketplace" ? viewState.initialValue || "" : ""); |
| 759 | const [cursorOffset, setCursorOffset] = useState(0); |
| 760 | const [error, setError] = useState(null); |
| 761 | const [result, setResult] = useState(null); |
| 762 | const [childSearchActive, setChildSearchActive] = useState(false); |
| 763 | const setAppState = useSetAppState(); |
| 764 | const pluginErrorCount = useAppState(_temp0); |
| 765 | const errorsTabTitle = pluginErrorCount > 0 ? `Errors (${pluginErrorCount})` : "Errors"; |
| 766 | const exitState = useExitOnCtrlCDWithKeybindings(); |
| 767 | const cliMode = parsedCommand.type === "marketplace" && parsedCommand.action === "add" && parsedCommand.target !== undefined; |
| 768 | let t3; |
| 769 | if ($[5] !== setAppState) { |
| 770 | t3 = () => { |
| 771 | setAppState(_temp1); |
| 772 | }; |
| 773 | $[5] = setAppState; |
| 774 | $[6] = t3; |
| 775 | } else { |
| 776 | t3 = $[6]; |
| 777 | } |
| 778 | const markPluginsChanged = t3; |
| 779 | let t4; |
| 780 | if ($[7] === Symbol.for("react.memo_cache_sentinel")) { |
| 781 | t4 = tabId => { |
| 782 | const tab = tabId as TabId; |
| 783 | setActiveTab(tab); |
| 784 | setError(null); |
| 785 | bb37: switch (tab) { |
nothing calls this directly
no test coverage detected