From 448e9af18824fb3d67b19b434fba6ccadee1b31f Mon Sep 17 00:00:00 2001 From: Nate Date: Tue, 15 Jul 2025 23:00:17 -0700 Subject: [PATCH] update version to 1.3.2 and improve terminal command output display --- package-lock.json | 4 ++-- src/ui/ToolResultSummary.tsx | 35 +++++++++++++++++++++++++++++++---- 2 files changed, 33 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 94c93ead0..ffc1324a7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@continuedev/cli", - "version": "1.3.1", + "version": "1.3.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@continuedev/cli", - "version": "1.3.1", + "version": "1.3.2", "license": "Apache-2.0", "dependencies": { "@continuedev/config-yaml": "^1.0.96", diff --git a/src/ui/ToolResultSummary.tsx b/src/ui/ToolResultSummary.tsx index 5229e140e..9b77650ad 100644 --- a/src/ui/ToolResultSummary.tsx +++ b/src/ui/ToolResultSummary.tsx @@ -42,6 +42,36 @@ const ToolResultSummary: React.FC = ({ } } + // Handle terminal command output specially + if (toolName === "run_terminal_command") { + const isStderr = content.startsWith("Stderr:"); + const actualOutput = isStderr ? content.slice(7).trim() : content; + const outputLines = actualOutput.split("\n").length; + + if (outputLines <= 16) { + // Show actual output for 16 lines or fewer + return ( + + + ⎿ + Terminal output: + + + {actualOutput} + + + ); + } else { + // Show summary for more than 16 lines + return ( + + ⎿ + Command output ({outputLines} lines) + + ); + } + } + // Handle all other cases with text summary const getSummary = () => { // Convert absolute paths to relative paths from workspace root @@ -74,9 +104,6 @@ const ToolResultSummary: React.FC = ({ case "search_code": return `Found ${lines} ${lines === 1 ? "match" : "matches"}`; - case "run_terminal_command": - return `Command output (${lines} lines)`; - case "view_diff": return `Diff output (${lines} lines)`; @@ -100,4 +127,4 @@ const ToolResultSummary: React.FC = ({ ); }; -export default ToolResultSummary; +export default ToolResultSummary; \ No newline at end of file