dexto 1.3.0 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +87 -22
- package/dist/agents/agent-registry.json +9 -0
- package/dist/agents/agent-template.yml +2 -2
- package/dist/agents/coding-agent/coding-agent.yml +27 -16
- package/dist/agents/database-agent/database-agent.yml +2 -2
- package/dist/agents/default-agent.yml +9 -7
- package/dist/agents/github-agent/github-agent.yml +2 -2
- package/dist/agents/product-name-researcher/product-name-researcher.yml +2 -2
- package/dist/agents/talk2pdf-agent/talk2pdf-agent.yml +2 -2
- package/dist/analytics/events.d.ts +13 -6
- package/dist/analytics/events.d.ts.map +1 -1
- package/dist/analytics/index.d.ts +1 -1
- package/dist/analytics/index.d.ts.map +1 -1
- package/dist/analytics/index.js +6 -2
- package/dist/api/server-hono.d.ts.map +1 -1
- package/dist/api/server-hono.js +65 -9
- package/dist/cli/cli-subscriber.d.ts +4 -0
- package/dist/cli/cli-subscriber.d.ts.map +1 -1
- package/dist/cli/cli-subscriber.js +47 -3
- package/dist/cli/commands/create-app.d.ts +16 -14
- package/dist/cli/commands/create-app.d.ts.map +1 -1
- package/dist/cli/commands/create-app.js +626 -102
- package/dist/cli/commands/create-image.d.ts +7 -0
- package/dist/cli/commands/create-image.d.ts.map +1 -0
- package/dist/cli/commands/create-image.js +201 -0
- package/dist/cli/commands/helpers/formatters.d.ts.map +1 -1
- package/dist/cli/commands/helpers/formatters.js +9 -8
- package/dist/cli/commands/index.d.ts +2 -1
- package/dist/cli/commands/index.d.ts.map +1 -1
- package/dist/cli/commands/index.js +2 -1
- package/dist/cli/commands/init-app.js +7 -7
- package/dist/cli/commands/install.d.ts +0 -3
- package/dist/cli/commands/install.d.ts.map +1 -1
- package/dist/cli/commands/install.js +19 -70
- package/dist/cli/commands/interactive-commands/command-parser.d.ts +17 -14
- package/dist/cli/commands/interactive-commands/command-parser.d.ts.map +1 -1
- package/dist/cli/commands/interactive-commands/command-parser.js +7 -22
- package/dist/cli/commands/interactive-commands/commands.d.ts +4 -4
- package/dist/cli/commands/interactive-commands/commands.d.ts.map +1 -1
- package/dist/cli/commands/interactive-commands/commands.js +34 -42
- package/dist/cli/commands/interactive-commands/documentation-commands.d.ts.map +1 -1
- package/dist/cli/commands/interactive-commands/documentation-commands.js +4 -7
- package/dist/cli/commands/interactive-commands/general-commands.d.ts.map +1 -1
- package/dist/cli/commands/interactive-commands/general-commands.js +159 -117
- package/dist/cli/commands/interactive-commands/mcp/index.d.ts +9 -3
- package/dist/cli/commands/interactive-commands/mcp/index.d.ts.map +1 -1
- package/dist/cli/commands/interactive-commands/mcp/index.js +18 -3
- package/dist/cli/commands/interactive-commands/model/index.d.ts +8 -6
- package/dist/cli/commands/interactive-commands/model/index.d.ts.map +1 -1
- package/dist/cli/commands/interactive-commands/model/index.js +18 -6
- package/dist/cli/commands/interactive-commands/prompt-commands.d.ts +3 -2
- package/dist/cli/commands/interactive-commands/prompt-commands.d.ts.map +1 -1
- package/dist/cli/commands/interactive-commands/prompt-commands.js +77 -60
- package/dist/cli/commands/interactive-commands/session/index.d.ts +7 -12
- package/dist/cli/commands/interactive-commands/session/index.d.ts.map +1 -1
- package/dist/cli/commands/interactive-commands/session/index.js +7 -14
- package/dist/cli/commands/interactive-commands/session/session-commands.d.ts +10 -24
- package/dist/cli/commands/interactive-commands/session/session-commands.d.ts.map +1 -1
- package/dist/cli/commands/interactive-commands/session/session-commands.js +16 -371
- package/dist/cli/commands/interactive-commands/system/system-commands.d.ts +1 -0
- package/dist/cli/commands/interactive-commands/system/system-commands.d.ts.map +1 -1
- package/dist/cli/commands/interactive-commands/system/system-commands.js +106 -77
- package/dist/cli/commands/interactive-commands/tool-commands.d.ts +1 -1
- package/dist/cli/commands/interactive-commands/tool-commands.d.ts.map +1 -1
- package/dist/cli/commands/interactive-commands/tool-commands.js +5 -62
- package/dist/cli/commands/interactive-commands/utils/command-output.d.ts +13 -17
- package/dist/cli/commands/interactive-commands/utils/command-output.d.ts.map +1 -1
- package/dist/cli/commands/interactive-commands/utils/command-output.js +18 -37
- package/dist/cli/commands/list-agents.d.ts +2 -2
- package/dist/cli/commands/list-agents.d.ts.map +1 -1
- package/dist/cli/commands/list-agents.js +38 -34
- package/dist/cli/commands/session-commands.js +16 -16
- package/dist/cli/commands/setup.d.ts +13 -5
- package/dist/cli/commands/setup.d.ts.map +1 -1
- package/dist/cli/commands/setup.js +860 -65
- package/dist/cli/commands/uninstall.d.ts.map +1 -1
- package/dist/cli/commands/uninstall.js +4 -6
- package/dist/cli/commands/which.d.ts.map +1 -1
- package/dist/cli/commands/which.js +18 -4
- package/dist/cli/ink-cli/InkCLIRefactored.d.ts +9 -22
- package/dist/cli/ink-cli/InkCLIRefactored.d.ts.map +1 -1
- package/dist/cli/ink-cli/InkCLIRefactored.js +50 -133
- package/dist/cli/ink-cli/components/ApprovalPrompt.d.ts +26 -3
- package/dist/cli/ink-cli/components/ApprovalPrompt.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/ApprovalPrompt.js +182 -45
- package/dist/cli/ink-cli/components/CustomInput.js +1 -1
- package/dist/cli/ink-cli/components/EditableMultiLineInput.js +4 -4
- package/dist/cli/ink-cli/components/ElicitationForm.d.ts +22 -0
- package/dist/cli/ink-cli/components/ElicitationForm.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/ElicitationForm.js +358 -0
- package/dist/cli/ink-cli/components/ErrorBoundary.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/ErrorBoundary.js +1 -1
- package/dist/cli/ink-cli/components/Footer.d.ts +16 -0
- package/dist/cli/ink-cli/components/Footer.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/Footer.js +27 -0
- package/dist/cli/ink-cli/components/HistorySearchBar.d.ts +17 -0
- package/dist/cli/ink-cli/components/HistorySearchBar.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/HistorySearchBar.js +8 -0
- package/dist/cli/ink-cli/components/MultiLineInput.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/MultiLineInput.js +3 -3
- package/dist/cli/ink-cli/components/ResourceAutocomplete.d.ts +15 -2
- package/dist/cli/ink-cli/components/ResourceAutocomplete.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/ResourceAutocomplete.js +126 -82
- package/dist/cli/ink-cli/components/SlashCommandAutocomplete.d.ts +15 -2
- package/dist/cli/ink-cli/components/SlashCommandAutocomplete.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/SlashCommandAutocomplete.js +228 -122
- package/dist/cli/ink-cli/components/StatusBar.d.ts +15 -2
- package/dist/cli/ink-cli/components/StatusBar.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/StatusBar.js +50 -10
- package/dist/cli/ink-cli/components/TextBufferInput.d.ts +52 -0
- package/dist/cli/ink-cli/components/TextBufferInput.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/TextBufferInput.js +471 -0
- package/dist/cli/ink-cli/components/base/BaseAutocomplete.js +4 -4
- package/dist/cli/ink-cli/components/base/BaseSelector.d.ts +11 -1
- package/dist/cli/ink-cli/components/base/BaseSelector.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/base/BaseSelector.js +90 -49
- package/dist/cli/ink-cli/components/chat/Footer.js +1 -1
- package/dist/cli/ink-cli/components/chat/Header.d.ts +1 -0
- package/dist/cli/ink-cli/components/chat/Header.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/chat/Header.js +6 -3
- package/dist/cli/ink-cli/components/chat/MessageItem.d.ts +3 -0
- package/dist/cli/ink-cli/components/chat/MessageItem.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/chat/MessageItem.js +95 -9
- package/dist/cli/ink-cli/components/chat/MessageList.js +1 -1
- package/dist/cli/ink-cli/components/chat/QueuedMessagesDisplay.d.ts +16 -0
- package/dist/cli/ink-cli/components/chat/QueuedMessagesDisplay.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/chat/QueuedMessagesDisplay.js +27 -0
- package/dist/cli/ink-cli/components/chat/ToolIcon.d.ts +5 -3
- package/dist/cli/ink-cli/components/chat/ToolIcon.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/chat/ToolIcon.js +21 -7
- package/dist/cli/ink-cli/components/chat/styled-boxes/ConfigBox.d.ts +10 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/ConfigBox.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/ConfigBox.js +6 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/HelpBox.d.ts +10 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/HelpBox.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/HelpBox.js +15 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/LogConfigBox.d.ts +10 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/LogConfigBox.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/LogConfigBox.js +9 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/SessionHistoryBox.d.ts +10 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/SessionHistoryBox.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/SessionHistoryBox.js +37 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/SessionListBox.d.ts +10 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/SessionListBox.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/SessionListBox.js +9 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/ShortcutsBox.d.ts +10 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/ShortcutsBox.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/ShortcutsBox.js +6 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/StatsBox.d.ts +10 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/StatsBox.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/StatsBox.js +29 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/StyledBox.d.ts +45 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/StyledBox.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/StyledBox.js +38 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/SyspromptBox.d.ts +10 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/SyspromptBox.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/SyspromptBox.js +6 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/index.d.ts +13 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/index.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/index.js +12 -0
- package/dist/cli/ink-cli/components/input/InputArea.d.ts +36 -8
- package/dist/cli/ink-cli/components/input/InputArea.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/input/InputArea.js +3 -3
- package/dist/cli/ink-cli/components/modes/AlternateBufferCLI.d.ts +25 -0
- package/dist/cli/ink-cli/components/modes/AlternateBufferCLI.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/modes/AlternateBufferCLI.js +166 -0
- package/dist/cli/ink-cli/components/modes/StaticCLI.d.ts +27 -0
- package/dist/cli/ink-cli/components/modes/StaticCLI.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/modes/StaticCLI.js +95 -0
- package/dist/cli/ink-cli/components/modes/index.d.ts +10 -0
- package/dist/cli/ink-cli/components/modes/index.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/modes/index.js +9 -0
- package/dist/cli/ink-cli/components/overlays/ApiKeyInput.d.ts +26 -0
- package/dist/cli/ink-cli/components/overlays/ApiKeyInput.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/ApiKeyInput.js +92 -0
- package/dist/cli/ink-cli/components/overlays/CustomModelWizard.d.ts +29 -0
- package/dist/cli/ink-cli/components/overlays/CustomModelWizard.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/CustomModelWizard.js +286 -0
- package/dist/cli/ink-cli/components/overlays/LogLevelSelector.d.ts +22 -0
- package/dist/cli/ink-cli/components/overlays/LogLevelSelector.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/LogLevelSelector.js +59 -0
- package/dist/cli/ink-cli/components/overlays/McpAddChoice.d.ts +22 -0
- package/dist/cli/ink-cli/components/overlays/McpAddChoice.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/McpAddChoice.js +59 -0
- package/dist/cli/ink-cli/components/overlays/McpAddSelector.d.ts +26 -0
- package/dist/cli/ink-cli/components/overlays/McpAddSelector.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/McpAddSelector.js +73 -0
- package/dist/cli/ink-cli/components/overlays/McpCustomTypeSelector.d.ts +21 -0
- package/dist/cli/ink-cli/components/overlays/McpCustomTypeSelector.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/McpCustomTypeSelector.js +51 -0
- package/dist/cli/ink-cli/components/overlays/McpCustomWizard.d.ts +29 -0
- package/dist/cli/ink-cli/components/overlays/McpCustomWizard.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/McpCustomWizard.js +215 -0
- package/dist/cli/ink-cli/components/overlays/McpRemoveSelector.d.ts +22 -0
- package/dist/cli/ink-cli/components/overlays/McpRemoveSelector.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/McpRemoveSelector.js +74 -0
- package/dist/cli/ink-cli/components/overlays/McpSelector.d.ts +21 -0
- package/dist/cli/ink-cli/components/overlays/McpSelector.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/McpSelector.js +52 -0
- package/dist/cli/ink-cli/components/overlays/McpServerActions.d.ts +28 -0
- package/dist/cli/ink-cli/components/overlays/McpServerActions.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/McpServerActions.js +84 -0
- package/dist/cli/ink-cli/components/overlays/McpServerList.d.ts +29 -0
- package/dist/cli/ink-cli/components/overlays/McpServerList.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/McpServerList.js +109 -0
- package/dist/cli/ink-cli/components/overlays/ModelSelectorRefactored.d.ts +15 -8
- package/dist/cli/ink-cli/components/overlays/ModelSelectorRefactored.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/overlays/ModelSelectorRefactored.js +400 -23
- package/dist/cli/ink-cli/components/overlays/PromptAddChoice.d.ts +22 -0
- package/dist/cli/ink-cli/components/overlays/PromptAddChoice.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/PromptAddChoice.js +52 -0
- package/dist/cli/ink-cli/components/overlays/PromptAddWizard.d.ts +29 -0
- package/dist/cli/ink-cli/components/overlays/PromptAddWizard.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/PromptAddWizard.js +166 -0
- package/dist/cli/ink-cli/components/overlays/PromptDeleteSelector.d.ts +27 -0
- package/dist/cli/ink-cli/components/overlays/PromptDeleteSelector.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/PromptDeleteSelector.js +119 -0
- package/dist/cli/ink-cli/components/overlays/PromptList.d.ts +33 -0
- package/dist/cli/ink-cli/components/overlays/PromptList.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/PromptList.js +144 -0
- package/dist/cli/ink-cli/components/overlays/SearchOverlay.d.ts +23 -0
- package/dist/cli/ink-cli/components/overlays/SearchOverlay.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/SearchOverlay.js +189 -0
- package/dist/cli/ink-cli/components/overlays/SessionSelectorRefactored.d.ts +7 -2
- package/dist/cli/ink-cli/components/overlays/SessionSelectorRefactored.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/overlays/SessionSelectorRefactored.js +19 -5
- package/dist/cli/ink-cli/components/overlays/SessionSubcommandSelector.d.ts +21 -0
- package/dist/cli/ink-cli/components/overlays/SessionSubcommandSelector.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/SessionSubcommandSelector.js +42 -0
- package/dist/cli/ink-cli/components/overlays/StreamSelector.d.ts +20 -0
- package/dist/cli/ink-cli/components/overlays/StreamSelector.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/StreamSelector.js +58 -0
- package/dist/cli/ink-cli/components/overlays/ToolBrowser.d.ts +25 -0
- package/dist/cli/ink-cli/components/overlays/ToolBrowser.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/ToolBrowser.js +400 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/LocalModelWizard.d.ts +25 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/LocalModelWizard.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/LocalModelWizard.js +609 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/index.d.ts +15 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/index.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/index.js +14 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/provider-config.d.ts +33 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/provider-config.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/provider-config.js +419 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/ApiKeyStep.d.ts +25 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/ApiKeyStep.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/ApiKeyStep.js +29 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/ProviderSelector.d.ts +17 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/ProviderSelector.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/ProviderSelector.js +11 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/SetupInfoBanner.d.ts +20 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/SetupInfoBanner.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/SetupInfoBanner.js +10 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/WizardStepInput.d.ts +30 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/WizardStepInput.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/WizardStepInput.js +13 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/index.d.ts +8 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/index.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/index.js +7 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/types.d.ts +79 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/types.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/types.js +38 -0
- package/dist/cli/ink-cli/components/renderers/DiffRenderer.d.ts +21 -0
- package/dist/cli/ink-cli/components/renderers/DiffRenderer.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/renderers/DiffRenderer.js +65 -0
- package/dist/cli/ink-cli/components/renderers/FilePreviewRenderer.d.ts +28 -0
- package/dist/cli/ink-cli/components/renderers/FilePreviewRenderer.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/renderers/FilePreviewRenderer.js +66 -0
- package/dist/cli/ink-cli/components/renderers/FileRenderer.d.ts +19 -0
- package/dist/cli/ink-cli/components/renderers/FileRenderer.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/renderers/FileRenderer.js +26 -0
- package/dist/cli/ink-cli/components/renderers/GenericRenderer.d.ts +21 -0
- package/dist/cli/ink-cli/components/renderers/GenericRenderer.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/renderers/GenericRenderer.js +26 -0
- package/dist/cli/ink-cli/components/renderers/SearchRenderer.d.ts +20 -0
- package/dist/cli/ink-cli/components/renderers/SearchRenderer.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/renderers/SearchRenderer.js +12 -0
- package/dist/cli/ink-cli/components/renderers/ShellRenderer.d.ts +21 -0
- package/dist/cli/ink-cli/components/renderers/ShellRenderer.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/renderers/ShellRenderer.js +25 -0
- package/dist/cli/ink-cli/components/renderers/diff-shared.d.ts +61 -0
- package/dist/cli/ink-cli/components/renderers/diff-shared.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/renderers/diff-shared.js +158 -0
- package/dist/cli/ink-cli/components/renderers/index.d.ts +28 -0
- package/dist/cli/ink-cli/components/renderers/index.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/renderers/index.js +36 -0
- package/dist/cli/ink-cli/components/shared/MarkdownText.d.ts +38 -0
- package/dist/cli/ink-cli/components/shared/MarkdownText.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/shared/MarkdownText.js +362 -0
- package/dist/cli/ink-cli/components/shared/VirtualizedList.d.ts +44 -0
- package/dist/cli/ink-cli/components/shared/VirtualizedList.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/shared/VirtualizedList.js +300 -0
- package/dist/cli/ink-cli/components/shared/text-buffer.d.ts +185 -0
- package/dist/cli/ink-cli/components/shared/text-buffer.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/shared/text-buffer.js +1338 -0
- package/dist/cli/ink-cli/constants/processingPhrases.d.ts +10 -0
- package/dist/cli/ink-cli/constants/processingPhrases.d.ts.map +1 -0
- package/dist/cli/ink-cli/constants/processingPhrases.js +64 -0
- package/dist/cli/ink-cli/constants/tips.d.ts +15 -0
- package/dist/cli/ink-cli/constants/tips.d.ts.map +1 -0
- package/dist/cli/ink-cli/constants/tips.js +53 -0
- package/dist/cli/ink-cli/containers/InputContainer.d.ts +42 -8
- package/dist/cli/ink-cli/containers/InputContainer.d.ts.map +1 -1
- package/dist/cli/ink-cli/containers/InputContainer.js +513 -85
- package/dist/cli/ink-cli/containers/OverlayContainer.d.ts +23 -5
- package/dist/cli/ink-cli/containers/OverlayContainer.d.ts.map +1 -1
- package/dist/cli/ink-cli/containers/OverlayContainer.js +1214 -132
- package/dist/cli/ink-cli/containers/index.d.ts +1 -1
- package/dist/cli/ink-cli/containers/index.d.ts.map +1 -1
- package/dist/cli/ink-cli/contexts/KeypressContext.d.ts +36 -0
- package/dist/cli/ink-cli/contexts/KeypressContext.d.ts.map +1 -0
- package/dist/cli/ink-cli/contexts/KeypressContext.js +461 -0
- package/dist/cli/ink-cli/contexts/MouseContext.d.ts +27 -0
- package/dist/cli/ink-cli/contexts/MouseContext.d.ts.map +1 -0
- package/dist/cli/ink-cli/contexts/MouseContext.js +102 -0
- package/dist/cli/ink-cli/contexts/ScrollProvider.d.ts +33 -0
- package/dist/cli/ink-cli/contexts/ScrollProvider.d.ts.map +1 -0
- package/dist/cli/ink-cli/contexts/ScrollProvider.js +170 -0
- package/dist/cli/ink-cli/contexts/index.d.ts +7 -0
- package/dist/cli/ink-cli/contexts/index.d.ts.map +1 -0
- package/dist/cli/ink-cli/contexts/index.js +6 -0
- package/dist/cli/ink-cli/hooks/index.d.ts +5 -0
- package/dist/cli/ink-cli/hooks/index.d.ts.map +1 -1
- package/dist/cli/ink-cli/hooks/index.js +6 -1
- package/dist/cli/ink-cli/hooks/useAgentEvents.d.ts +26 -9
- package/dist/cli/ink-cli/hooks/useAgentEvents.d.ts.map +1 -1
- package/dist/cli/ink-cli/hooks/useAgentEvents.js +90 -198
- package/dist/cli/ink-cli/hooks/useBatchedScroll.d.ts +14 -0
- package/dist/cli/ink-cli/hooks/useBatchedScroll.d.ts.map +1 -0
- package/dist/cli/ink-cli/hooks/useBatchedScroll.js +25 -0
- package/dist/cli/ink-cli/hooks/useCLIState.d.ts +50 -0
- package/dist/cli/ink-cli/hooks/useCLIState.d.ts.map +1 -0
- package/dist/cli/ink-cli/hooks/useCLIState.js +190 -0
- package/dist/cli/ink-cli/hooks/useElapsedTime.d.ts +24 -0
- package/dist/cli/ink-cli/hooks/useElapsedTime.d.ts.map +1 -0
- package/dist/cli/ink-cli/hooks/useElapsedTime.js +69 -0
- package/dist/cli/ink-cli/hooks/useHistorySearch.d.ts +61 -0
- package/dist/cli/ink-cli/hooks/useHistorySearch.d.ts.map +1 -0
- package/dist/cli/ink-cli/hooks/useHistorySearch.js +210 -0
- package/dist/cli/ink-cli/hooks/useInputOrchestrator.d.ts +136 -0
- package/dist/cli/ink-cli/hooks/useInputOrchestrator.d.ts.map +1 -0
- package/dist/cli/ink-cli/hooks/useInputOrchestrator.js +663 -0
- package/dist/cli/ink-cli/hooks/useKeyboardShortcuts.d.ts.map +1 -1
- package/dist/cli/ink-cli/hooks/useKeyboardShortcuts.js +7 -26
- package/dist/cli/ink-cli/hooks/useKeypress.d.ts +18 -0
- package/dist/cli/ink-cli/hooks/useKeypress.d.ts.map +1 -0
- package/dist/cli/ink-cli/hooks/useKeypress.js +26 -0
- package/dist/cli/ink-cli/hooks/usePhraseCycler.d.ts +30 -0
- package/dist/cli/ink-cli/hooks/usePhraseCycler.d.ts.map +1 -0
- package/dist/cli/ink-cli/hooks/usePhraseCycler.js +68 -0
- package/dist/cli/ink-cli/hooks/useStreaming.d.ts +19 -0
- package/dist/cli/ink-cli/hooks/useStreaming.d.ts.map +1 -0
- package/dist/cli/ink-cli/hooks/useStreaming.js +26 -0
- package/dist/cli/ink-cli/hooks/useTerminalSize.d.ts +14 -0
- package/dist/cli/ink-cli/hooks/useTerminalSize.d.ts.map +1 -0
- package/dist/cli/ink-cli/hooks/useTerminalSize.js +31 -0
- package/dist/cli/ink-cli/hooks/useTokenCounter.d.ts +42 -0
- package/dist/cli/ink-cli/hooks/useTokenCounter.d.ts.map +1 -0
- package/dist/cli/ink-cli/hooks/useTokenCounter.js +96 -0
- package/dist/cli/ink-cli/services/CommandService.d.ts +32 -1
- package/dist/cli/ink-cli/services/CommandService.d.ts.map +1 -1
- package/dist/cli/ink-cli/services/CommandService.js +36 -5
- package/dist/cli/ink-cli/services/InputService.d.ts +1 -5
- package/dist/cli/ink-cli/services/InputService.d.ts.map +1 -1
- package/dist/cli/ink-cli/services/InputService.js +1 -8
- package/dist/cli/ink-cli/services/index.d.ts +2 -1
- package/dist/cli/ink-cli/services/index.d.ts.map +1 -1
- package/dist/cli/ink-cli/services/index.js +2 -1
- package/dist/cli/ink-cli/services/processStream.d.ts +69 -0
- package/dist/cli/ink-cli/services/processStream.d.ts.map +1 -0
- package/dist/cli/ink-cli/services/processStream.js +742 -0
- package/dist/cli/ink-cli/state/actions.d.ts +30 -60
- package/dist/cli/ink-cli/state/actions.d.ts.map +1 -1
- package/dist/cli/ink-cli/state/actions.js +3 -0
- package/dist/cli/ink-cli/state/index.d.ts +5 -3
- package/dist/cli/ink-cli/state/index.d.ts.map +1 -1
- package/dist/cli/ink-cli/state/index.js +4 -3
- package/dist/cli/ink-cli/state/initialState.d.ts +4 -3
- package/dist/cli/ink-cli/state/initialState.d.ts.map +1 -1
- package/dist/cli/ink-cli/state/initialState.js +20 -4
- package/dist/cli/ink-cli/state/reducer.d.ts +3 -0
- package/dist/cli/ink-cli/state/reducer.d.ts.map +1 -1
- package/dist/cli/ink-cli/state/reducer.js +62 -168
- package/dist/cli/ink-cli/state/streaming-state.d.ts +27 -0
- package/dist/cli/ink-cli/state/streaming-state.d.ts.map +1 -0
- package/dist/cli/ink-cli/state/streaming-state.js +39 -0
- package/dist/cli/ink-cli/state/types.d.ts +223 -6
- package/dist/cli/ink-cli/state/types.d.ts.map +1 -1
- package/dist/cli/ink-cli/utils/bracketedPaste.d.ts +22 -0
- package/dist/cli/ink-cli/utils/bracketedPaste.d.ts.map +1 -0
- package/dist/cli/ink-cli/utils/bracketedPaste.js +27 -0
- package/dist/cli/ink-cli/utils/clipboardUtils.d.ts +49 -0
- package/dist/cli/ink-cli/utils/clipboardUtils.d.ts.map +1 -0
- package/dist/cli/ink-cli/utils/clipboardUtils.js +356 -0
- package/dist/cli/ink-cli/utils/commandOverlays.d.ts +33 -0
- package/dist/cli/ink-cli/utils/commandOverlays.d.ts.map +1 -0
- package/dist/cli/ink-cli/utils/commandOverlays.js +78 -0
- package/dist/cli/ink-cli/utils/debugLog.d.ts +38 -0
- package/dist/cli/ink-cli/utils/debugLog.d.ts.map +1 -0
- package/dist/cli/ink-cli/utils/debugLog.js +66 -0
- package/dist/cli/ink-cli/utils/index.d.ts +2 -1
- package/dist/cli/ink-cli/utils/index.d.ts.map +1 -1
- package/dist/cli/ink-cli/utils/index.js +3 -1
- package/dist/cli/ink-cli/utils/input.d.ts +25 -0
- package/dist/cli/ink-cli/utils/input.d.ts.map +1 -0
- package/dist/cli/ink-cli/utils/input.js +56 -0
- package/dist/cli/ink-cli/utils/inputParsing.d.ts +0 -9
- package/dist/cli/ink-cli/utils/inputParsing.d.ts.map +1 -1
- package/dist/cli/ink-cli/utils/inputParsing.js +0 -27
- package/dist/cli/ink-cli/utils/messageFormatting.d.ts +59 -3
- package/dist/cli/ink-cli/utils/messageFormatting.d.ts.map +1 -1
- package/dist/cli/ink-cli/utils/messageFormatting.js +348 -20
- package/dist/cli/ink-cli/utils/mouse.d.ts +61 -0
- package/dist/cli/ink-cli/utils/mouse.d.ts.map +1 -0
- package/dist/cli/ink-cli/utils/mouse.js +209 -0
- package/dist/cli/ink-cli/utils/streamSplitter.d.ts +44 -0
- package/dist/cli/ink-cli/utils/streamSplitter.d.ts.map +1 -0
- package/dist/cli/ink-cli/utils/streamSplitter.js +154 -0
- package/dist/cli/ink-cli/utils/textUtils.d.ts +63 -0
- package/dist/cli/ink-cli/utils/textUtils.d.ts.map +1 -0
- package/dist/cli/ink-cli/utils/textUtils.js +248 -0
- package/dist/cli/ink-cli/utils/toolUtils.d.ts +9 -0
- package/dist/cli/ink-cli/utils/toolUtils.d.ts.map +1 -0
- package/dist/cli/ink-cli/utils/toolUtils.js +15 -0
- package/dist/cli/utils/api-key-setup.d.ts +54 -4
- package/dist/cli/utils/api-key-setup.d.ts.map +1 -1
- package/dist/cli/utils/api-key-setup.js +433 -107
- package/dist/cli/utils/api-key-verification.d.ts +17 -0
- package/dist/cli/utils/api-key-verification.d.ts.map +1 -0
- package/dist/cli/utils/api-key-verification.js +211 -0
- package/dist/cli/utils/config-validation.d.ts +22 -2
- package/dist/cli/utils/config-validation.d.ts.map +1 -1
- package/dist/cli/utils/config-validation.js +354 -25
- package/dist/cli/utils/local-model-setup.d.ts +46 -0
- package/dist/cli/utils/local-model-setup.d.ts.map +1 -0
- package/dist/cli/utils/local-model-setup.js +662 -0
- package/dist/cli/utils/options.d.ts.map +1 -1
- package/dist/cli/utils/options.js +1 -3
- package/dist/cli/utils/prompt-helpers.d.ts +47 -0
- package/dist/cli/utils/prompt-helpers.d.ts.map +1 -0
- package/dist/cli/utils/prompt-helpers.js +66 -0
- package/dist/cli/utils/provider-setup.d.ts +66 -8
- package/dist/cli/utils/provider-setup.d.ts.map +1 -1
- package/dist/cli/utils/provider-setup.js +324 -84
- package/dist/cli/utils/scaffolding-utils.d.ts +76 -0
- package/dist/cli/utils/scaffolding-utils.d.ts.map +1 -0
- package/dist/cli/utils/scaffolding-utils.js +246 -0
- package/dist/cli/utils/setup-utils.d.ts +16 -0
- package/dist/cli/utils/setup-utils.d.ts.map +1 -1
- package/dist/cli/utils/setup-utils.js +72 -21
- package/dist/cli/utils/template-engine.d.ts +65 -0
- package/dist/cli/utils/template-engine.d.ts.map +1 -0
- package/dist/cli/utils/template-engine.js +1089 -0
- package/dist/config/cli-overrides.d.ts +45 -2
- package/dist/config/cli-overrides.d.ts.map +1 -1
- package/dist/config/cli-overrides.js +107 -10
- package/dist/index.js +379 -99
- package/dist/utils/agent-helpers.d.ts +95 -0
- package/dist/utils/agent-helpers.d.ts.map +1 -0
- package/dist/utils/agent-helpers.js +117 -0
- package/dist/webui/assets/index-8j-KMkX1.js +2054 -0
- package/dist/webui/assets/index-c_AX24V4.css +1 -0
- package/dist/webui/assets/{tanstack-DgxBONJY.js → tanstack-Br79RQ-n.js} +1 -1
- package/dist/webui/index.html +4 -10
- package/dist/webui/logos/aws-color.svg +1 -0
- package/dist/webui/logos/dexto/dexto_logo.svg +1 -1
- package/dist/webui/logos/dexto/dexto_logo_light.svg +6 -6
- package/dist/webui/logos/glama.svg +7 -0
- package/dist/webui/logos/litellm.svg +7 -0
- package/dist/webui/logos/openrouter.svg +1 -0
- package/package.json +18 -15
- package/dist/cli/commands/interactive-commands/index.d.ts +0 -63
- package/dist/cli/commands/interactive-commands/index.d.ts.map +0 -1
- package/dist/cli/commands/interactive-commands/index.js +0 -73
- package/dist/cli/commands/interactive-commands/mcp/mcp-add-utils.d.ts +0 -34
- package/dist/cli/commands/interactive-commands/mcp/mcp-add-utils.d.ts.map +0 -1
- package/dist/cli/commands/interactive-commands/mcp/mcp-add-utils.js +0 -178
- package/dist/cli/commands/interactive-commands/mcp/mcp-commands.d.ts +0 -9
- package/dist/cli/commands/interactive-commands/mcp/mcp-commands.d.ts.map +0 -1
- package/dist/cli/commands/interactive-commands/mcp/mcp-commands.js +0 -325
- package/dist/cli/commands/interactive-commands/model/model-commands.d.ts +0 -21
- package/dist/cli/commands/interactive-commands/model/model-commands.d.ts.map +0 -1
- package/dist/cli/commands/interactive-commands/model/model-commands.js +0 -190
- package/dist/cli/ink-cli/components/MultiLineTextInput.d.ts +0 -26
- package/dist/cli/ink-cli/components/MultiLineTextInput.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/MultiLineTextInput.js +0 -220
- package/dist/discord/bot.d.ts +0 -4
- package/dist/discord/bot.d.ts.map +0 -1
- package/dist/discord/bot.js +0 -193
- package/dist/telegram/bot.d.ts +0 -5
- package/dist/telegram/bot.d.ts.map +0 -1
- package/dist/telegram/bot.js +0 -251
- package/dist/webui/assets/index-DKq5Xng1.js +0 -687
- package/dist/webui/assets/index-D_0_GBu5.css +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uninstall.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/uninstall.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,QAAA,MAAM,sBAAsB;;;;;;;;;;;;EAMf,CAAC;AAEd,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,sBAAsB,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"uninstall.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/uninstall.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,QAAA,MAAM,sBAAsB;;;;;;;;;;;;EAMf,CAAC;AAEd,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,sBAAsB,CAAC,CAAC;AA+B9E,wBAAsB,sBAAsB,CACxC,MAAM,EAAE,MAAM,EAAE,EAChB,OAAO,EAAE,OAAO,CAAC,uBAAuB,CAAC,GAC1C,OAAO,CAAC,IAAI,CAAC,CA8Gf"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// packages/cli/src/cli/commands/uninstall.ts
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import {
|
|
3
|
+
import { uninstallAgent, listInstalledAgents } from '../../utils/agent-helpers.js';
|
|
4
4
|
import { capture } from '../../analytics/index.js';
|
|
5
5
|
// Zod schema for uninstall command validation
|
|
6
6
|
const UninstallCommandSchema = z
|
|
@@ -20,8 +20,7 @@ async function validateUninstallCommand(agents, options) {
|
|
|
20
20
|
agents,
|
|
21
21
|
});
|
|
22
22
|
// Business logic validation
|
|
23
|
-
const
|
|
24
|
-
const installedAgents = await registry.getInstalledAgents();
|
|
23
|
+
const installedAgents = await listInstalledAgents();
|
|
25
24
|
if (installedAgents.length === 0) {
|
|
26
25
|
throw new Error('No agents are currently installed.');
|
|
27
26
|
}
|
|
@@ -33,8 +32,7 @@ async function validateUninstallCommand(agents, options) {
|
|
|
33
32
|
export async function handleUninstallCommand(agents, options) {
|
|
34
33
|
// Validate command with Zod
|
|
35
34
|
const validated = await validateUninstallCommand(agents, options);
|
|
36
|
-
const
|
|
37
|
-
const installedAgents = await registry.getInstalledAgents();
|
|
35
|
+
const installedAgents = await listInstalledAgents();
|
|
38
36
|
if (installedAgents.length === 0) {
|
|
39
37
|
console.log('📋 No agents are currently installed.');
|
|
40
38
|
return;
|
|
@@ -64,7 +62,7 @@ export async function handleUninstallCommand(agents, options) {
|
|
|
64
62
|
for (const agentName of agentsToUninstall) {
|
|
65
63
|
try {
|
|
66
64
|
console.log(`\n🗑️ Uninstalling ${agentName}...`);
|
|
67
|
-
await
|
|
65
|
+
await uninstallAgent(agentName);
|
|
68
66
|
successCount++;
|
|
69
67
|
console.log(`✅ ${agentName} uninstalled successfully`);
|
|
70
68
|
uninstalled.push(agentName);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"which.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/which.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"which.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/which.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,QAAA,MAAM,kBAAkB;;;;;;EAIX,CAAC;AAEd,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAgBtE;;GAEG;AACH,wBAAsB,kBAAkB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAgBzE"}
|
|
@@ -1,23 +1,37 @@
|
|
|
1
1
|
// packages/cli/src/cli/commands/which.ts
|
|
2
|
+
import { readFileSync } from 'fs';
|
|
2
3
|
import chalk from 'chalk';
|
|
3
4
|
import { z } from 'zod';
|
|
4
|
-
import { resolveAgentPath,
|
|
5
|
+
import { resolveAgentPath, resolveBundledScript } from '@dexto/agent-management';
|
|
5
6
|
// Zod schema for which command validation
|
|
6
7
|
const WhichCommandSchema = z
|
|
7
8
|
.object({
|
|
8
9
|
agentName: z.string().min(1, 'Agent name cannot be empty'),
|
|
9
10
|
})
|
|
10
11
|
.strict();
|
|
12
|
+
/**
|
|
13
|
+
* Load available agent names from bundled registry
|
|
14
|
+
*/
|
|
15
|
+
function getAvailableAgentNames() {
|
|
16
|
+
try {
|
|
17
|
+
const registryPath = resolveBundledScript('agents/agent-registry.json');
|
|
18
|
+
const content = readFileSync(registryPath, 'utf-8');
|
|
19
|
+
const registry = JSON.parse(content);
|
|
20
|
+
return Object.keys(registry.agents || {});
|
|
21
|
+
}
|
|
22
|
+
catch (_error) {
|
|
23
|
+
return [];
|
|
24
|
+
}
|
|
25
|
+
}
|
|
11
26
|
/**
|
|
12
27
|
* Handle the which command
|
|
13
28
|
*/
|
|
14
29
|
export async function handleWhichCommand(agentName) {
|
|
15
30
|
// Validate command with Zod
|
|
16
31
|
const validated = WhichCommandSchema.parse({ agentName });
|
|
17
|
-
const
|
|
18
|
-
const availableAgents = Object.keys(registry.getAvailableAgents());
|
|
32
|
+
const availableAgents = getAvailableAgentNames();
|
|
19
33
|
try {
|
|
20
|
-
const resolvedPath = await resolveAgentPath(validated.agentName, false
|
|
34
|
+
const resolvedPath = await resolveAgentPath(validated.agentName, false); // Don't auto-install
|
|
21
35
|
console.log(resolvedPath);
|
|
22
36
|
}
|
|
23
37
|
catch (error) {
|
|
@@ -1,20 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* InkCLI Component (Refactored)
|
|
3
3
|
*
|
|
4
|
-
*
|
|
4
|
+
* Entry point for the Ink-based CLI. Selects between two rendering modes:
|
|
5
|
+
* - AlternateBufferCLI: VirtualizedList with mouse scroll, keyboard scroll, copy mode
|
|
6
|
+
* - StaticCLI: Static pattern with native terminal scrollback and selection
|
|
5
7
|
*
|
|
6
|
-
*
|
|
7
|
-
* - State managed by useReducer with typed actions
|
|
8
|
-
* - Business logic in services
|
|
9
|
-
* - Event handling via custom hooks
|
|
10
|
-
* - UI in presentational components
|
|
11
|
-
* - Smart containers orchestrate interactions
|
|
12
|
-
*
|
|
13
|
-
* Before: 50+ useState hooks, 15+ useEffect hooks, complex state management
|
|
14
|
-
* After: 1 useReducer, 5 custom hooks, clear separation of concerns
|
|
8
|
+
* The mode is selected via USE_ALTERNATE_BUFFER constant.
|
|
15
9
|
*/
|
|
16
10
|
import type { DextoAgent } from '@dexto/core';
|
|
17
|
-
import {
|
|
11
|
+
import type { StartupInfo } from './state/types.js';
|
|
18
12
|
interface InkCLIProps {
|
|
19
13
|
agent: DextoAgent;
|
|
20
14
|
initialSessionId: string | null;
|
|
@@ -23,21 +17,14 @@ interface InkCLIProps {
|
|
|
23
17
|
/**
|
|
24
18
|
* Modern CLI interface using React Ink
|
|
25
19
|
*
|
|
26
|
-
*
|
|
27
|
-
* -
|
|
28
|
-
* -
|
|
29
|
-
* -
|
|
30
|
-
* - Performance
|
|
31
|
-
* - Type safety
|
|
32
|
-
*
|
|
33
|
-
* Uses explicit sessionId in state (like WebUI) instead of defaultSession pattern
|
|
20
|
+
* Wraps the CLI with:
|
|
21
|
+
* - ErrorBoundary for graceful error handling
|
|
22
|
+
* - KeypressProvider for unified keyboard input
|
|
23
|
+
* - MouseProvider (only in alternate buffer mode)
|
|
34
24
|
*/
|
|
35
25
|
export declare function InkCLIRefactored({ agent, initialSessionId, startupInfo }: InkCLIProps): import("react/jsx-runtime").JSX.Element;
|
|
36
26
|
/**
|
|
37
27
|
* Start the modern Ink-based CLI
|
|
38
|
-
* Entry point for the refactored CLI
|
|
39
|
-
* @param agent - The DextoAgent instance
|
|
40
|
-
* @param initialSessionId - The session ID to use for this CLI session
|
|
41
28
|
*/
|
|
42
29
|
export declare function startInkCliRefactored(agent: DextoAgent, initialSessionId: string | null): Promise<void>;
|
|
43
30
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InkCLIRefactored.d.ts","sourceRoot":"","sources":["../../../src/cli/ink-cli/InkCLIRefactored.tsx"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"InkCLIRefactored.d.ts","sourceRoot":"","sources":["../../../src/cli/ink-cli/InkCLIRefactored.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAK9C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAoBpD,UAAU,WAAW;IACjB,KAAK,EAAE,UAAU,CAAC;IAClB,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,WAAW,EAAE,WAAW,CAAC;CAC5B;AAyCD;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,EAAE,KAAK,EAAE,gBAAgB,EAAE,WAAW,EAAE,EAAE,WAAW,2CAerF;AAED;;GAEG;AACH,wBAAsB,qBAAqB,CACvC,KAAK,EAAE,UAAU,EACjB,gBAAgB,EAAE,MAAM,GAAG,IAAI,GAChC,OAAO,CAAC,IAAI,CAAC,CA4Bf"}
|
|
@@ -1,158 +1,75 @@
|
|
|
1
|
-
import { jsx as _jsx
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
/**
|
|
3
3
|
* InkCLI Component (Refactored)
|
|
4
4
|
*
|
|
5
|
-
*
|
|
5
|
+
* Entry point for the Ink-based CLI. Selects between two rendering modes:
|
|
6
|
+
* - AlternateBufferCLI: VirtualizedList with mouse scroll, keyboard scroll, copy mode
|
|
7
|
+
* - StaticCLI: Static pattern with native terminal scrollback and selection
|
|
6
8
|
*
|
|
7
|
-
*
|
|
8
|
-
* - State managed by useReducer with typed actions
|
|
9
|
-
* - Business logic in services
|
|
10
|
-
* - Event handling via custom hooks
|
|
11
|
-
* - UI in presentational components
|
|
12
|
-
* - Smart containers orchestrate interactions
|
|
13
|
-
*
|
|
14
|
-
* Before: 50+ useState hooks, 15+ useEffect hooks, complex state management
|
|
15
|
-
* After: 1 useReducer, 5 custom hooks, clear separation of concerns
|
|
9
|
+
* The mode is selected via USE_ALTERNATE_BUFFER constant.
|
|
16
10
|
*/
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
11
|
+
import { useCallback, useState } from 'react';
|
|
12
|
+
import { render } from 'ink';
|
|
19
13
|
import { registerGracefulShutdown } from '../../utils/graceful-shutdown.js';
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
import { useAgentEvents, useKeyboardShortcuts } from './hooks/index.js';
|
|
24
|
-
// Services
|
|
25
|
-
import { InputService, MessageService } from './services/index.js';
|
|
26
|
-
// Utils
|
|
27
|
-
import { getStartupInfo, convertHistoryToUIMessages } from './utils/messageFormatting.js';
|
|
14
|
+
import { enableBracketedPaste, disableBracketedPaste } from './utils/bracketedPaste.js';
|
|
15
|
+
// Contexts (keyboard/mouse providers)
|
|
16
|
+
import { KeypressProvider, MouseProvider, ScrollProvider } from './contexts/index.js';
|
|
28
17
|
// Components
|
|
29
|
-
import { ChatView } from './components/chat/ChatView.js';
|
|
30
|
-
import { Footer } from './components/chat/Footer.js';
|
|
31
18
|
import { ErrorBoundary } from './components/ErrorBoundary.js';
|
|
32
|
-
import {
|
|
33
|
-
//
|
|
34
|
-
import {
|
|
35
|
-
|
|
19
|
+
import { AlternateBufferCLI, StaticCLI } from './components/modes/index.js';
|
|
20
|
+
// Hooks
|
|
21
|
+
import { useStreaming } from './hooks/useStreaming.js';
|
|
22
|
+
// Utils
|
|
23
|
+
import { getStartupInfo } from './utils/messageFormatting.js';
|
|
24
|
+
// Rendering mode: true = alternate buffer with VirtualizedList, false = Static pattern
|
|
25
|
+
// Toggle this to switch between modes for testing
|
|
26
|
+
//const USE_ALTERNATE_BUFFER = true;
|
|
27
|
+
const USE_ALTERNATE_BUFFER = false;
|
|
28
|
+
/**
|
|
29
|
+
* Inner component that wraps the mode-specific component with providers
|
|
30
|
+
*/
|
|
31
|
+
function InkCLIInner({ agent, initialSessionId, startupInfo }) {
|
|
32
|
+
// Selection hint callback for alternate buffer mode
|
|
33
|
+
const [, setSelectionHintShown] = useState(false);
|
|
34
|
+
// Streaming mode - can be toggled via /stream command
|
|
35
|
+
const { streaming } = useStreaming();
|
|
36
|
+
const handleSelectionAttempt = useCallback(() => {
|
|
37
|
+
setSelectionHintShown(true);
|
|
38
|
+
}, []);
|
|
39
|
+
if (USE_ALTERNATE_BUFFER) {
|
|
40
|
+
return (_jsx(ScrollProvider, { onSelectionAttempt: handleSelectionAttempt, children: _jsx(AlternateBufferCLI, { agent: agent, initialSessionId: initialSessionId, startupInfo: startupInfo, onSelectionAttempt: handleSelectionAttempt, useStreaming: streaming }) }));
|
|
41
|
+
}
|
|
42
|
+
// Static mode - no ScrollProvider needed
|
|
43
|
+
return (_jsx(StaticCLI, { agent: agent, initialSessionId: initialSessionId, startupInfo: startupInfo, useStreaming: streaming }));
|
|
44
|
+
}
|
|
36
45
|
/**
|
|
37
46
|
* Modern CLI interface using React Ink
|
|
38
47
|
*
|
|
39
|
-
*
|
|
40
|
-
* -
|
|
41
|
-
* -
|
|
42
|
-
* -
|
|
43
|
-
* - Performance
|
|
44
|
-
* - Type safety
|
|
45
|
-
*
|
|
46
|
-
* Uses explicit sessionId in state (like WebUI) instead of defaultSession pattern
|
|
48
|
+
* Wraps the CLI with:
|
|
49
|
+
* - ErrorBoundary for graceful error handling
|
|
50
|
+
* - KeypressProvider for unified keyboard input
|
|
51
|
+
* - MouseProvider (only in alternate buffer mode)
|
|
47
52
|
*/
|
|
48
53
|
export function InkCLIRefactored({ agent, initialSessionId, startupInfo }) {
|
|
49
|
-
|
|
50
|
-
const [state, dispatch] = useReducer(cliReducer, undefined, () => {
|
|
51
|
-
const initialModelName = agent.getCurrentLLMConfig().model;
|
|
52
|
-
const initial = createInitialState([], initialModelName);
|
|
53
|
-
initial.session.id = initialSessionId;
|
|
54
|
-
initial.session.hasActiveSession = initialSessionId !== null;
|
|
55
|
-
return initial;
|
|
56
|
-
});
|
|
57
|
-
// Initialize services (memoized)
|
|
58
|
-
const inputService = useMemo(() => new InputService(), []);
|
|
59
|
-
const messageService = useMemo(() => new MessageService(), []);
|
|
60
|
-
// Setup event bus subscriptions
|
|
61
|
-
useAgentEvents({ agent, dispatch, isCancelling: state.ui.isCancelling });
|
|
62
|
-
// Session is now managed in state - no need for sync hook
|
|
63
|
-
// useSessionSync removed - sessionId is in state from initialization or SESSION_SET actions
|
|
64
|
-
// Input history navigation is now handled by MultiLineTextInput component
|
|
65
|
-
// Setup global keyboard shortcuts
|
|
66
|
-
useKeyboardShortcuts({ state, dispatch, agent });
|
|
67
|
-
// Hydrate conversation history when resuming a session
|
|
68
|
-
useEffect(() => {
|
|
69
|
-
if (!initialSessionId || !state.session.hasActiveSession || state.messages.length > 0) {
|
|
70
|
-
return;
|
|
71
|
-
}
|
|
72
|
-
let cancelled = false;
|
|
73
|
-
(async () => {
|
|
74
|
-
try {
|
|
75
|
-
const history = await agent.getSessionHistory(initialSessionId);
|
|
76
|
-
if (!history?.length || cancelled)
|
|
77
|
-
return;
|
|
78
|
-
const historyMessages = convertHistoryToUIMessages(history, initialSessionId);
|
|
79
|
-
dispatch({ type: 'MESSAGE_ADD_MULTIPLE', messages: historyMessages });
|
|
80
|
-
}
|
|
81
|
-
catch (error) {
|
|
82
|
-
if (cancelled)
|
|
83
|
-
return;
|
|
84
|
-
dispatch({
|
|
85
|
-
type: 'ERROR',
|
|
86
|
-
errorMessage: error instanceof Error ? error.message : String(error),
|
|
87
|
-
});
|
|
88
|
-
}
|
|
89
|
-
})();
|
|
90
|
-
return () => {
|
|
91
|
-
cancelled = true;
|
|
92
|
-
};
|
|
93
|
-
}, [agent, dispatch, initialSessionId, state.messages.length, state.session.hasActiveSession]);
|
|
94
|
-
// Detect overlays based on input (with guards to prevent infinite loop)
|
|
95
|
-
useEffect(() => {
|
|
96
|
-
// Don't detect overlays if processing or approval is active
|
|
97
|
-
if (state.ui.isProcessing || state.approval)
|
|
98
|
-
return;
|
|
99
|
-
const autocompleteType = inputService.detectAutocompleteType(state.input.value);
|
|
100
|
-
const selectorType = inputService.detectInteractiveSelector(state.input.value);
|
|
101
|
-
// Determine what overlay should be shown
|
|
102
|
-
let desiredOverlay = 'none';
|
|
103
|
-
// Priority: selector > autocomplete
|
|
104
|
-
if (selectorType === 'model') {
|
|
105
|
-
desiredOverlay = 'model-selector';
|
|
106
|
-
}
|
|
107
|
-
else if (selectorType === 'session') {
|
|
108
|
-
desiredOverlay = 'session-selector';
|
|
109
|
-
}
|
|
110
|
-
else if (autocompleteType === 'slash') {
|
|
111
|
-
desiredOverlay = 'slash-autocomplete';
|
|
112
|
-
}
|
|
113
|
-
else if (autocompleteType === 'resource') {
|
|
114
|
-
desiredOverlay = 'resource-autocomplete';
|
|
115
|
-
}
|
|
116
|
-
// Only dispatch if overlay needs to change
|
|
117
|
-
if (desiredOverlay !== state.ui.activeOverlay && state.ui.activeOverlay !== 'approval') {
|
|
118
|
-
if (desiredOverlay === 'none') {
|
|
119
|
-
dispatch({ type: 'CLOSE_OVERLAY' });
|
|
120
|
-
}
|
|
121
|
-
else {
|
|
122
|
-
dispatch({ type: 'SHOW_OVERLAY', overlay: desiredOverlay });
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
}, [
|
|
126
|
-
state.input.value,
|
|
127
|
-
state.ui.isProcessing,
|
|
128
|
-
state.approval,
|
|
129
|
-
state.ui.activeOverlay,
|
|
130
|
-
inputService,
|
|
131
|
-
dispatch,
|
|
132
|
-
]);
|
|
133
|
-
// Get visible messages (performance optimization)
|
|
134
|
-
// Limit to last 30 messages to prevent scrolling issues
|
|
135
|
-
const visibleMessages = useMemo(() => {
|
|
136
|
-
return messageService.getVisibleMessages(state.messages, 30);
|
|
137
|
-
}, [state.messages, messageService]);
|
|
138
|
-
return (_jsx(ErrorBoundary, { children: _jsxs(Box, { flexDirection: "column", minHeight: 0, children: [_jsx(ChatView, { messages: visibleMessages, modelName: state.session.modelName, sessionId: state.session.id || undefined, hasActiveSession: state.session.hasActiveSession, startupInfo: startupInfo }), _jsx(StatusBar, { isProcessing: state.ui.isProcessing, isThinking: state.ui.isThinking, approvalQueueCount: state.approvalQueue.length, exitWarningShown: state.ui.exitWarningShown }), _jsx(OverlayContainer, { state: state, dispatch: dispatch, agent: agent, inputService: inputService }), _jsx(InputContainer, { state: state, dispatch: dispatch, agent: agent, inputService: inputService }), _jsx(Footer, {})] }) }));
|
|
54
|
+
return (_jsx(ErrorBoundary, { children: _jsx(KeypressProvider, { children: _jsx(MouseProvider, { mouseEventsEnabled: USE_ALTERNATE_BUFFER, children: _jsx(InkCLIInner, { agent: agent, initialSessionId: initialSessionId, startupInfo: startupInfo }) }) }) }));
|
|
139
55
|
}
|
|
140
56
|
/**
|
|
141
57
|
* Start the modern Ink-based CLI
|
|
142
|
-
* Entry point for the refactored CLI
|
|
143
|
-
* @param agent - The DextoAgent instance
|
|
144
|
-
* @param initialSessionId - The session ID to use for this CLI session
|
|
145
58
|
*/
|
|
146
59
|
export async function startInkCliRefactored(agent, initialSessionId) {
|
|
147
|
-
// Use inkMode to let Ctrl+C be handled by the UI for exit warning
|
|
148
60
|
registerGracefulShutdown(() => agent, { inkMode: true });
|
|
149
|
-
//
|
|
61
|
+
// Enable bracketed paste mode so we can detect pasted text
|
|
62
|
+
// This wraps pastes with escape sequences that our KeypressContext handles
|
|
63
|
+
enableBracketedPaste();
|
|
150
64
|
const startupInfo = await getStartupInfo(agent);
|
|
151
65
|
const inkApp = render(_jsx(InkCLIRefactored, { agent: agent, initialSessionId: initialSessionId, startupInfo: startupInfo }), {
|
|
152
|
-
// Disable default Ctrl+C exit to handle it ourselves with double-press warning
|
|
153
66
|
exitOnCtrlC: false,
|
|
67
|
+
alternateBuffer: USE_ALTERNATE_BUFFER,
|
|
68
|
+
// Incremental rendering works better with VirtualizedList
|
|
69
|
+
// Static pattern doesn't need it (and may work better without)
|
|
70
|
+
incrementalRendering: USE_ALTERNATE_BUFFER,
|
|
154
71
|
});
|
|
155
|
-
// Wait for the Ink app to exit before resolving
|
|
156
|
-
// This ensures console suppression remains active until the UI is fully closed
|
|
157
72
|
await inkApp.waitUntilExit();
|
|
73
|
+
// Disable bracketed paste mode to restore normal terminal behavior
|
|
74
|
+
disableBracketedPaste();
|
|
158
75
|
}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { Key } from '../hooks/useInputOrchestrator.js';
|
|
1
3
|
export interface ApprovalRequest {
|
|
2
4
|
approvalId: string;
|
|
3
5
|
type: string;
|
|
@@ -6,16 +8,37 @@ export interface ApprovalRequest {
|
|
|
6
8
|
timestamp: Date;
|
|
7
9
|
metadata: Record<string, unknown>;
|
|
8
10
|
}
|
|
11
|
+
export interface ApprovalPromptHandle {
|
|
12
|
+
handleInput: (input: string, key: Key) => boolean;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Options passed when approving a request
|
|
16
|
+
*/
|
|
17
|
+
export interface ApprovalOptions {
|
|
18
|
+
/** Remember this tool for the entire session (approves ALL uses) */
|
|
19
|
+
rememberChoice?: boolean;
|
|
20
|
+
/** Remember a specific command pattern for bash (e.g., "git *") */
|
|
21
|
+
rememberPattern?: string;
|
|
22
|
+
/** Form data for elicitation requests */
|
|
23
|
+
formData?: Record<string, unknown>;
|
|
24
|
+
/** Enable "accept all edits" mode (auto-approve future edit_file/write_file) */
|
|
25
|
+
enableAcceptEditsMode?: boolean;
|
|
26
|
+
/** Remember directory access for the session */
|
|
27
|
+
rememberDirectory?: boolean;
|
|
28
|
+
}
|
|
9
29
|
interface ApprovalPromptProps {
|
|
10
30
|
approval: ApprovalRequest;
|
|
11
|
-
onApprove: (
|
|
31
|
+
onApprove: (options: ApprovalOptions) => void;
|
|
12
32
|
onDeny: () => void;
|
|
13
33
|
onCancel: () => void;
|
|
14
34
|
}
|
|
15
35
|
/**
|
|
16
36
|
* Compact approval prompt component that displays above the input area
|
|
17
|
-
* Shows
|
|
37
|
+
* Shows options based on approval type:
|
|
38
|
+
* - Tool confirmation: Yes, Yes (Session), No
|
|
39
|
+
* - Bash with patterns: Yes (once), pattern options, Yes (all bash), No
|
|
40
|
+
* - Elicitation: Form with input fields
|
|
18
41
|
*/
|
|
19
|
-
export declare
|
|
42
|
+
export declare const ApprovalPrompt: React.ForwardRefExoticComponent<ApprovalPromptProps & React.RefAttributes<ApprovalPromptHandle>>;
|
|
20
43
|
export {};
|
|
21
44
|
//# sourceMappingURL=ApprovalPrompt.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApprovalPrompt.d.ts","sourceRoot":"","sources":["../../../../src/cli/ink-cli/components/ApprovalPrompt.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ApprovalPrompt.d.ts","sourceRoot":"","sources":["../../../../src/cli/ink-cli/components/ApprovalPrompt.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAuE,MAAM,OAAO,CAAC;AAG5F,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,kCAAkC,CAAC;AAK5D,MAAM,WAAW,eAAe;IAC5B,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,IAAI,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACrC;AAED,MAAM,WAAW,oBAAoB;IACjC,WAAW,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,KAAK,OAAO,CAAC;CACrD;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC5B,oEAAoE;IACpE,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,mEAAmE;IACnE,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,yCAAyC;IACzC,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACnC,gFAAgF;IAChF,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,gDAAgD;IAChD,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC/B;AAED,UAAU,mBAAmB;IACzB,QAAQ,EAAE,eAAe,CAAC;IAC1B,SAAS,EAAE,CAAC,OAAO,EAAE,eAAe,KAAK,IAAI,CAAC;IAC9C,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,QAAQ,EAAE,MAAM,IAAI,CAAC;CACxB;AAOD;;;;;;GAMG;AACH,eAAO,MAAM,cAAc,kGA2R1B,CAAC"}
|