@dexto/tui 1.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +44 -0
- package/dist/InkCLIRefactored.cjs +319 -0
- package/dist/InkCLIRefactored.d.ts +55 -0
- package/dist/InkCLIRefactored.d.ts.map +1 -0
- package/dist/InkCLIRefactored.js +289 -0
- package/dist/assets/sounds/SOURCES.md +35 -0
- package/dist/assets/sounds/boot.wav +0 -0
- package/dist/assets/sounds/chime.wav +0 -0
- package/dist/assets/sounds/coin.wav +0 -0
- package/dist/assets/sounds/confirm.wav +0 -0
- package/dist/assets/sounds/levelup.wav +0 -0
- package/dist/assets/sounds/ping.wav +0 -0
- package/dist/assets/sounds/powerup.wav +0 -0
- package/dist/assets/sounds/startup.wav +0 -0
- package/dist/assets/sounds/success.wav +0 -0
- package/dist/assets/sounds/treasure.wav +0 -0
- package/dist/assets/sounds/win.wav +0 -0
- package/dist/components/ApprovalPrompt.cjs +353 -0
- package/dist/components/ApprovalPrompt.d.ts +44 -0
- package/dist/components/ApprovalPrompt.d.ts.map +1 -0
- package/dist/components/ApprovalPrompt.js +336 -0
- package/dist/components/BackgroundTasksPanel.cjs +117 -0
- package/dist/components/BackgroundTasksPanel.d.ts +18 -0
- package/dist/components/BackgroundTasksPanel.d.ts.map +1 -0
- package/dist/components/BackgroundTasksPanel.js +93 -0
- package/dist/components/CustomInput.cjs +77 -0
- package/dist/components/CustomInput.d.ts +17 -0
- package/dist/components/CustomInput.d.ts.map +1 -0
- package/dist/components/CustomInput.js +57 -0
- package/dist/components/CustomTextInput.cjs +76 -0
- package/dist/components/CustomTextInput.d.ts +16 -0
- package/dist/components/CustomTextInput.d.ts.map +1 -0
- package/dist/components/CustomTextInput.js +46 -0
- package/dist/components/EditableMultiLineInput.cjs +151 -0
- package/dist/components/EditableMultiLineInput.d.ts +19 -0
- package/dist/components/EditableMultiLineInput.d.ts.map +1 -0
- package/dist/components/EditableMultiLineInput.js +131 -0
- package/dist/components/ElicitationForm.cjs +622 -0
- package/dist/components/ElicitationForm.d.ts +24 -0
- package/dist/components/ElicitationForm.d.ts.map +1 -0
- package/dist/components/ElicitationForm.js +588 -0
- package/dist/components/ErrorBoundary.cjs +66 -0
- package/dist/components/ErrorBoundary.d.ts +20 -0
- package/dist/components/ErrorBoundary.d.ts.map +1 -0
- package/dist/components/ErrorBoundary.js +32 -0
- package/dist/components/Footer.cjs +165 -0
- package/dist/components/Footer.d.ts +23 -0
- package/dist/components/Footer.d.ts.map +1 -0
- package/dist/components/Footer.js +131 -0
- package/dist/components/HistorySearchBar.cjs +40 -0
- package/dist/components/HistorySearchBar.d.ts +17 -0
- package/dist/components/HistorySearchBar.d.ts.map +1 -0
- package/dist/components/HistorySearchBar.js +16 -0
- package/dist/components/MultiLineInput.cjs +56 -0
- package/dist/components/MultiLineInput.d.ts +12 -0
- package/dist/components/MultiLineInput.d.ts.map +1 -0
- package/dist/components/MultiLineInput.js +36 -0
- package/dist/components/ResourceAutocomplete.cjs +344 -0
- package/dist/components/ResourceAutocomplete.d.ts +26 -0
- package/dist/components/ResourceAutocomplete.d.ts.map +1 -0
- package/dist/components/ResourceAutocomplete.js +322 -0
- package/dist/components/SlashCommandAutocomplete.cjs +389 -0
- package/dist/components/SlashCommandAutocomplete.d.ts +28 -0
- package/dist/components/SlashCommandAutocomplete.d.ts.map +1 -0
- package/dist/components/SlashCommandAutocomplete.js +363 -0
- package/dist/components/StatusBar.cjs +142 -0
- package/dist/components/StatusBar.d.ts +41 -0
- package/dist/components/StatusBar.d.ts.map +1 -0
- package/dist/components/StatusBar.js +118 -0
- package/dist/components/TextBufferInput.cjs +531 -0
- package/dist/components/TextBufferInput.d.ts +54 -0
- package/dist/components/TextBufferInput.d.ts.map +1 -0
- package/dist/components/TextBufferInput.js +507 -0
- package/dist/components/TodoPanel.cjs +129 -0
- package/dist/components/TodoPanel.d.ts +26 -0
- package/dist/components/TodoPanel.d.ts.map +1 -0
- package/dist/components/TodoPanel.js +105 -0
- package/dist/components/base/BaseAutocomplete.cjs +153 -0
- package/dist/components/base/BaseAutocomplete.d.ts +29 -0
- package/dist/components/base/BaseAutocomplete.d.ts.map +1 -0
- package/dist/components/base/BaseAutocomplete.js +129 -0
- package/dist/components/base/BaseSelector.cjs +167 -0
- package/dist/components/base/BaseSelector.d.ts +37 -0
- package/dist/components/base/BaseSelector.d.ts.map +1 -0
- package/dist/components/base/BaseSelector.js +151 -0
- package/dist/components/base/index.cjs +31 -0
- package/dist/components/base/index.d.ts +6 -0
- package/dist/components/base/index.d.ts.map +1 -0
- package/dist/components/base/index.js +6 -0
- package/dist/components/chat/ChatView.cjs +51 -0
- package/dist/components/chat/ChatView.d.ts +19 -0
- package/dist/components/chat/ChatView.d.ts.map +1 -0
- package/dist/components/chat/ChatView.js +27 -0
- package/dist/components/chat/Footer.cjs +32 -0
- package/dist/components/chat/Footer.d.ts +9 -0
- package/dist/components/chat/Footer.d.ts.map +1 -0
- package/dist/components/chat/Footer.js +8 -0
- package/dist/components/chat/Header.cjs +86 -0
- package/dist/components/chat/Header.d.ts +18 -0
- package/dist/components/chat/Header.d.ts.map +1 -0
- package/dist/components/chat/Header.js +62 -0
- package/dist/components/chat/MessageItem.cjs +269 -0
- package/dist/components/chat/MessageItem.d.ts +23 -0
- package/dist/components/chat/MessageItem.d.ts.map +1 -0
- package/dist/components/chat/MessageItem.js +247 -0
- package/dist/components/chat/MessageList.cjs +46 -0
- package/dist/components/chat/MessageList.d.ts +16 -0
- package/dist/components/chat/MessageList.d.ts.map +1 -0
- package/dist/components/chat/MessageList.js +22 -0
- package/dist/components/chat/QueuedMessagesDisplay.cjs +59 -0
- package/dist/components/chat/QueuedMessagesDisplay.d.ts +16 -0
- package/dist/components/chat/QueuedMessagesDisplay.d.ts.map +1 -0
- package/dist/components/chat/QueuedMessagesDisplay.js +35 -0
- package/dist/components/chat/ToolIcon.cjs +60 -0
- package/dist/components/chat/ToolIcon.d.ts +18 -0
- package/dist/components/chat/ToolIcon.d.ts.map +1 -0
- package/dist/components/chat/ToolIcon.js +36 -0
- package/dist/components/chat/index.cjs +43 -0
- package/dist/components/chat/index.d.ts +10 -0
- package/dist/components/chat/index.d.ts.map +1 -0
- package/dist/components/chat/index.js +14 -0
- package/dist/components/chat/styled-boxes/ConfigBox.cjs +56 -0
- package/dist/components/chat/styled-boxes/ConfigBox.d.ts +10 -0
- package/dist/components/chat/styled-boxes/ConfigBox.d.ts.map +1 -0
- package/dist/components/chat/styled-boxes/ConfigBox.js +32 -0
- package/dist/components/chat/styled-boxes/HelpBox.cjs +53 -0
- package/dist/components/chat/styled-boxes/HelpBox.d.ts +10 -0
- package/dist/components/chat/styled-boxes/HelpBox.d.ts.map +1 -0
- package/dist/components/chat/styled-boxes/HelpBox.js +29 -0
- package/dist/components/chat/styled-boxes/LogConfigBox.cjs +54 -0
- package/dist/components/chat/styled-boxes/LogConfigBox.d.ts +10 -0
- package/dist/components/chat/styled-boxes/LogConfigBox.d.ts.map +1 -0
- package/dist/components/chat/styled-boxes/LogConfigBox.js +30 -0
- package/dist/components/chat/styled-boxes/SessionHistoryBox.cjs +81 -0
- package/dist/components/chat/styled-boxes/SessionHistoryBox.d.ts +10 -0
- package/dist/components/chat/styled-boxes/SessionHistoryBox.d.ts.map +1 -0
- package/dist/components/chat/styled-boxes/SessionHistoryBox.js +57 -0
- package/dist/components/chat/styled-boxes/SessionListBox.cjs +58 -0
- package/dist/components/chat/styled-boxes/SessionListBox.d.ts +10 -0
- package/dist/components/chat/styled-boxes/SessionListBox.d.ts.map +1 -0
- package/dist/components/chat/styled-boxes/SessionListBox.js +34 -0
- package/dist/components/chat/styled-boxes/ShortcutsBox.cjs +39 -0
- package/dist/components/chat/styled-boxes/ShortcutsBox.d.ts +10 -0
- package/dist/components/chat/styled-boxes/ShortcutsBox.d.ts.map +1 -0
- package/dist/components/chat/styled-boxes/ShortcutsBox.js +15 -0
- package/dist/components/chat/styled-boxes/StatsBox.cjs +123 -0
- package/dist/components/chat/styled-boxes/StatsBox.d.ts +10 -0
- package/dist/components/chat/styled-boxes/StatsBox.d.ts.map +1 -0
- package/dist/components/chat/styled-boxes/StatsBox.js +99 -0
- package/dist/components/chat/styled-boxes/StyledBox.cjs +88 -0
- package/dist/components/chat/styled-boxes/StyledBox.d.ts +45 -0
- package/dist/components/chat/styled-boxes/StyledBox.d.ts.map +1 -0
- package/dist/components/chat/styled-boxes/StyledBox.js +61 -0
- package/dist/components/chat/styled-boxes/SyspromptBox.cjs +33 -0
- package/dist/components/chat/styled-boxes/SyspromptBox.d.ts +10 -0
- package/dist/components/chat/styled-boxes/SyspromptBox.d.ts.map +1 -0
- package/dist/components/chat/styled-boxes/SyspromptBox.js +9 -0
- package/dist/components/chat/styled-boxes/index.cjs +58 -0
- package/dist/components/chat/styled-boxes/index.d.ts +13 -0
- package/dist/components/chat/styled-boxes/index.d.ts.map +1 -0
- package/dist/components/chat/styled-boxes/index.js +23 -0
- package/dist/components/input/InputArea.cjs +74 -0
- package/dist/components/input/InputArea.d.ts +48 -0
- package/dist/components/input/InputArea.d.ts.map +1 -0
- package/dist/components/input/InputArea.js +50 -0
- package/dist/components/input/index.cjs +28 -0
- package/dist/components/input/index.d.ts +5 -0
- package/dist/components/input/index.d.ts.map +1 -0
- package/dist/components/input/index.js +4 -0
- package/dist/components/modes/AlternateBufferCLI.cjs +360 -0
- package/dist/components/modes/AlternateBufferCLI.d.ts +28 -0
- package/dist/components/modes/AlternateBufferCLI.d.ts.map +1 -0
- package/dist/components/modes/AlternateBufferCLI.js +339 -0
- package/dist/components/modes/StaticCLI.cjs +303 -0
- package/dist/components/modes/StaticCLI.d.ts +30 -0
- package/dist/components/modes/StaticCLI.d.ts.map +1 -0
- package/dist/components/modes/StaticCLI.js +279 -0
- package/dist/components/modes/index.cjs +31 -0
- package/dist/components/modes/index.d.ts +10 -0
- package/dist/components/modes/index.d.ts.map +1 -0
- package/dist/components/modes/index.js +6 -0
- package/dist/components/overlays/ApiKeyInput.cjs +131 -0
- package/dist/components/overlays/ApiKeyInput.d.ts +26 -0
- package/dist/components/overlays/ApiKeyInput.d.ts.map +1 -0
- package/dist/components/overlays/ApiKeyInput.js +115 -0
- package/dist/components/overlays/CommandOutputOverlay.cjs +103 -0
- package/dist/components/overlays/CommandOutputOverlay.d.ts +13 -0
- package/dist/components/overlays/CommandOutputOverlay.d.ts.map +1 -0
- package/dist/components/overlays/CommandOutputOverlay.js +69 -0
- package/dist/components/overlays/ContextStatsOverlay.cjs +354 -0
- package/dist/components/overlays/ContextStatsOverlay.d.ts +26 -0
- package/dist/components/overlays/ContextStatsOverlay.d.ts.map +1 -0
- package/dist/components/overlays/ContextStatsOverlay.js +334 -0
- package/dist/components/overlays/CustomModelWizard.cjs +362 -0
- package/dist/components/overlays/CustomModelWizard.d.ts +29 -0
- package/dist/components/overlays/CustomModelWizard.d.ts.map +1 -0
- package/dist/components/overlays/CustomModelWizard.js +356 -0
- package/dist/components/overlays/ExportWizard.cjs +382 -0
- package/dist/components/overlays/ExportWizard.d.ts +22 -0
- package/dist/components/overlays/ExportWizard.d.ts.map +1 -0
- package/dist/components/overlays/ExportWizard.js +352 -0
- package/dist/components/overlays/LogLevelSelector.cjs +120 -0
- package/dist/components/overlays/LogLevelSelector.d.ts +23 -0
- package/dist/components/overlays/LogLevelSelector.d.ts.map +1 -0
- package/dist/components/overlays/LogLevelSelector.js +100 -0
- package/dist/components/overlays/LoginOverlay.cjs +211 -0
- package/dist/components/overlays/LoginOverlay.d.ts +22 -0
- package/dist/components/overlays/LoginOverlay.d.ts.map +1 -0
- package/dist/components/overlays/LoginOverlay.js +194 -0
- package/dist/components/overlays/LogoutOverlay.cjs +138 -0
- package/dist/components/overlays/LogoutOverlay.d.ts +20 -0
- package/dist/components/overlays/LogoutOverlay.d.ts.map +1 -0
- package/dist/components/overlays/LogoutOverlay.js +130 -0
- package/dist/components/overlays/MarketplaceAddPrompt.cjs +119 -0
- package/dist/components/overlays/MarketplaceAddPrompt.d.ts +20 -0
- package/dist/components/overlays/MarketplaceAddPrompt.d.ts.map +1 -0
- package/dist/components/overlays/MarketplaceAddPrompt.js +99 -0
- package/dist/components/overlays/MarketplaceBrowser.cjs +364 -0
- package/dist/components/overlays/MarketplaceBrowser.d.ts +31 -0
- package/dist/components/overlays/MarketplaceBrowser.d.ts.map +1 -0
- package/dist/components/overlays/MarketplaceBrowser.js +358 -0
- package/dist/components/overlays/McpAddChoice.cjs +100 -0
- package/dist/components/overlays/McpAddChoice.d.ts +22 -0
- package/dist/components/overlays/McpAddChoice.d.ts.map +1 -0
- package/dist/components/overlays/McpAddChoice.js +80 -0
- package/dist/components/overlays/McpAddSelector.cjs +113 -0
- package/dist/components/overlays/McpAddSelector.d.ts +26 -0
- package/dist/components/overlays/McpAddSelector.d.ts.map +1 -0
- package/dist/components/overlays/McpAddSelector.js +93 -0
- package/dist/components/overlays/McpCustomTypeSelector.cjs +99 -0
- package/dist/components/overlays/McpCustomTypeSelector.d.ts +21 -0
- package/dist/components/overlays/McpCustomTypeSelector.d.ts.map +1 -0
- package/dist/components/overlays/McpCustomTypeSelector.js +79 -0
- package/dist/components/overlays/McpCustomWizard.cjs +258 -0
- package/dist/components/overlays/McpCustomWizard.d.ts +29 -0
- package/dist/components/overlays/McpCustomWizard.d.ts.map +1 -0
- package/dist/components/overlays/McpCustomWizard.js +238 -0
- package/dist/components/overlays/McpRemoveSelector.cjs +127 -0
- package/dist/components/overlays/McpRemoveSelector.d.ts +22 -0
- package/dist/components/overlays/McpRemoveSelector.d.ts.map +1 -0
- package/dist/components/overlays/McpRemoveSelector.js +107 -0
- package/dist/components/overlays/McpSelector.cjs +94 -0
- package/dist/components/overlays/McpSelector.d.ts +21 -0
- package/dist/components/overlays/McpSelector.d.ts.map +1 -0
- package/dist/components/overlays/McpSelector.js +74 -0
- package/dist/components/overlays/McpServerActions.cjs +124 -0
- package/dist/components/overlays/McpServerActions.d.ts +28 -0
- package/dist/components/overlays/McpServerActions.d.ts.map +1 -0
- package/dist/components/overlays/McpServerActions.js +111 -0
- package/dist/components/overlays/McpServerList.cjs +152 -0
- package/dist/components/overlays/McpServerList.d.ts +29 -0
- package/dist/components/overlays/McpServerList.d.ts.map +1 -0
- package/dist/components/overlays/McpServerList.js +139 -0
- package/dist/components/overlays/ModelSelectorRefactored.cjs +869 -0
- package/dist/components/overlays/ModelSelectorRefactored.d.ts +27 -0
- package/dist/components/overlays/ModelSelectorRefactored.d.ts.map +1 -0
- package/dist/components/overlays/ModelSelectorRefactored.js +870 -0
- package/dist/components/overlays/PluginActions.cjs +108 -0
- package/dist/components/overlays/PluginActions.d.ts +27 -0
- package/dist/components/overlays/PluginActions.d.ts.map +1 -0
- package/dist/components/overlays/PluginActions.js +95 -0
- package/dist/components/overlays/PluginList.cjs +115 -0
- package/dist/components/overlays/PluginList.d.ts +21 -0
- package/dist/components/overlays/PluginList.d.ts.map +1 -0
- package/dist/components/overlays/PluginList.js +102 -0
- package/dist/components/overlays/PluginManager.cjs +106 -0
- package/dist/components/overlays/PluginManager.d.ts +21 -0
- package/dist/components/overlays/PluginManager.d.ts.map +1 -0
- package/dist/components/overlays/PluginManager.js +86 -0
- package/dist/components/overlays/PromptAddChoice.cjs +92 -0
- package/dist/components/overlays/PromptAddChoice.d.ts +22 -0
- package/dist/components/overlays/PromptAddChoice.d.ts.map +1 -0
- package/dist/components/overlays/PromptAddChoice.js +72 -0
- package/dist/components/overlays/PromptAddWizard.cjs +215 -0
- package/dist/components/overlays/PromptAddWizard.d.ts +29 -0
- package/dist/components/overlays/PromptAddWizard.d.ts.map +1 -0
- package/dist/components/overlays/PromptAddWizard.js +195 -0
- package/dist/components/overlays/PromptDeleteSelector.cjs +148 -0
- package/dist/components/overlays/PromptDeleteSelector.d.ts +27 -0
- package/dist/components/overlays/PromptDeleteSelector.d.ts.map +1 -0
- package/dist/components/overlays/PromptDeleteSelector.js +135 -0
- package/dist/components/overlays/PromptList.cjs +169 -0
- package/dist/components/overlays/PromptList.d.ts +33 -0
- package/dist/components/overlays/PromptList.d.ts.map +1 -0
- package/dist/components/overlays/PromptList.js +157 -0
- package/dist/components/overlays/ReasoningOverlay.cjs +305 -0
- package/dist/components/overlays/ReasoningOverlay.d.ts +28 -0
- package/dist/components/overlays/ReasoningOverlay.d.ts.map +1 -0
- package/dist/components/overlays/ReasoningOverlay.js +278 -0
- package/dist/components/overlays/SearchOverlay.cjs +249 -0
- package/dist/components/overlays/SearchOverlay.d.ts +23 -0
- package/dist/components/overlays/SearchOverlay.d.ts.map +1 -0
- package/dist/components/overlays/SearchOverlay.js +236 -0
- package/dist/components/overlays/SessionRenameOverlay.cjs +101 -0
- package/dist/components/overlays/SessionRenameOverlay.d.ts +21 -0
- package/dist/components/overlays/SessionRenameOverlay.d.ts.map +1 -0
- package/dist/components/overlays/SessionRenameOverlay.js +81 -0
- package/dist/components/overlays/SessionSelectorRefactored.cjs +153 -0
- package/dist/components/overlays/SessionSelectorRefactored.d.ts +26 -0
- package/dist/components/overlays/SessionSelectorRefactored.d.ts.map +1 -0
- package/dist/components/overlays/SessionSelectorRefactored.js +133 -0
- package/dist/components/overlays/SessionSubcommandSelector.cjs +84 -0
- package/dist/components/overlays/SessionSubcommandSelector.d.ts +21 -0
- package/dist/components/overlays/SessionSubcommandSelector.d.ts.map +1 -0
- package/dist/components/overlays/SessionSubcommandSelector.js +64 -0
- package/dist/components/overlays/SoundsSelector.cjs +632 -0
- package/dist/components/overlays/SoundsSelector.d.ts +21 -0
- package/dist/components/overlays/SoundsSelector.d.ts.map +1 -0
- package/dist/components/overlays/SoundsSelector.js +619 -0
- package/dist/components/overlays/StreamSelector.cjs +104 -0
- package/dist/components/overlays/StreamSelector.d.ts +20 -0
- package/dist/components/overlays/StreamSelector.d.ts.map +1 -0
- package/dist/components/overlays/StreamSelector.js +84 -0
- package/dist/components/overlays/ToolBrowser.cjs +854 -0
- package/dist/components/overlays/ToolBrowser.d.ts +26 -0
- package/dist/components/overlays/ToolBrowser.d.ts.map +1 -0
- package/dist/components/overlays/ToolBrowser.js +831 -0
- package/dist/components/overlays/custom-model-wizard/LocalModelWizard.cjs +784 -0
- package/dist/components/overlays/custom-model-wizard/LocalModelWizard.d.ts +25 -0
- package/dist/components/overlays/custom-model-wizard/LocalModelWizard.d.ts.map +1 -0
- package/dist/components/overlays/custom-model-wizard/LocalModelWizard.js +768 -0
- package/dist/components/overlays/custom-model-wizard/index.cjs +26 -0
- package/dist/components/overlays/custom-model-wizard/index.d.ts +15 -0
- package/dist/components/overlays/custom-model-wizard/index.d.ts.map +1 -0
- package/dist/components/overlays/custom-model-wizard/index.js +3 -0
- package/dist/components/overlays/custom-model-wizard/provider-config.cjs +549 -0
- package/dist/components/overlays/custom-model-wizard/provider-config.d.ts +42 -0
- package/dist/components/overlays/custom-model-wizard/provider-config.d.ts.map +1 -0
- package/dist/components/overlays/custom-model-wizard/provider-config.js +516 -0
- package/dist/components/overlays/custom-model-wizard/provider-config.test.cjs +31 -0
- package/dist/components/overlays/custom-model-wizard/provider-config.test.d.ts +2 -0
- package/dist/components/overlays/custom-model-wizard/provider-config.test.d.ts.map +1 -0
- package/dist/components/overlays/custom-model-wizard/provider-config.test.js +30 -0
- package/dist/components/overlays/custom-model-wizard/shared/ApiKeyStep.cjs +59 -0
- package/dist/components/overlays/custom-model-wizard/shared/ApiKeyStep.d.ts +25 -0
- package/dist/components/overlays/custom-model-wizard/shared/ApiKeyStep.d.ts.map +1 -0
- package/dist/components/overlays/custom-model-wizard/shared/ApiKeyStep.js +33 -0
- package/dist/components/overlays/custom-model-wizard/shared/ProviderSelector.cjs +64 -0
- package/dist/components/overlays/custom-model-wizard/shared/ProviderSelector.d.ts +17 -0
- package/dist/components/overlays/custom-model-wizard/shared/ProviderSelector.d.ts.map +1 -0
- package/dist/components/overlays/custom-model-wizard/shared/ProviderSelector.js +40 -0
- package/dist/components/overlays/custom-model-wizard/shared/SetupInfoBanner.cjs +48 -0
- package/dist/components/overlays/custom-model-wizard/shared/SetupInfoBanner.d.ts +20 -0
- package/dist/components/overlays/custom-model-wizard/shared/SetupInfoBanner.d.ts.map +1 -0
- package/dist/components/overlays/custom-model-wizard/shared/SetupInfoBanner.js +24 -0
- package/dist/components/overlays/custom-model-wizard/shared/WizardStepInput.cjs +58 -0
- package/dist/components/overlays/custom-model-wizard/shared/WizardStepInput.d.ts +30 -0
- package/dist/components/overlays/custom-model-wizard/shared/WizardStepInput.d.ts.map +1 -0
- package/dist/components/overlays/custom-model-wizard/shared/WizardStepInput.js +34 -0
- package/dist/components/overlays/custom-model-wizard/shared/index.cjs +41 -0
- package/dist/components/overlays/custom-model-wizard/shared/index.d.ts +8 -0
- package/dist/components/overlays/custom-model-wizard/shared/index.d.ts.map +1 -0
- package/dist/components/overlays/custom-model-wizard/shared/index.js +12 -0
- package/dist/components/overlays/custom-model-wizard/types.cjs +53 -0
- package/dist/components/overlays/custom-model-wizard/types.d.ts +85 -0
- package/dist/components/overlays/custom-model-wizard/types.d.ts.map +1 -0
- package/dist/components/overlays/custom-model-wizard/types.js +29 -0
- package/dist/components/renderers/DiffRenderer.cjs +145 -0
- package/dist/components/renderers/DiffRenderer.d.ts +21 -0
- package/dist/components/renderers/DiffRenderer.d.ts.map +1 -0
- package/dist/components/renderers/DiffRenderer.js +118 -0
- package/dist/components/renderers/FilePreviewRenderer.cjs +146 -0
- package/dist/components/renderers/FilePreviewRenderer.d.ts +30 -0
- package/dist/components/renderers/FilePreviewRenderer.d.ts.map +1 -0
- package/dist/components/renderers/FilePreviewRenderer.js +119 -0
- package/dist/components/renderers/FileRenderer.cjs +95 -0
- package/dist/components/renderers/FileRenderer.d.ts +21 -0
- package/dist/components/renderers/FileRenderer.d.ts.map +1 -0
- package/dist/components/renderers/FileRenderer.js +71 -0
- package/dist/components/renderers/GenericRenderer.cjs +63 -0
- package/dist/components/renderers/GenericRenderer.d.ts +21 -0
- package/dist/components/renderers/GenericRenderer.d.ts.map +1 -0
- package/dist/components/renderers/GenericRenderer.js +39 -0
- package/dist/components/renderers/SearchRenderer.cjs +77 -0
- package/dist/components/renderers/SearchRenderer.d.ts +20 -0
- package/dist/components/renderers/SearchRenderer.d.ts.map +1 -0
- package/dist/components/renderers/SearchRenderer.js +43 -0
- package/dist/components/renderers/ShellRenderer.cjs +61 -0
- package/dist/components/renderers/ShellRenderer.d.ts +21 -0
- package/dist/components/renderers/ShellRenderer.d.ts.map +1 -0
- package/dist/components/renderers/ShellRenderer.js +37 -0
- package/dist/components/renderers/diff-shared.cjs +172 -0
- package/dist/components/renderers/diff-shared.d.ts +61 -0
- package/dist/components/renderers/diff-shared.d.ts.map +1 -0
- package/dist/components/renderers/diff-shared.js +142 -0
- package/dist/components/renderers/index.cjs +75 -0
- package/dist/components/renderers/index.d.ts +28 -0
- package/dist/components/renderers/index.d.ts.map +1 -0
- package/dist/components/renderers/index.js +44 -0
- package/dist/components/shared/FocusOverlayFrame.cjs +39 -0
- package/dist/components/shared/FocusOverlayFrame.d.ts +7 -0
- package/dist/components/shared/FocusOverlayFrame.d.ts.map +1 -0
- package/dist/components/shared/FocusOverlayFrame.js +15 -0
- package/dist/components/shared/HintBar.cjs +33 -0
- package/dist/components/shared/HintBar.d.ts +6 -0
- package/dist/components/shared/HintBar.d.ts.map +1 -0
- package/dist/components/shared/HintBar.js +9 -0
- package/dist/components/shared/MarkdownText.cjs +409 -0
- package/dist/components/shared/MarkdownText.d.ts +38 -0
- package/dist/components/shared/MarkdownText.d.ts.map +1 -0
- package/dist/components/shared/MarkdownText.js +373 -0
- package/dist/components/shared/VirtualizedList.cjs +365 -0
- package/dist/components/shared/VirtualizedList.d.ts +44 -0
- package/dist/components/shared/VirtualizedList.d.ts.map +1 -0
- package/dist/components/shared/VirtualizedList.js +349 -0
- package/dist/components/shared/text-buffer.cjs +1220 -0
- package/dist/components/shared/text-buffer.d.ts +185 -0
- package/dist/components/shared/text-buffer.d.ts.map +1 -0
- package/dist/components/shared/text-buffer.js +1194 -0
- package/dist/constants/processingPhrases.cjs +114 -0
- package/dist/constants/processingPhrases.d.ts +10 -0
- package/dist/constants/processingPhrases.d.ts.map +1 -0
- package/dist/constants/processingPhrases.js +89 -0
- package/dist/constants/spinnerFrames.cjs +28 -0
- package/dist/constants/spinnerFrames.d.ts +2 -0
- package/dist/constants/spinnerFrames.d.ts.map +1 -0
- package/dist/constants/spinnerFrames.js +4 -0
- package/dist/constants/tips.cjs +76 -0
- package/dist/constants/tips.d.ts +15 -0
- package/dist/constants/tips.d.ts.map +1 -0
- package/dist/constants/tips.js +51 -0
- package/dist/containers/InputContainer.cjs +706 -0
- package/dist/containers/InputContainer.d.ts +62 -0
- package/dist/containers/InputContainer.d.ts.map +1 -0
- package/dist/containers/InputContainer.js +672 -0
- package/dist/containers/OverlayContainer.cjs +2372 -0
- package/dist/containers/OverlayContainer.d.ts +42 -0
- package/dist/containers/OverlayContainer.d.ts.map +1 -0
- package/dist/containers/OverlayContainer.js +2356 -0
- package/dist/containers/index.cjs +31 -0
- package/dist/containers/index.d.ts +6 -0
- package/dist/containers/index.d.ts.map +1 -0
- package/dist/containers/index.js +6 -0
- package/dist/contexts/KeypressContext.cjs +436 -0
- package/dist/contexts/KeypressContext.d.ts +36 -0
- package/dist/contexts/KeypressContext.d.ts.map +1 -0
- package/dist/contexts/KeypressContext.js +408 -0
- package/dist/contexts/MouseContext.cjs +122 -0
- package/dist/contexts/MouseContext.d.ts +27 -0
- package/dist/contexts/MouseContext.d.ts.map +1 -0
- package/dist/contexts/MouseContext.js +101 -0
- package/dist/contexts/ScrollProvider.cjs +180 -0
- package/dist/contexts/ScrollProvider.d.ts +33 -0
- package/dist/contexts/ScrollProvider.d.ts.map +1 -0
- package/dist/contexts/ScrollProvider.js +163 -0
- package/dist/contexts/SoundContext.cjs +38 -0
- package/dist/contexts/SoundContext.d.ts +23 -0
- package/dist/contexts/SoundContext.d.ts.map +1 -0
- package/dist/contexts/SoundContext.js +13 -0
- package/dist/contexts/index.cjs +47 -0
- package/dist/contexts/index.d.ts +8 -0
- package/dist/contexts/index.d.ts.map +1 -0
- package/dist/contexts/index.js +25 -0
- package/dist/hooks/index.cjs +54 -0
- package/dist/hooks/index.d.ts +12 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/index.js +28 -0
- package/dist/hooks/useAgentEvents.cjs +382 -0
- package/dist/hooks/useAgentEvents.d.ts +49 -0
- package/dist/hooks/useAgentEvents.d.ts.map +1 -0
- package/dist/hooks/useAgentEvents.js +360 -0
- package/dist/hooks/useAnimationTick.cjs +71 -0
- package/dist/hooks/useAnimationTick.d.ts +11 -0
- package/dist/hooks/useAnimationTick.d.ts.map +1 -0
- package/dist/hooks/useAnimationTick.js +47 -0
- package/dist/hooks/useBatchedScroll.cjs +44 -0
- package/dist/hooks/useBatchedScroll.d.ts +14 -0
- package/dist/hooks/useBatchedScroll.d.ts.map +1 -0
- package/dist/hooks/useBatchedScroll.js +20 -0
- package/dist/hooks/useCLIState.cjs +222 -0
- package/dist/hooks/useCLIState.d.ts +53 -0
- package/dist/hooks/useCLIState.d.ts.map +1 -0
- package/dist/hooks/useCLIState.js +201 -0
- package/dist/hooks/useElapsedTime.cjs +79 -0
- package/dist/hooks/useElapsedTime.d.ts +24 -0
- package/dist/hooks/useElapsedTime.d.ts.map +1 -0
- package/dist/hooks/useElapsedTime.js +55 -0
- package/dist/hooks/useGitBranch.cjs +47 -0
- package/dist/hooks/useGitBranch.d.ts +13 -0
- package/dist/hooks/useGitBranch.d.ts.map +1 -0
- package/dist/hooks/useGitBranch.js +23 -0
- package/dist/hooks/useHistorySearch.cjs +219 -0
- package/dist/hooks/useHistorySearch.d.ts +61 -0
- package/dist/hooks/useHistorySearch.d.ts.map +1 -0
- package/dist/hooks/useHistorySearch.js +195 -0
- package/dist/hooks/useInputHistory.cjs +47 -0
- package/dist/hooks/useInputHistory.d.ts +18 -0
- package/dist/hooks/useInputHistory.d.ts.map +1 -0
- package/dist/hooks/useInputHistory.js +23 -0
- package/dist/hooks/useInputOrchestrator.cjs +663 -0
- package/dist/hooks/useInputOrchestrator.d.ts +136 -0
- package/dist/hooks/useInputOrchestrator.d.ts.map +1 -0
- package/dist/hooks/useInputOrchestrator.js +635 -0
- package/dist/hooks/useKeyboardShortcuts.cjs +87 -0
- package/dist/hooks/useKeyboardShortcuts.d.ts +21 -0
- package/dist/hooks/useKeyboardShortcuts.d.ts.map +1 -0
- package/dist/hooks/useKeyboardShortcuts.js +63 -0
- package/dist/hooks/useKeypress.cjs +41 -0
- package/dist/hooks/useKeypress.d.ts +18 -0
- package/dist/hooks/useKeypress.d.ts.map +1 -0
- package/dist/hooks/useKeypress.js +17 -0
- package/dist/hooks/usePhraseCycler.cjs +74 -0
- package/dist/hooks/usePhraseCycler.d.ts +30 -0
- package/dist/hooks/usePhraseCycler.d.ts.map +1 -0
- package/dist/hooks/usePhraseCycler.js +50 -0
- package/dist/hooks/useStreaming.cjs +43 -0
- package/dist/hooks/useStreaming.d.ts +19 -0
- package/dist/hooks/useStreaming.d.ts.map +1 -0
- package/dist/hooks/useStreaming.js +24 -0
- package/dist/hooks/useTerminalSize.cjs +48 -0
- package/dist/hooks/useTerminalSize.d.ts +14 -0
- package/dist/hooks/useTerminalSize.d.ts.map +1 -0
- package/dist/hooks/useTerminalSize.js +24 -0
- package/dist/hooks/useTokenCounter.cjs +105 -0
- package/dist/hooks/useTokenCounter.d.ts +46 -0
- package/dist/hooks/useTokenCounter.d.ts.map +1 -0
- package/dist/hooks/useTokenCounter.js +81 -0
- package/dist/host/index.cjs +144 -0
- package/dist/host/index.d.ts +108 -0
- package/dist/host/index.d.ts.map +1 -0
- package/dist/host/index.js +104 -0
- package/dist/index.cjs +33 -0
- package/dist/index.d.cts +195 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +7 -0
- package/dist/interactive-commands/auth/index.cjs +44 -0
- package/dist/interactive-commands/auth/index.d.ts +13 -0
- package/dist/interactive-commands/auth/index.d.ts.map +1 -0
- package/dist/interactive-commands/auth/index.js +19 -0
- package/dist/interactive-commands/command-parser.cjs +184 -0
- package/dist/interactive-commands/command-parser.d.ts +56 -0
- package/dist/interactive-commands/command-parser.d.ts.map +1 -0
- package/dist/interactive-commands/command-parser.js +146 -0
- package/dist/interactive-commands/commands.cjs +135 -0
- package/dist/interactive-commands/commands.d.ts +52 -0
- package/dist/interactive-commands/commands.d.ts.map +1 -0
- package/dist/interactive-commands/commands.js +99 -0
- package/dist/interactive-commands/documentation-commands.cjs +61 -0
- package/dist/interactive-commands/documentation-commands.d.ts +15 -0
- package/dist/interactive-commands/documentation-commands.d.ts.map +1 -0
- package/dist/interactive-commands/documentation-commands.js +27 -0
- package/dist/interactive-commands/exit-handler.cjs +40 -0
- package/dist/interactive-commands/exit-handler.d.ts +12 -0
- package/dist/interactive-commands/exit-handler.d.ts.map +1 -0
- package/dist/interactive-commands/exit-handler.js +15 -0
- package/dist/interactive-commands/exit-stats.cjs +41 -0
- package/dist/interactive-commands/exit-stats.d.ts +24 -0
- package/dist/interactive-commands/exit-stats.d.ts.map +1 -0
- package/dist/interactive-commands/exit-stats.js +15 -0
- package/dist/interactive-commands/export/index.cjs +36 -0
- package/dist/interactive-commands/export/index.d.ts +13 -0
- package/dist/interactive-commands/export/index.d.ts.map +1 -0
- package/dist/interactive-commands/export/index.js +12 -0
- package/dist/interactive-commands/general-commands.cjs +478 -0
- package/dist/interactive-commands/general-commands.d.ts +22 -0
- package/dist/interactive-commands/general-commands.d.ts.map +1 -0
- package/dist/interactive-commands/general-commands.js +443 -0
- package/dist/interactive-commands/mcp/index.cjs +35 -0
- package/dist/interactive-commands/mcp/index.d.ts +13 -0
- package/dist/interactive-commands/mcp/index.d.ts.map +1 -0
- package/dist/interactive-commands/mcp/index.js +11 -0
- package/dist/interactive-commands/model/index.cjs +36 -0
- package/dist/interactive-commands/model/index.d.ts +13 -0
- package/dist/interactive-commands/model/index.d.ts.map +1 -0
- package/dist/interactive-commands/model/index.js +12 -0
- package/dist/interactive-commands/plugin/index.cjs +35 -0
- package/dist/interactive-commands/plugin/index.d.ts +13 -0
- package/dist/interactive-commands/plugin/index.d.ts.map +1 -0
- package/dist/interactive-commands/plugin/index.js +11 -0
- package/dist/interactive-commands/prompt-commands.cjs +269 -0
- package/dist/interactive-commands/prompt-commands.d.ts +25 -0
- package/dist/interactive-commands/prompt-commands.d.ts.map +1 -0
- package/dist/interactive-commands/prompt-commands.js +244 -0
- package/dist/interactive-commands/session/index.cjs +32 -0
- package/dist/interactive-commands/session/index.d.ts +16 -0
- package/dist/interactive-commands/session/index.d.ts.map +1 -0
- package/dist/interactive-commands/session/index.js +6 -0
- package/dist/interactive-commands/session/session-commands.cjs +64 -0
- package/dist/interactive-commands/session/session-commands.d.ts +32 -0
- package/dist/interactive-commands/session/session-commands.d.ts.map +1 -0
- package/dist/interactive-commands/session/session-commands.js +38 -0
- package/dist/interactive-commands/system/index.cjs +28 -0
- package/dist/interactive-commands/system/index.d.ts +13 -0
- package/dist/interactive-commands/system/index.d.ts.map +1 -0
- package/dist/interactive-commands/system/index.js +4 -0
- package/dist/interactive-commands/system/system-commands.cjs +217 -0
- package/dist/interactive-commands/system/system-commands.d.ts +6 -0
- package/dist/interactive-commands/system/system-commands.d.ts.map +1 -0
- package/dist/interactive-commands/system/system-commands.js +195 -0
- package/dist/interactive-commands/tool-commands.cjs +38 -0
- package/dist/interactive-commands/tool-commands.d.ts +15 -0
- package/dist/interactive-commands/tool-commands.d.ts.map +1 -0
- package/dist/interactive-commands/tool-commands.js +14 -0
- package/dist/interactive-commands/utils/arg-parser.cjs +59 -0
- package/dist/interactive-commands/utils/arg-parser.d.ts +57 -0
- package/dist/interactive-commands/utils/arg-parser.d.ts.map +1 -0
- package/dist/interactive-commands/utils/arg-parser.js +34 -0
- package/dist/interactive-commands/utils/command-output.cjs +75 -0
- package/dist/interactive-commands/utils/command-output.d.ts +40 -0
- package/dist/interactive-commands/utils/command-output.d.ts.map +1 -0
- package/dist/interactive-commands/utils/command-output.js +51 -0
- package/dist/interactive-commands/utils/format-output.cjs +36 -0
- package/dist/interactive-commands/utils/format-output.d.ts +14 -0
- package/dist/interactive-commands/utils/format-output.d.ts.map +1 -0
- package/dist/interactive-commands/utils/format-output.js +11 -0
- package/dist/services/CommandService.cjs +68 -0
- package/dist/services/CommandService.d.ts +58 -0
- package/dist/services/CommandService.d.ts.map +1 -0
- package/dist/services/CommandService.js +41 -0
- package/dist/services/InputService.cjs +97 -0
- package/dist/services/InputService.d.ts +40 -0
- package/dist/services/InputService.d.ts.map +1 -0
- package/dist/services/InputService.js +78 -0
- package/dist/services/MessageService.cjs +69 -0
- package/dist/services/MessageService.d.ts +35 -0
- package/dist/services/MessageService.d.ts.map +1 -0
- package/dist/services/MessageService.js +51 -0
- package/dist/services/index.cjs +39 -0
- package/dist/services/index.d.ts +8 -0
- package/dist/services/index.d.ts.map +1 -0
- package/dist/services/index.js +16 -0
- package/dist/services/processStream.cjs +877 -0
- package/dist/services/processStream.d.ts +79 -0
- package/dist/services/processStream.d.ts.map +1 -0
- package/dist/services/processStream.js +843 -0
- package/dist/services/processStream.test.cjs +255 -0
- package/dist/services/processStream.test.d.ts +2 -0
- package/dist/services/processStream.test.d.ts.map +1 -0
- package/dist/services/processStream.test.js +254 -0
- package/dist/state/actions.cjs +16 -0
- package/dist/state/actions.d.ts +124 -0
- package/dist/state/actions.d.ts.map +1 -0
- package/dist/state/actions.js +0 -0
- package/dist/state/index.cjs +28 -0
- package/dist/state/index.d.ts +10 -0
- package/dist/state/index.d.ts.map +1 -0
- package/dist/state/index.js +4 -0
- package/dist/state/initialState.cjs +78 -0
- package/dist/state/initialState.d.ts +12 -0
- package/dist/state/initialState.d.ts.map +1 -0
- package/dist/state/initialState.js +54 -0
- package/dist/state/reducer.cjs +340 -0
- package/dist/state/reducer.d.ts +15 -0
- package/dist/state/reducer.d.ts.map +1 -0
- package/dist/state/reducer.js +316 -0
- package/dist/state/streaming-state.cjs +52 -0
- package/dist/state/streaming-state.d.ts +27 -0
- package/dist/state/streaming-state.d.ts.map +1 -0
- package/dist/state/streaming-state.js +25 -0
- package/dist/state/types.cjs +16 -0
- package/dist/state/types.d.ts +388 -0
- package/dist/state/types.d.ts.map +1 -0
- package/dist/state/types.js +0 -0
- package/dist/utils/bracketedPaste.cjs +37 -0
- package/dist/utils/bracketedPaste.d.ts +22 -0
- package/dist/utils/bracketedPaste.d.ts.map +1 -0
- package/dist/utils/bracketedPaste.js +12 -0
- package/dist/utils/clipboardUtils.cjs +297 -0
- package/dist/utils/clipboardUtils.d.ts +49 -0
- package/dist/utils/clipboardUtils.d.ts.map +1 -0
- package/dist/utils/clipboardUtils.js +261 -0
- package/dist/utils/commandOverlays.cjs +69 -0
- package/dist/utils/commandOverlays.d.ts +22 -0
- package/dist/utils/commandOverlays.d.ts.map +1 -0
- package/dist/utils/commandOverlays.js +44 -0
- package/dist/utils/debugLog.cjs +63 -0
- package/dist/utils/debugLog.d.ts +38 -0
- package/dist/utils/debugLog.d.ts.map +1 -0
- package/dist/utils/debugLog.js +39 -0
- package/dist/utils/elicitationSchema.cjs +85 -0
- package/dist/utils/elicitationSchema.d.ts +11 -0
- package/dist/utils/elicitationSchema.d.ts.map +1 -0
- package/dist/utils/elicitationSchema.js +61 -0
- package/dist/utils/elicitationSchema.test.cjs +78 -0
- package/dist/utils/elicitationSchema.test.d.ts +2 -0
- package/dist/utils/elicitationSchema.test.d.ts.map +1 -0
- package/dist/utils/elicitationSchema.test.js +77 -0
- package/dist/utils/idGenerator.cjs +31 -0
- package/dist/utils/idGenerator.d.ts +10 -0
- package/dist/utils/idGenerator.d.ts.map +1 -0
- package/dist/utils/idGenerator.js +7 -0
- package/dist/utils/index.cjs +62 -0
- package/dist/utils/index.d.ts +9 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +39 -0
- package/dist/utils/input.cjs +72 -0
- package/dist/utils/input.d.ts +25 -0
- package/dist/utils/input.d.ts.map +1 -0
- package/dist/utils/input.js +39 -0
- package/dist/utils/inputParsing.cjs +76 -0
- package/dist/utils/inputParsing.d.ts +31 -0
- package/dist/utils/inputParsing.d.ts.map +1 -0
- package/dist/utils/inputParsing.js +48 -0
- package/dist/utils/llm-provider-display.cjs +49 -0
- package/dist/utils/llm-provider-display.d.ts +3 -0
- package/dist/utils/llm-provider-display.d.ts.map +1 -0
- package/dist/utils/llm-provider-display.js +25 -0
- package/dist/utils/messageFormatting.cjs +447 -0
- package/dist/utils/messageFormatting.d.ts +131 -0
- package/dist/utils/messageFormatting.d.ts.map +1 -0
- package/dist/utils/messageFormatting.js +393 -0
- package/dist/utils/messageFormatting.test.cjs +16 -0
- package/dist/utils/messageFormatting.test.d.ts +2 -0
- package/dist/utils/messageFormatting.test.d.ts.map +1 -0
- package/dist/utils/messageFormatting.test.js +15 -0
- package/dist/utils/mouse.cjs +196 -0
- package/dist/utils/mouse.d.ts +61 -0
- package/dist/utils/mouse.d.ts.map +1 -0
- package/dist/utils/mouse.js +172 -0
- package/dist/utils/overlayPresentation.cjs +48 -0
- package/dist/utils/overlayPresentation.d.ts +19 -0
- package/dist/utils/overlayPresentation.d.ts.map +1 -0
- package/dist/utils/overlayPresentation.js +22 -0
- package/dist/utils/overlaySizing.cjs +39 -0
- package/dist/utils/overlaySizing.d.ts +19 -0
- package/dist/utils/overlaySizing.d.ts.map +1 -0
- package/dist/utils/overlaySizing.js +15 -0
- package/dist/utils/soundNotification.cjs +217 -0
- package/dist/utils/soundNotification.d.ts +77 -0
- package/dist/utils/soundNotification.d.ts.map +1 -0
- package/dist/utils/soundNotification.js +188 -0
- package/dist/utils/soundNotification.test.cjs +126 -0
- package/dist/utils/soundNotification.test.d.ts +2 -0
- package/dist/utils/soundNotification.test.d.ts.map +1 -0
- package/dist/utils/soundNotification.test.js +125 -0
- package/dist/utils/streamSplitter.cjs +126 -0
- package/dist/utils/streamSplitter.d.ts +44 -0
- package/dist/utils/streamSplitter.d.ts.map +1 -0
- package/dist/utils/streamSplitter.js +100 -0
- package/dist/utils/textUtils.cjs +223 -0
- package/dist/utils/textUtils.d.ts +63 -0
- package/dist/utils/textUtils.d.ts.map +1 -0
- package/dist/utils/textUtils.js +174 -0
- package/dist/utils/toolUtils.cjs +40 -0
- package/dist/utils/toolUtils.d.ts +20 -0
- package/dist/utils/toolUtils.d.ts.map +1 -0
- package/dist/utils/toolUtils.js +14 -0
- package/package.json +51 -0
|
@@ -0,0 +1,336 @@
|
|
|
1
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import {
|
|
3
|
+
forwardRef,
|
|
4
|
+
useState,
|
|
5
|
+
useImperativeHandle,
|
|
6
|
+
useRef,
|
|
7
|
+
useEffect,
|
|
8
|
+
useMemo
|
|
9
|
+
} from "react";
|
|
10
|
+
import { Box, Text } from "ink";
|
|
11
|
+
import { ElicitationForm } from "./ElicitationForm.js";
|
|
12
|
+
import { DiffPreview, CreateFilePreview } from "./renderers/index.js";
|
|
13
|
+
import { isEditWriteTool } from "../utils/toolUtils.js";
|
|
14
|
+
import { formatPathForDisplay, formatToolHeader } from "../utils/messageFormatting.js";
|
|
15
|
+
const ApprovalPrompt = forwardRef(
|
|
16
|
+
({ approval, onApprove, onDeny, onCancel }, ref) => {
|
|
17
|
+
const isCommandConfirmation = approval.type === "command_confirmation";
|
|
18
|
+
const isElicitation = approval.type === "elicitation";
|
|
19
|
+
const isDirectoryAccess = approval.type === "directory_access";
|
|
20
|
+
const directoryAccess = approval.metadata.directoryAccess;
|
|
21
|
+
const hasToolDirectoryAccess = approval.type === "tool_confirmation" && directoryAccess !== void 0 && typeof directoryAccess === "object" && directoryAccess !== null;
|
|
22
|
+
const directoryAccessParentDir = hasToolDirectoryAccess && typeof directoryAccess.parentDir === "string" ? directoryAccess.parentDir : null;
|
|
23
|
+
const toolName = approval.metadata.toolName;
|
|
24
|
+
const toolArgs = approval.metadata.args || {};
|
|
25
|
+
const callDescriptionRaw = typeof approval.metadata.description === "string" ? approval.metadata.description : void 0;
|
|
26
|
+
const callDescription = useMemo(() => {
|
|
27
|
+
if (!callDescriptionRaw) return null;
|
|
28
|
+
const singleLine = callDescriptionRaw.replace(/\s+/g, " ").trim();
|
|
29
|
+
if (!singleLine) return null;
|
|
30
|
+
const maxLength = 120;
|
|
31
|
+
if (singleLine.length <= maxLength) return singleLine;
|
|
32
|
+
return `${singleLine.slice(0, Math.max(0, maxLength - 1))}\u2026`;
|
|
33
|
+
}, [callDescriptionRaw]);
|
|
34
|
+
const isPlanReview = toolName === "plan_review";
|
|
35
|
+
const suggestedPatterns = approval.metadata.suggestedPatterns ?? [];
|
|
36
|
+
const hasSuggestedPatterns = suggestedPatterns.length > 0;
|
|
37
|
+
const isEditOrWriteTool = isEditWriteTool(toolName);
|
|
38
|
+
const presentationSnapshot = useMemo(() => {
|
|
39
|
+
const raw = approval.metadata.presentationSnapshot;
|
|
40
|
+
if (typeof raw !== "object" || raw === null) {
|
|
41
|
+
return void 0;
|
|
42
|
+
}
|
|
43
|
+
if (raw.version !== 1) {
|
|
44
|
+
return void 0;
|
|
45
|
+
}
|
|
46
|
+
return raw;
|
|
47
|
+
}, [approval.metadata]);
|
|
48
|
+
const formattedTool = useMemo(() => {
|
|
49
|
+
if (!toolName) return null;
|
|
50
|
+
return formatToolHeader({
|
|
51
|
+
toolName,
|
|
52
|
+
args: toolArgs,
|
|
53
|
+
...presentationSnapshot !== void 0 && { presentationSnapshot }
|
|
54
|
+
});
|
|
55
|
+
}, [toolName, toolArgs, presentationSnapshot]);
|
|
56
|
+
const [selectedIndex, setSelectedIndex] = useState(0);
|
|
57
|
+
const [showFeedbackInput, setShowFeedbackInput] = useState(false);
|
|
58
|
+
const [feedbackText, setFeedbackText] = useState("");
|
|
59
|
+
const elicitationFormRef = useRef(null);
|
|
60
|
+
const selectedIndexRef = useRef(0);
|
|
61
|
+
const options = [];
|
|
62
|
+
if (isPlanReview) {
|
|
63
|
+
options.push({ id: "plan-approve", label: "Approve" });
|
|
64
|
+
options.push({ id: "plan-approve-accept-edits", label: "Approve + Accept All Edits" });
|
|
65
|
+
} else if (hasToolDirectoryAccess) {
|
|
66
|
+
const dirLabel = directoryAccessParentDir ? ` ${formatPathForDisplay(directoryAccessParentDir)}` : "";
|
|
67
|
+
options.push({ id: "yes", label: "Yes (once)" });
|
|
68
|
+
options.push({ id: "yes-directory-session", label: `Yes, allow${dirLabel} (session)` });
|
|
69
|
+
options.push({ id: "no", label: "No" });
|
|
70
|
+
} else if (hasSuggestedPatterns) {
|
|
71
|
+
options.push({ id: "yes", label: "Yes (once)" });
|
|
72
|
+
suggestedPatterns.forEach((pattern, i) => {
|
|
73
|
+
options.push({
|
|
74
|
+
id: `pattern-${i}`,
|
|
75
|
+
label: `Yes, allow "${pattern}"`
|
|
76
|
+
});
|
|
77
|
+
});
|
|
78
|
+
options.push({ id: "yes-session", label: "Yes, allow this tool (session)" });
|
|
79
|
+
options.push({ id: "no", label: "No" });
|
|
80
|
+
} else if (isCommandConfirmation) {
|
|
81
|
+
options.push({ id: "yes", label: "Yes" });
|
|
82
|
+
options.push({ id: "no", label: "No" });
|
|
83
|
+
} else if (isDirectoryAccess) {
|
|
84
|
+
const parentDir2 = approval.metadata.parentDir;
|
|
85
|
+
const dirLabel = parentDir2 ? ` ${formatPathForDisplay(parentDir2)}` : "";
|
|
86
|
+
options.push({ id: "yes", label: "Yes (once)" });
|
|
87
|
+
options.push({ id: "yes-session", label: `Yes, allow${dirLabel} (session)` });
|
|
88
|
+
options.push({ id: "no", label: "No" });
|
|
89
|
+
} else if (isEditOrWriteTool) {
|
|
90
|
+
options.push({ id: "yes", label: "Yes" });
|
|
91
|
+
options.push({ id: "yes-accept-edits", label: "Yes, and accept all edits" });
|
|
92
|
+
options.push({ id: "no", label: "No" });
|
|
93
|
+
} else {
|
|
94
|
+
options.push({ id: "yes", label: "Yes" });
|
|
95
|
+
options.push({ id: "yes-session", label: "Yes (Session)" });
|
|
96
|
+
options.push({ id: "no", label: "No" });
|
|
97
|
+
}
|
|
98
|
+
useEffect(() => {
|
|
99
|
+
selectedIndexRef.current = selectedIndex;
|
|
100
|
+
}, [selectedIndex]);
|
|
101
|
+
const getCurrentOption = () => options[selectedIndexRef.current];
|
|
102
|
+
useImperativeHandle(
|
|
103
|
+
ref,
|
|
104
|
+
() => ({
|
|
105
|
+
handleInput: (input, key) => {
|
|
106
|
+
if (isElicitation && elicitationFormRef.current) {
|
|
107
|
+
return elicitationFormRef.current.handleInput(input, key);
|
|
108
|
+
}
|
|
109
|
+
const totalOptions = isPlanReview ? options.length + 1 : options.length;
|
|
110
|
+
const isFeedbackSelected = isPlanReview && selectedIndexRef.current === options.length;
|
|
111
|
+
if (isFeedbackSelected) {
|
|
112
|
+
if (key.return) {
|
|
113
|
+
onDeny(feedbackText || void 0);
|
|
114
|
+
return true;
|
|
115
|
+
} else if (key.backspace || key.delete) {
|
|
116
|
+
setFeedbackText((prev) => prev.slice(0, -1));
|
|
117
|
+
return true;
|
|
118
|
+
} else if (key.upArrow) {
|
|
119
|
+
setSelectedIndex(options.length - 1);
|
|
120
|
+
return true;
|
|
121
|
+
} else if (key.downArrow) {
|
|
122
|
+
setSelectedIndex(0);
|
|
123
|
+
return true;
|
|
124
|
+
} else if (key.escape) {
|
|
125
|
+
onCancel();
|
|
126
|
+
return true;
|
|
127
|
+
} else if (input && !key.ctrl && !key.meta) {
|
|
128
|
+
setFeedbackText((prev) => prev + input);
|
|
129
|
+
return true;
|
|
130
|
+
}
|
|
131
|
+
return true;
|
|
132
|
+
}
|
|
133
|
+
if (key.upArrow) {
|
|
134
|
+
setSelectedIndex(
|
|
135
|
+
(current) => current === 0 ? totalOptions - 1 : current - 1
|
|
136
|
+
);
|
|
137
|
+
return true;
|
|
138
|
+
} else if (key.downArrow) {
|
|
139
|
+
setSelectedIndex(
|
|
140
|
+
(current) => current === totalOptions - 1 ? 0 : current + 1
|
|
141
|
+
);
|
|
142
|
+
return true;
|
|
143
|
+
} else if (key.return) {
|
|
144
|
+
const option = getCurrentOption();
|
|
145
|
+
if (!option) return false;
|
|
146
|
+
if (option.id === "plan-approve") {
|
|
147
|
+
onApprove({});
|
|
148
|
+
} else if (option.id === "plan-approve-accept-edits") {
|
|
149
|
+
onApprove({ enableAcceptEditsMode: true });
|
|
150
|
+
} else if (option.id === "yes") {
|
|
151
|
+
onApprove({});
|
|
152
|
+
} else if (option.id === "yes-session") {
|
|
153
|
+
if (isDirectoryAccess) {
|
|
154
|
+
onApprove({ rememberDirectory: true });
|
|
155
|
+
} else {
|
|
156
|
+
onApprove({ rememberChoice: true });
|
|
157
|
+
}
|
|
158
|
+
} else if (option.id === "yes-directory-session") {
|
|
159
|
+
onApprove({ rememberDirectory: true });
|
|
160
|
+
} else if (option.id === "yes-accept-edits") {
|
|
161
|
+
onApprove({ enableAcceptEditsMode: true });
|
|
162
|
+
} else if (option.id === "no") {
|
|
163
|
+
onDeny();
|
|
164
|
+
} else if (option.id.startsWith("pattern-")) {
|
|
165
|
+
const patternIndex = parseInt(option.id.replace("pattern-", ""), 10);
|
|
166
|
+
const pattern = suggestedPatterns[patternIndex];
|
|
167
|
+
if (pattern) {
|
|
168
|
+
onApprove({ rememberPattern: pattern });
|
|
169
|
+
} else {
|
|
170
|
+
onApprove({});
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
return true;
|
|
174
|
+
} else if (key.shift && key.tab && isEditOrWriteTool) {
|
|
175
|
+
onApprove({ enableAcceptEditsMode: true });
|
|
176
|
+
return true;
|
|
177
|
+
} else if (key.escape) {
|
|
178
|
+
onCancel();
|
|
179
|
+
return true;
|
|
180
|
+
}
|
|
181
|
+
return false;
|
|
182
|
+
}
|
|
183
|
+
}),
|
|
184
|
+
[
|
|
185
|
+
isElicitation,
|
|
186
|
+
isEditOrWriteTool,
|
|
187
|
+
isDirectoryAccess,
|
|
188
|
+
hasToolDirectoryAccess,
|
|
189
|
+
isPlanReview,
|
|
190
|
+
options,
|
|
191
|
+
suggestedPatterns,
|
|
192
|
+
onApprove,
|
|
193
|
+
onDeny,
|
|
194
|
+
onCancel,
|
|
195
|
+
feedbackText
|
|
196
|
+
]
|
|
197
|
+
);
|
|
198
|
+
if (isElicitation) {
|
|
199
|
+
const metadata = approval.metadata;
|
|
200
|
+
return /* @__PURE__ */ jsx(
|
|
201
|
+
ElicitationForm,
|
|
202
|
+
{
|
|
203
|
+
ref: elicitationFormRef,
|
|
204
|
+
metadata,
|
|
205
|
+
onSubmit: (formData) => onApprove({ formData }),
|
|
206
|
+
onCancel
|
|
207
|
+
}
|
|
208
|
+
);
|
|
209
|
+
}
|
|
210
|
+
const command = approval.metadata.command;
|
|
211
|
+
const displayPreview = approval.metadata.displayPreview;
|
|
212
|
+
const renderPreview = () => {
|
|
213
|
+
if (!displayPreview) return null;
|
|
214
|
+
switch (displayPreview.type) {
|
|
215
|
+
case "diff":
|
|
216
|
+
return /* @__PURE__ */ jsx(DiffPreview, { data: displayPreview });
|
|
217
|
+
case "shell":
|
|
218
|
+
return /* @__PURE__ */ jsxs(Box, { flexDirection: "column", marginBottom: 1, children: [
|
|
219
|
+
/* @__PURE__ */ jsx(Box, { marginBottom: 0, children: /* @__PURE__ */ jsx(Text, { color: "cyan", bold: true, children: displayPreview.title ?? "Bash" }) }),
|
|
220
|
+
/* @__PURE__ */ jsxs(
|
|
221
|
+
Box,
|
|
222
|
+
{
|
|
223
|
+
flexDirection: "column",
|
|
224
|
+
borderStyle: "round",
|
|
225
|
+
borderColor: "gray",
|
|
226
|
+
paddingX: 1,
|
|
227
|
+
children: [
|
|
228
|
+
displayPreview.command.split("\n").map((line, i) => /* @__PURE__ */ jsxs(Text, { color: "yellowBright", wrap: "wrap", children: [
|
|
229
|
+
i === 0 ? "$ " : " ",
|
|
230
|
+
line
|
|
231
|
+
] }, i)),
|
|
232
|
+
displayPreview.isBackground && /* @__PURE__ */ jsx(Text, { color: "gray", children: "(background)" })
|
|
233
|
+
]
|
|
234
|
+
}
|
|
235
|
+
),
|
|
236
|
+
callDescription && /* @__PURE__ */ jsx(Box, { marginTop: 0, children: /* @__PURE__ */ jsx(Text, { color: "gray", children: callDescription }) })
|
|
237
|
+
] });
|
|
238
|
+
case "file":
|
|
239
|
+
if (displayPreview.content) {
|
|
240
|
+
return /* @__PURE__ */ jsx(CreateFilePreview, { data: displayPreview });
|
|
241
|
+
}
|
|
242
|
+
return /* @__PURE__ */ jsx(Box, { marginBottom: 1, children: /* @__PURE__ */ jsxs(Text, { color: "gray", children: [
|
|
243
|
+
displayPreview.operation === "read" && `Read ${displayPreview.lineCount ?? "file"} lines`,
|
|
244
|
+
displayPreview.operation === "write" && `Write to ${displayPreview.path}`,
|
|
245
|
+
displayPreview.operation === "delete" && `Delete ${displayPreview.path}`
|
|
246
|
+
] }) });
|
|
247
|
+
default:
|
|
248
|
+
return null;
|
|
249
|
+
}
|
|
250
|
+
};
|
|
251
|
+
const directoryPath = approval.metadata.path;
|
|
252
|
+
const parentDir = approval.metadata.parentDir;
|
|
253
|
+
const operation = approval.metadata.operation;
|
|
254
|
+
const directoryAccessTitle = !isDirectoryAccess ? null : operation === "read" ? "Read file" : operation === "write" ? "Write file" : operation === "edit" ? "Edit file" : "Directory access";
|
|
255
|
+
const directoryAccessToolHeader = !isDirectoryAccess || !toolName ? null : formatToolHeader({
|
|
256
|
+
toolName,
|
|
257
|
+
args: directoryPath ?? parentDir ? { path: directoryPath ?? parentDir } : {},
|
|
258
|
+
...presentationSnapshot !== void 0 && { presentationSnapshot }
|
|
259
|
+
}).header;
|
|
260
|
+
const showHeaderBlock = isDirectoryAccess || isCommandConfirmation || !displayPreview;
|
|
261
|
+
return /* @__PURE__ */ jsxs(Box, { paddingX: 0, paddingY: 0, flexDirection: "column", children: [
|
|
262
|
+
showHeaderBlock && /* @__PURE__ */ jsx(Box, { flexDirection: "column", marginBottom: 0, children: isDirectoryAccess ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
263
|
+
/* @__PURE__ */ jsx(Box, { marginBottom: 0, children: /* @__PURE__ */ jsx(Text, { color: "cyan", bold: true, children: directoryAccessTitle ?? "Directory access" }) }),
|
|
264
|
+
directoryAccessToolHeader && /* @__PURE__ */ jsx(Box, { marginBottom: 0, children: /* @__PURE__ */ jsx(Text, { wrap: "wrap", children: directoryAccessToolHeader }) })
|
|
265
|
+
] }) : isCommandConfirmation ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
266
|
+
/* @__PURE__ */ jsx(Box, { flexDirection: "row", children: /* @__PURE__ */ jsxs(Text, { color: "yellowBright", bold: true, children: [
|
|
267
|
+
"Confirm command:",
|
|
268
|
+
" "
|
|
269
|
+
] }) }),
|
|
270
|
+
command && /* @__PURE__ */ jsx(Box, { flexDirection: "column", marginTop: 0, children: /* @__PURE__ */ jsx(
|
|
271
|
+
Box,
|
|
272
|
+
{
|
|
273
|
+
flexDirection: "column",
|
|
274
|
+
borderStyle: "round",
|
|
275
|
+
borderColor: "gray",
|
|
276
|
+
paddingX: 1,
|
|
277
|
+
children: command.split("\n").map((line, i) => /* @__PURE__ */ jsx(Text, { color: "red", wrap: "wrap", children: line }, i))
|
|
278
|
+
}
|
|
279
|
+
) })
|
|
280
|
+
] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
281
|
+
/* @__PURE__ */ jsxs(Box, { flexDirection: "row", children: [
|
|
282
|
+
/* @__PURE__ */ jsxs(Text, { color: "yellowBright", bold: true, children: [
|
|
283
|
+
"Confirm:",
|
|
284
|
+
" "
|
|
285
|
+
] }),
|
|
286
|
+
formattedTool && /* @__PURE__ */ jsx(Text, { color: "cyan", children: formattedTool.header })
|
|
287
|
+
] }),
|
|
288
|
+
callDescription && /* @__PURE__ */ jsxs(Box, { flexDirection: "row", marginTop: 0, children: [
|
|
289
|
+
/* @__PURE__ */ jsx(Text, { color: "gray", children: " " }),
|
|
290
|
+
/* @__PURE__ */ jsx(Text, { color: "gray", children: callDescription })
|
|
291
|
+
] })
|
|
292
|
+
] }) }),
|
|
293
|
+
renderPreview(),
|
|
294
|
+
/* @__PURE__ */ jsxs(Box, { flexDirection: "column", marginTop: 0, children: [
|
|
295
|
+
options.map((option, index) => {
|
|
296
|
+
const isSelected = index === selectedIndex;
|
|
297
|
+
const isNo = option.id === "no";
|
|
298
|
+
return /* @__PURE__ */ jsx(Box, { children: isSelected ? /* @__PURE__ */ jsxs(Text, { color: isNo ? "red" : "green", bold: true, children: [
|
|
299
|
+
" \u25B6 ",
|
|
300
|
+
option.label
|
|
301
|
+
] }) : /* @__PURE__ */ jsxs(Text, { color: "gray", children: [
|
|
302
|
+
" ",
|
|
303
|
+
option.label
|
|
304
|
+
] }) }, option.id);
|
|
305
|
+
}),
|
|
306
|
+
isPlanReview && /* @__PURE__ */ jsx(Box, { children: selectedIndex === options.length ? (
|
|
307
|
+
// Selected - show editable input
|
|
308
|
+
/* @__PURE__ */ jsxs(Box, { flexDirection: "row", children: [
|
|
309
|
+
/* @__PURE__ */ jsx(Text, { color: "red", bold: true, children: " \u25B6 " }),
|
|
310
|
+
feedbackText ? /* @__PURE__ */ jsxs(Text, { color: "white", children: [
|
|
311
|
+
feedbackText,
|
|
312
|
+
/* @__PURE__ */ jsx(Text, { color: "cyan", children: "\u258B" })
|
|
313
|
+
] }) : /* @__PURE__ */ jsxs(Text, { color: "gray", children: [
|
|
314
|
+
"What changes would you like?",
|
|
315
|
+
/* @__PURE__ */ jsx(Text, { color: "cyan", children: "\u258B" })
|
|
316
|
+
] })
|
|
317
|
+
] })
|
|
318
|
+
) : (
|
|
319
|
+
// Not selected - show placeholder
|
|
320
|
+
/* @__PURE__ */ jsxs(Text, { color: "gray", children: [
|
|
321
|
+
" ",
|
|
322
|
+
feedbackText || "What changes would you like?"
|
|
323
|
+
] })
|
|
324
|
+
) })
|
|
325
|
+
] }),
|
|
326
|
+
/* @__PURE__ */ jsx(Box, { marginTop: 0, children: /* @__PURE__ */ jsxs(Text, { color: "gray", children: [
|
|
327
|
+
" ",
|
|
328
|
+
"\u2191\u2193 to select \u2022 Enter to confirm \u2022 Esc to cancel"
|
|
329
|
+
] }) })
|
|
330
|
+
] });
|
|
331
|
+
}
|
|
332
|
+
);
|
|
333
|
+
ApprovalPrompt.displayName = "ApprovalPrompt";
|
|
334
|
+
export {
|
|
335
|
+
ApprovalPrompt
|
|
336
|
+
};
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var BackgroundTasksPanel_exports = {};
|
|
20
|
+
__export(BackgroundTasksPanel_exports, {
|
|
21
|
+
BackgroundTasksPanel: () => BackgroundTasksPanel
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(BackgroundTasksPanel_exports);
|
|
24
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
25
|
+
var import_ink = require("ink");
|
|
26
|
+
function padText(value, width) {
|
|
27
|
+
if (value.length >= width) return value.slice(0, width - 1) + "\u2026";
|
|
28
|
+
return value.padEnd(width, " ");
|
|
29
|
+
}
|
|
30
|
+
function formatStatus(status) {
|
|
31
|
+
switch (status) {
|
|
32
|
+
case "running":
|
|
33
|
+
return "running";
|
|
34
|
+
case "completed":
|
|
35
|
+
return "done";
|
|
36
|
+
case "failed":
|
|
37
|
+
return "failed";
|
|
38
|
+
case "cancelled":
|
|
39
|
+
return "cancelled";
|
|
40
|
+
default:
|
|
41
|
+
return status;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
function BackgroundTasksPanel({
|
|
45
|
+
tasks,
|
|
46
|
+
isExpanded,
|
|
47
|
+
isProcessing = false
|
|
48
|
+
}) {
|
|
49
|
+
if (!isExpanded) return null;
|
|
50
|
+
const sortedTasks = [...tasks].sort((a, b) => {
|
|
51
|
+
if (a.status === b.status) return 0;
|
|
52
|
+
if (a.status === "running") return -1;
|
|
53
|
+
if (b.status === "running") return 1;
|
|
54
|
+
return a.status.localeCompare(b.status);
|
|
55
|
+
});
|
|
56
|
+
const runningCount = tasks.filter((task) => task.status === "running").length;
|
|
57
|
+
const totalCount = tasks.length;
|
|
58
|
+
const headerText = `\u{1F9F5} Background Tasks (${runningCount}/${totalCount} running)`;
|
|
59
|
+
if (totalCount === 0) {
|
|
60
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
61
|
+
import_ink.Box,
|
|
62
|
+
{
|
|
63
|
+
flexDirection: "column",
|
|
64
|
+
borderStyle: isProcessing ? void 0 : "round",
|
|
65
|
+
borderColor: "gray",
|
|
66
|
+
paddingX: 1,
|
|
67
|
+
marginX: 1,
|
|
68
|
+
marginBottom: 1,
|
|
69
|
+
children: [
|
|
70
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Text, { bold: true, color: "cyan", children: headerText }),
|
|
71
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Text, { color: "gray", dimColor: true, children: "No background tasks" })
|
|
72
|
+
]
|
|
73
|
+
}
|
|
74
|
+
);
|
|
75
|
+
}
|
|
76
|
+
const statusWidth = 10;
|
|
77
|
+
const idWidth = 14;
|
|
78
|
+
const descWidth = 48;
|
|
79
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
80
|
+
import_ink.Box,
|
|
81
|
+
{
|
|
82
|
+
flexDirection: "column",
|
|
83
|
+
borderStyle: isProcessing ? void 0 : "round",
|
|
84
|
+
borderColor: "gray",
|
|
85
|
+
paddingX: 1,
|
|
86
|
+
marginX: 1,
|
|
87
|
+
marginBottom: 1,
|
|
88
|
+
children: [
|
|
89
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ink.Box, { children: [
|
|
90
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Text, { bold: true, color: "cyan", children: headerText }),
|
|
91
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ink.Text, { color: "gray", dimColor: true, children: [
|
|
92
|
+
" ",
|
|
93
|
+
"\xB7 ctrl+b to hide bg tasks"
|
|
94
|
+
] })
|
|
95
|
+
] }),
|
|
96
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Box, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ink.Text, { color: "gray", children: [
|
|
97
|
+
padText("status", statusWidth),
|
|
98
|
+
padText("task id", idWidth),
|
|
99
|
+
padText("description", descWidth)
|
|
100
|
+
] }) }),
|
|
101
|
+
sortedTasks.map((task) => {
|
|
102
|
+
const status = formatStatus(task.status);
|
|
103
|
+
const desc = task.description ?? "";
|
|
104
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Box, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ink.Text, { color: task.status === "running" ? "yellow" : "gray", children: [
|
|
105
|
+
padText(status, statusWidth),
|
|
106
|
+
padText(task.taskId, idWidth),
|
|
107
|
+
padText(desc, descWidth)
|
|
108
|
+
] }) }, task.taskId);
|
|
109
|
+
})
|
|
110
|
+
]
|
|
111
|
+
}
|
|
112
|
+
);
|
|
113
|
+
}
|
|
114
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
115
|
+
0 && (module.exports = {
|
|
116
|
+
BackgroundTasksPanel
|
|
117
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* BackgroundTasksPanel Component
|
|
3
|
+
*
|
|
4
|
+
* Displays background task status in a compact table.
|
|
5
|
+
*/
|
|
6
|
+
interface BackgroundTaskItem {
|
|
7
|
+
taskId: string;
|
|
8
|
+
status: 'running' | 'completed' | 'failed' | 'cancelled';
|
|
9
|
+
description?: string;
|
|
10
|
+
}
|
|
11
|
+
interface BackgroundTasksPanelProps {
|
|
12
|
+
tasks: BackgroundTaskItem[];
|
|
13
|
+
isExpanded: boolean;
|
|
14
|
+
isProcessing?: boolean;
|
|
15
|
+
}
|
|
16
|
+
export declare function BackgroundTasksPanel({ tasks, isExpanded, isProcessing, }: BackgroundTasksPanelProps): import("react/jsx-runtime").JSX.Element | null;
|
|
17
|
+
export {};
|
|
18
|
+
//# sourceMappingURL=BackgroundTasksPanel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BackgroundTasksPanel.d.ts","sourceRoot":"","sources":["../../src/components/BackgroundTasksPanel.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH,UAAU,kBAAkB;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,SAAS,GAAG,WAAW,GAAG,QAAQ,GAAG,WAAW,CAAC;IACzD,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,UAAU,yBAAyB;IAC/B,KAAK,EAAE,kBAAkB,EAAE,CAAC;IAC5B,UAAU,EAAE,OAAO,CAAC;IACpB,YAAY,CAAC,EAAE,OAAO,CAAC;CAC1B;AAsBD,wBAAgB,oBAAoB,CAAC,EACjC,KAAK,EACL,UAAU,EACV,YAAoB,GACvB,EAAE,yBAAyB,kDA+E3B"}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Box, Text } from "ink";
|
|
3
|
+
function padText(value, width) {
|
|
4
|
+
if (value.length >= width) return value.slice(0, width - 1) + "\u2026";
|
|
5
|
+
return value.padEnd(width, " ");
|
|
6
|
+
}
|
|
7
|
+
function formatStatus(status) {
|
|
8
|
+
switch (status) {
|
|
9
|
+
case "running":
|
|
10
|
+
return "running";
|
|
11
|
+
case "completed":
|
|
12
|
+
return "done";
|
|
13
|
+
case "failed":
|
|
14
|
+
return "failed";
|
|
15
|
+
case "cancelled":
|
|
16
|
+
return "cancelled";
|
|
17
|
+
default:
|
|
18
|
+
return status;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
function BackgroundTasksPanel({
|
|
22
|
+
tasks,
|
|
23
|
+
isExpanded,
|
|
24
|
+
isProcessing = false
|
|
25
|
+
}) {
|
|
26
|
+
if (!isExpanded) return null;
|
|
27
|
+
const sortedTasks = [...tasks].sort((a, b) => {
|
|
28
|
+
if (a.status === b.status) return 0;
|
|
29
|
+
if (a.status === "running") return -1;
|
|
30
|
+
if (b.status === "running") return 1;
|
|
31
|
+
return a.status.localeCompare(b.status);
|
|
32
|
+
});
|
|
33
|
+
const runningCount = tasks.filter((task) => task.status === "running").length;
|
|
34
|
+
const totalCount = tasks.length;
|
|
35
|
+
const headerText = `\u{1F9F5} Background Tasks (${runningCount}/${totalCount} running)`;
|
|
36
|
+
if (totalCount === 0) {
|
|
37
|
+
return /* @__PURE__ */ jsxs(
|
|
38
|
+
Box,
|
|
39
|
+
{
|
|
40
|
+
flexDirection: "column",
|
|
41
|
+
borderStyle: isProcessing ? void 0 : "round",
|
|
42
|
+
borderColor: "gray",
|
|
43
|
+
paddingX: 1,
|
|
44
|
+
marginX: 1,
|
|
45
|
+
marginBottom: 1,
|
|
46
|
+
children: [
|
|
47
|
+
/* @__PURE__ */ jsx(Text, { bold: true, color: "cyan", children: headerText }),
|
|
48
|
+
/* @__PURE__ */ jsx(Text, { color: "gray", dimColor: true, children: "No background tasks" })
|
|
49
|
+
]
|
|
50
|
+
}
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
const statusWidth = 10;
|
|
54
|
+
const idWidth = 14;
|
|
55
|
+
const descWidth = 48;
|
|
56
|
+
return /* @__PURE__ */ jsxs(
|
|
57
|
+
Box,
|
|
58
|
+
{
|
|
59
|
+
flexDirection: "column",
|
|
60
|
+
borderStyle: isProcessing ? void 0 : "round",
|
|
61
|
+
borderColor: "gray",
|
|
62
|
+
paddingX: 1,
|
|
63
|
+
marginX: 1,
|
|
64
|
+
marginBottom: 1,
|
|
65
|
+
children: [
|
|
66
|
+
/* @__PURE__ */ jsxs(Box, { children: [
|
|
67
|
+
/* @__PURE__ */ jsx(Text, { bold: true, color: "cyan", children: headerText }),
|
|
68
|
+
/* @__PURE__ */ jsxs(Text, { color: "gray", dimColor: true, children: [
|
|
69
|
+
" ",
|
|
70
|
+
"\xB7 ctrl+b to hide bg tasks"
|
|
71
|
+
] })
|
|
72
|
+
] }),
|
|
73
|
+
/* @__PURE__ */ jsx(Box, { children: /* @__PURE__ */ jsxs(Text, { color: "gray", children: [
|
|
74
|
+
padText("status", statusWidth),
|
|
75
|
+
padText("task id", idWidth),
|
|
76
|
+
padText("description", descWidth)
|
|
77
|
+
] }) }),
|
|
78
|
+
sortedTasks.map((task) => {
|
|
79
|
+
const status = formatStatus(task.status);
|
|
80
|
+
const desc = task.description ?? "";
|
|
81
|
+
return /* @__PURE__ */ jsx(Box, { children: /* @__PURE__ */ jsxs(Text, { color: task.status === "running" ? "yellow" : "gray", children: [
|
|
82
|
+
padText(status, statusWidth),
|
|
83
|
+
padText(task.taskId, idWidth),
|
|
84
|
+
padText(desc, descWidth)
|
|
85
|
+
] }) }, task.taskId);
|
|
86
|
+
})
|
|
87
|
+
]
|
|
88
|
+
}
|
|
89
|
+
);
|
|
90
|
+
}
|
|
91
|
+
export {
|
|
92
|
+
BackgroundTasksPanel
|
|
93
|
+
};
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var CustomInput_exports = {};
|
|
20
|
+
__export(CustomInput_exports, {
|
|
21
|
+
default: () => CustomInput
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(CustomInput_exports);
|
|
24
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
25
|
+
var import_ink = require("ink");
|
|
26
|
+
function CustomInput({
|
|
27
|
+
value,
|
|
28
|
+
onChange,
|
|
29
|
+
onSubmit,
|
|
30
|
+
placeholder,
|
|
31
|
+
isProcessing = false,
|
|
32
|
+
onWordDelete,
|
|
33
|
+
onLineDelete,
|
|
34
|
+
onToggleMultiLine
|
|
35
|
+
}) {
|
|
36
|
+
(0, import_ink.useInput)(
|
|
37
|
+
(inputChar, key) => {
|
|
38
|
+
if (isProcessing) return;
|
|
39
|
+
if (key.return && key.shift) {
|
|
40
|
+
onToggleMultiLine?.();
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
if (key.return) {
|
|
44
|
+
onSubmit(value);
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
if (key.ctrl && inputChar === "u") {
|
|
48
|
+
onLineDelete?.();
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
if (key.ctrl && inputChar === "w") {
|
|
52
|
+
onWordDelete?.();
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
if (key.backspace || key.delete) {
|
|
56
|
+
onChange(value.slice(0, -1));
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
if (inputChar && !key.ctrl && !key.meta) {
|
|
60
|
+
onChange(value + inputChar);
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
{ isActive: true }
|
|
64
|
+
);
|
|
65
|
+
if (!value && placeholder) {
|
|
66
|
+
const firstChar = placeholder[0] || " ";
|
|
67
|
+
const rest = placeholder.slice(1);
|
|
68
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ink.Text, { children: [
|
|
69
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Text, { color: "black", backgroundColor: "green", children: firstChar }),
|
|
70
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Text, { color: "gray", children: rest })
|
|
71
|
+
] });
|
|
72
|
+
}
|
|
73
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ink.Text, { children: [
|
|
74
|
+
value,
|
|
75
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Text, { color: "black", backgroundColor: "green", children: " " })
|
|
76
|
+
] });
|
|
77
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
interface CustomInputProps {
|
|
2
|
+
value: string;
|
|
3
|
+
onChange: (value: string) => void;
|
|
4
|
+
onSubmit: (value: string) => void;
|
|
5
|
+
placeholder?: string;
|
|
6
|
+
isProcessing?: boolean;
|
|
7
|
+
onWordDelete?: () => void;
|
|
8
|
+
onLineDelete?: () => void;
|
|
9
|
+
onToggleMultiLine?: () => void;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Custom input component that handles keyboard shortcuts
|
|
13
|
+
* Fully custom implementation without TextInput to properly handle shortcuts
|
|
14
|
+
*/
|
|
15
|
+
export default function CustomInput({ value, onChange, onSubmit, placeholder, isProcessing, onWordDelete, onLineDelete, onToggleMultiLine, }: CustomInputProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export {};
|
|
17
|
+
//# sourceMappingURL=CustomInput.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CustomInput.d.ts","sourceRoot":"","sources":["../../src/components/CustomInput.tsx"],"names":[],"mappings":"AAEA,UAAU,gBAAgB;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAC;CAClC;AAED;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,EAChC,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,WAAW,EACX,YAAoB,EACpB,YAAY,EACZ,YAAY,EACZ,iBAAiB,GACpB,EAAE,gBAAgB,2CAoElB"}
|