Skip to main content

dsh-imagegen

8Stars1Forks1Issues0Watchers

Add AI image generation sidebar to DSH Web GUI, with OpenAI-compatible API proxy, supporting text-to-image, image-to-image, and a history/prompt template library.

Evidence5/5methodologySourceInstallMaintenanceDSH versionSecurity scan
Machine-auditedInstall commandRepo verifieddsh-plugin topicLicenseREADMEAI wiki
Language
TypeScript
License
Apache-2.0
Branch
main
dsh-plugin

Install

cmdweb profile
$ dsh plugin --profile web add @dickpy/dsh-imagegen

Run the command above in your terminal to install this plugin via the dsh CLI. You can switch Profile in the top-right corner. New to dsh? Read the beginner tutorial

Install via your agent

Install the DeepSeek Harness plugin dickpy/dsh-imagegen for me: review the repository at https://github.com/dickpy/dsh-imagegen first, then run the install command and verify the plugin loads successfully.

Paste this instruction to the DSH Web GUI assistant — it will install and verify for you.

One-Line Description

Adds an AI image generation sidebar to DSH Web GUI, calling OpenAI-compatible image generation interfaces via local host proxy, providing text-to-image, image-to-image, generation history, and prompt template library—all requests and keys stay local and are not exposed to the browser.

Core Capabilities

  • Provides "AI Image Generation" entry in DSH Web GUI sidebar, presenting a three-panel workspace (parameters, generation results, history)
  • Supports text-to-image (prompt input) and image-to-image (upload reference image for modification), interfacing with /images/generations and /images/edits endpoints
  • Adjustable size, quality (low/medium/high), generation count (1-4 images), and passthrough detail parameter
  • Auto-saves generation results to local history (max 50 entries), supports viewing, restoring parameters, deleting individual entries, or clearing all
  • Built-in 441 gpt-image-2 prompt template cases, supports searching, category filtering, copying prompts, one-click fill to image generation input
  • Provides online update check: shows update button at workspace top when GitHub new version is detected

