From 395cf4c14f0faf6c49a897785476cb459f57ab65 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Wed, 10 May 2023 18:14:47 -0700 Subject: [PATCH] wip: Added a new prompt message for undo command and updated the message format. --- aider/commands.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/aider/commands.py b/aider/commands.py index bb9b05d65..d29b40cd7 100644 --- a/aider/commands.py +++ b/aider/commands.py @@ -1,6 +1,7 @@ import os from rich.text import Text from prompt_toolkit.completion import Completion +from aider import prompts class Commands: @@ -106,10 +107,10 @@ class Commands: return self.coder.repo.git.reset("--hard", "HEAD~1") self.console.print( - f"[red]Undid the last commit: {last_commit.message.strip()}\n" + f"[red]{last_commit.message.strip()}\nThe above commit {self.coder.last_aider_commit_hash} was reset and removed from git.\n" ) - return "I did not like those edits, so I did `git reset --hard HEAD~1` to discard them." + return prompts.undo_command_reply def cmd_diff(self, args): "Display the diff of the last aider commit"