@eddyskywalker/dsh-chatgpt-subscription 1.4.0 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/client.js +66 -27
- package/lib/client.js.map +1 -1
- package/lib/codemode.js +70 -6
- package/lib/index.js +1983 -1351
- package/lib/{tool-result-pruner-CuKHwU2R.js → tool-result-pruner-Duw9-Gwo.js} +381 -127
- package/lib/tool-result-pruner.js +1 -1
- package/lib/types/client/locales-ru/grok.d.ts.map +1 -1
- package/lib/types/client/locales-ru/qoder.d.ts.map +1 -1
- package/lib/types/client/providers/grok/locales.d.ts +3 -1
- package/lib/types/client/providers/grok/locales.d.ts.map +1 -1
- package/lib/types/client/providers/qoder/QoderCheckin.d.ts.map +1 -1
- package/lib/types/client/providers/qoder/api.d.ts.map +1 -1
- package/lib/types/client/providers/qoder/locales.d.ts +5 -1
- package/lib/types/client/providers/qoder/locales.d.ts.map +1 -1
- package/lib/types/compat.d.ts +1 -1
- package/lib/types/host/common/model-facts-data.d.ts +4 -0
- package/lib/types/host/common/model-facts-data.d.ts.map +1 -0
- package/lib/types/host/common/model-facts.d.ts +41 -0
- package/lib/types/host/common/model-facts.d.ts.map +1 -0
- package/lib/types/host/common/prompt-cache-policy.d.ts.map +1 -1
- package/lib/types/host/common/reasoning-seed-replay.d.ts +4 -4
- package/lib/types/host/common/reasoning-seed-replay.d.ts.map +1 -1
- package/lib/types/host/common/stream-timing.d.ts +25 -0
- package/lib/types/host/common/stream-timing.d.ts.map +1 -0
- package/lib/types/host/providers/glm-coding-plan/model-catalog.d.ts +9 -11
- package/lib/types/host/providers/glm-coding-plan/model-catalog.d.ts.map +1 -1
- package/lib/types/host/providers/grok/model-catalog.d.ts +5 -1
- package/lib/types/host/providers/grok/model-catalog.d.ts.map +1 -1
- package/lib/types/host/providers/minimax-code/mapper.d.ts.map +1 -1
- package/lib/types/host/providers/minimax-code/model-catalog.d.ts +17 -11
- package/lib/types/host/providers/minimax-code/model-catalog.d.ts.map +1 -1
- package/lib/types/host/providers/opendesign/mapper.d.ts +2 -2
- package/lib/types/host/providers/opendesign/mapper.d.ts.map +1 -1
- package/lib/types/host/providers/opendesign/types.d.ts.map +1 -1
- package/lib/types/host/providers/qianwen-token-plan/adapter.d.ts +3 -0
- package/lib/types/host/providers/qianwen-token-plan/adapter.d.ts.map +1 -1
- package/lib/types/host/providers/qoder/adapter.d.ts +3 -0
- package/lib/types/host/providers/qoder/adapter.d.ts.map +1 -1
- package/lib/types/host/providers/qoder/checkin.d.ts +22 -4
- package/lib/types/host/providers/qoder/checkin.d.ts.map +1 -1
- package/lib/types/host/providers/qoder/mapper.d.ts +12 -36
- package/lib/types/host/providers/qoder/mapper.d.ts.map +1 -1
- package/lib/types/host/providers/qoder/model-catalog.d.ts.map +1 -1
- package/lib/types/host/providers/qoder/queue-lifecycle.d.ts +61 -0
- package/lib/types/host/providers/qoder/queue-lifecycle.d.ts.map +1 -0
- package/lib/types/host/providers/qoder/routes.d.ts +2 -0
- package/lib/types/host/providers/qoder/routes.d.ts.map +1 -1
- package/lib/types/host/providers/qoder/token-store.d.ts.map +1 -1
- package/lib/types/host/providers/step-code/model-catalog.d.ts.map +1 -1
- package/lib/types/host/providers/tencent-tokenhub/model-catalog.d.ts.map +1 -1
- package/lib/types/host/providers/workbuddy/model-catalog.d.ts.map +1 -1
- package/lib/types/host/runtime/codemode/transport.d.ts +4 -3
- package/lib/types/host/runtime/codemode/transport.d.ts.map +1 -1
- package/lib/types/host/runtime/deepseek-v41-flash/discipline.d.ts.map +1 -1
- package/lib/types/host/runtime/deepseek-v41-flash/index.d.ts +2 -2
- package/lib/types/host/runtime/deepseek-v41-flash/index.d.ts.map +1 -1
- package/lib/types/host/runtime/deepseek-v41-flash/match.d.ts.map +1 -1
- package/lib/types/host/runtime/deepseek-v41-flash/state-anchor.d.ts +4 -0
- package/lib/types/host/runtime/deepseek-v41-flash/state-anchor.d.ts.map +1 -1
- package/lib/types/host/runtime/open-models/identity.d.ts +6 -0
- package/lib/types/host/runtime/open-models/identity.d.ts.map +1 -0
- package/lib/types/host/runtime/open-models/index.d.ts +4 -5
- package/lib/types/host/runtime/open-models/index.d.ts.map +1 -1
- package/lib/types/host/runtime/open-models/profiles.d.ts +10 -22
- package/lib/types/host/runtime/open-models/profiles.d.ts.map +1 -1
- package/lib/types/host/runtime/open-models/state-anchor.d.ts.map +1 -1
- package/lib/types/index.d.ts.map +1 -1
- package/lib/types/shared/grok-contracts.d.ts +1 -1
- package/lib/types/shared/grok-contracts.d.ts.map +1 -1
- package/lib/types/shared/qoder-contracts.d.ts +8 -0
- package/lib/types/shared/qoder-contracts.d.ts.map +1 -1
- package/package.json +1 -1
package/lib/client.js
CHANGED
|
@@ -20489,6 +20489,8 @@ window.__ModuleLoader__.load({
|
|
|
20489
20489
|
claimSucceeded: "已提交领取",
|
|
20490
20490
|
checkinFailed: "签到请求失败,请稍后再试",
|
|
20491
20491
|
campaignClaimed: "已领取",
|
|
20492
|
+
campaignNotClaimable: "现在不能领取",
|
|
20493
|
+
campaignReward: "{count} Credits",
|
|
20492
20494
|
quotaBucketAddOn: "加购 Credits",
|
|
20493
20495
|
quotaBucketOrg: "组织资源包",
|
|
20494
20496
|
quotaRemaining: "剩余",
|
|
@@ -20626,6 +20628,8 @@ window.__ModuleLoader__.load({
|
|
|
20626
20628
|
claimSucceeded: "Claim submitted",
|
|
20627
20629
|
checkinFailed: "Check-in request failed, try again later",
|
|
20628
20630
|
campaignClaimed: "Claimed",
|
|
20631
|
+
campaignNotClaimable: "Not claimable right now",
|
|
20632
|
+
campaignReward: "{count} Credits",
|
|
20629
20633
|
quotaBucketAddOn: "Add-on Credits",
|
|
20630
20634
|
quotaBucketOrg: "Org package",
|
|
20631
20635
|
quotaRemaining: "remaining",
|
|
@@ -20709,6 +20713,8 @@ window.__ModuleLoader__.load({
|
|
|
20709
20713
|
* POST /connection/test → QoderConnectionDto(**裸 DTO,不走信封**)
|
|
20710
20714
|
* POST /quota { } → QoderStatusDto(强制刷新额度)
|
|
20711
20715
|
* POST /catalog/refresh { } → QoderStatusDto
|
|
20716
|
+
* GET /checkin → QoderCheckinListDto(默认关闭;关闭时一个上游请求都不发)
|
|
20717
|
+
* POST /checkin { campaignId } → { campaignId, grantId?, rewardCredits? }
|
|
20712
20718
|
*
|
|
20713
20719
|
* 除 /adopt 与 /connection/test 外全部走共享的 { ok, value } 信封,
|
|
20714
20720
|
* 因此答案都是裸 DTO——createLineApi 已经把信封拆掉了。
|
|
@@ -21286,9 +21292,17 @@ window.__ModuleLoader__.load({
|
|
|
21286
21292
|
try {
|
|
21287
21293
|
const list = (await get$11("/checkin")).campaigns ?? [];
|
|
21288
21294
|
setCampaigns(list);
|
|
21289
|
-
setResult(list.length === 0 ?
|
|
21290
|
-
|
|
21291
|
-
|
|
21295
|
+
setResult(list.length === 0 ? {
|
|
21296
|
+
text: t.campaignsEmpty,
|
|
21297
|
+
detail: null
|
|
21298
|
+
} : null);
|
|
21299
|
+
return true;
|
|
21300
|
+
} catch (cause) {
|
|
21301
|
+
setResult({
|
|
21302
|
+
text: t.checkinFailed,
|
|
21303
|
+
detail: messageOf$11(cause)
|
|
21304
|
+
});
|
|
21305
|
+
return false;
|
|
21292
21306
|
} finally {
|
|
21293
21307
|
setBusy(false);
|
|
21294
21308
|
}
|
|
@@ -21306,10 +21320,15 @@ window.__ModuleLoader__.load({
|
|
|
21306
21320
|
setResult(null);
|
|
21307
21321
|
try {
|
|
21308
21322
|
await post$11("/checkin", { campaignId });
|
|
21309
|
-
setResult(
|
|
21310
|
-
|
|
21311
|
-
|
|
21312
|
-
|
|
21323
|
+
if (await load()) setResult({
|
|
21324
|
+
text: t.claimSucceeded,
|
|
21325
|
+
detail: null
|
|
21326
|
+
});
|
|
21327
|
+
} catch (cause) {
|
|
21328
|
+
setResult({
|
|
21329
|
+
text: t.checkinFailed,
|
|
21330
|
+
detail: messageOf$11(cause)
|
|
21331
|
+
});
|
|
21313
21332
|
} finally {
|
|
21314
21333
|
setBusy(false);
|
|
21315
21334
|
}
|
|
@@ -21343,24 +21362,37 @@ window.__ModuleLoader__.load({
|
|
|
21343
21362
|
className: "dshqo-checkin-list",
|
|
21344
21363
|
children: [campaigns.map((campaign) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
21345
21364
|
className: "dsha-row",
|
|
21346
|
-
children: [
|
|
21347
|
-
|
|
21348
|
-
|
|
21349
|
-
|
|
21350
|
-
|
|
21351
|
-
|
|
21352
|
-
|
|
21353
|
-
|
|
21354
|
-
|
|
21355
|
-
|
|
21356
|
-
|
|
21357
|
-
|
|
21358
|
-
|
|
21359
|
-
|
|
21360
|
-
|
|
21365
|
+
children: [
|
|
21366
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
21367
|
+
className: "dsha-value",
|
|
21368
|
+
children: campaign.title
|
|
21369
|
+
}),
|
|
21370
|
+
campaign.rewardCredits !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
21371
|
+
className: "dsha-muted",
|
|
21372
|
+
children: t.campaignReward.replace("{count}", String(campaign.rewardCredits))
|
|
21373
|
+
}),
|
|
21374
|
+
campaign.claimed ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
21375
|
+
className: "dsha-muted",
|
|
21376
|
+
children: t.campaignClaimed
|
|
21377
|
+
}) : campaign.claimable === false ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
21378
|
+
className: "dsha-muted",
|
|
21379
|
+
children: t.campaignNotClaimable
|
|
21380
|
+
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
21381
|
+
className: "dsha-btn",
|
|
21382
|
+
disabled: busy,
|
|
21383
|
+
onClick: () => {
|
|
21384
|
+
claim(campaign.id);
|
|
21385
|
+
},
|
|
21386
|
+
children: busy ? t.claiming : t.claim
|
|
21387
|
+
})
|
|
21388
|
+
]
|
|
21389
|
+
}, campaign.id)), result !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
21361
21390
|
className: "dsha-muted",
|
|
21362
|
-
children: result
|
|
21363
|
-
})
|
|
21391
|
+
children: result.text
|
|
21392
|
+
}), result.detail !== null && result.detail !== "" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
21393
|
+
className: "dsha-muted",
|
|
21394
|
+
children: result.detail
|
|
21395
|
+
})] })]
|
|
21364
21396
|
})
|
|
21365
21397
|
]
|
|
21366
21398
|
});
|
|
@@ -33761,10 +33793,11 @@ window.__ModuleLoader__.load({
|
|
|
33761
33793
|
const GROK_REASONING_EFFORTS = [
|
|
33762
33794
|
"low",
|
|
33763
33795
|
"medium",
|
|
33764
|
-
"high"
|
|
33796
|
+
"high",
|
|
33797
|
+
"xhigh"
|
|
33765
33798
|
];
|
|
33766
33799
|
function isGrokReasoningEffort(value) {
|
|
33767
|
-
return value === "low" || value === "medium" || value === "high";
|
|
33800
|
+
return value === "low" || value === "medium" || value === "high" || value === "xhigh";
|
|
33768
33801
|
}
|
|
33769
33802
|
//#endregion
|
|
33770
33803
|
//#region src/client/providers/grok/locales.ts
|
|
@@ -33827,6 +33860,7 @@ window.__ModuleLoader__.load({
|
|
|
33827
33860
|
effortLow: "低",
|
|
33828
33861
|
effortMedium: "中",
|
|
33829
33862
|
effortHigh: "高",
|
|
33863
|
+
effortXhigh: "极高",
|
|
33830
33864
|
contextSection: "上下文窗口",
|
|
33831
33865
|
contextHint: "各模型的上下文窗口可按需覆盖;留空表示使用目录默认值。",
|
|
33832
33866
|
contextEmpty: "先勾选模型,再调整上下文窗口。",
|
|
@@ -33924,6 +33958,7 @@ window.__ModuleLoader__.load({
|
|
|
33924
33958
|
effortLow: "Low",
|
|
33925
33959
|
effortMedium: "Medium",
|
|
33926
33960
|
effortHigh: "High",
|
|
33961
|
+
effortXhigh: "Extra high",
|
|
33927
33962
|
contextSection: "Context window",
|
|
33928
33963
|
contextHint: "Each model's context window can be overridden; empty keeps the catalog default.",
|
|
33929
33964
|
contextEmpty: "Check a model first, then adjust its context window.",
|
|
@@ -34299,7 +34334,8 @@ window.__ModuleLoader__.load({
|
|
|
34299
34334
|
const EFFORT_KEYS = {
|
|
34300
34335
|
low: "effortLow",
|
|
34301
34336
|
medium: "effortMedium",
|
|
34302
|
-
high: "effortHigh"
|
|
34337
|
+
high: "effortHigh",
|
|
34338
|
+
xhigh: "effortXhigh"
|
|
34303
34339
|
};
|
|
34304
34340
|
function more(title, lines) {
|
|
34305
34341
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("details", {
|
|
@@ -38705,8 +38741,10 @@ window.__ModuleLoader__.load({
|
|
|
38705
38741
|
claim: "Получить",
|
|
38706
38742
|
claiming: "Получение…",
|
|
38707
38743
|
claimSucceeded: "Запрос отправлен",
|
|
38744
|
+
campaignReward: "{count} Credits",
|
|
38708
38745
|
checkinFailed: "Не удалось выполнить запрос, повторите позже",
|
|
38709
38746
|
campaignClaimed: "Получено",
|
|
38747
|
+
campaignNotClaimable: "Сейчас получить нельзя",
|
|
38710
38748
|
quotaBucketAddOn: "Докупленные Credits",
|
|
38711
38749
|
quotaBucketOrg: "Пакет организации",
|
|
38712
38750
|
quotaRemaining: "остаток",
|
|
@@ -40036,6 +40074,7 @@ window.__ModuleLoader__.load({
|
|
|
40036
40074
|
effortLow: "Низкий",
|
|
40037
40075
|
effortMedium: "Средний",
|
|
40038
40076
|
effortHigh: "Высокий",
|
|
40077
|
+
effortXhigh: "Очень высокий",
|
|
40039
40078
|
contextSection: "Контекстное окно",
|
|
40040
40079
|
contextHint: "Окно каждой модели можно переопределить; пустое поле использует значение каталога.",
|
|
40041
40080
|
contextEmpty: "Сначала отметьте модель, затем настройте контекст.",
|