feat: display tool execution errors in chat UI

Add error message rendering to MessageBubble component so users can see
detailed error messages when tools fail (e.g., missing API keys).

Previously only showed "output-error" badge without the actual error text.
Now displays the error message in a red-tinted box below the tool call.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Ajax Davis 2025-12-04 14:59:34 +10:00
parent d3f8adc0ea
commit 19837ae800

View file

@ -92,6 +92,18 @@ export function MessageBubble({
</pre>
</div>
)}
{/* Tool Error */}
{toolPart.error && (
<div>
<div className="mb-1 text-xs font-semibold text-red-500">Error:</div>
<pre className="overflow-x-auto rounded bg-red-500/10 p-2 text-xs text-red-400">
{typeof toolPart.error === 'string'
? toolPart.error
: JSON.stringify(toolPart.error, null, 2)}
</pre>
</div>
)}
</div>
);
}