mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-05 20:25:01 +00:00
feat: Add support for executing shell commands in apply_edits
This commit is contained in:
parent
c4855c84da
commit
5f4d6bc4a5
1 changed files with 27 additions and 16 deletions
|
@ -30,6 +30,17 @@ class EditBlockCoder(Coder):
|
||||||
failed = []
|
failed = []
|
||||||
passed = []
|
passed = []
|
||||||
for edit in edits:
|
for edit in edits:
|
||||||
|
if isinstance(edit, str):
|
||||||
|
# This is a shell command
|
||||||
|
self.io.tool_output(f"Shell command: {edit}")
|
||||||
|
if self.io.confirm_ask("Do you want to run this command?"):
|
||||||
|
# Here you would add logic to run the shell command
|
||||||
|
self.io.tool_output("Command execution placeholder")
|
||||||
|
passed.append(edit)
|
||||||
|
else:
|
||||||
|
self.io.tool_output("Command execution skipped.")
|
||||||
|
failed.append(edit)
|
||||||
|
else:
|
||||||
path, original, updated = edit
|
path, original, updated = edit
|
||||||
full_path = self.abs_root_path(path)
|
full_path = self.abs_root_path(path)
|
||||||
content = self.io.read_text(full_path)
|
content = self.io.read_text(full_path)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue