From c9003c598f0bd105c3c17e609d59413cc8cddb35 Mon Sep 17 00:00:00 2001 From: Your Name Date: Sun, 28 Jul 2024 19:23:21 -0300 Subject: [PATCH] Modify the `cmd_edit_format` method to provide a more informative error message when an invalid edit format is provided. --- aider/commands.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aider/commands.py b/aider/commands.py index 7f1533d3e..897899cbb 100644 --- a/aider/commands.py +++ b/aider/commands.py @@ -44,7 +44,7 @@ class Commands: models.sanity_check_models(self.io, model) raise SwitchCoder(main_model=model) - def cmd_mode(self, args): + def cmd_edit_format(self, args): "Switch to a new editing mode" ef = args.strip() @@ -52,7 +52,7 @@ class Commands: if ef not in valid_formats: self.io.tool_error( - f"Invalid edit format: {ef}. Valid formats are: {', '.join(valid_formats)}" + f"Edit format \"{ef}\" should be one of: {', '.join(valid_formats)}" ) return