mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-30 17:24:59 +00:00
fix: Remove unnecessary debug statements and improve shell command confirmation prompt
This commit is contained in:
parent
7bcd6d4ebb
commit
8d0c2b1667
1 changed files with 3 additions and 6 deletions
|
@ -25,22 +25,19 @@ class EditBlockCoder(Coder):
|
|||
# might raise ValueError for malformed ORIG/UPD blocks
|
||||
edits = list(find_original_update_blocks(content, self.fence))
|
||||
|
||||
dump(edits)
|
||||
|
||||
return edits
|
||||
|
||||
def apply_edits(self, edits):
|
||||
failed = []
|
||||
passed = []
|
||||
|
||||
dump(edits)
|
||||
|
||||
for edit in edits:
|
||||
if edit[0] is None:
|
||||
edit = edit[1]
|
||||
# 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?"):
|
||||
self.io.tool_output()
|
||||
self.io.tool_output(f"Command: {edit.strip()}")
|
||||
if self.io.confirm_ask("Do you want to run this suggested shell command?"):
|
||||
try:
|
||||
result = subprocess.run(
|
||||
edit, shell=True, check=True, text=True, capture_output=True
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue