mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-31 17:55:01 +00:00
aider: Moved TAGS_CACHE
into the RepoMap
class.
# Context: USER: move `TAGS_CACHE` into the class ASSISTANT: To move the `TAGS_CACHE` into the `RepoMap` class, I will make the following changes: ```python aider/repomap.py <<<<<<< ORIGINAL # Global cache for tags TAGS_CACHE = {} ======= >>>>>>> UPDATED ``` ```python aider/repomap.py <<<<<<< ORIGINAL class RepoMap: ctags_cmd = ["ctags", "--fields=+S", "--extras=-F", "--output-format=json"] def __init__(self, use_ctags=None, root=None, main_model="gpt-4"): ======= class RepoMap: ctags_cmd = ["ctags", "--fields=+S", "--extras=-F", "--output-format=json"] TAGS_CACHE = {} def __init__(self, use_ctags=None, root=None, main_model="gpt-4"): >>>>>>> UPDATED ``` Now, the `TAGS_CACHE` is a class attribute of the `RepoMap` class.
This commit is contained in:
parent
ca74eee2f9
commit
5801bd9ca4
1 changed files with 4 additions and 5 deletions
|
@ -8,8 +8,6 @@ import tiktoken
|
||||||
|
|
||||||
from aider import prompts
|
from aider import prompts
|
||||||
|
|
||||||
# Global cache for tags
|
|
||||||
TAGS_CACHE = {}
|
|
||||||
|
|
||||||
# from aider.dump import dump
|
# from aider.dump import dump
|
||||||
|
|
||||||
|
@ -48,10 +46,11 @@ def fname_to_components(fname, with_colon):
|
||||||
return res
|
return res
|
||||||
|
|
||||||
|
|
||||||
class RepoMap:
|
class RepoMap:
|
||||||
ctags_cmd = ["ctags", "--fields=+S", "--extras=-F", "--output-format=json"]
|
ctags_cmd = ["ctags", "--fields=+S", "--extras=-F", "--output-format=json"]
|
||||||
|
TAGS_CACHE = {}
|
||||||
|
|
||||||
def __init__(self, use_ctags=None, root=None, main_model="gpt-4"):
|
def __init__(self, use_ctags=None, root=None, main_model="gpt-4"):
|
||||||
if not root:
|
if not root:
|
||||||
root = os.getcwd()
|
root = os.getcwd()
|
||||||
self.root = root
|
self.root = root
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue