mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-28 08:14:59 +00:00
aider is AI pair programming in your terminal
https://aider.chat/
![]() # Context: USER: switch get_input() to use prompt_toolkit for input ASSISTANT: To switch `get_input()` to use `prompt_toolkit` for input, you'll need to install the `prompt_toolkit` library and replace the current input method with the `prompt_toolkit`'s `prompt` function. Here's how to make the change: 1. Install `prompt_toolkit` by adding it to your project's requirements or running `pip install prompt_toolkit`. 2. Import `prompt` from `prompt_toolkit` at the beginning of the `coder.py` file. 3. Replace the current input method in the `get_input()` function with the `prompt` function from `prompt_toolkit`. Here are the changes to the `coder.py` file: ```python coder.py <<<<<<< ORIGINAL import sys import re import readline import traceback ======= import sys import re import traceback from prompt_toolkit import prompt >>>>>>> UPDATED ``` ```python coder.py <<<<<<< ORIGINAL while True: try: if multiline_input: line = input(". ") else: line = input("> ") except EOFError: return ======= while True: try: if multiline_input: line = prompt(". ") else: line = prompt("> ") except EOFError: return >>>>>>> UPDATED ``` These changes will replace the standard `input()` function with the `prompt_toolkit`'s `prompt` function in the `get_input()` method. |
||
---|---|---|
.flake8 | ||
.pre-commit-config.yaml | ||
coder.py | ||
dump.py | ||
main.py | ||
prompts.py | ||
test_utils.py | ||
utils.py |