DeepSeek Harness plugin

dsh-selection-tools

Select conversation text and attach it as native composer annotations or copy it to the clipboard.

Jump to install

Source facts

Repository
hjthjt4210/dsh-selection-tools
Latest update
Aug 21, 2026
Category
Tools & Capabilities
GitHub stars
1
Format
plugin
Catalog evidence
Upstream dsh.bundle evidence
Evidence path
package.json#dsh.bundle
Checked against
0.1.0-rc.8
Upstream check date
2026-08-20

This evidence comes from the upstream catalog. This site has not installed, run, or security-reviewed the plugin.

Install

Start with a prompt that asks an agent to review the GitHub repository and source. Switch to the command if you want to install it yourself.

Copy this prompt into DSH, Codex, or another agent and ask it to review the GitHub repository and source first.

Do not install or run any commands yet. Read this plugin's GitHub repository, README, and relevant source code. Then answer the questions below clearly and directly so I can decide whether it fits my needs:

1. What is this plugin, and what problem does it solve?
2. Who is it for, and what are its typical use cases?
3. How is it used after installation? Include one minimal example.
4. What known limitations or privacy, security, compatibility, or maintenance risks does it have?
5. Give a clear recommendation: recommend, conditionally recommend, or do not recommend, with reasons.

Distinguish statements documented by the repository, inferences from source code, and unknowns. If evidence is insufficient, say so explicitly. Do not guess or simply repeat the README.

GitHub: https://github.com/hjthjt4210/dsh-selection-tools
Plugin: dsh-selection-tools
Author: hjthjt4210

Check the source files

Read the README and other files from this plugin directory before installing.

File explorer3 files
README.mdSource · read only

dsh-selection-tools

面向 DSH web 客户端的对话页选中文字工具。

演示

![dsh-selection-tools 演示](assets/demo.gif)

查看高清演示视频

在对话页面用鼠标或键盘选中任意文字时,选区旁会出现一个迷你工具条,提供两个动作:

动作行为
引用把选中文字加入注释胶囊,悬停可查看原文,点击 × 可删除,发送时展开为附加上下文
复制把选中文字写入系统剪贴板

功能

  • 选中文字后显示「引用」和「复制」。
  • 引用内容以「N 条注释」胶囊显示在输入栏。
  • 悬停胶囊可查看每条引用的完整内容。
  • 点击胶囊右侧 × 可删除全部注释。
  • 发送消息时,注释会作为 <selection_annotations> 上下文提交。
  • 已发送的消息会把 <selection_annotations> 协议正文替换为「N 条注释」胶囊;悬停或键盘聚焦胶囊可查看每条引用,消息中的普通正文仍会保留。

安装

在 PowerShell 中执行:

git clone https://github.com/hjthjt4210/dsh-selection-tools.git
Copy-Item -Recurse -Force .\dsh-selection-tools "$env:USERPROFILE\.dsh\profiles\web\node_modules\dsh-selection-tools"

然后在 %USERPROFILE%\.dsh\profiles\web\package.jsondsh.profile.bundles 数组中加入 "dsh-selection-tools",最后重启 DSH。

本插件的 lib/index.js 是无操作的宿主入口,浏览器功能位于 lib/client.js。 这种双入口结构可避免 DSH 启动时在 Node.js 环境执行浏览器代码。

原理

  • 选区工具条注册在官方 shell.overlay 全框架浮层槽。

mouseup/Shift+方向键 keyup 后取 window.getSelection() 的非空选区,用 选区 getBoundingClientRect() 定位浮层。

  • 注释胶囊显示在输入栏左侧。多次引用会更新同一个胶囊的计数,悬停可查看每条
  • 引用的完整内容,点击 × 会删除全部注释,也不会显示成功提示条。
  • 引用数据通过官方 conversation 服务的 shell.insertReference() 写入,正文不会直接

塞进可见草稿。

  • 发送序列化通过 inputTriggers 注册专用 codec。DSH 提交草稿时把芯片展开为

<selection_annotations> 上下文;删除芯片会同时取消这些引用。

  • 已发送消息渲染通过客户端 DOM 观察器识别协议片段,只替换可见协议文本,发送给模型的原始上下文不变。
  • 复制优先使用 Clipboard API,并为不支持的环境提供本地复制回退。
  • 样式只用 --dsw-* 主题令牌,自动跟随深浅色模式。

开发

无构建步骤,lib/client.js 是标准 window.__ModuleLoader__.load 客户端插件 (React 18 + react/jsx-runtime)。

node --check lib/index.js
node --check lib/client.js

License

MIT