mirror of
https://github.com/razzant/ouroboros.git
synced 2026-10-03 04:07:04 +00:00
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> |
||
|---|---|---|
| .. | ||
| katex | ||
| licenses | ||
| VENDOR-MANIFEST.md | ||