MarchLiu/dsh-rich-editor
Third-party dsh web plugin: a rich Markdown notebook for the composer region — tool-row toggle plus a CodeMirror editor card with Codex-style list editing
项目介绍Project Overview
Dsh 富文本编辑器是 DeepSeek Harness 的 Web 插件,在对话区提供 Markdown 笔记本。基于 CodeMirror 6 实现语法高亮、原生撤销重选与回车列表编辑(延续有序编号、复选框重开、缩进保留)。笔记本与原生输入框共享同一草稿,实时双向镜像,并通过 conversation.send 提交,享受与普通输入一致的队列与错误处理逻辑。适用于需要结构化长草稿或 Markdown 片段的场景。注意:草稿仅在会话生命周期内持久化,刷新即丢;当前未接入 /、@ 触发与图片附件。
Dsh Rich Editor is a DeepSeek Harness web plugin that adds a Markdown notebook to the composer. It uses CodeMirror 6 for syntax highlighting (GFM tables), native undo/redo, and Codex-style Enter list editing that continues ordered markers, reopens checkboxes unchecked, and preserves indentation. The notebook and native composer share one draft, mirroring live through the session input facade, and submit via the same conversation.send path, so queueing and error reporting match the plain composer. Use it for structured long drafts or Markdown snippets. Caveats: the draft is session-lifetime only (lost on reload), and slash triggers and image attachments are not yet wired through.
请帮我了解并安装插件:【dsh-rich-editor】【https://github.com/MarchLiu/dsh-rich-editor】
把上面这条消息直接发给当前会话里的 DSH,让它帮你了解并安装。安装命令不一定准确,发给 DSH 更稳。Send this message to DSH in your current session. CLI install commands may not be accurate across systems — DSH will figure it out for you.
或使用命令行安装(适合开发者)Or use CLI install (for developers)
命令行安装CLI Install
dsh plugin --profile web add @mars.liu/dsh-rich-editor
把 MarchLiu/dsh-rich-editor 加入你的 DSH 配置(web profile)即可启用。
READMEREADME
@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. Mod+Enter submits.

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.0.1-rc.1 (published on npm) 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.tsaliases@deepseek-ai/dsh-client-runtime/clientand.../dsh-client-locale/clientonto a local harness checkout's TypeScript sources (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
ruvnet/ruflo
amruthpillai/reactive-resume
esengine/DeepSeek-Reasonix
volcengine/OpenViking
Molunerfinn/PicGo
titanwings/colleague-skill
nocobase/nocobase
Tencent/WeKnora