aider: Updated the Coder class in aider/coder.py to accept the map_tokens parameter and pass it to the RepoMap class instead of use_ctags.

# Context:
USER: I added these *read-write* files: aider/coder.py
ASSISTANT: Great! Now I will modify the `aider/coder.py` file to accept and use the `map_tokens` parameter instead of `use_ctags`.

```python
aider/coder.py
<<<<<<< ORIGINAL
    def __init__(
        self,
        io,
        main_model="gpt-4",
        fnames=None,
        pretty=True,
        show_diffs=False,
        auto_commits=True,
        dirty_commits=True,
        dry_run=False,
        use_ctags=False,
        verbose=False,
        openai_api_key=None,
    ):
        ...
        self.repo_map = RepoMap(use_ctags, self.root, self.main_model, rm_io)
=======
    def __init__(
        self,
        io,
        main_model="gpt-4",
        fnames=None,
        pretty=True,
        show_diffs=False,
        auto_commits=True,
        dirty_commits=True,
        dry_run=False,
        map_tokens=1024,
        verbose=False,
        openai_api_key=None,
    ):
        ...
        self.repo_map = RepoMap(map_tokens, self.root, self.main_model, rm_io)
>>>>>>> UPDATED
```

This change updates the `Coder` class in `aider/coder.py` to accept the `map_tokens` parameter and pass it to the `RepoMap` class instead of `use_ctags`.
This commit is contained in:
Paul Gauthier 2023-06-03 17:47:45 -07:00
parent 15f34e2864
commit d996fbe1c3

View file

@ -45,7 +45,7 @@ class Coder:
auto_commits=True,
dirty_commits=True,
dry_run=False,
use_ctags=False,
map_tokens=1024,
verbose=False,
openai_api_key=None,
):
@ -99,7 +99,7 @@ class Coder:
else:
rm_io = None
self.repo_map = RepoMap(use_ctags, self.root, self.main_model, rm_io)
self.repo_map = RepoMap(map_tokens, self.root, self.main_model, rm_io)
def find_common_root(self):
if self.abs_fnames: