Important:
All users with a GitHub Copilot Individual subscription can access GitHub Copilot Chat in your IDE.
Owners of organizations with a Copilot Business subscription can decide whether to grant access to GitHub Copilot Chat in your IDE.
GitHub Copilot Chat is a chat interface that lets you ask and receive answers to coding-related questions directly within a supported IDE. Copilot Chat can help you with a variety of coding-related tasks, like offering you code suggestions, providing natural language descriptions of a piece of code's functionality and purpose, generating unit tests for your code, and proposing fixes for bugs in your code. For more information, see "
About GitHub Copilot Chat in your IDE
."
For more information about using GitHub Copilot Chat in Visual Studio, see the
Visual Studio Copilot Chat
documentation.
-
To use GitHub Copilot Chat you must have an active GitHub Copilot subscription. For more information, see "
About billing for GitHub Copilot
."
-
To use GitHub Copilot Chat with Visual Studio, you must be running Visual Studio 2022 version 17.8 or higher. For more information, see the
Visual Studio GitHub Copilot
documentation.
-
To use GitHub Copilot Chat with Visual Studio, you must be signed into Visual Studio with the same GitHub ID that has access to GitHub Copilot.
Note:
If you have a GitHub Copilot Individual subscription, you are automatically granted access to GitHub Copilot Chat.
GitHub Copilot Chat is available to all organizations that have an active GitHub Copilot Business subscription. You can enable or disable GitHub Copilot Chat for your organization in the settings page for Copilot.
-
In the upper-right corner of GitHub, select your profile photo, then click
Your organizations
.
-
Next to the organization, click
Settings
.
-
In the "Code, planning, and automation" section of the sidebar, click
Copilot
, and then click
Policies
.
-
To the right of
Copilot Chat in the IDE
, select the dropdown menu, and then click
Enabled
or
Disabled
.
With Visual Studio version 17.10 Preview 3 or later, you can install a single extension that combines GitHub Copilot and GitHub Copilot Chat. If you use Visual Studio 17.8 or 17.9, you must install the GitHub Copilot and GitHub Copilot Chat extensions separately. The GitHub Copilot extension is a prerequisite for using GitHub Copilot Chat. For more information about the Visual Studio 17.10 Preview 3 release, see the
Visual Studio Release Notes
in the Microsoft documentation.
-
Download the latest preview version of Visual Studio 2022 17.10 from
Visual Studio Release Notes
in the Microsoft documentation.
-
Follow the on-screen instructions to install Visual Studio.
-
When Visual Studio Installer launches, select the workloads you require, and then under "Installation details", expand the
Individual components
details and select
GitHub Copilot
.
-
In the bottom-right corner of Visual Studio Installer, click
Modify
.
-
When the modification is complete, close the Visual Studio Installer and launch Visual Studio.
-
Optionally, to modify the installation or add more components, launch Visual Studio Installer from the Windows Start menu.
- To the right of your installed version of Visual Studio, click
Modify
.
- Make your desired changes, and in the bottom right corner click
Modify
again to apply them.
To use GitHub Copilot Chat with Visual Studio, you must install the Visual Studio extension.
For an alternative installation method, you can also use the Microsoft instructions to install the GitHub Copilot extension. For more information, see
Installation instructions
in the Microsoft documentation.
-
In the Visual Studio menu bar, click
Extensions
, then click
Manage Extensions
.
-
In the "Manage Extensions" window, click
Visual Studio Marketplace
, search for "GitHub Copilot Chat", then click
Download
.
-
Close the "Manage Extensions" window, then exit and relaunch Visual Studio.
GitHub Copilot Chat is intended to answer exclusively coding related questions that you ask in natural language. For example, you can ask GitHub Copilot Chat to help you write a function that returns the sum of two numbers.
-
In the Visual Studio menu bar, to launch Copilot Chat, click
View
, then click
GitHub Copilot Chat
.
-
At the bottom of the Copilot Chat window, in the
Ask Copilot: Type / for commands and # to reference
text box, type a coding related question, then press
Enter
. For example, type "How do I write a function that returns the sum of two numbers?".
Note:
If your question is outside the scope of GitHub Copilot Chat, it will tell you and may suggest an alternative question to ask.
-
If Copilot Chat offers a code suggestion that you want to use, click the
Copy
icon to copy the code suggestion to your clipboard.
-
Optionally, if Copilot Chat suggests a follow-up question under your last answer, click the follow-up question to ask it.
Copilot Chat can provide answers and support with a wide range of coding related topics.
-
In Visual Studio, open the file you want Copilot Chat to help you with.
-
In the Visual Studio menu bar, to launch Copilot Chat, click
View
, then click
GitHub Copilot Chat
.
-
To ask a question about the code that's currently visible in the editor, type
#editor
followed by your question.
For example, you could type
#editor what does this code do?
to ask Copilot Chat for a description of the code's purpose.
Use the
#editor
command, anywhere in your question, to tell Copilot Chat to focus on the code that's currently visible in the editor.
-
If a single method is visible in full in the editor, you could ask Copilot Chat to generate a unit test for the method by typing
Write a unit test for the method in the #editor
.
Alternatively, select the code you want to generate a unit test for, then ask Copilot:
#selection write a unit test for this code
.
The
#selection
command ensure that Copilot focuses on the selected code when responding to a question.
-
To fix a bug in some code, select the code in the editor, then ask Copilot:
#selection fix the bug in this code
.
-
To focus Copilot on one or more specific files when you ask a question, use the
#file
command.
- In the Copilot Chat window, type
#file
and press
Enter
. This opens the Quick Open palette at the top of the editor.
- Select from the list of recently opened files, or search for the file you want to focus on and select it.
- Type your question. For example,
#file:app.js What does this file do?
.
You can use the
#file
command multiple times in your question to focus Copilot on more than one file.
To share feedback about Copilot Chat, you can use the
Send feedback
button in Visual Studio. For more information on providing feedback for Visual Studio, see the
Visual Studio Feedback
documentation.
-
In the top right corner of the Visual Studio window, click the
Send feedback
button.
-
Choose the option that best describes your feedback.
- To report a bug, click
Report a problem
.
- To request a feature, click
Suggest a feature
.
Important:
All users with a GitHub Copilot Individual subscription can access GitHub Copilot Chat in your IDE.
Owners of organizations with a Copilot Business subscription can decide whether to grant access to GitHub Copilot Chat in your IDE.
GitHub Copilot Chat is a chat interface that lets you ask and receive answers to coding-related questions directly within a supported IDE. Copilot Chat can help you with a variety of coding-related tasks, like offering you code suggestions, providing natural language descriptions of a piece of code's functionality and purpose, generating unit tests for your code, and proposing fixes for bugs in your code. For more information, see "
About GitHub Copilot Chat in your IDE
."
-
To use GitHub Copilot Chat you must have an active GitHub Copilot subscription. For more information, see "
About billing for GitHub Copilot
."
-
To use GitHub Copilot Chat in JetBrains, you must have a compatible JetBrains IDE installed. Copilot Chat is compatible with the following IDEs:
- IntelliJ IDEA (Ultimate, Community, Educational)
- Android Studio
- AppCode
- CLion
- DataGrip
- DataSpell
- GoLand
- MPS
- PhpStorm
- PyCharm (Professional, Community, Educational)
- Rider
- RubyMine
- RustRover
- WebStorm
For more information, see the
JetBrains IDEs
tool finder.
Note:
If you have a GitHub Copilot Individual subscription, you are automatically granted access to GitHub Copilot Chat.
GitHub Copilot Chat is available to all organizations and enterprises that have an active GitHub Copilot Business license. You can enable or disable GitHub Copilot Chat for your organization or enterprise in the GitHub Copilot settings page.
If Copilot Chat is enabled or disabled at the enterprise level, organizations within the enterprise cannot override the setting.
-
In the upper-right corner of GitHub, select your profile photo, then click
Your organizations
.
-
Next to the organization, click
Settings
.
-
In the "Code, planning, and automation" section of the sidebar, click
Copilot
, and then click
Policies
.
-
To the right of
Copilot Chat in the IDE
, select the dropdown menu, and then click
Enabled
or
Disabled
.
- In the enterprise account sidebar, click
Policies
.
- Under "
Policies", click
Copilot
.
- To the right of
Copilot Chat in the IDE
, select the dropdown menu, and then choose the appropriate option.
- Click
Allowed
to enable Copilot Chat for all organizations under your enterprise.
- Click
Blocked
to disable Copilot Chat for all organizations under your enterprise.
- Click
No policy
to allow each organization under your enterprise to set their own policy.
To use Copilot Chat in a JetBrains IDE, you must install or update the GitHub Copilot plugin. If you have not yet installed the GitHub Copilot plugin, follow the steps in "
Installing the GitHub Copilot plugin in your JetBrains IDE
." If you have already installed the GitHub Copilot plugin, follow the steps in "
Updating the GitHub Copilot plugin in JetBrains
."
The following procedures will guide you through installing or updating the GitHub Copilot plugin in IntelliJ IDEA. Steps to install the plugin in another supported IDE may differ.
To use GitHub Copilot in a JetBrains IDE, you must install the GitHub Copilot plugin.
-
In your JetBrains IDE, under the
File
menu for Windows or under the name of your IDE for Mac (for example,
PyCharm
or
IntelliJ
), click
Settings
for Windows or
Preferences
for Mac.
-
In the left-side menu of the
Settings/Preferences
dialog box, click
Plugins
.
-
At the top of the
Settings/Preferences
dialog box, click
Marketplace
. In the search bar, search for
GitHub Copilot
, then click
Install
.
-
After GitHub Copilot is installed, click
Restart IDE
.
-
After your JetBrains IDE has restarted, click the
Tools
menu. Click
GitHub Copilot
, then click
Login to GitHub
.
-
In the "Sign in to GitHub" dialog box, to copy the device code and open the device activation window, click
Copy and Open
.
-
A device activation window will open in your browser. Paste the device code, then click
Continue
.
-
GitHub will request the necessary permissions for GitHub Copilot. To approve these permissions, click
Authorize GitHub Copilot Plugin
.
-
After the permissions have been approved, your JetBrains IDE will show a confirmation. To begin using GitHub Copilot, click
OK
.
- In your JetBrains IDE, under the
File
menu for Windows or under the name of your IDE for Mac (for example,
PyCharm
or
IntelliJ
), click
Settings
for Windows or
Preferences
for Mac.
- In the left-side menu of the
Settings/Preferences
dialog box, click
Plugins
.
- At the top of the
Settings/Preferences
dialog box, click
Installed
. In the search bar, search for
GitHub Copilot
, then click
Update
.
- After GitHub Copilot is updated, quit and relaunch your JetBrains IDE.
GitHub Copilot Chat is intended to answer exclusively coding related questions that you ask in natural language. For example, you can ask GitHub Copilot Chat to help you write a function that returns the sum of two numbers.
-
At the right side of the JetBrains IDE window, click the
Copilot Chat
icon to open the Copilot Chat window.
-
At the bottom of the Copilot Chat window, in the
Ask Copilot a question or type
/
for commands
text box, type a coding related question, then press
Enter
. For example, type "How do I write a function that returns the sum of two numbers?".
-
Copilot Chat will process your question and provide an answer, with code suggestions when appropriate, in the chat window.
If your question is outside the scope of GitHub Copilot Chat, it will tell you and may suggest an alternative question to ask.
-
Optionally, if Copilot Chat suggests a follow-up question above the
Ask Copilot a question or type
/
for commands
text box, click the follow-up question to ask it.
Copilot Chat can provide answers and support with a wide range of coding-related topics.
- In your JetBrains IDE, open the file you want Copilot Chat to help you with.
- Ask Copilot Chat a question about the file you have open. For example:
- To generate a description of the file's purpose, ask a question like, "What does this file do?"
- To generate a unit test for the file, type a request like, "Write a unit test for this file." Alternatively, highlight the code you want to generate a unit test for, then ask a question like, "Write a unit test for this code."
- To generate a fix for a bug in the file, type a request like, "Fix this bug."
- Optionally, you can prompt Copilot Chat to perform predefined tasks with slash commands. To see a list of all available slash commands and their definitions, in the
Ask Copilot a question or type
/
for commands
text box, type
/
.
To share feedback about Copilot Chat, you can use the
share feedback
link in JetBrains.
-
At the right side of the JetBrains IDE window, click the
Copilot Chat
icon to open the Copilot Chat window.
-
At the top of the Copilot Chat window, click the
share feedback
link.