Перейти к основному содержимому
N

dsh-screenshot

nuomi9296/dsh-screenshot

Adds a Screenshot entry to the composer's + menu: the host captures the screen and attaches the PNG to the current message through DSH's own attachment pipeline. Windows only.

Установка

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

README

Screenshot for DeepSeek Harness

Adds a Screenshot entry to the composer's + menu (Add files or run commands, bottom left of the message box). Picking it captures the screen on the DSH host and attaches the PNG to the current message, so the thumbnail, upload and remove controls are DSH's own.

Screen capture becoming an image attachment in the message

Install

From the plugin market, or directly:

dsh plugin add github:nuomi9296/dsh-screenshot

Restart DSH once after installing: a newly added bundle is loaded at startup, not while the app is running.

Use

  1. Open a conversation and click + at the bottom left of the message box.
  2. Choose 截图 / Screenshot in the Commands group.
  3. The screen is grabbed and a PNG thumbnail appears in the composer. Type and send as usual.

How it works

  • Client half registers a commandUi contribution with ui.kind = 'action'. The + menu only lists the command source, so a contribution is the supported way to add an entry there. Its run() asks the host for a capture and then hands the PNG to the composer's hidden <input type="file">, which is the same path as picking a file by hand.
  • Host half registers GET /dsh-screenshot/capture on DSH's own HTTP server (webServer.register), so the request is same-origin and needs no extra port or CORS setup. On Windows it shells out to PowerShell and System.Drawing.CopyFromScreen over the virtual screen, and returns the PNG.
  • Captures are written to the system temp folder (dsh-screenshot/); files older than 24 hours are deleted on the next capture.

Privacy and limits

  • A capture contains everything visible on that screen, including other windows. Check what is open before using it.
  • The route answers only same-origin requests (Origin must match Host) and only GET; it relies on DSH's own access control, so it is not reachable from another site.
  • Windows only — other platforms answer 501.
  • One image per capture; multi-monitor setups produce one wide combined image.

Requirements

  • DeepSeek Harness ^0.2.3-alpha.2
  • Windows (the capture step); the bundle itself installs anywhere.

License

MIT

Похожие плагины