centaurus-cli 2.0.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/AUTH_FLOW.md +138 -0
- package/CONFIG_GUIDE.md +255 -0
- package/LICENSE +21 -0
- package/README.md +346 -0
- package/dist/ai/provider-factory.d.ts +6 -0
- package/dist/ai/provider-factory.d.ts.map +1 -0
- package/dist/ai/provider-factory.js +27 -0
- package/dist/ai/provider-factory.js.map +1 -0
- package/dist/ai/providers/base.d.ts +25 -0
- package/dist/ai/providers/base.d.ts.map +1 -0
- package/dist/ai/providers/base.js +9 -0
- package/dist/ai/providers/base.js.map +1 -0
- package/dist/ai/providers/gemini.d.ts +34 -0
- package/dist/ai/providers/gemini.d.ts.map +1 -0
- package/dist/ai/providers/gemini.js +146 -0
- package/dist/ai/providers/gemini.js.map +1 -0
- package/dist/ai/types.d.ts +20 -0
- package/dist/ai/types.d.ts.map +1 -0
- package/dist/ai/types.js +2 -0
- package/dist/ai/types.js.map +1 -0
- package/dist/cli-adapter.d.ts +78 -0
- package/dist/cli-adapter.d.ts.map +1 -0
- package/dist/cli-adapter.js +605 -0
- package/dist/cli-adapter.js.map +1 -0
- package/dist/commands/CommandParser.d.ts +27 -0
- package/dist/commands/CommandParser.d.ts.map +1 -0
- package/dist/commands/CommandParser.js +238 -0
- package/dist/commands/CommandParser.js.map +1 -0
- package/dist/config/ConfigManager.d.ts +59 -0
- package/dist/config/ConfigManager.d.ts.map +1 -0
- package/dist/config/ConfigManager.js +332 -0
- package/dist/config/ConfigManager.js.map +1 -0
- package/dist/config/defaultConfig.d.ts +82 -0
- package/dist/config/defaultConfig.d.ts.map +1 -0
- package/dist/config/defaultConfig.js +88 -0
- package/dist/config/defaultConfig.js.map +1 -0
- package/dist/config/manager.d.ts +60 -0
- package/dist/config/manager.d.ts.map +1 -0
- package/dist/config/manager.js +162 -0
- package/dist/config/manager.js.map +1 -0
- package/dist/config/types.d.ts +9 -0
- package/dist/config/types.d.ts.map +1 -0
- package/dist/config/types.js +6 -0
- package/dist/config/types.js.map +1 -0
- package/dist/index-custom.d.ts +3 -0
- package/dist/index-custom.d.ts.map +1 -0
- package/dist/index-custom.js +65 -0
- package/dist/index-custom.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +102 -0
- package/dist/index.js.map +1 -0
- package/dist/prompts/system-prompt.d.ts +47 -0
- package/dist/prompts/system-prompt.d.ts.map +1 -0
- package/dist/prompts/system-prompt.js +378 -0
- package/dist/prompts/system-prompt.js.map +1 -0
- package/dist/providers/GoogleProvider.d.ts +26 -0
- package/dist/providers/GoogleProvider.d.ts.map +1 -0
- package/dist/providers/GoogleProvider.js +313 -0
- package/dist/providers/GoogleProvider.js.map +1 -0
- package/dist/providers/Provider.d.ts +114 -0
- package/dist/providers/Provider.d.ts.map +1 -0
- package/dist/providers/Provider.js +44 -0
- package/dist/providers/Provider.js.map +1 -0
- package/dist/services/api-client.d.ts +282 -0
- package/dist/services/api-client.d.ts.map +1 -0
- package/dist/services/api-client.js +339 -0
- package/dist/services/api-client.js.map +1 -0
- package/dist/services/auth-handler.d.ts +30 -0
- package/dist/services/auth-handler.d.ts.map +1 -0
- package/dist/services/auth-handler.js +210 -0
- package/dist/services/auth-handler.js.map +1 -0
- package/dist/services/conversation-manager.d.ts +73 -0
- package/dist/services/conversation-manager.d.ts.map +1 -0
- package/dist/services/conversation-manager.js +128 -0
- package/dist/services/conversation-manager.js.map +1 -0
- package/dist/tests/automated-verification.d.ts +27 -0
- package/dist/tests/automated-verification.d.ts.map +1 -0
- package/dist/tests/automated-verification.js +359 -0
- package/dist/tests/automated-verification.js.map +1 -0
- package/dist/tests/integration-tests.d.ts +50 -0
- package/dist/tests/integration-tests.d.ts.map +1 -0
- package/dist/tests/integration-tests.js +648 -0
- package/dist/tests/integration-tests.js.map +1 -0
- package/dist/tools/ToolRegistry.d.ts +44 -0
- package/dist/tools/ToolRegistry.d.ts.map +1 -0
- package/dist/tools/ToolRegistry.js +494 -0
- package/dist/tools/ToolRegistry.js.map +1 -0
- package/dist/tools/command.d.ts +4 -0
- package/dist/tools/command.d.ts.map +1 -0
- package/dist/tools/command.js +117 -0
- package/dist/tools/command.js.map +1 -0
- package/dist/tools/file-ops-test.d.ts +6 -0
- package/dist/tools/file-ops-test.d.ts.map +1 -0
- package/dist/tools/file-ops-test.js +197 -0
- package/dist/tools/file-ops-test.js.map +1 -0
- package/dist/tools/file-ops.d.ts +6 -0
- package/dist/tools/file-ops.d.ts.map +1 -0
- package/dist/tools/file-ops.js +189 -0
- package/dist/tools/file-ops.js.map +1 -0
- package/dist/tools/plan-mode.d.ts +53 -0
- package/dist/tools/plan-mode.d.ts.map +1 -0
- package/dist/tools/plan-mode.js +202 -0
- package/dist/tools/plan-mode.js.map +1 -0
- package/dist/tools/registry.d.ts +30 -0
- package/dist/tools/registry.d.ts.map +1 -0
- package/dist/tools/registry.js +67 -0
- package/dist/tools/registry.js.map +1 -0
- package/dist/tools/types.d.ts +34 -0
- package/dist/tools/types.d.ts.map +1 -0
- package/dist/tools/types.js +2 -0
- package/dist/tools/types.js.map +1 -0
- package/dist/tools/web-search.d.ts +24 -0
- package/dist/tools/web-search.d.ts.map +1 -0
- package/dist/tools/web-search.js +194 -0
- package/dist/tools/web-search.js.map +1 -0
- package/dist/types/index.d.ts +32 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +2 -0
- package/dist/types/index.js.map +1 -0
- package/dist/ui/DisplayHistory.d.ts +53 -0
- package/dist/ui/DisplayHistory.d.ts.map +1 -0
- package/dist/ui/DisplayHistory.js +82 -0
- package/dist/ui/DisplayHistory.js.map +1 -0
- package/dist/ui/clack-ui.d.ts +83 -0
- package/dist/ui/clack-ui.d.ts.map +1 -0
- package/dist/ui/clack-ui.js +304 -0
- package/dist/ui/clack-ui.js.map +1 -0
- package/dist/ui/components/App.d.ts +47 -0
- package/dist/ui/components/App.d.ts.map +1 -0
- package/dist/ui/components/App.js +389 -0
- package/dist/ui/components/App.js.map +1 -0
- package/dist/ui/components/AuthScreen.d.ts +8 -0
- package/dist/ui/components/AuthScreen.d.ts.map +1 -0
- package/dist/ui/components/AuthScreen.js +37 -0
- package/dist/ui/components/AuthScreen.js.map +1 -0
- package/dist/ui/components/AuthWelcomeScreen.d.ts +8 -0
- package/dist/ui/components/AuthWelcomeScreen.d.ts.map +1 -0
- package/dist/ui/components/AuthWelcomeScreen.js +34 -0
- package/dist/ui/components/AuthWelcomeScreen.js.map +1 -0
- package/dist/ui/components/CodeBlock.d.ts +9 -0
- package/dist/ui/components/CodeBlock.d.ts.map +1 -0
- package/dist/ui/components/CodeBlock.js +22 -0
- package/dist/ui/components/CodeBlock.js.map +1 -0
- package/dist/ui/components/ConfigViewer.d.ts +11 -0
- package/dist/ui/components/ConfigViewer.d.ts.map +1 -0
- package/dist/ui/components/ConfigViewer.js +27 -0
- package/dist/ui/components/ConfigViewer.js.map +1 -0
- package/dist/ui/components/ConfirmPrompt.d.ts +11 -0
- package/dist/ui/components/ConfirmPrompt.d.ts.map +1 -0
- package/dist/ui/components/ConfirmPrompt.js +55 -0
- package/dist/ui/components/ConfirmPrompt.js.map +1 -0
- package/dist/ui/components/DiffViewer.d.ts +8 -0
- package/dist/ui/components/DiffViewer.d.ts.map +1 -0
- package/dist/ui/components/DiffViewer.js +63 -0
- package/dist/ui/components/DiffViewer.js.map +1 -0
- package/dist/ui/components/DisplayItemRenderer.d.ts +18 -0
- package/dist/ui/components/DisplayItemRenderer.d.ts.map +1 -0
- package/dist/ui/components/DisplayItemRenderer.js +53 -0
- package/dist/ui/components/DisplayItemRenderer.js.map +1 -0
- package/dist/ui/components/DynamicMessage.d.ts +13 -0
- package/dist/ui/components/DynamicMessage.d.ts.map +1 -0
- package/dist/ui/components/DynamicMessage.js +27 -0
- package/dist/ui/components/DynamicMessage.js.map +1 -0
- package/dist/ui/components/ErrorBoundary.d.ts +16 -0
- package/dist/ui/components/ErrorBoundary.d.ts.map +1 -0
- package/dist/ui/components/ErrorBoundary.js +25 -0
- package/dist/ui/components/ErrorBoundary.js.map +1 -0
- package/dist/ui/components/FileOperation.d.ts +10 -0
- package/dist/ui/components/FileOperation.d.ts.map +1 -0
- package/dist/ui/components/FileOperation.js +31 -0
- package/dist/ui/components/FileOperation.js.map +1 -0
- package/dist/ui/components/InputBox.d.ts +12 -0
- package/dist/ui/components/InputBox.d.ts.map +1 -0
- package/dist/ui/components/InputBox.js +50 -0
- package/dist/ui/components/InputBox.js.map +1 -0
- package/dist/ui/components/KeyboardHelp.d.ts +7 -0
- package/dist/ui/components/KeyboardHelp.d.ts.map +1 -0
- package/dist/ui/components/KeyboardHelp.js +25 -0
- package/dist/ui/components/KeyboardHelp.js.map +1 -0
- package/dist/ui/components/LoadingIndicator.d.ts +3 -0
- package/dist/ui/components/LoadingIndicator.d.ts.map +1 -0
- package/dist/ui/components/LoadingIndicator.js +25 -0
- package/dist/ui/components/LoadingIndicator.js.map +1 -0
- package/dist/ui/components/MarkdownRenderer.d.ts +8 -0
- package/dist/ui/components/MarkdownRenderer.d.ts.map +1 -0
- package/dist/ui/components/MarkdownRenderer.js +96 -0
- package/dist/ui/components/MarkdownRenderer.js.map +1 -0
- package/dist/ui/components/MessageBox.d.ts +10 -0
- package/dist/ui/components/MessageBox.d.ts.map +1 -0
- package/dist/ui/components/MessageBox.js +50 -0
- package/dist/ui/components/MessageBox.js.map +1 -0
- package/dist/ui/components/MessageDisplay.d.ts +8 -0
- package/dist/ui/components/MessageDisplay.d.ts.map +1 -0
- package/dist/ui/components/MessageDisplay.js +43 -0
- package/dist/ui/components/MessageDisplay.js.map +1 -0
- package/dist/ui/components/ScrollableContent.d.ts +7 -0
- package/dist/ui/components/ScrollableContent.d.ts.map +1 -0
- package/dist/ui/components/ScrollableContent.js +6 -0
- package/dist/ui/components/ScrollableContent.js.map +1 -0
- package/dist/ui/components/ScrollableMessageList.d.ts +10 -0
- package/dist/ui/components/ScrollableMessageList.d.ts.map +1 -0
- package/dist/ui/components/ScrollableMessageList.js +133 -0
- package/dist/ui/components/ScrollableMessageList.js.map +1 -0
- package/dist/ui/components/ScrollableScreen.d.ts +9 -0
- package/dist/ui/components/ScrollableScreen.d.ts.map +1 -0
- package/dist/ui/components/ScrollableScreen.js +22 -0
- package/dist/ui/components/ScrollableScreen.js.map +1 -0
- package/dist/ui/components/SelectPrompt.d.ts +12 -0
- package/dist/ui/components/SelectPrompt.d.ts.map +1 -0
- package/dist/ui/components/SelectPrompt.js +10 -0
- package/dist/ui/components/SelectPrompt.js.map +1 -0
- package/dist/ui/components/StaticMessageHistory.d.ts +14 -0
- package/dist/ui/components/StaticMessageHistory.d.ts.map +1 -0
- package/dist/ui/components/StaticMessageHistory.js +19 -0
- package/dist/ui/components/StaticMessageHistory.js.map +1 -0
- package/dist/ui/components/StatusBar.d.ts +10 -0
- package/dist/ui/components/StatusBar.d.ts.map +1 -0
- package/dist/ui/components/StatusBar.js +20 -0
- package/dist/ui/components/StatusBar.js.map +1 -0
- package/dist/ui/components/StreamingMessageDisplay.d.ts +13 -0
- package/dist/ui/components/StreamingMessageDisplay.d.ts.map +1 -0
- package/dist/ui/components/StreamingMessageDisplay.js +26 -0
- package/dist/ui/components/StreamingMessageDisplay.js.map +1 -0
- package/dist/ui/components/ToolExecutionMessage.d.ts +8 -0
- package/dist/ui/components/ToolExecutionMessage.d.ts.map +1 -0
- package/dist/ui/components/ToolExecutionMessage.js +189 -0
- package/dist/ui/components/ToolExecutionMessage.js.map +1 -0
- package/dist/ui/components/ToolExecutionStatus.d.ts +10 -0
- package/dist/ui/components/ToolExecutionStatus.d.ts.map +1 -0
- package/dist/ui/components/ToolExecutionStatus.js +65 -0
- package/dist/ui/components/ToolExecutionStatus.js.map +1 -0
- package/dist/ui/components/ToolResult.d.ts +10 -0
- package/dist/ui/components/ToolResult.d.ts.map +1 -0
- package/dist/ui/components/ToolResult.js +17 -0
- package/dist/ui/components/ToolResult.js.map +1 -0
- package/dist/ui/components/WelcomeBanner.d.ts +3 -0
- package/dist/ui/components/WelcomeBanner.d.ts.map +1 -0
- package/dist/ui/components/WelcomeBanner.js +28 -0
- package/dist/ui/components/WelcomeBanner.js.map +1 -0
- package/dist/ui/components/code-block.d.ts +10 -0
- package/dist/ui/components/code-block.d.ts.map +1 -0
- package/dist/ui/components/code-block.js +74 -0
- package/dist/ui/components/code-block.js.map +1 -0
- package/dist/ui/components/confirm-prompt.d.ts +12 -0
- package/dist/ui/components/confirm-prompt.d.ts.map +1 -0
- package/dist/ui/components/confirm-prompt.js +104 -0
- package/dist/ui/components/confirm-prompt.js.map +1 -0
- package/dist/ui/components/diff-viewer.d.ts +9 -0
- package/dist/ui/components/diff-viewer.d.ts.map +1 -0
- package/dist/ui/components/diff-viewer.js +57 -0
- package/dist/ui/components/diff-viewer.js.map +1 -0
- package/dist/ui/components/input-box.d.ts +18 -0
- package/dist/ui/components/input-box.d.ts.map +1 -0
- package/dist/ui/components/input-box.js +157 -0
- package/dist/ui/components/input-box.js.map +1 -0
- package/dist/ui/components/keyboard-help.d.ts +7 -0
- package/dist/ui/components/keyboard-help.d.ts.map +1 -0
- package/dist/ui/components/keyboard-help.js +43 -0
- package/dist/ui/components/keyboard-help.js.map +1 -0
- package/dist/ui/components/loading-indicator.d.ts +3 -0
- package/dist/ui/components/loading-indicator.d.ts.map +1 -0
- package/dist/ui/components/loading-indicator.js +42 -0
- package/dist/ui/components/loading-indicator.js.map +1 -0
- package/dist/ui/components/message-display.d.ts +7 -0
- package/dist/ui/components/message-display.d.ts.map +1 -0
- package/dist/ui/components/message-display.js +104 -0
- package/dist/ui/components/message-display.js.map +1 -0
- package/dist/ui/components/misc.d.ts +28 -0
- package/dist/ui/components/misc.d.ts.map +1 -0
- package/dist/ui/components/misc.js +128 -0
- package/dist/ui/components/misc.js.map +1 -0
- package/dist/ui/components/select-prompt.d.ts +13 -0
- package/dist/ui/components/select-prompt.d.ts.map +1 -0
- package/dist/ui/components/select-prompt.js +42 -0
- package/dist/ui/components/select-prompt.js.map +1 -0
- package/dist/ui/components/status-bar.d.ts +11 -0
- package/dist/ui/components/status-bar.d.ts.map +1 -0
- package/dist/ui/components/status-bar.js +47 -0
- package/dist/ui/components/status-bar.js.map +1 -0
- package/dist/ui/components/tool-execution.d.ts +3 -0
- package/dist/ui/components/tool-execution.d.ts.map +1 -0
- package/dist/ui/components/tool-execution.js +374 -0
- package/dist/ui/components/tool-execution.js.map +1 -0
- package/dist/ui/components/tool-result.d.ts +11 -0
- package/dist/ui/components/tool-result.d.ts.map +1 -0
- package/dist/ui/components/tool-result.js +58 -0
- package/dist/ui/components/tool-result.js.map +1 -0
- package/dist/ui/components/welcome-banner.d.ts +3 -0
- package/dist/ui/components/welcome-banner.d.ts.map +1 -0
- package/dist/ui/components/welcome-banner.js +46 -0
- package/dist/ui/components/welcome-banner.js.map +1 -0
- package/dist/ui/hooks/useDisplayHistory.d.ts +13 -0
- package/dist/ui/hooks/useDisplayHistory.d.ts.map +1 -0
- package/dist/ui/hooks/useDisplayHistory.js +45 -0
- package/dist/ui/hooks/useDisplayHistory.js.map +1 -0
- package/dist/ui/render-engine.d.ts +69 -0
- package/dist/ui/render-engine.d.ts.map +1 -0
- package/dist/ui/render-engine.js +197 -0
- package/dist/ui/render-engine.js.map +1 -0
- package/dist/ui/terminal/TerminalRenderer.d.ts +84 -0
- package/dist/ui/terminal/TerminalRenderer.d.ts.map +1 -0
- package/dist/ui/terminal/TerminalRenderer.js +154 -0
- package/dist/ui/terminal/TerminalRenderer.js.map +1 -0
- package/dist/ui/terminal/TerminalUI.d.ts +139 -0
- package/dist/ui/terminal/TerminalUI.d.ts.map +1 -0
- package/dist/ui/terminal/TerminalUI.js +430 -0
- package/dist/ui/terminal/TerminalUI.js.map +1 -0
- package/dist/ui/terminal/VirtualChatBuffer.d.ts +32 -0
- package/dist/ui/terminal/VirtualChatBuffer.d.ts.map +1 -0
- package/dist/ui/terminal/VirtualChatBuffer.js +37 -0
- package/dist/ui/terminal/VirtualChatBuffer.js.map +1 -0
- package/dist/ui/terminal-kit-base.d.ts +117 -0
- package/dist/ui/terminal-kit-base.d.ts.map +1 -0
- package/dist/ui/terminal-kit-base.js +188 -0
- package/dist/ui/terminal-kit-base.js.map +1 -0
- package/dist/utils/file.d.ts +21 -0
- package/dist/utils/file.d.ts.map +1 -0
- package/dist/utils/file.js +68 -0
- package/dist/utils/file.js.map +1 -0
- package/dist/utils/logger.d.ts +17 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +57 -0
- package/dist/utils/logger.js.map +1 -0
- package/dist/utils/markdown-parser.d.ts +56 -0
- package/dist/utils/markdown-parser.d.ts.map +1 -0
- package/dist/utils/markdown-parser.js +307 -0
- package/dist/utils/markdown-parser.js.map +1 -0
- package/dist/utils/shell.d.ts +7 -0
- package/dist/utils/shell.d.ts.map +1 -0
- package/dist/utils/shell.js +62 -0
- package/dist/utils/shell.js.map +1 -0
- package/dist/utils/state.d.ts +13 -0
- package/dist/utils/state.d.ts.map +1 -0
- package/dist/utils/state.js +25 -0
- package/dist/utils/state.js.map +1 -0
- package/package.json +81 -0
- package/postinstall.js +46 -0
|
@@ -0,0 +1,374 @@
|
|
|
1
|
+
import { screenBuffer, createColorAttr, colors, drawBox, truncate, borders } from '../terminal-kit-base.js';
|
|
2
|
+
const TOOL_LABELS = {
|
|
3
|
+
read_file: { verb: 'Reading file', emoji: '📖' },
|
|
4
|
+
write_file: { verb: 'Writing file', emoji: '✍️' },
|
|
5
|
+
edit_file: { verb: 'Editing file', emoji: '✏️' },
|
|
6
|
+
list_directory: { verb: 'Listing directory', emoji: '📁' },
|
|
7
|
+
execute_command: { verb: 'Executing command', emoji: '⚡' },
|
|
8
|
+
grep_search: { verb: 'Searching files', emoji: '🔍' },
|
|
9
|
+
};
|
|
10
|
+
function getToolInfo(toolName) {
|
|
11
|
+
return TOOL_LABELS[toolName] || { verb: 'Executing', emoji: '🔧' };
|
|
12
|
+
}
|
|
13
|
+
// STATE 1: EXECUTING
|
|
14
|
+
function renderExecutingState(x, y, width, toolName) {
|
|
15
|
+
const toolInfo = getToolInfo(toolName);
|
|
16
|
+
const height = 3; // Border + content + border
|
|
17
|
+
// Border: Rounded, Dark Blue (#003b59)
|
|
18
|
+
drawBox({
|
|
19
|
+
x,
|
|
20
|
+
y,
|
|
21
|
+
width,
|
|
22
|
+
height,
|
|
23
|
+
borderStyle: 'rounded',
|
|
24
|
+
borderColor: colors.border,
|
|
25
|
+
});
|
|
26
|
+
// Content: ⏳ {emoji} {verb}...
|
|
27
|
+
const text = `⏳ ${toolInfo.emoji} ${toolInfo.verb}...`;
|
|
28
|
+
const attr = createColorAttr(colors.primary, true); // Cyan, bold
|
|
29
|
+
screenBuffer.put({ x: x + 2, y: y + 1, attr }, text);
|
|
30
|
+
// Return height + bottom margin (1 line)
|
|
31
|
+
return height + 1;
|
|
32
|
+
}
|
|
33
|
+
// STATE 2: ERROR
|
|
34
|
+
function renderErrorState(x, y, width, toolName, error) {
|
|
35
|
+
const toolInfo = getToolInfo(toolName);
|
|
36
|
+
let height = 3; // Minimum: border + header + border
|
|
37
|
+
if (error) {
|
|
38
|
+
const errorLines = Math.ceil(Math.min(500, error.length) / (width - 6));
|
|
39
|
+
height += errorLines;
|
|
40
|
+
}
|
|
41
|
+
// Border: Rounded, Red (#ff3366)
|
|
42
|
+
drawBox({
|
|
43
|
+
x,
|
|
44
|
+
y,
|
|
45
|
+
width,
|
|
46
|
+
height,
|
|
47
|
+
borderStyle: 'rounded',
|
|
48
|
+
borderColor: colors.error,
|
|
49
|
+
});
|
|
50
|
+
// Header: ✗ {emoji} {verb} failed
|
|
51
|
+
const headerText = `✗ ${toolInfo.emoji} ${toolInfo.verb} failed`;
|
|
52
|
+
const headerAttr = createColorAttr(colors.error, true); // Red, bold
|
|
53
|
+
screenBuffer.put({ x: x + 2, y: y + 1, attr: headerAttr }, headerText);
|
|
54
|
+
// Error message (if present, max 500 chars, padding left 2)
|
|
55
|
+
if (error) {
|
|
56
|
+
const truncatedError = error.slice(0, 500) + (error.length > 500 ? '...' : '');
|
|
57
|
+
const errorAttr = createColorAttr(colors.error); // Red
|
|
58
|
+
let currentY = y + 3; // After empty line
|
|
59
|
+
const errorWidth = width - 6; // Padding
|
|
60
|
+
const words = truncatedError.split(' ');
|
|
61
|
+
let currentLine = '';
|
|
62
|
+
for (const word of words) {
|
|
63
|
+
if (currentLine.length + word.length + 1 <= errorWidth) {
|
|
64
|
+
currentLine += (currentLine ? ' ' : '') + word;
|
|
65
|
+
}
|
|
66
|
+
else {
|
|
67
|
+
if (currentLine) {
|
|
68
|
+
screenBuffer.put({ x: x + 4, y: currentY, attr: errorAttr }, currentLine);
|
|
69
|
+
currentY++;
|
|
70
|
+
}
|
|
71
|
+
currentLine = word;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
if (currentLine) {
|
|
75
|
+
screenBuffer.put({ x: x + 4, y: currentY, attr: errorAttr }, currentLine);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
// Return height + bottom margin
|
|
79
|
+
return height + 1;
|
|
80
|
+
}
|
|
81
|
+
// STATE 3: COMPLETED (General)
|
|
82
|
+
function renderCompletedGeneral(x, y, width, toolName, result) {
|
|
83
|
+
const toolInfo = getToolInfo(toolName);
|
|
84
|
+
let height = 3; // Minimum: border + header + border
|
|
85
|
+
if (result && result.length < 300) {
|
|
86
|
+
const resultLines = Math.ceil(result.length / (width - 6));
|
|
87
|
+
height += resultLines;
|
|
88
|
+
}
|
|
89
|
+
// Border: Rounded, Cyan (#00ccff)
|
|
90
|
+
drawBox({
|
|
91
|
+
x,
|
|
92
|
+
y,
|
|
93
|
+
width,
|
|
94
|
+
height,
|
|
95
|
+
borderStyle: 'rounded',
|
|
96
|
+
borderColor: colors.primary,
|
|
97
|
+
});
|
|
98
|
+
// Header: ✓ {emoji} {verb}
|
|
99
|
+
const headerText = `✓ ${toolInfo.emoji} ${toolInfo.verb}`;
|
|
100
|
+
const headerAttr = createColorAttr(colors.success, true); // Green, bold
|
|
101
|
+
screenBuffer.put({ x: x + 2, y: y + 1, attr: headerAttr }, headerText);
|
|
102
|
+
// Result (if < 300 chars, padding left 2)
|
|
103
|
+
if (result && result.length < 300) {
|
|
104
|
+
const resultAttr = createColorAttr(colors.lightGray); // #aaaaaa
|
|
105
|
+
let currentY = y + 3; // After empty line
|
|
106
|
+
const resultWidth = width - 6;
|
|
107
|
+
const words = result.split(' ');
|
|
108
|
+
let currentLine = '';
|
|
109
|
+
for (const word of words) {
|
|
110
|
+
if (currentLine.length + word.length + 1 <= resultWidth) {
|
|
111
|
+
currentLine += (currentLine ? ' ' : '') + word;
|
|
112
|
+
}
|
|
113
|
+
else {
|
|
114
|
+
if (currentLine) {
|
|
115
|
+
screenBuffer.put({ x: x + 4, y: currentY, attr: resultAttr }, currentLine);
|
|
116
|
+
currentY++;
|
|
117
|
+
}
|
|
118
|
+
currentLine = word;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
if (currentLine) {
|
|
122
|
+
screenBuffer.put({ x: x + 4, y: currentY, attr: resultAttr }, currentLine);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
return height + 1;
|
|
126
|
+
}
|
|
127
|
+
// STATE 3a: COMPLETED (execute_command)
|
|
128
|
+
function renderCompletedExecuteCommand(x, y, width, toolArgs, result) {
|
|
129
|
+
const { command } = toolArgs;
|
|
130
|
+
let height = 3; // Minimum
|
|
131
|
+
if (result) {
|
|
132
|
+
const resultLines = Math.min(Math.ceil(result.length / (width - 8)), 20);
|
|
133
|
+
height += resultLines + 2; // + inner box borders
|
|
134
|
+
}
|
|
135
|
+
// Border: Rounded, Green (#00cc66)
|
|
136
|
+
drawBox({
|
|
137
|
+
x,
|
|
138
|
+
y,
|
|
139
|
+
width,
|
|
140
|
+
height,
|
|
141
|
+
borderStyle: 'rounded',
|
|
142
|
+
borderColor: colors.success,
|
|
143
|
+
});
|
|
144
|
+
// Header: ✓ ⚡ {command}
|
|
145
|
+
const headerText = `✓ ⚡ `;
|
|
146
|
+
const headerAttr = createColorAttr(colors.success, true); // Green, bold
|
|
147
|
+
const commandAttr = createColorAttr(colors.primary); // Cyan
|
|
148
|
+
screenBuffer.put({ x: x + 2, y: y + 1, attr: headerAttr }, headerText);
|
|
149
|
+
screenBuffer.put({
|
|
150
|
+
x: x + 2 + headerText.length,
|
|
151
|
+
y: y + 1,
|
|
152
|
+
attr: commandAttr
|
|
153
|
+
}, truncate(command, width - 8));
|
|
154
|
+
// Inner box with result (if present)
|
|
155
|
+
if (result) {
|
|
156
|
+
const innerY = y + 3;
|
|
157
|
+
const innerWidth = width - 4;
|
|
158
|
+
const innerHeight = height - 4;
|
|
159
|
+
// Draw single-line border
|
|
160
|
+
const border = borders.single;
|
|
161
|
+
const borderAttr = createColorAttr(colors.dimmed); // Gray
|
|
162
|
+
// Top border
|
|
163
|
+
screenBuffer.put({
|
|
164
|
+
x: x + 2,
|
|
165
|
+
y: innerY,
|
|
166
|
+
attr: borderAttr,
|
|
167
|
+
}, border.topLeft + border.horizontal.repeat(innerWidth - 2) + border.topRight);
|
|
168
|
+
// Content
|
|
169
|
+
const resultAttr = createColorAttr(colors.lightGray); // #aaaaaa
|
|
170
|
+
const truncatedResult = result.slice(0, 1000) + (result.length > 1000 ? '\n...(truncated)' : '');
|
|
171
|
+
const resultLines = truncatedResult.split('\n').slice(0, innerHeight - 2);
|
|
172
|
+
for (let i = 0; i < resultLines.length; i++) {
|
|
173
|
+
const line = resultLines[i];
|
|
174
|
+
screenBuffer.put({ x: x + 3, y: innerY + 1 + i, attr: borderAttr }, border.vertical);
|
|
175
|
+
screenBuffer.put({
|
|
176
|
+
x: x + 5,
|
|
177
|
+
y: innerY + 1 + i,
|
|
178
|
+
attr: resultAttr
|
|
179
|
+
}, truncate(line, innerWidth - 4));
|
|
180
|
+
screenBuffer.put({
|
|
181
|
+
x: x + innerWidth + 1,
|
|
182
|
+
y: innerY + 1 + i,
|
|
183
|
+
attr: borderAttr
|
|
184
|
+
}, border.vertical);
|
|
185
|
+
}
|
|
186
|
+
// Bottom border
|
|
187
|
+
screenBuffer.put({
|
|
188
|
+
x: x + 2,
|
|
189
|
+
y: innerY + innerHeight - 1,
|
|
190
|
+
attr: borderAttr,
|
|
191
|
+
}, border.bottomLeft + border.horizontal.repeat(innerWidth - 2) + border.bottomRight);
|
|
192
|
+
}
|
|
193
|
+
return height + 1;
|
|
194
|
+
}
|
|
195
|
+
// STATE 3b: COMPLETED (read_file)
|
|
196
|
+
function renderCompletedReadFile(x, y, width, toolArgs) {
|
|
197
|
+
const { file_path, start_line, end_line } = toolArgs;
|
|
198
|
+
const lineInfo = start_line && end_line
|
|
199
|
+
? `lines ${start_line}-${end_line}`
|
|
200
|
+
: 'entire file';
|
|
201
|
+
const height = 3;
|
|
202
|
+
// Border: Rounded, Cyan (#00ccff)
|
|
203
|
+
drawBox({
|
|
204
|
+
x,
|
|
205
|
+
y,
|
|
206
|
+
width,
|
|
207
|
+
height,
|
|
208
|
+
borderStyle: 'rounded',
|
|
209
|
+
borderColor: colors.primary,
|
|
210
|
+
});
|
|
211
|
+
// Content: ✓ 📖 Read {lineInfo} from {file_path}
|
|
212
|
+
const successAttr = createColorAttr(colors.success, true); // Green, bold
|
|
213
|
+
const cyanAttr = createColorAttr(colors.primary); // Cyan
|
|
214
|
+
const text = `✓ 📖 Read ${lineInfo} from `;
|
|
215
|
+
screenBuffer.put({ x: x + 2, y: y + 1, attr: successAttr }, text);
|
|
216
|
+
screenBuffer.put({
|
|
217
|
+
x: x + 2 + text.length,
|
|
218
|
+
y: y + 1,
|
|
219
|
+
attr: cyanAttr
|
|
220
|
+
}, truncate(file_path, width - text.length - 6));
|
|
221
|
+
return height + 1;
|
|
222
|
+
}
|
|
223
|
+
// STATE 3c: COMPLETED (write_file)
|
|
224
|
+
function renderCompletedWriteFile(x, y, width, toolArgs) {
|
|
225
|
+
const { file_path, content } = toolArgs;
|
|
226
|
+
const lines = content ? content.split('\n').length : 0;
|
|
227
|
+
let height = 3;
|
|
228
|
+
// Show preview if content < 500 chars
|
|
229
|
+
if (content && content.length < 500) {
|
|
230
|
+
height += Math.ceil(content.length / (width - 8)) + 2;
|
|
231
|
+
}
|
|
232
|
+
// Border: Rounded, Cyan (#00ccff)
|
|
233
|
+
drawBox({
|
|
234
|
+
x,
|
|
235
|
+
y,
|
|
236
|
+
width,
|
|
237
|
+
height,
|
|
238
|
+
borderStyle: 'rounded',
|
|
239
|
+
borderColor: colors.primary,
|
|
240
|
+
});
|
|
241
|
+
// Header: ✓ ✍️ Wrote to {file_path} ({lines} lines)
|
|
242
|
+
const successAttr = createColorAttr(colors.success, true); // Green, bold
|
|
243
|
+
const cyanAttr = createColorAttr(colors.primary); // Cyan
|
|
244
|
+
const dimmedAttr = createColorAttr(colors.dimmed); // Gray
|
|
245
|
+
const text = `✓ ✍️ Wrote to `;
|
|
246
|
+
screenBuffer.put({ x: x + 2, y: y + 1, attr: successAttr }, text);
|
|
247
|
+
screenBuffer.put({
|
|
248
|
+
x: x + 2 + text.length,
|
|
249
|
+
y: y + 1,
|
|
250
|
+
attr: cyanAttr
|
|
251
|
+
}, truncate(file_path, width - text.length - 15));
|
|
252
|
+
screenBuffer.put({
|
|
253
|
+
x: x + 2 + text.length + file_path.length,
|
|
254
|
+
y: y + 1,
|
|
255
|
+
attr: dimmedAttr
|
|
256
|
+
}, ` (${lines} lines)`);
|
|
257
|
+
// Preview if small
|
|
258
|
+
if (content && content.length < 500) {
|
|
259
|
+
// Inner box
|
|
260
|
+
const innerY = y + 3;
|
|
261
|
+
const innerWidth = width - 4;
|
|
262
|
+
const border = borders.single;
|
|
263
|
+
const borderAttr = createColorAttr(colors.dimmed);
|
|
264
|
+
const contentAttr = createColorAttr(colors.lightGray);
|
|
265
|
+
// Top border
|
|
266
|
+
screenBuffer.put({
|
|
267
|
+
x: x + 2,
|
|
268
|
+
y: innerY,
|
|
269
|
+
attr: borderAttr,
|
|
270
|
+
}, border.topLeft + border.horizontal.repeat(innerWidth - 2) + border.topRight);
|
|
271
|
+
// Content lines
|
|
272
|
+
const contentLines = content.split('\n').slice(0, 10);
|
|
273
|
+
for (let i = 0; i < contentLines.length; i++) {
|
|
274
|
+
screenBuffer.put({ x: x + 3, y: innerY + 1 + i, attr: borderAttr }, border.vertical);
|
|
275
|
+
screenBuffer.put({
|
|
276
|
+
x: x + 5,
|
|
277
|
+
y: innerY + 1 + i,
|
|
278
|
+
attr: contentAttr
|
|
279
|
+
}, truncate(contentLines[i], innerWidth - 4));
|
|
280
|
+
screenBuffer.put({
|
|
281
|
+
x: x + innerWidth + 1,
|
|
282
|
+
y: innerY + 1 + i,
|
|
283
|
+
attr: borderAttr
|
|
284
|
+
}, border.vertical);
|
|
285
|
+
}
|
|
286
|
+
// Bottom border
|
|
287
|
+
const bottomY = innerY + contentLines.length + 1;
|
|
288
|
+
screenBuffer.put({
|
|
289
|
+
x: x + 2,
|
|
290
|
+
y: bottomY,
|
|
291
|
+
attr: borderAttr,
|
|
292
|
+
}, border.bottomLeft + border.horizontal.repeat(innerWidth - 2) + border.bottomRight);
|
|
293
|
+
}
|
|
294
|
+
return height + 1;
|
|
295
|
+
}
|
|
296
|
+
// STATE 3d: COMPLETED (edit_file)
|
|
297
|
+
function renderCompletedEditFile(x, y, width, toolArgs) {
|
|
298
|
+
const { file_path, search_pattern, replacement } = toolArgs;
|
|
299
|
+
let height = 3;
|
|
300
|
+
if (search_pattern && replacement) {
|
|
301
|
+
height += 2; // For - and + lines
|
|
302
|
+
}
|
|
303
|
+
// Border: Rounded, Cyan (#00ccff)
|
|
304
|
+
drawBox({
|
|
305
|
+
x,
|
|
306
|
+
y,
|
|
307
|
+
width,
|
|
308
|
+
height,
|
|
309
|
+
borderStyle: 'rounded',
|
|
310
|
+
borderColor: colors.primary,
|
|
311
|
+
});
|
|
312
|
+
// Header: ✓ ✏️ Edited {file_path}
|
|
313
|
+
const successAttr = createColorAttr(colors.success, true); // Green, bold
|
|
314
|
+
const cyanAttr = createColorAttr(colors.primary); // Cyan
|
|
315
|
+
const text = `✓ ✏️ Edited `;
|
|
316
|
+
screenBuffer.put({ x: x + 2, y: y + 1, attr: successAttr }, text);
|
|
317
|
+
screenBuffer.put({
|
|
318
|
+
x: x + 2 + text.length,
|
|
319
|
+
y: y + 1,
|
|
320
|
+
attr: cyanAttr
|
|
321
|
+
}, truncate(file_path, width - text.length - 6));
|
|
322
|
+
// Show diff preview
|
|
323
|
+
if (search_pattern && replacement) {
|
|
324
|
+
const redAttr = createColorAttr(colors.lightRed); // #ff6666
|
|
325
|
+
const greenAttr = createColorAttr(colors.lightGreen); // #66ff66
|
|
326
|
+
const searchFirstLine = search_pattern.split('\n')[0] + (search_pattern.includes('\n') ? '...' : '');
|
|
327
|
+
const replaceFirstLine = replacement.split('\n')[0] + (replacement.includes('\n') ? '...' : '');
|
|
328
|
+
screenBuffer.put({
|
|
329
|
+
x: x + 2,
|
|
330
|
+
y: y + 3,
|
|
331
|
+
attr: redAttr
|
|
332
|
+
}, `- ${truncate(searchFirstLine, width - 6)}`);
|
|
333
|
+
screenBuffer.put({
|
|
334
|
+
x: x + 2,
|
|
335
|
+
y: y + 4,
|
|
336
|
+
attr: greenAttr
|
|
337
|
+
}, `+ ${truncate(replaceFirstLine, width - 6)}`);
|
|
338
|
+
}
|
|
339
|
+
return height + 1;
|
|
340
|
+
}
|
|
341
|
+
// Main render function
|
|
342
|
+
export function renderToolExecutionMessage(message, x, y, width) {
|
|
343
|
+
if (!message.toolExecution) {
|
|
344
|
+
return 0;
|
|
345
|
+
}
|
|
346
|
+
const { toolName, status, result, error, arguments: toolArgs } = message.toolExecution;
|
|
347
|
+
switch (status) {
|
|
348
|
+
case 'executing':
|
|
349
|
+
return renderExecutingState(x, y, width, toolName);
|
|
350
|
+
case 'error':
|
|
351
|
+
return renderErrorState(x, y, width, toolName, error);
|
|
352
|
+
case 'completed':
|
|
353
|
+
// Specific rendering based on tool type
|
|
354
|
+
if (toolName === 'execute_command' && toolArgs) {
|
|
355
|
+
return renderCompletedExecuteCommand(x, y, width, toolArgs, result);
|
|
356
|
+
}
|
|
357
|
+
else if (toolName === 'read_file' && toolArgs) {
|
|
358
|
+
return renderCompletedReadFile(x, y, width, toolArgs);
|
|
359
|
+
}
|
|
360
|
+
else if (toolName === 'write_file' && toolArgs) {
|
|
361
|
+
return renderCompletedWriteFile(x, y, width, toolArgs);
|
|
362
|
+
}
|
|
363
|
+
else if (toolName === 'edit_file' && toolArgs) {
|
|
364
|
+
return renderCompletedEditFile(x, y, width, toolArgs);
|
|
365
|
+
}
|
|
366
|
+
else {
|
|
367
|
+
// General completed rendering for other tools
|
|
368
|
+
return renderCompletedGeneral(x, y, width, toolName, result);
|
|
369
|
+
}
|
|
370
|
+
default:
|
|
371
|
+
return 0;
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
//# sourceMappingURL=tool-execution.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool-execution.js","sourceRoot":"","sources":["../../../src/ui/components/tool-execution.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAS5G,MAAM,WAAW,GAA6B;IAC5C,SAAS,EAAE,EAAE,IAAI,EAAE,cAAc,EAAE,KAAK,EAAE,IAAI,EAAE;IAChD,UAAU,EAAE,EAAE,IAAI,EAAE,cAAc,EAAE,KAAK,EAAE,IAAI,EAAE;IACjD,SAAS,EAAE,EAAE,IAAI,EAAE,cAAc,EAAE,KAAK,EAAE,IAAI,EAAE;IAChD,cAAc,EAAE,EAAE,IAAI,EAAE,mBAAmB,EAAE,KAAK,EAAE,IAAI,EAAE;IAC1D,eAAe,EAAE,EAAE,IAAI,EAAE,mBAAmB,EAAE,KAAK,EAAE,GAAG,EAAE;IAC1D,WAAW,EAAE,EAAE,IAAI,EAAE,iBAAiB,EAAE,KAAK,EAAE,IAAI,EAAE;CACtD,CAAC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AI,QAAQ,KAAK,WAAW,IAAI,QAAQ,EAAE,CAAC;gBAChD,OAAO,uBAAuB,CAAC,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC;YACxD,CAAC;iBAAM,IAAI,QAAQ,KAAK,YAAY,IAAI,QAAQ,EAAE,CAAC;gBACjD,OAAO,wBAAwB,CAAC,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC;YACzD,CAAC;iBAAM,IAAI,QAAQ,KAAK,WAAW,IAAI,QAAQ,EAAE,CAAC;gBAChD,OAAO,uBAAuB,CAAC,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC;YACxD,CAAC;iBAAM,CAAC;gBACN,8CAA8C;gBAC9C,OAAO,sBAAsB,CAAC,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC;YAC/D,CAAC;QAEH;YACE,OAAO,CAAC,CAAC;IACb,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface ToolResultOptions {
|
|
2
|
+
x: number;
|
|
3
|
+
y: number;
|
|
4
|
+
width: number;
|
|
5
|
+
toolName: string;
|
|
6
|
+
result: string;
|
|
7
|
+
success: boolean;
|
|
8
|
+
duration?: number;
|
|
9
|
+
}
|
|
10
|
+
export declare function renderToolResult(options: ToolResultOptions): number;
|
|
11
|
+
//# sourceMappingURL=tool-result.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool-result.d.ts","sourceRoot":"","sources":["../../../src/ui/components/tool-result.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,iBAAiB;IAChC,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAGD,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,iBAAiB,GAAG,MAAM,CAkEnE"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { screenBuffer, createColorAttr, colors, drawBox } from '../terminal-kit-base.js';
|
|
2
|
+
// Render tool result
|
|
3
|
+
export function renderToolResult(options) {
|
|
4
|
+
const { x, y, width, toolName, result, success, duration } = options;
|
|
5
|
+
// Calculate height based on result length
|
|
6
|
+
const resultLines = Math.ceil(result.length / (width - 6));
|
|
7
|
+
const height = 3 + resultLines; // Border + header + result lines + border
|
|
8
|
+
// Border color based on success
|
|
9
|
+
const borderColor = success ? colors.success : colors.error; // Green or Red
|
|
10
|
+
drawBox({
|
|
11
|
+
x,
|
|
12
|
+
y,
|
|
13
|
+
width,
|
|
14
|
+
height,
|
|
15
|
+
borderStyle: 'rounded',
|
|
16
|
+
borderColor,
|
|
17
|
+
});
|
|
18
|
+
let currentY = y + 1;
|
|
19
|
+
// Header: {✓|✗} {toolName} ({duration}ms)
|
|
20
|
+
const icon = success ? '✓' : '✗';
|
|
21
|
+
const headerAttr = createColorAttr(borderColor, true); // Bold
|
|
22
|
+
const durationAttr = createColorAttr(colors.dimmed); // Gray
|
|
23
|
+
let headerText = `${icon} ${toolName}`;
|
|
24
|
+
screenBuffer.put({ x: x + 2, y: currentY, attr: headerAttr }, headerText);
|
|
25
|
+
if (duration !== undefined) {
|
|
26
|
+
const durationText = ` (${duration}ms)`;
|
|
27
|
+
screenBuffer.put({
|
|
28
|
+
x: x + 2 + headerText.length,
|
|
29
|
+
y: currentY,
|
|
30
|
+
attr: durationAttr
|
|
31
|
+
}, durationText);
|
|
32
|
+
}
|
|
33
|
+
currentY += 2; // Header + empty line
|
|
34
|
+
// Result text (white)
|
|
35
|
+
const resultAttr = createColorAttr(colors.text);
|
|
36
|
+
const maxWidth = width - 6;
|
|
37
|
+
// Word wrap result
|
|
38
|
+
const words = result.split(' ');
|
|
39
|
+
let currentLine = '';
|
|
40
|
+
for (const word of words) {
|
|
41
|
+
if (currentLine.length + word.length + 1 <= maxWidth) {
|
|
42
|
+
currentLine += (currentLine ? ' ' : '') + word;
|
|
43
|
+
}
|
|
44
|
+
else {
|
|
45
|
+
if (currentLine) {
|
|
46
|
+
screenBuffer.put({ x: x + 2, y: currentY, attr: resultAttr }, currentLine);
|
|
47
|
+
currentY++;
|
|
48
|
+
}
|
|
49
|
+
currentLine = word;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
if (currentLine) {
|
|
53
|
+
screenBuffer.put({ x: x + 2, y: currentY, attr: resultAttr }, currentLine);
|
|
54
|
+
}
|
|
55
|
+
// Return height + bottom margin
|
|
56
|
+
return height + 1;
|
|
57
|
+
}
|
|
58
|
+
//# sourceMappingURL=tool-result.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool-result.js","sourceRoot":"","sources":["../../../src/ui/components/tool-result.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAYzF,qBAAqB;AACrB,MAAM,UAAU,gBAAgB,CAAC,OAA0B;IACzD,MAAM,EAAE,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAC;IAErE,0CAA0C;IAC1C,MAAM,WAAW,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC;IAC3D,MAAM,MAAM,GAAG,CAAC,GAAG,WAAW,CAAC,CAAC,0CAA0C;IAE1E,gCAAgC;IAChC,MAAM,WAAW,GAAG,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,eAAe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AK,EAAE,CAAC;QACzB,IAAI,WAAW,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,GAAG,CAAC,IAAI,QAAQ,EAAE,CAAC;YACrD,WAAW,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC;QACjD,CAAC;aAAM,CAAC;YACN,IAAI,WAAW,EAAE,CAAC;gBAChB,YAAY,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,UAAU,EAAE,EAAE,WAAW,CAAC,CAAC;gBAC3E,QAAQ,EAAE,CAAC;YACb,CAAC;YACD,WAAW,GAAG,IAAI,CAAC;QACrB,CAAC;IACH,CAAC;IAED,IAAI,WAAW,EAAE,CAAC;QAChB,YAAY,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,UAAU,EAAE,EAAE,WAAW,CAAC,CAAC;IAC7E,CAAC;IAED,gCAAgC;IAChC,OAAO,MAAM,GAAG,CAAC,CAAC;AACpB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"welcome-banner.d.ts","sourceRoot":"","sources":["../../../src/ui/components/welcome-banner.ts"],"names":[],"mappings":"AAqBA,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAgChE;AAED,wBAAgB,kBAAkB,SAEjC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { ensureScreenBuffer, createColorAttr, colors } from '../terminal-kit-base.js';
|
|
2
|
+
// ASCII art from UI_ELEMENTS_REFERENCE.md (exact)
|
|
3
|
+
const BANNER = ` ██████╗███████╗███╗ ██╗████████╗ █████╗ ██╗ ██╗██████╗ ██╗ ██╗███████╗
|
|
4
|
+
██╔════╝██╔════╝████╗ ██║╚══██╔══╝██╔══██╗██║ ██║██╔══██╗██║ ██║██╔════╝
|
|
5
|
+
██║ █████╗ ██╔██╗ ██║ ██║ ███████║██║ ██║██████╔╝██║ ██║███████╗
|
|
6
|
+
██║ ██╔══╝ ██║╚██╗██║ ██║ ██╔══██║██║ ██║██╔══██╗██║ ██║╚════██║
|
|
7
|
+
╚██████╗███████╗██║ ╚████║ ██║ ██║ ██║╚██████╔╝██║ ██║╚██████╔╝███████║
|
|
8
|
+
╚═════╝╚══════╝╚═╝ ╚═══╝ ╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝ ╚══════╝
|
|
9
|
+
|
|
10
|
+
██████╗██╗ ██╗
|
|
11
|
+
██╔════╝██║ ██║
|
|
12
|
+
██║ ██║ ██║
|
|
13
|
+
██║ ██║ ██║
|
|
14
|
+
╚██████╗███████╗██║
|
|
15
|
+
╚═════╝╚══════╝╚═╝`;
|
|
16
|
+
const HELP_TEXT = ' Type /help for commands';
|
|
17
|
+
let hasRendered = false; // Ensure banner only renders once
|
|
18
|
+
export function renderWelcomeBanner(x, y) {
|
|
19
|
+
const lines = BANNER.split('\n');
|
|
20
|
+
const bannerHeight = lines.length + 2; // banner + help text + margin
|
|
21
|
+
// Only actually render once
|
|
22
|
+
if (hasRendered) {
|
|
23
|
+
return y + bannerHeight; // Return where next content should start
|
|
24
|
+
}
|
|
25
|
+
hasRendered = true;
|
|
26
|
+
const cyanAttr = createColorAttr(colors.primary); // #00ccff
|
|
27
|
+
const dimmedAttr = createColorAttr(colors.dimmed, false, true); // #666666, dimmed
|
|
28
|
+
const buffer = ensureScreenBuffer();
|
|
29
|
+
let currentY = y;
|
|
30
|
+
// Render ASCII art banner in cyan
|
|
31
|
+
for (const line of lines) {
|
|
32
|
+
buffer.put({ x, y: currentY, attr: cyanAttr }, line);
|
|
33
|
+
currentY++;
|
|
34
|
+
}
|
|
35
|
+
// Render help text (dimmed gray)
|
|
36
|
+
buffer.put({ x, y: currentY, attr: dimmedAttr }, HELP_TEXT);
|
|
37
|
+
currentY++;
|
|
38
|
+
// Add bottom margin (1 line)
|
|
39
|
+
currentY++;
|
|
40
|
+
// Return position after banner
|
|
41
|
+
return currentY;
|
|
42
|
+
}
|
|
43
|
+
export function resetWelcomeBanner() {
|
|
44
|
+
hasRendered = false;
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=welcome-banner.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"welcome-banner.js","sourceRoot":"","sources":["../../../src/ui/components/welcome-banner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAEtF,kDAAkD;AAClD,MAAM,MAAM,GAAG;;;;;;;;;;;;0BAYW,CAAC;AAE3B,MAAM,SAAS,GAAG,0BAA0B,CAAC;AAE7C,IAAI,WAAW,GAAG,KAAK,CAAC,CAAC,kCAAkC;AAE3D,MAAM,UAAU,mBAAmB,CAAC,CAAS,EAAE,CAAS;IACtD,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IACjC,MAAM,YAAY,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,8BAA8B;IAErE,4BAA4B;IAC5B,IAAI,WAAW,EAAE,CAAC;QAChB,OAAO,CAAC,GAAG,YAAY,CAAC,CAAC,yCAAyC;IACpE,CAAC;IAED,WAAW,GAAG,IAAI,CAAC;IAEnB,MAAM,QAAQ,GAAG,eAAe,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,UAAU;IAC5D,MAAM,UAAU,GAAG,eAAe,CAAC,MAAM,CAAC,MAAM,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,kBAAkB;IAClF,MAAM,MAAM,GAAG,kBAAkB,EAAE,CAAC;IAEpC,IAAI,QAAQ,GAAG,CAAC,CAAC;IAEjB,kCAAkC;IAClC,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,IAAI,CAAC,CAAC;QACrD,QAAQ,EAAE,CAAC;IACb,CAAC;IAED,iCAAiC;IACjC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,UAAU,EAAE,EAAE,SAAS,CAAC,CAAC;IAC5D,QAAQ,EAAE,CAAC;IAEX,6BAA6B;IAC7B,QAAQ,EAAE,CAAC;IAEX,+BAA+B;IAC/B,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED,MAAM,UAAU,kBAAkB;IAChC,WAAW,GAAG,KAAK,CAAC;AACtB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { DisplayItem } from '../DisplayHistory.js';
|
|
2
|
+
/**
|
|
3
|
+
* React hook for managing display history with proper state updates
|
|
4
|
+
*/
|
|
5
|
+
export declare function useDisplayHistory(): {
|
|
6
|
+
items: DisplayItem[];
|
|
7
|
+
addItem: (item: Omit<DisplayItem, "id" | "timestamp">) => string;
|
|
8
|
+
updateItem: (id: string, updates: Partial<Omit<DisplayItem, "id" | "timestamp">>) => boolean;
|
|
9
|
+
removeItem: (id: string) => boolean;
|
|
10
|
+
clear: () => void;
|
|
11
|
+
getRecentItems: (count: number) => DisplayItem[];
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=useDisplayHistory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useDisplayHistory.d.ts","sourceRoot":"","sources":["../../../src/ui/hooks/useDisplayHistory.ts"],"names":[],"mappings":"AACA,OAAO,EAAkB,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAEnE;;GAEG;AACH,wBAAgB,iBAAiB;;oBAII,IAAI,CAAC,WAAW,EAAE,IAAI,GAAG,WAAW,CAAC,KAAG,MAAM;qBAM7C,MAAM,WAAW,OAAO,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,GAAG,WAAW,CAAC,CAAC,KAAG,OAAO;qBAQzE,MAAM,KAAG,OAAO;;4BAaT,MAAM,KAAG,WAAW,EAAE;EAalE"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { useState, useCallback, useRef, useMemo } from 'react';
|
|
2
|
+
import { DisplayHistory } from '../DisplayHistory.js';
|
|
3
|
+
/**
|
|
4
|
+
* React hook for managing display history with proper state updates
|
|
5
|
+
*/
|
|
6
|
+
export function useDisplayHistory() {
|
|
7
|
+
const historyRef = useRef(new DisplayHistory());
|
|
8
|
+
const [items, setItems] = useState([]);
|
|
9
|
+
const addItem = useCallback((item) => {
|
|
10
|
+
const id = historyRef.current.addItem(item);
|
|
11
|
+
setItems(historyRef.current.getItems());
|
|
12
|
+
return id;
|
|
13
|
+
}, []);
|
|
14
|
+
const updateItem = useCallback((id, updates) => {
|
|
15
|
+
const success = historyRef.current.updateItem(id, updates);
|
|
16
|
+
if (success) {
|
|
17
|
+
setItems(historyRef.current.getItems());
|
|
18
|
+
}
|
|
19
|
+
return success;
|
|
20
|
+
}, []);
|
|
21
|
+
const removeItem = useCallback((id) => {
|
|
22
|
+
const success = historyRef.current.removeItem(id);
|
|
23
|
+
if (success) {
|
|
24
|
+
setItems(historyRef.current.getItems());
|
|
25
|
+
}
|
|
26
|
+
return success;
|
|
27
|
+
}, []);
|
|
28
|
+
const clear = useCallback(() => {
|
|
29
|
+
historyRef.current.clear();
|
|
30
|
+
setItems([]);
|
|
31
|
+
}, []);
|
|
32
|
+
const getRecentItems = useCallback((count) => {
|
|
33
|
+
return historyRef.current.getRecentItems(count);
|
|
34
|
+
}, []);
|
|
35
|
+
// Return a stable object reference using useMemo
|
|
36
|
+
return useMemo(() => ({
|
|
37
|
+
items,
|
|
38
|
+
addItem,
|
|
39
|
+
updateItem,
|
|
40
|
+
removeItem,
|
|
41
|
+
clear,
|
|
42
|
+
getRecentItems,
|
|
43
|
+
}), [items, addItem, updateItem, removeItem, clear, getRecentItems]);
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=useDisplayHistory.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useDisplayHistory.js","sourceRoot":"","sources":["../../../src/ui/hooks/useDisplayHistory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAC/D,OAAO,EAAE,cAAc,EAAe,MAAM,sBAAsB,CAAC;AAEnE;;GAEG;AACH,MAAM,UAAU,iBAAiB;IAC/B,MAAM,UAAU,GAAG,MAAM,CAAC,IAAI,cAAc,EAAE,CAAC,CAAC;IAChD,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAgB,EAAE,CAAC,CAAC;IAEtD,MAAM,OAAO,GAAG,WAAW,CAAC,CAAC,IAA2C,EAAU,EAAE;QAClF,MAAM,EAAE,GAAG,UAAU,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAC5C,QAAQ,CAAC,UAAU,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;QACxC,OAAO,EAAE,CAAC;IACZ,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,MAAM,UAAU,GAAG,WAAW,CAAC,CAAC,EAAU,EAAE,OAAuD,EAAW,EAAE;QAC9G,MAAM,OAAO,GAAG,UAAU,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC;QAC3D,IAAI,OAAO,EAAE,CAAC;YACZ,QAAQ,CAAC,UAAU,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;QAC1C,CAAC;QACD,OAAO,OAAO,CAAC;IACjB,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,MAAM,UAAU,GAAG,WAAW,C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