快速了解
它能做什么
为 DSH Web 编辑器提供的 CodeMirror Markdown 笔记本面板。
本站提供的是中文说明,不代表该项目或 Plugin 自身提供中文界面;语言支持请以上游文档为准。
Web Profile
DSH family ^0.1.2-alpha.5; @deepseek-ai/cordis ^4.0.1
证据已验证
核对日期 2026/9/13 UTC 14:05
有代码证据的贡献
它为 DSH 增加什么
新增编辑器切换按钮和基于 CodeMirror 的 Markdown 编辑卡片,并与原生编辑器共享会话草稿。
机制证据 ↗选择前先看
这个第三方 DSH Web 插件会在编辑器上方加入可切换的 Markdown 笔记本。它提供语法高亮、编辑/预览标签、面向列表的键盘编辑,以及 Mod+Enter 提交;草稿会在当前会话中与原生编辑器保持同步。
适合谁
希望在编写提示词时使用更大、更适合 Markdown 的编辑界面的 DSH Web 用户。
常见任务
- 编写带表格、任务列表、代码块和引用块的 Markdown 提示词。
- 使用 Enter、Tab 和 Shift-Tab 创建、缩进、反缩进或退出 Markdown 列表。
- 提交前预览经净化处理的 Markdown 渲染结果,且不改动原始草稿。
- 关闭后重新打开笔记本,保留当前会话草稿。
权限与数据
在浏览器编辑器和会话提交流程中工作。
权限- 访问当前会话的编辑器草稿。
- 用户提交时使用会话服务的发送操作。
- 在每个会话的存储中保留笔记本草稿,面板关闭和界面重新挂载后仍可恢复。
- README 说明完整刷新页面会丢弃草稿,未使用持久化键。
局限
- 尚未集成斜杠命令或文件提及触发器。
- 不支持通过粘贴或拖放添加图片附件。
- 修改或删除前面的有序列表项后,不会重新编号后续项目。
- 本次审核未在真实 DSH 环境中执行安装、运行或性能测试。
DSHub 已核对
- 已验证固定 Git bundle 的结构和 patch。
- 包声明了 Web 客户端集成及所列 DSH peer dependencies。
- 源码文档说明了界面行为、安装命令和已知限制。
DSHub 未核对
- 在真实 DSH profile 中完成安装或运行。
- 实际浏览器性能,包括文档说明的包体积影响。
- npm 包是否对应此仓库;其 repository 元数据与来源不一致。
固定版本安装
安装 DSH Rich Editor
这个Plugin Bundle没有 DSH Plugin 安装操作,请根据源码文档使用真实交付方式。
维护者原文
项目 README
@mars.liu/dsh-rich-editor
English | 中文

Third-party DeepSeek Harness web plugin: a rich Markdown notebook for the composer region. Its browser half contributes two entries to the composer region that dsh-client-ui-conversation owns: a tool-row toggle (conversation.input.left) and an editor card in the composer context stack (conversation.input.dock). Both entries share one per-session store handle, so the in-progress draft survives closing and reopening the panel, surface remounts, and — because the engine scopes session stores by session id — each session keeps its own notebook.
The editor is a CodeMirror 6 instance over the Markdown language: syntax highlighting for the draft (GFM tables included), native undo/redo and selection, and Enter-key list editing in the Codex style — pressing Enter on a non-empty list item opens the next item (ordered markers increment 1. → 2., checkbox items reopen unchecked, indentation is preserved, and a mid-line caret splits the item), while Enter on an empty item drops the marker and returns the line to plain-text editing. Enter on a non-list line falls through to a plain newline. Tab and Shift-Tab steer list depth: Tab on a list item indents it one level, Shift-Tab outdents one level, and Shift-Tab on a top-level item exits the list (marker and checkbox drop, the text stays); both decline on non-list lines to the editor defaults. Mod+Enter submits.
An Edit / Preview pair of tabs sits at the card's top edge. Preview renders the live draft through marked and sanitizes the result with DOMPurify before it touches the DOM — a read-only look at the formatted Markdown (GFM tables, task lists, fenced code, blockquotes), never a modification of what gets submitted: the draft text rides the send path verbatim. Toggling to Preview hides the CodeMirror host instead of unmounting it, so undo history and caret survive the round-trip.

Submission rides the scope-addressed conversation service's send verb — the same path the plain composer's submit rides — so adjudication, queueing, and prompt-error reporting behave exactly like a typed prompt. A failed send surfaces on the session's composer notice channel and the panel keeps its draft.
The notebook and the native composer are two editing surfaces over one draft: opening the panel adopts whatever the native editor already holds (an empty composer instead receives the notebook's kept draft); while the panel is open, every edit on either side mirrors live to the other — notebook edits ride the session input facade's single setDraft write path, native edits flow back through a subscription on the facade's InputState store applied as a minimal-diff splice (an equality guard breaks the echo loop and preserves a caret outside the edited range); closing leaves the final text in the native editor, and a successful submit clears both surfaces.

Install
dsh plugin --profile web add @mars.liu/dsh-rich-editor
The package carries its own bundle patch (cordis.patch.yml adds the ui-rich-editor row); list the bundle in the profile's dsh.profile.bundles if you compose profiles by hand. From a checkout:
pnpm install && pnpm run build && pnpm test
Requires the dsh family at ^0.1.2-alpha.5 (published on npm; the 0.1.2 line removed dsh-client-runtime / dsh-client-web-react, whose APIs now come from dsh-client-store, dsh-client-ui-renderer, dsh-api-session-controller and dsh-session) and a dsh web composition that mounts dsh-client-ui-conversation.
Development notes
The npm 0.0.1-rc.1 dsh snapshot ships browser loader bundles only — its node halves export almost nothing, and several pre-rename dependency names (dsh-compact, dsh-user-interaction, dsh-type-meta, dsh-client-ui-slash) were never published. This repo works around both:
package.json > overridespoints the missing names at empty stubs undervendor/stubs/(nothing in this plugin's surface imports them);vitest.config.tsresolves every@deepseek-ai/*specifier through thepathsmap of a local harness checkout'stsconfig.base.json(DSH_CHECKOUT, default../deepseek-harness) and inlines all@deepseek-ai/dsh-client-*packages, mirroring how in-repo dsh tests reach client APIs.
Drop both workarounds when the dsh family republishes a complete, installable closure.
Known Limitations and Deferred Work
- Ordered renumbering is deferred — continuing an ordered list increments the new item's marker, but editing or removing earlier items does not renumber the following ones.
- No
/and@trigger integration yet — the notebook does not participate in the slash-command and file-mention pipeline; those gestures belong to the plain composer below it. - Draft is session-lifetime only — the store keeps the draft across remounts and tab switches, but a full page reload discards it (no persistence key).
- No attachment intake — pasting or dropping images into the notebook is not wired to the session's image attachment path.
- The browser bundle inlines ~268 kB gzip of CodeMirror —
@codemirror/lang-markdownstatically depends on@codemirror/lang-html(which pulls the JavaScript and CSS parsers) even with embedded code highlighting off (codeLanguages: []), and the client bundler inlines the whole chain; a deferred trim would split the editor mount behind a dynamic import.
License
MIT
有意识地管理
安装与管理
前置条件与目标 Profile
目标: Web Profile
交付方式: Git Bundle — MarchLiu/dsh-rich-editor#4d18eb5675dcc5a6d917a7612697d79216bb9321。
验证、更新与移除
显示生命周期命令
dsh plugin --profile web list兼容性与访问范围
Requires a DSH web composition with the conversation UI mounted: DSH family ^0.1.2-alpha.5; @deepseek-ai/cordis ^4.0.1。
风险事实
证据与编辑审查Manifest、Bundle patch、分发与新鲜度
不可变证据
审查状态与源码活动
由于记录标记 npm repository 元数据不匹配,建议优先以固定 Git bundle 来源进行评估。
AI 审查于 2026/9/13 UTC 14:06。GitHub 事实核对日期: 2026/9/13 UTC 14:06。
自当前证据基线以来,没有记录到重要源码变化。