dexto 1.6.1 → 1.6.2
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/dist/analytics/wrapper.js +1 -1
- package/dist/cli/auth/dexto-api-key.d.ts +34 -0
- package/dist/cli/auth/dexto-api-key.d.ts.map +1 -0
- package/dist/cli/auth/dexto-api-key.js +161 -0
- package/dist/cli/auth/index.d.ts +2 -1
- package/dist/cli/auth/index.d.ts.map +1 -1
- package/dist/cli/auth/index.js +2 -1
- package/dist/cli/auth/oauth.d.ts +10 -0
- package/dist/cli/auth/oauth.d.ts.map +1 -1
- package/dist/cli/auth/oauth.js +113 -36
- package/dist/cli/auth/service.d.ts +1 -0
- package/dist/cli/auth/service.d.ts.map +1 -1
- package/dist/cli/auth/service.js +1 -0
- package/dist/cli/commands/auth/login.d.ts.map +1 -1
- package/dist/cli/commands/auth/login.js +40 -105
- package/dist/cli/commands/setup.d.ts.map +1 -1
- package/dist/cli/commands/setup.js +157 -120
- package/dist/cli/utils/config-validation.js +3 -3
- package/dist/cli/utils/options.d.ts.map +1 -1
- package/dist/cli/utils/options.js +6 -0
- package/dist/index-main.js +36 -2
- package/dist/webui/assets/index-BPlk2Wbt.css +1 -0
- package/dist/webui/assets/index-BZvrpxyh.js +2059 -0
- package/dist/webui/index.html +2 -2
- package/package.json +12 -22
- package/dist/cli/assets/sounds/SOURCES.md +0 -35
- package/dist/cli/assets/sounds/boot.wav +0 -0
- package/dist/cli/assets/sounds/chime.wav +0 -0
- package/dist/cli/assets/sounds/coin.wav +0 -0
- package/dist/cli/assets/sounds/confirm.wav +0 -0
- package/dist/cli/assets/sounds/levelup.wav +0 -0
- package/dist/cli/assets/sounds/ping.wav +0 -0
- package/dist/cli/assets/sounds/powerup.wav +0 -0
- package/dist/cli/assets/sounds/startup.wav +0 -0
- package/dist/cli/assets/sounds/success.wav +0 -0
- package/dist/cli/assets/sounds/treasure.wav +0 -0
- package/dist/cli/assets/sounds/win.wav +0 -0
- package/dist/cli/commands/interactive-commands/auth/index.d.ts +0 -12
- package/dist/cli/commands/interactive-commands/auth/index.d.ts.map +0 -1
- package/dist/cli/commands/interactive-commands/auth/index.js +0 -20
- package/dist/cli/commands/interactive-commands/command-parser.d.ts +0 -56
- package/dist/cli/commands/interactive-commands/command-parser.d.ts.map +0 -1
- package/dist/cli/commands/interactive-commands/command-parser.js +0 -173
- package/dist/cli/commands/interactive-commands/commands.d.ts +0 -52
- package/dist/cli/commands/interactive-commands/commands.d.ts.map +0 -1
- package/dist/cli/commands/interactive-commands/commands.js +0 -142
- package/dist/cli/commands/interactive-commands/documentation-commands.d.ts +0 -15
- package/dist/cli/commands/interactive-commands/documentation-commands.d.ts.map +0 -1
- package/dist/cli/commands/interactive-commands/documentation-commands.js +0 -39
- package/dist/cli/commands/interactive-commands/exit-handler.d.ts +0 -12
- package/dist/cli/commands/interactive-commands/exit-handler.d.ts.map +0 -1
- package/dist/cli/commands/interactive-commands/exit-handler.js +0 -20
- package/dist/cli/commands/interactive-commands/exit-stats.d.ts +0 -24
- package/dist/cli/commands/interactive-commands/exit-stats.d.ts.map +0 -1
- package/dist/cli/commands/interactive-commands/exit-stats.js +0 -17
- package/dist/cli/commands/interactive-commands/export/index.d.ts +0 -13
- package/dist/cli/commands/interactive-commands/export/index.d.ts.map +0 -1
- package/dist/cli/commands/interactive-commands/export/index.js +0 -21
- package/dist/cli/commands/interactive-commands/general-commands.d.ts +0 -22
- package/dist/cli/commands/interactive-commands/general-commands.d.ts.map +0 -1
- package/dist/cli/commands/interactive-commands/general-commands.js +0 -508
- package/dist/cli/commands/interactive-commands/mcp/index.d.ts +0 -13
- package/dist/cli/commands/interactive-commands/mcp/index.d.ts.map +0 -1
- package/dist/cli/commands/interactive-commands/mcp/index.js +0 -18
- package/dist/cli/commands/interactive-commands/model/index.d.ts +0 -13
- package/dist/cli/commands/interactive-commands/model/index.d.ts.map +0 -1
- package/dist/cli/commands/interactive-commands/model/index.js +0 -19
- package/dist/cli/commands/interactive-commands/plugin/index.d.ts +0 -13
- package/dist/cli/commands/interactive-commands/plugin/index.d.ts.map +0 -1
- package/dist/cli/commands/interactive-commands/plugin/index.js +0 -18
- package/dist/cli/commands/interactive-commands/prompt-commands.d.ts +0 -25
- package/dist/cli/commands/interactive-commands/prompt-commands.d.ts.map +0 -1
- package/dist/cli/commands/interactive-commands/prompt-commands.js +0 -284
- package/dist/cli/commands/interactive-commands/session/index.d.ts +0 -16
- package/dist/cli/commands/interactive-commands/session/index.d.ts.map +0 -1
- package/dist/cli/commands/interactive-commands/session/index.js +0 -15
- package/dist/cli/commands/interactive-commands/session/session-commands.d.ts +0 -32
- package/dist/cli/commands/interactive-commands/session/session-commands.d.ts.map +0 -1
- package/dist/cli/commands/interactive-commands/session/session-commands.js +0 -65
- package/dist/cli/commands/interactive-commands/system/index.d.ts +0 -13
- package/dist/cli/commands/interactive-commands/system/index.d.ts.map +0 -1
- package/dist/cli/commands/interactive-commands/system/index.js +0 -12
- package/dist/cli/commands/interactive-commands/system/system-commands.d.ts +0 -6
- package/dist/cli/commands/interactive-commands/system/system-commands.d.ts.map +0 -1
- package/dist/cli/commands/interactive-commands/system/system-commands.js +0 -188
- package/dist/cli/commands/interactive-commands/tool-commands.d.ts +0 -15
- package/dist/cli/commands/interactive-commands/tool-commands.d.ts.map +0 -1
- package/dist/cli/commands/interactive-commands/tool-commands.js +0 -24
- package/dist/cli/commands/interactive-commands/utils/arg-parser.d.ts +0 -57
- package/dist/cli/commands/interactive-commands/utils/arg-parser.d.ts.map +0 -1
- package/dist/cli/commands/interactive-commands/utils/arg-parser.js +0 -81
- package/dist/cli/commands/interactive-commands/utils/command-output.d.ts +0 -40
- package/dist/cli/commands/interactive-commands/utils/command-output.d.ts.map +0 -1
- package/dist/cli/commands/interactive-commands/utils/command-output.js +0 -56
- package/dist/cli/commands/interactive-commands/utils/format-output.d.ts +0 -14
- package/dist/cli/commands/interactive-commands/utils/format-output.d.ts.map +0 -1
- package/dist/cli/commands/interactive-commands/utils/format-output.js +0 -18
- package/dist/cli/ink-cli/InkCLIRefactored.d.ts +0 -52
- package/dist/cli/ink-cli/InkCLIRefactored.d.ts.map +0 -1
- package/dist/cli/ink-cli/InkCLIRefactored.js +0 -231
- package/dist/cli/ink-cli/components/ApprovalPrompt.d.ts +0 -44
- package/dist/cli/ink-cli/components/ApprovalPrompt.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/ApprovalPrompt.js +0 -323
- package/dist/cli/ink-cli/components/BackgroundTasksPanel.d.ts +0 -18
- package/dist/cli/ink-cli/components/BackgroundTasksPanel.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/BackgroundTasksPanel.js +0 -48
- package/dist/cli/ink-cli/components/CustomInput.d.ts +0 -17
- package/dist/cli/ink-cli/components/CustomInput.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/CustomInput.js +0 -51
- package/dist/cli/ink-cli/components/CustomTextInput.d.ts +0 -16
- package/dist/cli/ink-cli/components/CustomTextInput.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/CustomTextInput.js +0 -36
- package/dist/cli/ink-cli/components/EditableMultiLineInput.d.ts +0 -19
- package/dist/cli/ink-cli/components/EditableMultiLineInput.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/EditableMultiLineInput.js +0 -120
- package/dist/cli/ink-cli/components/ElicitationForm.d.ts +0 -24
- package/dist/cli/ink-cli/components/ElicitationForm.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/ElicitationForm.js +0 -592
- package/dist/cli/ink-cli/components/ErrorBoundary.d.ts +0 -20
- package/dist/cli/ink-cli/components/ErrorBoundary.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/ErrorBoundary.js +0 -29
- package/dist/cli/ink-cli/components/Footer.d.ts +0 -22
- package/dist/cli/ink-cli/components/Footer.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/Footer.js +0 -76
- package/dist/cli/ink-cli/components/HistorySearchBar.d.ts +0 -17
- package/dist/cli/ink-cli/components/HistorySearchBar.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/HistorySearchBar.js +0 -8
- package/dist/cli/ink-cli/components/MultiLineInput.d.ts +0 -12
- package/dist/cli/ink-cli/components/MultiLineInput.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/MultiLineInput.js +0 -27
- package/dist/cli/ink-cli/components/ResourceAutocomplete.d.ts +0 -26
- package/dist/cli/ink-cli/components/ResourceAutocomplete.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/ResourceAutocomplete.js +0 -385
- package/dist/cli/ink-cli/components/SlashCommandAutocomplete.d.ts +0 -28
- package/dist/cli/ink-cli/components/SlashCommandAutocomplete.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/SlashCommandAutocomplete.js +0 -412
- package/dist/cli/ink-cli/components/StatusBar.d.ts +0 -41
- package/dist/cli/ink-cli/components/StatusBar.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/StatusBar.js +0 -116
- package/dist/cli/ink-cli/components/TextBufferInput.d.ts +0 -52
- package/dist/cli/ink-cli/components/TextBufferInput.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/TextBufferInput.js +0 -490
- package/dist/cli/ink-cli/components/TodoPanel.d.ts +0 -26
- package/dist/cli/ink-cli/components/TodoPanel.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/TodoPanel.js +0 -62
- package/dist/cli/ink-cli/components/base/BaseAutocomplete.d.ts +0 -29
- package/dist/cli/ink-cli/components/base/BaseAutocomplete.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/base/BaseAutocomplete.js +0 -98
- package/dist/cli/ink-cli/components/base/BaseSelector.d.ts +0 -37
- package/dist/cli/ink-cli/components/base/BaseSelector.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/base/BaseSelector.js +0 -128
- package/dist/cli/ink-cli/components/base/index.d.ts +0 -6
- package/dist/cli/ink-cli/components/base/index.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/base/index.js +0 -5
- package/dist/cli/ink-cli/components/chat/ChatView.d.ts +0 -19
- package/dist/cli/ink-cli/components/chat/ChatView.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/chat/ChatView.js +0 -11
- package/dist/cli/ink-cli/components/chat/Footer.d.ts +0 -9
- package/dist/cli/ink-cli/components/chat/Footer.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/chat/Footer.js +0 -8
- package/dist/cli/ink-cli/components/chat/Header.d.ts +0 -18
- package/dist/cli/ink-cli/components/chat/Header.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/chat/Header.js +0 -16
- package/dist/cli/ink-cli/components/chat/MessageItem.d.ts +0 -21
- package/dist/cli/ink-cli/components/chat/MessageItem.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/chat/MessageItem.js +0 -182
- package/dist/cli/ink-cli/components/chat/MessageList.d.ts +0 -16
- package/dist/cli/ink-cli/components/chat/MessageList.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/chat/MessageList.js +0 -20
- package/dist/cli/ink-cli/components/chat/QueuedMessagesDisplay.d.ts +0 -16
- package/dist/cli/ink-cli/components/chat/QueuedMessagesDisplay.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/chat/QueuedMessagesDisplay.js +0 -27
- package/dist/cli/ink-cli/components/chat/ToolIcon.d.ts +0 -18
- package/dist/cli/ink-cli/components/chat/ToolIcon.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/chat/ToolIcon.js +0 -36
- package/dist/cli/ink-cli/components/chat/index.d.ts +0 -10
- package/dist/cli/ink-cli/components/chat/index.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/chat/index.js +0 -9
- package/dist/cli/ink-cli/components/chat/styled-boxes/ConfigBox.d.ts +0 -10
- package/dist/cli/ink-cli/components/chat/styled-boxes/ConfigBox.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/chat/styled-boxes/ConfigBox.js +0 -6
- package/dist/cli/ink-cli/components/chat/styled-boxes/HelpBox.d.ts +0 -10
- package/dist/cli/ink-cli/components/chat/styled-boxes/HelpBox.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/chat/styled-boxes/HelpBox.js +0 -15
- package/dist/cli/ink-cli/components/chat/styled-boxes/LogConfigBox.d.ts +0 -10
- package/dist/cli/ink-cli/components/chat/styled-boxes/LogConfigBox.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/chat/styled-boxes/LogConfigBox.js +0 -9
- package/dist/cli/ink-cli/components/chat/styled-boxes/SessionHistoryBox.d.ts +0 -10
- package/dist/cli/ink-cli/components/chat/styled-boxes/SessionHistoryBox.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/chat/styled-boxes/SessionHistoryBox.js +0 -37
- package/dist/cli/ink-cli/components/chat/styled-boxes/SessionListBox.d.ts +0 -10
- package/dist/cli/ink-cli/components/chat/styled-boxes/SessionListBox.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/chat/styled-boxes/SessionListBox.js +0 -9
- package/dist/cli/ink-cli/components/chat/styled-boxes/ShortcutsBox.d.ts +0 -10
- package/dist/cli/ink-cli/components/chat/styled-boxes/ShortcutsBox.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/chat/styled-boxes/ShortcutsBox.js +0 -6
- package/dist/cli/ink-cli/components/chat/styled-boxes/StatsBox.d.ts +0 -10
- package/dist/cli/ink-cli/components/chat/styled-boxes/StatsBox.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/chat/styled-boxes/StatsBox.js +0 -29
- package/dist/cli/ink-cli/components/chat/styled-boxes/StyledBox.d.ts +0 -45
- package/dist/cli/ink-cli/components/chat/styled-boxes/StyledBox.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/chat/styled-boxes/StyledBox.js +0 -38
- package/dist/cli/ink-cli/components/chat/styled-boxes/SyspromptBox.d.ts +0 -10
- package/dist/cli/ink-cli/components/chat/styled-boxes/SyspromptBox.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/chat/styled-boxes/SyspromptBox.js +0 -6
- package/dist/cli/ink-cli/components/chat/styled-boxes/index.d.ts +0 -13
- package/dist/cli/ink-cli/components/chat/styled-boxes/index.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/chat/styled-boxes/index.js +0 -12
- package/dist/cli/ink-cli/components/input/InputArea.d.ts +0 -46
- package/dist/cli/ink-cli/components/input/InputArea.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/input/InputArea.js +0 -6
- package/dist/cli/ink-cli/components/input/index.d.ts +0 -5
- package/dist/cli/ink-cli/components/input/index.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/input/index.js +0 -4
- package/dist/cli/ink-cli/components/modes/AlternateBufferCLI.d.ts +0 -27
- package/dist/cli/ink-cli/components/modes/AlternateBufferCLI.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/modes/AlternateBufferCLI.js +0 -182
- package/dist/cli/ink-cli/components/modes/StaticCLI.d.ts +0 -29
- package/dist/cli/ink-cli/components/modes/StaticCLI.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/modes/StaticCLI.js +0 -114
- package/dist/cli/ink-cli/components/modes/index.d.ts +0 -10
- package/dist/cli/ink-cli/components/modes/index.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/modes/index.js +0 -9
- package/dist/cli/ink-cli/components/overlays/ApiKeyInput.d.ts +0 -26
- package/dist/cli/ink-cli/components/overlays/ApiKeyInput.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/overlays/ApiKeyInput.js +0 -92
- package/dist/cli/ink-cli/components/overlays/CommandOutputOverlay.d.ts +0 -13
- package/dist/cli/ink-cli/components/overlays/CommandOutputOverlay.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/overlays/CommandOutputOverlay.js +0 -60
- package/dist/cli/ink-cli/components/overlays/ContextStatsOverlay.d.ts +0 -26
- package/dist/cli/ink-cli/components/overlays/ContextStatsOverlay.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/overlays/ContextStatsOverlay.js +0 -241
- package/dist/cli/ink-cli/components/overlays/CustomModelWizard.d.ts +0 -29
- package/dist/cli/ink-cli/components/overlays/CustomModelWizard.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/overlays/CustomModelWizard.js +0 -301
- package/dist/cli/ink-cli/components/overlays/ExportWizard.d.ts +0 -22
- package/dist/cli/ink-cli/components/overlays/ExportWizard.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/overlays/ExportWizard.js +0 -308
- package/dist/cli/ink-cli/components/overlays/LogLevelSelector.d.ts +0 -23
- package/dist/cli/ink-cli/components/overlays/LogLevelSelector.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/overlays/LogLevelSelector.js +0 -70
- package/dist/cli/ink-cli/components/overlays/MarketplaceAddPrompt.d.ts +0 -20
- package/dist/cli/ink-cli/components/overlays/MarketplaceAddPrompt.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/overlays/MarketplaceAddPrompt.js +0 -81
- package/dist/cli/ink-cli/components/overlays/MarketplaceBrowser.d.ts +0 -31
- package/dist/cli/ink-cli/components/overlays/MarketplaceBrowser.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/overlays/MarketplaceBrowser.js +0 -297
- package/dist/cli/ink-cli/components/overlays/McpAddChoice.d.ts +0 -22
- package/dist/cli/ink-cli/components/overlays/McpAddChoice.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/overlays/McpAddChoice.js +0 -59
- package/dist/cli/ink-cli/components/overlays/McpAddSelector.d.ts +0 -26
- package/dist/cli/ink-cli/components/overlays/McpAddSelector.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/overlays/McpAddSelector.js +0 -73
- package/dist/cli/ink-cli/components/overlays/McpCustomTypeSelector.d.ts +0 -21
- package/dist/cli/ink-cli/components/overlays/McpCustomTypeSelector.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/overlays/McpCustomTypeSelector.js +0 -51
- package/dist/cli/ink-cli/components/overlays/McpCustomWizard.d.ts +0 -29
- package/dist/cli/ink-cli/components/overlays/McpCustomWizard.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/overlays/McpCustomWizard.js +0 -215
- package/dist/cli/ink-cli/components/overlays/McpRemoveSelector.d.ts +0 -22
- package/dist/cli/ink-cli/components/overlays/McpRemoveSelector.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/overlays/McpRemoveSelector.js +0 -80
- package/dist/cli/ink-cli/components/overlays/McpSelector.d.ts +0 -21
- package/dist/cli/ink-cli/components/overlays/McpSelector.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/overlays/McpSelector.js +0 -52
- package/dist/cli/ink-cli/components/overlays/McpServerActions.d.ts +0 -28
- package/dist/cli/ink-cli/components/overlays/McpServerActions.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/overlays/McpServerActions.js +0 -93
- package/dist/cli/ink-cli/components/overlays/McpServerList.d.ts +0 -29
- package/dist/cli/ink-cli/components/overlays/McpServerList.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/overlays/McpServerList.js +0 -116
- package/dist/cli/ink-cli/components/overlays/ModelSelectorRefactored.d.ts +0 -28
- package/dist/cli/ink-cli/components/overlays/ModelSelectorRefactored.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/overlays/ModelSelectorRefactored.js +0 -743
- package/dist/cli/ink-cli/components/overlays/PluginActions.d.ts +0 -27
- package/dist/cli/ink-cli/components/overlays/PluginActions.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/overlays/PluginActions.js +0 -66
- package/dist/cli/ink-cli/components/overlays/PluginList.d.ts +0 -21
- package/dist/cli/ink-cli/components/overlays/PluginList.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/overlays/PluginList.js +0 -70
- package/dist/cli/ink-cli/components/overlays/PluginManager.d.ts +0 -21
- package/dist/cli/ink-cli/components/overlays/PluginManager.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/overlays/PluginManager.js +0 -63
- package/dist/cli/ink-cli/components/overlays/PromptAddChoice.d.ts +0 -22
- package/dist/cli/ink-cli/components/overlays/PromptAddChoice.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/overlays/PromptAddChoice.js +0 -52
- package/dist/cli/ink-cli/components/overlays/PromptAddWizard.d.ts +0 -29
- package/dist/cli/ink-cli/components/overlays/PromptAddWizard.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/overlays/PromptAddWizard.js +0 -166
- package/dist/cli/ink-cli/components/overlays/PromptDeleteSelector.d.ts +0 -27
- package/dist/cli/ink-cli/components/overlays/PromptDeleteSelector.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/overlays/PromptDeleteSelector.js +0 -119
- package/dist/cli/ink-cli/components/overlays/PromptList.d.ts +0 -33
- package/dist/cli/ink-cli/components/overlays/PromptList.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/overlays/PromptList.js +0 -143
- package/dist/cli/ink-cli/components/overlays/SearchOverlay.d.ts +0 -23
- package/dist/cli/ink-cli/components/overlays/SearchOverlay.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/overlays/SearchOverlay.js +0 -189
- package/dist/cli/ink-cli/components/overlays/SessionRenameOverlay.d.ts +0 -21
- package/dist/cli/ink-cli/components/overlays/SessionRenameOverlay.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/overlays/SessionRenameOverlay.js +0 -63
- package/dist/cli/ink-cli/components/overlays/SessionSelectorRefactored.d.ts +0 -26
- package/dist/cli/ink-cli/components/overlays/SessionSelectorRefactored.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/overlays/SessionSelectorRefactored.js +0 -126
- package/dist/cli/ink-cli/components/overlays/SessionSubcommandSelector.d.ts +0 -21
- package/dist/cli/ink-cli/components/overlays/SessionSubcommandSelector.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/overlays/SessionSubcommandSelector.js +0 -42
- package/dist/cli/ink-cli/components/overlays/SoundsSelector.d.ts +0 -21
- package/dist/cli/ink-cli/components/overlays/SoundsSelector.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/overlays/SoundsSelector.js +0 -566
- package/dist/cli/ink-cli/components/overlays/StreamSelector.d.ts +0 -20
- package/dist/cli/ink-cli/components/overlays/StreamSelector.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/overlays/StreamSelector.js +0 -58
- package/dist/cli/ink-cli/components/overlays/ToolBrowser.d.ts +0 -26
- package/dist/cli/ink-cli/components/overlays/ToolBrowser.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/overlays/ToolBrowser.js +0 -697
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/LocalModelWizard.d.ts +0 -25
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/LocalModelWizard.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/LocalModelWizard.js +0 -604
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/index.d.ts +0 -15
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/index.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/index.js +0 -14
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/provider-config.d.ts +0 -42
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/provider-config.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/provider-config.js +0 -547
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/ApiKeyStep.d.ts +0 -25
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/ApiKeyStep.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/ApiKeyStep.js +0 -29
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/ProviderSelector.d.ts +0 -17
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/ProviderSelector.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/ProviderSelector.js +0 -11
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/SetupInfoBanner.d.ts +0 -20
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/SetupInfoBanner.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/SetupInfoBanner.js +0 -10
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/WizardStepInput.d.ts +0 -30
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/WizardStepInput.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/WizardStepInput.js +0 -13
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/index.d.ts +0 -8
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/index.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/index.js +0 -7
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/types.d.ts +0 -85
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/types.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/types.js +0 -38
- package/dist/cli/ink-cli/components/renderers/DiffRenderer.d.ts +0 -21
- package/dist/cli/ink-cli/components/renderers/DiffRenderer.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/renderers/DiffRenderer.js +0 -65
- package/dist/cli/ink-cli/components/renderers/FilePreviewRenderer.d.ts +0 -30
- package/dist/cli/ink-cli/components/renderers/FilePreviewRenderer.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/renderers/FilePreviewRenderer.js +0 -67
- package/dist/cli/ink-cli/components/renderers/FileRenderer.d.ts +0 -21
- package/dist/cli/ink-cli/components/renderers/FileRenderer.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/renderers/FileRenderer.js +0 -37
- package/dist/cli/ink-cli/components/renderers/GenericRenderer.d.ts +0 -21
- package/dist/cli/ink-cli/components/renderers/GenericRenderer.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/renderers/GenericRenderer.js +0 -26
- package/dist/cli/ink-cli/components/renderers/SearchRenderer.d.ts +0 -20
- package/dist/cli/ink-cli/components/renderers/SearchRenderer.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/renderers/SearchRenderer.js +0 -26
- package/dist/cli/ink-cli/components/renderers/ShellRenderer.d.ts +0 -21
- package/dist/cli/ink-cli/components/renderers/ShellRenderer.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/renderers/ShellRenderer.js +0 -15
- package/dist/cli/ink-cli/components/renderers/diff-shared.d.ts +0 -61
- package/dist/cli/ink-cli/components/renderers/diff-shared.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/renderers/diff-shared.js +0 -158
- package/dist/cli/ink-cli/components/renderers/index.d.ts +0 -28
- package/dist/cli/ink-cli/components/renderers/index.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/renderers/index.js +0 -36
- package/dist/cli/ink-cli/components/shared/FocusOverlayFrame.d.ts +0 -7
- package/dist/cli/ink-cli/components/shared/FocusOverlayFrame.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/shared/FocusOverlayFrame.js +0 -8
- package/dist/cli/ink-cli/components/shared/HintBar.d.ts +0 -6
- package/dist/cli/ink-cli/components/shared/HintBar.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/shared/HintBar.js +0 -6
- package/dist/cli/ink-cli/components/shared/MarkdownText.d.ts +0 -38
- package/dist/cli/ink-cli/components/shared/MarkdownText.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/shared/MarkdownText.js +0 -389
- package/dist/cli/ink-cli/components/shared/VirtualizedList.d.ts +0 -44
- package/dist/cli/ink-cli/components/shared/VirtualizedList.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/shared/VirtualizedList.js +0 -300
- package/dist/cli/ink-cli/components/shared/text-buffer.d.ts +0 -185
- package/dist/cli/ink-cli/components/shared/text-buffer.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/shared/text-buffer.js +0 -1338
- package/dist/cli/ink-cli/constants/processingPhrases.d.ts +0 -10
- package/dist/cli/ink-cli/constants/processingPhrases.d.ts.map +0 -1
- package/dist/cli/ink-cli/constants/processingPhrases.js +0 -92
- package/dist/cli/ink-cli/constants/spinnerFrames.d.ts +0 -2
- package/dist/cli/ink-cli/constants/spinnerFrames.d.ts.map +0 -1
- package/dist/cli/ink-cli/constants/spinnerFrames.js +0 -1
- package/dist/cli/ink-cli/constants/tips.d.ts +0 -15
- package/dist/cli/ink-cli/constants/tips.d.ts.map +0 -1
- package/dist/cli/ink-cli/constants/tips.js +0 -58
- package/dist/cli/ink-cli/containers/InputContainer.d.ts +0 -62
- package/dist/cli/ink-cli/containers/InputContainer.d.ts.map +0 -1
- package/dist/cli/ink-cli/containers/InputContainer.js +0 -643
- package/dist/cli/ink-cli/containers/OverlayContainer.d.ts +0 -42
- package/dist/cli/ink-cli/containers/OverlayContainer.d.ts.map +0 -1
- package/dist/cli/ink-cli/containers/OverlayContainer.js +0 -1840
- package/dist/cli/ink-cli/containers/index.d.ts +0 -6
- package/dist/cli/ink-cli/containers/index.d.ts.map +0 -1
- package/dist/cli/ink-cli/containers/index.js +0 -5
- package/dist/cli/ink-cli/contexts/KeypressContext.d.ts +0 -36
- package/dist/cli/ink-cli/contexts/KeypressContext.d.ts.map +0 -1
- package/dist/cli/ink-cli/contexts/KeypressContext.js +0 -461
- package/dist/cli/ink-cli/contexts/MouseContext.d.ts +0 -27
- package/dist/cli/ink-cli/contexts/MouseContext.d.ts.map +0 -1
- package/dist/cli/ink-cli/contexts/MouseContext.js +0 -102
- package/dist/cli/ink-cli/contexts/ScrollProvider.d.ts +0 -33
- package/dist/cli/ink-cli/contexts/ScrollProvider.d.ts.map +0 -1
- package/dist/cli/ink-cli/contexts/ScrollProvider.js +0 -170
- package/dist/cli/ink-cli/contexts/SoundContext.d.ts +0 -23
- package/dist/cli/ink-cli/contexts/SoundContext.d.ts.map +0 -1
- package/dist/cli/ink-cli/contexts/SoundContext.js +0 -22
- package/dist/cli/ink-cli/contexts/index.d.ts +0 -8
- package/dist/cli/ink-cli/contexts/index.d.ts.map +0 -1
- package/dist/cli/ink-cli/contexts/index.js +0 -7
- package/dist/cli/ink-cli/hooks/index.d.ts +0 -12
- package/dist/cli/ink-cli/hooks/index.d.ts.map +0 -1
- package/dist/cli/ink-cli/hooks/index.js +0 -14
- package/dist/cli/ink-cli/hooks/useAgentEvents.d.ts +0 -49
- package/dist/cli/ink-cli/hooks/useAgentEvents.d.ts.map +0 -1
- package/dist/cli/ink-cli/hooks/useAgentEvents.js +0 -369
- package/dist/cli/ink-cli/hooks/useAnimationTick.d.ts +0 -11
- package/dist/cli/ink-cli/hooks/useAnimationTick.d.ts.map +0 -1
- package/dist/cli/ink-cli/hooks/useAnimationTick.js +0 -54
- package/dist/cli/ink-cli/hooks/useBatchedScroll.d.ts +0 -14
- package/dist/cli/ink-cli/hooks/useBatchedScroll.d.ts.map +0 -1
- package/dist/cli/ink-cli/hooks/useBatchedScroll.js +0 -25
- package/dist/cli/ink-cli/hooks/useCLIState.d.ts +0 -52
- package/dist/cli/ink-cli/hooks/useCLIState.d.ts.map +0 -1
- package/dist/cli/ink-cli/hooks/useCLIState.js +0 -224
- package/dist/cli/ink-cli/hooks/useElapsedTime.d.ts +0 -24
- package/dist/cli/ink-cli/hooks/useElapsedTime.d.ts.map +0 -1
- package/dist/cli/ink-cli/hooks/useElapsedTime.js +0 -69
- package/dist/cli/ink-cli/hooks/useGitBranch.d.ts +0 -13
- package/dist/cli/ink-cli/hooks/useGitBranch.d.ts.map +0 -1
- package/dist/cli/ink-cli/hooks/useGitBranch.js +0 -35
- package/dist/cli/ink-cli/hooks/useHistorySearch.d.ts +0 -61
- package/dist/cli/ink-cli/hooks/useHistorySearch.d.ts.map +0 -1
- package/dist/cli/ink-cli/hooks/useHistorySearch.js +0 -210
- package/dist/cli/ink-cli/hooks/useInputHistory.d.ts +0 -18
- package/dist/cli/ink-cli/hooks/useInputHistory.d.ts.map +0 -1
- package/dist/cli/ink-cli/hooks/useInputHistory.js +0 -26
- package/dist/cli/ink-cli/hooks/useInputOrchestrator.d.ts +0 -136
- package/dist/cli/ink-cli/hooks/useInputOrchestrator.d.ts.map +0 -1
- package/dist/cli/ink-cli/hooks/useInputOrchestrator.js +0 -715
- package/dist/cli/ink-cli/hooks/useKeyboardShortcuts.d.ts +0 -21
- package/dist/cli/ink-cli/hooks/useKeyboardShortcuts.d.ts.map +0 -1
- package/dist/cli/ink-cli/hooks/useKeyboardShortcuts.js +0 -80
- package/dist/cli/ink-cli/hooks/useKeypress.d.ts +0 -18
- package/dist/cli/ink-cli/hooks/useKeypress.d.ts.map +0 -1
- package/dist/cli/ink-cli/hooks/useKeypress.js +0 -26
- package/dist/cli/ink-cli/hooks/usePhraseCycler.d.ts +0 -30
- package/dist/cli/ink-cli/hooks/usePhraseCycler.d.ts.map +0 -1
- package/dist/cli/ink-cli/hooks/usePhraseCycler.js +0 -68
- package/dist/cli/ink-cli/hooks/useStreaming.d.ts +0 -19
- package/dist/cli/ink-cli/hooks/useStreaming.d.ts.map +0 -1
- package/dist/cli/ink-cli/hooks/useStreaming.js +0 -26
- package/dist/cli/ink-cli/hooks/useTerminalSize.d.ts +0 -14
- package/dist/cli/ink-cli/hooks/useTerminalSize.d.ts.map +0 -1
- package/dist/cli/ink-cli/hooks/useTerminalSize.js +0 -31
- package/dist/cli/ink-cli/hooks/useTokenCounter.d.ts +0 -46
- package/dist/cli/ink-cli/hooks/useTokenCounter.d.ts.map +0 -1
- package/dist/cli/ink-cli/hooks/useTokenCounter.js +0 -122
- package/dist/cli/ink-cli/services/CommandService.d.ts +0 -58
- package/dist/cli/ink-cli/services/CommandService.d.ts.map +0 -1
- package/dist/cli/ink-cli/services/CommandService.js +0 -64
- package/dist/cli/ink-cli/services/InputService.d.ts +0 -40
- package/dist/cli/ink-cli/services/InputService.d.ts.map +0 -1
- package/dist/cli/ink-cli/services/InputService.js +0 -87
- package/dist/cli/ink-cli/services/MessageService.d.ts +0 -35
- package/dist/cli/ink-cli/services/MessageService.d.ts.map +0 -1
- package/dist/cli/ink-cli/services/MessageService.js +0 -49
- package/dist/cli/ink-cli/services/index.d.ts +0 -8
- package/dist/cli/ink-cli/services/index.d.ts.map +0 -1
- package/dist/cli/ink-cli/services/index.js +0 -7
- package/dist/cli/ink-cli/services/processStream.d.ts +0 -75
- package/dist/cli/ink-cli/services/processStream.d.ts.map +0 -1
- package/dist/cli/ink-cli/services/processStream.js +0 -951
- package/dist/cli/ink-cli/state/actions.d.ts +0 -124
- package/dist/cli/ink-cli/state/actions.d.ts.map +0 -1
- package/dist/cli/ink-cli/state/actions.js +0 -8
- package/dist/cli/ink-cli/state/index.d.ts +0 -10
- package/dist/cli/ink-cli/state/index.d.ts.map +0 -1
- package/dist/cli/ink-cli/state/index.js +0 -8
- package/dist/cli/ink-cli/state/initialState.d.ts +0 -12
- package/dist/cli/ink-cli/state/initialState.d.ts.map +0 -1
- package/dist/cli/ink-cli/state/initialState.js +0 -58
- package/dist/cli/ink-cli/state/reducer.d.ts +0 -15
- package/dist/cli/ink-cli/state/reducer.d.ts.map +0 -1
- package/dist/cli/ink-cli/state/reducer.js +0 -341
- package/dist/cli/ink-cli/state/streaming-state.d.ts +0 -27
- package/dist/cli/ink-cli/state/streaming-state.d.ts.map +0 -1
- package/dist/cli/ink-cli/state/streaming-state.js +0 -39
- package/dist/cli/ink-cli/state/types.d.ts +0 -378
- package/dist/cli/ink-cli/state/types.d.ts.map +0 -1
- package/dist/cli/ink-cli/state/types.js +0 -5
- package/dist/cli/ink-cli/utils/bracketedPaste.d.ts +0 -22
- package/dist/cli/ink-cli/utils/bracketedPaste.d.ts.map +0 -1
- package/dist/cli/ink-cli/utils/bracketedPaste.js +0 -27
- package/dist/cli/ink-cli/utils/clipboardUtils.d.ts +0 -49
- package/dist/cli/ink-cli/utils/clipboardUtils.d.ts.map +0 -1
- package/dist/cli/ink-cli/utils/clipboardUtils.js +0 -356
- package/dist/cli/ink-cli/utils/commandOverlays.d.ts +0 -33
- package/dist/cli/ink-cli/utils/commandOverlays.d.ts.map +0 -1
- package/dist/cli/ink-cli/utils/commandOverlays.js +0 -85
- package/dist/cli/ink-cli/utils/debugLog.d.ts +0 -38
- package/dist/cli/ink-cli/utils/debugLog.d.ts.map +0 -1
- package/dist/cli/ink-cli/utils/debugLog.js +0 -66
- package/dist/cli/ink-cli/utils/elicitationSchema.d.ts +0 -11
- package/dist/cli/ink-cli/utils/elicitationSchema.d.ts.map +0 -1
- package/dist/cli/ink-cli/utils/elicitationSchema.js +0 -80
- package/dist/cli/ink-cli/utils/idGenerator.d.ts +0 -10
- package/dist/cli/ink-cli/utils/idGenerator.d.ts.map +0 -1
- package/dist/cli/ink-cli/utils/idGenerator.js +0 -12
- package/dist/cli/ink-cli/utils/index.d.ts +0 -9
- package/dist/cli/ink-cli/utils/index.d.ts.map +0 -1
- package/dist/cli/ink-cli/utils/index.js +0 -13
- package/dist/cli/ink-cli/utils/input.d.ts +0 -25
- package/dist/cli/ink-cli/utils/input.d.ts.map +0 -1
- package/dist/cli/ink-cli/utils/input.js +0 -56
- package/dist/cli/ink-cli/utils/inputParsing.d.ts +0 -31
- package/dist/cli/ink-cli/utils/inputParsing.d.ts.map +0 -1
- package/dist/cli/ink-cli/utils/inputParsing.js +0 -70
- package/dist/cli/ink-cli/utils/llm-provider-display.d.ts +0 -3
- package/dist/cli/ink-cli/utils/llm-provider-display.d.ts.map +0 -1
- package/dist/cli/ink-cli/utils/llm-provider-display.js +0 -22
- package/dist/cli/ink-cli/utils/messageFormatting.d.ts +0 -125
- package/dist/cli/ink-cli/utils/messageFormatting.d.ts.map +0 -1
- package/dist/cli/ink-cli/utils/messageFormatting.js +0 -485
- package/dist/cli/ink-cli/utils/mouse.d.ts +0 -61
- package/dist/cli/ink-cli/utils/mouse.d.ts.map +0 -1
- package/dist/cli/ink-cli/utils/mouse.js +0 -209
- package/dist/cli/ink-cli/utils/overlayPresentation.d.ts +0 -19
- package/dist/cli/ink-cli/utils/overlayPresentation.d.ts.map +0 -1
- package/dist/cli/ink-cli/utils/overlayPresentation.js +0 -33
- package/dist/cli/ink-cli/utils/overlaySizing.d.ts +0 -19
- package/dist/cli/ink-cli/utils/overlaySizing.d.ts.map +0 -1
- package/dist/cli/ink-cli/utils/overlaySizing.js +0 -11
- package/dist/cli/ink-cli/utils/soundNotification.d.ts +0 -77
- package/dist/cli/ink-cli/utils/soundNotification.d.ts.map +0 -1
- package/dist/cli/ink-cli/utils/soundNotification.js +0 -226
- package/dist/cli/ink-cli/utils/streamSplitter.d.ts +0 -44
- package/dist/cli/ink-cli/utils/streamSplitter.d.ts.map +0 -1
- package/dist/cli/ink-cli/utils/streamSplitter.js +0 -154
- package/dist/cli/ink-cli/utils/textUtils.d.ts +0 -63
- package/dist/cli/ink-cli/utils/textUtils.d.ts.map +0 -1
- package/dist/cli/ink-cli/utils/textUtils.js +0 -248
- package/dist/cli/ink-cli/utils/toolUtils.d.ts +0 -20
- package/dist/cli/ink-cli/utils/toolUtils.d.ts.map +0 -1
- package/dist/cli/ink-cli/utils/toolUtils.js +0 -25
- package/dist/webui/assets/index-C9JXwpvo.css +0 -1
- package/dist/webui/assets/index-CKhumsZA.js +0 -2059
|
@@ -1,643 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
/**
|
|
3
|
-
* InputContainer Component
|
|
4
|
-
* Smart container for input area - handles submission and state
|
|
5
|
-
*
|
|
6
|
-
* Buffer is passed as prop from parent (useCLIState).
|
|
7
|
-
* No more ref chain - buffer can be accessed directly.
|
|
8
|
-
*/
|
|
9
|
-
import { useCallback, useRef, useEffect, useImperativeHandle, forwardRef } from 'react';
|
|
10
|
-
import { InputArea } from '../components/input/InputArea.js';
|
|
11
|
-
import { processStream } from '../services/index.js';
|
|
12
|
-
import { useSoundService } from '../contexts/index.js';
|
|
13
|
-
import { createUserMessage } from '../utils/messageFormatting.js';
|
|
14
|
-
import { generateMessageId } from '../utils/idGenerator.js';
|
|
15
|
-
import { capture } from '../../../analytics/index.js';
|
|
16
|
-
import { getOverlayPresentation } from '../utils/overlayPresentation.js';
|
|
17
|
-
/**
|
|
18
|
-
* Smart container for input area
|
|
19
|
-
* Manages submission, history, and overlay triggers
|
|
20
|
-
*/
|
|
21
|
-
export const InputContainer = forwardRef(function InputContainer({ buffer, input, ui, session, initialPrompt, approval, queuedMessages, setInput, setUi, setSession, setMessages, setPendingMessages, setDequeuedBuffer, setQueuedMessages, setApproval, setApprovalQueue, setTodos, agent, inputService, configFilePath, onKeyboardScroll, useStreaming = true, }, ref) {
|
|
22
|
-
// Track pending session creation to prevent race conditions
|
|
23
|
-
const sessionCreationPromiseRef = useRef(null);
|
|
24
|
-
const didAutoSubmitInitialPromptRef = useRef(false);
|
|
25
|
-
// Sound notification service from context
|
|
26
|
-
const soundService = useSoundService();
|
|
27
|
-
// Ref to track autoApproveEdits so processStream can read latest value mid-stream
|
|
28
|
-
const autoApproveEditsRef = useRef(ui.autoApproveEdits);
|
|
29
|
-
useEffect(() => {
|
|
30
|
-
autoApproveEditsRef.current = ui.autoApproveEdits;
|
|
31
|
-
}, [ui.autoApproveEdits]);
|
|
32
|
-
// Clear the session creation ref when session is cleared
|
|
33
|
-
useEffect(() => {
|
|
34
|
-
if (session.id === null) {
|
|
35
|
-
sessionCreationPromiseRef.current = null;
|
|
36
|
-
}
|
|
37
|
-
}, [session.id]);
|
|
38
|
-
// Extract text content from ContentPart[]
|
|
39
|
-
const extractTextFromContent = useCallback((content) => {
|
|
40
|
-
return content
|
|
41
|
-
.filter((part) => part.type === 'text')
|
|
42
|
-
.map((part) => part.text)
|
|
43
|
-
.join('\n');
|
|
44
|
-
}, []);
|
|
45
|
-
// Handle history navigation - set text directly on buffer
|
|
46
|
-
// Up arrow first edits queued messages (removes from queue), then navigates history
|
|
47
|
-
const handleHistoryNavigate = useCallback((direction) => {
|
|
48
|
-
const { history, historyIndex, draftBeforeHistory } = input;
|
|
49
|
-
if (direction === 'up') {
|
|
50
|
-
// First check if there are queued messages to edit
|
|
51
|
-
if (queuedMessages.length > 0 && session.id) {
|
|
52
|
-
// Get the last queued message
|
|
53
|
-
const lastQueued = queuedMessages[queuedMessages.length - 1];
|
|
54
|
-
if (lastQueued) {
|
|
55
|
-
// Extract text content and put it in the input
|
|
56
|
-
const text = extractTextFromContent(lastQueued.content);
|
|
57
|
-
buffer.setText(text);
|
|
58
|
-
setInput((prev) => ({ ...prev, value: text }));
|
|
59
|
-
// Remove from queue (this will trigger the event and update queuedMessages state)
|
|
60
|
-
agent.removeQueuedMessage(session.id, lastQueued.id).catch(() => {
|
|
61
|
-
// Silently ignore errors - queue might have been cleared
|
|
62
|
-
});
|
|
63
|
-
return;
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
// Don't navigate history when processing (only queue editing is allowed)
|
|
67
|
-
if (ui.isProcessing)
|
|
68
|
-
return;
|
|
69
|
-
// No queued messages, navigate history
|
|
70
|
-
if (history.length === 0)
|
|
71
|
-
return;
|
|
72
|
-
let newIndex = historyIndex;
|
|
73
|
-
if (newIndex < 0) {
|
|
74
|
-
// First time pressing up - save current input as draft
|
|
75
|
-
const currentText = buffer.text;
|
|
76
|
-
setInput((prev) => ({
|
|
77
|
-
...prev,
|
|
78
|
-
draftBeforeHistory: currentText,
|
|
79
|
-
historyIndex: history.length - 1,
|
|
80
|
-
value: history[history.length - 1] || '',
|
|
81
|
-
}));
|
|
82
|
-
buffer.setText(history[history.length - 1] || '');
|
|
83
|
-
return;
|
|
84
|
-
}
|
|
85
|
-
else if (newIndex > 0) {
|
|
86
|
-
newIndex = newIndex - 1;
|
|
87
|
-
}
|
|
88
|
-
else {
|
|
89
|
-
return; // Already at oldest
|
|
90
|
-
}
|
|
91
|
-
const historyItem = history[newIndex] || '';
|
|
92
|
-
buffer.setText(historyItem);
|
|
93
|
-
setInput((prev) => ({ ...prev, value: historyItem, historyIndex: newIndex }));
|
|
94
|
-
}
|
|
95
|
-
else {
|
|
96
|
-
// Down - navigate history (queued messages don't affect down navigation)
|
|
97
|
-
// Don't navigate history when processing
|
|
98
|
-
if (ui.isProcessing)
|
|
99
|
-
return;
|
|
100
|
-
if (historyIndex < 0)
|
|
101
|
-
return; // Not navigating history
|
|
102
|
-
if (historyIndex < history.length - 1) {
|
|
103
|
-
const newIndex = historyIndex + 1;
|
|
104
|
-
const historyItem = history[newIndex] || '';
|
|
105
|
-
buffer.setText(historyItem);
|
|
106
|
-
setInput((prev) => ({
|
|
107
|
-
...prev,
|
|
108
|
-
value: historyItem,
|
|
109
|
-
historyIndex: newIndex,
|
|
110
|
-
}));
|
|
111
|
-
}
|
|
112
|
-
else {
|
|
113
|
-
// At newest history item, restore draft
|
|
114
|
-
buffer.setText(draftBeforeHistory);
|
|
115
|
-
setInput((prev) => ({
|
|
116
|
-
...prev,
|
|
117
|
-
value: draftBeforeHistory,
|
|
118
|
-
historyIndex: -1,
|
|
119
|
-
draftBeforeHistory: '',
|
|
120
|
-
}));
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
}, [
|
|
124
|
-
buffer,
|
|
125
|
-
input,
|
|
126
|
-
setInput,
|
|
127
|
-
queuedMessages,
|
|
128
|
-
session.id,
|
|
129
|
-
agent,
|
|
130
|
-
extractTextFromContent,
|
|
131
|
-
ui.isProcessing,
|
|
132
|
-
]);
|
|
133
|
-
// Handle overlay triggers
|
|
134
|
-
// Allow triggers while processing (for queuing), but not during approval
|
|
135
|
-
// IMPORTANT: Use functional updates to check prev.activeOverlay, not the closure value.
|
|
136
|
-
// This avoids race conditions when open/close happen in quick succession (React batching).
|
|
137
|
-
const handleTriggerOverlay = useCallback((trigger) => {
|
|
138
|
-
if (approval)
|
|
139
|
-
return;
|
|
140
|
-
if (trigger === 'close') {
|
|
141
|
-
// Use functional update to check the ACTUAL current state, not stale closure
|
|
142
|
-
setUi((prev) => {
|
|
143
|
-
if (prev.activeOverlay === 'slash-autocomplete' ||
|
|
144
|
-
prev.activeOverlay === 'resource-autocomplete') {
|
|
145
|
-
return {
|
|
146
|
-
...prev,
|
|
147
|
-
activeOverlay: 'none',
|
|
148
|
-
mcpWizardServerType: null,
|
|
149
|
-
};
|
|
150
|
-
}
|
|
151
|
-
return prev;
|
|
152
|
-
});
|
|
153
|
-
}
|
|
154
|
-
else if (trigger === 'slash-autocomplete') {
|
|
155
|
-
setUi((prev) => ({ ...prev, activeOverlay: 'slash-autocomplete' }));
|
|
156
|
-
}
|
|
157
|
-
else if (trigger === 'resource-autocomplete') {
|
|
158
|
-
setUi((prev) => ({ ...prev, activeOverlay: 'resource-autocomplete' }));
|
|
159
|
-
}
|
|
160
|
-
}, [setUi, approval]);
|
|
161
|
-
// Handle image paste from clipboard
|
|
162
|
-
const handleImagePaste = useCallback((image) => {
|
|
163
|
-
// Track image attachment analytics (only if session exists)
|
|
164
|
-
if (session.id) {
|
|
165
|
-
capture('dexto_image_attached', {
|
|
166
|
-
source: 'cli',
|
|
167
|
-
sessionId: session.id,
|
|
168
|
-
imageType: image.mimeType,
|
|
169
|
-
imageSizeBytes: Math.floor(image.data.length * 0.75), // Approx base64 decode
|
|
170
|
-
});
|
|
171
|
-
}
|
|
172
|
-
setInput((prev) => ({
|
|
173
|
-
...prev,
|
|
174
|
-
images: [...prev.images, image],
|
|
175
|
-
}));
|
|
176
|
-
}, [setInput, session.id]);
|
|
177
|
-
// Handle image removal (when placeholder is deleted from text)
|
|
178
|
-
const handleImageRemove = useCallback((imageId) => {
|
|
179
|
-
setInput((prev) => ({
|
|
180
|
-
...prev,
|
|
181
|
-
images: prev.images.filter((img) => img.id !== imageId),
|
|
182
|
-
}));
|
|
183
|
-
}, [setInput]);
|
|
184
|
-
// Handle new paste block creation (when large text is pasted)
|
|
185
|
-
const handlePasteBlock = useCallback((block) => {
|
|
186
|
-
setInput((prev) => ({
|
|
187
|
-
...prev,
|
|
188
|
-
pastedBlocks: [...prev.pastedBlocks, block],
|
|
189
|
-
pasteCounter: Math.max(prev.pasteCounter, block.number),
|
|
190
|
-
}));
|
|
191
|
-
}, [setInput]);
|
|
192
|
-
// Handle paste block update (e.g., toggle collapse)
|
|
193
|
-
const handlePasteBlockUpdate = useCallback((blockId, updates) => {
|
|
194
|
-
setInput((prev) => ({
|
|
195
|
-
...prev,
|
|
196
|
-
pastedBlocks: prev.pastedBlocks.map((block) => block.id === blockId ? { ...block, ...updates } : block),
|
|
197
|
-
}));
|
|
198
|
-
}, [setInput]);
|
|
199
|
-
// Handle paste block removal (when placeholder is deleted from text)
|
|
200
|
-
const handlePasteBlockRemove = useCallback((blockId) => {
|
|
201
|
-
setInput((prev) => ({
|
|
202
|
-
...prev,
|
|
203
|
-
pastedBlocks: prev.pastedBlocks.filter((block) => block.id !== blockId),
|
|
204
|
-
}));
|
|
205
|
-
}, [setInput]);
|
|
206
|
-
// Expand all collapsed paste blocks in a text string
|
|
207
|
-
const expandPasteBlocks = useCallback((text, blocks) => {
|
|
208
|
-
let result = text;
|
|
209
|
-
// Sort blocks by placeholder position descending to avoid offset issues
|
|
210
|
-
const sortedBlocks = [...blocks].sort((a, b) => {
|
|
211
|
-
const posA = result.indexOf(a.placeholder);
|
|
212
|
-
const posB = result.indexOf(b.placeholder);
|
|
213
|
-
return posB - posA;
|
|
214
|
-
});
|
|
215
|
-
for (const block of sortedBlocks) {
|
|
216
|
-
if (block.isCollapsed) {
|
|
217
|
-
// Replace placeholder with full text
|
|
218
|
-
result = result.replace(block.placeholder, block.fullText);
|
|
219
|
-
}
|
|
220
|
-
}
|
|
221
|
-
return result;
|
|
222
|
-
}, []);
|
|
223
|
-
// Handle submission
|
|
224
|
-
// bypassOverlayCheck: skip the overlay check when called programmatically (e.g., from OverlayContainer)
|
|
225
|
-
const handleSubmit = useCallback(async (value, bypassOverlayCheck = false) => {
|
|
226
|
-
// Expand all collapsed paste blocks before processing
|
|
227
|
-
const expandedValue = expandPasteBlocks(value, input.pastedBlocks);
|
|
228
|
-
const trimmed = expandedValue.trim();
|
|
229
|
-
if (!trimmed)
|
|
230
|
-
return;
|
|
231
|
-
// Auto-queue when agent is processing
|
|
232
|
-
if (ui.isProcessing && session.id) {
|
|
233
|
-
// Build content parts for queueing
|
|
234
|
-
const content = [{ type: 'text', text: trimmed }];
|
|
235
|
-
// Add images if any
|
|
236
|
-
for (const img of input.images) {
|
|
237
|
-
content.push({
|
|
238
|
-
type: 'image',
|
|
239
|
-
image: img.data,
|
|
240
|
-
mimeType: img.mimeType,
|
|
241
|
-
});
|
|
242
|
-
}
|
|
243
|
-
try {
|
|
244
|
-
await agent.queueMessage(session.id, { content });
|
|
245
|
-
// Queued messages are displayed via QueuedMessagesDisplay component
|
|
246
|
-
// (state updated by message:queued event handler in useAgentEvents)
|
|
247
|
-
// Clear input, update history, and clear images
|
|
248
|
-
buffer.setText('');
|
|
249
|
-
setInput((prev) => {
|
|
250
|
-
const newHistory = prev.history.length > 0 &&
|
|
251
|
-
prev.history[prev.history.length - 1] === trimmed
|
|
252
|
-
? prev.history
|
|
253
|
-
: [...prev.history, trimmed].slice(-100);
|
|
254
|
-
return {
|
|
255
|
-
...prev,
|
|
256
|
-
value: '',
|
|
257
|
-
history: newHistory,
|
|
258
|
-
historyIndex: -1,
|
|
259
|
-
draftBeforeHistory: '',
|
|
260
|
-
images: [],
|
|
261
|
-
pastedBlocks: [],
|
|
262
|
-
};
|
|
263
|
-
});
|
|
264
|
-
}
|
|
265
|
-
catch (error) {
|
|
266
|
-
setMessages((prev) => [
|
|
267
|
-
...prev,
|
|
268
|
-
{
|
|
269
|
-
id: generateMessageId('error'),
|
|
270
|
-
role: 'system',
|
|
271
|
-
content: `Failed to queue message: ${error instanceof Error ? error.message : String(error)}`,
|
|
272
|
-
timestamp: new Date(),
|
|
273
|
-
},
|
|
274
|
-
]);
|
|
275
|
-
}
|
|
276
|
-
return;
|
|
277
|
-
}
|
|
278
|
-
// Prevent double submission when autocomplete/selector is active
|
|
279
|
-
// Skip this check when called programmatically (e.g., from OverlayContainer prompt selection)
|
|
280
|
-
if (!bypassOverlayCheck &&
|
|
281
|
-
ui.activeOverlay !== 'none' &&
|
|
282
|
-
ui.activeOverlay !== 'approval') {
|
|
283
|
-
return;
|
|
284
|
-
}
|
|
285
|
-
// Capture images before clearing - we need them for the API call
|
|
286
|
-
const pendingImages = [...input.images];
|
|
287
|
-
// Create user message and add it to messages
|
|
288
|
-
const userMessage = createUserMessage(trimmed);
|
|
289
|
-
setMessages((prev) => [...prev, userMessage]);
|
|
290
|
-
// Clear input directly on buffer and update history
|
|
291
|
-
buffer.setText('');
|
|
292
|
-
setInput((prev) => {
|
|
293
|
-
const newHistory = prev.history.length > 0 && prev.history[prev.history.length - 1] === trimmed
|
|
294
|
-
? prev.history
|
|
295
|
-
: [...prev.history, trimmed].slice(-100);
|
|
296
|
-
return {
|
|
297
|
-
value: '',
|
|
298
|
-
history: newHistory,
|
|
299
|
-
historyIndex: -1,
|
|
300
|
-
draftBeforeHistory: '',
|
|
301
|
-
images: [], // Clear images on submit
|
|
302
|
-
pastedBlocks: [], // Clear paste blocks on submit
|
|
303
|
-
pasteCounter: prev.pasteCounter, // Keep counter for next session
|
|
304
|
-
};
|
|
305
|
-
});
|
|
306
|
-
// Start processing
|
|
307
|
-
setUi((prev) => ({
|
|
308
|
-
...prev,
|
|
309
|
-
isProcessing: true,
|
|
310
|
-
isCancelling: false,
|
|
311
|
-
activeOverlay: 'none',
|
|
312
|
-
commandOutput: null,
|
|
313
|
-
exitWarningShown: false,
|
|
314
|
-
exitWarningTimestamp: null,
|
|
315
|
-
}));
|
|
316
|
-
// Parse and handle command or prompt
|
|
317
|
-
const parsed = inputService.parseInput(trimmed);
|
|
318
|
-
// Check if this command should show an interactive overlay
|
|
319
|
-
if (parsed.type === 'command' && parsed.command) {
|
|
320
|
-
const { getCommandOverlay } = await import('../utils/commandOverlays.js');
|
|
321
|
-
const overlay = getCommandOverlay(parsed.command, parsed.args || []);
|
|
322
|
-
if (overlay) {
|
|
323
|
-
setUi((prev) => ({
|
|
324
|
-
...prev,
|
|
325
|
-
isProcessing: false,
|
|
326
|
-
activeOverlay: overlay,
|
|
327
|
-
}));
|
|
328
|
-
return;
|
|
329
|
-
}
|
|
330
|
-
}
|
|
331
|
-
if (parsed.type === 'command' && parsed.command) {
|
|
332
|
-
const { CommandService } = await import('../services/CommandService.js');
|
|
333
|
-
const commandService = new CommandService();
|
|
334
|
-
try {
|
|
335
|
-
const result = await commandService.executeCommand(parsed.command, parsed.args || [], agent, session.id || undefined, configFilePath);
|
|
336
|
-
if (result.type === 'output' && result.output) {
|
|
337
|
-
const output = result.output;
|
|
338
|
-
setUi((prev) => ({
|
|
339
|
-
...prev,
|
|
340
|
-
activeOverlay: 'command-output',
|
|
341
|
-
commandOutput: {
|
|
342
|
-
title: `/${parsed.command}`,
|
|
343
|
-
content: output,
|
|
344
|
-
},
|
|
345
|
-
}));
|
|
346
|
-
}
|
|
347
|
-
if (result.type === 'styled' && result.styled) {
|
|
348
|
-
const { fallbackText } = result.styled;
|
|
349
|
-
setUi((prev) => ({
|
|
350
|
-
...prev,
|
|
351
|
-
activeOverlay: 'command-output',
|
|
352
|
-
commandOutput: {
|
|
353
|
-
title: `/${parsed.command}`,
|
|
354
|
-
content: fallbackText,
|
|
355
|
-
},
|
|
356
|
-
}));
|
|
357
|
-
}
|
|
358
|
-
// Handle sendMessage - send through normal streaming flow
|
|
359
|
-
if (result.type === 'sendMessage' && result.messageToSend) {
|
|
360
|
-
let currentSessionId = session.id;
|
|
361
|
-
if (!currentSessionId) {
|
|
362
|
-
if (sessionCreationPromiseRef.current) {
|
|
363
|
-
try {
|
|
364
|
-
const existingSession = await sessionCreationPromiseRef.current;
|
|
365
|
-
currentSessionId = existingSession.id;
|
|
366
|
-
}
|
|
367
|
-
catch {
|
|
368
|
-
sessionCreationPromiseRef.current = null;
|
|
369
|
-
}
|
|
370
|
-
}
|
|
371
|
-
if (!currentSessionId) {
|
|
372
|
-
const sessionPromise = agent.createSession();
|
|
373
|
-
sessionCreationPromiseRef.current = sessionPromise;
|
|
374
|
-
const newSession = await sessionPromise;
|
|
375
|
-
currentSessionId = newSession.id;
|
|
376
|
-
setSession((prev) => ({
|
|
377
|
-
...prev,
|
|
378
|
-
id: currentSessionId,
|
|
379
|
-
hasActiveSession: true,
|
|
380
|
-
}));
|
|
381
|
-
}
|
|
382
|
-
}
|
|
383
|
-
if (!currentSessionId) {
|
|
384
|
-
throw new Error('Failed to create or retrieve session');
|
|
385
|
-
}
|
|
386
|
-
// Send through normal streaming flow (matches WebUI pattern)
|
|
387
|
-
const iterator = await agent.stream(result.messageToSend, currentSessionId);
|
|
388
|
-
await processStream(iterator, {
|
|
389
|
-
setMessages,
|
|
390
|
-
setPendingMessages,
|
|
391
|
-
setDequeuedBuffer,
|
|
392
|
-
setUi,
|
|
393
|
-
setSession,
|
|
394
|
-
setQueuedMessages,
|
|
395
|
-
setApproval,
|
|
396
|
-
setApprovalQueue,
|
|
397
|
-
}, {
|
|
398
|
-
useStreaming,
|
|
399
|
-
autoApproveEditsRef,
|
|
400
|
-
eventBus: agent,
|
|
401
|
-
setTodos,
|
|
402
|
-
...(soundService && { soundService }),
|
|
403
|
-
});
|
|
404
|
-
return; // processStream handles UI state
|
|
405
|
-
}
|
|
406
|
-
setUi((prev) => ({
|
|
407
|
-
...prev,
|
|
408
|
-
isProcessing: false,
|
|
409
|
-
isCancelling: false,
|
|
410
|
-
isThinking: false,
|
|
411
|
-
}));
|
|
412
|
-
}
|
|
413
|
-
catch (error) {
|
|
414
|
-
setMessages((prev) => [
|
|
415
|
-
...prev,
|
|
416
|
-
{
|
|
417
|
-
id: generateMessageId('error'),
|
|
418
|
-
role: 'system',
|
|
419
|
-
content: `Error: ${error instanceof Error ? error.message : String(error)}`,
|
|
420
|
-
timestamp: new Date(),
|
|
421
|
-
},
|
|
422
|
-
]);
|
|
423
|
-
setUi((prev) => ({
|
|
424
|
-
...prev,
|
|
425
|
-
isProcessing: false,
|
|
426
|
-
isCancelling: false,
|
|
427
|
-
isThinking: false,
|
|
428
|
-
}));
|
|
429
|
-
}
|
|
430
|
-
}
|
|
431
|
-
else {
|
|
432
|
-
try {
|
|
433
|
-
let currentSessionId = session.id;
|
|
434
|
-
if (!currentSessionId) {
|
|
435
|
-
if (sessionCreationPromiseRef.current) {
|
|
436
|
-
try {
|
|
437
|
-
const existingSession = await sessionCreationPromiseRef.current;
|
|
438
|
-
currentSessionId = existingSession.id;
|
|
439
|
-
}
|
|
440
|
-
catch {
|
|
441
|
-
sessionCreationPromiseRef.current = null;
|
|
442
|
-
}
|
|
443
|
-
}
|
|
444
|
-
if (!currentSessionId) {
|
|
445
|
-
const sessionPromise = agent.createSession();
|
|
446
|
-
sessionCreationPromiseRef.current = sessionPromise;
|
|
447
|
-
const newSession = await sessionPromise;
|
|
448
|
-
currentSessionId = newSession.id;
|
|
449
|
-
setSession((prev) => ({
|
|
450
|
-
...prev,
|
|
451
|
-
id: currentSessionId,
|
|
452
|
-
hasActiveSession: true,
|
|
453
|
-
}));
|
|
454
|
-
}
|
|
455
|
-
}
|
|
456
|
-
if (!currentSessionId) {
|
|
457
|
-
throw new Error('Failed to create or retrieve session');
|
|
458
|
-
}
|
|
459
|
-
const metadata = await agent.getSessionMetadata(currentSessionId);
|
|
460
|
-
const isFirstMessage = !metadata || metadata.messageCount <= 0;
|
|
461
|
-
// Build content with images if any
|
|
462
|
-
let content;
|
|
463
|
-
// Plan mode injection: prepend plan skill content on first message
|
|
464
|
-
// The <plan-mode> tags are filtered out by the message renderer so users
|
|
465
|
-
// don't see the instructions, but the LLM receives them.
|
|
466
|
-
//
|
|
467
|
-
// TODO: Consider dropping <plan-mode> content after plan is approved/disabled.
|
|
468
|
-
// Edge case: user may still need access to plan tools after approval for
|
|
469
|
-
// progress tracking (checking off tasks). Current approach keeps it simple
|
|
470
|
-
// by letting the content remain in context - it's not re-injected, just
|
|
471
|
-
// stays from the first message.
|
|
472
|
-
let messageText = trimmed;
|
|
473
|
-
if (ui.planModeActive && !ui.planModeInitialized) {
|
|
474
|
-
try {
|
|
475
|
-
const planSkill = await agent.resolvePrompt('config:dexto-plan-mode', {});
|
|
476
|
-
if (planSkill.text) {
|
|
477
|
-
messageText = `<plan-mode>\n${planSkill.text}\n</plan-mode>\n\n${trimmed}`;
|
|
478
|
-
// Mark plan mode as initialized after injection
|
|
479
|
-
setUi((prev) => ({ ...prev, planModeInitialized: true }));
|
|
480
|
-
}
|
|
481
|
-
}
|
|
482
|
-
catch {
|
|
483
|
-
// Plan skill not found - continue without injection
|
|
484
|
-
// This can happen if the agent config/image doesn't include `config:dexto-plan-mode`.
|
|
485
|
-
}
|
|
486
|
-
}
|
|
487
|
-
if (pendingImages.length > 0) {
|
|
488
|
-
// Build multimodal content parts
|
|
489
|
-
const parts = [];
|
|
490
|
-
// Add text part first (with potential plan-mode injection)
|
|
491
|
-
parts.push({ type: 'text', text: messageText });
|
|
492
|
-
// Add image parts
|
|
493
|
-
for (const img of pendingImages) {
|
|
494
|
-
parts.push({
|
|
495
|
-
type: 'image',
|
|
496
|
-
image: img.data,
|
|
497
|
-
mimeType: img.mimeType,
|
|
498
|
-
});
|
|
499
|
-
}
|
|
500
|
-
content = parts;
|
|
501
|
-
}
|
|
502
|
-
else {
|
|
503
|
-
content = messageText;
|
|
504
|
-
}
|
|
505
|
-
// Get current LLM config for analytics
|
|
506
|
-
const llmConfig = agent.getCurrentLLMConfig();
|
|
507
|
-
// Track message sent analytics
|
|
508
|
-
capture('dexto_message_sent', {
|
|
509
|
-
source: 'cli',
|
|
510
|
-
sessionId: currentSessionId,
|
|
511
|
-
provider: llmConfig.provider,
|
|
512
|
-
model: llmConfig.model,
|
|
513
|
-
hasImage: pendingImages.length > 0,
|
|
514
|
-
hasFile: false,
|
|
515
|
-
messageLength: trimmed.length,
|
|
516
|
-
});
|
|
517
|
-
// Use streaming API and process events directly
|
|
518
|
-
const iterator = await agent.stream(content, currentSessionId);
|
|
519
|
-
await processStream(iterator, {
|
|
520
|
-
setMessages,
|
|
521
|
-
setPendingMessages,
|
|
522
|
-
setDequeuedBuffer,
|
|
523
|
-
setUi,
|
|
524
|
-
setSession,
|
|
525
|
-
setQueuedMessages,
|
|
526
|
-
setApproval,
|
|
527
|
-
setApprovalQueue,
|
|
528
|
-
}, {
|
|
529
|
-
useStreaming,
|
|
530
|
-
autoApproveEditsRef,
|
|
531
|
-
eventBus: agent,
|
|
532
|
-
setTodos,
|
|
533
|
-
...(soundService && { soundService }),
|
|
534
|
-
});
|
|
535
|
-
if (isFirstMessage) {
|
|
536
|
-
agent.generateSessionTitle(currentSessionId).catch(() => {
|
|
537
|
-
// Title generation is non-critical - silently ignore failures
|
|
538
|
-
});
|
|
539
|
-
}
|
|
540
|
-
}
|
|
541
|
-
catch (error) {
|
|
542
|
-
setMessages((prev) => [
|
|
543
|
-
...prev,
|
|
544
|
-
{
|
|
545
|
-
id: generateMessageId('error'),
|
|
546
|
-
role: 'system',
|
|
547
|
-
content: `Error: ${error instanceof Error ? error.message : String(error)}`,
|
|
548
|
-
timestamp: new Date(),
|
|
549
|
-
},
|
|
550
|
-
]);
|
|
551
|
-
setUi((prev) => ({
|
|
552
|
-
...prev,
|
|
553
|
-
isProcessing: false,
|
|
554
|
-
isCancelling: false,
|
|
555
|
-
isThinking: false,
|
|
556
|
-
}));
|
|
557
|
-
}
|
|
558
|
-
}
|
|
559
|
-
}, [
|
|
560
|
-
buffer,
|
|
561
|
-
input.images,
|
|
562
|
-
input.pastedBlocks,
|
|
563
|
-
expandPasteBlocks,
|
|
564
|
-
setInput,
|
|
565
|
-
setUi,
|
|
566
|
-
setMessages,
|
|
567
|
-
setPendingMessages,
|
|
568
|
-
setDequeuedBuffer,
|
|
569
|
-
setQueuedMessages,
|
|
570
|
-
setSession,
|
|
571
|
-
agent,
|
|
572
|
-
inputService,
|
|
573
|
-
ui.isProcessing,
|
|
574
|
-
ui.activeOverlay,
|
|
575
|
-
ui.planModeActive,
|
|
576
|
-
ui.planModeInitialized,
|
|
577
|
-
session.id,
|
|
578
|
-
useStreaming,
|
|
579
|
-
soundService,
|
|
580
|
-
]);
|
|
581
|
-
useEffect(() => {
|
|
582
|
-
if (!initialPrompt || didAutoSubmitInitialPromptRef.current) {
|
|
583
|
-
return;
|
|
584
|
-
}
|
|
585
|
-
didAutoSubmitInitialPromptRef.current = true;
|
|
586
|
-
handleSubmit(initialPrompt, true).catch((error) => {
|
|
587
|
-
agent.logger.error('InputContainer initial prompt submission failed', {
|
|
588
|
-
error,
|
|
589
|
-
initialPrompt,
|
|
590
|
-
});
|
|
591
|
-
setMessages((prev) => [
|
|
592
|
-
...prev,
|
|
593
|
-
{
|
|
594
|
-
id: generateMessageId('error'),
|
|
595
|
-
role: 'system',
|
|
596
|
-
content: `Failed to submit initial prompt: ${error instanceof Error ? error.message : String(error)}`,
|
|
597
|
-
timestamp: new Date(),
|
|
598
|
-
},
|
|
599
|
-
]);
|
|
600
|
-
});
|
|
601
|
-
}, [agent.logger, handleSubmit, initialPrompt, setMessages]);
|
|
602
|
-
// Determine if input should be active (not blocked by approval/overlay/history search)
|
|
603
|
-
// Input stays active for filter-type overlays (so user can keep typing to filter)
|
|
604
|
-
// Disable for approval prompts, overlays with their own text input, and history search mode
|
|
605
|
-
const overlaysWithOwnInput = [
|
|
606
|
-
'mcp-custom-wizard',
|
|
607
|
-
'custom-model-wizard',
|
|
608
|
-
'api-key-input',
|
|
609
|
-
'search',
|
|
610
|
-
'tool-browser',
|
|
611
|
-
'prompt-add-wizard',
|
|
612
|
-
'model-selector',
|
|
613
|
-
'export-wizard',
|
|
614
|
-
'marketplace-add',
|
|
615
|
-
];
|
|
616
|
-
const hasOverlayWithOwnInput = overlaysWithOwnInput.includes(ui.activeOverlay);
|
|
617
|
-
const isHistorySearchActive = ui.historySearch.isActive;
|
|
618
|
-
const isInputActive = !approval && !hasOverlayWithOwnInput && !isHistorySearchActive;
|
|
619
|
-
const isInputDisabled = !!approval || hasOverlayWithOwnInput || isHistorySearchActive;
|
|
620
|
-
// Allow submit when:
|
|
621
|
-
// - no overlay active
|
|
622
|
-
// - approval active
|
|
623
|
-
// Note: slash-autocomplete handles its own Enter key (either executes command or submits raw text)
|
|
624
|
-
const shouldHandleSubmit = ui.activeOverlay === 'none' || ui.activeOverlay === 'approval';
|
|
625
|
-
// Allow history navigation when not blocked by approval/overlay
|
|
626
|
-
// Allow during processing so users can browse previous prompts while agent runs
|
|
627
|
-
const canNavigateHistory = !approval && ui.activeOverlay === 'none';
|
|
628
|
-
// Hide the input area when a focused overlay/approval is active.
|
|
629
|
-
// This matches "full-screen overlay" UX (Claude-style) and prevents extra UI chrome/flicker.
|
|
630
|
-
const shouldHideInputArea = getOverlayPresentation(ui.activeOverlay, approval) === 'focus';
|
|
631
|
-
const placeholder = approval
|
|
632
|
-
? 'Approval required above...'
|
|
633
|
-
: 'Type your message or /help for commands';
|
|
634
|
-
// Expose submit method for external use (e.g., from OverlayContainer)
|
|
635
|
-
// Pass bypassOverlayCheck=true since programmatic calls should skip the overlay check
|
|
636
|
-
useImperativeHandle(ref, () => ({
|
|
637
|
-
submit: (text) => handleSubmit(text, true),
|
|
638
|
-
}));
|
|
639
|
-
if (shouldHideInputArea) {
|
|
640
|
-
return null;
|
|
641
|
-
}
|
|
642
|
-
return (_jsx(InputArea, { buffer: buffer, onSubmit: shouldHandleSubmit ? handleSubmit : () => { }, isDisabled: isInputDisabled, isActive: isInputActive, placeholder: placeholder, onHistoryNavigate: canNavigateHistory ? handleHistoryNavigate : undefined, onTriggerOverlay: handleTriggerOverlay, onKeyboardScroll: onKeyboardScroll, imageCount: input.images.length, onImagePaste: handleImagePaste, images: input.images, onImageRemove: handleImageRemove, pastedBlocks: input.pastedBlocks, onPasteBlock: handlePasteBlock, onPasteBlockUpdate: handlePasteBlockUpdate, onPasteBlockRemove: handlePasteBlockRemove, highlightQuery: ui.historySearch.isActive ? ui.historySearch.query : undefined }));
|
|
643
|
-
});
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* OverlayContainer Component
|
|
3
|
-
* Smart container for managing all overlays (selectors, autocomplete, approval)
|
|
4
|
-
*/
|
|
5
|
-
import React from 'react';
|
|
6
|
-
import type { DextoAgent } from '@dexto/core';
|
|
7
|
-
import type { TextBuffer } from '../components/shared/text-buffer.js';
|
|
8
|
-
import type { Key } from '../hooks/useInputOrchestrator.js';
|
|
9
|
-
import type { Message, UIState, InputState, SessionState } from '../state/types.js';
|
|
10
|
-
import { type ApprovalRequest } from '../components/ApprovalPrompt.js';
|
|
11
|
-
import { InputService } from '../services/InputService.js';
|
|
12
|
-
export interface OverlayContainerHandle {
|
|
13
|
-
handleInput: (input: string, key: Key) => boolean;
|
|
14
|
-
}
|
|
15
|
-
interface OverlayContainerProps {
|
|
16
|
-
ui: UIState;
|
|
17
|
-
input: InputState;
|
|
18
|
-
session: SessionState;
|
|
19
|
-
approval: ApprovalRequest | null;
|
|
20
|
-
setInput: React.Dispatch<React.SetStateAction<InputState>>;
|
|
21
|
-
setUi: React.Dispatch<React.SetStateAction<UIState>>;
|
|
22
|
-
setSession: React.Dispatch<React.SetStateAction<SessionState>>;
|
|
23
|
-
setMessages: React.Dispatch<React.SetStateAction<Message[]>>;
|
|
24
|
-
setApproval: React.Dispatch<React.SetStateAction<ApprovalRequest | null>>;
|
|
25
|
-
setApprovalQueue: React.Dispatch<React.SetStateAction<ApprovalRequest[]>>;
|
|
26
|
-
agent: DextoAgent;
|
|
27
|
-
inputService: InputService;
|
|
28
|
-
buffer: TextBuffer;
|
|
29
|
-
/** Source agent config file path (if available) */
|
|
30
|
-
configFilePath: string | null;
|
|
31
|
-
/** Callback to refresh static content (clear terminal and force re-render) */
|
|
32
|
-
refreshStatic?: () => void;
|
|
33
|
-
/** Callback to submit a prompt command through the normal streaming flow */
|
|
34
|
-
onSubmitPromptCommand?: (commandText: string) => Promise<void>;
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* Smart container for managing overlays
|
|
38
|
-
* Handles all modal interactions (selectors, autocomplete, approval)
|
|
39
|
-
*/
|
|
40
|
-
export declare const OverlayContainer: React.ForwardRefExoticComponent<OverlayContainerProps & React.RefAttributes<OverlayContainerHandle>>;
|
|
41
|
-
export {};
|
|
42
|
-
//# sourceMappingURL=OverlayContainer.d.ts.map
|