dshbase

插件目录 / Developer / dsh-imggen

dsh-imggen

已验证 · 实测可装 Stellight

✓ 持续维护

查看 GitHub ↗ ← 返回插件目录

0Stars
0Forks
0未关闭 issue
—语言
2026-08-22最近推送
跨平台平台

功能简介

DeepSeek Harness plugin: text-to-image output with in-chat image cards, download button, history gallery, and provider selection tabs (Pollinations / OpenAI DALL-E 3).

✅
我们的评价
可用 — 实测通过,早期项目

DeepSeek Harness plugin: text-to-image output with in-chat image cards, download button, history gallery, and provider selection tabs (Pollinations / OpenAI DALL-E 3). 实测能干净安装、正常启动。早期项目,但功能可用。

「已验证」表示我们的自动化 CI 在干净 profile 里实际执行了 dsh plugin add 并启动成功——仅此而已。功能描述与版本兼容性均为作者声明。这不是安全审计,也不代表对第三方代码的背书。

README

dsh-imggen

DeepSeek Harness 静态 dual-face 插件:为 DSH 提供文生图输出能力(与 dsh-deepseek-balance 同款 profile bundle 机制,重启不丢失、无需批准)。

功能

  • generate_image 模型工具:从文本提示生成图片并在对话工具卡片中直接渲染;
    • 默认后端 Pollinations(免费、无需 API Key);
    • 可选后端 OpenAI(DALL·E 3,需要 OPENAI_API_KEY 或 DSH_OPENAI_API_KEY 环境变量 / DSH 凭证库);
    • 参数:prompt(必填)、provider、size(square/landscape/portrait)、model、seed;
  • 下载按钮:工具卡片上一键下载(浏览器侧 fetch → blob → 保存;跨域失败自动回退到新标签页打开);
  • 历史图片画廊:🖼 历史 按钮打开悬浮画廊,网格缩略图 + 提示词 + 删除/清空,存于浏览器 localStorage(跨重启保留);
  • API 选择选项卡:输入框工具行右侧的 🎨 Pollinations | ✨ OpenAI 分段控件;选择经同源 HTTP 路由同步到 Host,并通过 systemPrompt 变量注入模型提示词,模型默认按选项卡选择调用后端。

架构(dual-face,无构建步骤)

文件 半区 说明
dsh/index.js Host ESM 插件:注册 generate_image 工具、systemPrompt 变量/节、同源路由 /dsh-imggen/pref;OpenAI 调用与 Pollinations 验证走 Node 原生 fetch
dsh/client.js Client 手写 lazy-CJS bundle(window.__ModuleLoader__.load):工具卡片、历史画廊 overlay、生图 API 选项卡

安全说明

  • 仓库代码不含任何 API Key;OpenAI Key 按 credentials 服务 → OPENAI_API_KEY/DSH_OPENAI_API_KEY 环境变量顺序解析,仅在本地进程内用于官方接口调用。

安装(dsh profile bundle)

  1. 把本包放入 profile 的 node_modules(默认 profile:~/.dsh/profiles/web/):
    • 方式 A:dsh plugin --profile web add <本包路径>(pnpm 转发,自动 reconcile 进 bundles);
    • 方式 B:手动复制到 ~/.dsh/profiles/web/node_modules/dsh-imggen/;
  2. 编辑 profile 的 package.json:
    {
      "dependencies": { "dsh-imggen": "1.0.0" },
      "dsh": { "profile": { "bundles": ["…", "dsh-imggen"] } }
    }
    
  3. 重启 harness(dsh web)。工具卡片、画廊、选项卡自动生效。

License

MIT

安装

🧩 让 Agent 自动装(推荐)

装一次目录插件,之后本站所有插件都能让 DeepSeek Harness 自动找、自动装:

dsh plugin add dshbase-catalog

然后对 agent 说「帮我装 dsh-imggen」,它会在目录里找到并自动安装。文档:dshbase-catalog · 已验证场景包。

该插件是 GitHub 源码(未发 npm)——直接从仓库装:

Web profile:

dsh plugin --profile web add github:Stellight/dsh-imggen

Headless(CLI)profile:

dsh plugin --profile headless add github:Stellight/dsh-imggen

实测报告

验证通过:从 GitHub 源码完成 L1 安装 + L2 加载 + L3 运行(dsh 0.1.0-rc.6)。

安全:尚未扫描——我们的每日静态扫描将很快覆盖它。

分享徽章

Developer 里更多

浏览全部 7819 个插件 →