From 9b5964e3432fce68f90f4443210b383ee28a5709 Mon Sep 17 00:00:00 2001 From: Bradley Axen Date: Wed, 12 Mar 2025 14:46:02 -0700 Subject: [PATCH] fix: restore image outputs from tool calls (#1640) --- ui/desktop/src/components/ToolCallWithResponse.tsx | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/ui/desktop/src/components/ToolCallWithResponse.tsx b/ui/desktop/src/components/ToolCallWithResponse.tsx index 6fed12cb..ab9146e1 100644 --- a/ui/desktop/src/components/ToolCallWithResponse.tsx +++ b/ui/desktop/src/components/ToolCallWithResponse.tsx @@ -130,12 +130,23 @@ function ToolResultView({ result }: ToolResultViewProps) { )} {(isExpanded || !shouldMinimize) && ( <> - {item.text && ( + {item.type === 'text' && item.text && ( )} + {item.type === 'image' && ( + Tool result { + console.error('Failed to load image: Invalid MIME-type encoded image data'); + e.currentTarget.style.display = 'none'; + }} + /> + )} )}