Skip to main content
W

dsh-metaontic-image

wxsimon2022/dsh-metaontic-image

Image generation and editing for DSH with cloud providers, relay channels, multi-model comparison, and local ComfyUI workflows.

Install

dsh plugin --profile web add github:wxsimon2022/dsh-metaontic-image

README

DSH MetaOntic Image

给 DeepSeek Harness 增加图片生成、图片编辑、多模型对比和本地 ComfyUI 工作流的插件。插件设置、画廊和无限画布都集成在 DSH 桌面端中,不需要另开服务。

功能

  • 支持 MetaOnticAI / OpenAI 兼容中转站、火山 Seedream、OpenAI、Google Gemini、DashScope、xAI、智谱和本地 ComfyUI。
  • 在聊天中直接调用 generate_image 和 edit_image,结果以原生图片卡片显示。
  • 插件设置页可分别配置每个提供商的地址、模型、默认模型、编辑模型、质量、分辨率表和额外请求参数。
  • 支持多个 OpenAI 兼容中转通道,每个通道有独立的地址、模型与凭据。
  • 内置图库、提示词灵感、批量生成、GIF 生成和无限画布。

安装

要求:

  • DSH >=0.2.2-rc.5 <0.3.0
  • Node.js ^22.19.0 || >=24.0.0

安装到 DSH 桌面端 profile:

dsh plugin --profile desktop add dsh-metaontic-image

安装后重启 DSH。打开左侧「插件」,选择 dsh-metaontic-image,在插件页面配置图片提供商。

保存设置后,可以在对话中输入「生成一张戴墨镜的赛博朋克猫图片」测试出图。需要频繁切换模型或打开图像工作台时,可以在插件设置中开启对话输入栏的模型胶囊和工作台按钮。

配置

默认提供两个可用驱动:

  • MetaonticAI:OpenAI 兼容中转站,默认地址为 https://ai.bileego.com/v1。注册后获取 API Key,填入插件设置即可使用。注册 MetaonticAI
  • Seedream:火山方舟,选择 Seedream 5.0 Pro 或 5.5 并填入 API 密钥。两款模型均支持 1K、1.5K、2K,其中 5.5 支持文生图输出透明背景。

本地 ComfyUI 需要填写 DSH Host 可访问的服务地址,并导入 API 格式的工作流 JSON。在提示词输入中使用 {{prompt}},可用 {{seed}}、{{width}}、{{height}} 接收种子和尺寸。图生图工作流在 LoadImage 节点的 image 输入中使用 {{image}}。可导入多个工作流,在设置中指定默认工作流,也可在对话调用时按名称选择。

提供商密钥通过 DSH 的写凭据服务保存。浏览器只能检查密钥是否已配置,不能读回明文;配置文件只保存凭据引用。

开发

pnpm install
pnpm run typecheck
pnpm test
pnpm run build
pnpm run pack:check

主要代码位置:

  • src/index.ts:DSH Host 注册、工具和路由。
  • src/client/index.tsx:插件设置页、画廊和浏览器端交互。
  • src/openai-compatible.ts:OpenAI 兼容中转与异步任务适配。
  • src/config.ts:设置 schema 和默认值。
  • cordis.patch.yml:插件在 DSH 中的 composition entry。

安全

不要提交 API Key、凭据文件或包含密钥的日志。安全问题请按 SECURITY.md 的说明私下报告。

License

MIT

Related plugins