@eddyskywalker/dsh-chatgpt-subscription 0.11.7 → 0.12.2
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 +619 -776
- package/README.md +34 -2
- package/lib/client.js +141 -5
- package/lib/client.js.map +1 -1
- package/lib/index.js +2879 -1541
- package/lib/types/client/CodexSubscriptionSection.d.ts +18 -0
- package/lib/types/client/CodexSubscriptionSection.d.ts.map +1 -1
- package/lib/types/client/kimi-code/KimiCodeSection.d.ts.map +1 -1
- package/lib/types/client/kimi-code/KimiModelCapabilities.d.ts.map +1 -1
- package/lib/types/client/kimi-code/locales.d.ts +11 -2
- package/lib/types/client/kimi-code/locales.d.ts.map +1 -1
- package/lib/types/client/kimi-code/styles.d.ts.map +1 -1
- package/lib/types/client/locales.d.ts +45 -5
- package/lib/types/client/locales.d.ts.map +1 -1
- package/lib/types/host/antigravity/mapper.d.ts +3 -2
- package/lib/types/host/antigravity/mapper.d.ts.map +1 -1
- package/lib/types/host/antigravity/tool-schema.d.ts +13 -1
- package/lib/types/host/antigravity/tool-schema.d.ts.map +1 -1
- package/lib/types/host/claude/mapper.d.ts +57 -3
- package/lib/types/host/claude/mapper.d.ts.map +1 -1
- package/lib/types/host/codex-fetch.d.ts.map +1 -1
- package/lib/types/host/common/idle-watchdog.d.ts +10 -0
- package/lib/types/host/common/idle-watchdog.d.ts.map +1 -1
- package/lib/types/host/common/prompt-estimate.d.ts +22 -0
- package/lib/types/host/common/prompt-estimate.d.ts.map +1 -0
- package/lib/types/host/common/request-images.d.ts +130 -0
- package/lib/types/host/common/request-images.d.ts.map +1 -0
- package/lib/types/host/common/tool-schema.d.ts +27 -0
- package/lib/types/host/common/tool-schema.d.ts.map +1 -0
- package/lib/types/host/common/video-request.d.ts +81 -0
- package/lib/types/host/common/video-request.d.ts.map +1 -0
- package/lib/types/host/common/video.d.ts +90 -0
- package/lib/types/host/common/video.d.ts.map +1 -0
- package/lib/types/host/fetch-address-policy.d.ts +2 -1
- package/lib/types/host/fetch-address-policy.d.ts.map +1 -1
- package/lib/types/host/fetch-configuration.d.ts +6 -0
- package/lib/types/host/fetch-configuration.d.ts.map +1 -0
- package/lib/types/host/kimi-code/adapter.d.ts.map +1 -1
- package/lib/types/host/kimi-code/cache-hint.d.ts +76 -0
- package/lib/types/host/kimi-code/cache-hint.d.ts.map +1 -0
- package/lib/types/host/kimi-code/client.d.ts +36 -1
- package/lib/types/host/kimi-code/client.d.ts.map +1 -1
- package/lib/types/host/kimi-code/mapper.d.ts +118 -145
- package/lib/types/host/kimi-code/mapper.d.ts.map +1 -1
- package/lib/types/host/kimi-code/modalities.d.ts +9 -80
- package/lib/types/host/kimi-code/modalities.d.ts.map +1 -1
- package/lib/types/host/kimi-code/routes.d.ts +8 -0
- package/lib/types/host/kimi-code/routes.d.ts.map +1 -1
- package/lib/types/host/kimi-code/token-store.d.ts +30 -1
- package/lib/types/host/kimi-code/token-store.d.ts.map +1 -1
- package/lib/types/host/kimi-code/video-store.d.ts.map +1 -1
- package/lib/types/host/minimax-code/adapter.d.ts +8 -1
- package/lib/types/host/minimax-code/adapter.d.ts.map +1 -1
- package/lib/types/host/minimax-code/files-api.d.ts +117 -0
- package/lib/types/host/minimax-code/files-api.d.ts.map +1 -0
- package/lib/types/host/minimax-code/mapper.d.ts +50 -25
- package/lib/types/host/minimax-code/mapper.d.ts.map +1 -1
- package/lib/types/host/minimax-code/modalities.d.ts +20 -0
- package/lib/types/host/minimax-code/modalities.d.ts.map +1 -0
- package/lib/types/host/minimax-code/model-catalog.d.ts +27 -11
- package/lib/types/host/minimax-code/model-catalog.d.ts.map +1 -1
- package/lib/types/host/minimax-code/types.d.ts +10 -0
- package/lib/types/host/minimax-code/types.d.ts.map +1 -1
- package/lib/types/host/routes.d.ts +2 -2
- package/lib/types/host/routes.d.ts.map +1 -1
- package/lib/types/host/search-provider-switcher.d.ts +2 -0
- package/lib/types/host/search-provider-switcher.d.ts.map +1 -1
- package/lib/types/index.d.ts +8 -1
- package/lib/types/index.d.ts.map +1 -1
- package/lib/types/shared/contracts.d.ts +11 -0
- package/lib/types/shared/contracts.d.ts.map +1 -1
- package/lib/types/shared/kimi-code-contracts.d.ts +65 -0
- package/lib/types/shared/kimi-code-contracts.d.ts.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -375,9 +375,41 @@ DSH 模型选择器应显示 **“Codex(ChatGPT 订阅)”**。GPT-6 系列
|
|
|
375
375
|
|
|
376
376
|
额度卡片展示:**套餐名**(由订阅返回的机器 id 查表得出,表在 `src/host/command-code/plans.ts`,按最长前缀匹配)、**订阅状态与续费日期**、**滚动窗口用量**(`windowLimits` 的 `fiveHour` / `weekly`,按官方 CLI 同款标签 `5-hour` / `Weekly` 显示,并各自带重置倒计时),以及**余额明细**(月度额度 / 已购额度 / 赠送额度,另附合计)。服务只回报数字不回报名称的字段一律补上可读标签——窗口按 key 命名,余额按池命名,实在没有名字的兜底为 `Extra allowance` 并注明来源,不会渲染成 `meter-1` 这类无意义编号。
|
|
377
377
|
|
|
378
|
-
|
|
378
|
+
**搜索来源** 切换 DSH 的**搜索**后端;网页**抓取**来源由下面的**抓取模式**决定。模式为 `auto`(默认)时跟随此处的搜索选择:选择 ChatGPT 来源后,网页也改由本插件在 Host 抓取,并使用上述网络代理设置;模式为 `dsh` 时即使选了 ChatGPT 搜索,抓取也仍由 DSH 原有来源完成。纯 TUN 模式可使用直连,流量由虚拟网卡接管。来源切换即时生效,DSH web 服务重载后会重新注册插件后端,并保留切回 DSH 默认来源所需的配置。设置页在该选择器下方**只读**展示 Host 上报的抓取来源、切换器状态、抓取模式与插件上限;Host 未提供这些字段(较旧的 Host)时整个区块不显示。
|
|
379
379
|
|
|
380
|
-
**网页抓取后端(web_fetch)** DSH 内置抓取 provider 会先解析域名、校验并固定解析结果,而且只在进程环境变量里读到代理时才走代理——系统代理对它不可见。代理工具(Clash/Mihomo 等)常把域名解析成自己的 fake-ip 地址(默认 `198.18.0.0/15`),于是内置 provider 直接以 `WEB_BLOCKED_URL`(resolves to a non-public IP address
|
|
380
|
+
**网页抓取后端(web_fetch)** DSH 内置抓取 provider 会先解析域名、校验并固定解析结果,而且只在进程环境变量里读到代理时才走代理——系统代理对它不可见。代理工具(Clash/Mihomo 等)常把域名解析成自己的 fake-ip 地址(默认 `198.18.0.0/15`),于是内置 provider 直接以 `WEB_BLOCKED_URL`(resolves to a non-public IP address)拒绝,代理根本没被用上。因此在 `auto` 模式下,只要插件配置了可用代理(**网络代理** 选系统代理且检测到,或填写自定义代理),`web_fetch` 就改用本插件的 provider:由代理解析源站,与 DSH 对“走代理的请求”采用的语义一致;未配置代理时仍由 DSH 内置 provider 抓取,保留其解析与固定策略。若在纯 TUN 模式下把代理设为**直连**,内置 provider 会重新接管(`auto` 模式下),此时可改回系统代理让插件接管抓取。代理如果在 DSH 启动之后才可用(代理工具后启动,或首次探测失败),插件会在下一次探测到代理时重新选择抓取后端,不必重启或改设置。
|
|
381
|
+
|
|
382
|
+
#### 抓取模式与上限(插件 Config)
|
|
383
|
+
|
|
384
|
+
抓取**模式**与**上限**属于插件部署配置,不在设置页的偏好里:设置页只读展示当前值,要改写在 profile 的 `cordis.patch.yml` 里,**重载插件或重启 DSH 后生效**。
|
|
385
|
+
|
|
386
|
+
写在**安装时已有的那一条插件行**上(`id: dsh-chatgpt-subscription`,包名 `@eddyskywalker/dsh-chatgpt-subscription`)的 `config` 片段:
|
|
387
|
+
|
|
388
|
+
```yaml
|
|
389
|
+
# $DSH_HOME/profiles/<profile>/cordis.patch.yml
|
|
390
|
+
- id: dsh-chatgpt-subscription
|
|
391
|
+
config:
|
|
392
|
+
fetchProvider: auto # auto | plugin | dsh
|
|
393
|
+
fetchMaxBodyChars: 100000 # 解码后正文保留的字符数
|
|
394
|
+
fetchMaxResponseBytes: 2097152 # 响应体保留的字节数(2 MiB)
|
|
395
|
+
```
|
|
396
|
+
|
|
397
|
+
> patch 按 id 定位条目并**整体替换**它的 `config`,所以在这一行上追加字段时请保留原有的其它字段。
|
|
398
|
+
|
|
399
|
+
| 字段 | 默认 | 含义 |
|
|
400
|
+
|---|---|---|
|
|
401
|
+
| `fetchProvider` | `auto` | `auto` 跟随搜索来源(有可用代理或选了 Codex 搜索时用插件抓取);`plugin` 始终用本插件抓取;`dsh` **强制保留 DSH 原有的抓取来源**,即使有代理或选了 Codex 搜索也不接管 |
|
|
402
|
+
| `fetchMaxBodyChars` | `100000` | 解码后交给工具的正文上限(字符) |
|
|
403
|
+
| `fetchMaxResponseBytes` | `2097152` | 进入解码前的响应体上限(字节) |
|
|
404
|
+
|
|
405
|
+
两者都必须是**正安全整数**,否则该配置不被接受(DSH 不会把非法值当成 0 使用)。
|
|
406
|
+
|
|
407
|
+
必须说清的四条边界:
|
|
408
|
+
|
|
409
|
+
- **`fetchMaxResponseBytes` 是“读进来之后再截断”,不是下载量或内存的硬上限。** 实现仍是 `response.arrayBuffer()` 先把整个响应体读进内存,超出部分才被切掉;调小它省不下下载流量和峰值内存,只能限制进入解码与工具结果的内容量。
|
|
410
|
+
- **工具层另有上限。** 这两个数字只管本插件 provider 交给 `web_fetch` 的内容,DSH 工具结果本身还有自己的裁剪预算,因此**调大它们并不保证取回完整页面**。
|
|
411
|
+
- **两个上限只在实际使用插件抓取时生效**;走 DSH 原有抓取来源(`dsh` 模式,或 `auto` 模式下本次抓取没落到插件)时不适用。设置页会直接写明这一点。
|
|
412
|
+
- **plugin 抓取不做 DNS 固定(pinning)。** 内置 provider 会解析并固定解析结果,而代理的 fake-ip DNS 让这一步无法照搬;本插件沿用既有安全模型——只做 `http/https` 与**目标地址不得落在私网/回环**的校验,域名交给解析它的代理解析,解析失败也放行。抬高上限不改变这条边界。
|
|
381
413
|
|
|
382
414
|
卸载前建议先在设置页点击 **“注销”**,它会删除当前平台的凭据和 Host 内存中的额度缓存。
|
|
383
415
|
|
package/lib/client.js
CHANGED
|
@@ -1345,6 +1345,10 @@ window.__ModuleLoader__.load({
|
|
|
1345
1345
|
})]
|
|
1346
1346
|
})]
|
|
1347
1347
|
}),
|
|
1348
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(FetchProviderStatusCard, {
|
|
1349
|
+
status,
|
|
1350
|
+
t
|
|
1351
|
+
}),
|
|
1348
1352
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
1349
1353
|
className: "dsha-pref-row",
|
|
1350
1354
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: t("outputVerbosity") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
@@ -1624,6 +1628,83 @@ window.__ModuleLoader__.load({
|
|
|
1624
1628
|
})]
|
|
1625
1629
|
});
|
|
1626
1630
|
}
|
|
1631
|
+
const SWITCHER_STATE_LABELS = {
|
|
1632
|
+
idle: "switcherStateIdle",
|
|
1633
|
+
applying: "switcherStateApplying",
|
|
1634
|
+
applied: "switcherStateApplied",
|
|
1635
|
+
missing: "switcherStateMissing",
|
|
1636
|
+
failed: "switcherStateFailed"
|
|
1637
|
+
};
|
|
1638
|
+
const FETCH_MODE_LABELS = {
|
|
1639
|
+
auto: "fetchModeAuto",
|
|
1640
|
+
plugin: "fetchModePlugin",
|
|
1641
|
+
dsh: "fetchModeDsh"
|
|
1642
|
+
};
|
|
1643
|
+
/**
|
|
1644
|
+
* Read-only view of the fetch selection, shown under the search source.
|
|
1645
|
+
*
|
|
1646
|
+
* Both blocks are optional on the status DTO, so every row is rendered only from
|
|
1647
|
+
* a value the host actually reported. That distinction is load-bearing: a
|
|
1648
|
+
* missing `switcher` means the host tells us nothing and the row stays hidden,
|
|
1649
|
+
* while a reported `configuredFetchProvider: null` is a real answer — the host
|
|
1650
|
+
* pinned no provider, which is the DSH default. Guessing an id there would claim
|
|
1651
|
+
* a provider the settings page never observed.
|
|
1652
|
+
*
|
|
1653
|
+
* Nothing here is editable: the mode and the limits live in the plugin Config,
|
|
1654
|
+
* not in the preferences this card sits in, so the numbers cannot be mistaken for
|
|
1655
|
+
* a setting that this page can change.
|
|
1656
|
+
*/
|
|
1657
|
+
function FetchProviderStatusCard({ status, t }) {
|
|
1658
|
+
const switcher = status?.switcher;
|
|
1659
|
+
const configuration = status?.fetchConfiguration;
|
|
1660
|
+
if (switcher === void 0 && configuration === void 0) return null;
|
|
1661
|
+
const state = switcher !== null && switcher !== void 0 && switcher.state in SWITCHER_STATE_LABELS ? switcher.state : null;
|
|
1662
|
+
const mode = configuration !== void 0 && configuration.fetchProvider in FETCH_MODE_LABELS ? configuration.fetchProvider : void 0;
|
|
1663
|
+
const maxBodyChars = fetchLimit(configuration?.fetchMaxBodyChars);
|
|
1664
|
+
const maxResponseBytes = fetchLimit(configuration?.fetchMaxResponseBytes);
|
|
1665
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
1666
|
+
className: "dsha-context-settings",
|
|
1667
|
+
"data-fetch-status": state ?? "none",
|
|
1668
|
+
children: [
|
|
1669
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: t("fetchStatus") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
1670
|
+
className: "dsha-muted",
|
|
1671
|
+
children: t("fetchStatusHint")
|
|
1672
|
+
})] }),
|
|
1673
|
+
switcher !== null && switcher !== void 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(InfoRow, {
|
|
1674
|
+
label: t("fetchConfiguredProvider"),
|
|
1675
|
+
value: switcher.configuredFetchProvider || t("fetchProviderDshDefault")
|
|
1676
|
+
}) : null,
|
|
1677
|
+
state !== null ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(InfoRow, {
|
|
1678
|
+
label: t("switcherState"),
|
|
1679
|
+
value: t(SWITCHER_STATE_LABELS[state])
|
|
1680
|
+
}) : null,
|
|
1681
|
+
mode !== void 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(InfoRow, {
|
|
1682
|
+
label: t("fetchMode"),
|
|
1683
|
+
value: t(FETCH_MODE_LABELS[mode])
|
|
1684
|
+
}) : null,
|
|
1685
|
+
maxBodyChars !== null ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(InfoRow, {
|
|
1686
|
+
label: t("fetchMaxBodyChars"),
|
|
1687
|
+
value: `${maxBodyChars} ${t("characters")}`
|
|
1688
|
+
}) : null,
|
|
1689
|
+
maxResponseBytes !== null ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(InfoRow, {
|
|
1690
|
+
label: t("fetchMaxResponseBytes"),
|
|
1691
|
+
value: `${maxResponseBytes} ${t("bytes")}`
|
|
1692
|
+
}) : null,
|
|
1693
|
+
mode !== void 0 && mode !== "plugin" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
1694
|
+
className: "dsha-muted",
|
|
1695
|
+
children: t("fetchLimitsInactive")
|
|
1696
|
+
}) : null,
|
|
1697
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
1698
|
+
className: "dsha-muted",
|
|
1699
|
+
children: t("fetchConfigSource")
|
|
1700
|
+
})
|
|
1701
|
+
]
|
|
1702
|
+
});
|
|
1703
|
+
}
|
|
1704
|
+
/** A limit is shown only once it is the positive safe integer the Config promises. */
|
|
1705
|
+
function fetchLimit(value) {
|
|
1706
|
+
return value !== void 0 && Number.isSafeInteger(value) && value >= 1 ? value : null;
|
|
1707
|
+
}
|
|
1627
1708
|
function storageLabel$1(storage, t) {
|
|
1628
1709
|
if (storage === void 0 || !storage.available) return t("storageUnavailable");
|
|
1629
1710
|
if (storage.kind === "windows-dpapi") return t("storageWindows");
|
|
@@ -5064,6 +5145,8 @@ window.__ModuleLoader__.load({
|
|
|
5064
5145
|
capColTools: "动态工具",
|
|
5065
5146
|
capColNotes: "说明",
|
|
5066
5147
|
capPlan: "需要套餐:{plan}",
|
|
5148
|
+
capInputCap: "输入上限 {tokens}",
|
|
5149
|
+
capNoTools: "不支持工具",
|
|
5067
5150
|
speedRegular: "标准",
|
|
5068
5151
|
speedHighspeed: "高速 (约 6×)",
|
|
5069
5152
|
quotaCost: "额度倍率",
|
|
@@ -5100,6 +5183,7 @@ window.__ModuleLoader__.load({
|
|
|
5100
5183
|
cacheOutput: "输出 tokens",
|
|
5101
5184
|
cacheRequests: "请求数",
|
|
5102
5185
|
cacheHint: "同一会话内:系统提示与工具列表一旦变化会使缓存整体失效,因此保持工具集合稳定、把新增内容追加在末尾,命中率最高。",
|
|
5186
|
+
cacheExpired: "本会话已空闲超过缓存有效期,下一轮将重新处理约 {tokens} 个 token。",
|
|
5103
5187
|
cacheDrift: "最近前缀状态",
|
|
5104
5188
|
cacheDriftFirst: "首个请求(缓存为空)",
|
|
5105
5189
|
cacheDriftStable: "稳定(前缀未变)",
|
|
@@ -5193,6 +5277,8 @@ window.__ModuleLoader__.load({
|
|
|
5193
5277
|
capColTools: "Dynamic tools",
|
|
5194
5278
|
capColNotes: "Notes",
|
|
5195
5279
|
capPlan: "Requires plan: {plan}",
|
|
5280
|
+
capInputCap: "Input cap {tokens}",
|
|
5281
|
+
capNoTools: "No tools",
|
|
5196
5282
|
speedRegular: "Regular",
|
|
5197
5283
|
speedHighspeed: "HighSpeed (~6x)",
|
|
5198
5284
|
quotaCost: "Quota cost",
|
|
@@ -5223,6 +5309,7 @@ window.__ModuleLoader__.load({
|
|
|
5223
5309
|
cacheSection: "Cache & K3 tuning",
|
|
5224
5310
|
cacheDesc: "Kimi's prefix cache is automatic and content-hash based — there is no marker to set — so the cache-read ratio is the only evidence it is working.",
|
|
5225
5311
|
cacheEmpty: "No request in this process has reported usage yet.",
|
|
5312
|
+
cacheExpired: "This conversation sat idle past the cache lifetime, so the next turn reprocesses about {tokens} tokens.",
|
|
5226
5313
|
cacheHitRatio: "Cache hit ratio",
|
|
5227
5314
|
cacheCached: "Cached tokens",
|
|
5228
5315
|
cacheFresh: "Fresh tokens",
|
|
@@ -5290,6 +5377,7 @@ window.__ModuleLoader__.load({
|
|
|
5290
5377
|
model.id,
|
|
5291
5378
|
model.wire === "anthropic" ? t.wireAnthropic : t.wireOpenai,
|
|
5292
5379
|
...model.defaultReasoningEffort ? [t.defaultReasoningEffort + ": " + model.defaultReasoningEffort] : [],
|
|
5380
|
+
...model.maxInputTokens === void 0 ? [] : [t.capInputCap.replace("{tokens}", String(model.maxInputTokens))],
|
|
5293
5381
|
...model.minimumPlan ? [t.capPlan.replace("{plan}", model.minimumPlan)] : []
|
|
5294
5382
|
].join(" · "),
|
|
5295
5383
|
children: model.name
|
|
@@ -5301,9 +5389,12 @@ window.__ModuleLoader__.load({
|
|
|
5301
5389
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("td", { children: model.supportsDynamicTools ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
5302
5390
|
className: "dsha-cap-on",
|
|
5303
5391
|
children: t.capDynamicTools
|
|
5304
|
-
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
5392
|
+
}) : model.supportsToolUse ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
5305
5393
|
className: "dsha-cap-off",
|
|
5306
5394
|
children: t.capNone
|
|
5395
|
+
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
5396
|
+
className: "dsha-cap-off",
|
|
5397
|
+
children: t.capNoTools
|
|
5307
5398
|
}) }),
|
|
5308
5399
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("td", {
|
|
5309
5400
|
className: "dsha-cap-notes",
|
|
@@ -5938,6 +6029,10 @@ window.__ModuleLoader__.load({
|
|
|
5938
6029
|
className: "dsha-muted",
|
|
5939
6030
|
children: t.cacheDesc
|
|
5940
6031
|
}),
|
|
6032
|
+
status?.cacheHint != null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
6033
|
+
className: "dsha-warn",
|
|
6034
|
+
children: t.cacheExpired.replace("{tokens}", status.cacheHint.totalTokens.toLocaleString())
|
|
6035
|
+
}),
|
|
5941
6036
|
status?.cache == null ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
5942
6037
|
className: "dsha-empty",
|
|
5943
6038
|
children: t.cacheEmpty
|
|
@@ -9527,10 +9622,30 @@ window.__ModuleLoader__.load({
|
|
|
9527
9622
|
summaryConcise: "简洁(显示简要推理摘要)",
|
|
9528
9623
|
summaryDetailed: "详细(显示更详细的推理摘要)",
|
|
9529
9624
|
summaryNone: "无(不显示推理摘要)",
|
|
9530
|
-
searchProvider: "
|
|
9531
|
-
searchProviderHint: "选择 DSH
|
|
9625
|
+
searchProvider: "搜索来源",
|
|
9626
|
+
searchProviderHint: "选择 DSH 联网搜索使用默认来源,或改用当前 ChatGPT 订阅的 Codex 来源(自动走代理隧道)。抓取模式为 auto 时,抓取来源跟随此选择。",
|
|
9532
9627
|
searchProviderDsh: "DSH 默认",
|
|
9533
9628
|
searchProviderCodex: "ChatGPT(代理隧道)",
|
|
9629
|
+
fetchStatus: "抓取来源(只读)",
|
|
9630
|
+
fetchStatusHint: "以下内容由 Host 上报,只读展示。",
|
|
9631
|
+
fetchConfiguredProvider: "配置的抓取 Provider",
|
|
9632
|
+
fetchProviderDshDefault: "DSH 默认(Host 未固定抓取 provider)",
|
|
9633
|
+
switcherState: "抓取选择器状态",
|
|
9634
|
+
switcherStateIdle: "空闲(尚未应用选择)",
|
|
9635
|
+
switcherStateApplying: "应用中(正在切换 Host 的 web provider)",
|
|
9636
|
+
switcherStateApplied: "已应用",
|
|
9637
|
+
switcherStateMissing: "未找到可切换的 web 服务",
|
|
9638
|
+
switcherStateFailed: "切换失败,请检查 Host 日志",
|
|
9639
|
+
fetchMode: "抓取模式",
|
|
9640
|
+
fetchModeAuto: "auto(有可用代理或选了 ChatGPT 搜索时用插件抓取)",
|
|
9641
|
+
fetchModePlugin: "plugin(始终用本插件抓取)",
|
|
9642
|
+
fetchModeDsh: "dsh(保留 DSH 原有抓取来源)",
|
|
9643
|
+
fetchMaxBodyChars: "插件正文上限",
|
|
9644
|
+
fetchMaxResponseBytes: "插件响应体上限",
|
|
9645
|
+
characters: "字符",
|
|
9646
|
+
bytes: "字节",
|
|
9647
|
+
fetchLimitsInactive: "仅在实际使用插件抓取时生效;走 DSH 原有抓取来源时不适用这两个上限。",
|
|
9648
|
+
fetchConfigSource: "模式与上限在插件 Config 中修改(不是本页面偏好),修改后重载插件或重启 DSH 生效。",
|
|
9534
9649
|
providerDefault: "使用 Provider 默认值",
|
|
9535
9650
|
contextWindows: "模型上下文窗口",
|
|
9536
9651
|
contextWindowsHint: "只列出已勾选「可用模型」的条目。默认取模型目录值(GPT-6 系列 384K,最高 872K;其余最高 1M),该值用于 DSH 的压缩与溢出判断,可输入 872K、512K 等容量;改过的模型可单独或一键恢复默认。",
|
|
@@ -9660,10 +9775,30 @@ window.__ModuleLoader__.load({
|
|
|
9660
9775
|
summaryConcise: "Concise (brief summary)",
|
|
9661
9776
|
summaryDetailed: "Detailed (in-depth summary)",
|
|
9662
9777
|
summaryNone: "None (hide reasoning summary)",
|
|
9663
|
-
searchProvider: "Search
|
|
9664
|
-
searchProviderHint: "Choose whether DSH web
|
|
9778
|
+
searchProvider: "Search provider",
|
|
9779
|
+
searchProviderHint: "Choose whether DSH web search uses the default provider or the Codex proxy-backed source from this ChatGPT subscription. Fetch mode \"auto\" follows this choice.",
|
|
9665
9780
|
searchProviderDsh: "DSH default",
|
|
9666
9781
|
searchProviderCodex: "ChatGPT (Proxy tunnel)",
|
|
9782
|
+
fetchStatus: "Fetch source (read-only)",
|
|
9783
|
+
fetchStatusHint: "Reported by the host. Read-only.",
|
|
9784
|
+
fetchConfiguredProvider: "Configured fetch provider",
|
|
9785
|
+
fetchProviderDshDefault: "DSH default (the host pins no fetch provider)",
|
|
9786
|
+
switcherState: "Fetch switcher state",
|
|
9787
|
+
switcherStateIdle: "Idle (no selection applied yet)",
|
|
9788
|
+
switcherStateApplying: "Applying (host web provider switch in progress)",
|
|
9789
|
+
switcherStateApplied: "Applied",
|
|
9790
|
+
switcherStateMissing: "No web service found to switch",
|
|
9791
|
+
switcherStateFailed: "Switch failed, check the host log",
|
|
9792
|
+
fetchMode: "Fetch mode",
|
|
9793
|
+
fetchModeAuto: "auto (fetches with the plugin when a proxy is available or the ChatGPT search source is selected)",
|
|
9794
|
+
fetchModePlugin: "plugin (always fetch with this plugin)",
|
|
9795
|
+
fetchModeDsh: "dsh (keep the DSH default fetch source)",
|
|
9796
|
+
fetchMaxBodyChars: "Plugin body limit",
|
|
9797
|
+
fetchMaxResponseBytes: "Plugin response limit",
|
|
9798
|
+
characters: "chars",
|
|
9799
|
+
bytes: "bytes",
|
|
9800
|
+
fetchLimitsInactive: "Only applied when the plugin actually fetches; the DSH default fetch source does not use these two limits.",
|
|
9801
|
+
fetchConfigSource: "Mode and limits are changed in the plugin Config, not in these settings; they take effect after a plugin reload or a DSH restart.",
|
|
9667
9802
|
providerDefault: "Use provider default",
|
|
9668
9803
|
contextWindows: "Model context windows",
|
|
9669
9804
|
contextWindowsHint: "Lists the models checked under Available models. Each starts at its catalog value (384K for the GPT-6 family, up to 872K; up to 1M otherwise); DSH uses it for compaction and overflow detection. Values such as 872K and 512K are accepted, and a changed model can be restored one by one or all at once.",
|
|
@@ -10575,6 +10710,7 @@ window.__ModuleLoader__.load({
|
|
|
10575
10710
|
.dsha-cap-off{color:var(--dsw-alias-label-tertiary)}
|
|
10576
10711
|
.dsha-cap-notes{line-height:1.5;min-width:200px}
|
|
10577
10712
|
.dsha-cap-footnote{font-size:11px;line-height:1.55;margin:8px 0 0}
|
|
10713
|
+
.dsha-warn{border:0.5px solid var(--dsw-alias-border-l2);border-radius:6px;line-height:1.55;margin:0 0 10px;padding:8px 10px}
|
|
10578
10714
|
`;
|
|
10579
10715
|
/** Kimi-specific rules layered on top of the shared control styles. */
|
|
10580
10716
|
function installKimiCodeStyles() {
|