Foreword

In DSH Web, when conversing with models, a common practice is to copy a segment of the assistant’s reply, paste it into the input box, and then formulate a question. When multiple references are involved, messages can become increasingly lengthy, making it difficult to distinguish between the “original text” and “your follow-up questions” within the chat bubble.

dsh-annotation is a DSH client plugin maintained by omdsh-dev (with approximately 95 GitHub stars). It implements “select → annotate → press Enter to send” on the browser side: annotation blocks are sent to the model along with the message, but your chat bubble only displays the question and an “Annotation ×N” tag. The model’s reply is then referenced point-by-point according to Annotation N. The plugin is released as an official bundle and does not modify core DSH files.

What This Is

dsh-annotation is a selection annotation plugin for DSH Web, maintained by omdsh-dev, categorized as a client plugin under the MIT license.

In terms of form, it is an official bundle plugin: package.json declares dsh.bundle and dsh.client, and client.js is injected into the browser via client-modules; the Node-side implementation is empty. cordis.patch.yml only inserts its own ID once, and the profile patch remains [], without modifying the DSH core itself.

Core Features

The following introduces the verified capabilities in order of interaction.

Select to Annotate

Select any text within the assistant’s reply, click “Annotate” on the toolbar, and write the annotation content (can be left empty to simply mark the original text). Click outside or press Esc to collapse it. A blue numbered footnote and highlight appear at the original text position, anchored within the viewport with collision avoidance, and are not lost when scrolled off-screen.

Cross-Turn Collection

Annotations can be accumulated across messages and turns, with numbering incrementing from 1. An “Annotation ×N” tag appears next to the input box; hovering over it allows you to view all annotations or delete them one by one.

Press Enter to Send with Message

Pressing Enter directly sends the annotation block and the question in the input box together to the model. The model receives the complete annotation protocol block; your chat bubble does not display the annotation block text, only showing the question and the “Annotation ×N” tag. At the moment of sending, the annotation block is hidden from the DOM before browser rendering, achieving zero flicker; historical messages are automatically repaired for display after refresh.

Reply Reference by Number

The plugin injects formatting instructions into messages, guiding the model to respond point-by-point according to Annotation 1: ... to Annotation N: .... The Annotation N: in the reply is rendered as a hoverable chip, allowing you to view the corresponding original text and annotation content on hover. The UI text and annotation protocol block switch in real-time following the DSH locale service (zh/en).

Installation and Enabling

Installation follows the official bundle path, choose one of the following:

# npm public package (no npm account required)
dsh plugin --profile web add @changfenhuang/dsh-annotation

# Install from GitHub public source code
dsh plugin --profile web add git+https://github.com/omdsh-dev/dsh-annotation.git

# Local path (for development and debugging)
cd /path/to/dsh-annotation
dsh plugin --profile web add .

When only used as a Node dependency and not registered to DSH:

npm install @changfenhuang/dsh-annotation

npm install does not register the plugin into DSH; to use it in DSH, you still need to execute dsh plugin add.

If you have installed an old package name before v1.4.2, migrate first:

dsh plugin --profile web remove @omdsh-dev/dsh-annotation
dsh plugin --profile web add @changfenhuang/dsh-annotation

After installation, restart the web service according to the platform. Common commands for Linux/WSL:

systemctl --user restart dsh-web

Some container environments do not require a restart; client.js is provided with no-cache per request, and a hard refresh (Ctrl+Shift+R) suffices.

Self-check to see if it is effective:

dsh --profile web --dump-config | rg "id: dsh-annotation"   # Must be exactly 1 line
curl -s -o /dev/null -w '%{http_code}\n' "http://127.0.0.1:3080/plugins/@changfenhuang/dsh-annotation/client.js"   # 200

Note: Only perform dsh plugin add; do not repeatedly insert the same ID in the profile or home cordis.patch.yml.

Typical Usage

The interaction flow is as follows:

Select assistant text ──▶ Toolbar "Annotate" ──▶ Write annotation/save empty ──▶ Original text highlighted blue with number
                                                                                          └────────────── Multiple, accumulated across turns ◀───────────────────────┘
                                                              "Annotation ×N" tag next to input box (hover to view/delete)
                                            Press Enter to send
                           Model receives: Annotation block (number + original text + annotation) + your question
   Your chat bubble: Only displays question + "Annotation ×N" tag
   Model reply: Annotation 1: ... Annotation 2: ... (hoverable chips)

Actual operations can be summarized as:

  1. In the assistant’s reply, select the text you wish to discuss, click “Annotate,” and write a note (can be left empty).
  2. Continue the conversation, keep selecting and annotating; multiple annotations accumulate in “Annotation ×N.”
  3. Write your question in the input box and press Enter to send.
  4. View the model’s point-by-point reply according to Annotation 1, Annotation 2, etc.; hover over the chips to compare the original text and annotation.

In Chinese environments, the annotation block format sent to the model is similar to:

I have annotated the following N pieces of content…

1. Original text
   Annotation: …

Please use "Annotation 1: …" to respond…

Question:

Use Cases and Notes

This is suitable for scenarios where you need to ask follow-up questions about specific parts of an assistant’s long reply in DSH Web, without wanting to fill the chat bubble with large blocks of quoted text. It is implemented entirely on the browser side, with no dependency on Node-side logic; it is compatible with dsh-focus-chat for focusing on conversation views.

Before installation, please note:

  • The plugin runs with the current dsh process permissions; before installation, you should review the GitHub source code and the MIT license yourself.
  • The current npm package name is @changfenhuang/dsh-annotation (v1.4.2), corresponding to the GitHub repository omdsh-dev/dsh-annotation; the old name @omdsh-dev/dsh-annotation has been deprecated.
  • Requires Node >= 20, with peer dependencies cordis ^4.0.0-rc.7 or ^4.0.1.

The DSH ecosystem advocates “everything is a plugin”; the community directory SkillHub is an independent site with no official affiliation to DeepSeek or High-Flyer.

Conclusion

dsh-annotation turns “select to annotate → send with message → reference reply by number” into a complete pipeline, hiding the annotation block on the bubble side and providing hoverable chips on the reply side, with changes confined to the bundle plugin. You can view the entry on the directory page or read the full documentation and architectural overview on GitHub.

  • Directory page: https://www.skillhub.cn/plugins/omdsh-dev/dsh-annotation
  • GitHub: https://github.com/omdsh-dev/dsh-annotation