mirror of
https://gitee.com/wanwujie/deer-flow
synced 2026-04-22 05:34:45 +08:00
feat: adjust the style of code block
This commit is contained in:
@@ -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>
|
||||||
)}
|
)}
|
||||||
|
|||||||
Reference in New Issue
Block a user