@eddyskywalker/dsh-chatgpt-subscription 0.88.2 → 0.90.0

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.
Files changed (94) hide show
  1. package/README.md +1 -1
  2. package/lib/client.js +1585 -303
  3. package/lib/client.js.map +1 -1
  4. package/lib/index.js +1508 -369
  5. package/lib/{plan-mode-Rrk8NKuk.js → plan-mode-CoublSCJ.js} +16 -1
  6. package/lib/plan-mode.js +1 -1
  7. package/lib/types/client/common/ContextWindowEditor.d.ts +2 -0
  8. package/lib/types/client/common/ContextWindowEditor.d.ts.map +1 -1
  9. package/lib/types/client/features/advisor/AdvisorModelOption.d.ts +52 -0
  10. package/lib/types/client/features/advisor/AdvisorModelOption.d.ts.map +1 -0
  11. package/lib/types/client/features/advisor/locales.d.ts +47 -0
  12. package/lib/types/client/features/advisor/locales.d.ts.map +1 -0
  13. package/lib/types/client/features/advisor/styles.d.ts +2 -0
  14. package/lib/types/client/features/advisor/styles.d.ts.map +1 -0
  15. package/lib/types/client/features/progress-updates/locales.d.ts +38 -2
  16. package/lib/types/client/features/progress-updates/locales.d.ts.map +1 -1
  17. package/lib/types/client/features/progress-updates/settings-binding.d.ts +13 -1
  18. package/lib/types/client/features/progress-updates/settings-binding.d.ts.map +1 -1
  19. package/lib/types/client/features/progress-updates/settings-section.d.ts +33 -0
  20. package/lib/types/client/features/progress-updates/settings-section.d.ts.map +1 -1
  21. package/lib/types/client/features/progress-updates/styles.d.ts.map +1 -1
  22. package/lib/types/client/index.d.ts +2 -0
  23. package/lib/types/client/index.d.ts.map +1 -1
  24. package/lib/types/client/locales-ru/advisor.d.ts +3 -0
  25. package/lib/types/client/locales-ru/advisor.d.ts.map +1 -0
  26. package/lib/types/client/locales-ru/claude.d.ts.map +1 -1
  27. package/lib/types/client/locales-ru/hub.d.ts.map +1 -1
  28. package/lib/types/client/locales-ru/index.d.ts.map +1 -1
  29. package/lib/types/client/locales-ru/progress-updates.d.ts.map +1 -1
  30. package/lib/types/client/providers/claude/ClaudeSection.d.ts.map +1 -1
  31. package/lib/types/client/providers/claude/locales.d.ts +26 -5
  32. package/lib/types/client/providers/claude/locales.d.ts.map +1 -1
  33. package/lib/types/client/providers/claude/useClaudeSection.d.ts +9 -0
  34. package/lib/types/client/providers/claude/useClaudeSection.d.ts.map +1 -1
  35. package/lib/types/client/providers/codex-chatgpt/CodexSubscriptionSection.d.ts +1 -1
  36. package/lib/types/client/providers/codex-chatgpt/CodexSubscriptionSection.d.ts.map +1 -1
  37. package/lib/types/client/providers/codex-chatgpt/api.d.ts +3 -1
  38. package/lib/types/client/providers/codex-chatgpt/api.d.ts.map +1 -1
  39. package/lib/types/client/providers/codex-chatgpt/locales.d.ts +9 -1
  40. package/lib/types/client/providers/codex-chatgpt/locales.d.ts.map +1 -1
  41. package/lib/types/client/providers/codex-chatgpt/styles.d.ts.map +1 -1
  42. package/lib/types/compat.d.ts +1 -1
  43. package/lib/types/host/common/account-pool.d.ts +3 -0
  44. package/lib/types/host/common/account-pool.d.ts.map +1 -1
  45. package/lib/types/host/providers/_claude-shared/claude-code-cch.d.ts +9 -1
  46. package/lib/types/host/providers/_claude-shared/claude-code-cch.d.ts.map +1 -1
  47. package/lib/types/host/providers/antigravity-acp/adapter.d.ts.map +1 -1
  48. package/lib/types/host/providers/antigravity-acp/binary.d.ts +1 -1
  49. package/lib/types/host/providers/antigravity-acp/binary.d.ts.map +1 -1
  50. package/lib/types/host/providers/antigravity-acp/errors.d.ts +4 -2
  51. package/lib/types/host/providers/antigravity-acp/errors.d.ts.map +1 -1
  52. package/lib/types/host/providers/aws-quick/adapter.d.ts.map +1 -1
  53. package/lib/types/host/providers/aws-quick/client.d.ts +2 -0
  54. package/lib/types/host/providers/aws-quick/client.d.ts.map +1 -1
  55. package/lib/types/host/providers/claude/adapter.d.ts +8 -0
  56. package/lib/types/host/providers/claude/adapter.d.ts.map +1 -1
  57. package/lib/types/host/providers/claude/mapper.d.ts +7 -0
  58. package/lib/types/host/providers/claude/mapper.d.ts.map +1 -1
  59. package/lib/types/host/providers/claude/routes.d.ts.map +1 -1
  60. package/lib/types/host/providers/claude/token-store.d.ts +16 -0
  61. package/lib/types/host/providers/claude/token-store.d.ts.map +1 -1
  62. package/lib/types/host/providers/claude/types.d.ts +2 -0
  63. package/lib/types/host/providers/claude/types.d.ts.map +1 -1
  64. package/lib/types/host/providers/claude-api/mapper.d.ts.map +1 -1
  65. package/lib/types/host/providers/codex-chatgpt/codex-account-pool.d.ts +2 -0
  66. package/lib/types/host/providers/codex-chatgpt/codex-account-pool.d.ts.map +1 -1
  67. package/lib/types/host/providers/codex-chatgpt/codex-file-import.d.ts +12 -0
  68. package/lib/types/host/providers/codex-chatgpt/codex-file-import.d.ts.map +1 -0
  69. package/lib/types/host/providers/codex-chatgpt/codex-identity.d.ts +1 -0
  70. package/lib/types/host/providers/codex-chatgpt/codex-identity.d.ts.map +1 -1
  71. package/lib/types/host/providers/codex-chatgpt/routes.d.ts.map +1 -1
  72. package/lib/types/host/providers/opendesign/mapper.d.ts.map +1 -1
  73. package/lib/types/host/runtime/advisor/index.d.ts +28 -0
  74. package/lib/types/host/runtime/advisor/index.d.ts.map +1 -0
  75. package/lib/types/host/runtime/advisor/prompt.d.ts +3 -0
  76. package/lib/types/host/runtime/advisor/prompt.d.ts.map +1 -0
  77. package/lib/types/host/runtime/advisor/request.d.ts +28 -0
  78. package/lib/types/host/runtime/advisor/request.d.ts.map +1 -0
  79. package/lib/types/host/runtime/advisor/selection-store.d.ts +30 -0
  80. package/lib/types/host/runtime/advisor/selection-store.d.ts.map +1 -0
  81. package/lib/types/host/runtime/advisor/transcript.d.ts +22 -0
  82. package/lib/types/host/runtime/advisor/transcript.d.ts.map +1 -0
  83. package/lib/types/host/runtime/guards/dispatch-execution-guard.d.ts +5 -0
  84. package/lib/types/host/runtime/guards/dispatch-execution-guard.d.ts.map +1 -1
  85. package/lib/types/host/runtime/guards/subagent-model-authorization.d.ts.map +1 -1
  86. package/lib/types/index.d.ts +22 -0
  87. package/lib/types/index.d.ts.map +1 -1
  88. package/lib/types/shared/advisor-contracts.d.ts +62 -0
  89. package/lib/types/shared/advisor-contracts.d.ts.map +1 -0
  90. package/lib/types/shared/claude-contracts.d.ts +8 -0
  91. package/lib/types/shared/claude-contracts.d.ts.map +1 -1
  92. package/lib/types/shared/contracts.d.ts +6 -0
  93. package/lib/types/shared/contracts.d.ts.map +1 -1
  94. package/package.json +1 -1
