The GitHub Blog announced the general availability of code references on GitHub Copilot and Microsoft Azure AI. This allows developers to receive detailed information about matches while also allowing code suggestions that contain public code matches. This new feature aims to improve transparency and knowledge sharing within the developer community.
How code references work
With billions of files to index and latencies of only 10 to 20 ms, finding a specific match is a significant engineering feat. When a match is found, a notification appears in the editor showing the matching code, the file in which it appears, and any license information detected. This information is displayed for all open code matches detected in the model response.
GitHub has partnered with Microsoft Azure to make the Code Reference API available in Azure AI Content Safety. Users can take advantage of this feature through protected material detection for code filters, making this feature accessible to a wide range of users.
Why code references are important
The power of code references for individual developers
For individual developers using GitHub Copilot, this feature adds a layer of transparency and control. Developers can block suggestions that contain matching code or allow suggestions that contain more information about the match. This helps developers make informed decisions and increases their confidence in using Copilot.
The power of code references for your business
For enterprises, GitHub Copilot helps organizations innovate faster. To ensure responsible innovation, administrators can block proposals that match public code, protecting customers through GitHub’s indemnification promise. GitHub’s indemnification now extends to code reference usage for GitHub Copilot Business or Enterprise customers that comply with the cited license, allowing teams to benefit from improved context, usage, and efficiency.
The introduction of code references reflects the values of the open source community, which emphasizes transparency and knowledge sharing. GitHub aims to continue growing its AI capabilities while giving developers better tools for innovation.
Learn more about code references.
Image source: Shutterstock