Skip to content

feat: Add syntax highlighting to agent message code blocks#1119

Merged
charlesvien merged 2 commits intomainfrom
03-04-syntax_highlighting
Mar 5, 2026
Merged

feat: Add syntax highlighting to agent message code blocks#1119
charlesvien merged 2 commits intomainfrom
03-04-syntax_highlighting

Conversation

@charlesvien
Copy link
Member

@charlesvien charlesvien commented Mar 4, 2026

Closes #1050

  1. Add Lezer-based syntax highlighting using existing CodeMirror language parsers
  2. Create HighlightedCode component for rendering colorized code segments
  3. Wire fenced code blocks in MarkdownRenderer to use the new highlighter
  4. Support 20+ languages (TS, JS, Python, Rust, Go, HTML, CSS, SQL, etc.)
  5. Include both dark and light theme palettes with parser caching

@charlesvien charlesvien force-pushed the 03-04-suppress_prompt-complete_notification_when_messages_are_queued branch from 0aa04cf to 458c625 Compare March 4, 2026 23:36
@charlesvien charlesvien force-pushed the 03-04-syntax_highlighting branch from edc7d79 to 81182bd Compare March 4, 2026 23:36
@charlesvien charlesvien force-pushed the 03-04-suppress_prompt-complete_notification_when_messages_are_queued branch from 458c625 to 4284713 Compare March 4, 2026 23:57
@charlesvien charlesvien force-pushed the 03-04-syntax_highlighting branch from 81182bd to 37a9ac1 Compare March 4, 2026 23:57
@charlesvien charlesvien force-pushed the 03-04-suppress_prompt-complete_notification_when_messages_are_queued branch from 4284713 to e244743 Compare March 5, 2026 01:58
@charlesvien charlesvien force-pushed the 03-04-syntax_highlighting branch from 37a9ac1 to ed67f0f Compare March 5, 2026 01:58
@charlesvien charlesvien force-pushed the 03-04-syntax_highlighting branch from ed67f0f to 3db5a1c Compare March 5, 2026 04:44
@charlesvien charlesvien force-pushed the 03-04-suppress_prompt-complete_notification_when_messages_are_queued branch from e244743 to 55cff69 Compare March 5, 2026 04:44
@charlesvien charlesvien marked this pull request as ready for review March 5, 2026 04:47
@charlesvien charlesvien force-pushed the 03-04-suppress_prompt-complete_notification_when_messages_are_queued branch from 55cff69 to ec0db5f Compare March 5, 2026 05:20
@charlesvien charlesvien force-pushed the 03-04-syntax_highlighting branch from dda239f to ca24cdf Compare March 5, 2026 05:20
@charlesvien charlesvien force-pushed the 03-04-suppress_prompt-complete_notification_when_messages_are_queued branch from ec0db5f to ea1bb04 Compare March 5, 2026 05:23
@charlesvien charlesvien force-pushed the 03-04-syntax_highlighting branch from ca24cdf to eefc2af Compare March 5, 2026 05:23
@charlesvien charlesvien force-pushed the 03-04-suppress_prompt-complete_notification_when_messages_are_queued branch from ea1bb04 to 8d5d350 Compare March 5, 2026 07:20
@charlesvien charlesvien force-pushed the 03-04-syntax_highlighting branch from eefc2af to 5ba2910 Compare March 5, 2026 07:20
@charlesvien charlesvien force-pushed the 03-04-suppress_prompt-complete_notification_when_messages_are_queued branch from 8d5d350 to 4d87100 Compare March 5, 2026 07:52
@charlesvien charlesvien force-pushed the 03-04-syntax_highlighting branch from 5ba2910 to 29c8d7f Compare March 5, 2026 07:52
@charlesvien charlesvien force-pushed the 03-04-syntax_highlighting branch from 29c8d7f to 4b4f995 Compare March 5, 2026 08:39
@charlesvien charlesvien force-pushed the 03-04-syntax_highlighting branch from 4b4f995 to 7075527 Compare March 5, 2026 08:53
@charlesvien charlesvien force-pushed the 03-04-suppress_prompt-complete_notification_when_messages_are_queued branch 2 times, most recently from 213e7bf to 6dcb2f9 Compare March 5, 2026 09:09
@charlesvien charlesvien force-pushed the 03-04-syntax_highlighting branch from 7075527 to 0558c25 Compare March 5, 2026 09:09
@charlesvien charlesvien force-pushed the 03-04-suppress_prompt-complete_notification_when_messages_are_queued branch 4 times, most recently from 8781ad8 to 4057594 Compare March 5, 2026 09:24
@graphite-app graphite-app bot changed the base branch from 03-04-suppress_prompt-complete_notification_when_messages_are_queued to graphite-base/1119 March 5, 2026 09:27
@charlesvien charlesvien force-pushed the 03-04-syntax_highlighting branch from 0558c25 to 229cdc4 Compare March 5, 2026 09:29
@charlesvien charlesvien changed the base branch from graphite-base/1119 to 03-04-suppress_prompt-complete_notification_when_messages_are_queued March 5, 2026 09:29
Base automatically changed from 03-04-suppress_prompt-complete_notification_when_messages_are_queued to main March 5, 2026 09:32
@charlesvien charlesvien force-pushed the 03-04-syntax_highlighting branch from 229cdc4 to ae2c8e9 Compare March 5, 2026 09:32
Copy link
Member Author

charlesvien commented Mar 5, 2026

Merge activity

  • Mar 5, 9:33 AM UTC: Graphite rebased this pull request as part of a merge.
  • Mar 5, 9:35 AM UTC: @charlesvien merged this pull request with Graphite.

@charlesvien charlesvien merged commit fc98bb0 into main Mar 5, 2026
13 checks passed
@charlesvien charlesvien deleted the 03-04-syntax_highlighting branch March 5, 2026 09:35
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.

Detect language in code blocks sent by the agent and show syntax highlighting

2 participants