agents: Claude Desktop says its signed-in chats and projects stay, before it is turned on
xgddm88 on X: after turning Claude Desktop on in magpie (to use DeepSeek
V4.1 Flash), Desktop started with none of the earlier projects or chats.
Cause, from Desktop 2.7032's app.asar (index.pre.js, read only): in
third-party mode Desktop calls app.setPath("userData", …"Claude-3p")
("[custom-3p] userData mkdir"), so it runs in a profile of its own. The
signed-in (1P) chats, projects and Code sessions stay in
~/Library/Application Support/Claude. They are not deleted, only not
shown, and come back when Desktop is off magpie. magpie writes nothing
in Claude/ but deploymentMode, and only reads its config.json for the
language. There is no supported way to show 1P history in 3P mode.
So magpie says it before the switch is touched, and after:
- the Agents row, not connected: "Not connected · on magpie, Claude
Desktop opens a separate profile: chats and projects from your
Anthropic sign-in stay, and are back when you turn it off"
(CONNECT_BEFORE);
- the opened row, once connected (CONNECT_COST);
- the notice after On and after Off (noticeClaudedesktop3/4).
In en, zh, zh-TW, ja and de. agent-wiring.md says where Desktop's
history is and that Opus beside DeepSeek comes from a Claude
subscription added in magpie.
Run (worktree at cf9ea977c):
- gofmt -l internal/: nothing.
- mote: go vet ./..., GOOS=windows go vet ./..., GOOS=linux go vet
-tags nogui ./..., go build ./..., go test -timeout 45m
./internal/agent ./internal/gui: vets and build ok, internal/agent
ok; internal/gui red in 10 real-window AppKit tests (dock, panel,
tray, main window), each at its 20-40s deadline. Four of them, run
at origin/main cf9ea977c on mote, fail the same way; that is mote's
window server (#4125, #2645), not this change, which touches no Go
in internal/gui.
- GUI, Chromium on mote and WebKit on Linux (wsl-run; mote's WebKit
launches hang behind ~48 stuck pw_run.sh from other runs):
desktop-history (10+10 pass), and i18n-keys, agent-connect,
agent-failover, desktop-longest, desktop-tiers, desktop-model-menu,
desktop-subagent-model (36 pass in each engine).
Broken by hand:
- Notice without the new sentences: TestClaudeDesktopKeepsTheSignedInHistory
fails on the On and the Off notice.
- desktopOn writing Claude/config.json: the test fails, "on changed
…/Claude/config.json".
- connectLine without the CONNECT_BEFORE line: desktop-history fails
10 of 10 ("Not connected · Claude Desktop uses its own settings").
Not tried: a real Claude Desktop launched on magpie (sandbox and live
were both left alone); leaving disableDeploymentModeChooser unset so
Desktop's login screen offers Claude.ai sign-in beside magpie (unverified,
unchanged); Windows' Claude-3p path in a real app; WebKit on macOS.
This commit is contained in:
@@ -111,6 +111,7 @@ something else shows up as drift.
|
||||
- Codex's "subagent model" field writes nothing to Codex's config: its lead names each subagent's model in `spawn_agent`, which `[agents]` can't overrule. It is magpie's setting (`settings.CodexSubagentModel`, [`codex_subagent.go`](../../internal/provider/codex_subagent.go)), and the gateway moves the subagent's request onto it (see [gateway routing](gateway-routing.md)). Its options are every model and routing group Codex's own lists show (`CatalogFor("codex")`, so a model taken out of them or not picked is left out here too), ChatGPT accounts' first (#1633: a lead on a chat provider wants its subagents there too). A task a ChatGPT-backed lead sealed opens only on a ChatGPT account, so the gateway keeps such a subagent on its own model when the one set is another provider's. Its setter takes any `provider/model` or `group/<id>`, also one magpie doesn't serve now, so a profile or backup put back on another computer still applies (`ApplyFields` stops at the first failed Set), and refuses one of Codex's own bare names.
|
||||
- Claude Desktop's "subagent model" field (`subagent_model`, `desktopSubagentField` in [`claudedesktop.go`](../../internal/agent/claudedesktop.go)) writes nothing to Desktop's config: Desktop runs its Code tab's Claude Code with `CLAUDE_CODE_PROVIDER_MANAGED_BY_HOST=1`, under which Claude Code ignores `CLAUDE_CODE_SUBAGENT_MODEL`, `CLAUDE_CODE_SUBAGENT_MODEL_FORCE` and the tier variables in its settings files' `env` ("Ignoring … this session's provider routing is managed by the host", Claude Code 2.1.295), and the env Desktop builds for the Code tab has no key for it (Desktop 2.31226). It is magpie's setting (`settings.DesktopSubagentModel`, [`desktop_subagent.go`](../../internal/provider/desktop_subagent.go)), and the gateway moves each subagent's turn onto it (see [gateway routing](gateway-routing.md)). It is labelled as Codex's, so the Agents page gives it the same square. Its options are magpie's models and groups as Desktop's list shows them (`viaMagpie("claude-desktop")`), while Desktop is on magpie, as for the tiers. A Desktop alias picked is kept by its catalog id (`DesktopCatalogID`). Like Codex's, its setter takes any `provider/model` or `group/<id>`, also one magpie doesn't serve now, so a profile or backup still applies, and refuses a bare name. It is `Live`: the gateway reads it on each request.
|
||||
- Claude Desktop's "subagent effort" (`desktopSubagentEffortField`, `settings.DesktopSubagentEffort`) is also Quiet and Live. Default keeps the effort the request asks for, including disabled thinking; it never selects a new default. A picked level works independently of the subagent model: no model pick, the same model and an unavailable model pick all still take the effort. While wired, the field offers the selected model's levels, or the standard levels when its model is inherited or unavailable; a model marked reasonless offers none. The stored pick survives model changes. A disconnected preference can be saved or cleared without connecting Desktop or showing restart advice, so profile restoration and Disconnect can restore a value saved before connecting; reconnect returns to the last live pick. `subEffortTitle` gives Desktop the Claude Code default explanation; Codex's default meaning is unchanged. The gateway fits each attempt to its actual model and preserves fixed group-member efforts (see [gateway routing](gateway-routing.md)).
|
||||
- Claude Desktop picks its userData in its main process before any window opens: while a 3p configuration is applied and `deploymentMode` isn't `"1p"`, it is `Claude-3p` (Desktop 2.7032's `index.pre.js`, `app.setPath("userData", …-3p)`). So turning Desktop onto magpie shows none of the chats, projects and Code sessions of the Anthropic sign-in, which stay in `Claude` (xgddm88 on X: 之前的工程和会话记录全没了). magpie writes nothing in `Claude` but `deploymentMode` in its `claude_desktop_config.json`, and reads its `config.json` for the language; Off brings that history back. A row not yet connected says so before it is turned on (`CONNECT_BEFORE` in `app.js`), the opened row once it is on (`CONNECT_COST`), and the notice after each change (`noticeClaudedesktop3`, `noticeClaudedesktop4`; `TestClaudeDesktopKeepsTheSignedInHistory`, `desktop-history.test.cjs`). Opus beside the gateway's other models in that mode comes from a Claude subscription added in magpie. With `disableDeploymentModeChooser` unset Desktop's login screen would offer Claude.ai sign-in too; magpie still seeds it (as CC Switch does), so the way back is Off.
|
||||
- Claude Desktop's 3p mode runs in a userData of its own (`Claude-3p`), whose `config.json` (Desktop's own settings, not `claude_desktop_config.json`) starts with no `locale`, so Desktop on magpie came up in the system's language rather than the one picked signed in with Anthropic (memory and Osal on Discord). Turning Desktop onto magpie copies that one key, `locale`, from the signed-in userData's `config.json` (`Claude`, `%APPDATA%\Claude` on Windows, the first set's before the others) into `Claude-3p/config.json` when that file is missing or a JSON object without one (`desktopCarryLocale` in [`claudedesktop.go`](../../internal/agent/claudedesktop.go)); only a name Desktop takes for a catalog is carried. A `locale` already in `Claude-3p`, Desktop's or set by hand, is never written over, and no other key of that file is ever written. Off removes the file only when magpie made it and it still holds nothing but the language carried (`TestClaudeDesktopCarriesTheLanguage`, `TestClaudeDesktopKeepsThe3pLanguage`, `TestClaudeDesktopUserEditsThenReapply`). Desktop shows the language only where its 3p window has that catalog: the window is Desktop's bundled UI (`Resources/ion-dist`, 11 catalogs and no Chinese in 2.7032, 2.9939, 3.6556.2 and 4.4212.0 (packed as `Resources/ion-dist.asar` there), while 3.6556.2's main process has `zh-Hans` and `zh-Hant` for the signed-in window). On every start that window asks the main process for its own pick (`requestLocaleChange`: its localStorage, else `navigator.languages` mapped onto its 11, else `en-US`), and the main process writes it into `Claude-3p/config.json`. So a Chinese `locale` there, carried or set by hand, is `en-US` again after each start, written by Desktop and not by magpie (Dx25 on Discord, Windows); nothing magpie writes can keep it. So the GUI says it to a Chinese reader: Claude Desktop's opened row on Agents has a line that Desktop on magpie is Anthropic's gateway window, with no Chinese, and that its Chinese comes back once disconnected, and the switch-on notice says the same in Chinese (GZXYMH on X, `desktop-lang.test.cjs`).
|
||||
- Claude Desktop's sessions (Code and Cowork, `claude-code-sessions` and `local-agent-mode-sessions`) are kept in the userData Desktop runs in, keyed by account and organization (the claude.ai login signed in; in 3p the install id in `ant-did` and the profile's organization, both stable). So on magpie, in `Claude-3p`, the sessions made signed in with Anthropic are out of sight but untouched in `Claude`, and they show again when Desktop is switched back (lambdua on X: "切换账号,对话都不见"); claude.ai chats live on Anthropic's servers and 3p never shows them. magpie never writes or removes a session. Desktop imports them itself (Settings → Import: the signed-in userData, `~/.claude/projects`, other `Claude*` folders), copying under new ids and leaving the originals, but in 3p only when the profile's policy `claudeAiImport.enabled` is true (off by default, 3p only, from 1.28929.0). magpie's profile gets `"claudeAiImport":{"enabled":true,"bannerBehavior":"detect"}` once per folder set (`desktopSeedImport`, marked in the stash as `claude-desktop.import`): on the switch on and, for a Desktop already on magpie, from `Sync` at magpie's start. A `claudeAiImport` already there is kept, and one the user removes is not written again (`TestClaudeDesktopOffersItsSessionImport`).
|
||||
- Claude Desktop's 3p mode reads its MCP servers (Settings → Developer, its connector list) from `Claude-3p/claude_desktop_config.json`, a file of its own, so on magpie the servers the user added signed in with Anthropic, in `Claude/claude_desktop_config.json`, were gone from the list (aa86222 on Discord: connectors didn't sync). Turning Desktop onto magpie copies each of those `mcpServers` entries that `Claude-3p` has none of the same name for (`desktopCarryMCP` in [`claudedesktop.go`](../../internal/agent/claudedesktop.go)); one of that name already there, the user's or the Library's (which writes both files), stays. `Sync` does it once for a Desktop already on magpie (`claude-desktop.mcp-seen`), so a server the user takes out in 3p isn't brought back. What was copied is stashed (`claude-desktop.mcp`), and off takes back each one still as copied; one the user changed since stays (`TestClaudeDesktopCarriesTheMCPServers`, `TestClaudeDesktopMCPKeepsThe3pServers`, `TestClaudeDesktopSyncCarriesTheMCPServersOnce`). Claude's file is never written. A claude.ai account's connectors can't come along: Desktop calls them through claude.ai with that account (`/api/organizations/<org>/mcp/servers/<id>/tools/call`, refused with `no_active_org` without one, Desktop 2.7032), and 3p mode has no account; Anthropic's docs say "Made by Anthropic" connectors are only in standard Desktop, and others reach 3p through `managedMcpServers` or plugins (claude.com/docs/third-party/claude-desktop/extensions).
|
||||
|
||||
@@ -133,9 +133,9 @@ func claudeDesktop(home string) *Agent {
|
||||
},
|
||||
Notice: func() string {
|
||||
if desktopWiredAny(ps) {
|
||||
return noticeClaudedesktop1.String()
|
||||
return noticeClaudedesktop1.String() + " " + noticeClaudedesktop3.String()
|
||||
}
|
||||
return noticeClaudedesktop2.String()
|
||||
return noticeClaudedesktop2.String() + " " + noticeClaudedesktop4.String()
|
||||
},
|
||||
Check: func() string {
|
||||
if !desktopWiredAny(ps) {
|
||||
@@ -999,4 +999,11 @@ func desktopEmpty(b []byte) bool {
|
||||
var (
|
||||
noticeClaudedesktop1 = newNotice("Claude Desktop reads this at start-up — quit and reopen it to run on magpie (Code and Cowork, no Anthropic sign-in).")
|
||||
noticeClaudedesktop2 = newNotice("Claude Desktop reads this at start-up — quit and reopen it to sign in with Anthropic again.")
|
||||
// Desktop's 3p mode runs in a userData of its own (Claude-3p, chosen in
|
||||
// its main process before the window opens), so the chats, projects and
|
||||
// Code sessions of the Anthropic sign-in in Claude/ aren't shown there.
|
||||
// magpie never touches Claude/'s data; off brings them back
|
||||
// (xgddm88 on X: 之前的工程和会话记录全没了).
|
||||
noticeClaudedesktop3 = newNotice("Chats and projects from your Anthropic sign-in stay in Desktop's own profile, not shown on magpie; nothing is deleted, and turning this off brings them back.")
|
||||
noticeClaudedesktop4 = newNotice("Your chats and projects from before are back there.")
|
||||
)
|
||||
|
||||
@@ -1092,3 +1092,46 @@ func TestClaudeDesktopImportedProfileIsOnMagpie(t *testing.T) {
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// Desktop's 3p mode runs in Claude-3p, a userData of its own, so the
|
||||
// chats, projects and Code sessions of the Anthropic sign-in (in Claude/)
|
||||
// aren't shown on magpie (xgddm88 on X: 之前的工程和会话记录全没了). Turning
|
||||
// Desktop on and off leaves every byte of that history as it was, and the
|
||||
// notice says before the restart that it stays and comes back.
|
||||
func TestClaudeDesktopKeepsTheSignedInHistory(t *testing.T) {
|
||||
home, p := desktopSandbox(t)
|
||||
history := map[string]string{
|
||||
filepath.Join(p.dir, "config.json"): `{"locale":"zh-CN","oauth:tokenCache":"x"}`,
|
||||
filepath.Join(p.dir, "Local Storage", "leveldb", "000003.log"): "chats",
|
||||
filepath.Join(p.dir, "IndexedDB", "https_claude.ai_0.indexeddb.leveldb", "CURRENT"): "MANIFEST-000001\n",
|
||||
filepath.Join(p.dir, "claude-code-sessions", "a", "b", "local_1.json"): `{"cwd":"/Users/me/proj"}`,
|
||||
filepath.Join(p.dir, "local-agent-mode-sessions", "s", "session.json"): `{"title":"proj"}`,
|
||||
}
|
||||
for f, s := range history {
|
||||
desktopWrite(t, f, s)
|
||||
}
|
||||
a := claudeDesktop(home)
|
||||
f := a.Field("provider")
|
||||
if err := f.Set("magpie"); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
for f, s := range history {
|
||||
if b, err := os.ReadFile(f); err != nil || string(b) != s {
|
||||
t.Errorf("on changed %s: %q %v", f, b, err)
|
||||
}
|
||||
}
|
||||
if n := a.Notice(); !strings.Contains(n, noticeClaudedesktop3.String()) {
|
||||
t.Errorf("on, the notice doesn't say the signed-in history stays: %q", n)
|
||||
}
|
||||
if err := f.Set(""); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
for f, s := range history {
|
||||
if b, err := os.ReadFile(f); err != nil || string(b) != s {
|
||||
t.Errorf("off changed %s: %q %v", f, b, err)
|
||||
}
|
||||
}
|
||||
if n := a.Notice(); !strings.Contains(n, noticeClaudedesktop4.String()) {
|
||||
t.Errorf("off, the notice doesn't say the history is back: %q", n)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1284,6 +1284,15 @@ function fillMenuButton(b, a) {
|
||||
// what turning one on costs, said in its opened row
|
||||
const CONNECT_COST = {
|
||||
gemini: "Gemini CLI's requests all go through magpie; its Google sign-in is turned off first and comes back when you disconnect",
|
||||
// Desktop's third-party mode runs in a userData of its own (Claude-3p),
|
||||
// so the signed-in profile's chats and projects aren't shown there; magpie
|
||||
// leaves them alone (xgddm88 on X: 之前的工程和会话记录全没了)
|
||||
"claude-desktop": "Chats and projects from your Anthropic sign-in stay in Desktop's own profile, not shown on magpie; nothing is deleted, and turning this off brings them back.",
|
||||
};
|
||||
// what an agent not yet connected says turning it on does to what the user
|
||||
// sees in it, before they turn it on
|
||||
const CONNECT_BEFORE = {
|
||||
"claude-desktop": "Not connected · on magpie, Claude Desktop opens a separate profile: chats and projects from your Anthropic sign-in stay, and are back when you turn it off",
|
||||
};
|
||||
// agents that read magpie's list only as they start: copies already
|
||||
// running keep the list they started with (agent.Stale)
|
||||
@@ -1391,6 +1400,7 @@ function connectLine(a, kind) {
|
||||
words.title = t("magpie set openai_base_url in {agent}'s config.toml, so a request the ChatGPT account {agent} is signed in to has no allowance for goes on to your other ChatGPT accounts on in magpie. {agent} keeps to its own models. To stop it, tick Only switch {agent}'s sign-in under Providers › Codex, or switch those accounts off; connecting {agent} adds magpie's models.", { agent: a.name });
|
||||
}
|
||||
else if (sw?.p.switchOnly) say(t("Not connected · switching accounts only"));
|
||||
else if (CONNECT_BEFORE[kindOf(a)]) say(t(CONNECT_BEFORE[kindOf(a)]));
|
||||
else if (src === "sub") say(t("Not connected · now on its Claude subscription"));
|
||||
else if (src === "chatgpt") say(t("Not connected · now signed in with ChatGPT · OpenAI's models stay available once connected"));
|
||||
else if (src === "key") say(t("Not connected · now on an API key of its own"));
|
||||
|
||||
@@ -3952,6 +3952,9 @@ const I18N = {
|
||||
"AtomCode reads its settings at start-up — restart open atomcode sessions to use this.": "AtomCode 启动时读取设置,需重启已打开的 atomcode 会话才会生效。",
|
||||
"Claude Desktop reads this at start-up — quit and reopen it to run on magpie (Code and Cowork, no Anthropic sign-in).": "Claude Desktop 启动时读取这项设置,退出并重新打开后即走 magpie(Code 和 Cowork,无需登录 Anthropic)。此时 Desktop 显示 Anthropic 自带的网关模式界面,它没有中文,会显示英文。",
|
||||
"Claude Desktop reads this at start-up — quit and reopen it to sign in with Anthropic again.": "Claude Desktop 启动时读取这项设置,退出并重新打开后可重新用 Anthropic 登录。",
|
||||
"Not connected · on magpie, Claude Desktop opens a separate profile: chats and projects from your Anthropic sign-in stay, and are back when you turn it off": "未接入 · 接入后 Claude Desktop 会换用一套单独的资料:用 Anthropic 登录时的对话和项目都还在,只是不显示,关掉接入即恢复",
|
||||
"Chats and projects from your Anthropic sign-in stay in Desktop's own profile, not shown on magpie; nothing is deleted, and turning this off brings them back.": "用 Anthropic 登录时的对话和项目留在 Desktop 自己的资料里,走 magpie 时不显示;不会删除任何内容,关掉接入即恢复。",
|
||||
"Your chats and projects from before are back there.": "之前的对话和项目会回来。",
|
||||
"Cline reads its provider as a session starts — open sessions keep the model they have; new ones use this. Reload VS Code's window for its extension.": "Cline 在会话开始时读取供应商:已打开的会话保留原来的模型,新会话使用这项设置。VS Code 扩展需重新加载 VS Code 窗口。",
|
||||
"Cline reads its provider as a session starts — open sessions keep the model they have; new ones use this. Reload VS Code's window for its extension; Cline's desktop app keeps the model picked in its own composer — pick magpie's there.": "Cline 在会话开始时读取供应商:已打开的会话保留原来的模型,新会话使用这项设置。VS Code 扩展需重新加载 VS Code 窗口;Cline 桌面应用沿用它自己输入框里选的模型,请在那里选 magpie 的模型。",
|
||||
"Cline's desktop app keeps the model and effort picked in its own composer — pick magpie's there; this sets Cline's CLI and VS Code extension.": "Cline 桌面应用沿用它自己输入框里选的模型和思考强度,请在那里选 magpie 的模型;这里设置的是 Cline 的 CLI 和 VS Code 扩展。",
|
||||
@@ -8127,6 +8130,9 @@ const I18N = {
|
||||
"AtomCode reads its settings at start-up — restart open atomcode sessions to use this.": "AtomCode 啟動時讀取設定,需重啟已打開的 atomcode 會話才會生效。",
|
||||
"Claude Desktop reads this at start-up — quit and reopen it to run on magpie (Code and Cowork, no Anthropic sign-in).": "Claude Desktop 啟動時讀取這項設定,退出並重新打開後即走 magpie(Code 和 Cowork,無需登入 Anthropic)。此時 Desktop 顯示 Anthropic 內建的閘道模式介面,它沒有中文,會顯示英文。",
|
||||
"Claude Desktop reads this at start-up — quit and reopen it to sign in with Anthropic again.": "Claude Desktop 啟動時讀取這項設定,退出並重新打開後可重新用 Anthropic 登入。",
|
||||
"Not connected · on magpie, Claude Desktop opens a separate profile: chats and projects from your Anthropic sign-in stay, and are back when you turn it off": "未接入 · 接入後 Claude Desktop 會改用一套獨立的資料:用 Anthropic 登入時的對話和專案都還在,只是不顯示,關閉接入即恢復",
|
||||
"Chats and projects from your Anthropic sign-in stay in Desktop's own profile, not shown on magpie; nothing is deleted, and turning this off brings them back.": "用 Anthropic 登入時的對話和專案留在 Desktop 自己的資料裡,走 magpie 時不顯示;不會刪除任何內容,關閉接入即恢復。",
|
||||
"Your chats and projects from before are back there.": "之前的對話和專案會回來。",
|
||||
"Cline reads its provider as a session starts — open sessions keep the model they have; new ones use this. Reload VS Code's window for its extension.": "Cline 在會話開始時讀取供應商:已打開的會話保留原來的模型,新會話使用這項設定。VS Code 擴充功能需重新載入 VS Code 視窗。",
|
||||
"Cline reads its provider as a session starts — open sessions keep the model they have; new ones use this. Reload VS Code's window for its extension; Cline's desktop app keeps the model picked in its own composer — pick magpie's there.": "Cline 在會話開始時讀取供應商:已打開的會話保留原來的模型,新會話使用這項設定。VS Code 擴充功能需重新載入 VS Code 視窗;Cline 桌面應用沿用它自己輸入框裡選的模型,請在那裡選 magpie 的模型。",
|
||||
"Cline's desktop app keeps the model and effort picked in its own composer — pick magpie's there; this sets Cline's CLI and VS Code extension.": "Cline 桌面應用沿用它自己輸入框裡選的模型和思考強度,請在那裡選 magpie 的模型;這裡設定的是 Cline 的 CLI 和 VS Code 擴充功能。",
|
||||
@@ -12304,6 +12310,9 @@ const I18N = {
|
||||
"AtomCode reads its settings at start-up — restart open atomcode sessions to use this.": "AtomCode は起動時に設定を読み込みます。反映するには開いている atomcode セッションを再起動してください。",
|
||||
"Claude Desktop reads this at start-up — quit and reopen it to run on magpie (Code and Cowork, no Anthropic sign-in).": "Claude Desktop はこれを起動時に読み込みます。終了して開き直すと magpie で動きます(Code と Cowork、Anthropic へのサインイン不要)。",
|
||||
"Claude Desktop reads this at start-up — quit and reopen it to sign in with Anthropic again.": "Claude Desktop はこれを起動時に読み込みます。終了して開き直すと再び Anthropic でサインインできます。",
|
||||
"Not connected · on magpie, Claude Desktop opens a separate profile: chats and projects from your Anthropic sign-in stay, and are back when you turn it off": "未接続 · 接続すると Claude Desktop は別のプロファイルで起動します。Anthropic でサインインしていたときのチャットとプロジェクトは消えず、接続を切ると戻ります",
|
||||
"Chats and projects from your Anthropic sign-in stay in Desktop's own profile, not shown on magpie; nothing is deleted, and turning this off brings them back.": "Anthropic でサインインしていたときのチャットとプロジェクトは Desktop 自身のプロファイルに残り、magpie 経由では表示されません。何も削除されず、接続を切ると戻ります。",
|
||||
"Your chats and projects from before are back there.": "以前のチャットとプロジェクトが戻ります。",
|
||||
"Cline reads its provider as a session starts — open sessions keep the model they have; new ones use this. Reload VS Code's window for its extension.": "Cline はセッション開始時にプロバイダを読み込みます。開いているセッションは今のモデルのままで、新しいセッションからこれを使います。拡張機能には VS Code のウィンドウを再読み込みしてください。",
|
||||
"Cline reads its provider as a session starts — open sessions keep the model they have; new ones use this. Reload VS Code's window for its extension; Cline's desktop app keeps the model picked in its own composer — pick magpie's there.": "Cline はセッション開始時にプロバイダを読み込みます。開いているセッションは今のモデルのままで、新しいセッションからこれを使います。拡張機能には VS Code のウィンドウを再読み込みしてください。Cline のデスクトップアプリは自身の入力欄で選んだモデルを使うため、そこで magpie のモデルを選んでください。",
|
||||
"Cline's desktop app keeps the model and effort picked in its own composer — pick magpie's there; this sets Cline's CLI and VS Code extension.": "Cline のデスクトップアプリは自身の入力欄で選んだモデルと思考レベルを使うため、そこで magpie のモデルを選んでください。ここで設定するのは Cline の CLI と VS Code 拡張機能です。",
|
||||
@@ -16481,6 +16490,9 @@ const I18N = {
|
||||
"AtomCode reads its settings at start-up — restart open atomcode sessions to use this.": "AtomCode liest seine Einstellungen beim Start – offene atomcode-Sitzungen neu starten, damit es gilt.",
|
||||
"Claude Desktop reads this at start-up — quit and reopen it to run on magpie (Code and Cowork, no Anthropic sign-in).": "Claude Desktop liest das beim Start – beenden und neu öffnen, damit es über magpie läuft (Code und Cowork, ohne Anthropic-Anmeldung).",
|
||||
"Claude Desktop reads this at start-up — quit and reopen it to sign in with Anthropic again.": "Claude Desktop liest das beim Start – beenden und neu öffnen, um sich wieder bei Anthropic anzumelden.",
|
||||
"Not connected · on magpie, Claude Desktop opens a separate profile: chats and projects from your Anthropic sign-in stay, and are back when you turn it off": "Nicht verbunden · über magpie öffnet Claude Desktop ein eigenes Profil: Chats und Projekte deiner Anthropic-Anmeldung bleiben erhalten und sind nach dem Trennen wieder da",
|
||||
"Chats and projects from your Anthropic sign-in stay in Desktop's own profile, not shown on magpie; nothing is deleted, and turning this off brings them back.": "Chats und Projekte deiner Anthropic-Anmeldung bleiben in Desktops eigenem Profil und werden über magpie nicht angezeigt; nichts wird gelöscht, und nach dem Trennen sind sie wieder da.",
|
||||
"Your chats and projects from before are back there.": "Deine früheren Chats und Projekte sind dann wieder da.",
|
||||
"Cline reads its provider as a session starts — open sessions keep the model they have; new ones use this. Reload VS Code's window for its extension.": "Cline liest seinen Anbieter beim Start einer Sitzung – offene Sitzungen behalten ihr Modell, neue nutzen dies. Für die Erweiterung das VS-Code-Fenster neu laden.",
|
||||
"Cline reads its provider as a session starts — open sessions keep the model they have; new ones use this. Reload VS Code's window for its extension; Cline's desktop app keeps the model picked in its own composer — pick magpie's there.": "Cline liest seinen Anbieter beim Start einer Sitzung – offene Sitzungen behalten ihr Modell, neue nutzen dies. Für die Erweiterung das VS-Code-Fenster neu laden; die Desktop-App von Cline behält das in ihrem eigenen Eingabefeld gewählte Modell – dort eines von magpie wählen.",
|
||||
"Cline's desktop app keeps the model and effort picked in its own composer — pick magpie's there; this sets Cline's CLI and VS Code extension.": "Die Desktop-App von Cline behält Modell und Denkstufe aus ihrem eigenen Eingabefeld – dort eines von magpie wählen; dies stellt Clines CLI und VS-Code-Erweiterung ein.",
|
||||
@@ -16734,6 +16746,8 @@ const NOTICES = [
|
||||
"AtomCode reads its settings at start-up — restart open atomcode sessions to use this.",
|
||||
"Claude Desktop reads this at start-up — quit and reopen it to run on magpie (Code and Cowork, no Anthropic sign-in).",
|
||||
"Claude Desktop reads this at start-up — quit and reopen it to sign in with Anthropic again.",
|
||||
"Chats and projects from your Anthropic sign-in stay in Desktop's own profile, not shown on magpie; nothing is deleted, and turning this off brings them back.",
|
||||
"Your chats and projects from before are back there.",
|
||||
"Cline reads its provider as a session starts — open sessions keep the model they have; new ones use this. Reload VS Code's window for its extension.",
|
||||
"Cline reads its provider as a session starts — open sessions keep the model they have; new ones use this. Reload VS Code's window for its extension; Cline's desktop app keeps the model picked in its own composer — pick magpie's there.",
|
||||
"Cline's desktop app keeps the model and effort picked in its own composer — pick magpie's there; this sets Cline's CLI and VS Code extension.",
|
||||
|
||||
@@ -0,0 +1,89 @@
|
||||
// Run with Node's test runner and Playwright on the module path; see README.md.
|
||||
// xgddm88 on X: turning Claude Desktop on in magpie, every earlier project
|
||||
// and chat was gone. Desktop's third-party mode runs in a userData of its
|
||||
// own (Claude-3p), so the signed-in profile's history isn't shown there;
|
||||
// it isn't deleted, and turning Desktop off brings it back. The row says so
|
||||
// before it is turned on, and its opened row says so once it is on. In
|
||||
// every language, wide and narrow, in Chromium and WebKit; nothing scrolls
|
||||
// sideways.
|
||||
const assert = require("node:assert/strict");
|
||||
const fs = require("node:fs/promises");
|
||||
const path = require("node:path");
|
||||
const { test } = require("node:test");
|
||||
const { chromium, webkit } = require("playwright");
|
||||
|
||||
const assets = path.resolve(__dirname, "../assets");
|
||||
|
||||
const before = "Not connected · on magpie, Claude Desktop opens a separate profile: chats and projects from your Anthropic sign-in stay, and are back when you turn it off";
|
||||
const once = "Chats and projects from your Anthropic sign-in stay in Desktop's own profile, not shown on magpie; nothing is deleted, and turning this off brings them back.";
|
||||
const plain = "Not connected · {agent} uses its own settings";
|
||||
|
||||
function fixture(lang, wired) {
|
||||
const settings = { lang, theme: "light" };
|
||||
const desktop = {
|
||||
id: "claude-desktop", name: "Claude Desktop", path: "/test/claude_desktop_config.json", icon: "claude-color", wired,
|
||||
fields: [{ key: "provider", label: "provider", value: wired ? "magpie" : "", options: [{ value: "magpie", label: "magpie", icon: "magpie" }] }],
|
||||
models: { shown: 2, listed: 2, by: [{ name: "DeepSeek", icon: "deepseek", n: 2 }], names: ["DeepSeek V4.1 Flash", "DeepSeek V4.1 Pro"] },
|
||||
};
|
||||
// another agent not connected says what it always did
|
||||
const codex = { id: "codex", name: "Codex", icon: "generic", path: "/test/codex", fields: [{ key: "model", label: "model", value: "", options: [{ value: "deepseek/v4.1-flash", label: "DeepSeek V4.1 Flash", ref: "deepseek/v4.1-flash" }] }] };
|
||||
const state = () => ({ agents: [desktop, codex], profiles: [], settings });
|
||||
return async (route) => {
|
||||
const req = route.request(), url = new URL(req.url());
|
||||
const json = (data) => route.fulfill({ json: data });
|
||||
if (url.pathname === "/boot.js") return route.fulfill({ contentType: "text/javascript", body: `window.bootPrefs = {lang:"${lang}",theme:"light",web:true};` });
|
||||
if (url.pathname === "/wails/runtime.js") return route.fulfill({ contentType: "text/javascript", body: "export const Window = {};" });
|
||||
if (url.pathname === "/api/state") return json(state());
|
||||
if (url.pathname === "/api/usage/quotas") return json([]);
|
||||
if (url.pathname === "/api/groups") return json({ groups: [] });
|
||||
if (url.pathname === "/api/agents/cli") return json({ agents: {}, pending: false });
|
||||
if (url.pathname === "/api/providers") return json({ providers: [], gateway: { running: true } });
|
||||
if (url.pathname === "/api/plugins") return json({ plugins: [] });
|
||||
if (url.pathname.startsWith("/api/")) return json({});
|
||||
const file = path.join(assets, url.pathname === "/" ? "index.html" : url.pathname);
|
||||
const contentType = { ".html": "text/html", ".js": "text/javascript", ".css": "text/css", ".svg": "image/svg+xml", ".png": "image/png" }[path.extname(file)];
|
||||
// an icon the assets don't have is a 404, as the app serves it
|
||||
const body = await fs.readFile(file).catch(() => null);
|
||||
if (body == null) return route.fulfill({ status: 404, body: "" });
|
||||
await route.fulfill({ body, contentType });
|
||||
};
|
||||
}
|
||||
|
||||
const row = (id) => `.row.agent[data-id="${id}"]`;
|
||||
const details = { en: "Details", zh: "详情", "zh-TW": "詳情", ja: "詳細", de: "Details" };
|
||||
|
||||
for (const engine of (process.env.BROWSER ? [process.env.BROWSER] : ["chromium", "webkit"])) {
|
||||
for (const lang of ["en", "zh", "zh-TW", "ja", "de"]) {
|
||||
for (const width of [1100, 420]) {
|
||||
test(`${engine} ${lang} ${width}px: Claude Desktop says its signed-in chats and projects stay, before and after it is turned on`, async (t) => {
|
||||
const browser = await (engine === "webkit" ? webkit.launch() : chromium.launch({ channel: "chromium" }));
|
||||
t.after(() => browser.close());
|
||||
const page = await (await browser.newContext({ viewport: { width, height: 700 }, reducedMotion: "reduce" })).newPage();
|
||||
page.setDefaultTimeout(5000);
|
||||
const errors = [];
|
||||
page.on("pageerror", (e) => errors.push(e.message));
|
||||
const tr = (k) => page.evaluate(([k, lang]) => (lang === "en" ? k : I18N[lang]?.[k]), [k, lang]);
|
||||
|
||||
// not connected: said on its row before the switch is touched
|
||||
await page.route("**/*", fixture(lang, false));
|
||||
await page.goto("http://magpie.test/?view=agents");
|
||||
await page.locator(`${row("claude-desktop")} .ag-st`).waitFor();
|
||||
for (const k of [before, once]) assert.ok(await tr(k), `${lang} has ${k.slice(0, 40)}`);
|
||||
assert.equal(await page.locator(`${row("claude-desktop")} .ag-st`).textContent(), await tr(before));
|
||||
assert.equal(await page.locator(`${row("codex")} .ag-st`).textContent(), (await tr(plain)).replace("{agent}", "Codex"));
|
||||
const wide = await page.evaluate(() => document.scrollingElement.scrollWidth - document.scrollingElement.clientWidth);
|
||||
assert.ok(wide <= 0, `the page scrolls sideways by ${wide}px`);
|
||||
|
||||
// connected: its opened row says it too
|
||||
await page.unroute("**/*");
|
||||
await page.route("**/*", fixture(lang, true));
|
||||
await page.goto("http://magpie.test/?view=agents");
|
||||
await page.locator(`${row("claude-desktop")} .ag-link`, { hasText: details[lang] }).click();
|
||||
const exp = page.locator(`${row("claude-desktop")} .ag-exp`);
|
||||
await exp.waitFor();
|
||||
assert.ok((await exp.textContent()).includes(await tr(once)), await exp.textContent());
|
||||
assert.deepEqual(errors, []);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user