diff --git a/frontend/src/components/conversation/MessageActions.tsx b/frontend/src/components/conversation/MessageActions.tsx index acb5c61..b9b4156 100644 --- a/frontend/src/components/conversation/MessageActions.tsx +++ b/frontend/src/components/conversation/MessageActions.tsx @@ -1,4 +1,5 @@ import React from "react"; +import { useTranslation } from "react-i18next"; import { Button } from "../ui/button"; import { Dialog, @@ -9,6 +10,7 @@ import { } from "../ui/dialog"; import { Info } from "lucide-react"; import { type ToolCall } from "../../utils/toolCallParser"; +import { CodeMirrorViewer } from "../common/CodeMirrorViewer"; interface Message { id: string; @@ -24,6 +26,8 @@ interface MessageActionsProps { } export const MessageActions: React.FC = ({ message }) => { + const { t } = useTranslation(); + return (
@@ -34,17 +38,19 @@ export const MessageActions: React.FC = ({ message }) => { className="h-6 px-2 text-xs text-muted-foreground hover:text-foreground" > - Raw JSON + {t("dashboard.rawJsonButton")} - Message Raw JSON + {t("dashboard.rawJsonTitle")} -
-
-              {JSON.stringify(message, null, 2)}
-            
+
+
diff --git a/frontend/src/pages/HomeDashboard.tsx b/frontend/src/pages/HomeDashboard.tsx index 367a177..3deb2cc 100644 --- a/frontend/src/pages/HomeDashboard.tsx +++ b/frontend/src/pages/HomeDashboard.tsx @@ -25,6 +25,7 @@ import { } from "../components/ui/card"; import { Info, UserRound, FolderKanban } from "lucide-react"; import { ModelContextProtocol } from "../components/common/ModelContextProtocol"; +import { CodeMirrorViewer } from "../components/common/CodeMirrorViewer"; import { getBackendText } from "../utils/backendText"; import { useBackend } from "../contexts/BackendContext"; import { GeminiMessagePart } from "../types"; @@ -192,10 +193,12 @@ ${part.thinking}`; {t("dashboard.rawJsonTitle")} -
-
-                              {JSON.stringify(message, null, 2)}
-                            
+
+