Skip to content

Commit 9dfe7e1

Browse files
KJ7LNWEric Wheeler
authored andcommitted
fix: show properly formatted multi-line commands in preview (#3368)
Co-authored-by: Eric Wheeler <[email protected]>
1 parent fd859b4 commit 9dfe7e1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

webview-ui/src/components/chat/CommandExecution.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import { vscode } from "@src/utils/vscode"
1212
import { useExtensionState } from "@src/context/ExtensionStateContext"
1313
import { cn } from "@src/lib/utils"
1414
import { Button } from "@src/components/ui"
15+
import CodeBlock from "../common/CodeBlock"
1516

1617
interface CommandExecutionProps {
1718
executionId: string
@@ -86,8 +87,8 @@ export const CommandExecution = ({ executionId, text }: CommandExecutionProps) =
8687

8788
return (
8889
<div className="w-full bg-vscode-editor-background border border-vscode-border rounded-xs p-2">
90+
<CodeBlock source={command} language="shell" />
8991
<div className="flex flex-row items-center justify-between gap-2 px-1">
90-
<Line className="text-sm whitespace-nowrap overflow-hidden text-ellipsis">{command}</Line>
9192
<div className="flex flex-row items-center gap-1">
9293
{status?.status === "started" && (
9394
<div className="flex flex-row items-center gap-2 font-mono text-xs">

0 commit comments

Comments
 (0)