aider: Replaced Confirm.ask() calls with self.io.confirm_ask() in commands.py.

# Context:
USER: in commands, switch the ask() calls to use the io versions
ASSISTANT: I need to see the content of the `commands.py` file to make the necessary changes. Please provide the content of the file.
USER: Please note that I shared content of these additional files: aider/commands.py
ASSISTANT: I apologize for the oversight. I will now make the necessary changes to the `commands.py` file.

```python
aider/commands.py
<<<<<<< ORIGINAL
                    create_file = Confirm.ask(
                        (
                            f"No files matched '{word}'. Do you want to create the file and add it"
                            " to git?"
                        ),
                    )
                else:
                    create_file = Confirm.ask(
                        f"No files matched '{word}'. Do you want to create the file?"
                    )
=======
                    create_file = self.io.confirm_ask(
                        (
                            f"No files matched '{word}'. Do you want to create the file and add it"
                            " to git?"
                        ),
                    )
                else:
                    create_file = self.io.confirm_ask(
                        f"No files matched '{word}'. Do you want to create the file?"
                    )
>>>>>>> UPDATED
```

I have replaced the `Confirm.ask()` calls with `self.io.confirm_ask()` as requested.
This commit is contained in:
Paul Gauthier 2023-05-19 09:20:54 -07:00
parent d1551b46be
commit 4593e7812c

View file

@ -163,14 +163,14 @@ class Commands:
if not matched_files:
if self.coder.repo is not None:
create_file = Confirm.ask(
create_file = self.io.confirm_ask(
(
f"No files matched '{word}'. Do you want to create the file and add it"
" to git?"
),
)
else:
create_file = Confirm.ask(
create_file = self.io.confirm_ask(
f"No files matched '{word}'. Do you want to create the file?"
)