Files
magpie/internal
yetone dd50cbba25 provider: a key's or account's model picker has Select all available (young02036)
young02036 on Discord (after 1a67ca614 fetched each key's own models):
"建议再同步给一个给按钮设置所有可用模型的触发按钮". A key or account's
model picker (the pill under the provider editor's accounts) now has
"Select all available" in its foot, beside All models. For a key it
ticks every model that key's own fetched list has, ones the user
un-ticked before included, since the user asked for it; with no per-key
list (one key, or a fetch not asked per key) and for a signed-in
account it ticks every chip shown. Nothing is saved until Save. The
provider level already had Select all; no new layout.

- provider.KeyListed(id, ref): the models the last fetch marks a key as
  seeing, by listed id; nil when unknown, not none.
- gui: provider/keylisted action returns {models, known}.
- app.js: the button, and the account's kept models joined at draw time
  so a re-draw after ticking shows them. Comments shortened so the core
  script stays under TestCoreScriptBudget with no raise.
- i18n: zh, zh-TW, ja, de for the button and its two tooltips.
- account-models.test.cjs clicks All models by name (the foot now has
  two .action buttons).

What was run (mote, via mote-run). At this tree rebased on 7818dc316:
- TestCoreScriptBudget, the two provider tests, go vet, gofmt,
  account-models-available (60/60), account-models and i18n-keys: ok.
At the same change on 083821dc9 (before the rebase):
- go test ./internal/provider -run 'TestKeyListedIsTheKeysOwnList|TestFetchRefreshesEachKeysModels'
  and ./internal/gui -run TestCoreScriptBudget: ok.
- go vet ./internal/provider ./internal/gui, also GOOS=windows and
  GOOS=linux -tags nogui: ok. gofmt -l: nothing.
- account-models-available.test.cjs (new): chromium + webkit, en zh
  zh-TW ja de, 900 and 420px: 60/60 ok. It checks the relay key ticks
  only its own list's models (an un-ticked one included) and Save posts
  them, a key with no list and a Codex account tick every chip without
  asking keylisted, the button fits its line, and every translation.
- account-models*, account-refresh, gateway-key-models*, provider-*,
  i18n-keys, gui-de, gui-ja, gui-zh-tw: 1219 tests, 1189 ok, 30 red.
  The same 7 files at a clean 083821dc9: 29 of 172 red, the same tests
  (provider-fetch-again #5232, provider-picks-stay and gateway-key-models
  #5233/#4616, provider-mask #5109, provider-typed #4673,
  provider-levels-scroll #4395, provider-models-rest #4396). None new.

Broken by hand: the new GUI test on origin/main's app.js: 0/60 (each
waits for the button).

Not tried: a real relay with per-group keys (the relay is a fixture),
and the full go test ./... before the tag (run after, issues filed for
any red).
2026-11-04 21:52:05 +08:00
..
…
…
…
…
…
…
…
…