@leo000001/opencode-quota-sidebar 3.0.0 → 3.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/CHANGELOG.md +14 -2
  2. package/CONTRIBUTING.md +4 -1
  3. package/README.md +210 -514
  4. package/README.zh-CN.md +337 -0
  5. package/SECURITY.md +2 -2
  6. package/assets/OpenCode-Quota-Sidebar.png +0 -0
  7. package/dist/cost.d.ts +3 -3
  8. package/dist/cost.js +258 -169
  9. package/dist/format.d.ts +4 -0
  10. package/dist/format.js +24 -10
  11. package/dist/providers/common.d.ts +6 -0
  12. package/dist/providers/common.js +32 -12
  13. package/dist/providers/core/anthropic.d.ts +1 -1
  14. package/dist/providers/core/anthropic.js +43 -39
  15. package/dist/providers/core/kimi_for_coding.d.ts +1 -1
  16. package/dist/providers/core/kimi_for_coding.js +44 -64
  17. package/dist/providers/core/minimax_cn_coding_plan.d.ts +2 -0
  18. package/dist/providers/core/minimax_cn_coding_plan.js +214 -0
  19. package/dist/providers/core/zhipu_coding_plan.d.ts +1 -1
  20. package/dist/providers/core/zhipu_coding_plan.js +41 -61
  21. package/dist/providers/index.d.ts +3 -3
  22. package/dist/providers/index.js +5 -5
  23. package/dist/providers/third_party/rightcode.d.ts +1 -1
  24. package/dist/providers/third_party/rightcode.js +41 -61
  25. package/dist/providers/third_party/xyai.d.ts +2 -0
  26. package/dist/providers/third_party/{xyai_vibe.js → xyai.js} +113 -79
  27. package/dist/quota.d.ts +2 -2
  28. package/dist/quota.js +24 -18
  29. package/dist/quota_render.d.ts +1 -1
  30. package/dist/quota_render.js +23 -17
  31. package/dist/storage_parse.js +1 -0
  32. package/dist/title.js +7 -7
  33. package/dist/title_apply.js +18 -1
  34. package/dist/tui.tsx +133 -36
  35. package/dist/tui_helpers.d.ts +16 -0
  36. package/dist/tui_helpers.js +146 -0
  37. package/dist/types.d.ts +2 -0
  38. package/package.json +9 -2
  39. package/quota-sidebar.config.example.json +45 -45
  40. package/dist/providers/third_party/buzz.d.ts +0 -2
  41. package/dist/providers/third_party/buzz.js +0 -156
  42. package/dist/providers/third_party/xyai_vibe.d.ts +0 -2
package/CHANGELOG.md CHANGED
@@ -2,11 +2,13 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ - Refresh the README for open-source release readiness with architecture notes, provider support matrix, sidebar/title/report demos, and abbreviation explanations.
6
+ - Add a linked `README.zh-CN.md` and include it in published package files.
5
7
  - Add built-in `kimi-for-coding` subscription quota support via `GET https://api.kimi.com/coding/v1/usages`.
6
8
  - Parse Kimi's `5h` and `Weekly` windows, including reset timestamps, and render them like other subscription providers.
7
9
  - Accept OpenCode provider discovery responses that expose Kimi API keys through provider `key` fields.
8
- - Add Buzz API balance support for OpenAI-compatible providers that use a Buzz `baseURL`.
9
- - Document Buzz configuration, rendering, and outbound billing endpoints.
10
+ - Add built-in MiniMax Coding Plan quota support, including global endpoint matching and pricing aliases.
11
+ - Add built-in XYAI quota support with login-based session auth and legacy alias compatibility.
10
12
  - Keep session measured cost aligned with OpenCode root-session `message.cost` while still including descendant subagent usage in API-equivalent cost.
11
13
  - Support OpenCode long-context pricing tiers via `context_over_200k` when estimating API-equivalent cost.
12
14
  - Bump the usage billing cache version so `/qday`, `/qweek`, and `/qmonth` recompute historical API cost with the updated rules.
@@ -15,6 +17,16 @@
15
17
  - Add project-local `.opencode/skills` workflows for quota provider adapters, sidebar title formatting, and session usage aggregation.
16
18
  - Clarify README wording for generic API-key providers versus built-in quota/balance adapters.
17
19
 
20
+ ## 3.0.1
21
+
22
+ - Align TUI sidebar panel styling with native modules.
23
+
24
+ ## 3.0.0
25
+
26
+ - Ship the dedicated TUI sidebar panel layout for `TITLE`, `USAGE`, and `QUOTA`.
27
+ - Fix persisted sidebar-panel refresh so historical sessions render correctly after open or resume.
28
+ - Fix TUI dist packaging and update the related sidebar usage documentation.
29
+
18
30
  ## 1.13.2
19
31
 
20
32
  - Publish Anthropic quota fixes and cache invalidation updates.
package/CONTRIBUTING.md CHANGED
@@ -16,7 +16,7 @@ The plugin now uses a provider adapter registry, so adding a new provider does n
16
16
  ## Common adapter patterns
17
17
 
18
18
  - Direct provider ID match: best for first-party providers with stable IDs
19
- - `baseURL` match: best for OpenAI-compatible relays such as RightCode or Buzz
19
+ - `baseURL` match: best for OpenAI-compatible relays such as RightCode
20
20
  - Prefix/variant normalization: best when one provider has multiple runtime IDs
21
21
  - Balance-only providers should prefer `balance` over inventing fake percent windows
22
22
  - Built-in API-key providers such as `kimi-for-coding` may need both: direct ID matching for the canonical provider and support for OpenCode's discovered `key -> options.apiKey` bridge
@@ -138,6 +138,9 @@ npm run typecheck
138
138
  When a change affects users, update the relevant docs in the same PR:
139
139
 
140
140
  - `README.md` for install, config, behavior, examples, or troubleshooting
141
+ - `README.zh-CN.md` when Chinese-facing user docs should stay aligned with the English README
141
142
  - `CONTRIBUTING.md` if the change affects adapter patterns or provider authoring guidance
142
143
  - `CHANGELOG.md` for released user-facing changes
143
144
  - `SECURITY.md` if the change affects auth handling, external requests, or data storage
145
+
146
+ If you update README screenshots or image references, also verify the corresponding asset is included in the published package file list in `package.json`.