Repository navigation
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Enable syntax highlighting for tagged Markdown code blocks in both the live TUI conversation and the detailed transcript reader. The shared Markdown hook supports 18 languages and explicit aliases, uses Maka's terminal color policy, and preserves stored message text. Unknown languages, formatter failures, and blocks over 4,096 UTF-16 code units render as plain code.
Continue the implementation from the stale-closed #5126, retaining @yuzhiyang1's original two commits and attribution. This revision adds documented language/fallback behavior, bounds synchronous work for streaming fences, and fixes ANSI whitespace classification and extra blank rows in the existing pi-tui patch so narrow wrapping matches the plain-code baseline.
Fixes #5083
Verification
npm run build,npm run typecheck,npm run lint,npm run format:check, and Desktop/UI Knip checks passed on Node 24.22.1, rebased ontod41baadba.npm testand installed-package/platform smoke tests were not run. The general dependency-patch fixture suite encounters WindowsEPERMwhile creating a symlink; the clean-tarball patch verification above passed.The images below are generated terminal renders from the actual production ANSI output, with the same Markdown and both transcript surfaces. They are not shell screenshots. Captured source, visible text, and hashes confirm unchanged source and identical visible rows.
Before
After
AI use
Tool(s) and scope: OpenAI Codex assisted with the original implementation and this continuation, including code, regression tests, validation, terminal evidence, and PR preparation. This PR is submitted at @HuYellow's direction. The original implementation by @yuzhiyang1 is retained with its commit authorship. All contribution commits carry
Generated-by: OpenAI Codex; please retain that trailer when squash-merging. Automated review does not replace independent human review.Checklist
Does this PR entail a change in behavior?