Switch to new CodeParser
I was a bit surprised to find that we have two versions of CodeParser
:
- Original one in https://gitlab.com/gitlab-org/modelops/applied-ml/code-suggestions/ai-assist/-/blob/2386114a5cfa422eb14081987fa13f34e5de5083/codesuggestions/prompts/code_parser.py#L11
- Refactored one in https://gitlab.com/gitlab-org/modelops/applied-ml/code-suggestions/ai-assist/-/blob/9f06b22ae792b5b0a4c281b19c1c3158b94bc156/codesuggestions/prompts/parsers/treesitter.py#L12 (!260 (merged))
The refactored one is a bit easier to extend for more complicated parsers like Ruby: !265 (merged)
I propose we drop the original one soon to avoid confusion and code duplication.