Remove escapeUnicode function from ToolsTab.tsx
This commit is contained in:
@@ -3,7 +3,7 @@ import { JsonValue } from "./DynamicJsonForm";
|
|||||||
import clsx from "clsx";
|
import clsx from "clsx";
|
||||||
|
|
||||||
interface JsonViewProps {
|
interface JsonViewProps {
|
||||||
data: JsonValue;
|
data: unknown;
|
||||||
name?: string;
|
name?: string;
|
||||||
initialExpandDepth?: number;
|
initialExpandDepth?: number;
|
||||||
}
|
}
|
||||||
@@ -33,9 +33,9 @@ const JsonView = memo(
|
|||||||
: data;
|
: data;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="font-mono text-sm transition-all duration-300">
|
<div className="font-mono text-sm transition-all duration-300 ">
|
||||||
<JsonNode
|
<JsonNode
|
||||||
data={normalizedData}
|
data={normalizedData as JsonValue}
|
||||||
name={name}
|
name={name}
|
||||||
depth={0}
|
depth={0}
|
||||||
initialExpandDepth={initialExpandDepth}
|
initialExpandDepth={initialExpandDepth}
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ import {
|
|||||||
import { AlertCircle, Send } from "lucide-react";
|
import { AlertCircle, Send } from "lucide-react";
|
||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
import ListPane from "./ListPane";
|
import ListPane from "./ListPane";
|
||||||
import { escapeUnicode } from "@/utils/escapeUnicode";
|
|
||||||
import JsonView from "./JsonView";
|
import JsonView from "./JsonView";
|
||||||
|
|
||||||
const ToolsTab = ({
|
const ToolsTab = ({
|
||||||
@@ -55,12 +54,12 @@ const ToolsTab = ({
|
|||||||
<>
|
<>
|
||||||
<h4 className="font-semibold mb-2">Invalid Tool Result:</h4>
|
<h4 className="font-semibold mb-2">Invalid Tool Result:</h4>
|
||||||
<div className="p-4 border rounded">
|
<div className="p-4 border rounded">
|
||||||
<JsonView data={escapeUnicode(toolResult)} />
|
<JsonView data={toolResult} />
|
||||||
</div>
|
</div>
|
||||||
<h4 className="font-semibold mb-2">Errors:</h4>
|
<h4 className="font-semibold mb-2">Errors:</h4>
|
||||||
{parsedResult.error.errors.map((error, idx) => (
|
{parsedResult.error.errors.map((error, idx) => (
|
||||||
<div key={idx} className="p-4 border rounded">
|
<div key={idx} className="p-4 border rounded">
|
||||||
<JsonView data={escapeUnicode(error)} />
|
<JsonView data={error} />
|
||||||
</div>
|
</div>
|
||||||
))}
|
))}
|
||||||
</>
|
</>
|
||||||
@@ -99,7 +98,7 @@ const ToolsTab = ({
|
|||||||
</audio>
|
</audio>
|
||||||
) : (
|
) : (
|
||||||
<div className="p-4 border rounded">
|
<div className="p-4 border rounded">
|
||||||
<JsonView data={escapeUnicode(item.resource)} />
|
<JsonView data={item.resource} />
|
||||||
</div>
|
</div>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
@@ -111,7 +110,7 @@ const ToolsTab = ({
|
|||||||
<>
|
<>
|
||||||
<h4 className="font-semibold mb-2">Tool Result (Legacy):</h4>
|
<h4 className="font-semibold mb-2">Tool Result (Legacy):</h4>
|
||||||
<div className="p-4 border rounded">
|
<div className="p-4 border rounded">
|
||||||
<JsonView data={escapeUnicode(toolResult.toolResult)} />
|
<JsonView data={toolResult.toolResult} />
|
||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user