# agent_ui: Make single file review actions match panel \(\#41718\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 00ff89f00fc771c41c36bb577c6e50893e4a9625

Requested commit: 00ff89f00fc771c41c36bb577c6e50893e4a9625

Commit: 00ff89f00fc771c41c36bb577c6e50893e4a9625

Tree: 4fa9f7cb10c586190241524a2927915b2f3c4cea

Author: Danilo Leal

Committer: GitHub

## Message

```
agent_ui: Make single file review actions match panel (#41718)

When we introduced the ACP-based agent panel, the condition that the
"review" | "reject" | "keep" buttons observed to be displayed got
mismatched between the panel and the pane (when in the single file
review scenario). In the panel, the buttons appear as soon as there are
changed buffers, whereas in the pane, they appear when response
generation is done.

I believe that making them appear at the same time, observing the same
condition, is the desired behavior. Thus, I think the panel behavior is
more correct, because there are loads of times where agent response
generation isn't technically done (e.g., when there's a command waiting
for permission to be run) but the _file edit_ has already been performed
and is in a good state to be already accepted or rejected.

So, this is what this PR is doing; effectively removing the "generating"
state from the agent diff, and switching to `EditorState::Reviewing`
when there are changed buffers.

Release Notes:

- Improved agent edit single file reviews by making the "reject" and
"accept" buttons appear at the same time.
```

## Parents

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

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