@eddyskywalker/dsh-chatgpt-subscription 0.86.0 → 0.88.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 (96) hide show
  1. package/README.md +1 -0
  2. package/lib/client.js +1413 -354
  3. package/lib/client.js.map +1 -1
  4. package/lib/codemode.js +6 -5
  5. package/lib/index.js +5864 -2219
  6. package/lib/{tool-result-pruner-CIZ8RtkC.js → tool-result-pruner-Dy6X17gv.js} +3 -3
  7. package/lib/tool-result-pruner.js +1 -1
  8. package/lib/types/client/common/model-checklist-labels.d.ts +1 -1
  9. package/lib/types/client/features/progress-updates/locales.d.ts +3 -3
  10. package/lib/types/client/features/session-quota/adapters.d.ts +4 -0
  11. package/lib/types/client/features/session-quota/adapters.d.ts.map +1 -1
  12. package/lib/types/client/hub/HubOverview.d.ts +1 -1
  13. package/lib/types/client/hub/HubOverview.d.ts.map +1 -1
  14. package/lib/types/client/hub/HubProviderRow.d.ts +4 -0
  15. package/lib/types/client/hub/HubProviderRow.d.ts.map +1 -1
  16. package/lib/types/client/hub/brand-icons.d.ts +1 -1
  17. package/lib/types/client/hub/brand-icons.d.ts.map +1 -1
  18. package/lib/types/client/hub/hub-styles.d.ts.map +1 -1
  19. package/lib/types/client/hub/providers.d.ts.map +1 -1
  20. package/lib/types/client/index.d.ts +2 -0
  21. package/lib/types/client/index.d.ts.map +1 -1
  22. package/lib/types/client/locales-ru/hub.d.ts.map +1 -1
  23. package/lib/types/client/locales-ru/index.d.ts.map +1 -1
  24. package/lib/types/client/locales-ru/opencode-go.d.ts +3 -0
  25. package/lib/types/client/locales-ru/opencode-go.d.ts.map +1 -0
  26. package/lib/types/client/providers/codex-chatgpt/locales.d.ts +3 -1
  27. package/lib/types/client/providers/codex-chatgpt/locales.d.ts.map +1 -1
  28. package/lib/types/client/providers/opencode-go/OpenCodeGoComposerQuota.d.ts +14 -0
  29. package/lib/types/client/providers/opencode-go/OpenCodeGoComposerQuota.d.ts.map +1 -0
  30. package/lib/types/client/providers/opencode-go/OpenCodeGoQuotaCard.d.ts +12 -0
  31. package/lib/types/client/providers/opencode-go/OpenCodeGoQuotaCard.d.ts.map +1 -0
  32. package/lib/types/client/providers/opencode-go/OpenCodeGoSection.d.ts +8 -0
  33. package/lib/types/client/providers/opencode-go/OpenCodeGoSection.d.ts.map +1 -0
  34. package/lib/types/client/providers/opencode-go/locales.d.ts +318 -0
  35. package/lib/types/client/providers/opencode-go/locales.d.ts.map +1 -0
  36. package/lib/types/client/providers/opencode-go/styles.d.ts +4 -0
  37. package/lib/types/client/providers/opencode-go/styles.d.ts.map +1 -0
  38. package/lib/types/compat.d.ts +1 -1
  39. package/lib/types/host/common/account-pool.d.ts +17 -7
  40. package/lib/types/host/common/account-pool.d.ts.map +1 -1
  41. package/lib/types/host/common/model-request-control.d.ts +1 -1
  42. package/lib/types/host/common/model-request-control.d.ts.map +1 -1
  43. package/lib/types/host/common/prompt-cache-policy.d.ts.map +1 -1
  44. package/lib/types/host/common/request-diagnostics.d.ts +1 -1
  45. package/lib/types/host/common/request-diagnostics.d.ts.map +1 -1
  46. package/lib/types/host/providers/minimax-code/media-files.d.ts +29 -0
  47. package/lib/types/host/providers/minimax-code/media-files.d.ts.map +1 -0
  48. package/lib/types/host/providers/minimax-code/media-tool.d.ts +20 -0
  49. package/lib/types/host/providers/minimax-code/media-tool.d.ts.map +1 -0
  50. package/lib/types/host/providers/opencode-go/account-pool.d.ts +50 -0
  51. package/lib/types/host/providers/opencode-go/account-pool.d.ts.map +1 -0
  52. package/lib/types/host/providers/opencode-go/adapter.d.ts +36 -0
  53. package/lib/types/host/providers/opencode-go/adapter.d.ts.map +1 -0
  54. package/lib/types/host/providers/opencode-go/client.d.ts +13 -0
  55. package/lib/types/host/providers/opencode-go/client.d.ts.map +1 -0
  56. package/lib/types/host/providers/opencode-go/mapper-gemini.d.ts +13 -0
  57. package/lib/types/host/providers/opencode-go/mapper-gemini.d.ts.map +1 -0
  58. package/lib/types/host/providers/opencode-go/mapper-messages.d.ts +8 -0
  59. package/lib/types/host/providers/opencode-go/mapper-messages.d.ts.map +1 -0
  60. package/lib/types/host/providers/opencode-go/mapper-responses.d.ts +9 -0
  61. package/lib/types/host/providers/opencode-go/mapper-responses.d.ts.map +1 -0
  62. package/lib/types/host/providers/opencode-go/mapper.d.ts +38 -0
  63. package/lib/types/host/providers/opencode-go/mapper.d.ts.map +1 -0
  64. package/lib/types/host/providers/opencode-go/model-catalog.d.ts +57 -0
  65. package/lib/types/host/providers/opencode-go/model-catalog.d.ts.map +1 -0
  66. package/lib/types/host/providers/opencode-go/native-shared.d.ts +31 -0
  67. package/lib/types/host/providers/opencode-go/native-shared.d.ts.map +1 -0
  68. package/lib/types/host/providers/opencode-go/protocol.d.ts +13 -0
  69. package/lib/types/host/providers/opencode-go/protocol.d.ts.map +1 -0
  70. package/lib/types/host/providers/opencode-go/routes.d.ts +13 -0
  71. package/lib/types/host/providers/opencode-go/routes.d.ts.map +1 -0
  72. package/lib/types/host/providers/opencode-go/token-store.d.ts +29 -0
  73. package/lib/types/host/providers/opencode-go/token-store.d.ts.map +1 -0
  74. package/lib/types/host/providers/opencode-go/types.d.ts +20 -0
  75. package/lib/types/host/providers/opencode-go/types.d.ts.map +1 -0
  76. package/lib/types/host/providers/workbuddy/account-pool.d.ts.map +1 -1
  77. package/lib/types/host/runtime/codemode/rules.d.ts +1 -1
  78. package/lib/types/host/runtime/deepseek-v41-flash/index.d.ts +12 -7
  79. package/lib/types/host/runtime/deepseek-v41-flash/index.d.ts.map +1 -1
  80. package/lib/types/host/runtime/deepseek-v41-flash/progress-governor.d.ts +38 -0
  81. package/lib/types/host/runtime/deepseek-v41-flash/progress-governor.d.ts.map +1 -0
  82. package/lib/types/host/runtime/deepseek-v41-flash/state-anchor.d.ts +19 -6
  83. package/lib/types/host/runtime/deepseek-v41-flash/state-anchor.d.ts.map +1 -1
  84. package/lib/types/host/runtime/open-models/state-anchor.d.ts +2 -1
  85. package/lib/types/host/runtime/open-models/state-anchor.d.ts.map +1 -1
  86. package/lib/types/host/runtime/reasoning-collapse-guard/index.d.ts +5 -0
  87. package/lib/types/host/runtime/reasoning-collapse-guard/index.d.ts.map +1 -1
  88. package/lib/types/index.d.ts +8 -2
  89. package/lib/types/index.d.ts.map +1 -1
  90. package/lib/types/shared/contracts.d.ts +1 -1
  91. package/lib/types/shared/contracts.d.ts.map +1 -1
  92. package/lib/types/shared/opencode-go-contracts.d.ts +80 -0
  93. package/lib/types/shared/opencode-go-contracts.d.ts.map +1 -0
  94. package/package.json +1 -1
  95. package/presets/dispatch/README.md +2 -2
  96. package/presets/dispatch/agent.cordis.yml +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$22 = {
614
+ const zh$23 = {
615
615
  ...accountPoolZh,
616
616
  title: "ChatGPT",
617
617
  hubTitle: "订阅服务",
@@ -869,6 +869,7 @@ window.__ModuleLoader__.load({
869
869
  "cardName.relayone": "RelayOne",
870
870
  "cardName.claude-api": "Claude API",
871
871
  "cardName.aws-quick": "AWS Quick",
872
+ "cardName.opencode-go": "OpenCode Go(订阅)",
872
873
  modelChecklistCount: "已启用 {count}/{total}",
873
874
  codeRunTitle: "代码",
874
875
  codeRunOutput: "输出",
@@ -882,8 +883,8 @@ window.__ModuleLoader__.load({
882
883
  codeRunFailed: "失败",
883
884
  codeRunStopped: "已停止"
884
885
  };
885
- const dictionaries$22 = {
886
- zh: zh$22,
886
+ const dictionaries$23 = {
887
+ zh: zh$23,
887
888
  en: {
888
889
  ...accountPoolEn,
889
890
  title: "ChatGPT",
@@ -1142,6 +1143,7 @@ window.__ModuleLoader__.load({
1142
1143
  "cardName.relayone": "RelayOne",
1143
1144
  "cardName.claude-api": "Claude API",
1144
1145
  "cardName.aws-quick": "AWS Quick",
1146
+ "cardName.opencode-go": "OpenCode Go Subscription",
1145
1147
  modelChecklistCount: "{count}/{total} enabled",
1146
1148
  codeRunTitle: "Code",
1147
1149
  codeRunOutput: "Output",
@@ -1267,7 +1269,7 @@ window.__ModuleLoader__.load({
1267
1269
  * reads).
1268
1270
  */
1269
1271
  function LineProxySection({ line, fetchSnapshot, onSave, idPrefix, snapshot: provided }) {
1270
- const labels = useLineDict(NS, zh$22);
1272
+ const labels = useLineDict(NS, zh$23);
1271
1273
  const readSnapshotFromRoute = (0, react.useCallback)(() => (fetchSnapshot ?? (() => fetchLineProxySnapshot("/api/dsh-chatgpt-subscription")))(), [fetchSnapshot]);
1272
1274
  const writePreferences = (0, react.useCallback)((patch) => (onSave ?? ((next) => savePreferences("/api/dsh-chatgpt-subscription", next)))(patch), [onSave]);
1273
1275
  const [readSnapshot, setReadSnapshot] = (0, react.useState)(null);
@@ -1638,6 +1640,13 @@ window.__ModuleLoader__.load({
1638
1640
  fit: "cover"
1639
1641
  },
1640
1642
  tile: "#FFFFFF"
1643
+ },
1644
+ "opencode-go": {
1645
+ image: {
1646
+ src: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAABgCAYAAADimHc4AAABzUlEQVR4AeycQQrCQBAEF1+g6J/0o5LPCXmCnnNx0E2nNqGEPciw024VffV0PZ/fHo7BqflBCSgAxd+aAhQAE4DjbYACYAJwvA1QAEwAjrcBCgAIDBRpA2AZClAATACOtwEKgAnA8TZAATABOD7egNc8tz2ftJ+4gPQD9r5fAbDBDQXALx00XgGwGAUoACYAx9sABcAE4HgboACYABxvAxSwJHC7XFryLNP4bzYg7KBar4CKUHiugDDgar0CKkLhuQLCgKv1CqgIhecKCAOu1iugIhSeKyAMuFqvgIpQeK6AMOBq/XAC7o9H6z5fdlRAtp4PJ2BrAHSeAmADClAATACOtwEKgAnA8TZAATABON4GKAAmAMev2AD4JTuNVwAsTgEKgAnA8TZAATABON4GKAAmAMfbAAXABOB4G9ApoPe6AnoJdt5XQCfA3uvDCXhOU0ueXmBr3x9OwNoPHH2fAmBDClAATACOtwEKgAnA8TZAAX8QONAVGwDLVIACYAJwfLwByf/+2WJ32k9cQPoBe9+vANigAhQAE4DjbYACYAJw/A8NgH/pQeMVAItVgAJgAnC8DVAATACOtwEKgAnA8TZAATABON4GFALS4w8AAAD//x7wkLQAAAAGSURBVAMAKj5LkLSa6SQAAAAASUVORK5CYII=",
1647
+ fit: "contain"
1648
+ },
1649
+ tile: "#FFFFFF"
1641
1650
  }
1642
1651
  };
1643
1652
  /** One brand mark at a given box size; the artwork is decorative. */
@@ -2667,7 +2676,7 @@ window.__ModuleLoader__.load({
2667
2676
  * still override any label through the checklist's `labels` prop.
2668
2677
  */
2669
2678
  const NS_MODEL_CHECKLIST = "dsh-model-checklist";
2670
- const zh$21 = {
2679
+ const zh$22 = {
2671
2680
  allGroups: "全部",
2672
2681
  enabledGroup: "已启用",
2673
2682
  otherGroup: "其他",
@@ -2675,7 +2684,7 @@ window.__ModuleLoader__.load({
2675
2684
  noMatches: "没有匹配的模型",
2676
2685
  groupsNav: "模型厂商"
2677
2686
  };
2678
- const en$21 = {
2687
+ const en$22 = {
2679
2688
  allGroups: "All",
2680
2689
  enabledGroup: "Enabled",
2681
2690
  otherGroup: "Other",
@@ -2683,10 +2692,10 @@ window.__ModuleLoader__.load({
2683
2692
  noMatches: "No matching models",
2684
2693
  groupsNav: "Model vendors"
2685
2694
  };
2686
- const modelChecklistZh = zh$21;
2687
- const dictionaries$21 = {
2688
- zh: zh$21,
2689
- en: en$21
2695
+ const modelChecklistZh = zh$22;
2696
+ const dictionaries$22 = {
2697
+ zh: zh$22,
2698
+ en: en$22
2690
2699
  };
2691
2700
  //#endregion
2692
2701
  //#region src/client/common/model-vendors.ts
@@ -4713,7 +4722,7 @@ window.__ModuleLoader__.load({
4713
4722
  //#endregion
4714
4723
  //#region src/client/providers/command-code/locales.ts
4715
4724
  const NS_COMMAND_CODE = "dsh-command-code";
4716
- const zh$20 = {
4725
+ const zh$21 = {
4717
4726
  ...accountPoolZh,
4718
4727
  title: "Command Code",
4719
4728
  pageDesc: "登录 Command Code,管理可用模型、上下文窗口与额度。",
@@ -4787,7 +4796,7 @@ window.__ModuleLoader__.load({
4787
4796
  loginFailed: "登录失败",
4788
4797
  tokens: "tokens"
4789
4798
  };
4790
- const en$20 = {
4799
+ const en$21 = {
4791
4800
  ...accountPoolEn,
4792
4801
  title: "Command Code",
4793
4802
  pageDesc: "Sign in to Command Code and manage models, context windows, and quota.",
@@ -4861,11 +4870,11 @@ window.__ModuleLoader__.load({
4861
4870
  loginFailed: "Sign-in failed",
4862
4871
  tokens: "tokens"
4863
4872
  };
4864
- const dictionaries$20 = {
4865
- zh: zh$20,
4866
- "zh-CN": zh$20,
4867
- en: en$20,
4868
- "en-US": en$20
4873
+ const dictionaries$21 = {
4874
+ zh: zh$21,
4875
+ "zh-CN": zh$21,
4876
+ en: en$21,
4877
+ "en-US": en$21
4869
4878
  };
4870
4879
  //#endregion
4871
4880
  //#region src/client/providers/command-code/model-vendors.ts
@@ -4888,7 +4897,7 @@ window.__ModuleLoader__.load({
4888
4897
  xhigh: "X-High",
4889
4898
  max: "Max"
4890
4899
  };
4891
- const api$18 = createLineApi("/command-code/api", "Command Code");
4900
+ const api$20 = createLineApi("/command-code/api", "Command Code");
4892
4901
  /**
4893
4902
  * Route name shown next to a model.
4894
4903
  *
@@ -4912,7 +4921,7 @@ window.__ModuleLoader__.load({
4912
4921
  const [apiKey, setApiKey] = (0, react.useState)("");
4913
4922
  /** Follow-up poll owed while the host refreshes the quota behind an answer. */
4914
4923
  const quotaFollowUp = (0, react.useRef)(null);
4915
- const t = useLineDict(NS_COMMAND_CODE, zh$20);
4924
+ const t = useLineDict(NS_COMMAND_CODE, zh$21);
4916
4925
  const notifyChange = (0, react.useCallback)(() => {
4917
4926
  onModelChange?.();
4918
4927
  loadModelDirectory?.();
@@ -4920,7 +4929,7 @@ window.__ModuleLoader__.load({
4920
4929
  const loadStatus = (0, react.useCallback)(async (quiet = false) => {
4921
4930
  if (!quiet) setError(null);
4922
4931
  try {
4923
- const data = await api$18.request("/status");
4932
+ const data = await api$20.request("/status");
4924
4933
  setStatus(data);
4925
4934
  setContextDrafts(contextDraftsFor(data));
4926
4935
  quotaFollowUp.current ??= createQuotaFollowUp();
@@ -4951,12 +4960,12 @@ window.__ModuleLoader__.load({
4951
4960
  setBusy("login");
4952
4961
  setError(null);
4953
4962
  setLoginProgress(null);
4954
- const flow = await api$18.request("/login", { method: "POST" });
4963
+ const flow = await api$20.request("/login", { method: "POST" });
4955
4964
  if (flow.authUrl) window.open(flow.authUrl, "_blank");
4956
4965
  const pollTimer = window.setInterval(() => {
4957
4966
  (async () => {
4958
4967
  try {
4959
- const poll = await api$18.request("/login/status");
4968
+ const poll = await api$20.request("/login/status");
4960
4969
  if (poll.progress) setLoginProgress(poll.progress);
4961
4970
  if (poll.status === "complete") {
4962
4971
  window.clearInterval(pollTimer);
@@ -4988,7 +4997,7 @@ window.__ModuleLoader__.load({
4988
4997
  try {
4989
4998
  setBusy("apikey");
4990
4999
  setError(null);
4991
- const updated = await api$18.request("/login/apikey", {
5000
+ const updated = await api$20.request("/login/apikey", {
4992
5001
  method: "POST",
4993
5002
  body: JSON.stringify({ apiKey })
4994
5003
  });
@@ -5006,7 +5015,7 @@ window.__ModuleLoader__.load({
5006
5015
  try {
5007
5016
  setBusy(`${action}-${accountId}`);
5008
5017
  setError(null);
5009
- const updated = await api$18.request("/accounts", {
5018
+ const updated = await api$20.request("/accounts", {
5010
5019
  method: "POST",
5011
5020
  body: JSON.stringify({
5012
5021
  action,
@@ -5025,7 +5034,7 @@ window.__ModuleLoader__.load({
5025
5034
  try {
5026
5035
  setBusy("strategy");
5027
5036
  setError(null);
5028
- const updated = await api$18.request("/accounts", {
5037
+ const updated = await api$20.request("/accounts", {
5029
5038
  method: "POST",
5030
5039
  body: JSON.stringify({
5031
5040
  action: "strategy",
@@ -5048,7 +5057,7 @@ window.__ModuleLoader__.load({
5048
5057
  const handleRelogin = (accountId) => {
5049
5058
  (async () => {
5050
5059
  try {
5051
- const updated = await api$18.request("/accounts", {
5060
+ const updated = await api$20.request("/accounts", {
5052
5061
  method: "POST",
5053
5062
  body: JSON.stringify({
5054
5063
  action: "relogin",
@@ -5067,7 +5076,7 @@ window.__ModuleLoader__.load({
5067
5076
  try {
5068
5077
  setBusy("quota");
5069
5078
  setError(null);
5070
- const updated = await api$18.request("/quota", { method: "POST" });
5079
+ const updated = await api$20.request("/quota", { method: "POST" });
5071
5080
  setStatus(updated);
5072
5081
  } catch (err) {
5073
5082
  setError(err instanceof Error ? err.message : String(err));
@@ -5079,7 +5088,7 @@ window.__ModuleLoader__.load({
5079
5088
  try {
5080
5089
  setBusy("catalog");
5081
5090
  setError(null);
5082
- const updated = await api$18.request("/catalog/refresh", { method: "POST" });
5091
+ const updated = await api$20.request("/catalog/refresh", { method: "POST" });
5083
5092
  setStatus(updated);
5084
5093
  setContextDrafts(contextDraftsFor(updated));
5085
5094
  notifyChange();
@@ -5093,7 +5102,7 @@ window.__ModuleLoader__.load({
5093
5102
  try {
5094
5103
  setBusy("connection");
5095
5104
  setError(null);
5096
- await api$18.post("/connection/test");
5105
+ await api$20.post("/connection/test");
5097
5106
  await loadStatus(true);
5098
5107
  } catch (err) {
5099
5108
  setError(err instanceof Error ? err.message : String(err));
@@ -5103,7 +5112,7 @@ window.__ModuleLoader__.load({
5103
5112
  };
5104
5113
  const applyEnabled = async (enabledModelIds) => {
5105
5114
  try {
5106
- const updated = await api$18.request("/models", {
5115
+ const updated = await api$20.request("/models", {
5107
5116
  method: "POST",
5108
5117
  body: JSON.stringify({ enabledModelIds })
5109
5118
  });
@@ -5133,7 +5142,7 @@ window.__ModuleLoader__.load({
5133
5142
  };
5134
5143
  const handleUpdateEffort = async (effort) => {
5135
5144
  try {
5136
- const updated = await api$18.request("/settings", {
5145
+ const updated = await api$20.request("/settings", {
5137
5146
  method: "POST",
5138
5147
  body: JSON.stringify({ defaultReasoningEffort: effort })
5139
5148
  });
@@ -5153,7 +5162,7 @@ window.__ModuleLoader__.load({
5153
5162
  try {
5154
5163
  setSavingModel(modelId);
5155
5164
  setError(null);
5156
- const updated = await api$18.request("/settings", {
5165
+ const updated = await api$20.request("/settings", {
5157
5166
  method: "POST",
5158
5167
  body: JSON.stringify({ contextWindowOverrides: { [modelId]: parsed } })
5159
5168
  });
@@ -5174,7 +5183,7 @@ window.__ModuleLoader__.load({
5174
5183
  try {
5175
5184
  setSavingModel(modelId);
5176
5185
  setError(null);
5177
- const updated = await api$18.request("/settings", {
5186
+ const updated = await api$20.request("/settings", {
5178
5187
  method: "POST",
5179
5188
  body: JSON.stringify({ contextWindowOverrides: { [modelId]: null } })
5180
5189
  });
@@ -5201,7 +5210,7 @@ window.__ModuleLoader__.load({
5201
5210
  try {
5202
5211
  setBusy("context");
5203
5212
  setError(null);
5204
- const updated = await api$18.request("/settings", {
5213
+ const updated = await api$20.request("/settings", {
5205
5214
  method: "POST",
5206
5215
  body: JSON.stringify({ contextWindowOverrides: Object.fromEntries(models.map((model) => [model, null])) })
5207
5216
  });
@@ -5688,7 +5697,7 @@ window.__ModuleLoader__.load({
5688
5697
  //#endregion
5689
5698
  //#region src/client/providers/kimi-code/locales.ts
5690
5699
  const NS_KIMI_CODE = "dsh-kimi-code";
5691
- const zh$19 = {
5700
+ const zh$20 = {
5692
5701
  ...accountPoolZh,
5693
5702
  title: "Kimi Code",
5694
5703
  pageDesc: "登录 Kimi Code 订阅,管理模型、思考档位、上下文窗口与额度。",
@@ -5884,7 +5893,7 @@ window.__ModuleLoader__.load({
5884
5893
  compactionRouteNoImage: "该模型不接受图片:摘要里的截图会被替换为占位文本。",
5885
5894
  compactionRouteEmpty: "没有可用的线路——先登录任意一条线路再回来设置。"
5886
5895
  };
5887
- const en$19 = {
5896
+ const en$20 = {
5888
5897
  ...accountPoolEn,
5889
5898
  title: "Kimi Code",
5890
5899
  pageDesc: "Sign in to the Kimi Code subscription and manage models, thinking level, context windows, and quota.",
@@ -6080,11 +6089,11 @@ window.__ModuleLoader__.load({
6080
6089
  compactionRouteNoImage: "This model takes no images: screenshots become placeholder text in the summary.",
6081
6090
  compactionRouteEmpty: "No route is available — sign in to one first."
6082
6091
  };
6083
- const dictionaries$19 = {
6084
- zh: zh$19,
6085
- "zh-CN": zh$19,
6086
- en: en$19,
6087
- "en-US": en$19
6092
+ const dictionaries$20 = {
6093
+ zh: zh$20,
6094
+ "zh-CN": zh$20,
6095
+ en: en$20,
6096
+ "en-US": en$20
6088
6097
  };
6089
6098
  //#endregion
6090
6099
  //#region src/shared/kimi-code-contracts.ts
@@ -6196,7 +6205,7 @@ window.__ModuleLoader__.load({
6196
6205
  return `${value}x`;
6197
6206
  }
6198
6207
  function KimiModelCapabilities({ models }) {
6199
- const t = useLineDict(NS_KIMI_CODE, zh$19);
6208
+ const t = useLineDict(NS_KIMI_CODE, zh$20);
6200
6209
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
6201
6210
  className: "dsha-cap-table",
6202
6211
  children: [
@@ -6598,7 +6607,7 @@ window.__ModuleLoader__.load({
6598
6607
  }
6599
6608
  //#endregion
6600
6609
  //#region src/client/providers/kimi-code/KimiCodeSection.tsx
6601
- const api$17 = createLineApi("/kimi-code/api", "Kimi Code");
6610
+ const api$19 = createLineApi("/kimi-code/api", "Kimi Code");
6602
6611
  /**
6603
6612
  * One token count as the card prints it.
6604
6613
  *
@@ -6728,7 +6737,7 @@ window.__ModuleLoader__.load({
6728
6737
  statusGeneration.current += 1;
6729
6738
  setStatus(next);
6730
6739
  }, []);
6731
- const t = useLineDict(NS_KIMI_CODE, zh$19);
6740
+ const t = useLineDict(NS_KIMI_CODE, zh$20);
6732
6741
  const notifyChange = (0, react.useCallback)(() => {
6733
6742
  onModelChange?.();
6734
6743
  loadModelDirectory?.();
@@ -6737,7 +6746,7 @@ window.__ModuleLoader__.load({
6737
6746
  const generation = ++statusGeneration.current;
6738
6747
  if (!quiet) setError(null);
6739
6748
  try {
6740
- const data = await api$17.request("/status");
6749
+ const data = await api$19.request("/status");
6741
6750
  if (generation !== statusGeneration.current) return;
6742
6751
  setStatus(data);
6743
6752
  setContextDrafts(contextDraftsFor(data));
@@ -6779,7 +6788,7 @@ window.__ModuleLoader__.load({
6779
6788
  const timer = window.setInterval(() => {
6780
6789
  (async () => {
6781
6790
  try {
6782
- const poll = await api$17.request("/login/status");
6791
+ const poll = await api$19.request("/login/status");
6783
6792
  setFlow(poll);
6784
6793
  if (poll.status === "complete") {
6785
6794
  await loadStatus();
@@ -6801,7 +6810,7 @@ window.__ModuleLoader__.load({
6801
6810
  setBusy("login");
6802
6811
  setError(null);
6803
6812
  setCopied(false);
6804
- const next = await api$17.request("/login", {
6813
+ const next = await api$19.request("/login", {
6805
6814
  method: "POST",
6806
6815
  body: JSON.stringify(accountId === void 0 ? {} : { accountId })
6807
6816
  });
@@ -6814,7 +6823,7 @@ window.__ModuleLoader__.load({
6814
6823
  };
6815
6824
  const handleCancelLogin = async () => {
6816
6825
  try {
6817
- await api$17.request("/login/cancel", { method: "POST" });
6826
+ await api$19.request("/login/cancel", { method: "POST" });
6818
6827
  setFlow({ status: "idle" });
6819
6828
  } catch (err) {
6820
6829
  setError(err instanceof Error ? err.message : String(err));
@@ -6834,7 +6843,7 @@ window.__ModuleLoader__.load({
6834
6843
  try {
6835
6844
  setBusy(`${action}-${accountId}`);
6836
6845
  setError(null);
6837
- const updated = await api$17.request("/accounts", {
6846
+ const updated = await api$19.request("/accounts", {
6838
6847
  method: "POST",
6839
6848
  body: JSON.stringify({
6840
6849
  action,
@@ -6854,7 +6863,7 @@ window.__ModuleLoader__.load({
6854
6863
  try {
6855
6864
  setBusy("strategy");
6856
6865
  setError(null);
6857
- const updated = await api$17.request("/accounts", {
6866
+ const updated = await api$19.request("/accounts", {
6858
6867
  method: "POST",
6859
6868
  body: JSON.stringify({
6860
6869
  action: "strategy",
@@ -6884,7 +6893,7 @@ window.__ModuleLoader__.load({
6884
6893
  try {
6885
6894
  setBusy("login-api-key");
6886
6895
  setError(null);
6887
- const updated = await api$17.request("/login/api-key", {
6896
+ const updated = await api$19.request("/login/api-key", {
6888
6897
  method: "POST",
6889
6898
  body: JSON.stringify(apiKeyTarget === null ? { apiKey } : {
6890
6899
  apiKey,
@@ -6920,7 +6929,7 @@ window.__ModuleLoader__.load({
6920
6929
  }
6921
6930
  (async () => {
6922
6931
  try {
6923
- const updated = await api$17.request("/accounts", {
6932
+ const updated = await api$19.request("/accounts", {
6924
6933
  method: "POST",
6925
6934
  body: JSON.stringify({
6926
6935
  action: "relogin",
@@ -6939,7 +6948,7 @@ window.__ModuleLoader__.load({
6939
6948
  try {
6940
6949
  setBusy("quota");
6941
6950
  setError(null);
6942
- const updated = await api$17.request("/quota", { method: "POST" });
6951
+ const updated = await api$19.request("/quota", { method: "POST" });
6943
6952
  applyStatus(updated);
6944
6953
  } catch (err) {
6945
6954
  setError(err instanceof Error ? err.message : String(err));
@@ -6952,7 +6961,7 @@ window.__ModuleLoader__.load({
6952
6961
  try {
6953
6962
  setBusy("catalog");
6954
6963
  setError(null);
6955
- const updated = await api$17.request("/catalog/refresh", { method: "POST" });
6964
+ const updated = await api$19.request("/catalog/refresh", { method: "POST" });
6956
6965
  applyStatus(updated);
6957
6966
  setContextDrafts(contextDraftsFor(updated));
6958
6967
  notifyChange();
@@ -6967,7 +6976,7 @@ window.__ModuleLoader__.load({
6967
6976
  setBusy("connection");
6968
6977
  setError(null);
6969
6978
  setConnectionNotice(null);
6970
- const result = await api$17.request("/connection/test", { method: "POST" });
6979
+ const result = await api$19.request("/connection/test", { method: "POST" });
6971
6980
  setConnectionNotice(result.connected ? `${t.testSuccess} · ${result.latencyMs} ms` : t.testFailed);
6972
6981
  await loadStatus(true);
6973
6982
  } catch (err) {
@@ -6978,7 +6987,7 @@ window.__ModuleLoader__.load({
6978
6987
  };
6979
6988
  const applyEnabled = async (enabledModelIds) => {
6980
6989
  try {
6981
- const updated = await api$17.request("/models", {
6990
+ const updated = await api$19.request("/models", {
6982
6991
  method: "POST",
6983
6992
  body: JSON.stringify({ enabledModelIds })
6984
6993
  });
@@ -7001,7 +7010,7 @@ window.__ModuleLoader__.load({
7001
7010
  };
7002
7011
  const handleUpdateEffort = async (effort) => {
7003
7012
  try {
7004
- const updated = await api$17.request("/settings", {
7013
+ const updated = await api$19.request("/settings", {
7005
7014
  method: "POST",
7006
7015
  body: JSON.stringify({ defaultReasoningEffort: effort })
7007
7016
  });
@@ -7021,7 +7030,7 @@ window.__ModuleLoader__.load({
7021
7030
  try {
7022
7031
  setSavingModel(modelId);
7023
7032
  setError(null);
7024
- const updated = await api$17.request("/settings", {
7033
+ const updated = await api$19.request("/settings", {
7025
7034
  method: "POST",
7026
7035
  body: JSON.stringify({ contextWindowOverrides: { [modelId]: parsed } })
7027
7036
  });
@@ -7042,7 +7051,7 @@ window.__ModuleLoader__.load({
7042
7051
  try {
7043
7052
  setSavingModel(modelId);
7044
7053
  setError(null);
7045
- const updated = await api$17.request("/settings", {
7054
+ const updated = await api$19.request("/settings", {
7046
7055
  method: "POST",
7047
7056
  body: JSON.stringify({ contextWindowOverrides: { [modelId]: null } })
7048
7057
  });
@@ -7069,7 +7078,7 @@ window.__ModuleLoader__.load({
7069
7078
  try {
7070
7079
  setBusy("context");
7071
7080
  setError(null);
7072
- const updated = await api$17.request("/settings", {
7081
+ const updated = await api$19.request("/settings", {
7073
7082
  method: "POST",
7074
7083
  body: JSON.stringify({ contextWindowOverrides: Object.fromEntries(models.map((model) => [model, null])) })
7075
7084
  });
@@ -7600,10 +7609,10 @@ window.__ModuleLoader__.load({
7600
7609
  * The names stay as they were so the hook that consumes them does not have to
7601
7610
  * change with the reader.
7602
7611
  */
7603
- const api$16 = createLineApi(MINIMAX_CODE_ROUTE_PREFIX, "MiniMax Code");
7604
- api$16.request;
7605
- const get$6 = api$16.get;
7606
- const post$8 = api$16.post;
7612
+ const api$18 = createLineApi(MINIMAX_CODE_ROUTE_PREFIX, "MiniMax Code");
7613
+ api$18.request;
7614
+ const get$6 = api$18.get;
7615
+ const post$8 = api$18.post;
7607
7616
  function messageOf$6(cause) {
7608
7617
  return cause instanceof Error ? cause.message : String(cause);
7609
7618
  }
@@ -7630,7 +7639,7 @@ window.__ModuleLoader__.load({
7630
7639
  //#endregion
7631
7640
  //#region src/client/providers/minimax-code/locales.ts
7632
7641
  const NS_MINIMAX_CODE = "dsh-minimax-code";
7633
- const zh$18 = {
7642
+ const zh$19 = {
7634
7643
  ...accountPoolZh,
7635
7644
  title: "MiniMax Code",
7636
7645
  pageDesc: "登录 MiniMax Code 编程订阅(设备码 OAuth),复用本机 MiniMax Code 的登录态,管理账号、连接与模型。",
@@ -7828,7 +7837,7 @@ window.__ModuleLoader__.load({
7828
7837
  videoHistoryEncrypted: "已由系统凭据后端加密",
7829
7838
  videoHistoryPlain: "本机没有可用的凭据后端,记录为明文"
7830
7839
  };
7831
- const en$18 = {
7840
+ const en$19 = {
7832
7841
  ...accountPoolEn,
7833
7842
  title: "MiniMax Code",
7834
7843
  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.",
@@ -8026,11 +8035,11 @@ window.__ModuleLoader__.load({
8026
8035
  videoHistoryEncrypted: "Encrypted by the platform credential backend",
8027
8036
  videoHistoryPlain: "No credential backend on this host; stored as plain text"
8028
8037
  };
8029
- const dictionaries$18 = {
8030
- zh: zh$18,
8031
- "zh-CN": zh$18,
8032
- en: en$18,
8033
- "en-US": en$18
8038
+ const dictionaries$19 = {
8039
+ zh: zh$19,
8040
+ "zh-CN": zh$19,
8041
+ en: en$19,
8042
+ "en-US": en$19
8034
8043
  };
8035
8044
  //#endregion
8036
8045
  //#region src/client/providers/minimax-code/useMinimaxCodeSection.ts
@@ -8044,7 +8053,7 @@ window.__ModuleLoader__.load({
8044
8053
  * rather than inferred from the JSX.
8045
8054
  */
8046
8055
  /** The card's own dictionary; stable identity keeps effect dependencies intact. */
8047
- const fallbackTranslate$7 = (key) => zh$18[key];
8056
+ const fallbackTranslate$7 = (key) => zh$19[key];
8048
8057
  /**
8049
8058
  * The shared pool card's labels, resolved through this card's dictionary.
8050
8059
  *
@@ -10060,7 +10069,7 @@ window.__ModuleLoader__.load({
10060
10069
  * 键名重合的会被渲染成 ChatGPT 的措辞,不重合的会把键名本身打印出来)。
10061
10070
  */
10062
10071
  const NS_GLM_CODING_PLAN = "dsh-glm-coding-plan";
10063
- const zh$17 = {
10072
+ const zh$18 = {
10064
10073
  ...accountPoolZh,
10065
10074
  title: "GLM(ZCode 账号)",
10066
10075
  pageDesc: "用 ZCode 账号授权接入 GLM Coding Plan(国区 bigmodel.cn / 国际区 z.ai),管理账号池、套餐额度与模型勾选。两个区域的凭据各自独立,池内可以同时存在两区账号。",
@@ -10154,7 +10163,7 @@ window.__ModuleLoader__.load({
10154
10163
  quotaAllowanceUnknown: "未判定",
10155
10164
  quotaAllowanceHint: "登录时探活认定的额度来源。「免费体验额度」指新用户注册后自动获得、首次使用起 5 天内每天 800 万 token 的体验额度。"
10156
10165
  };
10157
- const en$17 = {
10166
+ const en$18 = {
10158
10167
  ...accountPoolEn,
10159
10168
  title: "GLM (ZCode account)",
10160
10169
  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.",
@@ -10248,11 +10257,11 @@ window.__ModuleLoader__.load({
10248
10257
  quotaAllowanceUnknown: "Undetermined",
10249
10258
  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."
10250
10259
  };
10251
- const dictionaries$17 = {
10252
- zh: zh$17,
10253
- "zh-CN": zh$17,
10254
- en: en$17,
10255
- "en-US": en$17
10260
+ const dictionaries$18 = {
10261
+ zh: zh$18,
10262
+ "zh-CN": zh$18,
10263
+ en: en$18,
10264
+ "en-US": en$18
10256
10265
  };
10257
10266
  /** 一个配额窗口的键到「窗口长度(分钟)」的映射。 */
10258
10267
  const QUOTA_WINDOW_MINUTES$1 = {
@@ -10311,9 +10320,9 @@ window.__ModuleLoader__.load({
10311
10320
  * 除 adopt 与 connection/test 外,全部走共享的 { ok, value } 信封,
10312
10321
  * 因此答案都是裸 DTO——createLineApi 已经把信封拆掉了。
10313
10322
  */
10314
- const api$15 = createLineApi(GLM_CODING_PLAN_ROUTE_PREFIX, GLM_CODING_PLAN_PROVIDER_NAME);
10315
- const get$5 = api$15.get;
10316
- const post$7 = api$15.post;
10323
+ const api$17 = createLineApi(GLM_CODING_PLAN_ROUTE_PREFIX, GLM_CODING_PLAN_PROVIDER_NAME);
10324
+ const get$5 = api$17.get;
10325
+ const post$7 = api$17.post;
10317
10326
  function messageOf$5(cause) {
10318
10327
  return cause instanceof Error ? cause.message : String(cause);
10319
10328
  }
@@ -10333,7 +10342,7 @@ window.__ModuleLoader__.load({
10333
10342
  /** 登录状态机的轮询节奏。真实超时与间隔由 host 拥有,卡片只是跟随。 */
10334
10343
  const LOGIN_POLL_INTERVAL_MS$2 = 2e3;
10335
10344
  /** 本卡片的字典;身份稳定,依赖它的 effect 才不会每次渲染重建。 */
10336
- const fallbackTranslate$6 = (key) => zh$17[key];
10345
+ const fallbackTranslate$6 = (key) => zh$18[key];
10337
10346
  /**
10338
10347
  * 共享账号池卡片需要的标签集,按本卡片的字典逐键查出来。
10339
10348
  *
@@ -10759,7 +10768,7 @@ window.__ModuleLoader__.load({
10759
10768
  const { status, loading, busy, error, connection, adoptResult, pasteValue, region, pasteOpen, contextDrafts, savingModel } = state;
10760
10769
  const { accounts, models, contextModels, overrideCount, login, quota, authenticated, poolLabels } = derived;
10761
10770
  const { setRegion, login: startLogin, cancelLogin, submitPaste, setPasteValue, togglePaste, adopt, clearAdoptResult, accountAction, setStrategy, toggleModel, setAllModels, saveContextWindow, resetContextWindow, resetAllContextWindows, updateContextDraft, refreshQuota, refreshCatalog, testConnection } = actions;
10762
- const t = useLineDict(NS_GLM_CODING_PLAN, zh$17);
10771
+ const t = useLineDict(NS_GLM_CODING_PLAN, zh$18);
10763
10772
  if (loading) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
10764
10773
  className: "dsha-page",
10765
10774
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
@@ -11225,7 +11234,7 @@ window.__ModuleLoader__.load({
11225
11234
  * provider — the same reason every sibling line has one.
11226
11235
  */
11227
11236
  const NS_CLAUDE = "dsh-claude";
11228
- const zh$16 = {
11237
+ const zh$17 = {
11229
11238
  ...accountPoolZh,
11230
11239
  title: "Claude(订阅)",
11231
11240
  pageDesc: "登录 Claude Pro/Max 订阅,管理模型、思考档位、上下文窗口与额度。",
@@ -11346,7 +11355,7 @@ window.__ModuleLoader__.load({
11346
11355
  copy: "复制",
11347
11356
  copied: "已复制"
11348
11357
  };
11349
- const en$16 = {
11358
+ const en$17 = {
11350
11359
  ...accountPoolEn,
11351
11360
  title: "Claude (subscription)",
11352
11361
  pageDesc: "Sign in to a Claude Pro/Max subscription and manage models, thinking levels, context windows and quota.",
@@ -11467,11 +11476,11 @@ window.__ModuleLoader__.load({
11467
11476
  copy: "Copy",
11468
11477
  copied: "Copied"
11469
11478
  };
11470
- const dictionaries$16 = {
11471
- zh: zh$16,
11472
- "zh-CN": zh$16,
11473
- en: en$16,
11474
- "en-US": en$16
11479
+ const dictionaries$17 = {
11480
+ zh: zh$17,
11481
+ "zh-CN": zh$17,
11482
+ en: en$17,
11483
+ "en-US": en$17
11475
11484
  };
11476
11485
  //#endregion
11477
11486
  //#region src/client/providers/claude/useClaudeSection.ts
@@ -11484,7 +11493,7 @@ window.__ModuleLoader__.load({
11484
11493
  * `ClaudeSectionView` — so the contract between the two is visible here rather
11485
11494
  * than inferred from a thousand lines of JSX.
11486
11495
  */
11487
- const api$14 = createLineApi("/claude/api", "Claude");
11496
+ const api$16 = createLineApi("/claude/api", "Claude");
11488
11497
  /**
11489
11498
  * The poll cadence of a pending sign-in.
11490
11499
  *
@@ -11505,7 +11514,7 @@ window.__ModuleLoader__.load({
11505
11514
  const [connection, setConnection] = (0, react.useState)(null);
11506
11515
  /** Follow-up poll owed while the host refreshes the quota behind an answer. */
11507
11516
  const quotaFollowUp = (0, react.useRef)(null);
11508
- const t = useLineDict(NS_CLAUDE, zh$16);
11517
+ const t = useLineDict(NS_CLAUDE, zh$17);
11509
11518
  const notifyChange = (0, react.useCallback)(() => {
11510
11519
  onModelChange?.();
11511
11520
  loadModelDirectory?.();
@@ -11517,7 +11526,7 @@ window.__ModuleLoader__.load({
11517
11526
  const loadStatus = (0, react.useCallback)(async (quiet = false) => {
11518
11527
  if (!quiet) setError(null);
11519
11528
  try {
11520
- const data = await api$14.request("/status");
11529
+ const data = await api$16.request("/status");
11521
11530
  setStatus(data);
11522
11531
  setContextDrafts(contextDraftsFor(data));
11523
11532
  quotaFollowUp.current ??= createQuotaFollowUp();
@@ -11548,7 +11557,7 @@ window.__ModuleLoader__.load({
11548
11557
  const timer = window.setInterval(() => {
11549
11558
  (async () => {
11550
11559
  try {
11551
- const poll = await api$14.request("/login/status");
11560
+ const poll = await api$16.request("/login/status");
11552
11561
  setFlow(poll);
11553
11562
  if (poll.status === "complete") {
11554
11563
  setPasteValue("");
@@ -11570,7 +11579,7 @@ window.__ModuleLoader__.load({
11570
11579
  setBusy("login");
11571
11580
  setError(null);
11572
11581
  setPasteValue("");
11573
- const next = await api$14.request("/login", {
11582
+ const next = await api$16.request("/login", {
11574
11583
  method: "POST",
11575
11584
  body: JSON.stringify({})
11576
11585
  });
@@ -11584,7 +11593,7 @@ window.__ModuleLoader__.load({
11584
11593
  };
11585
11594
  const cancelLogin = async () => {
11586
11595
  try {
11587
- const next = await api$14.request("/login/cancel", { method: "POST" });
11596
+ const next = await api$16.request("/login/cancel", { method: "POST" });
11588
11597
  setFlow(next);
11589
11598
  } catch (err) {
11590
11599
  reportError(err);
@@ -11596,7 +11605,7 @@ window.__ModuleLoader__.load({
11596
11605
  try {
11597
11606
  setBusy("login-input");
11598
11607
  setError(null);
11599
- const updated = await api$14.request("/login/input", {
11608
+ const updated = await api$16.request("/login/input", {
11600
11609
  method: "POST",
11601
11610
  body: JSON.stringify({ input: pasteValue })
11602
11611
  });
@@ -11620,7 +11629,7 @@ window.__ModuleLoader__.load({
11620
11629
  try {
11621
11630
  setBusy("adopt");
11622
11631
  setError(null);
11623
- const updated = await api$14.request("/adopt", { method: "POST" });
11632
+ const updated = await api$16.request("/adopt", { method: "POST" });
11624
11633
  setStatus(updated);
11625
11634
  setContextDrafts(contextDraftsFor(updated));
11626
11635
  notifyChange();
@@ -11635,7 +11644,7 @@ window.__ModuleLoader__.load({
11635
11644
  try {
11636
11645
  setBusy(accountId === void 0 ? "adopt-disable" : `adopt-disable-${accountId}`);
11637
11646
  setError(null);
11638
- const updated = await api$14.request("/adopt/disable", {
11647
+ const updated = await api$16.request("/adopt/disable", {
11639
11648
  method: "POST",
11640
11649
  body: JSON.stringify(accountId === void 0 ? {} : { accountId })
11641
11650
  });
@@ -11652,7 +11661,7 @@ window.__ModuleLoader__.load({
11652
11661
  try {
11653
11662
  setBusy(`${action}-${accountId}`);
11654
11663
  setError(null);
11655
- const updated = await api$14.request("/accounts", {
11664
+ const updated = await api$16.request("/accounts", {
11656
11665
  method: "POST",
11657
11666
  body: JSON.stringify({
11658
11667
  action,
@@ -11671,7 +11680,7 @@ window.__ModuleLoader__.load({
11671
11680
  try {
11672
11681
  setBusy("strategy");
11673
11682
  setError(null);
11674
- const updated = await api$14.request("/accounts", {
11683
+ const updated = await api$16.request("/accounts", {
11675
11684
  method: "POST",
11676
11685
  body: JSON.stringify({
11677
11686
  action: "strategy",
@@ -11698,7 +11707,7 @@ window.__ModuleLoader__.load({
11698
11707
  setBusy(`relogin-${accountId}`);
11699
11708
  setError(null);
11700
11709
  setPasteValue("");
11701
- const next = await api$14.request("/login", {
11710
+ const next = await api$16.request("/login", {
11702
11711
  method: "POST",
11703
11712
  body: JSON.stringify({ accountId })
11704
11713
  });
@@ -11715,7 +11724,7 @@ window.__ModuleLoader__.load({
11715
11724
  try {
11716
11725
  setBusy("quota");
11717
11726
  setError(null);
11718
- const updated = await api$14.request("/quota", { method: "POST" });
11727
+ const updated = await api$16.request("/quota", { method: "POST" });
11719
11728
  setStatus(updated);
11720
11729
  } catch (err) {
11721
11730
  reportError(err);
@@ -11728,7 +11737,7 @@ window.__ModuleLoader__.load({
11728
11737
  try {
11729
11738
  setBusy("catalog");
11730
11739
  setError(null);
11731
- const updated = await api$14.request("/catalog/refresh", { method: "POST" });
11740
+ const updated = await api$16.request("/catalog/refresh", { method: "POST" });
11732
11741
  setStatus(updated);
11733
11742
  setContextDrafts(contextDraftsFor(updated));
11734
11743
  notifyChange();
@@ -11743,7 +11752,7 @@ window.__ModuleLoader__.load({
11743
11752
  setBusy("connection");
11744
11753
  setError(null);
11745
11754
  setConnection(null);
11746
- const result = await api$14.request("/connection/test", { method: "POST" });
11755
+ const result = await api$16.request("/connection/test", { method: "POST" });
11747
11756
  setConnection(result);
11748
11757
  await loadStatus(true);
11749
11758
  } catch (err) {
@@ -11754,7 +11763,7 @@ window.__ModuleLoader__.load({
11754
11763
  };
11755
11764
  const applyEnabled = async (enabledModelIds) => {
11756
11765
  try {
11757
- const updated = await api$14.request("/models", {
11766
+ const updated = await api$16.request("/models", {
11758
11767
  method: "POST",
11759
11768
  body: JSON.stringify({ enabledModelIds })
11760
11769
  });
@@ -11777,7 +11786,7 @@ window.__ModuleLoader__.load({
11777
11786
  };
11778
11787
  const updateEffort = async (effort) => {
11779
11788
  try {
11780
- const updated = await api$14.request("/settings", {
11789
+ const updated = await api$16.request("/settings", {
11781
11790
  method: "POST",
11782
11791
  body: JSON.stringify({ defaultReasoningEffort: effort })
11783
11792
  });
@@ -11789,7 +11798,7 @@ window.__ModuleLoader__.load({
11789
11798
  };
11790
11799
  const updateCacheTtl = async (ttl) => {
11791
11800
  try {
11792
- const updated = await api$14.request("/settings", {
11801
+ const updated = await api$16.request("/settings", {
11793
11802
  method: "POST",
11794
11803
  body: JSON.stringify({ cacheTtl: ttl })
11795
11804
  });
@@ -11801,7 +11810,7 @@ window.__ModuleLoader__.load({
11801
11810
  };
11802
11811
  const updateBooleanSetting = async (field, checked) => {
11803
11812
  try {
11804
- const updated = await api$14.request("/settings", {
11813
+ const updated = await api$16.request("/settings", {
11805
11814
  method: "POST",
11806
11815
  body: JSON.stringify({ [field]: checked })
11807
11816
  });
@@ -11823,7 +11832,7 @@ window.__ModuleLoader__.load({
11823
11832
  try {
11824
11833
  setSavingModel(modelId);
11825
11834
  setError(null);
11826
- const updated = await api$14.request("/settings", {
11835
+ const updated = await api$16.request("/settings", {
11827
11836
  method: "POST",
11828
11837
  body: JSON.stringify({ contextWindowOverrides: { [modelId]: parsed } })
11829
11838
  });
@@ -11850,7 +11859,7 @@ window.__ModuleLoader__.load({
11850
11859
  try {
11851
11860
  setSavingModel(modelId);
11852
11861
  setError(null);
11853
- const updated = await api$14.request("/settings", {
11862
+ const updated = await api$16.request("/settings", {
11854
11863
  method: "POST",
11855
11864
  body: JSON.stringify({ contextWindowOverrides: { [modelId]: null } })
11856
11865
  });
@@ -11877,7 +11886,7 @@ window.__ModuleLoader__.load({
11877
11886
  try {
11878
11887
  setBusy("context");
11879
11888
  setError(null);
11880
- const updated = await api$14.request("/settings", {
11889
+ const updated = await api$16.request("/settings", {
11881
11890
  method: "POST",
11882
11891
  body: JSON.stringify({ contextWindowOverrides: Object.fromEntries(models.map((model) => [model, null])) })
11883
11892
  });
@@ -11968,11 +11977,11 @@ window.__ModuleLoader__.load({
11968
11977
  * out here would hide a choice the host would accept and a catalog may expose.
11969
11978
  */
11970
11979
  const EFFORT_LABELS$2 = {
11971
- low: zh$16.effortLow,
11972
- medium: zh$16.effortMedium,
11973
- high: zh$16.effortHigh,
11974
- xhigh: zh$16.effortXHigh,
11975
- max: zh$16.effortMax
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
11976
11985
  };
11977
11986
  /** One-line capability summary shown as a model pill's hover title. */
11978
11987
  function modelFacts(model, t) {
@@ -11993,7 +12002,7 @@ window.__ModuleLoader__.load({
11993
12002
  const { status, loading, busy, error, flow, connection, pasteValue, contextDrafts, savingModel } = state;
11994
12003
  const { accounts, hasAdopted, contextModels, overrideCount, quota, windows, poolLabels } = derived;
11995
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;
11996
- const t = useLineDict(NS_CLAUDE, zh$16);
12005
+ const t = useLineDict(NS_CLAUDE, zh$17);
11997
12006
  if (loading) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
11998
12007
  className: "dsha-page",
11999
12008
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
@@ -12615,7 +12624,7 @@ window.__ModuleLoader__.load({
12615
12624
  //#endregion
12616
12625
  //#region src/client/providers/ollama/locales.ts
12617
12626
  const NS_OLLAMA = "dsh-ollama";
12618
- const zh$15 = {
12627
+ const zh$16 = {
12619
12628
  ...accountPoolZh,
12620
12629
  relogin: "更换 Key",
12621
12630
  needsRelogin: "Key 已失效",
@@ -12667,7 +12676,7 @@ window.__ModuleLoader__.load({
12667
12676
  usageNone: "尚无请求",
12668
12677
  usageHint: "按 Ollama 每次响应自带的 token 计数本地累加。"
12669
12678
  };
12670
- const en$15 = {
12679
+ const en$16 = {
12671
12680
  ...accountPoolEn,
12672
12681
  relogin: "Replace Key",
12673
12682
  needsRelogin: "Key rejected",
@@ -12719,11 +12728,11 @@ window.__ModuleLoader__.load({
12719
12728
  usageNone: "No requests yet",
12720
12729
  usageHint: "Summed locally from the token counts Ollama returns on each response."
12721
12730
  };
12722
- const dictionaries$15 = {
12723
- zh: zh$15,
12724
- "zh-CN": zh$15,
12725
- en: en$15,
12726
- "en-US": en$15
12731
+ const dictionaries$16 = {
12732
+ zh: zh$16,
12733
+ "zh-CN": zh$16,
12734
+ en: en$16,
12735
+ "en-US": en$16
12727
12736
  };
12728
12737
  //#endregion
12729
12738
  //#region src/client/providers/ollama/OllamaSection.tsx
@@ -12859,7 +12868,7 @@ window.__ModuleLoader__.load({
12859
12868
  const setEffort = (0, react.useCallback)((value) => {
12860
12869
  run("effort", () => API$8.setDefaultReasoningEffort(value === "" ? null : value));
12861
12870
  }, [run]);
12862
- const t = useLineDict(NS_OLLAMA, zh$15);
12871
+ const t = useLineDict(NS_OLLAMA, zh$16);
12863
12872
  const pool = status?.pool;
12864
12873
  const models = status?.models ?? [];
12865
12874
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [
@@ -12974,7 +12983,7 @@ window.__ModuleLoader__.load({
12974
12983
  className: "dsha-btn",
12975
12984
  disabled: busy !== null,
12976
12985
  onClick: () => setShowKeyForm(false),
12977
- children: zh$15.deleteAccount
12986
+ children: zh$16.deleteAccount
12978
12987
  })]
12979
12988
  })
12980
12989
  ]
@@ -13175,7 +13184,7 @@ window.__ModuleLoader__.load({
13175
13184
  //#endregion
13176
13185
  //#region src/client/providers/antigravity-acp/locales.ts
13177
13186
  const NS_ANTIGRAVITY_ACP = "dsh-antigravity-acp";
13178
- const zh$14 = {
13187
+ const zh$15 = {
13179
13188
  title: "Antigravity(ACP)",
13180
13189
  pageDesc: "通过 Google 官方 Antigravity CLI 的 Agent Client Protocol(ACP)接入:模型、工具与会话全部由官方进程驱动,登录态由官方进程自己保管。",
13181
13190
  routeOwned: "模型路由由本插件提供",
@@ -13267,7 +13276,7 @@ window.__ModuleLoader__.load({
13267
13276
  enabledHint: "该线路当前已启用。",
13268
13277
  toggleHint: "可在「订阅服务」总览页的该线路卡片上随时停用。"
13269
13278
  };
13270
- const en$14 = {
13279
+ const en$15 = {
13271
13280
  title: "Antigravity (ACP)",
13272
13281
  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.",
13273
13282
  routeOwned: "Model route served by this plugin",
@@ -13359,11 +13368,11 @@ window.__ModuleLoader__.load({
13359
13368
  enabledHint: "This line is enabled.",
13360
13369
  toggleHint: "You can switch it off at any time from its card in the subscription overview."
13361
13370
  };
13362
- const dictionaries$14 = {
13363
- zh: zh$14,
13364
- "zh-CN": zh$14,
13365
- en: en$14,
13366
- "en-US": en$14
13371
+ const dictionaries$15 = {
13372
+ zh: zh$15,
13373
+ "zh-CN": zh$15,
13374
+ en: en$15,
13375
+ "en-US": en$15
13367
13376
  };
13368
13377
  //#endregion
13369
13378
  //#region src/client/providers/antigravity-acp/AntigravityAcpSection.tsx
@@ -13420,7 +13429,7 @@ window.__ModuleLoader__.load({
13420
13429
  setBusy(null);
13421
13430
  }
13422
13431
  }, [props]);
13423
- const t = useLineDict(NS_ANTIGRAVITY_ACP, zh$14);
13432
+ const t = useLineDict(NS_ANTIGRAVITY_ACP, zh$15);
13424
13433
  const models = status?.models ?? [];
13425
13434
  const auth = status?.auth;
13426
13435
  const usage = status?.usage;
@@ -13915,20 +13924,20 @@ window.__ModuleLoader__.load({
13915
13924
  }
13916
13925
  //#endregion
13917
13926
  //#region src/client/providers/aws-quick/api.ts
13918
- const api$13 = createLineApi("/aws-quick/api", "AWS Quick");
13927
+ const api$15 = createLineApi("/aws-quick/api", "AWS Quick");
13919
13928
  const AwsQuickApi = {
13920
- status: () => api$13.get("/status"),
13921
- update: (patch) => api$13.post("/settings", patch),
13922
- refresh: () => api$13.post("/refresh", {}),
13923
- startLogin: () => api$13.post("/login/start", {}),
13924
- cancelLogin: () => api$13.post("/login/cancel", {}),
13925
- prepareTools: () => api$13.post("/tools/prepare", {}),
13926
- logout: () => api$13.post("/logout", {})
13929
+ status: () => api$15.get("/status"),
13930
+ update: (patch) => api$15.post("/settings", patch),
13931
+ refresh: () => api$15.post("/refresh", {}),
13932
+ startLogin: () => api$15.post("/login/start", {}),
13933
+ cancelLogin: () => api$15.post("/login/cancel", {}),
13934
+ prepareTools: () => api$15.post("/tools/prepare", {}),
13935
+ logout: () => api$15.post("/logout", {})
13927
13936
  };
13928
13937
  //#endregion
13929
13938
  //#region src/client/providers/aws-quick/locales.ts
13930
13939
  const NS_AWS_QUICK = "dsh-aws-quick";
13931
- const zh$13 = {
13940
+ const zh$14 = {
13932
13941
  title: "AWS Quick",
13933
13942
  pageDesc: "通过本机 AWS Quick Desktop 官方 agent 使用 Quick 订阅,支持流式文本、思考与三种响应模式。",
13934
13943
  refresh: "刷新状态",
@@ -13983,8 +13992,8 @@ window.__ModuleLoader__.load({
13983
13992
  toolsError: "工具初始化失败",
13984
13993
  toolsHint: "提前创建 Quick 原生连接器;插件不会绕过 Quick 批准。"
13985
13994
  };
13986
- const dictionaries$13 = {
13987
- zh: zh$13,
13995
+ const dictionaries$14 = {
13996
+ zh: zh$14,
13988
13997
  en: {
13989
13998
  title: "AWS Quick",
13990
13999
  pageDesc: "Use an AWS Quick subscription through the official local Quick Desktop agent, with streaming text, reasoning and three response modes.",
@@ -14049,7 +14058,7 @@ window.__ModuleLoader__.load({
14049
14058
  const [error, setError] = (0, react.useState)(null);
14050
14059
  const [selected, setSelected] = (0, react.useState)(null);
14051
14060
  const [binaryPath, setBinaryPath] = (0, react.useState)("");
14052
- const t = useLineDict(NS_AWS_QUICK, zh$13);
14061
+ const t = useLineDict(NS_AWS_QUICK, zh$14);
14053
14062
  const apply = (0, react.useCallback)((next) => {
14054
14063
  setStatus(next);
14055
14064
  setSelected(next.enabledModelIds === null ? null : new Set(next.enabledModelIds));
@@ -14412,6 +14421,792 @@ window.__ModuleLoader__.load({
14412
14421
  ] });
14413
14422
  }
14414
14423
  //#endregion
14424
+ //#region src/shared/opencode-go-contracts.ts
14425
+ /** Public settings contracts for the OpenCode Go subscription line. No secrets cross this module. */
14426
+ const OPENCODE_GO_PROVIDER_ID = "opencode-go";
14427
+ const OPENCODE_GO_PROVIDER_NAME = "OpenCode Go(订阅)";
14428
+ const OPENCODE_GO_ROUTE_PREFIX = "/opencode-go/api";
14429
+ const OPENCODE_GO_REASONING_EFFORTS = [
14430
+ "none",
14431
+ "minimal",
14432
+ "low",
14433
+ "medium",
14434
+ "high",
14435
+ "xhigh",
14436
+ "max"
14437
+ ];
14438
+ //#endregion
14439
+ //#region src/client/providers/opencode-go/locales.ts
14440
+ const NS_OPENCODE_GO = "dsh-opencode-go";
14441
+ const zh$13 = {
14442
+ ...accountPoolZh,
14443
+ title: "OpenCode Go",
14444
+ pageDesc: "使用 OpenCode Go 订阅,管理账号、模型、思考档位与额度。",
14445
+ loading: "加载中...",
14446
+ connection: "连接",
14447
+ testConnection: "测试连接",
14448
+ testingConnection: "测试中...",
14449
+ testSuccess: "连接正常",
14450
+ testFailed: "连接失败",
14451
+ routeOwned: "模型路由由本插件提供",
14452
+ routeConflict: "模型路由已被其他 Provider 占用:{detail}。请移除重复配置后重试。",
14453
+ modelsSection: "模型",
14454
+ otherGroup: "其他",
14455
+ modelsHint: "勾选后模型才会出现在对话页的模型选择列表中。目录与可用能力来自当前账号。",
14456
+ refreshCatalog: "刷新模型目录",
14457
+ refreshingCatalog: "刷新中...",
14458
+ selectAll: "全选",
14459
+ unselectAll: "全不选",
14460
+ enhanced: "思考与上下文",
14461
+ defaultReasoningEffort: "默认思考档位",
14462
+ defaultReasoningEffortHint: "仅显示已勾选模型实际支持的档位;留空时使用模型默认值。",
14463
+ defaultEffortAuto: "使用模型默认值",
14464
+ effortNone: "关闭思考",
14465
+ effortMinimal: "最低 (minimal)",
14466
+ effortLow: "低 (low)",
14467
+ effortMedium: "中 (medium)",
14468
+ effortHigh: "高 (high)",
14469
+ effortXhigh: "很高 (xhigh)",
14470
+ effortMax: "最高 (max)",
14471
+ contextWindowSection: "模型上下文窗口",
14472
+ contextWindowHint: "默认取模型目录的上下文长度,可按模型覆盖。",
14473
+ contextWindowReset: "恢复默认",
14474
+ contextWindowResetAll: "全部恢复默认",
14475
+ contextWindowResetAllConfirm: "确定把所有模型的上下文窗口恢复为默认值吗?",
14476
+ contextWindowNoneEnabled: "还没有勾选模型。",
14477
+ save: "保存",
14478
+ saving: "保存中...",
14479
+ tokens: "tokens",
14480
+ refreshQuota: "刷新额度",
14481
+ refreshingQuota: "刷新中...",
14482
+ quotaEmpty: "尚未读取额度,点击「刷新额度」获取。",
14483
+ planUnknown: "OpenCode Go",
14484
+ kqTotal: "月度共享额度",
14485
+ kqUsedSuffix: "已用",
14486
+ kqTip: "本月额度已使用 {pct}",
14487
+ kqUsed: "已用 {pct}",
14488
+ kqRest: "剩余 {pct}",
14489
+ kqResetAfter: "{time} 重置",
14490
+ kqWindow5h: "5 小时窗口",
14491
+ kqWindowWeekly: "每周窗口",
14492
+ kqRollingNote: "短时请求窗口",
14493
+ kqWeeklyNote: "与月度额度联动扣减",
14494
+ kqNoReset: "重置时间未提供",
14495
+ kqNoLastUsed: "尚未发起请求",
14496
+ kqLastUsed: "最近使用:{time}",
14497
+ kqUpdated: "{time}更新",
14498
+ kqJustNow: "刚刚",
14499
+ kqMinutesAgo: "{n} 分钟前",
14500
+ kqHoursAgo: "{n} 小时前",
14501
+ kqDaysAgo: "{n} 天前",
14502
+ apiKeyLogin: "API Key 登录",
14503
+ apiKeyHint: "粘贴在 OpenCode Console 创建的个人 API Key。Key 仅保存在本机,提交前会先验证。",
14504
+ apiKeyReplaceHint: "为「{alias}」粘贴新的 API Key,账号名称与轮换位置保持不变。",
14505
+ apiKeyPlaceholder: "oc_sk_…",
14506
+ apiKeySubmit: "验证并添加",
14507
+ apiKeyReplace: "替换 Key",
14508
+ apiKeySubmitting: "验证中...",
14509
+ apiKeyEmpty: "请先粘贴 API Key。",
14510
+ authMethod: "认证方式",
14511
+ authMethodApiKey: "个人 API Key",
14512
+ composerLabel: "OpenCode Go 剩余额度"
14513
+ };
14514
+ const en$13 = {
14515
+ ...accountPoolEn,
14516
+ title: "OpenCode Go",
14517
+ pageDesc: "Use an OpenCode Go subscription and manage accounts, models, reasoning levels, and quota.",
14518
+ loading: "Loading...",
14519
+ connection: "Connection",
14520
+ testConnection: "Test connection",
14521
+ testingConnection: "Testing...",
14522
+ testSuccess: "Connection healthy",
14523
+ testFailed: "Connection failed",
14524
+ routeOwned: "This plugin owns the model route",
14525
+ routeConflict: "Another Provider owns this model route: {detail}. Remove the duplicate configuration and retry.",
14526
+ modelsSection: "Models",
14527
+ otherGroup: "Other",
14528
+ modelsHint: "Only checked models appear in the conversation model picker. Capabilities come from the current account catalog.",
14529
+ refreshCatalog: "Refresh catalog",
14530
+ refreshingCatalog: "Refreshing...",
14531
+ selectAll: "Select all",
14532
+ unselectAll: "Clear all",
14533
+ enhanced: "Reasoning and context",
14534
+ defaultReasoningEffort: "Default reasoning effort",
14535
+ defaultReasoningEffortHint: "Only levels supported by checked models are offered. Leave unset for the model default.",
14536
+ defaultEffortAuto: "Use the model default",
14537
+ effortNone: "Disable reasoning",
14538
+ effortMinimal: "Minimal",
14539
+ effortLow: "Low",
14540
+ effortMedium: "Medium",
14541
+ effortHigh: "High",
14542
+ effortXhigh: "Extra high",
14543
+ effortMax: "Maximum",
14544
+ contextWindowSection: "Model context windows",
14545
+ contextWindowHint: "Catalog context lengths are used by default and can be overridden per model.",
14546
+ contextWindowReset: "Reset",
14547
+ contextWindowResetAll: "Reset all",
14548
+ contextWindowResetAllConfirm: "Reset every model context window to its catalog default?",
14549
+ contextWindowNoneEnabled: "No models are checked yet.",
14550
+ save: "Save",
14551
+ saving: "Saving...",
14552
+ tokens: "tokens",
14553
+ refreshQuota: "Refresh quota",
14554
+ refreshingQuota: "Refreshing...",
14555
+ quotaEmpty: "No quota has been read yet. Select Refresh quota to read it.",
14556
+ planUnknown: "OpenCode Go",
14557
+ kqTotal: "Monthly shared allowance",
14558
+ kqUsedSuffix: "used",
14559
+ kqTip: "{pct} of this month’s allowance used",
14560
+ kqUsed: "{pct} used",
14561
+ kqRest: "{pct} left",
14562
+ kqResetAfter: "Resets {time}",
14563
+ kqWindow5h: "5-hour window",
14564
+ kqWindowWeekly: "Weekly window",
14565
+ kqRollingNote: "Short request window",
14566
+ kqWeeklyNote: "Draws from the same monthly allowance",
14567
+ kqNoReset: "No reset time reported",
14568
+ kqNoLastUsed: "No requests yet",
14569
+ kqLastUsed: "Last used: {time}",
14570
+ kqUpdated: "Updated {time}",
14571
+ kqJustNow: "just now",
14572
+ kqMinutesAgo: "{n} min ago",
14573
+ kqHoursAgo: "{n} hr ago",
14574
+ kqDaysAgo: "{n} days ago",
14575
+ apiKeyLogin: "Sign in with API Key",
14576
+ apiKeyHint: "Paste a personal API key created in OpenCode Console. The key stays on this machine and is verified before it is added.",
14577
+ apiKeyReplaceHint: "Paste a new API key for {alias}. Its name and rotation position stay unchanged.",
14578
+ apiKeyPlaceholder: "oc_sk_…",
14579
+ apiKeySubmit: "Verify and add",
14580
+ apiKeyReplace: "Replace Key",
14581
+ apiKeySubmitting: "Verifying...",
14582
+ apiKeyEmpty: "Paste an API Key first.",
14583
+ authMethod: "Authentication",
14584
+ authMethodApiKey: "Personal API Key",
14585
+ composerLabel: "OpenCode Go allowance left"
14586
+ };
14587
+ const dictionaries$13 = {
14588
+ zh: zh$13,
14589
+ "zh-CN": zh$13,
14590
+ en: en$13,
14591
+ "en-US": en$13
14592
+ };
14593
+ //#endregion
14594
+ //#region src/client/providers/opencode-go/OpenCodeGoQuotaCard.tsx
14595
+ function isMonthly(window) {
14596
+ return (window.windowDurationMins ?? 0) >= 43200;
14597
+ }
14598
+ function isRolling(window) {
14599
+ return window.windowDurationMins === 300;
14600
+ }
14601
+ function isWeekly(window) {
14602
+ return window.windowDurationMins === 10080;
14603
+ }
14604
+ function percent(value) {
14605
+ return formatPercent$1(Math.max(0, Math.min(100, value))) + "%";
14606
+ }
14607
+ function ago(t, ms, now) {
14608
+ const minutes = Math.floor(Math.max(0, now - ms) / 6e4);
14609
+ if (minutes < 1) return t.kqJustNow;
14610
+ if (minutes < 60) return t.kqMinutesAgo.replace("{n}", String(minutes));
14611
+ const hours = Math.floor(minutes / 60);
14612
+ if (hours < 24) return t.kqHoursAgo.replace("{n}", String(hours));
14613
+ return t.kqDaysAgo.replace("{n}", String(Math.floor(hours / 24)));
14614
+ }
14615
+ function OpenCodeGoQuotaCard({ quota, planName, lastUsedAt, labels: t }) {
14616
+ const [grown, setGrown] = (0, react.useState)(false);
14617
+ const now = Date.now();
14618
+ (0, react.useEffect)(() => {
14619
+ const frame = requestAnimationFrame(() => setGrown(true));
14620
+ return () => cancelAnimationFrame(frame);
14621
+ }, []);
14622
+ if (quota === void 0) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
14623
+ className: "dsha-muted dshoc-quota-empty",
14624
+ children: t.quotaEmpty
14625
+ });
14626
+ const windows = quota.windows ?? [];
14627
+ const monthly = windows.find(isMonthly) ?? windows.find(isWeekly) ?? windows.find(isRolling);
14628
+ if (monthly === void 0) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
14629
+ className: "dsha-muted dshoc-quota-empty",
14630
+ children: t.quotaEmpty
14631
+ });
14632
+ const rolling = windows.find(isRolling);
14633
+ const weekly = windows.find(isWeekly);
14634
+ const used = Math.max(0, Math.min(100, monthly.usedPercent));
14635
+ const resetAt = monthly.resetsAt;
14636
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
14637
+ className: "dsha-kq dshoc-quota",
14638
+ children: [
14639
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
14640
+ className: "dsha-kq-head",
14641
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
14642
+ className: "dsha-kq-tier",
14643
+ children: planName || t.planUnknown
14644
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
14645
+ className: "dsha-kq-staff",
14646
+ "aria-hidden": "true",
14647
+ children: [
14648
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("i", {}),
14649
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("i", {}),
14650
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("i", {}),
14651
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("i", {}),
14652
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("i", {}),
14653
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("svg", {
14654
+ className: "dshoc-art",
14655
+ xmlns: "http://www.w3.org/2000/svg",
14656
+ width: "140",
14657
+ height: "64",
14658
+ viewBox: "0 0 140 64",
14659
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("g", {
14660
+ fontFamily: "Georgia,'Times New Roman',serif",
14661
+ fontSize: "20",
14662
+ fontWeight: "400",
14663
+ children: [
14664
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("text", {
14665
+ x: "1",
14666
+ y: "26",
14667
+ style: { "--i": 0 },
14668
+ children: "O"
14669
+ }),
14670
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("text", {
14671
+ x: "19",
14672
+ y: "26",
14673
+ style: { "--i": 1 },
14674
+ children: "P"
14675
+ }),
14676
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("text", {
14677
+ x: "35",
14678
+ y: "26",
14679
+ style: { "--i": 2 },
14680
+ children: "E"
14681
+ }),
14682
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("text", {
14683
+ x: "51",
14684
+ y: "26",
14685
+ style: { "--i": 3 },
14686
+ children: "N"
14687
+ }),
14688
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("text", {
14689
+ x: "70",
14690
+ y: "26",
14691
+ style: { "--i": 4 },
14692
+ children: "C"
14693
+ }),
14694
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("text", {
14695
+ x: "87",
14696
+ y: "26",
14697
+ style: { "--i": 5 },
14698
+ children: "O"
14699
+ }),
14700
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("text", {
14701
+ x: "106",
14702
+ y: "26",
14703
+ style: { "--i": 6 },
14704
+ children: "D"
14705
+ }),
14706
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("text", {
14707
+ x: "124",
14708
+ y: "26",
14709
+ style: { "--i": 7 },
14710
+ children: "E"
14711
+ })
14712
+ ]
14713
+ })
14714
+ })
14715
+ ]
14716
+ })]
14717
+ }),
14718
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
14719
+ className: "dsha-kq-total",
14720
+ children: [
14721
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
14722
+ className: "dsha-kq-row",
14723
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
14724
+ className: "dsha-kq-label",
14725
+ children: t.kqTotal
14726
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
14727
+ className: "dsha-kq-value",
14728
+ children: [
14729
+ percent(used),
14730
+ " ",
14731
+ t.kqUsedSuffix
14732
+ ]
14733
+ })]
14734
+ }),
14735
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
14736
+ className: "dsha-kq-barwrap",
14737
+ tabIndex: 0,
14738
+ "aria-label": t.kqTotal + " " + percent(used),
14739
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
14740
+ className: "dsha-kq-meter dsha-kq-meter--total",
14741
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
14742
+ className: "dsha-kq-seg dsha-kq-seg--recent",
14743
+ style: { width: grown ? `${used}%` : "0%" }
14744
+ })
14745
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
14746
+ className: "dsha-kq-tip",
14747
+ role: "tooltip",
14748
+ children: t.kqTip.replace("{pct}", percent(used))
14749
+ })]
14750
+ }),
14751
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
14752
+ className: "dsha-kq-legend",
14753
+ children: [
14754
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
14755
+ className: "dsha-kq-legend-item",
14756
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("i", { className: "dsha-kq-dot dsha-kq-dot--recent" }), t.kqUsed.replace("{pct}", percent(used))]
14757
+ }),
14758
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
14759
+ className: "dsha-kq-legend-item",
14760
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("i", { className: "dsha-kq-dot dsha-kq-dot--rest" }), t.kqRest.replace("{pct}", percent(100 - used))]
14761
+ }),
14762
+ resetAt !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
14763
+ className: "dsha-kq-reset",
14764
+ children: t.kqResetAfter.replace("{time}", formatAccountDate(resetAt))
14765
+ })
14766
+ ]
14767
+ })
14768
+ ]
14769
+ }),
14770
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("hr", { className: "dsha-kq-sep" }),
14771
+ [rolling, weekly].map((window, index) => window === void 0 ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
14772
+ className: "dsha-kq-window",
14773
+ children: [
14774
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
14775
+ className: "dsha-kq-row",
14776
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
14777
+ className: "dsha-kq-window-label",
14778
+ children: index === 0 ? t.kqWindow5h : t.kqWindowWeekly
14779
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
14780
+ className: "dsha-kq-window-pct",
14781
+ children: percent(window.usedPercent)
14782
+ })]
14783
+ }),
14784
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
14785
+ className: "dsha-kq-meter",
14786
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
14787
+ className: index === 0 ? "dsha-kq-seg dsha-kq-seg--recent" : "dsha-kq-seg dsha-kq-seg--cyan",
14788
+ style: { width: grown ? `${Math.max(0, Math.min(100, window.usedPercent))}%` : "0%" }
14789
+ })
14790
+ }),
14791
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
14792
+ className: "dsha-kq-window-meta",
14793
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: index === 0 ? t.kqRollingNote : t.kqWeeklyNote }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: window.resetsAt === null ? t.kqNoReset : t.kqResetAfter.replace("{time}", formatAccountDate(window.resetsAt)) })]
14794
+ })
14795
+ ]
14796
+ }, index)),
14797
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
14798
+ className: "dsha-kq-foot",
14799
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: lastUsedAt === void 0 ? t.kqNoLastUsed : t.kqLastUsed.replace("{time}", formatAccountDate(lastUsedAt)) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t.kqUpdated.replace("{time}", ago(t, quota.fetchedAt, now)) })]
14800
+ })
14801
+ ]
14802
+ });
14803
+ }
14804
+ //#endregion
14805
+ //#region src/client/providers/opencode-go/OpenCodeGoSection.tsx
14806
+ const api$14 = createLineApi("/opencode-go/api", "OpenCode Go");
14807
+ const QUOTA_POLL_MS$1 = 3e4;
14808
+ function OpenCodeGoSection({ onModelChange, loadModelDirectory }) {
14809
+ const t = useLineDict(NS_OPENCODE_GO, zh$13);
14810
+ const [status, setStatus] = (0, react.useState)(null);
14811
+ const [loading, setLoading] = (0, react.useState)(true);
14812
+ const [busy, setBusy] = (0, react.useState)(null);
14813
+ const [error, setError] = (0, react.useState)(null);
14814
+ const [apiKeyOpen, setApiKeyOpen] = (0, react.useState)(false);
14815
+ const [apiKeyValue, setApiKeyValue] = (0, react.useState)("");
14816
+ const [apiKeyTarget, setApiKeyTarget] = (0, react.useState)(null);
14817
+ const [contextDrafts, setContextDrafts] = (0, react.useState)({});
14818
+ const [savingModel, setSavingModel] = (0, react.useState)(null);
14819
+ const quotaRequest = (0, react.useRef)(null);
14820
+ const authenticated = status?.authenticated === true;
14821
+ const notifyChange = (0, react.useCallback)(() => {
14822
+ onModelChange?.();
14823
+ loadModelDirectory?.();
14824
+ }, [onModelChange, loadModelDirectory]);
14825
+ const applyStatus = (0, react.useCallback)((next) => {
14826
+ setStatus(next);
14827
+ setContextDrafts(contextDraftsFor(next));
14828
+ }, []);
14829
+ const load = (0, react.useCallback)(async () => {
14830
+ try {
14831
+ setError(null);
14832
+ applyStatus(await api$14.get("/status"));
14833
+ } catch (err) {
14834
+ setError(err instanceof Error ? err.message : String(err));
14835
+ } finally {
14836
+ setLoading(false);
14837
+ }
14838
+ }, [applyStatus]);
14839
+ (0, react.useEffect)(() => {
14840
+ load();
14841
+ }, [load]);
14842
+ const requestQuota = (0, react.useCallback)(() => {
14843
+ quotaRequest.current ??= api$14.post("/quota/refresh").finally(() => {
14844
+ quotaRequest.current = null;
14845
+ });
14846
+ return quotaRequest.current;
14847
+ }, []);
14848
+ (0, react.useEffect)(() => {
14849
+ if (!authenticated || busy !== null) return;
14850
+ let active = true;
14851
+ const timer = window.setInterval(async () => {
14852
+ if (document.hidden || quotaRequest.current !== null) return;
14853
+ try {
14854
+ const next = await requestQuota();
14855
+ if (!active) return;
14856
+ const accounts = new Map(next.accounts.map((account) => [account.id, account]));
14857
+ setStatus((current) => current === null ? current : {
14858
+ ...current,
14859
+ quotaError: next.quotaError,
14860
+ accounts: current.accounts.map((account) => {
14861
+ const update = accounts.get(account.id);
14862
+ return update === void 0 ? account : {
14863
+ ...account,
14864
+ quota: update.quota,
14865
+ planName: update.planName,
14866
+ lastUsedAt: update.lastUsedAt
14867
+ };
14868
+ })
14869
+ });
14870
+ } catch {}
14871
+ }, QUOTA_POLL_MS$1);
14872
+ return () => {
14873
+ active = false;
14874
+ window.clearInterval(timer);
14875
+ };
14876
+ }, [
14877
+ authenticated,
14878
+ busy,
14879
+ requestQuota
14880
+ ]);
14881
+ const commit = (0, react.useCallback)(async (kind, action, notify = true) => {
14882
+ try {
14883
+ setBusy(kind);
14884
+ setError(null);
14885
+ applyStatus(await action());
14886
+ if (notify) notifyChange();
14887
+ } catch (err) {
14888
+ setError(err instanceof Error ? err.message : String(err));
14889
+ } finally {
14890
+ setBusy(null);
14891
+ }
14892
+ }, [applyStatus, notifyChange]);
14893
+ const submitKey = async () => {
14894
+ const apiKey = apiKeyValue.trim();
14895
+ if (apiKey === "") {
14896
+ setError(t.apiKeyEmpty);
14897
+ return;
14898
+ }
14899
+ await commit("login", () => api$14.post("/accounts", {
14900
+ apiKey,
14901
+ ...apiKeyTarget === null ? {} : { accountId: apiKeyTarget }
14902
+ }));
14903
+ setApiKeyValue("");
14904
+ setApiKeyTarget(null);
14905
+ setApiKeyOpen(false);
14906
+ };
14907
+ const accountAction = (action, accountId, extra = {}) => commit("account", () => api$14.post("/accounts/action", {
14908
+ action,
14909
+ accountId,
14910
+ ...extra
14911
+ }));
14912
+ const saveSettings = (patch, kind = "settings") => commit(kind, () => api$14.post("/settings", patch));
14913
+ const setModelGroup = (ids, enabled) => {
14914
+ if (status === null) return;
14915
+ const current = status.models.filter((model) => model.enabled).map((model) => model.id);
14916
+ saveSettings({ enabledModelIds: nextGroupSelection(current, ids, enabled) });
14917
+ };
14918
+ const setAllModels = (enabled) => {
14919
+ if (status !== null) saveSettings({ enabledModelIds: enabled ? status.models.map((model) => model.id) : [] });
14920
+ };
14921
+ const saveContext = async (id) => {
14922
+ const parsed = parsePositiveCapacity$1(contextDrafts[id] ?? "");
14923
+ if (parsed === null) {
14924
+ setError(t.contextWindowHint);
14925
+ return;
14926
+ }
14927
+ setSavingModel(id);
14928
+ await commit("context", () => api$14.post("/settings", { contextWindowOverrides: { [id]: parsed } }), false);
14929
+ setSavingModel(null);
14930
+ };
14931
+ const resetContext = async (id) => {
14932
+ setSavingModel(id);
14933
+ await commit("context", () => api$14.post("/settings", { contextWindowOverrides: { [id]: null } }), false);
14934
+ setSavingModel(null);
14935
+ };
14936
+ const resetAllContexts = async () => {
14937
+ if (status === null || !window.confirm(t.contextWindowResetAllConfirm)) return;
14938
+ await commit("context", () => api$14.post("/settings", { contextWindowOverrides: Object.fromEntries(Object.keys(status.contextWindowOverrides).map((id) => [id, null])) }), false);
14939
+ };
14940
+ if (loading) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
14941
+ className: "dsha-page",
14942
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
14943
+ className: "dsha-empty",
14944
+ children: t.loading
14945
+ })
14946
+ });
14947
+ const models = status?.models ?? [];
14948
+ const enabledModels = models.filter((model) => model.enabled);
14949
+ const offeredEfforts = OPENCODE_GO_REASONING_EFFORTS.filter((effort) => enabledModels.some((model) => model.reasoningEfforts.includes(effort)));
14950
+ const apiKeyTargetAlias = apiKeyTarget === null ? null : status?.accounts.find((account) => account.id === apiKeyTarget)?.alias ?? apiKeyTarget;
14951
+ const effortLabel = (effort) => ({
14952
+ none: t.effortNone,
14953
+ minimal: t.effortMinimal,
14954
+ low: t.effortLow,
14955
+ medium: t.effortMedium,
14956
+ high: t.effortHigh,
14957
+ xhigh: t.effortXhigh,
14958
+ max: t.effortMax
14959
+ })[effort];
14960
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
14961
+ className: "dsha-page dshoc-page",
14962
+ children: [
14963
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(AccountPoolSection, {
14964
+ accounts: status?.accounts ?? [],
14965
+ activeAccountId: status?.activeAccountId,
14966
+ rotationStrategy: status?.rotationStrategy ?? "sequential",
14967
+ busy,
14968
+ labels: t,
14969
+ onLogin: () => {
14970
+ setApiKeyTarget(null);
14971
+ setApiKeyOpen((value) => !value);
14972
+ },
14973
+ renderLoginActions: () => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
14974
+ className: "dsha-btn dsha-btn-primary",
14975
+ disabled: busy !== null,
14976
+ "aria-expanded": apiKeyOpen,
14977
+ onClick: () => {
14978
+ setApiKeyTarget(null);
14979
+ setApiKeyOpen((value) => !value);
14980
+ },
14981
+ children: t.apiKeyLogin
14982
+ }),
14983
+ renderDetails: () => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", { children: [
14984
+ t.authMethod,
14985
+ ": ",
14986
+ t.authMethodApiKey
14987
+ ] }),
14988
+ renderAccountActions: (account) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
14989
+ className: "dsha-btn",
14990
+ disabled: busy !== null,
14991
+ onClick: () => {
14992
+ setApiKeyTarget(account.id);
14993
+ setApiKeyOpen(true);
14994
+ },
14995
+ children: t.apiKeyReplace
14996
+ }),
14997
+ onSetPrimary: (accountId) => void accountAction("set-primary", accountId),
14998
+ onDelete: (accountId) => void accountAction("delete", accountId),
14999
+ onClearCooldown: (accountId) => void accountAction("clear-cooldown", accountId),
15000
+ onRelogin: (accountId) => {
15001
+ setApiKeyTarget(accountId);
15002
+ setApiKeyOpen(true);
15003
+ },
15004
+ onSetStrategy: (strategy) => void accountAction("strategy", void 0, { strategy }),
15005
+ showQuota: true,
15006
+ accountCardClassName: "dsha-account-card--kimi dshoc-account",
15007
+ omitDetails: ["lastUsed", "expires"],
15008
+ renderQuota: (account) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(OpenCodeGoQuotaCard, {
15009
+ quota: account.quota,
15010
+ planName: account.planName,
15011
+ lastUsedAt: account.lastUsedAt,
15012
+ labels: t
15013
+ }),
15014
+ children: [
15015
+ apiKeyOpen && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
15016
+ className: "dshoc-apikey",
15017
+ id: "dshoc-apikey-body",
15018
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
15019
+ className: "dsha-muted",
15020
+ children: apiKeyTargetAlias === null ? t.apiKeyHint : t.apiKeyReplaceHint.replace("{alias}", apiKeyTargetAlias)
15021
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
15022
+ className: "dshoc-apikey-row",
15023
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
15024
+ type: "password",
15025
+ className: "dsha-select",
15026
+ autoComplete: "off",
15027
+ spellCheck: false,
15028
+ "aria-label": t.apiKeyLogin,
15029
+ placeholder: t.apiKeyPlaceholder,
15030
+ value: apiKeyValue,
15031
+ disabled: busy !== null,
15032
+ onChange: (event) => setApiKeyValue(event.currentTarget.value),
15033
+ onKeyDown: (event) => {
15034
+ if (event.key === "Enter") submitKey();
15035
+ }
15036
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
15037
+ className: "dsha-btn dsha-btn-primary",
15038
+ disabled: busy !== null || apiKeyValue.trim() === "",
15039
+ onClick: () => void submitKey(),
15040
+ children: busy === "login" ? t.apiKeySubmitting : t.apiKeySubmit
15041
+ })]
15042
+ })]
15043
+ }),
15044
+ status?.quotaError != null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
15045
+ className: "dsha-notice",
15046
+ children: status.quotaError
15047
+ }),
15048
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
15049
+ className: "dsha-actions",
15050
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
15051
+ className: "dsha-btn",
15052
+ disabled: busy !== null || !status?.authenticated,
15053
+ onClick: () => void commit("quota", requestQuota, false),
15054
+ children: busy === "quota" ? t.refreshingQuota : t.refreshQuota
15055
+ })
15056
+ })
15057
+ ]
15058
+ }),
15059
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", {
15060
+ className: "dsha-group",
15061
+ children: [
15062
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
15063
+ className: "dsha-grouphead",
15064
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("h3", { children: t.connection })
15065
+ }),
15066
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
15067
+ className: "dsha-notice",
15068
+ children: status?.serving === false && status.conflict ? t.routeConflict.replace("{detail}", status.conflict) : t.routeOwned
15069
+ }),
15070
+ status?.connection !== null && status?.connection !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("p", {
15071
+ className: "dsha-muted",
15072
+ children: [
15073
+ status.connection.connected ? t.testSuccess : t.testFailed,
15074
+ status.connection.model === null ? "" : " · " + status.connection.model,
15075
+ status.connection.error === void 0 ? "" : " · " + status.connection.error
15076
+ ]
15077
+ }),
15078
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
15079
+ className: "dsha-actions",
15080
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
15081
+ className: "dsha-btn",
15082
+ disabled: busy !== null || !status?.authenticated,
15083
+ onClick: async () => {
15084
+ try {
15085
+ setBusy("connection");
15086
+ setError(null);
15087
+ const result = await api$14.post("/connection/test");
15088
+ setStatus((current) => current === null ? current : {
15089
+ ...current,
15090
+ connection: result
15091
+ });
15092
+ } catch (err) {
15093
+ setError(err instanceof Error ? err.message : String(err));
15094
+ } finally {
15095
+ setBusy(null);
15096
+ }
15097
+ },
15098
+ children: busy === "connection" ? t.testingConnection : t.testConnection
15099
+ })
15100
+ })
15101
+ ]
15102
+ }),
15103
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", {
15104
+ className: "dsha-group",
15105
+ children: [
15106
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
15107
+ className: "dsha-grouphead",
15108
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("h3", { children: t.modelsSection }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
15109
+ className: "dsha-btn",
15110
+ disabled: busy !== null || !status?.authenticated,
15111
+ onClick: () => void commit("catalog", () => api$14.post("/models/refresh")),
15112
+ children: busy === "catalog" ? t.refreshingCatalog : t.refreshCatalog
15113
+ })]
15114
+ }),
15115
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
15116
+ className: "dsha-muted dsha-models-hint",
15117
+ children: t.modelsHint
15118
+ }),
15119
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ModelChecklist, {
15120
+ items: models.map((model) => ({
15121
+ id: model.id,
15122
+ name: model.name,
15123
+ hint: model.hint,
15124
+ enabled: model.enabled,
15125
+ group: modelVendorGroup(model.canonicalId ?? model.id, t.otherGroup)
15126
+ })),
15127
+ busy: busy !== null,
15128
+ onToggle: (id, enabled) => setModelGroup([id], enabled),
15129
+ onToggleAll: setAllModels,
15130
+ onToggleGroup: setModelGroup,
15131
+ groupByVendor: true,
15132
+ labels: {
15133
+ selectAll: t.selectAll,
15134
+ clearAll: t.unselectAll,
15135
+ list: t.modelsSection
15136
+ }
15137
+ })
15138
+ ]
15139
+ }),
15140
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", {
15141
+ className: "dsha-group",
15142
+ children: [
15143
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
15144
+ className: "dsha-grouphead",
15145
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("h3", { children: t.enhanced })
15146
+ }),
15147
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
15148
+ className: "dsha-pref-row",
15149
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: t.defaultReasoningEffort }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
15150
+ className: "dsha-muted",
15151
+ children: t.defaultReasoningEffortHint
15152
+ })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("select", {
15153
+ className: "dsha-select",
15154
+ "aria-label": t.defaultReasoningEffort,
15155
+ value: status?.defaultReasoningEffort ?? "",
15156
+ disabled: busy !== null,
15157
+ onChange: (event) => {
15158
+ const value = event.currentTarget.value;
15159
+ saveSettings({ defaultReasoningEffort: value === "" ? null : value });
15160
+ },
15161
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
15162
+ value: "",
15163
+ children: t.defaultEffortAuto
15164
+ }), offeredEfforts.map((effort) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
15165
+ value: effort,
15166
+ children: effortLabel(effort)
15167
+ }, effort))]
15168
+ })]
15169
+ }),
15170
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ContextWindowEditor, {
15171
+ rows: enabledModels.map((model) => ({
15172
+ id: model.id,
15173
+ name: model.name,
15174
+ draft: contextDrafts[model.id] ?? formatCapacity$1(model.defaultContextWindow),
15175
+ meta: model.contextWindow > model.defaultContextWindow ? formatCapacity$1(model.contextWindow) : void 0,
15176
+ inputLabel: model.name,
15177
+ hasOverride: status?.contextWindowOverrides[model.id] !== void 0,
15178
+ saving: savingModel === model.id
15179
+ })),
15180
+ labels: {
15181
+ tokens: t.tokens,
15182
+ save: t.save,
15183
+ saving: t.saving,
15184
+ reset: t.contextWindowReset,
15185
+ resetAll: t.contextWindowResetAll,
15186
+ empty: t.contextWindowNoneEnabled
15187
+ },
15188
+ busy: busy !== null,
15189
+ overrideCount: Object.keys(status?.contextWindowOverrides ?? {}).length,
15190
+ onDraftChange: (id, draft) => setContextDrafts((current) => ({
15191
+ ...current,
15192
+ [id]: draft
15193
+ })),
15194
+ onCommit: (id) => void saveContext(id),
15195
+ onReset: (id) => void resetContext(id),
15196
+ onResetAll: () => void resetAllContexts()
15197
+ })
15198
+ ]
15199
+ }),
15200
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(LineProxySection, { line: "opencode-go" }),
15201
+ error !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
15202
+ className: "dsha-error",
15203
+ role: "alert",
15204
+ children: error
15205
+ })
15206
+ ]
15207
+ });
15208
+ }
15209
+ //#endregion
14415
15210
  //#region src/client/providers/step-code/locales.ts
14416
15211
  /**
14417
15212
  * Step Code(Step Plan 订阅)线路的客户端命名空间。
@@ -14827,9 +15622,9 @@ window.__ModuleLoader__.load({
14827
15622
  /**
14828
15623
  * 本线路的 host 路由由这一个文件描述,卡片与输入框胶囊都从这里取。
14829
15624
  */
14830
- const api$12 = createLineApi(STEP_CODE_ROUTE_PREFIX, STEP_CODE_PROVIDER_NAME);
14831
- const get$4 = api$12.get;
14832
- const post$4 = api$12.post;
15625
+ const api$13 = createLineApi(STEP_CODE_ROUTE_PREFIX, STEP_CODE_PROVIDER_NAME);
15626
+ const get$4 = api$13.get;
15627
+ const post$4 = api$13.post;
14833
15628
  function messageOf$4(cause) {
14834
15629
  return cause instanceof Error ? cause.message : String(cause);
14835
15630
  }
@@ -16329,7 +17124,7 @@ window.__ModuleLoader__.load({
16329
17124
  }
16330
17125
  //#endregion
16331
17126
  //#region src/client/providers/cline-pass/api.ts
16332
- const api$11 = createLineApi(CLINE_PASS_ROUTE_PREFIX, "Cline Pass");
17127
+ const api$12 = createLineApi(CLINE_PASS_ROUTE_PREFIX, "Cline Pass");
16333
17128
  /**
16334
17129
  * Whether the host is refreshing the quota behind this answer.
16335
17130
  *
@@ -16360,62 +17155,62 @@ window.__ModuleLoader__.load({
16360
17155
  * raw quota payload.
16361
17156
  */
16362
17157
  status(refresh = false) {
16363
- if (!refresh) return api$11.get("/status");
16364
- return api$11.post("/usage", {}).then((outcome) => outcome.status);
17158
+ if (!refresh) return api$12.get("/status");
17159
+ return api$12.post("/usage", {}).then((outcome) => outcome.status);
16365
17160
  }
16366
17161
  updateSettings(patch) {
16367
- return api$11.post("/settings", patch).then(() => this.status());
17162
+ return api$12.post("/settings", patch).then(() => this.status());
16368
17163
  }
16369
17164
  accountAction(action, body = {}) {
16370
- return api$11.post("/accounts", {
17165
+ return api$12.post("/accounts", {
16371
17166
  action,
16372
17167
  ...body
16373
17168
  });
16374
17169
  }
16375
17170
  /** Verify a key without storing it; the host answers the verdict directly. */
16376
17171
  testKey(body) {
16377
- return api$11.post("/accounts", {
17172
+ return api$12.post("/accounts", {
16378
17173
  action: "test",
16379
17174
  ...body
16380
17175
  });
16381
17176
  }
16382
17177
  /** Start the Cline device-code sign-in. */
16383
17178
  startLogin() {
16384
- return api$11.post("/login/start", {});
17179
+ return api$12.post("/login/start", {});
16385
17180
  }
16386
17181
  /** One poll of the pending sign-in; the host throttles it to WorkOS's interval. */
16387
17182
  loginStatus(id) {
16388
- return api$11.get(`/login/status?id=${encodeURIComponent(id)}`);
17183
+ return api$12.get(`/login/status?id=${encodeURIComponent(id)}`);
16389
17184
  }
16390
17185
  cancelLogin(id) {
16391
- return api$11.post("/login/cancel", { id });
17186
+ return api$12.post("/login/cancel", { id });
16392
17187
  }
16393
17188
  setEnabledModels(enabledModelIds) {
16394
- return api$11.post("/models", { enabledModelIds });
17189
+ return api$12.post("/models", { enabledModelIds });
16395
17190
  }
16396
17191
  setContextWindow(model, contextWindow) {
16397
- return api$11.post("/models/context-window", {
17192
+ return api$12.post("/models/context-window", {
16398
17193
  model,
16399
17194
  contextWindow
16400
17195
  });
16401
17196
  }
16402
17197
  test(model) {
16403
- return api$11.post("/models/test", { model });
17198
+ return api$12.post("/models/test", { model });
16404
17199
  }
16405
17200
  setVisibility(model, visible) {
16406
- return api$11.post("/models/visibility", {
17201
+ return api$12.post("/models/visibility", {
16407
17202
  model,
16408
17203
  visible
16409
17204
  });
16410
17205
  }
16411
17206
  setVisibilityAll(mode) {
16412
- return api$11.post("/models/visibility-all", { mode });
17207
+ return api$12.post("/models/visibility-all", { mode });
16413
17208
  }
16414
17209
  refreshCatalog() {
16415
- return api$11.post("/catalog/refresh", {});
17210
+ return api$12.post("/catalog/refresh", {});
16416
17211
  }
16417
17212
  searchCatalog(query) {
16418
- return api$11.get("/catalog/search?q=" + encodeURIComponent(query));
17213
+ return api$12.get("/catalog/search?q=" + encodeURIComponent(query));
16419
17214
  }
16420
17215
  /**
16421
17216
  * Add one search hit.
@@ -16424,20 +17219,20 @@ window.__ModuleLoader__.load({
16424
17219
  * refuses it until the caller acknowledges that (`acknowledgeBilling`).
16425
17220
  */
16426
17221
  addCatalogModel(model, acknowledgeBilling = false) {
16427
- return api$11.post("/catalog/add", acknowledgeBilling ? {
17222
+ return api$12.post("/catalog/add", acknowledgeBilling ? {
16428
17223
  model,
16429
17224
  acknowledgeBilling: true
16430
17225
  } : { model });
16431
17226
  }
16432
17227
  readUsage() {
16433
- return api$11.post("/usage", {});
17228
+ return api$12.post("/usage", {});
16434
17229
  }
16435
17230
  history(limit = 25, model = "") {
16436
17231
  const query = new URLSearchParams({
16437
17232
  limit: String(limit),
16438
17233
  ...model === "" ? {} : { model }
16439
17234
  });
16440
- return api$11.get("/history?" + query.toString());
17235
+ return api$12.get("/history?" + query.toString());
16441
17236
  }
16442
17237
  };
16443
17238
  //#endregion
@@ -18124,9 +18919,9 @@ window.__ModuleLoader__.load({
18124
18919
  * 凭据边界也写在这里:/login/manual 的请求体是本文件里**唯一**带秘密的形状,
18125
18920
  * 它只在这个函数调用点的字面量里出现,既不进 URL、也不进日志。
18126
18921
  */
18127
- const api$10 = createLineApi(QODER_ROUTE_PREFIX, QODER_PROVIDER_NAME);
18128
- const get$3 = api$10.get;
18129
- const post$3 = api$10.post;
18922
+ const api$11 = createLineApi(QODER_ROUTE_PREFIX, QODER_PROVIDER_NAME);
18923
+ const get$3 = api$11.get;
18924
+ const post$3 = api$11.post;
18130
18925
  function messageOf$3(cause) {
18131
18926
  return cause instanceof Error ? cause.message : String(cause);
18132
18927
  }
@@ -19259,7 +20054,7 @@ window.__ModuleLoader__.load({
19259
20054
  const OPENDESIGN_ROUTE_PREFIX = "/opendesign/api";
19260
20055
  //#endregion
19261
20056
  //#region src/client/providers/opendesign/api.ts
19262
- const api$9 = createLineApi(OPENDESIGN_ROUTE_PREFIX, "OpenDesign");
20057
+ const api$10 = createLineApi(OPENDESIGN_ROUTE_PREFIX, "OpenDesign");
19263
20058
  /**
19264
20059
  * The OpenDesign settings API, as the card uses it.
19265
20060
  *
@@ -19268,59 +20063,59 @@ window.__ModuleLoader__.load({
19268
20063
  */
19269
20064
  var OpenDesignApi = class {
19270
20065
  status() {
19271
- return api$9.get("/status");
20066
+ return api$10.get("/status");
19272
20067
  }
19273
20068
  updateSettings(patch) {
19274
- return api$9.post("/settings", patch).then(() => this.status());
20069
+ return api$10.post("/settings", patch).then(() => this.status());
19275
20070
  }
19276
20071
  accountAction(action, body = {}) {
19277
- return api$9.post("/accounts", {
20072
+ return api$10.post("/accounts", {
19278
20073
  action,
19279
20074
  ...body
19280
20075
  });
19281
20076
  }
19282
20077
  /** Verify a key without storing it; the host answers the verdict directly. */
19283
20078
  testKey(body) {
19284
- return api$9.post("/accounts", {
20079
+ return api$10.post("/accounts", {
19285
20080
  action: "test",
19286
20081
  ...body
19287
20082
  });
19288
20083
  }
19289
20084
  /** Start the browser device-authorization sign-in. */
19290
20085
  startLogin() {
19291
- return api$9.post("/login/start", {});
20086
+ return api$10.post("/login/start", {});
19292
20087
  }
19293
20088
  /** One poll of the pending sign-in; the host throttles it to the advertised interval. */
19294
20089
  loginStatus(id) {
19295
- return api$9.get(`/login/status?id=${encodeURIComponent(id)}`);
20090
+ return api$10.get(`/login/status?id=${encodeURIComponent(id)}`);
19296
20091
  }
19297
20092
  cancelLogin(id) {
19298
- return api$9.post("/login/cancel", { id });
20093
+ return api$10.post("/login/cancel", { id });
19299
20094
  }
19300
20095
  /** Read each OAuth account's wallet balance once (one upstream call per account). */
19301
20096
  readUsage() {
19302
- return api$9.post("/usage", {});
20097
+ return api$10.post("/usage", {});
19303
20098
  }
19304
20099
  setEnabledModels(enabledModelIds) {
19305
- return api$9.post("/models", { enabledModelIds });
20100
+ return api$10.post("/models", { enabledModelIds });
19306
20101
  }
19307
20102
  setContextWindow(model, contextWindow) {
19308
- return api$9.post("/models/context-window", {
20103
+ return api$10.post("/models/context-window", {
19309
20104
  model,
19310
20105
  contextWindow
19311
20106
  });
19312
20107
  }
19313
20108
  setVisibility(model, visible) {
19314
- return api$9.post("/models/visibility", {
20109
+ return api$10.post("/models/visibility", {
19315
20110
  model,
19316
20111
  visible
19317
20112
  });
19318
20113
  }
19319
20114
  setVisibilityAll(mode) {
19320
- return api$9.post("/models/visibility-all", { mode });
20115
+ return api$10.post("/models/visibility-all", { mode });
19321
20116
  }
19322
20117
  refreshCatalog() {
19323
- return api$9.post("/catalog/refresh", {});
20118
+ return api$10.post("/catalog/refresh", {});
19324
20119
  }
19325
20120
  };
19326
20121
  //#endregion
@@ -20909,7 +21704,7 @@ window.__ModuleLoader__.load({
20909
21704
  * is exactly what a stale host half produces) be reported as such instead of as
20910
21705
  * a bare "Unexpected end of JSON input".
20911
21706
  */
20912
- const api$8 = createLineApi(API$3, "WorkBuddy");
21707
+ const api$9 = createLineApi(API$3, "WorkBuddy");
20913
21708
  /**
20914
21709
  * Reasoning levels the default-effort control may offer.
20915
21710
  *
@@ -20978,7 +21773,7 @@ window.__ModuleLoader__.load({
20978
21773
  const loadStatus = (0, react.useCallback)(async (quiet = false) => {
20979
21774
  if (!quiet) setError(null);
20980
21775
  try {
20981
- const data = await api$8.request("/status");
21776
+ const data = await api$9.request("/status");
20982
21777
  const normalized = normalizeStatus(data);
20983
21778
  setStatus(normalized);
20984
21779
  setStatusFailed(false);
@@ -21013,7 +21808,7 @@ window.__ModuleLoader__.load({
21013
21808
  try {
21014
21809
  setBusy("rescan");
21015
21810
  setError(null);
21016
- const updated = await api$8.request("/rescan", { method: "POST" });
21811
+ const updated = await api$9.request("/rescan", { method: "POST" });
21017
21812
  setStatus(normalizeStatus(updated));
21018
21813
  notifyChange();
21019
21814
  } catch (err) {
@@ -21027,7 +21822,7 @@ window.__ModuleLoader__.load({
21027
21822
  setBusy(`login:${region}`);
21028
21823
  setError(null);
21029
21824
  setLoginProgress(t.loginWaiting);
21030
- const flow = await api$8.request("/accounts/login", {
21825
+ const flow = await api$9.request("/accounts/login", {
21031
21826
  method: "POST",
21032
21827
  body: JSON.stringify({ region })
21033
21828
  });
@@ -21037,7 +21832,7 @@ window.__ModuleLoader__.load({
21037
21832
  const timer = window.setInterval(() => {
21038
21833
  (async () => {
21039
21834
  try {
21040
- const poll = await api$8.request("/accounts/login/status");
21835
+ const poll = await api$9.request("/accounts/login/status");
21041
21836
  if (poll.progress) setLoginProgress(poll.progress);
21042
21837
  if (poll.status === "complete") {
21043
21838
  window.clearInterval(timer);
@@ -21046,7 +21841,7 @@ window.__ModuleLoader__.load({
21046
21841
  loginTimeoutRef.current = null;
21047
21842
  setBusy(null);
21048
21843
  setLoginProgress(null);
21049
- if (poll.accountId) await api$8.request("/settings", {
21844
+ if (poll.accountId) await api$9.request("/settings", {
21050
21845
  method: "POST",
21051
21846
  body: JSON.stringify({ selectedAccountId: poll.accountId })
21052
21847
  });
@@ -21086,7 +21881,7 @@ window.__ModuleLoader__.load({
21086
21881
  try {
21087
21882
  setBusy(`${action}:${accountId}`);
21088
21883
  setError(null);
21089
- const updated = await api$8.request("/accounts/action", {
21884
+ const updated = await api$9.request("/accounts/action", {
21090
21885
  method: "POST",
21091
21886
  body: JSON.stringify({
21092
21887
  action,
@@ -21109,7 +21904,7 @@ window.__ModuleLoader__.load({
21109
21904
  try {
21110
21905
  setBusy("strategy");
21111
21906
  setError(null);
21112
- const updated = await api$8.request("/accounts/strategy", {
21907
+ const updated = await api$9.request("/accounts/strategy", {
21113
21908
  method: "POST",
21114
21909
  body: JSON.stringify({ strategy })
21115
21910
  });
@@ -21124,7 +21919,7 @@ window.__ModuleLoader__.load({
21124
21919
  try {
21125
21920
  setBusy("connection");
21126
21921
  setError(null);
21127
- setConnection(await api$8.request("/connection/test", { method: "POST" }));
21922
+ setConnection(await api$9.request("/connection/test", { method: "POST" }));
21128
21923
  } catch (err) {
21129
21924
  setError(err instanceof Error ? err.message : String(err));
21130
21925
  } finally {
@@ -21135,7 +21930,7 @@ window.__ModuleLoader__.load({
21135
21930
  try {
21136
21931
  setBusy("quota");
21137
21932
  setError(null);
21138
- const updated = await api$8.request("/quota", { method: "POST" });
21933
+ const updated = await api$9.request("/quota", { method: "POST" });
21139
21934
  setStatus(updated);
21140
21935
  } catch (err) {
21141
21936
  setError(err instanceof Error ? err.message : String(err));
@@ -21147,7 +21942,7 @@ window.__ModuleLoader__.load({
21147
21942
  try {
21148
21943
  setBusy("checkin");
21149
21944
  setError(null);
21150
- const updated = await api$8.request("/checkin/now", { method: "POST" });
21945
+ const updated = await api$9.request("/checkin/now", { method: "POST" });
21151
21946
  setStatus(normalizeStatus(updated));
21152
21947
  } catch (err) {
21153
21948
  setError(err instanceof Error ? err.message : String(err));
@@ -21159,7 +21954,7 @@ window.__ModuleLoader__.load({
21159
21954
  try {
21160
21955
  setBusy("checkin");
21161
21956
  setError(null);
21162
- const updated = await api$8.request("/settings", {
21957
+ const updated = await api$9.request("/settings", {
21163
21958
  method: "POST",
21164
21959
  body: JSON.stringify({ checkin })
21165
21960
  });
@@ -21175,7 +21970,7 @@ window.__ModuleLoader__.load({
21175
21970
  try {
21176
21971
  setBusy("outbound");
21177
21972
  setError(null);
21178
- const updated = await api$8.request("/settings", {
21973
+ const updated = await api$9.request("/settings", {
21179
21974
  method: "POST",
21180
21975
  body: JSON.stringify({ outboundIdentity })
21181
21976
  });
@@ -21191,7 +21986,7 @@ window.__ModuleLoader__.load({
21191
21986
  try {
21192
21987
  setBusy("guardrails");
21193
21988
  setError(null);
21194
- const updated = await api$8.request("/settings", {
21989
+ const updated = await api$9.request("/settings", {
21195
21990
  method: "POST",
21196
21991
  body: JSON.stringify({ guardrails })
21197
21992
  });
@@ -21207,7 +22002,7 @@ window.__ModuleLoader__.load({
21207
22002
  try {
21208
22003
  setBusy("atrest");
21209
22004
  setError(null);
21210
- const updated = await api$8.request("/at-rest-key", {
22005
+ const updated = await api$9.request("/at-rest-key", {
21211
22006
  method: "POST",
21212
22007
  body: JSON.stringify({ key })
21213
22008
  });
@@ -21223,7 +22018,7 @@ window.__ModuleLoader__.load({
21223
22018
  try {
21224
22019
  setBusy("atrest");
21225
22020
  setError(null);
21226
- const updated = await api$8.request("/at-rest-key", { method: "DELETE" });
22021
+ const updated = await api$9.request("/at-rest-key", { method: "DELETE" });
21227
22022
  setStatus(normalizeStatus(updated));
21228
22023
  } catch (err) {
21229
22024
  setError(err instanceof Error ? err.message : String(err));
@@ -21238,7 +22033,7 @@ window.__ModuleLoader__.load({
21238
22033
  try {
21239
22034
  setBusy(`model:${modelId}`);
21240
22035
  setError(null);
21241
- const normalized = normalizeStatus(await api$8.request("/settings", {
22036
+ const normalized = normalizeStatus(await api$9.request("/settings", {
21242
22037
  method: "POST",
21243
22038
  body: JSON.stringify({ enabledModelIds: next })
21244
22039
  }));
@@ -21256,7 +22051,7 @@ window.__ModuleLoader__.load({
21256
22051
  try {
21257
22052
  setBusy("models-all");
21258
22053
  setError(null);
21259
- const normalized = normalizeStatus(await api$8.request("/settings", {
22054
+ const normalized = normalizeStatus(await api$9.request("/settings", {
21260
22055
  method: "POST",
21261
22056
  body: JSON.stringify({ enabledModelIds: enabled ? status.models.map((model) => model.id) : [] })
21262
22057
  }));
@@ -21275,7 +22070,7 @@ window.__ModuleLoader__.load({
21275
22070
  try {
21276
22071
  setBusy("models-all");
21277
22072
  setError(null);
21278
- const normalized = normalizeStatus(await api$8.request("/settings", {
22073
+ const normalized = normalizeStatus(await api$9.request("/settings", {
21279
22074
  method: "POST",
21280
22075
  body: JSON.stringify({ enabledModelIds: nextGroupSelection(current, ids, enabled) })
21281
22076
  }));
@@ -21292,7 +22087,7 @@ window.__ModuleLoader__.load({
21292
22087
  try {
21293
22088
  setBusy("effort");
21294
22089
  setError(null);
21295
- const updated = await api$8.request("/settings", {
22090
+ const updated = await api$9.request("/settings", {
21296
22091
  method: "POST",
21297
22092
  body: JSON.stringify({ defaultReasoningEffort: effort })
21298
22093
  });
@@ -21308,7 +22103,7 @@ window.__ModuleLoader__.load({
21308
22103
  try {
21309
22104
  setBusy("catalog");
21310
22105
  setError(null);
21311
- const normalized = normalizeStatus(await api$8.request("/catalog/refresh", { method: "POST" }));
22106
+ const normalized = normalizeStatus(await api$9.request("/catalog/refresh", { method: "POST" }));
21312
22107
  setStatus(normalized);
21313
22108
  setContextDrafts(contextDraftsFor(normalized));
21314
22109
  notifyChange();
@@ -21328,7 +22123,7 @@ window.__ModuleLoader__.load({
21328
22123
  try {
21329
22124
  setSavingModel(modelId);
21330
22125
  setError(null);
21331
- const updated = await api$8.request("/settings", {
22126
+ const updated = await api$9.request("/settings", {
21332
22127
  method: "POST",
21333
22128
  body: JSON.stringify({ contextWindowOverrides: { [modelId]: parsed } })
21334
22129
  });
@@ -21349,7 +22144,7 @@ window.__ModuleLoader__.load({
21349
22144
  try {
21350
22145
  setSavingModel(modelId);
21351
22146
  setError(null);
21352
- const updated = normalizeStatus(await api$8.request("/settings", {
22147
+ const updated = normalizeStatus(await api$9.request("/settings", {
21353
22148
  method: "POST",
21354
22149
  body: JSON.stringify({ contextWindowOverrides: { [modelId]: null } })
21355
22150
  }));
@@ -21376,7 +22171,7 @@ window.__ModuleLoader__.load({
21376
22171
  try {
21377
22172
  setBusy("context");
21378
22173
  setError(null);
21379
- const updated = normalizeStatus(await api$8.request("/settings", {
22174
+ const updated = normalizeStatus(await api$9.request("/settings", {
21380
22175
  method: "POST",
21381
22176
  body: JSON.stringify({ contextWindowOverrides: Object.fromEntries(models.map((model) => [model, null])) })
21382
22177
  }));
@@ -22380,10 +23175,10 @@ window.__ModuleLoader__.load({
22380
23175
  };
22381
23176
  //#endregion
22382
23177
  //#region src/client/providers/qianwen-token-plan/api.ts
22383
- const api$7 = createLineApi(QIANWEN_TOKEN_PLAN_ROUTE_PREFIX, QIANWEN_TOKEN_PLAN_PROVIDER_NAME);
22384
- const get$2 = api$7.get;
22385
- const post$2 = api$7.post;
22386
- const request$2 = api$7.request;
23178
+ const api$8 = createLineApi(QIANWEN_TOKEN_PLAN_ROUTE_PREFIX, QIANWEN_TOKEN_PLAN_PROVIDER_NAME);
23179
+ const get$2 = api$8.get;
23180
+ const post$2 = api$8.post;
23181
+ const request$2 = api$8.request;
22387
23182
  const messageOf$2 = (cause) => cause instanceof Error ? cause.message : String(cause);
22388
23183
  //#endregion
22389
23184
  //#region src/client/providers/qianwen-token-plan/useQianwenSection.ts
@@ -23155,10 +23950,10 @@ window.__ModuleLoader__.load({
23155
23950
  };
23156
23951
  //#endregion
23157
23952
  //#region src/client/providers/relayone/api.ts
23158
- const api$6 = createLineApi(RELAYONE_ROUTE_PREFIX, RELAYONE_PROVIDER_NAME);
23159
- const get$1 = api$6.get;
23160
- const post$1 = api$6.post;
23161
- const request$1 = api$6.request;
23953
+ const api$7 = createLineApi(RELAYONE_ROUTE_PREFIX, RELAYONE_PROVIDER_NAME);
23954
+ const get$1 = api$7.get;
23955
+ const post$1 = api$7.post;
23956
+ const request$1 = api$7.request;
23162
23957
  const messageOf$1 = (cause) => cause instanceof Error ? cause.message : String(cause);
23163
23958
  //#endregion
23164
23959
  //#region src/client/providers/relayone/useRelayOneSection.ts
@@ -23996,10 +24791,10 @@ window.__ModuleLoader__.load({
23996
24791
  test: "/test",
23997
24792
  catalogRefresh: "/catalog/refresh"
23998
24793
  };
23999
- const api$5 = createLineApi(CLAUDE_API_ROUTE_PREFIX, CLAUDE_API_PROVIDER_NAME);
24000
- const get = api$5.get;
24001
- const post = api$5.post;
24002
- const request = api$5.request;
24794
+ const api$6 = createLineApi(CLAUDE_API_ROUTE_PREFIX, CLAUDE_API_PROVIDER_NAME);
24795
+ const get = api$6.get;
24796
+ const post = api$6.post;
24797
+ const request = api$6.request;
24003
24798
  const messageOf = (cause) => cause instanceof Error ? cause.message : String(cause);
24004
24799
  //#endregion
24005
24800
  //#region src/client/providers/claude-api/useClaudeApiSection.ts
@@ -24825,6 +25620,14 @@ window.__ModuleLoader__.load({
24825
25620
  category: "local",
24826
25621
  setEnabled: (enabled) => postLineSettings("/aws-quick/api", { enabled }),
24827
25622
  renderDetail: ({ onModelChange }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(AwsQuickSection, { onModelChange })
25623
+ },
25624
+ {
25625
+ id: "opencode-go",
25626
+ proxyLine: "opencode-go",
25627
+ name: OPENCODE_GO_PROVIDER_NAME,
25628
+ category: "api-key",
25629
+ setEnabled: (enabled) => postLineSettings(OPENCODE_GO_ROUTE_PREFIX, { enabled }),
25630
+ renderDetail: ({ onModelChange }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(OpenCodeGoSection, { onModelChange })
24828
25631
  }
24829
25632
  ];
24830
25633
  function hubProviderDescriptor(id) {
@@ -25254,14 +26057,7 @@ window.__ModuleLoader__.load({
25254
26057
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
25255
26058
  className: "dsh-hub-badge",
25256
26059
  children: t(categoryBadgeKey(descriptor.category))
25257
- }),
25258
- proxyMode === "direct" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
25259
- className: "dsh-hub-badge is-proxy",
25260
- children: t("hubProxyDirect")
25261
- }) : proxyMode === "custom" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
25262
- className: "dsh-hub-badge is-proxy",
25263
- children: t("hubProxyCustom")
25264
- }) : null
26060
+ })
25265
26061
  ]
25266
26062
  }),
25267
26063
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
@@ -25281,23 +26077,53 @@ window.__ModuleLoader__.load({
25281
26077
  }),
25282
26078
  !props.selecting ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
25283
26079
  className: "dsh-hub-tail",
25284
- children: [canToggle ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
25285
- type: "button",
25286
- role: "switch",
25287
- "aria-checked": enabled,
25288
- "aria-label": formatPoolLabel(t(enabled ? "hubSwitchOff" : "hubSwitchOn"), { name: cardName }),
25289
- className: "dsh-hub-switch",
25290
- disabled: props.busy || summary === void 0,
25291
- onClick: (event) => {
25292
- event.stopPropagation();
25293
- if (summary === void 0) return;
25294
- props.onToggle(descriptor, summary, !enabled);
25295
- }
25296
- }) : null, /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
25297
- className: "dsh-hub-chevron",
25298
- "aria-hidden": "true",
25299
- dangerouslySetInnerHTML: { __html: CHEVRON_SVG }
25300
- })]
26080
+ children: [
26081
+ descriptor.proxyLine !== null ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("select", {
26082
+ className: "dsh-hub-proxy-select",
26083
+ "aria-label": formatPoolLabel(t("hubProxyMode"), { name: cardName }),
26084
+ title: props.proxyLoadError ?? t("proxyModeHint"),
26085
+ value: proxyMode ?? "auto",
26086
+ disabled: props.proxyBusy || props.proxySnapshot === null || summary === void 0,
26087
+ onClick: (event) => event.stopPropagation(),
26088
+ onKeyDown: (event) => event.stopPropagation(),
26089
+ onChange: (event) => {
26090
+ event.stopPropagation();
26091
+ props.onProxyMode(descriptor, event.currentTarget.value);
26092
+ },
26093
+ children: [
26094
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
26095
+ value: "auto",
26096
+ children: t("hubProxyAuto")
26097
+ }),
26098
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
26099
+ value: "custom",
26100
+ children: t("hubProxyCustom")
26101
+ }),
26102
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
26103
+ value: "direct",
26104
+ children: t("hubProxyDirect")
26105
+ })
26106
+ ]
26107
+ }) : null,
26108
+ canToggle ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
26109
+ type: "button",
26110
+ role: "switch",
26111
+ "aria-checked": enabled,
26112
+ "aria-label": formatPoolLabel(t(enabled ? "hubSwitchOff" : "hubSwitchOn"), { name: cardName }),
26113
+ className: "dsh-hub-switch",
26114
+ disabled: props.busy || summary === void 0,
26115
+ onClick: (event) => {
26116
+ event.stopPropagation();
26117
+ if (summary === void 0) return;
26118
+ props.onToggle(descriptor, summary, !enabled);
26119
+ }
26120
+ }) : null,
26121
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
26122
+ className: "dsh-hub-chevron",
26123
+ "aria-hidden": "true",
26124
+ dangerouslySetInnerHTML: { __html: CHEVRON_SVG }
26125
+ })
26126
+ ]
25301
26127
  }) : null
25302
26128
  ]
25303
26129
  });
@@ -25318,7 +26144,9 @@ window.__ModuleLoader__.load({
25318
26144
  const [summaries, setSummaries] = (0, react.useState)(readCachedSummaries);
25319
26145
  const [proxySnapshot, setProxySnapshot] = (0, react.useState)(readCachedProxySnapshot);
25320
26146
  const [loadError, setLoadError] = (0, react.useState)(null);
26147
+ const [proxyLoadError, setProxyLoadError] = (0, react.useState)(null);
25321
26148
  const [busyId, setBusyId] = (0, react.useState)(null);
26149
+ const [proxyBusyId, setProxyBusyId] = (0, react.useState)(null);
25322
26150
  const [cardErrors, setCardErrors] = (0, react.useState)(/* @__PURE__ */ new Map());
25323
26151
  const [draggedId, setDraggedId] = (0, react.useState)(null);
25324
26152
  const [dropTargetId, setDropTargetId] = (0, react.useState)(null);
@@ -25361,7 +26189,10 @@ window.__ModuleLoader__.load({
25361
26189
  const snapshot = await fetchLineProxySnapshot(ROUTE_PREFIX);
25362
26190
  setProxySnapshot(snapshot);
25363
26191
  saveCachedProxySnapshot(snapshot);
25364
- } catch {}
26192
+ setProxyLoadError(null);
26193
+ } catch (error) {
26194
+ setProxyLoadError(error instanceof Error ? error.message : String(error));
26195
+ }
25365
26196
  }, []);
25366
26197
  (0, react.useEffect)(() => {
25367
26198
  load();
@@ -25439,6 +26270,37 @@ window.__ModuleLoader__.load({
25439
26270
  setBusyId(null);
25440
26271
  }
25441
26272
  }, [clearCardError, load]);
26273
+ const changeProxyMode = (0, react.useCallback)(async (descriptor, mode) => {
26274
+ const line = descriptor.proxyLine;
26275
+ if (line === null || proxyBusyId !== null) return;
26276
+ const customProxyUrl = (proxySnapshot?.lineProxies?.[line])?.customProxyUrl?.trim() ?? "";
26277
+ if (mode === "custom" && customProxyUrl === "") {
26278
+ const name = hubCardName(descriptor, t);
26279
+ globalThis.alert(formatPoolLabel(t("hubCustomProxyMissing"), { name }));
26280
+ onOpen(descriptor.id);
26281
+ return;
26282
+ }
26283
+ setProxyBusyId(descriptor.id);
26284
+ clearCardError(descriptor.id);
26285
+ try {
26286
+ await savePreferences(ROUTE_PREFIX, { lineProxies: { [line]: {
26287
+ mode,
26288
+ customProxyUrl: mode === "custom" ? customProxyUrl : null
26289
+ } } });
26290
+ await loadProxy();
26291
+ } catch (error) {
26292
+ setCardErrors((current) => new Map(current).set(descriptor.id, error instanceof Error ? error.message : String(error)));
26293
+ } finally {
26294
+ setProxyBusyId(null);
26295
+ }
26296
+ }, [
26297
+ clearCardError,
26298
+ loadProxy,
26299
+ onOpen,
26300
+ proxyBusyId,
26301
+ proxySnapshot,
26302
+ t
26303
+ ]);
25442
26304
  const reorder = (0, react.useCallback)((sourceId, targetId) => {
25443
26305
  setProviders((current) => {
25444
26306
  const next = moveBeforeTarget(current, sourceId, targetId);
@@ -25643,6 +26505,8 @@ window.__ModuleLoader__.load({
25643
26505
  summary,
25644
26506
  busy: busyId === descriptor.id,
25645
26507
  proxySnapshot,
26508
+ proxyBusy: proxyBusyId !== null,
26509
+ proxyLoadError,
25646
26510
  cardError: cardErrors.get(descriptor.id) ?? null,
25647
26511
  matchedModels,
25648
26512
  selecting,
@@ -25652,6 +26516,7 @@ window.__ModuleLoader__.load({
25652
26516
  t,
25653
26517
  onOpen,
25654
26518
  onToggle: toggle,
26519
+ onProxyMode: changeProxyMode,
25655
26520
  onPick: handlePick,
25656
26521
  onContextMenu: handleRowContextMenu,
25657
26522
  onDragStart: (event) => {
@@ -26461,7 +27326,7 @@ window.__ModuleLoader__.load({
26461
27326
  settingsToolRunawayGuardName: "工具失控治理",
26462
27327
  settingsToolRunawayGuardNote: "同一工具与参数连续重复时分级提醒;Kimi 保留第 12 次强停,其他线路只提醒",
26463
27328
  settingsMediaToolsName: "媒体工具",
26464
- settingsMediaToolsNote: "统一注册 Codex 生图、Kimi 视频挂载与 MiniMax 视频工具;重载插件或重启后生效,Kimi 既有会话在工具表变化后会重建一次前缀缓存",
27329
+ settingsMediaToolsNote: "统一注册 Codex 生图、Kimi 视频挂载与 MiniMax 图像、音频和视频工具;重载插件或重启后生效,Kimi 既有会话在工具表变化后会重建一次前缀缓存",
26465
27330
  settingsTeamPolicyCacheGuardName: "智能体团队策略段",
26466
27331
  settingsTeamPolicyCacheGuardNote: "把内置 Agent Teams 的策略段从系统提示词摘掉,改为开启团队协作时以尾部消息投递一次;会话中途切开关不再刷掉整段前缀缓存(默认开启)",
26467
27332
  settingsThresholdName: "催促阈值",
@@ -26516,7 +27381,7 @@ window.__ModuleLoader__.load({
26516
27381
  settingsToolRunawayGuardName: "Tool runaway guard",
26517
27382
  settingsToolRunawayGuardNote: "Remind the agent when the same tool call repeats; Kimi keeps its 12th-call handoff, while other lines receive reminders only",
26518
27383
  settingsMediaToolsName: "Media tools",
26519
- settingsMediaToolsNote: "Register Codex image generation, Kimi video attachment, and MiniMax video tools together; reload the plugin or restart DSH to apply. Existing Kimi sessions rebuild their prefix once after the tool table changes",
27384
+ settingsMediaToolsNote: "Register Codex image generation, Kimi video attachment, and MiniMax image, audio, and video tools together; reload the plugin or restart DSH to apply. Existing Kimi sessions rebuild their prefix once after the tool table changes",
26520
27385
  settingsTeamPolicyCacheGuardName: "Agent Teams policy section",
26521
27386
  settingsTeamPolicyCacheGuardNote: "Lift the built-in Agent Teams policy section out of the system prompt and deliver it as one tail message when team collaboration is switched on, so toggling mid-session no longer rebuilds the whole prefix cache (on by default)",
26522
27387
  settingsThresholdName: "Nudge threshold",
@@ -26686,7 +27551,7 @@ window.__ModuleLoader__.load({
26686
27551
  * account-pool labels come from `./account-pool.ts`, with the same overrides the
26687
27552
  * source applies on top of them.
26688
27553
  */
26689
- const dictionary$21 = {
27554
+ const dictionary$22 = {
26690
27555
  ...accountPoolRu,
26691
27556
  title: "Claude (подписка)",
26692
27557
  pageDesc: "Войдите в подписку Claude Pro/Max и управляйте моделями, уровнями рассуждений, контекстными окнами и квотой.",
@@ -26809,7 +27674,7 @@ window.__ModuleLoader__.load({
26809
27674
  };
26810
27675
  //#endregion
26811
27676
  //#region src/client/locales-ru/cline-pass.ts
26812
- const dictionary$20 = {
27677
+ const dictionary$21 = {
26813
27678
  ...accountPoolRu,
26814
27679
  relogin: "Войти заново",
26815
27680
  needsRelogin: "Вход истёк",
@@ -26935,7 +27800,7 @@ window.__ModuleLoader__.load({
26935
27800
  };
26936
27801
  //#endregion
26937
27802
  //#region src/client/locales-ru/command-code.ts
26938
- const dictionary$19 = {
27803
+ const dictionary$20 = {
26939
27804
  ...accountPoolRu,
26940
27805
  title: "Command Code",
26941
27806
  pageDesc: "Войдите в Command Code и управляйте моделями, контекстными окнами и квотой.",
@@ -27011,7 +27876,7 @@ window.__ModuleLoader__.load({
27011
27876
  };
27012
27877
  //#endregion
27013
27878
  //#region src/client/locales-ru/glm-coding-plan.ts
27014
- const dictionary$18 = {
27879
+ const dictionary$19 = {
27015
27880
  ...accountPoolRu,
27016
27881
  title: "GLM (аккаунт ZCode)",
27017
27882
  pageDesc: "Вход аккаунтом ZCode подключает GLM Coding Plan (Китай — bigmodel.cn, международный — z.ai). Здесь же пул аккаунтов, квота тарифа и выбор моделей. Учётные данные двух регионов независимы, поэтому в одном пуле могут быть аккаунты обоих.",
@@ -27114,7 +27979,7 @@ window.__ModuleLoader__.load({
27114
27979
  * account-pool labels come from `./account-pool.ts`, with the same overrides the
27115
27980
  * source applies on top of them.
27116
27981
  */
27117
- const dictionary$17 = {
27982
+ const dictionary$18 = {
27118
27983
  ...accountPoolRu,
27119
27984
  title: "ChatGPT",
27120
27985
  hubTitle: "Подписки",
@@ -27372,6 +28237,7 @@ window.__ModuleLoader__.load({
27372
28237
  "cardName.relayone": "RelayOne",
27373
28238
  "cardName.claude-api": "Claude API",
27374
28239
  "cardName.aws-quick": "AWS Quick",
28240
+ "cardName.opencode-go": "OpenCode Go (подписка)",
27375
28241
  modelChecklistCount: "Включено {count}/{total}",
27376
28242
  codeRunTitle: "Код",
27377
28243
  codeRunOutput: "Вывод",
@@ -27387,7 +28253,7 @@ window.__ModuleLoader__.load({
27387
28253
  };
27388
28254
  //#endregion
27389
28255
  //#region src/client/locales-ru/kimi-code.ts
27390
- const dictionary$16 = {
28256
+ const dictionary$17 = {
27391
28257
  ...accountPoolRu,
27392
28258
  title: "Kimi Code",
27393
28259
  pageDesc: "Вход в подписку Kimi Code: модели, уровень рассуждений, контекстные окна и квота.",
@@ -27585,7 +28451,7 @@ window.__ModuleLoader__.load({
27585
28451
  };
27586
28452
  //#endregion
27587
28453
  //#region src/client/locales-ru/minimax-code.ts
27588
- const dictionary$15 = {
28454
+ const dictionary$16 = {
27589
28455
  ...accountPoolRu,
27590
28456
  title: "MiniMax Code",
27591
28457
  pageDesc: "Вход в подписку MiniMax Code для программирования (OAuth по коду устройства) с переиспользованием локального входа MiniMax Code: управление аккаунтом, подключением и моделями.",
@@ -27785,7 +28651,7 @@ window.__ModuleLoader__.load({
27785
28651
  };
27786
28652
  //#endregion
27787
28653
  //#region src/client/locales-ru/ollama.ts
27788
- const dictionary$14 = {
28654
+ const dictionary$15 = {
27789
28655
  ...accountPoolRu,
27790
28656
  relogin: "Заменить ключ",
27791
28657
  needsRelogin: "Ключ отклонён",
@@ -27839,7 +28705,7 @@ window.__ModuleLoader__.load({
27839
28705
  };
27840
28706
  //#endregion
27841
28707
  //#region src/client/locales-ru/antigravity-acp.ts
27842
- const dictionary$13 = {
28708
+ const dictionary$14 = {
27843
28709
  title: "Antigravity (ACP)",
27844
28710
  pageDesc: "Подключение через официальный Antigravity CLI от Google по Agent Client Protocol (ACP): модель, инструменты и сессии приходят от официального процесса, и он же хранит состояние входа.",
27845
28711
  routeOwned: "Маршрут моделей обслуживает этот плагин",
@@ -27933,7 +28799,7 @@ window.__ModuleLoader__.load({
27933
28799
  };
27934
28800
  //#endregion
27935
28801
  //#region src/client/locales-ru/opendesign.ts
27936
- const dictionary$12 = {
28802
+ const dictionary$13 = {
27937
28803
  ...accountPoolRu,
27938
28804
  relogin: "Добавить заново",
27939
28805
  needsRelogin: "API-ключ недействителен",
@@ -28043,7 +28909,7 @@ window.__ModuleLoader__.load({
28043
28909
  };
28044
28910
  //#endregion
28045
28911
  //#region src/client/locales-ru/dispatch-ledger.ts
28046
- const dictionary$11 = {
28912
+ const dictionary$12 = {
28047
28913
  mandateTitle: "Запуск субагента",
28048
28914
  mandateTitleFork: "Запуск субагента (с контекстом)",
28049
28915
  mandatePreparing: "Сборка задания",
@@ -28068,7 +28934,7 @@ window.__ModuleLoader__.load({
28068
28934
  };
28069
28935
  //#endregion
28070
28936
  //#region src/client/locales-ru/progress-updates.ts
28071
- const dictionary$10 = {
28937
+ const dictionary$11 = {
28072
28938
  navTitle: "Ход работы",
28073
28939
  progressTitle: "Ход работы",
28074
28940
  progressGuideNote: "Каждый шаг, о котором сообщает агент, собирается здесь",
@@ -28106,7 +28972,7 @@ window.__ModuleLoader__.load({
28106
28972
  settingsToolRunawayGuardName: "Защита от циклов инструментов",
28107
28973
  settingsToolRunawayGuardNote: "Напоминать агенту о повторяющихся вызовах; Kimi сохраняет передачу управления на 12-м вызове, другие линии получают только напоминания",
28108
28974
  settingsMediaToolsName: "Медиаинструменты",
28109
- settingsMediaToolsNote: "Единая регистрация генерации изображений Codex, прикрепления видео Kimi и видеоинструментов MiniMax; применяется после перезагрузки плагина или DSH. В существующих сессиях Kimi после изменения набора инструментов префиксный кеш один раз пересобирается",
28975
+ settingsMediaToolsNote: "Единая регистрация генерации изображений Codex, прикрепления видео Kimi и инструментов изображений, аудио и видео MiniMax; применяется после перезагрузки плагина или DSH. В существующих сессиях Kimi после изменения набора инструментов префиксный кеш один раз пересобирается",
28110
28976
  settingsTeamPolicyCacheGuardName: "Раздел политики Agent Teams",
28111
28977
  settingsTeamPolicyCacheGuardNote: "Убрать встроенный раздел политики Agent Teams из системного промпта и передавать его одним сообщением в хвосте при включении командной работы, чтобы переключение посреди сессии больше не пересобирало весь префиксный кеш (включено по умолчанию)",
28112
28978
  settingsThresholdName: "Порог напоминания",
@@ -28124,7 +28990,7 @@ window.__ModuleLoader__.load({
28124
28990
  };
28125
28991
  //#endregion
28126
28992
  //#region src/client/locales-ru/qoder.ts
28127
- const dictionary$9 = {
28993
+ const dictionary$10 = {
28128
28994
  modelRowEfforts: "уровни {list}",
28129
28995
  modelRowNoEfforts: "без уровней",
28130
28996
  modelRowOutput: "вывод {cap}",
@@ -28246,7 +29112,7 @@ window.__ModuleLoader__.load({
28246
29112
  };
28247
29113
  //#endregion
28248
29114
  //#region src/client/locales-ru/step-code.ts
28249
- const dictionary$8 = {
29115
+ const dictionary$9 = {
28250
29116
  ...accountPoolRu,
28251
29117
  title: "Step Code (подписка Step Plan)",
28252
29118
  pageDesc: "Подключение к StepFun по подписке Step Plan (Китай api.stepfun.com / международный api.stepfun.ai) или по API-ключу открытой платформы: пул аккаунтов, квота тарифа, расход кеша и выбор моделей. Регион — свойство учётных данных, и два региона несовместимы, поэтому в пуле могут быть аккаунты из обоих.",
@@ -28423,7 +29289,7 @@ window.__ModuleLoader__.load({
28423
29289
  * dropped '{placeholder}' would turn a sentence into a bald claim. 'test/
28424
29290
  * russian-locale.test.tsx' pins both rules.
28425
29291
  */
28426
- const dictionary$7 = {
29292
+ const dictionary$8 = {
28427
29293
  title: "WorkBuddy",
28428
29294
  pageDesc: "Повторно использует локальный вход CodeBuddy, чтобы управлять моделями WorkBuddy (подписка CodeBuddy), контекстными окнами и квотой.",
28429
29295
  account: "Аккаунт",
@@ -28551,7 +29417,7 @@ window.__ModuleLoader__.load({
28551
29417
  };
28552
29418
  //#endregion
28553
29419
  //#region src/client/locales-ru/qianwen-token-plan.ts
28554
- const dictionary$6 = {
29420
+ const dictionary$7 = {
28555
29421
  title: "Qwen Token Plan",
28556
29422
  pageDesc: "Подключение Qwen4 по выделенному API-ключу Qianwen Token Plan: явный кеш, воспроизведение размышлений, уровни reasoning, модели и визуальный бюджет.",
28557
29423
  loading: "Загрузка…",
@@ -28626,7 +29492,7 @@ window.__ModuleLoader__.load({
28626
29492
  };
28627
29493
  //#endregion
28628
29494
  //#region src/client/locales-ru/relayone.ts
28629
- const dictionary$5 = {
29495
+ const dictionary$6 = {
28630
29496
  title: "RelayOne",
28631
29497
  pageDesc: "Один API-ключ для диалоговых и медиамоделей, доступных в его текущей группе.",
28632
29498
  enabled: "Включить RelayOne",
@@ -28735,7 +29601,7 @@ window.__ModuleLoader__.load({
28735
29601
  };
28736
29602
  //#endregion
28737
29603
  //#region src/client/locales-ru/claude-api.ts
28738
- const dictionary$4 = {
29604
+ const dictionary$5 = {
28739
29605
  title: "Claude API",
28740
29606
  pageDesc: "Один API-ключ для эндпоинта Anthropic Messages или совместимого шлюза; запросы отправляются в формате официального клиента Claude Code.",
28741
29607
  loading: "Чтение состояния линии…",
@@ -28814,7 +29680,7 @@ window.__ModuleLoader__.load({
28814
29680
  };
28815
29681
  //#endregion
28816
29682
  //#region src/client/locales-ru/aws-quick.ts
28817
- const dictionary$3 = {
29683
+ const dictionary$4 = {
28818
29684
  title: "AWS Quick",
28819
29685
  pageDesc: "Используйте подписку AWS Quick через официальный локальный agent Quick Desktop: потоковый текст, reasoning и три режима ответа.",
28820
29686
  refresh: "Обновить",
@@ -28871,7 +29737,7 @@ window.__ModuleLoader__.load({
28871
29737
  };
28872
29738
  //#endregion
28873
29739
  //#region src/client/locales-ru/compact-after-turn.ts
28874
- const dictionary$2 = {
29740
+ const dictionary$3 = {
28875
29741
  label: "Сжать после этого хода",
28876
29742
  infoLabel: "О сжатии после этого хода",
28877
29743
  hint: "Когда включено, контекст сжимается один раз сразу после окончания этого хода, затем переключатель выключается сам. Ход, остановленный вручную, не считается: переключатель остаётся включённым до конца следующего хода.",
@@ -28886,7 +29752,7 @@ window.__ModuleLoader__.load({
28886
29752
  };
28887
29753
  //#endregion
28888
29754
  //#region src/client/locales-ru/session-quota.ts
28889
- const dictionary$1 = {
29755
+ const dictionary$2 = {
28890
29756
  sectionTitle: "Лимиты плана",
28891
29757
  refresh: "Обновить",
28892
29758
  refreshing: "Обновление…",
@@ -28920,7 +29786,7 @@ window.__ModuleLoader__.load({
28920
29786
  };
28921
29787
  //#endregion
28922
29788
  //#region src/client/locales-ru/model-checklist.ts
28923
- const dictionary = {
29789
+ const dictionary$1 = {
28924
29790
  allGroups: "Все",
28925
29791
  enabledGroup: "Включённые",
28926
29792
  otherGroup: "Другие",
@@ -28928,6 +29794,81 @@ window.__ModuleLoader__.load({
28928
29794
  noMatches: "Подходящих моделей не найдено",
28929
29795
  groupsNav: "Провайдеры моделей"
28930
29796
  };
29797
+ //#endregion
29798
+ //#region src/client/locales-ru/opencode-go.ts
29799
+ const dictionary = {
29800
+ ...accountPoolRu,
29801
+ title: "OpenCode Go",
29802
+ pageDesc: "Используйте подписку OpenCode Go: аккаунты, модели, уровень рассуждений и квота.",
29803
+ loading: "Загрузка...",
29804
+ connection: "Подключение",
29805
+ testConnection: "Проверить подключение",
29806
+ testingConnection: "Проверка...",
29807
+ testSuccess: "Подключение работает",
29808
+ testFailed: "Ошибка подключения",
29809
+ routeOwned: "Маршрут моделей обслуживается этим плагином",
29810
+ routeConflict: "Другой провайдер уже занял маршрут: {detail}. Удалите дубликат и повторите.",
29811
+ modelsSection: "Модели",
29812
+ otherGroup: "Другие",
29813
+ modelsHint: "В списке моделей диалога появляются только отмеченные модели. Возможности берутся из каталога аккаунта.",
29814
+ refreshCatalog: "Обновить каталог",
29815
+ refreshingCatalog: "Обновление...",
29816
+ selectAll: "Выбрать все",
29817
+ unselectAll: "Снять все",
29818
+ enhanced: "Рассуждения и контекст",
29819
+ defaultReasoningEffort: "Уровень рассуждений по умолчанию",
29820
+ defaultReasoningEffortHint: "Предлагаются только уровни выбранных моделей. По умолчанию используется значение модели.",
29821
+ defaultEffortAuto: "Значение модели по умолчанию",
29822
+ effortNone: "Отключить рассуждения",
29823
+ effortMinimal: "Минимальный",
29824
+ effortLow: "Низкий",
29825
+ effortMedium: "Средний",
29826
+ effortHigh: "Высокий",
29827
+ effortXhigh: "Очень высокий",
29828
+ effortMax: "Максимальный",
29829
+ contextWindowSection: "Контекстные окна моделей",
29830
+ contextWindowHint: "По умолчанию используется длина из каталога; для каждой модели её можно изменить.",
29831
+ contextWindowReset: "Сбросить",
29832
+ contextWindowResetAll: "Сбросить все",
29833
+ contextWindowResetAllConfirm: "Вернуть всем моделям контекстное окно из каталога?",
29834
+ contextWindowNoneEnabled: "Модели ещё не выбраны.",
29835
+ save: "Сохранить",
29836
+ saving: "Сохранение...",
29837
+ tokens: "токены",
29838
+ refreshQuota: "Обновить квоту",
29839
+ refreshingQuota: "Обновление...",
29840
+ quotaEmpty: "Квота ещё не прочитана. Нажмите «Обновить квоту».",
29841
+ planUnknown: "OpenCode Go",
29842
+ kqTotal: "Общая месячная квота",
29843
+ kqUsedSuffix: "использовано",
29844
+ kqTip: "Израсходовано {pct} месячной квоты",
29845
+ kqUsed: "Использовано {pct}",
29846
+ kqRest: "Осталось {pct}",
29847
+ kqResetAfter: "Сброс: {time}",
29848
+ kqWindow5h: "Окно 5 часов",
29849
+ kqWindowWeekly: "Недельное окно",
29850
+ kqRollingNote: "Короткое окно запросов",
29851
+ kqWeeklyNote: "Расходует общую месячную квоту",
29852
+ kqNoReset: "Время сброса не указано",
29853
+ kqNoLastUsed: "Запросов ещё не было",
29854
+ kqLastUsed: "Последний вызов: {time}",
29855
+ kqUpdated: "Обновлено {time}",
29856
+ kqJustNow: "только что",
29857
+ kqMinutesAgo: "{n} мин назад",
29858
+ kqHoursAgo: "{n} ч назад",
29859
+ kqDaysAgo: "{n} дн назад",
29860
+ apiKeyLogin: "Войти с API Key",
29861
+ apiKeyHint: "Вставьте личный API Key из OpenCode Console. Ключ остаётся на этом устройстве и проверяется перед добавлением.",
29862
+ apiKeyReplaceHint: "Вставьте новый API Key для {alias}. Имя и позиция в ротации сохранятся.",
29863
+ apiKeyPlaceholder: "oc_sk_…",
29864
+ apiKeySubmit: "Проверить и добавить",
29865
+ apiKeyReplace: "Заменить Key",
29866
+ apiKeySubmitting: "Проверка...",
29867
+ apiKeyEmpty: "Сначала вставьте API Key.",
29868
+ authMethod: "Аутентификация",
29869
+ authMethodApiKey: "Личный API Key",
29870
+ composerLabel: "Остаток квоты OpenCode Go"
29871
+ };
28931
29872
  /**
28932
29873
  * Register the Russian language and every dictionary it covers.
28933
29874
  *
@@ -28950,28 +29891,29 @@ window.__ModuleLoader__.load({
28950
29891
  }
28951
29892
  }, "dsh-chatgpt-subscription: ru language");
28952
29893
  const dictionaries = [
28953
- [NS, dictionary$17],
28954
- [NS_CLAUDE, dictionary$21],
28955
- [NS_COMMAND_CODE, dictionary$19],
28956
- [NS_KIMI_CODE, dictionary$16],
28957
- [NS_MINIMAX_CODE, dictionary$15],
28958
- [NS_GLM_CODING_PLAN, dictionary$18],
28959
- [NS_OLLAMA, dictionary$14],
28960
- [NS_STEP_CODE, dictionary$8],
28961
- [NS_CLINE_PASS, dictionary$20],
28962
- [NS_QODER, dictionary$9],
28963
- [NS_OPENDESIGN, dictionary$12],
28964
- [NS_PROGRESS_UPDATES, dictionary$10],
28965
- [NS_WORKBUDDY, dictionary$7],
28966
- [NS_DISPATCH_LEDGER, dictionary$11],
28967
- [NS_ANTIGRAVITY_ACP, dictionary$13],
28968
- [NS_QIANWEN, dictionary$6],
28969
- [NS_RELAYONE, dictionary$5],
28970
- [NS_CLAUDE_API, dictionary$4],
28971
- [NS_AWS_QUICK, dictionary$3],
28972
- [NS_COMPACT_AFTER_TURN, dictionary$2],
28973
- [NS_SESSION_QUOTA, dictionary$1],
28974
- [NS_MODEL_CHECKLIST, dictionary]
29894
+ [NS, dictionary$18],
29895
+ [NS_CLAUDE, dictionary$22],
29896
+ [NS_COMMAND_CODE, dictionary$20],
29897
+ [NS_KIMI_CODE, dictionary$17],
29898
+ [NS_MINIMAX_CODE, dictionary$16],
29899
+ [NS_GLM_CODING_PLAN, dictionary$19],
29900
+ [NS_OLLAMA, dictionary$15],
29901
+ [NS_STEP_CODE, dictionary$9],
29902
+ [NS_CLINE_PASS, dictionary$21],
29903
+ [NS_QODER, dictionary$10],
29904
+ [NS_OPENDESIGN, dictionary$13],
29905
+ [NS_PROGRESS_UPDATES, dictionary$11],
29906
+ [NS_WORKBUDDY, dictionary$8],
29907
+ [NS_DISPATCH_LEDGER, dictionary$12],
29908
+ [NS_ANTIGRAVITY_ACP, dictionary$14],
29909
+ [NS_QIANWEN, dictionary$7],
29910
+ [NS_RELAYONE, dictionary$6],
29911
+ [NS_CLAUDE_API, dictionary$5],
29912
+ [NS_AWS_QUICK, dictionary$4],
29913
+ [NS_COMPACT_AFTER_TURN, dictionary$3],
29914
+ [NS_SESSION_QUOTA, dictionary$2],
29915
+ [NS_MODEL_CHECKLIST, dictionary$1],
29916
+ [NS_OPENCODE_GO, dictionary]
28975
29917
  ];
28976
29918
  for (const [ns, dictionary] of dictionaries) ctx.effect(() => {
28977
29919
  try {
@@ -29198,7 +30140,7 @@ window.__ModuleLoader__.load({
29198
30140
  .dsh-hub-sel-bar{align-items:center;background:var(--dsw-alias-bg-layer-1,#fff);border:1px solid var(--dsw-alias-border-l2,#e3e1d5);border-radius:10px;display:flex;flex-wrap:wrap;gap:6px;padding:7px 10px}
29199
30141
  .dsh-hub-sel-count{color:var(--dsw-alias-label-secondary,#5d5c52);font-size:12.5px;font-weight:550;margin-right:auto}
29200
30142
  .dsh-hub-list{background:var(--dsw-alias-bg-layer-1,#fff);border:1px solid var(--dsw-alias-border-l2,#e3e1d5);border-radius:12px;overflow:hidden}
29201
- .dsh-hub-row{align-items:center;background:transparent;border:none;color:var(--dsw-alias-label-primary,#141413);cursor:pointer;display:flex;gap:12px;min-height:58px;padding:10px 14px;position:relative;text-align:left;transition:background .14s ease;width:100%}
30143
+ .dsh-hub-row{align-items:center;background:transparent;border:none;color:var(--dsw-alias-label-primary,#141413);cursor:pointer;display:flex;gap:10px;min-height:58px;padding:10px 14px;position:relative;text-align:left;transition:background .14s ease;width:100%}
29202
30144
  .dsh-hub-row+.dsh-hub-row{border-top:0.5px solid var(--dsw-alias-border-l2,#eceadf)}
29203
30145
  .dsh-hub-row:hover{background:var(--dsw-alias-interactive-bg-hover,rgba(0,0,0,.035))}
29204
30146
  .dsh-hub-row:focus-visible{outline:2px solid var(--dsw-alias-button-info-fill,#397ee8);outline-offset:-2px}
@@ -29214,20 +30156,23 @@ window.__ModuleLoader__.load({
29214
30156
  .dsh-hub-card-name{font-size:13.5px;font-weight:600;line-height:1.35;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
29215
30157
  .dsh-hub-badge{background:var(--dsw-alias-bg-layer-2,#f2f1ea);border-radius:4px;color:var(--dsw-alias-label-secondary,#5d5c52);flex:none;font-size:10.5px;font-weight:500;line-height:1.5;padding:0 5px;white-space:nowrap}
29216
30158
  .dsh-hub-badge.is-off{color:var(--dsw-alias-label-tertiary,#8f8d84)}
29217
- .dsh-hub-badge.is-proxy{border:0.5px solid var(--dsw-alias-border-l2,#e3e1d5);color:var(--dsw-alias-label-tertiary,#8f8d84)}
29218
30159
  .dsh-hub-card-note{color:var(--dsw-alias-label-tertiary,#8f8d84);font-size:12px;line-height:1.35;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
29219
30160
  .dsh-hub-card-note.dsh-hub-note-danger{color:var(--dsw-alias-label-danger,#d94b4b)}
29220
30161
  .dsh-hub-hits{color:var(--dsw-alias-label-secondary,#5d5c52);font-size:11.5px;line-height:1.35;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
29221
- .dsh-hub-status{align-items:center;border-radius:6px;color:var(--dsw-alias-label-secondary,#5d5c52);display:inline-flex;flex:none;font-size:12px;gap:6px;height:22px;max-width:168px;min-width:0;padding:0 8px}
30162
+ .dsh-hub-status{align-items:center;border-radius:6px;color:var(--dsw-alias-label-secondary,#5d5c52);display:inline-flex;flex:none;font-size:12px;gap:6px;height:22px;max-width:168px;min-width:0;padding:0}
29222
30163
  .dsh-hub-status::before{background:#2ea043;border-radius:50%;content:"";flex:none;height:6px;width:6px}
29223
30164
  .dsh-hub-status>span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
29224
30165
  .dsh-hub-status.is-idle{color:var(--dsw-alias-label-caption,#a6a094)}
29225
30166
  .dsh-hub-status.is-idle::before{background:var(--dsw-alias-label-caption,#a6a094)}
29226
- .dsh-hub-status.is-warn{background:color-mix(in srgb,#d97706 12%,transparent);color:#d97706}
30167
+ .dsh-hub-status.is-warn{background:color-mix(in srgb,#d97706 12%,transparent);color:#d97706;padding:0 6px}
29227
30168
  .dsh-hub-status.is-warn::before{background:#d97706}
29228
- .dsh-hub-status.is-error{background:color-mix(in srgb,var(--dsw-alias-label-danger,#d94b4b) 12%,transparent);color:var(--dsw-alias-label-danger,#d94b4b)}
30169
+ .dsh-hub-status.is-error{background:color-mix(in srgb,var(--dsw-alias-label-danger,#d94b4b) 12%,transparent);color:var(--dsw-alias-label-danger,#d94b4b);padding:0 6px}
29229
30170
  .dsh-hub-status.is-error::before{background:var(--dsw-alias-label-danger,#d94b4b)}
29230
30171
  .dsh-hub-tail{align-items:center;display:flex;flex:none;gap:10px}
30172
+ .dsh-hub-proxy-select{background:var(--dsw-alias-bg-layer-1,#fff);border:0.5px solid var(--dsw-alias-border-l2,#e3e1d5);border-radius:7px;color:var(--dsw-alias-label-secondary,#5d5c52);cursor:pointer;flex:none;font:inherit;font-size:12px;height:28px;max-width:112px;min-width:0;padding:0 8px;width:112px}
30173
+ .dsh-hub-proxy-select:hover:not(:disabled){border-color:var(--dsw-alias-label-caption,#a6a094);color:var(--dsw-alias-label-primary,#141413)}
30174
+ .dsh-hub-proxy-select:focus-visible{outline:2px solid var(--dsw-alias-button-info-fill,#397ee8);outline-offset:2px}
30175
+ .dsh-hub-proxy-select:disabled{cursor:default;opacity:.55}
29231
30176
  .dsh-hub-chevron{color:var(--dsw-alias-label-caption,#a6a094);display:inline-flex;flex:none}
29232
30177
  .dsh-hub-brand-tile{align-items:center;background:var(--dsh-hub-brand,#fff);border-radius:26%;box-shadow:inset 0 0 0 0.5px rgba(0,0,0,.1);display:inline-flex;flex:none;justify-content:center;overflow:hidden}
29233
30178
  .dsh-hub-brand-tile>svg{display:block}
@@ -29275,7 +30220,7 @@ window.__ModuleLoader__.load({
29275
30220
  .dsh-hub-skeleton span{background:var(--dsw-alias-bg-layer-2,#f2f1ea);border-radius:5px;display:block;height:11px}
29276
30221
  .dsh-hub-skeleton .dsh-hub-skel-name{margin-bottom:6px;width:120px}
29277
30222
  .dsh-hub-skeleton .dsh-hub-skel-note{height:9px;width:170px}
29278
- @media(max-width:640px){.dsh-hub-row{gap:8px;padding:10px}.dsh-hub-status{display:none}.dsh-hub-search{flex:1;max-width:none;width:auto}.dsh-hub-chevron{display:none}}
30223
+ @media(max-width:640px){.dsh-hub-row{gap:7px;padding:10px}.dsh-hub-tail{gap:7px}.dsh-hub-status{display:none}.dsh-hub-proxy-select{font-size:11.5px;max-width:96px;padding:0 7px;width:96px}.dsh-hub-search{flex:1;max-width:none;width:auto}.dsh-hub-chevron{display:none}}
29279
30224
  .dsh-hub-head{align-items:center;display:flex;flex-wrap:wrap;gap:8px;min-width:0}
29280
30225
  .dsh-hub-head .dsh-hub-head-title{flex:0 1 auto;margin:0 auto 0 0;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
29281
30226
  .dsh-hub-update{align-items:flex-end;display:flex;flex:0 1 auto;flex-direction:column;gap:4px;min-width:0}
@@ -29419,7 +30364,7 @@ window.__ModuleLoader__.load({
29419
30364
  }
29420
30365
  //#endregion
29421
30366
  //#region src/client/providers/claude/ClaudeComposerQuota.tsx
29422
- const api$4 = createLineApi("/claude/api", "Claude");
30367
+ const api$5 = createLineApi("/claude/api", "Claude");
29423
30368
  /**
29424
30369
  * Pick the most meaningful number for the badge.
29425
30370
  *
@@ -29468,14 +30413,14 @@ window.__ModuleLoader__.load({
29468
30413
  directory,
29469
30414
  loadModelDirectory,
29470
30415
  providerId: "claude-subscription",
29471
- readStatus: (refresh) => refresh ? api$4.post("/quota") : api$4.get("/status"),
30416
+ readStatus: (refresh) => refresh ? api$5.post("/quota") : api$5.get("/status"),
29472
30417
  selectFacts: selectBadgeFacts$7,
29473
30418
  label: t("composerLabel")
29474
30419
  });
29475
30420
  }
29476
30421
  //#endregion
29477
30422
  //#region src/client/providers/claude/styles.ts
29478
- const STYLE_ID$11 = "dsh-claude-settings-style";
30423
+ const STYLE_ID$12 = "dsh-claude-settings-style";
29479
30424
  /**
29480
30425
  * Claude-only additions to the shared settings design system.
29481
30426
  *
@@ -29499,11 +30444,11 @@ window.__ModuleLoader__.load({
29499
30444
  .dshcl-mono{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:11px;overflow-wrap:anywhere}
29500
30445
  .dshcl-model-meta{color:var(--dsw-alias-label-tertiary);font-size:11px;margin-left:5px}
29501
30446
  .dshcl-empty-inline{color:var(--dsw-alias-label-tertiary);font-size:12px}
29502
- `, STYLE_ID$11);
30447
+ `, STYLE_ID$12);
29503
30448
  }
29504
30449
  //#endregion
29505
30450
  //#region src/client/providers/command-code/CommandCodeComposerQuota.tsx
29506
- const api$3 = createLineApi("/command-code/api", "Command Code");
30451
+ const api$4 = createLineApi("/command-code/api", "Command Code");
29507
30452
  /**
29508
30453
  * Pick the most meaningful number for the badge.
29509
30454
  *
@@ -29557,14 +30502,14 @@ window.__ModuleLoader__.load({
29557
30502
  directory,
29558
30503
  loadModelDirectory,
29559
30504
  providerId: "command-code",
29560
- readStatus: (refresh) => refresh ? api$3.post("/quota") : api$3.get("/status"),
30505
+ readStatus: (refresh) => refresh ? api$4.post("/quota") : api$4.get("/status"),
29561
30506
  selectFacts: selectBadgeFacts$6,
29562
30507
  label: t("composerLabel")
29563
30508
  });
29564
30509
  }
29565
30510
  //#endregion
29566
30511
  //#region src/client/providers/kimi-code/KimiCodeComposerQuota.tsx
29567
- const api$2 = createLineApi("/kimi-code/api", "Kimi Code");
30512
+ const api$3 = createLineApi("/kimi-code/api", "Kimi Code");
29568
30513
  /**
29569
30514
  * Pick the most meaningful number for the badge.
29570
30515
  *
@@ -29609,14 +30554,14 @@ window.__ModuleLoader__.load({
29609
30554
  directory,
29610
30555
  loadModelDirectory,
29611
30556
  providerId: "kimi-code",
29612
- readStatus: (refresh) => refresh ? api$2.post("/quota") : api$2.get("/status"),
30557
+ readStatus: (refresh) => refresh ? api$3.post("/quota") : api$3.get("/status"),
29613
30558
  selectFacts: selectBadgeFacts$5,
29614
30559
  label: t("composerLabel")
29615
30560
  });
29616
30561
  }
29617
30562
  //#endregion
29618
30563
  //#region src/client/providers/kimi-code/styles.ts
29619
- const STYLE_ID$10 = "dsh-kimi-code-settings-style";
30564
+ const STYLE_ID$11 = "dsh-kimi-code-settings-style";
29620
30565
  /**
29621
30566
  * Node the base control styles come from.
29622
30567
  *
@@ -29783,11 +30728,11 @@ window.__ModuleLoader__.load({
29783
30728
  `;
29784
30729
  /** Kimi-specific rules layered on top of the shared control styles. */
29785
30730
  function installKimiCodeStyles() {
29786
- installPluginStyle("kimi-code", BASE, STYLE_ID$10);
30731
+ installPluginStyle("kimi-code", BASE, STYLE_ID$11);
29787
30732
  }
29788
30733
  //#endregion
29789
30734
  //#region src/client/providers/minimax-code/MinimaxCodeComposerQuota.tsx
29790
- const api$1 = createLineApi("/minimax-code/api", "MiniMax Code");
30735
+ const api$2 = createLineApi("/minimax-code/api", "MiniMax Code");
29791
30736
  /**
29792
30737
  * Pick the badge facts for one status answer, or nothing at all.
29793
30738
  *
@@ -29819,7 +30764,7 @@ window.__ModuleLoader__.load({
29819
30764
  directory,
29820
30765
  loadModelDirectory,
29821
30766
  providerId: "minimax-code",
29822
- readStatus: () => api$1.get("/quota"),
30767
+ readStatus: () => api$2.get("/quota"),
29823
30768
  selectFacts: selectBadgeFacts$4,
29824
30769
  label: t("composerLabel")
29825
30770
  });
@@ -29919,7 +30864,7 @@ window.__ModuleLoader__.load({
29919
30864
  //#region src/client/providers/minimax-code/MinimaxVideoDocumentBody.tsx
29920
30865
  /** 兜底翻译:只在没有 locale 座位时用到。 */
29921
30866
  function translate$1(key) {
29922
- return zh$18[key] ?? key;
30867
+ return zh$19[key] ?? key;
29923
30868
  }
29924
30869
  /**
29925
30870
  * 一个文件地址里的会话与路径。
@@ -30055,7 +31000,7 @@ window.__ModuleLoader__.load({
30055
31000
  */
30056
31001
  /** 兜底翻译:只在没有 locale 座位时用到,走同一份 zh 字典。 */
30057
31002
  function translate(key) {
30058
- return zh$18[key] ?? key;
31003
+ return zh$19[key] ?? key;
30059
31004
  }
30060
31005
  /**
30061
31006
  * 一张视频工具卡片。
@@ -30325,7 +31270,7 @@ window.__ModuleLoader__.load({
30325
31270
  }
30326
31271
  //#endregion
30327
31272
  //#region src/client/providers/minimax-code/styles.ts
30328
- const STYLE_ID$9 = "dsh-minimax-code-settings-style";
31273
+ const STYLE_ID$10 = "dsh-minimax-code-settings-style";
30329
31274
  /**
30330
31275
  * MiniMax Code-only additions to the shared settings design system.
30331
31276
  *
@@ -30494,7 +31439,7 @@ window.__ModuleLoader__.load({
30494
31439
  .dshm-video-history-meta{color:var(--dsw-alias-label-tertiary);flex:none;font-size:11px;font-variant-numeric:tabular-nums}
30495
31440
  @media(max-width:560px){.dshm-video-modal-root{padding:12px 8px}.dshm-video-modal{max-height:calc(100vh - 24px)}.dshm-video-field-row{flex-direction:column;gap:8px}.dshm-video-foot-hint{display:none}}
30496
31441
  @media(prefers-reduced-motion:reduce){.dshm-video-skeleton span{animation:none;opacity:.6}}
30497
- `, STYLE_ID$9);
31442
+ `, STYLE_ID$10);
30498
31443
  }
30499
31444
  //#endregion
30500
31445
  //#region src/client/providers/glm-coding-plan/GlmCodingPlanComposerQuota.tsx
@@ -30511,7 +31456,7 @@ window.__ModuleLoader__.load({
30511
31456
  * 没有快照、没有窗口、或全部窗口都没有百分比时返回 null,即**不渲染胶囊**:
30512
31457
  * 契约允许 quota 为 null,装一个占位数字比不显示更像坏了。
30513
31458
  */
30514
- function selectBadgeFacts$3(status, lookup = (key) => zh$17[key]) {
31459
+ function selectBadgeFacts$3(status, lookup = (key) => zh$18[key]) {
30515
31460
  const measured = (status?.quota?.windows ?? []).filter((window) => typeof window.usedPercent === "number" && Number.isFinite(window.usedPercent));
30516
31461
  if (measured.length === 0) return null;
30517
31462
  const tightest = measured.reduce((best, window) => {
@@ -30549,7 +31494,7 @@ window.__ModuleLoader__.load({
30549
31494
  }
30550
31495
  //#endregion
30551
31496
  //#region src/client/providers/glm-coding-plan/styles.ts
30552
- const STYLE_ID$8 = "dsh-glm-coding-plan-settings-style";
31497
+ const STYLE_ID$9 = "dsh-glm-coding-plan-settings-style";
30553
31498
  /**
30554
31499
  * GLM(ZCode 账号)卡片独有的样式。
30555
31500
  *
@@ -30589,7 +31534,7 @@ window.__ModuleLoader__.load({
30589
31534
  :not(.dsha-btn-primary));通用 hover 修好后它只剩副作用:把 .dsha-btn 的次要
30590
31535
  按钮也画成主按钮,故删除。 */
30591
31536
  .dsha-account-add-actions{display:flex;flex-wrap:wrap;gap:8px}
30592
- `, STYLE_ID$8);
31537
+ `, STYLE_ID$9);
30593
31538
  }
30594
31539
  //#endregion
30595
31540
  //#region src/client/providers/antigravity-acp/route.ts
@@ -30607,7 +31552,7 @@ window.__ModuleLoader__.load({
30607
31552
  * single most misleading pixel on the page.
30608
31553
  */
30609
31554
  function AntigravityAcpComposerBadge(props) {
30610
- const t = useLineDict(NS_ANTIGRAVITY_ACP, zh$14);
31555
+ const t = useLineDict(NS_ANTIGRAVITY_ACP, zh$15);
30611
31556
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ComposerQuotaBadge, {
30612
31557
  directory: props.directory,
30613
31558
  loadModelDirectory: props.loadModelDirectory,
@@ -30649,7 +31594,7 @@ window.__ModuleLoader__.load({
30649
31594
  }
30650
31595
  //#endregion
30651
31596
  //#region src/client/providers/antigravity-acp/styles.ts
30652
- const STYLE_ID$7 = "dsh-antigravity-acp-settings-style";
31597
+ const STYLE_ID$8 = "dsh-antigravity-acp-settings-style";
30653
31598
  /**
30654
31599
  * The Antigravity (ACP) card's own styles.
30655
31600
  *
@@ -30675,7 +31620,7 @@ window.__ModuleLoader__.load({
30675
31620
  .dshagy-details[open]>summary{color:var(--dsw-alias-label-primary)}
30676
31621
  .dshagy-details>p{color:var(--dsw-alias-label-tertiary);font-size:12px;line-height:1.55;margin:9px 0 0}
30677
31622
  .dshagy-boundary{color:var(--dsw-alias-label-tertiary);font-size:12px;line-height:1.55;margin:9px 0 0;padding-left:18px}
30678
- `, STYLE_ID$7);
31623
+ `, STYLE_ID$8);
30679
31624
  }
30680
31625
  //#endregion
30681
31626
  //#region src/client/providers/step-code/StepCodeComposerQuota.tsx
@@ -30739,7 +31684,7 @@ window.__ModuleLoader__.load({
30739
31684
  }
30740
31685
  //#endregion
30741
31686
  //#region src/client/providers/step-code/styles.ts
30742
- const STYLE_ID$6 = "dsh-step-code-settings-style";
31687
+ const STYLE_ID$7 = "dsh-step-code-settings-style";
30743
31688
  /**
30744
31689
  * Step Code(Step Plan 订阅)卡片独有的样式。
30745
31690
  *
@@ -30817,7 +31762,7 @@ window.__ModuleLoader__.load({
30817
31762
  @media(max-width:560px){.dshsc-cred-grid,.dshsc-cred-grid-narrow{grid-template-columns:minmax(0,1fr)}}
30818
31763
 
30819
31764
  .dsha-badge.dshsc-adopted{background:color-mix(in srgb,var(--dsw-alias-button-info-fill,#397ee8) 16%,var(--dsw-alias-bg-layer-1));border-color:color-mix(in srgb,var(--dsw-alias-button-info-fill,#397ee8) 45%,var(--dsw-alias-border-l2));color:var(--dsw-alias-label-primary)}
30820
- `, STYLE_ID$6);
31765
+ `, STYLE_ID$7);
30821
31766
  }
30822
31767
  //#endregion
30823
31768
  //#region src/client/providers/cline-pass/ClinePassComposerQuota.tsx
@@ -30966,7 +31911,7 @@ window.__ModuleLoader__.load({
30966
31911
  }
30967
31912
  //#endregion
30968
31913
  //#region src/client/providers/qoder/styles.ts
30969
- const STYLE_ID$5 = "dsh-qoder-settings-style";
31914
+ const STYLE_ID$6 = "dsh-qoder-settings-style";
30970
31915
  /**
30971
31916
  * Qoder(订阅)卡片独有的样式。
30972
31917
  *
@@ -31021,7 +31966,7 @@ window.__ModuleLoader__.load({
31021
31966
  .dshq-details>p{color:var(--dsw-alias-label-tertiary);font-size:12px;line-height:1.55;margin:9px 0 0}
31022
31967
 
31023
31968
  .dsha-badge.dshq-adopted{background:color-mix(in srgb,var(--dsw-alias-button-info-fill,#397ee8) 16%,var(--dsw-alias-bg-layer-1));border-color:color-mix(in srgb,var(--dsw-alias-button-info-fill,#397ee8) 45%,var(--dsw-alias-border-l2));color:var(--dsw-alias-label-primary)}
31024
- `, STYLE_ID$5);
31969
+ `, STYLE_ID$6);
31025
31970
  }
31026
31971
  //#endregion
31027
31972
  //#region src/client/providers/opendesign/OpenDesignComposerQuota.tsx
@@ -32901,7 +33846,7 @@ window.__ModuleLoader__.load({
32901
33846
  }
32902
33847
  /** 兜底翻译:只在没有 locale 服务时用到(测试、以及菜单渲染早于字典注册)。 */
32903
33848
  function fallbackTranslate$3(key, params) {
32904
- const template = zh$18[key] ?? key;
33849
+ const template = zh$19[key] ?? key;
32905
33850
  if (params === void 0) return template;
32906
33851
  return template.replace(/\{(\w+)\}/g, (_match, name) => String(params[name] ?? ""));
32907
33852
  }
@@ -62077,7 +63022,7 @@ window.__ModuleLoader__.load({
62077
63022
  }
62078
63023
  //#endregion
62079
63024
  //#region src/client/providers/workbuddy/WorkBuddyComposerQuota.tsx
62080
- const api = createLineApi("/workbuddy/api", "WorkBuddy");
63025
+ const api$1 = createLineApi("/workbuddy/api", "WorkBuddy");
62081
63026
  /**
62082
63027
  * Pick the most meaningful number for the badge.
62083
63028
  *
@@ -62137,14 +63082,14 @@ window.__ModuleLoader__.load({
62137
63082
  directory,
62138
63083
  loadModelDirectory,
62139
63084
  providerId: "workbuddy-subscription",
62140
- readStatus: (refresh) => refresh ? api.post("/quota") : api.get("/status"),
63085
+ readStatus: (refresh) => refresh ? api$1.post("/quota") : api$1.get("/status"),
62141
63086
  selectFacts: selectBadgeFacts,
62142
63087
  label: useLineDict(NS_WORKBUDDY, zh$8).composerLabel
62143
63088
  });
62144
63089
  }
62145
63090
  //#endregion
62146
63091
  //#region src/client/providers/workbuddy/styles.ts
62147
- const STYLE_ID$4 = "dsh-workbuddy-settings-style";
63092
+ const STYLE_ID$5 = "dsh-workbuddy-settings-style";
62148
63093
  /**
62149
63094
  * WorkBuddy-only additions to the shared settings design system.
62150
63095
  *
@@ -62198,7 +63143,7 @@ window.__ModuleLoader__.load({
62198
63143
  .dsh-wb-inputrow>input{background:var(--dsw-alias-bg-layer-2);border:0.5px solid var(--dsw-alias-border-l2);border-radius:7px;color:var(--dsw-alias-label-primary);font:inherit;font-size:12px;padding:7px 9px;flex:1 1 260px;min-width:220px;max-width:420px;box-sizing:border-box}
62199
63144
  .dsh-wb-inputrow>input:disabled{opacity:.5}
62200
63145
 
62201
- `, STYLE_ID$4);
63146
+ `, STYLE_ID$5);
62202
63147
  }
62203
63148
  //#endregion
62204
63149
  //#region src/client/providers/qianwen-token-plan/QianwenComposerQuota.tsx
@@ -62226,7 +63171,7 @@ window.__ModuleLoader__.load({
62226
63171
  }
62227
63172
  //#endregion
62228
63173
  //#region src/client/providers/qianwen-token-plan/styles.ts
62229
- const STYLE_ID$3 = "dsh-qianwen-token-plan-settings-style";
63174
+ const STYLE_ID$4 = "dsh-qianwen-token-plan-settings-style";
62230
63175
  function installQianwenStyles() {
62231
63176
  installPluginStyle("qianwen-token-plan", `
62232
63177
  /* 输入行与上方 .dsha-row / .dsha-pref-row 的底部分界线保持间距,避免框线重合 */
@@ -62242,7 +63187,7 @@ window.__ModuleLoader__.load({
62242
63187
  .dshqw-details>summary{color:var(--dsw-alias-label-secondary);cursor:pointer;font-size:12px;list-style:none}
62243
63188
  .dshqw-details>p{color:var(--dsw-alias-label-tertiary);font-size:12px;line-height:1.55;margin:9px 0 0}
62244
63189
  .dshqw-model-meta{color:var(--dsw-alias-label-tertiary);font-size:11px;margin-left:5px}
62245
- `, STYLE_ID$3);
63190
+ `, STYLE_ID$4);
62246
63191
  }
62247
63192
  //#endregion
62248
63193
  //#region src/client/providers/relayone/RelayOneComposerQuota.tsx
@@ -62276,7 +63221,7 @@ window.__ModuleLoader__.load({
62276
63221
  }
62277
63222
  //#endregion
62278
63223
  //#region src/client/providers/relayone/styles.ts
62279
- const STYLE_ID$2 = "dsh-relayone-settings-style";
63224
+ const STYLE_ID$3 = "dsh-relayone-settings-style";
62280
63225
  function installRelayOneStyles() {
62281
63226
  installPluginStyle("relayone", `
62282
63227
  .dshro-page{display:flex;flex-direction:column;gap:12px}
@@ -62295,7 +63240,7 @@ window.__ModuleLoader__.load({
62295
63240
  .dshro-media-row{align-items:stretch;flex-direction:column}
62296
63241
  .dshro-media-row .dsha-select{max-width:none;min-width:0;width:100%}
62297
63242
  }
62298
- `, STYLE_ID$2);
63243
+ `, STYLE_ID$3);
62299
63244
  }
62300
63245
  //#endregion
62301
63246
  //#region src/shared/compact-after-turn.ts
@@ -62508,7 +63453,7 @@ window.__ModuleLoader__.load({
62508
63453
  }
62509
63454
  //#endregion
62510
63455
  //#region src/client/features/compact-after-turn/styles.ts
62511
- const STYLE_ID$1 = "dsh-compact-after-turn-style";
63456
+ const STYLE_ID$2 = "dsh-compact-after-turn-style";
62512
63457
  const CSS$2 = `
62513
63458
  .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%}
62514
63459
  .dshcat-label{align-items:center;display:inline-flex;flex:1;gap:4px;min-width:0}
@@ -62532,11 +63477,11 @@ window.__ModuleLoader__.load({
62532
63477
  @media (prefers-reduced-motion:reduce){.dshcat-switch,.dshcat-switch::before{transition:none}.dshcat-tip{animation:none}}
62533
63478
  `;
62534
63479
  function installCompactAfterTurnStyles() {
62535
- return installPluginStyle("compact-after-turn", CSS$2, STYLE_ID$1);
63480
+ return installPluginStyle("compact-after-turn", CSS$2, STYLE_ID$2);
62536
63481
  }
62537
63482
  //#endregion
62538
63483
  //#region src/client/providers/claude-api/styles.ts
62539
- const STYLE_ID = "dsh-claude-api-settings-style";
63484
+ const STYLE_ID$1 = "dsh-claude-api-settings-style";
62540
63485
  /** Only what the shared .dsha-* primitives do not cover; no shared class is declared here. */
62541
63486
  function installClaudeApiStyles() {
62542
63487
  installPluginStyle("claude-api", `
@@ -62557,7 +63502,7 @@ window.__ModuleLoader__.load({
62557
63502
  .dshca-endpoint-control{flex-wrap:wrap;justify-content:flex-start}
62558
63503
  .dshca-endpoint-control input{flex-basis:100%;max-width:none}
62559
63504
  }
62560
- `, STYLE_ID);
63505
+ `, STYLE_ID$1);
62561
63506
  }
62562
63507
  //#endregion
62563
63508
  //#region src/client/providers/aws-quick/styles.ts
@@ -62567,6 +63512,62 @@ window.__ModuleLoader__.load({
62567
63512
  .dshaq-details>summary{color:var(--dsw-alias-label-secondary);cursor:pointer;font-size:12px;line-height:1.5}
62568
63513
  .dshaq-details>p{color:var(--dsw-alias-label-tertiary);font-size:12px;line-height:1.55;margin:9px 0 0}
62569
63514
  `, "dsh-aws-quick-settings-style");
63515
+ }
63516
+ //#endregion
63517
+ //#region src/client/providers/opencode-go/OpenCodeGoComposerQuota.tsx
63518
+ const api = createLineApi("/opencode-go/api", "OpenCode Go");
63519
+ function selectOpenCodeGoBadgeFacts(status) {
63520
+ const quota = (status?.accounts.find((entry) => entry.id === status.activeAccountId) ?? status?.accounts.find((entry) => entry.isPrimary) ?? status?.accounts[0])?.quota;
63521
+ if (quota === void 0) return {
63522
+ text: "—",
63523
+ tooltip: "[OpenCode Go] quota unavailable — click to refresh",
63524
+ level: "normal"
63525
+ };
63526
+ const window = [...quota.windows].sort((a, b) => (a.windowDurationMins ?? Infinity) - (b.windowDurationMins ?? Infinity))[0];
63527
+ if (window === void 0) return {
63528
+ text: "—",
63529
+ tooltip: "[OpenCode Go] quota unavailable — click to refresh",
63530
+ level: "normal"
63531
+ };
63532
+ const remaining = Math.max(0, 100 - window.usedPercent);
63533
+ const remainingText = formatPercent$1(remaining);
63534
+ const windowLabel = window.label || (window.windowDurationMins === 300 ? "5-hour" : window.windowDurationMins === 10080 ? "weekly" : "monthly");
63535
+ return {
63536
+ text: remainingText + "%",
63537
+ tooltip: "[OpenCode Go] " + windowLabel + ": " + remainingText + "% left",
63538
+ level: quotaLevel(remaining)
63539
+ };
63540
+ }
63541
+ function OpenCodeGoComposerQuota({ directory, loadModelDirectory, t }) {
63542
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ComposerQuotaBadge, {
63543
+ directory,
63544
+ loadModelDirectory,
63545
+ providerId: "opencode-go",
63546
+ readStatus: (refresh) => refresh ? api.post("/quota/refresh") : api.get("/status"),
63547
+ selectFacts: selectOpenCodeGoBadgeFacts,
63548
+ label: t("composerLabel")
63549
+ });
63550
+ }
63551
+ //#endregion
63552
+ //#region src/client/providers/opencode-go/styles.ts
63553
+ const STYLE_ID = "dsh-opencode-go-settings-style";
63554
+ /** Only OpenCode-specific rules; shared controls and the Kimi quota shell are installed from their owner. */
63555
+ function installOpenCodeGoStyles() {
63556
+ installKimiCodeStyles();
63557
+ installPluginStyle("opencode-go", `
63558
+ .dshoc-page .dsha-btn{border-radius:14px}
63559
+ .dshoc-quota .dsha-kq-seg--cyan{background:#06b6d4}
63560
+ .dshoc-quota .dsha-kq-window-meta{align-items:baseline;color:var(--kq-fg-3);display:flex;flex-wrap:wrap;font-size:11px;gap:4px 12px;justify-content:space-between;line-height:1.4;margin-top:6px}
63561
+ .dshoc-quota .dsha-kq-window-meta>span:last-child{font-variant-numeric:tabular-nums}
63562
+ .dshoc-art{color:var(--dsw-alias-label-primary);height:64px;overflow:visible;pointer-events:none;position:absolute;right:6px;top:50%;transform:translateY(-50%);width:140px}
63563
+ .dshoc-art text{fill:currentColor;opacity:0;transform:scale(.8) translateY(16px);transform-box:fill-box;transform-origin:bottom;transition:opacity .2s ease-in-out,transform .2s ease-in-out}
63564
+ .dshoc-account:hover .dshoc-art text,.dshoc-quota:focus-within .dshoc-art text{opacity:1;transform:scale(1) translateY(0);transition:opacity .6s ease-in-out,transform .6s ease-in-out;transition-delay:calc(var(--i,0) * 80ms)}
63565
+ .dshoc-quota-empty{margin:12px 0 0}
63566
+ .dshoc-apikey{display:flex;flex-direction:column;gap:8px;margin-top:12px}
63567
+ .dshoc-apikey-row{align-items:center;display:flex;gap:8px}
63568
+ .dshoc-apikey-row input.dsha-select{flex:1 1 auto;font-size:13px;max-width:none;min-width:0;padding:8px 12px;width:auto}
63569
+ @media(prefers-reduced-motion:reduce){.dshoc-art text{opacity:1;transform:none;transition:none}}
63570
+ `, STYLE_ID);
62570
63571
  }
62571
63572
  //#endregion
62572
63573
  //#region src/client/features/subagent/subagent-card-controller.ts
@@ -65830,7 +66831,7 @@ window.__ModuleLoader__.load({
65830
66831
  * @module @eddyskywalker/dsh-chatgpt-subscription/client/codemode/CodeRunToolView
65831
66832
  */
65832
66833
  function fallbackTranslate(key) {
65833
- return zh$22[key] ?? key;
66834
+ return zh$23[key] ?? key;
65834
66835
  }
65835
66836
  function firstLine(text) {
65836
66837
  const nl = text.indexOf("\n");
@@ -66626,6 +67627,7 @@ window.__ModuleLoader__.load({
66626
67627
  const clinePassApi = new ClinePassApi();
66627
67628
  const openDesignApi = new OpenDesignApi();
66628
67629
  const antigravityApi = new AntigravityAcpApi();
67630
+ const openCodeGoApi = createLineApi(OPENCODE_GO_ROUTE_PREFIX, "OpenCode Go");
66629
67631
  function compactTokens(value) {
66630
67632
  if (!Number.isFinite(value) || value < 0) return "—";
66631
67633
  if (value < 1e3) return String(Math.floor(value));
@@ -67147,6 +68149,40 @@ window.__ModuleLoader__.load({
67147
68149
  facts
67148
68150
  };
67149
68151
  }
68152
+ function activeOpenCodeGoAccount(status) {
68153
+ return status.accounts.find((account) => account.id === status.activeAccountId) ?? status.accounts.find((account) => account.isPrimary) ?? status.accounts[0];
68154
+ }
68155
+ async function readOpenCodeGoQuota(refresh) {
68156
+ if (!refresh) {
68157
+ const status = await openCodeGoApi.get("/status");
68158
+ if (!status.authenticated || activeOpenCodeGoAccount(status)?.quota?.windows.length) return status;
68159
+ }
68160
+ return openCodeGoApi.post("/quota/refresh");
68161
+ }
68162
+ function openCodeGoToSnapshot(status, _modelId, dict, nowMs) {
68163
+ if (!status.authenticated) return null;
68164
+ const account = activeOpenCodeGoAccount(status);
68165
+ const windows = account?.quota?.windows;
68166
+ if (!windows?.length) return null;
68167
+ const bars = windows.map((window, index) => {
68168
+ const remaining = clampPercent(100 - window.usedPercent);
68169
+ return {
68170
+ key: `opencode-go-${index}`,
68171
+ label: formatWindowDurationLabel(window.windowDurationMins, window.label || `#${index + 1}`, dict),
68172
+ remainingPercent: remaining,
68173
+ resetText: formatResetCountdown(window.resetsAt, dict, nowMs),
68174
+ level: quotaLevel(remaining)
68175
+ };
68176
+ });
68177
+ return {
68178
+ providerId: OPENCODE_GO_PROVIDER_ID,
68179
+ providerName: "OpenCode Go",
68180
+ planBadge: account?.planName,
68181
+ ...summarizeBars(bars),
68182
+ bars,
68183
+ facts: []
68184
+ };
68185
+ }
67150
68186
  const SESSION_QUOTA_ADAPTERS = /* @__PURE__ */ new Map([
67151
68187
  [CODEX_CHATGPT_PROVIDER_ID, {
67152
68188
  providerId: CODEX_CHATGPT_PROVIDER_ID,
@@ -67217,6 +68253,15 @@ window.__ModuleLoader__.load({
67217
68253
  providerId: RELAYONE_PROVIDER_ID,
67218
68254
  readStatus: (refresh) => refresh ? post$1("/catalog/refresh", {}) : get$1("/status"),
67219
68255
  toSnapshot: relayOneToSnapshot
68256
+ }],
68257
+ [OPENCODE_GO_PROVIDER_ID, {
68258
+ providerId: OPENCODE_GO_PROVIDER_ID,
68259
+ readStatus: readOpenCodeGoQuota,
68260
+ toSnapshot: openCodeGoToSnapshot,
68261
+ poll: {
68262
+ intervalMs: 3e4,
68263
+ shouldRefresh: (status) => status.authenticated
68264
+ }
67220
68265
  }]
67221
68266
  ]);
67222
68267
  function formatRemainingPercent(value) {
@@ -67287,8 +68332,10 @@ window.__ModuleLoader__.load({
67287
68332
  if (wasIdle) {
67288
68333
  fetchProvider(adapter, entry, false);
67289
68334
  entry.timer = window.setInterval(() => {
67290
- if (document.visibilityState === "visible") fetchProvider(adapter, entry, false);
67291
- }, POLL_INTERVAL_MS);
68335
+ if (document.visibilityState !== "visible" || entry.inFlight !== null) return;
68336
+ const refresh = entry.view.hasData && (adapter.poll?.shouldRefresh(entry.view.raw) ?? false);
68337
+ fetchProvider(adapter, entry, refresh);
68338
+ }, adapter.poll?.intervalMs ?? POLL_INTERVAL_MS);
67292
68339
  }
67293
68340
  return () => {
67294
68341
  entry.subscribers.delete(listener);
@@ -67594,37 +68641,37 @@ window.__ModuleLoader__.load({
67594
68641
  installLineLocale(ctx.locale);
67595
68642
  ctx.effect(() => installHostLocaleMirror(ctx.locale), "dsh-chatgpt-subscription: host locale mirror");
67596
68643
  installRussianLocale(ctx);
67597
- ctx.effect(() => ctx.locale.register(NS, dictionaries$22), "dsh-chatgpt-subscription: dictionaries");
68644
+ ctx.effect(() => ctx.locale.register(NS, dictionaries$23), "dsh-chatgpt-subscription: dictionaries");
67598
68645
  ctx.effect(() => installStyles(), "dsh-chatgpt-subscription: styles");
67599
68646
  ctx.effect(() => {
67600
68647
  installHubStyles();
67601
68648
  installModelChecklistStyles();
67602
68649
  return () => {};
67603
68650
  }, "dsh-chatgpt-subscription: hub styles");
67604
- ctx.effect(() => ctx.locale.register(NS_MODEL_CHECKLIST, dictionaries$21), "dsh-model-checklist: dictionaries");
67605
- ctx.effect(() => ctx.locale.register(NS_CLAUDE, dictionaries$16), "dsh-claude: dictionaries");
68651
+ ctx.effect(() => ctx.locale.register(NS_MODEL_CHECKLIST, dictionaries$22), "dsh-model-checklist: dictionaries");
68652
+ ctx.effect(() => ctx.locale.register(NS_CLAUDE, dictionaries$17), "dsh-claude: dictionaries");
67606
68653
  ctx.effect(() => {
67607
68654
  installClaudeStyles();
67608
68655
  return () => {};
67609
68656
  }, "dsh-claude: styles");
67610
- ctx.effect(() => ctx.locale.register(NS_COMMAND_CODE, dictionaries$20), "dsh-command-code: dictionaries");
67611
- ctx.effect(() => ctx.locale.register(NS_KIMI_CODE, dictionaries$19), "dsh-kimi-code: dictionaries");
68657
+ ctx.effect(() => ctx.locale.register(NS_COMMAND_CODE, dictionaries$21), "dsh-command-code: dictionaries");
68658
+ ctx.effect(() => ctx.locale.register(NS_KIMI_CODE, dictionaries$20), "dsh-kimi-code: dictionaries");
67612
68659
  ctx.effect(() => {
67613
68660
  installKimiCodeStyles();
67614
68661
  return () => {};
67615
68662
  }, "dsh-kimi-code: styles");
67616
- ctx.effect(() => ctx.locale.register(NS_MINIMAX_CODE, dictionaries$18), "dsh-minimax-code: dictionaries");
68663
+ ctx.effect(() => ctx.locale.register(NS_MINIMAX_CODE, dictionaries$19), "dsh-minimax-code: dictionaries");
67617
68664
  ctx.effect(() => {
67618
68665
  installMinimaxCodeStyles();
67619
68666
  return () => {};
67620
68667
  }, "dsh-minimax-code: styles");
67621
- ctx.effect(() => ctx.locale.register(NS_GLM_CODING_PLAN, dictionaries$17), "dsh-glm-coding-plan: dictionaries");
68668
+ ctx.effect(() => ctx.locale.register(NS_GLM_CODING_PLAN, dictionaries$18), "dsh-glm-coding-plan: dictionaries");
67622
68669
  ctx.effect(() => {
67623
68670
  installGlmCodingPlanStyles();
67624
68671
  return () => {};
67625
68672
  }, "dsh-glm-coding-plan: styles");
67626
- ctx.effect(() => ctx.locale.register(NS_OLLAMA, dictionaries$15), "dsh-ollama: dictionaries");
67627
- ctx.effect(() => ctx.locale.register(NS_ANTIGRAVITY_ACP, dictionaries$14), "dsh-antigravity-acp: dictionaries");
68673
+ ctx.effect(() => ctx.locale.register(NS_OLLAMA, dictionaries$16), "dsh-ollama: dictionaries");
68674
+ ctx.effect(() => ctx.locale.register(NS_ANTIGRAVITY_ACP, dictionaries$15), "dsh-antigravity-acp: dictionaries");
67628
68675
  ctx.effect(() => {
67629
68676
  installAntigravityAcpStyles();
67630
68677
  return () => {};
@@ -67678,11 +68725,16 @@ window.__ModuleLoader__.load({
67678
68725
  installClaudeApiStyles();
67679
68726
  return () => {};
67680
68727
  }, "dsh-claude-api: styles");
67681
- ctx.effect(() => ctx.locale.register(NS_AWS_QUICK, dictionaries$13), "dsh-aws-quick: dictionaries");
68728
+ ctx.effect(() => ctx.locale.register(NS_AWS_QUICK, dictionaries$14), "dsh-aws-quick: dictionaries");
67682
68729
  ctx.effect(() => {
67683
68730
  installAwsQuickStyles();
67684
68731
  return () => {};
67685
68732
  }, "dsh-aws-quick: styles");
68733
+ ctx.effect(() => ctx.locale.register(NS_OPENCODE_GO, dictionaries$13), "dsh-opencode-go: dictionaries");
68734
+ ctx.effect(() => {
68735
+ installOpenCodeGoStyles();
68736
+ return () => {};
68737
+ }, "dsh-opencode-go: styles");
67686
68738
  ctx.effect(() => ctx.locale.register(NS_SUBAGENT, dictionaries), "dsh-subagent-settings: dictionaries");
67687
68739
  ctx.effect(() => ctx.locale.register(NS_DISPATCH_LEDGER, dictionaries$4), "dsh-dispatch-ledger: dictionaries");
67688
68740
  ctx.effect(() => {
@@ -67815,6 +68867,13 @@ window.__ModuleLoader__.load({
67815
68867
  locale: NS_RELAYONE,
67816
68868
  inject: (sessionId) => composerBadgeInject(ctx, sessionId)
67817
68869
  }, RelayOneComposerQuota));
68870
+ ctx.slots.inject("conversation.input.right", () => ctx.slots.register({
68871
+ name: "conversation.input.right",
68872
+ id: "opencode-go-quota",
68873
+ order: 51,
68874
+ locale: NS_OPENCODE_GO,
68875
+ inject: (sessionId) => composerBadgeInject(ctx, sessionId)
68876
+ }, OpenCodeGoComposerQuota));
67818
68877
  ctx.slots.inject("conversation.input.model.options", () => {
67819
68878
  try {
67820
68879
  return ctx.slots.register({