dexto 1.6.0 → 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/agents/coding-agent/coding-agent.yml +3 -1
- 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/utils/session-logger-factory.d.ts.map +1 -1
- package/dist/utils/session-logger-factory.js +17 -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 +13 -23
- 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/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 -458
- 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 -339
- 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 -67
- 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 -18
- 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 -197
- 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 -120
- 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 -269
- 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 -22
- package/dist/cli/ink-cli/components/ElicitationForm.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/ElicitationForm.js +0 -358
- 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 -376
- 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 -432
- 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 -110
- 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 -36
- package/dist/cli/ink-cli/components/base/BaseSelector.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/base/BaseSelector.js +0 -118
- 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 -180
- 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 -46
- 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 -180
- 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 -107
- 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/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 -630
- 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 -147
- 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/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 -642
- 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 -609
- 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 -66
- package/dist/cli/ink-cli/components/renderers/FileRenderer.d.ts +0 -19
- package/dist/cli/ink-cli/components/renderers/FileRenderer.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/renderers/FileRenderer.js +0 -26
- 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 -25
- 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/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/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 -57
- 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 -639
- 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 -1824
- 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/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 -223
- 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 -942
- 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 -57
- 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 -366
- 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 -84
- 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/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 -140
- package/dist/cli/ink-cli/utils/messageFormatting.d.ts.map +0 -1
- package/dist/cli/ink-cli/utils/messageFormatting.js +0 -591
- 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/soundNotification.d.ts +0 -71
- package/dist/cli/ink-cli/utils/soundNotification.d.ts.map +0 -1
- package/dist/cli/ink-cli/utils/soundNotification.js +0 -203
- 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-DwtueA8l.js +0 -2059
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
/**
|
|
3
|
-
* PromptDeleteSelector Component
|
|
4
|
-
* Shows list of deletable prompts (config and shared only, not MCP)
|
|
5
|
-
*/
|
|
6
|
-
import { useState, useEffect, forwardRef, useRef, useImperativeHandle, useMemo, } from 'react';
|
|
7
|
-
import { Box, Text } from 'ink';
|
|
8
|
-
import { BaseSelector } from '../base/BaseSelector.js';
|
|
9
|
-
/**
|
|
10
|
-
* Check if a prompt is from commands directory (shared)
|
|
11
|
-
*/
|
|
12
|
-
function isSharedPrompt(prompt) {
|
|
13
|
-
const metadata = prompt.metadata;
|
|
14
|
-
if (metadata?.filePath) {
|
|
15
|
-
return (metadata.filePath.includes('/commands/') ||
|
|
16
|
-
metadata.filePath.includes('/.dexto/commands/'));
|
|
17
|
-
}
|
|
18
|
-
return false;
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Get file path from prompt metadata
|
|
22
|
-
*/
|
|
23
|
-
function getFilePath(prompt) {
|
|
24
|
-
const metadata = prompt.metadata;
|
|
25
|
-
return metadata?.filePath;
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* PromptDeleteSelector - shows deletable prompts
|
|
29
|
-
*/
|
|
30
|
-
const PromptDeleteSelector = forwardRef(function PromptDeleteSelector({ isVisible, onDelete, onClose, agent }, ref) {
|
|
31
|
-
const baseSelectorRef = useRef(null);
|
|
32
|
-
const [selectedIndex, setSelectedIndex] = useState(0);
|
|
33
|
-
const [deletablePrompts, setDeletablePrompts] = useState([]);
|
|
34
|
-
const [isLoading, setIsLoading] = useState(true);
|
|
35
|
-
// Forward handleInput to BaseSelector
|
|
36
|
-
useImperativeHandle(ref, () => ({
|
|
37
|
-
handleInput: (input, key) => {
|
|
38
|
-
return baseSelectorRef.current?.handleInput(input, key) ?? false;
|
|
39
|
-
},
|
|
40
|
-
}), []);
|
|
41
|
-
// Load deletable prompts when becoming visible
|
|
42
|
-
useEffect(() => {
|
|
43
|
-
if (isVisible) {
|
|
44
|
-
setIsLoading(true);
|
|
45
|
-
setSelectedIndex(0);
|
|
46
|
-
agent
|
|
47
|
-
.listPrompts()
|
|
48
|
-
.then((promptSet) => {
|
|
49
|
-
// Filter to only deletable prompts (config and shared, not MCP)
|
|
50
|
-
const prompts = Object.values(promptSet);
|
|
51
|
-
const deletable = [];
|
|
52
|
-
for (const prompt of prompts) {
|
|
53
|
-
// Skip MCP prompts - they can't be deleted
|
|
54
|
-
if (prompt.source === 'mcp')
|
|
55
|
-
continue;
|
|
56
|
-
const filePath = getFilePath(prompt);
|
|
57
|
-
const isShared = isSharedPrompt(prompt);
|
|
58
|
-
// Config prompts (inline or file-based in agent dir)
|
|
59
|
-
if (prompt.source === 'config' && !isShared) {
|
|
60
|
-
deletable.push({
|
|
61
|
-
prompt,
|
|
62
|
-
sourceType: 'config',
|
|
63
|
-
filePath,
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
// Shared prompts (from commands directory)
|
|
67
|
-
else if (prompt.source === 'config' && isShared) {
|
|
68
|
-
deletable.push({
|
|
69
|
-
prompt,
|
|
70
|
-
sourceType: 'shared',
|
|
71
|
-
filePath,
|
|
72
|
-
});
|
|
73
|
-
}
|
|
74
|
-
// Custom prompts (DB-stored)
|
|
75
|
-
else if (prompt.source === 'custom') {
|
|
76
|
-
deletable.push({
|
|
77
|
-
prompt,
|
|
78
|
-
sourceType: 'config', // Treat as config for deletion purposes
|
|
79
|
-
});
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
// Sort: config first, then shared
|
|
83
|
-
deletable.sort((a, b) => {
|
|
84
|
-
if (a.sourceType !== b.sourceType) {
|
|
85
|
-
return a.sourceType === 'config' ? -1 : 1;
|
|
86
|
-
}
|
|
87
|
-
const aName = a.prompt.displayName || a.prompt.name;
|
|
88
|
-
const bName = b.prompt.displayName || b.prompt.name;
|
|
89
|
-
return aName.localeCompare(bName);
|
|
90
|
-
});
|
|
91
|
-
setDeletablePrompts(deletable);
|
|
92
|
-
setIsLoading(false);
|
|
93
|
-
})
|
|
94
|
-
.catch(() => {
|
|
95
|
-
setDeletablePrompts([]);
|
|
96
|
-
setIsLoading(false);
|
|
97
|
-
});
|
|
98
|
-
}
|
|
99
|
-
}, [isVisible, agent]);
|
|
100
|
-
// Format item for display
|
|
101
|
-
const formatItem = (item, isSelected) => {
|
|
102
|
-
const displayName = item.prompt.displayName || item.prompt.name;
|
|
103
|
-
const sourceLabel = item.sourceType === 'shared' ? 'shared' : 'config';
|
|
104
|
-
const sourceColor = item.sourceType === 'shared' ? 'magenta' : 'blue';
|
|
105
|
-
return (_jsxs(Box, { children: [_jsx(Text, { color: isSelected ? 'red' : 'white', bold: isSelected, children: displayName }), item.prompt.title && _jsxs(Text, { color: "gray", children: [" - ", item.prompt.title] }), _jsxs(Text, { color: sourceColor, children: [" (", sourceLabel, ")"] })] }));
|
|
106
|
-
};
|
|
107
|
-
// Handle selection
|
|
108
|
-
const handleSelect = (item) => {
|
|
109
|
-
onDelete(item);
|
|
110
|
-
};
|
|
111
|
-
// Build items with info message if empty
|
|
112
|
-
const items = useMemo(() => {
|
|
113
|
-
return deletablePrompts;
|
|
114
|
-
}, [deletablePrompts]);
|
|
115
|
-
// Custom empty message
|
|
116
|
-
const emptyMessage = 'No deletable prompts found.\nMCP prompts cannot be deleted.';
|
|
117
|
-
return (_jsxs(Box, { flexDirection: "column", children: [_jsx(BaseSelector, { ref: baseSelectorRef, items: items, isVisible: isVisible, isLoading: isLoading, selectedIndex: selectedIndex, onSelectIndex: setSelectedIndex, onSelect: handleSelect, onClose: onClose, formatItem: formatItem, title: "Delete Prompt", borderColor: "red", emptyMessage: emptyMessage, maxVisibleItems: 10 }), isVisible && !isLoading && items.length > 0 && (_jsx(Box, { marginTop: 1, children: _jsx(Text, { color: "gray", italic: true, children: "Note: MCP prompts cannot be deleted (they come from servers)" }) }))] }));
|
|
118
|
-
});
|
|
119
|
-
export default PromptDeleteSelector;
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* PromptList Component
|
|
3
|
-
* Shows list of all prompts with Add/Delete actions
|
|
4
|
-
* Main screen of /prompts command
|
|
5
|
-
*/
|
|
6
|
-
import React from 'react';
|
|
7
|
-
import type { Key } from '../../hooks/useInputOrchestrator.js';
|
|
8
|
-
import type { DextoAgent, PromptInfo } from '@dexto/core';
|
|
9
|
-
export type PromptListAction = {
|
|
10
|
-
type: 'select-prompt';
|
|
11
|
-
prompt: PromptInfo;
|
|
12
|
-
} | {
|
|
13
|
-
type: 'add-prompt';
|
|
14
|
-
} | {
|
|
15
|
-
type: 'delete-prompt';
|
|
16
|
-
};
|
|
17
|
-
interface PromptListProps {
|
|
18
|
-
isVisible: boolean;
|
|
19
|
-
onAction: (action: PromptListAction) => void;
|
|
20
|
-
onLoadIntoInput: (text: string) => void;
|
|
21
|
-
onClose: () => void;
|
|
22
|
-
agent: DextoAgent;
|
|
23
|
-
}
|
|
24
|
-
export interface PromptListHandle {
|
|
25
|
-
handleInput: (input: string, key: Key) => boolean;
|
|
26
|
-
refresh: () => void;
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* PromptList - shows all prompts with Add/Delete actions
|
|
30
|
-
*/
|
|
31
|
-
declare const PromptList: React.ForwardRefExoticComponent<PromptListProps & React.RefAttributes<PromptListHandle>>;
|
|
32
|
-
export default PromptList;
|
|
33
|
-
//# sourceMappingURL=PromptList.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PromptList.d.ts","sourceRoot":"","sources":["../../../../../src/cli/ink-cli/components/overlays/PromptList.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAQN,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,qCAAqC,CAAC;AAC/D,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAG1D,MAAM,MAAM,gBAAgB,GACtB;IAAE,IAAI,EAAE,eAAe,CAAC;IAAC,MAAM,EAAE,UAAU,CAAA;CAAE,GAC7C;IAAE,IAAI,EAAE,YAAY,CAAA;CAAE,GACtB;IAAE,IAAI,EAAE,eAAe,CAAA;CAAE,CAAC;AAEhC,UAAU,eAAe;IACrB,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,CAAC,MAAM,EAAE,gBAAgB,KAAK,IAAI,CAAC;IAC7C,eAAe,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,KAAK,EAAE,UAAU,CAAC;CACrB;AAED,MAAM,WAAW,gBAAgB;IAC7B,WAAW,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,KAAK,OAAO,CAAC;IAClD,OAAO,EAAE,MAAM,IAAI,CAAC;CACvB;AAuCD;;GAEG;AACH,QAAA,MAAM,UAAU,0FAqKd,CAAC;AAEH,eAAe,UAAU,CAAC"}
|
|
@@ -1,147 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
/**
|
|
3
|
-
* PromptList Component
|
|
4
|
-
* Shows list of all prompts with Add/Delete actions
|
|
5
|
-
* Main screen of /prompts command
|
|
6
|
-
*/
|
|
7
|
-
import { useState, useEffect, forwardRef, useRef, useImperativeHandle, useMemo, useCallback, } from 'react';
|
|
8
|
-
import { Box, Text } from 'ink';
|
|
9
|
-
import { BaseSelector } from '../base/BaseSelector.js';
|
|
10
|
-
/**
|
|
11
|
-
* Get source indicator for display
|
|
12
|
-
*/
|
|
13
|
-
function getSourceIndicator(source) {
|
|
14
|
-
switch (source) {
|
|
15
|
-
case 'config':
|
|
16
|
-
return { icon: '📄', label: 'config', color: 'blue' };
|
|
17
|
-
case 'custom':
|
|
18
|
-
return { icon: '✨', label: 'custom', color: 'magenta' };
|
|
19
|
-
case 'mcp':
|
|
20
|
-
return { icon: '🔌', label: 'mcp', color: 'green' };
|
|
21
|
-
default:
|
|
22
|
-
return { icon: '📝', label: source, color: 'gray' };
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* Check if a prompt is from commands directory (shared)
|
|
27
|
-
*/
|
|
28
|
-
function isSharedPrompt(prompt) {
|
|
29
|
-
const metadata = prompt.metadata;
|
|
30
|
-
if (metadata?.filePath) {
|
|
31
|
-
// Normalize path separators for cross-platform compatibility (Windows uses \)
|
|
32
|
-
const normalizedPath = metadata.filePath.replaceAll('\\', '/');
|
|
33
|
-
return (normalizedPath.includes('/commands/') || normalizedPath.includes('/.dexto/commands/'));
|
|
34
|
-
}
|
|
35
|
-
return false;
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* PromptList - shows all prompts with Add/Delete actions
|
|
39
|
-
*/
|
|
40
|
-
const PromptList = forwardRef(function PromptList({ isVisible, onAction, onLoadIntoInput, onClose, agent }, ref) {
|
|
41
|
-
const baseSelectorRef = useRef(null);
|
|
42
|
-
const [selectedIndex, setSelectedIndex] = useState(0);
|
|
43
|
-
const [prompts, setPrompts] = useState([]);
|
|
44
|
-
const [isLoading, setIsLoading] = useState(true);
|
|
45
|
-
const [refreshKey, setRefreshKey] = useState(0);
|
|
46
|
-
// Load prompts function
|
|
47
|
-
const loadPrompts = useCallback(() => {
|
|
48
|
-
setIsLoading(true);
|
|
49
|
-
setSelectedIndex(0);
|
|
50
|
-
agent
|
|
51
|
-
.listPrompts()
|
|
52
|
-
.then((promptSet) => {
|
|
53
|
-
// Convert PromptSet to array and sort
|
|
54
|
-
const promptList = Object.values(promptSet);
|
|
55
|
-
// Sort: config first, then custom, then mcp
|
|
56
|
-
promptList.sort((a, b) => {
|
|
57
|
-
const order = { config: 0, custom: 1, mcp: 2 };
|
|
58
|
-
const aOrder = order[a.source] ?? 3;
|
|
59
|
-
const bOrder = order[b.source] ?? 3;
|
|
60
|
-
if (aOrder !== bOrder)
|
|
61
|
-
return aOrder - bOrder;
|
|
62
|
-
// Within same source, sort alphabetically
|
|
63
|
-
return (a.displayName || a.name).localeCompare(b.displayName || b.name);
|
|
64
|
-
});
|
|
65
|
-
setPrompts(promptList);
|
|
66
|
-
setIsLoading(false);
|
|
67
|
-
})
|
|
68
|
-
.catch((err) => {
|
|
69
|
-
console.error(`PromptList: Failed to load prompts: ${err}`);
|
|
70
|
-
setPrompts([]);
|
|
71
|
-
setIsLoading(false);
|
|
72
|
-
});
|
|
73
|
-
}, [agent]);
|
|
74
|
-
// Forward handleInput and refresh to ref
|
|
75
|
-
useImperativeHandle(ref, () => ({
|
|
76
|
-
handleInput: (input, key) => {
|
|
77
|
-
return baseSelectorRef.current?.handleInput(input, key) ?? false;
|
|
78
|
-
},
|
|
79
|
-
refresh: () => {
|
|
80
|
-
setRefreshKey((k) => k + 1);
|
|
81
|
-
},
|
|
82
|
-
}), []);
|
|
83
|
-
// Load prompts when becoming visible or refreshKey changes
|
|
84
|
-
useEffect(() => {
|
|
85
|
-
if (isVisible) {
|
|
86
|
-
loadPrompts();
|
|
87
|
-
}
|
|
88
|
-
}, [isVisible, refreshKey, loadPrompts]);
|
|
89
|
-
// Build list items: prompts + Add/Delete actions
|
|
90
|
-
const items = useMemo(() => {
|
|
91
|
-
const list = prompts.map((prompt) => ({
|
|
92
|
-
id: prompt.name,
|
|
93
|
-
type: 'prompt',
|
|
94
|
-
prompt,
|
|
95
|
-
}));
|
|
96
|
-
// Add action items at the end
|
|
97
|
-
list.push({
|
|
98
|
-
id: '__add__',
|
|
99
|
-
type: 'add',
|
|
100
|
-
});
|
|
101
|
-
list.push({
|
|
102
|
-
id: '__delete__',
|
|
103
|
-
type: 'delete',
|
|
104
|
-
});
|
|
105
|
-
return list;
|
|
106
|
-
}, [prompts]);
|
|
107
|
-
// Format item for display
|
|
108
|
-
const formatItem = (item, isSelected) => {
|
|
109
|
-
if (item.type === 'add') {
|
|
110
|
-
return (_jsx(Box, { children: _jsx(Text, { color: isSelected ? 'green' : 'gray', bold: isSelected, children: "+ Add new prompt" }) }));
|
|
111
|
-
}
|
|
112
|
-
if (item.type === 'delete') {
|
|
113
|
-
return (_jsx(Box, { children: _jsx(Text, { color: isSelected ? 'red' : 'gray', bold: isSelected, children: "- Delete a prompt" }) }));
|
|
114
|
-
}
|
|
115
|
-
// Prompt item
|
|
116
|
-
const prompt = item.prompt;
|
|
117
|
-
const displayName = prompt.displayName || prompt.name;
|
|
118
|
-
// For plugin skills, use namespace (plugin name) as source
|
|
119
|
-
const metadata = prompt.metadata;
|
|
120
|
-
const effectiveSource = metadata?.namespace ? String(metadata.namespace) : prompt.source;
|
|
121
|
-
const sourceInfo = getSourceIndicator(effectiveSource);
|
|
122
|
-
const isShared = isSharedPrompt(prompt);
|
|
123
|
-
const sourceLabel = isShared ? 'shared' : sourceInfo.label;
|
|
124
|
-
return (_jsxs(Box, { children: [_jsx(Text, { color: isSelected ? 'cyan' : 'white', bold: isSelected, children: displayName }), prompt.title && _jsxs(Text, { color: "gray", children: [" - ", prompt.title] }), _jsxs(Text, { color: sourceInfo.color, children: [" (", sourceLabel, ")"] })] }));
|
|
125
|
-
};
|
|
126
|
-
// Handle selection
|
|
127
|
-
const handleSelect = (item) => {
|
|
128
|
-
if (item.type === 'add') {
|
|
129
|
-
onAction({ type: 'add-prompt' });
|
|
130
|
-
}
|
|
131
|
-
else if (item.type === 'delete') {
|
|
132
|
-
onAction({ type: 'delete-prompt' });
|
|
133
|
-
}
|
|
134
|
-
else if (item.prompt) {
|
|
135
|
-
onAction({ type: 'select-prompt', prompt: item.prompt });
|
|
136
|
-
}
|
|
137
|
-
};
|
|
138
|
-
// Handle Tab to load into input
|
|
139
|
-
const handleTab = (item) => {
|
|
140
|
-
if (item.type === 'prompt' && item.prompt) {
|
|
141
|
-
const displayName = item.prompt.displayName || item.prompt.name;
|
|
142
|
-
onLoadIntoInput(`/${displayName} `);
|
|
143
|
-
}
|
|
144
|
-
};
|
|
145
|
-
return (_jsx(BaseSelector, { ref: baseSelectorRef, items: items, isVisible: isVisible, isLoading: isLoading, selectedIndex: selectedIndex, onSelectIndex: setSelectedIndex, onSelect: handleSelect, onClose: onClose, formatItem: formatItem, onTab: handleTab, supportsTab: true, title: "Prompts", borderColor: "yellowBright", emptyMessage: "No prompts configured", maxVisibleItems: 12 }));
|
|
146
|
-
});
|
|
147
|
-
export default PromptList;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* SearchOverlay Component
|
|
3
|
-
* Interactive search overlay with real-time results and navigation
|
|
4
|
-
*/
|
|
5
|
-
import React from 'react';
|
|
6
|
-
import type { Key } from '../../hooks/useInputOrchestrator.js';
|
|
7
|
-
import type { DextoAgent } from '@dexto/core';
|
|
8
|
-
import type { SearchResult } from '@dexto/core';
|
|
9
|
-
export interface SearchOverlayProps {
|
|
10
|
-
isVisible: boolean;
|
|
11
|
-
onClose: () => void;
|
|
12
|
-
onSelectResult?: (result: SearchResult) => void;
|
|
13
|
-
agent: DextoAgent;
|
|
14
|
-
}
|
|
15
|
-
export interface SearchOverlayHandle {
|
|
16
|
-
handleInput: (input: string, key: Key) => boolean;
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Interactive search overlay - search messages across sessions
|
|
20
|
-
*/
|
|
21
|
-
declare const SearchOverlay: React.ForwardRefExoticComponent<SearchOverlayProps & React.RefAttributes<SearchOverlayHandle>>;
|
|
22
|
-
export default SearchOverlay;
|
|
23
|
-
//# sourceMappingURL=SearchOverlay.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SearchOverlay.d.ts","sourceRoot":"","sources":["../../../../../src/cli/ink-cli/components/overlays/SearchOverlay.tsx"],"names":[],"mappings":"AAAA;;;GAGG;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;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD,MAAM,WAAW,kBAAkB;IAC/B,SAAS,EAAE,OAAO,CAAC;IACnB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,YAAY,KAAK,IAAI,CAAC;IAChD,KAAK,EAAE,UAAU,CAAC;CACrB;AAED,MAAM,WAAW,mBAAmB;IAChC,WAAW,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,KAAK,OAAO,CAAC;CACrD;AAeD;;GAEG;AACH,QAAA,MAAM,aAAa,gGAqSjB,CAAC;AAcH,eAAe,aAAa,CAAC"}
|
|
@@ -1,189 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
/**
|
|
3
|
-
* SearchOverlay Component
|
|
4
|
-
* Interactive search overlay with real-time results and navigation
|
|
5
|
-
*/
|
|
6
|
-
import { useState, useEffect, useRef, forwardRef, useImperativeHandle, useCallback, } from 'react';
|
|
7
|
-
import { Box, Text } from 'ink';
|
|
8
|
-
const MAX_VISIBLE_RESULTS = 6;
|
|
9
|
-
const SEARCH_DEBOUNCE_MS = 300;
|
|
10
|
-
/**
|
|
11
|
-
* Interactive search overlay - search messages across sessions
|
|
12
|
-
*/
|
|
13
|
-
const SearchOverlay = forwardRef(function SearchOverlay({ isVisible, onClose, onSelectResult, agent }, ref) {
|
|
14
|
-
const [state, setState] = useState({
|
|
15
|
-
query: '',
|
|
16
|
-
results: [],
|
|
17
|
-
isLoading: false,
|
|
18
|
-
selectedIndex: 0,
|
|
19
|
-
total: 0,
|
|
20
|
-
hasMore: false,
|
|
21
|
-
error: null,
|
|
22
|
-
});
|
|
23
|
-
const searchTimeoutRef = useRef(null);
|
|
24
|
-
const scrollOffset = useRef(0);
|
|
25
|
-
// Monotonic counter to prevent out-of-order async responses from overwriting newer results
|
|
26
|
-
const searchSeqRef = useRef(0);
|
|
27
|
-
// Reset state when becoming visible
|
|
28
|
-
useEffect(() => {
|
|
29
|
-
if (isVisible) {
|
|
30
|
-
setState({
|
|
31
|
-
query: '',
|
|
32
|
-
results: [],
|
|
33
|
-
isLoading: false,
|
|
34
|
-
selectedIndex: 0,
|
|
35
|
-
total: 0,
|
|
36
|
-
hasMore: false,
|
|
37
|
-
error: null,
|
|
38
|
-
});
|
|
39
|
-
scrollOffset.current = 0;
|
|
40
|
-
}
|
|
41
|
-
}, [isVisible]);
|
|
42
|
-
// Debounced search
|
|
43
|
-
const performSearch = useCallback(async (query) => {
|
|
44
|
-
// Increment sequence to track this request
|
|
45
|
-
const seq = ++searchSeqRef.current;
|
|
46
|
-
if (!query.trim()) {
|
|
47
|
-
setState((prev) => ({
|
|
48
|
-
...prev,
|
|
49
|
-
results: [],
|
|
50
|
-
total: 0,
|
|
51
|
-
hasMore: false,
|
|
52
|
-
isLoading: false,
|
|
53
|
-
error: null,
|
|
54
|
-
}));
|
|
55
|
-
return;
|
|
56
|
-
}
|
|
57
|
-
setState((prev) => ({ ...prev, isLoading: true, error: null }));
|
|
58
|
-
try {
|
|
59
|
-
const response = await agent.searchMessages(query, { limit: 20 });
|
|
60
|
-
// Only apply results if this is still the latest request
|
|
61
|
-
if (seq !== searchSeqRef.current)
|
|
62
|
-
return;
|
|
63
|
-
setState((prev) => ({
|
|
64
|
-
...prev,
|
|
65
|
-
results: response.results,
|
|
66
|
-
total: response.total,
|
|
67
|
-
hasMore: response.hasMore,
|
|
68
|
-
isLoading: false,
|
|
69
|
-
selectedIndex: 0,
|
|
70
|
-
}));
|
|
71
|
-
scrollOffset.current = 0;
|
|
72
|
-
}
|
|
73
|
-
catch (error) {
|
|
74
|
-
// Only apply error if this is still the latest request
|
|
75
|
-
if (seq !== searchSeqRef.current)
|
|
76
|
-
return;
|
|
77
|
-
setState((prev) => ({
|
|
78
|
-
...prev,
|
|
79
|
-
results: [],
|
|
80
|
-
total: 0,
|
|
81
|
-
hasMore: false,
|
|
82
|
-
isLoading: false,
|
|
83
|
-
error: error instanceof Error ? error.message : 'Search failed',
|
|
84
|
-
}));
|
|
85
|
-
}
|
|
86
|
-
}, [agent]);
|
|
87
|
-
// Handle input changes with debounce
|
|
88
|
-
const updateQuery = useCallback((newQuery) => {
|
|
89
|
-
setState((prev) => ({ ...prev, query: newQuery }));
|
|
90
|
-
// Clear existing timeout
|
|
91
|
-
if (searchTimeoutRef.current) {
|
|
92
|
-
clearTimeout(searchTimeoutRef.current);
|
|
93
|
-
}
|
|
94
|
-
// Debounce search
|
|
95
|
-
searchTimeoutRef.current = setTimeout(() => {
|
|
96
|
-
void performSearch(newQuery);
|
|
97
|
-
}, SEARCH_DEBOUNCE_MS);
|
|
98
|
-
}, [performSearch]);
|
|
99
|
-
// Cleanup timeout on unmount
|
|
100
|
-
useEffect(() => {
|
|
101
|
-
return () => {
|
|
102
|
-
if (searchTimeoutRef.current) {
|
|
103
|
-
clearTimeout(searchTimeoutRef.current);
|
|
104
|
-
}
|
|
105
|
-
};
|
|
106
|
-
}, []);
|
|
107
|
-
// Handle keyboard input
|
|
108
|
-
useImperativeHandle(ref, () => ({
|
|
109
|
-
handleInput: (input, key) => {
|
|
110
|
-
if (!isVisible)
|
|
111
|
-
return false;
|
|
112
|
-
// Escape to close
|
|
113
|
-
if (key.escape) {
|
|
114
|
-
onClose();
|
|
115
|
-
return true;
|
|
116
|
-
}
|
|
117
|
-
// Enter to select result
|
|
118
|
-
if (key.return && state.results.length > 0) {
|
|
119
|
-
const selectedResult = state.results[state.selectedIndex];
|
|
120
|
-
if (selectedResult && onSelectResult) {
|
|
121
|
-
onSelectResult(selectedResult);
|
|
122
|
-
}
|
|
123
|
-
onClose();
|
|
124
|
-
return true;
|
|
125
|
-
}
|
|
126
|
-
// Arrow up
|
|
127
|
-
if (key.upArrow) {
|
|
128
|
-
setState((prev) => {
|
|
129
|
-
const newIndex = Math.max(0, prev.selectedIndex - 1);
|
|
130
|
-
// Adjust scroll offset if needed
|
|
131
|
-
if (newIndex < scrollOffset.current) {
|
|
132
|
-
scrollOffset.current = newIndex;
|
|
133
|
-
}
|
|
134
|
-
return { ...prev, selectedIndex: newIndex };
|
|
135
|
-
});
|
|
136
|
-
return true;
|
|
137
|
-
}
|
|
138
|
-
// Arrow down
|
|
139
|
-
if (key.downArrow) {
|
|
140
|
-
setState((prev) => {
|
|
141
|
-
const newIndex = Math.min(prev.results.length - 1, prev.selectedIndex + 1);
|
|
142
|
-
// Adjust scroll offset if needed
|
|
143
|
-
if (newIndex >= scrollOffset.current + MAX_VISIBLE_RESULTS) {
|
|
144
|
-
scrollOffset.current = newIndex - MAX_VISIBLE_RESULTS + 1;
|
|
145
|
-
}
|
|
146
|
-
return { ...prev, selectedIndex: newIndex };
|
|
147
|
-
});
|
|
148
|
-
return true;
|
|
149
|
-
}
|
|
150
|
-
// Backspace
|
|
151
|
-
if (key.backspace || key.delete) {
|
|
152
|
-
updateQuery(state.query.slice(0, -1));
|
|
153
|
-
return true;
|
|
154
|
-
}
|
|
155
|
-
// Regular character input
|
|
156
|
-
if (input && !key.ctrl && !key.meta) {
|
|
157
|
-
updateQuery(state.query + input);
|
|
158
|
-
return true;
|
|
159
|
-
}
|
|
160
|
-
return false;
|
|
161
|
-
},
|
|
162
|
-
}), [isVisible, onClose, onSelectResult, state, updateQuery]);
|
|
163
|
-
if (!isVisible)
|
|
164
|
-
return null;
|
|
165
|
-
// Calculate visible results window
|
|
166
|
-
const visibleResults = state.results.slice(scrollOffset.current, scrollOffset.current + MAX_VISIBLE_RESULTS);
|
|
167
|
-
return (_jsxs(Box, { flexDirection: "column", borderStyle: "round", borderColor: "cyan", paddingX: 1, children: [_jsxs(Box, { marginBottom: 1, children: [_jsx(Text, { bold: true, color: "cyan", children: "Search Messages" }), state.total > 0 && (_jsxs(Text, { color: "gray", children: [' ', "(", state.total, " result", state.total !== 1 ? 's' : '', ")"] }))] }), _jsxs(Box, { children: [_jsx(Text, { color: "cyan", children: "> " }), _jsx(Text, { children: state.query }), _jsx(Text, { color: "cyan", children: "_" })] }), state.isLoading && (_jsx(Box, { marginTop: 1, children: _jsx(Text, { color: "yellowBright", children: "Searching..." }) })), state.error && (_jsx(Box, { marginTop: 1, children: _jsx(Text, { color: "red", children: state.error }) })), !state.isLoading && state.results.length > 0 && (_jsxs(Box, { flexDirection: "column", marginTop: 1, children: [visibleResults.map((result, idx) => {
|
|
168
|
-
const actualIndex = scrollOffset.current + idx;
|
|
169
|
-
const isSelected = actualIndex === state.selectedIndex;
|
|
170
|
-
const roleColor = result.message.role === 'user'
|
|
171
|
-
? 'blue'
|
|
172
|
-
: result.message.role === 'assistant'
|
|
173
|
-
? 'green'
|
|
174
|
-
: 'yellowBright';
|
|
175
|
-
return (_jsxs(Box, { flexDirection: "column", paddingLeft: isSelected ? 0 : 2, children: [_jsxs(Box, { children: [isSelected && (_jsx(Text, { color: "cyan", bold: true, children: '> ' })), _jsx(Text, { color: "gray", children: result.sessionId.slice(0, 8) }), _jsx(Text, { children: " " }), _jsxs(Text, { color: roleColor, bold: isSelected, children: ["[", result.message.role, "]"] })] }), _jsx(Box, { paddingLeft: isSelected ? 2 : 0, children: _jsxs(Text, { color: isSelected ? 'white' : 'gray', children: [' ', truncateContext(result.context, 60)] }) })] }, `${result.sessionId}-${result.messageIndex}`));
|
|
176
|
-
}), state.results.length > MAX_VISIBLE_RESULTS && (_jsx(Box, { marginTop: 1, children: _jsxs(Text, { color: "gray", children: ["Showing ", scrollOffset.current + 1, "-", Math.min(scrollOffset.current + MAX_VISIBLE_RESULTS, state.results.length), ' ', "of ", state.results.length, state.hasMore ? '+' : ''] }) }))] })), !state.isLoading && state.query && state.results.length === 0 && !state.error && (_jsx(Box, { marginTop: 1, children: _jsxs(Text, { color: "gray", children: ["No results found for \"", state.query, "\""] }) })), _jsx(Box, { marginTop: 1, children: _jsx(Text, { color: "gray", children: "\u2191\u2193 navigate \u2022 Enter select \u2022 Esc close" }) })] }));
|
|
177
|
-
});
|
|
178
|
-
/**
|
|
179
|
-
* Truncate context text for display
|
|
180
|
-
*/
|
|
181
|
-
function truncateContext(context, maxLength) {
|
|
182
|
-
// Clean up whitespace
|
|
183
|
-
const cleaned = context.replace(/\s+/g, ' ').trim();
|
|
184
|
-
if (cleaned.length <= maxLength) {
|
|
185
|
-
return cleaned;
|
|
186
|
-
}
|
|
187
|
-
return cleaned.slice(0, maxLength - 3) + '...';
|
|
188
|
-
}
|
|
189
|
-
export default SearchOverlay;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* SessionRenameOverlay Component
|
|
3
|
-
* Interactive overlay for renaming the current session
|
|
4
|
-
*/
|
|
5
|
-
import React from 'react';
|
|
6
|
-
import type { Key } from '../../hooks/useInputOrchestrator.js';
|
|
7
|
-
export interface SessionRenameOverlayProps {
|
|
8
|
-
isVisible: boolean;
|
|
9
|
-
currentTitle: string | undefined;
|
|
10
|
-
onRename: (newTitle: string) => void;
|
|
11
|
-
onClose: () => void;
|
|
12
|
-
}
|
|
13
|
-
export interface SessionRenameOverlayHandle {
|
|
14
|
-
handleInput: (input: string, key: Key) => boolean;
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Session rename overlay - allows user to edit the session title
|
|
18
|
-
*/
|
|
19
|
-
declare const SessionRenameOverlay: React.ForwardRefExoticComponent<SessionRenameOverlayProps & React.RefAttributes<SessionRenameOverlayHandle>>;
|
|
20
|
-
export default SessionRenameOverlay;
|
|
21
|
-
//# sourceMappingURL=SessionRenameOverlay.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SessionRenameOverlay.d.ts","sourceRoot":"","sources":["../../../../../src/cli/ink-cli/components/overlays/SessionRenameOverlay.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAA4E,MAAM,OAAO,CAAC;AAEjG,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,qCAAqC,CAAC;AAE/D,MAAM,WAAW,yBAAyB;IACtC,SAAS,EAAE,OAAO,CAAC;IACnB,YAAY,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,QAAQ,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,OAAO,EAAE,MAAM,IAAI,CAAC;CACvB;AAED,MAAM,WAAW,0BAA0B;IACvC,WAAW,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,KAAK,OAAO,CAAC;CACrD;AAED;;GAEG;AACH,QAAA,MAAM,oBAAoB,8GAkHzB,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
/**
|
|
3
|
-
* SessionRenameOverlay Component
|
|
4
|
-
* Interactive overlay for renaming the current session
|
|
5
|
-
*/
|
|
6
|
-
import { useState, useEffect, forwardRef, useImperativeHandle, useCallback } from 'react';
|
|
7
|
-
import { Box, Text } from 'ink';
|
|
8
|
-
/**
|
|
9
|
-
* Session rename overlay - allows user to edit the session title
|
|
10
|
-
*/
|
|
11
|
-
const SessionRenameOverlay = forwardRef(function SessionRenameOverlay({ isVisible, currentTitle, onRename, onClose }, ref) {
|
|
12
|
-
const [title, setTitle] = useState(currentTitle || '');
|
|
13
|
-
const [error, setError] = useState(null);
|
|
14
|
-
// Reset when becoming visible
|
|
15
|
-
useEffect(() => {
|
|
16
|
-
if (isVisible) {
|
|
17
|
-
setTitle(currentTitle || '');
|
|
18
|
-
setError(null);
|
|
19
|
-
}
|
|
20
|
-
}, [isVisible, currentTitle]);
|
|
21
|
-
const handleSubmit = useCallback(() => {
|
|
22
|
-
const trimmedTitle = title.trim();
|
|
23
|
-
if (!trimmedTitle) {
|
|
24
|
-
setError('Title cannot be empty');
|
|
25
|
-
return;
|
|
26
|
-
}
|
|
27
|
-
onRename(trimmedTitle);
|
|
28
|
-
}, [title, onRename]);
|
|
29
|
-
// Handle keyboard input
|
|
30
|
-
useImperativeHandle(ref, () => ({
|
|
31
|
-
handleInput: (input, key) => {
|
|
32
|
-
if (!isVisible)
|
|
33
|
-
return false;
|
|
34
|
-
// Escape to close
|
|
35
|
-
if (key.escape) {
|
|
36
|
-
onClose();
|
|
37
|
-
return true;
|
|
38
|
-
}
|
|
39
|
-
// Enter to submit
|
|
40
|
-
if (key.return) {
|
|
41
|
-
handleSubmit();
|
|
42
|
-
return true;
|
|
43
|
-
}
|
|
44
|
-
// Backspace
|
|
45
|
-
if (key.backspace || key.delete) {
|
|
46
|
-
setTitle((prev) => prev.slice(0, -1));
|
|
47
|
-
setError(null);
|
|
48
|
-
return true;
|
|
49
|
-
}
|
|
50
|
-
// Regular character input
|
|
51
|
-
if (input && !key.ctrl && !key.meta) {
|
|
52
|
-
setTitle((prev) => prev + input);
|
|
53
|
-
setError(null);
|
|
54
|
-
return true;
|
|
55
|
-
}
|
|
56
|
-
return false;
|
|
57
|
-
},
|
|
58
|
-
}), [isVisible, onClose, handleSubmit]);
|
|
59
|
-
if (!isVisible)
|
|
60
|
-
return null;
|
|
61
|
-
return (_jsxs(Box, { flexDirection: "column", borderStyle: "round", borderColor: "cyan", paddingX: 1, marginTop: 1, children: [_jsx(Box, { marginBottom: 1, children: _jsx(Text, { bold: true, color: "cyan", children: "Rename Session" }) }), currentTitle && (_jsxs(Box, { marginBottom: 1, children: [_jsx(Text, { color: "gray", children: "Current: " }), _jsx(Text, { color: "white", children: currentTitle })] })), _jsx(Box, { flexDirection: "column", children: _jsx(Text, { bold: true, children: "Enter new title:" }) }), _jsxs(Box, { marginTop: 1, children: [_jsx(Text, { color: "cyan", children: "> " }), _jsx(Text, { children: title }), _jsx(Text, { color: "cyan", children: "_" })] }), error && (_jsx(Box, { marginTop: 1, children: _jsx(Text, { color: "red", children: error }) })), _jsx(Box, { marginTop: 1, children: _jsx(Text, { color: "gray", children: "Enter to save \u2022 Esc to cancel" }) })] }));
|
|
62
|
-
});
|
|
63
|
-
export default SessionRenameOverlay;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* SessionSelector Component (Refactored)
|
|
3
|
-
* Now a thin wrapper around BaseSelector
|
|
4
|
-
* Eliminates ~200 lines of code by using base component
|
|
5
|
-
*/
|
|
6
|
-
import React from 'react';
|
|
7
|
-
import type { Key } from '../../hooks/useInputOrchestrator.js';
|
|
8
|
-
import type { DextoAgent } from '@dexto/core';
|
|
9
|
-
interface SessionSelectorProps {
|
|
10
|
-
isVisible: boolean;
|
|
11
|
-
onSelectSession: (sessionId: string) => void;
|
|
12
|
-
onClose: () => void;
|
|
13
|
-
agent: DextoAgent;
|
|
14
|
-
currentSessionId?: string | undefined;
|
|
15
|
-
}
|
|
16
|
-
export interface SessionSelectorHandle {
|
|
17
|
-
handleInput: (input: string, key: Key) => boolean;
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* Session selector - now a thin wrapper around BaseSelector
|
|
21
|
-
* Provides data fetching and formatting only
|
|
22
|
-
* Uses explicit currentSessionId prop (WebUI pattern) instead of getCurrentSessionId
|
|
23
|
-
*/
|
|
24
|
-
declare const SessionSelector: React.ForwardRefExoticComponent<SessionSelectorProps & React.RefAttributes<SessionSelectorHandle>>;
|
|
25
|
-
export default SessionSelector;
|
|
26
|
-
//# sourceMappingURL=SessionSelectorRefactored.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SessionSelectorRefactored.d.ts","sourceRoot":"","sources":["../../../../../src/cli/ink-cli/components/overlays/SessionSelectorRefactored.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAuE,MAAM,OAAO,CAAC;AAE5F,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,qCAAqC,CAAC;AAC/D,OAAO,KAAK,EAAE,UAAU,EAAmB,MAAM,aAAa,CAAC;AAI/D,UAAU,oBAAoB;IAC1B,SAAS,EAAE,OAAO,CAAC;IACnB,eAAe,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7C,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,KAAK,EAAE,UAAU,CAAC;IAClB,gBAAgB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACzC;AAED,MAAM,WAAW,qBAAqB;IAClC,WAAW,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,KAAK,OAAO,CAAC;CACrD;AAQD;;;;GAIG;AACH,QAAA,MAAM,eAAe,oGA+JpB,CAAC;AAEF,eAAe,eAAe,CAAC"}
|