mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-01 02:05:00 +00:00
feat: Update edit format on /model switch if using default
This commit is contained in:
parent
8b811c610a
commit
5516e6b279
1 changed files with 11 additions and 1 deletions
|
@ -93,7 +93,17 @@ class Commands:
|
||||||
weak_model=self.coder.main_model.weak_model.name,
|
weak_model=self.coder.main_model.weak_model.name,
|
||||||
)
|
)
|
||||||
models.sanity_check_models(self.io, model)
|
models.sanity_check_models(self.io, model)
|
||||||
raise SwitchCoder(main_model=model)
|
|
||||||
|
# Check if the current edit format is the default for the old model
|
||||||
|
old_model_edit_format = self.coder.main_model.edit_format
|
||||||
|
current_edit_format = self.coder.edit_format
|
||||||
|
|
||||||
|
new_edit_format = current_edit_format
|
||||||
|
if current_edit_format == old_model_edit_format:
|
||||||
|
# If the user was using the old model's default, switch to the new model's default
|
||||||
|
new_edit_format = model.edit_format
|
||||||
|
|
||||||
|
raise SwitchCoder(main_model=model, edit_format=new_edit_format)
|
||||||
|
|
||||||
def cmd_editor_model(self, args):
|
def cmd_editor_model(self, args):
|
||||||
"Switch the Editor Model to a new LLM"
|
"Switch the Editor Model to a new LLM"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue