From e5ba5d5a07edd4de6c76dbd1749c8e052ac75a32 Mon Sep 17 00:00:00 2001 From: Raphaelowo <147674577+Raphaelowo@users.noreply.github.com> Date: Tue, 14 Jul 2026 01:55:18 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=B5=8B=E8=AF=95Windows?= =?UTF-8?q?=E8=B7=AF=E5=BE=84=E8=83=BD=E6=AD=A3=E5=B8=B8=E7=BC=A9=E7=9F=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 输入C:\Users\test\project\src\index.ts 输出🔧 Read …/project/src/index.ts --- adapters/common/__tests__/format.test.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/adapters/common/__tests__/format.test.ts b/adapters/common/__tests__/format.test.ts index 9ba63416..7815f704 100644 --- a/adapters/common/__tests__/format.test.ts +++ b/adapters/common/__tests__/format.test.ts @@ -118,8 +118,15 @@ describe('formatToolUse', () => { expect(result).toBe('🔧 Read …/project/src/index.ts') }) + + it('shortens Windows paths in file tool summaries', () => { + const result = formatToolUse('Read', {file_path: 'C:\\Users\\test\\project\\src\\index.ts'}) + + expect(result).toBe('🔧 Read …/project/src/index.ts') + }) }) + describe('formatPermissionRequest', () => { it('includes tool name, input preview, and request ID', () => { const result = formatPermissionRequest('Bash', { command: 'rm -rf /' }, 'abcde')