dsh-annotator
English | 中文
DSH(DeepSeek Harness)社区插件:给对话记录加注释。在会话里划选任意文本,点击浮出的 Annotate 按钮,写上备注——点击发送箭头会把引用(blockquote)和备注编译后直接通过 composer 发出。
功能
- 划选对话文本 → 选区下方出现 Annotate 浮标。
- 只有整段都在聊天记录(
[data-chat-flow])内的选区才会出现浮标;拖出记录区的划词会被忽略。 - 弹窗展示引用原文和备注输入框(⌘/Ctrl + Enter 发送)。
- 点击发送箭头会把
> 引用文本+ 备注编译后直接通过 composer 发出。 - 界面文案为英文。
- 清理全部走
ctx.effect,卸载时不会留下全局监听。
要求
- DeepSeek Harness 的 web profile(profile 名称任意;下文示例用
web)。
安装
仓库已提交编译好的 lib/,安装不需要构建步骤。
方式 A — tarball
cd dsh-annotator
npm pack # → dsh-annotator-0.1.0.tgz
dsh plugin --profile web add ./dsh-annotator-0.1.0.tgz方式 B — git(安装最新版)
dsh plugin --profile web add github:cw1999mm/dsh-annotator然后重启(或刷新)Web UI。插件会作为 dsh-annotator 组合包层加载;卸载:
dsh plugin --profile web remove dsh-annotator手动 / 开发安装
把包 link 进 profile 的 node_modules,并加上组合包行:
# 在 profile 目录下(例如 ~/.dsh/profiles/web)
pnpm add link:<本项目的绝对路径>然后在该 profile 的 cordis.patch.yml 末尾追加:
- insert:
- id: dsh-annotator
name: dsh-annotator用法
1. 在聊天记录里拖选一段文字。 2. 点击浮出的 Annotate 按钮。 3. 写备注并点击发送箭头(或按 ⌘/Ctrl+Enter)——消息 > quoted text\n\nnote 会编译后直接发出。
开发
src/ 是 TypeScript 源码;lib/ 是提交进仓库的构建产物。
类型检查需要 DSH 的 client 类型包。附带的 tsconfig.json 通过 paths 指向旁边的 deepseek-harness checkout(开发时的目录布局);请改成你自己的路径:
pnpm typecheck # tsc -p tsconfig.json (noEmit)重新构建 lib/(浏览器 bundle)使用包含 client 包的 DSH 仓库里的 tsdown 工具链;已提交的 lib/client.js 是运行时的权威产物。
许可证
[MIT](./LICENSE) © 2026 cw1999mm