From 41b4724e10a8c54ae42892d052cbbc1b22e13aa9 Mon Sep 17 00:00:00 2001 From: Emasoft <713559+Emasoft@users.noreply.github.com> Date: Sat, 17 May 2025 05:40:22 +0200 Subject: [PATCH] fix: Ensure proper initialization and updating of aider_commit_hashes in ArchitectCoder --- aider/coders/architect_coder.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/aider/coders/architect_coder.py b/aider/coders/architect_coder.py index b8ef4fc16..545a3f3b3 100644 --- a/aider/coders/architect_coder.py +++ b/aider/coders/architect_coder.py @@ -57,7 +57,9 @@ class ArchitectCoder(AskCoder): self.move_back_cur_messages("I made those changes to the files.") self.total_cost += editor_coder.total_cost - self.aider_commit_hashes += editor_coder.aider_commit_hashes + if self.aider_commit_hashes is None: + self.aider_commit_hashes = set() + self.aider_commit_hashes.update(editor_coder.aider_commit_hashes or set()) else: # Create only one chat session with the editor coder llm model, not splitting the architect answer in chunks. editor_coder = Coder.create(**new_kwargs) @@ -71,8 +73,8 @@ class ArchitectCoder(AskCoder): editor_coder.run(with_message=content, preproc=False) self.move_back_cur_messages("I made those changes to the files.") - self.total_cost += editor_coder.total_cost - self.aider_commit_hashes += editor_coder.aider_commit_hashes + self.total_cost = editor_coder.total_cost + self.aider_commit_hashes = editor_coder.aider_commit_hashes def split_response_by_natural_delimiters(self, content):