Skip to content

v0.2.0 - Rate-limit badges & professional Unicode glyphs

Choose a tag to compare

@engrtarun engrtarun released this 22 Oct 15:11
· 17 commits to main since this release

What's new

Professional Unicode badges instead of emoji

  • ✅ / ✔️ [N] → ● / ● [N] — pure text glyphs (U+25CF) that render monochrome and identical in every terminal and font, no color-emoji dependency.
  • Legacy ✅ / ✔️ [N] / ⭐ names from v0.1.0 are still recognized and cleaned up on the first refresh.

Rate-limit visibility (the headline feature)

  • A model hitting a rate/usage limit (HTTP 429) sets session status to retry — the model now earns a ↻ badge while OpenCode backs off (previously it misleadingly kept the running badge).
  • When the retry policy gives up, the model keeps ✕ until the provider-provided reset epoch (retry-after), capped at 24 h — with a 10-minute default window when no timing is provided.
  • Badge priority stays sane: actually-running sessions always win (● [3] > ↻ > ✕).

Under the hood

  • New tunable constants: RETRY_MARK_DEFAULT_MS, RETRY_MARK_MAX_MS.
  • Deletion cleanup extended to the new retry/exhausted state (no leaks).
  • Debug log now prints running=[...] retry=[...] exhausted=[...].

Install/upgrade: same single-file plugin — copy index.ts + package.json into ~/.config/opencode/plugins/model-badges/ and touch opencode.jsonc (or restart).