mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-01 02:05:00 +00:00
Display valid edit formats as a bulleted list
This commit is contained in:
parent
2043da78d7
commit
44ca351e4c
1 changed files with 6 additions and 5 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue