Clarify and consolidate documentation for content exclusions for the different GitHub Copilot modes

未关闭
#42,617 9 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
38/100
Issue 类型
文档
描述清晰度
基本清楚
活跃度
活跃
技术栈
github
领域
documentation

调研方向

首先比较 issue 中链接的两个 GitHub Docs 页面,然后结合所引用的 VS Code 讨论,查看相关 issue 40951 和已关闭的 pull request 40952。在将指南整合到支持矩阵之前,与维护者确认受支持的模式和环境;完成的标准是文档解决这些矛盾并明确说明限制。

由索引模型根据 Issue 内容生成。

描述

content copilot needs SME Waiting on SME review
Code of Conduct
What article on docs.github.com is affected?

https://docs.github.com/en/copilot/how-tos/configure-content-exclusion/exclude-content-from-copilot#configuring-content-exclusion-for-your-repository (accessed on 29th January 2026)
https://docs.github.com/en/copilot/concepts/context/content-exclusion#availability-of-content-exclusion (accessed on 29th January 2026)

What part(s) of the article would you like to see updated?

Problem Description

The current documentation around GitHub Copilot content exclusion appears to be inconsistent and, in some cases, contradictory across different official sources. This makes it difficult to understand which Copilot tools and modes actually respect content exclusion rules.

Conflicting Documentation

Configure content exclusion (GitHub Docs)

https://docs.github.com/en/copilot/how-tos/configure-content-exclusion/exclude-content-from-copilot#configuring-content-exclusion-for-your-repository

This page states that GitHub Copilot CLI, Copilot coding agent, and Agent mode in Copilot Chat in IDEs do not support content exclusion, and refers to additional documentation for clarification.

Content exclusion concepts and availability (GitHub Docs)

https://docs.github.com/en/copilot/concepts/context/content-exclusion#availability-of-content-exclusion

This page indicates that content exclusion is available in Copilot Chat for Visual Studio Code, but includes the following note:

  • Content exclusion is in public preview on the GitHub website and GitHub Mobile.
  • Content exclusion is currently not supported in Edit and Agent modes of Copilot Chat in Visual Studio Code and other editors.
Copilot Agent Mode (Microsoft Learn)

https://learn.microsoft.com/en-us/visualstudio/ide/copilot-agent-mode?view=visualstudio#frequently-asked-questions

This documentation states that Agent mode cannot access files and directories excluded through file exclusion, which suggests that content exclusion is respected by Agent mode, at least in Visual Studio.

Observed Behavior

When testing a simple scenario, content exclusion appeared to work across all Copilot modes, including those documented as unsupported. This may indicate:

  • Partial or implicit support depending on the tool or environment
  • Differences between file exclusion and content exclusion
  • Outdated or incomplete documentation

For the testing scenario we added an GitLab Repository for the content exclusion in the GitHub Copilot Business content exclusion setting and tested for the ask, edit and agent mode in the VS Code Chat if the file can be explained. For all the modes the response said that no context was attached even when i manually drag and dropped the file into the chat window.

Requested Improvement

The documentation should be updated to clearly and explicitly describe:

  • Which Copilot tools and modes support content exclusion
  • Which modes do not support it, and in what way
  • Whether behavior differs between:
    • Chat, Edit, and Agent modes
    • IDEs (VS Code, Visual Studio) and the GitHub website
  • Any known limitations, caveats, or indirect behaviors that may cause content exclusion to appear to work even when it is not fully supported

A concise support matrix or table outlining Copilot mode vs. content exclusion behavior would greatly improve clarity and help users avoid incorrect assumptions.

Clear and accurate documentation is particularly important for business and enterprise users, as content exclusion is often a critical compliance and data-protection requirement. Organizations need to clearly understand which Copilot modes and tools can be safely used while content exclusion is enabled, and which modes may bypass or partially ignore these rules. Without this clarity, there is a risk of unintentional exposure of sensitive or proprietary information and uncertainty about whether Copilot usage complies with internal policies and regulatory obligations.

Related Issues and Pull Requests
Additional information

No response

主要语言
TypeScript
星标
20.9k
派生
68.8k
平均合并
13 小时 55 分钟
30 天内合并 PR
105

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

github/docs 的其他 Issue

查看 github/docs 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。