MoonshotAI / MoonshotAI/kimi-code
feat(web): add a usage limits popup panel to the composer
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 7.5k
- Forks
- 1.2k
- Avg merge
- 11h 53m
- Merged PRs (30d)
- 350
Description
What feature would you like to see?
Motivation
Kimi Web currently exposes conversation context usage through the composer meter, but users cannot see their account limits without leaving the chat and checking the Kimi Code console. This makes it easy to approach a rolling or weekly limit without noticing.
Proposed behavior
Make the context usage meter clickable and open a compact usage limits popup panel that shows:
- Conversation context usage, including used tokens, maximum tokens, and percentage
- Weekly usage limit
- Rolling-window usage limits, such as the 5-hour window
- Localized reset times
- Booster balance and monthly usage/limit when available
The popup should refresh when opened and periodically while visible. It should display localized sign-in, unavailable, and empty states, and be accessible by keyboard.
Account limits should only be requested for the managed Kimi Code OAuth provider. Other providers should retain the existing context meter without the account-limit section.
The popup should close when another composer popup opens so the controls never overlap. It should also degrade gracefully when connected to an older backend that does not expose usage data.
Additional information
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the web composer’s existing context usage meter and inspect how composer popups open and close. Trace the managed Kimi Code OAuth usage-data path before defining the panel states, refresh behavior, localization, keyboard access, and older-backend fallback; done means the requested limits appear only for that provider without overlapping other popups.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100