Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@
@import 'katex/dist/katex.min.css';

/* Tell Tailwind to scan Streamdown's classes */
@source '../node_modules/streamdown/dist/index.js';
@source '../node_modules/streamdown/dist/*.js';
@source '../node_modules/@streamdown/code/dist/*.js';
@source '../node_modules/@streamdown/math/dist/*.js';
@source '../node_modules/@streamdown/mermaid/dist/*.js';

/* include plugins */
@plugin "tailwindcss-animate";
Expand Down
6 changes: 6 additions & 0 deletions components/ai-elements/response.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
"use client";

import { code } from "@streamdown/code";
import { math } from "@streamdown/math";
import { mermaid } from "@streamdown/mermaid";
import { cn } from "@/lib/utils";
import { type ComponentProps, memo } from "react";
import { Streamdown } from "streamdown";

type ResponseProps = ComponentProps<typeof Streamdown>;

const defaultPlugins = { code, math, mermaid };

export const Response = memo(
({ className, ...props }: ResponseProps) => (
<Streamdown
plugins={defaultPlugins}
className={cn(
"size-full [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",
"font-sans leading-relaxed",
Expand Down
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@
"@radix-ui/react-tabs": "^1.1.13",
"@radix-ui/react-tooltip": "^1.2.4",
"@radix-ui/react-use-controllable-state": "^1.2.2",
"@streamdown/code": "^1.1.1",
"@streamdown/math": "^1.0.2",
"@streamdown/mermaid": "^1.0.2",
"@supabase/supabase-js": "^2.45.1",
"@tabler/icons-react": "^3.31.0",
"@tanstack/react-query": "^5.66.0",
Expand Down Expand Up @@ -97,7 +100,7 @@
"remark-gfm": "4",
"sharp": "^0.34.2",
"sonner": "^2.0.7",
"streamdown": "^1.1.6",
"streamdown": "^2.5.0",
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Restore Streamdown plugins before shipping v2

Any chat response that contains fenced code, Mermaid, or LaTeX will regress after this bump. Streamdown 2.x moved those capabilities behind optional plugins (@streamdown/code, @streamdown/mermaid, @streamdown/math, etc.; see the upstream README usage for plugins={{ ... }}), but our renderer still mounts bare <Streamdown {...props} /> in components/ai-elements/response.tsx:11-29 and there are no @streamdown/* imports anywhere in the repo. The previous lockfile entry for streamdown@1.6.10 bundled shiki, remark-math, and rehype-katex, so upgrading only the package version here silently drops syntax highlighting/copy UI and math rendering for existing responses.

Useful? React with 👍 / 👎.

"stripe": "^17.4.0",
"swiper": "^11.1.15",
"tailwind-merge": "^2.6.0",
Expand Down
Loading
Loading