dexto 1.3.0 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +87 -22
- package/dist/agents/agent-registry.json +9 -0
- package/dist/agents/agent-template.yml +2 -2
- package/dist/agents/coding-agent/coding-agent.yml +27 -16
- package/dist/agents/database-agent/database-agent.yml +2 -2
- package/dist/agents/default-agent.yml +9 -7
- package/dist/agents/github-agent/github-agent.yml +2 -2
- package/dist/agents/product-name-researcher/product-name-researcher.yml +2 -2
- package/dist/agents/talk2pdf-agent/talk2pdf-agent.yml +2 -2
- package/dist/analytics/events.d.ts +13 -6
- package/dist/analytics/events.d.ts.map +1 -1
- package/dist/analytics/index.d.ts +1 -1
- package/dist/analytics/index.d.ts.map +1 -1
- package/dist/analytics/index.js +6 -2
- package/dist/api/server-hono.d.ts.map +1 -1
- package/dist/api/server-hono.js +65 -9
- package/dist/cli/cli-subscriber.d.ts +4 -0
- package/dist/cli/cli-subscriber.d.ts.map +1 -1
- package/dist/cli/cli-subscriber.js +47 -3
- package/dist/cli/commands/create-app.d.ts +16 -14
- package/dist/cli/commands/create-app.d.ts.map +1 -1
- package/dist/cli/commands/create-app.js +626 -102
- package/dist/cli/commands/create-image.d.ts +7 -0
- package/dist/cli/commands/create-image.d.ts.map +1 -0
- package/dist/cli/commands/create-image.js +201 -0
- package/dist/cli/commands/helpers/formatters.d.ts.map +1 -1
- package/dist/cli/commands/helpers/formatters.js +9 -8
- package/dist/cli/commands/index.d.ts +2 -1
- package/dist/cli/commands/index.d.ts.map +1 -1
- package/dist/cli/commands/index.js +2 -1
- package/dist/cli/commands/init-app.js +7 -7
- package/dist/cli/commands/install.d.ts +0 -3
- package/dist/cli/commands/install.d.ts.map +1 -1
- package/dist/cli/commands/install.js +19 -70
- package/dist/cli/commands/interactive-commands/command-parser.d.ts +17 -14
- package/dist/cli/commands/interactive-commands/command-parser.d.ts.map +1 -1
- package/dist/cli/commands/interactive-commands/command-parser.js +7 -22
- package/dist/cli/commands/interactive-commands/commands.d.ts +4 -4
- package/dist/cli/commands/interactive-commands/commands.d.ts.map +1 -1
- package/dist/cli/commands/interactive-commands/commands.js +34 -42
- package/dist/cli/commands/interactive-commands/documentation-commands.d.ts.map +1 -1
- package/dist/cli/commands/interactive-commands/documentation-commands.js +4 -7
- package/dist/cli/commands/interactive-commands/general-commands.d.ts.map +1 -1
- package/dist/cli/commands/interactive-commands/general-commands.js +159 -117
- package/dist/cli/commands/interactive-commands/mcp/index.d.ts +9 -3
- package/dist/cli/commands/interactive-commands/mcp/index.d.ts.map +1 -1
- package/dist/cli/commands/interactive-commands/mcp/index.js +18 -3
- package/dist/cli/commands/interactive-commands/model/index.d.ts +8 -6
- package/dist/cli/commands/interactive-commands/model/index.d.ts.map +1 -1
- package/dist/cli/commands/interactive-commands/model/index.js +18 -6
- package/dist/cli/commands/interactive-commands/prompt-commands.d.ts +3 -2
- package/dist/cli/commands/interactive-commands/prompt-commands.d.ts.map +1 -1
- package/dist/cli/commands/interactive-commands/prompt-commands.js +77 -60
- package/dist/cli/commands/interactive-commands/session/index.d.ts +7 -12
- package/dist/cli/commands/interactive-commands/session/index.d.ts.map +1 -1
- package/dist/cli/commands/interactive-commands/session/index.js +7 -14
- package/dist/cli/commands/interactive-commands/session/session-commands.d.ts +10 -24
- package/dist/cli/commands/interactive-commands/session/session-commands.d.ts.map +1 -1
- package/dist/cli/commands/interactive-commands/session/session-commands.js +16 -371
- package/dist/cli/commands/interactive-commands/system/system-commands.d.ts +1 -0
- package/dist/cli/commands/interactive-commands/system/system-commands.d.ts.map +1 -1
- package/dist/cli/commands/interactive-commands/system/system-commands.js +106 -77
- package/dist/cli/commands/interactive-commands/tool-commands.d.ts +1 -1
- package/dist/cli/commands/interactive-commands/tool-commands.d.ts.map +1 -1
- package/dist/cli/commands/interactive-commands/tool-commands.js +5 -62
- package/dist/cli/commands/interactive-commands/utils/command-output.d.ts +13 -17
- package/dist/cli/commands/interactive-commands/utils/command-output.d.ts.map +1 -1
- package/dist/cli/commands/interactive-commands/utils/command-output.js +18 -37
- package/dist/cli/commands/list-agents.d.ts +2 -2
- package/dist/cli/commands/list-agents.d.ts.map +1 -1
- package/dist/cli/commands/list-agents.js +38 -34
- package/dist/cli/commands/session-commands.js +16 -16
- package/dist/cli/commands/setup.d.ts +13 -5
- package/dist/cli/commands/setup.d.ts.map +1 -1
- package/dist/cli/commands/setup.js +860 -65
- package/dist/cli/commands/uninstall.d.ts.map +1 -1
- package/dist/cli/commands/uninstall.js +4 -6
- package/dist/cli/commands/which.d.ts.map +1 -1
- package/dist/cli/commands/which.js +18 -4
- package/dist/cli/ink-cli/InkCLIRefactored.d.ts +9 -22
- package/dist/cli/ink-cli/InkCLIRefactored.d.ts.map +1 -1
- package/dist/cli/ink-cli/InkCLIRefactored.js +50 -133
- package/dist/cli/ink-cli/components/ApprovalPrompt.d.ts +26 -3
- package/dist/cli/ink-cli/components/ApprovalPrompt.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/ApprovalPrompt.js +182 -45
- package/dist/cli/ink-cli/components/CustomInput.js +1 -1
- package/dist/cli/ink-cli/components/EditableMultiLineInput.js +4 -4
- package/dist/cli/ink-cli/components/ElicitationForm.d.ts +22 -0
- package/dist/cli/ink-cli/components/ElicitationForm.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/ElicitationForm.js +358 -0
- package/dist/cli/ink-cli/components/ErrorBoundary.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/ErrorBoundary.js +1 -1
- package/dist/cli/ink-cli/components/Footer.d.ts +16 -0
- package/dist/cli/ink-cli/components/Footer.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/Footer.js +27 -0
- package/dist/cli/ink-cli/components/HistorySearchBar.d.ts +17 -0
- package/dist/cli/ink-cli/components/HistorySearchBar.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/HistorySearchBar.js +8 -0
- package/dist/cli/ink-cli/components/MultiLineInput.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/MultiLineInput.js +3 -3
- package/dist/cli/ink-cli/components/ResourceAutocomplete.d.ts +15 -2
- package/dist/cli/ink-cli/components/ResourceAutocomplete.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/ResourceAutocomplete.js +126 -82
- package/dist/cli/ink-cli/components/SlashCommandAutocomplete.d.ts +15 -2
- package/dist/cli/ink-cli/components/SlashCommandAutocomplete.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/SlashCommandAutocomplete.js +228 -122
- package/dist/cli/ink-cli/components/StatusBar.d.ts +15 -2
- package/dist/cli/ink-cli/components/StatusBar.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/StatusBar.js +50 -10
- package/dist/cli/ink-cli/components/TextBufferInput.d.ts +52 -0
- package/dist/cli/ink-cli/components/TextBufferInput.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/TextBufferInput.js +471 -0
- package/dist/cli/ink-cli/components/base/BaseAutocomplete.js +4 -4
- package/dist/cli/ink-cli/components/base/BaseSelector.d.ts +11 -1
- package/dist/cli/ink-cli/components/base/BaseSelector.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/base/BaseSelector.js +90 -49
- package/dist/cli/ink-cli/components/chat/Footer.js +1 -1
- package/dist/cli/ink-cli/components/chat/Header.d.ts +1 -0
- package/dist/cli/ink-cli/components/chat/Header.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/chat/Header.js +6 -3
- package/dist/cli/ink-cli/components/chat/MessageItem.d.ts +3 -0
- package/dist/cli/ink-cli/components/chat/MessageItem.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/chat/MessageItem.js +95 -9
- package/dist/cli/ink-cli/components/chat/MessageList.js +1 -1
- package/dist/cli/ink-cli/components/chat/QueuedMessagesDisplay.d.ts +16 -0
- package/dist/cli/ink-cli/components/chat/QueuedMessagesDisplay.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/chat/QueuedMessagesDisplay.js +27 -0
- package/dist/cli/ink-cli/components/chat/ToolIcon.d.ts +5 -3
- package/dist/cli/ink-cli/components/chat/ToolIcon.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/chat/ToolIcon.js +21 -7
- package/dist/cli/ink-cli/components/chat/styled-boxes/ConfigBox.d.ts +10 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/ConfigBox.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/ConfigBox.js +6 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/HelpBox.d.ts +10 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/HelpBox.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/HelpBox.js +15 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/LogConfigBox.d.ts +10 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/LogConfigBox.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/LogConfigBox.js +9 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/SessionHistoryBox.d.ts +10 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/SessionHistoryBox.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/SessionHistoryBox.js +37 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/SessionListBox.d.ts +10 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/SessionListBox.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/SessionListBox.js +9 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/ShortcutsBox.d.ts +10 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/ShortcutsBox.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/ShortcutsBox.js +6 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/StatsBox.d.ts +10 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/StatsBox.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/StatsBox.js +29 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/StyledBox.d.ts +45 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/StyledBox.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/StyledBox.js +38 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/SyspromptBox.d.ts +10 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/SyspromptBox.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/SyspromptBox.js +6 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/index.d.ts +13 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/index.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/index.js +12 -0
- package/dist/cli/ink-cli/components/input/InputArea.d.ts +36 -8
- package/dist/cli/ink-cli/components/input/InputArea.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/input/InputArea.js +3 -3
- package/dist/cli/ink-cli/components/modes/AlternateBufferCLI.d.ts +25 -0
- package/dist/cli/ink-cli/components/modes/AlternateBufferCLI.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/modes/AlternateBufferCLI.js +166 -0
- package/dist/cli/ink-cli/components/modes/StaticCLI.d.ts +27 -0
- package/dist/cli/ink-cli/components/modes/StaticCLI.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/modes/StaticCLI.js +95 -0
- package/dist/cli/ink-cli/components/modes/index.d.ts +10 -0
- package/dist/cli/ink-cli/components/modes/index.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/modes/index.js +9 -0
- package/dist/cli/ink-cli/components/overlays/ApiKeyInput.d.ts +26 -0
- package/dist/cli/ink-cli/components/overlays/ApiKeyInput.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/ApiKeyInput.js +92 -0
- package/dist/cli/ink-cli/components/overlays/CustomModelWizard.d.ts +29 -0
- package/dist/cli/ink-cli/components/overlays/CustomModelWizard.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/CustomModelWizard.js +286 -0
- package/dist/cli/ink-cli/components/overlays/LogLevelSelector.d.ts +22 -0
- package/dist/cli/ink-cli/components/overlays/LogLevelSelector.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/LogLevelSelector.js +59 -0
- package/dist/cli/ink-cli/components/overlays/McpAddChoice.d.ts +22 -0
- package/dist/cli/ink-cli/components/overlays/McpAddChoice.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/McpAddChoice.js +59 -0
- package/dist/cli/ink-cli/components/overlays/McpAddSelector.d.ts +26 -0
- package/dist/cli/ink-cli/components/overlays/McpAddSelector.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/McpAddSelector.js +73 -0
- package/dist/cli/ink-cli/components/overlays/McpCustomTypeSelector.d.ts +21 -0
- package/dist/cli/ink-cli/components/overlays/McpCustomTypeSelector.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/McpCustomTypeSelector.js +51 -0
- package/dist/cli/ink-cli/components/overlays/McpCustomWizard.d.ts +29 -0
- package/dist/cli/ink-cli/components/overlays/McpCustomWizard.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/McpCustomWizard.js +215 -0
- package/dist/cli/ink-cli/components/overlays/McpRemoveSelector.d.ts +22 -0
- package/dist/cli/ink-cli/components/overlays/McpRemoveSelector.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/McpRemoveSelector.js +74 -0
- package/dist/cli/ink-cli/components/overlays/McpSelector.d.ts +21 -0
- package/dist/cli/ink-cli/components/overlays/McpSelector.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/McpSelector.js +52 -0
- package/dist/cli/ink-cli/components/overlays/McpServerActions.d.ts +28 -0
- package/dist/cli/ink-cli/components/overlays/McpServerActions.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/McpServerActions.js +84 -0
- package/dist/cli/ink-cli/components/overlays/McpServerList.d.ts +29 -0
- package/dist/cli/ink-cli/components/overlays/McpServerList.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/McpServerList.js +109 -0
- package/dist/cli/ink-cli/components/overlays/ModelSelectorRefactored.d.ts +15 -8
- package/dist/cli/ink-cli/components/overlays/ModelSelectorRefactored.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/overlays/ModelSelectorRefactored.js +400 -23
- package/dist/cli/ink-cli/components/overlays/PromptAddChoice.d.ts +22 -0
- package/dist/cli/ink-cli/components/overlays/PromptAddChoice.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/PromptAddChoice.js +52 -0
- package/dist/cli/ink-cli/components/overlays/PromptAddWizard.d.ts +29 -0
- package/dist/cli/ink-cli/components/overlays/PromptAddWizard.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/PromptAddWizard.js +166 -0
- package/dist/cli/ink-cli/components/overlays/PromptDeleteSelector.d.ts +27 -0
- package/dist/cli/ink-cli/components/overlays/PromptDeleteSelector.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/PromptDeleteSelector.js +119 -0
- package/dist/cli/ink-cli/components/overlays/PromptList.d.ts +33 -0
- package/dist/cli/ink-cli/components/overlays/PromptList.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/PromptList.js +144 -0
- package/dist/cli/ink-cli/components/overlays/SearchOverlay.d.ts +23 -0
- package/dist/cli/ink-cli/components/overlays/SearchOverlay.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/SearchOverlay.js +189 -0
- package/dist/cli/ink-cli/components/overlays/SessionSelectorRefactored.d.ts +7 -2
- package/dist/cli/ink-cli/components/overlays/SessionSelectorRefactored.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/overlays/SessionSelectorRefactored.js +19 -5
- package/dist/cli/ink-cli/components/overlays/SessionSubcommandSelector.d.ts +21 -0
- package/dist/cli/ink-cli/components/overlays/SessionSubcommandSelector.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/SessionSubcommandSelector.js +42 -0
- package/dist/cli/ink-cli/components/overlays/StreamSelector.d.ts +20 -0
- package/dist/cli/ink-cli/components/overlays/StreamSelector.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/StreamSelector.js +58 -0
- package/dist/cli/ink-cli/components/overlays/ToolBrowser.d.ts +25 -0
- package/dist/cli/ink-cli/components/overlays/ToolBrowser.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/ToolBrowser.js +400 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/LocalModelWizard.d.ts +25 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/LocalModelWizard.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/LocalModelWizard.js +609 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/index.d.ts +15 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/index.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/index.js +14 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/provider-config.d.ts +33 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/provider-config.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/provider-config.js +419 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/ApiKeyStep.d.ts +25 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/ApiKeyStep.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/ApiKeyStep.js +29 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/ProviderSelector.d.ts +17 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/ProviderSelector.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/ProviderSelector.js +11 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/SetupInfoBanner.d.ts +20 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/SetupInfoBanner.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/SetupInfoBanner.js +10 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/WizardStepInput.d.ts +30 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/WizardStepInput.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/WizardStepInput.js +13 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/index.d.ts +8 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/index.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/index.js +7 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/types.d.ts +79 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/types.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/types.js +38 -0
- package/dist/cli/ink-cli/components/renderers/DiffRenderer.d.ts +21 -0
- package/dist/cli/ink-cli/components/renderers/DiffRenderer.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/renderers/DiffRenderer.js +65 -0
- package/dist/cli/ink-cli/components/renderers/FilePreviewRenderer.d.ts +28 -0
- package/dist/cli/ink-cli/components/renderers/FilePreviewRenderer.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/renderers/FilePreviewRenderer.js +66 -0
- package/dist/cli/ink-cli/components/renderers/FileRenderer.d.ts +19 -0
- package/dist/cli/ink-cli/components/renderers/FileRenderer.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/renderers/FileRenderer.js +26 -0
- package/dist/cli/ink-cli/components/renderers/GenericRenderer.d.ts +21 -0
- package/dist/cli/ink-cli/components/renderers/GenericRenderer.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/renderers/GenericRenderer.js +26 -0
- package/dist/cli/ink-cli/components/renderers/SearchRenderer.d.ts +20 -0
- package/dist/cli/ink-cli/components/renderers/SearchRenderer.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/renderers/SearchRenderer.js +12 -0
- package/dist/cli/ink-cli/components/renderers/ShellRenderer.d.ts +21 -0
- package/dist/cli/ink-cli/components/renderers/ShellRenderer.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/renderers/ShellRenderer.js +25 -0
- package/dist/cli/ink-cli/components/renderers/diff-shared.d.ts +61 -0
- package/dist/cli/ink-cli/components/renderers/diff-shared.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/renderers/diff-shared.js +158 -0
- package/dist/cli/ink-cli/components/renderers/index.d.ts +28 -0
- package/dist/cli/ink-cli/components/renderers/index.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/renderers/index.js +36 -0
- package/dist/cli/ink-cli/components/shared/MarkdownText.d.ts +38 -0
- package/dist/cli/ink-cli/components/shared/MarkdownText.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/shared/MarkdownText.js +362 -0
- package/dist/cli/ink-cli/components/shared/VirtualizedList.d.ts +44 -0
- package/dist/cli/ink-cli/components/shared/VirtualizedList.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/shared/VirtualizedList.js +300 -0
- package/dist/cli/ink-cli/components/shared/text-buffer.d.ts +185 -0
- package/dist/cli/ink-cli/components/shared/text-buffer.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/shared/text-buffer.js +1338 -0
- package/dist/cli/ink-cli/constants/processingPhrases.d.ts +10 -0
- package/dist/cli/ink-cli/constants/processingPhrases.d.ts.map +1 -0
- package/dist/cli/ink-cli/constants/processingPhrases.js +64 -0
- package/dist/cli/ink-cli/constants/tips.d.ts +15 -0
- package/dist/cli/ink-cli/constants/tips.d.ts.map +1 -0
- package/dist/cli/ink-cli/constants/tips.js +53 -0
- package/dist/cli/ink-cli/containers/InputContainer.d.ts +42 -8
- package/dist/cli/ink-cli/containers/InputContainer.d.ts.map +1 -1
- package/dist/cli/ink-cli/containers/InputContainer.js +513 -85
- package/dist/cli/ink-cli/containers/OverlayContainer.d.ts +23 -5
- package/dist/cli/ink-cli/containers/OverlayContainer.d.ts.map +1 -1
- package/dist/cli/ink-cli/containers/OverlayContainer.js +1214 -132
- package/dist/cli/ink-cli/containers/index.d.ts +1 -1
- package/dist/cli/ink-cli/containers/index.d.ts.map +1 -1
- package/dist/cli/ink-cli/contexts/KeypressContext.d.ts +36 -0
- package/dist/cli/ink-cli/contexts/KeypressContext.d.ts.map +1 -0
- package/dist/cli/ink-cli/contexts/KeypressContext.js +461 -0
- package/dist/cli/ink-cli/contexts/MouseContext.d.ts +27 -0
- package/dist/cli/ink-cli/contexts/MouseContext.d.ts.map +1 -0
- package/dist/cli/ink-cli/contexts/MouseContext.js +102 -0
- package/dist/cli/ink-cli/contexts/ScrollProvider.d.ts +33 -0
- package/dist/cli/ink-cli/contexts/ScrollProvider.d.ts.map +1 -0
- package/dist/cli/ink-cli/contexts/ScrollProvider.js +170 -0
- package/dist/cli/ink-cli/contexts/index.d.ts +7 -0
- package/dist/cli/ink-cli/contexts/index.d.ts.map +1 -0
- package/dist/cli/ink-cli/contexts/index.js +6 -0
- package/dist/cli/ink-cli/hooks/index.d.ts +5 -0
- package/dist/cli/ink-cli/hooks/index.d.ts.map +1 -1
- package/dist/cli/ink-cli/hooks/index.js +6 -1
- package/dist/cli/ink-cli/hooks/useAgentEvents.d.ts +26 -9
- package/dist/cli/ink-cli/hooks/useAgentEvents.d.ts.map +1 -1
- package/dist/cli/ink-cli/hooks/useAgentEvents.js +90 -198
- package/dist/cli/ink-cli/hooks/useBatchedScroll.d.ts +14 -0
- package/dist/cli/ink-cli/hooks/useBatchedScroll.d.ts.map +1 -0
- package/dist/cli/ink-cli/hooks/useBatchedScroll.js +25 -0
- package/dist/cli/ink-cli/hooks/useCLIState.d.ts +50 -0
- package/dist/cli/ink-cli/hooks/useCLIState.d.ts.map +1 -0
- package/dist/cli/ink-cli/hooks/useCLIState.js +190 -0
- package/dist/cli/ink-cli/hooks/useElapsedTime.d.ts +24 -0
- package/dist/cli/ink-cli/hooks/useElapsedTime.d.ts.map +1 -0
- package/dist/cli/ink-cli/hooks/useElapsedTime.js +69 -0
- package/dist/cli/ink-cli/hooks/useHistorySearch.d.ts +61 -0
- package/dist/cli/ink-cli/hooks/useHistorySearch.d.ts.map +1 -0
- package/dist/cli/ink-cli/hooks/useHistorySearch.js +210 -0
- package/dist/cli/ink-cli/hooks/useInputOrchestrator.d.ts +136 -0
- package/dist/cli/ink-cli/hooks/useInputOrchestrator.d.ts.map +1 -0
- package/dist/cli/ink-cli/hooks/useInputOrchestrator.js +663 -0
- package/dist/cli/ink-cli/hooks/useKeyboardShortcuts.d.ts.map +1 -1
- package/dist/cli/ink-cli/hooks/useKeyboardShortcuts.js +7 -26
- package/dist/cli/ink-cli/hooks/useKeypress.d.ts +18 -0
- package/dist/cli/ink-cli/hooks/useKeypress.d.ts.map +1 -0
- package/dist/cli/ink-cli/hooks/useKeypress.js +26 -0
- package/dist/cli/ink-cli/hooks/usePhraseCycler.d.ts +30 -0
- package/dist/cli/ink-cli/hooks/usePhraseCycler.d.ts.map +1 -0
- package/dist/cli/ink-cli/hooks/usePhraseCycler.js +68 -0
- package/dist/cli/ink-cli/hooks/useStreaming.d.ts +19 -0
- package/dist/cli/ink-cli/hooks/useStreaming.d.ts.map +1 -0
- package/dist/cli/ink-cli/hooks/useStreaming.js +26 -0
- package/dist/cli/ink-cli/hooks/useTerminalSize.d.ts +14 -0
- package/dist/cli/ink-cli/hooks/useTerminalSize.d.ts.map +1 -0
- package/dist/cli/ink-cli/hooks/useTerminalSize.js +31 -0
- package/dist/cli/ink-cli/hooks/useTokenCounter.d.ts +42 -0
- package/dist/cli/ink-cli/hooks/useTokenCounter.d.ts.map +1 -0
- package/dist/cli/ink-cli/hooks/useTokenCounter.js +96 -0
- package/dist/cli/ink-cli/services/CommandService.d.ts +32 -1
- package/dist/cli/ink-cli/services/CommandService.d.ts.map +1 -1
- package/dist/cli/ink-cli/services/CommandService.js +36 -5
- package/dist/cli/ink-cli/services/InputService.d.ts +1 -5
- package/dist/cli/ink-cli/services/InputService.d.ts.map +1 -1
- package/dist/cli/ink-cli/services/InputService.js +1 -8
- package/dist/cli/ink-cli/services/index.d.ts +2 -1
- package/dist/cli/ink-cli/services/index.d.ts.map +1 -1
- package/dist/cli/ink-cli/services/index.js +2 -1
- package/dist/cli/ink-cli/services/processStream.d.ts +69 -0
- package/dist/cli/ink-cli/services/processStream.d.ts.map +1 -0
- package/dist/cli/ink-cli/services/processStream.js +742 -0
- package/dist/cli/ink-cli/state/actions.d.ts +30 -60
- package/dist/cli/ink-cli/state/actions.d.ts.map +1 -1
- package/dist/cli/ink-cli/state/actions.js +3 -0
- package/dist/cli/ink-cli/state/index.d.ts +5 -3
- package/dist/cli/ink-cli/state/index.d.ts.map +1 -1
- package/dist/cli/ink-cli/state/index.js +4 -3
- package/dist/cli/ink-cli/state/initialState.d.ts +4 -3
- package/dist/cli/ink-cli/state/initialState.d.ts.map +1 -1
- package/dist/cli/ink-cli/state/initialState.js +20 -4
- package/dist/cli/ink-cli/state/reducer.d.ts +3 -0
- package/dist/cli/ink-cli/state/reducer.d.ts.map +1 -1
- package/dist/cli/ink-cli/state/reducer.js +62 -168
- package/dist/cli/ink-cli/state/streaming-state.d.ts +27 -0
- package/dist/cli/ink-cli/state/streaming-state.d.ts.map +1 -0
- package/dist/cli/ink-cli/state/streaming-state.js +39 -0
- package/dist/cli/ink-cli/state/types.d.ts +223 -6
- package/dist/cli/ink-cli/state/types.d.ts.map +1 -1
- package/dist/cli/ink-cli/utils/bracketedPaste.d.ts +22 -0
- package/dist/cli/ink-cli/utils/bracketedPaste.d.ts.map +1 -0
- package/dist/cli/ink-cli/utils/bracketedPaste.js +27 -0
- package/dist/cli/ink-cli/utils/clipboardUtils.d.ts +49 -0
- package/dist/cli/ink-cli/utils/clipboardUtils.d.ts.map +1 -0
- package/dist/cli/ink-cli/utils/clipboardUtils.js +356 -0
- package/dist/cli/ink-cli/utils/commandOverlays.d.ts +33 -0
- package/dist/cli/ink-cli/utils/commandOverlays.d.ts.map +1 -0
- package/dist/cli/ink-cli/utils/commandOverlays.js +78 -0
- package/dist/cli/ink-cli/utils/debugLog.d.ts +38 -0
- package/dist/cli/ink-cli/utils/debugLog.d.ts.map +1 -0
- package/dist/cli/ink-cli/utils/debugLog.js +66 -0
- package/dist/cli/ink-cli/utils/index.d.ts +2 -1
- package/dist/cli/ink-cli/utils/index.d.ts.map +1 -1
- package/dist/cli/ink-cli/utils/index.js +3 -1
- package/dist/cli/ink-cli/utils/input.d.ts +25 -0
- package/dist/cli/ink-cli/utils/input.d.ts.map +1 -0
- package/dist/cli/ink-cli/utils/input.js +56 -0
- package/dist/cli/ink-cli/utils/inputParsing.d.ts +0 -9
- package/dist/cli/ink-cli/utils/inputParsing.d.ts.map +1 -1
- package/dist/cli/ink-cli/utils/inputParsing.js +0 -27
- package/dist/cli/ink-cli/utils/messageFormatting.d.ts +59 -3
- package/dist/cli/ink-cli/utils/messageFormatting.d.ts.map +1 -1
- package/dist/cli/ink-cli/utils/messageFormatting.js +348 -20
- package/dist/cli/ink-cli/utils/mouse.d.ts +61 -0
- package/dist/cli/ink-cli/utils/mouse.d.ts.map +1 -0
- package/dist/cli/ink-cli/utils/mouse.js +209 -0
- package/dist/cli/ink-cli/utils/streamSplitter.d.ts +44 -0
- package/dist/cli/ink-cli/utils/streamSplitter.d.ts.map +1 -0
- package/dist/cli/ink-cli/utils/streamSplitter.js +154 -0
- package/dist/cli/ink-cli/utils/textUtils.d.ts +63 -0
- package/dist/cli/ink-cli/utils/textUtils.d.ts.map +1 -0
- package/dist/cli/ink-cli/utils/textUtils.js +248 -0
- package/dist/cli/ink-cli/utils/toolUtils.d.ts +9 -0
- package/dist/cli/ink-cli/utils/toolUtils.d.ts.map +1 -0
- package/dist/cli/ink-cli/utils/toolUtils.js +15 -0
- package/dist/cli/utils/api-key-setup.d.ts +54 -4
- package/dist/cli/utils/api-key-setup.d.ts.map +1 -1
- package/dist/cli/utils/api-key-setup.js +433 -107
- package/dist/cli/utils/api-key-verification.d.ts +17 -0
- package/dist/cli/utils/api-key-verification.d.ts.map +1 -0
- package/dist/cli/utils/api-key-verification.js +211 -0
- package/dist/cli/utils/config-validation.d.ts +22 -2
- package/dist/cli/utils/config-validation.d.ts.map +1 -1
- package/dist/cli/utils/config-validation.js +354 -25
- package/dist/cli/utils/local-model-setup.d.ts +46 -0
- package/dist/cli/utils/local-model-setup.d.ts.map +1 -0
- package/dist/cli/utils/local-model-setup.js +662 -0
- package/dist/cli/utils/options.d.ts.map +1 -1
- package/dist/cli/utils/options.js +1 -3
- package/dist/cli/utils/prompt-helpers.d.ts +47 -0
- package/dist/cli/utils/prompt-helpers.d.ts.map +1 -0
- package/dist/cli/utils/prompt-helpers.js +66 -0
- package/dist/cli/utils/provider-setup.d.ts +66 -8
- package/dist/cli/utils/provider-setup.d.ts.map +1 -1
- package/dist/cli/utils/provider-setup.js +324 -84
- package/dist/cli/utils/scaffolding-utils.d.ts +76 -0
- package/dist/cli/utils/scaffolding-utils.d.ts.map +1 -0
- package/dist/cli/utils/scaffolding-utils.js +246 -0
- package/dist/cli/utils/setup-utils.d.ts +16 -0
- package/dist/cli/utils/setup-utils.d.ts.map +1 -1
- package/dist/cli/utils/setup-utils.js +72 -21
- package/dist/cli/utils/template-engine.d.ts +65 -0
- package/dist/cli/utils/template-engine.d.ts.map +1 -0
- package/dist/cli/utils/template-engine.js +1089 -0
- package/dist/config/cli-overrides.d.ts +45 -2
- package/dist/config/cli-overrides.d.ts.map +1 -1
- package/dist/config/cli-overrides.js +107 -10
- package/dist/index.js +379 -99
- package/dist/utils/agent-helpers.d.ts +95 -0
- package/dist/utils/agent-helpers.d.ts.map +1 -0
- package/dist/utils/agent-helpers.js +117 -0
- package/dist/webui/assets/index-8j-KMkX1.js +2054 -0
- package/dist/webui/assets/index-c_AX24V4.css +1 -0
- package/dist/webui/assets/{tanstack-DgxBONJY.js → tanstack-Br79RQ-n.js} +1 -1
- package/dist/webui/index.html +4 -10
- package/dist/webui/logos/aws-color.svg +1 -0
- package/dist/webui/logos/dexto/dexto_logo.svg +1 -1
- package/dist/webui/logos/dexto/dexto_logo_light.svg +6 -6
- package/dist/webui/logos/glama.svg +7 -0
- package/dist/webui/logos/litellm.svg +7 -0
- package/dist/webui/logos/openrouter.svg +1 -0
- package/package.json +18 -15
- package/dist/cli/commands/interactive-commands/index.d.ts +0 -63
- package/dist/cli/commands/interactive-commands/index.d.ts.map +0 -1
- package/dist/cli/commands/interactive-commands/index.js +0 -73
- package/dist/cli/commands/interactive-commands/mcp/mcp-add-utils.d.ts +0 -34
- package/dist/cli/commands/interactive-commands/mcp/mcp-add-utils.d.ts.map +0 -1
- package/dist/cli/commands/interactive-commands/mcp/mcp-add-utils.js +0 -178
- package/dist/cli/commands/interactive-commands/mcp/mcp-commands.d.ts +0 -9
- package/dist/cli/commands/interactive-commands/mcp/mcp-commands.d.ts.map +0 -1
- package/dist/cli/commands/interactive-commands/mcp/mcp-commands.js +0 -325
- package/dist/cli/commands/interactive-commands/model/model-commands.d.ts +0 -21
- package/dist/cli/commands/interactive-commands/model/model-commands.d.ts.map +0 -1
- package/dist/cli/commands/interactive-commands/model/model-commands.js +0 -190
- package/dist/cli/ink-cli/components/MultiLineTextInput.d.ts +0 -26
- package/dist/cli/ink-cli/components/MultiLineTextInput.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/MultiLineTextInput.js +0 -220
- package/dist/discord/bot.d.ts +0 -4
- package/dist/discord/bot.d.ts.map +0 -1
- package/dist/discord/bot.js +0 -193
- package/dist/telegram/bot.d.ts +0 -5
- package/dist/telegram/bot.d.ts.map +0 -1
- package/dist/telegram/bot.js +0 -251
- package/dist/webui/assets/index-DKq5Xng1.js +0 -687
- package/dist/webui/assets/index-D_0_GBu5.css +0 -1
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* State actions for CLI state machine
|
|
3
3
|
* All state mutations go through these actions
|
|
4
|
+
*
|
|
5
|
+
* Note: Message/streaming state is handled separately via useState in InkCLIRefactored
|
|
6
|
+
* to simplify the reducer and match WebUI's direct event handling pattern.
|
|
4
7
|
*/
|
|
5
|
-
import type {
|
|
8
|
+
import type { OverlayType, McpWizardServerType, PendingImage } from './types.js';
|
|
6
9
|
import type { ApprovalRequest } from '../components/ApprovalPrompt.js';
|
|
7
10
|
/**
|
|
8
11
|
* Input actions
|
|
@@ -21,47 +24,23 @@ export type InputHistoryNavigateAction = {
|
|
|
21
24
|
export type InputHistoryResetAction = {
|
|
22
25
|
type: 'INPUT_HISTORY_RESET';
|
|
23
26
|
};
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
export type MessageAddAction = {
|
|
28
|
-
type: 'MESSAGE_ADD';
|
|
29
|
-
message: Message;
|
|
30
|
-
};
|
|
31
|
-
export type MessageAddMultipleAction = {
|
|
32
|
-
type: 'MESSAGE_ADD_MULTIPLE';
|
|
33
|
-
messages: Message[];
|
|
34
|
-
};
|
|
35
|
-
export type MessageInsertBeforeStreamingAction = {
|
|
36
|
-
type: 'MESSAGE_INSERT_BEFORE_STREAMING';
|
|
37
|
-
message: Message;
|
|
38
|
-
};
|
|
39
|
-
export type MessageUpdateAction = {
|
|
40
|
-
type: 'MESSAGE_UPDATE';
|
|
41
|
-
id: string;
|
|
42
|
-
update: Partial<Message>;
|
|
43
|
-
};
|
|
44
|
-
export type MessageRemoveAction = {
|
|
45
|
-
type: 'MESSAGE_REMOVE';
|
|
46
|
-
id: string;
|
|
27
|
+
export type InputHistoryAddAction = {
|
|
28
|
+
type: 'INPUT_HISTORY_ADD';
|
|
29
|
+
value: string;
|
|
47
30
|
};
|
|
48
31
|
/**
|
|
49
|
-
*
|
|
32
|
+
* Image attachment actions
|
|
50
33
|
*/
|
|
51
|
-
export type
|
|
52
|
-
type: '
|
|
53
|
-
|
|
54
|
-
};
|
|
55
|
-
export type StreamingChunkAction = {
|
|
56
|
-
type: 'STREAMING_CHUNK';
|
|
57
|
-
content: string;
|
|
34
|
+
export type ImageAddAction = {
|
|
35
|
+
type: 'IMAGE_ADD';
|
|
36
|
+
image: PendingImage;
|
|
58
37
|
};
|
|
59
|
-
export type
|
|
60
|
-
type: '
|
|
61
|
-
|
|
38
|
+
export type ImageRemoveAction = {
|
|
39
|
+
type: 'IMAGE_REMOVE';
|
|
40
|
+
imageId: string;
|
|
62
41
|
};
|
|
63
|
-
export type
|
|
64
|
-
type: '
|
|
42
|
+
export type ImagesClearAction = {
|
|
43
|
+
type: 'IMAGES_CLEAR';
|
|
65
44
|
};
|
|
66
45
|
export type CancelStartAction = {
|
|
67
46
|
type: 'CANCEL_START';
|
|
@@ -72,21 +51,6 @@ export type ThinkingStartAction = {
|
|
|
72
51
|
export type ThinkingEndAction = {
|
|
73
52
|
type: 'THINKING_END';
|
|
74
53
|
};
|
|
75
|
-
/**
|
|
76
|
-
* Submission actions
|
|
77
|
-
*/
|
|
78
|
-
export type SubmitStartAction = {
|
|
79
|
-
type: 'SUBMIT_START';
|
|
80
|
-
userMessage: Message;
|
|
81
|
-
inputValue: string;
|
|
82
|
-
};
|
|
83
|
-
export type SubmitCompleteAction = {
|
|
84
|
-
type: 'SUBMIT_COMPLETE';
|
|
85
|
-
};
|
|
86
|
-
export type SubmitErrorAction = {
|
|
87
|
-
type: 'SUBMIT_ERROR';
|
|
88
|
-
errorMessage: string;
|
|
89
|
-
};
|
|
90
54
|
/**
|
|
91
55
|
* UI actions
|
|
92
56
|
*/
|
|
@@ -103,6 +67,10 @@ export type ShowOverlayAction = {
|
|
|
103
67
|
export type CloseOverlayAction = {
|
|
104
68
|
type: 'CLOSE_OVERLAY';
|
|
105
69
|
};
|
|
70
|
+
export type SetMcpWizardServerTypeAction = {
|
|
71
|
+
type: 'SET_MCP_WIZARD_SERVER_TYPE';
|
|
72
|
+
serverType: McpWizardServerType;
|
|
73
|
+
};
|
|
106
74
|
/**
|
|
107
75
|
* Session actions
|
|
108
76
|
*/
|
|
@@ -131,13 +99,6 @@ export type ApprovalRequestAction = {
|
|
|
131
99
|
export type ApprovalCompleteAction = {
|
|
132
100
|
type: 'APPROVAL_COMPLETE';
|
|
133
101
|
};
|
|
134
|
-
/**
|
|
135
|
-
* Error actions
|
|
136
|
-
*/
|
|
137
|
-
export type ErrorAction = {
|
|
138
|
-
type: 'ERROR';
|
|
139
|
-
errorMessage: string;
|
|
140
|
-
};
|
|
141
102
|
/**
|
|
142
103
|
* Exit warning actions (for double Ctrl+C to exit)
|
|
143
104
|
*/
|
|
@@ -147,8 +108,17 @@ export type ExitWarningShowAction = {
|
|
|
147
108
|
export type ExitWarningClearAction = {
|
|
148
109
|
type: 'EXIT_WARNING_CLEAR';
|
|
149
110
|
};
|
|
111
|
+
/**
|
|
112
|
+
* Copy mode actions (for text selection in alternate buffer)
|
|
113
|
+
*/
|
|
114
|
+
export type CopyModeEnableAction = {
|
|
115
|
+
type: 'COPY_MODE_ENABLE';
|
|
116
|
+
};
|
|
117
|
+
export type CopyModeDisableAction = {
|
|
118
|
+
type: 'COPY_MODE_DISABLE';
|
|
119
|
+
};
|
|
150
120
|
/**
|
|
151
121
|
* Combined action type
|
|
152
122
|
*/
|
|
153
|
-
export type CLIAction = InputChangeAction | InputClearAction | InputHistoryNavigateAction | InputHistoryResetAction |
|
|
123
|
+
export type CLIAction = InputChangeAction | InputClearAction | InputHistoryNavigateAction | InputHistoryResetAction | InputHistoryAddAction | ImageAddAction | ImageRemoveAction | ImagesClearAction | CancelStartAction | ThinkingStartAction | ThinkingEndAction | ProcessingStartAction | ProcessingEndAction | ShowOverlayAction | CloseOverlayAction | SetMcpWizardServerTypeAction | SessionSetAction | SessionClearAction | ModelUpdateAction | ConversationResetAction | ApprovalRequestAction | ApprovalCompleteAction | ExitWarningShowAction | ExitWarningClearAction | CopyModeEnableAction | CopyModeDisableAction;
|
|
154
124
|
//# sourceMappingURL=actions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../../src/cli/ink-cli/state/actions.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../../src/cli/ink-cli/state/actions.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* State actions for CLI state machine
|
|
3
3
|
* All state mutations go through these actions
|
|
4
|
+
*
|
|
5
|
+
* Note: Message/streaming state is handled separately via useState in InkCLIRefactored
|
|
6
|
+
* to simplify the reducer and match WebUI's direct event handling pattern.
|
|
4
7
|
*/
|
|
5
8
|
export {};
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* State management module exports
|
|
3
|
+
*
|
|
4
|
+
* Note: State is now managed via useState hooks in InkCLIRefactored.
|
|
5
|
+
* This module exports types and remaining actions for UI/overlay state.
|
|
3
6
|
*/
|
|
4
|
-
export type { StartupInfo, Message, StreamingMessage, InputState, OverlayType, UIState, SessionState, CLIState, } from './types.js';
|
|
5
|
-
export type { InputChangeAction, InputClearAction, InputHistoryNavigateAction, InputHistoryResetAction,
|
|
6
|
-
export { cliReducer } from './reducer.js';
|
|
7
|
+
export type { StartupInfo, Message, StreamingMessage, InputState, PendingImage, OverlayType, McpWizardServerType, UIState, SessionState, CLIState, } from './types.js';
|
|
8
|
+
export type { InputChangeAction, InputClearAction, InputHistoryNavigateAction, InputHistoryResetAction, InputHistoryAddAction, ImageAddAction, ImageRemoveAction, ImagesClearAction, CancelStartAction, ThinkingStartAction, ThinkingEndAction, ProcessingStartAction, ProcessingEndAction, ShowOverlayAction, CloseOverlayAction, SetMcpWizardServerTypeAction, SessionSetAction, SessionClearAction, ModelUpdateAction, ConversationResetAction, ApprovalRequestAction, ApprovalCompleteAction, ExitWarningShowAction, ExitWarningClearAction, CopyModeEnableAction, CopyModeDisableAction, CLIAction, } from './actions.js';
|
|
7
9
|
export { createInitialState } from './initialState.js';
|
|
8
10
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/cli/ink-cli/state/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/cli/ink-cli/state/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,YAAY,EACR,WAAW,EACX,OAAO,EACP,gBAAgB,EAChB,UAAU,EACV,YAAY,EACZ,WAAW,EACX,mBAAmB,EACnB,OAAO,EACP,YAAY,EACZ,QAAQ,GACX,MAAM,YAAY,CAAC;AAGpB,YAAY,EACR,iBAAiB,EACjB,gBAAgB,EAChB,0BAA0B,EAC1B,uBAAuB,EACvB,qBAAqB,EACrB,cAAc,EACd,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,mBAAmB,EACnB,iBAAiB,EACjB,qBAAqB,EACrB,mBAAmB,EACnB,iBAAiB,EACjB,kBAAkB,EAClB,4BAA4B,EAC5B,gBAAgB,EAChB,kBAAkB,EAClB,iBAAiB,EACjB,uBAAuB,EACvB,qBAAqB,EACrB,sBAAsB,EACtB,qBAAqB,EACrB,sBAAsB,EACtB,oBAAoB,EACpB,qBAAqB,EACrB,SAAS,GACZ,MAAM,cAAc,CAAC;AAGtB,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* State management module exports
|
|
3
|
+
*
|
|
4
|
+
* Note: State is now managed via useState hooks in InkCLIRefactored.
|
|
5
|
+
* This module exports types and remaining actions for UI/overlay state.
|
|
3
6
|
*/
|
|
4
|
-
//
|
|
5
|
-
export { cliReducer } from './reducer.js';
|
|
6
|
-
// Initial state
|
|
7
|
+
// Initial state (for types reference only)
|
|
7
8
|
export { createInitialState } from './initialState.js';
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Initial state for CLI state machine
|
|
3
|
+
*
|
|
4
|
+
* Note: Messages are handled separately via useState in InkCLIRefactored
|
|
3
5
|
*/
|
|
4
|
-
import type { CLIState
|
|
6
|
+
import type { CLIState } from './types.js';
|
|
5
7
|
/**
|
|
6
8
|
* Creates the initial CLI state
|
|
7
|
-
* @param initialMessages - Optional messages to populate the state with (e.g., startup info)
|
|
8
9
|
* @param initialModelName - Initial model name
|
|
9
10
|
*/
|
|
10
|
-
export declare function createInitialState(
|
|
11
|
+
export declare function createInitialState(initialModelName?: string): CLIState;
|
|
11
12
|
//# sourceMappingURL=initialState.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"initialState.d.ts","sourceRoot":"","sources":["../../../../src/cli/ink-cli/state/initialState.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"initialState.d.ts","sourceRoot":"","sources":["../../../../src/cli/ink-cli/state/initialState.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAE3C;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,gBAAgB,GAAE,MAAW,GAAG,QAAQ,CAwC1E"}
|
|
@@ -1,19 +1,22 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Initial state for CLI state machine
|
|
3
|
+
*
|
|
4
|
+
* Note: Messages are handled separately via useState in InkCLIRefactored
|
|
3
5
|
*/
|
|
4
6
|
/**
|
|
5
7
|
* Creates the initial CLI state
|
|
6
|
-
* @param initialMessages - Optional messages to populate the state with (e.g., startup info)
|
|
7
8
|
* @param initialModelName - Initial model name
|
|
8
9
|
*/
|
|
9
|
-
export function createInitialState(
|
|
10
|
+
export function createInitialState(initialModelName = '') {
|
|
10
11
|
return {
|
|
11
|
-
messages: initialMessages,
|
|
12
|
-
streamingMessage: null,
|
|
13
12
|
input: {
|
|
14
13
|
value: '',
|
|
15
14
|
history: [],
|
|
16
15
|
historyIndex: -1,
|
|
16
|
+
draftBeforeHistory: '',
|
|
17
|
+
images: [],
|
|
18
|
+
pastedBlocks: [],
|
|
19
|
+
pasteCounter: 0,
|
|
17
20
|
},
|
|
18
21
|
ui: {
|
|
19
22
|
isProcessing: false,
|
|
@@ -22,6 +25,19 @@ export function createInitialState(initialMessages = [], initialModelName = '')
|
|
|
22
25
|
activeOverlay: 'none',
|
|
23
26
|
exitWarningShown: false,
|
|
24
27
|
exitWarningTimestamp: null,
|
|
28
|
+
mcpWizardServerType: null,
|
|
29
|
+
copyModeEnabled: false,
|
|
30
|
+
pendingModelSwitch: null,
|
|
31
|
+
selectedMcpServer: null,
|
|
32
|
+
historySearch: {
|
|
33
|
+
isActive: false,
|
|
34
|
+
query: '',
|
|
35
|
+
matchIndex: 0,
|
|
36
|
+
originalInput: '',
|
|
37
|
+
lastMatch: '',
|
|
38
|
+
},
|
|
39
|
+
promptAddWizard: null,
|
|
40
|
+
autoApproveEdits: false,
|
|
25
41
|
},
|
|
26
42
|
session: {
|
|
27
43
|
id: null,
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* State reducer for CLI state machine
|
|
3
3
|
* Pure function that handles all state transitions
|
|
4
|
+
*
|
|
5
|
+
* Note: Message/streaming state is handled separately via useState in InkCLIRefactored
|
|
6
|
+
* to simplify the reducer and match WebUI's direct event handling pattern.
|
|
4
7
|
*/
|
|
5
8
|
import type { CLIState } from './types.js';
|
|
6
9
|
import type { CLIAction } from './actions.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reducer.d.ts","sourceRoot":"","sources":["../../../../src/cli/ink-cli/state/reducer.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"reducer.d.ts","sourceRoot":"","sources":["../../../../src/cli/ink-cli/state/reducer.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE9C;;;GAGG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,GAAG,QAAQ,CAkWvE"}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* State reducer for CLI state machine
|
|
3
3
|
* Pure function that handles all state transitions
|
|
4
|
+
*
|
|
5
|
+
* Note: Message/streaming state is handled separately via useState in InkCLIRefactored
|
|
6
|
+
* to simplify the reducer and match WebUI's direct event handling pattern.
|
|
4
7
|
*/
|
|
5
|
-
import { generateMessageId } from '../utils/idGenerator.js';
|
|
6
8
|
/**
|
|
7
9
|
* Main CLI state reducer
|
|
8
10
|
* Handles all state transitions in a predictable, testable way
|
|
@@ -90,119 +92,47 @@ export function cliReducer(state, action) {
|
|
|
90
92
|
historyIndex: -1,
|
|
91
93
|
},
|
|
92
94
|
};
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
case 'MESSAGE_ADD_MULTIPLE':
|
|
100
|
-
return {
|
|
101
|
-
...state,
|
|
102
|
-
messages: [...state.messages, ...action.messages],
|
|
103
|
-
};
|
|
104
|
-
case 'MESSAGE_INSERT_BEFORE_STREAMING': {
|
|
105
|
-
// Insert message before the streaming message (for tool calls)
|
|
106
|
-
if (!state.streamingMessage) {
|
|
107
|
-
// No streaming message, just append
|
|
108
|
-
return {
|
|
109
|
-
...state,
|
|
110
|
-
messages: [...state.messages, action.message],
|
|
111
|
-
};
|
|
112
|
-
}
|
|
113
|
-
// Find streaming message and insert before it
|
|
114
|
-
const streamingIndex = state.messages.findIndex((msg) => msg.id === state.streamingMessage?.id);
|
|
115
|
-
if (streamingIndex === -1) {
|
|
116
|
-
// Streaming message not found, append
|
|
117
|
-
return {
|
|
118
|
-
...state,
|
|
119
|
-
messages: [...state.messages, action.message],
|
|
120
|
-
};
|
|
95
|
+
case 'INPUT_HISTORY_ADD': {
|
|
96
|
+
// Add to history if not duplicate of last entry
|
|
97
|
+
const { history } = state.input;
|
|
98
|
+
if (!action.value ||
|
|
99
|
+
(history.length > 0 && history[history.length - 1] === action.value)) {
|
|
100
|
+
return state;
|
|
121
101
|
}
|
|
122
|
-
// Insert before streaming message
|
|
123
|
-
const newMessages = [
|
|
124
|
-
...state.messages.slice(0, streamingIndex),
|
|
125
|
-
action.message,
|
|
126
|
-
...state.messages.slice(streamingIndex),
|
|
127
|
-
];
|
|
128
102
|
return {
|
|
129
103
|
...state,
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
return {
|
|
135
|
-
...state,
|
|
136
|
-
messages: state.messages.map((msg) => msg.id === action.id ? { ...msg, ...action.update } : msg),
|
|
137
|
-
};
|
|
138
|
-
case 'MESSAGE_REMOVE':
|
|
139
|
-
return {
|
|
140
|
-
...state,
|
|
141
|
-
messages: state.messages.filter((msg) => msg.id !== action.id),
|
|
142
|
-
};
|
|
143
|
-
// Streaming actions
|
|
144
|
-
case 'STREAMING_START': {
|
|
145
|
-
const streamingMessage = {
|
|
146
|
-
id: action.id,
|
|
147
|
-
role: 'assistant',
|
|
148
|
-
content: '',
|
|
149
|
-
timestamp: new Date(),
|
|
150
|
-
isStreaming: true,
|
|
151
|
-
};
|
|
152
|
-
return {
|
|
153
|
-
...state,
|
|
154
|
-
messages: [...state.messages, streamingMessage],
|
|
155
|
-
streamingMessage: {
|
|
156
|
-
id: action.id,
|
|
157
|
-
content: '',
|
|
104
|
+
input: {
|
|
105
|
+
...state.input,
|
|
106
|
+
history: [...history, action.value].slice(-100), // Keep last 100
|
|
107
|
+
historyIndex: -1,
|
|
158
108
|
},
|
|
159
109
|
};
|
|
160
110
|
}
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
return state;
|
|
164
|
-
const newContent = state.streamingMessage.content + action.content;
|
|
111
|
+
// Image actions
|
|
112
|
+
case 'IMAGE_ADD':
|
|
165
113
|
return {
|
|
166
114
|
...state,
|
|
167
|
-
|
|
168
|
-
...state.
|
|
169
|
-
|
|
115
|
+
input: {
|
|
116
|
+
...state.input,
|
|
117
|
+
images: [...state.input.images, action.image],
|
|
170
118
|
},
|
|
171
|
-
messages: state.messages.map((msg) => msg.id === state.streamingMessage?.id
|
|
172
|
-
? { ...msg, content: newContent, isStreaming: true }
|
|
173
|
-
: msg),
|
|
174
119
|
};
|
|
175
|
-
|
|
176
|
-
case 'STREAMING_END': {
|
|
177
|
-
if (!state.streamingMessage)
|
|
178
|
-
return state;
|
|
179
|
-
// Preserve accumulated content if action.content is empty
|
|
180
|
-
const finalContent = action.content && action.content.length > 0
|
|
181
|
-
? action.content
|
|
182
|
-
: state.streamingMessage.content;
|
|
120
|
+
case 'IMAGE_REMOVE':
|
|
183
121
|
return {
|
|
184
122
|
...state,
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
123
|
+
input: {
|
|
124
|
+
...state.input,
|
|
125
|
+
images: state.input.images.filter((img) => img.id !== action.imageId),
|
|
126
|
+
},
|
|
189
127
|
};
|
|
190
|
-
|
|
191
|
-
case 'STREAMING_CANCEL': {
|
|
192
|
-
const streamingId = state.streamingMessage?.id;
|
|
128
|
+
case 'IMAGES_CLEAR':
|
|
193
129
|
return {
|
|
194
130
|
...state,
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
: state.messages,
|
|
199
|
-
ui: {
|
|
200
|
-
...state.ui,
|
|
201
|
-
isCancelling: false,
|
|
202
|
-
isThinking: false, // Clear thinking state on cancel
|
|
131
|
+
input: {
|
|
132
|
+
...state.input,
|
|
133
|
+
images: [],
|
|
203
134
|
},
|
|
204
135
|
};
|
|
205
|
-
}
|
|
206
136
|
case 'CANCEL_START':
|
|
207
137
|
return {
|
|
208
138
|
...state,
|
|
@@ -228,22 +158,10 @@ export function cliReducer(state, action) {
|
|
|
228
158
|
isThinking: false,
|
|
229
159
|
},
|
|
230
160
|
};
|
|
231
|
-
//
|
|
232
|
-
case '
|
|
233
|
-
// Add to history if not duplicate
|
|
234
|
-
const newHistory = action.inputValue &&
|
|
235
|
-
(state.input.history.length === 0 ||
|
|
236
|
-
state.input.history[state.input.history.length - 1] !== action.inputValue)
|
|
237
|
-
? [...state.input.history, action.inputValue].slice(-100)
|
|
238
|
-
: state.input.history;
|
|
161
|
+
// UI actions
|
|
162
|
+
case 'PROCESSING_START':
|
|
239
163
|
return {
|
|
240
164
|
...state,
|
|
241
|
-
messages: [...state.messages, action.userMessage],
|
|
242
|
-
input: {
|
|
243
|
-
value: '',
|
|
244
|
-
history: newHistory,
|
|
245
|
-
historyIndex: -1,
|
|
246
|
-
},
|
|
247
165
|
ui: {
|
|
248
166
|
...state.ui,
|
|
249
167
|
isProcessing: true,
|
|
@@ -253,66 +171,39 @@ export function cliReducer(state, action) {
|
|
|
253
171
|
exitWarningTimestamp: null,
|
|
254
172
|
},
|
|
255
173
|
};
|
|
256
|
-
|
|
257
|
-
case 'SUBMIT_COMPLETE':
|
|
258
|
-
return {
|
|
259
|
-
...state,
|
|
260
|
-
ui: {
|
|
261
|
-
...state.ui,
|
|
262
|
-
isProcessing: false,
|
|
263
|
-
},
|
|
264
|
-
};
|
|
265
|
-
case 'SUBMIT_ERROR': {
|
|
266
|
-
const errorMessage = {
|
|
267
|
-
id: generateMessageId('error'),
|
|
268
|
-
role: 'system',
|
|
269
|
-
content: action.errorMessage,
|
|
270
|
-
timestamp: new Date(),
|
|
271
|
-
};
|
|
174
|
+
case 'PROCESSING_END':
|
|
272
175
|
return {
|
|
273
176
|
...state,
|
|
274
|
-
messages: [...state.messages, errorMessage],
|
|
275
177
|
ui: {
|
|
276
178
|
...state.ui,
|
|
277
179
|
isProcessing: false,
|
|
278
180
|
isCancelling: false,
|
|
279
|
-
isThinking: false, // Clear thinking state
|
|
181
|
+
isThinking: false, // Clear thinking state when processing ends
|
|
280
182
|
},
|
|
281
|
-
streamingMessage: null,
|
|
282
183
|
};
|
|
283
|
-
|
|
284
|
-
// UI actions
|
|
285
|
-
case 'PROCESSING_START':
|
|
184
|
+
case 'SHOW_OVERLAY':
|
|
286
185
|
return {
|
|
287
186
|
...state,
|
|
288
187
|
ui: {
|
|
289
188
|
...state.ui,
|
|
290
|
-
|
|
189
|
+
activeOverlay: action.overlay,
|
|
291
190
|
},
|
|
292
191
|
};
|
|
293
|
-
case '
|
|
192
|
+
case 'CLOSE_OVERLAY':
|
|
294
193
|
return {
|
|
295
194
|
...state,
|
|
296
195
|
ui: {
|
|
297
196
|
...state.ui,
|
|
298
|
-
|
|
299
|
-
|
|
197
|
+
activeOverlay: 'none',
|
|
198
|
+
mcpWizardServerType: null, // Clear wizard state when closing overlay
|
|
300
199
|
},
|
|
301
200
|
};
|
|
302
|
-
case '
|
|
201
|
+
case 'SET_MCP_WIZARD_SERVER_TYPE':
|
|
303
202
|
return {
|
|
304
203
|
...state,
|
|
305
204
|
ui: {
|
|
306
205
|
...state.ui,
|
|
307
|
-
|
|
308
|
-
},
|
|
309
|
-
};
|
|
310
|
-
case 'CLOSE_OVERLAY':
|
|
311
|
-
return {
|
|
312
|
-
...state,
|
|
313
|
-
ui: {
|
|
314
|
-
...state.ui,
|
|
315
|
-
activeOverlay: 'none',
|
|
206
|
+
mcpWizardServerType: action.serverType,
|
|
316
207
|
},
|
|
317
208
|
};
|
|
318
209
|
// Session actions
|
|
@@ -328,7 +219,6 @@ export function cliReducer(state, action) {
|
|
|
328
219
|
case 'SESSION_CLEAR':
|
|
329
220
|
return {
|
|
330
221
|
...state,
|
|
331
|
-
messages: [],
|
|
332
222
|
session: {
|
|
333
223
|
...state.session,
|
|
334
224
|
id: null,
|
|
@@ -352,8 +242,6 @@ export function cliReducer(state, action) {
|
|
|
352
242
|
case 'CONVERSATION_RESET':
|
|
353
243
|
return {
|
|
354
244
|
...state,
|
|
355
|
-
messages: [],
|
|
356
|
-
streamingMessage: null,
|
|
357
245
|
approval: null,
|
|
358
246
|
approvalQueue: [],
|
|
359
247
|
ui: {
|
|
@@ -363,6 +251,13 @@ export function cliReducer(state, action) {
|
|
|
363
251
|
};
|
|
364
252
|
// Approval actions
|
|
365
253
|
case 'APPROVAL_REQUEST':
|
|
254
|
+
// Dedupe: skip if this approval ID is already pending or queued
|
|
255
|
+
if (state.approval?.approvalId === action.approval.approvalId) {
|
|
256
|
+
return state;
|
|
257
|
+
}
|
|
258
|
+
if (state.approvalQueue.some((r) => r.approvalId === action.approval.approvalId)) {
|
|
259
|
+
return state;
|
|
260
|
+
}
|
|
366
261
|
// If there's already a pending approval, queue this one
|
|
367
262
|
if (state.approval !== null) {
|
|
368
263
|
return {
|
|
@@ -404,24 +299,6 @@ export function cliReducer(state, action) {
|
|
|
404
299
|
activeOverlay: 'none',
|
|
405
300
|
},
|
|
406
301
|
};
|
|
407
|
-
// Error actions
|
|
408
|
-
case 'ERROR': {
|
|
409
|
-
const errorMessage = {
|
|
410
|
-
id: generateMessageId('error'),
|
|
411
|
-
role: 'system',
|
|
412
|
-
content: `❌ Error: ${action.errorMessage}`,
|
|
413
|
-
timestamp: new Date(),
|
|
414
|
-
};
|
|
415
|
-
return {
|
|
416
|
-
...state,
|
|
417
|
-
messages: [...state.messages, errorMessage],
|
|
418
|
-
ui: {
|
|
419
|
-
...state.ui,
|
|
420
|
-
isProcessing: false,
|
|
421
|
-
},
|
|
422
|
-
streamingMessage: null,
|
|
423
|
-
};
|
|
424
|
-
}
|
|
425
302
|
// Exit warning actions (for double Ctrl+C to exit)
|
|
426
303
|
case 'EXIT_WARNING_SHOW':
|
|
427
304
|
return {
|
|
@@ -441,6 +318,23 @@ export function cliReducer(state, action) {
|
|
|
441
318
|
exitWarningTimestamp: null,
|
|
442
319
|
},
|
|
443
320
|
};
|
|
321
|
+
// Copy mode actions (for text selection in alternate buffer)
|
|
322
|
+
case 'COPY_MODE_ENABLE':
|
|
323
|
+
return {
|
|
324
|
+
...state,
|
|
325
|
+
ui: {
|
|
326
|
+
...state.ui,
|
|
327
|
+
copyModeEnabled: true,
|
|
328
|
+
},
|
|
329
|
+
};
|
|
330
|
+
case 'COPY_MODE_DISABLE':
|
|
331
|
+
return {
|
|
332
|
+
...state,
|
|
333
|
+
ui: {
|
|
334
|
+
...state.ui,
|
|
335
|
+
copyModeEnabled: false,
|
|
336
|
+
},
|
|
337
|
+
};
|
|
444
338
|
default:
|
|
445
339
|
return state;
|
|
446
340
|
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Streaming state manager for CLI
|
|
3
|
+
*
|
|
4
|
+
* Simple module-level state that can be accessed by both React components
|
|
5
|
+
* and command handlers. Uses a subscription pattern for React integration.
|
|
6
|
+
*/
|
|
7
|
+
type StreamingListener = (enabled: boolean) => void;
|
|
8
|
+
/**
|
|
9
|
+
* Get current streaming state
|
|
10
|
+
*/
|
|
11
|
+
export declare function isStreamingEnabled(): boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Set streaming state and notify listeners
|
|
14
|
+
*/
|
|
15
|
+
export declare function setStreamingEnabled(enabled: boolean): void;
|
|
16
|
+
/**
|
|
17
|
+
* Toggle streaming state
|
|
18
|
+
* @returns New streaming state
|
|
19
|
+
*/
|
|
20
|
+
export declare function toggleStreaming(): boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Subscribe to streaming state changes
|
|
23
|
+
* @returns Unsubscribe function
|
|
24
|
+
*/
|
|
25
|
+
export declare function subscribeToStreaming(listener: StreamingListener): () => void;
|
|
26
|
+
export {};
|
|
27
|
+
//# sourceMappingURL=streaming-state.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"streaming-state.d.ts","sourceRoot":"","sources":["../../../../src/cli/ink-cli/state/streaming-state.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,KAAK,iBAAiB,GAAG,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;AAKpD;;GAEG;AACH,wBAAgB,kBAAkB,IAAI,OAAO,CAE5C;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAK1D;AAED;;;GAGG;AACH,wBAAgB,eAAe,IAAI,OAAO,CAGzC;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,iBAAiB,GAAG,MAAM,IAAI,CAG5E"}
|