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
|
@@ -4,74 +4,115 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
4
4
|
* Reusable selector with keyboard navigation for lists
|
|
5
5
|
* Used by ModelSelector and SessionSelector
|
|
6
6
|
*/
|
|
7
|
-
import { useState, useEffect, useRef, useMemo, useCallback } from 'react';
|
|
8
|
-
import { Box, Text
|
|
7
|
+
import { useState, useEffect, useRef, useMemo, useCallback, forwardRef, useImperativeHandle, } from 'react';
|
|
8
|
+
import { Box, Text } from 'ink';
|
|
9
9
|
/**
|
|
10
10
|
* Generic selector component with keyboard navigation and scrolling
|
|
11
11
|
*/
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
function BaseSelectorInner({ items, isVisible, isLoading = false, selectedIndex, onSelectIndex, onSelect, onClose, formatItem, title, maxVisibleItems = 8, loadingMessage = 'Loading...', emptyMessage = 'No items found', borderColor = 'cyan', onTab, supportsTab = false, }, ref) {
|
|
13
|
+
// Track scroll offset as state, but derive during render when needed
|
|
14
|
+
const [scrollOffsetState, setScrollOffset] = useState(0);
|
|
14
15
|
const selectedIndexRef = useRef(selectedIndex);
|
|
15
|
-
|
|
16
|
+
const prevItemsLengthRef = useRef(items.length);
|
|
17
|
+
// Keep ref in sync
|
|
18
|
+
selectedIndexRef.current = selectedIndex;
|
|
19
|
+
// Derive the correct scroll offset during render (no second render needed)
|
|
20
|
+
// This handles both selectedIndex changes from parent AND items length changes
|
|
21
|
+
const scrollOffset = useMemo(() => {
|
|
22
|
+
const itemsChanged = items.length !== prevItemsLengthRef.current;
|
|
23
|
+
// Reset scroll if items changed significantly
|
|
24
|
+
if (itemsChanged && items.length <= maxVisibleItems) {
|
|
25
|
+
return 0;
|
|
26
|
+
}
|
|
27
|
+
let offset = scrollOffsetState;
|
|
28
|
+
// Adjust offset to keep selectedIndex visible
|
|
29
|
+
if (selectedIndex < offset) {
|
|
30
|
+
offset = selectedIndex;
|
|
31
|
+
}
|
|
32
|
+
else if (selectedIndex >= offset + maxVisibleItems) {
|
|
33
|
+
offset = Math.max(0, selectedIndex - maxVisibleItems + 1);
|
|
34
|
+
}
|
|
35
|
+
// Clamp to valid range
|
|
36
|
+
const maxOffset = Math.max(0, items.length - maxVisibleItems);
|
|
37
|
+
return Math.min(maxOffset, Math.max(0, offset));
|
|
38
|
+
}, [selectedIndex, items.length, maxVisibleItems, scrollOffsetState]);
|
|
39
|
+
// Update refs after render (not during useMemo which can run multiple times)
|
|
40
|
+
useEffect(() => {
|
|
41
|
+
prevItemsLengthRef.current = items.length;
|
|
42
|
+
}, [items.length]);
|
|
43
|
+
// Sync scroll offset state after render if it changed
|
|
44
|
+
// This ensures the stored state is correct for next navigation
|
|
45
|
+
useEffect(() => {
|
|
46
|
+
if (scrollOffset !== scrollOffsetState) {
|
|
47
|
+
setScrollOffset(scrollOffset);
|
|
48
|
+
}
|
|
49
|
+
}, [scrollOffset, scrollOffsetState]);
|
|
50
|
+
// Handle selection change - only updates parent state
|
|
16
51
|
const handleSelectIndex = useCallback((newIndex) => {
|
|
17
52
|
selectedIndexRef.current = newIndex;
|
|
18
53
|
onSelectIndex(newIndex);
|
|
19
54
|
}, [onSelectIndex]);
|
|
20
|
-
// Keep ref in sync with prop changes (e.g., when parent resets selection)
|
|
21
|
-
useEffect(() => {
|
|
22
|
-
selectedIndexRef.current = selectedIndex;
|
|
23
|
-
}, [selectedIndex]);
|
|
24
|
-
// Auto-scroll to keep selected item visible
|
|
25
|
-
useEffect(() => {
|
|
26
|
-
if (selectedIndex < scrollOffset) {
|
|
27
|
-
setScrollOffset(selectedIndex);
|
|
28
|
-
}
|
|
29
|
-
else if (selectedIndex >= scrollOffset + maxVisibleItems) {
|
|
30
|
-
setScrollOffset(Math.max(0, selectedIndex - maxVisibleItems + 1));
|
|
31
|
-
}
|
|
32
|
-
}, [selectedIndex, scrollOffset, maxVisibleItems]);
|
|
33
55
|
// Calculate visible items
|
|
34
56
|
const visibleItems = useMemo(() => {
|
|
35
57
|
return items.slice(scrollOffset, scrollOffset + maxVisibleItems);
|
|
36
58
|
}, [items, scrollOffset, maxVisibleItems]);
|
|
37
|
-
//
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
handleSelectIndex(nextIndex);
|
|
47
|
-
}
|
|
48
|
-
if (key.downArrow) {
|
|
49
|
-
const nextIndex = (selectedIndexRef.current + 1) % itemsLength;
|
|
50
|
-
handleSelectIndex(nextIndex);
|
|
51
|
-
}
|
|
52
|
-
if (key.escape) {
|
|
53
|
-
onClose();
|
|
54
|
-
}
|
|
55
|
-
if (key.return && itemsLength > 0) {
|
|
56
|
-
const item = items[selectedIndexRef.current];
|
|
57
|
-
if (item !== undefined) {
|
|
58
|
-
onSelect(item);
|
|
59
|
+
// Expose handleInput method via ref
|
|
60
|
+
useImperativeHandle(ref, () => ({
|
|
61
|
+
handleInput: (_input, key) => {
|
|
62
|
+
if (!isVisible)
|
|
63
|
+
return false;
|
|
64
|
+
// Escape always works, regardless of item count
|
|
65
|
+
if (key.escape) {
|
|
66
|
+
onClose();
|
|
67
|
+
return true;
|
|
59
68
|
}
|
|
60
|
-
|
|
61
|
-
|
|
69
|
+
const itemsLength = items.length;
|
|
70
|
+
if (itemsLength === 0)
|
|
71
|
+
return false;
|
|
72
|
+
if (key.upArrow) {
|
|
73
|
+
const nextIndex = (selectedIndexRef.current - 1 + itemsLength) % itemsLength;
|
|
74
|
+
handleSelectIndex(nextIndex);
|
|
75
|
+
return true;
|
|
76
|
+
}
|
|
77
|
+
if (key.downArrow) {
|
|
78
|
+
const nextIndex = (selectedIndexRef.current + 1) % itemsLength;
|
|
79
|
+
handleSelectIndex(nextIndex);
|
|
80
|
+
return true;
|
|
81
|
+
}
|
|
82
|
+
if (key.tab && onTab) {
|
|
83
|
+
const item = items[selectedIndexRef.current];
|
|
84
|
+
if (item !== undefined) {
|
|
85
|
+
onTab(item);
|
|
86
|
+
return true;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
if (key.return && itemsLength > 0) {
|
|
90
|
+
const item = items[selectedIndexRef.current];
|
|
91
|
+
if (item !== undefined) {
|
|
92
|
+
onSelect(item);
|
|
93
|
+
return true;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
return false;
|
|
97
|
+
},
|
|
98
|
+
}), [isVisible, items, handleSelectIndex, onClose, onSelect, onTab]);
|
|
62
99
|
if (!isVisible)
|
|
63
100
|
return null;
|
|
64
101
|
if (isLoading) {
|
|
65
|
-
return (_jsx(Box, {
|
|
102
|
+
return (_jsx(Box, { paddingX: 0, paddingY: 0, children: _jsx(Text, { color: "gray", children: loadingMessage }) }));
|
|
66
103
|
}
|
|
67
104
|
if (items.length === 0) {
|
|
68
|
-
return (_jsx(Box, {
|
|
105
|
+
return (_jsx(Box, { paddingX: 0, paddingY: 0, children: _jsx(Text, { color: "gray", children: emptyMessage }) }));
|
|
69
106
|
}
|
|
70
|
-
|
|
71
|
-
const
|
|
72
|
-
|
|
107
|
+
// Build instruction text based on features
|
|
108
|
+
const instructions = supportsTab
|
|
109
|
+
? '↑↓ navigate, Tab load, Enter select, Esc close'
|
|
110
|
+
: '↑↓ navigate, Enter select, Esc close';
|
|
111
|
+
return (_jsxs(Box, { flexDirection: "column", children: [_jsx(Box, { paddingX: 0, paddingY: 0, children: _jsxs(Text, { color: borderColor, bold: true, children: [title, " (", selectedIndex + 1, "/", items.length, ") - ", instructions] }) }), visibleItems.map((item, visibleIndex) => {
|
|
73
112
|
const actualIndex = scrollOffset + visibleIndex;
|
|
74
113
|
const isSelected = actualIndex === selectedIndex;
|
|
75
|
-
return (_jsx(Box, { paddingX:
|
|
76
|
-
})
|
|
114
|
+
return (_jsx(Box, { paddingX: 0, paddingY: 0, children: formatItem(item, isSelected) }, actualIndex));
|
|
115
|
+
})] }));
|
|
77
116
|
}
|
|
117
|
+
// Export with proper generic type support
|
|
118
|
+
export const BaseSelector = forwardRef(BaseSelectorInner);
|
|
@@ -4,5 +4,5 @@ import { Box, Text } from 'ink';
|
|
|
4
4
|
* Pure presentational component for CLI footer
|
|
5
5
|
*/
|
|
6
6
|
export function Footer() {
|
|
7
|
-
return (_jsx(Box, { borderStyle: "single", borderColor: "gray", paddingX: 1, children: _jsx(Text, {
|
|
7
|
+
return (_jsx(Box, { borderStyle: "single", borderColor: "gray", paddingX: 1, children: _jsx(Text, { color: "gray", children: "Shift+Enter/Ctrl+J: newline \u2022 Ctrl+W: del word \u2022 Ctrl+U: del line \u2022 Ctrl+C: exit" }) }));
|
|
8
8
|
}
|
|
@@ -11,6 +11,7 @@ interface HeaderProps {
|
|
|
11
11
|
}
|
|
12
12
|
/**
|
|
13
13
|
* Pure presentational component for CLI header
|
|
14
|
+
* Automatically adjusts width to terminal size
|
|
14
15
|
*/
|
|
15
16
|
export declare function Header({ modelName, sessionId, hasActiveSession, startupInfo }: HeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
16
17
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Header.d.ts","sourceRoot":"","sources":["../../../../../src/cli/ink-cli/components/chat/Header.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"Header.d.ts","sourceRoot":"","sources":["../../../../../src/cli/ink-cli/components/chat/Header.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAGxD,UAAU,WAAW;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B,gBAAgB,EAAE,OAAO,CAAC;IAC1B,WAAW,EAAE,WAAW,CAAC;CAC5B;AAED;;;GAGG;AACH,wBAAgB,MAAM,CAAC,EAAE,SAAS,EAAE,SAAS,EAAE,gBAAgB,EAAE,WAAW,EAAE,EAAE,WAAW,2CAgE1F"}
|
|
@@ -1,13 +1,16 @@
|
|
|
1
|
-
import { jsx as _jsx,
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Box, Text } from 'ink';
|
|
3
|
+
import { useTerminalSize } from '../../hooks/useTerminalSize.js';
|
|
3
4
|
/**
|
|
4
5
|
* Pure presentational component for CLI header
|
|
6
|
+
* Automatically adjusts width to terminal size
|
|
5
7
|
*/
|
|
6
8
|
export function Header({ modelName, sessionId, hasActiveSession, startupInfo }) {
|
|
7
|
-
|
|
9
|
+
const { columns } = useTerminalSize();
|
|
10
|
+
return (_jsxs(Box, { borderStyle: "single", borderColor: "gray", paddingX: 1, flexDirection: "column", flexShrink: 0, width: columns, children: [_jsx(Box, { marginTop: 1, children: _jsx(Text, { color: "greenBright", children: `██████╗ ███████╗██╗ ██╗████████╗ ██████╗
|
|
8
11
|
██╔══██╗██╔════╝╚██╗██╔╝╚══██╔══╝██╔═══██╗
|
|
9
12
|
██║ ██║█████╗ ╚███╔╝ ██║ ██║ ██║
|
|
10
13
|
██║ ██║██╔══╝ ██╔██╗ ██║ ██║ ██║
|
|
11
14
|
██████╔╝███████╗██╔╝ ██╗ ██║ ╚██████╔╝
|
|
12
|
-
╚═════╝ ╚══════╝╚═╝ ╚═╝ ╚═╝ ╚═════╝` }) }), _jsxs(Box, { marginTop: 1, flexDirection: "row", children: [
|
|
15
|
+
╚═════╝ ╚══════╝╚═╝ ╚═╝ ╚═╝ ╚═════╝` }) }), _jsxs(Box, { marginTop: 1, flexDirection: "row", children: [_jsx(Text, { color: "gray", children: "Model: " }), _jsx(Text, { color: "white", children: modelName }), hasActiveSession && sessionId && (_jsxs(_Fragment, { children: [_jsx(Text, { color: "gray", children: " \u2022 Session: " }), _jsx(Text, { color: "white", children: sessionId.slice(0, 8) })] }))] }), _jsxs(Box, { flexDirection: "row", children: [_jsx(Text, { color: "gray", children: "Servers: " }), _jsx(Text, { color: "white", children: startupInfo.connectedServers.count }), _jsx(Text, { color: "gray", children: " \u2022 Tools: " }), _jsx(Text, { color: "white", children: startupInfo.toolCount })] }), startupInfo.failedConnections.length > 0 && (_jsx(Box, { flexDirection: "row", children: _jsxs(Text, { color: "yellowBright", children: ["\u26A0\uFE0F Failed: ", startupInfo.failedConnections.join(', ')] }) })), startupInfo.logFile && (_jsx(Box, { flexDirection: "row", children: _jsxs(Text, { color: "gray", children: ["Logs: ", startupInfo.logFile] }) })), _jsx(Box, { marginBottom: 1, children: _jsx(Text, { children: " " }) })] }));
|
|
13
16
|
}
|
|
@@ -10,6 +10,9 @@ interface MessageItemProps {
|
|
|
10
10
|
/**
|
|
11
11
|
* Pure presentational component for a single message
|
|
12
12
|
* Visual hierarchy through colors and spacing only (no borders for easy text copying)
|
|
13
|
+
*
|
|
14
|
+
* Memoization with custom comparator prevents re-renders when message array changes
|
|
15
|
+
* but individual message content hasn't changed.
|
|
13
16
|
*/
|
|
14
17
|
export declare const MessageItem: import("react").MemoExoticComponent<({ message }: MessageItemProps) => import("react/jsx-runtime").JSX.Element>;
|
|
15
18
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MessageItem.d.ts","sourceRoot":"","sources":["../../../../../src/cli/ink-cli/components/chat/MessageItem.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"MessageItem.d.ts","sourceRoot":"","sources":["../../../../../src/cli/ink-cli/components/chat/MessageItem.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,KAAK,EACR,OAAO,EAUV,MAAM,sBAAsB,CAAC;AAuC9B,UAAU,gBAAgB;IACtB,OAAO,EAAE,OAAO,CAAC;CACpB;AAED;;;;;;GAMG;AACH,eAAO,MAAM,WAAW,oDACN,gBAAgB,6CAwJjC,CAAC"}
|
|
@@ -6,27 +6,113 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
6
6
|
*/
|
|
7
7
|
import { memo } from 'react';
|
|
8
8
|
import { Box, Text } from 'ink';
|
|
9
|
+
import { ConfigBox, StatsBox, HelpBox, SessionListBox, SessionHistoryBox, LogConfigBox, ShortcutsBox, SyspromptBox, } from './styled-boxes/index.js';
|
|
10
|
+
import { ToolResultRenderer } from '../renderers/index.js';
|
|
11
|
+
import { MarkdownText } from '../shared/MarkdownText.js';
|
|
9
12
|
import { ToolIcon } from './ToolIcon.js';
|
|
13
|
+
/**
|
|
14
|
+
* Format milliseconds into a compact human-readable string
|
|
15
|
+
* Examples: "1.2s", "1m 23s", "1h 2m"
|
|
16
|
+
*/
|
|
17
|
+
function formatDuration(ms) {
|
|
18
|
+
const seconds = Math.floor(ms / 1000);
|
|
19
|
+
const tenths = Math.floor((ms % 1000) / 100);
|
|
20
|
+
if (seconds < 60) {
|
|
21
|
+
return `${seconds}.${tenths}s`;
|
|
22
|
+
}
|
|
23
|
+
const minutes = Math.floor(seconds / 60);
|
|
24
|
+
const remainingSeconds = seconds % 60;
|
|
25
|
+
if (minutes < 60) {
|
|
26
|
+
return `${minutes}m ${remainingSeconds}s`;
|
|
27
|
+
}
|
|
28
|
+
const hours = Math.floor(minutes / 60);
|
|
29
|
+
const remainingMinutes = minutes % 60;
|
|
30
|
+
return `${hours}h ${remainingMinutes}m`;
|
|
31
|
+
}
|
|
10
32
|
/**
|
|
11
33
|
* Pure presentational component for a single message
|
|
12
34
|
* Visual hierarchy through colors and spacing only (no borders for easy text copying)
|
|
35
|
+
*
|
|
36
|
+
* Memoization with custom comparator prevents re-renders when message array changes
|
|
37
|
+
* but individual message content hasn't changed.
|
|
13
38
|
*/
|
|
14
39
|
export const MessageItem = memo(({ message }) => {
|
|
15
|
-
//
|
|
40
|
+
// Check for styled message first
|
|
41
|
+
if (message.styledType && message.styledData) {
|
|
42
|
+
switch (message.styledType) {
|
|
43
|
+
case 'config':
|
|
44
|
+
return _jsx(ConfigBox, { data: message.styledData });
|
|
45
|
+
case 'stats':
|
|
46
|
+
return _jsx(StatsBox, { data: message.styledData });
|
|
47
|
+
case 'help':
|
|
48
|
+
return _jsx(HelpBox, { data: message.styledData });
|
|
49
|
+
case 'session-list':
|
|
50
|
+
return _jsx(SessionListBox, { data: message.styledData });
|
|
51
|
+
case 'session-history':
|
|
52
|
+
return (_jsx(SessionHistoryBox, { data: message.styledData }));
|
|
53
|
+
case 'log-config':
|
|
54
|
+
return _jsx(LogConfigBox, { data: message.styledData });
|
|
55
|
+
case 'run-summary': {
|
|
56
|
+
const data = message.styledData;
|
|
57
|
+
const durationStr = formatDuration(data.durationMs);
|
|
58
|
+
const tokensStr = data.outputTokens > 0 ? `, Used ${data.outputTokens} tokens` : '';
|
|
59
|
+
return (_jsx(Box, { marginTop: 1, marginBottom: 1, width: "100%", children: _jsxs(Text, { color: "gray", children: ["\u2500 Worked for ", durationStr, tokensStr, " \u2500"] }) }));
|
|
60
|
+
}
|
|
61
|
+
case 'shortcuts':
|
|
62
|
+
return _jsx(ShortcutsBox, { data: message.styledData });
|
|
63
|
+
case 'sysprompt':
|
|
64
|
+
return _jsx(SyspromptBox, { data: message.styledData });
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
// User message: '>' prefix with gray background
|
|
16
68
|
if (message.role === 'user') {
|
|
17
|
-
return (
|
|
69
|
+
return (_jsx(Box, { flexDirection: "column", marginTop: 2, marginBottom: 1, width: "100%", children: _jsxs(Box, { flexDirection: "row", paddingX: 1, backgroundColor: "gray", children: [_jsx(Text, { color: "green", children: '> ' }), _jsx(Text, { color: "white", wrap: "wrap", children: message.content })] }) }));
|
|
18
70
|
}
|
|
19
|
-
// Assistant message:
|
|
71
|
+
// Assistant message: Gray circle indicator (unless continuation)
|
|
72
|
+
// IMPORTANT: width="100%" is required to prevent Ink layout failures on large content.
|
|
73
|
+
// Without width constraints, streaming content causes terminal blackout at ~50+ lines.
|
|
74
|
+
// marginTop={1} for consistent spacing with tool messages
|
|
20
75
|
if (message.role === 'assistant') {
|
|
21
|
-
|
|
76
|
+
// Continuation messages: no indicator, just content
|
|
77
|
+
if (message.isContinuation) {
|
|
78
|
+
return (_jsx(Box, { flexDirection: "column", width: "100%", children: _jsx(MarkdownText, { children: message.content || '' }) }));
|
|
79
|
+
}
|
|
80
|
+
// Regular assistant message: bullet prefix inline with first line
|
|
81
|
+
// Text wraps at terminal width - wrapped lines may start at column 0
|
|
82
|
+
// This is simpler and avoids mid-word splitting issues with Ink's wrap
|
|
83
|
+
return (_jsx(Box, { flexDirection: "column", marginTop: 1, width: "100%", children: _jsx(MarkdownText, { bulletPrefix: "\u23FA ", children: message.content || '' }) }));
|
|
22
84
|
}
|
|
23
|
-
// Tool message: Animated icon
|
|
85
|
+
// Tool message: Animated icon based on status
|
|
86
|
+
// - Running: green spinner + "Running..."
|
|
87
|
+
// - Finished (success): green dot
|
|
88
|
+
// - Finished (error): red dot
|
|
24
89
|
if (message.role === 'tool') {
|
|
25
|
-
|
|
26
|
-
const
|
|
27
|
-
|
|
90
|
+
// Use structured renderers if display data is available
|
|
91
|
+
const hasStructuredDisplay = message.toolDisplayData && message.toolContent;
|
|
92
|
+
const isRunning = message.toolStatus === 'running';
|
|
93
|
+
const isPending = message.toolStatus === 'pending' || message.toolStatus === 'pending_approval';
|
|
94
|
+
// Parse tool name and args for bold formatting: "ToolName(args)" → bold name + normal args
|
|
95
|
+
const parenIndex = message.content.indexOf('(');
|
|
96
|
+
const toolName = parenIndex > 0 ? message.content.slice(0, parenIndex) : message.content;
|
|
97
|
+
const toolArgs = parenIndex > 0 ? message.content.slice(parenIndex) : '';
|
|
98
|
+
return (_jsxs(Box, { flexDirection: "column", marginTop: 1, width: "100%", children: [_jsxs(Box, { flexDirection: "row", children: [_jsx(ToolIcon, { status: message.toolStatus || 'finished', isError: message.isError ?? false }), _jsx(Box, { flexGrow: 1, flexShrink: 1, children: _jsxs(Text, { wrap: "wrap", children: [_jsx(Text, { bold: true, children: toolName }), _jsx(Text, { children: toolArgs }), isRunning && _jsx(Text, { color: "green", children: " Running..." }), isPending && _jsx(Text, { color: "yellowBright", children: " Waiting..." })] }) })] }), hasStructuredDisplay ? (_jsx(ToolResultRenderer, { display: message.toolDisplayData, content: message.toolContent })) : (message.toolResult && (_jsx(Box, { flexDirection: "column", children: _jsxs(Text, { color: "gray", children: [" \u23BF ", message.toolResult] }) })))] }));
|
|
28
99
|
}
|
|
29
100
|
// System message: Compact gray text
|
|
30
|
-
return (
|
|
101
|
+
return (_jsx(Box, { flexDirection: "column", marginBottom: 1, width: "100%", children: _jsx(Text, { color: "gray", children: message.content }) }));
|
|
102
|
+
},
|
|
103
|
+
// Custom comparator: only re-render if message content actually changed
|
|
104
|
+
(prev, next) => {
|
|
105
|
+
return (prev.message.id === next.message.id &&
|
|
106
|
+
prev.message.content === next.message.content &&
|
|
107
|
+
prev.message.role === next.message.role &&
|
|
108
|
+
prev.message.toolStatus === next.message.toolStatus &&
|
|
109
|
+
prev.message.toolResult === next.message.toolResult &&
|
|
110
|
+
prev.message.isStreaming === next.message.isStreaming &&
|
|
111
|
+
prev.message.styledType === next.message.styledType &&
|
|
112
|
+
prev.message.styledData === next.message.styledData &&
|
|
113
|
+
prev.message.isContinuation === next.message.isContinuation &&
|
|
114
|
+
prev.message.isError === next.message.isError &&
|
|
115
|
+
prev.message.toolDisplayData === next.message.toolDisplayData &&
|
|
116
|
+
prev.message.toolContent === next.message.toolContent);
|
|
31
117
|
});
|
|
32
118
|
MessageItem.displayName = 'MessageItem';
|
|
@@ -16,5 +16,5 @@ export function MessageList({ messages, maxVisible = 50 }) {
|
|
|
16
16
|
return messages.slice(-maxVisible);
|
|
17
17
|
}, [messages, maxVisible]);
|
|
18
18
|
const hasMoreMessages = messages.length > maxVisible;
|
|
19
|
-
return (_jsxs(Box, { flexDirection: "column", flexGrow: 1, paddingX: 1, paddingY: 1, children: [hasMoreMessages && (_jsx(Box, { marginBottom: 1, children: _jsxs(Text, { color: "gray",
|
|
19
|
+
return (_jsxs(Box, { flexDirection: "column", flexGrow: 1, paddingX: 1, paddingY: 1, children: [hasMoreMessages && (_jsx(Box, { marginBottom: 1, children: _jsxs(Text, { color: "gray", children: ["... (", messages.length - maxVisible, " earlier messages hidden)"] }) })), visibleMessages.length === 0 && (_jsx(Box, { marginY: 2, children: _jsx(Text, { color: "greenBright", children: "Welcome to Dexto CLI! Type your message below or use /help for commands." }) })), visibleMessages.map((msg) => (_jsx(MessageItem, { message: msg }, msg.id)))] }));
|
|
20
20
|
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* QueuedMessagesDisplay - Shows queued messages waiting to be processed
|
|
3
|
+
*
|
|
4
|
+
* Similar to webui's QueuedMessagesDisplay.tsx but for Ink/terminal.
|
|
5
|
+
* Shows:
|
|
6
|
+
* - Count of queued messages
|
|
7
|
+
* - Keyboard hint (↑ to edit)
|
|
8
|
+
* - Truncated preview of each queued message
|
|
9
|
+
*/
|
|
10
|
+
import type { QueuedMessage } from '@dexto/core';
|
|
11
|
+
interface QueuedMessagesDisplayProps {
|
|
12
|
+
messages: QueuedMessage[];
|
|
13
|
+
}
|
|
14
|
+
export declare function QueuedMessagesDisplay({ messages }: QueuedMessagesDisplayProps): import("react/jsx-runtime").JSX.Element | null;
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=QueuedMessagesDisplay.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"QueuedMessagesDisplay.d.ts","sourceRoot":"","sources":["../../../../../src/cli/ink-cli/components/chat/QueuedMessagesDisplay.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,OAAO,KAAK,EAAE,aAAa,EAAe,MAAM,aAAa,CAAC;AAE9D,UAAU,0BAA0B;IAChC,QAAQ,EAAE,aAAa,EAAE,CAAC;CAC7B;AAwBD,wBAAgB,qBAAqB,CAAC,EAAE,QAAQ,EAAE,EAAE,0BAA0B,kDA2B7E"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Box, Text } from 'ink';
|
|
3
|
+
/**
|
|
4
|
+
* Extract text content from ContentPart[]
|
|
5
|
+
*/
|
|
6
|
+
function getMessageText(content) {
|
|
7
|
+
const textParts = content
|
|
8
|
+
.filter((part) => part.type === 'text')
|
|
9
|
+
.map((part) => part.text);
|
|
10
|
+
return textParts.join(' ') || '[attachment]';
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Truncate text to fit terminal width
|
|
14
|
+
*/
|
|
15
|
+
function truncateText(text, maxLength = 60) {
|
|
16
|
+
// Replace newlines with spaces for single-line display
|
|
17
|
+
const singleLine = text.replace(/\n/g, ' ').trim();
|
|
18
|
+
if (singleLine.length <= maxLength) {
|
|
19
|
+
return singleLine;
|
|
20
|
+
}
|
|
21
|
+
return singleLine.slice(0, maxLength - 3) + '...';
|
|
22
|
+
}
|
|
23
|
+
export function QueuedMessagesDisplay({ messages }) {
|
|
24
|
+
if (messages.length === 0)
|
|
25
|
+
return null;
|
|
26
|
+
return (_jsxs(Box, { flexDirection: "column", marginBottom: 1, children: [_jsxs(Box, { children: [_jsxs(Text, { color: "gray", children: [messages.length, " message", messages.length !== 1 ? 's' : '', " queued"] }), _jsx(Text, { color: "gray", children: " \u2022 " }), _jsx(Text, { color: "gray", children: "\u2191 to edit" })] }), messages.map((message, index) => (_jsxs(Box, { flexDirection: "row", children: [_jsx(Text, { color: "gray", children: index === messages.length - 1 ? '↳ ' : '│ ' }), _jsx(Text, { color: "gray", italic: true, children: truncateText(getMessageText(message.content)) })] }, message.id)))] }));
|
|
27
|
+
}
|
|
@@ -5,12 +5,14 @@
|
|
|
5
5
|
import type { ToolStatus } from '../../state/types.js';
|
|
6
6
|
interface ToolIconProps {
|
|
7
7
|
status: ToolStatus;
|
|
8
|
+
isError?: boolean;
|
|
8
9
|
}
|
|
9
10
|
/**
|
|
10
11
|
* Animated tool icon that changes based on execution status
|
|
11
|
-
* - Running: Animated spinner (
|
|
12
|
-
* - Finished:
|
|
12
|
+
* - Running: Animated spinner (green/teal)
|
|
13
|
+
* - Finished (success): Green dot
|
|
14
|
+
* - Finished (error): Red dot
|
|
13
15
|
*/
|
|
14
|
-
export declare function ToolIcon({ status }: ToolIconProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export declare function ToolIcon({ status, isError }: ToolIconProps): import("react/jsx-runtime").JSX.Element;
|
|
15
17
|
export {};
|
|
16
18
|
//# sourceMappingURL=ToolIcon.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToolIcon.d.ts","sourceRoot":"","sources":["../../../../../src/cli/ink-cli/components/chat/ToolIcon.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEvD,UAAU,aAAa;IACnB,MAAM,EAAE,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"ToolIcon.d.ts","sourceRoot":"","sources":["../../../../../src/cli/ink-cli/components/chat/ToolIcon.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEvD,UAAU,aAAa;IACnB,MAAM,EAAE,UAAU,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;CACrB;AAKD;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,aAAa,2CAqD1D"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
/**
|
|
3
3
|
* ToolIcon Component
|
|
4
4
|
* Animated icon for tool calls with status-based visual feedback
|
|
@@ -9,12 +9,13 @@ import { Text } from 'ink';
|
|
|
9
9
|
const SPINNER_FRAMES = ['⠋', '⠙', '⠹', '⠸', '⠼', '⠴', '⠦', '⠧', '⠇', '⠏'];
|
|
10
10
|
/**
|
|
11
11
|
* Animated tool icon that changes based on execution status
|
|
12
|
-
* - Running: Animated spinner (
|
|
13
|
-
* - Finished:
|
|
12
|
+
* - Running: Animated spinner (green/teal)
|
|
13
|
+
* - Finished (success): Green dot
|
|
14
|
+
* - Finished (error): Red dot
|
|
14
15
|
*/
|
|
15
|
-
export function ToolIcon({ status }) {
|
|
16
|
+
export function ToolIcon({ status, isError }) {
|
|
16
17
|
const [frame, setFrame] = useState(0);
|
|
17
|
-
// Animate spinner when running
|
|
18
|
+
// Animate spinner only when actually running (not during approval)
|
|
18
19
|
useEffect(() => {
|
|
19
20
|
if (status !== 'running') {
|
|
20
21
|
return;
|
|
@@ -24,9 +25,22 @@ export function ToolIcon({ status }) {
|
|
|
24
25
|
}, 80); // 80ms per frame for smooth animation
|
|
25
26
|
return () => clearInterval(interval);
|
|
26
27
|
}, [status]);
|
|
28
|
+
// Pending: static gray dot (tool call received, checking approval)
|
|
29
|
+
if (status === 'pending') {
|
|
30
|
+
return _jsx(Text, { color: "gray", children: "\u25CF " });
|
|
31
|
+
}
|
|
32
|
+
// Pending approval: static yellowBright dot (waiting for user)
|
|
33
|
+
if (status === 'pending_approval') {
|
|
34
|
+
return (_jsxs(Text, { color: "yellowBright", bold: true, children: ["\u25CF", ' '] }));
|
|
35
|
+
}
|
|
27
36
|
if (status === 'finished') {
|
|
28
|
-
|
|
37
|
+
// Error state: red dot
|
|
38
|
+
if (isError) {
|
|
39
|
+
return (_jsxs(Text, { color: "red", bold: true, children: ["\u25CF", ' '] }));
|
|
40
|
+
}
|
|
41
|
+
// Success state: green dot
|
|
42
|
+
return (_jsxs(Text, { color: "green", bold: true, children: ["\u25CF", ' '] }));
|
|
29
43
|
}
|
|
30
44
|
// Running state with spinner
|
|
31
|
-
return (_jsxs(Text, { color: "
|
|
45
|
+
return (_jsxs(Text, { color: "green", bold: true, children: [SPINNER_FRAMES[frame], ' '] }));
|
|
32
46
|
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ConfigBox - Styled output for /config command
|
|
3
|
+
*/
|
|
4
|
+
import type { ConfigStyledData } from '../../../state/types.js';
|
|
5
|
+
interface ConfigBoxProps {
|
|
6
|
+
data: ConfigStyledData;
|
|
7
|
+
}
|
|
8
|
+
export declare function ConfigBox({ data }: ConfigBoxProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=ConfigBox.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConfigBox.d.ts","sourceRoot":"","sources":["../../../../../../src/cli/ink-cli/components/chat/styled-boxes/ConfigBox.tsx"],"names":[],"mappings":"AAAA;;GAEG;AAIH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAGhE,UAAU,cAAc;IACpB,IAAI,EAAE,gBAAgB,CAAC;CAC1B;AAED,wBAAgB,SAAS,CAAC,EAAE,IAAI,EAAE,EAAE,cAAc,2CAmEjD"}
|
|
@@ -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, StyledSection, StyledRow } from './StyledBox.js';
|
|
4
|
+
export function ConfigBox({ data }) {
|
|
5
|
+
return (_jsxs(StyledBox, { title: "Runtime Configuration", titleColor: "cyan", children: [data.configFilePath && (_jsxs(Box, { children: [_jsx(Text, { color: "gray", children: "Agent config: " }), _jsx(Text, { color: "blue", children: data.configFilePath })] })), _jsxs(StyledSection, { title: "LLM", children: [_jsx(StyledRow, { label: "Provider", value: data.provider }), _jsx(StyledRow, { label: "Model", value: data.model }), data.maxTokens !== null && (_jsx(StyledRow, { label: "Max Tokens", value: data.maxTokens.toString() })), data.temperature !== null && (_jsx(StyledRow, { label: "Temperature", value: data.temperature.toString() }))] }), _jsx(StyledSection, { title: "Tool Confirmation", children: _jsx(StyledRow, { label: "Mode", value: data.toolConfirmationMode }) }), _jsxs(StyledSection, { title: "Sessions", children: [_jsx(StyledRow, { label: "Max Sessions", value: data.maxSessions }), _jsx(StyledRow, { label: "Session TTL", value: data.sessionTTL })] }), _jsx(StyledSection, { title: "MCP Servers", children: data.mcpServers.length > 0 ? (data.mcpServers.map((server) => (_jsx(Box, { children: _jsx(Text, { color: "cyan", children: server }) }, server)))) : (_jsx(Text, { color: "gray", children: "No MCP servers configured" })) }), data.promptsCount > 0 && (_jsx(StyledSection, { title: "Prompts", children: _jsxs(Text, { color: "gray", children: [data.promptsCount, " prompt(s) configured"] }) })), data.pluginsEnabled.length > 0 && (_jsx(StyledSection, { title: "Plugins", children: data.pluginsEnabled.map((plugin) => (_jsx(Box, { children: _jsx(Text, { color: "green", children: plugin }) }, plugin))) })), _jsx(Box, { marginTop: 1, children: _jsx(Text, { color: "gray", italic: true, children: "Note: Some fields (logs, database paths) are auto-populated by the CLI." }) })] }));
|
|
6
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* HelpBox - Styled output for /help command
|
|
3
|
+
*/
|
|
4
|
+
import type { HelpStyledData } from '../../../state/types.js';
|
|
5
|
+
interface HelpBoxProps {
|
|
6
|
+
data: HelpStyledData;
|
|
7
|
+
}
|
|
8
|
+
export declare function HelpBox({ data }: HelpBoxProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=HelpBox.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HelpBox.d.ts","sourceRoot":"","sources":["../../../../../../src/cli/ink-cli/components/chat/styled-boxes/HelpBox.tsx"],"names":[],"mappings":"AAAA;;GAEG;AAIH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAG9D,UAAU,YAAY;IAClB,IAAI,EAAE,cAAc,CAAC;CACxB;AAED,wBAAgB,OAAO,CAAC,EAAE,IAAI,EAAE,EAAE,YAAY,2CAiC7C"}
|
|
@@ -0,0 +1,15 @@
|
|
|
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 HelpBox({ data }) {
|
|
5
|
+
// Group commands by category
|
|
6
|
+
const categories = data.commands.reduce((acc, cmd) => {
|
|
7
|
+
const cat = cmd.category || 'Other';
|
|
8
|
+
if (!acc[cat]) {
|
|
9
|
+
acc[cat] = [];
|
|
10
|
+
}
|
|
11
|
+
acc[cat].push(cmd);
|
|
12
|
+
return acc;
|
|
13
|
+
}, {});
|
|
14
|
+
return (_jsx(StyledBox, { title: "Available Commands", children: Object.entries(categories).map(([category, commands]) => (_jsxs(Box, { flexDirection: "column", marginTop: 1, children: [_jsx(Text, { bold: true, color: "gray", children: category }), commands.map((cmd) => (_jsxs(Box, { marginLeft: 2, children: [_jsx(Box, { width: 16, children: _jsxs(Text, { color: "cyan", children: ["/", cmd.name] }) }), _jsx(Text, { color: "gray", children: cmd.description })] }, cmd.name)))] }, category))) }));
|
|
15
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* LogConfigBox - Styled output for /log command (no args)
|
|
3
|
+
*/
|
|
4
|
+
import type { LogConfigStyledData } from '../../../state/types.js';
|
|
5
|
+
interface LogConfigBoxProps {
|
|
6
|
+
data: LogConfigStyledData;
|
|
7
|
+
}
|
|
8
|
+
export declare function LogConfigBox({ data }: LogConfigBoxProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=LogConfigBox.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LogConfigBox.d.ts","sourceRoot":"","sources":["../../../../../../src/cli/ink-cli/components/chat/styled-boxes/LogConfigBox.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,2CA4BvD"}
|
|
@@ -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, StyledRow, StyledListItem } from './StyledBox.js';
|
|
4
|
+
export function LogConfigBox({ data }) {
|
|
5
|
+
return (_jsxs(StyledBox, { title: "Logging Configuration", children: [_jsxs(Box, { marginTop: 1, flexDirection: "column", children: [_jsx(StyledRow, { label: "Current level", value: data.currentLevel, valueColor: "green" }), data.logFile && _jsx(StyledRow, { label: "Log file", value: data.logFile })] }), _jsxs(Box, { marginTop: 1, flexDirection: "column", children: [_jsx(Text, { color: "gray", children: "Available levels (least to most verbose):" }), data.availableLevels.map((level) => {
|
|
6
|
+
const isCurrent = level === data.currentLevel;
|
|
7
|
+
return (_jsx(StyledListItem, { icon: isCurrent ? '>' : ' ', text: level, isActive: isCurrent }, level));
|
|
8
|
+
})] }), _jsx(Box, { marginTop: 1, children: _jsx(Text, { color: "gray", children: "Use /log <level> to change level" }) })] }));
|
|
9
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SessionHistoryBox - Styled output for /session history command
|
|
3
|
+
*/
|
|
4
|
+
import type { SessionHistoryStyledData } from '../../../state/types.js';
|
|
5
|
+
interface SessionHistoryBoxProps {
|
|
6
|
+
data: SessionHistoryStyledData;
|
|
7
|
+
}
|
|
8
|
+
export declare function SessionHistoryBox({ data }: SessionHistoryBoxProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=SessionHistoryBox.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SessionHistoryBox.d.ts","sourceRoot":"","sources":["../../../../../../src/cli/ink-cli/components/chat/styled-boxes/SessionHistoryBox.tsx"],"names":[],"mappings":"AAAA;;GAEG;AAIH,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AAGxE,UAAU,sBAAsB;IAC5B,IAAI,EAAE,wBAAwB,CAAC;CAClC;AA4BD,wBAAgB,iBAAiB,CAAC,EAAE,IAAI,EAAE,EAAE,sBAAsB,2CAmCjE"}
|