I have been looking at tree-sitter quite a bit actually. I love that it has broad language support, which is a key design goal for my tool.
My only hesitation is that it doesn't appear to correctly identify multi-line function signatures & calls. If you look below at create, io.tool_error and __init__ you can see that the (row,col)-(row,col) indicies only reference the first line.
GPT would really benefit from seeing the entire function signature and call sites.
$ tree-sitter tags aider/coders/base_coder.py
...
create | function def (39, 8) - (39, 14) `def create(`
check_model_availability | call ref (54, 19) - (54, 43) `if not check_model_availability(main_model):`
tool_error | call ref (56, 23) - (56, 33) `io.tool_error(`
EditBlockCoder | call ref (66, 19) - (66, 33) `return EditBlockCoder(main_model, io, **kwargs)`
...
__init__ | function def (74, 8) - (74, 16) `def __init__(`
set | call ref (89, 26) - (89, 29) `self.abs_fnames = set()`
...