Show total context tokens in use in the usage popover
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 75/100
- Issue 类型
- 功能
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- typescript
- 领域
- desktop
调研方向
首先找到使用情况弹出窗口中的 Context 部分,并追踪它如何读取运行时上下文数据。Issue 指出了 session.rpc.metadata.contextInfo() 及其 totalTokens 字段;将该总数与现有百分比一同显示。完成标准是该部分同时显示正在使用的 token 总数和百分比。
由索引模型根据 Issue 内容生成。
描述
Description
The usage popover's Context section shows the percentage of the window and a per-category breakdown (System prompt, System tools, MCP tools, Messages, Free space, Buffer). There is no single number for the total context currently in use, so I have to add up the four categories manually every time.
Why it matters
I rely on this number constantly: response quality drops once context goes past ~150K tokens, and I need to know when that happens. The percentage alone isn't enough, since it depends on the model's window size, which varies.
Proposal
In the Context section, show the total in tokens (System prompt + System tools + MCP tools + Messages), e.g. "60.3K in use (6%)".
Technical notes
The data already exists in the runtime: session.rpc.metadata.contextInfo() returns totalTokens (sum of system, conversation, and tool definition tokens). It only needs to be displayed in the UI.
- 主要语言
- 没有语言数据
- 星标
- 2.2k
- 派生
- 198
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
github/app 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 65/100
-
难度 2/5 1-3 小时 新手友好度 65/100
-
难度 2/5 1-3 小时 新手友好度 70/100
-
难度 2/5 1-3 小时 新手友好度 66/100
-
难度 2/5 1-3 小时 新手友好度 68/100
相似的 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 77/100
farion1231/cc-switch#9038 · 1 条评论 ·
维护者通常 1 天内回复
-
Regression: IME preedit still shown in plaintext on lock/polkit — #13002 fix is not in 4.0.6可能已有人在做 @AnPod 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 79/100
jbaruch/speaker-toolkit#517 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
anomalyco/opencode#60121 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 62/100
维护者通常 1 天内回复