rea
morluto
Reverse engineer anything with agents, from app behavior down to native binaries.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:chguo-3/dsh-screenshot
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
给 DeepSeek Harness(DSH)桌面端加一个像微信 / QQ 那样的截图按钮:点一下,整个屏幕冻结,直接在真实屏幕上拖框选区;松手后可以在原地调整选框、用画笔涂鸦圈重点,确认后这张图就直接作为图片附件进入当前对话草稿。
输入框工具行:
+·完全权限· 😊 · 📷 ·+ 技能,截图按钮就在表情按钮右边。
Ctrl+Z 撤销需要 DSH 桌面端 + Windows 10/11(原生编辑器依赖 PowerShell 5.1 与 .NET Framework 自带的 WinForms / System.Drawing)。
git clone https://github.com/chguo-3/dsh-screenshot.git
然后在 DSH 里用插件管理器安装这个目录(bundle 入口是本目录,安装类型为本地目录 / install_bundle),装完刷新一次窗口(Ctrl+R)即可在输入框看到相机按钮。
安装后如果按钮没出现,按顺序检查:
conversation.input.left 槽位里有没有 screenshot 这个 occupanthttp://127.0.0.1:<DSH 端口>/dsh-screenshot/diag,应返回 {"ok":true,...}选区 / 画笔 / 矩形 / 箭头 / 取色 / 撤销 / 清空 / 取消 / 完成Enter 或「完成」→ 裁切 + 烧入笔迹 → 进草稿Esc / 右键 / 关窗 → 取消,什么都不留下快捷键:1–4 切换工具,Ctrl+Z 撤销,Ctrl+C 把当前裁切复制到剪贴板,Esc 取消,Enter 完成。
按钮右侧的小箭头打开菜单,勾选「截图时隐藏 DSH 窗口」后:
渲染进程拿不到 desktopCapturer(DSH 桌面壳没有注册 setDisplayMediaRequestHandler),所以截图交给插件 Host —— 它是一个普通 Node 进程,可以直接调系统能力:
client.js 在 conversation.input.left 注册相机按钮,在 shell.overlay 注册失败提示
index.js 注册本机回环路由 /dsh-screenshot/*,把 selector.ps1 落成临时脚本并运行
selector.ps1 Windows 全屏编辑器:冻结整屏 → 框选 / 调选区 / 涂鸦 → 按物理像素裁切烧笔迹
拿到 PNG 后走 DSH 自己的草稿链路:conversation.createDrafts(sessionId, [file]) → inputActions.addAttachments(ids),被拒绝时 releaseDraftAttachments 回滚并提示。
路由(只接受 Host 头为回环地址的请求):
| 路由 | 说明 |
|---|---|
GET /dsh-screenshot/capture |
交互式截图,返回 image/png;用户取消返回 409 {"cancelled":true} |
GET /dsh-screenshot/capture?mode=full |
整屏抓图(调试用) |
GET /dsh-screenshot/capture?rect=x,y,w,h |
跳过交互直接裁切(无人值守自检用) |
GET /dsh-screenshot/capture?hide=1 |
抓屏时隐藏 DSH 窗口 |
GET /dsh-screenshot/diag |
运行环境自检 |
screencapture -i -x(系统交互框选,没有涂鸦与浮动工具条)gnome-screenshot -a / spectacle -r / maim -s / scrot -sDeepSeek Harness),换标题后需要改 selector.ps1Invoke-WebRequest 'http://127.0.0.1:<端口>/dsh-screenshot/capture?mode=full' -OutFile shot.png
Invoke-WebRequest 'http://127.0.0.1:<端口>/dsh-screenshot/capture?rect=100,120,640,400' -OutFile crop.png
Invoke-WebRequest 'http://127.0.0.1:<端口>/dsh-screenshot/capture?rect=100,120,640,400&hide=1' -OutFile crop2.png
selector.ps1 另有两个调试开关:DSH_SHOT_SELFTEST=1(预置三笔涂鸦,验证烧录)、DSH_SHOT_DEMO=1(预置选区,核对工具条与控制点)。
A DeepSeek Harness plugin that adds a WeChat-style screenshot button to the chat composer: the screen freezes, you drag a region right on the desktop, adjust it and annotate it with the floating toolbar, and the crop lands in the draft as an image attachment. Windows uses a native PowerShell/WinForms editor at physical pixel resolution; macOS and Linux fall back to the system selection tools.
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: deepseek-harness。