dexto 1.3.0 → 1.4.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 +25 -15
- package/dist/agents/agent-registry.json +9 -0
- package/dist/agents/coding-agent/coding-agent.yml +5 -0
- package/dist/agents/default-agent.yml +2 -2
- package/dist/api/server-hono.d.ts.map +1 -1
- package/dist/api/server-hono.js +39 -5
- package/dist/cli/cli-subscriber.d.ts.map +1 -1
- package/dist/cli/cli-subscriber.js +7 -1
- package/dist/cli/commands/helpers/formatters.d.ts.map +1 -1
- package/dist/cli/commands/helpers/formatters.js +2 -1
- package/dist/cli/commands/install.d.ts.map +1 -1
- package/dist/cli/commands/install.js +14 -40
- 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 +0 -15
- 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 +69 -52
- 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 +103 -74
- 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 +36 -32
- 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 +17 -3
- 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 +24 -3
- package/dist/cli/ink-cli/components/ApprovalPrompt.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/ApprovalPrompt.js +160 -45
- 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/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/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 +46 -8
- 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/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/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 +7 -2
- 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 +4 -2
- package/dist/cli/ink-cli/components/chat/ToolIcon.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/chat/ToolIcon.js +19 -5
- 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 +21 -0
- package/dist/cli/ink-cli/components/overlays/CustomModelWizard.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/CustomModelWizard.js +177 -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 +247 -24
- 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/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 +360 -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 +491 -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 +1156 -130
- 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 +86 -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 +188 -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 +674 -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 +222 -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 +54 -3
- package/dist/cli/ink-cli/utils/messageFormatting.d.ts.map +1 -1
- package/dist/cli/ink-cli/utils/messageFormatting.js +290 -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 +13 -0
- package/dist/cli/utils/options.d.ts.map +1 -1
- package/dist/cli/utils/options.js +0 -2
- package/dist/config/cli-overrides.d.ts +1 -1
- package/dist/config/cli-overrides.d.ts.map +1 -1
- package/dist/config/cli-overrides.js +5 -10
- package/dist/index.js +66 -48
- 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-BkwPkZpd.css +1 -0
- package/dist/webui/assets/index-D9u1XfyH.js +2025 -0
- package/dist/webui/assets/{tanstack-DgxBONJY.js → tanstack-Br79RQ-n.js} +1 -1
- package/dist/webui/index.html +3 -3
- package/package.json +16 -14
- 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 +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.yellow('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
|
+
};
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Model Commands Module
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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
|
+
* Always shows the interactive model selector overlay (handled by ALWAYS_OVERLAY)
|
|
9
11
|
*/
|
|
10
|
-
export
|
|
12
|
+
export declare const modelCommands: CommandDefinition;
|
|
11
13
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/cli/commands/interactive-commands/model/index.ts"],"names":[],"mappings":"AAAA
|
|
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,EAAwB,MAAM,sBAAsB,CAAC;AAEpF;;;GAGG;AACH,eAAO,MAAM,aAAa,EAAE,iBAW3B,CAAC"}
|
|
@@ -1,10 +1,22 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Model Commands Module
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
*
|
|
4
|
+
* In interactive CLI, /model always shows the interactive model selector overlay.
|
|
5
|
+
* This command definition exists for autocomplete and help display.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Model management command definition
|
|
9
|
+
* Always shows the interactive model selector overlay (handled by ALWAYS_OVERLAY)
|
|
9
10
|
*/
|
|
10
|
-
export
|
|
11
|
+
export const modelCommands = {
|
|
12
|
+
name: 'model',
|
|
13
|
+
description: 'Switch AI model (interactive selector)',
|
|
14
|
+
usage: '/model',
|
|
15
|
+
category: 'General',
|
|
16
|
+
aliases: ['m'],
|
|
17
|
+
handler: async () => {
|
|
18
|
+
// This handler is never called - model is in ALWAYS_OVERLAY
|
|
19
|
+
// which intercepts and shows the model selector overlay instead
|
|
20
|
+
return true;
|
|
21
|
+
},
|
|
22
|
+
};
|
|
@@ -9,14 +9,15 @@
|
|
|
9
9
|
* - /prompts - List all available prompts (MCP + internal)
|
|
10
10
|
* - /<prompt-name> [args] - Direct prompt execution (auto-generated for each prompt)
|
|
11
11
|
*/
|
|
12
|
-
import {
|
|
12
|
+
import type { DextoAgent } from '@dexto/core';
|
|
13
13
|
import type { CommandDefinition } from './command-parser.js';
|
|
14
14
|
/**
|
|
15
15
|
* Prompt management commands
|
|
16
16
|
*/
|
|
17
17
|
export declare const promptCommands: CommandDefinition[];
|
|
18
18
|
/**
|
|
19
|
-
* Get all dynamic prompt commands based on available prompts
|
|
19
|
+
* Get all dynamic prompt commands based on available prompts.
|
|
20
|
+
* Handles displayName collisions by prefixing with source (e.g., config:review).
|
|
20
21
|
*/
|
|
21
22
|
export declare function getDynamicPromptCommands(agent: DextoAgent): Promise<CommandDefinition[]>;
|
|
22
23
|
//# sourceMappingURL=prompt-commands.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prompt-commands.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/interactive-commands/prompt-commands.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,
|
|
1
|
+
{"version":3,"file":"prompt-commands.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/interactive-commands/prompt-commands.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,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,EA8L7C,CAAC;AAwFF;;;GAGG;AACH,wBAAsB,wBAAwB,CAAC,KAAK,EAAE,UAAU,GAAG,OAAO,CAAC,iBAAiB,EAAE,CAAC,CAwB9F"}
|