From 30d506ab8283182a3810af2913b594acdc133e47 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Fri, 9 Aug 2024 19:47:17 -0400 Subject: [PATCH] fix: Add undo hint after running one command --- aider/coders/base_coder.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/aider/coders/base_coder.py b/aider/coders/base_coder.py index 541aeff57..2eedfa9b2 100755 --- a/aider/coders/base_coder.py +++ b/aider/coders/base_coder.py @@ -685,6 +685,7 @@ class Coder: try: user_message = self.get_input() self.run_one(user_message) + self.show_undo_hint() except KeyboardInterrupt: self.keyboard_interrupt() except EOFError: @@ -1657,11 +1658,11 @@ class Coder: if self.show_diffs: self.commands.cmd_diff() - def show_undo_hint(self, commit_hash): + def show_undo_hint(self): if not self.commit_before_message: return if self.commit_before_message != self.repo.get_head(): - self.io.tool_output(f"You can use /undo to revert and discard commit {commit_hash}.") + self.io.tool_output(f"You can use /undo to undo and discard each aider commit.") def dirty_commit(self): if not self.need_commit_before_edits: