Commit Graph
2 Commits
Author SHA1 Message Date
yetone ff93c29224 gui, provider: Try again on a held move takes the models unticked in the editor, not only the saved ones (noting_ever on X: deep-model unticked, and WorkBuddy AI's move still failed on deep-model)
A move held back by a model the plugin doesn't serve says to untick it
under Models. The editor's model chips are a draft until Save, and the
Move / Try again button posted only {id}, then threw the draft away, so
the move checked the saved picks, which still had deep-model, and failed
on it again. This holds for every mover: they share renderMove and the
provider/move handler.

Now Try again sends the editor's picks when they differ from the saved
ones, and provider/move saves them first (provider.SetModels, through
agent.Reseat so an agent on a dropped model is moved off it), then moves.
A move that sends no models leaves the picks as they are (CLI, Plugins
page).

Run: TestMoveTakesEditorPicks (fails on the old handler: the move saw
[auto deep-model] each time) and plugin-move-unserved.test.cjs's new
"Try again takes the models unticked", en and zh, in Chromium and WebKit
(fail on the old app.js: no models posted); plugin-move*.test.cjs 20/20;
go test ./internal/provider ./internal/gui on HEAD plus this change;
go vet (darwin; linux provider; windows gui+provider); gofmt -l clean.
2026-10-09 11:54:30 +08:00
yetone 96446806bd zcode: a Start Plan account neither lists nor offers GLM-5.3, and the move to the plugin doesn't count it lost (悠悠哥 on Discord: "仍使用内置:插件不提供 GLM-5.3" moving ZCode onto its plugin) — GLM-5.3 is the Coding Plan's alone (ZCode's builtin config lists GLM-5.3-Flash, GLM-5.2 and GLM-5-Turbo for account:zai-start-plan), and the plugin serves a Start Plan account what ZCode does. But a Z.ai account with a key made and no Coding Plan bought, whose requests go to the Start Plan, was taken for a Coding Plan account until a request found its route (zcodeOnStart with no context said the Coding Plan), and afterwards was listed whatever list was fetched last (the Coding Plan's, another account's or its own before), so GLM-5.3 was listed, could be ticked, and the move found the plugin "short" of it. Now: before a route is found, the plan the account showed at sign-in says it (zcodeOnStartAs, zcodeStartNamed: "Start Plan"); on the Start Plan, a model the plan doesn't serve (zcodeStartServes: ZCode's config on the machine, else zcodeStartModels) is unusable, taken out of a fetched list and out of the picks, with a list fetched or not (Exposed); and a mover may say which models the built-in served on an account (mover.builtin), ZCode's saying a Start Plan account was never served GLM-5.3, so one the built-in didn't serve either is no loss. A model really lost is named with the account and its plan: "the plugin doesn't serve GLM-5.3 for a@x (GLM Coding Pro), though the built-in does" (插件没有为 … 提供 …(内置提供)), the why's args carrying user. TestZCodeStartPlanHasNoGLM53 (a Start Plan account before and after the Coding Plan's list was fetched, GLM-5.3 ticked or not; a Coding Plan account still has it; the mover's builtin) fails without the change (it listed GLM-5.3 GLM-5.3-Flash GLM-5.2 GLM-5-Turbo); TestMoveToPlugin's new case (a model the built-in didn't serve moves; one it did is named with "a@fake (Fake Start)"); plugin-move-unserved.test.cjs (WebKit, en and zh, with an account and without) fails without the app.js change and passes with it, plugin-move.test.cjs passes. No ZCode request or sign-in was made. go vet ./internal/..., go build -tags nogui (darwin, GOOS=linux), GOOS=windows go build, go test -tags nogui -count=1 ./... under a temp HOME, go test ./internal/gui pass. 2026-10-02 22:00:34 +08:00