From 7f05f589e7bc77a2f26463a41317ff7087e3c3a0 Mon Sep 17 00:00:00 2001 From: Simon He <57086651+Simon-He95@users.noreply.github.com> Date: Wed, 1 Jul 2026 02:17:34 +0800 Subject: [PATCH] feat(web): add Mermaid diagram rendering and off-thread KaTeX/Mermaid workers (#1226) * feat(web): add Mermaid diagram rendering and off-thread KaTeX/Mermaid workers Enable Mermaid diagram support in the web chat via markstream-vue's enableMermaid(). Set up Web Workers for both KaTeX rendering and Mermaid parsing using markstream-vue's pre-built workers (katexRenderer.worker, mermaidParser.worker), keeping heavy computation off the main thread during live streaming. * fix(web): skip Mermaid SVG subtrees in file link and markdown link rewriters processFileLinks() uses a TreeWalker that scans all text nodes in mdRef. Mermaid diagrams render as inline SVG, and diagram labels containing file-path-like strings (e.g. src/App.vue) would be replaced with HTML