Repository navigation
feat: 按当前聊天查看完整用量统计 - #467
Merged
Merged
Conversation
…ii/chat-read-state-api
…ii/completion-notifications
…ii/chat-read-state-api
This was referenced Oct 21, 2026
Qiyuanqiii
force-pushed
the
Qiyuanqiii/chat-read-state-api
branch
5 times, most recently
from
October 23, 2026 16:58
ff3e125 to
25508fe
Compare
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、模型分布、趋势、活动和本地费用。时间范围独立选择,默认仍为所有聊天、近 30 天;未选择聊天时禁用当前聊天选项。
GET /usage增加可选thread_id,模型回执与费用结算都按聊天绑定的运行记录过滤。保留已有的辅助调用、压缩、缓存覆盖及未定价统计;不存在或已删除聊天返回 404。前端缓存按聊天隔离,切换期间的迟到响应不会覆盖新范围。依赖 #454。
验证
真实截图
变更前,同一批记录只有全局用量:
变更后,当前聊天 A 的跨 Run 用量:
720px 当前聊天 B: