From b587685dc65df21c61bb586fdad874d58b6fd3fd Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Fri, 1 Sep 2023 14:08:35 -0700 Subject: [PATCH] aider: Adjusted path in `repomap.py` to correctly locate the `queries` directory in the parent directory. # Aider chat conversation: USER: the queries directory is currently in the parent dir of repomap.py. what should i do? ASSISTANT: If the `queries` directory is in the parent directory of `repomap.py`, you need to adjust the path in the `resource_filename` call accordingly. You can use `..` to refer to the parent directory. Here's how you can modify the `scm_fname` assignment in `repomap.py`: ```python aider/repomap.py <<<<<<< HEAD scm_fname = pkg_resources.resource_filename( __name__, f"queries/tree-sitter-{lang}-tags.scm" ) ======= scm_fname = pkg_resources.resource_filename( __name__, f"../queries/tree-sitter-{lang}-tags.scm" ) >>>>>>> updated ``` Please note that this assumes that the `queries` directory is directly in the parent directory of `repomap.py`. If it's in a different location, you'll need to adjust the path accordingly. --- aider/repomap.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aider/repomap.py b/aider/repomap.py index 1c90ab655..5b565c858 100644 --- a/aider/repomap.py +++ b/aider/repomap.py @@ -178,7 +178,7 @@ class RepoMap: # Load the tags queries scm_fname = pkg_resources.resource_filename( - __name__, f"queries/tree-sitter-{lang}-tags.scm" + __name__, f"../queries/tree-sitter-{lang}-tags.scm" ) query_scm = Path(scm_fname) if not query_scm.exists():