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:
parent
9b9f0f0859
commit
4cb7555c49
1 changed files with 12 additions and 0 deletions
|
|
@ -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>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue