dsh-doc-annotate
在右侧边栏打开文件/文档,选中文字片段或框选区域写批注,并把批注(含文件、行号/页码、原文引用)发送给 Agent 对话。 适合需要在阅读文档时快速记录批注并将其作为上下文发送给 Agent 的用户。
インストール
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:YHzed/dsh-doc-annotateドキュメント
README 全文を読む ↗dsh-doc-annotate
DeepSeek Harness (DSH) Web plugin: open files in the right sidebar, annotate selected text or a dragged region, and send the annotations to the Agent conversation.
DSH Web 插件:在右侧边栏打开文件和文档,选中文字片段或框选区域写批注,再把批注发送到 Agent 对话。
功能
- 打开文件:右侧边栏「文档批注」面板支持输入相对工作区或绝对路径打开文件,也可进入文件树或点击最近打开的文件。预览使用 DSH 内置文档预览(Markdown、代码、纯文本、PDF、Word/PowerPoint、图片等)。
- 片段批注:在预览中选中文字后点击浮动的「批注」按钮。纯文本记录行号;Markdown/代码回读源文件匹配行号(Markdown 标为「约」);PDF 与 Office 记录页码。
- 区域批注:点击预览头部的框选按钮拖出矩形,记录页码、区域百分比坐标及区域内可识别的文字。
- 发送给 Agent:单条、按文件或全部批注插入对话输入框,由用户确认后发送;无法插入时复制到剪贴板。
- 回看:已保存的批注在预览中高亮,「定位」可跳回原位置。
发送内容示例:
【批注】@docs/design.md 第 12–14 行
原文:
> ……
批注:这里的接口命名需要统一
安装
dsh plugin --profile web add github:YHzed/dsh-doc-annotate
或在 DSH「设置 → 插件 → 添加插件」中填写 github:YHzed/dsh-doc-annotate,或 Release 中的 dsh-doc-annotate.tgz 地址。安装后重启 Harness 并刷新页面。
仓库包含可直接运行的客户端文件,不需要构建步骤。
数据与限制
- 批注保存在浏览器 localStorage(
dsh.doc-annotate.v1),不跨设备同步,不上传到任何服务。 - 读取文件只经过 DSH 自带的
workspaceFilesRemote,受会话沙箱约束。 - HTML 预览(iframe)与 Excel 预览(画布表格)无法选中文字,只能用框选。
- 插入输入框使用 DSH 客户端的
inputActions,在 DSH Web 0.2.0-rc.2 上开发;接口变化时会回退到剪贴板。
License
MIT