@dexto/tui 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/LICENSE +44 -0
- package/dist/InkCLIRefactored.cjs +319 -0
- package/dist/InkCLIRefactored.d.ts +55 -0
- package/dist/InkCLIRefactored.d.ts.map +1 -0
- package/dist/InkCLIRefactored.js +289 -0
- package/dist/assets/sounds/SOURCES.md +35 -0
- package/dist/assets/sounds/boot.wav +0 -0
- package/dist/assets/sounds/chime.wav +0 -0
- package/dist/assets/sounds/coin.wav +0 -0
- package/dist/assets/sounds/confirm.wav +0 -0
- package/dist/assets/sounds/levelup.wav +0 -0
- package/dist/assets/sounds/ping.wav +0 -0
- package/dist/assets/sounds/powerup.wav +0 -0
- package/dist/assets/sounds/startup.wav +0 -0
- package/dist/assets/sounds/success.wav +0 -0
- package/dist/assets/sounds/treasure.wav +0 -0
- package/dist/assets/sounds/win.wav +0 -0
- package/dist/components/ApprovalPrompt.cjs +353 -0
- package/dist/components/ApprovalPrompt.d.ts +44 -0
- package/dist/components/ApprovalPrompt.d.ts.map +1 -0
- package/dist/components/ApprovalPrompt.js +336 -0
- package/dist/components/BackgroundTasksPanel.cjs +117 -0
- package/dist/components/BackgroundTasksPanel.d.ts +18 -0
- package/dist/components/BackgroundTasksPanel.d.ts.map +1 -0
- package/dist/components/BackgroundTasksPanel.js +93 -0
- package/dist/components/CustomInput.cjs +77 -0
- package/dist/components/CustomInput.d.ts +17 -0
- package/dist/components/CustomInput.d.ts.map +1 -0
- package/dist/components/CustomInput.js +57 -0
- package/dist/components/CustomTextInput.cjs +76 -0
- package/dist/components/CustomTextInput.d.ts +16 -0
- package/dist/components/CustomTextInput.d.ts.map +1 -0
- package/dist/components/CustomTextInput.js +46 -0
- package/dist/components/EditableMultiLineInput.cjs +151 -0
- package/dist/components/EditableMultiLineInput.d.ts +19 -0
- package/dist/components/EditableMultiLineInput.d.ts.map +1 -0
- package/dist/components/EditableMultiLineInput.js +131 -0
- package/dist/components/ElicitationForm.cjs +622 -0
- package/dist/components/ElicitationForm.d.ts +24 -0
- package/dist/components/ElicitationForm.d.ts.map +1 -0
- package/dist/components/ElicitationForm.js +588 -0
- package/dist/components/ErrorBoundary.cjs +66 -0
- package/dist/components/ErrorBoundary.d.ts +20 -0
- package/dist/components/ErrorBoundary.d.ts.map +1 -0
- package/dist/components/ErrorBoundary.js +32 -0
- package/dist/components/Footer.cjs +165 -0
- package/dist/components/Footer.d.ts +23 -0
- package/dist/components/Footer.d.ts.map +1 -0
- package/dist/components/Footer.js +131 -0
- package/dist/components/HistorySearchBar.cjs +40 -0
- package/dist/components/HistorySearchBar.d.ts +17 -0
- package/dist/components/HistorySearchBar.d.ts.map +1 -0
- package/dist/components/HistorySearchBar.js +16 -0
- package/dist/components/MultiLineInput.cjs +56 -0
- package/dist/components/MultiLineInput.d.ts +12 -0
- package/dist/components/MultiLineInput.d.ts.map +1 -0
- package/dist/components/MultiLineInput.js +36 -0
- package/dist/components/ResourceAutocomplete.cjs +344 -0
- package/dist/components/ResourceAutocomplete.d.ts +26 -0
- package/dist/components/ResourceAutocomplete.d.ts.map +1 -0
- package/dist/components/ResourceAutocomplete.js +322 -0
- package/dist/components/SlashCommandAutocomplete.cjs +389 -0
- package/dist/components/SlashCommandAutocomplete.d.ts +28 -0
- package/dist/components/SlashCommandAutocomplete.d.ts.map +1 -0
- package/dist/components/SlashCommandAutocomplete.js +363 -0
- package/dist/components/StatusBar.cjs +142 -0
- package/dist/components/StatusBar.d.ts +41 -0
- package/dist/components/StatusBar.d.ts.map +1 -0
- package/dist/components/StatusBar.js +118 -0
- package/dist/components/TextBufferInput.cjs +531 -0
- package/dist/components/TextBufferInput.d.ts +54 -0
- package/dist/components/TextBufferInput.d.ts.map +1 -0
- package/dist/components/TextBufferInput.js +507 -0
- package/dist/components/TodoPanel.cjs +129 -0
- package/dist/components/TodoPanel.d.ts +26 -0
- package/dist/components/TodoPanel.d.ts.map +1 -0
- package/dist/components/TodoPanel.js +105 -0
- package/dist/components/base/BaseAutocomplete.cjs +153 -0
- package/dist/components/base/BaseAutocomplete.d.ts +29 -0
- package/dist/components/base/BaseAutocomplete.d.ts.map +1 -0
- package/dist/components/base/BaseAutocomplete.js +129 -0
- package/dist/components/base/BaseSelector.cjs +167 -0
- package/dist/components/base/BaseSelector.d.ts +37 -0
- package/dist/components/base/BaseSelector.d.ts.map +1 -0
- package/dist/components/base/BaseSelector.js +151 -0
- package/dist/components/base/index.cjs +31 -0
- package/dist/components/base/index.d.ts +6 -0
- package/dist/components/base/index.d.ts.map +1 -0
- package/dist/components/base/index.js +6 -0
- package/dist/components/chat/ChatView.cjs +51 -0
- package/dist/components/chat/ChatView.d.ts +19 -0
- package/dist/components/chat/ChatView.d.ts.map +1 -0
- package/dist/components/chat/ChatView.js +27 -0
- package/dist/components/chat/Footer.cjs +32 -0
- package/dist/components/chat/Footer.d.ts +9 -0
- package/dist/components/chat/Footer.d.ts.map +1 -0
- package/dist/components/chat/Footer.js +8 -0
- package/dist/components/chat/Header.cjs +86 -0
- package/dist/components/chat/Header.d.ts +18 -0
- package/dist/components/chat/Header.d.ts.map +1 -0
- package/dist/components/chat/Header.js +62 -0
- package/dist/components/chat/MessageItem.cjs +269 -0
- package/dist/components/chat/MessageItem.d.ts +23 -0
- package/dist/components/chat/MessageItem.d.ts.map +1 -0
- package/dist/components/chat/MessageItem.js +247 -0
- package/dist/components/chat/MessageList.cjs +46 -0
- package/dist/components/chat/MessageList.d.ts +16 -0
- package/dist/components/chat/MessageList.d.ts.map +1 -0
- package/dist/components/chat/MessageList.js +22 -0
- package/dist/components/chat/QueuedMessagesDisplay.cjs +59 -0
- package/dist/components/chat/QueuedMessagesDisplay.d.ts +16 -0
- package/dist/components/chat/QueuedMessagesDisplay.d.ts.map +1 -0
- package/dist/components/chat/QueuedMessagesDisplay.js +35 -0
- package/dist/components/chat/ToolIcon.cjs +60 -0
- package/dist/components/chat/ToolIcon.d.ts +18 -0
- package/dist/components/chat/ToolIcon.d.ts.map +1 -0
- package/dist/components/chat/ToolIcon.js +36 -0
- package/dist/components/chat/index.cjs +43 -0
- package/dist/components/chat/index.d.ts +10 -0
- package/dist/components/chat/index.d.ts.map +1 -0
- package/dist/components/chat/index.js +14 -0
- package/dist/components/chat/styled-boxes/ConfigBox.cjs +56 -0
- package/dist/components/chat/styled-boxes/ConfigBox.d.ts +10 -0
- package/dist/components/chat/styled-boxes/ConfigBox.d.ts.map +1 -0
- package/dist/components/chat/styled-boxes/ConfigBox.js +32 -0
- package/dist/components/chat/styled-boxes/HelpBox.cjs +53 -0
- package/dist/components/chat/styled-boxes/HelpBox.d.ts +10 -0
- package/dist/components/chat/styled-boxes/HelpBox.d.ts.map +1 -0
- package/dist/components/chat/styled-boxes/HelpBox.js +29 -0
- package/dist/components/chat/styled-boxes/LogConfigBox.cjs +54 -0
- package/dist/components/chat/styled-boxes/LogConfigBox.d.ts +10 -0
- package/dist/components/chat/styled-boxes/LogConfigBox.d.ts.map +1 -0
- package/dist/components/chat/styled-boxes/LogConfigBox.js +30 -0
- package/dist/components/chat/styled-boxes/SessionHistoryBox.cjs +81 -0
- package/dist/components/chat/styled-boxes/SessionHistoryBox.d.ts +10 -0
- package/dist/components/chat/styled-boxes/SessionHistoryBox.d.ts.map +1 -0
- package/dist/components/chat/styled-boxes/SessionHistoryBox.js +57 -0
- package/dist/components/chat/styled-boxes/SessionListBox.cjs +58 -0
- package/dist/components/chat/styled-boxes/SessionListBox.d.ts +10 -0
- package/dist/components/chat/styled-boxes/SessionListBox.d.ts.map +1 -0
- package/dist/components/chat/styled-boxes/SessionListBox.js +34 -0
- package/dist/components/chat/styled-boxes/ShortcutsBox.cjs +39 -0
- package/dist/components/chat/styled-boxes/ShortcutsBox.d.ts +10 -0
- package/dist/components/chat/styled-boxes/ShortcutsBox.d.ts.map +1 -0
- package/dist/components/chat/styled-boxes/ShortcutsBox.js +15 -0
- package/dist/components/chat/styled-boxes/StatsBox.cjs +123 -0
- package/dist/components/chat/styled-boxes/StatsBox.d.ts +10 -0
- package/dist/components/chat/styled-boxes/StatsBox.d.ts.map +1 -0
- package/dist/components/chat/styled-boxes/StatsBox.js +99 -0
- package/dist/components/chat/styled-boxes/StyledBox.cjs +88 -0
- package/dist/components/chat/styled-boxes/StyledBox.d.ts +45 -0
- package/dist/components/chat/styled-boxes/StyledBox.d.ts.map +1 -0
- package/dist/components/chat/styled-boxes/StyledBox.js +61 -0
- package/dist/components/chat/styled-boxes/SyspromptBox.cjs +33 -0
- package/dist/components/chat/styled-boxes/SyspromptBox.d.ts +10 -0
- package/dist/components/chat/styled-boxes/SyspromptBox.d.ts.map +1 -0
- package/dist/components/chat/styled-boxes/SyspromptBox.js +9 -0
- package/dist/components/chat/styled-boxes/index.cjs +58 -0
- package/dist/components/chat/styled-boxes/index.d.ts +13 -0
- package/dist/components/chat/styled-boxes/index.d.ts.map +1 -0
- package/dist/components/chat/styled-boxes/index.js +23 -0
- package/dist/components/input/InputArea.cjs +74 -0
- package/dist/components/input/InputArea.d.ts +48 -0
- package/dist/components/input/InputArea.d.ts.map +1 -0
- package/dist/components/input/InputArea.js +50 -0
- package/dist/components/input/index.cjs +28 -0
- package/dist/components/input/index.d.ts +5 -0
- package/dist/components/input/index.d.ts.map +1 -0
- package/dist/components/input/index.js +4 -0
- package/dist/components/modes/AlternateBufferCLI.cjs +360 -0
- package/dist/components/modes/AlternateBufferCLI.d.ts +28 -0
- package/dist/components/modes/AlternateBufferCLI.d.ts.map +1 -0
- package/dist/components/modes/AlternateBufferCLI.js +339 -0
- package/dist/components/modes/StaticCLI.cjs +303 -0
- package/dist/components/modes/StaticCLI.d.ts +30 -0
- package/dist/components/modes/StaticCLI.d.ts.map +1 -0
- package/dist/components/modes/StaticCLI.js +279 -0
- package/dist/components/modes/index.cjs +31 -0
- package/dist/components/modes/index.d.ts +10 -0
- package/dist/components/modes/index.d.ts.map +1 -0
- package/dist/components/modes/index.js +6 -0
- package/dist/components/overlays/ApiKeyInput.cjs +131 -0
- package/dist/components/overlays/ApiKeyInput.d.ts +26 -0
- package/dist/components/overlays/ApiKeyInput.d.ts.map +1 -0
- package/dist/components/overlays/ApiKeyInput.js +115 -0
- package/dist/components/overlays/CommandOutputOverlay.cjs +103 -0
- package/dist/components/overlays/CommandOutputOverlay.d.ts +13 -0
- package/dist/components/overlays/CommandOutputOverlay.d.ts.map +1 -0
- package/dist/components/overlays/CommandOutputOverlay.js +69 -0
- package/dist/components/overlays/ContextStatsOverlay.cjs +354 -0
- package/dist/components/overlays/ContextStatsOverlay.d.ts +26 -0
- package/dist/components/overlays/ContextStatsOverlay.d.ts.map +1 -0
- package/dist/components/overlays/ContextStatsOverlay.js +334 -0
- package/dist/components/overlays/CustomModelWizard.cjs +362 -0
- package/dist/components/overlays/CustomModelWizard.d.ts +29 -0
- package/dist/components/overlays/CustomModelWizard.d.ts.map +1 -0
- package/dist/components/overlays/CustomModelWizard.js +356 -0
- package/dist/components/overlays/ExportWizard.cjs +382 -0
- package/dist/components/overlays/ExportWizard.d.ts +22 -0
- package/dist/components/overlays/ExportWizard.d.ts.map +1 -0
- package/dist/components/overlays/ExportWizard.js +352 -0
- package/dist/components/overlays/LogLevelSelector.cjs +120 -0
- package/dist/components/overlays/LogLevelSelector.d.ts +23 -0
- package/dist/components/overlays/LogLevelSelector.d.ts.map +1 -0
- package/dist/components/overlays/LogLevelSelector.js +100 -0
- package/dist/components/overlays/LoginOverlay.cjs +211 -0
- package/dist/components/overlays/LoginOverlay.d.ts +22 -0
- package/dist/components/overlays/LoginOverlay.d.ts.map +1 -0
- package/dist/components/overlays/LoginOverlay.js +194 -0
- package/dist/components/overlays/LogoutOverlay.cjs +138 -0
- package/dist/components/overlays/LogoutOverlay.d.ts +20 -0
- package/dist/components/overlays/LogoutOverlay.d.ts.map +1 -0
- package/dist/components/overlays/LogoutOverlay.js +130 -0
- package/dist/components/overlays/MarketplaceAddPrompt.cjs +119 -0
- package/dist/components/overlays/MarketplaceAddPrompt.d.ts +20 -0
- package/dist/components/overlays/MarketplaceAddPrompt.d.ts.map +1 -0
- package/dist/components/overlays/MarketplaceAddPrompt.js +99 -0
- package/dist/components/overlays/MarketplaceBrowser.cjs +364 -0
- package/dist/components/overlays/MarketplaceBrowser.d.ts +31 -0
- package/dist/components/overlays/MarketplaceBrowser.d.ts.map +1 -0
- package/dist/components/overlays/MarketplaceBrowser.js +358 -0
- package/dist/components/overlays/McpAddChoice.cjs +100 -0
- package/dist/components/overlays/McpAddChoice.d.ts +22 -0
- package/dist/components/overlays/McpAddChoice.d.ts.map +1 -0
- package/dist/components/overlays/McpAddChoice.js +80 -0
- package/dist/components/overlays/McpAddSelector.cjs +113 -0
- package/dist/components/overlays/McpAddSelector.d.ts +26 -0
- package/dist/components/overlays/McpAddSelector.d.ts.map +1 -0
- package/dist/components/overlays/McpAddSelector.js +93 -0
- package/dist/components/overlays/McpCustomTypeSelector.cjs +99 -0
- package/dist/components/overlays/McpCustomTypeSelector.d.ts +21 -0
- package/dist/components/overlays/McpCustomTypeSelector.d.ts.map +1 -0
- package/dist/components/overlays/McpCustomTypeSelector.js +79 -0
- package/dist/components/overlays/McpCustomWizard.cjs +258 -0
- package/dist/components/overlays/McpCustomWizard.d.ts +29 -0
- package/dist/components/overlays/McpCustomWizard.d.ts.map +1 -0
- package/dist/components/overlays/McpCustomWizard.js +238 -0
- package/dist/components/overlays/McpRemoveSelector.cjs +127 -0
- package/dist/components/overlays/McpRemoveSelector.d.ts +22 -0
- package/dist/components/overlays/McpRemoveSelector.d.ts.map +1 -0
- package/dist/components/overlays/McpRemoveSelector.js +107 -0
- package/dist/components/overlays/McpSelector.cjs +94 -0
- package/dist/components/overlays/McpSelector.d.ts +21 -0
- package/dist/components/overlays/McpSelector.d.ts.map +1 -0
- package/dist/components/overlays/McpSelector.js +74 -0
- package/dist/components/overlays/McpServerActions.cjs +124 -0
- package/dist/components/overlays/McpServerActions.d.ts +28 -0
- package/dist/components/overlays/McpServerActions.d.ts.map +1 -0
- package/dist/components/overlays/McpServerActions.js +111 -0
- package/dist/components/overlays/McpServerList.cjs +152 -0
- package/dist/components/overlays/McpServerList.d.ts +29 -0
- package/dist/components/overlays/McpServerList.d.ts.map +1 -0
- package/dist/components/overlays/McpServerList.js +139 -0
- package/dist/components/overlays/ModelSelectorRefactored.cjs +869 -0
- package/dist/components/overlays/ModelSelectorRefactored.d.ts +27 -0
- package/dist/components/overlays/ModelSelectorRefactored.d.ts.map +1 -0
- package/dist/components/overlays/ModelSelectorRefactored.js +870 -0
- package/dist/components/overlays/PluginActions.cjs +108 -0
- package/dist/components/overlays/PluginActions.d.ts +27 -0
- package/dist/components/overlays/PluginActions.d.ts.map +1 -0
- package/dist/components/overlays/PluginActions.js +95 -0
- package/dist/components/overlays/PluginList.cjs +115 -0
- package/dist/components/overlays/PluginList.d.ts +21 -0
- package/dist/components/overlays/PluginList.d.ts.map +1 -0
- package/dist/components/overlays/PluginList.js +102 -0
- package/dist/components/overlays/PluginManager.cjs +106 -0
- package/dist/components/overlays/PluginManager.d.ts +21 -0
- package/dist/components/overlays/PluginManager.d.ts.map +1 -0
- package/dist/components/overlays/PluginManager.js +86 -0
- package/dist/components/overlays/PromptAddChoice.cjs +92 -0
- package/dist/components/overlays/PromptAddChoice.d.ts +22 -0
- package/dist/components/overlays/PromptAddChoice.d.ts.map +1 -0
- package/dist/components/overlays/PromptAddChoice.js +72 -0
- package/dist/components/overlays/PromptAddWizard.cjs +215 -0
- package/dist/components/overlays/PromptAddWizard.d.ts +29 -0
- package/dist/components/overlays/PromptAddWizard.d.ts.map +1 -0
- package/dist/components/overlays/PromptAddWizard.js +195 -0
- package/dist/components/overlays/PromptDeleteSelector.cjs +148 -0
- package/dist/components/overlays/PromptDeleteSelector.d.ts +27 -0
- package/dist/components/overlays/PromptDeleteSelector.d.ts.map +1 -0
- package/dist/components/overlays/PromptDeleteSelector.js +135 -0
- package/dist/components/overlays/PromptList.cjs +169 -0
- package/dist/components/overlays/PromptList.d.ts +33 -0
- package/dist/components/overlays/PromptList.d.ts.map +1 -0
- package/dist/components/overlays/PromptList.js +157 -0
- package/dist/components/overlays/ReasoningOverlay.cjs +305 -0
- package/dist/components/overlays/ReasoningOverlay.d.ts +28 -0
- package/dist/components/overlays/ReasoningOverlay.d.ts.map +1 -0
- package/dist/components/overlays/ReasoningOverlay.js +278 -0
- package/dist/components/overlays/SearchOverlay.cjs +249 -0
- package/dist/components/overlays/SearchOverlay.d.ts +23 -0
- package/dist/components/overlays/SearchOverlay.d.ts.map +1 -0
- package/dist/components/overlays/SearchOverlay.js +236 -0
- package/dist/components/overlays/SessionRenameOverlay.cjs +101 -0
- package/dist/components/overlays/SessionRenameOverlay.d.ts +21 -0
- package/dist/components/overlays/SessionRenameOverlay.d.ts.map +1 -0
- package/dist/components/overlays/SessionRenameOverlay.js +81 -0
- package/dist/components/overlays/SessionSelectorRefactored.cjs +153 -0
- package/dist/components/overlays/SessionSelectorRefactored.d.ts +26 -0
- package/dist/components/overlays/SessionSelectorRefactored.d.ts.map +1 -0
- package/dist/components/overlays/SessionSelectorRefactored.js +133 -0
- package/dist/components/overlays/SessionSubcommandSelector.cjs +84 -0
- package/dist/components/overlays/SessionSubcommandSelector.d.ts +21 -0
- package/dist/components/overlays/SessionSubcommandSelector.d.ts.map +1 -0
- package/dist/components/overlays/SessionSubcommandSelector.js +64 -0
- package/dist/components/overlays/SoundsSelector.cjs +632 -0
- package/dist/components/overlays/SoundsSelector.d.ts +21 -0
- package/dist/components/overlays/SoundsSelector.d.ts.map +1 -0
- package/dist/components/overlays/SoundsSelector.js +619 -0
- package/dist/components/overlays/StreamSelector.cjs +104 -0
- package/dist/components/overlays/StreamSelector.d.ts +20 -0
- package/dist/components/overlays/StreamSelector.d.ts.map +1 -0
- package/dist/components/overlays/StreamSelector.js +84 -0
- package/dist/components/overlays/ToolBrowser.cjs +854 -0
- package/dist/components/overlays/ToolBrowser.d.ts +26 -0
- package/dist/components/overlays/ToolBrowser.d.ts.map +1 -0
- package/dist/components/overlays/ToolBrowser.js +831 -0
- package/dist/components/overlays/custom-model-wizard/LocalModelWizard.cjs +784 -0
- package/dist/components/overlays/custom-model-wizard/LocalModelWizard.d.ts +25 -0
- package/dist/components/overlays/custom-model-wizard/LocalModelWizard.d.ts.map +1 -0
- package/dist/components/overlays/custom-model-wizard/LocalModelWizard.js +768 -0
- package/dist/components/overlays/custom-model-wizard/index.cjs +26 -0
- package/dist/components/overlays/custom-model-wizard/index.d.ts +15 -0
- package/dist/components/overlays/custom-model-wizard/index.d.ts.map +1 -0
- package/dist/components/overlays/custom-model-wizard/index.js +3 -0
- package/dist/components/overlays/custom-model-wizard/provider-config.cjs +549 -0
- package/dist/components/overlays/custom-model-wizard/provider-config.d.ts +42 -0
- package/dist/components/overlays/custom-model-wizard/provider-config.d.ts.map +1 -0
- package/dist/components/overlays/custom-model-wizard/provider-config.js +516 -0
- package/dist/components/overlays/custom-model-wizard/provider-config.test.cjs +31 -0
- package/dist/components/overlays/custom-model-wizard/provider-config.test.d.ts +2 -0
- package/dist/components/overlays/custom-model-wizard/provider-config.test.d.ts.map +1 -0
- package/dist/components/overlays/custom-model-wizard/provider-config.test.js +30 -0
- package/dist/components/overlays/custom-model-wizard/shared/ApiKeyStep.cjs +59 -0
- package/dist/components/overlays/custom-model-wizard/shared/ApiKeyStep.d.ts +25 -0
- package/dist/components/overlays/custom-model-wizard/shared/ApiKeyStep.d.ts.map +1 -0
- package/dist/components/overlays/custom-model-wizard/shared/ApiKeyStep.js +33 -0
- package/dist/components/overlays/custom-model-wizard/shared/ProviderSelector.cjs +64 -0
- package/dist/components/overlays/custom-model-wizard/shared/ProviderSelector.d.ts +17 -0
- package/dist/components/overlays/custom-model-wizard/shared/ProviderSelector.d.ts.map +1 -0
- package/dist/components/overlays/custom-model-wizard/shared/ProviderSelector.js +40 -0
- package/dist/components/overlays/custom-model-wizard/shared/SetupInfoBanner.cjs +48 -0
- package/dist/components/overlays/custom-model-wizard/shared/SetupInfoBanner.d.ts +20 -0
- package/dist/components/overlays/custom-model-wizard/shared/SetupInfoBanner.d.ts.map +1 -0
- package/dist/components/overlays/custom-model-wizard/shared/SetupInfoBanner.js +24 -0
- package/dist/components/overlays/custom-model-wizard/shared/WizardStepInput.cjs +58 -0
- package/dist/components/overlays/custom-model-wizard/shared/WizardStepInput.d.ts +30 -0
- package/dist/components/overlays/custom-model-wizard/shared/WizardStepInput.d.ts.map +1 -0
- package/dist/components/overlays/custom-model-wizard/shared/WizardStepInput.js +34 -0
- package/dist/components/overlays/custom-model-wizard/shared/index.cjs +41 -0
- package/dist/components/overlays/custom-model-wizard/shared/index.d.ts +8 -0
- package/dist/components/overlays/custom-model-wizard/shared/index.d.ts.map +1 -0
- package/dist/components/overlays/custom-model-wizard/shared/index.js +12 -0
- package/dist/components/overlays/custom-model-wizard/types.cjs +53 -0
- package/dist/components/overlays/custom-model-wizard/types.d.ts +85 -0
- package/dist/components/overlays/custom-model-wizard/types.d.ts.map +1 -0
- package/dist/components/overlays/custom-model-wizard/types.js +29 -0
- package/dist/components/renderers/DiffRenderer.cjs +145 -0
- package/dist/components/renderers/DiffRenderer.d.ts +21 -0
- package/dist/components/renderers/DiffRenderer.d.ts.map +1 -0
- package/dist/components/renderers/DiffRenderer.js +118 -0
- package/dist/components/renderers/FilePreviewRenderer.cjs +146 -0
- package/dist/components/renderers/FilePreviewRenderer.d.ts +30 -0
- package/dist/components/renderers/FilePreviewRenderer.d.ts.map +1 -0
- package/dist/components/renderers/FilePreviewRenderer.js +119 -0
- package/dist/components/renderers/FileRenderer.cjs +95 -0
- package/dist/components/renderers/FileRenderer.d.ts +21 -0
- package/dist/components/renderers/FileRenderer.d.ts.map +1 -0
- package/dist/components/renderers/FileRenderer.js +71 -0
- package/dist/components/renderers/GenericRenderer.cjs +63 -0
- package/dist/components/renderers/GenericRenderer.d.ts +21 -0
- package/dist/components/renderers/GenericRenderer.d.ts.map +1 -0
- package/dist/components/renderers/GenericRenderer.js +39 -0
- package/dist/components/renderers/SearchRenderer.cjs +77 -0
- package/dist/components/renderers/SearchRenderer.d.ts +20 -0
- package/dist/components/renderers/SearchRenderer.d.ts.map +1 -0
- package/dist/components/renderers/SearchRenderer.js +43 -0
- package/dist/components/renderers/ShellRenderer.cjs +61 -0
- package/dist/components/renderers/ShellRenderer.d.ts +21 -0
- package/dist/components/renderers/ShellRenderer.d.ts.map +1 -0
- package/dist/components/renderers/ShellRenderer.js +37 -0
- package/dist/components/renderers/diff-shared.cjs +172 -0
- package/dist/components/renderers/diff-shared.d.ts +61 -0
- package/dist/components/renderers/diff-shared.d.ts.map +1 -0
- package/dist/components/renderers/diff-shared.js +142 -0
- package/dist/components/renderers/index.cjs +75 -0
- package/dist/components/renderers/index.d.ts +28 -0
- package/dist/components/renderers/index.d.ts.map +1 -0
- package/dist/components/renderers/index.js +44 -0
- package/dist/components/shared/FocusOverlayFrame.cjs +39 -0
- package/dist/components/shared/FocusOverlayFrame.d.ts +7 -0
- package/dist/components/shared/FocusOverlayFrame.d.ts.map +1 -0
- package/dist/components/shared/FocusOverlayFrame.js +15 -0
- package/dist/components/shared/HintBar.cjs +33 -0
- package/dist/components/shared/HintBar.d.ts +6 -0
- package/dist/components/shared/HintBar.d.ts.map +1 -0
- package/dist/components/shared/HintBar.js +9 -0
- package/dist/components/shared/MarkdownText.cjs +409 -0
- package/dist/components/shared/MarkdownText.d.ts +38 -0
- package/dist/components/shared/MarkdownText.d.ts.map +1 -0
- package/dist/components/shared/MarkdownText.js +373 -0
- package/dist/components/shared/VirtualizedList.cjs +365 -0
- package/dist/components/shared/VirtualizedList.d.ts +44 -0
- package/dist/components/shared/VirtualizedList.d.ts.map +1 -0
- package/dist/components/shared/VirtualizedList.js +349 -0
- package/dist/components/shared/text-buffer.cjs +1220 -0
- package/dist/components/shared/text-buffer.d.ts +185 -0
- package/dist/components/shared/text-buffer.d.ts.map +1 -0
- package/dist/components/shared/text-buffer.js +1194 -0
- package/dist/constants/processingPhrases.cjs +114 -0
- package/dist/constants/processingPhrases.d.ts +10 -0
- package/dist/constants/processingPhrases.d.ts.map +1 -0
- package/dist/constants/processingPhrases.js +89 -0
- package/dist/constants/spinnerFrames.cjs +28 -0
- package/dist/constants/spinnerFrames.d.ts +2 -0
- package/dist/constants/spinnerFrames.d.ts.map +1 -0
- package/dist/constants/spinnerFrames.js +4 -0
- package/dist/constants/tips.cjs +76 -0
- package/dist/constants/tips.d.ts +15 -0
- package/dist/constants/tips.d.ts.map +1 -0
- package/dist/constants/tips.js +51 -0
- package/dist/containers/InputContainer.cjs +706 -0
- package/dist/containers/InputContainer.d.ts +62 -0
- package/dist/containers/InputContainer.d.ts.map +1 -0
- package/dist/containers/InputContainer.js +672 -0
- package/dist/containers/OverlayContainer.cjs +2372 -0
- package/dist/containers/OverlayContainer.d.ts +42 -0
- package/dist/containers/OverlayContainer.d.ts.map +1 -0
- package/dist/containers/OverlayContainer.js +2356 -0
- package/dist/containers/index.cjs +31 -0
- package/dist/containers/index.d.ts +6 -0
- package/dist/containers/index.d.ts.map +1 -0
- package/dist/containers/index.js +6 -0
- package/dist/contexts/KeypressContext.cjs +436 -0
- package/dist/contexts/KeypressContext.d.ts +36 -0
- package/dist/contexts/KeypressContext.d.ts.map +1 -0
- package/dist/contexts/KeypressContext.js +408 -0
- package/dist/contexts/MouseContext.cjs +122 -0
- package/dist/contexts/MouseContext.d.ts +27 -0
- package/dist/contexts/MouseContext.d.ts.map +1 -0
- package/dist/contexts/MouseContext.js +101 -0
- package/dist/contexts/ScrollProvider.cjs +180 -0
- package/dist/contexts/ScrollProvider.d.ts +33 -0
- package/dist/contexts/ScrollProvider.d.ts.map +1 -0
- package/dist/contexts/ScrollProvider.js +163 -0
- package/dist/contexts/SoundContext.cjs +38 -0
- package/dist/contexts/SoundContext.d.ts +23 -0
- package/dist/contexts/SoundContext.d.ts.map +1 -0
- package/dist/contexts/SoundContext.js +13 -0
- package/dist/contexts/index.cjs +47 -0
- package/dist/contexts/index.d.ts +8 -0
- package/dist/contexts/index.d.ts.map +1 -0
- package/dist/contexts/index.js +25 -0
- package/dist/hooks/index.cjs +54 -0
- package/dist/hooks/index.d.ts +12 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/index.js +28 -0
- package/dist/hooks/useAgentEvents.cjs +382 -0
- package/dist/hooks/useAgentEvents.d.ts +49 -0
- package/dist/hooks/useAgentEvents.d.ts.map +1 -0
- package/dist/hooks/useAgentEvents.js +360 -0
- package/dist/hooks/useAnimationTick.cjs +71 -0
- package/dist/hooks/useAnimationTick.d.ts +11 -0
- package/dist/hooks/useAnimationTick.d.ts.map +1 -0
- package/dist/hooks/useAnimationTick.js +47 -0
- package/dist/hooks/useBatchedScroll.cjs +44 -0
- package/dist/hooks/useBatchedScroll.d.ts +14 -0
- package/dist/hooks/useBatchedScroll.d.ts.map +1 -0
- package/dist/hooks/useBatchedScroll.js +20 -0
- package/dist/hooks/useCLIState.cjs +222 -0
- package/dist/hooks/useCLIState.d.ts +53 -0
- package/dist/hooks/useCLIState.d.ts.map +1 -0
- package/dist/hooks/useCLIState.js +201 -0
- package/dist/hooks/useElapsedTime.cjs +79 -0
- package/dist/hooks/useElapsedTime.d.ts +24 -0
- package/dist/hooks/useElapsedTime.d.ts.map +1 -0
- package/dist/hooks/useElapsedTime.js +55 -0
- package/dist/hooks/useGitBranch.cjs +47 -0
- package/dist/hooks/useGitBranch.d.ts +13 -0
- package/dist/hooks/useGitBranch.d.ts.map +1 -0
- package/dist/hooks/useGitBranch.js +23 -0
- package/dist/hooks/useHistorySearch.cjs +219 -0
- package/dist/hooks/useHistorySearch.d.ts +61 -0
- package/dist/hooks/useHistorySearch.d.ts.map +1 -0
- package/dist/hooks/useHistorySearch.js +195 -0
- package/dist/hooks/useInputHistory.cjs +47 -0
- package/dist/hooks/useInputHistory.d.ts +18 -0
- package/dist/hooks/useInputHistory.d.ts.map +1 -0
- package/dist/hooks/useInputHistory.js +23 -0
- package/dist/hooks/useInputOrchestrator.cjs +663 -0
- package/dist/hooks/useInputOrchestrator.d.ts +136 -0
- package/dist/hooks/useInputOrchestrator.d.ts.map +1 -0
- package/dist/hooks/useInputOrchestrator.js +635 -0
- package/dist/hooks/useKeyboardShortcuts.cjs +87 -0
- package/dist/hooks/useKeyboardShortcuts.d.ts +21 -0
- package/dist/hooks/useKeyboardShortcuts.d.ts.map +1 -0
- package/dist/hooks/useKeyboardShortcuts.js +63 -0
- package/dist/hooks/useKeypress.cjs +41 -0
- package/dist/hooks/useKeypress.d.ts +18 -0
- package/dist/hooks/useKeypress.d.ts.map +1 -0
- package/dist/hooks/useKeypress.js +17 -0
- package/dist/hooks/usePhraseCycler.cjs +74 -0
- package/dist/hooks/usePhraseCycler.d.ts +30 -0
- package/dist/hooks/usePhraseCycler.d.ts.map +1 -0
- package/dist/hooks/usePhraseCycler.js +50 -0
- package/dist/hooks/useStreaming.cjs +43 -0
- package/dist/hooks/useStreaming.d.ts +19 -0
- package/dist/hooks/useStreaming.d.ts.map +1 -0
- package/dist/hooks/useStreaming.js +24 -0
- package/dist/hooks/useTerminalSize.cjs +48 -0
- package/dist/hooks/useTerminalSize.d.ts +14 -0
- package/dist/hooks/useTerminalSize.d.ts.map +1 -0
- package/dist/hooks/useTerminalSize.js +24 -0
- package/dist/hooks/useTokenCounter.cjs +105 -0
- package/dist/hooks/useTokenCounter.d.ts +46 -0
- package/dist/hooks/useTokenCounter.d.ts.map +1 -0
- package/dist/hooks/useTokenCounter.js +81 -0
- package/dist/host/index.cjs +144 -0
- package/dist/host/index.d.ts +108 -0
- package/dist/host/index.d.ts.map +1 -0
- package/dist/host/index.js +104 -0
- package/dist/index.cjs +33 -0
- package/dist/index.d.cts +195 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +7 -0
- package/dist/interactive-commands/auth/index.cjs +44 -0
- package/dist/interactive-commands/auth/index.d.ts +13 -0
- package/dist/interactive-commands/auth/index.d.ts.map +1 -0
- package/dist/interactive-commands/auth/index.js +19 -0
- package/dist/interactive-commands/command-parser.cjs +184 -0
- package/dist/interactive-commands/command-parser.d.ts +56 -0
- package/dist/interactive-commands/command-parser.d.ts.map +1 -0
- package/dist/interactive-commands/command-parser.js +146 -0
- package/dist/interactive-commands/commands.cjs +135 -0
- package/dist/interactive-commands/commands.d.ts +52 -0
- package/dist/interactive-commands/commands.d.ts.map +1 -0
- package/dist/interactive-commands/commands.js +99 -0
- package/dist/interactive-commands/documentation-commands.cjs +61 -0
- package/dist/interactive-commands/documentation-commands.d.ts +15 -0
- package/dist/interactive-commands/documentation-commands.d.ts.map +1 -0
- package/dist/interactive-commands/documentation-commands.js +27 -0
- package/dist/interactive-commands/exit-handler.cjs +40 -0
- package/dist/interactive-commands/exit-handler.d.ts +12 -0
- package/dist/interactive-commands/exit-handler.d.ts.map +1 -0
- package/dist/interactive-commands/exit-handler.js +15 -0
- package/dist/interactive-commands/exit-stats.cjs +41 -0
- package/dist/interactive-commands/exit-stats.d.ts +24 -0
- package/dist/interactive-commands/exit-stats.d.ts.map +1 -0
- package/dist/interactive-commands/exit-stats.js +15 -0
- package/dist/interactive-commands/export/index.cjs +36 -0
- package/dist/interactive-commands/export/index.d.ts +13 -0
- package/dist/interactive-commands/export/index.d.ts.map +1 -0
- package/dist/interactive-commands/export/index.js +12 -0
- package/dist/interactive-commands/general-commands.cjs +478 -0
- package/dist/interactive-commands/general-commands.d.ts +22 -0
- package/dist/interactive-commands/general-commands.d.ts.map +1 -0
- package/dist/interactive-commands/general-commands.js +443 -0
- package/dist/interactive-commands/mcp/index.cjs +35 -0
- package/dist/interactive-commands/mcp/index.d.ts +13 -0
- package/dist/interactive-commands/mcp/index.d.ts.map +1 -0
- package/dist/interactive-commands/mcp/index.js +11 -0
- package/dist/interactive-commands/model/index.cjs +36 -0
- package/dist/interactive-commands/model/index.d.ts +13 -0
- package/dist/interactive-commands/model/index.d.ts.map +1 -0
- package/dist/interactive-commands/model/index.js +12 -0
- package/dist/interactive-commands/plugin/index.cjs +35 -0
- package/dist/interactive-commands/plugin/index.d.ts +13 -0
- package/dist/interactive-commands/plugin/index.d.ts.map +1 -0
- package/dist/interactive-commands/plugin/index.js +11 -0
- package/dist/interactive-commands/prompt-commands.cjs +269 -0
- package/dist/interactive-commands/prompt-commands.d.ts +25 -0
- package/dist/interactive-commands/prompt-commands.d.ts.map +1 -0
- package/dist/interactive-commands/prompt-commands.js +244 -0
- package/dist/interactive-commands/session/index.cjs +32 -0
- package/dist/interactive-commands/session/index.d.ts +16 -0
- package/dist/interactive-commands/session/index.d.ts.map +1 -0
- package/dist/interactive-commands/session/index.js +6 -0
- package/dist/interactive-commands/session/session-commands.cjs +64 -0
- package/dist/interactive-commands/session/session-commands.d.ts +32 -0
- package/dist/interactive-commands/session/session-commands.d.ts.map +1 -0
- package/dist/interactive-commands/session/session-commands.js +38 -0
- package/dist/interactive-commands/system/index.cjs +28 -0
- package/dist/interactive-commands/system/index.d.ts +13 -0
- package/dist/interactive-commands/system/index.d.ts.map +1 -0
- package/dist/interactive-commands/system/index.js +4 -0
- package/dist/interactive-commands/system/system-commands.cjs +217 -0
- package/dist/interactive-commands/system/system-commands.d.ts +6 -0
- package/dist/interactive-commands/system/system-commands.d.ts.map +1 -0
- package/dist/interactive-commands/system/system-commands.js +195 -0
- package/dist/interactive-commands/tool-commands.cjs +38 -0
- package/dist/interactive-commands/tool-commands.d.ts +15 -0
- package/dist/interactive-commands/tool-commands.d.ts.map +1 -0
- package/dist/interactive-commands/tool-commands.js +14 -0
- package/dist/interactive-commands/utils/arg-parser.cjs +59 -0
- package/dist/interactive-commands/utils/arg-parser.d.ts +57 -0
- package/dist/interactive-commands/utils/arg-parser.d.ts.map +1 -0
- package/dist/interactive-commands/utils/arg-parser.js +34 -0
- package/dist/interactive-commands/utils/command-output.cjs +75 -0
- package/dist/interactive-commands/utils/command-output.d.ts +40 -0
- package/dist/interactive-commands/utils/command-output.d.ts.map +1 -0
- package/dist/interactive-commands/utils/command-output.js +51 -0
- package/dist/interactive-commands/utils/format-output.cjs +36 -0
- package/dist/interactive-commands/utils/format-output.d.ts +14 -0
- package/dist/interactive-commands/utils/format-output.d.ts.map +1 -0
- package/dist/interactive-commands/utils/format-output.js +11 -0
- package/dist/services/CommandService.cjs +68 -0
- package/dist/services/CommandService.d.ts +58 -0
- package/dist/services/CommandService.d.ts.map +1 -0
- package/dist/services/CommandService.js +41 -0
- package/dist/services/InputService.cjs +97 -0
- package/dist/services/InputService.d.ts +40 -0
- package/dist/services/InputService.d.ts.map +1 -0
- package/dist/services/InputService.js +78 -0
- package/dist/services/MessageService.cjs +69 -0
- package/dist/services/MessageService.d.ts +35 -0
- package/dist/services/MessageService.d.ts.map +1 -0
- package/dist/services/MessageService.js +51 -0
- package/dist/services/index.cjs +39 -0
- package/dist/services/index.d.ts +8 -0
- package/dist/services/index.d.ts.map +1 -0
- package/dist/services/index.js +16 -0
- package/dist/services/processStream.cjs +877 -0
- package/dist/services/processStream.d.ts +79 -0
- package/dist/services/processStream.d.ts.map +1 -0
- package/dist/services/processStream.js +843 -0
- package/dist/services/processStream.test.cjs +255 -0
- package/dist/services/processStream.test.d.ts +2 -0
- package/dist/services/processStream.test.d.ts.map +1 -0
- package/dist/services/processStream.test.js +254 -0
- package/dist/state/actions.cjs +16 -0
- package/dist/state/actions.d.ts +124 -0
- package/dist/state/actions.d.ts.map +1 -0
- package/dist/state/actions.js +0 -0
- package/dist/state/index.cjs +28 -0
- package/dist/state/index.d.ts +10 -0
- package/dist/state/index.d.ts.map +1 -0
- package/dist/state/index.js +4 -0
- package/dist/state/initialState.cjs +78 -0
- package/dist/state/initialState.d.ts +12 -0
- package/dist/state/initialState.d.ts.map +1 -0
- package/dist/state/initialState.js +54 -0
- package/dist/state/reducer.cjs +340 -0
- package/dist/state/reducer.d.ts +15 -0
- package/dist/state/reducer.d.ts.map +1 -0
- package/dist/state/reducer.js +316 -0
- package/dist/state/streaming-state.cjs +52 -0
- package/dist/state/streaming-state.d.ts +27 -0
- package/dist/state/streaming-state.d.ts.map +1 -0
- package/dist/state/streaming-state.js +25 -0
- package/dist/state/types.cjs +16 -0
- package/dist/state/types.d.ts +388 -0
- package/dist/state/types.d.ts.map +1 -0
- package/dist/state/types.js +0 -0
- package/dist/utils/bracketedPaste.cjs +37 -0
- package/dist/utils/bracketedPaste.d.ts +22 -0
- package/dist/utils/bracketedPaste.d.ts.map +1 -0
- package/dist/utils/bracketedPaste.js +12 -0
- package/dist/utils/clipboardUtils.cjs +297 -0
- package/dist/utils/clipboardUtils.d.ts +49 -0
- package/dist/utils/clipboardUtils.d.ts.map +1 -0
- package/dist/utils/clipboardUtils.js +261 -0
- package/dist/utils/commandOverlays.cjs +69 -0
- package/dist/utils/commandOverlays.d.ts +22 -0
- package/dist/utils/commandOverlays.d.ts.map +1 -0
- package/dist/utils/commandOverlays.js +44 -0
- package/dist/utils/debugLog.cjs +63 -0
- package/dist/utils/debugLog.d.ts +38 -0
- package/dist/utils/debugLog.d.ts.map +1 -0
- package/dist/utils/debugLog.js +39 -0
- package/dist/utils/elicitationSchema.cjs +85 -0
- package/dist/utils/elicitationSchema.d.ts +11 -0
- package/dist/utils/elicitationSchema.d.ts.map +1 -0
- package/dist/utils/elicitationSchema.js +61 -0
- package/dist/utils/elicitationSchema.test.cjs +78 -0
- package/dist/utils/elicitationSchema.test.d.ts +2 -0
- package/dist/utils/elicitationSchema.test.d.ts.map +1 -0
- package/dist/utils/elicitationSchema.test.js +77 -0
- package/dist/utils/idGenerator.cjs +31 -0
- package/dist/utils/idGenerator.d.ts +10 -0
- package/dist/utils/idGenerator.d.ts.map +1 -0
- package/dist/utils/idGenerator.js +7 -0
- package/dist/utils/index.cjs +62 -0
- package/dist/utils/index.d.ts +9 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +39 -0
- package/dist/utils/input.cjs +72 -0
- package/dist/utils/input.d.ts +25 -0
- package/dist/utils/input.d.ts.map +1 -0
- package/dist/utils/input.js +39 -0
- package/dist/utils/inputParsing.cjs +76 -0
- package/dist/utils/inputParsing.d.ts +31 -0
- package/dist/utils/inputParsing.d.ts.map +1 -0
- package/dist/utils/inputParsing.js +48 -0
- package/dist/utils/llm-provider-display.cjs +49 -0
- package/dist/utils/llm-provider-display.d.ts +3 -0
- package/dist/utils/llm-provider-display.d.ts.map +1 -0
- package/dist/utils/llm-provider-display.js +25 -0
- package/dist/utils/messageFormatting.cjs +447 -0
- package/dist/utils/messageFormatting.d.ts +131 -0
- package/dist/utils/messageFormatting.d.ts.map +1 -0
- package/dist/utils/messageFormatting.js +393 -0
- package/dist/utils/messageFormatting.test.cjs +16 -0
- package/dist/utils/messageFormatting.test.d.ts +2 -0
- package/dist/utils/messageFormatting.test.d.ts.map +1 -0
- package/dist/utils/messageFormatting.test.js +15 -0
- package/dist/utils/mouse.cjs +196 -0
- package/dist/utils/mouse.d.ts +61 -0
- package/dist/utils/mouse.d.ts.map +1 -0
- package/dist/utils/mouse.js +172 -0
- package/dist/utils/overlayPresentation.cjs +48 -0
- package/dist/utils/overlayPresentation.d.ts +19 -0
- package/dist/utils/overlayPresentation.d.ts.map +1 -0
- package/dist/utils/overlayPresentation.js +22 -0
- package/dist/utils/overlaySizing.cjs +39 -0
- package/dist/utils/overlaySizing.d.ts +19 -0
- package/dist/utils/overlaySizing.d.ts.map +1 -0
- package/dist/utils/overlaySizing.js +15 -0
- package/dist/utils/soundNotification.cjs +217 -0
- package/dist/utils/soundNotification.d.ts +77 -0
- package/dist/utils/soundNotification.d.ts.map +1 -0
- package/dist/utils/soundNotification.js +188 -0
- package/dist/utils/soundNotification.test.cjs +126 -0
- package/dist/utils/soundNotification.test.d.ts +2 -0
- package/dist/utils/soundNotification.test.d.ts.map +1 -0
- package/dist/utils/soundNotification.test.js +125 -0
- package/dist/utils/streamSplitter.cjs +126 -0
- package/dist/utils/streamSplitter.d.ts +44 -0
- package/dist/utils/streamSplitter.d.ts.map +1 -0
- package/dist/utils/streamSplitter.js +100 -0
- package/dist/utils/textUtils.cjs +223 -0
- package/dist/utils/textUtils.d.ts +63 -0
- package/dist/utils/textUtils.d.ts.map +1 -0
- package/dist/utils/textUtils.js +174 -0
- package/dist/utils/toolUtils.cjs +40 -0
- package/dist/utils/toolUtils.d.ts +20 -0
- package/dist/utils/toolUtils.d.ts.map +1 -0
- package/dist/utils/toolUtils.js +14 -0
- package/package.json +51 -0
|
@@ -0,0 +1,269 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var prompt_commands_exports = {};
|
|
20
|
+
__export(prompt_commands_exports, {
|
|
21
|
+
getDynamicPromptCommands: () => getDynamicPromptCommands,
|
|
22
|
+
promptCommands: () => promptCommands
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(prompt_commands_exports);
|
|
25
|
+
var import_format_output = require("./utils/format-output.js");
|
|
26
|
+
var import_services = require("../services/index.js");
|
|
27
|
+
const promptCommands = [
|
|
28
|
+
{
|
|
29
|
+
name: "sysprompt",
|
|
30
|
+
description: "Display the current system prompt",
|
|
31
|
+
usage: "/sysprompt",
|
|
32
|
+
category: "Prompt Management",
|
|
33
|
+
handler: async (_args, agent, _ctx) => {
|
|
34
|
+
try {
|
|
35
|
+
const systemPrompt = await agent.getSystemPrompt();
|
|
36
|
+
const styledOutput = {
|
|
37
|
+
styledType: "sysprompt",
|
|
38
|
+
styledData: { content: systemPrompt },
|
|
39
|
+
fallbackText: `System Prompt:
|
|
40
|
+
${systemPrompt}`
|
|
41
|
+
};
|
|
42
|
+
return styledOutput;
|
|
43
|
+
} catch (error) {
|
|
44
|
+
const errorMsg = `Failed to get system prompt: ${error instanceof Error ? error.message : String(error)}`;
|
|
45
|
+
agent.logger.error(errorMsg);
|
|
46
|
+
return (0, import_format_output.formatForInkCli)(`\u274C ${errorMsg}`);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
name: "prompts",
|
|
52
|
+
description: "Browse, add, and delete prompts",
|
|
53
|
+
usage: "/prompts",
|
|
54
|
+
category: "Prompt Management",
|
|
55
|
+
handler: async (_args, agent, _ctx) => {
|
|
56
|
+
try {
|
|
57
|
+
const prompts = await agent.listPrompts();
|
|
58
|
+
const promptNames = Object.keys(prompts || {});
|
|
59
|
+
if (promptNames.length === 0) {
|
|
60
|
+
const output2 = "\n\u26A0\uFE0F No prompts available";
|
|
61
|
+
return (0, import_format_output.formatForInkCli)(output2);
|
|
62
|
+
}
|
|
63
|
+
const outputLines = ["\n\u{1F4DD} Available Prompts:\n"];
|
|
64
|
+
const mcpPrompts = [];
|
|
65
|
+
const configPrompts = [];
|
|
66
|
+
const customPrompts = [];
|
|
67
|
+
for (const [name, info] of Object.entries(prompts)) {
|
|
68
|
+
if (info.source === "mcp") {
|
|
69
|
+
mcpPrompts.push(name);
|
|
70
|
+
} else if (info.source === "config") {
|
|
71
|
+
configPrompts.push(name);
|
|
72
|
+
} else if (info.source === "custom") {
|
|
73
|
+
customPrompts.push(name);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
if (mcpPrompts.length > 0) {
|
|
77
|
+
outputLines.push("\u{1F517} MCP Prompts:");
|
|
78
|
+
mcpPrompts.forEach((name) => {
|
|
79
|
+
const info = prompts[name];
|
|
80
|
+
if (info) {
|
|
81
|
+
const displayName = info.displayName || name;
|
|
82
|
+
const title = info.title && info.title !== displayName ? ` (${info.title})` : "";
|
|
83
|
+
const desc = info.description ? ` - ${info.description}` : "";
|
|
84
|
+
const args = info.arguments && info.arguments.length > 0 ? ` [args: ${info.arguments.map((a) => `${a.name}${a.required ? "*" : ""}`).join(", ")}]` : "";
|
|
85
|
+
outputLines.push(` ${displayName}${title}${desc}${args}`);
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
outputLines.push("");
|
|
89
|
+
}
|
|
90
|
+
if (configPrompts.length > 0) {
|
|
91
|
+
outputLines.push("\u{1F4CB} Config Prompts:");
|
|
92
|
+
configPrompts.forEach((name) => {
|
|
93
|
+
const info = prompts[name];
|
|
94
|
+
if (info) {
|
|
95
|
+
const displayName = info.displayName || name;
|
|
96
|
+
const title = info.title && info.title !== displayName ? ` (${info.title})` : "";
|
|
97
|
+
const desc = info.description ? ` - ${info.description}` : "";
|
|
98
|
+
outputLines.push(` ${displayName}${title}${desc}`);
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
outputLines.push("");
|
|
102
|
+
}
|
|
103
|
+
if (customPrompts.length > 0) {
|
|
104
|
+
outputLines.push("\u2728 Custom Prompts:");
|
|
105
|
+
customPrompts.forEach((name) => {
|
|
106
|
+
const info = prompts[name];
|
|
107
|
+
if (info) {
|
|
108
|
+
const displayName = info.displayName || name;
|
|
109
|
+
const title = info.title && info.title !== displayName ? ` (${info.title})` : "";
|
|
110
|
+
const desc = info.description ? ` - ${info.description}` : "";
|
|
111
|
+
outputLines.push(` ${displayName}${title}${desc}`);
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
outputLines.push("");
|
|
115
|
+
}
|
|
116
|
+
outputLines.push(`Total: ${promptNames.length} prompts`);
|
|
117
|
+
const output = outputLines.join("\n");
|
|
118
|
+
return (0, import_format_output.formatForInkCli)(output);
|
|
119
|
+
} catch (error) {
|
|
120
|
+
const errorMsg = `Error listing prompts: ${error instanceof Error ? error.message : String(error)}`;
|
|
121
|
+
return (0, import_format_output.formatForInkCli)(`\u274C ${errorMsg}`);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
// Note: /use command removed - use /<prompt-name> directly instead
|
|
126
|
+
// Prompts are automatically registered as slash commands (see getDynamicPromptCommands)
|
|
127
|
+
];
|
|
128
|
+
function createPromptCommand(promptInfo) {
|
|
129
|
+
const commandName = promptInfo.commandName || promptInfo.displayName || promptInfo.name;
|
|
130
|
+
const internalName = promptInfo.name;
|
|
131
|
+
const baseName = promptInfo.displayName || promptInfo.name;
|
|
132
|
+
return {
|
|
133
|
+
name: commandName,
|
|
134
|
+
description: promptInfo.description || `Execute ${baseName} prompt`,
|
|
135
|
+
usage: `/${commandName} [context]`,
|
|
136
|
+
category: "Dynamic Prompts",
|
|
137
|
+
handler: async (args, agent, ctx) => {
|
|
138
|
+
try {
|
|
139
|
+
const { argMap, context: contextString } = splitPromptArguments(args);
|
|
140
|
+
const resolveOptions = {};
|
|
141
|
+
if (Object.keys(argMap).length > 0) {
|
|
142
|
+
resolveOptions.args = argMap;
|
|
143
|
+
}
|
|
144
|
+
if (contextString) {
|
|
145
|
+
resolveOptions.context = contextString;
|
|
146
|
+
}
|
|
147
|
+
const result = await agent.resolvePrompt(internalName, resolveOptions);
|
|
148
|
+
if (ctx.sessionId) {
|
|
149
|
+
if (result.model) {
|
|
150
|
+
try {
|
|
151
|
+
await agent.switchLLM({ model: result.model }, ctx.sessionId);
|
|
152
|
+
} catch (modelError) {
|
|
153
|
+
agent.logger.warn("Failed to switch model for prompt override", {
|
|
154
|
+
model: result.model,
|
|
155
|
+
error: modelError instanceof Error ? modelError.message : String(modelError)
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
if (result.allowedTools && result.allowedTools.length > 0) {
|
|
160
|
+
try {
|
|
161
|
+
agent.toolManager.addSessionAutoApproveTools(
|
|
162
|
+
ctx.sessionId,
|
|
163
|
+
result.allowedTools
|
|
164
|
+
);
|
|
165
|
+
} catch (toolError) {
|
|
166
|
+
agent.logger.warn("Failed to set auto-approve tools for prompt", {
|
|
167
|
+
tools: result.allowedTools,
|
|
168
|
+
error: toolError instanceof Error ? toolError.message : String(toolError)
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
if (result.context !== "fork" && result.toolkits && result.toolkits.length > 0) {
|
|
174
|
+
if (!agent.loadToolkits) {
|
|
175
|
+
return (0, import_format_output.formatForInkCli)(
|
|
176
|
+
`\u274C Skill '${commandName}' requires toolkits (${result.toolkits.join(", ")}), but this agent does not support dynamic tool loading.`
|
|
177
|
+
);
|
|
178
|
+
}
|
|
179
|
+
try {
|
|
180
|
+
await agent.loadToolkits(result.toolkits);
|
|
181
|
+
} catch (error) {
|
|
182
|
+
return (0, import_format_output.formatForInkCli)(
|
|
183
|
+
`\u274C Failed to load toolkits for skill '${commandName}': ${error instanceof Error ? error.message : String(error)}`
|
|
184
|
+
);
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
if (result.context === "fork") {
|
|
188
|
+
const skillName = internalName;
|
|
189
|
+
const taskContext = contextString || "";
|
|
190
|
+
const instructionText = `<skill-invocation>
|
|
191
|
+
Execute the fork skill: ${commandName}
|
|
192
|
+
${taskContext ? `Task context: ${taskContext}` : ""}
|
|
193
|
+
|
|
194
|
+
Call the invoke_skill tool immediately with:
|
|
195
|
+
- skill: "${skillName}"
|
|
196
|
+
${taskContext ? `- taskContext: "${taskContext}"` : ""}
|
|
197
|
+
</skill-invocation>`;
|
|
198
|
+
return (0, import_services.createSendMessageMarker)(instructionText);
|
|
199
|
+
}
|
|
200
|
+
let finalText = result.text;
|
|
201
|
+
if (result.resources.length > 0) {
|
|
202
|
+
const resourceRefs = result.resources.map((uri) => `@<${uri}>`).join(" ");
|
|
203
|
+
finalText = finalText ? `${finalText}
|
|
204
|
+
|
|
205
|
+
${resourceRefs}` : resourceRefs;
|
|
206
|
+
}
|
|
207
|
+
if (finalText.trim()) {
|
|
208
|
+
const taskContext = contextString || "";
|
|
209
|
+
const wrappedText = `<skill-invocation>
|
|
210
|
+
Execute the inline skill: ${commandName}
|
|
211
|
+
${taskContext ? `Task context: ${taskContext}` : ""}
|
|
212
|
+
|
|
213
|
+
skill: "${internalName}"
|
|
214
|
+
</skill-invocation>
|
|
215
|
+
|
|
216
|
+
${finalText.trim()}`;
|
|
217
|
+
return (0, import_services.createSendMessageMarker)(wrappedText);
|
|
218
|
+
} else {
|
|
219
|
+
const warningMsg = `\u26A0\uFE0F Prompt '${commandName}' returned no content`;
|
|
220
|
+
return (0, import_format_output.formatForInkCli)(warningMsg);
|
|
221
|
+
}
|
|
222
|
+
} catch (error) {
|
|
223
|
+
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
224
|
+
agent.logger.error(
|
|
225
|
+
`Failed to execute prompt command '${commandName}': ${errorMessage}`
|
|
226
|
+
);
|
|
227
|
+
const errorMsg = `\u274C Error executing prompt '${commandName}': ${errorMessage}`;
|
|
228
|
+
return (0, import_format_output.formatForInkCli)(errorMsg);
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
};
|
|
232
|
+
}
|
|
233
|
+
async function getDynamicPromptCommands(agent) {
|
|
234
|
+
try {
|
|
235
|
+
const prompts = await agent.listPrompts();
|
|
236
|
+
const promptEntries = Object.entries(prompts).filter(
|
|
237
|
+
([, info]) => info.userInvocable !== false
|
|
238
|
+
);
|
|
239
|
+
return promptEntries.map(([, info]) => createPromptCommand(info));
|
|
240
|
+
} catch (error) {
|
|
241
|
+
agent.logger.error(
|
|
242
|
+
`Failed to get dynamic prompt commands: ${error instanceof Error ? error.message : String(error)}`
|
|
243
|
+
);
|
|
244
|
+
return [];
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
function splitPromptArguments(args) {
|
|
248
|
+
const map = {};
|
|
249
|
+
const contextParts = [];
|
|
250
|
+
for (const arg of args) {
|
|
251
|
+
const equalsIndex = arg.indexOf("=");
|
|
252
|
+
if (equalsIndex > 0) {
|
|
253
|
+
const key = arg.slice(0, equalsIndex).trim();
|
|
254
|
+
const value = arg.slice(equalsIndex + 1);
|
|
255
|
+
if (key.length > 0) {
|
|
256
|
+
map[key] = value;
|
|
257
|
+
}
|
|
258
|
+
} else if (arg.trim().length > 0) {
|
|
259
|
+
contextParts.push(arg);
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
const context = contextParts.length > 0 ? contextParts.join(" ") : void 0;
|
|
263
|
+
return { argMap: map, context };
|
|
264
|
+
}
|
|
265
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
266
|
+
0 && (module.exports = {
|
|
267
|
+
getDynamicPromptCommands,
|
|
268
|
+
promptCommands
|
|
269
|
+
});
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Prompt Commands Module
|
|
3
|
+
*
|
|
4
|
+
* This module defines prompt management slash commands for the Dexto CLI interface.
|
|
5
|
+
* These commands provide functionality for viewing and managing system prompts.
|
|
6
|
+
*
|
|
7
|
+
* Available Prompt Commands:
|
|
8
|
+
* - /sysprompt - Display the current system prompt
|
|
9
|
+
* - /prompts - List all available prompts (MCP + internal)
|
|
10
|
+
* - /<prompt-name> [args] - Direct prompt execution (auto-generated for each prompt)
|
|
11
|
+
*/
|
|
12
|
+
import type { DextoAgent } from '@dexto/core';
|
|
13
|
+
import type { CommandDefinition } from './command-parser.js';
|
|
14
|
+
/**
|
|
15
|
+
* Prompt management commands
|
|
16
|
+
*/
|
|
17
|
+
export declare const promptCommands: CommandDefinition[];
|
|
18
|
+
/**
|
|
19
|
+
* Get all dynamic prompt commands based on available prompts.
|
|
20
|
+
* Uses pre-computed commandName from PromptManager for collision handling.
|
|
21
|
+
* Filters out prompts with `userInvocable: false` as these are not intended
|
|
22
|
+
* for direct user invocation via slash commands.
|
|
23
|
+
*/
|
|
24
|
+
export declare function getDynamicPromptCommands(agent: DextoAgent): Promise<CommandDefinition[]>;
|
|
25
|
+
//# sourceMappingURL=prompt-commands.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prompt-commands.d.ts","sourceRoot":"","sources":["../../src/interactive-commands/prompt-commands.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAc,MAAM,aAAa,CAAC;AAC1D,OAAO,KAAK,EAAE,iBAAiB,EAAwC,MAAM,qBAAqB,CAAC;AAKnG;;GAEG;AACH,eAAO,MAAM,cAAc,EAAE,iBAAiB,EAiI7C,CAAC;AA+JF;;;;;GAKG;AACH,wBAAsB,wBAAwB,CAAC,KAAK,EAAE,UAAU,GAAG,OAAO,CAAC,iBAAiB,EAAE,CAAC,CAiB9F"}
|
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
import { formatForInkCli } from "./utils/format-output.js";
|
|
2
|
+
import { createSendMessageMarker } from "../services/index.js";
|
|
3
|
+
const promptCommands = [
|
|
4
|
+
{
|
|
5
|
+
name: "sysprompt",
|
|
6
|
+
description: "Display the current system prompt",
|
|
7
|
+
usage: "/sysprompt",
|
|
8
|
+
category: "Prompt Management",
|
|
9
|
+
handler: async (_args, agent, _ctx) => {
|
|
10
|
+
try {
|
|
11
|
+
const systemPrompt = await agent.getSystemPrompt();
|
|
12
|
+
const styledOutput = {
|
|
13
|
+
styledType: "sysprompt",
|
|
14
|
+
styledData: { content: systemPrompt },
|
|
15
|
+
fallbackText: `System Prompt:
|
|
16
|
+
${systemPrompt}`
|
|
17
|
+
};
|
|
18
|
+
return styledOutput;
|
|
19
|
+
} catch (error) {
|
|
20
|
+
const errorMsg = `Failed to get system prompt: ${error instanceof Error ? error.message : String(error)}`;
|
|
21
|
+
agent.logger.error(errorMsg);
|
|
22
|
+
return formatForInkCli(`\u274C ${errorMsg}`);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
name: "prompts",
|
|
28
|
+
description: "Browse, add, and delete prompts",
|
|
29
|
+
usage: "/prompts",
|
|
30
|
+
category: "Prompt Management",
|
|
31
|
+
handler: async (_args, agent, _ctx) => {
|
|
32
|
+
try {
|
|
33
|
+
const prompts = await agent.listPrompts();
|
|
34
|
+
const promptNames = Object.keys(prompts || {});
|
|
35
|
+
if (promptNames.length === 0) {
|
|
36
|
+
const output2 = "\n\u26A0\uFE0F No prompts available";
|
|
37
|
+
return formatForInkCli(output2);
|
|
38
|
+
}
|
|
39
|
+
const outputLines = ["\n\u{1F4DD} Available Prompts:\n"];
|
|
40
|
+
const mcpPrompts = [];
|
|
41
|
+
const configPrompts = [];
|
|
42
|
+
const customPrompts = [];
|
|
43
|
+
for (const [name, info] of Object.entries(prompts)) {
|
|
44
|
+
if (info.source === "mcp") {
|
|
45
|
+
mcpPrompts.push(name);
|
|
46
|
+
} else if (info.source === "config") {
|
|
47
|
+
configPrompts.push(name);
|
|
48
|
+
} else if (info.source === "custom") {
|
|
49
|
+
customPrompts.push(name);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
if (mcpPrompts.length > 0) {
|
|
53
|
+
outputLines.push("\u{1F517} MCP Prompts:");
|
|
54
|
+
mcpPrompts.forEach((name) => {
|
|
55
|
+
const info = prompts[name];
|
|
56
|
+
if (info) {
|
|
57
|
+
const displayName = info.displayName || name;
|
|
58
|
+
const title = info.title && info.title !== displayName ? ` (${info.title})` : "";
|
|
59
|
+
const desc = info.description ? ` - ${info.description}` : "";
|
|
60
|
+
const args = info.arguments && info.arguments.length > 0 ? ` [args: ${info.arguments.map((a) => `${a.name}${a.required ? "*" : ""}`).join(", ")}]` : "";
|
|
61
|
+
outputLines.push(` ${displayName}${title}${desc}${args}`);
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
outputLines.push("");
|
|
65
|
+
}
|
|
66
|
+
if (configPrompts.length > 0) {
|
|
67
|
+
outputLines.push("\u{1F4CB} Config Prompts:");
|
|
68
|
+
configPrompts.forEach((name) => {
|
|
69
|
+
const info = prompts[name];
|
|
70
|
+
if (info) {
|
|
71
|
+
const displayName = info.displayName || name;
|
|
72
|
+
const title = info.title && info.title !== displayName ? ` (${info.title})` : "";
|
|
73
|
+
const desc = info.description ? ` - ${info.description}` : "";
|
|
74
|
+
outputLines.push(` ${displayName}${title}${desc}`);
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
outputLines.push("");
|
|
78
|
+
}
|
|
79
|
+
if (customPrompts.length > 0) {
|
|
80
|
+
outputLines.push("\u2728 Custom Prompts:");
|
|
81
|
+
customPrompts.forEach((name) => {
|
|
82
|
+
const info = prompts[name];
|
|
83
|
+
if (info) {
|
|
84
|
+
const displayName = info.displayName || name;
|
|
85
|
+
const title = info.title && info.title !== displayName ? ` (${info.title})` : "";
|
|
86
|
+
const desc = info.description ? ` - ${info.description}` : "";
|
|
87
|
+
outputLines.push(` ${displayName}${title}${desc}`);
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
outputLines.push("");
|
|
91
|
+
}
|
|
92
|
+
outputLines.push(`Total: ${promptNames.length} prompts`);
|
|
93
|
+
const output = outputLines.join("\n");
|
|
94
|
+
return formatForInkCli(output);
|
|
95
|
+
} catch (error) {
|
|
96
|
+
const errorMsg = `Error listing prompts: ${error instanceof Error ? error.message : String(error)}`;
|
|
97
|
+
return formatForInkCli(`\u274C ${errorMsg}`);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
// Note: /use command removed - use /<prompt-name> directly instead
|
|
102
|
+
// Prompts are automatically registered as slash commands (see getDynamicPromptCommands)
|
|
103
|
+
];
|
|
104
|
+
function createPromptCommand(promptInfo) {
|
|
105
|
+
const commandName = promptInfo.commandName || promptInfo.displayName || promptInfo.name;
|
|
106
|
+
const internalName = promptInfo.name;
|
|
107
|
+
const baseName = promptInfo.displayName || promptInfo.name;
|
|
108
|
+
return {
|
|
109
|
+
name: commandName,
|
|
110
|
+
description: promptInfo.description || `Execute ${baseName} prompt`,
|
|
111
|
+
usage: `/${commandName} [context]`,
|
|
112
|
+
category: "Dynamic Prompts",
|
|
113
|
+
handler: async (args, agent, ctx) => {
|
|
114
|
+
try {
|
|
115
|
+
const { argMap, context: contextString } = splitPromptArguments(args);
|
|
116
|
+
const resolveOptions = {};
|
|
117
|
+
if (Object.keys(argMap).length > 0) {
|
|
118
|
+
resolveOptions.args = argMap;
|
|
119
|
+
}
|
|
120
|
+
if (contextString) {
|
|
121
|
+
resolveOptions.context = contextString;
|
|
122
|
+
}
|
|
123
|
+
const result = await agent.resolvePrompt(internalName, resolveOptions);
|
|
124
|
+
if (ctx.sessionId) {
|
|
125
|
+
if (result.model) {
|
|
126
|
+
try {
|
|
127
|
+
await agent.switchLLM({ model: result.model }, ctx.sessionId);
|
|
128
|
+
} catch (modelError) {
|
|
129
|
+
agent.logger.warn("Failed to switch model for prompt override", {
|
|
130
|
+
model: result.model,
|
|
131
|
+
error: modelError instanceof Error ? modelError.message : String(modelError)
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
if (result.allowedTools && result.allowedTools.length > 0) {
|
|
136
|
+
try {
|
|
137
|
+
agent.toolManager.addSessionAutoApproveTools(
|
|
138
|
+
ctx.sessionId,
|
|
139
|
+
result.allowedTools
|
|
140
|
+
);
|
|
141
|
+
} catch (toolError) {
|
|
142
|
+
agent.logger.warn("Failed to set auto-approve tools for prompt", {
|
|
143
|
+
tools: result.allowedTools,
|
|
144
|
+
error: toolError instanceof Error ? toolError.message : String(toolError)
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
if (result.context !== "fork" && result.toolkits && result.toolkits.length > 0) {
|
|
150
|
+
if (!agent.loadToolkits) {
|
|
151
|
+
return formatForInkCli(
|
|
152
|
+
`\u274C Skill '${commandName}' requires toolkits (${result.toolkits.join(", ")}), but this agent does not support dynamic tool loading.`
|
|
153
|
+
);
|
|
154
|
+
}
|
|
155
|
+
try {
|
|
156
|
+
await agent.loadToolkits(result.toolkits);
|
|
157
|
+
} catch (error) {
|
|
158
|
+
return formatForInkCli(
|
|
159
|
+
`\u274C Failed to load toolkits for skill '${commandName}': ${error instanceof Error ? error.message : String(error)}`
|
|
160
|
+
);
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
if (result.context === "fork") {
|
|
164
|
+
const skillName = internalName;
|
|
165
|
+
const taskContext = contextString || "";
|
|
166
|
+
const instructionText = `<skill-invocation>
|
|
167
|
+
Execute the fork skill: ${commandName}
|
|
168
|
+
${taskContext ? `Task context: ${taskContext}` : ""}
|
|
169
|
+
|
|
170
|
+
Call the invoke_skill tool immediately with:
|
|
171
|
+
- skill: "${skillName}"
|
|
172
|
+
${taskContext ? `- taskContext: "${taskContext}"` : ""}
|
|
173
|
+
</skill-invocation>`;
|
|
174
|
+
return createSendMessageMarker(instructionText);
|
|
175
|
+
}
|
|
176
|
+
let finalText = result.text;
|
|
177
|
+
if (result.resources.length > 0) {
|
|
178
|
+
const resourceRefs = result.resources.map((uri) => `@<${uri}>`).join(" ");
|
|
179
|
+
finalText = finalText ? `${finalText}
|
|
180
|
+
|
|
181
|
+
${resourceRefs}` : resourceRefs;
|
|
182
|
+
}
|
|
183
|
+
if (finalText.trim()) {
|
|
184
|
+
const taskContext = contextString || "";
|
|
185
|
+
const wrappedText = `<skill-invocation>
|
|
186
|
+
Execute the inline skill: ${commandName}
|
|
187
|
+
${taskContext ? `Task context: ${taskContext}` : ""}
|
|
188
|
+
|
|
189
|
+
skill: "${internalName}"
|
|
190
|
+
</skill-invocation>
|
|
191
|
+
|
|
192
|
+
${finalText.trim()}`;
|
|
193
|
+
return createSendMessageMarker(wrappedText);
|
|
194
|
+
} else {
|
|
195
|
+
const warningMsg = `\u26A0\uFE0F Prompt '${commandName}' returned no content`;
|
|
196
|
+
return formatForInkCli(warningMsg);
|
|
197
|
+
}
|
|
198
|
+
} catch (error) {
|
|
199
|
+
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
200
|
+
agent.logger.error(
|
|
201
|
+
`Failed to execute prompt command '${commandName}': ${errorMessage}`
|
|
202
|
+
);
|
|
203
|
+
const errorMsg = `\u274C Error executing prompt '${commandName}': ${errorMessage}`;
|
|
204
|
+
return formatForInkCli(errorMsg);
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
};
|
|
208
|
+
}
|
|
209
|
+
async function getDynamicPromptCommands(agent) {
|
|
210
|
+
try {
|
|
211
|
+
const prompts = await agent.listPrompts();
|
|
212
|
+
const promptEntries = Object.entries(prompts).filter(
|
|
213
|
+
([, info]) => info.userInvocable !== false
|
|
214
|
+
);
|
|
215
|
+
return promptEntries.map(([, info]) => createPromptCommand(info));
|
|
216
|
+
} catch (error) {
|
|
217
|
+
agent.logger.error(
|
|
218
|
+
`Failed to get dynamic prompt commands: ${error instanceof Error ? error.message : String(error)}`
|
|
219
|
+
);
|
|
220
|
+
return [];
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
function splitPromptArguments(args) {
|
|
224
|
+
const map = {};
|
|
225
|
+
const contextParts = [];
|
|
226
|
+
for (const arg of args) {
|
|
227
|
+
const equalsIndex = arg.indexOf("=");
|
|
228
|
+
if (equalsIndex > 0) {
|
|
229
|
+
const key = arg.slice(0, equalsIndex).trim();
|
|
230
|
+
const value = arg.slice(equalsIndex + 1);
|
|
231
|
+
if (key.length > 0) {
|
|
232
|
+
map[key] = value;
|
|
233
|
+
}
|
|
234
|
+
} else if (arg.trim().length > 0) {
|
|
235
|
+
contextParts.push(arg);
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
const context = contextParts.length > 0 ? contextParts.join(" ") : void 0;
|
|
239
|
+
return { argMap: map, context };
|
|
240
|
+
}
|
|
241
|
+
export {
|
|
242
|
+
getDynamicPromptCommands,
|
|
243
|
+
promptCommands
|
|
244
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var session_exports = {};
|
|
20
|
+
__export(session_exports, {
|
|
21
|
+
renameCommand: () => import_session_commands.renameCommand,
|
|
22
|
+
resumeCommand: () => import_session_commands.resumeCommand,
|
|
23
|
+
searchCommand: () => import_session_commands.searchCommand
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(session_exports);
|
|
26
|
+
var import_session_commands = require("./session-commands.js");
|
|
27
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
28
|
+
0 && (module.exports = {
|
|
29
|
+
renameCommand,
|
|
30
|
+
resumeCommand,
|
|
31
|
+
searchCommand
|
|
32
|
+
});
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Session Commands Module (Interactive CLI)
|
|
3
|
+
*
|
|
4
|
+
* This module provides session-related commands for the interactive CLI.
|
|
5
|
+
* These commands use interactive overlays/selectors rather than subcommands.
|
|
6
|
+
*
|
|
7
|
+
* Exports:
|
|
8
|
+
* - searchCommand: Opens interactive search overlay
|
|
9
|
+
* - resumeCommand: Shows interactive session selector
|
|
10
|
+
* - renameCommand: Rename the current session
|
|
11
|
+
*
|
|
12
|
+
* Note: For non-interactive session subcommands (list, history, delete),
|
|
13
|
+
* see src/cli/commands/session-commands.ts
|
|
14
|
+
*/
|
|
15
|
+
export { searchCommand, resumeCommand, renameCommand } from './session-commands.js';
|
|
16
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/interactive-commands/session/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var session_commands_exports = {};
|
|
20
|
+
__export(session_commands_exports, {
|
|
21
|
+
renameCommand: () => renameCommand,
|
|
22
|
+
resumeCommand: () => resumeCommand,
|
|
23
|
+
searchCommand: () => searchCommand
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(session_commands_exports);
|
|
26
|
+
const resumeCommand = {
|
|
27
|
+
name: "resume",
|
|
28
|
+
description: "Switch to a different session (interactive selector)",
|
|
29
|
+
usage: "/resume",
|
|
30
|
+
category: "General",
|
|
31
|
+
aliases: ["r"],
|
|
32
|
+
handler: async (_args, _agent, _ctx) => {
|
|
33
|
+
const helpText = [
|
|
34
|
+
"\u{1F4CB} Resume Session",
|
|
35
|
+
"\nType /resume to show the session selector\n"
|
|
36
|
+
].join("\n");
|
|
37
|
+
return helpText;
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
const searchCommand = {
|
|
41
|
+
name: "search",
|
|
42
|
+
description: "Search messages across all sessions",
|
|
43
|
+
usage: "/search",
|
|
44
|
+
category: "General",
|
|
45
|
+
aliases: ["find"],
|
|
46
|
+
handler: async (_args, _agent, _ctx) => {
|
|
47
|
+
return true;
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
const renameCommand = {
|
|
51
|
+
name: "rename",
|
|
52
|
+
description: "Rename the current session",
|
|
53
|
+
usage: "/rename",
|
|
54
|
+
category: "General",
|
|
55
|
+
handler: async (_args, _agent, _ctx) => {
|
|
56
|
+
return true;
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
60
|
+
0 && (module.exports = {
|
|
61
|
+
renameCommand,
|
|
62
|
+
resumeCommand,
|
|
63
|
+
searchCommand
|
|
64
|
+
});
|