Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Show total context tokens in use in the usage popover

未关闭 适合新手
#5,088 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 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 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

github/app 的其他 Issue

查看 github/app 的全部 Issue

相似的 Issue

更多 Desktop Dev Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。