Bundle
dsh-screenshot-plugin
WeChat-style in-app screenshot button for DeepSeek Harness: drag to capture a screen region, PNG saved with auto-numbering, marker [Shot N HH:mm] written into the composer.
- Source
- deepseekbluefish
- License
- MIT
- Updated
- Updated 6 days ago
Readme
# dsh-screenshot-plugin
DeepSeek Harness 界面内的**微信式一键框选截屏**插件:对话输入框左侧多一个 ✂ 按钮,点一下全屏变暗、拖动框选区域即可截取。
- 松手后**选区保留**:可拖动移动、拖四角/四边手柄缩放,双击或按 Enter 确认截取
- PNG 自动编号(`截屏N_HHmm.png`)存入指定目录
- 标记 `[Shot N HH:mm]` 自动写入输入框(发送后 agent 可按标记定位文件读取)
- 纯 ASCII 标记,无编码坑
## 多语言简介 / Intro
- **简体中文**:微信式一键框选截屏插件:拖动框选、8 个手柄微调,Enter 确认截取、Esc 取消;PNG 自动编号保存,`[Shot N HH:mm]` 标记自动填入输入框。已在 DeepSeek Harness Desktop 实测。
- **繁體中文**:微信式一鍵框選截圖外掛:拖曳框選、8 個控點微調,Enter 確認截取、Esc 取消;PNG 自動編號儲存,`[Shot N HH:mm]` 標記自動填入輸入框。已在 DeepSeek Harness Desktop 實測。
- **English**: WeChat-style one-click screenshot plugin: drag to select, fine-tune with 8 resize handles; press Enter to capture (the `[Shot N HH:mm]` marker is filled into the composer), Esc to cancel. PNGs are auto-numbered. Tested on DeepSeek Harness Desktop.
- **Русский**: Плагин скриншотов в стиле WeChat: выделите область перетаскиванием, подправьте с помощью 8 маркеров; Enter — снять скриншот (метка `[Shot N HH:mm]` подставляется в поле ввода), Esc — отмена. PNG сохраняются с автонумерацией. Проверено на DeepSeek Harness Desktop.
- **Français** : Capture d'écran façon WeChat : sélectionnez à la souris, ajustez avec 8 poignées ; Entrée pour capturer (le marqueur `[Shot N HH:mm]` est inséré dans la zone de saisie), Échap pour annuler. PNG numérotés automatiquement. Testé sur DeepSeek Harness Desktop.
- **Italiano**: Plugin di screenshot stile WeChat: seleziona trascinando, regola con 8 maniglie; Invio per catturare (il marcatore `[Shot N HH:mm]` viene inserito nel campo di input), Esc per annullare. PNG con numerazione automatica. Testato su DeepSeek Harness Desktop.
- **日本語**: WeChat 風のワンクリックスクリーンショットプラグイン:ドラッグで範囲選択、8 つのハンドルで微調整。Enter で撮影(`[Shot N HH:mm]` マーカーが入力欄に自動挿入)、Esc でキャンセル。PNG は自動連番で保存。DeepSeek Harness Desktop で動作確認済み。
- **한국어**: WeChat 스타일 원클릭 스크린샷 플러그인: 드래그로 영역 선택, 8개 핸들로 미세 조정. Enter로 캡처(`[Shot N HH:mm]` 마커가 입력창에 자동 입력), Esc로 취소. PNG 자동 번호 저장. DeepSeek Harness Desktop에서 테스트 완료.
## 安装
```sh
dsh plugin --profile web add github:deepseekbluefish/dsh-screenshot-plugin
```
重启 DSH(或对应客户端)后,输入框左侧出现 ✂ 按钮。
## 使用
1. 点 **✂** → 屏幕变暗
2. 拖动框选区域;**松手后选区保留**——可拖动选区移动、拖四角/四边手柄缩放
3. **双击选区(或按 Enter)确认截取**,Esc 取消
4. 输入框自动出现 `[Shot N HH:mm]`
5. 点发送,把标记发给 agent(配合视觉插件如 [ModLens](https://github.com/liustack/modlens),agent 可直接读取该截图)
## 配置
截图保存目录默认 `~/Pictures/DSH-Screenshots`,通过 profile 补丁覆盖:
```yaml
# ~/.dsh/profiles/<name>/cordis.patch.yml
- id: screenshot
config:
folder: 'D:\MyScreenshots'
```
## 工作原理
- **客户端**(`client/index.js`):注册到 `conversation.input.left` slot 的 ✂ 按钮,点击后 `POST /api/screenshot/capture`
- **宿主**(`lib/index.js`):注册 `webServer` 路由,拉起 PowerShell 全屏框选覆盖层,返回 `{ ok, file, marker }`
- **截屏脚本**(`lib/capture.ps1`):WinForms 遮罩层(接收全部输入)+ 点击穿透的顶层绿色框架层(明绿 3px 框线 + 8 个缩放手柄 + 操作提示),`CopyFromScreen` 区域截取;纯 ASCII 源码(Windows PowerShell 5.1 编码安全);结果从主流程输出;内置 `-SelfTest` 几何自检
- **填入输入框**:按优先级走 `props.inputActions` → `sessions.provideInfo(...).props.inputActions` → `session.prompt(..., 'queue')` 兜底,任何失败只弹提示、不影响使用
## 限制
- 仅 Windows(依赖 Windows PowerShell / System.Drawing)
- 宿主侧按钮点击与框选在应用前台进行;多显示器支持虚拟屏整体坐标
## 常见问题
- **点了按钮没反应?** 确认在会话输入框左侧能看到 ✂;该按钮走宿主路由,TUI/无 webServer 的部署不会显示。
- **截图保存了但输入框没标记?** 查看按钮弹出的提示(成功/失败都有提示)。标记是纯 ASCII `[Shot N HH:mm]`,可手动发送。
- **agent 怎么读截图?** 发送标记后,配了视觉引擎的 agent(如 ModLens)可按编号与时间定位 `截屏N_HHmm.png`。
- **文件名为什么带"截屏"而标记是 ASCII?** 文件名便于在文件夹中辨认;标记用 ASCII 是为了避免聊天输入/传输中的编码问题。
## License
[MIT](LICENSE)
Install
dsh plugin --profile web add github:deepseekbluefish/dsh-screenshot-plugin
Profile: web
With the hub plugin installed, ask your agent to install it by name — it resolves the same plan shown here.
dsh plugin --profile web add github:stvlynn/dsh.fish#path:packages/dsh-plugin-hub
install dsh-screenshot-plugin from the hub
- This source has no pinned commit, so a later push upstream changes what installs. Prefer pinning a commit.