jtbbtnt54249, on LolingVerse's agy thread: "很多都这样,退出有时候又要重新开启".
Several agents' switches were off after quitting magpie and had to be
turned on again by hand.
Looked for a shared path that flips agents off. The row's switch is
Wired() alone, and nothing automatic disconnects an agent except a
removed plugin, the gateway pause (which reconnects on resume) and
Put agents back when quitting (which reconnects at start). The quit
question's Disconnect and quit, though, ran each row's Disconnect,
which leaves the disconnectedKey mark: every agent it listed stayed off
at every start after, and RewireOnStart skips a marked agent. Users
choose it so their agents work while magpie is closed, not to leave
magpie for good.
Now Disconnect and quit posts quit/disconnect (quitDisconnect), which
runs agent.RestoreOnQuit on the agents the question lists: their own
files back, no mark, recorded in quit.restored, so the next start's
RewireOnStart connects them again, the setting on or off. This covers
every agent the question lists: every detected agent wired to magpie,
built-in, plugin and WSL ones alike. A failure answers an error naming
the agent and magpie stays open. Its tooltip says magpie connects them
again when it opens (en, zh, zh-TW, ja, de).
Run at this tree (parent 99a54fa87, origin/main just fetched):
- TestQuitDisconnectComesBackOnStart red on the old api.go and
restoreonquit.go (404 on POST /api/quit/disconnect), green after.
- mote: go test -count=1 ./internal/gui ok (145s).
- mica: node --test quit-ask, quit-ask-setting, restore-on-quit,
i18n-keys, i18n-en-no-cjk: 178 of 178 pass, chromium and webkit,
every language.
- gofmt -l clean; go vet ./internal/gui on darwin and GOOS=windows ok.
Linux vet of internal/gui needs GTK/WebKitGTK headers, which neither
mote nor magpie-desktop has; not run.
Not tried: a real quit of the app with real agents; the agent-level
RestoreOnQuit then RewireOnStart path is covered by
TestRestoreOnQuitAndRewireOnStart. Agents disconnected this way by an
older magpie keep their mark and stay off until switched on once.