In the DeepSeek Harness workflow, image generation is usually only a static output. If fine-tuning the result is needed, developers typically have to save the file, edit it locally, and then upload it again. The dsh-image-studio plugin turns this process into immediate, in-chat actions.

Plugin Role

dsh-image-studio is a client-side plugin maintained by wu81313-lab. It adds an edit button to generated image cards. By annotating, erasing, or resizing, users can modify images directly within the conversation. The plugin then returns the modified file path and mask information to the agent so it can continue processing in the next turn.

Core Features

The plugin provides the following capabilities:

  • Inline image cards: Displays generated images in the conversation flow, with a fixed edit button at the bottom left.
  • Editing tools:
    • Annotation: Supports freehand lines, rectangles, and arrows, with adjustable color, stroke width, undo, and clear.
    • Erasing: Generates an RGBA mask by drawing transparent areas.
    • Resizing: Supports dragging a crop box, free aspect ratios, and common aspect-ratio presets (1:1, 16:9, etc.), while constraining output sizes to conform to PackyAPI rules.
  • Workflow closure: After the user clicks generate, the plugin writes the edited result to disk (in PNG format) and returns the file path through routing. The agent can then read and process these modified files in the next turn.

Installation and Enablement

Installing the plugin requires the DeepSeek Harness Web GUI environment. Use the Web profile to install it:

dsh plugin --profile web add github:wu81313-lab/dsh-image-studio

After installation, the plugin is registered in dependencies and dsh.profile.bundles. Because the plugin is loaded at startup, after installation you must restart DSH and refresh the browser page to ensure that both client-side and host-side components are mounted correctly.

Typical Usage

Tool Invocation

After generating an image, the agent triggers the card display by calling the sunburst_image_card tool. This tool accepts the following parameters:

sunburst_image_card(path="<the path the script printed>", prompt="<the prompt used>",
                    model="gpt-image-2.5-sunburst", size="3840x2160")

Routing and Data Flow

  • Fetch image: Streams image bytes via the GET /dsh-image-studio/image?path=… route, without transferring Base64 through RPC.
  • Submit edit: After editing in the editor, the user clicks generate. This calls POST /dsh-image-studio/stage; the plugin writes the edited result (annotated image, mask image, or cropped image) to disk and returns a message containing the file path and action instructions to the agent.

Applicable Scenarios and Notes

This plugin is suitable for any scenario requiring conversational image editing, especially when used alongside image generation skills.

Notes:
* Mask size constraint: The mask generated by the erase function (RGBA PNG) must exactly match the original image size. Therefore, the plugin does not support combining “cropping” and “erasing” into a single step; they must be performed separately.
* Body cap: The request body size limit for the POST /dsh-image-studio/stage endpoint is 128 MiB.
* Permission requirements: The plugin runs with the permissions of the current DSH process. Please review the source code and license before deploying it.