Background:
Let say I have a new framework that are build using dart programming language. I want to implement code completion in vscode that will auto generate code based on comment:
Example:
// Generate an component here with 4 inputs, the output should be a string.
...
The user insert the prompt the using comment //
and its will give code suggestion that on the prompt. Its going to be something like copilot.
Question
- Is this the correct design? I am thinking that the vscode extension should be just a frontend to capture user prompt and send to backend to process for the code completion. But based on my experience in inferencing ML models, this method give a huge latency. Since the model will takes some time to generate output. SO, I am a bit hesitate to say this is the right design.
- Any open source design that I can refer to? So far, I can only find tabnine.