- Accueil
- Plugins
- Améliorations UI
- dsh-native-shot
Q
dsh-native-shot
qing8-max/dsh-native-shot
Screenshot button in the DSH composer (Windows): drag a region that snaps to other windows, annotate or crop it, and insert the result into the prompt. Captures the screen in-process and leaves no file on disk. Both HTTP routes require host authentication through ctx.connection.requestRejection.
Installer
dsh plugin --profile web add github:qing8-max/dsh-native-shotREADME
dsh-native-shot
微信风格的截图按钮,装进 DeepSeek Harness 的输入框。Windows 原生实现,不调用系统截图工具,不落任何文件。
功能
- 点 📷 → 窗口自动最小化 → 抓取全屏 → 窗口恢复
- 拖出区域(选框自动吸附屏幕上其它窗口的边缘,虚线为参考框)
- 松手进入编辑器
- 编辑完点「✓ 插入」,图直接进输入框
框选
| 操作 | 效果 |
|---|---|
| 拖动 | 画出矩形,四条边靠近窗口边缘时自动吸附 |
| 双击 | 直接截全屏 |
Esc | 取消 |
编辑器
| 工具 | 说明 |
|---|---|
| 画笔 | 6 种颜色、3 档粗细(2/4/8 px),自由画线标注 |
| 撤销 | 按钮或 Ctrl+Z,最多回退 20 步 |
| 裁剪 | 切到裁剪模式,重新拖一个矩形,插入时只保留该区域 |
| ✓ 插入 | 确认并把图放进输入框 |
| 取消 | 丢弃本次截图 |
环境要求
| 项 | 要求 |
|---|---|
| 系统 | Windows 10 / 11(x64) |
| DeepSeek Harness | >=0.2.2-rc.1 <0.3.0-0 |
| 其它 | 依赖系统自带的 powershell.exe |
安装
通过 DSH 插件市场安装,或 npm install dsh-native-shot。
实现方式
宿主侧(index.js)注册两条路由:
| 路由 | 作用 |
|---|---|
GET /dsh-native-shot/capture | 最小化自身窗口 → CopyFromScreen 抓全屏 → 恢复窗口,返回 PNG |
GET /dsh-native-shot/windows | 枚举可见窗口矩形(供吸附) |
抓屏走 PowerShell + System.Drawing,窗口操作走 Win32 ShowWindow,并调用 SetProcessDPIAware 保证坐标与截图一致。
客户端(client.js)注册到 conversation.composer.dock 插槽,负责框选层、带画笔和裁剪的编辑器,最后合成一次 paste 事件把图交给 DSH 的草稿。
已知限制
- 仅支持 Windows 桌面会话,远程/无头环境不适用。
- 截取整个虚拟屏幕(含多显示器),框选层按截图等比显示。
- 屏幕上可见窗口超过 40 个时,只有前 40 个参与吸附。
- 不支持滚动长截图(该能力已移除)。
许可
MIT
Plugins associés
Z
dsh-web (dsh-task-board)
zhu1090093659/dsh-web
10.6kil y a 12 heuresAméliorations UIApache-2.0
Z
dsh-web (dsh-web-all)
zhu1090093659/dsh-web
10.6kil y a 12 heuresAméliorations UIApache-2.0
C
dsh-TUI
ccch1mneyyy/dsh-tui
8.1kil y a 14 heuresAméliorations UIMIT
Z
dsh-web-ui (dsh-task-board)
zhu1090093659/dsh-web-ui
6.3kil y a 3 moisAméliorations UIApache-2.0