Introduction¶
In the development workflow of DeepSeek Harness (DSH), it is often necessary to let a large model understand the current interface state of an application. The traditional approach is to take a manual screenshot and copy key text, which interrupts the workflow. The dsh-appshots plugin solves this problem through automation: it can directly capture the current active window and inject the screenshot and window text into the session as context.
Plugin Introduction¶
dsh-appshots is a plugin designed for DSH Desktop, supporting macOS and Windows. It focuses on capturing the frontmost window rather than taking a screenshot of the entire screen, attaches the screenshot to the input box draft, and reads the window text as hidden model context.
Core Features¶
- Precise Capture: Only captures the frontmost window; it does not take a screenshot of the entire screen.
- Draft Attachment: The screenshot is attached to the input box draft and is not sent automatically.
- Context Injection: It reads the window text and injects it as hidden model context.
- Self-Exclusion: Automatically skips DSH Desktop itself.
- Automatic Foreground Return: After taking the screenshot, it automatically brings DSH Desktop to the foreground.
- Cross-Platform: Supports macOS and Windows.
Installation and Enablement¶
Run the following command in the terminal to install the plugin:
dsh plugin --profile desktop add dsh-appshots
After installation, restart DSH Desktop to activate the plugin.
Usage Steps¶
- Focus the window you want to share.
- Trigger the screenshot: on macOS, press both Command keys; on Windows, press both Control keys; or click the camera button in the input box.
- DSH Desktop automatically comes to the foreground, and the screenshot has been attached to the current session.
- Enter a prompt and send it.
Configuration Details¶
The plugin configuration is located at ~/.dsh/settings.yaml, under the dsh-appshots namespace. The main configuration options include:
skipSelf: Whether to skip DSH Desktop itself (default: true).attachText: Whether to inject the accessibility tree as hidden model context when sending (default: true).recentWindowMs: When no session is open, reuse the session screenshotted within this time window (default: 60000).hotkeyMode: Hotkey mode, supportingauto,both-command,both-control, etc. (default: auto).
Notes¶
- System Permissions:
- macOS: You must grant DSH Desktop screen recording and accessibility permissions.
- Windows: Screenshots use
CopyFromScreen; the system may pop up a request for screen access permission on the first screenshot.
- Text Reading Limitations:
- Window text comes from the system accessibility tree (macOS) or UI Automation (Windows). Some applications only expose visible text or cannot be read due to elevation/protected content.
- The hidden text is output according to the VoiceOver / UI Automation tree (including role, indentation, Description / Value / URL), and is no longer flattened.
- Terminal pixels (such as VS Code xterm) are not included in the accessibility tree by default; for compilation logs, the screenshot remains the source of truth.
- Screenshot Behavior:
- Windows: It captures the screen pixels within the window rectangle; content obscured by other windows will appear in the screenshot.
- macOS: You must grant screen recording permission.
By automating capture and context injection, dsh-appshots simplifies the interaction workflow in multi-window environments. For more details, see the GitHub repository or the community directory.