From cd48eda88c8ec9ebbc69cd3ab6d758ef7d0f0707 Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Tue, 27 Aug 2024 11:12:33 -0700 Subject: [PATCH] feat: accumulate and return output in run_shell_commands --- aider/coders/base_coder.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/aider/coders/base_coder.py b/aider/coders/base_coder.py index b13b70ce8..70dc096c9 100755 --- a/aider/coders/base_coder.py +++ b/aider/coders/base_coder.py @@ -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()