Technical Implementation

  • Language: TypeScript + React 18
  • Key Dependencies: @deepseek-ai/dsh-client-ui-primitives (system UI components), @deepseek-ai/dsh-settings (settings panel host), @deepseek-ai/dsh-host-webserver (route registration), @deepseek-ai/dsh-system-prompt (system prompt broadcast)
  • Architecture Pattern: Dual-end architecture—host side (src/index.ts) registers cordis plugin, mounts API routes, registers system prompt sections; client side (src/client/) mounts sidebar panel and settings card via dynamically attached React node, communicates with host via same-origin routes /api/dsh-imagegen/*
  • Entry Files: src/index.ts (host side), src/client/index.ts (client side)

Use Cases

Suitable for Agent users who already work daily in DSH Web GUI, wanting to directly feed model generations or reference images to gpt-image-2 in the IDE sidebar, saving the step of switching to the web console; also suitable for developers needing to provide Agents with "image generation" capability—after enabling "Broadcast to Agent", the Agent can call this panel in its system prompt.

Prerequisites & Compatibility

DependencyMin VersionDescription
DSH0.1.0-rc.7+Plugin depends on host services like @deepseek-ai/dsh-settings, dsh-host-webserver, dsh-system-prompt
Node.js>=20Supported version marked in README
PlatformCross-platformRoute layer uses Node built-in node:fs / node:http / node:crypto, no native bindings
Native ModulesNoneOnly third-party dependency is schemastery

Installation

dsh plugin --profile web add @dickpy/dsh-imagegen

Configuration Options

ConfigTypeDescriptionDefault
api_urltextOpenAI-compatible API root address, e.g., https://api.openai.com/v1, plugin auto-appends /images/generations or /images/editsempty
api_keysecretBearer API key, only saved in host-side settings file, UI shows "Set/Unset" status onlyempty
Enable PlugintoggleAfter disabling, image generation workspace and model calls are all disabled, routes remain for re-enablingenabled
Broadcast to AgenttoggleAfter enabling, writes plugin capability into Agent's system prompt, letting Agent know it can call image generationenabled

FAQ

Q: Where do I access the image generation feature after installation?

A: After installation, restart dsh web, and an "AI Image Generation" entry will appear in the left sidebar. Before first use, open "Settings → Plugins → Configurable", expand the "AI Image Generation" card, fill in the API address and key, then save.

Q: Must I use the OpenAI official API?

A: Not required. The plugin connects to all OpenAI-compatible /images/generations (text-to-image) and /images/edits (image-to-image) endpoints; as long as your service provides these two interfaces and returns data[].b64_json or data[].url in the response, it works.

Q: Do generation requests need image upload or text only?

A: Both are supported. Text-to-image only needs a prompt; image-to-image requires dragging or selecting a reference image in the panel (PNG/JPG/WEBP/GIF), single image limit 10MB, exceeding will be blocked by frontend.

Q: Where is history stored?

A: All stored locally. Images go to ~/.dsh/dsh-imagegen/images/, index file is ~/.dsh/dsh-imagegen/index.json, keeps max 50 entries, earliest are auto-eliminated. Different browsers/devices connecting to the same DSH instance share the same history.

Q: Does the prompt template library need internet?

A: Template case list (~441 entries) is bundled with the plugin, no internet needed to view; reference images for each case are pulled on-demand from vibeui.top mirror and cached to ~/.dsh/dsh-imagegen/template-images/, second browse doesn't need internet, first load requires accessing that site.

Q: Will the plugin auto-update?

A: No auto-update. Every time entering the workspace calls GitHub Releases API to check latest stable version (result cached 15 minutes), when new version found, an update button appears at panel top; after clicking, host process executes dsh plugin ... add @dickpy/dsh-imagegen@<version>, after installation must restart dsh web to take effect.

Q: Will history and cache be cleaned together after uninstall?

A: No. After uninstalling plugin, history images and template image cache under ~/.dsh/dsh-imagegen/ remain on disk, need manual deletion.

Q: Error "Upstream API response timeout (240 seconds)" what to do?

A: Image generation is a slow operation, upstream returning over 240 seconds will be judged as timeout by plugin (this is the 240 second limit). Suggest first confirming network is smooth, then try again; if upstream has rate limiting or serious queuing, wait a few minutes and retry.

Difficulty Level

Beginner — interfaces are standard OpenAI-compatible protocol, configuration only needs two items (API address, key), regular workspace UI follows DSH's own UI specs, no extra learning cost.

Known Issues & Limitations

  • Generation single image request timeout is 240 seconds, downloading result URL timeout is 60 seconds; if upstream responds extremely slowly, it will be directly judged as failure
  • Upstream single interface can only return 1 image at a time; if 4 images are needed, plugin will send 4 parallel requests, if upstream has rate limiting, some may fail
  • detail field is a passthrough parameter, supported by some gpt-image-2 gateways; if official OpenAI endpoint rejects unknown fields, keep interface default "auto" (don't send)
  • History keeps max 50 entries, exceeding that, earliest entries (including image files) are auto-deleted
  • Template reference image single image limit 20MB; exceeding is ignored
  • Online update check triggers only once each time entering workspace, result cached 15 minutes; when GitHub has issues, plugin silently ignores, won't block usage
  • Route layer forces requests from local loopback, same-origin Origin, cross-site requests get 403 rejected

Read the usage guide →

Install steps, key points, FAQ and compatibility for this plugin — auto-derived from indexed fields.

Listing badge

Listed on deepseek-plugin.org
[![Listed on deepseek-plugin.org](https://img.shields.io/badge/listed_on-deepseek--plugin.org-007EC6)](https://deepseek-plugin.org/plugins/dickpy/dsh-imagegen)

Paste this markdown into your GitHub README to link back to this listing. The badge only states the listing — not a security endorsement.

← Back to plugin directory