feat: use code block to display bash commands

This commit is contained in:
Henry Li
2026-01-19 21:59:23 +08:00
parent 58b5c2fcd5
commit 5d6162d006
2 changed files with 9 additions and 3 deletions

View File

@@ -33,6 +33,7 @@ import { cn } from "@/lib/utils";
import { useArtifacts } from "../artifacts";
import { FlipDisplay } from "../flip-display";
import { CodeBlock } from "@/components/ai-elements/code-block";
export function MessageGroup({
className,
@@ -300,7 +301,12 @@ function ToolCall({
icon={SquareTerminalIcon}
>
{command && (
<ChainOfThoughtSearchResult>{command}</ChainOfThoughtSearchResult>
<CodeBlock
className="mx-0 border-none px-0"
showLineNumbers={false}
language="bash"
code={command}
/>
)}
</ChainOfThoughtStep>
);