ysr666/dsh-vision-router
ysr666/dsh-vision-router为纯文本 Agent 提供视觉能力:内置免 Key 视觉链 + 像素级视觉工具(看图问答、定位、裁剪、像素对比、取色、OCR、矢量化、抠图、截图);粘贴图片即可用。
DSH 轻量截图插件:轻——零依赖零二进制;摆——一键全屏、窗口排版、悬停吸附截取被遮挡窗口;自助——Agent 可自助截屏,传路径不传图,路径通用,接上 modlens(选装)一步读出结构化内容。
Zero-dependency screen capture for DeepSeek Harness: Lightweight: zero deps, zero binaries; Stage & shoot: one-click full screen, window layout, hover-snap capture of occluded windows; Agent self-service: path-only delivery; paths are universal, pair with modlens (optional) for one-call structured evidence.
dsh plugin --profile web add @paicat1/dsh-screenshot
# restart dsh web
Ctrl+Alt+S — capture: once armed, click the desktop = full screen; hover a window = snap outline, one click captures that window's full content (even when occluded, except a standalone PowerShell); drag = free region (Esc to cancel)Ctrl+Shift+Alt+S — full-screen capture: no interaction, captures the whole virtual desktopmodlens_screenshot tool.Video tutorial (Bilibili): Using DeepSeek Harness to build a Dsh screenshot plugin for DeepSeek Harness
| Entry | Best for | Notes |
|---|---|---|
| Browser hotkey (human) | "Here's the screen I want to show you" | Full / region capture; the PNG path is auto-inserted into the DSH input box and copied to the clipboard |
modlens_screenshot tool (agent) | "Let me look at the screen myself" | Model-invoked: capture + (with modlens present) in-call structured read, returning evidence + the shot path |
| Manual capture demo | Agent self-capture demo | Window-snap demo |
|---|---|---|
Screenshots are saved to %USERPROFILE%\Downloads\modlens-screenshots\ (a dedicated, easy-to-clean directory), and only the PNG path is handed to the agent — not the image stuffed into a chat box or temp directory. Deliberate design:
modlens-screenshots/); cleaning up is deleting one directory.Capture once, reuse the path in any agent, produce zero junk.
| Layer | Capability | Owned by |
|---|---|---|
| Capture | Full / region / window-snap capture / staged-window layout, zero-dep PowerShell | This plugin |
| Delivery | Path-only, clipboard, dedicated save dir | This plugin |
| Entry points | Browser hotkeys + agent-callable capture tool | This plugin |
| Reading | OCR / layout / semantics structured evidence | modlens (optional) |
| Consumption | Who understands the image | any multimodal model / vision bridge — agnostic |
Capture and delivery are fully self-contained and work standalone; reading is an ecosystem combo — install modlens (or hand the path to any image-capable model/bridge) to unlock it. Without modlens, capture still works.
Why can window-snap capture "occluded" windows? On hover the plugin enumerates the on-screen windows and outlines the one under the cursor; on click it uses PrintWindow to ask the window to render itself — the shot is the window's own content, not the on-screen pixels, so being covered by other windows or wrapped in a DWM shadow doesn't matter. It then crops to the DWM content bounds to drop the shadow, for clean edges.
Known exception: a standalone PowerShell window: its console (conhost) implementation does not respond to PrintWindow, and does not render its GDI surface while covered — both see-through-occlusion paths are unavailable, so it falls back to the visible on-screen pixels (including whatever covers it). Bring it to the foreground and click, or just drag-select over it. All other windows (including cmd and other console windows) capture normally.
Optional cordis config (all enabled by default):
route: false — disable the browser capture routetool: false — disable the modlens_screenshot toolMODLENS_DSH_CLI explicitly sets the modlens CLI path (default probe: ~/.dsh/profiles/{web,headless}/node_modules/@liustack/modlens/dist/main.js).
System.Drawing.CopyFromScreen)| Layer | Depends on modlens? | Notes |
|---|---|---|
| Capture action | No | Pure PowerShell CopyFromScreen, zero dependencies |
| Browser hotkeys / path insert | No | Standalone route /dsh-screenshot/screenshot |
modlens_screenshot tool reading | Yes (optional) | If the modlens CLI is missing, the tool is not registered; capture still works |
| Multimodal models | No | After the path is inserted, multimodal models (e.g. go-mimo) can read the image directly, no modlens needed |
The capture capability was originally implemented as an enhancement to the dsh plugin of @liustack/modlens (by Leon Liu): the original modlens dsh plugin integrated capture (this repo's fork of the feat/dsh-screenshot branch), and the author marked it as not planned in issue #48. It was split into this standalone plugin to decouple capture from modlens updates.
Many thanks to the original author for giving DSH image-reading ability — modlens lets text-only models (DeepSeek/GLM) "see" images, and this plugin's modlens_screenshot tool reuses the modlens pipeline to combine "capture + read" into one step. The capture half is maintained separately, but the image-reading ability always belongs to the modlens project.