From 711212ef3cbf60ac107d5b064d16f76c422d9344 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Fri, 26 May 2023 15:52:35 -0700 Subject: [PATCH] refac --- aider/repomap.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/aider/repomap.py b/aider/repomap.py index 26a52d064..3a324047b 100644 --- a/aider/repomap.py +++ b/aider/repomap.py @@ -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()