Repository navigation
feat(web): quick-config controls on the config page (#1748) - #1784
Conversation
📦 Built Package ArtifactBranch: Option A — Install this exact build (recommended)npm install -g billion-context@0.0.1789-pr.1784.a626d95This exact version is immutable and reproducible. The rolling Option B — Download artifact
tar xzf billion-context-pr1784.tgz
npm install -g packageInstall instructions are refreshed on each push. |
[bot] 🏷 Reviewing PR #1784 (feat(web): quick-config controls, #1748) now. Plan: pull the branch, verify the code against the original issue's direction, walk the regression surface of |
[bot] 🏷 ## Review 结论 — PR #1784 (feat(web): quick-config controls, #1748) 核验事实
1. 是什么问题 2. 什么原因导致的 3. 怎么修复的 4. 是否有回归问题
5. 是否破坏缓存 6. 是否改了设计方向 7. 是否引入了新的配置 判定:修复后可合。建议作者先修主问题(stale-draft 覆盖,小改动,nits 可顺手同轮处理);若 owner 明确接受该取舍,则现状可合。与 #1752 的关系待 owner 裁决。合并操作由人执行。 |
|
Pre-merge blocker (stale-draft overwrite) fixed in commit
Pre-flight on the head: typecheck ✓, build ✓, web tests 21/21 ✓. Manual A/B to confirm: config page → hand-type Sandboxed preview: http://127.0.0.1:39003/__bili/#/config (hard-refresh Ctrl/Cmd+Shift+R). |
[bot] 🏷 ## Review 第 2 轮 — 核验事实
1. 是什么问题:验证第 1 轮的 pre-merge blocker(stale-draft 覆盖:手工编辑 JSON 后碰任何 quick 控件会被静默覆盖)。 2. 什么原因导致的:根因同第 1 轮——单一 draft 只在页面加载时解析一次,后续 mutation 都改这个陈旧对象再整体序列化。本次从机制上消除:改为「mutation 前即时重解析编辑器 → 改新对象 → 再序列化」。 3. 怎么修复的: 4. 是否有回归问题:
5. 是否破坏缓存:不涉及。 6. 是否改了设计方向:无。#1752 的关系仍待你拍板(本 PR 高频子集卡片 vs #1752 全量详细表单,同一 issue 不能长期并存)。 7. 是否引入了新的配置:无——本 commit 仅新增一对 i18n 键( 判定:pre-merge blocker 已关闭,可合(R1–R3 可留作 follow-up;若希望我现在直接把 R1/R3 打到 PR 分支上,说一声即可)。合并操作由人执行。 |
Summary (#1748)
Quick-config card above the raw JSON editor on the config page: controlled widgets for high-frequency fields. Single draft model — controls edit an in-memory draft and serialize live back into
#cfg-file-edit; the single Save reuses the existingPUT /__bili/config {file}full-file channel; all controls disable when the file is unparseable. Pure frontend change (src/web/page.ts,src/web/client.ts,src/web/i18n.ts); no wire/message-shape, persistence, or config-schema change.Config surface: none
Only EXISTING FileConfig fields are exposed — zero new sections/keys/semantics:
debug,passthrough(top-level bool toggles)compress.promptPack(select: default / lean / unknown values pass through; picking default deletes the key instead of writing it)compress.nudgeGrowthTokens(number, ±5000 steppers; warning lines below 20000 / above 100000; value == 50000 deletes the key to keep the file clean)compress.preserveRecentMessages(prefilled with kernel default 5; ==5 or cleared deletes the key)protectedTools(comma-separated,*globs, e.g.skill,skill_*; empty deletes the key)mitm.domains(comma-separated; clearing removes the wholemitmblock)The
ccrfield is deliberately NOT exposed (immature feature, off by default — still editable via advanced JSON). All "default" states delete keys rather than writing equivalent values, so the on-disk file stays minimal.Token-cost copy is MEASURED, not estimated (local sglang, qwen tokenizer,
usage.prompt_tokens): defaultPrompts 12024 chars = 2855 tok; leanPack full surface 6279 chars = 1403 tok; shared base tool descriptions 1356 chars = 298 tok. UI shows "≈2,900+" / "≈1,400".Pre-flight (rebased onto origin/master @ 023b851)
npm run typecheck✓ (requirednpm cifirst: working tree had acp-kernel 0.0.98 vs pin 0.0.99)npm teston the rebased head: every suite GREEN except the dsh-native attach-mode cluster (native attach 模式无运行时 respawn:共享代理的属主退出后,attach 方全部模型请求永久硬失败 #1130/bug: dsh-native — attach 目标瞬时不可达 → 回退 spawn 第二实例:routed baseURL 下工具/模型通道必然脑裂(工具 404 → preflight 502 → 会话不可自愈) #1365): 6 timeout-class failures (~5s each) under parallel load; the file then stalls standalone too (no output in 180s, stale workers cleared first) on this high-load dev host. Static check: this diff touches onlysrc/web/*with zero import overlap into that path -> unrelated; tracked in [tests] dsh-native attach-mode cluster (#1130/#1365) times out / stalls on dev host (suspected environmental) #1785.npm run build✓; web-i18n bidirectional key check 21/21 ✓feat:— human merge per repo convention. Fixes #1748