Перейти к основному содержимому
U

dsh-cowrite

ultrablur/dsh-cowrite

An editable Markdown tab in the right sidebar: a block-level editing view, a preview and a source view over the same workspace file, so an agent can rewrite a section in chat while you edit it beside the conversation. Saving is a compare-and-swap on the file's mtime, so a write by the agent or another editor reloads the buffer when it is clean and raises a conflict when it is not, instead of overwriting either side. Also includes find and replace, an outline, pasted images written to an assets folder beside the document, HTML-to-Markdown paste, a TeX subset, a self-drawn mermaid subset (flowchart with subgraphs, sequence, pie) and per-language code highlighting. Not a CRDT: concurrent edits are detected and shown, never merged. Its HTTP routes have no DSH access check, so a web page open in your browser could call them.

Установка

dsh plugin --profile web add github:ultrablur/dsh-cowrite

README

DSH Cowrite · 共写文档

在 DeepSeek Harness 里,和助手编辑同一份文档。

左侧继续对话,右侧直接改稿。Cowrite 把工作区里的 Markdown 文件变成一个可编辑的侧栏标签页。你可以请助手改一段,在旁边看到文件更新,再亲手调整措辞。不用在聊天、只读预览和外部编辑器之间来回切换,也不用把助手的回复复制回原稿。

它怎么配合写作

比如你在修一份项目提案:让助手先把方案拆成两节,再点开其中一段改措辞;需要通读时切到预览,想检查原始标记时切到源码。三个视图用的是同一个工作区文件,不用维护三份副本。

  • 排版:整篇按成稿样式显示,点哪一段就编辑哪一段。
  • 预览:只读视图,适合通读和检查排版。
  • 源码:直接编辑全文,适合批量修改和精确调整。

输入后会自动保存。助手或外部编辑器写入同一个文件时,如果你没有未保存的改动,Cowrite 会刷新内容;如果有,它会提示冲突,让你决定保留哪一版,而不是静默覆盖。这是基于文件的共写,不是多人实时同步,也不会自动合并冲突。

写长文时用得上的功能

  • 定位和修改:可折叠大纲、查找替换、选区计数、字号缩放,以及焦点模式和打字机模式。
  • 插入和整理材料:粘贴或拖入图片时保存到文档旁的 assets/ 目录;从网页粘贴时可保留常见格式;表格可直接定位到单元格并增删行列。
  • 检查排版和交付:预览脚注、带高亮的代码块、常见公式和 Mermaid 子集;可导出 HTML,也可通过浏览器打印为 PDF。公式和图表不是完整的 MathJax 或 Mermaid 实现。

安装

在 DeepSeek Harness 的插件管理器里安装 GitHub bundle,填入:

github:UltraBlur/dsh-cowrite

安装后,在会话右侧栏点 + → 共写文档,或按 Cmd/Ctrl + Shift + M。从顶部下拉框选择工作区文件即可。不需要 npm 账号。

MIT 许可。完整许可证见 LICENSE。

Похожие плагины