mirror of
https://github.com/NanmiCoder/claude-code-haha.git
synced 2026-10-10 11:53:10 +08:00
新增测试Windows路径能正常缩短
输入C:\Users\test\project\src\index.ts
输出🔧 Read …/project/src/index.ts
This commit is contained in:
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user