From d996fbe1c3ef80e6ab383bc5eda872e1f8edf0c5 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Sat, 3 Jun 2023 17:47:45 -0700 Subject: [PATCH] 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`. --- aider/coder.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aider/coder.py b/aider/coder.py index 2252ba669..9523ccc51 100755 --- a/aider/coder.py +++ b/aider/coder.py @@ -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: