fix: Ensure proper initialization and updating of aider_commit_hashes in ArchitectCoder

This commit is contained in:
Emasoft 2025-05-17 05:40:22 +02:00
parent c5ed2e53f5
commit 41b4724e10

View file

@ -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):