From 2d40a40c577094c92e7602466ce72228f69e165f Mon Sep 17 00:00:00 2001 From: Danielle Maywood Date: Wed, 27 May 2026 16:57:05 +0100 Subject: [PATCH] fix(site): tighten execute tool duration spacing (#25739) --- .../ChatElements/tools/ExecuteTool.tsx | 21 ++++++++----------- .../ChatElements/tools/Tool.stories.tsx | 6 +++--- 2 files changed, 12 insertions(+), 15 deletions(-) diff --git a/site/src/pages/AgentsPage/components/ChatElements/tools/ExecuteTool.tsx b/site/src/pages/AgentsPage/components/ChatElements/tools/ExecuteTool.tsx index 0a7c54d252..6f0a3b18f0 100644 --- a/site/src/pages/AgentsPage/components/ChatElements/tools/ExecuteTool.tsx +++ b/site/src/pages/AgentsPage/components/ChatElements/tools/ExecuteTool.tsx @@ -189,23 +189,20 @@ const ShellCommandLine: React.FC<{ ? summarizeParsedCommands(parsedCommands) : ""; const commandDisplay = summary || command; + const commandLabel = intentLabel + ? `${intentLabel} using ${commandDisplay}` + : `Ran ${commandDisplay}`; + const durationSuffix = durationLabel ? ` for ${durationLabel}` : ""; + return ( <> - - {intentLabel ? ( - <> - {intentLabel} using {commandDisplay} - - ) : ( - <>Ran {commandDisplay} + + {commandLabel} + {durationSuffix && ( + {durationSuffix} )} - {durationLabel && ( - - {intentLabel ? ` for ${durationLabel}` : durationLabel} - - )} {expanded !== undefined && (