Fix : file agent loop problem

This commit is contained in:
martin legrand
2025-03-11 12:44:20 +01:00
parent 479bc2769b
commit cace6b5612
8 changed files with 7 additions and 3 deletions
+4
View File
@@ -30,6 +30,10 @@ class FileAgent(Agent):
exec_success, _ = self.execute_modules(answer)
answer = self.remove_blocks(answer)
self.last_answer = answer
complete = True
for name, tool in self.tools.items():
if tool.found_executable_blocks():
complete = False # AI read results and continue the conversation
return answer, reasoning
if __name__ == "__main__":