capiton0's settings were in a Desktop profile they made themselves (key
"magpie", static credential) pointing at magpie's gateway. c76842482 only
keeps edits made inside magpie's own profile, so turning magpie on started
magpie's profile empty and their settings looked lost.
Now, when magpie's profile has nothing stashed, desktopOn seeds it from the
profile Desktop has applied (or the one magpie stashed as applied) when that
profile is the user's own, inferenceProvider "gateway", and its base URL is
magpie's gateway (same port; same host, localhost or a loopback IP). Only the
gateway URL, key and auth scheme are magpie's. The user's file is not
touched, and turning magpie off applies it again. A profile for another
gateway, Bedrock or Vertex is not carried over.
Run:
- go test -tags nogui ./internal/agent -count=1 (sandbox HOME): ok, 1219s.
- TestClaudeDesktopOnKeepsTheUsersOwnGatewayProfile uses the reporter's
literal config; it fails without the change. Making desktopIsOurGateway
always true turns TestClaudeDesktopOnLeavesOtherProfilesOut red.
- gofmt -l; go vet darwin, GOOS=linux -tags nogui, GOOS=windows.
Not tried: a real Claude Desktop.