agent: @U0AJM7X8FBR Update chat to the latest streamdown https://github.com/ver#1592
agent: @U0AJM7X8FBR Update chat to the latest streamdown https://github.com/ver#1592sweetmantech wants to merge 2 commits intotestfrom
Conversation
Bumps streamdown to the latest version (2.5.0). Updates the Tailwind @source glob from dist/index.js to dist/*.js to match the v2 dist layout. No changes needed to response.tsx — the Streamdown import API is unchanged. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📝 WalkthroughWalkthroughAdded Streamdown plugin integration to the Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant Response_Component as Response
participant Streamdown_Renderer as Streamdown
participant Plugins as Plugins(code, math, mermaid)
Client->>Response: request render
Response->>Streamdown: call Streamdown.render(content, plugins)
Streamdown->>Plugins: invoke transforms (code/math/mermaid)
Plugins-->>Streamdown: transformed HTML/AST
Streamdown-->>Response: rendered markup
Response-->>Client: send rendered output
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ❌ 1❌ Failed checks (1 inconclusive)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c6a142eb7f
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| "sharp": "^0.34.2", | ||
| "sonner": "^2.0.7", | ||
| "streamdown": "^1.1.6", | ||
| "streamdown": "^2.5.0", |
There was a problem hiding this comment.
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 👍 / 👎.
Install and configure @streamdown/code, @streamdown/math, and @streamdown/mermaid plugins to restore syntax highlighting, LaTeX math rendering, and Mermaid diagram support after upgrading from streamdown v1 to v2. Streamdown v2 moved these capabilities behind optional plugins. Without them, fenced code blocks, math expressions, and Mermaid diagrams would regress silently. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
🧹 Nitpick comments (1)
app/globals.css (1)
10-13: Correctly configured Tailwind v4 content scanning for Streamdown plugins.The
@sourcedirectives properly extend Tailwind's class detection to include the Streamdown plugin distribution files. This ensures any Tailwind classes used by these plugins are included in the final CSS bundle.Regarding the Stylelint errors: these are false positives. The
@sourcedirective is valid Tailwind CSS v4 syntax, but Stylelint'sscss/at-rule-no-unknownrule doesn't recognize it. Consider updating your Stylelint configuration to ignore Tailwind-specific at-rules:💡 Stylelint configuration suggestion
{ "rules": { "scss/at-rule-no-unknown": [ true, { "ignoreAtRules": ["source", "plugin", "theme", "custom-variant", "utility", "tailwind", "apply", "layer"] } ] } }Or if using a
.stylelintrc.js:module.exports = { rules: { "scss/at-rule-no-unknown": [ true, { ignoreAtRules: ["source", "plugin", "theme", "custom-variant", "utility", "tailwind", "apply", "layer"] } ] } };🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@app/globals.css` around lines 10 - 13, Stylelint is flagging Tailwind v4's `@source` directives (the lines starting with "@source '../node_modules/streamdown...") as unknown at-rules; update your Stylelint configuration (rule "scss/at-rule-no-unknown") to ignore Tailwind-specific at-rules such as "source" (and optionally "plugin","theme","custom-variant","utility","tailwind","apply","layer") so the `@source` directives in globals.css are treated as valid by the linter.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@app/globals.css`:
- Around line 10-13: Stylelint is flagging Tailwind v4's `@source` directives (the
lines starting with "@source '../node_modules/streamdown...") as unknown
at-rules; update your Stylelint configuration (rule "scss/at-rule-no-unknown")
to ignore Tailwind-specific at-rules such as "source" (and optionally
"plugin","theme","custom-variant","utility","tailwind","apply","layer") so the
`@source` directives in globals.css are treated as valid by the linter.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: a15e5bec-1b5b-430c-b96b-e235b87c99ce
⛔ Files ignored due to path filters (2)
package.jsonis excluded by none and included by nonepnpm-lock.yamlis excluded by!**/pnpm-lock.yamland included by none
📒 Files selected for processing (2)
app/globals.csscomponents/ai-elements/response.tsx
Automated PR from coding agent.
Prompt: @U0AJM7X8FBR Update chat to the latest streamdown https://github.com/vercel/streamdown
Summary by CodeRabbit
New Features
Chores