@dickpy/dsh-imagegen 1.0.0 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -30,47 +30,53 @@ DeepSeek Harness (DSH) Web GUI 的 AI 生图插件。它通过宿主进程安全
30
30
  - **持久化历史**:保存提示词、参数和图片;支持查看、恢复、单条删除和清空,最多保留 50 条。
31
31
  - **跨设备查看**:历史保存在 DSH 宿主侧,连接同一 DSH 的浏览器或设备共享同一份记录。
32
32
  - **原生 DSH 体验**:侧栏入口、主题适配和设置卡片均遵循 DSH Web GUI 的 UI 规范。
33
+ - **在线更新**:插件会检查 GitHub Releases,发现新版本时在工作台显示在线更新按钮;安装完成后重启 DSH 即可加载新版本。
33
34
 
34
35
  ## 快速开始
35
36
 
36
- ### 1. 构建插件
37
+ > 前置条件:已安装 DSH(`npm i -g @deepseek-ai/dsh`)与 pnpm。
38
+ > 装完统一**重启 dsh web**,侧边栏即出现「AI 生图」入口,再到「设置 → 插件 → 可配置」填写 API 地址与密钥。
37
39
 
38
- 前置条件:Node.js 20+、pnpm,以及一个可运行的 DSH Web profile。
40
+ ### 方式一:让 AI 帮你安装(最省事)
41
+
42
+ 把下面提示词直接粘贴给 **DSH**(或 Codex / 其他 coding agent)执行即可:
43
+
44
+ ```text
45
+ 用 dsh plugin --profile web add @dickpy/dsh-imagegen@1.0.2 安装 AI 生图插件(profile 名按实际修改),完成后重启 dsh web。
46
+ ```
47
+
48
+ ### 方式二:npm 安装(推荐)
39
49
 
40
50
  ```bash
41
- git clone https://github.com/dickpy/dsh-imagegen.git
42
- cd dsh-imagegen
43
- pnpm install
44
- pnpm run build
51
+ dsh plugin --profile web add @dickpy/dsh-imagegen@1.0.2
45
52
  ```
46
53
 
47
- ### 2. 接入 DSH Web profile
54
+ dsh 会自动把插件注册进 profile 的 bundle 清单(无需手动改 cordis.patch.yml),重启 dsh web 即可。
48
55
 
49
- DSH Web profile 的 `package.json` 中加入本地依赖:
56
+ ### 方式三:聚合包(tarball)安装
50
57
 
51
- ```json
52
- {
53
- "dependencies": {
54
- "@dickpy/dsh-imagegen": "link:E:/dsh-plugin"
55
- }
56
- }
58
+ 从 [GitHub Releases](https://github.com/dickpy/dsh-imagegen/releases) 下载发布产物
59
+ (如 `dickpy-dsh-imagegen-1.0.2.tgz`),然后:
60
+
61
+ ```bash
62
+ dsh plugin --profile web add <下载路径>/dickpy-dsh-imagegen-1.0.2.tgz
57
63
  ```
58
64
 
59
- 然后在该 profile 的 `cordis.patch.yml` 追加插件条目:
65
+ 重启 dsh web。
60
66
 
61
- ```yaml
62
- - insert:
63
- - id: imagegen
64
- name: '@dickpy/dsh-imagegen'
65
- ```
67
+ ### 方式四:源码开发启动(最后的选择)
66
68
 
67
- 在 profile 目录执行安装并重启 DSH:
69
+ 需要改插件源码时才用这种方式:
68
70
 
69
71
  ```bash
72
+ git clone https://github.com/dickpy/dsh-imagegen.git
73
+ cd dsh-imagegen
70
74
  pnpm install
75
+ pnpm run build
76
+ dsh plugin --profile web add link:/绝对路径/dsh-imagegen
71
77
  ```
72
78
 
73
- `lib` 内的宿主与客户端 bundle 变更需要重新构建;开发时可运行 `pnpm run watch` 持续构建。
79
+ 重启 dsh web;开发时可运行 `pnpm run watch` 持续构建,bundle 变更由 client-hmr 自动热更。
74
80
 
75
81
  ## 配置 API
76
82
 
@@ -121,6 +127,14 @@ pnpm run build # 构建宿主与 Web bundle
121
127
  pnpm run watch # 持续构建
122
128
  ```
123
129
 
