mirror of
https://github.com/NanmiCoder/cc-haha
synced 2026-07-16 13:03:31 +08:00
新增测试Windows路径能正常缩短
输入C:\Users\test\project\src\index.ts
输出🔧 Read …/project/src/index.ts
This commit is contained in:
parent
d79959c355
commit
e5ba5d5a07
@ -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')
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user