Introduction¶
DeepSeek Harness (DSH) originally only allowed dragging or selecting local files into the input box as attachments. To send on-screen content to the model, developers typically had to open a screenshot tool, save the image, then go back to DSH to locate the file and drag it in. This two-step detour easily breaks workflow momentum.
dsh-screenshot-loupe is a screenshot plugin designed for the DSH input box: click the camera button and the screen freezes in place with a dimming overlay. Simply drag a rectangle on your desktop, and upon release, the selection is automatically injected into the input box as an image attachment. The plugin provides an 8× loupe magnifier, a 1px pixel grid, and crosshair guides—allowing edge precision down to a single pixel.
What It Is¶
- Name: dsh-screenshot-loupe
- Maintainer: wzx060802-cyber
- Type: Client-side plugin
- Description: A screenshot plugin for the DeepSeek Harness input box, supporting region selection, magnifier, annotation, and full-screen capture with zero additional runtime dependencies.
Core Features¶
- In-place screenshot: The camera button sits in the input box toolbar (
conversation.input.left). Clicking it enters selection mode directly—no tool switching required. - Frozen frame + dimming: While selecting, the screen displays a frozen frame. The selection appears as a “bright window” in the dimmed overlay, preventing misalignment caused by background changes.
- 8× loupe magnifier: Follows the mouse pointer, showing a 15×15 pixel zoomed view with a 1px pixel grid, target pixel highlight, and coordinates (e.g.,
1215, 1086). Automatically flips to the opposite side when near screen edges. - Crosshair guides: Full-screen black/white dual lines, clearly visible on both light and dark backgrounds.
- In-rectangle annotation: After releasing, the selection is retained with a floating toolbar below, supporting arrows, rectangles, text, and mosaic (pixelation). Annotations are burned into the final PNG at original resolution.
- Undo support:
Ctrl+Zundoes the last stroke;A/R/T/Mswitches tools;Enteror✓finalizes the screenshot; double-clicking the selection also completes it. - Hide this window (Windows only): When checked, the DSH window is minimized before capture and automatically restored afterward.
- Zero runtime dependencies: The overlay is written in C#, compiled on the fly via the Windows built-in .NET Framework and cached—no need to install .NET 8 or ship a packaged exe.
- Cross-platform selection: Windows uses the built-in overlay; macOS uses
screencapture -i; Linux supportsmaim -s/scrot -s/gnome-screenshot -a/spectacle -r. - Adaptive entry point: On page load,
/dsh-screenshot-loupe/probeis called, and the returned{ platform, region, annotate, hideWindow }determines which controls are displayed. - Native paste channel: The screenshot enters the draft through the input box’s own paste channel. Image count/size limits, upload status, thumbnails, and deletion are all native behaviors.
Platform Support¶
| Platform | Region Selection | In-Rect Annotation | Full Screen | Hide This Window | Status |
|---|---|---|---|---|---|
| Windows 10 / 11 | Built-in overlay (with magnifier, crosshair) | Arrow / Rectangle / Text / Mosaic | Yes | Yes (minimize then restore) | Verified |
| macOS | screencapture -i |
No | Yes | No | Code written, unverified |
| Linux | maim -s / scrot -s / gnome-screenshot -a / spectacle -r |
No | Yes | No | Code written, unverified |
Installation & Activation¶
This is a Harness profile bundle (declares dsh.bundle.patch and dsh.client in package.json).
Method 1: Install local directory via plugin manager
plugin_manager install_bundle /absolute/path/dsh-screenshot-loupe
Method 2: Manually place in profile
- Copy the plugin directory to
$DSH_PROFILE_DIR/node_modules/. - Insert the following into the profile’s
cordis.patch.yml:
- insert:
- id: dsh-screenshot-loupe
name: 'dsh-screenshot-loupe'
Method 3: Install via npm
npm i dsh-screenshot-loupe
Then add the package name to the profile’s bundle list (same cordis.patch.yml as above). After installation, restart Harness (modules already loaded by the host are not hot-swapped) and refresh the page.
Typical Usage¶
- Click the camera button in the input box toolbar.
- The screen freezes and dims. Move the mouse to use the magnifier for aligning edges.
- Hold the left mouse button and drag a rectangle. Release—the selection stays in place with the toolbar floating below.
- To annotate, draw arrows/rectangles, apply mosaic, or add text within the selection;
Ctrl+Zto undo;A R T Mto switch tools. - Press
Enter, click✓, or double-click the selection to finalize. The image automatically appears in the input box attachment area and is sent with the next message.
Keyboard shortcuts and tips:
Escor right-click to cancel- Drags smaller than 6×6 pixels are treated as accidental touches; the overlay is retained for retry
- To keep DSH out of the screenshot:
+menu → “Screenshot” opens the options panel—check “Hide this window during screenshot” (the choice is remembered) - The panel provides a “Full-screen capture” option, skipping selection to capture directly
- Text tool: click within the selection to spawn an input field;
Enterto submit,Escto discard
Use Cases & Caveats¶
- Ideal for DSH users who need to quickly capture a portion of the screen and annotate details, especially in scenarios requiring pixel-precise alignment.
- The plugin runs with the current DSH process permissions. Review the source code and license (MIT) before installing.
- In-rectangle annotation and “hide this window” are Windows-only; macOS / Linux support region selection and full-screen capture only.
- On macOS, the first use requires granting Harness the “Screen Recording” permission; on Linux, one of
maim,scrot,gnome-screenshot, orspectaclemust be installed.
How It Works¶
The flow is illustrated below:
[Page] Camera button / + menu
│ GET /dsh-screenshot-loupe/screen.png?mode=region&hide=1&hint=…
▼
[Host plugin] PowerShell launches capture script
│ 1. Minimize the app window if needed (restored in finally)
│ 2. CopyFromScreen to grab virtual desktop (DPI-aware)
│ 3. Full-screen overlay: frozen frame + dimming + crosshair + magnifier → drag selection
│ 4. In-rect annotation (arrow/rectangle/text/mosaic), Ctrl+Z to undo
│ 5. Crop to selection, burn annotations into PNG at original resolution
▼
[Page] Receive PNG → compose a paste event to the input box's own intake
▼
DSH's paste routing validates image limits → becomes a draft attachment
The overlay code is in snip.cs (C# 5), compiled on the fly via Windows PowerShell 5.1’s CodeDom compiler, and cached by source hash to %TEMP%\dsh-screenshot-loupe\snip-<sha1-first-12>.dll. The first click takes about 2 seconds; subsequent ones show the overlay in about 1 second.
GET /dsh-screenshot-loupe/probe returns { platform, region, annotate, hideWindow }, and the page uses this to decide which controls to display.
Project structure:
index.js Host side: routing, capture script, window hide/restore, compile cache
snip.cs Overlay, magnifier & in-rect annotation (WinForms, C# 5)
client.js Page side: camera button, options panel, API calls & draft injection
locale/*.json Plugin manager titles/descriptions/detail pages
docs/DETAIL.md Plugin detail page body
cordis.patch.yml Loader entry
Known Limitations¶
- In-rect annotation and “hide this window” are Windows-only; macOS / Linux return the system’s native screenshot output.
- Scroll capture and window picker are not supported; annotations do not support free rotation or stroke width/color selection (fixed brand-blue 3px + white-stroked text).
- Captures a single frozen frame—the overlay shows a frozen frame, not a live preview.
- Multi-monitor captures use the full virtual desktop; selection can span across screens.
- The capture route is a same-origin GET with no additional credentials, bound only to the local loopback address the Web GUI listens on.
- macOS requires the “Screen Recording” permission for Harness on first use; Linux requires installing the appropriate tool.
Privacy¶
- Screenshots flow only between memory and the temp directory: the captured frame is written to a temporary PNG and deleted immediately after retrieval.
- Images are persisted to disk by Harness’s attachment storage only after the user clicks Send.
- The plugin writes no configuration files; the “hide this window” toggle is stored in the browser’s
localStorage.
Ecosystem¶
The DSH community already has several screenshot plugins, each with different trade-offs. It’s recommended to browse them all before installing:
- joythatway/dsh-screenshot — Region/window/full-screen + settings page + image preview, more complete on macOS
- 12138hao/dsh-snap — Windows frozen-frame selection, requires .NET 8 runtime
- aaron999-h/dsh-screenshot —
+menu entry, DSH remains visible - lsnnn123/dsh-screenshot-win — Additionally provides an Agent-callable
screenshottool - TenDollars-ag/dsh-screenshot — Zero dependencies, Per-Monitor DPI, full-screen/occluded window capture
The key differentiators of this plugin: no additional runtime required (on-the-fly compilation via the system’s built-in .NET Framework + caching), selection paths available on all three platforms, and a framing experience with magnifier + pixel grid + crosshair guides.
License¶
MIT