Introduction

In DSH Web sessions, if you wish to follow up on a specific sentence within the assistant’s reply, the common practice is to manually copy and paste it into a new message. This approach is prone to losing context and makes it inconvenient for the model to clearly understand which paragraph you are responding to.

dsh-annotation-patched is a local enhanced version of the DSH Web “Selected Quote” plugin. It allows users to select text in an assistant’s message, click “Quote” to generate a quote block; when sent, the quote block is sent along with the message, and the model responds sequentially numbered, with hover-expandable quote markers in the response.

Below is an introduction to its positioning, features, installation methods, and usage notes.

What is it

dsh-annotation-patched is maintained by DDDFXYqiming, a browser-side plugin for DSH Web, licensed under the MIT license.

It solves a specific problem: converting selected content in the assistant’s message in DSH Web into a sendable quote block, and corresponding one-by-one in the model’s reply. The repository title and installation path use dsh-annotation-patched; the package name in package.json is written as @dsh-external/dsh-annotation-patched. This article introduces it according to the GitHub repository name.

Core Features

Quote Assistant Messages

In DSH Web, select text in an assistant message, click “Quote”. You can add an explanatory sentence or leave it blank, then press Enter to send. The quote block is spliced into the message and sent together.

After sending, the model will respond to each quote sequentially by number, with quote markers that can be hovered to expand in the response.

This plugin uses a single-button mechanism: the toolbar only keeps the “Quote” button, and quoting requires explicitly clicking the button to confirm. Operations like copying or double-clicking to read words will not automatically become quotes.

Old Quote Cleanup

The send confirmation mechanism cleans up old quotes. Before drafting, residual old quote blocks in the draft are stripped to avoid bringing old quotes into new messages repeatedly.

Automatic quoting is triggered on both Enter to send and clicking the send button.

Multi-line Input Tag Synchronization

When inputting multiple lines, the “Quote ×N” tag will continuously sync with the input box position and will not stay on old coordinates.

Local Patch Replay

The repository provides a patch replay tool that can replay local enhancement patches based on the patches/manifest.json manifest.

When upgrading the base, you can run:

node scripts/apply-patches.mjs --fetch <upstream commit> --out client.js

This step replays patches based on the manifest and generates a new client.js.

Runtime Dependencies

The plugin declares the Web client injection and declares the following peerDependencies:

@deepseek-ai/dsh-client-runtime ^0.1.0-rc.6
@deepseek-ai/dsh-client-ui-conversation ^0.1.0-rc.6

engines requirement:

node >=20

Installation and Enablement

Install from GitHub

Use the DSH Web plugin installation command:

dsh plugin --profile web add github:DDDFXYqiming/dsh-annotation-patched

This command installs the plugin under the web profile.

Local Development

When developing locally, you can also use the repository directory directly:

dsh plugin --profile web add <this directory>

This command is suitable for directly using when modifying client.js or other plugin files locally.

Refresh After Modification

This is a browser-side plugin, so after modifying client.js, you need to Ctrl+F5 to force refresh, or switch browsers for it to take effect.

If updating via pnpm, it may overwrite the copy in node_modules, at which point you need to re-link using the current directory as the source.

Typical Usage

  1. Select text in an assistant message, click “Quote”.
  2. You can add a description or leave it blank.
  3. Press Enter to send or click the send button.
  4. The quote block is spliced into the message and sent.
  5. The model responds to each quote sequentially by number, with hover-expandable quote markers in the response.

When developing locally, remember to force refresh the browser after completing the modification, then verify if the quote block and model response meet expectations.

Suitable Scenarios and Notes

Suitable for the following scenarios:

  • Need to conduct targeted follow-up questions on a specific sentence in the assistant’s message in DSH Web.
  • Want to convert selected content into a quote block instead of manually copying and pasting.
  • Maintaining DSH Web plugins locally and wanting to replay local enhancement patches.

Notes:

  • Only supports selecting text from assistant messages, does not process messages sent by the user themselves.
  • Strongly depends on DSH Web’s DOM structure; DSH UI upgrades may cause the plugin to fail.
  • After modifying client.js, you need to Ctrl+F5 force refresh or switch browsers for it to take effect.
  • pnpm updates will overwrite the copy in node_modules, so you must re-link using the current directory as the source.
  • The plugin runs with the current dsh process permissions; you should check the source code and license before installing.
  • This plugin uses the MIT license and retains the upstream copyright notice.

Links

  • Community Directory: https://www.skillhub.cn/plugins/DDDFXYqiming/dsh-annotation-patched
  • GitHub Repository: https://github.com/DDDFXYqiming/dsh-annotation-patched