Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions frontend/src/components/conversation/MessageActions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,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;
Expand Down Expand Up @@ -41,10 +42,12 @@ export const MessageActions: React.FC<MessageActionsProps> = ({ message }) => {
<DialogHeader>
<DialogTitle>Message Raw JSON</DialogTitle>
Comment thread
mike1858 marked this conversation as resolved.
Outdated
</DialogHeader>
<div className="bg-gray-50 dark:bg-gray-900 p-4 rounded-lg">
<pre className="text-xs whitespace-pre-wrap break-all font-mono">
{JSON.stringify(message, null, 2)}
</pre>
<div className="rounded-lg overflow-hidden border border-border">
<CodeMirrorViewer
code={JSON.stringify(message, null, 2)}
language="json"
readOnly={true}
/>
</div>
</DialogContent>
</Dialog>
Expand Down
11 changes: 7 additions & 4 deletions frontend/src/pages/HomeDashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -192,10 +193,12 @@ ${part.thinking}`;
{t("dashboard.rawJsonTitle")}
</DialogTitle>
</DialogHeader>
<div className="bg-gray-50 dark:bg-gray-900 p-4 rounded-lg">
<pre className="text-xs whitespace-pre-wrap break-all font-mono">
{JSON.stringify(message, null, 2)}
</pre>
<div className="rounded-lg overflow-hidden border border-border">
<CodeMirrorViewer
code={JSON.stringify(message, null, 2)}
language="json"
readOnly={true}
/>
</div>
</DialogContent>
</Dialog>
Expand Down