dsh-audiogen 0.4.6 → 0.4.7
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 +474 -352
- package/lib/client.js.map +1 -1
- package/lib/index.js +93 -8
- package/package.json +1 -1
- package/src/client/SettingsCard.tsx +73 -15
- package/src/client/locales.ts +14 -0
- package/src/client/settings-scope.ts +2 -0
- package/src/client/studio-view.tsx +38 -6
- package/src/index.ts +56 -3
- package/src/prompt-enhance.ts +36 -6
- package/src/protocol.ts +16 -1
- package/src/routes.ts +18 -2
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
|
-
"
|
|
1172
|
-
"
|
|
1173
|
-
"
|
|
1187
|
+
"modeRow": "Oo1fpq_modeRow",
|
|
1188
|
+
"trackKnob": "Oo1fpq_trackKnob",
|
|
1189
|
+
"enhanceActionsRow": "Oo1fpq_enhanceActionsRow",
|
|
1190
|
+
"player": "Oo1fpq_player",
|
|
1191
|
+
"historyTime": "Oo1fpq_historyTime",
|
|
1192
|
+
"primaryButton": "Oo1fpq_primaryButton",
|
|
1193
|
+
"resultEmpty": "Oo1fpq_resultEmpty",
|
|
1194
|
+
"taskList": "Oo1fpq_taskList",
|
|
1195
|
+
"modelCheckList": "Oo1fpq_modelCheckList",
|
|
1196
|
+
"modeIcon": "Oo1fpq_modeIcon",
|
|
1197
|
+
"playButton": "Oo1fpq_playButton",
|
|
1198
|
+
"fieldFull": "Oo1fpq_fieldFull",
|
|
1199
|
+
"formSection": "Oo1fpq_formSection",
|
|
1200
|
+
"modeButton": "Oo1fpq_modeButton",
|
|
1201
|
+
"tab": "Oo1fpq_tab",
|
|
1202
|
+
"taskActions": "Oo1fpq_taskActions",
|
|
1203
|
+
"audioCardIndex": "Oo1fpq_audioCardIndex",
|
|
1204
|
+
"resultModeChip": "Oo1fpq_resultModeChip",
|
|
1205
|
+
"audioCard": "Oo1fpq_audioCard",
|
|
1206
|
+
"select": "Oo1fpq_select",
|
|
1207
|
+
"overrideCellHead": "Oo1fpq_overrideCellHead",
|
|
1208
|
+
"formSectionRow": "Oo1fpq_formSectionRow",
|
|
1209
|
+
"historyList": "Oo1fpq_historyList",
|
|
1210
|
+
"muteButton": "Oo1fpq_muteButton",
|
|
1211
|
+
"resultEmptyIcon": "Oo1fpq_resultEmptyIcon",
|
|
1174
1212
|
"resultGroups": "Oo1fpq_resultGroups",
|
|
1175
|
-
"
|
|
1213
|
+
"resultGroupChip": "Oo1fpq_resultGroupChip",
|
|
1214
|
+
"taskCard": "Oo1fpq_taskCard",
|
|
1215
|
+
"compareChips": "Oo1fpq_compareChips",
|
|
1216
|
+
"ghostButton": "Oo1fpq_ghostButton",
|
|
1217
|
+
"historyHeader": "Oo1fpq_historyHeader",
|
|
1218
|
+
"iconButton": "Oo1fpq_iconButton",
|
|
1176
1219
|
"trackFill": "Oo1fpq_trackFill",
|
|
1177
|
-
"
|
|
1178
|
-
"
|
|
1179
|
-
"
|
|
1220
|
+
"textarea": "Oo1fpq_textarea",
|
|
1221
|
+
"historyCol": "Oo1fpq_historyCol",
|
|
1222
|
+
"overrideCell": "Oo1fpq_overrideCell",
|
|
1223
|
+
"resultGroupError": "Oo1fpq_resultGroupError",
|
|
1224
|
+
"label": "Oo1fpq_label",
|
|
1180
1225
|
"historyAction": "Oo1fpq_historyAction",
|
|
1181
|
-
"
|
|
1182
|
-
"
|
|
1183
|
-
"
|
|
1184
|
-
"
|
|
1226
|
+
"historyPrompt": "Oo1fpq_historyPrompt",
|
|
1227
|
+
"audioCardHead": "Oo1fpq_audioCardHead",
|
|
1228
|
+
"compareGroup": "Oo1fpq_compareGroup",
|
|
1229
|
+
"voiceIdChip": "Oo1fpq_voiceIdChip",
|
|
1230
|
+
"compareGroupHead": "Oo1fpq_compareGroupHead",
|
|
1231
|
+
"modalFoot": "Oo1fpq_modalFoot",
|
|
1185
1232
|
"secondaryButton": "Oo1fpq_secondaryButton",
|
|
1186
|
-
"
|
|
1187
|
-
"
|
|
1188
|
-
"
|
|
1189
|
-
"
|
|
1190
|
-
"historyActions": "Oo1fpq_historyActions",
|
|
1191
|
-
"playButton": "Oo1fpq_playButton",
|
|
1233
|
+
"compareBox": "Oo1fpq_compareBox",
|
|
1234
|
+
"taskHead": "Oo1fpq_taskHead",
|
|
1235
|
+
"taskLabel": "Oo1fpq_taskLabel",
|
|
1236
|
+
"header": "Oo1fpq_header",
|
|
1192
1237
|
"modalHead": "Oo1fpq_modalHead",
|
|
1193
|
-
"
|
|
1194
|
-
"
|
|
1195
|
-
"
|
|
1196
|
-
"
|
|
1238
|
+
"audioCardActions": "Oo1fpq_audioCardActions",
|
|
1239
|
+
"historyCompareSummary": "Oo1fpq_historyCompareSummary",
|
|
1240
|
+
"overrideOnly": "Oo1fpq_overrideOnly",
|
|
1241
|
+
"overrideDash": "Oo1fpq_overrideDash",
|
|
1242
|
+
"enhanceCardHead": "Oo1fpq_enhanceCardHead",
|
|
1243
|
+
"panel": "Oo1fpq_panel",
|
|
1244
|
+
"compareState": "Oo1fpq_compareState",
|
|
1245
|
+
"formFields": "Oo1fpq_formFields",
|
|
1246
|
+
"savedChip": "Oo1fpq_savedChip",
|
|
1247
|
+
"taskBar": "Oo1fpq_taskBar",
|
|
1197
1248
|
"studio": "Oo1fpq_studio",
|
|
1198
|
-
"
|
|
1199
|
-
"
|
|
1200
|
-
"resultGroup": "Oo1fpq_resultGroup",
|
|
1201
|
-
"title": "Oo1fpq_title",
|
|
1249
|
+
"advanced": "Oo1fpq_advanced",
|
|
1250
|
+
"checkbox": "Oo1fpq_checkbox",
|
|
1202
1251
|
"historyClear": "Oo1fpq_historyClear",
|
|
1203
|
-
"
|
|
1204
|
-
"
|
|
1252
|
+
"modalMask": "Oo1fpq_modalMask",
|
|
1253
|
+
"overrideRow": "Oo1fpq_overrideRow",
|
|
1254
|
+
"row": "Oo1fpq_row",
|
|
1255
|
+
"resultEmptyHint": "Oo1fpq_resultEmptyHint",
|
|
1256
|
+
"input": "Oo1fpq_input",
|
|
1257
|
+
"historyEmpty": "Oo1fpq_historyEmpty",
|
|
1258
|
+
"formRow": "Oo1fpq_formRow",
|
|
1259
|
+
"historyCompareBadge": "Oo1fpq_historyCompareBadge",
|
|
1205
1260
|
"playerCompact": "Oo1fpq_playerCompact",
|
|
1206
|
-
"
|
|
1207
|
-
"
|
|
1261
|
+
"hint": "Oo1fpq_hint",
|
|
1262
|
+
"compareModelName": "Oo1fpq_compareModelName",
|
|
1208
1263
|
"historyTabCount": "Oo1fpq_historyTabCount",
|
|
1209
|
-
"
|
|
1210
|
-
"resultGroupChip": "Oo1fpq_resultGroupChip",
|
|
1211
|
-
"toast": "Oo1fpq_toast",
|
|
1212
|
-
"voiceIdChip": "Oo1fpq_voiceIdChip",
|
|
1213
|
-
"savedChip": "Oo1fpq_savedChip",
|
|
1214
|
-
"compareGroup": "Oo1fpq_compareGroup",
|
|
1215
|
-
"overrideCellHead": "Oo1fpq_overrideCellHead",
|
|
1216
|
-
"audioCardHead": "Oo1fpq_audioCardHead",
|
|
1217
|
-
"input": "Oo1fpq_input",
|
|
1264
|
+
"historyIcon": "Oo1fpq_historyIcon",
|
|
1218
1265
|
"modalBody": "Oo1fpq_modalBody",
|
|
1219
|
-
"
|
|
1220
|
-
"
|
|
1221
|
-
"
|
|
1222
|
-
"
|
|
1223
|
-
"
|
|
1224
|
-
"
|
|
1225
|
-
"
|
|
1226
|
-
"taskActions": "Oo1fpq_taskActions",
|
|
1227
|
-
"historyTime": "Oo1fpq_historyTime",
|
|
1228
|
-
"resultGroupHead": "Oo1fpq_resultGroupHead",
|
|
1229
|
-
"compareGroupHead": "Oo1fpq_compareGroupHead",
|
|
1266
|
+
"modal": "Oo1fpq_modal",
|
|
1267
|
+
"tabs": "Oo1fpq_tabs",
|
|
1268
|
+
"resultGroup": "Oo1fpq_resultGroup",
|
|
1269
|
+
"taskStatus": "Oo1fpq_taskStatus",
|
|
1270
|
+
"historyActions": "Oo1fpq_historyActions",
|
|
1271
|
+
"generate": "Oo1fpq_generate",
|
|
1272
|
+
"compareBoard": "Oo1fpq_compareBoard",
|
|
1230
1273
|
"error": "Oo1fpq_error",
|
|
1231
|
-
"
|
|
1232
|
-
"taskBar": "Oo1fpq_taskBar",
|
|
1233
|
-
"header": "Oo1fpq_header",
|
|
1234
|
-
"track": "Oo1fpq_track",
|
|
1274
|
+
"historyTabs": "Oo1fpq_historyTabs",
|
|
1235
1275
|
"formCol": "Oo1fpq_formCol",
|
|
1236
|
-
"
|
|
1237
|
-
"muteButton": "Oo1fpq_muteButton",
|
|
1238
|
-
"taskHead": "Oo1fpq_taskHead",
|
|
1276
|
+
"historyItem": "Oo1fpq_historyItem",
|
|
1239
1277
|
"historyTitle": "Oo1fpq_historyTitle",
|
|
1240
|
-
"historyModelRow": "Oo1fpq_historyModelRow",
|
|
1241
|
-
"modelCheckList": "Oo1fpq_modelCheckList",
|
|
1242
|
-
"formSectionRow": "Oo1fpq_formSectionRow",
|
|
1243
|
-
"generate": "Oo1fpq_generate",
|
|
1244
|
-
"audioCard": "Oo1fpq_audioCard",
|
|
1245
|
-
"compareState": "Oo1fpq_compareState",
|
|
1246
|
-
"audioCardIndex": "Oo1fpq_audioCardIndex",
|
|
1247
|
-
"historyTabs": "Oo1fpq_historyTabs",
|
|
1248
1278
|
"historyTab": "Oo1fpq_historyTab",
|
|
1249
|
-
"
|
|
1250
|
-
"
|
|
1251
|
-
"audioList": "Oo1fpq_audioList",
|
|
1252
|
-
"taskLabel": "Oo1fpq_taskLabel",
|
|
1253
|
-
"resultModeChip": "Oo1fpq_resultModeChip",
|
|
1254
|
-
"historyPrompt": "Oo1fpq_historyPrompt",
|
|
1279
|
+
"overrideTable": "Oo1fpq_overrideTable",
|
|
1280
|
+
"toast": "Oo1fpq_toast",
|
|
1255
1281
|
"enhanceCard": "Oo1fpq_enhanceCard",
|
|
1256
|
-
"
|
|
1257
|
-
"
|
|
1282
|
+
"time": "Oo1fpq_time",
|
|
1283
|
+
"title": "Oo1fpq_title",
|
|
1284
|
+
"historyMeta": "Oo1fpq_historyMeta",
|
|
1285
|
+
"resultGroupHead": "Oo1fpq_resultGroupHead",
|
|
1286
|
+
"historyModelRow": "Oo1fpq_historyModelRow",
|
|
1258
1287
|
"resultMeta": "Oo1fpq_resultMeta",
|
|
1259
|
-
"
|
|
1260
|
-
"
|
|
1261
|
-
"
|
|
1262
|
-
"
|
|
1263
|
-
"
|
|
1264
|
-
"modeRow": "Oo1fpq_modeRow",
|
|
1265
|
-
"formFields": "Oo1fpq_formFields",
|
|
1288
|
+
"audioList": "Oo1fpq_audioList",
|
|
1289
|
+
"compareChip": "Oo1fpq_compareChip",
|
|
1290
|
+
"fieldCell": "Oo1fpq_fieldCell",
|
|
1291
|
+
"audiogenToastIn": "Oo1fpq_audiogenToastIn",
|
|
1292
|
+
"track": "Oo1fpq_track",
|
|
1266
1293
|
"enhanceActions": "Oo1fpq_enhanceActions",
|
|
1267
|
-
"
|
|
1268
|
-
"
|
|
1269
|
-
"compareBox": "Oo1fpq_compareBox",
|
|
1270
|
-
"formRow": "Oo1fpq_formRow",
|
|
1271
|
-
"hint": "Oo1fpq_hint",
|
|
1272
|
-
"compareBoard": "Oo1fpq_compareBoard",
|
|
1273
|
-
"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"
|
|
1294
|
+
"resultGroupCount": "Oo1fpq_resultGroupCount",
|
|
1295
|
+
"resultCol": "Oo1fpq_resultCol"
|
|
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
|
-
|
|
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
|
|
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 ?? "";
|
|
@@ -2074,7 +2120,10 @@ window.__ModuleLoader__.load({
|
|
|
2074
2120
|
const bool = (key) => typeof params[key] === "boolean" ? params[key] : void 0;
|
|
2075
2121
|
setMode(modeValue);
|
|
2076
2122
|
const promptValue = str("prompt");
|
|
2077
|
-
if (promptValue !== void 0)
|
|
2123
|
+
if (promptValue !== void 0) setPromptByMode((current) => current[modeValue] === promptValue ? current : {
|
|
2124
|
+
...current,
|
|
2125
|
+
[modeValue]: promptValue
|
|
2126
|
+
});
|
|
2078
2127
|
const modelValue = str("model") ?? singleModel;
|
|
2079
2128
|
if (modelValue !== "") setModel(modelValue);
|
|
2080
2129
|
if (compareModelsRestore !== void 0 && compareModelsRestore.length > 0) {
|
|
@@ -2525,6 +2574,8 @@ window.__ModuleLoader__.load({
|
|
|
2525
2574
|
}, [entries]);
|
|
2526
2575
|
const needModel = mode !== "voice_design";
|
|
2527
2576
|
const runningCount = tasks.filter((task) => task.status === "running").length;
|
|
2577
|
+
/** 结果列只显示当前模式的任务(历史面板已按模式分组)。 */
|
|
2578
|
+
const visibleTasks = (0, react.useMemo)(() => tasks.filter((task) => task.mode === mode), [tasks, mode]);
|
|
2528
2579
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
2529
2580
|
className: audio_panel_module_css_default.studio,
|
|
2530
2581
|
children: [
|
|
@@ -2766,7 +2817,7 @@ window.__ModuleLoader__.load({
|
|
|
2766
2817
|
label: group.channelName,
|
|
2767
2818
|
children: group.models.map((item) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
|
|
2768
2819
|
value: item.alias,
|
|
2769
|
-
children: item.alias
|
|
2820
|
+
children: /^stable-audio-/i.test(item.alias) ? `${item.alias} · 音乐/音效` : item.alias
|
|
2770
2821
|
}, item.alias))
|
|
2771
2822
|
}, group.channelId))]
|
|
2772
2823
|
})]
|
|
@@ -2821,7 +2872,7 @@ window.__ModuleLoader__.load({
|
|
|
2821
2872
|
children: [error !== null ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
2822
2873
|
className: audio_panel_module_css_default.error,
|
|
2823
2874
|
children: error
|
|
2824
|
-
}) : null,
|
|
2875
|
+
}) : null, visibleTasks.length === 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
2825
2876
|
className: audio_panel_module_css_default.resultEmpty,
|
|
2826
2877
|
children: [
|
|
2827
2878
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
@@ -2849,7 +2900,7 @@ window.__ModuleLoader__.load({
|
|
|
2849
2900
|
]
|
|
2850
2901
|
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
2851
2902
|
className: audio_panel_module_css_default.taskList,
|
|
2852
|
-
children:
|
|
2903
|
+
children: visibleTasks.map((task) => {
|
|
2853
2904
|
const elapsed = task.finishedAt !== void 0 ? Math.round((task.finishedAt - task.startedAt) / 1e3) : Math.round((Date.now() - task.startedAt) / 1e3);
|
|
2854
2905
|
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
2906
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
@@ -3121,62 +3172,62 @@ window.__ModuleLoader__.load({
|
|
|
3121
3172
|
document.head.appendChild(tag);
|
|
3122
3173
|
}
|
|
3123
3174
|
var library_module_css_default = {
|
|
3175
|
+
"drawerPlayerName": "vzUV2a_drawerPlayerName",
|
|
3124
3176
|
"stateNote": "vzUV2a_stateNote",
|
|
3125
|
-
"paramsDetails": "vzUV2a_paramsDetails",
|
|
3126
|
-
"cardCheck": "vzUV2a_cardCheck",
|
|
3127
|
-
"chip": "vzUV2a_chip",
|
|
3128
|
-
"listActions": "vzUV2a_listActions",
|
|
3129
|
-
"drawerActions": "vzUV2a_drawerActions",
|
|
3130
|
-
"dangerBtn": "vzUV2a_dangerBtn",
|
|
3131
|
-
"emptyIcon": "vzUV2a_emptyIcon",
|
|
3132
|
-
"grid": "vzUV2a_grid",
|
|
3133
3177
|
"cardName": "vzUV2a_cardName",
|
|
3134
|
-
"
|
|
3178
|
+
"filterLabel": "vzUV2a_filterLabel",
|
|
3179
|
+
"audiogenDrawerIn": "vzUV2a_audiogenDrawerIn",
|
|
3135
3180
|
"cardTime": "vzUV2a_cardTime",
|
|
3136
|
-
"
|
|
3137
|
-
"drawerBody": "vzUV2a_drawerBody",
|
|
3138
|
-
"input": "vzUV2a_input",
|
|
3139
|
-
"filterRow": "vzUV2a_filterRow",
|
|
3140
|
-
"drawerField": "vzUV2a_drawerField",
|
|
3181
|
+
"drawerSection": "vzUV2a_drawerSection",
|
|
3141
3182
|
"textarea": "vzUV2a_textarea",
|
|
3142
|
-
"primaryBtn": "vzUV2a_primaryBtn",
|
|
3143
|
-
"listCount": "vzUV2a_listCount",
|
|
3144
|
-
"drawerPlayerName": "vzUV2a_drawerPlayerName",
|
|
3145
3183
|
"provValue": "vzUV2a_provValue",
|
|
3146
|
-
"
|
|
3147
|
-
"
|
|
3148
|
-
"code": "vzUV2a_code",
|
|
3149
|
-
"drawer": "vzUV2a_drawer",
|
|
3150
|
-
"smallSelect": "vzUV2a_smallSelect",
|
|
3151
|
-
"filterLabel": "vzUV2a_filterLabel",
|
|
3152
|
-
"smallChip": "vzUV2a_smallChip",
|
|
3153
|
-
"drawerTitle": "vzUV2a_drawerTitle",
|
|
3154
|
-
"drawerSection": "vzUV2a_drawerSection",
|
|
3184
|
+
"drawerActions": "vzUV2a_drawerActions",
|
|
3185
|
+
"searchBox": "vzUV2a_searchBox",
|
|
3155
3186
|
"chipCount": "vzUV2a_chipCount",
|
|
3156
|
-
"drawerLabel": "vzUV2a_drawerLabel",
|
|
3157
|
-
"drawerPlayerList": "vzUV2a_drawerPlayerList",
|
|
3158
|
-
"mono": "vzUV2a_mono",
|
|
3159
3187
|
"listHead": "vzUV2a_listHead",
|
|
3188
|
+
"listCount": "vzUV2a_listCount",
|
|
3189
|
+
"drawerPlayerList": "vzUV2a_drawerPlayerList",
|
|
3190
|
+
"drawerSplit": "vzUV2a_drawerSplit",
|
|
3191
|
+
"provKey": "vzUV2a_provKey",
|
|
3192
|
+
"drawerMask": "vzUV2a_drawerMask",
|
|
3193
|
+
"filterRow": "vzUV2a_filterRow",
|
|
3160
3194
|
"cardHead": "vzUV2a_cardHead",
|
|
3161
|
-
"
|
|
3162
|
-
"
|
|
3163
|
-
"
|
|
3195
|
+
"listActions": "vzUV2a_listActions",
|
|
3196
|
+
"emptyIcon": "vzUV2a_emptyIcon",
|
|
3197
|
+
"card": "vzUV2a_card",
|
|
3198
|
+
"chip": "vzUV2a_chip",
|
|
3199
|
+
"dangerBtn": "vzUV2a_dangerBtn",
|
|
3200
|
+
"drawerField": "vzUV2a_drawerField",
|
|
3201
|
+
"code": "vzUV2a_code",
|
|
3202
|
+
"cardFoot": "vzUV2a_cardFoot",
|
|
3203
|
+
"selCount": "vzUV2a_selCount",
|
|
3204
|
+
"smallChip": "vzUV2a_smallChip",
|
|
3164
3205
|
"empty": "vzUV2a_empty",
|
|
3206
|
+
"typeChips": "vzUV2a_typeChips",
|
|
3207
|
+
"smallSelect": "vzUV2a_smallSelect",
|
|
3208
|
+
"searchInput": "vzUV2a_searchInput",
|
|
3209
|
+
"ghostBtn": "vzUV2a_ghostBtn",
|
|
3210
|
+
"cardCheck": "vzUV2a_cardCheck",
|
|
3211
|
+
"typeBadge": "vzUV2a_typeBadge",
|
|
3212
|
+
"mono": "vzUV2a_mono",
|
|
3213
|
+
"promptText": "vzUV2a_promptText",
|
|
3214
|
+
"grid": "vzUV2a_grid",
|
|
3215
|
+
"primaryBtn": "vzUV2a_primaryBtn",
|
|
3216
|
+
"iconBtn": "vzUV2a_iconBtn",
|
|
3217
|
+
"toolbar": "vzUV2a_toolbar",
|
|
3218
|
+
"input": "vzUV2a_input",
|
|
3219
|
+
"drawerPlayer": "vzUV2a_drawerPlayer",
|
|
3165
3220
|
"emptyHint": "vzUV2a_emptyHint",
|
|
3166
|
-
"selCount": "vzUV2a_selCount",
|
|
3167
|
-
"cardFoot": "vzUV2a_cardFoot",
|
|
3168
|
-
"library": "vzUV2a_library",
|
|
3169
|
-
"searchBox": "vzUV2a_searchBox",
|
|
3170
|
-
"provRow": "vzUV2a_provRow",
|
|
3171
3221
|
"provenance": "vzUV2a_provenance",
|
|
3172
|
-
"
|
|
3173
|
-
"
|
|
3174
|
-
"
|
|
3175
|
-
"
|
|
3176
|
-
"
|
|
3177
|
-
"
|
|
3178
|
-
"
|
|
3179
|
-
"
|
|
3222
|
+
"drawer": "vzUV2a_drawer",
|
|
3223
|
+
"drawerHead": "vzUV2a_drawerHead",
|
|
3224
|
+
"metaChip": "vzUV2a_metaChip",
|
|
3225
|
+
"drawerTitle": "vzUV2a_drawerTitle",
|
|
3226
|
+
"drawerBody": "vzUV2a_drawerBody",
|
|
3227
|
+
"drawerLabel": "vzUV2a_drawerLabel",
|
|
3228
|
+
"provRow": "vzUV2a_provRow",
|
|
3229
|
+
"library": "vzUV2a_library",
|
|
3230
|
+
"paramsDetails": "vzUV2a_paramsDetails"
|
|
3180
3231
|
};
|
|
3181
3232
|
//#endregion
|
|
3182
3233
|
//#region src/client/library-view.tsx
|
|
@@ -4049,167 +4100,167 @@ window.__ModuleLoader__.load({
|
|
|
4049
4100
|
document.head.appendChild(tag);
|
|
4050
4101
|
}
|
|
4051
4102
|
var panel_module_css_default = {
|
|
4052
|
-
"
|
|
4053
|
-
"
|
|
4103
|
+
"entry": "rwa6qG_entry",
|
|
4104
|
+
"taskPrompt": "rwa6qG_taskPrompt",
|
|
4054
4105
|
"galleryFilterHeading": "rwa6qG_galleryFilterHeading",
|
|
4055
|
-
"
|
|
4056
|
-
"
|
|
4057
|
-
"
|
|
4058
|
-
"
|
|
4059
|
-
"
|
|
4060
|
-
"
|
|
4061
|
-
"
|
|
4062
|
-
"
|
|
4063
|
-
"
|
|
4106
|
+
"galleryRemove": "rwa6qG_galleryRemove",
|
|
4107
|
+
"zoomHint": "rwa6qG_zoomHint",
|
|
4108
|
+
"canvasError": "rwa6qG_canvasError",
|
|
4109
|
+
"configGuideBody": "rwa6qG_configGuideBody",
|
|
4110
|
+
"historyEmpty": "rwa6qG_historyEmpty",
|
|
4111
|
+
"historyAction": "rwa6qG_historyAction",
|
|
4112
|
+
"footer": "rwa6qG_footer",
|
|
4113
|
+
"galleryFilterDivider": "rwa6qG_galleryFilterDivider",
|
|
4114
|
+
"gallerySelectMode": "rwa6qG_gallerySelectMode",
|
|
4064
4115
|
"galleryFilter": "rwa6qG_galleryFilter",
|
|
4065
|
-
"
|
|
4066
|
-
"
|
|
4067
|
-
"
|
|
4068
|
-
"
|
|
4069
|
-
"galleryTags": "rwa6qG_galleryTags",
|
|
4070
|
-
"panelHeading": "rwa6qG_panelHeading",
|
|
4116
|
+
"history": "rwa6qG_history",
|
|
4117
|
+
"lightboxMeta": "rwa6qG_lightboxMeta",
|
|
4118
|
+
"galleryImage": "rwa6qG_galleryImage",
|
|
4119
|
+
"galleryCardFooter": "rwa6qG_galleryCardFooter",
|
|
4071
4120
|
"canvas": "rwa6qG_canvas",
|
|
4072
|
-
"
|
|
4121
|
+
"imageCard": "rwa6qG_imageCard",
|
|
4122
|
+
"taskTrayToggle": "rwa6qG_taskTrayToggle",
|
|
4123
|
+
"lightbox": "rwa6qG_lightbox",
|
|
4124
|
+
"dshImageGenToastIn": "rwa6qG_dshImageGenToastIn",
|
|
4125
|
+
"comparisonGrid": "rwa6qG_comparisonGrid",
|
|
4126
|
+
"uploadBox": "rwa6qG_uploadBox",
|
|
4127
|
+
"modelMenu": "rwa6qG_modelMenu",
|
|
4128
|
+
"gallerySelect": "rwa6qG_gallerySelect",
|
|
4129
|
+
"taskTrayChevron": "rwa6qG_taskTrayChevron",
|
|
4130
|
+
"historyFilters": "rwa6qG_historyFilters",
|
|
4131
|
+
"modeRow": "rwa6qG_modeRow",
|
|
4132
|
+
"download": "rwa6qG_download",
|
|
4133
|
+
"lightboxClose": "rwa6qG_lightboxClose",
|
|
4134
|
+
"lightboxScaleFrame": "rwa6qG_lightboxScaleFrame",
|
|
4073
4135
|
"galleryFilterCount": "rwa6qG_galleryFilterCount",
|
|
4074
|
-
"
|
|
4075
|
-
"
|
|
4076
|
-
"gallerySearch": "rwa6qG_gallerySearch",
|
|
4077
|
-
"modelSelect": "rwa6qG_modelSelect",
|
|
4078
|
-
"history": "rwa6qG_history",
|
|
4079
|
-
"lightboxNav": "rwa6qG_lightboxNav",
|
|
4080
|
-
"historyEmpty": "rwa6qG_historyEmpty",
|
|
4081
|
-
"enhanceButton": "rwa6qG_enhanceButton",
|
|
4136
|
+
"githubLink": "rwa6qG_githubLink",
|
|
4137
|
+
"lightboxTools": "rwa6qG_lightboxTools",
|
|
4082
4138
|
"galleryRatioList": "rwa6qG_galleryRatioList",
|
|
4139
|
+
"studio": "rwa6qG_studio",
|
|
4140
|
+
"canvasState": "rwa6qG_canvasState",
|
|
4141
|
+
"optionGrid": "rwa6qG_optionGrid",
|
|
4142
|
+
"lightboxCopy": "rwa6qG_lightboxCopy",
|
|
4083
4143
|
"lightboxActions": "rwa6qG_lightboxActions",
|
|
4084
|
-
"
|
|
4085
|
-
"
|
|
4086
|
-
"
|
|
4144
|
+
"spinner": "rwa6qG_spinner",
|
|
4145
|
+
"historyThumb": "rwa6qG_historyThumb",
|
|
4146
|
+
"lightboxImage": "rwa6qG_lightboxImage",
|
|
4147
|
+
"grid": "rwa6qG_grid",
|
|
4087
4148
|
"hiddenFile": "rwa6qG_hiddenFile",
|
|
4088
|
-
"
|
|
4089
|
-
"
|
|
4090
|
-
"
|
|
4091
|
-
"
|
|
4092
|
-
"
|
|
4149
|
+
"paramHint": "rwa6qG_paramHint",
|
|
4150
|
+
"image": "rwa6qG_image",
|
|
4151
|
+
"galleryWorkspace": "rwa6qG_galleryWorkspace",
|
|
4152
|
+
"galleryAvatar": "rwa6qG_galleryAvatar",
|
|
4153
|
+
"taskRows": "rwa6qG_taskRows",
|
|
4093
4154
|
"lightboxCaptionRow": "rwa6qG_lightboxCaptionRow",
|
|
4094
|
-
"
|
|
4095
|
-
"
|
|
4096
|
-
"
|
|
4097
|
-
"
|
|
4155
|
+
"lightboxZoomLevel": "rwa6qG_lightboxZoomLevel",
|
|
4156
|
+
"compareModelChoices": "rwa6qG_compareModelChoices",
|
|
4157
|
+
"compareToggle": "rwa6qG_compareToggle",
|
|
4158
|
+
"optionRow": "rwa6qG_optionRow",
|
|
4159
|
+
"gallerySelectionBar": "rwa6qG_gallerySelectionBar",
|
|
4098
4160
|
"paramGroup": "rwa6qG_paramGroup",
|
|
4099
|
-
"
|
|
4100
|
-
"
|
|
4101
|
-
"
|
|
4102
|
-
"
|
|
4103
|
-
"
|
|
4104
|
-
"
|
|
4105
|
-
"
|
|
4106
|
-
"
|
|
4107
|
-
"
|
|
4108
|
-
"
|
|
4109
|
-
"historyTitle": "rwa6qG_historyTitle",
|
|
4110
|
-
"historyThumbPlaceholder": "rwa6qG_historyThumbPlaceholder",
|
|
4111
|
-
"updateBanner": "rwa6qG_updateBanner",
|
|
4112
|
-
"promptCount": "rwa6qG_promptCount",
|
|
4113
|
-
"historyAction": "rwa6qG_historyAction",
|
|
4161
|
+
"galleryCard": "rwa6qG_galleryCard",
|
|
4162
|
+
"historyList": "rwa6qG_historyList",
|
|
4163
|
+
"historySearch": "rwa6qG_historySearch",
|
|
4164
|
+
"lightboxFigure": "rwa6qG_lightboxFigure",
|
|
4165
|
+
"galleryViewToggle": "rwa6qG_galleryViewToggle",
|
|
4166
|
+
"modelLabel": "rwa6qG_modelLabel",
|
|
4167
|
+
"panelHeader": "rwa6qG_panelHeader",
|
|
4168
|
+
"connectionStatus": "rwa6qG_connectionStatus",
|
|
4169
|
+
"uploadHint": "rwa6qG_uploadHint",
|
|
4170
|
+
"updateText": "rwa6qG_updateText",
|
|
4114
4171
|
"configGuide": "rwa6qG_configGuide",
|
|
4115
|
-
"imageCaption": "rwa6qG_imageCaption",
|
|
4116
|
-
"galleryToolbar": "rwa6qG_galleryToolbar",
|
|
4117
|
-
"referenceImage": "rwa6qG_referenceImage",
|
|
4118
|
-
"updateActions": "rwa6qG_updateActions",
|
|
4119
|
-
"taskPrompt": "rwa6qG_taskPrompt",
|
|
4120
|
-
"taskTrayHeader": "rwa6qG_taskTrayHeader",
|
|
4121
|
-
"paramLabel": "rwa6qG_paramLabel",
|
|
4122
4172
|
"lightboxIndex": "rwa6qG_lightboxIndex",
|
|
4123
|
-
"
|
|
4124
|
-
"
|
|
4125
|
-
"promptFooter": "rwa6qG_promptFooter",
|
|
4126
|
-
"galleryTagFilterList": "rwa6qG_galleryTagFilterList",
|
|
4127
|
-
"gallerySort": "rwa6qG_gallerySort",
|
|
4128
|
-
"lightboxCopy": "rwa6qG_lightboxCopy",
|
|
4129
|
-
"compareToggle": "rwa6qG_compareToggle",
|
|
4173
|
+
"lightboxEdit": "rwa6qG_lightboxEdit",
|
|
4174
|
+
"entryIcon": "rwa6qG_entryIcon",
|
|
4130
4175
|
"galleryImageButton": "rwa6qG_galleryImageButton",
|
|
4131
|
-
"
|
|
4132
|
-
"
|
|
4133
|
-
"
|
|
4134
|
-
"
|
|
4135
|
-
"
|
|
4136
|
-
"
|
|
4137
|
-
"
|
|
4138
|
-
"
|
|
4139
|
-
"
|
|
4140
|
-
"
|
|
4141
|
-
"lightboxTool": "rwa6qG_lightboxTool",
|
|
4176
|
+
"taskStatus": "rwa6qG_taskStatus",
|
|
4177
|
+
"galleryTagFilter": "rwa6qG_galleryTagFilter",
|
|
4178
|
+
"galleryHeading": "rwa6qG_galleryHeading",
|
|
4179
|
+
"historyTitle": "rwa6qG_historyTitle",
|
|
4180
|
+
"historyMain": "rwa6qG_historyMain",
|
|
4181
|
+
"modelMenuList": "rwa6qG_modelMenuList",
|
|
4182
|
+
"comparisonBoard": "rwa6qG_comparisonBoard",
|
|
4183
|
+
"canvasStateHint": "rwa6qG_canvasStateHint",
|
|
4184
|
+
"uploadIcon": "rwa6qG_uploadIcon",
|
|
4185
|
+
"connectionDot": "rwa6qG_connectionDot",
|
|
4142
4186
|
"historyInfo": "rwa6qG_historyInfo",
|
|
4143
|
-
"
|
|
4144
|
-
"historyHeader": "rwa6qG_historyHeader",
|
|
4145
|
-
"zoomHint": "rwa6qG_zoomHint",
|
|
4146
|
-
"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
|
-
"galleryImage": "rwa6qG_galleryImage",
|
|
4187
|
+
"panelTitle": "rwa6qG_panelTitle",
|
|
4159
4188
|
"taskTrayClose": "rwa6qG_taskTrayClose",
|
|
4160
|
-
"
|
|
4189
|
+
"modelWrap": "rwa6qG_modelWrap",
|
|
4161
4190
|
"galleryAdd": "rwa6qG_galleryAdd",
|
|
4162
|
-
"
|
|
4163
|
-
"
|
|
4164
|
-
"
|
|
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",
|
|
4191
|
+
"lightboxStage": "rwa6qG_lightboxStage",
|
|
4192
|
+
"gallerySort": "rwa6qG_gallerySort",
|
|
4193
|
+
"galleryToolbarActions": "rwa6qG_galleryToolbarActions",
|
|
4175
4194
|
"galleryClear": "rwa6qG_galleryClear",
|
|
4176
|
-
"historySearch": "rwa6qG_historySearch",
|
|
4177
|
-
"lightboxImage": "rwa6qG_lightboxImage",
|
|
4178
|
-
"lightboxTools": "rwa6qG_lightboxTools",
|
|
4179
|
-
"galleryMasonry": "rwa6qG_galleryMasonry",
|
|
4180
|
-
"canvasStateTitle": "rwa6qG_canvasStateTitle",
|
|
4181
4195
|
"compareControl": "rwa6qG_compareControl",
|
|
4196
|
+
"comparisonImageButton": "rwa6qG_comparisonImageButton",
|
|
4197
|
+
"paramLabel": "rwa6qG_paramLabel",
|
|
4198
|
+
"bigSpinner": "rwa6qG_bigSpinner",
|
|
4199
|
+
"historyItem": "rwa6qG_historyItem",
|
|
4200
|
+
"lightboxCaption": "rwa6qG_lightboxCaption",
|
|
4182
4201
|
"configScroll": "rwa6qG_configScroll",
|
|
4183
|
-
"
|
|
4184
|
-
"
|
|
4185
|
-
"
|
|
4186
|
-
"gallerySelect": "rwa6qG_gallerySelect",
|
|
4187
|
-
"comparisonBoard": "rwa6qG_comparisonBoard",
|
|
4202
|
+
"comparisonFullscreenGrid": "rwa6qG_comparisonFullscreenGrid",
|
|
4203
|
+
"galleryToast": "rwa6qG_galleryToast",
|
|
4204
|
+
"reference": "rwa6qG_reference",
|
|
4188
4205
|
"galleryCount": "rwa6qG_galleryCount",
|
|
4189
|
-
"
|
|
4206
|
+
"historyClear": "rwa6qG_historyClear",
|
|
4207
|
+
"historyMeta": "rwa6qG_historyMeta",
|
|
4208
|
+
"galleryTagFilterList": "rwa6qG_galleryTagFilterList",
|
|
4209
|
+
"taskTray": "rwa6qG_taskTray",
|
|
4210
|
+
"enhanceButton": "rwa6qG_enhanceButton",
|
|
4211
|
+
"galleryFilters": "rwa6qG_galleryFilters",
|
|
4212
|
+
"gallerySelectionClear": "rwa6qG_gallerySelectionClear",
|
|
4213
|
+
"galleryToolbar": "rwa6qG_galleryToolbar",
|
|
4214
|
+
"optionPill": "rwa6qG_optionPill",
|
|
4215
|
+
"galleryBadge": "rwa6qG_galleryBadge",
|
|
4190
4216
|
"generateInner": "rwa6qG_generateInner",
|
|
4191
|
-
"
|
|
4192
|
-
"
|
|
4193
|
-
"
|
|
4217
|
+
"galleryMasonry": "rwa6qG_galleryMasonry",
|
|
4218
|
+
"galleryTagInput": "rwa6qG_galleryTagInput",
|
|
4219
|
+
"galleryTags": "rwa6qG_galleryTags",
|
|
4220
|
+
"entryLabel": "rwa6qG_entryLabel",
|
|
4221
|
+
"panel": "rwa6qG_panel",
|
|
4194
4222
|
"templatesButton": "rwa6qG_templatesButton",
|
|
4223
|
+
"referenceImage": "rwa6qG_referenceImage",
|
|
4224
|
+
"updateBanner": "rwa6qG_updateBanner",
|
|
4225
|
+
"taskTrayHeader": "rwa6qG_taskTrayHeader",
|
|
4226
|
+
"promptCount": "rwa6qG_promptCount",
|
|
4227
|
+
"canvasEmptyIcon": "rwa6qG_canvasEmptyIcon",
|
|
4228
|
+
"historyPrompt": "rwa6qG_historyPrompt",
|
|
4229
|
+
"galleryTagEdit": "rwa6qG_galleryTagEdit",
|
|
4230
|
+
"panelHeading": "rwa6qG_panelHeading",
|
|
4231
|
+
"view": "rwa6qG_view",
|
|
4232
|
+
"historyHeader": "rwa6qG_historyHeader",
|
|
4195
4233
|
"taskTrayCount": "rwa6qG_taskTrayCount",
|
|
4196
|
-
"
|
|
4197
|
-
"
|
|
4198
|
-
"
|
|
4199
|
-
"
|
|
4200
|
-
"
|
|
4201
|
-
"
|
|
4202
|
-
"
|
|
4203
|
-
"
|
|
4204
|
-
"
|
|
4205
|
-
"
|
|
4206
|
-
"
|
|
4207
|
-
"
|
|
4234
|
+
"taskRow": "rwa6qG_taskRow",
|
|
4235
|
+
"galleryBulkButton": "rwa6qG_galleryBulkButton",
|
|
4236
|
+
"historyThumbPlaceholder": "rwa6qG_historyThumbPlaceholder",
|
|
4237
|
+
"lightboxNav": "rwa6qG_lightboxNav",
|
|
4238
|
+
"historyActions": "rwa6qG_historyActions",
|
|
4239
|
+
"canvasStateTitle": "rwa6qG_canvasStateTitle",
|
|
4240
|
+
"galleryTagEditor": "rwa6qG_galleryTagEditor",
|
|
4241
|
+
"modePill": "rwa6qG_modePill",
|
|
4242
|
+
"card": "rwa6qG_card",
|
|
4243
|
+
"updateRelease": "rwa6qG_updateRelease",
|
|
4244
|
+
"modelSelect": "rwa6qG_modelSelect",
|
|
4245
|
+
"canvasHistoryTag": "rwa6qG_canvasHistoryTag",
|
|
4246
|
+
"galleryFilterNote": "rwa6qG_galleryFilterNote",
|
|
4247
|
+
"lightboxTool": "rwa6qG_lightboxTool",
|
|
4248
|
+
"gallerySearch": "rwa6qG_gallerySearch",
|
|
4249
|
+
"comparisonFullscreen": "rwa6qG_comparisonFullscreen",
|
|
4250
|
+
"promptFooter": "rwa6qG_promptFooter",
|
|
4251
|
+
"imageCaption": "rwa6qG_imageCaption",
|
|
4252
|
+
"updateActions": "rwa6qG_updateActions",
|
|
4253
|
+
"generateButton": "rwa6qG_generateButton",
|
|
4254
|
+
"galleryRatio": "rwa6qG_galleryRatio",
|
|
4255
|
+
"config": "rwa6qG_config",
|
|
4256
|
+
"prompt": "rwa6qG_prompt",
|
|
4257
|
+
"modelMenuItem": "rwa6qG_modelMenuItem",
|
|
4258
|
+
"canvasMeta": "rwa6qG_canvasMeta",
|
|
4208
4259
|
"canvasBody": "rwa6qG_canvasBody",
|
|
4209
|
-
"
|
|
4210
|
-
"
|
|
4211
|
-
"
|
|
4212
|
-
"
|
|
4260
|
+
"galleryCardInfo": "rwa6qG_galleryCardInfo",
|
|
4261
|
+
"dshImageGenSpin": "rwa6qG_dshImageGenSpin",
|
|
4262
|
+
"lightboxDownload": "rwa6qG_lightboxDownload",
|
|
4263
|
+
"referenceActions": "rwa6qG_referenceActions"
|
|
4213
4264
|
};
|
|
4214
4265
|
//#endregion
|
|
4215
4266
|
//#region src/client/mount.tsx
|
|
@@ -4866,79 +4917,79 @@ window.__ModuleLoader__.load({
|
|
|
4866
4917
|
document.head.appendChild(tag);
|
|
4867
4918
|
}
|
|
4868
4919
|
var settings_card_module_css_default = {
|
|
4869
|
-
"
|
|
4870
|
-
"
|
|
4920
|
+
"sectionHint": "zmjoSq_sectionHint",
|
|
4921
|
+
"channelAdd": "zmjoSq_channelAdd",
|
|
4922
|
+
"select": "zmjoSq_select",
|
|
4923
|
+
"linkButton": "zmjoSq_linkButton",
|
|
4871
4924
|
"candidate": "zmjoSq_candidate",
|
|
4872
4925
|
"editorHeader": "zmjoSq_editorHeader",
|
|
4873
|
-
"
|
|
4874
|
-
"
|
|
4875
|
-
"channelDotReady": "zmjoSq_channelDotReady",
|
|
4876
|
-
"modelCategorySelect": "zmjoSq_modelCategorySelect",
|
|
4877
|
-
"modelRowRemove": "zmjoSq_modelRowRemove",
|
|
4878
|
-
"candidateTitle": "zmjoSq_candidateTitle",
|
|
4879
|
-
"name": "zmjoSq_name",
|
|
4880
|
-
"modelCatalogMeta": "zmjoSq_modelCatalogMeta",
|
|
4881
|
-
"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",
|
|
4926
|
+
"detectOk": "zmjoSq_detectOk",
|
|
4927
|
+
"chevron": "zmjoSq_chevron",
|
|
4888
4928
|
"modelCatalog": "zmjoSq_modelCatalog",
|
|
4889
|
-
"
|
|
4890
|
-
"header": "zmjoSq_header",
|
|
4891
|
-
"modelRows": "zmjoSq_modelRows",
|
|
4892
|
-
"candidatePanel": "zmjoSq_candidatePanel",
|
|
4893
|
-
"link": "zmjoSq_link",
|
|
4894
|
-
"card": "zmjoSq_card",
|
|
4895
|
-
"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",
|
|
4929
|
+
"label": "zmjoSq_label",
|
|
4904
4930
|
"channelMeta": "zmjoSq_channelMeta",
|
|
4905
|
-
"
|
|
4906
|
-
"
|
|
4907
|
-
"detectOk": "zmjoSq_detectOk",
|
|
4931
|
+
"modelRows": "zmjoSq_modelRows",
|
|
4932
|
+
"customSettingsBody": "zmjoSq_customSettingsBody",
|
|
4908
4933
|
"channelList": "zmjoSq_channelList",
|
|
4909
|
-
"
|
|
4910
|
-
"channelEditor": "zmjoSq_channelEditor",
|
|
4934
|
+
"channelRow": "zmjoSq_channelRow",
|
|
4911
4935
|
"footer": "zmjoSq_footer",
|
|
4912
|
-
"
|
|
4913
|
-
"
|
|
4936
|
+
"head": "zmjoSq_head",
|
|
4937
|
+
"link": "zmjoSq_link",
|
|
4938
|
+
"modelCatalogMeta": "zmjoSq_modelCatalogMeta",
|
|
4939
|
+
"editorTag": "zmjoSq_editorTag",
|
|
4940
|
+
"field": "zmjoSq_field",
|
|
4941
|
+
"chevronOpen": "zmjoSq_chevronOpen",
|
|
4914
4942
|
"channelAddRow": "zmjoSq_channelAddRow",
|
|
4915
|
-
"headText": "zmjoSq_headText",
|
|
4916
4943
|
"editorWrap": "zmjoSq_editorWrap",
|
|
4917
|
-
"
|
|
4918
|
-
"
|
|
4919
|
-
"
|
|
4920
|
-
"
|
|
4921
|
-
"
|
|
4922
|
-
"
|
|
4944
|
+
"channelSection": "zmjoSq_channelSection",
|
|
4945
|
+
"modelInput": "zmjoSq_modelInput",
|
|
4946
|
+
"save": "zmjoSq_save",
|
|
4947
|
+
"channelAction": "zmjoSq_channelAction",
|
|
4948
|
+
"modelRow": "zmjoSq_modelRow",
|
|
4949
|
+
"reset": "zmjoSq_reset",
|
|
4950
|
+
"modelRowRemove": "zmjoSq_modelRowRemove",
|
|
4951
|
+
"channelMain": "zmjoSq_channelMain",
|
|
4923
4952
|
"candidateId": "zmjoSq_candidateId",
|
|
4924
|
-
"
|
|
4925
|
-
"pending": "zmjoSq_pending",
|
|
4926
|
-
"candidateActions": "zmjoSq_candidateActions",
|
|
4953
|
+
"channelHost": "zmjoSq_channelHost",
|
|
4927
4954
|
"deleteConfirmText": "zmjoSq_deleteConfirmText",
|
|
4928
|
-
"
|
|
4929
|
-
"
|
|
4930
|
-
"
|
|
4931
|
-
"modelCatalogHead": "zmjoSq_modelCatalogHead",
|
|
4932
|
-
"channelDotWarn": "zmjoSq_channelDotWarn",
|
|
4933
|
-
"label": "zmjoSq_label",
|
|
4934
|
-
"body": "zmjoSq_body",
|
|
4955
|
+
"modelArrow": "zmjoSq_modelArrow",
|
|
4956
|
+
"pending": "zmjoSq_pending",
|
|
4957
|
+
"channelDanger": "zmjoSq_channelDanger",
|
|
4935
4958
|
"customSettingsSummary": "zmjoSq_customSettingsSummary",
|
|
4959
|
+
"modelCatalogTools": "zmjoSq_modelCatalogTools",
|
|
4960
|
+
"headText": "zmjoSq_headText",
|
|
4961
|
+
"sectionHeader": "zmjoSq_sectionHeader",
|
|
4962
|
+
"channelEmpty": "zmjoSq_channelEmpty",
|
|
4963
|
+
"customSettings": "zmjoSq_customSettings",
|
|
4964
|
+
"sectionTitle": "zmjoSq_sectionTitle",
|
|
4965
|
+
"modelEmpty": "zmjoSq_modelEmpty",
|
|
4966
|
+
"candidateTitle": "zmjoSq_candidateTitle",
|
|
4967
|
+
"failed": "zmjoSq_failed",
|
|
4968
|
+
"header": "zmjoSq_header",
|
|
4936
4969
|
"modelCatalogTitle": "zmjoSq_modelCatalogTitle",
|
|
4937
|
-
"
|
|
4938
|
-
"
|
|
4939
|
-
"
|
|
4940
|
-
"
|
|
4941
|
-
"
|
|
4970
|
+
"channelName": "zmjoSq_channelName",
|
|
4971
|
+
"editorFooter": "zmjoSq_editorFooter",
|
|
4972
|
+
"editorTitle": "zmjoSq_editorTitle",
|
|
4973
|
+
"addModel": "zmjoSq_addModel",
|
|
4974
|
+
"candidateActions": "zmjoSq_candidateActions",
|
|
4975
|
+
"channelEditor": "zmjoSq_channelEditor",
|
|
4976
|
+
"name": "zmjoSq_name",
|
|
4977
|
+
"input": "zmjoSq_input",
|
|
4978
|
+
"readOnly": "zmjoSq_readOnly",
|
|
4979
|
+
"channelDotReady": "zmjoSq_channelDotReady",
|
|
4980
|
+
"card": "zmjoSq_card",
|
|
4981
|
+
"body": "zmjoSq_body",
|
|
4982
|
+
"channelDotWarn": "zmjoSq_channelDotWarn",
|
|
4983
|
+
"modelCategorySelect": "zmjoSq_modelCategorySelect",
|
|
4984
|
+
"modelBadge": "zmjoSq_modelBadge",
|
|
4985
|
+
"candidatePanel": "zmjoSq_candidatePanel",
|
|
4986
|
+
"candidateHead": "zmjoSq_candidateHead",
|
|
4987
|
+
"candidateList": "zmjoSq_candidateList",
|
|
4988
|
+
"candidateLabel": "zmjoSq_candidateLabel",
|
|
4989
|
+
"discard": "zmjoSq_discard",
|
|
4990
|
+
"channelBadge": "zmjoSq_channelBadge",
|
|
4991
|
+
"modelCatalogHead": "zmjoSq_modelCatalogHead",
|
|
4992
|
+
"description": "zmjoSq_description"
|
|
4942
4993
|
};
|
|
4943
4994
|
//#endregion
|
|
4944
4995
|
//#region src/client/SettingsCard.tsx
|
|
@@ -4967,7 +5018,8 @@ window.__ModuleLoader__.load({
|
|
|
4967
5018
|
booleanField("allowAgentAudioGeneration"),
|
|
4968
5019
|
textField("defaultModel"),
|
|
4969
5020
|
booleanField("autoSaveToLibrary"),
|
|
4970
|
-
textField("maxConcurrentGenerations")
|
|
5021
|
+
textField("maxConcurrentGenerations"),
|
|
5022
|
+
textField("enhanceModel")
|
|
4971
5023
|
]);
|
|
4972
5024
|
this.channelsForm = new ChannelsForm(scope);
|
|
4973
5025
|
}
|
|
@@ -4982,7 +5034,8 @@ window.__ModuleLoader__.load({
|
|
|
4982
5034
|
allowAgentAudioGeneration: this.form.field("allowAgentAudioGeneration"),
|
|
4983
5035
|
defaultModel: this.form.field("defaultModel"),
|
|
4984
5036
|
autoSaveToLibrary: this.form.field("autoSaveToLibrary"),
|
|
4985
|
-
maxConcurrentGenerations: this.form.field("maxConcurrentGenerations")
|
|
5037
|
+
maxConcurrentGenerations: this.form.field("maxConcurrentGenerations"),
|
|
5038
|
+
enhanceModel: this.form.field("enhanceModel")
|
|
4986
5039
|
};
|
|
4987
5040
|
}
|
|
4988
5041
|
inject() {
|
|
@@ -5326,6 +5379,10 @@ window.__ModuleLoader__.load({
|
|
|
5326
5379
|
onAdopt: () => adoptCandidates(),
|
|
5327
5380
|
onCloseCandidates: closeCandidates
|
|
5328
5381
|
}),
|
|
5382
|
+
/stability/i.test(`${props.channel?.preset ?? invited?.id ?? presetId}|${url}`) ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
5383
|
+
className: settings_card_module_css_default.sectionHint,
|
|
5384
|
+
children: t("channel.stabilityHint")
|
|
5385
|
+
}) : null,
|
|
5329
5386
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("label", {
|
|
5330
5387
|
className: settings_card_module_css_default.field,
|
|
5331
5388
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
@@ -5414,7 +5471,17 @@ window.__ModuleLoader__.load({
|
|
|
5414
5471
|
disabled: !writable,
|
|
5415
5472
|
onChange: (event) => props.onPatchModel(index, { id: event.target.value })
|
|
5416
5473
|
}),
|
|
5417
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("select", {
|
|
5474
|
+
/^stable-audio-/i.test(model.id) ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("select", {
|
|
5475
|
+
className: `${settings_card_module_css_default.select} ${settings_card_module_css_default.modelCategorySelect}`,
|
|
5476
|
+
value: "__stable-dual__",
|
|
5477
|
+
"aria-label": `${t("channel.modelCategory")} ${index + 1}`,
|
|
5478
|
+
disabled: true,
|
|
5479
|
+
title: t("channel.category.stableDualHint"),
|
|
5480
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
|
|
5481
|
+
value: "__stable-dual__",
|
|
5482
|
+
children: t("channel.category.stableDual")
|
|
5483
|
+
})
|
|
5484
|
+
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("select", {
|
|
5418
5485
|
className: `${settings_card_module_css_default.select} ${settings_card_module_css_default.modelCategorySelect}`,
|
|
5419
5486
|
value: model.category ?? "",
|
|
5420
5487
|
"aria-label": `${t("channel.modelCategory")} ${index + 1}`,
|
|
@@ -5525,6 +5592,8 @@ window.__ModuleLoader__.load({
|
|
|
5525
5592
|
const [presetLoading, setPresetLoading] = (0, react.useState)(false);
|
|
5526
5593
|
const [presetError, setPresetError] = (0, react.useState)(null);
|
|
5527
5594
|
const [confirmDeleteId, setConfirmDeleteId] = (0, react.useState)(null);
|
|
5595
|
+
const [llmModels, setLlmModels] = (0, react.useState)(null);
|
|
5596
|
+
const [llmModelsError, setLlmModelsError] = (0, react.useState)(null);
|
|
5528
5597
|
const channels = state.channels.channels;
|
|
5529
5598
|
const editingChannel = editor !== null && editor.kind === "edit" ? channels.find((channel) => channel.id === editor.channelId) : void 0;
|
|
5530
5599
|
(0, react.useEffect)(() => {
|
|
@@ -5543,6 +5612,18 @@ window.__ModuleLoader__.load({
|
|
|
5543
5612
|
presetError,
|
|
5544
5613
|
presetLoading
|
|
5545
5614
|
]);
|
|
5615
|
+
(0, react.useEffect)(() => {
|
|
5616
|
+
if (!open || llmModels !== null || llmModelsError !== null) return;
|
|
5617
|
+
fetch(LLM_MODELS_API, { method: "POST" }).then(async (response) => {
|
|
5618
|
+
const body = await response.json();
|
|
5619
|
+
if (!response.ok || body.ok !== true || body.providers === void 0) throw new Error(body.message ?? `HTTP ${response.status}`);
|
|
5620
|
+
setLlmModels(body.providers);
|
|
5621
|
+
}).catch((error) => setLlmModelsError(error instanceof Error ? error.message : String(error)));
|
|
5622
|
+
}, [
|
|
5623
|
+
open,
|
|
5624
|
+
llmModels,
|
|
5625
|
+
llmModelsError
|
|
5626
|
+
]);
|
|
5546
5627
|
if (!state.available) return null;
|
|
5547
5628
|
const blocked = !state.dirty || state.invalid || state.saving || state.channels.saving;
|
|
5548
5629
|
const closeEditor = () => {
|
|
@@ -5757,6 +5838,47 @@ window.__ModuleLoader__.load({
|
|
|
5757
5838
|
}) : null
|
|
5758
5839
|
]
|
|
5759
5840
|
}),
|
|
5841
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
5842
|
+
className: settings_card_module_css_default.field,
|
|
5843
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
|
|
5844
|
+
className: settings_card_module_css_default.label,
|
|
5845
|
+
children: [
|
|
5846
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("settings.enhanceModel") }),
|
|
5847
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("select", {
|
|
5848
|
+
className: settings_card_module_css_default.select,
|
|
5849
|
+
value: state.enhanceModel.text,
|
|
5850
|
+
disabled: !state.writable,
|
|
5851
|
+
onChange: (event) => props.edit("enhanceModel", event.target.value),
|
|
5852
|
+
children: [
|
|
5853
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
|
|
5854
|
+
value: "",
|
|
5855
|
+
children: t("settings.enhanceModelDefault")
|
|
5856
|
+
}),
|
|
5857
|
+
llmModels !== null ? llmModels.map((option) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
|
|
5858
|
+
value: `${option.provider}|${option.id}`,
|
|
5859
|
+
children: `${option.providerName} — ${option.name}${option.name !== option.id ? `(${option.id})` : ""}`
|
|
5860
|
+
}, `${option.provider}|${option.id}`)) : null,
|
|
5861
|
+
llmModels !== null && state.enhanceModel.text !== "" && !llmModels.some((option) => `${option.provider}|${option.id}` === state.enhanceModel.text) ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
|
|
5862
|
+
value: state.enhanceModel.text,
|
|
5863
|
+
children: state.enhanceModel.text
|
|
5864
|
+
}) : null
|
|
5865
|
+
]
|
|
5866
|
+
}),
|
|
5867
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
5868
|
+
className: settings_card_module_css_default.sectionHint,
|
|
5869
|
+
children: t("settings.enhanceModelHint")
|
|
5870
|
+
}),
|
|
5871
|
+
llmModelsError !== null ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
5872
|
+
className: settings_card_module_css_default.failed,
|
|
5873
|
+
children: [
|
|
5874
|
+
t("settings.enhanceModelFailed"),
|
|
5875
|
+
":",
|
|
5876
|
+
llmModelsError
|
|
5877
|
+
]
|
|
5878
|
+
}) : null
|
|
5879
|
+
]
|
|
5880
|
+
})
|
|
5881
|
+
}),
|
|
5760
5882
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
5761
5883
|
className: settings_card_module_css_default.field,
|
|
5762
5884
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
|
|
@@ -5883,17 +6005,17 @@ window.__ModuleLoader__.load({
|
|
|
5883
6005
|
document.head.appendChild(tag);
|
|
5884
6006
|
}
|
|
5885
6007
|
var audio_toolview_module_css_default = {
|
|
6008
|
+
"status": "_7K1QKa_status",
|
|
6009
|
+
"message": "_7K1QKa_message",
|
|
5886
6010
|
"root": "_7K1QKa_root",
|
|
5887
6011
|
"audios": "_7K1QKa_audios",
|
|
5888
|
-
"audioRow": "_7K1QKa_audioRow",
|
|
5889
|
-
"download": "_7K1QKa_download",
|
|
5890
|
-
"empty": "_7K1QKa_empty",
|
|
5891
|
-
"message": "_7K1QKa_message",
|
|
5892
|
-
"error": "_7K1QKa_error",
|
|
5893
6012
|
"header": "_7K1QKa_header",
|
|
5894
6013
|
"icon": "_7K1QKa_icon",
|
|
5895
|
-
"
|
|
5896
|
-
"
|
|
6014
|
+
"error": "_7K1QKa_error",
|
|
6015
|
+
"empty": "_7K1QKa_empty",
|
|
6016
|
+
"audio": "_7K1QKa_audio",
|
|
6017
|
+
"audioRow": "_7K1QKa_audioRow",
|
|
6018
|
+
"download": "_7K1QKa_download"
|
|
5897
6019
|
};
|
|
5898
6020
|
//#endregion
|
|
5899
6021
|
//#region src/client/audio-toolview.tsx
|