@eddyskywalker/dsh-chatgpt-subscription 0.82.3 → 0.83.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/lib/client.js +224 -53
- package/lib/client.js.map +1 -1
- package/lib/{entry-tool-result-pruner-E_xILd9Z.js → entry-tool-result-pruner-CNGm7XOI.js} +412 -3
- package/lib/index.js +2798 -1271
- package/lib/tool-result-pruner.js +1 -1
- package/lib/types/client/common/AccountPoolSection.d.ts +9 -0
- package/lib/types/client/common/AccountPoolSection.d.ts.map +1 -1
- package/lib/types/client/locales-ru/relayone.d.ts.map +1 -1
- package/lib/types/client/relayone/RelayOneSection.d.ts.map +1 -1
- package/lib/types/client/relayone/locales.d.ts +65 -1
- package/lib/types/client/relayone/locales.d.ts.map +1 -1
- package/lib/types/client/relayone/useRelayOneSection.d.ts +3 -1
- package/lib/types/client/relayone/useRelayOneSection.d.ts.map +1 -1
- package/lib/types/compat.d.ts +1 -1
- package/lib/types/entry-tool-result-pruner.d.ts +3 -1
- package/lib/types/entry-tool-result-pruner.d.ts.map +1 -1
- package/lib/types/host/common/tool-runaway.d.ts +20 -1
- package/lib/types/host/common/tool-runaway.d.ts.map +1 -1
- package/lib/types/host/compact-after-turn/index.d.ts +12 -4
- package/lib/types/host/compact-after-turn/index.d.ts.map +1 -1
- package/lib/types/host/compaction-policy-guard.d.ts +18 -4
- package/lib/types/host/compaction-policy-guard.d.ts.map +1 -1
- package/lib/types/host/glm-coding-plan/adapter.d.ts.map +1 -1
- package/lib/types/host/glm-coding-plan/mapper-anthropic.d.ts +13 -89
- package/lib/types/host/glm-coding-plan/mapper-anthropic.d.ts.map +1 -1
- package/lib/types/host/kimi-code/adapter.d.ts.map +1 -1
- package/lib/types/host/kimi-code/client.d.ts +10 -0
- package/lib/types/host/kimi-code/client.d.ts.map +1 -1
- package/lib/types/host/kimi-code/mapper.d.ts +2 -2
- package/lib/types/host/kimi-code/model-catalog.d.ts.map +1 -1
- package/lib/types/host/kimi-code/types.d.ts +17 -8
- package/lib/types/host/kimi-code/types.d.ts.map +1 -1
- package/lib/types/host/minimax-code/runtime-enhancements.d.ts +9 -0
- package/lib/types/host/minimax-code/runtime-enhancements.d.ts.map +1 -1
- package/lib/types/host/open-models/discipline.d.ts +9 -0
- package/lib/types/host/open-models/discipline.d.ts.map +1 -0
- package/lib/types/host/open-models/index.d.ts +59 -0
- package/lib/types/host/open-models/index.d.ts.map +1 -0
- package/lib/types/host/open-models/observation-guard.d.ts +32 -0
- package/lib/types/host/open-models/observation-guard.d.ts.map +1 -0
- package/lib/types/host/open-models/profiles.d.ts +113 -0
- package/lib/types/host/open-models/profiles.d.ts.map +1 -0
- package/lib/types/host/open-models/state-anchor.d.ts +46 -0
- package/lib/types/host/open-models/state-anchor.d.ts.map +1 -0
- package/lib/types/host/ptc-sdk-cache-guard.d.ts +2 -2
- package/lib/types/host/ptc-sdk-cache-guard.d.ts.map +1 -1
- package/lib/types/host/relayone/account-pool.d.ts +129 -0
- package/lib/types/host/relayone/account-pool.d.ts.map +1 -0
- package/lib/types/host/relayone/adapter.d.ts +37 -0
- package/lib/types/host/relayone/adapter.d.ts.map +1 -1
- package/lib/types/host/relayone/catalog-manager.d.ts +2 -1
- package/lib/types/host/relayone/catalog-manager.d.ts.map +1 -1
- package/lib/types/host/relayone/media-shared.d.ts +9 -0
- package/lib/types/host/relayone/media-shared.d.ts.map +1 -1
- package/lib/types/host/relayone/quota.d.ts +2 -1
- package/lib/types/host/relayone/quota.d.ts.map +1 -1
- package/lib/types/host/relayone/routes.d.ts +8 -0
- package/lib/types/host/relayone/routes.d.ts.map +1 -1
- package/lib/types/host/session-title-guard/index.d.ts +64 -0
- package/lib/types/host/session-title-guard/index.d.ts.map +1 -0
- package/lib/types/host/timeline-cache-guard.d.ts +1 -2
- package/lib/types/host/timeline-cache-guard.d.ts.map +1 -1
- package/lib/types/host/tool-result-pruner-guard.d.ts +5 -0
- package/lib/types/host/tool-result-pruner-guard.d.ts.map +1 -1
- package/lib/types/index.d.ts +18 -0
- package/lib/types/index.d.ts.map +1 -1
- package/lib/types/shared/relayone-contracts.d.ts +17 -0
- package/lib/types/shared/relayone-contracts.d.ts.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
## 0.83.0 - 2026-11-28
|
|
6
|
+
|
|
7
|
+
- **[relayone] 支持保存多个 API Key 并手动切换**:RelayOne 由单 Key 改为号池,复用共享 `AccountPoolCore`。**不做自动轮询**:设置卡里手动「切换到此 Key」,选中的 Key 服务所有请求直到再次切换,选择会持久化并在重启后生效。401/403 只把该 Key 标记为失效、429 只记 60 秒冷却,两者都不会偷偷换号——请求照常失败并提示切换,避免消耗用户没选的账号。新增的 Key 先向 `/v1/models` 验证再入库;升级前保存的单 Key 文件自动投影为主账号并保持镜像回写,无需重新粘贴。模型目录与额度跟随当前选中的 Key,切换时自动重新读取。共享账号卡片新增可选 `showStrategy`,本线路不渲染调度策略选择器,其余线路行为不变。
|
|
8
|
+
|
|
9
|
+
- **[open-models] 开源模型运行时专项优化**:按底层注意力物理架构(混合线性+稀疏/MLA、块稀疏/压缩、短窗 SWA、深窄网、本地稠密)为 Kimi K3/K3.1 Pro、GLM-5.x、DeepSeek-V4 Pro/Flash、MiniMax M3/M3.1/M2.7、Qwen 3.5–4、Step 3.5–5、MiMo V2.6、Ling 3.1、Hunyuan Hy4、LongCat 2.0 及 Ollama 本地模型匹配专属画像,提供四项能力:按家族追加在系统提示词末尾的静态纪律段(零破前缀缓存)、尾部零改前缀的状态锚(按阵营决定步频与水位)、入库前观测头与 Kimi 只读空转提醒,以及按模型精准门控的推理坍塌守卫。严格排除 DeepSeek V4.1 Flash 与全部闭源模型。
|
|
10
|
+
|
|
11
|
+
- **[kimi] 细化 K3.1 Pro 推理档位与 1M 压缩保留**:K3.1 Pro 的推理档位强制与压缩策略跟随新增的模型画像;压缩保留窗口按 1M 上下文口径处理,缓存写入与缓存守卫的判定同步调整。
|
|
12
|
+
|
|
13
|
+
- **[compact-after-turn] 修复「本轮结束后压缩」的忙碌判定与预设命令**:`/compact` 的结果只携带人类可读文本,原本靠匹配英文措辞判断忙碌,措辞一变即失效。现在改为依据控制器自身观察到的现象判定——agent 离开 idle、尝试在途时有新一轮开启,或存在未配对的 `compaction/start`——措辞匹配仅作为额外线索。同时修正预设 agent 未正确解析 `/compact` 命令的问题。
|
|
14
|
+
|
|
15
|
+
- **[aws-quick] 插件线路跳过自动会话标题请求**:DSH 会在首条消息后经会话自身 provider 额外发一次 `llm/stream`(`purpose: session-title`)来生成标题,消耗该线路配额。现在在 `llm/stream` 层短路本插件受控线路:adapter 根本不被派发(无请求、无消耗),标题回退到 DSH 基于首条消息的确定性标题。仅作用于本插件自己的线路,用户配置的其他 provider 不受影响;由易失开关 `skipSessionTitle` 控制(默认开启)。
|
|
16
|
+
|
|
5
17
|
## 0.82.3 - 2026-11-24
|
|
6
18
|
|
|
7
19
|
- **[aws-quick] 修复已获批连接器每次启动触发 "Invalid or missing confirmation nonce"**:Quick 的 `/local/mcp/update` 需要一次性 UI 确认 nonce,而旧逻辑只要已获批连接器缺少 `ELECTRON_RUN_AS_NODE` 环境变量就发 `update`,导致每次启动报 nonce 错误。现在命令/参数一致的已获批连接器原样复用、不再发 `update`;仅当启动器(command/args)真正变化时才更新,且 Quick 因缺 nonce 拒绝时降级为 `approval_required`(指引在 Quick 内原生批准一次),不再把裸 nonce 错误抛给用户。真机 agent 实测确认 `add` 会把新连接器置为未启用,故重建连接器无益。重写对应单测。
|
package/lib/client.js
CHANGED
|
@@ -2381,7 +2381,7 @@ window.__ModuleLoader__.load({
|
|
|
2381
2381
|
children: props.loginBusyLabel || t.addAccount
|
|
2382
2382
|
})]
|
|
2383
2383
|
}),
|
|
2384
|
-
accounts.length > 1 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
2384
|
+
props.showStrategy !== false && accounts.length > 1 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
2385
2385
|
className: "dsha-pref-row",
|
|
2386
2386
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: t.rotationStrategy }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
2387
2387
|
className: "dsha-muted",
|
|
@@ -22386,7 +22386,39 @@ window.__ModuleLoader__.load({
|
|
|
22386
22386
|
composerGroups: " · 分组:",
|
|
22387
22387
|
unknownGroup: "自动分组",
|
|
22388
22388
|
invalidCapacity: "上下文窗口必须是正整数。",
|
|
22389
|
-
errorGeneric: "RelayOne 操作失败。"
|
|
22389
|
+
errorGeneric: "RelayOne 操作失败。",
|
|
22390
|
+
accountPool: "API Key 号池",
|
|
22391
|
+
addAccount: "添加 Key",
|
|
22392
|
+
accountCount: "已添加 {count} 个 Key",
|
|
22393
|
+
useKey: "切换到此 Key",
|
|
22394
|
+
switchingKey: "切换中…",
|
|
22395
|
+
primaryAccount: "主 Key",
|
|
22396
|
+
activeAccount: "当前使用",
|
|
22397
|
+
setPrimary: "设为主 Key",
|
|
22398
|
+
deleteAccount: "删除",
|
|
22399
|
+
cooling: "冷却中",
|
|
22400
|
+
cooldownLeft: "剩 {minutes} 分",
|
|
22401
|
+
cooldownRemaining: "剩 {minutes} 分 {seconds} 秒",
|
|
22402
|
+
cooldownRemainingSeconds: "剩 {seconds} 秒",
|
|
22403
|
+
clearCooldown: "重置冷却",
|
|
22404
|
+
needsRelogin: "Key 已被拒绝",
|
|
22405
|
+
relogin: "更换 Key",
|
|
22406
|
+
rotationStrategy: "调度策略",
|
|
22407
|
+
strategySequential: "顺序耗尽(主 Key 优先,遇限流自动切换)",
|
|
22408
|
+
strategyRoundRobin: "轮询调度(按 Key 循环均匀分摊)",
|
|
22409
|
+
strategySticky: "粘性会话(保持当前 Key,遇限流才切换)",
|
|
22410
|
+
noAccounts: "暂无 Key,粘贴一个 RelayOne 令牌即可加入轮换。",
|
|
22411
|
+
email: "邮箱",
|
|
22412
|
+
expires: "令牌到期",
|
|
22413
|
+
lastUsed: "上次调用",
|
|
22414
|
+
accountId: "Key ID",
|
|
22415
|
+
accountQuota: "额度",
|
|
22416
|
+
quotaNone: "尚无额度数据",
|
|
22417
|
+
quotaSnapshot: "快照 {time}",
|
|
22418
|
+
quotaResets: "重置",
|
|
22419
|
+
quotaExhausted: "已用尽",
|
|
22420
|
+
quotaWindow: "额度窗口",
|
|
22421
|
+
quotaFactsScope: "以下为当前 Key 的额度事实;每个 Key 自己的进度显示在它的卡片里。"
|
|
22390
22422
|
};
|
|
22391
22423
|
const dictionaries$5 = {
|
|
22392
22424
|
zh: zh$5,
|
|
@@ -22463,7 +22495,39 @@ window.__ModuleLoader__.load({
|
|
|
22463
22495
|
composerGroups: " · Groups: ",
|
|
22464
22496
|
unknownGroup: "Automatic group",
|
|
22465
22497
|
invalidCapacity: "Context window must be a positive integer.",
|
|
22466
|
-
errorGeneric: "RelayOne operation failed."
|
|
22498
|
+
errorGeneric: "RelayOne operation failed.",
|
|
22499
|
+
accountPool: "API Key pool",
|
|
22500
|
+
addAccount: "Add key",
|
|
22501
|
+
accountCount: "{count} key(s) added",
|
|
22502
|
+
useKey: "Use this key",
|
|
22503
|
+
switchingKey: "Switching…",
|
|
22504
|
+
primaryAccount: "Primary",
|
|
22505
|
+
activeAccount: "In Use",
|
|
22506
|
+
setPrimary: "Set as primary",
|
|
22507
|
+
deleteAccount: "Delete",
|
|
22508
|
+
cooling: "In Cooldown",
|
|
22509
|
+
cooldownLeft: "{minutes} min left",
|
|
22510
|
+
cooldownRemaining: "{minutes} min {seconds}s left",
|
|
22511
|
+
cooldownRemainingSeconds: "{seconds}s left",
|
|
22512
|
+
clearCooldown: "Clear cooldown",
|
|
22513
|
+
needsRelogin: "Key rejected",
|
|
22514
|
+
relogin: "Replace key",
|
|
22515
|
+
rotationStrategy: "Scheduling strategy",
|
|
22516
|
+
strategySequential: "Sequential drain (primary first, fail over on 429)",
|
|
22517
|
+
strategyRoundRobin: "Round-robin (spread evenly across keys)",
|
|
22518
|
+
strategySticky: "Sticky session (keep the current key until limited)",
|
|
22519
|
+
noAccounts: "No keys yet. Paste a RelayOne token to add it to the rotation.",
|
|
22520
|
+
email: "Email",
|
|
22521
|
+
expires: "Token expires",
|
|
22522
|
+
lastUsed: "Last used",
|
|
22523
|
+
accountId: "Key ID",
|
|
22524
|
+
accountQuota: "Quota",
|
|
22525
|
+
quotaNone: "No quota read yet",
|
|
22526
|
+
quotaSnapshot: "Snapshot {time}",
|
|
22527
|
+
quotaResets: "Resets",
|
|
22528
|
+
quotaExhausted: "Exhausted",
|
|
22529
|
+
quotaWindow: "Limit window",
|
|
22530
|
+
quotaFactsScope: "These facts describe the current key; each key’s own progress is shown on its card above."
|
|
22467
22531
|
}
|
|
22468
22532
|
};
|
|
22469
22533
|
//#endregion
|
|
@@ -22528,6 +22592,59 @@ window.__ModuleLoader__.load({
|
|
|
22528
22592
|
setBusy(null);
|
|
22529
22593
|
}
|
|
22530
22594
|
}, [adopt, onModelChange]);
|
|
22595
|
+
/**
|
|
22596
|
+
* Add one key to the pool.
|
|
22597
|
+
*
|
|
22598
|
+
* The host verifies it against the upstream before storing it, so a refusal
|
|
22599
|
+
* arrives here as an error and the rotation is left untouched.
|
|
22600
|
+
*/
|
|
22601
|
+
const saveKey = (0, react.useCallback)(async () => {
|
|
22602
|
+
const apiKey = keyValue.trim();
|
|
22603
|
+
if (apiKey === "") return;
|
|
22604
|
+
setBusy("key");
|
|
22605
|
+
setError(null);
|
|
22606
|
+
try {
|
|
22607
|
+
const next = await post$1("/accounts", {
|
|
22608
|
+
action: "add",
|
|
22609
|
+
apiKey
|
|
22610
|
+
});
|
|
22611
|
+
adopt(next);
|
|
22612
|
+
setKeyValue("");
|
|
22613
|
+
setConnection(null);
|
|
22614
|
+
onModelChange?.();
|
|
22615
|
+
} catch (cause) {
|
|
22616
|
+
setError(messageOf$1(cause));
|
|
22617
|
+
} finally {
|
|
22618
|
+
setBusy(null);
|
|
22619
|
+
}
|
|
22620
|
+
}, [
|
|
22621
|
+
adopt,
|
|
22622
|
+
keyValue,
|
|
22623
|
+
onModelChange
|
|
22624
|
+
]);
|
|
22625
|
+
/** Verify a key without storing it. */
|
|
22626
|
+
const testKey = (0, react.useCallback)(async () => {
|
|
22627
|
+
const apiKey = keyValue.trim();
|
|
22628
|
+
if (apiKey === "") return;
|
|
22629
|
+
setBusy("test-key");
|
|
22630
|
+
setError(null);
|
|
22631
|
+
try {
|
|
22632
|
+
adopt(await post$1("/accounts", {
|
|
22633
|
+
action: "test",
|
|
22634
|
+
apiKey
|
|
22635
|
+
}));
|
|
22636
|
+
setConnection(null);
|
|
22637
|
+
onModelChange?.();
|
|
22638
|
+
} catch (cause) {
|
|
22639
|
+
setError(messageOf$1(cause));
|
|
22640
|
+
} finally {
|
|
22641
|
+
setBusy(null);
|
|
22642
|
+
}
|
|
22643
|
+
}, [
|
|
22644
|
+
adopt,
|
|
22645
|
+
keyValue,
|
|
22646
|
+
onModelChange
|
|
22647
|
+
]);
|
|
22531
22648
|
return {
|
|
22532
22649
|
status,
|
|
22533
22650
|
loading,
|
|
@@ -22542,29 +22659,23 @@ window.__ModuleLoader__.load({
|
|
|
22542
22659
|
...current,
|
|
22543
22660
|
[id]: draft
|
|
22544
22661
|
})),
|
|
22545
|
-
|
|
22546
|
-
|
|
22547
|
-
if (apiKey === "") return;
|
|
22548
|
-
setBusy("key");
|
|
22662
|
+
accountAction: (0, react.useCallback)(async (label, action, body = {}) => {
|
|
22663
|
+
setBusy(label);
|
|
22549
22664
|
setError(null);
|
|
22550
22665
|
try {
|
|
22551
|
-
adopt(await
|
|
22552
|
-
|
|
22553
|
-
body
|
|
22666
|
+
adopt(await post$1("/accounts", {
|
|
22667
|
+
action,
|
|
22668
|
+
...body
|
|
22554
22669
|
}));
|
|
22555
|
-
setKeyValue("");
|
|
22556
|
-
setConnection(null);
|
|
22557
22670
|
onModelChange?.();
|
|
22558
22671
|
} catch (cause) {
|
|
22559
22672
|
setError(messageOf$1(cause));
|
|
22560
22673
|
} finally {
|
|
22561
22674
|
setBusy(null);
|
|
22562
22675
|
}
|
|
22563
|
-
}, [
|
|
22564
|
-
|
|
22565
|
-
|
|
22566
|
-
onModelChange
|
|
22567
|
-
]),
|
|
22676
|
+
}, [adopt, onModelChange]),
|
|
22677
|
+
testKey,
|
|
22678
|
+
saveKey,
|
|
22568
22679
|
removeKey: (0, react.useCallback)(async () => {
|
|
22569
22680
|
setBusy("remove-key");
|
|
22570
22681
|
setError(null);
|
|
@@ -22730,20 +22841,6 @@ window.__ModuleLoader__.load({
|
|
|
22730
22841
|
onChange: (event) => void view.update({ enabled: event.currentTarget.checked }).catch(() => void 0)
|
|
22731
22842
|
})]
|
|
22732
22843
|
}),
|
|
22733
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
22734
|
-
className: "dsha-empty",
|
|
22735
|
-
children: status?.authenticated ? t.keyConfigured : t.keyMissing
|
|
22736
|
-
}),
|
|
22737
|
-
status?.authenticated && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
22738
|
-
className: "dsha-row",
|
|
22739
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
22740
|
-
className: "dsha-label",
|
|
22741
|
-
children: t.storagePath
|
|
22742
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
22743
|
-
className: "dsha-value",
|
|
22744
|
-
children: status.storagePath
|
|
22745
|
-
})]
|
|
22746
|
-
}),
|
|
22747
22844
|
status?.authenticated && status.quota !== void 0 && status.quota.state !== "idle" && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
22748
22845
|
className: "dsha-row dshro-quota-row",
|
|
22749
22846
|
title: status.quota.error ?? void 0,
|
|
@@ -22755,27 +22852,6 @@ window.__ModuleLoader__.load({
|
|
|
22755
22852
|
children: relayOneQuotaAccountText(status.quota) ?? "—"
|
|
22756
22853
|
})]
|
|
22757
22854
|
}),
|
|
22758
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
22759
|
-
className: "dshro-key-row",
|
|
22760
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
22761
|
-
className: "dsha-select",
|
|
22762
|
-
type: "password",
|
|
22763
|
-
autoComplete: "off",
|
|
22764
|
-
"aria-label": t.keySection,
|
|
22765
|
-
placeholder: t.keyPlaceholder,
|
|
22766
|
-
value: view.keyValue,
|
|
22767
|
-
disabled: busy !== null,
|
|
22768
|
-
onChange: (event) => view.setKeyValue(event.currentTarget.value),
|
|
22769
|
-
onKeyDown: (event) => {
|
|
22770
|
-
if (event.key === "Enter") view.saveKey();
|
|
22771
|
-
}
|
|
22772
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
22773
|
-
className: "dsha-btn dsha-btn-primary",
|
|
22774
|
-
disabled: busy !== null || view.keyValue.trim() === "",
|
|
22775
|
-
onClick: () => void view.saveKey(),
|
|
22776
|
-
children: busy === "key" ? t.savingKey : t.saveKey
|
|
22777
|
-
})]
|
|
22778
|
-
}),
|
|
22779
22855
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
22780
22856
|
className: "dsha-muted",
|
|
22781
22857
|
children: status?.serving === false && status.conflict ? t.routeConflict.replace("{detail}", status.conflict) : t.routeOwned
|
|
@@ -22783,6 +22859,69 @@ window.__ModuleLoader__.load({
|
|
|
22783
22859
|
view.connection !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
22784
22860
|
className: view.connection.connected ? "dsha-muted" : "dsha-notice",
|
|
22785
22861
|
children: view.connection.connected ? t.connectionOk + " · " + t.latency.replace("{ms}", String(view.connection.latencyMs)) + " · " + t.modelCount.replace("{count}", String(view.connection.modelCount)) : t.connectionFailed + ": " + (view.connection.error ?? "—")
|
|
22862
|
+
}),
|
|
22863
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(AccountPoolSection, {
|
|
22864
|
+
accounts: status?.accounts ?? [],
|
|
22865
|
+
activeAccountId: status?.activeAccountId,
|
|
22866
|
+
rotationStrategy: status?.rotationStrategy ?? "sequential",
|
|
22867
|
+
labels: t,
|
|
22868
|
+
busy,
|
|
22869
|
+
onLogin: () => void 0,
|
|
22870
|
+
renderLoginActions: () => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
22871
|
+
className: "dsha-muted",
|
|
22872
|
+
children: status?.authenticated ? t.keyConfigured : t.keyMissing
|
|
22873
|
+
}),
|
|
22874
|
+
onSetPrimary: (id) => void view.accountAction("set-primary", "set-primary", { accountId: id }),
|
|
22875
|
+
onDelete: (id) => void view.accountAction("delete", "delete", { accountId: id }),
|
|
22876
|
+
onClearCooldown: (id) => void view.accountAction("clear-cooldown", "clear-cooldown", { accountId: id }),
|
|
22877
|
+
onSetStrategy: () => void 0,
|
|
22878
|
+
showStrategy: false,
|
|
22879
|
+
omitDetails: ["email", "expires"],
|
|
22880
|
+
renderAccountActions: (account) => account.id === status?.activeAccountId ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
22881
|
+
className: "dsha-btn dsha-btn-primary",
|
|
22882
|
+
disabled: busy !== null,
|
|
22883
|
+
onClick: () => void view.accountAction("use:" + account.id, "use", { accountId: account.id }),
|
|
22884
|
+
children: busy === "use:" + account.id ? t.switchingKey : t.useKey
|
|
22885
|
+
}),
|
|
22886
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
22887
|
+
className: "dshro-key-row",
|
|
22888
|
+
children: [
|
|
22889
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
22890
|
+
className: "dsha-select",
|
|
22891
|
+
type: "password",
|
|
22892
|
+
autoComplete: "off",
|
|
22893
|
+
"aria-label": t.keySection,
|
|
22894
|
+
placeholder: t.keyPlaceholder,
|
|
22895
|
+
value: view.keyValue,
|
|
22896
|
+
disabled: busy !== null,
|
|
22897
|
+
onChange: (event) => view.setKeyValue(event.currentTarget.value),
|
|
22898
|
+
onKeyDown: (event) => {
|
|
22899
|
+
if (event.key === "Enter") view.saveKey();
|
|
22900
|
+
}
|
|
22901
|
+
}),
|
|
22902
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
22903
|
+
className: "dsha-btn",
|
|
22904
|
+
disabled: busy !== null || view.keyValue.trim() === "",
|
|
22905
|
+
onClick: () => void view.testKey(),
|
|
22906
|
+
children: busy === "test-key" ? t.testingConnection : t.testConnection
|
|
22907
|
+
}),
|
|
22908
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
22909
|
+
className: "dsha-btn dsha-btn-primary",
|
|
22910
|
+
disabled: busy !== null || view.keyValue.trim() === "",
|
|
22911
|
+
onClick: () => void view.saveKey(),
|
|
22912
|
+
children: busy === "key" ? t.savingKey : t.saveKey
|
|
22913
|
+
})
|
|
22914
|
+
]
|
|
22915
|
+
}), status?.authenticated && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
22916
|
+
className: "dsha-row",
|
|
22917
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
22918
|
+
className: "dsha-label",
|
|
22919
|
+
children: t.storagePath
|
|
22920
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
22921
|
+
className: "dsha-value",
|
|
22922
|
+
children: status.storagePath
|
|
22923
|
+
})]
|
|
22924
|
+
})]
|
|
22786
22925
|
})
|
|
22787
22926
|
]
|
|
22788
22927
|
}),
|
|
@@ -27075,7 +27214,39 @@ window.__ModuleLoader__.load({
|
|
|
27075
27214
|
composerGroups: " · Группы: ",
|
|
27076
27215
|
unknownGroup: "Автоматическая группа",
|
|
27077
27216
|
invalidCapacity: "Контекстное окно должно быть положительным целым числом.",
|
|
27078
|
-
errorGeneric: "Операция RelayOne не удалась."
|
|
27217
|
+
errorGeneric: "Операция RelayOne не удалась.",
|
|
27218
|
+
accountPool: "Пул API-ключей",
|
|
27219
|
+
addAccount: "Добавить ключ",
|
|
27220
|
+
accountCount: "Ключей добавлено: {count}",
|
|
27221
|
+
useKey: "Использовать этот ключ",
|
|
27222
|
+
switchingKey: "Переключение…",
|
|
27223
|
+
primaryAccount: "Основной",
|
|
27224
|
+
activeAccount: "Используется",
|
|
27225
|
+
setPrimary: "Сделать основным",
|
|
27226
|
+
deleteAccount: "Удалить",
|
|
27227
|
+
cooling: "Охлаждение",
|
|
27228
|
+
cooldownLeft: "Осталось {minutes} мин",
|
|
27229
|
+
cooldownRemaining: "Осталось {minutes} мин {seconds} с",
|
|
27230
|
+
cooldownRemainingSeconds: "Осталось {seconds} с",
|
|
27231
|
+
clearCooldown: "Сбросить охлаждение",
|
|
27232
|
+
needsRelogin: "Ключ отклонён",
|
|
27233
|
+
relogin: "Заменить ключ",
|
|
27234
|
+
rotationStrategy: "Стратегия ротации",
|
|
27235
|
+
strategySequential: "Последовательный расход (основной первым, переключение при 429)",
|
|
27236
|
+
strategyRoundRobin: "Круговая ротация (равномерно по ключам)",
|
|
27237
|
+
strategySticky: "Липкая сессия (текущий ключ до ограничения)",
|
|
27238
|
+
noAccounts: "Ключей пока нет. Вставьте токен RelayOne, чтобы добавить его в ротацию.",
|
|
27239
|
+
email: "Эл. почта",
|
|
27240
|
+
expires: "Срок токена",
|
|
27241
|
+
lastUsed: "Последний вызов",
|
|
27242
|
+
accountId: "ID ключа",
|
|
27243
|
+
accountQuota: "Квота",
|
|
27244
|
+
quotaNone: "Квота ещё не читалась",
|
|
27245
|
+
quotaSnapshot: "Снимок {time}",
|
|
27246
|
+
quotaResets: "Сброс",
|
|
27247
|
+
quotaExhausted: "Исчерпано",
|
|
27248
|
+
quotaWindow: "Окно лимита",
|
|
27249
|
+
quotaFactsScope: "Эти данные относятся к текущему ключу; прогресс каждого ключа показан на его карточке выше."
|
|
27079
27250
|
};
|
|
27080
27251
|
//#endregion
|
|
27081
27252
|
//#region src/client/locales-ru/claude-api.ts
|