fix: Update SeniorCoder class to configure and run JuniorCoder with appropriate settings

This commit is contained in:
Paul Gauthier 2024-09-25 10:27:27 -07:00 committed by Paul Gauthier (aider)
parent 087dbb40a3
commit 26745426ae

View file

@ -15,11 +15,19 @@ class SeniorCoder(AskCoder):
kwargs = dict(self.original_kwargs)
kwargs["edit_format"] = self.main_model.junior_edit_format
kwargs["suggest_shell_commands"] = False
kwargs["map_tokens"] = 0
kwargs["total_cost"] = self.total_cost
kwargs["cache_prompts"] = False
kwargs["num_cache_warming_pings"] = 0
junior_coder = Coder.create(
main_model=Model(self.main_model.junior_model_name),
io=self.io,
**kwargs,
)
junior_coder.show_announcements()
junior_coder.run(with_message=content, preproc=False)
self.move_back_cur_messages("I made those changes to the files.")
self.total_cost = junior_coder.total_cost