# assistant edit tool: Replace with flexible indentation \(\#27039\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/1d33bfde371a5c75da08d93da5a8811cf6a5df58)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 1d33bfde371a5c75da08d93da5a8811cf6a5df58

Requested commit: 1d33bfde371a5c75da08d93da5a8811cf6a5df58

Commit: 1d33bfde371a5c75da08d93da5a8811cf6a5df58

Tree: 00ef881b119b988695d10dbab51dba6bc3f6d56f

Author: Agus Zubiaga

Committer: GitHub

## Message

```
assistant edit tool: Replace with flexible indentation (#27039)

Sometimes the model produces SEARCH queries that don't match the
indentation of the source file exactly.

When we can't find an exact match, we'll now attempt to match the lines
while being more flexible about the leading whitespace as long as all
lines are consistently offset from the source, and extend the leading
whitespace in the REPLACE string accordingly.

Release Notes:

- N/A
```

## Parents

- [9377ef98179b676f087239f9ce855b98e07c3d8d](https://git.cafe/gitcafe/zed/commit/9377ef98179b676f087239f9ce855b98e07c3d8d?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/1d33bfde371a5c75da08d93da5a8811cf6a5df58?format=markdown)
