dexto 1.3.0 → 1.5.0
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/README.md +87 -22
- package/dist/agents/agent-registry.json +9 -0
- package/dist/agents/agent-template.yml +2 -2
- package/dist/agents/coding-agent/coding-agent.yml +27 -16
- package/dist/agents/database-agent/database-agent.yml +2 -2
- package/dist/agents/default-agent.yml +9 -7
- package/dist/agents/github-agent/github-agent.yml +2 -2
- package/dist/agents/product-name-researcher/product-name-researcher.yml +2 -2
- package/dist/agents/talk2pdf-agent/talk2pdf-agent.yml +2 -2
- package/dist/analytics/events.d.ts +13 -6
- package/dist/analytics/events.d.ts.map +1 -1
- package/dist/analytics/index.d.ts +1 -1
- package/dist/analytics/index.d.ts.map +1 -1
- package/dist/analytics/index.js +6 -2
- package/dist/api/server-hono.d.ts.map +1 -1
- package/dist/api/server-hono.js +65 -9
- package/dist/cli/cli-subscriber.d.ts +4 -0
- package/dist/cli/cli-subscriber.d.ts.map +1 -1
- package/dist/cli/cli-subscriber.js +47 -3
- package/dist/cli/commands/create-app.d.ts +16 -14
- package/dist/cli/commands/create-app.d.ts.map +1 -1
- package/dist/cli/commands/create-app.js +626 -102
- package/dist/cli/commands/create-image.d.ts +7 -0
- package/dist/cli/commands/create-image.d.ts.map +1 -0
- package/dist/cli/commands/create-image.js +201 -0
- package/dist/cli/commands/helpers/formatters.d.ts.map +1 -1
- package/dist/cli/commands/helpers/formatters.js +9 -8
- package/dist/cli/commands/index.d.ts +2 -1
- package/dist/cli/commands/index.d.ts.map +1 -1
- package/dist/cli/commands/index.js +2 -1
- package/dist/cli/commands/init-app.js +7 -7
- package/dist/cli/commands/install.d.ts +0 -3
- package/dist/cli/commands/install.d.ts.map +1 -1
- package/dist/cli/commands/install.js +19 -70
- package/dist/cli/commands/interactive-commands/command-parser.d.ts +17 -14
- package/dist/cli/commands/interactive-commands/command-parser.d.ts.map +1 -1
- package/dist/cli/commands/interactive-commands/command-parser.js +7 -22
- package/dist/cli/commands/interactive-commands/commands.d.ts +4 -4
- package/dist/cli/commands/interactive-commands/commands.d.ts.map +1 -1
- package/dist/cli/commands/interactive-commands/commands.js +34 -42
- package/dist/cli/commands/interactive-commands/documentation-commands.d.ts.map +1 -1
- package/dist/cli/commands/interactive-commands/documentation-commands.js +4 -7
- package/dist/cli/commands/interactive-commands/general-commands.d.ts.map +1 -1
- package/dist/cli/commands/interactive-commands/general-commands.js +159 -117
- package/dist/cli/commands/interactive-commands/mcp/index.d.ts +9 -3
- package/dist/cli/commands/interactive-commands/mcp/index.d.ts.map +1 -1
- package/dist/cli/commands/interactive-commands/mcp/index.js +18 -3
- package/dist/cli/commands/interactive-commands/model/index.d.ts +8 -6
- package/dist/cli/commands/interactive-commands/model/index.d.ts.map +1 -1
- package/dist/cli/commands/interactive-commands/model/index.js +18 -6
- package/dist/cli/commands/interactive-commands/prompt-commands.d.ts +3 -2
- package/dist/cli/commands/interactive-commands/prompt-commands.d.ts.map +1 -1
- package/dist/cli/commands/interactive-commands/prompt-commands.js +77 -60
- package/dist/cli/commands/interactive-commands/session/index.d.ts +7 -12
- package/dist/cli/commands/interactive-commands/session/index.d.ts.map +1 -1
- package/dist/cli/commands/interactive-commands/session/index.js +7 -14
- package/dist/cli/commands/interactive-commands/session/session-commands.d.ts +10 -24
- package/dist/cli/commands/interactive-commands/session/session-commands.d.ts.map +1 -1
- package/dist/cli/commands/interactive-commands/session/session-commands.js +16 -371
- package/dist/cli/commands/interactive-commands/system/system-commands.d.ts +1 -0
- package/dist/cli/commands/interactive-commands/system/system-commands.d.ts.map +1 -1
- package/dist/cli/commands/interactive-commands/system/system-commands.js +106 -77
- package/dist/cli/commands/interactive-commands/tool-commands.d.ts +1 -1
- package/dist/cli/commands/interactive-commands/tool-commands.d.ts.map +1 -1
- package/dist/cli/commands/interactive-commands/tool-commands.js +5 -62
- package/dist/cli/commands/interactive-commands/utils/command-output.d.ts +13 -17
- package/dist/cli/commands/interactive-commands/utils/command-output.d.ts.map +1 -1
- package/dist/cli/commands/interactive-commands/utils/command-output.js +18 -37
- package/dist/cli/commands/list-agents.d.ts +2 -2
- package/dist/cli/commands/list-agents.d.ts.map +1 -1
- package/dist/cli/commands/list-agents.js +38 -34
- package/dist/cli/commands/session-commands.js +16 -16
- package/dist/cli/commands/setup.d.ts +13 -5
- package/dist/cli/commands/setup.d.ts.map +1 -1
- package/dist/cli/commands/setup.js +860 -65
- package/dist/cli/commands/uninstall.d.ts.map +1 -1
- package/dist/cli/commands/uninstall.js +4 -6
- package/dist/cli/commands/which.d.ts.map +1 -1
- package/dist/cli/commands/which.js +18 -4
- package/dist/cli/ink-cli/InkCLIRefactored.d.ts +9 -22
- package/dist/cli/ink-cli/InkCLIRefactored.d.ts.map +1 -1
- package/dist/cli/ink-cli/InkCLIRefactored.js +50 -133
- package/dist/cli/ink-cli/components/ApprovalPrompt.d.ts +26 -3
- package/dist/cli/ink-cli/components/ApprovalPrompt.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/ApprovalPrompt.js +182 -45
- package/dist/cli/ink-cli/components/CustomInput.js +1 -1
- package/dist/cli/ink-cli/components/EditableMultiLineInput.js +4 -4
- package/dist/cli/ink-cli/components/ElicitationForm.d.ts +22 -0
- package/dist/cli/ink-cli/components/ElicitationForm.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/ElicitationForm.js +358 -0
- package/dist/cli/ink-cli/components/ErrorBoundary.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/ErrorBoundary.js +1 -1
- package/dist/cli/ink-cli/components/Footer.d.ts +16 -0
- package/dist/cli/ink-cli/components/Footer.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/Footer.js +27 -0
- package/dist/cli/ink-cli/components/HistorySearchBar.d.ts +17 -0
- package/dist/cli/ink-cli/components/HistorySearchBar.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/HistorySearchBar.js +8 -0
- package/dist/cli/ink-cli/components/MultiLineInput.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/MultiLineInput.js +3 -3
- package/dist/cli/ink-cli/components/ResourceAutocomplete.d.ts +15 -2
- package/dist/cli/ink-cli/components/ResourceAutocomplete.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/ResourceAutocomplete.js +126 -82
- package/dist/cli/ink-cli/components/SlashCommandAutocomplete.d.ts +15 -2
- package/dist/cli/ink-cli/components/SlashCommandAutocomplete.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/SlashCommandAutocomplete.js +228 -122
- package/dist/cli/ink-cli/components/StatusBar.d.ts +15 -2
- package/dist/cli/ink-cli/components/StatusBar.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/StatusBar.js +50 -10
- package/dist/cli/ink-cli/components/TextBufferInput.d.ts +52 -0
- package/dist/cli/ink-cli/components/TextBufferInput.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/TextBufferInput.js +471 -0
- package/dist/cli/ink-cli/components/base/BaseAutocomplete.js +4 -4
- package/dist/cli/ink-cli/components/base/BaseSelector.d.ts +11 -1
- package/dist/cli/ink-cli/components/base/BaseSelector.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/base/BaseSelector.js +90 -49
- package/dist/cli/ink-cli/components/chat/Footer.js +1 -1
- package/dist/cli/ink-cli/components/chat/Header.d.ts +1 -0
- package/dist/cli/ink-cli/components/chat/Header.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/chat/Header.js +6 -3
- package/dist/cli/ink-cli/components/chat/MessageItem.d.ts +3 -0
- package/dist/cli/ink-cli/components/chat/MessageItem.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/chat/MessageItem.js +95 -9
- package/dist/cli/ink-cli/components/chat/MessageList.js +1 -1
- package/dist/cli/ink-cli/components/chat/QueuedMessagesDisplay.d.ts +16 -0
- package/dist/cli/ink-cli/components/chat/QueuedMessagesDisplay.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/chat/QueuedMessagesDisplay.js +27 -0
- package/dist/cli/ink-cli/components/chat/ToolIcon.d.ts +5 -3
- package/dist/cli/ink-cli/components/chat/ToolIcon.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/chat/ToolIcon.js +21 -7
- package/dist/cli/ink-cli/components/chat/styled-boxes/ConfigBox.d.ts +10 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/ConfigBox.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/ConfigBox.js +6 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/HelpBox.d.ts +10 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/HelpBox.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/HelpBox.js +15 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/LogConfigBox.d.ts +10 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/LogConfigBox.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/LogConfigBox.js +9 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/SessionHistoryBox.d.ts +10 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/SessionHistoryBox.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/SessionHistoryBox.js +37 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/SessionListBox.d.ts +10 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/SessionListBox.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/SessionListBox.js +9 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/ShortcutsBox.d.ts +10 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/ShortcutsBox.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/ShortcutsBox.js +6 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/StatsBox.d.ts +10 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/StatsBox.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/StatsBox.js +29 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/StyledBox.d.ts +45 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/StyledBox.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/StyledBox.js +38 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/SyspromptBox.d.ts +10 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/SyspromptBox.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/SyspromptBox.js +6 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/index.d.ts +13 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/index.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/index.js +12 -0
- package/dist/cli/ink-cli/components/input/InputArea.d.ts +36 -8
- package/dist/cli/ink-cli/components/input/InputArea.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/input/InputArea.js +3 -3
- package/dist/cli/ink-cli/components/modes/AlternateBufferCLI.d.ts +25 -0
- package/dist/cli/ink-cli/components/modes/AlternateBufferCLI.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/modes/AlternateBufferCLI.js +166 -0
- package/dist/cli/ink-cli/components/modes/StaticCLI.d.ts +27 -0
- package/dist/cli/ink-cli/components/modes/StaticCLI.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/modes/StaticCLI.js +95 -0
- package/dist/cli/ink-cli/components/modes/index.d.ts +10 -0
- package/dist/cli/ink-cli/components/modes/index.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/modes/index.js +9 -0
- package/dist/cli/ink-cli/components/overlays/ApiKeyInput.d.ts +26 -0
- package/dist/cli/ink-cli/components/overlays/ApiKeyInput.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/ApiKeyInput.js +92 -0
- package/dist/cli/ink-cli/components/overlays/CustomModelWizard.d.ts +29 -0
- package/dist/cli/ink-cli/components/overlays/CustomModelWizard.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/CustomModelWizard.js +286 -0
- package/dist/cli/ink-cli/components/overlays/LogLevelSelector.d.ts +22 -0
- package/dist/cli/ink-cli/components/overlays/LogLevelSelector.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/LogLevelSelector.js +59 -0
- package/dist/cli/ink-cli/components/overlays/McpAddChoice.d.ts +22 -0
- package/dist/cli/ink-cli/components/overlays/McpAddChoice.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/McpAddChoice.js +59 -0
- package/dist/cli/ink-cli/components/overlays/McpAddSelector.d.ts +26 -0
- package/dist/cli/ink-cli/components/overlays/McpAddSelector.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/McpAddSelector.js +73 -0
- package/dist/cli/ink-cli/components/overlays/McpCustomTypeSelector.d.ts +21 -0
- package/dist/cli/ink-cli/components/overlays/McpCustomTypeSelector.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/McpCustomTypeSelector.js +51 -0
- package/dist/cli/ink-cli/components/overlays/McpCustomWizard.d.ts +29 -0
- package/dist/cli/ink-cli/components/overlays/McpCustomWizard.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/McpCustomWizard.js +215 -0
- package/dist/cli/ink-cli/components/overlays/McpRemoveSelector.d.ts +22 -0
- package/dist/cli/ink-cli/components/overlays/McpRemoveSelector.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/McpRemoveSelector.js +74 -0
- package/dist/cli/ink-cli/components/overlays/McpSelector.d.ts +21 -0
- package/dist/cli/ink-cli/components/overlays/McpSelector.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/McpSelector.js +52 -0
- package/dist/cli/ink-cli/components/overlays/McpServerActions.d.ts +28 -0
- package/dist/cli/ink-cli/components/overlays/McpServerActions.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/McpServerActions.js +84 -0
- package/dist/cli/ink-cli/components/overlays/McpServerList.d.ts +29 -0
- package/dist/cli/ink-cli/components/overlays/McpServerList.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/McpServerList.js +109 -0
- package/dist/cli/ink-cli/components/overlays/ModelSelectorRefactored.d.ts +15 -8
- package/dist/cli/ink-cli/components/overlays/ModelSelectorRefactored.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/overlays/ModelSelectorRefactored.js +400 -23
- package/dist/cli/ink-cli/components/overlays/PromptAddChoice.d.ts +22 -0
- package/dist/cli/ink-cli/components/overlays/PromptAddChoice.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/PromptAddChoice.js +52 -0
- package/dist/cli/ink-cli/components/overlays/PromptAddWizard.d.ts +29 -0
- package/dist/cli/ink-cli/components/overlays/PromptAddWizard.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/PromptAddWizard.js +166 -0
- package/dist/cli/ink-cli/components/overlays/PromptDeleteSelector.d.ts +27 -0
- package/dist/cli/ink-cli/components/overlays/PromptDeleteSelector.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/PromptDeleteSelector.js +119 -0
- package/dist/cli/ink-cli/components/overlays/PromptList.d.ts +33 -0
- package/dist/cli/ink-cli/components/overlays/PromptList.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/PromptList.js +144 -0
- package/dist/cli/ink-cli/components/overlays/SearchOverlay.d.ts +23 -0
- package/dist/cli/ink-cli/components/overlays/SearchOverlay.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/SearchOverlay.js +189 -0
- package/dist/cli/ink-cli/components/overlays/SessionSelectorRefactored.d.ts +7 -2
- package/dist/cli/ink-cli/components/overlays/SessionSelectorRefactored.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/overlays/SessionSelectorRefactored.js +19 -5
- package/dist/cli/ink-cli/components/overlays/SessionSubcommandSelector.d.ts +21 -0
- package/dist/cli/ink-cli/components/overlays/SessionSubcommandSelector.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/SessionSubcommandSelector.js +42 -0
- package/dist/cli/ink-cli/components/overlays/StreamSelector.d.ts +20 -0
- package/dist/cli/ink-cli/components/overlays/StreamSelector.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/StreamSelector.js +58 -0
- package/dist/cli/ink-cli/components/overlays/ToolBrowser.d.ts +25 -0
- package/dist/cli/ink-cli/components/overlays/ToolBrowser.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/ToolBrowser.js +400 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/LocalModelWizard.d.ts +25 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/LocalModelWizard.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/LocalModelWizard.js +609 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/index.d.ts +15 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/index.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/index.js +14 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/provider-config.d.ts +33 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/provider-config.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/provider-config.js +419 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/ApiKeyStep.d.ts +25 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/ApiKeyStep.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/ApiKeyStep.js +29 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/ProviderSelector.d.ts +17 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/ProviderSelector.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/ProviderSelector.js +11 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/SetupInfoBanner.d.ts +20 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/SetupInfoBanner.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/SetupInfoBanner.js +10 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/WizardStepInput.d.ts +30 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/WizardStepInput.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/WizardStepInput.js +13 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/index.d.ts +8 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/index.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/index.js +7 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/types.d.ts +79 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/types.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/types.js +38 -0
- package/dist/cli/ink-cli/components/renderers/DiffRenderer.d.ts +21 -0
- package/dist/cli/ink-cli/components/renderers/DiffRenderer.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/renderers/DiffRenderer.js +65 -0
- package/dist/cli/ink-cli/components/renderers/FilePreviewRenderer.d.ts +28 -0
- package/dist/cli/ink-cli/components/renderers/FilePreviewRenderer.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/renderers/FilePreviewRenderer.js +66 -0
- package/dist/cli/ink-cli/components/renderers/FileRenderer.d.ts +19 -0
- package/dist/cli/ink-cli/components/renderers/FileRenderer.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/renderers/FileRenderer.js +26 -0
- package/dist/cli/ink-cli/components/renderers/GenericRenderer.d.ts +21 -0
- package/dist/cli/ink-cli/components/renderers/GenericRenderer.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/renderers/GenericRenderer.js +26 -0
- package/dist/cli/ink-cli/components/renderers/SearchRenderer.d.ts +20 -0
- package/dist/cli/ink-cli/components/renderers/SearchRenderer.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/renderers/SearchRenderer.js +12 -0
- package/dist/cli/ink-cli/components/renderers/ShellRenderer.d.ts +21 -0
- package/dist/cli/ink-cli/components/renderers/ShellRenderer.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/renderers/ShellRenderer.js +25 -0
- package/dist/cli/ink-cli/components/renderers/diff-shared.d.ts +61 -0
- package/dist/cli/ink-cli/components/renderers/diff-shared.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/renderers/diff-shared.js +158 -0
- package/dist/cli/ink-cli/components/renderers/index.d.ts +28 -0
- package/dist/cli/ink-cli/components/renderers/index.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/renderers/index.js +36 -0
- package/dist/cli/ink-cli/components/shared/MarkdownText.d.ts +38 -0
- package/dist/cli/ink-cli/components/shared/MarkdownText.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/shared/MarkdownText.js +362 -0
- package/dist/cli/ink-cli/components/shared/VirtualizedList.d.ts +44 -0
- package/dist/cli/ink-cli/components/shared/VirtualizedList.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/shared/VirtualizedList.js +300 -0
- package/dist/cli/ink-cli/components/shared/text-buffer.d.ts +185 -0
- package/dist/cli/ink-cli/components/shared/text-buffer.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/shared/text-buffer.js +1338 -0
- package/dist/cli/ink-cli/constants/processingPhrases.d.ts +10 -0
- package/dist/cli/ink-cli/constants/processingPhrases.d.ts.map +1 -0
- package/dist/cli/ink-cli/constants/processingPhrases.js +64 -0
- package/dist/cli/ink-cli/constants/tips.d.ts +15 -0
- package/dist/cli/ink-cli/constants/tips.d.ts.map +1 -0
- package/dist/cli/ink-cli/constants/tips.js +53 -0
- package/dist/cli/ink-cli/containers/InputContainer.d.ts +42 -8
- package/dist/cli/ink-cli/containers/InputContainer.d.ts.map +1 -1
- package/dist/cli/ink-cli/containers/InputContainer.js +513 -85
- package/dist/cli/ink-cli/containers/OverlayContainer.d.ts +23 -5
- package/dist/cli/ink-cli/containers/OverlayContainer.d.ts.map +1 -1
- package/dist/cli/ink-cli/containers/OverlayContainer.js +1214 -132
- package/dist/cli/ink-cli/containers/index.d.ts +1 -1
- package/dist/cli/ink-cli/containers/index.d.ts.map +1 -1
- package/dist/cli/ink-cli/contexts/KeypressContext.d.ts +36 -0
- package/dist/cli/ink-cli/contexts/KeypressContext.d.ts.map +1 -0
- package/dist/cli/ink-cli/contexts/KeypressContext.js +461 -0
- package/dist/cli/ink-cli/contexts/MouseContext.d.ts +27 -0
- package/dist/cli/ink-cli/contexts/MouseContext.d.ts.map +1 -0
- package/dist/cli/ink-cli/contexts/MouseContext.js +102 -0
- package/dist/cli/ink-cli/contexts/ScrollProvider.d.ts +33 -0
- package/dist/cli/ink-cli/contexts/ScrollProvider.d.ts.map +1 -0
- package/dist/cli/ink-cli/contexts/ScrollProvider.js +170 -0
- package/dist/cli/ink-cli/contexts/index.d.ts +7 -0
- package/dist/cli/ink-cli/contexts/index.d.ts.map +1 -0
- package/dist/cli/ink-cli/contexts/index.js +6 -0
- package/dist/cli/ink-cli/hooks/index.d.ts +5 -0
- package/dist/cli/ink-cli/hooks/index.d.ts.map +1 -1
- package/dist/cli/ink-cli/hooks/index.js +6 -1
- package/dist/cli/ink-cli/hooks/useAgentEvents.d.ts +26 -9
- package/dist/cli/ink-cli/hooks/useAgentEvents.d.ts.map +1 -1
- package/dist/cli/ink-cli/hooks/useAgentEvents.js +90 -198
- package/dist/cli/ink-cli/hooks/useBatchedScroll.d.ts +14 -0
- package/dist/cli/ink-cli/hooks/useBatchedScroll.d.ts.map +1 -0
- package/dist/cli/ink-cli/hooks/useBatchedScroll.js +25 -0
- package/dist/cli/ink-cli/hooks/useCLIState.d.ts +50 -0
- package/dist/cli/ink-cli/hooks/useCLIState.d.ts.map +1 -0
- package/dist/cli/ink-cli/hooks/useCLIState.js +190 -0
- package/dist/cli/ink-cli/hooks/useElapsedTime.d.ts +24 -0
- package/dist/cli/ink-cli/hooks/useElapsedTime.d.ts.map +1 -0
- package/dist/cli/ink-cli/hooks/useElapsedTime.js +69 -0
- package/dist/cli/ink-cli/hooks/useHistorySearch.d.ts +61 -0
- package/dist/cli/ink-cli/hooks/useHistorySearch.d.ts.map +1 -0
- package/dist/cli/ink-cli/hooks/useHistorySearch.js +210 -0
- package/dist/cli/ink-cli/hooks/useInputOrchestrator.d.ts +136 -0
- package/dist/cli/ink-cli/hooks/useInputOrchestrator.d.ts.map +1 -0
- package/dist/cli/ink-cli/hooks/useInputOrchestrator.js +663 -0
- package/dist/cli/ink-cli/hooks/useKeyboardShortcuts.d.ts.map +1 -1
- package/dist/cli/ink-cli/hooks/useKeyboardShortcuts.js +7 -26
- package/dist/cli/ink-cli/hooks/useKeypress.d.ts +18 -0
- package/dist/cli/ink-cli/hooks/useKeypress.d.ts.map +1 -0
- package/dist/cli/ink-cli/hooks/useKeypress.js +26 -0
- package/dist/cli/ink-cli/hooks/usePhraseCycler.d.ts +30 -0
- package/dist/cli/ink-cli/hooks/usePhraseCycler.d.ts.map +1 -0
- package/dist/cli/ink-cli/hooks/usePhraseCycler.js +68 -0
- package/dist/cli/ink-cli/hooks/useStreaming.d.ts +19 -0
- package/dist/cli/ink-cli/hooks/useStreaming.d.ts.map +1 -0
- package/dist/cli/ink-cli/hooks/useStreaming.js +26 -0
- package/dist/cli/ink-cli/hooks/useTerminalSize.d.ts +14 -0
- package/dist/cli/ink-cli/hooks/useTerminalSize.d.ts.map +1 -0
- package/dist/cli/ink-cli/hooks/useTerminalSize.js +31 -0
- package/dist/cli/ink-cli/hooks/useTokenCounter.d.ts +42 -0
- package/dist/cli/ink-cli/hooks/useTokenCounter.d.ts.map +1 -0
- package/dist/cli/ink-cli/hooks/useTokenCounter.js +96 -0
- package/dist/cli/ink-cli/services/CommandService.d.ts +32 -1
- package/dist/cli/ink-cli/services/CommandService.d.ts.map +1 -1
- package/dist/cli/ink-cli/services/CommandService.js +36 -5
- package/dist/cli/ink-cli/services/InputService.d.ts +1 -5
- package/dist/cli/ink-cli/services/InputService.d.ts.map +1 -1
- package/dist/cli/ink-cli/services/InputService.js +1 -8
- package/dist/cli/ink-cli/services/index.d.ts +2 -1
- package/dist/cli/ink-cli/services/index.d.ts.map +1 -1
- package/dist/cli/ink-cli/services/index.js +2 -1
- package/dist/cli/ink-cli/services/processStream.d.ts +69 -0
- package/dist/cli/ink-cli/services/processStream.d.ts.map +1 -0
- package/dist/cli/ink-cli/services/processStream.js +742 -0
- package/dist/cli/ink-cli/state/actions.d.ts +30 -60
- package/dist/cli/ink-cli/state/actions.d.ts.map +1 -1
- package/dist/cli/ink-cli/state/actions.js +3 -0
- package/dist/cli/ink-cli/state/index.d.ts +5 -3
- package/dist/cli/ink-cli/state/index.d.ts.map +1 -1
- package/dist/cli/ink-cli/state/index.js +4 -3
- package/dist/cli/ink-cli/state/initialState.d.ts +4 -3
- package/dist/cli/ink-cli/state/initialState.d.ts.map +1 -1
- package/dist/cli/ink-cli/state/initialState.js +20 -4
- package/dist/cli/ink-cli/state/reducer.d.ts +3 -0
- package/dist/cli/ink-cli/state/reducer.d.ts.map +1 -1
- package/dist/cli/ink-cli/state/reducer.js +62 -168
- package/dist/cli/ink-cli/state/streaming-state.d.ts +27 -0
- package/dist/cli/ink-cli/state/streaming-state.d.ts.map +1 -0
- package/dist/cli/ink-cli/state/streaming-state.js +39 -0
- package/dist/cli/ink-cli/state/types.d.ts +223 -6
- package/dist/cli/ink-cli/state/types.d.ts.map +1 -1
- package/dist/cli/ink-cli/utils/bracketedPaste.d.ts +22 -0
- package/dist/cli/ink-cli/utils/bracketedPaste.d.ts.map +1 -0
- package/dist/cli/ink-cli/utils/bracketedPaste.js +27 -0
- package/dist/cli/ink-cli/utils/clipboardUtils.d.ts +49 -0
- package/dist/cli/ink-cli/utils/clipboardUtils.d.ts.map +1 -0
- package/dist/cli/ink-cli/utils/clipboardUtils.js +356 -0
- package/dist/cli/ink-cli/utils/commandOverlays.d.ts +33 -0
- package/dist/cli/ink-cli/utils/commandOverlays.d.ts.map +1 -0
- package/dist/cli/ink-cli/utils/commandOverlays.js +78 -0
- package/dist/cli/ink-cli/utils/debugLog.d.ts +38 -0
- package/dist/cli/ink-cli/utils/debugLog.d.ts.map +1 -0
- package/dist/cli/ink-cli/utils/debugLog.js +66 -0
- package/dist/cli/ink-cli/utils/index.d.ts +2 -1
- package/dist/cli/ink-cli/utils/index.d.ts.map +1 -1
- package/dist/cli/ink-cli/utils/index.js +3 -1
- package/dist/cli/ink-cli/utils/input.d.ts +25 -0
- package/dist/cli/ink-cli/utils/input.d.ts.map +1 -0
- package/dist/cli/ink-cli/utils/input.js +56 -0
- package/dist/cli/ink-cli/utils/inputParsing.d.ts +0 -9
- package/dist/cli/ink-cli/utils/inputParsing.d.ts.map +1 -1
- package/dist/cli/ink-cli/utils/inputParsing.js +0 -27
- package/dist/cli/ink-cli/utils/messageFormatting.d.ts +59 -3
- package/dist/cli/ink-cli/utils/messageFormatting.d.ts.map +1 -1
- package/dist/cli/ink-cli/utils/messageFormatting.js +348 -20
- package/dist/cli/ink-cli/utils/mouse.d.ts +61 -0
- package/dist/cli/ink-cli/utils/mouse.d.ts.map +1 -0
- package/dist/cli/ink-cli/utils/mouse.js +209 -0
- package/dist/cli/ink-cli/utils/streamSplitter.d.ts +44 -0
- package/dist/cli/ink-cli/utils/streamSplitter.d.ts.map +1 -0
- package/dist/cli/ink-cli/utils/streamSplitter.js +154 -0
- package/dist/cli/ink-cli/utils/textUtils.d.ts +63 -0
- package/dist/cli/ink-cli/utils/textUtils.d.ts.map +1 -0
- package/dist/cli/ink-cli/utils/textUtils.js +248 -0
- package/dist/cli/ink-cli/utils/toolUtils.d.ts +9 -0
- package/dist/cli/ink-cli/utils/toolUtils.d.ts.map +1 -0
- package/dist/cli/ink-cli/utils/toolUtils.js +15 -0
- package/dist/cli/utils/api-key-setup.d.ts +54 -4
- package/dist/cli/utils/api-key-setup.d.ts.map +1 -1
- package/dist/cli/utils/api-key-setup.js +433 -107
- package/dist/cli/utils/api-key-verification.d.ts +17 -0
- package/dist/cli/utils/api-key-verification.d.ts.map +1 -0
- package/dist/cli/utils/api-key-verification.js +211 -0
- package/dist/cli/utils/config-validation.d.ts +22 -2
- package/dist/cli/utils/config-validation.d.ts.map +1 -1
- package/dist/cli/utils/config-validation.js +354 -25
- package/dist/cli/utils/local-model-setup.d.ts +46 -0
- package/dist/cli/utils/local-model-setup.d.ts.map +1 -0
- package/dist/cli/utils/local-model-setup.js +662 -0
- package/dist/cli/utils/options.d.ts.map +1 -1
- package/dist/cli/utils/options.js +1 -3
- package/dist/cli/utils/prompt-helpers.d.ts +47 -0
- package/dist/cli/utils/prompt-helpers.d.ts.map +1 -0
- package/dist/cli/utils/prompt-helpers.js +66 -0
- package/dist/cli/utils/provider-setup.d.ts +66 -8
- package/dist/cli/utils/provider-setup.d.ts.map +1 -1
- package/dist/cli/utils/provider-setup.js +324 -84
- package/dist/cli/utils/scaffolding-utils.d.ts +76 -0
- package/dist/cli/utils/scaffolding-utils.d.ts.map +1 -0
- package/dist/cli/utils/scaffolding-utils.js +246 -0
- package/dist/cli/utils/setup-utils.d.ts +16 -0
- package/dist/cli/utils/setup-utils.d.ts.map +1 -1
- package/dist/cli/utils/setup-utils.js +72 -21
- package/dist/cli/utils/template-engine.d.ts +65 -0
- package/dist/cli/utils/template-engine.d.ts.map +1 -0
- package/dist/cli/utils/template-engine.js +1089 -0
- package/dist/config/cli-overrides.d.ts +45 -2
- package/dist/config/cli-overrides.d.ts.map +1 -1
- package/dist/config/cli-overrides.js +107 -10
- package/dist/index.js +379 -99
- package/dist/utils/agent-helpers.d.ts +95 -0
- package/dist/utils/agent-helpers.d.ts.map +1 -0
- package/dist/utils/agent-helpers.js +117 -0
- package/dist/webui/assets/index-8j-KMkX1.js +2054 -0
- package/dist/webui/assets/index-c_AX24V4.css +1 -0
- package/dist/webui/assets/{tanstack-DgxBONJY.js → tanstack-Br79RQ-n.js} +1 -1
- package/dist/webui/index.html +4 -10
- package/dist/webui/logos/aws-color.svg +1 -0
- package/dist/webui/logos/dexto/dexto_logo.svg +1 -1
- package/dist/webui/logos/dexto/dexto_logo_light.svg +6 -6
- package/dist/webui/logos/glama.svg +7 -0
- package/dist/webui/logos/litellm.svg +7 -0
- package/dist/webui/logos/openrouter.svg +1 -0
- package/package.json +18 -15
- package/dist/cli/commands/interactive-commands/index.d.ts +0 -63
- package/dist/cli/commands/interactive-commands/index.d.ts.map +0 -1
- package/dist/cli/commands/interactive-commands/index.js +0 -73
- package/dist/cli/commands/interactive-commands/mcp/mcp-add-utils.d.ts +0 -34
- package/dist/cli/commands/interactive-commands/mcp/mcp-add-utils.d.ts.map +0 -1
- package/dist/cli/commands/interactive-commands/mcp/mcp-add-utils.js +0 -178
- package/dist/cli/commands/interactive-commands/mcp/mcp-commands.d.ts +0 -9
- package/dist/cli/commands/interactive-commands/mcp/mcp-commands.d.ts.map +0 -1
- package/dist/cli/commands/interactive-commands/mcp/mcp-commands.js +0 -325
- package/dist/cli/commands/interactive-commands/model/model-commands.d.ts +0 -21
- package/dist/cli/commands/interactive-commands/model/model-commands.d.ts.map +0 -1
- package/dist/cli/commands/interactive-commands/model/model-commands.js +0 -190
- package/dist/cli/ink-cli/components/MultiLineTextInput.d.ts +0 -26
- package/dist/cli/ink-cli/components/MultiLineTextInput.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/MultiLineTextInput.js +0 -220
- package/dist/discord/bot.d.ts +0 -4
- package/dist/discord/bot.d.ts.map +0 -1
- package/dist/discord/bot.js +0 -193
- package/dist/telegram/bot.d.ts +0 -5
- package/dist/telegram/bot.d.ts.map +0 -1
- package/dist/telegram/bot.js +0 -251
- package/dist/webui/assets/index-DKq5Xng1.js +0 -687
- package/dist/webui/assets/index-D_0_GBu5.css +0 -1
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* PromptAddWizard Component
|
|
4
|
+
* Multi-step wizard for creating a new prompt
|
|
5
|
+
*/
|
|
6
|
+
import { useState, useEffect, forwardRef, useImperativeHandle, useCallback } from 'react';
|
|
7
|
+
import { Box, Text } from 'ink';
|
|
8
|
+
const PROMPT_NAME_REGEX = /^[a-z0-9]+(?:-[a-z0-9]+)*$/;
|
|
9
|
+
const WIZARD_STEPS = [
|
|
10
|
+
{
|
|
11
|
+
field: 'name',
|
|
12
|
+
label: 'Prompt Name',
|
|
13
|
+
placeholder: 'e.g., my-prompt (kebab-case)',
|
|
14
|
+
required: true,
|
|
15
|
+
validate: (v) => {
|
|
16
|
+
if (!v.trim())
|
|
17
|
+
return 'Name is required';
|
|
18
|
+
if (!PROMPT_NAME_REGEX.test(v.trim())) {
|
|
19
|
+
return 'Name must be kebab-case (lowercase letters, numbers, hyphens)';
|
|
20
|
+
}
|
|
21
|
+
return null;
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
field: 'title',
|
|
26
|
+
label: 'Title (optional)',
|
|
27
|
+
placeholder: 'e.g., My Custom Prompt',
|
|
28
|
+
required: false,
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
field: 'description',
|
|
32
|
+
label: 'Description (optional)',
|
|
33
|
+
placeholder: 'e.g., Helps with specific task',
|
|
34
|
+
required: false,
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
field: 'argumentHint',
|
|
38
|
+
label: 'Arguments (optional)',
|
|
39
|
+
placeholder: 'e.g., [style] [length?] - use ? for optional',
|
|
40
|
+
required: false,
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
field: 'content',
|
|
44
|
+
label: 'Prompt Content',
|
|
45
|
+
placeholder: 'Use $1, $2 for args, $ARGUMENTS for remaining',
|
|
46
|
+
required: true,
|
|
47
|
+
multiline: true,
|
|
48
|
+
validate: (v) => (v.trim() ? null : 'Content is required'),
|
|
49
|
+
},
|
|
50
|
+
];
|
|
51
|
+
/**
|
|
52
|
+
* Multi-step wizard for creating a new prompt
|
|
53
|
+
*/
|
|
54
|
+
const PromptAddWizard = forwardRef(function PromptAddWizard({ isVisible, scope, onComplete, onClose }, ref) {
|
|
55
|
+
const [currentStep, setCurrentStep] = useState(0);
|
|
56
|
+
const [values, setValues] = useState({});
|
|
57
|
+
const [currentInput, setCurrentInput] = useState('');
|
|
58
|
+
const [error, setError] = useState(null);
|
|
59
|
+
// Reset when becoming visible
|
|
60
|
+
useEffect(() => {
|
|
61
|
+
if (isVisible) {
|
|
62
|
+
setCurrentStep(0);
|
|
63
|
+
setValues({});
|
|
64
|
+
setCurrentInput('');
|
|
65
|
+
setError(null);
|
|
66
|
+
}
|
|
67
|
+
}, [isVisible, scope]);
|
|
68
|
+
const currentStepConfig = WIZARD_STEPS[currentStep];
|
|
69
|
+
const handleNext = useCallback(() => {
|
|
70
|
+
if (!currentStepConfig)
|
|
71
|
+
return;
|
|
72
|
+
const value = currentInput.trim();
|
|
73
|
+
// Validate
|
|
74
|
+
if (currentStepConfig.validate) {
|
|
75
|
+
const validationError = currentStepConfig.validate(value);
|
|
76
|
+
if (validationError) {
|
|
77
|
+
setError(validationError);
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
else if (currentStepConfig.required && !value) {
|
|
82
|
+
setError(`${currentStepConfig.label} is required`);
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
// Save value
|
|
86
|
+
const newValues = { ...values, [currentStepConfig.field]: value };
|
|
87
|
+
setValues(newValues);
|
|
88
|
+
setError(null);
|
|
89
|
+
setCurrentInput('');
|
|
90
|
+
// Check if we're done
|
|
91
|
+
if (currentStep >= WIZARD_STEPS.length - 1) {
|
|
92
|
+
// Build data and complete
|
|
93
|
+
const data = {
|
|
94
|
+
name: newValues.name || '',
|
|
95
|
+
content: newValues.content || '',
|
|
96
|
+
};
|
|
97
|
+
if (newValues.title?.trim()) {
|
|
98
|
+
data.title = newValues.title.trim();
|
|
99
|
+
}
|
|
100
|
+
if (newValues.description?.trim()) {
|
|
101
|
+
data.description = newValues.description.trim();
|
|
102
|
+
}
|
|
103
|
+
if (newValues.argumentHint?.trim()) {
|
|
104
|
+
data.argumentHint = newValues.argumentHint.trim();
|
|
105
|
+
}
|
|
106
|
+
onComplete(data);
|
|
107
|
+
}
|
|
108
|
+
else {
|
|
109
|
+
setCurrentStep(currentStep + 1);
|
|
110
|
+
}
|
|
111
|
+
}, [currentInput, currentStep, currentStepConfig, onComplete, values]);
|
|
112
|
+
const handleBack = useCallback(() => {
|
|
113
|
+
if (currentStep > 0) {
|
|
114
|
+
setCurrentStep(currentStep - 1);
|
|
115
|
+
// Restore previous value
|
|
116
|
+
const prevStep = WIZARD_STEPS[currentStep - 1];
|
|
117
|
+
if (prevStep) {
|
|
118
|
+
setCurrentInput(values[prevStep.field] || '');
|
|
119
|
+
}
|
|
120
|
+
setError(null);
|
|
121
|
+
}
|
|
122
|
+
else {
|
|
123
|
+
onClose();
|
|
124
|
+
}
|
|
125
|
+
}, [currentStep, onClose, values]);
|
|
126
|
+
// Handle keyboard input
|
|
127
|
+
useImperativeHandle(ref, () => ({
|
|
128
|
+
handleInput: (input, key) => {
|
|
129
|
+
if (!isVisible)
|
|
130
|
+
return false;
|
|
131
|
+
// Escape to go back/close
|
|
132
|
+
if (key.escape) {
|
|
133
|
+
handleBack();
|
|
134
|
+
return true;
|
|
135
|
+
}
|
|
136
|
+
// Enter to submit current step (or add newline in multiline mode)
|
|
137
|
+
if (key.return) {
|
|
138
|
+
if (currentStepConfig?.multiline && key.shift) {
|
|
139
|
+
// Shift+Enter adds newline in multiline mode
|
|
140
|
+
setCurrentInput((prev) => prev + '\n');
|
|
141
|
+
return true;
|
|
142
|
+
}
|
|
143
|
+
handleNext();
|
|
144
|
+
return true;
|
|
145
|
+
}
|
|
146
|
+
// Backspace
|
|
147
|
+
if (key.backspace || key.delete) {
|
|
148
|
+
setCurrentInput((prev) => prev.slice(0, -1));
|
|
149
|
+
setError(null);
|
|
150
|
+
return true;
|
|
151
|
+
}
|
|
152
|
+
// Regular character input
|
|
153
|
+
if (input && !key.ctrl && !key.meta) {
|
|
154
|
+
setCurrentInput((prev) => prev + input);
|
|
155
|
+
setError(null);
|
|
156
|
+
return true;
|
|
157
|
+
}
|
|
158
|
+
return false;
|
|
159
|
+
},
|
|
160
|
+
}), [isVisible, handleBack, handleNext, currentStepConfig]);
|
|
161
|
+
if (!isVisible || !currentStepConfig)
|
|
162
|
+
return null;
|
|
163
|
+
const scopeLabel = scope === 'agent' ? 'Agent' : 'Shared';
|
|
164
|
+
return (_jsxs(Box, { flexDirection: "column", borderStyle: "round", borderColor: "yellowBright", paddingX: 1, marginTop: 1, children: [_jsxs(Box, { marginBottom: 1, children: [_jsxs(Text, { bold: true, color: "yellowBright", children: ["Add ", scopeLabel, " Prompt"] }), _jsxs(Text, { color: "gray", children: [' ', "(Step ", currentStep + 1, "/", WIZARD_STEPS.length, ")"] })] }), _jsxs(Box, { flexDirection: "column", children: [_jsxs(Text, { bold: true, children: [currentStepConfig.label, ":"] }), _jsx(Text, { color: "gray", children: currentStepConfig.placeholder })] }), _jsxs(Box, { marginTop: 1, flexDirection: "column", children: [_jsxs(Box, { children: [_jsx(Text, { color: "cyan", children: "> " }), _jsx(Text, { children: currentInput }), _jsx(Text, { color: "cyan", children: "_" })] }), currentStepConfig.multiline && (_jsx(Text, { color: "gray", italic: true, children: "(Shift+Enter for newline)" }))] }), error && (_jsx(Box, { marginTop: 1, children: _jsx(Text, { color: "red", children: error }) })), _jsx(Box, { marginTop: 1, children: _jsxs(Text, { color: "gray", children: ["Enter to continue \u2022 Esc to ", currentStep > 0 ? 'go back' : 'cancel'] }) })] }));
|
|
165
|
+
});
|
|
166
|
+
export default PromptAddWizard;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PromptDeleteSelector Component
|
|
3
|
+
* Shows list of deletable prompts (config and shared only, not MCP)
|
|
4
|
+
*/
|
|
5
|
+
import React from 'react';
|
|
6
|
+
import type { Key } from '../../hooks/useInputOrchestrator.js';
|
|
7
|
+
import type { DextoAgent, PromptInfo } from '@dexto/core';
|
|
8
|
+
export interface DeletablePrompt {
|
|
9
|
+
prompt: PromptInfo;
|
|
10
|
+
sourceType: 'config' | 'shared';
|
|
11
|
+
filePath?: string | undefined;
|
|
12
|
+
}
|
|
13
|
+
interface PromptDeleteSelectorProps {
|
|
14
|
+
isVisible: boolean;
|
|
15
|
+
onDelete: (prompt: DeletablePrompt) => void;
|
|
16
|
+
onClose: () => void;
|
|
17
|
+
agent: DextoAgent;
|
|
18
|
+
}
|
|
19
|
+
export interface PromptDeleteSelectorHandle {
|
|
20
|
+
handleInput: (input: string, key: Key) => boolean;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* PromptDeleteSelector - shows deletable prompts
|
|
24
|
+
*/
|
|
25
|
+
declare const PromptDeleteSelector: React.ForwardRefExoticComponent<PromptDeleteSelectorProps & React.RefAttributes<PromptDeleteSelectorHandle>>;
|
|
26
|
+
export default PromptDeleteSelector;
|
|
27
|
+
//# sourceMappingURL=PromptDeleteSelector.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PromptDeleteSelector.d.ts","sourceRoot":"","sources":["../../../../../src/cli/ink-cli/components/overlays/PromptDeleteSelector.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,UAAU,EAAE,MAAM,aAAa,CAAC;AAG1D,MAAM,WAAW,eAAe;IAC5B,MAAM,EAAE,UAAU,CAAC;IACnB,UAAU,EAAE,QAAQ,GAAG,QAAQ,CAAC;IAChC,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACjC;AAED,UAAU,yBAAyB;IAC/B,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,CAAC,MAAM,EAAE,eAAe,KAAK,IAAI,CAAC;IAC5C,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,KAAK,EAAE,UAAU,CAAC;CACrB;AAED,MAAM,WAAW,0BAA0B;IACvC,WAAW,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,KAAK,OAAO,CAAC;CACrD;AAwBD;;GAEG;AACH,QAAA,MAAM,oBAAoB,8GA4IzB,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,119 @@
|
|
|
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;
|
|
@@ -0,0 +1,33 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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,0FAkKd,CAAC;AAEH,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,144 @@
|
|
|
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
|
+
const sourceInfo = getSourceIndicator(prompt.source);
|
|
119
|
+
const isShared = isSharedPrompt(prompt);
|
|
120
|
+
const sourceLabel = isShared ? 'shared' : sourceInfo.label;
|
|
121
|
+
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, ")"] })] }));
|
|
122
|
+
};
|
|
123
|
+
// Handle selection
|
|
124
|
+
const handleSelect = (item) => {
|
|
125
|
+
if (item.type === 'add') {
|
|
126
|
+
onAction({ type: 'add-prompt' });
|
|
127
|
+
}
|
|
128
|
+
else if (item.type === 'delete') {
|
|
129
|
+
onAction({ type: 'delete-prompt' });
|
|
130
|
+
}
|
|
131
|
+
else if (item.prompt) {
|
|
132
|
+
onAction({ type: 'select-prompt', prompt: item.prompt });
|
|
133
|
+
}
|
|
134
|
+
};
|
|
135
|
+
// Handle Tab to load into input
|
|
136
|
+
const handleTab = (item) => {
|
|
137
|
+
if (item.type === 'prompt' && item.prompt) {
|
|
138
|
+
const displayName = item.prompt.displayName || item.prompt.name;
|
|
139
|
+
onLoadIntoInput(`/${displayName} `);
|
|
140
|
+
}
|
|
141
|
+
};
|
|
142
|
+
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 }));
|
|
143
|
+
});
|
|
144
|
+
export default PromptList;
|
|
@@ -0,0 +1,23 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|