Skip to content

Conversation

@krankos
Copy link
Contributor

@krankos krankos commented Sep 17, 2025

refs #148

checkout streamdown: https://github.com/vercel/streamdown

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

Greptile Summary

This PR migrates the Cedar OS markdown rendering system from react-markdown to Streamdown, a library specifically designed for streaming AI content. The changes span four key files:

  1. MarkdownRenderer Component: The core component has been significantly simplified, removing over 200 lines of custom component definitions, code block functionality (syntax highlighting, copy buttons), and sophisticated styling integration. The new implementation uses Streamdown's parseIncompleteMarkdown feature with minimal component overrides that hardcode black text styling.

  2. Package Dependencies: The cedar-os-components package.json removes react-markdown and remark-gfm dependencies, replacing them with streamdown v1.3.0. This aligns with the architectural shift toward a streaming-focused markdown solution.

  3. Documentation Update: The markdown-renderer.mdx documentation has been drastically simplified from detailed feature descriptions to a basic overview focused on Streamdown integration, including examples of streaming AI content integration.

  4. CSS Integration Attempt: A problematic addition to globals.css attempts to include Streamdown's JavaScript using an invalid @source directive, which is not valid CSS syntax and will be ignored by browsers.

The migration appears motivated by leveraging Streamdown's specialized capabilities for parsing incomplete markdown during AI streaming responses, which is crucial for Cedar OS's AI-native application framework. However, the implementation sacrifices significant functionality including code syntax highlighting, copy-to-clipboard features, and proper integration with the existing design system.

Confidence score: 1/5

  • This PR introduces critical functionality regressions and contains fundamentally broken CSS syntax that will prevent proper library loading
  • Score reflects the invalid CSS @source directive, loss of essential features like code highlighting, hardcoded styling that bypasses the design system, and potential XSS vulnerabilities
  • Pay close attention to packages/cedar-os/src/styles/globals.css and packages/cedar-os-components/chatMessages/MarkdownRenderer.tsx for immediate fixes needed

4 files reviewed, 2 comments

Edit Code Review Bot Settings | Greptile

@jeseed jeseed merged commit 439f405 into CedarCopilot:main Oct 6, 2025
4 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants