dsh-supermesh 0.0.4 → 0.0.6

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/dist/client.cjs CHANGED
@@ -6296,6 +6296,11 @@ const dicts = {
6296
6296
  settingAdministrators: "管理员登录名",
6297
6297
  settingAdministratorsHelp: "填写人类管理员的平台登录名,以逗号或空格分隔,最多 100 个。此白名单全渠道共用,只需配置一次;不要填写 bot 账号、显示名称或 URL,也不需要 Token。只有白名单中的人类可以通过新话题或 @bot 评论首次派工;留空阻止新派工,已有任务仍接收人类跟进。",
6298
6298
  settingAdministratorsInvalid: "请填写有效的平台登录名,不要填写 @、显示名称或 URL;最多 100 个。",
6299
+ settingInferred: "未 @ bot 的消息",
6300
+ settingInferredHelp: "没 @ bot 的 issue 和评论只能是 inferred 候选。只记录:不进流程,只留在触发时间线;只分诊(默认):进流程做分诊,但建票会被拒绝;允许建票:候选也能开票派工。要开工仍然以人明确 @ bot 最可靠。",
6301
+ settingInferredOff: "只记录",
6302
+ settingInferredObserve: "只分诊",
6303
+ settingInferredAuto: "允许建票",
6299
6304
  settingGeneralSaveFailed: "通用设置保存失败,请重试。",
6300
6305
  settingSaveFailed: "设置保存失败,请重试。",
6301
6306
  settingAddRepository: "新增仓库",
@@ -6716,6 +6721,11 @@ const dicts = {
6716
6721
  settingAdministrators: "Administrator usernames",
6717
6722
  settingAdministratorsHelp: "Enter human administrator platform usernames separated by commas or spaces, up to 100. Configure this shared allowlist once for all channels. Do not enter bot accounts, display names, or URLs; no token is required. Only listed humans can start tasks through new topics or @bot comments. An empty list blocks new tasks; existing tasks still receive human follow-ups.",
6718
6723
  settingAdministratorsInvalid: "Enter valid platform usernames, not @mentions, display names, or URLs; up to 100.",
6724
+ settingInferred: "Messages that do not mention the bot",
6725
+ settingInferredHelp: "An issue or comment that does not mention the bot is only an inferred candidate. Record only: it never enters the flow and stays on the trigger timeline. Triage only (default): it enters for triage, but ticket creation is refused. Allow tickets: a candidate may start work. Mentioning the bot remains the reliable way to start work.",
6726
+ settingInferredOff: "Record only",
6727
+ settingInferredObserve: "Triage only",
6728
+ settingInferredAuto: "Allow tickets",
6719
6729
  settingGeneralSaveFailed: "Could not save general settings. Try again.",
6720
6730
  settingSaveFailed: "Could not save settings. Try again.",
6721
6731
  settingAddRepository: "Add repository",
@@ -62270,18 +62280,28 @@ const LIMITS = {
62270
62280
  max: 3600
62271
62281
  }
62272
62282
  };
62283
+ const INFERRED_MODES = [
62284
+ "off",
62285
+ "observe",
62286
+ "auto"
62287
+ ];
62273
62288
  function administratorSignature(administrators) {
62274
62289
  return [...new Set(administrators.join(",").split(/[,\s]+/).filter(Boolean).map((name) => name.toLowerCase()))].sort().join(",");
62275
62290
  }
62276
62291
  function validSettings(settings) {
62277
- return Array.isArray(settings.administrators) && settings.administrators.length <= 100 && settings.administrators.every((name) => typeof name === "string" && /^[a-z0-9][\w.-]{0,254}$/i.test(name.trim())) && typeof settings.autoMerge === "boolean" && typeof settings.autoArchiveWorkers === "boolean" && Object.entries(LIMITS).every(([key, limits]) => {
62292
+ return Array.isArray(settings.administrators) && settings.administrators.length <= 100 && settings.administrators.every((name) => typeof name === "string" && /^[a-z0-9][\w.-]{0,254}$/i.test(name.trim())) && INFERRED_MODES.includes(settings.inferred) && typeof settings.autoMerge === "boolean" && typeof settings.autoArchiveWorkers === "boolean" && Object.entries(LIMITS).every(([key, limits]) => {
62278
62293
  const value = settings[key];
62279
62294
  return Number.isInteger(value) && value >= limits.min && value <= limits.max;
62280
62295
  });
62281
62296
  }
62282
62297
  // src/client/pages/setting/components/general.tsx
62298
+ const INFERRED_LABELS = {
62299
+ off: "settingInferredOff",
62300
+ observe: "settingInferredObserve",
62301
+ auto: "settingInferredAuto"
62302
+ };
62283
62303
  function General(t0) {
62284
- const $ = (0, import_dist.c)(104);
62304
+ const $ = (0, import_dist.c)(132);
62285
62305
  const { value, baseline, pending, failed, onChange, onDiscard, onSave } = t0;
62286
62306
  const { t } = useTranslation();
62287
62307
  const id = (0, react.useId)();
@@ -62303,105 +62323,109 @@ function General(t0) {
62303
62323
  }
62304
62324
  const valid = t1;
62305
62325
  let t2;
62306
- if ($[4] !== baseline.administrators || $[5] !== baseline.autoArchiveWorkers || $[6] !== value.administrators || $[7] !== value.autoArchiveWorkers) {
62307
- t2 = administratorSignature(value.administrators) !== administratorSignature(baseline.administrators) || value.autoArchiveWorkers !== baseline.autoArchiveWorkers;
62326
+ if ($[4] !== baseline.administrators || $[5] !== baseline.autoArchiveWorkers || $[6] !== baseline.inferred || $[7] !== value.administrators || $[8] !== value.autoArchiveWorkers || $[9] !== value.inferred) {
62327
+ t2 = administratorSignature(value.administrators) !== administratorSignature(baseline.administrators) || value.inferred !== baseline.inferred || value.autoArchiveWorkers !== baseline.autoArchiveWorkers;
62308
62328
  $[4] = baseline.administrators;
62309
62329
  $[5] = baseline.autoArchiveWorkers;
62310
- $[6] = value.administrators;
62311
- $[7] = value.autoArchiveWorkers;
62312
- $[8] = t2;
62313
- } else t2 = $[8];
62330
+ $[6] = baseline.inferred;
62331
+ $[7] = value.administrators;
62332
+ $[8] = value.autoArchiveWorkers;
62333
+ $[9] = value.inferred;
62334
+ $[10] = t2;
62335
+ } else t2 = $[10];
62314
62336
  const dirty = t2;
62315
62337
  const t3 = `${id}-title`;
62316
62338
  let t4;
62317
- if ($[9] !== dirty || $[10] !== names || $[11] !== onSave || $[12] !== pending || $[13] !== valid || $[14] !== value.autoArchiveWorkers) {
62339
+ if ($[11] !== dirty || $[12] !== names || $[13] !== onSave || $[14] !== pending || $[15] !== valid || $[16] !== value.autoArchiveWorkers || $[17] !== value.inferred) {
62318
62340
  t4 = (event) => {
62319
62341
  event.preventDefault();
62320
62342
  if (dirty && valid && !pending) onSave({
62321
62343
  administrators: names,
62344
+ inferred: value.inferred,
62322
62345
  autoArchiveWorkers: value.autoArchiveWorkers
62323
62346
  });
62324
62347
  };
62325
- $[9] = dirty;
62326
- $[10] = names;
62327
- $[11] = onSave;
62328
- $[12] = pending;
62329
- $[13] = valid;
62330
- $[14] = value.autoArchiveWorkers;
62331
- $[15] = t4;
62332
- } else t4 = $[15];
62348
+ $[11] = dirty;
62349
+ $[12] = names;
62350
+ $[13] = onSave;
62351
+ $[14] = pending;
62352
+ $[15] = valid;
62353
+ $[16] = value.autoArchiveWorkers;
62354
+ $[17] = value.inferred;
62355
+ $[18] = t4;
62356
+ } else t4 = $[18];
62333
62357
  const t5 = `${id}-title`;
62334
62358
  let t6;
62335
- if ($[16] !== t) {
62359
+ if ($[19] !== t) {
62336
62360
  t6 = t("settingGeneral");
62337
- $[16] = t;
62338
- $[17] = t6;
62339
- } else t6 = $[17];
62361
+ $[19] = t;
62362
+ $[20] = t6;
62363
+ } else t6 = $[20];
62340
62364
  let t7;
62341
- if ($[18] !== t5 || $[19] !== t6) {
62365
+ if ($[21] !== t5 || $[22] !== t6) {
62342
62366
  t7 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)("h3", {
62343
62367
  id: t5,
62344
62368
  className: "m-0 text-sm font-medium",
62345
62369
  children: t6
62346
62370
  });
62347
- $[18] = t5;
62348
- $[19] = t6;
62349
- $[20] = t7;
62350
- } else t7 = $[20];
62371
+ $[21] = t5;
62372
+ $[22] = t6;
62373
+ $[23] = t7;
62374
+ } else t7 = $[23];
62351
62375
  let t8;
62352
- if ($[21] !== t) {
62376
+ if ($[24] !== t) {
62353
62377
  t8 = t("settingGeneralDescription");
62354
- $[21] = t;
62355
- $[22] = t8;
62356
- } else t8 = $[22];
62378
+ $[24] = t;
62379
+ $[25] = t8;
62380
+ } else t8 = $[25];
62357
62381
  let t9;
62358
- if ($[23] !== t8) {
62382
+ if ($[26] !== t8) {
62359
62383
  t9 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
62360
62384
  className: "m-0 mt-1.5 text-xs leading-5 text-(--dsw-alias-label-secondary)",
62361
62385
  children: t8
62362
62386
  });
62363
- $[23] = t8;
62364
- $[24] = t9;
62365
- } else t9 = $[24];
62387
+ $[26] = t8;
62388
+ $[27] = t9;
62389
+ } else t9 = $[27];
62366
62390
  let t10;
62367
- if ($[25] !== t7 || $[26] !== t9) {
62391
+ if ($[28] !== t7 || $[29] !== t9) {
62368
62392
  t10 = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("header", {
62369
62393
  className: "px-4 py-3",
62370
62394
  children: [t7, t9]
62371
62395
  });
62372
- $[25] = t7;
62373
- $[26] = t9;
62374
- $[27] = t10;
62375
- } else t10 = $[27];
62396
+ $[28] = t7;
62397
+ $[29] = t9;
62398
+ $[30] = t10;
62399
+ } else t10 = $[30];
62376
62400
  const t11 = `${id}-administrators`;
62377
62401
  let t12;
62378
- if ($[28] !== t) {
62402
+ if ($[31] !== t) {
62379
62403
  t12 = t("settingAdministrators");
62380
- $[28] = t;
62381
- $[29] = t12;
62382
- } else t12 = $[29];
62404
+ $[31] = t;
62405
+ $[32] = t12;
62406
+ } else t12 = $[32];
62383
62407
  let t13;
62384
- if ($[30] !== t11 || $[31] !== t12) {
62408
+ if ($[33] !== t11 || $[34] !== t12) {
62385
62409
  t13 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)("label", {
62386
62410
  htmlFor: t11,
62387
62411
  className: "text-xs font-medium",
62388
62412
  children: t12
62389
62413
  });
62390
- $[30] = t11;
62391
- $[31] = t12;
62392
- $[32] = t13;
62393
- } else t13 = $[32];
62414
+ $[33] = t11;
62415
+ $[34] = t12;
62416
+ $[35] = t13;
62417
+ } else t13 = $[35];
62394
62418
  const t14 = `${id}-administrators`;
62395
62419
  let t15;
62396
- if ($[33] !== onChange) {
62420
+ if ($[36] !== onChange) {
62397
62421
  t15 = (event_0) => onChange({ administrators: event_0.target.value.split(",") });
62398
- $[33] = onChange;
62399
- $[34] = t15;
62400
- } else t15 = $[34];
62422
+ $[36] = onChange;
62423
+ $[37] = t15;
62424
+ } else t15 = $[37];
62401
62425
  const t16 = !valid;
62402
62426
  const t17 = `${id}-help`;
62403
62427
  let t18;
62404
- if ($[35] !== administrators || $[36] !== pending || $[37] !== t14 || $[38] !== t15 || $[39] !== t16 || $[40] !== t17) {
62428
+ if ($[38] !== administrators || $[39] !== pending || $[40] !== t14 || $[41] !== t15 || $[42] !== t16 || $[43] !== t17) {
62405
62429
  t18 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Input, {
62406
62430
  id: t14,
62407
62431
  value: administrators,
@@ -62412,56 +62436,56 @@ function General(t0) {
62412
62436
  "aria-invalid": t16,
62413
62437
  "aria-describedby": t17
62414
62438
  });
62415
- $[35] = administrators;
62416
- $[36] = pending;
62417
- $[37] = t14;
62418
- $[38] = t15;
62419
- $[39] = t16;
62420
- $[40] = t17;
62421
- $[41] = t18;
62422
- } else t18 = $[41];
62439
+ $[38] = administrators;
62440
+ $[39] = pending;
62441
+ $[40] = t14;
62442
+ $[41] = t15;
62443
+ $[42] = t16;
62444
+ $[43] = t17;
62445
+ $[44] = t18;
62446
+ } else t18 = $[44];
62423
62447
  const t19 = `${id}-help`;
62424
62448
  let t20;
62425
- if ($[42] !== t) {
62449
+ if ($[45] !== t) {
62426
62450
  t20 = t("settingAdministratorsHelp");
62427
- $[42] = t;
62428
- $[43] = t20;
62429
- } else t20 = $[43];
62451
+ $[45] = t;
62452
+ $[46] = t20;
62453
+ } else t20 = $[46];
62430
62454
  let t21;
62431
- if ($[44] !== t19 || $[45] !== t20) {
62455
+ if ($[47] !== t19 || $[48] !== t20) {
62432
62456
  t21 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
62433
62457
  id: t19,
62434
62458
  className: "m-0 text-xs leading-5 text-(--dsw-alias-label-secondary)",
62435
62459
  children: t20
62436
62460
  });
62437
- $[44] = t19;
62438
- $[45] = t20;
62439
- $[46] = t21;
62440
- } else t21 = $[46];
62461
+ $[47] = t19;
62462
+ $[48] = t20;
62463
+ $[49] = t21;
62464
+ } else t21 = $[49];
62441
62465
  let t22;
62442
- if ($[47] !== t || $[48] !== valid) {
62466
+ if ($[50] !== t || $[51] !== valid) {
62443
62467
  t22 = !valid && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
62444
62468
  role: "alert",
62445
62469
  className: "m-0 text-xs text-(--dsw-alias-state-error-primary)",
62446
62470
  children: t("settingAdministratorsInvalid")
62447
62471
  });
62448
- $[47] = t;
62449
- $[48] = valid;
62450
- $[49] = t22;
62451
- } else t22 = $[49];
62472
+ $[50] = t;
62473
+ $[51] = valid;
62474
+ $[52] = t22;
62475
+ } else t22 = $[52];
62452
62476
  let t23;
62453
- if ($[50] !== failed || $[51] !== t) {
62477
+ if ($[53] !== failed || $[54] !== t) {
62454
62478
  t23 = failed && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
62455
62479
  role: "alert",
62456
62480
  className: "m-0 text-xs text-(--dsw-alias-state-error-primary)",
62457
62481
  children: t("settingGeneralSaveFailed")
62458
62482
  });
62459
- $[50] = failed;
62460
- $[51] = t;
62461
- $[52] = t23;
62462
- } else t23 = $[52];
62483
+ $[53] = failed;
62484
+ $[54] = t;
62485
+ $[55] = t23;
62486
+ } else t23 = $[55];
62463
62487
  let t24;
62464
- if ($[53] !== t13 || $[54] !== t18 || $[55] !== t21 || $[56] !== t22 || $[57] !== t23) {
62488
+ if ($[56] !== t13 || $[57] !== t18 || $[58] !== t21 || $[59] !== t22 || $[60] !== t23) {
62465
62489
  t24 = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
62466
62490
  className: "flex flex-col gap-2 border-t border-(--dsw-alias-border-l3) px-4 py-3",
62467
62491
  children: [
@@ -62472,166 +62496,252 @@ function General(t0) {
62472
62496
  t23
62473
62497
  ]
62474
62498
  });
62475
- $[53] = t13;
62476
- $[54] = t18;
62477
- $[55] = t21;
62478
- $[56] = t22;
62479
- $[57] = t23;
62480
- $[58] = t24;
62481
- } else t24 = $[58];
62499
+ $[56] = t13;
62500
+ $[57] = t18;
62501
+ $[58] = t21;
62502
+ $[59] = t22;
62503
+ $[60] = t23;
62504
+ $[61] = t24;
62505
+ } else t24 = $[61];
62482
62506
  let t25;
62483
- if ($[59] !== t) {
62484
- t25 = t("settingAutoArchiveWorkers");
62485
- $[59] = t;
62486
- $[60] = t25;
62487
- } else t25 = $[60];
62507
+ if ($[62] !== t) {
62508
+ t25 = t("settingInferred");
62509
+ $[62] = t;
62510
+ $[63] = t25;
62511
+ } else t25 = $[63];
62488
62512
  let t26;
62489
- if ($[61] !== t25) {
62513
+ if ($[64] !== t25) {
62490
62514
  t26 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)("h4", {
62491
62515
  className: "m-0 text-xs font-medium",
62492
62516
  children: t25
62493
62517
  });
62494
- $[61] = t25;
62495
- $[62] = t26;
62496
- } else t26 = $[62];
62518
+ $[64] = t25;
62519
+ $[65] = t26;
62520
+ } else t26 = $[65];
62497
62521
  let t27;
62498
- if ($[63] !== t) {
62499
- t27 = t("settingAutoArchiveWorkersHelp");
62500
- $[63] = t;
62501
- $[64] = t27;
62502
- } else t27 = $[64];
62522
+ if ($[66] !== t) {
62523
+ t27 = t("settingInferredHelp");
62524
+ $[66] = t;
62525
+ $[67] = t27;
62526
+ } else t27 = $[67];
62503
62527
  let t28;
62504
- if ($[65] !== t27) {
62528
+ if ($[68] !== t27) {
62505
62529
  t28 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
62506
62530
  className: "m-0 mt-1.5 max-w-lg text-xs leading-5 text-(--dsw-alias-label-secondary)",
62507
62531
  children: t27
62508
62532
  });
62509
- $[65] = t27;
62510
- $[66] = t28;
62511
- } else t28 = $[66];
62533
+ $[68] = t27;
62534
+ $[69] = t28;
62535
+ } else t28 = $[69];
62512
62536
  let t29;
62513
- if ($[67] !== t26 || $[68] !== t28) {
62537
+ if ($[70] !== t26 || $[71] !== t28) {
62514
62538
  t29 = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
62515
62539
  className: "min-w-0",
62516
62540
  children: [t26, t28]
62517
62541
  });
62518
- $[67] = t26;
62519
- $[68] = t28;
62520
- $[69] = t29;
62521
- } else t29 = $[69];
62522
- const t30 = value.autoArchiveWorkers;
62542
+ $[70] = t26;
62543
+ $[71] = t28;
62544
+ $[72] = t29;
62545
+ } else t29 = $[72];
62546
+ let t30;
62547
+ if ($[73] !== t) {
62548
+ t30 = t("settingInferred");
62549
+ $[73] = t;
62550
+ $[74] = t30;
62551
+ } else t30 = $[74];
62523
62552
  let t31;
62524
- if ($[70] !== t) {
62525
- t31 = t("settingAutoArchiveWorkers");
62526
- $[70] = t;
62527
- $[71] = t31;
62528
- } else t31 = $[71];
62553
+ if ($[75] !== onChange || $[76] !== pending || $[77] !== t || $[78] !== value.inferred) {
62554
+ t31 = INFERRED_MODES.map((mode) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
62555
+ type: "button",
62556
+ "aria-pressed": value.inferred === mode,
62557
+ disabled: pending,
62558
+ onClick: () => onChange({ inferred: mode }),
62559
+ className: `cursor-pointer rounded-md border-0 px-2.5 py-1.5 font-[inherit] text-xs outline-none transition-colors focus-visible:outline-2 focus-visible:outline-(--dsw-alias-state-business-primary) ${value.inferred === mode ? "bg-(--dsw-alias-bg-layer-1) font-medium text-(--dsw-alias-label-primary)" : "bg-transparent text-(--dsw-alias-label-secondary) hover:bg-(--dsw-alias-bg-layer-1)"}`,
62560
+ children: t(INFERRED_LABELS[mode])
62561
+ }, mode));
62562
+ $[75] = onChange;
62563
+ $[76] = pending;
62564
+ $[77] = t;
62565
+ $[78] = value.inferred;
62566
+ $[79] = t31;
62567
+ } else t31 = $[79];
62529
62568
  let t32;
62530
- if ($[72] !== onChange) {
62531
- t32 = (autoArchiveWorkers) => onChange({ autoArchiveWorkers });
62532
- $[72] = onChange;
62533
- $[73] = t32;
62534
- } else t32 = $[73];
62569
+ if ($[80] !== t30 || $[81] !== t31) {
62570
+ t32 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
62571
+ role: "group",
62572
+ "aria-label": t30,
62573
+ className: "flex shrink-0 gap-1 rounded-lg bg-(--dsw-alias-card-fill) p-1",
62574
+ children: t31
62575
+ });
62576
+ $[80] = t30;
62577
+ $[81] = t31;
62578
+ $[82] = t32;
62579
+ } else t32 = $[82];
62535
62580
  let t33;
62536
- if ($[74] !== pending || $[75] !== t31 || $[76] !== t32 || $[77] !== value.autoArchiveWorkers) {
62537
- t33 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Switch, {
62538
- disabled: pending,
62539
- checked: t30,
62540
- label: t31,
62541
- onChange: t32
62542
- });
62543
- $[74] = pending;
62544
- $[75] = t31;
62545
- $[76] = t32;
62546
- $[77] = value.autoArchiveWorkers;
62547
- $[78] = t33;
62548
- } else t33 = $[78];
62549
- let t34;
62550
- if ($[79] !== t29 || $[80] !== t33) {
62551
- t34 = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
62581
+ if ($[83] !== t29 || $[84] !== t32) {
62582
+ t33 = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
62552
62583
  className: "flex items-start justify-between gap-5 border-t border-(--dsw-alias-border-l3) px-4 py-3",
62553
- children: [t29, t33]
62584
+ children: [t29, t32]
62585
+ });
62586
+ $[83] = t29;
62587
+ $[84] = t32;
62588
+ $[85] = t33;
62589
+ } else t33 = $[85];
62590
+ let t34;
62591
+ if ($[86] !== t) {
62592
+ t34 = t("settingAutoArchiveWorkers");
62593
+ $[86] = t;
62594
+ $[87] = t34;
62595
+ } else t34 = $[87];
62596
+ let t35;
62597
+ if ($[88] !== t34) {
62598
+ t35 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)("h4", {
62599
+ className: "m-0 text-xs font-medium",
62600
+ children: t34
62554
62601
  });
62555
- $[79] = t29;
62556
- $[80] = t33;
62557
- $[81] = t34;
62558
- } else t34 = $[81];
62559
- const t35 = pending || !dirty;
62602
+ $[88] = t34;
62603
+ $[89] = t35;
62604
+ } else t35 = $[89];
62560
62605
  let t36;
62561
- if ($[82] !== t) {
62562
- t36 = t("settingDiscard");
62563
- $[82] = t;
62564
- $[83] = t36;
62565
- } else t36 = $[83];
62606
+ if ($[90] !== t) {
62607
+ t36 = t("settingAutoArchiveWorkersHelp");
62608
+ $[90] = t;
62609
+ $[91] = t36;
62610
+ } else t36 = $[91];
62566
62611
  let t37;
62567
- if ($[84] !== onDiscard || $[85] !== t35 || $[86] !== t36) {
62568
- t37 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
62569
- type: "button",
62570
- size: "sm",
62571
- variant: "ghost",
62572
- disabled: t35,
62573
- onClick: onDiscard,
62612
+ if ($[92] !== t36) {
62613
+ t37 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
62614
+ className: "m-0 mt-1.5 max-w-lg text-xs leading-5 text-(--dsw-alias-label-secondary)",
62574
62615
  children: t36
62575
62616
  });
62576
- $[84] = onDiscard;
62577
- $[85] = t35;
62578
- $[86] = t36;
62579
- $[87] = t37;
62580
- } else t37 = $[87];
62581
- const t38 = pending || !dirty || !valid;
62582
- const t39 = pending ? "channelSaving" : "settingSave";
62617
+ $[92] = t36;
62618
+ $[93] = t37;
62619
+ } else t37 = $[93];
62620
+ let t38;
62621
+ if ($[94] !== t35 || $[95] !== t37) {
62622
+ t38 = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
62623
+ className: "min-w-0",
62624
+ children: [t35, t37]
62625
+ });
62626
+ $[94] = t35;
62627
+ $[95] = t37;
62628
+ $[96] = t38;
62629
+ } else t38 = $[96];
62630
+ const t39 = value.autoArchiveWorkers;
62583
62631
  let t40;
62584
- if ($[88] !== t || $[89] !== t39) {
62585
- t40 = t(t39);
62586
- $[88] = t;
62587
- $[89] = t39;
62588
- $[90] = t40;
62589
- } else t40 = $[90];
62632
+ if ($[97] !== t) {
62633
+ t40 = t("settingAutoArchiveWorkers");
62634
+ $[97] = t;
62635
+ $[98] = t40;
62636
+ } else t40 = $[98];
62590
62637
  let t41;
62591
- if ($[91] !== t38 || $[92] !== t40) {
62592
- t41 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
62638
+ if ($[99] !== onChange) {
62639
+ t41 = (autoArchiveWorkers) => onChange({ autoArchiveWorkers });
62640
+ $[99] = onChange;
62641
+ $[100] = t41;
62642
+ } else t41 = $[100];
62643
+ let t42;
62644
+ if ($[101] !== pending || $[102] !== t40 || $[103] !== t41 || $[104] !== value.autoArchiveWorkers) {
62645
+ t42 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Switch, {
62646
+ disabled: pending,
62647
+ checked: t39,
62648
+ label: t40,
62649
+ onChange: t41
62650
+ });
62651
+ $[101] = pending;
62652
+ $[102] = t40;
62653
+ $[103] = t41;
62654
+ $[104] = value.autoArchiveWorkers;
62655
+ $[105] = t42;
62656
+ } else t42 = $[105];
62657
+ let t43;
62658
+ if ($[106] !== t38 || $[107] !== t42) {
62659
+ t43 = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
62660
+ className: "flex items-start justify-between gap-5 border-t border-(--dsw-alias-border-l3) px-4 py-3",
62661
+ children: [t38, t42]
62662
+ });
62663
+ $[106] = t38;
62664
+ $[107] = t42;
62665
+ $[108] = t43;
62666
+ } else t43 = $[108];
62667
+ const t44 = pending || !dirty;
62668
+ let t45;
62669
+ if ($[109] !== t) {
62670
+ t45 = t("settingDiscard");
62671
+ $[109] = t;
62672
+ $[110] = t45;
62673
+ } else t45 = $[110];
62674
+ let t46;
62675
+ if ($[111] !== onDiscard || $[112] !== t44 || $[113] !== t45) {
62676
+ t46 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
62677
+ type: "button",
62678
+ size: "sm",
62679
+ variant: "ghost",
62680
+ disabled: t44,
62681
+ onClick: onDiscard,
62682
+ children: t45
62683
+ });
62684
+ $[111] = onDiscard;
62685
+ $[112] = t44;
62686
+ $[113] = t45;
62687
+ $[114] = t46;
62688
+ } else t46 = $[114];
62689
+ const t47 = pending || !dirty || !valid;
62690
+ const t48 = pending ? "channelSaving" : "settingSave";
62691
+ let t49;
62692
+ if ($[115] !== t || $[116] !== t48) {
62693
+ t49 = t(t48);
62694
+ $[115] = t;
62695
+ $[116] = t48;
62696
+ $[117] = t49;
62697
+ } else t49 = $[117];
62698
+ let t50;
62699
+ if ($[118] !== t47 || $[119] !== t49) {
62700
+ t50 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
62593
62701
  type: "submit",
62594
62702
  size: "sm",
62595
62703
  variant: "primary",
62596
- disabled: t38,
62597
- children: t40
62598
- });
62599
- $[91] = t38;
62600
- $[92] = t40;
62601
- $[93] = t41;
62602
- } else t41 = $[93];
62603
- let t42;
62604
- if ($[94] !== t37 || $[95] !== t41) {
62605
- t42 = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("footer", {
62704
+ disabled: t47,
62705
+ children: t49
62706
+ });
62707
+ $[118] = t47;
62708
+ $[119] = t49;
62709
+ $[120] = t50;
62710
+ } else t50 = $[120];
62711
+ let t51;
62712
+ if ($[121] !== t46 || $[122] !== t50) {
62713
+ t51 = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("footer", {
62606
62714
  className: "flex flex-wrap items-center justify-end gap-2 border-t border-(--dsw-alias-border-l3) bg-(--dsw-alias-card-fill) px-4 py-2.5",
62607
- children: [t37, t41]
62608
- });
62609
- $[94] = t37;
62610
- $[95] = t41;
62611
- $[96] = t42;
62612
- } else t42 = $[96];
62613
- let t43;
62614
- if ($[97] !== t10 || $[98] !== t24 || $[99] !== t3 || $[100] !== t34 || $[101] !== t4 || $[102] !== t42) {
62615
- t43 = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("form", {
62715
+ children: [t46, t50]
62716
+ });
62717
+ $[121] = t46;
62718
+ $[122] = t50;
62719
+ $[123] = t51;
62720
+ } else t51 = $[123];
62721
+ let t52;
62722
+ if ($[124] !== t10 || $[125] !== t24 || $[126] !== t3 || $[127] !== t33 || $[128] !== t4 || $[129] !== t43 || $[130] !== t51) {
62723
+ t52 = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("form", {
62616
62724
  className: "overflow-hidden rounded-2xl border border-(--dsw-alias-border-l3) bg-(--dsw-alias-bg-layer-1)",
62617
62725
  "aria-labelledby": t3,
62618
62726
  onSubmit: t4,
62619
62727
  children: [
62620
62728
  t10,
62621
62729
  t24,
62622
- t34,
62623
- t42
62730
+ t33,
62731
+ t43,
62732
+ t51
62624
62733
  ]
62625
62734
  });
62626
- $[97] = t10;
62627
- $[98] = t24;
62628
- $[99] = t3;
62629
- $[100] = t34;
62630
- $[101] = t4;
62631
- $[102] = t42;
62632
- $[103] = t43;
62633
- } else t43 = $[103];
62634
- return t43;
62735
+ $[124] = t10;
62736
+ $[125] = t24;
62737
+ $[126] = t3;
62738
+ $[127] = t33;
62739
+ $[128] = t4;
62740
+ $[129] = t43;
62741
+ $[130] = t51;
62742
+ $[131] = t52;
62743
+ } else t52 = $[131];
62744
+ return t52;
62635
62745
  }
