Commit Graph
1 Commits
Author SHA1 Message Date
yetone b2a3449021 gui, agent: the models picked for a WSL agent are the ones its picker, its own menu and the gateway list, and a model taken out leaves the picker at once (#927, cjyrainbow)
Claude Code · WSL Ubuntu's model list kept what it picked under its row's
id, claude@wsl:Ubuntu, while everything that lists models for it reads
claude's: the default-model picker (claudeViaMagpie), the models written
into its settings and the gateway's /v1/models for its key (magpie-claude).
The line said 2 models; the picker and Claude Code's own menu had them all.
Agent.ListsFor is the id a row's models are kept and read under, the
Windows twin's for a distro's agent, and the Agents page's model list and
line use it (Codex · WSL's order too).

Closing the list wrote the hidden set and refreshed the state afterwards,
but the click that closed it was the one on the model picker, which opened
on the row's old options. The row's pickers now drop what was taken out as
the list closes; what was put back comes with the state.

TestAgentModelsWSL (FakeWSL distro with Claude Code) and
agent-models-picker.test.cjs (Chromium, WebKit, en, zh) are new and fail
without the change. go vet, go build (darwin, GOOS=linux nogui,
GOOS=windows) and go test -tags nogui ./... under a temp HOME pass; the
agent-models*, click-scroll, codex-model-order and agent-model-groups GUI
tests pass.
2026-10-06 00:31:46 +08:00