Codex-style window capture for DSH Desktop on macOS and Windows: press both Command keys (macOS) or both Ctrl keys (Windows), or the camera button, to grab the frontmost window, attach it to the current chat, and inject a VoiceOver-style accessibility tree as hidden context.
Install
# from npm (prebuilt)
dsh plugin --profile web add dsh-appshots
# from a prebuilt release tarball
dsh plugin --profile web add -w "https://github.com/WongYuYe/dsh-appshots/releases/latest/download/dsh-appshots.tgz"
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:WongYuYe/dsh-appshots
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
简体中文 | English
Codex-style window capture for DSH Desktop on macOS and Windows.
Press both Command keys on macOS, both Ctrl keys on Windows, or the camera button next to the composer to grab the frontmost window, attach it to the current chat, and inject available window text as hidden context.
- Captures the frontmost window only, not the whole screen
- Attaches the screenshot to the composer draft without sending it
- Reads available window text (Accessibility on macOS, UI Automation on Windows) and injects it as hidden model context
- Skips DSH Desktop itself so the plugin does not capture its own window
- After capture, brings DSH Desktop to the front
Install
dsh plugin --profile desktop add dsh-appshots
Restart DSH Desktop after installing.
From source:
git clone https://github.com/WongYuYe/dsh-appshots.git
cd dsh-appshots
dsh plugin --profile desktop add .
On Windows the helper compiles on first capture with the system csc.exe (.NET Framework 4.x). Visual Studio is not required.
Release: bump package.json to X.Y.Z and push a vX.Y.Z tag. GitHub Actions opens the GitHub Release and publishes to npm with Trusted Publisher (OIDC).
Permissions
macOS
System Settings → Privacy & Security:
- Screen Recording: required to capture the frontmost window
- Accessibility: required to listen for both Command keys and read window text
Grant these to DSH Desktop. If the hotkey does not fire, also allow appshot-capture.
Windows
- Screen capture uses
CopyFromScreen; Windows may prompt once for screen access - Window text uses UI Automation; some elevated or protected apps expose little or no text
- The default hotkey is both Ctrl keys. If it does not fire, try
hotkeyMode: win-hotkey
Use
- Focus the window you want to share.
- Press both Command keys (macOS) or both Ctrl keys (Windows), or click the camera button in the composer.
- DSH Desktop comes to the front with the screenshot attached.
- Add a prompt and send.
If a session is currently open, the appshot goes there. If none is open, a new session is created. Consecutive captures go to the same session.
Settings
Namespace dsh-appshots in ~/.dsh/settings.yaml:
| Field | Default | Meaning |
|---|---|---|
skipSelf |
true |
Skip DSH Desktop itself |
attachText |
true |
Inject the accessibility tree as hidden model context on send |
recentWindowMs |
60000 |
If no session is open, reuse the session captured within this window |
hotkeyMode |
auto |
auto / both-command / both-control / carbon / win-hotkey / off |
carbonKeyCode |
0 |
Carbon key code when hotkeyMode is carbon |
carbonModifiers |
256 |
Carbon modifiers; 256 is Command |
winVk |
44 |
Virtual-key code when hotkeyMode is win-hotkey (44 is PrintScreen) |
winModifiers |
3 |
Win32 modifiers for win-hotkey; 3 is Ctrl+Alt |
auto is both Command keys on macOS and both Ctrl keys on Windows.
Limits
- macOS and Windows only
- Window text comes from the platform accessibility tree, so some apps expose only visible copy
- Hidden text is an indented VoiceOver / UI Automation tree (role, Description / Value / URL), not flattened unique lines
- Opening an attached Appshot preview adds a View text control that shows the accessibility copy for that window
- Terminal pixels (VS Code xterm) are usually absent from accessibility, so compile logs still come from the screenshot
- Windows capture copies the on-screen pixels of the window rectangle; occluded windows include whatever is visible
License
MIT
Links
More in this category
liustack/modlens★ 5142
Vision bridge for text-only models: paste an image, get structured JSON evidence (OCR, layout, semantics).
ysr666/dsh-vision-router★ 1317
Free vision for text-only agents: built-in keyless vision chain plus pixel tools (Q&A, grounding, crop, pixel diff, colors, OCR, SVG trace, cutout, screenshots); paste an image to use it.
Anionex/dsh-vision-toolkit★ 962
Vision for text-only models: paste an image and the model switches to a Vision Toolkit variant for image Q&A, multi-image comparison, long-screenshot OCR, screenshot-to-UI reproduction, element grounding, and pixel diff. No API key by default — images are processed by the author-hosted free service, 100 per machine per day; configurable to your own provider.
SAOS-3624/dsh-see-now★ 823
Lets a text-only agent watch a live screen or camera feed: every frame is scored by how much the picture changed, only the ones that matter are packed into one numbered sheet with an audio envelope, so the model looks at what actually changed instead of a screenshot every few seconds.
kingcharleslzy-ai/dsh-qwen-studio★ 805
Qwen Image 2.1 workspace for DSH: Apple Silicon MLX or your own NVIDIA server, native reference editing, LoRA, ControlNet, inpainting, shared presets, gallery and live agent progress. Includes verified updates and an agent setup guide.
SAOS-3624/dsh-video-storyboard★ 625
Turns a video (a local file, or a Bilibili/yt-dlp link) into one addressable storyboard grid — numbered cells with exact timestamps, per-cell transcript and an audio envelope on the same timeline — and video_zoom re-reads any window at higher resolution, so a text-only model can look at the video instead of reading a summary.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.