Reviewing Code Changes
One of AiderDesk's most powerful features is the ability to clearly visualize and manage the code changes proposed by the AI.
The Diff Viewer
Whenever Aider modifies a file, the changes are presented in a diff view within a code block in the chat. This provides a clear, side-by-side comparison of the original code and the new, modified version.
- Green highlighting indicates lines that have been added.
- Red highlighting indicates lines that have been removed.
- Darker shades within a highlighted line pinpoint the exact characters that were changed.
This visual format makes it easy to quickly assess the impact and correctness of the AI's modifications.
Understanding Aider's Diff Format
When Aider makes a change, it often uses a specific format within the code block to represent the edit:
<<<<<<< SEARCH
// Original code to be replaced
=======
// New code to insert
>>>>>>> REPLACE
AiderDesk automatically parses this format and renders it in the user-friendly diff viewer, so you don't have to read the raw diff syntax yourself.
Reverting Changes
You have granular control over which changes to accept. If you disagree with a specific modification proposed by the AI, you can easily revert it.
- Hover over the code block containing the change you want to undo.
- An Undo icon () will appear in the top-right corner of the block.
- Click the icon.
AiderDesk will immediately apply the revert, replacing the AI's new code with the original code in the actual file on your disk. This action is instant and allows you to selectively accept or reject parts of the AI's work.