feat: accumulate and return output in run_shell_commands

This commit is contained in:
Paul Gauthier (aider) 2024-08-27 11:12:33 -07:00
parent 474b657221
commit cd48eda88c

View file

@ -1862,11 +1862,15 @@ class Coder:
def run_shell_commands(self):
done = set()
group = ConfirmGroup(set(self.shell_commands))
accumulated_output = ""
for command in self.shell_commands:
if command in done:
continue
done.add(command)
self.handle_shell_commands(command, group)
output = self.handle_shell_commands(command, group)
if output:
accumulated_output += output + "\n\n"
return accumulated_output.strip()
def handle_shell_commands(self, commands_str, group):
commands = commands_str.strip().splitlines()