feat: display Extra Usage fuel pack balance in /usage and /status#1501
Conversation
- Update changeset to cover both kimi-code and kimi-code-sdk packages - Add parser clamp tests and toolkit null-case test - Replace 'as never' casts in usage-panel tests - Wrap long import line in status-panel
🦋 Changeset detectedLatest commit: 94867bc The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
commit: |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a742241c9c
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ce260d66f4
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Related Issue
No linked issue. The platform
/usagesendpoint added aboosterWalletfield representing the prepaid "fuel pack" (加油包) balance, and users need visibility into that balance from the TUI.Problem
The TUI
/usageand/statuscommands already show session token usage, context window utilization, and Plan usage from/usages, but the newboosterWalletbalance was ignored. Users could not see how much Extra Usage they had remaining.What changed
packages/oauth/src/managed-usage.tsto parseboosterWallet.balance(typeBALANCE_BOOSTER) into aUsageRowwithused = amount - amountLeftandlimit = amount, handling string amounts and clampingusedto[0, amount].extraUsagefield throughAuthManagedUsageResult./usagepanel (usage-panel.ts) and/statuspanel (status-panel.ts), reusing the existing Plan usage progress-bar visual language.extraUsagethroughapps/kimi-code/src/tui/commands/info.ts.Checklist
gen-changesetsskill, or this PR needs no changeset.gen-docsskill, or this PR needs no doc update.