Files
magpie/docs
yetone b10788745a agent: Claude Desktop on magpie keeps the language picked signed in with Anthropic (memory, Osal on Discord)
Desktop's 3p mode runs in a userData of its own, Claude-3p, whose
config.json (Desktop's settings, not claude_desktop_config.json) starts
with no "locale", so after magpie turned 3p on Desktop came up in the
system's language. magpie never wrote Claude-3p/config.json before this
commit: it writes only claude_desktop_config.json (deploymentMode, merged
key by key) and configLibrary's _meta.json and its own profile. So the
hand-set locale that reporters saw lost on restart was not written over by
magpie; Desktop 2.7032's own main process sets "locale" back to en-US when
its UI asks for one with no bundled catalog (pit in its index chunk), and
resets an unparsable config.json to {}. Which of those hit them is not
known.

Turning Desktop onto magpie now copies the one key "locale" from the
signed-in userData's config.json (Claude, %APPDATA%\Claude on Windows,
the first set's before the others for an MSIX install) into
Claude-3p/config.json, only when that file is missing or a JSON object
with no locale, and only a name Desktop takes for a catalog
(^[a-z]{2,3}(-[A-Za-z0-9]{2,8})*$, as Desktop's lit). A locale already in
Claude-3p is never written over, no other key there is written, and an
unreadable or non-object file is left alone without stopping the
takeover. Off removes the file only when magpie made it and it still
holds nothing but the carried language. The key name "locale" was read
from /Applications/Claude.app 2.7032's bundle (Fo.get("locale") on its
config.json store).

Tests: TestClaudeDesktopCarriesTheLanguage, TestClaudeDesktopKeepsThe3pLanguage,
TestClaudeDesktopUserEditsThenReapply, TestClaudeDesktopLanguageOddValues.
Broken by hand, each went red: no carry (Carries red), overwrite an
existing 3p locale (Keeps3p and UserEdits red), no removal on off
(Carries red), no name check (OddValues red). UserEdits passes on the
old code too: it guards that magpie never writes the user's file.

Run at 9fd80b212 + this change: gofmt -l clean; go vet ./... (darwin),
GOOS=linux go vet -tags nogui ./..., GOOS=windows go vet ./... ok.
set -o pipefail; go test -timeout 45m ./... at load ~330-390: 60
packages ok; internal/agent, internal/gateway and internal/library ran
past 45m (#2544, #2870, #2853) and internal/gui's
TestSetAnswersWhileDevinAndProvidersHang was red (set slow/slow-1 15s;
#1375). Rerun alone at load ~390: gui red the same way (#1375), agent
past 45m again (#2544). go test -run Desktop ./internal/agent
./internal/library ./internal/desktopdir: ok.

Not tried: a real Claude Desktop (none started; this Mac's Desktop is
2.7032, which bundles no Chinese catalog), Windows or Linux by hand. GUI
untouched, so the GUI suite was not run.
2026-10-19 21:37:46 +08:00
..