T3 Code's sync wrote providerInstances.magpie whole on every start, so
what the user changed on it in T3 Code (Display Name, Auto-compact
after, its switch, colour, launch args, an env var of their own) went
back to magpie's defaults when magpie restarted or updated.
Sync and the field setter now merge into what is there (t3Merged):
magpie's own parts are written as before (driver, customModels, the
gateway's ANTHROPIC_BASE_URL / ANTHROPIC_AUTH_TOKEN and the review
switch), every other key under the instance and its config is the
user's and kept (mergeTheirs), a non-empty displayName and the enabled
switch are theirs, and the environment list keeps the user's own
variables beside magpie's. T3's own claudeAgent instance is never
touched, so it and magpie's keep their settings apart.
Run:
- TestT3CodeKeepsTheUsersSettings: T3's claudeAgent instance beside
magpie's; the user edits magpie's (name, enabled, accentColor,
autoCompactWindow "300000", launchArgs, a stale model, a changed base
URL, an added HTTPS_PROXY), then three syncs. Against the old
t3code.go it fails on the name, the switch, the colour, the config
and the env.
- go test -tags nogui ./internal/agent (whole package, ok, 1555s on
4c746ab39; T3 tests again after rebasing on 27956002c), gofmt -l,
go vet darwin, GOOS=linux -tags nogui, GOOS=windows.
Not tried: the real T3 Code app (not installed here); the instance
layout follows T3's settings schema from its source. A binaryPath or
homePath carried over from T3's own Claude instance stays once T3
drops it; a value the user gives magpie's review variable is put back.