Skip to main content

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 comparison of the original code and the new, modified version.

Diff View Modes

AiderDesk offers three different ways to visualize code changes, which you can switch between using the mode selector in the top-right corner of any diff code block:

  • Side-by-Side: The classic view showing the original code on the left and the modified code on the right.
  • Unified: Displays changes inline within a single column, showing deletions and additions sequentially.
  • Compact: A space-saving mode that merges modified lines and highlights character-level edits inline for maximum density.

You can also set your preferred default view mode in General Settings.

Diff Viewer Modes

Visual Indicators

Regardless of the mode, the following indicators help you identify changes:

  • 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.

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.

  1. Hover over the code block containing the change you want to undo.
  2. An Undo icon () will appear in the top-right corner of the block.
  3. 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.