Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。
TypeScript agentai-agentai-assistantandroidclaude-codecodexelectroniosllmmacosreact-nativetypescriptwindows
merge: sync main into account switcher
xd-bobo504fc0e441a7
diff --cc apps/desktop/src/main/agent-binaries/__tests__/linuxRuntimeFallback.test.tsindex 7b2457b7de,7b2457b7de..d5c5d275b3--- a/apps/desktop/src/main/agent-binaries/__tests__/linuxRuntimeFallback.test.ts+++ b/apps/desktop/src/main/agent-binaries/__tests__/linuxRuntimeFallback.test.ts@@@ -4,6 -4,6 +4,9 @@@ import path from 'node:path'import { gzipSync } from 'node:zlib';import { afterEach, describe, expect, it } from 'vitest';++import claudeLatest from '../../../../../../tools/claude/latest.json';++import codexLatest from '../../../../../../tools/codex/latest.json';++import {claudeLauncherScript,extractCodexBinaryFromTarGz,@@@ -39,9 -39,9 +42,11 @@@ function singleFileTar(name: string, codescribe('runtimeVersionMatchesPin', () => {it('requires Cindy-managed Claude and Codex binaries to match their pins exactly', () => {-- expect(runtimeVersionMatchesPin('claude-code', '2.1.219 (Claude Code)')).toBe(true);++ expect(runtimeVersionMatchesPin('claude-code', `${claudeLatest.version} (Claude Code)`)).toBe(++ true,++ );expect(runtimeVersionMatchesPin('claude-code', '2.1.218 (Claude Code)')).toBe(false);-- expect(runtimeVersionMatchesPin('codex', 'codex-cli 0.145.0')).toBe(true);++ expect(runtimeVersionMatchesPin('codex', `codex-cli ${codexLatest.version}`)).toBe(true);expect(runtimeVersionMatchesPin('codex', 'codex-cli 0.144.6')).toBe(false);});@@@ -53,10 -53,10 +58,14 @@@describe('systemRuntimeVersionSupportsPin', () => {it('accepts the pinned or newer Claude runtime and rejects older or prerelease-equivalent builds', () => {-- expect(systemRuntimeVersionSupportsPin('claude-code', '2.1.219 (Claude Code)')).toBe(true);++ expect(++ systemRuntimeVersionSupportsPin('claude-code', `${claudeLatest.version} (Claude Code)`),++ ).toBe(true);expect(systemRuntimeVersionSupportsPin('claude-code', '2.2.0 (Claude Code)')).toBe(true);expect(systemRuntimeVersionSupportsPin('claude-code', '2.1.218 (Claude Code)')).toBe(false);-- expect(systemRuntimeVersionSupportsPin('claude-code', '2.1.219-beta.1')).toBe(false);++ expect(++ systemRuntimeVersionSupportsPin('claude-code', `${claudeLatest.version}-beta.1`),++ ).toBe(false);expect(systemRuntimeVersionSupportsPin('claude-code', '2.2.0-beta.1')).toBe(false);});});@@@ -77,10 -77,10 +86,10 @@@ describeOnLinuxFileSystem('install patit('resolves the exact legacy CDN cache path for migration', () => {expect(legacyManagedBinaryPath('/userdata', 'claude-code')).toBe(-- path.join('/userdata', 'claude-code', '2.1.219', 'claude'),++ path.join('/userdata', 'claude-code', claudeLatest.version, 'claude'),);expect(legacyManagedBinaryPath('/userdata', 'codex')).toBe(-- path.join('/userdata', 'codex', '0.145.0', 'codex'),++ path.join('/userdata', 'codex', codexLatest.version, 'codex'),);});diff --cc apps/desktop/src/main/agent-binaries/__tests__/linuxRuntimeMigration.test.tsindex 15dc786eab,15dc786eab..4cad6fdd8d--- a/apps/desktop/src/main/agent-binaries/__tests__/linuxRuntimeMigration.test.ts+++ b/apps/desktop/src/main/agent-binaries/__tests__/linuxRuntimeMigration.test.ts@@@ -3,6 -3,6 +3,8 @@@ import os from 'node:os'import path from 'node:path';import { afterAll, afterEach, beforeAll, beforeEach, describe, expect, it, vi } from 'vitest';++import claudeLatest from '../../../../../../tools/claude/latest.json';++const { appMock, downloadMock, execFileMock } = vi.hoisted(() => ({appMock: { isPackaged: true, getPath: vi.fn<(name: string) => string>() },downloadMock: vi.fn(),@@@ -39,7 -39,7 +41,7 @@@ beforeEach(() =>callback(new Error('system lookup disabled in migration test'), '', '');return;}-- callback(null, '2.1.219 (Claude Code)\n', '');++ callback(null, `${claudeLatest.version} (Claude Code)\n`, '');});});@@@ -55,14 -55,14 +57,18 @@@ describe('legacy managed binary migratiit('reuses and atomically migrates the exact pinned Claude cache without network access', async () => {const legacyPath = fallback.legacyManagedBinaryPath(tempDir, 'claude-code');fs.mkdirSync(path.dirname(legacyPath), { recursive: true });-- fs.writeFileSync(legacyPath, '#!/bin/sh\necho "2.1.219 (Claude Code)"\n', { mode: 0o755 });++ fs.writeFileSync(++ legacyPath,++ `#!/bin/sh\necho "${claudeLatest.version} (Claude Code)"\n`,++ { mode: 0o755 },++ );fs.writeFileSync(path.join(path.dirname(legacyPath), '.verified'), '');const result = await fallback.prepareLinuxRuntimeFallback('claude-code');expect(result).toMatchObject({ ready: true, installed: false, source: 'legacy' });expect(result.binaryPath).toBe(fallback.privateBinaryPath(tempDir, 'claude-code'));-- expect(fs.readFileSync(result.binaryPath, 'utf8')).toContain('2.1.219');++ expect(fs.readFileSync(result.binaryPath, 'utf8')).toContain(claudeLatest.version);expect(downloadMock).not.toHaveBeenCalled();});@@@ -82,13 -82,13 +88,17 @@@null,command === systemClaude? '2.1.218 (Claude Code)\n'-- : '2.1.219 (Claude Code)\n',++ : `${claudeLatest.version} (Claude Code)\n`,'',);});downloadMock.mockImplementationOnce(async ({ targetPath }: { targetPath: string }) => {fs.mkdirSync(path.dirname(targetPath), { recursive: true });-- fs.writeFileSync(targetPath, '#!/bin/sh\necho "2.1.219 (Claude Code)"\n', { mode: 0o755 });++ fs.writeFileSync(++ targetPath,++ `#!/bin/sh\necho "${claudeLatest.version} (Claude Code)"\n`,++ { mode: 0o755 },++ );return {path: targetPath,size: fs.statSync(targetPath).size,diff --cc apps/desktop/src/renderer/__tests__/userInfoSectionMobileDownload.test.tsxindex 1922eaa52a,1687322fe0..f655d26d50--- a/apps/desktop/src/renderer/__tests__/userInfoSectionMobileDownload.test.tsx+++ b/apps/desktop/src/renderer/__tests__/userInfoSectionMobileDownload.test.tsx@@@ -90,10 -86,12 +90,10 @@@ describe('UserInfoSection mobile downlobetaChannelState.enableBeta = true;render(<UserInfoSection isCollapsed={false} />);- expect(screen.getByTestId('sidebar-beta-channel-badge').textContent).toBe(+ expect(screen.getByTestId('sidebar-beta-channel-label').textContent).toBe('settings.betaChannel.badge',);- expect(- screen.getByRole('link', { name: 'sidebar.user.settingsLinkBeta' }),- ).toBeTruthy();+ expect(screen.getByRole('button', { name: 'sidebar.user.moreLabel' })).toBeTruthy();});it.each([