restore --show-diffs functionality #607

This commit is contained in:
Paul Gauthier 2024-05-23 14:07:20 -07:00
parent 2ed5e45677
commit 52ac35fcd2
2 changed files with 3 additions and 1 deletions

View file

@ -1328,6 +1328,8 @@ class Coder:
commit_hash, commit_message = res commit_hash, commit_message = res
self.last_aider_commit_hash = commit_hash self.last_aider_commit_hash = commit_hash
self.last_aider_commit_message = commit_message self.last_aider_commit_message = commit_message
if self.show_diffs:
self.commands.cmd_diff()
return self.gpt_prompts.files_content_gpt_edits.format( return self.gpt_prompts.files_content_gpt_edits.format(
hash=commit_hash, hash=commit_hash,

View file

@ -356,7 +356,7 @@ class Commands:
if self.coder.main_model.send_undo_reply: if self.coder.main_model.send_undo_reply:
return prompts.undo_command_reply return prompts.undo_command_reply
def cmd_diff(self, args): def cmd_diff(self, args=""):
"Display the diff of the last aider commit" "Display the diff of the last aider commit"
if not self.coder.repo: if not self.coder.repo:
self.io.tool_error("No git repository found.") self.io.tool_error("No git repository found.")