dexto 1.6.1 → 1.6.3
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/dist/analytics/wrapper.js +1 -1
- package/dist/cli/auth/dexto-api-key.d.ts +34 -0
- package/dist/cli/auth/dexto-api-key.d.ts.map +1 -0
- package/dist/cli/auth/dexto-api-key.js +161 -0
- package/dist/cli/auth/index.d.ts +2 -1
- package/dist/cli/auth/index.d.ts.map +1 -1
- package/dist/cli/auth/index.js +2 -1
- package/dist/cli/auth/oauth.d.ts +10 -0
- package/dist/cli/auth/oauth.d.ts.map +1 -1
- package/dist/cli/auth/oauth.js +142 -39
- package/dist/cli/auth/service.d.ts +1 -0
- package/dist/cli/auth/service.d.ts.map +1 -1
- package/dist/cli/auth/service.js +1 -0
- package/dist/cli/commands/auth/login.d.ts.map +1 -1
- package/dist/cli/commands/auth/login.js +40 -105
- package/dist/cli/commands/setup.d.ts.map +1 -1
- package/dist/cli/commands/setup.js +157 -120
- package/dist/cli/utils/config-validation.js +3 -3
- package/dist/cli/utils/options.d.ts.map +1 -1
- package/dist/cli/utils/options.js +6 -0
- package/dist/cli/utils/scaffolding-utils.d.ts.map +1 -1
- package/dist/cli/utils/scaffolding-utils.js +38 -4
- package/dist/index-main.js +78 -11
- package/dist/index.js +12 -0
- package/dist/web.d.ts.map +1 -1
- package/dist/web.js +18 -11
- package/dist/webui/assets/index-d6c-yJNn.js +2059 -0
- package/dist/webui/assets/index-yKdFLN1k.css +1 -0
- package/dist/webui/assets/react-vendor-l0sNRNKZ.js +1 -0
- package/dist/webui/assets/tanstack-BjCuxfF-.js +41 -0
- package/dist/webui/index.html +3 -4
- package/package.json +13 -23
- package/dist/cli/assets/sounds/SOURCES.md +0 -35
- package/dist/cli/assets/sounds/boot.wav +0 -0
- package/dist/cli/assets/sounds/chime.wav +0 -0
- package/dist/cli/assets/sounds/coin.wav +0 -0
- package/dist/cli/assets/sounds/confirm.wav +0 -0
- package/dist/cli/assets/sounds/levelup.wav +0 -0
- package/dist/cli/assets/sounds/ping.wav +0 -0
- package/dist/cli/assets/sounds/powerup.wav +0 -0
- package/dist/cli/assets/sounds/startup.wav +0 -0
- package/dist/cli/assets/sounds/success.wav +0 -0
- package/dist/cli/assets/sounds/treasure.wav +0 -0
- package/dist/cli/assets/sounds/win.wav +0 -0
- package/dist/cli/commands/interactive-commands/auth/index.d.ts +0 -12
- package/dist/cli/commands/interactive-commands/auth/index.d.ts.map +0 -1
- package/dist/cli/commands/interactive-commands/auth/index.js +0 -20
- package/dist/cli/commands/interactive-commands/command-parser.d.ts +0 -56
- package/dist/cli/commands/interactive-commands/command-parser.d.ts.map +0 -1
- package/dist/cli/commands/interactive-commands/command-parser.js +0 -173
- package/dist/cli/commands/interactive-commands/commands.d.ts +0 -52
- package/dist/cli/commands/interactive-commands/commands.d.ts.map +0 -1
- package/dist/cli/commands/interactive-commands/commands.js +0 -142
- package/dist/cli/commands/interactive-commands/documentation-commands.d.ts +0 -15
- package/dist/cli/commands/interactive-commands/documentation-commands.d.ts.map +0 -1
- package/dist/cli/commands/interactive-commands/documentation-commands.js +0 -39
- package/dist/cli/commands/interactive-commands/exit-handler.d.ts +0 -12
- package/dist/cli/commands/interactive-commands/exit-handler.d.ts.map +0 -1
- package/dist/cli/commands/interactive-commands/exit-handler.js +0 -20
- package/dist/cli/commands/interactive-commands/exit-stats.d.ts +0 -24
- package/dist/cli/commands/interactive-commands/exit-stats.d.ts.map +0 -1
- package/dist/cli/commands/interactive-commands/exit-stats.js +0 -17
- package/dist/cli/commands/interactive-commands/export/index.d.ts +0 -13
- package/dist/cli/commands/interactive-commands/export/index.d.ts.map +0 -1
- package/dist/cli/commands/interactive-commands/export/index.js +0 -21
- package/dist/cli/commands/interactive-commands/general-commands.d.ts +0 -22
- package/dist/cli/commands/interactive-commands/general-commands.d.ts.map +0 -1
- package/dist/cli/commands/interactive-commands/general-commands.js +0 -508
- package/dist/cli/commands/interactive-commands/mcp/index.d.ts +0 -13
- package/dist/cli/commands/interactive-commands/mcp/index.d.ts.map +0 -1
- package/dist/cli/commands/interactive-commands/mcp/index.js +0 -18
- package/dist/cli/commands/interactive-commands/model/index.d.ts +0 -13
- package/dist/cli/commands/interactive-commands/model/index.d.ts.map +0 -1
- package/dist/cli/commands/interactive-commands/model/index.js +0 -19
- package/dist/cli/commands/interactive-commands/plugin/index.d.ts +0 -13
- package/dist/cli/commands/interactive-commands/plugin/index.d.ts.map +0 -1
- package/dist/cli/commands/interactive-commands/plugin/index.js +0 -18
- package/dist/cli/commands/interactive-commands/prompt-commands.d.ts +0 -25
- package/dist/cli/commands/interactive-commands/prompt-commands.d.ts.map +0 -1
- package/dist/cli/commands/interactive-commands/prompt-commands.js +0 -284
- package/dist/cli/commands/interactive-commands/session/index.d.ts +0 -16
- package/dist/cli/commands/interactive-commands/session/index.d.ts.map +0 -1
- package/dist/cli/commands/interactive-commands/session/index.js +0 -15
- package/dist/cli/commands/interactive-commands/session/session-commands.d.ts +0 -32
- package/dist/cli/commands/interactive-commands/session/session-commands.d.ts.map +0 -1
- package/dist/cli/commands/interactive-commands/session/session-commands.js +0 -65
- package/dist/cli/commands/interactive-commands/system/index.d.ts +0 -13
- package/dist/cli/commands/interactive-commands/system/index.d.ts.map +0 -1
- package/dist/cli/commands/interactive-commands/system/index.js +0 -12
- package/dist/cli/commands/interactive-commands/system/system-commands.d.ts +0 -6
- package/dist/cli/commands/interactive-commands/system/system-commands.d.ts.map +0 -1
- package/dist/cli/commands/interactive-commands/system/system-commands.js +0 -188
- package/dist/cli/commands/interactive-commands/tool-commands.d.ts +0 -15
- package/dist/cli/commands/interactive-commands/tool-commands.d.ts.map +0 -1
- package/dist/cli/commands/interactive-commands/tool-commands.js +0 -24
- package/dist/cli/commands/interactive-commands/utils/arg-parser.d.ts +0 -57
- package/dist/cli/commands/interactive-commands/utils/arg-parser.d.ts.map +0 -1
- package/dist/cli/commands/interactive-commands/utils/arg-parser.js +0 -81
- package/dist/cli/commands/interactive-commands/utils/command-output.d.ts +0 -40
- package/dist/cli/commands/interactive-commands/utils/command-output.d.ts.map +0 -1
- package/dist/cli/commands/interactive-commands/utils/command-output.js +0 -56
- package/dist/cli/commands/interactive-commands/utils/format-output.d.ts +0 -14
- package/dist/cli/commands/interactive-commands/utils/format-output.d.ts.map +0 -1
- package/dist/cli/commands/interactive-commands/utils/format-output.js +0 -18
- package/dist/cli/ink-cli/InkCLIRefactored.d.ts +0 -52
- package/dist/cli/ink-cli/InkCLIRefactored.d.ts.map +0 -1
- package/dist/cli/ink-cli/InkCLIRefactored.js +0 -231
- package/dist/cli/ink-cli/components/ApprovalPrompt.d.ts +0 -44
- package/dist/cli/ink-cli/components/ApprovalPrompt.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/ApprovalPrompt.js +0 -323
- package/dist/cli/ink-cli/components/BackgroundTasksPanel.d.ts +0 -18
- package/dist/cli/ink-cli/components/BackgroundTasksPanel.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/BackgroundTasksPanel.js +0 -48
- package/dist/cli/ink-cli/components/CustomInput.d.ts +0 -17
- package/dist/cli/ink-cli/components/CustomInput.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/CustomInput.js +0 -51
- package/dist/cli/ink-cli/components/CustomTextInput.d.ts +0 -16
- package/dist/cli/ink-cli/components/CustomTextInput.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/CustomTextInput.js +0 -36
- package/dist/cli/ink-cli/components/EditableMultiLineInput.d.ts +0 -19
- package/dist/cli/ink-cli/components/EditableMultiLineInput.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/EditableMultiLineInput.js +0 -120
- package/dist/cli/ink-cli/components/ElicitationForm.d.ts +0 -24
- package/dist/cli/ink-cli/components/ElicitationForm.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/ElicitationForm.js +0 -592
- package/dist/cli/ink-cli/components/ErrorBoundary.d.ts +0 -20
- package/dist/cli/ink-cli/components/ErrorBoundary.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/ErrorBoundary.js +0 -29
- package/dist/cli/ink-cli/components/Footer.d.ts +0 -22
- package/dist/cli/ink-cli/components/Footer.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/Footer.js +0 -76
- package/dist/cli/ink-cli/components/HistorySearchBar.d.ts +0 -17
- package/dist/cli/ink-cli/components/HistorySearchBar.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/HistorySearchBar.js +0 -8
- package/dist/cli/ink-cli/components/MultiLineInput.d.ts +0 -12
- package/dist/cli/ink-cli/components/MultiLineInput.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/MultiLineInput.js +0 -27
- package/dist/cli/ink-cli/components/ResourceAutocomplete.d.ts +0 -26
- package/dist/cli/ink-cli/components/ResourceAutocomplete.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/ResourceAutocomplete.js +0 -385
- package/dist/cli/ink-cli/components/SlashCommandAutocomplete.d.ts +0 -28
- package/dist/cli/ink-cli/components/SlashCommandAutocomplete.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/SlashCommandAutocomplete.js +0 -412
- package/dist/cli/ink-cli/components/StatusBar.d.ts +0 -41
- package/dist/cli/ink-cli/components/StatusBar.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/StatusBar.js +0 -116
- package/dist/cli/ink-cli/components/TextBufferInput.d.ts +0 -52
- package/dist/cli/ink-cli/components/TextBufferInput.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/TextBufferInput.js +0 -490
- package/dist/cli/ink-cli/components/TodoPanel.d.ts +0 -26
- package/dist/cli/ink-cli/components/TodoPanel.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/TodoPanel.js +0 -62
- package/dist/cli/ink-cli/components/base/BaseAutocomplete.d.ts +0 -29
- package/dist/cli/ink-cli/components/base/BaseAutocomplete.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/base/BaseAutocomplete.js +0 -98
- package/dist/cli/ink-cli/components/base/BaseSelector.d.ts +0 -37
- package/dist/cli/ink-cli/components/base/BaseSelector.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/base/BaseSelector.js +0 -128
- package/dist/cli/ink-cli/components/base/index.d.ts +0 -6
- package/dist/cli/ink-cli/components/base/index.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/base/index.js +0 -5
- package/dist/cli/ink-cli/components/chat/ChatView.d.ts +0 -19
- package/dist/cli/ink-cli/components/chat/ChatView.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/chat/ChatView.js +0 -11
- package/dist/cli/ink-cli/components/chat/Footer.d.ts +0 -9
- package/dist/cli/ink-cli/components/chat/Footer.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/chat/Footer.js +0 -8
- package/dist/cli/ink-cli/components/chat/Header.d.ts +0 -18
- package/dist/cli/ink-cli/components/chat/Header.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/chat/Header.js +0 -16
- package/dist/cli/ink-cli/components/chat/MessageItem.d.ts +0 -21
- package/dist/cli/ink-cli/components/chat/MessageItem.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/chat/MessageItem.js +0 -182
- package/dist/cli/ink-cli/components/chat/MessageList.d.ts +0 -16
- package/dist/cli/ink-cli/components/chat/MessageList.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/chat/MessageList.js +0 -20
- package/dist/cli/ink-cli/components/chat/QueuedMessagesDisplay.d.ts +0 -16
- package/dist/cli/ink-cli/components/chat/QueuedMessagesDisplay.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/chat/QueuedMessagesDisplay.js +0 -27
- package/dist/cli/ink-cli/components/chat/ToolIcon.d.ts +0 -18
- package/dist/cli/ink-cli/components/chat/ToolIcon.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/chat/ToolIcon.js +0 -36
- package/dist/cli/ink-cli/components/chat/index.d.ts +0 -10
- package/dist/cli/ink-cli/components/chat/index.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/chat/index.js +0 -9
- package/dist/cli/ink-cli/components/chat/styled-boxes/ConfigBox.d.ts +0 -10
- package/dist/cli/ink-cli/components/chat/styled-boxes/ConfigBox.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/chat/styled-boxes/ConfigBox.js +0 -6
- package/dist/cli/ink-cli/components/chat/styled-boxes/HelpBox.d.ts +0 -10
- package/dist/cli/ink-cli/components/chat/styled-boxes/HelpBox.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/chat/styled-boxes/HelpBox.js +0 -15
- package/dist/cli/ink-cli/components/chat/styled-boxes/LogConfigBox.d.ts +0 -10
- package/dist/cli/ink-cli/components/chat/styled-boxes/LogConfigBox.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/chat/styled-boxes/LogConfigBox.js +0 -9
- package/dist/cli/ink-cli/components/chat/styled-boxes/SessionHistoryBox.d.ts +0 -10
- package/dist/cli/ink-cli/components/chat/styled-boxes/SessionHistoryBox.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/chat/styled-boxes/SessionHistoryBox.js +0 -37
- package/dist/cli/ink-cli/components/chat/styled-boxes/SessionListBox.d.ts +0 -10
- package/dist/cli/ink-cli/components/chat/styled-boxes/SessionListBox.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/chat/styled-boxes/SessionListBox.js +0 -9
- package/dist/cli/ink-cli/components/chat/styled-boxes/ShortcutsBox.d.ts +0 -10
- package/dist/cli/ink-cli/components/chat/styled-boxes/ShortcutsBox.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/chat/styled-boxes/ShortcutsBox.js +0 -6
- package/dist/cli/ink-cli/components/chat/styled-boxes/StatsBox.d.ts +0 -10
- package/dist/cli/ink-cli/components/chat/styled-boxes/StatsBox.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/chat/styled-boxes/StatsBox.js +0 -29
- package/dist/cli/ink-cli/components/chat/styled-boxes/StyledBox.d.ts +0 -45
- package/dist/cli/ink-cli/components/chat/styled-boxes/StyledBox.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/chat/styled-boxes/StyledBox.js +0 -38
- package/dist/cli/ink-cli/components/chat/styled-boxes/SyspromptBox.d.ts +0 -10
- package/dist/cli/ink-cli/components/chat/styled-boxes/SyspromptBox.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/chat/styled-boxes/SyspromptBox.js +0 -6
- package/dist/cli/ink-cli/components/chat/styled-boxes/index.d.ts +0 -13
- package/dist/cli/ink-cli/components/chat/styled-boxes/index.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/chat/styled-boxes/index.js +0 -12
- package/dist/cli/ink-cli/components/input/InputArea.d.ts +0 -46
- package/dist/cli/ink-cli/components/input/InputArea.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/input/InputArea.js +0 -6
- package/dist/cli/ink-cli/components/input/index.d.ts +0 -5
- package/dist/cli/ink-cli/components/input/index.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/input/index.js +0 -4
- package/dist/cli/ink-cli/components/modes/AlternateBufferCLI.d.ts +0 -27
- package/dist/cli/ink-cli/components/modes/AlternateBufferCLI.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/modes/AlternateBufferCLI.js +0 -182
- package/dist/cli/ink-cli/components/modes/StaticCLI.d.ts +0 -29
- package/dist/cli/ink-cli/components/modes/StaticCLI.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/modes/StaticCLI.js +0 -114
- package/dist/cli/ink-cli/components/modes/index.d.ts +0 -10
- package/dist/cli/ink-cli/components/modes/index.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/modes/index.js +0 -9
- package/dist/cli/ink-cli/components/overlays/ApiKeyInput.d.ts +0 -26
- package/dist/cli/ink-cli/components/overlays/ApiKeyInput.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/overlays/ApiKeyInput.js +0 -92
- package/dist/cli/ink-cli/components/overlays/CommandOutputOverlay.d.ts +0 -13
- package/dist/cli/ink-cli/components/overlays/CommandOutputOverlay.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/overlays/CommandOutputOverlay.js +0 -60
- package/dist/cli/ink-cli/components/overlays/ContextStatsOverlay.d.ts +0 -26
- package/dist/cli/ink-cli/components/overlays/ContextStatsOverlay.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/overlays/ContextStatsOverlay.js +0 -241
- package/dist/cli/ink-cli/components/overlays/CustomModelWizard.d.ts +0 -29
- package/dist/cli/ink-cli/components/overlays/CustomModelWizard.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/overlays/CustomModelWizard.js +0 -301
- package/dist/cli/ink-cli/components/overlays/ExportWizard.d.ts +0 -22
- package/dist/cli/ink-cli/components/overlays/ExportWizard.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/overlays/ExportWizard.js +0 -308
- package/dist/cli/ink-cli/components/overlays/LogLevelSelector.d.ts +0 -23
- package/dist/cli/ink-cli/components/overlays/LogLevelSelector.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/overlays/LogLevelSelector.js +0 -70
- package/dist/cli/ink-cli/components/overlays/MarketplaceAddPrompt.d.ts +0 -20
- package/dist/cli/ink-cli/components/overlays/MarketplaceAddPrompt.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/overlays/MarketplaceAddPrompt.js +0 -81
- package/dist/cli/ink-cli/components/overlays/MarketplaceBrowser.d.ts +0 -31
- package/dist/cli/ink-cli/components/overlays/MarketplaceBrowser.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/overlays/MarketplaceBrowser.js +0 -297
- package/dist/cli/ink-cli/components/overlays/McpAddChoice.d.ts +0 -22
- package/dist/cli/ink-cli/components/overlays/McpAddChoice.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/overlays/McpAddChoice.js +0 -59
- package/dist/cli/ink-cli/components/overlays/McpAddSelector.d.ts +0 -26
- package/dist/cli/ink-cli/components/overlays/McpAddSelector.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/overlays/McpAddSelector.js +0 -73
- package/dist/cli/ink-cli/components/overlays/McpCustomTypeSelector.d.ts +0 -21
- package/dist/cli/ink-cli/components/overlays/McpCustomTypeSelector.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/overlays/McpCustomTypeSelector.js +0 -51
- package/dist/cli/ink-cli/components/overlays/McpCustomWizard.d.ts +0 -29
- package/dist/cli/ink-cli/components/overlays/McpCustomWizard.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/overlays/McpCustomWizard.js +0 -215
- package/dist/cli/ink-cli/components/overlays/McpRemoveSelector.d.ts +0 -22
- package/dist/cli/ink-cli/components/overlays/McpRemoveSelector.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/overlays/McpRemoveSelector.js +0 -80
- package/dist/cli/ink-cli/components/overlays/McpSelector.d.ts +0 -21
- package/dist/cli/ink-cli/components/overlays/McpSelector.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/overlays/McpSelector.js +0 -52
- package/dist/cli/ink-cli/components/overlays/McpServerActions.d.ts +0 -28
- package/dist/cli/ink-cli/components/overlays/McpServerActions.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/overlays/McpServerActions.js +0 -93
- package/dist/cli/ink-cli/components/overlays/McpServerList.d.ts +0 -29
- package/dist/cli/ink-cli/components/overlays/McpServerList.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/overlays/McpServerList.js +0 -116
- package/dist/cli/ink-cli/components/overlays/ModelSelectorRefactored.d.ts +0 -28
- package/dist/cli/ink-cli/components/overlays/ModelSelectorRefactored.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/overlays/ModelSelectorRefactored.js +0 -743
- package/dist/cli/ink-cli/components/overlays/PluginActions.d.ts +0 -27
- package/dist/cli/ink-cli/components/overlays/PluginActions.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/overlays/PluginActions.js +0 -66
- package/dist/cli/ink-cli/components/overlays/PluginList.d.ts +0 -21
- package/dist/cli/ink-cli/components/overlays/PluginList.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/overlays/PluginList.js +0 -70
- package/dist/cli/ink-cli/components/overlays/PluginManager.d.ts +0 -21
- package/dist/cli/ink-cli/components/overlays/PluginManager.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/overlays/PluginManager.js +0 -63
- package/dist/cli/ink-cli/components/overlays/PromptAddChoice.d.ts +0 -22
- package/dist/cli/ink-cli/components/overlays/PromptAddChoice.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/overlays/PromptAddChoice.js +0 -52
- package/dist/cli/ink-cli/components/overlays/PromptAddWizard.d.ts +0 -29
- package/dist/cli/ink-cli/components/overlays/PromptAddWizard.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/overlays/PromptAddWizard.js +0 -166
- package/dist/cli/ink-cli/components/overlays/PromptDeleteSelector.d.ts +0 -27
- package/dist/cli/ink-cli/components/overlays/PromptDeleteSelector.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/overlays/PromptDeleteSelector.js +0 -119
- package/dist/cli/ink-cli/components/overlays/PromptList.d.ts +0 -33
- package/dist/cli/ink-cli/components/overlays/PromptList.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/overlays/PromptList.js +0 -143
- package/dist/cli/ink-cli/components/overlays/SearchOverlay.d.ts +0 -23
- package/dist/cli/ink-cli/components/overlays/SearchOverlay.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/overlays/SearchOverlay.js +0 -189
- package/dist/cli/ink-cli/components/overlays/SessionRenameOverlay.d.ts +0 -21
- package/dist/cli/ink-cli/components/overlays/SessionRenameOverlay.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/overlays/SessionRenameOverlay.js +0 -63
- package/dist/cli/ink-cli/components/overlays/SessionSelectorRefactored.d.ts +0 -26
- package/dist/cli/ink-cli/components/overlays/SessionSelectorRefactored.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/overlays/SessionSelectorRefactored.js +0 -126
- package/dist/cli/ink-cli/components/overlays/SessionSubcommandSelector.d.ts +0 -21
- package/dist/cli/ink-cli/components/overlays/SessionSubcommandSelector.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/overlays/SessionSubcommandSelector.js +0 -42
- package/dist/cli/ink-cli/components/overlays/SoundsSelector.d.ts +0 -21
- package/dist/cli/ink-cli/components/overlays/SoundsSelector.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/overlays/SoundsSelector.js +0 -566
- package/dist/cli/ink-cli/components/overlays/StreamSelector.d.ts +0 -20
- package/dist/cli/ink-cli/components/overlays/StreamSelector.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/overlays/StreamSelector.js +0 -58
- package/dist/cli/ink-cli/components/overlays/ToolBrowser.d.ts +0 -26
- package/dist/cli/ink-cli/components/overlays/ToolBrowser.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/overlays/ToolBrowser.js +0 -697
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/LocalModelWizard.d.ts +0 -25
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/LocalModelWizard.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/LocalModelWizard.js +0 -604
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/index.d.ts +0 -15
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/index.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/index.js +0 -14
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/provider-config.d.ts +0 -42
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/provider-config.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/provider-config.js +0 -547
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/ApiKeyStep.d.ts +0 -25
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/ApiKeyStep.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/ApiKeyStep.js +0 -29
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/ProviderSelector.d.ts +0 -17
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/ProviderSelector.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/ProviderSelector.js +0 -11
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/SetupInfoBanner.d.ts +0 -20
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/SetupInfoBanner.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/SetupInfoBanner.js +0 -10
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/WizardStepInput.d.ts +0 -30
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/WizardStepInput.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/WizardStepInput.js +0 -13
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/index.d.ts +0 -8
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/index.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/index.js +0 -7
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/types.d.ts +0 -85
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/types.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/types.js +0 -38
- package/dist/cli/ink-cli/components/renderers/DiffRenderer.d.ts +0 -21
- package/dist/cli/ink-cli/components/renderers/DiffRenderer.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/renderers/DiffRenderer.js +0 -65
- package/dist/cli/ink-cli/components/renderers/FilePreviewRenderer.d.ts +0 -30
- package/dist/cli/ink-cli/components/renderers/FilePreviewRenderer.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/renderers/FilePreviewRenderer.js +0 -67
- package/dist/cli/ink-cli/components/renderers/FileRenderer.d.ts +0 -21
- package/dist/cli/ink-cli/components/renderers/FileRenderer.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/renderers/FileRenderer.js +0 -37
- package/dist/cli/ink-cli/components/renderers/GenericRenderer.d.ts +0 -21
- package/dist/cli/ink-cli/components/renderers/GenericRenderer.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/renderers/GenericRenderer.js +0 -26
- package/dist/cli/ink-cli/components/renderers/SearchRenderer.d.ts +0 -20
- package/dist/cli/ink-cli/components/renderers/SearchRenderer.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/renderers/SearchRenderer.js +0 -26
- package/dist/cli/ink-cli/components/renderers/ShellRenderer.d.ts +0 -21
- package/dist/cli/ink-cli/components/renderers/ShellRenderer.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/renderers/ShellRenderer.js +0 -15
- package/dist/cli/ink-cli/components/renderers/diff-shared.d.ts +0 -61
- package/dist/cli/ink-cli/components/renderers/diff-shared.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/renderers/diff-shared.js +0 -158
- package/dist/cli/ink-cli/components/renderers/index.d.ts +0 -28
- package/dist/cli/ink-cli/components/renderers/index.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/renderers/index.js +0 -36
- package/dist/cli/ink-cli/components/shared/FocusOverlayFrame.d.ts +0 -7
- package/dist/cli/ink-cli/components/shared/FocusOverlayFrame.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/shared/FocusOverlayFrame.js +0 -8
- package/dist/cli/ink-cli/components/shared/HintBar.d.ts +0 -6
- package/dist/cli/ink-cli/components/shared/HintBar.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/shared/HintBar.js +0 -6
- package/dist/cli/ink-cli/components/shared/MarkdownText.d.ts +0 -38
- package/dist/cli/ink-cli/components/shared/MarkdownText.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/shared/MarkdownText.js +0 -389
- package/dist/cli/ink-cli/components/shared/VirtualizedList.d.ts +0 -44
- package/dist/cli/ink-cli/components/shared/VirtualizedList.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/shared/VirtualizedList.js +0 -300
- package/dist/cli/ink-cli/components/shared/text-buffer.d.ts +0 -185
- package/dist/cli/ink-cli/components/shared/text-buffer.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/shared/text-buffer.js +0 -1338
- package/dist/cli/ink-cli/constants/processingPhrases.d.ts +0 -10
- package/dist/cli/ink-cli/constants/processingPhrases.d.ts.map +0 -1
- package/dist/cli/ink-cli/constants/processingPhrases.js +0 -92
- package/dist/cli/ink-cli/constants/spinnerFrames.d.ts +0 -2
- package/dist/cli/ink-cli/constants/spinnerFrames.d.ts.map +0 -1
- package/dist/cli/ink-cli/constants/spinnerFrames.js +0 -1
- package/dist/cli/ink-cli/constants/tips.d.ts +0 -15
- package/dist/cli/ink-cli/constants/tips.d.ts.map +0 -1
- package/dist/cli/ink-cli/constants/tips.js +0 -58
- package/dist/cli/ink-cli/containers/InputContainer.d.ts +0 -62
- package/dist/cli/ink-cli/containers/InputContainer.d.ts.map +0 -1
- package/dist/cli/ink-cli/containers/InputContainer.js +0 -643
- package/dist/cli/ink-cli/containers/OverlayContainer.d.ts +0 -42
- package/dist/cli/ink-cli/containers/OverlayContainer.d.ts.map +0 -1
- package/dist/cli/ink-cli/containers/OverlayContainer.js +0 -1840
- package/dist/cli/ink-cli/containers/index.d.ts +0 -6
- package/dist/cli/ink-cli/containers/index.d.ts.map +0 -1
- package/dist/cli/ink-cli/containers/index.js +0 -5
- package/dist/cli/ink-cli/contexts/KeypressContext.d.ts +0 -36
- package/dist/cli/ink-cli/contexts/KeypressContext.d.ts.map +0 -1
- package/dist/cli/ink-cli/contexts/KeypressContext.js +0 -461
- package/dist/cli/ink-cli/contexts/MouseContext.d.ts +0 -27
- package/dist/cli/ink-cli/contexts/MouseContext.d.ts.map +0 -1
- package/dist/cli/ink-cli/contexts/MouseContext.js +0 -102
- package/dist/cli/ink-cli/contexts/ScrollProvider.d.ts +0 -33
- package/dist/cli/ink-cli/contexts/ScrollProvider.d.ts.map +0 -1
- package/dist/cli/ink-cli/contexts/ScrollProvider.js +0 -170
- package/dist/cli/ink-cli/contexts/SoundContext.d.ts +0 -23
- package/dist/cli/ink-cli/contexts/SoundContext.d.ts.map +0 -1
- package/dist/cli/ink-cli/contexts/SoundContext.js +0 -22
- package/dist/cli/ink-cli/contexts/index.d.ts +0 -8
- package/dist/cli/ink-cli/contexts/index.d.ts.map +0 -1
- package/dist/cli/ink-cli/contexts/index.js +0 -7
- package/dist/cli/ink-cli/hooks/index.d.ts +0 -12
- package/dist/cli/ink-cli/hooks/index.d.ts.map +0 -1
- package/dist/cli/ink-cli/hooks/index.js +0 -14
- package/dist/cli/ink-cli/hooks/useAgentEvents.d.ts +0 -49
- package/dist/cli/ink-cli/hooks/useAgentEvents.d.ts.map +0 -1
- package/dist/cli/ink-cli/hooks/useAgentEvents.js +0 -369
- package/dist/cli/ink-cli/hooks/useAnimationTick.d.ts +0 -11
- package/dist/cli/ink-cli/hooks/useAnimationTick.d.ts.map +0 -1
- package/dist/cli/ink-cli/hooks/useAnimationTick.js +0 -54
- package/dist/cli/ink-cli/hooks/useBatchedScroll.d.ts +0 -14
- package/dist/cli/ink-cli/hooks/useBatchedScroll.d.ts.map +0 -1
- package/dist/cli/ink-cli/hooks/useBatchedScroll.js +0 -25
- package/dist/cli/ink-cli/hooks/useCLIState.d.ts +0 -52
- package/dist/cli/ink-cli/hooks/useCLIState.d.ts.map +0 -1
- package/dist/cli/ink-cli/hooks/useCLIState.js +0 -224
- package/dist/cli/ink-cli/hooks/useElapsedTime.d.ts +0 -24
- package/dist/cli/ink-cli/hooks/useElapsedTime.d.ts.map +0 -1
- package/dist/cli/ink-cli/hooks/useElapsedTime.js +0 -69
- package/dist/cli/ink-cli/hooks/useGitBranch.d.ts +0 -13
- package/dist/cli/ink-cli/hooks/useGitBranch.d.ts.map +0 -1
- package/dist/cli/ink-cli/hooks/useGitBranch.js +0 -35
- package/dist/cli/ink-cli/hooks/useHistorySearch.d.ts +0 -61
- package/dist/cli/ink-cli/hooks/useHistorySearch.d.ts.map +0 -1
- package/dist/cli/ink-cli/hooks/useHistorySearch.js +0 -210
- package/dist/cli/ink-cli/hooks/useInputHistory.d.ts +0 -18
- package/dist/cli/ink-cli/hooks/useInputHistory.d.ts.map +0 -1
- package/dist/cli/ink-cli/hooks/useInputHistory.js +0 -26
- package/dist/cli/ink-cli/hooks/useInputOrchestrator.d.ts +0 -136
- package/dist/cli/ink-cli/hooks/useInputOrchestrator.d.ts.map +0 -1
- package/dist/cli/ink-cli/hooks/useInputOrchestrator.js +0 -715
- package/dist/cli/ink-cli/hooks/useKeyboardShortcuts.d.ts +0 -21
- package/dist/cli/ink-cli/hooks/useKeyboardShortcuts.d.ts.map +0 -1
- package/dist/cli/ink-cli/hooks/useKeyboardShortcuts.js +0 -80
- package/dist/cli/ink-cli/hooks/useKeypress.d.ts +0 -18
- package/dist/cli/ink-cli/hooks/useKeypress.d.ts.map +0 -1
- package/dist/cli/ink-cli/hooks/useKeypress.js +0 -26
- package/dist/cli/ink-cli/hooks/usePhraseCycler.d.ts +0 -30
- package/dist/cli/ink-cli/hooks/usePhraseCycler.d.ts.map +0 -1
- package/dist/cli/ink-cli/hooks/usePhraseCycler.js +0 -68
- package/dist/cli/ink-cli/hooks/useStreaming.d.ts +0 -19
- package/dist/cli/ink-cli/hooks/useStreaming.d.ts.map +0 -1
- package/dist/cli/ink-cli/hooks/useStreaming.js +0 -26
- package/dist/cli/ink-cli/hooks/useTerminalSize.d.ts +0 -14
- package/dist/cli/ink-cli/hooks/useTerminalSize.d.ts.map +0 -1
- package/dist/cli/ink-cli/hooks/useTerminalSize.js +0 -31
- package/dist/cli/ink-cli/hooks/useTokenCounter.d.ts +0 -46
- package/dist/cli/ink-cli/hooks/useTokenCounter.d.ts.map +0 -1
- package/dist/cli/ink-cli/hooks/useTokenCounter.js +0 -122
- package/dist/cli/ink-cli/services/CommandService.d.ts +0 -58
- package/dist/cli/ink-cli/services/CommandService.d.ts.map +0 -1
- package/dist/cli/ink-cli/services/CommandService.js +0 -64
- package/dist/cli/ink-cli/services/InputService.d.ts +0 -40
- package/dist/cli/ink-cli/services/InputService.d.ts.map +0 -1
- package/dist/cli/ink-cli/services/InputService.js +0 -87
- package/dist/cli/ink-cli/services/MessageService.d.ts +0 -35
- package/dist/cli/ink-cli/services/MessageService.d.ts.map +0 -1
- package/dist/cli/ink-cli/services/MessageService.js +0 -49
- package/dist/cli/ink-cli/services/index.d.ts +0 -8
- package/dist/cli/ink-cli/services/index.d.ts.map +0 -1
- package/dist/cli/ink-cli/services/index.js +0 -7
- package/dist/cli/ink-cli/services/processStream.d.ts +0 -75
- package/dist/cli/ink-cli/services/processStream.d.ts.map +0 -1
- package/dist/cli/ink-cli/services/processStream.js +0 -951
- package/dist/cli/ink-cli/state/actions.d.ts +0 -124
- package/dist/cli/ink-cli/state/actions.d.ts.map +0 -1
- package/dist/cli/ink-cli/state/actions.js +0 -8
- package/dist/cli/ink-cli/state/index.d.ts +0 -10
- package/dist/cli/ink-cli/state/index.d.ts.map +0 -1
- package/dist/cli/ink-cli/state/index.js +0 -8
- package/dist/cli/ink-cli/state/initialState.d.ts +0 -12
- package/dist/cli/ink-cli/state/initialState.d.ts.map +0 -1
- package/dist/cli/ink-cli/state/initialState.js +0 -58
- package/dist/cli/ink-cli/state/reducer.d.ts +0 -15
- package/dist/cli/ink-cli/state/reducer.d.ts.map +0 -1
- package/dist/cli/ink-cli/state/reducer.js +0 -341
- package/dist/cli/ink-cli/state/streaming-state.d.ts +0 -27
- package/dist/cli/ink-cli/state/streaming-state.d.ts.map +0 -1
- package/dist/cli/ink-cli/state/streaming-state.js +0 -39
- package/dist/cli/ink-cli/state/types.d.ts +0 -378
- package/dist/cli/ink-cli/state/types.d.ts.map +0 -1
- package/dist/cli/ink-cli/state/types.js +0 -5
- package/dist/cli/ink-cli/utils/bracketedPaste.d.ts +0 -22
- package/dist/cli/ink-cli/utils/bracketedPaste.d.ts.map +0 -1
- package/dist/cli/ink-cli/utils/bracketedPaste.js +0 -27
- package/dist/cli/ink-cli/utils/clipboardUtils.d.ts +0 -49
- package/dist/cli/ink-cli/utils/clipboardUtils.d.ts.map +0 -1
- package/dist/cli/ink-cli/utils/clipboardUtils.js +0 -356
- package/dist/cli/ink-cli/utils/commandOverlays.d.ts +0 -33
- package/dist/cli/ink-cli/utils/commandOverlays.d.ts.map +0 -1
- package/dist/cli/ink-cli/utils/commandOverlays.js +0 -85
- package/dist/cli/ink-cli/utils/debugLog.d.ts +0 -38
- package/dist/cli/ink-cli/utils/debugLog.d.ts.map +0 -1
- package/dist/cli/ink-cli/utils/debugLog.js +0 -66
- package/dist/cli/ink-cli/utils/elicitationSchema.d.ts +0 -11
- package/dist/cli/ink-cli/utils/elicitationSchema.d.ts.map +0 -1
- package/dist/cli/ink-cli/utils/elicitationSchema.js +0 -80
- package/dist/cli/ink-cli/utils/idGenerator.d.ts +0 -10
- package/dist/cli/ink-cli/utils/idGenerator.d.ts.map +0 -1
- package/dist/cli/ink-cli/utils/idGenerator.js +0 -12
- package/dist/cli/ink-cli/utils/index.d.ts +0 -9
- package/dist/cli/ink-cli/utils/index.d.ts.map +0 -1
- package/dist/cli/ink-cli/utils/index.js +0 -13
- package/dist/cli/ink-cli/utils/input.d.ts +0 -25
- package/dist/cli/ink-cli/utils/input.d.ts.map +0 -1
- package/dist/cli/ink-cli/utils/input.js +0 -56
- package/dist/cli/ink-cli/utils/inputParsing.d.ts +0 -31
- package/dist/cli/ink-cli/utils/inputParsing.d.ts.map +0 -1
- package/dist/cli/ink-cli/utils/inputParsing.js +0 -70
- package/dist/cli/ink-cli/utils/llm-provider-display.d.ts +0 -3
- package/dist/cli/ink-cli/utils/llm-provider-display.d.ts.map +0 -1
- package/dist/cli/ink-cli/utils/llm-provider-display.js +0 -22
- package/dist/cli/ink-cli/utils/messageFormatting.d.ts +0 -125
- package/dist/cli/ink-cli/utils/messageFormatting.d.ts.map +0 -1
- package/dist/cli/ink-cli/utils/messageFormatting.js +0 -485
- package/dist/cli/ink-cli/utils/mouse.d.ts +0 -61
- package/dist/cli/ink-cli/utils/mouse.d.ts.map +0 -1
- package/dist/cli/ink-cli/utils/mouse.js +0 -209
- package/dist/cli/ink-cli/utils/overlayPresentation.d.ts +0 -19
- package/dist/cli/ink-cli/utils/overlayPresentation.d.ts.map +0 -1
- package/dist/cli/ink-cli/utils/overlayPresentation.js +0 -33
- package/dist/cli/ink-cli/utils/overlaySizing.d.ts +0 -19
- package/dist/cli/ink-cli/utils/overlaySizing.d.ts.map +0 -1
- package/dist/cli/ink-cli/utils/overlaySizing.js +0 -11
- package/dist/cli/ink-cli/utils/soundNotification.d.ts +0 -77
- package/dist/cli/ink-cli/utils/soundNotification.d.ts.map +0 -1
- package/dist/cli/ink-cli/utils/soundNotification.js +0 -226
- package/dist/cli/ink-cli/utils/streamSplitter.d.ts +0 -44
- package/dist/cli/ink-cli/utils/streamSplitter.d.ts.map +0 -1
- package/dist/cli/ink-cli/utils/streamSplitter.js +0 -154
- package/dist/cli/ink-cli/utils/textUtils.d.ts +0 -63
- package/dist/cli/ink-cli/utils/textUtils.d.ts.map +0 -1
- package/dist/cli/ink-cli/utils/textUtils.js +0 -248
- package/dist/cli/ink-cli/utils/toolUtils.d.ts +0 -20
- package/dist/cli/ink-cli/utils/toolUtils.d.ts.map +0 -1
- package/dist/cli/ink-cli/utils/toolUtils.js +0 -25
- package/dist/webui/assets/index-C9JXwpvo.css +0 -1
- package/dist/webui/assets/index-CKhumsZA.js +0 -2059
- package/dist/webui/assets/react-vendor-gH-7aFTg.js +0 -17
- package/dist/webui/assets/tanstack-Br79RQ-n.js +0 -25
|
@@ -1,412 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import React, { useState, useEffect, useRef, useMemo, useCallback, forwardRef, useImperativeHandle, } from 'react';
|
|
3
|
-
import { Box, Text } from 'ink';
|
|
4
|
-
import { getAllCommands } from '../../commands/interactive-commands/commands.js';
|
|
5
|
-
import { useTerminalSize } from '../hooks/useTerminalSize.js';
|
|
6
|
-
import { getMaxVisibleItemsForTerminalRows } from '../utils/overlaySizing.js';
|
|
7
|
-
/**
|
|
8
|
-
* Get match score for prompt: 0 = no match, 1 = description/title match, 2 = name includes, 3 = name starts with
|
|
9
|
-
*/
|
|
10
|
-
function getPromptMatchScore(prompt, query) {
|
|
11
|
-
if (!query)
|
|
12
|
-
return 3; // Show all when no query
|
|
13
|
-
const lowerQuery = query.toLowerCase();
|
|
14
|
-
const name = prompt.name.toLowerCase();
|
|
15
|
-
const description = (prompt.description || '').toLowerCase();
|
|
16
|
-
const title = (prompt.title || '').toLowerCase();
|
|
17
|
-
// Highest priority: name starts with query
|
|
18
|
-
if (name.startsWith(lowerQuery)) {
|
|
19
|
-
return 3;
|
|
20
|
-
}
|
|
21
|
-
// Second priority: name includes query
|
|
22
|
-
if (name.includes(lowerQuery)) {
|
|
23
|
-
return 2;
|
|
24
|
-
}
|
|
25
|
-
// Lowest priority: description or title includes query
|
|
26
|
-
if (description.includes(lowerQuery) || title.includes(lowerQuery)) {
|
|
27
|
-
return 1;
|
|
28
|
-
}
|
|
29
|
-
return 0; // No match
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* Check if prompt matches query (for filtering)
|
|
33
|
-
*/
|
|
34
|
-
function matchesPromptQuery(prompt, query) {
|
|
35
|
-
return getPromptMatchScore(prompt, query) > 0;
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* Simple fuzzy match - checks if query matches system command name or description
|
|
39
|
-
* Returns a score: 0 = no match, 1 = description match, 2 = alias match, 3 = name includes, 4 = name starts with
|
|
40
|
-
*/
|
|
41
|
-
function getSystemCommandMatchScore(cmd, query) {
|
|
42
|
-
if (!query)
|
|
43
|
-
return 4; // Show all when no query
|
|
44
|
-
const lowerQuery = query.toLowerCase();
|
|
45
|
-
const name = cmd.name.toLowerCase();
|
|
46
|
-
const description = (cmd.description || '').toLowerCase();
|
|
47
|
-
// Highest priority: name starts with query
|
|
48
|
-
if (name.startsWith(lowerQuery)) {
|
|
49
|
-
return 4;
|
|
50
|
-
}
|
|
51
|
-
// Second priority: name includes query
|
|
52
|
-
if (name.includes(lowerQuery)) {
|
|
53
|
-
return 3;
|
|
54
|
-
}
|
|
55
|
-
// Third priority: aliases match
|
|
56
|
-
if (cmd.aliases) {
|
|
57
|
-
for (const alias of cmd.aliases) {
|
|
58
|
-
const lowerAlias = alias.toLowerCase();
|
|
59
|
-
if (lowerAlias.startsWith(lowerQuery)) {
|
|
60
|
-
return 2;
|
|
61
|
-
}
|
|
62
|
-
if (lowerAlias.includes(lowerQuery)) {
|
|
63
|
-
return 2;
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
// Lowest priority: description includes query
|
|
68
|
-
if (description.includes(lowerQuery)) {
|
|
69
|
-
return 1;
|
|
70
|
-
}
|
|
71
|
-
return 0; // No match
|
|
72
|
-
}
|
|
73
|
-
/**
|
|
74
|
-
* Check if command matches query (for filtering)
|
|
75
|
-
*/
|
|
76
|
-
function matchesSystemCommandQuery(cmd, query) {
|
|
77
|
-
return getSystemCommandMatchScore(cmd, query) > 0;
|
|
78
|
-
}
|
|
79
|
-
/**
|
|
80
|
-
* Inner component - wrapped with React.memo below
|
|
81
|
-
*/
|
|
82
|
-
const SlashCommandAutocompleteInner = forwardRef(function SlashCommandAutocomplete({ isVisible, searchQuery, onSelectPrompt, onSelectSystemCommand, onLoadIntoInput, onSubmitRaw, onClose, agent, }, ref) {
|
|
83
|
-
const [prompts, setPrompts] = useState([]);
|
|
84
|
-
const [systemCommands, setSystemCommands] = useState([]);
|
|
85
|
-
const [isLoading, setIsLoading] = useState(false);
|
|
86
|
-
const { columns: terminalWidth, rows: terminalRows } = useTerminalSize();
|
|
87
|
-
const maxVisibleItems = useMemo(() => {
|
|
88
|
-
return getMaxVisibleItemsForTerminalRows({
|
|
89
|
-
rows: terminalRows,
|
|
90
|
-
hardCap: 8,
|
|
91
|
-
reservedRows: 8,
|
|
92
|
-
});
|
|
93
|
-
}, [terminalRows]);
|
|
94
|
-
// Combined state to guarantee single render on navigation
|
|
95
|
-
const [selection, setSelection] = useState({ index: 0, offset: 0 });
|
|
96
|
-
const selectedIndexRef = useRef(0);
|
|
97
|
-
// Update selection AND scroll offset in a single state update
|
|
98
|
-
// This guarantees exactly one render per navigation action
|
|
99
|
-
const updateSelection = useCallback((indexUpdater) => {
|
|
100
|
-
setSelection((prev) => {
|
|
101
|
-
const newIndex = typeof indexUpdater === 'function' ? indexUpdater(prev.index) : indexUpdater;
|
|
102
|
-
selectedIndexRef.current = newIndex;
|
|
103
|
-
// Calculate new scroll offset
|
|
104
|
-
let newOffset = prev.offset;
|
|
105
|
-
if (newIndex < prev.offset) {
|
|
106
|
-
newOffset = newIndex;
|
|
107
|
-
}
|
|
108
|
-
else if (newIndex >= prev.offset + maxVisibleItems) {
|
|
109
|
-
newOffset = Math.max(0, newIndex - maxVisibleItems + 1);
|
|
110
|
-
}
|
|
111
|
-
return { index: newIndex, offset: newOffset };
|
|
112
|
-
});
|
|
113
|
-
}, [maxVisibleItems]);
|
|
114
|
-
// Fetch prompts and system commands from agent
|
|
115
|
-
useEffect(() => {
|
|
116
|
-
if (!isVisible)
|
|
117
|
-
return;
|
|
118
|
-
let cancelled = false;
|
|
119
|
-
setIsLoading(true);
|
|
120
|
-
const fetchCommands = async () => {
|
|
121
|
-
try {
|
|
122
|
-
// Fetch prompts
|
|
123
|
-
const promptSet = await agent.listPrompts();
|
|
124
|
-
const promptList = Object.values(promptSet).map((p) => ({
|
|
125
|
-
...p,
|
|
126
|
-
kind: 'prompt',
|
|
127
|
-
}));
|
|
128
|
-
// Fetch system commands
|
|
129
|
-
const allCommands = getAllCommands();
|
|
130
|
-
const commandList = allCommands.map((cmd) => ({
|
|
131
|
-
kind: 'system',
|
|
132
|
-
name: cmd.name,
|
|
133
|
-
description: cmd.description,
|
|
134
|
-
...(cmd.category && { category: cmd.category }),
|
|
135
|
-
...(cmd.aliases && { aliases: cmd.aliases }),
|
|
136
|
-
}));
|
|
137
|
-
if (!cancelled) {
|
|
138
|
-
setPrompts(promptList);
|
|
139
|
-
setSystemCommands(commandList);
|
|
140
|
-
setIsLoading(false);
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
catch {
|
|
144
|
-
if (!cancelled) {
|
|
145
|
-
// Silently fail - don't use console.error as it interferes with Ink rendering
|
|
146
|
-
setPrompts([]);
|
|
147
|
-
setSystemCommands([]);
|
|
148
|
-
setIsLoading(false);
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
};
|
|
152
|
-
void fetchCommands();
|
|
153
|
-
return () => {
|
|
154
|
-
cancelled = true;
|
|
155
|
-
};
|
|
156
|
-
}, [isVisible, agent]);
|
|
157
|
-
// Extract command name from search query (only the first word after /)
|
|
158
|
-
const commandQuery = useMemo(() => {
|
|
159
|
-
if (!searchQuery.startsWith('/'))
|
|
160
|
-
return '';
|
|
161
|
-
const afterSlash = searchQuery.slice(1).trim();
|
|
162
|
-
// Only take the first word (command name), not the arguments
|
|
163
|
-
const spaceIndex = afterSlash.indexOf(' ');
|
|
164
|
-
return spaceIndex > 0 ? afterSlash.slice(0, spaceIndex) : afterSlash;
|
|
165
|
-
}, [searchQuery]);
|
|
166
|
-
// Filter prompts and system commands based on query
|
|
167
|
-
const filteredPrompts = useMemo(() => {
|
|
168
|
-
if (!commandQuery) {
|
|
169
|
-
return prompts;
|
|
170
|
-
}
|
|
171
|
-
// Filter and sort by match score (highest first)
|
|
172
|
-
return prompts
|
|
173
|
-
.filter((p) => matchesPromptQuery(p, commandQuery))
|
|
174
|
-
.sort((a, b) => {
|
|
175
|
-
const scoreA = getPromptMatchScore(a, commandQuery);
|
|
176
|
-
const scoreB = getPromptMatchScore(b, commandQuery);
|
|
177
|
-
return scoreB - scoreA; // Higher score first
|
|
178
|
-
});
|
|
179
|
-
}, [prompts, commandQuery]);
|
|
180
|
-
const filteredSystemCommands = useMemo(() => {
|
|
181
|
-
if (!commandQuery) {
|
|
182
|
-
return systemCommands;
|
|
183
|
-
}
|
|
184
|
-
// Filter and sort by match score (highest first)
|
|
185
|
-
return systemCommands
|
|
186
|
-
.filter((cmd) => matchesSystemCommandQuery(cmd, commandQuery))
|
|
187
|
-
.sort((a, b) => {
|
|
188
|
-
const scoreA = getSystemCommandMatchScore(a, commandQuery);
|
|
189
|
-
const scoreB = getSystemCommandMatchScore(b, commandQuery);
|
|
190
|
-
return scoreB - scoreA; // Higher score first
|
|
191
|
-
});
|
|
192
|
-
}, [systemCommands, commandQuery]);
|
|
193
|
-
// Check if user has started typing arguments (hide autocomplete)
|
|
194
|
-
const hasArguments = useMemo(() => {
|
|
195
|
-
if (!searchQuery.startsWith('/'))
|
|
196
|
-
return false;
|
|
197
|
-
const afterSlash = searchQuery.slice(1).trim();
|
|
198
|
-
return afterSlash.includes(' ');
|
|
199
|
-
}, [searchQuery]);
|
|
200
|
-
// Combine items: system commands first, then prompts
|
|
201
|
-
// When typing arguments, show only exact matches (for argument hints)
|
|
202
|
-
const combinedItems = useMemo(() => {
|
|
203
|
-
const items = [];
|
|
204
|
-
if (hasArguments) {
|
|
205
|
-
// When typing arguments, only show exact match for the command
|
|
206
|
-
const exactSystemCmd = systemCommands.find((cmd) => cmd.name.toLowerCase() === commandQuery.toLowerCase());
|
|
207
|
-
if (exactSystemCmd) {
|
|
208
|
-
items.push({ kind: 'system', command: exactSystemCmd });
|
|
209
|
-
}
|
|
210
|
-
const exactPrompt = prompts.find((p) => p.name.toLowerCase() === commandQuery.toLowerCase() ||
|
|
211
|
-
(p.displayName && p.displayName.toLowerCase() === commandQuery.toLowerCase()));
|
|
212
|
-
if (exactPrompt) {
|
|
213
|
-
items.push({ kind: 'prompt', prompt: exactPrompt });
|
|
214
|
-
}
|
|
215
|
-
return items;
|
|
216
|
-
}
|
|
217
|
-
// System commands first (they're more commonly used)
|
|
218
|
-
filteredSystemCommands.forEach((cmd) => items.push({ kind: 'system', command: cmd }));
|
|
219
|
-
// Then prompts
|
|
220
|
-
filteredPrompts.forEach((prompt) => items.push({ kind: 'prompt', prompt }));
|
|
221
|
-
return items;
|
|
222
|
-
}, [
|
|
223
|
-
hasArguments,
|
|
224
|
-
filteredPrompts,
|
|
225
|
-
filteredSystemCommands,
|
|
226
|
-
systemCommands,
|
|
227
|
-
prompts,
|
|
228
|
-
commandQuery,
|
|
229
|
-
]);
|
|
230
|
-
// Get stable identity for first item (used to detect content changes)
|
|
231
|
-
const getFirstItemId = () => {
|
|
232
|
-
const first = combinedItems[0];
|
|
233
|
-
if (!first)
|
|
234
|
-
return null;
|
|
235
|
-
if (first.kind === 'system')
|
|
236
|
-
return `sys:${first.command.name}`;
|
|
237
|
-
return `prompt:${first.prompt.name}`;
|
|
238
|
-
};
|
|
239
|
-
// Track items for reset detection (length + first item identity)
|
|
240
|
-
const currentFirstId = getFirstItemId();
|
|
241
|
-
const prevItemsRef = useRef({ length: combinedItems.length, firstId: currentFirstId });
|
|
242
|
-
const itemsChanged = combinedItems.length !== prevItemsRef.current.length ||
|
|
243
|
-
currentFirstId !== prevItemsRef.current.firstId;
|
|
244
|
-
// Derive clamped selection values during render (always valid, no setState needed)
|
|
245
|
-
// This prevents the double-render that was causing flickering
|
|
246
|
-
const selectedIndex = itemsChanged
|
|
247
|
-
? 0
|
|
248
|
-
: Math.min(selection.index, Math.max(0, combinedItems.length - 1));
|
|
249
|
-
const scrollOffset = itemsChanged
|
|
250
|
-
? 0
|
|
251
|
-
: Math.min(selection.offset, Math.max(0, combinedItems.length - maxVisibleItems));
|
|
252
|
-
// Sync state only when items actually changed AND state differs
|
|
253
|
-
// This effect runs AFTER render, updating state for next user interaction
|
|
254
|
-
useEffect(() => {
|
|
255
|
-
if (itemsChanged) {
|
|
256
|
-
prevItemsRef.current = { length: combinedItems.length, firstId: currentFirstId };
|
|
257
|
-
// Only setState if values actually differ (prevents unnecessary re-render)
|
|
258
|
-
if (selection.index !== 0 || selection.offset !== 0) {
|
|
259
|
-
selectedIndexRef.current = 0;
|
|
260
|
-
setSelection({ index: 0, offset: 0 });
|
|
261
|
-
}
|
|
262
|
-
else {
|
|
263
|
-
selectedIndexRef.current = 0;
|
|
264
|
-
}
|
|
265
|
-
}
|
|
266
|
-
}, [itemsChanged, combinedItems.length, currentFirstId, selection.index, selection.offset]);
|
|
267
|
-
// Calculate visible items based on scroll offset
|
|
268
|
-
const visibleItems = useMemo(() => {
|
|
269
|
-
return combinedItems.slice(scrollOffset, scrollOffset + maxVisibleItems);
|
|
270
|
-
}, [combinedItems, scrollOffset, maxVisibleItems]);
|
|
271
|
-
// Expose handleInput method via ref
|
|
272
|
-
useImperativeHandle(ref, () => ({
|
|
273
|
-
handleInput: (input, key) => {
|
|
274
|
-
if (!isVisible)
|
|
275
|
-
return false;
|
|
276
|
-
// Escape always closes, regardless of item count
|
|
277
|
-
if (key.escape) {
|
|
278
|
-
onClose();
|
|
279
|
-
return true;
|
|
280
|
-
}
|
|
281
|
-
const itemsLength = combinedItems.length;
|
|
282
|
-
// Handle Enter when no matches or typing arguments
|
|
283
|
-
// Submit raw text directly (main input won't handle it since overlay is active)
|
|
284
|
-
if (itemsLength === 0 || hasArguments) {
|
|
285
|
-
if (key.return) {
|
|
286
|
-
void Promise.resolve(onSubmitRaw?.(searchQuery)).catch((err) => {
|
|
287
|
-
const message = err instanceof Error ? err.message : String(err);
|
|
288
|
-
agent.logger.error(`SlashCommandAutocomplete: Failed to submit raw command: ${message}`);
|
|
289
|
-
});
|
|
290
|
-
onClose();
|
|
291
|
-
return true;
|
|
292
|
-
}
|
|
293
|
-
// Let other keys (typing, backspace) fall through
|
|
294
|
-
return false;
|
|
295
|
-
}
|
|
296
|
-
if (key.upArrow) {
|
|
297
|
-
updateSelection((prev) => (prev - 1 + itemsLength) % itemsLength);
|
|
298
|
-
return true;
|
|
299
|
-
}
|
|
300
|
-
if (key.downArrow) {
|
|
301
|
-
updateSelection((prev) => (prev + 1) % itemsLength);
|
|
302
|
-
return true;
|
|
303
|
-
}
|
|
304
|
-
// Tab: For interactive commands (model, resume, switch), execute them like Enter
|
|
305
|
-
// For other commands, load into input for editing
|
|
306
|
-
if (key.tab) {
|
|
307
|
-
const item = combinedItems[selectedIndexRef.current];
|
|
308
|
-
if (!item)
|
|
309
|
-
return false;
|
|
310
|
-
// Check if this is an interactive command that should be executed
|
|
311
|
-
const interactiveCommands = ['model', 'resume', 'switch'];
|
|
312
|
-
const isInteractiveCommand = item.kind === 'system' && interactiveCommands.includes(item.command.name);
|
|
313
|
-
if (isInteractiveCommand && item.kind === 'system') {
|
|
314
|
-
// Execute interactive command (same as Enter)
|
|
315
|
-
onSelectSystemCommand?.(item.command.name);
|
|
316
|
-
}
|
|
317
|
-
else if (item.kind === 'system') {
|
|
318
|
-
// Load system command into input
|
|
319
|
-
onLoadIntoInput?.(`/${item.command.name}`);
|
|
320
|
-
}
|
|
321
|
-
else {
|
|
322
|
-
// Load prompt command into input using pre-computed commandName
|
|
323
|
-
// commandName is collision-resolved by PromptManager (e.g., "plan" or "config:plan")
|
|
324
|
-
const cmdName = item.prompt.commandName || item.prompt.displayName || item.prompt.name;
|
|
325
|
-
const argsString = item.prompt.arguments && item.prompt.arguments.length > 0
|
|
326
|
-
? ' ' +
|
|
327
|
-
item.prompt.arguments
|
|
328
|
-
.map((arg) => `<${arg.name}${arg.required ? '' : '?'}>`)
|
|
329
|
-
.join(' ')
|
|
330
|
-
: '';
|
|
331
|
-
onLoadIntoInput?.(`/${cmdName}${argsString}`);
|
|
332
|
-
}
|
|
333
|
-
return true;
|
|
334
|
-
}
|
|
335
|
-
// Enter: Execute the highlighted command/prompt and close overlay
|
|
336
|
-
if (key.return) {
|
|
337
|
-
const item = combinedItems[selectedIndexRef.current];
|
|
338
|
-
if (!item)
|
|
339
|
-
return false;
|
|
340
|
-
if (item.kind === 'system') {
|
|
341
|
-
onSelectSystemCommand?.(item.command.name);
|
|
342
|
-
}
|
|
343
|
-
else {
|
|
344
|
-
onSelectPrompt(item.prompt);
|
|
345
|
-
}
|
|
346
|
-
onClose();
|
|
347
|
-
return true;
|
|
348
|
-
}
|
|
349
|
-
// Don't consume other keys (typing, backspace, etc.)
|
|
350
|
-
// Let them fall through to the input handler
|
|
351
|
-
return false;
|
|
352
|
-
},
|
|
353
|
-
}), [
|
|
354
|
-
isVisible,
|
|
355
|
-
combinedItems,
|
|
356
|
-
hasArguments,
|
|
357
|
-
selectedIndexRef,
|
|
358
|
-
searchQuery,
|
|
359
|
-
onClose,
|
|
360
|
-
onLoadIntoInput,
|
|
361
|
-
onSubmitRaw,
|
|
362
|
-
onSelectPrompt,
|
|
363
|
-
onSelectSystemCommand,
|
|
364
|
-
updateSelection,
|
|
365
|
-
agent,
|
|
366
|
-
]);
|
|
367
|
-
if (!isVisible)
|
|
368
|
-
return null;
|
|
369
|
-
// Show loading state while fetching commands
|
|
370
|
-
if (isLoading) {
|
|
371
|
-
return (_jsx(Box, { width: terminalWidth, paddingX: 0, paddingY: 0, children: _jsx(Text, { color: "gray", children: "Loading commands..." }) }));
|
|
372
|
-
}
|
|
373
|
-
// If no items after loading, don't render
|
|
374
|
-
if (combinedItems.length === 0) {
|
|
375
|
-
return null;
|
|
376
|
-
}
|
|
377
|
-
const nameColumnWidth = Math.max(16, Math.min(28, Math.floor(terminalWidth * 0.32)));
|
|
378
|
-
const descriptionColor = (isSelected) => (isSelected ? 'white' : 'gray');
|
|
379
|
-
const commandColor = (isSelected) => (isSelected ? 'cyan' : 'gray');
|
|
380
|
-
return (_jsx(Box, { flexDirection: "column", width: terminalWidth, children: visibleItems.map((item, visibleIndex) => {
|
|
381
|
-
const actualIndex = scrollOffset + visibleIndex;
|
|
382
|
-
const isSelected = actualIndex === selectedIndex;
|
|
383
|
-
if (item.kind === 'system') {
|
|
384
|
-
const cmd = item.command;
|
|
385
|
-
const nameText = `/${cmd.name}`;
|
|
386
|
-
const descText = cmd.description || '';
|
|
387
|
-
return (_jsxs(Box, { flexDirection: "row", children: [_jsx(Box, { marginRight: 1, children: _jsx(Text, { color: commandColor(isSelected), children: isSelected ? '❯' : ' ' }) }), _jsx(Box, { width: nameColumnWidth, children: _jsx(Text, { wrap: "truncate-end", color: commandColor(isSelected), bold: isSelected, children: nameText }) }), _jsx(Box, { flexGrow: 1, minWidth: 0, children: _jsx(Text, { wrap: "truncate-end", color: descriptionColor(isSelected), children: descText }) })] }, `system-${cmd.name}`));
|
|
388
|
-
}
|
|
389
|
-
// Prompt command (MCP prompts)
|
|
390
|
-
const prompt = item.prompt;
|
|
391
|
-
// Use displayName for user-friendly display, fall back to full name
|
|
392
|
-
const displayName = prompt.displayName || prompt.name;
|
|
393
|
-
// Check if there's a collision (commandName includes source prefix)
|
|
394
|
-
const hasCollision = prompt.commandName && prompt.commandName !== displayName;
|
|
395
|
-
const nameText = `/${displayName}`;
|
|
396
|
-
const argsString = prompt.arguments && prompt.arguments.length > 0
|
|
397
|
-
? ' ' +
|
|
398
|
-
prompt.arguments
|
|
399
|
-
.map((arg) => `<${arg.name}${arg.required ? '' : '?'}>`)
|
|
400
|
-
.join(' ')
|
|
401
|
-
: '';
|
|
402
|
-
const description = prompt.title || prompt.description || '';
|
|
403
|
-
const commandText = nameText + argsString;
|
|
404
|
-
const collisionSuffix = hasCollision ? ` (use /${prompt.commandName})` : '';
|
|
405
|
-
return (_jsxs(Box, { flexDirection: "row", children: [_jsx(Box, { marginRight: 1, children: _jsx(Text, { color: commandColor(isSelected), children: isSelected ? '❯' : ' ' }) }), _jsx(Box, { width: nameColumnWidth, children: _jsx(Text, { wrap: "truncate-end", color: commandColor(isSelected), bold: isSelected, children: commandText }) }), _jsx(Box, { flexGrow: 1, minWidth: 0, children: _jsxs(Text, { wrap: "truncate-end", color: descriptionColor(isSelected), children: [description, collisionSuffix] }) })] }, `prompt-${prompt.name}`));
|
|
406
|
-
}) }));
|
|
407
|
-
});
|
|
408
|
-
/**
|
|
409
|
-
* Export with React.memo to prevent unnecessary re-renders from parent
|
|
410
|
-
* Only re-renders when props actually change (shallow comparison)
|
|
411
|
-
*/
|
|
412
|
-
export const SlashCommandAutocomplete = React.memo(SlashCommandAutocompleteInner);
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* StatusBar Component
|
|
3
|
-
* Displays processing status and controls above the input area
|
|
4
|
-
*
|
|
5
|
-
* Layout:
|
|
6
|
-
* - Line 1: Spinner + phrase (+ queue count if any)
|
|
7
|
-
* - Line 2: Meta info (time, tokens, cancel hint)
|
|
8
|
-
* This 2-line layout prevents truncation on any terminal width.
|
|
9
|
-
*/
|
|
10
|
-
import type { DextoAgent } from '@dexto/core';
|
|
11
|
-
interface StatusBarProps {
|
|
12
|
-
agent: DextoAgent;
|
|
13
|
-
isProcessing: boolean;
|
|
14
|
-
isThinking: boolean;
|
|
15
|
-
isCompacting: boolean;
|
|
16
|
-
approvalQueueCount: number;
|
|
17
|
-
copyModeEnabled?: boolean;
|
|
18
|
-
/** Whether an approval prompt is currently shown */
|
|
19
|
-
isAwaitingApproval?: boolean;
|
|
20
|
-
/** Whether the todo list is expanded */
|
|
21
|
-
todoExpanded?: boolean;
|
|
22
|
-
/** Whether there are todos to display */
|
|
23
|
-
hasTodos?: boolean;
|
|
24
|
-
/** Whether plan mode is active */
|
|
25
|
-
planModeActive?: boolean;
|
|
26
|
-
/** Whether accept all edits mode is active */
|
|
27
|
-
autoApproveEdits?: boolean;
|
|
28
|
-
/** Number of running background tasks */
|
|
29
|
-
backgroundTasksRunning?: number;
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* Status bar that shows processing state above input area
|
|
33
|
-
* Provides clear feedback on whether the agent is running or idle
|
|
34
|
-
*
|
|
35
|
-
* Design decisions:
|
|
36
|
-
* - Hide spinner during approval wait (user is reviewing, not waiting)
|
|
37
|
-
* - Only show elapsed time after 30s (avoid visual noise for fast operations)
|
|
38
|
-
*/
|
|
39
|
-
export declare function StatusBar({ agent, isProcessing, isThinking, isCompacting, approvalQueueCount, copyModeEnabled, isAwaitingApproval, todoExpanded, hasTodos, planModeActive, autoApproveEdits, backgroundTasksRunning, }: StatusBarProps): import("react/jsx-runtime").JSX.Element | null;
|
|
40
|
-
export {};
|
|
41
|
-
//# sourceMappingURL=StatusBar.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"StatusBar.d.ts","sourceRoot":"","sources":["../../../../src/cli/ink-cli/components/StatusBar.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAa9C,UAAU,cAAc;IACpB,KAAK,EAAE,UAAU,CAAC;IAClB,YAAY,EAAE,OAAO,CAAC;IACtB,UAAU,EAAE,OAAO,CAAC;IACpB,YAAY,EAAE,OAAO,CAAC;IACtB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,oDAAoD;IACpD,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,wCAAwC;IACxC,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,yCAAyC;IACzC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,kCAAkC;IAClC,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,8CAA8C;IAC9C,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,yCAAyC;IACzC,sBAAsB,CAAC,EAAE,MAAM,CAAC;CACnC;AAED;;;;;;;GAOG;AACH,wBAAgB,SAAS,CAAC,EACtB,KAAK,EACL,YAAY,EACZ,UAAU,EACV,YAAY,EACZ,kBAAkB,EAClB,eAAuB,EACvB,kBAA0B,EAC1B,YAAmB,EACnB,QAAgB,EAChB,cAAsB,EACtB,gBAAwB,EACxB,sBAA0B,GAC7B,EAAE,cAAc,kDAwIhB"}
|
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
/**
|
|
3
|
-
* StatusBar Component
|
|
4
|
-
* Displays processing status and controls above the input area
|
|
5
|
-
*
|
|
6
|
-
* Layout:
|
|
7
|
-
* - Line 1: Spinner + phrase (+ queue count if any)
|
|
8
|
-
* - Line 2: Meta info (time, tokens, cancel hint)
|
|
9
|
-
* This 2-line layout prevents truncation on any terminal width.
|
|
10
|
-
*/
|
|
11
|
-
import { Box, Text } from 'ink';
|
|
12
|
-
import { usePhraseCycler } from '../hooks/usePhraseCycler.js';
|
|
13
|
-
import { useElapsedTime } from '../hooks/useElapsedTime.js';
|
|
14
|
-
import { useTokenCounter } from '../hooks/useTokenCounter.js';
|
|
15
|
-
import { useAnimationTick } from '../hooks/useAnimationTick.js';
|
|
16
|
-
import { BRAILLE_SPINNER_FRAMES } from '../constants/spinnerFrames.js';
|
|
17
|
-
function StatusSpinner({ enabled, color }) {
|
|
18
|
-
const tick = useAnimationTick({ enabled, intervalMs: 80 });
|
|
19
|
-
const frame = BRAILLE_SPINNER_FRAMES[tick % BRAILLE_SPINNER_FRAMES.length];
|
|
20
|
-
return _jsx(Text, { color: color, children: frame });
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* Status bar that shows processing state above input area
|
|
24
|
-
* Provides clear feedback on whether the agent is running or idle
|
|
25
|
-
*
|
|
26
|
-
* Design decisions:
|
|
27
|
-
* - Hide spinner during approval wait (user is reviewing, not waiting)
|
|
28
|
-
* - Only show elapsed time after 30s (avoid visual noise for fast operations)
|
|
29
|
-
*/
|
|
30
|
-
export function StatusBar({ agent, isProcessing, isThinking, isCompacting, approvalQueueCount, copyModeEnabled = false, isAwaitingApproval = false, todoExpanded = true, hasTodos = false, planModeActive = false, autoApproveEdits = false, backgroundTasksRunning = 0, }) {
|
|
31
|
-
const animationsActive = isProcessing && !isAwaitingApproval && !copyModeEnabled;
|
|
32
|
-
// Cycle through witty phrases while processing (not during compacting)
|
|
33
|
-
const { phrase } = usePhraseCycler({ isActive: animationsActive && !isCompacting });
|
|
34
|
-
// Track elapsed time during processing
|
|
35
|
-
const { formatted: elapsedTime, elapsedMs } = useElapsedTime({
|
|
36
|
-
isActive: animationsActive,
|
|
37
|
-
intervalMs: 1000,
|
|
38
|
-
});
|
|
39
|
-
// Track token usage during processing
|
|
40
|
-
const { formatted: tokenCount } = useTokenCounter({ agent, isActive: animationsActive });
|
|
41
|
-
// Only show time after 30 seconds
|
|
42
|
-
const showTime = elapsedMs >= 30000;
|
|
43
|
-
// Show copy mode warning (highest priority)
|
|
44
|
-
if (copyModeEnabled) {
|
|
45
|
-
return (_jsx(Box, { paddingX: 1, marginBottom: 0, children: _jsx(Text, { color: "yellowBright", bold: true, children: "\uD83D\uDCCB Copy Mode - Select text with mouse. Press any key to exit." }) }));
|
|
46
|
-
}
|
|
47
|
-
if (!isProcessing) {
|
|
48
|
-
// Mode indicators (plan mode, accept edits) are shown in Footer, not here
|
|
49
|
-
return null;
|
|
50
|
-
}
|
|
51
|
-
// Hide status bar during approval wait - user is reviewing, not waiting
|
|
52
|
-
if (isAwaitingApproval) {
|
|
53
|
-
return null;
|
|
54
|
-
}
|
|
55
|
-
// Build the todo toggle hint based on state
|
|
56
|
-
const todoHint = hasTodos
|
|
57
|
-
? todoExpanded
|
|
58
|
-
? 'ctrl+t to hide todos'
|
|
59
|
-
: 'ctrl+t to show todos'
|
|
60
|
-
: null;
|
|
61
|
-
const backgroundHint = backgroundTasksRunning > 0 ? 'ctrl+b to view bg tasks' : null;
|
|
62
|
-
// Show compacting state - yellow/orange color to indicate context management
|
|
63
|
-
if (isCompacting) {
|
|
64
|
-
const metaParts = [];
|
|
65
|
-
if (showTime)
|
|
66
|
-
metaParts.push(`(${elapsedTime})`);
|
|
67
|
-
if (backgroundTasksRunning > 0) {
|
|
68
|
-
metaParts.push(`${backgroundTasksRunning} bg task${backgroundTasksRunning > 1 ? 's' : ''}`);
|
|
69
|
-
}
|
|
70
|
-
if (backgroundHint)
|
|
71
|
-
metaParts.push(backgroundHint);
|
|
72
|
-
metaParts.push('Esc to cancel');
|
|
73
|
-
if (todoHint)
|
|
74
|
-
metaParts.push(todoHint);
|
|
75
|
-
const metaContent = metaParts.join(' • ');
|
|
76
|
-
return (_jsxs(Box, { paddingX: 1, marginTop: 1, flexDirection: "column", children: [_jsxs(Box, { flexDirection: "row", alignItems: "center", children: [_jsx(StatusSpinner, { enabled: true, color: "yellow" }), _jsx(Text, { color: "yellow", children: " \uD83D\uDCE6 Compacting context..." })] }), _jsx(Box, { marginLeft: 2, children: _jsx(Text, { color: "gray", children: metaContent }) })] }));
|
|
77
|
-
}
|
|
78
|
-
// Show initial processing state (before streaming starts) - green/teal color
|
|
79
|
-
// TODO: Rename this event/state to "reasoning" and associate it with actual reasoning tokens
|
|
80
|
-
// Currently "thinking" event fires before any response, not during reasoning token generation
|
|
81
|
-
if (isThinking) {
|
|
82
|
-
const metaParts = [];
|
|
83
|
-
if (showTime)
|
|
84
|
-
metaParts.push(`(${elapsedTime})`);
|
|
85
|
-
if (tokenCount)
|
|
86
|
-
metaParts.push(tokenCount);
|
|
87
|
-
if (backgroundTasksRunning > 0) {
|
|
88
|
-
metaParts.push(`${backgroundTasksRunning} bg task${backgroundTasksRunning > 1 ? 's' : ''}`);
|
|
89
|
-
}
|
|
90
|
-
if (backgroundHint)
|
|
91
|
-
metaParts.push(backgroundHint);
|
|
92
|
-
metaParts.push('Esc to cancel');
|
|
93
|
-
if (todoHint)
|
|
94
|
-
metaParts.push(todoHint);
|
|
95
|
-
const metaContent = metaParts.join(' • ');
|
|
96
|
-
return (_jsxs(Box, { paddingX: 1, marginTop: 1, flexDirection: "column", children: [_jsxs(Box, { flexDirection: "row", alignItems: "center", children: [_jsx(StatusSpinner, { enabled: true, color: "green" }), _jsxs(Text, { color: "green", children: [" ", phrase] })] }), _jsx(Box, { marginLeft: 2, children: _jsx(Text, { color: "gray", children: metaContent }) })] }));
|
|
97
|
-
}
|
|
98
|
-
// Show active streaming state - green/teal color
|
|
99
|
-
// Always use 2-line layout: phrase on first line, meta on second
|
|
100
|
-
// This prevents truncation and messy wrapping on any terminal width
|
|
101
|
-
const metaParts = [];
|
|
102
|
-
if (showTime)
|
|
103
|
-
metaParts.push(`(${elapsedTime})`);
|
|
104
|
-
if (tokenCount)
|
|
105
|
-
metaParts.push(tokenCount);
|
|
106
|
-
if (backgroundTasksRunning > 0) {
|
|
107
|
-
metaParts.push(`${backgroundTasksRunning} bg task${backgroundTasksRunning > 1 ? 's' : ''}`);
|
|
108
|
-
}
|
|
109
|
-
if (backgroundHint)
|
|
110
|
-
metaParts.push(backgroundHint);
|
|
111
|
-
metaParts.push('Esc to cancel');
|
|
112
|
-
if (todoHint)
|
|
113
|
-
metaParts.push(todoHint);
|
|
114
|
-
const metaContent = metaParts.join(' • ');
|
|
115
|
-
return (_jsxs(Box, { paddingX: 1, marginTop: 1, flexDirection: "column", children: [_jsxs(Box, { flexDirection: "row", alignItems: "center", children: [_jsx(StatusSpinner, { enabled: true, color: "green" }), _jsxs(Text, { color: "green", children: [" ", phrase] }), approvalQueueCount > 0 && (_jsxs(Text, { color: "yellowBright", children: [" \u2022 ", approvalQueueCount, " queued"] }))] }), _jsx(Box, { marginLeft: 2, children: _jsx(Text, { color: "gray", children: metaContent }) })] }));
|
|
116
|
-
}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* TextBufferInput Component
|
|
3
|
-
*
|
|
4
|
-
* Buffer is passed as prop from parent.
|
|
5
|
-
* Uses direct useKeypress for input handling (no ref chain).
|
|
6
|
-
* Parent owns the buffer and can read values directly.
|
|
7
|
-
*/
|
|
8
|
-
import type { TextBuffer } from './shared/text-buffer.js';
|
|
9
|
-
import type { PendingImage, PastedBlock } from '../state/types.js';
|
|
10
|
-
/** Overlay trigger types for event-driven overlay detection */
|
|
11
|
-
export type OverlayTrigger = 'slash-autocomplete' | 'resource-autocomplete' | 'close';
|
|
12
|
-
interface TextBufferInputProps {
|
|
13
|
-
/** Text buffer (owned by parent) */
|
|
14
|
-
buffer: TextBuffer;
|
|
15
|
-
/** Called when user presses Enter to submit */
|
|
16
|
-
onSubmit: (value: string) => void;
|
|
17
|
-
/** Placeholder text when empty */
|
|
18
|
-
placeholder?: string | undefined;
|
|
19
|
-
/** Whether input handling is disabled (e.g., during processing) */
|
|
20
|
-
isDisabled?: boolean | undefined;
|
|
21
|
-
/** Called for history navigation (up/down at boundaries) */
|
|
22
|
-
onHistoryNavigate?: ((direction: 'up' | 'down') => void) | undefined;
|
|
23
|
-
/** Called to trigger overlay (slash command, @mention) */
|
|
24
|
-
onTriggerOverlay?: ((trigger: OverlayTrigger) => void) | undefined;
|
|
25
|
-
/** Maximum lines to show in viewport */
|
|
26
|
-
maxViewportLines?: number | undefined;
|
|
27
|
-
/** Whether this input should handle keypresses */
|
|
28
|
-
isActive: boolean;
|
|
29
|
-
/** Optional handler for keyboard scroll (PageUp/PageDown, Shift+arrows) */
|
|
30
|
-
onKeyboardScroll?: ((direction: 'up' | 'down') => void) | undefined;
|
|
31
|
-
/** Current number of attached images (for placeholder numbering) */
|
|
32
|
-
imageCount?: number | undefined;
|
|
33
|
-
/** Called when image is pasted from clipboard */
|
|
34
|
-
onImagePaste?: ((image: PendingImage) => void) | undefined;
|
|
35
|
-
/** Current pending images (for placeholder removal detection) */
|
|
36
|
-
images?: PendingImage[] | undefined;
|
|
37
|
-
/** Called when an image placeholder is removed from text */
|
|
38
|
-
onImageRemove?: ((imageId: string) => void) | undefined;
|
|
39
|
-
/** Current pasted blocks for collapse/expand feature */
|
|
40
|
-
pastedBlocks?: PastedBlock[] | undefined;
|
|
41
|
-
/** Called when a large paste is detected and should be collapsed */
|
|
42
|
-
onPasteBlock?: ((block: PastedBlock) => void) | undefined;
|
|
43
|
-
/** Called to update a pasted block (e.g., toggle collapse) */
|
|
44
|
-
onPasteBlockUpdate?: ((blockId: string, updates: Partial<PastedBlock>) => void) | undefined;
|
|
45
|
-
/** Called when a paste block placeholder is removed from text */
|
|
46
|
-
onPasteBlockRemove?: ((blockId: string) => void) | undefined;
|
|
47
|
-
/** Query to highlight in input text (for history search) */
|
|
48
|
-
highlightQuery?: string | undefined;
|
|
49
|
-
}
|
|
50
|
-
export declare function TextBufferInput({ buffer, onSubmit, placeholder, isDisabled, onHistoryNavigate, onTriggerOverlay, maxViewportLines, isActive, onKeyboardScroll, imageCount, onImagePaste, images, onImageRemove, pastedBlocks, onPasteBlock, onPasteBlockUpdate, onPasteBlockRemove, highlightQuery, }: TextBufferInputProps): import("react/jsx-runtime").JSX.Element;
|
|
51
|
-
export {};
|
|
52
|
-
//# sourceMappingURL=TextBufferInput.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TextBufferInput.d.ts","sourceRoot":"","sources":["../../../../src/cli/ink-cli/components/TextBufferInput.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAKH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAGnE,+DAA+D;AAC/D,MAAM,MAAM,cAAc,GAAG,oBAAoB,GAAG,uBAAuB,GAAG,OAAO,CAAC;AActF,UAAU,oBAAoB;IAC1B,oCAAoC;IACpC,MAAM,EAAE,UAAU,CAAC;IACnB,+CAA+C;IAC/C,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,kCAAkC;IAClC,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,mEAAmE;IACnE,UAAU,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IACjC,4DAA4D;IAC5D,iBAAiB,CAAC,EAAE,CAAC,CAAC,SAAS,EAAE,IAAI,GAAG,MAAM,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;IACrE,0DAA0D;IAC1D,gBAAgB,CAAC,EAAE,CAAC,CAAC,OAAO,EAAE,cAAc,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;IACnE,wCAAwC;IACxC,gBAAgB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACtC,kDAAkD;IAClD,QAAQ,EAAE,OAAO,CAAC;IAClB,2EAA2E;IAC3E,gBAAgB,CAAC,EAAE,CAAC,CAAC,SAAS,EAAE,IAAI,GAAG,MAAM,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;IACpE,oEAAoE;IACpE,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,iDAAiD;IACjD,YAAY,CAAC,EAAE,CAAC,CAAC,KAAK,EAAE,YAAY,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;IAC3D,iEAAiE;IACjE,MAAM,CAAC,EAAE,YAAY,EAAE,GAAG,SAAS,CAAC;IACpC,4DAA4D;IAC5D,aAAa,CAAC,EAAE,CAAC,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;IACxD,wDAAwD;IACxD,YAAY,CAAC,EAAE,WAAW,EAAE,GAAG,SAAS,CAAC;IACzC,oEAAoE;IACpE,YAAY,CAAC,EAAE,CAAC,CAAC,KAAK,EAAE,WAAW,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;IAC1D,8DAA8D;IAC9D,kBAAkB,CAAC,EAAE,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;IAC5F,iEAAiE;IACjE,kBAAkB,CAAC,EAAE,CAAC,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;IAC7D,4DAA4D;IAC5D,cAAc,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACvC;AAuCD,wBAAgB,eAAe,CAAC,EAC5B,MAAM,EACN,QAAQ,EACR,WAAW,EACX,UAAkB,EAClB,iBAAiB,EACjB,gBAAgB,EAChB,gBAAqB,EACrB,QAAQ,EACR,gBAAgB,EAChB,UAAc,EACd,YAAY,EACZ,MAAW,EACX,aAAa,EACb,YAAiB,EACjB,YAAY,EACZ,kBAAkB,EAClB,kBAAkB,EAClB,cAAc,GACjB,EAAE,oBAAoB,2CA2hBtB"}
|