dexto 1.6.1 → 1.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/analytics/wrapper.js +1 -1
- package/dist/cli/auth/dexto-api-key.d.ts +34 -0
- package/dist/cli/auth/dexto-api-key.d.ts.map +1 -0
- package/dist/cli/auth/dexto-api-key.js +161 -0
- package/dist/cli/auth/index.d.ts +2 -1
- package/dist/cli/auth/index.d.ts.map +1 -1
- package/dist/cli/auth/index.js +2 -1
- package/dist/cli/auth/oauth.d.ts +10 -0
- package/dist/cli/auth/oauth.d.ts.map +1 -1
- package/dist/cli/auth/oauth.js +113 -36
- package/dist/cli/auth/service.d.ts +1 -0
- package/dist/cli/auth/service.d.ts.map +1 -1
- package/dist/cli/auth/service.js +1 -0
- package/dist/cli/commands/auth/login.d.ts.map +1 -1
- package/dist/cli/commands/auth/login.js +40 -105
- package/dist/cli/commands/setup.d.ts.map +1 -1
- package/dist/cli/commands/setup.js +157 -120
- package/dist/cli/utils/config-validation.js +3 -3
- package/dist/cli/utils/options.d.ts.map +1 -1
- package/dist/cli/utils/options.js +6 -0
- package/dist/index-main.js +36 -2
- package/dist/webui/assets/index-BPlk2Wbt.css +1 -0
- package/dist/webui/assets/index-BZvrpxyh.js +2059 -0
- package/dist/webui/index.html +2 -2
- package/package.json +12 -22
- package/dist/cli/assets/sounds/SOURCES.md +0 -35
- package/dist/cli/assets/sounds/boot.wav +0 -0
- package/dist/cli/assets/sounds/chime.wav +0 -0
- package/dist/cli/assets/sounds/coin.wav +0 -0
- package/dist/cli/assets/sounds/confirm.wav +0 -0
- package/dist/cli/assets/sounds/levelup.wav +0 -0
- package/dist/cli/assets/sounds/ping.wav +0 -0
- package/dist/cli/assets/sounds/powerup.wav +0 -0
- package/dist/cli/assets/sounds/startup.wav +0 -0
- package/dist/cli/assets/sounds/success.wav +0 -0
- package/dist/cli/assets/sounds/treasure.wav +0 -0
- package/dist/cli/assets/sounds/win.wav +0 -0
- package/dist/cli/commands/interactive-commands/auth/index.d.ts +0 -12
- package/dist/cli/commands/interactive-commands/auth/index.d.ts.map +0 -1
- package/dist/cli/commands/interactive-commands/auth/index.js +0 -20
- package/dist/cli/commands/interactive-commands/command-parser.d.ts +0 -56
- package/dist/cli/commands/interactive-commands/command-parser.d.ts.map +0 -1
- package/dist/cli/commands/interactive-commands/command-parser.js +0 -173
- package/dist/cli/commands/interactive-commands/commands.d.ts +0 -52
- package/dist/cli/commands/interactive-commands/commands.d.ts.map +0 -1
- package/dist/cli/commands/interactive-commands/commands.js +0 -142
- package/dist/cli/commands/interactive-commands/documentation-commands.d.ts +0 -15
- package/dist/cli/commands/interactive-commands/documentation-commands.d.ts.map +0 -1
- package/dist/cli/commands/interactive-commands/documentation-commands.js +0 -39
- package/dist/cli/commands/interactive-commands/exit-handler.d.ts +0 -12
- package/dist/cli/commands/interactive-commands/exit-handler.d.ts.map +0 -1
- package/dist/cli/commands/interactive-commands/exit-handler.js +0 -20
- package/dist/cli/commands/interactive-commands/exit-stats.d.ts +0 -24
- package/dist/cli/commands/interactive-commands/exit-stats.d.ts.map +0 -1
- package/dist/cli/commands/interactive-commands/exit-stats.js +0 -17
- package/dist/cli/commands/interactive-commands/export/index.d.ts +0 -13
- package/dist/cli/commands/interactive-commands/export/index.d.ts.map +0 -1
- package/dist/cli/commands/interactive-commands/export/index.js +0 -21
- package/dist/cli/commands/interactive-commands/general-commands.d.ts +0 -22
- package/dist/cli/commands/interactive-commands/general-commands.d.ts.map +0 -1
- package/dist/cli/commands/interactive-commands/general-commands.js +0 -508
- package/dist/cli/commands/interactive-commands/mcp/index.d.ts +0 -13
- package/dist/cli/commands/interactive-commands/mcp/index.d.ts.map +0 -1
- package/dist/cli/commands/interactive-commands/mcp/index.js +0 -18
- package/dist/cli/commands/interactive-commands/model/index.d.ts +0 -13
- package/dist/cli/commands/interactive-commands/model/index.d.ts.map +0 -1
- package/dist/cli/commands/interactive-commands/model/index.js +0 -19
- package/dist/cli/commands/interactive-commands/plugin/index.d.ts +0 -13
- package/dist/cli/commands/interactive-commands/plugin/index.d.ts.map +0 -1
- package/dist/cli/commands/interactive-commands/plugin/index.js +0 -18
- package/dist/cli/commands/interactive-commands/prompt-commands.d.ts +0 -25
- package/dist/cli/commands/interactive-commands/prompt-commands.d.ts.map +0 -1
- package/dist/cli/commands/interactive-commands/prompt-commands.js +0 -284
- package/dist/cli/commands/interactive-commands/session/index.d.ts +0 -16
- package/dist/cli/commands/interactive-commands/session/index.d.ts.map +0 -1
- package/dist/cli/commands/interactive-commands/session/index.js +0 -15
- package/dist/cli/commands/interactive-commands/session/session-commands.d.ts +0 -32
- package/dist/cli/commands/interactive-commands/session/session-commands.d.ts.map +0 -1
- package/dist/cli/commands/interactive-commands/session/session-commands.js +0 -65
- package/dist/cli/commands/interactive-commands/system/index.d.ts +0 -13
- package/dist/cli/commands/interactive-commands/system/index.d.ts.map +0 -1
- package/dist/cli/commands/interactive-commands/system/index.js +0 -12
- package/dist/cli/commands/interactive-commands/system/system-commands.d.ts +0 -6
- package/dist/cli/commands/interactive-commands/system/system-commands.d.ts.map +0 -1
- package/dist/cli/commands/interactive-commands/system/system-commands.js +0 -188
- package/dist/cli/commands/interactive-commands/tool-commands.d.ts +0 -15
- package/dist/cli/commands/interactive-commands/tool-commands.d.ts.map +0 -1
- package/dist/cli/commands/interactive-commands/tool-commands.js +0 -24
- package/dist/cli/commands/interactive-commands/utils/arg-parser.d.ts +0 -57
- package/dist/cli/commands/interactive-commands/utils/arg-parser.d.ts.map +0 -1
- package/dist/cli/commands/interactive-commands/utils/arg-parser.js +0 -81
- package/dist/cli/commands/interactive-commands/utils/command-output.d.ts +0 -40
- package/dist/cli/commands/interactive-commands/utils/command-output.d.ts.map +0 -1
- package/dist/cli/commands/interactive-commands/utils/command-output.js +0 -56
- package/dist/cli/commands/interactive-commands/utils/format-output.d.ts +0 -14
- package/dist/cli/commands/interactive-commands/utils/format-output.d.ts.map +0 -1
- package/dist/cli/commands/interactive-commands/utils/format-output.js +0 -18
- package/dist/cli/ink-cli/InkCLIRefactored.d.ts +0 -52
- package/dist/cli/ink-cli/InkCLIRefactored.d.ts.map +0 -1
- package/dist/cli/ink-cli/InkCLIRefactored.js +0 -231
- package/dist/cli/ink-cli/components/ApprovalPrompt.d.ts +0 -44
- package/dist/cli/ink-cli/components/ApprovalPrompt.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/ApprovalPrompt.js +0 -323
- package/dist/cli/ink-cli/components/BackgroundTasksPanel.d.ts +0 -18
- package/dist/cli/ink-cli/components/BackgroundTasksPanel.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/BackgroundTasksPanel.js +0 -48
- package/dist/cli/ink-cli/components/CustomInput.d.ts +0 -17
- package/dist/cli/ink-cli/components/CustomInput.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/CustomInput.js +0 -51
- package/dist/cli/ink-cli/components/CustomTextInput.d.ts +0 -16
- package/dist/cli/ink-cli/components/CustomTextInput.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/CustomTextInput.js +0 -36
- package/dist/cli/ink-cli/components/EditableMultiLineInput.d.ts +0 -19
- package/dist/cli/ink-cli/components/EditableMultiLineInput.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/EditableMultiLineInput.js +0 -120
- package/dist/cli/ink-cli/components/ElicitationForm.d.ts +0 -24
- package/dist/cli/ink-cli/components/ElicitationForm.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/ElicitationForm.js +0 -592
- package/dist/cli/ink-cli/components/ErrorBoundary.d.ts +0 -20
- package/dist/cli/ink-cli/components/ErrorBoundary.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/ErrorBoundary.js +0 -29
- package/dist/cli/ink-cli/components/Footer.d.ts +0 -22
- package/dist/cli/ink-cli/components/Footer.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/Footer.js +0 -76
- package/dist/cli/ink-cli/components/HistorySearchBar.d.ts +0 -17
- package/dist/cli/ink-cli/components/HistorySearchBar.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/HistorySearchBar.js +0 -8
- package/dist/cli/ink-cli/components/MultiLineInput.d.ts +0 -12
- package/dist/cli/ink-cli/components/MultiLineInput.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/MultiLineInput.js +0 -27
- package/dist/cli/ink-cli/components/ResourceAutocomplete.d.ts +0 -26
- package/dist/cli/ink-cli/components/ResourceAutocomplete.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/ResourceAutocomplete.js +0 -385
- package/dist/cli/ink-cli/components/SlashCommandAutocomplete.d.ts +0 -28
- package/dist/cli/ink-cli/components/SlashCommandAutocomplete.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/SlashCommandAutocomplete.js +0 -412
- package/dist/cli/ink-cli/components/StatusBar.d.ts +0 -41
- package/dist/cli/ink-cli/components/StatusBar.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/StatusBar.js +0 -116
- package/dist/cli/ink-cli/components/TextBufferInput.d.ts +0 -52
- package/dist/cli/ink-cli/components/TextBufferInput.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/TextBufferInput.js +0 -490
- package/dist/cli/ink-cli/components/TodoPanel.d.ts +0 -26
- package/dist/cli/ink-cli/components/TodoPanel.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/TodoPanel.js +0 -62
- package/dist/cli/ink-cli/components/base/BaseAutocomplete.d.ts +0 -29
- package/dist/cli/ink-cli/components/base/BaseAutocomplete.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/base/BaseAutocomplete.js +0 -98
- package/dist/cli/ink-cli/components/base/BaseSelector.d.ts +0 -37
- package/dist/cli/ink-cli/components/base/BaseSelector.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/base/BaseSelector.js +0 -128
- package/dist/cli/ink-cli/components/base/index.d.ts +0 -6
- package/dist/cli/ink-cli/components/base/index.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/base/index.js +0 -5
- package/dist/cli/ink-cli/components/chat/ChatView.d.ts +0 -19
- package/dist/cli/ink-cli/components/chat/ChatView.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/chat/ChatView.js +0 -11
- package/dist/cli/ink-cli/components/chat/Footer.d.ts +0 -9
- package/dist/cli/ink-cli/components/chat/Footer.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/chat/Footer.js +0 -8
- package/dist/cli/ink-cli/components/chat/Header.d.ts +0 -18
- package/dist/cli/ink-cli/components/chat/Header.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/chat/Header.js +0 -16
- package/dist/cli/ink-cli/components/chat/MessageItem.d.ts +0 -21
- package/dist/cli/ink-cli/components/chat/MessageItem.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/chat/MessageItem.js +0 -182
- package/dist/cli/ink-cli/components/chat/MessageList.d.ts +0 -16
- package/dist/cli/ink-cli/components/chat/MessageList.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/chat/MessageList.js +0 -20
- package/dist/cli/ink-cli/components/chat/QueuedMessagesDisplay.d.ts +0 -16
- package/dist/cli/ink-cli/components/chat/QueuedMessagesDisplay.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/chat/QueuedMessagesDisplay.js +0 -27
- package/dist/cli/ink-cli/components/chat/ToolIcon.d.ts +0 -18
- package/dist/cli/ink-cli/components/chat/ToolIcon.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/chat/ToolIcon.js +0 -36
- package/dist/cli/ink-cli/components/chat/index.d.ts +0 -10
- package/dist/cli/ink-cli/components/chat/index.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/chat/index.js +0 -9
- package/dist/cli/ink-cli/components/chat/styled-boxes/ConfigBox.d.ts +0 -10
- package/dist/cli/ink-cli/components/chat/styled-boxes/ConfigBox.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/chat/styled-boxes/ConfigBox.js +0 -6
- package/dist/cli/ink-cli/components/chat/styled-boxes/HelpBox.d.ts +0 -10
- package/dist/cli/ink-cli/components/chat/styled-boxes/HelpBox.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/chat/styled-boxes/HelpBox.js +0 -15
- package/dist/cli/ink-cli/components/chat/styled-boxes/LogConfigBox.d.ts +0 -10
- package/dist/cli/ink-cli/components/chat/styled-boxes/LogConfigBox.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/chat/styled-boxes/LogConfigBox.js +0 -9
- package/dist/cli/ink-cli/components/chat/styled-boxes/SessionHistoryBox.d.ts +0 -10
- package/dist/cli/ink-cli/components/chat/styled-boxes/SessionHistoryBox.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/chat/styled-boxes/SessionHistoryBox.js +0 -37
- package/dist/cli/ink-cli/components/chat/styled-boxes/SessionListBox.d.ts +0 -10
- package/dist/cli/ink-cli/components/chat/styled-boxes/SessionListBox.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/chat/styled-boxes/SessionListBox.js +0 -9
- package/dist/cli/ink-cli/components/chat/styled-boxes/ShortcutsBox.d.ts +0 -10
- package/dist/cli/ink-cli/components/chat/styled-boxes/ShortcutsBox.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/chat/styled-boxes/ShortcutsBox.js +0 -6
- package/dist/cli/ink-cli/components/chat/styled-boxes/StatsBox.d.ts +0 -10
- package/dist/cli/ink-cli/components/chat/styled-boxes/StatsBox.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/chat/styled-boxes/StatsBox.js +0 -29
- package/dist/cli/ink-cli/components/chat/styled-boxes/StyledBox.d.ts +0 -45
- package/dist/cli/ink-cli/components/chat/styled-boxes/StyledBox.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/chat/styled-boxes/StyledBox.js +0 -38
- package/dist/cli/ink-cli/components/chat/styled-boxes/SyspromptBox.d.ts +0 -10
- package/dist/cli/ink-cli/components/chat/styled-boxes/SyspromptBox.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/chat/styled-boxes/SyspromptBox.js +0 -6
- package/dist/cli/ink-cli/components/chat/styled-boxes/index.d.ts +0 -13
- package/dist/cli/ink-cli/components/chat/styled-boxes/index.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/chat/styled-boxes/index.js +0 -12
- package/dist/cli/ink-cli/components/input/InputArea.d.ts +0 -46
- package/dist/cli/ink-cli/components/input/InputArea.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/input/InputArea.js +0 -6
- package/dist/cli/ink-cli/components/input/index.d.ts +0 -5
- package/dist/cli/ink-cli/components/input/index.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/input/index.js +0 -4
- package/dist/cli/ink-cli/components/modes/AlternateBufferCLI.d.ts +0 -27
- package/dist/cli/ink-cli/components/modes/AlternateBufferCLI.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/modes/AlternateBufferCLI.js +0 -182
- package/dist/cli/ink-cli/components/modes/StaticCLI.d.ts +0 -29
- package/dist/cli/ink-cli/components/modes/StaticCLI.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/modes/StaticCLI.js +0 -114
- package/dist/cli/ink-cli/components/modes/index.d.ts +0 -10
- package/dist/cli/ink-cli/components/modes/index.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/modes/index.js +0 -9
- package/dist/cli/ink-cli/components/overlays/ApiKeyInput.d.ts +0 -26
- package/dist/cli/ink-cli/components/overlays/ApiKeyInput.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/overlays/ApiKeyInput.js +0 -92
- package/dist/cli/ink-cli/components/overlays/CommandOutputOverlay.d.ts +0 -13
- package/dist/cli/ink-cli/components/overlays/CommandOutputOverlay.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/overlays/CommandOutputOverlay.js +0 -60
- package/dist/cli/ink-cli/components/overlays/ContextStatsOverlay.d.ts +0 -26
- package/dist/cli/ink-cli/components/overlays/ContextStatsOverlay.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/overlays/ContextStatsOverlay.js +0 -241
- package/dist/cli/ink-cli/components/overlays/CustomModelWizard.d.ts +0 -29
- package/dist/cli/ink-cli/components/overlays/CustomModelWizard.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/overlays/CustomModelWizard.js +0 -301
- package/dist/cli/ink-cli/components/overlays/ExportWizard.d.ts +0 -22
- package/dist/cli/ink-cli/components/overlays/ExportWizard.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/overlays/ExportWizard.js +0 -308
- package/dist/cli/ink-cli/components/overlays/LogLevelSelector.d.ts +0 -23
- package/dist/cli/ink-cli/components/overlays/LogLevelSelector.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/overlays/LogLevelSelector.js +0 -70
- package/dist/cli/ink-cli/components/overlays/MarketplaceAddPrompt.d.ts +0 -20
- package/dist/cli/ink-cli/components/overlays/MarketplaceAddPrompt.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/overlays/MarketplaceAddPrompt.js +0 -81
- package/dist/cli/ink-cli/components/overlays/MarketplaceBrowser.d.ts +0 -31
- package/dist/cli/ink-cli/components/overlays/MarketplaceBrowser.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/overlays/MarketplaceBrowser.js +0 -297
- package/dist/cli/ink-cli/components/overlays/McpAddChoice.d.ts +0 -22
- package/dist/cli/ink-cli/components/overlays/McpAddChoice.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/overlays/McpAddChoice.js +0 -59
- package/dist/cli/ink-cli/components/overlays/McpAddSelector.d.ts +0 -26
- package/dist/cli/ink-cli/components/overlays/McpAddSelector.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/overlays/McpAddSelector.js +0 -73
- package/dist/cli/ink-cli/components/overlays/McpCustomTypeSelector.d.ts +0 -21
- package/dist/cli/ink-cli/components/overlays/McpCustomTypeSelector.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/overlays/McpCustomTypeSelector.js +0 -51
- package/dist/cli/ink-cli/components/overlays/McpCustomWizard.d.ts +0 -29
- package/dist/cli/ink-cli/components/overlays/McpCustomWizard.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/overlays/McpCustomWizard.js +0 -215
- package/dist/cli/ink-cli/components/overlays/McpRemoveSelector.d.ts +0 -22
- package/dist/cli/ink-cli/components/overlays/McpRemoveSelector.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/overlays/McpRemoveSelector.js +0 -80
- package/dist/cli/ink-cli/components/overlays/McpSelector.d.ts +0 -21
- package/dist/cli/ink-cli/components/overlays/McpSelector.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/overlays/McpSelector.js +0 -52
- package/dist/cli/ink-cli/components/overlays/McpServerActions.d.ts +0 -28
- package/dist/cli/ink-cli/components/overlays/McpServerActions.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/overlays/McpServerActions.js +0 -93
- package/dist/cli/ink-cli/components/overlays/McpServerList.d.ts +0 -29
- package/dist/cli/ink-cli/components/overlays/McpServerList.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/overlays/McpServerList.js +0 -116
- package/dist/cli/ink-cli/components/overlays/ModelSelectorRefactored.d.ts +0 -28
- package/dist/cli/ink-cli/components/overlays/ModelSelectorRefactored.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/overlays/ModelSelectorRefactored.js +0 -743
- package/dist/cli/ink-cli/components/overlays/PluginActions.d.ts +0 -27
- package/dist/cli/ink-cli/components/overlays/PluginActions.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/overlays/PluginActions.js +0 -66
- package/dist/cli/ink-cli/components/overlays/PluginList.d.ts +0 -21
- package/dist/cli/ink-cli/components/overlays/PluginList.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/overlays/PluginList.js +0 -70
- package/dist/cli/ink-cli/components/overlays/PluginManager.d.ts +0 -21
- package/dist/cli/ink-cli/components/overlays/PluginManager.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/overlays/PluginManager.js +0 -63
- package/dist/cli/ink-cli/components/overlays/PromptAddChoice.d.ts +0 -22
- package/dist/cli/ink-cli/components/overlays/PromptAddChoice.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/overlays/PromptAddChoice.js +0 -52
- package/dist/cli/ink-cli/components/overlays/PromptAddWizard.d.ts +0 -29
- package/dist/cli/ink-cli/components/overlays/PromptAddWizard.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/overlays/PromptAddWizard.js +0 -166
- package/dist/cli/ink-cli/components/overlays/PromptDeleteSelector.d.ts +0 -27
- package/dist/cli/ink-cli/components/overlays/PromptDeleteSelector.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/overlays/PromptDeleteSelector.js +0 -119
- package/dist/cli/ink-cli/components/overlays/PromptList.d.ts +0 -33
- package/dist/cli/ink-cli/components/overlays/PromptList.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/overlays/PromptList.js +0 -143
- package/dist/cli/ink-cli/components/overlays/SearchOverlay.d.ts +0 -23
- package/dist/cli/ink-cli/components/overlays/SearchOverlay.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/overlays/SearchOverlay.js +0 -189
- package/dist/cli/ink-cli/components/overlays/SessionRenameOverlay.d.ts +0 -21
- package/dist/cli/ink-cli/components/overlays/SessionRenameOverlay.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/overlays/SessionRenameOverlay.js +0 -63
- package/dist/cli/ink-cli/components/overlays/SessionSelectorRefactored.d.ts +0 -26
- package/dist/cli/ink-cli/components/overlays/SessionSelectorRefactored.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/overlays/SessionSelectorRefactored.js +0 -126
- package/dist/cli/ink-cli/components/overlays/SessionSubcommandSelector.d.ts +0 -21
- package/dist/cli/ink-cli/components/overlays/SessionSubcommandSelector.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/overlays/SessionSubcommandSelector.js +0 -42
- package/dist/cli/ink-cli/components/overlays/SoundsSelector.d.ts +0 -21
- package/dist/cli/ink-cli/components/overlays/SoundsSelector.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/overlays/SoundsSelector.js +0 -566
- package/dist/cli/ink-cli/components/overlays/StreamSelector.d.ts +0 -20
- package/dist/cli/ink-cli/components/overlays/StreamSelector.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/overlays/StreamSelector.js +0 -58
- package/dist/cli/ink-cli/components/overlays/ToolBrowser.d.ts +0 -26
- package/dist/cli/ink-cli/components/overlays/ToolBrowser.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/overlays/ToolBrowser.js +0 -697
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/LocalModelWizard.d.ts +0 -25
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/LocalModelWizard.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/LocalModelWizard.js +0 -604
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/index.d.ts +0 -15
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/index.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/index.js +0 -14
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/provider-config.d.ts +0 -42
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/provider-config.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/provider-config.js +0 -547
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/ApiKeyStep.d.ts +0 -25
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/ApiKeyStep.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/ApiKeyStep.js +0 -29
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/ProviderSelector.d.ts +0 -17
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/ProviderSelector.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/ProviderSelector.js +0 -11
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/SetupInfoBanner.d.ts +0 -20
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/SetupInfoBanner.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/SetupInfoBanner.js +0 -10
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/WizardStepInput.d.ts +0 -30
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/WizardStepInput.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/WizardStepInput.js +0 -13
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/index.d.ts +0 -8
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/index.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/index.js +0 -7
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/types.d.ts +0 -85
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/types.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/types.js +0 -38
- package/dist/cli/ink-cli/components/renderers/DiffRenderer.d.ts +0 -21
- package/dist/cli/ink-cli/components/renderers/DiffRenderer.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/renderers/DiffRenderer.js +0 -65
- package/dist/cli/ink-cli/components/renderers/FilePreviewRenderer.d.ts +0 -30
- package/dist/cli/ink-cli/components/renderers/FilePreviewRenderer.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/renderers/FilePreviewRenderer.js +0 -67
- package/dist/cli/ink-cli/components/renderers/FileRenderer.d.ts +0 -21
- package/dist/cli/ink-cli/components/renderers/FileRenderer.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/renderers/FileRenderer.js +0 -37
- package/dist/cli/ink-cli/components/renderers/GenericRenderer.d.ts +0 -21
- package/dist/cli/ink-cli/components/renderers/GenericRenderer.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/renderers/GenericRenderer.js +0 -26
- package/dist/cli/ink-cli/components/renderers/SearchRenderer.d.ts +0 -20
- package/dist/cli/ink-cli/components/renderers/SearchRenderer.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/renderers/SearchRenderer.js +0 -26
- package/dist/cli/ink-cli/components/renderers/ShellRenderer.d.ts +0 -21
- package/dist/cli/ink-cli/components/renderers/ShellRenderer.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/renderers/ShellRenderer.js +0 -15
- package/dist/cli/ink-cli/components/renderers/diff-shared.d.ts +0 -61
- package/dist/cli/ink-cli/components/renderers/diff-shared.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/renderers/diff-shared.js +0 -158
- package/dist/cli/ink-cli/components/renderers/index.d.ts +0 -28
- package/dist/cli/ink-cli/components/renderers/index.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/renderers/index.js +0 -36
- package/dist/cli/ink-cli/components/shared/FocusOverlayFrame.d.ts +0 -7
- package/dist/cli/ink-cli/components/shared/FocusOverlayFrame.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/shared/FocusOverlayFrame.js +0 -8
- package/dist/cli/ink-cli/components/shared/HintBar.d.ts +0 -6
- package/dist/cli/ink-cli/components/shared/HintBar.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/shared/HintBar.js +0 -6
- package/dist/cli/ink-cli/components/shared/MarkdownText.d.ts +0 -38
- package/dist/cli/ink-cli/components/shared/MarkdownText.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/shared/MarkdownText.js +0 -389
- package/dist/cli/ink-cli/components/shared/VirtualizedList.d.ts +0 -44
- package/dist/cli/ink-cli/components/shared/VirtualizedList.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/shared/VirtualizedList.js +0 -300
- package/dist/cli/ink-cli/components/shared/text-buffer.d.ts +0 -185
- package/dist/cli/ink-cli/components/shared/text-buffer.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/shared/text-buffer.js +0 -1338
- package/dist/cli/ink-cli/constants/processingPhrases.d.ts +0 -10
- package/dist/cli/ink-cli/constants/processingPhrases.d.ts.map +0 -1
- package/dist/cli/ink-cli/constants/processingPhrases.js +0 -92
- package/dist/cli/ink-cli/constants/spinnerFrames.d.ts +0 -2
- package/dist/cli/ink-cli/constants/spinnerFrames.d.ts.map +0 -1
- package/dist/cli/ink-cli/constants/spinnerFrames.js +0 -1
- package/dist/cli/ink-cli/constants/tips.d.ts +0 -15
- package/dist/cli/ink-cli/constants/tips.d.ts.map +0 -1
- package/dist/cli/ink-cli/constants/tips.js +0 -58
- package/dist/cli/ink-cli/containers/InputContainer.d.ts +0 -62
- package/dist/cli/ink-cli/containers/InputContainer.d.ts.map +0 -1
- package/dist/cli/ink-cli/containers/InputContainer.js +0 -643
- package/dist/cli/ink-cli/containers/OverlayContainer.d.ts +0 -42
- package/dist/cli/ink-cli/containers/OverlayContainer.d.ts.map +0 -1
- package/dist/cli/ink-cli/containers/OverlayContainer.js +0 -1840
- package/dist/cli/ink-cli/containers/index.d.ts +0 -6
- package/dist/cli/ink-cli/containers/index.d.ts.map +0 -1
- package/dist/cli/ink-cli/containers/index.js +0 -5
- package/dist/cli/ink-cli/contexts/KeypressContext.d.ts +0 -36
- package/dist/cli/ink-cli/contexts/KeypressContext.d.ts.map +0 -1
- package/dist/cli/ink-cli/contexts/KeypressContext.js +0 -461
- package/dist/cli/ink-cli/contexts/MouseContext.d.ts +0 -27
- package/dist/cli/ink-cli/contexts/MouseContext.d.ts.map +0 -1
- package/dist/cli/ink-cli/contexts/MouseContext.js +0 -102
- package/dist/cli/ink-cli/contexts/ScrollProvider.d.ts +0 -33
- package/dist/cli/ink-cli/contexts/ScrollProvider.d.ts.map +0 -1
- package/dist/cli/ink-cli/contexts/ScrollProvider.js +0 -170
- package/dist/cli/ink-cli/contexts/SoundContext.d.ts +0 -23
- package/dist/cli/ink-cli/contexts/SoundContext.d.ts.map +0 -1
- package/dist/cli/ink-cli/contexts/SoundContext.js +0 -22
- package/dist/cli/ink-cli/contexts/index.d.ts +0 -8
- package/dist/cli/ink-cli/contexts/index.d.ts.map +0 -1
- package/dist/cli/ink-cli/contexts/index.js +0 -7
- package/dist/cli/ink-cli/hooks/index.d.ts +0 -12
- package/dist/cli/ink-cli/hooks/index.d.ts.map +0 -1
- package/dist/cli/ink-cli/hooks/index.js +0 -14
- package/dist/cli/ink-cli/hooks/useAgentEvents.d.ts +0 -49
- package/dist/cli/ink-cli/hooks/useAgentEvents.d.ts.map +0 -1
- package/dist/cli/ink-cli/hooks/useAgentEvents.js +0 -369
- package/dist/cli/ink-cli/hooks/useAnimationTick.d.ts +0 -11
- package/dist/cli/ink-cli/hooks/useAnimationTick.d.ts.map +0 -1
- package/dist/cli/ink-cli/hooks/useAnimationTick.js +0 -54
- package/dist/cli/ink-cli/hooks/useBatchedScroll.d.ts +0 -14
- package/dist/cli/ink-cli/hooks/useBatchedScroll.d.ts.map +0 -1
- package/dist/cli/ink-cli/hooks/useBatchedScroll.js +0 -25
- package/dist/cli/ink-cli/hooks/useCLIState.d.ts +0 -52
- package/dist/cli/ink-cli/hooks/useCLIState.d.ts.map +0 -1
- package/dist/cli/ink-cli/hooks/useCLIState.js +0 -224
- package/dist/cli/ink-cli/hooks/useElapsedTime.d.ts +0 -24
- package/dist/cli/ink-cli/hooks/useElapsedTime.d.ts.map +0 -1
- package/dist/cli/ink-cli/hooks/useElapsedTime.js +0 -69
- package/dist/cli/ink-cli/hooks/useGitBranch.d.ts +0 -13
- package/dist/cli/ink-cli/hooks/useGitBranch.d.ts.map +0 -1
- package/dist/cli/ink-cli/hooks/useGitBranch.js +0 -35
- package/dist/cli/ink-cli/hooks/useHistorySearch.d.ts +0 -61
- package/dist/cli/ink-cli/hooks/useHistorySearch.d.ts.map +0 -1
- package/dist/cli/ink-cli/hooks/useHistorySearch.js +0 -210
- package/dist/cli/ink-cli/hooks/useInputHistory.d.ts +0 -18
- package/dist/cli/ink-cli/hooks/useInputHistory.d.ts.map +0 -1
- package/dist/cli/ink-cli/hooks/useInputHistory.js +0 -26
- package/dist/cli/ink-cli/hooks/useInputOrchestrator.d.ts +0 -136
- package/dist/cli/ink-cli/hooks/useInputOrchestrator.d.ts.map +0 -1
- package/dist/cli/ink-cli/hooks/useInputOrchestrator.js +0 -715
- package/dist/cli/ink-cli/hooks/useKeyboardShortcuts.d.ts +0 -21
- package/dist/cli/ink-cli/hooks/useKeyboardShortcuts.d.ts.map +0 -1
- package/dist/cli/ink-cli/hooks/useKeyboardShortcuts.js +0 -80
- package/dist/cli/ink-cli/hooks/useKeypress.d.ts +0 -18
- package/dist/cli/ink-cli/hooks/useKeypress.d.ts.map +0 -1
- package/dist/cli/ink-cli/hooks/useKeypress.js +0 -26
- package/dist/cli/ink-cli/hooks/usePhraseCycler.d.ts +0 -30
- package/dist/cli/ink-cli/hooks/usePhraseCycler.d.ts.map +0 -1
- package/dist/cli/ink-cli/hooks/usePhraseCycler.js +0 -68
- package/dist/cli/ink-cli/hooks/useStreaming.d.ts +0 -19
- package/dist/cli/ink-cli/hooks/useStreaming.d.ts.map +0 -1
- package/dist/cli/ink-cli/hooks/useStreaming.js +0 -26
- package/dist/cli/ink-cli/hooks/useTerminalSize.d.ts +0 -14
- package/dist/cli/ink-cli/hooks/useTerminalSize.d.ts.map +0 -1
- package/dist/cli/ink-cli/hooks/useTerminalSize.js +0 -31
- package/dist/cli/ink-cli/hooks/useTokenCounter.d.ts +0 -46
- package/dist/cli/ink-cli/hooks/useTokenCounter.d.ts.map +0 -1
- package/dist/cli/ink-cli/hooks/useTokenCounter.js +0 -122
- package/dist/cli/ink-cli/services/CommandService.d.ts +0 -58
- package/dist/cli/ink-cli/services/CommandService.d.ts.map +0 -1
- package/dist/cli/ink-cli/services/CommandService.js +0 -64
- package/dist/cli/ink-cli/services/InputService.d.ts +0 -40
- package/dist/cli/ink-cli/services/InputService.d.ts.map +0 -1
- package/dist/cli/ink-cli/services/InputService.js +0 -87
- package/dist/cli/ink-cli/services/MessageService.d.ts +0 -35
- package/dist/cli/ink-cli/services/MessageService.d.ts.map +0 -1
- package/dist/cli/ink-cli/services/MessageService.js +0 -49
- package/dist/cli/ink-cli/services/index.d.ts +0 -8
- package/dist/cli/ink-cli/services/index.d.ts.map +0 -1
- package/dist/cli/ink-cli/services/index.js +0 -7
- package/dist/cli/ink-cli/services/processStream.d.ts +0 -75
- package/dist/cli/ink-cli/services/processStream.d.ts.map +0 -1
- package/dist/cli/ink-cli/services/processStream.js +0 -951
- package/dist/cli/ink-cli/state/actions.d.ts +0 -124
- package/dist/cli/ink-cli/state/actions.d.ts.map +0 -1
- package/dist/cli/ink-cli/state/actions.js +0 -8
- package/dist/cli/ink-cli/state/index.d.ts +0 -10
- package/dist/cli/ink-cli/state/index.d.ts.map +0 -1
- package/dist/cli/ink-cli/state/index.js +0 -8
- package/dist/cli/ink-cli/state/initialState.d.ts +0 -12
- package/dist/cli/ink-cli/state/initialState.d.ts.map +0 -1
- package/dist/cli/ink-cli/state/initialState.js +0 -58
- package/dist/cli/ink-cli/state/reducer.d.ts +0 -15
- package/dist/cli/ink-cli/state/reducer.d.ts.map +0 -1
- package/dist/cli/ink-cli/state/reducer.js +0 -341
- package/dist/cli/ink-cli/state/streaming-state.d.ts +0 -27
- package/dist/cli/ink-cli/state/streaming-state.d.ts.map +0 -1
- package/dist/cli/ink-cli/state/streaming-state.js +0 -39
- package/dist/cli/ink-cli/state/types.d.ts +0 -378
- package/dist/cli/ink-cli/state/types.d.ts.map +0 -1
- package/dist/cli/ink-cli/state/types.js +0 -5
- package/dist/cli/ink-cli/utils/bracketedPaste.d.ts +0 -22
- package/dist/cli/ink-cli/utils/bracketedPaste.d.ts.map +0 -1
- package/dist/cli/ink-cli/utils/bracketedPaste.js +0 -27
- package/dist/cli/ink-cli/utils/clipboardUtils.d.ts +0 -49
- package/dist/cli/ink-cli/utils/clipboardUtils.d.ts.map +0 -1
- package/dist/cli/ink-cli/utils/clipboardUtils.js +0 -356
- package/dist/cli/ink-cli/utils/commandOverlays.d.ts +0 -33
- package/dist/cli/ink-cli/utils/commandOverlays.d.ts.map +0 -1
- package/dist/cli/ink-cli/utils/commandOverlays.js +0 -85
- package/dist/cli/ink-cli/utils/debugLog.d.ts +0 -38
- package/dist/cli/ink-cli/utils/debugLog.d.ts.map +0 -1
- package/dist/cli/ink-cli/utils/debugLog.js +0 -66
- package/dist/cli/ink-cli/utils/elicitationSchema.d.ts +0 -11
- package/dist/cli/ink-cli/utils/elicitationSchema.d.ts.map +0 -1
- package/dist/cli/ink-cli/utils/elicitationSchema.js +0 -80
- package/dist/cli/ink-cli/utils/idGenerator.d.ts +0 -10
- package/dist/cli/ink-cli/utils/idGenerator.d.ts.map +0 -1
- package/dist/cli/ink-cli/utils/idGenerator.js +0 -12
- package/dist/cli/ink-cli/utils/index.d.ts +0 -9
- package/dist/cli/ink-cli/utils/index.d.ts.map +0 -1
- package/dist/cli/ink-cli/utils/index.js +0 -13
- package/dist/cli/ink-cli/utils/input.d.ts +0 -25
- package/dist/cli/ink-cli/utils/input.d.ts.map +0 -1
- package/dist/cli/ink-cli/utils/input.js +0 -56
- package/dist/cli/ink-cli/utils/inputParsing.d.ts +0 -31
- package/dist/cli/ink-cli/utils/inputParsing.d.ts.map +0 -1
- package/dist/cli/ink-cli/utils/inputParsing.js +0 -70
- package/dist/cli/ink-cli/utils/llm-provider-display.d.ts +0 -3
- package/dist/cli/ink-cli/utils/llm-provider-display.d.ts.map +0 -1
- package/dist/cli/ink-cli/utils/llm-provider-display.js +0 -22
- package/dist/cli/ink-cli/utils/messageFormatting.d.ts +0 -125
- package/dist/cli/ink-cli/utils/messageFormatting.d.ts.map +0 -1
- package/dist/cli/ink-cli/utils/messageFormatting.js +0 -485
- package/dist/cli/ink-cli/utils/mouse.d.ts +0 -61
- package/dist/cli/ink-cli/utils/mouse.d.ts.map +0 -1
- package/dist/cli/ink-cli/utils/mouse.js +0 -209
- package/dist/cli/ink-cli/utils/overlayPresentation.d.ts +0 -19
- package/dist/cli/ink-cli/utils/overlayPresentation.d.ts.map +0 -1
- package/dist/cli/ink-cli/utils/overlayPresentation.js +0 -33
- package/dist/cli/ink-cli/utils/overlaySizing.d.ts +0 -19
- package/dist/cli/ink-cli/utils/overlaySizing.d.ts.map +0 -1
- package/dist/cli/ink-cli/utils/overlaySizing.js +0 -11
- package/dist/cli/ink-cli/utils/soundNotification.d.ts +0 -77
- package/dist/cli/ink-cli/utils/soundNotification.d.ts.map +0 -1
- package/dist/cli/ink-cli/utils/soundNotification.js +0 -226
- package/dist/cli/ink-cli/utils/streamSplitter.d.ts +0 -44
- package/dist/cli/ink-cli/utils/streamSplitter.d.ts.map +0 -1
- package/dist/cli/ink-cli/utils/streamSplitter.js +0 -154
- package/dist/cli/ink-cli/utils/textUtils.d.ts +0 -63
- package/dist/cli/ink-cli/utils/textUtils.d.ts.map +0 -1
- package/dist/cli/ink-cli/utils/textUtils.js +0 -248
- package/dist/cli/ink-cli/utils/toolUtils.d.ts +0 -20
- package/dist/cli/ink-cli/utils/toolUtils.d.ts.map +0 -1
- package/dist/cli/ink-cli/utils/toolUtils.js +0 -25
- package/dist/webui/assets/index-C9JXwpvo.css +0 -1
- package/dist/webui/assets/index-CKhumsZA.js +0 -2059
|
@@ -1,566 +0,0 @@
|
|
|
1
|
-
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
/**
|
|
3
|
-
* SoundsSelector Component
|
|
4
|
-
* Interactive overlay for configuring sound notifications and selecting built-in sounds.
|
|
5
|
-
*
|
|
6
|
-
* Built-in sounds are copied into the Dexto sounds directory (typically ~/.dexto/sounds/builtins/)
|
|
7
|
-
* and selected via preferences.yml using paths relative to that directory (e.g., builtins/coin.wav).
|
|
8
|
-
*
|
|
9
|
-
* This reuses the existing sound resolution logic in soundNotification.ts.
|
|
10
|
-
*/
|
|
11
|
-
import { useCallback, useEffect, useImperativeHandle, useMemo, useRef, useState, forwardRef, } from 'react';
|
|
12
|
-
import { Box, Text } from 'ink';
|
|
13
|
-
import { fileURLToPath } from 'node:url';
|
|
14
|
-
import { promises as fs } from 'node:fs';
|
|
15
|
-
import path from 'node:path';
|
|
16
|
-
import { BaseSelector } from '../base/BaseSelector.js';
|
|
17
|
-
import { CUSTOM_SOUND_EXTENSIONS, getDefaultSoundSpec, playNotificationSound, playSoundFile, } from '../../utils/soundNotification.js';
|
|
18
|
-
import { useSoundService } from '../../contexts/index.js';
|
|
19
|
-
import { getDextoGlobalPath, globalPreferencesExist, loadGlobalPreferences, updateGlobalPreferences, } from '@dexto/agent-management';
|
|
20
|
-
const BUILTIN_SOUNDS = [
|
|
21
|
-
{
|
|
22
|
-
id: 'coin',
|
|
23
|
-
name: 'Coin',
|
|
24
|
-
filename: 'coin.wav',
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
id: 'confirm',
|
|
28
|
-
name: 'Confirm',
|
|
29
|
-
filename: 'confirm.wav',
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
id: 'ping',
|
|
33
|
-
name: 'Ping',
|
|
34
|
-
filename: 'ping.wav',
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
id: 'powerup',
|
|
38
|
-
name: 'Power Up',
|
|
39
|
-
filename: 'powerup.wav',
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
id: 'chime',
|
|
43
|
-
name: 'Chime',
|
|
44
|
-
filename: 'chime.wav',
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
id: 'levelup',
|
|
48
|
-
name: 'Level Up',
|
|
49
|
-
filename: 'levelup.wav',
|
|
50
|
-
},
|
|
51
|
-
{
|
|
52
|
-
id: 'boot',
|
|
53
|
-
name: 'Boot',
|
|
54
|
-
filename: 'boot.wav',
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
id: 'startup',
|
|
58
|
-
name: 'Startup',
|
|
59
|
-
filename: 'startup.wav',
|
|
60
|
-
},
|
|
61
|
-
{
|
|
62
|
-
id: 'success',
|
|
63
|
-
name: 'Success',
|
|
64
|
-
filename: 'success.wav',
|
|
65
|
-
},
|
|
66
|
-
{
|
|
67
|
-
id: 'win',
|
|
68
|
-
name: 'Win',
|
|
69
|
-
filename: 'win.wav',
|
|
70
|
-
},
|
|
71
|
-
{
|
|
72
|
-
id: 'treasure',
|
|
73
|
-
name: 'Treasure Chest',
|
|
74
|
-
filename: 'treasure.wav',
|
|
75
|
-
},
|
|
76
|
-
];
|
|
77
|
-
const DEFAULT_CONFIG = {
|
|
78
|
-
enabled: true,
|
|
79
|
-
onStartup: false,
|
|
80
|
-
onApprovalRequired: true,
|
|
81
|
-
onTaskComplete: true,
|
|
82
|
-
};
|
|
83
|
-
function getSoundEnabledKey(soundType) {
|
|
84
|
-
switch (soundType) {
|
|
85
|
-
case 'startup':
|
|
86
|
-
return 'onStartup';
|
|
87
|
-
case 'approval':
|
|
88
|
-
return 'onApprovalRequired';
|
|
89
|
-
case 'complete':
|
|
90
|
-
return 'onTaskComplete';
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
function getSoundFileKey(soundType) {
|
|
94
|
-
switch (soundType) {
|
|
95
|
-
case 'startup':
|
|
96
|
-
return 'startupSoundFile';
|
|
97
|
-
case 'approval':
|
|
98
|
-
return 'approvalSoundFile';
|
|
99
|
-
case 'complete':
|
|
100
|
-
return 'completeSoundFile';
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
function selectionLabel(soundType, selection) {
|
|
104
|
-
if (selection.kind === 'system')
|
|
105
|
-
return soundType === 'startup' ? 'Startup' : 'System';
|
|
106
|
-
const normalizedRelative = selection.relativePath.replaceAll('\\', '/');
|
|
107
|
-
const builtinFilename = normalizedRelative.startsWith('builtins/')
|
|
108
|
-
? normalizedRelative.slice('builtins/'.length)
|
|
109
|
-
: null;
|
|
110
|
-
if (builtinFilename) {
|
|
111
|
-
const builtin = BUILTIN_SOUNDS.find((s) => s.filename === builtinFilename);
|
|
112
|
-
if (builtin)
|
|
113
|
-
return builtin.name;
|
|
114
|
-
}
|
|
115
|
-
return normalizedRelative.replace(/\.[^/.]+$/, '');
|
|
116
|
-
}
|
|
117
|
-
function getAllowedCustomSoundExtensions() {
|
|
118
|
-
switch (process.platform) {
|
|
119
|
-
case 'win32':
|
|
120
|
-
return new Set(['.wav']);
|
|
121
|
-
case 'linux':
|
|
122
|
-
return new Set(['.wav', '.ogg', '.oga']);
|
|
123
|
-
default:
|
|
124
|
-
return new Set(CUSTOM_SOUND_EXTENSIONS);
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
async function listCustomSoundFiles(soundsDir) {
|
|
128
|
-
const allowedExtensions = getAllowedCustomSoundExtensions();
|
|
129
|
-
const results = [];
|
|
130
|
-
const walk = async (dir) => {
|
|
131
|
-
let entries;
|
|
132
|
-
try {
|
|
133
|
-
entries = await fs.readdir(dir, { withFileTypes: true });
|
|
134
|
-
}
|
|
135
|
-
catch (error) {
|
|
136
|
-
if (error.code === 'ENOENT')
|
|
137
|
-
return;
|
|
138
|
-
throw error;
|
|
139
|
-
}
|
|
140
|
-
for (const entry of entries) {
|
|
141
|
-
if (entry.name.startsWith('.'))
|
|
142
|
-
continue;
|
|
143
|
-
const absPath = path.join(dir, entry.name);
|
|
144
|
-
if (entry.isDirectory()) {
|
|
145
|
-
if (dir === soundsDir && entry.name === 'builtins')
|
|
146
|
-
continue;
|
|
147
|
-
await walk(absPath);
|
|
148
|
-
continue;
|
|
149
|
-
}
|
|
150
|
-
if (!entry.isFile())
|
|
151
|
-
continue;
|
|
152
|
-
const ext = path.extname(entry.name).toLowerCase();
|
|
153
|
-
if (!allowedExtensions.has(ext))
|
|
154
|
-
continue;
|
|
155
|
-
const relative = path.relative(soundsDir, absPath);
|
|
156
|
-
if (relative.startsWith('..') || path.isAbsolute(relative))
|
|
157
|
-
continue;
|
|
158
|
-
results.push(relative.split(path.sep).join('/'));
|
|
159
|
-
}
|
|
160
|
-
};
|
|
161
|
-
await walk(soundsDir);
|
|
162
|
-
return results.sort((a, b) => a.localeCompare(b));
|
|
163
|
-
}
|
|
164
|
-
function formatCustomSoundLabel(relativePath) {
|
|
165
|
-
return relativePath.replaceAll('\\', '/').replace(/\.[^/.]+$/, '');
|
|
166
|
-
}
|
|
167
|
-
function resolveSelection(soundType, config) {
|
|
168
|
-
const configuredRelativePath = config[getSoundFileKey(soundType)];
|
|
169
|
-
if (configuredRelativePath) {
|
|
170
|
-
return { kind: 'file', relativePath: configuredRelativePath };
|
|
171
|
-
}
|
|
172
|
-
return { kind: 'system' };
|
|
173
|
-
}
|
|
174
|
-
const SoundsSelector = forwardRef(function SoundsSelector({ isVisible, onClose }, ref) {
|
|
175
|
-
const soundService = useSoundService();
|
|
176
|
-
const baseSelectorRef = useRef(null);
|
|
177
|
-
const [viewMode, setViewMode] = useState('main');
|
|
178
|
-
const [selectedIndex, setSelectedIndex] = useState(0);
|
|
179
|
-
const [pickAction, setPickAction] = useState('listen');
|
|
180
|
-
const [isLoading, setIsLoading] = useState(false);
|
|
181
|
-
const [isApplying, setIsApplying] = useState(false);
|
|
182
|
-
const [error, setError] = useState(null);
|
|
183
|
-
const [canPersistPreferences, setCanPersistPreferences] = useState(false);
|
|
184
|
-
const [config, setConfig] = useState(DEFAULT_CONFIG);
|
|
185
|
-
const [customSoundFiles, setCustomSoundFiles] = useState([]);
|
|
186
|
-
const [approvalSelection, setApprovalSelection] = useState({
|
|
187
|
-
kind: 'system',
|
|
188
|
-
});
|
|
189
|
-
const [completeSelection, setCompleteSelection] = useState({
|
|
190
|
-
kind: 'system',
|
|
191
|
-
});
|
|
192
|
-
const [startupSelection, setStartupSelection] = useState({
|
|
193
|
-
kind: 'system',
|
|
194
|
-
});
|
|
195
|
-
const configRef = useRef(config);
|
|
196
|
-
configRef.current = config;
|
|
197
|
-
const closeOrBack = useCallback(() => {
|
|
198
|
-
if (viewMode === 'main') {
|
|
199
|
-
onClose();
|
|
200
|
-
return;
|
|
201
|
-
}
|
|
202
|
-
setViewMode('main');
|
|
203
|
-
setSelectedIndex(0);
|
|
204
|
-
setError(null);
|
|
205
|
-
}, [onClose, viewMode]);
|
|
206
|
-
useImperativeHandle(ref, () => ({
|
|
207
|
-
handleInput: (input, key) => {
|
|
208
|
-
if (!isVisible)
|
|
209
|
-
return false;
|
|
210
|
-
if (viewMode !== 'main') {
|
|
211
|
-
if (key.leftArrow) {
|
|
212
|
-
setPickAction('listen');
|
|
213
|
-
return true;
|
|
214
|
-
}
|
|
215
|
-
if (key.rightArrow) {
|
|
216
|
-
setPickAction('select');
|
|
217
|
-
return true;
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
return baseSelectorRef.current?.handleInput(input, key) ?? false;
|
|
221
|
-
},
|
|
222
|
-
}), [isVisible, viewMode]);
|
|
223
|
-
const builtinSoundPaths = useMemo(() => {
|
|
224
|
-
return BUILTIN_SOUNDS.map((sound) => ({
|
|
225
|
-
...sound,
|
|
226
|
-
absPath: fileURLToPath(new URL(`../../../assets/sounds/${sound.filename}`, import.meta.url)),
|
|
227
|
-
}));
|
|
228
|
-
}, []);
|
|
229
|
-
const refreshSelections = useCallback((nextConfig) => {
|
|
230
|
-
setStartupSelection(resolveSelection('startup', nextConfig));
|
|
231
|
-
setApprovalSelection(resolveSelection('approval', nextConfig));
|
|
232
|
-
setCompleteSelection(resolveSelection('complete', nextConfig));
|
|
233
|
-
}, []);
|
|
234
|
-
// Load preferences + built-in sounds when becoming visible
|
|
235
|
-
useEffect(() => {
|
|
236
|
-
if (!isVisible)
|
|
237
|
-
return;
|
|
238
|
-
let cancelled = false;
|
|
239
|
-
setIsLoading(true);
|
|
240
|
-
setIsApplying(false);
|
|
241
|
-
setError(null);
|
|
242
|
-
setViewMode('main');
|
|
243
|
-
setSelectedIndex(0);
|
|
244
|
-
const run = async () => {
|
|
245
|
-
// Load preferences (optional)
|
|
246
|
-
const prefsExist = globalPreferencesExist();
|
|
247
|
-
setCanPersistPreferences(prefsExist);
|
|
248
|
-
let nextConfig = DEFAULT_CONFIG;
|
|
249
|
-
if (prefsExist) {
|
|
250
|
-
try {
|
|
251
|
-
const preferences = await loadGlobalPreferences();
|
|
252
|
-
nextConfig = {
|
|
253
|
-
enabled: preferences.sounds?.enabled ?? nextConfig.enabled,
|
|
254
|
-
onStartup: preferences.sounds?.onStartup ?? nextConfig.onStartup,
|
|
255
|
-
startupSoundFile: preferences.sounds?.startupSoundFile,
|
|
256
|
-
onApprovalRequired: preferences.sounds?.onApprovalRequired ??
|
|
257
|
-
nextConfig.onApprovalRequired,
|
|
258
|
-
approvalSoundFile: preferences.sounds?.approvalSoundFile,
|
|
259
|
-
onTaskComplete: preferences.sounds?.onTaskComplete ?? nextConfig.onTaskComplete,
|
|
260
|
-
completeSoundFile: preferences.sounds?.completeSoundFile,
|
|
261
|
-
};
|
|
262
|
-
}
|
|
263
|
-
catch (err) {
|
|
264
|
-
// Non-fatal: allow selection changes, but toggles won't persist
|
|
265
|
-
setCanPersistPreferences(false);
|
|
266
|
-
if (!cancelled) {
|
|
267
|
-
setError(`Failed to load preferences: ${err instanceof Error ? err.message : String(err)}`);
|
|
268
|
-
}
|
|
269
|
-
}
|
|
270
|
-
}
|
|
271
|
-
if (!cancelled) {
|
|
272
|
-
setConfig(nextConfig);
|
|
273
|
-
soundService?.setConfig(nextConfig);
|
|
274
|
-
refreshSelections(nextConfig);
|
|
275
|
-
}
|
|
276
|
-
const soundsDir = getDextoGlobalPath('sounds');
|
|
277
|
-
try {
|
|
278
|
-
const files = await listCustomSoundFiles(soundsDir);
|
|
279
|
-
if (!cancelled)
|
|
280
|
-
setCustomSoundFiles(files);
|
|
281
|
-
}
|
|
282
|
-
catch (err) {
|
|
283
|
-
if (!cancelled) {
|
|
284
|
-
setCustomSoundFiles([]);
|
|
285
|
-
setError(`Failed to load custom sounds: ${err instanceof Error ? err.message : String(err)}`);
|
|
286
|
-
}
|
|
287
|
-
}
|
|
288
|
-
};
|
|
289
|
-
void run()
|
|
290
|
-
.catch((err) => {
|
|
291
|
-
if (!cancelled) {
|
|
292
|
-
setError(err instanceof Error ? err.message : String(err));
|
|
293
|
-
}
|
|
294
|
-
})
|
|
295
|
-
.finally(() => {
|
|
296
|
-
if (!cancelled)
|
|
297
|
-
setIsLoading(false);
|
|
298
|
-
});
|
|
299
|
-
return () => {
|
|
300
|
-
cancelled = true;
|
|
301
|
-
};
|
|
302
|
-
}, [isVisible, refreshSelections, soundService]);
|
|
303
|
-
const mainItems = useMemo(() => [
|
|
304
|
-
{ type: 'enabled', id: 'enabled' },
|
|
305
|
-
{
|
|
306
|
-
type: 'pick',
|
|
307
|
-
id: 'pick-startup',
|
|
308
|
-
soundType: 'startup',
|
|
309
|
-
label: 'startup sound',
|
|
310
|
-
},
|
|
311
|
-
{
|
|
312
|
-
type: 'pick',
|
|
313
|
-
id: 'pick-approval',
|
|
314
|
-
soundType: 'approval',
|
|
315
|
-
label: 'approval sound',
|
|
316
|
-
},
|
|
317
|
-
{
|
|
318
|
-
type: 'pick',
|
|
319
|
-
id: 'pick-complete',
|
|
320
|
-
soundType: 'complete',
|
|
321
|
-
label: 'completion sound',
|
|
322
|
-
},
|
|
323
|
-
], []);
|
|
324
|
-
const pickSoundType = viewMode === 'pick-startup'
|
|
325
|
-
? 'startup'
|
|
326
|
-
: viewMode === 'pick-approval'
|
|
327
|
-
? 'approval'
|
|
328
|
-
: viewMode === 'pick-complete'
|
|
329
|
-
? 'complete'
|
|
330
|
-
: null;
|
|
331
|
-
const pickItems = useMemo(() => {
|
|
332
|
-
if (!pickSoundType)
|
|
333
|
-
return [];
|
|
334
|
-
const current = pickSoundType === 'startup'
|
|
335
|
-
? startupSelection
|
|
336
|
-
: pickSoundType === 'approval'
|
|
337
|
-
? approvalSelection
|
|
338
|
-
: completeSelection;
|
|
339
|
-
const enabledKey = getSoundEnabledKey(pickSoundType);
|
|
340
|
-
const isEnabled = config[enabledKey];
|
|
341
|
-
const normalizedRelative = current.kind === 'file' ? current.relativePath.replaceAll('\\', '/') : null;
|
|
342
|
-
const items = [
|
|
343
|
-
{
|
|
344
|
-
type: 'off',
|
|
345
|
-
id: 'off',
|
|
346
|
-
label: 'Off',
|
|
347
|
-
isCurrent: !isEnabled,
|
|
348
|
-
},
|
|
349
|
-
{
|
|
350
|
-
type: 'default',
|
|
351
|
-
id: 'default',
|
|
352
|
-
label: 'Default',
|
|
353
|
-
isCurrent: isEnabled && current.kind === 'system',
|
|
354
|
-
},
|
|
355
|
-
...builtinSoundPaths.map((sound) => ({
|
|
356
|
-
type: 'builtin',
|
|
357
|
-
id: sound.id,
|
|
358
|
-
label: sound.name,
|
|
359
|
-
isCurrent: isEnabled &&
|
|
360
|
-
normalizedRelative === path.posix.join('builtins', sound.filename),
|
|
361
|
-
})),
|
|
362
|
-
...customSoundFiles.map((relativePath) => ({
|
|
363
|
-
type: 'file',
|
|
364
|
-
id: relativePath,
|
|
365
|
-
relativePath,
|
|
366
|
-
label: formatCustomSoundLabel(relativePath),
|
|
367
|
-
isCurrent: isEnabled && normalizedRelative === relativePath.replaceAll('\\', '/'),
|
|
368
|
-
})),
|
|
369
|
-
];
|
|
370
|
-
return items;
|
|
371
|
-
}, [
|
|
372
|
-
approvalSelection,
|
|
373
|
-
builtinSoundPaths,
|
|
374
|
-
customSoundFiles,
|
|
375
|
-
completeSelection,
|
|
376
|
-
config,
|
|
377
|
-
pickSoundType,
|
|
378
|
-
startupSelection,
|
|
379
|
-
]);
|
|
380
|
-
const items = viewMode === 'main' ? mainItems : pickItems;
|
|
381
|
-
const applyConfigUpdate = useCallback(async (partial) => {
|
|
382
|
-
const previousConfig = configRef.current;
|
|
383
|
-
const nextConfig = { ...previousConfig, ...partial };
|
|
384
|
-
setConfig(nextConfig);
|
|
385
|
-
soundService?.setConfig(partial);
|
|
386
|
-
refreshSelections(nextConfig);
|
|
387
|
-
if (!canPersistPreferences) {
|
|
388
|
-
return;
|
|
389
|
-
}
|
|
390
|
-
try {
|
|
391
|
-
await updateGlobalPreferences({ sounds: partial });
|
|
392
|
-
}
|
|
393
|
-
catch (err) {
|
|
394
|
-
setConfig(previousConfig);
|
|
395
|
-
soundService?.setConfig(previousConfig);
|
|
396
|
-
refreshSelections(previousConfig);
|
|
397
|
-
setError(err instanceof Error ? err.message : String(err));
|
|
398
|
-
}
|
|
399
|
-
}, [canPersistPreferences, refreshSelections, soundService]);
|
|
400
|
-
const ensureBuiltinSoundFile = useCallback(async (soundId) => {
|
|
401
|
-
const soundsDir = getDextoGlobalPath('sounds');
|
|
402
|
-
const builtinsDir = path.join(soundsDir, 'builtins');
|
|
403
|
-
await fs.mkdir(builtinsDir, { recursive: true });
|
|
404
|
-
const builtin = builtinSoundPaths.find((s) => s.id === soundId);
|
|
405
|
-
if (!builtin) {
|
|
406
|
-
throw new Error(`Unknown built-in sound: ${soundId}`);
|
|
407
|
-
}
|
|
408
|
-
const destPath = path.join(builtinsDir, builtin.filename);
|
|
409
|
-
await fs.copyFile(builtin.absPath, destPath);
|
|
410
|
-
return path.posix.join('builtins', builtin.filename);
|
|
411
|
-
}, [builtinSoundPaths]);
|
|
412
|
-
const previewPickItem = useCallback((item) => {
|
|
413
|
-
if (!pickSoundType)
|
|
414
|
-
return;
|
|
415
|
-
if (item.type === 'off') {
|
|
416
|
-
return;
|
|
417
|
-
}
|
|
418
|
-
if (item.type === 'default') {
|
|
419
|
-
const spec = getDefaultSoundSpec(pickSoundType);
|
|
420
|
-
if (spec)
|
|
421
|
-
playSoundFile(spec);
|
|
422
|
-
return;
|
|
423
|
-
}
|
|
424
|
-
if (item.type === 'builtin') {
|
|
425
|
-
const builtin = builtinSoundPaths.find((s) => s.id === item.id);
|
|
426
|
-
if (builtin) {
|
|
427
|
-
playSoundFile(builtin.absPath);
|
|
428
|
-
}
|
|
429
|
-
return;
|
|
430
|
-
}
|
|
431
|
-
if (item.type === 'file') {
|
|
432
|
-
const soundsDir = path.normalize(getDextoGlobalPath('sounds'));
|
|
433
|
-
const resolved = path.normalize(path.resolve(soundsDir, item.relativePath));
|
|
434
|
-
if (resolved === soundsDir || resolved.startsWith(soundsDir + path.sep)) {
|
|
435
|
-
playSoundFile(resolved);
|
|
436
|
-
}
|
|
437
|
-
}
|
|
438
|
-
}, [builtinSoundPaths, pickSoundType]);
|
|
439
|
-
const handleSelect = useCallback(async (item) => {
|
|
440
|
-
if (isApplying || isLoading)
|
|
441
|
-
return;
|
|
442
|
-
setIsApplying(true);
|
|
443
|
-
setError(null);
|
|
444
|
-
try {
|
|
445
|
-
if (item.type === 'enabled') {
|
|
446
|
-
await applyConfigUpdate({ enabled: !configRef.current.enabled });
|
|
447
|
-
return;
|
|
448
|
-
}
|
|
449
|
-
if (item.type === 'pick') {
|
|
450
|
-
setPickAction('listen');
|
|
451
|
-
setViewMode(item.id);
|
|
452
|
-
setSelectedIndex(0);
|
|
453
|
-
return;
|
|
454
|
-
}
|
|
455
|
-
if (item.type === 'off' ||
|
|
456
|
-
item.type === 'default' ||
|
|
457
|
-
item.type === 'builtin' ||
|
|
458
|
-
item.type === 'file') {
|
|
459
|
-
if (!pickSoundType)
|
|
460
|
-
return;
|
|
461
|
-
const enabledKey = getSoundEnabledKey(pickSoundType);
|
|
462
|
-
const fileKey = getSoundFileKey(pickSoundType);
|
|
463
|
-
if (pickAction === 'listen') {
|
|
464
|
-
previewPickItem(item);
|
|
465
|
-
return;
|
|
466
|
-
}
|
|
467
|
-
if (item.type === 'off') {
|
|
468
|
-
await applyConfigUpdate({ [enabledKey]: false });
|
|
469
|
-
setViewMode('main');
|
|
470
|
-
setSelectedIndex(0);
|
|
471
|
-
return;
|
|
472
|
-
}
|
|
473
|
-
if (item.type === 'default') {
|
|
474
|
-
const partial = {
|
|
475
|
-
[enabledKey]: true,
|
|
476
|
-
[fileKey]: undefined,
|
|
477
|
-
};
|
|
478
|
-
await applyConfigUpdate(partial);
|
|
479
|
-
playNotificationSound(pickSoundType, {
|
|
480
|
-
...configRef.current,
|
|
481
|
-
...partial,
|
|
482
|
-
});
|
|
483
|
-
}
|
|
484
|
-
else if (item.type === 'builtin') {
|
|
485
|
-
const relativePath = await ensureBuiltinSoundFile(item.id);
|
|
486
|
-
const partial = {
|
|
487
|
-
[enabledKey]: true,
|
|
488
|
-
[fileKey]: relativePath,
|
|
489
|
-
};
|
|
490
|
-
await applyConfigUpdate(partial);
|
|
491
|
-
playNotificationSound(pickSoundType, {
|
|
492
|
-
...configRef.current,
|
|
493
|
-
...partial,
|
|
494
|
-
});
|
|
495
|
-
}
|
|
496
|
-
else {
|
|
497
|
-
const partial = {
|
|
498
|
-
[enabledKey]: true,
|
|
499
|
-
[fileKey]: item.relativePath,
|
|
500
|
-
};
|
|
501
|
-
await applyConfigUpdate(partial);
|
|
502
|
-
playNotificationSound(pickSoundType, {
|
|
503
|
-
...configRef.current,
|
|
504
|
-
...partial,
|
|
505
|
-
});
|
|
506
|
-
}
|
|
507
|
-
setViewMode('main');
|
|
508
|
-
setSelectedIndex(0);
|
|
509
|
-
return;
|
|
510
|
-
}
|
|
511
|
-
}
|
|
512
|
-
catch (err) {
|
|
513
|
-
setError(err instanceof Error ? err.message : String(err));
|
|
514
|
-
}
|
|
515
|
-
finally {
|
|
516
|
-
setIsApplying(false);
|
|
517
|
-
}
|
|
518
|
-
}, [
|
|
519
|
-
applyConfigUpdate,
|
|
520
|
-
isApplying,
|
|
521
|
-
isLoading,
|
|
522
|
-
pickAction,
|
|
523
|
-
pickSoundType,
|
|
524
|
-
previewPickItem,
|
|
525
|
-
ensureBuiltinSoundFile,
|
|
526
|
-
]);
|
|
527
|
-
const formatItem = useCallback((item, isSelected) => {
|
|
528
|
-
if (item.type === 'enabled') {
|
|
529
|
-
return (_jsxs(Text, { wrap: "truncate-end", children: [_jsxs(Text, { color: isSelected ? 'cyan' : 'gray', bold: isSelected, children: ["sounds:", ' '] }), _jsx(Text, { color: config.enabled ? 'green' : 'gray', bold: isSelected, children: config.enabled ? 'On' : 'Off' })] }));
|
|
530
|
-
}
|
|
531
|
-
if (item.type === 'pick') {
|
|
532
|
-
const enabled = item.soundType === 'startup'
|
|
533
|
-
? config.onStartup
|
|
534
|
-
: item.soundType === 'approval'
|
|
535
|
-
? config.onApprovalRequired
|
|
536
|
-
: config.onTaskComplete;
|
|
537
|
-
const selection = item.soundType === 'startup'
|
|
538
|
-
? startupSelection
|
|
539
|
-
: item.soundType === 'approval'
|
|
540
|
-
? approvalSelection
|
|
541
|
-
: completeSelection;
|
|
542
|
-
const currentLabel = enabled
|
|
543
|
-
? selectionLabel(item.soundType, selection)
|
|
544
|
-
: 'Off';
|
|
545
|
-
return (_jsxs(Text, { color: isSelected ? 'cyan' : 'gray', bold: isSelected, wrap: "truncate-end", children: [item.label, ": ", currentLabel] }));
|
|
546
|
-
}
|
|
547
|
-
if (item.type === 'off' ||
|
|
548
|
-
item.type === 'default' ||
|
|
549
|
-
item.type === 'builtin' ||
|
|
550
|
-
item.type === 'file') {
|
|
551
|
-
return (_jsxs(Box, { flexDirection: "row", children: [_jsxs(Box, { flexGrow: 1, flexDirection: "row", children: [_jsx(Text, { color: "green", children: item.isCurrent ? '* ' : ' ' }), _jsx(Text, { color: isSelected ? 'cyan' : 'gray', bold: isSelected, wrap: "truncate-end", children: item.label })] }), isSelected && (_jsxs(Box, { flexDirection: "row", marginLeft: 1, children: [_jsxs(Text, { inverse: pickAction === 'listen', bold: pickAction === 'listen', children: [' ', "Listen", ' '] }), _jsx(Text, { children: " " }), _jsxs(Text, { inverse: pickAction === 'select', bold: pickAction === 'select', children: [' ', "Select", ' '] })] }))] }));
|
|
552
|
-
}
|
|
553
|
-
return null;
|
|
554
|
-
}, [approvalSelection, completeSelection, config, pickAction, startupSelection]);
|
|
555
|
-
const title = viewMode === 'main'
|
|
556
|
-
? 'Sounds'
|
|
557
|
-
: pickSoundType === 'startup'
|
|
558
|
-
? 'Select Startup Sound'
|
|
559
|
-
: pickSoundType === 'approval'
|
|
560
|
-
? 'Select Approval Sound'
|
|
561
|
-
: 'Select Completion Sound';
|
|
562
|
-
return (_jsxs(Box, { flexDirection: "column", children: [_jsx(BaseSelector, { ref: baseSelectorRef, items: items, isVisible: isVisible, isLoading: isLoading, loadingMessage: "Loading sound settings...", selectedIndex: selectedIndex, onSelectIndex: setSelectedIndex, onSelect: (item) => void handleSelect(item), onClose: closeOrBack, formatItem: formatItem, title: title, instructionsOverride: viewMode === 'main'
|
|
563
|
-
? '↑↓ navigate • Enter toggle/select • Esc close'
|
|
564
|
-
: `↑↓ navigate • ←/→ Listen/Select • Enter ${pickAction === 'listen' ? 'preview' : 'select'} • Esc back`, borderColor: "magenta", emptyMessage: "No options available" }), error && (_jsx(Box, { marginTop: 1, children: _jsx(Text, { color: "red", wrap: "wrap", children: error }) }))] }));
|
|
565
|
-
});
|
|
566
|
-
export default SoundsSelector;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* StreamSelector Component
|
|
3
|
-
* Interactive selector for toggling streaming mode
|
|
4
|
-
*/
|
|
5
|
-
import React from 'react';
|
|
6
|
-
import type { Key } from '../../hooks/useInputOrchestrator.js';
|
|
7
|
-
interface StreamSelectorProps {
|
|
8
|
-
isVisible: boolean;
|
|
9
|
-
onSelect: (enabled: boolean) => void;
|
|
10
|
-
onClose: () => void;
|
|
11
|
-
}
|
|
12
|
-
export interface StreamSelectorHandle {
|
|
13
|
-
handleInput: (input: string, key: Key) => boolean;
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* Stream selector - toggle streaming on/off
|
|
17
|
-
*/
|
|
18
|
-
declare const StreamSelector: React.ForwardRefExoticComponent<StreamSelectorProps & React.RefAttributes<StreamSelectorHandle>>;
|
|
19
|
-
export default StreamSelector;
|
|
20
|
-
//# sourceMappingURL=StreamSelector.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"StreamSelector.d.ts","sourceRoot":"","sources":["../../../../../src/cli/ink-cli/components/overlays/StreamSelector.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAuE,MAAM,OAAO,CAAC;AAE5F,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,qCAAqC,CAAC;AAI/D,UAAU,mBAAmB;IACzB,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IACrC,OAAO,EAAE,MAAM,IAAI,CAAC;CACvB;AAED,MAAM,WAAW,oBAAoB;IACjC,WAAW,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,KAAK,OAAO,CAAC;CACrD;AAUD;;GAEG;AACH,QAAA,MAAM,cAAc,kGAuFnB,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { jsxs as _jsxs, jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
/**
|
|
3
|
-
* StreamSelector Component
|
|
4
|
-
* Interactive selector for toggling streaming mode
|
|
5
|
-
*/
|
|
6
|
-
import { useState, useEffect, forwardRef, useRef, useImperativeHandle } from 'react';
|
|
7
|
-
import { Text } from 'ink';
|
|
8
|
-
import { BaseSelector } from '../base/BaseSelector.js';
|
|
9
|
-
import { isStreamingEnabled, setStreamingEnabled } from '../../state/streaming-state.js';
|
|
10
|
-
/**
|
|
11
|
-
* Stream selector - toggle streaming on/off
|
|
12
|
-
*/
|
|
13
|
-
const StreamSelector = forwardRef(function StreamSelector({ isVisible, onSelect, onClose }, ref) {
|
|
14
|
-
const baseSelectorRef = useRef(null);
|
|
15
|
-
// Forward handleInput to BaseSelector
|
|
16
|
-
useImperativeHandle(ref, () => ({
|
|
17
|
-
handleInput: (input, key) => {
|
|
18
|
-
return baseSelectorRef.current?.handleInput(input, key) ?? false;
|
|
19
|
-
},
|
|
20
|
-
}), []);
|
|
21
|
-
const [options, setOptions] = useState([]);
|
|
22
|
-
const [selectedIndex, setSelectedIndex] = useState(0);
|
|
23
|
-
// Build options list with current indicator
|
|
24
|
-
useEffect(() => {
|
|
25
|
-
if (!isVisible)
|
|
26
|
-
return;
|
|
27
|
-
const currentEnabled = isStreamingEnabled();
|
|
28
|
-
const optionList = [
|
|
29
|
-
{
|
|
30
|
-
id: 'enabled',
|
|
31
|
-
label: 'Enabled (Experimental)',
|
|
32
|
-
description: 'Show responses as they are generated',
|
|
33
|
-
icon: '▶️',
|
|
34
|
-
isCurrent: currentEnabled,
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
id: 'disabled',
|
|
38
|
-
label: 'Disabled',
|
|
39
|
-
description: 'Show complete response when finished (default)',
|
|
40
|
-
icon: '⏸️',
|
|
41
|
-
isCurrent: !currentEnabled,
|
|
42
|
-
},
|
|
43
|
-
];
|
|
44
|
-
setOptions(optionList);
|
|
45
|
-
// Set initial selection to current state
|
|
46
|
-
setSelectedIndex(currentEnabled ? 0 : 1);
|
|
47
|
-
}, [isVisible]);
|
|
48
|
-
// Format option item for display
|
|
49
|
-
const formatItem = (option, isSelected) => (_jsxs(_Fragment, { children: [_jsxs(Text, { children: [option.icon, " "] }), _jsx(Text, { color: isSelected ? 'cyan' : 'gray', bold: isSelected, children: option.label }), _jsxs(Text, { color: isSelected ? 'white' : 'gray', children: [" - ", option.description] }), option.isCurrent && (_jsxs(Text, { color: "green", bold: true, children: [' ', "\u2713"] }))] }));
|
|
50
|
-
// Handle selection
|
|
51
|
-
const handleSelect = (option) => {
|
|
52
|
-
const enabled = option.id === 'enabled';
|
|
53
|
-
setStreamingEnabled(enabled);
|
|
54
|
-
onSelect(enabled);
|
|
55
|
-
};
|
|
56
|
-
return (_jsx(BaseSelector, { ref: baseSelectorRef, items: options, isVisible: isVisible, isLoading: false, selectedIndex: selectedIndex, onSelectIndex: setSelectedIndex, onSelect: handleSelect, onClose: onClose, formatItem: formatItem, title: "Streaming Mode", borderColor: "cyan", emptyMessage: "No options available" }));
|
|
57
|
-
});
|
|
58
|
-
export default StreamSelector;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* ToolBrowser Component
|
|
3
|
-
* Interactive browser for exploring available tools
|
|
4
|
-
* Features:
|
|
5
|
-
* - Search/filter tools by name
|
|
6
|
-
* - View tool details (description, schema)
|
|
7
|
-
* - Shows source (MCP server or Local)
|
|
8
|
-
*/
|
|
9
|
-
import React from 'react';
|
|
10
|
-
import type { Key } from '../../hooks/useInputOrchestrator.js';
|
|
11
|
-
import type { DextoAgent } from '@dexto/core';
|
|
12
|
-
interface ToolBrowserProps {
|
|
13
|
-
isVisible: boolean;
|
|
14
|
-
onClose: () => void;
|
|
15
|
-
agent: DextoAgent;
|
|
16
|
-
sessionId: string | null;
|
|
17
|
-
}
|
|
18
|
-
export interface ToolBrowserHandle {
|
|
19
|
-
handleInput: (input: string, key: Key) => boolean;
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* Tool browser with search and detail views
|
|
23
|
-
*/
|
|
24
|
-
declare const ToolBrowser: React.ForwardRefExoticComponent<ToolBrowserProps & React.RefAttributes<ToolBrowserHandle>>;
|
|
25
|
-
export default ToolBrowser;
|
|
26
|
-
//# sourceMappingURL=ToolBrowser.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ToolBrowser.d.ts","sourceRoot":"","sources":["../../../../../src/cli/ink-cli/components/overlays/ToolBrowser.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAON,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,qCAAqC,CAAC;AAC/D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAM9C,UAAU,gBAAgB;IACtB,SAAS,EAAE,OAAO,CAAC;IACnB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,KAAK,EAAE,UAAU,CAAC;IAClB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B;AAED,MAAM,WAAW,iBAAiB;IAC9B,WAAW,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,KAAK,OAAO,CAAC;CACrD;AAkBD;;GAEG;AACH,QAAA,MAAM,WAAW,4FA8rBf,CAAC;AAyZH,eAAe,WAAW,CAAC"}
|