Skip to content

Commit ca1854b

Browse files
committed
ran npm run prettier-fix command to fix the code styling
1 parent a3be8f6 commit ca1854b

File tree

2 files changed

+26
-6
lines changed

2 files changed

+26
-6
lines changed

client/src/components/JsonView.tsx

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ const JsonView = memo(
3636
initialExpandDepth = 3,
3737
className,
3838
withCopyButton = true,
39-
isError = false
39+
isError = false,
4040
}: JsonViewProps) => {
4141
const { toast } = useToast();
4242
const [copied, setCopied] = useState(false);
@@ -102,7 +102,7 @@ const JsonView = memo(
102102
name={name}
103103
depth={0}
104104
initialExpandDepth={initialExpandDepth}
105-
isError = {isError}
105+
isError={isError}
106106
/>
107107
</div>
108108
</div>
@@ -121,7 +121,13 @@ interface JsonNodeProps {
121121
}
122122

123123
const JsonNode = memo(
124-
({ data, name, depth = 0, initialExpandDepth, isError = false }: JsonNodeProps) => {
124+
({
125+
data,
126+
name,
127+
depth = 0,
128+
initialExpandDepth,
129+
isError = false,
130+
}: JsonNodeProps) => {
125131
const [isExpanded, setIsExpanded] = useState(depth < initialExpandDepth);
126132

127133
const getDataType = (value: JsonValue): string => {
@@ -241,7 +247,14 @@ const JsonNode = memo(
241247
{name}:
242248
</span>
243249
)}
244-
<pre className={clsx(typeStyleMap.string, "break-all whitespace-pre-wrap")}>"{value}"</pre>
250+
<pre
251+
className={clsx(
252+
typeStyleMap.string,
253+
"break-all whitespace-pre-wrap",
254+
)}
255+
>
256+
"{value}"
257+
</pre>
245258
</div>
246259
);
247260
}

client/src/components/ToolsTab.tsx

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,18 @@ const ToolsTab = ({
6666
return (
6767
<>
6868
<h4 className="font-semibold mb-2">
69-
Tool Result: {isError ? <span className="text-red-600 font-semibold">Error</span> : <span className="text-green-600 font-semibold">Success</span>}
69+
Tool Result:{" "}
70+
{isError ? (
71+
<span className="text-red-600 font-semibold">Error</span>
72+
) : (
73+
<span className="text-green-600 font-semibold">Success</span>
74+
)}
7075
</h4>
7176
{structuredResult.content.map((item, index) => (
7277
<div key={index} className="mb-2">
73-
{item.type === "text" && <JsonView data={item.text} isError={isError}/>}
78+
{item.type === "text" && (
79+
<JsonView data={item.text} isError={isError} />
80+
)}
7481
{item.type === "image" && (
7582
<img
7683
src={`data:${item.mimeType};base64,${item.data}`}

0 commit comments

Comments
 (0)