diff --git a/apps/web/src/components/ChatMarkdown.tsx b/apps/web/src/components/ChatMarkdown.tsx index 821d1643ede09b1d2b22f25d5f382af82d8b2eed..dd0343ca990ec556219320c98648b70cc1aea99a 100644 --- a/apps/web/src/components/ChatMarkdown.tsx +++ b/apps/web/src/components/ChatMarkdown.tsx @@ -849,7 +849,7 @@ function MarkdownCodeBlock({ theme, onRunShellCommand, isStreaming, - leadingActions, + viewToggle, canWrap = true, diagram = false, children, @@ -860,9 +860,10 @@ function MarkdownCodeBlock({ theme: "light" | "dark"; onRunShellCommand?: ((command: string) => void) | undefined; isStreaming: boolean; - leadingActions?: ReactNode; + /** Switches between source and rendered content; sits left of copy in both views. */ + viewToggle?: ReactNode; canWrap?: boolean; - /** Renders content instead of code, with actions below it like tables. */ + /** Renders content frameless, with the code header's actions above it. */ diagram?: boolean; children: ReactNode; }) { @@ -942,12 +943,14 @@ function MarkdownCodeBlock({ if (diagram) { return ( -