From ba8d32da4280dd89e3f3cbc375d9793cb99a7d72 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Sat, 3 Aug 2024 10:01:57 -0300 Subject: [PATCH] Use a clone of Commands for sub-Coders, so main Command.coder does not get stomped --- aider/commands.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/aider/commands.py b/aider/commands.py index 2536de205..6e8b05153 100644 --- a/aider/commands.py +++ b/aider/commands.py @@ -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