EnhydraLutristus/dsh-math-tex ↗★ 0
dsh-math-tex
Keeps DSH math derivations readable: prompt rules plus a pre-persistence stream guard that repairs any math region the renderer would paint red. 适合频繁处理数学公式推导、需要防止KaTeX渲染报错的用户。
설치
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:EnhydraLutristus/dsh-math-tex配置
在 profile 的 cordis.patch.yml 里按 id 设置:
- id: dsh-math-tex
name: dsh-math-tex
config:
repair: auto
logFile: C:/tmp/math-tex.log
| 选项 | 默认 | 说明 |
|---|---|---|
enabled | true | false 时两道防线都不挂载 |
promptRules | full | full / minimal / off,规则集大小 |
repair | auto | auto 改写 / check-only 只记日志不改写 / off 完全放行 |
tailBuffer | 15 | 最少扣住多少个字符,避免完成记号被逐字泄漏 |
maxHold | 600 | 单个未闭合区域最多等多少字符,超了就原样放行(宁可不管,不可卡住) |
logFile | '' | 诊断日志路径;留空则只走 host logger |
katexPath | '' | 指定 KaTeX 位置,默认自动按 profile 解析 |
macros | {} | 传给渲染器的宏,与客户端行为保持一致 |
未知键报错而不是静默忽略——写错的选项看起来像生效了,比没有这个选项更糟。