feat: Add tree-sitter language pack configuration and version pinning

This commit is contained in:
Paul Gauthier 2025-02-10 14:25:42 -08:00 committed by Paul Gauthier (aider)
parent b2f6018e05
commit 44b1acd385
9 changed files with 112 additions and 90 deletions

View file

@ -25,16 +25,18 @@ from aider.utils import Spinner
warnings.simplefilter("ignore", category=FutureWarning)
from grep_ast.tsl import USING_TSL_PACK, get_language, get_parser # noqa: E402
dump(USING_TSL_PACK)
Tag = namedtuple("Tag", "rel_fname fname line name kind".split())
SQLITE_ERRORS = (sqlite3.OperationalError, sqlite3.DatabaseError, OSError)
CACHE_VERSION = 3
if USING_TSL_PACK:
CACHE_VERSION = 4
class RepoMap:
CACHE_VERSION = 3
TAGS_CACHE_DIR = f".aider.tags.cache.v{CACHE_VERSION}"
warned_files = set()