Show tool error message inside the alert box

Instead of a separate alert banner and content below, render error
content directly inside a titled Alert with "Tool Error" heading.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
cliffhall 2026-04-18 17:32:14 -04:00
commit 38965babd3

View file

@ -19,12 +19,14 @@ export function ToolResultPanel({ result, onClear }: ToolResultPanelProps) {
<Title order={4}>Results</Title>
<ClearButton onClick={onClear}>Clear</ClearButton>
</Group>
{result.isError && (
<Alert color="red" variant="light">
Tool execution returned an error
{result.isError ? (
<Alert color="red" variant="light" title="Tool Error">
{result.content
.filter((b) => b.type === "text")
.map((b) => b.text)
.join("\n")}
</Alert>
)}
{result.content.length === 0 ? (
) : result.content.length === 0 ? (
<Text c="dimmed">No results yet</Text>
) : (
<>