Skip to main content

Copilot code referencing

GitHub Copilot checks suggestions for matches with publicly available code. Any matches are discarded or suggested with a code reference.

About Copilot code referencing in JetBrains IDEs

パブリック コードに一致する提案を許可した場合、GitHub Copilot は、提案が一致するコードの詳細を提供できます。 これは次の場合に発生します。

  • エディターでコード補完候補を受け入れる場合。
  • Copilot Chat の応答に一致するコードが含まれている場合。

Code referencing for Copilot code completion

メモ

  • コード補完に対するコード参照は、受け入れられた Copilot の候補に一致する場合にのみ発生します。 記述したコード、および変更した Copilot 候補は、パブリック コードへの一致に対してチェックされません。
  • 通常、パブリック コードへの一致は Copilot 候補の 1% 未満で発生するため、多くの候補でコード参照が表示されるわけではありません。

Code referencing for Copilot Chat

Copilot Chat から、パブリック GitHub リポジトリ内のコードと一致するコードを含む回答が提示された場合、回答の最後に、その一致するコードの詳細を表示するリンクと共にエディターに示されます。

About Copilot code referencing in Visual Studio Code

パブリック コードに一致する提案を許可した場合、GitHub Copilot は、提案が一致するコードの詳細を提供できます。 これは次の場合に発生します。

  • エディターでコード補完候補を受け入れる場合。
  • Copilot Chat の応答に一致するコードが含まれている場合。

Code referencing for Copilot code completion

メモ

  • コード補完に対するコード参照は、受け入れられた Copilot の候補に一致する場合にのみ発生します。 記述したコード、および変更した Copilot 候補は、パブリック コードへの一致に対してチェックされません。
  • 通常、パブリック コードへの一致は Copilot 候補の 1% 未満で発生するため、多くの候補でコード参照が表示されるわけではありません。

Code referencing for Copilot Chat

Copilot Chat から、パブリック GitHub リポジトリ内のコードと一致するコードを含む回答が提示された場合、回答の最後に、その一致するコードの詳細を表示するリンクと共にエディターに示されます。

About Copilot code referencing on GitHub.com

If you, or your organization, have allowed suggestions that match public code, then whenever a response from Copilot Chat includes matching code, details of the matches will be included in the response.

メモ

Typically, matches to public code occur infrequently, so you should not expect to see code references in many Copilot Chat responses.

About Copilot code referencing in Visual Studio

パブリック コードに一致する提案を許可した場合、GitHub Copilot は、提案が一致するコードの詳細を提供できます。 これは次の場合に発生します。

  • エディターでコード補完候補を受け入れる場合。
  • Copilot Chat の応答に一致するコードが含まれている場合。

Code referencing for Copilot code completion

メモ

  • コード補完に対するコード参照は、受け入れられた Copilot の候補に一致する場合にのみ発生します。 記述したコード、および変更した Copilot 候補は、パブリック コードへの一致に対してチェックされません。
  • 通常、パブリック コードへの一致は Copilot 候補の 1% 未満で発生するため、多くの候補でコード参照が表示されるわけではありません。

Code referencing for Copilot Chat

When Copilot Chat provides a response that includes code that matches code in a public GitHub repository, this is indicated below the suggested code, with a link to display details of the matched code in the output log.

How code referencing finds matching code

Copilot code referencing compares potential code suggestions and the surrounding code of about 150 characters against an index of all public repositories on GitHub.com.

Code in private GitHub repositories, or code outside of GitHub, is not included in the search process.

Limitations

The search index is refreshed every few months. As a result, newly committed code, and code from public repositories deleted before the index was created, may not be included in the search. For the same reason, the search may return matches to code that has been deleted or moved since the index was created.

References to matching code are currently available in JetBrains IDEs, Visual Studio, Visual Studio Code, and on the GitHub website.

Further reading