AI-native knowledge base & Evernote/Obsidian alternative with instant sync & native MCP. Free on Cloudflare or self-hosted via Docker.
HTML ai-agentcloudflarecloudflare-d1cloudflare-r2cloudflare-workersdockerelectronevernoteevernote-alternativeknowledge-basemcpnote-takingobsidian-alternativeoffline-firstpersonal-knowledge-basepwaself-hostedsqlitetiptapweb-clipper
fix: prevent WorkBuddy ACP login from hanging after cancellation
tianma-ifcf540e88b87a
diff --git a/apps/desktop/src/main/acp-host.mjs b/apps/desktop/src/main/acp-host.mjsindex 73c2c703..b1378bc0 100644--- a/apps/desktop/src/main/acp-host.mjs+++ b/apps/desktop/src/main/acp-host.mjs@@ -11,6 +11,7 @@ import { waitForChildProcessSpawn } from "./child-process-start.mjs";import { createAcpAdapterManager } from "./acp-adapter-manager.mjs";import { startAcpMcpBridge } from "./acp-mcp-bridge.mjs";import { withAntigravityMacProxy } from "./antigravity-proxy.mjs";+import { authenticateWorkBuddy, prepareWorkBuddyAuth } from "./workbuddy-auth.mjs";const ADAPTERS = {codex: { id: "codex", label: "Codex" },@@ -722,7 +723,7 @@ export function createAcpHostRuntime(options = {}) {return adapt(resolveAcpCommand(input, commandDeps));};- const connect = async (command, requestId, emit, signal, authMethodId, mcpServers = [], allowPermissions = false) => {+ const connect = async (command, requestId, emit, signal, authMethodId, mcpServers = [], allowPermissions = false, workBuddyAuth = null) => {const cwd = await createAcpWorkspace(mkdtempImpl, options.tmpRoot);let child = null;let authMethods = [];@@ -741,7 +742,8 @@ export function createAcpHostRuntime(options = {}) {if (authMethodId) {if (!authMethods.some((method) => method.id === authMethodId)) throw new Error("invalid_auth_method");authenticationPending = true;- await connection.authenticate({ methodId: authMethodId });+ if (workBuddyAuth) await authenticateWorkBuddy(workBuddyAuth, authMethodId, signal);+ else await connection.authenticate({ methodId: authMethodId });authenticationPending = false;}const session = await connection.newSession({ cwd, mcpServers });@@ -892,7 +894,10 @@ export function createAcpHostRuntime(options = {}) {if (!resolved.ok) return adapterFromResolution(id, resolved);let connected;try {- connected = await withHandshakeTimeout((signal) => connect(resolved.command, `auth-${id}`, () => {}, signal, input.methodId), authenticationTimeoutMs);+ connected = await withHandshakeTimeout(async (signal) => {+ const workBuddyAuth = id === "workbuddyCn" || id === "workbuddyIntl" ? await prepareWorkBuddyAuth(resolved.command) : null;+ return connect(workBuddyAuth?.command ?? resolved.command, `auth-${id}`, () => {}, signal, input.methodId, [], false, workBuddyAuth);+ }, authenticationTimeoutMs);const adapter = { ...adapterShell(id), state: "available", promptCapabilities: connected.promptCapabilities, authMethods: connected.authMethods, ...(resolved.version ? { version: resolved.version, managed: true } : {}) };latestStatus.set(id, adapter);return adapter;@@ -900,7 +905,7 @@ export function createAcpHostRuntime(options = {}) {const timedOut = error?.code === "TIMEOUT" && error?.authenticationPending;const adapter = {...adapterShell(id),- ...(timedOut ? { state: "needs_login", detail: "authentication_timeout" } : failureFields(classifyAcpFailure(error))),+ ...(timedOut ? { state: "needs_login", detail: "authentication_timeout" } : error?.message === "authentication_failed" ? { state: "needs_login", detail: "authentication_failed" } : failureFields(classifyAcpFailure(error))),...((timedOut || isAuthRequiredError(error)) ? { authMethods: error.authMethods ?? latestStatus.get(id)?.authMethods ?? [] } : {}),...(resolved.version ? { version: resolved.version, managed: true } : {}),};diff --git a/apps/desktop/src/main/acp-host.test.mjs b/apps/desktop/src/main/acp-host.test.mjsindex a802ac7f..19fa6c4e 100644--- a/apps/desktop/src/main/acp-host.test.mjs+++ b/apps/desktop/src/main/acp-host.test.mjs@@ -84,7 +84,7 @@ const collector = () => {};};-const fakeAgentSource = ({ reportPath, secretPath, allowImage, allowEmbedded, hold, requireAuth, advertiseAuth, promptRefusal, hangAuth, hangSession }) => `#!/usr/bin/env bun+const fakeAgentSource = ({ reportPath, secretPath, allowImage, allowEmbedded, hold, requireAuth, advertiseAuth, promptRefusal, hangAuth, hangSession, workBuddyAccountApi, workBuddyLoginFailure }) => `#!/usr/bin/env bunimport * as acp from ${JSON.stringify(sdkHref)};import { writeFileSync } from "node:fs";@@ -99,6 +99,27 @@ const promptRefusal = ${promptRefusal ? JSON.stringify(promptRefusal) : "null"};let authenticated = false;const report = { initialize: null, newSession: null, permission: null, readError: null, readResult: null, prompt: null, authMethod: null };const save = () => writeFileSync(reportPath, JSON.stringify(report));+if (${workBuddyAccountApi ? "true" : "false"}) {+ const { createServer } = await import("node:http");+ const server = createServer((req, res) => {+ if (req.headers.authorization !== "Bearer " + process.env.CODEBUDDY_GATEWAY_PASSWORD) {+ res.writeHead(401); res.end(); return;+ }+ const login = req.url.endsWith("/login");+ if (login) {+ report.accountLogin = true;+ authenticated = ${workBuddyLoginFailure ? "false" : "true"};+ save();+ }+ res.setHeader("Content-Type", "application/json");+ res.end(JSON.stringify({ data: login ? { success: true } : {+ authenticated,+ ...(authenticated ? { account: { userId: "fake-user" } } : {}),+ ...(report.accountLogin && ${workBuddyLoginFailure ? "true" : "false"} ? { loginError: "account.login.failed" } : {}),+ } }));+ });+ await new Promise((resolve) => server.listen(Number(process.env.SERVER__PORT), "127.0.0.1", resolve));+}writeFileSync(reportPath + ".pid", String(process.pid));let releaseHold = () => {};const released = new Promise((resolve) => {@@ -888,6 +909,34 @@ describe("ACP stdio session", () => {}}, 15_000);+ for (const loginFailure of [false, true]) sessionTest(`WorkBuddy account login ${loginFailure ? "returns failure without hanging" : "verifies ACP session without the broken authenticate RPC"}`, async () => {+ const directory = await mkdtemp(path.join(tmpdir(), "edgeever-acp-workbuddy-auth-"));+ const reportPath = path.join(directory, "report.json");+ try {+ const scriptPath = await writeFakeAgent(directory, {+ reportPath, requireAuth: true, hangAuth: true,+ workBuddyAccountApi: true, workBuddyLoginFailure: loginFailure,+ });+ const runtime = createAcpHostRuntime({+ authenticationTimeoutMs: 5_000,+ adapterManager: { get: () => ({ command: { command: process.execPath, args: [scriptPath] }, version: "fixture" }) },+ });+ const result = await runtime.authenticateAdapter({ id: "workbuddyIntl", methodId: "browser" });+ expect(result.state).toBe(loginFailure ? "needs_login" : "available");+ if (loginFailure) {+ expect(result.detail).toBe("authentication_failed");+ expect(result.authMethods).toEqual([{ id: "browser", name: "Browser" }]);+ }+ const report = await readReport(reportPath);+ expect(report.authMethod).toBeNull();+ expect(report.accountLogin).toBe(true);+ expect(Boolean(report.newSession)).toBe(!loginFailure);+ expect(runtime.listAdapters().find((adapter) => adapter.id === "workbuddyIntl").state).toBe(result.state);+ } finally {+ await rm(directory, { recursive: true, force: true });+ }+ }, 10_000);+sessionTest("ends an unanswered login with retry methods instead of a connection failure", async () => {const directory = await mkdtemp(path.join(tmpdir(), "edgeever-acp-auth-timeout-"));const reportPath = path.join(directory, "report.json");diff --git a/apps/desktop/src/main/workbuddy-auth.mjs b/apps/desktop/src/main/workbuddy-auth.mjsnew file mode 100644index 00000000..32a8987a--- /dev/null+++ b/apps/desktop/src/main/workbuddy-auth.mjs@@ -0,0 +1,52 @@+import { randomUUID } from "node:crypto";+import { createServer } from "node:net";+import { setTimeout as delay } from "node:timers/promises";++export async function prepareWorkBuddyAuth(command) {+ const server = createServer();+ const port = await new Promise((resolve, reject) => {+ server.once("error", reject);+ server.listen(0, "127.0.0.1", () => resolve(server.address().port));+ });+ await new Promise((resolve, reject) => server.close((error) => error ? reject(error) : resolve()));+ const password = randomUUID();+ return {+ command: {+ ...command,+ args: [...command.args, "--serve", "--acp-transport", "stdio", "--host", "127.0.0.1", "--port", String(port)],+ env: { ...command.env, SERVER__HOST: "127.0.0.1", SERVER__PORT: String(port), CODEBUDDY_GATEWAY_AUTH: "password", CODEBUDDY_GATEWAY_PASSWORD: password },+ },+ endpoint: `http://127.0.0.1:${port}`,+ password,+ };+}++// WorkBuddy's ACP authenticate handler ignores login() returning false and then+// waits forever for a session. Its local account API reports that failure and+// starts login without first logging out (which can cancel login via its watcher).+export async function authenticateWorkBuddy({ endpoint, password }, methodId, signal, { fetchImpl = fetch, pollIntervalMs = 500 } = {}) {+ const request = async (route, body) => {+ const response = await fetchImpl(`${endpoint}/api/v1/auth/account/${route}`, {+ method: body ? "POST" : "GET",+ headers: { "x-codebuddy-request": "1", Authorization: `Bearer ${password}`, ...(body ? { "Content-Type": "application/json" } : {}) },+ ...(body ? { body: JSON.stringify(body) } : {}),+ signal: AbortSignal.any([signal, AbortSignal.timeout(5_000)]),+ redirect: "error",+ });+ if (!response.ok) throw new Error("workbuddy_auth_unavailable");+ const result = (await response.json())?.data;+ if (!result || typeof result !== "object") throw new Error("workbuddy_auth_unavailable");+ return result;+ };+ const signedIn = (status) => status.authenticated === true && typeof status.account?.userId === "string" && Boolean(status.account.userId);+ const status = await request("status");+ if (signedIn(status)) return;+ const started = await request("login", { method: methodId });+ if (started.loginError || started.success !== true) throw new Error("authentication_failed");+ for (;;) {+ await delay(pollIntervalMs, undefined, { signal });+ const status = await request("status");+ if (signedIn(status)) return;+ if (status.loginError) throw new Error("authentication_failed");+ }+}diff --git a/apps/desktop/src/main/workbuddy-auth.test.mjs b/apps/desktop/src/main/workbuddy-auth.test.mjsnew file mode 100644index 00000000..97b70357--- /dev/null+++ b/apps/desktop/src/main/workbuddy-auth.test.mjs@@ -0,0 +1,65 @@+import { expect, test } from "bun:test";+import { authenticateWorkBuddy, prepareWorkBuddyAuth } from "./workbuddy-auth.mjs";++const fixture = (responses) => {+ const calls = [];+ return {+ calls,+ fetchImpl: async (url, options) => {+ calls.push({ url, ...options });+ const response = responses.shift();+ if (!response) throw new Error("unexpected request");+ return Response.json({ data: response });+ },+ };+};+const auth = { endpoint: "http://127.0.0.1:12345", password: "private-password" };++test("starts login without logout and waits for an authenticated account", async () => {+ const f = fixture([{ authenticated: false }, { success: true }, { authenticated: false }, { authenticated: true, account: { userId: "user" } }]);+ await authenticateWorkBuddy(auth, "external", new AbortController().signal, { ...f, pollIntervalMs: 1 });+ expect(f.calls.map((call) => new URL(call.url).pathname)).toEqual([+ "/api/v1/auth/account/status", "/api/v1/auth/account/login", "/api/v1/auth/account/status", "/api/v1/auth/account/status",+ ]);+ expect(JSON.parse(f.calls[1].body)).toEqual({ method: "external" });+ expect(f.calls.every((call) => call.headers.Authorization === "Bearer private-password" && call.headers["x-codebuddy-request"] === "1" && call.redirect === "error")).toBe(true);+});++test("preserves an existing authenticated account without signing it out", async () => {+ const f = fixture([{ authenticated: true, account: { userId: "saved-user" } }]);+ await authenticateWorkBuddy(auth, "external", new AbortController().signal, f);+ expect(f.calls).toHaveLength(1);+});++test("returns a swallowed or cancelled login failure before the overall timeout", async () => {+ const f = fixture([{ authenticated: false }, { success: true }, { authenticated: false, loginError: "account.login.failed" }]);+ await expect(authenticateWorkBuddy(auth, "external", new AbortController().signal, { ...f, pollIntervalMs: 1 })).rejects.toThrow("authentication_failed");+});++test("does not treat an opened browser or an accountless status as login success", async () => {+ const f = fixture([{ authenticated: true }, { success: true, authUrl: "https://example.com" }, { authenticated: true }, { loginError: "failed" }]);+ await expect(authenticateWorkBuddy(auth, "external", new AbortController().signal, { ...f, pollIntervalMs: 1 })).rejects.toThrow("authentication_failed");+});++test("stops pending polling when authentication times out", async () => {+ const f = fixture([{ authenticated: false }, { success: true }]);+ const signal = AbortSignal.timeout(20);+ await expect(authenticateWorkBuddy(auth, "external", signal, { ...f, pollIntervalMs: 100 })).rejects.toThrow();+ expect(f.calls).toHaveLength(2);+});++test("fails closed when the installed CLI lacks the account API", async () => {+ await expect(authenticateWorkBuddy(auth, "external", new AbortController().signal, { fetchImpl: async () => new Response("unsupported", { status: 404 }) })).rejects.toThrow("workbuddy_auth_unavailable");+});++test("binds the login server to loopback with a fresh password and keeps the edition", async () => {+ const command = { command: "electron", args: ["codebuddy", "--acp"], env: { ELECTRON_RUN_AS_NODE: "1", CODEBUDDY_INTERNET_ENVIRONMENT: "internal" } };+ const first = await prepareWorkBuddyAuth(command);+ const second = await prepareWorkBuddyAuth(command);+ expect(first.password).not.toBe(second.password);+ expect(first.endpoint).toMatch(/^http:\/\/127\.0\.0\.1:\d+$/);+ expect(first.command.env.CODEBUDDY_GATEWAY_PASSWORD).toBe(first.password);+ expect(first.command.env.CODEBUDDY_GATEWAY_AUTH).toBe("password");+ expect(first.command.env.CODEBUDDY_INTERNET_ENVIRONMENT).toBe("internal");+ expect(first.command.args).toContain("stdio");+});diff --git a/apps/web/src/components/settings/DesktopAcpAgentCard.tsx b/apps/web/src/components/settings/DesktopAcpAgentCard.tsxindex b74938c4..d2a1e850 100644--- a/apps/web/src/components/settings/DesktopAcpAgentCard.tsx+++ b/apps/web/src/components/settings/DesktopAcpAgentCard.tsx@@ -45,6 +45,7 @@ const statusKey = (adapter: DesktopAcpAdapter | undefined, probing: boolean) =>if (probing) return "aiAssistant.agentSource.probing";if (!adapter || adapter.detail === "not_probed") return "aiAssistant.agentSource.notProbed";if (adapter.detail === "authentication_timeout") return "aiAssistant.agentSource.authenticationTimedOut";+ if (adapter.detail === "authentication_failed") return "aiAssistant.agentSource.authenticationFailed";if (adapter.detail === "invalid_path") return "aiAssistant.agentSource.invalidPath";if (adapter.detail === "desktop_unavailable") return "aiAssistant.agentSource.localDisabled";if (adapter.id === "grokBuild" && adapter.state === "not_installed") return "aiAssistant.agentSource.grokBuildNotFound";diff --git a/package.json b/package.jsonindex 7646f23e..f00c2d41 100644--- a/package.json+++ b/package.json@@ -64,7 +64,7 @@"publish:stores": "bun scripts/store-delivery.mjs","publish:extension": "bun scripts/publish-web-clipper.mjs","test:desktop:sidecar": "bun scripts/test-desktop-sidecar.mjs",- "test:desktop": "bun test apps/desktop/src/main/global-shortcut.test.mjs apps/desktop/src/main/account-scope.test.mjs apps/desktop/src/main/app-protocol.test.mjs apps/desktop/src/main/child-process-start.test.mjs apps/desktop/src/main/clipboard-write.test.mjs apps/desktop/src/main/desktop-diagnostics.test.mjs apps/desktop/src/main/desktop-menu.test.mjs apps/desktop/src/main/desktop-update-flow.test.mjs apps/desktop/src/main/diagnostic-log.test.mjs apps/desktop/src/main/file-association.test.mjs apps/desktop/src/main/wechat-chat-archive.test.mjs apps/desktop/src/main/wechat-share-import.test.mjs apps/desktop/src/main/share-extension-registration.test.mjs apps/desktop/src/main/windows-share-menu.test.mjs apps/desktop/src/main/file-permissions.test.mjs apps/desktop/src/main/installation-location.test.mjs apps/desktop/src/main/local-data-reset.test.mjs apps/desktop/src/main/ai-direct.test.mjs apps/desktop/src/main/plugin-public-network.test.mjs apps/desktop/src/main/renderer-recovery.test.mjs apps/desktop/src/main/renderer-hibernate.test.mjs apps/desktop/src/main/renderer-startup-guard.test.mjs apps/desktop/src/main/renderer-storage-migration.test.mjs apps/desktop/src/main/resource-request.test.mjs apps/desktop/src/main/resource-url.test.mjs apps/desktop/src/main/scheduled-task-scheduler.test.mjs apps/desktop/src/main/screenshot-capture.test.mjs apps/desktop/src/main/staged-resource.test.mjs apps/desktop/src/main/staged-resource-alias.test.mjs apps/desktop/src/main/tray-icon.test.mjs apps/desktop/src/main/user-data-directory.test.mjs apps/desktop/src/main/window-open-policy.test.mjs apps/desktop/src/main/window-visibility.test.mjs apps/desktop/src/main/windows-update-trust.test.mjs apps/web/src/lib/api.test.mjs apps/web/src/lib/app-page-path.test.mjs apps/web/src/lib/clipboard.test.mjs apps/web/src/lib/desktop-renderer-ready.test.mjs apps/web/src/lib/desktop-workspace-restore.test.mjs apps/web/src/lib/desktop-repository.test.mjs apps/web/src/lib/desktop-resources.test.mjs apps/web/src/lib/desktop-acp.test.mjs apps/web/src/lib/desktop-sync.test.mjs apps/web/src/lib/local-mirror.test.mjs apps/web/src/lib/repository.test.mjs apps/web/src/lib/runtime.test.mjs apps/web/src/lib/screenshot-import.test.mjs apps/web/src/lib/wechat-chat-import.test.mjs apps/web/src/lib/shared-file-import.test.mjs apps/web/src/lib/sync-queue.test.mjs && bun test --cwd apps/desktop src/main/acp-adapter-manager.test.mjs src/main/acp-host.test.mjs src/main/antigravity-proxy.test.mjs src/main/acp-mcp-bridge.test.mjs && bun run test:desktop:sidecar",+ "test:desktop": "bun test apps/desktop/src/main/global-shortcut.test.mjs apps/desktop/src/main/account-scope.test.mjs apps/desktop/src/main/app-protocol.test.mjs apps/desktop/src/main/child-process-start.test.mjs apps/desktop/src/main/clipboard-write.test.mjs apps/desktop/src/main/desktop-diagnostics.test.mjs apps/desktop/src/main/desktop-menu.test.mjs apps/desktop/src/main/desktop-update-flow.test.mjs apps/desktop/src/main/diagnostic-log.test.mjs apps/desktop/src/main/file-association.test.mjs apps/desktop/src/main/wechat-chat-archive.test.mjs apps/desktop/src/main/wechat-share-import.test.mjs apps/desktop/src/main/share-extension-registration.test.mjs apps/desktop/src/main/windows-share-menu.test.mjs apps/desktop/src/main/file-permissions.test.mjs apps/desktop/src/main/installation-location.test.mjs apps/desktop/src/main/local-data-reset.test.mjs apps/desktop/src/main/ai-direct.test.mjs apps/desktop/src/main/plugin-public-network.test.mjs apps/desktop/src/main/renderer-recovery.test.mjs apps/desktop/src/main/renderer-hibernate.test.mjs apps/desktop/src/main/renderer-startup-guard.test.mjs apps/desktop/src/main/renderer-storage-migration.test.mjs apps/desktop/src/main/resource-request.test.mjs apps/desktop/src/main/resource-url.test.mjs apps/desktop/src/main/scheduled-task-scheduler.test.mjs apps/desktop/src/main/screenshot-capture.test.mjs apps/desktop/src/main/staged-resource.test.mjs apps/desktop/src/main/staged-resource-alias.test.mjs apps/desktop/src/main/tray-icon.test.mjs apps/desktop/src/main/user-data-directory.test.mjs apps/desktop/src/main/window-open-policy.test.mjs apps/desktop/src/main/window-visibility.test.mjs apps/desktop/src/main/windows-update-trust.test.mjs apps/web/src/lib/api.test.mjs apps/web/src/lib/app-page-path.test.mjs apps/web/src/lib/clipboard.test.mjs apps/web/src/lib/desktop-renderer-ready.test.mjs apps/web/src/lib/desktop-workspace-restore.test.mjs apps/web/src/lib/desktop-repository.test.mjs apps/web/src/lib/desktop-resources.test.mjs apps/web/src/lib/desktop-acp.test.mjs apps/web/src/lib/desktop-sync.test.mjs apps/web/src/lib/local-mirror.test.mjs apps/web/src/lib/repository.test.mjs apps/web/src/lib/runtime.test.mjs apps/web/src/lib/screenshot-import.test.mjs apps/web/src/lib/wechat-chat-import.test.mjs apps/web/src/lib/shared-file-import.test.mjs apps/web/src/lib/sync-queue.test.mjs && bun test --cwd apps/desktop src/main/acp-adapter-manager.test.mjs src/main/acp-host.test.mjs src/main/workbuddy-auth.test.mjs src/main/antigravity-proxy.test.mjs src/main/acp-mcp-bridge.test.mjs && bun run test:desktop:sidecar","verify:desktop-renderer": "bun scripts/verify-desktop-renderer.mjs","verify:renderer-origin-migration": "bun run --cwd apps/desktop verify-origin-migration","verify:desktop-cross-version-startup": "bun scripts/verify-desktop-cross-version-startup.mjs",diff --git a/packages/shared/src/i18n/en-US.ts b/packages/shared/src/i18n/en-US.tsindex ac4114e4..7c72e21c 100644--- a/packages/shared/src/i18n/en-US.ts+++ b/packages/shared/src/i18n/en-US.ts@@ -1545,6 +1545,7 @@ export const enUS = {updateFailed: "Automatic update failed. The previous version remains in use.",authenticating: "Signing in…",authenticationTimedOut: "Sign-in did not complete. Please try again.",+ authenticationFailed: "Sign-in failed or was cancelled. Try again.",authenticateWith: "Sign in with {{method}}",authAvailableHint: "This agent offers ACP sign-in. If sending a message requires login, complete it here.",loginUnavailable: "This ACP connector requires authentication but provides no ACP sign-in method. Authenticate in the agent, then check the connection again.",diff --git a/packages/shared/src/i18n/ja.ts b/packages/shared/src/i18n/ja.tsindex 1d3730bd..75105bbe 100644--- a/packages/shared/src/i18n/ja.ts+++ b/packages/shared/src/i18n/ja.ts@@ -1545,6 +1545,7 @@ export const ja = {updateFailed: "自動更新に失敗しました。以前のバージョンを継続して使用します。",authenticating: "ログイン中…",authenticationTimedOut: "ログインが完了しませんでした。再試行してください。",+ authenticationFailed: "ログインに失敗したか、キャンセルされました。再試行してください。",authenticateWith: "{{method}} でログイン",authAvailableHint: "この Agent は ACP ログインに対応しています。メッセージ送信時にログインを求められた場合は、ここで認証してください。",loginUnavailable: "この ACP 接続コンポーネントは認証が必要ですが、ACP のログイン方法を提供していません。エージェント側で認証してから再確認してください。",diff --git a/packages/shared/src/i18n/pl.ts b/packages/shared/src/i18n/pl.tsindex 221092e2..7c32a95b 100644--- a/packages/shared/src/i18n/pl.ts+++ b/packages/shared/src/i18n/pl.ts@@ -1545,6 +1545,7 @@ export const pl = {updateFailed: "Automatyczna aktualizacja nie powiodła się. Nadal używana jest poprzednia wersja.",authenticating: "Logowanie…",authenticationTimedOut: "Logowanie nie zostało ukończone. Spróbuj ponownie.",+ authenticationFailed: "Logowanie nie powiodło się lub zostało anulowane. Spróbuj ponownie.",authenticateWith: "Zaloguj się przez {{method}}",authAvailableHint: "Ten agent oferuje logowanie ACP. Jeśli wysłanie wiadomości wymaga zalogowania, dokończ je tutaj.",loginUnavailable: "Ten konektor ACP wymaga uwierzytelnienia, ale nie udostępnia metody logowania ACP. Uwierzytelnij się w agencie, a potem ponownie sprawdź połączenie.",diff --git a/packages/shared/src/i18n/zh-CN.ts b/packages/shared/src/i18n/zh-CN.tsindex a77464da..2c21252f 100644--- a/packages/shared/src/i18n/zh-CN.ts+++ b/packages/shared/src/i18n/zh-CN.ts@@ -1545,6 +1545,7 @@ export const zhCN = {updateFailed: "自动更新失败,正在继续使用原版本。",authenticating: "正在登录…",authenticationTimedOut: "登录未完成,请重试",+ authenticationFailed: "登录失败或已取消,请重试",authenticateWith: "使用 {{method}} 登录",authAvailableHint: "此 Agent 提供 ACP 登录方式。若发消息时提示需要登录,可在这里完成认证。",loginUnavailable: "这个 ACP 连接组件要求认证,但没有提供 ACP 登录入口。请在对应代理中完成认证后重试连接。",