From e2675a894cd431b2a0b4aa9f403cb0deef78b35a Mon Sep 17 00:00:00 2001 From: hubwriter Date: Tue, 4 Mar 2025 02:25:09 -0800 Subject: [PATCH] Copilot personal (UI-based) custom instructions in GitHub.com [GA] (#54566) Co-authored-by: Ben Ahmady <32935794+subatoi@users.noreply.github.com> --- .vscode/extensions.json | 13 +++++++++++++ ...rsonal-custom-instructions-for-github-copilot.md | 13 +++++++++---- ...sitory-custom-instructions-for-github-copilot.md | 7 +++++-- .../changing-the-ai-model-for-copilot-chat.md | 2 +- ...ging-the-ai-model-for-copilot-code-completion.md | 2 +- .../asking-github-copilot-questions-in-github.md | 2 +- .../reusables/copilot/personal-instructions-note.md | 3 +-- .../repository-vs-personal-instructions-note.md | 2 +- 8 files changed, 32 insertions(+), 12 deletions(-) create mode 100644 .vscode/extensions.json diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 000000000000..256277b09678 --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,13 @@ +{ + // See https://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations. + // Extension identifier format: ${publisher}.${name}. Example: vscode.csharp + + // List of extensions which should be recommended for users of this workspace. + "recommendations": [ + + ], + // List of extensions recommended by VS Code that should not be recommended for users of this workspace. + "unwantedRecommendations": [ + "ms-vscode-remote.remote-containers" + ] +} diff --git a/content/copilot/customizing-copilot/adding-personal-custom-instructions-for-github-copilot.md b/content/copilot/customizing-copilot/adding-personal-custom-instructions-for-github-copilot.md index 40cb6e9a69a4..88acb4c19a1b 100644 --- a/content/copilot/customizing-copilot/adding-personal-custom-instructions-for-github-copilot.md +++ b/content/copilot/customizing-copilot/adding-personal-custom-instructions-for-github-copilot.md @@ -21,13 +21,18 @@ For example, you can choose to always have {% data variables.product.prodname_co Personal custom instructions apply to conversations that you, as a user, have with {% data variables.product.prodname_copilot_chat_short %} across {% data variables.product.github %}, and are different from repository custom instructions, which apply to conversations in the context of a single repository. For more information on repository instructions, see [AUTOTITLE](/copilot/customizing-copilot/adding-repository-custom-instructions-for-github-copilot). -{% data reusables.copilot.repository-vs-personal-instructions-note %} +{% data reusables.copilot.repository-vs-personal-instructions-note %} If you are concerned about response quality, you can also choose to temporarily disable repository instructions. See [AUTOTITLE](/copilot/customizing-copilot/adding-repository-custom-instructions-for-github-copilot?tool=webui#enabling-or-disabling-repository-custom-instructions). ## Adding personal custom instructions -1. In the top right of any page on {% data variables.product.github %}, click the **{% octicon "copilot" aria-hidden="true" %}** {% data variables.product.prodname_copilot %} icon next to the search bar. -1. Select the {% octicon "kebab-horizontal" aria-label="Open conversation options" %} dropdown menu at the top of the Chat panel, then click **{% octicon "tools" aria-hidden="true" %} Customize {% data variables.product.prodname_copilot %}**. If in the immersive view, select the {% octicon "kebab-horizontal" aria-label="Feedback and settings" %} dropdown menu at the top right of the page, then click **{% octicon "note" aria-hidden="true" %} Personal instructions**. +You can add personal custom instructions either in the Chat panel or in immersive mode. The same instructions will be applied in both modes. + +1. In the top right of any page on {% data variables.product.github %}, either: + * Click the **{% octicon "copilot" aria-label="Copilot" %}** icon to open the {% data variables.product.prodname_copilot_chat_short %} panel. + * Click {% octicon "triangle-down" aria-label="The downwards triangle icon" %} next to the **{% octicon "copilot" aria-label="Copilot" %}** icon, then click **Immersive** to open {% data variables.product.prodname_copilot_chat_short %} in the full-page, immersive mode. +1. Select the {% octicon "kebab-horizontal" aria-label="Open conversation options" %} dropdown menu at the top right of the Chat panel, or immersive page, then click **Personal instructions**. 1. Add natural language instructions to the text box. - The instructions can be written as a single paragraph, each on a new line, or separated by blank lines for legibility. + You can write your instructions in any format you prefer. For example, you can write them as a single block of text, each on a new line, or separated by blank lines. + 1. Click **Save**. Your instructions are now active, and will stay active until you change or remove them. diff --git a/content/copilot/customizing-copilot/adding-repository-custom-instructions-for-github-copilot.md b/content/copilot/customizing-copilot/adding-repository-custom-instructions-for-github-copilot.md index 367f354cdf9a..6c29dbbf01bd 100644 --- a/content/copilot/customizing-copilot/adding-repository-custom-instructions-for-github-copilot.md +++ b/content/copilot/customizing-copilot/adding-repository-custom-instructions-for-github-copilot.md @@ -132,7 +132,7 @@ Whenever custom instructions are used by {% data variables.product.prodname_copi You can click the reference to open the file. -{% data reusables.copilot.repository-vs-personal-instructions-note %} +{% data reusables.copilot.repository-vs-personal-instructions-note %} See [AUTOTITLE](/copilot/customizing-copilot/adding-personal-custom-instructions-for-github-copilot). {% endwebui %} @@ -161,6 +161,9 @@ You can choose whether or not to have custom instructions added to your chat que 1. Click the {% octicon "kebab-horizontal" aria-label="Conversation options" %} button at the top of the Chat panel, or the top right of the immersive page. 1. Click **Disable custom instructions** or **Enable custom instructions**. + > [!NOTE] + > In immersive mode, you will only see these options if you have attached a repository that contains a custom instructions file. + Your choice persists until you change it. {% endwebui %} @@ -179,7 +182,7 @@ Your choice persists until you change it. ![Screenshot of the {% data variables.product.prodname_vs %} menu bar. The "Tools" menu is expanded, and the "Options" item is highlighted with an orange outline.](/assets/images/help/copilot/vs-toolbar-options.png) -1. In the "Options" dialog, type `custom instructions` in the search box. +1. In the "Options" dialog, type `custom instructions` in the search box, then click **{% data variables.product.prodname_copilot_short %}**. 1. Select or clear the checkbox for **(Preview) Enable custom instructions to be loaded from .github/copilot-instructions.md files and added to requests**. {% endvisualstudio %} diff --git a/content/copilot/using-github-copilot/ai-models/changing-the-ai-model-for-copilot-chat.md b/content/copilot/using-github-copilot/ai-models/changing-the-ai-model-for-copilot-chat.md index 61228174ad28..8c8ea554e254 100644 --- a/content/copilot/using-github-copilot/ai-models/changing-the-ai-model-for-copilot-chat.md +++ b/content/copilot/using-github-copilot/ai-models/changing-the-ai-model-for-copilot-chat.md @@ -54,7 +54,7 @@ These instructions are for {% data variables.product.prodname_copilot_short %} o > [!NOTE] If you use {% data variables.product.prodname_copilot_extensions_short %}, they may override the model you select. -1. In the top right of any page on {% data variables.product.github %}, click the down arrow beside the **{% octicon "copilot" aria-hidden="true" %}** icon and click **Immersive** in the dropdown menu. +1. In the top right of any page on {% data variables.product.github %}, click {% octicon "triangle-down" aria-label="The downwards triangle icon" %} beside the **{% octicon "copilot" aria-hidden="true" %}** icon and click **Immersive** in the dropdown menu. ![Screenshot of the 'Immersive' button, highlighted with a dark orange outline.](/assets/images/help/copilot/copilot-immersive-button.png) diff --git a/content/copilot/using-github-copilot/ai-models/changing-the-ai-model-for-copilot-code-completion.md b/content/copilot/using-github-copilot/ai-models/changing-the-ai-model-for-copilot-code-completion.md index 3b95dac3acf5..46b8753deddc 100644 --- a/content/copilot/using-github-copilot/ai-models/changing-the-ai-model-for-copilot-code-completion.md +++ b/content/copilot/using-github-copilot/ai-models/changing-the-ai-model-for-copilot-code-completion.md @@ -46,7 +46,7 @@ The following instructions are for {% data variables.product.prodname_vscode_sho 1. Type `change completions model` and select the "{% data variables.product.prodname_copilot %}: Change Completions Model" command. 1. In the dropdown menu, select the model you want to use. -Alternatively, if Command Center is enabled, you can click the down arrow beside the **{% octicon "copilot" aria-hidden="true" %}** icon at the top of the {% data variables.product.prodname_vscode_shortname %} window, then click **Configure Code Completions** in the dropdown menu. Then choose **Change Completions Model** in the dropdown menu and select the model you want to use. +Alternatively, if Command Center is enabled, you can click {% octicon "chevron-down" aria-label="The downward-pointing arrowhead" %} beside the **{% octicon "copilot" aria-hidden="true" %}** icon at the top of the {% data variables.product.prodname_vscode_shortname %} window, then click **Configure Code Completions** in the dropdown menu. Then choose **Change Completions Model** in the dropdown menu and select the model you want to use. ## Checking which model is being used diff --git a/content/copilot/using-github-copilot/copilot-chat/asking-github-copilot-questions-in-github.md b/content/copilot/using-github-copilot/copilot-chat/asking-github-copilot-questions-in-github.md index aca9e9a8e7a6..1fb457663fd0 100644 --- a/content/copilot/using-github-copilot/copilot-chat/asking-github-copilot-questions-in-github.md +++ b/content/copilot/using-github-copilot/copilot-chat/asking-github-copilot-questions-in-github.md @@ -65,7 +65,7 @@ You can open {% data variables.product.prodname_copilot_chat_short %} from any p Depending on the question you ask, and your enterprise and organization settings, {% data variables.product.prodname_copilot_short %} may respond using information based on the results of a Bing search. By using Bing search, {% data variables.product.prodname_copilot_short %} can answer a broad range of tech-related questions with up-to-date details based on information currently available on the internet. For information on how to enable or disable Bing search integration, see [AUTOTITLE](/copilot/managing-copilot/managing-copilot-as-an-individual-subscriber/managing-copilot-policies-as-an-individual-subscriber#enabling-or-disabling-web-search-for-github-copilot-chat) and [AUTOTITLE](/copilot/managing-copilot/managing-copilot-for-your-enterprise/managing-policies-and-features-for-copilot-in-your-enterprise). -1. At the top right of any page on {% data variables.product.github %}, click the down arrow beside the **{% octicon "copilot" aria-hidden="true" %}** icon and click **Immersive** in the dropdown menu. +1. At the top right of any page on {% data variables.product.github %}, click {% octicon "triangle-down" aria-label="The downwards triangle icon" %} beside the **{% octicon "copilot" aria-hidden="true" %}** icon and click **Immersive** in the dropdown menu. ![Screenshot of the 'Immersive' button, highlighted with a dark orange outline.](/assets/images/help/copilot/copilot-immersive-button.png) diff --git a/data/reusables/copilot/personal-instructions-note.md b/data/reusables/copilot/personal-instructions-note.md index 0c93696330c4..e1508d82381e 100644 --- a/data/reusables/copilot/personal-instructions-note.md +++ b/data/reusables/copilot/personal-instructions-note.md @@ -1,3 +1,2 @@ > [!NOTE] -> * Personal custom instructions for {% data variables.product.prodname_copilot %} are in {% data variables.release-phases.public_preview %} and subject to change. -> * Personal custom instructions are currently only supported for {% data variables.product.prodname_copilot_chat_dotcom %}. +> Personal custom instructions are currently only supported for {% data variables.product.prodname_copilot_chat_dotcom %}. diff --git a/data/reusables/copilot/repository-vs-personal-instructions-note.md b/data/reusables/copilot/repository-vs-personal-instructions-note.md index 9825d668a8f0..e2370d01e66e 100644 --- a/data/reusables/copilot/repository-vs-personal-instructions-note.md +++ b/data/reusables/copilot/repository-vs-personal-instructions-note.md @@ -1 +1 @@ -> [!NOTE] Personal custom instructions take priority over repository custom instructions, but both are incorporated into the final prompt provided to {% data variables.product.prodname_copilot_chat_short %}. Whenever possible, you should avoid providing conflicting personal and repository instructions. If you are concerned about response quality, you can also choose to temporarily disable repository instructions. For more information, see [AUTOTITLE](/copilot/customizing-copilot/adding-repository-custom-instructions-for-github-copilot?tool=webui#enabling-or-disabling-repository-custom-instructions). +> [!NOTE] Personal custom instructions take priority over repository custom instructions, but both are incorporated into the final prompt provided to {% data variables.product.prodname_copilot_chat_short %}. Whenever possible, you should avoid providing conflicting personal and repository instructions.