Replies: 1 comment
-
Hi @patosgui , Thanks for posting in the GitHub Community.
Yes, if you locally configure Copilot to ignore certain files, it should respect these settings and not consider those files when providing suggestions. This would work similarly to setting these exclusions at the repo or organization level. However, the specifics might depend on the exact version and configuration of your Copilot tool.
Copilot should not use it as context when providing code suggestions, regardless of whether it's open in a tab or not. Copilot should only consider the content of the "allowed" files when making suggestions.
GitHub Copilot typically uses the context of the file you are currently editing to generate its suggestions, and it's mainly designed to work with files within your current workspace or repository. As for files outside of your workspace or repository, even if they are open in the editor, Copilot does not generally use them as context, unless they are part of the current file's context (e.g., they are imported or referenced in the current file). Please note that this is based on the general working principles of Copilot and the exact behavior might depend on the specifics of the VS Code Copilot extension, which is a separate entity from this chat assistant. Hope that helps! |
Beta Was this translation helpful? Give feedback.
-
Select Topic Area
Question
Body
Hello,
I'm using copilot with vscode to get code completions. I have a couple of files that I absolutely don't want Copilot to use as a context due to licensing. I've found that I can disable Copilot for certain files with [0] and that is enough for me for the time being. I've also seen in limitations that:
I have a couple of questions:
To give a little bit more context, I'm using github enterprise and I can't enable path-based restrictions.
Many thanks!
[0]
Beta Was this translation helpful? Give feedback.
All reactions