@eddyskywalker/dsh-chatgpt-subscription 0.63.1 → 0.64.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 +34 -0
- package/lib/client.js +619 -205
- package/lib/client.js.map +1 -1
- package/lib/index.js +127 -23
- package/lib/types/client/dispatch-ledger/MandateToolView.d.ts +75 -0
- package/lib/types/client/dispatch-ledger/MandateToolView.d.ts.map +1 -0
- package/lib/types/client/dispatch-ledger/locales.d.ts +63 -0
- package/lib/types/client/dispatch-ledger/locales.d.ts.map +1 -0
- package/lib/types/client/dispatch-ledger/styles.d.ts +3 -0
- package/lib/types/client/dispatch-ledger/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/locales-ru/dispatch-ledger.d.ts +8 -0
- package/lib/types/client/locales-ru/dispatch-ledger.d.ts.map +1 -0
- package/lib/types/client/locales-ru/index.d.ts.map +1 -1
- package/lib/types/compat.d.ts +1 -1
- package/lib/types/host/dispatch-ledger/guard.d.ts +10 -0
- package/lib/types/host/dispatch-ledger/guard.d.ts.map +1 -1
- package/lib/types/host/dispatch-ledger/ledger.d.ts +31 -9
- package/lib/types/host/dispatch-ledger/ledger.d.ts.map +1 -1
- package/lib/types/host/dispatch-ledger/protocol.d.ts.map +1 -1
- package/lib/types/host/dispatch-ledger/tool.d.ts +18 -0
- package/lib/types/host/dispatch-ledger/tool.d.ts.map +1 -1
- package/lib/types/host/subagent-model-authorization.d.ts +19 -2
- package/lib/types/host/subagent-model-authorization.d.ts.map +1 -1
- package/package.json +1 -1
- package/presets/dispatch/agent.cordis.yml +2 -2
package/lib/client.js
CHANGED
|
@@ -3197,7 +3197,7 @@ window.__ModuleLoader__.load({
|
|
|
3197
3197
|
//#endregion
|
|
3198
3198
|
//#region src/client/antigravity/locales.ts
|
|
3199
3199
|
const NS_ANTIGRAVITY = "dsh-antigravity";
|
|
3200
|
-
const zh$
|
|
3200
|
+
const zh$15 = {
|
|
3201
3201
|
...accountPoolZh,
|
|
3202
3202
|
title: "Antigravity",
|
|
3203
3203
|
pageDesc: "登录 Google Antigravity / Cloud Code Assist,并查看当前账号的共享额度。",
|
|
@@ -3275,7 +3275,7 @@ window.__ModuleLoader__.load({
|
|
|
3275
3275
|
loginFailed: "登录失败",
|
|
3276
3276
|
tokens: "tokens"
|
|
3277
3277
|
};
|
|
3278
|
-
const en$
|
|
3278
|
+
const en$15 = {
|
|
3279
3279
|
...accountPoolEn,
|
|
3280
3280
|
title: "Antigravity",
|
|
3281
3281
|
pageDesc: "Sign in to Google Antigravity / Cloud Code Assist and view shared quotas.",
|
|
@@ -3353,11 +3353,11 @@ window.__ModuleLoader__.load({
|
|
|
3353
3353
|
loginFailed: "Login failed",
|
|
3354
3354
|
tokens: "tokens"
|
|
3355
3355
|
};
|
|
3356
|
-
const dictionaries$
|
|
3357
|
-
zh: zh$
|
|
3358
|
-
"zh-CN": zh$
|
|
3359
|
-
en: en$
|
|
3360
|
-
"en-US": en$
|
|
3356
|
+
const dictionaries$15 = {
|
|
3357
|
+
zh: zh$15,
|
|
3358
|
+
"zh-CN": zh$15,
|
|
3359
|
+
en: en$15,
|
|
3360
|
+
"en-US": en$15
|
|
3361
3361
|
};
|
|
3362
3362
|
//#endregion
|
|
3363
3363
|
//#region src/client/common/line-locale.ts
|
|
@@ -3469,7 +3469,7 @@ window.__ModuleLoader__.load({
|
|
|
3469
3469
|
const [savingModel, setSavingModel] = (0, react.useState)(null);
|
|
3470
3470
|
/** Follow-up poll owed while the host refreshes the quota behind an answer. */
|
|
3471
3471
|
const quotaFollowUp = (0, react.useRef)(null);
|
|
3472
|
-
const t = useLineDict(NS_ANTIGRAVITY, zh$
|
|
3472
|
+
const t = useLineDict(NS_ANTIGRAVITY, zh$15);
|
|
3473
3473
|
const notifyChange = (0, react.useCallback)(() => {
|
|
3474
3474
|
onModelChange?.();
|
|
3475
3475
|
loadModelDirectory?.();
|
|
@@ -4026,7 +4026,7 @@ window.__ModuleLoader__.load({
|
|
|
4026
4026
|
//#endregion
|
|
4027
4027
|
//#region src/client/command-code/locales.ts
|
|
4028
4028
|
const NS_COMMAND_CODE = "dsh-command-code";
|
|
4029
|
-
const zh$
|
|
4029
|
+
const zh$14 = {
|
|
4030
4030
|
...accountPoolZh,
|
|
4031
4031
|
title: "Command Code",
|
|
4032
4032
|
pageDesc: "登录 Command Code,管理可用模型、上下文窗口与额度。",
|
|
@@ -4094,7 +4094,7 @@ window.__ModuleLoader__.load({
|
|
|
4094
4094
|
loginFailed: "登录失败",
|
|
4095
4095
|
tokens: "tokens"
|
|
4096
4096
|
};
|
|
4097
|
-
const en$
|
|
4097
|
+
const en$14 = {
|
|
4098
4098
|
...accountPoolEn,
|
|
4099
4099
|
title: "Command Code",
|
|
4100
4100
|
pageDesc: "Sign in to Command Code and manage models, context windows, and quota.",
|
|
@@ -4162,11 +4162,11 @@ window.__ModuleLoader__.load({
|
|
|
4162
4162
|
loginFailed: "Sign-in failed",
|
|
4163
4163
|
tokens: "tokens"
|
|
4164
4164
|
};
|
|
4165
|
-
const dictionaries$
|
|
4166
|
-
zh: zh$
|
|
4167
|
-
"zh-CN": zh$
|
|
4168
|
-
en: en$
|
|
4169
|
-
"en-US": en$
|
|
4165
|
+
const dictionaries$14 = {
|
|
4166
|
+
zh: zh$14,
|
|
4167
|
+
"zh-CN": zh$14,
|
|
4168
|
+
en: en$14,
|
|
4169
|
+
"en-US": en$14
|
|
4170
4170
|
};
|
|
4171
4171
|
//#endregion
|
|
4172
4172
|
//#region src/client/command-code/CommandCodeSection.tsx
|
|
@@ -4207,7 +4207,7 @@ window.__ModuleLoader__.load({
|
|
|
4207
4207
|
const [apiKey, setApiKey] = (0, react.useState)("");
|
|
4208
4208
|
/** Follow-up poll owed while the host refreshes the quota behind an answer. */
|
|
4209
4209
|
const quotaFollowUp = (0, react.useRef)(null);
|
|
4210
|
-
const t = useLineDict(NS_COMMAND_CODE, zh$
|
|
4210
|
+
const t = useLineDict(NS_COMMAND_CODE, zh$14);
|
|
4211
4211
|
const notifyChange = (0, react.useCallback)(() => {
|
|
4212
4212
|
onModelChange?.();
|
|
4213
4213
|
loadModelDirectory?.();
|
|
@@ -4968,7 +4968,7 @@ window.__ModuleLoader__.load({
|
|
|
4968
4968
|
//#endregion
|
|
4969
4969
|
//#region src/client/kimi-code/locales.ts
|
|
4970
4970
|
const NS_KIMI_CODE = "dsh-kimi-code";
|
|
4971
|
-
const zh$
|
|
4971
|
+
const zh$13 = {
|
|
4972
4972
|
...accountPoolZh,
|
|
4973
4973
|
title: "Kimi Code",
|
|
4974
4974
|
pageDesc: "登录 Kimi Code 订阅,管理模型、思考档位、上下文窗口与额度。",
|
|
@@ -5139,7 +5139,7 @@ window.__ModuleLoader__.load({
|
|
|
5139
5139
|
compactionRouteNoImage: "该模型不接受图片:摘要里的截图会被替换为占位文本。",
|
|
5140
5140
|
compactionRouteEmpty: "没有可用的线路——先登录任意一条线路再回来设置。"
|
|
5141
5141
|
};
|
|
5142
|
-
const en$
|
|
5142
|
+
const en$13 = {
|
|
5143
5143
|
...accountPoolEn,
|
|
5144
5144
|
title: "Kimi Code",
|
|
5145
5145
|
pageDesc: "Sign in to the Kimi Code subscription and manage models, thinking level, context windows, and quota.",
|
|
@@ -5310,11 +5310,11 @@ window.__ModuleLoader__.load({
|
|
|
5310
5310
|
compactionRouteNoImage: "This model takes no images: screenshots become placeholder text in the summary.",
|
|
5311
5311
|
compactionRouteEmpty: "No route is available — sign in to one first."
|
|
5312
5312
|
};
|
|
5313
|
-
const dictionaries$
|
|
5314
|
-
zh: zh$
|
|
5315
|
-
"zh-CN": zh$
|
|
5316
|
-
en: en$
|
|
5317
|
-
"en-US": en$
|
|
5313
|
+
const dictionaries$13 = {
|
|
5314
|
+
zh: zh$13,
|
|
5315
|
+
"zh-CN": zh$13,
|
|
5316
|
+
en: en$13,
|
|
5317
|
+
"en-US": en$13
|
|
5318
5318
|
};
|
|
5319
5319
|
//#endregion
|
|
5320
5320
|
//#region src/shared/kimi-code-contracts.ts
|
|
@@ -5426,7 +5426,7 @@ window.__ModuleLoader__.load({
|
|
|
5426
5426
|
return `${value}x`;
|
|
5427
5427
|
}
|
|
5428
5428
|
function KimiModelCapabilities({ models }) {
|
|
5429
|
-
const t = useLineDict(NS_KIMI_CODE, zh$
|
|
5429
|
+
const t = useLineDict(NS_KIMI_CODE, zh$13);
|
|
5430
5430
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
5431
5431
|
className: "dsha-cap-table",
|
|
5432
5432
|
children: [
|
|
@@ -5896,7 +5896,7 @@ window.__ModuleLoader__.load({
|
|
|
5896
5896
|
statusGeneration.current += 1;
|
|
5897
5897
|
setStatus(next);
|
|
5898
5898
|
}, []);
|
|
5899
|
-
const t = useLineDict(NS_KIMI_CODE, zh$
|
|
5899
|
+
const t = useLineDict(NS_KIMI_CODE, zh$13);
|
|
5900
5900
|
const notifyChange = (0, react.useCallback)(() => {
|
|
5901
5901
|
onModelChange?.();
|
|
5902
5902
|
loadModelDirectory?.();
|
|
@@ -6679,7 +6679,7 @@ window.__ModuleLoader__.load({
|
|
|
6679
6679
|
//#endregion
|
|
6680
6680
|
//#region src/client/minimax-code/locales.ts
|
|
6681
6681
|
const NS_MINIMAX_CODE = "dsh-minimax-code";
|
|
6682
|
-
const zh$
|
|
6682
|
+
const zh$12 = {
|
|
6683
6683
|
...accountPoolZh,
|
|
6684
6684
|
title: "MiniMax Code",
|
|
6685
6685
|
pageDesc: "登录 MiniMax Code 编程订阅(设备码 OAuth),复用本机 MiniMax Code 的登录态,管理账号、连接与模型。",
|
|
@@ -6877,7 +6877,7 @@ window.__ModuleLoader__.load({
|
|
|
6877
6877
|
videoHistoryEncrypted: "已由系统凭据后端加密",
|
|
6878
6878
|
videoHistoryPlain: "本机没有可用的凭据后端,记录为明文"
|
|
6879
6879
|
};
|
|
6880
|
-
const en$
|
|
6880
|
+
const en$12 = {
|
|
6881
6881
|
...accountPoolEn,
|
|
6882
6882
|
title: "MiniMax Code",
|
|
6883
6883
|
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.",
|
|
@@ -7075,11 +7075,11 @@ window.__ModuleLoader__.load({
|
|
|
7075
7075
|
videoHistoryEncrypted: "Encrypted by the platform credential backend",
|
|
7076
7076
|
videoHistoryPlain: "No credential backend on this host; stored as plain text"
|
|
7077
7077
|
};
|
|
7078
|
-
const dictionaries$
|
|
7079
|
-
zh: zh$
|
|
7080
|
-
"zh-CN": zh$
|
|
7081
|
-
en: en$
|
|
7082
|
-
"en-US": en$
|
|
7078
|
+
const dictionaries$12 = {
|
|
7079
|
+
zh: zh$12,
|
|
7080
|
+
"zh-CN": zh$12,
|
|
7081
|
+
en: en$12,
|
|
7082
|
+
"en-US": en$12
|
|
7083
7083
|
};
|
|
7084
7084
|
//#endregion
|
|
7085
7085
|
//#region src/client/minimax-code/useMinimaxCodeSection.ts
|
|
@@ -7093,7 +7093,7 @@ window.__ModuleLoader__.load({
|
|
|
7093
7093
|
* rather than inferred from the JSX.
|
|
7094
7094
|
*/
|
|
7095
7095
|
/** The card's own dictionary; stable identity keeps effect dependencies intact. */
|
|
7096
|
-
const fallbackTranslate$
|
|
7096
|
+
const fallbackTranslate$7 = (key) => zh$12[key];
|
|
7097
7097
|
/**
|
|
7098
7098
|
* The shared pool card's labels, resolved through this card's dictionary.
|
|
7099
7099
|
*
|
|
@@ -7188,7 +7188,7 @@ window.__ModuleLoader__.load({
|
|
|
7188
7188
|
/** Device-code poll cadence. The host owns the real expiry. */
|
|
7189
7189
|
const LOGIN_POLL_INTERVAL_MS$3 = 2e3;
|
|
7190
7190
|
function useMinimaxCodeSection({ onModelChange }) {
|
|
7191
|
-
const t = fallbackTranslate$
|
|
7191
|
+
const t = fallbackTranslate$7;
|
|
7192
7192
|
const [status, setStatus] = (0, react.useState)(null);
|
|
7193
7193
|
const [loading, setLoading] = (0, react.useState)(true);
|
|
7194
7194
|
const [busy, setBusy] = (0, react.useState)(null);
|
|
@@ -8646,7 +8646,7 @@ window.__ModuleLoader__.load({
|
|
|
8646
8646
|
const { status, loading, busy, error, flow, copied, connectionNotice, contextDrafts, savingModel, pool, resetCards, resetNotice, selectedResetCardId } = state;
|
|
8647
8647
|
const { authenticated, account, quota, models, contextModels, overrideCount, poolLabels, resetCardList, resetCardFlows } = derived;
|
|
8648
8648
|
const { login, cancelLogin, copyCode, logout, poolAction, setStrategy, toggleModel, setAllModels, setCheckinEnabled, runCheckinNow, updateEffort, saveContextWindow, resetContextWindow, resetAllContextWindows, refreshQuota, refreshResetCards, selectResetCard, useResetCard, testConnection, updateContextDraft } = actions;
|
|
8649
|
-
const t = fallbackTranslate$
|
|
8649
|
+
const t = fallbackTranslate$7;
|
|
8650
8650
|
const videoDefaultsRef = react.default.useRef(null);
|
|
8651
8651
|
if (videoDefaultsRef.current === null) videoDefaultsRef.current = readVideoDefaults();
|
|
8652
8652
|
const saveVideoDefaults = react.default.useCallback((next) => {
|
|
@@ -9151,7 +9151,7 @@ window.__ModuleLoader__.load({
|
|
|
9151
9151
|
* 键名重合的会被渲染成 ChatGPT 的措辞,不重合的会把键名本身打印出来)。
|
|
9152
9152
|
*/
|
|
9153
9153
|
const NS_GLM_CODING_PLAN = "dsh-glm-coding-plan";
|
|
9154
|
-
const zh$
|
|
9154
|
+
const zh$11 = {
|
|
9155
9155
|
...accountPoolZh,
|
|
9156
9156
|
title: "GLM(ZCode 账号)",
|
|
9157
9157
|
pageDesc: "用 ZCode 账号授权接入 GLM Coding Plan(国区 bigmodel.cn / 国际区 z.ai),管理账号池、套餐额度与模型勾选。两个区域的凭据各自独立,池内可以同时存在两区账号。",
|
|
@@ -9245,7 +9245,7 @@ window.__ModuleLoader__.load({
|
|
|
9245
9245
|
quotaAllowanceUnknown: "未判定",
|
|
9246
9246
|
quotaAllowanceHint: "登录时探活认定的额度来源。「免费体验额度」指新用户注册后自动获得、首次使用起 5 天内每天 800 万 token 的体验额度。"
|
|
9247
9247
|
};
|
|
9248
|
-
const en$
|
|
9248
|
+
const en$11 = {
|
|
9249
9249
|
...accountPoolEn,
|
|
9250
9250
|
title: "GLM (ZCode account)",
|
|
9251
9251
|
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.",
|
|
@@ -9339,11 +9339,11 @@ window.__ModuleLoader__.load({
|
|
|
9339
9339
|
quotaAllowanceUnknown: "Undetermined",
|
|
9340
9340
|
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."
|
|
9341
9341
|
};
|
|
9342
|
-
const dictionaries$
|
|
9343
|
-
zh: zh$
|
|
9344
|
-
"zh-CN": zh$
|
|
9345
|
-
en: en$
|
|
9346
|
-
"en-US": en$
|
|
9342
|
+
const dictionaries$11 = {
|
|
9343
|
+
zh: zh$11,
|
|
9344
|
+
"zh-CN": zh$11,
|
|
9345
|
+
en: en$11,
|
|
9346
|
+
"en-US": en$11
|
|
9347
9347
|
};
|
|
9348
9348
|
/** 一个配额窗口的键到「窗口长度(分钟)」的映射。 */
|
|
9349
9349
|
const QUOTA_WINDOW_MINUTES$1 = {
|
|
@@ -9424,7 +9424,7 @@ window.__ModuleLoader__.load({
|
|
|
9424
9424
|
/** 登录状态机的轮询节奏。真实超时与间隔由 host 拥有,卡片只是跟随。 */
|
|
9425
9425
|
const LOGIN_POLL_INTERVAL_MS$2 = 2e3;
|
|
9426
9426
|
/** 本卡片的字典;身份稳定,依赖它的 effect 才不会每次渲染重建。 */
|
|
9427
|
-
const fallbackTranslate$
|
|
9427
|
+
const fallbackTranslate$6 = (key) => zh$11[key];
|
|
9428
9428
|
/**
|
|
9429
9429
|
* 共享账号池卡片需要的标签集,按本卡片的字典逐键查出来。
|
|
9430
9430
|
*
|
|
@@ -9488,7 +9488,7 @@ window.__ModuleLoader__.load({
|
|
|
9488
9488
|
});
|
|
9489
9489
|
}
|
|
9490
9490
|
function useGlmCodingPlanSection({ onModelChange } = {}) {
|
|
9491
|
-
const t = fallbackTranslate$
|
|
9491
|
+
const t = fallbackTranslate$6;
|
|
9492
9492
|
const [status, setStatus] = (0, react.useState)(null);
|
|
9493
9493
|
const [loading, setLoading] = (0, react.useState)(true);
|
|
9494
9494
|
const [busy, setBusy] = (0, react.useState)(null);
|
|
@@ -9850,7 +9850,7 @@ window.__ModuleLoader__.load({
|
|
|
9850
9850
|
const { status, loading, busy, error, connection, adoptResult, pasteValue, region, pasteOpen, contextDrafts, savingModel } = state;
|
|
9851
9851
|
const { accounts, models, contextModels, overrideCount, login, quota, authenticated, poolLabels } = derived;
|
|
9852
9852
|
const { setRegion, login: startLogin, cancelLogin, submitPaste, setPasteValue, togglePaste, adopt, clearAdoptResult, accountAction, setStrategy, toggleModel, setAllModels, saveContextWindow, resetContextWindow, resetAllContextWindows, updateContextDraft, refreshQuota, refreshCatalog, testConnection } = actions;
|
|
9853
|
-
const t = useLineDict(NS_GLM_CODING_PLAN, zh$
|
|
9853
|
+
const t = useLineDict(NS_GLM_CODING_PLAN, zh$11);
|
|
9854
9854
|
if (loading) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
9855
9855
|
className: "dsha-page",
|
|
9856
9856
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
@@ -10315,7 +10315,7 @@ window.__ModuleLoader__.load({
|
|
|
10315
10315
|
* provider — the same reason every sibling line has one.
|
|
10316
10316
|
*/
|
|
10317
10317
|
const NS_CLAUDE = "dsh-claude";
|
|
10318
|
-
const zh$
|
|
10318
|
+
const zh$10 = {
|
|
10319
10319
|
...accountPoolZh,
|
|
10320
10320
|
title: "Claude(订阅)",
|
|
10321
10321
|
pageDesc: "登录 Claude Pro/Max 订阅,管理模型、思考档位、上下文窗口与额度。",
|
|
@@ -10432,7 +10432,7 @@ window.__ModuleLoader__.load({
|
|
|
10432
10432
|
copy: "复制",
|
|
10433
10433
|
copied: "已复制"
|
|
10434
10434
|
};
|
|
10435
|
-
const en$
|
|
10435
|
+
const en$10 = {
|
|
10436
10436
|
...accountPoolEn,
|
|
10437
10437
|
title: "Claude (subscription)",
|
|
10438
10438
|
pageDesc: "Sign in to a Claude Pro/Max subscription and manage models, thinking levels, context windows and quota.",
|
|
@@ -10549,11 +10549,11 @@ window.__ModuleLoader__.load({
|
|
|
10549
10549
|
copy: "Copy",
|
|
10550
10550
|
copied: "Copied"
|
|
10551
10551
|
};
|
|
10552
|
-
const dictionaries$
|
|
10553
|
-
zh: zh$
|
|
10554
|
-
"zh-CN": zh$
|
|
10555
|
-
en: en$
|
|
10556
|
-
"en-US": en$
|
|
10552
|
+
const dictionaries$10 = {
|
|
10553
|
+
zh: zh$10,
|
|
10554
|
+
"zh-CN": zh$10,
|
|
10555
|
+
en: en$10,
|
|
10556
|
+
"en-US": en$10
|
|
10557
10557
|
};
|
|
10558
10558
|
//#endregion
|
|
10559
10559
|
//#region src/client/claude/useClaudeSection.ts
|
|
@@ -10587,7 +10587,7 @@ window.__ModuleLoader__.load({
|
|
|
10587
10587
|
const [connection, setConnection] = (0, react.useState)(null);
|
|
10588
10588
|
/** Follow-up poll owed while the host refreshes the quota behind an answer. */
|
|
10589
10589
|
const quotaFollowUp = (0, react.useRef)(null);
|
|
10590
|
-
const t = useLineDict(NS_CLAUDE, zh$
|
|
10590
|
+
const t = useLineDict(NS_CLAUDE, zh$10);
|
|
10591
10591
|
const notifyChange = (0, react.useCallback)(() => {
|
|
10592
10592
|
onModelChange?.();
|
|
10593
10593
|
loadModelDirectory?.();
|
|
@@ -11034,11 +11034,11 @@ window.__ModuleLoader__.load({
|
|
|
11034
11034
|
* out here would hide a choice the host would accept and a catalog may expose.
|
|
11035
11035
|
*/
|
|
11036
11036
|
const EFFORT_LABELS$2 = {
|
|
11037
|
-
low: zh$
|
|
11038
|
-
medium: zh$
|
|
11039
|
-
high: zh$
|
|
11040
|
-
xhigh: zh$
|
|
11041
|
-
max: zh$
|
|
11037
|
+
low: zh$10.effortLow,
|
|
11038
|
+
medium: zh$10.effortMedium,
|
|
11039
|
+
high: zh$10.effortHigh,
|
|
11040
|
+
xhigh: zh$10.effortXHigh,
|
|
11041
|
+
max: zh$10.effortMax
|
|
11042
11042
|
};
|
|
11043
11043
|
/** One-line capability summary shown as a model pill's hover title. */
|
|
11044
11044
|
function modelFacts(model, t) {
|
|
@@ -11059,7 +11059,7 @@ window.__ModuleLoader__.load({
|
|
|
11059
11059
|
const { status, loading, busy, error, flow, connection, pasteValue, contextDrafts, savingModel } = state;
|
|
11060
11060
|
const { accounts, hasAdopted, contextModels, overrideCount, quota, windows, poolLabels } = derived;
|
|
11061
11061
|
const { login, cancelLogin, submitPaste, adopt, stopImporting, accountAction, setStrategy, relogin, refreshQuota, refreshCatalog, testConnection, toggleModel, setAllModels, updateEffort, updateCacheTtl, saveContextWindow, resetContextWindow, resetAllContextWindows, updateContextDraft, setPasteValue } = actions;
|
|
11062
|
-
const t = useLineDict(NS_CLAUDE, zh$
|
|
11062
|
+
const t = useLineDict(NS_CLAUDE, zh$10);
|
|
11063
11063
|
if (loading) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
11064
11064
|
className: "dsha-page",
|
|
11065
11065
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
@@ -11650,7 +11650,7 @@ window.__ModuleLoader__.load({
|
|
|
11650
11650
|
//#endregion
|
|
11651
11651
|
//#region src/client/ollama/locales.ts
|
|
11652
11652
|
const NS_OLLAMA = "dsh-ollama";
|
|
11653
|
-
const zh$
|
|
11653
|
+
const zh$9 = {
|
|
11654
11654
|
...accountPoolZh,
|
|
11655
11655
|
relogin: "更换 Key",
|
|
11656
11656
|
needsRelogin: "Key 已失效",
|
|
@@ -11702,7 +11702,7 @@ window.__ModuleLoader__.load({
|
|
|
11702
11702
|
usageNone: "尚无请求",
|
|
11703
11703
|
usageHint: "按 Ollama 每次响应自带的 token 计数本地累加。"
|
|
11704
11704
|
};
|
|
11705
|
-
const en$
|
|
11705
|
+
const en$9 = {
|
|
11706
11706
|
...accountPoolEn,
|
|
11707
11707
|
relogin: "Replace Key",
|
|
11708
11708
|
needsRelogin: "Key rejected",
|
|
@@ -11754,11 +11754,11 @@ window.__ModuleLoader__.load({
|
|
|
11754
11754
|
usageNone: "No requests yet",
|
|
11755
11755
|
usageHint: "Summed locally from the token counts Ollama returns on each response."
|
|
11756
11756
|
};
|
|
11757
|
-
const dictionaries$
|
|
11758
|
-
zh: zh$
|
|
11759
|
-
"zh-CN": zh$
|
|
11760
|
-
en: en$
|
|
11761
|
-
"en-US": en$
|
|
11757
|
+
const dictionaries$9 = {
|
|
11758
|
+
zh: zh$9,
|
|
11759
|
+
"zh-CN": zh$9,
|
|
11760
|
+
en: en$9,
|
|
11761
|
+
"en-US": en$9
|
|
11762
11762
|
};
|
|
11763
11763
|
//#endregion
|
|
11764
11764
|
//#region src/client/ollama/OllamaSection.tsx
|
|
@@ -11884,7 +11884,7 @@ window.__ModuleLoader__.load({
|
|
|
11884
11884
|
const setEffort = (0, react.useCallback)((value) => {
|
|
11885
11885
|
run("effort", () => API$5.setDefaultReasoningEffort(value === "" ? null : value));
|
|
11886
11886
|
}, [run]);
|
|
11887
|
-
const t = useLineDict(NS_OLLAMA, zh$
|
|
11887
|
+
const t = useLineDict(NS_OLLAMA, zh$9);
|
|
11888
11888
|
const pool = status?.pool;
|
|
11889
11889
|
const models = status?.models ?? [];
|
|
11890
11890
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [
|
|
@@ -11999,7 +11999,7 @@ window.__ModuleLoader__.load({
|
|
|
11999
11999
|
className: "dsha-btn",
|
|
12000
12000
|
disabled: busy !== null,
|
|
12001
12001
|
onClick: () => setShowKeyForm(false),
|
|
12002
|
-
children: zh$
|
|
12002
|
+
children: zh$9.deleteAccount
|
|
12003
12003
|
})]
|
|
12004
12004
|
})
|
|
12005
12005
|
]
|
|
@@ -12119,7 +12119,7 @@ window.__ModuleLoader__.load({
|
|
|
12119
12119
|
* 键名重合的会被渲染成 ChatGPT 的措辞,不重合的会把键名本身打印出来)。
|
|
12120
12120
|
*/
|
|
12121
12121
|
const NS_STEP_CODE = "dsh-step-code";
|
|
12122
|
-
const zh$
|
|
12122
|
+
const zh$8 = {
|
|
12123
12123
|
...accountPoolZh,
|
|
12124
12124
|
title: "Step Code(Step Plan 订阅)",
|
|
12125
12125
|
pageDesc: "用 StepFun 的 Step Plan 订阅(国区 api.stepfun.com / 国际区 api.stepfun.ai)或开放平台 API Key 接入,管理账号池、套餐额度、缓存用量与模型勾选。区域是凭据的属性,两区凭据互不通用,因此号池里可以同时存在两区账号。",
|
|
@@ -12288,7 +12288,7 @@ window.__ModuleLoader__.load({
|
|
|
12288
12288
|
cacheEmpty: "本进程还没有任何请求回报过用量,跑一次对话后再看。",
|
|
12289
12289
|
cacheHitRatioUnavailable: "—"
|
|
12290
12290
|
};
|
|
12291
|
-
const en$
|
|
12291
|
+
const en$8 = {
|
|
12292
12292
|
...accountPoolEn,
|
|
12293
12293
|
title: "Step Code (Step Plan subscription)",
|
|
12294
12294
|
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.",
|
|
@@ -12455,11 +12455,11 @@ window.__ModuleLoader__.load({
|
|
|
12455
12455
|
cacheEmpty: "No request on this machine has reported usage yet — run a conversation and look again.",
|
|
12456
12456
|
cacheHitRatioUnavailable: "—"
|
|
12457
12457
|
};
|
|
12458
|
-
const dictionaries$
|
|
12459
|
-
zh: zh$
|
|
12460
|
-
"zh-CN": zh$
|
|
12461
|
-
en: en$
|
|
12462
|
-
"en-US": en$
|
|
12458
|
+
const dictionaries$8 = {
|
|
12459
|
+
zh: zh$8,
|
|
12460
|
+
"zh-CN": zh$8,
|
|
12461
|
+
en: en$8,
|
|
12462
|
+
"en-US": en$8
|
|
12463
12463
|
};
|
|
12464
12464
|
/** 一个额度窗口的键到「窗口长度(分钟)」的映射。窗口名由共享组件按长度本地化。 */
|
|
12465
12465
|
const QUOTA_WINDOW_MINUTES = {
|
|
@@ -12577,7 +12577,7 @@ window.__ModuleLoader__.load({
|
|
|
12577
12577
|
/** 登录状态机的轮询节奏。真实超时与间隔由 host 拥有,卡片只是跟随。 */
|
|
12578
12578
|
const LOGIN_POLL_INTERVAL_MS$1 = 2e3;
|
|
12579
12579
|
/** 本卡片的字典;身份稳定,依赖它的 effect 才不会每次渲染重建。 */
|
|
12580
|
-
const fallbackTranslate$
|
|
12580
|
+
const fallbackTranslate$5 = (key) => zh$8[key];
|
|
12581
12581
|
/**
|
|
12582
12582
|
* 共享账号池卡片需要的标签集,按本卡片的字典逐键查出来。
|
|
12583
12583
|
*
|
|
@@ -12706,7 +12706,7 @@ window.__ModuleLoader__.load({
|
|
|
12706
12706
|
/** 写侧的线路常量;卡片用它渲染说明,而不是渲染一条永远为 0 的进度条。 */
|
|
12707
12707
|
const CACHE_WRITE_NOTE = STEP_CODE_CACHE_WRITE_NOTE;
|
|
12708
12708
|
function useStepCodeSection({ onModelChange } = {}) {
|
|
12709
|
-
const t = fallbackTranslate$
|
|
12709
|
+
const t = fallbackTranslate$5;
|
|
12710
12710
|
const [status, setStatus] = (0, react.useState)(null);
|
|
12711
12711
|
const [loading, setLoading] = (0, react.useState)(true);
|
|
12712
12712
|
const [busy, setBusy] = (0, react.useState)(null);
|
|
@@ -13263,7 +13263,7 @@ window.__ModuleLoader__.load({
|
|
|
13263
13263
|
const { status, loading, busy, error, connection, adoptResult, pasteValue, profile, pasteOpen, contextDrafts, savingModel, quotaAccount, quotaPassword, quotaToken } = state;
|
|
13264
13264
|
const { accounts, models, contextModels, overrideCount, login, quota, authenticated, poolLabels, cache, cacheHitRatio: hitRatio, quotaCredential } = derived;
|
|
13265
13265
|
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;
|
|
13266
|
-
const t = useLineDict(NS_STEP_CODE, zh$
|
|
13266
|
+
const t = useLineDict(NS_STEP_CODE, zh$8);
|
|
13267
13267
|
if (loading) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
13268
13268
|
className: "dsha-page",
|
|
13269
13269
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
@@ -14179,7 +14179,7 @@ window.__ModuleLoader__.load({
|
|
|
14179
14179
|
//#endregion
|
|
14180
14180
|
//#region src/client/cline-pass/locales.ts
|
|
14181
14181
|
const NS_CLINE_PASS = "dsh-cline-pass";
|
|
14182
|
-
const zh$
|
|
14182
|
+
const zh$7 = {
|
|
14183
14183
|
...accountPoolZh,
|
|
14184
14184
|
relogin: "重新登录",
|
|
14185
14185
|
needsRelogin: "登录已失效",
|
|
@@ -14342,7 +14342,7 @@ window.__ModuleLoader__.load({
|
|
|
14342
14342
|
limitRoute: "模型路由按 provider id 抢占:若已有其他插件占用 cline-pass,本卡仍可配置,但请求由对方服务。",
|
|
14343
14343
|
limitQuota: "额度窗口来自网关的 usage-limits 接口;接口失败时卡片保留上一次读数并显示原因。"
|
|
14344
14344
|
};
|
|
14345
|
-
const en$
|
|
14345
|
+
const en$7 = {
|
|
14346
14346
|
...accountPoolEn,
|
|
14347
14347
|
relogin: "Sign in again",
|
|
14348
14348
|
needsRelogin: "Sign-in expired",
|
|
@@ -14505,11 +14505,11 @@ window.__ModuleLoader__.load({
|
|
|
14505
14505
|
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.",
|
|
14506
14506
|
limitQuota: "Quota windows come from the gateway usage-limits endpoint; when it fails the card keeps the previous reading and says why."
|
|
14507
14507
|
};
|
|
14508
|
-
const dictionaries$
|
|
14509
|
-
zh: zh$
|
|
14510
|
-
"zh-CN": zh$
|
|
14511
|
-
en: en$
|
|
14512
|
-
"en-US": en$
|
|
14508
|
+
const dictionaries$7 = {
|
|
14509
|
+
zh: zh$7,
|
|
14510
|
+
"zh-CN": zh$7,
|
|
14511
|
+
en: en$7,
|
|
14512
|
+
"en-US": en$7
|
|
14513
14513
|
};
|
|
14514
14514
|
//#endregion
|
|
14515
14515
|
//#region src/client/cline-pass/ClinePassSection.tsx
|
|
@@ -14636,10 +14636,10 @@ window.__ModuleLoader__.load({
|
|
|
14636
14636
|
API$4.loginStatus(flow.id).then((next) => {
|
|
14637
14637
|
setLoginFlow(next);
|
|
14638
14638
|
if (next.status === "complete") {
|
|
14639
|
-
setNotice(zh$
|
|
14639
|
+
setNotice(zh$7.loginComplete.replace("{account}", next.accountAlias === "" ? "Cline Pass" : next.accountAlias));
|
|
14640
14640
|
setShowKeyForm(false);
|
|
14641
14641
|
loadStatus();
|
|
14642
|
-
} else if (next.status === "failed") setError(zh$
|
|
14642
|
+
} else if (next.status === "failed") setError(zh$7.loginFailed.replace("{detail}", next.error));
|
|
14643
14643
|
}).catch((cause) => setError(detail$1(cause)));
|
|
14644
14644
|
}, Math.max(2, flow.intervalSeconds) * 1e3);
|
|
14645
14645
|
return () => window.clearInterval(timer);
|
|
@@ -14713,7 +14713,7 @@ window.__ModuleLoader__.load({
|
|
|
14713
14713
|
apiKey: trimmed,
|
|
14714
14714
|
...keyBaseURL.trim() === "" ? {} : { baseURL: keyBaseURL.trim() }
|
|
14715
14715
|
}).then((result) => {
|
|
14716
|
-
setNotice(result.authorized ? zh$
|
|
14716
|
+
setNotice(result.authorized ? zh$7.keyTestOk.replace("{ms}", String(Math.round(result.ms))) : zh$7.keyTestFailed.replace("{detail}", result.error));
|
|
14717
14717
|
}).catch((cause) => setError(detail$1(cause))).finally(() => setBusy(null));
|
|
14718
14718
|
}, [key, keyBaseURL]);
|
|
14719
14719
|
const testStored = (0, react.useCallback)((accountId) => {
|
|
@@ -14721,7 +14721,7 @@ window.__ModuleLoader__.load({
|
|
|
14721
14721
|
setError(null);
|
|
14722
14722
|
setNotice(null);
|
|
14723
14723
|
API$4.testKey({ accountId }).then((result) => {
|
|
14724
|
-
setNotice(result.authorized ? zh$
|
|
14724
|
+
setNotice(result.authorized ? zh$7.keyTestOk.replace("{ms}", String(Math.round(result.ms))) : zh$7.keyTestFailed.replace("{detail}", result.error));
|
|
14725
14725
|
}).catch((cause) => setError(detail$1(cause))).finally(() => setBusy(null));
|
|
14726
14726
|
}, []);
|
|
14727
14727
|
const enabledModels = (0, react.useMemo)(() => (status?.models ?? []).filter((model) => model.enabled), [status]);
|
|
@@ -14747,7 +14747,7 @@ window.__ModuleLoader__.load({
|
|
|
14747
14747
|
if (model === void 0) return;
|
|
14748
14748
|
const parsed = parsePositiveCapacity$1(drafts[id] ?? formatCapacity$1(model.contextWindow));
|
|
14749
14749
|
if (parsed === null) {
|
|
14750
|
-
setError(zh$
|
|
14750
|
+
setError(zh$7.error.replace("{detail}", zh$7.defaultContextWindow));
|
|
14751
14751
|
return;
|
|
14752
14752
|
}
|
|
14753
14753
|
run("ctx:" + id, () => API$4.setContextWindow(id, parsed));
|
|
@@ -14769,7 +14769,7 @@ window.__ModuleLoader__.load({
|
|
|
14769
14769
|
}, [run, status]);
|
|
14770
14770
|
const resetAllContext = (0, react.useCallback)(() => {
|
|
14771
14771
|
if (status === null) return;
|
|
14772
|
-
if (typeof window !== "undefined" && !window.confirm(zh$
|
|
14772
|
+
if (typeof window !== "undefined" && !window.confirm(zh$7.contextResetAll)) return;
|
|
14773
14773
|
const overridden = status.models.filter((model) => model.contextWindowOverride !== void 0);
|
|
14774
14774
|
run("ctx-all", async () => {
|
|
14775
14775
|
let next = status;
|
|
@@ -14810,7 +14810,7 @@ window.__ModuleLoader__.load({
|
|
|
14810
14810
|
const refreshUsage = (0, react.useCallback)(() => {
|
|
14811
14811
|
run("usage", async () => {
|
|
14812
14812
|
const outcome = await API$4.readUsage();
|
|
14813
|
-
setNotice(outcome.usage.accounts.some((account) => account.ok) ? "" : zh$
|
|
14813
|
+
setNotice(outcome.usage.accounts.some((account) => account.ok) ? "" : zh$7.usageEmpty);
|
|
14814
14814
|
return outcome.status;
|
|
14815
14815
|
});
|
|
14816
14816
|
}, [run]);
|
|
@@ -14830,7 +14830,7 @@ window.__ModuleLoader__.load({
|
|
|
14830
14830
|
};
|
|
14831
14831
|
const invalid = Object.entries(numbers).find(([, value]) => !Number.isSafeInteger(value) || value < 0);
|
|
14832
14832
|
if (invalid !== void 0) {
|
|
14833
|
-
setError(zh$
|
|
14833
|
+
setError(zh$7.error.replace("{detail}", invalid[0]));
|
|
14834
14834
|
return;
|
|
14835
14835
|
}
|
|
14836
14836
|
setBusy("settings");
|
|
@@ -14842,7 +14842,7 @@ window.__ModuleLoader__.load({
|
|
|
14842
14842
|
}).then((next) => {
|
|
14843
14843
|
applyStatus(next);
|
|
14844
14844
|
setSettingsForm(settingsFormOf$1(next));
|
|
14845
|
-
setNotice(zh$
|
|
14845
|
+
setNotice(zh$7.saved);
|
|
14846
14846
|
}).catch((cause) => setError(detail$1(cause))).finally(() => setBusy(null));
|
|
14847
14847
|
}, [settingsForm, applyStatus]);
|
|
14848
14848
|
const toggleTools = (0, react.useCallback)(() => {
|
|
@@ -14853,10 +14853,10 @@ window.__ModuleLoader__.load({
|
|
|
14853
14853
|
API$4.updateSettings({ exposeTools: value }).then((next) => {
|
|
14854
14854
|
applyStatus(next);
|
|
14855
14855
|
setSettingsForm(settingsFormOf$1(next));
|
|
14856
|
-
setNotice(zh$
|
|
14856
|
+
setNotice(zh$7.restartRequired);
|
|
14857
14857
|
}).catch((cause) => setError(detail$1(cause))).finally(() => setBusy(null));
|
|
14858
14858
|
}, [status, applyStatus]);
|
|
14859
|
-
const t = useLineDict(NS_CLINE_PASS, zh$
|
|
14859
|
+
const t = useLineDict(NS_CLINE_PASS, zh$7);
|
|
14860
14860
|
const errorPrefix = t.error.split("{detail}")[0] ?? "";
|
|
14861
14861
|
const pool = status?.pool;
|
|
14862
14862
|
const accounts = (0, react.useMemo)(() => {
|
|
@@ -16053,7 +16053,7 @@ window.__ModuleLoader__.load({
|
|
|
16053
16053
|
* 'settings.section' 上的那张座位(那张座绑定的是 ChatGPT 的键集)。
|
|
16054
16054
|
*/
|
|
16055
16055
|
const NS_QODER = "dsh-qoder";
|
|
16056
|
-
const zh$
|
|
16056
|
+
const zh$6 = {
|
|
16057
16057
|
modelRowEfforts: "档位 {list}",
|
|
16058
16058
|
modelRowNoEfforts: "无档位",
|
|
16059
16059
|
modelRowOutput: "输出 {cap}",
|
|
@@ -16177,8 +16177,8 @@ window.__ModuleLoader__.load({
|
|
|
16177
16177
|
quotaWindow: "额度窗口"
|
|
16178
16178
|
};
|
|
16179
16179
|
/** 两套字典。 */
|
|
16180
|
-
const dictionaries$
|
|
16181
|
-
zh: zh$
|
|
16180
|
+
const dictionaries$6 = {
|
|
16181
|
+
zh: zh$6,
|
|
16182
16182
|
en: {
|
|
16183
16183
|
modelRowEfforts: "efforts {list}",
|
|
16184
16184
|
modelRowNoEfforts: "no efforts",
|
|
@@ -16379,7 +16379,7 @@ window.__ModuleLoader__.load({
|
|
|
16379
16379
|
/** 登录状态机的轮询节奏。真实超时与间隔由 host 拥有,卡片只是跟随。 */
|
|
16380
16380
|
const LOGIN_POLL_INTERVAL_MS = 2e3;
|
|
16381
16381
|
/** 本卡片的字典;身份稳定,依赖它的 effect 才不会每次渲染重建。 */
|
|
16382
|
-
const fallbackTranslate$
|
|
16382
|
+
const fallbackTranslate$4 = (key) => zh$6[key];
|
|
16383
16383
|
/**
|
|
16384
16384
|
* 共享账号池卡片需要的标签集,按本卡片的字典逐键查出来。
|
|
16385
16385
|
*
|
|
@@ -16478,7 +16478,7 @@ window.__ModuleLoader__.load({
|
|
|
16478
16478
|
return stats.cacheReadTokens / denominator;
|
|
16479
16479
|
}
|
|
16480
16480
|
function useQoderSection({ onModelChange } = {}) {
|
|
16481
|
-
const t = fallbackTranslate$
|
|
16481
|
+
const t = fallbackTranslate$4;
|
|
16482
16482
|
const [status, setStatus] = (0, react.useState)(null);
|
|
16483
16483
|
const [loading, setLoading] = (0, react.useState)(true);
|
|
16484
16484
|
const [busy, setBusy] = (0, react.useState)(null);
|
|
@@ -16945,7 +16945,7 @@ window.__ModuleLoader__.load({
|
|
|
16945
16945
|
* `defaultMaxTokens`),客户端不按模型名推断任何一项。与 OpenDesign 卡同一写法:
|
|
16946
16946
|
* 数据一行,散文进折叠区。
|
|
16947
16947
|
*/
|
|
16948
|
-
function qoderModelRowHint(model, t = zh$
|
|
16948
|
+
function qoderModelRowHint(model, t = zh$6) {
|
|
16949
16949
|
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))}`;
|
|
16950
16950
|
}
|
|
16951
16951
|
function QoderSection({ onModelChange } = {}) {
|
|
@@ -16953,7 +16953,7 @@ window.__ModuleLoader__.load({
|
|
|
16953
16953
|
const { status, loading, busy, error, connection, adoptResult, pasteValue, region, pasteOpen, contextDrafts, savingModel } = state;
|
|
16954
16954
|
const { accounts, models, contextModels, overrideCount, login, quota, authenticated, poolLabels, cache, cacheHitRatio: hitRatio } = derived;
|
|
16955
16955
|
const { setRegion, login: startLogin, cancelLogin, submitPaste, setPasteValue, togglePaste, adopt, clearAdoptResult, accountAction, setStrategy, toggleModel, setAllModels, saveContextWindow, resetContextWindow, resetAllContextWindows, updateContextDraft, setDefaultReasoningEffort, refreshQuota, refreshCatalog, testConnection } = actions;
|
|
16956
|
-
const t = useLineDict(NS_QODER, zh$
|
|
16956
|
+
const t = useLineDict(NS_QODER, zh$6);
|
|
16957
16957
|
if (loading) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
16958
16958
|
className: "dsha-page",
|
|
16959
16959
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
@@ -17548,7 +17548,7 @@ window.__ModuleLoader__.load({
|
|
|
17548
17548
|
//#endregion
|
|
17549
17549
|
//#region src/client/opendesign/locales.ts
|
|
17550
17550
|
const NS_OPENDESIGN = "dsh-opendesign";
|
|
17551
|
-
const zh$
|
|
17551
|
+
const zh$5 = {
|
|
17552
17552
|
...accountPoolZh,
|
|
17553
17553
|
relogin: "重新登录",
|
|
17554
17554
|
needsRelogin: "登录已失效",
|
|
@@ -17656,7 +17656,7 @@ window.__ModuleLoader__.load({
|
|
|
17656
17656
|
limitRoute: "模型路由按 provider id 抢占:若已有其他插件占用 opendesign,本卡仍可配置,但请求由对方服务。",
|
|
17657
17657
|
limitQuota: "套餐与额度读取只覆盖浏览器授权登录的账号;粘贴的 API Key 没有控制 Key,请在 OpenDesign Cloud 控制台查看用量。"
|
|
17658
17658
|
};
|
|
17659
|
-
const en$
|
|
17659
|
+
const en$5 = {
|
|
17660
17660
|
...accountPoolEn,
|
|
17661
17661
|
relogin: "Add again",
|
|
17662
17662
|
needsRelogin: "Key invalid",
|
|
@@ -17764,11 +17764,11 @@ window.__ModuleLoader__.load({
|
|
|
17764
17764
|
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.",
|
|
17765
17765
|
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."
|
|
17766
17766
|
};
|
|
17767
|
-
const dictionaries$
|
|
17768
|
-
zh: zh$
|
|
17769
|
-
"zh-CN": zh$
|
|
17770
|
-
en: en$
|
|
17771
|
-
"en-US": en$
|
|
17767
|
+
const dictionaries$5 = {
|
|
17768
|
+
zh: zh$5,
|
|
17769
|
+
"zh-CN": zh$5,
|
|
17770
|
+
en: en$5,
|
|
17771
|
+
"en-US": en$5
|
|
17772
17772
|
};
|
|
17773
17773
|
//#endregion
|
|
17774
17774
|
//#region src/client/opendesign/OpenDesignSection.tsx
|
|
@@ -18063,7 +18063,7 @@ window.__ModuleLoader__.load({
|
|
|
18063
18063
|
try {
|
|
18064
18064
|
const outcome = await API$3.readUsage();
|
|
18065
18065
|
setStatus(outcome.status);
|
|
18066
|
-
if (!silent) setNotice(outcome.usage.accounts.some((account) => account.ok) ? "" : zh$
|
|
18066
|
+
if (!silent) setNotice(outcome.usage.accounts.some((account) => account.ok) ? "" : zh$5.usageEmpty);
|
|
18067
18067
|
} catch (cause) {
|
|
18068
18068
|
if (!silent) setError(detail(cause));
|
|
18069
18069
|
}
|
|
@@ -18100,10 +18100,10 @@ window.__ModuleLoader__.load({
|
|
|
18100
18100
|
API$3.loginStatus(flow.id).then((next) => {
|
|
18101
18101
|
setLoginFlow(next);
|
|
18102
18102
|
if (next.status === "complete") {
|
|
18103
|
-
setNotice(zh$
|
|
18103
|
+
setNotice(zh$5.loginComplete.replace("{account}", next.accountAlias === "" ? "OpenDesign" : next.accountAlias));
|
|
18104
18104
|
setShowKeyForm(false);
|
|
18105
18105
|
reload();
|
|
18106
|
-
} else if (next.status === "failed") setError(zh$
|
|
18106
|
+
} else if (next.status === "failed") setError(zh$5.loginFailed.replace("{detail}", next.error));
|
|
18107
18107
|
}).catch((cause) => setError(detail(cause)));
|
|
18108
18108
|
}, Math.max(2, flow.intervalSeconds) * 1e3);
|
|
18109
18109
|
return () => window.clearInterval(timer);
|
|
@@ -18149,7 +18149,7 @@ window.__ModuleLoader__.load({
|
|
|
18149
18149
|
const refreshUsage = (0, react.useCallback)(() => {
|
|
18150
18150
|
run("usage", async () => {
|
|
18151
18151
|
const outcome = await API$3.readUsage();
|
|
18152
|
-
setNotice(outcome.usage.accounts.some((account) => account.ok) ? "" : zh$
|
|
18152
|
+
setNotice(outcome.usage.accounts.some((account) => account.ok) ? "" : zh$5.usageEmpty);
|
|
18153
18153
|
return outcome.status;
|
|
18154
18154
|
});
|
|
18155
18155
|
}, [run]);
|
|
@@ -18184,7 +18184,7 @@ window.__ModuleLoader__.load({
|
|
|
18184
18184
|
apiKey: trimmed,
|
|
18185
18185
|
...keyBaseURL.trim() === "" ? {} : { baseURL: keyBaseURL.trim() }
|
|
18186
18186
|
}).then((result) => {
|
|
18187
|
-
setNotice(result.authorized ? zh$
|
|
18187
|
+
setNotice(result.authorized ? zh$5.keyTestOk.replace("{ms}", String(Math.round(result.ms))).replace("{count}", String(result.modelCount)) : zh$5.keyTestFailed.replace("{detail}", result.error));
|
|
18188
18188
|
}).catch((cause) => setError(detail(cause))).finally(() => setBusy(null));
|
|
18189
18189
|
}, [key, keyBaseURL]);
|
|
18190
18190
|
const testStored = (0, react.useCallback)((accountId) => {
|
|
@@ -18192,7 +18192,7 @@ window.__ModuleLoader__.load({
|
|
|
18192
18192
|
setError(null);
|
|
18193
18193
|
setNotice(null);
|
|
18194
18194
|
API$3.testKey({ accountId }).then((result) => {
|
|
18195
|
-
setNotice(result.authorized ? zh$
|
|
18195
|
+
setNotice(result.authorized ? zh$5.keyTestOk.replace("{ms}", String(Math.round(result.ms))).replace("{count}", String(result.modelCount)) : zh$5.keyTestFailed.replace("{detail}", result.error));
|
|
18196
18196
|
}).catch((cause) => setError(detail(cause))).finally(() => setBusy(null));
|
|
18197
18197
|
}, []);
|
|
18198
18198
|
const enabledModels = (0, react.useMemo)(() => (status?.models ?? []).filter((model) => model.enabled), [status]);
|
|
@@ -18218,7 +18218,7 @@ window.__ModuleLoader__.load({
|
|
|
18218
18218
|
if (model === void 0) return;
|
|
18219
18219
|
const parsed = parsePositiveCapacity$1(drafts[id] ?? formatCapacity$1(model.contextWindow));
|
|
18220
18220
|
if (parsed === null) {
|
|
18221
|
-
setError(zh$
|
|
18221
|
+
setError(zh$5.error.replace("{detail}", zh$5.defaultContextWindow));
|
|
18222
18222
|
return;
|
|
18223
18223
|
}
|
|
18224
18224
|
run("ctx:" + id, () => API$3.setContextWindow(id, parsed));
|
|
@@ -18240,7 +18240,7 @@ window.__ModuleLoader__.load({
|
|
|
18240
18240
|
}, [run, status]);
|
|
18241
18241
|
const resetAllContext = (0, react.useCallback)(() => {
|
|
18242
18242
|
if (status === null) return;
|
|
18243
|
-
if (typeof window !== "undefined" && !window.confirm(zh$
|
|
18243
|
+
if (typeof window !== "undefined" && !window.confirm(zh$5.contextResetAll)) return;
|
|
18244
18244
|
const overridden = status.models.filter((model) => model.contextWindowOverride !== void 0);
|
|
18245
18245
|
run("ctx-all", async () => {
|
|
18246
18246
|
let next = status;
|
|
@@ -18256,7 +18256,7 @@ window.__ModuleLoader__.load({
|
|
|
18256
18256
|
const refreshCatalog = (0, react.useCallback)(() => {
|
|
18257
18257
|
run("catalog", async () => {
|
|
18258
18258
|
const outcome = await API$3.refreshCatalog();
|
|
18259
|
-
setNotice(zh$
|
|
18259
|
+
setNotice(zh$5.catalogSyncedNote.replace("{count}", String(outcome.status.catalogCount)));
|
|
18260
18260
|
return outcome.status;
|
|
18261
18261
|
});
|
|
18262
18262
|
}, [run]);
|
|
@@ -18270,7 +18270,7 @@ window.__ModuleLoader__.load({
|
|
|
18270
18270
|
};
|
|
18271
18271
|
const invalid = Object.entries(numbers).find(([, value]) => !Number.isSafeInteger(value) || value < 0);
|
|
18272
18272
|
if (invalid !== void 0) {
|
|
18273
|
-
setError(zh$
|
|
18273
|
+
setError(zh$5.error.replace("{detail}", invalid[0]));
|
|
18274
18274
|
return;
|
|
18275
18275
|
}
|
|
18276
18276
|
setBusy("settings");
|
|
@@ -18281,10 +18281,10 @@ window.__ModuleLoader__.load({
|
|
|
18281
18281
|
}).then((next) => {
|
|
18282
18282
|
applyStatus(next);
|
|
18283
18283
|
setSettingsForm(settingsFormOf(next));
|
|
18284
|
-
setNotice(zh$
|
|
18284
|
+
setNotice(zh$5.saved);
|
|
18285
18285
|
}).catch((cause) => setError(detail(cause))).finally(() => setBusy(null));
|
|
18286
18286
|
}, [settingsForm, applyStatus]);
|
|
18287
|
-
const t = useLineDict(NS_OPENDESIGN, zh$
|
|
18287
|
+
const t = useLineDict(NS_OPENDESIGN, zh$5);
|
|
18288
18288
|
const errorPrefix = t.error.split("{detail}")[0] ?? "";
|
|
18289
18289
|
const pool = status?.pool;
|
|
18290
18290
|
const accounts = pool?.accounts ?? [];
|
|
@@ -18801,7 +18801,7 @@ window.__ModuleLoader__.load({
|
|
|
18801
18801
|
* control that renders it instead.
|
|
18802
18802
|
*/
|
|
18803
18803
|
const NS_WORKBUDDY = "dsh-workbuddy";
|
|
18804
|
-
const zh$
|
|
18804
|
+
const zh$4 = {
|
|
18805
18805
|
title: "WorkBuddy",
|
|
18806
18806
|
pageDesc: "复用本机 CodeBuddy 桌面端登录态,管理 WorkBuddy(CodeBuddy 订阅)模型、上下文窗口与额度。",
|
|
18807
18807
|
account: "账号",
|
|
@@ -18927,7 +18927,7 @@ window.__ModuleLoader__.load({
|
|
|
18927
18927
|
modelCooldownActive: "模型限流中",
|
|
18928
18928
|
notRoutable: "当前不可路由"
|
|
18929
18929
|
};
|
|
18930
|
-
const en$
|
|
18930
|
+
const en$4 = {
|
|
18931
18931
|
title: "WorkBuddy",
|
|
18932
18932
|
pageDesc: "Reuse the local CodeBuddy desktop sign-in to manage WorkBuddy (CodeBuddy subscription) models, context windows, and quota.",
|
|
18933
18933
|
account: "Account",
|
|
@@ -19053,11 +19053,11 @@ window.__ModuleLoader__.load({
|
|
|
19053
19053
|
modelCooldownActive: "Model parked",
|
|
19054
19054
|
notRoutable: "Not routable right now"
|
|
19055
19055
|
};
|
|
19056
|
-
const dictionaries$
|
|
19057
|
-
zh: zh$
|
|
19058
|
-
"zh-CN": zh$
|
|
19059
|
-
en: en$
|
|
19060
|
-
"en-US": en$
|
|
19056
|
+
const dictionaries$4 = {
|
|
19057
|
+
zh: zh$4,
|
|
19058
|
+
"zh-CN": zh$4,
|
|
19059
|
+
en: en$4,
|
|
19060
|
+
"en-US": en$4
|
|
19061
19061
|
};
|
|
19062
19062
|
//#endregion
|
|
19063
19063
|
//#region src/client/workbuddy/useWorkBuddySection.ts
|
|
@@ -19155,7 +19155,7 @@ window.__ModuleLoader__.load({
|
|
|
19155
19155
|
const quotaFollowUp = (0, react.useRef)(null);
|
|
19156
19156
|
const [contextDrafts, setContextDrafts] = (0, react.useState)({});
|
|
19157
19157
|
const [savingModel, setSavingModel] = (0, react.useState)(null);
|
|
19158
|
-
const t = useLineDict(NS_WORKBUDDY, zh$
|
|
19158
|
+
const t = useLineDict(NS_WORKBUDDY, zh$4);
|
|
19159
19159
|
const notifyChange = (0, react.useCallback)(() => {
|
|
19160
19160
|
onModelChange?.();
|
|
19161
19161
|
loadModelDirectory?.();
|
|
@@ -19789,7 +19789,7 @@ window.__ModuleLoader__.load({
|
|
|
19789
19789
|
const timer = window.setInterval(() => setNow(Date.now()), 1e3);
|
|
19790
19790
|
return () => window.clearInterval(timer);
|
|
19791
19791
|
}, [pausedUntil]);
|
|
19792
|
-
const t = useLineDict(NS_WORKBUDDY, zh$
|
|
19792
|
+
const t = useLineDict(NS_WORKBUDDY, zh$4);
|
|
19793
19793
|
const poolState = poolStateLines(pool, t, now);
|
|
19794
19794
|
const storageLine = poolStorageLine(pool?.storage, t);
|
|
19795
19795
|
const storageUnavailable = pool?.storage === void 0 ? null : poolStorageUnavailableLabel(pool.storage, t);
|
|
@@ -21023,7 +21023,7 @@ window.__ModuleLoader__.load({
|
|
|
21023
21023
|
//#endregion
|
|
21024
21024
|
//#region src/client/locales.ts
|
|
21025
21025
|
const NS = "dsh-chatgpt-subscription";
|
|
21026
|
-
const zh$
|
|
21026
|
+
const zh$3 = {
|
|
21027
21027
|
...accountPoolZh,
|
|
21028
21028
|
title: "ChatGPT",
|
|
21029
21029
|
hubTitle: "订阅服务",
|
|
@@ -21244,8 +21244,8 @@ window.__ModuleLoader__.load({
|
|
|
21244
21244
|
codeRunFailed: "失败",
|
|
21245
21245
|
codeRunStopped: "已停止"
|
|
21246
21246
|
};
|
|
21247
|
-
const dictionaries$
|
|
21248
|
-
zh: zh$
|
|
21247
|
+
const dictionaries$3 = {
|
|
21248
|
+
zh: zh$3,
|
|
21249
21249
|
en: {
|
|
21250
21250
|
...accountPoolEn,
|
|
21251
21251
|
title: "ChatGPT",
|
|
@@ -21554,6 +21554,66 @@ window.__ModuleLoader__.load({
|
|
|
21554
21554
|
};
|
|
21555
21555
|
}
|
|
21556
21556
|
//#endregion
|
|
21557
|
+
//#region src/client/dispatch-ledger/locales.ts
|
|
21558
|
+
/**
|
|
21559
|
+
* 「派发卡片」在 locale 服务里的命名空间。
|
|
21560
|
+
*
|
|
21561
|
+
* 与其余线路同一个命名习惯(`dsh-<线路>`):账单相关的文案自成一表,
|
|
21562
|
+
* 不去占本插件通用字典的键位。
|
|
21563
|
+
*/
|
|
21564
|
+
const NS_DISPATCH_LEDGER = "dsh-dispatch-ledger";
|
|
21565
|
+
/** 中文文案。 */
|
|
21566
|
+
const zh$2 = {
|
|
21567
|
+
mandateTitle: "派发子代理",
|
|
21568
|
+
mandateTitleFork: "派发子代理(继承上下文)",
|
|
21569
|
+
mandatePreparing: "正在组装派发",
|
|
21570
|
+
mandateRunning: "子代理启动中",
|
|
21571
|
+
mandateDone: "已派出",
|
|
21572
|
+
mandateFailed: "派发被拒",
|
|
21573
|
+
mandateExpand: "展开这次派发",
|
|
21574
|
+
mandateCollapse: "收起这次派发",
|
|
21575
|
+
mandateBrief: "工作项",
|
|
21576
|
+
mandateRun: "运行",
|
|
21577
|
+
mandateIdem: "幂等键",
|
|
21578
|
+
mandateRoute: "路由",
|
|
21579
|
+
mandateTask: "任务引用",
|
|
21580
|
+
mandateBoundary: "边界",
|
|
21581
|
+
mandateFollowup: "后续上下文",
|
|
21582
|
+
mandateBody: "任务正文",
|
|
21583
|
+
mandateResult: "结果",
|
|
21584
|
+
mandateRawShow: "原始参数",
|
|
21585
|
+
mandateRawHide: "收起原始参数",
|
|
21586
|
+
mandateNoHeader: "这次调用没有带 mandate 头(仅审计,无法去重)",
|
|
21587
|
+
mandateNoBody: "(没有正文)"
|
|
21588
|
+
};
|
|
21589
|
+
/** 注册进 locale 服务的双语字典。 */
|
|
21590
|
+
const dictionaries$2 = {
|
|
21591
|
+
zh: zh$2,
|
|
21592
|
+
en: {
|
|
21593
|
+
mandateTitle: "Subagent dispatch",
|
|
21594
|
+
mandateTitleFork: "Subagent dispatch (inherits context)",
|
|
21595
|
+
mandatePreparing: "Assembling the dispatch",
|
|
21596
|
+
mandateRunning: "Starting the subagent",
|
|
21597
|
+
mandateDone: "Dispatched",
|
|
21598
|
+
mandateFailed: "Dispatch refused",
|
|
21599
|
+
mandateExpand: "Expand this dispatch",
|
|
21600
|
+
mandateCollapse: "Collapse this dispatch",
|
|
21601
|
+
mandateBrief: "Work item",
|
|
21602
|
+
mandateRun: "Run",
|
|
21603
|
+
mandateIdem: "Idem key",
|
|
21604
|
+
mandateRoute: "Route",
|
|
21605
|
+
mandateTask: "Task refs",
|
|
21606
|
+
mandateBoundary: "Boundary",
|
|
21607
|
+
mandateFollowup: "Follow-up context",
|
|
21608
|
+
mandateBody: "Task body",
|
|
21609
|
+
mandateResult: "Result",
|
|
21610
|
+
mandateRawShow: "Raw arguments",
|
|
21611
|
+
mandateRawHide: "Hide raw arguments",
|
|
21612
|
+
mandateNoHeader: "This call carries no mandate header (audited only, cannot be de-duplicated)",
|
|
21613
|
+
mandateNoBody: "(no body)"
|
|
21614
|
+
}
|
|
21615
|
+
};
|
|
21616
|
+
//#endregion
|
|
21557
21617
|
//#region src/client/progress-updates/locales.ts
|
|
21558
21618
|
/**
|
|
21559
21619
|
* 「进展更新」在 locale 服务里的命名空间。
|
|
@@ -21714,7 +21774,7 @@ window.__ModuleLoader__.load({
|
|
|
21714
21774
|
};
|
|
21715
21775
|
//#endregion
|
|
21716
21776
|
//#region src/client/locales-ru/antigravity.ts
|
|
21717
|
-
const dictionary$
|
|
21777
|
+
const dictionary$14 = {
|
|
21718
21778
|
...accountPoolRu,
|
|
21719
21779
|
title: "Antigravity",
|
|
21720
21780
|
pageDesc: "Войдите в Google Antigravity / Cloud Code Assist и смотрите общую квоту текущего аккаунта.",
|
|
@@ -21801,7 +21861,7 @@ window.__ModuleLoader__.load({
|
|
|
21801
21861
|
* account-pool labels come from `./account-pool.ts`, with the same overrides the
|
|
21802
21862
|
* source applies on top of them.
|
|
21803
21863
|
*/
|
|
21804
|
-
const dictionary$
|
|
21864
|
+
const dictionary$13 = {
|
|
21805
21865
|
...accountPoolRu,
|
|
21806
21866
|
title: "Claude (подписка)",
|
|
21807
21867
|
pageDesc: "Войдите в подписку Claude Pro/Max и управляйте моделями, уровнями рассуждений, контекстными окнами и квотой.",
|
|
@@ -21920,7 +21980,7 @@ window.__ModuleLoader__.load({
|
|
|
21920
21980
|
};
|
|
21921
21981
|
//#endregion
|
|
21922
21982
|
//#region src/client/locales-ru/cline-pass.ts
|
|
21923
|
-
const dictionary$
|
|
21983
|
+
const dictionary$12 = {
|
|
21924
21984
|
...accountPoolRu,
|
|
21925
21985
|
relogin: "Войти заново",
|
|
21926
21986
|
needsRelogin: "Вход истёк",
|
|
@@ -22085,7 +22145,7 @@ window.__ModuleLoader__.load({
|
|
|
22085
22145
|
};
|
|
22086
22146
|
//#endregion
|
|
22087
22147
|
//#region src/client/locales-ru/command-code.ts
|
|
22088
|
-
const dictionary$
|
|
22148
|
+
const dictionary$11 = {
|
|
22089
22149
|
...accountPoolRu,
|
|
22090
22150
|
title: "Command Code",
|
|
22091
22151
|
pageDesc: "Войдите в Command Code и управляйте моделями, контекстными окнами и квотой.",
|
|
@@ -22155,7 +22215,7 @@ window.__ModuleLoader__.load({
|
|
|
22155
22215
|
};
|
|
22156
22216
|
//#endregion
|
|
22157
22217
|
//#region src/client/locales-ru/glm-coding-plan.ts
|
|
22158
|
-
const dictionary$
|
|
22218
|
+
const dictionary$10 = {
|
|
22159
22219
|
...accountPoolRu,
|
|
22160
22220
|
title: "GLM (аккаунт ZCode)",
|
|
22161
22221
|
pageDesc: "Вход аккаунтом ZCode подключает GLM Coding Plan (Китай — bigmodel.cn, международный — z.ai). Здесь же пул аккаунтов, квота тарифа и выбор моделей. Учётные данные двух регионов независимы, поэтому в одном пуле могут быть аккаунты обоих.",
|
|
@@ -22258,7 +22318,7 @@ window.__ModuleLoader__.load({
|
|
|
22258
22318
|
* account-pool labels come from `./account-pool.ts`, with the same overrides the
|
|
22259
22319
|
* source applies on top of them.
|
|
22260
22320
|
*/
|
|
22261
|
-
const dictionary$
|
|
22321
|
+
const dictionary$9 = {
|
|
22262
22322
|
...accountPoolRu,
|
|
22263
22323
|
title: "ChatGPT",
|
|
22264
22324
|
hubTitle: "Подписки",
|
|
@@ -22481,7 +22541,7 @@ window.__ModuleLoader__.load({
|
|
|
22481
22541
|
};
|
|
22482
22542
|
//#endregion
|
|
22483
22543
|
//#region src/client/locales-ru/kimi-code.ts
|
|
22484
|
-
const dictionary$
|
|
22544
|
+
const dictionary$8 = {
|
|
22485
22545
|
...accountPoolRu,
|
|
22486
22546
|
title: "Kimi Code",
|
|
22487
22547
|
pageDesc: "Вход в подписку Kimi Code: модели, уровень рассуждений, контекстные окна и квота.",
|
|
@@ -22654,7 +22714,7 @@ window.__ModuleLoader__.load({
|
|
|
22654
22714
|
};
|
|
22655
22715
|
//#endregion
|
|
22656
22716
|
//#region src/client/locales-ru/minimax-code.ts
|
|
22657
|
-
const dictionary$
|
|
22717
|
+
const dictionary$7 = {
|
|
22658
22718
|
...accountPoolRu,
|
|
22659
22719
|
title: "MiniMax Code",
|
|
22660
22720
|
pageDesc: "Вход в подписку MiniMax Code для программирования (OAuth по коду устройства) с переиспользованием локального входа MiniMax Code: управление аккаунтом, подключением и моделями.",
|
|
@@ -22854,7 +22914,7 @@ window.__ModuleLoader__.load({
|
|
|
22854
22914
|
};
|
|
22855
22915
|
//#endregion
|
|
22856
22916
|
//#region src/client/locales-ru/ollama.ts
|
|
22857
|
-
const dictionary$
|
|
22917
|
+
const dictionary$6 = {
|
|
22858
22918
|
...accountPoolRu,
|
|
22859
22919
|
relogin: "Заменить ключ",
|
|
22860
22920
|
needsRelogin: "Ключ отклонён",
|
|
@@ -22908,7 +22968,7 @@ window.__ModuleLoader__.load({
|
|
|
22908
22968
|
};
|
|
22909
22969
|
//#endregion
|
|
22910
22970
|
//#region src/client/locales-ru/opendesign.ts
|
|
22911
|
-
const dictionary$
|
|
22971
|
+
const dictionary$5 = {
|
|
22912
22972
|
...accountPoolRu,
|
|
22913
22973
|
relogin: "Добавить заново",
|
|
22914
22974
|
needsRelogin: "API-ключ недействителен",
|
|
@@ -23017,6 +23077,31 @@ window.__ModuleLoader__.load({
|
|
|
23017
23077
|
limitQuota: "Тариф и кредиты читаются только у аккаунтов, вошедших через браузер; у вставленного API-ключа контрольного ключа нет, поэтому расход смотрите в консоли OpenDesign Cloud."
|
|
23018
23078
|
};
|
|
23019
23079
|
//#endregion
|
|
23080
|
+
//#region src/client/locales-ru/dispatch-ledger.ts
|
|
23081
|
+
const dictionary$4 = {
|
|
23082
|
+
mandateTitle: "Запуск субагента",
|
|
23083
|
+
mandateTitleFork: "Запуск субагента (с контекстом)",
|
|
23084
|
+
mandatePreparing: "Сборка задания",
|
|
23085
|
+
mandateRunning: "Субагент запускается",
|
|
23086
|
+
mandateDone: "Запущен",
|
|
23087
|
+
mandateFailed: "Запуск отклонён",
|
|
23088
|
+
mandateExpand: "Развернуть запись о запуске",
|
|
23089
|
+
mandateCollapse: "Свернуть запись о запуске",
|
|
23090
|
+
mandateBrief: "Задача",
|
|
23091
|
+
mandateRun: "Запуск",
|
|
23092
|
+
mandateIdem: "Ключ идемпотентности",
|
|
23093
|
+
mandateRoute: "Маршрут",
|
|
23094
|
+
mandateTask: "Ссылки на задачу",
|
|
23095
|
+
mandateBoundary: "Границы",
|
|
23096
|
+
mandateFollowup: "Последующий контекст",
|
|
23097
|
+
mandateBody: "Текст задачи",
|
|
23098
|
+
mandateResult: "Результат",
|
|
23099
|
+
mandateRawShow: "Исходные аргументы",
|
|
23100
|
+
mandateRawHide: "Скрыть исходные аргументы",
|
|
23101
|
+
mandateNoHeader: "У этого вызова нет заголовка мандата (только аудит, без дедупликации)",
|
|
23102
|
+
mandateNoBody: "(нет текста)"
|
|
23103
|
+
};
|
|
23104
|
+
//#endregion
|
|
23020
23105
|
//#region src/client/locales-ru/progress-updates.ts
|
|
23021
23106
|
const dictionary$3 = {
|
|
23022
23107
|
navTitle: "Ход работы",
|
|
@@ -23514,20 +23599,21 @@ window.__ModuleLoader__.load({
|
|
|
23514
23599
|
}
|
|
23515
23600
|
}, "dsh-chatgpt-subscription: ru language");
|
|
23516
23601
|
const dictionaries = [
|
|
23517
|
-
[NS, dictionary$
|
|
23518
|
-
[NS_CLAUDE, dictionary$
|
|
23519
|
-
[NS_ANTIGRAVITY, dictionary$
|
|
23520
|
-
[NS_COMMAND_CODE, dictionary$
|
|
23521
|
-
[NS_KIMI_CODE, dictionary$
|
|
23522
|
-
[NS_MINIMAX_CODE, dictionary$
|
|
23523
|
-
[NS_GLM_CODING_PLAN, dictionary$
|
|
23524
|
-
[NS_OLLAMA, dictionary$
|
|
23602
|
+
[NS, dictionary$9],
|
|
23603
|
+
[NS_CLAUDE, dictionary$13],
|
|
23604
|
+
[NS_ANTIGRAVITY, dictionary$14],
|
|
23605
|
+
[NS_COMMAND_CODE, dictionary$11],
|
|
23606
|
+
[NS_KIMI_CODE, dictionary$8],
|
|
23607
|
+
[NS_MINIMAX_CODE, dictionary$7],
|
|
23608
|
+
[NS_GLM_CODING_PLAN, dictionary$10],
|
|
23609
|
+
[NS_OLLAMA, dictionary$6],
|
|
23525
23610
|
[NS_STEP_CODE, dictionary$1],
|
|
23526
|
-
[NS_CLINE_PASS, dictionary$
|
|
23611
|
+
[NS_CLINE_PASS, dictionary$12],
|
|
23527
23612
|
[NS_QODER, dictionary$2],
|
|
23528
|
-
[NS_OPENDESIGN, dictionary$
|
|
23613
|
+
[NS_OPENDESIGN, dictionary$5],
|
|
23529
23614
|
[NS_PROGRESS_UPDATES, dictionary$3],
|
|
23530
|
-
[NS_WORKBUDDY, dictionary]
|
|
23615
|
+
[NS_WORKBUDDY, dictionary],
|
|
23616
|
+
[NS_DISPATCH_LEDGER, dictionary$4]
|
|
23531
23617
|
];
|
|
23532
23618
|
for (const [ns, dictionary] of dictionaries) ctx.effect(() => {
|
|
23533
23619
|
try {
|
|
@@ -23577,7 +23663,7 @@ window.__ModuleLoader__.load({
|
|
|
23577
23663
|
}
|
|
23578
23664
|
//#endregion
|
|
23579
23665
|
//#region src/client/styles.ts
|
|
23580
|
-
const CSS$
|
|
23666
|
+
const CSS$4 = `
|
|
23581
23667
|
.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}
|
|
23582
23668
|
.dsh-codex-page *{box-sizing:border-box}
|
|
23583
23669
|
/* The pool card's login row holds three entries. They must stay on ONE line: a
|
|
@@ -23733,7 +23819,7 @@ window.__ModuleLoader__.load({
|
|
|
23733
23819
|
* removed with, some other package.
|
|
23734
23820
|
*/
|
|
23735
23821
|
function installStyles() {
|
|
23736
|
-
return installPluginStyle("main", CSS$
|
|
23822
|
+
return installPluginStyle("main", CSS$4);
|
|
23737
23823
|
}
|
|
23738
23824
|
//#endregion
|
|
23739
23825
|
//#region src/client/hub/hub-styles.ts
|
|
@@ -23744,7 +23830,7 @@ window.__ModuleLoader__.load({
|
|
|
23744
23830
|
* common/plugin-style.ts). Colors ride DSH theme tokens, so dark mode needs
|
|
23745
23831
|
* no branch of its own.
|
|
23746
23832
|
*/
|
|
23747
|
-
const CSS$
|
|
23833
|
+
const CSS$3 = `
|
|
23748
23834
|
.dsh-hub-overview{display:flex;flex-direction:column;min-width:0}
|
|
23749
23835
|
.dsh-hub-hint{color:var(--dsw-alias-label-secondary,#5d5c52);font-size:13px;line-height:1.55;margin:0 0 14px}
|
|
23750
23836
|
.dsh-hub-cards{border-top:0.5px solid var(--dsw-alias-border-l2,#eceadf)}
|
|
@@ -23824,7 +23910,7 @@ window.__ModuleLoader__.load({
|
|
|
23824
23910
|
.dsh-hub-detail .dsha-page>header{margin-bottom:4px}
|
|
23825
23911
|
`;
|
|
23826
23912
|
function installHubStyles() {
|
|
23827
|
-
installPluginStyle("hub", CSS$
|
|
23913
|
+
installPluginStyle("hub", CSS$3);
|
|
23828
23914
|
}
|
|
23829
23915
|
//#endregion
|
|
23830
23916
|
//#region src/client/common/model-checklist-styles.ts
|
|
@@ -23833,7 +23919,7 @@ window.__ModuleLoader__.load({
|
|
|
23833
23919
|
* and hover follow the claude-style model picker so the settings list and the
|
|
23834
23920
|
* conversation picker read as one surface.
|
|
23835
23921
|
*/
|
|
23836
|
-
const CSS$
|
|
23922
|
+
const CSS$2 = `
|
|
23837
23923
|
.dsh-mcl{display:flex;flex-direction:column;min-width:0;padding:4px 0 2px}
|
|
23838
23924
|
.dsh-mcl-head{align-items:center;display:flex;justify-content:space-between;min-height:28px;padding:2px 2px 6px}
|
|
23839
23925
|
.dsh-mcl-count{color:var(--dsw-alias-label-caption,#a6a094);font-size:11px;letter-spacing:.02em}
|
|
@@ -23857,7 +23943,7 @@ window.__ModuleLoader__.load({
|
|
|
23857
23943
|
.dsh-mcl-option:hover:not(:disabled) .dsh-mcl-check{border-color:var(--dsw-alias-button-info-fill,#397ee8)}
|
|
23858
23944
|
`;
|
|
23859
23945
|
function installModelChecklistStyles() {
|
|
23860
|
-
installPluginStyle("model-checklist", CSS$
|
|
23946
|
+
installPluginStyle("model-checklist", CSS$2);
|
|
23861
23947
|
}
|
|
23862
23948
|
//#endregion
|
|
23863
23949
|
//#region src/client/antigravity/styles.ts
|
|
@@ -24605,7 +24691,7 @@ window.__ModuleLoader__.load({
|
|
|
24605
24691
|
//#region src/client/minimax-code/MinimaxVideoDocumentBody.tsx
|
|
24606
24692
|
/** 兜底翻译:只在没有 locale 座位时用到。 */
|
|
24607
24693
|
function translate$1(key) {
|
|
24608
|
-
return zh$
|
|
24694
|
+
return zh$12[key] ?? key;
|
|
24609
24695
|
}
|
|
24610
24696
|
/**
|
|
24611
24697
|
* 一个文件地址里的会话与路径。
|
|
@@ -24741,7 +24827,7 @@ window.__ModuleLoader__.load({
|
|
|
24741
24827
|
*/
|
|
24742
24828
|
/** 兜底翻译:只在没有 locale 座位时用到,走同一份 zh 字典。 */
|
|
24743
24829
|
function translate(key) {
|
|
24744
|
-
return zh$
|
|
24830
|
+
return zh$12[key] ?? key;
|
|
24745
24831
|
}
|
|
24746
24832
|
/**
|
|
24747
24833
|
* 一张视频工具卡片。
|
|
@@ -25197,7 +25283,7 @@ window.__ModuleLoader__.load({
|
|
|
25197
25283
|
* 没有快照、没有窗口、或全部窗口都没有百分比时返回 null,即**不渲染胶囊**:
|
|
25198
25284
|
* 契约允许 quota 为 null,装一个占位数字比不显示更像坏了。
|
|
25199
25285
|
*/
|
|
25200
|
-
function selectBadgeFacts$3(status, lookup = (key) => zh$
|
|
25286
|
+
function selectBadgeFacts$3(status, lookup = (key) => zh$11[key]) {
|
|
25201
25287
|
const measured = (status?.quota?.windows ?? []).filter((window) => typeof window.usedPercent === "number" && Number.isFinite(window.usedPercent));
|
|
25202
25288
|
if (measured.length === 0) return null;
|
|
25203
25289
|
const tightest = measured.reduce((best, window) => {
|
|
@@ -25289,7 +25375,7 @@ window.__ModuleLoader__.load({
|
|
|
25289
25375
|
*
|
|
25290
25376
|
* 没有快照、没有窗口、或全部窗口都没有百分比时返回 null(见文件头)。
|
|
25291
25377
|
*/
|
|
25292
|
-
function selectBadgeFacts$2(status, lookup = (key) => zh$
|
|
25378
|
+
function selectBadgeFacts$2(status, lookup = (key) => zh$8[key]) {
|
|
25293
25379
|
const quota = status?.quota;
|
|
25294
25380
|
if (quota === null || quota === void 0) return null;
|
|
25295
25381
|
if (quota.kind !== "windowed") return null;
|
|
@@ -25438,7 +25524,7 @@ window.__ModuleLoader__.load({
|
|
|
25438
25524
|
directory: props.directory,
|
|
25439
25525
|
loadModelDirectory: props.loadModelDirectory,
|
|
25440
25526
|
providerId: "cline-pass",
|
|
25441
|
-
label: zh$
|
|
25527
|
+
label: zh$7.composerLabel,
|
|
25442
25528
|
readStatus: (refresh) => API$1.status(refresh),
|
|
25443
25529
|
selectFacts: selectClinePassFacts
|
|
25444
25530
|
});
|
|
@@ -25534,7 +25620,7 @@ window.__ModuleLoader__.load({
|
|
|
25534
25620
|
* 另外那只可能还剩一大半。所以这里不平均、不取最小剩余,而是取最大已用比例。
|
|
25535
25621
|
* 没有快照、没有桶、或全部桶都没有总额时返回 null(见文件头)。
|
|
25536
25622
|
*/
|
|
25537
|
-
function selectBadgeFacts$1(status, lookup = (key) => zh$
|
|
25623
|
+
function selectBadgeFacts$1(status, lookup = (key) => zh$6[key]) {
|
|
25538
25624
|
const quota = status?.quota;
|
|
25539
25625
|
if (quota === null || quota === void 0) return null;
|
|
25540
25626
|
const measurable = quota.buckets.filter((bucket) => bucket.total !== null && bucket.total > 0 && bucket.used !== null);
|
|
@@ -25544,7 +25630,7 @@ window.__ModuleLoader__.load({
|
|
|
25544
25630
|
const remaining = Math.round((1 - used) * 100);
|
|
25545
25631
|
const unit = tightest.unit !== null && tightest.unit !== "" ? " " + tightest.unit : "";
|
|
25546
25632
|
const bucketLabel = quotaBucketText(tightest.kind, {
|
|
25547
|
-
...zh$
|
|
25633
|
+
...zh$6,
|
|
25548
25634
|
quotaBucketPersonal: lookup("quotaBucketPersonal"),
|
|
25549
25635
|
quotaBucketAddOn: lookup("quotaBucketAddOn"),
|
|
25550
25636
|
quotaBucketOrg: lookup("quotaBucketOrg")
|
|
@@ -25655,7 +25741,7 @@ window.__ModuleLoader__.load({
|
|
|
25655
25741
|
directory: props.directory,
|
|
25656
25742
|
loadModelDirectory: props.loadModelDirectory,
|
|
25657
25743
|
providerId: "opendesign",
|
|
25658
|
-
label: zh$
|
|
25744
|
+
label: zh$5.composerLabel,
|
|
25659
25745
|
readStatus: () => API.status(),
|
|
25660
25746
|
selectFacts: selectOpenDesignFacts
|
|
25661
25747
|
});
|
|
@@ -25676,9 +25762,9 @@ window.__ModuleLoader__.load({
|
|
|
25676
25762
|
* is not), and one decimal is what keeps "1.5 小时" from reading as "2 小时".
|
|
25677
25763
|
*/
|
|
25678
25764
|
function planWindowName(seconds) {
|
|
25679
|
-
if (seconds >= 86400 && seconds % 86400 === 0) return zh$
|
|
25680
|
-
if (seconds >= 3600) return zh$
|
|
25681
|
-
return zh$
|
|
25765
|
+
if (seconds >= 86400 && seconds % 86400 === 0) return zh$5.usageWindowDays.replace("{count}", String(seconds / 86400));
|
|
25766
|
+
if (seconds >= 3600) return zh$5.usageWindowHours.replace("{count}", formatDecimal(seconds / 3600));
|
|
25767
|
+
return zh$5.usageWindowMinutes.replace("{count}", formatDecimal(seconds / 60));
|
|
25682
25768
|
}
|
|
25683
25769
|
/** What a window still has, from the grant and the remainder it states. */
|
|
25684
25770
|
function windowRemaining(limitCredits, remainingCredits) {
|
|
@@ -25711,7 +25797,7 @@ window.__ModuleLoader__.load({
|
|
|
25711
25797
|
const primaryId = status.pool.activeAccountId ?? status.pool.accounts.find((account) => account.isPrimary)?.id;
|
|
25712
25798
|
const reading = readings.find((account) => account.accountId === primaryId) ?? readings[0];
|
|
25713
25799
|
const amount = reading.balanceUsd;
|
|
25714
|
-
const readAt = zh$
|
|
25800
|
+
const readAt = zh$5.usageReadAt.replace("{time}", new Date(reading.fetchedAt).toLocaleTimeString());
|
|
25715
25801
|
const windows = planWindows(reading.codingPlan);
|
|
25716
25802
|
if (windows.length === 0) return {
|
|
25717
25803
|
text: `$${amount}`,
|
|
@@ -25720,8 +25806,8 @@ window.__ModuleLoader__.load({
|
|
|
25720
25806
|
};
|
|
25721
25807
|
const narrowest = windows[0];
|
|
25722
25808
|
return {
|
|
25723
|
-
text: zh$
|
|
25724
|
-
tooltip: `${reading.alias} · ${windows.map((window) => `${window.name} ${zh$
|
|
25809
|
+
text: zh$5.usageWindowRemaining.replace("{remaining}", formatDecimal(narrowest.remaining)),
|
|
25810
|
+
tooltip: `${reading.alias} · ${windows.map((window) => `${window.name} ${zh$5.usageWindowRemaining.replace("{remaining}", formatDecimal(window.remaining))}`).join(" · ")} · ${readAt}`,
|
|
25725
25811
|
level: quotaLevel(narrowest.remaining),
|
|
25726
25812
|
percent: narrowest.remaining
|
|
25727
25813
|
};
|
|
@@ -27549,8 +27635,8 @@ window.__ModuleLoader__.load({
|
|
|
27549
27635
|
}
|
|
27550
27636
|
}
|
|
27551
27637
|
/** 兜底翻译:只在没有 locale 服务时用到(测试、以及菜单渲染早于字典注册)。 */
|
|
27552
|
-
function fallbackTranslate$
|
|
27553
|
-
const template = zh$
|
|
27638
|
+
function fallbackTranslate$3(key, params) {
|
|
27639
|
+
const template = zh$12[key] ?? key;
|
|
27554
27640
|
if (params === void 0) return template;
|
|
27555
27641
|
return template.replace(/\{(\w+)\}/g, (_match, name) => String(params[name] ?? ""));
|
|
27556
27642
|
}
|
|
@@ -27565,7 +27651,7 @@ window.__ModuleLoader__.load({
|
|
|
27565
27651
|
* @returns 一份可直接交给 `commandUi.register` 的贡献。
|
|
27566
27652
|
*/
|
|
27567
27653
|
function createVideoCommand(ctx, options) {
|
|
27568
|
-
const t = options.translate ?? fallbackTranslate$
|
|
27654
|
+
const t = options.translate ?? fallbackTranslate$3;
|
|
27569
27655
|
const defaultsOf = options.defaults ?? (() => normalizeVideoDefaults({}));
|
|
27570
27656
|
return {
|
|
27571
27657
|
name: VIDEO_COMMAND_NAME,
|
|
@@ -27725,7 +27811,7 @@ window.__ModuleLoader__.load({
|
|
|
27725
27811
|
defaults: request?.defaults ?? normalizeVideoDefaults({}),
|
|
27726
27812
|
seedPrompt: request?.seedPrompt ?? "",
|
|
27727
27813
|
listWorkspace,
|
|
27728
|
-
t: fallbackTranslate$
|
|
27814
|
+
t: fallbackTranslate$3
|
|
27729
27815
|
});
|
|
27730
27816
|
};
|
|
27731
27817
|
}
|
|
@@ -27770,7 +27856,7 @@ window.__ModuleLoader__.load({
|
|
|
27770
27856
|
return commandUi.register(createVideoCommand(ctx, {
|
|
27771
27857
|
openForm: openVideoForm,
|
|
27772
27858
|
defaults: () => readVideoDefaults(),
|
|
27773
|
-
translate: fallbackTranslate$
|
|
27859
|
+
translate: fallbackTranslate$3
|
|
27774
27860
|
}));
|
|
27775
27861
|
} catch {
|
|
27776
27862
|
return () => {};
|
|
@@ -54760,7 +54846,7 @@ window.__ModuleLoader__.load({
|
|
|
54760
54846
|
* @param params - `{name}` 模板参数。
|
|
54761
54847
|
* @returns 该键的文案;缺键时回退为键本身。
|
|
54762
54848
|
*/
|
|
54763
|
-
function fallbackTranslate$
|
|
54849
|
+
function fallbackTranslate$2(key, params) {
|
|
54764
54850
|
return interpolate(zh$1[key] ?? key, params);
|
|
54765
54851
|
}
|
|
54766
54852
|
/**
|
|
@@ -54888,7 +54974,7 @@ window.__ModuleLoader__.load({
|
|
|
54888
54974
|
* @param props - 是否展开。
|
|
54889
54975
|
* @returns 装饰性箭头图标。
|
|
54890
54976
|
*/
|
|
54891
|
-
function Chevron$
|
|
54977
|
+
function Chevron$2({ expanded }) {
|
|
54892
54978
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("svg", {
|
|
54893
54979
|
viewBox: "0 0 16 16",
|
|
54894
54980
|
width: "12",
|
|
@@ -55008,7 +55094,7 @@ window.__ModuleLoader__.load({
|
|
|
55008
55094
|
});
|
|
55009
55095
|
},
|
|
55010
55096
|
children: [
|
|
55011
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Chevron$
|
|
55097
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Chevron$2, { expanded }),
|
|
55012
55098
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
55013
55099
|
"data-dsh-part": "update-title",
|
|
55014
55100
|
style: titleStyle$1,
|
|
@@ -55060,7 +55146,7 @@ window.__ModuleLoader__.load({
|
|
|
55060
55146
|
* @returns 面板标题文本。
|
|
55061
55147
|
*/
|
|
55062
55148
|
function ProgressUpdatesTabTitle({ t }) {
|
|
55063
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_jsx_runtime.Fragment, { children: t === void 0 ? fallbackTranslate$
|
|
55149
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_jsx_runtime.Fragment, { children: t === void 0 ? fallbackTranslate$2("progressTitle") : t("progressTitle") });
|
|
55064
55150
|
}
|
|
55065
55151
|
//#endregion
|
|
55066
55152
|
//#region src/client/progress-updates/progress-row.tsx
|
|
@@ -55220,7 +55306,7 @@ window.__ModuleLoader__.load({
|
|
|
55220
55306
|
* @returns 一行进展;标题行常显,正文按交互展开。
|
|
55221
55307
|
*/
|
|
55222
55308
|
function ProgressRow({ block, t }) {
|
|
55223
|
-
const translate = (key) => t === void 0 ? fallbackTranslate$
|
|
55309
|
+
const translate = (key) => t === void 0 ? fallbackTranslate$2(key) : t(key);
|
|
55224
55310
|
const state = isSettled(block) ? block.isError === true ? "error" : "done" : "running";
|
|
55225
55311
|
const { title, message } = progressOfBlock(block);
|
|
55226
55312
|
const heading = title ?? message.split("\n").find((line) => line.trim() !== "") ?? translate("rowPending");
|
|
@@ -55288,7 +55374,7 @@ window.__ModuleLoader__.load({
|
|
|
55288
55374
|
/** 没有表单通道时的快照读取。 */
|
|
55289
55375
|
const NO_SETTINGS_READ = () => NO_SETTINGS_SNAPSHOT;
|
|
55290
55376
|
/** 行尾 chevron,与 hub 卡片同一个形状(14px、1.5 描边)。 */
|
|
55291
|
-
function Chevron() {
|
|
55377
|
+
function Chevron$1() {
|
|
55292
55378
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("svg", {
|
|
55293
55379
|
viewBox: "0 0 16 16",
|
|
55294
55380
|
width: "14",
|
|
@@ -55547,7 +55633,7 @@ window.__ModuleLoader__.load({
|
|
|
55547
55633
|
*/
|
|
55548
55634
|
function ProgressUpdatesSettingsSection(props) {
|
|
55549
55635
|
const { openPanel, close, settings, t } = props;
|
|
55550
|
-
const translate = (key) => t === void 0 ? fallbackTranslate$
|
|
55636
|
+
const translate = (key) => t === void 0 ? fallbackTranslate$2(key) : t(key);
|
|
55551
55637
|
const snapshot = (0, react.useSyncExternalStore)(settings?.subscribe ?? NO_SETTINGS_SUBSCRIBE, settings?.getSnapshot ?? NO_SETTINGS_READ, settings?.getSnapshot ?? NO_SETTINGS_READ);
|
|
55552
55638
|
/** 写入被拒/失败时落在哪一行、说什么。 */
|
|
55553
55639
|
const [failure, setFailure] = (0, react.useState)(void 0);
|
|
@@ -55858,7 +55944,7 @@ window.__ModuleLoader__.load({
|
|
|
55858
55944
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
55859
55945
|
className: "dsh-progress-chevron",
|
|
55860
55946
|
"aria-hidden": "true",
|
|
55861
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Chevron, {})
|
|
55947
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Chevron$1, {})
|
|
55862
55948
|
})]
|
|
55863
55949
|
})
|
|
55864
55950
|
]
|
|
@@ -56621,7 +56707,7 @@ window.__ModuleLoader__.load({
|
|
|
56621
56707
|
/** 这张表的 `data-plugin-css` 子名。 */
|
|
56622
56708
|
const STYLE_NAME$1 = "progress-updates";
|
|
56623
56709
|
/** 设置卡片与面板的样式全文。 */
|
|
56624
|
-
const CSS = `
|
|
56710
|
+
const CSS$1 = `
|
|
56625
56711
|
.dsh-progress-overview{display:flex;flex-direction:column;min-width:0}
|
|
56626
56712
|
.dsh-progress-hint{color:var(--dsw-alias-label-secondary,#5d5c52);font-size:13px;line-height:1.55;margin:0 0 14px}
|
|
56627
56713
|
.dsh-progress-cards{border-top:0.5px solid var(--dsw-alias-border-l2,#eceadf)}
|
|
@@ -56656,7 +56742,7 @@ window.__ModuleLoader__.load({
|
|
|
56656
56742
|
* @returns 空操作释放函数(与邻居同形)。
|
|
56657
56743
|
*/
|
|
56658
56744
|
function installProgressUpdatesStyles() {
|
|
56659
|
-
return installPluginStyle(STYLE_NAME$1, CSS);
|
|
56745
|
+
return installPluginStyle(STYLE_NAME$1, CSS$1);
|
|
56660
56746
|
}
|
|
56661
56747
|
//#endregion
|
|
56662
56748
|
//#region src/client/workbuddy/WorkBuddyComposerQuota.tsx
|
|
@@ -56722,7 +56808,7 @@ window.__ModuleLoader__.load({
|
|
|
56722
56808
|
providerId: "workbuddy-subscription",
|
|
56723
56809
|
readStatus: (refresh) => refresh ? api.post("/quota") : api.get("/status"),
|
|
56724
56810
|
selectFacts: selectBadgeFacts,
|
|
56725
|
-
label: useLineDict(NS_WORKBUDDY, zh$
|
|
56811
|
+
label: useLineDict(NS_WORKBUDDY, zh$4).composerLabel
|
|
56726
56812
|
});
|
|
56727
56813
|
}
|
|
56728
56814
|
//#endregion
|
|
@@ -59172,6 +59258,326 @@ window.__ModuleLoader__.load({
|
|
|
59172
59258
|
return installPluginStyle(STYLE_NAME, SUBAGENT_CSS);
|
|
59173
59259
|
}
|
|
59174
59260
|
//#endregion
|
|
59261
|
+
//#region src/client/dispatch-ledger/MandateToolView.tsx
|
|
59262
|
+
/**
|
|
59263
|
+
* `subagent` / `subagent_fork` 在对话流里的**派发卡片**。
|
|
59264
|
+
*
|
|
59265
|
+
* ## 为什么要有这张卡
|
|
59266
|
+
*
|
|
59267
|
+
* DSH 的通用工具行把调用参数当纯文本铺开,而派发的参数是一段 `dsh-mandate-v2`
|
|
59268
|
+
* 围栏 + JSON 头 + 任务正文:几十行挤在窄栏里,brief / run / 路由 / 边界谁也扫不出来,
|
|
59269
|
+
* 而一旦被守卫拒,拒绝码又埋在那团文本里。这张卡把头部拆成结构,把结果与
|
|
59270
|
+
* `MANDATE_*` 拒绝码单独留在醒目位置。
|
|
59271
|
+
*
|
|
59272
|
+
* ## 一旦占用 key,整行就是我们渲染
|
|
59273
|
+
*
|
|
59274
|
+
* `tool.call.toolview` 是按工具名键控的槽,「占用即替换」。所以**结果文本必须自己画**
|
|
59275
|
+
* (被拒的调用只有那段错误是唯一有用信息),并且保留一个「原始参数」开关:
|
|
59276
|
+
* 出问题时能拿到完整证据,不因为换了呈现而丢信息。
|
|
59277
|
+
*
|
|
59278
|
+
* @module @eddyskywalker/dsh-chatgpt-subscription/client/dispatch-ledger/MandateToolView
|
|
59279
|
+
*/
|
|
59280
|
+
/** 头部围栏的开场标记。 */
|
|
59281
|
+
const MANDATE_FENCE = "```dsh-mandate-v2";
|
|
59282
|
+
function fallbackTranslate$1(key) {
|
|
59283
|
+
return zh$2[key];
|
|
59284
|
+
}
|
|
59285
|
+
function firstLine$1(text) {
|
|
59286
|
+
const nl = text.indexOf("\n");
|
|
59287
|
+
return (nl === -1 ? text : text.slice(0, nl)).trim();
|
|
59288
|
+
}
|
|
59289
|
+
function asText(value) {
|
|
59290
|
+
return typeof value === "string" ? value : "";
|
|
59291
|
+
}
|
|
59292
|
+
function asLines(value) {
|
|
59293
|
+
if (!Array.isArray(value)) return [];
|
|
59294
|
+
return value.filter((entry) => typeof entry === "string" && entry !== "");
|
|
59295
|
+
}
|
|
59296
|
+
/** 从原始参数 JSON 或流式参数视图里读出参数对象。 */
|
|
59297
|
+
function mandateArgsOf(block) {
|
|
59298
|
+
for (const raw of [block.argsRaw, block.call?.argsRaw]) {
|
|
59299
|
+
if (typeof raw !== "string" || raw === "") continue;
|
|
59300
|
+
try {
|
|
59301
|
+
const parsed = JSON.parse(raw);
|
|
59302
|
+
if (typeof parsed === "object" && parsed !== null && !Array.isArray(parsed)) return parsed;
|
|
59303
|
+
} catch {}
|
|
59304
|
+
}
|
|
59305
|
+
const out = {};
|
|
59306
|
+
const readText = block.args?.text;
|
|
59307
|
+
if (typeof readText === "function") for (const key of [
|
|
59308
|
+
"prompt",
|
|
59309
|
+
"description",
|
|
59310
|
+
"provider",
|
|
59311
|
+
"model",
|
|
59312
|
+
"reasoning_effort"
|
|
59313
|
+
]) try {
|
|
59314
|
+
const value = readText.call(block.args, key);
|
|
59315
|
+
if (typeof value === "string" && value !== "") out[key] = value;
|
|
59316
|
+
} catch {}
|
|
59317
|
+
return out;
|
|
59318
|
+
}
|
|
59319
|
+
/**
|
|
59320
|
+
* 拆开 `subagent.prompt`:围栏在最前面时解析头部,其后是任务正文。
|
|
59321
|
+
* @param prompt - 提示词原文。
|
|
59322
|
+
* @returns 头部、正文与原文。
|
|
59323
|
+
*/
|
|
59324
|
+
function parseDispatchPrompt(prompt) {
|
|
59325
|
+
const trimmed = prompt.trimStart();
|
|
59326
|
+
if (!trimmed.startsWith(MANDATE_FENCE) || !trimmed.slice(17).startsWith("\n")) return {
|
|
59327
|
+
header: null,
|
|
59328
|
+
body: trimmed,
|
|
59329
|
+
rawPrompt: prompt
|
|
59330
|
+
};
|
|
59331
|
+
const after = trimmed.slice(18);
|
|
59332
|
+
const close = after.indexOf("\n```");
|
|
59333
|
+
if (close < 0) return {
|
|
59334
|
+
header: null,
|
|
59335
|
+
body: trimmed,
|
|
59336
|
+
rawPrompt: prompt
|
|
59337
|
+
};
|
|
59338
|
+
try {
|
|
59339
|
+
const header = JSON.parse(after.slice(0, close));
|
|
59340
|
+
if (typeof header !== "object" || header === null || Array.isArray(header)) return {
|
|
59341
|
+
header: null,
|
|
59342
|
+
body: trimmed,
|
|
59343
|
+
rawPrompt: prompt
|
|
59344
|
+
};
|
|
59345
|
+
return {
|
|
59346
|
+
header,
|
|
59347
|
+
body: after.slice(close + 1 + 3).replace(/^\n/, ""),
|
|
59348
|
+
rawPrompt: prompt
|
|
59349
|
+
};
|
|
59350
|
+
} catch {
|
|
59351
|
+
return {
|
|
59352
|
+
header: null,
|
|
59353
|
+
body: trimmed,
|
|
59354
|
+
rawPrompt: prompt
|
|
59355
|
+
};
|
|
59356
|
+
}
|
|
59357
|
+
}
|
|
59358
|
+
/** 结果区文本:成功是「started subagent …」,被拒是整段拒绝说明。 */
|
|
59359
|
+
function mandateResultText(block) {
|
|
59360
|
+
return (block.content ?? []).map((entry) => asText(entry.text)).join("\n").trim();
|
|
59361
|
+
}
|
|
59362
|
+
function resolveState$1(phase, block) {
|
|
59363
|
+
if (phase === "preparing" || block.phase === "preparing") return "preparing";
|
|
59364
|
+
if (block.kind !== void 0 || block.isError !== void 0 || phase === "result") return block.isError === true ? "error" : "ok";
|
|
59365
|
+
return "running";
|
|
59366
|
+
}
|
|
59367
|
+
function useFallbackDisclosure$1() {
|
|
59368
|
+
const [expanded, setExpanded] = (0, react.useState)(false);
|
|
59369
|
+
return {
|
|
59370
|
+
expanded,
|
|
59371
|
+
toggle: (0, react.useCallback)(() => {
|
|
59372
|
+
setExpanded((prev) => !prev);
|
|
59373
|
+
}, [])
|
|
59374
|
+
};
|
|
59375
|
+
}
|
|
59376
|
+
function Chevron({ open }) {
|
|
59377
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
59378
|
+
className: "dshc-mandate-caret",
|
|
59379
|
+
"aria-hidden": "true",
|
|
59380
|
+
children: open ? "▾" : "▸"
|
|
59381
|
+
});
|
|
59382
|
+
}
|
|
59383
|
+
/** 派发卡片。 */
|
|
59384
|
+
function MandateToolView(props) {
|
|
59385
|
+
const block = props.block ?? {};
|
|
59386
|
+
const t = props.t ?? fallbackTranslate$1;
|
|
59387
|
+
const { expanded, toggle } = (props.useDisclosure ?? useFallbackDisclosure$1)();
|
|
59388
|
+
const [rawShown, setRawShown] = (0, react.useState)(false);
|
|
59389
|
+
const args = (0, react.useMemo)(() => mandateArgsOf(block), [block]);
|
|
59390
|
+
const prompt = asText(args["prompt"]);
|
|
59391
|
+
const parsed = (0, react.useMemo)(() => parseDispatchPrompt(prompt), [prompt]);
|
|
59392
|
+
const result = (0, react.useMemo)(() => mandateResultText(block), [block]);
|
|
59393
|
+
const state = resolveState$1(props.phase ?? block.phase, block);
|
|
59394
|
+
const header = parsed.header;
|
|
59395
|
+
const brief = header === null ? "" : asText(header["brief_id"]);
|
|
59396
|
+
const run = header === null ? "" : asText(header["run_id"]);
|
|
59397
|
+
const idem = header === null ? "" : asText(header["idem"]);
|
|
59398
|
+
const route = [asText(args["provider"]), asText(args["model"])].filter((part) => part !== "").join("/");
|
|
59399
|
+
const effort = asText(args["reasoning_effort"]);
|
|
59400
|
+
const task = header === null ? [] : asLines(header["task"]);
|
|
59401
|
+
const boundary = header === null ? [] : asLines(header["boundary"]);
|
|
59402
|
+
const followup = header === null ? [] : asLines(header["followup"]);
|
|
59403
|
+
const description = asText(args["description"]);
|
|
59404
|
+
const body = parsed.body;
|
|
59405
|
+
const isFork = (props.toolName ?? block.call?.name ?? "").includes("fork");
|
|
59406
|
+
const statusLabel = state === "preparing" ? t("mandatePreparing") : state === "running" ? t("mandateRunning") : state === "error" ? t("mandateFailed") : t("mandateDone");
|
|
59407
|
+
const summary = state === "error" ? firstLine$1(result) : description !== "" ? description : firstLine$1(body);
|
|
59408
|
+
const expandable = state !== "preparing" && (header !== null || body !== "" || result !== "");
|
|
59409
|
+
const onRowKeyDown = (0, react.useCallback)((event) => {
|
|
59410
|
+
if (!expandable || event.key !== "Enter" && event.key !== " ") return;
|
|
59411
|
+
event.preventDefault();
|
|
59412
|
+
toggle();
|
|
59413
|
+
}, [expandable, toggle]);
|
|
59414
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
59415
|
+
className: "dshc-mandate-root",
|
|
59416
|
+
"data-tool": props.toolName ?? block.call?.name ?? "subagent",
|
|
59417
|
+
"data-state": state,
|
|
59418
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
59419
|
+
className: "dshc-mandate-header",
|
|
59420
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
59421
|
+
className: "dshc-mandate-row",
|
|
59422
|
+
"data-disclosure-row": true,
|
|
59423
|
+
"data-expandable": expandable ? "true" : void 0,
|
|
59424
|
+
role: expandable ? "button" : void 0,
|
|
59425
|
+
tabIndex: expandable ? 0 : void 0,
|
|
59426
|
+
"aria-expanded": expandable ? expanded : void 0,
|
|
59427
|
+
"aria-label": expandable ? expanded ? t("mandateCollapse") : t("mandateExpand") : void 0,
|
|
59428
|
+
onClick: expandable ? toggle : void 0,
|
|
59429
|
+
onKeyDown: expandable ? onRowKeyDown : void 0,
|
|
59430
|
+
children: [
|
|
59431
|
+
expandable && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Chevron, { open: expanded }),
|
|
59432
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
59433
|
+
className: "dshc-mandate-title",
|
|
59434
|
+
children: isFork ? t("mandateTitleFork") : t("mandateTitle")
|
|
59435
|
+
}),
|
|
59436
|
+
summary !== "" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
59437
|
+
className: "dshc-mandate-summary",
|
|
59438
|
+
children: summary
|
|
59439
|
+
}),
|
|
59440
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
59441
|
+
className: "dshc-mandate-state",
|
|
59442
|
+
"data-state": state,
|
|
59443
|
+
children: statusLabel
|
|
59444
|
+
})
|
|
59445
|
+
]
|
|
59446
|
+
})
|
|
59447
|
+
}), expandable && expanded && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
59448
|
+
className: "dshc-mandate-body",
|
|
59449
|
+
children: [
|
|
59450
|
+
header === null ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
59451
|
+
className: "dshc-mandate-note",
|
|
59452
|
+
children: t("mandateNoHeader")
|
|
59453
|
+
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
|
|
59454
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
59455
|
+
className: "dshc-mandate-chips",
|
|
59456
|
+
children: [[
|
|
59457
|
+
[t("mandateBrief"), brief],
|
|
59458
|
+
[t("mandateRun"), run],
|
|
59459
|
+
[t("mandateIdem"), idem]
|
|
59460
|
+
].filter(([, value]) => value !== "").map(([label, value]) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
59461
|
+
className: "dshc-mandate-chip",
|
|
59462
|
+
"data-chip": label,
|
|
59463
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
59464
|
+
className: "dshc-mandate-label",
|
|
59465
|
+
children: label
|
|
59466
|
+
}), value]
|
|
59467
|
+
}, label)), route !== "" && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
59468
|
+
className: "dshc-mandate-chip",
|
|
59469
|
+
"data-chip": "route",
|
|
59470
|
+
children: [
|
|
59471
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
59472
|
+
className: "dshc-mandate-label",
|
|
59473
|
+
children: t("mandateRoute")
|
|
59474
|
+
}),
|
|
59475
|
+
route,
|
|
59476
|
+
effort === "" ? "" : " · " + effort
|
|
59477
|
+
]
|
|
59478
|
+
})]
|
|
59479
|
+
}),
|
|
59480
|
+
task.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
59481
|
+
className: "dshc-mandate-field",
|
|
59482
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
59483
|
+
className: "dshc-mandate-field-key",
|
|
59484
|
+
children: t("mandateTask")
|
|
59485
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("ul", {
|
|
59486
|
+
className: "dshc-mandate-list",
|
|
59487
|
+
children: task.map((entry, index) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("li", { children: entry }, "task-" + index))
|
|
59488
|
+
})]
|
|
59489
|
+
}),
|
|
59490
|
+
boundary.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
59491
|
+
className: "dshc-mandate-field",
|
|
59492
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
59493
|
+
className: "dshc-mandate-field-key",
|
|
59494
|
+
children: t("mandateBoundary")
|
|
59495
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("ul", {
|
|
59496
|
+
className: "dshc-mandate-list",
|
|
59497
|
+
children: boundary.map((entry, index) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("li", { children: entry }, "boundary-" + index))
|
|
59498
|
+
})]
|
|
59499
|
+
}),
|
|
59500
|
+
followup.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
59501
|
+
className: "dshc-mandate-field",
|
|
59502
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
59503
|
+
className: "dshc-mandate-field-key",
|
|
59504
|
+
children: t("mandateFollowup")
|
|
59505
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("ul", {
|
|
59506
|
+
className: "dshc-mandate-list",
|
|
59507
|
+
children: followup.map((entry, index) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("li", { children: entry }, "followup-" + index))
|
|
59508
|
+
})]
|
|
59509
|
+
})
|
|
59510
|
+
] }),
|
|
59511
|
+
body !== "" && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
59512
|
+
className: "dshc-mandate-field",
|
|
59513
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
59514
|
+
className: "dshc-mandate-field-key",
|
|
59515
|
+
children: t("mandateBody")
|
|
59516
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
59517
|
+
className: "dshc-mandate-text",
|
|
59518
|
+
children: body
|
|
59519
|
+
})]
|
|
59520
|
+
}),
|
|
59521
|
+
result !== "" && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
59522
|
+
className: "dshc-mandate-field",
|
|
59523
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
59524
|
+
className: "dshc-mandate-field-key",
|
|
59525
|
+
children: t("mandateResult")
|
|
59526
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
59527
|
+
className: "dshc-mandate-result",
|
|
59528
|
+
"data-error": state === "error" ? "true" : void 0,
|
|
59529
|
+
children: result
|
|
59530
|
+
})]
|
|
59531
|
+
}),
|
|
59532
|
+
prompt !== "" && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
59533
|
+
type: "button",
|
|
59534
|
+
className: "dshc-mandate-raw",
|
|
59535
|
+
"data-role": "raw-toggle",
|
|
59536
|
+
onClick: () => {
|
|
59537
|
+
setRawShown((prev) => !prev);
|
|
59538
|
+
},
|
|
59539
|
+
children: rawShown ? t("mandateRawHide") : t("mandateRawShow")
|
|
59540
|
+
}), rawShown && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("pre", {
|
|
59541
|
+
className: "dshc-mandate-rawtext",
|
|
59542
|
+
"data-role": "raw-text",
|
|
59543
|
+
children: prompt
|
|
59544
|
+
})] })
|
|
59545
|
+
]
|
|
59546
|
+
})]
|
|
59547
|
+
});
|
|
59548
|
+
}
|
|
59549
|
+
//#endregion
|
|
59550
|
+
//#region src/client/dispatch-ledger/styles.ts
|
|
59551
|
+
/** 派发卡片的样式表。 */
|
|
59552
|
+
const CSS = `
|
|
59553
|
+
.dshc-mandate-root{margin:6px 0;border:1px solid var(--dsw-alias-border-l2,rgba(255,255,255,0.12));border-radius:8px;background:var(--dsw-alias-bg-layer-1,rgba(255,255,255,0.03));overflow:hidden}
|
|
59554
|
+
.dshc-mandate-root[data-state="error"]{border-color:var(--dsw-alias-border-danger,rgba(255,99,99,0.55))}
|
|
59555
|
+
.dshc-mandate-row{display:flex;align-items:center;gap:8px;width:100%;margin:0;padding:6px 10px;border:0;background:transparent;color:inherit;font:inherit;text-align:left;cursor:pointer}
|
|
59556
|
+
.dshc-mandate-row[data-expandable="false"]{cursor:default}
|
|
59557
|
+
.dshc-mandate-caret{flex:none;font-size:11px;opacity:.7;width:10px}
|
|
59558
|
+
.dshc-mandate-title{flex:none;font-size:12px;font-weight:500}
|
|
59559
|
+
.dshc-mandate-summary{flex:1;min-width:0;font-size:12px;opacity:.72;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
|
|
59560
|
+
.dshc-mandate-state{flex:none;font-size:11px;opacity:.75}
|
|
59561
|
+
.dshc-mandate-body{display:flex;flex-direction:column;gap:8px;padding:2px 10px 10px}
|
|
59562
|
+
.dshc-mandate-chips{display:flex;flex-wrap:wrap;gap:6px}
|
|
59563
|
+
.dshc-mandate-chip{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:11px;line-height:1;padding:4px 6px;border:1px solid var(--dsw-alias-border-l2,rgba(255,255,255,0.14));border-radius:4px;background:var(--dsw-alias-bg-layer-2,rgba(255,255,255,0.05));white-space:nowrap}
|
|
59564
|
+
.dshc-mandate-label{opacity:.62;font-family:inherit;margin-right:5px}
|
|
59565
|
+
.dshc-mandate-field{display:flex;gap:8px;font-size:12px;line-height:1.5}
|
|
59566
|
+
.dshc-mandate-field-key{flex:none;min-width:64px;opacity:.62}
|
|
59567
|
+
.dshc-mandate-list{margin:0;padding:0;list-style:none;display:flex;flex-direction:column;gap:2px}
|
|
59568
|
+
.dshc-mandate-list li{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:11px;opacity:.86}
|
|
59569
|
+
.dshc-mandate-text{font-size:12px;line-height:1.6;white-space:pre-wrap;word-break:break-word;margin:0}
|
|
59570
|
+
.dshc-mandate-result{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:11px;line-height:1.5;white-space:pre-wrap;word-break:break-word;margin:0;padding:6px 8px;border-radius:6px;background:var(--dsw-alias-bg-layer-2,rgba(255,255,255,0.06))}
|
|
59571
|
+
.dshc-mandate-result[data-error="true"]{color:var(--dsw-alias-label-danger,#ff8b8b);background:var(--dsw-alias-bg-danger,rgba(255,80,80,0.1))}
|
|
59572
|
+
.dshc-mandate-raw{border:0;background:transparent;color:inherit;font:inherit;font-size:11px;opacity:.7;cursor:pointer;padding:0;text-decoration:underline;text-underline-offset:2px}
|
|
59573
|
+
.dshc-mandate-rawtext{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:11px;line-height:1.5;white-space:pre-wrap;word-break:break-word;margin:0;max-height:260px;overflow:auto}
|
|
59574
|
+
.dshc-mandate-note{font-size:11px;opacity:.6}
|
|
59575
|
+
`;
|
|
59576
|
+
/** 安装样式(重复调用是幂等的)。 */
|
|
59577
|
+
function installDispatchLedgerStyles() {
|
|
59578
|
+
installPluginStyle("dispatch-ledger", CSS);
|
|
59579
|
+
}
|
|
59580
|
+
//#endregion
|
|
59175
59581
|
//#region src/client/codemode/highlight.ts
|
|
59176
59582
|
/** 宿主 `ui-theme/src/styles/shiki.css` 定义的标准变量表(带合理回退色以兼容测试环境)。 */
|
|
59177
59583
|
const SHIKI_TOKEN_COLORS = {
|
|
@@ -59734,7 +60140,7 @@ window.__ModuleLoader__.load({
|
|
|
59734
60140
|
* @module @eddyskywalker/dsh-chatgpt-subscription/client/codemode/CodeRunToolView
|
|
59735
60141
|
*/
|
|
59736
60142
|
function fallbackTranslate(key) {
|
|
59737
|
-
return zh$
|
|
60143
|
+
return zh$3[key] ?? key;
|
|
59738
60144
|
}
|
|
59739
60145
|
function firstLine(text) {
|
|
59740
60146
|
const nl = text.indexOf("\n");
|
|
@@ -60492,71 +60898,72 @@ window.__ModuleLoader__.load({
|
|
|
60492
60898
|
installLineLocale(ctx.locale);
|
|
60493
60899
|
ctx.effect(() => installHostLocaleMirror(ctx.locale), "dsh-chatgpt-subscription: host locale mirror");
|
|
60494
60900
|
installRussianLocale(ctx);
|
|
60495
|
-
ctx.effect(() => ctx.locale.register(NS, dictionaries$
|
|
60901
|
+
ctx.effect(() => ctx.locale.register(NS, dictionaries$3), "dsh-chatgpt-subscription: dictionaries");
|
|
60496
60902
|
ctx.effect(() => installStyles(), "dsh-chatgpt-subscription: styles");
|
|
60497
60903
|
ctx.effect(() => {
|
|
60498
60904
|
installHubStyles();
|
|
60499
60905
|
installModelChecklistStyles();
|
|
60500
60906
|
return () => {};
|
|
60501
60907
|
}, "dsh-chatgpt-subscription: hub styles");
|
|
60502
|
-
ctx.effect(() => ctx.locale.register(NS_ANTIGRAVITY, dictionaries$
|
|
60908
|
+
ctx.effect(() => ctx.locale.register(NS_ANTIGRAVITY, dictionaries$15), "dsh-antigravity: dictionaries");
|
|
60503
60909
|
ctx.effect(() => {
|
|
60504
60910
|
installAntigravityStyles();
|
|
60505
60911
|
return () => {};
|
|
60506
60912
|
}, "dsh-antigravity: styles");
|
|
60507
|
-
ctx.effect(() => ctx.locale.register(NS_CLAUDE, dictionaries$
|
|
60913
|
+
ctx.effect(() => ctx.locale.register(NS_CLAUDE, dictionaries$10), "dsh-claude: dictionaries");
|
|
60508
60914
|
ctx.effect(() => {
|
|
60509
60915
|
installClaudeStyles();
|
|
60510
60916
|
return () => {};
|
|
60511
60917
|
}, "dsh-claude: styles");
|
|
60512
|
-
ctx.effect(() => ctx.locale.register(NS_COMMAND_CODE, dictionaries$
|
|
60513
|
-
ctx.effect(() => ctx.locale.register(NS_KIMI_CODE, dictionaries$
|
|
60918
|
+
ctx.effect(() => ctx.locale.register(NS_COMMAND_CODE, dictionaries$14), "dsh-command-code: dictionaries");
|
|
60919
|
+
ctx.effect(() => ctx.locale.register(NS_KIMI_CODE, dictionaries$13), "dsh-kimi-code: dictionaries");
|
|
60514
60920
|
ctx.effect(() => {
|
|
60515
60921
|
installKimiCodeStyles();
|
|
60516
60922
|
return () => {};
|
|
60517
60923
|
}, "dsh-kimi-code: styles");
|
|
60518
|
-
ctx.effect(() => ctx.locale.register(NS_MINIMAX_CODE, dictionaries$
|
|
60924
|
+
ctx.effect(() => ctx.locale.register(NS_MINIMAX_CODE, dictionaries$12), "dsh-minimax-code: dictionaries");
|
|
60519
60925
|
ctx.effect(() => {
|
|
60520
60926
|
installMinimaxCodeStyles();
|
|
60521
60927
|
return () => {};
|
|
60522
60928
|
}, "dsh-minimax-code: styles");
|
|
60523
|
-
ctx.effect(() => ctx.locale.register(NS_GLM_CODING_PLAN, dictionaries$
|
|
60929
|
+
ctx.effect(() => ctx.locale.register(NS_GLM_CODING_PLAN, dictionaries$11), "dsh-glm-coding-plan: dictionaries");
|
|
60524
60930
|
ctx.effect(() => {
|
|
60525
60931
|
installGlmCodingPlanStyles();
|
|
60526
60932
|
return () => {};
|
|
60527
60933
|
}, "dsh-glm-coding-plan: styles");
|
|
60528
|
-
ctx.effect(() => ctx.locale.register(NS_OLLAMA, dictionaries$
|
|
60934
|
+
ctx.effect(() => ctx.locale.register(NS_OLLAMA, dictionaries$9), "dsh-ollama: dictionaries");
|
|
60529
60935
|
ctx.effect(() => ctx.locale.register(NS_PROGRESS_UPDATES, dictionaries$1), "dsh-progress-updates: dictionaries");
|
|
60530
60936
|
ctx.effect(() => {
|
|
60531
60937
|
installProgressUpdatesStyles();
|
|
60532
60938
|
return () => {};
|
|
60533
60939
|
}, "dsh-progress-updates: styles");
|
|
60534
|
-
ctx.effect(() => ctx.locale.register(NS_STEP_CODE, dictionaries$
|
|
60940
|
+
ctx.effect(() => ctx.locale.register(NS_STEP_CODE, dictionaries$8), "dsh-step-code: dictionaries");
|
|
60535
60941
|
ctx.effect(() => {
|
|
60536
60942
|
installStepCodeStyles();
|
|
60537
60943
|
return () => {};
|
|
60538
60944
|
}, "dsh-step-code: styles");
|
|
60539
|
-
ctx.effect(() => ctx.locale.register(NS_CLINE_PASS, dictionaries$
|
|
60945
|
+
ctx.effect(() => ctx.locale.register(NS_CLINE_PASS, dictionaries$7), "dsh-cline-pass: dictionaries");
|
|
60540
60946
|
ctx.effect(() => {
|
|
60541
60947
|
installClinePassStyles();
|
|
60542
60948
|
return () => {};
|
|
60543
60949
|
}, "dsh-cline-pass: styles");
|
|
60544
|
-
ctx.effect(() => ctx.locale.register(NS_QODER, dictionaries$
|
|
60950
|
+
ctx.effect(() => ctx.locale.register(NS_QODER, dictionaries$6), "dsh-qoder: dictionaries");
|
|
60545
60951
|
ctx.effect(() => {
|
|
60546
60952
|
installQoderStyles();
|
|
60547
60953
|
return () => {};
|
|
60548
60954
|
}, "dsh-qoder: styles");
|
|
60549
|
-
ctx.effect(() => ctx.locale.register(NS_OPENDESIGN, dictionaries$
|
|
60955
|
+
ctx.effect(() => ctx.locale.register(NS_OPENDESIGN, dictionaries$5), "dsh-opendesign: dictionaries");
|
|
60550
60956
|
ctx.effect(() => {
|
|
60551
60957
|
installOpenDesignStyles();
|
|
60552
60958
|
return () => {};
|
|
60553
60959
|
}, "dsh-opendesign: styles");
|
|
60554
|
-
ctx.effect(() => ctx.locale.register(NS_WORKBUDDY, dictionaries$
|
|
60960
|
+
ctx.effect(() => ctx.locale.register(NS_WORKBUDDY, dictionaries$4), "dsh-workbuddy: dictionaries");
|
|
60555
60961
|
ctx.effect(() => {
|
|
60556
60962
|
installWorkBuddyStyles();
|
|
60557
60963
|
return () => {};
|
|
60558
60964
|
}, "dsh-workbuddy: styles");
|
|
60559
60965
|
ctx.effect(() => ctx.locale.register(NS_SUBAGENT, dictionaries), "dsh-subagent-settings: dictionaries");
|
|
60966
|
+
ctx.effect(() => ctx.locale.register(NS_DISPATCH_LEDGER, dictionaries$2), "dsh-dispatch-ledger: dictionaries");
|
|
60560
60967
|
ctx.effect(() => {
|
|
60561
60968
|
installSubagentStyles();
|
|
60562
60969
|
return () => {};
|
|
@@ -60564,6 +60971,7 @@ window.__ModuleLoader__.load({
|
|
|
60564
60971
|
ctx.effect(() => {
|
|
60565
60972
|
installPoolStyles();
|
|
60566
60973
|
installCodemodeStyles();
|
|
60974
|
+
installDispatchLedgerStyles();
|
|
60567
60975
|
return () => {};
|
|
60568
60976
|
}, "dsh-chatgpt-subscription: pool styles");
|
|
60569
60977
|
ctx.effect(() => setupMermaidObserver(), "dsh-mermaid: observer");
|
|
@@ -60698,6 +61106,12 @@ window.__ModuleLoader__.load({
|
|
|
60698
61106
|
key: CODE_RUN_TOOL_NAME,
|
|
60699
61107
|
locale: NS
|
|
60700
61108
|
}, CodeRunToolView));
|
|
61109
|
+
for (const key of ["subagent", "subagent_fork"]) ctx.slots.inject("tool.call.toolview", () => ctx.slots.register({
|
|
61110
|
+
name: "tool.call.toolview",
|
|
61111
|
+
key,
|
|
61112
|
+
priority: -10,
|
|
61113
|
+
locale: NS_DISPATCH_LEDGER
|
|
61114
|
+
}, MandateToolView));
|
|
60701
61115
|
installVideoDocumentPreview(ctx);
|
|
60702
61116
|
installSubagentSettingsCard(ctx);
|
|
60703
61117
|
installProgressUpdatesClient(ctx);
|