


Microsoft has announced that Visual Studio now supports code referencing for GitHub Copilot completions.
Code referencing enables developers to verify if the suggestions coming from Copilot are based on public code, which could potentially lead to open-source licensing issues depending on what the developer is using the code for.
“By integrating code referencing into GitHub Copilot, we are fostering a culture of knowledge sharing and transparency. This feature not only empowers individual developers but also supports larger teams in navigating the complexities of public code with ease,” Simona Liao, product manager at Microsoft, wrote in a blog post.
When a developer accepts a suggestion that matches code found in a public GitHub repository, they will receive a notification that displays the match, including information about the license type and a link to the GitHub repository it was found in.
The company noted that less than 1% of Copilot completions (perhaps higher if working in open-source repositories) match public code, so developers will not see code references for the majority of their accepted completions.
According to Microsoft, code referencing only runs on accepted suggestions from Copilot, not on code a developer has written.
This feature was previously introduced in Copilot Chat, and now it is available across Visual Studio itself.
“This new functionality offers developers greater transparency on their code completions (or “gray text”) by providing detailed information on any public code matches found. Prior to this change, Copilot completions with public code match were automatically blocked. Now, developers have the choice to access more code completions and receive sufficient information about any public code matches, enabling them to make informed decisions,” Liao wrote.