From 3a78f217b2ed99d48be622d05d05b621e5f77ffe Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Wed, 4 Sep 2024 08:40:20 -0700 Subject: [PATCH] feat: add error handling to cmd_diff and create cmd_diff_raw --- aider/commands.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/aider/commands.py b/aider/commands.py index fd0acfa5c..b6b37f9cd 100644 --- a/aider/commands.py +++ b/aider/commands.py @@ -517,8 +517,16 @@ class Commands: if self.coder.main_model.send_undo_reply: return prompts.undo_command_reply - def cmd_diff(self, args=""): + def cmd_diff(self, *args, **kwargs): "Display the diff of changes since the last message" + try: + # todo + pass + except ANY_GIT_ERROR as err: + self.io.tool_error(f"Unable to complete {cmd_name}: {err}") + + + def cmd_diff_raw(self, args=""): if not self.coder.repo: self.io.tool_error("No git repository found.") return