aider is AI pair programming in your terminal https://aider.chat/
Find a file
Paul Gauthier 81b8d193bc Move history_file from global into Coder class.
# Context:
USER: move history_file from global into Coder
ASSISTANT: To move the `history_file` variable from the global scope into the `Coder` class, you can add it as a class attribute and update its usage accordingly.

```python
coder.py
<<<<<<< ORIGINAL
history_file = ".coder.history"
try:
    readline.read_history_file(history_file)
except FileNotFoundError:
    pass
=======
class Coder:
    history_file = ".coder.history"

    def __init__(self, main_model, files, pretty):
        # ...
        try:
            readline.read_history_file(self.history_file)
        except FileNotFoundError:
            pass
        # ...
>>>>>>> UPDATED
```

```python
coder.py
<<<<<<< ORIGINAL
        readline.write_history_file(history_file)
=======
        readline.write_history_file(self.history_file)
>>>>>>> UPDATED
```
2023-05-08 23:42:55 -07:00
.flake8 debug 2023-05-08 22:55:55 -07:00
.pre-commit-config.yaml added flake8 2023-05-07 22:13:57 -07:00
coder.py Move history_file from global into Coder class. 2023-05-08 23:42:55 -07:00
dump.py init 2023-04-19 09:03:23 -07:00
prompts.py disabled gpt-3.5 powered edits 2023-05-08 23:40:56 -07:00