dexto 1.3.0 → 1.5.0
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/README.md +87 -22
- package/dist/agents/agent-registry.json +9 -0
- package/dist/agents/agent-template.yml +2 -2
- package/dist/agents/coding-agent/coding-agent.yml +27 -16
- package/dist/agents/database-agent/database-agent.yml +2 -2
- package/dist/agents/default-agent.yml +9 -7
- package/dist/agents/github-agent/github-agent.yml +2 -2
- package/dist/agents/product-name-researcher/product-name-researcher.yml +2 -2
- package/dist/agents/talk2pdf-agent/talk2pdf-agent.yml +2 -2
- package/dist/analytics/events.d.ts +13 -6
- package/dist/analytics/events.d.ts.map +1 -1
- package/dist/analytics/index.d.ts +1 -1
- package/dist/analytics/index.d.ts.map +1 -1
- package/dist/analytics/index.js +6 -2
- package/dist/api/server-hono.d.ts.map +1 -1
- package/dist/api/server-hono.js +65 -9
- package/dist/cli/cli-subscriber.d.ts +4 -0
- package/dist/cli/cli-subscriber.d.ts.map +1 -1
- package/dist/cli/cli-subscriber.js +47 -3
- package/dist/cli/commands/create-app.d.ts +16 -14
- package/dist/cli/commands/create-app.d.ts.map +1 -1
- package/dist/cli/commands/create-app.js +626 -102
- package/dist/cli/commands/create-image.d.ts +7 -0
- package/dist/cli/commands/create-image.d.ts.map +1 -0
- package/dist/cli/commands/create-image.js +201 -0
- package/dist/cli/commands/helpers/formatters.d.ts.map +1 -1
- package/dist/cli/commands/helpers/formatters.js +9 -8
- package/dist/cli/commands/index.d.ts +2 -1
- package/dist/cli/commands/index.d.ts.map +1 -1
- package/dist/cli/commands/index.js +2 -1
- package/dist/cli/commands/init-app.js +7 -7
- package/dist/cli/commands/install.d.ts +0 -3
- package/dist/cli/commands/install.d.ts.map +1 -1
- package/dist/cli/commands/install.js +19 -70
- package/dist/cli/commands/interactive-commands/command-parser.d.ts +17 -14
- package/dist/cli/commands/interactive-commands/command-parser.d.ts.map +1 -1
- package/dist/cli/commands/interactive-commands/command-parser.js +7 -22
- package/dist/cli/commands/interactive-commands/commands.d.ts +4 -4
- package/dist/cli/commands/interactive-commands/commands.d.ts.map +1 -1
- package/dist/cli/commands/interactive-commands/commands.js +34 -42
- package/dist/cli/commands/interactive-commands/documentation-commands.d.ts.map +1 -1
- package/dist/cli/commands/interactive-commands/documentation-commands.js +4 -7
- package/dist/cli/commands/interactive-commands/general-commands.d.ts.map +1 -1
- package/dist/cli/commands/interactive-commands/general-commands.js +159 -117
- package/dist/cli/commands/interactive-commands/mcp/index.d.ts +9 -3
- package/dist/cli/commands/interactive-commands/mcp/index.d.ts.map +1 -1
- package/dist/cli/commands/interactive-commands/mcp/index.js +18 -3
- package/dist/cli/commands/interactive-commands/model/index.d.ts +8 -6
- package/dist/cli/commands/interactive-commands/model/index.d.ts.map +1 -1
- package/dist/cli/commands/interactive-commands/model/index.js +18 -6
- package/dist/cli/commands/interactive-commands/prompt-commands.d.ts +3 -2
- package/dist/cli/commands/interactive-commands/prompt-commands.d.ts.map +1 -1
- package/dist/cli/commands/interactive-commands/prompt-commands.js +77 -60
- package/dist/cli/commands/interactive-commands/session/index.d.ts +7 -12
- package/dist/cli/commands/interactive-commands/session/index.d.ts.map +1 -1
- package/dist/cli/commands/interactive-commands/session/index.js +7 -14
- package/dist/cli/commands/interactive-commands/session/session-commands.d.ts +10 -24
- package/dist/cli/commands/interactive-commands/session/session-commands.d.ts.map +1 -1
- package/dist/cli/commands/interactive-commands/session/session-commands.js +16 -371
- package/dist/cli/commands/interactive-commands/system/system-commands.d.ts +1 -0
- package/dist/cli/commands/interactive-commands/system/system-commands.d.ts.map +1 -1
- package/dist/cli/commands/interactive-commands/system/system-commands.js +106 -77
- package/dist/cli/commands/interactive-commands/tool-commands.d.ts +1 -1
- package/dist/cli/commands/interactive-commands/tool-commands.d.ts.map +1 -1
- package/dist/cli/commands/interactive-commands/tool-commands.js +5 -62
- package/dist/cli/commands/interactive-commands/utils/command-output.d.ts +13 -17
- package/dist/cli/commands/interactive-commands/utils/command-output.d.ts.map +1 -1
- package/dist/cli/commands/interactive-commands/utils/command-output.js +18 -37
- package/dist/cli/commands/list-agents.d.ts +2 -2
- package/dist/cli/commands/list-agents.d.ts.map +1 -1
- package/dist/cli/commands/list-agents.js +38 -34
- package/dist/cli/commands/session-commands.js +16 -16
- package/dist/cli/commands/setup.d.ts +13 -5
- package/dist/cli/commands/setup.d.ts.map +1 -1
- package/dist/cli/commands/setup.js +860 -65
- package/dist/cli/commands/uninstall.d.ts.map +1 -1
- package/dist/cli/commands/uninstall.js +4 -6
- package/dist/cli/commands/which.d.ts.map +1 -1
- package/dist/cli/commands/which.js +18 -4
- package/dist/cli/ink-cli/InkCLIRefactored.d.ts +9 -22
- package/dist/cli/ink-cli/InkCLIRefactored.d.ts.map +1 -1
- package/dist/cli/ink-cli/InkCLIRefactored.js +50 -133
- package/dist/cli/ink-cli/components/ApprovalPrompt.d.ts +26 -3
- package/dist/cli/ink-cli/components/ApprovalPrompt.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/ApprovalPrompt.js +182 -45
- package/dist/cli/ink-cli/components/CustomInput.js +1 -1
- package/dist/cli/ink-cli/components/EditableMultiLineInput.js +4 -4
- package/dist/cli/ink-cli/components/ElicitationForm.d.ts +22 -0
- package/dist/cli/ink-cli/components/ElicitationForm.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/ElicitationForm.js +358 -0
- package/dist/cli/ink-cli/components/ErrorBoundary.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/ErrorBoundary.js +1 -1
- package/dist/cli/ink-cli/components/Footer.d.ts +16 -0
- package/dist/cli/ink-cli/components/Footer.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/Footer.js +27 -0
- package/dist/cli/ink-cli/components/HistorySearchBar.d.ts +17 -0
- package/dist/cli/ink-cli/components/HistorySearchBar.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/HistorySearchBar.js +8 -0
- package/dist/cli/ink-cli/components/MultiLineInput.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/MultiLineInput.js +3 -3
- package/dist/cli/ink-cli/components/ResourceAutocomplete.d.ts +15 -2
- package/dist/cli/ink-cli/components/ResourceAutocomplete.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/ResourceAutocomplete.js +126 -82
- package/dist/cli/ink-cli/components/SlashCommandAutocomplete.d.ts +15 -2
- package/dist/cli/ink-cli/components/SlashCommandAutocomplete.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/SlashCommandAutocomplete.js +228 -122
- package/dist/cli/ink-cli/components/StatusBar.d.ts +15 -2
- package/dist/cli/ink-cli/components/StatusBar.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/StatusBar.js +50 -10
- package/dist/cli/ink-cli/components/TextBufferInput.d.ts +52 -0
- package/dist/cli/ink-cli/components/TextBufferInput.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/TextBufferInput.js +471 -0
- package/dist/cli/ink-cli/components/base/BaseAutocomplete.js +4 -4
- package/dist/cli/ink-cli/components/base/BaseSelector.d.ts +11 -1
- package/dist/cli/ink-cli/components/base/BaseSelector.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/base/BaseSelector.js +90 -49
- package/dist/cli/ink-cli/components/chat/Footer.js +1 -1
- package/dist/cli/ink-cli/components/chat/Header.d.ts +1 -0
- package/dist/cli/ink-cli/components/chat/Header.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/chat/Header.js +6 -3
- package/dist/cli/ink-cli/components/chat/MessageItem.d.ts +3 -0
- package/dist/cli/ink-cli/components/chat/MessageItem.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/chat/MessageItem.js +95 -9
- package/dist/cli/ink-cli/components/chat/MessageList.js +1 -1
- package/dist/cli/ink-cli/components/chat/QueuedMessagesDisplay.d.ts +16 -0
- package/dist/cli/ink-cli/components/chat/QueuedMessagesDisplay.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/chat/QueuedMessagesDisplay.js +27 -0
- package/dist/cli/ink-cli/components/chat/ToolIcon.d.ts +5 -3
- package/dist/cli/ink-cli/components/chat/ToolIcon.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/chat/ToolIcon.js +21 -7
- package/dist/cli/ink-cli/components/chat/styled-boxes/ConfigBox.d.ts +10 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/ConfigBox.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/ConfigBox.js +6 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/HelpBox.d.ts +10 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/HelpBox.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/HelpBox.js +15 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/LogConfigBox.d.ts +10 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/LogConfigBox.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/LogConfigBox.js +9 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/SessionHistoryBox.d.ts +10 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/SessionHistoryBox.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/SessionHistoryBox.js +37 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/SessionListBox.d.ts +10 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/SessionListBox.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/SessionListBox.js +9 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/ShortcutsBox.d.ts +10 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/ShortcutsBox.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/ShortcutsBox.js +6 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/StatsBox.d.ts +10 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/StatsBox.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/StatsBox.js +29 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/StyledBox.d.ts +45 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/StyledBox.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/StyledBox.js +38 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/SyspromptBox.d.ts +10 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/SyspromptBox.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/SyspromptBox.js +6 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/index.d.ts +13 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/index.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/index.js +12 -0
- package/dist/cli/ink-cli/components/input/InputArea.d.ts +36 -8
- package/dist/cli/ink-cli/components/input/InputArea.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/input/InputArea.js +3 -3
- package/dist/cli/ink-cli/components/modes/AlternateBufferCLI.d.ts +25 -0
- package/dist/cli/ink-cli/components/modes/AlternateBufferCLI.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/modes/AlternateBufferCLI.js +166 -0
- package/dist/cli/ink-cli/components/modes/StaticCLI.d.ts +27 -0
- package/dist/cli/ink-cli/components/modes/StaticCLI.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/modes/StaticCLI.js +95 -0
- package/dist/cli/ink-cli/components/modes/index.d.ts +10 -0
- package/dist/cli/ink-cli/components/modes/index.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/modes/index.js +9 -0
- package/dist/cli/ink-cli/components/overlays/ApiKeyInput.d.ts +26 -0
- package/dist/cli/ink-cli/components/overlays/ApiKeyInput.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/ApiKeyInput.js +92 -0
- package/dist/cli/ink-cli/components/overlays/CustomModelWizard.d.ts +29 -0
- package/dist/cli/ink-cli/components/overlays/CustomModelWizard.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/CustomModelWizard.js +286 -0
- package/dist/cli/ink-cli/components/overlays/LogLevelSelector.d.ts +22 -0
- package/dist/cli/ink-cli/components/overlays/LogLevelSelector.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/LogLevelSelector.js +59 -0
- package/dist/cli/ink-cli/components/overlays/McpAddChoice.d.ts +22 -0
- package/dist/cli/ink-cli/components/overlays/McpAddChoice.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/McpAddChoice.js +59 -0
- package/dist/cli/ink-cli/components/overlays/McpAddSelector.d.ts +26 -0
- package/dist/cli/ink-cli/components/overlays/McpAddSelector.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/McpAddSelector.js +73 -0
- package/dist/cli/ink-cli/components/overlays/McpCustomTypeSelector.d.ts +21 -0
- package/dist/cli/ink-cli/components/overlays/McpCustomTypeSelector.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/McpCustomTypeSelector.js +51 -0
- package/dist/cli/ink-cli/components/overlays/McpCustomWizard.d.ts +29 -0
- package/dist/cli/ink-cli/components/overlays/McpCustomWizard.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/McpCustomWizard.js +215 -0
- package/dist/cli/ink-cli/components/overlays/McpRemoveSelector.d.ts +22 -0
- package/dist/cli/ink-cli/components/overlays/McpRemoveSelector.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/McpRemoveSelector.js +74 -0
- package/dist/cli/ink-cli/components/overlays/McpSelector.d.ts +21 -0
- package/dist/cli/ink-cli/components/overlays/McpSelector.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/McpSelector.js +52 -0
- package/dist/cli/ink-cli/components/overlays/McpServerActions.d.ts +28 -0
- package/dist/cli/ink-cli/components/overlays/McpServerActions.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/McpServerActions.js +84 -0
- package/dist/cli/ink-cli/components/overlays/McpServerList.d.ts +29 -0
- package/dist/cli/ink-cli/components/overlays/McpServerList.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/McpServerList.js +109 -0
- package/dist/cli/ink-cli/components/overlays/ModelSelectorRefactored.d.ts +15 -8
- package/dist/cli/ink-cli/components/overlays/ModelSelectorRefactored.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/overlays/ModelSelectorRefactored.js +400 -23
- package/dist/cli/ink-cli/components/overlays/PromptAddChoice.d.ts +22 -0
- package/dist/cli/ink-cli/components/overlays/PromptAddChoice.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/PromptAddChoice.js +52 -0
- package/dist/cli/ink-cli/components/overlays/PromptAddWizard.d.ts +29 -0
- package/dist/cli/ink-cli/components/overlays/PromptAddWizard.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/PromptAddWizard.js +166 -0
- package/dist/cli/ink-cli/components/overlays/PromptDeleteSelector.d.ts +27 -0
- package/dist/cli/ink-cli/components/overlays/PromptDeleteSelector.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/PromptDeleteSelector.js +119 -0
- package/dist/cli/ink-cli/components/overlays/PromptList.d.ts +33 -0
- package/dist/cli/ink-cli/components/overlays/PromptList.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/PromptList.js +144 -0
- package/dist/cli/ink-cli/components/overlays/SearchOverlay.d.ts +23 -0
- package/dist/cli/ink-cli/components/overlays/SearchOverlay.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/SearchOverlay.js +189 -0
- package/dist/cli/ink-cli/components/overlays/SessionSelectorRefactored.d.ts +7 -2
- package/dist/cli/ink-cli/components/overlays/SessionSelectorRefactored.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/overlays/SessionSelectorRefactored.js +19 -5
- package/dist/cli/ink-cli/components/overlays/SessionSubcommandSelector.d.ts +21 -0
- package/dist/cli/ink-cli/components/overlays/SessionSubcommandSelector.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/SessionSubcommandSelector.js +42 -0
- package/dist/cli/ink-cli/components/overlays/StreamSelector.d.ts +20 -0
- package/dist/cli/ink-cli/components/overlays/StreamSelector.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/StreamSelector.js +58 -0
- package/dist/cli/ink-cli/components/overlays/ToolBrowser.d.ts +25 -0
- package/dist/cli/ink-cli/components/overlays/ToolBrowser.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/ToolBrowser.js +400 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/LocalModelWizard.d.ts +25 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/LocalModelWizard.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/LocalModelWizard.js +609 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/index.d.ts +15 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/index.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/index.js +14 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/provider-config.d.ts +33 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/provider-config.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/provider-config.js +419 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/ApiKeyStep.d.ts +25 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/ApiKeyStep.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/ApiKeyStep.js +29 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/ProviderSelector.d.ts +17 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/ProviderSelector.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/ProviderSelector.js +11 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/SetupInfoBanner.d.ts +20 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/SetupInfoBanner.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/SetupInfoBanner.js +10 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/WizardStepInput.d.ts +30 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/WizardStepInput.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/WizardStepInput.js +13 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/index.d.ts +8 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/index.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/index.js +7 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/types.d.ts +79 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/types.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/types.js +38 -0
- package/dist/cli/ink-cli/components/renderers/DiffRenderer.d.ts +21 -0
- package/dist/cli/ink-cli/components/renderers/DiffRenderer.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/renderers/DiffRenderer.js +65 -0
- package/dist/cli/ink-cli/components/renderers/FilePreviewRenderer.d.ts +28 -0
- package/dist/cli/ink-cli/components/renderers/FilePreviewRenderer.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/renderers/FilePreviewRenderer.js +66 -0
- package/dist/cli/ink-cli/components/renderers/FileRenderer.d.ts +19 -0
- package/dist/cli/ink-cli/components/renderers/FileRenderer.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/renderers/FileRenderer.js +26 -0
- package/dist/cli/ink-cli/components/renderers/GenericRenderer.d.ts +21 -0
- package/dist/cli/ink-cli/components/renderers/GenericRenderer.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/renderers/GenericRenderer.js +26 -0
- package/dist/cli/ink-cli/components/renderers/SearchRenderer.d.ts +20 -0
- package/dist/cli/ink-cli/components/renderers/SearchRenderer.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/renderers/SearchRenderer.js +12 -0
- package/dist/cli/ink-cli/components/renderers/ShellRenderer.d.ts +21 -0
- package/dist/cli/ink-cli/components/renderers/ShellRenderer.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/renderers/ShellRenderer.js +25 -0
- package/dist/cli/ink-cli/components/renderers/diff-shared.d.ts +61 -0
- package/dist/cli/ink-cli/components/renderers/diff-shared.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/renderers/diff-shared.js +158 -0
- package/dist/cli/ink-cli/components/renderers/index.d.ts +28 -0
- package/dist/cli/ink-cli/components/renderers/index.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/renderers/index.js +36 -0
- package/dist/cli/ink-cli/components/shared/MarkdownText.d.ts +38 -0
- package/dist/cli/ink-cli/components/shared/MarkdownText.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/shared/MarkdownText.js +362 -0
- package/dist/cli/ink-cli/components/shared/VirtualizedList.d.ts +44 -0
- package/dist/cli/ink-cli/components/shared/VirtualizedList.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/shared/VirtualizedList.js +300 -0
- package/dist/cli/ink-cli/components/shared/text-buffer.d.ts +185 -0
- package/dist/cli/ink-cli/components/shared/text-buffer.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/shared/text-buffer.js +1338 -0
- package/dist/cli/ink-cli/constants/processingPhrases.d.ts +10 -0
- package/dist/cli/ink-cli/constants/processingPhrases.d.ts.map +1 -0
- package/dist/cli/ink-cli/constants/processingPhrases.js +64 -0
- package/dist/cli/ink-cli/constants/tips.d.ts +15 -0
- package/dist/cli/ink-cli/constants/tips.d.ts.map +1 -0
- package/dist/cli/ink-cli/constants/tips.js +53 -0
- package/dist/cli/ink-cli/containers/InputContainer.d.ts +42 -8
- package/dist/cli/ink-cli/containers/InputContainer.d.ts.map +1 -1
- package/dist/cli/ink-cli/containers/InputContainer.js +513 -85
- package/dist/cli/ink-cli/containers/OverlayContainer.d.ts +23 -5
- package/dist/cli/ink-cli/containers/OverlayContainer.d.ts.map +1 -1
- package/dist/cli/ink-cli/containers/OverlayContainer.js +1214 -132
- package/dist/cli/ink-cli/containers/index.d.ts +1 -1
- package/dist/cli/ink-cli/containers/index.d.ts.map +1 -1
- package/dist/cli/ink-cli/contexts/KeypressContext.d.ts +36 -0
- package/dist/cli/ink-cli/contexts/KeypressContext.d.ts.map +1 -0
- package/dist/cli/ink-cli/contexts/KeypressContext.js +461 -0
- package/dist/cli/ink-cli/contexts/MouseContext.d.ts +27 -0
- package/dist/cli/ink-cli/contexts/MouseContext.d.ts.map +1 -0
- package/dist/cli/ink-cli/contexts/MouseContext.js +102 -0
- package/dist/cli/ink-cli/contexts/ScrollProvider.d.ts +33 -0
- package/dist/cli/ink-cli/contexts/ScrollProvider.d.ts.map +1 -0
- package/dist/cli/ink-cli/contexts/ScrollProvider.js +170 -0
- package/dist/cli/ink-cli/contexts/index.d.ts +7 -0
- package/dist/cli/ink-cli/contexts/index.d.ts.map +1 -0
- package/dist/cli/ink-cli/contexts/index.js +6 -0
- package/dist/cli/ink-cli/hooks/index.d.ts +5 -0
- package/dist/cli/ink-cli/hooks/index.d.ts.map +1 -1
- package/dist/cli/ink-cli/hooks/index.js +6 -1
- package/dist/cli/ink-cli/hooks/useAgentEvents.d.ts +26 -9
- package/dist/cli/ink-cli/hooks/useAgentEvents.d.ts.map +1 -1
- package/dist/cli/ink-cli/hooks/useAgentEvents.js +90 -198
- package/dist/cli/ink-cli/hooks/useBatchedScroll.d.ts +14 -0
- package/dist/cli/ink-cli/hooks/useBatchedScroll.d.ts.map +1 -0
- package/dist/cli/ink-cli/hooks/useBatchedScroll.js +25 -0
- package/dist/cli/ink-cli/hooks/useCLIState.d.ts +50 -0
- package/dist/cli/ink-cli/hooks/useCLIState.d.ts.map +1 -0
- package/dist/cli/ink-cli/hooks/useCLIState.js +190 -0
- package/dist/cli/ink-cli/hooks/useElapsedTime.d.ts +24 -0
- package/dist/cli/ink-cli/hooks/useElapsedTime.d.ts.map +1 -0
- package/dist/cli/ink-cli/hooks/useElapsedTime.js +69 -0
- package/dist/cli/ink-cli/hooks/useHistorySearch.d.ts +61 -0
- package/dist/cli/ink-cli/hooks/useHistorySearch.d.ts.map +1 -0
- package/dist/cli/ink-cli/hooks/useHistorySearch.js +210 -0
- package/dist/cli/ink-cli/hooks/useInputOrchestrator.d.ts +136 -0
- package/dist/cli/ink-cli/hooks/useInputOrchestrator.d.ts.map +1 -0
- package/dist/cli/ink-cli/hooks/useInputOrchestrator.js +663 -0
- package/dist/cli/ink-cli/hooks/useKeyboardShortcuts.d.ts.map +1 -1
- package/dist/cli/ink-cli/hooks/useKeyboardShortcuts.js +7 -26
- package/dist/cli/ink-cli/hooks/useKeypress.d.ts +18 -0
- package/dist/cli/ink-cli/hooks/useKeypress.d.ts.map +1 -0
- package/dist/cli/ink-cli/hooks/useKeypress.js +26 -0
- package/dist/cli/ink-cli/hooks/usePhraseCycler.d.ts +30 -0
- package/dist/cli/ink-cli/hooks/usePhraseCycler.d.ts.map +1 -0
- package/dist/cli/ink-cli/hooks/usePhraseCycler.js +68 -0
- package/dist/cli/ink-cli/hooks/useStreaming.d.ts +19 -0
- package/dist/cli/ink-cli/hooks/useStreaming.d.ts.map +1 -0
- package/dist/cli/ink-cli/hooks/useStreaming.js +26 -0
- package/dist/cli/ink-cli/hooks/useTerminalSize.d.ts +14 -0
- package/dist/cli/ink-cli/hooks/useTerminalSize.d.ts.map +1 -0
- package/dist/cli/ink-cli/hooks/useTerminalSize.js +31 -0
- package/dist/cli/ink-cli/hooks/useTokenCounter.d.ts +42 -0
- package/dist/cli/ink-cli/hooks/useTokenCounter.d.ts.map +1 -0
- package/dist/cli/ink-cli/hooks/useTokenCounter.js +96 -0
- package/dist/cli/ink-cli/services/CommandService.d.ts +32 -1
- package/dist/cli/ink-cli/services/CommandService.d.ts.map +1 -1
- package/dist/cli/ink-cli/services/CommandService.js +36 -5
- package/dist/cli/ink-cli/services/InputService.d.ts +1 -5
- package/dist/cli/ink-cli/services/InputService.d.ts.map +1 -1
- package/dist/cli/ink-cli/services/InputService.js +1 -8
- package/dist/cli/ink-cli/services/index.d.ts +2 -1
- package/dist/cli/ink-cli/services/index.d.ts.map +1 -1
- package/dist/cli/ink-cli/services/index.js +2 -1
- package/dist/cli/ink-cli/services/processStream.d.ts +69 -0
- package/dist/cli/ink-cli/services/processStream.d.ts.map +1 -0
- package/dist/cli/ink-cli/services/processStream.js +742 -0
- package/dist/cli/ink-cli/state/actions.d.ts +30 -60
- package/dist/cli/ink-cli/state/actions.d.ts.map +1 -1
- package/dist/cli/ink-cli/state/actions.js +3 -0
- package/dist/cli/ink-cli/state/index.d.ts +5 -3
- package/dist/cli/ink-cli/state/index.d.ts.map +1 -1
- package/dist/cli/ink-cli/state/index.js +4 -3
- package/dist/cli/ink-cli/state/initialState.d.ts +4 -3
- package/dist/cli/ink-cli/state/initialState.d.ts.map +1 -1
- package/dist/cli/ink-cli/state/initialState.js +20 -4
- package/dist/cli/ink-cli/state/reducer.d.ts +3 -0
- package/dist/cli/ink-cli/state/reducer.d.ts.map +1 -1
- package/dist/cli/ink-cli/state/reducer.js +62 -168
- package/dist/cli/ink-cli/state/streaming-state.d.ts +27 -0
- package/dist/cli/ink-cli/state/streaming-state.d.ts.map +1 -0
- package/dist/cli/ink-cli/state/streaming-state.js +39 -0
- package/dist/cli/ink-cli/state/types.d.ts +223 -6
- package/dist/cli/ink-cli/state/types.d.ts.map +1 -1
- package/dist/cli/ink-cli/utils/bracketedPaste.d.ts +22 -0
- package/dist/cli/ink-cli/utils/bracketedPaste.d.ts.map +1 -0
- package/dist/cli/ink-cli/utils/bracketedPaste.js +27 -0
- package/dist/cli/ink-cli/utils/clipboardUtils.d.ts +49 -0
- package/dist/cli/ink-cli/utils/clipboardUtils.d.ts.map +1 -0
- package/dist/cli/ink-cli/utils/clipboardUtils.js +356 -0
- package/dist/cli/ink-cli/utils/commandOverlays.d.ts +33 -0
- package/dist/cli/ink-cli/utils/commandOverlays.d.ts.map +1 -0
- package/dist/cli/ink-cli/utils/commandOverlays.js +78 -0
- package/dist/cli/ink-cli/utils/debugLog.d.ts +38 -0
- package/dist/cli/ink-cli/utils/debugLog.d.ts.map +1 -0
- package/dist/cli/ink-cli/utils/debugLog.js +66 -0
- package/dist/cli/ink-cli/utils/index.d.ts +2 -1
- package/dist/cli/ink-cli/utils/index.d.ts.map +1 -1
- package/dist/cli/ink-cli/utils/index.js +3 -1
- package/dist/cli/ink-cli/utils/input.d.ts +25 -0
- package/dist/cli/ink-cli/utils/input.d.ts.map +1 -0
- package/dist/cli/ink-cli/utils/input.js +56 -0
- package/dist/cli/ink-cli/utils/inputParsing.d.ts +0 -9
- package/dist/cli/ink-cli/utils/inputParsing.d.ts.map +1 -1
- package/dist/cli/ink-cli/utils/inputParsing.js +0 -27
- package/dist/cli/ink-cli/utils/messageFormatting.d.ts +59 -3
- package/dist/cli/ink-cli/utils/messageFormatting.d.ts.map +1 -1
- package/dist/cli/ink-cli/utils/messageFormatting.js +348 -20
- package/dist/cli/ink-cli/utils/mouse.d.ts +61 -0
- package/dist/cli/ink-cli/utils/mouse.d.ts.map +1 -0
- package/dist/cli/ink-cli/utils/mouse.js +209 -0
- package/dist/cli/ink-cli/utils/streamSplitter.d.ts +44 -0
- package/dist/cli/ink-cli/utils/streamSplitter.d.ts.map +1 -0
- package/dist/cli/ink-cli/utils/streamSplitter.js +154 -0
- package/dist/cli/ink-cli/utils/textUtils.d.ts +63 -0
- package/dist/cli/ink-cli/utils/textUtils.d.ts.map +1 -0
- package/dist/cli/ink-cli/utils/textUtils.js +248 -0
- package/dist/cli/ink-cli/utils/toolUtils.d.ts +9 -0
- package/dist/cli/ink-cli/utils/toolUtils.d.ts.map +1 -0
- package/dist/cli/ink-cli/utils/toolUtils.js +15 -0
- package/dist/cli/utils/api-key-setup.d.ts +54 -4
- package/dist/cli/utils/api-key-setup.d.ts.map +1 -1
- package/dist/cli/utils/api-key-setup.js +433 -107
- package/dist/cli/utils/api-key-verification.d.ts +17 -0
- package/dist/cli/utils/api-key-verification.d.ts.map +1 -0
- package/dist/cli/utils/api-key-verification.js +211 -0
- package/dist/cli/utils/config-validation.d.ts +22 -2
- package/dist/cli/utils/config-validation.d.ts.map +1 -1
- package/dist/cli/utils/config-validation.js +354 -25
- package/dist/cli/utils/local-model-setup.d.ts +46 -0
- package/dist/cli/utils/local-model-setup.d.ts.map +1 -0
- package/dist/cli/utils/local-model-setup.js +662 -0
- package/dist/cli/utils/options.d.ts.map +1 -1
- package/dist/cli/utils/options.js +1 -3
- package/dist/cli/utils/prompt-helpers.d.ts +47 -0
- package/dist/cli/utils/prompt-helpers.d.ts.map +1 -0
- package/dist/cli/utils/prompt-helpers.js +66 -0
- package/dist/cli/utils/provider-setup.d.ts +66 -8
- package/dist/cli/utils/provider-setup.d.ts.map +1 -1
- package/dist/cli/utils/provider-setup.js +324 -84
- package/dist/cli/utils/scaffolding-utils.d.ts +76 -0
- package/dist/cli/utils/scaffolding-utils.d.ts.map +1 -0
- package/dist/cli/utils/scaffolding-utils.js +246 -0
- package/dist/cli/utils/setup-utils.d.ts +16 -0
- package/dist/cli/utils/setup-utils.d.ts.map +1 -1
- package/dist/cli/utils/setup-utils.js +72 -21
- package/dist/cli/utils/template-engine.d.ts +65 -0
- package/dist/cli/utils/template-engine.d.ts.map +1 -0
- package/dist/cli/utils/template-engine.js +1089 -0
- package/dist/config/cli-overrides.d.ts +45 -2
- package/dist/config/cli-overrides.d.ts.map +1 -1
- package/dist/config/cli-overrides.js +107 -10
- package/dist/index.js +379 -99
- package/dist/utils/agent-helpers.d.ts +95 -0
- package/dist/utils/agent-helpers.d.ts.map +1 -0
- package/dist/utils/agent-helpers.js +117 -0
- package/dist/webui/assets/index-8j-KMkX1.js +2054 -0
- package/dist/webui/assets/index-c_AX24V4.css +1 -0
- package/dist/webui/assets/{tanstack-DgxBONJY.js → tanstack-Br79RQ-n.js} +1 -1
- package/dist/webui/index.html +4 -10
- package/dist/webui/logos/aws-color.svg +1 -0
- package/dist/webui/logos/dexto/dexto_logo.svg +1 -1
- package/dist/webui/logos/dexto/dexto_logo_light.svg +6 -6
- package/dist/webui/logos/glama.svg +7 -0
- package/dist/webui/logos/litellm.svg +7 -0
- package/dist/webui/logos/openrouter.svg +1 -0
- package/package.json +18 -15
- package/dist/cli/commands/interactive-commands/index.d.ts +0 -63
- package/dist/cli/commands/interactive-commands/index.d.ts.map +0 -1
- package/dist/cli/commands/interactive-commands/index.js +0 -73
- package/dist/cli/commands/interactive-commands/mcp/mcp-add-utils.d.ts +0 -34
- package/dist/cli/commands/interactive-commands/mcp/mcp-add-utils.d.ts.map +0 -1
- package/dist/cli/commands/interactive-commands/mcp/mcp-add-utils.js +0 -178
- package/dist/cli/commands/interactive-commands/mcp/mcp-commands.d.ts +0 -9
- package/dist/cli/commands/interactive-commands/mcp/mcp-commands.d.ts.map +0 -1
- package/dist/cli/commands/interactive-commands/mcp/mcp-commands.js +0 -325
- package/dist/cli/commands/interactive-commands/model/model-commands.d.ts +0 -21
- package/dist/cli/commands/interactive-commands/model/model-commands.d.ts.map +0 -1
- package/dist/cli/commands/interactive-commands/model/model-commands.js +0 -190
- package/dist/cli/ink-cli/components/MultiLineTextInput.d.ts +0 -26
- package/dist/cli/ink-cli/components/MultiLineTextInput.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/MultiLineTextInput.js +0 -220
- package/dist/discord/bot.d.ts +0 -4
- package/dist/discord/bot.d.ts.map +0 -1
- package/dist/discord/bot.js +0 -193
- package/dist/telegram/bot.d.ts +0 -5
- package/dist/telegram/bot.d.ts.map +0 -1
- package/dist/telegram/bot.js +0 -251
- package/dist/webui/assets/index-DKq5Xng1.js +0 -687
- package/dist/webui/assets/index-D_0_GBu5.css +0 -1
|
@@ -1,19 +1,4 @@
|
|
|
1
1
|
import chalk from 'chalk';
|
|
2
|
-
/**
|
|
3
|
-
* Helper for command handlers to get the current session ID from CLI context.
|
|
4
|
-
* This is set by executeCommand() when invoked from InkCLI.
|
|
5
|
-
*
|
|
6
|
-
* Maintains separation of concerns:
|
|
7
|
-
* - InkCLI state manages current sessionId
|
|
8
|
-
* - executeCommand() stores it temporarily on agent for command access
|
|
9
|
-
* - Commands use this helper instead of removed agent.getCurrentSessionId()
|
|
10
|
-
*
|
|
11
|
-
* @param agent - DextoAgent instance with __cliSessionId set by executeCommand
|
|
12
|
-
* @returns Current session ID from CLI context, or null if not available
|
|
13
|
-
*/
|
|
14
|
-
export function getCLISessionId(agent) {
|
|
15
|
-
return agent.__cliSessionId || null;
|
|
16
|
-
}
|
|
17
2
|
/**
|
|
18
3
|
* Parse arguments respecting quotes and escape sequences
|
|
19
4
|
*/
|
|
@@ -105,12 +90,12 @@ export function getCommandSuggestions(partial, commands) {
|
|
|
105
90
|
export function formatCommandHelp(cmd, detailed = false) {
|
|
106
91
|
let help = chalk.cyan(`/${cmd.name}`) + ' - ' + cmd.description;
|
|
107
92
|
if (detailed) {
|
|
108
|
-
help += '\n' + chalk.
|
|
93
|
+
help += '\n' + chalk.gray(`Usage: ${cmd.usage}`);
|
|
109
94
|
if (cmd.aliases && cmd.aliases.length > 0) {
|
|
110
|
-
help += '\n' + chalk.
|
|
95
|
+
help += '\n' + chalk.gray(`Aliases: ${cmd.aliases.map((a) => `/${a}`).join(', ')}`);
|
|
111
96
|
}
|
|
112
97
|
if (cmd.subcommands && cmd.subcommands.length > 0) {
|
|
113
|
-
help += '\n' + chalk.
|
|
98
|
+
help += '\n' + chalk.gray('Subcommands:');
|
|
114
99
|
for (const sub of cmd.subcommands) {
|
|
115
100
|
help += '\n ' + chalk.cyan(`/${cmd.name} ${sub.name}`) + ' - ' + sub.description;
|
|
116
101
|
}
|
|
@@ -150,7 +135,7 @@ export function displayAllCommands(commands) {
|
|
|
150
135
|
for (const category of categoryOrder) {
|
|
151
136
|
const cmds = categories[category];
|
|
152
137
|
if (cmds && cmds.length > 0) {
|
|
153
|
-
console.log(chalk.bold.
|
|
138
|
+
console.log(chalk.bold.rgb(255, 165, 0)(`${category}:`));
|
|
154
139
|
for (const cmd of cmds) {
|
|
155
140
|
console.log(' ' + formatCommandHelp(cmd));
|
|
156
141
|
}
|
|
@@ -160,13 +145,13 @@ export function displayAllCommands(commands) {
|
|
|
160
145
|
// Display any uncategorized commands (fallback)
|
|
161
146
|
for (const [category, cmds] of Object.entries(categories)) {
|
|
162
147
|
if (!categoryOrder.includes(category) && cmds.length > 0) {
|
|
163
|
-
console.log(chalk.bold.
|
|
148
|
+
console.log(chalk.bold.rgb(255, 165, 0)(`${category}:`));
|
|
164
149
|
for (const cmd of cmds) {
|
|
165
150
|
console.log(' ' + formatCommandHelp(cmd));
|
|
166
151
|
}
|
|
167
152
|
console.log();
|
|
168
153
|
}
|
|
169
154
|
}
|
|
170
|
-
console.log(chalk.
|
|
171
|
-
console.log(chalk.
|
|
155
|
+
console.log(chalk.gray('💡 Tip: Use /help <command> for detailed help on any command'));
|
|
156
|
+
console.log(chalk.gray('💡 Tip: Type your message normally (without /) to chat with the AI\n'));
|
|
172
157
|
}
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
* This file serves as the integration layer that combines all modular commands
|
|
19
19
|
* into a single CLI_COMMANDS array for the command execution system.
|
|
20
20
|
*/
|
|
21
|
-
import {
|
|
22
|
-
import type { CommandDefinition } from './command-parser.js';
|
|
21
|
+
import type { DextoAgent } from '@dexto/core';
|
|
22
|
+
import type { CommandDefinition, CommandHandlerResult } from './command-parser.js';
|
|
23
23
|
/**
|
|
24
24
|
* Complete list of all available CLI commands.
|
|
25
25
|
* This array combines commands from all extracted modules to maintain
|
|
@@ -40,9 +40,9 @@ export declare const CLI_COMMANDS: CommandDefinition[];
|
|
|
40
40
|
* Execute a slash command
|
|
41
41
|
*
|
|
42
42
|
* @param sessionId - Session ID to use for agent.run() calls
|
|
43
|
-
* @returns
|
|
43
|
+
* @returns CommandHandlerResult - boolean, string, or StyledOutput
|
|
44
44
|
*/
|
|
45
|
-
export declare function executeCommand(command: string, args: string[], agent: DextoAgent, sessionId?: string): Promise<
|
|
45
|
+
export declare function executeCommand(command: string, args: string[], agent: DextoAgent, sessionId?: string): Promise<CommandHandlerResult>;
|
|
46
46
|
/**
|
|
47
47
|
* Get all available command definitions
|
|
48
48
|
* This is used by external systems that need to inspect available commands
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"commands.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/interactive-commands/commands.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"commands.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/interactive-commands/commands.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,KAAK,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAYnF;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,YAAY,EAAE,iBAAiB,EAAO,CAAC;AAqCpD;;;;;GAKG;AACH,wBAAsB,cAAc,CAChC,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,MAAM,EAAE,EACd,KAAK,EAAE,UAAU,EACjB,SAAS,CAAC,EAAE,MAAM,GACnB,OAAO,CAAC,oBAAoB,CAAC,CAyD/B;AAED;;;GAGG;AACH,wBAAgB,cAAc,IAAI,iBAAiB,EAAE,CAEpD"}
|
|
@@ -18,7 +18,6 @@
|
|
|
18
18
|
* This file serves as the integration layer that combines all modular commands
|
|
19
19
|
* into a single CLI_COMMANDS array for the command execution system.
|
|
20
20
|
*/
|
|
21
|
-
import { logger } from '@dexto/core';
|
|
22
21
|
// Import modular command definitions
|
|
23
22
|
import { generalCommands, createHelpCommand } from './general-commands.js';
|
|
24
23
|
import { searchCommand, resumeCommand } from './session/index.js';
|
|
@@ -45,18 +44,17 @@ import { documentationCommands } from './documentation-commands.js';
|
|
|
45
44
|
*/
|
|
46
45
|
export const CLI_COMMANDS = [];
|
|
47
46
|
// Build the commands array with proper help command that can access all commands
|
|
48
|
-
//
|
|
49
|
-
// Regular CLI (headless) has full subcommand access via `dexto session list`, etc.
|
|
47
|
+
// All commands here use interactive overlays - no text-based subcommands
|
|
50
48
|
const baseCommands = [
|
|
51
49
|
// General commands (without help)
|
|
52
50
|
...generalCommands,
|
|
53
|
-
// Session management
|
|
54
|
-
searchCommand, // /search - search
|
|
55
|
-
resumeCommand, // /resume -
|
|
56
|
-
// Model management
|
|
57
|
-
modelCommands, // /model -
|
|
58
|
-
// MCP server management
|
|
59
|
-
mcpCommands,
|
|
51
|
+
// Session management
|
|
52
|
+
searchCommand, // /search - opens search overlay
|
|
53
|
+
resumeCommand, // /resume - opens session selector overlay
|
|
54
|
+
// Model management
|
|
55
|
+
modelCommands, // /model - opens model selector overlay
|
|
56
|
+
// MCP server management
|
|
57
|
+
mcpCommands, // /mcp - opens MCP server list overlay
|
|
60
58
|
// Tool management commands
|
|
61
59
|
...toolCommands,
|
|
62
60
|
// Prompt management commands
|
|
@@ -74,60 +72,54 @@ CLI_COMMANDS.push(...baseCommands);
|
|
|
74
72
|
* Execute a slash command
|
|
75
73
|
*
|
|
76
74
|
* @param sessionId - Session ID to use for agent.run() calls
|
|
77
|
-
* @returns
|
|
75
|
+
* @returns CommandHandlerResult - boolean, string, or StyledOutput
|
|
78
76
|
*/
|
|
79
77
|
export async function executeCommand(command, args, agent, sessionId) {
|
|
80
|
-
//
|
|
81
|
-
|
|
82
|
-
agent.__cliSessionId = sessionId;
|
|
83
|
-
}
|
|
78
|
+
// Create command context with sessionId
|
|
79
|
+
const ctx = { sessionId: sessionId ?? null };
|
|
84
80
|
// Find the command (including aliases)
|
|
85
81
|
const cmd = CLI_COMMANDS.find((c) => c.name === command || (c.aliases && c.aliases.includes(command)));
|
|
86
82
|
if (cmd) {
|
|
87
83
|
try {
|
|
88
|
-
// Execute the handler with
|
|
89
|
-
const result = await cmd.handler(args, agent);
|
|
84
|
+
// Execute the handler with context
|
|
85
|
+
const result = await cmd.handler(args, agent, ctx);
|
|
90
86
|
// If handler returns a string, it's formatted output for ink-cli
|
|
91
87
|
// If it returns boolean, it's the old behavior (handled or not)
|
|
92
88
|
return result;
|
|
93
89
|
}
|
|
94
90
|
catch (error) {
|
|
95
91
|
const errorMsg = `❌ Error executing command /${command}:\n${error instanceof Error ? error.message : String(error)}`;
|
|
96
|
-
|
|
92
|
+
agent.logger.error(`Error executing command /${command}: ${error instanceof Error ? error.message : String(error)}`);
|
|
97
93
|
return errorMsg; // Return for ink-cli
|
|
98
94
|
}
|
|
99
95
|
}
|
|
100
|
-
// Command not found in static commands - check if it's a prompt
|
|
96
|
+
// Command not found in static commands - check if it's a dynamic prompt command
|
|
97
|
+
// Dynamic commands use displayName (e.g., "quick-start" instead of "config:quick-start")
|
|
101
98
|
try {
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
const errorMsg = `❌ Error executing prompt /${command}:\n${error instanceof Error ? error.message : String(error)}`;
|
|
118
|
-
console.error(errorMsg);
|
|
119
|
-
return errorMsg;
|
|
120
|
-
}
|
|
99
|
+
// Import prompt command creation dynamically to avoid circular dependencies
|
|
100
|
+
const { getDynamicPromptCommands } = await import('./prompt-commands.js');
|
|
101
|
+
const dynamicCommands = await getDynamicPromptCommands(agent);
|
|
102
|
+
// Commands are registered by displayName, so search by command name directly
|
|
103
|
+
const promptCmd = dynamicCommands.find((c) => c.name === command);
|
|
104
|
+
if (promptCmd) {
|
|
105
|
+
try {
|
|
106
|
+
const result = await promptCmd.handler(args, agent, ctx);
|
|
107
|
+
// Return the result directly - can be string, boolean, StyledOutput, or SendMessageMarker
|
|
108
|
+
return result;
|
|
109
|
+
}
|
|
110
|
+
catch (error) {
|
|
111
|
+
const errorMsg = `❌ Error executing prompt /${command}:\n${error instanceof Error ? error.message : String(error)}`;
|
|
112
|
+
agent.logger.error(`Error executing prompt /${command}: ${error instanceof Error ? error.message : String(error)}`);
|
|
113
|
+
return errorMsg;
|
|
121
114
|
}
|
|
122
115
|
}
|
|
123
116
|
}
|
|
124
117
|
catch (error) {
|
|
125
|
-
// If
|
|
126
|
-
logger.debug(`Failed to check
|
|
118
|
+
// If loading dynamic commands fails, continue to unknown command error
|
|
119
|
+
agent.logger.debug(`Failed to check dynamic commands for ${command}: ${error instanceof Error ? error.message : String(error)}`);
|
|
127
120
|
}
|
|
128
121
|
// Command not found and not a prompt
|
|
129
|
-
const errorMsg = `❌ Unknown command: /${command}\nType /
|
|
130
|
-
console.log(errorMsg);
|
|
122
|
+
const errorMsg = `❌ Unknown command: /${command}\nType / to see available commands, /prompts to add new ones`;
|
|
131
123
|
return errorMsg; // Return for ink-cli
|
|
132
124
|
}
|
|
133
125
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"documentation-commands.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/interactive-commands/documentation-commands.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;
|
|
1
|
+
{"version":3,"file":"documentation-commands.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/interactive-commands/documentation-commands.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,KAAK,EAAE,iBAAiB,EAAkB,MAAM,qBAAqB,CAAC;AAG7E;;GAEG;AACH,eAAO,MAAM,qBAAqB,EAAE,iBAAiB,EAkCpD,CAAC"}
|
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
* Available Documentation Commands:
|
|
8
8
|
* - /docs, /doc - Open Dexto documentation in browser
|
|
9
9
|
*/
|
|
10
|
-
import chalk from 'chalk';
|
|
11
10
|
import { CommandOutputHelper } from './utils/command-output.js';
|
|
12
11
|
/**
|
|
13
12
|
* Documentation commands
|
|
@@ -19,11 +18,10 @@ export const documentationCommands = [
|
|
|
19
18
|
usage: '/docs',
|
|
20
19
|
category: 'Documentation',
|
|
21
20
|
aliases: ['doc'],
|
|
22
|
-
handler: async (_args, _agent) => {
|
|
21
|
+
handler: async (_args, _agent, _ctx) => {
|
|
23
22
|
const docsUrl = 'https://docs.dexto.ai/docs/category/getting-started';
|
|
24
23
|
try {
|
|
25
24
|
const { spawn } = await import('child_process');
|
|
26
|
-
console.log(chalk.blue(`🌐 Opening Dexto documentation: ${docsUrl}`));
|
|
27
25
|
// Cross-platform browser opening
|
|
28
26
|
const command = process.platform === 'darwin'
|
|
29
27
|
? 'open'
|
|
@@ -31,11 +29,10 @@ export const documentationCommands = [
|
|
|
31
29
|
? 'start'
|
|
32
30
|
: 'xdg-open';
|
|
33
31
|
spawn(command, [docsUrl], { detached: true, stdio: 'ignore' });
|
|
34
|
-
return
|
|
32
|
+
return true; // Silent success
|
|
35
33
|
}
|
|
36
|
-
catch
|
|
37
|
-
|
|
38
|
-
return CommandOutputHelper.error(error, 'Failed to open documentation');
|
|
34
|
+
catch {
|
|
35
|
+
return CommandOutputHelper.error(new Error(`Could not open browser. Visit: ${docsUrl}`), 'Failed to open documentation');
|
|
39
36
|
}
|
|
40
37
|
},
|
|
41
38
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"general-commands.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/interactive-commands/general-commands.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAIH,OAAO,KAAK,EAAE,iBAAiB,
|
|
1
|
+
{"version":3,"file":"general-commands.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/interactive-commands/general-commands.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAIH,OAAO,KAAK,EAAE,iBAAiB,EAAwC,MAAM,qBAAqB,CAAC;AAMnG;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,cAAc,EAAE,MAAM,iBAAiB,EAAE,GAAG,iBAAiB,CAgC9F;AAED;;;GAGG;AACH,eAAO,MAAM,eAAe,EAAE,iBAAiB,EAiM9C,CAAC"}
|
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
* - /clear, /reset - Clear conversation history
|
|
11
11
|
*/
|
|
12
12
|
import chalk from 'chalk';
|
|
13
|
-
import { logger } from '@dexto/core';
|
|
14
|
-
import { displayAllCommands, formatCommandHelp } from './command-parser.js';
|
|
15
13
|
import { formatForInkCli } from './utils/format-output.js';
|
|
14
|
+
import { CommandOutputHelper } from './utils/command-output.js';
|
|
15
|
+
import { writeToClipboard } from '../../ink-cli/utils/clipboardUtils.js';
|
|
16
16
|
/**
|
|
17
17
|
* Creates the help command with access to all commands for display
|
|
18
18
|
*/
|
|
@@ -20,113 +20,25 @@ export function createHelpCommand(getAllCommands) {
|
|
|
20
20
|
return {
|
|
21
21
|
name: 'help',
|
|
22
22
|
description: 'Show help information',
|
|
23
|
-
usage: '/help
|
|
23
|
+
usage: '/help',
|
|
24
24
|
category: 'General',
|
|
25
25
|
aliases: ['h', '?'],
|
|
26
|
-
handler: async (
|
|
26
|
+
handler: async (_args, _agent, _ctx) => {
|
|
27
27
|
const allCommands = getAllCommands();
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
'General',
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
const categories = {};
|
|
41
|
-
// Initialize categories
|
|
42
|
-
for (const category of categoryOrder) {
|
|
43
|
-
categories[category] = [];
|
|
44
|
-
}
|
|
45
|
-
// Categorize commands using metadata
|
|
46
|
-
for (const cmd of allCommands) {
|
|
47
|
-
const category = cmd.category || 'General';
|
|
48
|
-
if (!categories[category]) {
|
|
49
|
-
categories[category] = [];
|
|
50
|
-
}
|
|
51
|
-
categories[category].push(cmd);
|
|
52
|
-
}
|
|
53
|
-
// Build output by category in order
|
|
54
|
-
for (const category of categoryOrder) {
|
|
55
|
-
const cmds = categories[category];
|
|
56
|
-
if (cmds && cmds.length > 0) {
|
|
57
|
-
outputLines.push(`${category}:`);
|
|
58
|
-
for (const cmd of cmds) {
|
|
59
|
-
const help = formatCommandHelp(cmd, false);
|
|
60
|
-
outputLines.push(' ' + formatForInkCli(help));
|
|
61
|
-
}
|
|
62
|
-
outputLines.push('');
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
// Display any uncategorized commands (fallback)
|
|
66
|
-
for (const [category, cmds] of Object.entries(categories)) {
|
|
67
|
-
if (!categoryOrder.includes(category) && cmds.length > 0) {
|
|
68
|
-
outputLines.push(`${category}:`);
|
|
69
|
-
for (const cmd of cmds) {
|
|
70
|
-
const help = formatCommandHelp(cmd, false);
|
|
71
|
-
outputLines.push(' ' + formatForInkCli(help));
|
|
72
|
-
}
|
|
73
|
-
outputLines.push('');
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
outputLines.push('💡 Tips:');
|
|
77
|
-
outputLines.push(' • Type your message normally (without /) to chat with the AI');
|
|
78
|
-
outputLines.push(' • Use /<prompt-name> to execute any listed prompt directly');
|
|
79
|
-
outputLines.push(' • Use /clear to start a new session (preserves old)');
|
|
80
|
-
outputLines.push(' • Press Ctrl+M to switch models, Ctrl+R to switch sessions');
|
|
81
|
-
outputLines.push(' • Use /search <query> to search across all sessions\n');
|
|
82
|
-
const output = outputLines.join('\n');
|
|
83
|
-
// Log for regular CLI (with chalk formatting)
|
|
84
|
-
displayAllCommands(allCommands);
|
|
85
|
-
return formatForInkCli(output);
|
|
86
|
-
}
|
|
87
|
-
const commandName = args[0];
|
|
88
|
-
if (!commandName) {
|
|
89
|
-
const output = '❌ No command specified';
|
|
90
|
-
console.log(chalk.red(output));
|
|
91
|
-
return formatForInkCli(output);
|
|
92
|
-
}
|
|
93
|
-
// Find the specific command to show detailed help
|
|
94
|
-
const cmd = allCommands.find((c) => c.name === commandName || (c.aliases && c.aliases.includes(commandName)));
|
|
95
|
-
if (cmd) {
|
|
96
|
-
const helpText = formatCommandHelp(cmd, true);
|
|
97
|
-
console.log(helpText);
|
|
98
|
-
return formatForInkCli(helpText);
|
|
99
|
-
}
|
|
100
|
-
// Redirect to contextual help for commands that have their own help subcommands
|
|
101
|
-
let output;
|
|
102
|
-
if (commandName === 'session') {
|
|
103
|
-
output =
|
|
104
|
-
'💡 For detailed session help, use:\n /session help\n\n This shows all session subcommands with examples and tips.';
|
|
105
|
-
console.log(chalk.blue('💡 For detailed session help, use:'));
|
|
106
|
-
console.log(` ${chalk.cyan('/session help')}`);
|
|
107
|
-
console.log(chalk.dim('\n This shows all session subcommands with examples and tips.'));
|
|
108
|
-
return formatForInkCli(output);
|
|
109
|
-
}
|
|
110
|
-
if (commandName === 'model' || commandName === 'm') {
|
|
111
|
-
output =
|
|
112
|
-
'💡 For detailed model help, use:\n /model help\n\n This shows all model subcommands with examples and usage.';
|
|
113
|
-
console.log(chalk.blue('💡 For detailed model help, use:'));
|
|
114
|
-
console.log(` ${chalk.cyan('/model help')}`);
|
|
115
|
-
console.log(chalk.dim('\n This shows all model subcommands with examples and usage.'));
|
|
116
|
-
return formatForInkCli(output);
|
|
117
|
-
}
|
|
118
|
-
if (commandName === 'mcp') {
|
|
119
|
-
output =
|
|
120
|
-
'💡 For detailed MCP help, use:\n /mcp help\n\n This shows all MCP subcommands with examples and usage.';
|
|
121
|
-
console.log(chalk.blue('💡 For detailed MCP help, use:'));
|
|
122
|
-
console.log(` ${chalk.cyan('/mcp help')}`);
|
|
123
|
-
console.log(chalk.dim('\n This shows all MCP subcommands with examples and usage.'));
|
|
124
|
-
return formatForInkCli(output);
|
|
28
|
+
// Build styled data for help
|
|
29
|
+
const styledData = {
|
|
30
|
+
commands: allCommands.map((cmd) => ({
|
|
31
|
+
name: cmd.name,
|
|
32
|
+
description: cmd.description,
|
|
33
|
+
category: cmd.category || 'General',
|
|
34
|
+
})),
|
|
35
|
+
};
|
|
36
|
+
// Build fallback text
|
|
37
|
+
const fallbackLines = ['Available Commands:'];
|
|
38
|
+
for (const cmd of allCommands) {
|
|
39
|
+
fallbackLines.push(` /${cmd.name} - ${cmd.description}`);
|
|
125
40
|
}
|
|
126
|
-
|
|
127
|
-
console.log(chalk.yellow(`❓ No help available for: ${commandName}`));
|
|
128
|
-
console.log(chalk.dim('Use /help to see all available commands'));
|
|
129
|
-
return formatForInkCli(output);
|
|
41
|
+
return CommandOutputHelper.styled('help', styledData, fallbackLines.join('\n'));
|
|
130
42
|
},
|
|
131
43
|
};
|
|
132
44
|
}
|
|
@@ -141,31 +53,161 @@ export const generalCommands = [
|
|
|
141
53
|
usage: '/exit',
|
|
142
54
|
category: 'General',
|
|
143
55
|
aliases: ['quit', 'q'],
|
|
144
|
-
handler: async (_args, _agent) => {
|
|
145
|
-
|
|
56
|
+
handler: async (_args, _agent, _ctx) => {
|
|
57
|
+
console.log(chalk.rgb(255, 165, 0)('Exiting AI CLI. Goodbye!'));
|
|
146
58
|
process.exit(0);
|
|
147
59
|
},
|
|
148
60
|
},
|
|
149
61
|
{
|
|
150
62
|
name: 'clear',
|
|
151
|
-
description: '
|
|
63
|
+
description: 'Clear context window (history preserved in DB, not sent to LLM)',
|
|
152
64
|
usage: '/clear',
|
|
153
65
|
category: 'General',
|
|
154
66
|
aliases: ['new'],
|
|
155
|
-
handler: async (_args, agent) => {
|
|
67
|
+
handler: async (_args, agent, ctx) => {
|
|
156
68
|
try {
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
69
|
+
const { sessionId } = ctx;
|
|
70
|
+
if (!sessionId) {
|
|
71
|
+
return formatForInkCli('⚠️ No active session to clear');
|
|
72
|
+
}
|
|
73
|
+
// Clear context window - adds a marker so filterCompacted skips prior messages
|
|
74
|
+
// History stays in DB for review, but LLM won't see it
|
|
75
|
+
await agent.clearContext(sessionId);
|
|
76
|
+
return formatForInkCli('🔄 Context cleared\n💡 Previous messages preserved in history but not sent to LLM.');
|
|
163
77
|
}
|
|
164
78
|
catch (error) {
|
|
165
|
-
const errorMsg = `Failed to
|
|
166
|
-
logger.error(errorMsg);
|
|
79
|
+
const errorMsg = `Failed to clear context: ${error instanceof Error ? error.message : String(error)}`;
|
|
80
|
+
agent.logger.error(errorMsg);
|
|
167
81
|
return formatForInkCli(`❌ ${errorMsg}`);
|
|
168
82
|
}
|
|
169
83
|
},
|
|
170
84
|
},
|
|
85
|
+
{
|
|
86
|
+
name: 'copy',
|
|
87
|
+
description: 'Copy the last assistant response to clipboard',
|
|
88
|
+
usage: '/copy',
|
|
89
|
+
category: 'General',
|
|
90
|
+
aliases: ['cp'],
|
|
91
|
+
handler: async (_args, agent, ctx) => {
|
|
92
|
+
try {
|
|
93
|
+
const { sessionId } = ctx;
|
|
94
|
+
if (!sessionId) {
|
|
95
|
+
return formatForInkCli('❌ No active session');
|
|
96
|
+
}
|
|
97
|
+
// Get session history
|
|
98
|
+
const history = await agent.getSessionHistory(sessionId);
|
|
99
|
+
if (!history || history.length === 0) {
|
|
100
|
+
return formatForInkCli('❌ No messages in current session');
|
|
101
|
+
}
|
|
102
|
+
// Find the last assistant message
|
|
103
|
+
const lastAssistantMessage = [...history]
|
|
104
|
+
.reverse()
|
|
105
|
+
.find((msg) => msg.role === 'assistant');
|
|
106
|
+
if (!lastAssistantMessage) {
|
|
107
|
+
return formatForInkCli('❌ No assistant response to copy');
|
|
108
|
+
}
|
|
109
|
+
// Extract text content from the message
|
|
110
|
+
let textContent = '';
|
|
111
|
+
if (typeof lastAssistantMessage.content === 'string') {
|
|
112
|
+
textContent = lastAssistantMessage.content;
|
|
113
|
+
}
|
|
114
|
+
else if (Array.isArray(lastAssistantMessage.content)) {
|
|
115
|
+
// Handle multi-part content
|
|
116
|
+
textContent = lastAssistantMessage.content
|
|
117
|
+
.filter((part) => part.type === 'text')
|
|
118
|
+
.map((part) => part.text)
|
|
119
|
+
.join('\n');
|
|
120
|
+
}
|
|
121
|
+
if (!textContent) {
|
|
122
|
+
return formatForInkCli('❌ No text content to copy');
|
|
123
|
+
}
|
|
124
|
+
// Copy to clipboard
|
|
125
|
+
const success = await writeToClipboard(textContent);
|
|
126
|
+
if (success) {
|
|
127
|
+
const preview = textContent.length > 50
|
|
128
|
+
? textContent.substring(0, 50) + '...'
|
|
129
|
+
: textContent;
|
|
130
|
+
return formatForInkCli(`📋 Copied to clipboard (${textContent.length} chars)\n${preview.replace(/\n/g, ' ')}`);
|
|
131
|
+
}
|
|
132
|
+
else {
|
|
133
|
+
return formatForInkCli('❌ Failed to copy to clipboard');
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
catch (error) {
|
|
137
|
+
const errorMsg = `Failed to copy: ${error instanceof Error ? error.message : String(error)}`;
|
|
138
|
+
agent.logger.error(errorMsg);
|
|
139
|
+
return formatForInkCli(`❌ ${errorMsg}`);
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
name: 'shortcuts',
|
|
145
|
+
description: 'Show keyboard shortcuts',
|
|
146
|
+
usage: '/shortcuts',
|
|
147
|
+
category: 'General',
|
|
148
|
+
aliases: ['keys', 'hotkeys'],
|
|
149
|
+
handler: async (_args, _agent, _ctx) => {
|
|
150
|
+
const styledData = {
|
|
151
|
+
categories: [
|
|
152
|
+
{
|
|
153
|
+
name: 'Global',
|
|
154
|
+
shortcuts: [
|
|
155
|
+
{ keys: 'Ctrl+C', description: 'Clear input, then exit (press twice)' },
|
|
156
|
+
{ keys: 'Escape', description: 'Cancel processing / close overlay' },
|
|
157
|
+
],
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
name: 'Input',
|
|
161
|
+
shortcuts: [
|
|
162
|
+
{ keys: 'Enter', description: 'Submit message' },
|
|
163
|
+
{ keys: 'Shift+Enter', description: 'New line (multi-line input)' },
|
|
164
|
+
{ keys: 'Up/Down', description: 'Navigate input history' },
|
|
165
|
+
{ keys: 'Ctrl+R', description: 'Search history (enter search mode)' },
|
|
166
|
+
{ keys: 'Tab', description: 'Autocomplete command' },
|
|
167
|
+
{ keys: 'Ctrl+U', description: 'Clear input line' },
|
|
168
|
+
{ keys: 'Ctrl+W', description: 'Delete word before cursor' },
|
|
169
|
+
{ keys: 'Ctrl+A', description: 'Move cursor to start' },
|
|
170
|
+
{ keys: 'Ctrl+E', description: 'Move cursor to end' },
|
|
171
|
+
],
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
name: 'History Search (after Ctrl+R)',
|
|
175
|
+
shortcuts: [
|
|
176
|
+
{ keys: 'Ctrl+R', description: 'Next older match' },
|
|
177
|
+
{ keys: 'Ctrl+E', description: 'Next newer match' },
|
|
178
|
+
{ keys: 'Enter', description: 'Accept and exit search' },
|
|
179
|
+
{ keys: 'Escape', description: 'Cancel search' },
|
|
180
|
+
],
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
name: 'Autocomplete & Selectors',
|
|
184
|
+
shortcuts: [
|
|
185
|
+
{ keys: 'Up/Down', description: 'Navigate options' },
|
|
186
|
+
{ keys: 'Enter', description: 'Select / execute' },
|
|
187
|
+
{ keys: 'Tab', description: 'Load command into input' },
|
|
188
|
+
{ keys: 'Escape', description: 'Close overlay' },
|
|
189
|
+
],
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
name: 'Tool Approval',
|
|
193
|
+
shortcuts: [
|
|
194
|
+
{ keys: 'y', description: 'Allow once' },
|
|
195
|
+
{ keys: 'a', description: 'Allow for session' },
|
|
196
|
+
{ keys: 'n', description: 'Deny' },
|
|
197
|
+
{ keys: 'Escape', description: 'Cancel' },
|
|
198
|
+
],
|
|
199
|
+
},
|
|
200
|
+
],
|
|
201
|
+
};
|
|
202
|
+
// Build fallback text
|
|
203
|
+
const fallbackLines = ['Keyboard Shortcuts:'];
|
|
204
|
+
for (const category of styledData.categories) {
|
|
205
|
+
fallbackLines.push(`\n${category.name}:`);
|
|
206
|
+
for (const shortcut of category.shortcuts) {
|
|
207
|
+
fallbackLines.push(` ${shortcut.keys.padEnd(14)} ${shortcut.description}`);
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
return CommandOutputHelper.styled('shortcuts', styledData, fallbackLines.join('\n'));
|
|
211
|
+
},
|
|
212
|
+
},
|
|
171
213
|
];
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* MCP Commands
|
|
2
|
+
* MCP Commands Module
|
|
3
3
|
*
|
|
4
|
-
*
|
|
4
|
+
* In interactive CLI, /mcp always shows the interactive MCP server list overlay.
|
|
5
|
+
* This command definition exists for autocomplete and help display.
|
|
5
6
|
*/
|
|
6
|
-
|
|
7
|
+
import type { CommandDefinition } from '../command-parser.js';
|
|
8
|
+
/**
|
|
9
|
+
* MCP management command definition
|
|
10
|
+
* Always shows the interactive MCP server list overlay (handled by ALWAYS_OVERLAY)
|
|
11
|
+
*/
|
|
12
|
+
export declare const mcpCommands: CommandDefinition;
|
|
7
13
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/cli/commands/interactive-commands/mcp/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/cli/commands/interactive-commands/mcp/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAAE,iBAAiB,EAAwC,MAAM,sBAAsB,CAAC;AAEpG;;;GAGG;AACH,eAAO,MAAM,WAAW,EAAE,iBAczB,CAAC"}
|
|
@@ -1,6 +1,21 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* MCP Commands
|
|
2
|
+
* MCP Commands Module
|
|
3
3
|
*
|
|
4
|
-
*
|
|
4
|
+
* In interactive CLI, /mcp always shows the interactive MCP server list overlay.
|
|
5
|
+
* This command definition exists for autocomplete and help display.
|
|
5
6
|
*/
|
|
6
|
-
|
|
7
|
+
/**
|
|
8
|
+
* MCP management command definition
|
|
9
|
+
* Always shows the interactive MCP server list overlay (handled by ALWAYS_OVERLAY)
|
|
10
|
+
*/
|
|
11
|
+
export const mcpCommands = {
|
|
12
|
+
name: 'mcp',
|
|
13
|
+
description: 'Manage MCP servers (interactive)',
|
|
14
|
+
usage: '/mcp',
|
|
15
|
+
category: 'MCP Management',
|
|
16
|
+
handler: async (_args, _agent, _ctx) => {
|
|
17
|
+
// This handler is never called - mcp is in ALWAYS_OVERLAY
|
|
18
|
+
// which intercepts and shows the MCP server list overlay instead
|
|
19
|
+
return true;
|
|
20
|
+
},
|
|
21
|
+
};
|