ouroboros/web/vendor/katex
Andrei Kaznacheev f711356db9 feat: rich markdown rendering for chat messages
Renders assistant and system chat messages through a real markdown pipeline,
adapted from a downstream production deployment.

New web/modules/chat_markdown.js owns the renderer: an isolated marked 18.0.7
instance plus DOMPurify 3.4.14, highlight.js 11.11.1, KaTeX 0.17.0, lazily
loaded mermaid 11.16.1, and bounded ```chart``` fences that reuse the page's
existing Chart.js. Raw inline HTML stays literal. Links go through a
chat-local URL policy: external http(s)/mailto via the shared safeExternalUrl
plus the canonical /api/files/download form, with rendered anchors hardened.
KaTeX runs without the single-dollar delimiter so ordinary prices are not
mistaken for math. An enhance/destroy lifecycle owns charts, listeners and
timers, and chat.js invokes its disposers when bubbles are removed.

utils.renderMarkdown is untouched, so chat activity and skill-review cards
keep their existing lightweight rendering. Vendored assets are copied
byte-for-byte from official releases and pinned by SHA-256 in
web/vendor/VENDOR-MANIFEST.md, with licenses committed alongside.

The chat module is byte-frozen, so its integration uses short aliases to keep
the delta within budget.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-30 20:11:49 +04:00
..
contrib feat: rich markdown rendering for chat messages 2026-08-30 20:11:49 +04:00
fonts feat: rich markdown rendering for chat messages 2026-08-30 20:11:49 +04:00
katex.min.css feat: rich markdown rendering for chat messages 2026-08-30 20:11:49 +04:00
katex.min.js feat: rich markdown rendering for chat messages 2026-08-30 20:11:49 +04:00