dsh-web
zhu1090093659/dsh-webDeepSeek Harness(DSH)Web 插件聚合生态包 · 一切皆插件,创意工坊分发(dsh-market.com)
Live Markdown rendering and typing enhancements for the DeepSeek Harness (DSH) web composer.
dsh-composer-live turns the DSH Web input box into an Open-WebUI-style live editor: you type Markdown, it renders as you type — bold, italic, code blocks with syntax highlighting, lists, quotes, tables — while the draft itself stays plain Markdown source, so what you send is exactly what you typed.
It is a pure browser-side plugin: zero runtime dependencies, no service injection, no patches to official code. It layers on top of the official 0.1.5 Lexical composer without touching what DSH already does natively.
Looking for the DSH 0.1.x (textarea composer) version? That's
dsh-composer-md, the predecessor of this plugin — discontinued.



**bold**, *italic*, `code` (brand-blue capsule), ~~strikethrough~~, [links](url) (whitelisted protocols),  capsules.**, `, ~~, []()) are dimmed but keep their exact width, and bold/headings use paint-only faux-bold — so the rendered line stays character-for-character aligned with the invisible editor text. The caret lands precisely everywhere, including inside formatted spans, with zero drift while typing.- [ ] / - [x] render as checkbox capsules; completed items get struck through.-/*/+ markers kept, ordered markers increment (1. → 2., 3) → 4)), indentation kept. Enter on an empty item exits the list — two Shift+Enter presses end a list.> quote lines continue the same way (>text without a space counts too); Enter on an empty quote item exits.|a|b|, ≥ 2 columns) followed by Enter completes the |---|---| separator row plus a blank line, caret on the blank line.**…**. The bar is a standalone strip directly above the composer card, card-aligned width, taking no space inside the input area — it never overlaps content or image attachments.<b> tags into the draft./ commands and skill-name references are painted in the official reference colour, and the official hover background is disabled (it paints above the render layer and would cover the text).The official composer already provides — and this plugin deliberately does not reimplement: / command menu, @ file mentions, paste-image/file to attachments, Enter-to-send / Shift+Enter newline, IME protection, draft persistence.
| Input | Context | Action |
|---|---|---|
| Enter | plain line | send (official) |
| Shift+Enter | plain line | line break (official) |
| Enter / Shift+Enter | end of list / quote line | continue the marker (ordered increments) |
| Enter / Shift+Enter | empty list / quote item | remove marker, exit the list / quote |
| Enter / Shift+Enter | unclosed fence line | close the block; caret lands inside |
| Enter / Shift+Enter | table header row (≥ 2 cols) | complete separator row + blank line |
| Tab | inside a code block | insert 2 spaces at caret |
| Tab | list/quote marker or leading whitespace | indent line (nested list) |
| Tab | anywhere else | insert 2 spaces at caret |
| Tab / Shift+Tab | multi-line selection | indent / outdent the whole block |
| Shift+Tab | any line | outdent up to 2 spaces (absorbs the key when none) |
| Ctrl+B / Ctrl+I / Ctrl+E | anywhere | wrap selection bold / italic / code, or insert empty markers |
| ↓ | last content line of a closed block | jump below the block |
| Esc | menus open → official · expanded → collapse · generating → stop | context dispatch |
web profile — the plugin targets the 0.1.5 Lexical contenteditable composer.-webkit-text-fill-color.# from npm (recommended)
dsh plugin --profile web add dsh-composer-live
# or from a local checkout (file: installs are physically copied)
dsh plugin --profile web add "file:/path/to/dsh-composer-live"
Restart the web instance after installing. Plugins load from a startup snapshot; refreshing the page alone can leave old and new bundles coexisting.
Running an isolated DSH instance? Point DSH_HOME at it so the plugin installs there instead of the default ~/.dsh:
DSH_HOME=/path/to/your/.dsh dsh plugin --profile web add dsh-composer-live
Everything is on by default — install, restart, and type Markdown in the composer.
Typical flows:
```js, press Shift+Enter — a closed block appears with the caret inside. Code with live highlighting; Tab indents two spaces; press ↓ on the last content line to exit below the block.- item, press Shift+Enter to continue items; press Shift+Enter on an empty item to end the list. Tab nests, Shift+Tab un-nests.The official composer is a Lexical contenteditable editor. This plugin makes its text invisible with -webkit-text-fill-color: transparent (the color property is kept, so the caret and official decorations keep working) and paints its own rendering layer — with every rendered character positioned at the editor's real text coordinates, measured per-character from Range rects.
Because the overlay never does its own layout, alignment bugs (drift, jitter, misplacement) cannot exist by construction: measured deviation is ≤ 0.02px across scenarios, 0.00 per keystroke frame.
The plugin injects no official services. It reads the editor DOM directly and derives a "projection text" (chips → U+FFFC, <br>/paragraph boundaries → newlines), which keeps it immune to client API churn; DOM anchoring uses stable data- attributes instead of hashed CSS-module class names. Draft edits (list continuation, fence completion, indenting…) go through Lexical-native channels — synthetic beforeinput events that preserve the undo stack — never direct DOM mutation.
See docs/architecture.md for the full deep dive.
\n single-text-node draft makes per-line font switching physically impossible).web profile only; Chromium-family browsers only.node test-live.cjs # 188 unit tests (pure functions, no browser needed)
node e2e/run-e2e.mjs # 62-scenario × 10-invariant E2E suite against a live instance
The E2E runner expects a DSH web instance with this source deployed and derives everything from environment variables: DSH_CL_PORT (default 8124) and DSH_CL_DSH_HOME (defaults to DSH_HOME, then ~/.dsh) locate the deployed copy for a version check; the auth cookie is fetched automatically. See e2e/README.md for the full variable list.
The suite replays six real input channels (literal \n / literal \r\n / line-by-line br / insertParagraph / synthetic paste / refresh-restore multi-paragraph) and cross-checks an independent projection against the plugin's own, character by character.
Version discipline: every change bumps package.json and gets a CHANGELOG.md entry.
Why Chromium-only?
The transparency trick (-webkit-text-fill-color) and several caret behaviors are Chromium-specific. Firefox/Safari would need a different approach.
Does it change what I send? No. The draft is always plain Markdown source; rendering is purely visual.
Is per-character measurement slow?
It is batched per render frame and merged into a few absolutely-positioned spans. The overlay is pointer-events: none and out of flow, so it causes no reflow of the editor. Measured per-keystroke delta is 0; no perceptible input latency.
Will a DSH update break it?
Zero service injection plus data--attribute anchoring make it resilient to routine updates (class-name hash churn, client API refactors). When the official composer architecture itself changes — as 0.1.1 → 0.1.5 did, textarea → Lexical — the plugin needs a port. This plugin is that port: dsh-composer-md was its 0.1.x predecessor and is now discontinued.