Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。
TypeScript agentai-agentai-assistantandroidclaude-codecodexelectroniosllmmacosreact-nativetypescriptwindows
test(desktop): 修复 sentPastedTextPreview 源码扫描在 Windows 上的 CRLF 误红
zqchris9fb8cd3226f8
diff --git a/apps/desktop/src/renderer/__tests__/sentPastedTextPreview.test.ts b/apps/desktop/src/renderer/__tests__/sentPastedTextPreview.test.tsindex 5139d32724..3c699bf4a6 100644--- a/apps/desktop/src/renderer/__tests__/sentPastedTextPreview.test.ts+++ b/apps/desktop/src/renderer/__tests__/sentPastedTextPreview.test.ts@@ -34,7 +34,10 @@ import {import type { PastedTextRange } from '@/lib/imageRef';const sourcePath = resolve(__dirname, '..', 'components', 'chat', 'UserMessage.tsx');-const source = readFileSync(sourcePath, 'utf8');+// Windows 检出会把 .tsx 变成 CRLF(.gitattributes 只对 .sh/.mjs 等固定 LF),下面的+// 源码断言里有匹配裸 \n 的地方,不归一化就只在 Windows 上红。与本目录其它源码扫描+// 用例(collabEntryPolicy / controlledBannerPlacement 等)同一约定。+const source = readFileSync(sourcePath, 'utf8').replace(/\r\n/g, '\n');const LOCALES = ['zh-CN', 'en', 'ja', 'ko'] as const;