Adds a QQ-style screenshot button to the conversation composer: freezes the screen or a single window, lets you drag out a region, annotate it with a pen, and copies the result to the clipboard for pasting into the chat. Its HTTP routes have no DSH access check, so a web page open in your browser could call them.
Install
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:donk3major/dsh-plugins#path:/dsh-screenshot-tool
Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).
README
This plugin publishes its README in Chinese only.
DSH 的对话栏截图工具——输入框正中的一颗 QQ 式按钮:冻结屏幕、拖框选区、画笔做记号,完成后直接粘进对话。
点按钮 → 冻结整屏 / 冻结单个窗口 → 拖框选区
→ 画笔标注(高亮、圈重点、涂改)→ 复制进剪贴板
→ Ctrl+V 粘到对话里发送
为什么截图放在 Host 侧做
网页本身拿不到 Windows 桌面——打包后的桌面应用会拒绝给页面 display capture 权限。所以这个插件的架构是切开的:
| 位置 | 负责什么 |
|---|---|
Host 侧(index.js) |
真正去抓屏。内嵌一段 PowerShell 截屏脚本,通过同源路由 /dsh-screenshot/capture 把静态图交回页面 |
页面侧(client.js) |
拿到图之后的一切:冻结遮罩、拖框选区、画笔标注、导出剪贴板 |
窗口隐藏做得很克制:抓屏期间把宿主窗口收起来,放回去的动作写在截屏脚本自己的 finally 里,先验证一次,再由一个独立的 restore pass 再验证一次。
原因写在代码注释里——一个卡在隐藏状态的窗口,比一次慢截图糟糕得多。
技术要点
- 同源路由
/dsh-screenshot/capture;execFile调内嵌 PowerShell 脚本;输出落临时目录(mkdtemp),读完即清理 - 页面侧是原生 overlay,不引入任何绘图库——画笔、选区、遮罩都是自己画的
- 中英双语:
locale/zh.json(「对话栏截图」)+locale/en.json icon.svg自带;dsh.client.immediately: true,进会话就挂载,不需要手动初始化- 零第三方运行时依赖
安装
C:\Users\<user>\.dsh\plugins\dsh-screenshot-tool\
三处注册(缺一不加载):
- profile 的
dependencies——link:指向本目录 dsh.profile.bundles—— 列上@local/dsh-screenshot-tool- cordis entry —— 引用本包的
cordis.patch.yml
改完重启 DSH。
使用边界
- 只在 Windows 上验证过(依赖 PowerShell 截屏脚本与窗口隐藏逻辑)
- 抓的是桌面画面,不是网页 DOM——所以抓不到浏览器里被遮住或被系统裁掉的内容
- 宿主窗口隐藏/恢复期间有明显的一瞬,属于设计内行为(换来的是截图里不出现自己的界面)
License
MIT
Links
More in this category
zhu1090093659/dsh-web#packages/dsh-task-board★ 10703
Task board for the dsh web GUI: a sidebar multi-column kanban whose cards run in real DSH agent sessions and can also be scheduled with cron expressions, executed host-side even with the browser closed.
zhu1090093659/dsh-web#packages/dsh-web-all★ 10703
Plugin and skin collection for the DSH Web UI: task board, Git graph, right-side panel, remote mobile UI, pet, live token stats, and a skin center.
ccch1mneyyy/dsh-TUI★ 8557
Claude Code-style full-screen terminal UI: pixel-whale header, live status line, and streaming thought expansion.
MeteorNOX/DeepSeek-Balance-Whale-Widget★ 7523
A fixed-corner whale widget for the DSH web GUI — balance, today's usage and per-turn cost with peak/off-peak pricing, editable balance-alert and daily-budget bubbles, a module-based custom bubble queue with A/B weighted choices and random lines or images, 30+ vendor templates (OpenAI, OpenRouter, Kimi, SiliconFlow, Ark, Zhipu, MiniMax and more) with per-model balance and subscription quota, plus task-end sound, imported audio, custom roles and a resource manager. Local-only, no telemetry.
omdsh-dev/DSH-better-sidebar★ 5405
Full sidebar workbench with file rendering and editing, terminal, Git, and subagents; third-party plugins can register new tabs.
omdsh-dev/dsh-genui★ 1091
Interactive UI components rendered inline in replies: layout, charts, forms, quizzes, mermaid, 3D scenes, and an action event loop back to the model.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.