dsh-audiogen 0.4.6 → 0.4.8

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/lib/client.js CHANGED
@@ -22,6 +22,8 @@ window.__ModuleLoader__.load({
22
22
  const ENHANCE_API = "/api/dsh-audiogen/prompt/enhance";
23
23
  /** Host-mediated built-in provider catalog (channels the user can instantiate). */
24
24
  const PRESETS_API = "/api/dsh-audiogen/presets";
25
+ /** LLM 模型目录:提示词增强模型的候选(来自「设置 → 模型」各提供方)。 */
26
+ const LLM_MODELS_API = "/api/dsh-audiogen/llm/models";
25
27
  /** Host-mediated model/voice discovery endpoint. */
26
28
  const MODEL_API = { discover: "/api/dsh-audiogen/models/discover" };
27
29
  /** Host-persisted generation history routes. */
@@ -187,6 +189,10 @@ window.__ModuleLoader__.load({
187
189
  "settings.allowAgentAudio": "允许 Agent 调用音频生成",
188
190
  "settings.autoSaveLibrary": "生成后自动保存到资源库",
189
191
  "settings.maxConcurrent": "最大并发生成数(同时打到上游的请求数,默认 5)",
192
+ "settings.enhanceModel": "提示词增强模型(LLM)",
193
+ "settings.enhanceModelDefault": "跟随 Agent 默认模型(设置 → 模型)",
194
+ "settings.enhanceModelHint": "用于「✨ 增强提示词」与 generate_audio 的 enhance_prompt 参数;留空则使用「设置 → 模型」中的默认模型。",
195
+ "settings.enhanceModelFailed": "模型列表加载失败",
190
196
  "settings.save": "保存",
191
197
  "settings.saving": "保存中…",
192
198
  "settings.discard": "放弃修改",
@@ -239,6 +245,8 @@ window.__ModuleLoader__.load({
239
245
  "channel.category.sfx": "音效",
240
246
  "channel.category.voice_design": "音色设计",
241
247
  "channel.category.voice_clone": "音色克隆",
248
+ "channel.category.stableDual": "音乐 + 音效(自动)",
249
+ "channel.category.stableDualHint": "Stable Audio 模型按模型名自动识别为音乐+音效,无需设置分类。",
242
250
  "channel.addModel": "添加模型",
243
251
  "channel.removeModel": "移除",
244
252
  "channel.fetchModels": "获取可用模型",
@@ -247,6 +255,7 @@ window.__ModuleLoader__.load({
247
255
  "channel.fetchEmpty": "未发现音频相关模型。",
248
256
  "channel.discoverSource": "来源:{source}",
249
257
  "channel.candidates": "发现 {n} 个可用模型/音色",
258
+ "channel.stabilityHint": "Stable Audio 模型(stable-audio-*)同时适用于「音乐生成」与「音效生成」,面板按模型名自动识别;分类仅影响默认展示。官方不支持 TTS。",
250
259
  "channel.selectAll": "全选",
251
260
  "channel.clearSelection": "清空",
252
261
  "channel.adoptSelected": "添加所选({n})",
@@ -289,6 +298,10 @@ window.__ModuleLoader__.load({
289
298
  "settings.allowAgentAudio": "Allow agents to generate audio",
290
299
  "settings.autoSaveLibrary": "Auto-save generated audio to the library",
291
300
  "settings.maxConcurrent": "Max concurrent generations (in-flight upstream calls, default 5)",
301
+ "settings.enhanceModel": "Prompt enhance model (LLM)",
302
+ "settings.enhanceModelDefault": "Follow the agent default model (Settings → Models)",
303
+ "settings.enhanceModelHint": "Used by \"✨ Enhance prompt\" and the generate_audio enhance_prompt parameter; empty follows the default model in Settings → Models.",
304
+ "settings.enhanceModelFailed": "Failed to load the model list",
292
305
  "settings.save": "Save",
293
306
  "settings.saving": "Saving…",
294
307
  "settings.discard": "Discard",
@@ -341,6 +354,8 @@ window.__ModuleLoader__.load({
341
354
  "channel.category.sfx": "SFX",
342
355
  "channel.category.voice_design": "Voice design",
343
356
  "channel.category.voice_clone": "Voice clone",
357
+ "channel.category.stableDual": "Music + SFX (auto)",
358
+ "channel.category.stableDualHint": "Stable Audio models are auto-detected as Music + SFX by model name; no category needed.",
344
359
  "channel.addModel": "Add model",
345
360
  "channel.removeModel": "Remove",
346
361
  "channel.fetchModels": "Fetch available models",
@@ -349,6 +364,7 @@ window.__ModuleLoader__.load({
349
364
  "channel.fetchEmpty": "No audio-related models found.",
350
365
  "channel.discoverSource": "Source: {source}",
351
366
  "channel.candidates": "{n} available model(s)/voice(s) found",
367
+ "channel.stabilityHint": "Stable Audio models (stable-audio-*) apply to both Music and SFX; the panel detects them by model name. The category only affects the default display. Official API does not support TTS.",
352
368
  "channel.selectAll": "Select all",
353
369
  "channel.clearSelection": "Clear",
354
370
  "channel.adoptSelected": "Add selected ({n})",
@@ -1168,115 +1184,115 @@ window.__ModuleLoader__.load({
1168
1184
  document.head.appendChild(tag);
1169
1185
  }
1170
1186
  var audio_panel_module_css_default = {
1171
- "resultCol": "Oo1fpq_resultCol",
1172
- "resultEmptyHint": "Oo1fpq_resultEmptyHint",
1187
+ "trackKnob": "Oo1fpq_trackKnob",
1188
+ "savedChip": "Oo1fpq_savedChip",
1189
+ "modelCheckList": "Oo1fpq_modelCheckList",
1190
+ "taskStatus": "Oo1fpq_taskStatus",
1191
+ "historyTab": "Oo1fpq_historyTab",
1192
+ "time": "Oo1fpq_time",
1193
+ "error": "Oo1fpq_error",
1194
+ "audioCardHead": "Oo1fpq_audioCardHead",
1195
+ "row": "Oo1fpq_row",
1196
+ "audioCardActions": "Oo1fpq_audioCardActions",
1197
+ "modeButton": "Oo1fpq_modeButton",
1173
1198
  "compareModelName": "Oo1fpq_compareModelName",
1199
+ "secondaryButton": "Oo1fpq_secondaryButton",
1174
1200
  "resultGroups": "Oo1fpq_resultGroups",
1175
- "fieldCell": "Oo1fpq_fieldCell",
1176
- "trackFill": "Oo1fpq_trackFill",
1177
- "overrideTable": "Oo1fpq_overrideTable",
1178
- "checkbox": "Oo1fpq_checkbox",
1179
- "panel": "Oo1fpq_panel",
1180
- "historyAction": "Oo1fpq_historyAction",
1181
- "historyCompareSummary": "Oo1fpq_historyCompareSummary",
1182
- "taskStatus": "Oo1fpq_taskStatus",
1201
+ "resultModeChip": "Oo1fpq_resultModeChip",
1183
1202
  "fieldFull": "Oo1fpq_fieldFull",
1184
- "historyIcon": "Oo1fpq_historyIcon",
1185
- "secondaryButton": "Oo1fpq_secondaryButton",
1186
- "ghostButton": "Oo1fpq_ghostButton",
1187
- "enhanceActionsRow": "Oo1fpq_enhanceActionsRow",
1188
- "historyEmpty": "Oo1fpq_historyEmpty",
1189
- "audioCardActions": "Oo1fpq_audioCardActions",
1190
- "historyActions": "Oo1fpq_historyActions",
1191
- "playButton": "Oo1fpq_playButton",
1192
- "modalHead": "Oo1fpq_modalHead",
1193
- "modalFoot": "Oo1fpq_modalFoot",
1194
- "resultGroupCount": "Oo1fpq_resultGroupCount",
1195
- "taskCard": "Oo1fpq_taskCard",
1196
- "row": "Oo1fpq_row",
1197
- "studio": "Oo1fpq_studio",
1198
- "resultEmptyIcon": "Oo1fpq_resultEmptyIcon",
1199
- "historyMeta": "Oo1fpq_historyMeta",
1200
- "resultGroup": "Oo1fpq_resultGroup",
1201
- "title": "Oo1fpq_title",
1202
1203
  "historyClear": "Oo1fpq_historyClear",
1203
- "audiogenToastIn": "Oo1fpq_audiogenToastIn",
1204
+ "historyCompareSummary": "Oo1fpq_historyCompareSummary",
1205
+ "modalHead": "Oo1fpq_modalHead",
1204
1206
  "resultGroupError": "Oo1fpq_resultGroupError",
1205
- "playerCompact": "Oo1fpq_playerCompact",
1206
- "compareChip": "Oo1fpq_compareChip",
1207
- "historyList": "Oo1fpq_historyList",
1208
- "historyTabCount": "Oo1fpq_historyTabCount",
1209
- "overrideDash": "Oo1fpq_overrideDash",
1210
- "resultGroupChip": "Oo1fpq_resultGroupChip",
1211
- "toast": "Oo1fpq_toast",
1212
- "voiceIdChip": "Oo1fpq_voiceIdChip",
1213
- "savedChip": "Oo1fpq_savedChip",
1207
+ "historyModelRow": "Oo1fpq_historyModelRow",
1214
1208
  "compareGroup": "Oo1fpq_compareGroup",
1209
+ "track": "Oo1fpq_track",
1210
+ "overrideOnly": "Oo1fpq_overrideOnly",
1211
+ "taskBar": "Oo1fpq_taskBar",
1212
+ "audioCardIndex": "Oo1fpq_audioCardIndex",
1213
+ "taskList": "Oo1fpq_taskList",
1215
1214
  "overrideCellHead": "Oo1fpq_overrideCellHead",
1216
- "audioCardHead": "Oo1fpq_audioCardHead",
1217
- "input": "Oo1fpq_input",
1218
- "modalBody": "Oo1fpq_modalBody",
1219
- "overrideCell": "Oo1fpq_overrideCell",
1220
- "historyCompareBadge": "Oo1fpq_historyCompareBadge",
1221
- "select": "Oo1fpq_select",
1222
- "resultEmpty": "Oo1fpq_resultEmpty",
1215
+ "resultMeta": "Oo1fpq_resultMeta",
1216
+ "historyTitle": "Oo1fpq_historyTitle",
1217
+ "resultEmptyIcon": "Oo1fpq_resultEmptyIcon",
1218
+ "historyCol": "Oo1fpq_historyCol",
1219
+ "historyAction": "Oo1fpq_historyAction",
1223
1220
  "player": "Oo1fpq_player",
1224
- "trackKnob": "Oo1fpq_trackKnob",
1225
- "time": "Oo1fpq_time",
1226
- "taskActions": "Oo1fpq_taskActions",
1227
- "historyTime": "Oo1fpq_historyTime",
1228
- "resultGroupHead": "Oo1fpq_resultGroupHead",
1229
- "compareGroupHead": "Oo1fpq_compareGroupHead",
1230
- "error": "Oo1fpq_error",
1231
1221
  "historyItem": "Oo1fpq_historyItem",
1232
- "taskBar": "Oo1fpq_taskBar",
1233
- "header": "Oo1fpq_header",
1234
- "track": "Oo1fpq_track",
1235
- "formCol": "Oo1fpq_formCol",
1236
- "textarea": "Oo1fpq_textarea",
1222
+ "title": "Oo1fpq_title",
1237
1223
  "muteButton": "Oo1fpq_muteButton",
1238
- "taskHead": "Oo1fpq_taskHead",
1239
- "historyTitle": "Oo1fpq_historyTitle",
1240
- "historyModelRow": "Oo1fpq_historyModelRow",
1241
- "modelCheckList": "Oo1fpq_modelCheckList",
1242
- "formSectionRow": "Oo1fpq_formSectionRow",
1243
- "generate": "Oo1fpq_generate",
1224
+ "resultEmptyHint": "Oo1fpq_resultEmptyHint",
1225
+ "compareBox": "Oo1fpq_compareBox",
1226
+ "checkbox": "Oo1fpq_checkbox",
1227
+ "toast": "Oo1fpq_toast",
1228
+ "overrideRow": "Oo1fpq_overrideRow",
1229
+ "resultCol": "Oo1fpq_resultCol",
1230
+ "historyTabs": "Oo1fpq_historyTabs",
1231
+ "formFields": "Oo1fpq_formFields",
1232
+ "fieldCell": "Oo1fpq_fieldCell",
1244
1233
  "audioCard": "Oo1fpq_audioCard",
1234
+ "voiceIdChip": "Oo1fpq_voiceIdChip",
1235
+ "hint": "Oo1fpq_hint",
1236
+ "overrideTable": "Oo1fpq_overrideTable",
1237
+ "compareBoard": "Oo1fpq_compareBoard",
1238
+ "resultGroupCount": "Oo1fpq_resultGroupCount",
1239
+ "taskLabel": "Oo1fpq_taskLabel",
1245
1240
  "compareState": "Oo1fpq_compareState",
1246
- "audioCardIndex": "Oo1fpq_audioCardIndex",
1247
- "historyTabs": "Oo1fpq_historyTabs",
1248
- "historyTab": "Oo1fpq_historyTab",
1249
- "overrideOnly": "Oo1fpq_overrideOnly",
1250
- "compareChips": "Oo1fpq_compareChips",
1241
+ "formSection": "Oo1fpq_formSection",
1242
+ "modalMask": "Oo1fpq_modalMask",
1251
1243
  "audioList": "Oo1fpq_audioList",
1252
- "taskLabel": "Oo1fpq_taskLabel",
1253
- "resultModeChip": "Oo1fpq_resultModeChip",
1244
+ "compareGroupHead": "Oo1fpq_compareGroupHead",
1254
1245
  "historyPrompt": "Oo1fpq_historyPrompt",
1255
- "enhanceCard": "Oo1fpq_enhanceCard",
1256
- "enhanceCardHead": "Oo1fpq_enhanceCardHead",
1246
+ "taskCard": "Oo1fpq_taskCard",
1257
1247
  "modeIcon": "Oo1fpq_modeIcon",
1258
- "resultMeta": "Oo1fpq_resultMeta",
1259
- "tab": "Oo1fpq_tab",
1248
+ "modal": "Oo1fpq_modal",
1260
1249
  "iconButton": "Oo1fpq_iconButton",
1261
- "taskList": "Oo1fpq_taskList",
1262
- "overrideRow": "Oo1fpq_overrideRow",
1250
+ "resultGroupHead": "Oo1fpq_resultGroupHead",
1251
+ "modalBody": "Oo1fpq_modalBody",
1252
+ "panel": "Oo1fpq_panel",
1253
+ "advanced": "Oo1fpq_advanced",
1254
+ "historyTabCount": "Oo1fpq_historyTabCount",
1255
+ "formRow": "Oo1fpq_formRow",
1256
+ "tabs": "Oo1fpq_tabs",
1263
1257
  "historyHeader": "Oo1fpq_historyHeader",
1258
+ "input": "Oo1fpq_input",
1259
+ "resultGroup": "Oo1fpq_resultGroup",
1260
+ "taskActions": "Oo1fpq_taskActions",
1261
+ "enhanceCardHead": "Oo1fpq_enhanceCardHead",
1262
+ "enhanceActionsRow": "Oo1fpq_enhanceActionsRow",
1263
+ "ghostButton": "Oo1fpq_ghostButton",
1264
+ "formSectionRow": "Oo1fpq_formSectionRow",
1264
1265
  "modeRow": "Oo1fpq_modeRow",
1265
- "formFields": "Oo1fpq_formFields",
1266
+ "historyIcon": "Oo1fpq_historyIcon",
1267
+ "overrideDash": "Oo1fpq_overrideDash",
1268
+ "historyCompareBadge": "Oo1fpq_historyCompareBadge",
1269
+ "generate": "Oo1fpq_generate",
1270
+ "overrideCell": "Oo1fpq_overrideCell",
1271
+ "resultGroupChip": "Oo1fpq_resultGroupChip",
1272
+ "select": "Oo1fpq_select",
1273
+ "playerCompact": "Oo1fpq_playerCompact",
1274
+ "formCol": "Oo1fpq_formCol",
1275
+ "modalFoot": "Oo1fpq_modalFoot",
1276
+ "header": "Oo1fpq_header",
1277
+ "resultEmpty": "Oo1fpq_resultEmpty",
1278
+ "taskHead": "Oo1fpq_taskHead",
1266
1279
  "enhanceActions": "Oo1fpq_enhanceActions",
1267
- "label": "Oo1fpq_label",
1268
- "tabs": "Oo1fpq_tabs",
1269
- "compareBox": "Oo1fpq_compareBox",
1270
- "formRow": "Oo1fpq_formRow",
1271
- "hint": "Oo1fpq_hint",
1272
- "compareBoard": "Oo1fpq_compareBoard",
1280
+ "historyList": "Oo1fpq_historyList",
1281
+ "tab": "Oo1fpq_tab",
1282
+ "historyEmpty": "Oo1fpq_historyEmpty",
1283
+ "enhanceCard": "Oo1fpq_enhanceCard",
1284
+ "textarea": "Oo1fpq_textarea",
1285
+ "historyTime": "Oo1fpq_historyTime",
1286
+ "trackFill": "Oo1fpq_trackFill",
1273
1287
  "primaryButton": "Oo1fpq_primaryButton",
1274
- "advanced": "Oo1fpq_advanced",
1275
- "historyCol": "Oo1fpq_historyCol",
1276
- "modeButton": "Oo1fpq_modeButton",
1277
- "modalMask": "Oo1fpq_modalMask",
1278
- "modal": "Oo1fpq_modal",
1279
- "formSection": "Oo1fpq_formSection"
1288
+ "audiogenToastIn": "Oo1fpq_audiogenToastIn",
1289
+ "historyActions": "Oo1fpq_historyActions",
1290
+ "compareChips": "Oo1fpq_compareChips",
1291
+ "historyMeta": "Oo1fpq_historyMeta",
1292
+ "compareChip": "Oo1fpq_compareChip",
1293
+ "playButton": "Oo1fpq_playButton",
1294
+ "label": "Oo1fpq_label",
1295
+ "studio": "Oo1fpq_studio"
1280
1296
  };
1281
1297
  //#endregion
1282
1298
  //#region src/client/audio-player.tsx
@@ -1589,6 +1605,19 @@ window.__ModuleLoader__.load({
1589
1605
  * plus a model-comparison mode that runs the same prompt across several
1590
1606
  * models and shows one result group per model.
1591
1607
  */
1608
+ /**
1609
+ * 模型是否适用于当前模式。
1610
+ * - stable-audio-*(Stable Audio 系列):官方 text-to-audio 协议对音乐与音效是同一接口,
1611
+ * 因此同时适用于「音乐生成」与「音效生成」;官方不支持 TTS(语音合成),故不出现在 TTS。
1612
+ * - 其余模型:按设置中的分类(category)匹配,auto(未分类)适用于全部模式。
1613
+ */
1614
+ function modelSuitableForMode(entry, mode) {
1615
+ if (mode === "voice_design") return false;
1616
+ if (/^stable-audio-/i.test(entry.alias)) return mode === "music" || mode === "sfx";
1617
+ if (entry.category === void 0) return true;
1618
+ if (entry.category === mode) return true;
1619
+ return entry.category === "tts" && mode === "tts";
1620
+ }
1592
1621
  /** 每模型覆盖值 → 请求字段的数值/类型转换(空值跳过)。 */
1593
1622
  function overrideSpread(override) {
1594
1623
  const out = {};
@@ -1724,7 +1753,21 @@ window.__ModuleLoader__.load({
1724
1753
  return channel.apiUrl.trim() !== "" && keyHeld && (channel.models.length > 0 || channel.preset === "minimax");
1725
1754
  });
1726
1755
  const [mode, setMode] = (0, react.useState)("tts");
1727
- const [prompt, setPrompt] = (0, react.useState)("");
1756
+ /** 每个模式独立的输入内容(TTS 文本 / 音乐·音效提示词 / 音色描述),切模式互不干扰。 */
1757
+ const [promptByMode, setPromptByMode] = (0, react.useState)({
1758
+ tts: "",
1759
+ music: "",
1760
+ sfx: "",
1761
+ voice_design: ""
1762
+ });
1763
+ const prompt = promptByMode[mode] ?? "";
1764
+ const setPrompt = (next) => {
1765
+ const target = mode;
1766
+ setPromptByMode((current) => current[target] === next ? current : {
1767
+ ...current,
1768
+ [target]: next
1769
+ });
1770
+ };
1728
1771
  const [previewText, setPreviewText] = (0, react.useState)("");
1729
1772
  const [model, setModel] = (0, react.useState)("");
1730
1773
  const [voice, setVoice] = (0, react.useState)("");
@@ -1745,6 +1788,9 @@ window.__ModuleLoader__.load({
1745
1788
  const [subtitle, setSubtitle] = (0, react.useState)(false);
1746
1789
  const [enhancing, setEnhancing] = (0, react.useState)(false);
1747
1790
  const [enhancePreview, setEnhancePreview] = (0, react.useState)(null);
1791
+ (0, react.useEffect)(() => {
1792
+ setEnhancePreview(null);
1793
+ }, [mode]);
1748
1794
  const [seed, setSeed] = (0, react.useState)("");
1749
1795
  const [steps, setSteps] = (0, react.useState)("");
1750
1796
  const [cfgScale, setCfgScale] = (0, react.useState)("");
@@ -1778,7 +1824,7 @@ window.__ModuleLoader__.load({
1778
1824
  ]);
1779
1825
  const visibleModels = (0, react.useMemo)(() => {
1780
1826
  if (mode === "voice_design") return [];
1781
- return modelOptions.models.filter((entry) => entry.category === void 0 || entry.category === "tts" && mode === "tts" || entry.category === mode).map((entry) => entry.alias);
1827
+ return modelOptions.models.filter((entry) => modelSuitableForMode(entry, mode)).map((entry) => entry.alias);
1782
1828
  }, [modelOptions.models, mode]);
1783
1829
  const currentPreset = (0, react.useMemo)(() => {
1784
1830
  if (mode === "voice_design") return channels.find((candidate) => candidate.id === designChannelId)?.preset ?? "";
@@ -2057,8 +2103,9 @@ window.__ModuleLoader__.load({
2057
2103
  const removeTask = (taskId) => {
2058
2104
  setTasks((current) => current.filter((task) => task.id !== taskId));
2059
2105
  };
2060
- /** 从历史参数回填表单(参考 AI 生图「恢复」):配置 + prompt 一键复用。 */
2061
- const restoreFromParams = (params, modeValue, singleModel, compareModelsRestore) => {
2106
+ /** 从历史参数回填表单(参考 AI 生图「恢复」):配置 + prompt 一键复用。
2107
+ * compareModelsRestore:对比任务恢复为对比模式;overridesRestore 由各模型 params 差异重建。 */
2108
+ const restoreFromParams = (params, modeValue, singleModel, compareModelsRestore, overridesRestore) => {
2062
2109
  const str = (key) => {
2063
2110
  const v = params[key];
2064
2111
  return typeof v === "string" && v.trim() !== "" ? v.trim() : void 0;
@@ -2074,7 +2121,10 @@ window.__ModuleLoader__.load({
2074
2121
  const bool = (key) => typeof params[key] === "boolean" ? params[key] : void 0;
2075
2122
  setMode(modeValue);
2076
2123
  const promptValue = str("prompt");
2077
- if (promptValue !== void 0) setPrompt(promptValue);
2124
+ if (promptValue !== void 0) setPromptByMode((current) => current[modeValue] === promptValue ? current : {
2125
+ ...current,
2126
+ [modeValue]: promptValue
2127
+ });
2078
2128
  const modelValue = str("model") ?? singleModel;
2079
2129
  if (modelValue !== "") setModel(modelValue);
2080
2130
  if (compareModelsRestore !== void 0 && compareModelsRestore.length > 0) {
@@ -2122,8 +2172,26 @@ window.__ModuleLoader__.load({
2122
2172
  if (previewValue !== void 0) setPreviewText(previewValue);
2123
2173
  const channelIdValue = str("channelId");
2124
2174
  if (channelIdValue !== void 0 && modeValue === "voice_design") setDesignChannelId(channelIdValue);
2175
+ setOverrides(overridesRestore ?? {});
2125
2176
  props.showToast("已恢复该次生成的配置,可直接再次生成");
2126
2177
  };
2178
+ /** 由对比历史条目重建每模型参数覆盖:以第一项为全局基准,其余条目与基准不同的字段即覆盖。 */
2179
+ const overridesOfCompare = (models) => {
2180
+ const base = models[0]?.entry.params ?? {};
2181
+ const out = {};
2182
+ for (const item of models.slice(1)) {
2183
+ const params = item.entry.params ?? {};
2184
+ const diff = {};
2185
+ for (const [key, value] of Object.entries(params)) {
2186
+ if (typeof value !== "string" && typeof value !== "number" && typeof value !== "boolean") continue;
2187
+ if (key === "taskId" || key === "upstream") continue;
2188
+ if (typeof base[key] === typeof value && String(base[key]) === String(value)) continue;
2189
+ diff[key] = String(value);
2190
+ }
2191
+ if (Object.keys(diff).length > 0) out[item.model] = diff;
2192
+ }
2193
+ return out;
2194
+ };
2127
2195
  /** 调用宿主增强(Agent 默认模型),结果先预览再应用。 */
2128
2196
  const runEnhance = async () => {
2129
2197
  if (prompt.trim() === "") {
@@ -2525,6 +2593,8 @@ window.__ModuleLoader__.load({
2525
2593
  }, [entries]);
2526
2594
  const needModel = mode !== "voice_design";
2527
2595
  const runningCount = tasks.filter((task) => task.status === "running").length;
2596
+ /** 结果列只显示当前模式的任务(历史面板已按模式分组)。 */
2597
+ const visibleTasks = (0, react.useMemo)(() => tasks.filter((task) => task.mode === mode), [tasks, mode]);
2528
2598
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
2529
2599
  className: audio_panel_module_css_default.studio,
2530
2600
  children: [
@@ -2766,7 +2836,7 @@ window.__ModuleLoader__.load({
2766
2836
  label: group.channelName,
2767
2837
  children: group.models.map((item) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
2768
2838
  value: item.alias,
2769
- children: item.alias
2839
+ children: /^stable-audio-/i.test(item.alias) ? `${item.alias} · 音乐/音效` : item.alias
2770
2840
  }, item.alias))
2771
2841
  }, group.channelId))]
2772
2842
  })]
@@ -2821,7 +2891,7 @@ window.__ModuleLoader__.load({
2821
2891
  children: [error !== null ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
2822
2892
  className: audio_panel_module_css_default.error,
2823
2893
  children: error
2824
- }) : null, tasks.length === 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
2894
+ }) : null, visibleTasks.length === 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
2825
2895
  className: audio_panel_module_css_default.resultEmpty,
2826
2896
  children: [
2827
2897
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
@@ -2849,7 +2919,7 @@ window.__ModuleLoader__.load({
2849
2919
  ]
2850
2920
  }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
2851
2921
  className: audio_panel_module_css_default.taskList,
2852
- children: tasks.map((task) => {
2922
+ children: visibleTasks.map((task) => {
2853
2923
  const elapsed = task.finishedAt !== void 0 ? Math.round((task.finishedAt - task.startedAt) / 1e3) : Math.round((Date.now() - task.startedAt) / 1e3);
2854
2924
  const statusText = task.status === "running" ? `生成中 ${task.progress.done}/${task.progress.total}${task.progress.current !== "" ? ` · ${task.progress.current}` : ""} · ${elapsed}s` : task.status === "done" ? `完成 · ${task.groups.reduce((sum, group) => sum + group.outputs.length, 0)} 段 · ${elapsed}s` : task.status === "cancelled" ? "已取消" : "失败";
2855
2925
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
@@ -3030,7 +3100,7 @@ window.__ModuleLoader__.load({
3030
3100
  type: "button",
3031
3101
  className: audio_panel_module_css_default.historyIcon,
3032
3102
  title: "恢复(回填配置与全部模型)",
3033
- onClick: () => restoreFromParams(item.models[0]?.entry.params ?? {}, item.mode, item.models[0]?.model ?? "", item.models.map((model) => model.model)),
3103
+ onClick: () => restoreFromParams(item.models[0]?.entry.params ?? {}, item.mode, item.models[0]?.model ?? "", item.models.map((model) => model.model), overridesOfCompare(item.models)),
3034
3104
  children: "↺"
3035
3105
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
3036
3106
  type: "button",
@@ -3121,62 +3191,62 @@ window.__ModuleLoader__.load({
3121
3191
  document.head.appendChild(tag);
3122
3192
  }
3123
3193
  var library_module_css_default = {
3124
- "stateNote": "vzUV2a_stateNote",
3125
- "paramsDetails": "vzUV2a_paramsDetails",
3194
+ "provRow": "vzUV2a_provRow",
3195
+ "drawerPlayerList": "vzUV2a_drawerPlayerList",
3196
+ "provKey": "vzUV2a_provKey",
3126
3197
  "cardCheck": "vzUV2a_cardCheck",
3127
- "chip": "vzUV2a_chip",
3128
- "listActions": "vzUV2a_listActions",
3129
3198
  "drawerActions": "vzUV2a_drawerActions",
3130
- "dangerBtn": "vzUV2a_dangerBtn",
3131
- "emptyIcon": "vzUV2a_emptyIcon",
3199
+ "toolbar": "vzUV2a_toolbar",
3132
3200
  "grid": "vzUV2a_grid",
3133
- "cardName": "vzUV2a_cardName",
3201
+ "drawer": "vzUV2a_drawer",
3134
3202
  "drawerMask": "vzUV2a_drawerMask",
3135
- "cardTime": "vzUV2a_cardTime",
3136
3203
  "iconBtn": "vzUV2a_iconBtn",
3137
- "drawerBody": "vzUV2a_drawerBody",
3138
- "input": "vzUV2a_input",
3139
- "filterRow": "vzUV2a_filterRow",
3140
- "drawerField": "vzUV2a_drawerField",
3141
- "textarea": "vzUV2a_textarea",
3204
+ "code": "vzUV2a_code",
3205
+ "listHead": "vzUV2a_listHead",
3142
3206
  "primaryBtn": "vzUV2a_primaryBtn",
3143
- "listCount": "vzUV2a_listCount",
3144
- "drawerPlayerName": "vzUV2a_drawerPlayerName",
3207
+ "audiogenDrawerIn": "vzUV2a_audiogenDrawerIn",
3208
+ "chipCount": "vzUV2a_chipCount",
3209
+ "drawerField": "vzUV2a_drawerField",
3210
+ "card": "vzUV2a_card",
3145
3211
  "provValue": "vzUV2a_provValue",
3146
3212
  "typeChips": "vzUV2a_typeChips",
3147
- "toolbar": "vzUV2a_toolbar",
3148
- "code": "vzUV2a_code",
3149
- "drawer": "vzUV2a_drawer",
3213
+ "empty": "vzUV2a_empty",
3214
+ "drawerPlayer": "vzUV2a_drawerPlayer",
3215
+ "selCount": "vzUV2a_selCount",
3216
+ "typeBadge": "vzUV2a_typeBadge",
3217
+ "listActions": "vzUV2a_listActions",
3218
+ "drawerHead": "vzUV2a_drawerHead",
3219
+ "listCount": "vzUV2a_listCount",
3220
+ "drawerPlayerName": "vzUV2a_drawerPlayerName",
3221
+ "drawerSplit": "vzUV2a_drawerSplit",
3222
+ "input": "vzUV2a_input",
3223
+ "cardFoot": "vzUV2a_cardFoot",
3224
+ "textarea": "vzUV2a_textarea",
3225
+ "chip": "vzUV2a_chip",
3226
+ "searchInput": "vzUV2a_searchInput",
3150
3227
  "smallSelect": "vzUV2a_smallSelect",
3228
+ "dangerBtn": "vzUV2a_dangerBtn",
3229
+ "emptyIcon": "vzUV2a_emptyIcon",
3230
+ "stateNote": "vzUV2a_stateNote",
3151
3231
  "filterLabel": "vzUV2a_filterLabel",
3152
- "smallChip": "vzUV2a_smallChip",
3232
+ "ghostBtn": "vzUV2a_ghostBtn",
3233
+ "metaChip": "vzUV2a_metaChip",
3234
+ "cardName": "vzUV2a_cardName",
3235
+ "searchBox": "vzUV2a_searchBox",
3236
+ "filterRow": "vzUV2a_filterRow",
3153
3237
  "drawerTitle": "vzUV2a_drawerTitle",
3238
+ "drawerBody": "vzUV2a_drawerBody",
3154
3239
  "drawerSection": "vzUV2a_drawerSection",
3155
- "chipCount": "vzUV2a_chipCount",
3156
3240
  "drawerLabel": "vzUV2a_drawerLabel",
3157
- "drawerPlayerList": "vzUV2a_drawerPlayerList",
3158
- "mono": "vzUV2a_mono",
3159
- "listHead": "vzUV2a_listHead",
3160
- "cardHead": "vzUV2a_cardHead",
3161
- "metaChip": "vzUV2a_metaChip",
3162
- "drawerHead": "vzUV2a_drawerHead",
3163
- "ghostBtn": "vzUV2a_ghostBtn",
3164
- "empty": "vzUV2a_empty",
3165
3241
  "emptyHint": "vzUV2a_emptyHint",
3166
- "selCount": "vzUV2a_selCount",
3167
- "cardFoot": "vzUV2a_cardFoot",
3168
- "library": "vzUV2a_library",
3169
- "searchBox": "vzUV2a_searchBox",
3170
- "provRow": "vzUV2a_provRow",
3171
3242
  "provenance": "vzUV2a_provenance",
3172
- "card": "vzUV2a_card",
3173
- "drawerPlayer": "vzUV2a_drawerPlayer",
3174
- "provKey": "vzUV2a_provKey",
3175
3243
  "promptText": "vzUV2a_promptText",
3176
- "typeBadge": "vzUV2a_typeBadge",
3177
- "audiogenDrawerIn": "vzUV2a_audiogenDrawerIn",
3178
- "drawerSplit": "vzUV2a_drawerSplit",
3179
- "searchInput": "vzUV2a_searchInput"
3244
+ "library": "vzUV2a_library",
3245
+ "smallChip": "vzUV2a_smallChip",
3246
+ "cardHead": "vzUV2a_cardHead",
3247
+ "cardTime": "vzUV2a_cardTime",
3248
+ "paramsDetails": "vzUV2a_paramsDetails",
3249
+ "mono": "vzUV2a_mono"
3180
3250
  };
3181
3251
  //#endregion
3182
3252
  //#region src/client/library-view.tsx
@@ -4049,167 +4119,167 @@ window.__ModuleLoader__.load({
4049
4119
  document.head.appendChild(tag);
4050
4120
  }
4051
4121
  var panel_module_css_default = {
4052
- "gallerySelectionClear": "rwa6qG_gallerySelectionClear",
4053
- "canvasHistoryTag": "rwa6qG_canvasHistoryTag",
4054
- "galleryFilterHeading": "rwa6qG_galleryFilterHeading",
4055
- "taskTrayChevron": "rwa6qG_taskTrayChevron",
4056
- "taskStatus": "rwa6qG_taskStatus",
4057
- "lightboxFigure": "rwa6qG_lightboxFigure",
4058
- "historyFilters": "rwa6qG_historyFilters",
4059
- "historyPrompt": "rwa6qG_historyPrompt",
4060
- "modelWrap": "rwa6qG_modelWrap",
4061
- "generateButton": "rwa6qG_generateButton",
4062
- "panelHeader": "rwa6qG_panelHeader",
4063
- "galleryBulkButton": "rwa6qG_galleryBulkButton",
4064
- "galleryFilter": "rwa6qG_galleryFilter",
4065
- "comparisonGrid": "rwa6qG_comparisonGrid",
4122
+ "grid": "rwa6qG_grid",
4123
+ "taskRow": "rwa6qG_taskRow",
4124
+ "spinner": "rwa6qG_spinner",
4125
+ "bigSpinner": "rwa6qG_bigSpinner",
4126
+ "taskRows": "rwa6qG_taskRows",
4127
+ "galleryTagEditor": "rwa6qG_galleryTagEditor",
4128
+ "compareToggle": "rwa6qG_compareToggle",
4129
+ "galleryCard": "rwa6qG_galleryCard",
4130
+ "galleryViewToggle": "rwa6qG_galleryViewToggle",
4131
+ "gallerySelectionBar": "rwa6qG_gallerySelectionBar",
4066
4132
  "galleryToolbarActions": "rwa6qG_galleryToolbarActions",
4067
- "historyItem": "rwa6qG_historyItem",
4068
- "comparisonImageButton": "rwa6qG_comparisonImageButton",
4069
- "galleryTags": "rwa6qG_galleryTags",
4070
- "panelHeading": "rwa6qG_panelHeading",
4071
- "canvas": "rwa6qG_canvas",
4072
- "historyThumb": "rwa6qG_historyThumb",
4073
- "galleryFilterCount": "rwa6qG_galleryFilterCount",
4074
- "galleryCardInfo": "rwa6qG_galleryCardInfo",
4075
- "prompt": "rwa6qG_prompt",
4076
- "gallerySearch": "rwa6qG_gallerySearch",
4077
- "modelSelect": "rwa6qG_modelSelect",
4078
- "history": "rwa6qG_history",
4079
- "lightboxNav": "rwa6qG_lightboxNav",
4080
- "historyEmpty": "rwa6qG_historyEmpty",
4081
- "enhanceButton": "rwa6qG_enhanceButton",
4082
- "galleryRatioList": "rwa6qG_galleryRatioList",
4083
- "lightboxActions": "rwa6qG_lightboxActions",
4133
+ "galleryImageButton": "rwa6qG_galleryImageButton",
4134
+ "galleryWorkspace": "rwa6qG_galleryWorkspace",
4084
4135
  "entryIcon": "rwa6qG_entryIcon",
4085
- "paramHint": "rwa6qG_paramHint",
4086
- "modelMenuList": "rwa6qG_modelMenuList",
4087
- "hiddenFile": "rwa6qG_hiddenFile",
4088
- "galleryHeading": "rwa6qG_galleryHeading",
4089
- "compareModelChoices": "rwa6qG_compareModelChoices",
4090
- "uploadIcon": "rwa6qG_uploadIcon",
4091
- "panelTitle": "rwa6qG_panelTitle",
4092
- "lightboxDownload": "rwa6qG_lightboxDownload",
4093
- "lightboxCaptionRow": "rwa6qG_lightboxCaptionRow",
4094
- "lightboxMeta": "rwa6qG_lightboxMeta",
4095
- "galleryToast": "rwa6qG_galleryToast",
4096
- "historyActions": "rwa6qG_historyActions",
4097
- "config": "rwa6qG_config",
4098
- "paramGroup": "rwa6qG_paramGroup",
4099
- "canvasError": "rwa6qG_canvasError",
4136
+ "entry": "rwa6qG_entry",
4137
+ "galleryBulkButton": "rwa6qG_galleryBulkButton",
4138
+ "historyInfo": "rwa6qG_historyInfo",
4100
4139
  "configGuideBody": "rwa6qG_configGuideBody",
4101
- "canvasStateHint": "rwa6qG_canvasStateHint",
4102
- "lightboxStage": "rwa6qG_lightboxStage",
4103
- "grid": "rwa6qG_grid",
4104
- "spinner": "rwa6qG_spinner",
4140
+ "paramLabel": "rwa6qG_paramLabel",
4141
+ "historyMeta": "rwa6qG_historyMeta",
4142
+ "canvasBody": "rwa6qG_canvasBody",
4143
+ "lightboxEdit": "rwa6qG_lightboxEdit",
4144
+ "galleryMasonry": "rwa6qG_galleryMasonry",
4145
+ "galleryTagEdit": "rwa6qG_galleryTagEdit",
4146
+ "uploadBox": "rwa6qG_uploadBox",
4147
+ "history": "rwa6qG_history",
4148
+ "footer": "rwa6qG_footer",
4149
+ "modelLabel": "rwa6qG_modelLabel",
4150
+ "updateBanner": "rwa6qG_updateBanner",
4151
+ "galleryFilter": "rwa6qG_galleryFilter",
4152
+ "galleryBadge": "rwa6qG_galleryBadge",
4153
+ "gallerySort": "rwa6qG_gallerySort",
4154
+ "historyClear": "rwa6qG_historyClear",
4155
+ "templatesButton": "rwa6qG_templatesButton",
4105
4156
  "lightbox": "rwa6qG_lightbox",
4106
- "modelMenuItem": "rwa6qG_modelMenuItem",
4157
+ "imageCard": "rwa6qG_imageCard",
4158
+ "historyEmpty": "rwa6qG_historyEmpty",
4107
4159
  "galleryRatio": "rwa6qG_galleryRatio",
4108
- "taskRow": "rwa6qG_taskRow",
4109
- "historyTitle": "rwa6qG_historyTitle",
4110
- "historyThumbPlaceholder": "rwa6qG_historyThumbPlaceholder",
4111
- "updateBanner": "rwa6qG_updateBanner",
4112
- "promptCount": "rwa6qG_promptCount",
4113
- "historyAction": "rwa6qG_historyAction",
4114
- "configGuide": "rwa6qG_configGuide",
4115
- "imageCaption": "rwa6qG_imageCaption",
4160
+ "taskTrayClose": "rwa6qG_taskTrayClose",
4116
4161
  "galleryToolbar": "rwa6qG_galleryToolbar",
4117
- "referenceImage": "rwa6qG_referenceImage",
4118
- "updateActions": "rwa6qG_updateActions",
4119
- "taskPrompt": "rwa6qG_taskPrompt",
4120
- "taskTrayHeader": "rwa6qG_taskTrayHeader",
4121
- "paramLabel": "rwa6qG_paramLabel",
4122
- "lightboxIndex": "rwa6qG_lightboxIndex",
4123
- "canvasEmptyIcon": "rwa6qG_canvasEmptyIcon",
4162
+ "lightboxScaleFrame": "rwa6qG_lightboxScaleFrame",
4163
+ "generateInner": "rwa6qG_generateInner",
4164
+ "historySearch": "rwa6qG_historySearch",
4165
+ "panelHeader": "rwa6qG_panelHeader",
4166
+ "canvas": "rwa6qG_canvas",
4167
+ "panelHeading": "rwa6qG_panelHeading",
4168
+ "dshImageGenToastIn": "rwa6qG_dshImageGenToastIn",
4169
+ "galleryHeading": "rwa6qG_galleryHeading",
4170
+ "compareControl": "rwa6qG_compareControl",
4171
+ "galleryCardFooter": "rwa6qG_galleryCardFooter",
4172
+ "canvasError": "rwa6qG_canvasError",
4173
+ "historyThumb": "rwa6qG_historyThumb",
4124
4174
  "galleryFilterDivider": "rwa6qG_galleryFilterDivider",
4125
- "promptFooter": "rwa6qG_promptFooter",
4126
- "galleryTagFilterList": "rwa6qG_galleryTagFilterList",
4127
- "gallerySort": "rwa6qG_gallerySort",
4128
- "lightboxCopy": "rwa6qG_lightboxCopy",
4129
- "compareToggle": "rwa6qG_compareToggle",
4130
- "galleryImageButton": "rwa6qG_galleryImageButton",
4131
- "download": "rwa6qG_download",
4132
- "bigSpinner": "rwa6qG_bigSpinner",
4133
- "image": "rwa6qG_image",
4134
- "optionGrid": "rwa6qG_optionGrid",
4135
- "footer": "rwa6qG_footer",
4136
- "uploadHint": "rwa6qG_uploadHint",
4137
- "updateRelease": "rwa6qG_updateRelease",
4138
- "canvasMeta": "rwa6qG_canvasMeta",
4139
- "lightboxClose": "rwa6qG_lightboxClose",
4140
- "modelMenu": "rwa6qG_modelMenu",
4175
+ "lightboxFigure": "rwa6qG_lightboxFigure",
4141
4176
  "lightboxTool": "rwa6qG_lightboxTool",
4142
- "historyInfo": "rwa6qG_historyInfo",
4143
- "comparisonFullscreen": "rwa6qG_comparisonFullscreen",
4144
- "historyHeader": "rwa6qG_historyHeader",
4145
- "zoomHint": "rwa6qG_zoomHint",
4177
+ "card": "rwa6qG_card",
4178
+ "gallerySelect": "rwa6qG_gallerySelect",
4146
4179
  "galleryRemove": "rwa6qG_galleryRemove",
4147
- "uploadBox": "rwa6qG_uploadBox",
4148
- "taskTray": "rwa6qG_taskTray",
4149
- "view": "rwa6qG_view",
4150
- "dshImageGenSpin": "rwa6qG_dshImageGenSpin",
4151
- "gallerySelectMode": "rwa6qG_gallerySelectMode",
4152
- "connectionStatus": "rwa6qG_connectionStatus",
4153
- "galleryWorkspace": "rwa6qG_galleryWorkspace",
4154
- "entry": "rwa6qG_entry",
4155
- "lightboxScaleFrame": "rwa6qG_lightboxScaleFrame",
4156
- "dshImageGenToastIn": "rwa6qG_dshImageGenToastIn",
4157
- "comparisonFullscreenGrid": "rwa6qG_comparisonFullscreenGrid",
4158
4180
  "galleryImage": "rwa6qG_galleryImage",
4159
- "taskTrayClose": "rwa6qG_taskTrayClose",
4160
- "galleryTagEditor": "rwa6qG_galleryTagEditor",
4161
- "galleryAdd": "rwa6qG_galleryAdd",
4162
- "card": "rwa6qG_card",
4163
- "referenceActions": "rwa6qG_referenceActions",
4164
- "imageCard": "rwa6qG_imageCard",
4165
- "galleryAvatar": "rwa6qG_galleryAvatar",
4166
- "updateText": "rwa6qG_updateText",
4167
- "historyMeta": "rwa6qG_historyMeta",
4168
- "canvasState": "rwa6qG_canvasState",
4169
- "studio": "rwa6qG_studio",
4170
- "historyClear": "rwa6qG_historyClear",
4171
- "entryLabel": "rwa6qG_entryLabel",
4172
- "lightboxZoomLevel": "rwa6qG_lightboxZoomLevel",
4173
- "galleryFilters": "rwa6qG_galleryFilters",
4174
- "galleryBadge": "rwa6qG_galleryBadge",
4175
- "galleryClear": "rwa6qG_galleryClear",
4176
- "historySearch": "rwa6qG_historySearch",
4181
+ "generateButton": "rwa6qG_generateButton",
4182
+ "taskTrayToggle": "rwa6qG_taskTrayToggle",
4183
+ "galleryFilterCount": "rwa6qG_galleryFilterCount",
4184
+ "modelSelect": "rwa6qG_modelSelect",
4177
4185
  "lightboxImage": "rwa6qG_lightboxImage",
4178
- "lightboxTools": "rwa6qG_lightboxTools",
4179
- "galleryMasonry": "rwa6qG_galleryMasonry",
4186
+ "modePill": "rwa6qG_modePill",
4187
+ "panel": "rwa6qG_panel",
4188
+ "prompt": "rwa6qG_prompt",
4189
+ "modeRow": "rwa6qG_modeRow",
4190
+ "gallerySelectMode": "rwa6qG_gallerySelectMode",
4191
+ "galleryCardInfo": "rwa6qG_galleryCardInfo",
4192
+ "galleryTags": "rwa6qG_galleryTags",
4193
+ "historyHeader": "rwa6qG_historyHeader",
4194
+ "lightboxClose": "rwa6qG_lightboxClose",
4195
+ "historyAction": "rwa6qG_historyAction",
4196
+ "comparisonFullscreenGrid": "rwa6qG_comparisonFullscreenGrid",
4197
+ "lightboxNav": "rwa6qG_lightboxNav",
4198
+ "galleryCount": "rwa6qG_galleryCount",
4199
+ "comparisonGrid": "rwa6qG_comparisonGrid",
4180
4200
  "canvasStateTitle": "rwa6qG_canvasStateTitle",
4181
- "compareControl": "rwa6qG_compareControl",
4182
4201
  "configScroll": "rwa6qG_configScroll",
4183
- "galleryTagFilter": "rwa6qG_galleryTagFilter",
4184
- "galleryFilterNote": "rwa6qG_galleryFilterNote",
4185
- "lightboxEdit": "rwa6qG_lightboxEdit",
4186
- "gallerySelect": "rwa6qG_gallerySelect",
4187
- "comparisonBoard": "rwa6qG_comparisonBoard",
4188
- "galleryCount": "rwa6qG_galleryCount",
4189
- "galleryTagInput": "rwa6qG_galleryTagInput",
4190
- "generateInner": "rwa6qG_generateInner",
4191
- "taskTrayToggle": "rwa6qG_taskTrayToggle",
4192
- "modelLabel": "rwa6qG_modelLabel",
4193
- "galleryTagEdit": "rwa6qG_galleryTagEdit",
4194
- "templatesButton": "rwa6qG_templatesButton",
4195
- "taskTrayCount": "rwa6qG_taskTrayCount",
4196
- "taskRows": "rwa6qG_taskRows",
4197
4202
  "optionRow": "rwa6qG_optionRow",
4203
+ "comparisonFullscreen": "rwa6qG_comparisonFullscreen",
4204
+ "canvasEmptyIcon": "rwa6qG_canvasEmptyIcon",
4205
+ "galleryFilterHeading": "rwa6qG_galleryFilterHeading",
4206
+ "historyActions": "rwa6qG_historyActions",
4207
+ "lightboxStage": "rwa6qG_lightboxStage",
4208
+ "image": "rwa6qG_image",
4209
+ "updateRelease": "rwa6qG_updateRelease",
4210
+ "taskTrayCount": "rwa6qG_taskTrayCount",
4211
+ "lightboxActions": "rwa6qG_lightboxActions",
4212
+ "taskPrompt": "rwa6qG_taskPrompt",
4198
4213
  "historyMain": "rwa6qG_historyMain",
4199
- "reference": "rwa6qG_reference",
4200
- "optionPill": "rwa6qG_optionPill",
4201
- "galleryViewToggle": "rwa6qG_galleryViewToggle",
4214
+ "hiddenFile": "rwa6qG_hiddenFile",
4215
+ "canvasMeta": "rwa6qG_canvasMeta",
4216
+ "configGuide": "rwa6qG_configGuide",
4217
+ "modelWrap": "rwa6qG_modelWrap",
4218
+ "promptFooter": "rwa6qG_promptFooter",
4219
+ "download": "rwa6qG_download",
4202
4220
  "historyList": "rwa6qG_historyList",
4203
- "modeRow": "rwa6qG_modeRow",
4204
- "galleryCardFooter": "rwa6qG_galleryCardFooter",
4221
+ "enhanceButton": "rwa6qG_enhanceButton",
4222
+ "paramGroup": "rwa6qG_paramGroup",
4223
+ "taskTrayHeader": "rwa6qG_taskTrayHeader",
4224
+ "galleryAdd": "rwa6qG_galleryAdd",
4225
+ "lightboxDownload": "rwa6qG_lightboxDownload",
4226
+ "updateActions": "rwa6qG_updateActions",
4227
+ "gallerySelectionClear": "rwa6qG_gallerySelectionClear",
4228
+ "galleryTagFilter": "rwa6qG_galleryTagFilter",
4229
+ "galleryTagInput": "rwa6qG_galleryTagInput",
4205
4230
  "connectionDot": "rwa6qG_connectionDot",
4206
- "galleryCard": "rwa6qG_galleryCard",
4207
- "panel": "rwa6qG_panel",
4208
- "canvasBody": "rwa6qG_canvasBody",
4231
+ "historyThumbPlaceholder": "rwa6qG_historyThumbPlaceholder",
4232
+ "comparisonImageButton": "rwa6qG_comparisonImageButton",
4233
+ "updateText": "rwa6qG_updateText",
4234
+ "uploadHint": "rwa6qG_uploadHint",
4235
+ "comparisonBoard": "rwa6qG_comparisonBoard",
4236
+ "galleryTagFilterList": "rwa6qG_galleryTagFilterList",
4209
4237
  "lightboxCaption": "rwa6qG_lightboxCaption",
4238
+ "lightboxIndex": "rwa6qG_lightboxIndex",
4210
4239
  "githubLink": "rwa6qG_githubLink",
4211
- "gallerySelectionBar": "rwa6qG_gallerySelectionBar",
4212
- "modePill": "rwa6qG_modePill"
4240
+ "entryLabel": "rwa6qG_entryLabel",
4241
+ "paramHint": "rwa6qG_paramHint",
4242
+ "panelTitle": "rwa6qG_panelTitle",
4243
+ "lightboxCopy": "rwa6qG_lightboxCopy",
4244
+ "galleryFilters": "rwa6qG_galleryFilters",
4245
+ "connectionStatus": "rwa6qG_connectionStatus",
4246
+ "gallerySearch": "rwa6qG_gallerySearch",
4247
+ "taskTray": "rwa6qG_taskTray",
4248
+ "lightboxCaptionRow": "rwa6qG_lightboxCaptionRow",
4249
+ "galleryRatioList": "rwa6qG_galleryRatioList",
4250
+ "galleryFilterNote": "rwa6qG_galleryFilterNote",
4251
+ "galleryClear": "rwa6qG_galleryClear",
4252
+ "promptCount": "rwa6qG_promptCount",
4253
+ "taskTrayChevron": "rwa6qG_taskTrayChevron",
4254
+ "galleryAvatar": "rwa6qG_galleryAvatar",
4255
+ "view": "rwa6qG_view",
4256
+ "dshImageGenSpin": "rwa6qG_dshImageGenSpin",
4257
+ "canvasState": "rwa6qG_canvasState",
4258
+ "historyItem": "rwa6qG_historyItem",
4259
+ "imageCaption": "rwa6qG_imageCaption",
4260
+ "taskStatus": "rwa6qG_taskStatus",
4261
+ "lightboxMeta": "rwa6qG_lightboxMeta",
4262
+ "modelMenu": "rwa6qG_modelMenu",
4263
+ "historyPrompt": "rwa6qG_historyPrompt",
4264
+ "modelMenuList": "rwa6qG_modelMenuList",
4265
+ "referenceImage": "rwa6qG_referenceImage",
4266
+ "compareModelChoices": "rwa6qG_compareModelChoices",
4267
+ "lightboxTools": "rwa6qG_lightboxTools",
4268
+ "studio": "rwa6qG_studio",
4269
+ "galleryToast": "rwa6qG_galleryToast",
4270
+ "historyTitle": "rwa6qG_historyTitle",
4271
+ "referenceActions": "rwa6qG_referenceActions",
4272
+ "optionPill": "rwa6qG_optionPill",
4273
+ "uploadIcon": "rwa6qG_uploadIcon",
4274
+ "optionGrid": "rwa6qG_optionGrid",
4275
+ "modelMenuItem": "rwa6qG_modelMenuItem",
4276
+ "reference": "rwa6qG_reference",
4277
+ "canvasStateHint": "rwa6qG_canvasStateHint",
4278
+ "zoomHint": "rwa6qG_zoomHint",
4279
+ "historyFilters": "rwa6qG_historyFilters",
4280
+ "lightboxZoomLevel": "rwa6qG_lightboxZoomLevel",
4281
+ "config": "rwa6qG_config",
4282
+ "canvasHistoryTag": "rwa6qG_canvasHistoryTag"
4213
4283
  };
4214
4284
  //#endregion
4215
4285
  //#region src/client/mount.tsx
@@ -4866,79 +4936,79 @@ window.__ModuleLoader__.load({
4866
4936
  document.head.appendChild(tag);
4867
4937
  }
4868
4938
  var settings_card_module_css_default = {
4869
- "customSettingsBody": "zmjoSq_customSettingsBody",
4870
- "channelName": "zmjoSq_channelName",
4871
- "candidate": "zmjoSq_candidate",
4872
- "editorHeader": "zmjoSq_editorHeader",
4873
- "channelEmpty": "zmjoSq_channelEmpty",
4874
4939
  "input": "zmjoSq_input",
4875
- "channelDotReady": "zmjoSq_channelDotReady",
4876
- "modelCategorySelect": "zmjoSq_modelCategorySelect",
4877
- "modelRowRemove": "zmjoSq_modelRowRemove",
4940
+ "channelAction": "zmjoSq_channelAction",
4941
+ "candidatePanel": "zmjoSq_candidatePanel",
4942
+ "candidateLabel": "zmjoSq_candidateLabel",
4943
+ "linkButton": "zmjoSq_linkButton",
4944
+ "channelEmpty": "zmjoSq_channelEmpty",
4945
+ "channelBadge": "zmjoSq_channelBadge",
4946
+ "channelDotWarn": "zmjoSq_channelDotWarn",
4947
+ "channelHost": "zmjoSq_channelHost",
4948
+ "deleteConfirmText": "zmjoSq_deleteConfirmText",
4949
+ "field": "zmjoSq_field",
4950
+ "channelMain": "zmjoSq_channelMain",
4951
+ "editorWrap": "zmjoSq_editorWrap",
4878
4952
  "candidateTitle": "zmjoSq_candidateTitle",
4879
- "name": "zmjoSq_name",
4953
+ "channelAddRow": "zmjoSq_channelAddRow",
4954
+ "modelCatalogTools": "zmjoSq_modelCatalogTools",
4955
+ "failed": "zmjoSq_failed",
4956
+ "select": "zmjoSq_select",
4957
+ "reset": "zmjoSq_reset",
4880
4958
  "modelCatalogMeta": "zmjoSq_modelCatalogMeta",
4881
4959
  "channelDanger": "zmjoSq_channelDanger",
4882
- "modelInput": "zmjoSq_modelInput",
4883
- "chevronOpen": "zmjoSq_chevronOpen",
4884
- "editorTitle": "zmjoSq_editorTitle",
4885
- "editorTag": "zmjoSq_editorTag",
4886
- "readOnly": "zmjoSq_readOnly",
4887
- "channelSection": "zmjoSq_channelSection",
4888
- "modelCatalog": "zmjoSq_modelCatalog",
4889
- "addModel": "zmjoSq_addModel",
4890
- "header": "zmjoSq_header",
4891
4960
  "modelRows": "zmjoSq_modelRows",
4892
- "candidatePanel": "zmjoSq_candidatePanel",
4893
- "link": "zmjoSq_link",
4894
- "card": "zmjoSq_card",
4895
4961
  "discard": "zmjoSq_discard",
4896
- "modelEmpty": "zmjoSq_modelEmpty",
4897
- "channelBadge": "zmjoSq_channelBadge",
4898
- "sectionTitle": "zmjoSq_sectionTitle",
4899
- "select": "zmjoSq_select",
4900
- "channelAdd": "zmjoSq_channelAdd",
4901
- "modelRow": "zmjoSq_modelRow",
4902
- "failed": "zmjoSq_failed",
4903
- "sectionHint": "zmjoSq_sectionHint",
4962
+ "modelCatalogHead": "zmjoSq_modelCatalogHead",
4963
+ "header": "zmjoSq_header",
4964
+ "headText": "zmjoSq_headText",
4965
+ "editorFooter": "zmjoSq_editorFooter",
4966
+ "modelCatalogTitle": "zmjoSq_modelCatalogTitle",
4967
+ "editorHeader": "zmjoSq_editorHeader",
4968
+ "channelName": "zmjoSq_channelName",
4969
+ "name": "zmjoSq_name",
4970
+ "modelCategorySelect": "zmjoSq_modelCategorySelect",
4971
+ "customSettings": "zmjoSq_customSettings",
4972
+ "editorTag": "zmjoSq_editorTag",
4973
+ "candidateHead": "zmjoSq_candidateHead",
4974
+ "pending": "zmjoSq_pending",
4975
+ "channelRow": "zmjoSq_channelRow",
4976
+ "candidateList": "zmjoSq_candidateList",
4977
+ "card": "zmjoSq_card",
4978
+ "chevronOpen": "zmjoSq_chevronOpen",
4979
+ "candidateActions": "zmjoSq_candidateActions",
4904
4980
  "channelMeta": "zmjoSq_channelMeta",
4905
- "candidateLabel": "zmjoSq_candidateLabel",
4981
+ "readOnly": "zmjoSq_readOnly",
4906
4982
  "modelBadge": "zmjoSq_modelBadge",
4907
4983
  "detectOk": "zmjoSq_detectOk",
4908
- "channelList": "zmjoSq_channelList",
4909
- "candidateHead": "zmjoSq_candidateHead",
4910
- "channelEditor": "zmjoSq_channelEditor",
4984
+ "link": "zmjoSq_link",
4911
4985
  "footer": "zmjoSq_footer",
4912
- "linkButton": "zmjoSq_linkButton",
4913
- "reset": "zmjoSq_reset",
4914
- "channelAddRow": "zmjoSq_channelAddRow",
4915
- "headText": "zmjoSq_headText",
4916
- "editorWrap": "zmjoSq_editorWrap",
4917
- "candidateList": "zmjoSq_candidateList",
4918
- "field": "zmjoSq_field",
4919
- "head": "zmjoSq_head",
4920
- "channelHost": "zmjoSq_channelHost",
4921
- "chevron": "zmjoSq_chevron",
4922
- "modelCatalogTools": "zmjoSq_modelCatalogTools",
4923
- "candidateId": "zmjoSq_candidateId",
4924
- "channelRow": "zmjoSq_channelRow",
4925
- "pending": "zmjoSq_pending",
4926
- "candidateActions": "zmjoSq_candidateActions",
4927
- "deleteConfirmText": "zmjoSq_deleteConfirmText",
4928
- "editorFooter": "zmjoSq_editorFooter",
4986
+ "addModel": "zmjoSq_addModel",
4987
+ "modelRow": "zmjoSq_modelRow",
4988
+ "channelList": "zmjoSq_channelList",
4929
4989
  "sectionHeader": "zmjoSq_sectionHeader",
4990
+ "channelAdd": "zmjoSq_channelAdd",
4991
+ "modelRowRemove": "zmjoSq_modelRowRemove",
4992
+ "customSettingsSummary": "zmjoSq_customSettingsSummary",
4993
+ "channelSection": "zmjoSq_channelSection",
4994
+ "candidateId": "zmjoSq_candidateId",
4930
4995
  "save": "zmjoSq_save",
4931
- "modelCatalogHead": "zmjoSq_modelCatalogHead",
4932
- "channelDotWarn": "zmjoSq_channelDotWarn",
4996
+ "sectionTitle": "zmjoSq_sectionTitle",
4997
+ "modelArrow": "zmjoSq_modelArrow",
4998
+ "candidate": "zmjoSq_candidate",
4933
4999
  "label": "zmjoSq_label",
5000
+ "channelEditor": "zmjoSq_channelEditor",
5001
+ "sectionHint": "zmjoSq_sectionHint",
4934
5002
  "body": "zmjoSq_body",
4935
- "customSettingsSummary": "zmjoSq_customSettingsSummary",
4936
- "modelCatalogTitle": "zmjoSq_modelCatalogTitle",
4937
- "description": "zmjoSq_description",
4938
- "channelMain": "zmjoSq_channelMain",
4939
- "modelArrow": "zmjoSq_modelArrow",
4940
- "channelAction": "zmjoSq_channelAction",
4941
- "customSettings": "zmjoSq_customSettings"
5003
+ "channelDotReady": "zmjoSq_channelDotReady",
5004
+ "head": "zmjoSq_head",
5005
+ "editorTitle": "zmjoSq_editorTitle",
5006
+ "customSettingsBody": "zmjoSq_customSettingsBody",
5007
+ "modelEmpty": "zmjoSq_modelEmpty",
5008
+ "modelInput": "zmjoSq_modelInput",
5009
+ "chevron": "zmjoSq_chevron",
5010
+ "modelCatalog": "zmjoSq_modelCatalog",
5011
+ "description": "zmjoSq_description"
4942
5012
  };
4943
5013
  //#endregion
4944
5014
  //#region src/client/SettingsCard.tsx
@@ -4967,7 +5037,8 @@ window.__ModuleLoader__.load({
4967
5037
  booleanField("allowAgentAudioGeneration"),
4968
5038
  textField("defaultModel"),
4969
5039
  booleanField("autoSaveToLibrary"),
4970
- textField("maxConcurrentGenerations")
5040
+ textField("maxConcurrentGenerations"),
5041
+ textField("enhanceModel")
4971
5042
  ]);
4972
5043
  this.channelsForm = new ChannelsForm(scope);
4973
5044
  }
@@ -4982,7 +5053,8 @@ window.__ModuleLoader__.load({
4982
5053
  allowAgentAudioGeneration: this.form.field("allowAgentAudioGeneration"),
4983
5054
  defaultModel: this.form.field("defaultModel"),
4984
5055
  autoSaveToLibrary: this.form.field("autoSaveToLibrary"),
4985
- maxConcurrentGenerations: this.form.field("maxConcurrentGenerations")
5056
+ maxConcurrentGenerations: this.form.field("maxConcurrentGenerations"),
5057
+ enhanceModel: this.form.field("enhanceModel")
4986
5058
  };
4987
5059
  }
4988
5060
  inject() {
@@ -5326,6 +5398,10 @@ window.__ModuleLoader__.load({
5326
5398
  onAdopt: () => adoptCandidates(),
5327
5399
  onCloseCandidates: closeCandidates
5328
5400
  }),
5401
+ /stability/i.test(`${props.channel?.preset ?? invited?.id ?? presetId}|${url}`) ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
5402
+ className: settings_card_module_css_default.sectionHint,
5403
+ children: t("channel.stabilityHint")
5404
+ }) : null,
5329
5405
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("label", {
5330
5406
  className: settings_card_module_css_default.field,
5331
5407
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
@@ -5414,7 +5490,17 @@ window.__ModuleLoader__.load({
5414
5490
  disabled: !writable,
5415
5491
  onChange: (event) => props.onPatchModel(index, { id: event.target.value })
5416
5492
  }),
5417
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("select", {
5493
+ /^stable-audio-/i.test(model.id) ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("select", {
5494
+ className: `${settings_card_module_css_default.select} ${settings_card_module_css_default.modelCategorySelect}`,
5495
+ value: "__stable-dual__",
5496
+ "aria-label": `${t("channel.modelCategory")} ${index + 1}`,
5497
+ disabled: true,
5498
+ title: t("channel.category.stableDualHint"),
5499
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
5500
+ value: "__stable-dual__",
5501
+ children: t("channel.category.stableDual")
5502
+ })
5503
+ }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("select", {
5418
5504
  className: `${settings_card_module_css_default.select} ${settings_card_module_css_default.modelCategorySelect}`,
5419
5505
  value: model.category ?? "",
5420
5506
  "aria-label": `${t("channel.modelCategory")} ${index + 1}`,
@@ -5525,6 +5611,8 @@ window.__ModuleLoader__.load({
5525
5611
  const [presetLoading, setPresetLoading] = (0, react.useState)(false);
5526
5612
  const [presetError, setPresetError] = (0, react.useState)(null);
5527
5613
  const [confirmDeleteId, setConfirmDeleteId] = (0, react.useState)(null);
5614
+ const [llmModels, setLlmModels] = (0, react.useState)(null);
5615
+ const [llmModelsError, setLlmModelsError] = (0, react.useState)(null);
5528
5616
  const channels = state.channels.channels;
5529
5617
  const editingChannel = editor !== null && editor.kind === "edit" ? channels.find((channel) => channel.id === editor.channelId) : void 0;
5530
5618
  (0, react.useEffect)(() => {
@@ -5543,6 +5631,18 @@ window.__ModuleLoader__.load({
5543
5631
  presetError,
5544
5632
  presetLoading
5545
5633
  ]);
5634
+ (0, react.useEffect)(() => {
5635
+ if (!open || llmModels !== null || llmModelsError !== null) return;
5636
+ fetch(LLM_MODELS_API, { method: "POST" }).then(async (response) => {
5637
+ const body = await response.json();
5638
+ if (!response.ok || body.ok !== true || body.providers === void 0) throw new Error(body.message ?? `HTTP ${response.status}`);
5639
+ setLlmModels(body.providers);
5640
+ }).catch((error) => setLlmModelsError(error instanceof Error ? error.message : String(error)));
5641
+ }, [
5642
+ open,
5643
+ llmModels,
5644
+ llmModelsError
5645
+ ]);
5546
5646
  if (!state.available) return null;
5547
5647
  const blocked = !state.dirty || state.invalid || state.saving || state.channels.saving;
5548
5648
  const closeEditor = () => {
@@ -5757,6 +5857,47 @@ window.__ModuleLoader__.load({
5757
5857
  }) : null
5758
5858
  ]
5759
5859
  }),
5860
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
5861
+ className: settings_card_module_css_default.field,
5862
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
5863
+ className: settings_card_module_css_default.label,
5864
+ children: [
5865
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("settings.enhanceModel") }),
5866
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("select", {
5867
+ className: settings_card_module_css_default.select,
5868
+ value: state.enhanceModel.text,
5869
+ disabled: !state.writable,
5870
+ onChange: (event) => props.edit("enhanceModel", event.target.value),
5871
+ children: [
5872
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
5873
+ value: "",
5874
+ children: t("settings.enhanceModelDefault")
5875
+ }),
5876
+ llmModels !== null ? llmModels.map((option) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
5877
+ value: `${option.provider}|${option.id}`,
5878
+ children: `${option.providerName} — ${option.name}${option.name !== option.id ? `(${option.id})` : ""}`
5879
+ }, `${option.provider}|${option.id}`)) : null,
5880
+ llmModels !== null && state.enhanceModel.text !== "" && !llmModels.some((option) => `${option.provider}|${option.id}` === state.enhanceModel.text) ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
5881
+ value: state.enhanceModel.text,
5882
+ children: state.enhanceModel.text
5883
+ }) : null
5884
+ ]
5885
+ }),
5886
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
5887
+ className: settings_card_module_css_default.sectionHint,
5888
+ children: t("settings.enhanceModelHint")
5889
+ }),
5890
+ llmModelsError !== null ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
5891
+ className: settings_card_module_css_default.failed,
5892
+ children: [
5893
+ t("settings.enhanceModelFailed"),
5894
+ ":",
5895
+ llmModelsError
5896
+ ]
5897
+ }) : null
5898
+ ]
5899
+ })
5900
+ }),
5760
5901
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
5761
5902
  className: settings_card_module_css_default.field,
5762
5903
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
@@ -5883,17 +6024,17 @@ window.__ModuleLoader__.load({
5883
6024
  document.head.appendChild(tag);
5884
6025
  }
5885
6026
  var audio_toolview_module_css_default = {
5886
- "root": "_7K1QKa_root",
5887
6027
  "audios": "_7K1QKa_audios",
5888
- "audioRow": "_7K1QKa_audioRow",
5889
- "download": "_7K1QKa_download",
5890
- "empty": "_7K1QKa_empty",
6028
+ "icon": "_7K1QKa_icon",
5891
6029
  "message": "_7K1QKa_message",
5892
6030
  "error": "_7K1QKa_error",
5893
6031
  "header": "_7K1QKa_header",
5894
- "icon": "_7K1QKa_icon",
6032
+ "download": "_7K1QKa_download",
6033
+ "audioRow": "_7K1QKa_audioRow",
6034
+ "root": "_7K1QKa_root",
5895
6035
  "status": "_7K1QKa_status",
5896
- "audio": "_7K1QKa_audio"
6036
+ "audio": "_7K1QKa_audio",
6037
+ "empty": "_7K1QKa_empty"
5897
6038
  };
5898
6039
  //#endregion
5899
6040
  //#region src/client/audio-toolview.tsx