dsh-model-switch 0.4.47 → 0.4.50
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 +39 -0
- package/README.md +1 -1
- package/README.zh.md +1 -1
- package/cordis.patch.yml +7 -0
- package/lib/client.js +289 -153
- package/lib/index.js +89 -5
- package/lib/prime-memory-compat.js +5 -8
- package/lib/review-timeout.js +238 -0
- package/lib/types/client/ModelSwitchSettings.d.ts +2 -0
- package/lib/types/client/locales.d.ts +10 -0
- package/lib/types/client-contract.d.ts +11 -0
- package/lib/types/compatibility.d.ts +28 -2
- package/lib/types/host-settings.d.ts +15 -0
- package/lib/types/prime-memory-compat.d.ts +14 -0
- package/lib/types/review-timeout.d.ts +104 -0
- package/package.json +6 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,42 @@
|
|
|
1
|
+
|
|
2
|
+
## Unreleased
|
|
3
|
+
|
|
4
|
+
- **记忆蒸馏路由修复(已提交,未发版)**:`fix(memory): stop the pin and the live push from cancelling each other`(`8e59fda`)。适配层不再"推链 + 清空 legacy 对 + 写静态 pin"三者互相抵消:live RPC 被接受时只发 `distillChain: []` + `distillProvider`/`distillModel` + 分层链,静态 pin 降级为 RPC 不可用时的兜底。`src/`、`lib/` 与测试(586 通过)已更新;**npm 上的 0.4.48 不含此修复**。
|
|
5
|
+
- **发版前置条件**:在隔离 lab(全虚拟探针)里证明 L1/L2/L3 的蒸馏调用确实带着配置路由、且改动即时生效;通过后才恢复「记忆蒸馏模型」卡片(`MEMORY_CAPABILITY_UI`)并随 v0.4.49 发布。未通过则保持撤卡。
|
|
6
|
+
- **其余待做**:DSH `0.2.1-rc.4` 运行时验证;Auto review 与 automode 分类器的虚拟取证;计划审阅卡两张截图(需 answerer)。
|
|
7
|
+
|
|
8
|
+
## v0.4.50
|
|
9
|
+
|
|
10
|
+
设置页新增「审查超时」:自动审查请求的流式空闲超时可自定义、可取消、可恢复默认。
|
|
11
|
+
|
|
12
|
+
- 作用点:写入审查模型所在 provider 的 `streamIdleTimeoutMs`(`@deepseek-ai/dsh-llm-pi-ai` 的 provider profile)。上游没有 per-request 覆盖,这是唯一入口。
|
|
13
|
+
- 「取消超时」写上游硬上限 `2147483647ms`(≈24.8 天)——上游拒绝 0/负数/Infinity,所以它 **不是真正的无限**;死端点会一直等待,UI 文案已如实标注。
|
|
14
|
+
- 作用范围:该 provider 的**全部调用**(审查、主对话、其他路由),不只是审查请求。
|
|
15
|
+
- 生效时机:写入发生在启动过程中,**下一次启动**才读取新值(实测写入当次仍按旧的 300 秒);UI 已写明需重启一次。
|
|
16
|
+
- 恢复默认 = 删除该键(本插件是这条键的管理者);实测删除后回到上游默认行为。
|
|
17
|
+
|
|
18
|
+
修复(本轮实测发现):
|
|
19
|
+
|
|
20
|
+
- `model-switch-review-timeout` 行在激活期 `await` 设置写入会拖死加载器:headless profile 直接起不来,CLI 以 `unsettled top-level await` 退出(exit 13)。改为 fire-and-forget + 延迟重试 + 串行化。
|
|
21
|
+
- 清空超时字段改用 `unset` 而不是 `set null`:字段是数字,null 会被 host schema 拒绝。
|
|
22
|
+
|
|
23
|
+
lab 实测(virtual / 零真实额度;本地虚拟端点 `tools/route-probe.mjs`,DSH 0.2.1-rc.3):
|
|
24
|
+
|
|
25
|
+
- 自定义 5 秒 + 探针挂起 8 秒 → 下次启动报 `TIMEOUT: pi-ai stream idle timeout after 5000ms`(写入当次仍成功,证明需重启);
|
|
26
|
+
- 取消超时 → 键写为 `2147483647`,同样 8 秒挂起后正常完成;
|
|
27
|
+
- 恢复默认 → 键被删除,后续启动正常完成(回到 300 秒语义)。
|
|
28
|
+
- 复现方式:`node tools/route-probe.mjs --preset ok --hang 8000`(挂起 8 秒不回字节),配合上面三种设置重启各一次即可复跑。
|
|
29
|
+
|
|
30
|
+
## v0.4.48
|
|
31
|
+
|
|
32
|
+
兼容门限从「逐版本列举」改为「下界 + 区间」:
|
|
33
|
+
|
|
34
|
+
- **新增 `dsh.compatibility.dshRuntime: ">=0.2.0-rc.2"`**:凡 ≥ 该下界的 DSH 运行时都按已验证处理(不再逐个版本写白名单);`blocklist` 仍最优先、加载仍 fail-open——区间只消除「未验证运行时」的警告噪音,不改变任何挂载行为。
|
|
35
|
+
- **实现**:`src/compatibility.ts` 新增 `compareDshVersions()`(含预发布排序:`rc.2 < rc.3 < 正式版`)与 `runtimeFloorOf()`(只认开区间 `>=x.y.z`,有界范围视为另一种承诺、忽略不半执行);`allowDshRuntime()` 把区间透传给判定。
|
|
36
|
+
- **测试**:`tests/compatibility.spec.ts` 增 5 例(预发布排序、区间解析、≥下界不告警、低于下界仍告警、blocklist 仍拦截、清单里确有该键),11 例全绿。
|
|
37
|
+
- **工具**:`tools/route-probe.mjs` 随本版发布 `--map`(按模型分流回复)与 `once`(每模型只回放一次工具调用,避免自激循环)。
|
|
38
|
+
- **尚未取证**:DSH `0.2.1-rc.4` 的运行时验证仍待做(区间已覆盖其语义,但未单独实测,不据此声称已验收);记忆蒸馏路由、Auto review 与 automode 分类器的虚拟实测同样待做。
|
|
39
|
+
|
|
1
40
|
## v0.4.47
|
|
2
41
|
|
|
3
42
|
两件用户可见修正(撤卡 + 计划卡换模型),均为热修。
|
package/README.md
CHANGED
|
@@ -191,7 +191,7 @@ DSH Host peers and development dependencies accept `>=0.1.7-alpha.2`, including
|
|
|
191
191
|
|
|
192
192
|
Verified releases: `0.1.7-alpha.2`, `0.1.7-rc.1`, `0.1.7-rc.2`, `0.2.0-rc.2`. The 0.2.0 claim covers the Host's renamed question verbs, its unawaited `session.selectModel` default write, and its returned `ModelDirectory.select` refusal, each verified in the lab and on a live desktop session.
|
|
193
193
|
|
|
194
|
-
The
|
|
194
|
+
DSH compatibility is declared as an open-ended floor (`dsh.compatibility.dshRuntime: ">=0.2.0-rc.2"`): every runtime at or above it mounts without an unverified warning, a `blocklist` still wins, and loading stays fail-open. The releases in `package.json#dsh.compatibility.dshReleases` are evidence, not an allowlist. Review public API changes and test new Host releases before adding a verification claim.
|
|
195
195
|
|
|
196
196
|
**Third-party auto modes.** When [`@log.li/dsh-automode`](https://github.com/log-li/dsh-automode) is installed, the `model-switch-automode-compat` row injects this plugin's Auto-review route and pure-read list into that row's **in-memory** config — no profile write, nothing to configure by hand. Its `auto-mode` preset then reviews with your configured route and passes your allowlisted tools, while the `auto` preset keeps using this plugin's own gate. Explicit `classifier.provider/model` values in that row always win, pattern-shaped allowlist entries cannot transfer (its check is exact-match), and its hard-deny bands still run first.
|
|
197
197
|
|
package/README.zh.md
CHANGED
|
@@ -189,7 +189,7 @@ DSH Host peer 和开发依赖接受 `>=0.1.7-alpha.2`,包括 rc.1 和后续版
|
|
|
189
189
|
|
|
190
190
|
已验证版本:`0.1.7-alpha.2`、`0.1.7-rc.1`、`0.1.7-rc.2`、`0.2.0-rc.2`、`0.2.1-rc.2`、`0.2.1-rc.3`。0.2.0 的声明覆盖三处差异:Host 改名的提问撤下动词(`cancel()` → `dismiss()`)、`session.selectModel` 不 await 的部署默认值写入、以返回值报出的 `ModelDirectory.select` 拒绝;三者均已在 lab(3082/3085)与真实桌面会话中逐一验证。0.2.1 的声明覆盖两处被替换的 seam:共享命名调用改为 provider 自备提示词与解析的 `executeSessionTitleLlm`(本插件按安装行在运行时适配,并镜像官方 0.2.1 的提示词、取最低 reasoning effort 与 `currentTitle` 锚定);Subagent 运行时以 `startActivation` 取代 `start()`/`startContinuable()`,本插件同时识别两条已发布线,并为激活入口覆写 `spec.request.agentOptions`(显式路由仍优先、非 agentOptions 能力的外部适配器不改写),路由语义与旧线一致(0.4.28,记录于 `docs/seam-gap.md`);0.2.1 还新增了自动审查门禁对 `ctx.workingDirectory` 的读取,旧实现因在自己的 fiber 里直调 `official.apply` 而需要手工镜像门禁的 `inject`,于是每个工具调用都被拒(`cannot get property "workingDirectory" without inject`),0.4.28 改为把官方门禁以插件方式挂载、由官方 `inject` 解析依赖,本行只声明自身需要的服务。0.4.28 的真实包证据:0.2.1 上旧形态精确复现该注入错误、新形态到达 `workingDirectory.ensure` 且成功注册门禁、激活入口的路由改写与 spec 透传通过;0.2.0 上无需 `workingDirectory` 服务即可注册门禁,`start()` 路由改写与父身份保持不变。0.2.1 的 lab 证据为:npm 安装的 0.2.1 运行时 + 打包后的 0.4.26 组合 `exit 0`、命名/压缩/自动审查/子代理四行均来自本插件、Web Host 在 3082 启动并服务需要鉴权的页面;该次未经浏览器调用 3082 能力 RPC,真实桌面的 0.2.1 命名差分在应用升级后复验。0.2.1 还暴露出一处预设层面的差异(0.2.1 校验提示词变量、只有 `provider`/`model`,且把 `time-context`/`tool-schedule` 移进预设):0.4.26 的静态预设副本因此让每一轮都报 `unknown prompt variable "{{cwd}}"`,0.4.27 删除副本改为启动期运行时桥接,并在 lab 的 0.2.1 headless 真实回合中验证通过(展开见 CHANGELOG 0.4.27)。0.2.1-rc.3 是纯客户端改动:本品读到的三个包都是加法——`ui-conversation` 新增 `conversation.session.header.views.actions` 槽位与 header 的 `entryPins`/`entryActions`/`setPinned`(`conversation.composer` 链与 `ComposerChainProps` 一字未改)、`ui-primitives` 新增 `IconAppsAddOutline*` 图标、`ui-user-questions` 只有版本号;`experimental-auto-review`、`dsh-tools`、`dsh-session`、`dsh-subagent` 与 `api/*` 在 rc.3 中源码未变(后者只有版本号)。插件本体零改动,在 rc.3 lab(3083,`@deepseek-ai/dsh@0.2.1-rc.3`)复验:挂载无 unverified 告警、58 条默认名单、纯读跳过计数、写操作仍审查、计划卡「去聊天里说」回合以 `aborted` 结束、草稿跨会话保留;再用同一产物在 rc.2 lab(3082)回归通过(展开见 CHANGELOG 0.4.41)。
|
|
191
191
|
|
|
192
|
-
`package.json#dsh.compatibility.dshReleases`
|
|
192
|
+
DSH 兼容按「下界 + 区间」声明(`dsh.compatibility.dshRuntime: ">=0.2.0-rc.2"`):≥ 该下界一律挂载且不再告警,`blocklist` 仍最优先,加载保持 fail-open。`package.json#dsh.compatibility.dshReleases` 里的逐版本记录是证据,不是允许列表。新增验证声明前要审查公开 API 变化并测试新 Host 版本。
|
|
193
193
|
|
|
194
194
|
**第三方自动模式。** 安装 [`@log.li/dsh-automode`](https://github.com/log-li/dsh-automode) 后,`model-switch-automode-compat` 行会把本插件的自动审查路由与纯读名单注入到该行的**内存配置**里——不写 profile、不需要手工配置。它的 `auto-mode` 档位会用你配置的路由审查、并按你的名单直通纯读工具;`auto` 档位仍然走本插件自己的闸门。该行里显式写过的 `classifier.provider/model` 永远优先,带通配的名单条目无法转过去(它是精确匹配),它的硬 deny 正则也照旧先跑。
|
|
195
195
|
|
package/cordis.patch.yml
CHANGED
|
@@ -87,3 +87,10 @@
|
|
|
87
87
|
# "follow the default model" state.
|
|
88
88
|
- id: model-switch-prime-memory-compat
|
|
89
89
|
name: 'dsh-model-switch/prime-memory-compat'
|
|
90
|
+
|
|
91
|
+
# Write the configured reviewer stream idle timeout into the reviewer
|
|
92
|
+
# routes' pi-ai provider profiles (the only place the upstream watchdog
|
|
93
|
+
# reads it). The write lands in the profile document, so it takes effect on
|
|
94
|
+
# the next start — same channel as the memory static pin.
|
|
95
|
+
- id: model-switch-review-timeout
|
|
96
|
+
name: 'dsh-model-switch/review-timeout'
|
package/lib/client.js
CHANGED
|
@@ -369,6 +369,8 @@ window.__ModuleLoader__.load({
|
|
|
369
369
|
enabled: "autoReviewSkipReadOnly",
|
|
370
370
|
tools: "autoReviewAllowlist"
|
|
371
371
|
});
|
|
372
|
+
/** Upstream ceiling enforced by `@deepseek-ai/dsh-timeout` (MAX_TIMER_DELAY_MS). */
|
|
373
|
+
const UPSTREAM_MAX_IDLE_TIMEOUT_MS = 2147483647;
|
|
372
374
|
/**
|
|
373
375
|
* Derive the allowlist editor's value.
|
|
374
376
|
*
|
|
@@ -1844,6 +1846,29 @@ window.__ModuleLoader__.load({
|
|
|
1844
1846
|
})).filter((row) => allowlistQueryText === "" || row.entry.toLowerCase().includes(allowlistQueryText));
|
|
1845
1847
|
const allowlistAvailable = (catalogRows ?? []).filter((row) => !isAllowedByList(row.name, allowlistTools)).filter((row) => allowlistQueryText === "" || row.name.toLowerCase().includes(allowlistQueryText) || row.sourceLabel.toLowerCase().includes(allowlistQueryText));
|
|
1846
1848
|
const allowlistSummaryText = allowlistView === void 0 ? props.t("loading") : allowlistEnabled ? props.t("reviewAllowlistOnSummary").replace("{count}", String(allowlistTools.length)) : props.t("reviewAllowlistOffSummary");
|
|
1849
|
+
/**
|
|
1850
|
+
* The reviewer stream idle timeout, stored in seconds for display; undefined
|
|
1851
|
+
* = follow the provider default. The save path converts to milliseconds and
|
|
1852
|
+
* `0` = cancelled (upstream ceiling) before writing.
|
|
1853
|
+
*/
|
|
1854
|
+
const storedTimeoutMs = switchSettings.value?.autoReviewTimeoutMs;
|
|
1855
|
+
const [timeoutDraft, setTimeoutDraft] = (0, react.useState)(void 0);
|
|
1856
|
+
const timeoutSeconds = timeoutDraft ?? (storedTimeoutMs === void 0 ? void 0 : String(Math.round(storedTimeoutMs / 1e3)));
|
|
1857
|
+
const timeoutCancelled = storedTimeoutMs === 0;
|
|
1858
|
+
const timeoutWritable = switchSettings.status === "ready" && switchSettings.writable;
|
|
1859
|
+
const timeoutSummary = storedTimeoutMs === void 0 ? props.t("reviewTimeoutDefault") : storedTimeoutMs === 0 ? props.t("reviewTimeoutCancelled") : `${Math.round(storedTimeoutMs / 1e3)}s`;
|
|
1860
|
+
const saveTimeout = () => {
|
|
1861
|
+
if (busy !== void 0 || !timeoutWritable) return;
|
|
1862
|
+
const trimmed = (timeoutDraft ?? "").trim();
|
|
1863
|
+
if (trimmed === "") {
|
|
1864
|
+
run("timeout", () => props.saveReviewTimeout(void 0));
|
|
1865
|
+
return;
|
|
1866
|
+
}
|
|
1867
|
+
const seconds = Number(trimmed);
|
|
1868
|
+
if (!Number.isFinite(seconds) || seconds < 1 || !Number.isInteger(seconds)) return;
|
|
1869
|
+
const ms = Math.min(seconds, Math.round(UPSTREAM_MAX_IDLE_TIMEOUT_MS / 1e3)) * 1e3;
|
|
1870
|
+
run("timeout", () => props.saveReviewTimeout(ms));
|
|
1871
|
+
};
|
|
1847
1872
|
const saveSubagent = () => {
|
|
1848
1873
|
if (subagentDraft === void 0 || subagentDraft.mode !== "fixed") return;
|
|
1849
1874
|
const matched = subagentCatalogModel;
|
|
@@ -2602,175 +2627,256 @@ window.__ModuleLoader__.load({
|
|
|
2602
2627
|
}),
|
|
2603
2628
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", {
|
|
2604
2629
|
className: ModelSwitchSettings_module_css_default.group,
|
|
2605
|
-
children: [
|
|
2606
|
-
|
|
2607
|
-
|
|
2608
|
-
|
|
2609
|
-
title: props.t("reviewAllowlist"),
|
|
2610
|
-
summary: allowlistSummaryText,
|
|
2611
|
-
hint: props.t("reviewAllowlistHelp"),
|
|
2612
|
-
icon: "autoReview",
|
|
2613
|
-
open: open === "allowlist",
|
|
2614
|
-
onToggle: () => {
|
|
2615
|
-
toggle("allowlist");
|
|
2616
|
-
},
|
|
2617
|
-
...allowlistEnabled ? { badge: props.t("reviewAllowlistBadge") } : {},
|
|
2618
|
-
trailing: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(InstantSwitch, {
|
|
2619
|
-
checked: allowlistEnabled,
|
|
2620
|
-
disabled: busy !== void 0 || !allowlistWritable,
|
|
2621
|
-
label: props.t("reviewAllowlist"),
|
|
2622
|
-
onChange: (value) => {
|
|
2623
|
-
persistAllowlist({
|
|
2624
|
-
enabled: value,
|
|
2625
|
-
tools: allowlistTools
|
|
2626
|
-
});
|
|
2627
|
-
}
|
|
2630
|
+
children: [
|
|
2631
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("h2", {
|
|
2632
|
+
className: ModelSwitchSettings_module_css_default.groupLabel,
|
|
2633
|
+
children: props.t("reviewAllowlistGroup")
|
|
2628
2634
|
}),
|
|
2629
|
-
|
|
2630
|
-
|
|
2631
|
-
|
|
2632
|
-
|
|
2633
|
-
|
|
2634
|
-
|
|
2635
|
-
|
|
2636
|
-
|
|
2637
|
-
|
|
2638
|
-
|
|
2639
|
-
|
|
2640
|
-
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
|
|
2645
|
-
|
|
2646
|
-
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
disabled: busy !== void 0 || props.scanTools === void 0 || catalogState === "loading",
|
|
2650
|
-
onClick: scanAllowlistTools,
|
|
2651
|
-
children: catalogState === "loading" ? props.t("reviewAllowlistScanning") : props.t("reviewAllowlistScan")
|
|
2652
|
-
}),
|
|
2653
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
2654
|
-
type: "button",
|
|
2655
|
-
className: cx(ModelSwitchSettings_module_css_default.button, ModelSwitchSettings_module_css_default.secondaryButton),
|
|
2656
|
-
disabled: busy !== void 0 || !allowlistWritable,
|
|
2657
|
-
onClick: () => {
|
|
2658
|
-
persistAllowlist({
|
|
2659
|
-
enabled: allowlistEnabled,
|
|
2660
|
-
tools: [...DEFAULT_READ_ONLY_TOOLS]
|
|
2661
|
-
});
|
|
2662
|
-
},
|
|
2663
|
-
children: props.t("reviewAllowlistReset")
|
|
2664
|
-
})
|
|
2665
|
-
]
|
|
2666
|
-
}),
|
|
2667
|
-
message?.route === "allowlist" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
2668
|
-
className: cx(ModelSwitchSettings_module_css_default.hint, ModelSwitchSettings_module_css_default.message),
|
|
2669
|
-
children: message.text
|
|
2670
|
-
}) : null,
|
|
2671
|
-
reviewStatus === void 0 || reviewStatus.skippedReadOnly === 0 ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
2672
|
-
className: ModelSwitchSettings_module_css_default.hint,
|
|
2673
|
-
children: props.t("reviewAllowlistSkipped").replace("{count}", String(reviewStatus.skippedReadOnly))
|
|
2674
|
-
}),
|
|
2675
|
-
reviewStatus?.automode === void 0 ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
2676
|
-
className: ModelSwitchSettings_module_css_default.hint,
|
|
2677
|
-
children: props.t("reviewAutomodeLinked").replace("{route}", reviewStatus.automode.route ?? (reviewStatus.automode.routeSkipped === "user-set" ? props.t("reviewAutomodeRouteOwn") : props.t("reviewAutomodeRouteUnset"))).replace("{added}", String(reviewStatus.automode.added)).replace("{skipped}", String(reviewStatus.automode.skipped))
|
|
2635
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(RouteCard, {
|
|
2636
|
+
title: props.t("reviewAllowlist"),
|
|
2637
|
+
summary: allowlistSummaryText,
|
|
2638
|
+
hint: props.t("reviewAllowlistHelp"),
|
|
2639
|
+
icon: "autoReview",
|
|
2640
|
+
open: open === "allowlist",
|
|
2641
|
+
onToggle: () => {
|
|
2642
|
+
toggle("allowlist");
|
|
2643
|
+
},
|
|
2644
|
+
...allowlistEnabled ? { badge: props.t("reviewAllowlistBadge") } : {},
|
|
2645
|
+
trailing: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(InstantSwitch, {
|
|
2646
|
+
checked: allowlistEnabled,
|
|
2647
|
+
disabled: busy !== void 0 || !allowlistWritable,
|
|
2648
|
+
label: props.t("reviewAllowlist"),
|
|
2649
|
+
onChange: (value) => {
|
|
2650
|
+
persistAllowlist({
|
|
2651
|
+
enabled: value,
|
|
2652
|
+
tools: allowlistTools
|
|
2653
|
+
});
|
|
2654
|
+
}
|
|
2678
2655
|
}),
|
|
2679
|
-
|
|
2680
|
-
|
|
2681
|
-
|
|
2682
|
-
|
|
2656
|
+
children: [
|
|
2657
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
2658
|
+
className: ModelSwitchSettings_module_css_default.hint,
|
|
2659
|
+
children: props.t("reviewAllowlistNote")
|
|
2660
|
+
}),
|
|
2661
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
2662
|
+
className: ModelSwitchSettings_module_css_default.allowToolbar,
|
|
2683
2663
|
children: [
|
|
2684
|
-
/* @__PURE__ */ (0, react_jsx_runtime.
|
|
2685
|
-
className: ModelSwitchSettings_module_css_default.
|
|
2686
|
-
|
|
2687
|
-
|
|
2688
|
-
|
|
2689
|
-
|
|
2690
|
-
|
|
2691
|
-
|
|
2692
|
-
children: row.entry
|
|
2693
|
-
})]
|
|
2694
|
-
}),
|
|
2695
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
2696
|
-
className: ModelSwitchSettings_module_css_default.allowSource,
|
|
2697
|
-
children: [row.source.label, row.source.repo === void 0 ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
2698
|
-
className: ModelSwitchSettings_module_css_default.allowDot,
|
|
2699
|
-
children: "·"
|
|
2700
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("a", {
|
|
2701
|
-
className: ModelSwitchSettings_module_css_default.allowRepo,
|
|
2702
|
-
href: row.source.repo,
|
|
2703
|
-
target: "_blank",
|
|
2704
|
-
rel: "noreferrer",
|
|
2705
|
-
children: props.t("reviewAllowlistRepo")
|
|
2706
|
-
})] })]
|
|
2664
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
2665
|
+
className: ModelSwitchSettings_module_css_default.input,
|
|
2666
|
+
type: "search",
|
|
2667
|
+
value: allowlistQuery,
|
|
2668
|
+
placeholder: props.t("reviewAllowlistSearch"),
|
|
2669
|
+
onChange: (event) => {
|
|
2670
|
+
setAllowlistQuery(event.target.value);
|
|
2671
|
+
}
|
|
2707
2672
|
}),
|
|
2708
2673
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
2709
2674
|
type: "button",
|
|
2710
2675
|
className: cx(ModelSwitchSettings_module_css_default.button, ModelSwitchSettings_module_css_default.secondaryButton),
|
|
2711
|
-
disabled: busy !== void 0 ||
|
|
2712
|
-
onClick:
|
|
2713
|
-
|
|
2714
|
-
},
|
|
2715
|
-
children: props.t("reviewAllowlistRemove")
|
|
2716
|
-
})
|
|
2717
|
-
]
|
|
2718
|
-
}, row.entry))
|
|
2719
|
-
}),
|
|
2720
|
-
allowlistIncluded.length === 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
2721
|
-
className: ModelSwitchSettings_module_css_default.hint,
|
|
2722
|
-
children: props.t("reviewAllowlistNone")
|
|
2723
|
-
}) : null,
|
|
2724
|
-
allowlistAvailable.length === 0 ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
2725
|
-
className: ModelSwitchSettings_module_css_default.hint,
|
|
2726
|
-
children: props.t("reviewAllowlistAvailable")
|
|
2727
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("ul", {
|
|
2728
|
-
className: ModelSwitchSettings_module_css_default.allowList,
|
|
2729
|
-
children: allowlistAvailable.map((row) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("li", {
|
|
2730
|
-
className: ModelSwitchSettings_module_css_default.allowRow,
|
|
2731
|
-
children: [
|
|
2732
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
|
|
2733
|
-
className: ModelSwitchSettings_module_css_default.allowLabel,
|
|
2734
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
2735
|
-
type: "checkbox",
|
|
2736
|
-
checked: false,
|
|
2737
|
-
readOnly: true
|
|
2738
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("code", {
|
|
2739
|
-
className: ModelSwitchSettings_module_css_default.allowName,
|
|
2740
|
-
children: row.name
|
|
2741
|
-
})]
|
|
2742
|
-
}),
|
|
2743
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
2744
|
-
className: ModelSwitchSettings_module_css_default.allowSource,
|
|
2745
|
-
children: [row.sourceLabel, row.repo === void 0 ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
2746
|
-
className: ModelSwitchSettings_module_css_default.allowDot,
|
|
2747
|
-
children: "·"
|
|
2748
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("a", {
|
|
2749
|
-
className: ModelSwitchSettings_module_css_default.allowRepo,
|
|
2750
|
-
href: row.repo,
|
|
2751
|
-
target: "_blank",
|
|
2752
|
-
rel: "noreferrer",
|
|
2753
|
-
children: props.t("reviewAllowlistRepo")
|
|
2754
|
-
})] })]
|
|
2676
|
+
disabled: busy !== void 0 || props.scanTools === void 0 || catalogState === "loading",
|
|
2677
|
+
onClick: scanAllowlistTools,
|
|
2678
|
+
children: catalogState === "loading" ? props.t("reviewAllowlistScanning") : props.t("reviewAllowlistScan")
|
|
2755
2679
|
}),
|
|
2756
2680
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
2757
2681
|
type: "button",
|
|
2758
2682
|
className: cx(ModelSwitchSettings_module_css_default.button, ModelSwitchSettings_module_css_default.secondaryButton),
|
|
2759
2683
|
disabled: busy !== void 0 || !allowlistWritable,
|
|
2760
2684
|
onClick: () => {
|
|
2761
|
-
|
|
2685
|
+
persistAllowlist({
|
|
2686
|
+
enabled: allowlistEnabled,
|
|
2687
|
+
tools: [...DEFAULT_READ_ONLY_TOOLS]
|
|
2688
|
+
});
|
|
2762
2689
|
},
|
|
2763
|
-
children: props.t("
|
|
2690
|
+
children: props.t("reviewAllowlistReset")
|
|
2764
2691
|
})
|
|
2765
2692
|
]
|
|
2766
|
-
},
|
|
2767
|
-
|
|
2768
|
-
|
|
2769
|
-
|
|
2770
|
-
|
|
2771
|
-
|
|
2772
|
-
|
|
2773
|
-
|
|
2693
|
+
}),
|
|
2694
|
+
message?.route === "allowlist" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
2695
|
+
className: cx(ModelSwitchSettings_module_css_default.hint, ModelSwitchSettings_module_css_default.message),
|
|
2696
|
+
children: message.text
|
|
2697
|
+
}) : null,
|
|
2698
|
+
reviewStatus === void 0 || reviewStatus.skippedReadOnly === 0 ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
2699
|
+
className: ModelSwitchSettings_module_css_default.hint,
|
|
2700
|
+
children: props.t("reviewAllowlistSkipped").replace("{count}", String(reviewStatus.skippedReadOnly))
|
|
2701
|
+
}),
|
|
2702
|
+
reviewStatus?.automode === void 0 ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
2703
|
+
className: ModelSwitchSettings_module_css_default.hint,
|
|
2704
|
+
children: props.t("reviewAutomodeLinked").replace("{route}", reviewStatus.automode.route ?? (reviewStatus.automode.routeSkipped === "user-set" ? props.t("reviewAutomodeRouteOwn") : props.t("reviewAutomodeRouteUnset"))).replace("{added}", String(reviewStatus.automode.added)).replace("{skipped}", String(reviewStatus.automode.skipped))
|
|
2705
|
+
}),
|
|
2706
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("ul", {
|
|
2707
|
+
className: ModelSwitchSettings_module_css_default.allowList,
|
|
2708
|
+
children: allowlistIncluded.map((row) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("li", {
|
|
2709
|
+
className: ModelSwitchSettings_module_css_default.allowRow,
|
|
2710
|
+
children: [
|
|
2711
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
|
|
2712
|
+
className: ModelSwitchSettings_module_css_default.allowLabel,
|
|
2713
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
2714
|
+
type: "checkbox",
|
|
2715
|
+
checked: true,
|
|
2716
|
+
readOnly: true
|
|
2717
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("code", {
|
|
2718
|
+
className: ModelSwitchSettings_module_css_default.allowName,
|
|
2719
|
+
children: row.entry
|
|
2720
|
+
})]
|
|
2721
|
+
}),
|
|
2722
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
2723
|
+
className: ModelSwitchSettings_module_css_default.allowSource,
|
|
2724
|
+
children: [row.source.label, row.source.repo === void 0 ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
2725
|
+
className: ModelSwitchSettings_module_css_default.allowDot,
|
|
2726
|
+
children: "·"
|
|
2727
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("a", {
|
|
2728
|
+
className: ModelSwitchSettings_module_css_default.allowRepo,
|
|
2729
|
+
href: row.source.repo,
|
|
2730
|
+
target: "_blank",
|
|
2731
|
+
rel: "noreferrer",
|
|
2732
|
+
children: props.t("reviewAllowlistRepo")
|
|
2733
|
+
})] })]
|
|
2734
|
+
}),
|
|
2735
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
2736
|
+
type: "button",
|
|
2737
|
+
className: cx(ModelSwitchSettings_module_css_default.button, ModelSwitchSettings_module_css_default.secondaryButton),
|
|
2738
|
+
disabled: busy !== void 0 || !allowlistWritable,
|
|
2739
|
+
onClick: () => {
|
|
2740
|
+
setAllowTool(row.entry, false);
|
|
2741
|
+
},
|
|
2742
|
+
children: props.t("reviewAllowlistRemove")
|
|
2743
|
+
})
|
|
2744
|
+
]
|
|
2745
|
+
}, row.entry))
|
|
2746
|
+
}),
|
|
2747
|
+
allowlistIncluded.length === 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
2748
|
+
className: ModelSwitchSettings_module_css_default.hint,
|
|
2749
|
+
children: props.t("reviewAllowlistNone")
|
|
2750
|
+
}) : null,
|
|
2751
|
+
allowlistAvailable.length === 0 ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
2752
|
+
className: ModelSwitchSettings_module_css_default.hint,
|
|
2753
|
+
children: props.t("reviewAllowlistAvailable")
|
|
2754
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("ul", {
|
|
2755
|
+
className: ModelSwitchSettings_module_css_default.allowList,
|
|
2756
|
+
children: allowlistAvailable.map((row) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("li", {
|
|
2757
|
+
className: ModelSwitchSettings_module_css_default.allowRow,
|
|
2758
|
+
children: [
|
|
2759
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
|
|
2760
|
+
className: ModelSwitchSettings_module_css_default.allowLabel,
|
|
2761
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
2762
|
+
type: "checkbox",
|
|
2763
|
+
checked: false,
|
|
2764
|
+
readOnly: true
|
|
2765
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("code", {
|
|
2766
|
+
className: ModelSwitchSettings_module_css_default.allowName,
|
|
2767
|
+
children: row.name
|
|
2768
|
+
})]
|
|
2769
|
+
}),
|
|
2770
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
2771
|
+
className: ModelSwitchSettings_module_css_default.allowSource,
|
|
2772
|
+
children: [row.sourceLabel, row.repo === void 0 ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
2773
|
+
className: ModelSwitchSettings_module_css_default.allowDot,
|
|
2774
|
+
children: "·"
|
|
2775
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("a", {
|
|
2776
|
+
className: ModelSwitchSettings_module_css_default.allowRepo,
|
|
2777
|
+
href: row.repo,
|
|
2778
|
+
target: "_blank",
|
|
2779
|
+
rel: "noreferrer",
|
|
2780
|
+
children: props.t("reviewAllowlistRepo")
|
|
2781
|
+
})] })]
|
|
2782
|
+
}),
|
|
2783
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
2784
|
+
type: "button",
|
|
2785
|
+
className: cx(ModelSwitchSettings_module_css_default.button, ModelSwitchSettings_module_css_default.secondaryButton),
|
|
2786
|
+
disabled: busy !== void 0 || !allowlistWritable,
|
|
2787
|
+
onClick: () => {
|
|
2788
|
+
setAllowTool(row.name, true);
|
|
2789
|
+
},
|
|
2790
|
+
children: props.t("reviewAllowlistAdd")
|
|
2791
|
+
})
|
|
2792
|
+
]
|
|
2793
|
+
}, row.name))
|
|
2794
|
+
})] }),
|
|
2795
|
+
catalogState === "failed" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
2796
|
+
className: cx(ModelSwitchSettings_module_css_default.hint, ModelSwitchSettings_module_css_default.message),
|
|
2797
|
+
children: props.t("reviewAllowlistScanFailed")
|
|
2798
|
+
}) : null
|
|
2799
|
+
]
|
|
2800
|
+
}),
|
|
2801
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(RouteCard, {
|
|
2802
|
+
title: props.t("reviewTimeout"),
|
|
2803
|
+
summary: timeoutSummary,
|
|
2804
|
+
hint: props.t("reviewTimeoutHelp"),
|
|
2805
|
+
icon: "autoReview",
|
|
2806
|
+
open: open === "timeout",
|
|
2807
|
+
onToggle: () => {
|
|
2808
|
+
toggle("timeout");
|
|
2809
|
+
},
|
|
2810
|
+
children: [
|
|
2811
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
2812
|
+
className: ModelSwitchSettings_module_css_default.hint,
|
|
2813
|
+
children: props.t("reviewTimeoutScope")
|
|
2814
|
+
}),
|
|
2815
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
2816
|
+
className: ModelSwitchSettings_module_css_default.formGrid,
|
|
2817
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
|
|
2818
|
+
className: ModelSwitchSettings_module_css_default.field,
|
|
2819
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
2820
|
+
className: ModelSwitchSettings_module_css_default.fieldLabel,
|
|
2821
|
+
children: props.t("reviewTimeoutSeconds")
|
|
2822
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
2823
|
+
className: ModelSwitchSettings_module_css_default.input,
|
|
2824
|
+
type: "number",
|
|
2825
|
+
min: 1,
|
|
2826
|
+
max: Math.round(UPSTREAM_MAX_IDLE_TIMEOUT_MS / 1e3),
|
|
2827
|
+
step: 1,
|
|
2828
|
+
disabled: busy !== void 0 || !timeoutWritable || timeoutCancelled,
|
|
2829
|
+
value: timeoutSeconds ?? "",
|
|
2830
|
+
placeholder: props.t("reviewTimeoutPlaceholder"),
|
|
2831
|
+
onChange: (event) => {
|
|
2832
|
+
setTimeoutDraft(event.target.value);
|
|
2833
|
+
}
|
|
2834
|
+
})]
|
|
2835
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
|
|
2836
|
+
className: ModelSwitchSettings_module_css_default.field,
|
|
2837
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
2838
|
+
className: ModelSwitchSettings_module_css_default.fieldLabel,
|
|
2839
|
+
children: props.t("reviewTimeoutCancelLabel")
|
|
2840
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
2841
|
+
style: {
|
|
2842
|
+
display: "flex",
|
|
2843
|
+
alignItems: "center",
|
|
2844
|
+
gap: 6
|
|
2845
|
+
},
|
|
2846
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
2847
|
+
type: "checkbox",
|
|
2848
|
+
checked: timeoutCancelled,
|
|
2849
|
+
disabled: busy !== void 0 || !timeoutWritable,
|
|
2850
|
+
onChange: (event) => {
|
|
2851
|
+
if (event.target.checked) {
|
|
2852
|
+
setTimeoutDraft(void 0);
|
|
2853
|
+
run("timeout", () => props.saveReviewTimeout(0));
|
|
2854
|
+
} else run("timeout", () => props.saveReviewTimeout(void 0));
|
|
2855
|
+
}
|
|
2856
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
2857
|
+
className: ModelSwitchSettings_module_css_default.hint,
|
|
2858
|
+
children: props.t("reviewTimeoutCancelHint")
|
|
2859
|
+
})]
|
|
2860
|
+
})]
|
|
2861
|
+
})]
|
|
2862
|
+
}),
|
|
2863
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
2864
|
+
className: ModelSwitchSettings_module_css_default.formGrid,
|
|
2865
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
2866
|
+
type: "button",
|
|
2867
|
+
className: cx(ModelSwitchSettings_module_css_default.button, ModelSwitchSettings_module_css_default.secondaryButton),
|
|
2868
|
+
disabled: busy !== void 0 || !timeoutWritable,
|
|
2869
|
+
onClick: saveTimeout,
|
|
2870
|
+
children: props.t("reviewTimeoutSave")
|
|
2871
|
+
})
|
|
2872
|
+
}),
|
|
2873
|
+
message?.route === "timeout" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
2874
|
+
className: cx(ModelSwitchSettings_module_css_default.hint, ModelSwitchSettings_module_css_default.message),
|
|
2875
|
+
children: message.text
|
|
2876
|
+
}) : null
|
|
2877
|
+
]
|
|
2878
|
+
})
|
|
2879
|
+
]
|
|
2774
2880
|
}),
|
|
2775
2881
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", {
|
|
2776
2882
|
className: ModelSwitchSettings_module_css_default.group,
|
|
@@ -3127,6 +3233,16 @@ window.__ModuleLoader__.load({
|
|
|
3127
3233
|
reviewAllowlistAvailable: "本机存在但未放行的工具:",
|
|
3128
3234
|
reviewAllowlistRepo: "仓库",
|
|
3129
3235
|
reviewAllowlistSkipped: "本 Host 进程已为纯读调用跳过 {count} 次审查。",
|
|
3236
|
+
reviewTimeout: "审查超时",
|
|
3237
|
+
reviewTimeoutDefault: "跟随 Provider 默认(300 秒)",
|
|
3238
|
+
reviewTimeoutHelp: "设置自动审查请求的流式空闲超时。留空恢复 Provider 默认值;勾选「取消超时」写入上游上限(约 24.8 天),审查将不会因空闲而超时。该值写在 Provider 配置里,改完需重启一次 DSH 才生效。",
|
|
3239
|
+
reviewTimeoutScope: "注意:该值写入审查模型所在 Provider 的 streamIdleTimeoutMs,对该 Provider 的所有调用(含主对话)生效,不只影响审查请求。",
|
|
3240
|
+
reviewTimeoutSeconds: "超时秒数",
|
|
3241
|
+
reviewTimeoutPlaceholder: "300(默认)",
|
|
3242
|
+
reviewTimeoutCancelLabel: "取消超时",
|
|
3243
|
+
reviewTimeoutCancelHint: "审查调用不再因空闲超时(写入约 24.8 天上限)",
|
|
3244
|
+
reviewTimeoutSave: "保存超时设置",
|
|
3245
|
+
reviewTimeoutCancelled: "已取消超时",
|
|
3130
3246
|
reviewAutomodeLinked: "Auto mode 已接入:审查路由 {route},直通 +{added} 个纯读工具({skipped} 条通配未同步)。",
|
|
3131
3247
|
reviewAutomodeRouteOwn: "沿用其自身配置",
|
|
3132
3248
|
reviewAutomodeRouteUnset: "未配置(沿用会话模型)",
|
|
@@ -3214,6 +3330,16 @@ window.__ModuleLoader__.load({
|
|
|
3214
3330
|
reviewAllowlistAvailable: "Present on this machine but not allowed:",
|
|
3215
3331
|
reviewAllowlistRepo: "repo",
|
|
3216
3332
|
reviewAllowlistSkipped: "This Host process has skipped the reviewer {count} times.",
|
|
3333
|
+
reviewTimeout: "Review timeout",
|
|
3334
|
+
reviewTimeoutDefault: "Follows Provider default (300 s)",
|
|
3335
|
+
reviewTimeoutHelp: "Set the streaming idle timeout for auto-review requests. Leave empty to restore the Provider default. Check \"Cancel timeout\" to write the upstream ceiling (~24.8 days) so reviews never time out on idle. The value is written into the Provider profile, so it applies after one DSH restart.",
|
|
3336
|
+
reviewTimeoutScope: "Note: this value is written to the streamIdleTimeoutMs of the Provider hosting the reviewer model and applies to every call through that Provider (main chat included), not only review requests.",
|
|
3337
|
+
reviewTimeoutSeconds: "Timeout (seconds)",
|
|
3338
|
+
reviewTimeoutPlaceholder: "300 (default)",
|
|
3339
|
+
reviewTimeoutCancelLabel: "Cancel timeout",
|
|
3340
|
+
reviewTimeoutCancelHint: "Reviews never time out on idle (writes ~24.8-day ceiling)",
|
|
3341
|
+
reviewTimeoutSave: "Save timeout",
|
|
3342
|
+
reviewTimeoutCancelled: "Timeout cancelled",
|
|
3217
3343
|
reviewAutomodeLinked: "Auto mode linked: reviewer route {route}, passes +{added} read-only tools ({skipped} pattern entries not synced).",
|
|
3218
3344
|
reviewAutomodeRouteOwn: "its own settings",
|
|
3219
3345
|
reviewAutomodeRouteUnset: "unset (follows the session model)",
|
|
@@ -5892,6 +6018,16 @@ window.__ModuleLoader__.load({
|
|
|
5892
6018
|
value: [...tools]
|
|
5893
6019
|
}])) throw new Error("settings-rejected");
|
|
5894
6020
|
},
|
|
6021
|
+
saveReviewTimeout: async (value) => {
|
|
6022
|
+
if (!await owned.mutate([value === void 0 ? {
|
|
6023
|
+
op: "unset",
|
|
6024
|
+
path: ["autoReviewTimeoutMs"]
|
|
6025
|
+
} : {
|
|
6026
|
+
op: "set",
|
|
6027
|
+
path: ["autoReviewTimeoutMs"],
|
|
6028
|
+
value
|
|
6029
|
+
}])) throw new Error("settings-rejected");
|
|
6030
|
+
},
|
|
5895
6031
|
...connectionRpc === void 0 ? {} : { scanTools: async () => {
|
|
5896
6032
|
const response = await callPluginRpc(connectionRpc, "plugin-rpc/model-switch", "tools", {});
|
|
5897
6033
|
if (!response.ok || response.value === void 0) throw new Error(t("reviewAllowlistScanFailed"));
|