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,209 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Mouse Event Utilities
|
|
3
|
-
* Provides trackpad/mouse scroll support.
|
|
4
|
-
*/
|
|
5
|
-
import { ESC, SGR_MOUSE_REGEX, X11_MOUSE_REGEX, SGR_EVENT_PREFIX, X11_EVENT_PREFIX, couldBeMouseSequence, } from './input.js';
|
|
6
|
-
/**
|
|
7
|
-
* Enable mouse events in the terminal.
|
|
8
|
-
* Uses SGR extended mouse mode for better coordinate handling.
|
|
9
|
-
*/
|
|
10
|
-
export function enableMouseEvents() {
|
|
11
|
-
// ?1002h = button event tracking (clicks + drags + scroll wheel)
|
|
12
|
-
// ?1006h = SGR extended mouse mode (better coordinate handling)
|
|
13
|
-
process.stdout.write('\u001b[?1002h\u001b[?1006h');
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* Disable mouse events in the terminal.
|
|
17
|
-
*/
|
|
18
|
-
export function disableMouseEvents() {
|
|
19
|
-
process.stdout.write('\u001b[?1006l\u001b[?1002l');
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* Get mouse event name from button code
|
|
23
|
-
*
|
|
24
|
-
* NOTE: X11 mouse protocol limitation - all button releases report the same code (3),
|
|
25
|
-
* so we cannot distinguish between left-release, middle-release, and right-release.
|
|
26
|
-
* This function returns 'left-release' for all releases in X11 mode.
|
|
27
|
-
* Consumers needing accurate release identification should track press state themselves.
|
|
28
|
-
*/
|
|
29
|
-
export function getMouseEventName(buttonCode, isRelease) {
|
|
30
|
-
const isMove = (buttonCode & 32) !== 0;
|
|
31
|
-
// Horizontal scroll (less common)
|
|
32
|
-
if (buttonCode === 66) {
|
|
33
|
-
return 'scroll-left';
|
|
34
|
-
}
|
|
35
|
-
else if (buttonCode === 67) {
|
|
36
|
-
return 'scroll-right';
|
|
37
|
-
}
|
|
38
|
-
// Vertical scroll
|
|
39
|
-
if ((buttonCode & 64) === 64) {
|
|
40
|
-
if ((buttonCode & 1) === 0) {
|
|
41
|
-
return 'scroll-up';
|
|
42
|
-
}
|
|
43
|
-
else {
|
|
44
|
-
return 'scroll-down';
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
if (isMove) {
|
|
48
|
-
return 'move';
|
|
49
|
-
}
|
|
50
|
-
const button = buttonCode & 3;
|
|
51
|
-
const type = isRelease ? 'release' : 'press';
|
|
52
|
-
switch (button) {
|
|
53
|
-
case 0:
|
|
54
|
-
return `left-${type}`;
|
|
55
|
-
case 1:
|
|
56
|
-
return `middle-${type}`;
|
|
57
|
-
case 2:
|
|
58
|
-
return `right-${type}`;
|
|
59
|
-
default:
|
|
60
|
-
return null;
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
/**
|
|
64
|
-
* Get button type from button code
|
|
65
|
-
*/
|
|
66
|
-
function getButtonFromCode(code) {
|
|
67
|
-
const button = code & 3;
|
|
68
|
-
switch (button) {
|
|
69
|
-
case 0:
|
|
70
|
-
return 'left';
|
|
71
|
-
case 1:
|
|
72
|
-
return 'middle';
|
|
73
|
-
case 2:
|
|
74
|
-
return 'right';
|
|
75
|
-
default:
|
|
76
|
-
return 'none';
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
/**
|
|
80
|
-
* Parse SGR format mouse event
|
|
81
|
-
*/
|
|
82
|
-
export function parseSGRMouseEvent(buffer) {
|
|
83
|
-
const match = buffer.match(SGR_MOUSE_REGEX);
|
|
84
|
-
if (match) {
|
|
85
|
-
const buttonCode = parseInt(match[1], 10);
|
|
86
|
-
const col = parseInt(match[2], 10);
|
|
87
|
-
const row = parseInt(match[3], 10);
|
|
88
|
-
const action = match[4];
|
|
89
|
-
const isRelease = action === 'm';
|
|
90
|
-
const shift = (buttonCode & 4) !== 0;
|
|
91
|
-
const meta = (buttonCode & 8) !== 0;
|
|
92
|
-
const ctrl = (buttonCode & 16) !== 0;
|
|
93
|
-
const name = getMouseEventName(buttonCode, isRelease);
|
|
94
|
-
if (name) {
|
|
95
|
-
return {
|
|
96
|
-
event: {
|
|
97
|
-
name,
|
|
98
|
-
ctrl,
|
|
99
|
-
meta,
|
|
100
|
-
shift,
|
|
101
|
-
col,
|
|
102
|
-
row,
|
|
103
|
-
button: getButtonFromCode(buttonCode),
|
|
104
|
-
},
|
|
105
|
-
length: match[0].length,
|
|
106
|
-
};
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
return null;
|
|
110
|
-
}
|
|
111
|
-
/**
|
|
112
|
-
* Parse X11 format mouse event
|
|
113
|
-
*/
|
|
114
|
-
export function parseX11MouseEvent(buffer) {
|
|
115
|
-
const match = buffer.match(X11_MOUSE_REGEX);
|
|
116
|
-
if (!match)
|
|
117
|
-
return null;
|
|
118
|
-
const b = match[1].charCodeAt(0) - 32;
|
|
119
|
-
const col = match[1].charCodeAt(1) - 32;
|
|
120
|
-
const row = match[1].charCodeAt(2) - 32;
|
|
121
|
-
const shift = (b & 4) !== 0;
|
|
122
|
-
const meta = (b & 8) !== 0;
|
|
123
|
-
const ctrl = (b & 16) !== 0;
|
|
124
|
-
const isMove = (b & 32) !== 0;
|
|
125
|
-
const isWheel = (b & 64) !== 0;
|
|
126
|
-
let name = null;
|
|
127
|
-
if (isWheel) {
|
|
128
|
-
const button = b & 3;
|
|
129
|
-
switch (button) {
|
|
130
|
-
case 0:
|
|
131
|
-
name = 'scroll-up';
|
|
132
|
-
break;
|
|
133
|
-
case 1:
|
|
134
|
-
name = 'scroll-down';
|
|
135
|
-
break;
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
else if (isMove) {
|
|
139
|
-
name = 'move';
|
|
140
|
-
}
|
|
141
|
-
else {
|
|
142
|
-
const button = b & 3;
|
|
143
|
-
if (button === 3) {
|
|
144
|
-
// X11 reports 'release' (3) for all button releases
|
|
145
|
-
name = 'left-release';
|
|
146
|
-
}
|
|
147
|
-
else {
|
|
148
|
-
switch (button) {
|
|
149
|
-
case 0:
|
|
150
|
-
name = 'left-press';
|
|
151
|
-
break;
|
|
152
|
-
case 1:
|
|
153
|
-
name = 'middle-press';
|
|
154
|
-
break;
|
|
155
|
-
case 2:
|
|
156
|
-
name = 'right-press';
|
|
157
|
-
break;
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
if (name) {
|
|
162
|
-
let button = getButtonFromCode(b);
|
|
163
|
-
if (name === 'left-release' && button === 'none') {
|
|
164
|
-
button = 'left';
|
|
165
|
-
}
|
|
166
|
-
return {
|
|
167
|
-
event: {
|
|
168
|
-
name,
|
|
169
|
-
ctrl,
|
|
170
|
-
meta,
|
|
171
|
-
shift,
|
|
172
|
-
col,
|
|
173
|
-
row,
|
|
174
|
-
button,
|
|
175
|
-
},
|
|
176
|
-
length: match[0].length,
|
|
177
|
-
};
|
|
178
|
-
}
|
|
179
|
-
return null;
|
|
180
|
-
}
|
|
181
|
-
/**
|
|
182
|
-
* Parse mouse event from buffer (tries both SGR and X11 formats)
|
|
183
|
-
*/
|
|
184
|
-
export function parseMouseEvent(buffer) {
|
|
185
|
-
return parseSGRMouseEvent(buffer) || parseX11MouseEvent(buffer);
|
|
186
|
-
}
|
|
187
|
-
/**
|
|
188
|
-
* Check if buffer could be an incomplete mouse sequence
|
|
189
|
-
*/
|
|
190
|
-
export function isIncompleteMouseSequence(buffer) {
|
|
191
|
-
if (!couldBeMouseSequence(buffer))
|
|
192
|
-
return false;
|
|
193
|
-
// If it matches a complete sequence, it's not incomplete
|
|
194
|
-
if (parseMouseEvent(buffer))
|
|
195
|
-
return false;
|
|
196
|
-
if (buffer.startsWith(X11_EVENT_PREFIX)) {
|
|
197
|
-
// X11 needs exactly 3 bytes after prefix
|
|
198
|
-
return buffer.length < X11_EVENT_PREFIX.length + 3;
|
|
199
|
-
}
|
|
200
|
-
if (buffer.startsWith(SGR_EVENT_PREFIX)) {
|
|
201
|
-
// SGR sequences end with 'm' or 'M'
|
|
202
|
-
// Add a reasonable max length check to fail early on garbage
|
|
203
|
-
return !/[mM]/.test(buffer) && buffer.length < 50;
|
|
204
|
-
}
|
|
205
|
-
// It's a prefix of the prefix (e.g. "ESC" or "ESC [")
|
|
206
|
-
return true;
|
|
207
|
-
}
|
|
208
|
-
// Re-export ESC for convenience
|
|
209
|
-
export { ESC };
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { OverlayType } from '../state/types.js';
|
|
2
|
-
import type { ApprovalRequest } from '../components/ApprovalPrompt.js';
|
|
3
|
-
export type OverlayPresentation = 'none' | 'inline' | 'focus';
|
|
4
|
-
/**
|
|
5
|
-
* Determine how an overlay/approval should be presented in the CLI.
|
|
6
|
-
*
|
|
7
|
-
* - `inline`: small overlays that keep the main input visible (e.g. autocomplete)
|
|
8
|
-
* - `focus`: overlays/approvals that should take focus and hide UI chrome (input + footer)
|
|
9
|
-
*/
|
|
10
|
-
export declare function getOverlayPresentation(activeOverlay: OverlayType, approval: ApprovalRequest | null): OverlayPresentation;
|
|
11
|
-
export declare function shouldHideCliChrome(activeOverlay: OverlayType, approval: ApprovalRequest | null): boolean;
|
|
12
|
-
/**
|
|
13
|
-
* Hide "always-on" chrome (status bar, panels, footer) whenever any overlay is visible.
|
|
14
|
-
*
|
|
15
|
-
* This keeps inline overlays (like slash/resource autocomplete) from competing for scarce
|
|
16
|
-
* terminal rows, and reduces flicker by keeping the total rendered height stable.
|
|
17
|
-
*/
|
|
18
|
-
export declare function shouldHideStatusChrome(activeOverlay: OverlayType, approval: ApprovalRequest | null): boolean;
|
|
19
|
-
//# sourceMappingURL=overlayPresentation.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"overlayPresentation.d.ts","sourceRoot":"","sources":["../../../../src/cli/ink-cli/utils/overlayPresentation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAEvE,MAAM,MAAM,mBAAmB,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;AAO9D;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAClC,aAAa,EAAE,WAAW,EAC1B,QAAQ,EAAE,eAAe,GAAG,IAAI,GACjC,mBAAmB,CAMrB;AAED,wBAAgB,mBAAmB,CAC/B,aAAa,EAAE,WAAW,EAC1B,QAAQ,EAAE,eAAe,GAAG,IAAI,GACjC,OAAO,CAET;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAClC,aAAa,EAAE,WAAW,EAC1B,QAAQ,EAAE,eAAe,GAAG,IAAI,GACjC,OAAO,CAGT"}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
const INLINE_OVERLAYS = new Set([
|
|
2
|
-
'slash-autocomplete',
|
|
3
|
-
'resource-autocomplete',
|
|
4
|
-
]);
|
|
5
|
-
/**
|
|
6
|
-
* Determine how an overlay/approval should be presented in the CLI.
|
|
7
|
-
*
|
|
8
|
-
* - `inline`: small overlays that keep the main input visible (e.g. autocomplete)
|
|
9
|
-
* - `focus`: overlays/approvals that should take focus and hide UI chrome (input + footer)
|
|
10
|
-
*/
|
|
11
|
-
export function getOverlayPresentation(activeOverlay, approval) {
|
|
12
|
-
if (approval)
|
|
13
|
-
return 'focus';
|
|
14
|
-
if (activeOverlay === 'none')
|
|
15
|
-
return 'none';
|
|
16
|
-
if (INLINE_OVERLAYS.has(activeOverlay))
|
|
17
|
-
return 'inline';
|
|
18
|
-
return 'focus';
|
|
19
|
-
}
|
|
20
|
-
export function shouldHideCliChrome(activeOverlay, approval) {
|
|
21
|
-
return getOverlayPresentation(activeOverlay, approval) === 'focus';
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Hide "always-on" chrome (status bar, panels, footer) whenever any overlay is visible.
|
|
25
|
-
*
|
|
26
|
-
* This keeps inline overlays (like slash/resource autocomplete) from competing for scarce
|
|
27
|
-
* terminal rows, and reduces flicker by keeping the total rendered height stable.
|
|
28
|
-
*/
|
|
29
|
-
export function shouldHideStatusChrome(activeOverlay, approval) {
|
|
30
|
-
if (approval)
|
|
31
|
-
return true;
|
|
32
|
-
return activeOverlay !== 'none';
|
|
33
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export interface ListViewportSizingOptions {
|
|
2
|
-
/** Total terminal rows. */
|
|
3
|
-
rows: number;
|
|
4
|
-
/** Maximum number of rows/items to ever render for the list. */
|
|
5
|
-
hardCap: number;
|
|
6
|
-
/**
|
|
7
|
-
* Rows to keep free for surrounding UI/chrome.
|
|
8
|
-
* Claude Code commonly uses ~6 rows of slack to avoid Ink hitting the clear+redraw path.
|
|
9
|
-
*/
|
|
10
|
-
reservedRows?: number;
|
|
11
|
-
/** Minimum rows/items to render when possible. */
|
|
12
|
-
minVisibleItems?: number;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Compute a safe "max visible items" count for list UIs so we don't render content that
|
|
16
|
-
* approaches/exceeds the terminal height (which can cause Ink to clear + redraw, i.e. flicker).
|
|
17
|
-
*/
|
|
18
|
-
export declare function getMaxVisibleItemsForTerminalRows({ rows, hardCap, reservedRows, minVisibleItems, }: ListViewportSizingOptions): number;
|
|
19
|
-
//# sourceMappingURL=overlaySizing.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"overlaySizing.d.ts","sourceRoot":"","sources":["../../../../src/cli/ink-cli/utils/overlaySizing.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,yBAAyB;IACtC,2BAA2B;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,gEAAgE;IAChE,OAAO,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,kDAAkD;IAClD,eAAe,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED;;;GAGG;AACH,wBAAgB,iCAAiC,CAAC,EAC9C,IAAI,EACJ,OAAO,EACP,YAAgB,EAChB,eAAmB,GACtB,EAAE,yBAAyB,GAAG,MAAM,CAOpC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Compute a safe "max visible items" count for list UIs so we don't render content that
|
|
3
|
-
* approaches/exceeds the terminal height (which can cause Ink to clear + redraw, i.e. flicker).
|
|
4
|
-
*/
|
|
5
|
-
export function getMaxVisibleItemsForTerminalRows({ rows, hardCap, reservedRows = 6, minVisibleItems = 1, }) {
|
|
6
|
-
const available = Math.max(0, rows - reservedRows);
|
|
7
|
-
if (available <= 0) {
|
|
8
|
-
return 1;
|
|
9
|
-
}
|
|
10
|
-
return Math.max(minVisibleItems, Math.min(hardCap, available));
|
|
11
|
-
}
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Sound Notification Utility
|
|
3
|
-
*
|
|
4
|
-
* Plays system sounds for CLI notifications like approval requests and task completion.
|
|
5
|
-
* Uses platform-specific commands with fallback to terminal bell.
|
|
6
|
-
*
|
|
7
|
-
* Sound files should be placed in the Dexto sounds directory (typically ~/.dexto/sounds/).
|
|
8
|
-
* In dexto source + DEXTO_DEV_MODE=true, this uses <repo>/.dexto/sounds/ for isolated dev.
|
|
9
|
-
*/
|
|
10
|
-
export type SoundType = 'startup' | 'approval' | 'complete';
|
|
11
|
-
export declare const CUSTOM_SOUND_EXTENSIONS: readonly [".wav", ".mp3", ".ogg", ".oga", ".aiff", ".m4a"];
|
|
12
|
-
export declare function getDefaultSoundSpec(soundType: SoundType): string | null;
|
|
13
|
-
export declare function playSoundFile(soundPath: string): void;
|
|
14
|
-
/**
|
|
15
|
-
* Play a notification sound
|
|
16
|
-
*
|
|
17
|
-
* @param soundType - Type of sound to play ('startup', 'approval', or 'complete')
|
|
18
|
-
*
|
|
19
|
-
* @example
|
|
20
|
-
* ```typescript
|
|
21
|
-
* // Play approval required sound
|
|
22
|
-
* playNotificationSound('approval');
|
|
23
|
-
*
|
|
24
|
-
* // Play task complete sound
|
|
25
|
-
* playNotificationSound('complete');
|
|
26
|
-
*
|
|
27
|
-
* // Play startup sound
|
|
28
|
-
* playNotificationSound('startup');
|
|
29
|
-
* ```
|
|
30
|
-
*/
|
|
31
|
-
export declare function playNotificationSound(soundType: SoundType, config?: SoundConfig): void;
|
|
32
|
-
/**
|
|
33
|
-
* Sound configuration interface
|
|
34
|
-
*
|
|
35
|
-
* Note: Default values are defined in PreferenceSoundsSchema (packages/agent-management/src/preferences/schemas.ts)
|
|
36
|
-
* which is the single source of truth for sound preferences.
|
|
37
|
-
*/
|
|
38
|
-
export interface SoundConfig {
|
|
39
|
-
enabled: boolean;
|
|
40
|
-
onStartup: boolean;
|
|
41
|
-
startupSoundFile?: string | undefined;
|
|
42
|
-
onApprovalRequired: boolean;
|
|
43
|
-
approvalSoundFile?: string | undefined;
|
|
44
|
-
onTaskComplete: boolean;
|
|
45
|
-
completeSoundFile?: string | undefined;
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* Sound notification service that respects configuration
|
|
49
|
-
*
|
|
50
|
-
* All fields are required - callers should provide complete config from preferences.
|
|
51
|
-
* Default values come from PreferenceSoundsSchema in @dexto/agent-management.
|
|
52
|
-
*/
|
|
53
|
-
export declare class SoundNotificationService {
|
|
54
|
-
private config;
|
|
55
|
-
constructor(config: SoundConfig);
|
|
56
|
-
/**
|
|
57
|
-
* Update configuration
|
|
58
|
-
*/
|
|
59
|
-
setConfig(config: Partial<SoundConfig>): void;
|
|
60
|
-
/**
|
|
61
|
-
* Get current configuration
|
|
62
|
-
*/
|
|
63
|
-
getConfig(): SoundConfig;
|
|
64
|
-
/**
|
|
65
|
-
* Play CLI startup sound if enabled
|
|
66
|
-
*/
|
|
67
|
-
playStartupSound(): void;
|
|
68
|
-
/**
|
|
69
|
-
* Play approval required sound if enabled
|
|
70
|
-
*/
|
|
71
|
-
playApprovalSound(): void;
|
|
72
|
-
/**
|
|
73
|
-
* Play task complete sound if enabled
|
|
74
|
-
*/
|
|
75
|
-
playCompleteSound(): void;
|
|
76
|
-
}
|
|
77
|
-
//# sourceMappingURL=soundNotification.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"soundNotification.d.ts","sourceRoot":"","sources":["../../../../src/cli/ink-cli/utils/soundNotification.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAQH,MAAM,MAAM,SAAS,GAAG,SAAS,GAAG,UAAU,GAAG,UAAU,CAAC;AAE5D,eAAO,MAAM,uBAAuB,4DAA6D,CAAC;AAsDlG,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,SAAS,GAAG,MAAM,GAAG,IAAI,CAOvE;AA2ED,wBAAgB,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAErD;AA4BD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,qBAAqB,CAAC,SAAS,EAAE,SAAS,EAAE,MAAM,CAAC,EAAE,WAAW,GAAG,IAAI,CAQtF;AAED;;;;;GAKG;AACH,MAAM,WAAW,WAAW;IACxB,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,OAAO,CAAC;IACnB,gBAAgB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACtC,kBAAkB,EAAE,OAAO,CAAC;IAC5B,iBAAiB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACvC,cAAc,EAAE,OAAO,CAAC;IACxB,iBAAiB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC1C;AAED;;;;;GAKG;AACH,qBAAa,wBAAwB;IACjC,OAAO,CAAC,MAAM,CAAc;gBAEhB,MAAM,EAAE,WAAW;IAI/B;;OAEG;IACH,SAAS,CAAC,MAAM,EAAE,OAAO,CAAC,WAAW,CAAC,GAAG,IAAI;IAI7C;;OAEG;IACH,SAAS,IAAI,WAAW;IAIxB;;OAEG;IACH,gBAAgB,IAAI,IAAI;IAMxB;;OAEG;IACH,iBAAiB,IAAI,IAAI;IAMzB;;OAEG;IACH,iBAAiB,IAAI,IAAI;CAK5B"}
|
|
@@ -1,226 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Sound Notification Utility
|
|
3
|
-
*
|
|
4
|
-
* Plays system sounds for CLI notifications like approval requests and task completion.
|
|
5
|
-
* Uses platform-specific commands with fallback to terminal bell.
|
|
6
|
-
*
|
|
7
|
-
* Sound files should be placed in the Dexto sounds directory (typically ~/.dexto/sounds/).
|
|
8
|
-
* In dexto source + DEXTO_DEV_MODE=true, this uses <repo>/.dexto/sounds/ for isolated dev.
|
|
9
|
-
*/
|
|
10
|
-
import { existsSync } from 'fs';
|
|
11
|
-
import { isAbsolute, normalize, resolve, sep } from 'path';
|
|
12
|
-
import { fileURLToPath } from 'node:url';
|
|
13
|
-
import { execFile } from 'child_process';
|
|
14
|
-
import { getDextoGlobalPath } from '@dexto/agent-management';
|
|
15
|
-
export const CUSTOM_SOUND_EXTENSIONS = ['.wav', '.mp3', '.ogg', '.oga', '.aiff', '.m4a'];
|
|
16
|
-
function getSoundFileKey(soundType) {
|
|
17
|
-
switch (soundType) {
|
|
18
|
-
case 'startup':
|
|
19
|
-
return 'startupSoundFile';
|
|
20
|
-
case 'approval':
|
|
21
|
-
return 'approvalSoundFile';
|
|
22
|
-
case 'complete':
|
|
23
|
-
return 'completeSoundFile';
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
function resolvePathWithinSoundsDir(soundPath) {
|
|
27
|
-
if (soundPath.trim().length === 0)
|
|
28
|
-
return null;
|
|
29
|
-
const soundsDir = normalize(getDextoGlobalPath('sounds'));
|
|
30
|
-
const resolved = isAbsolute(soundPath) ? normalize(soundPath) : resolve(soundsDir, soundPath);
|
|
31
|
-
if (resolved === soundsDir || resolved.startsWith(soundsDir + sep)) {
|
|
32
|
-
return resolved;
|
|
33
|
-
}
|
|
34
|
-
return null;
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* Platform-specific default sound paths
|
|
38
|
-
*/
|
|
39
|
-
const PLATFORM_SOUNDS = {
|
|
40
|
-
darwin: {
|
|
41
|
-
// macOS system sounds
|
|
42
|
-
approval: '/System/Library/Sounds/Blow.aiff',
|
|
43
|
-
complete: '/System/Library/Sounds/Glass.aiff',
|
|
44
|
-
},
|
|
45
|
-
linux: {
|
|
46
|
-
// Common Linux sound paths (freedesktop)
|
|
47
|
-
approval: '/usr/share/sounds/freedesktop/stereo/message-new-instant.oga',
|
|
48
|
-
complete: '/usr/share/sounds/freedesktop/stereo/complete.oga',
|
|
49
|
-
},
|
|
50
|
-
win32: {
|
|
51
|
-
// Windows system sounds (handled differently via PowerShell)
|
|
52
|
-
approval: 'SystemAsterisk',
|
|
53
|
-
complete: 'SystemHand',
|
|
54
|
-
},
|
|
55
|
-
};
|
|
56
|
-
const BUNDLED_STARTUP_SOUND_PATH = fileURLToPath(new URL('../../assets/sounds/startup.wav', import.meta.url));
|
|
57
|
-
export function getDefaultSoundSpec(soundType) {
|
|
58
|
-
if (soundType === 'startup') {
|
|
59
|
-
return BUNDLED_STARTUP_SOUND_PATH;
|
|
60
|
-
}
|
|
61
|
-
const platformSounds = PLATFORM_SOUNDS[process.platform];
|
|
62
|
-
return platformSounds?.[soundType] ?? null;
|
|
63
|
-
}
|
|
64
|
-
/**
|
|
65
|
-
* Play a sound file using platform-specific command
|
|
66
|
-
*/
|
|
67
|
-
function playSound(soundPath) {
|
|
68
|
-
const execOrBell = (cmd, args, onError) => {
|
|
69
|
-
execFile(cmd, args, { windowsHide: true }, (error) => {
|
|
70
|
-
if (!error)
|
|
71
|
-
return;
|
|
72
|
-
if (onError) {
|
|
73
|
-
onError();
|
|
74
|
-
return;
|
|
75
|
-
}
|
|
76
|
-
playTerminalBell();
|
|
77
|
-
});
|
|
78
|
-
};
|
|
79
|
-
switch (process.platform) {
|
|
80
|
-
case 'darwin': {
|
|
81
|
-
execOrBell('afplay', [soundPath]);
|
|
82
|
-
return;
|
|
83
|
-
}
|
|
84
|
-
case 'linux': {
|
|
85
|
-
const lowerSoundPath = soundPath.toLowerCase();
|
|
86
|
-
const isOgg = lowerSoundPath.endsWith('.oga') || lowerSoundPath.endsWith('.ogg');
|
|
87
|
-
if (isOgg) {
|
|
88
|
-
execOrBell('paplay', [soundPath], () => {
|
|
89
|
-
execOrBell('ogg123', ['-q', soundPath]);
|
|
90
|
-
});
|
|
91
|
-
}
|
|
92
|
-
else {
|
|
93
|
-
execOrBell('paplay', [soundPath], () => {
|
|
94
|
-
execOrBell('aplay', ['-q', soundPath]);
|
|
95
|
-
});
|
|
96
|
-
}
|
|
97
|
-
return;
|
|
98
|
-
}
|
|
99
|
-
case 'win32': {
|
|
100
|
-
// Windows: use PowerShell with System.Media.SystemSounds
|
|
101
|
-
// For Windows system sounds, soundPath is the sound name
|
|
102
|
-
if (['SystemAsterisk', 'SystemHand', 'SystemExclamation', 'SystemQuestion'].includes(soundPath)) {
|
|
103
|
-
const systemSoundName = soundPath.replace('System', '');
|
|
104
|
-
execOrBell('powershell', [
|
|
105
|
-
'-NoProfile',
|
|
106
|
-
'-NonInteractive',
|
|
107
|
-
'-Command',
|
|
108
|
-
`[System.Media.SystemSounds]::${systemSoundName}.Play()`,
|
|
109
|
-
]);
|
|
110
|
-
return;
|
|
111
|
-
}
|
|
112
|
-
// For custom files, use SoundPlayer
|
|
113
|
-
execOrBell('powershell', [
|
|
114
|
-
'-NoProfile',
|
|
115
|
-
'-NonInteractive',
|
|
116
|
-
'-Command',
|
|
117
|
-
'& { param([string]$p) (New-Object System.Media.SoundPlayer $p).PlaySync() }',
|
|
118
|
-
soundPath,
|
|
119
|
-
]);
|
|
120
|
-
return;
|
|
121
|
-
}
|
|
122
|
-
default: {
|
|
123
|
-
// Fallback: try to use terminal bell
|
|
124
|
-
playTerminalBell();
|
|
125
|
-
return;
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
export function playSoundFile(soundPath) {
|
|
130
|
-
playSound(soundPath);
|
|
131
|
-
}
|
|
132
|
-
/**
|
|
133
|
-
* Play terminal bell (works in most terminals)
|
|
134
|
-
*/
|
|
135
|
-
function playTerminalBell() {
|
|
136
|
-
process.stdout.write('\x07');
|
|
137
|
-
}
|
|
138
|
-
function resolveNotificationSoundSpec(soundType, config) {
|
|
139
|
-
const configuredRelativePath = config?.[getSoundFileKey(soundType)];
|
|
140
|
-
if (configuredRelativePath) {
|
|
141
|
-
const resolved = resolvePathWithinSoundsDir(configuredRelativePath);
|
|
142
|
-
if (resolved && existsSync(resolved)) {
|
|
143
|
-
return resolved;
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
const defaultSpec = getDefaultSoundSpec(soundType);
|
|
147
|
-
if (!defaultSpec)
|
|
148
|
-
return null;
|
|
149
|
-
if (process.platform === 'win32') {
|
|
150
|
-
return defaultSpec;
|
|
151
|
-
}
|
|
152
|
-
return existsSync(defaultSpec) ? defaultSpec : null;
|
|
153
|
-
}
|
|
154
|
-
/**
|
|
155
|
-
* Play a notification sound
|
|
156
|
-
*
|
|
157
|
-
* @param soundType - Type of sound to play ('startup', 'approval', or 'complete')
|
|
158
|
-
*
|
|
159
|
-
* @example
|
|
160
|
-
* ```typescript
|
|
161
|
-
* // Play approval required sound
|
|
162
|
-
* playNotificationSound('approval');
|
|
163
|
-
*
|
|
164
|
-
* // Play task complete sound
|
|
165
|
-
* playNotificationSound('complete');
|
|
166
|
-
*
|
|
167
|
-
* // Play startup sound
|
|
168
|
-
* playNotificationSound('startup');
|
|
169
|
-
* ```
|
|
170
|
-
*/
|
|
171
|
-
export function playNotificationSound(soundType, config) {
|
|
172
|
-
const soundSpec = resolveNotificationSoundSpec(soundType, config);
|
|
173
|
-
if (!soundSpec) {
|
|
174
|
-
playTerminalBell();
|
|
175
|
-
return;
|
|
176
|
-
}
|
|
177
|
-
playSound(soundSpec);
|
|
178
|
-
}
|
|
179
|
-
/**
|
|
180
|
-
* Sound notification service that respects configuration
|
|
181
|
-
*
|
|
182
|
-
* All fields are required - callers should provide complete config from preferences.
|
|
183
|
-
* Default values come from PreferenceSoundsSchema in @dexto/agent-management.
|
|
184
|
-
*/
|
|
185
|
-
export class SoundNotificationService {
|
|
186
|
-
config;
|
|
187
|
-
constructor(config) {
|
|
188
|
-
this.config = { ...config };
|
|
189
|
-
}
|
|
190
|
-
/**
|
|
191
|
-
* Update configuration
|
|
192
|
-
*/
|
|
193
|
-
setConfig(config) {
|
|
194
|
-
this.config = { ...this.config, ...config };
|
|
195
|
-
}
|
|
196
|
-
/**
|
|
197
|
-
* Get current configuration
|
|
198
|
-
*/
|
|
199
|
-
getConfig() {
|
|
200
|
-
return { ...this.config };
|
|
201
|
-
}
|
|
202
|
-
/**
|
|
203
|
-
* Play CLI startup sound if enabled
|
|
204
|
-
*/
|
|
205
|
-
playStartupSound() {
|
|
206
|
-
if (this.config.enabled && this.config.onStartup) {
|
|
207
|
-
playNotificationSound('startup', this.config);
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
/**
|
|
211
|
-
* Play approval required sound if enabled
|
|
212
|
-
*/
|
|
213
|
-
playApprovalSound() {
|
|
214
|
-
if (this.config.enabled && this.config.onApprovalRequired) {
|
|
215
|
-
playNotificationSound('approval', this.config);
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
/**
|
|
219
|
-
* Play task complete sound if enabled
|
|
220
|
-
*/
|
|
221
|
-
playCompleteSound() {
|
|
222
|
-
if (this.config.enabled && this.config.onTaskComplete) {
|
|
223
|
-
playNotificationSound('complete', this.config);
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Stream Splitter Utilities
|
|
3
|
-
*
|
|
4
|
-
* Provides markdown-aware splitting for streaming content to reduce flickering.
|
|
5
|
-
*
|
|
6
|
-
* Approach:
|
|
7
|
-
* - Find safe split points at paragraph boundaries (\n\n)
|
|
8
|
-
* - Protect code blocks from being split mid-block
|
|
9
|
-
* - Allow progressive finalization during streaming
|
|
10
|
-
*/
|
|
11
|
-
/**
|
|
12
|
-
* Find the last safe split point in the content.
|
|
13
|
-
*
|
|
14
|
-
* Safe split points are:
|
|
15
|
-
* 1. After paragraph breaks (\n\n) that are not inside code blocks
|
|
16
|
-
* 2. Before code blocks if we're inside one
|
|
17
|
-
*
|
|
18
|
-
* Returns the index to split at, or content.length if no split is needed.
|
|
19
|
-
*/
|
|
20
|
-
export declare function findLastSafeSplitPoint(content: string): number;
|
|
21
|
-
/**
|
|
22
|
-
* Find the last newline that's not inside a code block.
|
|
23
|
-
* Used for line-based batching.
|
|
24
|
-
*/
|
|
25
|
-
export declare function findLastSafeNewline(content: string): number;
|
|
26
|
-
/**
|
|
27
|
-
* Determines if content should be split for progressive finalization.
|
|
28
|
-
*
|
|
29
|
-
* Strategy:
|
|
30
|
-
* 1. First try paragraph splits (\n\n) for clean breaks
|
|
31
|
-
* 2. If content exceeds MAX_PENDING_LENGTH with no paragraph break,
|
|
32
|
-
* fall back to line-based splits (\n) to prevent flickering
|
|
33
|
-
*
|
|
34
|
-
* Returns:
|
|
35
|
-
* - { shouldSplit: false } if no split needed
|
|
36
|
-
* - { shouldSplit: true, splitIndex, before, after } if split found
|
|
37
|
-
*/
|
|
38
|
-
export declare function checkForSplit(content: string): {
|
|
39
|
-
shouldSplit: boolean;
|
|
40
|
-
splitIndex?: number;
|
|
41
|
-
before?: string;
|
|
42
|
-
after?: string;
|
|
43
|
-
};
|
|
44
|
-
//# sourceMappingURL=streamSplitter.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"streamSplitter.d.ts","sourceRoot":"","sources":["../../../../src/cli/ink-cli/utils/streamSplitter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAmDH;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CA2B9D;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAiB3D;AAcD;;;;;;;;;;;GAWG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG;IAC5C,WAAW,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB,CA+BA"}
|