mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-01 10:14:59 +00:00
Validate edit format and show error if invalid
This commit is contained in:
parent
8496390248
commit
4537e6c16a
1 changed files with 4 additions and 0 deletions
|
@ -51,6 +51,10 @@ class Commands:
|
||||||
ef = args.strip()
|
ef = args.strip()
|
||||||
valid_formats = "diff udiff whole".split()
|
valid_formats = "diff udiff whole".split()
|
||||||
|
|
||||||
|
if ef not in valid_formats:
|
||||||
|
self.io.tool_error(f"Invalid edit format: {ef}. Valid formats are: {', '.join(valid_formats)}")
|
||||||
|
return
|
||||||
|
|
||||||
raise SwitchModel(edit_format=ef)
|
raise SwitchModel(edit_format=ef)
|
||||||
|
|
||||||
def completions_model(self):
|
def completions_model(self):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue