I've just completed solving Cursor IDE model completion problem called Character prefix conditioning.
https://github.com/Anilturaga/Character-Prefix-Conditioning