When an agent adds code, the editor view asks the user to accept/reject the diffs. What is the purpose of this?
- What happens if I accept? This seems to have the same effect as just ignoring, since the code is already written. what is the difference between accept and ignore?
- What happens if I reject? Will this somehow sync with the agent?
Is there any doc about this?
Thanks!
Hello @ivan_terrible,
The Accept/Reject functionality is part of Antigravity’s safety and review mechanism for autonomous edits. When an agent proposes a change, it presents a diff in the editor view.
Accept: Integrates the proposed diff into your active file.
Reject: Discards the proposal and maintains the original code.
This workflow is essential for auditing the AI’s work before it affects your build or test environment. It essentially functions as a ‘local code review’ for your AI pair programmer.
Thanks. But what is the difference between ignoring and accepting the changes. I really don’t get it. The changes are already written, no? If i do a git commit without explicitely accepting those changes, those changed files will be in the commit. If i reject, the changes will be removed, which somehow makes sense. Seems we can also roll back all changes from within the agent.
In the Agent manager i can also review the files, but there is no accept/reject functionality, why? This stuff confuses the hell out of me.
@ivan_terrible, that is a great question.
The Agent Manager is designed for high-level oversight of the agent’s lifecycle and broad file access, whereas the Editor View is intended for granular, line-by-line code review. We focus the Accept/Reject functionality in the Editor because that is where the “diff” visualization is most readable and where developers typically make logic-based decisions.
While you can always use Ctrl+Z or Git to revert, the Reject button is a one-click “clean up” that tells the agent the suggestion was incorrect, allowing it to immediately attempt a different approach or revert the file to its exact state prior to the generation.