mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-29 16:54:59 +00:00
feat: accumulate and return output in run_shell_commands
This commit is contained in:
parent
474b657221
commit
cd48eda88c
1 changed files with 5 additions and 1 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue