DSH gets a real markdown editor: QuireKit's multi-mode, lezer-optimized plugin goes open source
DSH users can now edit long markdown documents without leaving the agent, and the underlying lezer changes point to a concrete way to keep incremental parsing fast on very large files. For anyone embedding markdown editors, the batched-comment-to-agent flow is a working example of turning editor annotations into agent work items.
QuireKit's dsh-quirekit-md-editor turns DSH's read-only markdown preview into a full editing experience. The editor is built on codemirror with a tiptap-style API, and supports pure source mode, a hybrid mode that shows selected blocks as raw markdown, and a full rich-text mode that hides all fences while keeping the underlying document as markdown. Menus, comments, and formatting operate across all modes.
The most consequential work is in the parser. QuireKit vendors codemirror and modified lezer's incremental parsing: unchanged groups of nodes are reattached wholesale instead of block-by-block, so typing in a 3-million-character document costs about the same as in a 100-thousand-character one. Measurements show syntax-tree visits dropping from 107,760 to 1,380 and comparisons from 153,940 to 660. Complex structures like large lists fall back to the original logic for correctness.
Beyond editing, the plugin ships a formula editor, diagram support (mermaid, plantUML, Graphviz, flowchart, mind map, Excalidraw), and a comment system that can send selections or entire comment batches to DSH for agent-driven fixes. It requires DSH 0.2.2-rc.1 or above and installs via `dsh plugin --profile web add dsh-quirekit-md-editor`. The editor itself is available as `@quirekit/md-editor` for embedding.
The performance numbers show that incremental parsing can be made dramatically cheaper by reusing tree groups, not just blocks; this is a pattern other markdown editors could adopt.
Batch comment-to-agent turns the editor into a review surface: instead of pasting snippets one by one, a user can annotate multiple issues and send them as a single work order.
Building rich-text on codemirror rather than tiptap avoids the markdown-formatting round-trip problem, letting all modes share one underlying md string.
The author is explicit about integrating into agent products rather than competing with them, which is a pragmatic positioning for editor tooling in the AI era.