dsh-image-annotate: Mark Issues on DSH Image Previews and Send the Annotated Image to the Input Field

Preface

When using DeepSeek Harness (DSH) and discussing model interfaces or screenshots, a common dilemma in colloquial terms is that “here” or “that button” has no anchor point on the image: the other party can only guess, and you can only take another screenshot and draw arrows again. Annotations from ordinary screenshot tools are burned into the pixels; if the position isn’t satisfied, you have to redraw.

dsh-image-annotate is a type of client plugin for the DSH ImageLightbox: it overlays an annotation pen on an existing preview layer. After circling, writing, and dragging adjustments, it sends the original-resolution annotated PNG through the composer’s paste channel into the input box. Below is an explanation by positioning, capabilities, installation, and usage.

What is it

  • Name: @dsh-plugin/dsh-image-annotate (npm package name); community directory entry is dsh-plugins/dsh-image-annotate.
  • Maintenance & Source: README and package.json repository is github.com/zhishengplus/dsh-image-annotate; License MIT; Current package version 0.1.2 (based on package.json).
  • One-sentence: Adds an annotation pen to the DSH image preview—after drawing, it can still be moved, scaled, and text changed; one-click sends the combined PNG into the input box.
  • Category: Classified as “Fun Outfits” in the community directory; on GitHub, the star count and user traces appear at a 3 magnitude level (badge links to the repo’s social stats).

The plugin runs on the browser side, does not import any @deepseek-ai/*, nor does it depend on dsh-loader; it has no affiliation with DeepSeek officially.

Core Features

The following capabilities all come from the project README and package.json descriptions; unverified features are not written.

Annotation Tools and Shortcuts

Seven tools: Move, Brush, Arrow, Rectangle, Circle, Text, Eraser. Circles and rectangles are formed based on the bounding box of the trajectory; hand-drawn circles are also supported.

Shortcut Function
V Select / Move
1 – 7 Correspond to the seven tools
E Eraser
Ctrl/⌘ + Z · Ctrl/⌘ + Shift + Z Undo · Redo
Delete Delete selected
Arrow keys (Shift for acceleration) Fine tune 1px / 10px

Text tool: Click on the image → Input → Enter (Esc to cancel).

Editable After Drawing

Each stroke is an editable object: select, drag, drag corners to scale proportionally, double-click to change text, delete; the stroke just drawn is automatically selected. When scaling, the text font size changes with the box.

Appearance and Entry

Toolbar, main button, and bottom-right “Annotate” entry use DSH design tokens (light/dark mode follows). A circular Annotate button appears in the bottom right of the preview, same style as the close button.

Add to Input and Export

When clicking Add to Input, the original image and strokes are synthesized into an original resolution PNG, dispatching a synthetic paste event with the file to the Lexical input box ([data-composer-input]); on failure, it sequentially tries document-level drop, clipboard hint, and downloading PNG.

Screenshots in messages, input box drafts, and images returned by the tool all use the same preview and annotation logic.

Technical Boundaries (For determining suitability)

  • Preview nodes are identified via MutationObserver for div[role="dialog"][aria-modal="true"] where direct child elements contain <img>; does not close the host React tree, only overlays canvas + toolbar on the preview DOM.
  • Strokes are stored based on original image pixels; preview scaling only affects display; export draws based on original dimensions.
  • The npm package mainly delivers a few files like lib/; Zero third-party runtime dependencies.

Installation and Enabling

Installation commands must use the original text from the README (do not splice yourself based on organization name):

# Install directly from GitHub
dsh plugin --profile <PROFILE> add github:zhishengplus/dsh-image-annotate

# Can also install by package name after publishing to npm
dsh plugin --profile <PROFILE> add @<scope>/dsh-image-annotate

# Local development link
dsh plugin --profile <PROFILE> add link:/path/to/dsh-image-annotate

After installation, confirm that dsh.profile.bundles in the profile’s package.json contains the above package name. First installation requires restarting DSH once (bundles are combined at startup); later changes to lib/client.js can be HMR by client-modules based on mtime, just refresh the page.

Uninstall: Delete the corresponding directory in the profile’s node_modules, and remove the item from dsh.profile.bundles.

Typical Usage

  1. In a session, click any image to open DSH image preview.
  2. Click Annotate in the bottom right of the preview.
  3. Use Circle, Rectangle, or Arrow to circle the issue, or write a sentence with text; if not satisfied, switch to Move (V) to drag or drag corners to scale.
  4. Click Add to Input; the annotated image enters the composer, the preview closes, and you type to send.

Roadmap items still to do include highlighter/mosaic, image annotation in the file browser on the right sidebar, automatic numbering annotation lists, etc. — based on the current README of the repository, unchecked items are not treated as existing capabilities.

Compatibility and Verification

Item Description
DSH README indicates tested 0.2.0-rc.2; depends on preview DOM contract, does not bundle internal APIs
Node ≥ 20 (repository scripts; plugin itself runs in browser)
Testing annotate 17 on fixture, edit 19; e2e_dsh.py has 21 items on isolated DSH instances (see README)

Suitable Scenarios and Notes

Suitable: Developers or daily Harness users who need to use screenshots in DSH conversations to precisely point out UI issues, layout crowding, or area bugs to the model; those who want annotations to be undoable, draggable, and for the model to receive the original resolution image with circles and text.

Notes:

  • The plugin runs in the browser with the same permissions as the DSH process; please review Source Code & LICENSE yourself before installing, as the community directory and GitHub are third-party distribution, not the official DeepSeek app store.
  • Debugging can view __dshImageAnnotate.annotators[0].state in the console, or open detailed logs via localStorage.setItem('@dsh-plugin/dsh-image-annotate.debug', '1').

Conclusion

dsh-image-annotate incorporates a few steps of “pointing it out with fingers” into the preview: circling, explaining, fine-tuning, and then one-click sending into the input box. Directory page: SkillHub — dsh-image-annotate; Source code and full instructions: GitHub — zhishengplus/dsh-image-annotate.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye