DeepSeek Harness plugin

dsh-selection-based-comments

Selection-based comments for the DeepSeek Harness Web UI: select text in the chat, comment on each selection, then submit all comments as one message.

Jump to install

Source facts

Repository
surenkid/dsh-selection-based-comments
Latest update
Aug 19, 2026
Category
UI Enhancements
GitHub stars
0
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/surenkid/dsh-selection-based-comments
Plugin: dsh-selection-based-comments
Author: surenkid

Check the source files

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

File explorer2 files
README.mdSource · read only

dsh-selection-comments

DSH Web 的选区评论插件,提供类似 ChatGPT/Codex 网页端的评论体验:在聊天消息中选中一段文字,针对该选段写评论;可以继续选择其他内容追加评论;最后一次性把所有选段和评论组成一条普通用户消息提交给当前会话。

功能

  • 在聊天消息文本上拖动选择,选区上方会出现“评论选中内容”按钮。
  • 每个选段可以单独编辑或删除,尚未提交的评论会汇总到右下角的评论胶囊。
  • 提交时自动合并为一条普通用户消息,模型看到的内容与手打消息一致。
  • 已保存评论对应的消息行上会显示评论标记,点击标记可快速打开待提交面板。

安装

依赖 dshpnpmdsh plugin 会在首次使用时自动初始化 web profile。

dsh plugin --profile web add github:surenkid/dsh-selection-based-comments

安装完成后重启 DSH Web:

dsh web --port 3080

然后刷新浏览器页面。插件不需要额外构建步骤,也没有安装脚本。

指定版本或分支

dsh plugin 会把参数转发给 pnpm,因此可以使用 pnpm 的 GitHub 依赖语法固定分支或 tag:

dsh plugin --profile web add github:surenkid/dsh-selection-based-comments#main
dsh plugin --profile web add github:surenkid/dsh-selection-based-comments#v0.1.0

更新与卸载

dsh plugin --profile web update dsh-selection-comments
dsh plugin --profile web remove dsh-selection-comments

本地开发安装

git clone https://github.com/surenkid/dsh-selection-based-comments.git
dsh plugin --profile web add link:/absolute/path/to/dsh-selection-based-comments

手动安装

如果不想使用 dsh plugin,也可以直接编辑 ~/.dsh/profiles/web/package.json,在 dependencies 中加入 GitHub 依赖,并把插件加入 dsh.profile.bundles

{
  "dependencies": {
    "dsh-selection-comments": "github:surenkid/dsh-selection-based-comments"
  },
  "dsh": {
    "profile": {
      "bundles": [
        "@deepseek-ai/dsh-base",
        "@deepseek-ai/dsh-web-app",
        "dsh-selection-comments"
      ]
    }
  }
}

然后在 profile 目录执行:

cd ~/.dsh/profiles/web
pnpm install

使用方式

1. 在聊天消息中按住鼠标选中文字,选区上方会出现“评论选中内容”按钮。 2. 点击按钮,在浮层中写下针对这段内容的评论,然后保存。可以继续选其他内容追加多条评论。 3. 已保存的评论不会占据聊天区域:右下角会显示一个小胶囊“评论 N”,鼠标悬停或点击即可展开编辑/删除面板;消息行上的评论标记点击后也会直接打开这个面板。 4. 在展开面板中点击“提交评论”,所有评论会合并成一条消息发送到当前会话;发送成功后待提交列表会清空。

设计说明

  • 待提交评论只存在浏览器内存中(按 sessionId 分组)。提交是唯一的持久化步骤,发送路径就是普通 session.prompt(..., 'queue'),所以模型看到的是与手打一样的用户消息。
  • 选区定位使用 DSH conversation 渲染出的 [data-chat-anchor-key] 消息行,不依赖任何 conversation 内部实现。
  • 浮动按钮、评论编辑器和消息标记使用原生 DOM;评论列表注册在 conversation.input.dock slot。

已知限制

  • 未提交评论在页面刷新后会丢失,后续可以改成持久化 sidecar。
  • 评论标记只挂在所属消息行尾部,不在原文中做逐字符高亮;原文高亮需要 markdown source map,复杂度更高。
  • 跨消息跨区块选择时,评论归属到选择起点的消息行。