Releases: Two-Weeks-Team/opencode-status-hud
Releases · Two-Weeks-Team/opencode-status-hud
v0.1.3 — Live provider switching
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.jsonreader — New cross-platform utility reads credentials from OpenCode's data directory (~/.local/share/opencode/auth.json) as the highest priority auth source - Cross-platform support —
XDG_DATA_HOME→LOCALAPPDATA(Windows) →~/.local/sharefallback chain - Provider-first resolution —
resolveProviderKeynow trustsproviderIDovermodelIDheuristics, preventing OpenRouter+Claude from incorrectly matching Anthropic - Force refresh on switch —
chat.paramshook detects provider/model changes and triggers immediate usage data re-fetch
Auth Priority (Anthropic)
- OpenCode
auth.json← NEW, highest priority - macOS Keychain
~/.claude/.credentials.json- Environment variables
- Session key files
Auth Priority (OpenAI)
- OpenCode
auth.json← NEW, highest priority - Codex
auth.json(~/.codex/auth.json)
Full Changelog: v0.1.2...v0.1.3
v0.1.2
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 resilience —
authResolver()moved inside try block;.catch()added to tick chains so polling never stops permanently - Cache merge —
fromJSON()now merges viaupsertSample()instead of wiping in-memory data - Prompt leak — Prompt channel emissions suppressed when
usageDisplayis output-only (default) - Coexistence safety —
promptClientdispatch wrapped in try/catch - Env validation — Invalid env var values now log a warning instead of silently returning null
- Disk cache — Added
saveCounterfor 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