In the DSH ecosystem, visual interaction is an important part of agent development. Taking screenshots and directly feeding them to the Agent typically requires cross-application operations and manual organization, which can easily interrupt the workflow. This plugin integrates the screenshot functionality directly into the conversation input box, providing a WeChat-like box-selection experience and reducing manual steps.

The plugin is maintained by deepseekbluefish and positioned as a “WeChat-style” screenshot tool in DSH. It adds a ✂ button to the left side of the input box, allowing users to drag-select a region, automatically number PNG files, and insert a timestamped marker [Shot N HH:mm] into the input box.

Installation

Install the plugin using the official command. After installation, restart DSH or the corresponding client, and a ✂ button will appear on the left side of the input box.

dsh plugin --profile web add github:deepseekbluefish/dsh-screenshot-plugin

Core Features

The plugin provides a complete screenshot interaction workflow:

  • Drag selection: After clicking the button, the screen dims, and you can drag the mouse to select the target region.
  • Interactive adjustment: After releasing the mouse, the selection remains. You can drag the selection itself, or drag the eight handles at its corners and edges to resize it.
  • Confirm and cancel: Double-click the selection or press Enter to confirm the capture; press Esc to cancel.
  • Automatic numbering and markers: Screenshots are saved as 截屏N_HHmm.png (N is the sequence number), and a pure ASCII marker [Shot N HH:mm] is automatically inserted into the input box.

Configuration

By default, screenshot files are saved in ~/Pictures/DSH-Screenshots. If you need to change the directory, you can override the configuration using a profile patch.

Create or edit ~/.dsh/profiles/<name>/cordis.patch.yml:

- id: screenshot
  config:
    folder: 'D:\MyScreenshots'

Typical Usage

  1. In the conversation interface, click the ✂ button on the left side of the input box; the screen dims.
  2. Drag the mouse to select a region. After releasing, the selection remains highlighted, and you can adjust its position or size.
  3. Double-click the selection (or press Enter) to confirm the capture.
  4. The marker [Shot N HH:mm] appears automatically in the input box.
  5. Click Send to send the marker to the Agent. With a vision plugin (such as ModLens), the Agent can locate the corresponding PNG file based on the number and time in the marker.

How It Works

The plugin consists of three parts: the client, the host, and the screenshot script:

  • Client: It registers to the conversation.input.left slot and initiates a POST /api/screenshot/capture request after being clicked.
  • Host: It registers the webServer route and calls PowerShell to launch a full-screen overlay. The overlay is implemented with WinForms and includes a green border, eight resize handles, and operation hints.
  • Screenshot script: It uses CopyFromScreen to crop the selected region. The script uses pure ASCII source code to avoid encoding issues.
  • Marker insertion: The marker is written into the input box through the priority chain props.inputActions → sessions.provideInfo(...).props.inputActions → session.prompt(..., 'queue').

Limitations and Notes

  • Platform limitation: The plugin supports Windows only and depends on Windows PowerShell and the System.Drawing library.
  • Foreground operation: Clicking the button and the selection process must be performed while the application is in the foreground.
  • Multiple monitors: In multi-monitor environments, selection coordinates are calculated based on the entire virtual desktop.
  • Agent reading: The Agent must be configured with a vision engine (such as ModLens) to read the screenshot files.

Summary

By simulating WeChat’s screenshot interaction, this plugin solves the pain point of quickly taking screenshots in DSH and syncing them to the Agent. It is easy to install, flexible to configure, and suitable for developers who frequently need visual feedback in conversations.