dexto 1.3.0 → 1.4.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 +25 -15
- package/dist/agents/agent-registry.json +9 -0
- package/dist/agents/coding-agent/coding-agent.yml +5 -0
- package/dist/agents/default-agent.yml +2 -2
- package/dist/api/server-hono.d.ts.map +1 -1
- package/dist/api/server-hono.js +39 -5
- package/dist/cli/cli-subscriber.d.ts.map +1 -1
- package/dist/cli/cli-subscriber.js +7 -1
- package/dist/cli/commands/helpers/formatters.d.ts.map +1 -1
- package/dist/cli/commands/helpers/formatters.js +2 -1
- package/dist/cli/commands/install.d.ts.map +1 -1
- package/dist/cli/commands/install.js +14 -40
- 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 +0 -15
- 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 +69 -52
- 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 +103 -74
- 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 +36 -32
- 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 +17 -3
- 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 +24 -3
- package/dist/cli/ink-cli/components/ApprovalPrompt.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/ApprovalPrompt.js +160 -45
- 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/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/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 +46 -8
- 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/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/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 +7 -2
- 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 +4 -2
- package/dist/cli/ink-cli/components/chat/ToolIcon.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/chat/ToolIcon.js +19 -5
- 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 +21 -0
- package/dist/cli/ink-cli/components/overlays/CustomModelWizard.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/CustomModelWizard.js +177 -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 +247 -24
- 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/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 +360 -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 +491 -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 +1156 -130
- 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 +86 -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 +188 -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 +674 -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 +222 -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 +54 -3
- package/dist/cli/ink-cli/utils/messageFormatting.d.ts.map +1 -1
- package/dist/cli/ink-cli/utils/messageFormatting.js +290 -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 +13 -0
- package/dist/cli/utils/options.d.ts.map +1 -1
- package/dist/cli/utils/options.js +0 -2
- package/dist/config/cli-overrides.d.ts +1 -1
- package/dist/config/cli-overrides.d.ts.map +1 -1
- package/dist/config/cli-overrides.js +5 -10
- package/dist/index.js +66 -48
- 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-BkwPkZpd.css +1 -0
- package/dist/webui/assets/index-D9u1XfyH.js +2025 -0
- package/dist/webui/assets/{tanstack-DgxBONJY.js → tanstack-Br79RQ-n.js} +1 -1
- package/dist/webui/index.html +3 -3
- package/package.json +16 -14
- 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,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GenericRenderer Component
|
|
3
|
+
*
|
|
4
|
+
* Fallback renderer for unknown tools and MCP tools.
|
|
5
|
+
* Renders content[] as plain text with truncation.
|
|
6
|
+
*/
|
|
7
|
+
import type { ContentPart } from '@dexto/core';
|
|
8
|
+
interface GenericRendererProps {
|
|
9
|
+
/** Content parts from SanitizedToolResult */
|
|
10
|
+
content: ContentPart[];
|
|
11
|
+
/** Maximum lines to display before truncating */
|
|
12
|
+
maxLines?: number;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Renders tool result content as plain text.
|
|
16
|
+
* Used as fallback for tools without specific display data.
|
|
17
|
+
* Uses ⎿ character for continuation lines.
|
|
18
|
+
*/
|
|
19
|
+
export declare function GenericRenderer({ content, maxLines }: GenericRendererProps): import("react/jsx-runtime").JSX.Element | null;
|
|
20
|
+
export {};
|
|
21
|
+
//# sourceMappingURL=GenericRenderer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GenericRenderer.d.ts","sourceRoot":"","sources":["../../../../../src/cli/ink-cli/components/renderers/GenericRenderer.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE/C,UAAU,oBAAoB;IAC1B,6CAA6C;IAC7C,OAAO,EAAE,WAAW,EAAE,CAAC;IACvB,iDAAiD;IACjD,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,EAAE,OAAO,EAAE,QAAa,EAAE,EAAE,oBAAoB,kDA8C/E"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Box, Text } from 'ink';
|
|
3
|
+
/**
|
|
4
|
+
* Renders tool result content as plain text.
|
|
5
|
+
* Used as fallback for tools without specific display data.
|
|
6
|
+
* Uses ⎿ character for continuation lines.
|
|
7
|
+
*/
|
|
8
|
+
export function GenericRenderer({ content, maxLines = 15 }) {
|
|
9
|
+
// Extract text from content parts
|
|
10
|
+
const text = content
|
|
11
|
+
.filter((part) => part.type === 'text')
|
|
12
|
+
.map((part) => part.text)
|
|
13
|
+
.join('\n');
|
|
14
|
+
if (!text) {
|
|
15
|
+
return null;
|
|
16
|
+
}
|
|
17
|
+
const lines = text.split('\n').filter((line) => line.trim().length > 0);
|
|
18
|
+
const displayLines = lines.slice(0, maxLines);
|
|
19
|
+
const truncated = lines.length > maxLines;
|
|
20
|
+
// For single line results, show inline
|
|
21
|
+
if (lines.length === 1 && lines[0]) {
|
|
22
|
+
const line = lines[0];
|
|
23
|
+
return (_jsxs(Text, { dimColor: true, children: [' ⎿ ', line.slice(0, 80), line.length > 80 ? '...' : ''] }));
|
|
24
|
+
}
|
|
25
|
+
return (_jsxs(Box, { flexDirection: "column", children: [_jsxs(Text, { dimColor: true, children: [' ⎿ ', displayLines.length, " lines"] }), displayLines.map((line, i) => (_jsxs(Text, { dimColor: true, wrap: "truncate", children: [' ', line] }, i))), truncated && (_jsxs(Text, { dimColor: true, children: [' ', "... ", lines.length - maxLines, " more lines"] }))] }));
|
|
26
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SearchRenderer Component
|
|
3
|
+
*
|
|
4
|
+
* Renders search results with file:line format.
|
|
5
|
+
* Used for grep_content and glob_files tool results.
|
|
6
|
+
*/
|
|
7
|
+
import type { SearchDisplayData } from '@dexto/core';
|
|
8
|
+
interface SearchRendererProps {
|
|
9
|
+
/** Search display data from tool result */
|
|
10
|
+
data: SearchDisplayData;
|
|
11
|
+
/** Maximum matches to display before truncating */
|
|
12
|
+
maxMatches?: number;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Renders search results with file paths and line numbers.
|
|
16
|
+
* Uses ⎿ character for continuation lines.
|
|
17
|
+
*/
|
|
18
|
+
export declare function SearchRenderer({ data, maxMatches }: SearchRendererProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export {};
|
|
20
|
+
//# sourceMappingURL=SearchRenderer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SearchRenderer.d.ts","sourceRoot":"","sources":["../../../../../src/cli/ink-cli/components/renderers/SearchRenderer.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAErD,UAAU,mBAAmB;IACzB,2CAA2C;IAC3C,IAAI,EAAE,iBAAiB,CAAC;IACxB,mDAAmD;IACnD,UAAU,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,EAAE,IAAI,EAAE,UAAc,EAAE,EAAE,mBAAmB,2CA8B3E"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Box, Text } from 'ink';
|
|
3
|
+
/**
|
|
4
|
+
* Renders search results with file paths and line numbers.
|
|
5
|
+
* Uses ⎿ character for continuation lines.
|
|
6
|
+
*/
|
|
7
|
+
export function SearchRenderer({ data, maxMatches = 5 }) {
|
|
8
|
+
const { pattern, matches, totalMatches, truncated: dataTruncated } = data;
|
|
9
|
+
const displayMatches = matches.slice(0, maxMatches);
|
|
10
|
+
const truncated = dataTruncated || matches.length > maxMatches;
|
|
11
|
+
return (_jsxs(Box, { flexDirection: "column", children: [_jsxs(Text, { dimColor: true, children: [' ⎿ ', totalMatches, " match", totalMatches !== 1 ? 'es' : '', " for \"", pattern, "\"", truncated && ' (truncated)'] }), displayMatches.map((match, i) => (_jsxs(Text, { dimColor: true, children: [' ', match.file, match.line > 0 && `:${match.line}`] }, i))), matches.length > maxMatches && (_jsxs(Text, { dimColor: true, children: [' ', "... ", matches.length - maxMatches, " more"] }))] }));
|
|
12
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ShellRenderer Component
|
|
3
|
+
*
|
|
4
|
+
* Renders shell command output.
|
|
5
|
+
* Shows actual stdout/stderr, limited to 5 lines with "+N lines" truncation.
|
|
6
|
+
*/
|
|
7
|
+
import type { ShellDisplayData } from '@dexto/core';
|
|
8
|
+
interface ShellRendererProps {
|
|
9
|
+
/** Shell display data from tool result */
|
|
10
|
+
data: ShellDisplayData;
|
|
11
|
+
/** Maximum lines to display before truncating (default: 10) */
|
|
12
|
+
maxLines?: number;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Renders shell command result with output.
|
|
16
|
+
* Uses ⎿ character for continuation lines.
|
|
17
|
+
* Shows just the output, "(No content)" for empty results.
|
|
18
|
+
*/
|
|
19
|
+
export declare function ShellRenderer({ data, maxLines }: ShellRendererProps): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export {};
|
|
21
|
+
//# sourceMappingURL=ShellRenderer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ShellRenderer.d.ts","sourceRoot":"","sources":["../../../../../src/cli/ink-cli/components/renderers/ShellRenderer.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAEpD,UAAU,kBAAkB;IACxB,0CAA0C;IAC1C,IAAI,EAAE,gBAAgB,CAAC;IACvB,+DAA+D;IAC/D,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,EAAE,IAAI,EAAE,QAAY,EAAE,EAAE,kBAAkB,2CAwCvE"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Box, Text } from 'ink';
|
|
3
|
+
/**
|
|
4
|
+
* Renders shell command result with output.
|
|
5
|
+
* Uses ⎿ character for continuation lines.
|
|
6
|
+
* Shows just the output, "(No content)" for empty results.
|
|
7
|
+
*/
|
|
8
|
+
export function ShellRenderer({ data, maxLines = 5 }) {
|
|
9
|
+
// Use stdout from display data, fall back to stderr if no stdout
|
|
10
|
+
const output = data.stdout || data.stderr || '';
|
|
11
|
+
const lines = output.split('\n').filter((line) => line.length > 0);
|
|
12
|
+
const displayLines = lines.slice(0, maxLines);
|
|
13
|
+
const truncatedCount = lines.length - maxLines;
|
|
14
|
+
// No output - show "(No content)"
|
|
15
|
+
if (lines.length === 0) {
|
|
16
|
+
return _jsxs(Text, { dimColor: true, children: [' ⎿ ', "(No content)"] });
|
|
17
|
+
}
|
|
18
|
+
// Single line output - show inline
|
|
19
|
+
if (lines.length === 1 && lines[0]) {
|
|
20
|
+
return (_jsxs(Text, { dimColor: true, children: [' ⎿ ', lines[0]] }));
|
|
21
|
+
}
|
|
22
|
+
// Multi-line output
|
|
23
|
+
// TODO: Add ctrl+o expansion to show full output
|
|
24
|
+
return (_jsxs(Box, { flexDirection: "column", children: [displayLines.map((line, i) => (_jsxs(Text, { dimColor: true, wrap: "truncate", children: [i === 0 ? ' ⎿ ' : ' ', line] }, i))), truncatedCount > 0 && (_jsxs(Text, { dimColor: true, children: [' ', "+", truncatedCount, " lines"] }))] }));
|
|
25
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared Diff Components and Utilities
|
|
3
|
+
*
|
|
4
|
+
* Common code for DiffRenderer and FilePreviewRenderer.
|
|
5
|
+
* Handles unified diff parsing, word-level diff highlighting, and line rendering.
|
|
6
|
+
*/
|
|
7
|
+
export interface ParsedHunk {
|
|
8
|
+
oldStart: number;
|
|
9
|
+
newStart: number;
|
|
10
|
+
lines: ParsedLine[];
|
|
11
|
+
}
|
|
12
|
+
export interface ParsedLine {
|
|
13
|
+
type: 'context' | 'addition' | 'deletion';
|
|
14
|
+
content: string;
|
|
15
|
+
lineNum: number;
|
|
16
|
+
}
|
|
17
|
+
export interface WordDiffPart {
|
|
18
|
+
value: string;
|
|
19
|
+
added?: boolean;
|
|
20
|
+
removed?: boolean;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Parse unified diff into structured hunks
|
|
24
|
+
*/
|
|
25
|
+
export declare function parseUnifiedDiff(unified: string): ParsedHunk[];
|
|
26
|
+
/**
|
|
27
|
+
* Find paired deletion/addition lines for word-level diff
|
|
28
|
+
*/
|
|
29
|
+
export declare function findLinePairs(lines: ParsedLine[]): Map<number, {
|
|
30
|
+
del: ParsedLine;
|
|
31
|
+
add: ParsedLine;
|
|
32
|
+
}>;
|
|
33
|
+
/**
|
|
34
|
+
* Compute word-level diff between two strings
|
|
35
|
+
*/
|
|
36
|
+
export declare function computeWordDiff(oldStr: string, newStr: string): {
|
|
37
|
+
oldParts: WordDiffPart[];
|
|
38
|
+
newParts: WordDiffPart[];
|
|
39
|
+
};
|
|
40
|
+
export declare function getLineNumWidth(maxLineNum: number): number;
|
|
41
|
+
export declare function formatLineNum(num: number, width: number): string;
|
|
42
|
+
interface DiffLineProps {
|
|
43
|
+
type: 'context' | 'addition' | 'deletion';
|
|
44
|
+
lineNum: number;
|
|
45
|
+
lineNumWidth: number;
|
|
46
|
+
content: string;
|
|
47
|
+
wordDiffParts?: WordDiffPart[];
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Render a single diff line with true 2-column layout.
|
|
51
|
+
* Column 1: Fixed-width gutter (line number + symbol)
|
|
52
|
+
* Column 2: Fixed-width content area (remaining terminal width)
|
|
53
|
+
* This prevents content/backgrounds from leaking beyond boundaries.
|
|
54
|
+
*/
|
|
55
|
+
export declare function DiffLine({ type, lineNum, lineNumWidth, content, wordDiffParts }: DiffLineProps): import("react/jsx-runtime").JSX.Element;
|
|
56
|
+
/**
|
|
57
|
+
* Hunk separator component
|
|
58
|
+
*/
|
|
59
|
+
export declare function HunkSeparator(): import("react/jsx-runtime").JSX.Element;
|
|
60
|
+
export {};
|
|
61
|
+
//# sourceMappingURL=diff-shared.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"diff-shared.d.ts","sourceRoot":"","sources":["../../../../../src/cli/ink-cli/components/renderers/diff-shared.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAUH,MAAM,WAAW,UAAU;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,UAAU,EAAE,CAAC;CACvB;AAED,MAAM,WAAW,UAAU;IACvB,IAAI,EAAE,SAAS,GAAG,UAAU,GAAG,UAAU,CAAC;IAC1C,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,YAAY;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,OAAO,CAAC,EAAE,OAAO,CAAC;CACrB;AAMD;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,UAAU,EAAE,CAyD9D;AAED;;GAEG;AACH,wBAAgB,aAAa,CACzB,KAAK,EAAE,UAAU,EAAE,GACpB,GAAG,CAAC,MAAM,EAAE;IAAE,GAAG,EAAE,UAAU,CAAC;IAAC,GAAG,EAAE,UAAU,CAAA;CAAE,CAAC,CAanD;AAED;;GAEG;AACH,wBAAgB,eAAe,CAC3B,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,GACf;IAAE,QAAQ,EAAE,YAAY,EAAE,CAAC;IAAC,QAAQ,EAAE,YAAY,EAAE,CAAA;CAAE,CAkBxD;AAMD,wBAAgB,eAAe,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAE1D;AAED,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAEhE;AAMD,UAAU,aAAa;IACnB,IAAI,EAAE,SAAS,GAAG,UAAU,GAAG,UAAU,CAAC;IAC1C,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,CAAC,EAAE,YAAY,EAAE,CAAC;CAClC;AAED;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,aAAa,EAAE,EAAE,aAAa,2CAgE9F;AAED;;GAEG;AACH,wBAAgB,aAAa,4CAM5B"}
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Box, Text, useStdout } from 'ink';
|
|
3
|
+
import { diffWords } from 'diff';
|
|
4
|
+
// =============================================================================
|
|
5
|
+
// Diff Parsing
|
|
6
|
+
// =============================================================================
|
|
7
|
+
/**
|
|
8
|
+
* Parse unified diff into structured hunks
|
|
9
|
+
*/
|
|
10
|
+
export function parseUnifiedDiff(unified) {
|
|
11
|
+
const lines = unified.split('\n');
|
|
12
|
+
const hunks = [];
|
|
13
|
+
let currentHunk = null;
|
|
14
|
+
let oldLine = 0;
|
|
15
|
+
let newLine = 0;
|
|
16
|
+
for (const line of lines) {
|
|
17
|
+
if (line.startsWith('---') || line.startsWith('+++') || line.startsWith('Index:')) {
|
|
18
|
+
continue;
|
|
19
|
+
}
|
|
20
|
+
const hunkMatch = line.match(/^@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@/);
|
|
21
|
+
if (hunkMatch) {
|
|
22
|
+
if (currentHunk) {
|
|
23
|
+
hunks.push(currentHunk);
|
|
24
|
+
}
|
|
25
|
+
oldLine = parseInt(hunkMatch[1], 10);
|
|
26
|
+
newLine = parseInt(hunkMatch[3], 10);
|
|
27
|
+
currentHunk = {
|
|
28
|
+
oldStart: oldLine,
|
|
29
|
+
newStart: newLine,
|
|
30
|
+
lines: [],
|
|
31
|
+
};
|
|
32
|
+
continue;
|
|
33
|
+
}
|
|
34
|
+
if (!currentHunk)
|
|
35
|
+
continue;
|
|
36
|
+
if (line.startsWith('+')) {
|
|
37
|
+
currentHunk.lines.push({
|
|
38
|
+
type: 'addition',
|
|
39
|
+
content: line.slice(1),
|
|
40
|
+
lineNum: newLine++,
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
else if (line.startsWith('-')) {
|
|
44
|
+
currentHunk.lines.push({
|
|
45
|
+
type: 'deletion',
|
|
46
|
+
content: line.slice(1),
|
|
47
|
+
lineNum: oldLine++,
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
else if (line.startsWith(' ') || line === '') {
|
|
51
|
+
currentHunk.lines.push({
|
|
52
|
+
type: 'context',
|
|
53
|
+
content: line.startsWith(' ') ? line.slice(1) : line,
|
|
54
|
+
lineNum: newLine,
|
|
55
|
+
});
|
|
56
|
+
oldLine++;
|
|
57
|
+
newLine++;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
if (currentHunk) {
|
|
61
|
+
hunks.push(currentHunk);
|
|
62
|
+
}
|
|
63
|
+
return hunks;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Find paired deletion/addition lines for word-level diff
|
|
67
|
+
*/
|
|
68
|
+
export function findLinePairs(lines) {
|
|
69
|
+
const pairs = new Map();
|
|
70
|
+
for (let i = 0; i < lines.length - 1; i++) {
|
|
71
|
+
const current = lines[i];
|
|
72
|
+
const next = lines[i + 1];
|
|
73
|
+
if (current.type === 'deletion' && next.type === 'addition') {
|
|
74
|
+
pairs.set(i, { del: current, add: next });
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
return pairs;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Compute word-level diff between two strings
|
|
81
|
+
*/
|
|
82
|
+
export function computeWordDiff(oldStr, newStr) {
|
|
83
|
+
const changes = diffWords(oldStr, newStr);
|
|
84
|
+
const oldParts = [];
|
|
85
|
+
const newParts = [];
|
|
86
|
+
for (const change of changes) {
|
|
87
|
+
if (change.added) {
|
|
88
|
+
newParts.push({ value: change.value, added: true });
|
|
89
|
+
}
|
|
90
|
+
else if (change.removed) {
|
|
91
|
+
oldParts.push({ value: change.value, removed: true });
|
|
92
|
+
}
|
|
93
|
+
else {
|
|
94
|
+
oldParts.push({ value: change.value });
|
|
95
|
+
newParts.push({ value: change.value });
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
return { oldParts, newParts };
|
|
99
|
+
}
|
|
100
|
+
// =============================================================================
|
|
101
|
+
// Line Number Formatting
|
|
102
|
+
// =============================================================================
|
|
103
|
+
export function getLineNumWidth(maxLineNum) {
|
|
104
|
+
return Math.max(3, String(maxLineNum).length);
|
|
105
|
+
}
|
|
106
|
+
export function formatLineNum(num, width) {
|
|
107
|
+
return String(num).padStart(width, ' ');
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Render a single diff line with true 2-column layout.
|
|
111
|
+
* Column 1: Fixed-width gutter (line number + symbol)
|
|
112
|
+
* Column 2: Fixed-width content area (remaining terminal width)
|
|
113
|
+
* This prevents content/backgrounds from leaking beyond boundaries.
|
|
114
|
+
*/
|
|
115
|
+
export function DiffLine({ type, lineNum, lineNumWidth, content, wordDiffParts }) {
|
|
116
|
+
const { stdout } = useStdout();
|
|
117
|
+
const terminalWidth = stdout?.columns ?? 80;
|
|
118
|
+
const lineNumStr = formatLineNum(lineNum, lineNumWidth);
|
|
119
|
+
// Gutter: line number + space + symbol + space (e.g., " 42 - ")
|
|
120
|
+
const gutterWidth = lineNumWidth + 3;
|
|
121
|
+
// Content column width - remaining space after gutter and padding
|
|
122
|
+
// Account for padding (2 chars from DiffRenderer's paddingLeft)
|
|
123
|
+
const contentWidth = Math.max(20, terminalWidth - gutterWidth - 4);
|
|
124
|
+
// Get colors based on type
|
|
125
|
+
const getColors = () => {
|
|
126
|
+
switch (type) {
|
|
127
|
+
case 'deletion':
|
|
128
|
+
return { bg: '#662222', fg: 'white', symbol: '-', symbolColor: 'red' };
|
|
129
|
+
case 'addition':
|
|
130
|
+
return { bg: '#224466', fg: 'white', symbol: '+', symbolColor: 'blue' };
|
|
131
|
+
default:
|
|
132
|
+
return { bg: undefined, fg: undefined, symbol: ' ', symbolColor: undefined };
|
|
133
|
+
}
|
|
134
|
+
};
|
|
135
|
+
const colors = getColors();
|
|
136
|
+
// Render content with word-level diff highlighting if available
|
|
137
|
+
const renderContent = () => {
|
|
138
|
+
if (wordDiffParts && wordDiffParts.length > 0) {
|
|
139
|
+
return wordDiffParts.map((part, i) => {
|
|
140
|
+
if (type === 'deletion' && part.removed) {
|
|
141
|
+
return (_jsx(Text, { backgroundColor: "#882222", children: part.value }, i));
|
|
142
|
+
}
|
|
143
|
+
else if (type === 'addition' && part.added) {
|
|
144
|
+
return (_jsx(Text, { backgroundColor: "#224488", children: part.value }, i));
|
|
145
|
+
}
|
|
146
|
+
return _jsx(Text, { children: part.value }, i);
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
return content;
|
|
150
|
+
};
|
|
151
|
+
return (_jsxs(Box, { children: [_jsxs(Box, { width: gutterWidth, flexShrink: 0, children: [_jsx(Text, { dimColor: true, children: lineNumStr }), _jsxs(Text, { color: colors.symbolColor, children: [" ", colors.symbol, " "] })] }), _jsx(Box, { width: contentWidth, flexShrink: 0, children: _jsx(Text, { backgroundColor: colors.bg, color: colors.fg, wrap: "wrap", children: renderContent() }) })] }));
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* Hunk separator component
|
|
155
|
+
*/
|
|
156
|
+
export function HunkSeparator() {
|
|
157
|
+
return (_jsx(Box, { children: _jsx(Text, { color: "gray", children: "..." }) }));
|
|
158
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tool Result Renderers
|
|
3
|
+
*
|
|
4
|
+
* Dispatch component that renders tool results based on display type.
|
|
5
|
+
* Uses discriminated union from ToolDisplayData for type-safe rendering.
|
|
6
|
+
*/
|
|
7
|
+
import type { ContentPart, ToolDisplayData } from '@dexto/core';
|
|
8
|
+
export { DiffRenderer } from './DiffRenderer.js';
|
|
9
|
+
export { ShellRenderer } from './ShellRenderer.js';
|
|
10
|
+
export { SearchRenderer } from './SearchRenderer.js';
|
|
11
|
+
export { FileRenderer } from './FileRenderer.js';
|
|
12
|
+
export { GenericRenderer } from './GenericRenderer.js';
|
|
13
|
+
export { DiffPreview, CreateFilePreview } from './FilePreviewRenderer.js';
|
|
14
|
+
interface ToolResultRendererProps {
|
|
15
|
+
/** Display data from SanitizedToolResult.meta.display */
|
|
16
|
+
display?: ToolDisplayData;
|
|
17
|
+
/** Content parts from SanitizedToolResult.content */
|
|
18
|
+
content: ContentPart[];
|
|
19
|
+
/** Maximum lines/matches to display */
|
|
20
|
+
maxLines?: number;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Renders tool results based on display type.
|
|
24
|
+
* Falls back to GenericRenderer for unknown types or missing display data.
|
|
25
|
+
* Each renderer uses its own default limits - only pass maxLines to override.
|
|
26
|
+
*/
|
|
27
|
+
export declare function ToolResultRenderer({ display, content, maxLines }: ToolResultRendererProps): import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/cli/ink-cli/components/renderers/index.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAQhE,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAGvD,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAE1E,UAAU,uBAAuB;IAC7B,yDAAyD;IACzD,OAAO,CAAC,EAAE,eAAe,CAAC;IAC1B,qDAAqD;IACrD,OAAO,EAAE,WAAW,EAAE,CAAC;IACvB,uCAAuC;IACvC,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,uBAAuB,2CAgCzF"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { DiffRenderer } from './DiffRenderer.js';
|
|
3
|
+
import { ShellRenderer } from './ShellRenderer.js';
|
|
4
|
+
import { SearchRenderer } from './SearchRenderer.js';
|
|
5
|
+
import { FileRenderer } from './FileRenderer.js';
|
|
6
|
+
import { GenericRenderer } from './GenericRenderer.js';
|
|
7
|
+
// Re-export individual renderers for direct use
|
|
8
|
+
export { DiffRenderer } from './DiffRenderer.js';
|
|
9
|
+
export { ShellRenderer } from './ShellRenderer.js';
|
|
10
|
+
export { SearchRenderer } from './SearchRenderer.js';
|
|
11
|
+
export { FileRenderer } from './FileRenderer.js';
|
|
12
|
+
export { GenericRenderer } from './GenericRenderer.js';
|
|
13
|
+
// File preview renderers for approval prompts (full content, no truncation)
|
|
14
|
+
export { DiffPreview, CreateFilePreview } from './FilePreviewRenderer.js';
|
|
15
|
+
/**
|
|
16
|
+
* Renders tool results based on display type.
|
|
17
|
+
* Falls back to GenericRenderer for unknown types or missing display data.
|
|
18
|
+
* Each renderer uses its own default limits - only pass maxLines to override.
|
|
19
|
+
*/
|
|
20
|
+
export function ToolResultRenderer({ display, content, maxLines }) {
|
|
21
|
+
// Default to generic if no display data
|
|
22
|
+
const displayData = display ?? { type: 'generic' };
|
|
23
|
+
switch (displayData.type) {
|
|
24
|
+
case 'diff':
|
|
25
|
+
return (_jsx(DiffRenderer, { data: displayData, ...(maxLines !== undefined && { maxLines }) }));
|
|
26
|
+
case 'shell':
|
|
27
|
+
return (_jsx(ShellRenderer, { data: displayData, ...(maxLines !== undefined && { maxLines }) }));
|
|
28
|
+
case 'search':
|
|
29
|
+
return (_jsx(SearchRenderer, { data: displayData, ...(maxLines !== undefined && { maxMatches: maxLines }) }));
|
|
30
|
+
case 'file':
|
|
31
|
+
return _jsx(FileRenderer, { data: displayData });
|
|
32
|
+
case 'generic':
|
|
33
|
+
default:
|
|
34
|
+
return (_jsx(GenericRenderer, { content: content, ...(maxLines !== undefined && { maxLines }) }));
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MarkdownText Component
|
|
3
|
+
*
|
|
4
|
+
* Renders markdown text with terminal-appropriate styling.
|
|
5
|
+
* Handles both inline markdown (bold, code, italic) and block elements (headers, code blocks, lists).
|
|
6
|
+
*
|
|
7
|
+
* Uses wrap-ansi for proper word wrapping to avoid mid-word splits.
|
|
8
|
+
* Streaming-safe: incomplete markdown tokens won't match regex patterns,
|
|
9
|
+
* so they render as plain text until complete.
|
|
10
|
+
*/
|
|
11
|
+
import React from 'react';
|
|
12
|
+
interface InlineSegment {
|
|
13
|
+
type: 'text' | 'bold' | 'code' | 'italic' | 'strikethrough' | 'link' | 'url';
|
|
14
|
+
content: string;
|
|
15
|
+
url?: string;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Parse inline markdown and return segments.
|
|
19
|
+
* Uses a single regex to find all inline patterns, processes in order.
|
|
20
|
+
*/
|
|
21
|
+
declare function parseInlineMarkdown(text: string): InlineSegment[];
|
|
22
|
+
interface RenderInlineProps {
|
|
23
|
+
text: string;
|
|
24
|
+
defaultColor?: string;
|
|
25
|
+
/** Apply bold styling to all text segments (used for headers) */
|
|
26
|
+
bold?: boolean;
|
|
27
|
+
}
|
|
28
|
+
declare const RenderInline: React.NamedExoticComponent<RenderInlineProps>;
|
|
29
|
+
interface MarkdownTextProps {
|
|
30
|
+
children: string;
|
|
31
|
+
/** Default text color */
|
|
32
|
+
color?: string;
|
|
33
|
+
/** Optional prefix for first line (e.g., "⏺ " for assistant messages) */
|
|
34
|
+
bulletPrefix?: string;
|
|
35
|
+
}
|
|
36
|
+
export declare const MarkdownText: React.NamedExoticComponent<MarkdownTextProps>;
|
|
37
|
+
export { RenderInline, parseInlineMarkdown };
|
|
38
|
+
//# sourceMappingURL=MarkdownText.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MarkdownText.d.ts","sourceRoot":"","sources":["../../../../../src/cli/ink-cli/components/shared/MarkdownText.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAwB,MAAM,OAAO,CAAC;AAU7C,UAAU,aAAa;IACnB,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,QAAQ,GAAG,eAAe,GAAG,MAAM,GAAG,KAAK,CAAC;IAC7E,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;GAGG;AACH,iBAAS,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,aAAa,EAAE,CAuE1D;AAwID,UAAU,iBAAiB;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,iEAAiE;IACjE,IAAI,CAAC,EAAE,OAAO,CAAC;CAClB;AAkED,QAAA,MAAM,YAAY,+CAA6B,CAAC;AAMhD,UAAU,iBAAiB;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,yBAAyB;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,yEAAyE;IACzE,YAAY,CAAC,EAAE,MAAM,CAAC;CACzB;AAoSD,eAAO,MAAM,YAAY,+CAA6B,CAAC;AAGvD,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,CAAC"}
|