dsh-annotation-cards: Embedding Context into Conversations with Selection Annotations within DSH

Preface

When conversing with models in DeepSeek Harness (DSH), it is often necessary to point to a specific reply or line of code to add clarification: for instance, that the 001 in a SQL statement is mandatory, that the reason for rejection needs to be explicitly stated, or that a specific output is merely an intermediate result. Copying the entire original text into the input box and then adding notes makes the draft lengthy, and the model easily confuses the “quote” with “your actual intent.”

The following is an introduction to the community plugin dsh-annotation-cards (maintainer kaige1986kg), which implements a Codex-like “select text → write annotation → send with message” flow within the Web/Desktop interfaces: featuring a popup next to the selection, blue corner badges, annotation capsules above the input box, and expandable cards after sending. The plugin is categorized under “Fun Customization” in the community directory, with a current GitHub star count of 0; capabilities are subject to the repository’s README and package.json.

What is this

dsh-annotation-cards is a plugin package for the DSH browser-side UI (a standard DSH bundle). It automatically inserts annotation-cards into the profile composition layer via dsh.bundle.patch, eliminating the need to manually modify cordis.patch.yml. The host half is an empty implementation, with the logic completed within the client bundle (lib/client.js).

It solves the following problem: attaching annotations to any selected text within the conversation interface, attaching a structured annotation block to the message upon sending to enter the model context, and maintaining readability on the interface via badges and cards, all without rewriting the draft you have already entered.

Core Features

The following capabilities are derived from the official README description.

  • Selection Capsule: An “Add to Conversation” option appears after dragging to select text in the conversation.
  • Instant Popup: Clicking it pops up a small window next to the selection for entering execution results or comments; Enter saves, Shift+Enter creates a new line, and Esc cancels.
  • Blue Badge: After saving, a blue badge is displayed next to the annotated original text. Clicking it allows editing again; it follows the original text when scrolling.
  • Minimalist Placeholder: Only a small capsule reading ● N annotations is displayed above the input box. Clicking it expands a Codex-style list of annotation cards (quote, comment, edit/delete).
  • Auto-attach on Send: When annotations exist, pressing Enter or clicking send will automatically attach the annotation block to the message (without rewriting the draft), sending it along with the message into the model context.
  • Card-based Post-Send: The original annotation text in the message is replaced by an expandable ● N annotations ⌄ card; the model side still receives the full readable text.

The plugin performs no network requests, no file system writes, no execution of external commands, and no reading of credentials. Annotations are stored in browser memory and cleared upon page refresh; readable text is retained within sent messages.

Installation and Activation

The DSH version must satisfy engines.dsh: >=0.2.0 <0.3.0; peer dependency is @deepseek-ai/cordis ^4.0.2. The applicable profiles are web or desktop (it cannot be used with pure CLI environments lacking a browser side).

Install from GitHub (per README, no npm account required):

dsh plugin --profile web add github:kaige1986kg/dsh-annotation-cards

Example for locking a version (current package version is 0.4.0):

dsh plugin --profile web add github:kaige1986kg/dsh-annotation-cards#v0.4.0

You can also install the tarball packaged by the repository:

dsh plugin --profile web add ./dsh-annotation-cards-0.4.0.tgz

Restart or refresh the DSH interface after installation; the README states that no additional configuration is required. The repository has committed build artifacts lib/, so build scripts do not need to be executed when installing from git.

The plugin runs within the current DSH process and browser environment; it is recommended to review the source code and the MIT license on GitHub before installing.

Typical Usage

  1. Drag to select the text you wish to reference in a conversation message or input area, and click “Add to Conversation”.
  2. Write your comment in the popping-up small window and save with Enter.
  3. View or edit the list via ● N annotations above the input box; if necessary, reopen the editor via the blue badge next to the original text.
  4. Enter the message body as usual and send; if annotations exist, the sending logic will automatically attach the annotation block to the message.

The format of the annotation block sent to the model is as follows (README example):

[[Conversation Annotation]]
Annotation 1 · Selected Text:
DELETE FROM t WHERE id = 1
Annotation 1 · User Comment:
001 is mandatory, the rejection reason was not written clearly
[[/Conversation Annotation]]

Use Cases and Notes

Suitable for: Developers or daily conversation users who need to make “quote + explanation” supplements to specific conversation content within DSH Web/Desktop and want the model to see both the selection and the comment within a single message.

Known Limitations (per README):

  • The blue badge relies on the original message DOM; it will disappear after message re-rendering, refresh, or switching conversations.
  • The post-send card replacement is a DOM enhancement; if a message bubble cannot be identified, it falls back to displaying the original readable text, and functionality is unaffected.
  • Slash command drafts and image attachments are not intercepted.
  • It relies on DSH internal client conventions (such as conversation.input.dock, useInput / inputActions, etc.); plugin adaptation may be required after major DSH version upgrades.

The community plugin directory site skillhub.cn is not officially affiliated with DeepSeek / High-Flyer; the DSH ecosystem emphasizes “everything is a plugin,” and installation and usage are subject to your local environment and repository documentation.

Conclusion

dsh-annotation-cards consolidates “which paragraph to select and what explanation to attach” into a sendable structured block, and reduces draft noise on the interface using badges and cards. For further information, please visit the directory page kaige1986kg/dsh-annotation-cards and the source repository github.com/kaige1986kg/dsh-annotation-cards.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye