Skip to content

Conversation

@mehmetozguldev
Copy link
Contributor

@mehmetozguldev mehmetozguldev commented Nov 20, 2025

introducing

  • Full markdown rendering support for agent conversation messages:
    • headings (h1-h6), paragraphs, bullet/numbered/nested lists, tables, links (with noopener and noreferrer props), blockquotes, images, checklists, horizontal rules, inline code and fenced code blocks
  • Syntax highlighting for code blocks using react-syntax-highlighter with Solarized Light [1]
  • Auto-collapsible code blocks for content > 5 lines with "Show More/Less" toggle

changes made

  • Added new dependencies (react-markdown, remark-gfm, react-syntax-highlighter)
  • Updated conversation-message.tsx  and chat-message.tsx to use shared components
  • Removed duplicate code and old splitFences()  function

tests

To test it, use this prompt:

  Generate a single message that includes:
  - All markdown heading levels (H1–H6)
  - Bullet lists and numbered lists (with nested items)
  - A blockquote
  - A table
  - Inline code and multiple fenced code blocks in different languages (JS, TS, Python)
  - At least one long code block over 20 lines (should auto-collapse)
  - A very long single line of code (to test horizontal scrolling with sticky line numbers)
  - Bold, italic, strikethrough, and links
  - An image URL
  - A task list with checked and unchecked items

  Make the content obviously varied so I can visually confirm all markdown features work correctly.

notes

[1] I chose Solarized Light on the theme, because it had more "orange-ish" vibe, so I thought it would fit the brand's coloring better. But this can change later easily (on code-block, SyntaxHighlighter's style prop is setting the theme. )

[2] No math support: decided against adding LaTeX/math equation rendering (katex + plugins) to keep dependencies minimal. Math support would add ~300 KB. Can be added easily later if needed.

@changeset-bot
Copy link

changeset-bot bot commented Nov 20, 2025

⚠️ No Changeset found

Latest commit: 6b45c1e

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

💥 An error occurred when fetching the changed packages and changesets in this PR
Some errors occurred when validating the changesets config:
The package or glob expression "@lix-js/host" is specified in the `ignore` option but it is not found in the project. You may have misspelled the package name or provided an invalid glob expression. Note that glob expressions must be defined according to https://www.npmjs.com/package/micromatch.
The package or glob expression "lix-file-manager" is specified in the `ignore` option but it is not found in the project. You may have misspelled the package name or provided an invalid glob expression. Note that glob expressions must be defined according to https://www.npmjs.com/package/micromatch.
The package or glob expression "csv-app" is specified in the `ignore` option but it is not found in the project. You may have misspelled the package name or provided an invalid glob expression. Note that glob expressions must be defined according to https://www.npmjs.com/package/micromatch.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 20, 2025

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

@mehmetozguldev
Copy link
Contributor Author

I have read the CLA Document and I hereby sign the CLA

github-actions bot added a commit that referenced this pull request Nov 20, 2025
Code preview now shows 5 lines when it's collapsed.
@mehmetozguldev mehmetozguldev marked this pull request as ready for review November 21, 2025 22:47
@nx-cloud
Copy link

nx-cloud bot commented Nov 21, 2025

🤖 Nx Cloud AI Fix

Ensure the fix-ci command is configured to always run in your CI pipeline to get automatic fixes in future runs. For more information, please see https://nx.dev/ci/features/self-healing-ci


View your CI Pipeline Execution ↗ for commit 6b45c1e

Command Status Duration Result
nx run-many --nx-bail --target=build --parallel ✅ Succeeded 53s View ↗
nx run-many --target=test --parallel ✅ Succeeded 2m 53s View ↗
nx run-many --target=lint --parallel ✅ Succeeded 3s View ↗

☁️ Nx Cloud last updated this comment at 2025-11-21 23:09:53 UTC

@mehmetozguldev mehmetozguldev changed the title feat: add markdown rendering [WIP] feat: add markdown rendering Nov 21, 2025
@samuelstroschein
Copy link
Member

Tested on my machine. Looks good!

/tip $100

@samuelstroschein
Copy link
Member

/tip $100

@algora-pbc
Copy link

algora-pbc bot commented Nov 22, 2025

Please visit Algora to complete your tip via Stripe.

@samuelstroschein samuelstroschein merged commit 644430c into opral:main Nov 22, 2025
2 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Nov 22, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants