DeepSeek Harness Image Generation Plugin dsh-image-gen

Introduction

DeepSeek Harness (DSH) adopts a plugin-based architecture. During agent development or daily use, it is often necessary to generate images directly within the toolchain rather than switching to external applications. The dsh-image-gen plugin provides a global gallery in the left sidebar of DSH (layout inspired by Cherry Studio) and offers conversational image generation and editing tools for Agents.

Features

The plugin primarily provides the following capabilities:

  • Sidebar Painting: Adds a “Painting” entry to the left sidebar. It includes gallery items, parameter settings (provider/model/ratio/clarity, etc.), a canvas area, and history records.
  • Sidebar Gallery: Browse all items with support for search, filter, favorites, batch operations (move/download/delete), and importing local images.
  • Prompt Favorites: Provides a bookmark button and keyboard shortcuts (such as / or Ctrl/⌘+K) for quick management of frequently used prompts.
  • Conversational Tools: The Agent automatically calls the following tools when images are required:
    • paint_image: Single image generation.
    • paint_images: Generate multiple images at once (up to 8).
    • edit_painting: Image-to-image editing or modification, supporting uploaded images, conversation attachments, or file paths.
  • Custom Endpoints: Pre-configured support for multiple providers, while also supporting the addition of any number of custom endpoints with automatic model list fetching.
  • Proxy Settings: Supports global proxies (system or custom) and independent proxy configurations for individual providers, along with a connection test feature.
  • Background Generation: The tools support a background parameter. When set to true, tasks run in the background, allowing the Agent to continue text output. Images are displayed inline in Markdown as genimg:<Task ID>.

Installation and Dependencies

Installation Command:

DSH Desktop Version:
Plugins → Add Plugin, enter @copylee/dsh-image-gen, and enable it after installation.

Command Line (dsh web and other profiles):

dsh plugin --profile web add @copylee/dsh-image-gen@latest

Runtime Environment:
* DSH Version: 0.1.7+
* Node.js Version: ^22.19.0 or >=24

Configuration and Usage

Provider Configuration:
After installation, a “Painting” entry appears in the left sidebar. Open it and click the settings icon in the top right, or go to Settings → Plugins → Image Generation to configure the API Key for at least one provider.

Custom Endpoints:
Click “Provider +” in settings to create a new one. Select the interface protocol (pre-configured support for ModelScope, Gemini, OpenAI, SiliconFlow, etc.), and fill in the name, API URL, Key, and model (supports “Fetch Models”).

Agent Invocation & Display:
When the Agent determines an image is needed, it will call tools like paint_image. While background tasks are pending, using the Markdown syntax ![description](genimg:<Task ID>) displays an inline placeholder of the same ratio showing “Generating,” which is automatically replaced by the image upon completion.

Data Storage:
Gallery data is stored in ~/.dsh/storages/copylee-image-gen/gallery.json, while image files are stored in the DSH attachment library. Prompts and reference images are sent to the configured provider.

Notes

  • Coexistence: This plugin uses a different package name, routing, and data directory compared to the original dsh-image-gen plugin; both can be installed simultaneously.
  • License: Original code is licensed under MIT, while ported files are licensed under Apache-2.0. See NOTICE for details.
  • Privacy: API Keys are stored in the DSH credential vault and are not accessible in plaintext from the browser side. Prompts and reference images are sent to the service provider.
  • Directory Configuration: The default data directory is ~/.dsh/storages/copylee-image-gen/. This can be modified via the environment variable COPYLEE_IMAGE_GEN_HOME or the plugin configuration option dataDir.

References

  • Plugin Directory: https://www.skillhub.cn/plugins/copylee711/dsh-image-gen
  • Source Repository: https://github.com/copylee711/dsh-image-gen
羽毛球分组比赛记分
小程序二维码

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

Xiaoye