# agent: Refactor edit file tool state handling \(\#55663\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 8f2ab516d0d29429ef61967a5874086d6dd605e6

Requested commit: 8f2ab516d0d29429ef61967a5874086d6dd605e6

Commit: 8f2ab516d0d29429ef61967a5874086d6dd605e6

Tree: f6e2dc85a8cc210da0f8fc3bbdaf8249468b23c1

Author: Bennet Bo Fenner

Committer: GitHub

## Message

```
agent: Refactor edit file tool state handling (#55663)

Ports some changes introduced in #51165 out to make merge conflicts
easier to handle.

Splits the `Pipeline` into two separate types for mode edit/write so we
don't need to maintain that invariant inside the pipeline/in the parser

Also moves the parser to be a submodule of `edit_file_tool`

Release Notes:

- N/A
```

## Parents

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

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