Skip to content

feat(chat): show persistent session token usage - #792

Open
dawNotPoi wants to merge 1 commit into
xintaofei:mainfrom
dawNotPoi:feat/748-persistent-token-usage
Open

dawNotPoi wants to merge 1 commit into
xintaofei:mainfrom
dawNotPoi:feat/748-persistent-token-usage

Conversation

@dawNotPoi

@dawNotPoi dawNotPoi commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Keep current-conversation token usage visible in the composer status row.
  • Show the full breakdown in wide panels and a compact total/cache-hit summary in narrow or tiled panels.
  • Reuse the existing context/token popover, hide unavailable cache counters, and share one usage subscription across both indicators.
  • Add the short token unit to all 10 locale bundles.

Verification

  • pnpm test — 520 files, 7,776 tests passed.
  • pnpm build — production static export passed (34/34 pages).
  • pnpm eslint . and Prettier checks passed.
  • Rebased onto current main, retaining the stable composer wrapper added upstream and applying the container query only while the status row is attached.

Closes #748

@dawNotPoi
dawNotPoi force-pushed the feat/748-persistent-token-usage branch from 0d2ab84 to ccc713a Compare September 22, 2026 02:13
Add a responsive token summary to the composer status row and reuse the existing detailed usage popover. Keep usage scoped to the runtime conversation, hide unavailable counters, and share one subscription across both indicators.

Ensure the status row has a real size-container ancestor so its compact and detailed layouts respond to panel width.

Closes xintaofei#748
@dawNotPoi
dawNotPoi force-pushed the feat/748-persistent-token-usage branch from ccc713a to 227b354 Compare September 25, 2026 00:48
@dawNotPoi

Copy link
Copy Markdown
Contributor Author

@xintaofei I rebased this PR onto current main, and GitHub now shows it as mergeable. The composer keeps a persistent per-conversation token summary, with a compact layout for narrow panels and one shared usage subscription. The conflict resolution retains upstream's stable block composer wrapper and enables the size container only while the status row is attached. All 7,776 tests, the production build, ESLint, and Prettier pass locally; cross-platform CI is running. The PR description has the scope and verification details. Ready for review when convenient.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request] 在会话输入框下方常驻展示当前会话 Token 用量

1 participant