mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-30 09:14: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):
|
def run_shell_commands(self):
|
||||||
done = set()
|
done = set()
|
||||||
group = ConfirmGroup(set(self.shell_commands))
|
group = ConfirmGroup(set(self.shell_commands))
|
||||||
|
accumulated_output = ""
|
||||||
for command in self.shell_commands:
|
for command in self.shell_commands:
|
||||||
if command in done:
|
if command in done:
|
||||||
continue
|
continue
|
||||||
done.add(command)
|
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):
|
def handle_shell_commands(self, commands_str, group):
|
||||||
commands = commands_str.strip().splitlines()
|
commands = commands_str.strip().splitlines()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue