Commit Graph

16 Commits

Author SHA1 Message Date
Akshay Prabhu 05a7a449f0 Add OpenCode Go usage API support (#2879)
* Add OpenCode Go usage API support

* Preserve OpenCode Go Zen balance with API usage

* Update OpenCode Go capability gate

* Format OpenCode Go API overlay
2026-08-19 08:51:02 -07:00
Peter Steinberger ef1cb92579 fix: disclose local OpenCode Go quota estimates 2026-08-16 12:24:24 -07:00
kentoku24 23eb7750e4 OpenCode Go: per-model cost breakdown by day (#2649)
* feat: per-model cost breakdown for OpenCode Go's daily cost history

Extract each local assistant message's modelID from opencode.db (the
real model behind the constant opencode-go Zen-proxy providerID) and
group cost/request counts by (day, model) instead of just by day, so
the shared Cost history chart shows a per-model breakdown for
OpenCode Go the same way it already does for Claude/Codex. Rows with
no modelID fall back to an "unknown" bucket instead of being dropped.

* fix: use lowercase docs/claude.md link to pass case-sensitive CI lint

macOS resolves docs/CLAUDE.md to the same file as docs/claude.md, but
the Linux lint runner's case-sensitive filesystem doesn't, failing the
documentation-link check.

* fix: normalize the trimmed model id when grouping OpenCode Go costs

The grouping key used the untrimmed modelID even though emptiness was
checked against the trimmed value, so a model id with incidental
leading/trailing whitespace would form its own bucket instead of
merging with the clean value for the same model. Group by the trimmed
value consistently, and add regression tests for whitespace-only and
whitespace-padded model ids.
2026-08-04 19:35:27 -07:00
Aaron cf7b749133 fix: overlay authoritative OpenCode Go web windows onto local usage 2026-07-29 09:10:05 -07:00
Peter Steinberger 1912bb5642 docs: clarify OpenCode Go auto source order 2026-07-19 15:29:08 +01:00
Peter Steinberger 825e2f868d fix: isolate OpenCode Go history semantics 2026-07-18 20:16:32 +01:00
Peter Steinberger e62270fc81 docs: clarify OpenCode Go history sources 2026-07-18 19:47:47 +01:00
kentoku.matsunami 10a7643853 Add daily cost and plan usage history for OpenCode Go
Mirrors the Codex/Claude menu structure: the top rate-limit pane stays
submenu-free, a "Plan Usage" row hover-expands into 5-hour/weekly/monthly
history tabs, and a "Cost" row hover-expands into a daily $ chart sourced
from the local opencode-go SQLite history (~/.local/share/opencode/opencode.db).

The web-sourced fetch strategy best-effort enriches its rolling/weekly
percentages with the local daily buckets (opencode.ai has no daily-
granularity endpoint), but skips that local read entirely when the user
explicitly selects Web-only source mode.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-18 21:43:01 +09:00
Peter Steinberger 3db8772d87 fix: include Dia for OpenCode cookie import (#1830) 2026-07-04 07:13:06 -04:00
Peter Steinberger 0045897835 fix: tolerate missing OpenCode weekly usage
Co-authored-by: Moe Kanan <mohammedkanan1997@gmail.com>
2026-07-01 16:58:51 +01:00
Peter Steinberger 7ad7bdadd3 Fix Linux OpenCode Go and Command Code usage (#1660)
* fix: support Linux provider usage

* fix: stage SQLite header for musl builds

* fix: isolate musl SQLite discovery
2026-06-19 22:23:36 +01:00
Peter Steinberger 30e3395485 feat: add keychain cache store 2026-01-16 10:47:26 +00:00
Peter Steinberger 680ce09800 fix: cache provider cookies 2026-01-16 00:29:07 +00:00
Peter Steinberger 5d89ab4ec1 fix: cache opencode cookies 2026-01-15 23:58:13 +00:00
Peter Steinberger e6577006d6 fix: refine opencode workspace fetch (#188) (thanks @anthnykr) 2026-01-15 23:47:56 +00:00
anthnykr 69e1443e27 feat: add opencode usage provider 2026-01-16 04:05:50 +08:00