fix(agent): render dollar-delimited math correctly - #5988
Conversation
Block $$ equations were forced inline (a leftover toggle), static markdown ignored the node's inline flag, and coding-agent TeX delimiters (\( \) / \[ \]) were not parsed. Agent replies now render display math and those delimiters the same way chat already renders $$. Co-authored-by: Wolf Mermelstein <wolf@404wolf.com>
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Team Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (8)
Included review availability: Your plan provides up to 8 included reviews per hour; 5 remain after this review. 📝 SummarySummary by CodeRabbit
WalkthroughThe change adds inline and block TeX equation transformers for Markdown, including Merge Risk: ⚪ Minimal · up to This localized change adds LaTeX rendering support to agent transcripts while preserving the existing restricted KaTeX rendering path; no actionable merge-blocking risk remains beyond normal checks and review. 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
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 |
Co-authored-by: Wolf Mermelstein <wolf@404wolf.com>
Typecheck failed because MultilineElementTransformer.replace passes LexicalNode[] | null, not undefined. Co-authored-by: Wolf Mermelstein <wolf@404wolf.com>
Align the multiline equation helper with Lexical's replace signature so tsc accepts children, startMatch, and endMatch. Co-authored-by: Wolf Mermelstein <wolf@404wolf.com>
Co-authored-by: Wolf Mermelstein <wolf@404wolf.com>
Summary
$...$and$$...$$math syntax$$equations as display math instead of forcing them inline$, single-line$$, and multiline$$Scope
This intentionally does not add
\(...\)or\[...\]parsing and does not change the shared math prompt.Validation
bunx vitest run --project lexical-core ../../packages/lexical-core/tests/katex.test.ts— 3 passedbun run type-check— passedWalkthrough
agent_dollar_math_rendering_stable.mp4
To show artifacts inline, enable in settings.