Skip to content

armgit / cindy

Public Imported from GitHub
0

Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。

fix(desktop): 让 Forge 入口源码切片测试兼容 Windows 换行

fmfsaisai774cbb143274
diff --git a/apps/desktop/src/main/cindy-brain/__tests__/forgeOidcInstallEntry.test.ts b/apps/desktop/src/main/cindy-brain/__tests__/forgeOidcInstallEntry.test.ts
index f1d1b4ef7b..329bc5a3f5 100644
--- a/apps/desktop/src/main/cindy-brain/__tests__/forgeOidcInstallEntry.test.ts
+++ b/apps/desktop/src/main/cindy-brain/__tests__/forgeOidcInstallEntry.test.ts
@@ -2,7 +2,9 @@ import fs from 'node:fs';
import { fileURLToPath } from 'node:url';
import { describe, expect, it } from 'vitest';
-const source = fs.readFileSync(fileURLToPath(new URL('../index.ts', import.meta.url)), 'utf8');
+const source = fs
+ .readFileSync(fileURLToPath(new URL('../index.ts', import.meta.url)), 'utf8')
+ .replace(/\r\n/g, '\n');
function forgeInstallBody(): string {
const start = source.indexOf('export async function installOrUpdateLocalGhostPackageFromForge');