yuez
61c50280b1
feat: add OpenCode Go usage query with aggregated /all endpoint, bump v0.3.0
...
- New provider: OpenCode Go (GET https://opencode.ai/zen/go/v1/usage , Bearer auth)
- Extract shared transport doUpstreamRequest (host.http.do first, net/http fallback)
- New management routes: GET/POST /plugins/commandcode/opencode/usage, GET/POST /plugins/commandcode/all
- /all aggregates both providers sequentially with partial-failure semantics
(>=1 success -> 200, all-local-missing -> 400, all-upstream-failure -> 502)
- QuotaCard UI: tabs (Command Code / OpenCode Go / All), OpenCode window cards,
version badge v0.3.0, OpenCode API key test override in settings drawer
- Config: opencode_api_key / opencode_api_base (ConfigFields 2 -> 4)
- Tests: route-order regression, /all partial failure & misclassification guards,
ParseOpenCodeUsage edge cases, host/http transport paths
2026-09-18 09:38:40 +08:00
yuez
688a7f395f
feat: derive monthly (billing period) usage window
...
- Add FetchUsageSummaryRaw calling /internal/usage/summary which returns
billing-period totals (periodBasis=billing-period)
- Derive monthly window: used=totalMonthlyCredits, cap=totalMonthlyCredits
+ monthlyCredits remaining (≈ plan monthly total), remaining=monthlyCredits
- Add monthly card to quota resource page (HTML + JS rendering)
- Skip monthly card when summary unavailable
2026-09-04 14:13:08 +08:00