Replace coder.__name__ with coder.edit_format in the list comprehension to ensure that the actual edit format names are collected rather than the class names of the coders.

This commit is contained in:
Your Name (aider) 2024-07-28 19:23:39 -03:00
parent 7f028eeb1e
commit 50f3ab69dc

View file

@ -48,7 +48,7 @@ class Commands:
"Switch to a new editing mode"
ef = args.strip()
valid_formats = [coder.__name__ for coder in self.coder.__all__ if hasattr(coder, 'edit_format')]
valid_formats = [coder.edit_format for coder in self.coder.__all__ if hasattr(coder, 'edit_format')]
if ef not in valid_formats:
self.io.tool_error(