dsh-math-tex: Fix KaTeX error (red) formulas before persistence
DSH renders Markdown math using KaTeX; when parsing fails, it displays the source code in #cc0000 with no frontend configuration options. dsh-math-tex is a host-side plugin by EnhydraLutristus that reduces formatting errors via system prompt rules. It detects error colors and repairs content on the llm/stream using the same KaTeX version as the client, supporting both $ and \( \) delimiters. Install via `node tools/install.mjs` and configure with `cordis.patch.yml`; options like repair, promptRules, and maxHold are adjustable. Operating purely on the host without deleting math content, it is suitable for users frequently writing derivations. Since it runs with DSH process privileges, please review the source code and MIT license before installation.
Read More