dsh-connect-trae 3.6.1 → 3.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +187 -0
- package/README.en.md +24 -7
- package/README.md +40 -10
- package/lib/client.js +92 -37
- package/lib/index.d.ts +312 -43
- package/lib/index.js +821 -277
- package/package.json +20 -19
package/lib/client.js
CHANGED
|
@@ -7,7 +7,24 @@ window.__ModuleLoader__.load({
|
|
|
7
7
|
let react = require("react");
|
|
8
8
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
9
9
|
let react_dom = require("react-dom");
|
|
10
|
+
//#region src/region.ts
|
|
11
|
+
/** Every panel, in card tab order. */
|
|
12
|
+
const TRAE_PANELS = [
|
|
13
|
+
"cn",
|
|
14
|
+
"enterprise",
|
|
15
|
+
"ai"
|
|
16
|
+
];
|
|
17
|
+
/** The region whose credential/account pool a panel draws on. */
|
|
18
|
+
function regionOfPanel(panel) {
|
|
19
|
+
return panel === "ai" ? "ai" : "cn";
|
|
20
|
+
}
|
|
21
|
+
//#endregion
|
|
10
22
|
//#region src/status-paths.ts
|
|
23
|
+
/**
|
|
24
|
+
* Node-free constants and types shared by the Host and browser halves.
|
|
25
|
+
* Mirrors the `dsh-workbuddy-connect` status-route pattern so the plugin card
|
|
26
|
+
* stays consistent with that project's external presentation.
|
|
27
|
+
*/
|
|
11
28
|
/** Plugin-owned usage endpoint consumed by its browser half. */
|
|
12
29
|
const TRAE_USAGE_PATH = "/plugins/dsh-connect-trae/usage";
|
|
13
30
|
/** Plugin-owned live model refresh endpoint. */
|
|
@@ -61,14 +78,12 @@ window.__ModuleLoader__.load({
|
|
|
61
78
|
const TRAE_TRANSFER_PATH = "/plugins/dsh-connect-trae/transfer";
|
|
62
79
|
/** Query parameter naming the region a card request addresses. */
|
|
63
80
|
const TRAE_REGION_PARAM = "region";
|
|
64
|
-
/** Every region, in card tab order. */
|
|
65
|
-
const TRAE_REGIONS = ["cn", "ai"];
|
|
66
81
|
/**
|
|
67
82
|
* Address one region's status route. The two regions are separate provider
|
|
68
83
|
* stacks; every card request carries the region whose tab the user is on.
|
|
69
84
|
*/
|
|
70
|
-
function withTraeRegion(path,
|
|
71
|
-
return `${path}?${TRAE_REGION_PARAM}=${
|
|
85
|
+
function withTraeRegion(path, panel) {
|
|
86
|
+
return `${path}?${TRAE_REGION_PARAM}=${panel}`;
|
|
72
87
|
}
|
|
73
88
|
/**
|
|
74
89
|
* Address one region's transfer route with its step, e.g.
|
|
@@ -79,8 +94,8 @@ window.__ModuleLoader__.load({
|
|
|
79
94
|
* away from a 400, which is exactly the failure the sibling workbuddy plugin
|
|
80
95
|
* hit (#42) when five requests dropped that parameter.
|
|
81
96
|
*/
|
|
82
|
-
function withTraeTransferAction(path,
|
|
83
|
-
return `${path}?${TRAE_REGION_PARAM}=${
|
|
97
|
+
function withTraeTransferAction(path, panel, action) {
|
|
98
|
+
return `${path}?${TRAE_REGION_PARAM}=${panel}&action=${action}`;
|
|
84
99
|
}
|
|
85
100
|
/**
|
|
86
101
|
* Peel ONE `{get(): T}` live reference, the shape DSH 0.1.7 delivers a
|
|
@@ -157,11 +172,11 @@ window.__ModuleLoader__.load({
|
|
|
157
172
|
* region's picks. Tolerates any stored shape (absent, non-object) by starting
|
|
158
173
|
* from an empty document.
|
|
159
174
|
*/
|
|
160
|
-
function nextRegionSlots(regions,
|
|
175
|
+
function nextRegionSlots(regions, panel, slot) {
|
|
161
176
|
const unwrapped = unwrapVolatileDeep(regions);
|
|
162
177
|
return {
|
|
163
178
|
...typeof unwrapped === "object" && unwrapped !== null && !Array.isArray(unwrapped) ? unwrapped : {},
|
|
164
|
-
[
|
|
179
|
+
[panel]: slot
|
|
165
180
|
};
|
|
166
181
|
}
|
|
167
182
|
/**
|
|
@@ -186,8 +201,8 @@ window.__ModuleLoader__.load({
|
|
|
186
201
|
return record;
|
|
187
202
|
}
|
|
188
203
|
/** One region's stored slot as a plain object; any other shape reads as empty. */
|
|
189
|
-
function regionSlotOf(value,
|
|
190
|
-
const slot = unwrapVolatile(regionsMapOf(value)[
|
|
204
|
+
function regionSlotOf(value, panel) {
|
|
205
|
+
const slot = unwrapVolatile(regionsMapOf(value)[panel]);
|
|
191
206
|
return typeof slot === "object" && slot !== null && !Array.isArray(slot) ? slot : {};
|
|
192
207
|
}
|
|
193
208
|
/**
|
|
@@ -200,8 +215,10 @@ window.__ModuleLoader__.load({
|
|
|
200
215
|
* `value` may be the whole settings section or the `regions` map (see
|
|
201
216
|
* {@link regionsMapOf}).
|
|
202
217
|
*/
|
|
203
|
-
function regionEnabledOf(value,
|
|
204
|
-
|
|
218
|
+
function regionEnabledOf(value, panel) {
|
|
219
|
+
const stored = regionSlotOf(value, panel)["enabled"];
|
|
220
|
+
if (typeof stored === "boolean") return stored;
|
|
221
|
+
return panel !== "enterprise";
|
|
205
222
|
}
|
|
206
223
|
/**
|
|
207
224
|
* Build the next `regions` settings value for a provider on/off toggle. ONLY
|
|
@@ -219,9 +236,9 @@ window.__ModuleLoader__.load({
|
|
|
219
236
|
* value is always the `regions` map, i.e. exactly what `settingsScope.set(
|
|
220
237
|
* 'regions', ...)` needs.
|
|
221
238
|
*/
|
|
222
|
-
function nextRegionEnabled(value,
|
|
223
|
-
return nextRegionSlots(regionsMapOf(value),
|
|
224
|
-
...regionSlotOf(value,
|
|
239
|
+
function nextRegionEnabled(value, panel, enabled) {
|
|
240
|
+
return nextRegionSlots(regionsMapOf(value), panel, {
|
|
241
|
+
...regionSlotOf(value, panel),
|
|
225
242
|
enabled
|
|
226
243
|
});
|
|
227
244
|
}
|
|
@@ -238,8 +255,8 @@ window.__ModuleLoader__.load({
|
|
|
238
255
|
* `value` may be the whole settings section or the `regions` map (see
|
|
239
256
|
* {@link regionsMapOf}).
|
|
240
257
|
*/
|
|
241
|
-
function regionCreditPositionOf(value,
|
|
242
|
-
return regionSlotOf(value,
|
|
258
|
+
function regionCreditPositionOf(value, panel) {
|
|
259
|
+
return regionSlotOf(value, panel)["creditPosition"] === "stats" ? "stats" : "composer";
|
|
243
260
|
}
|
|
244
261
|
/**
|
|
245
262
|
* Build the next `regions` settings value for one region's credit seat.
|
|
@@ -252,9 +269,9 @@ window.__ModuleLoader__.load({
|
|
|
252
269
|
* value is always the `regions` map, i.e. exactly what `settingsScope.set(
|
|
253
270
|
* 'regions', ...)` needs.
|
|
254
271
|
*/
|
|
255
|
-
function nextRegionCreditPosition(value,
|
|
256
|
-
return nextRegionSlots(regionsMapOf(value),
|
|
257
|
-
...regionSlotOf(value,
|
|
272
|
+
function nextRegionCreditPosition(value, panel, position) {
|
|
273
|
+
return nextRegionSlots(regionsMapOf(value), panel, {
|
|
274
|
+
...regionSlotOf(value, panel),
|
|
258
275
|
creditPosition: position
|
|
259
276
|
});
|
|
260
277
|
}
|
|
@@ -331,6 +348,8 @@ window.__ModuleLoader__.load({
|
|
|
331
348
|
.dsm-trae-tab-switch{flex:none;padding:0 8px 0 2px}
|
|
332
349
|
.dsm-trae-tab-dot{display:inline-block;width:7px;height:7px;border-radius:50%;margin-right:6px;vertical-align:baseline}
|
|
333
350
|
.dsm-trae-tab-hint{margin:0;color:var(--dsw-alias-label-tertiary,#999);font-size:12px;line-height:18px}
|
|
351
|
+
.dsm-trae-credits-unavailable{margin:10px 0 0;padding:10px 12px;border:1px solid var(--dsw-alias-border-l2,#3a3d45);border-radius:10px;color:var(--dsw-alias-label-secondary,#c6c9d0);font-size:12px;line-height:18px;background:var(--dsw-alias-bg-layer-3,#2a2c33)}
|
|
352
|
+
.dsm-trae-account-value-muted{color:var(--dsw-alias-label-secondary,#c6c9d0);font-size:12px}
|
|
334
353
|
.dsm-trae-tab-off-notice{margin:0;padding:10px 12px;border:1px solid var(--dsw-alias-border-l2,#3a3d45);border-radius:10px;color:var(--dsw-alias-label-secondary,#c6c9d0);font-size:12px;line-height:18px;background:var(--dsw-alias-bg-layer-3,#2a2c33)}
|
|
335
354
|
.dsm-trae-usage-account{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 14px;border:1px solid var(--dsw-alias-border-l2,#3a3d45);border-radius:14px;background:var(--dsw-alias-bg-layer-2,#24262c)}
|
|
336
355
|
.dsm-trae-usage-account-copy{display:flex;flex-direction:column;gap:3px;min-width:0}
|
|
@@ -1438,6 +1457,10 @@ window.__ModuleLoader__.load({
|
|
|
1438
1457
|
status: "signed-out",
|
|
1439
1458
|
accounts: []
|
|
1440
1459
|
},
|
|
1460
|
+
enterprise: {
|
|
1461
|
+
status: "signed-out",
|
|
1462
|
+
accounts: []
|
|
1463
|
+
},
|
|
1441
1464
|
ai: {
|
|
1442
1465
|
status: "signed-out",
|
|
1443
1466
|
accounts: []
|
|
@@ -1452,6 +1475,7 @@ window.__ModuleLoader__.load({
|
|
|
1452
1475
|
*/
|
|
1453
1476
|
const [probeByRegion, setProbeByRegion] = (0, react.useState)({
|
|
1454
1477
|
cn: {},
|
|
1478
|
+
enterprise: {},
|
|
1455
1479
|
ai: {}
|
|
1456
1480
|
});
|
|
1457
1481
|
const [testing, setTesting] = (0, react.useState)(void 0);
|
|
@@ -1501,6 +1525,7 @@ window.__ModuleLoader__.load({
|
|
|
1501
1525
|
*/
|
|
1502
1526
|
const [accountStatusByRegion, setAccountStatusByRegion] = (0, react.useState)({
|
|
1503
1527
|
cn: {},
|
|
1528
|
+
enterprise: {},
|
|
1504
1529
|
ai: {}
|
|
1505
1530
|
});
|
|
1506
1531
|
/** Which account row is claiming right now, so only its button spins. */
|
|
@@ -1512,6 +1537,7 @@ window.__ModuleLoader__.load({
|
|
|
1512
1537
|
*/
|
|
1513
1538
|
const [claimErrorByRegion, setClaimErrorByRegion] = (0, react.useState)({
|
|
1514
1539
|
cn: {},
|
|
1540
|
+
enterprise: {},
|
|
1515
1541
|
ai: {}
|
|
1516
1542
|
});
|
|
1517
1543
|
/**
|
|
@@ -1524,6 +1550,7 @@ window.__ModuleLoader__.load({
|
|
|
1524
1550
|
*/
|
|
1525
1551
|
const [deviceSpentByRegion, setDeviceSpentByRegion] = (0, react.useState)({
|
|
1526
1552
|
cn: {},
|
|
1553
|
+
enterprise: {},
|
|
1527
1554
|
ai: {}
|
|
1528
1555
|
});
|
|
1529
1556
|
/**
|
|
@@ -1675,6 +1702,16 @@ window.__ModuleLoader__.load({
|
|
|
1675
1702
|
*/
|
|
1676
1703
|
const regionOn = (item) => regionEnabledOf(settingsScope?.getSnapshot().value, item);
|
|
1677
1704
|
const activeRegionOn = regionOn(activeRegion);
|
|
1705
|
+
/**
|
|
1706
|
+
* Credential region of the ACTIVE PANEL.
|
|
1707
|
+
*
|
|
1708
|
+
* The enterprise panel is a second CN pool, so anything that asks "is this the
|
|
1709
|
+
* international side?" — pay status vs. credit packs, check-in column, the
|
|
1710
|
+
* credit-readout switch — must answer by CREDENTIAL REGION, not by tab
|
|
1711
|
+
* identity. `isCnPool` is the common case (cn + enterprise).
|
|
1712
|
+
*/
|
|
1713
|
+
const credentialRegionIsAi = regionOfPanel(activeRegion) === "ai";
|
|
1714
|
+
const isCnPool = !credentialRegionIsAi;
|
|
1678
1715
|
const refreshUsage = (0, react.useCallback)(async (region, signal) => {
|
|
1679
1716
|
try {
|
|
1680
1717
|
const response = await fetch(withTraeRegion(TRAE_USAGE_PATH, region), {
|
|
@@ -2298,7 +2335,7 @@ window.__ModuleLoader__.load({
|
|
|
2298
2335
|
* "zero".
|
|
2299
2336
|
*/
|
|
2300
2337
|
const rowValue = (state) => {
|
|
2301
|
-
if (
|
|
2338
|
+
if (credentialRegionIsAi) {
|
|
2302
2339
|
const payStatus = state?.payStatus;
|
|
2303
2340
|
if (payStatus === void 0) return void 0;
|
|
2304
2341
|
const verdict = planVerdict(payStatus);
|
|
@@ -2311,6 +2348,10 @@ window.__ModuleLoader__.load({
|
|
|
2311
2348
|
children: verdict.tier === void 0 ? t("row.subscribed") : t("row.planTier", { tier: verdict.tier })
|
|
2312
2349
|
});
|
|
2313
2350
|
}
|
|
2351
|
+
if (activeRegion === "enterprise") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
2352
|
+
className: "dsm-trae-account-value dsm-trae-account-value-muted",
|
|
2353
|
+
children: t("row.balanceConsoleOnly")
|
|
2354
|
+
});
|
|
2314
2355
|
const figure = state?.credits?.generalAvailable;
|
|
2315
2356
|
if (figure === void 0) return void 0;
|
|
2316
2357
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
@@ -2400,7 +2441,7 @@ window.__ModuleLoader__.load({
|
|
|
2400
2441
|
className: "dsm-trae-tabs",
|
|
2401
2442
|
role: "tablist",
|
|
2402
2443
|
"aria-label": title,
|
|
2403
|
-
children:
|
|
2444
|
+
children: TRAE_PANELS.map((item) => {
|
|
2404
2445
|
const regionStatus = statusByRegion[item];
|
|
2405
2446
|
const on = regionOn(item);
|
|
2406
2447
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
@@ -2418,7 +2459,7 @@ window.__ModuleLoader__.load({
|
|
|
2418
2459
|
"aria-hidden": "true",
|
|
2419
2460
|
className: "dsm-trae-tab-dot",
|
|
2420
2461
|
style: dotStyle(regionStatus.status)
|
|
2421
|
-
}), item === "cn" ? t("row.tabCn") : t("row.tabAi")]
|
|
2462
|
+
}), item === "cn" ? t("row.tabCn") : item === "enterprise" ? t("row.tabEnterprise") : t("row.tabAi")]
|
|
2422
2463
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("label", {
|
|
2423
2464
|
className: "dsm-trae-switch dsm-trae-tab-switch",
|
|
2424
2465
|
title: t("row.tabSwitchHint"),
|
|
@@ -2426,7 +2467,7 @@ window.__ModuleLoader__.load({
|
|
|
2426
2467
|
type: "checkbox",
|
|
2427
2468
|
checked: on,
|
|
2428
2469
|
disabled: settingsScope?.getSnapshot().writable !== true || togglingRegion !== void 0,
|
|
2429
|
-
"aria-label": t("row.tabSwitchAria", { region: item === "cn" ? t("row.tabCn") : t("row.tabAi") }),
|
|
2470
|
+
"aria-label": t("row.tabSwitchAria", { region: item === "cn" ? t("row.tabCn") : item === "enterprise" ? t("row.tabEnterprise") : t("row.tabAi") }),
|
|
2430
2471
|
onChange: (event) => {
|
|
2431
2472
|
toggleRegion(item, event.currentTarget.checked);
|
|
2432
2473
|
}
|
|
@@ -2480,7 +2521,7 @@ window.__ModuleLoader__.load({
|
|
|
2480
2521
|
}),
|
|
2481
2522
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
|
|
2482
2523
|
className: "dsm-trae-pref",
|
|
2483
|
-
title: t(
|
|
2524
|
+
title: t(isCnPool ? "row.showPointsInMainUiHint" : "row.showPointsInMainUiHintAi"),
|
|
2484
2525
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
2485
2526
|
type: "checkbox",
|
|
2486
2527
|
checked: settingsEdits.showPointsInMainUi,
|
|
@@ -2499,7 +2540,7 @@ window.__ModuleLoader__.load({
|
|
|
2499
2540
|
" ",
|
|
2500
2541
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
2501
2542
|
className: "dsm-trae-pref-hint",
|
|
2502
|
-
children: t(
|
|
2543
|
+
children: t(isCnPool ? "row.showPointsInMainUiHint" : "row.showPointsInMainUiHintAi")
|
|
2503
2544
|
})
|
|
2504
2545
|
]
|
|
2505
2546
|
})]
|
|
@@ -2511,7 +2552,7 @@ window.__ModuleLoader__.load({
|
|
|
2511
2552
|
className: "dsm-trae-credit-position",
|
|
2512
2553
|
value: activeRegionOn ? creditPositionOn(activeRegion) : "composer",
|
|
2513
2554
|
disabled: !activeRegionOn || settingsScope?.getSnapshot().writable !== true || savingSettings,
|
|
2514
|
-
"aria-label": t("row.creditPositionAria", { region: activeRegion === "cn" ? t("row.tabCn") : t("row.tabAi") }),
|
|
2555
|
+
"aria-label": t("row.creditPositionAria", { region: activeRegion === "cn" ? t("row.tabCn") : activeRegion === "enterprise" ? t("row.tabEnterprise") : t("row.tabAi") }),
|
|
2515
2556
|
onChange: (event) => {
|
|
2516
2557
|
changeCreditPosition(activeRegion, event.currentTarget.value === "stats" ? "stats" : "composer");
|
|
2517
2558
|
},
|
|
@@ -2572,19 +2613,20 @@ window.__ModuleLoader__.load({
|
|
|
2572
2613
|
children: t("row.tokenExpiry", { expiresAt: formatDateTime(status.tokenExpiresAtMs) })
|
|
2573
2614
|
}) : null]
|
|
2574
2615
|
})
|
|
2575
|
-
}) :
|
|
2576
|
-
|
|
2616
|
+
}) : null,
|
|
2617
|
+
status.status !== "error" && status.accounts.length > 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
2618
|
+
className: `dsm-trae-account-table${isCnPool ? " dsm-trae-account-table-checkin" : ""}`,
|
|
2577
2619
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
2578
2620
|
className: "dsm-trae-account-row dsm-trae-account-row-head",
|
|
2579
2621
|
role: "row",
|
|
2580
2622
|
children: [
|
|
2581
2623
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("row.accountColumnAccount") }),
|
|
2582
2624
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("row.accountColumnValue") }),
|
|
2583
|
-
|
|
2625
|
+
isCnPool ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("row.accountColumnCheckin") }) : null,
|
|
2584
2626
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {})
|
|
2585
2627
|
]
|
|
2586
2628
|
}), status.accounts.map((account) => {
|
|
2587
|
-
const current = status.status === "signed-in"
|
|
2629
|
+
const current = status.status === "signed-in" ? account.id === status.accountId : account.selected === true;
|
|
2588
2630
|
const state = accountStatusByRegion[activeRegion][account.id];
|
|
2589
2631
|
const error = claimErrorByRegion[activeRegion][account.id];
|
|
2590
2632
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
@@ -2636,7 +2678,7 @@ window.__ModuleLoader__.load({
|
|
|
2636
2678
|
className: "dsm-trae-account-worth",
|
|
2637
2679
|
children: rowValue(state)
|
|
2638
2680
|
}),
|
|
2639
|
-
|
|
2681
|
+
isCnPool ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
2640
2682
|
className: "dsm-trae-account-checkin-cell",
|
|
2641
2683
|
children: checkinControl(account, state)
|
|
2642
2684
|
}) : null,
|
|
@@ -2655,7 +2697,12 @@ window.__ModuleLoader__.load({
|
|
|
2655
2697
|
]
|
|
2656
2698
|
}, account.id);
|
|
2657
2699
|
})]
|
|
2658
|
-
}),
|
|
2700
|
+
}) : null,
|
|
2701
|
+
status.status === "signed-in" && status.creditsUnavailable === "enterprise" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
2702
|
+
className: "dsm-trae-credits-unavailable",
|
|
2703
|
+
role: "note",
|
|
2704
|
+
children: t("row.enterpriseCreditsNotice")
|
|
2705
|
+
}) : null,
|
|
2659
2706
|
status.status === "signed-in" && status.alternatives !== void 0 && status.alternatives.length > 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
2660
2707
|
className: "dsm-trae-usage-alternative",
|
|
2661
2708
|
role: "status",
|
|
@@ -2709,7 +2756,7 @@ window.__ModuleLoader__.load({
|
|
|
2709
2756
|
}),
|
|
2710
2757
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(AccountTransfer, {
|
|
2711
2758
|
t,
|
|
2712
|
-
region: activeRegion,
|
|
2759
|
+
region: activeRegion === "ai" ? "ai" : "cn",
|
|
2713
2760
|
accounts: status.status === "signed-in" ? status.accounts.map((account) => ({
|
|
2714
2761
|
id: account.id,
|
|
2715
2762
|
accountName: account.accountName
|
|
@@ -2820,7 +2867,7 @@ window.__ModuleLoader__.load({
|
|
|
2820
2867
|
className: "dsm-trae-model-name",
|
|
2821
2868
|
children: [
|
|
2822
2869
|
model.name,
|
|
2823
|
-
model.creditMultiplier === void 0 ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
2870
|
+
activeRegion === "enterprise" || model.creditMultiplier === void 0 ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
2824
2871
|
className: "dsm-trae-model-name-rate",
|
|
2825
2872
|
children: ["· x", model.creditMultiplier.toFixed(2)]
|
|
2826
2873
|
}),
|
|
@@ -3648,8 +3695,10 @@ window.__ModuleLoader__.load({
|
|
|
3648
3695
|
"row.expand": "Expand",
|
|
3649
3696
|
"row.collapse": "Collapse",
|
|
3650
3697
|
"row.tabCn": "Domestic",
|
|
3698
|
+
"row.tabEnterprise": "Enterprise",
|
|
3651
3699
|
"row.tabAi": "Global",
|
|
3652
|
-
"row.tabHint": "
|
|
3700
|
+
"row.tabHint": "Three independent providers, each with its own account, usage, and models. All are live at once and never affect each other.",
|
|
3701
|
+
"row.tabEnterpriseHint": "Enterprise bills the tenant pool of the same Trae CN account instead of the personal one. It never falls back: a refusal is reported as an error rather than quietly spending personal credits.",
|
|
3653
3702
|
"row.tabSwitchHint": "Turns this provider off: its models leave the DSH picker. Account and settings are kept.",
|
|
3654
3703
|
"row.tabSwitchAria": "Offer the {region} provider to DSH",
|
|
3655
3704
|
"row.tabOffNotice": "This provider is off: its models are not offered to DSH. Account and settings are kept.",
|
|
@@ -3731,6 +3780,8 @@ window.__ModuleLoader__.load({
|
|
|
3731
3780
|
"row.accountColumnValue": "Balance",
|
|
3732
3781
|
"row.accountColumnCheckin": "Check-in",
|
|
3733
3782
|
"row.accountBalance": "{credits} credits",
|
|
3783
|
+
"row.balanceConsoleOnly": "In the enterprise console",
|
|
3784
|
+
"row.enterpriseCreditsNotice": "Enterprise spend is not reported here. The Trae client cannot read the tenant balance — every enterprise quota endpoint answers 404 — so the only place to see it is the enterprise console (console.enterprise.trae.cn). The personal credit figure is deliberately NOT shown on this tab: it belongs to the consumer pool and would be misread as the tenant balance.",
|
|
3734
3785
|
"row.sourceDsh": "plugin copy",
|
|
3735
3786
|
"row.modelsTitle": "Models",
|
|
3736
3787
|
"row.modelsSummary": "{count} enabled",
|
|
@@ -3816,8 +3867,10 @@ window.__ModuleLoader__.load({
|
|
|
3816
3867
|
"row.expand": "展开",
|
|
3817
3868
|
"row.collapse": "收起",
|
|
3818
3869
|
"row.tabCn": "国内版",
|
|
3870
|
+
"row.tabEnterprise": "企业版",
|
|
3819
3871
|
"row.tabAi": "国际版",
|
|
3820
|
-
"row.tabHint": "
|
|
3872
|
+
"row.tabHint": "国内版、企业版、国际版是三个独立供应商,各有账号、用量与模型;三者同时生效,互不影响。",
|
|
3873
|
+
"row.tabEnterpriseHint": "企业版用同一个 Trae CN 账号走企业租户池计费,而不是个人积分池。它不会回落:被拒时如实报错,绝不悄悄花掉个人额度。",
|
|
3821
3874
|
"row.tabSwitchHint": "关闭该供应商:其模型不再提供给 DSH;账号与设置保留,可随时恢复。",
|
|
3822
3875
|
"row.tabSwitchAria": "是否向 DSH 提供{region}供应商",
|
|
3823
3876
|
"row.tabOffNotice": "该供应商已关闭,模型不会提供给 DSH。账号与设置均已保留。",
|
|
@@ -3899,6 +3952,8 @@ window.__ModuleLoader__.load({
|
|
|
3899
3952
|
"row.accountColumnValue": "额度",
|
|
3900
3953
|
"row.accountColumnCheckin": "签到",
|
|
3901
3954
|
"row.accountBalance": "积分 {credits}",
|
|
3955
|
+
"row.balanceConsoleOnly": "见企业版控制台",
|
|
3956
|
+
"row.enterpriseCreditsNotice": "企业版额度不在这里显示。Trae 客户端读不到企业租户的余额(所有企业额度接口都返回 404),只能到企业版控制台(console.enterprise.trae.cn)查看。这里也刻意不显示个人积分:那是消费池的数字,放在企业版标签下会被误认为企业额度。",
|
|
3902
3957
|
"row.sourceDsh": "插件副本",
|
|
3903
3958
|
"row.modelsTitle": "模型",
|
|
3904
3959
|
"row.modelsSummary": "已启用 {count} 个",
|