mirror of
https://github.com/aljazceru/claude-code-viewer.git
synced 2025-12-25 01:04:21 +01:00
feat: syntaxhilight input json
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
import { ChevronDown, Lightbulb, Settings } from "lucide-react";
|
||||
import Image from "next/image";
|
||||
import type { FC } from "react";
|
||||
import { Prism as SyntaxHighlighter } from "react-syntax-highlighter";
|
||||
import { oneLight } from "react-syntax-highlighter/dist/esm/styles/prism";
|
||||
import { Badge } from "@/components/ui/badge";
|
||||
import {
|
||||
Card,
|
||||
@@ -86,11 +88,14 @@ export const AssistantConversationContent: FC<{
|
||||
</div>
|
||||
</CollapsibleTrigger>
|
||||
<CollapsibleContent>
|
||||
<div className="bg-background rounded border p-2 mt-1">
|
||||
<pre className="text-xs overflow-x-auto">
|
||||
{JSON.stringify(content.input, null, 2)}
|
||||
</pre>
|
||||
</div>
|
||||
<SyntaxHighlighter
|
||||
style={oneLight}
|
||||
language="json"
|
||||
PreTag="div"
|
||||
className="text-xs"
|
||||
>
|
||||
{JSON.stringify(content.input, null, 2)}
|
||||
</SyntaxHighlighter>
|
||||
</CollapsibleContent>
|
||||
</Collapsible>
|
||||
{toolResult && (
|
||||
|
||||
Reference in New Issue
Block a user