62636
62746
  function _temp$15(name) {
62637
62747
  return /^[a-z0-9][\w.-]{0,254}$/i.test(name);
@@ -63411,9 +63521,10 @@ const NUMERIC = [
63411
63521
  "deliveryRetryCeilingSeconds"
63412
63522
  ];
63413
63523
  function toRuntime(value) {
63414
- const { administrators, maxWorkers, backgroundLimitMinutes, autoMerge, autoMergeMaxLines, autoArchiveWorkers, deliveryMaxAttempts, deliveryRetryCeilingSeconds } = value;
63524
+ const { administrators, inferred, maxWorkers, backgroundLimitMinutes, autoMerge, autoMergeMaxLines, autoArchiveWorkers, deliveryMaxAttempts, deliveryRetryCeilingSeconds } = value;
63415
63525
  return {
63416
63526
  administrators,
63527
+ inferred,
63417
63528
  maxWorkers,
63418
63529
  backgroundLimitMinutes,
63419
63530
  autoMerge,
@@ -63424,7 +63535,7 @@ function toRuntime(value) {
63424
63535
  };
63425
63536
  }
63426
63537
  function sameSettings(left, right) {
63427
- return administratorSignature(left.administrators) === administratorSignature(right.administrators) && NUMERIC.every((key) => left[key] === right[key]);
63538
+ return administratorSignature(left.administrators) === administratorSignature(right.administrators) && left.inferred === right.inferred && NUMERIC.every((key) => left[key] === right[key]);
63428
63539
  }
63429
63540
  function numbersValid(value) {
63430
63541
  return Object.entries(LIMITS).every(([key, limits]) => {
@@ -63527,6 +63638,7 @@ function Setting() {
63527
63638
  setDraft((current_1) => current_1 && (section === "general" ? {
63528
63639
  ...current_1,
63529
63640
  administrators: [...baseline.administrators],
63641
+ inferred: baseline.inferred,
63530
63642
  autoArchiveWorkers: baseline.autoArchiveWorkers
63531
63643
  } : {
63532
63644
  ...current_1,
@@ -63565,7 +63677,7 @@ function Setting() {
63565
63677
  const dirtyOf = t10;
63566
63678
  let t11;
63567
63679
  if ($[20] !== baseline || $[21] !== draft) {
63568
- t11 = draft !== null && baseline !== null && (administratorSignature(draft.administrators) !== administratorSignature(baseline.administrators) || draft.autoArchiveWorkers !== baseline.autoArchiveWorkers);
63680
+ t11 = draft !== null && baseline !== null && (administratorSignature(draft.administrators) !== administratorSignature(baseline.administrators) || draft.inferred !== baseline.inferred || draft.autoArchiveWorkers !== baseline.autoArchiveWorkers);
63569
63681
  $[20] = baseline;
63570
63682
  $[21] = draft;
63571
63683
  $[22] = t11;
@@ -68278,6 +68390,7 @@ const store = (0, _deepseek_ai_dsh_client_store.defineStore)({
68278
68390
  init: () => {
68279
68391
  const saved = {
68280
68392
  administrators: [],
68393
+ inferred: "observe",
68281
68394
  maxWorkers: 10,
68282
68395
  backgroundLimitMinutes: 30,
68283
68396
  autoMerge: false,