Repository navigation
zai-widget v0.5.0 — weekly quota + V3 credits API
Z.ai changed the quota payload for credit-based coding plans: /api/monitor/usage/quota/limit now returns CREDIT_LIMIT rows (usage/currentValue/remaining/number) alongside the legacy TOKENS_LIMIT rows, and the weekly cap arrives as unit=6, number=1.
This release:
- Weekly quota is a first-class window: inner ring on the dial when both windows exist, own runway ETA, and a weekly row (wk 20% · 2k/10k cr · 6d 22h).
- Weekly-only plans (no active 5-hour window) use the weekly window as the dial.
- Both payload generations parse; percentage is derived from currentValue/usage when absent, total from used+remaining when usage is missing.
- Empty data:{} (fresh account, no active window) renders 'no quota window' instead of an error.
- Plan tier (lite/pro/max) from data.level, reset packs tolerate alternate field spellings.
- Cached readings migrate from the old flat cache keys.
Verified: 22 unit tests, lint, assembleDebug. Sideload the APK below.