130
+ ## 📬 反馈与提问
131
+
132
+ - **遇到 Bug**:请使用 [Bug 报告模板](https://github.com/dickpy/dsh-imagegen/issues/new?template=bug_report.yml) 提交,
133
+ 并附带插件版本、DSH 版本、安装方式与复现步骤(**请勿在 issue 中粘贴 API 密钥**)。
134
+ - **功能建议**:请使用 [功能建议模板](https://github.com/dickpy/dsh-imagegen/issues/new?template=feature_request.yml) 提交,
135
+ 描述使用场景与期望效果。
136
+ - **安装 / 使用问题**:先查阅本文档「快速开始」与「配置 API」章节。
137
+
124
138
  ## 许可证
125
139
 
126
140
  [Apache-2.0](./LICENSE)
Binary file
package/lib/client.js CHANGED
@@ -18,6 +18,11 @@ window.__ModuleLoader__.load({
18
18
  };
19
19
  /** The image-generation proxy route. */
20
20
  const GENERATE_API = "/api/dsh-imagegen/generate";
21
+ /** Host-mediated GitHub Release update routes. */
22
+ const UPDATE_API = {
23
+ check: "/api/dsh-imagegen/update/check",
24
+ apply: "/api/dsh-imagegen/update/apply"
25
+ };
21
26
  /**
22
27
  * Same-origin route family for the host-persisted generation history. Images
23
28
  * live as files under ~/.dsh/dsh-imagegen/images/ and are served back through
@@ -62,26 +67,39 @@ window.__ModuleLoader__.load({
62
67
  }
63
68
  /** The browser half's data entry point. */
64
69
  var ImageGenApi = class {
70
+ /** Ask the host to check the latest stable GitHub Release. */
71
+ async updateCheck() {
72
+ return (await readEnvelope(await fetch(UPDATE_API.check, { method: "POST" }))).update;
73
+ }
74
+ /** Ask the host to install a previously discovered Release. */
75
+ async updateApply(version) {
76
+ const body = await readEnvelope(await fetch(UPDATE_API.apply, {
77
+ method: "POST",
78
+ headers: { "content-type": "application/json" },
79
+ body: JSON.stringify({ version })
80
+ }));
81
+ return {
82
+ updatedVersion: body.updatedVersion,
83
+ restartRequired: body.restartRequired
84
+ };
85
+ }
65
86
  /** Forward one generate request to the host proxy. */
66
87
  async generate(request) {
67
- return { images: (await readEnvelope(await fetch(GENERATE_API, {
88
+ const body = await readEnvelope(await fetch(GENERATE_API, {
68
89
  method: "POST",
69
90
  headers: { "content-type": "application/json" },
70
91
  body: JSON.stringify(request)
71
- }))).images };
92
+ }));
93
+ return {
94
+ images: body.images,
95
+ ...body.history === void 0 ? {} : { history: body.history },
96
+ ...body.historyError === void 0 ? {} : { historyError: body.historyError }
97
+ };
72
98
  }
73
99
  /** List the host-persisted history (newest first). */
74
100
  async historyList() {
75
101
  return (await readEnvelope(await fetch(HISTORY_API.list, { method: "POST" }))).entries;
76
102
  }
77
- /** Append one generation to the host-persisted history. */
78
- async historyAppend(entry) {
79
- return (await readEnvelope(await fetch(HISTORY_API.append, {
80
- method: "POST",
81
- headers: { "content-type": "application/json" },
82
- body: JSON.stringify({ entry })
83
- }))).entries;
84
- }
85
103
  /** Remove one history entry by id. */
86
104
  async historyRemove(id) {
87
105
  return (await readEnvelope(await fetch(HISTORY_API.remove, {
@@ -198,6 +216,12 @@ window.__ModuleLoader__.load({
198
216
  "config.missing": "尚未配置 API:请前往「设置 → 插件 → 可配置」为 AI 生图填写 api_url 与 api_key。",
199
217
  "config.configured": "已连接 {url}",
200
218
  "config.disabled": "插件已停用,请在设置中重新启用。",
219
+ "update.available": "检测到新版本:{version}",
220
+ "update.install": "在线更新",
221
+ "update.installing": "更新中…",
222
+ "update.success": "已更新到 {version},请重启 DSH",
223
+ "update.failed": "更新失败,请重试",
224
+ "update.release": "查看 Release",
201
225
  "settings.title": "AI 生图(dsh-imagegen)",
202
226
  "settings.description": "配置图像生成 API 地址与密钥",
203
227
  "settings.apiUrl": "API 地址(api_url)",
@@ -288,9 +312,15 @@ window.__ModuleLoader__.load({
288
312
  "preview.prev": "Previous",
289
313
  "preview.next": "Next",
290
314
  "preview.index": "{index} / {total}",
291
- "config.missing": "API not configured: open \"Settings → Web UI Plugins\" and fill in api_url and api_key for AI Image.",
315
+ "config.missing": "API not configured: open \"Settings → Plugins Configurable\" and fill in api_url and api_key for AI Image.",
292
316
  "config.configured": "Connected to {url}",
293
317
  "config.disabled": "The plugin is disabled — re-enable it in Settings.",
318
+ "update.available": "A new version is available: {version}",
319
+ "update.install": "Update online",
320
+ "update.installing": "Updating…",
321
+ "update.success": "Updated to {version}; restart DSH to load it",
322
+ "update.failed": "Update failed; please try again",
323
+ "update.release": "View Release",
294
324
  "settings.title": "AI Image (dsh-imagegen)",
295
325
  "settings.description": "Configure the image generation API endpoint and key",
296
326
  "settings.apiUrl": "API URL (api_url)",
@@ -345,7 +375,7 @@ window.__ModuleLoader__.load({
345
375
  }
346
376
  //#endregion
347
377
  //#region \0dsh-css:E:\dsh-plugin\src\client\panel.module.css.mjs
348
- const css$1 = "[data-pane=conversation]{position:relative}[data-dsh-imagegen-view]{z-index:60;background:var(--dsw-alias-bg-base);display:none;position:absolute;inset:0}html[data-dsh-imagegen-active]:not([data-dsh-taskboard-active]):not([data-dsh-ssh-active]) [data-dsh-imagegen-view]{display:block}html[data-dsh-imagegen-active]:not([data-dsh-taskboard-active]):not([data-dsh-ssh-active]) [data-pane=conversation]>:not([data-dsh-imagegen-view]),html[data-dsh-imagegen-active]:not([data-dsh-taskboard-active]):not([data-dsh-ssh-active]) [class*=centerCol]>:not([data-dsh-imagegen-view]){display:none!important}.Yvqh9W_entry{width:100%;height:32px;color:var(--dsw-alias-label-secondary);cursor:pointer;white-space:nowrap;background:0 0;border:none;border-radius:8px;align-items:center;gap:8px;padding:0 12px;font-size:13px;display:flex}.Yvqh9W_entry:hover{background:var(--dsw-specific-sidebar-nav-item-hover);color:var(--dsw-alias-label-primary)}.Yvqh9W_entry[data-active]{background:var(--dsw-specific-sidebar-nav-item-active);color:var(--dsw-alias-label-primary);font-weight:600}.Yvqh9W_entryIcon{flex:none;justify-content:center;align-items:center;display:inline-flex}.Yvqh9W_entryLabel{text-overflow:ellipsis;overflow:hidden}[data-dsh-frame][data-sidebar-collapsed] .Yvqh9W_entry{justify-content:center;width:100%;padding:0}[data-dsh-frame][data-sidebar-collapsed] .Yvqh9W_entryLabel{display:none}.Yvqh9W_view{overflow:hidden}.Yvqh9W_panel,.Yvqh9W_panel *,.Yvqh9W_panel :before,.Yvqh9W_panel :after{box-sizing:border-box}.Yvqh9W_panel{background:var(--dsw-alias-bg-base);min-width:0;height:100%;min-height:0;color:var(--dsw-alias-label-primary);font-family:var(--dsw-font-family);flex-direction:column;gap:10px;padding:14px 16px 16px;display:flex;overflow:hidden}.Yvqh9W_panelHeader{flex:none;align-items:baseline;gap:10px;display:flex}.Yvqh9W_panelTitle{color:var(--dsw-alias-label-primary);white-space:nowrap;margin:0;font-size:16px;font-weight:700}.Yvqh9W_panelSubtitle{color:var(--dsw-alias-label-tertiary);white-space:nowrap;text-overflow:ellipsis;font-size:12px;overflow:hidden}.Yvqh9W_banner{border:1px solid var(--dsw-alias-border-l2);color:var(--dsw-alias-label-secondary);overflow-wrap:anywhere;border-radius:10px;flex:none;padding:7px 12px;font-size:12px;line-height:1.5}.Yvqh9W_banner[data-kind=ok]{color:var(--dsw-alias-state-success-primary);border-color:var(--dsw-alias-state-success-primary)}.Yvqh9W_banner[data-kind=warn]{color:var(--dsw-alias-state-warn-primary);border-color:var(--dsw-alias-state-warn-primary)}.Yvqh9W_studio{flex:1;gap:14px;min-width:0;min-height:0;display:flex}.Yvqh9W_config{flex-direction:column;flex:none;gap:12px;width:300px;min-width:260px;max-width:340px;height:100%;min-height:0;display:flex;overflow:hidden}.Yvqh9W_configScroll{scrollbar-width:thin;scrollbar-color:var(--dsw-alias-border-l2) transparent;flex-direction:column;flex:1;gap:12px;min-height:0;padding-right:2px;display:flex;overflow-y:auto}.Yvqh9W_configScroll::-webkit-scrollbar{width:8px}.Yvqh9W_configScroll::-webkit-scrollbar-thumb{background:var(--dsw-alias-border-l2);border-radius:999px}.Yvqh9W_canvas{border:1px solid var(--dsw-alias-border-l1);background:var(--dsw-alias-bg-layer-1);border-radius:12px;flex-direction:column;flex:1;min-width:0;min-height:0;display:flex;position:relative;overflow:hidden}.Yvqh9W_history{border:1px solid var(--dsw-alias-border-l1);background:var(--dsw-alias-bg-layer-1);border-radius:12px;flex-direction:column;flex:none;width:240px;min-width:200px;max-width:280px;min-height:0;display:flex;overflow:hidden}.Yvqh9W_historyHeader{border-bottom:1px solid var(--dsw-alias-border-l1);flex:none;justify-content:space-between;align-items:center;gap:8px;padding:10px 12px;display:flex}.Yvqh9W_historyTitle{color:var(--dsw-alias-label-primary);font-size:13px;font-weight:600}.Yvqh9W_historyClear{font:inherit;color:var(--dsw-alias-label-tertiary);border:1px solid var(--dsw-alias-border-l2);cursor:pointer;background:0 0;border-radius:999px;padding:2px 8px;font-size:11.5px}.Yvqh9W_historyClear:hover{color:var(--dsw-alias-label-error);border-color:var(--dsw-alias-label-error)}.Yvqh9W_historyList{scrollbar-width:thin;scrollbar-color:var(--dsw-alias-border-l2) transparent;flex-direction:column;flex:1;gap:8px;min-height:0;padding:10px;display:flex;overflow-y:auto}.Yvqh9W_historyList::-webkit-scrollbar{width:8px}.Yvqh9W_historyList::-webkit-scrollbar-thumb{background:var(--dsw-alias-border-l2);border-radius:999px}.Yvqh9W_historyEmpty{text-align:center;color:var(--dsw-alias-label-tertiary);flex:1;justify-content:center;align-items:center;padding:20px;font-size:12px;line-height:1.6;display:flex}.Yvqh9W_historyItem{border:1px solid var(--dsw-alias-border-l1);background:var(--dsw-alias-bg-layer-2);border-radius:10px;flex-direction:column;flex:none;gap:6px;padding:8px;display:flex}.Yvqh9W_historyItem:hover{border-color:var(--dsw-alias-border-l2)}.Yvqh9W_historyItem[data-active]{border-color:var(--dsw-alias-brand-primary)}.Yvqh9W_historyMain{font:inherit;color:inherit;text-align:left;cursor:pointer;background:0 0;border:none;align-items:flex-start;gap:8px;min-width:0;padding:0;display:flex}.Yvqh9W_historyThumb{object-fit:cover;background:var(--dsw-alias-bg-base);border-radius:8px;flex:none;width:52px;height:52px}.Yvqh9W_historyThumbPlaceholder{background:var(--dsw-alias-bg-layer-3);border-radius:8px;flex:none;width:52px;height:52px}.Yvqh9W_historyInfo{flex-direction:column;flex:1;gap:4px;min-width:0;display:flex}.Yvqh9W_historyPrompt{color:var(--dsw-alias-label-primary);-webkit-line-clamp:2;-webkit-box-orient:vertical;font-size:12px;line-height:1.4;display:-webkit-box;overflow:hidden}.Yvqh9W_historyMeta{color:var(--dsw-alias-label-tertiary);white-space:nowrap;text-overflow:ellipsis;font-size:11px;overflow:hidden}.Yvqh9W_historyActions{justify-content:flex-end;gap:6px;display:flex}.Yvqh9W_historyAction{font:inherit;color:var(--dsw-alias-label-secondary);border:1px solid var(--dsw-alias-border-l2);cursor:pointer;background:0 0;border-radius:999px;padding:2px 8px;font-size:11.5px}.Yvqh9W_historyAction:hover{color:var(--dsw-alias-label-primary);border-color:var(--dsw-alias-label-dimmed)}.Yvqh9W_historyAction[data-danger]:hover{color:var(--dsw-alias-label-error);border-color:var(--dsw-alias-label-error)}.Yvqh9W_card{background:var(--dsw-alias-bg-layer-2);border:1px solid var(--dsw-alias-border-l1);border-radius:12px;flex-direction:column;flex:none;gap:10px;padding:12px;display:flex}.Yvqh9W_modeRow{align-items:center;gap:8px;display:flex}.Yvqh9W_modePill{flex:1;justify-content:center;height:28px;font-size:13px}.Yvqh9W_uploadBox{min-height:128px;color:var(--dsw-alias-label-secondary);border:1.5px dashed var(--dsw-alias-border-l2);cursor:pointer;font:inherit;text-align:center;background:0 0;border-radius:12px;flex-direction:column;justify-content:center;align-items:center;gap:6px;padding:16px;font-size:12.5px;display:flex}.Yvqh9W_uploadBox:hover{color:var(--dsw-alias-label-primary);border-color:var(--dsw-alias-label-dimmed);background:var(--dsw-alias-interactive-bg-hover)}.Yvqh9W_uploadBox:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:1px}.Yvqh9W_uploadIcon{color:var(--dsw-alias-label-tertiary);display:inline-flex}.Yvqh9W_uploadHint{color:var(--dsw-alias-label-tertiary);font-size:11px}.Yvqh9W_reference{flex-direction:column;gap:8px;display:flex}.Yvqh9W_referenceImage{object-fit:contain;background:var(--dsw-alias-bg-base);border:1px solid var(--dsw-alias-border-l1);border-radius:10px;width:100%;max-height:176px}.Yvqh9W_referenceActions{gap:8px;display:flex}.Yvqh9W_hiddenFile{display:none}.Yvqh9W_prompt{width:100%;min-height:120px;color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-3);border:1px solid var(--dsw-alias-border-l2);resize:vertical;box-sizing:border-box;border-radius:10px;outline:none;padding:10px 12px;font-family:inherit;font-size:13px;line-height:1.6}.Yvqh9W_prompt:focus-visible{border-color:var(--dsw-alias-brand-primary)}.Yvqh9W_prompt::placeholder{color:var(--dsw-alias-label-tertiary)}.Yvqh9W_promptFooter{justify-content:flex-end;margin-top:-6px;display:flex}.Yvqh9W_promptCount{color:var(--dsw-alias-label-tertiary);font-variant-numeric:tabular-nums;font-size:11px}.Yvqh9W_paramGroup{flex-direction:column;gap:8px;display:flex}.Yvqh9W_paramLabel{color:var(--dsw-alias-label-secondary);font-size:12px;font-weight:600}.Yvqh9W_optionRow{flex-wrap:wrap;gap:6px;display:flex}.Yvqh9W_optionGrid{grid-template-columns:repeat(3,1fr);gap:6px;display:grid}.Yvqh9W_optionPill{justify-content:center}.Yvqh9W_paramHint{color:var(--dsw-alias-label-tertiary);font-size:11px;line-height:1.45}.Yvqh9W_footer{border-top:1px solid var(--dsw-alias-border-l1);flex-direction:column;flex:none;align-items:stretch;gap:8px;padding:10px 2px 0 0;display:flex}.Yvqh9W_modelWrap{flex-direction:column;gap:5px;min-width:0;display:flex}.Yvqh9W_modelLabel{color:var(--dsw-alias-label-secondary);font-size:12px;font-weight:600}.Yvqh9W_modelSelect{width:100%;height:36px;color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-2);border:1px solid var(--dsw-alias-border-l2);cursor:pointer;border-radius:18px;outline:none;padding:0 12px;font-family:inherit;font-size:13px}.Yvqh9W_modelSelect:focus-visible{border-color:var(--dsw-alias-brand-primary)}.Yvqh9W_modelSelect:disabled{opacity:.55}.Yvqh9W_generateButton{width:100%}.Yvqh9W_generateInner{align-items:center;gap:7px;display:inline-flex}.Yvqh9W_canvasState{text-align:center;color:var(--dsw-alias-label-tertiary);flex-direction:column;flex:1;justify-content:center;align-items:center;gap:8px;padding:24px;display:flex}.Yvqh9W_canvasStateTitle{color:var(--dsw-alias-label-secondary);font-size:14px;font-weight:600}.Yvqh9W_canvasStateHint{max-width:380px;font-size:12px;line-height:1.6}.Yvqh9W_canvasEmptyIcon{color:var(--dsw-alias-label-tertiary);margin-bottom:4px;display:inline-flex}.Yvqh9W_canvasError{color:var(--dsw-alias-label-error);background:var(--dsw-alias-bg-layer-2);border:1px solid var(--dsw-alias-label-error);overflow-wrap:anywhere;border-radius:10px;flex:none;margin:14px;padding:10px 14px;font-size:12.5px;line-height:1.6}.Yvqh9W_canvasBody{scrollbar-width:thin;scrollbar-color:var(--dsw-alias-border-l2) transparent;flex-direction:column;flex:1;gap:10px;min-height:0;padding:14px;display:flex;overflow-y:auto}.Yvqh9W_canvasBody::-webkit-scrollbar{width:8px}.Yvqh9W_canvasBody::-webkit-scrollbar-thumb{background:var(--dsw-alias-border-l2);border-radius:999px}.Yvqh9W_canvasMeta{color:var(--dsw-alias-label-tertiary);flex:none;align-items:center;gap:8px;font-size:12px;display:flex}.Yvqh9W_canvasHistoryTag{color:var(--dsw-alias-label-secondary);background:var(--dsw-alias-bg-layer-2);border:1px solid var(--dsw-alias-border-l2);white-space:nowrap;border-radius:999px;padding:1px 8px;font-size:11px}.Yvqh9W_grid{grid-template-columns:repeat(auto-fill,minmax(240px,1fr));align-content:start;gap:14px;display:grid}.Yvqh9W_imageCard{border:1px solid var(--dsw-alias-border-l1);background:var(--dsw-alias-bg-layer-2);cursor:zoom-in;border-radius:12px;flex-direction:column;margin:0;display:flex;position:relative;overflow:hidden}.Yvqh9W_imageCard:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:1px}.Yvqh9W_image{aspect-ratio:1;object-fit:cover;background:var(--dsw-alias-bg-base);width:100%;display:block}.Yvqh9W_imageCaption{color:var(--dsw-alias-label-tertiary);white-space:nowrap;text-overflow:ellipsis;border-top:1px solid var(--dsw-alias-border-l1);padding:7px 10px;font-size:11px;line-height:1.5;overflow:hidden}.Yvqh9W_download{color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-mask-1);border:1px solid var(--dsw-alias-border-l2);opacity:0;backdrop-filter:blur(4px);border-radius:999px;padding:2px 10px;font-size:12px;font-weight:500;line-height:20px;text-decoration:none;transition:opacity .12s;position:absolute;top:8px;right:8px}.Yvqh9W_imageCard:hover .Yvqh9W_download{opacity:1}.Yvqh9W_download:hover{background:var(--dsw-alias-bg-base)}.Yvqh9W_zoomHint{color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-mask-1);border:1px solid var(--dsw-alias-border-l2);opacity:0;backdrop-filter:blur(4px);pointer-events:none;border-radius:999px;align-items:center;gap:5px;padding:2px 10px;font-size:12px;font-weight:500;line-height:20px;transition:opacity .12s;display:inline-flex;position:absolute;bottom:8px;left:8px}.Yvqh9W_imageCard:hover .Yvqh9W_zoomHint{opacity:1}.Yvqh9W_spinner,.Yvqh9W_bigSpinner{border:2px solid;border-top-color:#0000;border-radius:50%;flex:none;animation:.8s linear infinite Yvqh9W_dshImageGenSpin;display:inline-block}.Yvqh9W_spinner{width:11px;height:11px}.Yvqh9W_bigSpinner{width:30px;height:30px;color:var(--dsw-alias-state-business-primary);border-width:3px;margin-bottom:6px}.Yvqh9W_lightbox{z-index:1000;backdrop-filter:blur(6px);background:#000000b8;justify-content:center;align-items:center;padding:24px;display:flex;position:fixed;inset:0}.Yvqh9W_lightboxClose{color:#fff;cursor:pointer;background:#ffffff24;border:1px solid #ffffff47;border-radius:50%;justify-content:center;align-items:center;width:38px;height:38px;display:inline-flex;position:absolute;top:16px;right:16px}.Yvqh9W_lightboxClose:hover{background:#ffffff42}.Yvqh9W_lightboxNav{color:#fff;cursor:pointer;background:#ffffff24;border:1px solid #ffffff47;border-radius:50%;justify-content:center;align-items:center;width:42px;height:42px;display:inline-flex;position:absolute;top:50%;transform:translateY(-50%)}.Yvqh9W_lightboxNav:hover{background:#ffffff42}.Yvqh9W_lightboxNav[data-dir=prev]{left:16px}.Yvqh9W_lightboxNav[data-dir=next]{right:16px}.Yvqh9W_lightboxFigure{flex-direction:column;gap:10px;max-width:min(1100px,100vw - 160px);max-height:calc(100vh - 48px);margin:0;display:flex}.Yvqh9W_lightboxImage{object-fit:contain;background:#ffffff0a;border-radius:10px;max-width:100%;max-height:calc(100vh - 160px);box-shadow:0 24px 80px #00000080}.Yvqh9W_lightboxCaption{color:#ffffffe6;-webkit-line-clamp:3;-webkit-box-orient:vertical;font-size:12px;line-height:1.6;display:-webkit-box;overflow:hidden}.Yvqh9W_lightboxMeta{justify-content:space-between;align-items:center;gap:12px;display:flex}.Yvqh9W_lightboxIndex{color:#fffc;font-variant-numeric:tabular-nums;font-size:12px}.Yvqh9W_lightboxDownload{color:#fff;background:#ffffff24;border:1px solid #ffffff47;border-radius:999px;padding:4px 14px;font-size:12.5px;font-weight:500;text-decoration:none}.Yvqh9W_lightboxDownload:hover{background:#ffffff42}@keyframes Yvqh9W_dshImageGenSpin{to{transform:rotate(360deg)}}@media (prefers-reduced-motion:reduce){.Yvqh9W_download,.Yvqh9W_spinner,.Yvqh9W_bigSpinner{transition:none;animation-duration:1.5s}}";
378
+ const css$1 = "[data-pane=conversation]{position:relative}[data-dsh-imagegen-view]{z-index:60;background:var(--dsw-alias-bg-base);display:none;position:absolute;inset:0}html[data-dsh-imagegen-active]:not([data-dsh-taskboard-active]):not([data-dsh-ssh-active]) [data-dsh-imagegen-view]{display:block}html[data-dsh-imagegen-active]:not([data-dsh-taskboard-active]):not([data-dsh-ssh-active]) [data-pane=conversation]>:not([data-dsh-imagegen-view]),html[data-dsh-imagegen-active]:not([data-dsh-taskboard-active]):not([data-dsh-ssh-active]) [class*=centerCol]>:not([data-dsh-imagegen-view]){display:none!important}.Yvqh9W_entry{width:100%;height:32px;color:var(--dsw-alias-label-secondary);cursor:pointer;white-space:nowrap;background:0 0;border:none;border-radius:8px;align-items:center;gap:8px;padding:0 12px;font-size:13px;display:flex}.Yvqh9W_entry:hover{background:var(--dsw-specific-sidebar-nav-item-hover);color:var(--dsw-alias-label-primary)}.Yvqh9W_entry[data-active]{background:var(--dsw-specific-sidebar-nav-item-active);color:var(--dsw-alias-label-primary);font-weight:600}.Yvqh9W_entryIcon{flex:none;justify-content:center;align-items:center;display:inline-flex}.Yvqh9W_entryLabel{text-overflow:ellipsis;overflow:hidden}[data-dsh-frame][data-sidebar-collapsed] .Yvqh9W_entry{justify-content:center;width:100%;padding:0}[data-dsh-frame][data-sidebar-collapsed] .Yvqh9W_entryLabel{display:none}.Yvqh9W_view{overflow:hidden}.Yvqh9W_panel,.Yvqh9W_panel *,.Yvqh9W_panel :before,.Yvqh9W_panel :after{box-sizing:border-box}.Yvqh9W_panel{background:var(--dsw-alias-bg-base);min-width:0;height:100%;min-height:0;color:var(--dsw-alias-label-primary);font-family:var(--dsw-font-family);flex-direction:column;gap:10px;padding:14px 16px 16px;display:flex;overflow:hidden}.Yvqh9W_panelHeader{flex:none;align-items:baseline;gap:10px;display:flex}.Yvqh9W_panelTitle{color:var(--dsw-alias-label-primary);white-space:nowrap;margin:0;font-size:16px;font-weight:700}.Yvqh9W_panelSubtitle{color:var(--dsw-alias-label-tertiary);white-space:nowrap;text-overflow:ellipsis;font-size:12px;overflow:hidden}.Yvqh9W_banner{border:1px solid var(--dsw-alias-border-l2);color:var(--dsw-alias-label-secondary);overflow-wrap:anywhere;border-radius:10px;flex:none;padding:7px 12px;font-size:12px;line-height:1.5}.Yvqh9W_banner[data-kind=ok]{color:var(--dsw-alias-state-success-primary);border-color:var(--dsw-alias-state-success-primary)}.Yvqh9W_banner[data-kind=warn]{color:var(--dsw-alias-state-warn-primary);border-color:var(--dsw-alias-state-warn-primary)}.Yvqh9W_updateBanner{border:1px solid var(--dsw-alias-state-warn-primary);color:var(--dsw-alias-state-warn-primary);overflow-wrap:anywhere;border-radius:10px;flex:none;justify-content:space-between;align-items:center;gap:12px;padding:7px 10px 7px 12px;font-size:12px;line-height:1.5;display:flex}.Yvqh9W_updateBanner[data-kind=ok]{color:var(--dsw-alias-state-success-primary);border-color:var(--dsw-alias-state-success-primary)}.Yvqh9W_updateText{min-width:0}.Yvqh9W_updateActions{flex:none;align-items:center;gap:10px;display:inline-flex}.Yvqh9W_updateRelease{color:inherit;text-underline-offset:2px;white-space:nowrap;text-decoration:underline}@media (width<=700px){.Yvqh9W_updateBanner{flex-direction:column;align-items:flex-start}.Yvqh9W_updateActions{justify-content:space-between;width:100%}}.Yvqh9W_studio{flex:1;gap:14px;min-width:0;min-height:0;display:flex}.Yvqh9W_config{flex-direction:column;flex:none;gap:12px;width:300px;min-width:260px;max-width:340px;height:100%;min-height:0;display:flex;overflow:hidden}.Yvqh9W_configScroll{scrollbar-width:thin;scrollbar-color:var(--dsw-alias-border-l2) transparent;flex-direction:column;flex:1;gap:12px;min-height:0;padding-right:2px;display:flex;overflow-y:auto}.Yvqh9W_configScroll::-webkit-scrollbar{width:8px}.Yvqh9W_configScroll::-webkit-scrollbar-thumb{background:var(--dsw-alias-border-l2);border-radius:999px}.Yvqh9W_canvas{border:1px solid var(--dsw-alias-border-l1);background:var(--dsw-alias-bg-layer-1);border-radius:12px;flex-direction:column;flex:1;min-width:0;min-height:0;display:flex;position:relative;overflow:hidden}.Yvqh9W_history{border:1px solid var(--dsw-alias-border-l1);background:var(--dsw-alias-bg-layer-1);border-radius:12px;flex-direction:column;flex:none;width:240px;min-width:200px;max-width:280px;min-height:0;display:flex;overflow:hidden}.Yvqh9W_historyHeader{border-bottom:1px solid var(--dsw-alias-border-l1);flex:none;justify-content:space-between;align-items:center;gap:8px;padding:10px 12px;display:flex}.Yvqh9W_historyTitle{color:var(--dsw-alias-label-primary);font-size:13px;font-weight:600}.Yvqh9W_historyClear{font:inherit;color:var(--dsw-alias-label-tertiary);border:1px solid var(--dsw-alias-border-l2);cursor:pointer;background:0 0;border-radius:999px;padding:2px 8px;font-size:11.5px}.Yvqh9W_historyClear:hover{color:var(--dsw-alias-label-error);border-color:var(--dsw-alias-label-error)}.Yvqh9W_historyList{scrollbar-width:thin;scrollbar-color:var(--dsw-alias-border-l2) transparent;flex-direction:column;flex:1;gap:8px;min-height:0;padding:10px;display:flex;overflow-y:auto}.Yvqh9W_historyList::-webkit-scrollbar{width:8px}.Yvqh9W_historyList::-webkit-scrollbar-thumb{background:var(--dsw-alias-border-l2);border-radius:999px}.Yvqh9W_historyEmpty{text-align:center;color:var(--dsw-alias-label-tertiary);flex:1;justify-content:center;align-items:center;padding:20px;font-size:12px;line-height:1.6;display:flex}.Yvqh9W_historyItem{border:1px solid var(--dsw-alias-border-l1);background:var(--dsw-alias-bg-layer-2);border-radius:10px;flex-direction:column;flex:none;gap:6px;padding:8px;display:flex}.Yvqh9W_historyItem:hover{border-color:var(--dsw-alias-border-l2)}.Yvqh9W_historyItem[data-active]{border-color:var(--dsw-alias-brand-primary)}.Yvqh9W_historyMain{font:inherit;color:inherit;text-align:left;cursor:pointer;background:0 0;border:none;align-items:flex-start;gap:8px;min-width:0;padding:0;display:flex}.Yvqh9W_historyThumb{object-fit:cover;background:var(--dsw-alias-bg-base);border-radius:8px;flex:none;width:52px;height:52px}.Yvqh9W_historyThumbPlaceholder{background:var(--dsw-alias-bg-layer-3);border-radius:8px;flex:none;width:52px;height:52px}.Yvqh9W_historyInfo{flex-direction:column;flex:1;gap:4px;min-width:0;display:flex}.Yvqh9W_historyPrompt{color:var(--dsw-alias-label-primary);-webkit-line-clamp:2;-webkit-box-orient:vertical;font-size:12px;line-height:1.4;display:-webkit-box;overflow:hidden}.Yvqh9W_historyMeta{color:var(--dsw-alias-label-tertiary);white-space:nowrap;text-overflow:ellipsis;font-size:11px;overflow:hidden}.Yvqh9W_historyActions{justify-content:flex-end;gap:6px;display:flex}.Yvqh9W_historyAction{font:inherit;color:var(--dsw-alias-label-secondary);border:1px solid var(--dsw-alias-border-l2);cursor:pointer;background:0 0;border-radius:999px;padding:2px 8px;font-size:11.5px}.Yvqh9W_historyAction:hover{color:var(--dsw-alias-label-primary);border-color:var(--dsw-alias-label-dimmed)}.Yvqh9W_historyAction[data-danger]:hover{color:var(--dsw-alias-label-error);border-color:var(--dsw-alias-label-error)}.Yvqh9W_card{background:var(--dsw-alias-bg-layer-2);border:1px solid var(--dsw-alias-border-l1);border-radius:12px;flex-direction:column;flex:none;gap:10px;padding:12px;display:flex}.Yvqh9W_modeRow{align-items:center;gap:8px;display:flex}.Yvqh9W_modePill{flex:1;justify-content:center;height:28px;font-size:13px}.Yvqh9W_uploadBox{min-height:128px;color:var(--dsw-alias-label-secondary);border:1.5px dashed var(--dsw-alias-border-l2);cursor:pointer;font:inherit;text-align:center;background:0 0;border-radius:12px;flex-direction:column;justify-content:center;align-items:center;gap:6px;padding:16px;font-size:12.5px;display:flex}.Yvqh9W_uploadBox:hover{color:var(--dsw-alias-label-primary);border-color:var(--dsw-alias-label-dimmed);background:var(--dsw-alias-interactive-bg-hover)}.Yvqh9W_uploadBox:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:1px}.Yvqh9W_uploadIcon{color:var(--dsw-alias-label-tertiary);display:inline-flex}.Yvqh9W_uploadHint{color:var(--dsw-alias-label-tertiary);font-size:11px}.Yvqh9W_reference{flex-direction:column;gap:8px;display:flex}.Yvqh9W_referenceImage{object-fit:contain;background:var(--dsw-alias-bg-base);border:1px solid var(--dsw-alias-border-l1);border-radius:10px;width:100%;max-height:176px}.Yvqh9W_referenceActions{gap:8px;display:flex}.Yvqh9W_hiddenFile{display:none}.Yvqh9W_prompt{width:100%;min-height:120px;color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-3);border:1px solid var(--dsw-alias-border-l2);resize:vertical;box-sizing:border-box;border-radius:10px;outline:none;padding:10px 12px;font-family:inherit;font-size:13px;line-height:1.6}.Yvqh9W_prompt:focus-visible{border-color:var(--dsw-alias-brand-primary)}.Yvqh9W_prompt::placeholder{color:var(--dsw-alias-label-tertiary)}.Yvqh9W_promptFooter{justify-content:flex-end;margin-top:-6px;display:flex}.Yvqh9W_promptCount{color:var(--dsw-alias-label-tertiary);font-variant-numeric:tabular-nums;font-size:11px}.Yvqh9W_paramGroup{flex-direction:column;gap:8px;display:flex}.Yvqh9W_paramLabel{color:var(--dsw-alias-label-secondary);font-size:12px;font-weight:600}.Yvqh9W_optionRow{flex-wrap:wrap;gap:6px;display:flex}.Yvqh9W_optionGrid{grid-template-columns:repeat(3,1fr);gap:6px;display:grid}.Yvqh9W_optionPill{justify-content:center}.Yvqh9W_paramHint{color:var(--dsw-alias-label-tertiary);font-size:11px;line-height:1.45}.Yvqh9W_footer{border-top:1px solid var(--dsw-alias-border-l1);flex-direction:column;flex:none;align-items:stretch;gap:8px;padding:10px 2px 0 0;display:flex}.Yvqh9W_modelWrap{flex-direction:column;gap:5px;min-width:0;display:flex}.Yvqh9W_modelLabel{color:var(--dsw-alias-label-secondary);font-size:12px;font-weight:600}.Yvqh9W_modelSelect{width:100%;height:36px;color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-2);border:1px solid var(--dsw-alias-border-l2);cursor:pointer;border-radius:18px;outline:none;padding:0 12px;font-family:inherit;font-size:13px}.Yvqh9W_modelSelect:focus-visible{border-color:var(--dsw-alias-brand-primary)}.Yvqh9W_modelSelect:disabled{opacity:.55}.Yvqh9W_generateButton{width:100%}.Yvqh9W_generateInner{align-items:center;gap:7px;display:inline-flex}.Yvqh9W_canvasState{text-align:center;color:var(--dsw-alias-label-tertiary);flex-direction:column;flex:1;justify-content:center;align-items:center;gap:8px;padding:24px;display:flex}.Yvqh9W_canvasStateTitle{color:var(--dsw-alias-label-secondary);font-size:14px;font-weight:600}.Yvqh9W_canvasStateHint{max-width:380px;font-size:12px;line-height:1.6}.Yvqh9W_canvasEmptyIcon{color:var(--dsw-alias-label-tertiary);margin-bottom:4px;display:inline-flex}.Yvqh9W_canvasError{color:var(--dsw-alias-label-error);background:var(--dsw-alias-bg-layer-2);border:1px solid var(--dsw-alias-label-error);overflow-wrap:anywhere;border-radius:10px;flex:none;margin:14px;padding:10px 14px;font-size:12.5px;line-height:1.6}.Yvqh9W_canvasBody{scrollbar-width:thin;scrollbar-color:var(--dsw-alias-border-l2) transparent;flex-direction:column;flex:1;gap:10px;min-height:0;padding:14px;display:flex;overflow-y:auto}.Yvqh9W_canvasBody::-webkit-scrollbar{width:8px}.Yvqh9W_canvasBody::-webkit-scrollbar-thumb{background:var(--dsw-alias-border-l2);border-radius:999px}.Yvqh9W_canvasMeta{color:var(--dsw-alias-label-tertiary);flex:none;align-items:center;gap:8px;font-size:12px;display:flex}.Yvqh9W_canvasHistoryTag{color:var(--dsw-alias-label-secondary);background:var(--dsw-alias-bg-layer-2);border:1px solid var(--dsw-alias-border-l2);white-space:nowrap;border-radius:999px;padding:1px 8px;font-size:11px}.Yvqh9W_grid{grid-template-columns:repeat(auto-fill,minmax(240px,1fr));align-content:start;gap:14px;display:grid}.Yvqh9W_imageCard{border:1px solid var(--dsw-alias-border-l1);background:var(--dsw-alias-bg-layer-2);cursor:zoom-in;border-radius:12px;flex-direction:column;margin:0;display:flex;position:relative;overflow:hidden}.Yvqh9W_imageCard:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:1px}.Yvqh9W_image{aspect-ratio:1;object-fit:cover;background:var(--dsw-alias-bg-base);width:100%;display:block}.Yvqh9W_imageCaption{color:var(--dsw-alias-label-tertiary);white-space:nowrap;text-overflow:ellipsis;border-top:1px solid var(--dsw-alias-border-l1);padding:7px 10px;font-size:11px;line-height:1.5;overflow:hidden}.Yvqh9W_download{color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-mask-1);border:1px solid var(--dsw-alias-border-l2);opacity:0;backdrop-filter:blur(4px);border-radius:999px;padding:2px 10px;font-size:12px;font-weight:500;line-height:20px;text-decoration:none;transition:opacity .12s;position:absolute;top:8px;right:8px}.Yvqh9W_imageCard:hover .Yvqh9W_download{opacity:1}.Yvqh9W_download:hover{background:var(--dsw-alias-bg-base)}.Yvqh9W_zoomHint{color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-mask-1);border:1px solid var(--dsw-alias-border-l2);opacity:0;backdrop-filter:blur(4px);pointer-events:none;border-radius:999px;align-items:center;gap:5px;padding:2px 10px;font-size:12px;font-weight:500;line-height:20px;transition:opacity .12s;display:inline-flex;position:absolute;bottom:8px;left:8px}.Yvqh9W_imageCard:hover .Yvqh9W_zoomHint{opacity:1}.Yvqh9W_spinner,.Yvqh9W_bigSpinner{border:2px solid;border-top-color:#0000;border-radius:50%;flex:none;animation:.8s linear infinite Yvqh9W_dshImageGenSpin;display:inline-block}.Yvqh9W_spinner{width:11px;height:11px}.Yvqh9W_bigSpinner{width:30px;height:30px;color:var(--dsw-alias-state-business-primary);border-width:3px;margin-bottom:6px}.Yvqh9W_lightbox{z-index:1000;backdrop-filter:blur(6px);background:#000000b8;justify-content:center;align-items:center;padding:24px;display:flex;position:fixed;inset:0}.Yvqh9W_lightboxClose{color:#fff;cursor:pointer;background:#ffffff24;border:1px solid #ffffff47;border-radius:50%;justify-content:center;align-items:center;width:38px;height:38px;display:inline-flex;position:absolute;top:16px;right:16px}.Yvqh9W_lightboxClose:hover{background:#ffffff42}.Yvqh9W_lightboxNav{color:#fff;cursor:pointer;background:#ffffff24;border:1px solid #ffffff47;border-radius:50%;justify-content:center;align-items:center;width:42px;height:42px;display:inline-flex;position:absolute;top:50%;transform:translateY(-50%)}.Yvqh9W_lightboxNav:hover{background:#ffffff42}.Yvqh9W_lightboxNav[data-dir=prev]{left:16px}.Yvqh9W_lightboxNav[data-dir=next]{right:16px}.Yvqh9W_lightboxFigure{flex-direction:column;gap:10px;max-width:min(1100px,100vw - 160px);max-height:calc(100vh - 48px);margin:0;display:flex}.Yvqh9W_lightboxImage{object-fit:contain;background:#ffffff0a;border-radius:10px;max-width:100%;max-height:calc(100vh - 160px);box-shadow:0 24px 80px #00000080}.Yvqh9W_lightboxCaption{color:#ffffffe6;-webkit-line-clamp:3;-webkit-box-orient:vertical;font-size:12px;line-height:1.6;display:-webkit-box;overflow:hidden}.Yvqh9W_lightboxMeta{justify-content:space-between;align-items:center;gap:12px;display:flex}.Yvqh9W_lightboxIndex{color:#fffc;font-variant-numeric:tabular-nums;font-size:12px}.Yvqh9W_lightboxDownload{color:#fff;background:#ffffff24;border:1px solid #ffffff47;border-radius:999px;padding:4px 14px;font-size:12.5px;font-weight:500;text-decoration:none}.Yvqh9W_lightboxDownload:hover{background:#ffffff42}@keyframes Yvqh9W_dshImageGenSpin{to{transform:rotate(360deg)}}@media (prefers-reduced-motion:reduce){.Yvqh9W_download,.Yvqh9W_spinner,.Yvqh9W_bigSpinner{transition:none;animation-duration:1.5s}}";
349
379
  const tagId$1 = "@dickpy/dsh-imagegen/panel.module.css";
350
380
  if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$1) + "]") === null) {
351
381
  const tag = document.createElement("style");
@@ -355,85 +385,89 @@ window.__ModuleLoader__.load({
355
385
  document.head.appendChild(tag);
356
386
  }
357
387
  var panel_module_css_default = {
358
- "referenceActions": "Yvqh9W_referenceActions",
359
- "banner": "Yvqh9W_banner",
360
- "historyThumb": "Yvqh9W_historyThumb",
361
- "configScroll": "Yvqh9W_configScroll",
362
- "reference": "Yvqh9W_reference",
363
- "card": "Yvqh9W_card",
388
+ "view": "Yvqh9W_view",
389
+ "entryLabel": "Yvqh9W_entryLabel",
390
+ "uploadIcon": "Yvqh9W_uploadIcon",
391
+ "canvasError": "Yvqh9W_canvasError",
392
+ "canvasHistoryTag": "Yvqh9W_canvasHistoryTag",
364
393
  "grid": "Yvqh9W_grid",
365
- "download": "Yvqh9W_download",
366
- "zoomHint": "Yvqh9W_zoomHint",
367
- "lightbox": "Yvqh9W_lightbox",
368
- "optionPill": "Yvqh9W_optionPill",
369
- "prompt": "Yvqh9W_prompt",
370
- "lightboxImage": "Yvqh9W_lightboxImage",
371
- "promptCount": "Yvqh9W_promptCount",
372
394
  "optionRow": "Yvqh9W_optionRow",
395
+ "optionPill": "Yvqh9W_optionPill",
396
+ "historyItem": "Yvqh9W_historyItem",
397
+ "canvasStateHint": "Yvqh9W_canvasStateHint",
373
398
  "modelWrap": "Yvqh9W_modelWrap",
374
- "canvasError": "Yvqh9W_canvasError",
375
- "lightboxFigure": "Yvqh9W_lightboxFigure",
399
+ "canvasState": "Yvqh9W_canvasState",
400
+ "historyEmpty": "Yvqh9W_historyEmpty",
401
+ "historyMain": "Yvqh9W_historyMain",
402
+ "historyMeta": "Yvqh9W_historyMeta",
376
403
  "dshImageGenSpin": "Yvqh9W_dshImageGenSpin",
377
- "lightboxDownload": "Yvqh9W_lightboxDownload",
378
- "referenceImage": "Yvqh9W_referenceImage",
379
- "historyAction": "Yvqh9W_historyAction",
404
+ "updateActions": "Yvqh9W_updateActions",
405
+ "paramLabel": "Yvqh9W_paramLabel",
406
+ "lightboxNav": "Yvqh9W_lightboxNav",
407
+ "lightboxClose": "Yvqh9W_lightboxClose",
408
+ "paramHint": "Yvqh9W_paramHint",
409
+ "lightbox": "Yvqh9W_lightbox",
410
+ "entryIcon": "Yvqh9W_entryIcon",
411
+ "download": "Yvqh9W_download",
412
+ "spinner": "Yvqh9W_spinner",
413
+ "uploadHint": "Yvqh9W_uploadHint",
414
+ "modeRow": "Yvqh9W_modeRow",
415
+ "generateInner": "Yvqh9W_generateInner",
380
416
  "optionGrid": "Yvqh9W_optionGrid",
381
- "studio": "Yvqh9W_studio",
382
- "entryLabel": "Yvqh9W_entryLabel",
383
- "panelHeader": "Yvqh9W_panelHeader",
384
- "historyHeader": "Yvqh9W_historyHeader",
417
+ "lightboxMeta": "Yvqh9W_lightboxMeta",
385
418
  "historyThumbPlaceholder": "Yvqh9W_historyThumbPlaceholder",
386
- "historyInfo": "Yvqh9W_historyInfo",
387
- "modeRow": "Yvqh9W_modeRow",
388
- "canvasHistoryTag": "Yvqh9W_canvasHistoryTag",
389
- "image": "Yvqh9W_image",
390
- "canvasState": "Yvqh9W_canvasState",
391
- "panelSubtitle": "Yvqh9W_panelSubtitle",
392
- "promptFooter": "Yvqh9W_promptFooter",
393
- "canvasMeta": "Yvqh9W_canvasMeta",
394
- "historyTitle": "Yvqh9W_historyTitle",
395
- "canvasEmptyIcon": "Yvqh9W_canvasEmptyIcon",
396
- "panelTitle": "Yvqh9W_panelTitle",
397
- "paramLabel": "Yvqh9W_paramLabel",
398
- "lightboxIndex": "Yvqh9W_lightboxIndex",
399
- "historyPrompt": "Yvqh9W_historyPrompt",
400
- "imageCaption": "Yvqh9W_imageCaption",
401
419
  "canvasStateTitle": "Yvqh9W_canvasStateTitle",
420
+ "canvasMeta": "Yvqh9W_canvasMeta",
402
421
  "config": "Yvqh9W_config",
403
- "uploadHint": "Yvqh9W_uploadHint",
404
- "historyMain": "Yvqh9W_historyMain",
405
- "historyClear": "Yvqh9W_historyClear",
406
- "modelSelect": "Yvqh9W_modelSelect",
407
- "paramGroup": "Yvqh9W_paramGroup",
422
+ "canvasBody": "Yvqh9W_canvasBody",
423
+ "panelTitle": "Yvqh9W_panelTitle",
424
+ "prompt": "Yvqh9W_prompt",
425
+ "lightboxFigure": "Yvqh9W_lightboxFigure",
408
426
  "generateButton": "Yvqh9W_generateButton",
409
- "historyItem": "Yvqh9W_historyItem",
410
- "modelLabel": "Yvqh9W_modelLabel",
411
- "historyMeta": "Yvqh9W_historyMeta",
427
+ "panelHeader": "Yvqh9W_panelHeader",
412
428
  "bigSpinner": "Yvqh9W_bigSpinner",
429
+ "configScroll": "Yvqh9W_configScroll",
430
+ "lightboxIndex": "Yvqh9W_lightboxIndex",
413
431
  "modePill": "Yvqh9W_modePill",
432
+ "modelLabel": "Yvqh9W_modelLabel",
433
+ "studio": "Yvqh9W_studio",
434
+ "historyTitle": "Yvqh9W_historyTitle",
414
435
  "history": "Yvqh9W_history",
415
- "hiddenFile": "Yvqh9W_hiddenFile",
436
+ "historyInfo": "Yvqh9W_historyInfo",
437
+ "historyActions": "Yvqh9W_historyActions",
438
+ "historyAction": "Yvqh9W_historyAction",
439
+ "card": "Yvqh9W_card",
440
+ "panelSubtitle": "Yvqh9W_panelSubtitle",
441
+ "uploadBox": "Yvqh9W_uploadBox",
442
+ "reference": "Yvqh9W_reference",
443
+ "updateBanner": "Yvqh9W_updateBanner",
444
+ "updateText": "Yvqh9W_updateText",
445
+ "promptFooter": "Yvqh9W_promptFooter",
446
+ "banner": "Yvqh9W_banner",
447
+ "entry": "Yvqh9W_entry",
448
+ "promptCount": "Yvqh9W_promptCount",
449
+ "referenceImage": "Yvqh9W_referenceImage",
450
+ "panel": "Yvqh9W_panel",
451
+ "modelSelect": "Yvqh9W_modelSelect",
452
+ "historyThumb": "Yvqh9W_historyThumb",
453
+ "canvasEmptyIcon": "Yvqh9W_canvasEmptyIcon",
454
+ "zoomHint": "Yvqh9W_zoomHint",
416
455
  "lightboxCaption": "Yvqh9W_lightboxCaption",
417
- "generateInner": "Yvqh9W_generateInner",
456
+ "historyList": "Yvqh9W_historyList",
457
+ "historyPrompt": "Yvqh9W_historyPrompt",
458
+ "hiddenFile": "Yvqh9W_hiddenFile",
459
+ "updateRelease": "Yvqh9W_updateRelease",
460
+ "referenceActions": "Yvqh9W_referenceActions",
418
461
  "imageCard": "Yvqh9W_imageCard",
419
- "view": "Yvqh9W_view",
420
- "panel": "Yvqh9W_panel",
421
- "historyEmpty": "Yvqh9W_historyEmpty",
422
- "spinner": "Yvqh9W_spinner",
423
- "paramHint": "Yvqh9W_paramHint",
424
- "lightboxNav": "Yvqh9W_lightboxNav",
425
- "canvasStateHint": "Yvqh9W_canvasStateHint",
462
+ "image": "Yvqh9W_image",
463
+ "lightboxImage": "Yvqh9W_lightboxImage",
464
+ "imageCaption": "Yvqh9W_imageCaption",
465
+ "lightboxDownload": "Yvqh9W_lightboxDownload",
466
+ "historyHeader": "Yvqh9W_historyHeader",
426
467
  "canvas": "Yvqh9W_canvas",
427
- "uploadBox": "Yvqh9W_uploadBox",
428
- "entry": "Yvqh9W_entry",
429
- "canvasBody": "Yvqh9W_canvasBody",
468
+ "paramGroup": "Yvqh9W_paramGroup",
430
469
  "footer": "Yvqh9W_footer",
431
- "entryIcon": "Yvqh9W_entryIcon",
432
- "historyList": "Yvqh9W_historyList",
433
- "lightboxClose": "Yvqh9W_lightboxClose",
434
- "lightboxMeta": "Yvqh9W_lightboxMeta",
435
- "uploadIcon": "Yvqh9W_uploadIcon",
436
- "historyActions": "Yvqh9W_historyActions"
470
+ "historyClear": "Yvqh9W_historyClear"
437
471
  };
438
472
  //#endregion
439
473
  //#region src/client/ImageGenPanel.tsx
@@ -557,6 +591,10 @@ window.__ModuleLoader__.load({
557
591
  const [history, setHistory] = (0, react.useState)([]);
558
592
  const [viewingHistoryId, setViewingHistoryId] = (0, react.useState)(null);
559
593
  const [preview, setPreview] = (0, react.useState)(null);
594
+ const [update, setUpdate] = (0, react.useState)(null);
595
+ const [updating, setUpdating] = (0, react.useState)(false);
596
+ const [updateMessage, setUpdateMessage] = (0, react.useState)(null);
597
+ const [updateResult, setUpdateResult] = (0, react.useState)(null);
560
598
  const fileInput = (0, react.useRef)(null);
561
599
  const elapsed = useElapsed(generating, startedAt);
562
600
  (0, react.useEffect)(() => {
@@ -568,6 +606,31 @@ window.__ModuleLoader__.load({
568
606
  disposed = true;
569
607
  };
570
608
  }, [api]);
609
+ (0, react.useEffect)(() => {
610
+ let disposed = false;
611
+ api.updateCheck().then((info) => {
612
+ if (!disposed && info.updateAvailable) setUpdate(info);
613
+ }).catch(() => {});
614
+ return () => {
615
+ disposed = true;
616
+ };
617
+ }, [api]);
618
+ const applyUpdate = async () => {
619
+ if (update === null || updating) return;
620
+ setUpdating(true);
621
+ setUpdateMessage(null);
622
+ setUpdateResult(null);
623
+ try {
624
+ const result = await api.updateApply(update.latestVersion);
625
+ setUpdateMessage(tt("update.success", { version: result.updatedVersion }));
626
+ setUpdateResult("success");
627
+ } catch {
628
+ setUpdateMessage(tt("update.failed"));
629
+ setUpdateResult("failed");
630
+ } finally {
631
+ setUpdating(false);
632
+ }
633
+ };
571
634
  /** Read an uploaded reference image into a data URL. */
572
635
  const acceptFile = (file) => {
573
636
  if (file === void 0) return;
@@ -611,7 +674,8 @@ window.__ModuleLoader__.load({
611
674
  quality,
612
675
  n: count,
613
676
  detail,
614
- ...mode === "edit" && refImage !== null ? { image: refImage.dataUrl } : {}
677
+ ...mode === "edit" && refImage !== null ? { image: refImage.dataUrl } : {},
678
+ ...mode === "edit" && refImage !== null ? { refName: refImage.name } : {}
615
679
  };
616
680
  setGenerating(true);
617
681
  setError(null);
@@ -621,22 +685,8 @@ window.__ModuleLoader__.load({
621
685
  const result = await api.generate(request);
622
686
  setImages(result.images);
623
687
  setViewingHistoryId(null);
624
- const entry = {
625
- id: `${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 8)}`,
626
- createdAt: Date.now(),
627
- mode,
628
- model,
629
- prompt: promptText,
630
- size,
631
- quality,
632
- detail,
633
- n: count,
634
- images: result.images,
635
- ...mode === "edit" && refImage !== null ? { refName: refImage.name } : {}
636
- };
637
- try {
638
- setHistory(await api.historyAppend(entry));
639
- } catch {}
688
+ if (result.history !== void 0) setHistory(result.history);
689
+ if (result.historyError !== void 0) setError(result.historyError);
640
690
  } catch (caught) {
641
691
  setError(errorMessage(caught));
642
692
  } finally {
@@ -746,6 +796,31 @@ window.__ModuleLoader__.load({
746
796
  "data-kind": "ok",
747
797
  children: tt("config.configured", { url: apiUrl })
748
798
  }),
799
+ update !== null ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
800
+ className: panel_module_css_default.updateBanner,
801
+ "data-kind": updateResult === "success" ? "ok" : "warn",
802
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
803
+ className: panel_module_css_default.updateText,
804
+ children: updateMessage ?? tt("update.available", { version: update.latestVersion })
805
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
806
+ className: panel_module_css_default.updateActions,
807
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("a", {
808
+ className: panel_module_css_default.updateRelease,
809
+ href: update.releaseUrl,
810
+ target: "_blank",
811
+ rel: "noreferrer",
812
+ children: tt("update.release")
813
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
814
+ variant: "primary",
815
+ size: "sm",
816
+ disabled: updating || updateMessage !== null,
817
+ onClick: () => {
818
+ applyUpdate();
819
+ },
820
+ children: updating ? tt("update.installing") : tt("update.install")
821
+ })]
822
+ })]
823
+ }) : null,
749
824
  /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
750
825
  className: panel_module_css_default.studio,
751
826
  children: [
@@ -1786,32 +1861,32 @@ window.__ModuleLoader__.load({
1786
1861
  document.head.appendChild(tag);
1787
1862
  }
1788
1863
  var settings_card_module_css_default = {
1789
- "discard": "i1cc5G_discard",
1790
- "readOnly": "i1cc5G_readOnly",
1791
- "chevron": "i1cc5G_chevron",
1792
- "save": "i1cc5G_save",
1793
- "reset": "i1cc5G_reset",
1794
- "header": "i1cc5G_header",
1795
- "headText": "i1cc5G_headText",
1796
- "label": "i1cc5G_label",
1864
+ "field": "i1cc5G_field",
1865
+ "failed": "i1cc5G_failed",
1866
+ "name": "i1cc5G_name",
1867
+ "chevronOpen": "i1cc5G_chevronOpen",
1797
1868
  "select": "i1cc5G_select",
1798
- "footer": "i1cc5G_footer",
1799
- "inputInvalid": "i1cc5G_inputInvalid",
1800
- "badge": "i1cc5G_badge",
1801
- "input": "i1cc5G_input",
1869
+ "body": "i1cc5G_body",
1870
+ "label": "i1cc5G_label",
1802
1871
  "card": "i1cc5G_card",
1872
+ "chevron": "i1cc5G_chevron",
1873
+ "head": "i1cc5G_head",
1874
+ "badge": "i1cc5G_badge",
1875
+ "header": "i1cc5G_header",
1876
+ "reset": "i1cc5G_reset",
1803
1877
  "badges": "i1cc5G_badges",
1878
+ "description": "i1cc5G_description",
1879
+ "input": "i1cc5G_input",
1880
+ "inputInvalid": "i1cc5G_inputInvalid",
1804
1881
  "hint": "i1cc5G_hint",
1805
- "chevronOpen": "i1cc5G_chevronOpen",
1806
- "body": "i1cc5G_body",
1807
- "field": "i1cc5G_field",
1882
+ "headText": "i1cc5G_headText",
1883
+ "invalid": "i1cc5G_invalid",
1808
1884
  "pending": "i1cc5G_pending",
1885
+ "readOnly": "i1cc5G_readOnly",
1809
1886
  "notExposed": "i1cc5G_notExposed",
1810
- "head": "i1cc5G_head",
1811
- "invalid": "i1cc5G_invalid",
1812
- "failed": "i1cc5G_failed",
1813
- "name": "i1cc5G_name",
1814
- "description": "i1cc5G_description"
1887
+ "footer": "i1cc5G_footer",
1888
+ "save": "i1cc5G_save",
1889
+ "discard": "i1cc5G_discard"
1815
1890
  };
1816
1891
  //#endregion
1817
1892
  //#region src/client/SettingsCard.tsx