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>
|
||||
<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>
|
||||
) : (
|
||||
<>
|
||||
|
|
|
|||
Loading…
Reference in a new issue