diff --git a/ui/web/src/components/shared/markdown-renderer.tsx b/ui/web/src/components/shared/markdown-renderer.tsx index 31cab6eb..3a685976 100644 --- a/ui/web/src/components/shared/markdown-renderer.tsx +++ b/ui/web/src/components/shared/markdown-renderer.tsx @@ -18,8 +18,8 @@ function CodeBlock({ const lang = className?.replace("language-", "") ?? ""; return ( -
-
+
+
{lang || "code"}
-
+      
         {children}
       
@@ -55,6 +55,10 @@ export function MarkdownRenderer({ content, className }: MarkdownRendererProps) remarkPlugins={[remarkGfm]} rehypePlugins={[rehypeHighlight]} components={{ + pre({ children }) { + // Strip the outer
 from ReactMarkdown — CodeBlock renders its own
+            return <>{children};
+          },
           code({ className, children, ...props }) {
             const isInline = !className;
             if (isInline) {
diff --git a/ui/web/src/index.css b/ui/web/src/index.css
index f051fe38..2ec90831 100644
--- a/ui/web/src/index.css
+++ b/ui/web/src/index.css
@@ -136,13 +136,4 @@
     font-family: system-ui, -apple-system, sans-serif;
   }
 
-  /* Override prose's dark pre background with theme-aware colors */
-  .prose pre {
-    background-color: var(--muted);
-    color: var(--foreground);
-  }
-  .prose pre code,
-  .prose pre code.hljs {
-    color: inherit;
-  }
 }