# assistant: Edit files tool \(\#26506\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 47a89ad243c45df1a8aae0862ea98260c0ed7960

Requested commit: 47a89ad243c45df1a8aae0862ea98260c0ed7960

Commit: 47a89ad243c45df1a8aae0862ea98260c0ed7960

Tree: 57502cee5c5223ac954b80180d9ae7939ee39e06

Author: Agus Zubiaga

Committer: GitHub

## Message

`````
assistant: Edit files tool (#26506)

Exposes a new "edit files" tool that the model can use to apply
modifications to files in the project. The main model provides
instructions and the tool uses a separate "editor" model (Claude 3.5 by
default) to generate search/replace blocks like Aider does:

````markdown
mathweb/flask/app.py
```python
<<<<<<< SEARCH
from flask import Flask
=======
import math
from flask import Flask
>>>>>>> REPLACE
```
````

The search/replace blocks are parsed and applied as they stream in. If a
block fails to parse, the tool will apply the other edits and report an
error pointing to the part of the input where it occurred. This should
allow the model to fix it.


Release Notes:

- N/A

---------

Co-authored-by: Antonio Scandurra <me@as-cii.com>
`````

## Parents

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

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