From ca1854b0719fa9566de5003be176136df61579fc Mon Sep 17 00:00:00 2001 From: kavinkumarbaskar Date: Sat, 5 Apr 2025 23:32:10 +0530 Subject: [PATCH] ran npm run prettier-fix command to fix the code styling --- client/src/components/JsonView.tsx | 21 +++++++++++++++++---- client/src/components/ToolsTab.tsx | 11 +++++++++-- 2 files changed, 26 insertions(+), 6 deletions(-) diff --git a/client/src/components/JsonView.tsx b/client/src/components/JsonView.tsx index a4ed95f..46a267d 100644 --- a/client/src/components/JsonView.tsx +++ b/client/src/components/JsonView.tsx @@ -36,7 +36,7 @@ const JsonView = memo( initialExpandDepth = 3, className, withCopyButton = true, - isError = false + isError = false, }: JsonViewProps) => { const { toast } = useToast(); const [copied, setCopied] = useState(false); @@ -102,7 +102,7 @@ const JsonView = memo( name={name} depth={0} initialExpandDepth={initialExpandDepth} - isError = {isError} + isError={isError} /> @@ -121,7 +121,13 @@ interface JsonNodeProps { } const JsonNode = memo( - ({ data, name, depth = 0, initialExpandDepth, isError = false }: JsonNodeProps) => { + ({ + data, + name, + depth = 0, + initialExpandDepth, + isError = false, + }: JsonNodeProps) => { const [isExpanded, setIsExpanded] = useState(depth < initialExpandDepth); const getDataType = (value: JsonValue): string => { @@ -241,7 +247,14 @@ const JsonNode = memo( {name}: )} -
"{value}"
+
+              "{value}"
+            
); } diff --git a/client/src/components/ToolsTab.tsx b/client/src/components/ToolsTab.tsx index 7f84eac..bc598e7 100644 --- a/client/src/components/ToolsTab.tsx +++ b/client/src/components/ToolsTab.tsx @@ -66,11 +66,18 @@ const ToolsTab = ({ return ( <>

- Tool Result: {isError ? Error : Success} + Tool Result:{" "} + {isError ? ( + Error + ) : ( + Success + )}

{structuredResult.content.map((item, index) => (
- {item.type === "text" && } + {item.type === "text" && ( + + )} {item.type === "image" && (