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:
parent
79af8bc194
commit
38965babd3
1 changed files with 7 additions and 5 deletions
|
|
@ -19,12 +19,14 @@ export function ToolResultPanel({ result, onClear }: ToolResultPanelProps) {
|
||||||
<Title order={4}>Results</Title>
|
<Title order={4}>Results</Title>
|
||||||
<ClearButton onClick={onClear}>Clear</ClearButton>
|
<ClearButton onClick={onClear}>Clear</ClearButton>
|
||||||
</Group>
|
</Group>
|
||||||
{result.isError && (
|
{result.isError ? (
|
||||||
<Alert color="red" variant="light">
|
<Alert color="red" variant="light" title="Tool Error">
|
||||||
Tool execution returned an error
|
{result.content
|
||||||
|
.filter((b) => b.type === "text")
|
||||||
|
.map((b) => b.text)
|
||||||
|
.join("\n")}
|
||||||
</Alert>
|
</Alert>
|
||||||
)}
|
) : result.content.length === 0 ? (
|
||||||
{result.content.length === 0 ? (
|
|
||||||
<Text c="dimmed">No results yet</Text>
|
<Text c="dimmed">No results yet</Text>
|
||||||
) : (
|
) : (
|
||||||
<>
|
<>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue