mirror of
https://github.com/headroomlabs-ai/headroom.git
synced 2026-08-27 14:17:10 -04:00
Adds passive tracking of GitHub Copilot per-category monthly quotas (chat, completions, premium_interactions) via GET /copilot_internal/user on api.github.com. Token discovery checks environment variables in priority order: GITHUB_COPILOT_GITHUB_TOKEN > GITHUB_TOKEN > COPILOT_GITHUB_TOKEN > GITHUB_COPILOT_API_TOKEN - headroom/subscription/copilot_quota.py: CopilotQuotaCategory, CopilotQuotaSnapshot, CopilotQuotaState, parse_copilot_quota(), discover_github_token(), _CopilotQuotaTracker singleton (60s poll) - headroom/subscription/__init__.py: export new symbols - headroom/proxy/server.py: start/stop tracker in lifecycle; _get_copilot_quota_stats(); copilot_quota key in /stats - dashboard.html: GitHub Copilot Quota panel with per-category progress bars, remaining counts, overage alerts, reset date - tests/test_copilot_quota.py: 25 unit tests (all pass) - docs/screenshots/subscription_window_active.png: updated to show all three panels (Anthropic + Codex + GitHub Copilot) Env vars sourced from @github/copilot v1.0.24 app.js (k6e array). API schema sourced from copilot_internal/user via eBo/QRt zod schemas. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> |
||
|---|---|---|
| .. | ||
| cache-ttl-dashboard-history.png | ||
| cache-ttl-dashboard-live.png | ||
| subscription_window_active.png | ||
| subscription_window_inactive.png | ||