Repository navigation
fix: use reported input for completed request context usage - #469
Merged
Merged
Conversation
This was referenced Oct 22, 2026
Qiyuanqiii
added a commit
that referenced
this pull request
Oct 27, 2026
Qiyuanqiii
force-pushed
the
Qiyuanqiii/actual-context-usage
branch
from
October 27, 2026 17:48
53a4bd2 to
fd8d0f2
Compare
1 task done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
模型请求完成后,上下文指示器仍一直显示发送前的估算值。现在使用最新主请求报告的输入 Token 更新占用;请求进行中、用量未知或请求失败时保留估算。输入已包含缓存,输出不计入;分母仍明确标为应用规划窗口。按 Run 与请求标识匹配,较早请求的迟到回执不会覆盖新请求。
基于 #467,按依赖顺序审阅;不自动合并。
验证:Go 统计与 HTTP 聚焦测试、7 项 React 测试、生产构建通过。真实 Go API、SQLite 和本地兼容模型 HTTP 服务验证同一聊天:原版完成后 9,683/32,768(30%,估算),新版为 6,400/32,768(20%,报告输入);下一请求先显示新估算,完成后自动更新。累计输入保持正确,缓存没有重复累加。实际页面覆盖 Windows Chrome。
变更前
变更后
完整验收、进行中与第二次完成截图