@eddyskywalker/dsh-chatgpt-subscription 0.81.3 → 0.82.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/lib/client.js +735 -377
- package/lib/client.js.map +1 -1
- package/lib/index.js +701 -41
- package/lib/types/client/CodexComposerQuota.d.ts.map +1 -1
- package/lib/types/client/common/ComposerQuotaBadge.d.ts +25 -4
- package/lib/types/client/common/ComposerQuotaBadge.d.ts.map +1 -1
- package/lib/types/client/compact-after-turn/CompactAfterTurnToggle.d.ts +24 -0
- package/lib/types/client/compact-after-turn/CompactAfterTurnToggle.d.ts.map +1 -0
- package/lib/types/client/compact-after-turn/locales.d.ts +34 -0
- package/lib/types/client/compact-after-turn/locales.d.ts.map +1 -0
- package/lib/types/client/compact-after-turn/styles.d.ts +2 -0
- package/lib/types/client/compact-after-turn/styles.d.ts.map +1 -0
- package/lib/types/client/index.d.ts +2 -0
- package/lib/types/client/index.d.ts.map +1 -1
- package/lib/types/client/kimi-code/styles.d.ts.map +1 -1
- package/lib/types/client/locales-ru/compact-after-turn.d.ts +3 -0
- package/lib/types/client/locales-ru/compact-after-turn.d.ts.map +1 -0
- package/lib/types/client/locales-ru/index.d.ts.map +1 -1
- package/lib/types/client/opendesign/styles.d.ts.map +1 -1
- package/lib/types/client/styles.d.ts.map +1 -1
- package/lib/types/compat.d.ts +1 -1
- package/lib/types/host/aws-quick/adapter.d.ts +5 -0
- package/lib/types/host/aws-quick/adapter.d.ts.map +1 -1
- package/lib/types/host/aws-quick/client.d.ts +9 -0
- package/lib/types/host/aws-quick/client.d.ts.map +1 -1
- package/lib/types/host/aws-quick/execution-broker.d.ts.map +1 -1
- package/lib/types/host/aws-quick/markup.d.ts +42 -0
- package/lib/types/host/aws-quick/markup.d.ts.map +1 -0
- package/lib/types/host/aws-quick/protocol.d.ts +19 -0
- package/lib/types/host/aws-quick/protocol.d.ts.map +1 -1
- package/lib/types/host/compact-after-turn/index.d.ts +126 -0
- package/lib/types/host/compact-after-turn/index.d.ts.map +1 -0
- package/lib/types/index.d.ts.map +1 -1
- package/lib/types/shared/compact-after-turn.d.ts +45 -0
- package/lib/types/shared/compact-after-turn.d.ts.map +1 -0
- package/package.json +1 -1
package/lib/client.js
CHANGED
|
@@ -72,6 +72,147 @@ window.__ModuleLoader__.load({
|
|
|
72
72
|
return (0, react.useSyncExternalStore)((listener) => store.subscribe(listener), () => store.getSnapshot(), () => store.getSnapshot());
|
|
73
73
|
}
|
|
74
74
|
//#endregion
|
|
75
|
+
//#region src/client/common/ComposerQuotaBadge.tsx
|
|
76
|
+
/**
|
|
77
|
+
* The composer badge every subscription line shows beside the input.
|
|
78
|
+
*
|
|
79
|
+
* Six of these were near-identical copies: the same mount guard, the same 60 s
|
|
80
|
+
* poll that only ticks while the tab is visible, the same "inert unless the
|
|
81
|
+
* conversation is on this provider" rule, the same markup. What differed was the
|
|
82
|
+
* part worth reading — how each line picks its most meaningful number — and that
|
|
83
|
+
* is the only thing a line still supplies.
|
|
84
|
+
*
|
|
85
|
+
* Two details this shared shape depends on:
|
|
86
|
+
*
|
|
87
|
+
* - the callbacks are held in refs. Every caller hands them over as an inline
|
|
88
|
+
* arrow, and a callback in the dependency array would restart the interval —
|
|
89
|
+
* and refetch — on every render. The copies this replaced were only safe
|
|
90
|
+
* because each was rendered with a stable prop, which is a property of the
|
|
91
|
+
* call site rather than of the badge;
|
|
92
|
+
* - `authenticated` is part of the status contract rather than a predicate a
|
|
93
|
+
* line could forget, so a signed-out line can never leave a stale badge up.
|
|
94
|
+
*/
|
|
95
|
+
/** The shared grading: 5% or less is critical, 20% or less warns. */
|
|
96
|
+
function quotaLevel(remainingPercent) {
|
|
97
|
+
return remainingPercent <= 5 ? "danger" : remainingPercent <= 20 ? "warning" : "normal";
|
|
98
|
+
}
|
|
99
|
+
function ComposerQuotaBadge(props) {
|
|
100
|
+
const { directory, loadModelDirectory, providerId, label } = props;
|
|
101
|
+
const modelState = useStore(directory);
|
|
102
|
+
const [status, setStatus] = (0, react.useState)(null);
|
|
103
|
+
const [loading, setLoading] = (0, react.useState)(false);
|
|
104
|
+
const mountedRef = (0, react.useRef)(false);
|
|
105
|
+
const readRef = (0, react.useRef)(props.readStatus);
|
|
106
|
+
const selectRef = (0, react.useRef)(props.selectFacts);
|
|
107
|
+
readRef.current = props.readStatus;
|
|
108
|
+
selectRef.current = props.selectFacts;
|
|
109
|
+
const selected = modelState.current;
|
|
110
|
+
const isSelected = selected?.provider === providerId;
|
|
111
|
+
(0, react.useEffect)(() => {
|
|
112
|
+
loadModelDirectory();
|
|
113
|
+
}, [loadModelDirectory]);
|
|
114
|
+
(0, react.useEffect)(() => {
|
|
115
|
+
mountedRef.current = true;
|
|
116
|
+
return () => {
|
|
117
|
+
mountedRef.current = false;
|
|
118
|
+
};
|
|
119
|
+
}, []);
|
|
120
|
+
const fetchStatus = (0, react.useCallback)(async (refresh) => {
|
|
121
|
+
if (!mountedRef.current) return;
|
|
122
|
+
setLoading(true);
|
|
123
|
+
try {
|
|
124
|
+
const data = await readRef.current(refresh);
|
|
125
|
+
if (mountedRef.current) setStatus(data);
|
|
126
|
+
} catch {} finally {
|
|
127
|
+
if (mountedRef.current) setLoading(false);
|
|
128
|
+
}
|
|
129
|
+
}, []);
|
|
130
|
+
(0, react.useEffect)(() => {
|
|
131
|
+
if (!isSelected) return;
|
|
132
|
+
fetchStatus(false);
|
|
133
|
+
const timer = window.setInterval(() => {
|
|
134
|
+
if (document.visibilityState === "visible") fetchStatus(false);
|
|
135
|
+
}, 6e4);
|
|
136
|
+
return () => {
|
|
137
|
+
window.clearInterval(timer);
|
|
138
|
+
};
|
|
139
|
+
}, [fetchStatus, isSelected]);
|
|
140
|
+
const facts = (0, react.useMemo)(() => selectRef.current(status, selected?.model), [status, selected?.model]);
|
|
141
|
+
if (!isSelected || status === null || !status.authenticated || facts === null) return null;
|
|
142
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(QuotaCapsule, {
|
|
143
|
+
label,
|
|
144
|
+
text: facts.text,
|
|
145
|
+
tooltip: facts.tooltip,
|
|
146
|
+
level: facts.level,
|
|
147
|
+
percent: facts.percent,
|
|
148
|
+
loading,
|
|
149
|
+
onRefresh: () => void fetchStatus(true)
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* The capsule itself, shared by every line's badge and by the Codex one.
|
|
154
|
+
*
|
|
155
|
+
* It leads with a health indicator in the level's tone: a ring gauge for a line
|
|
156
|
+
* that states its remaining share, a status dot for one that only reports a
|
|
157
|
+
* number. Both repeat what the tooltip already says in words, so they stay out
|
|
158
|
+
* of the accessibility tree. A refresh keeps the previous number on screen —
|
|
159
|
+
* swapping it for an ellipsis made the capsule change width on every poll.
|
|
160
|
+
*/
|
|
161
|
+
function QuotaCapsule({ label, text, tooltip, level, percent, loading = false, onRefresh }) {
|
|
162
|
+
const share = typeof percent === "number" && Number.isFinite(percent) ? Math.min(100, Math.max(0, percent)) : null;
|
|
163
|
+
const interactive = onRefresh !== void 0;
|
|
164
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
165
|
+
className: "dsha-composer-quota",
|
|
166
|
+
"data-level": level,
|
|
167
|
+
"data-loading": loading ? "true" : void 0,
|
|
168
|
+
"aria-busy": loading || void 0,
|
|
169
|
+
title: tooltip,
|
|
170
|
+
"aria-label": tooltip,
|
|
171
|
+
role: interactive ? "button" : void 0,
|
|
172
|
+
tabIndex: interactive ? 0 : void 0,
|
|
173
|
+
onClick: onRefresh,
|
|
174
|
+
onKeyDown: interactive ? (event) => {
|
|
175
|
+
if (event.key !== "Enter" && event.key !== " ") return;
|
|
176
|
+
event.preventDefault();
|
|
177
|
+
onRefresh();
|
|
178
|
+
} : void 0,
|
|
179
|
+
children: [
|
|
180
|
+
share === null ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("i", {
|
|
181
|
+
className: "dsha-composer-quota-dot",
|
|
182
|
+
"aria-hidden": "true"
|
|
183
|
+
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("svg", {
|
|
184
|
+
className: "dsha-composer-quota-ring",
|
|
185
|
+
viewBox: "0 0 16 16",
|
|
186
|
+
"aria-hidden": "true",
|
|
187
|
+
focusable: "false",
|
|
188
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("circle", {
|
|
189
|
+
className: "dsha-composer-quota-ring-track",
|
|
190
|
+
cx: "8",
|
|
191
|
+
cy: "8",
|
|
192
|
+
r: "6",
|
|
193
|
+
pathLength: 100
|
|
194
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("circle", {
|
|
195
|
+
className: "dsha-composer-quota-ring-fill",
|
|
196
|
+
cx: "8",
|
|
197
|
+
cy: "8",
|
|
198
|
+
r: "6",
|
|
199
|
+
pathLength: 100,
|
|
200
|
+
strokeDasharray: `${share} 100`,
|
|
201
|
+
strokeLinecap: share > 0 ? "round" : "butt"
|
|
202
|
+
})]
|
|
203
|
+
}),
|
|
204
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
205
|
+
className: "dsha-composer-quota-label",
|
|
206
|
+
children: label
|
|
207
|
+
}),
|
|
208
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", {
|
|
209
|
+
className: "dsha-composer-quota-val",
|
|
210
|
+
children: text
|
|
211
|
+
})
|
|
212
|
+
]
|
|
213
|
+
});
|
|
214
|
+
}
|
|
215
|
+
//#endregion
|
|
75
216
|
//#region src/client/quota.ts
|
|
76
217
|
function selectQuotaForModel(quota, modelId) {
|
|
77
218
|
if (quota === void 0 || quota.buckets.length === 0) return null;
|
|
@@ -135,11 +276,13 @@ window.__ModuleLoader__.load({
|
|
|
135
276
|
}, [api, isCodex]);
|
|
136
277
|
const quota = (0, react.useMemo)(() => selectQuotaForModel(status?.quota, selected?.model), [selected?.model, status?.quota]);
|
|
137
278
|
if (!isCodex || status?.preferences.quickQuotaVisible !== true) return null;
|
|
138
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
279
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(QuotaCapsule, {
|
|
280
|
+
label: t("quickQuotaLabel"),
|
|
281
|
+
text: quota === null ? loading ? t("quickQuotaLoading") : "—" : formatPercent$2(quota.remainingPercent),
|
|
282
|
+
tooltip: quota === null ? t("quickQuotaLoading") : `${t("quickQuotaLabel")}: ${formatPercent$2(quota.remainingPercent)}`,
|
|
283
|
+
level: quota === null ? "normal" : quotaLevel(quota.remainingPercent),
|
|
284
|
+
percent: quota?.remainingPercent ?? null,
|
|
285
|
+
loading: loading && quota !== null
|
|
143
286
|
});
|
|
144
287
|
}
|
|
145
288
|
function formatPercent$2(value) {
|
|
@@ -431,7 +574,7 @@ window.__ModuleLoader__.load({
|
|
|
431
574
|
//#endregion
|
|
432
575
|
//#region src/client/locales.ts
|
|
433
576
|
const NS = "dsh-chatgpt-subscription";
|
|
434
|
-
const zh$
|
|
577
|
+
const zh$20 = {
|
|
435
578
|
...accountPoolZh,
|
|
436
579
|
title: "ChatGPT",
|
|
437
580
|
hubTitle: "订阅服务",
|
|
@@ -669,8 +812,8 @@ window.__ModuleLoader__.load({
|
|
|
669
812
|
codeRunFailed: "失败",
|
|
670
813
|
codeRunStopped: "已停止"
|
|
671
814
|
};
|
|
672
|
-
const dictionaries$
|
|
673
|
-
zh: zh$
|
|
815
|
+
const dictionaries$20 = {
|
|
816
|
+
zh: zh$20,
|
|
674
817
|
en: {
|
|
675
818
|
...accountPoolEn,
|
|
676
819
|
title: "ChatGPT",
|
|
@@ -1021,7 +1164,7 @@ window.__ModuleLoader__.load({
|
|
|
1021
1164
|
* reads).
|
|
1022
1165
|
*/
|
|
1023
1166
|
function LineProxySection({ line, fetchSnapshot, onSave, idPrefix, snapshot: provided }) {
|
|
1024
|
-
const labels = useLineDict(NS, zh$
|
|
1167
|
+
const labels = useLineDict(NS, zh$20);
|
|
1025
1168
|
const readSnapshotFromRoute = (0, react.useCallback)(() => (fetchSnapshot ?? (() => fetchLineProxySnapshot("/api/dsh-chatgpt-subscription")))(), [fetchSnapshot]);
|
|
1026
1169
|
const writePreferences = (0, react.useCallback)((patch) => (onSave ?? ((next) => savePreferences("/api/dsh-chatgpt-subscription", next)))(patch), [onSave]);
|
|
1027
1170
|
const [readSnapshot, setReadSnapshot] = (0, react.useState)(null);
|
|
@@ -3968,7 +4111,7 @@ window.__ModuleLoader__.load({
|
|
|
3968
4111
|
//#endregion
|
|
3969
4112
|
//#region src/client/command-code/locales.ts
|
|
3970
4113
|
const NS_COMMAND_CODE = "dsh-command-code";
|
|
3971
|
-
const zh$
|
|
4114
|
+
const zh$19 = {
|
|
3972
4115
|
...accountPoolZh,
|
|
3973
4116
|
title: "Command Code",
|
|
3974
4117
|
pageDesc: "登录 Command Code,管理可用模型、上下文窗口与额度。",
|
|
@@ -4036,7 +4179,7 @@ window.__ModuleLoader__.load({
|
|
|
4036
4179
|
loginFailed: "登录失败",
|
|
4037
4180
|
tokens: "tokens"
|
|
4038
4181
|
};
|
|
4039
|
-
const en$
|
|
4182
|
+
const en$19 = {
|
|
4040
4183
|
...accountPoolEn,
|
|
4041
4184
|
title: "Command Code",
|
|
4042
4185
|
pageDesc: "Sign in to Command Code and manage models, context windows, and quota.",
|
|
@@ -4104,11 +4247,11 @@ window.__ModuleLoader__.load({
|
|
|
4104
4247
|
loginFailed: "Sign-in failed",
|
|
4105
4248
|
tokens: "tokens"
|
|
4106
4249
|
};
|
|
4107
|
-
const dictionaries$
|
|
4108
|
-
zh: zh$
|
|
4109
|
-
"zh-CN": zh$
|
|
4110
|
-
en: en$
|
|
4111
|
-
"en-US": en$
|
|
4250
|
+
const dictionaries$19 = {
|
|
4251
|
+
zh: zh$19,
|
|
4252
|
+
"zh-CN": zh$19,
|
|
4253
|
+
en: en$19,
|
|
4254
|
+
"en-US": en$19
|
|
4112
4255
|
};
|
|
4113
4256
|
//#endregion
|
|
4114
4257
|
//#region src/client/command-code/CommandCodeSection.tsx
|
|
@@ -4149,7 +4292,7 @@ window.__ModuleLoader__.load({
|
|
|
4149
4292
|
const [apiKey, setApiKey] = (0, react.useState)("");
|
|
4150
4293
|
/** Follow-up poll owed while the host refreshes the quota behind an answer. */
|
|
4151
4294
|
const quotaFollowUp = (0, react.useRef)(null);
|
|
4152
|
-
const t = useLineDict(NS_COMMAND_CODE, zh$
|
|
4295
|
+
const t = useLineDict(NS_COMMAND_CODE, zh$19);
|
|
4153
4296
|
const notifyChange = (0, react.useCallback)(() => {
|
|
4154
4297
|
onModelChange?.();
|
|
4155
4298
|
loadModelDirectory?.();
|
|
@@ -4911,7 +5054,7 @@ window.__ModuleLoader__.load({
|
|
|
4911
5054
|
//#endregion
|
|
4912
5055
|
//#region src/client/kimi-code/locales.ts
|
|
4913
5056
|
const NS_KIMI_CODE = "dsh-kimi-code";
|
|
4914
|
-
const zh$
|
|
5057
|
+
const zh$18 = {
|
|
4915
5058
|
...accountPoolZh,
|
|
4916
5059
|
title: "Kimi Code",
|
|
4917
5060
|
pageDesc: "登录 Kimi Code 订阅,管理模型、思考档位、上下文窗口与额度。",
|
|
@@ -5107,7 +5250,7 @@ window.__ModuleLoader__.load({
|
|
|
5107
5250
|
compactionRouteNoImage: "该模型不接受图片:摘要里的截图会被替换为占位文本。",
|
|
5108
5251
|
compactionRouteEmpty: "没有可用的线路——先登录任意一条线路再回来设置。"
|
|
5109
5252
|
};
|
|
5110
|
-
const en$
|
|
5253
|
+
const en$18 = {
|
|
5111
5254
|
...accountPoolEn,
|
|
5112
5255
|
title: "Kimi Code",
|
|
5113
5256
|
pageDesc: "Sign in to the Kimi Code subscription and manage models, thinking level, context windows, and quota.",
|
|
@@ -5303,11 +5446,11 @@ window.__ModuleLoader__.load({
|
|
|
5303
5446
|
compactionRouteNoImage: "This model takes no images: screenshots become placeholder text in the summary.",
|
|
5304
5447
|
compactionRouteEmpty: "No route is available — sign in to one first."
|
|
5305
5448
|
};
|
|
5306
|
-
const dictionaries$
|
|
5307
|
-
zh: zh$
|
|
5308
|
-
"zh-CN": zh$
|
|
5309
|
-
en: en$
|
|
5310
|
-
"en-US": en$
|
|
5449
|
+
const dictionaries$18 = {
|
|
5450
|
+
zh: zh$18,
|
|
5451
|
+
"zh-CN": zh$18,
|
|
5452
|
+
en: en$18,
|
|
5453
|
+
"en-US": en$18
|
|
5311
5454
|
};
|
|
5312
5455
|
//#endregion
|
|
5313
5456
|
//#region src/shared/kimi-code-contracts.ts
|
|
@@ -5419,7 +5562,7 @@ window.__ModuleLoader__.load({
|
|
|
5419
5562
|
return `${value}x`;
|
|
5420
5563
|
}
|
|
5421
5564
|
function KimiModelCapabilities({ models }) {
|
|
5422
|
-
const t = useLineDict(NS_KIMI_CODE, zh$
|
|
5565
|
+
const t = useLineDict(NS_KIMI_CODE, zh$18);
|
|
5423
5566
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
5424
5567
|
className: "dsha-cap-table",
|
|
5425
5568
|
children: [
|
|
@@ -5951,7 +6094,7 @@ window.__ModuleLoader__.load({
|
|
|
5951
6094
|
statusGeneration.current += 1;
|
|
5952
6095
|
setStatus(next);
|
|
5953
6096
|
}, []);
|
|
5954
|
-
const t = useLineDict(NS_KIMI_CODE, zh$
|
|
6097
|
+
const t = useLineDict(NS_KIMI_CODE, zh$18);
|
|
5955
6098
|
const notifyChange = (0, react.useCallback)(() => {
|
|
5956
6099
|
onModelChange?.();
|
|
5957
6100
|
loadModelDirectory?.();
|
|
@@ -6853,7 +6996,7 @@ window.__ModuleLoader__.load({
|
|
|
6853
6996
|
//#endregion
|
|
6854
6997
|
//#region src/client/minimax-code/locales.ts
|
|
6855
6998
|
const NS_MINIMAX_CODE = "dsh-minimax-code";
|
|
6856
|
-
const zh$
|
|
6999
|
+
const zh$17 = {
|
|
6857
7000
|
...accountPoolZh,
|
|
6858
7001
|
title: "MiniMax Code",
|
|
6859
7002
|
pageDesc: "登录 MiniMax Code 编程订阅(设备码 OAuth),复用本机 MiniMax Code 的登录态,管理账号、连接与模型。",
|
|
@@ -7051,7 +7194,7 @@ window.__ModuleLoader__.load({
|
|
|
7051
7194
|
videoHistoryEncrypted: "已由系统凭据后端加密",
|
|
7052
7195
|
videoHistoryPlain: "本机没有可用的凭据后端,记录为明文"
|
|
7053
7196
|
};
|
|
7054
|
-
const en$
|
|
7197
|
+
const en$17 = {
|
|
7055
7198
|
...accountPoolEn,
|
|
7056
7199
|
title: "MiniMax Code",
|
|
7057
7200
|
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.",
|
|
@@ -7249,11 +7392,11 @@ window.__ModuleLoader__.load({
|
|
|
7249
7392
|
videoHistoryEncrypted: "Encrypted by the platform credential backend",
|
|
7250
7393
|
videoHistoryPlain: "No credential backend on this host; stored as plain text"
|
|
7251
7394
|
};
|
|
7252
|
-
const dictionaries$
|
|
7253
|
-
zh: zh$
|
|
7254
|
-
"zh-CN": zh$
|
|
7255
|
-
en: en$
|
|
7256
|
-
"en-US": en$
|
|
7395
|
+
const dictionaries$17 = {
|
|
7396
|
+
zh: zh$17,
|
|
7397
|
+
"zh-CN": zh$17,
|
|
7398
|
+
en: en$17,
|
|
7399
|
+
"en-US": en$17
|
|
7257
7400
|
};
|
|
7258
7401
|
//#endregion
|
|
7259
7402
|
//#region src/client/minimax-code/useMinimaxCodeSection.ts
|
|
@@ -7267,7 +7410,7 @@ window.__ModuleLoader__.load({
|
|
|
7267
7410
|
* rather than inferred from the JSX.
|
|
7268
7411
|
*/
|
|
7269
7412
|
/** The card's own dictionary; stable identity keeps effect dependencies intact. */
|
|
7270
|
-
const fallbackTranslate$7 = (key) => zh$
|
|
7413
|
+
const fallbackTranslate$7 = (key) => zh$17[key];
|
|
7271
7414
|
/**
|
|
7272
7415
|
* The shared pool card's labels, resolved through this card's dictionary.
|
|
7273
7416
|
*
|
|
@@ -9326,7 +9469,7 @@ window.__ModuleLoader__.load({
|
|
|
9326
9469
|
* 键名重合的会被渲染成 ChatGPT 的措辞,不重合的会把键名本身打印出来)。
|
|
9327
9470
|
*/
|
|
9328
9471
|
const NS_GLM_CODING_PLAN = "dsh-glm-coding-plan";
|
|
9329
|
-
const zh$
|
|
9472
|
+
const zh$16 = {
|
|
9330
9473
|
...accountPoolZh,
|
|
9331
9474
|
title: "GLM(ZCode 账号)",
|
|
9332
9475
|
pageDesc: "用 ZCode 账号授权接入 GLM Coding Plan(国区 bigmodel.cn / 国际区 z.ai),管理账号池、套餐额度与模型勾选。两个区域的凭据各自独立,池内可以同时存在两区账号。",
|
|
@@ -9420,7 +9563,7 @@ window.__ModuleLoader__.load({
|
|
|
9420
9563
|
quotaAllowanceUnknown: "未判定",
|
|
9421
9564
|
quotaAllowanceHint: "登录时探活认定的额度来源。「免费体验额度」指新用户注册后自动获得、首次使用起 5 天内每天 800 万 token 的体验额度。"
|
|
9422
9565
|
};
|
|
9423
|
-
const en$
|
|
9566
|
+
const en$16 = {
|
|
9424
9567
|
...accountPoolEn,
|
|
9425
9568
|
title: "GLM (ZCode account)",
|
|
9426
9569
|
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.",
|
|
@@ -9514,11 +9657,11 @@ window.__ModuleLoader__.load({
|
|
|
9514
9657
|
quotaAllowanceUnknown: "Undetermined",
|
|
9515
9658
|
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."
|
|
9516
9659
|
};
|
|
9517
|
-
const dictionaries$
|
|
9518
|
-
zh: zh$
|
|
9519
|
-
"zh-CN": zh$
|
|
9520
|
-
en: en$
|
|
9521
|
-
"en-US": en$
|
|
9660
|
+
const dictionaries$16 = {
|
|
9661
|
+
zh: zh$16,
|
|
9662
|
+
"zh-CN": zh$16,
|
|
9663
|
+
en: en$16,
|
|
9664
|
+
"en-US": en$16
|
|
9522
9665
|
};
|
|
9523
9666
|
/** 一个配额窗口的键到「窗口长度(分钟)」的映射。 */
|
|
9524
9667
|
const QUOTA_WINDOW_MINUTES$1 = {
|
|
@@ -9599,7 +9742,7 @@ window.__ModuleLoader__.load({
|
|
|
9599
9742
|
/** 登录状态机的轮询节奏。真实超时与间隔由 host 拥有,卡片只是跟随。 */
|
|
9600
9743
|
const LOGIN_POLL_INTERVAL_MS$2 = 2e3;
|
|
9601
9744
|
/** 本卡片的字典;身份稳定,依赖它的 effect 才不会每次渲染重建。 */
|
|
9602
|
-
const fallbackTranslate$6 = (key) => zh$
|
|
9745
|
+
const fallbackTranslate$6 = (key) => zh$16[key];
|
|
9603
9746
|
/**
|
|
9604
9747
|
* 共享账号池卡片需要的标签集,按本卡片的字典逐键查出来。
|
|
9605
9748
|
*
|
|
@@ -10025,7 +10168,7 @@ window.__ModuleLoader__.load({
|
|
|
10025
10168
|
const { status, loading, busy, error, connection, adoptResult, pasteValue, region, pasteOpen, contextDrafts, savingModel } = state;
|
|
10026
10169
|
const { accounts, models, contextModels, overrideCount, login, quota, authenticated, poolLabels } = derived;
|
|
10027
10170
|
const { setRegion, login: startLogin, cancelLogin, submitPaste, setPasteValue, togglePaste, adopt, clearAdoptResult, accountAction, setStrategy, toggleModel, setAllModels, saveContextWindow, resetContextWindow, resetAllContextWindows, updateContextDraft, refreshQuota, refreshCatalog, testConnection } = actions;
|
|
10028
|
-
const t = useLineDict(NS_GLM_CODING_PLAN, zh$
|
|
10171
|
+
const t = useLineDict(NS_GLM_CODING_PLAN, zh$16);
|
|
10029
10172
|
if (loading) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
10030
10173
|
className: "dsha-page",
|
|
10031
10174
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
@@ -10491,7 +10634,7 @@ window.__ModuleLoader__.load({
|
|
|
10491
10634
|
* provider — the same reason every sibling line has one.
|
|
10492
10635
|
*/
|
|
10493
10636
|
const NS_CLAUDE = "dsh-claude";
|
|
10494
|
-
const zh$
|
|
10637
|
+
const zh$15 = {
|
|
10495
10638
|
...accountPoolZh,
|
|
10496
10639
|
title: "Claude(订阅)",
|
|
10497
10640
|
pageDesc: "登录 Claude Pro/Max 订阅,管理模型、思考档位、上下文窗口与额度。",
|
|
@@ -10612,7 +10755,7 @@ window.__ModuleLoader__.load({
|
|
|
10612
10755
|
copy: "复制",
|
|
10613
10756
|
copied: "已复制"
|
|
10614
10757
|
};
|
|
10615
|
-
const en$
|
|
10758
|
+
const en$15 = {
|
|
10616
10759
|
...accountPoolEn,
|
|
10617
10760
|
title: "Claude (subscription)",
|
|
10618
10761
|
pageDesc: "Sign in to a Claude Pro/Max subscription and manage models, thinking levels, context windows and quota.",
|
|
@@ -10733,11 +10876,11 @@ window.__ModuleLoader__.load({
|
|
|
10733
10876
|
copy: "Copy",
|
|
10734
10877
|
copied: "Copied"
|
|
10735
10878
|
};
|
|
10736
|
-
const dictionaries$
|
|
10737
|
-
zh: zh$
|
|
10738
|
-
"zh-CN": zh$
|
|
10739
|
-
en: en$
|
|
10740
|
-
"en-US": en$
|
|
10879
|
+
const dictionaries$15 = {
|
|
10880
|
+
zh: zh$15,
|
|
10881
|
+
"zh-CN": zh$15,
|
|
10882
|
+
en: en$15,
|
|
10883
|
+
"en-US": en$15
|
|
10741
10884
|
};
|
|
10742
10885
|
//#endregion
|
|
10743
10886
|
//#region src/client/claude/useClaudeSection.ts
|
|
@@ -10771,7 +10914,7 @@ window.__ModuleLoader__.load({
|
|
|
10771
10914
|
const [connection, setConnection] = (0, react.useState)(null);
|
|
10772
10915
|
/** Follow-up poll owed while the host refreshes the quota behind an answer. */
|
|
10773
10916
|
const quotaFollowUp = (0, react.useRef)(null);
|
|
10774
|
-
const t = useLineDict(NS_CLAUDE, zh$
|
|
10917
|
+
const t = useLineDict(NS_CLAUDE, zh$15);
|
|
10775
10918
|
const notifyChange = (0, react.useCallback)(() => {
|
|
10776
10919
|
onModelChange?.();
|
|
10777
10920
|
loadModelDirectory?.();
|
|
@@ -11234,11 +11377,11 @@ window.__ModuleLoader__.load({
|
|
|
11234
11377
|
* out here would hide a choice the host would accept and a catalog may expose.
|
|
11235
11378
|
*/
|
|
11236
11379
|
const EFFORT_LABELS$2 = {
|
|
11237
|
-
low: zh$
|
|
11238
|
-
medium: zh$
|
|
11239
|
-
high: zh$
|
|
11240
|
-
xhigh: zh$
|
|
11241
|
-
max: zh$
|
|
11380
|
+
low: zh$15.effortLow,
|
|
11381
|
+
medium: zh$15.effortMedium,
|
|
11382
|
+
high: zh$15.effortHigh,
|
|
11383
|
+
xhigh: zh$15.effortXHigh,
|
|
11384
|
+
max: zh$15.effortMax
|
|
11242
11385
|
};
|
|
11243
11386
|
/** One-line capability summary shown as a model pill's hover title. */
|
|
11244
11387
|
function modelFacts(model, t) {
|
|
@@ -11259,7 +11402,7 @@ window.__ModuleLoader__.load({
|
|
|
11259
11402
|
const { status, loading, busy, error, flow, connection, pasteValue, contextDrafts, savingModel } = state;
|
|
11260
11403
|
const { accounts, hasAdopted, contextModels, overrideCount, quota, windows, poolLabels } = derived;
|
|
11261
11404
|
const { login, cancelLogin, submitPaste, adopt, stopImporting, accountAction, setStrategy, relogin, refreshQuota, refreshCatalog, testConnection, toggleModel, setAllModels, updateEffort, updateCacheTtl, updateFastMode, updateCacheKeepalive, saveContextWindow, resetContextWindow, resetAllContextWindows, updateContextDraft, setPasteValue } = actions;
|
|
11262
|
-
const t = useLineDict(NS_CLAUDE, zh$
|
|
11405
|
+
const t = useLineDict(NS_CLAUDE, zh$15);
|
|
11263
11406
|
if (loading) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
11264
11407
|
className: "dsha-page",
|
|
11265
11408
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
@@ -11881,7 +12024,7 @@ window.__ModuleLoader__.load({
|
|
|
11881
12024
|
//#endregion
|
|
11882
12025
|
//#region src/client/ollama/locales.ts
|
|
11883
12026
|
const NS_OLLAMA = "dsh-ollama";
|
|
11884
|
-
const zh$
|
|
12027
|
+
const zh$14 = {
|
|
11885
12028
|
...accountPoolZh,
|
|
11886
12029
|
relogin: "更换 Key",
|
|
11887
12030
|
needsRelogin: "Key 已失效",
|
|
@@ -11933,7 +12076,7 @@ window.__ModuleLoader__.load({
|
|
|
11933
12076
|
usageNone: "尚无请求",
|
|
11934
12077
|
usageHint: "按 Ollama 每次响应自带的 token 计数本地累加。"
|
|
11935
12078
|
};
|
|
11936
|
-
const en$
|
|
12079
|
+
const en$14 = {
|
|
11937
12080
|
...accountPoolEn,
|
|
11938
12081
|
relogin: "Replace Key",
|
|
11939
12082
|
needsRelogin: "Key rejected",
|
|
@@ -11985,11 +12128,11 @@ window.__ModuleLoader__.load({
|
|
|
11985
12128
|
usageNone: "No requests yet",
|
|
11986
12129
|
usageHint: "Summed locally from the token counts Ollama returns on each response."
|
|
11987
12130
|
};
|
|
11988
|
-
const dictionaries$
|
|
11989
|
-
zh: zh$
|
|
11990
|
-
"zh-CN": zh$
|
|
11991
|
-
en: en$
|
|
11992
|
-
"en-US": en$
|
|
12131
|
+
const dictionaries$14 = {
|
|
12132
|
+
zh: zh$14,
|
|
12133
|
+
"zh-CN": zh$14,
|
|
12134
|
+
en: en$14,
|
|
12135
|
+
"en-US": en$14
|
|
11993
12136
|
};
|
|
11994
12137
|
//#endregion
|
|
11995
12138
|
//#region src/client/ollama/OllamaSection.tsx
|
|
@@ -12115,7 +12258,7 @@ window.__ModuleLoader__.load({
|
|
|
12115
12258
|
const setEffort = (0, react.useCallback)((value) => {
|
|
12116
12259
|
run("effort", () => API$8.setDefaultReasoningEffort(value === "" ? null : value));
|
|
12117
12260
|
}, [run]);
|
|
12118
|
-
const t = useLineDict(NS_OLLAMA, zh$
|
|
12261
|
+
const t = useLineDict(NS_OLLAMA, zh$14);
|
|
12119
12262
|
const pool = status?.pool;
|
|
12120
12263
|
const models = status?.models ?? [];
|
|
12121
12264
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [
|
|
@@ -12230,7 +12373,7 @@ window.__ModuleLoader__.load({
|
|
|
12230
12373
|
className: "dsha-btn",
|
|
12231
12374
|
disabled: busy !== null,
|
|
12232
12375
|
onClick: () => setShowKeyForm(false),
|
|
12233
|
-
children: zh$
|
|
12376
|
+
children: zh$14.deleteAccount
|
|
12234
12377
|
})]
|
|
12235
12378
|
})
|
|
12236
12379
|
]
|
|
@@ -12429,7 +12572,7 @@ window.__ModuleLoader__.load({
|
|
|
12429
12572
|
//#endregion
|
|
12430
12573
|
//#region src/client/antigravity-acp/locales.ts
|
|
12431
12574
|
const NS_ANTIGRAVITY_ACP = "dsh-antigravity-acp";
|
|
12432
|
-
const zh$
|
|
12575
|
+
const zh$13 = {
|
|
12433
12576
|
title: "Antigravity(ACP)",
|
|
12434
12577
|
pageDesc: "通过 Google 官方 Antigravity CLI 的 Agent Client Protocol(ACP)接入:模型、工具与会话全部由官方进程驱动,登录态由官方进程自己保管。",
|
|
12435
12578
|
routeOwned: "模型路由由本插件提供",
|
|
@@ -12521,7 +12664,7 @@ window.__ModuleLoader__.load({
|
|
|
12521
12664
|
enabledHint: "该线路当前已启用。",
|
|
12522
12665
|
toggleHint: "可在「订阅服务」总览页的该线路卡片上随时停用。"
|
|
12523
12666
|
};
|
|
12524
|
-
const en$
|
|
12667
|
+
const en$13 = {
|
|
12525
12668
|
title: "Antigravity (ACP)",
|
|
12526
12669
|
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.",
|
|
12527
12670
|
routeOwned: "Model route served by this plugin",
|
|
@@ -12613,11 +12756,11 @@ window.__ModuleLoader__.load({
|
|
|
12613
12756
|
enabledHint: "This line is enabled.",
|
|
12614
12757
|
toggleHint: "You can switch it off at any time from its card in the subscription overview."
|
|
12615
12758
|
};
|
|
12616
|
-
const dictionaries$
|
|
12617
|
-
zh: zh$
|
|
12618
|
-
"zh-CN": zh$
|
|
12619
|
-
en: en$
|
|
12620
|
-
"en-US": en$
|
|
12759
|
+
const dictionaries$13 = {
|
|
12760
|
+
zh: zh$13,
|
|
12761
|
+
"zh-CN": zh$13,
|
|
12762
|
+
en: en$13,
|
|
12763
|
+
"en-US": en$13
|
|
12621
12764
|
};
|
|
12622
12765
|
//#endregion
|
|
12623
12766
|
//#region src/client/antigravity-acp/AntigravityAcpSection.tsx
|
|
@@ -12674,7 +12817,7 @@ window.__ModuleLoader__.load({
|
|
|
12674
12817
|
setBusy(null);
|
|
12675
12818
|
}
|
|
12676
12819
|
}, [props]);
|
|
12677
|
-
const t = useLineDict(NS_ANTIGRAVITY_ACP, zh$
|
|
12820
|
+
const t = useLineDict(NS_ANTIGRAVITY_ACP, zh$13);
|
|
12678
12821
|
const models = status?.models ?? [];
|
|
12679
12822
|
const auth = status?.auth;
|
|
12680
12823
|
const usage = status?.usage;
|
|
@@ -13170,7 +13313,7 @@ window.__ModuleLoader__.load({
|
|
|
13170
13313
|
//#endregion
|
|
13171
13314
|
//#region src/client/aws-quick/locales.ts
|
|
13172
13315
|
const NS_AWS_QUICK = "dsh-aws-quick";
|
|
13173
|
-
const zh$
|
|
13316
|
+
const zh$12 = {
|
|
13174
13317
|
title: "AWS Quick",
|
|
13175
13318
|
pageDesc: "通过本机 AWS Quick Desktop 官方 agent 使用 Quick 订阅,支持流式文本、思考与三种响应模式。",
|
|
13176
13319
|
refresh: "刷新状态",
|
|
@@ -13225,8 +13368,8 @@ window.__ModuleLoader__.load({
|
|
|
13225
13368
|
toolsError: "工具初始化失败",
|
|
13226
13369
|
toolsHint: "提前创建 Quick 原生连接器;插件不会绕过 Quick 批准。"
|
|
13227
13370
|
};
|
|
13228
|
-
const dictionaries$
|
|
13229
|
-
zh: zh$
|
|
13371
|
+
const dictionaries$12 = {
|
|
13372
|
+
zh: zh$12,
|
|
13230
13373
|
en: {
|
|
13231
13374
|
title: "AWS Quick",
|
|
13232
13375
|
pageDesc: "Use an AWS Quick subscription through the official local Quick Desktop agent, with streaming text, reasoning and three response modes.",
|
|
@@ -13291,7 +13434,7 @@ window.__ModuleLoader__.load({
|
|
|
13291
13434
|
const [error, setError] = (0, react.useState)(null);
|
|
13292
13435
|
const [selected, setSelected] = (0, react.useState)(null);
|
|
13293
13436
|
const [binaryPath, setBinaryPath] = (0, react.useState)("");
|
|
13294
|
-
const t = useLineDict(NS_AWS_QUICK, zh$
|
|
13437
|
+
const t = useLineDict(NS_AWS_QUICK, zh$12);
|
|
13295
13438
|
const apply = (0, react.useCallback)((next) => {
|
|
13296
13439
|
setStatus(next);
|
|
13297
13440
|
setSelected(next.enabledModelIds === null ? null : new Set(next.enabledModelIds));
|
|
@@ -13663,7 +13806,7 @@ window.__ModuleLoader__.load({
|
|
|
13663
13806
|
* 键名重合的会被渲染成 ChatGPT 的措辞,不重合的会把键名本身打印出来)。
|
|
13664
13807
|
*/
|
|
13665
13808
|
const NS_STEP_CODE = "dsh-step-code";
|
|
13666
|
-
const zh$
|
|
13809
|
+
const zh$11 = {
|
|
13667
13810
|
...accountPoolZh,
|
|
13668
13811
|
title: "Step Code(Step Plan 订阅)",
|
|
13669
13812
|
pageDesc: "用 StepFun 的 Step Plan 订阅(国区 api.stepfun.com / 国际区 api.stepfun.ai)或开放平台 API Key 接入,管理账号池、套餐额度、缓存用量与模型勾选。区域是凭据的属性,两区凭据互不通用,因此号池里可以同时存在两区账号。",
|
|
@@ -13833,7 +13976,7 @@ window.__ModuleLoader__.load({
|
|
|
13833
13976
|
cacheExpiredHint: "缓存可能已过期:距上次请求约 {minutes} 分钟,下次会重新处理前缀。",
|
|
13834
13977
|
cacheHitRatioUnavailable: "—"
|
|
13835
13978
|
};
|
|
13836
|
-
const en$
|
|
13979
|
+
const en$11 = {
|
|
13837
13980
|
...accountPoolEn,
|
|
13838
13981
|
title: "Step Code (Step Plan subscription)",
|
|
13839
13982
|
pageDesc: "Reach StepFun with a Step Plan subscription (China api.stepfun.com / international api.stepfun.ai) or an open-platform API key, and manage the account pool, plan quota, cache usage and model selection. A region is a property of the credential and the two never share, so a pool can carry accounts from both.",
|
|
@@ -14001,11 +14144,11 @@ window.__ModuleLoader__.load({
|
|
|
14001
14144
|
cacheExpiredHint: "The cache has likely expired: about {minutes} minutes since the last request, so the next turn will reprocess the prefix.",
|
|
14002
14145
|
cacheHitRatioUnavailable: "—"
|
|
14003
14146
|
};
|
|
14004
|
-
const dictionaries$
|
|
14005
|
-
zh: zh$
|
|
14006
|
-
"zh-CN": zh$
|
|
14007
|
-
en: en$
|
|
14008
|
-
"en-US": en$
|
|
14147
|
+
const dictionaries$11 = {
|
|
14148
|
+
zh: zh$11,
|
|
14149
|
+
"zh-CN": zh$11,
|
|
14150
|
+
en: en$11,
|
|
14151
|
+
"en-US": en$11
|
|
14009
14152
|
};
|
|
14010
14153
|
/** 一个额度窗口的键到「窗口长度(分钟)」的映射。窗口名由共享组件按长度本地化。 */
|
|
14011
14154
|
const QUOTA_WINDOW_MINUTES = {
|
|
@@ -14123,7 +14266,7 @@ window.__ModuleLoader__.load({
|
|
|
14123
14266
|
/** 登录状态机的轮询节奏。真实超时与间隔由 host 拥有,卡片只是跟随。 */
|
|
14124
14267
|
const LOGIN_POLL_INTERVAL_MS$1 = 2e3;
|
|
14125
14268
|
/** 本卡片的字典;身份稳定,依赖它的 effect 才不会每次渲染重建。 */
|
|
14126
|
-
const fallbackTranslate$5 = (key) => zh$
|
|
14269
|
+
const fallbackTranslate$5 = (key) => zh$11[key];
|
|
14127
14270
|
/**
|
|
14128
14271
|
* 共享账号池卡片需要的标签集,按本卡片的字典逐键查出来。
|
|
14129
14272
|
*
|
|
@@ -14809,7 +14952,7 @@ window.__ModuleLoader__.load({
|
|
|
14809
14952
|
const { status, loading, busy, error, connection, adoptResult, pasteValue, profile, pasteOpen, contextDrafts, savingModel, quotaAccount, quotaPassword, quotaToken } = state;
|
|
14810
14953
|
const { accounts, models, contextModels, overrideCount, login, quota, authenticated, poolLabels, cache, cacheHitRatio: hitRatio, quotaCredential } = derived;
|
|
14811
14954
|
const { setProfile, login: startLogin, cancelLogin, submitPaste, setPasteValue, togglePaste, adopt, clearAdoptResult, accountAction, setStrategy, toggleModel, setAllModels, saveContextWindow, resetContextWindow, resetAllContextWindows, updateContextDraft, setDefaultReasoningEffort, setCacheRequestParams, refreshQuota, refreshCatalog, testConnection, setQuotaAccount, setQuotaPassword, setQuotaToken, submitQuotaPassword, submitQuotaToken, clearQuotaCredential } = actions;
|
|
14812
|
-
const t = useLineDict(NS_STEP_CODE, zh$
|
|
14955
|
+
const t = useLineDict(NS_STEP_CODE, zh$11);
|
|
14813
14956
|
if (loading) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
14814
14957
|
className: "dsha-page",
|
|
14815
14958
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
@@ -15713,7 +15856,7 @@ window.__ModuleLoader__.load({
|
|
|
15713
15856
|
//#endregion
|
|
15714
15857
|
//#region src/client/cline-pass/locales.ts
|
|
15715
15858
|
const NS_CLINE_PASS = "dsh-cline-pass";
|
|
15716
|
-
const zh$
|
|
15859
|
+
const zh$10 = {
|
|
15717
15860
|
...accountPoolZh,
|
|
15718
15861
|
relogin: "重新登录",
|
|
15719
15862
|
needsRelogin: "登录已失效",
|
|
@@ -15837,7 +15980,7 @@ window.__ModuleLoader__.load({
|
|
|
15837
15980
|
limitRoute: "模型路由按 provider id 抢占:若已有其他插件占用 cline-pass,本卡仍可配置,但请求由对方服务。",
|
|
15838
15981
|
limitQuota: "额度窗口来自网关的 usage-limits 接口;接口失败时卡片保留上一次读数并显示原因。"
|
|
15839
15982
|
};
|
|
15840
|
-
const en$
|
|
15983
|
+
const en$10 = {
|
|
15841
15984
|
...accountPoolEn,
|
|
15842
15985
|
relogin: "Sign in again",
|
|
15843
15986
|
needsRelogin: "Sign-in expired",
|
|
@@ -15961,11 +16104,11 @@ window.__ModuleLoader__.load({
|
|
|
15961
16104
|
limitRoute: "The route is claimed by provider id: if another plugin already serves cline-pass, this card still configures the line but that provider answers the requests.",
|
|
15962
16105
|
limitQuota: "Quota windows come from the gateway usage-limits endpoint; when it fails the card keeps the previous reading and says why."
|
|
15963
16106
|
};
|
|
15964
|
-
const dictionaries$
|
|
15965
|
-
zh: zh$
|
|
15966
|
-
"zh-CN": zh$
|
|
15967
|
-
en: en$
|
|
15968
|
-
"en-US": en$
|
|
16107
|
+
const dictionaries$10 = {
|
|
16108
|
+
zh: zh$10,
|
|
16109
|
+
"zh-CN": zh$10,
|
|
16110
|
+
en: en$10,
|
|
16111
|
+
"en-US": en$10
|
|
15969
16112
|
};
|
|
15970
16113
|
//#endregion
|
|
15971
16114
|
//#region src/client/cline-pass/ClinePassSection.tsx
|
|
@@ -16084,10 +16227,10 @@ window.__ModuleLoader__.load({
|
|
|
16084
16227
|
API$5.loginStatus(flow.id).then((next) => {
|
|
16085
16228
|
setLoginFlow(next);
|
|
16086
16229
|
if (next.status === "complete") {
|
|
16087
|
-
setNotice(zh$
|
|
16230
|
+
setNotice(zh$10.loginComplete.replace("{account}", next.accountAlias === "" ? "Cline Pass" : next.accountAlias));
|
|
16088
16231
|
setShowKeyForm(false);
|
|
16089
16232
|
loadStatus();
|
|
16090
|
-
} else if (next.status === "failed") setError(zh$
|
|
16233
|
+
} else if (next.status === "failed") setError(zh$10.loginFailed.replace("{detail}", next.error));
|
|
16091
16234
|
}).catch((cause) => setError(detail$1(cause)));
|
|
16092
16235
|
}, Math.max(2, flow.intervalSeconds) * 1e3);
|
|
16093
16236
|
return () => window.clearInterval(timer);
|
|
@@ -16161,7 +16304,7 @@ window.__ModuleLoader__.load({
|
|
|
16161
16304
|
apiKey: trimmed,
|
|
16162
16305
|
...keyBaseURL.trim() === "" ? {} : { baseURL: keyBaseURL.trim() }
|
|
16163
16306
|
}).then((result) => {
|
|
16164
|
-
setNotice(result.authorized ? zh$
|
|
16307
|
+
setNotice(result.authorized ? zh$10.keyTestOk.replace("{ms}", String(Math.round(result.ms))) : zh$10.keyTestFailed.replace("{detail}", result.error));
|
|
16165
16308
|
}).catch((cause) => setError(detail$1(cause))).finally(() => setBusy(null));
|
|
16166
16309
|
}, [key, keyBaseURL]);
|
|
16167
16310
|
const testStored = (0, react.useCallback)((accountId) => {
|
|
@@ -16169,7 +16312,7 @@ window.__ModuleLoader__.load({
|
|
|
16169
16312
|
setError(null);
|
|
16170
16313
|
setNotice(null);
|
|
16171
16314
|
API$5.testKey({ accountId }).then((result) => {
|
|
16172
|
-
setNotice(result.authorized ? zh$
|
|
16315
|
+
setNotice(result.authorized ? zh$10.keyTestOk.replace("{ms}", String(Math.round(result.ms))) : zh$10.keyTestFailed.replace("{detail}", result.error));
|
|
16173
16316
|
}).catch((cause) => setError(detail$1(cause))).finally(() => setBusy(null));
|
|
16174
16317
|
}, []);
|
|
16175
16318
|
const enabledModels = (0, react.useMemo)(() => (status?.models ?? []).filter((model) => model.enabled), [status]);
|
|
@@ -16195,7 +16338,7 @@ window.__ModuleLoader__.load({
|
|
|
16195
16338
|
if (model === void 0) return;
|
|
16196
16339
|
const parsed = parsePositiveCapacity$1(drafts[id] ?? formatCapacity$1(model.contextWindow));
|
|
16197
16340
|
if (parsed === null) {
|
|
16198
|
-
setError(zh$
|
|
16341
|
+
setError(zh$10.error.replace("{detail}", zh$10.defaultContextWindow));
|
|
16199
16342
|
return;
|
|
16200
16343
|
}
|
|
16201
16344
|
run("ctx:" + id, () => API$5.setContextWindow(id, parsed));
|
|
@@ -16217,7 +16360,7 @@ window.__ModuleLoader__.load({
|
|
|
16217
16360
|
}, [run, status]);
|
|
16218
16361
|
const resetAllContext = (0, react.useCallback)(() => {
|
|
16219
16362
|
if (status === null) return;
|
|
16220
|
-
if (typeof window !== "undefined" && !window.confirm(zh$
|
|
16363
|
+
if (typeof window !== "undefined" && !window.confirm(zh$10.contextResetAll)) return;
|
|
16221
16364
|
const overridden = status.models.filter((model) => model.contextWindowOverride !== void 0);
|
|
16222
16365
|
run("ctx-all", async () => {
|
|
16223
16366
|
let next = status;
|
|
@@ -16258,7 +16401,7 @@ window.__ModuleLoader__.load({
|
|
|
16258
16401
|
const refreshUsage = (0, react.useCallback)(() => {
|
|
16259
16402
|
run("usage", async () => {
|
|
16260
16403
|
const outcome = await API$5.readUsage();
|
|
16261
|
-
setNotice(outcome.usage.accounts.some((account) => account.ok) ? "" : zh$
|
|
16404
|
+
setNotice(outcome.usage.accounts.some((account) => account.ok) ? "" : zh$10.usageEmpty);
|
|
16262
16405
|
return outcome.status;
|
|
16263
16406
|
});
|
|
16264
16407
|
}, [run]);
|
|
@@ -16278,7 +16421,7 @@ window.__ModuleLoader__.load({
|
|
|
16278
16421
|
};
|
|
16279
16422
|
const invalid = Object.entries(numbers).find(([, value]) => !Number.isSafeInteger(value) || value < 0);
|
|
16280
16423
|
if (invalid !== void 0) {
|
|
16281
|
-
setError(zh$
|
|
16424
|
+
setError(zh$10.error.replace("{detail}", invalid[0]));
|
|
16282
16425
|
return;
|
|
16283
16426
|
}
|
|
16284
16427
|
setBusy("settings");
|
|
@@ -16289,7 +16432,7 @@ window.__ModuleLoader__.load({
|
|
|
16289
16432
|
}).then((next) => {
|
|
16290
16433
|
applyStatus(next);
|
|
16291
16434
|
setSettingsForm(settingsFormOf$1(next));
|
|
16292
|
-
setNotice(zh$
|
|
16435
|
+
setNotice(zh$10.saved);
|
|
16293
16436
|
}).catch((cause) => setError(detail$1(cause))).finally(() => setBusy(null));
|
|
16294
16437
|
}, [settingsForm, applyStatus]);
|
|
16295
16438
|
const toggleTools = (0, react.useCallback)(() => {
|
|
@@ -16300,10 +16443,10 @@ window.__ModuleLoader__.load({
|
|
|
16300
16443
|
API$5.updateSettings({ exposeTools: value }).then((next) => {
|
|
16301
16444
|
applyStatus(next);
|
|
16302
16445
|
setSettingsForm(settingsFormOf$1(next));
|
|
16303
|
-
setNotice(zh$
|
|
16446
|
+
setNotice(zh$10.restartRequired);
|
|
16304
16447
|
}).catch((cause) => setError(detail$1(cause))).finally(() => setBusy(null));
|
|
16305
16448
|
}, [status, applyStatus]);
|
|
16306
|
-
const t = useLineDict(NS_CLINE_PASS, zh$
|
|
16449
|
+
const t = useLineDict(NS_CLINE_PASS, zh$10);
|
|
16307
16450
|
const errorPrefix = t.error.split("{detail}")[0] ?? "";
|
|
16308
16451
|
const pool = status?.pool;
|
|
16309
16452
|
const accounts = (0, react.useMemo)(() => {
|
|
@@ -17078,7 +17221,7 @@ window.__ModuleLoader__.load({
|
|
|
17078
17221
|
* 'settings.section' 上的那张座位(那张座绑定的是 ChatGPT 的键集)。
|
|
17079
17222
|
*/
|
|
17080
17223
|
const NS_QODER = "dsh-qoder";
|
|
17081
|
-
const zh$
|
|
17224
|
+
const zh$9 = {
|
|
17082
17225
|
modelRowEfforts: "档位 {list}",
|
|
17083
17226
|
modelRowNoEfforts: "无档位",
|
|
17084
17227
|
modelRowOutput: "输出 {cap}",
|
|
@@ -17202,8 +17345,8 @@ window.__ModuleLoader__.load({
|
|
|
17202
17345
|
quotaWindow: "额度窗口"
|
|
17203
17346
|
};
|
|
17204
17347
|
/** 两套字典。 */
|
|
17205
|
-
const dictionaries$
|
|
17206
|
-
zh: zh$
|
|
17348
|
+
const dictionaries$9 = {
|
|
17349
|
+
zh: zh$9,
|
|
17207
17350
|
en: {
|
|
17208
17351
|
modelRowEfforts: "efforts {list}",
|
|
17209
17352
|
modelRowNoEfforts: "no efforts",
|
|
@@ -17404,7 +17547,7 @@ window.__ModuleLoader__.load({
|
|
|
17404
17547
|
/** 登录状态机的轮询节奏。真实超时与间隔由 host 拥有,卡片只是跟随。 */
|
|
17405
17548
|
const LOGIN_POLL_INTERVAL_MS = 2e3;
|
|
17406
17549
|
/** 本卡片的字典;身份稳定,依赖它的 effect 才不会每次渲染重建。 */
|
|
17407
|
-
const fallbackTranslate$4 = (key) => zh$
|
|
17550
|
+
const fallbackTranslate$4 = (key) => zh$9[key];
|
|
17408
17551
|
/**
|
|
17409
17552
|
* 共享账号池卡片需要的标签集,按本卡片的字典逐键查出来。
|
|
17410
17553
|
*
|
|
@@ -17970,7 +18113,7 @@ window.__ModuleLoader__.load({
|
|
|
17970
18113
|
* `defaultMaxTokens`),客户端不按模型名推断任何一项。与 OpenDesign 卡同一写法:
|
|
17971
18114
|
* 数据一行,散文进折叠区。
|
|
17972
18115
|
*/
|
|
17973
|
-
function qoderModelRowHint(model, t = zh$
|
|
18116
|
+
function qoderModelRowHint(model, t = zh$9) {
|
|
17974
18117
|
return `${formatTokenCount(model.contextWindow)} · ${model.supportsImages ? "text+image" : "text"} · ${model.reasoningEfforts.length === 0 ? t.modelRowNoEfforts : t.modelRowEfforts.replace("{list}", model.reasoningEfforts.join("/"))} · ${t.modelRowOutput.replace("{cap}", formatTokenCount(model.defaultMaxTokens))}`;
|
|
17975
18118
|
}
|
|
17976
18119
|
function QoderSection({ onModelChange } = {}) {
|
|
@@ -17978,7 +18121,7 @@ window.__ModuleLoader__.load({
|
|
|
17978
18121
|
const { status, loading, busy, error, connection, adoptResult, pasteValue, region, pasteOpen, contextDrafts, savingModel } = state;
|
|
17979
18122
|
const { accounts, models, contextModels, overrideCount, login, quota, authenticated, poolLabels, cache, cacheHitRatio: hitRatio } = derived;
|
|
17980
18123
|
const { setRegion, login: startLogin, cancelLogin, submitPaste, setPasteValue, togglePaste, adopt, clearAdoptResult, accountAction, setStrategy, toggleModel, setAllModels, saveContextWindow, resetContextWindow, resetAllContextWindows, updateContextDraft, setDefaultReasoningEffort, refreshQuota, refreshCatalog, testConnection } = actions;
|
|
17981
|
-
const t = useLineDict(NS_QODER, zh$
|
|
18124
|
+
const t = useLineDict(NS_QODER, zh$9);
|
|
17982
18125
|
if (loading) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
17983
18126
|
className: "dsha-page",
|
|
17984
18127
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
@@ -18574,7 +18717,7 @@ window.__ModuleLoader__.load({
|
|
|
18574
18717
|
//#endregion
|
|
18575
18718
|
//#region src/client/opendesign/locales.ts
|
|
18576
18719
|
const NS_OPENDESIGN = "dsh-opendesign";
|
|
18577
|
-
const zh$
|
|
18720
|
+
const zh$8 = {
|
|
18578
18721
|
...accountPoolZh,
|
|
18579
18722
|
relogin: "重新登录",
|
|
18580
18723
|
needsRelogin: "登录已失效",
|
|
@@ -18682,7 +18825,7 @@ window.__ModuleLoader__.load({
|
|
|
18682
18825
|
limitRoute: "模型路由按 provider id 抢占:若已有其他插件占用 opendesign,本卡仍可配置,但请求由对方服务。",
|
|
18683
18826
|
limitQuota: "套餐与额度读取只覆盖浏览器授权登录的账号;粘贴的 API Key 没有控制 Key,请在 OpenDesign Cloud 控制台查看用量。"
|
|
18684
18827
|
};
|
|
18685
|
-
const en$
|
|
18828
|
+
const en$8 = {
|
|
18686
18829
|
...accountPoolEn,
|
|
18687
18830
|
relogin: "Add again",
|
|
18688
18831
|
needsRelogin: "Key invalid",
|
|
@@ -18790,11 +18933,11 @@ window.__ModuleLoader__.load({
|
|
|
18790
18933
|
limitRoute: "The route is claimed by provider id: if another plugin already serves opendesign, this card still configures the line but that provider answers the requests.",
|
|
18791
18934
|
limitQuota: "Plan and credit reads cover browser-signed-in accounts only; a pasted API key has no control key, so see usage in the OpenDesign Cloud console."
|
|
18792
18935
|
};
|
|
18793
|
-
const dictionaries$
|
|
18794
|
-
zh: zh$
|
|
18795
|
-
"zh-CN": zh$
|
|
18796
|
-
en: en$
|
|
18797
|
-
"en-US": en$
|
|
18936
|
+
const dictionaries$8 = {
|
|
18937
|
+
zh: zh$8,
|
|
18938
|
+
"zh-CN": zh$8,
|
|
18939
|
+
en: en$8,
|
|
18940
|
+
"en-US": en$8
|
|
18798
18941
|
};
|
|
18799
18942
|
//#endregion
|
|
18800
18943
|
//#region src/client/opendesign/OpenDesignSection.tsx
|
|
@@ -19089,7 +19232,7 @@ window.__ModuleLoader__.load({
|
|
|
19089
19232
|
try {
|
|
19090
19233
|
const outcome = await API$4.readUsage();
|
|
19091
19234
|
setStatus(outcome.status);
|
|
19092
|
-
if (!silent) setNotice(outcome.usage.accounts.some((account) => account.ok) ? "" : zh$
|
|
19235
|
+
if (!silent) setNotice(outcome.usage.accounts.some((account) => account.ok) ? "" : zh$8.usageEmpty);
|
|
19093
19236
|
} catch (cause) {
|
|
19094
19237
|
if (!silent) setError(detail(cause));
|
|
19095
19238
|
}
|
|
@@ -19126,10 +19269,10 @@ window.__ModuleLoader__.load({
|
|
|
19126
19269
|
API$4.loginStatus(flow.id).then((next) => {
|
|
19127
19270
|
setLoginFlow(next);
|
|
19128
19271
|
if (next.status === "complete") {
|
|
19129
|
-
setNotice(zh$
|
|
19272
|
+
setNotice(zh$8.loginComplete.replace("{account}", next.accountAlias === "" ? "OpenDesign" : next.accountAlias));
|
|
19130
19273
|
setShowKeyForm(false);
|
|
19131
19274
|
reload();
|
|
19132
|
-
} else if (next.status === "failed") setError(zh$
|
|
19275
|
+
} else if (next.status === "failed") setError(zh$8.loginFailed.replace("{detail}", next.error));
|
|
19133
19276
|
}).catch((cause) => setError(detail(cause)));
|
|
19134
19277
|
}, Math.max(2, flow.intervalSeconds) * 1e3);
|
|
19135
19278
|
return () => window.clearInterval(timer);
|
|
@@ -19195,7 +19338,7 @@ window.__ModuleLoader__.load({
|
|
|
19195
19338
|
const refreshUsage = (0, react.useCallback)(() => {
|
|
19196
19339
|
run("usage", async () => {
|
|
19197
19340
|
const outcome = await API$4.readUsage();
|
|
19198
|
-
setNotice(outcome.usage.accounts.some((account) => account.ok) ? "" : zh$
|
|
19341
|
+
setNotice(outcome.usage.accounts.some((account) => account.ok) ? "" : zh$8.usageEmpty);
|
|
19199
19342
|
return outcome.status;
|
|
19200
19343
|
});
|
|
19201
19344
|
}, [run]);
|
|
@@ -19230,7 +19373,7 @@ window.__ModuleLoader__.load({
|
|
|
19230
19373
|
apiKey: trimmed,
|
|
19231
19374
|
...keyBaseURL.trim() === "" ? {} : { baseURL: keyBaseURL.trim() }
|
|
19232
19375
|
}).then((result) => {
|
|
19233
|
-
setNotice(result.authorized ? zh$
|
|
19376
|
+
setNotice(result.authorized ? zh$8.keyTestOk.replace("{ms}", String(Math.round(result.ms))).replace("{count}", String(result.modelCount)) : zh$8.keyTestFailed.replace("{detail}", result.error));
|
|
19234
19377
|
}).catch((cause) => setError(detail(cause))).finally(() => setBusy(null));
|
|
19235
19378
|
}, [key, keyBaseURL]);
|
|
19236
19379
|
const testStored = (0, react.useCallback)((accountId) => {
|
|
@@ -19238,7 +19381,7 @@ window.__ModuleLoader__.load({
|
|
|
19238
19381
|
setError(null);
|
|
19239
19382
|
setNotice(null);
|
|
19240
19383
|
API$4.testKey({ accountId }).then((result) => {
|
|
19241
|
-
setNotice(result.authorized ? zh$
|
|
19384
|
+
setNotice(result.authorized ? zh$8.keyTestOk.replace("{ms}", String(Math.round(result.ms))).replace("{count}", String(result.modelCount)) : zh$8.keyTestFailed.replace("{detail}", result.error));
|
|
19242
19385
|
}).catch((cause) => setError(detail(cause))).finally(() => setBusy(null));
|
|
19243
19386
|
}, []);
|
|
19244
19387
|
const enabledModels = (0, react.useMemo)(() => (status?.models ?? []).filter((model) => model.enabled), [status]);
|
|
@@ -19264,7 +19407,7 @@ window.__ModuleLoader__.load({
|
|
|
19264
19407
|
if (model === void 0) return;
|
|
19265
19408
|
const parsed = parsePositiveCapacity$1(drafts[id] ?? formatCapacity$1(model.contextWindow));
|
|
19266
19409
|
if (parsed === null) {
|
|
19267
|
-
setError(zh$
|
|
19410
|
+
setError(zh$8.error.replace("{detail}", zh$8.defaultContextWindow));
|
|
19268
19411
|
return;
|
|
19269
19412
|
}
|
|
19270
19413
|
run("ctx:" + id, () => API$4.setContextWindow(id, parsed));
|
|
@@ -19286,7 +19429,7 @@ window.__ModuleLoader__.load({
|
|
|
19286
19429
|
}, [run, status]);
|
|
19287
19430
|
const resetAllContext = (0, react.useCallback)(() => {
|
|
19288
19431
|
if (status === null) return;
|
|
19289
|
-
if (typeof window !== "undefined" && !window.confirm(zh$
|
|
19432
|
+
if (typeof window !== "undefined" && !window.confirm(zh$8.contextResetAll)) return;
|
|
19290
19433
|
const overridden = status.models.filter((model) => model.contextWindowOverride !== void 0);
|
|
19291
19434
|
run("ctx-all", async () => {
|
|
19292
19435
|
let next = status;
|
|
@@ -19302,7 +19445,7 @@ window.__ModuleLoader__.load({
|
|
|
19302
19445
|
const refreshCatalog = (0, react.useCallback)(() => {
|
|
19303
19446
|
run("catalog", async () => {
|
|
19304
19447
|
const outcome = await API$4.refreshCatalog();
|
|
19305
|
-
setNotice(zh$
|
|
19448
|
+
setNotice(zh$8.catalogSyncedNote.replace("{count}", String(outcome.status.catalogCount)));
|
|
19306
19449
|
return outcome.status;
|
|
19307
19450
|
});
|
|
19308
19451
|
}, [run]);
|
|
@@ -19316,7 +19459,7 @@ window.__ModuleLoader__.load({
|
|
|
19316
19459
|
};
|
|
19317
19460
|
const invalid = Object.entries(numbers).find(([, value]) => !Number.isSafeInteger(value) || value < 0);
|
|
19318
19461
|
if (invalid !== void 0) {
|
|
19319
|
-
setError(zh$
|
|
19462
|
+
setError(zh$8.error.replace("{detail}", invalid[0]));
|
|
19320
19463
|
return;
|
|
19321
19464
|
}
|
|
19322
19465
|
setBusy("settings");
|
|
@@ -19327,10 +19470,10 @@ window.__ModuleLoader__.load({
|
|
|
19327
19470
|
}).then((next) => {
|
|
19328
19471
|
applyStatus(next);
|
|
19329
19472
|
setSettingsForm(settingsFormOf(next));
|
|
19330
|
-
setNotice(zh$
|
|
19473
|
+
setNotice(zh$8.saved);
|
|
19331
19474
|
}).catch((cause) => setError(detail(cause))).finally(() => setBusy(null));
|
|
19332
19475
|
}, [settingsForm, applyStatus]);
|
|
19333
|
-
const t = useLineDict(NS_OPENDESIGN, zh$
|
|
19476
|
+
const t = useLineDict(NS_OPENDESIGN, zh$8);
|
|
19334
19477
|
const errorPrefix = t.error.split("{detail}")[0] ?? "";
|
|
19335
19478
|
const pool = status?.pool;
|
|
19336
19479
|
const accounts = pool?.accounts ?? [];
|
|
@@ -19848,7 +19991,7 @@ window.__ModuleLoader__.load({
|
|
|
19848
19991
|
* control that renders it instead.
|
|
19849
19992
|
*/
|
|
19850
19993
|
const NS_WORKBUDDY = "dsh-workbuddy";
|
|
19851
|
-
const zh$
|
|
19994
|
+
const zh$7 = {
|
|
19852
19995
|
title: "WorkBuddy",
|
|
19853
19996
|
pageDesc: "复用本机 CodeBuddy 桌面端登录态,管理 WorkBuddy(CodeBuddy 订阅)模型、上下文窗口与额度。",
|
|
19854
19997
|
account: "账号",
|
|
@@ -19974,7 +20117,7 @@ window.__ModuleLoader__.load({
|
|
|
19974
20117
|
modelCooldownActive: "模型限流中",
|
|
19975
20118
|
notRoutable: "当前不可路由"
|
|
19976
20119
|
};
|
|
19977
|
-
const en$
|
|
20120
|
+
const en$7 = {
|
|
19978
20121
|
title: "WorkBuddy",
|
|
19979
20122
|
pageDesc: "Reuse the local CodeBuddy desktop sign-in to manage WorkBuddy (CodeBuddy subscription) models, context windows, and quota.",
|
|
19980
20123
|
account: "Account",
|
|
@@ -20100,11 +20243,11 @@ window.__ModuleLoader__.load({
|
|
|
20100
20243
|
modelCooldownActive: "Model parked",
|
|
20101
20244
|
notRoutable: "Not routable right now"
|
|
20102
20245
|
};
|
|
20103
|
-
const dictionaries$
|
|
20104
|
-
zh: zh$
|
|
20105
|
-
"zh-CN": zh$
|
|
20106
|
-
en: en$
|
|
20107
|
-
"en-US": en$
|
|
20246
|
+
const dictionaries$7 = {
|
|
20247
|
+
zh: zh$7,
|
|
20248
|
+
"zh-CN": zh$7,
|
|
20249
|
+
en: en$7,
|
|
20250
|
+
"en-US": en$7
|
|
20108
20251
|
};
|
|
20109
20252
|
//#endregion
|
|
20110
20253
|
//#region src/client/workbuddy/useWorkBuddySection.ts
|
|
@@ -20202,7 +20345,7 @@ window.__ModuleLoader__.load({
|
|
|
20202
20345
|
const quotaFollowUp = (0, react.useRef)(null);
|
|
20203
20346
|
const [contextDrafts, setContextDrafts] = (0, react.useState)({});
|
|
20204
20347
|
const [savingModel, setSavingModel] = (0, react.useState)(null);
|
|
20205
|
-
const t = useLineDict(NS_WORKBUDDY, zh$
|
|
20348
|
+
const t = useLineDict(NS_WORKBUDDY, zh$7);
|
|
20206
20349
|
const notifyChange = (0, react.useCallback)(() => {
|
|
20207
20350
|
onModelChange?.();
|
|
20208
20351
|
loadModelDirectory?.();
|
|
@@ -20836,7 +20979,7 @@ window.__ModuleLoader__.load({
|
|
|
20836
20979
|
const timer = window.setInterval(() => setNow(Date.now()), 1e3);
|
|
20837
20980
|
return () => window.clearInterval(timer);
|
|
20838
20981
|
}, [pausedUntil]);
|
|
20839
|
-
const t = useLineDict(NS_WORKBUDDY, zh$
|
|
20982
|
+
const t = useLineDict(NS_WORKBUDDY, zh$7);
|
|
20840
20983
|
const poolState = poolStateLines(pool, t, now);
|
|
20841
20984
|
const storageLine = poolStorageLine(pool?.storage, t);
|
|
20842
20985
|
const storageUnavailable = pool?.storage === void 0 ? null : poolStorageUnavailableLabel(pool.storage, t);
|
|
@@ -21470,7 +21613,7 @@ window.__ModuleLoader__.load({
|
|
|
21470
21613
|
//#endregion
|
|
21471
21614
|
//#region src/client/qianwen-token-plan/locales.ts
|
|
21472
21615
|
const NS_QIANWEN = "dsh-qianwen-token-plan";
|
|
21473
|
-
const zh$
|
|
21616
|
+
const zh$6 = {
|
|
21474
21617
|
title: "Qwen Token Plan(千问)",
|
|
21475
21618
|
pageDesc: "使用千问 Token Plan 专属 API Key 调用 Qwen4,管理显式缓存、思考回放、推理档位、模型和视觉预算。",
|
|
21476
21619
|
loading: "加载中...",
|
|
@@ -21543,8 +21686,8 @@ window.__ModuleLoader__.load({
|
|
|
21543
21686
|
noQuota: "无配额数据",
|
|
21544
21687
|
proxy: "代理"
|
|
21545
21688
|
};
|
|
21546
|
-
const dictionaries$
|
|
21547
|
-
zh: zh$
|
|
21689
|
+
const dictionaries$6 = {
|
|
21690
|
+
zh: zh$6,
|
|
21548
21691
|
en: {
|
|
21549
21692
|
title: "Qwen Token Plan",
|
|
21550
21693
|
pageDesc: "Use a dedicated Qianwen Token Plan API key with Qwen4, explicit caching, thinking replay, all reasoning levels, models and visual budgets.",
|
|
@@ -21817,7 +21960,7 @@ window.__ModuleLoader__.load({
|
|
|
21817
21960
|
});
|
|
21818
21961
|
}
|
|
21819
21962
|
function QianwenTokenPlanSection(props = {}) {
|
|
21820
|
-
const t = useLineDict(NS_QIANWEN, zh$
|
|
21963
|
+
const t = useLineDict(NS_QIANWEN, zh$6);
|
|
21821
21964
|
const view = useQianwenSection(props);
|
|
21822
21965
|
const { status, busy } = view;
|
|
21823
21966
|
if (view.loading && status === null) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
@@ -22170,7 +22313,7 @@ window.__ModuleLoader__.load({
|
|
|
22170
22313
|
//#endregion
|
|
22171
22314
|
//#region src/client/relayone/locales.ts
|
|
22172
22315
|
const NS_RELAYONE = "dsh-relayone";
|
|
22173
|
-
const zh$
|
|
22316
|
+
const zh$5 = {
|
|
22174
22317
|
title: "RelayOne",
|
|
22175
22318
|
pageDesc: "一个 API Key,动态接入当前分组可用的对话与媒体模型。",
|
|
22176
22319
|
enabled: "启用 RelayOne",
|
|
@@ -22245,8 +22388,8 @@ window.__ModuleLoader__.load({
|
|
|
22245
22388
|
invalidCapacity: "上下文窗口必须是正整数。",
|
|
22246
22389
|
errorGeneric: "RelayOne 操作失败。"
|
|
22247
22390
|
};
|
|
22248
|
-
const dictionaries$
|
|
22249
|
-
zh: zh$
|
|
22391
|
+
const dictionaries$5 = {
|
|
22392
|
+
zh: zh$5,
|
|
22250
22393
|
en: {
|
|
22251
22394
|
title: "RelayOne",
|
|
22252
22395
|
pageDesc: "One API key for the chat and media models visible to its current upstream group.",
|
|
@@ -22537,7 +22680,7 @@ window.__ModuleLoader__.load({
|
|
|
22537
22680
|
max: "effortMax"
|
|
22538
22681
|
};
|
|
22539
22682
|
function RelayOneSection(props = {}) {
|
|
22540
|
-
const t = useLineDict(NS_RELAYONE, zh$
|
|
22683
|
+
const t = useLineDict(NS_RELAYONE, zh$5);
|
|
22541
22684
|
const view = useRelayOneSection(props);
|
|
22542
22685
|
const { status, busy } = view;
|
|
22543
22686
|
if (view.loading && status === null) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
@@ -22907,7 +23050,7 @@ window.__ModuleLoader__.load({
|
|
|
22907
23050
|
//#endregion
|
|
22908
23051
|
//#region src/client/claude-api/locales.ts
|
|
22909
23052
|
const NS_CLAUDE_API = "dsh-claude-api";
|
|
22910
|
-
const zh$
|
|
23053
|
+
const zh$4 = {
|
|
22911
23054
|
title: "Claude API",
|
|
22912
23055
|
pageDesc: "用一个 API Key 直连 Anthropic Messages 端点或兼容网关,请求形态与官方 Claude Code 客户端一致。",
|
|
22913
23056
|
loading: "正在读取线路状态…",
|
|
@@ -22984,8 +23127,8 @@ window.__ModuleLoader__.load({
|
|
|
22984
23127
|
contextEmpty: "没有已启用的模型。",
|
|
22985
23128
|
invalidCapacity: "上下文窗口必须是正整数。"
|
|
22986
23129
|
};
|
|
22987
|
-
const dictionaries$
|
|
22988
|
-
zh: zh$
|
|
23130
|
+
const dictionaries$4 = {
|
|
23131
|
+
zh: zh$4,
|
|
22989
23132
|
en: {
|
|
22990
23133
|
title: "Claude API",
|
|
22991
23134
|
pageDesc: "One API key against the Anthropic Messages endpoint or a compatible gateway, sent in the request shape of the official Claude Code client.",
|
|
@@ -23391,7 +23534,7 @@ window.__ModuleLoader__.load({
|
|
|
23391
23534
|
const SEPARATOR = " · ";
|
|
23392
23535
|
const DASH = "—";
|
|
23393
23536
|
function ClaudeApiSection(props = {}) {
|
|
23394
|
-
const t = useLineDict(NS_CLAUDE_API, zh$
|
|
23537
|
+
const t = useLineDict(NS_CLAUDE_API, zh$4);
|
|
23395
23538
|
const view = useClaudeApiSection(props);
|
|
23396
23539
|
const { status, busy } = view;
|
|
23397
23540
|
if (view.loading && status === null) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
@@ -24696,7 +24839,7 @@ window.__ModuleLoader__.load({
|
|
|
24696
24839
|
*/
|
|
24697
24840
|
const NS_DISPATCH_LEDGER = "dsh-dispatch-ledger";
|
|
24698
24841
|
/** 中文文案。 */
|
|
24699
|
-
const zh$
|
|
24842
|
+
const zh$3 = {
|
|
24700
24843
|
mandateTitle: "派发子代理",
|
|
24701
24844
|
mandateTitleFork: "派发子代理(继承上下文)",
|
|
24702
24845
|
mandatePreparing: "正在组装派发",
|
|
@@ -24720,8 +24863,8 @@ window.__ModuleLoader__.load({
|
|
|
24720
24863
|
mandateNoBody: "(没有正文)"
|
|
24721
24864
|
};
|
|
24722
24865
|
/** 注册进 locale 服务的双语字典。 */
|
|
24723
|
-
const dictionaries$
|
|
24724
|
-
zh: zh$
|
|
24866
|
+
const dictionaries$3 = {
|
|
24867
|
+
zh: zh$3,
|
|
24725
24868
|
en: {
|
|
24726
24869
|
mandateTitle: "Subagent dispatch",
|
|
24727
24870
|
mandateTitleFork: "Subagent dispatch (inherits context)",
|
|
@@ -24763,7 +24906,7 @@ window.__ModuleLoader__.load({
|
|
|
24763
24906
|
* 不另起一套点号命名——同一份 index.tsx 里两种命名风格会让「这条键属于哪张表」
|
|
24764
24907
|
* 变成要靠记忆的事。
|
|
24765
24908
|
*/
|
|
24766
|
-
const zh$
|
|
24909
|
+
const zh$2 = {
|
|
24767
24910
|
/** 设置页导航里的那一格,也是侧栏页签的标题。 */
|
|
24768
24911
|
navTitle: "进展更新",
|
|
24769
24912
|
progressTitle: "进展更新",
|
|
@@ -24820,7 +24963,7 @@ window.__ModuleLoader__.load({
|
|
|
24820
24963
|
settingsSaveFailed: "保存失败,请稍后再试"
|
|
24821
24964
|
};
|
|
24822
24965
|
/** 英文对照,键集与 zh 完全一致。 */
|
|
24823
|
-
const en$
|
|
24966
|
+
const en$2 = {
|
|
24824
24967
|
navTitle: "Progress updates",
|
|
24825
24968
|
progressTitle: "Progress updates",
|
|
24826
24969
|
progressGuideNote: "Every step the agent reports, collected here",
|
|
@@ -24875,11 +25018,43 @@ window.__ModuleLoader__.load({
|
|
|
24875
25018
|
settingsSaveFailed: "Could not save. Try again in a moment."
|
|
24876
25019
|
};
|
|
24877
25020
|
/** 与其余线路同形的字典包(四个内置语言 id 都指向那两份)。 */
|
|
25021
|
+
const dictionaries$2 = {
|
|
25022
|
+
zh: zh$2,
|
|
25023
|
+
"zh-CN": zh$2,
|
|
25024
|
+
en: en$2,
|
|
25025
|
+
"en-US": en$2
|
|
25026
|
+
};
|
|
25027
|
+
//#endregion
|
|
25028
|
+
//#region src/client/compact-after-turn/locales.ts
|
|
25029
|
+
/** Copy of the one-shot "compact after this turn" row in the composer's model menu. */
|
|
25030
|
+
const NS_COMPACT_AFTER_TURN = "dsh-compact-after-turn";
|
|
24878
25031
|
const dictionaries$1 = {
|
|
24879
|
-
zh:
|
|
24880
|
-
|
|
24881
|
-
|
|
24882
|
-
|
|
25032
|
+
zh: {
|
|
25033
|
+
label: "本轮结束后压缩",
|
|
25034
|
+
infoLabel: "关于本轮结束后压缩",
|
|
25035
|
+
hint: "开启后,这一轮对话结束时自动压缩一次上下文,压缩完成后开关自动关闭。手动停止的那一轮不算,开关会保留到下一轮结束。",
|
|
25036
|
+
stateArmed: "待压缩",
|
|
25037
|
+
stateCompacting: "压缩中…",
|
|
25038
|
+
unavailable: "当前 DSH 没有可用的压缩引擎。",
|
|
25039
|
+
lastCompacted: "上次:已压缩。",
|
|
25040
|
+
lastNothing: "上次:没有可压缩的内容。",
|
|
25041
|
+
lastFailed: "上次压缩失败:{detail}",
|
|
25042
|
+
errorBusy: "正在压缩,完成后才能切换。",
|
|
25043
|
+
errorFailed: "切换失败:{message}"
|
|
25044
|
+
},
|
|
25045
|
+
en: {
|
|
25046
|
+
label: "Compact after this turn",
|
|
25047
|
+
infoLabel: "About compacting after this turn",
|
|
25048
|
+
hint: "When on, the context is compacted once as soon as this turn ends, then the switch turns itself off. A turn you stop yourself does not count: the switch stays on until the next turn ends.",
|
|
25049
|
+
stateArmed: "Pending",
|
|
25050
|
+
stateCompacting: "Compacting…",
|
|
25051
|
+
unavailable: "This DSH has no compaction engine available.",
|
|
25052
|
+
lastCompacted: "Last time: compacted.",
|
|
25053
|
+
lastNothing: "Last time: nothing to compact.",
|
|
25054
|
+
lastFailed: "Last compaction failed: {detail}",
|
|
25055
|
+
errorBusy: "Compaction is running; the switch unlocks when it finishes.",
|
|
25056
|
+
errorFailed: "Could not change the switch: {message}"
|
|
25057
|
+
}
|
|
24883
25058
|
};
|
|
24884
25059
|
//#endregion
|
|
24885
25060
|
//#region src/client/locales-ru/account-pool.ts
|
|
@@ -24926,7 +25101,7 @@ window.__ModuleLoader__.load({
|
|
|
24926
25101
|
* account-pool labels come from `./account-pool.ts`, with the same overrides the
|
|
24927
25102
|
* source applies on top of them.
|
|
24928
25103
|
*/
|
|
24929
|
-
const dictionary$
|
|
25104
|
+
const dictionary$19 = {
|
|
24930
25105
|
...accountPoolRu,
|
|
24931
25106
|
title: "Claude (подписка)",
|
|
24932
25107
|
pageDesc: "Войдите в подписку Claude Pro/Max и управляйте моделями, уровнями рассуждений, контекстными окнами и квотой.",
|
|
@@ -25049,7 +25224,7 @@ window.__ModuleLoader__.load({
|
|
|
25049
25224
|
};
|
|
25050
25225
|
//#endregion
|
|
25051
25226
|
//#region src/client/locales-ru/cline-pass.ts
|
|
25052
|
-
const dictionary$
|
|
25227
|
+
const dictionary$18 = {
|
|
25053
25228
|
...accountPoolRu,
|
|
25054
25229
|
relogin: "Войти заново",
|
|
25055
25230
|
needsRelogin: "Вход истёк",
|
|
@@ -25175,7 +25350,7 @@ window.__ModuleLoader__.load({
|
|
|
25175
25350
|
};
|
|
25176
25351
|
//#endregion
|
|
25177
25352
|
//#region src/client/locales-ru/command-code.ts
|
|
25178
|
-
const dictionary$
|
|
25353
|
+
const dictionary$17 = {
|
|
25179
25354
|
...accountPoolRu,
|
|
25180
25355
|
title: "Command Code",
|
|
25181
25356
|
pageDesc: "Войдите в Command Code и управляйте моделями, контекстными окнами и квотой.",
|
|
@@ -25245,7 +25420,7 @@ window.__ModuleLoader__.load({
|
|
|
25245
25420
|
};
|
|
25246
25421
|
//#endregion
|
|
25247
25422
|
//#region src/client/locales-ru/glm-coding-plan.ts
|
|
25248
|
-
const dictionary$
|
|
25423
|
+
const dictionary$16 = {
|
|
25249
25424
|
...accountPoolRu,
|
|
25250
25425
|
title: "GLM (аккаунт ZCode)",
|
|
25251
25426
|
pageDesc: "Вход аккаунтом ZCode подключает GLM Coding Plan (Китай — bigmodel.cn, международный — z.ai). Здесь же пул аккаунтов, квота тарифа и выбор моделей. Учётные данные двух регионов независимы, поэтому в одном пуле могут быть аккаунты обоих.",
|
|
@@ -25348,7 +25523,7 @@ window.__ModuleLoader__.load({
|
|
|
25348
25523
|
* account-pool labels come from `./account-pool.ts`, with the same overrides the
|
|
25349
25524
|
* source applies on top of them.
|
|
25350
25525
|
*/
|
|
25351
|
-
const dictionary$
|
|
25526
|
+
const dictionary$15 = {
|
|
25352
25527
|
...accountPoolRu,
|
|
25353
25528
|
title: "ChatGPT",
|
|
25354
25529
|
hubTitle: "Подписки",
|
|
@@ -25588,7 +25763,7 @@ window.__ModuleLoader__.load({
|
|
|
25588
25763
|
};
|
|
25589
25764
|
//#endregion
|
|
25590
25765
|
//#region src/client/locales-ru/kimi-code.ts
|
|
25591
|
-
const dictionary$
|
|
25766
|
+
const dictionary$14 = {
|
|
25592
25767
|
...accountPoolRu,
|
|
25593
25768
|
title: "Kimi Code",
|
|
25594
25769
|
pageDesc: "Вход в подписку Kimi Code: модели, уровень рассуждений, контекстные окна и квота.",
|
|
@@ -25786,7 +25961,7 @@ window.__ModuleLoader__.load({
|
|
|
25786
25961
|
};
|
|
25787
25962
|
//#endregion
|
|
25788
25963
|
//#region src/client/locales-ru/minimax-code.ts
|
|
25789
|
-
const dictionary$
|
|
25964
|
+
const dictionary$13 = {
|
|
25790
25965
|
...accountPoolRu,
|
|
25791
25966
|
title: "MiniMax Code",
|
|
25792
25967
|
pageDesc: "Вход в подписку MiniMax Code для программирования (OAuth по коду устройства) с переиспользованием локального входа MiniMax Code: управление аккаунтом, подключением и моделями.",
|
|
@@ -25986,7 +26161,7 @@ window.__ModuleLoader__.load({
|
|
|
25986
26161
|
};
|
|
25987
26162
|
//#endregion
|
|
25988
26163
|
//#region src/client/locales-ru/ollama.ts
|
|
25989
|
-
const dictionary$
|
|
26164
|
+
const dictionary$12 = {
|
|
25990
26165
|
...accountPoolRu,
|
|
25991
26166
|
relogin: "Заменить ключ",
|
|
25992
26167
|
needsRelogin: "Ключ отклонён",
|
|
@@ -26040,7 +26215,7 @@ window.__ModuleLoader__.load({
|
|
|
26040
26215
|
};
|
|
26041
26216
|
//#endregion
|
|
26042
26217
|
//#region src/client/locales-ru/antigravity-acp.ts
|
|
26043
|
-
const dictionary$
|
|
26218
|
+
const dictionary$11 = {
|
|
26044
26219
|
title: "Antigravity (ACP)",
|
|
26045
26220
|
pageDesc: "Подключение через официальный Antigravity CLI от Google по Agent Client Protocol (ACP): модель, инструменты и сессии приходят от официального процесса, и он же хранит состояние входа.",
|
|
26046
26221
|
routeOwned: "Маршрут моделей обслуживает этот плагин",
|
|
@@ -26134,7 +26309,7 @@ window.__ModuleLoader__.load({
|
|
|
26134
26309
|
};
|
|
26135
26310
|
//#endregion
|
|
26136
26311
|
//#region src/client/locales-ru/opendesign.ts
|
|
26137
|
-
const dictionary$
|
|
26312
|
+
const dictionary$10 = {
|
|
26138
26313
|
...accountPoolRu,
|
|
26139
26314
|
relogin: "Добавить заново",
|
|
26140
26315
|
needsRelogin: "API-ключ недействителен",
|
|
@@ -26244,7 +26419,7 @@ window.__ModuleLoader__.load({
|
|
|
26244
26419
|
};
|
|
26245
26420
|
//#endregion
|
|
26246
26421
|
//#region src/client/locales-ru/dispatch-ledger.ts
|
|
26247
|
-
const dictionary$
|
|
26422
|
+
const dictionary$9 = {
|
|
26248
26423
|
mandateTitle: "Запуск субагента",
|
|
26249
26424
|
mandateTitleFork: "Запуск субагента (с контекстом)",
|
|
26250
26425
|
mandatePreparing: "Сборка задания",
|
|
@@ -26269,7 +26444,7 @@ window.__ModuleLoader__.load({
|
|
|
26269
26444
|
};
|
|
26270
26445
|
//#endregion
|
|
26271
26446
|
//#region src/client/locales-ru/progress-updates.ts
|
|
26272
|
-
const dictionary$
|
|
26447
|
+
const dictionary$8 = {
|
|
26273
26448
|
navTitle: "Ход работы",
|
|
26274
26449
|
progressTitle: "Ход работы",
|
|
26275
26450
|
progressGuideNote: "Каждый шаг, о котором сообщает агент, собирается здесь",
|
|
@@ -26325,7 +26500,7 @@ window.__ModuleLoader__.load({
|
|
|
26325
26500
|
};
|
|
26326
26501
|
//#endregion
|
|
26327
26502
|
//#region src/client/locales-ru/qoder.ts
|
|
26328
|
-
const dictionary$
|
|
26503
|
+
const dictionary$7 = {
|
|
26329
26504
|
modelRowEfforts: "уровни {list}",
|
|
26330
26505
|
modelRowNoEfforts: "без уровней",
|
|
26331
26506
|
modelRowOutput: "вывод {cap}",
|
|
@@ -26447,7 +26622,7 @@ window.__ModuleLoader__.load({
|
|
|
26447
26622
|
};
|
|
26448
26623
|
//#endregion
|
|
26449
26624
|
//#region src/client/locales-ru/step-code.ts
|
|
26450
|
-
const dictionary$
|
|
26625
|
+
const dictionary$6 = {
|
|
26451
26626
|
...accountPoolRu,
|
|
26452
26627
|
title: "Step Code (подписка Step Plan)",
|
|
26453
26628
|
pageDesc: "Подключение к StepFun по подписке Step Plan (Китай api.stepfun.com / международный api.stepfun.ai) или по API-ключу открытой платформы: пул аккаунтов, квота тарифа, расход кеша и выбор моделей. Регион — свойство учётных данных, и два региона несовместимы, поэтому в пуле могут быть аккаунты из обоих.",
|
|
@@ -26624,7 +26799,7 @@ window.__ModuleLoader__.load({
|
|
|
26624
26799
|
* dropped '{placeholder}' would turn a sentence into a bald claim. 'test/
|
|
26625
26800
|
* russian-locale.test.tsx' pins both rules.
|
|
26626
26801
|
*/
|
|
26627
|
-
const dictionary$
|
|
26802
|
+
const dictionary$5 = {
|
|
26628
26803
|
title: "WorkBuddy",
|
|
26629
26804
|
pageDesc: "Повторно использует локальный вход CodeBuddy, чтобы управлять моделями WorkBuddy (подписка CodeBuddy), контекстными окнами и квотой.",
|
|
26630
26805
|
account: "Аккаунт",
|
|
@@ -26752,7 +26927,7 @@ window.__ModuleLoader__.load({
|
|
|
26752
26927
|
};
|
|
26753
26928
|
//#endregion
|
|
26754
26929
|
//#region src/client/locales-ru/qianwen-token-plan.ts
|
|
26755
|
-
const dictionary$
|
|
26930
|
+
const dictionary$4 = {
|
|
26756
26931
|
title: "Qwen Token Plan",
|
|
26757
26932
|
pageDesc: "Подключение Qwen4 по выделенному API-ключу Qianwen Token Plan: явный кеш, воспроизведение размышлений, уровни reasoning, модели и визуальный бюджет.",
|
|
26758
26933
|
loading: "Загрузка…",
|
|
@@ -26827,7 +27002,7 @@ window.__ModuleLoader__.load({
|
|
|
26827
27002
|
};
|
|
26828
27003
|
//#endregion
|
|
26829
27004
|
//#region src/client/locales-ru/relayone.ts
|
|
26830
|
-
const dictionary$
|
|
27005
|
+
const dictionary$3 = {
|
|
26831
27006
|
title: "RelayOne",
|
|
26832
27007
|
pageDesc: "Один API-ключ для диалоговых и медиамоделей, доступных в его текущей группе.",
|
|
26833
27008
|
enabled: "Включить RelayOne",
|
|
@@ -26904,7 +27079,7 @@ window.__ModuleLoader__.load({
|
|
|
26904
27079
|
};
|
|
26905
27080
|
//#endregion
|
|
26906
27081
|
//#region src/client/locales-ru/claude-api.ts
|
|
26907
|
-
const dictionary$
|
|
27082
|
+
const dictionary$2 = {
|
|
26908
27083
|
title: "Claude API",
|
|
26909
27084
|
pageDesc: "Один API-ключ для эндпоинта Anthropic Messages или совместимого шлюза; запросы отправляются в формате официального клиента Claude Code.",
|
|
26910
27085
|
loading: "Чтение состояния линии…",
|
|
@@ -26983,7 +27158,7 @@ window.__ModuleLoader__.load({
|
|
|
26983
27158
|
};
|
|
26984
27159
|
//#endregion
|
|
26985
27160
|
//#region src/client/locales-ru/aws-quick.ts
|
|
26986
|
-
const dictionary = {
|
|
27161
|
+
const dictionary$1 = {
|
|
26987
27162
|
title: "AWS Quick",
|
|
26988
27163
|
pageDesc: "Используйте подписку AWS Quick через официальный локальный agent Quick Desktop: потоковый текст, reasoning и три режима ответа.",
|
|
26989
27164
|
refresh: "Обновить",
|
|
@@ -27038,6 +27213,21 @@ window.__ModuleLoader__.load({
|
|
|
27038
27213
|
toolsError: "Ошибка инициализации инструментов",
|
|
27039
27214
|
toolsHint: "Создайте нативный коннектор Quick заранее; плагин не обходит подтверждение Quick."
|
|
27040
27215
|
};
|
|
27216
|
+
//#endregion
|
|
27217
|
+
//#region src/client/locales-ru/compact-after-turn.ts
|
|
27218
|
+
const dictionary = {
|
|
27219
|
+
label: "Сжать после этого хода",
|
|
27220
|
+
infoLabel: "О сжатии после этого хода",
|
|
27221
|
+
hint: "Когда включено, контекст сжимается один раз сразу после окончания этого хода, затем переключатель выключается сам. Ход, остановленный вручную, не считается: переключатель остаётся включённым до конца следующего хода.",
|
|
27222
|
+
stateArmed: "Ожидает",
|
|
27223
|
+
stateCompacting: "Сжатие…",
|
|
27224
|
+
unavailable: "В этой DSH нет доступного механизма сжатия.",
|
|
27225
|
+
lastCompacted: "В прошлый раз: сжато.",
|
|
27226
|
+
lastNothing: "В прошлый раз: сжимать было нечего.",
|
|
27227
|
+
lastFailed: "Последнее сжатие не удалось: {detail}",
|
|
27228
|
+
errorBusy: "Идёт сжатие; переключатель станет доступен после его завершения.",
|
|
27229
|
+
errorFailed: "Не удалось изменить переключатель: {message}"
|
|
27230
|
+
};
|
|
27041
27231
|
/**
|
|
27042
27232
|
* Register the Russian language and every dictionary it covers.
|
|
27043
27233
|
*
|
|
@@ -27060,25 +27250,26 @@ window.__ModuleLoader__.load({
|
|
|
27060
27250
|
}
|
|
27061
27251
|
}, "dsh-chatgpt-subscription: ru language");
|
|
27062
27252
|
const dictionaries = [
|
|
27063
|
-
[NS, dictionary$
|
|
27064
|
-
[NS_CLAUDE, dictionary$
|
|
27065
|
-
[NS_COMMAND_CODE, dictionary$
|
|
27066
|
-
[NS_KIMI_CODE, dictionary$
|
|
27067
|
-
[NS_MINIMAX_CODE, dictionary$
|
|
27068
|
-
[NS_GLM_CODING_PLAN, dictionary$
|
|
27069
|
-
[NS_OLLAMA, dictionary$
|
|
27070
|
-
[NS_STEP_CODE, dictionary$
|
|
27071
|
-
[NS_CLINE_PASS, dictionary$
|
|
27072
|
-
[NS_QODER, dictionary$
|
|
27073
|
-
[NS_OPENDESIGN, dictionary$
|
|
27074
|
-
[NS_PROGRESS_UPDATES, dictionary$
|
|
27075
|
-
[NS_WORKBUDDY, dictionary$
|
|
27076
|
-
[NS_DISPATCH_LEDGER, dictionary$
|
|
27077
|
-
[NS_ANTIGRAVITY_ACP, dictionary$
|
|
27078
|
-
[NS_QIANWEN, dictionary$
|
|
27079
|
-
[NS_RELAYONE, dictionary$
|
|
27080
|
-
[NS_CLAUDE_API, dictionary$
|
|
27081
|
-
[NS_AWS_QUICK, dictionary]
|
|
27253
|
+
[NS, dictionary$15],
|
|
27254
|
+
[NS_CLAUDE, dictionary$19],
|
|
27255
|
+
[NS_COMMAND_CODE, dictionary$17],
|
|
27256
|
+
[NS_KIMI_CODE, dictionary$14],
|
|
27257
|
+
[NS_MINIMAX_CODE, dictionary$13],
|
|
27258
|
+
[NS_GLM_CODING_PLAN, dictionary$16],
|
|
27259
|
+
[NS_OLLAMA, dictionary$12],
|
|
27260
|
+
[NS_STEP_CODE, dictionary$6],
|
|
27261
|
+
[NS_CLINE_PASS, dictionary$18],
|
|
27262
|
+
[NS_QODER, dictionary$7],
|
|
27263
|
+
[NS_OPENDESIGN, dictionary$10],
|
|
27264
|
+
[NS_PROGRESS_UPDATES, dictionary$8],
|
|
27265
|
+
[NS_WORKBUDDY, dictionary$5],
|
|
27266
|
+
[NS_DISPATCH_LEDGER, dictionary$9],
|
|
27267
|
+
[NS_ANTIGRAVITY_ACP, dictionary$11],
|
|
27268
|
+
[NS_QIANWEN, dictionary$4],
|
|
27269
|
+
[NS_RELAYONE, dictionary$3],
|
|
27270
|
+
[NS_CLAUDE_API, dictionary$2],
|
|
27271
|
+
[NS_AWS_QUICK, dictionary$1],
|
|
27272
|
+
[NS_COMPACT_AFTER_TURN, dictionary]
|
|
27082
27273
|
];
|
|
27083
27274
|
for (const [ns, dictionary] of dictionaries) ctx.effect(() => {
|
|
27084
27275
|
try {
|
|
@@ -27128,7 +27319,7 @@ window.__ModuleLoader__.load({
|
|
|
27128
27319
|
}
|
|
27129
27320
|
//#endregion
|
|
27130
27321
|
//#region src/client/styles.ts
|
|
27131
|
-
const CSS$
|
|
27322
|
+
const CSS$5 = `
|
|
27132
27323
|
.dsh-codex-page{box-sizing:border-box;color:var(--dsw-alias-label-primary);display:flex;flex-direction:column;gap:20px;max-width:780px;min-width:0;padding:2px 0 30px}
|
|
27133
27324
|
.dsh-codex-page *{box-sizing:border-box}
|
|
27134
27325
|
/* The pool card's login row holds three entries. They must stay on ONE line: a
|
|
@@ -27227,10 +27418,6 @@ window.__ModuleLoader__.load({
|
|
|
27227
27418
|
.dsh-codex-skeleton span{animation:dsh-codex-pulse 1.4s ease-in-out infinite;background:var(--dsw-alias-bg-layer-2);border-radius:5px;height:42px}
|
|
27228
27419
|
.dsh-codex-skeleton span:nth-child(2){animation-delay:.12s}.dsh-codex-skeleton span:nth-child(3){animation-delay:.24s}
|
|
27229
27420
|
.dsh-codex-sr{height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;clip:rect(0 0 0 0);white-space:nowrap}
|
|
27230
|
-
.dsh-codex-composer-quota{align-items:center;background:var(--dsw-alias-bg-layer-2);border:0.5px solid var(--dsw-alias-border-l2);border-radius:999px;corner-shape:round;color:var(--dsw-alias-label-secondary);display:inline-flex;font-size:11px;gap:6px;height:28px;line-height:1;max-width:160px;padding:0 9px;white-space:nowrap}
|
|
27231
|
-
.dsh-codex-composer-quota strong{color:var(--dsw-alias-label-primary);font-size:11px;font-weight:650}
|
|
27232
|
-
.dsh-codex-composer-quota[data-level=warning] strong{color:var(--dsw-alias-label-warning,#d58a24)}
|
|
27233
|
-
.dsh-codex-composer-quota[data-level=danger] strong{color:var(--dsw-alias-label-danger,#d94b4b)}
|
|
27234
27421
|
.dsh-codex-image-tool{border:0.5px solid var(--dsw-alias-border-l2);border-radius:8px;display:flex;flex-direction:column;gap:8px;margin:4px 0 4px 4px;max-width:520px;padding:10px 12px}
|
|
27235
27422
|
/* One line, always. In a 320px column the label used to be squeezed until it
|
|
27236
27423
|
stacked one character per row, which reads as broken text rather than a card.
|
|
@@ -27284,7 +27471,7 @@ window.__ModuleLoader__.load({
|
|
|
27284
27471
|
* removed with, some other package.
|
|
27285
27472
|
*/
|
|
27286
27473
|
function installStyles() {
|
|
27287
|
-
return installPluginStyle("main", CSS$
|
|
27474
|
+
return installPluginStyle("main", CSS$5);
|
|
27288
27475
|
}
|
|
27289
27476
|
//#endregion
|
|
27290
27477
|
//#region src/client/hub/hub-styles.ts
|
|
@@ -27295,7 +27482,7 @@ window.__ModuleLoader__.load({
|
|
|
27295
27482
|
* common/plugin-style.ts). Colors ride DSH theme tokens, so dark mode needs
|
|
27296
27483
|
* no branch of its own.
|
|
27297
27484
|
*/
|
|
27298
|
-
const CSS$
|
|
27485
|
+
const CSS$4 = `
|
|
27299
27486
|
.dsh-hub-overview{display:flex;flex-direction:column;min-width:0}
|
|
27300
27487
|
.dsh-hub-hint{color:var(--dsw-alias-label-secondary,#5d5c52);font-size:13px;line-height:1.55;margin:0 0 14px}
|
|
27301
27488
|
.dsh-hub-cards{border-top:0.5px solid var(--dsw-alias-border-l2,#eceadf)}
|
|
@@ -27386,7 +27573,7 @@ window.__ModuleLoader__.load({
|
|
|
27386
27573
|
.dsh-hub-detail .dsha-page>header{margin-bottom:4px}
|
|
27387
27574
|
`;
|
|
27388
27575
|
function installHubStyles() {
|
|
27389
|
-
installPluginStyle("hub", CSS$
|
|
27576
|
+
installPluginStyle("hub", CSS$4);
|
|
27390
27577
|
}
|
|
27391
27578
|
//#endregion
|
|
27392
27579
|
//#region src/client/common/model-checklist-styles.ts
|
|
@@ -27395,7 +27582,7 @@ window.__ModuleLoader__.load({
|
|
|
27395
27582
|
* and hover follow the claude-style model picker so the settings list and the
|
|
27396
27583
|
* conversation picker read as one surface.
|
|
27397
27584
|
*/
|
|
27398
|
-
const CSS$
|
|
27585
|
+
const CSS$3 = `
|
|
27399
27586
|
.dsh-mcl{display:flex;flex-direction:column;min-width:0;padding:4px 0 2px}
|
|
27400
27587
|
.dsh-mcl-head{align-items:center;display:flex;justify-content:space-between;min-height:28px;padding:2px 2px 6px}
|
|
27401
27588
|
.dsh-mcl-count{color:var(--dsw-alias-label-caption,#a6a094);font-size:11px;letter-spacing:.02em}
|
|
@@ -27419,7 +27606,7 @@ window.__ModuleLoader__.load({
|
|
|
27419
27606
|
.dsh-mcl-option:hover:not(:disabled) .dsh-mcl-check{border-color:var(--dsw-alias-button-info-fill,#397ee8)}
|
|
27420
27607
|
`;
|
|
27421
27608
|
function installModelChecklistStyles() {
|
|
27422
|
-
installPluginStyle("model-checklist", CSS$
|
|
27609
|
+
installPluginStyle("model-checklist", CSS$3);
|
|
27423
27610
|
}
|
|
27424
27611
|
//#endregion
|
|
27425
27612
|
//#region src/client/common/styles.ts
|
|
@@ -27481,100 +27668,6 @@ window.__ModuleLoader__.load({
|
|
|
27481
27668
|
`, POOL_STYLE_ID);
|
|
27482
27669
|
}
|
|
27483
27670
|
//#endregion
|
|
27484
|
-
//#region src/client/common/ComposerQuotaBadge.tsx
|
|
27485
|
-
/**
|
|
27486
|
-
* The composer badge every subscription line shows beside the input.
|
|
27487
|
-
*
|
|
27488
|
-
* Six of these were near-identical copies: the same mount guard, the same 60 s
|
|
27489
|
-
* poll that only ticks while the tab is visible, the same "inert unless the
|
|
27490
|
-
* conversation is on this provider" rule, the same markup. What differed was the
|
|
27491
|
-
* part worth reading — how each line picks its most meaningful number — and that
|
|
27492
|
-
* is the only thing a line still supplies.
|
|
27493
|
-
*
|
|
27494
|
-
* Two details this shared shape depends on:
|
|
27495
|
-
*
|
|
27496
|
-
* - the callbacks are held in refs. Every caller hands them over as an inline
|
|
27497
|
-
* arrow, and a callback in the dependency array would restart the interval —
|
|
27498
|
-
* and refetch — on every render. The copies this replaced were only safe
|
|
27499
|
-
* because each was rendered with a stable prop, which is a property of the
|
|
27500
|
-
* call site rather than of the badge;
|
|
27501
|
-
* - `authenticated` is part of the status contract rather than a predicate a
|
|
27502
|
-
* line could forget, so a signed-out line can never leave a stale badge up.
|
|
27503
|
-
*/
|
|
27504
|
-
/** The shared grading: 5% or less is critical, 20% or less warns. */
|
|
27505
|
-
function quotaLevel(remainingPercent) {
|
|
27506
|
-
return remainingPercent <= 5 ? "danger" : remainingPercent <= 20 ? "warning" : "normal";
|
|
27507
|
-
}
|
|
27508
|
-
function ComposerQuotaBadge(props) {
|
|
27509
|
-
const { directory, loadModelDirectory, providerId, label } = props;
|
|
27510
|
-
const modelState = useStore(directory);
|
|
27511
|
-
const [status, setStatus] = (0, react.useState)(null);
|
|
27512
|
-
const [loading, setLoading] = (0, react.useState)(false);
|
|
27513
|
-
const mountedRef = (0, react.useRef)(false);
|
|
27514
|
-
const readRef = (0, react.useRef)(props.readStatus);
|
|
27515
|
-
const selectRef = (0, react.useRef)(props.selectFacts);
|
|
27516
|
-
readRef.current = props.readStatus;
|
|
27517
|
-
selectRef.current = props.selectFacts;
|
|
27518
|
-
const selected = modelState.current;
|
|
27519
|
-
const isSelected = selected?.provider === providerId;
|
|
27520
|
-
(0, react.useEffect)(() => {
|
|
27521
|
-
loadModelDirectory();
|
|
27522
|
-
}, [loadModelDirectory]);
|
|
27523
|
-
(0, react.useEffect)(() => {
|
|
27524
|
-
mountedRef.current = true;
|
|
27525
|
-
return () => {
|
|
27526
|
-
mountedRef.current = false;
|
|
27527
|
-
};
|
|
27528
|
-
}, []);
|
|
27529
|
-
const fetchStatus = (0, react.useCallback)(async (refresh) => {
|
|
27530
|
-
if (!mountedRef.current) return;
|
|
27531
|
-
setLoading(true);
|
|
27532
|
-
try {
|
|
27533
|
-
const data = await readRef.current(refresh);
|
|
27534
|
-
if (mountedRef.current) setStatus(data);
|
|
27535
|
-
} catch {} finally {
|
|
27536
|
-
if (mountedRef.current) setLoading(false);
|
|
27537
|
-
}
|
|
27538
|
-
}, []);
|
|
27539
|
-
(0, react.useEffect)(() => {
|
|
27540
|
-
if (!isSelected) return;
|
|
27541
|
-
fetchStatus(false);
|
|
27542
|
-
const timer = window.setInterval(() => {
|
|
27543
|
-
if (document.visibilityState === "visible") fetchStatus(false);
|
|
27544
|
-
}, 6e4);
|
|
27545
|
-
return () => {
|
|
27546
|
-
window.clearInterval(timer);
|
|
27547
|
-
};
|
|
27548
|
-
}, [fetchStatus, isSelected]);
|
|
27549
|
-
const facts = (0, react.useMemo)(() => selectRef.current(status, selected?.model), [status, selected?.model]);
|
|
27550
|
-
if (!isSelected || status === null || !status.authenticated || facts === null) return null;
|
|
27551
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
27552
|
-
className: "dsha-composer-quota",
|
|
27553
|
-
"data-level": facts.level,
|
|
27554
|
-
title: facts.tooltip,
|
|
27555
|
-
"aria-label": facts.tooltip,
|
|
27556
|
-
onClick: () => void fetchStatus(true),
|
|
27557
|
-
children: [
|
|
27558
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
27559
|
-
className: "dsha-composer-quota-label",
|
|
27560
|
-
children: label
|
|
27561
|
-
}),
|
|
27562
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", {
|
|
27563
|
-
className: "dsha-composer-quota-val",
|
|
27564
|
-
children: loading ? "…" : facts.text
|
|
27565
|
-
}),
|
|
27566
|
-
typeof facts.percent === "number" && Number.isFinite(facts.percent) && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
27567
|
-
className: "dsha-composer-quota-meter",
|
|
27568
|
-
"aria-hidden": "true",
|
|
27569
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("i", {
|
|
27570
|
-
className: "dsha-composer-quota-meter-fill",
|
|
27571
|
-
style: { width: `${Math.min(100, Math.max(0, facts.percent))}%` }
|
|
27572
|
-
})
|
|
27573
|
-
})
|
|
27574
|
-
]
|
|
27575
|
-
});
|
|
27576
|
-
}
|
|
27577
|
-
//#endregion
|
|
27578
27671
|
//#region src/client/claude/ClaudeComposerQuota.tsx
|
|
27579
27672
|
const api$4 = createLineApi("/claude/api", "Claude");
|
|
27580
27673
|
/**
|
|
@@ -27632,7 +27725,7 @@ window.__ModuleLoader__.load({
|
|
|
27632
27725
|
}
|
|
27633
27726
|
//#endregion
|
|
27634
27727
|
//#region src/client/claude/styles.ts
|
|
27635
|
-
const STYLE_ID$
|
|
27728
|
+
const STYLE_ID$11 = "dsh-claude-settings-style";
|
|
27636
27729
|
/**
|
|
27637
27730
|
* Claude-only additions to the shared settings design system.
|
|
27638
27731
|
*
|
|
@@ -27656,7 +27749,7 @@ window.__ModuleLoader__.load({
|
|
|
27656
27749
|
.dshcl-mono{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:11px;overflow-wrap:anywhere}
|
|
27657
27750
|
.dshcl-model-meta{color:var(--dsw-alias-label-tertiary);font-size:11px;margin-left:5px}
|
|
27658
27751
|
.dshcl-empty-inline{color:var(--dsw-alias-label-tertiary);font-size:12px}
|
|
27659
|
-
`, STYLE_ID$
|
|
27752
|
+
`, STYLE_ID$11);
|
|
27660
27753
|
}
|
|
27661
27754
|
//#endregion
|
|
27662
27755
|
//#region src/client/command-code/CommandCodeComposerQuota.tsx
|
|
@@ -27773,7 +27866,7 @@ window.__ModuleLoader__.load({
|
|
|
27773
27866
|
}
|
|
27774
27867
|
//#endregion
|
|
27775
27868
|
//#region src/client/kimi-code/styles.ts
|
|
27776
|
-
const STYLE_ID$
|
|
27869
|
+
const STYLE_ID$10 = "dsh-kimi-code-settings-style";
|
|
27777
27870
|
/**
|
|
27778
27871
|
* Node the base control styles come from.
|
|
27779
27872
|
*
|
|
@@ -27836,11 +27929,27 @@ window.__ModuleLoader__.load({
|
|
|
27836
27929
|
.dsha-mini-btn:hover{text-decoration:underline}
|
|
27837
27930
|
.dsha-empty{border:0.5px dashed var(--dsw-alias-border-l2);border-radius:7px;color:var(--dsw-alias-label-tertiary);font-size:12px;margin:12px 0 0;padding:16px;text-align:center}
|
|
27838
27931
|
.dsha-error{color:var(--dsw-alias-label-danger,#d94b4b);font-size:12px;margin:8px 0 0}
|
|
27839
|
-
|
|
27840
|
-
|
|
27841
|
-
.dsha-
|
|
27842
|
-
.dsha-composer-quota
|
|
27843
|
-
.dsha-composer-quota[data-level=
|
|
27932
|
+
/* Composer quota capsule (QuotaCapsule): a health indicator in the level's tone
|
|
27933
|
+
(ring gauge when the remaining share is known, status dot otherwise), a quiet
|
|
27934
|
+
label and a tabular number. --dsha-q-tone carries the level to every part. */
|
|
27935
|
+
.dsha-composer-quota{--dsha-q-tone:var(--dsw-alias-label-success,#10b981);align-items:center;background:var(--dsw-alias-bg-layer-2);border:0.5px solid var(--dsw-alias-border-l2);border-radius:999px;corner-shape:round;color:var(--dsw-alias-label-tertiary,var(--dsw-alias-label-secondary));display:inline-flex;font-size:11px;font-variant-numeric:tabular-nums;gap:6px;height:26px;line-height:1;max-width:180px;outline:none;padding:0 10px 0 8px;white-space:nowrap;user-select:none;transition:background-color .15s ease,border-color .15s ease,box-shadow .15s ease}
|
|
27936
|
+
.dsha-composer-quota[data-level=warning]{--dsha-q-tone:var(--dsw-alias-label-warning,#d58a24)}
|
|
27937
|
+
.dsha-composer-quota[data-level=danger]{--dsha-q-tone:var(--dsw-alias-label-danger,#d94b4b);background:color-mix(in srgb,var(--dsha-q-tone) 10%,var(--dsw-alias-bg-layer-2,transparent));border-color:color-mix(in srgb,var(--dsha-q-tone) 40%,transparent)}
|
|
27938
|
+
.dsha-composer-quota[role=button]{cursor:pointer}
|
|
27939
|
+
.dsha-composer-quota[role=button]:hover{background:var(--dsw-alias-interactive-bg-hover);border-color:var(--dsw-alias-border-l1,var(--dsw-alias-border-l2))}
|
|
27940
|
+
.dsha-composer-quota[data-level=danger][role=button]:hover{background:color-mix(in srgb,var(--dsha-q-tone) 16%,var(--dsw-alias-bg-layer-2,transparent))}
|
|
27941
|
+
.dsha-composer-quota:focus-visible{box-shadow:0 0 0 2px color-mix(in srgb,var(--dsw-alias-button-info-fill,#397ee8) 55%,transparent)}
|
|
27942
|
+
.dsha-composer-quota-dot{background:var(--dsha-q-tone);border-radius:50%;box-shadow:0 0 0 2.5px color-mix(in srgb,var(--dsha-q-tone) 22%,transparent);display:block;flex:none;height:6px;margin:0 1px;width:6px}
|
|
27943
|
+
.dsha-composer-quota-ring{display:block;flex:none;height:14px;transform:rotate(-90deg);width:14px}
|
|
27944
|
+
.dsha-composer-quota-ring circle{fill:none;stroke-width:2.25}
|
|
27945
|
+
.dsha-composer-quota-ring-track{stroke:color-mix(in srgb,var(--dsha-q-tone) 22%,transparent)}
|
|
27946
|
+
.dsha-composer-quota-ring-fill{stroke:var(--dsha-q-tone);transition:stroke-dasharray .35s ease}
|
|
27947
|
+
.dsha-composer-quota-label{font-weight:500;overflow:hidden;text-overflow:ellipsis}
|
|
27948
|
+
.dsha-composer-quota-val{color:var(--dsw-alias-label-primary);flex:none;font-size:12px;font-weight:650;letter-spacing:-.01em}
|
|
27949
|
+
.dsha-composer-quota[data-level=warning] .dsha-composer-quota-val,.dsha-composer-quota[data-level=danger] .dsha-composer-quota-val{color:var(--dsha-q-tone)}
|
|
27950
|
+
.dsha-composer-quota[data-loading=true] .dsha-composer-quota-dot,.dsha-composer-quota[data-loading=true] .dsha-composer-quota-ring{animation:dsha-q-pulse 1s ease-in-out infinite}
|
|
27951
|
+
@keyframes dsha-q-pulse{50%{opacity:.35}}
|
|
27952
|
+
@media (prefers-reduced-motion:reduce){.dsha-composer-quota[data-loading=true] .dsha-composer-quota-dot,.dsha-composer-quota[data-loading=true] .dsha-composer-quota-ring{animation:none;opacity:.5}.dsha-composer-quota-ring-fill{transition:none}}
|
|
27844
27953
|
|
|
27845
27954
|
.dsha-device-box{background:var(--dsw-alias-bg-layer-2);border:0.5px solid var(--dsw-alias-border-l2);border-radius:8px;display:flex;flex-direction:column;gap:10px;margin-top:12px;padding:12px}
|
|
27846
27955
|
.dsha-code-row{align-items:center;display:flex;flex-wrap:wrap;gap:10px;justify-content:space-between}
|
|
@@ -27924,7 +28033,7 @@ window.__ModuleLoader__.load({
|
|
|
27924
28033
|
`;
|
|
27925
28034
|
/** Kimi-specific rules layered on top of the shared control styles. */
|
|
27926
28035
|
function installKimiCodeStyles() {
|
|
27927
|
-
installPluginStyle("kimi-code", BASE, STYLE_ID$
|
|
28036
|
+
installPluginStyle("kimi-code", BASE, STYLE_ID$10);
|
|
27928
28037
|
}
|
|
27929
28038
|
//#endregion
|
|
27930
28039
|
//#region src/client/minimax-code/MinimaxCodeComposerQuota.tsx
|
|
@@ -28060,7 +28169,7 @@ window.__ModuleLoader__.load({
|
|
|
28060
28169
|
//#region src/client/minimax-code/MinimaxVideoDocumentBody.tsx
|
|
28061
28170
|
/** 兜底翻译:只在没有 locale 座位时用到。 */
|
|
28062
28171
|
function translate$1(key) {
|
|
28063
|
-
return zh$
|
|
28172
|
+
return zh$17[key] ?? key;
|
|
28064
28173
|
}
|
|
28065
28174
|
/**
|
|
28066
28175
|
* 一个文件地址里的会话与路径。
|
|
@@ -28196,7 +28305,7 @@ window.__ModuleLoader__.load({
|
|
|
28196
28305
|
*/
|
|
28197
28306
|
/** 兜底翻译:只在没有 locale 座位时用到,走同一份 zh 字典。 */
|
|
28198
28307
|
function translate(key) {
|
|
28199
|
-
return zh$
|
|
28308
|
+
return zh$17[key] ?? key;
|
|
28200
28309
|
}
|
|
28201
28310
|
/**
|
|
28202
28311
|
* 一张视频工具卡片。
|
|
@@ -28466,7 +28575,7 @@ window.__ModuleLoader__.load({
|
|
|
28466
28575
|
}
|
|
28467
28576
|
//#endregion
|
|
28468
28577
|
//#region src/client/minimax-code/styles.ts
|
|
28469
|
-
const STYLE_ID$
|
|
28578
|
+
const STYLE_ID$9 = "dsh-minimax-code-settings-style";
|
|
28470
28579
|
/**
|
|
28471
28580
|
* MiniMax Code-only additions to the shared settings design system.
|
|
28472
28581
|
*
|
|
@@ -28635,7 +28744,7 @@ window.__ModuleLoader__.load({
|
|
|
28635
28744
|
.dshm-video-history-meta{color:var(--dsw-alias-label-tertiary);flex:none;font-size:11px;font-variant-numeric:tabular-nums}
|
|
28636
28745
|
@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}}
|
|
28637
28746
|
@media(prefers-reduced-motion:reduce){.dshm-video-skeleton span{animation:none;opacity:.6}}
|
|
28638
|
-
`, STYLE_ID$
|
|
28747
|
+
`, STYLE_ID$9);
|
|
28639
28748
|
}
|
|
28640
28749
|
//#endregion
|
|
28641
28750
|
//#region src/client/glm-coding-plan/GlmCodingPlanComposerQuota.tsx
|
|
@@ -28652,7 +28761,7 @@ window.__ModuleLoader__.load({
|
|
|
28652
28761
|
* 没有快照、没有窗口、或全部窗口都没有百分比时返回 null,即**不渲染胶囊**:
|
|
28653
28762
|
* 契约允许 quota 为 null,装一个占位数字比不显示更像坏了。
|
|
28654
28763
|
*/
|
|
28655
|
-
function selectBadgeFacts$3(status, lookup = (key) => zh$
|
|
28764
|
+
function selectBadgeFacts$3(status, lookup = (key) => zh$16[key]) {
|
|
28656
28765
|
const measured = (status?.quota?.windows ?? []).filter((window) => typeof window.usedPercent === "number" && Number.isFinite(window.usedPercent));
|
|
28657
28766
|
if (measured.length === 0) return null;
|
|
28658
28767
|
const tightest = measured.reduce((best, window) => {
|
|
@@ -28690,7 +28799,7 @@ window.__ModuleLoader__.load({
|
|
|
28690
28799
|
}
|
|
28691
28800
|
//#endregion
|
|
28692
28801
|
//#region src/client/glm-coding-plan/styles.ts
|
|
28693
|
-
const STYLE_ID$
|
|
28802
|
+
const STYLE_ID$8 = "dsh-glm-coding-plan-settings-style";
|
|
28694
28803
|
/**
|
|
28695
28804
|
* GLM(ZCode 账号)卡片独有的样式。
|
|
28696
28805
|
*
|
|
@@ -28730,7 +28839,7 @@ window.__ModuleLoader__.load({
|
|
|
28730
28839
|
:not(.dsha-btn-primary));通用 hover 修好后它只剩副作用:把 .dsha-btn 的次要
|
|
28731
28840
|
按钮也画成主按钮,故删除。 */
|
|
28732
28841
|
.dsha-account-add-actions{display:flex;flex-wrap:wrap;gap:8px}
|
|
28733
|
-
`, STYLE_ID$
|
|
28842
|
+
`, STYLE_ID$8);
|
|
28734
28843
|
}
|
|
28735
28844
|
//#endregion
|
|
28736
28845
|
//#region src/client/antigravity-acp/route.ts
|
|
@@ -28748,7 +28857,7 @@ window.__ModuleLoader__.load({
|
|
|
28748
28857
|
* single most misleading pixel on the page.
|
|
28749
28858
|
*/
|
|
28750
28859
|
function AntigravityAcpComposerBadge(props) {
|
|
28751
|
-
const t = useLineDict(NS_ANTIGRAVITY_ACP, zh$
|
|
28860
|
+
const t = useLineDict(NS_ANTIGRAVITY_ACP, zh$13);
|
|
28752
28861
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ComposerQuotaBadge, {
|
|
28753
28862
|
directory: props.directory,
|
|
28754
28863
|
loadModelDirectory: props.loadModelDirectory,
|
|
@@ -28790,7 +28899,7 @@ window.__ModuleLoader__.load({
|
|
|
28790
28899
|
}
|
|
28791
28900
|
//#endregion
|
|
28792
28901
|
//#region src/client/antigravity-acp/styles.ts
|
|
28793
|
-
const STYLE_ID$
|
|
28902
|
+
const STYLE_ID$7 = "dsh-antigravity-acp-settings-style";
|
|
28794
28903
|
/**
|
|
28795
28904
|
* The Antigravity (ACP) card's own styles.
|
|
28796
28905
|
*
|
|
@@ -28816,7 +28925,7 @@ window.__ModuleLoader__.load({
|
|
|
28816
28925
|
.dshagy-details[open]>summary{color:var(--dsw-alias-label-primary)}
|
|
28817
28926
|
.dshagy-details>p{color:var(--dsw-alias-label-tertiary);font-size:12px;line-height:1.55;margin:9px 0 0}
|
|
28818
28927
|
.dshagy-boundary{color:var(--dsw-alias-label-tertiary);font-size:12px;line-height:1.55;margin:9px 0 0;padding-left:18px}
|
|
28819
|
-
`, STYLE_ID$
|
|
28928
|
+
`, STYLE_ID$7);
|
|
28820
28929
|
}
|
|
28821
28930
|
//#endregion
|
|
28822
28931
|
//#region src/client/step-code/StepCodeComposerQuota.tsx
|
|
@@ -28832,7 +28941,7 @@ window.__ModuleLoader__.load({
|
|
|
28832
28941
|
*
|
|
28833
28942
|
* 没有快照、没有窗口、或全部窗口都没有百分比时返回 null(见文件头)。
|
|
28834
28943
|
*/
|
|
28835
|
-
function selectBadgeFacts$2(status, lookup = (key) => zh$
|
|
28944
|
+
function selectBadgeFacts$2(status, lookup = (key) => zh$11[key]) {
|
|
28836
28945
|
const quota = status?.quota;
|
|
28837
28946
|
if (quota === null || quota === void 0) return null;
|
|
28838
28947
|
if (quota.kind !== "windowed") return null;
|
|
@@ -28880,7 +28989,7 @@ window.__ModuleLoader__.load({
|
|
|
28880
28989
|
}
|
|
28881
28990
|
//#endregion
|
|
28882
28991
|
//#region src/client/step-code/styles.ts
|
|
28883
|
-
const STYLE_ID$
|
|
28992
|
+
const STYLE_ID$6 = "dsh-step-code-settings-style";
|
|
28884
28993
|
/**
|
|
28885
28994
|
* Step Code(Step Plan 订阅)卡片独有的样式。
|
|
28886
28995
|
*
|
|
@@ -28958,7 +29067,7 @@ window.__ModuleLoader__.load({
|
|
|
28958
29067
|
@media(max-width:560px){.dshsc-cred-grid,.dshsc-cred-grid-narrow{grid-template-columns:minmax(0,1fr)}}
|
|
28959
29068
|
|
|
28960
29069
|
.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)}
|
|
28961
|
-
`, STYLE_ID$
|
|
29070
|
+
`, STYLE_ID$6);
|
|
28962
29071
|
}
|
|
28963
29072
|
//#endregion
|
|
28964
29073
|
//#region src/client/cline-pass/ClinePassComposerQuota.tsx
|
|
@@ -28979,7 +29088,7 @@ window.__ModuleLoader__.load({
|
|
|
28979
29088
|
directory: props.directory,
|
|
28980
29089
|
loadModelDirectory: props.loadModelDirectory,
|
|
28981
29090
|
providerId: "cline-pass",
|
|
28982
|
-
label: zh$
|
|
29091
|
+
label: zh$10.composerLabel,
|
|
28983
29092
|
readStatus: (refresh) => API$1.status(refresh),
|
|
28984
29093
|
selectFacts: selectClinePassFacts
|
|
28985
29094
|
});
|
|
@@ -29065,7 +29174,7 @@ window.__ModuleLoader__.load({
|
|
|
29065
29174
|
* 另外那只可能还剩一大半。所以这里不平均、不取最小剩余,而是取最大已用比例。
|
|
29066
29175
|
* 没有快照、没有桶、或全部桶都没有总额时返回 null(见文件头)。
|
|
29067
29176
|
*/
|
|
29068
|
-
function selectBadgeFacts$1(status, lookup = (key) => zh$
|
|
29177
|
+
function selectBadgeFacts$1(status, lookup = (key) => zh$9[key]) {
|
|
29069
29178
|
const quota = status?.quota;
|
|
29070
29179
|
if (quota === null || quota === void 0) return null;
|
|
29071
29180
|
const measurable = quota.buckets.filter((bucket) => bucket.total !== null && bucket.total > 0 && bucket.used !== null);
|
|
@@ -29075,7 +29184,7 @@ window.__ModuleLoader__.load({
|
|
|
29075
29184
|
const remaining = Math.round((1 - used) * 100);
|
|
29076
29185
|
const unit = tightest.unit !== null && tightest.unit !== "" ? " " + tightest.unit : "";
|
|
29077
29186
|
const bucketLabel = quotaBucketText(tightest.kind, {
|
|
29078
|
-
...zh$
|
|
29187
|
+
...zh$9,
|
|
29079
29188
|
quotaBucketPersonal: lookup("quotaBucketPersonal"),
|
|
29080
29189
|
quotaBucketAddOn: lookup("quotaBucketAddOn"),
|
|
29081
29190
|
quotaBucketOrg: lookup("quotaBucketOrg")
|
|
@@ -29107,7 +29216,7 @@ window.__ModuleLoader__.load({
|
|
|
29107
29216
|
}
|
|
29108
29217
|
//#endregion
|
|
29109
29218
|
//#region src/client/qoder/styles.ts
|
|
29110
|
-
const STYLE_ID$
|
|
29219
|
+
const STYLE_ID$5 = "dsh-qoder-settings-style";
|
|
29111
29220
|
/**
|
|
29112
29221
|
* Qoder(订阅)卡片独有的样式。
|
|
29113
29222
|
*
|
|
@@ -29162,7 +29271,7 @@ window.__ModuleLoader__.load({
|
|
|
29162
29271
|
.dshq-details>p{color:var(--dsw-alias-label-tertiary);font-size:12px;line-height:1.55;margin:9px 0 0}
|
|
29163
29272
|
|
|
29164
29273
|
.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)}
|
|
29165
|
-
`, STYLE_ID$
|
|
29274
|
+
`, STYLE_ID$5);
|
|
29166
29275
|
}
|
|
29167
29276
|
//#endregion
|
|
29168
29277
|
//#region src/client/opendesign/OpenDesignComposerQuota.tsx
|
|
@@ -29186,7 +29295,7 @@ window.__ModuleLoader__.load({
|
|
|
29186
29295
|
directory: props.directory,
|
|
29187
29296
|
loadModelDirectory: props.loadModelDirectory,
|
|
29188
29297
|
providerId: "opendesign",
|
|
29189
|
-
label: zh$
|
|
29298
|
+
label: zh$8.composerLabel,
|
|
29190
29299
|
readStatus: () => API.status(),
|
|
29191
29300
|
selectFacts: selectOpenDesignFacts
|
|
29192
29301
|
});
|
|
@@ -29207,9 +29316,9 @@ window.__ModuleLoader__.load({
|
|
|
29207
29316
|
* is not), and one decimal is what keeps "1.5 小时" from reading as "2 小时".
|
|
29208
29317
|
*/
|
|
29209
29318
|
function planWindowName(seconds) {
|
|
29210
|
-
if (seconds >= 86400 && seconds % 86400 === 0) return zh$
|
|
29211
|
-
if (seconds >= 3600) return zh$
|
|
29212
|
-
return zh$
|
|
29319
|
+
if (seconds >= 86400 && seconds % 86400 === 0) return zh$8.usageWindowDays.replace("{count}", String(seconds / 86400));
|
|
29320
|
+
if (seconds >= 3600) return zh$8.usageWindowHours.replace("{count}", formatDecimal(seconds / 3600));
|
|
29321
|
+
return zh$8.usageWindowMinutes.replace("{count}", formatDecimal(seconds / 60));
|
|
29213
29322
|
}
|
|
29214
29323
|
/** What a window still has, from the grant and the remainder it states. */
|
|
29215
29324
|
function windowRemaining(limitCredits, remainingCredits) {
|
|
@@ -29242,7 +29351,7 @@ window.__ModuleLoader__.load({
|
|
|
29242
29351
|
const primaryId = status.pool.activeAccountId ?? status.pool.accounts.find((account) => account.isPrimary)?.id;
|
|
29243
29352
|
const reading = readings.find((account) => account.accountId === primaryId) ?? readings[0];
|
|
29244
29353
|
const amount = reading.balanceUsd;
|
|
29245
|
-
const readAt = zh$
|
|
29354
|
+
const readAt = zh$8.usageReadAt.replace("{time}", new Date(reading.fetchedAt).toLocaleTimeString());
|
|
29246
29355
|
const windows = planWindows(reading.codingPlan);
|
|
29247
29356
|
if (windows.length === 0) return {
|
|
29248
29357
|
text: `$${amount}`,
|
|
@@ -29251,8 +29360,8 @@ window.__ModuleLoader__.load({
|
|
|
29251
29360
|
};
|
|
29252
29361
|
const narrowest = windows[0];
|
|
29253
29362
|
return {
|
|
29254
|
-
text: zh$
|
|
29255
|
-
tooltip: `${reading.alias} · ${windows.map((window) => `${window.name} ${zh$
|
|
29363
|
+
text: zh$8.usageWindowRemaining.replace("{remaining}", formatDecimal(narrowest.remaining)),
|
|
29364
|
+
tooltip: `${reading.alias} · ${windows.map((window) => `${window.name} ${zh$8.usageWindowRemaining.replace("{remaining}", formatDecimal(window.remaining))}`).join(" · ")} · ${readAt}`,
|
|
29256
29365
|
level: quotaLevel(narrowest.remaining),
|
|
29257
29366
|
percent: narrowest.remaining
|
|
29258
29367
|
};
|
|
@@ -29307,8 +29416,6 @@ window.__ModuleLoader__.load({
|
|
|
29307
29416
|
.dshod-plan-resets{color:var(--dsw-alias-label-tertiary);font-size:11px}
|
|
29308
29417
|
.dshod-meter-track{background:var(--dsw-alias-bg-layer-2);border:0.5px solid var(--dsw-alias-border-l2);border-radius:999px;display:block;height:6px;overflow:hidden}
|
|
29309
29418
|
.dshod-meter-fill{background:var(--dsw-alias-brand-primary);display:block;height:100%;transition:width .2s ease}
|
|
29310
|
-
.dsha-composer-quota-meter{align-self:center;background:var(--dsw-alias-border-l2);border-radius:999px;display:inline-block;flex:none;height:3px;overflow:hidden;width:24px}
|
|
29311
|
-
.dsha-composer-quota-meter-fill{background:var(--dsw-alias-brand-primary);display:block;height:100%}
|
|
29312
29419
|
.dshod-adv-control{width:240px;max-width:100%;flex:none}
|
|
29313
29420
|
.dshod-adv-control.dsha-select{max-width:240px;min-width:240px;width:240px}
|
|
29314
29421
|
.dshod-adv-mono{font-family:ui-monospace,SFMono-Regular,Consolas,monospace}
|
|
@@ -31081,7 +31188,7 @@ window.__ModuleLoader__.load({
|
|
|
31081
31188
|
}
|
|
31082
31189
|
/** 兜底翻译:只在没有 locale 服务时用到(测试、以及菜单渲染早于字典注册)。 */
|
|
31083
31190
|
function fallbackTranslate$3(key, params) {
|
|
31084
|
-
const template = zh$
|
|
31191
|
+
const template = zh$17[key] ?? key;
|
|
31085
31192
|
if (params === void 0) return template;
|
|
31086
31193
|
return template.replace(/\{(\w+)\}/g, (_match, name) => String(params[name] ?? ""));
|
|
31087
31194
|
}
|
|
@@ -58292,7 +58399,7 @@ window.__ModuleLoader__.load({
|
|
|
58292
58399
|
* @returns 该键的文案;缺键时回退为键本身。
|
|
58293
58400
|
*/
|
|
58294
58401
|
function fallbackTranslate$2(key, params) {
|
|
58295
|
-
return interpolate(zh$
|
|
58402
|
+
return interpolate(zh$2[key] ?? key, params);
|
|
58296
58403
|
}
|
|
58297
58404
|
/**
|
|
58298
58405
|
* 把 `{name}` 占位符换成实参。
|
|
@@ -58453,7 +58560,7 @@ window.__ModuleLoader__.load({
|
|
|
58453
58560
|
* 先按当前语言的字典取值(没有 `t` 时才用兜底字典),再统一做一次替换。
|
|
58454
58561
|
*/
|
|
58455
58562
|
const translate = (key, params) => {
|
|
58456
|
-
return interpolate(t === void 0 ? zh$
|
|
58563
|
+
return interpolate(t === void 0 ? zh$2[key] ?? key : t(key), params);
|
|
58457
58564
|
};
|
|
58458
58565
|
const latestId = updates.length > 0 ? updates[updates.length - 1].id : void 0;
|
|
58459
58566
|
/**
|
|
@@ -60135,7 +60242,7 @@ window.__ModuleLoader__.load({
|
|
|
60135
60242
|
try {
|
|
60136
60243
|
return ctx.locale.bind(NS_PROGRESS_UPDATES)("progressTitle");
|
|
60137
60244
|
} catch {
|
|
60138
|
-
return zh$
|
|
60245
|
+
return zh$2.progressTitle;
|
|
60139
60246
|
}
|
|
60140
60247
|
},
|
|
60141
60248
|
guide: [{
|
|
@@ -60145,14 +60252,14 @@ window.__ModuleLoader__.load({
|
|
|
60145
60252
|
try {
|
|
60146
60253
|
return ctx.locale.bind(NS_PROGRESS_UPDATES)("progressTitle");
|
|
60147
60254
|
} catch {
|
|
60148
|
-
return zh$
|
|
60255
|
+
return zh$2.progressTitle;
|
|
60149
60256
|
}
|
|
60150
60257
|
},
|
|
60151
60258
|
description: () => {
|
|
60152
60259
|
try {
|
|
60153
60260
|
return ctx.locale.bind(NS_PROGRESS_UPDATES)("progressGuideNote");
|
|
60154
60261
|
} catch {
|
|
60155
|
-
return zh$
|
|
60262
|
+
return zh$2.progressGuideNote;
|
|
60156
60263
|
}
|
|
60157
60264
|
},
|
|
60158
60265
|
icon: ProgressUpdatesArtwork
|
|
@@ -60230,7 +60337,7 @@ window.__ModuleLoader__.load({
|
|
|
60230
60337
|
try {
|
|
60231
60338
|
return ctx.locale.bind(NS_PROGRESS_UPDATES)("navTitle");
|
|
60232
60339
|
} catch {
|
|
60233
|
-
return zh$
|
|
60340
|
+
return zh$2.navTitle;
|
|
60234
60341
|
}
|
|
60235
60342
|
},
|
|
60236
60343
|
locale: NS_PROGRESS_UPDATES,
|
|
@@ -60278,7 +60385,7 @@ window.__ModuleLoader__.load({
|
|
|
60278
60385
|
/** 这张表的 `data-plugin-css` 子名。 */
|
|
60279
60386
|
const STYLE_NAME$1 = "progress-updates";
|
|
60280
60387
|
/** 设置卡片与面板的样式全文。 */
|
|
60281
|
-
const CSS$
|
|
60388
|
+
const CSS$2 = `
|
|
60282
60389
|
.dsh-progress-overview{display:flex;flex-direction:column;min-width:0}
|
|
60283
60390
|
.dsh-progress-hint{color:var(--dsw-alias-label-secondary,#5d5c52);font-size:13px;line-height:1.55;margin:0 0 14px}
|
|
60284
60391
|
.dsh-progress-cards{border-top:0.5px solid var(--dsw-alias-border-l2,#eceadf)}
|
|
@@ -60313,7 +60420,7 @@ window.__ModuleLoader__.load({
|
|
|
60313
60420
|
* @returns 空操作释放函数(与邻居同形)。
|
|
60314
60421
|
*/
|
|
60315
60422
|
function installProgressUpdatesStyles() {
|
|
60316
|
-
return installPluginStyle(STYLE_NAME$1, CSS$
|
|
60423
|
+
return installPluginStyle(STYLE_NAME$1, CSS$2);
|
|
60317
60424
|
}
|
|
60318
60425
|
//#endregion
|
|
60319
60426
|
//#region src/client/workbuddy/WorkBuddyComposerQuota.tsx
|
|
@@ -60379,12 +60486,12 @@ window.__ModuleLoader__.load({
|
|
|
60379
60486
|
providerId: "workbuddy-subscription",
|
|
60380
60487
|
readStatus: (refresh) => refresh ? api.post("/quota") : api.get("/status"),
|
|
60381
60488
|
selectFacts: selectBadgeFacts,
|
|
60382
|
-
label: useLineDict(NS_WORKBUDDY, zh$
|
|
60489
|
+
label: useLineDict(NS_WORKBUDDY, zh$7).composerLabel
|
|
60383
60490
|
});
|
|
60384
60491
|
}
|
|
60385
60492
|
//#endregion
|
|
60386
60493
|
//#region src/client/workbuddy/styles.ts
|
|
60387
|
-
const STYLE_ID$
|
|
60494
|
+
const STYLE_ID$4 = "dsh-workbuddy-settings-style";
|
|
60388
60495
|
/**
|
|
60389
60496
|
* WorkBuddy-only additions to the shared settings design system.
|
|
60390
60497
|
*
|
|
@@ -60438,11 +60545,11 @@ window.__ModuleLoader__.load({
|
|
|
60438
60545
|
.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}
|
|
60439
60546
|
.dsh-wb-inputrow>input:disabled{opacity:.5}
|
|
60440
60547
|
|
|
60441
|
-
`, STYLE_ID$
|
|
60548
|
+
`, STYLE_ID$4);
|
|
60442
60549
|
}
|
|
60443
60550
|
//#endregion
|
|
60444
60551
|
//#region src/client/qianwen-token-plan/QianwenComposerQuota.tsx
|
|
60445
|
-
function selectQianwenBadgeFacts(status, lookup = (key) => zh$
|
|
60552
|
+
function selectQianwenBadgeFacts(status, lookup = (key) => zh$6[key]) {
|
|
60446
60553
|
const cache = status?.cacheStats;
|
|
60447
60554
|
if (cache === void 0 || cache === null) return null;
|
|
60448
60555
|
const ratio = qianwenCacheHitRatio(cache);
|
|
@@ -60466,7 +60573,7 @@ window.__ModuleLoader__.load({
|
|
|
60466
60573
|
}
|
|
60467
60574
|
//#endregion
|
|
60468
60575
|
//#region src/client/qianwen-token-plan/styles.ts
|
|
60469
|
-
const STYLE_ID$
|
|
60576
|
+
const STYLE_ID$3 = "dsh-qianwen-token-plan-settings-style";
|
|
60470
60577
|
function installQianwenStyles() {
|
|
60471
60578
|
installPluginStyle("qianwen-token-plan", `
|
|
60472
60579
|
/* 输入行与上方 .dsha-row / .dsha-pref-row 的底部分界线保持间距,避免框线重合 */
|
|
@@ -60482,11 +60589,11 @@ window.__ModuleLoader__.load({
|
|
|
60482
60589
|
.dshqw-details>summary{color:var(--dsw-alias-label-secondary);cursor:pointer;font-size:12px;list-style:none}
|
|
60483
60590
|
.dshqw-details>p{color:var(--dsw-alias-label-tertiary);font-size:12px;line-height:1.55;margin:9px 0 0}
|
|
60484
60591
|
.dshqw-model-meta{color:var(--dsw-alias-label-tertiary);font-size:11px;margin-left:5px}
|
|
60485
|
-
`, STYLE_ID$
|
|
60592
|
+
`, STYLE_ID$3);
|
|
60486
60593
|
}
|
|
60487
60594
|
//#endregion
|
|
60488
60595
|
//#region src/client/relayone/RelayOneComposerQuota.tsx
|
|
60489
|
-
function selectRelayOneBadgeFacts(status, lookup = (key) => zh$
|
|
60596
|
+
function selectRelayOneBadgeFacts(status, lookup = (key) => zh$5[key]) {
|
|
60490
60597
|
if (status === null || !status.authenticated || status.quota === void 0) return null;
|
|
60491
60598
|
const quota = status.quota;
|
|
60492
60599
|
const text = relayOneQuotaText(quota);
|
|
@@ -60516,7 +60623,7 @@ window.__ModuleLoader__.load({
|
|
|
60516
60623
|
}
|
|
60517
60624
|
//#endregion
|
|
60518
60625
|
//#region src/client/relayone/styles.ts
|
|
60519
|
-
const STYLE_ID$
|
|
60626
|
+
const STYLE_ID$2 = "dsh-relayone-settings-style";
|
|
60520
60627
|
function installRelayOneStyles() {
|
|
60521
60628
|
installPluginStyle("relayone", `
|
|
60522
60629
|
.dshro-page{display:flex;flex-direction:column;gap:12px}
|
|
@@ -60535,7 +60642,244 @@ window.__ModuleLoader__.load({
|
|
|
60535
60642
|
.dshro-media-row{align-items:stretch;flex-direction:column}
|
|
60536
60643
|
.dshro-media-row .dsha-select{max-width:none;min-width:0;width:100%}
|
|
60537
60644
|
}
|
|
60538
|
-
`, STYLE_ID$
|
|
60645
|
+
`, STYLE_ID$2);
|
|
60646
|
+
}
|
|
60647
|
+
//#endregion
|
|
60648
|
+
//#region src/shared/compact-after-turn.ts
|
|
60649
|
+
/**
|
|
60650
|
+
* Wire contract of the one-shot "compact when this turn ends" switch.
|
|
60651
|
+
*
|
|
60652
|
+
* The browser half is a row in the composer's model menu; the Host half watches
|
|
60653
|
+
* the session's agent and runs one manual compaction once the turn that was
|
|
60654
|
+
* running (or the next one) ends. The two halves only share this file.
|
|
60655
|
+
*
|
|
60656
|
+
* @module dsh-chatgpt-subscription/shared/compact-after-turn
|
|
60657
|
+
*/
|
|
60658
|
+
/** Route of the state read (GET `?session=<id>`) and the switch write (POST). */
|
|
60659
|
+
const COMPACT_AFTER_TURN_PATH = "/api/dsh-compact-after-turn/state";
|
|
60660
|
+
//#endregion
|
|
60661
|
+
//#region src/client/compact-after-turn/CompactAfterTurnToggle.tsx
|
|
60662
|
+
/**
|
|
60663
|
+
* The "compact after this turn" row of the composer's model menu.
|
|
60664
|
+
*
|
|
60665
|
+
* The switch is a one-shot owned by the Host (see
|
|
60666
|
+
* `src/host/compact-after-turn/`): turning it on arms the session, the Host
|
|
60667
|
+
* compacts once when the turn ends and then turns it off by itself. The row only
|
|
60668
|
+
* mirrors that state — it polls while the menu is open, because the switch flips
|
|
60669
|
+
* back without the user touching it — and is locked while the compaction runs.
|
|
60670
|
+
*/
|
|
60671
|
+
/** How often the open menu re-reads the state. */
|
|
60672
|
+
const COMPACT_AFTER_TURN_POLL_MS = 1500;
|
|
60673
|
+
var CompactAfterTurnRequestError = class extends Error {
|
|
60674
|
+
code;
|
|
60675
|
+
constructor(code, message) {
|
|
60676
|
+
super(message);
|
|
60677
|
+
this.code = code;
|
|
60678
|
+
}
|
|
60679
|
+
};
|
|
60680
|
+
async function call(url, init) {
|
|
60681
|
+
const response = await fetch(url, {
|
|
60682
|
+
...init,
|
|
60683
|
+
credentials: "same-origin"
|
|
60684
|
+
});
|
|
60685
|
+
let envelope = null;
|
|
60686
|
+
try {
|
|
60687
|
+
envelope = await response.json();
|
|
60688
|
+
} catch {}
|
|
60689
|
+
if (!response.ok || envelope?.ok !== true || envelope.value === void 0) throw new CompactAfterTurnRequestError(envelope?.error?.code ?? "unknown", envelope?.error?.message ?? `HTTP ${response.status}`);
|
|
60690
|
+
return envelope.value;
|
|
60691
|
+
}
|
|
60692
|
+
const compactAfterTurnApi = {
|
|
60693
|
+
read: (sessionId) => call(`${COMPACT_AFTER_TURN_PATH}?session=${encodeURIComponent(sessionId)}`),
|
|
60694
|
+
write: (sessionId, armed) => call(COMPACT_AFTER_TURN_PATH, {
|
|
60695
|
+
method: "POST",
|
|
60696
|
+
headers: { "content-type": "application/json" },
|
|
60697
|
+
body: JSON.stringify({
|
|
60698
|
+
sessionId,
|
|
60699
|
+
armed
|
|
60700
|
+
})
|
|
60701
|
+
})
|
|
60702
|
+
};
|
|
60703
|
+
function CompactAfterTurnToggle({ sessionId, locked, reportFailure, t, api = compactAfterTurnApi }) {
|
|
60704
|
+
const [state, setState] = (0, react.useState)(null);
|
|
60705
|
+
const [pending, setPending] = (0, react.useState)(false);
|
|
60706
|
+
const mounted = (0, react.useRef)(true);
|
|
60707
|
+
const apiRef = (0, react.useRef)(api);
|
|
60708
|
+
apiRef.current = api;
|
|
60709
|
+
const refresh = (0, react.useCallback)(async () => {
|
|
60710
|
+
try {
|
|
60711
|
+
const next = await apiRef.current.read(sessionId);
|
|
60712
|
+
if (mounted.current) setState(next);
|
|
60713
|
+
} catch {}
|
|
60714
|
+
}, [sessionId]);
|
|
60715
|
+
(0, react.useEffect)(() => {
|
|
60716
|
+
mounted.current = true;
|
|
60717
|
+
setState(null);
|
|
60718
|
+
refresh();
|
|
60719
|
+
const timer = window.setInterval(() => {
|
|
60720
|
+
if (document.visibilityState === "visible") refresh();
|
|
60721
|
+
}, COMPACT_AFTER_TURN_POLL_MS);
|
|
60722
|
+
return () => {
|
|
60723
|
+
mounted.current = false;
|
|
60724
|
+
window.clearInterval(timer);
|
|
60725
|
+
};
|
|
60726
|
+
}, [refresh]);
|
|
60727
|
+
if (state === null || state.sessionId !== sessionId) return null;
|
|
60728
|
+
const compacting = state.phase === "compacting";
|
|
60729
|
+
const checked = state.phase !== "off";
|
|
60730
|
+
const disabled = locked || pending || compacting || !state.available && !checked;
|
|
60731
|
+
const toggle = () => {
|
|
60732
|
+
if (disabled) return;
|
|
60733
|
+
setPending(true);
|
|
60734
|
+
apiRef.current.write(sessionId, !checked).then((next) => {
|
|
60735
|
+
if (mounted.current) setState(next);
|
|
60736
|
+
}, (error) => {
|
|
60737
|
+
const code = error !== null && typeof error === "object" ? error.code : void 0;
|
|
60738
|
+
reportFailure(code === "busy" ? t("errorBusy") : code === "unavailable" ? t("unavailable") : t("errorFailed", { message: error instanceof Error ? error.message : String(error) }));
|
|
60739
|
+
refresh();
|
|
60740
|
+
}).finally(() => {
|
|
60741
|
+
if (mounted.current) setPending(false);
|
|
60742
|
+
});
|
|
60743
|
+
};
|
|
60744
|
+
const notes = [t("hint")];
|
|
60745
|
+
if (!state.available) notes.push(t("unavailable"));
|
|
60746
|
+
if (state.last !== null) notes.push(state.last.kind === "compacted" ? t("lastCompacted") : state.last.kind === "nothing" ? t("lastNothing") : t("lastFailed", { detail: state.last.detail ?? "" }));
|
|
60747
|
+
const explanation = notes.join("\n");
|
|
60748
|
+
const stateText = compacting ? t("stateCompacting") : state.phase === "armed" ? t("stateArmed") : "";
|
|
60749
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
60750
|
+
className: "dshcat-row",
|
|
60751
|
+
"data-phase": state.phase,
|
|
60752
|
+
children: [
|
|
60753
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
60754
|
+
className: "dshcat-label",
|
|
60755
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
60756
|
+
className: "dshcat-name",
|
|
60757
|
+
children: t("label")
|
|
60758
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(InfoTip, {
|
|
60759
|
+
label: t("infoLabel"),
|
|
60760
|
+
text: explanation
|
|
60761
|
+
})]
|
|
60762
|
+
}),
|
|
60763
|
+
stateText !== "" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
60764
|
+
className: "dshcat-state",
|
|
60765
|
+
"aria-live": "polite",
|
|
60766
|
+
children: stateText
|
|
60767
|
+
}),
|
|
60768
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
60769
|
+
type: "button",
|
|
60770
|
+
role: "switch",
|
|
60771
|
+
className: "dshcat-switch",
|
|
60772
|
+
"aria-checked": checked,
|
|
60773
|
+
"aria-label": t("label"),
|
|
60774
|
+
"aria-description": explanation,
|
|
60775
|
+
"aria-busy": compacting || void 0,
|
|
60776
|
+
disabled,
|
|
60777
|
+
onClick: toggle
|
|
60778
|
+
})
|
|
60779
|
+
]
|
|
60780
|
+
});
|
|
60781
|
+
}
|
|
60782
|
+
/**
|
|
60783
|
+
* The ⓘ button beside the row's name and its explanation bubble, drawn the way
|
|
60784
|
+
* the host's Tooltip draws one above an anchor: hover (after a short delay) or
|
|
60785
|
+
* keyboard focus shows it, leaving or blurring hides it. The bubble goes under
|
|
60786
|
+
* document.body so the menu card's clipping cannot cut it off.
|
|
60787
|
+
*/
|
|
60788
|
+
function InfoTip({ label, text }) {
|
|
60789
|
+
const [position, setPosition] = (0, react.useState)(null);
|
|
60790
|
+
const timer = (0, react.useRef)(void 0);
|
|
60791
|
+
const anchor = (0, react.useRef)(null);
|
|
60792
|
+
const bubbleId = (0, react.useId)();
|
|
60793
|
+
const show = () => {
|
|
60794
|
+
const rect = anchor.current?.getBoundingClientRect();
|
|
60795
|
+
if (rect !== void 0) setPosition({
|
|
60796
|
+
left: rect.left + rect.width / 2,
|
|
60797
|
+
top: rect.top - 8
|
|
60798
|
+
});
|
|
60799
|
+
};
|
|
60800
|
+
const hide = () => {
|
|
60801
|
+
window.clearTimeout(timer.current);
|
|
60802
|
+
setPosition(null);
|
|
60803
|
+
};
|
|
60804
|
+
(0, react.useEffect)(() => () => window.clearTimeout(timer.current), []);
|
|
60805
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
60806
|
+
ref: anchor,
|
|
60807
|
+
type: "button",
|
|
60808
|
+
className: "dshcat-info",
|
|
60809
|
+
"aria-label": label,
|
|
60810
|
+
"aria-describedby": position === null ? void 0 : bubbleId,
|
|
60811
|
+
onClick: (event) => {
|
|
60812
|
+
event.stopPropagation();
|
|
60813
|
+
},
|
|
60814
|
+
onPointerEnter: () => {
|
|
60815
|
+
window.clearTimeout(timer.current);
|
|
60816
|
+
timer.current = window.setTimeout(show, 300);
|
|
60817
|
+
},
|
|
60818
|
+
onPointerLeave: hide,
|
|
60819
|
+
onFocus: show,
|
|
60820
|
+
onBlur: hide,
|
|
60821
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("svg", {
|
|
60822
|
+
viewBox: "0 0 16 16",
|
|
60823
|
+
width: "12",
|
|
60824
|
+
height: "12",
|
|
60825
|
+
fill: "none",
|
|
60826
|
+
stroke: "currentColor",
|
|
60827
|
+
strokeWidth: "1.4",
|
|
60828
|
+
strokeLinecap: "round",
|
|
60829
|
+
"aria-hidden": "true",
|
|
60830
|
+
children: [
|
|
60831
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("circle", {
|
|
60832
|
+
cx: "8",
|
|
60833
|
+
cy: "8",
|
|
60834
|
+
r: "6.2"
|
|
60835
|
+
}),
|
|
60836
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M8 7.2v3.6" }),
|
|
60837
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("circle", {
|
|
60838
|
+
cx: "8",
|
|
60839
|
+
cy: "5.1",
|
|
60840
|
+
r: "0.3",
|
|
60841
|
+
fill: "currentColor"
|
|
60842
|
+
})
|
|
60843
|
+
]
|
|
60844
|
+
})
|
|
60845
|
+
}), position !== null && (0, react_dom.createPortal)(/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
60846
|
+
id: bubbleId,
|
|
60847
|
+
role: "tooltip",
|
|
60848
|
+
className: "dshcat-tip",
|
|
60849
|
+
style: {
|
|
60850
|
+
left: position.left,
|
|
60851
|
+
top: position.top
|
|
60852
|
+
},
|
|
60853
|
+
children: text
|
|
60854
|
+
}), document.body)] });
|
|
60855
|
+
}
|
|
60856
|
+
//#endregion
|
|
60857
|
+
//#region src/client/compact-after-turn/styles.ts
|
|
60858
|
+
const STYLE_ID$1 = "dsh-compact-after-turn-style";
|
|
60859
|
+
const CSS$1 = `
|
|
60860
|
+
.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%}
|
|
60861
|
+
.dshcat-label{align-items:center;display:inline-flex;flex:1;gap:4px;min-width:0}
|
|
60862
|
+
.dshcat-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
|
|
60863
|
+
.dshcat-info{align-items:center;background:transparent;border:0;border-radius:5px;color:var(--dsw-alias-label-caption,var(--dsw-alias-label-tertiary));cursor:help;display:inline-flex;flex:none;height:20px;justify-content:center;padding:0;position:relative;width:20px;z-index:1}
|
|
60864
|
+
.dshcat-info:hover,.dshcat-info:focus-visible{color:var(--dsw-alias-label-secondary)}
|
|
60865
|
+
.dshcat-info:focus-visible{outline:2px solid var(--dsw-alias-button-info-fill,#397ee8);outline-offset:-2px}
|
|
60866
|
+
.dshcat-tip{animation:dshcat-tip-in .15s ease-in-out;background:var(--dsw-alias-tooltip-bg,rgba(30,30,30,.92));border-radius:var(--dsw-radius-sm,5px);box-sizing:border-box;color:var(--dsw-alias-tooltip-label,#fff);font-size:13px;line-height:20px;max-width:min(50vw,calc(100vw - 24px));overflow-wrap:break-word;padding:3px 7px;pointer-events:none;position:fixed;transform:translate(-50%,-100%);white-space:pre-line;width:max-content;z-index:2147482000}
|
|
60867
|
+
@keyframes dshcat-tip-in{from{opacity:0}}
|
|
60868
|
+
.dshcat-state{color:var(--dsw-alias-label-tertiary);flex:none;font-size:12px}
|
|
60869
|
+
.dshcat-row[data-phase=compacting] .dshcat-state{color:var(--dsw-alias-label-warning,#d58a24)}
|
|
60870
|
+
.dshcat-switch{background:var(--dsw-alias-bg-layer-2,rgba(127,127,127,.18));border:0.5px solid var(--dsw-alias-border-l2,rgba(127,127,127,.3));border-radius:999px;box-sizing:border-box;cursor:pointer;flex:none;height:18px;margin:0;padding:1px;position:static;transition:background-color .15s ease;width:30px}
|
|
60871
|
+
.dshcat-switch::before{background:var(--dsw-alias-switch-thumb,#fff);border-radius:50%;box-shadow:0 1px 2px rgba(0,0,0,.3);content:"";display:block;height:14px;transition:transform .15s ease;width:14px}
|
|
60872
|
+
.dshcat-switch[aria-checked=true]{background:var(--dsw-alias-button-info-fill,#397ee8);border-color:transparent}
|
|
60873
|
+
.dshcat-switch[aria-checked=true]::before{transform:translateX(12px)}
|
|
60874
|
+
.dshcat-switch:disabled{cursor:default;opacity:.5}
|
|
60875
|
+
.dshcat-switch::after{border-radius:var(--dsw-radius-md,6px);content:"";inset:0;position:absolute}
|
|
60876
|
+
.dshcat-switch:focus-visible{outline:none}
|
|
60877
|
+
.dshcat-row:has(.dshcat-switch:focus-visible){background:var(--dsw-alias-interactive-bg-hover)}
|
|
60878
|
+
@media (hover:hover){.dshcat-row:has(.dshcat-switch:not(:disabled)):hover{background:var(--dsw-alias-interactive-bg-hover)}}
|
|
60879
|
+
@media (prefers-reduced-motion:reduce){.dshcat-switch,.dshcat-switch::before{transition:none}.dshcat-tip{animation:none}}
|
|
60880
|
+
`;
|
|
60881
|
+
function installCompactAfterTurnStyles() {
|
|
60882
|
+
return installPluginStyle("compact-after-turn", CSS$1, STYLE_ID$1);
|
|
60539
60883
|
}
|
|
60540
60884
|
//#endregion
|
|
60541
60885
|
//#region src/client/claude-api/styles.ts
|
|
@@ -62973,7 +63317,7 @@ window.__ModuleLoader__.load({
|
|
|
62973
63317
|
/** 头部围栏的开场标记。 */
|
|
62974
63318
|
const MANDATE_FENCE = "```dsh-mandate-v2";
|
|
62975
63319
|
function fallbackTranslate$1(key) {
|
|
62976
|
-
return zh$
|
|
63320
|
+
return zh$3[key];
|
|
62977
63321
|
}
|
|
62978
63322
|
function firstLine$1(text) {
|
|
62979
63323
|
const nl = text.indexOf("\n");
|
|
@@ -63833,7 +64177,7 @@ window.__ModuleLoader__.load({
|
|
|
63833
64177
|
* @module @eddyskywalker/dsh-chatgpt-subscription/client/codemode/CodeRunToolView
|
|
63834
64178
|
*/
|
|
63835
64179
|
function fallbackTranslate(key) {
|
|
63836
|
-
return zh$
|
|
64180
|
+
return zh$20[key] ?? key;
|
|
63837
64181
|
}
|
|
63838
64182
|
function firstLine(text) {
|
|
63839
64183
|
const nl = text.indexOf("\n");
|
|
@@ -64591,92 +64935,94 @@ window.__ModuleLoader__.load({
|
|
|
64591
64935
|
installLineLocale(ctx.locale);
|
|
64592
64936
|
ctx.effect(() => installHostLocaleMirror(ctx.locale), "dsh-chatgpt-subscription: host locale mirror");
|
|
64593
64937
|
installRussianLocale(ctx);
|
|
64594
|
-
ctx.effect(() => ctx.locale.register(NS, dictionaries$
|
|
64938
|
+
ctx.effect(() => ctx.locale.register(NS, dictionaries$20), "dsh-chatgpt-subscription: dictionaries");
|
|
64595
64939
|
ctx.effect(() => installStyles(), "dsh-chatgpt-subscription: styles");
|
|
64596
64940
|
ctx.effect(() => {
|
|
64597
64941
|
installHubStyles();
|
|
64598
64942
|
installModelChecklistStyles();
|
|
64599
64943
|
return () => {};
|
|
64600
64944
|
}, "dsh-chatgpt-subscription: hub styles");
|
|
64601
|
-
ctx.effect(() => ctx.locale.register(NS_CLAUDE, dictionaries$
|
|
64945
|
+
ctx.effect(() => ctx.locale.register(NS_CLAUDE, dictionaries$15), "dsh-claude: dictionaries");
|
|
64602
64946
|
ctx.effect(() => {
|
|
64603
64947
|
installClaudeStyles();
|
|
64604
64948
|
return () => {};
|
|
64605
64949
|
}, "dsh-claude: styles");
|
|
64606
|
-
ctx.effect(() => ctx.locale.register(NS_COMMAND_CODE, dictionaries$
|
|
64607
|
-
ctx.effect(() => ctx.locale.register(NS_KIMI_CODE, dictionaries$
|
|
64950
|
+
ctx.effect(() => ctx.locale.register(NS_COMMAND_CODE, dictionaries$19), "dsh-command-code: dictionaries");
|
|
64951
|
+
ctx.effect(() => ctx.locale.register(NS_KIMI_CODE, dictionaries$18), "dsh-kimi-code: dictionaries");
|
|
64608
64952
|
ctx.effect(() => {
|
|
64609
64953
|
installKimiCodeStyles();
|
|
64610
64954
|
return () => {};
|
|
64611
64955
|
}, "dsh-kimi-code: styles");
|
|
64612
|
-
ctx.effect(() => ctx.locale.register(NS_MINIMAX_CODE, dictionaries$
|
|
64956
|
+
ctx.effect(() => ctx.locale.register(NS_MINIMAX_CODE, dictionaries$17), "dsh-minimax-code: dictionaries");
|
|
64613
64957
|
ctx.effect(() => {
|
|
64614
64958
|
installMinimaxCodeStyles();
|
|
64615
64959
|
return () => {};
|
|
64616
64960
|
}, "dsh-minimax-code: styles");
|
|
64617
|
-
ctx.effect(() => ctx.locale.register(NS_GLM_CODING_PLAN, dictionaries$
|
|
64961
|
+
ctx.effect(() => ctx.locale.register(NS_GLM_CODING_PLAN, dictionaries$16), "dsh-glm-coding-plan: dictionaries");
|
|
64618
64962
|
ctx.effect(() => {
|
|
64619
64963
|
installGlmCodingPlanStyles();
|
|
64620
64964
|
return () => {};
|
|
64621
64965
|
}, "dsh-glm-coding-plan: styles");
|
|
64622
|
-
ctx.effect(() => ctx.locale.register(NS_OLLAMA, dictionaries$
|
|
64623
|
-
ctx.effect(() => ctx.locale.register(NS_ANTIGRAVITY_ACP, dictionaries$
|
|
64966
|
+
ctx.effect(() => ctx.locale.register(NS_OLLAMA, dictionaries$14), "dsh-ollama: dictionaries");
|
|
64967
|
+
ctx.effect(() => ctx.locale.register(NS_ANTIGRAVITY_ACP, dictionaries$13), "dsh-antigravity-acp: dictionaries");
|
|
64624
64968
|
ctx.effect(() => {
|
|
64625
64969
|
installAntigravityAcpStyles();
|
|
64626
64970
|
return () => {};
|
|
64627
64971
|
}, "dsh-antigravity-acp: styles");
|
|
64628
|
-
ctx.effect(() => ctx.locale.register(NS_PROGRESS_UPDATES, dictionaries$
|
|
64972
|
+
ctx.effect(() => ctx.locale.register(NS_PROGRESS_UPDATES, dictionaries$2), "dsh-progress-updates: dictionaries");
|
|
64629
64973
|
ctx.effect(() => {
|
|
64630
64974
|
installProgressUpdatesStyles();
|
|
64631
64975
|
return () => {};
|
|
64632
64976
|
}, "dsh-progress-updates: styles");
|
|
64633
|
-
ctx.effect(() => ctx.locale.register(NS_STEP_CODE, dictionaries$
|
|
64977
|
+
ctx.effect(() => ctx.locale.register(NS_STEP_CODE, dictionaries$11), "dsh-step-code: dictionaries");
|
|
64634
64978
|
ctx.effect(() => {
|
|
64635
64979
|
installStepCodeStyles();
|
|
64636
64980
|
return () => {};
|
|
64637
64981
|
}, "dsh-step-code: styles");
|
|
64638
|
-
ctx.effect(() => ctx.locale.register(NS_CLINE_PASS, dictionaries$
|
|
64982
|
+
ctx.effect(() => ctx.locale.register(NS_CLINE_PASS, dictionaries$10), "dsh-cline-pass: dictionaries");
|
|
64639
64983
|
ctx.effect(() => {
|
|
64640
64984
|
installClinePassStyles();
|
|
64641
64985
|
return () => {};
|
|
64642
64986
|
}, "dsh-cline-pass: styles");
|
|
64643
|
-
ctx.effect(() => ctx.locale.register(NS_QODER, dictionaries$
|
|
64987
|
+
ctx.effect(() => ctx.locale.register(NS_QODER, dictionaries$9), "dsh-qoder: dictionaries");
|
|
64644
64988
|
ctx.effect(() => {
|
|
64645
64989
|
installQoderStyles();
|
|
64646
64990
|
return () => {};
|
|
64647
64991
|
}, "dsh-qoder: styles");
|
|
64648
|
-
ctx.effect(() => ctx.locale.register(NS_OPENDESIGN, dictionaries$
|
|
64992
|
+
ctx.effect(() => ctx.locale.register(NS_OPENDESIGN, dictionaries$8), "dsh-opendesign: dictionaries");
|
|
64649
64993
|
ctx.effect(() => {
|
|
64650
64994
|
installOpenDesignStyles();
|
|
64651
64995
|
return () => {};
|
|
64652
64996
|
}, "dsh-opendesign: styles");
|
|
64653
|
-
ctx.effect(() => ctx.locale.register(NS_WORKBUDDY, dictionaries$
|
|
64997
|
+
ctx.effect(() => ctx.locale.register(NS_WORKBUDDY, dictionaries$7), "dsh-workbuddy: dictionaries");
|
|
64654
64998
|
ctx.effect(() => {
|
|
64655
64999
|
installWorkBuddyStyles();
|
|
64656
65000
|
return () => {};
|
|
64657
65001
|
}, "dsh-workbuddy: styles");
|
|
64658
|
-
ctx.effect(() => ctx.locale.register(NS_QIANWEN, dictionaries$
|
|
65002
|
+
ctx.effect(() => ctx.locale.register(NS_QIANWEN, dictionaries$6), "dsh-qianwen-token-plan: dictionaries");
|
|
64659
65003
|
ctx.effect(() => {
|
|
64660
65004
|
installQianwenStyles();
|
|
64661
65005
|
return () => {};
|
|
64662
65006
|
}, "dsh-qianwen-token-plan: styles");
|
|
64663
|
-
ctx.effect(() => ctx.locale.register(NS_RELAYONE, dictionaries$
|
|
65007
|
+
ctx.effect(() => ctx.locale.register(NS_RELAYONE, dictionaries$5), "dsh-relayone: dictionaries");
|
|
64664
65008
|
ctx.effect(() => {
|
|
64665
65009
|
installRelayOneStyles();
|
|
64666
65010
|
return () => {};
|
|
64667
65011
|
}, "dsh-relayone: styles");
|
|
64668
|
-
ctx.effect(() => ctx.locale.register(
|
|
65012
|
+
ctx.effect(() => ctx.locale.register(NS_COMPACT_AFTER_TURN, dictionaries$1), "dsh-compact-after-turn: dictionaries");
|
|
65013
|
+
ctx.effect(() => installCompactAfterTurnStyles(), "dsh-compact-after-turn: styles");
|
|
65014
|
+
ctx.effect(() => ctx.locale.register(NS_CLAUDE_API, dictionaries$4), "dsh-claude-api: dictionaries");
|
|
64669
65015
|
ctx.effect(() => {
|
|
64670
65016
|
installClaudeApiStyles();
|
|
64671
65017
|
return () => {};
|
|
64672
65018
|
}, "dsh-claude-api: styles");
|
|
64673
|
-
ctx.effect(() => ctx.locale.register(NS_AWS_QUICK, dictionaries$
|
|
65019
|
+
ctx.effect(() => ctx.locale.register(NS_AWS_QUICK, dictionaries$12), "dsh-aws-quick: dictionaries");
|
|
64674
65020
|
ctx.effect(() => {
|
|
64675
65021
|
installAwsQuickStyles();
|
|
64676
65022
|
return () => {};
|
|
64677
65023
|
}, "dsh-aws-quick: styles");
|
|
64678
65024
|
ctx.effect(() => ctx.locale.register(NS_SUBAGENT, dictionaries), "dsh-subagent-settings: dictionaries");
|
|
64679
|
-
ctx.effect(() => ctx.locale.register(NS_DISPATCH_LEDGER, dictionaries$
|
|
65025
|
+
ctx.effect(() => ctx.locale.register(NS_DISPATCH_LEDGER, dictionaries$3), "dsh-dispatch-ledger: dictionaries");
|
|
64680
65026
|
ctx.effect(() => {
|
|
64681
65027
|
installSubagentStyles();
|
|
64682
65028
|
return () => {};
|
|
@@ -64807,6 +65153,18 @@ window.__ModuleLoader__.load({
|
|
|
64807
65153
|
locale: NS_RELAYONE,
|
|
64808
65154
|
inject: (sessionId) => composerBadgeInject(ctx, sessionId)
|
|
64809
65155
|
}, RelayOneComposerQuota));
|
|
65156
|
+
ctx.slots.inject("conversation.input.model.options", () => {
|
|
65157
|
+
try {
|
|
65158
|
+
return ctx.slots.register({
|
|
65159
|
+
name: "conversation.input.model.options",
|
|
65160
|
+
id: "compact-after-turn",
|
|
65161
|
+
locale: NS_COMPACT_AFTER_TURN,
|
|
65162
|
+
inject: (sessionId) => ({ sessionId: String(sessionId) })
|
|
65163
|
+
}, CompactAfterTurnToggle);
|
|
65164
|
+
} catch {
|
|
65165
|
+
return () => {};
|
|
65166
|
+
}
|
|
65167
|
+
});
|
|
64810
65168
|
ctx.slots.inject("tool.call.toolview", () => ctx.slots.register({
|
|
64811
65169
|
name: "tool.call.toolview",
|
|
64812
65170
|
key: CODEX_IMAGE_TOOL_NAME,
|