@dickpy/dsh-imagegen 1.0.1 → 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 +5 -4
- package/lib/client.js +173 -82
- package/lib/client.js.map +1 -1
- package/lib/index.js +167 -1
- package/package.json +1 -1
- package/src/client/ImageGenPanel.tsx +48 -1
- package/src/client/api.ts +19 -1
- package/src/client/locales.ts +13 -0
- package/src/client/panel.module.css +50 -0
- package/src/index.ts +1 -0
- package/src/protocol.ts +15 -0
- package/src/routes.ts +40 -1
- package/src/updater.ts +116 -0
package/README.md
CHANGED
|
@@ -30,6 +30,7 @@ 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
|
|
|
@@ -41,13 +42,13 @@ DeepSeek Harness (DSH) Web GUI 的 AI 生图插件。它通过宿主进程安全
|
|
|
41
42
|
把下面提示词直接粘贴给 **DSH**(或 Codex / 其他 coding agent)执行即可:
|
|
42
43
|
|
|
43
44
|
```text
|
|
44
|
-
用 dsh plugin --profile web add @dickpy/dsh-imagegen@1.0.
|
|
45
|
+
用 dsh plugin --profile web add @dickpy/dsh-imagegen@1.0.2 安装 AI 生图插件(profile 名按实际修改),完成后重启 dsh web。
|
|
45
46
|
```
|
|
46
47
|
|
|
47
48
|
### 方式二:npm 安装(推荐)
|
|
48
49
|
|
|
49
50
|
```bash
|
|
50
|
-
dsh plugin --profile web add @dickpy/dsh-imagegen@1.0.
|
|
51
|
+
dsh plugin --profile web add @dickpy/dsh-imagegen@1.0.2
|
|
51
52
|
```
|
|
52
53
|
|
|
53
54
|
dsh 会自动把插件注册进 profile 的 bundle 清单(无需手动改 cordis.patch.yml),重启 dsh web 即可。
|
|
@@ -55,10 +56,10 @@ dsh 会自动把插件注册进 profile 的 bundle 清单(无需手动改 cord
|
|
|
55
56
|
### 方式三:聚合包(tarball)安装
|
|
56
57
|
|
|
57
58
|
从 [GitHub Releases](https://github.com/dickpy/dsh-imagegen/releases) 下载发布产物
|
|
58
|
-
(如 `
|
|
59
|
+
(如 `dickpy-dsh-imagegen-1.0.2.tgz`),然后:
|
|
59
60
|
|
|
60
61
|
```bash
|
|
61
|
-
dsh plugin --profile web add <下载路径>/
|
|
62
|
+
dsh plugin --profile web add <下载路径>/dickpy-dsh-imagegen-1.0.2.tgz
|
|
62
63
|
```
|
|
63
64
|
|
|
64
65
|
重启 dsh web。
|
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,6 +67,22 @@ 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
88
|
const body = await readEnvelope(await fetch(GENERATE_API, {
|
|
@@ -195,6 +216,12 @@ window.__ModuleLoader__.load({
|
|
|
195
216
|
"config.missing": "尚未配置 API:请前往「设置 → 插件 → 可配置」为 AI 生图填写 api_url 与 api_key。",
|
|
196
217
|
"config.configured": "已连接 {url}",
|
|
197
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",
|
|
198
225
|
"settings.title": "AI 生图(dsh-imagegen)",
|
|
199
226
|
"settings.description": "配置图像生成 API 地址与密钥",
|
|
200
227
|
"settings.apiUrl": "API 地址(api_url)",
|
|
@@ -288,6 +315,12 @@ window.__ModuleLoader__.load({
|
|
|
288
315
|
"config.missing": "API not configured: open \"Settings → Plugins → Configurable\" and fill in api_url and api_key for AI Image.",
|
|
289
316
|
"config.configured": "Connected to {url}",
|
|
290
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",
|
|
291
324
|
"settings.title": "AI Image (dsh-imagegen)",
|
|
292
325
|
"settings.description": "Configure the image generation API endpoint and key",
|
|
293
326
|
"settings.apiUrl": "API URL (api_url)",
|
|
@@ -342,7 +375,7 @@ window.__ModuleLoader__.load({
|
|
|
342
375
|
}
|
|
343
376
|
//#endregion
|
|
344
377
|
//#region \0dsh-css:E:\dsh-plugin\src\client\panel.module.css.mjs
|
|
345
|
-
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}}";
|
|
346
379
|
const tagId$1 = "@dickpy/dsh-imagegen/panel.module.css";
|
|
347
380
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$1) + "]") === null) {
|
|
348
381
|
const tag = document.createElement("style");
|
|
@@ -352,85 +385,89 @@ window.__ModuleLoader__.load({
|
|
|
352
385
|
document.head.appendChild(tag);
|
|
353
386
|
}
|
|
354
387
|
var panel_module_css_default = {
|
|
355
|
-
"
|
|
356
|
-
"
|
|
357
|
-
"
|
|
358
|
-
"
|
|
359
|
-
"historyList": "Yvqh9W_historyList",
|
|
360
|
-
"paramLabel": "Yvqh9W_paramLabel",
|
|
361
|
-
"panelTitle": "Yvqh9W_panelTitle",
|
|
362
|
-
"modelLabel": "Yvqh9W_modelLabel",
|
|
363
|
-
"referenceActions": "Yvqh9W_referenceActions",
|
|
364
|
-
"modePill": "Yvqh9W_modePill",
|
|
365
|
-
"reference": "Yvqh9W_reference",
|
|
366
|
-
"modelSelect": "Yvqh9W_modelSelect",
|
|
367
|
-
"lightbox": "Yvqh9W_lightbox",
|
|
368
|
-
"promptCount": "Yvqh9W_promptCount",
|
|
388
|
+
"view": "Yvqh9W_view",
|
|
389
|
+
"entryLabel": "Yvqh9W_entryLabel",
|
|
390
|
+
"uploadIcon": "Yvqh9W_uploadIcon",
|
|
391
|
+
"canvasError": "Yvqh9W_canvasError",
|
|
369
392
|
"canvasHistoryTag": "Yvqh9W_canvasHistoryTag",
|
|
370
|
-
"
|
|
371
|
-
"
|
|
372
|
-
"canvas": "Yvqh9W_canvas",
|
|
373
|
-
"historyItem": "Yvqh9W_historyItem",
|
|
374
|
-
"canvasBody": "Yvqh9W_canvasBody",
|
|
393
|
+
"grid": "Yvqh9W_grid",
|
|
394
|
+
"optionRow": "Yvqh9W_optionRow",
|
|
375
395
|
"optionPill": "Yvqh9W_optionPill",
|
|
376
|
-
"
|
|
377
|
-
"footer": "Yvqh9W_footer",
|
|
378
|
-
"download": "Yvqh9W_download",
|
|
379
|
-
"lightboxImage": "Yvqh9W_lightboxImage",
|
|
380
|
-
"uploadIcon": "Yvqh9W_uploadIcon",
|
|
381
|
-
"bigSpinner": "Yvqh9W_bigSpinner",
|
|
382
|
-
"lightboxDownload": "Yvqh9W_lightboxDownload",
|
|
383
|
-
"history": "Yvqh9W_history",
|
|
384
|
-
"promptFooter": "Yvqh9W_promptFooter",
|
|
385
|
-
"lightboxIndex": "Yvqh9W_lightboxIndex",
|
|
386
|
-
"hiddenFile": "Yvqh9W_hiddenFile",
|
|
387
|
-
"historyClear": "Yvqh9W_historyClear",
|
|
388
|
-
"generateInner": "Yvqh9W_generateInner",
|
|
389
|
-
"panel": "Yvqh9W_panel",
|
|
390
|
-
"historyTitle": "Yvqh9W_historyTitle",
|
|
391
|
-
"view": "Yvqh9W_view",
|
|
396
|
+
"historyItem": "Yvqh9W_historyItem",
|
|
392
397
|
"canvasStateHint": "Yvqh9W_canvasStateHint",
|
|
393
|
-
"
|
|
394
|
-
"
|
|
395
|
-
"
|
|
396
|
-
"canvasMeta": "Yvqh9W_canvasMeta",
|
|
397
|
-
"historyHeader": "Yvqh9W_historyHeader",
|
|
398
|
-
"entryIcon": "Yvqh9W_entryIcon",
|
|
399
|
-
"banner": "Yvqh9W_banner",
|
|
400
|
-
"generateButton": "Yvqh9W_generateButton",
|
|
401
|
-
"lightboxNav": "Yvqh9W_lightboxNav",
|
|
398
|
+
"modelWrap": "Yvqh9W_modelWrap",
|
|
399
|
+
"canvasState": "Yvqh9W_canvasState",
|
|
400
|
+
"historyEmpty": "Yvqh9W_historyEmpty",
|
|
402
401
|
"historyMain": "Yvqh9W_historyMain",
|
|
403
|
-
"
|
|
402
|
+
"historyMeta": "Yvqh9W_historyMeta",
|
|
403
|
+
"dshImageGenSpin": "Yvqh9W_dshImageGenSpin",
|
|
404
|
+
"updateActions": "Yvqh9W_updateActions",
|
|
405
|
+
"paramLabel": "Yvqh9W_paramLabel",
|
|
406
|
+
"lightboxNav": "Yvqh9W_lightboxNav",
|
|
407
|
+
"lightboxClose": "Yvqh9W_lightboxClose",
|
|
404
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",
|
|
416
|
+
"optionGrid": "Yvqh9W_optionGrid",
|
|
405
417
|
"lightboxMeta": "Yvqh9W_lightboxMeta",
|
|
418
|
+
"historyThumbPlaceholder": "Yvqh9W_historyThumbPlaceholder",
|
|
419
|
+
"canvasStateTitle": "Yvqh9W_canvasStateTitle",
|
|
420
|
+
"canvasMeta": "Yvqh9W_canvasMeta",
|
|
406
421
|
"config": "Yvqh9W_config",
|
|
422
|
+
"canvasBody": "Yvqh9W_canvasBody",
|
|
423
|
+
"panelTitle": "Yvqh9W_panelTitle",
|
|
424
|
+
"prompt": "Yvqh9W_prompt",
|
|
425
|
+
"lightboxFigure": "Yvqh9W_lightboxFigure",
|
|
426
|
+
"generateButton": "Yvqh9W_generateButton",
|
|
407
427
|
"panelHeader": "Yvqh9W_panelHeader",
|
|
408
|
-
"
|
|
409
|
-
"
|
|
410
|
-
"
|
|
428
|
+
"bigSpinner": "Yvqh9W_bigSpinner",
|
|
429
|
+
"configScroll": "Yvqh9W_configScroll",
|
|
430
|
+
"lightboxIndex": "Yvqh9W_lightboxIndex",
|
|
431
|
+
"modePill": "Yvqh9W_modePill",
|
|
432
|
+
"modelLabel": "Yvqh9W_modelLabel",
|
|
411
433
|
"studio": "Yvqh9W_studio",
|
|
412
|
-
"
|
|
413
|
-
"
|
|
434
|
+
"historyTitle": "Yvqh9W_historyTitle",
|
|
435
|
+
"history": "Yvqh9W_history",
|
|
436
|
+
"historyInfo": "Yvqh9W_historyInfo",
|
|
414
437
|
"historyActions": "Yvqh9W_historyActions",
|
|
415
|
-
"imageCard": "Yvqh9W_imageCard",
|
|
416
|
-
"dshImageGenSpin": "Yvqh9W_dshImageGenSpin",
|
|
417
|
-
"lightboxClose": "Yvqh9W_lightboxClose",
|
|
418
|
-
"uploadBox": "Yvqh9W_uploadBox",
|
|
419
|
-
"historyEmpty": "Yvqh9W_historyEmpty",
|
|
420
|
-
"canvasStateTitle": "Yvqh9W_canvasStateTitle",
|
|
421
|
-
"lightboxFigure": "Yvqh9W_lightboxFigure",
|
|
422
|
-
"lightboxCaption": "Yvqh9W_lightboxCaption",
|
|
423
|
-
"paramGroup": "Yvqh9W_paramGroup",
|
|
424
|
-
"entryLabel": "Yvqh9W_entryLabel",
|
|
425
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",
|
|
426
453
|
"canvasEmptyIcon": "Yvqh9W_canvasEmptyIcon",
|
|
427
454
|
"zoomHint": "Yvqh9W_zoomHint",
|
|
428
|
-
"
|
|
429
|
-
"
|
|
430
|
-
"
|
|
431
|
-
"
|
|
432
|
-
"
|
|
433
|
-
"
|
|
455
|
+
"lightboxCaption": "Yvqh9W_lightboxCaption",
|
|
456
|
+
"historyList": "Yvqh9W_historyList",
|
|
457
|
+
"historyPrompt": "Yvqh9W_historyPrompt",
|
|
458
|
+
"hiddenFile": "Yvqh9W_hiddenFile",
|
|
459
|
+
"updateRelease": "Yvqh9W_updateRelease",
|
|
460
|
+
"referenceActions": "Yvqh9W_referenceActions",
|
|
461
|
+
"imageCard": "Yvqh9W_imageCard",
|
|
462
|
+
"image": "Yvqh9W_image",
|
|
463
|
+
"lightboxImage": "Yvqh9W_lightboxImage",
|
|
464
|
+
"imageCaption": "Yvqh9W_imageCaption",
|
|
465
|
+
"lightboxDownload": "Yvqh9W_lightboxDownload",
|
|
466
|
+
"historyHeader": "Yvqh9W_historyHeader",
|
|
467
|
+
"canvas": "Yvqh9W_canvas",
|
|
468
|
+
"paramGroup": "Yvqh9W_paramGroup",
|
|
469
|
+
"footer": "Yvqh9W_footer",
|
|
470
|
+
"historyClear": "Yvqh9W_historyClear"
|
|
434
471
|
};
|
|
435
472
|
//#endregion
|
|
436
473
|
//#region src/client/ImageGenPanel.tsx
|
|
@@ -554,6 +591,10 @@ window.__ModuleLoader__.load({
|
|
|
554
591
|
const [history, setHistory] = (0, react.useState)([]);
|
|
555
592
|
const [viewingHistoryId, setViewingHistoryId] = (0, react.useState)(null);
|
|
556
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);
|
|
557
598
|
const fileInput = (0, react.useRef)(null);
|
|
558
599
|
const elapsed = useElapsed(generating, startedAt);
|
|
559
600
|
(0, react.useEffect)(() => {
|
|
@@ -565,6 +606,31 @@ window.__ModuleLoader__.load({
|
|
|
565
606
|
disposed = true;
|
|
566
607
|
};
|
|
567
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
|
+
};
|
|
568
634
|
/** Read an uploaded reference image into a data URL. */
|
|
569
635
|
const acceptFile = (file) => {
|
|
570
636
|
if (file === void 0) return;
|
|
@@ -730,6 +796,31 @@ window.__ModuleLoader__.load({
|
|
|
730
796
|
"data-kind": "ok",
|
|
731
797
|
children: tt("config.configured", { url: apiUrl })
|
|
732
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,
|
|
733
824
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
734
825
|
className: panel_module_css_default.studio,
|
|
735
826
|
children: [
|
|
@@ -1770,32 +1861,32 @@ window.__ModuleLoader__.load({
|
|
|
1770
1861
|
document.head.appendChild(tag);
|
|
1771
1862
|
}
|
|
1772
1863
|
var settings_card_module_css_default = {
|
|
1773
|
-
"
|
|
1774
|
-
"
|
|
1864
|
+
"field": "i1cc5G_field",
|
|
1865
|
+
"failed": "i1cc5G_failed",
|
|
1866
|
+
"name": "i1cc5G_name",
|
|
1867
|
+
"chevronOpen": "i1cc5G_chevronOpen",
|
|
1775
1868
|
"select": "i1cc5G_select",
|
|
1776
1869
|
"body": "i1cc5G_body",
|
|
1777
|
-
"
|
|
1778
|
-
"
|
|
1870
|
+
"label": "i1cc5G_label",
|
|
1871
|
+
"card": "i1cc5G_card",
|
|
1779
1872
|
"chevron": "i1cc5G_chevron",
|
|
1780
|
-
"
|
|
1781
|
-
"description": "i1cc5G_description",
|
|
1873
|
+
"head": "i1cc5G_head",
|
|
1782
1874
|
"badge": "i1cc5G_badge",
|
|
1875
|
+
"header": "i1cc5G_header",
|
|
1783
1876
|
"reset": "i1cc5G_reset",
|
|
1877
|
+
"badges": "i1cc5G_badges",
|
|
1878
|
+
"description": "i1cc5G_description",
|
|
1784
1879
|
"input": "i1cc5G_input",
|
|
1880
|
+
"inputInvalid": "i1cc5G_inputInvalid",
|
|
1785
1881
|
"hint": "i1cc5G_hint",
|
|
1882
|
+
"headText": "i1cc5G_headText",
|
|
1883
|
+
"invalid": "i1cc5G_invalid",
|
|
1884
|
+
"pending": "i1cc5G_pending",
|
|
1786
1885
|
"readOnly": "i1cc5G_readOnly",
|
|
1787
|
-
"header": "i1cc5G_header",
|
|
1788
|
-
"chevronOpen": "i1cc5G_chevronOpen",
|
|
1789
|
-
"field": "i1cc5G_field",
|
|
1790
1886
|
"notExposed": "i1cc5G_notExposed",
|
|
1791
|
-
"head": "i1cc5G_head",
|
|
1792
1887
|
"footer": "i1cc5G_footer",
|
|
1793
|
-
"invalid": "i1cc5G_invalid",
|
|
1794
|
-
"discard": "i1cc5G_discard",
|
|
1795
1888
|
"save": "i1cc5G_save",
|
|
1796
|
-
"
|
|
1797
|
-
"failed": "i1cc5G_failed",
|
|
1798
|
-
"label": "i1cc5G_label"
|
|
1889
|
+
"discard": "i1cc5G_discard"
|
|
1799
1890
|
};
|
|
1800
1891
|
//#endregion
|
|
1801
1892
|
//#region src/client/SettingsCard.tsx
|