Copilot knows a lot about other things not just code
reddit.com
reddit.com
Movie ends with the entire solar system turned to computronium while a happy uploaded dev marries his code completion waifu in virtual reality.
I have created few system design for building AI. If Copilot figured this out https://github.com/imvetri/artificial-intelligence it will be interesting
In my opinion, it is not powerful yet. It is only when it is able to update its model when user corrects it.
Make the AI trace control flow.
Then learnt language syntax or teach language syntax,
They build a model for all control flows and label it.
When user prompts for a code, it does NLP, then find the matching label and returns the control flow
A wild guess - trace the control flow