Preface¶
When reviewing a long AI response, the trouble often lies not in voicing opinions, but in clarifying “which sentence I am referring to.” The common approach is to copy the original text into the input box and add an explanation, but the context tends to scatter after a few rounds. The idea behind dsh-annotation is to leave annotations directly next to the corresponding sentences: select the original text, annotate in place, and send them all at once after collecting multiple annotations; the model then answers item by item based on the numbers. Below is an introduction to this plugin.
Plugin Introduction¶
dsh-annotation is a DSH Web plugin by author ruisenbai, under the MIT License, current version 0.5.2, categorized as a client-side plugin. Its positioning in one sentence: to provide inline, batch-submittable annotations for DeepSeek Harness assistant replies, ultimately sent via the official input box.
It needs to be noted that the author explicitly states in the README: this interaction is an independent, unofficial replication of ChatGPT’s inline annotation functionality; it only reuses the usage workflow, and the project has no affiliation or official partnership with OpenAI.
Core Features¶
Selection and Annotation¶
- Select text within a completed assistant reply; a floating bar with “Add Annotation” and “Copy” pops up. The blue selection remains selectable, allowing Ctrl+C at any time.
- Click “Add Annotation”, then edit in place next to the selection. Auto-saves 400ms after input stops, fully handling Chinese IME composition input.
- Supports regular annotations (note) and empty-content annotations (highlight-only).
- When selections overlap, merge into the existing draft to avoid highlighting ambiguity.
Drafts and Sending¶
- Annotations are automatically attached to the official input box by default; can be disabled in the configuration, or switch manually via the paperclip in the title bar.
- The official input box is the only sending entry: text, annotations, and images are merged into one task for sending.
- Displays a compact overview “Annotations ×N” above the input box; click to expand the full list. Updates in real-time with additions, deletions, attachment, and sending.
- Slash commands are automatically allowed: when in attachment mode and entering content starting with “/”, the command does not carry annotations and does not trigger sending.
- When sending fails, text, images, and annotations are all retained. Retries use the same
submissionIdfor idempotent deduplication.
Model Response by Item¶
- The model answers one by one in the order of annotations, each segment starting with “Annotation N:”.
- Links in the response are associated via hidden markers, rendering annotation chips that can be hovered to view.
- The protocol follows DSH’s locale (Chinese/English), and response parsing is compatible with formats like “Annotation N:”, “Annotation N:”, “Annotation N:”.
Data Saving and Recovery¶
- Each annotation saves the full original text, surrounding context selectors, assistant message ID, event sequence, annotation ID, and submission ID; code records language and start/end lines, tables record start/end rows and columns.
- Uses
localStorageto restore unsent drafts, editing content, and immutable retry records. Uses a stable message ID derived from submission ID for deduplication. - Supports undoing the last draft deletion, exporting current session recovery JSON, clearing unsubmitted drafts, and showing local storage usage.
Compatibility¶
- Optionally compatible with dsh-focus-chat; runs normally without installation and does not wait for any service.
- When the browser does not support the CSS Custom Highlight API, numbered markers and positioning capabilities are still retained.
Installation and Enabling¶
Host requirements are strict:
- DSH Web
0.1.2-rc.1(exact version, rundsh --versionto check) - Node.js
^22.19.0or>=24.0.0 webProfile
It is recommended to install the pre-built packages provided by GitHub Release directly, in three steps:
curl -fL -o dsh-annotation.tgz https://github.com/ruisenbai/dsh-annotation/releases/latest/download/dsh-annotation.tgz
dsh plugin --profile web add ./dsh-annotation.tgz
dsh web
The first command downloads the latest release Tarball, the second adds the plugin to the web Profile, and the third starts DSH Web. If DSH Web is already running, it needs to be restarted after installation.
If the host version is inconsistent, you can choose the corresponding release based on the version mapping: v0.5.2 / v0.5.1 / v0.5.0 for DSH 0.1.2-rc.1, v0.4.0 for 0.1.2-alpha.3, v0.3.0 for 0.1.2-alpha.1, and v0.2.4 for 0.1.1-rc.2.
You can also build from source:
git clone https://github.com/ruisenbai/dsh-annotation.git
cd dsh-annotation
corepack enable
pnpm install
pnpm verify
dsh plugin --profile web add .
dsh web
Clone the repository first and enable corepack. pnpm install resolves dependencies, pnpm verify passes the verification, then add the current directory to the web Profile and start.
Typical Usage¶
- Open the DSH Web page, select text within a completed reply, click “Add Annotation” in the floating bar to open a compact input box, fill in the opinion, and press Enter or click the checkmark to create a draft.
- The draft appears above the official input box and is attached by default. Optionally, fill in the task text, attach images, press the official Enter or click the Send button, and text, annotations, and images will be sent together as one task.
- In Settings → Plugins → Plugin Configuration, in the “Annotation” card, you can toggle “Enable DSH Annotation”, “Auto-attach new annotations to input box”, and “Show local data controls”. All are enabled by default.
Overridable Configuration¶
The Bundle inserts a dsh-annotation line into the Profile; the following default values can be overridden in Profile Composition:
| Configuration Item | Default Value |
|---|---|
commandName |
annotation_submit |
maxPayloadBytes |
524288 |
maxAnnotationsPerSubmission |
100 |
warnSelectionChars |
12000 |
For the specific role of each configuration item, see the configuration table in the repository README; note that the table in the README is truncated at warnSelectionChars, and there may be unshown configuration items; refer to the repository documentation.
Suitable Scenarios and Notes¶
Suitable scenarios: reviewing long replies in DSH Web, where opinions need to be precise to a specific sentence or code block, and wishing to merge multiple pieces of feedback into a single send workflow.
Before installation, there are a few points to confirm:
- The plugin runs with the current dsh process permissions; you should check the source code and license yourself before installing (this project is MIT).
- The host version is strictly required; first run
dsh --versionto confirm it is0.1.2-rc.1. - DSH is still in the pre-release stage; it is recommended to read the compatibility notes in
docs/compatibility.mdin the repository before upgrading.
Summary¶
dsh-annotation solves the problem of “pointing at what to say” when reviewing long replies: annotations stay next to the original text, multiple ones are sent together, the model responds item by item by number, and local drafts can be recovered with retry on failure. If you do sentence-by-sentence feedback in DSH Web daily, it is worth a try.
- Community Directory Page: https://www.skillhub.cn/plugins/ruisenbai/dsh-annotation
- GitHub Repository: https://github.com/ruisenbai/dsh-annotation