undo print & reply

This commit is contained in:
Paul Gauthier 2023-05-10 18:27:05 -07:00
parent 79d38b5d68
commit 7a0e020c66
2 changed files with 8 additions and 1 deletions

View file

@ -107,7 +107,9 @@ class Commands:
return
self.coder.repo.git.reset("--hard", "HEAD~1")
self.console.print(
f"[red]{last_commit.message.strip()}\nThe above commit {self.coder.last_aider_commit_hash} was reset and removed from git.\n"
f"[red]{last_commit.message.strip()}\n"
f"The above commit {self.coder.last_aider_commit_hash} "
"was reset and removed from git.\n"
)
return prompts.undo_command_reply

View file

@ -101,3 +101,8 @@ The commit message MUST be in the past tense.
It must describe the changes *which have been made* in the diffs!
Reply with JUST the commit message, without quotes, comments, questions, etc!
"""
# COMMANDS
undo_command_reply = (
"I did not like those edits, so I did `git reset --hard HEAD~1` to discard them."
)