dsh-xdpool 3.0.7 → 3.0.9
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 +90 -0
- package/README.md +16 -21
- package/assets/community-qr-qq.jpg +0 -0
- package/assets/icon.png +0 -0
- package/assets/xdpool-banner.gif +0 -0
- package/lib/bin.js +1030 -66
- package/lib/client.js +1488 -274
- package/lib/index.d.ts +507 -14
- package/lib/index.js +6158 -641
- package/package.json +1 -2
- package/vendor/channel-pack/pack.js +184 -49
package/lib/client.js
CHANGED
|
@@ -39,65 +39,79 @@ window.__ModuleLoader__.load({
|
|
|
39
39
|
}
|
|
40
40
|
//#endregion
|
|
41
41
|
//#region src/status-paths.ts
|
|
42
|
-
const POOL_STATUS_PATH = "/
|
|
43
|
-
const
|
|
44
|
-
const
|
|
45
|
-
const
|
|
46
|
-
const
|
|
47
|
-
const
|
|
48
|
-
const
|
|
49
|
-
const
|
|
50
|
-
const
|
|
51
|
-
const
|
|
52
|
-
const
|
|
53
|
-
const
|
|
54
|
-
const
|
|
55
|
-
const
|
|
56
|
-
const
|
|
57
|
-
const
|
|
58
|
-
const
|
|
59
|
-
const
|
|
60
|
-
const
|
|
61
|
-
const
|
|
62
|
-
const
|
|
63
|
-
const
|
|
64
|
-
const
|
|
65
|
-
const
|
|
66
|
-
const
|
|
67
|
-
const
|
|
68
|
-
const
|
|
69
|
-
const
|
|
70
|
-
const
|
|
71
|
-
const
|
|
72
|
-
const
|
|
73
|
-
const
|
|
74
|
-
const
|
|
75
|
-
const
|
|
76
|
-
const
|
|
77
|
-
const
|
|
78
|
-
const
|
|
79
|
-
const
|
|
80
|
-
const
|
|
81
|
-
const
|
|
82
|
-
const
|
|
83
|
-
const
|
|
84
|
-
const
|
|
85
|
-
const
|
|
86
|
-
const
|
|
87
|
-
const
|
|
88
|
-
const
|
|
89
|
-
const
|
|
90
|
-
const
|
|
91
|
-
const
|
|
92
|
-
const
|
|
93
|
-
const
|
|
94
|
-
const
|
|
42
|
+
const POOL_STATUS_PATH = "/dsh-xdpool/status";
|
|
43
|
+
const POOL_RESCAN_PATH = "/dsh-xdpool/accounts/rescan";
|
|
44
|
+
const POOL_CATALOG_REFRESH_PATH = "/dsh-xdpool/models/refresh";
|
|
45
|
+
const POOL_CHECKIN_PATH = "/dsh-xdpool/checkin";
|
|
46
|
+
const POOL_MODELS_SAVE_PATH = "/dsh-xdpool/models/save";
|
|
47
|
+
const POOL_ACCOUNT_IGNORE_PATH = "/dsh-xdpool/accounts/ignored";
|
|
48
|
+
const POOL_AUTOMATION_RUN_PATH = "/dsh-xdpool/automation/run";
|
|
49
|
+
const POOL_UPDATE_CHECK_PATH = "/dsh-xdpool/update";
|
|
50
|
+
const POOL_MARVIS_SESSION_PATH = "/dsh-xdpool/marvis/session";
|
|
51
|
+
const POOL_MARVIS_LOGIN_PATH = "/dsh-xdpool/marvis/login";
|
|
52
|
+
const POOL_MARVIS_WALLET_PATH = "/dsh-xdpool/marvis/wallet";
|
|
53
|
+
const POOL_ASTUDIO_SESSION_PATH = "/dsh-xdpool/astudio/session";
|
|
54
|
+
const POOL_ASTUDIO_BROWSER_LOGIN_PATH = "/dsh-xdpool/astudio/browser-login";
|
|
55
|
+
const POOL_ASTUDIO_LOGIN_PATH = "/dsh-xdpool/astudio/login";
|
|
56
|
+
const POOL_ASTUDIO_WALLET_PATH = "/dsh-xdpool/astudio/wallet";
|
|
57
|
+
const POOL_ASTUDIO_CHECKIN_PATH = "/dsh-xdpool/astudio/checkin";
|
|
58
|
+
const POOL_MAGICREW_CN_LOGIN_PATH = "/dsh-xdpool/magicrew/login";
|
|
59
|
+
const POOL_MAGICREW_INTL_LOGIN_PATH = "/dsh-xdpool/magicrew-intl/login";
|
|
60
|
+
const POOL_MAGICREW_CN_SESSION_PATH = "/dsh-xdpool/magicrew/session";
|
|
61
|
+
const POOL_MAGICREW_CN_WALLET_PATH = "/dsh-xdpool/magicrew/wallet";
|
|
62
|
+
const POOL_MAGICREW_CN_CHECKIN_PATH = "/dsh-xdpool/magicrew/checkin";
|
|
63
|
+
const POOL_MAGICREW_INTL_SESSION_PATH = "/dsh-xdpool/magicrew-intl/session";
|
|
64
|
+
const POOL_MAGICREW_INTL_WALLET_PATH = "/dsh-xdpool/magicrew-intl/wallet";
|
|
65
|
+
const POOL_MAGICREW_INTL_CHECKIN_PATH = "/dsh-xdpool/magicrew-intl/checkin";
|
|
66
|
+
const POOL_ACCIO_SESSION_PATH = "/dsh-xdpool/accio/session";
|
|
67
|
+
const POOL_ACCIO_QUOTA_PATH = "/dsh-xdpool/accio/quota";
|
|
68
|
+
const POOL_MONKEYCODE_CN_SESSION_PATH = "/dsh-xdpool/monkeycode/session";
|
|
69
|
+
const POOL_MONKEYCODE_CN_BROWSER_LOGIN_PATH = "/dsh-xdpool/monkeycode/browser-login";
|
|
70
|
+
const POOL_MONKEYCODE_INTL_BROWSER_LOGIN_PATH = "/dsh-xdpool/monkeycode-intl/browser-login";
|
|
71
|
+
const POOL_MONKEYCODE_CN_WALLET_PATH = "/dsh-xdpool/monkeycode/wallet";
|
|
72
|
+
const POOL_MONKEYCODE_INTL_SESSION_PATH = "/dsh-xdpool/monkeycode-intl/session";
|
|
73
|
+
const POOL_MONKEYCODE_INTL_WALLET_PATH = "/dsh-xdpool/monkeycode-intl/wallet";
|
|
74
|
+
const POOL_BAIZHI_SESSION_PATH = "/dsh-xdpool/baizhi/session";
|
|
75
|
+
const POOL_BAIZHI_BROWSER_LOGIN_PATH = "/dsh-xdpool/baizhi/browser-login";
|
|
76
|
+
const POOL_BAIZHI_WALLET_PATH = "/dsh-xdpool/baizhi/wallet";
|
|
77
|
+
const POOL_BAIZHI_CHECKIN_PATH = "/dsh-xdpool/baizhi/checkin";
|
|
78
|
+
const POOL_AUTOCLAW_INTL_SESSION_PATH = "/dsh-xdpool/autoclaw/session";
|
|
79
|
+
const POOL_AUTOCLAW_INTL_WALLET_PATH = "/dsh-xdpool/autoclaw/wallet";
|
|
80
|
+
const POOL_AUTOCLAW_CN_SESSION_PATH = "/dsh-xdpool/autoclaw-cn/session";
|
|
81
|
+
const POOL_AUTOCLAW_CN_WALLET_PATH = "/dsh-xdpool/autoclaw-cn/wallet";
|
|
82
|
+
const POOL_UPDATE_INSTALL_PATH = "/dsh-xdpool/update/install";
|
|
83
|
+
const POOL_CREDITS_SPEND_PATH = "/dsh-xdpool/credits/spend";
|
|
84
|
+
const POOL_ACCOUNT_PREFER_PATH = "/dsh-xdpool/accounts/preferred";
|
|
85
|
+
const POOL_AGGREGATE_PATH = "/dsh-xdpool/aggregate";
|
|
86
|
+
const POOL_AGGREGATE_SAVE_PATH = "/dsh-xdpool/aggregate/save";
|
|
87
|
+
const POOL_AGGREGATE_TEST_PATH = "/dsh-xdpool/aggregate/test";
|
|
88
|
+
const POOL_MODEL_PROBE_PATH = "/dsh-xdpool/model/test";
|
|
89
|
+
const POOL_CHANNEL_MODELS_PATH = "/dsh-xdpool/channels/models";
|
|
90
|
+
const POOL_AGGREGATE_DISCOVER_PATH = "/dsh-xdpool/aggregate/discover";
|
|
91
|
+
const POOL_CHANNELS_PATH = "/dsh-xdpool/channels";
|
|
92
|
+
const POOL_CHANNEL_USAGE_PATH = "/dsh-xdpool/channels/usage";
|
|
93
|
+
const POOL_DOUBAO_SESSION_PATH = "/dsh-xdpool/doubao/session";
|
|
94
|
+
const POOL_DOUBAO_QUOTA_PATH = "/dsh-xdpool/doubao/quota";
|
|
95
|
+
const POOL_DOUBAO_MODELS_PATH = "/dsh-xdpool/doubao/models";
|
|
96
|
+
const POOL_DOUBAO_CLAIM_PATH = "/dsh-xdpool/doubao/claim";
|
|
97
|
+
const POOL_LOGIN_PREFERENCES_PATH = "/dsh-xdpool/login-preferences";
|
|
98
|
+
const POOL_ROUTE_TRACE_PATH = "/dsh-xdpool/route-trace";
|
|
95
99
|
const ROUTE_OWNED_ELSEWHERE = "already-mounted-elsewhere";
|
|
96
|
-
const POOL_COMBOS_PATH = "/
|
|
97
|
-
const POOL_COMBOS_SAVE_PATH = "/
|
|
98
|
-
const
|
|
100
|
+
const POOL_COMBOS_PATH = "/dsh-xdpool/combos";
|
|
101
|
+
const POOL_COMBOS_SAVE_PATH = "/dsh-xdpool/combos/save";
|
|
102
|
+
const POOL_GROUPS_PATH = "/dsh-xdpool/groups";
|
|
103
|
+
const POOL_RELAY_PATH = "/dsh-xdpool/relay";
|
|
99
104
|
const CHANNEL_PACK_RPC_PATH = "/api/channel-pack";
|
|
100
|
-
const POOL_USAGE_PATH = "/
|
|
105
|
+
const POOL_USAGE_PATH = "/dsh-xdpool/usage";
|
|
106
|
+
const POOL_SESSION_ROUTE_PATH = "/dsh-xdpool/session";
|
|
107
|
+
const POOL_AUTOMATION_JOB_KINDS = [
|
|
108
|
+
"checkin",
|
|
109
|
+
"report",
|
|
110
|
+
"tasks",
|
|
111
|
+
"streak",
|
|
112
|
+
"travel",
|
|
113
|
+
"compensation"
|
|
114
|
+
];
|
|
101
115
|
Object.freeze([
|
|
102
116
|
"priority",
|
|
103
117
|
"round-robin",
|
|
@@ -115,7 +129,7 @@ window.__ModuleLoader__.load({
|
|
|
115
129
|
};
|
|
116
130
|
//#endregion
|
|
117
131
|
//#region src/client/avatar.ts
|
|
118
|
-
const POOL_CARD_AVATAR = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAQDAwQDAwQEAwQFBAQFBgoHBgYGBg0JCggKDw0QEA8NDw4RExgUERIXEg4PFRwVFxkZGxsbEBQdHx0aHxgaGxr/2wBDAQQFBQYFBgwHBwwaEQ8RGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhr/wAARCACAAIADASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRol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zuGBwYfGDdunVfe+ihhw45VHk835Y7r0SICt1GB0op2HDRhg3HDx1/Y7Vavdr3/fNEZIATAI/4jsBYQo7RCoDTeEFsYEjCjGPY7w66afpqk03atTOgWSoFER4BU+HXacdMixZwEkyxIFRKJTFCOjGnAxnzC/nCzmKp+K8DCxY89Ivt23/i9EBUrry9rC7Y8MoRHpErjUop2LRp07LDhw+fMzMz82u+9s/SPq9g4YXCsoC1ziuPSgxQQAASzQiEJjpv8By2rRqbuLEBaYgIeOaEMdCvsAkyolNchmBeBLSaRmw1r1lQi1yMcAqxnggiwoBN0YtXPmMTCm7y2OHlEEJQDYiQRcuh49aEZcaCRHWtdUUpVSOiGQCYBIBD+Xz+xZ6enh2jo6PP/nzbtueCeOLNhnTllVq0X8WDHK0gacGQe+65p/C9733PW7FiReHIkSP5crnslctlczz0CpSqUAIAgBJUAaBQZgyR7dWUrytBby+JUkoMhTtUq1UolUrRO+y1o0cVoBq7Vgmct0MJSlAnEve1lvPP+b7oUqXYj/H3mHEMDAxwLpfjsbGxxuTkZPXGG28MbrjhhkYTfS1p3pe8HFX/Hy0AaX3nMHFMCvz/j7nmirvkWuz68X8DiM54gJ7HYIMAAAAASUVORK5CYII=";
|
|
119
133
|
//#endregion
|
|
120
134
|
//#region src/client/account-card.tsx
|
|
121
135
|
const CREDITS = new Intl.NumberFormat();
|
|
@@ -189,7 +203,7 @@ window.__ModuleLoader__.load({
|
|
|
189
203
|
onClick: () => {
|
|
190
204
|
onPrefer(account.preferred ? null : account.id);
|
|
191
205
|
},
|
|
192
|
-
children: account.preferred ? t?.("row.accountPreferOn") ?? "
|
|
206
|
+
children: account.preferred ? t?.("row.accountPreferOn") ?? "取消优先" : t?.("row.accountPrefer") ?? "优先用此账号"
|
|
193
207
|
}),
|
|
194
208
|
(0, react_jsx_runtime.jsx)("button", {
|
|
195
209
|
type: "button",
|
|
@@ -269,7 +283,7 @@ window.__ModuleLoader__.load({
|
|
|
269
283
|
const POOL_NAV_ICON_MASK_URL = `data:image/svg+xml;utf8,${encodeURIComponent(POOL_NAV_ICON_SVG)}`;
|
|
270
284
|
//#endregion
|
|
271
285
|
//#region src/version.ts
|
|
272
|
-
const POOL_VERSION = "3.0.
|
|
286
|
+
const POOL_VERSION = "3.0.9";
|
|
273
287
|
function compareVersions(left, right) {
|
|
274
288
|
const parse = (value) => {
|
|
275
289
|
const [core, ...rest] = value.trim().replace(/^v/u, "").split("-");
|
|
@@ -8078,6 +8092,7 @@ window.__ModuleLoader__.load({
|
|
|
8078
8092
|
"baseUrl": "",
|
|
8079
8093
|
"format": "openai-chat",
|
|
8080
8094
|
"models": [],
|
|
8095
|
+
"modelsUrl": "/models",
|
|
8081
8096
|
"notes": "Any OpenAI-compatible endpoint — vLLM, LiteLLM, one-api, LM Studio, a self-hosted gateway. Paste the base URL (ending in /v1) and the key on this card, then press Fetch models.",
|
|
8082
8097
|
"website": null,
|
|
8083
8098
|
"local": false,
|
|
@@ -8095,6 +8110,50 @@ window.__ModuleLoader__.load({
|
|
|
8095
8110
|
"anthropic-messages": "/messages"
|
|
8096
8111
|
});
|
|
8097
8112
|
typeof process === "undefined" || process.platform;
|
|
8113
|
+
//#endregion
|
|
8114
|
+
//#region src/group-routing.ts
|
|
8115
|
+
function identityOrder(seats) {
|
|
8116
|
+
return seats.map((_, i) => i);
|
|
8117
|
+
}
|
|
8118
|
+
function smartOrder(seats) {
|
|
8119
|
+
const idx = seats.map((_, i) => i);
|
|
8120
|
+
const tier = (s) => {
|
|
8121
|
+
if (s.resting === true || s.spent === true || (s.used ?? 0) >= 1) return 2;
|
|
8122
|
+
if ((s.used ?? 0) >= .9) return 1;
|
|
8123
|
+
return 0;
|
|
8124
|
+
};
|
|
8125
|
+
return idx.sort((a, b) => {
|
|
8126
|
+
const ta = tier(seats[a]), tb = tier(seats[b]);
|
|
8127
|
+
if (ta !== tb) return ta - tb;
|
|
8128
|
+
const ra = seats[a].renewsInMs ?? Number.MAX_SAFE_INTEGER;
|
|
8129
|
+
const rb = seats[b].renewsInMs ?? Number.MAX_SAFE_INTEGER;
|
|
8130
|
+
if (ra !== rb) return ra - rb;
|
|
8131
|
+
return (seats[a].used ?? 0) - (seats[b].used ?? 0);
|
|
8132
|
+
});
|
|
8133
|
+
}
|
|
8134
|
+
function cheapestOrder(seats) {
|
|
8135
|
+
return seats.map((_, i) => i).sort((a, b) => {
|
|
8136
|
+
const ca = seats[a].cost ?? Number.MAX_SAFE_INTEGER;
|
|
8137
|
+
const cb = seats[b].cost ?? Number.MAX_SAFE_INTEGER;
|
|
8138
|
+
if (ca !== cb) return ca - cb;
|
|
8139
|
+
return (seats[a].window ?? Number.MAX_SAFE_INTEGER) - (seats[b].window ?? Number.MAX_SAFE_INTEGER);
|
|
8140
|
+
});
|
|
8141
|
+
}
|
|
8142
|
+
function freeFirstOrder(seats) {
|
|
8143
|
+
return seats.map((_, i) => i).sort((a, b) => {
|
|
8144
|
+
const fa = seats[a].free === true && (seats[a].used ?? 0) < 1 ? 0 : 1;
|
|
8145
|
+
const fb = seats[b].free === true && (seats[b].used ?? 0) < 1 ? 0 : 1;
|
|
8146
|
+
if (fa !== fb) return fa - fb;
|
|
8147
|
+
return smartOrder([seats[a], seats[b]])[0] === 0 ? -1 : 1;
|
|
8148
|
+
});
|
|
8149
|
+
}
|
|
8150
|
+
Object.freeze({
|
|
8151
|
+
smart: { order: smartOrder },
|
|
8152
|
+
ordered: { order: identityOrder },
|
|
8153
|
+
"round-robin": { order: identityOrder },
|
|
8154
|
+
cheapest: { order: cheapestOrder },
|
|
8155
|
+
"free-first": { order: freeFirstOrder }
|
|
8156
|
+
});
|
|
8098
8157
|
Object.freeze({
|
|
8099
8158
|
"openai-chat": "chat",
|
|
8100
8159
|
"openai-responses": "responses",
|
|
@@ -9292,6 +9351,34 @@ window.__ModuleLoader__.load({
|
|
|
9292
9351
|
})
|
|
9293
9352
|
});
|
|
9294
9353
|
}
|
|
9354
|
+
const BADGE_FREE_LABEL = "限时免费";
|
|
9355
|
+
const COLOR_TAIL = /^[0-9A-Fa-f]{3,8}$/;
|
|
9356
|
+
function parseBadgeTags(tags) {
|
|
9357
|
+
const out = [];
|
|
9358
|
+
for (const tag of tags ?? []) {
|
|
9359
|
+
if (!tag.startsWith("badge:")) continue;
|
|
9360
|
+
const rest = tag.slice(6);
|
|
9361
|
+
const hash = rest.lastIndexOf("#");
|
|
9362
|
+
const tail = hash === -1 ? "" : rest.slice(hash + 1);
|
|
9363
|
+
const isColor = hash !== -1 && COLOR_TAIL.test(tail);
|
|
9364
|
+
const cut = (hash === -1 ? rest : rest.slice(0, hash)).trim();
|
|
9365
|
+
const label = isColor ? cut.replace(/:$/, "").trim() : cut;
|
|
9366
|
+
if (label === "") continue;
|
|
9367
|
+
out.push(isColor ? {
|
|
9368
|
+
label,
|
|
9369
|
+
color: tail
|
|
9370
|
+
} : { label });
|
|
9371
|
+
}
|
|
9372
|
+
return out;
|
|
9373
|
+
}
|
|
9374
|
+
function hasFreeBadge(tags) {
|
|
9375
|
+
return parseBadgeTags(tags).some((badge) => badge.label === BADGE_FREE_LABEL);
|
|
9376
|
+
}
|
|
9377
|
+
function freeBadgeKind(model) {
|
|
9378
|
+
if (hasFreeBadge(model.tags)) return "badge";
|
|
9379
|
+
if (model.multiplier === 0 || (model.tags ?? []).includes("free")) return "generic";
|
|
9380
|
+
if (typeof model.id === "string" && /-free$/u.test(model.id)) return "generic";
|
|
9381
|
+
}
|
|
9295
9382
|
//#endregion
|
|
9296
9383
|
//#region src/client/channel-rpc.ts
|
|
9297
9384
|
let packRpcBridge;
|
|
@@ -9425,13 +9512,17 @@ window.__ModuleLoader__.load({
|
|
|
9425
9512
|
const provider = entry.provider;
|
|
9426
9513
|
const expiresAt = entry.expiresAt;
|
|
9427
9514
|
const refreshable = entry.refreshable;
|
|
9515
|
+
const createdAt = entry.createdAt;
|
|
9428
9516
|
rows.push({
|
|
9429
9517
|
id,
|
|
9430
9518
|
provider: typeof provider === "string" ? provider : "",
|
|
9431
9519
|
...entry.nickname !== void 0 ? { nickname: String(entry.nickname) } : {},
|
|
9520
|
+
...typeof entry.label === "string" && entry.label !== "" ? { label: entry.label } : {},
|
|
9432
9521
|
...entry.enabled !== void 0 ? { enabled: entry.enabled === true } : {},
|
|
9433
9522
|
...typeof expiresAt === "number" && Number.isFinite(expiresAt) && expiresAt > 0 ? { expiresAt } : {},
|
|
9434
|
-
...
|
|
9523
|
+
...typeof createdAt === "number" && Number.isFinite(createdAt) && createdAt > 0 ? { createdAt } : {},
|
|
9524
|
+
...refreshable === true ? { refreshable: true } : {},
|
|
9525
|
+
...entry.credits !== void 0 && entry.credits !== null && typeof entry.credits === "object" ? { credits: entry.credits } : {}
|
|
9435
9526
|
});
|
|
9436
9527
|
}
|
|
9437
9528
|
return rows;
|
|
@@ -9449,13 +9540,21 @@ window.__ModuleLoader__.load({
|
|
|
9449
9540
|
const description = value.description;
|
|
9450
9541
|
const disabled = value.disabled;
|
|
9451
9542
|
const isFree = value.isFree;
|
|
9543
|
+
const multiplier = value.multiplier;
|
|
9544
|
+
const tags = value.tags;
|
|
9452
9545
|
const dead = value.dead;
|
|
9453
9546
|
const reasoning = value.reasoning;
|
|
9454
9547
|
return {
|
|
9455
9548
|
id,
|
|
9456
9549
|
name: typeof name === "string" && name !== "" ? name : id,
|
|
9457
9550
|
...disabled === true ? { disabled: true } : {},
|
|
9458
|
-
...isFree === true
|
|
9551
|
+
...isFree === true || freeBadgeKind({
|
|
9552
|
+
id,
|
|
9553
|
+
multiplier,
|
|
9554
|
+
tags
|
|
9555
|
+
}) !== void 0 ? { isFree: true } : {},
|
|
9556
|
+
...typeof multiplier === "number" && Number.isFinite(multiplier) ? { multiplier } : {},
|
|
9557
|
+
...Array.isArray(tags) ? { tags: tags.filter((tag) => typeof tag === "string") } : {},
|
|
9459
9558
|
...dead === true ? { dead: true } : {},
|
|
9460
9559
|
...reasoning === true ? { reasoning: true } : {},
|
|
9461
9560
|
...typeof contextWindow === "number" && Number.isFinite(contextWindow) && contextWindow > 0 ? { contextWindow } : {},
|
|
@@ -9475,6 +9574,7 @@ window.__ModuleLoader__.load({
|
|
|
9475
9574
|
}
|
|
9476
9575
|
function isFreeChannelModel(model) {
|
|
9477
9576
|
if (model.isFree === true) return true;
|
|
9577
|
+
if (freeBadgeKind(model) !== void 0) return true;
|
|
9478
9578
|
const tag = /[·・]\s*(x\s*[\d.]+(?:\s*→\s*x?[\d.]+)?|免费|限时免费)\s*$/iu.exec(model.name ?? "")?.[1];
|
|
9479
9579
|
if (tag === void 0) return false;
|
|
9480
9580
|
if (/免费/u.test(tag)) return true;
|
|
@@ -9512,15 +9612,32 @@ window.__ModuleLoader__.load({
|
|
|
9512
9612
|
const remaining = entry.remaining;
|
|
9513
9613
|
const total = entry.total;
|
|
9514
9614
|
const unit = entry.unit;
|
|
9615
|
+
const explicitAmount = entry.amount;
|
|
9616
|
+
const amount = typeof explicitAmount === "number" && Number.isFinite(explicitAmount) ? explicitAmount : remaining;
|
|
9617
|
+
const expiresAt = entry.expiresAt;
|
|
9515
9618
|
rows.push({
|
|
9516
9619
|
name,
|
|
9517
|
-
...typeof
|
|
9620
|
+
...typeof amount === "number" && Number.isFinite(amount) ? { amount } : {},
|
|
9518
9621
|
...typeof total === "number" && Number.isFinite(total) ? { total } : {},
|
|
9519
|
-
...typeof unit === "string" && unit !== "" ? { unit } : {}
|
|
9622
|
+
...typeof unit === "string" && unit !== "" ? { unit } : {},
|
|
9623
|
+
...typeof expiresAt === "number" && Number.isFinite(expiresAt) ? { expiresAt } : {}
|
|
9520
9624
|
});
|
|
9521
9625
|
}
|
|
9522
9626
|
return rows;
|
|
9523
9627
|
}
|
|
9628
|
+
function packageFigures(pkg) {
|
|
9629
|
+
const total = typeof pkg.total === "number" && Number.isFinite(pkg.total) ? pkg.total : void 0;
|
|
9630
|
+
const totalPart = total === void 0 ? {} : { total };
|
|
9631
|
+
if (typeof pkg.amount === "number" && Number.isFinite(pkg.amount)) return {
|
|
9632
|
+
amount: pkg.amount,
|
|
9633
|
+
...totalPart
|
|
9634
|
+
};
|
|
9635
|
+
if (typeof pkg.remaining === "number" && Number.isFinite(pkg.remaining)) return {
|
|
9636
|
+
percent: pkg.remaining,
|
|
9637
|
+
...totalPart
|
|
9638
|
+
};
|
|
9639
|
+
return totalPart;
|
|
9640
|
+
}
|
|
9524
9641
|
function balancesFrom(envelope) {
|
|
9525
9642
|
const value = envelope.value;
|
|
9526
9643
|
if (value === null || typeof value !== "object") return [];
|
|
@@ -9545,6 +9662,29 @@ window.__ModuleLoader__.load({
|
|
|
9545
9662
|
}
|
|
9546
9663
|
return rows;
|
|
9547
9664
|
}
|
|
9665
|
+
function creditStatusesFrom(envelope) {
|
|
9666
|
+
const value = envelope.value;
|
|
9667
|
+
if (value === null || typeof value !== "object") return [];
|
|
9668
|
+
const accounts = value.accounts;
|
|
9669
|
+
if (!Array.isArray(accounts)) return [];
|
|
9670
|
+
const rows = [];
|
|
9671
|
+
for (const entry of accounts) {
|
|
9672
|
+
if (entry === null || typeof entry !== "object") continue;
|
|
9673
|
+
const accountId = entry.accountId;
|
|
9674
|
+
if (typeof accountId !== "string" || accountId === "") continue;
|
|
9675
|
+
const nickname = entry.nickname;
|
|
9676
|
+
const status = entry.status;
|
|
9677
|
+
const statusRow = status !== null && typeof status === "object" ? status : void 0;
|
|
9678
|
+
const todayCredit = statusRow?.["todayCredit"];
|
|
9679
|
+
rows.push({
|
|
9680
|
+
accountId,
|
|
9681
|
+
...typeof nickname === "string" && nickname !== "" ? { nickname } : {},
|
|
9682
|
+
...statusRow?.["todayCheckedIn"] === true ? { todayCheckedIn: true } : {},
|
|
9683
|
+
...typeof todayCredit === "number" && Number.isFinite(todayCredit) ? { todayCredit } : {}
|
|
9684
|
+
});
|
|
9685
|
+
}
|
|
9686
|
+
return rows;
|
|
9687
|
+
}
|
|
9548
9688
|
async function fetchChannels() {
|
|
9549
9689
|
const response = await fetch(POOL_CHANNELS_PATH, {
|
|
9550
9690
|
headers: { accept: "application/json" },
|
|
@@ -9658,6 +9798,182 @@ window.__ModuleLoader__.load({
|
|
|
9658
9798
|
};
|
|
9659
9799
|
}
|
|
9660
9800
|
//#endregion
|
|
9801
|
+
//#region src/client/channel-order.ts
|
|
9802
|
+
const ADDED_AT_KEY = "dsh-xdpool.channel-added-at.v1";
|
|
9803
|
+
function readChannelAddedAt() {
|
|
9804
|
+
try {
|
|
9805
|
+
const raw = globalThis.localStorage?.getItem(ADDED_AT_KEY);
|
|
9806
|
+
if (raw === null || raw === void 0) return {};
|
|
9807
|
+
const parsed = JSON.parse(raw);
|
|
9808
|
+
if (parsed === null || typeof parsed !== "object" || Array.isArray(parsed)) return {};
|
|
9809
|
+
const out = {};
|
|
9810
|
+
for (const [channelId, at] of Object.entries(parsed)) {
|
|
9811
|
+
if (channelId === "" || typeof at !== "number" || !Number.isFinite(at) || at <= 0) continue;
|
|
9812
|
+
out[channelId] = at;
|
|
9813
|
+
}
|
|
9814
|
+
return out;
|
|
9815
|
+
} catch {
|
|
9816
|
+
return {};
|
|
9817
|
+
}
|
|
9818
|
+
}
|
|
9819
|
+
function rememberChannelAddedAt(previous, channelId, at) {
|
|
9820
|
+
const next = {
|
|
9821
|
+
...previous,
|
|
9822
|
+
[channelId]: at
|
|
9823
|
+
};
|
|
9824
|
+
try {
|
|
9825
|
+
globalThis.localStorage?.setItem(ADDED_AT_KEY, JSON.stringify(next));
|
|
9826
|
+
} catch {}
|
|
9827
|
+
return next;
|
|
9828
|
+
}
|
|
9829
|
+
function channelRecency(accounts, sessionStamps) {
|
|
9830
|
+
const newest = new Map();
|
|
9831
|
+
const offer = (channelId, at) => {
|
|
9832
|
+
if (at === void 0 || !Number.isFinite(at) || at <= 0) return;
|
|
9833
|
+
const current = newest.get(channelId);
|
|
9834
|
+
if (current === void 0 || at > current) newest.set(channelId, at);
|
|
9835
|
+
};
|
|
9836
|
+
for (const account of accounts) {
|
|
9837
|
+
if (account.provider === "") continue;
|
|
9838
|
+
offer(account.provider, account.createdAt);
|
|
9839
|
+
}
|
|
9840
|
+
for (const [channelId, at] of Object.entries(sessionStamps)) offer(channelId, at ?? void 0);
|
|
9841
|
+
return newest;
|
|
9842
|
+
}
|
|
9843
|
+
function orderChannelsByRecency(channels, recency) {
|
|
9844
|
+
return channels.map((channel, index) => ({
|
|
9845
|
+
channel,
|
|
9846
|
+
index,
|
|
9847
|
+
at: recency.get(channel.id) ?? 0
|
|
9848
|
+
})).sort((a, b) => b.at - a.at || a.index - b.index).map((entry) => entry.channel);
|
|
9849
|
+
}
|
|
9850
|
+
//#endregion
|
|
9851
|
+
//#region src/client/lane-helpers.ts
|
|
9852
|
+
function laneRegionOf(provider) {
|
|
9853
|
+
if (provider === "buddy") return "cn";
|
|
9854
|
+
if (provider === "workbuddy") return "global";
|
|
9855
|
+
}
|
|
9856
|
+
const POOL_LANE_NONE_ID = "__none__";
|
|
9857
|
+
const laneSelectionCache = new Map();
|
|
9858
|
+
async function readLaneStatus(region) {
|
|
9859
|
+
try {
|
|
9860
|
+
const response = await fetch(`${POOL_STATUS_PATH}?region=${region}`, {
|
|
9861
|
+
headers: { accept: "application/json" },
|
|
9862
|
+
credentials: "same-origin"
|
|
9863
|
+
});
|
|
9864
|
+
if (!response.ok) return {
|
|
9865
|
+
ok: false,
|
|
9866
|
+
error: { message: `HTTP ${String(response.status)}` }
|
|
9867
|
+
};
|
|
9868
|
+
const status = await response.json().catch(() => void 0);
|
|
9869
|
+
if (status !== void 0 && status.selection !== void 0) laneSelectionCache.set(region, status.selection);
|
|
9870
|
+
return {
|
|
9871
|
+
ok: true,
|
|
9872
|
+
value: status
|
|
9873
|
+
};
|
|
9874
|
+
} catch (cause) {
|
|
9875
|
+
return {
|
|
9876
|
+
ok: false,
|
|
9877
|
+
error: { message: cause instanceof Error ? cause.message : String(cause) }
|
|
9878
|
+
};
|
|
9879
|
+
}
|
|
9880
|
+
}
|
|
9881
|
+
async function readLaneModels(region) {
|
|
9882
|
+
const status = await readLaneStatus(region);
|
|
9883
|
+
if (!status.ok) return {
|
|
9884
|
+
ok: false,
|
|
9885
|
+
error: status.error
|
|
9886
|
+
};
|
|
9887
|
+
const rows = status.value?.models ?? [];
|
|
9888
|
+
const models = [];
|
|
9889
|
+
for (const row of rows) {
|
|
9890
|
+
if (typeof row.id !== "string" || row.id === "") continue;
|
|
9891
|
+
const free = freeBadgeKind(row);
|
|
9892
|
+
models.push({
|
|
9893
|
+
id: row.id,
|
|
9894
|
+
name: typeof row.name === "string" && row.name !== "" ? row.name : row.id,
|
|
9895
|
+
...typeof row.description === "string" && row.description !== "" ? { description: row.description } : {},
|
|
9896
|
+
...free === void 0 ? {} : { isFree: true },
|
|
9897
|
+
...row.enabled === false ? { disabled: true } : {},
|
|
9898
|
+
...typeof row.multiplier === "number" ? { multiplier: row.multiplier } : {},
|
|
9899
|
+
...typeof row.contextWindow === "number" && row.contextWindow > 0 ? { contextWindow: row.contextWindow } : {},
|
|
9900
|
+
...row.nativeContextWindow > 0 ? { nativeContextWindow: row.nativeContextWindow } : {},
|
|
9901
|
+
...row.maxOutputTokens > 0 ? { maxTokens: row.maxOutputTokens } : {},
|
|
9902
|
+
...row.supportsImages ? { inputModalities: ["text", "image"] } : {}
|
|
9903
|
+
});
|
|
9904
|
+
}
|
|
9905
|
+
return {
|
|
9906
|
+
ok: true,
|
|
9907
|
+
value: { models }
|
|
9908
|
+
};
|
|
9909
|
+
}
|
|
9910
|
+
async function readLaneAccounts(region) {
|
|
9911
|
+
const status = await readLaneStatus(region);
|
|
9912
|
+
if (!status.ok) return {
|
|
9913
|
+
ok: false,
|
|
9914
|
+
error: status.error
|
|
9915
|
+
};
|
|
9916
|
+
const rows = status.value?.accounts ?? [];
|
|
9917
|
+
const provider = region === "cn" ? "buddy" : "workbuddy";
|
|
9918
|
+
const accounts = rows.map((row) => ({
|
|
9919
|
+
id: row.id,
|
|
9920
|
+
provider,
|
|
9921
|
+
...typeof row.nickname === "string" && row.nickname !== "" ? { nickname: row.nickname } : {},
|
|
9922
|
+
...typeof row.label === "string" && row.label !== "" ? { label: row.label } : {},
|
|
9923
|
+
...typeof row.expiresAt === "string" ? { expiresAt: Date.parse(row.expiresAt) } : {},
|
|
9924
|
+
enabled: !row.disabled,
|
|
9925
|
+
...row.credits !== void 0 ? { credits: row.credits } : {}
|
|
9926
|
+
}));
|
|
9927
|
+
const checkin = [];
|
|
9928
|
+
for (const row of rows) {
|
|
9929
|
+
const today = row.checkin;
|
|
9930
|
+
if (today === void 0) continue;
|
|
9931
|
+
checkin.push({
|
|
9932
|
+
accountId: row.id,
|
|
9933
|
+
...typeof row.nickname === "string" && row.nickname !== "" ? { nickname: row.nickname } : {},
|
|
9934
|
+
...today.todayCheckedIn ? { todayCheckedIn: true } : {},
|
|
9935
|
+
...typeof today.todayCredit === "number" ? { todayCredit: today.todayCredit } : {}
|
|
9936
|
+
});
|
|
9937
|
+
}
|
|
9938
|
+
return {
|
|
9939
|
+
ok: true,
|
|
9940
|
+
value: {
|
|
9941
|
+
accounts,
|
|
9942
|
+
checkin
|
|
9943
|
+
}
|
|
9944
|
+
};
|
|
9945
|
+
}
|
|
9946
|
+
async function laneSelectionOf(region) {
|
|
9947
|
+
if (!laneSelectionCache.has(region)) await readLaneModels(region);
|
|
9948
|
+
return laneSelectionCache.get(region);
|
|
9949
|
+
}
|
|
9950
|
+
async function saveLaneModels(region, ids) {
|
|
9951
|
+
const held = await laneSelectionOf(region);
|
|
9952
|
+
const response = await fetch(POOL_MODELS_SAVE_PATH, {
|
|
9953
|
+
method: "POST",
|
|
9954
|
+
headers: {
|
|
9955
|
+
"content-type": "application/json",
|
|
9956
|
+
accept: "application/json"
|
|
9957
|
+
},
|
|
9958
|
+
credentials: "same-origin",
|
|
9959
|
+
body: JSON.stringify({
|
|
9960
|
+
region,
|
|
9961
|
+
enabledModelIds: ids,
|
|
9962
|
+
...Array.isArray(held?.imageModelIds) ? { imageModelIds: held.imageModelIds } : {},
|
|
9963
|
+
...held?.contextBudgets !== void 0 ? { contextBudgets: held.contextBudgets } : {}
|
|
9964
|
+
})
|
|
9965
|
+
});
|
|
9966
|
+
const body = await response.json().catch(() => void 0);
|
|
9967
|
+
if (!response.ok) return {
|
|
9968
|
+
ok: false,
|
|
9969
|
+
error: { message: typeof body?.error === "string" ? body.error : `HTTP ${String(response.status)}` }
|
|
9970
|
+
};
|
|
9971
|
+
return {
|
|
9972
|
+
ok: true,
|
|
9973
|
+
value: body
|
|
9974
|
+
};
|
|
9975
|
+
}
|
|
9976
|
+
//#endregion
|
|
9661
9977
|
//#region src/client/login-routes.ts
|
|
9662
9978
|
const WINDOW_LOGIN_ROUTES = Object.freeze({
|
|
9663
9979
|
"doubao": POOL_DOUBAO_SESSION_PATH,
|
|
@@ -9689,6 +10005,92 @@ window.__ModuleLoader__.load({
|
|
|
9689
10005
|
return loginKindOf(channelId) !== "pack";
|
|
9690
10006
|
}
|
|
9691
10007
|
//#endregion
|
|
10008
|
+
//#region src/manual-callback.ts
|
|
10009
|
+
const LOOPBACK_HOSTS = new Set([
|
|
10010
|
+
"127.0.0.1",
|
|
10011
|
+
"localhost",
|
|
10012
|
+
"::1",
|
|
10013
|
+
"[::1]"
|
|
10014
|
+
]);
|
|
10015
|
+
function checkManualCallback(raw, expected = {}) {
|
|
10016
|
+
const text = raw.trim();
|
|
10017
|
+
if (text === "") return {
|
|
10018
|
+
ok: false,
|
|
10019
|
+
reason: "empty"
|
|
10020
|
+
};
|
|
10021
|
+
let url;
|
|
10022
|
+
try {
|
|
10023
|
+
url = new URL(text);
|
|
10024
|
+
} catch {
|
|
10025
|
+
return {
|
|
10026
|
+
ok: false,
|
|
10027
|
+
reason: "not-a-url"
|
|
10028
|
+
};
|
|
10029
|
+
}
|
|
10030
|
+
const host = url.hostname.replace(/^\[|\]$/gu, "");
|
|
10031
|
+
if (!LOOPBACK_HOSTS.has(host) && host !== "127.0.0.1") return {
|
|
10032
|
+
ok: false,
|
|
10033
|
+
reason: "not-loopback"
|
|
10034
|
+
};
|
|
10035
|
+
if (expected.path !== void 0 && url.pathname !== expected.path) return {
|
|
10036
|
+
ok: false,
|
|
10037
|
+
reason: "wrong-path"
|
|
10038
|
+
};
|
|
10039
|
+
if (expected.port !== void 0 && url.port !== expected.port && url.port !== "") return {
|
|
10040
|
+
ok: false,
|
|
10041
|
+
reason: "wrong-port"
|
|
10042
|
+
};
|
|
10043
|
+
if (expected.state !== void 0 && url.searchParams.get("state") !== expected.state) return {
|
|
10044
|
+
ok: false,
|
|
10045
|
+
reason: "wrong-state"
|
|
10046
|
+
};
|
|
10047
|
+
const code = url.searchParams.get("code");
|
|
10048
|
+
if (code === null || code === "") return {
|
|
10049
|
+
ok: false,
|
|
10050
|
+
reason: "no-code"
|
|
10051
|
+
};
|
|
10052
|
+
return {
|
|
10053
|
+
ok: true,
|
|
10054
|
+
code
|
|
10055
|
+
};
|
|
10056
|
+
}
|
|
10057
|
+
function callbackReasonText(reason) {
|
|
10058
|
+
switch (reason) {
|
|
10059
|
+
case "empty": return "先把浏览器地址栏里那条完整链接复制过来。";
|
|
10060
|
+
case "not-a-url": return "这不像一条完整的地址。请复制地址栏里以 http:// 或 https:// 开头的整条链接。";
|
|
10061
|
+
case "not-loopback": return "这条地址的主机不是本机(127.0.0.1 / localhost)。请复制浏览器实际跳转到的那条本机地址。";
|
|
10062
|
+
case "wrong-path": return "这条地址不是本次登录的回调地址。请回到跳转失败的那一页重新复制。";
|
|
10063
|
+
case "wrong-port": return "这条地址的端口和本次登录不一致。请重新发起登录,再粘贴新的地址。";
|
|
10064
|
+
case "wrong-state": return "这条地址属于另一次登录。请用本次登录页面跳出来的那条地址。";
|
|
10065
|
+
case "no-code": return "这段地址里找不到授权码。如果只复制到了 ?code=… 的查询串,请把前面的地址一起带上。";
|
|
10066
|
+
case "expired":
|
|
10067
|
+
case "already-claimed": return "这份回调属于上一轮登录(已成功或已超时),本轮没有使用它。请重新点击「新建账号」发起登录。";
|
|
10068
|
+
}
|
|
10069
|
+
}
|
|
10070
|
+
//#endregion
|
|
10071
|
+
//#region src/client/region-card.tsx
|
|
10072
|
+
const REGION_CARD_ORDER = ["cn", "global"];
|
|
10073
|
+
const REGION_CHANNEL_BY_REGION = Object.freeze({
|
|
10074
|
+
cn: "buddy",
|
|
10075
|
+
global: "workbuddy"
|
|
10076
|
+
});
|
|
10077
|
+
Object.freeze({
|
|
10078
|
+
cn: "chat",
|
|
10079
|
+
global: "globe"
|
|
10080
|
+
});
|
|
10081
|
+
Object.freeze({
|
|
10082
|
+
cn: Object.freeze({
|
|
10083
|
+
accent: "#6f5cf0",
|
|
10084
|
+
from: "#4f6ef7",
|
|
10085
|
+
to: "#8b5cf6"
|
|
10086
|
+
}),
|
|
10087
|
+
global: Object.freeze({
|
|
10088
|
+
accent: "#10a5a0",
|
|
10089
|
+
from: "#0fb5a4",
|
|
10090
|
+
to: "#3fd6a8"
|
|
10091
|
+
})
|
|
10092
|
+
});
|
|
10093
|
+
//#endregion
|
|
9692
10094
|
//#region src/doubao-models.ts
|
|
9693
10095
|
const DOUBAO_MODELS = [
|
|
9694
10096
|
{
|
|
@@ -9765,6 +10167,42 @@ window.__ModuleLoader__.load({
|
|
|
9765
10167
|
}
|
|
9766
10168
|
//#endregion
|
|
9767
10169
|
//#region src/client/ChannelPoolSection.tsx
|
|
10170
|
+
function automationHoursOf(automation, kind) {
|
|
10171
|
+
switch (kind) {
|
|
10172
|
+
case "checkin": return automation.checkinHours;
|
|
10173
|
+
case "report": return automation.reportHours;
|
|
10174
|
+
case "tasks": return automation.taskHours;
|
|
10175
|
+
case "streak": return automation.streakHours;
|
|
10176
|
+
case "travel": return automation.travelHours;
|
|
10177
|
+
case "compensation": return automation.compensationHours;
|
|
10178
|
+
}
|
|
10179
|
+
}
|
|
10180
|
+
function automationScheduleText(t, hours) {
|
|
10181
|
+
if (hours.length === 0) return t?.("row.autoHourNone") ?? "skipped today";
|
|
10182
|
+
return hours.map((hour) => `${String(hour).padStart(2, "0")}:00`).join(" / ");
|
|
10183
|
+
}
|
|
10184
|
+
function automationLastRunText(t, state) {
|
|
10185
|
+
if (state.lastRunAtMs === void 0) return t?.("row.autoNever") ?? "not run yet";
|
|
10186
|
+
return new Date(state.lastRunAtMs).toLocaleTimeString([], {
|
|
10187
|
+
hour: "2-digit",
|
|
10188
|
+
minute: "2-digit",
|
|
10189
|
+
hour12: false
|
|
10190
|
+
});
|
|
10191
|
+
}
|
|
10192
|
+
function automationJobChip(t, state) {
|
|
10193
|
+
if (state.failed > 0) return {
|
|
10194
|
+
text: `${String(state.failed)} ${t?.("row.autoItem.failed") ?? "failed"}`,
|
|
10195
|
+
tone: "err"
|
|
10196
|
+
};
|
|
10197
|
+
if (state.lastRunAtMs === void 0) return {
|
|
10198
|
+
text: t?.("row.autoNever") ?? "not run yet",
|
|
10199
|
+
tone: void 0
|
|
10200
|
+
};
|
|
10201
|
+
return {
|
|
10202
|
+
text: `${String(state.ok)} ${t?.("row.autoJobOk") ?? "ok"}`,
|
|
10203
|
+
tone: "ok"
|
|
10204
|
+
};
|
|
10205
|
+
}
|
|
9768
10206
|
let poolSnapshot;
|
|
9769
10207
|
const COUNTS_STORE_KEY = "dsh-xdpool.channel-counts.v1";
|
|
9770
10208
|
const DOUBAO_SKIP_KEY = "dsh-xdpool.doubao-skipped-models.v1";
|
|
@@ -9809,7 +10247,7 @@ window.__ModuleLoader__.load({
|
|
|
9809
10247
|
const fingerprint = JSON.stringify([[...ids].sort(), hideAll]);
|
|
9810
10248
|
if (fingerprint === lastMirroredDoubaoDisabled) return;
|
|
9811
10249
|
try {
|
|
9812
|
-
if (!(await fetch("/
|
|
10250
|
+
if (!(await fetch("/dsh-xdpool/doubao/models", {
|
|
9813
10251
|
method: "POST",
|
|
9814
10252
|
headers: { "content-type": "application/json" },
|
|
9815
10253
|
credentials: "same-origin",
|
|
@@ -9890,10 +10328,11 @@ window.__ModuleLoader__.load({
|
|
|
9890
10328
|
try {
|
|
9891
10329
|
const body = await (await fetch(POOL_DOUBAO_SESSION_PATH, { credentials: "same-origin" })).json().catch(() => void 0);
|
|
9892
10330
|
if (body?.signedIn !== true) return void 0;
|
|
10331
|
+
const first = Array.isArray(body.accounts) ? body.accounts.find((a) => a.active !== false) ?? body.accounts[0] : void 0;
|
|
9893
10332
|
return {
|
|
9894
10333
|
id: "doubao:session",
|
|
9895
10334
|
provider: "doubao",
|
|
9896
|
-
nickname: typeof
|
|
10335
|
+
nickname: typeof first?.name === "string" && first.name !== "" ? first.name : "豆包账号",
|
|
9897
10336
|
enabled: true
|
|
9898
10337
|
};
|
|
9899
10338
|
} catch {
|
|
@@ -9923,6 +10362,7 @@ window.__ModuleLoader__.load({
|
|
|
9923
10362
|
if (windows.length === 0) return [{
|
|
9924
10363
|
accountId: "doubao:session",
|
|
9925
10364
|
nickname: "豆包账号",
|
|
10365
|
+
balance: { total: 0 },
|
|
9926
10366
|
...typeof body.error === "string" && body.error !== "" ? { error: body.error } : {}
|
|
9927
10367
|
}];
|
|
9928
10368
|
const packages = windows.map((window) => {
|
|
@@ -9933,6 +10373,7 @@ window.__ModuleLoader__.load({
|
|
|
9933
10373
|
return {
|
|
9934
10374
|
name: typeof window.label === "string" && window.label !== "" ? window.label : "额度",
|
|
9935
10375
|
unit: "点",
|
|
10376
|
+
...points === void 0 ? {} : { amount: points },
|
|
9936
10377
|
remaining: remainingPercent,
|
|
9937
10378
|
...total === void 0 ? {} : { total },
|
|
9938
10379
|
...points === void 0 ? {} : { points }
|
|
@@ -9943,7 +10384,7 @@ window.__ModuleLoader__.load({
|
|
|
9943
10384
|
return [{
|
|
9944
10385
|
accountId: "doubao:session",
|
|
9945
10386
|
nickname: "豆包账号",
|
|
9946
|
-
balance: pointsLeft > 0 ? pointsLeft : Math.round(lowestPercent),
|
|
10387
|
+
balance: { total: pointsLeft > 0 ? pointsLeft : Math.round(lowestPercent) },
|
|
9947
10388
|
extra: {
|
|
9948
10389
|
unit: pointsLeft > 0 ? "点" : "%",
|
|
9949
10390
|
windows: windows.length
|
|
@@ -9968,7 +10409,7 @@ window.__ModuleLoader__.load({
|
|
|
9968
10409
|
const raw = globalThis.localStorage?.getItem(POOL_STORE_KEY$1);
|
|
9969
10410
|
if (raw === null || raw === void 0) return void 0;
|
|
9970
10411
|
const parsed = JSON.parse(raw);
|
|
9971
|
-
if (parsed === null || parsed.v !==
|
|
10412
|
+
if (parsed === null || parsed.v !== 3 || typeof parsed.at !== "number") return void 0;
|
|
9972
10413
|
if (Date.now() - parsed.at > POOL_STORE_MAX_AGE_MS) return void 0;
|
|
9973
10414
|
if (!Array.isArray(parsed.entries)) return void 0;
|
|
9974
10415
|
const entries = [];
|
|
@@ -9991,7 +10432,7 @@ window.__ModuleLoader__.load({
|
|
|
9991
10432
|
}
|
|
9992
10433
|
if (entries.length === 0) return void 0;
|
|
9993
10434
|
return {
|
|
9994
|
-
v:
|
|
10435
|
+
v: 3,
|
|
9995
10436
|
at: parsed.at,
|
|
9996
10437
|
entries,
|
|
9997
10438
|
...Array.isArray(parsed.marvis) ? { marvis: parsed.marvis } : {}
|
|
@@ -10022,7 +10463,7 @@ window.__ModuleLoader__.load({
|
|
|
10022
10463
|
...entry.status === void 0 ? {} : { status: entry.status }
|
|
10023
10464
|
}));
|
|
10024
10465
|
const blob = {
|
|
10025
|
-
v:
|
|
10466
|
+
v: 3,
|
|
10026
10467
|
at: Date.now(),
|
|
10027
10468
|
entries: slim,
|
|
10028
10469
|
...marvis === void 0 ? {} : { marvis }
|
|
@@ -10185,8 +10626,9 @@ window.__ModuleLoader__.load({
|
|
|
10185
10626
|
if (channel.credits?.quota === true) return t?.("channelpool.creditsQuota") ?? "quota";
|
|
10186
10627
|
return t?.("channelpool.creditsUnit") ?? "credits";
|
|
10187
10628
|
}
|
|
10188
|
-
function accountLabel(account) {
|
|
10629
|
+
function accountLabel$1(account) {
|
|
10189
10630
|
if (typeof account.nickname === "string" && account.nickname !== "") return account.nickname;
|
|
10631
|
+
if (typeof account.label === "string" && account.label !== "") return account.label;
|
|
10190
10632
|
if (typeof account.id === "string" && account.id !== "") return account.id;
|
|
10191
10633
|
if (typeof account.id === "number") return String(account.id);
|
|
10192
10634
|
return "(未命名账号)";
|
|
@@ -10204,7 +10646,7 @@ window.__ModuleLoader__.load({
|
|
|
10204
10646
|
return false;
|
|
10205
10647
|
}
|
|
10206
10648
|
function accountDisplay(account, channelName, index) {
|
|
10207
|
-
const raw = accountLabel(account);
|
|
10649
|
+
const raw = accountLabel$1(account);
|
|
10208
10650
|
const id = typeof account.id === "string" ? account.id : raw;
|
|
10209
10651
|
const full = raw === id ? raw : `${raw}(${id})`;
|
|
10210
10652
|
if (sameAsChannel(raw, channelName)) {
|
|
@@ -10314,7 +10756,7 @@ window.__ModuleLoader__.load({
|
|
|
10314
10756
|
return "签到失败";
|
|
10315
10757
|
}
|
|
10316
10758
|
}
|
|
10317
|
-
function ChannelPoolSection({ t, active, onAddAccount, autoClaim, autoClaimBusy, onAutoClaim, autoClaimRunning, onAutoClaimRun, banner, regionCards }) {
|
|
10759
|
+
function ChannelPoolSection({ t, active, onAddAccount, autoClaim, autoClaimBusy, onAutoClaim, autoClaimRunning, onAutoClaimRun, automation, automationJob, onRunAutomationJob, banner, regionCards }) {
|
|
10318
10760
|
const [ownActive, setOwnActive] = (0, react.useState)("");
|
|
10319
10761
|
const [loginState, setLoginState] = (0, react.useState)(void 0);
|
|
10320
10762
|
const loginAbort = (0, react.useRef)(void 0);
|
|
@@ -10433,10 +10875,10 @@ window.__ModuleLoader__.load({
|
|
|
10433
10875
|
const channels = channelsRaw.filter((channel) => !REGION_OWNED_CHANNELS.has(channel.id));
|
|
10434
10876
|
const statusAnswer = channels.some((channel) => !rosterIds.includes(channel.id)) ? await cachedProviderStatus(channels.map((channel) => channel.id)) : firstStatus;
|
|
10435
10877
|
const statuses = providerStatusesFrom(statusAnswer);
|
|
10436
|
-
const scanProviders = channels.map((channel) => channel.id).filter((id) => (statuses.get(id)?.accountsTotal ?? 0) > 0 || id === "doubao" && doubaoAccount !== void 0 || id === "marvis" && (marvisSession?.accounts.length ?? 0) > 0);
|
|
10878
|
+
const scanProviders = channels.map((channel) => channel.id).filter((id) => (statuses.get(id)?.accountsTotal ?? 0) > 0 || id === "doubao" && doubaoAccount !== void 0 || id === "marvis" && (marvisSession?.accounts.length ?? 0) > 0 || laneRegionOf(id) !== void 0);
|
|
10437
10879
|
const perProvider = await Promise.all(scanProviders.map(async (provider) => {
|
|
10438
10880
|
const wantBalances = channels.find((channel) => channel.id === provider)?.credits !== void 0;
|
|
10439
|
-
const accountsPromise = provider === "doubao" ? Promise.resolve({
|
|
10881
|
+
const accountsPromise = laneRegionOf(provider) !== void 0 ? readLaneAccounts(laneRegionOf(provider)) : provider === "doubao" ? Promise.resolve({
|
|
10440
10882
|
ok: true,
|
|
10441
10883
|
value: { accounts: doubaoAccount === void 0 ? [] : [doubaoAccount] }
|
|
10442
10884
|
}) : provider === "marvis" ? Promise.resolve({
|
|
@@ -10449,16 +10891,19 @@ window.__ModuleLoader__.load({
|
|
|
10449
10891
|
})) : provider === "marvis" ? Promise.resolve({
|
|
10450
10892
|
ok: true,
|
|
10451
10893
|
value: { models: marvisSession?.models ?? [] }
|
|
10452
|
-
}) : callPack("model.list", { provider });
|
|
10894
|
+
}) : laneRegionOf(provider) === void 0 ? callPack("model.list", { provider }) : readLaneModels(laneRegionOf(provider));
|
|
10453
10895
|
const [accounts, models] = await Promise.all([accountsPromise.catch(() => refused("account.list failed")), modelsPromise.catch(() => refused("model.list failed"))]);
|
|
10454
|
-
const
|
|
10896
|
+
const wantStatus = channels.find((channel) => channel.id === provider)?.credits?.status === true;
|
|
10897
|
+
provider === "doubao" || provider === "marvis" || !wantStatus || creditStatusesFrom(await callPack("credits.status", { provider }).catch(() => refused("credits.status failed")));
|
|
10898
|
+
const modelRows = modelsFrom(models.ok === true ? models.value : void 0);
|
|
10455
10899
|
const modelEmptyBecauseRefused = modelRows.length === 0 && models.ok !== true;
|
|
10900
|
+
const laneCheckin = laneRegionOf(provider) !== void 0 && accounts.ok === true ? accounts.value.checkin ?? [] : [];
|
|
10456
10901
|
return [provider, {
|
|
10457
10902
|
accounts: dedupeAccounts(accountsFrom(accounts)),
|
|
10458
10903
|
models: sortChannelModels(modelRows),
|
|
10459
10904
|
facts: new Map(),
|
|
10460
10905
|
balances: [],
|
|
10461
|
-
statuses:
|
|
10906
|
+
statuses: laneCheckin,
|
|
10462
10907
|
balancePending: wantBalances,
|
|
10463
10908
|
balanceError: void 0,
|
|
10464
10909
|
modelError: modelEmptyBecauseRefused ? models.error?.message ?? "model.list refused" : void 0
|
|
@@ -10634,7 +11079,12 @@ window.__ModuleLoader__.load({
|
|
|
10634
11079
|
setEnabled((previous) => new Map(previous).set(provider, next));
|
|
10635
11080
|
markBusy(provider, true);
|
|
10636
11081
|
try {
|
|
10637
|
-
|
|
11082
|
+
const laneRegion = laneRegionOf(provider);
|
|
11083
|
+
if (laneRegion !== void 0) {
|
|
11084
|
+
const ids = entry.models.map((model) => model.id).filter((id) => next.has(id));
|
|
11085
|
+
const saved = await saveLaneModels(laneRegion, ids.length === 0 ? [POOL_LANE_NONE_ID] : ids);
|
|
11086
|
+
if (!saved.ok) throw new Error(saved.error?.message ?? "model selection refused");
|
|
11087
|
+
} else if (provider === "doubao") {
|
|
10638
11088
|
await saveDoubaoSkipped(modelId, !on);
|
|
10639
11089
|
saveDoubaoHideAll(false);
|
|
10640
11090
|
await mirrorDoubaoDisabled();
|
|
@@ -10690,7 +11140,11 @@ window.__ModuleLoader__.load({
|
|
|
10690
11140
|
setEnabled((previous) => new Map(previous).set(provider, new Set(on ? entry.models.map((model) => model.id) : [])));
|
|
10691
11141
|
markBusy(provider, true);
|
|
10692
11142
|
try {
|
|
10693
|
-
|
|
11143
|
+
const laneRegion = laneRegionOf(provider);
|
|
11144
|
+
if (laneRegion !== void 0) {
|
|
11145
|
+
const saved = await saveLaneModels(laneRegion, on ? entry.models.map((model) => model.id) : [POOL_LANE_NONE_ID]);
|
|
11146
|
+
if (!saved.ok) throw new Error(saved.error?.message ?? "model selection refused");
|
|
11147
|
+
} else if (provider === "doubao") {
|
|
10694
11148
|
const skipped = on ? [] : entry.models.map((model) => model.id);
|
|
10695
11149
|
globalThis.localStorage?.setItem(DOUBAO_SKIP_KEY, JSON.stringify(skipped));
|
|
10696
11150
|
saveDoubaoHideAll(!on);
|
|
@@ -10712,8 +11166,19 @@ window.__ModuleLoader__.load({
|
|
|
10712
11166
|
await load();
|
|
10713
11167
|
}
|
|
10714
11168
|
};
|
|
11169
|
+
const refreshCreditStatuses = async (provider) => {
|
|
11170
|
+
if (!(entries.find((entry) => entry.channel.id === provider)?.channel.credits?.status === true)) return;
|
|
11171
|
+
const answer = await callPack("credits.status", { provider }).catch(() => void 0);
|
|
11172
|
+
if (answer === void 0 || !answer.ok || !mountedRef.current) return;
|
|
11173
|
+
const rows = creditStatusesFrom(answer);
|
|
11174
|
+
setEntries((previous) => previous.map((entry) => entry.channel.id === provider ? {
|
|
11175
|
+
...entry,
|
|
11176
|
+
statuses: rows
|
|
11177
|
+
} : entry));
|
|
11178
|
+
};
|
|
10715
11179
|
const refreshBalances = async (provider, force, quiet = false, seq) => {
|
|
10716
11180
|
if (!quiet) markBusy(provider, true);
|
|
11181
|
+
refreshCreditStatuses(provider);
|
|
10717
11182
|
setEntries((previous) => previous.map((entry) => entry.channel.id === provider ? {
|
|
10718
11183
|
...entry,
|
|
10719
11184
|
balancePending: true
|
|
@@ -10815,6 +11280,7 @@ window.__ModuleLoader__.load({
|
|
|
10815
11280
|
}) ?? "Nothing to claim today.");
|
|
10816
11281
|
if (result?.failed !== void 0 && result.failed > 0) setNotice(t?.("channelpool.claimFailed", { failed: result.failed }) ?? `${result.failed} failed.`);
|
|
10817
11282
|
await refreshBalances(provider, true);
|
|
11283
|
+
await refreshCreditStatuses(provider);
|
|
10818
11284
|
} finally {
|
|
10819
11285
|
if (mountedRef.current) markBusy(provider, false);
|
|
10820
11286
|
}
|
|
@@ -10865,7 +11331,7 @@ window.__ModuleLoader__.load({
|
|
|
10865
11331
|
const preferAccount = async (provider, accountId) => {
|
|
10866
11332
|
markBusy(provider, true);
|
|
10867
11333
|
try {
|
|
10868
|
-
if (!(await fetch("/
|
|
11334
|
+
if (!(await fetch("/dsh-xdpool/accounts/preferred", {
|
|
10869
11335
|
method: "POST",
|
|
10870
11336
|
headers: { "content-type": "application/json" },
|
|
10871
11337
|
credentials: "same-origin",
|
|
@@ -11228,7 +11694,7 @@ window.__ModuleLoader__.load({
|
|
|
11228
11694
|
style: { paddingTop: "var(--s5)" },
|
|
11229
11695
|
children: [
|
|
11230
11696
|
banner,
|
|
11231
|
-
regionCards,
|
|
11697
|
+
regionCards?.(chosen),
|
|
11232
11698
|
error === void 0 ? null : (0, react_jsx_runtime.jsxs)("p", {
|
|
11233
11699
|
className: "hint",
|
|
11234
11700
|
children: [t?.("channelpool.loadError", { message: error }) ?? `Could not load channels: ${error}`, (0, react_jsx_runtime.jsx)("button", {
|
|
@@ -11250,7 +11716,7 @@ window.__ModuleLoader__.load({
|
|
|
11250
11716
|
const isBusy = busy.has(channel.id);
|
|
11251
11717
|
const unit = creditUnitLabel(channel, t);
|
|
11252
11718
|
const chosenBalanceTotal = channel.credits === void 0 ? void 0 : balancesTotal(balances);
|
|
11253
|
-
const chosenCredit = chosenEntry.balancePending && chosenBalanceTotal === void 0 ? t?.("channelpool.balanceLoading") ?? "…" : chosenBalanceTotal === void 0 ? "
|
|
11719
|
+
const chosenCredit = chosenEntry.balancePending && chosenBalanceTotal === void 0 ? t?.("channelpool.balanceLoading") ?? "…" : chosenBalanceTotal === void 0 ? "0" : amount(chosenBalanceTotal);
|
|
11254
11720
|
const modelsEnabled = models.filter((model) => enabledIds.has(model.id)).length;
|
|
11255
11721
|
const statusOf = (accountId) => statuses.find((row) => row.accountId === accountId);
|
|
11256
11722
|
const balanceOf = (accountId) => balances.find((row) => row.accountId === accountId);
|
|
@@ -11262,6 +11728,7 @@ window.__ModuleLoader__.load({
|
|
|
11262
11728
|
const visibleModels = modelsMatching(chosenEntry, query);
|
|
11263
11729
|
const mode = modeOf(channel.id);
|
|
11264
11730
|
const showAutomation = canClaim && onAutoClaim !== void 0;
|
|
11731
|
+
const showAutomationJobs = (chosen === REGION_CHANNEL_BY_REGION.cn || chosen === REGION_CHANNEL_BY_REGION.global) && automation !== void 0 && onRunAutomationJob !== void 0;
|
|
11265
11732
|
const isMarvis = channel.id === "marvis";
|
|
11266
11733
|
const quotaOf = (accountId) => marvisQuotas?.find((row) => row.openid === accountId);
|
|
11267
11734
|
const marvisRows = accounts.map((account) => quotaOf(account.id)).filter((row) => row !== void 0 && row.error === void 0);
|
|
@@ -11349,7 +11816,7 @@ window.__ModuleLoader__.load({
|
|
|
11349
11816
|
className: "mbody",
|
|
11350
11817
|
children: [
|
|
11351
11818
|
banner,
|
|
11352
|
-
regionCards,
|
|
11819
|
+
regionCards?.(chosen),
|
|
11353
11820
|
loginState !== void 0 && loginState.channelId === channel.id && (loginState.phase === "paste" ? (0, react_jsx_runtime.jsxs)("div", {
|
|
11354
11821
|
className: "banner",
|
|
11355
11822
|
children: [
|
|
@@ -11612,20 +12079,83 @@ window.__ModuleLoader__.load({
|
|
|
11612
12079
|
}),
|
|
11613
12080
|
(0, react_jsx_runtime.jsxs)("div", {
|
|
11614
12081
|
className: "policy-v",
|
|
12082
|
+
children: [(0, react_jsx_runtime.jsx)("button", {
|
|
12083
|
+
type: "button",
|
|
12084
|
+
role: "switch",
|
|
12085
|
+
className: "sw",
|
|
12086
|
+
"aria-checked": autoClaim === true,
|
|
12087
|
+
"aria-label": t?.("channelpool.autoClaim") ?? "积分自动化",
|
|
12088
|
+
disabled: autoClaimBusy === true,
|
|
12089
|
+
onClick: () => {
|
|
12090
|
+
onAutoClaim?.(autoClaim !== true);
|
|
12091
|
+
}
|
|
12092
|
+
}), (0, react_jsx_runtime.jsx)("span", {
|
|
12093
|
+
title: t?.("channelpool.claimedTodayHint") ?? "今日已签到的账号数 / 启用的账号数(来自上游签到状态)",
|
|
12094
|
+
children: `${t?.("channelpool.claimedToday") ?? "今日已领"} ${String(claimedToday)}/${String(enabledAccounts.length)}`
|
|
12095
|
+
})]
|
|
12096
|
+
}),
|
|
12097
|
+
(0, react_jsx_runtime.jsx)("span", {
|
|
12098
|
+
className: "policy-hint",
|
|
12099
|
+
children: t?.("channelpool.autoClaimHint") ?? "开着就会在后台领每天的积分,不用手动点。"
|
|
12100
|
+
}),
|
|
12101
|
+
!showAutomationJobs ? null : (0, react_jsx_runtime.jsxs)("div", {
|
|
12102
|
+
className: "facts",
|
|
11615
12103
|
children: [
|
|
11616
|
-
(0, react_jsx_runtime.jsx)("
|
|
11617
|
-
|
|
11618
|
-
|
|
11619
|
-
className: "sw",
|
|
11620
|
-
"aria-checked": autoClaim === true,
|
|
11621
|
-
"aria-label": t?.("channelpool.autoClaim") ?? "积分自动化",
|
|
11622
|
-
disabled: autoClaimBusy === true,
|
|
11623
|
-
onClick: () => {
|
|
11624
|
-
onAutoClaim?.(autoClaim !== true);
|
|
11625
|
-
}
|
|
12104
|
+
(0, react_jsx_runtime.jsx)("span", {
|
|
12105
|
+
className: "policy-k",
|
|
12106
|
+
children: t?.("row.autoJobsTitle") ?? "自动化任务"
|
|
11626
12107
|
}),
|
|
11627
|
-
(0, react_jsx_runtime.jsx)("span", {
|
|
11628
|
-
|
|
12108
|
+
(0, react_jsx_runtime.jsx)("span", {
|
|
12109
|
+
className: "policy-hint",
|
|
12110
|
+
children: t?.("row.autoJobsHint") ?? "每项独立运行;「强制重跑」会忽略本小时已执行的保护。"
|
|
12111
|
+
}),
|
|
12112
|
+
POOL_AUTOMATION_JOB_KINDS.map((kind) => {
|
|
12113
|
+
const state = automation.jobs[kind];
|
|
12114
|
+
const chip = automationJobChip(t, state);
|
|
12115
|
+
const busy = automation.runInProgress || automationJob !== void 0;
|
|
12116
|
+
const thisRow = automationJob?.job === kind;
|
|
12117
|
+
return (0, react_jsx_runtime.jsxs)("div", {
|
|
12118
|
+
className: "row",
|
|
12119
|
+
children: [
|
|
12120
|
+
(0, react_jsx_runtime.jsx)("span", {
|
|
12121
|
+
className: "chip",
|
|
12122
|
+
"data-tone": chip.tone,
|
|
12123
|
+
children: chip.text
|
|
12124
|
+
}),
|
|
12125
|
+
(0, react_jsx_runtime.jsx)("span", { children: t?.(`row.autoJob_${kind}`) ?? kind }),
|
|
12126
|
+
(0, react_jsx_runtime.jsx)("span", { children: `${automationScheduleText(t, automationHoursOf(automation, kind))} · ${automationLastRunText(t, state)}` }),
|
|
12127
|
+
(0, react_jsx_runtime.jsxs)("span", {
|
|
12128
|
+
className: "sec-actions",
|
|
12129
|
+
children: [(0, react_jsx_runtime.jsx)("button", {
|
|
12130
|
+
type: "button",
|
|
12131
|
+
className: "tiny",
|
|
12132
|
+
disabled: busy,
|
|
12133
|
+
title: t?.("row.autoRunHint") ?? "只运行这一项;本小时已执行过时不会重复执行",
|
|
12134
|
+
onClick: () => {
|
|
12135
|
+
onRunAutomationJob(kind, false);
|
|
12136
|
+
},
|
|
12137
|
+
children: thisRow && automationJob?.force !== true ? t?.("row.autoRunning") ?? "Running…" : t?.("row.autoRun") ?? "Run now"
|
|
12138
|
+
}), (0, react_jsx_runtime.jsx)("button", {
|
|
12139
|
+
type: "button",
|
|
12140
|
+
className: "tiny",
|
|
12141
|
+
disabled: busy,
|
|
12142
|
+
title: t?.("row.autoForceHint") ?? "忽略本小时已执行的保护,强制再跑一次",
|
|
12143
|
+
onClick: () => {
|
|
12144
|
+
onRunAutomationJob(kind, true);
|
|
12145
|
+
},
|
|
12146
|
+
children: thisRow && automationJob?.force === true ? t?.("row.autoRunning") ?? "Running…" : t?.("row.autoForce") ?? "Force run"
|
|
12147
|
+
})]
|
|
12148
|
+
})
|
|
12149
|
+
]
|
|
12150
|
+
}, kind);
|
|
12151
|
+
})
|
|
12152
|
+
]
|
|
12153
|
+
}),
|
|
12154
|
+
(0, react_jsx_runtime.jsx)("div", {
|
|
12155
|
+
className: "row",
|
|
12156
|
+
children: (0, react_jsx_runtime.jsx)("span", {
|
|
12157
|
+
className: "sec-actions",
|
|
12158
|
+
children: (0, react_jsx_runtime.jsx)("button", {
|
|
11629
12159
|
type: "button",
|
|
11630
12160
|
className: "tiny",
|
|
11631
12161
|
disabled: autoClaimRunning === true,
|
|
@@ -11633,13 +12163,9 @@ window.__ModuleLoader__.load({
|
|
|
11633
12163
|
onClick: () => {
|
|
11634
12164
|
onAutoClaimRun?.();
|
|
11635
12165
|
},
|
|
11636
|
-
children: autoClaimRunning === true ? t?.("channelpool.autoClaimRunning") ?? "领取中…" : t?.("
|
|
12166
|
+
children: autoClaimRunning === true ? t?.("channelpool.autoClaimRunning") ?? "领取中…" : t?.("row.autoRunAll") ?? "立即执行全部任务"
|
|
11637
12167
|
})
|
|
11638
|
-
|
|
11639
|
-
}),
|
|
11640
|
-
(0, react_jsx_runtime.jsx)("span", {
|
|
11641
|
-
className: "policy-hint",
|
|
11642
|
-
children: t?.("channelpool.autoClaimHint") ?? "开着就会在后台领每天的积分,不用手动点。"
|
|
12168
|
+
})
|
|
11643
12169
|
})
|
|
11644
12170
|
]
|
|
11645
12171
|
})]
|
|
@@ -11663,10 +12189,11 @@ window.__ModuleLoader__.load({
|
|
|
11663
12189
|
type: "button",
|
|
11664
12190
|
className: "btn",
|
|
11665
12191
|
disabled: isBusy,
|
|
12192
|
+
title: "只刷新本页的账号与余额;要重新扫描账号文件,请到「设置 → XD Pool」点「重新检测账号」",
|
|
11666
12193
|
onClick: () => {
|
|
11667
12194
|
recheck(channel.id);
|
|
11668
12195
|
},
|
|
11669
|
-
children: "
|
|
12196
|
+
children: "刷新余额"
|
|
11670
12197
|
}), (0, react_jsx_runtime.jsx)("button", {
|
|
11671
12198
|
type: "button",
|
|
11672
12199
|
className: "btn",
|
|
@@ -11803,10 +12330,11 @@ window.__ModuleLoader__.load({
|
|
|
11803
12330
|
type: "button",
|
|
11804
12331
|
className: "btn",
|
|
11805
12332
|
disabled: isBusy,
|
|
12333
|
+
title: "只刷新本页的账号与余额;要重新扫描账号文件,请到「设置 → XD Pool」点「重新检测账号」",
|
|
11806
12334
|
onClick: () => {
|
|
11807
12335
|
recheck(channel.id);
|
|
11808
12336
|
},
|
|
11809
|
-
children: "
|
|
12337
|
+
children: "刷新余额"
|
|
11810
12338
|
}),
|
|
11811
12339
|
ONBOARDING_CHANNELS.has(channel.id) && (0, react_jsx_runtime.jsx)("button", {
|
|
11812
12340
|
type: "button",
|
|
@@ -11844,12 +12372,14 @@ window.__ModuleLoader__.load({
|
|
|
11844
12372
|
children: accounts.map((account, index) => {
|
|
11845
12373
|
const shown = accountDisplay(account, channel.name, index);
|
|
11846
12374
|
const balance = balanceOf(account.id);
|
|
11847
|
-
const value = balance === void 0 ?
|
|
12375
|
+
const value = balance === void 0 ? account.credits?.total : balanceAmount(balance.balance);
|
|
11848
12376
|
const checkin = statusOf(account.id);
|
|
11849
12377
|
const buckets = balance === void 0 ? [] : balancePackages(balance.balance);
|
|
12378
|
+
const figures = buckets.map(packageFigures);
|
|
11850
12379
|
const disabled = account.enabled === false;
|
|
11851
12380
|
const soon = expiryText(account.expiresAt, t);
|
|
11852
|
-
const
|
|
12381
|
+
const first = figures[0];
|
|
12382
|
+
const pct = first === void 0 ? void 0 : first.percent !== void 0 ? first.percent : first.amount !== void 0 && first.total !== void 0 && first.total > 0 ? first.amount / first.total * 100 : void 0;
|
|
11853
12383
|
return (0, react_jsx_runtime.jsxs)("article", {
|
|
11854
12384
|
className: "acct",
|
|
11855
12385
|
"data-off": disabled,
|
|
@@ -11918,7 +12448,7 @@ window.__ModuleLoader__.load({
|
|
|
11918
12448
|
children: unit
|
|
11919
12449
|
})] }) : (0, react_jsx_runtime.jsx)("span", {
|
|
11920
12450
|
className: "acct-total-v",
|
|
11921
|
-
children: chosenEntry.balancePending ? "…" : "
|
|
12451
|
+
children: chosenEntry.balancePending ? "…" : "0"
|
|
11922
12452
|
}), soon === void 0 ? null : (0, react_jsx_runtime.jsx)("span", {
|
|
11923
12453
|
className: "acct-soon",
|
|
11924
12454
|
children: soon
|
|
@@ -11926,7 +12456,12 @@ window.__ModuleLoader__.load({
|
|
|
11926
12456
|
}),
|
|
11927
12457
|
pct === void 0 ? null : (0, react_jsx_runtime.jsx)("div", {
|
|
11928
12458
|
className: "acct-bar",
|
|
11929
|
-
title: buckets.map((b) =>
|
|
12459
|
+
title: buckets.map((b, i) => {
|
|
12460
|
+
const f = figures[i];
|
|
12461
|
+
if (f?.percent !== void 0) return `${b.name} ${String(Math.round(f.percent))}%`;
|
|
12462
|
+
if (f?.amount !== void 0) return `${b.name} ${amount(f.amount)}${typeof f.total === "number" ? ` / ${amount(f.total)}` : ""}`;
|
|
12463
|
+
return b.name;
|
|
12464
|
+
}).join(" · "),
|
|
11930
12465
|
children: (0, react_jsx_runtime.jsx)("span", { style: { width: `${String(Math.max(0, Math.min(100, Math.round(pct))))}%` } })
|
|
11931
12466
|
}),
|
|
11932
12467
|
(0, react_jsx_runtime.jsxs)("details", {
|
|
@@ -11935,13 +12470,26 @@ window.__ModuleLoader__.load({
|
|
|
11935
12470
|
(0, react_jsx_runtime.jsx)("summary", { children: t?.("channelpool.accountDetail") ?? "积分明细" }),
|
|
11936
12471
|
(0, react_jsx_runtime.jsxs)("dl", {
|
|
11937
12472
|
className: "facts",
|
|
11938
|
-
children: [
|
|
12473
|
+
children: [visibleBuckets.map((b, i) => (0, react_jsx_runtime.jsxs)("div", {
|
|
11939
12474
|
className: "fact",
|
|
11940
|
-
children: [(0, react_jsx_runtime.jsx)("dt", { children: b.name }), (0, react_jsx_runtime.jsx)("dd", { children:
|
|
11941
|
-
|
|
11942
|
-
|
|
11943
|
-
|
|
11944
|
-
|
|
12475
|
+
children: [(0, react_jsx_runtime.jsx)("dt", { children: b.name }), (0, react_jsx_runtime.jsx)("dd", { children: (() => {
|
|
12476
|
+
const f = packageFigures(b);
|
|
12477
|
+
if (f.amount !== void 0) return f.total === void 0 ? amount(f.amount) : (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
|
|
12478
|
+
amount(f.amount),
|
|
12479
|
+
" / ",
|
|
12480
|
+
amount(f.total)
|
|
12481
|
+
] });
|
|
12482
|
+
if (f.percent !== void 0) return f.total === void 0 ? `剩余 ${String(Math.round(f.percent))}%` : (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
|
|
12483
|
+
amount(Math.round(f.total * f.percent / 100)),
|
|
12484
|
+
" / ",
|
|
12485
|
+
amount(f.total)
|
|
12486
|
+
] });
|
|
12487
|
+
return f.total === void 0 ? "—" : (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
|
|
12488
|
+
"—",
|
|
12489
|
+
" / ",
|
|
12490
|
+
amount(f.total)
|
|
12491
|
+
] });
|
|
12492
|
+
})() })]
|
|
11945
12493
|
}, `${b.name}-${String(i)}`)), channel.credits?.status !== true && checkin === void 0 ? null : (0, react_jsx_runtime.jsxs)("div", {
|
|
11946
12494
|
className: "fact",
|
|
11947
12495
|
children: [(0, react_jsx_runtime.jsx)("dt", { children: t?.("channelpool.todayClaimed") ?? "今日签到" }), checkin?.todayCheckedIn === true ? (0, react_jsx_runtime.jsxs)("dd", {
|
|
@@ -12218,8 +12766,8 @@ window.__ModuleLoader__.load({
|
|
|
12218
12766
|
const byKey = new Map();
|
|
12219
12767
|
const order = [];
|
|
12220
12768
|
for (const account of accounts) {
|
|
12221
|
-
|
|
12222
|
-
const key =
|
|
12769
|
+
(account.nickname ?? "").trim();
|
|
12770
|
+
const key = `id:${account.id}`;
|
|
12223
12771
|
if (!byKey.has(key)) order.push(key);
|
|
12224
12772
|
byKey.set(key, account);
|
|
12225
12773
|
}
|
|
@@ -12251,6 +12799,7 @@ window.__ModuleLoader__.load({
|
|
|
12251
12799
|
const [ui, setUi] = (0, react.useState)({});
|
|
12252
12800
|
const [query, setQuery] = (0, react.useState)("");
|
|
12253
12801
|
const [connected, setConnected] = (0, react.useState)([]);
|
|
12802
|
+
const [addedAt, setAddedAt] = (0, react.useState)(() => readChannelAddedAt());
|
|
12254
12803
|
const [ownCounts, setOwnCounts] = (0, react.useState)({});
|
|
12255
12804
|
const [active, setActive] = (0, react.useState)(void 0);
|
|
12256
12805
|
const mounted = (0, react.useRef)(true);
|
|
@@ -12292,7 +12841,7 @@ window.__ModuleLoader__.load({
|
|
|
12292
12841
|
}
|
|
12293
12842
|
}, []);
|
|
12294
12843
|
const loadPoolAccounts = (0, react.useCallback)(async () => {
|
|
12295
|
-
return (await Promise.all([["buddy", "/
|
|
12844
|
+
return (await Promise.all([["buddy", "/dsh-xdpool/status?region=cn"], ["workbuddy", "/dsh-xdpool/status?region=global"]].map(async ([provider, route]) => {
|
|
12296
12845
|
try {
|
|
12297
12846
|
const response = await fetch(route, {
|
|
12298
12847
|
credentials: "same-origin",
|
|
@@ -12314,7 +12863,7 @@ window.__ModuleLoader__.load({
|
|
|
12314
12863
|
const loadConnected = (0, react.useCallback)(async () => {
|
|
12315
12864
|
const roster = await fetchChannels();
|
|
12316
12865
|
const statuses = providerStatusesFrom(await callPack("provider.status", { providers: roster.map((channel) => channel.id) }));
|
|
12317
|
-
const connectedIds = roster.map((channel) => channel.id).filter((id) => (statuses.get(id)?.accountsTotal ?? 0) > 0);
|
|
12866
|
+
const connectedIds = roster.map((channel) => channel.id).filter((id) => laneRegionOf(id) === void 0 && (statuses.get(id)?.accountsTotal ?? 0) > 0);
|
|
12318
12867
|
const accounts = [...(await Promise.all(connectedIds.map((id) => callPack("account.list", { provider: id })))).flatMap(accountsFrom), ...await loadPoolAccounts()];
|
|
12319
12868
|
if (mounted.current) setConnected(accounts);
|
|
12320
12869
|
return accounts;
|
|
@@ -12363,6 +12912,7 @@ window.__ModuleLoader__.load({
|
|
|
12363
12912
|
timers.current.delete(channelId);
|
|
12364
12913
|
}, []);
|
|
12365
12914
|
const finishDone = (0, react.useCallback)((channelId, message) => {
|
|
12915
|
+
setAddedAt((prev) => rememberChannelAddedAt(prev, channelId, Date.now()));
|
|
12366
12916
|
setUi((prev) => ({
|
|
12367
12917
|
...prev,
|
|
12368
12918
|
[channelId]: {
|
|
@@ -12487,7 +13037,14 @@ window.__ModuleLoader__.load({
|
|
|
12487
13037
|
fail(channel.id, "没有拿到登录页,可以再试一次。", "pack");
|
|
12488
13038
|
return;
|
|
12489
13039
|
}
|
|
12490
|
-
|
|
13040
|
+
let autoOpen = true;
|
|
13041
|
+
try {
|
|
13042
|
+
const pref = await (await fetch(POOL_LOGIN_PREFERENCES_PATH, { credentials: "same-origin" })).json().catch(() => void 0);
|
|
13043
|
+
if (typeof pref?.autoOpen === "boolean") autoOpen = pref.autoOpen;
|
|
13044
|
+
} catch {
|
|
13045
|
+
autoOpen = true;
|
|
13046
|
+
}
|
|
13047
|
+
if (autoOpen) window.open(created.loginUrl, "_blank", "noopener");
|
|
12491
13048
|
setUi((prev) => ({
|
|
12492
13049
|
...prev,
|
|
12493
13050
|
[channel.id]: {
|
|
@@ -12495,6 +13052,7 @@ window.__ModuleLoader__.load({
|
|
|
12495
13052
|
via: "pack",
|
|
12496
13053
|
accountId: created.accountId,
|
|
12497
13054
|
loginUrl: created.loginUrl,
|
|
13055
|
+
manualOpen: !autoOpen,
|
|
12498
13056
|
startCount
|
|
12499
13057
|
}
|
|
12500
13058
|
}));
|
|
@@ -12606,6 +13164,15 @@ window.__ModuleLoader__.load({
|
|
|
12606
13164
|
if (route === void 0) return;
|
|
12607
13165
|
const value = (ui[channelId]?.paste ?? "").trim();
|
|
12608
13166
|
if (value === "") return;
|
|
13167
|
+
if (/^https?:\/\//iu.test(value)) {
|
|
13168
|
+
const check = checkManualCallback(value);
|
|
13169
|
+
if (!check.ok) {
|
|
13170
|
+
fail(channelId, callbackReasonText(check.reason ?? "not-a-url"), "paste");
|
|
13171
|
+
return;
|
|
13172
|
+
}
|
|
13173
|
+
fail(channelId, "这是一条登录回调地址。本渠道请粘贴凭据(token / cookie),回调地址会在后续版本支持。", "paste");
|
|
13174
|
+
return;
|
|
13175
|
+
}
|
|
12609
13176
|
const token = bump(channelId);
|
|
12610
13177
|
setUi((prev) => ({
|
|
12611
13178
|
...prev,
|
|
@@ -12645,8 +13212,12 @@ window.__ModuleLoader__.load({
|
|
|
12645
13212
|
]);
|
|
12646
13213
|
const state = status?.state ?? "pending";
|
|
12647
13214
|
const channels = (0, react.useMemo)(() => {
|
|
12648
|
-
return (Array.isArray(status?.channels) ? status.channels : []).filter((c) => c !== null && typeof c === "object");
|
|
12649
|
-
}, [
|
|
13215
|
+
return orderChannelsByRecency((Array.isArray(status?.channels) ? status.channels : []).filter((c) => c !== null && typeof c === "object"), channelRecency(connected, addedAt));
|
|
13216
|
+
}, [
|
|
13217
|
+
status,
|
|
13218
|
+
connected,
|
|
13219
|
+
addedAt
|
|
13220
|
+
]);
|
|
12650
13221
|
const connectedCount = (0, react.useMemo)(() => channels.filter((channel) => countFor(channel) > 0).length, [channels, countFor]);
|
|
12651
13222
|
const filtered = (0, react.useMemo)(() => {
|
|
12652
13223
|
const needle = query.trim().toLowerCase();
|
|
@@ -12790,10 +13361,10 @@ window.__ModuleLoader__.load({
|
|
|
12790
13361
|
className: "banner-body",
|
|
12791
13362
|
children: [(0, react_jsx_runtime.jsx)("span", {
|
|
12792
13363
|
className: "banner-t",
|
|
12793
|
-
children: activeUi.via === "pack" ? "已打开登录页,请在里面完成登录" : "已打开登录窗口,请在里面完成登录"
|
|
13364
|
+
children: activeUi.via === "pack" ? activeUi.manualOpen ? "请手动打开登录页并完成登录" : "已打开登录页,请在里面完成登录" : "已打开登录窗口,请在里面完成登录"
|
|
12794
13365
|
}), (0, react_jsx_runtime.jsx)("span", {
|
|
12795
13366
|
className: "banner-d",
|
|
12796
|
-
children: activeUi.via === "pack" ? "登录页在新标签页里,10 分钟没完成就会取消。凭据只留在这台机器上。" : "窗口关掉或长时间没完成就会取消。凭据只留在这台机器上。"
|
|
13367
|
+
children: activeUi.via === "pack" ? activeUi.manualOpen ? "按设置没有自动打开登录页,点下面的「打开登录页」。10 分钟没完成就会取消。" : "登录页在新标签页里,10 分钟没完成就会取消。凭据只留在这台机器上。" : "窗口关掉或长时间没完成就会取消。凭据只留在这台机器上。"
|
|
12797
13368
|
})]
|
|
12798
13369
|
})]
|
|
12799
13370
|
}),
|
|
@@ -12871,7 +13442,7 @@ window.__ModuleLoader__.load({
|
|
|
12871
13442
|
href: activeUi.loginUrl,
|
|
12872
13443
|
target: "_blank",
|
|
12873
13444
|
rel: "noopener noreferrer",
|
|
12874
|
-
children: "重新打开登录页"
|
|
13445
|
+
children: activeUi.manualOpen ? "打开登录页" : "重新打开登录页"
|
|
12875
13446
|
}),
|
|
12876
13447
|
(0, react_jsx_runtime.jsx)("button", {
|
|
12877
13448
|
type: "button",
|
|
@@ -13378,6 +13949,7 @@ window.__ModuleLoader__.load({
|
|
|
13378
13949
|
const RULE_COLUMNS = "minmax(0,1fr) minmax(0,1.3fr) 56px 60px 128px";
|
|
13379
13950
|
function RoutingPage({ t }) {
|
|
13380
13951
|
const [status, setStatus] = (0, react.useState)(void 0);
|
|
13952
|
+
const [groups, setGroups] = (0, react.useState)([]);
|
|
13381
13953
|
const [error, setError] = (0, react.useState)(void 0);
|
|
13382
13954
|
const [flash, setFlash] = (0, react.useState)(void 0);
|
|
13383
13955
|
const [drafts, setDrafts] = (0, react.useState)([]);
|
|
@@ -13420,7 +13992,16 @@ window.__ModuleLoader__.load({
|
|
|
13420
13992
|
} catch {
|
|
13421
13993
|
if (signal?.aborted === true) return;
|
|
13422
13994
|
if (mounted.current) setError(failed);
|
|
13995
|
+
return;
|
|
13423
13996
|
}
|
|
13997
|
+
try {
|
|
13998
|
+
const value = await (await fetch(POOL_GROUPS_PATH, {
|
|
13999
|
+
headers: { accept: "application/json" },
|
|
14000
|
+
credentials: "same-origin",
|
|
14001
|
+
...signal === void 0 ? {} : { signal }
|
|
14002
|
+
})).json().catch(() => void 0);
|
|
14003
|
+
if (mounted.current && signal?.aborted !== true && Array.isArray(value?.groups)) setGroups(value.groups.filter((g) => g !== null && typeof g === "object" && typeof g.id === "string"));
|
|
14004
|
+
} catch {}
|
|
13424
14005
|
}, []);
|
|
13425
14006
|
(0, react.useEffect)(() => {
|
|
13426
14007
|
const controller = new AbortController();
|
|
@@ -13603,14 +14184,105 @@ window.__ModuleLoader__.load({
|
|
|
13603
14184
|
style: flash.ok ? void 0 : { color: "var(--danger)" },
|
|
13604
14185
|
children: (0, react_jsx_runtime.jsx)("span", { children: flash.text })
|
|
13605
14186
|
}),
|
|
13606
|
-
(0, react_jsx_runtime.jsxs)("section", {
|
|
14187
|
+
groups.length > 0 ? (0, react_jsx_runtime.jsxs)("section", {
|
|
13607
14188
|
className: "sec",
|
|
13608
|
-
children: [
|
|
13609
|
-
|
|
13610
|
-
|
|
13611
|
-
(0, react_jsx_runtime.jsx)("span", {
|
|
13612
|
-
className: "sec-title",
|
|
13613
|
-
children: "
|
|
14189
|
+
children: [
|
|
14190
|
+
(0, react_jsx_runtime.jsxs)("div", {
|
|
14191
|
+
className: "sec-head",
|
|
14192
|
+
children: [(0, react_jsx_runtime.jsx)("span", {
|
|
14193
|
+
className: "sec-title",
|
|
14194
|
+
children: "路由组"
|
|
14195
|
+
}), (0, react_jsx_runtime.jsx)("span", {
|
|
14196
|
+
className: "sec-n num",
|
|
14197
|
+
children: String(groups.length)
|
|
14198
|
+
})]
|
|
14199
|
+
}),
|
|
14200
|
+
(0, react_jsx_runtime.jsxs)("div", {
|
|
14201
|
+
className: "table",
|
|
14202
|
+
children: [(0, react_jsx_runtime.jsxs)("div", {
|
|
14203
|
+
className: "tr tr-head",
|
|
14204
|
+
style: { gridTemplateColumns: "minmax(0,1fr) 96px 88px 72px" },
|
|
14205
|
+
children: [
|
|
14206
|
+
(0, react_jsx_runtime.jsx)("span", {
|
|
14207
|
+
className: "td",
|
|
14208
|
+
children: "组 / 成员"
|
|
14209
|
+
}),
|
|
14210
|
+
(0, react_jsx_runtime.jsx)("span", {
|
|
14211
|
+
className: "td",
|
|
14212
|
+
children: "策略"
|
|
14213
|
+
}),
|
|
14214
|
+
(0, react_jsx_runtime.jsx)("span", {
|
|
14215
|
+
className: "td td-num",
|
|
14216
|
+
children: "状态"
|
|
14217
|
+
}),
|
|
14218
|
+
(0, react_jsx_runtime.jsx)("span", {
|
|
14219
|
+
className: "td td-num",
|
|
14220
|
+
children: "启用"
|
|
14221
|
+
})
|
|
14222
|
+
]
|
|
14223
|
+
}), groups.map((group) => {
|
|
14224
|
+
const off = new Set(group.off ?? []);
|
|
14225
|
+
const usable = group.members.filter((m) => !off.has(m)).length;
|
|
14226
|
+
const auto = group.auto === true;
|
|
14227
|
+
return (0, react_jsx_runtime.jsxs)("div", {
|
|
14228
|
+
className: "tr",
|
|
14229
|
+
style: { gridTemplateColumns: "minmax(0,1fr) 96px 88px 72px" },
|
|
14230
|
+
children: [
|
|
14231
|
+
(0, react_jsx_runtime.jsxs)("span", {
|
|
14232
|
+
className: "td stack",
|
|
14233
|
+
children: [(0, react_jsx_runtime.jsxs)("span", {
|
|
14234
|
+
className: "mono",
|
|
14235
|
+
children: ["group:", group.id]
|
|
14236
|
+
}), (0, react_jsx_runtime.jsx)("span", {
|
|
14237
|
+
className: "td-dim",
|
|
14238
|
+
style: { textAlign: "left" },
|
|
14239
|
+
children: `${String(usable)} 个可用成员 · ${String(group.members.length)} 总计`
|
|
14240
|
+
})]
|
|
14241
|
+
}),
|
|
14242
|
+
(0, react_jsx_runtime.jsx)("span", {
|
|
14243
|
+
className: "td",
|
|
14244
|
+
children: (0, react_jsx_runtime.jsx)("span", {
|
|
14245
|
+
className: "pill",
|
|
14246
|
+
children: group.strategy === "round-robin" ? "按顺序轮换" : "额度优先"
|
|
14247
|
+
})
|
|
14248
|
+
}),
|
|
14249
|
+
(0, react_jsx_runtime.jsx)("span", {
|
|
14250
|
+
className: "td td-num",
|
|
14251
|
+
children: auto ? (0, react_jsx_runtime.jsx)("span", {
|
|
14252
|
+
className: "pill",
|
|
14253
|
+
"data-tone": "warn",
|
|
14254
|
+
children: "自动发现"
|
|
14255
|
+
}) : "已接管"
|
|
14256
|
+
}),
|
|
14257
|
+
(0, react_jsx_runtime.jsx)("span", {
|
|
14258
|
+
className: "td td-num",
|
|
14259
|
+
children: (0, react_jsx_runtime.jsx)("button", {
|
|
14260
|
+
type: "button",
|
|
14261
|
+
className: "sw",
|
|
14262
|
+
role: "switch",
|
|
14263
|
+
"aria-checked": group.enabled === true,
|
|
14264
|
+
"aria-label": "启用",
|
|
14265
|
+
disabled: auto
|
|
14266
|
+
})
|
|
14267
|
+
})
|
|
14268
|
+
]
|
|
14269
|
+
}, group.id);
|
|
14270
|
+
})]
|
|
14271
|
+
}),
|
|
14272
|
+
(0, react_jsx_runtime.jsx)("p", {
|
|
14273
|
+
className: "hint",
|
|
14274
|
+
children: "自动发现的组默认关闭。保存任意改动后即归你管理,可正常启用。"
|
|
14275
|
+
})
|
|
14276
|
+
]
|
|
14277
|
+
}) : null,
|
|
14278
|
+
(0, react_jsx_runtime.jsxs)("section", {
|
|
14279
|
+
className: "sec",
|
|
14280
|
+
children: [(0, react_jsx_runtime.jsxs)("div", {
|
|
14281
|
+
className: "sec-head",
|
|
14282
|
+
children: [
|
|
14283
|
+
(0, react_jsx_runtime.jsx)("span", {
|
|
14284
|
+
className: "sec-title",
|
|
14285
|
+
children: "已建规则"
|
|
13614
14286
|
}),
|
|
13615
14287
|
(0, react_jsx_runtime.jsx)("span", {
|
|
13616
14288
|
className: "sec-n num",
|
|
@@ -15287,28 +15959,6 @@ window.__ModuleLoader__.load({
|
|
|
15287
15959
|
});
|
|
15288
15960
|
}
|
|
15289
15961
|
//#endregion
|
|
15290
|
-
//#region src/client/region-card.tsx
|
|
15291
|
-
const REGION_CHANNEL_BY_REGION = Object.freeze({
|
|
15292
|
-
cn: "buddy",
|
|
15293
|
-
global: "workbuddy"
|
|
15294
|
-
});
|
|
15295
|
-
Object.freeze({
|
|
15296
|
-
cn: "chat",
|
|
15297
|
-
global: "globe"
|
|
15298
|
-
});
|
|
15299
|
-
Object.freeze({
|
|
15300
|
-
cn: Object.freeze({
|
|
15301
|
-
accent: "#6f5cf0",
|
|
15302
|
-
from: "#4f6ef7",
|
|
15303
|
-
to: "#8b5cf6"
|
|
15304
|
-
}),
|
|
15305
|
-
global: Object.freeze({
|
|
15306
|
-
accent: "#10a5a0",
|
|
15307
|
-
from: "#0fb5a4",
|
|
15308
|
-
to: "#3fd6a8"
|
|
15309
|
-
})
|
|
15310
|
-
});
|
|
15311
|
-
//#endregion
|
|
15312
15962
|
//#region src/client/backup-crypto.ts
|
|
15313
15963
|
const ENCRYPTED_FORMAT = "dsh-xdpool/backup-encrypted";
|
|
15314
15964
|
const ITERATIONS = 31e4;
|
|
@@ -16145,7 +16795,7 @@ window.__ModuleLoader__.load({
|
|
|
16145
16795
|
function hoursOrDefault(configured, fallback) {
|
|
16146
16796
|
return configured !== void 0 && configured.length > 0 ? [...configured] : [...fallback];
|
|
16147
16797
|
}
|
|
16148
|
-
const REGION_CARDS =
|
|
16798
|
+
const REGION_CARDS = REGION_CARD_ORDER;
|
|
16149
16799
|
function PoolCard({ t, settingsScope }) {
|
|
16150
16800
|
const settingsWritable = settingsScope?.getSnapshot().writable === true;
|
|
16151
16801
|
const [sidebarRow, setSidebarRowState] = (0, react.useState)(() => readSidebarRow(settingsScope));
|
|
@@ -16198,7 +16848,7 @@ window.__ModuleLoader__.load({
|
|
|
16198
16848
|
const [busyRegion, setBusyRegion] = (0, react.useState)(void 0);
|
|
16199
16849
|
const [catalogBusyRegion, setCatalogBusyRegion] = (0, react.useState)(void 0);
|
|
16200
16850
|
const [automationBusyRegion, setAutomationBusyRegion] = (0, react.useState)(void 0);
|
|
16201
|
-
const [
|
|
16851
|
+
const [automationJob, setAutomationJob] = (0, react.useState)(void 0);
|
|
16202
16852
|
const [automationRunRegion, setAutomationRunRegion] = (0, react.useState)(void 0);
|
|
16203
16853
|
const [savingModelsRegion, setSavingModelsRegion] = (0, react.useState)(void 0);
|
|
16204
16854
|
const [reserveBusy, setReserveBusy] = (0, react.useState)(void 0);
|
|
@@ -16335,6 +16985,25 @@ window.__ModuleLoader__.load({
|
|
|
16335
16985
|
controller.abort();
|
|
16336
16986
|
};
|
|
16337
16987
|
}, [refreshUsage]);
|
|
16988
|
+
const rescan = async (region) => {
|
|
16989
|
+
setBusyRegion(region);
|
|
16990
|
+
setFlash(void 0);
|
|
16991
|
+
try {
|
|
16992
|
+
const response = await fetch(POOL_RESCAN_PATH, {
|
|
16993
|
+
method: "POST",
|
|
16994
|
+
headers: { accept: "application/json" },
|
|
16995
|
+
credentials: "same-origin"
|
|
16996
|
+
});
|
|
16997
|
+
const body = await response.json();
|
|
16998
|
+
if (!response.ok) throw new Error(body.error ?? `HTTP ${response.status}`);
|
|
16999
|
+
await refresh(region);
|
|
17000
|
+
if (mounted.current) setFlash(t?.("row.accountsRescanned", { count: body.accounts ?? 0 }) ?? "");
|
|
17001
|
+
} catch (cause) {
|
|
17002
|
+
if (mounted.current) setError(cause instanceof Error ? cause.message : String(cause));
|
|
17003
|
+
} finally {
|
|
17004
|
+
if (mounted.current) setBusyRegion(void 0);
|
|
17005
|
+
}
|
|
17006
|
+
};
|
|
16338
17007
|
const claimCheckin = async (region, accountId) => {
|
|
16339
17008
|
setCheckinBusyId(accountId);
|
|
16340
17009
|
setFlash(void 0);
|
|
@@ -16471,8 +17140,11 @@ window.__ModuleLoader__.load({
|
|
|
16471
17140
|
if (mounted.current) setAutomationBusyRegion(void 0);
|
|
16472
17141
|
}
|
|
16473
17142
|
};
|
|
16474
|
-
const runAutomationJob = async (region) => {
|
|
16475
|
-
|
|
17143
|
+
const runAutomationJob = async (region, job = "all", force = false) => {
|
|
17144
|
+
setAutomationJob({
|
|
17145
|
+
job,
|
|
17146
|
+
force
|
|
17147
|
+
});
|
|
16476
17148
|
setAutomationRunRegion(region);
|
|
16477
17149
|
setFlash(void 0);
|
|
16478
17150
|
try {
|
|
@@ -16483,13 +17155,15 @@ window.__ModuleLoader__.load({
|
|
|
16483
17155
|
"content-type": "application/json"
|
|
16484
17156
|
},
|
|
16485
17157
|
credentials: "same-origin",
|
|
16486
|
-
body: JSON.stringify(
|
|
17158
|
+
body: JSON.stringify(force ? {
|
|
17159
|
+
job,
|
|
17160
|
+
force: true
|
|
17161
|
+
} : { job })
|
|
16487
17162
|
});
|
|
16488
17163
|
const body = await response.json();
|
|
16489
17164
|
if (!response.ok) throw new Error(body.error ?? `HTTP ${response.status}`);
|
|
16490
|
-
|
|
16491
|
-
|
|
16492
|
-
}
|
|
17165
|
+
const started = body.started !== false;
|
|
17166
|
+
if (!started && mounted.current) setFlash(t?.("row.autoAlreadyRunning") ?? "A run is already in progress");
|
|
16493
17167
|
let settled = false;
|
|
16494
17168
|
for (let attempt = 0; attempt < AUTOMATION_POLL_ATTEMPTS; attempt += 1) {
|
|
16495
17169
|
await new Promise((resolve) => setTimeout(resolve, AUTOMATION_POLL_MS));
|
|
@@ -16499,20 +17173,29 @@ window.__ModuleLoader__.load({
|
|
|
16499
17173
|
break;
|
|
16500
17174
|
}
|
|
16501
17175
|
}
|
|
16502
|
-
await refresh(region);
|
|
16503
|
-
if (mounted.current)
|
|
17176
|
+
const latest = await refresh(region);
|
|
17177
|
+
if (mounted.current) {
|
|
17178
|
+
if (!started) {} else if (!settled) setFlash(t?.("row.autoRunTimeout") ?? "Still running; check back in a moment");
|
|
17179
|
+
else if (job === "all") setFlash(t?.("row.autoRunDone") ?? "Automation pass finished");
|
|
17180
|
+
else {
|
|
17181
|
+
const state = latest?.automation?.jobs[job];
|
|
17182
|
+
setFlash(t?.("row.autoRan", {
|
|
17183
|
+
count: state?.ok ?? 0,
|
|
17184
|
+
failed: state?.failed ?? 0
|
|
17185
|
+
}) ?? `Done: ${String(state?.ok ?? 0)} account(s) ok, ${String(state?.failed ?? 0)} failed`);
|
|
17186
|
+
}
|
|
17187
|
+
}
|
|
16504
17188
|
} catch (cause) {
|
|
16505
17189
|
if (mounted.current) setError(cause instanceof Error ? cause.message : String(cause));
|
|
16506
17190
|
} finally {
|
|
16507
17191
|
if (mounted.current) {
|
|
16508
|
-
|
|
17192
|
+
setAutomationJob(void 0);
|
|
16509
17193
|
setAutomationRunRegion(void 0);
|
|
16510
17194
|
}
|
|
16511
17195
|
}
|
|
16512
17196
|
};
|
|
16513
17197
|
t?.("row.title");
|
|
16514
17198
|
t?.("row.desc");
|
|
16515
|
-
const showPoolAccounts = selectedChannel === REGION_CHANNEL_BY_REGION.cn || selectedChannel === REGION_CHANNEL_BY_REGION.global;
|
|
16516
17199
|
return (0, react_jsx_runtime.jsx)(PoolShell, {
|
|
16517
17200
|
t,
|
|
16518
17201
|
version: POOL_VERSION,
|
|
@@ -16553,18 +17236,32 @@ window.__ModuleLoader__.load({
|
|
|
16553
17236
|
style: { display: "contents" },
|
|
16554
17237
|
children: (0, react_jsx_runtime.jsx)(ChannelPoolSection, {
|
|
16555
17238
|
t,
|
|
16556
|
-
regionCards:
|
|
17239
|
+
regionCards: (channelId) => {
|
|
17240
|
+
const region = channelId === REGION_CHANNEL_BY_REGION.cn ? "cn" : channelId === REGION_CHANNEL_BY_REGION.global ? "global" : void 0;
|
|
17241
|
+
if (region === void 0) return null;
|
|
16557
17242
|
const here = statusOf(region);
|
|
16558
17243
|
const rows = here?.accounts ?? [];
|
|
16559
17244
|
if (rows.length === 0) return null;
|
|
16560
17245
|
return (0, react_jsx_runtime.jsxs)("section", {
|
|
16561
17246
|
className: "sec",
|
|
16562
|
-
children: [(0, react_jsx_runtime.
|
|
17247
|
+
children: [(0, react_jsx_runtime.jsxs)("div", {
|
|
16563
17248
|
className: "sec-head",
|
|
16564
|
-
children: (0, react_jsx_runtime.jsxs)("span", {
|
|
17249
|
+
children: [(0, react_jsx_runtime.jsxs)("span", {
|
|
16565
17250
|
className: "sec-title",
|
|
16566
17251
|
children: [region === "cn" ? t?.("row.tabCn") ?? "CN" : t?.("row.tabGlobal") ?? "Global", ` · ${String(rows.length)}`]
|
|
16567
|
-
})
|
|
17252
|
+
}), (0, react_jsx_runtime.jsx)("span", {
|
|
17253
|
+
className: "sec-actions",
|
|
17254
|
+
children: (0, react_jsx_runtime.jsx)("button", {
|
|
17255
|
+
type: "button",
|
|
17256
|
+
className: "btn",
|
|
17257
|
+
disabled: busyRegion !== void 0,
|
|
17258
|
+
title: "重新扫描本机 WorkBuddy 客户端已登录的账号,并写入插件账号池",
|
|
17259
|
+
onClick: () => {
|
|
17260
|
+
rescan(region);
|
|
17261
|
+
},
|
|
17262
|
+
children: busyRegion === region ? "检测中…" : "重新检测账号"
|
|
17263
|
+
})
|
|
17264
|
+
})]
|
|
16568
17265
|
}), (0, react_jsx_runtime.jsx)("div", {
|
|
16569
17266
|
className: "accts",
|
|
16570
17267
|
children: rows.map((account) => (0, react_jsx_runtime.jsx)(AccountCard, {
|
|
@@ -16588,7 +17285,7 @@ window.__ModuleLoader__.load({
|
|
|
16588
17285
|
}, account.id))
|
|
16589
17286
|
})]
|
|
16590
17287
|
}, region);
|
|
16591
|
-
}
|
|
17288
|
+
},
|
|
16592
17289
|
active: selectedChannel,
|
|
16593
17290
|
onAddAccount: () => {
|
|
16594
17291
|
setPage("channels");
|
|
@@ -16598,9 +17295,14 @@ window.__ModuleLoader__.load({
|
|
|
16598
17295
|
onAutoClaim: (on) => {
|
|
16599
17296
|
setAutomationEnabled("cn", on);
|
|
16600
17297
|
},
|
|
16601
|
-
autoClaimRunning:
|
|
17298
|
+
autoClaimRunning: automationJob !== void 0,
|
|
16602
17299
|
onAutoClaimRun: () => {
|
|
16603
|
-
runAutomationJob("cn");
|
|
17300
|
+
runAutomationJob("cn", "all");
|
|
17301
|
+
},
|
|
17302
|
+
automation: statusOf("cn")?.automation ?? statusOf("global")?.automation,
|
|
17303
|
+
automationJob,
|
|
17304
|
+
onRunAutomationJob: (job, force) => {
|
|
17305
|
+
runAutomationJob("cn", job, force);
|
|
16604
17306
|
},
|
|
16605
17307
|
banner: flash === void 0 && error === void 0 ? void 0 : (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [flash === void 0 ? null : (0, react_jsx_runtime.jsx)("p", {
|
|
16606
17308
|
className: "note",
|
|
@@ -16614,8 +17316,86 @@ window.__ModuleLoader__.load({
|
|
|
16614
17316
|
});
|
|
16615
17317
|
}
|
|
16616
17318
|
//#endregion
|
|
17319
|
+
//#region src/client/free-recovery.ts
|
|
17320
|
+
const KEY_SEP = "\0";
|
|
17321
|
+
function cooldownKey(accountId, modelId) {
|
|
17322
|
+
return `${accountId}${KEY_SEP}${modelId}`;
|
|
17323
|
+
}
|
|
17324
|
+
function isFreeModelId(modelId) {
|
|
17325
|
+
const bare = modelId.replace(/\([^()]+\)\s*$/u, "").trim();
|
|
17326
|
+
if (bare.startsWith("free:")) return true;
|
|
17327
|
+
return /(?:^|[-_])free(?:$|[-_.])/u.test(bare);
|
|
17328
|
+
}
|
|
17329
|
+
function freeModelName(modelId) {
|
|
17330
|
+
const bare = modelId.replace(/\([^()]+\)\s*$/u, "").trim();
|
|
17331
|
+
const name = (bare.startsWith("free:") ? bare.slice(5) : bare).replace(/(?:^|[-_])free(?:$|[-_.])/u, "").replace(/[-_.]+/gu, " ").trim();
|
|
17332
|
+
return name === "" ? modelId : name;
|
|
17333
|
+
}
|
|
17334
|
+
function freeCooldownSnapshotOf(status, now) {
|
|
17335
|
+
const cooldowns = new Map();
|
|
17336
|
+
const available = new Map();
|
|
17337
|
+
if (status === void 0) return {
|
|
17338
|
+
cooldowns,
|
|
17339
|
+
available
|
|
17340
|
+
};
|
|
17341
|
+
const accounts = status["accounts"];
|
|
17342
|
+
if (!Array.isArray(accounts)) return {
|
|
17343
|
+
cooldowns,
|
|
17344
|
+
available
|
|
17345
|
+
};
|
|
17346
|
+
for (const raw of accounts) {
|
|
17347
|
+
if (raw === null || typeof raw !== "object") continue;
|
|
17348
|
+
const row = raw;
|
|
17349
|
+
const id = typeof row["id"] === "string" ? row["id"] : "";
|
|
17350
|
+
if (id === "") continue;
|
|
17351
|
+
const label = typeof row["label"] === "string" ? row["label"] : "";
|
|
17352
|
+
const nickname = typeof row["nickname"] === "string" ? row["nickname"] : "";
|
|
17353
|
+
const accountName = (label || nickname || id).trim() || id;
|
|
17354
|
+
available.set(id, row["cooling"] !== true && row["credentialDead"] !== true && row["disabled"] !== true);
|
|
17355
|
+
const list = row["modelCooldowns"];
|
|
17356
|
+
if (!Array.isArray(list)) continue;
|
|
17357
|
+
for (const item of list) {
|
|
17358
|
+
if (item === null || typeof item !== "object") continue;
|
|
17359
|
+
const entry = item;
|
|
17360
|
+
const modelId = typeof entry["modelId"] === "string" ? entry["modelId"] : "";
|
|
17361
|
+
const until = typeof entry["until"] === "string" ? entry["until"] : "";
|
|
17362
|
+
if (modelId === "" || until === "" || !isFreeModelId(modelId)) continue;
|
|
17363
|
+
const at = Date.parse(until);
|
|
17364
|
+
if (!Number.isFinite(at) || at <= now) continue;
|
|
17365
|
+
cooldowns.set(cooldownKey(id, modelId), {
|
|
17366
|
+
accountId: id,
|
|
17367
|
+
accountName,
|
|
17368
|
+
modelId,
|
|
17369
|
+
until
|
|
17370
|
+
});
|
|
17371
|
+
}
|
|
17372
|
+
}
|
|
17373
|
+
return {
|
|
17374
|
+
cooldowns,
|
|
17375
|
+
available
|
|
17376
|
+
};
|
|
17377
|
+
}
|
|
17378
|
+
function detectFreeRecoveries(before, after) {
|
|
17379
|
+
const found = [];
|
|
17380
|
+
const seen = new Set();
|
|
17381
|
+
for (const [key, entry] of before.cooldowns) {
|
|
17382
|
+
if (after.cooldowns.has(key)) continue;
|
|
17383
|
+
if (after.available.get(entry.accountId) !== true) continue;
|
|
17384
|
+
if (seen.has(entry.accountId)) continue;
|
|
17385
|
+
seen.add(entry.accountId);
|
|
17386
|
+
found.push({
|
|
17387
|
+
accountId: entry.accountId,
|
|
17388
|
+
accountName: entry.accountName,
|
|
17389
|
+
modelId: entry.modelId,
|
|
17390
|
+
modelName: freeModelName(entry.modelId)
|
|
17391
|
+
});
|
|
17392
|
+
}
|
|
17393
|
+
return found.sort((a, b) => a.accountId.localeCompare(b.accountId));
|
|
17394
|
+
}
|
|
17395
|
+
//#endregion
|
|
16617
17396
|
//#region src/client/CreditDot.tsx
|
|
16618
17397
|
const POLL_MS = 45e3;
|
|
17398
|
+
const RECOVERY_NOTICE_COOLDOWN_MS = 3e4;
|
|
16619
17399
|
const POOL_STORE_KEY = "dsh-xdpool.pool-snapshot.v2";
|
|
16620
17400
|
const MARVIS_DAILY_TOKENS = 1e7;
|
|
16621
17401
|
const OWN_WALLET = new Set([
|
|
@@ -16943,10 +17723,79 @@ window.__ModuleLoader__.load({
|
|
|
16943
17723
|
noStore: readStoredLanes().lanes.length === 0
|
|
16944
17724
|
};
|
|
16945
17725
|
}
|
|
16946
|
-
function
|
|
17726
|
+
async function fetchSessionRoute(sessionId) {
|
|
17727
|
+
const url = `${POOL_SESSION_ROUTE_PATH}?sessionId=${encodeURIComponent(sessionId)}`;
|
|
17728
|
+
const response = await fetch(url, {
|
|
17729
|
+
headers: { accept: "application/json" },
|
|
17730
|
+
credentials: "same-origin"
|
|
17731
|
+
}).catch(() => void 0);
|
|
17732
|
+
if (response === void 0 || !response.ok) return void 0;
|
|
17733
|
+
const body = await response.json().catch(() => void 0);
|
|
17734
|
+
if (body === void 0) return void 0;
|
|
17735
|
+
const pinnedAccountId = typeof body["pinnedAccountId"] === "string" && body["pinnedAccountId"] !== "" ? body["pinnedAccountId"] : void 0;
|
|
17736
|
+
if (body["known"] !== true) return {
|
|
17737
|
+
known: false,
|
|
17738
|
+
channel: "",
|
|
17739
|
+
region: "",
|
|
17740
|
+
model: "",
|
|
17741
|
+
account: "",
|
|
17742
|
+
at: 0,
|
|
17743
|
+
pinnedAccountId
|
|
17744
|
+
};
|
|
17745
|
+
const text = (key) => typeof body[key] === "string" ? body[key] : "";
|
|
17746
|
+
return {
|
|
17747
|
+
known: true,
|
|
17748
|
+
channel: text("channel"),
|
|
17749
|
+
region: text("region"),
|
|
17750
|
+
model: text("model"),
|
|
17751
|
+
account: text("account"),
|
|
17752
|
+
at: typeof body["at"] === "number" ? body["at"] : 0,
|
|
17753
|
+
pinnedAccountId
|
|
17754
|
+
};
|
|
17755
|
+
}
|
|
17756
|
+
function accountLabel(account) {
|
|
17757
|
+
return (account.label || account.nickname || account.id).trim() || account.id;
|
|
17758
|
+
}
|
|
17759
|
+
function accountChoicesOf(status) {
|
|
17760
|
+
if (status === void 0) return [];
|
|
17761
|
+
const accounts = status["accounts"];
|
|
17762
|
+
if (!Array.isArray(accounts)) return [];
|
|
17763
|
+
const choices = [];
|
|
17764
|
+
const seen = new Set();
|
|
17765
|
+
for (const raw of accounts) {
|
|
17766
|
+
if (raw === null || typeof raw !== "object") continue;
|
|
17767
|
+
const row = raw;
|
|
17768
|
+
const id = typeof row["id"] === "string" ? row["id"] : "";
|
|
17769
|
+
if (id === "" || seen.has(id)) continue;
|
|
17770
|
+
seen.add(id);
|
|
17771
|
+
const label = typeof row["label"] === "string" ? row["label"] : "";
|
|
17772
|
+
const nickname = typeof row["nickname"] === "string" ? row["nickname"] : "";
|
|
17773
|
+
choices.push({
|
|
17774
|
+
id,
|
|
17775
|
+
label: accountLabel({
|
|
17776
|
+
id,
|
|
17777
|
+
label,
|
|
17778
|
+
nickname
|
|
17779
|
+
})
|
|
17780
|
+
});
|
|
17781
|
+
}
|
|
17782
|
+
return choices;
|
|
17783
|
+
}
|
|
17784
|
+
function selectValueOf(pinnedId, accountName, choices) {
|
|
17785
|
+
if (pinnedId !== void 0 && pinnedId !== "") return pinnedId;
|
|
17786
|
+
if (accountName === "") return "";
|
|
17787
|
+
return choices.find((choice) => choice.label === accountName || choice.id === accountName)?.id ?? "";
|
|
17788
|
+
}
|
|
17789
|
+
function CreditDot(input) {
|
|
17790
|
+
const { t, sessionId } = input;
|
|
16947
17791
|
const [snapshot, setSnapshot] = (0, react.useState)(void 0);
|
|
17792
|
+
const [routeTrace, setRouteTrace] = (0, react.useState)(void 0);
|
|
16948
17793
|
const [open, setOpen] = (0, react.useState)(false);
|
|
16949
17794
|
const [failed, setFailed] = (0, react.useState)(false);
|
|
17795
|
+
const [route, setRoute] = (0, react.useState)(void 0);
|
|
17796
|
+
const [accountChoices, setAccountChoices] = (0, react.useState)([]);
|
|
17797
|
+
const [pinnedId, setPinnedId] = (0, react.useState)(void 0);
|
|
17798
|
+
const [pinFailed, setPinFailed] = (0, react.useState)(false);
|
|
16950
17799
|
const anchorRef = (0, react.useRef)(null);
|
|
16951
17800
|
const panelRef = (0, react.useRef)(null);
|
|
16952
17801
|
const [pos, setPos] = (0, react.useState)(void 0);
|
|
@@ -16954,6 +17803,10 @@ window.__ModuleLoader__.load({
|
|
|
16954
17803
|
const rawRef = (0, react.useRef)(void 0);
|
|
16955
17804
|
const liveRef = (0, react.useRef)(new Map());
|
|
16956
17805
|
const liveAtRef = (0, react.useRef)(new Map());
|
|
17806
|
+
const prevFreeCooldownRef = (0, react.useRef)(void 0);
|
|
17807
|
+
const recoveryNotifiedAtRef = (0, react.useRef)(new Map());
|
|
17808
|
+
const [recoveryNotice, setRecoveryNotice] = (0, react.useState)(void 0);
|
|
17809
|
+
const [recoverySwitchedTo, setRecoverySwitchedTo] = (0, react.useState)(void 0);
|
|
16957
17810
|
const recompose = (0, react.useCallback)(() => {
|
|
16958
17811
|
const raw = rawRef.current;
|
|
16959
17812
|
if (raw === void 0 || !mounted.current) return;
|
|
@@ -16965,6 +17818,12 @@ window.__ModuleLoader__.load({
|
|
|
16965
17818
|
const poolMultiplier = typeof row?.["multiplier"] === "number" ? row["multiplier"] : void 0;
|
|
16966
17819
|
const next = compose(raw, liveRef.current, caption, poolMultiplier);
|
|
16967
17820
|
setSnapshot(next);
|
|
17821
|
+
const creditLane = next.channel;
|
|
17822
|
+
const creditKey = creditLane === void 0 ? void 0 : creditLane.id;
|
|
17823
|
+
if (creditLane !== void 0 && creditLane.metered && creditLane.total !== void 0 && creditKey !== void 0 && liveRef.current.get(creditKey) !== creditLane.total) {
|
|
17824
|
+
liveRef.current.set(creditKey, creditLane.total);
|
|
17825
|
+
setSnapshot(compose(raw, liveRef.current, caption, poolMultiplier));
|
|
17826
|
+
}
|
|
16968
17827
|
const lane = next.channel;
|
|
16969
17828
|
if (lane !== void 0 && lane.metered && !OWN_WALLET.has(lane.id) && Date.now() - (liveAtRef.current.get(lane.id) ?? 0) > POLL_MS) {
|
|
16970
17829
|
liveAtRef.current.set(lane.id, Date.now());
|
|
@@ -16977,10 +17836,26 @@ window.__ModuleLoader__.load({
|
|
|
16977
17836
|
}).catch(() => void 0);
|
|
16978
17837
|
}
|
|
16979
17838
|
}, []);
|
|
17839
|
+
(0, react.useEffect)(() => {
|
|
17840
|
+
if (!open) return;
|
|
17841
|
+
let alive = true;
|
|
17842
|
+
const read = () => {
|
|
17843
|
+
fetch(`${POOL_ROUTE_TRACE_PATH}?limit=4`, { headers: { accept: "application/json" } }).then((response) => response.ok ? response.json() : void 0).then((body) => {
|
|
17844
|
+
if (alive && body !== void 0 && typeof body === "object" && Array.isArray(body.routes)) setRouteTrace(body);
|
|
17845
|
+
}).catch(() => void 0);
|
|
17846
|
+
};
|
|
17847
|
+
read();
|
|
17848
|
+
const timer = setInterval(read, 5e3);
|
|
17849
|
+
return () => {
|
|
17850
|
+
alive = false;
|
|
17851
|
+
clearInterval(timer);
|
|
17852
|
+
};
|
|
17853
|
+
}, [open]);
|
|
16980
17854
|
const load = (0, react.useCallback)(async () => {
|
|
16981
17855
|
try {
|
|
16982
|
-
const [
|
|
16983
|
-
fetch(POOL_STATUS_PATH
|
|
17856
|
+
const [statusCnRes, statusGlobalRes, spendRes, usageRes] = await Promise.all([
|
|
17857
|
+
fetch(`${POOL_STATUS_PATH}?region=cn`, { headers: { accept: "application/json" } }).catch(() => void 0),
|
|
17858
|
+
fetch(`${POOL_STATUS_PATH}?region=global`, { headers: { accept: "application/json" } }).catch(() => void 0),
|
|
16984
17859
|
fetch(`${POOL_CREDITS_SPEND_PATH}?days=1`, { headers: { accept: "application/json" } }).catch(() => void 0),
|
|
16985
17860
|
fetch(POOL_USAGE_PATH, {
|
|
16986
17861
|
headers: { accept: "application/json" },
|
|
@@ -16988,7 +17863,25 @@ window.__ModuleLoader__.load({
|
|
|
16988
17863
|
}).catch(() => void 0)
|
|
16989
17864
|
]);
|
|
16990
17865
|
if (!mounted.current) return;
|
|
16991
|
-
const
|
|
17866
|
+
const [statusCn, statusGlobal] = await Promise.all([statusCnRes?.ok === true ? await statusCnRes.json().catch(() => void 0) : void 0, statusGlobalRes?.ok === true ? await statusGlobalRes.json().catch(() => void 0) : void 0]);
|
|
17867
|
+
const status = statusCn ?? statusGlobal;
|
|
17868
|
+
if (status !== void 0) {
|
|
17869
|
+
const seen = new Set();
|
|
17870
|
+
const merged = [];
|
|
17871
|
+
const addAccounts = (list) => {
|
|
17872
|
+
for (const row of Array.isArray(list) ? list : []) {
|
|
17873
|
+
const id = row !== null && typeof row === "object" ? row["id"] : void 0;
|
|
17874
|
+
if (typeof id === "string") {
|
|
17875
|
+
if (seen.has(id)) continue;
|
|
17876
|
+
seen.add(id);
|
|
17877
|
+
}
|
|
17878
|
+
merged.push(row);
|
|
17879
|
+
}
|
|
17880
|
+
};
|
|
17881
|
+
addAccounts(status["accounts"]);
|
|
17882
|
+
addAccounts(statusGlobal?.["accounts"]);
|
|
17883
|
+
status["accounts"] = merged;
|
|
17884
|
+
}
|
|
16992
17885
|
const activeChannels = new Set();
|
|
16993
17886
|
const spendChannels = [];
|
|
16994
17887
|
const spendRows = [];
|
|
@@ -17056,12 +17949,61 @@ window.__ModuleLoader__.load({
|
|
|
17056
17949
|
spendRows,
|
|
17057
17950
|
usage
|
|
17058
17951
|
};
|
|
17952
|
+
setAccountChoices(accountChoicesOf(status));
|
|
17953
|
+
const now = Date.now();
|
|
17954
|
+
if (status !== void 0) {
|
|
17955
|
+
const currentCooldowns = freeCooldownSnapshotOf(status, now);
|
|
17956
|
+
const previousCooldowns = prevFreeCooldownRef.current;
|
|
17957
|
+
prevFreeCooldownRef.current = currentCooldowns;
|
|
17958
|
+
if (previousCooldowns !== void 0) {
|
|
17959
|
+
const fresh = detectFreeRecoveries(previousCooldowns, currentCooldowns).find((entry) => {
|
|
17960
|
+
const key = `${entry.accountId}\u0000${entry.modelId}`;
|
|
17961
|
+
const last = recoveryNotifiedAtRef.current.get(key) ?? 0;
|
|
17962
|
+
return now - last >= RECOVERY_NOTICE_COOLDOWN_MS;
|
|
17963
|
+
});
|
|
17964
|
+
if (fresh !== void 0) {
|
|
17965
|
+
recoveryNotifiedAtRef.current.set(`${fresh.accountId}\u0000${fresh.modelId}`, now);
|
|
17966
|
+
setRecoveryNotice(fresh);
|
|
17967
|
+
}
|
|
17968
|
+
}
|
|
17969
|
+
}
|
|
17970
|
+
if (sessionId !== void 0 && sessionId !== "") {
|
|
17971
|
+
const answered = await fetchSessionRoute(sessionId).catch(() => void 0);
|
|
17972
|
+
if (mounted.current) {
|
|
17973
|
+
setRoute(answered);
|
|
17974
|
+
if (answered !== void 0) setPinnedId(answered.pinnedAccountId);
|
|
17975
|
+
}
|
|
17976
|
+
}
|
|
17059
17977
|
recompose();
|
|
17060
17978
|
setFailed(false);
|
|
17061
17979
|
} catch {
|
|
17062
17980
|
if (mounted.current) setFailed(true);
|
|
17063
17981
|
}
|
|
17064
|
-
}, [recompose]);
|
|
17982
|
+
}, [recompose, sessionId]);
|
|
17983
|
+
const changePin = (0, react.useCallback)(async (value) => {
|
|
17984
|
+
if (sessionId === void 0 || sessionId === "") return;
|
|
17985
|
+
const accountId = value === "" ? null : value;
|
|
17986
|
+
try {
|
|
17987
|
+
if (!(await fetch(`/dsh-xdpool/session/pin?sessionId=${encodeURIComponent(sessionId)}`, {
|
|
17988
|
+
method: "POST",
|
|
17989
|
+
headers: { "content-type": "application/json" },
|
|
17990
|
+
credentials: "same-origin",
|
|
17991
|
+
body: JSON.stringify({ accountId })
|
|
17992
|
+
})).ok) throw new Error("pin rejected");
|
|
17993
|
+
if (!mounted.current) return;
|
|
17994
|
+
setPinnedId(accountId ?? void 0);
|
|
17995
|
+
setPinFailed(false);
|
|
17996
|
+
const answered = await fetchSessionRoute(sessionId).catch(() => void 0);
|
|
17997
|
+
if (mounted.current) setRoute(answered);
|
|
17998
|
+
} catch {
|
|
17999
|
+
if (mounted.current) setPinFailed(true);
|
|
18000
|
+
}
|
|
18001
|
+
}, [sessionId]);
|
|
18002
|
+
const switchToFreeAccount = (0, react.useCallback)((notice) => {
|
|
18003
|
+
setRecoveryNotice(void 0);
|
|
18004
|
+
changePin(notice.accountId);
|
|
18005
|
+
setRecoverySwitchedTo(notice.accountName);
|
|
18006
|
+
}, [changePin]);
|
|
17065
18007
|
(0, react.useEffect)(() => {
|
|
17066
18008
|
mounted.current = true;
|
|
17067
18009
|
load();
|
|
@@ -17073,6 +18015,15 @@ window.__ModuleLoader__.load({
|
|
|
17073
18015
|
window.clearInterval(timer);
|
|
17074
18016
|
};
|
|
17075
18017
|
}, [load]);
|
|
18018
|
+
(0, react.useEffect)(() => {
|
|
18019
|
+
if (recoverySwitchedTo === void 0) return void 0;
|
|
18020
|
+
const timer = window.setTimeout(() => {
|
|
18021
|
+
setRecoverySwitchedTo(void 0);
|
|
18022
|
+
}, 6e3);
|
|
18023
|
+
return () => {
|
|
18024
|
+
window.clearTimeout(timer);
|
|
18025
|
+
};
|
|
18026
|
+
}, [recoverySwitchedTo]);
|
|
17076
18027
|
(0, react.useEffect)(() => {
|
|
17077
18028
|
if (open) load();
|
|
17078
18029
|
}, [open, load]);
|
|
@@ -17166,6 +18117,14 @@ window.__ModuleLoader__.load({
|
|
|
17166
18117
|
};
|
|
17167
18118
|
}, [open]);
|
|
17168
18119
|
const ready = snapshot !== void 0 && !failed;
|
|
18120
|
+
const routeKnown = route !== void 0 && route.known && sessionId !== void 0 && sessionId !== "";
|
|
18121
|
+
const isPinned = pinnedId !== void 0 && pinnedId !== "";
|
|
18122
|
+
const pinnedBadge = isPinned ? (0, react_jsx_runtime.jsxs)("span", {
|
|
18123
|
+
className: "dsm-xdpool-dotpin",
|
|
18124
|
+
title: t?.("dot.accountPinned") ?? "已固定,不会自动切换",
|
|
18125
|
+
children: ["📌 ", t?.("dot.pinnedShort") ?? "固定"]
|
|
18126
|
+
}) : null;
|
|
18127
|
+
const selectedAccount = selectValueOf(pinnedId, route?.account ?? "", accountChoices);
|
|
17169
18128
|
const total = snapshot?.channel?.total ?? 0;
|
|
17170
18129
|
const alive = ready && snapshot.channel !== void 0 && snapshot.channel.metered && total > 0;
|
|
17171
18130
|
const unmetered = ready && snapshot.channel !== void 0 && !snapshot.channel.metered;
|
|
@@ -17177,101 +18136,261 @@ window.__ModuleLoader__.load({
|
|
|
17177
18136
|
return (0, react_jsx_runtime.jsxs)("span", {
|
|
17178
18137
|
className: "dsm-xdpool-dotwrap",
|
|
17179
18138
|
style: { ["--xdpool-dot-mask"]: `url("${POOL_NAV_ICON_MASK_URL}")` },
|
|
17180
|
-
children: [
|
|
17181
|
-
|
|
17182
|
-
|
|
17183
|
-
|
|
17184
|
-
|
|
17185
|
-
|
|
17186
|
-
|
|
17187
|
-
|
|
17188
|
-
|
|
17189
|
-
|
|
17190
|
-
|
|
17191
|
-
|
|
17192
|
-
|
|
17193
|
-
|
|
17194
|
-
|
|
17195
|
-
|
|
17196
|
-
|
|
17197
|
-
|
|
17198
|
-
|
|
17199
|
-
|
|
17200
|
-
|
|
17201
|
-
|
|
17202
|
-
|
|
17203
|
-
|
|
17204
|
-
|
|
17205
|
-
|
|
17206
|
-
children:
|
|
17207
|
-
|
|
17208
|
-
(0, react_jsx_runtime.jsx)("div", {
|
|
17209
|
-
className: "dsm-xdpool-dotpanel-head",
|
|
17210
|
-
children: (0, react_jsx_runtime.jsx)("span", {
|
|
17211
|
-
className: "dsm-xdpool-dotpanel-channel",
|
|
17212
|
-
children: lane === void 0 ? t?.("dot.channelUnknown") ?? "没认出当前模型的渠道" : !lane.metered ? `${lane.name} · 不按积分计费` : `${lane.name} · ${lane.total === void 0 ? "—" : withUnit(lane.total, lane.unit)}`
|
|
17213
|
-
})
|
|
17214
|
-
}),
|
|
17215
|
-
lane === void 0 || snapshot.why === "" ? null : (0, react_jsx_runtime.jsx)("span", {
|
|
17216
|
-
className: "dsm-xdpool-dotpanel-k-sub",
|
|
17217
|
-
children: `依据:${snapshot.why}`
|
|
17218
|
-
}),
|
|
17219
|
-
fill === void 0 || lane === void 0 || !lane.metered ? null : (0, react_jsx_runtime.jsx)("div", {
|
|
17220
|
-
className: "dsm-xdpool-dotbar",
|
|
17221
|
-
role: "img",
|
|
17222
|
-
"aria-label": t?.("dot.barLabel") ?? "今日已用占比",
|
|
17223
|
-
children: (0, react_jsx_runtime.jsx)("div", {
|
|
17224
|
-
className: "dsm-xdpool-dotbar-fill",
|
|
17225
|
-
"data-full": fill >= 90 ? "true" : "false",
|
|
17226
|
-
style: { width: `${String(fill)}%` }
|
|
17227
|
-
})
|
|
17228
|
-
}),
|
|
17229
|
-
(0, react_jsx_runtime.jsxs)("div", {
|
|
17230
|
-
className: "dsm-xdpool-dotpanel-sec",
|
|
18139
|
+
children: [
|
|
18140
|
+
(0, react_jsx_runtime.jsx)("button", {
|
|
18141
|
+
ref: anchorRef,
|
|
18142
|
+
type: "button",
|
|
18143
|
+
className: "dsm-xdpool-dot",
|
|
18144
|
+
"data-state": state,
|
|
18145
|
+
"aria-label": label,
|
|
18146
|
+
"aria-expanded": open,
|
|
18147
|
+
title: lane === void 0 ? label : `${lane.name} · ${lane.total === void 0 ? "—" : withUnit(lane.total, lane.unit)}`,
|
|
18148
|
+
onClick: () => {
|
|
18149
|
+
setOpen((current) => !current);
|
|
18150
|
+
},
|
|
18151
|
+
children: (0, react_jsx_runtime.jsx)("span", {
|
|
18152
|
+
className: "dsm-xdpool-dot-glyph",
|
|
18153
|
+
"aria-hidden": "true"
|
|
18154
|
+
})
|
|
18155
|
+
}),
|
|
18156
|
+
(0, react_jsx_runtime.jsx)("span", {
|
|
18157
|
+
className: "dsm-xdpool-dotlabel",
|
|
18158
|
+
"data-state": state,
|
|
18159
|
+
title: lane === void 0 ? "—" : `${lane.name} · ${lane.total === void 0 ? "—" : withUnit(lane.total, lane.unit)}`,
|
|
18160
|
+
children: lane === void 0 ? "—" : `${lane.name} ${lane.total === void 0 ? "—" : withUnit(lane.total, lane.unit)}`
|
|
18161
|
+
}),
|
|
18162
|
+
route === void 0 || !route.known ? null : (0, react_jsx_runtime.jsxs)("span", {
|
|
18163
|
+
className: "dsm-xdpool-dotroute",
|
|
18164
|
+
"aria-label": t?.("dot.sessionRouteInline") ?? "本会话归属",
|
|
18165
|
+
children: [(0, react_jsx_runtime.jsxs)("span", {
|
|
18166
|
+
className: "dsm-xdpool-dotroute-line",
|
|
17231
18167
|
children: [(0, react_jsx_runtime.jsx)("span", {
|
|
17232
18168
|
className: "dsm-xdpool-dotpanel-k",
|
|
17233
|
-
children: t?.("dot.
|
|
17234
|
-
}), (0, react_jsx_runtime.
|
|
17235
|
-
className: "dsm-xdpool-
|
|
17236
|
-
children:
|
|
18169
|
+
children: t?.("dot.sessionChannel") ?? "本会话走"
|
|
18170
|
+
}), (0, react_jsx_runtime.jsxs)("span", {
|
|
18171
|
+
className: "dsm-xdpool-dotroute-v",
|
|
18172
|
+
children: [route.channel === "" ? "—" : brandName(route.channel), route.region === "" ? "" : ` · ${route.region === "global" ? "国际版" : "国内版"}`]
|
|
17237
18173
|
})]
|
|
17238
|
-
}),
|
|
17239
|
-
|
|
17240
|
-
className: "dsm-xdpool-dotpanel-sec",
|
|
18174
|
+
}), (0, react_jsx_runtime.jsxs)("span", {
|
|
18175
|
+
className: "dsm-xdpool-dotroute-line",
|
|
17241
18176
|
children: [(0, react_jsx_runtime.jsx)("span", {
|
|
17242
18177
|
className: "dsm-xdpool-dotpanel-k",
|
|
17243
|
-
children: t?.("dot.
|
|
18178
|
+
children: t?.("dot.sessionAccount") ?? "本会话账号"
|
|
17244
18179
|
}), (0, react_jsx_runtime.jsxs)("span", {
|
|
17245
|
-
className: "dsm-xdpool-
|
|
17246
|
-
|
|
18180
|
+
className: "dsm-xdpool-dotroute-v",
|
|
18181
|
+
title: route.account === "" ? t?.("dot.sessionAccountUnknown") ?? "这个渠道的账号由它自己挑选" : route.account,
|
|
18182
|
+
children: [route.account === "" ? t?.("dot.sessionAccountUnknownShort") ?? "由渠道自行挑选" : route.account, pinnedBadge]
|
|
17247
18183
|
})]
|
|
17248
|
-
})
|
|
17249
|
-
|
|
17250
|
-
|
|
17251
|
-
|
|
18184
|
+
})]
|
|
18185
|
+
}),
|
|
18186
|
+
recoveryNotice === void 0 ? null : (0, react_jsx_runtime.jsxs)("span", {
|
|
18187
|
+
className: "dsm-xdpool-dotrecovery",
|
|
18188
|
+
role: "status",
|
|
18189
|
+
children: [(0, react_jsx_runtime.jsx)("span", {
|
|
18190
|
+
className: "dsm-xdpool-dotrecovery-text",
|
|
18191
|
+
children: t?.("dot.freeRecovered", {
|
|
18192
|
+
account: recoveryNotice.accountName,
|
|
18193
|
+
model: recoveryNotice.modelName
|
|
18194
|
+
}) ?? `免费额度已恢复:${recoveryNotice.accountName} · ${recoveryNotice.modelName}`
|
|
18195
|
+
}), recoveryNotice.accountId === pinnedId ? null : (0, react_jsx_runtime.jsx)("button", {
|
|
18196
|
+
type: "button",
|
|
18197
|
+
className: "dsm-xdpool-dotrecovery-btn",
|
|
18198
|
+
onClick: () => {
|
|
18199
|
+
switchToFreeAccount(recoveryNotice);
|
|
18200
|
+
},
|
|
18201
|
+
children: t?.("dot.freeRecoveredSwitch") ?? "切换"
|
|
18202
|
+
})]
|
|
18203
|
+
}),
|
|
18204
|
+
recoverySwitchedTo === void 0 ? null : (0, react_jsx_runtime.jsx)("span", {
|
|
18205
|
+
className: "dsm-xdpool-dotrecovery-ok",
|
|
18206
|
+
role: "status",
|
|
18207
|
+
children: t?.("dot.freeRecoveredPinned", { account: recoverySwitchedTo }) ?? `已固定到免费账号:${recoverySwitchedTo}`
|
|
18208
|
+
}),
|
|
18209
|
+
!open ? null : (0, react_dom.createPortal)((0, react_jsx_runtime.jsxs)("div", {
|
|
18210
|
+
ref: panelRef,
|
|
18211
|
+
className: "dsm-xdpool-dotpanel",
|
|
18212
|
+
role: "dialog",
|
|
18213
|
+
"aria-label": t?.("dot.panelTitle") ?? "本会话积分",
|
|
18214
|
+
style: pos === void 0 ? { visibility: "hidden" } : {
|
|
18215
|
+
top: `${String(pos.top)}px`,
|
|
18216
|
+
left: `${String(pos.left)}px`
|
|
18217
|
+
},
|
|
18218
|
+
children: [!ready ? (0, react_jsx_runtime.jsx)("p", {
|
|
18219
|
+
className: "dsm-xdpool-dotpanel-hint",
|
|
18220
|
+
children: failed ? t?.("dot.loadFailed") ?? "积分数据读取失败" : t?.("dot.loading") ?? "正在读取积分…"
|
|
18221
|
+
}) : null, !ready ? null : (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
|
|
18222
|
+
(0, react_jsx_runtime.jsx)("div", {
|
|
18223
|
+
className: "dsm-xdpool-dotpanel-head",
|
|
18224
|
+
children: (0, react_jsx_runtime.jsx)("span", {
|
|
18225
|
+
className: "dsm-xdpool-dotpanel-channel",
|
|
18226
|
+
children: lane === void 0 ? t?.("dot.channelUnknown") ?? "没认出当前模型的渠道" : !lane.metered ? `${lane.name} · 不按积分计费` : `${lane.name} · ${lane.total === void 0 ? "—" : withUnit(lane.total, lane.unit)}`
|
|
18227
|
+
})
|
|
18228
|
+
}),
|
|
18229
|
+
lane === void 0 || snapshot.why === "" ? null : (0, react_jsx_runtime.jsx)("span", {
|
|
17252
18230
|
className: "dsm-xdpool-dotpanel-k-sub",
|
|
17253
|
-
children:
|
|
17254
|
-
}),
|
|
17255
|
-
|
|
17256
|
-
|
|
17257
|
-
|
|
18231
|
+
children: `依据:${snapshot.why}`
|
|
18232
|
+
}),
|
|
18233
|
+
fill === void 0 || lane === void 0 || !lane.metered ? null : (0, react_jsx_runtime.jsx)("div", {
|
|
18234
|
+
className: "dsm-xdpool-dotbar",
|
|
18235
|
+
role: "img",
|
|
18236
|
+
"aria-label": t?.("dot.barLabel") ?? "今日已用占比",
|
|
18237
|
+
children: (0, react_jsx_runtime.jsx)("div", {
|
|
18238
|
+
className: "dsm-xdpool-dotbar-fill",
|
|
18239
|
+
"data-full": fill >= 90 ? "true" : "false",
|
|
18240
|
+
style: { width: `${String(fill)}%` }
|
|
18241
|
+
})
|
|
18242
|
+
}),
|
|
18243
|
+
(0, react_jsx_runtime.jsxs)("div", {
|
|
18244
|
+
className: "dsm-xdpool-dotpanel-sec",
|
|
18245
|
+
children: [(0, react_jsx_runtime.jsx)("span", {
|
|
18246
|
+
className: "dsm-xdpool-dotpanel-k",
|
|
18247
|
+
children: t?.("dot.spentToday") ?? "今日已用"
|
|
18248
|
+
}), (0, react_jsx_runtime.jsx)("span", {
|
|
18249
|
+
className: "dsm-xdpool-dotpanel-v",
|
|
18250
|
+
children: lane?.quotaTotal === void 0 ? spentText : `${spentText} / ${wan(lane.quotaTotal)}`
|
|
18251
|
+
})]
|
|
18252
|
+
}),
|
|
18253
|
+
(0, react_jsx_runtime.jsxs)("div", {
|
|
18254
|
+
className: "dsm-xdpool-dotpanel-sec",
|
|
18255
|
+
children: [(0, react_jsx_runtime.jsx)("span", {
|
|
18256
|
+
className: "dsm-xdpool-dotpanel-k",
|
|
18257
|
+
children: t?.("dot.model") ?? "模型"
|
|
18258
|
+
}), (0, react_jsx_runtime.jsxs)("span", {
|
|
18259
|
+
className: "dsm-xdpool-dotpanel-v",
|
|
18260
|
+
children: [snapshot.model === "" ? "—" : snapshot.model, snapshot.multiplier === void 0 ? "" : ` · x${rate(snapshot.multiplier)}`]
|
|
18261
|
+
})]
|
|
18262
|
+
}),
|
|
18263
|
+
route === void 0 || !route.known ? null : (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
|
|
18264
|
+
(0, react_jsx_runtime.jsxs)("div", {
|
|
18265
|
+
className: "dsm-xdpool-dotpanel-sec",
|
|
18266
|
+
children: [(0, react_jsx_runtime.jsx)("span", {
|
|
18267
|
+
className: "dsm-xdpool-dotpanel-k",
|
|
18268
|
+
children: t?.("dot.sessionChannel") ?? "本会话走"
|
|
18269
|
+
}), (0, react_jsx_runtime.jsxs)("span", {
|
|
18270
|
+
className: "dsm-xdpool-dotpanel-v",
|
|
18271
|
+
children: [route.channel === "" ? "—" : brandName(route.channel), route.region === "" ? "" : ` · ${route.region === "global" ? "国际版" : "国内版"}`]
|
|
18272
|
+
})]
|
|
18273
|
+
}),
|
|
18274
|
+
(0, react_jsx_runtime.jsxs)("div", {
|
|
18275
|
+
className: "dsm-xdpool-dotpanel-sec",
|
|
18276
|
+
children: [(0, react_jsx_runtime.jsx)("span", {
|
|
18277
|
+
className: "dsm-xdpool-dotpanel-k",
|
|
18278
|
+
children: t?.("dot.sessionAccount") ?? "本会话账号"
|
|
18279
|
+
}), (0, react_jsx_runtime.jsxs)("span", {
|
|
18280
|
+
className: "dsm-xdpool-dotpanel-v",
|
|
18281
|
+
title: route.account === "" ? t?.("dot.sessionAccountUnknown") ?? "这个渠道的账号由它自己挑选" : route.account,
|
|
18282
|
+
children: [route.account === "" ? t?.("dot.sessionAccountUnknown") ?? "由渠道自行挑选" : route.account, pinnedBadge]
|
|
18283
|
+
})]
|
|
18284
|
+
}),
|
|
18285
|
+
routeKnown ? (0, react_jsx_runtime.jsxs)("div", {
|
|
18286
|
+
className: "dsm-xdpool-dotpanel-sec",
|
|
17258
18287
|
children: [(0, react_jsx_runtime.jsx)("span", {
|
|
17259
|
-
className: "dsm-xdpool-dotpanel-
|
|
17260
|
-
|
|
17261
|
-
children: other.name
|
|
18288
|
+
className: "dsm-xdpool-dotpanel-k",
|
|
18289
|
+
children: t?.("dot.accountPinLabel") ?? "账号选择"
|
|
17262
18290
|
}), (0, react_jsx_runtime.jsx)("span", {
|
|
17263
|
-
className: "dsm-xdpool-dotpanel-
|
|
17264
|
-
children:
|
|
18291
|
+
className: "dsm-xdpool-dotpanel-v",
|
|
18292
|
+
children: (0, react_jsx_runtime.jsxs)("select", {
|
|
18293
|
+
className: "dsm-xdpool-dotpin-select",
|
|
18294
|
+
"aria-label": t?.("dot.accountPinLabel") ?? "账号选择",
|
|
18295
|
+
value: selectedAccount,
|
|
18296
|
+
onChange: (event) => {
|
|
18297
|
+
changePin(event.target.value);
|
|
18298
|
+
},
|
|
18299
|
+
children: [(0, react_jsx_runtime.jsx)("option", {
|
|
18300
|
+
value: "",
|
|
18301
|
+
children: t?.("dot.accountAuto") ?? "自动(不固定)"
|
|
18302
|
+
}), accountChoices.map((choice) => (0, react_jsx_runtime.jsx)("option", {
|
|
18303
|
+
value: choice.id,
|
|
18304
|
+
children: choice.label
|
|
18305
|
+
}, choice.id))]
|
|
18306
|
+
})
|
|
17265
18307
|
})]
|
|
17266
|
-
},
|
|
17267
|
-
|
|
17268
|
-
|
|
17269
|
-
|
|
17270
|
-
|
|
17271
|
-
|
|
17272
|
-
|
|
17273
|
-
|
|
17274
|
-
|
|
18308
|
+
}) : null,
|
|
18309
|
+
routeKnown && isPinned ? (0, react_jsx_runtime.jsxs)("span", {
|
|
18310
|
+
className: "dsm-xdpool-dotpanel-k-sub",
|
|
18311
|
+
children: [
|
|
18312
|
+
t?.("dot.accountPinTo") ?? "固定到",
|
|
18313
|
+
" ",
|
|
18314
|
+
accountChoices.find((choice) => choice.id === pinnedId)?.label ?? pinnedId
|
|
18315
|
+
]
|
|
18316
|
+
}) : null,
|
|
18317
|
+
pinFailed ? (0, react_jsx_runtime.jsx)("span", {
|
|
18318
|
+
className: "dsm-xdpool-dotpanel-k-sub",
|
|
18319
|
+
children: t?.("dot.accountPinFailed") ?? "固定失败,请重试"
|
|
18320
|
+
}) : null
|
|
18321
|
+
] }),
|
|
18322
|
+
(snapshot.all ?? []).length === 0 ? null : (0, react_jsx_runtime.jsxs)("div", {
|
|
18323
|
+
className: "dsm-xdpool-dotpanel-more",
|
|
18324
|
+
children: [(0, react_jsx_runtime.jsx)("span", {
|
|
18325
|
+
className: "dsm-xdpool-dotpanel-k-sub",
|
|
18326
|
+
children: "同一模型的其他渠道"
|
|
18327
|
+
}), (snapshot.all ?? []).map((other) => {
|
|
18328
|
+
const used = snapshot.usedChannels.some((row) => row.id === other.id);
|
|
18329
|
+
return (0, react_jsx_runtime.jsxs)("div", {
|
|
18330
|
+
className: "dsm-xdpool-dotpanel-row",
|
|
18331
|
+
children: [(0, react_jsx_runtime.jsx)("span", {
|
|
18332
|
+
className: "dsm-xdpool-dotpanel-rowname",
|
|
18333
|
+
"data-used": used ? "true" : "false",
|
|
18334
|
+
children: other.name
|
|
18335
|
+
}), (0, react_jsx_runtime.jsx)("span", {
|
|
18336
|
+
className: "dsm-xdpool-dotpanel-rowval",
|
|
18337
|
+
children: !other.metered ? "不计积分" : other.total === void 0 ? "—" : withUnit(other.total, other.unit)
|
|
18338
|
+
})]
|
|
18339
|
+
}, other.id);
|
|
18340
|
+
})]
|
|
18341
|
+
}),
|
|
18342
|
+
lane === void 0 && snapshot.noStore ? (0, react_jsx_runtime.jsx)("p", {
|
|
18343
|
+
className: "dsm-xdpool-dotpanel-hint",
|
|
18344
|
+
children: "打开一次 XD Pool 的账号池页面,这里就能认出登录渠道的模型和积分。"
|
|
18345
|
+
}) : null,
|
|
18346
|
+
!ready || (routeTrace?.routes ?? []).length === 0 ? null : (0, react_jsx_runtime.jsxs)("div", {
|
|
18347
|
+
className: "dsm-xdpool-dotpanel-more",
|
|
18348
|
+
children: [(0, react_jsx_runtime.jsx)("span", {
|
|
18349
|
+
className: "dsm-xdpool-dotpanel-k-sub",
|
|
18350
|
+
children: "最近一个请求是怎么路由的"
|
|
18351
|
+
}), (() => {
|
|
18352
|
+
const d = routeTrace.routes[0];
|
|
18353
|
+
return (0, react_jsx_runtime.jsxs)("div", {
|
|
18354
|
+
className: "dsm-xdpool-dotroute",
|
|
18355
|
+
children: [(0, react_jsx_runtime.jsxs)("div", {
|
|
18356
|
+
className: "dsm-xdpool-dotroute-node",
|
|
18357
|
+
"data-served": "true",
|
|
18358
|
+
style: {
|
|
18359
|
+
borderLeftColor: "transparent",
|
|
18360
|
+
paddingLeft: 8,
|
|
18361
|
+
marginLeft: 0
|
|
18362
|
+
},
|
|
18363
|
+
children: [(0, react_jsx_runtime.jsx)("span", {
|
|
18364
|
+
className: "dsm-xdpool-dotroute-name",
|
|
18365
|
+
children: d.model
|
|
18366
|
+
}), (0, react_jsx_runtime.jsxs)("span", {
|
|
18367
|
+
className: "dsm-xdpool-dotroute-why",
|
|
18368
|
+
children: [
|
|
18369
|
+
d.steps.length,
|
|
18370
|
+
" 次尝试 · ",
|
|
18371
|
+
d.servedBy === void 0 ? "未命中" : "已命中"
|
|
18372
|
+
]
|
|
18373
|
+
})]
|
|
18374
|
+
}), d.steps.map((step, i) => {
|
|
18375
|
+
const served = step.outcome === "served";
|
|
18376
|
+
return (0, react_jsx_runtime.jsxs)("div", {
|
|
18377
|
+
className: "dsm-xdpool-dotroute-node",
|
|
18378
|
+
"data-served": served ? "true" : "false",
|
|
18379
|
+
children: [(0, react_jsx_runtime.jsx)("span", {
|
|
18380
|
+
className: "dsm-xdpool-dotroute-name",
|
|
18381
|
+
children: step.member
|
|
18382
|
+
}), (0, react_jsx_runtime.jsx)("span", {
|
|
18383
|
+
className: "dsm-xdpool-dotroute-why",
|
|
18384
|
+
children: served ? "命中 · 已接入本次回复" : `${step.kind ?? "失败"} · ${String(step.status ?? "")} · 切下一个`
|
|
18385
|
+
})]
|
|
18386
|
+
}, `${step.member}-${String(i)}`);
|
|
18387
|
+
})]
|
|
18388
|
+
});
|
|
18389
|
+
})()]
|
|
18390
|
+
})
|
|
18391
|
+
] })]
|
|
18392
|
+
}), document.body)
|
|
18393
|
+
]
|
|
17275
18394
|
});
|
|
17276
18395
|
}
|
|
17277
18396
|
//#endregion
|
|
@@ -17432,7 +18551,7 @@ window.__ModuleLoader__.load({
|
|
|
17432
18551
|
.app ::-webkit-scrollbar-thumb:hover { background: var(--line-3); background-clip: content-box; }
|
|
17433
18552
|
|
|
17434
18553
|
@media (prefers-reduced-motion: reduce) {
|
|
17435
|
-
* { transition-duration: 1ms !important; animation-duration: 1ms !important; }
|
|
18554
|
+
.app * { transition-duration: 1ms !important; animation-duration: 1ms !important; }
|
|
17436
18555
|
}
|
|
17437
18556
|
|
|
17438
18557
|
/*
|
|
@@ -19333,7 +20452,7 @@ window.__ModuleLoader__.load({
|
|
|
19333
20452
|
|
|
19334
20453
|
/* 减少动效 */
|
|
19335
20454
|
@media (prefers-reduced-motion:reduce){
|
|
19336
|
-
*{transition-duration:1ms !important;animation-duration:1ms !important}
|
|
20455
|
+
.app *{transition-duration:1ms !important;animation-duration:1ms !important}
|
|
19337
20456
|
}
|
|
19338
20457
|
|
|
19339
20458
|
|
|
@@ -19652,7 +20771,10 @@ label.sw:has(input:disabled) { opacity: .5; cursor: not-allowed }
|
|
|
19652
20771
|
is the whole at-a-glance message — green while the serving channel has credits, grey
|
|
19653
20772
|
once it does not — and the detail lives behind a click, because that row already
|
|
19654
20773
|
holds a back button, a model name, a multiplier and a reasoning level. */
|
|
19655
|
-
.dsm-xdpool-dotwrap{position:relative;display:inline-flex;align-items:center;flex:none;margin:0 2px}
|
|
20774
|
+
.dsm-xdpool-dotwrap{position:relative;display:inline-flex;align-items:center;gap:5px;flex:none;margin:0 2px}
|
|
20775
|
+
.dsm-xdpool-dotlabel{font-size:12px;font-weight:500;line-height:16px;white-space:nowrap;color:var(--dsw-alias-label-secondary,#b9becd);font-variant-numeric:tabular-nums;max-width:180px;overflow:hidden;text-overflow:ellipsis}
|
|
20776
|
+
.dsm-xdpool-dotlabel[data-state='alive']{color:#22c55e}
|
|
20777
|
+
.dsm-xdpool-dotlabel[data-state='empty']{color:var(--dsw-alias-label-tertiary,#8a90a0)}
|
|
19656
20778
|
.dsm-xdpool-dot{appearance:none;-webkit-appearance:none;display:grid;place-items:center;width:16px;height:16px;padding:0;margin:0;border:0;background:none;cursor:pointer;flex:none;border-radius:4px;transition:background-color .16s ease}
|
|
19657
20779
|
.dsm-xdpool-dot:hover{background:color-mix(in srgb, var(--dsw-alias-label-primary,#e8eaf0) 12%, transparent)}
|
|
19658
20780
|
.dsm-xdpool-dot-glyph{display:block;width:13px;height:13px;background-color:currentColor;-webkit-mask-image:var(--xdpool-dot-mask, none);mask-image:var(--xdpool-dot-mask, none);-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-position:center;mask-position:center;-webkit-mask-size:13px 13px;mask-size:13px 13px;transition:color .18s ease}
|
|
@@ -19692,6 +20814,46 @@ label.sw:has(input:disabled) { opacity: .5; cursor: not-allowed }
|
|
|
19692
20814
|
/* 认出渠道的依据、「同一模型的其他渠道」这种小字 */
|
|
19693
20815
|
.dsm-xdpool-dotpanel-k-sub{display:block;font-size:11px;line-height:15px;color:var(--dsw-alias-label-tertiary,#8a90a0);margin-top:-3px}
|
|
19694
20816
|
.dsm-xdpool-dotpanel-more .dsm-xdpool-dotpanel-k-sub{margin:0 0 2px}
|
|
20817
|
+
|
|
20818
|
+
/* 工具行里的落位:20px 高,与模型选择器那一排对齐。克劳德风格把工具行收进卡片,
|
|
20819
|
+
圆点落在模型名左边;它自家的 seat 自带 4px 内边距,这里再让出 6px 呼吸。 */
|
|
20820
|
+
.dsm-xdpool-dotwrap{height:20px}
|
|
20821
|
+
body[data-dsh-claude-style] .dsm-xdpool-dotwrap{margin:0 6px 0 0}
|
|
20822
|
+
|
|
20823
|
+
|
|
20824
|
+
/* 角标旁常驻的两行归属(和弹出面板里那两行同源,不用点开就能看见)。
|
|
20825
|
+
横向排布、字号压到 10px,避免把输入框那一行撑高;值过长时省略号截断。 */
|
|
20826
|
+
.dsm-xdpool-dotroute{display:flex;flex-direction:column;justify-content:center;gap:1px;min-width:0;max-width:160px;margin-left:4px}
|
|
20827
|
+
.dsm-xdpool-dotroute-line{display:flex;align-items:baseline;gap:4px;min-width:0;font-size:10px;line-height:13px}
|
|
20828
|
+
.dsm-xdpool-dotroute-line .dsm-xdpool-dotpanel-k{font-size:10px;line-height:13px}
|
|
20829
|
+
.dsm-xdpool-dotroute-v{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-variant-numeric:tabular-nums;color:var(--dsw-alias-label-secondary,#b9bfcc)}
|
|
20830
|
+
/* 会话账号被固定时的小标记:角标旁两行里的小字,别把那一行撑高。 */
|
|
20831
|
+
.dsm-xdpool-dotpin{font-size:9px;line-height:13px;margin-left:4px;color:#22c55e;white-space:nowrap}
|
|
20832
|
+
/* 弹出面板里的账号下拉框:10.5px、宽度自适应、不撑破 max-content 的面板。
|
|
20833
|
+
max-width:100% + min-width:0 让长账号名由 option 自己截断,而不是把面板拉宽。 */
|
|
20834
|
+
.dsm-xdpool-dotpin-select{max-width:100%;min-width:0;font-size:10.5px;line-height:16px;padding:1px 4px;border-radius:6px;border:1px solid color-mix(in srgb, var(--dsw-alias-border-l2,#ffffff1f) 80%, transparent);background:var(--dsw-alias-bg-layer-1,#23262d);color:var(--dsw-alias-label-primary,#e8eaf0);cursor:pointer}
|
|
20835
|
+
.dsm-xdpool-dotpin-select:focus-visible{outline:2px solid var(--dsw-alias-brand-primary,#5686fe);outline-offset:2px}
|
|
20836
|
+
/* 免费额度恢复提醒:角标旁一条紧凑提示 +「切换」按钮,点击复用 pin POST。
|
|
20837
|
+
和常驻归属两行共用 10px 字号,避免把输入框那一行撑高。 */
|
|
20838
|
+
.dsm-xdpool-dotrecovery{display:inline-flex;align-items:center;gap:5px;max-width:210px;margin-left:6px;padding:1px 4px;border-radius:6px;font-size:10px;line-height:14px;color:#22c55e;background:rgb(34 197 94 / 12%);white-space:nowrap}
|
|
20839
|
+
.dsm-xdpool-dotrecovery-text{overflow:hidden;text-overflow:ellipsis;min-width:0}
|
|
20840
|
+
.dsm-xdpool-dotrecovery-btn{flex:none;appearance:none;-webkit-appearance:none;padding:0 5px;border:1px solid rgb(34 197 94 / 45%);border-radius:5px;background:none;color:#22c55e;font-size:10px;line-height:14px;cursor:pointer}
|
|
20841
|
+
.dsm-xdpool-dotrecovery-btn:hover{background:rgb(34 197 94 / 18%)}
|
|
20842
|
+
.dsm-xdpool-dotrecovery-btn:focus-visible{outline:2px solid var(--dsw-alias-brand-primary,#5686fe);outline-offset:2px}
|
|
20843
|
+
.dsm-xdpool-dotrecovery-ok{margin-left:6px;font-size:10px;line-height:14px;color:#22c55e;white-space:nowrap}
|
|
20844
|
+
|
|
20845
|
+
/* 实时路由链路(issue: magpie 式「最近一个请求怎么路由的」精简版)。
|
|
20846
|
+
小弹窗空间有限,用左侧竖线串起账号/成员,命中的那个亮色 + 浅绿底。 */
|
|
20847
|
+
.dsm-xdpool-dotroute{display:flex;flex-direction:column;gap:0;padding:2px 0}
|
|
20848
|
+
.dsm-xdpool-dotroute-node{position:relative;padding:4px 6px 4px 14px;margin-left:5px;border-left:1px solid color-mix(in srgb, var(--dsw-alias-border-l2,#ffffff1f) 80%, transparent)}
|
|
20849
|
+
.dsm-xdpool-dotroute-node::before{content:'';position:absolute;left:-3.5px;top:10px;width:6px;height:6px;border-radius:50%;background:var(--dsw-alias-label-tertiary,#8a90a0)}
|
|
20850
|
+
.dsm-xdpool-dotroute-node[data-served='true']{border-left-color:#22c55e;background:rgb(34 197 94 / 7%);border-radius:0 6px 6px 0}
|
|
20851
|
+
.dsm-xdpool-dotroute-node[data-served='true']::before{background:#22c55e}
|
|
20852
|
+
.dsm-xdpool-dotroute-name{display:block;font-size:12px;line-height:16px;color:var(--dsw-alias-label-primary,#e8eaf0);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
|
|
20853
|
+
.dsm-xdpool-dotroute-why{display:block;font-size:12px;line-height:15px;color:var(--dsw-alias-label-tertiary,#8a90a0)}
|
|
20854
|
+
.dsm-xdpool-dotroute-bar{height:3px;border-radius:999px;background:color-mix(in srgb, var(--dsw-alias-label-tertiary,#8a90a0) 22%, transparent);margin-top:3px;overflow:hidden}
|
|
20855
|
+
.dsm-xdpool-dotroute-bar span{display:block;height:100%;border-radius:999px;background:#22c55e}
|
|
20856
|
+
.dsm-xdpool-dotroute-bar span[data-full='true']{background:#f59e0b}
|
|
19695
20857
|
`;
|
|
19696
20858
|
//#endregion
|
|
19697
20859
|
//#region src/client/theme-css.ts
|
|
@@ -19739,7 +20901,7 @@ label.sw:has(input:disabled) { opacity: .5; cursor: not-allowed }
|
|
|
19739
20901
|
|
|
19740
20902
|
/* ---- 状态色:暗色那套是给深底提亮的,白底上要压暗才读得清 ---- */
|
|
19741
20903
|
--ok: #2E7D46; /* 5.1:1 */
|
|
19742
|
-
--warn: #
|
|
20904
|
+
--warn: #755309; /* 压暗到 #ECEADC 底上 ≥4.5:1(pill[data-tone=warn] 混色后) */
|
|
19743
20905
|
--danger: #B23A26; /* 6.0:1 */
|
|
19744
20906
|
--info: #2F6A9E; /* 5.7:1 */
|
|
19745
20907
|
|
|
@@ -20079,6 +21241,12 @@ label.sw:has(input:disabled) { opacity: .5; cursor: not-allowed }
|
|
|
20079
21241
|
"row.autoRunning": "Running…",
|
|
20080
21242
|
"row.autoRan": "Done: {count} account(s) ok, {failed} failed",
|
|
20081
21243
|
"row.autoRanTasks": "Done: {claimed} task(s) claimed, +{credit} credits, +{energy} energy",
|
|
21244
|
+
"row.autoJobOk": "ok",
|
|
21245
|
+
"row.autoJobsTitle": "Automation jobs",
|
|
21246
|
+
"row.autoJobsHint": "Each job runs on its own; “Force run” ignores the once-per-hour guard.",
|
|
21247
|
+
"row.autoRunHint": "Run just this job. A job that already ran this hour will not repeat.",
|
|
21248
|
+
"row.autoForce": "Force run",
|
|
21249
|
+
"row.autoForceHint": "Ignore the once-per-hour guard and run this job again.",
|
|
20082
21250
|
"row.reserveTitle": "Keep at least",
|
|
20083
21251
|
"row.reserveUnit": "credits",
|
|
20084
21252
|
"row.reserveSaving": "Saving…",
|
|
@@ -20091,10 +21259,10 @@ label.sw:has(input:disabled) { opacity: .5; cursor: not-allowed }
|
|
|
20091
21259
|
"row.autoEarned": "Automation today",
|
|
20092
21260
|
"row.autoEnergy": "energy",
|
|
20093
21261
|
"row.autoTasksClaimed": "{count} task(s)",
|
|
20094
|
-
"row.autoRunAll": "Run now",
|
|
21262
|
+
"row.autoRunAll": "Run all now",
|
|
20095
21263
|
"row.autoRunDone": "Automation pass finished",
|
|
20096
21264
|
"row.autoRunTimeout": "Still running; check back in a moment",
|
|
20097
|
-
"row.autoAlreadyRunning": "A run is already in progress",
|
|
21265
|
+
"row.autoAlreadyRunning": "A run is already in progress, or this hour already ran — nothing was repeated",
|
|
20098
21266
|
"row.autoRanAll": "Ran {jobs} job(s), {ok} ok, {failed} failed",
|
|
20099
21267
|
"row.autoFromTasks": "Tasks +{credit} credits · +{energy} energy · {count} task(s)",
|
|
20100
21268
|
"row.autoFromCheckin": "Check-in +{credit} credits",
|
|
@@ -20389,6 +21557,20 @@ label.sw:has(input:disabled) { opacity: .5; cursor: not-allowed }
|
|
|
20389
21557
|
"dot.loadFailed": "Could not read the credit data",
|
|
20390
21558
|
"dot.remaining": "Remaining",
|
|
20391
21559
|
"dot.barLabel": "Share of the period budget used",
|
|
21560
|
+
"dot.sessionChannel": "Served by",
|
|
21561
|
+
"dot.sessionAccount": "Account",
|
|
21562
|
+
"dot.sessionAccountUnknown": "Chosen by the channel",
|
|
21563
|
+
"dot.sessionAccountUnknownShort": "channel-picked",
|
|
21564
|
+
"dot.sessionRouteInline": "This session",
|
|
21565
|
+
"dot.accountPinLabel": "Account selection",
|
|
21566
|
+
"dot.accountAuto": "Auto (unpinned)",
|
|
21567
|
+
"dot.accountPinTo": "Pin to",
|
|
21568
|
+
"dot.accountPinned": "Pinned — the pool will not rotate this session",
|
|
21569
|
+
"dot.pinnedShort": "pinned",
|
|
21570
|
+
"dot.accountPinFailed": "Could not pin the account — please retry",
|
|
21571
|
+
"dot.freeRecovered": "Free quota restored: {account} · {model}",
|
|
21572
|
+
"dot.freeRecoveredSwitch": "Switch",
|
|
21573
|
+
"dot.freeRecoveredPinned": "Pinned to free account: {account}",
|
|
20392
21574
|
"gw.keyHint": "This key survives a DSH restart. Rotating it drops every device that still holds the old one. This is not the per-process secret of the pool itself — a client that learned that one would stop working the next time DSH restarts.",
|
|
20393
21575
|
"gw.usage": "Using it",
|
|
20394
21576
|
"gw.usageHint": "Any OpenAI-compatible app works. Set its base URL to the endpoint above, pick a model out of /v1/models, and send this key as the API key. The relay passes /v1/models and /v1/chat/completions only; everything else is refused before a byte is forwarded.",
|
|
@@ -20480,6 +21662,7 @@ label.sw:has(input:disabled) { opacity: .5; cursor: not-allowed }
|
|
|
20480
21662
|
"channelpool.badgePlan": "Plan",
|
|
20481
21663
|
"channelpool.badgeVision": "Image",
|
|
20482
21664
|
"channelpool.claimedToday": "Claimed today",
|
|
21665
|
+
"channelpool.claimedTodayHint": "Accounts already checked in today / accounts enabled, from the vendor’s own check-in state",
|
|
20483
21666
|
"channelpool.close": "Close",
|
|
20484
21667
|
"channelpool.contextWindow": "Context window",
|
|
20485
21668
|
"channelpool.credentialExpiry": "Credential expires",
|
|
@@ -20652,8 +21835,8 @@ label.sw:has(input:disabled) { opacity: .5; cursor: not-allowed }
|
|
|
20652
21835
|
"row.accountToggleError": "切换账号失败:{message}",
|
|
20653
21836
|
"row.accountIgnore": "移出池子",
|
|
20654
21837
|
"row.accountIgnoreHint": "把这个账号永久移出池子 —— 不再读取它的凭据,即使重新登录也不会回来",
|
|
20655
|
-
"row.accountPrefer": "
|
|
20656
|
-
"row.accountPreferOn": "
|
|
21838
|
+
"row.accountPrefer": "优先用此账号",
|
|
21839
|
+
"row.accountPreferOn": "取消优先",
|
|
20657
21840
|
"row.accountPreferHint": "优先使用这个账号 —— 它健康时先用它,不可用时自动回到你设定的分发策略",
|
|
20658
21841
|
"row.accountPreferClearHint": "取消优先,改回按你设定的分发策略轮换",
|
|
20659
21842
|
"row.accountPreferError": "设置优先账号失败:{message}",
|
|
@@ -20802,6 +21985,12 @@ label.sw:has(input:disabled) { opacity: .5; cursor: not-allowed }
|
|
|
20802
21985
|
"row.autoRunning": "运行中…",
|
|
20803
21986
|
"row.autoRan": "完成:{count} 个账号正常,{failed} 个失败",
|
|
20804
21987
|
"row.autoRanTasks": "完成:领取 {claimed} 个任务,+{credit} 积分,+{energy} 能量",
|
|
21988
|
+
"row.autoJobOk": "正常",
|
|
21989
|
+
"row.autoJobsTitle": "自动化任务",
|
|
21990
|
+
"row.autoJobsHint": "每项独立运行;「强制重跑」会忽略本小时已执行的保护。",
|
|
21991
|
+
"row.autoRunHint": "只运行这一项;本小时已执行过时不会重复执行。",
|
|
21992
|
+
"row.autoForce": "强制重跑",
|
|
21993
|
+
"row.autoForceHint": "忽略本小时已执行的保护,强制再跑一次。",
|
|
20805
21994
|
"row.reserveTitle": "保留积分",
|
|
20806
21995
|
"row.reserveUnit": "积分",
|
|
20807
21996
|
"row.reserveSaving": "保存中…",
|
|
@@ -20814,10 +22003,10 @@ label.sw:has(input:disabled) { opacity: .5; cursor: not-allowed }
|
|
|
20814
22003
|
"row.autoEarned": "今日自动化获得",
|
|
20815
22004
|
"row.autoEnergy": "能量",
|
|
20816
22005
|
"row.autoTasksClaimed": "{count} 个任务",
|
|
20817
|
-
"row.autoRunAll": "
|
|
22006
|
+
"row.autoRunAll": "立即执行全部任务",
|
|
20818
22007
|
"row.autoRunDone": "自动化已执行完成",
|
|
20819
22008
|
"row.autoRunTimeout": "仍在执行中,稍后查看结果",
|
|
20820
|
-
"row.autoAlreadyRunning": "
|
|
22009
|
+
"row.autoAlreadyRunning": "已有一次执行正在进行,或本小时已执行过 —— 未重复执行",
|
|
20821
22010
|
"row.autoRanAll": "已运行 {jobs} 项,{ok} 个正常,{failed} 个失败",
|
|
20822
22011
|
"row.autoFromTasks": "任务 +{credit} 积分 · +{energy} 能量 · {count} 个",
|
|
20823
22012
|
"row.autoFromCheckin": "签到 +{credit} 积分",
|
|
@@ -21112,6 +22301,20 @@ label.sw:has(input:disabled) { opacity: .5; cursor: not-allowed }
|
|
|
21112
22301
|
"dot.loadFailed": "积分数据读取失败",
|
|
21113
22302
|
"dot.remaining": "剩余积分",
|
|
21114
22303
|
"dot.barLabel": "本期已用占比",
|
|
22304
|
+
"dot.sessionChannel": "本会话走",
|
|
22305
|
+
"dot.sessionAccount": "本会话账号",
|
|
22306
|
+
"dot.sessionAccountUnknown": "由渠道自行挑选",
|
|
22307
|
+
"dot.sessionAccountUnknownShort": "由渠道自行挑选",
|
|
22308
|
+
"dot.sessionRouteInline": "本会话归属",
|
|
22309
|
+
"dot.accountPinLabel": "账号选择",
|
|
22310
|
+
"dot.accountAuto": "自动(不固定)",
|
|
22311
|
+
"dot.accountPinTo": "固定到",
|
|
22312
|
+
"dot.accountPinned": "已固定,池子不会自动换号",
|
|
22313
|
+
"dot.pinnedShort": "固定",
|
|
22314
|
+
"dot.accountPinFailed": "固定失败,请重试",
|
|
22315
|
+
"dot.freeRecovered": "免费额度已恢复:{account} · {model}",
|
|
22316
|
+
"dot.freeRecoveredSwitch": "切换",
|
|
22317
|
+
"dot.freeRecoveredPinned": "已固定到免费账号:{account}",
|
|
21115
22318
|
"gw.keyHint": "这把密钥在 DSH 重启后仍然有效。轮换会让所有还在用旧密钥的设备立刻断线。这里给的也不是账号池自己每进程生成的秘密 —— 客户端要是拿到它,DSH 下次一重启就全废了。",
|
|
21116
22319
|
"gw.usage": "怎么用",
|
|
21117
22320
|
"gw.usageHint": "任何 OpenAI 兼容的客户端都行:接口地址填上面那个入口,模型从 /v1/models 里挑,密钥填到这个 API 密钥的位置。中继只放行 /v1/models 和 /v1/chat/completions,其余路径在转发任何字节之前就拒掉。",
|
|
@@ -21203,6 +22406,7 @@ label.sw:has(input:disabled) { opacity: .5; cursor: not-allowed }
|
|
|
21203
22406
|
"channelpool.badgePlan": "订阅",
|
|
21204
22407
|
"channelpool.badgeVision": "图像",
|
|
21205
22408
|
"channelpool.claimedToday": "今日已领",
|
|
22409
|
+
"channelpool.claimedTodayHint": "今日已签到的账号数 / 启用的账号数,来自上游的签到状态",
|
|
21206
22410
|
"channelpool.close": "关闭",
|
|
21207
22411
|
"channelpool.contextWindow": "上下文",
|
|
21208
22412
|
"channelpool.credentialExpiry": "凭据有效期",
|
|
@@ -21374,12 +22578,22 @@ label.sw:has(input:disabled) { opacity: .5; cursor: not-allowed }
|
|
|
21374
22578
|
console.error("[dsh-xdpool] sidebar entry unavailable (settings page unaffected):", error);
|
|
21375
22579
|
}
|
|
21376
22580
|
try {
|
|
21377
|
-
|
|
21378
|
-
name:
|
|
22581
|
+
const dotEntry = (slotName) => ({
|
|
22582
|
+
name: slotName,
|
|
21379
22583
|
id: "xdpool-credit-dot",
|
|
21380
22584
|
order: 20,
|
|
21381
22585
|
inject: () => t === void 0 ? {} : { t }
|
|
21382
|
-
}
|
|
22586
|
+
});
|
|
22587
|
+
const registerDot = (slotName) => () => {
|
|
22588
|
+
try {
|
|
22589
|
+
return ctx.slots.register(dotEntry(slotName), CreditDot);
|
|
22590
|
+
} catch (error) {
|
|
22591
|
+
console.error(`[dsh-xdpool] the credit dot could not use the ${slotName} slot:`, error);
|
|
22592
|
+
if (slotName === "conversation.composer.dock") return void 0;
|
|
22593
|
+
return ctx.slots.register(dotEntry("conversation.composer.dock"), CreditDot);
|
|
22594
|
+
}
|
|
22595
|
+
};
|
|
22596
|
+
ctx.slots.inject("conversation.input.right", registerDot("conversation.input.right"));
|
|
21383
22597
|
} catch (error) {
|
|
21384
22598
|
console.error("[dsh-xdpool] composer credit dot unavailable (everything else unaffected):", error);
|
|
21385
22599
|
}
|