feat: highlight tool errors in red text

This commit is contained in:
kavinkumarbaskar
2025-04-05 23:24:10 +05:30
parent 3032a67d4e
commit a3be8f6376
2 changed files with 12 additions and 7 deletions

View File

@@ -66,11 +66,11 @@ const ToolsTab = ({
return (
<>
<h4 className="font-semibold mb-2">
Tool Result: {isError ? "Error" : "Success"}
Tool Result: {isError ? <span className="text-red-600 font-semibold">Error</span> : <span className="text-green-600 font-semibold">Success</span>}
</h4>
{structuredResult.content.map((item, index) => (
<div key={index} className="mb-2">
{item.type === "text" && <JsonView data={item.text} />}
{item.type === "text" && <JsonView data={item.text} isError={isError}/>}
{item.type === "image" && (
<img
src={`data:${item.mimeType};base64,${item.data}`}