package/lib/client.js CHANGED
@@ -611,7 +611,7 @@ window.__ModuleLoader__.load({
611
611
  //#endregion
612
612
  //#region src/client/providers/codex-chatgpt/locales.ts
613
613
  const NS = "dsh-chatgpt-subscription";
614
- const zh$23 = {
614
+ const zh$24 = {
615
615
  ...accountPoolZh,
616
616
  title: "ChatGPT",
617
617
  hubTitle: "订阅服务",
@@ -840,6 +840,10 @@ window.__ModuleLoader__.load({
840
840
  hubUpdateCommandLabel: "手动更新命令",
841
841
  localCodexLoginImport: "导入本机登录",
842
842
  localCodexLoginImporting: "导入中…",
843
+ credentialFileImport: "导入 CPA / sub2api",
844
+ credentialFileImporting: "导入中…",
845
+ credentialFileImportDetail: "从 CPA ZIP 或 sub2api JSON 文件导入 ChatGPT 账号",
846
+ credentialFileImportResult: "已导入 {count} 个 {format} 账号,跳过 {skipped} 个。",
843
847
  deviceCodeLogin: "设备代码登录",
844
848
  deviceCodeLoginStarting: "获取代码…",
845
849
  deviceCodeLoginDetail: "用设备代码添加账号",
@@ -883,8 +887,8 @@ window.__ModuleLoader__.load({
883
887
  codeRunFailed: "失败",
884
888
  codeRunStopped: "已停止"
885
889
  };
886
- const dictionaries$23 = {
887
- zh: zh$23,
890
+ const dictionaries$24 = {
891
+ zh: zh$24,
888
892
  en: {
889
893
  ...accountPoolEn,
890
894
  title: "ChatGPT",
@@ -1114,6 +1118,10 @@ window.__ModuleLoader__.load({
1114
1118
  hubUpdateCommandLabel: "Manual update command",
1115
1119
  localCodexLoginImport: "Import local sign-in",
1116
1120
  localCodexLoginImporting: "Importing…",
1121
+ credentialFileImport: "Import CPA / sub2api",
1122
+ credentialFileImporting: "Importing…",
1123
+ credentialFileImportDetail: "Import ChatGPT accounts from a CPA ZIP or sub2api JSON file",
1124
+ credentialFileImportResult: "Imported {count} {format} accounts; skipped {skipped}.",
1117
1125
  deviceCodeLogin: "Device-code sign-in",
1118
1126
  deviceCodeLoginStarting: "Requesting code…",
1119
1127
  deviceCodeLoginDetail: "Add account with device code",
@@ -1269,7 +1277,7 @@ window.__ModuleLoader__.load({
1269
1277
  * reads).
1270
1278
  */
1271
1279
  function LineProxySection({ line, fetchSnapshot, onSave, idPrefix, snapshot: provided }) {
1272
- const labels = useLineDict(NS, zh$23);
1280
+ const labels = useLineDict(NS, zh$24);
1273
1281
  const readSnapshotFromRoute = (0, react.useCallback)(() => (fetchSnapshot ?? (() => fetchLineProxySnapshot("/api/dsh-chatgpt-subscription")))(), [fetchSnapshot]);
1274
1282
  const writePreferences = (0, react.useCallback)((patch) => (onSave ?? ((next) => savePreferences("/api/dsh-chatgpt-subscription", next)))(patch), [onSave]);
1275
1283
  const [readSnapshot, setReadSnapshot] = (0, react.useState)(null);
@@ -2129,6 +2137,14 @@ window.__ModuleLoader__.load({
2129
2137
  adoptLocalLogin(source) {
2130
2138
  return post$9(`${ROUTE_PREFIX}/adopt`, { source });
2131
2139
  }
2140
+ /** Import a CPA ZIP or sub2api JSON file without exposing its credentials in a DTO. */
2141
+ importCredentialFile(file) {
2142
+ return request$6(`${ROUTE_PREFIX}/accounts/import`, {
2143
+ method: "POST",
2144
+ headers: { "content-type": "application/octet-stream" },
2145
+ body: file
2146
+ });
2147
+ }
2132
2148
  /** Forget every imported snapshot. The CLIs' own files are never touched. */
2133
2149
  disableAdoptedLocalLogins() {
2134
2150
  return post$9(`${ROUTE_PREFIX}/adopt/disable`, {});
@@ -2676,7 +2692,7 @@ window.__ModuleLoader__.load({
2676
2692
  * still override any label through the checklist's `labels` prop.
2677
2693
  */
2678
2694
  const NS_MODEL_CHECKLIST = "dsh-model-checklist";
2679
- const zh$22 = {
2695
+ const zh$23 = {
2680
2696
  allGroups: "全部",
2681
2697
  enabledGroup: "已启用",
2682
2698
  otherGroup: "其他",
@@ -2684,7 +2700,7 @@ window.__ModuleLoader__.load({
2684
2700
  noMatches: "没有匹配的模型",
2685
2701
  groupsNav: "模型厂商"
2686
2702
  };
2687
- const en$22 = {
2703
+ const en$23 = {
2688
2704
  allGroups: "All",
2689
2705
  enabledGroup: "Enabled",
2690
2706
  otherGroup: "Other",
@@ -2692,10 +2708,10 @@ window.__ModuleLoader__.load({
2692
2708
  noMatches: "No matching models",
2693
2709
  groupsNav: "Model vendors"
2694
2710
  };
2695
- const modelChecklistZh = zh$22;
2696
- const dictionaries$22 = {
2697
- zh: zh$22,
2698
- en: en$22
2711
+ const modelChecklistZh = zh$23;
2712
+ const dictionaries$23 = {
2713
+ zh: zh$23,
2714
+ en: en$23
2699
2715
  };
2700
2716
  //#endregion
2701
2717
  //#region src/client/common/model-vendors.ts
@@ -3300,6 +3316,7 @@ window.__ModuleLoader__.load({
3300
3316
  function CodexSubscriptionSection({ t }) {
3301
3317
  const apiRef = (0, react.useRef)(new SubscriptionApi());
3302
3318
  const eventSourceRef = (0, react.useRef)(null);
3319
+ const credentialFileInputRef = (0, react.useRef)(null);
3303
3320
  /**
3304
3321
  * The flow the card knows it started.
3305
3322
  *
@@ -3326,6 +3343,7 @@ window.__ModuleLoader__.load({
3326
3343
  /** Ticked once a second, so the panel's countdown is a clock and not a snapshot. */
3327
3344
  const [now, setNow] = (0, react.useState)(() => Date.now());
3328
3345
  const [resetCreditNotice, setResetCreditNotice] = (0, react.useState)(null);
3346
+ const [credentialImportNotice, setCredentialImportNotice] = (0, react.useState)(null);
3329
3347
  const [connection, setConnection] = (0, react.useState)(null);
3330
3348
  const [contextDrafts, setContextDrafts] = (0, react.useState)({});
3331
3349
  const load = (0, react.useCallback)(async (quiet = false) => {
@@ -3689,6 +3707,18 @@ window.__ModuleLoader__.load({
3689
3707
  await load(true);
3690
3708
  });
3691
3709
  };
3710
+ const importCredentialFile = async (file) => {
3711
+ setCredentialImportNotice(null);
3712
+ await run("file-import", async () => {
3713
+ const result = await apiRef.current.importCredentialFile(file);
3714
+ setStatus(result.status);
3715
+ setCredentialImportNotice(formatPoolLabel(t("credentialFileImportResult"), {
3716
+ format: result.format === "cpa" ? "CPA" : "sub2api",
3717
+ count: result.imported,
3718
+ skipped: result.skipped
3719
+ }));
3720
+ });
3721
+ };
3692
3722
  const setRotationStrategy = async (strategy) => {
3693
3723
  await run("strategy", async () => {
3694
3724
  const next = await apiRef.current.accountAction("strategy", { strategy });
@@ -3785,7 +3815,7 @@ window.__ModuleLoader__.load({
3785
3815
  onSetStrategy: (strategy) => void setRotationStrategy(strategy),
3786
3816
  showQuota: true,
3787
3817
  renderLoginActions: () => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
3788
- className: "dsha-account-add-actions",
3818
+ className: "dsha-account-add-actions dsh-codex-login-actions",
3789
3819
  children: [
3790
3820
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
3791
3821
  className: "dsha-btn dsha-btn-primary",
@@ -3808,6 +3838,26 @@ window.__ModuleLoader__.load({
3808
3838
  title: t("localCodexLoginImport"),
3809
3839
  onClick: () => void importLocalSignIn(),
3810
3840
  children: busy === "adopt" ? t("localCodexLoginImporting") : t("localCodexLoginImport")
3841
+ }),
3842
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
3843
+ ref: credentialFileInputRef,
3844
+ type: "file",
3845
+ hidden: true,
3846
+ accept: ".zip,.json,application/zip,application/json",
3847
+ "aria-label": t("credentialFileImportDetail"),
3848
+ onChange: (event) => {
3849
+ const file = event.currentTarget.files?.[0];
3850
+ event.currentTarget.value = "";
3851
+ if (file !== void 0) importCredentialFile(file);
3852
+ }
3853
+ }),
3854
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
3855
+ className: "dsha-btn",
3856
+ disabled: busy !== null,
3857
+ "aria-label": t("credentialFileImportDetail"),
3858
+ title: t("credentialFileImportDetail"),
3859
+ onClick: () => credentialFileInputRef.current?.click(),
3860
+ children: busy === "file-import" ? t("credentialFileImporting") : t("credentialFileImport")
3811
3861
  })
3812
3862
  ]
3813
3863
  }),
@@ -3817,6 +3867,11 @@ window.__ModuleLoader__.load({
3817
3867
  entry.planLabel
3818
3868
  ] }) }),
3819
3869
  children: [
3870
+ credentialImportNotice !== null ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
3871
+ className: "dsh-codex-success",
3872
+ role: "status",
3873
+ children: credentialImportNotice
3874
+ }) : null,
3820
3875
  login?.active && deviceLogin === null ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
3821
3876
  className: "dsha-muted",
3822
3877
  role: "status",
@@ -4649,7 +4704,7 @@ window.__ModuleLoader__.load({
4649
4704
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
4650
4705
  type: "button",
4651
4706
  className: "dsha-context-save dsha-context-reset",
4652
- "aria-label": `${row.name} ${labels.reset}`,
4707
+ "aria-label": row.resetLabel ?? `${row.name} ${labels.reset}`,
4653
4708
  disabled: row.saving || !row.hasOverride,
4654
4709
  onClick: () => onReset(row.id),
4655
4710
  children: labels.reset
@@ -4722,7 +4777,7 @@ window.__ModuleLoader__.load({
4722
4777
  //#endregion
4723
4778
  //#region src/client/providers/command-code/locales.ts
4724
4779
  const NS_COMMAND_CODE = "dsh-command-code";
4725
- const zh$21 = {
4780
+ const zh$22 = {
4726
4781
  ...accountPoolZh,
4727
4782
  title: "Command Code",
4728
4783
  pageDesc: "登录 Command Code,管理可用模型、上下文窗口与额度。",
@@ -4796,7 +4851,7 @@ window.__ModuleLoader__.load({
4796
4851
  loginFailed: "登录失败",
4797
4852
  tokens: "tokens"
4798
4853
  };
4799
- const en$21 = {
4854
+ const en$22 = {
4800
4855
  ...accountPoolEn,
4801
4856
  title: "Command Code",
4802
4857
  pageDesc: "Sign in to Command Code and manage models, context windows, and quota.",
@@ -4870,11 +4925,11 @@ window.__ModuleLoader__.load({
4870
4925
  loginFailed: "Sign-in failed",
4871
4926
  tokens: "tokens"
4872
4927
  };
4873
- const dictionaries$21 = {
4874
- zh: zh$21,
4875
- "zh-CN": zh$21,
4876
- en: en$21,
4877
- "en-US": en$21
4928
+ const dictionaries$22 = {
4929
+ zh: zh$22,
4930
+ "zh-CN": zh$22,
4931
+ en: en$22,
4932
+ "en-US": en$22
4878
4933
  };
4879
4934
  //#endregion
4880
4935
  //#region src/client/providers/command-code/model-vendors.ts
@@ -4921,7 +4976,7 @@ window.__ModuleLoader__.load({
4921
4976
  const [apiKey, setApiKey] = (0, react.useState)("");
4922
4977
  /** Follow-up poll owed while the host refreshes the quota behind an answer. */
4923
4978
  const quotaFollowUp = (0, react.useRef)(null);
4924
- const t = useLineDict(NS_COMMAND_CODE, zh$21);
4979
+ const t = useLineDict(NS_COMMAND_CODE, zh$22);
4925
4980
  const notifyChange = (0, react.useCallback)(() => {
4926
4981
  onModelChange?.();
4927
4982
  loadModelDirectory?.();
@@ -5697,7 +5752,7 @@ window.__ModuleLoader__.load({
5697
5752
  //#endregion
5698
5753
  //#region src/client/providers/kimi-code/locales.ts
5699
5754
  const NS_KIMI_CODE = "dsh-kimi-code";
5700
- const zh$20 = {
5755
+ const zh$21 = {
5701
5756
  ...accountPoolZh,
5702
5757
  title: "Kimi Code",
5703
5758
  pageDesc: "登录 Kimi Code 订阅,管理模型、思考档位、上下文窗口与额度。",
@@ -5893,7 +5948,7 @@ window.__ModuleLoader__.load({
5893
5948
  compactionRouteNoImage: "该模型不接受图片:摘要里的截图会被替换为占位文本。",
5894
5949
  compactionRouteEmpty: "没有可用的线路——先登录任意一条线路再回来设置。"
5895
5950
  };
5896
- const en$20 = {
5951
+ const en$21 = {
5897
5952
  ...accountPoolEn,
5898
5953
  title: "Kimi Code",
5899
5954
  pageDesc: "Sign in to the Kimi Code subscription and manage models, thinking level, context windows, and quota.",
@@ -6089,11 +6144,11 @@ window.__ModuleLoader__.load({
6089
6144
  compactionRouteNoImage: "This model takes no images: screenshots become placeholder text in the summary.",
6090
6145
  compactionRouteEmpty: "No route is available — sign in to one first."
6091
6146
  };
6092
- const dictionaries$20 = {
6093
- zh: zh$20,
6094
- "zh-CN": zh$20,
6095
- en: en$20,
6096
- "en-US": en$20
6147
+ const dictionaries$21 = {
6148
+ zh: zh$21,
6149
+ "zh-CN": zh$21,
6150
+ en: en$21,
6151
+ "en-US": en$21
6097
6152
  };
6098
6153
  //#endregion
6099
6154
  //#region src/shared/kimi-code-contracts.ts
@@ -6205,7 +6260,7 @@ window.__ModuleLoader__.load({
6205
6260
  return `${value}x`;
6206
6261
  }
6207
6262
  function KimiModelCapabilities({ models }) {
6208
- const t = useLineDict(NS_KIMI_CODE, zh$20);
6263
+ const t = useLineDict(NS_KIMI_CODE, zh$21);
6209
6264
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
6210
6265
  className: "dsha-cap-table",
6211
6266
  children: [
@@ -6737,7 +6792,7 @@ window.__ModuleLoader__.load({
6737
6792
  statusGeneration.current += 1;
6738
6793
  setStatus(next);
6739
6794
  }, []);
6740
- const t = useLineDict(NS_KIMI_CODE, zh$20);
6795
+ const t = useLineDict(NS_KIMI_CODE, zh$21);
6741
6796
  const notifyChange = (0, react.useCallback)(() => {
6742
6797
  onModelChange?.();
6743
6798
  loadModelDirectory?.();
@@ -7639,7 +7694,7 @@ window.__ModuleLoader__.load({
7639
7694
  //#endregion
7640
7695
  //#region src/client/providers/minimax-code/locales.ts
7641
7696
  const NS_MINIMAX_CODE = "dsh-minimax-code";
7642
- const zh$19 = {
7697
+ const zh$20 = {
7643
7698
  ...accountPoolZh,
7644
7699
  title: "MiniMax Code",
7645
7700
  pageDesc: "登录 MiniMax Code 编程订阅(设备码 OAuth),复用本机 MiniMax Code 的登录态,管理账号、连接与模型。",
@@ -7837,7 +7892,7 @@ window.__ModuleLoader__.load({
7837
7892
  videoHistoryEncrypted: "已由系统凭据后端加密",
7838
7893
  videoHistoryPlain: "本机没有可用的凭据后端,记录为明文"
7839
7894
  };
7840
- const en$19 = {
7895
+ const en$20 = {
7841
7896
  ...accountPoolEn,
7842
7897
  title: "MiniMax Code",
7843
7898
  pageDesc: "Sign in to the MiniMax Code coding subscription (device-code OAuth) and reuse the local MiniMax Code sign-in to manage the account, connection, and models.",
@@ -8035,11 +8090,11 @@ window.__ModuleLoader__.load({
8035
8090
  videoHistoryEncrypted: "Encrypted by the platform credential backend",
8036
8091
  videoHistoryPlain: "No credential backend on this host; stored as plain text"
8037
8092
  };
8038
- const dictionaries$19 = {
8039
- zh: zh$19,
8040
- "zh-CN": zh$19,
8041
- en: en$19,
8042
- "en-US": en$19
8093
+ const dictionaries$20 = {
8094
+ zh: zh$20,
8095
+ "zh-CN": zh$20,
8096
+ en: en$20,
8097
+ "en-US": en$20
8043
8098
  };
8044
8099
  //#endregion
8045
8100
  //#region src/client/providers/minimax-code/useMinimaxCodeSection.ts
@@ -8053,7 +8108,7 @@ window.__ModuleLoader__.load({
8053
8108
  * rather than inferred from the JSX.
8054
8109
  */
8055
8110
  /** The card's own dictionary; stable identity keeps effect dependencies intact. */
8056
- const fallbackTranslate$7 = (key) => zh$19[key];
8111
+ const fallbackTranslate$7 = (key) => zh$20[key];
8057
8112
  /**
8058
8113
  * The shared pool card's labels, resolved through this card's dictionary.
8059
8114
  *
@@ -10069,7 +10124,7 @@ window.__ModuleLoader__.load({
10069
10124
  * 键名重合的会被渲染成 ChatGPT 的措辞,不重合的会把键名本身打印出来)。
10070
10125
  */
10071
10126
  const NS_GLM_CODING_PLAN = "dsh-glm-coding-plan";
10072
- const zh$18 = {
10127
+ const zh$19 = {
10073
10128
  ...accountPoolZh,
10074
10129
  title: "GLM(ZCode 账号)",
10075
10130
  pageDesc: "用 ZCode 账号授权接入 GLM Coding Plan(国区 bigmodel.cn / 国际区 z.ai),管理账号池、套餐额度与模型勾选。两个区域的凭据各自独立,池内可以同时存在两区账号。",
@@ -10163,7 +10218,7 @@ window.__ModuleLoader__.load({
10163
10218
  quotaAllowanceUnknown: "未判定",
10164
10219
  quotaAllowanceHint: "登录时探活认定的额度来源。「免费体验额度」指新用户注册后自动获得、首次使用起 5 天内每天 800 万 token 的体验额度。"
10165
10220
  };
10166
- const en$18 = {
10221
+ const en$19 = {
10167
10222
  ...accountPoolEn,
10168
10223
  title: "GLM (ZCode account)",
10169
10224
  pageDesc: "Sign in with a ZCode account to reach GLM Coding Plan (China bigmodel.cn / International z.ai), and manage the account pool, plan quota and model selection. The two regions hold independent credentials, so a pool can carry accounts from both.",
@@ -10257,11 +10312,11 @@ window.__ModuleLoader__.load({
10257
10312
  quotaAllowanceUnknown: "Undetermined",
10258
10313
  quotaAllowanceHint: "The allowance source established by the sign-in probe. “Free trial allowance” means 8M tokens per day for 5 days from first use, granted automatically to new accounts."
10259
10314
  };
10260
- const dictionaries$18 = {
10261
- zh: zh$18,
10262
- "zh-CN": zh$18,
10263
- en: en$18,
10264
- "en-US": en$18
10315
+ const dictionaries$19 = {
10316
+ zh: zh$19,
10317
+ "zh-CN": zh$19,
10318
+ en: en$19,
10319
+ "en-US": en$19
10265
10320
  };
10266
10321
  /** 一个配额窗口的键到「窗口长度(分钟)」的映射。 */
10267
10322
  const QUOTA_WINDOW_MINUTES$1 = {
@@ -10342,7 +10397,7 @@ window.__ModuleLoader__.load({
10342
10397
  /** 登录状态机的轮询节奏。真实超时与间隔由 host 拥有,卡片只是跟随。 */
10343
10398
  const LOGIN_POLL_INTERVAL_MS$2 = 2e3;
10344
10399
  /** 本卡片的字典;身份稳定,依赖它的 effect 才不会每次渲染重建。 */
10345
- const fallbackTranslate$6 = (key) => zh$18[key];
10400
+ const fallbackTranslate$6 = (key) => zh$19[key];
10346
10401
  /**
10347
10402
  * 共享账号池卡片需要的标签集,按本卡片的字典逐键查出来。
10348
10403
  *
@@ -10768,7 +10823,7 @@ window.__ModuleLoader__.load({
10768
10823
  const { status, loading, busy, error, connection, adoptResult, pasteValue, region, pasteOpen, contextDrafts, savingModel } = state;
10769
10824
  const { accounts, models, contextModels, overrideCount, login, quota, authenticated, poolLabels } = derived;
10770
10825
  const { setRegion, login: startLogin, cancelLogin, submitPaste, setPasteValue, togglePaste, adopt, clearAdoptResult, accountAction, setStrategy, toggleModel, setAllModels, saveContextWindow, resetContextWindow, resetAllContextWindows, updateContextDraft, refreshQuota, refreshCatalog, testConnection } = actions;
10771
- const t = useLineDict(NS_GLM_CODING_PLAN, zh$18);
10826
+ const t = useLineDict(NS_GLM_CODING_PLAN, zh$19);
10772
10827
  if (loading) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
10773
10828
  className: "dsha-page",
10774
10829
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
@@ -11234,7 +11289,7 @@ window.__ModuleLoader__.load({
11234
11289
  * provider — the same reason every sibling line has one.
11235
11290
  */
11236
11291
  const NS_CLAUDE = "dsh-claude";
11237
- const zh$17 = {
11292
+ const zh$18 = {
11238
11293
  ...accountPoolZh,
11239
11294
  title: "Claude(订阅)",
11240
11295
  pageDesc: "登录 Claude Pro/Max 订阅,管理模型、思考档位、上下文窗口与额度。",
@@ -11299,11 +11354,14 @@ window.__ModuleLoader__.load({
11299
11354
  defaultReasoningEffort: "默认思考档位",
11300
11355
  defaultReasoningEffortHint: "下拉列出的是目录中出现过的全部档位(含 xhigh);每个模型真正支持的档位见下方列表,Host 按模型自身的阶梯发送。",
11301
11356
  defaultEffortAuto: "使用模型默认值",
11302
- cacheTtl: "提示缓存时长",
11357
+ cacheTtl: "主对话的提示缓存时长",
11303
11358
  cacheTtlHint: "Anthropic 提供 5 分钟与 1 小时两档。订阅用户在套餐额度内,官方 Claude Code 对主对话默认使用 1 小时;超出额度改按用量计费后官方会降回 5 分钟。1 小时写入更贵,短会话不划算。选择 1 小时(含「跟随官方」)时,子代理或后台任务运行期间本线路约每 55 分钟发一次很小的续热请求,避免缓存过期;5 分钟时长不会这样做。",
11304
11359
  cacheTtlSubscription: "跟随官方(订阅默认 1 小时)",
11305
11360
  cacheTtl1h: "1 小时",
11306
11361
  cacheTtl5m: "5 分钟",
11362
+ subagentCacheTtl: "子代理与后台请求的缓存时长",
11363
+ subagentCacheTtlHint: "子代理、上下文压缩、生成标题等主对话以外的请求。官方 Claude Code 对这些请求使用 5 分钟:它们通常几分钟内就结束,用不上 1 小时,而 1 小时档写入更贵。",
11364
+ subagentCacheTtlOfficial: "跟随官方(5 分钟)",
11307
11365
  fastMode: "快速模式",
11308
11366
  fastModeHint: "仅对支持的模型发送 speed: fast;被拒时自动纠正,并按账号和模型记住结论。",
11309
11367
  cacheKeepalive: "cache-keepalive(cache_touch)",
@@ -11320,6 +11378,10 @@ window.__ModuleLoader__.load({
11320
11378
  contextWindowReset: "恢复默认",
11321
11379
  contextWindowResetAll: "全部恢复默认",
11322
11380
  contextWindowResetAllConfirm: "确定把已改过的模型上下文窗口全部恢复为默认值吗?",
11381
+ maxTokensSection: "单次输出上限",
11382
+ maxTokensHint: "每次回复最多输出多少 token,思考也计入其中。默认是模型本身的上限。调低可以给对话多留上下文,但回复写到上限就会被截断,这一轮也随之结束。",
11383
+ maxTokensInvalid: "输出上限无效:{value}",
11384
+ maxTokensResetAllConfirm: "确定把已改过的模型输出上限全部恢复为默认值吗?",
11323
11385
  contextWindowNoneEnabled: "还没有勾选任何模型。在上方勾选后,这里会出现该模型的上下文窗口设置。",
11324
11386
  contextWindowInvalid: "上下文长度无效:{value}",
11325
11387
  save: "保存",
@@ -11355,7 +11417,7 @@ window.__ModuleLoader__.load({
11355
11417
  copy: "复制",
11356
11418
  copied: "已复制"
11357
11419
  };
11358
- const en$17 = {
11420
+ const en$18 = {
11359
11421
  ...accountPoolEn,
11360
11422
  title: "Claude (subscription)",
11361
11423
  pageDesc: "Sign in to a Claude Pro/Max subscription and manage models, thinking levels, context windows and quota.",
@@ -11419,11 +11481,14 @@ window.__ModuleLoader__.load({
11419
11481
  enhanced: "Thinking",
11420
11482
  defaultReasoningEffort: "Default thinking level",
11421
11483
  defaultReasoningEffortHint: "The list is every level the catalog names (xhigh included); the per-model ladder is listed below, and the Host sends what that model itself accepts.",
11422
- cacheTtl: "Prompt cache duration",
11484
+ cacheTtl: "Prompt cache duration for the main conversation",
11423
11485
  cacheTtlHint: "Anthropic offers 5-minute and 1-hour tiers. While a subscription is drawing on included plan usage, the official Claude Code uses the hour for the main conversation; once the plan is exhausted and requests bill against usage credits, it drops back to five minutes. A 1-hour write costs more, so it does not pay off for short sessions. With the 1-hour duration (including \"follow the official\"), while subagents or background tasks are running the line sends one small keepalive request about every 55 minutes so the cache does not expire; the 5-minute duration never does this.",
11424
11486
  cacheTtlSubscription: "Follow the official (subscription default 1h)",
11425
11487
  cacheTtl1h: "1 hour",
11426
11488
  cacheTtl5m: "5 minutes",
11489
+ subagentCacheTtl: "Cache duration for subagents and background requests",
11490
+ subagentCacheTtlHint: "Subagents, context compaction, titles and other requests outside the main conversation. The official Claude Code uses 5 minutes for these: they usually finish within minutes, and the 1-hour tier costs more to write.",
11491
+ subagentCacheTtlOfficial: "Follow the official (5 minutes)",
11427
11492
  fastMode: "Fast mode",
11428
11493
  fastModeHint: "Sends speed: fast only for supported models; corrects refusals and remembers the result per account and model.",
11429
11494
  cacheKeepalive: "cache-keepalive (cache_touch)",
@@ -11441,6 +11506,10 @@ window.__ModuleLoader__.load({
11441
11506
  contextWindowReset: "Restore default",
11442
11507
  contextWindowResetAll: "Restore all defaults",
11443
11508
  contextWindowResetAllConfirm: "Restore every changed model context window to its default?",
11509
+ maxTokensSection: "Output limit per reply",
11510
+ maxTokensHint: "How many tokens one reply may produce, thinking included. The default is the model's own limit. Lowering it leaves more room for the conversation, but a reply that reaches it is cut off and the turn ends.",
11511
+ maxTokensInvalid: "Invalid output limit: {value}",
11512
+ maxTokensResetAllConfirm: "Restore every changed model output limit to its default?",
11444
11513
  contextWindowNoneEnabled: "No model is checked yet. Check one above and its context window setting appears here.",
11445
11514
  contextWindowInvalid: "Invalid context capacity: {value}",
11446
11515
  save: "Save",
@@ -11476,11 +11545,11 @@ window.__ModuleLoader__.load({
11476
11545
  copy: "Copy",
11477
11546
  copied: "Copied"
11478
11547
  };
11479
- const dictionaries$17 = {
11480
- zh: zh$17,
11481
- "zh-CN": zh$17,
11482
- en: en$17,
11483
- "en-US": en$17
11548
+ const dictionaries$18 = {
11549
+ zh: zh$18,
11550
+ "zh-CN": zh$18,
11551
+ en: en$18,
11552
+ "en-US": en$18
11484
11553
  };
11485
11554
  //#endregion
11486
11555
  //#region src/client/providers/claude/useClaudeSection.ts
@@ -11511,10 +11580,16 @@ window.__ModuleLoader__.load({
11511
11580
  const [pasteValue, setPasteValue] = (0, react.useState)("");
11512
11581
  const [contextDrafts, setContextDrafts] = (0, react.useState)({});
11513
11582
  const [savingModel, setSavingModel] = (0, react.useState)(null);
11583
+ const [maxTokensDrafts, setMaxTokensDrafts] = (0, react.useState)({});
11584
+ const maxTokensKey = JSON.stringify([status?.maxTokensOverrides ?? {}, (status?.models ?? []).map((model) => [model.id, model.defaultMaxTokens])]);
11585
+ (0, react.useEffect)(() => {
11586
+ const [overrides, defaults] = JSON.parse(maxTokensKey);
11587
+ setMaxTokensDrafts(Object.fromEntries(defaults.map(([id, fallback]) => [id, formatCapacity$1(overrides[id] ?? fallback)])));
11588
+ }, [maxTokensKey]);
11514
11589
  const [connection, setConnection] = (0, react.useState)(null);
11515
11590
  /** Follow-up poll owed while the host refreshes the quota behind an answer. */
11516
11591
  const quotaFollowUp = (0, react.useRef)(null);
11517
- const t = useLineDict(NS_CLAUDE, zh$17);
11592
+ const t = useLineDict(NS_CLAUDE, zh$18);
11518
11593
  const notifyChange = (0, react.useCallback)(() => {
11519
11594
  onModelChange?.();
11520
11595
  loadModelDirectory?.();
@@ -11808,6 +11883,18 @@ window.__ModuleLoader__.load({
11808
11883
  reportError(err);
11809
11884
  }
11810
11885
  };
11886
+ const updateSubagentCacheTtl = async (ttl) => {
11887
+ try {
11888
+ const updated = await api$16.request("/settings", {
11889
+ method: "POST",
11890
+ body: JSON.stringify({ subagentCacheTtl: ttl })
11891
+ });
11892
+ setStatus(updated);
11893
+ notifyChange();
11894
+ } catch (err) {
11895
+ reportError(err);
11896
+ }
11897
+ };
11811
11898
  const updateBooleanSetting = async (field, checked) => {
11812
11899
  try {
11813
11900
  const updated = await api$16.request("/settings", {
@@ -11899,6 +11986,47 @@ window.__ModuleLoader__.load({
11899
11986
  setBusy(null);
11900
11987
  }
11901
11988
  };
11989
+ const postMaxTokens = async (patch, modelId) => {
11990
+ try {
11991
+ if (modelId === null) setBusy("maxTokens");
11992
+ else setSavingModel(modelId);
11993
+ setError(null);
11994
+ const updated = await api$16.request("/settings", {
11995
+ method: "POST",
11996
+ body: JSON.stringify({ maxTokensOverrides: patch })
11997
+ });
11998
+ setStatus(updated);
11999
+ notifyChange();
12000
+ } catch (err) {
12001
+ reportError(err);
12002
+ } finally {
12003
+ if (modelId === null) setBusy(null);
12004
+ else setSavingModel(null);
12005
+ }
12006
+ };
12007
+ const saveMaxTokens = async (modelId) => {
12008
+ const raw = maxTokensDrafts[modelId] || "";
12009
+ const parsed = parsePositiveCapacity$1(raw);
12010
+ if (parsed === null) {
12011
+ setError(t.maxTokensInvalid.replace("{value}", raw));
12012
+ return;
12013
+ }
12014
+ await postMaxTokens({ [modelId]: parsed }, modelId);
12015
+ };
12016
+ /** `null` restores the model's own limit; the host deletes the saved value. */
12017
+ const resetMaxTokens = (modelId) => postMaxTokens({ [modelId]: null }, modelId);
12018
+ const resetAllMaxTokens = async () => {
12019
+ const models = Object.keys(status?.maxTokensOverrides ?? {});
12020
+ if (models.length === 0) return;
12021
+ if (typeof window !== "undefined" && !window.confirm(t.maxTokensResetAllConfirm)) return;
12022
+ await postMaxTokens(Object.fromEntries(models.map((model) => [model, null])), null);
12023
+ };
12024
+ const updateMaxTokensDraft = (modelId, draft) => {
12025
+ setMaxTokensDrafts((prev) => ({
12026
+ ...prev,
12027
+ [modelId]: draft
12028
+ }));
12029
+ };
11902
12030
  const updateContextDraft = (modelId, draft) => {
11903
12031
  setContextDrafts((prev) => ({
11904
12032
  ...prev,
@@ -11909,6 +12037,7 @@ window.__ModuleLoader__.load({
11909
12037
  const hasAdopted = accounts.some((account) => account.adopted === true || account.removable === false);
11910
12038
  const contextModels = status?.models.filter((model) => model.enabled) ?? [];
11911
12039
  const overrideCount = Object.keys(status?.contextWindowOverrides ?? {}).length;
12040
+ const maxTokensOverrideCount = Object.keys(status?.maxTokensOverrides ?? {}).length;
11912
12041
  const quota = status?.quota;
11913
12042
  const windows = quota?.windows ?? [];
11914
12043
  return {
@@ -11921,6 +12050,7 @@ window.__ModuleLoader__.load({
11921
12050
  connection,
11922
12051
  pasteValue,
11923
12052
  contextDrafts,
12053
+ maxTokensDrafts,
11924
12054
  savingModel
11925
12055
  },
11926
12056
  derived: {
@@ -11928,6 +12058,7 @@ window.__ModuleLoader__.load({
11928
12058
  hasAdopted,
11929
12059
  contextModels,
11930
12060
  overrideCount,
12061
+ maxTokensOverrideCount,
11931
12062
  quota,
11932
12063
  windows,
11933
12064
  poolLabels: t
@@ -11948,11 +12079,16 @@ window.__ModuleLoader__.load({
11948
12079
  setAllModels,
11949
12080
  updateEffort,
11950
12081
  updateCacheTtl,
12082
+ updateSubagentCacheTtl,
11951
12083
  updateFastMode,
11952
12084
  updateCacheKeepalive,
11953
12085
  saveContextWindow,
11954
12086
  resetContextWindow,
11955
12087
  resetAllContextWindows,
12088
+ updateMaxTokensDraft,
12089
+ saveMaxTokens,
12090
+ resetMaxTokens,
12091
+ resetAllMaxTokens,
11956
12092
  updateContextDraft,
11957
12093
  setPasteValue
11958
12094
  }
@@ -11977,11 +12113,11 @@ window.__ModuleLoader__.load({
11977
12113
  * out here would hide a choice the host would accept and a catalog may expose.
11978
12114
  */
11979
12115
  const EFFORT_LABELS$2 = {
11980
- low: zh$17.effortLow,
11981
- medium: zh$17.effortMedium,
11982
- high: zh$17.effortHigh,
11983
- xhigh: zh$17.effortXHigh,
11984
- max: zh$17.effortMax
12116
+ low: zh$18.effortLow,
12117
+ medium: zh$18.effortMedium,
12118
+ high: zh$18.effortHigh,
12119
+ xhigh: zh$18.effortXHigh,
12120
+ max: zh$18.effortMax
11985
12121
  };
11986
12122
  /** One-line capability summary shown as a model pill's hover title. */
11987
12123
  function modelFacts(model, t) {
@@ -11999,10 +12135,10 @@ window.__ModuleLoader__.load({
11999
12135
  onModelChange,
12000
12136
  loadModelDirectory
12001
12137
  });
12002
- const { status, loading, busy, error, flow, connection, pasteValue, contextDrafts, savingModel } = state;
12003
- const { accounts, hasAdopted, contextModels, overrideCount, quota, windows, poolLabels } = derived;
12004
- const { login, cancelLogin, submitPaste, adopt, stopImporting, accountAction, setStrategy, relogin, refreshQuota, refreshCatalog, testConnection, toggleModel, setAllModels, updateEffort, updateCacheTtl, updateFastMode, updateCacheKeepalive, saveContextWindow, resetContextWindow, resetAllContextWindows, updateContextDraft, setPasteValue } = actions;
12005
- const t = useLineDict(NS_CLAUDE, zh$17);
12138
+ const { status, loading, busy, error, flow, connection, pasteValue, contextDrafts, savingModel, maxTokensDrafts } = state;
12139
+ const { accounts, hasAdopted, contextModels, overrideCount, maxTokensOverrideCount, quota, windows, poolLabels } = derived;
12140
+ const { login, cancelLogin, submitPaste, adopt, stopImporting, accountAction, setStrategy, relogin, refreshQuota, refreshCatalog, testConnection, toggleModel, setAllModels, updateEffort, updateCacheTtl, updateSubagentCacheTtl, updateFastMode, updateCacheKeepalive, saveContextWindow, resetContextWindow, resetAllContextWindows, updateMaxTokensDraft, saveMaxTokens, resetMaxTokens, resetAllMaxTokens, updateContextDraft, setPasteValue } = actions;
12141
+ const t = useLineDict(NS_CLAUDE, zh$18);
12006
12142
  if (loading) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
12007
12143
  className: "dsha-page",
12008
12144
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
@@ -12293,6 +12429,36 @@ window.__ModuleLoader__.load({
12293
12429
  ]
12294
12430
  })]
12295
12431
  }),
12432
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
12433
+ className: "dsha-pref-row",
12434
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: t.subagentCacheTtl }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
12435
+ className: "dsha-muted",
12436
+ children: t.subagentCacheTtlHint
12437
+ })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("select", {
12438
+ className: "dsha-select",
12439
+ "aria-label": t.subagentCacheTtl,
12440
+ value: status?.subagentCacheTtl ?? "",
12441
+ disabled: busy !== null,
12442
+ onChange: (event) => {
12443
+ const value = event.currentTarget.value;
12444
+ updateSubagentCacheTtl(value === "" ? null : value);
12445
+ },
12446
+ children: [
12447
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
12448
+ value: "",
12449
+ children: t.subagentCacheTtlOfficial
12450
+ }),
12451
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
12452
+ value: "1h",
12453
+ children: t.cacheTtl1h
12454
+ }),
12455
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
12456
+ value: "5m",
12457
+ children: t.cacheTtl5m
12458
+ })
12459
+ ]
12460
+ })]
12461
+ }),
12296
12462
  /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
12297
12463
  className: "dsha-pref-row",
12298
12464
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: t.fastMode }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
@@ -12379,6 +12545,44 @@ window.__ModuleLoader__.load({
12379
12545
  })
12380
12546
  ]
12381
12547
  }),
12548
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", {
12549
+ className: "dsha-group",
12550
+ children: [
12551
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
12552
+ className: "dsha-grouphead",
12553
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("h3", { children: t.maxTokensSection })
12554
+ }),
12555
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
12556
+ className: "dsha-muted",
12557
+ children: t.maxTokensHint
12558
+ }),
12559
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ContextWindowEditor, {
12560
+ rows: contextModels.map((model) => ({
12561
+ id: model.id,
12562
+ name: model.name,
12563
+ draft: maxTokensDrafts[model.id] ?? "",
12564
+ inputLabel: `${model.name} max output tokens`,
12565
+ resetLabel: `${model.name} ${t.maxTokensSection} ${t.contextWindowReset}`,
12566
+ hasOverride: status?.maxTokensOverrides?.[model.id] !== void 0,
12567
+ saving: savingModel === model.id
12568
+ })),
12569
+ labels: {
12570
+ tokens: t.tokens,
12571
+ save: t.save,
12572
+ saving: t.saving,
12573
+ reset: t.contextWindowReset,
12574
+ resetAll: t.contextWindowResetAll,
12575
+ empty: t.contextWindowNoneEnabled
12576
+ },
12577
+ busy: busy !== null,
12578
+ overrideCount: maxTokensOverrideCount,
12579
+ onDraftChange: (id, draft) => updateMaxTokensDraft(id, draft),
12580
+ onCommit: (id) => void saveMaxTokens(id),
12581
+ onReset: (id) => void resetMaxTokens(id),
12582
+ onResetAll: () => void resetAllMaxTokens()
12583
+ })
12584
+ ]
12585
+ }),
12382
12586
  /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", {
12383
12587
  className: "dsha-group",
12384
12588
  children: [
@@ -12624,7 +12828,7 @@ window.__ModuleLoader__.load({
12624
12828
  //#endregion
12625
12829
  //#region src/client/providers/ollama/locales.ts
12626
12830
  const NS_OLLAMA = "dsh-ollama";
12627
- const zh$16 = {
12831
+ const zh$17 = {
12628
12832
  ...accountPoolZh,
12629
12833
  relogin: "更换 Key",
12630
12834
  needsRelogin: "Key 已失效",
@@ -12676,7 +12880,7 @@ window.__ModuleLoader__.load({
12676
12880
  usageNone: "尚无请求",
12677
12881
  usageHint: "按 Ollama 每次响应自带的 token 计数本地累加。"
12678
12882
  };
12679
- const en$16 = {
12883
+ const en$17 = {
12680
12884
  ...accountPoolEn,
12681
12885
  relogin: "Replace Key",
12682
12886
  needsRelogin: "Key rejected",
@@ -12728,11 +12932,11 @@ window.__ModuleLoader__.load({
12728
12932
  usageNone: "No requests yet",
12729
12933
  usageHint: "Summed locally from the token counts Ollama returns on each response."
12730
12934
  };
12731
- const dictionaries$16 = {
12732
- zh: zh$16,
12733
- "zh-CN": zh$16,
12734
- en: en$16,
12735
- "en-US": en$16
12935
+ const dictionaries$17 = {
12936
+ zh: zh$17,
12937
+ "zh-CN": zh$17,
12938
+ en: en$17,
12939
+ "en-US": en$17
12736
12940
  };
12737
12941
  //#endregion
12738
12942
  //#region src/client/providers/ollama/OllamaSection.tsx
@@ -12868,7 +13072,7 @@ window.__ModuleLoader__.load({
12868
13072
  const setEffort = (0, react.useCallback)((value) => {
12869
13073
  run("effort", () => API$8.setDefaultReasoningEffort(value === "" ? null : value));
12870
13074
  }, [run]);
12871
- const t = useLineDict(NS_OLLAMA, zh$16);
13075
+ const t = useLineDict(NS_OLLAMA, zh$17);
12872
13076
  const pool = status?.pool;
12873
13077
  const models = status?.models ?? [];
12874
13078
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [
@@ -12983,7 +13187,7 @@ window.__ModuleLoader__.load({
12983
13187
  className: "dsha-btn",
12984
13188
  disabled: busy !== null,
12985
13189
  onClick: () => setShowKeyForm(false),
12986
- children: zh$16.deleteAccount
13190
+ children: zh$17.deleteAccount
12987
13191
  })]
12988
13192
  })
12989
13193
  ]
@@ -13184,7 +13388,7 @@ window.__ModuleLoader__.load({
13184
13388
  //#endregion
13185
13389
  //#region src/client/providers/antigravity-acp/locales.ts
13186
13390
  const NS_ANTIGRAVITY_ACP = "dsh-antigravity-acp";
13187
- const zh$15 = {
13391
+ const zh$16 = {
13188
13392
  title: "Antigravity(ACP)",
13189
13393
  pageDesc: "通过 Google 官方 Antigravity CLI 的 Agent Client Protocol(ACP)接入:模型、工具与会话全部由官方进程驱动,登录态由官方进程自己保管。",
13190
13394
  routeOwned: "模型路由由本插件提供",
@@ -13276,7 +13480,7 @@ window.__ModuleLoader__.load({
13276
13480
  enabledHint: "该线路当前已启用。",
13277
13481
  toggleHint: "可在「订阅服务」总览页的该线路卡片上随时停用。"
13278
13482
  };
13279
- const en$15 = {
13483
+ const en$16 = {
13280
13484
  title: "Antigravity (ACP)",
13281
13485
  pageDesc: "Connect through Google's official Antigravity CLI over the Agent Client Protocol (ACP): the model, its tools and its sessions all come from the official process, which also keeps its own sign-in state.",
13282
13486
  routeOwned: "Model route served by this plugin",
@@ -13368,11 +13572,11 @@ window.__ModuleLoader__.load({
13368
13572
  enabledHint: "This line is enabled.",
13369
13573
  toggleHint: "You can switch it off at any time from its card in the subscription overview."
13370
13574
  };
13371
- const dictionaries$15 = {
13372
- zh: zh$15,
13373
- "zh-CN": zh$15,
13374
- en: en$15,
13375
- "en-US": en$15
13575
+ const dictionaries$16 = {
13576
+ zh: zh$16,
13577
+ "zh-CN": zh$16,
13578
+ en: en$16,
13579
+ "en-US": en$16
13376
13580
  };
13377
13581
  //#endregion
13378
13582
  //#region src/client/providers/antigravity-acp/AntigravityAcpSection.tsx
@@ -13429,7 +13633,7 @@ window.__ModuleLoader__.load({
13429
13633
  setBusy(null);
13430
13634
  }
13431
13635
  }, [props]);
13432
- const t = useLineDict(NS_ANTIGRAVITY_ACP, zh$15);
13636
+ const t = useLineDict(NS_ANTIGRAVITY_ACP, zh$16);
13433
13637
  const models = status?.models ?? [];
13434
13638
  const auth = status?.auth;
13435
13639
  const usage = status?.usage;
@@ -13937,7 +14141,7 @@ window.__ModuleLoader__.load({
13937
14141
  //#endregion
13938
14142
  //#region src/client/providers/aws-quick/locales.ts
13939
14143
  const NS_AWS_QUICK = "dsh-aws-quick";
13940
- const zh$14 = {
14144
+ const zh$15 = {
13941
14145
  title: "AWS Quick",
13942
14146
  pageDesc: "通过本机 AWS Quick Desktop 官方 agent 使用 Quick 订阅,支持流式文本、思考与三种响应模式。",
13943
14147
  refresh: "刷新状态",
@@ -13992,8 +14196,8 @@ window.__ModuleLoader__.load({
13992
14196
  toolsError: "工具初始化失败",
13993
14197
  toolsHint: "提前创建 Quick 原生连接器;插件不会绕过 Quick 批准。"
13994
14198
  };
13995
- const dictionaries$14 = {
13996
- zh: zh$14,
14199
+ const dictionaries$15 = {
14200
+ zh: zh$15,
13997
14201
  en: {
13998
14202
  title: "AWS Quick",
13999
14203
  pageDesc: "Use an AWS Quick subscription through the official local Quick Desktop agent, with streaming text, reasoning and three response modes.",
@@ -14058,7 +14262,7 @@ window.__ModuleLoader__.load({
14058
14262
  const [error, setError] = (0, react.useState)(null);
14059
14263
  const [selected, setSelected] = (0, react.useState)(null);
14060
14264
  const [binaryPath, setBinaryPath] = (0, react.useState)("");
14061
- const t = useLineDict(NS_AWS_QUICK, zh$14);
14265
+ const t = useLineDict(NS_AWS_QUICK, zh$15);
14062
14266
  const apply = (0, react.useCallback)((next) => {
14063
14267
  setStatus(next);
14064
14268
  setSelected(next.enabledModelIds === null ? null : new Set(next.enabledModelIds));
@@ -14438,7 +14642,7 @@ window.__ModuleLoader__.load({
14438
14642
  //#endregion
14439
14643
  //#region src/client/providers/opencode-go/locales.ts
14440
14644
  const NS_OPENCODE_GO = "dsh-opencode-go";
14441
- const zh$13 = {
14645
+ const zh$14 = {
14442
14646
  ...accountPoolZh,
14443
14647
  title: "OpenCode Go",
14444
14648
  pageDesc: "使用 OpenCode Go 订阅,管理账号、模型、思考档位与额度。",
@@ -14511,7 +14715,7 @@ window.__ModuleLoader__.load({
14511
14715
  authMethodApiKey: "个人 API Key",
14512
14716
  composerLabel: "OpenCode Go 剩余额度"
14513
14717
  };
14514
- const en$13 = {
14718
+ const en$14 = {
14515
14719
  ...accountPoolEn,
14516
14720
  title: "OpenCode Go",
14517
14721
  pageDesc: "Use an OpenCode Go subscription and manage accounts, models, reasoning levels, and quota.",
@@ -14584,11 +14788,11 @@ window.__ModuleLoader__.load({
14584
14788
  authMethodApiKey: "Personal API Key",
14585
14789
  composerLabel: "OpenCode Go allowance left"
14586
14790
  };
14587
- const dictionaries$13 = {
14588
- zh: zh$13,
14589
- "zh-CN": zh$13,
14590
- en: en$13,
14591
- "en-US": en$13
14791
+ const dictionaries$14 = {
14792
+ zh: zh$14,
14793
+ "zh-CN": zh$14,
14794
+ en: en$14,
14795
+ "en-US": en$14
14592
14796
  };
14593
14797
  //#endregion
14594
14798
  //#region src/client/providers/opencode-go/OpenCodeGoQuotaCard.tsx
@@ -14806,7 +15010,7 @@ window.__ModuleLoader__.load({
14806
15010
  const api$14 = createLineApi("/opencode-go/api", "OpenCode Go");
14807
15011
  const QUOTA_POLL_MS$1 = 3e4;
14808
15012
  function OpenCodeGoSection({ onModelChange, loadModelDirectory }) {
14809
- const t = useLineDict(NS_OPENCODE_GO, zh$13);
15013
+ const t = useLineDict(NS_OPENCODE_GO, zh$14);
14810
15014
  const [status, setStatus] = (0, react.useState)(null);
14811
15015
  const [loading, setLoading] = (0, react.useState)(true);
14812
15016
  const [busy, setBusy] = (0, react.useState)(null);
@@ -15216,7 +15420,7 @@ window.__ModuleLoader__.load({
15216
15420
  * 键名重合的会被渲染成 ChatGPT 的措辞,不重合的会把键名本身打印出来)。
15217
15421
  */
15218
15422
  const NS_STEP_CODE = "dsh-step-code";
15219
- const zh$12 = {
15423
+ const zh$13 = {
15220
15424
  ...accountPoolZh,
15221
15425
  title: "Step Code(Step Plan 订阅)",
15222
15426
  pageDesc: "连接 Step Plan 订阅或开放平台 API Key,管理账号池、额度与可用模型。",
@@ -15386,7 +15590,7 @@ window.__ModuleLoader__.load({
15386
15590
  cacheExpiredHint: "缓存可能已过期:距上次请求约 {minutes} 分钟,下次会重新处理前缀。",
15387
15591
  cacheHitRatioUnavailable: "—"
15388
15592
  };
15389
- const en$12 = {
15593
+ const en$13 = {
15390
15594
  ...accountPoolEn,
15391
15595
  title: "Step Code (Step Plan subscription)",
15392
15596
  pageDesc: "Reach StepFun with a Step Plan subscription (China api.stepfun.com / international api.stepfun.ai) or an open-platform API key, and manage the account pool, plan quota, cache usage and model selection. A region is a property of the credential and the two never share, so a pool can carry accounts from both.",
@@ -15554,11 +15758,11 @@ window.__ModuleLoader__.load({
15554
15758
  cacheExpiredHint: "The cache has likely expired: about {minutes} minutes since the last request, so the next turn will reprocess the prefix.",
15555
15759
  cacheHitRatioUnavailable: "—"
15556
15760
  };
15557
- const dictionaries$12 = {
15558
- zh: zh$12,
15559
- "zh-CN": zh$12,
15560
- en: en$12,
15561
- "en-US": en$12
15761
+ const dictionaries$13 = {
15762
+ zh: zh$13,
15763
+ "zh-CN": zh$13,
15764
+ en: en$13,
15765
+ "en-US": en$13
15562
15766
  };
15563
15767
  /** 一个额度窗口的键到「窗口长度(分钟)」的映射。窗口名由共享组件按长度本地化。 */
15564
15768
  const QUOTA_WINDOW_MINUTES = {
@@ -15648,7 +15852,7 @@ window.__ModuleLoader__.load({
15648
15852
  /** 登录状态机的轮询节奏。真实超时与间隔由 host 拥有,卡片只是跟随。 */
15649
15853
  const LOGIN_POLL_INTERVAL_MS$1 = 2e3;
15650
15854
  /** 本卡片的字典;身份稳定,依赖它的 effect 才不会每次渲染重建。 */
15651
- const fallbackTranslate$5 = (key) => zh$12[key];
15855
+ const fallbackTranslate$5 = (key) => zh$13[key];
15652
15856
  /**
15653
15857
  * 共享账号池卡片需要的标签集,按本卡片的字典逐键查出来。
15654
15858
  *
@@ -16334,7 +16538,7 @@ window.__ModuleLoader__.load({
16334
16538
  const { status, loading, busy, error, connection, adoptResult, pasteValue, profile, pasteOpen, contextDrafts, savingModel, quotaAccount, quotaPassword, quotaToken } = state;
16335
16539
  const { accounts, models, contextModels, overrideCount, login, quota, authenticated, poolLabels, cache, cacheHitRatio: hitRatio, quotaCredential } = derived;
16336
16540
  const { setProfile, login: startLogin, cancelLogin, submitPaste, setPasteValue, togglePaste, adopt, clearAdoptResult, accountAction, setStrategy, toggleModel, setAllModels, saveContextWindow, resetContextWindow, resetAllContextWindows, updateContextDraft, setDefaultReasoningEffort, setCacheRequestParams, refreshQuota, refreshCatalog, testConnection, setQuotaAccount, setQuotaPassword, setQuotaToken, submitQuotaPassword, submitQuotaToken, clearQuotaCredential } = actions;
16337
- const t = useLineDict(NS_STEP_CODE, zh$12);
16541
+ const t = useLineDict(NS_STEP_CODE, zh$13);
16338
16542
  if (loading) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
16339
16543
  className: "dsha-page",
16340
16544
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
@@ -17238,7 +17442,7 @@ window.__ModuleLoader__.load({
17238
17442
  //#endregion
17239
17443
  //#region src/client/providers/cline-pass/locales.ts
17240
17444
  const NS_CLINE_PASS = "dsh-cline-pass";
17241
- const zh$11 = {
17445
+ const zh$12 = {
17242
17446
  ...accountPoolZh,
17243
17447
  relogin: "重新登录",
17244
17448
  needsRelogin: "登录已失效",
@@ -17362,7 +17566,7 @@ window.__ModuleLoader__.load({
17362
17566
  limitRoute: "模型路由按 provider id 抢占:若已有其他插件占用 cline-pass,本卡仍可配置,但请求由对方服务。",
17363
17567
  limitQuota: "额度窗口来自网关的 usage-limits 接口;接口失败时卡片保留上一次读数并显示原因。"
17364
17568
  };
17365
- const en$11 = {
17569
+ const en$12 = {
17366
17570
  ...accountPoolEn,
17367
17571
  relogin: "Sign in again",
17368
17572
  needsRelogin: "Sign-in expired",
@@ -17486,11 +17690,11 @@ window.__ModuleLoader__.load({
17486
17690
  limitRoute: "The route is claimed by provider id: if another plugin already serves cline-pass, this card still configures the line but that provider answers the requests.",
17487
17691
  limitQuota: "Quota windows come from the gateway usage-limits endpoint; when it fails the card keeps the previous reading and says why."
17488
17692
  };
17489
- const dictionaries$11 = {
17490
- zh: zh$11,
17491
- "zh-CN": zh$11,
17492
- en: en$11,
17493
- "en-US": en$11
17693
+ const dictionaries$12 = {
17694
+ zh: zh$12,
17695
+ "zh-CN": zh$12,
17696
+ en: en$12,
17697
+ "en-US": en$12
17494
17698
  };
17495
17699
  //#endregion
17496
17700
  //#region src/client/providers/cline-pass/ClinePassSection.tsx
@@ -17611,10 +17815,10 @@ window.__ModuleLoader__.load({
17611
17815
  API$5.loginStatus(flow.id).then((next) => {
17612
17816
  setLoginFlow(next);
17613
17817
  if (next.status === "complete") {
17614
- setNotice(zh$11.loginComplete.replace("{account}", next.accountAlias === "" ? "Cline Pass" : next.accountAlias));
17818
+ setNotice(zh$12.loginComplete.replace("{account}", next.accountAlias === "" ? "Cline Pass" : next.accountAlias));
17615
17819
  setShowKeyForm(false);
17616
17820
  loadStatus();
17617
- } else if (next.status === "failed") setError(zh$11.loginFailed.replace("{detail}", next.error));
17821
+ } else if (next.status === "failed") setError(zh$12.loginFailed.replace("{detail}", next.error));
17618
17822
  }).catch((cause) => setError(detail$1(cause)));
17619
17823
  }, Math.max(2, flow.intervalSeconds) * 1e3);
17620
17824
  return () => window.clearInterval(timer);
@@ -17688,7 +17892,7 @@ window.__ModuleLoader__.load({
17688
17892
  apiKey: trimmed,
17689
17893
  ...keyBaseURL.trim() === "" ? {} : { baseURL: keyBaseURL.trim() }
17690
17894
  }).then((result) => {
17691
- setNotice(result.authorized ? zh$11.keyTestOk.replace("{ms}", String(Math.round(result.ms))) : zh$11.keyTestFailed.replace("{detail}", result.error));
17895
+ setNotice(result.authorized ? zh$12.keyTestOk.replace("{ms}", String(Math.round(result.ms))) : zh$12.keyTestFailed.replace("{detail}", result.error));
17692
17896
  }).catch((cause) => setError(detail$1(cause))).finally(() => setBusy(null));
17693
17897
  }, [key, keyBaseURL]);
17694
17898
  const testStored = (0, react.useCallback)((accountId) => {
@@ -17696,7 +17900,7 @@ window.__ModuleLoader__.load({
17696
17900
  setError(null);
17697
17901
  setNotice(null);
17698
17902
  API$5.testKey({ accountId }).then((result) => {
17699
- setNotice(result.authorized ? zh$11.keyTestOk.replace("{ms}", String(Math.round(result.ms))) : zh$11.keyTestFailed.replace("{detail}", result.error));
17903
+ setNotice(result.authorized ? zh$12.keyTestOk.replace("{ms}", String(Math.round(result.ms))) : zh$12.keyTestFailed.replace("{detail}", result.error));
17700
17904
  }).catch((cause) => setError(detail$1(cause))).finally(() => setBusy(null));
17701
17905
  }, []);
17702
17906
  const enabledModels = (0, react.useMemo)(() => (status?.models ?? []).filter((model) => model.enabled), [status]);
@@ -17732,7 +17936,7 @@ window.__ModuleLoader__.load({
17732
17936
  if (model === void 0) return;
17733
17937
  const parsed = parsePositiveCapacity$1(drafts[id] ?? formatCapacity$1(model.contextWindow));
17734
17938
  if (parsed === null) {
17735
- setError(zh$11.error.replace("{detail}", zh$11.defaultContextWindow));
17939
+ setError(zh$12.error.replace("{detail}", zh$12.defaultContextWindow));
17736
17940
  return;
17737
17941
  }
17738
17942
  run("ctx:" + id, () => API$5.setContextWindow(id, parsed));
@@ -17754,7 +17958,7 @@ window.__ModuleLoader__.load({
17754
17958
  }, [run, status]);
17755
17959
  const resetAllContext = (0, react.useCallback)(() => {
17756
17960
  if (status === null) return;
17757
- if (typeof window !== "undefined" && !window.confirm(zh$11.contextResetAll)) return;
17961
+ if (typeof window !== "undefined" && !window.confirm(zh$12.contextResetAll)) return;
17758
17962
  const overridden = status.models.filter((model) => model.contextWindowOverride !== void 0);
17759
17963
  run("ctx-all", async () => {
17760
17964
  let next = status;
@@ -17795,7 +17999,7 @@ window.__ModuleLoader__.load({
17795
17999
  const refreshUsage = (0, react.useCallback)(() => {
17796
18000
  run("usage", async () => {
17797
18001
  const outcome = await API$5.readUsage();
17798
- setNotice(outcome.usage.accounts.some((account) => account.ok) ? "" : zh$11.usageEmpty);
18002
+ setNotice(outcome.usage.accounts.some((account) => account.ok) ? "" : zh$12.usageEmpty);
17799
18003
  return outcome.status;
17800
18004
  });
17801
18005
  }, [run]);
@@ -17815,7 +18019,7 @@ window.__ModuleLoader__.load({
17815
18019
  };
17816
18020
  const invalid = Object.entries(numbers).find(([, value]) => !Number.isSafeInteger(value) || value < 0);
17817
18021
  if (invalid !== void 0) {
17818
- setError(zh$11.error.replace("{detail}", invalid[0]));
18022
+ setError(zh$12.error.replace("{detail}", invalid[0]));
17819
18023
  return;
17820
18024
  }
17821
18025
  setBusy("settings");
@@ -17826,7 +18030,7 @@ window.__ModuleLoader__.load({
17826
18030
  }).then((next) => {
17827
18031
  applyStatus(next);
17828
18032
  setSettingsForm(settingsFormOf$1(next));
17829
- setNotice(zh$11.saved);
18033
+ setNotice(zh$12.saved);
17830
18034
  }).catch((cause) => setError(detail$1(cause))).finally(() => setBusy(null));
17831
18035
  }, [settingsForm, applyStatus]);
17832
18036
  const toggleTools = (0, react.useCallback)(() => {
@@ -17837,10 +18041,10 @@ window.__ModuleLoader__.load({
17837
18041
  API$5.updateSettings({ exposeTools: value }).then((next) => {
17838
18042
  applyStatus(next);
17839
18043
  setSettingsForm(settingsFormOf$1(next));
17840
- setNotice(zh$11.restartRequired);
18044
+ setNotice(zh$12.restartRequired);
17841
18045
  }).catch((cause) => setError(detail$1(cause))).finally(() => setBusy(null));
17842
18046
  }, [status, applyStatus]);
17843
- const t = useLineDict(NS_CLINE_PASS, zh$11);
18047
+ const t = useLineDict(NS_CLINE_PASS, zh$12);
17844
18048
  const errorPrefix = t.error.split("{detail}")[0] ?? "";
17845
18049
  const pool = status?.pool;
17846
18050
  const accounts = (0, react.useMemo)(() => {
@@ -18617,7 +18821,7 @@ window.__ModuleLoader__.load({
18617
18821
  * 'settings.section' 上的那张座位(那张座绑定的是 ChatGPT 的键集)。
18618
18822
  */
18619
18823
  const NS_QODER = "dsh-qoder";
18620
- const zh$10 = {
18824
+ const zh$11 = {
18621
18825
  modelRowEfforts: "档位 {list}",
18622
18826
  modelRowNoEfforts: "无档位",
18623
18827
  modelRowOutput: "输出 {cap}",
@@ -18741,8 +18945,8 @@ window.__ModuleLoader__.load({
18741
18945
  quotaWindow: "额度窗口"
18742
18946
  };
18743
18947
  /** 两套字典。 */
18744
- const dictionaries$10 = {
18745
- zh: zh$10,
18948
+ const dictionaries$11 = {
18949
+ zh: zh$11,
18746
18950
  en: {
18747
18951
  modelRowEfforts: "efforts {list}",
18748
18952
  modelRowNoEfforts: "no efforts",
@@ -18943,7 +19147,7 @@ window.__ModuleLoader__.load({
18943
19147
  /** 登录状态机的轮询节奏。真实超时与间隔由 host 拥有,卡片只是跟随。 */
18944
19148
  const LOGIN_POLL_INTERVAL_MS = 2e3;
18945
19149
  /** 本卡片的字典;身份稳定,依赖它的 effect 才不会每次渲染重建。 */
18946
- const fallbackTranslate$4 = (key) => zh$10[key];
19150
+ const fallbackTranslate$4 = (key) => zh$11[key];
18947
19151
  /**
18948
19152
  * 共享账号池卡片需要的标签集,按本卡片的字典逐键查出来。
18949
19153
  *
@@ -19515,7 +19719,7 @@ window.__ModuleLoader__.load({
19515
19719
  * `defaultMaxTokens`),客户端不按模型名推断任何一项。与 OpenDesign 卡同一写法:
19516
19720
  * 数据一行,散文进折叠区。
19517
19721
  */
19518
- function qoderModelRowHint(model, t = zh$10) {
19722
+ function qoderModelRowHint(model, t = zh$11) {
19519
19723
  return `${formatTokenCount(model.contextWindow)} · ${model.supportsImages ? "text+image" : "text"} · ${model.reasoningEfforts.length === 0 ? t.modelRowNoEfforts : t.modelRowEfforts.replace("{list}", model.reasoningEfforts.join("/"))} · ${t.modelRowOutput.replace("{cap}", formatTokenCount(model.defaultMaxTokens))}`;
19520
19724
  }
19521
19725
  function QoderSection({ onModelChange } = {}) {
@@ -19523,7 +19727,7 @@ window.__ModuleLoader__.load({
19523
19727
  const { status, loading, busy, error, connection, adoptResult, pasteValue, region, pasteOpen, contextDrafts, savingModel } = state;
19524
19728
  const { accounts, models, contextModels, overrideCount, login, quota, authenticated, poolLabels, cache, cacheHitRatio: hitRatio } = derived;
19525
19729
  const { setRegion, login: startLogin, cancelLogin, submitPaste, setPasteValue, togglePaste, adopt, clearAdoptResult, accountAction, setStrategy, toggleModel, setAllModels, setModelGroup, saveContextWindow, resetContextWindow, resetAllContextWindows, updateContextDraft, setDefaultReasoningEffort, refreshQuota, refreshCatalog, testConnection } = actions;
19526
- const t = useLineDict(NS_QODER, zh$10);
19730
+ const t = useLineDict(NS_QODER, zh$11);
19527
19731
  if (loading) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
19528
19732
  className: "dsha-page",
19529
19733
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
@@ -20121,7 +20325,7 @@ window.__ModuleLoader__.load({
20121
20325
  //#endregion
20122
20326
  //#region src/client/providers/opendesign/locales.ts
20123
20327
  const NS_OPENDESIGN = "dsh-opendesign";
20124
- const zh$9 = {
20328
+ const zh$10 = {
20125
20329
  ...accountPoolZh,
20126
20330
  relogin: "重新登录",
20127
20331
  needsRelogin: "登录已失效",
@@ -20229,7 +20433,7 @@ window.__ModuleLoader__.load({
20229
20433
  limitRoute: "模型路由按 provider id 抢占:若已有其他插件占用 opendesign,本卡仍可配置,但请求由对方服务。",
20230
20434
  limitQuota: "套餐与额度读取只覆盖浏览器授权登录的账号;粘贴的 API Key 没有控制 Key,请在 OpenDesign Cloud 控制台查看用量。"
20231
20435
  };
20232
- const en$9 = {
20436
+ const en$10 = {
20233
20437
  ...accountPoolEn,
20234
20438
  relogin: "Add again",
20235
20439
  needsRelogin: "Key invalid",
@@ -20337,11 +20541,11 @@ window.__ModuleLoader__.load({
20337
20541
  limitRoute: "The route is claimed by provider id: if another plugin already serves opendesign, this card still configures the line but that provider answers the requests.",
20338
20542
  limitQuota: "Plan and credit reads cover browser-signed-in accounts only; a pasted API key has no control key, so see usage in the OpenDesign Cloud console."
20339
20543
  };
20340
- const dictionaries$9 = {
20341
- zh: zh$9,
20342
- "zh-CN": zh$9,
20343
- en: en$9,
20344
- "en-US": en$9
20544
+ const dictionaries$10 = {
20545
+ zh: zh$10,
20546
+ "zh-CN": zh$10,
20547
+ en: en$10,
20548
+ "en-US": en$10
20345
20549
  };
20346
20550
  //#endregion
20347
20551
  //#region src/client/providers/opendesign/OpenDesignSection.tsx
@@ -20636,7 +20840,7 @@ window.__ModuleLoader__.load({
20636
20840
  try {
20637
20841
  const outcome = await API$4.readUsage();
20638
20842
  setStatus(outcome.status);
20639
- if (!silent) setNotice(outcome.usage.accounts.some((account) => account.ok) ? "" : zh$9.usageEmpty);
20843
+ if (!silent) setNotice(outcome.usage.accounts.some((account) => account.ok) ? "" : zh$10.usageEmpty);
20640
20844
  } catch (cause) {
20641
20845
  if (!silent) setError(detail(cause));
20642
20846
  }
@@ -20673,10 +20877,10 @@ window.__ModuleLoader__.load({
20673
20877
  API$4.loginStatus(flow.id).then((next) => {
20674
20878
  setLoginFlow(next);
20675
20879
  if (next.status === "complete") {
20676
- setNotice(zh$9.loginComplete.replace("{account}", next.accountAlias === "" ? "OpenDesign" : next.accountAlias));
20880
+ setNotice(zh$10.loginComplete.replace("{account}", next.accountAlias === "" ? "OpenDesign" : next.accountAlias));
20677
20881
  setShowKeyForm(false);
20678
20882
  reload();
20679
- } else if (next.status === "failed") setError(zh$9.loginFailed.replace("{detail}", next.error));
20883
+ } else if (next.status === "failed") setError(zh$10.loginFailed.replace("{detail}", next.error));
20680
20884
  }).catch((cause) => setError(detail(cause)));
20681
20885
  }, Math.max(2, flow.intervalSeconds) * 1e3);
20682
20886
  return () => window.clearInterval(timer);
@@ -20742,7 +20946,7 @@ window.__ModuleLoader__.load({
20742
20946
  const refreshUsage = (0, react.useCallback)(() => {
20743
20947
  run("usage", async () => {
20744
20948
  const outcome = await API$4.readUsage();
20745
- setNotice(outcome.usage.accounts.some((account) => account.ok) ? "" : zh$9.usageEmpty);
20949
+ setNotice(outcome.usage.accounts.some((account) => account.ok) ? "" : zh$10.usageEmpty);
20746
20950
  return outcome.status;
20747
20951
  });
20748
20952
  }, [run]);
@@ -20777,7 +20981,7 @@ window.__ModuleLoader__.load({
20777
20981
  apiKey: trimmed,
20778
20982
  ...keyBaseURL.trim() === "" ? {} : { baseURL: keyBaseURL.trim() }
20779
20983
  }).then((result) => {
20780
- setNotice(result.authorized ? zh$9.keyTestOk.replace("{ms}", String(Math.round(result.ms))).replace("{count}", String(result.modelCount)) : zh$9.keyTestFailed.replace("{detail}", result.error));
20984
+ setNotice(result.authorized ? zh$10.keyTestOk.replace("{ms}", String(Math.round(result.ms))).replace("{count}", String(result.modelCount)) : zh$10.keyTestFailed.replace("{detail}", result.error));
20781
20985
  }).catch((cause) => setError(detail(cause))).finally(() => setBusy(null));
20782
20986
  }, [key, keyBaseURL]);
20783
20987
  const testStored = (0, react.useCallback)((accountId) => {
@@ -20785,7 +20989,7 @@ window.__ModuleLoader__.load({
20785
20989
  setError(null);
20786
20990
  setNotice(null);
20787
20991
  API$4.testKey({ accountId }).then((result) => {
20788
- setNotice(result.authorized ? zh$9.keyTestOk.replace("{ms}", String(Math.round(result.ms))).replace("{count}", String(result.modelCount)) : zh$9.keyTestFailed.replace("{detail}", result.error));
20992
+ setNotice(result.authorized ? zh$10.keyTestOk.replace("{ms}", String(Math.round(result.ms))).replace("{count}", String(result.modelCount)) : zh$10.keyTestFailed.replace("{detail}", result.error));
20789
20993
  }).catch((cause) => setError(detail(cause))).finally(() => setBusy(null));
20790
20994
  }, []);
20791
20995
  const enabledModels = (0, react.useMemo)(() => (status?.models ?? []).filter((model) => model.enabled), [status]);
@@ -20821,7 +21025,7 @@ window.__ModuleLoader__.load({
20821
21025
  if (model === void 0) return;
20822
21026
  const parsed = parsePositiveCapacity$1(drafts[id] ?? formatCapacity$1(model.contextWindow));
20823
21027
  if (parsed === null) {
20824
- setError(zh$9.error.replace("{detail}", zh$9.defaultContextWindow));
21028
+ setError(zh$10.error.replace("{detail}", zh$10.defaultContextWindow));
20825
21029
  return;
20826
21030
  }
20827
21031
  run("ctx:" + id, () => API$4.setContextWindow(id, parsed));
@@ -20843,7 +21047,7 @@ window.__ModuleLoader__.load({
20843
21047
  }, [run, status]);
20844
21048
  const resetAllContext = (0, react.useCallback)(() => {
20845
21049
  if (status === null) return;
20846
- if (typeof window !== "undefined" && !window.confirm(zh$9.contextResetAll)) return;
21050
+ if (typeof window !== "undefined" && !window.confirm(zh$10.contextResetAll)) return;
20847
21051
  const overridden = status.models.filter((model) => model.contextWindowOverride !== void 0);
20848
21052
  run("ctx-all", async () => {
20849
21053
  let next = status;
@@ -20859,7 +21063,7 @@ window.__ModuleLoader__.load({
20859
21063
  const refreshCatalog = (0, react.useCallback)(() => {
20860
21064
  run("catalog", async () => {
20861
21065
  const outcome = await API$4.refreshCatalog();
20862
- setNotice(zh$9.catalogSyncedNote.replace("{count}", String(outcome.status.catalogCount)));
21066
+ setNotice(zh$10.catalogSyncedNote.replace("{count}", String(outcome.status.catalogCount)));
20863
21067
  return outcome.status;
20864
21068
  });
20865
21069
  }, [run]);
@@ -20873,7 +21077,7 @@ window.__ModuleLoader__.load({
20873
21077
  };
20874
21078
  const invalid = Object.entries(numbers).find(([, value]) => !Number.isSafeInteger(value) || value < 0);
20875
21079
  if (invalid !== void 0) {
20876
- setError(zh$9.error.replace("{detail}", invalid[0]));
21080
+ setError(zh$10.error.replace("{detail}", invalid[0]));
20877
21081
  return;
20878
21082
  }
20879
21083
  setBusy("settings");
@@ -20884,10 +21088,10 @@ window.__ModuleLoader__.load({
20884
21088
  }).then((next) => {
20885
21089
  applyStatus(next);
20886
21090
  setSettingsForm(settingsFormOf(next));
20887
- setNotice(zh$9.saved);
21091
+ setNotice(zh$10.saved);
20888
21092
  }).catch((cause) => setError(detail(cause))).finally(() => setBusy(null));
20889
21093
  }, [settingsForm, applyStatus]);
20890
- const t = useLineDict(NS_OPENDESIGN, zh$9);
21094
+ const t = useLineDict(NS_OPENDESIGN, zh$10);
20891
21095
  const errorPrefix = t.error.split("{detail}")[0] ?? "";
20892
21096
  const pool = status?.pool;
20893
21097
  const accounts = pool?.accounts ?? [];
@@ -21407,7 +21611,7 @@ window.__ModuleLoader__.load({
21407
21611
  * control that renders it instead.
21408
21612
  */
21409
21613
  const NS_WORKBUDDY = "dsh-workbuddy";
21410
- const zh$8 = {
21614
+ const zh$9 = {
21411
21615
  title: "WorkBuddy",
21412
21616
  pageDesc: "复用本机 CodeBuddy 桌面端登录态,管理 WorkBuddy(CodeBuddy 订阅)模型、上下文窗口与额度。",
21413
21617
  account: "账号",
@@ -21533,7 +21737,7 @@ window.__ModuleLoader__.load({
21533
21737
  modelCooldownActive: "模型限流中",
21534
21738
  notRoutable: "当前不可路由"
21535
21739
  };
21536
- const en$8 = {
21740
+ const en$9 = {
21537
21741
  title: "WorkBuddy",
21538
21742
  pageDesc: "Reuse the local CodeBuddy desktop sign-in to manage WorkBuddy (CodeBuddy subscription) models, context windows, and quota.",
21539
21743
  account: "Account",
@@ -21659,11 +21863,11 @@ window.__ModuleLoader__.load({
21659
21863
  modelCooldownActive: "Model parked",
21660
21864
  notRoutable: "Not routable right now"
21661
21865
  };
21662
- const dictionaries$8 = {
21663
- zh: zh$8,
21664
- "zh-CN": zh$8,
21665
- en: en$8,
21666
- "en-US": en$8
21866
+ const dictionaries$9 = {
21867
+ zh: zh$9,
21868
+ "zh-CN": zh$9,
21869
+ en: en$9,
21870
+ "en-US": en$9
21667
21871
  };
21668
21872
  //#endregion
21669
21873
  //#region src/client/providers/workbuddy/useWorkBuddySection.ts
@@ -21761,7 +21965,7 @@ window.__ModuleLoader__.load({
21761
21965
  const quotaFollowUp = (0, react.useRef)(null);
21762
21966
  const [contextDrafts, setContextDrafts] = (0, react.useState)({});
21763
21967
  const [savingModel, setSavingModel] = (0, react.useState)(null);
21764
- const t = useLineDict(NS_WORKBUDDY, zh$8);
21968
+ const t = useLineDict(NS_WORKBUDDY, zh$9);
21765
21969
  const notifyChange = (0, react.useCallback)(() => {
21766
21970
  onModelChange?.();
21767
21971
  loadModelDirectory?.();
@@ -22388,7 +22592,7 @@ window.__ModuleLoader__.load({
22388
22592
  const timer = window.setInterval(() => setNow(Date.now()), 1e3);
22389
22593
  return () => window.clearInterval(timer);
22390
22594
  }, [pausedUntil]);
22391
- const t = useLineDict(NS_WORKBUDDY, zh$8);
22595
+ const t = useLineDict(NS_WORKBUDDY, zh$9);
22392
22596
  const poolState = poolStateLines(pool, t, now);
22393
22597
  const storageLine = poolStorageLine(pool?.storage, t);
22394
22598
  const storageUnavailable = pool?.storage === void 0 ? null : poolStorageUnavailableLabel(pool.storage, t);
@@ -23024,7 +23228,7 @@ window.__ModuleLoader__.load({
23024
23228
  //#endregion
23025
23229
  //#region src/client/providers/qianwen-token-plan/locales.ts
23026
23230
  const NS_QIANWEN = "dsh-qianwen-token-plan";
23027
- const zh$7 = {
23231
+ const zh$8 = {
23028
23232
  title: "Qwen Token Plan(千问)",
23029
23233
  pageDesc: "使用千问 Token Plan 专属 API Key 调用 Qwen4,管理显式缓存、思考回放、推理档位、模型和视觉预算。",
23030
23234
  loading: "加载中...",
@@ -23097,8 +23301,8 @@ window.__ModuleLoader__.load({
23097
23301
  noQuota: "无配额数据",
23098
23302
  proxy: "代理"
23099
23303
  };
23100
- const dictionaries$7 = {
23101
- zh: zh$7,
23304
+ const dictionaries$8 = {
23305
+ zh: zh$8,
23102
23306
  en: {
23103
23307
  title: "Qwen Token Plan",
23104
23308
  pageDesc: "Use a dedicated Qianwen Token Plan API key with Qwen4, explicit caching, thinking replay, all reasoning levels, models and visual budgets.",
@@ -23376,7 +23580,7 @@ window.__ModuleLoader__.load({
23376
23580
  });
23377
23581
  }
23378
23582
  function QianwenTokenPlanSection(props = {}) {
23379
- const t = useLineDict(NS_QIANWEN, zh$7);
23583
+ const t = useLineDict(NS_QIANWEN, zh$8);
23380
23584
  const view = useQianwenSection(props);
23381
23585
  const { status, busy } = view;
23382
23586
  if (view.loading && status === null) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
@@ -23731,7 +23935,7 @@ window.__ModuleLoader__.load({
23731
23935
  //#endregion
23732
23936
  //#region src/client/providers/relayone/locales.ts
23733
23937
  const NS_RELAYONE = "dsh-relayone";
23734
- const zh$6 = {
23938
+ const zh$7 = {
23735
23939
  title: "RelayOne",
23736
23940
  pageDesc: "一个 API Key,动态接入当前分组可用的对话与媒体模型。",
23737
23941
  enabled: "启用 RelayOne",
@@ -23838,8 +24042,8 @@ window.__ModuleLoader__.load({
23838
24042
  quotaWindow: "额度窗口",
23839
24043
  quotaFactsScope: "以下为当前 Key 的额度事实;每个 Key 自己的进度显示在它的卡片里。"
23840
24044
  };
23841
- const dictionaries$6 = {
23842
- zh: zh$6,
24045
+ const dictionaries$7 = {
24046
+ zh: zh$7,
23843
24047
  en: {
23844
24048
  title: "RelayOne",
23845
24049
  pageDesc: "One API key for the chat and media models visible to its current upstream group.",
@@ -24214,7 +24418,7 @@ window.__ModuleLoader__.load({
24214
24418
  max: "effortMax"
24215
24419
  };
24216
24420
  function RelayOneSection(props = {}) {
24217
- const t = useLineDict(NS_RELAYONE, zh$6);
24421
+ const t = useLineDict(NS_RELAYONE, zh$7);
24218
24422
  const view = useRelayOneSection(props);
24219
24423
  const { status, busy } = view;
24220
24424
  if (view.loading && status === null) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
@@ -24614,7 +24818,7 @@ window.__ModuleLoader__.load({
24614
24818
  //#endregion
24615
24819
  //#region src/client/providers/claude-api/locales.ts
24616
24820
  const NS_CLAUDE_API = "dsh-claude-api";
24617
- const zh$5 = {
24821
+ const zh$6 = {
24618
24822
  title: "Claude API",
24619
24823
  pageDesc: "用一个 API Key 直连 Anthropic Messages 端点或兼容网关,请求形态与官方 Claude Code 客户端一致。",
24620
24824
  loading: "正在读取线路状态…",
@@ -24691,8 +24895,8 @@ window.__ModuleLoader__.load({
24691
24895
  contextEmpty: "没有已启用的模型。",
24692
24896
  invalidCapacity: "上下文窗口必须是正整数。"
24693
24897
  };
24694
- const dictionaries$5 = {
24695
- zh: zh$5,
24898
+ const dictionaries$6 = {
24899
+ zh: zh$6,
24696
24900
  en: {
24697
24901
  title: "Claude API",
24698
24902
  pageDesc: "One API key against the Anthropic Messages endpoint or a compatible gateway, sent in the request shape of the official Claude Code client.",
@@ -25098,7 +25302,7 @@ window.__ModuleLoader__.load({
25098
25302
  const SEPARATOR = " · ";
25099
25303
  const DASH = "—";
25100
25304
  function ClaudeApiSection(props = {}) {
25101
- const t = useLineDict(NS_CLAUDE_API, zh$5);
25305
+ const t = useLineDict(NS_CLAUDE_API, zh$6);
25102
25306
  const view = useClaudeApiSection(props);
25103
25307
  const { status, busy } = view;
25104
25308
  if (view.loading && status === null) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
@@ -27219,7 +27423,7 @@ window.__ModuleLoader__.load({
27219
27423
  */
27220
27424
  const NS_DISPATCH_LEDGER = "dsh-dispatch-ledger";
27221
27425
  /** 中文文案。 */
27222
- const zh$4 = {
27426
+ const zh$5 = {
27223
27427
  mandateTitle: "派发子代理",
27224
27428
  mandateTitleFork: "派发子代理(继承上下文)",
27225
27429
  mandatePreparing: "正在组装派发",
@@ -27243,8 +27447,8 @@ window.__ModuleLoader__.load({
27243
27447
  mandateNoBody: "(没有正文)"
27244
27448
  };
27245
27449
  /** 注册进 locale 服务的双语字典。 */
27246
- const dictionaries$4 = {
27247
- zh: zh$4,
27450
+ const dictionaries$5 = {
27451
+ zh: zh$5,
27248
27452
  en: {
27249
27453
  mandateTitle: "Subagent dispatch",
27250
27454
  mandateTitleFork: "Subagent dispatch (inherits context)",
@@ -27286,7 +27490,7 @@ window.__ModuleLoader__.load({
27286
27490
  * 不另起一套点号命名——同一份 index.tsx 里两种命名风格会让「这条键属于哪张表」
27287
27491
  * 变成要靠记忆的事。
27288
27492
  */
27289
- const zh$3 = {
27493
+ const zh$4 = {
27290
27494
  /** 设置页导航里的那一格,也是侧栏页签的标题。 */
27291
27495
  navTitle: "进展更新",
27292
27496
  progressTitle: "进展更新",
@@ -27358,11 +27562,23 @@ window.__ModuleLoader__.load({
27358
27562
  settingsLanguageRu: "Русский",
27359
27563
  settingsPanelName: "进展面板",
27360
27564
  settingsPanelNote: "在右侧栏查看本次会话的全部进展",
27565
+ settingsAdvisorEnabledName: "顾问",
27566
+ settingsAdvisorEnabledNote: "新对话默认开启只读顾问;主模型可在方案、排错与收尾前让另一个模型审阅对话",
27567
+ settingsAdvisorSessionBudgetName: "对话顾问预算",
27568
+ settingsAdvisorSessionBudgetNote: "单个对话累计可消耗的顾问 token 上限;用完即停止咨询,0 表示不限制",
27569
+ settingsAdvisorMaxTokensName: "顾问单次输出上限",
27570
+ settingsAdvisorMaxTokensNote: "顾问单次回复的最大 token 数,与模型自身上限取较小值",
27571
+ settingsAdvisorContextName: "顾问上下文预算",
27572
+ settingsAdvisorContextNote: "投影给顾问的对话历史预算;超出时保留首条任务与最近证据",
27573
+ settingsAdvisorTimeoutName: "顾问超时",
27574
+ settingsAdvisorTimeoutNote: "单次咨询的总超时毫秒数,超时按不可用处理,不阻断主任务",
27575
+ settingsAdvisorRetriesName: "顾问重试次数",
27576
+ settingsAdvisorRetriesNote: "遇到 429、5xx 或网络错误时的最大追加重试次数",
27361
27577
  settingsUnavailable: "这项设置当前不可修改(宿主没有开放配置表单)",
27362
27578
  settingsSaveFailed: "保存失败,请稍后再试"
27363
27579
  };
27364
27580
  /** 英文对照,键集与 zh 完全一致。 */
27365
- const en$3 = {
27581
+ const en$4 = {
27366
27582
  navTitle: "Progress updates",
27367
27583
  progressTitle: "Progress updates",
27368
27584
  progressGuideNote: "Every step the agent reports, collected here",
@@ -27432,21 +27648,33 @@ window.__ModuleLoader__.load({
27432
27648
  settingsLanguageRu: "Russian",
27433
27649
  settingsPanelName: "Progress panel",
27434
27650
  settingsPanelNote: "See every update from this session in the right sidebar",
27651
+ settingsAdvisorEnabledName: "Advisor",
27652
+ settingsAdvisorEnabledNote: "Turn the read-only advisor on by default for new conversations, so the main model can ask a second model to review the conversation before committing, when stuck, and before declaring done",
27653
+ settingsAdvisorSessionBudgetName: "Advisor budget per conversation",
27654
+ settingsAdvisorSessionBudgetNote: "Cumulative advisor tokens one conversation may spend before consultations stop; 0 means unlimited",
27655
+ settingsAdvisorMaxTokensName: "Advisor output limit",
27656
+ settingsAdvisorMaxTokensNote: "Maximum tokens for one advisor reply, capped by the model own limit",
27657
+ settingsAdvisorContextName: "Advisor context budget",
27658
+ settingsAdvisorContextNote: "History budget projected to the advisor; past it, the first task and the most recent evidence are kept",
27659
+ settingsAdvisorTimeoutName: "Advisor timeout",
27660
+ settingsAdvisorTimeoutNote: "Total timeout in milliseconds for one consultation; a timeout counts as unavailable and never blocks the main task",
27661
+ settingsAdvisorRetriesName: "Advisor retries",
27662
+ settingsAdvisorRetriesNote: "Maximum extra attempts after a 429, a 5xx, or a network error",
27435
27663
  settingsUnavailable: "This setting cannot be changed right now (the host serves no config form)",
27436
27664
  settingsSaveFailed: "Could not save. Try again in a moment."
27437
27665
  };
27438
27666
  /** 与其余线路同形的字典包(四个内置语言 id 都指向那两份)。 */
27439
- const dictionaries$3 = {
27440
- zh: zh$3,
27441
- "zh-CN": zh$3,
27442
- en: en$3,
27443
- "en-US": en$3
27667
+ const dictionaries$4 = {
27668
+ zh: zh$4,
27669
+ "zh-CN": zh$4,
27670
+ en: en$4,
27671
+ "en-US": en$4
27444
27672
  };
27445
27673
  //#endregion
27446
27674
  //#region src/client/features/compact-after-turn/locales.ts
27447
27675
  /** Copy of the one-shot "compact after this turn" row in the composer's model menu. */
27448
27676
  const NS_COMPACT_AFTER_TURN = "dsh-compact-after-turn";
27449
- const dictionaries$2 = {
27677
+ const dictionaries$3 = {
27450
27678
  zh: {
27451
27679
  label: "本轮结束后压缩",
27452
27680
  infoLabel: "关于本轮结束后压缩",
@@ -27477,7 +27705,7 @@ window.__ModuleLoader__.load({
27477
27705
  //#endregion
27478
27706
  //#region src/client/features/session-quota/locales.ts
27479
27707
  const NS_SESSION_QUOTA = "dsh-session-quota";
27480
- const zh$1 = {
27708
+ const zh$2 = {
27481
27709
  sectionTitle: "订阅额度",
27482
27710
  refresh: "刷新",
27483
27711
  refreshing: "刷新中…",
@@ -27509,8 +27737,8 @@ window.__ModuleLoader__.load({
27509
27737
  creditBucket: "额度池 #{index}",
27510
27738
  resetCredits: "重置券"
27511
27739
  };
27512
- const dictionaries$1 = {
27513
- zh: zh$1,
27740
+ const dictionaries$2 = {
27741
+ zh: zh$2,
27514
27742
  en: {
27515
27743
  sectionTitle: "Plan Usage",
27516
27744
  refresh: "Refresh",
@@ -27545,6 +27773,51 @@ window.__ModuleLoader__.load({
27545
27773
  }
27546
27774
  };
27547
27775
  //#endregion
27776
+ //#region src/client/features/advisor/locales.ts
27777
+ const NS_ADVISOR = "dsh-advisor";
27778
+ const dictionaries$1 = {
27779
+ zh: {
27780
+ label: "顾问",
27781
+ model: "顾问模型",
27782
+ none: "未选择",
27783
+ enabled: "已开启",
27784
+ disabled: "已关闭",
27785
+ choose: "选择顾问模型",
27786
+ search: "搜索顾问模型",
27787
+ enableFirst: "未开启",
27788
+ enableHint: "开启顾问后可选择模型。",
27789
+ reasoning: "顾问推理强度",
27790
+ defaultReasoning: "模型默认",
27791
+ faster: "更快",
27792
+ stronger: "更强",
27793
+ privacy: "咨询时,当前对话、工具结果及支持的图片会发送给顾问模型,并产生独立用量。",
27794
+ loading: "正在加载模型…",
27795
+ empty: "当前没有可用模型。",
27796
+ failed: "顾问设置失败:{message}",
27797
+ inherited: "当前使用新对话默认设置;修改后只影响当前对话。"
27798
+ },
27799
+ en: {
27800
+ label: "Advisor",
27801
+ model: "Advisor model",
27802
+ none: "Not selected",
27803
+ enabled: "On",
27804
+ disabled: "Off",
27805
+ choose: "Choose advisor model",
27806
+ search: "Search advisor models",
27807
+ enableFirst: "Off",
27808
+ enableHint: "Turn Advisor on to choose a model.",
27809
+ reasoning: "Advisor reasoning effort",
27810
+ defaultReasoning: "Model default",
27811
+ faster: "Faster",
27812
+ stronger: "Stronger",
27813
+ privacy: "Consulting sends this conversation, tool results, and supported images to the advisor model and uses its quota separately.",
27814
+ loading: "Loading models…",
27815
+ empty: "No models are currently available.",
27816
+ failed: "Could not update Advisor: {message}",
27817
+ inherited: "This conversation inherits the new-conversation default until you change it."
27818
+ }
27819
+ };
27820
+ //#endregion
27548
27821
  //#region src/client/locales-ru/account-pool.ts
27549
27822
  const accountPoolRu = {
27550
27823
  accountPool: "Аккаунты",
@@ -27589,7 +27862,7 @@ window.__ModuleLoader__.load({
27589
27862
  * account-pool labels come from `./account-pool.ts`, with the same overrides the
27590
27863
  * source applies on top of them.
27591
27864
  */
27592
- const dictionary$22 = {
27865
+ const dictionary$23 = {
27593
27866
  ...accountPoolRu,
27594
27867
  title: "Claude (подписка)",
27595
27868
  pageDesc: "Войдите в подписку Claude Pro/Max и управляйте моделями, уровнями рассуждений, контекстными окнами и квотой.",
@@ -27654,11 +27927,14 @@ window.__ModuleLoader__.load({
27654
27927
  defaultReasoningEffort: "Уровень рассуждений по умолчанию",
27655
27928
  defaultReasoningEffortHint: "В списке все уровни, которые встречаются в каталоге (включая xhigh); какие уровни принимает каждая модель, видно ниже — Host отправляет тот, что поддерживает сама модель.",
27656
27929
  defaultEffortAuto: "Значение модели по умолчанию",
27657
- cacheTtl: "Время жизни кеша промпта",
27930
+ cacheTtl: "Время жизни кеша промпта для основного диалога",
27658
27931
  cacheTtlHint: "Anthropic предлагает две ступени: 5 минут и 1 час. Пока подписка расходует лимит тарифа, официальный Claude Code держит час для основного диалога; после исчерпания тарифа и перехода на оплату по расходу он возвращается к пяти минутам. Запись на час дороже, для коротких сессий она не окупается. При длительности 1 час (включая «как у официального клиента»), пока работают субагенты или фоновые задачи, линия примерно каждые 55 минут отправляет один небольшой запрос поддержания кеша, чтобы срок кеша не истёк; при длительности 5 минут этого не происходит.",
27659
27932
  cacheTtlSubscription: "Как у официального (в подписке по умолчанию 1 ч)",
27660
27933
  cacheTtl1h: "1 час",
27661
27934
  cacheTtl5m: "5 минут",
27935
+ subagentCacheTtl: "Время жизни кеша для субагентов и фоновых запросов",
27936
+ subagentCacheTtlHint: "Субагенты, сжатие контекста, заголовки и другие запросы вне основного диалога. Официальный Claude Code использует для них 5 минут: обычно они завершаются за несколько минут, а запись в часовой кеш стоит дороже.",
27937
+ subagentCacheTtlOfficial: "Как у официального (5 минут)",
27662
27938
  fastMode: "Быстрый режим",
27663
27939
  fastModeHint: "Host отправляет speed: fast только поддерживаемым моделям; при отказе исправляет запрос и запоминает результат.",
27664
27940
  cacheKeepalive: "cache-keepalive (cache_touch)",
@@ -27675,6 +27951,10 @@ window.__ModuleLoader__.load({
27675
27951
  contextWindowReset: "Сбросить к умолчанию",
27676
27952
  contextWindowResetAll: "Сбросить все",
27677
27953
  contextWindowResetAllConfirm: "Сбросить контекстные окна всех изменённых моделей к значениям по умолчанию?",
27954
+ maxTokensSection: "Предел вывода за ответ",
27955
+ maxTokensHint: "Сколько токенов может вывести один ответ, включая размышления. По умолчанию — собственный предел модели. Уменьшение оставляет больше места для диалога, но ответ, дошедший до предела, обрывается, и ход завершается.",
27956
+ maxTokensInvalid: "Недопустимый предел вывода: {value}",
27957
+ maxTokensResetAllConfirm: "Вернуть все изменённые пределы вывода к значениям по умолчанию?",
27678
27958
  contextWindowNoneEnabled: "Ни одна модель не отмечена. Отметьте модель выше, и здесь появятся её настройки контекстного окна.",
27679
27959
  contextWindowInvalid: "Недопустимый размер контекста: {value}",
27680
27960
  save: "Сохранить",
@@ -27712,7 +27992,7 @@ window.__ModuleLoader__.load({
27712
27992
  };
27713
27993
  //#endregion
27714
27994
  //#region src/client/locales-ru/cline-pass.ts
27715
- const dictionary$21 = {
27995
+ const dictionary$22 = {
27716
27996
  ...accountPoolRu,
27717
27997
  relogin: "Войти заново",
27718
27998
  needsRelogin: "Вход истёк",
@@ -27838,7 +28118,7 @@ window.__ModuleLoader__.load({
27838
28118
  };
27839
28119
  //#endregion
27840
28120
  //#region src/client/locales-ru/command-code.ts
27841
- const dictionary$20 = {
28121
+ const dictionary$21 = {
27842
28122
  ...accountPoolRu,
27843
28123
  title: "Command Code",
27844
28124
  pageDesc: "Войдите в Command Code и управляйте моделями, контекстными окнами и квотой.",
@@ -27914,7 +28194,7 @@ window.__ModuleLoader__.load({
27914
28194
  };
27915
28195
  //#endregion
27916
28196
  //#region src/client/locales-ru/glm-coding-plan.ts
27917
- const dictionary$19 = {
28197
+ const dictionary$20 = {
27918
28198
  ...accountPoolRu,
27919
28199
  title: "GLM (аккаунт ZCode)",
27920
28200
  pageDesc: "Вход аккаунтом ZCode подключает GLM Coding Plan (Китай — bigmodel.cn, международный — z.ai). Здесь же пул аккаунтов, квота тарифа и выбор моделей. Учётные данные двух регионов независимы, поэтому в одном пуле могут быть аккаунты обоих.",
@@ -28017,7 +28297,7 @@ window.__ModuleLoader__.load({
28017
28297
  * account-pool labels come from `./account-pool.ts`, with the same overrides the
28018
28298
  * source applies on top of them.
28019
28299
  */
28020
- const dictionary$18 = {
28300
+ const dictionary$19 = {
28021
28301
  ...accountPoolRu,
28022
28302
  title: "ChatGPT",
28023
28303
  hubTitle: "Подписки",
@@ -28246,6 +28526,10 @@ window.__ModuleLoader__.load({
28246
28526
  hubUpdateCommandLabel: "Команда для ручного обновления",
28247
28527
  localCodexLoginImport: "Импорт локального входа",
28248
28528
  localCodexLoginImporting: "Импорт…",
28529
+ credentialFileImport: "Импорт CPA / sub2api",
28530
+ credentialFileImporting: "Импорт…",
28531
+ credentialFileImportDetail: "Импорт аккаунтов ChatGPT из CPA ZIP или sub2api JSON",
28532
+ credentialFileImportResult: "Импортировано аккаунтов {format}: {count}; пропущено: {skipped}.",
28249
28533
  deviceCodeLogin: "Вход по коду устройства",
28250
28534
  deviceCodeLoginStarting: "Получаем код…",
28251
28535
  deviceCodeLoginDetail: "Добавить аккаунт по коду устройства",
@@ -28291,7 +28575,7 @@ window.__ModuleLoader__.load({
28291
28575
  };
28292
28576
  //#endregion
28293
28577
  //#region src/client/locales-ru/kimi-code.ts
28294
- const dictionary$17 = {
28578
+ const dictionary$18 = {
28295
28579
  ...accountPoolRu,
28296
28580
  title: "Kimi Code",
28297
28581
  pageDesc: "Вход в подписку Kimi Code: модели, уровень рассуждений, контекстные окна и квота.",
@@ -28489,7 +28773,7 @@ window.__ModuleLoader__.load({
28489
28773
  };
28490
28774
  //#endregion
28491
28775
  //#region src/client/locales-ru/minimax-code.ts
28492
- const dictionary$16 = {
28776
+ const dictionary$17 = {
28493
28777
  ...accountPoolRu,
28494
28778
  title: "MiniMax Code",
28495
28779
  pageDesc: "Вход в подписку MiniMax Code для программирования (OAuth по коду устройства) с переиспользованием локального входа MiniMax Code: управление аккаунтом, подключением и моделями.",
@@ -28689,7 +28973,7 @@ window.__ModuleLoader__.load({
28689
28973
  };
28690
28974
  //#endregion
28691
28975
  //#region src/client/locales-ru/ollama.ts
28692
- const dictionary$15 = {
28976
+ const dictionary$16 = {
28693
28977
  ...accountPoolRu,
28694
28978
  relogin: "Заменить ключ",
28695
28979
  needsRelogin: "Ключ отклонён",
@@ -28743,7 +29027,7 @@ window.__ModuleLoader__.load({
28743
29027
  };
28744
29028
  //#endregion
28745
29029
  //#region src/client/locales-ru/antigravity-acp.ts
28746
- const dictionary$14 = {
29030
+ const dictionary$15 = {
28747
29031
  title: "Antigravity (ACP)",
28748
29032
  pageDesc: "Подключение через официальный Antigravity CLI от Google по Agent Client Protocol (ACP): модель, инструменты и сессии приходят от официального процесса, и он же хранит состояние входа.",
28749
29033
  routeOwned: "Маршрут моделей обслуживает этот плагин",
@@ -28837,7 +29121,7 @@ window.__ModuleLoader__.load({
28837
29121
  };
28838
29122
  //#endregion
28839
29123
  //#region src/client/locales-ru/opendesign.ts
28840
- const dictionary$13 = {
29124
+ const dictionary$14 = {
28841
29125
  ...accountPoolRu,
28842
29126
  relogin: "Добавить заново",
28843
29127
  needsRelogin: "API-ключ недействителен",
@@ -28947,7 +29231,7 @@ window.__ModuleLoader__.load({
28947
29231
  };
28948
29232
  //#endregion
28949
29233
  //#region src/client/locales-ru/dispatch-ledger.ts
28950
- const dictionary$12 = {
29234
+ const dictionary$13 = {
28951
29235
  mandateTitle: "Запуск субагента",
28952
29236
  mandateTitleFork: "Запуск субагента (с контекстом)",
28953
29237
  mandatePreparing: "Сборка задания",
@@ -28972,7 +29256,7 @@ window.__ModuleLoader__.load({
28972
29256
  };
28973
29257
  //#endregion
28974
29258
  //#region src/client/locales-ru/progress-updates.ts
28975
- const dictionary$11 = {
29259
+ const dictionary$12 = {
28976
29260
  navTitle: "Ход работы",
28977
29261
  progressTitle: "Ход работы",
28978
29262
  progressGuideNote: "Каждый шаг, о котором сообщает агент, собирается здесь",
@@ -29042,12 +29326,24 @@ window.__ModuleLoader__.load({
29042
29326
  settingsLanguageRu: "Русский",
29043
29327
  settingsPanelName: "Панель хода работы",
29044
29328
  settingsPanelNote: "Показывать все записи этой сессии в правой панели",
29329
+ settingsAdvisorEnabledName: "Советник",
29330
+ settingsAdvisorEnabledNote: "Включать советника по умолчанию в новых диалогах, чтобы основная модель могла попросить другую модель проверить диалог перед решением, при повторной ошибке и перед завершением",
29331
+ settingsAdvisorSessionBudgetName: "Бюджет советника на диалог",
29332
+ settingsAdvisorSessionBudgetNote: "Суммарный лимит токенов советника на один диалог; после исчерпания консультации прекращаются, 0 означает без ограничения",
29333
+ settingsAdvisorMaxTokensName: "Лимит ответа советника",
29334
+ settingsAdvisorMaxTokensNote: "Максимум токенов одного ответа советника, ограничен также лимитом самой модели",
29335
+ settingsAdvisorContextName: "Бюджет контекста советника",
29336
+ settingsAdvisorContextNote: "Бюджет истории, передаваемой советнику; при превышении сохраняются первая задача и последние свидетельства",
29337
+ settingsAdvisorTimeoutName: "Тайм-аут советника",
29338
+ settingsAdvisorTimeoutNote: "Общий тайм-аут одной консультации в миллисекундах; тайм-аут считается недоступностью и не блокирует основную задачу",
29339
+ settingsAdvisorRetriesName: "Повторы советника",
29340
+ settingsAdvisorRetriesNote: "Максимум дополнительных попыток при 429, 5xx или сетевой ошибке",
29045
29341
  settingsUnavailable: "Эту настройку сейчас нельзя изменить (Host не предоставляет форму настроек)",
29046
29342
  settingsSaveFailed: "Не удалось сохранить, попробуйте позже"
29047
29343
  };
29048
29344
  //#endregion
29049
29345
  //#region src/client/locales-ru/qoder.ts
29050
- const dictionary$10 = {
29346
+ const dictionary$11 = {
29051
29347
  modelRowEfforts: "уровни {list}",
29052
29348
  modelRowNoEfforts: "без уровней",
29053
29349
  modelRowOutput: "вывод {cap}",
@@ -29169,7 +29465,7 @@ window.__ModuleLoader__.load({
29169
29465
  };
29170
29466
  //#endregion
29171
29467
  //#region src/client/locales-ru/step-code.ts
29172
- const dictionary$9 = {
29468
+ const dictionary$10 = {
29173
29469
  ...accountPoolRu,
29174
29470
  title: "Step Code (подписка Step Plan)",
29175
29471
  pageDesc: "Подключение к StepFun по подписке Step Plan (Китай api.stepfun.com / международный api.stepfun.ai) или по API-ключу открытой платформы: пул аккаунтов, квота тарифа, расход кеша и выбор моделей. Регион — свойство учётных данных, и два региона несовместимы, поэтому в пуле могут быть аккаунты из обоих.",
@@ -29346,7 +29642,7 @@ window.__ModuleLoader__.load({
29346
29642
  * dropped '{placeholder}' would turn a sentence into a bald claim. 'test/
29347
29643
  * russian-locale.test.tsx' pins both rules.
29348
29644
  */
29349
- const dictionary$8 = {
29645
+ const dictionary$9 = {
29350
29646
  title: "WorkBuddy",
29351
29647
  pageDesc: "Повторно использует локальный вход CodeBuddy, чтобы управлять моделями WorkBuddy (подписка CodeBuddy), контекстными окнами и квотой.",
29352
29648
  account: "Аккаунт",
@@ -29474,7 +29770,7 @@ window.__ModuleLoader__.load({
29474
29770
  };
29475
29771
  //#endregion
29476
29772
  //#region src/client/locales-ru/qianwen-token-plan.ts
29477
- const dictionary$7 = {
29773
+ const dictionary$8 = {
29478
29774
  title: "Qwen Token Plan",
29479
29775
  pageDesc: "Подключение Qwen4 по выделенному API-ключу Qianwen Token Plan: явный кеш, воспроизведение размышлений, уровни reasoning, модели и визуальный бюджет.",
29480
29776
  loading: "Загрузка…",
@@ -29549,7 +29845,7 @@ window.__ModuleLoader__.load({
29549
29845
  };
29550
29846
  //#endregion
29551
29847
  //#region src/client/locales-ru/relayone.ts
29552
- const dictionary$6 = {
29848
+ const dictionary$7 = {
29553
29849
  title: "RelayOne",
29554
29850
  pageDesc: "Один API-ключ для диалоговых и медиамоделей, доступных в его текущей группе.",
29555
29851
  enabled: "Включить RelayOne",
@@ -29658,7 +29954,7 @@ window.__ModuleLoader__.load({
29658
29954
  };
29659
29955
  //#endregion
29660
29956
  //#region src/client/locales-ru/claude-api.ts
29661
- const dictionary$5 = {
29957
+ const dictionary$6 = {
29662
29958
  title: "Claude API",
29663
29959
  pageDesc: "Один API-ключ для эндпоинта Anthropic Messages или совместимого шлюза; запросы отправляются в формате официального клиента Claude Code.",
29664
29960
  loading: "Чтение состояния линии…",
@@ -29737,7 +30033,7 @@ window.__ModuleLoader__.load({
29737
30033
  };
29738
30034
  //#endregion
29739
30035
  //#region src/client/locales-ru/aws-quick.ts
29740
- const dictionary$4 = {
30036
+ const dictionary$5 = {
29741
30037
  title: "AWS Quick",
29742
30038
  pageDesc: "Используйте подписку AWS Quick через официальный локальный agent Quick Desktop: потоковый текст, reasoning и три режима ответа.",
29743
30039
  refresh: "Обновить",
@@ -29794,7 +30090,7 @@ window.__ModuleLoader__.load({
29794
30090
  };
29795
30091
  //#endregion
29796
30092
  //#region src/client/locales-ru/compact-after-turn.ts
29797
- const dictionary$3 = {
30093
+ const dictionary$4 = {
29798
30094
  label: "Сжать после этого хода",
29799
30095
  infoLabel: "О сжатии после этого хода",
29800
30096
  hint: "Когда включено, контекст сжимается один раз сразу после окончания этого хода, затем переключатель выключается сам. Ход, остановленный вручную, не считается: переключатель остаётся включённым до конца следующего хода.",
@@ -29809,7 +30105,7 @@ window.__ModuleLoader__.load({
29809
30105
  };
29810
30106
  //#endregion
29811
30107
  //#region src/client/locales-ru/session-quota.ts
29812
- const dictionary$2 = {
30108
+ const dictionary$3 = {
29813
30109
  sectionTitle: "Лимиты плана",
29814
30110
  refresh: "Обновить",
29815
30111
  refreshing: "Обновление…",
@@ -29843,7 +30139,7 @@ window.__ModuleLoader__.load({
29843
30139
  };
29844
30140
  //#endregion
29845
30141
  //#region src/client/locales-ru/model-checklist.ts
29846
- const dictionary$1 = {
30142
+ const dictionary$2 = {
29847
30143
  allGroups: "Все",
29848
30144
  enabledGroup: "Включённые",
29849
30145
  otherGroup: "Другие",
@@ -29853,7 +30149,7 @@ window.__ModuleLoader__.load({
29853
30149
  };
29854
30150
  //#endregion
29855
30151
  //#region src/client/locales-ru/opencode-go.ts
29856
- const dictionary = {
30152
+ const dictionary$1 = {
29857
30153
  ...accountPoolRu,
29858
30154
  title: "OpenCode Go",
29859
30155
  pageDesc: "Используйте подписку OpenCode Go: аккаунты, модели, уровень рассуждений и квота.",
@@ -29926,6 +30222,28 @@ window.__ModuleLoader__.load({
29926
30222
  authMethodApiKey: "Личный API Key",
29927
30223
  composerLabel: "Остаток квоты OpenCode Go"
29928
30224
  };
30225
+ //#endregion
30226
+ //#region src/client/locales-ru/advisor.ts
30227
+ const dictionary = {
30228
+ label: "Советник",
30229
+ model: "Модель советника",
30230
+ none: "Не выбрана",
30231
+ enabled: "Включён",
30232
+ disabled: "Выключен",
30233
+ choose: "Выбрать модель советника",
30234
+ search: "Поиск модели советника",
30235
+ enableFirst: "Выключен",
30236
+ enableHint: "Включите советника, чтобы выбрать модель.",
30237
+ reasoning: "Интенсивность рассуждения советника",
30238
+ defaultReasoning: "По умолчанию для модели",
30239
+ faster: "Быстрее",
30240
+ stronger: "Сильнее",
30241
+ privacy: "При консультации текущий диалог, результаты инструментов и поддерживаемые изображения отправляются модели советника и расходуют её квоту отдельно.",
30242
+ loading: "Загрузка моделей…",
30243
+ empty: "Сейчас нет доступных моделей.",
30244
+ failed: "Не удалось изменить настройки советника: {message}",
30245
+ inherited: "Диалог использует настройку по умолчанию для новых диалогов, пока вы её не измените."
30246
+ };
29929
30247
  /**
29930
30248
  * Register the Russian language and every dictionary it covers.
29931
30249
  *
@@ -29948,29 +30266,30 @@ window.__ModuleLoader__.load({
29948
30266
  }
29949
30267
  }, "dsh-chatgpt-subscription: ru language");
29950
30268
  const dictionaries = [
29951
- [NS, dictionary$18],
29952
- [NS_CLAUDE, dictionary$22],
29953
- [NS_COMMAND_CODE, dictionary$20],
29954
- [NS_KIMI_CODE, dictionary$17],
29955
- [NS_MINIMAX_CODE, dictionary$16],
29956
- [NS_GLM_CODING_PLAN, dictionary$19],
29957
- [NS_OLLAMA, dictionary$15],
29958
- [NS_STEP_CODE, dictionary$9],
29959
- [NS_CLINE_PASS, dictionary$21],
29960
- [NS_QODER, dictionary$10],
29961
- [NS_OPENDESIGN, dictionary$13],
29962
- [NS_PROGRESS_UPDATES, dictionary$11],
29963
- [NS_WORKBUDDY, dictionary$8],
29964
- [NS_DISPATCH_LEDGER, dictionary$12],
29965
- [NS_ANTIGRAVITY_ACP, dictionary$14],
29966
- [NS_QIANWEN, dictionary$7],
29967
- [NS_RELAYONE, dictionary$6],
29968
- [NS_CLAUDE_API, dictionary$5],
29969
- [NS_AWS_QUICK, dictionary$4],
29970
- [NS_COMPACT_AFTER_TURN, dictionary$3],
29971
- [NS_SESSION_QUOTA, dictionary$2],
29972
- [NS_MODEL_CHECKLIST, dictionary$1],
29973
- [NS_OPENCODE_GO, dictionary]
30269
+ [NS, dictionary$19],
30270
+ [NS_CLAUDE, dictionary$23],
30271
+ [NS_COMMAND_CODE, dictionary$21],
30272
+ [NS_KIMI_CODE, dictionary$18],
30273
+ [NS_MINIMAX_CODE, dictionary$17],
30274
+ [NS_GLM_CODING_PLAN, dictionary$20],
30275
+ [NS_OLLAMA, dictionary$16],
30276
+ [NS_STEP_CODE, dictionary$10],
30277
+ [NS_CLINE_PASS, dictionary$22],
30278
+ [NS_QODER, dictionary$11],
30279
+ [NS_OPENDESIGN, dictionary$14],
30280
+ [NS_PROGRESS_UPDATES, dictionary$12],
30281
+ [NS_WORKBUDDY, dictionary$9],
30282
+ [NS_DISPATCH_LEDGER, dictionary$13],
30283
+ [NS_ANTIGRAVITY_ACP, dictionary$15],
30284
+ [NS_QIANWEN, dictionary$8],
30285
+ [NS_RELAYONE, dictionary$7],
30286
+ [NS_CLAUDE_API, dictionary$6],
30287
+ [NS_AWS_QUICK, dictionary$5],
30288
+ [NS_COMPACT_AFTER_TURN, dictionary$4],
30289
+ [NS_SESSION_QUOTA, dictionary$3],
30290
+ [NS_MODEL_CHECKLIST, dictionary$2],
30291
+ [NS_OPENCODE_GO, dictionary$1],
30292
+ [NS_ADVISOR, dictionary]
29974
30293
  ];
29975
30294
  for (const [ns, dictionary] of dictionaries) ctx.effect(() => {
29976
30295
  try {
@@ -30020,18 +30339,16 @@ window.__ModuleLoader__.load({
30020
30339
  }
30021
30340
  //#endregion
30022
30341
  //#region src/client/providers/codex-chatgpt/styles.ts
30023
- const CSS$6 = `
30342
+ const CSS$7 = `
30024
30343
  .dsh-codex-page{box-sizing:border-box;color:var(--dsw-alias-label-primary);display:flex;flex-direction:column;gap:20px;max-width:780px;min-width:0;padding:2px 0 30px}
30025
30344
  .dsh-codex-page *{box-sizing:border-box}
30026
- /* The pool card's login row holds three entries. They must stay on ONE line: a
30027
- wrapped row stops reading as a set of alternatives, and the third entry is the
30028
- one that gets pushed out. .dsha-btn carries white-space:nowrap, so shrinking
30029
- the row means letting the buttons shrink and ellipsizing the label inside —
30030
- the accessible name stays whole in aria-label/title, which is where the full
30031
- sentence lives. flex-basis 0 keeps the three of them sharing the width evenly
30032
- instead of the longest one claiming it. */
30033
- .dsh-codex-page :where(.dsha-account-add-actions){flex-wrap:nowrap;min-width:0}
30034
- .dsh-codex-page :where(.dsha-account-add-actions) > .dsha-btn{flex:1 1 0;min-width:0;overflow:hidden;text-overflow:ellipsis}
30345
+ .dsh-codex-page :where(.dsha-account-add-actions:not(.dsh-codex-login-actions)){flex-wrap:nowrap;min-width:0}
30346
+ .dsh-codex-page :where(.dsha-account-add-actions:not(.dsh-codex-login-actions)) > .dsha-btn{flex:1 1 0;min-width:0;overflow:hidden;text-overflow:ellipsis}
30347
+ /* Wrap the heading and actions as units when the full labels need more room. */
30348
+ .dsha-grouphead:has(> .dsh-codex-login-actions){flex-wrap:wrap;gap:6px 8px}
30349
+ .dsha-grouphead:has(> .dsh-codex-login-actions) > h3 > .dsha-muted{font-size:12px}
30350
+ .dsh-codex-page .dsh-codex-login-actions{gap:4px;max-width:100%}
30351
+ .dsh-codex-login-actions > .dsha-btn{font-size:12px;padding-inline:6px}
30035
30352
  .dsh-codex-title{font-size:15px;font-weight:650;line-height:1.4;margin:0 0 5px}
30036
30353
  .dsh-codex-intro,.dsh-codex-muted{color:var(--dsw-alias-label-secondary);font-size:13px;line-height:1.55;margin:0}
30037
30354
  .dsh-codex-group{border-top:0.5px solid var(--dsw-alias-border-l2);min-width:0}
@@ -30172,7 +30489,7 @@ window.__ModuleLoader__.load({
30172
30489
  * removed with, some other package.
30173
30490
  */
30174
30491
  function installStyles() {
30175
- return installPluginStyle("main", CSS$6);
30492
+ return installPluginStyle("main", CSS$7);
30176
30493
  }
30177
30494
  //#endregion
30178
30495
  //#region src/client/hub/hub-styles.ts
@@ -30182,7 +30499,7 @@ window.__ModuleLoader__.load({
30182
30499
  * batch selection bar, and context menu. Uses DSH theme tokens so light, dark,
30183
30500
  * and custom theme palettes work without hardcoded branches.
30184
30501
  */
30185
- const CSS$5 = `
30502
+ const CSS$6 = `
30186
30503
  .dsh-hub-overview{display:flex;flex-direction:column;gap:10px;min-width:0}
30187
30504
  .dsh-hub-toolbar{align-items:center;display:flex;flex-wrap:wrap;gap:6px;justify-content:flex-end;margin:2px 0 4px;min-width:0}
30188
30505
  .dsh-hub-head-tools{flex:0 1 auto;margin:0}
@@ -30303,7 +30620,7 @@ window.__ModuleLoader__.load({
30303
30620
  .dsh-hub-detail .dsha-page>header{margin-bottom:4px}
30304
30621
  `;
30305
30622
  function installHubStyles() {
30306
- installPluginStyle("hub", CSS$5);
30623
+ installPluginStyle("hub", CSS$6);
30307
30624
  }
30308
30625
  //#endregion
30309
30626
  //#region src/client/common/model-checklist-styles.ts
@@ -30312,7 +30629,7 @@ window.__ModuleLoader__.load({
30312
30629
  * and hover follow the claude-style model picker so the settings list and the
30313
30630
  * conversation picker read as one surface.
30314
30631
  */
30315
- const CSS$4 = `
30632
+ const CSS$5 = `
30316
30633
  .dsh-mcl{display:flex;flex-direction:column;min-width:0;padding:4px 0 2px}
30317
30634
  .dsh-mcl-head{align-items:center;display:flex;flex-wrap:wrap;gap:8px;justify-content:space-between;min-height:28px;padding:2px 2px 6px}
30318
30635
  .dsh-mcl-count{color:var(--dsw-alias-label-caption,#a6a094);font-size:11px;letter-spacing:.02em;margin-right:auto}
@@ -30358,7 +30675,7 @@ window.__ModuleLoader__.load({
30358
30675
  @media(max-width:560px){.dsh-mcl-split{grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(0,1fr);height:420px}.dsh-mcl-vendors{border-bottom:0.5px solid var(--dsw-alias-border-l2,#e3e1d5);border-right:none;flex-direction:row;overflow-x:auto;overflow-y:hidden}.dsh-mcl-vendor{width:auto}.dsh-mcl-vendor-sep{height:18px;margin:auto 2px;width:1px}.dsh-mcl-search{flex:1;max-width:none;width:auto}}
30359
30676
  `;
30360
30677
  function installModelChecklistStyles() {
30361
- installPluginStyle("model-checklist", CSS$4);
30678
+ installPluginStyle("model-checklist", CSS$5);
30362
30679
  }
30363
30680
  //#endregion
30364
30681
  //#region src/client/common/styles.ts
@@ -30921,7 +31238,7 @@ window.__ModuleLoader__.load({
30921
31238
  //#region src/client/providers/minimax-code/MinimaxVideoDocumentBody.tsx
30922
31239
  /** 兜底翻译:只在没有 locale 座位时用到。 */
30923
31240
  function translate$1(key) {
30924
- return zh$19[key] ?? key;
31241
+ return zh$20[key] ?? key;
30925
31242
  }
30926
31243
  /**
30927
31244
  * 一个文件地址里的会话与路径。
@@ -31057,7 +31374,7 @@ window.__ModuleLoader__.load({
31057
31374
  */
31058
31375
  /** 兜底翻译:只在没有 locale 座位时用到,走同一份 zh 字典。 */
31059
31376
  function translate(key) {
31060
- return zh$19[key] ?? key;
31377
+ return zh$20[key] ?? key;
31061
31378
  }
31062
31379
  /**
31063
31380
  * 一张视频工具卡片。
@@ -31513,7 +31830,7 @@ window.__ModuleLoader__.load({
31513
31830
  * 没有快照、没有窗口、或全部窗口都没有百分比时返回 null,即**不渲染胶囊**:
31514
31831
  * 契约允许 quota 为 null,装一个占位数字比不显示更像坏了。
31515
31832
  */
31516
- function selectBadgeFacts$3(status, lookup = (key) => zh$18[key]) {
31833
+ function selectBadgeFacts$3(status, lookup = (key) => zh$19[key]) {
31517
31834
  const measured = (status?.quota?.windows ?? []).filter((window) => typeof window.usedPercent === "number" && Number.isFinite(window.usedPercent));
31518
31835
  if (measured.length === 0) return null;
31519
31836
  const tightest = measured.reduce((best, window) => {
@@ -31609,7 +31926,7 @@ window.__ModuleLoader__.load({
31609
31926
  * single most misleading pixel on the page.
31610
31927
  */
31611
31928
  function AntigravityAcpComposerBadge(props) {
31612
- const t = useLineDict(NS_ANTIGRAVITY_ACP, zh$15);
31929
+ const t = useLineDict(NS_ANTIGRAVITY_ACP, zh$16);
31613
31930
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ComposerQuotaBadge, {
31614
31931
  directory: props.directory,
31615
31932
  loadModelDirectory: props.loadModelDirectory,
@@ -31693,7 +32010,7 @@ window.__ModuleLoader__.load({
31693
32010
  *
31694
32011
  * 没有快照、没有窗口、或全部窗口都没有百分比时返回 null(见文件头)。
31695
32012
  */
31696
- function selectBadgeFacts$2(status, lookup = (key) => zh$12[key]) {
32013
+ function selectBadgeFacts$2(status, lookup = (key) => zh$13[key]) {
31697
32014
  const quota = status?.quota;
31698
32015
  if (quota === null || quota === void 0) return null;
31699
32016
  if (quota.kind !== "windowed") return null;
@@ -31840,7 +32157,7 @@ window.__ModuleLoader__.load({
31840
32157
  directory: props.directory,
31841
32158
  loadModelDirectory: props.loadModelDirectory,
31842
32159
  providerId: "cline-pass",
31843
- label: zh$11.composerLabel,
32160
+ label: zh$12.composerLabel,
31844
32161
  readStatus: (refresh) => API$1.status(refresh),
31845
32162
  selectFacts: selectClinePassFacts
31846
32163
  });
@@ -31926,7 +32243,7 @@ window.__ModuleLoader__.load({
31926
32243
  * 另外那只可能还剩一大半。所以这里不平均、不取最小剩余,而是取最大已用比例。
31927
32244
  * 没有快照、没有桶、或全部桶都没有总额时返回 null(见文件头)。
31928
32245
  */
31929
- function selectBadgeFacts$1(status, lookup = (key) => zh$10[key]) {
32246
+ function selectBadgeFacts$1(status, lookup = (key) => zh$11[key]) {
31930
32247
  const quota = status?.quota;
31931
32248
  if (quota === null || quota === void 0) return null;
31932
32249
  const measurable = quota.buckets.filter((bucket) => bucket.total !== null && bucket.total > 0 && bucket.used !== null);
@@ -31936,7 +32253,7 @@ window.__ModuleLoader__.load({
31936
32253
  const remaining = Math.round((1 - used) * 100);
31937
32254
  const unit = tightest.unit !== null && tightest.unit !== "" ? " " + tightest.unit : "";
31938
32255
  const bucketLabel = quotaBucketText(tightest.kind, {
31939
- ...zh$10,
32256
+ ...zh$11,
31940
32257
  quotaBucketPersonal: lookup("quotaBucketPersonal"),
31941
32258
  quotaBucketAddOn: lookup("quotaBucketAddOn"),
31942
32259
  quotaBucketOrg: lookup("quotaBucketOrg")
@@ -32047,7 +32364,7 @@ window.__ModuleLoader__.load({
32047
32364
  directory: props.directory,
32048
32365
  loadModelDirectory: props.loadModelDirectory,
32049
32366
  providerId: "opendesign",
32050
- label: zh$9.composerLabel,
32367
+ label: zh$10.composerLabel,
32051
32368
  readStatus: () => API.status(),
32052
32369
  selectFacts: selectOpenDesignFacts
32053
32370
  });
@@ -32068,9 +32385,9 @@ window.__ModuleLoader__.load({
32068
32385
  * is not), and one decimal is what keeps "1.5 小时" from reading as "2 小时".
32069
32386
  */
32070
32387
  function planWindowName(seconds) {
32071
- if (seconds >= 86400 && seconds % 86400 === 0) return zh$9.usageWindowDays.replace("{count}", String(seconds / 86400));
32072
- if (seconds >= 3600) return zh$9.usageWindowHours.replace("{count}", formatDecimal(seconds / 3600));
32073
- return zh$9.usageWindowMinutes.replace("{count}", formatDecimal(seconds / 60));
32388
+ if (seconds >= 86400 && seconds % 86400 === 0) return zh$10.usageWindowDays.replace("{count}", String(seconds / 86400));
32389
+ if (seconds >= 3600) return zh$10.usageWindowHours.replace("{count}", formatDecimal(seconds / 3600));
32390
+ return zh$10.usageWindowMinutes.replace("{count}", formatDecimal(seconds / 60));
32074
32391
  }
32075
32392
  /** What a window still has, from the grant and the remainder it states. */
32076
32393
  function windowRemaining(limitCredits, remainingCredits) {
@@ -32103,7 +32420,7 @@ window.__ModuleLoader__.load({
32103
32420
  const primaryId = status.pool.activeAccountId ?? status.pool.accounts.find((account) => account.isPrimary)?.id;
32104
32421
  const reading = readings.find((account) => account.accountId === primaryId) ?? readings[0];
32105
32422
  const amount = reading.balanceUsd;
32106
- const readAt = zh$9.usageReadAt.replace("{time}", new Date(reading.fetchedAt).toLocaleTimeString());
32423
+ const readAt = zh$10.usageReadAt.replace("{time}", new Date(reading.fetchedAt).toLocaleTimeString());
32107
32424
  const windows = planWindows(reading.codingPlan);
32108
32425
  if (windows.length === 0) return {
32109
32426
  text: `$${amount}`,
@@ -32112,8 +32429,8 @@ window.__ModuleLoader__.load({
32112
32429
  };
32113
32430
  const narrowest = windows[0];
32114
32431
  return {
32115
- text: zh$9.usageWindowRemaining.replace("{remaining}", formatDecimal(narrowest.remaining)),
32116
- tooltip: `${reading.alias} · ${windows.map((window) => `${window.name} ${zh$9.usageWindowRemaining.replace("{remaining}", formatDecimal(window.remaining))}`).join(" · ")} · ${readAt}`,
32432
+ text: zh$10.usageWindowRemaining.replace("{remaining}", formatDecimal(narrowest.remaining)),
32433
+ tooltip: `${reading.alias} · ${windows.map((window) => `${window.name} ${zh$10.usageWindowRemaining.replace("{remaining}", formatDecimal(window.remaining))}`).join(" · ")} · ${readAt}`,
32117
32434
  level: quotaLevel(narrowest.remaining),
32118
32435
  percent: narrowest.remaining
32119
32436
  };
@@ -33903,7 +34220,7 @@ window.__ModuleLoader__.load({
33903
34220
  }
33904
34221
  /** 兜底翻译:只在没有 locale 服务时用到(测试、以及菜单渲染早于字典注册)。 */
33905
34222
  function fallbackTranslate$3(key, params) {
33906
- const template = zh$19[key] ?? key;
34223
+ const template = zh$20[key] ?? key;
33907
34224
  if (params === void 0) return template;
33908
34225
  return template.replace(/\{(\w+)\}/g, (_match, name) => String(params[name] ?? ""));
33909
34226
  }
@@ -61058,7 +61375,7 @@ window.__ModuleLoader__.load({
61058
61375
  }
61059
61376
  function translator(t) {
61060
61377
  return (key, params) => {
61061
- return interpolate$1(t === void 0 ? zh$3[key] ?? key : t(key), params);
61378
+ return interpolate$1(t === void 0 ? zh$4[key] ?? key : t(key), params);
61062
61379
  };
61063
61380
  }
61064
61381
  function titleOf(update) {
@@ -61964,7 +62281,7 @@ window.__ModuleLoader__.load({
61964
62281
  //#region src/client/features/progress-updates/updates-panel.tsx
61965
62282
  /** 进展面板的数据源适配;视觉实现见 dashboard.tsx。 */
61966
62283
  function fallbackTranslate$2(key, params) {
61967
- return interpolate(zh$3[key] ?? key, params);
62284
+ return interpolate(zh$4[key] ?? key, params);
61968
62285
  }
61969
62286
  function interpolate(template, params) {
61970
62287
  if (params === void 0) return template;
@@ -62202,6 +62519,39 @@ window.__ModuleLoader__.load({
62202
62519
  })]
62203
62520
  });
62204
62521
  }
62522
+ /** 顾问数字字段的范围与默认值,逐项照抄宿主 `Config` schema。 */
62523
+ const ADVISOR_LIMITS = {
62524
+ budget: {
62525
+ min: 0,
62526
+ max: 1e7,
62527
+ step: 1,
62528
+ fallback: 2e5
62529
+ },
62530
+ output: {
62531
+ min: 256,
62532
+ max: 32768,
62533
+ step: 1,
62534
+ fallback: 4096
62535
+ },
62536
+ context: {
62537
+ min: 8e3,
62538
+ max: 1e6,
62539
+ step: 1,
62540
+ fallback: 1e5
62541
+ },
62542
+ timeout: {
62543
+ min: 1e3,
62544
+ max: 3e5,
62545
+ step: 1,
62546
+ fallback: 3e5
62547
+ },
62548
+ retries: {
62549
+ min: 0,
62550
+ max: 3,
62551
+ step: 1,
62552
+ fallback: 1
62553
+ }
62554
+ };
62205
62555
  /**
62206
62556
  * 没有表单通道时的空快照。写成模块级常量,是因为
62207
62557
  * `useSyncExternalStore` 要求 `getSnapshot` 返回稳定引用。
@@ -62492,6 +62842,130 @@ window.__ModuleLoader__.load({
62492
62842
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M12 4.5v11" })]
62493
62843
  });
62494
62844
  }
62845
+ /** 顾问开关那一行的标记:两枚对望的气泡(第二意见)。 */
62846
+ function AdvisorMark() {
62847
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("svg", {
62848
+ viewBox: "0 0 20 20",
62849
+ width: "20",
62850
+ height: "20",
62851
+ fill: "none",
62852
+ stroke: "currentColor",
62853
+ strokeWidth: "1.6",
62854
+ strokeLinecap: "round",
62855
+ strokeLinejoin: "round",
62856
+ "aria-hidden": "true",
62857
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M3.5 8.2a3.7 3.7 0 0 1 3.7-3.7h3.1a3.7 3.7 0 0 1 0 7.4H8.9L6.3 14v-2.3a3.7 3.7 0 0 1-2.8-3.5Z" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M12.2 6.2h.6a3.4 3.4 0 0 1 3.4 3.4c0 1.5-1 2.8-2.4 3.2v1.9l-2.1-1.6" })]
62858
+ });
62859
+ }
62860
+ /** 顾问预算那一行的标记:一枚硬币(成本闸门)。 */
62861
+ function AdvisorBudgetMark() {
62862
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("svg", {
62863
+ viewBox: "0 0 20 20",
62864
+ width: "20",
62865
+ height: "20",
62866
+ fill: "none",
62867
+ stroke: "currentColor",
62868
+ strokeWidth: "1.6",
62869
+ strokeLinecap: "round",
62870
+ strokeLinejoin: "round",
62871
+ "aria-hidden": "true",
62872
+ children: [
62873
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("circle", {
62874
+ cx: "10",
62875
+ cy: "10",
62876
+ r: "6.5"
62877
+ }),
62878
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M12.3 7.6c-.6-.6-1.4-.9-2.3-.9-1.4 0-2.4.7-2.4 1.7 0 1.1 1 1.5 2.4 1.8 1.4.3 2.4.7 2.4 1.7 0 1-1 1.7-2.4 1.7-.9 0-1.7-.3-2.3-.9" }),
62879
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M10 5.6v1M10 13.4v1" })
62880
+ ]
62881
+ });
62882
+ }
62883
+ /** 顾问输出上限那一行的标记:一块向下收窄的量尺。 */
62884
+ function AdvisorOutputMark() {
62885
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("svg", {
62886
+ viewBox: "0 0 20 20",
62887
+ width: "20",
62888
+ height: "20",
62889
+ fill: "none",
62890
+ stroke: "currentColor",
62891
+ strokeWidth: "1.6",
62892
+ strokeLinecap: "round",
62893
+ strokeLinejoin: "round",
62894
+ "aria-hidden": "true",
62895
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("rect", {
62896
+ x: "3.5",
62897
+ y: "4",
62898
+ width: "13",
62899
+ height: "12",
62900
+ rx: "2"
62901
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M6.8 8h6.4M6.8 11h4M6.8 14h2" })]
62902
+ });
62903
+ }
62904
+ /** 顾问上下文预算那一行的标记:一叠层叠的历史。 */
62905
+ function AdvisorContextMark() {
62906
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("svg", {
62907
+ viewBox: "0 0 20 20",
62908
+ width: "20",
62909
+ height: "20",
62910
+ fill: "none",
62911
+ stroke: "currentColor",
62912
+ strokeWidth: "1.6",
62913
+ strokeLinecap: "round",
62914
+ strokeLinejoin: "round",
62915
+ "aria-hidden": "true",
62916
+ children: [
62917
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("rect", {
62918
+ x: "3.5",
62919
+ y: "4",
62920
+ width: "13",
62921
+ height: "4",
62922
+ rx: "1.4"
62923
+ }),
62924
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("rect", {
62925
+ x: "3.5",
62926
+ y: "9",
62927
+ width: "13",
62928
+ height: "4",
62929
+ rx: "1.4"
62930
+ }),
62931
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M6 15h8" })
62932
+ ]
62933
+ });
62934
+ }
62935
+ /** 顾问超时那一行的标记:一只钟。 */
62936
+ function AdvisorTimeoutMark() {
62937
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("svg", {
62938
+ viewBox: "0 0 20 20",
62939
+ width: "20",
62940
+ height: "20",
62941
+ fill: "none",
62942
+ stroke: "currentColor",
62943
+ strokeWidth: "1.6",
62944
+ strokeLinecap: "round",
62945
+ strokeLinejoin: "round",
62946
+ "aria-hidden": "true",
62947
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("circle", {
62948
+ cx: "10",
62949
+ cy: "10",
62950
+ r: "6.5"
62951
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M10 6.4V10l2.4 1.6" })]
62952
+ });
62953
+ }
62954
+ /** 顾问重试那一行的标记:一段循环箭头。 */
62955
+ function AdvisorRetryMark() {
62956
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("svg", {
62957
+ viewBox: "0 0 20 20",
62958
+ width: "20",
62959
+ height: "20",
62960
+ fill: "none",
62961
+ stroke: "currentColor",
62962
+ strokeWidth: "1.6",
62963
+ strokeLinecap: "round",
62964
+ strokeLinejoin: "round",
62965
+ "aria-hidden": "true",
62966
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M16 10a6 6 0 1 1-1.8-4.3" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M16 3.9v2.9h-2.9" })]
62967
+ });
62968
+ }
62495
62969
  /**
62496
62970
  * 一行卡片的外壳:左侧方块、中间名称与说明、右侧控件。
62497
62971
  * @param props - 行内各部件与是否关闭态。
@@ -62554,6 +63028,12 @@ window.__ModuleLoader__.load({
62554
63028
  const toolRunawayGuard = value.toolRunawayGuard !== false;
62555
63029
  const mediaTools = value.mediaTools !== false;
62556
63030
  const teamPolicyCacheGuard = value.teamPolicyCacheGuard !== false;
63031
+ const advisorEnabled = value.advisorEnabled === true;
63032
+ const advisorBudget = typeof value.advisorSessionTokenBudget === "number" ? value.advisorSessionTokenBudget : ADVISOR_LIMITS.budget.fallback;
63033
+ const advisorOutput = typeof value.advisorMaxTokens === "number" ? value.advisorMaxTokens : ADVISOR_LIMITS.output.fallback;
63034
+ const advisorContext = typeof value.advisorContextTokenBudget === "number" ? value.advisorContextTokenBudget : ADVISOR_LIMITS.context.fallback;
63035
+ const advisorTimeout = typeof value.advisorTimeoutMs === "number" ? value.advisorTimeoutMs : ADVISOR_LIMITS.timeout.fallback;
63036
+ const advisorRetry = typeof value.advisorMaxRetries === "number" ? value.advisorMaxRetries : ADVISOR_LIMITS.retries.fallback;
62557
63037
  const threshold = typeof value.progressUpdatesNudgeThreshold === "number" ? value.progressUpdatesNudgeThreshold : 8;
62558
63038
  const language = value.progressUpdatesLanguage === "zh" || value.progressUpdatesLanguage === "en" || value.progressUpdatesLanguage === "ru" ? value.progressUpdatesLanguage : "auto";
62559
63039
  const [draft, setDraft] = (0, react.useState)(() => String(threshold));
@@ -62561,6 +63041,43 @@ window.__ModuleLoader__.load({
62561
63041
  setDraft(String(threshold));
62562
63042
  }, [threshold]);
62563
63043
  /**
63044
+ * 顾问的五个数字字段各有一份草稿文本:与催促阈值同一条策略——只有落进
63045
+ * 宿主 schema 范围的整数才提交,半截输入留在框里不打扰宿主。
63046
+ */
63047
+ const advisorNumbers = {
63048
+ advisorBudget,
63049
+ advisorOutput,
63050
+ advisorContext,
63051
+ advisorTimeout,
63052
+ advisorRetry
63053
+ };
63054
+ const [advisorDrafts, setAdvisorDrafts] = (0, react.useState)(() => Object.fromEntries(Object.entries(advisorNumbers).map(([key, value]) => [key, String(value)])));
63055
+ (0, react.useEffect)(() => {
63056
+ setAdvisorDrafts(Object.fromEntries(Object.entries(advisorNumbers).map(([key, value]) => [key, String(value)])));
63057
+ }, [
63058
+ advisorBudget,
63059
+ advisorOutput,
63060
+ advisorContext,
63061
+ advisorTimeout,
63062
+ advisorRetry
63063
+ ]);
63064
+ /**
63065
+ * 提交一个顾问数字字段。
63066
+ * @param row - 出问题的是哪一行。
63067
+ * @param field - 本插件 Config 的根字段名。
63068
+ * @param raw - 输入框原始文本。
63069
+ * @param bounds - 合法范围。
63070
+ */
63071
+ const editAdvisorNumber = (row, field, raw, bounds) => {
63072
+ setAdvisorDrafts((prev) => ({
63073
+ ...prev,
63074
+ [row]: raw
63075
+ }));
63076
+ const parsed = Number(raw);
63077
+ if (!Number.isSafeInteger(parsed) || parsed < bounds.min || parsed > bounds.max) return;
63078
+ write(row, field, parsed);
63079
+ };
63080
+ /**
62564
63081
  * 写一个字段;宿主拒绝、传输失败、没有通道都落到该行的说明行上。
62565
63082
  * @param row - 出问题的是哪一行。
62566
63083
  * @param field - 字段名(本插件 Config 的根字段)。
@@ -62838,6 +63355,172 @@ window.__ModuleLoader__.load({
62838
63355
  }
62839
63356
  })
62840
63357
  }),
63358
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(CardRow, {
63359
+ part: "settings-row-advisor",
63360
+ brand: "#3f7d8c",
63361
+ mark: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(AdvisorMark, {}),
63362
+ name: translate("settingsAdvisorEnabledName"),
63363
+ note: unavailable ?? (failure?.row === "advisor" ? failure.text : translate("settingsAdvisorEnabledNote")),
63364
+ danger: failure?.row === "advisor" || unavailable !== void 0,
63365
+ enabled: advisorEnabled,
63366
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
63367
+ type: "button",
63368
+ role: "switch",
63369
+ "aria-checked": advisorEnabled,
63370
+ "aria-label": translate("settingsAdvisorEnabledName"),
63371
+ className: "dsh-progress-switch",
63372
+ "data-dsh-part": "settings-advisor-switch",
63373
+ disabled: !writable,
63374
+ onClick: () => {
63375
+ write("advisor", "advisorEnabled", !advisorEnabled);
63376
+ }
63377
+ })
63378
+ }),
63379
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(CardRow, {
63380
+ part: "settings-row-advisor-budget",
63381
+ brand: "#2f7d5c",
63382
+ mark: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(AdvisorBudgetMark, {}),
63383
+ name: translate("settingsAdvisorSessionBudgetName"),
63384
+ note: failure?.row === "advisorBudget" ? failure.text : translate("settingsAdvisorSessionBudgetNote"),
63385
+ danger: failure?.row === "advisorBudget",
63386
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
63387
+ type: "number",
63388
+ inputMode: "numeric",
63389
+ min: ADVISOR_LIMITS.budget.min,
63390
+ max: ADVISOR_LIMITS.budget.max,
63391
+ step: ADVISOR_LIMITS.budget.step,
63392
+ className: "dsh-progress-number dsh-progress-number-wide",
63393
+ "data-dsh-part": "settings-advisor-budget",
63394
+ "aria-label": translate("settingsAdvisorSessionBudgetName"),
63395
+ value: advisorDrafts["advisorBudget"] ?? "200000",
63396
+ disabled: !writable,
63397
+ onChange: (event) => {
63398
+ editAdvisorNumber("advisorBudget", "advisorSessionTokenBudget", event.target.value, ADVISOR_LIMITS.budget);
63399
+ },
63400
+ onBlur: () => {
63401
+ setAdvisorDrafts((prev) => ({
63402
+ ...prev,
63403
+ advisorBudget: String(advisorBudget)
63404
+ }));
63405
+ }
63406
+ })
63407
+ }),
63408
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(CardRow, {
63409
+ part: "settings-row-advisor-output",
63410
+ brand: "#4d6bfe",
63411
+ mark: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(AdvisorOutputMark, {}),
63412
+ name: translate("settingsAdvisorMaxTokensName"),
63413
+ note: failure?.row === "advisorOutput" ? failure.text : translate("settingsAdvisorMaxTokensNote"),
63414
+ danger: failure?.row === "advisorOutput",
63415
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
63416
+ type: "number",
63417
+ inputMode: "numeric",
63418
+ min: ADVISOR_LIMITS.output.min,
63419
+ max: ADVISOR_LIMITS.output.max,
63420
+ step: ADVISOR_LIMITS.output.step,
63421
+ className: "dsh-progress-number dsh-progress-number-wide",
63422
+ "data-dsh-part": "settings-advisor-output",
63423
+ "aria-label": translate("settingsAdvisorMaxTokensName"),
63424
+ value: advisorDrafts["advisorOutput"] ?? "4096",
63425
+ disabled: !writable,
63426
+ onChange: (event) => {
63427
+ editAdvisorNumber("advisorOutput", "advisorMaxTokens", event.target.value, ADVISOR_LIMITS.output);
63428
+ },
63429
+ onBlur: () => {
63430
+ setAdvisorDrafts((prev) => ({
63431
+ ...prev,
63432
+ advisorOutput: String(advisorOutput)
63433
+ }));
63434
+ }
63435
+ })
63436
+ }),
63437
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(CardRow, {
63438
+ part: "settings-row-advisor-context",
63439
+ brand: "#168a9c",
63440
+ mark: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(AdvisorContextMark, {}),
63441
+ name: translate("settingsAdvisorContextName"),
63442
+ note: failure?.row === "advisorContext" ? failure.text : translate("settingsAdvisorContextNote"),
63443
+ danger: failure?.row === "advisorContext",
63444
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
63445
+ type: "number",
63446
+ inputMode: "numeric",
63447
+ min: ADVISOR_LIMITS.context.min,
63448
+ max: ADVISOR_LIMITS.context.max,
63449
+ step: ADVISOR_LIMITS.context.step,
63450
+ className: "dsh-progress-number dsh-progress-number-wide",
63451
+ "data-dsh-part": "settings-advisor-context",
63452
+ "aria-label": translate("settingsAdvisorContextName"),
63453
+ value: advisorDrafts["advisorContext"] ?? "100000",
63454
+ disabled: !writable,
63455
+ onChange: (event) => {
63456
+ editAdvisorNumber("advisorContext", "advisorContextTokenBudget", event.target.value, ADVISOR_LIMITS.context);
63457
+ },
63458
+ onBlur: () => {
63459
+ setAdvisorDrafts((prev) => ({
63460
+ ...prev,
63461
+ advisorContext: String(advisorContext)
63462
+ }));
63463
+ }
63464
+ })
63465
+ }),
63466
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(CardRow, {
63467
+ part: "settings-row-advisor-timeout",
63468
+ brand: "#d97724",
63469
+ mark: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(AdvisorTimeoutMark, {}),
63470
+ name: translate("settingsAdvisorTimeoutName"),
63471
+ note: failure?.row === "advisorTimeout" ? failure.text : translate("settingsAdvisorTimeoutNote"),
63472
+ danger: failure?.row === "advisorTimeout",
63473
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
63474
+ type: "number",
63475
+ inputMode: "numeric",
63476
+ min: ADVISOR_LIMITS.timeout.min,
63477
+ max: ADVISOR_LIMITS.timeout.max,
63478
+ step: ADVISOR_LIMITS.timeout.step,
63479
+ className: "dsh-progress-number dsh-progress-number-wide",
63480
+ "data-dsh-part": "settings-advisor-timeout",
63481
+ "aria-label": translate("settingsAdvisorTimeoutName"),
63482
+ value: advisorDrafts["advisorTimeout"] ?? "300000",
63483
+ disabled: !writable,
63484
+ onChange: (event) => {
63485
+ editAdvisorNumber("advisorTimeout", "advisorTimeoutMs", event.target.value, ADVISOR_LIMITS.timeout);
63486
+ },
63487
+ onBlur: () => {
63488
+ setAdvisorDrafts((prev) => ({
63489
+ ...prev,
63490
+ advisorTimeout: String(advisorTimeout)
63491
+ }));
63492
+ }
63493
+ })
63494
+ }),
63495
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(CardRow, {
63496
+ part: "settings-row-advisor-retry",
63497
+ brand: "#7c6aef",
63498
+ mark: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(AdvisorRetryMark, {}),
63499
+ name: translate("settingsAdvisorRetriesName"),
63500
+ note: failure?.row === "advisorRetry" ? failure.text : translate("settingsAdvisorRetriesNote"),
63501
+ danger: failure?.row === "advisorRetry",
63502
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
63503
+ type: "number",
63504
+ inputMode: "numeric",
63505
+ min: ADVISOR_LIMITS.retries.min,
63506
+ max: ADVISOR_LIMITS.retries.max,
63507
+ step: ADVISOR_LIMITS.retries.step,
63508
+ className: "dsh-progress-number dsh-progress-number-wide",
63509
+ "data-dsh-part": "settings-advisor-retry",
63510
+ "aria-label": translate("settingsAdvisorRetriesName"),
63511
+ value: advisorDrafts["advisorRetry"] ?? "1",
63512
+ disabled: !writable,
63513
+ onChange: (event) => {
63514
+ editAdvisorNumber("advisorRetry", "advisorMaxRetries", event.target.value, ADVISOR_LIMITS.retries);
63515
+ },
63516
+ onBlur: () => {
63517
+ setAdvisorDrafts((prev) => ({
63518
+ ...prev,
63519
+ advisorRetry: String(advisorRetry)
63520
+ }));
63521
+ }
63522
+ })
63523
+ }),
62841
63524
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)(CardRow, {
62842
63525
  part: "settings-row-threshold",
62843
63526
  brand: "#2f9e6e",
@@ -63560,7 +64243,7 @@ window.__ModuleLoader__.load({
63560
64243
  try {
63561
64244
  return ctx.locale.bind(NS_PROGRESS_UPDATES)("progressTitle");
63562
64245
  } catch {
63563
- return zh$3.progressTitle;
64246
+ return zh$4.progressTitle;
63564
64247
  }
63565
64248
  },
63566
64249
  guide: [{
@@ -63570,14 +64253,14 @@ window.__ModuleLoader__.load({
63570
64253
  try {
63571
64254
  return ctx.locale.bind(NS_PROGRESS_UPDATES)("progressTitle");
63572
64255
  } catch {
63573
- return zh$3.progressTitle;
64256
+ return zh$4.progressTitle;
63574
64257
  }
63575
64258
  },
63576
64259
  description: () => {
63577
64260
  try {
63578
64261
  return ctx.locale.bind(NS_PROGRESS_UPDATES)("progressGuideNote");
63579
64262
  } catch {
63580
- return zh$3.progressGuideNote;
64263
+ return zh$4.progressGuideNote;
63581
64264
  }
63582
64265
  },
63583
64266
  icon: ProgressUpdatesArtwork
@@ -63655,7 +64338,7 @@ window.__ModuleLoader__.load({
63655
64338
  try {
63656
64339
  return ctx.locale.bind(NS_PROGRESS_UPDATES)("navTitle");
63657
64340
  } catch {
63658
- return zh$3.navTitle;
64341
+ return zh$4.navTitle;
63659
64342
  }
63660
64343
  },
63661
64344
  locale: NS_PROGRESS_UPDATES,
@@ -63703,7 +64386,7 @@ window.__ModuleLoader__.load({
63703
64386
  /** 这张表的 `data-plugin-css` 子名。 */
63704
64387
  const STYLE_NAME$1 = "progress-updates";
63705
64388
  /** 设置卡片与面板的样式全文。 */
63706
- const CSS$3 = `
64389
+ const CSS$4 = `
63707
64390
  .dsh-progress-overview{display:flex;flex-direction:column;min-width:0}
63708
64391
  .dsh-progress-hint{color:var(--dsw-alias-label-secondary,#5d5c52);font-size:13px;line-height:1.55;margin:0 0 14px}
63709
64392
  .dsh-progress-cards{border-top:0.5px solid var(--dsw-alias-border-l2,#eceadf)}
@@ -63724,6 +64407,7 @@ window.__ModuleLoader__.load({
63724
64407
  .dsh-progress-switch:disabled{cursor:default;opacity:.5}
63725
64408
  .dsh-progress-switch:focus-visible{outline:2px solid var(--dsw-alias-button-info-fill,#397ee8);outline-offset:2px}
63726
64409
  .dsh-progress-number{background:var(--dsw-alias-bg-layer-1,#fff);border:0.5px solid var(--dsw-alias-border-l2,#e3e1d5);border-radius:8px;box-sizing:border-box;color:var(--dsw-alias-label-primary,#141413);font:inherit;font-size:13px;height:30px;padding:0 8px;text-align:center;width:64px}
64410
+ .dsh-progress-number-wide{width:96px}
63727
64411
  .dsh-progress-number:focus-visible{outline:2px solid var(--dsw-alias-button-info-fill,#397ee8);outline-offset:1px}
63728
64412
  .dsh-progress-number:disabled{cursor:default;opacity:.5}
63729
64413
  .dsh-progress-select{background:var(--dsw-alias-bg-layer-1,#fff);border:0.5px solid var(--dsw-alias-border-l2,#e3e1d5);border-radius:8px;box-sizing:border-box;color:var(--dsw-alias-label-primary,#141413);cursor:pointer;font:inherit;font-size:13px;height:30px;padding:0 6px}
@@ -63738,7 +64422,7 @@ window.__ModuleLoader__.load({
63738
64422
  * @returns 空操作释放函数(与邻居同形)。
63739
64423
  */
63740
64424
  function installProgressUpdatesStyles() {
63741
- return installPluginStyle(STYLE_NAME$1, CSS$3);
64425
+ return installPluginStyle(STYLE_NAME$1, CSS$4);
63742
64426
  }
63743
64427
  //#endregion
63744
64428
  //#region src/client/providers/workbuddy/WorkBuddyComposerQuota.tsx
@@ -63804,7 +64488,7 @@ window.__ModuleLoader__.load({
63804
64488
  providerId: "workbuddy-subscription",
63805
64489
  readStatus: (refresh) => refresh ? api$1.post("/quota") : api$1.get("/status"),
63806
64490
  selectFacts: selectBadgeFacts,
63807
- label: useLineDict(NS_WORKBUDDY, zh$8).composerLabel
64491
+ label: useLineDict(NS_WORKBUDDY, zh$9).composerLabel
63808
64492
  });
63809
64493
  }
63810
64494
  //#endregion
@@ -63867,7 +64551,7 @@ window.__ModuleLoader__.load({
63867
64551
  }
63868
64552
  //#endregion
63869
64553
  //#region src/client/providers/qianwen-token-plan/QianwenComposerQuota.tsx
63870
- function selectQianwenBadgeFacts(status, lookup = (key) => zh$7[key]) {
64554
+ function selectQianwenBadgeFacts(status, lookup = (key) => zh$8[key]) {
63871
64555
  const cache = status?.cacheStats;
63872
64556
  if (cache === void 0 || cache === null) return null;
63873
64557
  const ratio = qianwenCacheHitRatio(cache);
@@ -63911,7 +64595,7 @@ window.__ModuleLoader__.load({
63911
64595
  }
63912
64596
  //#endregion
63913
64597
  //#region src/client/providers/relayone/RelayOneComposerQuota.tsx
63914
- function selectRelayOneBadgeFacts(status, lookup = (key) => zh$6[key]) {
64598
+ function selectRelayOneBadgeFacts(status, lookup = (key) => zh$7[key]) {
63915
64599
  if (status === null || !status.authenticated || status.quota === void 0) return null;
63916
64600
  const quota = status.quota;
63917
64601
  const text = relayOneQuotaText(quota);
@@ -63995,7 +64679,7 @@ window.__ModuleLoader__.load({
63995
64679
  this.code = code;
63996
64680
  }
63997
64681
  };
63998
- async function call(url, init) {
64682
+ async function call$1(url, init) {
63999
64683
  const response = await fetch(url, {
64000
64684
  ...init,
64001
64685
  credentials: "same-origin"
@@ -64008,8 +64692,8 @@ window.__ModuleLoader__.load({
64008
64692
  return envelope.value;
64009
64693
  }
64010
64694
  const compactAfterTurnApi = {
64011
- read: (sessionId) => call(`${COMPACT_AFTER_TURN_PATH}?session=${encodeURIComponent(sessionId)}`),
64012
- write: (sessionId, armed) => call(COMPACT_AFTER_TURN_PATH, {
64695
+ read: (sessionId) => call$1(`${COMPACT_AFTER_TURN_PATH}?session=${encodeURIComponent(sessionId)}`),
64696
+ write: (sessionId, armed) => call$1(COMPACT_AFTER_TURN_PATH, {
64013
64697
  method: "POST",
64014
64698
  headers: { "content-type": "application/json" },
64015
64699
  body: JSON.stringify({
@@ -64174,7 +64858,7 @@ window.__ModuleLoader__.load({
64174
64858
  //#endregion
64175
64859
  //#region src/client/features/compact-after-turn/styles.ts
64176
64860
  const STYLE_ID$2 = "dsh-compact-after-turn-style";
64177
- const CSS$2 = `
64861
+ const CSS$3 = `
64178
64862
  .dshcat-row{align-items:center;border-radius:var(--dsw-radius-md,6px);box-sizing:border-box;color:var(--dsw-alias-label-primary);display:flex;font-size:13px;gap:8px;line-height:20px;min-height:34px;padding:0 8px;position:relative;width:100%}
64179
64863
  .dshcat-label{align-items:center;display:inline-flex;flex:1;gap:4px;min-width:0}
64180
64864
  .dshcat-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@@ -64197,7 +64881,569 @@ window.__ModuleLoader__.load({
64197
64881
  @media (prefers-reduced-motion:reduce){.dshcat-switch,.dshcat-switch::before{transition:none}.dshcat-tip{animation:none}}
64198
64882
  `;
64199
64883
  function installCompactAfterTurnStyles() {
64200
- return installPluginStyle("compact-after-turn", CSS$2, STYLE_ID$2);
64884
+ return installPluginStyle("compact-after-turn", CSS$3, STYLE_ID$2);
64885
+ }
64886
+ //#endregion
64887
+ //#region src/shared/advisor-contracts.ts
64888
+ const ADVISOR_STATE_PATH = "/advisor/state";
64889
+ //#endregion
64890
+ //#region src/client/features/advisor/AdvisorModelOption.tsx
64891
+ function AdvisorReasoningSlider({ selection, directory, pending, locked, update, t }) {
64892
+ const model = (0, react.useSyncExternalStore)((cb) => directory.subscribe(cb), () => directory.getSnapshot()).groups.find((group) => group.id === selection.provider)?.models.find((item) => item.id === selection.model);
64893
+ const efforts = model?.reasoning?.efforts ?? [];
64894
+ const trackRef = (0, react.useRef)(null);
64895
+ const fillRef = (0, react.useRef)(null);
64896
+ const knobRef = (0, react.useRef)(null);
64897
+ const rootRef = (0, react.useRef)(null);
64898
+ const dragging = (0, react.useRef)(false);
64899
+ const disabled = locked || pending;
64900
+ const current = Math.max(0, efforts.findIndex((effort) => effort.id === (selection.reasoningEffort ?? model?.reasoning?.defaultEffort ?? efforts[0].id)));
64901
+ if (efforts.length === 0) return null;
64902
+ const last = Math.max(1, efforts.length - 1);
64903
+ const resting = current / last;
64904
+ const name = efforts[Math.max(0, Math.min(efforts.length - 1, current))].name;
64905
+ const select = (index) => {
64906
+ const next = efforts[Math.max(0, Math.min(efforts.length - 1, index))];
64907
+ if (next.id !== selection.reasoningEffort) update({ selection: {
64908
+ ...selection,
64909
+ reasoningEffort: next.id
64910
+ } });
64911
+ };
64912
+ /** Paint one ratio onto the knob, the fill and the apex tint without React. */
64913
+ const paint = (ratio) => {
64914
+ const clamped = Math.max(0, Math.min(1, ratio));
64915
+ const track = trackRef.current;
64916
+ if (track === null) return;
64917
+ const travel = track.clientWidth - 16;
64918
+ if (knobRef.current !== null) knobRef.current.style.transform = `translateX(${clamped * travel}px)`;
64919
+ if (fillRef.current !== null) fillRef.current.style.width = `${clamped * travel + 8}px`;
64920
+ if (rootRef.current !== null) {
64921
+ const tinted = efforts.length > 1 ? Math.round(clamped * 100) : 100;
64922
+ rootRef.current.style.setProperty("--dshadv-effort-tint", String(tinted));
64923
+ if (clamped >= .999) rootRef.current.setAttribute("data-apex", "");
64924
+ else rootRef.current.removeAttribute("data-apex");
64925
+ }
64926
+ };
64927
+ const ratioAt = (clientX) => {
64928
+ const rect = trackRef.current?.getBoundingClientRect();
64929
+ const width = (rect?.width ?? 0) - 16;
64930
+ if (rect === void 0 || width <= 0) return resting;
64931
+ return Math.max(0, Math.min(1, (clientX - rect.left - 8) / width));
64932
+ };
64933
+ (0, react.useEffect)(() => {
64934
+ if (!dragging.current) paint(resting);
64935
+ });
64936
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
64937
+ ref: rootRef,
64938
+ className: "dshadv-effort dshadv-effort-tinted dsh-claude-effort",
64939
+ "data-dragging": dragging.current ? "" : void 0,
64940
+ children: [
64941
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
64942
+ className: "dshadv-effort-head dsh-claude-effort-head",
64943
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
64944
+ className: "dshadv-effort-label dsh-claude-effort-label",
64945
+ children: t("reasoning")
64946
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
64947
+ className: "dshadv-effort-value dsh-claude-effort-value",
64948
+ children: name
64949
+ })]
64950
+ }),
64951
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
64952
+ ref: trackRef,
64953
+ className: "dshadv-effort-track dsh-claude-effort-track",
64954
+ role: "slider",
64955
+ tabIndex: disabled ? -1 : 0,
64956
+ "aria-disabled": disabled,
64957
+ "aria-label": t("reasoning"),
64958
+ "aria-valuemin": 0,
64959
+ "aria-valuemax": last,
64960
+ "aria-valuenow": current,
64961
+ "aria-valuetext": name,
64962
+ onPointerDown: (event) => {
64963
+ if (disabled) return;
64964
+ event.currentTarget.setPointerCapture(event.pointerId);
64965
+ dragging.current = true;
64966
+ rootRef.current?.setAttribute("data-dragging", "");
64967
+ paint(ratioAt(event.clientX));
64968
+ },
64969
+ onPointerMove: (event) => {
64970
+ if (!disabled && dragging.current) paint(ratioAt(event.clientX));
64971
+ },
64972
+ onPointerUp: (event) => {
64973
+ if (disabled || !dragging.current) return;
64974
+ dragging.current = false;
64975
+ rootRef.current?.removeAttribute("data-dragging");
64976
+ select(Math.round(ratioAt(event.clientX) * last));
64977
+ },
64978
+ onPointerCancel: () => {
64979
+ dragging.current = false;
64980
+ rootRef.current?.removeAttribute("data-dragging");
64981
+ paint(resting);
64982
+ },
64983
+ onKeyDown: (event) => {
64984
+ if (disabled) return;
64985
+ if (event.key === "ArrowLeft" || event.key === "ArrowDown") {
64986
+ event.preventDefault();
64987
+ select(current - 1);
64988
+ } else if (event.key === "ArrowRight" || event.key === "ArrowUp") {
64989
+ event.preventDefault();
64990
+ select(current + 1);
64991
+ } else if (event.key === "Home") {
64992
+ event.preventDefault();
64993
+ select(0);
64994
+ } else if (event.key === "End") {
64995
+ event.preventDefault();
64996
+ select(last);
64997
+ }
64998
+ },
64999
+ children: [
65000
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
65001
+ ref: fillRef,
65002
+ className: "dshadv-effort-fill dsh-claude-effort-fill"
65003
+ }),
65004
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
65005
+ className: "dshadv-effort-ticks dsh-claude-effort-ticks",
65006
+ children: efforts.map((effort, index) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
65007
+ className: "dshadv-effort-tick dsh-claude-effort-tick",
65008
+ style: { left: `${index / last * 100}%` }
65009
+ }, effort.id))
65010
+ }),
65011
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
65012
+ ref: knobRef,
65013
+ className: "dshadv-effort-knob dsh-claude-effort-knob"
65014
+ })
65015
+ ]
65016
+ }),
65017
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
65018
+ className: "dshadv-effort-ends dsh-claude-effort-ends",
65019
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
65020
+ className: "dsh-claude-effort-end",
65021
+ children: t("faster")
65022
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
65023
+ className: "dsh-claude-effort-end",
65024
+ children: t("stronger")
65025
+ })]
65026
+ })
65027
+ ]
65028
+ });
65029
+ }
65030
+ async function call(url, init) {
65031
+ const response = await fetch(url, {
65032
+ ...init,
65033
+ credentials: "same-origin"
65034
+ });
65035
+ const envelope = await response.json().catch(() => null);
65036
+ if (!response.ok || envelope?.ok !== true || envelope.value === void 0) throw new Error(`HTTP ${response.status}`);
65037
+ return envelope.value;
65038
+ }
65039
+ const advisorApi = {
65040
+ read: (sessionId) => call(`${ADVISOR_STATE_PATH}?session=${encodeURIComponent(sessionId)}`),
65041
+ write: (sessionId, patch) => call(ADVISOR_STATE_PATH, {
65042
+ method: "POST",
65043
+ headers: { "content-type": "application/json" },
65044
+ body: JSON.stringify({
65045
+ sessionId,
65046
+ ...patch
65047
+ })
65048
+ })
65049
+ };
65050
+ function useAdvisorState(sessionId, api, reportFailure, t) {
65051
+ const [state, setState] = (0, react.useState)(null);
65052
+ const [pending, setPending] = (0, react.useState)(false);
65053
+ const mounted = (0, react.useRef)(true);
65054
+ (0, react.useEffect)(() => {
65055
+ mounted.current = true;
65056
+ setState(null);
65057
+ api.read(sessionId).then((value) => {
65058
+ if (mounted.current) setState(value);
65059
+ }).catch(() => void 0);
65060
+ return () => {
65061
+ mounted.current = false;
65062
+ };
65063
+ }, [api, sessionId]);
65064
+ (0, react.useEffect)(() => {
65065
+ const changed = (event) => {
65066
+ const next = event.detail;
65067
+ if (next?.sessionId === sessionId) setState(next);
65068
+ };
65069
+ window.addEventListener("dsh-advisor-changed", changed);
65070
+ return () => window.removeEventListener("dsh-advisor-changed", changed);
65071
+ }, [sessionId]);
65072
+ return {
65073
+ state,
65074
+ pending,
65075
+ update: (0, react.useCallback)((patch) => {
65076
+ setPending(true);
65077
+ api.write(sessionId, patch).then((value) => {
65078
+ if (mounted.current) setState(value);
65079
+ window.dispatchEvent(new CustomEvent("dsh-advisor-changed", { detail: value }));
65080
+ }, (error) => {
65081
+ if (mounted.current) reportFailure(t("failed", { message: error instanceof Error ? error.message : String(error) }));
65082
+ }).finally(() => {
65083
+ if (mounted.current) setPending(false);
65084
+ });
65085
+ }, [
65086
+ api,
65087
+ reportFailure,
65088
+ sessionId,
65089
+ t
65090
+ ])
65091
+ };
65092
+ }
65093
+ /** Shared popover motion: hover opens, a short grace period closes, Escape closes. */
65094
+ function usePanelMotion() {
65095
+ const anchor = (0, react.useRef)(null);
65096
+ const [open, setOpen] = (0, react.useState)(false);
65097
+ const [style, setStyle] = (0, react.useState)(void 0);
65098
+ const closeTimer = (0, react.useRef)(void 0);
65099
+ const openPanel = (target, widthOverride) => {
65100
+ window.clearTimeout(closeTimer.current);
65101
+ closeTimer.current = void 0;
65102
+ const rect = target.getBoundingClientRect();
65103
+ const width = Math.min(widthOverride ?? 320, window.innerWidth - 16);
65104
+ setStyle({
65105
+ position: "fixed",
65106
+ width,
65107
+ left: Math.min(Math.max(8, rect.right - width), Math.max(8, window.innerWidth - width - 8)),
65108
+ bottom: Math.max(8, window.innerHeight - rect.top + 8),
65109
+ maxHeight: Math.max(160, rect.top - 24)
65110
+ });
65111
+ setOpen(true);
65112
+ };
65113
+ const close = () => {
65114
+ window.clearTimeout(closeTimer.current);
65115
+ setOpen(false);
65116
+ };
65117
+ const scheduleClose = () => {
65118
+ window.clearTimeout(closeTimer.current);
65119
+ closeTimer.current = window.setTimeout(() => setOpen(false), 320);
65120
+ };
65121
+ const cancelClose = () => {
65122
+ window.clearTimeout(closeTimer.current);
65123
+ closeTimer.current = void 0;
65124
+ };
65125
+ (0, react.useEffect)(() => () => window.clearTimeout(closeTimer.current), []);
65126
+ return {
65127
+ anchor,
65128
+ open,
65129
+ style,
65130
+ openPanel,
65131
+ close,
65132
+ cancelClose,
65133
+ scheduleClose
65134
+ };
65135
+ }
65136
+ /** Model seat: enable switch plus the advisor model list. No reasoning control. */
65137
+ function AdvisorModelTrigger(props) {
65138
+ const { sessionId, locked, reportFailure, t } = props;
65139
+ const api = props.api ?? advisorApi;
65140
+ const { anchor, open, style, openPanel, close, cancelClose, scheduleClose } = usePanelMotion();
65141
+ const { state, pending, update } = useAdvisorState(sessionId, api, reportFailure, t);
65142
+ (0, react.useEffect)(() => {
65143
+ props.load();
65144
+ }, [props.load]);
65145
+ (0, react.useEffect)(() => {
65146
+ if (!open) return;
65147
+ const outside = (event) => {
65148
+ const target = event.target;
65149
+ const panel = document.getElementById("dshadv-model-popover");
65150
+ if (!(target === null || anchor.current?.contains(target) || panel !== null && panel.contains(target))) close();
65151
+ };
65152
+ const escape = (event) => {
65153
+ if (event.key === "Escape") close();
65154
+ };
65155
+ document.addEventListener("pointerdown", outside, true);
65156
+ document.addEventListener("keydown", escape, true);
65157
+ return () => {
65158
+ document.removeEventListener("pointerdown", outside, true);
65159
+ document.removeEventListener("keydown", escape, true);
65160
+ };
65161
+ }, [open]);
65162
+ if (state === null || state.sessionId !== sessionId) return null;
65163
+ const selected = state.selection;
65164
+ const caption = !state.enabled ? t("label") : selected === null ? t("enableFirst") : selected.model;
65165
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
65166
+ ref: anchor,
65167
+ type: "button",
65168
+ className: "dshadv-trigger",
65169
+ "data-enabled": state.enabled,
65170
+ "aria-haspopup": "dialog",
65171
+ "aria-expanded": open,
65172
+ "aria-description": t("privacy"),
65173
+ "aria-label": `${t("label")} · ${t("model")}`,
65174
+ disabled: locked,
65175
+ onPointerEnter: (event) => openPanel(event.currentTarget),
65176
+ onMouseEnter: (event) => openPanel(event.currentTarget),
65177
+ onFocus: (event) => openPanel(event.currentTarget),
65178
+ onClick: (event) => openPanel(event.currentTarget),
65179
+ onPointerLeave: scheduleClose,
65180
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
65181
+ className: "dshadv-trigger-label",
65182
+ children: caption
65183
+ })
65184
+ }), open && (0, react_dom.createPortal)(/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
65185
+ id: "dshadv-model-popover",
65186
+ className: "dshadv-popover",
65187
+ role: "dialog",
65188
+ "aria-label": t("model"),
65189
+ style,
65190
+ onPointerEnter: cancelClose,
65191
+ onMouseEnter: cancelClose,
65192
+ onPointerLeave: scheduleClose,
65193
+ onMouseLeave: scheduleClose,
65194
+ children: [
65195
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
65196
+ className: "dshadv-popover-head",
65197
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
65198
+ className: "dshadv-popover-title",
65199
+ children: t("label")
65200
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
65201
+ type: "button",
65202
+ role: "switch",
65203
+ className: "dshadv-switch",
65204
+ "aria-checked": state.enabled,
65205
+ "aria-label": t("label"),
65206
+ disabled: pending,
65207
+ onClick: () => update({ enabled: !state.enabled })
65208
+ })]
65209
+ }),
65210
+ state.enabled && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(AdvisorModelPane, {
65211
+ sessionId,
65212
+ directory: props.directory,
65213
+ load: props.load,
65214
+ locked: locked || pending,
65215
+ reportFailure,
65216
+ t,
65217
+ api
65218
+ }),
65219
+ !state.enabled && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
65220
+ className: "dshadv-off-hint",
65221
+ children: t("enableHint")
65222
+ })
65223
+ ]
65224
+ }), document.body)] });
65225
+ }
65226
+ /** Reasoning seat: the same effort ladder as the main model, for the advisor model. */
65227
+ function AdvisorEffortTrigger(props) {
65228
+ const { sessionId, locked, reportFailure, t } = props;
65229
+ const api = props.api ?? advisorApi;
65230
+ const { anchor, open, style, openPanel, close, cancelClose, scheduleClose } = usePanelMotion();
65231
+ const { state, pending, update } = useAdvisorState(sessionId, api, reportFailure, t);
65232
+ (0, react.useEffect)(() => {
65233
+ props.load();
65234
+ }, [props.load]);
65235
+ (0, react.useEffect)(() => {
65236
+ if (!open) return;
65237
+ const outside = (event) => {
65238
+ const target = event.target;
65239
+ const panel = document.getElementById("dshadv-effort-popover");
65240
+ if (!(target === null || anchor.current?.contains(target) || panel !== null && panel.contains(target))) close();
65241
+ };
65242
+ const escape = (event) => {
65243
+ if (event.key === "Escape") close();
65244
+ };
65245
+ document.addEventListener("pointerdown", outside, true);
65246
+ document.addEventListener("keydown", escape, true);
65247
+ return () => {
65248
+ document.removeEventListener("pointerdown", outside, true);
65249
+ document.removeEventListener("keydown", escape, true);
65250
+ };
65251
+ }, [open]);
65252
+ const snapshot = (0, react.useSyncExternalStore)((cb) => props.directory.subscribe(cb), () => props.directory.getSnapshot());
65253
+ if (state === null || state.sessionId !== sessionId || !state.enabled || state.selection === null) return null;
65254
+ const selected = state.selection;
65255
+ const model = snapshot.groups.find((group) => group.id === selected.provider)?.models.find((item) => item.id === selected.model);
65256
+ const efforts = model?.reasoning?.efforts ?? [];
65257
+ if (efforts.length === 0) return null;
65258
+ const currentId = selected.reasoningEffort ?? model?.reasoning?.defaultEffort ?? efforts[0].id;
65259
+ const currentEffort = efforts.find((effort) => effort.id === currentId) ?? efforts[0];
65260
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
65261
+ ref: anchor,
65262
+ type: "button",
65263
+ className: "dshadv-effort-trigger",
65264
+ "aria-haspopup": "dialog",
65265
+ "aria-expanded": open,
65266
+ "aria-label": `${t("reasoning")} ${currentEffort.name}`,
65267
+ disabled: locked,
65268
+ onPointerEnter: (event) => openPanel(event.currentTarget, 232),
65269
+ onMouseEnter: (event) => openPanel(event.currentTarget, 232),
65270
+ onFocus: (event) => openPanel(event.currentTarget, 232),
65271
+ onClick: (event) => openPanel(event.currentTarget, 232),
65272
+ onPointerLeave: scheduleClose,
65273
+ children: currentEffort.name
65274
+ }), open && (0, react_dom.createPortal)(/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
65275
+ id: "dshadv-effort-popover",
65276
+ className: "dshadv-popover dshadv-effort-popover",
65277
+ role: "dialog",
65278
+ "aria-label": t("reasoning"),
65279
+ style,
65280
+ onPointerEnter: cancelClose,
65281
+ onMouseEnter: cancelClose,
65282
+ onPointerLeave: scheduleClose,
65283
+ onMouseLeave: scheduleClose,
65284
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(AdvisorReasoningSlider, {
65285
+ selection: selected,
65286
+ directory: props.directory,
65287
+ pending,
65288
+ locked,
65289
+ update,
65290
+ t
65291
+ })
65292
+ }), document.body)] });
65293
+ }
65294
+ function AdvisorModelPane(props) {
65295
+ const { sessionId, locked, reportFailure, t } = props;
65296
+ const { state, pending, update } = useAdvisorState(sessionId, props.api ?? advisorApi, reportFailure, t);
65297
+ const [query, setQuery] = (0, react.useState)("");
65298
+ const directory = (0, react.useSyncExternalStore)((cb) => props.directory.subscribe(cb), () => props.directory.getSnapshot());
65299
+ (0, react.useEffect)(() => {
65300
+ props.load();
65301
+ }, [props.load]);
65302
+ if (state === null || state.sessionId !== sessionId) return null;
65303
+ const selection = state.selection;
65304
+ const normalizedQuery = query.trim().toLowerCase();
65305
+ const visibleGroups = directory.groups.map((group) => ({
65306
+ ...group,
65307
+ models: group.models.filter((model) => normalizedQuery === "" || `${group.name} ${model.name} ${model.id}`.toLowerCase().includes(normalizedQuery))
65308
+ })).filter((group) => group.models.length > 0);
65309
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
65310
+ className: "dshadv-pane",
65311
+ children: [
65312
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
65313
+ className: "dsh-claude-model-search dshadv-search-wrap",
65314
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
65315
+ className: "dsh-claude-model-search-field",
65316
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
65317
+ className: "dsh-claude-model-search-input dshadv-search",
65318
+ type: "search",
65319
+ value: query,
65320
+ placeholder: t("search"),
65321
+ "aria-label": t("search"),
65322
+ onChange: (event) => setQuery(event.target.value)
65323
+ })
65324
+ })
65325
+ }),
65326
+ directory.status === "loading" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { children: t("loading") }),
65327
+ visibleGroups.length === 0 && directory.status !== "loading" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { children: t("empty") }),
65328
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
65329
+ className: "dshadv-list dsh-claude-model-sub-body",
65330
+ children: visibleGroups.map((group) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", {
65331
+ className: "dsh-claude-model-group-section",
65332
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
65333
+ className: "dsh-claude-model-rule dshadv-group",
65334
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
65335
+ className: "dsh-claude-model-rule-name",
65336
+ children: group.name
65337
+ })
65338
+ }), group.models.map((model) => {
65339
+ const checked = selection?.provider === group.id && selection?.model === model.id;
65340
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
65341
+ type: "button",
65342
+ role: "menuitemradio",
65343
+ "aria-label": `${group.name}: ${model.name}`,
65344
+ "aria-checked": checked,
65345
+ className: "dshadv-choice dsh-claude-popover-item dsh-claude-model-option",
65346
+ disabled: locked || pending,
65347
+ onClick: () => update({ selection: {
65348
+ provider: group.id,
65349
+ model: model.id,
65350
+ reasoningEffort: model.reasoning?.defaultEffort
65351
+ } }),
65352
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
65353
+ className: "dsh-claude-model-name dshadv-choice-label",
65354
+ children: model.name
65355
+ }), checked && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
65356
+ className: "dsh-claude-popover-check",
65357
+ "aria-label": t("enabled"),
65358
+ children: "✓"
65359
+ })]
65360
+ }, model.id);
65361
+ })]
65362
+ }, group.id))
65363
+ })
65364
+ ]
65365
+ });
65366
+ }
65367
+ //#endregion
65368
+ //#region src/client/features/advisor/styles.ts
65369
+ const CSS$2 = `
65370
+ .dshadv-trigger{align-items:center;background:transparent;border:0;border-radius:14px;color:var(--dsw-alias-label-secondary,#b8b8b8);cursor:pointer;display:inline-flex;font:inherit;font-size:13px;gap:0;height:28px;max-width:200px;padding:0 4px;white-space:nowrap}
65371
+ .dshadv-trigger:hover{background:var(--dsw-alias-interactive-bg-hover,rgba(127,127,127,.18));color:var(--dsw-alias-label-primary,#e8e8e8)}
65372
+ .dshadv-trigger:disabled{cursor:default;opacity:.5}
65373
+ .dshadv-trigger-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
65374
+ .dshadv-trigger[data-enabled=true]{color:var(--dsw-alias-brand-primary,#397ee8)}
65375
+ .dshadv-effort-trigger{background:transparent;border:0;border-radius:14px;color:var(--dsw-alias-label-secondary,#b8b8b8);cursor:pointer;font:inherit;font-size:13px;height:28px;padding:0 4px;white-space:nowrap}.dshadv-effort-trigger:hover{background:var(--dsw-alias-interactive-bg-hover,rgba(127,127,127,.18));color:var(--dsw-alias-label-primary,#e8e8e8)}.dshadv-effort-trigger:disabled{cursor:default;opacity:.5}.dshadv-effort-popover{padding:8px 6px 6px}.dshadv-popover{background:var(--dsw-alias-bg-overlay,#242422);border:1px solid var(--dsw-alias-border-secondary,rgba(127,127,127,.28));border-radius:10px;box-shadow:0 12px 36px rgba(0,0,0,.32);box-sizing:border-box;display:flex;flex-direction:column;overflow:hidden;transform-origin:bottom right;z-index:2147482000;animation:dshadv-pop-in 160ms cubic-bezier(.22,.61,.36,1)}@keyframes dshadv-pop-in{from{opacity:0;transform:scale(.96) translateY(4px)}to{opacity:1;transform:none}}@media(prefers-reduced-motion:reduce){.dshadv-effort-fill,.dshadv-effort-knob{transition:none}.dshadv-popover{animation:none}}
65376
+ .dshadv-off-hint{color:var(--dsw-alias-label-tertiary,#9a9a9a);font-size:12px;margin:10px 12px;text-align:center}.dshadv-popover-head{align-items:center;border-bottom:1px solid var(--dsw-alias-border-secondary,rgba(127,127,127,.18));display:flex;flex:none;gap:8px;justify-content:space-between;padding:9px 12px}
65377
+ .dshadv-popover-title{color:var(--dsw-alias-label-primary,#e8e8e8);font-size:13px;font-weight:500}
65378
+ .dshadv-popover-foot{border-top:1px solid var(--dsw-alias-border-secondary,rgba(127,127,127,.18));flex:none;padding:2px 4px 8px}
65379
+ .dshadv-switch{appearance:none;background:var(--dsw-specific-selector,rgba(127,127,127,.2));border:0;border-radius:9px;cursor:pointer;flex:none;height:18px;padding:2px;width:30px}
65380
+ .dshadv-switch:before{background:var(--dsw-alias-bg-overlay,#fff);border-radius:50%;content:'';display:block;height:14px;transition:transform .15s;width:14px}
65381
+ .dshadv-switch[aria-checked=true]{background:var(--dsw-alias-brand-primary,#397ee8)}
65382
+ .dshadv-switch[aria-checked=true]:before{transform:translateX(12px)}
65383
+ .dshadv-pane{box-sizing:border-box;flex:1 1 auto;min-height:0;overflow:auto;padding:6px}
65384
+ .dshadv-search{background:var(--dsw-alias-bg-primary,rgba(0,0,0,.25));border:1px solid var(--dsw-alias-border-secondary,rgba(127,127,127,.28));border-radius:6px;box-sizing:border-box;color:var(--dsw-alias-label-primary,#e8e8e8);font:inherit;margin-bottom:6px;padding:7px 9px;width:100%}
65385
+ .dshadv-group{color:var(--dsw-alias-label-tertiary,#9a9a9a);font-size:11px;font-weight:500;margin:8px 8px 4px}
65386
+ .dshadv-choice{align-items:center;background:transparent;border:0;border-radius:6px;box-sizing:border-box;color:var(--dsw-alias-label-primary,#e8e8e8);cursor:pointer;display:flex;font:inherit;font-size:13px;gap:8px;justify-content:space-between;line-height:20px;min-height:30px;padding:0 8px;text-align:left;width:100%}
65387
+ .dshadv-choice:hover{background:var(--dsw-alias-interactive-bg-hover,rgba(127,127,127,.18))}
65388
+ .dshadv-choice:disabled{cursor:default;opacity:.55}
65389
+ .dshadv-choice[aria-checked=true]{color:var(--dsw-alias-brand-primary,#397ee8)}
65390
+ .dshadv-effort{margin-top:0;padding:2px 2px 0;--dshadv-effort-tint:0}
65391
+ .dshadv-effort-tinted{--dshadv-ramp:color-mix(in oklch,var(--dsw-alias-brand-primary,#397ee8),var(--dsw-alias-label-primary,#e8e8e8) calc(var(--dshadv-effort-tint)*1%))}
65392
+ .dshadv-effort-head{display:flex;align-items:baseline;gap:6px;font-size:11px;margin-bottom:4px}
65393
+ .dshadv-effort-label{color:var(--dsw-alias-label-secondary,#b8b8b8)}
65394
+ .dshadv-effort-value{color:var(--dshadv-ramp,var(--dsw-alias-label-primary,#e8e8e8));transition:color 200ms ease}
65395
+ .dshadv-effort-track{position:relative;height:30px;margin-top:1px;cursor:pointer;touch-action:none}
65396
+ .dshadv-effort-track:before{background:var(--dsw-alias-interactive-bg-hover,rgba(127,127,127,.22));border-radius:8px;bottom:50%;content:'';height:26px;margin-bottom:-13px;left:0;position:absolute;right:0}
65397
+ .dshadv-effort-fill{background:var(--dshadv-ramp,var(--dsw-alias-brand-primary,#397ee8));border-radius:8px 0 0 8px;bottom:50%;height:26px;left:0;margin-bottom:-13px;position:absolute;transition:width 220ms cubic-bezier(.22,.61,.36,1),background 200ms ease;pointer-events:none}
65398
+ .dshadv-effort-ticks{inset:0;position:absolute;pointer-events:none}
65399
+ .dshadv-effort-tick{background:color-mix(in srgb,var(--dsw-alias-label-primary,#e8e8e8) 30%,transparent);border-radius:50%;height:4px;margin-top:-2px;position:absolute;top:50%;transform:translateX(-50%);width:4px}
65400
+ .dshadv-effort-knob{background:#fff;border-radius:5px;box-shadow:0 1px 3px rgba(0,0,0,.45);height:30px;left:0;position:absolute;top:50%;margin-top:-15px;transition:transform 220ms cubic-bezier(.22,.61,.36,1),background-color 200ms ease,box-shadow 200ms ease;width:16px;will-change:transform}
65401
+ .dshadv-effort[data-dragging] .dshadv-effort-knob{transition:background-color 200ms ease,box-shadow 200ms ease}
65402
+ .dshadv-effort[data-dragging] .dshadv-effort-fill{transition:background 200ms ease}
65403
+ .dshadv-effort[data-apex] .dshadv-effort-fill,.dshadv-effort[data-apex] .dshadv-effort-ticks{opacity:0}
65404
+ .dshadv-effort[data-apex] .dshadv-effort-track:before{background-color:transparent;background-image:radial-gradient(circle at 2px 2px,color-mix(in srgb,var(--dsw-alias-brand-primary,#397ee8) 85%,transparent) 1.6px,transparent 2px),radial-gradient(circle at 2px 2px,color-mix(in srgb,var(--dsw-alias-brand-primary,#397ee8) 45%,transparent) 1.6px,transparent 2px);background-position:0 0,14px 7px;background-size:14px 13px;box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--dsw-alias-brand-primary,#397ee8) 25%,transparent),0 0 10px color-mix(in srgb,var(--dsw-alias-brand-primary,#397ee8) 35%,transparent);animation:dshadv-apex-flow 2.4s linear infinite}
65405
+ .dshadv-effort[data-apex] .dshadv-effort-knob{background-color:color-mix(in srgb,var(--dsw-alias-brand-primary,#397ee8) 24%,#fff);box-shadow:0 0 12px color-mix(in srgb,var(--dsw-alias-brand-primary,#397ee8) 80%,transparent),0 0 0 1px color-mix(in srgb,var(--dsw-alias-brand-primary,#397ee8) 38%,transparent)}
65406
+ .dshadv-effort[data-apex] .dshadv-effort-value{color:color-mix(in srgb,var(--dsw-alias-brand-primary,#397ee8) 65%,var(--dsw-alias-label-primary,#e8e8e8))}
65407
+ @keyframes dshadv-apex-flow{from{background-position:0 0,14px 7px}to{background-position:14px 0,28px 7px}}
65408
+ @media(prefers-reduced-motion:reduce){.dshadv-effort[data-apex] .dshadv-effort-track:before{animation:none}}
65409
+ .dshadv-popover-head{align-items:center;border-bottom:1px solid var(--dsw-alias-border-secondary,rgba(127,127,127,.18));display:flex;flex:none;gap:8px;justify-content:space-between;padding:9px 12px}
65410
+ .dshadv-popover-title{color:var(--dsw-alias-label-primary,#e8e8e8);font-size:13px;font-weight:500}
65411
+ .dshadv-popover-foot{border-top:1px solid var(--dsw-alias-border-secondary,rgba(127,127,127,.18));flex:none;padding:2px 4px 8px}
65412
+ .dshadv-switch{appearance:none;background:var(--dsw-specific-selector,rgba(127,127,127,.2));border:0;border-radius:9px;cursor:pointer;flex:none;height:18px;padding:2px;width:30px}
65413
+ .dshadv-switch:before{background:var(--dsw-alias-bg-overlay,#fff);border-radius:50%;content:'';display:block;height:14px;transition:transform .15s;width:14px}
65414
+ .dshadv-switch[aria-checked=true]{background:var(--dsw-alias-brand-primary,#397ee8)}
65415
+ .dshadv-switch[aria-checked=true]:before{transform:translateX(12px)}
65416
+ .dshadv-pane{box-sizing:border-box;flex:1 1 auto;min-height:0;overflow:auto;padding:6px}
65417
+ .dshadv-search{background:var(--dsw-alias-bg-primary,rgba(0,0,0,.25));border:1px solid var(--dsw-alias-border-secondary,rgba(127,127,127,.28));border-radius:6px;box-sizing:border-box;color:var(--dsw-alias-label-primary,#e8e8e8);font:inherit;margin-bottom:6px;padding:7px 9px;width:100%}
65418
+ .dshadv-group{color:var(--dsw-alias-label-tertiary,#9a9a9a);font-size:11px;font-weight:500;margin:8px 8px 4px}
65419
+ .dshadv-choice{align-items:center;background:transparent;border:0;border-radius:6px;box-sizing:border-box;color:var(--dsw-alias-label-primary,#e8e8e8);cursor:pointer;display:flex;font:inherit;font-size:13px;gap:8px;justify-content:space-between;line-height:20px;min-height:30px;padding:0 8px;text-align:left;width:100%}
65420
+ .dshadv-choice:hover{background:var(--dsw-alias-interactive-bg-hover,rgba(127,127,127,.18))}
65421
+ .dshadv-choice:disabled{cursor:default;opacity:.55}
65422
+ .dshadv-choice[aria-checked=true]{color:var(--dsw-alias-brand-primary,#397ee8)}
65423
+ .dshadv-effort{margin-top:0;padding:2px 2px 0;--dshadv-effort-tint:0}
65424
+ .dshadv-effort-tinted{--dshadv-ramp:color-mix(in oklch,var(--dsw-alias-brand-primary,#397ee8),var(--dsw-alias-label-primary,#e8e8e8) calc(var(--dshadv-effort-tint)*1%))}
65425
+ .dshadv-effort-head{display:flex;align-items:baseline;gap:6px;font-size:11px;margin-bottom:4px}
65426
+ .dshadv-effort-label{color:var(--dsw-alias-label-secondary,#b8b8b8)}
65427
+ .dshadv-effort-value{color:var(--dshadv-ramp,var(--dsw-alias-label-primary,#e8e8e8));transition:color 200ms ease}
65428
+ .dshadv-effort-track{position:relative;height:30px;margin-top:1px;cursor:pointer;touch-action:none}
65429
+ .dshadv-effort-track:before{background:var(--dsw-alias-interactive-bg-hover,rgba(127,127,127,.22));border-radius:8px;bottom:50%;content:'';height:26px;margin-bottom:-13px;left:0;position:absolute;right:0}
65430
+ .dshadv-effort-fill{background:var(--dshadv-ramp,var(--dsw-alias-brand-primary,#397ee8));border-radius:8px 0 0 8px;bottom:50%;height:26px;left:0;margin-bottom:-13px;position:absolute;transition:width 220ms cubic-bezier(.22,.61,.36,1),background 200ms ease;pointer-events:none}
65431
+ .dshadv-effort-ticks{inset:0;position:absolute;pointer-events:none}
65432
+ .dshadv-effort-tick{background:color-mix(in srgb,var(--dsw-alias-label-primary,#e8e8e8) 30%,transparent);border-radius:50%;height:4px;margin-top:-2px;position:absolute;top:50%;transform:translateX(-50%);width:4px}
65433
+ .dshadv-effort-knob{background:#fff;border-radius:5px;box-shadow:0 1px 3px rgba(0,0,0,.45);height:30px;left:0;position:absolute;top:50%;margin-top:-15px;transition:transform 220ms cubic-bezier(.22,.61,.36,1),background-color 200ms ease,box-shadow 200ms ease;width:16px;will-change:transform}
65434
+ .dshadv-effort[data-dragging] .dshadv-effort-knob{transition:background-color 200ms ease,box-shadow 200ms ease}
65435
+ .dshadv-effort[data-dragging] .dshadv-effort-fill{transition:background 200ms ease}
65436
+ .dshadv-effort[data-apex] .dshadv-effort-fill,.dshadv-effort[data-apex] .dshadv-effort-ticks{opacity:0}
65437
+ .dshadv-effort[data-apex] .dshadv-effort-track:before{background:linear-gradient(90deg,color-mix(in srgb,var(--dsw-alias-brand-primary,#397ee8) 70%,transparent),color-mix(in srgb,var(--dsw-alias-brand-primary,#397ee8) 30%,transparent),color-mix(in srgb,var(--dsw-alias-brand-primary,#397ee8) 70%,transparent));background-size:220% 100%;animation:dshadv-apex-flow 2.6s linear infinite;box-shadow:0 0 10px color-mix(in srgb,var(--dsw-alias-brand-primary,#397ee8) 45%,transparent)}
65438
+ .dshadv-effort[data-apex] .dshadv-effort-knob{background-color:color-mix(in srgb,var(--dsw-alias-brand-primary,#397ee8) 24%,#fff);box-shadow:0 0 12px color-mix(in srgb,var(--dsw-alias-brand-primary,#397ee8) 80%,transparent),0 0 0 1px color-mix(in srgb,var(--dsw-alias-brand-primary,#397ee8) 38%,transparent)}
65439
+ .dshadv-effort[data-apex] .dshadv-effort-value{color:color-mix(in srgb,var(--dsw-alias-brand-primary,#397ee8) 70%,var(--dsw-alias-label-primary,#e8e8e8))}
65440
+ @keyframes dshadv-apex-flow{from{background-position:0% 0}to{background-position:220% 0}}
65441
+ @media(prefers-reduced-motion:reduce){.dshadv-effort[data-apex] .dshadv-effort-track:before{animation:none}}
65442
+ .dshadv-effort-ends{color:var(--dsw-alias-label-tertiary,#9a9a9a);display:flex;font-size:10px;justify-content:space-between;margin-top:2px}
65443
+ .dshadv-effort [role=slider][aria-disabled=true]{opacity:.5;pointer-events:none}
65444
+ `;
65445
+ function installAdvisorStyles() {
65446
+ return installPluginStyle("advisor", CSS$2, "dsh-advisor-style");
64201
65447
  }
64202
65448
  //#endregion
64203
65449
  //#region src/client/providers/claude-api/styles.ts
@@ -66691,7 +67937,7 @@ window.__ModuleLoader__.load({
66691
67937
  /** 头部围栏的开场标记。 */
66692
67938
  const MANDATE_FENCE = "```dsh-mandate-v2";
66693
67939
  function fallbackTranslate$1(key) {
66694
- return zh$4[key];
67940
+ return zh$5[key];
66695
67941
  }
66696
67942
  function firstLine$1(text) {
66697
67943
  const nl = text.indexOf("\n");
@@ -67551,7 +68797,7 @@ window.__ModuleLoader__.load({
67551
68797
  * @module @eddyskywalker/dsh-chatgpt-subscription/client/codemode/CodeRunToolView
67552
68798
  */
67553
68799
  function fallbackTranslate(key) {
67554
- return zh$23[key] ?? key;
68800
+ return zh$24[key] ?? key;
67555
68801
  }
67556
68802
  function firstLine(text) {
67557
68803
  const nl = text.indexOf("\n");
@@ -69109,7 +70355,7 @@ window.__ModuleLoader__.load({
69109
70355
  * panel hides the section automatically.
69110
70356
  */
69111
70357
  function SessionQuotaSection(props) {
69112
- const dict = useLineDict(NS_SESSION_QUOTA, zh$1);
70358
+ const dict = useLineDict(NS_SESSION_QUOTA, zh$2);
69113
70359
  if (!props.directory) return null;
69114
70360
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SessionQuotaSectionBody, {
69115
70361
  directory: props.directory,
@@ -69222,7 +70468,7 @@ window.__ModuleLoader__.load({
69222
70468
  * folded (`conversation.session.panel.section.actions`).
69223
70469
  */
69224
70470
  function SessionQuotaReading(props) {
69225
- const dict = useLineDict(NS_SESSION_QUOTA, zh$1);
70471
+ const dict = useLineDict(NS_SESSION_QUOTA, zh$2);
69226
70472
  if (!props.directory) return null;
69227
70473
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SessionQuotaReadingBody, {
69228
70474
  directory: props.directory,
@@ -69271,7 +70517,7 @@ window.__ModuleLoader__.load({
69271
70517
  name: SECTION_SLOT,
69272
70518
  id: SESSION_QUOTA_SECTION_ID,
69273
70519
  order: 35,
69274
- label: () => typeof t === "function" ? t("sectionTitle") : zh$1.sectionTitle,
70520
+ label: () => typeof t === "function" ? t("sectionTitle") : zh$2.sectionTitle,
69275
70521
  locale: NS_SESSION_QUOTA,
69276
70522
  inject: (sessionId) => injectSessionSeats(ctx, sessionId)
69277
70523
  }, SessionQuotaSection);
@@ -69361,102 +70607,104 @@ window.__ModuleLoader__.load({
69361
70607
  installLineLocale(ctx.locale);
69362
70608
  ctx.effect(() => installHostLocaleMirror(ctx.locale), "dsh-chatgpt-subscription: host locale mirror");
69363
70609
  installRussianLocale(ctx);
69364
- ctx.effect(() => ctx.locale.register(NS, dictionaries$23), "dsh-chatgpt-subscription: dictionaries");
70610
+ ctx.effect(() => ctx.locale.register(NS, dictionaries$24), "dsh-chatgpt-subscription: dictionaries");
69365
70611
  ctx.effect(() => installStyles(), "dsh-chatgpt-subscription: styles");
69366
70612
  ctx.effect(() => {
69367
70613
  installHubStyles();
69368
70614
  installModelChecklistStyles();
69369
70615
  return () => {};
69370
70616
  }, "dsh-chatgpt-subscription: hub styles");
69371
- ctx.effect(() => ctx.locale.register(NS_MODEL_CHECKLIST, dictionaries$22), "dsh-model-checklist: dictionaries");
69372
- ctx.effect(() => ctx.locale.register(NS_CLAUDE, dictionaries$17), "dsh-claude: dictionaries");
70617
+ ctx.effect(() => ctx.locale.register(NS_MODEL_CHECKLIST, dictionaries$23), "dsh-model-checklist: dictionaries");
70618
+ ctx.effect(() => ctx.locale.register(NS_CLAUDE, dictionaries$18), "dsh-claude: dictionaries");
69373
70619
  ctx.effect(() => {
69374
70620
  installClaudeStyles();
69375
70621
  return () => {};
69376
70622
  }, "dsh-claude: styles");
69377
- ctx.effect(() => ctx.locale.register(NS_COMMAND_CODE, dictionaries$21), "dsh-command-code: dictionaries");
69378
- ctx.effect(() => ctx.locale.register(NS_KIMI_CODE, dictionaries$20), "dsh-kimi-code: dictionaries");
70623
+ ctx.effect(() => ctx.locale.register(NS_COMMAND_CODE, dictionaries$22), "dsh-command-code: dictionaries");
70624
+ ctx.effect(() => ctx.locale.register(NS_KIMI_CODE, dictionaries$21), "dsh-kimi-code: dictionaries");
69379
70625
  ctx.effect(() => {
69380
70626
  installKimiCodeStyles();
69381
70627
  return () => {};
69382
70628
  }, "dsh-kimi-code: styles");
69383
- ctx.effect(() => ctx.locale.register(NS_MINIMAX_CODE, dictionaries$19), "dsh-minimax-code: dictionaries");
70629
+ ctx.effect(() => ctx.locale.register(NS_MINIMAX_CODE, dictionaries$20), "dsh-minimax-code: dictionaries");
69384
70630
  ctx.effect(() => {
69385
70631
  installMinimaxCodeStyles();
69386
70632
  return () => {};
69387
70633
  }, "dsh-minimax-code: styles");
69388
- ctx.effect(() => ctx.locale.register(NS_GLM_CODING_PLAN, dictionaries$18), "dsh-glm-coding-plan: dictionaries");
70634
+ ctx.effect(() => ctx.locale.register(NS_GLM_CODING_PLAN, dictionaries$19), "dsh-glm-coding-plan: dictionaries");
69389
70635
  ctx.effect(() => {
69390
70636
  installGlmCodingPlanStyles();
69391
70637
  return () => {};
69392
70638
  }, "dsh-glm-coding-plan: styles");
69393
- ctx.effect(() => ctx.locale.register(NS_OLLAMA, dictionaries$16), "dsh-ollama: dictionaries");
69394
- ctx.effect(() => ctx.locale.register(NS_ANTIGRAVITY_ACP, dictionaries$15), "dsh-antigravity-acp: dictionaries");
70639
+ ctx.effect(() => ctx.locale.register(NS_OLLAMA, dictionaries$17), "dsh-ollama: dictionaries");
70640
+ ctx.effect(() => ctx.locale.register(NS_ANTIGRAVITY_ACP, dictionaries$16), "dsh-antigravity-acp: dictionaries");
69395
70641
  ctx.effect(() => {
69396
70642
  installAntigravityAcpStyles();
69397
70643
  return () => {};
69398
70644
  }, "dsh-antigravity-acp: styles");
69399
- ctx.effect(() => ctx.locale.register(NS_PROGRESS_UPDATES, dictionaries$3), "dsh-progress-updates: dictionaries");
70645
+ ctx.effect(() => ctx.locale.register(NS_PROGRESS_UPDATES, dictionaries$4), "dsh-progress-updates: dictionaries");
69400
70646
  ctx.effect(() => {
69401
70647
  installProgressUpdatesStyles();
69402
70648
  return () => {};
69403
70649
  }, "dsh-progress-updates: styles");
69404
- ctx.effect(() => ctx.locale.register(NS_STEP_CODE, dictionaries$12), "dsh-step-code: dictionaries");
70650
+ ctx.effect(() => ctx.locale.register(NS_STEP_CODE, dictionaries$13), "dsh-step-code: dictionaries");
69405
70651
  ctx.effect(() => {
69406
70652
  installStepCodeStyles();
69407
70653
  return () => {};
69408
70654
  }, "dsh-step-code: styles");
69409
- ctx.effect(() => ctx.locale.register(NS_CLINE_PASS, dictionaries$11), "dsh-cline-pass: dictionaries");
70655
+ ctx.effect(() => ctx.locale.register(NS_CLINE_PASS, dictionaries$12), "dsh-cline-pass: dictionaries");
69410
70656
  ctx.effect(() => {
69411
70657
  installClinePassStyles();
69412
70658
  return () => {};
69413
70659
  }, "dsh-cline-pass: styles");
69414
- ctx.effect(() => ctx.locale.register(NS_QODER, dictionaries$10), "dsh-qoder: dictionaries");
70660
+ ctx.effect(() => ctx.locale.register(NS_QODER, dictionaries$11), "dsh-qoder: dictionaries");
69415
70661
  ctx.effect(() => {
69416
70662
  installQoderStyles();
69417
70663
  return () => {};
69418
70664
  }, "dsh-qoder: styles");
69419
- ctx.effect(() => ctx.locale.register(NS_OPENDESIGN, dictionaries$9), "dsh-opendesign: dictionaries");
70665
+ ctx.effect(() => ctx.locale.register(NS_OPENDESIGN, dictionaries$10), "dsh-opendesign: dictionaries");
69420
70666
  ctx.effect(() => {
69421
70667
  installOpenDesignStyles();
69422
70668
  return () => {};
69423
70669
  }, "dsh-opendesign: styles");
69424
- ctx.effect(() => ctx.locale.register(NS_WORKBUDDY, dictionaries$8), "dsh-workbuddy: dictionaries");
70670
+ ctx.effect(() => ctx.locale.register(NS_WORKBUDDY, dictionaries$9), "dsh-workbuddy: dictionaries");
69425
70671
  ctx.effect(() => {
69426
70672
  installWorkBuddyStyles();
69427
70673
  return () => {};
69428
70674
  }, "dsh-workbuddy: styles");
69429
- ctx.effect(() => ctx.locale.register(NS_QIANWEN, dictionaries$7), "dsh-qianwen-token-plan: dictionaries");
70675
+ ctx.effect(() => ctx.locale.register(NS_QIANWEN, dictionaries$8), "dsh-qianwen-token-plan: dictionaries");
69430
70676
  ctx.effect(() => {
69431
70677
  installQianwenStyles();
69432
70678
  return () => {};
69433
70679
  }, "dsh-qianwen-token-plan: styles");
69434
- ctx.effect(() => ctx.locale.register(NS_RELAYONE, dictionaries$6), "dsh-relayone: dictionaries");
70680
+ ctx.effect(() => ctx.locale.register(NS_RELAYONE, dictionaries$7), "dsh-relayone: dictionaries");
69435
70681
  ctx.effect(() => {
69436
70682
  installRelayOneStyles();
69437
70683
  return () => {};
69438
70684
  }, "dsh-relayone: styles");
69439
- ctx.effect(() => ctx.locale.register(NS_COMPACT_AFTER_TURN, dictionaries$2), "dsh-compact-after-turn: dictionaries");
70685
+ ctx.effect(() => ctx.locale.register(NS_COMPACT_AFTER_TURN, dictionaries$3), "dsh-compact-after-turn: dictionaries");
69440
70686
  ctx.effect(() => installCompactAfterTurnStyles(), "dsh-compact-after-turn: styles");
69441
- ctx.effect(() => ctx.locale.register(NS_SESSION_QUOTA, dictionaries$1), "dsh-session-quota: dictionaries");
70687
+ ctx.effect(() => ctx.locale.register(NS_ADVISOR, dictionaries$1), "dsh-advisor: dictionaries");
70688
+ ctx.effect(() => installAdvisorStyles(), "dsh-advisor: styles");
70689
+ ctx.effect(() => ctx.locale.register(NS_SESSION_QUOTA, dictionaries$2), "dsh-session-quota: dictionaries");
69442
70690
  ctx.effect(() => installSessionQuotaStyles(), "dsh-session-quota: styles");
69443
- ctx.effect(() => ctx.locale.register(NS_CLAUDE_API, dictionaries$5), "dsh-claude-api: dictionaries");
70691
+ ctx.effect(() => ctx.locale.register(NS_CLAUDE_API, dictionaries$6), "dsh-claude-api: dictionaries");
69444
70692
  ctx.effect(() => {
69445
70693
  installClaudeApiStyles();
69446
70694
  return () => {};
69447
70695
  }, "dsh-claude-api: styles");
69448
- ctx.effect(() => ctx.locale.register(NS_AWS_QUICK, dictionaries$14), "dsh-aws-quick: dictionaries");
70696
+ ctx.effect(() => ctx.locale.register(NS_AWS_QUICK, dictionaries$15), "dsh-aws-quick: dictionaries");
69449
70697
  ctx.effect(() => {
69450
70698
  installAwsQuickStyles();
69451
70699
  return () => {};
69452
70700
  }, "dsh-aws-quick: styles");
69453
- ctx.effect(() => ctx.locale.register(NS_OPENCODE_GO, dictionaries$13), "dsh-opencode-go: dictionaries");
70701
+ ctx.effect(() => ctx.locale.register(NS_OPENCODE_GO, dictionaries$14), "dsh-opencode-go: dictionaries");
69454
70702
  ctx.effect(() => {
69455
70703
  installOpenCodeGoStyles();
69456
70704
  return () => {};
69457
70705
  }, "dsh-opencode-go: styles");
69458
70706
  ctx.effect(() => ctx.locale.register(NS_SUBAGENT, dictionaries), "dsh-subagent-settings: dictionaries");
69459
- ctx.effect(() => ctx.locale.register(NS_DISPATCH_LEDGER, dictionaries$4), "dsh-dispatch-ledger: dictionaries");
70707
+ ctx.effect(() => ctx.locale.register(NS_DISPATCH_LEDGER, dictionaries$5), "dsh-dispatch-ledger: dictionaries");
69460
70708
  ctx.effect(() => {
69461
70709
  installSubagentStyles();
69462
70710
  return () => {};
@@ -69606,6 +70854,40 @@ window.__ModuleLoader__.load({
69606
70854
  return () => {};
69607
70855
  }
69608
70856
  });
70857
+ ctx.slots.inject("conversation.input.right", () => {
70858
+ try {
70859
+ const inject = (sessionId) => {
70860
+ const directory = ctx.modelDirectories.directoryFor(sessionId);
70861
+ return {
70862
+ sessionId: String(sessionId),
70863
+ directory: directory.store,
70864
+ load: () => {
70865
+ directory.load().catch(() => void 0);
70866
+ }
70867
+ };
70868
+ };
70869
+ const modelRow = ctx.slots.register({
70870
+ name: "conversation.input.right",
70871
+ id: "advisor-model",
70872
+ order: 52,
70873
+ locale: NS_ADVISOR,
70874
+ inject
70875
+ }, AdvisorModelTrigger);
70876
+ const effortRow = ctx.slots.register({
70877
+ name: "conversation.input.right",
70878
+ id: "advisor-effort",
70879
+ order: 53,
70880
+ locale: NS_ADVISOR,
70881
+ inject
70882
+ }, AdvisorEffortTrigger);
70883
+ return () => {
70884
+ effortRow();
70885
+ modelRow();
70886
+ };
70887
+ } catch {
70888
+ return () => {};
70889
+ }
70890
+ });
69609
70891
  ctx.slots.inject("tool.call.toolview", () => ctx.slots.register({
69610
70892
  name: "tool.call.toolview",
69611
70893
  key: CODEX_IMAGE_TOOL_NAME,