Regarding the issue of gray code completion hints, requesting assistance.

Answered

https://www.jetbrains.com/idea/whatsnew/2024-1/img/Full_line_code_completion.gif
IntelliJ IDEA Ultimate 2024.1 includes whole-line code completion for Java and Kotlin. There are also many similar plugins available in the IDEA plugin market. My question is about how the gray code completion hints are implemented. I understand that it involves obtaining the context of the code, passing this context to a large model, and then having the large model return the corresponding code. My first question is: How should this context be obtained, and which class is responsible for this implementation? I couldn't find this information in the plugin documentation. My second question is: After the large model returns the corresponding code, how do we display this code hint in the IDEA editor? I couldn't find which class to implement in the IDEA plugin documentation. Are there any corresponding examples on GitHub? Or are there examples available elsewhere that I could refer to?

0

Please sign in to leave a comment.