zerob13/dsh-better-markdown 预览 preview

zerob13/dsh-better-markdown

基于markstream-react的DeepSeek Harness Web插件,支持弹性流式Markdown、Mermaid图表、KaTeX数学公式,并具备安全渲染器回退功能。

Project Overview项目介绍

dsh-better-markdown is a native plugin built exclusively for DeepSeek Harness Web. It replaces the default streaming Markdown rendering pipeline with markstream-react, a React library optimized for handling partial, incomplete Markdown output from streaming LLM tokens. The plugin supports all common Markdown features, plus extended features like tables, KaTeX math, Mermaid diagrams, and Shiki syntax highlighting for code blocks. It leverages DeepSeek Harness’s public extension API, so it does not require modifying the core Harness source code, and will automatically fall back to the built-in renderer if the plugin encounters any errors during rendering.

The plugin targets users of DeepSeek Harness Web who want a smoother, more consistent rendering experience for chat responses from LLMs. Once installed, every assistant message in the conversation view, whether it is still streaming output or has been fully generated, is rendered by markstream-react. This eliminates the UI flicker that can happen when switching renderers after a stream completes. It also inherits Harness’s existing security policies for raw HTML content and external links, so no additional security risks are introduced to your Harness instance.

dsh-better-markdown is released under the permissive MIT open source license, so it is free to use, modify, and distribute. It is compatible with DeepSeek Harness version 0.1.0-rc.5 and newer, and if you choose to install it from source, you will need Node.js 20+ and pnpm 10+ installed on your system. Installation can be completed in a few simple steps via the dsh CLI tool, and the full bundle includes Mermaid and Shiki so it works offline right after install. When you uninstall the plugin, Harness automatically restores its original built-in Markdown renderer.

dsh-better-markdown 是专为 DeepSeek Harness Web 开发的原生插件,用于替换 Harness 原有的流式 Markdown 渲染链路,使用 markstream-react 处理大模型输出的流式 Markdown 内容,支持通用 Markdown 语法、表格、任务列表、KaTeX 数学公式、Mermaid 图表和 Shiki 代码高亮。插件基于 Harness 公开的扩展接口开发,不会修改 Harness 本身的源代码,渲染出错时会自动回退到原渲染器。

这款插件面向需要更流畅流式渲染体验的 DeepSeek Harness Web 用户。安装完成后,聊天窗口中所有助手发送的消息,无论处于流式输出中还是已经输出完成,都会统一使用 markstream-react 渲染,避免了流式输出完成时切换渲染器导致的 UI 闪烁。对于原始 HTML 和外部链接,插件遵循 Harness 原有的安全限制策略,避免引入安全风险。

该插件采用 MIT 许可证开源,可免费使用和修改。它支持 DeepSeek Harness 0.1.0-rc.5 及以上版本,如果从源码安装则需要 Node.js 20+ 和 pnpm 10+ 环境。安装可通过 dsh 命令行工具直接完成,打包包含 Mermaid 和 Shiki 可离线使用,卸载插件后会自动恢复 Harness 原有的渲染器。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 1 note1 项提示
  • 19 stars - an early-stage project星标 19,属于早期项目
DSH walks through these 9 checksDSH 会逐条核对这 9 项

Compatibility兼容性

  • DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
  • External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
  • Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册

Security安全性

  • Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
  • Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
  • curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
  • Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
  • Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
  • Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式

Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。

Or use CLI install (for developers)或使用命令行安装(适合开发者)

CLI Install命令行安装

dsh plugin --profile web add dsh-better-markdown

把 zerob13/dsh-better-markdown 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

dsh-better-markdown — fast streaming Markdown for DeepSeek Harness

dsh-better-markdown

用 markstream-react 替换 DeepSeek Harness Web 的流式 Markdown 渲染链路。

GitHub stars npm version CI License: MIT DeepSeek Harness markstream-react 0.0.55 Mermaid 11

中文 · English

dsh-better-markdown 是一个 DeepSeek Harness Web 客户端插件。安装后,Web 对话中所有带流式状态的 assistant Markdown 都由 markstream-react 解析和渲染;同一消息流结束后继续使用同一个 renderer,不会在完成瞬间切回另一套 Markdown 实现。

markstream-react 是 Simon-He95/markstream-vue monorepo 提供的 React 版本。本插件在 Harness 中使用的是 React package,不会引入 Vue runtime。

为什么使用 Markstream React

  • 面向流式输出:可持续处理尚未闭合的粗体、代码围栏、列表、表格和数学表达式,适合 LLM token stream。
  • 减少完成态切换:流式与 settled assistant message 共用 Markstream renderer,避免完成时替换整棵 Markdown UI。
  • 更丰富的 Markdown:支持常用 Markdown、表格、任务列表、引用、链接、图片、KaTeX 数学公式和 Mermaid 图表。
  • 兼容 Harness 滚动区:关闭不适用于聊天内部滚动容器的 viewport lazy mounting,避免可见内容停留在骨架占位状态。
  • 完整 Markstream 代码块:fenced code 由 Markstream MarkdownCodeBlockNode 与 stream-markdown 渲染,使用 Shiki 流式高亮,并保留语言标题、复制和展开操作;reasoning、附件、停止状态仍保持 Harness 原行为。
  • 安全边界明确:原始 HTML 使用 htmlPolicy="escape";链接、图片和 settled file mention 继续执行 Harness 的限制策略;Mermaid 使用 strict mode。

Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →

← 上一个 Prev dsh-file-review-tab 下一个 Next awesome-deepseek-harness →