# agent: Allow to accept and reject all via the panel \(\#31971\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 2645591cd5f4f13cc0e180e53068d940ce34505b

Requested commit: 2645591cd5f4f13cc0e180e53068d940ce34505b

Commit: 2645591cd5f4f13cc0e180e53068d940ce34505b

Tree: ad695617aa578417880c20fcfd5930136faa543a

Author: Danilo Leal

Committer: GitHub

## Message

```
agent: Allow to accept and reject all via the panel (#31971)

This PR introduces the "Reject All" and "Accept All" buttons in the
panel's edit bar, which appears as soon as the agent starts editing a
file. I'm also adding here a new method to the thread called
`has_pending_edit_tool_uses`, which is a more specific way of knowing,
in comparison to the `is_generating` method, whether or not the
reject/accept all actions can be triggered.

Previously, without this new method, you'd be waiting for the whole
generation to end (e.g., the agent would be generating markdown with
things like change summary) to be able to click those buttons, when the
edit was already there, ready for you. It always felt like waiting for
the whole thing was unnecessary when you really wanted to just wait for
the _edits_ to be done, as so to avoid any potential conflicting state.

<img
src="https://github.com/user-attachments/assets/0927f3a6-c9ee-46ae-8f7b-97157d39a7b5"
width="500"/>

---

Release Notes:

- agent: Added ability to reject and accept all changes from the agent
panel.

---------

Co-authored-by: Agus Zubiaga <hi@aguz.me>
```

## Parents

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

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