From fbbe887aa875614258d31c8d2acfda911555779f Mon Sep 17 00:00:00 2001 From: anovazzi1 Date: Tue, 3 Dec 2024 13:12:12 -0300 Subject: [PATCH] fix: change wrong component in json display (#5026) refactor: Remove wrong CodeBlock import and replace with SimplifiedCodeTabComponent --- .../core/chatComponents/ContentDisplay.tsx | 22 ++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/src/frontend/src/components/core/chatComponents/ContentDisplay.tsx b/src/frontend/src/components/core/chatComponents/ContentDisplay.tsx index 861c73949..91498186a 100644 --- a/src/frontend/src/components/core/chatComponents/ContentDisplay.tsx +++ b/src/frontend/src/components/core/chatComponents/ContentDisplay.tsx @@ -1,4 +1,3 @@ -import { CodeBlock } from "@/modals/IOModal/components/chatView/chatMessage/codeBlock"; import { ContentType } from "@/types/chat"; import { ReactNode } from "react"; import Markdown from "react-markdown"; @@ -120,9 +119,9 @@ export default function ContentDisplay({ case "json": contentData = (
-
); @@ -134,7 +133,10 @@ export default function ContentDisplay({ {content.reason &&
Reason: {content.reason}
} {content.solution &&
Solution: {content.solution}
} {content.traceback && ( - + )} ); @@ -184,9 +186,9 @@ export default function ContentDisplay({ // For objects/arrays, format as JSON try { return ( - ); } catch { @@ -203,9 +205,9 @@ export default function ContentDisplay({ > {`${content.name ? `**Tool:** ${content.name}\n\n` : ""}**Input:**`} - {content.output !== undefined && ( <> @@ -228,9 +230,9 @@ export default function ContentDisplay({ > **Error:** - )}