dexto 1.6.1 → 1.6.3
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 +142 -39
- 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/cli/utils/scaffolding-utils.d.ts.map +1 -1
- package/dist/cli/utils/scaffolding-utils.js +38 -4
- package/dist/index-main.js +78 -11
- package/dist/index.js +12 -0
- package/dist/web.d.ts.map +1 -1
- package/dist/web.js +18 -11
- package/dist/webui/assets/index-d6c-yJNn.js +2059 -0
- package/dist/webui/assets/index-yKdFLN1k.css +1 -0
- package/dist/webui/assets/react-vendor-l0sNRNKZ.js +1 -0
- package/dist/webui/assets/tanstack-BjCuxfF-.js +41 -0
- package/dist/webui/index.html +3 -4
- package/package.json +13 -23
- 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
- package/dist/webui/assets/react-vendor-gH-7aFTg.js +0 -17
- package/dist/webui/assets/tanstack-Br79RQ-n.js +0 -25
|
@@ -1,485 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Message formatting utilities
|
|
3
|
-
* Helpers for creating and formatting messages
|
|
4
|
-
*/
|
|
5
|
-
import path from 'path';
|
|
6
|
-
import os from 'os';
|
|
7
|
-
import { isTextPart, isAssistantMessage, isToolMessage } from '@dexto/core';
|
|
8
|
-
const HIDDEN_TOOL_NAMES = new Set(['wait_for']);
|
|
9
|
-
export function normalizeToolName(toolName) {
|
|
10
|
-
if (toolName.startsWith('mcp--')) {
|
|
11
|
-
const trimmed = toolName.substring('mcp--'.length);
|
|
12
|
-
const parts = trimmed.split('--');
|
|
13
|
-
return parts.length >= 2 ? parts.slice(1).join('--') : trimmed;
|
|
14
|
-
}
|
|
15
|
-
return toolName;
|
|
16
|
-
}
|
|
17
|
-
export function shouldHideTool(toolName) {
|
|
18
|
-
if (!toolName) {
|
|
19
|
-
return false;
|
|
20
|
-
}
|
|
21
|
-
return HIDDEN_TOOL_NAMES.has(normalizeToolName(toolName));
|
|
22
|
-
}
|
|
23
|
-
const backgroundCompletionRegex = /<background-task-completion>[\s\S]*?<\/background-task-completion>/g;
|
|
24
|
-
const stripBackgroundCompletion = (text) => text.replace(backgroundCompletionRegex, '').replace('<background-task-completion>', '').trim();
|
|
25
|
-
import { generateMessageId } from './idGenerator.js';
|
|
26
|
-
/**
|
|
27
|
-
* Regex to detect skill invocation messages.
|
|
28
|
-
* Matches: <skill-invocation>...skill: "config:skill-name"...</skill-invocation>
|
|
29
|
-
* Works for both fork and inline skills.
|
|
30
|
-
*/
|
|
31
|
-
const SKILL_INVOCATION_REGEX = /<skill-invocation>[\s\S]*?skill:\s*"(?:config:)?([^"]+)"[\s\S]*?<\/skill-invocation>/;
|
|
32
|
-
/**
|
|
33
|
-
* Formats a skill invocation message for clean display.
|
|
34
|
-
* Converts verbose <skill-invocation> blocks to clean /skill-name format.
|
|
35
|
-
* Works for both fork skills (just the tag) and inline skills (tag + content).
|
|
36
|
-
*
|
|
37
|
-
* @param content - The message content to check and format
|
|
38
|
-
* @returns Formatted content if it's a skill invocation, original content otherwise
|
|
39
|
-
*/
|
|
40
|
-
export function formatSkillInvocationMessage(content) {
|
|
41
|
-
const match = content.match(SKILL_INVOCATION_REGEX);
|
|
42
|
-
if (match) {
|
|
43
|
-
const skillName = match[1];
|
|
44
|
-
// Extract task context if present
|
|
45
|
-
const contextMatch = content.match(/Task context:\s*(.+?)(?:\n|$)/);
|
|
46
|
-
if (contextMatch) {
|
|
47
|
-
return `/${skillName} ${contextMatch[1]}`;
|
|
48
|
-
}
|
|
49
|
-
return `/${skillName}`;
|
|
50
|
-
}
|
|
51
|
-
return content;
|
|
52
|
-
}
|
|
53
|
-
/**
|
|
54
|
-
* Checks if a message content is a skill invocation.
|
|
55
|
-
*/
|
|
56
|
-
export function isSkillInvocationMessage(content) {
|
|
57
|
-
return SKILL_INVOCATION_REGEX.test(content);
|
|
58
|
-
}
|
|
59
|
-
/**
|
|
60
|
-
* Convert absolute path to display-friendly relative path.
|
|
61
|
-
* Strategy:
|
|
62
|
-
* 1. If path is under cwd → relative from cwd (e.g., "src/file.ts")
|
|
63
|
-
* 2. If path is under home → use tilde (e.g., "~/Projects/file.ts")
|
|
64
|
-
* 3. Otherwise → return absolute path
|
|
65
|
-
*/
|
|
66
|
-
export function makeRelativePath(absolutePath, cwd = process.cwd()) {
|
|
67
|
-
// Normalize paths for comparison
|
|
68
|
-
const normalizedPath = path.normalize(absolutePath);
|
|
69
|
-
const normalizedCwd = path.normalize(cwd);
|
|
70
|
-
const homeDir = os.homedir();
|
|
71
|
-
// If under cwd, return relative path
|
|
72
|
-
if (normalizedPath.startsWith(normalizedCwd + path.sep) || normalizedPath === normalizedCwd) {
|
|
73
|
-
const relative = path.relative(normalizedCwd, normalizedPath);
|
|
74
|
-
return relative || '.';
|
|
75
|
-
}
|
|
76
|
-
// If under home directory, use tilde
|
|
77
|
-
if (normalizedPath.startsWith(homeDir + path.sep) || normalizedPath === homeDir) {
|
|
78
|
-
return '~' + normalizedPath.slice(homeDir.length);
|
|
79
|
-
}
|
|
80
|
-
// Return absolute path as-is
|
|
81
|
-
return absolutePath;
|
|
82
|
-
}
|
|
83
|
-
/**
|
|
84
|
-
* Format a path for display: relative + center-truncate if needed.
|
|
85
|
-
* @param absolutePath - The absolute file path
|
|
86
|
-
* @param maxWidth - Maximum display width (default 60)
|
|
87
|
-
* @param cwd - Current working directory for relative path calculation
|
|
88
|
-
*/
|
|
89
|
-
export function formatPathForDisplay(absolutePath, maxWidth = 60, cwd = process.cwd()) {
|
|
90
|
-
// First convert to relative
|
|
91
|
-
const relativePath = makeRelativePath(absolutePath, cwd);
|
|
92
|
-
// If fits, return as-is
|
|
93
|
-
if (relativePath.length <= maxWidth) {
|
|
94
|
-
return relativePath;
|
|
95
|
-
}
|
|
96
|
-
// Apply center-truncation
|
|
97
|
-
return centerTruncatePath(relativePath, maxWidth);
|
|
98
|
-
}
|
|
99
|
-
/**
|
|
100
|
-
* Center-truncate a file path to keep the filename visible.
|
|
101
|
-
* e.g., "/Users/karaj/Projects/very/long/path/to/file.ts" → "/Users/karaj/…/to/file.ts"
|
|
102
|
-
*
|
|
103
|
-
* Strategy:
|
|
104
|
-
* 1. If path fits within maxWidth, return as-is
|
|
105
|
-
* 2. Keep first segment (root/home) and last 2 segments (parent + filename)
|
|
106
|
-
* 3. Add "…" in the middle
|
|
107
|
-
*/
|
|
108
|
-
export function centerTruncatePath(filePath, maxWidth) {
|
|
109
|
-
if (filePath.length <= maxWidth) {
|
|
110
|
-
return filePath;
|
|
111
|
-
}
|
|
112
|
-
const sep = path.sep;
|
|
113
|
-
const segments = filePath.split(sep).filter(Boolean);
|
|
114
|
-
if (segments.length <= 3) {
|
|
115
|
-
// Too few segments to center-truncate, just end-truncate
|
|
116
|
-
return filePath.slice(0, maxWidth - 1) + '…';
|
|
117
|
-
}
|
|
118
|
-
// Keep first segment and last 2 segments
|
|
119
|
-
const first = filePath.startsWith(sep) ? sep + segments[0] : segments[0];
|
|
120
|
-
const lastTwo = segments.slice(-2).join(sep);
|
|
121
|
-
const truncated = `${first}${sep}…${sep}${lastTwo}`;
|
|
122
|
-
if (truncated.length <= maxWidth) {
|
|
123
|
-
return truncated;
|
|
124
|
-
}
|
|
125
|
-
// Still too long - try with just the filename
|
|
126
|
-
const filename = segments[segments.length - 1] || '';
|
|
127
|
-
const withJustFilename = `…${sep}${filename}`;
|
|
128
|
-
if (withJustFilename.length <= maxWidth) {
|
|
129
|
-
return withJustFilename;
|
|
130
|
-
}
|
|
131
|
-
// Filename itself is too long, end-truncate it
|
|
132
|
-
return filename.slice(0, maxWidth - 1) + '…';
|
|
133
|
-
}
|
|
134
|
-
/**
|
|
135
|
-
* Gets a user-friendly display name for a tool.
|
|
136
|
-
* Returns the friendly name if known, otherwise returns a title-cased version.
|
|
137
|
-
* MCP tools keep their server prefix for clarity (e.g., "mcp--filesystem--read_file").
|
|
138
|
-
*/
|
|
139
|
-
function toTitleCase(name) {
|
|
140
|
-
return name
|
|
141
|
-
.replace(/[_-]+/g, ' ')
|
|
142
|
-
.split(' ')
|
|
143
|
-
.filter(Boolean)
|
|
144
|
-
.map((part) => part.charAt(0).toUpperCase() + part.slice(1))
|
|
145
|
-
.join(' ');
|
|
146
|
-
}
|
|
147
|
-
export function getToolDisplayName(toolName) {
|
|
148
|
-
// MCP tools: strip `mcp--` prefix and server name for clean display
|
|
149
|
-
if (toolName.startsWith('mcp--')) {
|
|
150
|
-
const parts = toolName.split('--');
|
|
151
|
-
if (parts.length >= 3) {
|
|
152
|
-
return toTitleCase(parts.slice(2).join('--'));
|
|
153
|
-
}
|
|
154
|
-
return toTitleCase(toolName.substring(5));
|
|
155
|
-
}
|
|
156
|
-
return toTitleCase(toolName);
|
|
157
|
-
}
|
|
158
|
-
/**
|
|
159
|
-
* Gets the tool type badge for display.
|
|
160
|
-
* Returns: 'local' or MCP server name.
|
|
161
|
-
*/
|
|
162
|
-
export function getToolTypeBadge(toolName) {
|
|
163
|
-
// MCP tools with server name
|
|
164
|
-
if (toolName.startsWith('mcp--')) {
|
|
165
|
-
const parts = toolName.split('--');
|
|
166
|
-
if (parts.length >= 3 && parts[1]) {
|
|
167
|
-
return `MCP: ${parts[1]}`; // Format: 'MCP: github', 'MCP: postgres'
|
|
168
|
-
}
|
|
169
|
-
return 'MCP';
|
|
170
|
-
}
|
|
171
|
-
return 'local';
|
|
172
|
-
}
|
|
173
|
-
/**
|
|
174
|
-
* Formats a tool call header for consistent display across CLI.
|
|
175
|
-
* Used by both tool messages and approval prompts.
|
|
176
|
-
*
|
|
177
|
-
* Handles special cases like spawn_agent (uses agentId as display name).
|
|
178
|
-
*
|
|
179
|
-
* @param toolName - Tool name (local tool id or `mcp--...`)
|
|
180
|
-
* @param args - Tool arguments object
|
|
181
|
-
* @returns Formatted header components and full string
|
|
182
|
-
*/
|
|
183
|
-
export function formatToolHeader(options) {
|
|
184
|
-
const { toolName, args, presentationSnapshot } = options;
|
|
185
|
-
const snapshotHeader = presentationSnapshot?.header;
|
|
186
|
-
const displayName = snapshotHeader?.title ?? getToolDisplayName(toolName);
|
|
187
|
-
const argsFormatted = snapshotHeader?.argsText ?? formatArgsFallback(args);
|
|
188
|
-
const badge = getToolTypeBadge(toolName);
|
|
189
|
-
// Only show badge for MCP tools (external tools worth distinguishing)
|
|
190
|
-
const isMcpTool = badge.startsWith('MCP');
|
|
191
|
-
const badgeSuffix = isMcpTool ? ` [${badge}]` : '';
|
|
192
|
-
// Format: DisplayName(args) [badge] (badge only for MCP)
|
|
193
|
-
const header = argsFormatted
|
|
194
|
-
? `${displayName}(${argsFormatted})${badgeSuffix}`
|
|
195
|
-
: `${displayName}()${badgeSuffix}`;
|
|
196
|
-
return {
|
|
197
|
-
displayName,
|
|
198
|
-
argsFormatted,
|
|
199
|
-
badge,
|
|
200
|
-
header,
|
|
201
|
-
};
|
|
202
|
-
}
|
|
203
|
-
/**
|
|
204
|
-
* Simple fallback for formatting tool args when no snapshot is provided.
|
|
205
|
-
* Used for MCP tools that don't implement tool header snapshots.
|
|
206
|
-
*/
|
|
207
|
-
function formatArgsFallback(args) {
|
|
208
|
-
const entries = Object.entries(args)
|
|
209
|
-
.filter(([k]) => !['__meta', 'description'].includes(k))
|
|
210
|
-
.slice(0, 4);
|
|
211
|
-
const str = entries
|
|
212
|
-
.map(([k, v]) => {
|
|
213
|
-
const val = typeof v === 'string' ? v : JSON.stringify(v);
|
|
214
|
-
return val.length > 50 ? `${k}=${val.slice(0, 47)}...` : `${k}=${val}`;
|
|
215
|
-
})
|
|
216
|
-
.join(', ');
|
|
217
|
-
return str.length > 150 ? str.slice(0, 147) + '...' : str;
|
|
218
|
-
}
|
|
219
|
-
/**
|
|
220
|
-
* Creates a user message
|
|
221
|
-
*/
|
|
222
|
-
export function createUserMessage(content) {
|
|
223
|
-
return {
|
|
224
|
-
id: generateMessageId('user'),
|
|
225
|
-
role: 'user',
|
|
226
|
-
content,
|
|
227
|
-
timestamp: new Date(),
|
|
228
|
-
};
|
|
229
|
-
}
|
|
230
|
-
/**
|
|
231
|
-
* Creates a queued user message (shown when message is queued while processing)
|
|
232
|
-
*/
|
|
233
|
-
export function createQueuedUserMessage(content, queuePosition) {
|
|
234
|
-
return {
|
|
235
|
-
id: generateMessageId('user-queued'),
|
|
236
|
-
role: 'user',
|
|
237
|
-
content,
|
|
238
|
-
timestamp: new Date(),
|
|
239
|
-
isQueued: true,
|
|
240
|
-
queuePosition,
|
|
241
|
-
};
|
|
242
|
-
}
|
|
243
|
-
/**
|
|
244
|
-
* Creates a system message
|
|
245
|
-
*/
|
|
246
|
-
export function createSystemMessage(content) {
|
|
247
|
-
return {
|
|
248
|
-
id: generateMessageId('system'),
|
|
249
|
-
role: 'system',
|
|
250
|
-
content,
|
|
251
|
-
timestamp: new Date(),
|
|
252
|
-
};
|
|
253
|
-
}
|
|
254
|
-
/**
|
|
255
|
-
* Creates an error message
|
|
256
|
-
*/
|
|
257
|
-
export function createErrorMessage(error) {
|
|
258
|
-
const content = error instanceof Error ? error.message : error;
|
|
259
|
-
return {
|
|
260
|
-
id: generateMessageId('error'),
|
|
261
|
-
role: 'system',
|
|
262
|
-
content: `Error: ${content}`,
|
|
263
|
-
timestamp: new Date(),
|
|
264
|
-
};
|
|
265
|
-
}
|
|
266
|
-
/**
|
|
267
|
-
* Creates a tool call message
|
|
268
|
-
*/
|
|
269
|
-
export function createToolMessage(toolName) {
|
|
270
|
-
return {
|
|
271
|
-
id: generateMessageId('tool'),
|
|
272
|
-
role: 'tool',
|
|
273
|
-
content: `🔧 Calling tool: ${toolName}`,
|
|
274
|
-
timestamp: new Date(),
|
|
275
|
-
};
|
|
276
|
-
}
|
|
277
|
-
/**
|
|
278
|
-
* Formats a streaming placeholder message
|
|
279
|
-
*/
|
|
280
|
-
export function createStreamingMessage() {
|
|
281
|
-
return {
|
|
282
|
-
id: generateMessageId('assistant'),
|
|
283
|
-
role: 'assistant',
|
|
284
|
-
content: '',
|
|
285
|
-
timestamp: new Date(),
|
|
286
|
-
isStreaming: true,
|
|
287
|
-
};
|
|
288
|
-
}
|
|
289
|
-
/**
|
|
290
|
-
* Extracts text content from message content (handles ContentPart array or null)
|
|
291
|
-
*/
|
|
292
|
-
function extractTextContent(content) {
|
|
293
|
-
if (!content) {
|
|
294
|
-
return '';
|
|
295
|
-
}
|
|
296
|
-
return content
|
|
297
|
-
.filter(isTextPart)
|
|
298
|
-
.map((part) => part.text)
|
|
299
|
-
.join('\n');
|
|
300
|
-
}
|
|
301
|
-
/**
|
|
302
|
-
* Generates a preview of tool result content for display
|
|
303
|
-
*/
|
|
304
|
-
export function formatToolResultPreview(result) {
|
|
305
|
-
try {
|
|
306
|
-
const parsed = JSON.parse(result);
|
|
307
|
-
if (parsed.status === 'running' && parsed.taskId) {
|
|
308
|
-
return `Background task started (id: ${parsed.taskId})`;
|
|
309
|
-
}
|
|
310
|
-
if (parsed.found !== undefined && parsed.taskId) {
|
|
311
|
-
return parsed.found
|
|
312
|
-
? `Task ${parsed.taskId} status: ${parsed.status ?? 'unknown'}`
|
|
313
|
-
: `Task ${parsed.taskId} not found`;
|
|
314
|
-
}
|
|
315
|
-
if (Array.isArray(parsed.tasks) && typeof parsed.count === 'number') {
|
|
316
|
-
const running = parsed.tasks.filter((task) => task.status === 'running').length;
|
|
317
|
-
return `Tasks: ${parsed.count} total${running > 0 ? ` • ${running} running` : ''}`;
|
|
318
|
-
}
|
|
319
|
-
}
|
|
320
|
-
catch {
|
|
321
|
-
// fall through
|
|
322
|
-
}
|
|
323
|
-
const maxChars = 200;
|
|
324
|
-
if (result.length <= maxChars) {
|
|
325
|
-
return result;
|
|
326
|
-
}
|
|
327
|
-
return result.slice(0, maxChars) + '…';
|
|
328
|
-
}
|
|
329
|
-
function generateToolResultPreview(content) {
|
|
330
|
-
const textContent = extractTextContent(content);
|
|
331
|
-
if (!textContent)
|
|
332
|
-
return '';
|
|
333
|
-
try {
|
|
334
|
-
const parsed = JSON.parse(textContent);
|
|
335
|
-
if (parsed.status === 'running' && parsed.taskId) {
|
|
336
|
-
return `Background task started (id: ${parsed.taskId})`;
|
|
337
|
-
}
|
|
338
|
-
if (Array.isArray(parsed.tasks) && typeof parsed.count === 'number') {
|
|
339
|
-
const running = parsed.tasks.filter((task) => task.status === 'running').length;
|
|
340
|
-
return `Tasks: ${parsed.count} total${running > 0 ? ` • ${running} running` : ''}`;
|
|
341
|
-
}
|
|
342
|
-
if (parsed.found !== undefined && parsed.taskId) {
|
|
343
|
-
return parsed.found
|
|
344
|
-
? `Task ${parsed.taskId} status: ${parsed.status ?? 'unknown'}`
|
|
345
|
-
: `Task ${parsed.taskId} not found`;
|
|
346
|
-
}
|
|
347
|
-
}
|
|
348
|
-
catch {
|
|
349
|
-
// Not JSON; fall through to raw text preview
|
|
350
|
-
}
|
|
351
|
-
const lines = textContent.split('\n');
|
|
352
|
-
const previewLines = lines.slice(0, 5);
|
|
353
|
-
let preview = previewLines.join('\n');
|
|
354
|
-
// Truncate if too long
|
|
355
|
-
if (preview.length > 400) {
|
|
356
|
-
preview = preview.slice(0, 397) + '...';
|
|
357
|
-
}
|
|
358
|
-
else if (lines.length > 5) {
|
|
359
|
-
preview += '\n...';
|
|
360
|
-
}
|
|
361
|
-
return preview;
|
|
362
|
-
}
|
|
363
|
-
/**
|
|
364
|
-
* Converts session history messages to UI messages
|
|
365
|
-
*/
|
|
366
|
-
export function convertHistoryToUIMessages(history, sessionId) {
|
|
367
|
-
const uiMessages = [];
|
|
368
|
-
// Build a map of toolCallId -> ToolCall for looking up tool call args
|
|
369
|
-
const toolCallMap = new Map();
|
|
370
|
-
for (const msg of history) {
|
|
371
|
-
if (isAssistantMessage(msg) && msg.toolCalls) {
|
|
372
|
-
for (const toolCall of msg.toolCalls) {
|
|
373
|
-
toolCallMap.set(toolCall.id, toolCall);
|
|
374
|
-
}
|
|
375
|
-
}
|
|
376
|
-
}
|
|
377
|
-
history.forEach((msg, index) => {
|
|
378
|
-
const timestamp = new Date(msg.timestamp ?? Date.now() - (history.length - index) * 1000);
|
|
379
|
-
// Handle tool messages specially
|
|
380
|
-
if (isToolMessage(msg)) {
|
|
381
|
-
if (shouldHideTool(msg.name)) {
|
|
382
|
-
return;
|
|
383
|
-
}
|
|
384
|
-
// Look up the original tool call to get args
|
|
385
|
-
const toolCall = toolCallMap.get(msg.toolCallId);
|
|
386
|
-
// Format tool name
|
|
387
|
-
const displayName = msg.presentationSnapshot?.header?.title ?? getToolDisplayName(msg.name);
|
|
388
|
-
// Format args if we have them
|
|
389
|
-
let toolContent = displayName;
|
|
390
|
-
const snapshotArgsText = msg.presentationSnapshot?.header?.argsText;
|
|
391
|
-
if (typeof snapshotArgsText === 'string' && snapshotArgsText.length > 0) {
|
|
392
|
-
toolContent = `${displayName}(${snapshotArgsText})`;
|
|
393
|
-
}
|
|
394
|
-
if (!snapshotArgsText && toolCall) {
|
|
395
|
-
try {
|
|
396
|
-
const args = JSON.parse(toolCall.function.arguments || '{}');
|
|
397
|
-
const argsFormatted = formatArgsFallback(args);
|
|
398
|
-
if (argsFormatted) {
|
|
399
|
-
toolContent = `${displayName}(${argsFormatted})`;
|
|
400
|
-
}
|
|
401
|
-
}
|
|
402
|
-
catch {
|
|
403
|
-
// Ignore JSON parse errors
|
|
404
|
-
}
|
|
405
|
-
}
|
|
406
|
-
// Add tool type badge (only for MCP tools)
|
|
407
|
-
const badge = getToolTypeBadge(msg.name);
|
|
408
|
-
if (badge.startsWith('MCP')) {
|
|
409
|
-
toolContent = `${toolContent} [${badge}]`;
|
|
410
|
-
}
|
|
411
|
-
// Generate result preview
|
|
412
|
-
const resultPreview = generateToolResultPreview(msg.content);
|
|
413
|
-
uiMessages.push({
|
|
414
|
-
id: `session-${sessionId}-${index}`,
|
|
415
|
-
role: 'tool',
|
|
416
|
-
content: toolContent,
|
|
417
|
-
timestamp,
|
|
418
|
-
toolStatus: 'finished',
|
|
419
|
-
toolResult: resultPreview,
|
|
420
|
-
isError: msg.success === false,
|
|
421
|
-
// Store content parts for potential rich rendering
|
|
422
|
-
toolContent: msg.content,
|
|
423
|
-
// Restore structured display data for rich rendering (diffs, shell output, etc.)
|
|
424
|
-
...(msg.displayData !== undefined && {
|
|
425
|
-
toolDisplayData: msg.displayData,
|
|
426
|
-
}),
|
|
427
|
-
});
|
|
428
|
-
return;
|
|
429
|
-
}
|
|
430
|
-
// Handle assistant messages - skip those with only tool calls (no text content)
|
|
431
|
-
if (isAssistantMessage(msg)) {
|
|
432
|
-
let textContent = extractTextContent(msg.content);
|
|
433
|
-
textContent = stripBackgroundCompletion(textContent);
|
|
434
|
-
// Skip if no text content (message was just tool calls)
|
|
435
|
-
if (!textContent)
|
|
436
|
-
return;
|
|
437
|
-
uiMessages.push({
|
|
438
|
-
id: `session-${sessionId}-${index}`,
|
|
439
|
-
role: 'assistant',
|
|
440
|
-
content: textContent,
|
|
441
|
-
timestamp,
|
|
442
|
-
});
|
|
443
|
-
return;
|
|
444
|
-
}
|
|
445
|
-
// Handle other messages (user, system)
|
|
446
|
-
let textContent = extractTextContent(msg.content);
|
|
447
|
-
textContent = stripBackgroundCompletion(textContent);
|
|
448
|
-
// Skip empty messages
|
|
449
|
-
if (!textContent)
|
|
450
|
-
return;
|
|
451
|
-
// Format skill invocation messages for cleaner display
|
|
452
|
-
if (msg.role === 'user') {
|
|
453
|
-
textContent = formatSkillInvocationMessage(textContent);
|
|
454
|
-
}
|
|
455
|
-
uiMessages.push({
|
|
456
|
-
id: `session-${sessionId}-${index}`,
|
|
457
|
-
role: msg.role,
|
|
458
|
-
content: textContent,
|
|
459
|
-
timestamp,
|
|
460
|
-
});
|
|
461
|
-
});
|
|
462
|
-
return uiMessages;
|
|
463
|
-
}
|
|
464
|
-
/**
|
|
465
|
-
* Collects startup information for display in header
|
|
466
|
-
*/
|
|
467
|
-
export async function getStartupInfo(agent, sessionId) {
|
|
468
|
-
const connectedServers = agent.mcpManager.getClients();
|
|
469
|
-
const failedConnections = agent.mcpManager.getFailedConnections();
|
|
470
|
-
const tools = await agent.getAllTools();
|
|
471
|
-
const toolCount = Object.keys(tools).length;
|
|
472
|
-
// File logging is session-scoped. If a session already exists, show its log file.
|
|
473
|
-
const logFile = sessionId
|
|
474
|
-
? ((await agent.getSession(sessionId))?.logger.getLogFilePath() ?? null)
|
|
475
|
-
: null;
|
|
476
|
-
return {
|
|
477
|
-
connectedServers: {
|
|
478
|
-
count: connectedServers.size,
|
|
479
|
-
names: Array.from(connectedServers.keys()),
|
|
480
|
-
},
|
|
481
|
-
failedConnections: Object.keys(failedConnections),
|
|
482
|
-
toolCount,
|
|
483
|
-
logFile,
|
|
484
|
-
};
|
|
485
|
-
}
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Mouse Event Utilities
|
|
3
|
-
* Provides trackpad/mouse scroll support.
|
|
4
|
-
*/
|
|
5
|
-
import { ESC } from './input.js';
|
|
6
|
-
export type MouseEventName = 'scroll-up' | 'scroll-down' | 'scroll-left' | 'scroll-right' | 'left-press' | 'left-release' | 'right-press' | 'right-release' | 'middle-press' | 'middle-release' | 'move';
|
|
7
|
-
export interface MouseEvent {
|
|
8
|
-
name: MouseEventName;
|
|
9
|
-
col: number;
|
|
10
|
-
row: number;
|
|
11
|
-
shift: boolean;
|
|
12
|
-
meta: boolean;
|
|
13
|
-
ctrl: boolean;
|
|
14
|
-
button: 'left' | 'middle' | 'right' | 'none';
|
|
15
|
-
}
|
|
16
|
-
export type MouseHandler = (event: MouseEvent) => void | boolean;
|
|
17
|
-
/**
|
|
18
|
-
* Enable mouse events in the terminal.
|
|
19
|
-
* Uses SGR extended mouse mode for better coordinate handling.
|
|
20
|
-
*/
|
|
21
|
-
export declare function enableMouseEvents(): void;
|
|
22
|
-
/**
|
|
23
|
-
* Disable mouse events in the terminal.
|
|
24
|
-
*/
|
|
25
|
-
export declare function disableMouseEvents(): void;
|
|
26
|
-
/**
|
|
27
|
-
* Get mouse event name from button code
|
|
28
|
-
*
|
|
29
|
-
* NOTE: X11 mouse protocol limitation - all button releases report the same code (3),
|
|
30
|
-
* so we cannot distinguish between left-release, middle-release, and right-release.
|
|
31
|
-
* This function returns 'left-release' for all releases in X11 mode.
|
|
32
|
-
* Consumers needing accurate release identification should track press state themselves.
|
|
33
|
-
*/
|
|
34
|
-
export declare function getMouseEventName(buttonCode: number, isRelease: boolean): MouseEventName | null;
|
|
35
|
-
/**
|
|
36
|
-
* Parse SGR format mouse event
|
|
37
|
-
*/
|
|
38
|
-
export declare function parseSGRMouseEvent(buffer: string): {
|
|
39
|
-
event: MouseEvent;
|
|
40
|
-
length: number;
|
|
41
|
-
} | null;
|
|
42
|
-
/**
|
|
43
|
-
* Parse X11 format mouse event
|
|
44
|
-
*/
|
|
45
|
-
export declare function parseX11MouseEvent(buffer: string): {
|
|
46
|
-
event: MouseEvent;
|
|
47
|
-
length: number;
|
|
48
|
-
} | null;
|
|
49
|
-
/**
|
|
50
|
-
* Parse mouse event from buffer (tries both SGR and X11 formats)
|
|
51
|
-
*/
|
|
52
|
-
export declare function parseMouseEvent(buffer: string): {
|
|
53
|
-
event: MouseEvent;
|
|
54
|
-
length: number;
|
|
55
|
-
} | null;
|
|
56
|
-
/**
|
|
57
|
-
* Check if buffer could be an incomplete mouse sequence
|
|
58
|
-
*/
|
|
59
|
-
export declare function isIncompleteMouseSequence(buffer: string): boolean;
|
|
60
|
-
export { ESC };
|
|
61
|
-
//# sourceMappingURL=mouse.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mouse.d.ts","sourceRoot":"","sources":["../../../../src/cli/ink-cli/utils/mouse.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACH,GAAG,EAMN,MAAM,YAAY,CAAC;AAEpB,MAAM,MAAM,cAAc,GACpB,WAAW,GACX,aAAa,GACb,aAAa,GACb,cAAc,GACd,YAAY,GACZ,cAAc,GACd,aAAa,GACb,eAAe,GACf,cAAc,GACd,gBAAgB,GAChB,MAAM,CAAC;AAEb,MAAM,WAAW,UAAU;IACvB,IAAI,EAAE,cAAc,CAAC;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,OAAO,CAAC;IACf,IAAI,EAAE,OAAO,CAAC;IACd,IAAI,EAAE,OAAO,CAAC;IACd,MAAM,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,GAAG,MAAM,CAAC;CAChD;AAED,MAAM,MAAM,YAAY,GAAG,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,GAAG,OAAO,CAAC;AAEjE;;;GAGG;AACH,wBAAgB,iBAAiB,IAAI,IAAI,CAIxC;AAED;;GAEG;AACH,wBAAgB,kBAAkB,IAAI,IAAI,CAEzC;AAED;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,GAAG,cAAc,GAAG,IAAI,CAmC/F;AAmBD;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG;IAAE,KAAK,EAAE,UAAU,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAiC/F;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG;IAAE,KAAK,EAAE,UAAU,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAoE/F;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG;IAAE,KAAK,EAAE,UAAU,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAE5F;AAED;;GAEG;AACH,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAmBjE;AAGD,OAAO,EAAE,GAAG,EAAE,CAAC"}
|