본문으로 건너뛰기
Q

dsh-quirekit-md-editor

quirekit/dsh-quirekit-md-editor

Edit Markdown in place in the right sidebar and send inline comments to the agent, which resolves each one it handles.

설치

dsh plugin --profile web add github:quirekit/dsh-quirekit-md-editor

README

QuireKit MD Editor for DeepSeek Harness

Edit Markdown where the agent writes it, and hand your comments back to the agent.

License: MIT npm DeepSeek Harness

English | 简体中文

A Markdown document open in the editor, with a callout, diagram, table, formula and a comment beside the text

DeepSeek Harness previews Markdown in its right sidebar. This plugin makes that preview editable: open a .md file, change the rendered document, and it saves back to the same file. The editor is QuireKit MD Editor, which you can try on its website.

Highlights

  • Comments drive the agent. Comment on a passage and send it to the agent. After making the change, the agent marks that comment resolved. Comments it did not act on stay open.
  • Fast on long documents. In a 1,000,000-character document, a keystroke updates the editor in 2.4 ms at the median and 3.0 ms at p95. See Performance.
  • Your file stays yours. It is still plain Markdown. Only what you edit changes, and the rest stays byte-for-byte identical. Comments live in a separate file.

Two comments written in the DeepSeek Harness desktop app and handed to the agent together; ten seconds later the edits are made and both comments are marked resolved

Why this editor

Several plugins can edit Markdown in DeepSeek Harness. This one is built around what happens after the agent has written a document: you read it, change it and tell the agent what to fix.

  • Comments are part of the editor. Threads with replies sit beside the text and follow it as the document changes. Each one can go to the agent and close itself when the work is done.
  • Every edit is an edit to the plain Markdown text. Visual, Markup and Source are one CodeMirror editor that only displays the text differently. The file is not regenerated from a document tree, so a one-character edit is a one-character diff, even with setext headings, * and + lists, tilde fences, raw HTML or unusual tables. npm run benchmark:fidelity checks this in all three modes.
  • The plugin and the editor are built together. QuireKit builds the editor on optimized versions of CodeMirror and Lezer, and everything the plugin needed went into its public API.

Demo

In the DeepSeek Harness desktop app: sending a selection to the agent, handing comments over and watching them resolve, and turning a plain document into one with diagrams; then the same Markdown in the built-in DeepSeek Harness preview, the three editing modes side by side, and comments across those modes. Some parts are sped up, as labelled on screen.

https://github.com/user-attachments/assets/fadc2a40-9e9d-4124-9d1a-ece760a4b7ab

Features

Editing

  • Three modes, remembered per tab: Visual hides Markdown marks, Markup shows them on the current paragraph, and Source shows everything.
  • Math, Mermaid, PlantUML, tables, footnotes and frontmatter render in place. Whiteboards, flowcharts and mind maps can be inserted, with their data stored in the Markdown.
  • Saves as you type, or with Cmd/Ctrl+S.
  • Pasted images are saved to assets/ beside the document and referenced by relative path.
  • Follows the DeepSeek Harness language and light or dark theme.

Working with the agent

  • Send selected text to the composer with its file path and lines, then decide whether to send it.
  • Send one comment or all open comments. The agent resolves each one it handles through the resolve_document_comment tool.
  • If the agent changes the file, the editor updates when you have nothing unsaved. If you do, it asks which version to keep and never overwrites silently.
  • The bundled quirekit-markdown Skill lets the agent write callouts, collapsible sections, Mermaid, PlantUML and math.
  • Local screenshots display from relative and absolute paths. Only image files are read.

A document written by the agent, with a sequence diagram and a flowchart rendered in the editor

The comment rail can be hidden and shown at any time, and the toolbar menu switches back to the official Markdown preview.

Installation

Requires DeepSeek Harness >=0.2.2-rc.1 <0.3.0, on the web or desktop.

dsh plugin --profile web add dsh-quirekit-md-editor

Restart dsh web, then open a Markdown file from the Files tab.

On desktop, open the Plugins page, choose Add plugin, enter dsh-quirekit-md-editor, then enable it.

To install from source:

npm install
npm run build
dsh plugin --profile web add file:/absolute/path/to/dsh-md-editor

Settings

On the DeepSeek Harness Plugins page you can choose the default mode, whether the mode switch appears, and whether the formatting toolbar is fixed, floating or hidden. Settings are saved in this browser.

Performance

These numbers come from the same editor code the plugin runs, in a browser engine with no native rendering layer. A keystroke in a document ten times longer costs less than a third more, and most of the remaining cost comes from the number of blocks. That comes from QuireKit's work on two open-source cores:

  • An optimized Lezer. Unchanged groups of the syntax tree are reused whole after an edit, so incremental parsing no longer grows with document length. The editor also skips its second parse pass when link definitions did not change.
  • An optimized CodeMirror. On top of drawing only the visible part, it draws further ahead during fast scrolling, and it locks the content height while rebuilding the drawn window so the scroll position stays put.
DocumentCharactersModeOpenUpdate p50p90p95p99Next frame p50Next frame p95
Long-form100,000Visual145 ms2.02.32.53.18.910.0
Long-form100,000Markup115 ms2.02.42.53.49.210.2
Long-form100,000Source106 ms1.61.92.12.88.89.8
Long-form1,000,000Visual113 ms2.42.93.03.49.110.2
Long-form1,000,000Markup117 ms2.63.03.24.59.010.1
Long-form1,000,000Source106 ms1.82.22.32.88.99.8
Structure-heavy1,000,000Visual144 ms6.46.87.010.99.110.8
Structure-heavy1,000,000Markup141 ms6.67.17.39.39.310.5
Structure-heavy1,000,000Source112 ms2.63.33.64.98.810.0

Times are in milliseconds, over 200 keystrokes typed mid-document, with cold inputs included. Measured on an Apple M3 Max running other work, in Chromium 149.

The editor runs in its own iframe, so the DeepSeek Harness page's styles don't affect it. In the real sidebar (1,000,000 characters, Visual mode, 100 keystrokes), input through processing and layout takes about 4 ms at p50 and about 5 ms at p95.

  • Update is from key press to the editor accepting the new document.
  • Next frame is from key press to the frame carrying the new text being produced.
  • Open is from creating the editor to its first paint.
  • Long-form documents have some structure every few thousand characters. Structure-heavy documents have a table, code block or callout about every 400 characters, the worst case here, with cost growing with the number of blocks.

Keys are sent through the browser's automation protocol, so this excludes the keyboard, operating system, input method and display. Results vary by machine. To run it yourself:

npm install
npx playwright install chromium
npm run benchmark

It prints this table and saves the raw summary to build/benchmark/results.json. The scenarios are in benchmark/. npm run benchmark:fidelity runs the source-preservation check.

Built on QuireKit

QuireKit is an open-source framework for building document editors, and this plugin is one small example of what it can do. The editor you use here is also a component for your own product:

npm install @quirekit/md-editor

See the integration guide. QuireKit also includes MSFE, the source-first Markdown framework underneath this editor, a block editor, and a paginated editor that lays out real pages in the browser.

Permissions

  • Editing follows the session sandbox mode, so documents are read-only in read-only sessions.
  • Only regular files inside the workspace can be saved, and final symlinks are not followed. Markdown outside the workspace opens read-only.
  • Relative images in a document can only read image files inside the workspace.
  • Every request passes DeepSeek Harness authentication and same-origin checks.

Limitations

  • Files are limited to 4 MB and images to 20 MB.
  • Files that mix LF and CRLF cannot be edited. Normalize the line endings or switch to the Markdown preview.
  • Pasting images needs a local workspace, because the DeepSeek Harness file service can currently only write text.
  • Opening a Markdown file loads about 5.8 MB of editor code and styles (about 1.8 MB gzipped). The formula editor, whiteboard and diagram engines load only when a document needs them. The installed package is about 38 MB.
  • The editor runs in an iframe: DeepSeek Harness keyboard shortcuts don't reach it while it has focus, and its menus stay inside the sidebar.
  • With dsh-marktext and dsh-better-sidebar also enabled, .md files open in this editor by default.

Development

npm install
npm test
npm run build

The build writes lib/client.js and regenerates THIRD_PARTY_NOTICES.md from what was actually bundled.

To build or benchmark against a QuireKit checkout:

QUIREKIT_LOCAL=/absolute/path/to/quirekit npm run build
QUIREKIT_LOCAL=/absolute/path/to/quirekit npm run benchmark

Contributing

Issues and pull requests are welcome. Please run npm test before opening a pull request, and include npm run benchmark results for changes that may affect typing.

License

MIT. Bundled dependencies are listed in THIRD_PARTY_NOTICES.md.

관련 플러그인