Skip to content

Commit ae08b4d

Browse files
authored
Merge pull request #12878 from anandmeg/copilot-exclusions
Updates for content exclusions in GitHub Copilot in Visual Studio
2 parents 7fe68d8 + 39e2bae commit ae08b4d

11 files changed

+66
-15
lines changed

docs/ide/visual-studio-github-copilot-admin.md

Lines changed: 38 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Admin controls for GitHub Copilot in Visual Studio
33
description: Learn about the new features for administrators in GitHub Copilot for Visual Studio that enable admins to manage Copilot effectively.
4-
ms.date: 7/30/2024
4+
ms.date: 8/13/2024
55
ms.topic: how-to
66
author: anandmeg
77
ms.author: meghaanand
@@ -13,17 +13,19 @@ monikerRange: vs-2022
1313

1414
# Admin controls for GitHub Copilot
1515

16-
Visual Studio 2022 version 17.10 introduces new features for administrators to configure and manage GitHub Copilot for their enterprise effectively.
17-
In this article, you learn how to disable Copilot for individual accounts or disable Copilot altogether.
16+
Visual Studio 2022 introduces new features for administrators to configure and manage GitHub Copilot for their enterprise effectively. These features provide administrators greater control over the use of Copilot within their organization. Admins can disable Copilot
17+
18+
In this article, you learn how to:
19+
- [Disable Copilot](#disabling-copilot-for-individual-enterprise-visual-studio-accounts)
20+
- [Configure content exclusion](#configure-content-exclusion)
1821

1922
## Disabling Copilot for individual Enterprise Visual Studio accounts
2023

21-
In version 17.10, we're introducing two new features to disable Copilot, ensuring that your repository is protected.
22-
Project administrators can disable Copilot for individual accounts or disable Copilot altogether via the [Visual Studio Administrative Templates (ADMX/ADML)](https://www.microsoft.com/en-us/download/details.aspx?id=104405). These features provide administrators with greater control over the use of Copilot within their organization.
24+
With Visual Studio version 17.10, project administrators can disable Copilot for individual accounts or disable Copilot altogether via the [Visual Studio Administrative Templates (ADMX/ADML)](https://www.microsoft.com/en-us/download/details.aspx?id=104405), ensuring that your repository is protected.
2325

24-
To configure and deploy these policies, you can use [Microsoft Intune](../install/administrative-templates.md#deploying-the-policies) or the Local Group Policy Editor directly on the client machine.
26+
To configure and deploy these policies, you can use [Microsoft Intune](../install/administrative-templates.md#deploying-the-policies) or the [Local Group Policy Editor](#configure-copilot-group-policy) directly on the client machine.
2527

26-
## Configure Copilot group policy
28+
### Configure Copilot group policy
2729

2830
1. Head over to the Microsoft Download Center and grab the Visual Studio [Group Policy Administrative Template files (ADMX/ADML)](https://www.microsoft.com/en-us/download/details.aspx?id=104405). It asks you where you want the files to be downloaded, ensure the location is `C:\Windows\PolicyDefinitions`.
2931

@@ -37,3 +39,32 @@ To configure and deploy these policies, you can use [Microsoft Intune](../instal
3739

3840
4. Restart your Visual Studio instance to pick up the new policy changes
3941

42+
## Configure content exclusion
43+
44+
Content exclusion for GitHub Copilot enables administrators to prevent certain files from being available to Copilot and keep sensitive content secure from Copilot use. You can use content exclusions to configure GitHub Copilot to ignore specific files in a [repository](https://docs.github.com/en/copilot/managing-github-copilot-in-your-organization/configuring-content-exclusions-for-github-copilot#configuring-content-exclusions-for-your-organization) or [organization](https://docs.github.com/en/copilot/managing-github-copilot-in-your-organization/configuring-content-exclusions-for-github-copilot#configuring-content-exclusions-for-your-repository). Content exclusion is only available with a GitHub Copilot Business or a GitHub Copilot Enterprise subscription.
45+
46+
With [Visual Studio 2022 version 17.11](/visualstudio/releases/2022/release-notes), GitHub Copilot for Visual Studio will ignore excluded content. When you exclude content from Copilot, completions and chat aren't available on the affected files.
47+
48+
### GitHub Copilot Completions in Visual Studio and content exclusions
49+
50+
- Code completions aren't available on excluded files.
51+
52+
:::image type="content" source="media/vs-2022/visual-studio-github-copilot-admin/copilot-content-exclusions-completions.png" alt-text="Screenshot of Copilot completions on an excluded file." lightbox="media/vs-2022/visual-studio-github-copilot-admin/copilot-content-exclusions-completions.png":::
53+
54+
- Excluded content isn't included in code completion suggestions in other files.
55+
56+
### GitHub Copilot Chat in Visual Studio and content exclusions
57+
58+
- Excluded files can't be referenced in the chat window or in inline chat.
59+
60+
**Chat window**
61+
62+
:::image type="content" source="media/vs-2022/visual-studio-github-copilot-admin/copilot-content-exclusions-chat-window.png" alt-text="Screenshot of using an excluded file in chat window." lightbox="media/vs-2022/visual-studio-github-copilot-admin/copilot-content-exclusions-chat-window.png":::
63+
64+
**Inline chat**
65+
66+
:::image type="content" source="media/vs-2022/visual-studio-github-copilot-admin/copilot-content-exclusions-chat-inline.png" alt-text="Screenshot of using an excluded file in inline chat." lightbox="media/vs-2022/visual-studio-github-copilot-admin/copilot-content-exclusions-chat-inline.png":::
67+
68+
- Excluded content isn't included in GitHub Copilot Chat's responses.
69+
70+
:::image type="content" source="media/vs-2022/visual-studio-github-copilot-admin/copilot-content-exclusions-chat-response.png" alt-text="Screenshot of chat's responses on excluded content." lightbox="media/vs-2022/visual-studio-github-copilot-admin/copilot-content-exclusions-chat-response.png":::

docs/ide/visual-studio-github-copilot-chat.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: About GitHub Copilot Chat in Visual Studio
33
description: Learn about the fully integrated GitHub Copilot Chat in Visual Studio. Use the chat interface to ask coding-related questions from right within the IDE.
4-
ms.date: 7/29/2024
4+
ms.date: 8/13/2024
55
ms.topic: overview
66
author: anandmeg
77
ms.author: meghaanand
@@ -56,6 +56,9 @@ There are two places you can ask Copilot these questions; in a [chat window](#as
5656

5757
See [tips to improve Copilot chat](copilot-chat-context.md) results to learn how to use [slash commands](copilot-chat-context.md#slash-commands), [references](copilot-chat-context.md#reference), [sources used](copilot-chat-context.md#find-context), and [threads](copilot-chat-context.md#threads) to get better answers with scoped context in Copilot Chat.
5858

59+
>[!NOTE]
60+
>With Visual Studio 2022 version 17.11, [content exclusion is available for GitHub Copilot Chat](visual-studio-github-copilot-admin.md#github-copilot-chat-in-visual-studio-and-content-exclusions) in Visual Studio. Content excluded by your admin will now be ignored in chat's responses. See [configuring content exclusions for GitHub Copilot](https://docs.github.com/copilot/managing-github-copilot-in-your-organization/configuring-content-exclusions-for-github-copilot?tool=visualstudio) to learn more.
61+
5962
### Ask questions in the chat window
6063

6164
The chat window of Copilot Chat in Visual Studio enables you to ask your questions and see answers in the chat pane. It is usually the best way to work with Copilot on programming help and general coding questions.
@@ -95,6 +98,10 @@ The inline chat view of Copilot Chat in Visual Studio enables you to ask your qu
9598

9699
:::image type="content" source="media/vs-2022/visual-studio-github-copilot-chat/copilot-chat-inline-diff-view.png" alt-text="Screenshot of code suggestions in Visual Studio diff view." lightbox="media/vs-2022/visual-studio-github-copilot-chat/copilot-chat-inline-diff-view.png" :::
97100

101+
1. You can promote your inline chat thread to the chat window by selecting **Continue in chat window**. This'll preserve the record and context of your conversation, and you can continue in the chat window.
102+
103+
:::image type="content" source="media/vs-2022/visual-studio-github-copilot-chat/promote-inline-chat-to-chat-window.png" alt-text="Screenshot of how to continue the inline chat thread in the chat window." :::
104+
98105
1. You can close the inline chat view by pressing **Esc**.
99106

100107
## Next steps

docs/ide/visual-studio-github-copilot-extension.md

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
22
title: About GitHub Copilot Completions in Visual Studio
33
description: Use GitHub Copilot completions in Visual Studio to use AI assistance to generate information about your code, including suggested edits and new code snippets.
4-
ms.date: 5/22/2024
5-
ms.topic: overview
4+
ms.date: 8/13/2024
5+
ms.topic: overview
66
author: anandmeg
77
ms.author: meghaanand
88
ms.manager: mijacobs
@@ -62,10 +62,20 @@ As you type code or comments in the editor, GitHub Copilot provides context-awar
6262
int subtractNumbers(
6363
```
6464

65-
1. Hover over the suggestion to see the GitHub Copilot command palette. You can select **Tab** or press `Tab` to accept the suggestion or continue typing to reject it. If alternate suggestions are available, you can select **next suggestion** or use the `Alt + .` keyboard shortcut to cycle through them.
66-
67-
:::image type="content" source="media/vs-2022/visual-studio-github-copilot-extension/github-copilot-code-suggestions.gif" alt-text="Animated screenshot that shows using the GitHub Copilot code suggestions in Visual Studio":::
65+
1. Hover over the suggestion to see the GitHub Copilot command palette.
66+
67+
**Accept suggestion**
68+
69+
Select **Tab** or press `Tab` **to accept** the suggestion or continue typing to reject it.
70+
71+
:::image type="content" source="media/vs-2022/visual-studio-github-copilot-extension/copilot-accept-code-suggestions.png" alt-text="Screenshot that shows accepting the GitHub Copilot code suggestions in Visual Studio":::
6872

73+
**Modify suggestion**
74+
75+
Select **Alt+/** or press `Alt+/` **to modify** the suggestion from Copilot. You can modify and curate the GitHub Copilot suggestions by adding context in inline chat or by editing the completion.
76+
77+
:::image type="content" source="media/vs-2022/visual-studio-github-copilot-extension/copilot-modify-code-completions.png" alt-text="Screenshot that shows modifying the GitHub Copilot code suggestions in Visual Studio":::
78+
6979
1. Add following code to see whole line completions from GitHub Copilot.
7080
7181
```csharp
@@ -74,7 +84,10 @@ As you type code or comments in the editor, GitHub Copilot provides context-awar
7484
int sum
7585
```
7686
77-
:::image type="content" source="media/vs-2022/visual-studio-github-copilot-extension/github-copilot-whole-line-completions.gif" alt-text="Animated screenshot that shows using the GitHub Copilot completions in Visual Studio":::
87+
:::image type="content" source="media/vs-2022/visual-studio-github-copilot-extension/github-copilot-whole-line-completions.gif" alt-text="Animated screenshot that shows using the GitHub Copilot completions in Visual Studio.":::
88+
89+
>[!NOTE]
90+
>With Visual Studio 2022 version 17.11, [content exclusion is available for GitHub Copilot Completions](visual-studio-github-copilot-admin.md#github-copilot-completions-in-visual-studio-and-content-exclusions) in Visual Studio. Completions and suggestions won't be available on content excluded by your admin. See [configuring content exclusions for GitHub Copilot](https://docs.github.com/copilot/managing-github-copilot-in-your-organization/configuring-content-exclusions-for-github-copilot?tool=visualstudio) to learn more.
7891
7992
## Exploring GitHub Copilot
8093
@@ -88,4 +101,4 @@ To learn more about the current GitHub Copilot extension for Visual Studio, cons
88101
89102
- [GitHub Copilot extension: Getting started](https://docs.github.com/copilot/getting-started-with-github-copilot?tool=visualstudio)
90103
- [GitHub Copilot: Your AI pair programmer](https://github.com/features/copilot)
91-
- [GitHub Copilot Trust Center](https://resources.github.com/copilot-trust-center/)
104+
- [GitHub Copilot Trust Center](https://resources.github.com/copilot-trust-center/)

0 commit comments

Comments
 (0)