GitHub Copilot can now tell developers when its suggestions match code in a public repository
the launch of a code referencing feature for GitHub Copilot. The key points are:
- GitHub Copilot previously had a feature that automatically blocked suggestions of matching public code.
- GitHub has now launched a private beta of a code referencing feature that shows matching code to developers in a sidebar, allowing them to decide what to do with it.
- This feature will also be added to Copilot Chat in the future.
- The original blocking feature was seen as a blunt tool, limiting developers' control and preventing them from exploring libraries and submitting pull requests.
- The code referencing feature allows developers to reject, use directly, or have Copilot rewrite the code to avoid matching the original code.
- Currently, it is not possible to filter results based on specific licenses, but the team is open to feedback on this.
- The feature is more likely to generate matching code when there is less context available for Copilot to work with.
- The feature utilizes a fast search engine to quickly find matching code and its license.
- The order of the matching code snippets is based on the search engine's findings, but GitHub may add sorting functionality in the future.