fix(panel): correct session-accounting label, mark tokensCompressed cumulative - #182
Conversation
A block the host explicitly decompressed (expanded) was unconditionally re-activated by syncBlocks on the next turn (client re-sends full history -> summary/raw ids present -> active=true), silently re-folding the already-restored messages. Record the expand intent on the block (expanded?: boolean, host-set) and skip re-activation for it in syncBlocks. Blocks deactivated by other means (orphan GC, tier distillation, consumed-by-parent) keep the legacy resurrection behavior.
…d cumulative The 'never shrinks' claim on the session-accounting line was false: the host-reported value really does drop after a compress (summaries replace the pruned originals in the window). Relabel it as 'shrinks slower than the sent view' (it still includes the compressed originals, so it lags the sent view). Mark the Blocks 'tokens compressed' figure as cumulative so it no longer reads as a contradiction next to the current Session-only number. Fixes ranxianglei/billion-context-pi#267 (panel copy items).
📦 Built Package ArtifactBranch: Option A — Install from npm PR tag (recommended)In your adapter project: npm install acp-kernel@pr-182Each push to this PR publishes a new version under the Option B — Download artifact
tar xzf acp-kernel-pr182.tgz
npm install ./packageThis comment is automatically updated on each push. |
[bot] 🏷 Reviewed PR #182 (branch Panel copy fix (
Sync fix (
Logic is sound and backward-compatible (non-expanded blocks keep the legacy resurrection), and
Formatting — I won't merge (human-only). Once the sync-fix scope is confirmed and the description covers it, this is ready for you to merge. |
Review 结论:✅ 通过,可合并
发布顺序(bcp #268 依赖):本 PR 合并 → npm 发版( |
[bot] 🏷 收到,谢谢审核。我的独立复核与你的结论一致:
一点提醒(不阻塞): 按规则我不能执行 merge(仅人工操作)。请自行合并本 PR(branch 发布顺序我这边理解一致:合并本 PR → CI 自动打 tag 并发 npm → 合并后若要我帮忙核对发布版本、或去 bcp 确认 |
|
冲突了 |
Resolve buildStatusPanel doc-comment conflict in src/panel/panel.ts: keep our corrected session-accounting wording (bullet 1: shrinks slower than the sent view) alongside master's countTokens-scale labels (bullets 2-3). typecheck/test(582 pass)/build all green.
[bot] 🏷 冲突已解决并推送,分支 冲突根因:master 已从 v0.0.48 前进到 v0.0.55(其间合了 #183–#206),与本 PR 在 冲突点: 解法:两者合并保留——第 1 条用本 PR 的修正措辞,第 2、3 条用 master 的 countTokens 标尺。语义一致,无信息丢失。 验证(合并后整树重跑):typecheck 干净、 现在该分支与 master 无冲突、可合并。请你自行 merge(我按规则不代合)。合并后 CI 自动发 npm,再走 bcp #268 升级引用即可。 |
Fixes the panel copy items from ranxianglei/billion-context-pi#267.
Session-accounting label: "never shrinks" was false
The
Context (session accounting, host footer scale)line claimed the number "never shrinks; includes compressed originals". Measured in a real session, the host-reported value really does drop after a compress (summaries replace the pruned originals in the window) — e.g. a T2 distillation took it from 55.5k to 48.4k.Relabeled to
includes compressed originals; shrinks slower than the sent view: it still carries the compressed originals, so it lags the sent view, but it is not append-only. Doc comments onStatusPanelInput.tokenCountandbuildStatusPanelupdated to match.Blocks figure marked cumulative
Blocks: N active / M total (X tokens compressed)—state.stats.tokensCompressedis the cumulative historical total, which read as a contradiction next to the currentSession-onlynumber. Now labeledtokens compressed, cumulative.Tests
tests/panel.test.tsassertions updated for both labels. Full suite: 568 pass.Note for the bcp side: after this lands and is published to npm, billion-context-pi should bump its pinned
acp-kernelto the new version (see ranxianglei/billion-context-pi#268).