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,11 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Box, Text } from 'ink';
|
|
3
|
-
import { getProviderLabel, getAvailableProviders } from '../provider-config.js';
|
|
4
|
-
/**
|
|
5
|
-
* Renders a list of available providers with the current selection highlighted.
|
|
6
|
-
*/
|
|
7
|
-
export function ProviderSelector({ selectedIndex, isEditing, }) {
|
|
8
|
-
const providers = getAvailableProviders();
|
|
9
|
-
return (_jsxs(Box, { flexDirection: "column", borderStyle: "round", borderColor: "green", paddingX: 1, marginTop: 1, children: [_jsx(Box, { marginBottom: 1, children: _jsx(Text, { bold: true, color: "green", children: isEditing ? 'Edit Custom Model' : 'Add Custom Model' }) }), _jsx(Text, { bold: true, children: "Select Provider:" }), _jsx(Box, { flexDirection: "column", marginTop: 1, children: providers.map((provider, index) => (_jsx(Box, { children: _jsxs(Text, { color: index === selectedIndex ? 'cyan' : 'gray', bold: index === selectedIndex, children: [index === selectedIndex ? '❯ ' : ' ', getProviderLabel(provider)] }) }, provider))) }), _jsx(Box, { marginTop: 1, children: _jsx(Text, { color: "gray", children: "\u2191\u2193 navigate \u2022 Enter select \u2022 Esc cancel" }) })] }));
|
|
10
|
-
}
|
|
11
|
-
export default ProviderSelector;
|
package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/SetupInfoBanner.d.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* SetupInfoBanner Component
|
|
3
|
-
* Displays setup information for providers that need special configuration.
|
|
4
|
-
*/
|
|
5
|
-
import React from 'react';
|
|
6
|
-
interface SetupInfoBannerProps {
|
|
7
|
-
/** Banner title */
|
|
8
|
-
title: string;
|
|
9
|
-
/** Description text */
|
|
10
|
-
description: string;
|
|
11
|
-
/** Optional documentation URL */
|
|
12
|
-
docsUrl?: string | undefined;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Displays a setup info banner with title, description, and optional docs link.
|
|
16
|
-
* Used for providers like Bedrock that require special configuration.
|
|
17
|
-
*/
|
|
18
|
-
export declare function SetupInfoBanner({ title, description, docsUrl, }: SetupInfoBannerProps): React.ReactElement;
|
|
19
|
-
export default SetupInfoBanner;
|
|
20
|
-
//# sourceMappingURL=SetupInfoBanner.d.ts.map
|
package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/SetupInfoBanner.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SetupInfoBanner.d.ts","sourceRoot":"","sources":["../../../../../../../src/cli/ink-cli/components/overlays/custom-model-wizard/shared/SetupInfoBanner.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,UAAU,oBAAoB;IAC1B,mBAAmB;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,uBAAuB;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,iCAAiC;IACjC,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAChC;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,EAC5B,KAAK,EACL,WAAW,EACX,OAAO,GACV,EAAE,oBAAoB,GAAG,KAAK,CAAC,YAAY,CAQ3C;AAED,eAAe,eAAe,CAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { Box, Text } from 'ink';
|
|
3
|
-
/**
|
|
4
|
-
* Displays a setup info banner with title, description, and optional docs link.
|
|
5
|
-
* Used for providers like Bedrock that require special configuration.
|
|
6
|
-
*/
|
|
7
|
-
export function SetupInfoBanner({ title, description, docsUrl, }) {
|
|
8
|
-
return (_jsxs(Box, { flexDirection: "column", marginBottom: 1, children: [_jsxs(Text, { color: "blue", children: ["\u2139 ", title] }), _jsx(Text, { color: "gray", children: description }), docsUrl && _jsxs(Text, { color: "gray", children: ["Setup guide: ", docsUrl] })] }));
|
|
9
|
-
}
|
|
10
|
-
export default SetupInfoBanner;
|
package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/WizardStepInput.d.ts
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WizardStepInput Component
|
|
3
|
-
* Renders a single wizard step with label, placeholder, input, and error display.
|
|
4
|
-
*/
|
|
5
|
-
import React from 'react';
|
|
6
|
-
import type { WizardStep } from '../types.js';
|
|
7
|
-
interface WizardStepInputProps {
|
|
8
|
-
/** Current step configuration */
|
|
9
|
-
step: WizardStep;
|
|
10
|
-
/** Current input value */
|
|
11
|
-
currentInput: string;
|
|
12
|
-
/** Error message (if any) */
|
|
13
|
-
error: string | null;
|
|
14
|
-
/** Whether validation is in progress */
|
|
15
|
-
isValidating: boolean;
|
|
16
|
-
/** Whether saving is in progress */
|
|
17
|
-
isSaving: boolean;
|
|
18
|
-
/** Optional additional content to render after placeholder (e.g., API key status) */
|
|
19
|
-
additionalContent?: React.ReactNode;
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* Renders a wizard step with:
|
|
23
|
-
* - Step label and placeholder text
|
|
24
|
-
* - Text input field with cursor
|
|
25
|
-
* - Error message (if any)
|
|
26
|
-
* - Validation/saving indicators
|
|
27
|
-
*/
|
|
28
|
-
export declare function WizardStepInput({ step, currentInput, error, isValidating, isSaving, additionalContent, }: WizardStepInputProps): React.ReactElement;
|
|
29
|
-
export default WizardStepInput;
|
|
30
|
-
//# sourceMappingURL=WizardStepInput.d.ts.map
|
package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/WizardStepInput.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"WizardStepInput.d.ts","sourceRoot":"","sources":["../../../../../../../src/cli/ink-cli/components/overlays/custom-model-wizard/shared/WizardStepInput.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAE9C,UAAU,oBAAoB;IAC1B,iCAAiC;IACjC,IAAI,EAAE,UAAU,CAAC;IACjB,0BAA0B;IAC1B,YAAY,EAAE,MAAM,CAAC;IACrB,6BAA6B;IAC7B,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,wCAAwC;IACxC,YAAY,EAAE,OAAO,CAAC;IACtB,oCAAoC;IACpC,QAAQ,EAAE,OAAO,CAAC;IAClB,qFAAqF;IACrF,iBAAiB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CACvC;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,EAC5B,IAAI,EACJ,YAAY,EACZ,KAAK,EACL,YAAY,EACZ,QAAQ,EACR,iBAAiB,GACpB,EAAE,oBAAoB,GAAG,KAAK,CAAC,YAAY,CAuC3C;AAED,eAAe,eAAe,CAAC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { jsxs as _jsxs, jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { Box, Text } from 'ink';
|
|
3
|
-
/**
|
|
4
|
-
* Renders a wizard step with:
|
|
5
|
-
* - Step label and placeholder text
|
|
6
|
-
* - Text input field with cursor
|
|
7
|
-
* - Error message (if any)
|
|
8
|
-
* - Validation/saving indicators
|
|
9
|
-
*/
|
|
10
|
-
export function WizardStepInput({ step, currentInput, error, isValidating, isSaving, additionalContent, }) {
|
|
11
|
-
return (_jsxs(_Fragment, { children: [_jsxs(Box, { flexDirection: "column", children: [_jsxs(Text, { bold: true, children: [step.label, ":"] }), _jsx(Text, { color: "gray", children: step.placeholder }), additionalContent] }), _jsxs(Box, { marginTop: 1, children: [_jsx(Text, { color: "cyan", children: "> " }), _jsx(Text, { children: currentInput }), _jsx(Text, { color: "cyan", children: "_" })] }), error && (_jsx(Box, { marginTop: 1, children: _jsx(Text, { color: "red", children: error }) })), isValidating && (_jsx(Box, { marginTop: 1, children: _jsx(Text, { color: "yellowBright", children: "Validating model..." }) })), isSaving && (_jsx(Box, { marginTop: 1, children: _jsx(Text, { color: "yellowBright", children: "Saving..." }) }))] }));
|
|
12
|
-
}
|
|
13
|
-
export default WizardStepInput;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Shared components for the CustomModelWizard.
|
|
3
|
-
*/
|
|
4
|
-
export { ApiKeyStep, getProviderEnvVar, hasApiKeyConfigured } from './ApiKeyStep.js';
|
|
5
|
-
export { SetupInfoBanner } from './SetupInfoBanner.js';
|
|
6
|
-
export { WizardStepInput } from './WizardStepInput.js';
|
|
7
|
-
export { ProviderSelector } from './ProviderSelector.js';
|
|
8
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/cli/ink-cli/components/overlays/custom-model-wizard/shared/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACrF,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Shared components for the CustomModelWizard.
|
|
3
|
-
*/
|
|
4
|
-
export { ApiKeyStep, getProviderEnvVar, hasApiKeyConfigured } from './ApiKeyStep.js';
|
|
5
|
-
export { SetupInfoBanner } from './SetupInfoBanner.js';
|
|
6
|
-
export { WizardStepInput } from './WizardStepInput.js';
|
|
7
|
-
export { ProviderSelector } from './ProviderSelector.js';
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Shared types for the CustomModelWizard component architecture.
|
|
3
|
-
*/
|
|
4
|
-
import type { CustomModel, CustomModelProvider } from '@dexto/agent-management';
|
|
5
|
-
import type { Key } from '../../../hooks/useInputOrchestrator.js';
|
|
6
|
-
/**
|
|
7
|
-
* A single step in the wizard flow.
|
|
8
|
-
*/
|
|
9
|
-
export interface WizardStep {
|
|
10
|
-
field: string;
|
|
11
|
-
label: string;
|
|
12
|
-
placeholder: string;
|
|
13
|
-
required: boolean;
|
|
14
|
-
validate?: (value: string) => string | null;
|
|
15
|
-
/**
|
|
16
|
-
* Optional condition to determine if this step should be shown.
|
|
17
|
-
* Takes the current accumulated values and returns true if the step should be shown.
|
|
18
|
-
* If omitted, the step is always shown.
|
|
19
|
-
*/
|
|
20
|
-
condition?: (values: Record<string, string>) => boolean;
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* Props passed to each provider-specific wizard component.
|
|
24
|
-
*/
|
|
25
|
-
export interface ProviderWizardProps {
|
|
26
|
-
/** Current accumulated values from all steps */
|
|
27
|
-
values: Record<string, string>;
|
|
28
|
-
/** Current step index within the provider's steps */
|
|
29
|
-
currentStep: number;
|
|
30
|
-
/** Current text input value */
|
|
31
|
-
currentInput: string;
|
|
32
|
-
/** Validation error message (if any) */
|
|
33
|
-
error: string | null;
|
|
34
|
-
/** Whether async validation is in progress */
|
|
35
|
-
isValidating: boolean;
|
|
36
|
-
/** Whether the model is being saved */
|
|
37
|
-
isSaving: boolean;
|
|
38
|
-
/** Whether we're editing an existing model */
|
|
39
|
-
isEditing: boolean;
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* Handle returned by provider components for input handling.
|
|
43
|
-
*/
|
|
44
|
-
export interface ProviderWizardHandle {
|
|
45
|
-
/** Handle keyboard input. Returns true if handled. */
|
|
46
|
-
handleInput: (input: string, key: Key) => boolean;
|
|
47
|
-
/** Get the steps for this provider */
|
|
48
|
-
getSteps: () => WizardStep[];
|
|
49
|
-
/** Get current step config */
|
|
50
|
-
getCurrentStepConfig: () => WizardStep | undefined;
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* Configuration for a custom model provider.
|
|
54
|
-
*/
|
|
55
|
-
export interface ProviderConfig {
|
|
56
|
-
/** Display name shown in provider selector */
|
|
57
|
-
displayName: string;
|
|
58
|
-
/** Short description of the provider */
|
|
59
|
-
description: string;
|
|
60
|
-
/** Wizard steps for this provider */
|
|
61
|
-
steps: WizardStep[];
|
|
62
|
-
/** Build a CustomModel from accumulated values */
|
|
63
|
-
buildModel: (values: Record<string, string>, provider: CustomModelProvider) => CustomModel;
|
|
64
|
-
/** Optional async validation for specific fields */
|
|
65
|
-
asyncValidation?: {
|
|
66
|
-
field: string;
|
|
67
|
-
validate: (value: string) => Promise<string | null>;
|
|
68
|
-
};
|
|
69
|
-
/** Whether this provider needs a setup info banner */
|
|
70
|
-
setupInfo?: {
|
|
71
|
-
title: string;
|
|
72
|
-
description: string;
|
|
73
|
-
docsUrl?: string;
|
|
74
|
-
};
|
|
75
|
-
}
|
|
76
|
-
/**
|
|
77
|
-
* Common validation functions
|
|
78
|
-
*/
|
|
79
|
-
export declare const validators: {
|
|
80
|
-
required: (label: string) => (v: string) => string | null;
|
|
81
|
-
url: (v: string) => "URL is required" | "Invalid URL format" | "URL must use http:// or https://" | null;
|
|
82
|
-
positiveNumber: (v: string) => "Must be a positive number" | null;
|
|
83
|
-
slashFormat: (v: string) => "Model ID is required" | "Must use format: provider/model-name" | null;
|
|
84
|
-
};
|
|
85
|
-
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/cli/ink-cli/components/overlays/custom-model-wizard/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAChF,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,wCAAwC,CAAC;AAElE;;GAEG;AACH,MAAM,WAAW,UAAU;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,GAAG,IAAI,CAAC;IAC5C;;;;OAIG;IACH,SAAS,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,OAAO,CAAC;CAC3D;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAChC,gDAAgD;IAChD,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC/B,qDAAqD;IACrD,WAAW,EAAE,MAAM,CAAC;IACpB,+BAA+B;IAC/B,YAAY,EAAE,MAAM,CAAC;IACrB,wCAAwC;IACxC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,8CAA8C;IAC9C,YAAY,EAAE,OAAO,CAAC;IACtB,uCAAuC;IACvC,QAAQ,EAAE,OAAO,CAAC;IAClB,8CAA8C;IAC9C,SAAS,EAAE,OAAO,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACjC,sDAAsD;IACtD,WAAW,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,KAAK,OAAO,CAAC;IAClD,sCAAsC;IACtC,QAAQ,EAAE,MAAM,UAAU,EAAE,CAAC;IAC7B,8BAA8B;IAC9B,oBAAoB,EAAE,MAAM,UAAU,GAAG,SAAS,CAAC;CACtD;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC3B,8CAA8C;IAC9C,WAAW,EAAE,MAAM,CAAC;IACpB,wCAAwC;IACxC,WAAW,EAAE,MAAM,CAAC;IACpB,qCAAqC;IACrC,KAAK,EAAE,UAAU,EAAE,CAAC;IACpB,kDAAkD;IAClD,UAAU,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,QAAQ,EAAE,mBAAmB,KAAK,WAAW,CAAC;IAC3F,oDAAoD;IACpD,eAAe,CAAC,EAAE;QACd,KAAK,EAAE,MAAM,CAAC;QACd,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;KACvD,CAAC;IACF,sDAAsD;IACtD,SAAS,CAAC,EAAE;QACR,KAAK,EAAE,MAAM,CAAC;QACd,WAAW,EAAE,MAAM,CAAC;QACpB,OAAO,CAAC,EAAE,MAAM,CAAC;KACpB,CAAC;CACL;AAED;;GAEG;AACH,eAAO,MAAM,UAAU;sBACD,MAAM,MAAM,GAAG,MAAM;aAE9B,MAAM;wBAaK,MAAM;qBAOT,MAAM;CAK1B,CAAC"}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Shared types for the CustomModelWizard component architecture.
|
|
3
|
-
*/
|
|
4
|
-
/**
|
|
5
|
-
* Common validation functions
|
|
6
|
-
*/
|
|
7
|
-
export const validators = {
|
|
8
|
-
required: (label) => (v) => (v.trim() ? null : `${label} is required`),
|
|
9
|
-
url: (v) => {
|
|
10
|
-
if (!v.trim())
|
|
11
|
-
return 'URL is required';
|
|
12
|
-
try {
|
|
13
|
-
const url = new URL(v);
|
|
14
|
-
if (!['http:', 'https:'].includes(url.protocol)) {
|
|
15
|
-
return 'URL must use http:// or https://';
|
|
16
|
-
}
|
|
17
|
-
return null;
|
|
18
|
-
}
|
|
19
|
-
catch {
|
|
20
|
-
return 'Invalid URL format';
|
|
21
|
-
}
|
|
22
|
-
},
|
|
23
|
-
positiveNumber: (v) => {
|
|
24
|
-
if (!v.trim())
|
|
25
|
-
return null; // Optional field
|
|
26
|
-
const num = parseInt(v, 10);
|
|
27
|
-
if (isNaN(num) || num <= 0)
|
|
28
|
-
return 'Must be a positive number';
|
|
29
|
-
return null;
|
|
30
|
-
},
|
|
31
|
-
slashFormat: (v) => {
|
|
32
|
-
if (!v.trim())
|
|
33
|
-
return 'Model ID is required';
|
|
34
|
-
if (!v.includes('/'))
|
|
35
|
-
return 'Must use format: provider/model-name';
|
|
36
|
-
return null;
|
|
37
|
-
},
|
|
38
|
-
};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* DiffRenderer Component
|
|
3
|
-
*
|
|
4
|
-
* Renders unified diff output with colored lines and line numbers.
|
|
5
|
-
* Used for edit_file and write_file (overwrite) tool results in message list.
|
|
6
|
-
* Matches the approval preview UX style.
|
|
7
|
-
*/
|
|
8
|
-
import type { DiffDisplayData } from '@dexto/core';
|
|
9
|
-
interface DiffRendererProps {
|
|
10
|
-
/** Diff display data from tool result */
|
|
11
|
-
data: DiffDisplayData;
|
|
12
|
-
/** Maximum lines to display before truncating */
|
|
13
|
-
maxLines?: number;
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* Renders unified diff with colored lines, line numbers, and word-level highlighting.
|
|
17
|
-
* Matches the approval preview UX style. No truncation by default.
|
|
18
|
-
*/
|
|
19
|
-
export declare function DiffRenderer({ data, maxLines }: DiffRendererProps): import("react/jsx-runtime").JSX.Element;
|
|
20
|
-
export {};
|
|
21
|
-
//# sourceMappingURL=DiffRenderer.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DiffRenderer.d.ts","sourceRoot":"","sources":["../../../../../src/cli/ink-cli/components/renderers/DiffRenderer.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAWnD,UAAU,iBAAiB;IACvB,yCAAyC;IACzC,IAAI,EAAE,eAAe,CAAC;IACtB,iDAAiD;IACjD,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,EAAE,IAAI,EAAE,QAAmB,EAAE,EAAE,iBAAiB,2CAkH5E"}
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
/**
|
|
3
|
-
* DiffRenderer Component
|
|
4
|
-
*
|
|
5
|
-
* Renders unified diff output with colored lines and line numbers.
|
|
6
|
-
* Used for edit_file and write_file (overwrite) tool results in message list.
|
|
7
|
-
* Matches the approval preview UX style.
|
|
8
|
-
*/
|
|
9
|
-
import React from 'react';
|
|
10
|
-
import { Box, Text } from 'ink';
|
|
11
|
-
import { makeRelativePath } from '../../utils/messageFormatting.js';
|
|
12
|
-
import { parseUnifiedDiff, findLinePairs, computeWordDiff, getLineNumWidth, DiffLine, HunkSeparator, } from './diff-shared.js';
|
|
13
|
-
/**
|
|
14
|
-
* Renders unified diff with colored lines, line numbers, and word-level highlighting.
|
|
15
|
-
* Matches the approval preview UX style. No truncation by default.
|
|
16
|
-
*/
|
|
17
|
-
export function DiffRenderer({ data, maxLines = Infinity }) {
|
|
18
|
-
const { unified, filename, additions, deletions } = data;
|
|
19
|
-
const hunks = parseUnifiedDiff(unified);
|
|
20
|
-
// Calculate max line number for width
|
|
21
|
-
let maxLineNum = 1;
|
|
22
|
-
for (const hunk of hunks) {
|
|
23
|
-
for (const line of hunk.lines) {
|
|
24
|
-
maxLineNum = Math.max(maxLineNum, line.lineNum);
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
const lineNumWidth = getLineNumWidth(maxLineNum);
|
|
28
|
-
// Find line pairs for word-level diff
|
|
29
|
-
const allLinePairs = hunks.map((hunk) => findLinePairs(hunk.lines));
|
|
30
|
-
// Count total display lines and apply truncation
|
|
31
|
-
let totalLines = 0;
|
|
32
|
-
for (const hunk of hunks) {
|
|
33
|
-
totalLines += hunk.lines.length;
|
|
34
|
-
}
|
|
35
|
-
const shouldTruncate = totalLines > maxLines;
|
|
36
|
-
let linesRendered = 0;
|
|
37
|
-
return (_jsxs(Box, { flexDirection: "column", children: [_jsxs(Box, { children: [_jsx(Text, { color: "gray", children: ' ⎿ ' }), _jsx(Text, { children: makeRelativePath(filename) }), _jsxs(Text, { color: "green", children: [" +", additions] }), _jsxs(Text, { color: "red", children: [" -", deletions] })] }), _jsxs(Box, { flexDirection: "column", paddingLeft: 2, children: [hunks.map((hunk, hunkIndex) => {
|
|
38
|
-
if (shouldTruncate && linesRendered >= maxLines) {
|
|
39
|
-
return null;
|
|
40
|
-
}
|
|
41
|
-
const linePairs = allLinePairs[hunkIndex];
|
|
42
|
-
const processedIndices = new Set();
|
|
43
|
-
return (_jsxs(React.Fragment, { children: [hunkIndex > 0 && _jsx(HunkSeparator, {}), hunk.lines.map((line, lineIndex) => {
|
|
44
|
-
if (shouldTruncate && linesRendered >= maxLines) {
|
|
45
|
-
return null;
|
|
46
|
-
}
|
|
47
|
-
if (processedIndices.has(lineIndex)) {
|
|
48
|
-
return null;
|
|
49
|
-
}
|
|
50
|
-
const pair = linePairs.get(lineIndex);
|
|
51
|
-
if (pair) {
|
|
52
|
-
processedIndices.add(lineIndex + 1);
|
|
53
|
-
if (shouldTruncate && linesRendered + 2 > maxLines) {
|
|
54
|
-
linesRendered = maxLines;
|
|
55
|
-
return null;
|
|
56
|
-
}
|
|
57
|
-
linesRendered += 2;
|
|
58
|
-
const { oldParts, newParts } = computeWordDiff(pair.del.content, pair.add.content);
|
|
59
|
-
return (_jsxs(React.Fragment, { children: [_jsx(DiffLine, { type: "deletion", lineNum: pair.del.lineNum, lineNumWidth: lineNumWidth, content: pair.del.content, wordDiffParts: oldParts }), _jsx(DiffLine, { type: "addition", lineNum: pair.add.lineNum, lineNumWidth: lineNumWidth, content: pair.add.content, wordDiffParts: newParts })] }, lineIndex));
|
|
60
|
-
}
|
|
61
|
-
linesRendered++;
|
|
62
|
-
return (_jsx(DiffLine, { type: line.type, lineNum: line.lineNum, lineNumWidth: lineNumWidth, content: line.content }, lineIndex));
|
|
63
|
-
})] }, hunkIndex));
|
|
64
|
-
}), shouldTruncate && _jsxs(Text, { color: "gray", children: ["... +", totalLines - maxLines, " lines"] })] })] }));
|
|
65
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* File Preview Renderers
|
|
3
|
-
*
|
|
4
|
-
* Preview renderers for edit_file and write_file approval prompts.
|
|
5
|
-
* - DiffPreview: for edit_file and write_file (overwrite)
|
|
6
|
-
* - CreateFilePreview: for write_file (new file)
|
|
7
|
-
*/
|
|
8
|
-
import type { DiffDisplayData, FileDisplayData } from '@dexto/core';
|
|
9
|
-
interface DiffPreviewProps {
|
|
10
|
-
data: DiffDisplayData;
|
|
11
|
-
/** Optional header override (useful for plan tools, etc.) */
|
|
12
|
-
header?: string;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Enhanced diff preview for edit_file and write_file (overwrite) approval
|
|
16
|
-
* Shows full diff with line backgrounds, hunk collapsing, and word-level highlighting
|
|
17
|
-
*/
|
|
18
|
-
export declare function DiffPreview({ data, header }: DiffPreviewProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
-
interface CreateFilePreviewProps {
|
|
20
|
-
data: FileDisplayData;
|
|
21
|
-
/** Custom header text (defaults to "Create file") */
|
|
22
|
-
header?: string;
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Preview for write_file (new file creation) or plan review
|
|
26
|
-
* Shows full file content with line numbers, white text
|
|
27
|
-
*/
|
|
28
|
-
export declare function CreateFilePreview({ data, header }: CreateFilePreviewProps): import("react/jsx-runtime").JSX.Element;
|
|
29
|
-
export {};
|
|
30
|
-
//# sourceMappingURL=FilePreviewRenderer.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FilePreviewRenderer.d.ts","sourceRoot":"","sources":["../../../../../src/cli/ink-cli/components/renderers/FilePreviewRenderer.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,OAAO,KAAK,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAgBpE,UAAU,gBAAgB;IACtB,IAAI,EAAE,eAAe,CAAC;IACtB,6DAA6D;IAC7D,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,gBAAgB,2CAiG7D;AAMD,UAAU,sBAAsB;IAC5B,IAAI,EAAE,eAAe,CAAC;IACtB,qDAAqD;IACrD,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,sBAAsB,2CAqDzE"}
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
/**
|
|
3
|
-
* File Preview Renderers
|
|
4
|
-
*
|
|
5
|
-
* Preview renderers for edit_file and write_file approval prompts.
|
|
6
|
-
* - DiffPreview: for edit_file and write_file (overwrite)
|
|
7
|
-
* - CreateFilePreview: for write_file (new file)
|
|
8
|
-
*/
|
|
9
|
-
import React from 'react';
|
|
10
|
-
import { Box, Text } from 'ink';
|
|
11
|
-
import { makeRelativePath } from '../../utils/messageFormatting.js';
|
|
12
|
-
import { parseUnifiedDiff, findLinePairs, computeWordDiff, getLineNumWidth, formatLineNum, DiffLine, HunkSeparator, } from './diff-shared.js';
|
|
13
|
-
/**
|
|
14
|
-
* Enhanced diff preview for edit_file and write_file (overwrite) approval
|
|
15
|
-
* Shows full diff with line backgrounds, hunk collapsing, and word-level highlighting
|
|
16
|
-
*/
|
|
17
|
-
export function DiffPreview({ data, header }) {
|
|
18
|
-
const { unified, filename } = data;
|
|
19
|
-
const hunks = parseUnifiedDiff(unified);
|
|
20
|
-
// Calculate max line number for width
|
|
21
|
-
let maxLineNum = 1;
|
|
22
|
-
for (const hunk of hunks) {
|
|
23
|
-
for (const line of hunk.lines) {
|
|
24
|
-
maxLineNum = Math.max(maxLineNum, line.lineNum);
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
const lineNumWidth = getLineNumWidth(maxLineNum);
|
|
28
|
-
// Find line pairs for word-level diff
|
|
29
|
-
const allLinePairs = hunks.map((hunk) => findLinePairs(hunk.lines));
|
|
30
|
-
const headerText = header ?? data.title ?? 'Update file';
|
|
31
|
-
return (_jsxs(Box, { flexDirection: "column", marginBottom: 1, children: [_jsx(Box, { marginBottom: 0, children: _jsx(Text, { color: "cyan", bold: true, children: headerText }) }), _jsxs(Box, { flexDirection: "column", borderStyle: "round", borderColor: "gray", paddingX: 1, children: [_jsx(Box, { marginBottom: 0, children: _jsx(Text, { children: makeRelativePath(filename) }) }), hunks.map((hunk, hunkIndex) => {
|
|
32
|
-
const linePairs = allLinePairs[hunkIndex];
|
|
33
|
-
const processedIndices = new Set();
|
|
34
|
-
return (_jsxs(React.Fragment, { children: [hunkIndex > 0 && _jsx(HunkSeparator, {}), hunk.lines.map((line, lineIndex) => {
|
|
35
|
-
// Skip if already processed as part of a pair
|
|
36
|
-
if (processedIndices.has(lineIndex)) {
|
|
37
|
-
return null;
|
|
38
|
-
}
|
|
39
|
-
// Check if this is part of a deletion/addition pair
|
|
40
|
-
const pair = linePairs.get(lineIndex);
|
|
41
|
-
if (pair) {
|
|
42
|
-
// Mark the addition line as processed
|
|
43
|
-
processedIndices.add(lineIndex + 1);
|
|
44
|
-
// Compute word-level diff
|
|
45
|
-
const { oldParts, newParts } = computeWordDiff(pair.del.content, pair.add.content);
|
|
46
|
-
return (_jsxs(React.Fragment, { children: [_jsx(DiffLine, { type: "deletion", lineNum: pair.del.lineNum, lineNumWidth: lineNumWidth, content: pair.del.content, wordDiffParts: oldParts }), _jsx(DiffLine, { type: "addition", lineNum: pair.add.lineNum, lineNumWidth: lineNumWidth, content: pair.add.content, wordDiffParts: newParts })] }, lineIndex));
|
|
47
|
-
}
|
|
48
|
-
// Regular line (no word-level diff)
|
|
49
|
-
return (_jsx(DiffLine, { type: line.type, lineNum: line.lineNum, lineNumWidth: lineNumWidth, content: line.content }, lineIndex));
|
|
50
|
-
})] }, hunkIndex));
|
|
51
|
-
})] })] }));
|
|
52
|
-
}
|
|
53
|
-
/**
|
|
54
|
-
* Preview for write_file (new file creation) or plan review
|
|
55
|
-
* Shows full file content with line numbers, white text
|
|
56
|
-
*/
|
|
57
|
-
export function CreateFilePreview({ data, header }) {
|
|
58
|
-
const { path, content, lineCount } = data;
|
|
59
|
-
const headerText = header ?? data.title ?? 'Create file';
|
|
60
|
-
if (!content) {
|
|
61
|
-
// Fallback if content not provided
|
|
62
|
-
return (_jsxs(Box, { flexDirection: "column", marginBottom: 1, children: [_jsx(Box, { marginBottom: 0, children: _jsx(Text, { color: "cyan", bold: true, children: headerText }) }), _jsxs(Box, { flexDirection: "column", borderStyle: "round", borderColor: "gray", paddingX: 1, children: [_jsx(Text, { children: makeRelativePath(path) }), lineCount && _jsxs(Text, { color: "gray", children: [lineCount, " lines"] })] })] }));
|
|
63
|
-
}
|
|
64
|
-
const lines = content.split('\n');
|
|
65
|
-
const lineNumWidth = getLineNumWidth(lines.length);
|
|
66
|
-
return (_jsxs(Box, { flexDirection: "column", marginBottom: 1, children: [_jsx(Box, { marginBottom: 0, children: _jsx(Text, { color: "cyan", bold: true, children: headerText }) }), _jsxs(Box, { flexDirection: "column", borderStyle: "round", borderColor: "gray", paddingX: 1, children: [_jsx(Box, { marginBottom: 0, children: _jsx(Text, { children: makeRelativePath(path) }) }), lines.map((line, index) => (_jsxs(Box, { children: [_jsx(Text, { color: "gray", children: formatLineNum(index + 1, lineNumWidth) }), _jsxs(Text, { children: [' ', line] })] }, index)))] })] }));
|
|
67
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* FileRenderer Component
|
|
3
|
-
*
|
|
4
|
-
* Renders file operation status.
|
|
5
|
-
* - Read: "Read N lines"
|
|
6
|
-
* - Write/Create: "Wrote N lines to filename"
|
|
7
|
-
*/
|
|
8
|
-
import type { FileDisplayData } from '@dexto/core';
|
|
9
|
-
interface FileRendererProps {
|
|
10
|
-
/** File display data from tool result */
|
|
11
|
-
data: FileDisplayData;
|
|
12
|
-
/** Maximum lines of content to display (default: 20) */
|
|
13
|
-
maxLines?: number;
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* Renders file operation status.
|
|
17
|
-
* Uses ⎿ character for continuation lines.
|
|
18
|
-
*/
|
|
19
|
-
export declare function FileRenderer({ data, maxLines }: FileRendererProps): import("react/jsx-runtime").JSX.Element;
|
|
20
|
-
export {};
|
|
21
|
-
//# sourceMappingURL=FileRenderer.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FileRenderer.d.ts","sourceRoot":"","sources":["../../../../../src/cli/ink-cli/components/renderers/FileRenderer.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAInD,UAAU,iBAAiB;IACvB,yCAAyC;IACzC,IAAI,EAAE,eAAe,CAAC;IACtB,wDAAwD;IACxD,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,EAAE,IAAI,EAAE,QAAa,EAAE,EAAE,iBAAiB,2CA2EtE"}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { Box, Text } from 'ink';
|
|
3
|
-
import { makeRelativePath } from '../../utils/messageFormatting.js';
|
|
4
|
-
import { formatLineNum, getLineNumWidth } from './diff-shared.js';
|
|
5
|
-
/**
|
|
6
|
-
* Renders file operation status.
|
|
7
|
-
* Uses ⎿ character for continuation lines.
|
|
8
|
-
*/
|
|
9
|
-
export function FileRenderer({ data, maxLines = 20 }) {
|
|
10
|
-
const { operation, lineCount, path, content } = data;
|
|
11
|
-
const relativePath = makeRelativePath(path);
|
|
12
|
-
// Format based on operation type
|
|
13
|
-
if (operation === 'read') {
|
|
14
|
-
// Format: "Read N lines"
|
|
15
|
-
const lineText = lineCount !== undefined ? `${lineCount} lines` : 'file';
|
|
16
|
-
return (_jsxs(Text, { color: "gray", children: [' ⎿ ', "Read ", lineText, " from ", relativePath] }));
|
|
17
|
-
}
|
|
18
|
-
// For write/create operations
|
|
19
|
-
if (operation === 'write' || operation === 'create') {
|
|
20
|
-
const verb = operation === 'create' ? 'Created' : 'Wrote';
|
|
21
|
-
if (operation === 'create' && content) {
|
|
22
|
-
const lines = content.split('\n');
|
|
23
|
-
const displayLines = lines.slice(0, maxLines);
|
|
24
|
-
const truncatedCount = lines.length - displayLines.length;
|
|
25
|
-
const lineNumWidth = getLineNumWidth(lines.length);
|
|
26
|
-
return (_jsxs(Box, { flexDirection: "column", children: [_jsxs(Box, { children: [_jsx(Text, { color: "gray", children: ' ⎿ ' }), _jsx(Text, { children: relativePath }), _jsx(Text, { color: "green", children: " (created)" })] }), _jsxs(Box, { flexDirection: "column", paddingLeft: 2, children: [displayLines.map((line, index) => (_jsxs(Box, { children: [_jsx(Text, { color: "gray", children: formatLineNum(index + 1, lineNumWidth) }), _jsxs(Text, { wrap: "wrap", children: [' ', line] })] }, index))), truncatedCount > 0 && (_jsxs(Text, { color: "gray", children: ["... +", truncatedCount, " lines"] }))] })] }));
|
|
27
|
-
}
|
|
28
|
-
const lineText = lineCount !== undefined ? `${lineCount} lines` : 'content';
|
|
29
|
-
return (_jsxs(Text, { color: "gray", children: [' ⎿ ', verb, " ", lineText, " to ", relativePath] }));
|
|
30
|
-
}
|
|
31
|
-
// Delete operation
|
|
32
|
-
if (operation === 'delete') {
|
|
33
|
-
return (_jsxs(Text, { color: "gray", children: [' ⎿ ', "Deleted ", relativePath] }));
|
|
34
|
-
}
|
|
35
|
-
// Fallback
|
|
36
|
-
return (_jsxs(Text, { color: "gray", children: [' ⎿ ', operation] }));
|
|
37
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* GenericRenderer Component
|
|
3
|
-
*
|
|
4
|
-
* Fallback renderer for unknown tools and MCP tools.
|
|
5
|
-
* Renders content[] as plain text with truncation.
|
|
6
|
-
*/
|
|
7
|
-
import type { ContentPart } from '@dexto/core';
|
|
8
|
-
interface GenericRendererProps {
|
|
9
|
-
/** Content parts from SanitizedToolResult */
|
|
10
|
-
content: ContentPart[];
|
|
11
|
-
/** Maximum lines to display before truncating */
|
|
12
|
-
maxLines?: number;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Renders tool result content as plain text.
|
|
16
|
-
* Used as fallback for tools without specific display data.
|
|
17
|
-
* Uses ⎿ character for continuation lines.
|
|
18
|
-
*/
|
|
19
|
-
export declare function GenericRenderer({ content, maxLines }: GenericRendererProps): import("react/jsx-runtime").JSX.Element | null;
|
|
20
|
-
export {};
|
|
21
|
-
//# sourceMappingURL=GenericRenderer.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"GenericRenderer.d.ts","sourceRoot":"","sources":["../../../../../src/cli/ink-cli/components/renderers/GenericRenderer.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE/C,UAAU,oBAAoB;IAC1B,6CAA6C;IAC7C,OAAO,EAAE,WAAW,EAAE,CAAC;IACvB,iDAAiD;IACjD,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,EAAE,OAAO,EAAE,QAAa,EAAE,EAAE,oBAAoB,kDA8C/E"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Box, Text } from 'ink';
|
|
3
|
-
/**
|
|
4
|
-
* Renders tool result content as plain text.
|
|
5
|
-
* Used as fallback for tools without specific display data.
|
|
6
|
-
* Uses ⎿ character for continuation lines.
|
|
7
|
-
*/
|
|
8
|
-
export function GenericRenderer({ content, maxLines = 15 }) {
|
|
9
|
-
// Extract text from content parts
|
|
10
|
-
const text = content
|
|
11
|
-
.filter((part) => part.type === 'text')
|
|
12
|
-
.map((part) => part.text)
|
|
13
|
-
.join('\n');
|
|
14
|
-
if (!text) {
|
|
15
|
-
return null;
|
|
16
|
-
}
|
|
17
|
-
const lines = text.split('\n').filter((line) => line.trim().length > 0);
|
|
18
|
-
const displayLines = lines.slice(0, maxLines);
|
|
19
|
-
const truncated = lines.length > maxLines;
|
|
20
|
-
// For single line results, show inline
|
|
21
|
-
if (lines.length === 1 && lines[0]) {
|
|
22
|
-
const line = lines[0];
|
|
23
|
-
return (_jsxs(Text, { color: "gray", children: [' ⎿ ', line.slice(0, 80), line.length > 80 ? '...' : ''] }));
|
|
24
|
-
}
|
|
25
|
-
return (_jsxs(Box, { flexDirection: "column", children: [_jsxs(Text, { color: "gray", children: [' ⎿ ', displayLines.length, " lines"] }), displayLines.map((line, i) => (_jsxs(Text, { color: "gray", wrap: "truncate", children: [' ⎿ ', line] }, i))), truncated && (_jsxs(Text, { color: "gray", children: [' ⎿ ', "... ", lines.length - maxLines, " more lines"] }))] }));
|
|
26
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* SearchRenderer Component
|
|
3
|
-
*
|
|
4
|
-
* Renders search results with file:line format.
|
|
5
|
-
* Used for grep_content and glob_files tool results.
|
|
6
|
-
*/
|
|
7
|
-
import type { SearchDisplayData } from '@dexto/core';
|
|
8
|
-
interface SearchRendererProps {
|
|
9
|
-
/** Search display data from tool result */
|
|
10
|
-
data: SearchDisplayData;
|
|
11
|
-
/** Maximum matches to display before truncating */
|
|
12
|
-
maxMatches?: number;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Renders search results with file paths and line numbers.
|
|
16
|
-
* Uses ⎿ character for continuation lines.
|
|
17
|
-
*/
|
|
18
|
-
export declare function SearchRenderer({ data, maxMatches }: SearchRendererProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
-
export {};
|
|
20
|
-
//# sourceMappingURL=SearchRenderer.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SearchRenderer.d.ts","sourceRoot":"","sources":["../../../../../src/cli/ink-cli/components/renderers/SearchRenderer.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAerD,UAAU,mBAAmB;IACzB,2CAA2C;IAC3C,IAAI,EAAE,iBAAiB,CAAC;IACxB,mDAAmD;IACnD,UAAU,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,EAAE,IAAI,EAAE,UAAc,EAAE,EAAE,mBAAmB,2CA8B3E"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import path from 'path';
|
|
3
|
-
import { Box, Text } from 'ink';
|
|
4
|
-
/**
|
|
5
|
-
* Convert absolute path to relative path from cwd
|
|
6
|
-
*/
|
|
7
|
-
function toRelativePath(absolutePath) {
|
|
8
|
-
const cwd = process.cwd();
|
|
9
|
-
const relative = path.relative(cwd, absolutePath);
|
|
10
|
-
if (relative === '')
|
|
11
|
-
return '.';
|
|
12
|
-
if (!relative.startsWith('..') && !path.isAbsolute(relative)) {
|
|
13
|
-
return relative;
|
|
14
|
-
}
|
|
15
|
-
return absolutePath;
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Renders search results with file paths and line numbers.
|
|
19
|
-
* Uses ⎿ character for continuation lines.
|
|
20
|
-
*/
|
|
21
|
-
export function SearchRenderer({ data, maxMatches = 5 }) {
|
|
22
|
-
const { pattern, matches, totalMatches, truncated: dataTruncated } = data;
|
|
23
|
-
const displayMatches = matches.slice(0, maxMatches);
|
|
24
|
-
const truncated = dataTruncated || matches.length > maxMatches;
|
|
25
|
-
return (_jsxs(Box, { flexDirection: "column", children: [_jsxs(Text, { color: "gray", children: [' ⎿ ', totalMatches, " match", totalMatches !== 1 ? 'es' : '', " for \"", pattern, "\"", truncated && ' (truncated)'] }), displayMatches.map((match, i) => (_jsxs(Text, { color: "gray", wrap: "truncate", children: [' ⎿ ', toRelativePath(match.file), match.line > 0 && `:${match.line}`] }, i))), matches.length > maxMatches && (_jsxs(Text, { color: "gray", children: [' ⎿ ', "... ", matches.length - maxMatches, " more"] }))] }));
|
|
26
|
-
}
|