mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-31 09:44:59 +00:00
Use a clone of Commands for sub-Coders, so main Command.coder does not get stomped
This commit is contained in:
parent
47b6c6a8ef
commit
ba8d32da42
1 changed files with 10 additions and 0 deletions
|
@ -778,6 +778,7 @@ class Commands:
|
|||
edit_format="help",
|
||||
summarize_from_coder=False,
|
||||
map_tokens=512,
|
||||
commands=self.clone(),
|
||||
map_mul_no_files=1,
|
||||
)
|
||||
user_msg = self.help.ask(args)
|
||||
|
@ -794,6 +795,14 @@ class Commands:
|
|||
dict(role="assistant", content=assistant_msg),
|
||||
]
|
||||
|
||||
def clone(self):
|
||||
return Commands(
|
||||
self.io,
|
||||
None,
|
||||
voice_language=self.voice_language,
|
||||
verify_ssl=self.verify_ssl,
|
||||
)
|
||||
|
||||
def cmd_ask(self, args):
|
||||
"Ask questions about the code base without editing any files"
|
||||
|
||||
|
@ -808,6 +817,7 @@ class Commands:
|
|||
from_coder=self.coder,
|
||||
edit_format="ask",
|
||||
summarize_from_coder=False,
|
||||
commands=self.clone(),
|
||||
)
|
||||
|
||||
user_msg = args
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue