feat: adjust the style of code block

This commit is contained in:
Li Xin
2025-04-25 13:44:20 +08:00
parent e24a05bc76
commit 17c342020e

View File

@@ -289,13 +289,15 @@ function PythonToolCall({ toolCall }: { toolCall: ToolCallRuntime }) {
<div className="px-5"> <div className="px-5">
<div className="bg-accent mt-2 max-h-[400px] w-[800px] overflow-y-auto rounded-md p-2 text-sm"> <div className="bg-accent mt-2 max-h-[400px] w-[800px] overflow-y-auto rounded-md p-2 text-sm">
<SyntaxHighlighter <SyntaxHighlighter
customStyle={{
background: "transparent",
}}
language="python" language="python"
style={resolvedTheme === "dark" ? dark : docco} style={resolvedTheme === "dark" ? dark : docco}
customStyle={{
background: "transparent",
border: "none",
boxShadow: "none",
}}
> >
{code} {code.trim()}
</SyntaxHighlighter> </SyntaxHighlighter>
</div> </div>
</div> </div>
@@ -328,15 +330,15 @@ function MCPToolCall({ toolCall }: { toolCall: ToolCallRuntime }) {
{toolCall.result && ( {toolCall.result && (
<div className="bg-accent max-h-[400px] w-[800px] overflow-y-auto rounded-md text-sm"> <div className="bg-accent max-h-[400px] w-[800px] overflow-y-auto rounded-md text-sm">
<SyntaxHighlighter <SyntaxHighlighter
language="json"
style={resolvedTheme === "dark" ? dark : docco}
customStyle={{ customStyle={{
background: "transparent", background: "transparent",
border: "none", border: "none",
boxShadow: "none", boxShadow: "none",
}} }}
language="json"
style={resolvedTheme === "dark" ? dark : docco}
> >
{toolCall.result} {toolCall.result.trim()}
</SyntaxHighlighter> </SyntaxHighlighter>
</div> </div>
)} )}