rea
morluto
Reverse engineer anything with agents, from app behavior down to native binaries.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:12138hao/dsh-snap
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
给 DeepSeek Harness 的截图插件:点一下输入框旁边的剪刀,框选,图直接进附件。
DeepSeek Harness 原本只能拖拽或选文件才能附图。dsh-snap 在输入框工具栏(conversation.composer.dock)加了一个按钮,点它立刻进入截屏框选,松手后截图自动变成输入框里的附件,不用再「截图 → 保存 → 找文件 → 拖进来」。
宽 × 高getDisplayMedia 的系统弹窗限制webServer 路由)dsh plugin --profile <你的 profile> add git+https://github.com/12138hao/dsh-snap.git
桌面端 profile 由 Electron 独占管理时,命令可能被拒绝。此时把包目录放进
<profile>/node_modules/dsh-snap,并在<profile>/package.json的dsh.profile.bundles里加上"dsh-snap"(写文件时注意别带 BOM,否则宿主读不了)。
node_modules 并登记 bundle按 Esc 取消本次截图,可以立刻再次点剪刀重截(不需要等)。
想连 DSH 窗口一起避开:点剪刀右侧的小箭头,勾上「截图时隐藏 DSH 窗口」。 开关状态存在浏览器 localStorage 里,选完即生效,不用重启。
[页面] 剪刀按钮
│ POST /api/dsh-snap/start
▼
[宿主插件] 拉起 bin/DshSnap.exe
│ 冻结屏幕 → 框选 → 存 PNG 到 ~/.dsh/snap/snap.png
│ 同时写 result.json
▼
[页面] 轮询 /api/dsh-snap/poll → ready
│ GET /api/dsh-snap/file 取图
▼
[页面] 构造带 File 的 DataTransfer,向 contenteditable 派发 drop 事件
▼
DSH 的 onDrop 收到文件 → 变成输入框附件
DSH 的输入框是 Lexical 的 contenteditable,附件走 onDrop 的 dataTransfer.files,所以插件用合成 drop 事件完成「插入」,效果等于你把截图拖进去。
| 方法 | 路径 | 说明 |
|---|---|---|
| POST | /api/dsh-snap/start |
清掉上次结果并拉起截图程序,body 支持 {"hide":true} |
| GET | /api/dsh-snap/poll |
查询状态,返回 {state, ready},state 为 idle / running / ready / cancelled / failed |
| GET | /api/dsh-snap/file |
返回 PNG 本身 |
| POST | /api/dsh-snap/done |
兼容旧版截图程序的回调 |
截图程序命令行参数:--hide 表示截图前隐藏当前前台窗口(DSH),截完自动恢复。
| 环境变量 | 说明 |
|---|---|
DSH_SNAP_EXE |
覆盖截图程序路径,默认用包内 bin/DshSnap.exe |
截图临时文件固定写到 ~/.dsh/snap/(snap.png / result.json)。
cd src
dotnet publish -c Release -r win-x64 -o ../bin
源码是单文件 Program.cs:冻结屏幕 → 自绘暗层与选区 → 保存 PNG → 写结果文件。
暗层是程序自己画的(不是窗体半透明),所以不会出现底层窗口文字透上来的虚影。
A DeepSeek Harness plugin that puts a screenshot button in the chat composer:
click it, drag a region, and the image is attached to your message automatically.
It captures via a bundled Win32 helper (bin/DshSnap.exe) and injects the result
into the Lexical-based composer by dispatching a synthetic drop event with a
File in the DataTransfer. Windows only, MIT licensed.
MIT
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: deepseek-harness。