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,37 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Box, Text } from 'ink';
|
|
3
|
+
import { StyledBox } from './StyledBox.js';
|
|
4
|
+
/**
|
|
5
|
+
* Truncate content to a reasonable preview length
|
|
6
|
+
*/
|
|
7
|
+
function truncateContent(content, maxLength = 100) {
|
|
8
|
+
if (content.length <= maxLength)
|
|
9
|
+
return content;
|
|
10
|
+
return content.slice(0, maxLength) + '...';
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Get role color and icon
|
|
14
|
+
*/
|
|
15
|
+
function getRoleStyle(role) {
|
|
16
|
+
switch (role) {
|
|
17
|
+
case 'user':
|
|
18
|
+
return { color: 'blue', icon: '>' };
|
|
19
|
+
case 'assistant':
|
|
20
|
+
return { color: 'green', icon: '|' };
|
|
21
|
+
case 'system':
|
|
22
|
+
return { color: 'orange', icon: '#' };
|
|
23
|
+
case 'tool':
|
|
24
|
+
return { color: 'green', icon: '*' };
|
|
25
|
+
default:
|
|
26
|
+
return { color: 'white', icon: '-' };
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
export function SessionHistoryBox({ data }) {
|
|
30
|
+
if (data.messages.length === 0) {
|
|
31
|
+
return (_jsx(StyledBox, { title: `Session History: ${data.sessionId.slice(0, 8)}`, children: _jsx(Box, { marginTop: 1, children: _jsx(Text, { color: "gray", children: "No messages in this session yet." }) }) }));
|
|
32
|
+
}
|
|
33
|
+
return (_jsxs(StyledBox, { title: `Session History: ${data.sessionId.slice(0, 8)}`, children: [data.messages.map((msg, index) => {
|
|
34
|
+
const style = getRoleStyle(msg.role);
|
|
35
|
+
return (_jsxs(Box, { flexDirection: "column", marginTop: index === 0 ? 1 : 0, children: [_jsxs(Box, { children: [_jsxs(Text, { color: style.color, bold: true, children: [style.icon, ' '] }), _jsxs(Text, { color: style.color, children: ["[", msg.role, "]"] }), _jsxs(Text, { color: "gray", children: [" ", msg.timestamp] })] }), _jsx(Box, { marginLeft: 2, children: _jsx(Text, { children: truncateContent(msg.content) }) })] }, index));
|
|
36
|
+
}), _jsx(Box, { marginTop: 1, children: _jsxs(Text, { color: "gray", children: ["Total: ", data.total, " messages"] }) })] }));
|
|
37
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SessionListBox - Styled output for /session list command
|
|
3
|
+
*/
|
|
4
|
+
import type { SessionListStyledData } from '../../../state/types.js';
|
|
5
|
+
interface SessionListBoxProps {
|
|
6
|
+
data: SessionListStyledData;
|
|
7
|
+
}
|
|
8
|
+
export declare function SessionListBox({ data }: SessionListBoxProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=SessionListBox.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SessionListBox.d.ts","sourceRoot":"","sources":["../../../../../../src/cli/ink-cli/components/chat/styled-boxes/SessionListBox.tsx"],"names":[],"mappings":"AAAA;;GAEG;AAIH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAGrE,UAAU,mBAAmB;IACzB,IAAI,EAAE,qBAAqB,CAAC;CAC/B;AAED,wBAAgB,cAAc,CAAC,EAAE,IAAI,EAAE,EAAE,mBAAmB,2CAqC3D"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Box, Text } from 'ink';
|
|
3
|
+
import { StyledBox } from './StyledBox.js';
|
|
4
|
+
export function SessionListBox({ data }) {
|
|
5
|
+
if (data.sessions.length === 0) {
|
|
6
|
+
return (_jsxs(StyledBox, { title: "Sessions", children: [_jsx(Box, { marginTop: 1, children: _jsx(Text, { color: "gray", children: "No sessions found." }) }), _jsx(Box, { marginTop: 1, children: _jsx(Text, { color: "gray", children: "Run `dexto` to start a new session." }) })] }));
|
|
7
|
+
}
|
|
8
|
+
return (_jsxs(StyledBox, { title: "Sessions", children: [data.sessions.map((session) => (_jsxs(Box, { marginTop: 1, children: [_jsx(Box, { width: 12, children: _jsxs(Text, { color: session.isCurrent ? 'green' : 'cyan', bold: session.isCurrent, children: [session.isCurrent ? '>' : ' ', " ", session.id.slice(0, 8)] }) }), _jsx(Box, { width: 14, children: _jsxs(Text, { color: "gray", children: [session.messageCount, " messages"] }) }), _jsx(Text, { color: "gray", children: session.lastActive })] }, session.id))), _jsx(Box, { marginTop: 1, children: _jsxs(Text, { color: "gray", children: ["Total: ", data.total, " sessions"] }) }), _jsx(Box, { children: _jsx(Text, { color: "gray", children: "Use /resume to switch sessions" }) })] }));
|
|
9
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ShortcutsBox - Styled output for /shortcuts command
|
|
3
|
+
*/
|
|
4
|
+
import type { ShortcutsStyledData } from '../../../state/types.js';
|
|
5
|
+
interface ShortcutsBoxProps {
|
|
6
|
+
data: ShortcutsStyledData;
|
|
7
|
+
}
|
|
8
|
+
export declare function ShortcutsBox({ data }: ShortcutsBoxProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=ShortcutsBox.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ShortcutsBox.d.ts","sourceRoot":"","sources":["../../../../../../src/cli/ink-cli/components/chat/styled-boxes/ShortcutsBox.tsx"],"names":[],"mappings":"AAAA;;GAEG;AAIH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAGnE,UAAU,iBAAiB;IACvB,IAAI,EAAE,mBAAmB,CAAC;CAC7B;AAED,wBAAgB,YAAY,CAAC,EAAE,IAAI,EAAE,EAAE,iBAAiB,2CAoBvD"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Box, Text } from 'ink';
|
|
3
|
+
import { StyledBox } from './StyledBox.js';
|
|
4
|
+
export function ShortcutsBox({ data }) {
|
|
5
|
+
return (_jsx(StyledBox, { title: "Keyboard Shortcuts", children: data.categories.map((category, catIndex) => (_jsxs(Box, { flexDirection: "column", marginTop: catIndex === 0 ? 0 : 1, children: [_jsx(Text, { bold: true, color: "cyan", children: category.name }), category.shortcuts.map((shortcut) => (_jsxs(Box, { marginLeft: 2, children: [_jsx(Box, { width: 16, children: _jsx(Text, { color: "cyan", children: shortcut.keys }) }), _jsx(Text, { color: "gray", children: shortcut.description })] }, shortcut.keys)))] }, category.name))) }));
|
|
6
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* StatsBox - Styled output for /stats command
|
|
3
|
+
*/
|
|
4
|
+
import type { StatsStyledData } from '../../../state/types.js';
|
|
5
|
+
interface StatsBoxProps {
|
|
6
|
+
data: StatsStyledData;
|
|
7
|
+
}
|
|
8
|
+
export declare function StatsBox({ data }: StatsBoxProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=StatsBox.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StatsBox.d.ts","sourceRoot":"","sources":["../../../../../../src/cli/ink-cli/components/chat/styled-boxes/StatsBox.tsx"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAG/D,UAAU,aAAa;IACnB,IAAI,EAAE,eAAe,CAAC;CACzB;AA4BD,wBAAgB,QAAQ,CAAC,EAAE,IAAI,EAAE,EAAE,aAAa,2CAmE/C"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { StyledBox, StyledSection, StyledRow } from './StyledBox.js';
|
|
3
|
+
/**
|
|
4
|
+
* Format a number with K/M suffixes for compact display
|
|
5
|
+
*/
|
|
6
|
+
function formatTokenCount(count) {
|
|
7
|
+
if (count >= 1_000_000) {
|
|
8
|
+
return `${(count / 1_000_000).toFixed(1)}M`;
|
|
9
|
+
}
|
|
10
|
+
if (count >= 1_000) {
|
|
11
|
+
return `${(count / 1_000).toFixed(1)}K`;
|
|
12
|
+
}
|
|
13
|
+
return count.toString();
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Format cost in USD with appropriate precision
|
|
17
|
+
*/
|
|
18
|
+
function formatCost(cost) {
|
|
19
|
+
if (cost < 0.01) {
|
|
20
|
+
return `$${cost.toFixed(4)}`;
|
|
21
|
+
}
|
|
22
|
+
if (cost < 1) {
|
|
23
|
+
return `$${cost.toFixed(3)}`;
|
|
24
|
+
}
|
|
25
|
+
return `$${cost.toFixed(2)}`;
|
|
26
|
+
}
|
|
27
|
+
export function StatsBox({ data }) {
|
|
28
|
+
return (_jsxs(StyledBox, { title: "System Statistics", children: [_jsxs(StyledSection, { title: "Sessions", children: [_jsx(StyledRow, { label: "Total Sessions", value: data.sessions.total.toString() }), _jsx(StyledRow, { label: "In Memory", value: data.sessions.inMemory.toString() }), _jsx(StyledRow, { label: "Max Allowed", value: data.sessions.maxAllowed.toString() })] }), _jsxs(StyledSection, { title: "MCP Servers", children: [_jsx(StyledRow, { label: "Connected", value: data.mcp.connected.toString(), valueColor: "green" }), data.mcp.failed > 0 && (_jsx(StyledRow, { label: "Failed", value: data.mcp.failed.toString(), valueColor: "red" })), _jsx(StyledRow, { label: "Available Tools", value: data.mcp.toolCount.toString() })] }), data.tokenUsage && (_jsxs(StyledSection, { title: "Token Usage (This Session)", children: [_jsx(StyledRow, { label: "Input", value: formatTokenCount(data.tokenUsage.inputTokens) }), _jsx(StyledRow, { label: "Output", value: formatTokenCount(data.tokenUsage.outputTokens) }), data.tokenUsage.reasoningTokens > 0 && (_jsx(StyledRow, { label: "Reasoning", value: formatTokenCount(data.tokenUsage.reasoningTokens) })), data.tokenUsage.cacheReadTokens > 0 && (_jsx(StyledRow, { label: "Cache Read", value: formatTokenCount(data.tokenUsage.cacheReadTokens), valueColor: "cyan" })), data.tokenUsage.cacheWriteTokens > 0 && (_jsx(StyledRow, { label: "Cache Write", value: formatTokenCount(data.tokenUsage.cacheWriteTokens), valueColor: "orange" })), _jsx(StyledRow, { label: "Total", value: formatTokenCount(data.tokenUsage.totalTokens), valueColor: "blue" }), data.estimatedCost !== undefined && (_jsx(StyledRow, { label: "Est. Cost", value: formatCost(data.estimatedCost), valueColor: "green" }))] }))] }));
|
|
29
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* StyledBox - Base component for styled command output
|
|
3
|
+
* Provides consistent box styling for structured output
|
|
4
|
+
*/
|
|
5
|
+
import React from 'react';
|
|
6
|
+
interface StyledBoxProps {
|
|
7
|
+
title: string;
|
|
8
|
+
titleColor?: string;
|
|
9
|
+
children: React.ReactNode;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Base styled box component with rounded border and title
|
|
13
|
+
* Automatically adjusts width to terminal size
|
|
14
|
+
*/
|
|
15
|
+
export declare function StyledBox({ title, titleColor, children }: StyledBoxProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
interface StyledSectionProps {
|
|
17
|
+
title: string;
|
|
18
|
+
icon?: string;
|
|
19
|
+
children: React.ReactNode;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Section within a styled box
|
|
23
|
+
*/
|
|
24
|
+
export declare function StyledSection({ title, icon, children }: StyledSectionProps): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
interface StyledRowProps {
|
|
26
|
+
label: string;
|
|
27
|
+
value: string;
|
|
28
|
+
valueColor?: string;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Key-value row within a section
|
|
32
|
+
*/
|
|
33
|
+
export declare function StyledRow({ label, value, valueColor }: StyledRowProps): import("react/jsx-runtime").JSX.Element;
|
|
34
|
+
interface StyledListItemProps {
|
|
35
|
+
icon?: string;
|
|
36
|
+
text: string;
|
|
37
|
+
isActive?: boolean;
|
|
38
|
+
dimmed?: boolean;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* List item with optional icon and active state
|
|
42
|
+
*/
|
|
43
|
+
export declare function StyledListItem({ icon, text, isActive, dimmed }: StyledListItemProps): import("react/jsx-runtime").JSX.Element;
|
|
44
|
+
export {};
|
|
45
|
+
//# sourceMappingURL=StyledBox.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StyledBox.d.ts","sourceRoot":"","sources":["../../../../../../src/cli/ink-cli/components/chat/styled-boxes/StyledBox.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,UAAU,cAAc;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC7B;AAED;;;GAGG;AACH,wBAAgB,SAAS,CAAC,EAAE,KAAK,EAAE,UAAmB,EAAE,QAAQ,EAAE,EAAE,cAAc,2CAwBjF;AAED,UAAU,kBAAkB;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC7B;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,kBAAkB,2CAY1E;AAED,UAAU,cAAc;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;GAEG;AACH,wBAAgB,SAAS,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,UAAmB,EAAE,EAAE,cAAc,2CAO9E;AAED,UAAU,mBAAmB;IACzB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,mBAAmB,2CAiBnF"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Box, Text } from 'ink';
|
|
3
|
+
import { useTerminalSize } from '../../../hooks/useTerminalSize.js';
|
|
4
|
+
/**
|
|
5
|
+
* Base styled box component with rounded border and title
|
|
6
|
+
* Automatically adjusts width to terminal size
|
|
7
|
+
*/
|
|
8
|
+
export function StyledBox({ title, titleColor = 'cyan', children }) {
|
|
9
|
+
const { columns } = useTerminalSize();
|
|
10
|
+
return (_jsx(Box, { flexDirection: "column", marginBottom: 1, width: columns, children: _jsxs(Box, { flexDirection: "column", borderStyle: "round", borderColor: "gray", paddingX: 1, paddingY: 0, children: [_jsx(Box, { marginBottom: 0, children: _jsx(Text, { bold: true, color: titleColor, children: title }) }), children] }) }));
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Section within a styled box
|
|
14
|
+
*/
|
|
15
|
+
export function StyledSection({ title, icon, children }) {
|
|
16
|
+
return (_jsxs(Box, { flexDirection: "column", marginTop: 1, children: [_jsxs(Text, { bold: true, children: [icon && `${icon} `, title] }), _jsx(Box, { flexDirection: "column", marginLeft: 2, children: children })] }));
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Key-value row within a section
|
|
20
|
+
*/
|
|
21
|
+
export function StyledRow({ label, value, valueColor = 'cyan' }) {
|
|
22
|
+
return (_jsxs(Box, { children: [_jsxs(Text, { color: "gray", children: [label, ": "] }), _jsx(Text, { color: valueColor, children: value })] }));
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* List item with optional icon and active state
|
|
26
|
+
*/
|
|
27
|
+
export function StyledListItem({ icon, text, isActive, dimmed }) {
|
|
28
|
+
// Build props object conditionally to avoid undefined with exactOptionalPropertyTypes
|
|
29
|
+
const textProps = {};
|
|
30
|
+
if (isActive) {
|
|
31
|
+
textProps.color = 'green';
|
|
32
|
+
textProps.bold = true;
|
|
33
|
+
}
|
|
34
|
+
if (dimmed) {
|
|
35
|
+
textProps.color = 'gray';
|
|
36
|
+
}
|
|
37
|
+
return (_jsxs(Box, { children: [icon && _jsxs(Text, { ...textProps, children: [icon, " "] }), _jsx(Text, { ...textProps, children: text })] }));
|
|
38
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SyspromptBox - Styled output for /sysprompt command
|
|
3
|
+
*/
|
|
4
|
+
import type { SysPromptStyledData } from '../../../state/types.js';
|
|
5
|
+
interface SyspromptBoxProps {
|
|
6
|
+
data: SysPromptStyledData;
|
|
7
|
+
}
|
|
8
|
+
export declare function SyspromptBox({ data }: SyspromptBoxProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=SyspromptBox.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SyspromptBox.d.ts","sourceRoot":"","sources":["../../../../../../src/cli/ink-cli/components/chat/styled-boxes/SyspromptBox.tsx"],"names":[],"mappings":"AAAA;;GAEG;AAIH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAGnE,UAAU,iBAAiB;IACvB,IAAI,EAAE,mBAAmB,CAAC;CAC7B;AAED,wBAAgB,YAAY,CAAC,EAAE,IAAI,EAAE,EAAE,iBAAiB,2CAQvD"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Box, Text } from 'ink';
|
|
3
|
+
import { StyledBox } from './StyledBox.js';
|
|
4
|
+
export function SyspromptBox({ data }) {
|
|
5
|
+
return (_jsx(StyledBox, { title: "System Prompt", titleColor: "green", children: _jsx(Box, { marginTop: 1, flexDirection: "column", children: _jsx(Text, { children: data.content }) }) }));
|
|
6
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Styled boxes for command output
|
|
3
|
+
*/
|
|
4
|
+
export { StyledBox, StyledSection, StyledRow, StyledListItem } from './StyledBox.js';
|
|
5
|
+
export { ConfigBox } from './ConfigBox.js';
|
|
6
|
+
export { StatsBox } from './StatsBox.js';
|
|
7
|
+
export { HelpBox } from './HelpBox.js';
|
|
8
|
+
export { SessionListBox } from './SessionListBox.js';
|
|
9
|
+
export { SessionHistoryBox } from './SessionHistoryBox.js';
|
|
10
|
+
export { LogConfigBox } from './LogConfigBox.js';
|
|
11
|
+
export { ShortcutsBox } from './ShortcutsBox.js';
|
|
12
|
+
export { SyspromptBox } from './SyspromptBox.js';
|
|
13
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/cli/ink-cli/components/chat/styled-boxes/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AACrF,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Styled boxes for command output
|
|
3
|
+
*/
|
|
4
|
+
export { StyledBox, StyledSection, StyledRow, StyledListItem } from './StyledBox.js';
|
|
5
|
+
export { ConfigBox } from './ConfigBox.js';
|
|
6
|
+
export { StatsBox } from './StatsBox.js';
|
|
7
|
+
export { HelpBox } from './HelpBox.js';
|
|
8
|
+
export { SessionListBox } from './SessionListBox.js';
|
|
9
|
+
export { SessionHistoryBox } from './SessionHistoryBox.js';
|
|
10
|
+
export { LogConfigBox } from './LogConfigBox.js';
|
|
11
|
+
export { ShortcutsBox } from './ShortcutsBox.js';
|
|
12
|
+
export { SyspromptBox } from './SyspromptBox.js';
|
|
@@ -1,18 +1,46 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* InputArea Component
|
|
3
|
-
*
|
|
3
|
+
* Wrapper around TextBufferInput - accepts buffer from parent
|
|
4
4
|
*/
|
|
5
|
+
import { type OverlayTrigger } from '../TextBufferInput.js';
|
|
6
|
+
import type { TextBuffer } from '../shared/text-buffer.js';
|
|
7
|
+
import type { PendingImage, PastedBlock } from '../../state/types.js';
|
|
8
|
+
export type { OverlayTrigger };
|
|
5
9
|
interface InputAreaProps {
|
|
6
|
-
|
|
7
|
-
|
|
10
|
+
/** Text buffer (owned by parent) */
|
|
11
|
+
buffer: TextBuffer;
|
|
12
|
+
/** Called when user submits */
|
|
8
13
|
onSubmit: (value: string) => void;
|
|
9
|
-
|
|
14
|
+
/** Whether input is currently disabled */
|
|
10
15
|
isDisabled: boolean;
|
|
16
|
+
/** Whether input should handle keypresses */
|
|
17
|
+
isActive: boolean;
|
|
18
|
+
/** Placeholder text */
|
|
11
19
|
placeholder?: string | undefined;
|
|
12
|
-
|
|
13
|
-
historyIndex?: number | undefined;
|
|
20
|
+
/** History navigation callback */
|
|
14
21
|
onHistoryNavigate?: ((direction: 'up' | 'down') => void) | undefined;
|
|
22
|
+
/** Overlay trigger callback */
|
|
23
|
+
onTriggerOverlay?: ((trigger: OverlayTrigger) => void) | undefined;
|
|
24
|
+
/** Keyboard scroll callback (for alternate buffer mode) */
|
|
25
|
+
onKeyboardScroll?: ((direction: 'up' | 'down') => void) | undefined;
|
|
26
|
+
/** Current number of attached images (for placeholder numbering) */
|
|
27
|
+
imageCount?: number | undefined;
|
|
28
|
+
/** Called when image is pasted from clipboard */
|
|
29
|
+
onImagePaste?: ((image: PendingImage) => void) | undefined;
|
|
30
|
+
/** Current pending images (for placeholder removal detection) */
|
|
31
|
+
images?: PendingImage[] | undefined;
|
|
32
|
+
/** Called when an image placeholder is removed from text */
|
|
33
|
+
onImageRemove?: ((imageId: string) => void) | undefined;
|
|
34
|
+
/** Current pasted blocks for collapse/expand feature */
|
|
35
|
+
pastedBlocks?: PastedBlock[] | undefined;
|
|
36
|
+
/** Called when a large paste is detected and should be collapsed */
|
|
37
|
+
onPasteBlock?: ((block: PastedBlock) => void) | undefined;
|
|
38
|
+
/** Called to update a pasted block (e.g., toggle collapse) */
|
|
39
|
+
onPasteBlockUpdate?: ((blockId: string, updates: Partial<PastedBlock>) => void) | undefined;
|
|
40
|
+
/** Called when a paste block placeholder is removed from text */
|
|
41
|
+
onPasteBlockRemove?: ((blockId: string) => void) | undefined;
|
|
42
|
+
/** Query to highlight in input text (for history search) */
|
|
43
|
+
highlightQuery?: string | undefined;
|
|
15
44
|
}
|
|
16
|
-
export declare function InputArea({
|
|
17
|
-
export {};
|
|
45
|
+
export declare function InputArea({ buffer, onSubmit, isDisabled, isActive, placeholder, onHistoryNavigate, onTriggerOverlay, onKeyboardScroll, imageCount, onImagePaste, images, onImageRemove, pastedBlocks, onPasteBlock, onPasteBlockUpdate, onPasteBlockRemove, highlightQuery, }: InputAreaProps): import("react/jsx-runtime").JSX.Element;
|
|
18
46
|
//# sourceMappingURL=InputArea.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputArea.d.ts","sourceRoot":"","sources":["../../../../../src/cli/ink-cli/components/input/InputArea.tsx"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"InputArea.d.ts","sourceRoot":"","sources":["../../../../../src/cli/ink-cli/components/input/InputArea.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAmB,KAAK,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAC7E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAEtE,YAAY,EAAE,cAAc,EAAE,CAAC;AAE/B,UAAU,cAAc;IACpB,oCAAoC;IACpC,MAAM,EAAE,UAAU,CAAC;IACnB,+BAA+B;IAC/B,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,0CAA0C;IAC1C,UAAU,EAAE,OAAO,CAAC;IACpB,6CAA6C;IAC7C,QAAQ,EAAE,OAAO,CAAC;IAClB,uBAAuB;IACvB,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,kCAAkC;IAClC,iBAAiB,CAAC,EAAE,CAAC,CAAC,SAAS,EAAE,IAAI,GAAG,MAAM,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;IACrE,+BAA+B;IAC/B,gBAAgB,CAAC,EAAE,CAAC,CAAC,OAAO,EAAE,cAAc,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;IACnE,2DAA2D;IAC3D,gBAAgB,CAAC,EAAE,CAAC,CAAC,SAAS,EAAE,IAAI,GAAG,MAAM,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;IACpE,oEAAoE;IACpE,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,iDAAiD;IACjD,YAAY,CAAC,EAAE,CAAC,CAAC,KAAK,EAAE,YAAY,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;IAC3D,iEAAiE;IACjE,MAAM,CAAC,EAAE,YAAY,EAAE,GAAG,SAAS,CAAC;IACpC,4DAA4D;IAC5D,aAAa,CAAC,EAAE,CAAC,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;IACxD,wDAAwD;IACxD,YAAY,CAAC,EAAE,WAAW,EAAE,GAAG,SAAS,CAAC;IACzC,oEAAoE;IACpE,YAAY,CAAC,EAAE,CAAC,CAAC,KAAK,EAAE,WAAW,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;IAC1D,8DAA8D;IAC9D,kBAAkB,CAAC,EAAE,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;IAC5F,iEAAiE;IACjE,kBAAkB,CAAC,EAAE,CAAC,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;IAC7D,4DAA4D;IAC5D,cAAc,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACvC;AAED,wBAAgB,SAAS,CAAC,EACtB,MAAM,EACN,QAAQ,EACR,UAAU,EACV,QAAQ,EACR,WAAW,EACX,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,EAChB,UAAU,EACV,YAAY,EACZ,MAAM,EACN,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,kBAAkB,EAClB,kBAAkB,EAClB,cAAc,GACjB,EAAE,cAAc,2CAwBhB"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Box } from 'ink';
|
|
3
|
-
import {
|
|
4
|
-
export function InputArea({
|
|
5
|
-
return (_jsx(Box, { flexDirection: "column", children: _jsx(
|
|
3
|
+
import { TextBufferInput } from '../TextBufferInput.js';
|
|
4
|
+
export function InputArea({ buffer, onSubmit, isDisabled, isActive, placeholder, onHistoryNavigate, onTriggerOverlay, onKeyboardScroll, imageCount, onImagePaste, images, onImageRemove, pastedBlocks, onPasteBlock, onPasteBlockUpdate, onPasteBlockRemove, highlightQuery, }) {
|
|
5
|
+
return (_jsx(Box, { flexDirection: "column", children: _jsx(TextBufferInput, { buffer: buffer, onSubmit: onSubmit, placeholder: placeholder, isDisabled: isDisabled, isActive: isActive, onHistoryNavigate: onHistoryNavigate, onTriggerOverlay: onTriggerOverlay, onKeyboardScroll: onKeyboardScroll, imageCount: imageCount, onImagePaste: onImagePaste, images: images, onImageRemove: onImageRemove, pastedBlocks: pastedBlocks, onPasteBlock: onPasteBlock, onPasteBlockUpdate: onPasteBlockUpdate, onPasteBlockRemove: onPasteBlockRemove, highlightQuery: highlightQuery }) }));
|
|
6
6
|
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AlternateBufferCLI - VirtualizedList rendering mode
|
|
3
|
+
*
|
|
4
|
+
* Uses the terminal's alternate buffer for a fullscreen, scrollable UI.
|
|
5
|
+
* Features:
|
|
6
|
+
* - VirtualizedList for efficient message rendering
|
|
7
|
+
* - Mouse scroll support via ScrollProvider
|
|
8
|
+
* - Keyboard scroll (PageUp/PageDown, Shift+Arrow)
|
|
9
|
+
* - Copy mode toggle (Ctrl+S)
|
|
10
|
+
* - Selection hint when user tries to drag without Option key
|
|
11
|
+
*/
|
|
12
|
+
import type { DextoAgent } from '@dexto/core';
|
|
13
|
+
import type { StartupInfo } from '../../state/types.js';
|
|
14
|
+
interface AlternateBufferCLIProps {
|
|
15
|
+
agent: DextoAgent;
|
|
16
|
+
initialSessionId: string | null;
|
|
17
|
+
startupInfo: StartupInfo;
|
|
18
|
+
/** Callback when user attempts to select text (drag without Option key) */
|
|
19
|
+
onSelectionAttempt?: () => void;
|
|
20
|
+
/** Whether to stream chunks or wait for complete response */
|
|
21
|
+
useStreaming?: boolean;
|
|
22
|
+
}
|
|
23
|
+
export declare function AlternateBufferCLI({ agent, initialSessionId, startupInfo, onSelectionAttempt, useStreaming, }: AlternateBufferCLIProps): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export {};
|
|
25
|
+
//# sourceMappingURL=AlternateBufferCLI.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AlternateBufferCLI.d.ts","sourceRoot":"","sources":["../../../../../src/cli/ink-cli/components/modes/AlternateBufferCLI.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAIH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAG9C,OAAO,KAAK,EAAW,WAAW,EAAE,MAAM,sBAAsB,CAAC;AA2BjE,UAAU,uBAAuB;IAC7B,KAAK,EAAE,UAAU,CAAC;IAClB,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,WAAW,EAAE,WAAW,CAAC;IACzB,2EAA2E;IAC3E,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAC;IAChC,6DAA6D;IAC7D,YAAY,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED,wBAAgB,kBAAkB,CAAC,EAC/B,KAAK,EACL,gBAAgB,EAChB,WAAW,EACX,kBAAkB,EAClB,YAAmB,GACtB,EAAE,uBAAuB,2CAgTzB"}
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* AlternateBufferCLI - VirtualizedList rendering mode
|
|
4
|
+
*
|
|
5
|
+
* Uses the terminal's alternate buffer for a fullscreen, scrollable UI.
|
|
6
|
+
* Features:
|
|
7
|
+
* - VirtualizedList for efficient message rendering
|
|
8
|
+
* - Mouse scroll support via ScrollProvider
|
|
9
|
+
* - Keyboard scroll (PageUp/PageDown, Shift+Arrow)
|
|
10
|
+
* - Copy mode toggle (Ctrl+S)
|
|
11
|
+
* - Selection hint when user tries to drag without Option key
|
|
12
|
+
*/
|
|
13
|
+
import { useMemo, useCallback, useRef, useState, useEffect } from 'react';
|
|
14
|
+
import { Box, Text } from 'ink';
|
|
15
|
+
// Hooks
|
|
16
|
+
import { useTerminalSize } from '../../hooks/index.js';
|
|
17
|
+
import { useCLIState } from '../../hooks/useCLIState.js';
|
|
18
|
+
import { useScrollable } from '../../contexts/index.js';
|
|
19
|
+
// Components
|
|
20
|
+
import { Header } from '../chat/Header.js';
|
|
21
|
+
import { MessageItem } from '../chat/MessageItem.js';
|
|
22
|
+
import { QueuedMessagesDisplay } from '../chat/QueuedMessagesDisplay.js';
|
|
23
|
+
import { StatusBar } from '../StatusBar.js';
|
|
24
|
+
import { HistorySearchBar } from '../HistorySearchBar.js';
|
|
25
|
+
import { Footer } from '../Footer.js';
|
|
26
|
+
import { VirtualizedList, SCROLL_TO_ITEM_END, } from '../shared/VirtualizedList.js';
|
|
27
|
+
// Containers
|
|
28
|
+
import { InputContainer } from '../../containers/InputContainer.js';
|
|
29
|
+
import { OverlayContainer } from '../../containers/OverlayContainer.js';
|
|
30
|
+
export function AlternateBufferCLI({ agent, initialSessionId, startupInfo, onSelectionAttempt, useStreaming = true, }) {
|
|
31
|
+
// Refs for VirtualizedList
|
|
32
|
+
const listRef = useRef(null);
|
|
33
|
+
const listContainerRef = useRef(null);
|
|
34
|
+
// Ref to InputContainer for programmatic submit
|
|
35
|
+
const inputContainerRef = useRef(null);
|
|
36
|
+
// Selection hint state
|
|
37
|
+
const [selectionHintVisible, setSelectionHintVisible] = useState(false);
|
|
38
|
+
// Keyboard scroll handler for VirtualizedList
|
|
39
|
+
const handleKeyboardScroll = useCallback((direction) => {
|
|
40
|
+
const delta = direction === 'up' ? -10 : 10;
|
|
41
|
+
listRef.current?.scrollBy(delta);
|
|
42
|
+
}, []);
|
|
43
|
+
// Use shared CLI state with keyboard scroll handler
|
|
44
|
+
const { messages, setMessages, pendingMessages, setPendingMessages, dequeuedBuffer, setDequeuedBuffer, queuedMessages, setQueuedMessages, ui, setUi, input, setInput, session, setSession, approval, setApproval, approvalQueue, setApprovalQueue, inputService, buffer, overlayContainerRef, visibleMessages, } = useCLIState({
|
|
45
|
+
agent,
|
|
46
|
+
initialSessionId,
|
|
47
|
+
startupInfo,
|
|
48
|
+
onKeyboardScroll: handleKeyboardScroll,
|
|
49
|
+
});
|
|
50
|
+
// Register the VirtualizedList as scrollable so ScrollProvider can handle mouse scroll
|
|
51
|
+
const getScrollState = useCallback(() => {
|
|
52
|
+
const scrollState = listRef.current?.getScrollState();
|
|
53
|
+
return scrollState ?? { scrollTop: 0, scrollHeight: 0, innerHeight: 0 };
|
|
54
|
+
}, []);
|
|
55
|
+
const scrollBy = useCallback((delta) => {
|
|
56
|
+
listRef.current?.scrollBy(delta);
|
|
57
|
+
}, []);
|
|
58
|
+
const hasFocus = useCallback(() => true, []); // List always has focus for scroll
|
|
59
|
+
// Compute whether history search has a match (for HistorySearchBar indicator)
|
|
60
|
+
const historySearchHasMatch = useMemo(() => {
|
|
61
|
+
if (!ui.historySearch.isActive || !ui.historySearch.query)
|
|
62
|
+
return false;
|
|
63
|
+
const query = ui.historySearch.query.toLowerCase();
|
|
64
|
+
return input.history.some((item) => item.toLowerCase().includes(query));
|
|
65
|
+
}, [ui.historySearch.isActive, ui.historySearch.query, input.history]);
|
|
66
|
+
// Callback for OverlayContainer to submit prompt commands through InputContainer
|
|
67
|
+
const handleSubmitPromptCommand = useCallback(async (commandText) => {
|
|
68
|
+
try {
|
|
69
|
+
await inputContainerRef.current?.submit(commandText);
|
|
70
|
+
}
|
|
71
|
+
catch (error) {
|
|
72
|
+
agent.logger.error(`AlternateBufferCLI.handleSubmitPromptCommand failed: ${error instanceof Error ? error.message : String(error)}`);
|
|
73
|
+
}
|
|
74
|
+
}, [agent]);
|
|
75
|
+
useScrollable({
|
|
76
|
+
ref: listContainerRef,
|
|
77
|
+
getScrollState,
|
|
78
|
+
scrollBy,
|
|
79
|
+
hasFocus,
|
|
80
|
+
}, true // Always active in alternate buffer mode
|
|
81
|
+
);
|
|
82
|
+
// Handle selection attempt - show hint
|
|
83
|
+
const handleSelectionAttempt = useCallback(() => {
|
|
84
|
+
setSelectionHintVisible(true);
|
|
85
|
+
onSelectionAttempt?.();
|
|
86
|
+
}, [onSelectionAttempt]);
|
|
87
|
+
// Auto-hide selection hint after 3 seconds
|
|
88
|
+
useEffect(() => {
|
|
89
|
+
if (!selectionHintVisible)
|
|
90
|
+
return;
|
|
91
|
+
const timer = setTimeout(() => {
|
|
92
|
+
setSelectionHintVisible(false);
|
|
93
|
+
}, 3000);
|
|
94
|
+
return () => clearTimeout(timer);
|
|
95
|
+
}, [selectionHintVisible]);
|
|
96
|
+
// Get terminal dimensions - updates on resize
|
|
97
|
+
const { rows: terminalHeight } = useTerminalSize();
|
|
98
|
+
// Build list data: header as first item, then finalized + pending + dequeued buffer
|
|
99
|
+
// In alternate buffer mode, everything is re-rendered anyway, so we combine all
|
|
100
|
+
// Order: finalized messages → pending/streaming → dequeued user messages (guarantees order)
|
|
101
|
+
const listData = useMemo(() => {
|
|
102
|
+
const items = [{ type: 'header' }];
|
|
103
|
+
for (const msg of visibleMessages) {
|
|
104
|
+
items.push({ type: 'message', message: msg });
|
|
105
|
+
}
|
|
106
|
+
// Add pending/streaming messages
|
|
107
|
+
for (const msg of pendingMessages) {
|
|
108
|
+
items.push({ type: 'message', message: msg });
|
|
109
|
+
}
|
|
110
|
+
// Add dequeued buffer (user messages waiting to be flushed to finalized)
|
|
111
|
+
// These render AFTER pending to guarantee correct visual order
|
|
112
|
+
for (const msg of dequeuedBuffer) {
|
|
113
|
+
items.push({ type: 'message', message: msg });
|
|
114
|
+
}
|
|
115
|
+
return items;
|
|
116
|
+
}, [visibleMessages, pendingMessages, dequeuedBuffer]);
|
|
117
|
+
// Render callback for VirtualizedList items
|
|
118
|
+
const renderListItem = useCallback(({ item }) => {
|
|
119
|
+
if (item.type === 'header') {
|
|
120
|
+
return (_jsx(Header, { modelName: session.modelName, sessionId: session.id || undefined, hasActiveSession: session.hasActiveSession, startupInfo: startupInfo }));
|
|
121
|
+
}
|
|
122
|
+
return _jsx(MessageItem, { message: item.message });
|
|
123
|
+
}, [session.modelName, session.id, session.hasActiveSession, startupInfo]);
|
|
124
|
+
// Smart height estimation based on item type and content
|
|
125
|
+
const estimateItemHeight = useCallback((index) => {
|
|
126
|
+
const item = listData[index];
|
|
127
|
+
if (!item)
|
|
128
|
+
return 3;
|
|
129
|
+
// Header is approximately 10 lines (logo + info)
|
|
130
|
+
if (item.type === 'header') {
|
|
131
|
+
return 10;
|
|
132
|
+
}
|
|
133
|
+
const msg = item.message;
|
|
134
|
+
// Tool messages with results are taller
|
|
135
|
+
if (msg.role === 'tool') {
|
|
136
|
+
if (msg.toolResult) {
|
|
137
|
+
const resultLines = Math.ceil(msg.toolResult.length / 80);
|
|
138
|
+
return Math.min(2 + resultLines, 10);
|
|
139
|
+
}
|
|
140
|
+
return 2;
|
|
141
|
+
}
|
|
142
|
+
// User messages have margin and background
|
|
143
|
+
if (msg.role === 'user') {
|
|
144
|
+
const contentLines = Math.ceil(msg.content.length / 80);
|
|
145
|
+
return Math.max(3, contentLines + 2);
|
|
146
|
+
}
|
|
147
|
+
// Assistant messages
|
|
148
|
+
if (msg.role === 'assistant') {
|
|
149
|
+
if (msg.isStreaming)
|
|
150
|
+
return 5;
|
|
151
|
+
const contentLines = Math.ceil(msg.content.length / 80);
|
|
152
|
+
return Math.max(2, contentLines + 1);
|
|
153
|
+
}
|
|
154
|
+
// System/styled messages
|
|
155
|
+
if (msg.styledType) {
|
|
156
|
+
return 8;
|
|
157
|
+
}
|
|
158
|
+
return 3;
|
|
159
|
+
}, [listData]);
|
|
160
|
+
const getItemKey = useCallback((item) => {
|
|
161
|
+
if (item.type === 'header')
|
|
162
|
+
return 'header';
|
|
163
|
+
return item.message.id;
|
|
164
|
+
}, []);
|
|
165
|
+
return (_jsxs(Box, { flexDirection: "column", height: terminalHeight, children: [_jsx(Box, { ref: listContainerRef, flexGrow: 1, flexShrink: 1, minHeight: 0, children: _jsx(VirtualizedList, { ref: listRef, data: listData, renderItem: renderListItem, estimatedItemHeight: estimateItemHeight, keyExtractor: getItemKey, initialScrollIndex: SCROLL_TO_ITEM_END, initialScrollOffsetInIndex: SCROLL_TO_ITEM_END }) }), _jsxs(Box, { flexDirection: "column", flexShrink: 0, children: [_jsx(StatusBar, { agent: agent, isProcessing: ui.isProcessing, isThinking: ui.isThinking, approvalQueueCount: approvalQueue.length, copyModeEnabled: ui.copyModeEnabled, isAwaitingApproval: approval !== null }), selectionHintVisible && (_jsx(Box, { paddingX: 1, children: _jsx(Text, { color: "yellowBright", children: "\uD83D\uDCA1 Tip: Hold Option (\u2325) and click to select text, or press Ctrl+S to toggle copy mode" }) })), _jsx(QueuedMessagesDisplay, { messages: queuedMessages }), _jsx(InputContainer, { ref: inputContainerRef, buffer: buffer, input: input, ui: ui, session: session, approval: approval, queuedMessages: queuedMessages, setInput: setInput, setUi: setUi, setSession: setSession, setMessages: setMessages, setPendingMessages: setPendingMessages, setDequeuedBuffer: setDequeuedBuffer, setQueuedMessages: setQueuedMessages, setApproval: setApproval, setApprovalQueue: setApprovalQueue, agent: agent, inputService: inputService, onKeyboardScroll: handleKeyboardScroll, useStreaming: useStreaming }), _jsx(OverlayContainer, { ref: overlayContainerRef, ui: ui, input: input, session: session, approval: approval, setInput: setInput, setUi: setUi, setSession: setSession, setMessages: setMessages, setApproval: setApproval, setApprovalQueue: setApprovalQueue, agent: agent, inputService: inputService, buffer: buffer, onSubmitPromptCommand: handleSubmitPromptCommand }), ui.exitWarningShown && (_jsxs(Box, { paddingX: 1, children: [_jsx(Text, { color: "yellowBright", bold: true, children: "\u26A0 Press Ctrl+C again to exit" }), _jsx(Text, { color: "gray", children: " (or press any key to cancel)" })] })), _jsx(Footer, { modelName: session.modelName, cwd: process.cwd(), autoApproveEdits: ui.autoApproveEdits }), ui.historySearch.isActive && (_jsx(HistorySearchBar, { query: ui.historySearch.query, hasMatch: historySearchHasMatch }))] })] }));
|
|
166
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* StaticCLI - Static pattern rendering mode
|
|
3
|
+
*
|
|
4
|
+
* Uses Ink's Static component for copy-friendly terminal output.
|
|
5
|
+
* Features:
|
|
6
|
+
* - Static component for finalized messages (rendered to terminal scrollback)
|
|
7
|
+
* - Native terminal scrolling and text selection
|
|
8
|
+
* - No mouse event interception
|
|
9
|
+
* - Simpler, more compatible with traditional terminal workflows
|
|
10
|
+
*
|
|
11
|
+
* Architecture:
|
|
12
|
+
* - `messages` = finalized messages → rendered in <Static> (permanent output)
|
|
13
|
+
* - `pendingMessages` = streaming/in-progress → rendered dynamically (redrawn)
|
|
14
|
+
* This prevents duplicate output when streaming completes.
|
|
15
|
+
*/
|
|
16
|
+
import type { DextoAgent } from '@dexto/core';
|
|
17
|
+
import type { StartupInfo } from '../../state/types.js';
|
|
18
|
+
interface StaticCLIProps {
|
|
19
|
+
agent: DextoAgent;
|
|
20
|
+
initialSessionId: string | null;
|
|
21
|
+
startupInfo: StartupInfo;
|
|
22
|
+
/** Whether to stream chunks or wait for complete response */
|
|
23
|
+
useStreaming?: boolean;
|
|
24
|
+
}
|
|
25
|
+
export declare function StaticCLI({ agent, initialSessionId, startupInfo, useStreaming, }: StaticCLIProps): import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
export {};
|
|
27
|
+
//# sourceMappingURL=StaticCLI.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StaticCLI.d.ts","sourceRoot":"","sources":["../../../../../src/cli/ink-cli/components/modes/StaticCLI.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAM9C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAkBxD,UAAU,cAAc;IACpB,KAAK,EAAE,UAAU,CAAC;IAClB,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,WAAW,EAAE,WAAW,CAAC;IACzB,6DAA6D;IAC7D,YAAY,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED,wBAAgB,SAAS,CAAC,EACtB,KAAK,EACL,gBAAgB,EAChB,WAAW,EACX,YAAmB,GACtB,EAAE,cAAc,2CA2MhB"}
|