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,308 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
/**
|
|
3
|
-
* ExportWizard Component
|
|
4
|
-
* Interactive wizard for exporting conversation to markdown or JSON
|
|
5
|
-
*/
|
|
6
|
-
import { useState, useEffect, forwardRef, useImperativeHandle, useCallback } from 'react';
|
|
7
|
-
import { Box, Text } from 'ink';
|
|
8
|
-
import fs from 'fs/promises';
|
|
9
|
-
import path from 'path';
|
|
10
|
-
/**
|
|
11
|
-
* Generate default filename based on date and session ID
|
|
12
|
-
*/
|
|
13
|
-
function generateDefaultFilename(sessionId, format) {
|
|
14
|
-
const date = new Date().toISOString().split('T')[0]; // YYYY-MM-DD
|
|
15
|
-
const shortId = sessionId ? sessionId.slice(0, 6) : 'unknown';
|
|
16
|
-
const ext = format === 'markdown' ? 'md' : 'json';
|
|
17
|
-
return `conversation-${date}-${shortId}.${ext}`;
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* Format conversation history as Markdown
|
|
21
|
-
*/
|
|
22
|
-
function formatAsMarkdown(messages, metadata, includeToolCalls) {
|
|
23
|
-
const lines = [];
|
|
24
|
-
// Header
|
|
25
|
-
lines.push('# Conversation Export');
|
|
26
|
-
lines.push('');
|
|
27
|
-
lines.push(`- **Session**: ${metadata.sessionId}`);
|
|
28
|
-
if (metadata.title) {
|
|
29
|
-
lines.push(`- **Title**: ${metadata.title}`);
|
|
30
|
-
}
|
|
31
|
-
if (metadata.createdAt) {
|
|
32
|
-
lines.push(`- **Created**: ${metadata.createdAt}`);
|
|
33
|
-
}
|
|
34
|
-
lines.push(`- **Exported**: ${new Date().toISOString()}`);
|
|
35
|
-
lines.push('');
|
|
36
|
-
lines.push('---');
|
|
37
|
-
lines.push('');
|
|
38
|
-
// Messages
|
|
39
|
-
for (const msg of messages) {
|
|
40
|
-
const role = msg.role.charAt(0).toUpperCase() + msg.role.slice(1);
|
|
41
|
-
// Skip tool messages if not including tool calls
|
|
42
|
-
if (!includeToolCalls && msg.role === 'tool') {
|
|
43
|
-
continue;
|
|
44
|
-
}
|
|
45
|
-
lines.push(`## ${role}`);
|
|
46
|
-
if (msg.timestamp) {
|
|
47
|
-
lines.push(`*${msg.timestamp}*`);
|
|
48
|
-
}
|
|
49
|
-
lines.push('');
|
|
50
|
-
// Handle different content types
|
|
51
|
-
if (typeof msg.content === 'string') {
|
|
52
|
-
lines.push(msg.content);
|
|
53
|
-
}
|
|
54
|
-
else if (Array.isArray(msg.content)) {
|
|
55
|
-
// Handle content parts (text, tool calls, tool results)
|
|
56
|
-
for (const part of msg.content) {
|
|
57
|
-
if (typeof part === 'string') {
|
|
58
|
-
lines.push(part);
|
|
59
|
-
}
|
|
60
|
-
else if (part && typeof part === 'object') {
|
|
61
|
-
if ('text' in part) {
|
|
62
|
-
lines.push(String(part.text));
|
|
63
|
-
}
|
|
64
|
-
else if ('type' in part && part.type === 'tool-call' && includeToolCalls) {
|
|
65
|
-
const toolCall = part;
|
|
66
|
-
lines.push('');
|
|
67
|
-
lines.push(`### Tool: ${toolCall.toolName || 'unknown'}`);
|
|
68
|
-
lines.push('```json');
|
|
69
|
-
lines.push(JSON.stringify(toolCall.args || {}, null, 2));
|
|
70
|
-
lines.push('```');
|
|
71
|
-
}
|
|
72
|
-
else if ('type' in part && part.type === 'tool-result' && includeToolCalls) {
|
|
73
|
-
const toolResult = part;
|
|
74
|
-
lines.push('');
|
|
75
|
-
lines.push('<details>');
|
|
76
|
-
lines.push(`<summary>Result: ${toolResult.toolName || 'unknown'}</summary>`);
|
|
77
|
-
lines.push('');
|
|
78
|
-
lines.push('```');
|
|
79
|
-
const resultStr = typeof toolResult.result === 'string'
|
|
80
|
-
? toolResult.result
|
|
81
|
-
: JSON.stringify(toolResult.result, null, 2);
|
|
82
|
-
// Truncate very long results
|
|
83
|
-
if (resultStr.length > 2000) {
|
|
84
|
-
lines.push(resultStr.slice(0, 2000) + '\n... (truncated)');
|
|
85
|
-
}
|
|
86
|
-
else {
|
|
87
|
-
lines.push(resultStr);
|
|
88
|
-
}
|
|
89
|
-
lines.push('```');
|
|
90
|
-
lines.push('</details>');
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
else if (msg.content && typeof msg.content === 'object') {
|
|
96
|
-
lines.push('```json');
|
|
97
|
-
lines.push(JSON.stringify(msg.content, null, 2));
|
|
98
|
-
lines.push('```');
|
|
99
|
-
}
|
|
100
|
-
lines.push('');
|
|
101
|
-
lines.push('---');
|
|
102
|
-
lines.push('');
|
|
103
|
-
}
|
|
104
|
-
return lines.join('\n');
|
|
105
|
-
}
|
|
106
|
-
/**
|
|
107
|
-
* Format conversation history as JSON
|
|
108
|
-
*/
|
|
109
|
-
function formatAsJson(messages, metadata, includeToolCalls) {
|
|
110
|
-
const filteredMessages = includeToolCalls
|
|
111
|
-
? messages
|
|
112
|
-
: messages
|
|
113
|
-
.filter((m) => m.role !== 'tool')
|
|
114
|
-
.map((m) => ({
|
|
115
|
-
...m,
|
|
116
|
-
content: Array.isArray(m.content)
|
|
117
|
-
? m.content.filter((part) => {
|
|
118
|
-
if (!part || typeof part !== 'object')
|
|
119
|
-
return true;
|
|
120
|
-
return !('type' in part &&
|
|
121
|
-
(part.type === 'tool-call' || part.type === 'tool-result'));
|
|
122
|
-
})
|
|
123
|
-
: m.content,
|
|
124
|
-
}));
|
|
125
|
-
return JSON.stringify({
|
|
126
|
-
exportedAt: new Date().toISOString(),
|
|
127
|
-
session: metadata,
|
|
128
|
-
messages: filteredMessages,
|
|
129
|
-
}, null, 2);
|
|
130
|
-
}
|
|
131
|
-
/**
|
|
132
|
-
* Interactive wizard for exporting conversation
|
|
133
|
-
*/
|
|
134
|
-
const ExportWizard = forwardRef(function ExportWizard({ isVisible, agent, sessionId, onClose }, ref) {
|
|
135
|
-
const [step, setStep] = useState('format');
|
|
136
|
-
const [options, setOptions] = useState({
|
|
137
|
-
format: 'markdown',
|
|
138
|
-
includeToolCalls: true,
|
|
139
|
-
filename: '',
|
|
140
|
-
});
|
|
141
|
-
const [selectedIndex, setSelectedIndex] = useState(0);
|
|
142
|
-
const [filenameInput, setFilenameInput] = useState('');
|
|
143
|
-
const [exportResult, setExportResult] = useState(null);
|
|
144
|
-
// Reset when becoming visible
|
|
145
|
-
useEffect(() => {
|
|
146
|
-
if (isVisible) {
|
|
147
|
-
setStep('format');
|
|
148
|
-
setOptions({
|
|
149
|
-
format: 'markdown',
|
|
150
|
-
includeToolCalls: true,
|
|
151
|
-
filename: '',
|
|
152
|
-
});
|
|
153
|
-
setSelectedIndex(0);
|
|
154
|
-
setFilenameInput('');
|
|
155
|
-
setExportResult(null);
|
|
156
|
-
}
|
|
157
|
-
}, [isVisible]);
|
|
158
|
-
// Update default filename when format changes
|
|
159
|
-
useEffect(() => {
|
|
160
|
-
if (step === 'filename' && !filenameInput) {
|
|
161
|
-
setFilenameInput(generateDefaultFilename(sessionId, options.format));
|
|
162
|
-
}
|
|
163
|
-
}, [step, sessionId, options.format, filenameInput]);
|
|
164
|
-
const doExport = useCallback(async () => {
|
|
165
|
-
if (!sessionId) {
|
|
166
|
-
setExportResult({ success: false, error: 'No active session' });
|
|
167
|
-
setStep('error');
|
|
168
|
-
return;
|
|
169
|
-
}
|
|
170
|
-
setStep('exporting');
|
|
171
|
-
try {
|
|
172
|
-
// Get session history and metadata
|
|
173
|
-
const history = await agent.getSessionHistory(sessionId);
|
|
174
|
-
const metadata = await agent.getSessionMetadata(sessionId);
|
|
175
|
-
const exportMetadata = {
|
|
176
|
-
sessionId,
|
|
177
|
-
title: metadata?.title,
|
|
178
|
-
createdAt: metadata?.createdAt
|
|
179
|
-
? new Date(metadata.createdAt).toISOString()
|
|
180
|
-
: undefined,
|
|
181
|
-
};
|
|
182
|
-
// Format content - cast history to expected type
|
|
183
|
-
const formattedHistory = history.map((msg) => ({
|
|
184
|
-
role: msg.role,
|
|
185
|
-
content: msg.content,
|
|
186
|
-
timestamp: 'timestamp' in msg && typeof msg.timestamp === 'number'
|
|
187
|
-
? new Date(msg.timestamp).toISOString()
|
|
188
|
-
: undefined,
|
|
189
|
-
}));
|
|
190
|
-
const content = options.format === 'markdown'
|
|
191
|
-
? formatAsMarkdown(formattedHistory, exportMetadata, options.includeToolCalls)
|
|
192
|
-
: formatAsJson(formattedHistory, exportMetadata, options.includeToolCalls);
|
|
193
|
-
// Write file - use path.basename to prevent path traversal attacks
|
|
194
|
-
const rawFilename = options.filename || filenameInput;
|
|
195
|
-
const safeFilename = path.basename(rawFilename);
|
|
196
|
-
const outputPath = path.resolve(process.cwd(), safeFilename);
|
|
197
|
-
await fs.writeFile(outputPath, content, 'utf-8');
|
|
198
|
-
setExportResult({ success: true, path: outputPath });
|
|
199
|
-
setStep('done');
|
|
200
|
-
}
|
|
201
|
-
catch (error) {
|
|
202
|
-
setExportResult({
|
|
203
|
-
success: false,
|
|
204
|
-
error: error instanceof Error ? error.message : String(error),
|
|
205
|
-
});
|
|
206
|
-
setStep('error');
|
|
207
|
-
}
|
|
208
|
-
}, [agent, sessionId, options, filenameInput]);
|
|
209
|
-
// Handle keyboard input
|
|
210
|
-
useImperativeHandle(ref, () => ({
|
|
211
|
-
handleInput: (input, key) => {
|
|
212
|
-
if (!isVisible)
|
|
213
|
-
return false;
|
|
214
|
-
// Escape to close
|
|
215
|
-
if (key.escape) {
|
|
216
|
-
onClose();
|
|
217
|
-
return true;
|
|
218
|
-
}
|
|
219
|
-
// Done/error state - Enter/Esc closes, consume all other input
|
|
220
|
-
if (step === 'done' || step === 'error') {
|
|
221
|
-
if (key.return || key.escape) {
|
|
222
|
-
onClose();
|
|
223
|
-
}
|
|
224
|
-
return true; // Consume all input in terminal states
|
|
225
|
-
}
|
|
226
|
-
// Format selection step
|
|
227
|
-
if (step === 'format') {
|
|
228
|
-
if (key.upArrow || key.downArrow) {
|
|
229
|
-
setSelectedIndex((prev) => (prev === 0 ? 1 : 0));
|
|
230
|
-
return true;
|
|
231
|
-
}
|
|
232
|
-
if (key.return) {
|
|
233
|
-
setOptions((prev) => ({
|
|
234
|
-
...prev,
|
|
235
|
-
format: selectedIndex === 0 ? 'markdown' : 'json',
|
|
236
|
-
}));
|
|
237
|
-
setSelectedIndex(0);
|
|
238
|
-
setStep('toolCalls');
|
|
239
|
-
return true;
|
|
240
|
-
}
|
|
241
|
-
return false;
|
|
242
|
-
}
|
|
243
|
-
// Tool calls selection step
|
|
244
|
-
if (step === 'toolCalls') {
|
|
245
|
-
if (key.upArrow || key.downArrow) {
|
|
246
|
-
setSelectedIndex((prev) => (prev === 0 ? 1 : 0));
|
|
247
|
-
return true;
|
|
248
|
-
}
|
|
249
|
-
if (key.return) {
|
|
250
|
-
setOptions((prev) => ({
|
|
251
|
-
...prev,
|
|
252
|
-
includeToolCalls: selectedIndex === 0,
|
|
253
|
-
}));
|
|
254
|
-
setFilenameInput(generateDefaultFilename(sessionId, options.format));
|
|
255
|
-
setStep('filename');
|
|
256
|
-
return true;
|
|
257
|
-
}
|
|
258
|
-
return false;
|
|
259
|
-
}
|
|
260
|
-
// Filename input step
|
|
261
|
-
if (step === 'filename') {
|
|
262
|
-
if (key.return) {
|
|
263
|
-
const finalFilename = filenameInput.trim();
|
|
264
|
-
if (!finalFilename) {
|
|
265
|
-
// Don't proceed with empty filename
|
|
266
|
-
return true;
|
|
267
|
-
}
|
|
268
|
-
setOptions((prev) => ({ ...prev, filename: finalFilename }));
|
|
269
|
-
setSelectedIndex(0); // Reset to "Export" option
|
|
270
|
-
setStep('confirm');
|
|
271
|
-
return true;
|
|
272
|
-
}
|
|
273
|
-
if (key.backspace || key.delete) {
|
|
274
|
-
setFilenameInput((prev) => prev.slice(0, -1));
|
|
275
|
-
return true;
|
|
276
|
-
}
|
|
277
|
-
if (input && !key.ctrl && !key.meta) {
|
|
278
|
-
setFilenameInput((prev) => prev + input);
|
|
279
|
-
return true;
|
|
280
|
-
}
|
|
281
|
-
return false;
|
|
282
|
-
}
|
|
283
|
-
// Confirm step
|
|
284
|
-
if (step === 'confirm') {
|
|
285
|
-
if (key.upArrow || key.downArrow) {
|
|
286
|
-
setSelectedIndex((prev) => (prev === 0 ? 1 : 0));
|
|
287
|
-
return true;
|
|
288
|
-
}
|
|
289
|
-
if (key.return) {
|
|
290
|
-
if (selectedIndex === 0) {
|
|
291
|
-
doExport();
|
|
292
|
-
}
|
|
293
|
-
else {
|
|
294
|
-
onClose();
|
|
295
|
-
}
|
|
296
|
-
return true;
|
|
297
|
-
}
|
|
298
|
-
return false;
|
|
299
|
-
}
|
|
300
|
-
return false;
|
|
301
|
-
},
|
|
302
|
-
}), [isVisible, step, selectedIndex, options, filenameInput, onClose, doExport, sessionId]);
|
|
303
|
-
if (!isVisible)
|
|
304
|
-
return null;
|
|
305
|
-
// Render based on current step
|
|
306
|
-
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: "\uD83D\uDCE4 Export Conversation" }) }), step === 'format' && (_jsxs(Box, { flexDirection: "column", children: [_jsx(Text, { children: "Select export format:" }), _jsxs(Box, { marginTop: 1, flexDirection: "column", children: [_jsxs(Text, { ...(selectedIndex === 0 ? { color: 'cyan' } : {}), children: [selectedIndex === 0 ? '❯ ' : ' ', "Markdown (.md) - Human readable"] }), _jsxs(Text, { ...(selectedIndex === 1 ? { color: 'cyan' } : {}), children: [selectedIndex === 1 ? '❯ ' : ' ', "JSON (.json) - Structured data"] })] }), _jsx(Box, { marginTop: 1, children: _jsx(Text, { color: "gray", children: "\u2191\u2193 to select \u2022 Enter to continue \u2022 Esc to cancel" }) })] })), step === 'toolCalls' && (_jsxs(Box, { flexDirection: "column", children: [_jsx(Text, { children: "Include tool calls and results?" }), _jsxs(Box, { marginTop: 1, flexDirection: "column", children: [_jsxs(Text, { ...(selectedIndex === 0 ? { color: 'cyan' } : {}), children: [selectedIndex === 0 ? '❯ ' : ' ', "Yes - Include all tool interactions"] }), _jsxs(Text, { ...(selectedIndex === 1 ? { color: 'cyan' } : {}), children: [selectedIndex === 1 ? '❯ ' : ' ', "No - Only user and assistant messages"] })] }), _jsx(Box, { marginTop: 1, children: _jsx(Text, { color: "gray", children: "\u2191\u2193 to select \u2022 Enter to continue \u2022 Esc to cancel" }) })] })), step === 'filename' && (_jsxs(Box, { flexDirection: "column", children: [_jsx(Text, { children: "Filename:" }), _jsxs(Box, { marginTop: 1, children: [_jsx(Text, { color: "cyan", children: "> " }), _jsx(Text, { children: filenameInput }), _jsx(Text, { color: "cyan", children: "_" })] }), _jsx(Box, { marginTop: 1, children: _jsx(Text, { color: "gray", children: "Enter to continue \u2022 Esc to cancel" }) })] })), step === 'confirm' && (_jsxs(Box, { flexDirection: "column", children: [_jsx(Text, { children: "Export with these settings?" }), _jsxs(Box, { marginTop: 1, flexDirection: "column", marginLeft: 2, children: [_jsxs(Text, { color: "gray", children: ["Format:", ' ', _jsx(Text, { color: "white", children: options.format === 'markdown' ? 'Markdown' : 'JSON' })] }), _jsxs(Text, { color: "gray", children: ["Tool calls:", ' ', _jsx(Text, { color: "white", children: options.includeToolCalls ? 'Yes' : 'No' })] }), _jsxs(Text, { color: "gray", children: ["File: ", _jsx(Text, { color: "white", children: filenameInput })] })] }), _jsxs(Box, { marginTop: 1, flexDirection: "column", children: [_jsxs(Text, { ...(selectedIndex === 0 ? { color: 'green' } : {}), children: [selectedIndex === 0 ? '❯ ' : ' ', "Export"] }), _jsxs(Text, { ...(selectedIndex === 1 ? { color: 'red' } : {}), children: [selectedIndex === 1 ? '❯ ' : ' ', "Cancel"] })] }), _jsx(Box, { marginTop: 1, children: _jsx(Text, { color: "gray", children: "\u2191\u2193 to select \u2022 Enter to confirm" }) })] })), step === 'exporting' && (_jsx(Box, { flexDirection: "column", children: _jsx(Text, { color: "yellow", children: "Exporting..." }) })), step === 'done' && exportResult?.success && (_jsxs(Box, { flexDirection: "column", children: [_jsx(Text, { color: "green", children: "\u2713 Exported successfully!" }), _jsxs(Box, { marginTop: 1, children: [_jsx(Text, { color: "gray", children: "Saved to: " }), _jsx(Text, { children: exportResult.path })] }), _jsx(Box, { marginTop: 1, children: _jsx(Text, { color: "gray", children: "Press Enter or Esc to close" }) })] })), step === 'error' && (_jsxs(Box, { flexDirection: "column", children: [_jsx(Text, { color: "red", children: "\u2717 Export failed" }), _jsx(Box, { marginTop: 1, children: _jsx(Text, { color: "red", children: exportResult?.error }) }), _jsx(Box, { marginTop: 1, children: _jsx(Text, { color: "gray", children: "Press Enter or Esc to close" }) })] }))] }));
|
|
307
|
-
});
|
|
308
|
-
export default ExportWizard;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* LogLevelSelector Component
|
|
3
|
-
* Interactive selector for changing log level
|
|
4
|
-
*/
|
|
5
|
-
import React from 'react';
|
|
6
|
-
import type { Key } from '../../hooks/useInputOrchestrator.js';
|
|
7
|
-
import type { DextoAgent } from '@dexto/core';
|
|
8
|
-
interface LogLevelSelectorProps {
|
|
9
|
-
isVisible: boolean;
|
|
10
|
-
onSelect: (level: string) => void;
|
|
11
|
-
onClose: () => void;
|
|
12
|
-
agent: DextoAgent;
|
|
13
|
-
sessionId: string | null;
|
|
14
|
-
}
|
|
15
|
-
export interface LogLevelSelectorHandle {
|
|
16
|
-
handleInput: (input: string, key: Key) => boolean;
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Log level selector - thin wrapper around BaseSelector
|
|
20
|
-
*/
|
|
21
|
-
declare const LogLevelSelector: React.ForwardRefExoticComponent<LogLevelSelectorProps & React.RefAttributes<LogLevelSelectorHandle>>;
|
|
22
|
-
export default LogLevelSelector;
|
|
23
|
-
//# sourceMappingURL=LogLevelSelector.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LogLevelSelector.d.ts","sourceRoot":"","sources":["../../../../../src/cli/ink-cli/components/overlays/LogLevelSelector.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAuE,MAAM,OAAO,CAAC;AAE5F,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,qCAAqC,CAAC;AAC/D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAG9C,UAAU,qBAAqB;IAC3B,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,KAAK,EAAE,UAAU,CAAC;IAClB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B;AAED,MAAM,WAAW,sBAAsB;IACnC,WAAW,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,KAAK,OAAO,CAAC;CACrD;AAkBD;;GAEG;AACH,QAAA,MAAM,gBAAgB,sGAwGrB,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import { jsxs as _jsxs, jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
/**
|
|
3
|
-
* LogLevelSelector Component
|
|
4
|
-
* Interactive selector for changing log level
|
|
5
|
-
*/
|
|
6
|
-
import { useState, useEffect, forwardRef, useRef, useImperativeHandle } from 'react';
|
|
7
|
-
import { Box, Text } from 'ink';
|
|
8
|
-
import { BaseSelector } from '../base/BaseSelector.js';
|
|
9
|
-
// Log levels matching DextoLogger's supported levels
|
|
10
|
-
const LOG_LEVELS = [
|
|
11
|
-
{ level: 'error', description: 'Errors only', icon: '!' },
|
|
12
|
-
{ level: 'warn', description: 'Warnings and above', icon: '⚠️' },
|
|
13
|
-
{ level: 'info', description: 'Info and above (default)', icon: 'ℹ️' },
|
|
14
|
-
{ level: 'debug', description: 'Debug information', icon: '🔍' },
|
|
15
|
-
{ level: 'silly', description: 'Everything (most verbose)', icon: '🔬' },
|
|
16
|
-
];
|
|
17
|
-
/**
|
|
18
|
-
* Log level selector - thin wrapper around BaseSelector
|
|
19
|
-
*/
|
|
20
|
-
const LogLevelSelector = forwardRef(function LogLevelSelector({ isVisible, onSelect, onClose, agent, sessionId }, ref) {
|
|
21
|
-
const baseSelectorRef = useRef(null);
|
|
22
|
-
// Forward handleInput to BaseSelector
|
|
23
|
-
useImperativeHandle(ref, () => ({
|
|
24
|
-
handleInput: (input, key) => {
|
|
25
|
-
return baseSelectorRef.current?.handleInput(input, key) ?? false;
|
|
26
|
-
},
|
|
27
|
-
}), []);
|
|
28
|
-
const [levels, setLevels] = useState([]);
|
|
29
|
-
const [selectedIndex, setSelectedIndex] = useState(0);
|
|
30
|
-
const [logFilePath, setLogFilePath] = useState(null);
|
|
31
|
-
// Build levels list with current indicator
|
|
32
|
-
useEffect(() => {
|
|
33
|
-
let isCancelled = false;
|
|
34
|
-
const run = async () => {
|
|
35
|
-
if (!isVisible) {
|
|
36
|
-
setLogFilePath(null);
|
|
37
|
-
return;
|
|
38
|
-
}
|
|
39
|
-
// Get current level from agent's logger (shared across all child loggers)
|
|
40
|
-
const currentLevel = agent.logger.getLevel();
|
|
41
|
-
const levelList = LOG_LEVELS.map((l) => ({
|
|
42
|
-
...l,
|
|
43
|
-
isCurrent: l.level === currentLevel,
|
|
44
|
-
}));
|
|
45
|
-
setLevels(levelList);
|
|
46
|
-
// File logging is session-scoped; prefer the active session logger if available.
|
|
47
|
-
const session = sessionId ? await agent.getSession(sessionId) : undefined;
|
|
48
|
-
if (!isCancelled) {
|
|
49
|
-
setLogFilePath(session?.logger.getLogFilePath() ?? null);
|
|
50
|
-
}
|
|
51
|
-
// Set initial selection to current level
|
|
52
|
-
const currentIndex = levelList.findIndex((l) => l.isCurrent);
|
|
53
|
-
if (currentIndex >= 0) {
|
|
54
|
-
setSelectedIndex(currentIndex);
|
|
55
|
-
}
|
|
56
|
-
};
|
|
57
|
-
void run();
|
|
58
|
-
return () => {
|
|
59
|
-
isCancelled = true;
|
|
60
|
-
};
|
|
61
|
-
}, [isVisible, agent, sessionId]);
|
|
62
|
-
// Format level item for display
|
|
63
|
-
const formatItem = (option, isSelected) => (_jsxs(_Fragment, { children: [_jsxs(Text, { children: [option.icon, " "] }), _jsx(Text, { color: isSelected ? 'cyan' : 'gray', bold: isSelected, children: option.level }), _jsxs(Text, { color: isSelected ? 'white' : 'gray', children: [" - ", option.description] }), option.isCurrent && (_jsxs(Text, { color: isSelected ? 'cyan' : 'gray', bold: isSelected, children: [' ', "\u2190 Current"] }))] }));
|
|
64
|
-
// Handle selection
|
|
65
|
-
const handleSelect = (option) => {
|
|
66
|
-
onSelect(option.level);
|
|
67
|
-
};
|
|
68
|
-
return (_jsxs(Box, { flexDirection: "column", children: [_jsx(BaseSelector, { ref: baseSelectorRef, items: levels, isVisible: isVisible, isLoading: false, selectedIndex: selectedIndex, onSelectIndex: setSelectedIndex, onSelect: handleSelect, onClose: onClose, formatItem: formatItem, title: "Select Log Level", borderColor: "yellowBright", emptyMessage: "No log levels available" }), logFilePath && process.env.DEXTO_DEV_MODE === 'true' && (_jsx(Box, { marginTop: 1, children: _jsxs(Text, { color: "gray", children: ["\uD83D\uDCC1 Log file: ", logFilePath] }) }))] }));
|
|
69
|
-
});
|
|
70
|
-
export default LogLevelSelector;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* MarketplaceAddPrompt Component
|
|
3
|
-
* Prompts user to enter a marketplace source to add
|
|
4
|
-
*/
|
|
5
|
-
import React from 'react';
|
|
6
|
-
import type { Key } from '../../hooks/useInputOrchestrator.js';
|
|
7
|
-
interface MarketplaceAddPromptProps {
|
|
8
|
-
isVisible: boolean;
|
|
9
|
-
onComplete: (name: string, pluginCount: number) => void;
|
|
10
|
-
onClose: () => void;
|
|
11
|
-
}
|
|
12
|
-
export interface MarketplaceAddPromptHandle {
|
|
13
|
-
handleInput: (input: string, key: Key) => boolean;
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* Marketplace add prompt - single input for source
|
|
17
|
-
*/
|
|
18
|
-
declare const MarketplaceAddPrompt: React.ForwardRefExoticComponent<MarketplaceAddPromptProps & React.RefAttributes<MarketplaceAddPromptHandle>>;
|
|
19
|
-
export default MarketplaceAddPrompt;
|
|
20
|
-
//# sourceMappingURL=MarketplaceAddPrompt.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MarketplaceAddPrompt.d.ts","sourceRoot":"","sources":["../../../../../src/cli/ink-cli/components/overlays/MarketplaceAddPrompt.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAA4E,MAAM,OAAO,CAAC;AAIjG,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,qCAAqC,CAAC;AAE/D,UAAU,yBAAyB;IAC/B,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,KAAK,IAAI,CAAC;IACxD,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,8GAsIzB,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
/**
|
|
3
|
-
* MarketplaceAddPrompt Component
|
|
4
|
-
* Prompts user to enter a marketplace source to add
|
|
5
|
-
*/
|
|
6
|
-
import { useState, useEffect, forwardRef, useImperativeHandle, useCallback } from 'react';
|
|
7
|
-
import { Box, Text } from 'ink';
|
|
8
|
-
import { addMarketplace } from '@dexto/agent-management';
|
|
9
|
-
import { logger } from '@dexto/core';
|
|
10
|
-
/**
|
|
11
|
-
* Marketplace add prompt - single input for source
|
|
12
|
-
*/
|
|
13
|
-
const MarketplaceAddPrompt = forwardRef(function MarketplaceAddPrompt({ isVisible, onComplete, onClose }, ref) {
|
|
14
|
-
const [input, setInput] = useState('');
|
|
15
|
-
const [error, setError] = useState(null);
|
|
16
|
-
const [isAdding, setIsAdding] = useState(false);
|
|
17
|
-
// Reset when becoming visible
|
|
18
|
-
useEffect(() => {
|
|
19
|
-
if (isVisible) {
|
|
20
|
-
setInput('');
|
|
21
|
-
setError(null);
|
|
22
|
-
setIsAdding(false);
|
|
23
|
-
}
|
|
24
|
-
}, [isVisible]);
|
|
25
|
-
// Handle adding marketplace
|
|
26
|
-
const handleAdd = useCallback(async () => {
|
|
27
|
-
const source = input.trim();
|
|
28
|
-
if (!source) {
|
|
29
|
-
setError('Please enter a marketplace source');
|
|
30
|
-
return;
|
|
31
|
-
}
|
|
32
|
-
setError(null);
|
|
33
|
-
setIsAdding(true);
|
|
34
|
-
try {
|
|
35
|
-
const result = await addMarketplace(source);
|
|
36
|
-
onComplete(result.name, result.pluginCount);
|
|
37
|
-
}
|
|
38
|
-
catch (err) {
|
|
39
|
-
const errorMessage = err instanceof Error ? err.message : String(err);
|
|
40
|
-
setError(errorMessage);
|
|
41
|
-
logger.error(`MarketplaceAddPrompt.handleAdd failed: ${errorMessage}`);
|
|
42
|
-
}
|
|
43
|
-
finally {
|
|
44
|
-
setIsAdding(false);
|
|
45
|
-
}
|
|
46
|
-
}, [input, onComplete]);
|
|
47
|
-
// Handle input
|
|
48
|
-
useImperativeHandle(ref, () => ({
|
|
49
|
-
handleInput: (inputStr, key) => {
|
|
50
|
-
// Escape to close
|
|
51
|
-
if (key.escape) {
|
|
52
|
-
onClose();
|
|
53
|
-
return true;
|
|
54
|
-
}
|
|
55
|
-
// Enter to submit
|
|
56
|
-
if (key.return) {
|
|
57
|
-
if (!isAdding) {
|
|
58
|
-
handleAdd();
|
|
59
|
-
}
|
|
60
|
-
return true;
|
|
61
|
-
}
|
|
62
|
-
// Backspace
|
|
63
|
-
if (key.backspace || key.delete) {
|
|
64
|
-
setInput((prev) => prev.slice(0, -1));
|
|
65
|
-
setError(null);
|
|
66
|
-
return true;
|
|
67
|
-
}
|
|
68
|
-
// Regular character input
|
|
69
|
-
if (inputStr && !key.ctrl && !key.meta) {
|
|
70
|
-
setInput((prev) => prev + inputStr);
|
|
71
|
-
setError(null);
|
|
72
|
-
return true;
|
|
73
|
-
}
|
|
74
|
-
return false;
|
|
75
|
-
},
|
|
76
|
-
}), [handleAdd, isAdding, onClose]);
|
|
77
|
-
if (!isVisible)
|
|
78
|
-
return null;
|
|
79
|
-
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: "Add Marketplace" }) }), _jsx(Box, { marginBottom: 1, children: _jsx(Text, { color: "gray", children: "Enter marketplace source:" }) }), _jsxs(Box, { marginBottom: 1, flexDirection: "column", children: [_jsx(Text, { color: "gray", dimColor: true, children: "- GitHub: owner/repo (e.g., anthropics/claude-plugins-official)" }), _jsx(Text, { color: "gray", dimColor: true, children: "- Git URL: https://github.com/user/repo.git" }), _jsx(Text, { color: "gray", dimColor: true, children: "- Local: /path/to/marketplace or ~/marketplace" })] }), _jsxs(Box, { children: [_jsx(Text, { color: "cyan", children: '> ' }), _jsx(Text, { children: input }), _jsx(Text, { color: "cyan", children: "_" })] }), error && (_jsx(Box, { marginTop: 1, children: _jsx(Text, { color: "red", children: error }) })), isAdding && (_jsx(Box, { marginTop: 1, children: _jsx(Text, { color: "yellow", children: "Adding marketplace..." }) })), _jsx(Box, { marginTop: 1, children: _jsx(Text, { color: "gray", dimColor: true, children: "Press Enter to add, Escape to cancel" }) })] }));
|
|
80
|
-
});
|
|
81
|
-
export default MarketplaceAddPrompt;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* MarketplaceBrowser Component
|
|
3
|
-
* Clean, intuitive marketplace browser with two-level navigation
|
|
4
|
-
*/
|
|
5
|
-
import React from 'react';
|
|
6
|
-
import { type MarketplacePlugin } from '@dexto/agent-management';
|
|
7
|
-
import type { Key } from '../../hooks/useInputOrchestrator.js';
|
|
8
|
-
export type MarketplaceBrowserAction = {
|
|
9
|
-
type: 'add-marketplace';
|
|
10
|
-
} | {
|
|
11
|
-
type: 'install-plugin';
|
|
12
|
-
plugin: MarketplacePlugin;
|
|
13
|
-
} | {
|
|
14
|
-
type: 'plugin-installed';
|
|
15
|
-
pluginName: string;
|
|
16
|
-
marketplace: string;
|
|
17
|
-
} | {
|
|
18
|
-
type: 'marketplace-added';
|
|
19
|
-
marketplaceName: string;
|
|
20
|
-
};
|
|
21
|
-
interface MarketplaceBrowserProps {
|
|
22
|
-
isVisible: boolean;
|
|
23
|
-
onAction: (action: MarketplaceBrowserAction) => void;
|
|
24
|
-
onClose: () => void;
|
|
25
|
-
}
|
|
26
|
-
export interface MarketplaceBrowserHandle {
|
|
27
|
-
handleInput: (input: string, key: Key) => boolean;
|
|
28
|
-
}
|
|
29
|
-
declare const MarketplaceBrowser: React.ForwardRefExoticComponent<MarketplaceBrowserProps & React.RefAttributes<MarketplaceBrowserHandle>>;
|
|
30
|
-
export default MarketplaceBrowser;
|
|
31
|
-
//# sourceMappingURL=MarketplaceBrowser.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MarketplaceBrowser.d.ts","sourceRoot":"","sources":["../../../../../src/cli/ink-cli/components/overlays/MarketplaceBrowser.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAON,MAAM,OAAO,CAAC;AAEf,OAAO,EAQH,KAAK,iBAAiB,EACzB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,qCAAqC,CAAC;AAG/D,MAAM,MAAM,wBAAwB,GAC9B;IAAE,IAAI,EAAE,iBAAiB,CAAA;CAAE,GAC3B;IAAE,IAAI,EAAE,gBAAgB,CAAC;IAAC,MAAM,EAAE,iBAAiB,CAAA;CAAE,GACrD;IAAE,IAAI,EAAE,kBAAkB,CAAC;IAAC,UAAU,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE,GACrE;IAAE,IAAI,EAAE,mBAAmB,CAAC;IAAC,eAAe,EAAE,MAAM,CAAA;CAAE,CAAC;AAE7D,UAAU,uBAAuB;IAC7B,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,CAAC,MAAM,EAAE,wBAAwB,KAAK,IAAI,CAAC;IACrD,OAAO,EAAE,MAAM,IAAI,CAAC;CACvB;AAED,MAAM,WAAW,wBAAwB;IACrC,WAAW,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,KAAK,OAAO,CAAC;CACrD;AA0ED,QAAA,MAAM,kBAAkB,0GAsbvB,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|