mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-01 18:25:00 +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",
|
edit_format="help",
|
||||||
summarize_from_coder=False,
|
summarize_from_coder=False,
|
||||||
map_tokens=512,
|
map_tokens=512,
|
||||||
|
commands=self.clone(),
|
||||||
map_mul_no_files=1,
|
map_mul_no_files=1,
|
||||||
)
|
)
|
||||||
user_msg = self.help.ask(args)
|
user_msg = self.help.ask(args)
|
||||||
|
@ -794,6 +795,14 @@ class Commands:
|
||||||
dict(role="assistant", content=assistant_msg),
|
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):
|
def cmd_ask(self, args):
|
||||||
"Ask questions about the code base without editing any files"
|
"Ask questions about the code base without editing any files"
|
||||||
|
|
||||||
|
@ -808,6 +817,7 @@ class Commands:
|
||||||
from_coder=self.coder,
|
from_coder=self.coder,
|
||||||
edit_format="ask",
|
edit_format="ask",
|
||||||
summarize_from_coder=False,
|
summarize_from_coder=False,
|
||||||
|
commands=self.clone(),
|
||||||
)
|
)
|
||||||
|
|
||||||
user_msg = args
|
user_msg = args
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue