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,508 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* General Commands Module
|
|
3
|
-
*
|
|
4
|
-
* This module defines general-purpose slash commands for the Dexto CLI interface.
|
|
5
|
-
* These are basic commands that don't fit into specific categories.
|
|
6
|
-
*
|
|
7
|
-
* Available General Commands:
|
|
8
|
-
* - /help [command] - Show help information
|
|
9
|
-
* - /exit, /quit, /q - Exit the CLI application
|
|
10
|
-
* - /clear, /reset - Clear conversation history
|
|
11
|
-
*/
|
|
12
|
-
import chalk from 'chalk';
|
|
13
|
-
import { spawn } from 'child_process';
|
|
14
|
-
import { formatForInkCli } from './utils/format-output.js';
|
|
15
|
-
import { CommandOutputHelper } from './utils/command-output.js';
|
|
16
|
-
import { writeToClipboard } from '../../ink-cli/utils/clipboardUtils.js';
|
|
17
|
-
import { setExitStats } from './exit-stats.js';
|
|
18
|
-
import { triggerExit } from './exit-handler.js';
|
|
19
|
-
/**
|
|
20
|
-
* Get the shell rc file path for the given shell
|
|
21
|
-
*/
|
|
22
|
-
function getShellRcFile(shell) {
|
|
23
|
-
const home = process.env.HOME;
|
|
24
|
-
if (!home)
|
|
25
|
-
return null;
|
|
26
|
-
if (shell.includes('zsh')) {
|
|
27
|
-
return `${home}/.zshrc`;
|
|
28
|
-
}
|
|
29
|
-
else if (shell.includes('bash')) {
|
|
30
|
-
return `${home}/.bashrc`;
|
|
31
|
-
}
|
|
32
|
-
return null;
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* Wrap command to source shell rc file for alias support
|
|
36
|
-
* This mimics how Claude Code handles shell aliases - by sourcing the rc file
|
|
37
|
-
* before executing the command, we get aliases without using -i flag.
|
|
38
|
-
* We use eval to force the command to be re-parsed after sourcing, since
|
|
39
|
-
* aliases are expanded at parse time, not execution time.
|
|
40
|
-
*/
|
|
41
|
-
function wrapCommandWithRcSource(command, shell) {
|
|
42
|
-
const rcFile = getShellRcFile(shell);
|
|
43
|
-
if (!rcFile) {
|
|
44
|
-
return command;
|
|
45
|
-
}
|
|
46
|
-
// Escape single quotes in the command for safe eval
|
|
47
|
-
const escapedCommand = command.replace(/'/g, "'\\''");
|
|
48
|
-
// Source the rc file (suppressing errors if it doesn't exist), then eval the command
|
|
49
|
-
// eval forces re-parsing after sourcing, allowing aliases to expand
|
|
50
|
-
// For bash, we also need to enable expand_aliases
|
|
51
|
-
if (shell.includes('bash')) {
|
|
52
|
-
return `source "${rcFile}" 2>/dev/null; shopt -s expand_aliases 2>/dev/null; eval '${escapedCommand}'`;
|
|
53
|
-
}
|
|
54
|
-
return `source "${rcFile}" 2>/dev/null; eval '${escapedCommand}'`;
|
|
55
|
-
}
|
|
56
|
-
async function executeShellCommand(command, cwd, timeoutMs = 30000) {
|
|
57
|
-
return new Promise((resolve) => {
|
|
58
|
-
// Use user's default shell from SHELL env var, fallback to /bin/sh
|
|
59
|
-
// Avoid -i (interactive) as it sets up job control which causes SIGTTIN
|
|
60
|
-
// when the parent process tries to read stdin while shell runs.
|
|
61
|
-
// Instead, source the shell's rc file to get aliases (similar to Claude Code).
|
|
62
|
-
// Use detached: true to create a new process group, preventing the child
|
|
63
|
-
// from interfering with the parent's terminal control.
|
|
64
|
-
const userShell = process.env.SHELL || '/bin/sh';
|
|
65
|
-
const wrappedCommand = wrapCommandWithRcSource(command, userShell);
|
|
66
|
-
const child = spawn(userShell, ['-c', wrappedCommand], {
|
|
67
|
-
cwd,
|
|
68
|
-
stdio: ['ignore', 'pipe', 'pipe'],
|
|
69
|
-
env: { ...process.env },
|
|
70
|
-
detached: true,
|
|
71
|
-
});
|
|
72
|
-
let stdout = '';
|
|
73
|
-
let stderr = '';
|
|
74
|
-
const timer = setTimeout(() => {
|
|
75
|
-
child.kill();
|
|
76
|
-
resolve({ stdout, stderr: `Command timed out after ${timeoutMs}ms`, exitCode: -1 });
|
|
77
|
-
}, timeoutMs);
|
|
78
|
-
child.stdout.on('data', (data) => {
|
|
79
|
-
stdout += data.toString();
|
|
80
|
-
});
|
|
81
|
-
child.stderr.on('data', (data) => {
|
|
82
|
-
stderr += data.toString();
|
|
83
|
-
});
|
|
84
|
-
child.on('error', (error) => {
|
|
85
|
-
clearTimeout(timer);
|
|
86
|
-
resolve({ stdout, stderr: error.message, exitCode: -1 });
|
|
87
|
-
});
|
|
88
|
-
child.on('close', (code) => {
|
|
89
|
-
clearTimeout(timer);
|
|
90
|
-
resolve({ stdout, stderr, exitCode: code ?? -1 });
|
|
91
|
-
});
|
|
92
|
-
});
|
|
93
|
-
}
|
|
94
|
-
/**
|
|
95
|
-
* Creates the help command with access to all commands for display
|
|
96
|
-
*/
|
|
97
|
-
export function createHelpCommand(getAllCommands) {
|
|
98
|
-
return {
|
|
99
|
-
name: 'help',
|
|
100
|
-
description: 'Show help information',
|
|
101
|
-
usage: '/help',
|
|
102
|
-
category: 'General',
|
|
103
|
-
aliases: ['h', '?'],
|
|
104
|
-
handler: async (_args, _agent, _ctx) => {
|
|
105
|
-
const allCommands = getAllCommands();
|
|
106
|
-
// Build styled data for help
|
|
107
|
-
const styledData = {
|
|
108
|
-
commands: allCommands.map((cmd) => ({
|
|
109
|
-
name: cmd.name,
|
|
110
|
-
description: cmd.description,
|
|
111
|
-
category: cmd.category || 'General',
|
|
112
|
-
})),
|
|
113
|
-
};
|
|
114
|
-
// Build fallback text
|
|
115
|
-
const fallbackLines = ['Available Commands:'];
|
|
116
|
-
for (const cmd of allCommands) {
|
|
117
|
-
fallbackLines.push(` /${cmd.name} - ${cmd.description}`);
|
|
118
|
-
}
|
|
119
|
-
return CommandOutputHelper.styled('help', styledData, fallbackLines.join('\n'));
|
|
120
|
-
},
|
|
121
|
-
};
|
|
122
|
-
}
|
|
123
|
-
/**
|
|
124
|
-
* General commands that are available across all contexts
|
|
125
|
-
* Note: The help command is created separately to avoid circular dependencies
|
|
126
|
-
*/
|
|
127
|
-
export const generalCommands = [
|
|
128
|
-
{
|
|
129
|
-
name: 'shell',
|
|
130
|
-
description: 'Execute shell command directly (use !command as shortcut)',
|
|
131
|
-
usage: '!<command> or /shell <command>',
|
|
132
|
-
category: 'General',
|
|
133
|
-
handler: async (args, agent, _ctx) => {
|
|
134
|
-
const command = args.join(' ').trim();
|
|
135
|
-
if (!command) {
|
|
136
|
-
return formatForInkCli('❌ No command provided. Usage: !<command>');
|
|
137
|
-
}
|
|
138
|
-
const cwd = process.cwd();
|
|
139
|
-
agent.logger.debug(`Executing shell command: ${command}`);
|
|
140
|
-
const { stdout, stderr, exitCode } = await executeShellCommand(command, cwd);
|
|
141
|
-
// Build output
|
|
142
|
-
const lines = [];
|
|
143
|
-
if (stdout.trim()) {
|
|
144
|
-
lines.push(stdout.trim());
|
|
145
|
-
}
|
|
146
|
-
if (stderr.trim()) {
|
|
147
|
-
lines.push(chalk.yellow(stderr.trim()));
|
|
148
|
-
}
|
|
149
|
-
if (exitCode !== 0) {
|
|
150
|
-
lines.push(chalk.red(`Exit code: ${exitCode}`));
|
|
151
|
-
}
|
|
152
|
-
if (lines.length === 0) {
|
|
153
|
-
return formatForInkCli(chalk.gray('(no output)'));
|
|
154
|
-
}
|
|
155
|
-
return formatForInkCli(lines.join('\n'));
|
|
156
|
-
},
|
|
157
|
-
},
|
|
158
|
-
{
|
|
159
|
-
name: 'exit',
|
|
160
|
-
description: 'Exit the CLI',
|
|
161
|
-
usage: '/exit',
|
|
162
|
-
category: 'General',
|
|
163
|
-
aliases: ['quit', 'q'],
|
|
164
|
-
handler: async (_args, agent, ctx) => {
|
|
165
|
-
// Store session stats to be displayed after Ink exits
|
|
166
|
-
try {
|
|
167
|
-
const { sessionId } = ctx;
|
|
168
|
-
if (sessionId) {
|
|
169
|
-
const [sessionMetadata, history] = await Promise.all([
|
|
170
|
-
agent.sessionManager.getSessionMetadata(sessionId),
|
|
171
|
-
agent.getSessionHistory(sessionId),
|
|
172
|
-
]);
|
|
173
|
-
if (sessionMetadata) {
|
|
174
|
-
// Calculate session duration
|
|
175
|
-
let durationStr;
|
|
176
|
-
if (sessionMetadata.createdAt) {
|
|
177
|
-
const duration = Date.now() - new Date(sessionMetadata.createdAt).getTime();
|
|
178
|
-
const minutes = Math.floor(duration / 60000);
|
|
179
|
-
const seconds = Math.floor((duration % 60000) / 1000);
|
|
180
|
-
durationStr = minutes > 0 ? `${minutes}m ${seconds}s` : `${seconds}s`;
|
|
181
|
-
}
|
|
182
|
-
// Message counts
|
|
183
|
-
const messageCount = {
|
|
184
|
-
total: history?.length || 0,
|
|
185
|
-
user: history?.filter((msg) => msg.role === 'user').length || 0,
|
|
186
|
-
assistant: history?.filter((msg) => msg.role === 'assistant').length || 0,
|
|
187
|
-
};
|
|
188
|
-
// Store stats for display after exit
|
|
189
|
-
setExitStats({
|
|
190
|
-
...(sessionId && { sessionId }),
|
|
191
|
-
...(durationStr && { duration: durationStr }),
|
|
192
|
-
messageCount,
|
|
193
|
-
...(sessionMetadata.tokenUsage && {
|
|
194
|
-
tokenUsage: sessionMetadata.tokenUsage,
|
|
195
|
-
}),
|
|
196
|
-
...(sessionMetadata.estimatedCost !== undefined && {
|
|
197
|
-
estimatedCost: sessionMetadata.estimatedCost,
|
|
198
|
-
}),
|
|
199
|
-
...(sessionMetadata.modelStats && {
|
|
200
|
-
modelStats: sessionMetadata.modelStats,
|
|
201
|
-
}),
|
|
202
|
-
});
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
catch (error) {
|
|
207
|
-
// Silently ignore errors - don't block exit
|
|
208
|
-
agent.logger.debug(`Failed to collect session stats on exit: ${error instanceof Error ? error.message : String(error)}`);
|
|
209
|
-
}
|
|
210
|
-
// Trigger graceful exit - this will unmount the Ink app
|
|
211
|
-
// After unmount, session stats will be printed to stdout
|
|
212
|
-
triggerExit();
|
|
213
|
-
// Return true to indicate command was handled
|
|
214
|
-
return true;
|
|
215
|
-
},
|
|
216
|
-
},
|
|
217
|
-
{
|
|
218
|
-
name: 'new',
|
|
219
|
-
description: 'Start a new conversation',
|
|
220
|
-
usage: '/new',
|
|
221
|
-
category: 'General',
|
|
222
|
-
handler: async (_args, agent, _ctx) => {
|
|
223
|
-
try {
|
|
224
|
-
// Create a new session
|
|
225
|
-
const newSession = await agent.createSession();
|
|
226
|
-
const newSessionId = newSession.id;
|
|
227
|
-
// Emit session:created to switch the CLI to the new session
|
|
228
|
-
agent.emit('session:created', {
|
|
229
|
-
sessionId: newSessionId,
|
|
230
|
-
switchTo: true,
|
|
231
|
-
});
|
|
232
|
-
return formatForInkCli(`✨ New conversation started\n💡 Use /resume to see previous conversations`);
|
|
233
|
-
}
|
|
234
|
-
catch (error) {
|
|
235
|
-
const errorMsg = `Failed to create new session: ${error instanceof Error ? error.message : String(error)}`;
|
|
236
|
-
agent.logger.error(errorMsg);
|
|
237
|
-
return formatForInkCli(`❌ ${errorMsg}`);
|
|
238
|
-
}
|
|
239
|
-
},
|
|
240
|
-
},
|
|
241
|
-
{
|
|
242
|
-
name: 'clear',
|
|
243
|
-
description: 'Continue conversation, free up AI context window',
|
|
244
|
-
usage: '/clear',
|
|
245
|
-
category: 'General',
|
|
246
|
-
handler: async (_args, agent, ctx) => {
|
|
247
|
-
try {
|
|
248
|
-
const { sessionId } = ctx;
|
|
249
|
-
if (!sessionId) {
|
|
250
|
-
return formatForInkCli('⚠️ No active session to clear');
|
|
251
|
-
}
|
|
252
|
-
// Clear context window - adds a marker so filterCompacted skips prior messages
|
|
253
|
-
// History stays in DB for review, but LLM won't see it
|
|
254
|
-
await agent.clearContext(sessionId);
|
|
255
|
-
return formatForInkCli('🧹 Context window cleared\n💡 Conversation continues - AI will not see older messages');
|
|
256
|
-
}
|
|
257
|
-
catch (error) {
|
|
258
|
-
const errorMsg = `Failed to clear context: ${error instanceof Error ? error.message : String(error)}`;
|
|
259
|
-
agent.logger.error(errorMsg);
|
|
260
|
-
return formatForInkCli(`❌ ${errorMsg}`);
|
|
261
|
-
}
|
|
262
|
-
},
|
|
263
|
-
},
|
|
264
|
-
{
|
|
265
|
-
name: 'compact',
|
|
266
|
-
description: 'Compact context by summarizing older messages',
|
|
267
|
-
usage: '/compact',
|
|
268
|
-
category: 'General',
|
|
269
|
-
aliases: ['summarize'],
|
|
270
|
-
handler: async (_args, agent, ctx) => {
|
|
271
|
-
try {
|
|
272
|
-
const { sessionId } = ctx;
|
|
273
|
-
if (!sessionId) {
|
|
274
|
-
return formatForInkCli('⚠️ No active session to compact');
|
|
275
|
-
}
|
|
276
|
-
// Compact context - generates summary and hides older messages
|
|
277
|
-
// The context:compacting and context:compacted events are handled by useAgentEvents
|
|
278
|
-
// which shows the compacting indicator and notification message
|
|
279
|
-
const result = await agent.compactContext(sessionId);
|
|
280
|
-
if (!result) {
|
|
281
|
-
return formatForInkCli('💡 Nothing to compact - history is too short or compaction is not configured.');
|
|
282
|
-
}
|
|
283
|
-
// Return true - notification is shown via context:compacted event handler
|
|
284
|
-
return true;
|
|
285
|
-
}
|
|
286
|
-
catch (error) {
|
|
287
|
-
const errorMsg = `Failed to compact context: ${error instanceof Error ? error.message : String(error)}`;
|
|
288
|
-
agent.logger.error(errorMsg);
|
|
289
|
-
return formatForInkCli(`❌ ${errorMsg}`);
|
|
290
|
-
}
|
|
291
|
-
},
|
|
292
|
-
},
|
|
293
|
-
{
|
|
294
|
-
name: 'context',
|
|
295
|
-
description: 'Show context window usage statistics',
|
|
296
|
-
usage: '/context',
|
|
297
|
-
category: 'General',
|
|
298
|
-
aliases: ['ctx', 'tokens'],
|
|
299
|
-
handler: async (_args, agent, ctx) => {
|
|
300
|
-
try {
|
|
301
|
-
const { sessionId } = ctx;
|
|
302
|
-
if (!sessionId) {
|
|
303
|
-
return formatForInkCli('⚠️ No active session');
|
|
304
|
-
}
|
|
305
|
-
const stats = await agent.getContextStats(sessionId);
|
|
306
|
-
// Create a visual progress bar (clamped to 0-100% for display)
|
|
307
|
-
const barWidth = 20;
|
|
308
|
-
const displayPercent = Math.min(Math.max(stats.usagePercent, 0), 100);
|
|
309
|
-
const filledWidth = Math.round((displayPercent / 100) * barWidth);
|
|
310
|
-
const emptyWidth = barWidth - filledWidth;
|
|
311
|
-
const progressBar = '█'.repeat(filledWidth) + '░'.repeat(emptyWidth);
|
|
312
|
-
// Color based on usage
|
|
313
|
-
let usageColor = chalk.green;
|
|
314
|
-
if (stats.usagePercent > 80)
|
|
315
|
-
usageColor = chalk.red;
|
|
316
|
-
else if (stats.usagePercent > 60)
|
|
317
|
-
usageColor = chalk.yellow;
|
|
318
|
-
// Helper to format token counts
|
|
319
|
-
const formatTokens = (tokens) => {
|
|
320
|
-
if (tokens >= 1000) {
|
|
321
|
-
return `${(tokens / 1000).toFixed(1)}k`;
|
|
322
|
-
}
|
|
323
|
-
return tokens.toLocaleString();
|
|
324
|
-
};
|
|
325
|
-
// Calculate auto compact buffer (reserved space before compaction triggers)
|
|
326
|
-
// maxContextTokens already has thresholdPercent applied, so we need to derive
|
|
327
|
-
// the buffer as: maxContextTokens * (1 - thresholdPercent) / thresholdPercent
|
|
328
|
-
const autoCompactBuffer = stats.thresholdPercent > 0 && stats.thresholdPercent < 1.0
|
|
329
|
-
? Math.floor((stats.maxContextTokens * (1 - stats.thresholdPercent)) /
|
|
330
|
-
stats.thresholdPercent)
|
|
331
|
-
: 0;
|
|
332
|
-
const bufferPercent = Math.round((1 - stats.thresholdPercent) * 100);
|
|
333
|
-
const bufferLabel = bufferPercent > 0
|
|
334
|
-
? `Auto compact buffer (${bufferPercent}%)`
|
|
335
|
-
: 'Auto compact buffer';
|
|
336
|
-
const totalTokenSpace = stats.maxContextTokens + autoCompactBuffer;
|
|
337
|
-
const usedTokens = stats.estimatedTokens + autoCompactBuffer;
|
|
338
|
-
// Helper to calculate percentage of total token space
|
|
339
|
-
const pct = (tokens) => {
|
|
340
|
-
const percent = totalTokenSpace > 0 ? ((tokens / totalTokenSpace) * 100).toFixed(1) : '0.0';
|
|
341
|
-
return `${percent}%`;
|
|
342
|
-
};
|
|
343
|
-
const overflowWarning = stats.usagePercent > 100 ? ' ⚠️ OVERFLOW' : '';
|
|
344
|
-
const { breakdown } = stats;
|
|
345
|
-
const tokenDisplay = `~${formatTokens(usedTokens)}`;
|
|
346
|
-
const breakdownLabel = chalk.dim('(estimated)');
|
|
347
|
-
const lines = [
|
|
348
|
-
`📊 Context Usage`,
|
|
349
|
-
` ${usageColor(progressBar)} ${stats.usagePercent}%${overflowWarning}`,
|
|
350
|
-
` ${chalk.dim(stats.modelDisplayName)} · ${tokenDisplay} / ${formatTokens(totalTokenSpace)} tokens`,
|
|
351
|
-
``,
|
|
352
|
-
` ${chalk.cyan('Breakdown:')} ${breakdownLabel}`,
|
|
353
|
-
` ├─ System prompt: ${formatTokens(breakdown.systemPrompt)} (${pct(breakdown.systemPrompt)})`,
|
|
354
|
-
` ├─ Tools: ${formatTokens(breakdown.tools.total)} (${pct(breakdown.tools.total)})`,
|
|
355
|
-
` ├─ Messages: ${formatTokens(breakdown.messages)} (${pct(breakdown.messages)})`,
|
|
356
|
-
` └─ ${bufferLabel}: ${formatTokens(autoCompactBuffer)} (${pct(autoCompactBuffer)})`,
|
|
357
|
-
``,
|
|
358
|
-
` Messages: ${stats.filteredMessageCount} visible (${stats.messageCount} total)`,
|
|
359
|
-
];
|
|
360
|
-
// Show pruned tool count if any
|
|
361
|
-
if (stats.prunedToolCount > 0) {
|
|
362
|
-
lines.push(` 🗑️ ${stats.prunedToolCount} tool output(s) pruned`);
|
|
363
|
-
}
|
|
364
|
-
if (stats.hasSummary) {
|
|
365
|
-
lines.push(` 📦 Context has been compacted`);
|
|
366
|
-
}
|
|
367
|
-
if (stats.usagePercent > 100) {
|
|
368
|
-
lines.push(` 💡 Use /compact to manually compact, or send a message to trigger auto-compaction`);
|
|
369
|
-
}
|
|
370
|
-
return formatForInkCli(lines.join('\n'));
|
|
371
|
-
}
|
|
372
|
-
catch (error) {
|
|
373
|
-
const errorMsg = `Failed to get context stats: ${error instanceof Error ? error.message : String(error)}`;
|
|
374
|
-
agent.logger.error(errorMsg);
|
|
375
|
-
return formatForInkCli(`❌ ${errorMsg}`);
|
|
376
|
-
}
|
|
377
|
-
},
|
|
378
|
-
},
|
|
379
|
-
{
|
|
380
|
-
name: 'copy',
|
|
381
|
-
description: 'Copy the last assistant response to clipboard',
|
|
382
|
-
usage: '/copy',
|
|
383
|
-
category: 'General',
|
|
384
|
-
aliases: ['cp'],
|
|
385
|
-
handler: async (_args, agent, ctx) => {
|
|
386
|
-
try {
|
|
387
|
-
const { sessionId } = ctx;
|
|
388
|
-
if (!sessionId) {
|
|
389
|
-
return formatForInkCli('❌ No active session');
|
|
390
|
-
}
|
|
391
|
-
// Get session history
|
|
392
|
-
const history = await agent.getSessionHistory(sessionId);
|
|
393
|
-
if (!history || history.length === 0) {
|
|
394
|
-
return formatForInkCli('❌ No messages in current session');
|
|
395
|
-
}
|
|
396
|
-
// Find the last assistant message
|
|
397
|
-
const lastAssistantMessage = [...history]
|
|
398
|
-
.reverse()
|
|
399
|
-
.find((msg) => msg.role === 'assistant');
|
|
400
|
-
if (!lastAssistantMessage) {
|
|
401
|
-
return formatForInkCli('❌ No assistant response to copy');
|
|
402
|
-
}
|
|
403
|
-
// Extract text content from the message
|
|
404
|
-
let textContent = '';
|
|
405
|
-
if (typeof lastAssistantMessage.content === 'string') {
|
|
406
|
-
textContent = lastAssistantMessage.content;
|
|
407
|
-
}
|
|
408
|
-
else if (Array.isArray(lastAssistantMessage.content)) {
|
|
409
|
-
// Handle multi-part content
|
|
410
|
-
textContent = lastAssistantMessage.content
|
|
411
|
-
.filter((part) => part.type === 'text')
|
|
412
|
-
.map((part) => part.text)
|
|
413
|
-
.join('\n');
|
|
414
|
-
}
|
|
415
|
-
if (!textContent) {
|
|
416
|
-
return formatForInkCli('❌ No text content to copy');
|
|
417
|
-
}
|
|
418
|
-
// Copy to clipboard
|
|
419
|
-
const success = await writeToClipboard(textContent);
|
|
420
|
-
if (success) {
|
|
421
|
-
const preview = textContent.length > 50
|
|
422
|
-
? textContent.substring(0, 50) + '...'
|
|
423
|
-
: textContent;
|
|
424
|
-
return formatForInkCli(`📋 Copied to clipboard (${textContent.length} chars)\n${preview.replace(/\n/g, ' ')}`);
|
|
425
|
-
}
|
|
426
|
-
else {
|
|
427
|
-
return formatForInkCli('❌ Failed to copy to clipboard');
|
|
428
|
-
}
|
|
429
|
-
}
|
|
430
|
-
catch (error) {
|
|
431
|
-
const errorMsg = `Failed to copy: ${error instanceof Error ? error.message : String(error)}`;
|
|
432
|
-
agent.logger.error(errorMsg);
|
|
433
|
-
return formatForInkCli(`❌ ${errorMsg}`);
|
|
434
|
-
}
|
|
435
|
-
},
|
|
436
|
-
},
|
|
437
|
-
{
|
|
438
|
-
name: 'shortcuts',
|
|
439
|
-
description: 'Show keyboard shortcuts',
|
|
440
|
-
usage: '/shortcuts',
|
|
441
|
-
category: 'General',
|
|
442
|
-
aliases: ['keys', 'hotkeys'],
|
|
443
|
-
handler: async (_args, _agent, _ctx) => {
|
|
444
|
-
const styledData = {
|
|
445
|
-
categories: [
|
|
446
|
-
{
|
|
447
|
-
name: 'Global',
|
|
448
|
-
shortcuts: [
|
|
449
|
-
{ keys: 'Ctrl+C', description: 'Clear input, then exit (press twice)' },
|
|
450
|
-
{ keys: 'Ctrl+T', description: 'Toggle todo list (show/hide todos)' },
|
|
451
|
-
{ keys: 'Escape', description: 'Cancel processing / close overlay' },
|
|
452
|
-
],
|
|
453
|
-
},
|
|
454
|
-
{
|
|
455
|
-
name: 'Input',
|
|
456
|
-
shortcuts: [
|
|
457
|
-
{ keys: 'Enter', description: 'Submit message' },
|
|
458
|
-
{ keys: 'Shift+Enter', description: 'New line (multi-line input)' },
|
|
459
|
-
{ keys: 'Up/Down', description: 'Navigate input history' },
|
|
460
|
-
{ keys: 'Ctrl+R', description: 'Search history (enter search mode)' },
|
|
461
|
-
{ keys: 'Tab', description: 'Autocomplete command' },
|
|
462
|
-
{ keys: 'Ctrl+U', description: 'Clear input line' },
|
|
463
|
-
{ keys: 'Ctrl+W', description: 'Delete word before cursor' },
|
|
464
|
-
{ keys: 'Ctrl+A', description: 'Move cursor to start' },
|
|
465
|
-
{ keys: 'Ctrl+E', description: 'Move cursor to end' },
|
|
466
|
-
],
|
|
467
|
-
},
|
|
468
|
-
{
|
|
469
|
-
name: 'History Search (after Ctrl+R)',
|
|
470
|
-
shortcuts: [
|
|
471
|
-
{ keys: 'Ctrl+R', description: 'Next older match' },
|
|
472
|
-
{ keys: 'Ctrl+E', description: 'Next newer match' },
|
|
473
|
-
{ keys: 'Enter', description: 'Accept and exit search' },
|
|
474
|
-
{ keys: 'Escape', description: 'Cancel search' },
|
|
475
|
-
],
|
|
476
|
-
},
|
|
477
|
-
{
|
|
478
|
-
name: 'Autocomplete & Selectors',
|
|
479
|
-
shortcuts: [
|
|
480
|
-
{ keys: 'Up/Down', description: 'Navigate options' },
|
|
481
|
-
{ keys: 'Enter', description: 'Select / execute' },
|
|
482
|
-
{ keys: 'Tab', description: 'Load command into input' },
|
|
483
|
-
{ keys: 'Escape', description: 'Close overlay' },
|
|
484
|
-
],
|
|
485
|
-
},
|
|
486
|
-
{
|
|
487
|
-
name: 'Tool Approval',
|
|
488
|
-
shortcuts: [
|
|
489
|
-
{ keys: 'y', description: 'Allow once' },
|
|
490
|
-
{ keys: 'a', description: 'Allow for session' },
|
|
491
|
-
{ keys: 'n', description: 'Deny' },
|
|
492
|
-
{ keys: 'Escape', description: 'Cancel' },
|
|
493
|
-
],
|
|
494
|
-
},
|
|
495
|
-
],
|
|
496
|
-
};
|
|
497
|
-
// Build fallback text
|
|
498
|
-
const fallbackLines = ['Keyboard Shortcuts:'];
|
|
499
|
-
for (const category of styledData.categories) {
|
|
500
|
-
fallbackLines.push(`\n${category.name}:`);
|
|
501
|
-
for (const shortcut of category.shortcuts) {
|
|
502
|
-
fallbackLines.push(` ${shortcut.keys.padEnd(14)} ${shortcut.description}`);
|
|
503
|
-
}
|
|
504
|
-
}
|
|
505
|
-
return CommandOutputHelper.styled('shortcuts', styledData, fallbackLines.join('\n'));
|
|
506
|
-
},
|
|
507
|
-
},
|
|
508
|
-
];
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* MCP Commands Module
|
|
3
|
-
*
|
|
4
|
-
* In interactive CLI, /mcp always shows the interactive MCP server list overlay.
|
|
5
|
-
* This command definition exists for autocomplete and help display.
|
|
6
|
-
*/
|
|
7
|
-
import type { CommandDefinition } from '../command-parser.js';
|
|
8
|
-
/**
|
|
9
|
-
* MCP management command definition.
|
|
10
|
-
* Handler is never called - mcp is in ALWAYS_OVERLAY and handled by McpServerList overlay.
|
|
11
|
-
*/
|
|
12
|
-
export declare const mcpCommands: CommandDefinition;
|
|
13
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/cli/commands/interactive-commands/mcp/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAG9D;;;GAGG;AACH,eAAO,MAAM,WAAW,EAAE,iBAMzB,CAAC"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* MCP Commands Module
|
|
3
|
-
*
|
|
4
|
-
* In interactive CLI, /mcp always shows the interactive MCP server list overlay.
|
|
5
|
-
* This command definition exists for autocomplete and help display.
|
|
6
|
-
*/
|
|
7
|
-
import { overlayOnlyHandler } from '../command-parser.js';
|
|
8
|
-
/**
|
|
9
|
-
* MCP management command definition.
|
|
10
|
-
* Handler is never called - mcp is in ALWAYS_OVERLAY and handled by McpServerList overlay.
|
|
11
|
-
*/
|
|
12
|
-
export const mcpCommands = {
|
|
13
|
-
name: 'mcp',
|
|
14
|
-
description: 'Manage MCP servers (interactive)',
|
|
15
|
-
usage: '/mcp',
|
|
16
|
-
category: 'MCP Management',
|
|
17
|
-
handler: overlayOnlyHandler,
|
|
18
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Model Commands Module
|
|
3
|
-
*
|
|
4
|
-
* In interactive CLI, /model always shows the interactive model selector overlay.
|
|
5
|
-
* This command definition exists for autocomplete and help display.
|
|
6
|
-
*/
|
|
7
|
-
import type { CommandDefinition } from '../command-parser.js';
|
|
8
|
-
/**
|
|
9
|
-
* Model management command definition.
|
|
10
|
-
* Handler is never called - model is in ALWAYS_OVERLAY and handled by ModelSelector overlay.
|
|
11
|
-
*/
|
|
12
|
-
export declare const modelCommands: CommandDefinition;
|
|
13
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/cli/commands/interactive-commands/model/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAG9D;;;GAGG;AACH,eAAO,MAAM,aAAa,EAAE,iBAO3B,CAAC"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Model Commands Module
|
|
3
|
-
*
|
|
4
|
-
* In interactive CLI, /model always shows the interactive model selector overlay.
|
|
5
|
-
* This command definition exists for autocomplete and help display.
|
|
6
|
-
*/
|
|
7
|
-
import { overlayOnlyHandler } from '../command-parser.js';
|
|
8
|
-
/**
|
|
9
|
-
* Model management command definition.
|
|
10
|
-
* Handler is never called - model is in ALWAYS_OVERLAY and handled by ModelSelector overlay.
|
|
11
|
-
*/
|
|
12
|
-
export const modelCommands = {
|
|
13
|
-
name: 'model',
|
|
14
|
-
description: 'Switch AI model (interactive selector)',
|
|
15
|
-
usage: '/model',
|
|
16
|
-
category: 'General',
|
|
17
|
-
aliases: ['m'],
|
|
18
|
-
handler: overlayOnlyHandler,
|
|
19
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Plugin Commands Module
|
|
3
|
-
*
|
|
4
|
-
* In interactive CLI, /plugin always shows the interactive plugin manager overlay.
|
|
5
|
-
* This command definition exists for autocomplete and help display.
|
|
6
|
-
*/
|
|
7
|
-
import type { CommandDefinition } from '../command-parser.js';
|
|
8
|
-
/**
|
|
9
|
-
* Plugin management command definition.
|
|
10
|
-
* Handler is never called - plugin is in ALWAYS_OVERLAY and handled by PluginManager overlay.
|
|
11
|
-
*/
|
|
12
|
-
export declare const pluginCommands: CommandDefinition;
|
|
13
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/cli/commands/interactive-commands/plugin/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAG9D;;;GAGG;AACH,eAAO,MAAM,cAAc,EAAE,iBAM5B,CAAC"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Plugin Commands Module
|
|
3
|
-
*
|
|
4
|
-
* In interactive CLI, /plugin always shows the interactive plugin manager overlay.
|
|
5
|
-
* This command definition exists for autocomplete and help display.
|
|
6
|
-
*/
|
|
7
|
-
import { overlayOnlyHandler } from '../command-parser.js';
|
|
8
|
-
/**
|
|
9
|
-
* Plugin management command definition.
|
|
10
|
-
* Handler is never called - plugin is in ALWAYS_OVERLAY and handled by PluginManager overlay.
|
|
11
|
-
*/
|
|
12
|
-
export const pluginCommands = {
|
|
13
|
-
name: 'plugin',
|
|
14
|
-
description: 'Manage plugins (interactive)',
|
|
15
|
-
usage: '/plugin',
|
|
16
|
-
category: 'Plugin Management',
|
|
17
|
-
handler: overlayOnlyHandler,
|
|
18
|
-
};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Prompt Commands Module
|
|
3
|
-
*
|
|
4
|
-
* This module defines prompt management slash commands for the Dexto CLI interface.
|
|
5
|
-
* These commands provide functionality for viewing and managing system prompts.
|
|
6
|
-
*
|
|
7
|
-
* Available Prompt Commands:
|
|
8
|
-
* - /sysprompt - Display the current system prompt
|
|
9
|
-
* - /prompts - List all available prompts (MCP + internal)
|
|
10
|
-
* - /<prompt-name> [args] - Direct prompt execution (auto-generated for each prompt)
|
|
11
|
-
*/
|
|
12
|
-
import type { DextoAgent } from '@dexto/core';
|
|
13
|
-
import type { CommandDefinition } from './command-parser.js';
|
|
14
|
-
/**
|
|
15
|
-
* Prompt management commands
|
|
16
|
-
*/
|
|
17
|
-
export declare const promptCommands: CommandDefinition[];
|
|
18
|
-
/**
|
|
19
|
-
* Get all dynamic prompt commands based on available prompts.
|
|
20
|
-
* Uses pre-computed commandName from PromptManager for collision handling.
|
|
21
|
-
* Filters out prompts with `userInvocable: false` as these are not intended
|
|
22
|
-
* for direct user invocation via slash commands.
|
|
23
|
-
*/
|
|
24
|
-
export declare function getDynamicPromptCommands(agent: DextoAgent): Promise<CommandDefinition[]>;
|
|
25
|
-
//# sourceMappingURL=prompt-commands.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"prompt-commands.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/interactive-commands/prompt-commands.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAc,MAAM,aAAa,CAAC;AAC1D,OAAO,KAAK,EAAE,iBAAiB,EAAwC,MAAM,qBAAqB,CAAC;AAKnG;;GAEG;AACH,eAAO,MAAM,cAAc,EAAE,iBAAiB,EAiI7C,CAAC;AA6IF;;;;;GAKG;AACH,wBAAsB,wBAAwB,CAAC,KAAK,EAAE,UAAU,GAAG,OAAO,CAAC,iBAAiB,EAAE,CAAC,CAiB9F"}
|