steipete/CodexBar

Add Zed token spend and plan limits to integration

開放

#1,995 建立於 2026年7月8日

 (2 則留言) (2 個反應) (0 位負責人)Swift (945 個分叉)batch import
P2clawsweeper:fix-shape-clearclawsweeper:needs-maintainer-reviewclawsweeper:needs-product-decisionclawsweeper:no-new-fix-prhelp wantedimpact:auth-providerissue-rating: 🌊 off-meta tidepool

倉庫指標

星標
 (12,194 顆星)
PR 合併指標
 (平均合併 1天 15小時) (30 天內合併 323 個 PR)

描述

Summary

Please expand the Zed integration to include token spend information and plan limits, so usage can be tracked without opening the Zed account page.

Motivation

CodexBar is great for quick usage visibility across providers. Adding Zed token spend + limits would make Zed usage equally visible in the menu bar and help avoid unexpected overages.

Reference

Zed pricing/plans docs: https://zed.dev/docs/account/plans-and-pricing

Requested behaviour

  • Show Zed Token Spend in CodexBar.
  • Show Zed limit/quota (where available from Zed data source).
  • Show remaining amount (limit - spend), if both values are available.
  • If limit data is unavailable, still show spend and a clear “limit unavailable” state.

Suggested UI

  • In the Zed section, display:
    • Spent
    • Limit
    • Remaining
    • Billing/usage period (if available)

Implementation notes (suggestion)

  • Add a typed model for Zed usage fields (spent, limit, remaining, period).
  • Keep parsing resilient to missing/partial fields.
  • Add tests for:
    • successful parsing
    • missing limit
    • malformed payload fallback
    • remaining calculation

Acceptance criteria

  • Zed spend appears in CodexBar.
  • Zed limit appears when available.
  • Remaining is correct when spend + limit exist.
  • No crash on incomplete data.
  • Tests cover parser and value-calculation paths.

貢獻者指南