lsnnn123/dsh-screenshot-win ↗★ 0

dsh-screenshot-win

DSH 屏幕截图插件:聊天输入框的相机按钮 + Agent 可调用的 screenshot 工具(框选区域 / 指定窗口 / 整屏)。截图直接进入对话,并保存到工作区。 适合Windows用户,需要快速截取屏幕、窗口或区域并直接发送给Agent进行视觉分析。

Package
dsh-screenshot-win
Compatibility
Unverified
Version
0.1.0
License
MIT
Last updated
Oct 8, 2026

Install

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:lsnnn123/dsh-screenshot-win

配置

在 profile 或用户级 cordis.patch.yml 的插件行里配置:

- insert:
    - id: dsh-screenshot-win
      name: dsh-screenshot-win
      config:
        saveDir: screenshots        # 相对会话工作区
        maxWidth: 1600              # 超过则等比缩小(0 表示不缩放)
        format: png                 # png | jpeg
        quality: 88                 # jpeg 质量
        timeoutMs: 300000           # 单次采集脚本超时
        regionTimeoutSec: 180       # 框选覆盖层的自动取消时间
        tool: true                  # 是否注册 screenshot 工具
        routes: true                # 是否挂载浏览器半用的 HTTP 路由

使用

工具参数(screenshot):

参数说明
moderegion(默认,屏幕上框选)/ screen(整屏)/ window(指定窗口)
out输出文件;默认 /screenshots/shot-.png
hwnd / window / process / active指定窗口(句柄 / 标题正则 / 进程名 / 当前前台窗口)
focus截图前先前置该窗口
screen_fallbackPrintWindow 失败时回退到屏幕拷贝
monitor / x / y / width / height整屏模式的显示器与矩形范围
scale / max_width / format / quality缩放与编码
list_windows只列出可截取窗口(结果通过错误信息返回,方便模型阅读)
timeout_sec / no_window_pick框选模式超时 / 禁用「点选窗口」

窗口采集用 PrintWindow + PW_RENDERFULLCONTENT,因此被遮挡的窗口(含 Electron 窗口)也能正确截取;对少数 GPU 直绘窗口失败时会自动回退到屏幕拷贝(screen_fallback)。

界面语言跟着 DSH 走:ctx.locale.active 是 zh* 显示中文,其它显示英文;拿不到 locale 服务时按浏览器语言判断。