diff --git a/packages/cli/src/ui/components/messages/ToolGroupDisplay.tsx b/packages/cli/src/ui/components/messages/ToolGroupDisplay.tsx index df7bfadd21..28e79f5710 100644 --- a/packages/cli/src/ui/components/messages/ToolGroupDisplay.tsx +++ b/packages/cli/src/ui/components/messages/ToolGroupDisplay.tsx @@ -149,11 +149,17 @@ const ToolDisplayMessage: React.FC = ({ tool }) => { } if (format === 'notice') { + // If the name is part of the description (typical for topic updates), + // suppress the bold name to avoid redundancy and match legacy UI. + const isRedundant = !!(name && description?.includes(`"${name}"`)); + return ( - - {name || 'Topic'}: - + {name && !isRedundant && ( + + {name}: + + )} {description && ( {description} @@ -190,8 +196,8 @@ const ToolDisplayMessage: React.FC = ({ tool }) => { // Box format (full) return ( - - + + = ({ tool }) => { {description && {description}} {resultSummary && !result && ( - - → {resultSummary} + + {resultSummary} )} {result && ( - + )} @@ -231,10 +237,10 @@ const ToolResultDisplayContent: React.FC = ({ case 'text': return ( - {content.text} + {content.text} {summary && ( - - {summary} + + {summary} )} @@ -243,7 +249,7 @@ const ToolResultDisplayContent: React.FC = ({ // Simplified diff display for now return ( - {summary && {summary}} + {summary && {summary}} {`[Diff Display: ${content.beforeText.length} -> ${content.afterText.length} chars]`} diff --git a/packages/cli/src/ui/components/messages/__snapshots__/ToolGroupDisplay.test.tsx.snap b/packages/cli/src/ui/components/messages/__snapshots__/ToolGroupDisplay.test.tsx.snap index e4d783d80b..9e80fae63e 100644 --- a/packages/cli/src/ui/components/messages/__snapshots__/ToolGroupDisplay.test.tsx.snap +++ b/packages/cli/src/ui/components/messages/__snapshots__/ToolGroupDisplay.test.tsx.snap @@ -10,8 +10,7 @@ exports[` > Border & Margin Logic > forces top border on box Test description ╭──────────────────────────────────────────────────────────────────────────────────────────────────╮ -│ ✓ Tool in Box Test description │ -│ │ +│ ✓ Tool in Box Test description │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────╯ " `; @@ -24,8 +23,7 @@ exports[` > Golden Snapshots > renders error message when di exports[` > Golden Snapshots > renders in boxed mode (full verbosity) 1`] = ` " ╭──────────────────────────────────────────────────────────────────────────────────────────────────╮ -│ ✓ Tool A Test description │ -│ │ +│ ✓ Tool A Test description │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────╯ " `; @@ -42,8 +40,7 @@ exports[` > Golden Snapshots > renders notices at the top (h New Topic ╭──────────────────────────────────────────────────────────────────────────────────────────────────╮ -│ ✓ Tool A Test description │ -│ │ +│ ✓ Tool A Test description │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────╯ " `; @@ -63,9 +60,9 @@ exports[` > Result Formatting > renders compact tools with s exports[` > Result Formatting > renders placeholder for diff results 1`] = ` " ╭──────────────────────────────────────────────────────────────────────────────────────────────────╮ -│ ✓ test-tool Test description │ -│ [Diff Display: 3 -> 3 chars] │ +│ ✓ test-tool Test description │ │ │ +│ [Diff Display: 3 -> 3 chars] │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────╯ " `; @@ -73,11 +70,10 @@ exports[` > Result Formatting > renders placeholder for diff exports[` > Result Formatting > renders text results with summary below 1`] = ` " ╭──────────────────────────────────────────────────────────────────────────────────────────────────╮ -│ ✓ test-tool Test description │ -│ Detailed output │ -│ │ -│ Short summary │ +│ ✓ test-tool Test description │ │ │ +│ Detailed output │ +│ Short summary │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────╯ " `; diff --git a/packages/core/src/tools/shell.ts b/packages/core/src/tools/shell.ts index d944009c1c..31f0ecae54 100644 --- a/packages/core/src/tools/shell.ts +++ b/packages/core/src/tools/shell.ts @@ -934,13 +934,14 @@ export class ShellToolInvocation extends BaseToolInvocation< return { llmContent, display: { - name: this.getDisplayTitle(), + name: this._toolDisplayName, description: this.getDescription(), resultSummary: displayResultSummary, result: typeof returnDisplay === 'string' ? { type: 'text', text: returnDisplay } - : undefined, + : // TODO: Add support for terminal display type (AnsiOutput) + undefined, }, returnDisplay, data,