dsh-mo-image 1.0.1 → 1.0.3

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
@@ -359,10 +359,7 @@ window.__ModuleLoader__.load({
359
359
  [data-mo-image-settings] [data-param-table] > [data-param-grid] { min-width: 20rem !important; }
360
360
  [data-mo-image-settings] [data-param-table="common"] > [data-param-grid] { min-width: 26rem !important; }
361
361
  [data-mo-image-settings] [data-param-grid$=":head"] > span { white-space: normal !important; overflow-wrap: anywhere; }
362
- [data-mo-image-mapping-row] { grid-template-columns: minmax(0, 1fr) min(55%, 168px) !important; }
363
- [data-mo-image-mapping-row] > span { overflow-wrap: anywhere; }
364
362
  [data-mo-image-dialog] { box-sizing: border-box; max-height: calc(100vh - 32px); overflow-y: auto !important; }
365
- [data-mo-image-update-header] > button { margin-inline-start: auto; }
366
363
  `;
367
364
  const CLASS_STYLE_SOURCES = {
368
365
  settings: {
@@ -2009,7 +2006,6 @@ window.__ModuleLoader__.load({
2009
2006
  const t = props.t || fallbackTranslate;
2010
2007
  const isNew = !!props.isNew;
2011
2008
  // 尺寸交给模型(自动)时,面板里才需要显示宽高落在哪。
2012
- const sizeAuto = props.sizeAuto !== false;
2013
2009
  const [draft, setDraft] = React.useState(() => ({
2014
2010
  ...props.provider,
2015
2011
  id: props.provider.id,
@@ -2067,7 +2063,6 @@ window.__ModuleLoader__.load({
2067
2063
  const [dropAt, setDropAt] = React.useState(null);
2068
2064
  // 工作流解析结果与用户确认过的映射,按模型 id 分开存。
2069
2065
  const [workflowAnalysis, setWorkflowAnalysis] = React.useState({});
2070
- const [mappingDraft, setMappingDraft] = React.useState({});
2071
2066
  // 参数行删除的二次确认:只活在这一屏(不落盘)。3 秒没点第二次就复原。
2072
2067
  const [pendingParamRemove, setPendingParamRemove] = React.useState('');
2073
2068
  const pendingParamRemoveTimer = React.useRef(0);
@@ -3195,24 +3190,34 @@ window.__ModuleLoader__.load({
3195
3190
  }
3196
3191
  updateModelEntry(id, (entry) => { entry.workflow = text; });
3197
3192
  };
3198
- const setModelMapping = (id, mapping) => updateModelEntry(id, (entry) => {
3199
- if (mapping) entry.mapping = mapping;
3200
- else delete entry.mapping;
3201
- });
3202
- /**
3203
- * 解析结果一次写进 draft。
3204
- *
3205
- * params 是**合并**不是替换:这张表现在是唯一一张参数表,用户手填的行都在里面;
3206
- * 重新解析工作流只该补上新出现的落点,不该把它们清掉。
3207
- */
3193
+ const isManagedComfyRow = (row, mapping) => {
3194
+ if (!row || !row.node || !row.input) return false;
3195
+ const reserved = /^(prompt|positive_prompt|positivePrompt|negative_prompt|negativePrompt|width|height)$/i;
3196
+ return reserved.test(row.name) || reserved.test(row.input)
3197
+ || ['prompt', 'negative_prompt', 'width', 'height', 'quality', 'image'].some((role) => {
3198
+ const target = mapping?.[role];
3199
+ return target && target.node === row.node && target.input === row.input;
3200
+ });
3201
+ };
3202
+
3203
+ /** 一起保存自动映射、质量档位和可选工作流参数。 */
3208
3204
  const applyAnalysis = (id, analysis) => updateModelEntry(id, (entry) => {
3209
- if (analysis && analysis.mapping) entry.mapping = analysis.mapping;
3210
- const incoming = Array.isArray(analysis && analysis.params) ? analysis.params : [];
3211
- const merged = Array.isArray(entry.params) ? entry.params.slice() : [];
3205
+ const previousMapping = entry.mapping;
3206
+ if (analysis.mapping) {
3207
+ const image = previousMapping?.image;
3208
+ const keepImage = image && analysis.candidates?.image?.some((target) =>
3209
+ target.node === image.node && target.input === image.input);
3210
+ entry.mapping = keepImage ? { ...analysis.mapping, image } : analysis.mapping;
3211
+ if (analysis.quality) entry.quality = analysis.quality;
3212
+ else if (previousMapping?.quality) delete entry.quality;
3213
+ }
3214
+ const incoming = Array.isArray(analysis.params) ? analysis.params : [];
3215
+ const saved = Array.isArray(entry.params) ? entry.params : [];
3216
+ const merged = saved.filter((row) => !isManagedComfyRow(row, entry.mapping)
3217
+ && !isManagedComfyRow(row, previousMapping));
3212
3218
  for (const param of incoming) {
3213
3219
  if (!param || !param.node || !param.input) continue;
3214
- // 提示词 / 负面词由工具参数直接写进工作流,不进参数表。
3215
- if (PROMPT_PARAM_NAMES.has(String(param.name || ''))) continue;
3220
+ if (isManagedComfyRow(param, entry.mapping)) continue;
3216
3221
  if (merged.some((row) => row && row.node === param.node && row.input === param.input)) continue;
3217
3222
  const row = { name: param.name, node: param.node, input: param.input, type: paramTypeOf(param.type, 'text') };
3218
3223
  if (param.role === true) row.role = true;
@@ -3225,9 +3230,6 @@ window.__ModuleLoader__.load({
3225
3230
  /** 一行是不是工作流行(有节点落点):和宿主 config-store 用同一个判据。 */
3226
3231
  const isWorkflowRow = (row) => Boolean(row) && (row.node !== undefined || row.input !== undefined);
3227
3232
 
3228
- /** 提示词与负面词永远不是参数行:它们走工具自己的参数(和宿主同一个清单)。 */
3229
- const PROMPT_PARAM_NAMES = new Set(['prompt', 'negative_prompt']);
3230
-
3231
3233
  /**
3232
3234
  * 某个参数键是不是「暴露给对话模型」:行的 expose 或老配置的开关表,任一为真即可
3233
3235
  * (和宿主 workflowParamsOf 的口径一致;两者打架时以「暴露」为准)。
@@ -3273,9 +3275,12 @@ window.__ModuleLoader__.load({
3273
3275
  headers: { 'Content-Type': 'application/json' },
3274
3276
  body: JSON.stringify({ ...connectionDraft(), workflow })
3275
3277
  }, 60000);
3278
+ if (latestDraft.current.modelOptions[id]?.workflow !== workflow) {
3279
+ setWorkflowAnalysis((prev) => ({ ...prev, [id]: null }));
3280
+ return;
3281
+ }
3276
3282
  if (!data.ok) throw new Error(data.error || t('form.modelMappingFailed'));
3277
3283
  setWorkflowAnalysis((prev) => ({ ...prev, [id]: { loading: false, analysis: data } }));
3278
- if (data.mapping) setMappingDraft((prev) => ({ ...prev, [id]: data.mapping }));
3279
3284
  // mapping 和 params 必须一次写进 draft:连着两次 setDraft 会互相覆盖。
3280
3285
  if (data.mapping || (Array.isArray(data.params) && data.params.length)) {
3281
3286
  applyAnalysis(id, data);
@@ -3287,28 +3292,7 @@ window.__ModuleLoader__.load({
3287
3292
  }));
3288
3293
  } finally { connectionInFlight.current.delete(request); }
3289
3294
  };
3290
- /** 下拉里只显示输入名,节点 id 对用户没有意义。 */
3291
- const mappingOptionLabel = (item) => (item ? item.input : '');
3292
-
3293
- /** 尺寸由选择器经 mapping 注入;认出来就不占列表,认不出来才留手选。 */
3294
- const SIZE_ROLES = new Set(['width', 'height']);
3295
- /**
3296
- * 只列要手选落点的映射。提示词与负面词不在这里——它们由工具调用自己的
3297
- * prompt / negative_prompt 直接写入工作流,落点仍按解析结果自动填;种子与模型
3298
- * 也不在这里——它们是参数表里的普通行(见 paramFieldsPanel),不再重复一遍下拉。
3299
- */
3300
- const MAPPING_ROWS = [
3301
- ['width', 'form.modelMappingWidth'],
3302
- ['height', 'form.modelMappingHeight'],
3303
- ['image', 'form.modelMappingImage']
3304
- ];
3305
- /**
3306
- * 映射面板:宽高 / 参考图各自落到哪个节点输入。
3307
- *
3308
- * 可调参数(含种子与模型)不在这张表里——它们是离散参数表的行(见 paramFieldsPanel),
3309
- * 暴露开关也归那张表。
3310
- */
3311
- const mappingPanel = (id) => {
3295
+ const workflowAnalysisResult = (id) => {
3312
3296
  const state = workflowAnalysis[id];
3313
3297
  if (!state || state.loading) return null;
3314
3298
  if (state.error) {
@@ -3316,81 +3300,16 @@ window.__ModuleLoader__.load({
3316
3300
  t('form.modelMappingFailed') + ':' + state.error);
3317
3301
  }
3318
3302
  const analysis = state.analysis || {};
3319
- const candidates = analysis.candidates || {};
3320
- const mapping = mappingDraft[id] || analysis.mapping || {};
3321
- const warnings = Array.isArray(analysis.warnings) ? analysis.warnings : [];
3303
+ const warnings = Array.isArray(analysis.warnings) ? analysis.warnings.slice() : [];
3304
+ if (analysis.ambiguousImage && !draft.modelOptions[id]?.mapping?.image) {
3305
+ warnings.push(t('form.modelMappingAmbiguousImage'));
3306
+ }
3322
3307
  return h('div', { style: { gridColumn: '1 / -1', display: 'grid', gap: 8 } },
3323
3308
  h('p', { className: MC.advancedHint, style: FLUSH_TEXT_STYLE },
3324
3309
  (analysis.format === 'ui' ? t('form.modelMappingFormatUi') : t('form.modelMappingFormatApi'))
3325
3310
  + ' · ' + t('form.modelMappingSampler') + ' ' + (analysis.samplerId || '—')),
3326
3311
  ...warnings.map((line, at) => h('p', { key: 'warn' + at, className: MC.advancedHint, style: { margin: 0, opacity: 0.8 } }, line)),
3327
- (() => {
3328
- const rows = [];
3329
- for (const [key, labelKey] of MAPPING_ROWS) {
3330
- const pool = Array.isArray(candidates[key]) ? candidates[key] : [];
3331
- const current = mapping[key];
3332
- if (!pool.length && !current) continue;
3333
- // 尺寸固定时由选择器注入,认出来就不再占列表;自动时留给模型,需要看见落点。
3334
- if (SIZE_ROLES.has(key) && current && !sizeAuto) continue;
3335
- rows.push({
3336
- key, name: key, label: t(labelKey), value: current ? current.node + '::' + current.input : '',
3337
- options: pool.slice(),
3338
- onPick: (picked) => {
3339
- const next = { ...(mappingDraft[id] || analysis.mapping || {}) };
3340
- if (!picked) next[key] = null;
3341
- else {
3342
- const [node, input] = picked.split('::');
3343
- next[key] = { node, input };
3344
- }
3345
- setMappingDraft((prev) => ({ ...prev, [id]: next }));
3346
- setModelMapping(id, next);
3347
- }
3348
- });
3349
- }
3350
- const cell = {
3351
- display: 'grid', gridTemplateColumns: 'minmax(88px, 1fr) 168px',
3352
- alignItems: 'center', gap: 8, minHeight: 32
3353
- };
3354
- const rowView = (row) => {
3355
- const list = row.options.map((item) => ({
3356
- value: item.node + '::' + item.input,
3357
- label: mappingOptionLabel(item)
3358
- }));
3359
- list.unshift({ value: '', label: t('form.modelMappingSkip') });
3360
- if (row.value && !list.some((option) => option.value === row.value)) {
3361
- list.push({ value: row.value, label: row.value.split('::')[1] });
3362
- }
3363
- return h('div', { key: row.key, style: cell, 'data-mo-image-mapping-row': '' },
3364
- h('span', {
3365
- className: MC.modelFieldLabel,
3366
- style: { margin: 0, display: 'flex', alignItems: 'center', gap: 4, minWidth: 0 }
3367
- },
3368
- row.label),
3369
- h('select', {
3370
- className: MC.input + ' ' + MC.selectInput,
3371
- style: { width: '100%', minWidth: 0 },
3372
- 'aria-label': row.label,
3373
- 'data-mapping-key': row.key,
3374
- value: row.value,
3375
- onChange: (event) => row.onPick(event.target.value)
3376
- }, list.map((option) => h('option', { key: option.value || 'none', value: option.value }, option.label)))
3377
- );
3378
- };
3379
- // 提示词与负面词不占这里的行:它们由工具参数直接写入,落点按解析结果自动填。
3380
- return h('div', { style: { display: 'grid', gap: 4 } },
3381
- h('p', { className: MC.advancedHint, style: FLUSH_TEXT_STYLE },
3382
- t('form.modelAutoInjectHint')),
3383
- rows.length ? h('div', { className: MC.advancedHint, style: Object.assign({}, cell, { minHeight: 0 }) },
3384
- h('span', null, t('form.modelMappingColName')),
3385
- h('span', null, t('form.modelMappingColTarget'))) : null,
3386
- rows.length ? h('div', {
3387
- style: {
3388
- display: 'grid', gap: 4, maxHeight: 184,
3389
- overflowY: 'auto', paddingRight: 2
3390
- }
3391
- }, ...rows.map((row) => rowView(row))) : null
3392
- );
3393
- })()
3312
+ h('p', { className: MC.advancedHint, style: FLUSH_TEXT_STYLE }, t('form.modelAutoInjectHint'))
3394
3313
  );
3395
3314
  };
3396
3315
  // 没有自己的 ComfyUI 工作流时,先插一个能跑 SD/SDXL 的骨架,改起来比重写快。
@@ -4110,7 +4029,8 @@ window.__ModuleLoader__.load({
4110
4029
  const entry = draft.modelOptions[id] || {};
4111
4030
  const fieldEntry = entry.fields && typeof entry.fields === 'object' ? entry.fields : {};
4112
4031
  const stored = Array.isArray(entry.params)
4113
- ? entry.params.filter((row) => row && typeof row === 'object' && !Array.isArray(row))
4032
+ ? entry.params.filter((row) => row && typeof row === 'object' && !Array.isArray(row)
4033
+ && (!settings.workflow || !isManagedComfyRow(row, entry.mapping)))
4114
4034
  : [];
4115
4035
  const savedByRole = new Map();
4116
4036
  for (const row of stored) {
@@ -4743,7 +4663,7 @@ window.__ModuleLoader__.load({
4743
4663
  ? t('form.modelMappingParsing')
4744
4664
  : t('form.modelMappingParse')) : null
4745
4665
  ),
4746
- mappingPanel(id),
4666
+ workflowAnalysisResult(id),
4747
4667
  h('p', { className: MC.advancedHint, style: FLUSH_TEXT_STYLE },
4748
4668
  t('form.paramWorkflowTableHint'))
4749
4669
  ] : [];
@@ -5567,7 +5487,7 @@ window.__ModuleLoader__.load({
5567
5487
  return ProviderFormLayout({ ...sharedFormLayout, compact: true });
5568
5488
  }
5569
5489
 
5570
- /** 设置页标题行:左边标题与说明,右边在有新版时显示更新按钮。 */
5490
+ /** 有新版时,入口显示在设置页标题旁。 */
5571
5491
  function UpdateHeader(props) {
5572
5492
  const t = props.t || fallbackTranslate;
5573
5493
  const status = props.status || {};
@@ -5576,7 +5496,7 @@ window.__ModuleLoader__.load({
5576
5496
  h('div', {
5577
5497
  'data-mo-image-wrap-row': '',
5578
5498
  'data-mo-image-update-header': '',
5579
- style: { display: 'flex', alignItems: 'center', justifyContent: 'space-between', gap: 12 }
5499
+ style: { display: 'flex', alignItems: 'center', justifyContent: 'flex-start', gap: 8 }
5580
5500
  },
5581
5501
  h('h2', { className: MC.title }, t('section.title')),
5582
5502
  busy || status.state === 'available'
@@ -5588,9 +5508,8 @@ window.__ModuleLoader__.load({
5588
5508
  onClick: props.onOpen,
5589
5509
  style: {
5590
5510
  flex: 'none',
5591
- padding: '3px 10px',
5592
- borderRadius: 999,
5593
- border: '1px solid var(--dsw-alias-state-business-primary, #4d6bfe)',
5511
+ padding: '3px 0',
5512
+ border: 0,
5594
5513
  background: 'transparent',
5595
5514
  color: 'var(--dsw-alias-state-business-primary, #4d6bfe)',
5596
5515
  fontSize: 12,
@@ -5743,6 +5662,88 @@ window.__ModuleLoader__.load({
5743
5662
  }, toast.text);
5744
5663
  }
5745
5664
 
5665
+ /**
5666
+ * 按「显示宽度」截断:中日韩字符算 2 列,其余按 1 列,超了补省略号。
5667
+ *
5668
+ * 删除确认里要嵌入提供商显示名,而名字是用户自己起的、可以很长。标题与按钮都是单行,
5669
+ * 不截断会把它们撑出弹窗(按钮尤其明显)。截断只影响标题和按钮;说明那一段仍用全名,
5670
+ * 那里会正常折行,用户一眼能确认删的是哪一个。
5671
+ */
5672
+ function truncateDisplay(text, maxColumns) {
5673
+ const value = String(text == null ? '' : text);
5674
+ const limit = Math.max(4, Number(maxColumns) || 0);
5675
+ const wide = /[\u1100-\u115f\u2e80-\ua4cf\uac00-\ud7a3\uf900-\ufaff\ufe30-\ufe4f\uff00-\uff60\uffe0-\uffe6]/u;
5676
+ let columns = 0;
5677
+ let out = '';
5678
+ for (const char of value) {
5679
+ const width = wide.test(char) ? 2 : 1;
5680
+ if (columns + width > limit) return out + '…';
5681
+ columns += width;
5682
+ out += char;
5683
+ }
5684
+ return out;
5685
+ }
5686
+
5687
+ /**
5688
+ * 删除提供商的确认弹窗:和「设置 → 对话模型」那张同一个原语(`Modal`)与同一套按钮层级
5689
+ * (取消在左、红色的删除在右),文案形状也一样——标题「删除 X?」、说明「会移除其配置和
5690
+ * 存储的 API 密钥」。
5691
+ *
5692
+ * 原语拿不到时(老宿主 / 单测)退到本地那张同构的弹窗,不做第二套交互。
5693
+ */
5694
+ function ConfirmDeleteProvider(props) {
5695
+ const t = props.t || fallbackTranslate;
5696
+ const name = String(props.name || '');
5697
+ // 标题和按钮各留一份短名;说明用全名。
5698
+ const short = truncateDisplay(name, 26);
5699
+ const cancelButton = DshButton
5700
+ ? h(DshButton, { variant: 'outline', 'data-modal-autofocus': '', onClick: props.onCancel }, t('form.cancel'))
5701
+ : h('button', { type: 'button', className: MC.secondaryButton, onClick: props.onCancel }, t('form.cancel'));
5702
+ const confirmButton = DshButton
5703
+ ? h(DshButton, { variant: 'outline', className: MC.dangerButton, onClick: props.onConfirm },
5704
+ t('delete.confirm', { name: short }))
5705
+ : h('button', { type: 'button', className: MC.dangerButton, onClick: props.onConfirm },
5706
+ t('delete.confirm', { name: short }));
5707
+ const title = t('delete.title', { name: short });
5708
+ const description = t('delete.description', { name: name });
5709
+ if (DshModal) {
5710
+ return h(DshModal, {
5711
+ open: true,
5712
+ onClose: props.onCancel,
5713
+ title: title,
5714
+ closeLabel: t('form.cancel'),
5715
+ description: description,
5716
+ className: MC.fetchDialog,
5717
+ footer: h(React.Fragment, null, cancelButton, confirmButton)
5718
+ }, null);
5719
+ }
5720
+ return createPortal(h('div', {
5721
+ style: {
5722
+ position: 'fixed', inset: 0, zIndex: 10000, padding: 16,
5723
+ display: 'flex', alignItems: 'center', justifyContent: 'center',
5724
+ background: 'rgba(0, 0, 0, 0.45)'
5725
+ },
5726
+ onMouseDown: (event) => { if (event.target === event.currentTarget) props.onCancel(); }
5727
+ }, h('div', {
5728
+ role: 'dialog', 'aria-modal': 'true', 'aria-label': title, tabIndex: -1,
5729
+ 'data-mo-image-dialog': '', 'data-mo-image-delete-dialog': '',
5730
+ onKeyDown: (event) => {
5731
+ if (event.key === 'Escape') { event.stopPropagation(); props.onCancel(); }
5732
+ },
5733
+ style: {
5734
+ width: 'min(420px, 100%)', display: 'flex', flexDirection: 'column', gap: 12,
5735
+ padding: '16px 18px', border: '0.5px solid var(--dsw-alias-border-l3)',
5736
+ borderRadius: 'var(--dsw-radius-xl)',
5737
+ background: 'var(--dsw-alias-bg-module-platform)', color: 'var(--dsw-alias-label-primary)',
5738
+ boxShadow: '0 18px 48px rgba(0, 0, 0, 0.28)'
5739
+ }
5740
+ },
5741
+ h('strong', { style: { fontSize: 15 } }, title),
5742
+ h('p', { className: MC.advancedHint, style: FLUSH_TEXT_STYLE }, description),
5743
+ h('div', { style: { display: 'flex', justifyContent: 'flex-end', gap: 8 } }, cancelButton, confirmButton)
5744
+ )), document.body);
5745
+ }
5746
+
5746
5747
  function ImageModelSettings(props) {
5747
5748
  useThemeClassRevision();
5748
5749
  const t = props.t || fallbackTranslate;
@@ -5752,6 +5753,9 @@ window.__ModuleLoader__.load({
5752
5753
  const saveError = imageStore.error;
5753
5754
  const setSaveError = imageStore.setError;
5754
5755
  const [edit, setEdit] = React.useState(null);
5756
+ // 删除提供商要二次确认(和「设置 → 对话模型」那张同一个原语、同一套文案形状):
5757
+ // 这一下会连它存着的 API 密钥一起清掉,点错代价很大。
5758
+ const [deleteTarget, setDeleteTarget] = React.useState(null);
5755
5759
  const [update, setUpdate] = React.useState(null);
5756
5760
  const [updateOpen, setUpdateOpen] = React.useState(false);
5757
5761
  React.useEffect(() => {
@@ -5775,7 +5779,7 @@ window.__ModuleLoader__.load({
5775
5779
  if (/^(link|file):/i.test(String(status.source || ''))) {
5776
5780
  pushToast(t('update.localDev'), 'warning');
5777
5781
  } else {
5778
- pushToast(t('update.unsupported', { command: t('update.command', { tag: 'v' + String(status.latest || '') }) }), 'warning');
5782
+ pushToast(t('update.unsupported', { command: t('update.command', { tag: String(status.latest || '') }) }), 'warning');
5779
5783
  }
5780
5784
  return;
5781
5785
  }
@@ -5787,7 +5791,7 @@ window.__ModuleLoader__.load({
5787
5791
  pushToast(
5788
5792
  code === 'update.localDev'
5789
5793
  ? t('update.localDev')
5790
- : t('update.unsupported', { command: t('update.command', { tag: 'v' + String(status.latest || '') }) }),
5794
+ : t('update.unsupported', { command: t('update.command', { tag: String(status.latest || '') }) }),
5791
5795
  'warning'
5792
5796
  );
5793
5797
  });
@@ -5838,16 +5842,20 @@ window.__ModuleLoader__.load({
5838
5842
  'aria-expanded': !!editing,
5839
5843
  onClick: () => setEdit(editing ? null : { provider: provider, isNew: false })
5840
5844
  }, t('action.edit')),
5841
- h('button', { type: 'button', className: MC.dangerButton, onClick: () => remove(provider) }, t('action.delete'))
5845
+ h('button', {
5846
+ type: 'button', className: MC.dangerButton,
5847
+ 'data-mo-image-delete-provider': provider.id,
5848
+ onClick: () => setDeleteTarget(provider)
5849
+ }, t('action.delete'))
5842
5850
  )
5843
5851
  ),
5844
- editing ? h(ImageProviderForm, { provider: edit.provider, onSave: save, onClose: () => setEdit(null), sizeAuto: store.defaults.auto !== false, t: t }) : null
5852
+ editing ? h(ImageProviderForm, { provider: edit.provider, onSave: save, onClose: () => setEdit(null), t: t }) : null
5845
5853
  );
5846
5854
  })
5847
5855
  ),
5848
5856
  h('div', { className: MC.addBlock },
5849
5857
  edit && edit.isNew
5850
- ? h('div', { className: MC.addCard }, h(ImageProviderForm, { provider: edit.provider, isNew: true, onSave: save, onClose: () => setEdit(null), sizeAuto: store.defaults.auto !== false, t: t }))
5858
+ ? h('div', { className: MC.addCard }, h(ImageProviderForm, { provider: edit.provider, isNew: true, onSave: save, onClose: () => setEdit(null), t: t }))
5851
5859
  : h('div', { className: MC.addActions },
5852
5860
  h('button', { type: 'button', className: MC.addButton, onClick: () => setEdit({ provider: { id: makeId(), name: '', baseUrl: '', key: '', apiKeyEnv: '', adapter: '', protocol: 'openai-images', optionalKey: false, models: [] }, isNew: true }) }, '+ ' + t('action.addProvider'))
5853
5861
  )
@@ -5857,6 +5865,13 @@ window.__ModuleLoader__.load({
5857
5865
  status: update || {},
5858
5866
  onClose: () => setUpdateOpen(false),
5859
5867
  onApply: applyUpdate
5868
+ }) : null,
5869
+ // 删除确认排在最后:和「设置 → 对话模型」那张同一个原语(Modal)+ 同一套按钮层级。
5870
+ deleteTarget ? h(ConfirmDeleteProvider, {
5871
+ t: t,
5872
+ name: deleteTarget.name || t('section.unnamedProvider'),
5873
+ onCancel: () => setDeleteTarget(null),
5874
+ onConfirm: () => { const target = deleteTarget; setDeleteTarget(null); remove(target); }
5860
5875
  }) : null
5861
5876
  );
5862
5877
  }
@@ -7774,6 +7789,9 @@ window.__ModuleLoader__.load({
7774
7789
  "action.edit": "编辑",
7775
7790
  "action.delete": "删除",
7776
7791
  "action.addProvider": "添加模型提供商",
7792
+ "delete.title": "删除 {name}?",
7793
+ "delete.description": "删除 {name} 会移除它在这份配置里的提供商信息与模型,并清掉已保存的 API 密钥。",
7794
+ "delete.confirm": "删除 {name}",
7777
7795
  "form.displayName": "显示名称",
7778
7796
  "form.baseUrl": "API 地址",
7779
7797
  "form.protocol": "API 协议",
@@ -7978,22 +7996,17 @@ window.__ModuleLoader__.load({
7978
7996
  "update.failedBroken": "更新安装失败,原版本也没能装回,请在插件管理里重新安装",
7979
7997
  "update.unsupported": "当前环境不支持自助更新,请运行 {command}",
7980
7998
  "update.localDev": "本地开发安装,请自行 git pull",
7981
- "update.command": "dsh plugin add dsh-mo-image@{tag}",
7999
+ "update.command": "dsh plugin --profile web add dsh-mo-image@{tag} --registry=https://registry.npmmirror.com",
7982
8000
  "update.viewRelease": "在 npm 查看",
7983
8001
  "update.noNotes": "暂无更新说明",
7984
8002
  "form.modelMappingParse": "解析工作流",
7985
8003
  "form.modelMappingParsing": "解析中…",
7986
8004
  "form.modelMappingFailed": "解析失败",
7987
- "form.modelMappingSkip": "不注入",
7988
8005
  "form.modelMappingFormatApi": "API 格式",
7989
8006
  "form.modelMappingFormatUi": "UI 格式",
7990
8007
  "form.modelMappingSampler": "采样器",
7991
- "form.modelMappingWidth": "宽度",
7992
- "form.modelMappingHeight": "高度",
7993
- "form.modelMappingImage": "参考图",
7994
- "form.modelMappingColName": "参数名",
7995
- "form.modelMappingColTarget": "参数映射",
7996
- "form.modelAutoInjectHint": "提示词与负面词由工具参数直接写入,不需要在这里配置。",
8008
+ "form.modelMappingAmbiguousImage": "检测到多个图像输入。用 {{image}} 标记一张参考图,或用 {{image_1}}、{{image_2}} 连续编号。",
8009
+ "form.modelAutoInjectHint": "提示词自动写入工作流。尺寸和支持的质量档位在模型选择器里调整。",
7997
8010
  "param.steps": "步数",
7998
8011
  "param.cfg": "提示词强度",
7999
8012
  "param.sampler_name": "采样器",
@@ -8078,7 +8091,7 @@ window.__ModuleLoader__.load({
8078
8091
  "form.paramDescN": "一次生成的张数",
8079
8092
  "form.paramNameHintWorkflow": "工作流参数的名字只是给对话模型看的键",
8080
8093
  "form.paramNameRequired": "参数名不能为空;留空的话请求里没有模型名,这个模型就发不出去",
8081
- "form.paramWorkflowTableHint": "下面是这个模型的参数表:解析工作流与解析参数得到的行都在这里,勾上「暴露」对话模型才能用 params 调",
8094
+ "form.paramWorkflowTableHint": "开启「暴露」后,对话模型可以调整对应的工作流参数。",
8082
8095
  "form.paramsEmptyWorkflow": "还没解析出参数。先粘贴工作流,再点「解析工作流」。",
8083
8096
  "form.paramsEmpty": "这个模型还没有可调参数,点「添加参数」自己加。",
8084
8097
  "form.a1111ParamRowsHint": "默认值会随请求发送;清空某一行的默认值就沿用 WebUI 里的设置",
@@ -8148,6 +8161,7 @@ window.__ModuleLoader__.load({
8148
8161
  "protocol.stability": "Stability AI",
8149
8162
  "protocol.dashscope-qwen-image": "百炼 Qwen-Image",
8150
8163
  "protocol.dashscope-wanx": "百炼 通义万相",
8164
+ "protocol.tokenhub-hy-image": "腾讯云 混元生图",
8151
8165
  "protocol.a1111": "AUTOMATIC1111",
8152
8166
  "protocol.comfyui": "ComfyUI",
8153
8167
  "protocol.swarmui": "SwarmUI",
@@ -8170,6 +8184,9 @@ window.__ModuleLoader__.load({
8170
8184
  "action.edit": "Edit",
8171
8185
  "action.delete": "Delete",
8172
8186
  "action.addProvider": "Add provider",
8187
+ "delete.title": "Delete {name}?",
8188
+ "delete.description": "Deleting {name} removes this provider and its models from the configuration, and clears the stored API key.",
8189
+ "delete.confirm": "Delete {name}",
8173
8190
  "form.displayName": "Display name",
8174
8191
  "form.baseUrl": "API URL",
8175
8192
  "form.protocol": "API protocol",
@@ -8374,22 +8391,17 @@ window.__ModuleLoader__.load({
8374
8391
  "update.failedBroken": "The update failed and the previous version was not restored — reinstall it from plugin management",
8375
8392
  "update.unsupported": "This environment cannot self-update; run {command}",
8376
8393
  "update.localDev": "Local development install — run git pull yourself",
8377
- "update.command": "dsh plugin add dsh-mo-image@{tag}",
8394
+ "update.command": "dsh plugin --profile web add dsh-mo-image@{tag} --registry=https://registry.npmmirror.com",
8378
8395
  "update.viewRelease": "View on npm",
8379
8396
  "update.noNotes": "This release has no notes.",
8380
8397
  "form.modelMappingParse": "Parse workflow",
8381
8398
  "form.modelMappingParsing": "Parsing…",
8382
8399
  "form.modelMappingFailed": "Parsing failed",
8383
- "form.modelMappingSkip": "Do not inject",
8384
8400
  "form.modelMappingFormatApi": "API format",
8385
8401
  "form.modelMappingFormatUi": "UI format",
8386
8402
  "form.modelMappingSampler": "Sampler",
8387
- "form.modelMappingWidth": "Width",
8388
- "form.modelMappingHeight": "Height",
8389
- "form.modelMappingImage": "Reference image",
8390
- "form.modelMappingColName": "Parameter",
8391
- "form.modelMappingColTarget": "Mapping",
8392
- "form.modelAutoInjectHint": "The prompt and negative prompt come straight from the tool call, so there is nothing to configure here.",
8403
+ "form.modelMappingAmbiguousImage": "Multiple image inputs found. Use {{image}} for one reference or number them with {{image_1}}, {{image_2}}, and so on.",
8404
+ "form.modelAutoInjectHint": "Prompts are inserted automatically. Adjust size and supported quality levels in the model picker.",
8393
8405
  "param.steps": "Steps",
8394
8406
  "param.cfg": "CFG scale",
8395
8407
  "param.sampler_name": "Sampler",
@@ -8474,7 +8486,7 @@ window.__ModuleLoader__.load({
8474
8486
  "form.paramDescN": "Images per request",
8475
8487
  "form.paramNameHintWorkflow": "A workflow parameter name is only the key the chat model sees",
8476
8488
  "form.paramNameRequired": "Parameter name cannot be empty; without it the request carries no model name and this model cannot be sent",
8477
- "form.paramWorkflowTableHint": "This is the model parameter table: rows from parsing the workflow and the inputs land here; only exposed rows can be tuned through params",
8489
+ "form.paramWorkflowTableHint": "Expose a workflow parameter to let the chat model adjust it.",
8478
8490
  "form.paramsEmptyWorkflow": "No parameters parsed yet. Paste a workflow, then click “Parse workflow”.",
8479
8491
  "form.paramsEmpty": "This model has no tunable parameters yet. Click “Add parameter” to add one.",
8480
8492
  "form.a1111ParamRowsHint": "Defaults are sent with the request; clear a default to fall back to the WebUI setting",
@@ -8544,6 +8556,7 @@ window.__ModuleLoader__.load({
8544
8556
  "protocol.stability": "Stability AI",
8545
8557
  "protocol.dashscope-qwen-image": "Alibaba Qwen-Image",
8546
8558
  "protocol.dashscope-wanx": "Alibaba Wanx",
8559
+ "protocol.tokenhub-hy-image": "TokenHub Hy-Image",
8547
8560
  "protocol.a1111": "AUTOMATIC1111",
8548
8561
  "protocol.comfyui": "ComfyUI",
8549
8562
  "protocol.swarmui": "SwarmUI",
@@ -8566,6 +8579,9 @@ window.__ModuleLoader__.load({
8566
8579
  "action.edit": "編集",
8567
8580
  "action.delete": "削除",
8568
8581
  "action.addProvider": "モデルプロバイダーを追加",
8582
+ "delete.title": "{name} を削除しますか?",
8583
+ "delete.description": "{name} を削除すると、この設定からプロバイダーとモデルが削除され、保存済みの API キーも消去されます。",
8584
+ "delete.confirm": "{name} を削除",
8569
8585
  "form.displayName": "表示名",
8570
8586
  "form.baseUrl": "API URL",
8571
8587
  "form.protocol": "API プロトコル",
@@ -8770,22 +8786,17 @@ window.__ModuleLoader__.load({
8770
8786
  "update.failedBroken": "更新のインストールに失敗し、元のバージョンにも戻せませんでした。プラグイン管理から再インストールしてください",
8771
8787
  "update.unsupported": "この環境では自動更新できません。{command} を実行してください",
8772
8788
  "update.localDev": "ローカル開発用のインストールです。git pull を実行してください",
8773
- "update.command": "dsh plugin add dsh-mo-image@{tag}",
8789
+ "update.command": "dsh plugin --profile web add dsh-mo-image@{tag} --registry=https://registry.npmmirror.com",
8774
8790
  "update.viewRelease": "npm で見る",
8775
8791
  "update.noNotes": "このリリースには説明がありません。",
8776
8792
  "form.modelMappingParse": "ワークフローを解析",
8777
8793
  "form.modelMappingParsing": "解析中…",
8778
8794
  "form.modelMappingFailed": "解析に失敗しました",
8779
- "form.modelMappingSkip": "注入しない",
8780
8795
  "form.modelMappingFormatApi": "API 形式",
8781
8796
  "form.modelMappingFormatUi": "UI 形式",
8782
8797
  "form.modelMappingSampler": "サンプラー",
8783
- "form.modelMappingWidth": "幅",
8784
- "form.modelMappingHeight": "高さ",
8785
- "form.modelMappingImage": "参照画像",
8786
- "form.modelMappingColName": "パラメータ",
8787
- "form.modelMappingColTarget": "マッピング",
8788
- "form.modelAutoInjectHint": "プロンプトとネガティブプロンプトはツール引数から直接書き込まれるため、ここでの設定は不要です。",
8798
+ "form.modelMappingAmbiguousImage": "画像入力が複数見つかりました。参照画像が1枚なら {{image}}、複数なら {{image_1}}、{{image_2}} のように指定してください。",
8799
+ "form.modelAutoInjectHint": "プロンプトは自動で入力されます。サイズと対応する品質レベルはモデル選択メニューで調整できます。",
8789
8800
  "param.steps": "ステップ数",
8790
8801
  "param.cfg": "プロンプト強度",
8791
8802
  "param.sampler_name": "サンプラー",
@@ -8870,7 +8881,7 @@ window.__ModuleLoader__.load({
8870
8881
  "form.paramDescN": "1回に生成する枚数",
8871
8882
  "form.paramNameHintWorkflow": "ワークフローパラメータの名前は対話モデルが見るキーです",
8872
8883
  "form.paramNameRequired": "パラメータ名は必須です。空欄だとリクエストにモデル名が入らず、このモデルは送信できません",
8873
- "form.paramWorkflowTableHint": "このモデルのパラメータ表です。ワークフロー解析とパラメータ解析の行はここに入り、「公開」した行だけ params で調整できます",
8884
+ "form.paramWorkflowTableHint": "ワークフローのパラメータを公開するとチャットモデルが調整できます。",
8874
8885
  "form.paramsEmptyWorkflow": "まだパラメータを解析していません。先にワークフローを貼り付け、「ワークフローを解析」をクリックしてください。",
8875
8886
  "form.paramsEmpty": "このモデルにはまだ調整できるパラメータがありません。「パラメータを追加」から追加してください。",
8876
8887
  "form.a1111ParamRowsHint": "既定値はリクエストと一緒に送信されます。空にすると WebUI の設定に従います",
@@ -8940,6 +8951,7 @@ window.__ModuleLoader__.load({
8940
8951
  "protocol.stability": "Stability AI",
8941
8952
  "protocol.dashscope-qwen-image": "Alibaba Qwen-Image",
8942
8953
  "protocol.dashscope-wanx": "Alibaba Wanx",
8954
+ "protocol.tokenhub-hy-image": "TokenHub Hy-Image",
8943
8955
  "protocol.a1111": "AUTOMATIC1111",
8944
8956
  "protocol.comfyui": "ComfyUI",
8945
8957
  "protocol.swarmui": "SwarmUI",
@@ -8962,6 +8974,9 @@ window.__ModuleLoader__.load({
8962
8974
  "action.edit": "Editar",
8963
8975
  "action.delete": "Eliminar",
8964
8976
  "action.addProvider": "Añadir proveedor",
8977
+ "delete.title": "¿Eliminar {name}?",
8978
+ "delete.description": "Eliminar {name} quita este proveedor y sus modelos de la configuración, y borra la clave de API guardada.",
8979
+ "delete.confirm": "Eliminar {name}",
8965
8980
  "form.displayName": "Nombre visible",
8966
8981
  "form.baseUrl": "URL de la API",
8967
8982
  "form.protocol": "Protocolo de API",
@@ -9166,22 +9181,17 @@ window.__ModuleLoader__.load({
9166
9181
  "update.failedBroken": "La actualización falló y no se restauró la versión anterior; reinstálala desde la gestión de complementos",
9167
9182
  "update.unsupported": "Este entorno no admite la actualización automática; ejecuta {command}",
9168
9183
  "update.localDev": "Instalación de desarrollo local: ejecuta git pull",
9169
- "update.command": "dsh plugin add dsh-mo-image@{tag}",
9184
+ "update.command": "dsh plugin --profile web add dsh-mo-image@{tag} --registry=https://registry.npmmirror.com",
9170
9185
  "update.viewRelease": "Ver en npm",
9171
9186
  "update.noNotes": "Esta versión no tiene notas.",
9172
9187
  "form.modelMappingParse": "Analizar flujo de trabajo",
9173
9188
  "form.modelMappingParsing": "Analizando…",
9174
9189
  "form.modelMappingFailed": "No se pudo analizar",
9175
- "form.modelMappingSkip": "No inyectar",
9176
9190
  "form.modelMappingFormatApi": "Formato API",
9177
9191
  "form.modelMappingFormatUi": "Formato UI",
9178
9192
  "form.modelMappingSampler": "Muestreador",
9179
- "form.modelMappingWidth": "Ancho",
9180
- "form.modelMappingHeight": "Alto",
9181
- "form.modelMappingImage": "Imagen de referencia",
9182
- "form.modelMappingColName": "Parámetro",
9183
- "form.modelMappingColTarget": "Mapeo",
9184
- "form.modelAutoInjectHint": "El prompt y el prompt negativo llegan de la llamada de la herramienta, así que aquí no hay nada que configurar.",
9193
+ "form.modelMappingAmbiguousImage": "Hay varias entradas de imagen. Usa {{image}} para una referencia o numéralas con {{image_1}}, {{image_2}}, etc.",
9194
+ "form.modelAutoInjectHint": "Los prompts se insertan automáticamente. Ajusta el tamaño y los niveles de calidad admitidos en el selector de modelos.",
9185
9195
  "param.steps": "Pasos",
9186
9196
  "param.cfg": "Intensidad del prompt",
9187
9197
  "param.sampler_name": "Muestreador",
@@ -9266,7 +9276,7 @@ window.__ModuleLoader__.load({
9266
9276
  "form.paramDescN": "Imágenes por petición",
9267
9277
  "form.paramNameHintWorkflow": "El nombre de un parámetro de flujo es solo la clave que ve el modelo",
9268
9278
  "form.paramNameRequired": "El nombre del parámetro no puede estar vacío; sin él la petición no lleva nombre de modelo y este modelo no se puede enviar",
9269
- "form.paramWorkflowTableHint": "Esta es la tabla de parámetros del modelo: aquí llegan las filas del flujo y de los parámetros analizados; solo las expuestas se ajustan con params",
9279
+ "form.paramWorkflowTableHint": "Expón un parámetro del flujo para que el modelo de chat pueda ajustarlo.",
9270
9280
  "form.paramsEmptyWorkflow": "Aún no hay parámetros analizados. Pega un flujo de trabajo y luego pulsa «Analizar flujo de trabajo».",
9271
9281
  "form.paramsEmpty": "Este modelo aún no tiene parámetros ajustables. Pulsa «Añadir parámetro» para crear uno.",
9272
9282
  "form.a1111ParamRowsHint": "Los valores por defecto se envían con la petición; vacía uno para usar la configuración del WebUI",
@@ -9336,6 +9346,7 @@ window.__ModuleLoader__.load({
9336
9346
  "protocol.stability": "Stability AI",
9337
9347
  "protocol.dashscope-qwen-image": "Alibaba Qwen-Image",
9338
9348
  "protocol.dashscope-wanx": "Alibaba Wanx",
9349
+ "protocol.tokenhub-hy-image": "TokenHub Hy-Image",
9339
9350
  "protocol.a1111": "AUTOMATIC1111",
9340
9351
  "protocol.comfyui": "ComfyUI",
9341
9352
  "protocol.swarmui": "SwarmUI",
@@ -9358,6 +9369,9 @@ window.__ModuleLoader__.load({
9358
9369
  "action.edit": "Modifier",
9359
9370
  "action.delete": "Supprimer",
9360
9371
  "action.addProvider": "Ajouter un fournisseur",
9372
+ "delete.title": "Supprimer {name} ?",
9373
+ "delete.description": "Supprimer {name} retire ce fournisseur et ses modèles de la configuration, et efface la clé d’API enregistrée.",
9374
+ "delete.confirm": "Supprimer {name}",
9361
9375
  "form.displayName": "Nom affiché",
9362
9376
  "form.baseUrl": "URL de l'API",
9363
9377
  "form.protocol": "Protocole d'API",
@@ -9562,22 +9576,17 @@ window.__ModuleLoader__.load({
9562
9576
  "update.failedBroken": "La mise à jour a échoué et la version précédente n'a pas été restaurée ; réinstallez le greffon depuis la gestion des plugins",
9563
9577
  "update.unsupported": "Cet environnement ne permet pas la mise à jour automatique ; exécutez {command}",
9564
9578
  "update.localDev": "Installation de développement local — lancez git pull",
9565
- "update.command": "dsh plugin add dsh-mo-image@{tag}",
9579
+ "update.command": "dsh plugin --profile web add dsh-mo-image@{tag} --registry=https://registry.npmmirror.com",
9566
9580
  "update.viewRelease": "Voir sur npm",
9567
9581
  "update.noNotes": "Cette version n'a pas de notes.",
9568
9582
  "form.modelMappingParse": "Analyser le workflow",
9569
9583
  "form.modelMappingParsing": "Analyse…",
9570
9584
  "form.modelMappingFailed": "Analyse impossible",
9571
- "form.modelMappingSkip": "Ne pas injecter",
9572
9585
  "form.modelMappingFormatApi": "Format API",
9573
9586
  "form.modelMappingFormatUi": "Format UI",
9574
9587
  "form.modelMappingSampler": "Sampler",
9575
- "form.modelMappingWidth": "Largeur",
9576
- "form.modelMappingHeight": "Hauteur",
9577
- "form.modelMappingImage": "Image de référence",
9578
- "form.modelMappingColName": "Paramètre",
9579
- "form.modelMappingColTarget": "Correspondance",
9580
- "form.modelAutoInjectHint": "Les prompts positif et négatif viennent de l'appel d'outil : rien à configurer ici.",
9588
+ "form.modelMappingAmbiguousImage": "Plusieurs entrées d’image détectées. Utilisez {{image}} pour une référence ou numérotez-les avec {{image_1}}, {{image_2}}, etc.",
9589
+ "form.modelAutoInjectHint": "Les prompts sont insérés automatiquement. Réglez la taille et les niveaux de qualité pris en charge dans le sélecteur de modèles.",
9581
9590
  "param.steps": "Étapes",
9582
9591
  "param.cfg": "Intensité du prompt",
9583
9592
  "param.sampler_name": "Échantillonneur",
@@ -9662,7 +9671,7 @@ window.__ModuleLoader__.load({
9662
9671
  "form.paramDescN": "Images par requête",
9663
9672
  "form.paramNameHintWorkflow": "Le nom d'un paramètre de workflow n'est que la clé vue par le modèle",
9664
9673
  "form.paramNameRequired": "Le nom du paramètre ne peut pas être vide ; sans lui la requête ne porte pas de nom de modèle et ce modèle ne peut pas être envoyé",
9665
- "form.paramWorkflowTableHint": "Voici la table des paramètres du modèle : les lignes issues de l'analyse du workflow et des entrées arrivent ici ; seules les lignes exposées se règlent via params",
9674
+ "form.paramWorkflowTableHint": "Exposez un paramètre du workflow pour que le modèle de chat puisse l’ajuster.",
9666
9675
  "form.paramsEmptyWorkflow": "Aucun paramètre analysé pour l’instant. Collez un workflow, puis cliquez sur « Analyser le workflow ».",
9667
9676
  "form.paramsEmpty": "Ce modèle n’a pas encore de paramètres réglables. Cliquez sur « Ajouter un paramètre » pour en créer un.",
9668
9677
  "form.a1111ParamRowsHint": "Les valeurs par défaut sont envoyées avec la requête ; videz-en une pour suivre le réglage du WebUI",
@@ -9732,6 +9741,7 @@ window.__ModuleLoader__.load({
9732
9741
  "protocol.stability": "Stability AI",
9733
9742
  "protocol.dashscope-qwen-image": "Alibaba Qwen-Image",
9734
9743
  "protocol.dashscope-wanx": "Alibaba Wanx",
9744
+ "protocol.tokenhub-hy-image": "TokenHub Hy-Image",
9735
9745
  "protocol.a1111": "AUTOMATIC1111",
9736
9746
  "protocol.comfyui": "ComfyUI",
9737
9747
  "protocol.swarmui": "SwarmUI",
@@ -9754,6 +9764,9 @@ window.__ModuleLoader__.load({
9754
9764
  "action.edit": "Bearbeiten",
9755
9765
  "action.delete": "Löschen",
9756
9766
  "action.addProvider": "Anbieter hinzufügen",
9767
+ "delete.title": "{name} löschen?",
9768
+ "delete.description": "Beim Löschen von {name} werden Anbieter und Modelle aus dieser Konfiguration entfernt und der gespeicherte API-Schlüssel gelöscht.",
9769
+ "delete.confirm": "{name} löschen",
9757
9770
  "form.displayName": "Anzeigename",
9758
9771
  "form.baseUrl": "API-URL",
9759
9772
  "form.protocol": "API-Protokoll",
@@ -9958,22 +9971,17 @@ window.__ModuleLoader__.load({
9958
9971
  "update.failedBroken": "Das Update ist fehlgeschlagen und die vorherige Version wurde nicht wiederhergestellt – installieren Sie das Plugin über die Plugin-Verwaltung neu",
9959
9972
  "update.unsupported": "Diese Umgebung kann sich nicht selbst aktualisieren; führen Sie {command} aus",
9960
9973
  "update.localDev": "Lokale Entwicklungsinstallation – bitte selbst git pull ausführen",
9961
- "update.command": "dsh plugin add dsh-mo-image@{tag}",
9974
+ "update.command": "dsh plugin --profile web add dsh-mo-image@{tag} --registry=https://registry.npmmirror.com",
9962
9975
  "update.viewRelease": "Auf npm ansehen",
9963
9976
  "update.noNotes": "Diese Version hat keine Hinweise.",
9964
9977
  "form.modelMappingParse": "Workflow analysieren",
9965
9978
  "form.modelMappingParsing": "Analysiere…",
9966
9979
  "form.modelMappingFailed": "Analyse fehlgeschlagen",
9967
- "form.modelMappingSkip": "Nicht einsetzen",
9968
9980
  "form.modelMappingFormatApi": "API-Format",
9969
9981
  "form.modelMappingFormatUi": "UI-Format",
9970
9982
  "form.modelMappingSampler": "Sampler",
9971
- "form.modelMappingWidth": "Breite",
9972
- "form.modelMappingHeight": "Höhe",
9973
- "form.modelMappingImage": "Referenzbild",
9974
- "form.modelMappingColName": "Parameter",
9975
- "form.modelMappingColTarget": "Zuordnung",
9976
- "form.modelAutoInjectHint": "Prompt und Negativ-Prompt kommen direkt aus dem Werkzeugaufruf, hier ist nichts einzustellen.",
9983
+ "form.modelMappingAmbiguousImage": "Mehrere Bildeingänge gefunden. Verwende {{image}} für eine Referenz oder nummeriere sie mit {{image_1}}, {{image_2}} usw.",
9984
+ "form.modelAutoInjectHint": "Prompts werden automatisch eingefügt. Größe und verfügbare Qualitätsstufen lassen sich in der Modellauswahl einstellen.",
9977
9985
  "param.steps": "Schritte",
9978
9986
  "param.cfg": "Prompt-Stärke",
9979
9987
  "param.sampler_name": "Sampler",
@@ -10058,7 +10066,7 @@ window.__ModuleLoader__.load({
10058
10066
  "form.paramDescN": "Bilder pro Anfrage",
10059
10067
  "form.paramNameHintWorkflow": "Der Name eines Workflow-Parameters ist nur der Schlüssel für das Chat-Modell",
10060
10068
  "form.paramNameRequired": "Der Parametername darf nicht leer sein; ohne ihn enthält die Anfrage keinen Modellnamen und dieses Modell kann nicht gesendet werden",
10061
- "form.paramWorkflowTableHint": "Das ist die Parametertabelle des Modells: Zeilen aus Workflow- und Parameteranalyse landen hier; nur freigegebene Zeilen lassen sich über params steuern",
10069
+ "form.paramWorkflowTableHint": "Gib einen Workflow-Parameter frei damit das Chatmodell ihn anpassen kann.",
10062
10070
  "form.paramsEmptyWorkflow": "Noch keine Parameter analysiert. Fügen Sie zuerst einen Workflow ein und klicken Sie dann auf „Workflow analysieren“.",
10063
10071
  "form.paramsEmpty": "Dieses Modell hat noch keine einstellbaren Parameter. Klicken Sie auf „Parameter hinzufügen“, um einen anzulegen.",
10064
10072
  "form.a1111ParamRowsHint": "Standardwerte werden mitgesendet; ein geleerter Wert folgt der WebUI-Einstellung",
@@ -10128,6 +10136,7 @@ window.__ModuleLoader__.load({
10128
10136
  "protocol.stability": "Stability AI",
10129
10137
  "protocol.dashscope-qwen-image": "Alibaba Qwen-Image",
10130
10138
  "protocol.dashscope-wanx": "Alibaba Wanx",
10139
+ "protocol.tokenhub-hy-image": "TokenHub Hy-Image",
10131
10140
  "protocol.a1111": "AUTOMATIC1111",
10132
10141
  "protocol.comfyui": "ComfyUI",
10133
10142
  "protocol.swarmui": "SwarmUI",
@@ -10150,6 +10159,9 @@ window.__ModuleLoader__.load({
10150
10159
  "action.edit": "Изменить",
10151
10160
  "action.delete": "Удалить",
10152
10161
  "action.addProvider": "Добавить поставщика",
10162
+ "delete.title": "Удалить {name}?",
10163
+ "delete.description": "Удаление {name} уберёт провайдера и модели из конфигурации и сотрёт сохранённый ключ API.",
10164
+ "delete.confirm": "Удалить {name}",
10153
10165
  "form.displayName": "Отображаемое имя",
10154
10166
  "form.baseUrl": "URL API",
10155
10167
  "form.protocol": "Протокол API",
@@ -10354,22 +10366,17 @@ window.__ModuleLoader__.load({
10354
10366
  "update.failedBroken": "Обновление не удалось, и прежняя версия не восстановлена — переустановите плагин в управлении плагинами",
10355
10367
  "update.unsupported": "Эта среда не поддерживает самообновление — выполните {command}",
10356
10368
  "update.localDev": "Локальная установка для разработки — выполните git pull",
10357
- "update.command": "dsh plugin add dsh-mo-image@{tag}",
10369
+ "update.command": "dsh plugin --profile web add dsh-mo-image@{tag} --registry=https://registry.npmmirror.com",
10358
10370
  "update.viewRelease": "Открыть на npm",
10359
10371
  "update.noNotes": "В этом выпуске нет примечаний.",
10360
10372
  "form.modelMappingParse": "Разобрать workflow",
10361
10373
  "form.modelMappingParsing": "Разбор…",
10362
10374
  "form.modelMappingFailed": "Не удалось разобрать",
10363
- "form.modelMappingSkip": "Не внедрять",
10364
10375
  "form.modelMappingFormatApi": "Формат API",
10365
10376
  "form.modelMappingFormatUi": "Формат UI",
10366
10377
  "form.modelMappingSampler": "Сэмплер",
10367
- "form.modelMappingWidth": "Ширина",
10368
- "form.modelMappingHeight": "Высота",
10369
- "form.modelMappingImage": "Референс",
10370
- "form.modelMappingColName": "Параметр",
10371
- "form.modelMappingColTarget": "Привязка",
10372
- "form.modelAutoInjectHint": "Промпт и негативный промпт подставляются из вызова инструмента, здесь настраивать нечего.",
10378
+ "form.modelMappingAmbiguousImage": "Найдено несколько входов для изображений. Используйте {{image}} для одного референса или нумеруйте их как {{image_1}}, {{image_2}} и т. д.",
10379
+ "form.modelAutoInjectHint": "Промпты подставляются автоматически. Размер и доступные уровни качества настраиваются в меню выбора модели.",
10373
10380
  "param.steps": "Шаги",
10374
10381
  "param.cfg": "Сила промпта",
10375
10382
  "param.sampler_name": "Сэмплер",
@@ -10454,7 +10461,7 @@ window.__ModuleLoader__.load({
10454
10461
  "form.paramDescN": "Изображений за запрос",
10455
10462
  "form.paramNameHintWorkflow": "Имя параметра workflow — только ключ для чат-модели",
10456
10463
  "form.paramNameRequired": "Имя параметра не может быть пустым; без него в запросе нет имени модели и эту модель нельзя отправить",
10457
- "form.paramWorkflowTableHint": "Это таблица параметров модели: строки из разбора workflow и входов попадают сюда; настраивать через params можно только показанные строки",
10464
+ "form.paramWorkflowTableHint": "Откройте параметр рабочего процесса для изменения моделью чата.",
10458
10465
  "form.paramsEmptyWorkflow": "Параметры ещё не разобраны. Вставьте workflow и нажмите «Разобрать workflow».",
10459
10466
  "form.paramsEmpty": "У этой модели пока нет настраиваемых параметров. Нажмите «Добавить параметр», чтобы создать.",
10460
10467
  "form.a1111ParamRowsHint": "Значения по умолчанию отправляются с запросом; очистите — возьмётся настройка WebUI",
@@ -10524,6 +10531,7 @@ window.__ModuleLoader__.load({
10524
10531
  "protocol.stability": "Stability AI",
10525
10532
  "protocol.dashscope-qwen-image": "Alibaba Qwen-Image",
10526
10533
  "protocol.dashscope-wanx": "Alibaba Wanx",
10534
+ "protocol.tokenhub-hy-image": "TokenHub Hy-Image",
10527
10535
  "protocol.a1111": "AUTOMATIC1111",
10528
10536
  "protocol.comfyui": "ComfyUI",
10529
10537
  "protocol.swarmui": "SwarmUI",
@@ -10546,6 +10554,9 @@ window.__ModuleLoader__.load({
10546
10554
  "action.edit": "Editar",
10547
10555
  "action.delete": "Excluir",
10548
10556
  "action.addProvider": "Adicionar provedor",
10557
+ "delete.title": "Excluir {name}?",
10558
+ "delete.description": "Excluir {name} remove o provedor e os modelos desta configuração e apaga a chave de API salva.",
10559
+ "delete.confirm": "Excluir {name}",
10549
10560
  "form.displayName": "Nome de exibição",
10550
10561
  "form.baseUrl": "URL da API",
10551
10562
  "form.protocol": "Protocolo da API",
@@ -10750,22 +10761,17 @@ window.__ModuleLoader__.load({
10750
10761
  "update.failedBroken": "A atualização falhou e a versão anterior não foi restaurada — reinstale pelo gerenciamento de plugins",
10751
10762
  "update.unsupported": "Este ambiente não permite atualização automática; execute {command}",
10752
10763
  "update.localDev": "Instalação de desenvolvimento local — execute git pull",
10753
- "update.command": "dsh plugin add dsh-mo-image@{tag}",
10764
+ "update.command": "dsh plugin --profile web add dsh-mo-image@{tag} --registry=https://registry.npmmirror.com",
10754
10765
  "update.viewRelease": "Ver no npm",
10755
10766
  "update.noNotes": "Esta versão não tem notas.",
10756
10767
  "form.modelMappingParse": "Analisar fluxo",
10757
10768
  "form.modelMappingParsing": "Analisando…",
10758
10769
  "form.modelMappingFailed": "Falha ao analisar",
10759
- "form.modelMappingSkip": "Não injetar",
10760
10770
  "form.modelMappingFormatApi": "Formato API",
10761
10771
  "form.modelMappingFormatUi": "Formato UI",
10762
10772
  "form.modelMappingSampler": "Amostrador",
10763
- "form.modelMappingWidth": "Largura",
10764
- "form.modelMappingHeight": "Altura",
10765
- "form.modelMappingImage": "Imagem de referência",
10766
- "form.modelMappingColName": "Parâmetro",
10767
- "form.modelMappingColTarget": "Mapeamento",
10768
- "form.modelAutoInjectHint": "O prompt e o prompt negativo vêm da chamada da ferramenta; não há nada para configurar aqui.",
10773
+ "form.modelMappingAmbiguousImage": "Há várias entradas de imagem. Use {{image}} para uma referência ou numere-as com {{image_1}}, {{image_2}} e assim por diante.",
10774
+ "form.modelAutoInjectHint": "Os prompts são inseridos automaticamente. Ajuste o tamanho e os níveis de qualidade disponíveis no seletor de modelos.",
10769
10775
  "param.steps": "Passos",
10770
10776
  "param.cfg": "Intensidade do prompt",
10771
10777
  "param.sampler_name": "Amostrador",
@@ -10850,7 +10856,7 @@ window.__ModuleLoader__.load({
10850
10856
  "form.paramDescN": "Imagens por requisição",
10851
10857
  "form.paramNameHintWorkflow": "O nome de um parâmetro de fluxo é só a chave vista pelo modelo",
10852
10858
  "form.paramNameRequired": "O nome do parâmetro não pode ficar vazio; sem ele a requisição não leva nome de modelo e este modelo não pode ser enviado",
10853
- "form.paramWorkflowTableHint": "Esta é a tabela de parâmetros do modelo: as linhas da análise do fluxo e das entradas ficam aqui; só as expostas podem ser ajustadas via params",
10859
+ "form.paramWorkflowTableHint": "Exponha um parâmetro do fluxo para permitir que o modelo de chat o ajuste.",
10854
10860
  "form.paramsEmptyWorkflow": "Nenhum parâmetro analisado ainda. Cole um fluxo de trabalho e clique em «Analisar fluxo».",
10855
10861
  "form.paramsEmpty": "Este modelo ainda não tem parâmetros ajustáveis. Clique em «Adicionar parâmetro» para criar um.",
10856
10862
  "form.a1111ParamRowsHint": "Os padrões são enviados com a requisição; limpe um valor para seguir a configuração do WebUI",
@@ -10920,6 +10926,7 @@ window.__ModuleLoader__.load({
10920
10926
  "protocol.stability": "Stability AI",
10921
10927
  "protocol.dashscope-qwen-image": "Alibaba Qwen-Image",
10922
10928
  "protocol.dashscope-wanx": "Alibaba Wanx",
10929
+ "protocol.tokenhub-hy-image": "TokenHub Hy-Image",
10923
10930
  "protocol.a1111": "AUTOMATIC1111",
10924
10931
  "protocol.comfyui": "ComfyUI",
10925
10932
  "protocol.swarmui": "SwarmUI",