@eddyskywalker/dsh-chatgpt-subscription 0.95.3 → 0.96.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 -26
- package/lib/client.js.map +1 -1
- package/lib/index.js +335 -59
- package/lib/types/client/locales-ru/command-code.d.ts.map +1 -1
- package/lib/types/client/providers/command-code/CommandCodeSection.d.ts.map +1 -1
- package/lib/types/client/providers/command-code/locales.d.ts +11 -2
- package/lib/types/client/providers/command-code/locales.d.ts.map +1 -1
- package/lib/types/compat.d.ts +1 -1
- package/lib/types/host/common/reasoning-seed-replay.d.ts +25 -0
- package/lib/types/host/common/reasoning-seed-replay.d.ts.map +1 -0
- package/lib/types/host/providers/command-code/adapter.d.ts +6 -3
- package/lib/types/host/providers/command-code/adapter.d.ts.map +1 -1
- package/lib/types/host/providers/command-code/mapper.d.ts.map +1 -1
- package/lib/types/host/providers/command-code/routes.d.ts.map +1 -1
- package/lib/types/host/providers/command-code/token-store.d.ts +4 -0
- package/lib/types/host/providers/command-code/token-store.d.ts.map +1 -1
- package/lib/types/host/providers/opencode-go/mapper.d.ts.map +1 -1
- package/lib/types/host/providers/opencode-zen/mapper.d.ts.map +1 -1
- package/lib/types/host/providers/relayone/mapper-openai.d.ts.map +1 -1
- package/lib/types/host/runtime/deepseek-v41-flash/reasoning-seed.d.ts +113 -0
- package/lib/types/host/runtime/deepseek-v41-flash/reasoning-seed.d.ts.map +1 -0
- package/lib/types/index.d.ts +7 -0
- package/lib/types/index.d.ts.map +1 -1
- package/lib/types/shared/command-code-contracts.d.ts +2 -0
- package/lib/types/shared/command-code-contracts.d.ts.map +1 -1
- package/package.json +1 -1
package/lib/client.js
CHANGED
|
@@ -4902,6 +4902,9 @@ window.__ModuleLoader__.load({
|
|
|
4902
4902
|
defaultReasoningEffort: "默认思考深度",
|
|
4903
4903
|
defaultReasoningEffortHint: "控制支持推理的模型在未单独指定时的思考强度。Anthropic 模型会映射为 thinking 预算。",
|
|
4904
4904
|
defaultEffortAuto: "使用 Provider 默认值",
|
|
4905
|
+
zdrToggle: "零数据保留(ZDR)",
|
|
4906
|
+
zdrToggleHint: "只把请求交给不保留数据的上游。某个模型没有这样的上游时会直接报错,不会改用普通通道。",
|
|
4907
|
+
zdrLocked: "已由环境变量或启动配置固定,这里无法更改。",
|
|
4905
4908
|
contextWindowSection: "模型上下文窗口",
|
|
4906
4909
|
contextWindowHint: "默认取 Command Code 模型目录的 context length;可覆盖为自定义容量,该值用于 DSH 的压缩与溢出判断,可输入 1M、512K、200K 等容量。",
|
|
4907
4910
|
contextWindowReset: "恢复默认",
|
|
@@ -4976,6 +4979,9 @@ window.__ModuleLoader__.load({
|
|
|
4976
4979
|
defaultReasoningEffort: "Default reasoning effort",
|
|
4977
4980
|
defaultReasoningEffortHint: "Reasoning effort for models that support it when the conversation does not specify one. Anthropic models map it to a thinking budget.",
|
|
4978
4981
|
defaultEffortAuto: "Use provider default",
|
|
4982
|
+
zdrToggle: "Zero Data Retention (ZDR)",
|
|
4983
|
+
zdrToggleHint: "Send requests only to upstreams that keep no data. A model without such an upstream fails instead of falling back to a regular route.",
|
|
4984
|
+
zdrLocked: "Fixed by an environment variable or host configuration; it cannot be changed here.",
|
|
4979
4985
|
contextWindowSection: "Model context window",
|
|
4980
4986
|
contextWindowHint: "Defaults to the context length in the Command Code catalog; override it with the capacity DSH should use for compaction and overflow decisions (e.g., 1M, 512K, 200K).",
|
|
4981
4987
|
contextWindowReset: "Restore default",
|
|
@@ -5279,6 +5285,18 @@ window.__ModuleLoader__.load({
|
|
|
5279
5285
|
setError(err instanceof Error ? err.message : String(err));
|
|
5280
5286
|
}
|
|
5281
5287
|
};
|
|
5288
|
+
const handleUpdateZdr = async (zeroDataRetention) => {
|
|
5289
|
+
try {
|
|
5290
|
+
const updated = await api$29.request("/settings", {
|
|
5291
|
+
method: "POST",
|
|
5292
|
+
body: JSON.stringify({ zeroDataRetention })
|
|
5293
|
+
});
|
|
5294
|
+
setStatus(updated);
|
|
5295
|
+
notifyChange();
|
|
5296
|
+
} catch (err) {
|
|
5297
|
+
setError(err instanceof Error ? err.message : String(err));
|
|
5298
|
+
}
|
|
5299
|
+
};
|
|
5282
5300
|
const handleSaveContextWindow = async (modelId) => {
|
|
5283
5301
|
const raw = contextDrafts[modelId] || "";
|
|
5284
5302
|
const parsed = parsePositiveCapacity$1(raw);
|
|
@@ -5491,32 +5509,51 @@ window.__ModuleLoader__.load({
|
|
|
5491
5509
|
}),
|
|
5492
5510
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", {
|
|
5493
5511
|
className: "dsha-group",
|
|
5494
|
-
children: [
|
|
5495
|
-
|
|
5496
|
-
|
|
5497
|
-
|
|
5498
|
-
|
|
5499
|
-
|
|
5500
|
-
className: "dsha-
|
|
5501
|
-
children: t.
|
|
5502
|
-
|
|
5503
|
-
|
|
5504
|
-
"
|
|
5505
|
-
|
|
5506
|
-
|
|
5507
|
-
|
|
5508
|
-
|
|
5509
|
-
|
|
5510
|
-
|
|
5511
|
-
|
|
5512
|
-
|
|
5513
|
-
children:
|
|
5514
|
-
|
|
5515
|
-
|
|
5516
|
-
|
|
5517
|
-
|
|
5518
|
-
|
|
5519
|
-
|
|
5512
|
+
children: [
|
|
5513
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
5514
|
+
className: "dsha-grouphead",
|
|
5515
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("h3", { children: t.enhanced })
|
|
5516
|
+
}),
|
|
5517
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
5518
|
+
className: "dsha-pref-row",
|
|
5519
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: t.defaultReasoningEffort }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
5520
|
+
className: "dsha-muted",
|
|
5521
|
+
children: t.defaultReasoningEffortHint
|
|
5522
|
+
})] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("select", {
|
|
5523
|
+
className: "dsha-select",
|
|
5524
|
+
"aria-label": t.defaultReasoningEffort,
|
|
5525
|
+
value: status?.defaultReasoningEffort ?? "",
|
|
5526
|
+
disabled: busy !== null,
|
|
5527
|
+
onChange: (event) => {
|
|
5528
|
+
const value = event.currentTarget.value;
|
|
5529
|
+
handleUpdateEffort(value === "" ? null : value);
|
|
5530
|
+
},
|
|
5531
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
|
|
5532
|
+
value: "",
|
|
5533
|
+
children: t.defaultEffortAuto
|
|
5534
|
+
}), COMMAND_CODE_REASONING_EFFORTS.map((effort) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
|
|
5535
|
+
value: effort,
|
|
5536
|
+
children: EFFORT_LABELS$3[effort]
|
|
5537
|
+
}, effort))]
|
|
5538
|
+
})]
|
|
5539
|
+
}),
|
|
5540
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
5541
|
+
className: "dsha-pref-row",
|
|
5542
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: t.zdrToggle }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
5543
|
+
className: "dsha-muted",
|
|
5544
|
+
children: status?.zeroDataRetentionLocked === true ? t.zdrLocked : t.zdrToggleHint
|
|
5545
|
+
})] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
5546
|
+
type: "checkbox",
|
|
5547
|
+
"aria-label": t.zdrToggle,
|
|
5548
|
+
"data-testid": "command-code-zdr-toggle",
|
|
5549
|
+
checked: status?.zeroDataRetention === true,
|
|
5550
|
+
disabled: busy !== null || status === null || status.zeroDataRetentionLocked === true,
|
|
5551
|
+
onChange: (event) => {
|
|
5552
|
+
handleUpdateZdr(event.currentTarget.checked);
|
|
5553
|
+
}
|
|
5554
|
+
})]
|
|
5555
|
+
})
|
|
5556
|
+
]
|
|
5520
5557
|
}),
|
|
5521
5558
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", {
|
|
5522
5559
|
className: "dsha-group",
|
|
@@ -34368,6 +34405,9 @@ window.__ModuleLoader__.load({
|
|
|
34368
34405
|
defaultReasoningEffort: "Уровень рассуждений по умолчанию",
|
|
34369
34406
|
defaultReasoningEffortHint: "Уровень рассуждений для моделей, которые его поддерживают, когда диалог не задаёт его явно. У моделей Anthropic он превращается в бюджет размышлений.",
|
|
34370
34407
|
defaultEffortAuto: "По умолчанию у провайдера",
|
|
34408
|
+
zdrToggle: "Нулевое хранение данных (ZDR)",
|
|
34409
|
+
zdrToggleHint: "Отправлять запросы только поставщикам, которые не хранят данные. Если у модели такого поставщика нет, запрос завершится ошибкой без перехода на обычный маршрут.",
|
|
34410
|
+
zdrLocked: "Задано переменной окружения или конфигурацией хоста; здесь изменить нельзя.",
|
|
34371
34411
|
contextWindowSection: "Контекстное окно модели",
|
|
34372
34412
|
contextWindowHint: "По умолчанию берётся context length из каталога Command Code; можно задать свою ёмкость, которую DSH будет использовать при сжатии и определении переполнения (например, 1M, 512K, 200K).",
|
|
34373
34413
|
contextWindowReset: "Вернуть значение по умолчанию",
|