From 8d243c8afadff539c145166d3bbd92ed136e395d Mon Sep 17 00:00:00 2001 From: Brooklyn Nicholson Date: Sun, 26 Jul 2026 04:25:32 -0500 Subject: [PATCH] fix(desktop): put the technical tool payload behind a chevron MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Technical mode rendered the raw payload two different ways — a bare block for most rows, a native `
` for file edits, whose browser-drawn marker matches nothing else in the app. Both are now one collapsed chevron disclosure at a smaller type size, with even padding against the row body. --- .../components/assistant-ui/tool/fallback.tsx | 53 ++++++++++++++----- 1 file changed, 40 insertions(+), 13 deletions(-) diff --git a/apps/desktop/src/components/assistant-ui/tool/fallback.tsx b/apps/desktop/src/components/assistant-ui/tool/fallback.tsx index ab58dd056b7b..1ba2fd25a465 100644 --- a/apps/desktop/src/components/assistant-ui/tool/fallback.tsx +++ b/apps/desktop/src/components/assistant-ui/tool/fallback.tsx @@ -26,6 +26,7 @@ import { ZoomableImage } from '@/components/chat/zoomable-image' import { Button } from '@/components/ui/button' import { Codicon } from '@/components/ui/codicon' import { CopyButton } from '@/components/ui/copy-button' +import { DisclosureCaret } from '@/components/ui/disclosure-caret' import { FadeText } from '@/components/ui/fade-text' import { FileTypeIcon } from '@/components/ui/file-type-icon' import { GlyphSpinner } from '@/components/ui/glyph-spinner' @@ -96,6 +97,44 @@ const TOOL_EXPANDED_SHELL_CLASS = 'rounded-[0.3125rem] border border-(--ui-strok const TOOL_SECTION_PRE_CLASS = cn(TOOL_SECTION_SURFACE_CLASS, 'font-mono text-[0.7rem] leading-relaxed') +// Raw args/result dump — reference material, so a notch smaller than a body. +const TOOL_PAYLOAD_PRE_CLASS = cn(TOOL_SECTION_SURFACE_CLASS, 'font-mono text-[0.65rem] leading-relaxed') + +/** + * Technical-mode raw payload, behind a chevron disclosure. + * + * Collapsed by default — in technical mode every tool row carries one, and + * expanding them all buries the transcript. Uses `DisclosureCaret` rather than + * a native `
`, whose marker is a browser-drawn triangle matching + * nothing else here. + */ +function ToolPayloadDisclosure({ args, result }: { args: unknown; result: unknown }) { + const [open, setOpen] = useState(false) + + return ( + // `py-0.5` tops up the parent's `p-1.5` to an even block on both edges. +
+ + {open && ( +
+          {technicalTrace(args, result)}
+        
+ )} +
+ ) +} + interface ToolStatusCopy { statusDone: string statusError: string @@ -616,19 +655,7 @@ function ToolEntry({ part }: ToolEntryProps) { )} ))} - {toolViewMode === 'technical' && !(isFileEdit && view.inlineDiff) && ( -
-              {technicalTrace(part.args, part.result)}
-            
- )} - {toolViewMode === 'technical' && isFileEdit && view.inlineDiff && ( -
- Tool payload -
-                {technicalTrace(part.args, part.result)}
-              
-
- )} + {toolViewMode === 'technical' && } )}