From 44ca351e4c377538e6182e84dde0af8aeb951174 Mon Sep 17 00:00:00 2001 From: "Your Name (aider)" Date: Sun, 28 Jul 2024 19:25:36 -0300 Subject: [PATCH] Display valid edit formats as a bulleted list --- aider/commands.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/aider/commands.py b/aider/commands.py index 69bd4c7db..81713c7e1 100644 --- a/aider/commands.py +++ b/aider/commands.py @@ -49,12 +49,13 @@ class Commands: ef = args.strip() valid_formats = [coder.edit_format for coder in coders.__all__ if getattr(coder, 'edit_format', None)] - dump(valid_formats) - + + self.io.tool_output("Valid edit formats:") + for format in valid_formats: + self.io.tool_output(f"• {format}") + if ef not in valid_formats: - self.io.tool_error( - f"Edit format \"{ef}\" should be one of: {', '.join(valid_formats)}" - ) + self.io.tool_error(f"Edit format \"{ef}\" is not valid.") return raise SwitchCoder(edit_format=ef)