GitHub Copilot Chat [Limited public beta] (#38313)

Co-authored-by: Jules Porter <jules-p@githubazure.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Ben Ahmady <32935794+subatoi@users.noreply.github.com>
Co-authored-by: hubwriter <hubwriter@github.com>
This commit is contained in:
Jules 2023-07-20 17:11:23 +02:00 коммит произвёл GitHub
Родитель ce1d2fe187
Коммит 6efcb3d3b3
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
21 изменённых файлов: 393 добавлений и 4 удалений

Двоичные данные
assets/images/help/copilot/vs-share-feedback-button.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 88 KiB

Двоичные данные
assets/images/help/copilot/vsc-code-suggestion-options.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 36 KiB

Двоичные данные
assets/images/help/copilot/vsc-copilot-chat-icon.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 115 KiB

Двоичные данные
assets/images/help/copilot/vsc-extensions-icon.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 90 KiB

Двоичные данные
assets/images/help/copilot/vsc-insiders-copilot-chat-icon.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 32 KiB

Двоичные данные
assets/images/help/copilot/vsc-insiders-extensions-icon.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 37 KiB

Просмотреть файл

@ -173,16 +173,15 @@ If you use {% data variables.product.prodname_vs %}, you can view and incorporat
## Installing the {% data variables.product.prodname_vs %} extension
To use {% data variables.product.prodname_copilot %}, you must first install the {% data variables.product.prodname_vs %} extension.
1. In the Visual Studio menu bar, click **Extensions**, then click **Manage Extensions**.
![Screenshot of the menu bar in Visual Studio. The "Extensions" menu is open, and the "Manage Extensions" option is highlighted with an orange outline.](/assets/images/help/copilot/visual-studio-toolbar.png)
{% data reusables.copilot.vs-extensions %}
1. In the "Manage Extensions" window, click **Visual Studio Marketplace**, search for the {% data variables.product.prodname_copilot %} extension, then click **Download**.
![Screenshot of a list of search results. Next to the {% data variables.product.prodname_copilot %} extension, the "Download" button is highlighted with an orange outline.](/assets/images/help/copilot/install-copilot-extension-visual-studio.png)
1. Close the "Manage Extensions" window, then exit and relaunch {% data variables.product.prodname_vs %}.
{% data reusables.copilot.vs-exit-and-relaunch %}
1. Optionally, to check that {% data variables.product.prodname_copilot %} is installed and enabled, go back to **Manage Extensions**, click **Installed** to view your currently installed extensions, then click **{% data variables.product.prodname_copilot %}** to see status information.
![Screenshot of a list of installed extensions in Visual Studio. The "{% data variables.product.prodname_copilot %}" extension is highlighted with an orange outline.](/assets/images/help/copilot/installed-copilot-extension-visual-studio.png)
![Screenshot of a list of installed extensions in {% data variables.product.prodname_vs %}. The "{% data variables.product.prodname_copilot %}" extension is highlighted with an orange outline.](/assets/images/help/copilot/installed-copilot-extension-visual-studio.png)
1. Open or create a new project in {% data variables.product.prodname_vs %}.
1. In the "Microsoft {% data variables.product.prodname_vs %}" dialog box, to copy your device activation code, click **OK**.
1. A device activation window will open in your browser. Paste the device code, then click **Continue**.

Просмотреть файл

@ -0,0 +1,118 @@
---
title: About GitHub Copilot Chat
intro: '{% data variables.product.prodname_copilot_chat %} can help you by providing answers to coding related questions directly within a supported IDE.'
product: '{% data reusables.gated-features.copilot-chat %}'
versions:
feature: copilot
topics:
- Copilot
shortTitle: About Copilot Chat
---
## About {% data variables.product.prodname_copilot_chat %}
{% data variables.product.prodname_copilot_chat %} is a chat interface that lets you interact with {% data variables.product.prodname_copilot %}, to ask and receive answers to coding-related questions from directly within a supported IDE. The chat interface provides access to coding information and support without requiring you to navigate documentation or search online forums. {% data variables.product.prodname_copilot_chat_short %} is currently supported in {% data variables.product.prodname_vscode %} and {% data variables.product.prodname_vs %}. For more information about {% data variables.product.prodname_copilot %}, see "[AUTOTITLE](/copilot/overview-of-github-copilot/about-github-copilot-for-individuals)" and "[AUTOTITLE](/copilot/overview-of-github-copilot/about-github-copilot-for-business)."
{% data variables.product.prodname_copilot_chat %} can answer a wide range of coding-related questions on topics including syntax, programming concepts, test cases, debugging, and more. {% data variables.product.prodname_copilot_chat %} is not designed to answer non-coding questions or provide general information on topics outside of coding.
{% data variables.product.prodname_copilot_chat %} works by using a combination of natural language processing and machine learning to understand your question and provide you with an answer. This process can be broken down into a number of steps.
### Input processing
The input prompt from the user is pre-processed by the {% data variables.product.prodname_copilot_chat_short %} system and sent to a large language model to get a response based on the context and prompt. User input can take the form of code snippets or plain language. The system is only intended to respond to coding-related questions.
### Language model analysis
The pre-processed prompt is then passed through the {% data variables.product.prodname_copilot_chat_short %} language model, which is a neural network that has been trained on a large body of text data. The language model analyzes the input prompt.
### Response generation
The language model generates a response based on its analysis of the input prompt. This response can take the form of generated code, code suggestions, or explanations of existing code.
### Output formatting
The response generated by {% data variables.product.prodname_copilot_chat_short %} is formatted and presented to the user. {% data variables.product.prodname_copilot_chat_short %} may use syntax highlighting, indentation, and other formatting features to add clarity to the generated response.
{% data variables.product.prodname_copilot_chat %} is intended to provide you with the most relevant answer to your question. However, it may not always provide the answer you are looking for. Users of {% data variables.product.prodname_copilot_chat_short %} are responsible for reviewing and validating responses generated by the system to ensure they are accurate and appropriate. {% data variables.product.prodname_copilot_chat_short %} is also designed to learn from your feedback and improve over time. For more information on improving the performance of {% data variables.product.prodname_copilot_chat %}, see "[Improving performance for {% data variables.product.prodname_copilot_chat %}](/copilot/github-copilot-chat/about-github-copilot-chat#improving-performance-for-github-copilot-chat)."
## Use cases for {% data variables.product.prodname_copilot_chat %}
{% data variables.product.prodname_copilot_chat %} can provide coding assistance in a variety of scenarios.
### Generating unit test cases
{% data variables.product.prodname_copilot_chat_short %} can help write unit test cases by generating code snippets based on the code open in the editor or the code snippet you highlight in the editor. This may help you write test cases without spending as much time on repetitive tasks. For example, if you are writing a test case for a specific function, you can use {% data variables.product.prodname_copilot_chat_short %} to suggest possible input parameters and expected output values based on the function's signature and body. {% data variables.product.prodname_copilot_chat_short %} can also suggest assertions that ensure the function is working correctly, based on the code's context and semantics.
{% data variables.product.prodname_copilot_chat_short %} can also help you write test cases for edge cases and boundary conditions that might be difficult to identify manually. For instance, {% data variables.product.prodname_copilot_chat_short %} can suggest test cases for error handling, null values, or unexpected input types, helping you ensure your code is robust and resilient. However, it is important to note that generated test cases may not cover all possible scenarios, and manual testing and code review are still necessary to ensure the quality of the code. For more information on generating unit test cases, see "[Asking {% data variables.product.prodname_copilot_chat %} questions about your code](/copilot/github-copilot-chat/using-github-copilot-chat#asking-github-copilot-chat-questions-about-your-code)."
### Explaining code
{% data variables.product.prodname_copilot_chat_short %} can help explain selected code by generating natural language descriptions of the code's functionality and purpose. This can be useful if you want to understand the code's behavior or for non-technical stakeholders who need to understand how the code works. For example, if you select a function or code block in the code editor, {% data variables.product.prodname_copilot_chat_short %} can generate a natural language description of what the code does and how it fits into the overall system. This can include information such as the function's input and output parameters, its dependencies, and its purpose in the larger application.
By generating explanations and suggesting related documentation, {% data variables.product.prodname_copilot_chat_short %} may help you to understand the selected code, leading to improved collaboration and more effective software development. However, it's important to note that the generated explanations and documentation may not always be accurate or complete, so you'll need to review, and occasionally correct, {% data variables.product.prodname_copilot_chat_short %}'s output.
### Proposing code fixes
{% data variables.product.prodname_copilot_chat_short %} can propose a fix for bugs in your code by suggesting code snippets and solutions based on the context of the error or issue. This can be useful if you are struggling to identify the root cause of a bug or you need guidance on the best way to fix it. For example, if your code produces an error message or warning, {% data variables.product.prodname_copilot_chat_short %} can suggest possible fixes based on the error message, the code's syntax, and the surrounding code.
{% data variables.product.prodname_copilot_chat_short %} can suggest changes to variables, control structures, or function calls that might resolve the issue and generate code snippets that can be incorporated into the codebase. However, it's important to note that the suggested fixes may not always be optimal or complete, so you'll need to review and test the suggestions.
### Answering coding questions
You can ask {% data variables.product.prodname_copilot_chat_short %} for help or clarification on specific coding problems and receive responses in natural language format or in code snippet format. This can be a useful tool for programmers, as it can provide guidance and support for common coding tasks and challenges.
## Improving performance for {% data variables.product.prodname_copilot_chat %}
{% data variables.product.prodname_copilot_chat_short %} can support a wide range of practical applications like code generation, code analysis, and code fixes, each with different performance metrics and mitigation strategies. To enhance performance and address some of the the limitations of {% data variables.product.prodname_copilot_chat_short %}, there are various measures that you can adopt. For more information on the limitations of {% data variables.product.prodname_copilot_chat_short %}, see "[Limitations of {% data variables.product.prodname_copilot_chat %}](/copilot/github-copilot-chat/about-github-copilot-chat#limitations-of-github-copilot-chat)."
### Keep your prompts on topic
{% data variables.product.prodname_copilot_chat_short %} is intended to address queries related to coding exclusively. Therefore, limiting the prompt to coding questions or tasks can enhance the model's output quality.
### Use {% data variables.product.prodname_copilot_chat_short %} as a tool, not a replacement
While {% data variables.product.prodname_copilot_chat_short %} can be a powerful tool for generating code, it is important to use it as a tool rather than a replacement for human programming. You should always review and test the code generated by {% data variables.product.prodname_copilot_chat_short %} to ensure that it meets your requirements and is free of errors or security concerns.
### Use secure coding and code review practices
While {% data variables.product.prodname_copilot_chat_short %} can generate syntactically correct code, it may not always be secure. You should always follow best practices for secure coding, such as avoiding hard-coded passwords or SQL injection vulnerabilities, as well as following code review best practices, to address {% data variables.product.prodname_copilot_chat_short %}'s limitations.
### Provide feedback
If you encounter any issues or limitations with {% data variables.product.prodname_copilot_chat_short %}, we recommend that you provide feedback through the **share feedback** link in the {% data variables.product.prodname_copilot_chat_short %} interface of your IDE. This can help the developers to improve the tool and address any concerns or limitations.
### Stay up to date
{% data variables.product.prodname_copilot_chat_short %} is a new technology and is likely to evolve over time. You should stay up to date with any updates or changes to the tool, as well as any new security risks or best practices that may emerge. Automated extension updates are enabled by default in {% data variables.product.prodname_vscode %} and {% data variables.product.prodname_vs %}. If you have automatic updates enabled, {% data variables.product.prodname_copilot_chat_short %} will automatically update to the latest version when you open your IDE. For more information on automatic updates in your IDE, see [the {% data variables.product.prodname_vscode %} documentation](https://code.visualstudio.com/docs/editor/extension-marketplace) and [the {% data variables.product.prodname_vs %} documentation](https://learn.microsoft.com/en-us/visualstudio/ide/finding-and-using-visual-studio-extensions?view=vs-2022).
## Limitations of {% data variables.product.prodname_copilot_chat %}
Depending on factors such as your codebase and input data, you may experience different levels of performance when using {% data variables.product.prodname_copilot_chat_short %}. The following information is designed to help you understand system limitations and key concepts about performance as they apply to {% data variables.product.prodname_copilot_chat_short %}.
### Limited scope
{% data variables.product.prodname_copilot_chat_short %} has been trained on a large body of code but still has a limited scope and may not be able to handle more complex code structures or obscure programming languages. For each language, the quality of suggestions you receive may depend on the volume and diversity of training data for that language. For example, JavaScript is well-represented in public repositories and is one of {% data variables.product.prodname_copilot %}'s best supported languages. Languages with less representation in public repositories may be more challenging for {% data variables.product.prodname_copilot_chat_short %} to provide assistance with. Additionally, {% data variables.product.prodname_copilot_chat_short %} can only suggest code based on the context of the code being written, so it may not be able to identify larger design or architectural issues.
### Potential biases
{% data variables.product.prodname_copilot_short %}'s training data is drawn from existing code repositories, which may contain biases and errors that can be perpetuated by the tool. Additionally, {% data variables.product.prodname_copilot_chat_short %} may be biased towards certain programming languages or coding styles, which can lead to suboptimal or incomplete code suggestions.
### Security risks
{% data variables.product.prodname_copilot_chat_short %} generates code based on the context of the code being written, which can potentially expose sensitive information or vulnerabilities if not used carefully. You should be careful when using {% data variables.product.prodname_copilot_chat_short %} to generate code for security-sensitive applications and always review and test the generated code thoroughly.
### Matches with public code
{% data variables.product.prodname_copilot_chat_short %} is capable of generating new code, which it does in a probabilistic way. While the probability that it may produce code that matches code in the training set is low, a {% data variables.product.prodname_copilot_chat_short %} suggestion may contain some code snippets that match code in the training set. {% data variables.product.prodname_copilot_chat_short %} utilizes filters that block matches with public code on {% data variables.product.prodname_dotcom %} repositories, but you should always take the same precautions as you would with any code you write that uses material you did not independently originate, including precautions to ensure its suitability. These include rigorous testing, IP scanning, and checking for security vulnerabilities. You should make sure your IDE or editor does not automatically compile or run generated code before you review it.
### Inaccurate code
One of the limitations of {% data variables.product.prodname_copilot_chat_short %} is that it may generate code that appears to be valid but may not actually be semantically or syntactically correct or may not accurately reflect the intent of the developer. To mitigate the risk of inaccurate code, you should carefully review and test the generated code, particularly when dealing with critical or sensitive applications. You should also ensure that the generated code adheres to best practices and design patterns and fits within the overall architecture and style of the codebase.
### Inaccurate responses to non-coding topics
{% data variables.product.prodname_copilot_chat_short %} is not designed to answer non-coding questions, and therefore its responses may not always be accurate or helpful in these contexts. If a user asks {% data variables.product.prodname_copilot_chat_short %} a non-coding question, it may generate an answer that is irrelevant or nonsensical, or it may simply indicate that it is unable to provide a useful response.
## Next steps
- [Using {% data variables.product.prodname_copilot_chat %}](/copilot/github-copilot-chat/using-github-copilot-chat)

Просмотреть файл

@ -0,0 +1,12 @@
---
title: GitHub Copilot Chat
shortTitle: Copilot Chat
intro: 'Learn about {% data variables.product.prodname_copilot_chat %}, including use cases, best practices, and limtations.'
versions:
feature: copilot
topics:
- Copilot
children:
- /about-github-copilot-chat
- /using-github-copilot-chat
---

Просмотреть файл

@ -0,0 +1,184 @@
---
title: Using GitHub Copilot Chat
intro: 'You can start using {% data variables.product.prodname_copilot_chat %} by installing the extension in your preferred environment.'
product: '{% data reusables.gated-features.copilot-chat %}'
topics:
- Copilot
defaultTool: vscode
versions:
feature: copilot
shortTitle: Using Copilot Chat
---
{% vscode %}
## About {% data variables.product.prodname_copilot_chat %} and {% data variables.product.prodname_vscode %}
{% data reusables.copilot.chat-procedural-intro %}
## Prerequisites
{% data reusables.copilot.chat-subscription-prerequisite %}
- To use {% data variables.product.prodname_copilot_chat %} in {% data variables.product.prodname_vscode %}, you must have the latest version of {% data variables.product.prodname_vscode %} installed. For more information, see the [{% data variables.product.prodname_vscode %} download page](https://code.visualstudio.com/).
- To use {% data variables.product.prodname_copilot_chat %} in {% data variables.product.prodname_vscode %}, you must be signed into {% data variables.product.prodname_vscode %} with the same {% data variables.product.prodname_dotcom %} ID that has been granted access to the {% data variables.product.prodname_copilot_chat %} limited public beta.
{% data reusables.copilot.enabling-copilot-chat-beta %}
## Installing the {% data variables.product.prodname_vscode %} extension
To use {% data variables.product.prodname_copilot_chat %}, you must first install the {% data variables.product.prodname_copilot_chat %} extension for {% data variables.product.prodname_vscode %}.
1. In {% data variables.product.prodname_vscode %}, open the **Extensions** view by clicking the **Extensions** icon in the activity bar on the left side of the {% data variables.product.prodname_vscode %} window.
![Screenshot of the extensions icon in the Activity Bar.](/assets/images/help/copilot/vsc-extensions-icon.png)
1. In the "Search Extensions in Marketplace" search box, search for the GitHub Copilot Chat extension, then click **Install**.
1. In the {% data variables.product.prodname_vscode %} window, click **Reload required** to update {% data variables.product.prodname_vscode %}.
1. To confirm that {% data variables.product.prodname_copilot_chat %} has been successfully installed, in the activity bar on the left side of the {% data variables.product.prodname_vscode %} window, click the **GitHub Copilot Chat** icon to open the {% data variables.product.prodname_copilot_chat %} chat window.
![Screenshot of the GitHub Copilot Chat icon in the Activity Bar.](/assets/images/help/copilot/vsc-copilot-chat-icon.png)
{% note %}
**Note:** If you experience authentication issues after installing the extension, see "[Troubleshooting authentication issues with {% data variables.product.prodname_copilot_chat %}](/copilot/troubleshooting-github-copilot/troubleshooting-authentication-issues-with-github-copilot-chat)."
{% endnote %}
## Asking your first question
{% data reusables.copilot.copilot-chat-exclusively-code-questions %}
1. In the {% data variables.product.prodname_vscode %} activity bar, click the **GitHub Copilot Chat** icon to open the {% data variables.product.prodname_copilot_chat %} chat window.
![Screenshot of the GitHub Copilot Chat icon in the Activity Bar.](/assets/images/help/copilot/vsc-copilot-chat-icon.png)
1. At the bottom of the {% data variables.product.prodname_copilot_chat %} window, in the **Ask {% data variables.product.prodname_copilot_short %} a question or type `/` for topics** 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?".
1. {% data variables.product.prodname_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 {% data variables.product.prodname_copilot_chat %}, it will tell you and may suggest an alternative question to ask.
1. Optionally, if {% data variables.product.prodname_copilot_chat %} suggests a follow-up question above the **Ask {% data variables.product.prodname_copilot_short %} a question or type `/` for topics** text box, click the follow-up question to ask it.
## Using code suggestions from {% data variables.product.prodname_copilot_chat %}
When {% data variables.product.prodname_copilot_chat %} provides code suggestions, you have a few options for how to use them.
1. In the {% data variables.product.prodname_copilot_chat %} window, to show the options for a code suggestion, hover over the suggestion.
![Screenshot of code suggestion options in the {% data variables.product.prodname_copilot_chat %} window.](/assets/images/help/copilot/vsc-code-suggestion-options.png)
1. Choose one of the options for using the code suggestion.
- To copy the code suggestion to your clipboard, click the **Copy** icon.
- To insert the code suggestion into your code at the current location of your cursor, click the **Insert at Cursor** icon.
- To view additional options, click the **...** icon.
- To create a new file and insert the suggestion into it, click **Insert Into New File**.
- To run the code suggestion in the {% data variables.product.prodname_vscode %} terminal, click **Run in Terminal**.
## Asking {% data variables.product.prodname_copilot_chat %} questions about your code
{% data variables.product.prodname_copilot_chat %} can provide answers and support with a wide range of coding related topics.
1. In {% data variables.product.prodname_vscode %}, open the file you want {% data variables.product.prodname_copilot_chat %} to help you with.
1. Ask {% data variables.product.prodname_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`.
## Sharing feedback about {% data variables.product.prodname_copilot_chat %}
To share feedback about {% data variables.product.prodname_copilot_chat %}, you can use the **share feedback** button in the {% data variables.product.prodname_copilot_chat %} window.
1. Scroll to the top of the {% data variables.product.prodname_copilot_chat %} window.
1. Click the **share feedback** button.
1. In your browser, in the **vscode-copilot-release** repository, create a new issue or open the {% data variables.product.prodname_copilot %} community discussion.
- To open an issue to report a bug, next to **Bug report for {% data variables.product.prodname_copilot_chat %}**, click **Get started**.
- To open an issue to request a feature, next to **Feature request for {% data variables.product.prodname_copilot_chat %}**, click **Get started**.
- To report a security vulnerability, next to **Report a security vulnerability**, click **View policy**.
- To ask a question in a discussion, next to **Questions**, click **Open**.
## Further reading
- "[AUTOTITLE](/free-pro-team@latest/site-policy/github-terms/github-terms-for-additional-products-and-features#github-copilot)"{% ifversion ghec %}
- "[AUTOTITLE](/free-pro-team@latest/site-policy/privacy-policies/github-copilot-for-business-privacy-statement)"{% endif %}
- "[{% data variables.product.prodname_copilot %} FAQ](https://github.com/features/copilot#faq)"
{% endvscode %}
{% visualstudio %}
## About {% data variables.product.prodname_copilot_chat %} and {% data variables.product.prodname_vs %}
{% data reusables.copilot.chat-procedural-intro %}
## Prerequisites
{% data reusables.copilot.chat-subscription-prerequisite %}
- To use {% data variables.product.prodname_copilot_chat %} with {% data variables.product.prodname_vs %}, you must be running {% data variables.product.prodname_vs %} 2022 version 17.5.1 or higher. For more information, see the [Visual Studio IDE](https://visualstudio.microsoft.com/vs/) documentation.
- To use {% data variables.product.prodname_copilot_chat %} with {% data variables.product.prodname_vs %}, you must be signed into {% data variables.product.prodname_vs %} with the same {% data variables.product.prodname_dotcom %} ID that has been granted access to the {% data variables.product.prodname_copilot_chat %} limited public beta.
{% data reusables.copilot.enabling-copilot-chat-beta %}
## Installing the {% data variables.product.prodname_vs %} extension
To use {% data variables.product.prodname_copilot_chat %} with {% data variables.product.prodname_vs %}, you must install the {% data variables.product.prodname_vs %} extension.
{% data reusables.copilot.vs-extensions %}
1. In the "Manage Extensions" window, click **Visual Studio Marketplace**, search for the "{% data variables.product.prodname_vs %} Extension for {% data variables.product.prodname_copilot %} Preview", then click **Download**.
{% data reusables.copilot.vs-exit-and-relaunch %}
{% note %}
**Note:** If you experience authentication issues after installing the extension, see "[Troubleshooting authentication issues with {% data variables.product.prodname_copilot_chat %}](/copilot/troubleshooting-github-copilot/troubleshooting-authentication-issues-with-github-copilot-chat)."
{% endnote %}
## Asking your first question
{% data reusables.copilot.copilot-chat-exclusively-code-questions %}
1. In the {% data variables.product.prodname_vs %} menu bar, to launch {% data variables.product.prodname_copilot_chat %}, click **View**, then click **{% data variables.product.prodname_copilot_chat %}**.
1. At the bottom of the {% data variables.product.prodname_copilot_chat_short %} window, in the **Ask {% data variables.product.prodname_copilot_short %}** 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 %}
**Note:** If your question is outside the scope of {% data variables.product.prodname_copilot_chat %}, it will tell you and may suggest an alternative question to ask.
{% endnote %}
1. If {% data variables.product.prodname_copilot_chat_short %} offers a code suggestion that you want to use, click the **Copy** icon to copy the code suggestion to your clipboard.
1. Optionally, if {% data variables.product.prodname_copilot_chat %} suggests a follow-up question under your last answer, click the follow-up question to ask it.
## Asking {% data variables.product.prodname_copilot_chat %} questions about your code
{% data variables.product.prodname_copilot_chat %} can provide answers and support with a wide range of coding related topics.
1. In {% data variables.product.prodname_vs %}, open the file you want {% data variables.product.prodname_copilot_chat %} to help you with.
1. Ask {% data variables.product.prodname_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`.
## Sharing feedback about {% data variables.product.prodname_copilot_chat %}
To share feedback about {% data variables.product.prodname_copilot_chat %}, you can use the **Send feedback** button in {% data variables.product.prodname_vs %}. For more information on providing feedback for {% data variables.product.prodname_vs %}, see the [Visual Studio Feedback](https://learn.microsoft.com/en-us/visualstudio/ide/how-to-report-a-problem-with-visual-studio?view=vs-2022) documentation.
1. In the top right corner of the {% data variables.product.prodname_vs %} window, click the **Send feedback** button.
![Screenshot of the share feedback button in {% data variables.product.prodname_vs %}.](/assets/images/help/copilot/vs-share-feedback-button.png)
1. Choose the option that best describes your feedback.
- To report a bug, click **Report a problem**.
- To request a feature, click **Suggest a feature**.
## Further reading
- "[AUTOTITLE](/free-pro-team@latest/site-policy/github-terms/github-terms-for-additional-products-and-features#github-copilot)"{% ifversion ghec %}
- "[AUTOTITLE](/free-pro-team@latest/site-policy/privacy-policies/github-copilot-for-business-privacy-statement)"{% endif %}
- "[{% data variables.product.prodname_copilot %} FAQ](https://github.com/features/copilot#faq)"
{% endvisualstudio %}

Просмотреть файл

@ -23,6 +23,7 @@ children:
- /quickstart
- /overview-of-github-copilot
- /getting-started-with-github-copilot
- /github-copilot-chat
- /configuring-github-copilot
- /troubleshooting-github-copilot
topics:

Просмотреть файл

@ -10,4 +10,5 @@ children:
- /troubleshooting-certificate-errors-for-github-copilot
- /troubleshooting-firewall-settings-for-github-copilot
- /troubleshooting-common-issues-with-github-copilot
- /troubleshooting-authentication-issues-with-github-copilot-chat
---

Просмотреть файл

@ -0,0 +1,43 @@
---
title: Troubleshooting authentication issues with GitHub Copilot Chat
intro: Troubleshooting help for authentication issues with {% data variables.product.prodname_copilot_chat %}.
product: '{% data reusables.gated-features.copilot-chat %}'
defaultTool: vscode
topics:
- Copilot
- Troubleshooting
versions:
feature: copilot
shortTitle: Authentication issues with Copilot Chat
---
{% vscode %}
## Troubleshooting authentication issues with {% data variables.product.prodname_copilot_chat %} in {% data variables.product.prodname_vscode %}
If you are experiencing authentication issues after installing the {% data variables.product.prodname_copilot_chat %} extension in {% data variables.product.prodname_vscode %}, you can try the following steps to resolve the issue.
1. In the bottom left corner of the {% data variables.product.prodname_vscode %} window, click the **Accounts** icon, hover over your {% data variables.product.prodname_dotcom %} username, and click the **Sign out** button.
1. To reload {% data variables.product.prodname_vscode %}, press <kbd>F1</kbd> to open the command palette, and select **Developer: Reload Window**.
1. After {% data variables.product.prodname_vscode %} reloads, sign back in to your {% data variables.product.prodname_dotcom %} account.
{% endvscode %}
{% visualstudio %}
## Troubleshooting authentication issues with {% data variables.product.prodname_copilot_chat %} in {% data variables.product.prodname_vs %}
If you are experiencing authentication issues after installing the {% data variables.product.prodname_copilot_chat %} extension in {% data variables.product.prodname_vs %}, you can try the following steps to resolve the issue.
1. Check that the {% data variables.product.prodname_dotcom %} ID you are signed into {% data variables.product.prodname_vs %} with is the same as the one that you have been granted acess to the {% data variables.product.prodname_copilot_chat %} beta with.
1. Check whether your {% data variables.product.prodname_dotcom %} ID/credentials need refreshing in {% data variables.product.prodname_vs %}. For more information, see ["Work with {% data variables.product.prodname_dotcom %} accounts in {% data variables.product.prodname_vs %}](https://learn.microsoft.com/en-us/visualstudio/ide/work-with-github-accounts?view=vs-2022)" in the {% data variables.product.prodname_vs %} documentation.
1. Try removing and re-adding your {% data variables.product.prodname_dotcom %} ID to {% data variables.product.prodname_vs %} and restarting {% data variables.product.prodname_vs %}.
1. If the above steps don't work, click the **Share feedback** button and select ** Report a problem** to report the issue to the {% data variables.product.prodname_vs %} team.
![Screenshot of the share feedback button in {% data variables.product.prodname_vs %}.](/assets/images/help/copilot/vs-share-feedback-button.png)
{% endvisualstudio %}

Просмотреть файл

@ -0,0 +1 @@
{% data variables.product.prodname_copilot_chat %} is a chat interface that lets you ask and receive answers to coding-related questions directly within a supported IDE. {% data variables.product.prodname_copilot_chat_short %} 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 "[AUTOTITLE](/copilot/github-copilot-chat/about-github-copilot-chat)."

Просмотреть файл

@ -0,0 +1 @@
- To use {% data variables.product.prodname_copilot_chat %} you must have an active {% data variables.product.prodname_copilot %} subscription. For more information, see "[AUTOTITLE](/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot)."

Просмотреть файл

@ -0,0 +1 @@
{% data variables.product.prodname_copilot_chat %} is intended to answer exclusively coding related questions that you ask in natural language. For example, you can ask {% data variables.product.prodname_copilot_chat %} to help you write a function that returns the sum of two numbers.

Просмотреть файл

@ -0,0 +1,19 @@
## Enabling or disabling {% data variables.product.prodname_copilot_chat %}
The {% data variables.product.prodname_copilot_chat %} limited public beta is available to all organizations and enterprises that have an active {% data variables.product.prodname_copilot_for_business %} license. You can enable or disable {% data variables.product.prodname_copilot_chat %} for your organization or enterprise in the {% data variables.product.prodname_copilot_for_business %} settings page.
### Enabling or disabling {% data variables.product.prodname_copilot_chat %} at the organization level
{% data reusables.profile.access_org %}
{% data reusables.profile.org_settings %}
1. In the "Code planning, and automation" section of the sidebar, click **{% octicon "copilot" aria-hidden="true" %} {% data variables.product.prodname_copilot_short %}**, and then click **Policies**.
1. To the right of **{% data variables.product.prodname_copilot_chat %} Beta**, select the dropdown menu, and then click **Allowed** to enable the {% data variables.product.prodname_copilot_chat %} beta, or **Blocked** to disable it.
### Enabling or disabling {% data variables.product.prodname_copilot_chat %} at the enterprise level
{% data reusables.enterprise-accounts.policies-tab %}
{% data reusables.enterprise-accounts.copilot-tab %}
1. To the right of **{% data variables.product.prodname_copilot_chat %} Beta**, select the dropdown menu, and then choose the appropriate option.
- Click **Allowed** to enable the {% data variables.product.prodname_copilot_chat %} beta for all organizations under your enterprise.
- Click **Blocked** to disable the {% data variables.product.prodname_copilot_chat %} beta for all organizations under your enterprise.
- Click **No policy** to allow each organization under your enterprise to set their own policy.

Просмотреть файл

@ -0,0 +1 @@
1. Close the "Manage Extensions" window, then exit and relaunch {% data variables.product.prodname_vs %}.

Просмотреть файл

@ -0,0 +1,3 @@
1. In the {% data variables.product.prodname_vs %} menu bar, click **Extensions**, then click **Manage Extensions**.
![Screenshot of the menu bar in {% data variables.product.prodname_vs %}. The "Extensions" menu is open, and the "Manage Extensions" option is highlighted with an orange outline.](/assets/images/help/copilot/visual-studio-toolbar.png)

Просмотреть файл

@ -0,0 +1,3 @@
{% data variables.product.prodname_copilot_chat %} is currently in limited public beta for organizations and enterprises with a {% data variables.product.prodname_copilot_for_business %} subscription, and is subject to changes.
<br><br>
If you have a {% data variables.product.prodname_copilot_for_individuals %} subscription, you can still join the [waitlist to participate in the limited public beta](https://github.com/github-copilot/chat_waitlist_signup/join). You will be notified by email when you are accepted into the beta program. Joining the waitlist does not guarantee access.

Просмотреть файл

@ -235,6 +235,8 @@ prodname_copilot_for_business: 'GitHub Copilot for Business'
prodname_copilot_for_individuals: 'GitHub Copilot for Individuals'
prodname_copilot_business_short: 'Copilot for Business'
prodname_copilot_individuals_short: 'Copilot for Individuals'
prodname_copilot_chat: 'GitHub Copilot Chat'
prodname_copilot_chat_short: 'Copilot Chat'
# Command Palette
prodname_command_palette: 'GitHub Command Palette'