kimicode: session discovery fixes + subscription quota in menubar#799
Open
iamtoruk wants to merge 2 commits into
Open
kimicode: session discovery fixes + subscription quota in menubar#799iamtoruk wants to merge 2 commits into
iamtoruk wants to merge 2 commits into
Conversation
added 2 commits
July 23, 2026 21:31
- Resolve k3/k3-agent/k2d6-agent model aliases to canonical Kimi names - Discover sessions across all Kimi Code homes (CLI + desktop runtime) - Accept conv-*/ctitle-* session directory naming, not just session_* - Add Kimi Code provider tab with brand color to the menubar - Show short model names (Kimi K3, Kimi K2.6) in the menubar payload
Read ~/.kimi-code credentials directly and poll api.kimi.com /coding/v1/usages for the weekly quota and rate-limit windows, mirroring the existing Codex/Claude quota services. - New KimiSubscriptionService with lenient decoding (string/number values, enum-style time units, derived used from remaining) and 429 backoff - Quota chip on the Kimi Code tab, Plan insight, and a Kimi tab in Settings with connect/disconnect - Independent refresh cadence anchor so Kimi-only setups don't poll on every payload tick - Expired tokens surface as terminal with automatic recovery once the CLI refreshes the credential file - Keep insights visible for quota-capable providers on empty days - Widen Settings so six tabs don't collapse into the overflow menu
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.
What
Kimi Code session visibility (CLI/dashboard)
k3/k3-agent/k2d6-agentmodel aliases to canonical names (Kimi K3,Kimi K2.6) so sessions stop showing raw aliases~/.kimi-code+ desktop runtime), not just the firstconv-*/ctitle-*session directory naming alongsidesession_*Kimi Code subscription quota (menubar)
KimiSubscriptionService: reads~/.kimi-code/credentials/kimi-code.jsondirectly (no keychain copy) and pollsGET https://api.kimi.com/coding/v1/usages, mirroring the existing Codex/Claude quota servicesTIME_UNIT_MINUTE300 → 5-hour),usedderived fromremainingwhen absent, ISO-8601 or epoch reset timesRetry-After; expired tokens (15-min lifetime, CLI-owned refresh) surface as terminal with automatic recovery on the next tick after the CLI renews themTests
KimiUsageParsingTestsfixtures, including one captured from the live API responseNotes