You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Context (session accounting, host footer scale): 11% (96k / 869k) — includes compressed originals; shrinks slower than the sent view
Growth: +28k since last nudge
Sent to LLM (after compression, est.): 89k (10% of limit)
Session-only (compressed originals, est.): 1.7M — pruned from every request; the footer/nudge still count them
Activity
ranxianglei commentedon Oct 2, 2026
[bot] 🏷
查重结论:检索了 open+closed issues,无重复条目。相关既有功能:
/acp状态面板(pi/omp/opencode/dsh)、/acp-cache报告、Web UI 会话看板(localhost:8787)、GET /__bili/plugin/status端点。本 issue 是在这些之上的增量需求——从「按需查询」升级为「每个会话常驻可见的迷你看板」,判为独立新功能项,非重复。现状盘点(数据层已齐,不用重建):
tokensSaved+ ledgernetSaved)、缓存命中率、压缩块数/累计压缩量、nudge 状态、上下文窗口占比——即 issue 截图里的全部数据。GET /__bili/plugin/status?conversationId=…已返回结构化 JSON + 全文 panel + Web UI 深链;Web UI 本身已经是「web 类看板」(总览 + 每会话详情 + 缓存曲线),这一类基本完成。/acp或开网页。各客户端接缝核查(是否真有「常驻位置」,逐一实查过宿主 API):
ctx.ui.setStatus(key, text)——官方扩展 API,在底部状态栏设独立槽位(可传 undefined 清除);可在turn_end/agent_end/压缩事件上刷新setWidget(编辑器上/下方)放宽档statusLine设置——周期执行 shell 命令、stdout 渲染到底部状态栏;stdin JSON 带session_id(与 bili 用的x-claude-code-session-id同源)bili statuslineCLI;installer 写入 managed settings(复用 #964 机制)acp_statustool(已有)+ Web 深链「每个客户端」无法形态统一——接缝可用性不同,方案用能力矩阵覆盖:有真接缝的给真状态栏,没有的给最接近的兜底并如实记录。
推荐方案(单一数据源 + 每客户端薄渲染器,v1 不新增配置字段):
handlePluginStatus在现有字段旁增加结构化stats对象 + 预渲染分档一行:min(约 ≤60 字符):bili 11% 96k/869k · saved 1.7M · 35blk · cache 96%——上下文占比 + 累计省 token + 摘要块数 + 缓存命中,即 issue 点名的三项都在;med:+ nudge 状态 / 距上次 nudge 增长;所有客户端读同一端点,多客户端数字永不漂移。
setStatus(事件驱动刷新;旧版本宿主缺该 API 时 optional-chaining 自动降级,与现有 inert-safe 模式一致)+ claudestatusLine(bili statusline)。这两条接缝最稳、覆盖最高频 lane。待你拍板(均附我的明确建议,不是开放选择题):
setWidget(编辑器上/下,非严格右侧),其他客户端无右侧接缝——建议底部状态栏为主形态,宽区为加分项而非硬要求。拍板后我从 Phase 0 开始(PR 引用本 issue)。
ranxianglei commentedon Oct 2, 2026
你无论分几个阶段 都只有1 pr 继续
ranxianglei commentedon Oct 2, 2026
[bot] 🏷 完成 —— PR 已开:https://github.com/ranxianglei/billion-context/pull/1927(单 PR 含全部阶段,按你的拍板)。
做了什么:每个客户端在自己的最宽可用界面上看到压缩状态,且所有界面打印的都是同一条代理渲染的行(
GET /__bili/plugin/status新增stats+ 预渲染statusLine.{min,med}),客户端只负责输出,数字永不漂移。各客户端落点:
ctx.ui.setStatus("billion-context", …)(带 key 槽位,不碰其他扩展),模型回合结束(turn_end/agent_end)与压缩后刷新,会话切换同步清除(in-flight 刷新有代际守卫,不会复活旧行);没有该接缝的旧宿主静默降级bili plugin install claude写入受管statusLine条目(<node> <root>/dist/index.js statusline),新 CLI 从 stdin 拿会话 id、打印 min 行;任何错误都空行退出 0,绝不让 claude 失败;用户自己的 statusLine 安装/卸载都不碰/acp+acp_status工具 + web 深链(插件 API 无持久状态栏接缝,dsh 闭源)http://localhost:8787)即看板行格式(min 档 ≤60 字符):
bili 11% 96k/869k · saved 1.7M · 35blk · cache 96%;med 档加请求数与 nudge 进度(nudge 12k/50k);saved 有折叠后取台账净盈亏(可为负),否则本地估计带~;数据缺的段单独缺席,不出占位符。完整细节不变:/acp面板 /acp_status/ web 会话页(含缓存曲线)。与 triage 方案的偏差(如实报告):"opencode 瞬时 toast"未实现——opencode 插件 API 只有
tui.toast.show订阅侧,没有可验证的发射 API,且 2.x API 面明确不稳定(CLIENTS.md caveats),写未验证的发射调用是猜测;opencode 保留既有三件套。dsh 同理保持文档化。结构化七问:
/acp面板和 web UI 两个出口,窄界面(底部状态栏这类)没有紧凑形态,多数客户端没有任何常驻看板。omp identity register failure throttles(tests/plugin-agent.test.ts:2066)在本机高负载下偶发失败——stash 掉本 diff 在干净 master 上同样失败,属预存时序敏感测试(500ms 节流窗 vs 共享机器迭代延迟),非本 PR 引入,CI 为准。buildStatusLineStats刻意不调用会写 metadata 的getCacheLedger);wire 零改动,prefix cache、重试、去重键全部不受影响。--origin/BILI_MCP_PROXY通道);claude 受管块多一个机器自管键,走既有 [native] claude: three-mode alignment (proxy / launcher / native plugin) + runtime-info #964 never-clobber 规则。合并判定建议:可合(CI 绿后)。合并动作按规矩由你来。
feat: per-client compression status dashboard (#1920)