Skip to content

Releases: Two-Weeks-Team/opencode-status-hud

v0.1.3 — Live provider switching

04 Mar 06:13

Choose a tag to compare

What's Changed

Fix: Live provider account switching

When users /connect to a different provider account, the HUD now immediately reflects the new account's real API usage data instead of showing stale credentials from the previous account.

Changes

  • OpenCode auth.json reader — New cross-platform utility reads credentials from OpenCode's data directory (~/.local/share/opencode/auth.json) as the highest priority auth source
  • Cross-platform supportXDG_DATA_HOMELOCALAPPDATA (Windows) → ~/.local/share fallback chain
  • Provider-first resolutionresolveProviderKey now trusts providerID over modelID heuristics, preventing OpenRouter+Claude from incorrectly matching Anthropic
  • Force refresh on switchchat.params hook detects provider/model changes and triggers immediate usage data re-fetch

Auth Priority (Anthropic)

  1. OpenCode auth.json ← NEW, highest priority
  2. macOS Keychain
  3. ~/.claude/.credentials.json
  4. Environment variables
  5. Session key files

Auth Priority (OpenAI)

  1. OpenCode auth.json ← NEW, highest priority
  2. Codex auth.json (~/.codex/auth.json)

Full Changelog: v0.1.2...v0.1.3

v0.1.2

25 Feb 08:23

Choose a tag to compare

Post-release hardening (PR #75, #76, #77)

Fixes

  • Hook safety — All 4 plugin hook handlers wrapped in try/catch to prevent host CLI crashes
  • Polling resilienceauthResolver() moved inside try block; .catch() added to tick chains so polling never stops permanently
  • Cache mergefromJSON() now merges via upsertSample() instead of wiping in-memory data
  • Prompt leak — Prompt channel emissions suppressed when usageDisplay is output-only (default)
  • Coexistence safetypromptClient dispatch wrapped in try/catch
  • Env validation — Invalid env var values now log a warning instead of silently returning null
  • Disk cache — Added saveCounter for unique tmp paths, preventing concurrent write collision

Docs

  • Removed all toast/showToast code and 18 planning documents (−2,801 lines)
  • Rewrote README.md with accurate HUD format table
  • Fixed stale "toast-only" reference in CONFIG_DEFAULTS.md

CI

  • Publish workflow now idempotent for pre-bumped versions

Full Changelog: v0.1.1...v0.1.2