DeepSeek Harness Plugin Hub

发布与管理完整 Harness Profiles,发现适合你的插件。

探索

插件目录环境预设文档中心动态

社区

发布插件联系我们报告问题

相关链接

Plugin Hub GitHubDeepSeek Harness 官方项目系统状态隐私说明
© 2026 DeepSeek Harness Plugin HubPowered byPaxTech

独立、非官方社区项目,与 DeepSeek 官方无隶属、授权或背书关系。

Latex — DeepSeek Harness 插件(DSH Plugin)
DeepSeek Harness Plugin Hub
ProfilesPlugins分类动态文档登录管理 Profiles
ProfilesPlugins分类动态文档登录
← Plugins
L

dsh-latex

Latex

在 DeepSeek Harness 聊天视图中渲染 LaTeX 数学公式,并让模型使用 $...$ / $$...$$ 而不是围栏代码块。

插件会安装到这里;不确定时保持 web。

npx -y @deepseek-ai/dsh plugin --profile web add github:sbVAN/dsh-latex#eb9794d4c9f118e7ed00704e0993dead1b813904
README兼容性版本

兼容性与来源证明

Latex 以 dsh-latex 发布,当前版本为 0.1.0。Plugin Hub 会校验它的 manifest,并保存精确安装来源,便于复现安装结果。

DSH 兼容范围
*
运行环境
web
发布来源
github
Registry 更新时间
2026/10/19

版本

0.1.0stable
2026/10/19
最新版
0.1.0
DSH
*
HMR
重启进程
Tree shaking
未声明可安全裁剪
解包体积
未提供
文件数
未提供
Surface
web
许可证
MIT
发布源
github
GitHub
★ 0
周下载
0
最近提交
2026/10/19
查看源码 ↗
README Badge

点击下方 Badge 复制 Markdown,粘贴到 README 即可。

这是你的 Plugin?认领权益 · 优先安全扫描

验证 package.json 声明的 GitHub 仓库,即可管理这个公开页面。认领后,Hub 会优先安排当前版本的安全扫描,并在通过后公开展示结果。

认领这个 Plugin →
报告问题

README

dsh-latex

English | 中文

Make the DeepSeek Harness chat render formulae as formulae, and make the model write LaTeX by default instead of wrapping math in latex fences.

What it fixes

DSH's frontend already renders TeX through KaTeX (MarkdownText in @deepseek-ai/dsh-client-ui-primitives), but:

SymptomCauseWhat this plugin does
Formulae show up as a grey code blockThe model writes them in ```latex / ```tex fences, which the frontend never renders (only $...$, $$...$$, \(...\), \[...\] and ```math are supported)The host half states the output contract in the system prompt; the browser half renders legacy latex/tex fences in place
During streaming the answer shows raw $ and \fracThe frontend deliberately keeps TeX literal while streaming and swaps in KaTeX once the message settlesLeft alone (upstream design); renders correctly after settling
A few formulae turn into harsh red textKaTeX strict mode: align, \si{}, \ce{} are outside the supported subsetForbidden by the prompt; the browser half turns the red error into a readable badge
Wide display math overflows the bubbleKaTeX display blocks do not scroll by defaultThe browser half adds horizontal scrolling and padding

Install

From GitHub (recommended)

dsh plugin --profile desktop add github:sbVAN/dsh-latex

Restart DeepSeek Harness afterwards, then reload the page once (the browser half needs to load the new bundle).

Development: link a local checkout

# 1. register a link dependency in the profile package.json:
#    "dsh-latex": "link:Z:/文件留存/deepseek project/dsh-latex"
# 2. create the junction (the equivalent of pnpm's link:)
New-Item -ItemType Junction `
  -Path "$env:USERPROFILE\.dsh\profiles\desktop\node_modules\dsh-latex" `
  -Target "Z:\文件留存\deepseek project\dsh-latex"
# 3. append to the profile's cordis.patch.yml:
#    - insert:
#        - id: latex
#          name: dsh-latex
# 4. restart DeepSeek Harness (the host half needs the new composition)

After that the browser half can hot-reload through HMR when hmr.root covers the plugin sources.

Configuration

- insert:
    - id: latex
      name: dsh-latex
      config:
        strict: true
        compact: false
        locale: zh
        extraRules:
          - Write water as $\mathrm{H_2O}$, never \ce{}.
KeyDefaultMeaning
enabledtrueDisables the prompt section entirely (the browser half still runs)
localeautozh / en / auto (auto follows DSH_LOCALE, LANG, defaulting to Chinese)
stricttruetrue forbids fenced formulae; false only recommends
compactfalseShorter prompt, roughly 1/3 of the tokens
order145Section order inside the system prompt (tool guidance owns 100–199)
extraRules[]Extra bullet lines appended to the contract

Behaviour

Host half (lib/index.js)

Registers ctx.systemPrompt.section({ name: 'dsh-latex:math-output', order, text }) with a contract covering inline $...$, display $$...$$, a ban on fenced formulae, the KaTeX-supported subset (aligned over align, pmatrix/bmatrix/cases, \mathrm{} over \si{}/\pu{}/\ce{}, no \label/\tag), CJK only inside \text{}, and splitting long derivations.

The section is disposed with the plugin fiber, so hot reload cannot leave duplicates. The rendered contract is written to $DSH_HOME/cache/dsh-latex/prompt.txt, mount diagnostics to mounted.json.

Browser half (lib/client.js)

  • display-math scrolling and an error badge;
  • pre > code.language-latex|tex gets a preview below it, rendered with the shared MarkdownText (no bundled KaTeX), source folded by default;
  • toolbar with show/hide source and copy LaTeX;
  • 300 ms debounce over a full scan, orphan cleanup, and root unmount when React replaces nodes.

Limitations

  • No math while streaming — that is the frontend's deliberate behaviour and this plugin does not fight it.
  • Only latex / tex fences are handled — math fences are already rendered upstream.
  • No mhchem — \ce{} / \pu{} still fail; the prompt routes them to \mathrm{}.
  • No conversation.chat.node takeover — replacing the assistant renderer means duplicating the whole message structure and breaks on upstream upgrades.
  • No history rewriting — the prompt constrains future output only; old sessions are covered by the browser half.

Rollback

Remove the junction, drop the insert line from cordis.patch.yml, restore the profile package.json, restart. No DSH file is modified.

License

MIT