mirror of
https://github.com/aljazceru/goose.git
synced 2026-01-08 17:04:25 +01:00
fix: restore image outputs from tool calls (#1640)
This commit is contained in:
@@ -130,12 +130,23 @@ function ToolResultView({ result }: ToolResultViewProps) {
|
||||
)}
|
||||
{(isExpanded || !shouldMinimize) && (
|
||||
<>
|
||||
{item.text && (
|
||||
{item.type === 'text' && item.text && (
|
||||
<MarkdownContent
|
||||
content={item.text}
|
||||
className="whitespace-pre-wrap p-2 max-w-full overflow-x-auto"
|
||||
/>
|
||||
)}
|
||||
{item.type === 'image' && (
|
||||
<img
|
||||
src={`data:${item.mimeType};base64,${item.data}`}
|
||||
alt="Tool result"
|
||||
className="max-w-full h-auto rounded-md my-2"
|
||||
onError={(e) => {
|
||||
console.error('Failed to load image: Invalid MIME-type encoded image data');
|
||||
e.currentTarget.style.display = 'none';
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user