feat(desktop): official quota chip on the status bar - #93285
Conversation
Add a script-friendly quota command that reuses fetch_account_usage() for Codex, Claude, OpenRouter, and Nous. Surface the same snapshot as a one-line summary on hermes auth status and hermes status --all. Providers without a public quota API (including SuperGrok) report unsupported instead of a guessed number. Failures stay unavailable and do not crash status output. Closes NousResearch#33094
Add GET /api/account-usage and a compact left-status-bar chip that shows remaining Codex / Claude / OpenRouter / Nous windows. Cache is five minutes, the render path does no network I/O, and a failed fetch hides the chip. Depends on the hermes usage helper from the previous commit. SuperGrok stays unsupported — xAI does not publish a quota API.
Overall: well-structured feature — clean separation between fetch (
Minor: |
Give _format_reset an include_local flag instead of splitting prose. Print an explicit empty-install message instead of only Grok unsupported. Show Claude and OpenRouter usage on hermes status --all and prefetch those official windows in parallel.
Slow the chip to 30 minutes when no official windows are available so a logged-out desktop does not fan out four quota APIs every 5 minutes. Render tooltip resets as relative time, and document that /api/account-usage uses the same /api/ auth gate as analytics.
Follow-up — comentários de revisãoOs pontos de revisão foram incorporados no HEAD atual ( A validação Python compartilhada do recurso passou no PR dependente #93282: 28 testes focados passaram. A suíte desktop completa ainda depende das dependências Node deste checkout. |
Summary
Depends on #93282. Review the latest commit after that CLI PR; this one only adds the desktop surface.
GET /api/account-usage— same official snapshot ashermes usageCodex 0% · Claude 8%Test plan
python3 -m pytest tests/hermes_cli/test_usage_cmd.py tests/agent/test_account_usage.py tests/hermes_cli/test_status.py -q(28 passed)formatQuotaChip