MiniMax's `mmx quota show` shows the video bucket as counts, 4 / 5 left of
the day and 34 / 35 of the week, while magpie showed only a share (used
20%, 3%), and named the windows "Video · 24 hours" in English whatever
the language.
readMiniMaxPlan now also reads current_interval_usage_count and
current_weekly_usage_count, the fields mmx-cli 1.0.27 types and shows
(dist/index.d.ts QuotaModelRemain; dist/mmx.mjs). It reads them as the
CLI does: usage_count has held what remains as well as what is used, so
it is taken as whichever the remaining percentage agrees with within a
point, and as no count when neither does or the total is 0 (the general
bucket, which keeps its share alone, as in the CLI). The window carries
the count as Amount of Limit, in "videos" for the video bucket, the way
WorkBuddy's credits are carried, so the Usage page says it before the
share, used or left as the reader picks: "1 / 5 个视频 · 已用 20%" or
"4 / 5 个视频 · 剩余 80%". A used-up window (status 2) counts all of it
used. The video windows aren't routing limits (Aside), so routing is
unchanged. "videos", "Video · 24 hours" and "Video · 7 days" are in zh,
zh-TW, ja and de.
Verified:
- TestReadMiniMaxPlanVideoCounts (new), built from the reporter's
numbers with mmx-cli's field names: on origin/main's planquota.go it
fails (video windows have Amount 0, Limit 0, Unit ""); passes now.
TestReadMiniMaxPlan and the other planquota tests pass.
- internal/gui/tests/minimax-video-count.test.cjs (new): Chromium and
WebKit, 420 and 1100 wide, zh/en/zh-TW/ja/de, used and left: names and
counts as above, the general windows share-only, nothing cut, no
sideways scroll. On origin/main's i18n.js it fails in both engines
(names untranslated).
- i18n-keys, gui-zh-tw, gui-ja, gui-de, api-key-usage, quota-* and
usage-* GUI tests: 165/165 in Chromium and 165/165 in WebKit.
- gofmt -l (nothing), go vet ./internal/provider, GOOS=linux and
GOOS=windows go vet -tags nogui ./internal/provider, go build,
GOOS=linux go build -tags nogui, GOOS=windows go build, go test -tags
nogui ./... under a temp HOME: all pass.
Not verified: no real MiniMax Token Plan key here, so the reply was not
read live; which way usage_count runs is taken from mmx-cli's own
handling, and both ways are tested.