Copilot, ChatGPT and other products based on language model can write code. However, they sometimes produced programs with typing errors for statically typed languages. A better approach is to produce editor commands that interact with IDE and typechecker, instead of raw code.