mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-28 16:25:00 +00:00
refac
This commit is contained in:
parent
32289bc40f
commit
711212ef3c
1 changed files with 3 additions and 1 deletions
|
@ -47,6 +47,8 @@ def fname_to_components(fname, with_colon):
|
|||
|
||||
|
||||
class RepoMap:
|
||||
ctags_cmd = ["ctags", "--fields=+S", "--extras=-F", "--output-format=json"]
|
||||
|
||||
def __init__(self, use_ctags=True, root=None, main_model="gpt-4"):
|
||||
if not root:
|
||||
root = os.getcwd()
|
||||
|
@ -131,7 +133,7 @@ class RepoMap:
|
|||
if cache_key in TAGS_CACHE and TAGS_CACHE[cache_key]["mtime"] == file_mtime:
|
||||
return TAGS_CACHE[cache_key]["tags"]
|
||||
|
||||
cmd = ["ctags", "--fields=+S", "--extras=-F", "--output-format=json", filename]
|
||||
cmd = self.ctags_cmd + [filename]
|
||||
output = subprocess.check_output(cmd).decode("utf-8")
|
||||
output = output.splitlines()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue