feat(chat): Clarify token usage in chat header (tooltip + task & project total)#1501
Conversation
16.03.2026_17.20.44_REC.mp4 |
|
Hi, @Wendong-Fan @Pakchoioioi |
|
Thanks @dataCenter430 for contribution. could @fengju0213 @a7m-1st help review it? |
|
thanks @dataCenter430 the code logic looks good to me,but for user experience,shouldn we use a more intuitive way of expressing it? |
What do you prefer? Once you clarify it, I will implement it right away. |
|
Hi @dataCenter430, yes — I think there are a few changes that would make it more user-friendly and easier to follow. I’ll put together a spec today and send it over tomorrow. |
Thanks for your review. Please do it. 👍 |
|
Hi, @Douglasymlai |
|
Hi @dataCenter430, sorry for the delay. I’ve put together a specification for a few changes that I think will improve the UX of these feature. I’ve written the detailed plan in the markdown file, and included the related materials in the zip file. I usually share design files with developers in the community using a tool called Pencil. You can find the VS Code plugin: https://www.pencil.dev/. It connects easily with Claude Code or Codex, which should help with reviewing the UI design in more detail. token-counting-design-spec.md Thanks for your contribution. You can tag me for review after the change as been made. I will push the team for faster code formate review and merging to the main branch. |
|
Hi, @Douglasymlai thanks for the clarification. |
|
Hi, @Douglasymlai Also I've implemented the translations for that. |



Related Issue
Closes #1441
Description
Improves the chat header token display so "Chat #0" is clearly understood as token usage and supports both task and project-level counts.
Changes
# 0) now shows a tooltip on hover with the label "Token usage" and a short explanation.cursor-helpandtoLocaleString()for readable numbers.Technical details
HeaderBox: added optionaltotalTokensprop and wrapped token value inTooltipSimple.ChatBox: passestotalTokensfromprojectStore.getProjectTotalTokens(activeProjectId).chat.token-usage,chat.token-usage-this-task,chat.token-usage-project-total.Testing Evidence (REQUIRED)
What is the purpose of this pull request?
Contribution Guidelines Acknowledgement