mirror of
https://github.com/MoonshotAI/kimi-code.git
synced 2026-08-03 13:34:56 +00:00
* feat(oauth): return structured managed usage rows
Stop formatting plan-usage labels and reset hints into English strings
at the oauth layer. The parser still absorbs backend field drift, but
now emits a stable structured row (name / window{duration,unit} / used
/ limit / resetAt) that kap-server passes through and clients localize
themselves:
- window: normalized from duration/timeUnit (minute/hour/day/week),
whole-hour minute windows fold to hours, unnamed summaries are the
weekly limit
- resetAt: absolute ISO timestamp; relative reset_in/ttl seconds are
converted at parse time
- TUI /usage panel formats labels and reset hints locally
* refactor(oauth): parse managed usage strictly to the current payload shape
Drop the defensive drift tolerance (alternate reset-time spellings,
reset_in/ttl seconds, remaining-derived used, title/scope names,
top-level duration/timeUnit, fuzzy time-unit matching) and parse only
what the platform actually sends: numeric strings, resetTime, nested
detail/window records, TIME_UNIT_* enums.
* fix(node-sdk): update managed usage smoke example and facade tests for structured rows
|
||
|---|---|---|
| .. | ||
| api-error.ts | ||
| constants.ts | ||
| custom-registry.ts | ||
| errors.ts | ||
| identity.ts | ||
| index.ts | ||
| managed-feedback-upload.ts | ||
| managed-feedback.ts | ||
| managed-kimi-code.ts | ||
| managed-usage.ts | ||
| model-alias-merge.ts | ||
| oauth-manager.ts | ||
| oauth.ts | ||
| open-platform.ts | ||
| refreshProviderModels.ts | ||
| storage.ts | ||
| token-state.ts | ||
| toolkit.ts | ||
| types.ts | ||
| utils.ts | ||