commandcode 0.1.17: the Credits window comes second, so magpie's account line and menu bar show the plan's dollars (01huadalang on Discord)

01huadalang: "command 的订阅插件没有显示总额度剩余的条子". A Pro, GOAT,
Max or Ultra account reports 5 hours, Weekly and then Credits. magpie's
Providers account line (quotaLine) and the menu bar (trayusage) show an
account's first two windows only, so the Credits bar, the plan's whole
allowance, was never drawn there; it sat in the tooltip. allowanceOf now
puts Credits right after the first window: 5 hours, Credits, Weekly. The
5-hour window stays first, so the Usage card's spark and pace line are
unchanged; Weekly moves to the account line's tooltip. Accounts with one
limit window (Weekly, Credits) or none (Go: Credits alone) are as before.

Not this change: #303 (amount/limit on the Credits window) is held, as
reviewed on it: on every released magpie a window with a limit is
printed as "17.89 / 70" with no "$" in both modes, until magpie formats
a unit "usd" window as money (#301 step 1, not landed).

Run (HOME a temp dir without "magpie" in its path; no-magpie.test.mjs
greps every request for the word and finds the HOME in the Go body
otherwise):
- packages/commandcode bun test: 65 pass, 0 fail.
- bun run check: exit 0, every package.
- Old code: usage.test.mjs's "a Max account: its 5 hours, its credits
  second ..." fails on origin/main's index.mjs (12 pass, 1 fail: Weekly
  where Credits is expected).
- Real account: the owner's GOAT key through hooks.auth.usage now gives
  [5 hours 0.93%, Credits $0.63 / $70.00, Weekly 1.20%] (before: 5 hours,
  Weekly, Credits).
Not tried: a Go, Pro, Max or Ultra account (none here).
This commit is contained in:
yetone
2026-10-25 18:56:03 +08:00
parent 564719b9d9
commit 8531ccc532
3 changed files with 8 additions and 5 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@magpie-community/opencode-commandcode-auth",
"version": "0.1.16",
"version": "0.1.17",
"description": "Command Code plans (Pro, GOAT, Max, Ultra, Go, Teams) in OpenCode and magpie",
"type": "module",
"main": "./index.mjs",