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
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Streaming state manager for CLI
|
|
3
|
+
*
|
|
4
|
+
* Simple module-level state that can be accessed by both React components
|
|
5
|
+
* and command handlers. Uses a subscription pattern for React integration.
|
|
6
|
+
*/
|
|
7
|
+
let streamingEnabled = false;
|
|
8
|
+
const listeners = new Set();
|
|
9
|
+
/**
|
|
10
|
+
* Get current streaming state
|
|
11
|
+
*/
|
|
12
|
+
export function isStreamingEnabled() {
|
|
13
|
+
return streamingEnabled;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Set streaming state and notify listeners
|
|
17
|
+
*/
|
|
18
|
+
export function setStreamingEnabled(enabled) {
|
|
19
|
+
if (streamingEnabled !== enabled) {
|
|
20
|
+
streamingEnabled = enabled;
|
|
21
|
+
listeners.forEach((listener) => listener(enabled));
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Toggle streaming state
|
|
26
|
+
* @returns New streaming state
|
|
27
|
+
*/
|
|
28
|
+
export function toggleStreaming() {
|
|
29
|
+
setStreamingEnabled(!streamingEnabled);
|
|
30
|
+
return streamingEnabled;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Subscribe to streaming state changes
|
|
34
|
+
* @returns Unsubscribe function
|
|
35
|
+
*/
|
|
36
|
+
export function subscribeToStreaming(listener) {
|
|
37
|
+
listeners.add(listener);
|
|
38
|
+
return () => listeners.delete(listener);
|
|
39
|
+
}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* Central type definitions for the CLI state machine
|
|
4
4
|
*/
|
|
5
5
|
import type { ApprovalRequest } from '../components/ApprovalPrompt.js';
|
|
6
|
+
import type { ToolDisplayData, ContentPart, McpConnectionStatus, McpServerType } from '@dexto/core';
|
|
6
7
|
/**
|
|
7
8
|
* Startup information displayed in CLI header
|
|
8
9
|
*/
|
|
@@ -13,14 +14,132 @@ export interface StartupInfo {
|
|
|
13
14
|
};
|
|
14
15
|
failedConnections: string[];
|
|
15
16
|
toolCount: number;
|
|
16
|
-
logFile: string;
|
|
17
|
+
logFile: string | null;
|
|
17
18
|
}
|
|
18
19
|
/**
|
|
19
20
|
* Tool call status for visual feedback
|
|
21
|
+
* - pending: Tool call received, checking if approval needed (static gray dot)
|
|
22
|
+
* - pending_approval: Waiting for user approval (static orange dot)
|
|
23
|
+
* - running: Actually executing (animated green/teal spinner)
|
|
24
|
+
* - finished: Completed (green dot success, red dot error)
|
|
20
25
|
*/
|
|
21
|
-
export type ToolStatus = 'running' | 'finished';
|
|
26
|
+
export type ToolStatus = 'pending' | 'pending_approval' | 'running' | 'finished';
|
|
27
|
+
/**
|
|
28
|
+
* Styled message types for rich command output
|
|
29
|
+
*/
|
|
30
|
+
export type StyledMessageType = 'config' | 'stats' | 'help' | 'session-list' | 'session-history' | 'log-config' | 'run-summary' | 'prompts' | 'sysprompt' | 'shortcuts';
|
|
31
|
+
/**
|
|
32
|
+
* Structured data for styled messages
|
|
33
|
+
*/
|
|
34
|
+
export interface ConfigStyledData {
|
|
35
|
+
configFilePath: string | null;
|
|
36
|
+
provider: string;
|
|
37
|
+
model: string;
|
|
38
|
+
maxTokens: number | null;
|
|
39
|
+
temperature: number | null;
|
|
40
|
+
toolConfirmationMode: string;
|
|
41
|
+
maxSessions: string;
|
|
42
|
+
sessionTTL: string;
|
|
43
|
+
mcpServers: string[];
|
|
44
|
+
promptsCount: number;
|
|
45
|
+
pluginsEnabled: string[];
|
|
46
|
+
}
|
|
47
|
+
export interface StatsStyledData {
|
|
48
|
+
sessions: {
|
|
49
|
+
total: number;
|
|
50
|
+
inMemory: number;
|
|
51
|
+
maxAllowed: number;
|
|
52
|
+
};
|
|
53
|
+
mcp: {
|
|
54
|
+
connected: number;
|
|
55
|
+
failed: number;
|
|
56
|
+
toolCount: number;
|
|
57
|
+
};
|
|
58
|
+
tokenUsage?: {
|
|
59
|
+
inputTokens: number;
|
|
60
|
+
outputTokens: number;
|
|
61
|
+
reasoningTokens: number;
|
|
62
|
+
cacheReadTokens: number;
|
|
63
|
+
cacheWriteTokens: number;
|
|
64
|
+
totalTokens: number;
|
|
65
|
+
};
|
|
66
|
+
estimatedCost?: number;
|
|
67
|
+
}
|
|
68
|
+
export interface HelpStyledData {
|
|
69
|
+
commands: Array<{
|
|
70
|
+
name: string;
|
|
71
|
+
description: string;
|
|
72
|
+
category: string;
|
|
73
|
+
}>;
|
|
74
|
+
}
|
|
75
|
+
export interface SessionListStyledData {
|
|
76
|
+
sessions: Array<{
|
|
77
|
+
id: string;
|
|
78
|
+
messageCount: number;
|
|
79
|
+
lastActive: string;
|
|
80
|
+
isCurrent: boolean;
|
|
81
|
+
}>;
|
|
82
|
+
total: number;
|
|
83
|
+
}
|
|
84
|
+
export interface SessionHistoryStyledData {
|
|
85
|
+
sessionId: string;
|
|
86
|
+
messages: Array<{
|
|
87
|
+
role: string;
|
|
88
|
+
content: string;
|
|
89
|
+
timestamp: string;
|
|
90
|
+
}>;
|
|
91
|
+
total: number;
|
|
92
|
+
}
|
|
93
|
+
export interface LogConfigStyledData {
|
|
94
|
+
currentLevel: string;
|
|
95
|
+
logFile: string | null;
|
|
96
|
+
availableLevels: string[];
|
|
97
|
+
}
|
|
98
|
+
export interface RunSummaryStyledData {
|
|
99
|
+
/** Duration in milliseconds */
|
|
100
|
+
durationMs: number;
|
|
101
|
+
/** Output tokens used */
|
|
102
|
+
outputTokens: number;
|
|
103
|
+
}
|
|
104
|
+
export interface PromptsStyledData {
|
|
105
|
+
mcpPrompts: Array<{
|
|
106
|
+
name: string;
|
|
107
|
+
title?: string;
|
|
108
|
+
description?: string;
|
|
109
|
+
args?: string[];
|
|
110
|
+
}>;
|
|
111
|
+
configPrompts: Array<{
|
|
112
|
+
name: string;
|
|
113
|
+
title?: string;
|
|
114
|
+
description?: string;
|
|
115
|
+
}>;
|
|
116
|
+
customPrompts: Array<{
|
|
117
|
+
name: string;
|
|
118
|
+
title?: string;
|
|
119
|
+
description?: string;
|
|
120
|
+
}>;
|
|
121
|
+
total: number;
|
|
122
|
+
}
|
|
123
|
+
export interface SysPromptStyledData {
|
|
124
|
+
content: string;
|
|
125
|
+
}
|
|
126
|
+
export interface ShortcutsStyledData {
|
|
127
|
+
categories: Array<{
|
|
128
|
+
name: string;
|
|
129
|
+
shortcuts: Array<{
|
|
130
|
+
keys: string;
|
|
131
|
+
description: string;
|
|
132
|
+
}>;
|
|
133
|
+
}>;
|
|
134
|
+
}
|
|
135
|
+
export type StyledData = ConfigStyledData | StatsStyledData | HelpStyledData | SessionListStyledData | SessionHistoryStyledData | LogConfigStyledData | RunSummaryStyledData | PromptsStyledData | SysPromptStyledData | ShortcutsStyledData;
|
|
22
136
|
/**
|
|
23
137
|
* Message in the chat interface
|
|
138
|
+
*
|
|
139
|
+
* TODO: Consolidate with InternalMessage from @dexto/core. Currently we have two
|
|
140
|
+
* message types: InternalMessage (core, ContentPart[] content) and Message (CLI,
|
|
141
|
+
* string content + UI fields). Consider extending InternalMessage or extracting
|
|
142
|
+
* shared role type to reduce duplication and type confusion.
|
|
24
143
|
*/
|
|
25
144
|
export interface Message {
|
|
26
145
|
id: string;
|
|
@@ -30,6 +149,19 @@ export interface Message {
|
|
|
30
149
|
isStreaming?: boolean;
|
|
31
150
|
toolResult?: string;
|
|
32
151
|
toolStatus?: ToolStatus;
|
|
152
|
+
isError?: boolean;
|
|
153
|
+
styledType?: StyledMessageType;
|
|
154
|
+
styledData?: StyledData;
|
|
155
|
+
/** True for split messages that continue a previous message (no role indicator) */
|
|
156
|
+
isContinuation?: boolean;
|
|
157
|
+
/** True for messages that are queued while agent is processing */
|
|
158
|
+
isQueued?: boolean;
|
|
159
|
+
/** Queue position (1-indexed) for queued messages */
|
|
160
|
+
queuePosition?: number;
|
|
161
|
+
/** Structured display data for tool-specific rendering (diffs, shell output, etc.) */
|
|
162
|
+
toolDisplayData?: ToolDisplayData;
|
|
163
|
+
/** Content parts for tool result rendering */
|
|
164
|
+
toolContent?: ContentPart[];
|
|
33
165
|
}
|
|
34
166
|
/**
|
|
35
167
|
* Streaming message state
|
|
@@ -38,6 +170,36 @@ export interface StreamingMessage {
|
|
|
38
170
|
id: string;
|
|
39
171
|
content: string;
|
|
40
172
|
}
|
|
173
|
+
/**
|
|
174
|
+
* Pending image attachment
|
|
175
|
+
*/
|
|
176
|
+
export interface PendingImage {
|
|
177
|
+
/** Unique ID for tracking/removal */
|
|
178
|
+
id: string;
|
|
179
|
+
/** Base64-encoded image data */
|
|
180
|
+
data: string;
|
|
181
|
+
/** MIME type of the image */
|
|
182
|
+
mimeType: string;
|
|
183
|
+
/** Placeholder text shown in input (e.g., "[Image 1]") */
|
|
184
|
+
placeholder: string;
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* Pasted content block (for collapsible paste feature)
|
|
188
|
+
*/
|
|
189
|
+
export interface PastedBlock {
|
|
190
|
+
/** Unique ID for tracking */
|
|
191
|
+
id: string;
|
|
192
|
+
/** Sequential number for display (Paste 1, Paste 2, etc.) */
|
|
193
|
+
number: number;
|
|
194
|
+
/** The full original pasted text */
|
|
195
|
+
fullText: string;
|
|
196
|
+
/** Line count for display */
|
|
197
|
+
lineCount: number;
|
|
198
|
+
/** Whether this block is currently collapsed */
|
|
199
|
+
isCollapsed: boolean;
|
|
200
|
+
/** The placeholder text when collapsed (e.g., "[Paste 1: ~32 lines]") */
|
|
201
|
+
placeholder: string;
|
|
202
|
+
}
|
|
41
203
|
/**
|
|
42
204
|
* Input state management
|
|
43
205
|
*/
|
|
@@ -45,11 +207,61 @@ export interface InputState {
|
|
|
45
207
|
value: string;
|
|
46
208
|
history: string[];
|
|
47
209
|
historyIndex: number;
|
|
210
|
+
draftBeforeHistory: string;
|
|
211
|
+
/** Pending images to be sent with the next message */
|
|
212
|
+
images: PendingImage[];
|
|
213
|
+
/** Pasted content blocks (collapsed/expandable) */
|
|
214
|
+
pastedBlocks: PastedBlock[];
|
|
215
|
+
/** Counter for generating sequential paste numbers */
|
|
216
|
+
pasteCounter: number;
|
|
48
217
|
}
|
|
49
218
|
/**
|
|
50
219
|
* Available overlay types
|
|
51
220
|
*/
|
|
52
|
-
export type OverlayType = 'none' | 'slash-autocomplete' | 'resource-autocomplete' | 'model-selector' | 'session-selector' | 'approval';
|
|
221
|
+
export type OverlayType = 'none' | 'slash-autocomplete' | 'resource-autocomplete' | 'model-selector' | 'custom-model-wizard' | 'session-selector' | 'mcp-server-list' | 'mcp-server-actions' | 'mcp-add-choice' | 'mcp-add-selector' | 'mcp-custom-type-selector' | 'mcp-custom-wizard' | 'log-level-selector' | 'stream-selector' | 'session-subcommand-selector' | 'api-key-input' | 'search' | 'approval' | 'tool-browser' | 'prompt-list' | 'prompt-add-choice' | 'prompt-add-wizard' | 'prompt-delete-selector';
|
|
222
|
+
/**
|
|
223
|
+
* MCP server type for custom wizard (null = not yet selected)
|
|
224
|
+
*/
|
|
225
|
+
export type McpWizardServerType = McpServerType | null;
|
|
226
|
+
/**
|
|
227
|
+
* MCP server info for actions screen
|
|
228
|
+
*/
|
|
229
|
+
export interface SelectedMcpServer {
|
|
230
|
+
name: string;
|
|
231
|
+
enabled: boolean;
|
|
232
|
+
status: McpConnectionStatus;
|
|
233
|
+
type: McpServerType;
|
|
234
|
+
}
|
|
235
|
+
/**
|
|
236
|
+
* Pending model switch info (when waiting for API key input)
|
|
237
|
+
*/
|
|
238
|
+
export interface PendingModelSwitch {
|
|
239
|
+
provider: string;
|
|
240
|
+
model: string;
|
|
241
|
+
displayName?: string;
|
|
242
|
+
}
|
|
243
|
+
/**
|
|
244
|
+
* Prompt add wizard state
|
|
245
|
+
*/
|
|
246
|
+
export type PromptAddScope = 'agent' | 'shared';
|
|
247
|
+
export interface PromptAddWizardState {
|
|
248
|
+
scope: PromptAddScope;
|
|
249
|
+
step: 'name' | 'title' | 'description' | 'content';
|
|
250
|
+
name: string;
|
|
251
|
+
title: string;
|
|
252
|
+
description: string;
|
|
253
|
+
content: string;
|
|
254
|
+
}
|
|
255
|
+
/**
|
|
256
|
+
* History search state (Ctrl+R reverse search)
|
|
257
|
+
*/
|
|
258
|
+
export interface HistorySearchState {
|
|
259
|
+
isActive: boolean;
|
|
260
|
+
query: string;
|
|
261
|
+
matchIndex: number;
|
|
262
|
+
originalInput: string;
|
|
263
|
+
lastMatch: string;
|
|
264
|
+
}
|
|
53
265
|
/**
|
|
54
266
|
* UI state management
|
|
55
267
|
*/
|
|
@@ -60,6 +272,13 @@ export interface UIState {
|
|
|
60
272
|
activeOverlay: OverlayType;
|
|
61
273
|
exitWarningShown: boolean;
|
|
62
274
|
exitWarningTimestamp: number | null;
|
|
275
|
+
mcpWizardServerType: McpWizardServerType;
|
|
276
|
+
copyModeEnabled: boolean;
|
|
277
|
+
pendingModelSwitch: PendingModelSwitch | null;
|
|
278
|
+
selectedMcpServer: SelectedMcpServer | null;
|
|
279
|
+
historySearch: HistorySearchState;
|
|
280
|
+
promptAddWizard: PromptAddWizardState | null;
|
|
281
|
+
autoApproveEdits: boolean;
|
|
63
282
|
}
|
|
64
283
|
/**
|
|
65
284
|
* Session state management
|
|
@@ -70,11 +289,9 @@ export interface SessionState {
|
|
|
70
289
|
modelName: string;
|
|
71
290
|
}
|
|
72
291
|
/**
|
|
73
|
-
* Root CLI state
|
|
292
|
+
* Root CLI state (UI state only - messages handled separately via useState)
|
|
74
293
|
*/
|
|
75
294
|
export interface CLIState {
|
|
76
|
-
messages: Message[];
|
|
77
|
-
streamingMessage: StreamingMessage | null;
|
|
78
295
|
input: InputState;
|
|
79
296
|
ui: UIState;
|
|
80
297
|
session: SessionState;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/cli/ink-cli/state/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/cli/ink-cli/state/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AACvE,OAAO,KAAK,EAAE,eAAe,EAAE,WAAW,EAAE,mBAAmB,EAAE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AAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,OAAO;IACpB,YAAY,EAAE,OAAO,CAAC;IACtB,YAAY,EAAE,OAAO,CAAC;IACtB,UAAU,EAAE,OAAO,CAAC;IACpB,aAAa,EAAE,WAAW,CAAC;IAC3B,gBAAgB,EAAE,OAAO,CAAC;IAC1B,oBAAoB,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,mBAAmB,EAAE,mBAAmB,CAAC;IACzC,eAAe,EAAE,OAAO,CAAC;IACzB,kBAAkB,EAAE,kBAAkB,GAAG,IAAI,CAAC;IAC9C,iBAAiB,EAAE,iBAAiB,GAAG,IAAI,CAAC;IAC5C,aAAa,EAAE,kBAAkB,CAAC;IAClC,eAAe,EAAE,oBAAoB,GAAG,IAAI,CAAC;IAC7C,gBAAgB,EAAE,OAAO,CAAC;CAC7B;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IACzB,EAAE,EAAE,MAAM,GAAG,IAAI,CAAC;IAClB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,SAAS,EAAE,MAAM,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,QAAQ;IAErB,KAAK,EAAE,UAAU,CAAC;IAGlB,EAAE,EAAE,OAAO,CAAC;IAGZ,OAAO,EAAE,YAAY,CAAC;IAGtB,QAAQ,EAAE,eAAe,GAAG,IAAI,CAAC;IACjC,aAAa,EAAE,eAAe,EAAE,CAAC;CACpC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Bracketed Paste Mode utilities
|
|
3
|
+
*
|
|
4
|
+
* Bracketed paste mode tells the terminal to wrap pasted text with escape sequences:
|
|
5
|
+
* - Start: \x1b[200~
|
|
6
|
+
* - End: \x1b[201~
|
|
7
|
+
*
|
|
8
|
+
* This allows the application to distinguish between typed and pasted text,
|
|
9
|
+
* which is essential for handling multi-line pastes correctly (e.g., not
|
|
10
|
+
* treating newlines in pasted text as submit commands).
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* Enable bracketed paste mode
|
|
14
|
+
* Call this when starting the CLI to ensure paste detection works
|
|
15
|
+
*/
|
|
16
|
+
export declare function enableBracketedPaste(): void;
|
|
17
|
+
/**
|
|
18
|
+
* Disable bracketed paste mode
|
|
19
|
+
* Call this when exiting the CLI to restore normal terminal behavior
|
|
20
|
+
*/
|
|
21
|
+
export declare function disableBracketedPaste(): void;
|
|
22
|
+
//# sourceMappingURL=bracketedPaste.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bracketedPaste.d.ts","sourceRoot":"","sources":["../../../../src/cli/ink-cli/utils/bracketedPaste.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAKH;;;GAGG;AACH,wBAAgB,oBAAoB,IAAI,IAAI,CAE3C;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,IAAI,IAAI,CAE5C"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Bracketed Paste Mode utilities
|
|
3
|
+
*
|
|
4
|
+
* Bracketed paste mode tells the terminal to wrap pasted text with escape sequences:
|
|
5
|
+
* - Start: \x1b[200~
|
|
6
|
+
* - End: \x1b[201~
|
|
7
|
+
*
|
|
8
|
+
* This allows the application to distinguish between typed and pasted text,
|
|
9
|
+
* which is essential for handling multi-line pastes correctly (e.g., not
|
|
10
|
+
* treating newlines in pasted text as submit commands).
|
|
11
|
+
*/
|
|
12
|
+
const ENABLE_BRACKETED_PASTE = '\x1b[?2004h';
|
|
13
|
+
const DISABLE_BRACKETED_PASTE = '\x1b[?2004l';
|
|
14
|
+
/**
|
|
15
|
+
* Enable bracketed paste mode
|
|
16
|
+
* Call this when starting the CLI to ensure paste detection works
|
|
17
|
+
*/
|
|
18
|
+
export function enableBracketedPaste() {
|
|
19
|
+
process.stdout.write(ENABLE_BRACKETED_PASTE);
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Disable bracketed paste mode
|
|
23
|
+
* Call this when exiting the CLI to restore normal terminal behavior
|
|
24
|
+
*/
|
|
25
|
+
export function disableBracketedPaste() {
|
|
26
|
+
process.stdout.write(DISABLE_BRACKETED_PASTE);
|
|
27
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Clipboard utilities for reading images from system clipboard
|
|
3
|
+
*
|
|
4
|
+
* Supports macOS, Windows/WSL, and Linux (Wayland + X11).
|
|
5
|
+
*
|
|
6
|
+
*/
|
|
7
|
+
export interface ClipboardImageContent {
|
|
8
|
+
/** Base64-encoded image data */
|
|
9
|
+
data: string;
|
|
10
|
+
/** MIME type of the image */
|
|
11
|
+
mimeType: string;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Read image from system clipboard
|
|
15
|
+
*
|
|
16
|
+
* @returns ClipboardImageContent if clipboard contains an image, undefined otherwise
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```typescript
|
|
20
|
+
* const image = await readClipboardImage();
|
|
21
|
+
* if (image) {
|
|
22
|
+
* console.log(`Got ${image.mimeType} image, ${image.data.length} bytes base64`);
|
|
23
|
+
* }
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
export declare function readClipboardImage(): Promise<ClipboardImageContent | undefined>;
|
|
27
|
+
/**
|
|
28
|
+
* Write text to system clipboard
|
|
29
|
+
*
|
|
30
|
+
* @param text - The text to copy to clipboard
|
|
31
|
+
* @returns true if successful, false otherwise
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* ```typescript
|
|
35
|
+
* const success = await writeToClipboard('Hello, World!');
|
|
36
|
+
* if (success) {
|
|
37
|
+
* console.log('Copied to clipboard');
|
|
38
|
+
* }
|
|
39
|
+
* ```
|
|
40
|
+
*/
|
|
41
|
+
export declare function writeToClipboard(text: string): Promise<boolean>;
|
|
42
|
+
/**
|
|
43
|
+
* Check if clipboard contains an image (without reading it)
|
|
44
|
+
* This is a lighter-weight check that doesn't require reading the full image data.
|
|
45
|
+
*
|
|
46
|
+
* @returns true if clipboard likely contains an image
|
|
47
|
+
*/
|
|
48
|
+
export declare function clipboardHasImage(): Promise<boolean>;
|
|
49
|
+
//# sourceMappingURL=clipboardUtils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clipboardUtils.d.ts","sourceRoot":"","sources":["../../../../src/cli/ink-cli/utils/clipboardUtils.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAQH,MAAM,WAAW,qBAAqB;IAClC,gCAAgC;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,6BAA6B;IAC7B,QAAQ,EAAE,MAAM,CAAC;CACpB;AA6MD;;;;;;;;;;;;GAYG;AACH,wBAAsB,kBAAkB,IAAI,OAAO,CAAC,qBAAqB,GAAG,SAAS,CAAC,CAgBrF;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAsB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CA4DrE;AAED;;;;;GAKG;AACH,wBAAsB,iBAAiB,IAAI,OAAO,CAAC,OAAO,CAAC,CA4D1D"}
|