DSH Plugins Marketplace

DSH Plugins

Plugins

/

dsh-imagegen-zhenzhen

n

dsh-imagegen-zhenzhen

Manifest valid

DSH image-generation plugin with native support for zhenzhen-image style async task gateways (submit + poll), including multi-reference image-to-image. Fork of @dickpy/dsh-imagegen.

UI (client)hasBundlePatch

dsh-imagegen-zhenzhen

为 DeepSeek Harness(dsh)准备的 AI 生图插件, 原生适配 zhenzhen-image 这类「异步任务式」生图网关(apib 系聚合网关,如 api.seedance.nz)。

它是 @dickpy/dsh-imagegen 的 fork: 生图工作台、画廊、多模型对比、无限画布、提示词模板库全部保留,只把 host 端的协议层 换成了对这类网关的原生实现。

为什么需要 fork:上游把端点路径、task_id 位置、轮询地址、结果字段都硬编码成 OpenAI 的 标准形状(/images/generations、data[0].task_id、/tasks/{id}、result.images), 而这类网关实际是 POST /image/generations → 顶层 task_id → GET /image/generations/{id} → data.data.content.image_url。差异集中在一个文件里,本 fork 把它们改了过来。

特性

能力说明
文生图POST {base}/image/generations 提交,轮询到 SUCCESS 取图
图生图本地参考图先上传到网关自带的 POST {base}/files/upload 换取公网 URL,再作为 image 提交
多参考图网关的 image 字段是单值,插件会把多张图本地拼成一张网格再上传(2 张横排 / 3–4 张两列)
参数映射面板比例直接作为 size 透传;清晰度档位映射为 resolution(1k/2k/4k)
无需桥接协议适配在插件内部完成,不需要常驻代理进程,也不需要外部图床
完整界面生图工作台、画廊、多模型对比、无限画布、提示词模板库(继承自上游)

安装

# 从 GitHub
dsh plugin --profile web add github:netori/dsh-imagegen-zhenzhen

# 或从本地目录
dsh plugin --profile web add /path/to/dsh-imagegen-zhenzhen

装完重启 DSH(host 端插件不会热重载)。

⚠️ 依赖提示:本插件多图拼接用到 jimp。PNPM 不会为 link: / 本地目录安装子依赖, 所以本地安装时要补一句:

cd ~/.dsh/profiles/web && pnpm add jimp@1.6.1

若多图拼接报 Cannot find package 'jimp',就是漏了这步。

配置

在「设置 → 插件 → AI 生图」里添加渠道,或直接写 ~/.dsh/settings.yaml:

dsh-imagegen:
  enabled: true
  allowAgentImageGeneration: true
  defaultChannelId: my-gateway
  channels:
    - id: my-gateway
      name: 我的网关
      apiUrl: https://api.example.com/v1
      models:
        - { alias: zhenzhen-image-g-v2.5-flare, id: zhenzhen-image-g-v2.5-flare }
  channelSecrets:
    my-gateway: "<你的 API key>"
  • apiUrl 填基地址(含 /v1),插件会自动追加 /image/generations 与 /files/upload。
  • 模型 id 需匹配 /^zhenzhen-image/i 才会走本 fork 的原生协议分支; 其它模型仍按上游的各族协议(Seedream / Qwen / MiniMax / Grok / Nano Banana / 智谱)处理。

用法

  • 对话:说「画一张…」,Agent 调用 generate_image
  • 改图:把图交给 Agent 说「改成…」,或输入 /edit_image 把背景换成夜景
  • 面板:侧边栏「生图」Tab —— 文生图 / 图生图、多模型对比、画廊、模板库、无限画布

已知限制

  1. 多图是「拼接」而非原生多图。上游端点只接受单张参考图(实测 images / image_urls / reference_images 等 8 个候选字段名在平台结构体里都不存在)。拼接适合「融合多个元素」, 但对需要逐张独立理解的精细任务(如严格人脸一致性)不如原生多图。拼图总边长上限 4096px。
  2. 图生图多一次上传,比文生图慢约 1–2 秒。
  3. 面板 9 档比例未逐一验证:1:1、2:3 已验证通过;若某档被上游拒绝, 在 src/engine.ts 的 effectiveParams() zhenzhen 分支加一张比例映射表即可。
  4. API key 明文存放于本机 settings.yaml(上游插件的既有行为,未改动)。
  5. 不要与 dsh-image-gen 同时启用:两者都注册 generate_image / edit_image, DSH 的工具表对重名会直接抛错。

开发

host 端必须构建(源码用了 TS parameter property,Node 的 strip-only 模式不支持)。

# 一次性准备工具链
mkdir -p ../.build && cd ../.build
npm install tsdown lightningcss lucide-react

# 构建两端(或直接双击 rebuild.cmd,它会自动软链依赖并清理)
cd /path/to/dsh-imagegen-zhenzhen
../.build/node_modules/.bin/tsdown --config tsdown.config.ts        # host + client
../.build/node_modules/.bin/tsdown --config tsdown.node.config.ts   # 仅 host(改后端时更快)

产物:lib/index.js(host)与 lib/client.js(浏览器端,含 __ModuleLoader__ 注册)。 改完必须重启 DSH 才会加载新的 host 代码。

目录

src/
  engine.ts           协议适配核心(提交 / 轮询 / 取图 / 上传 / 多图拼接)
  model-catalog.ts    模型家族识别(含 zhenzhen)
  index.ts            插件入口(name / inject / Config / apply)
  routes.ts, task-queue.ts, agent-image-tools.ts, ...   上游原有实现
  client/             浏览器端源码(构建产物为 lib/client.js)
lib/                  构建产物(已提交,便于直接安装)
FORK-NOTES.md         维护者笔记:改了什么、为什么、如何验证
NOTICE                Apache-2.0 要求的修改声明

License

Apache-2.0(继承自上游)。修改声明见 NOTICE。 本项目为 community fork,与 DeepSeek、From Software 及上游作者均无隶属关系。

Comments

Loading…

Similar plugins

dsh-imagegen

by dickpy

DSH (DeepSeek Harness) Web GUI AI image generation plugin: text-to-image & image-to-image via OpenAI-compatible endpoints (gpt-image-2), with shared cross-device history.

Terminal & ClientsVision & MultimodalTools & CapabilitiesManifest valid

★ 93

Apache-2.0

TypeScript

Sep 27, 2026

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

by whiteS18

Configure multiple image providers in Settings and call image_generate with the one selected model; images save under generate/image and show inline in the conversation.

Vision & MultimodalTools & CapabilitiesManifest valid

★ 0

↓ 156/wk

MIT

JavaScript

Sep 13, 2026

dsh plugin --profile web add dsh-image-generation

by shanliuling

AI image studio for DeepSeek Harness — generate, edit & compare images in chat, with 500+ prompts, gallery, multi-model workflows and ComfyUI.

Tools & CapabilitiesWorkflow & AutomationVision & MultimodalManifest valid

★ 514

↓ 4.6k/wk

MIT

TypeScript

Sep 28, 2026

dsh plugin --profile web add dsh-image-gen

by mindcarver

DeepSeek Harness plugin: image_gen tool backed by Codex CLI (gpt-image-2)

Manifest valid

★ 0

TypeScript

Aug 15, 2026

dsh plugin --profile web add dsh-codex-canvas

by Yaya716

Persistent "Add image" button in the composer tool row for DeepSeek Harness Web: opens the system file picker (image/*, multi-select) and routes selected images through the official draft attachment p

Manifest valid

★ 0

JavaScript

Aug 23, 2026

dsh plugin --profile web add @local/dsh-add-image-button

Text-to-image and image-to-image generation inside DSH through OpenAI-compatible endpoints, with an agent tool, multi-provider fallback, and a side-panel workspace with history.

Tools & CapabilitiesManifest valid

★ 0

dsh plugin --profile web add @xiaoyuink/dsh-image-create