fix(editor): preserve tabs in file views

This commit is contained in:
Tianyi Cui
2026-07-30 00:05:58 +08:00
parent 38e4a7bf7f
commit 514238ee47
11 changed files with 73 additions and 68 deletions

View File

@@ -470,11 +470,13 @@ describe('tool-str-replace-editor', () => {
const { ctx, root, owner } = await setup()
const path = join(root, 'Makefile')
await writeFile(path, 'target:\n\told\nremove\n')
expect(text(await call(ctx, owner, { command: 'view', path })))
.toContain(' 2 \told')
await call(ctx, owner, {
command: 'str_replace',
path,
old_str: 'old',
new_str: 'new',
old_str: '\told',
new_str: '\tnew',
})
await call(ctx, owner, {
command: 'str_replace',