Note
- 从 GitHub Copilot 中排除的内容目前为公开 Beta 版,可能会有变动。
- 部分 IDE 目前支持内容排除。 请参阅“About content exclusions for GitHub Copilot”。
Propagating content exclusion changes to Visual Studio Code
In VS Code, you can wait up to 30 minutes to see the effect of a settings change, or you can manually reload content exclusion settings as follows:
- Access the Command Palette. For example, by pressing Shift+Command+P (Mac) / Ctrl+Shift+P (Windows/Linux).
- Type:
reload
. - Select Developer: Reload Window.
Testing changes to content exclusions in Visual Studio Code
After content exclusion changes propagate to VS Code, the Copilot icon indicates when Copilot has been disabled by a content exclusion.
-
Open a file that you expect to be affected by your content exclusions.
If a Copilot content exclusion applies to this file, the Copilot icon in the status bar has a diagonal line through it.
-
Hover over the Copilot icon. A popup message tells you whether an organization or the parent repository disabled Copilot for this file.
-
Optionally, you can also test content exclusions in Copilot Chat. Open the Copilot Chat window by clicking the Copilot Chat icon in the activity bar.
-
向 Copilot Chat 询问有关排除的文件的问题。 如果内容已成功排除,则 Copilot 将无法回答你的问题,并解释由于内容排除规则,某些文件已从对话中排除。
Propagating content exclusion changes to Visual Studio
In Visual Studio, you can wait up to 30 minutes to see the effect of a settings change, or you can manually reload the content exclusion settings by closing and reopening the application.
Testing changes to content exclusions in Visual Studio
In Visual Studio, the Copilot icon indicates when Copilot has been disabled by a content exclusion.
-
Open a file that you expect to be affected by your content exclusions.
If a Copilot content exclusion applies to this file, the Copilot icon in the status bar has a diagonal line through it.
-
Hover over the Copilot icon. A popup message tells you whether an organization or the parent repository disabled Copilot for this file.
Propagating content exclusion changes to JetBrains IDEs
In supported JetBrains IDEs, you can wait up to 30 minutes to see the effect of a settings change, or you can manually reload the content exclusion settings by closing and reopening the application.
Testing changes to content exclusions in JetBrains IDEs
In supported JetBrains IDEs, the Copilot icon indicates when Copilot has been disabled by a content exclusion.
-
Open a file that you expect to be affected by your content exclusions.
If a Copilot content exclusion applies to this file, the Copilot icon in the status bar has a diagonal line through it.
-
Hover over the Copilot icon. A popup message tells you whether an organization or the parent repository disabled Copilot for this file.
-
Optionally, you can also test content exclusions in Copilot Chat. Open the Copilot Chat window by clicking the Copilot Chat icon at the right side of the JetBrains IDE window.
-
向 Copilot Chat 询问有关排除的文件的问题。 如果内容已成功排除,则 Copilot 将无法回答你的问题,并解释由于内容排除规则,某些文件已从对话中排除。
Propagating content exclusion changes to Vim/Neovim
If you are working in Vim/Neovim, content exclusions are automatically fetched from GitHub each time you open a file.
Testing changes to content exclusions in Vim/Neovim
- Open a file that you expect to be affected by your content exclusions.
- Begin typing. If GitHub Copilot no longer provides inline suggestions as you type, the file is excluded.