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.

贡献者指南