diff --git a/content/copilot/concepts/about-github-copilot-chat.md b/content/copilot/concepts/about-github-copilot-chat.md new file mode 100644 index 000000000000..47a068013d1c --- /dev/null +++ b/content/copilot/concepts/about-github-copilot-chat.md @@ -0,0 +1,45 @@ +--- +title: About GitHub Copilot Chat +intro: 'Learn how you can use {% data variables.copilot.copilot_chat %} to enhance your coding experience.' +versions: + feature: copilot +topics: + - Copilot +type: overview +--- + +# Overview + +{% data variables.copilot.copilot_chat %} is the AI-powered chat interface for {% data variables.product.prodname_copilot %}. It allows you to interact with AI models to get coding assistance, explanations, and suggestions in a conversational format. + +{% data variables.copilot.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. + +{% data variables.copilot.copilot_chat %} is available in various environments: + +* {% data variables.product.github %} (the website). +* A range of IDEs such as {% data variables.product.prodname_vscode %}, Xcode, and JetBrains IDEs. +* {% data variables.product.prodname_mobile %}. + +Different environments may have different features and capabilities, but the core functionality remains consistent across platforms. To explore the functionality available in each environment, see the [AUTOTITLE](/copilot/how-tos/chat) how-to guides and the [AUTOTITLE](/copilot/tutorials). + +## Limitations + +{% data variables.copilot.copilot_chat_short %} is designed to assist with coding tasks, but you remain responsible for reviewing and validating the code it generates. It may not always produce correct or optimal solutions, and it can sometimes generate code that contains security vulnerabilities or other issues. Always test and review the code before using it in production. + +## Customizing {% data variables.copilot.copilot_chat_short %} responses + +{% data variables.product.prodname_copilot %} in {% data variables.product.github %}, {% data variables.product.prodname_vscode %}, and {% data variables.product.prodname_vs %} can provide chat responses that are tailored to the way your team works, the tools you use, the specifics of your project, or your personal preferences, if you provide it with enough context to do so. Instead of repeating instructions in each prompt, you can create and save instructions for {% data variables.copilot.copilot_chat_short %} to customize what responses you receive. + +There are two types of custom instructions you can add for {% data variables.copilot.copilot_chat_short %}: +* Repository instructions: You can create a custom instructions file for a repository, so that all prompts asked in the context of the repository automatically include the instructions you've defined +* Personal instructions: You can add personal instructions so that all the chat responses you, as a user, receive are tailored to your preferences + +For more information, see [AUTOTITLE](/copilot/customizing-copilot/adding-repository-custom-instructions-for-github-copilot) and [AUTOTITLE](/copilot/customizing-copilot/adding-personal-custom-instructions-for-github-copilot). + +## AI models for {% data variables.copilot.copilot_chat_short %} + +{% data reusables.copilot.change-the-ai-model %} + +## Extending {% data variables.copilot.copilot_chat_dotcom_short %} + +{% data reusables.copilot.copilot-extensions.extending-copilot-chat %} diff --git a/content/copilot/concepts/index.md b/content/copilot/concepts/index.md index 100efef820a6..b3dccdc6826f 100644 --- a/content/copilot/concepts/index.md +++ b/content/copilot/concepts/index.md @@ -12,6 +12,7 @@ children: - /completions - /prompt-engineering-for-copilot-chat - /about-customizing-github-copilot-chat-responses + - /about-github-copilot-chat - /content-exclusion-for-github-copilot - /indexing-repositories-for-copilot-chat - /about-copilot-coding-agent diff --git a/content/copilot/how-tos/chat/asking-github-copilot-questions-in-github.md b/content/copilot/how-tos/chat/asking-github-copilot-questions-in-github.md index 280acd26bf6b..29929dea4c1f 100644 --- a/content/copilot/how-tos/chat/asking-github-copilot-questions-in-github.md +++ b/content/copilot/how-tos/chat/asking-github-copilot-questions-in-github.md @@ -17,53 +17,6 @@ redirect_from: - /copilot/using-github-copilot/copilot-chat/asking-github-copilot-questions-in-github --- -## Overview - -{% data variables.copilot.copilot_chat_dotcom %} is a chat interface that lets you ask and receive answers to coding-related questions on the {% data variables.product.github %} website. - -{% data variables.copilot.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. - -On {% data variables.product.github %}, you can use {% data variables.copilot.copilot_chat_short %} to ask different questions in different contexts. For example, you can ask about a specific repository, a specific issue, or a specific pull request. You can also ask general questions about software development, or about a specific programming language. - -### Limitations - -The quality of the results from {% data variables.copilot.copilot_chat_short %} may, in some situations, be degraded if very large files, or a large number of files, are used as a context for a question. - -### Viewing and editing generated files within {% data variables.copilot.copilot_chat_short %} - -> [!NOTE] -> This feature is currently in {% data variables.release-phases.public_preview %} and subject to change. - -When you ask a question, {% data variables.product.prodname_copilot_short %} may generate one or more files as part of its response. In the {% data variables.copilot.copilot_chat_short %} panel, the files are displayed inline, within the chat response. In immersive view (that is, at [https://github.com/copilot](https://github.com/copilot)), the generated files are displayed in a side panel. You can view and edit the files in the panel, or download them to your computer. - -For example, asking `Generate a simple calculator using HTML, CSS, and JavaScript` may generate multiple files, such as `index.html`, `styles.css`, and `script.js`. - -In immersive view, you can also preview how some file formats, such as Markdown, render by toggling to the "Preview" tab in the side panel. - -## Powered by skills - -When using the {% data variables.copilot.copilot_gpt_4o %} and {% data variables.copilot.copilot_claude %} models, {% data variables.product.prodname_copilot_short %} has access to a collection of skills to fetch data from {% data variables.product.github %}, which are dynamically selected based on the question you ask. You can tell which skill {% data variables.product.prodname_copilot_short %} used by clicking {% octicon "chevron-down" aria-label="the down arrow" %} to expand the status information in the chat window. - -![Screenshot of the {% data variables.product.prodname_copilot_short %} chat panel with the status information expanded and the skill that was used highlighted with an orange outline.](/assets/images/help/copilot/chat-show-skill.png) - -You can explicitly ask {% data variables.copilot.copilot_chat_dotcom %} to use a particular skill - for example, `Use the Bing skill to find the latest GPT4 model from OpenAI`. - -You can generate a list of currently available skills by asking {% data variables.product.prodname_copilot_short %}: `What skills are available?` - -## Customizing {% data variables.copilot.copilot_chat_short %} responses - -{% data variables.product.prodname_copilot %} can provide chat responses that are tailored to the way your team works, the tools you use, the specifics of your project, or your personal preferences, if you provide it with enough context to do so. Instead of repeating instructions in each prompt, you can create and save instructions for {% data variables.copilot.copilot_chat_short %} to customize what responses you receive. - -There are two types of custom instructions you can add for {% data variables.copilot.copilot_chat_short %}: -* Repository instructions: You can create a custom instructions file for a repository, so that all prompts asked in the context of the repository automatically include the instructions you've defined -* Personal instructions: You can add personal instructions so that all the chat responses you, as a user, receive are tailored to your preferences - -For more information, see [AUTOTITLE](/copilot/customizing-copilot/adding-repository-custom-instructions-for-github-copilot) and [AUTOTITLE](/copilot/customizing-copilot/adding-personal-custom-instructions-for-github-copilot). - -## AI models for {% data variables.copilot.copilot_chat_short %} - -{% data reusables.copilot.change-the-ai-model %} - ## Submitting a question to {% data variables.copilot.copilot_chat_short %} You can open {% data variables.copilot.copilot_chat_short %} from any page on {% data variables.product.github %}. Certain questions may require you to be in a specific context, such as a repository, issue, or pull request. The following procedure describes how to ask a general software related question, and demonstrates the core functionality of {% data variables.copilot.copilot_chat_short %} on {% data variables.product.github %}. For more information on other scenarios, see [Asking {% data variables.copilot.copilot_chat_short %} questions in different contexts](/copilot/using-github-copilot/asking-github-copilot-questions-in-github#asking-copilot-chat-questions-in-different-contexts). @@ -90,6 +43,17 @@ Depending on the question you ask, and your enterprise and organization settings 1. To start a new conversation, click {% data reusables.copilot.pencil-paper-icon %} at the top left of the page. 1. To see a list of your previous conversations, click {% octicon "sidebar-collapse" aria-label="Open sidebar" %} at the top left of the page. +### Viewing and editing generated files within {% data variables.copilot.copilot_chat_short %} + +> [!NOTE] +> This feature is currently in {% data variables.release-phases.public_preview %} and subject to change. + +When you ask a question, {% data variables.product.prodname_copilot_short %} may generate one or more files as part of its response. In the {% data variables.copilot.copilot_chat_short %} panel, the files are displayed inline, within the chat response. In immersive view (that is, at [https://github.com/copilot](https://github.com/copilot)), the generated files are displayed in a side panel. You can view and edit the files in the panel, or download them to your computer. + +For example, asking `Generate a simple calculator using HTML, CSS, and JavaScript` may generate multiple files, such as `index.html`, `styles.css`, and `script.js`. + +In immersive view, you can also preview how some file formats, such as Markdown, render by toggling to the "Preview" tab in the side panel. + ### Regenerating a response with a different model After {% data variables.product.prodname_copilot_short %} responds to your question, you can regenerate the same prompt using a different model by clicking the retry icon ({% octicon "sync" aria-label="The re-run icon" %}) below the response. The new response will use your selected model and maintain the full context of the conversation. @@ -141,158 +105,21 @@ To navigate between subthreads: Hover over the counter to display the edit and navigation buttons, then click {% octicon "chevron-left" aria-label="Previous response" %} or {% octicon "chevron-right" aria-label="Next response" %} to navigate to the previous or next subthread. -## Asking {% data variables.copilot.copilot_chat_short %} questions in different contexts - -You can ask {% data variables.copilot.copilot_chat_short %} different types of questions depending on where you are on {% data variables.product.github %}. For example, to ask a question about a specific repository, you must be in the context of that repository. The following sections describe how to access the different contexts. - - For examples of the types of questions you can ask in different contexts, see [AUTOTITLE](/copilot/using-github-copilot/example-use-cases/example-prompts-for-copilot-chat?tool=webui). - -## Asking {% data variables.copilot.copilot_chat_short %} questions in a repository - -You can ask {% data variables.product.prodname_copilot_short %} about a specific repository: - -1. Navigate to a repository on {% data variables.product.github %}. -{% data reusables.copilot.open-chat-panel %} - - {% data variables.copilot.copilot_chat_short %} will open a new conversation, with the repository you are viewing selected as the context for your question. - - ![Screenshot of the {% data variables.product.prodname_copilot_short %} chat panel opened inside a repository. The specified repository is highlighted with a dark orange outline.](/assets/images/help/copilot/copilot-chat-in-repository.png) - -1. At the bottom of the panel, in the prompt box, type a question and press Enter. - - > [!NOTE] - > - > {% data variables.product.prodname_copilot_short %}'s ability to answer natural language questions in a repository context is improved when the repository has been indexed for semantic code search. The indexing status of the repository is displayed when you start a conversation that has a repository context. For more information, see [AUTOTITLE](/enterprise-cloud@latest/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-github-copilot-features-in-your-organization/indexing-repositories-for-copilot-chat). - -## Asking {% data variables.copilot.copilot_chat_short %} questions about a specific file or symbol - -You can ask {% data variables.product.prodname_copilot_short %} about a specific file, folder, or symbol within a repository. - -> [!NOTE] A "symbol" is a named entity in code. This could be a variable, function, class, module, or any other identifier that's part of a codebase. - -1. Navigate to a repository on {% data variables.product.github %}. -{% data reusables.copilot.open-chat-panel %} -1. In the prompt box, click **{% octicon "paperclip" aria-label="Add attachments" %} Attach**, then click **Files, folders, and symbols**. -1. Search for and select one or more files, folders, or symbols. -1. In the prompt box, type a question and press Enter. - - {% data variables.product.prodname_copilot_short %} replies in the chat panel. - - > [!TIP] - > - > {% data reusables.copilot.semantic-index-info %} - -{% ifversion ghec %} - -## Asking {% data variables.copilot.copilot_chat_short %} questions about a knowledge base - -Organization owners (with a {% data variables.copilot.copilot_enterprise_short %} subscription) can create knowledge bases, grouping together Markdown documentation across one or more repositories. You can use a knowledge base to ask questions with that context in mind. - -When you enter a query, {% data variables.product.prodname_copilot_short %} searches for relevant documentation snippets, synthesizes a summary of the relevant snippets to answer your question, and provides links to the source documentation for additional context. - -{% data reusables.copilot.immersive-mode-instructions %} -1. To select a knowledge base for context, click **{% octicon "paperclip" aria-label="Add attachments" %} Attach** at the bottom of the chat panel, then click **Knowledge bases**. -1. In the "Select knowledge bases" dialog, type the name of the knowledge base you want to use as context, select the knowledge bases you want to use, and click **Save**. -1. In the prompt box, type a question and press Enter. - - You can click the **_n_ references** link at the top of the response to see the sources that {% data variables.product.prodname_copilot_short %} used to answer your question. - -1. Within a conversation thread, you can ask follow-up questions. Follow-up questions will continue to use the selected knowledge base as context until you explicitly detach the knowledge base or select a different one. - -{% endif %} - -## Asking {% data variables.copilot.copilot_chat_short %} questions about specific pieces of code - -You can chat with {% data variables.product.prodname_copilot_short %} about a file in your repository, or about specific lines of code within a file. - -1. On {% data variables.product.github %}, navigate to a repository and open a file. -1. Do one of the following: - * To ask a question about the entire file, click the {% data variables.product.prodname_copilot_short %} icon ({% octicon "copilot" aria-hidden="true" aria-label="copilot" %}) at the top right of the file view. - - ![Screenshot of the {% data variables.product.prodname_copilot_short %} button, highlighted with a dark orange outline, at the top of the file view.](/assets/images/help/copilot/copilot-button-for-file.png) - - * To ask a question about specific lines within the file: - - 1. Select the lines by clicking the line number for the first line you want to select, holding down Shift and clicking the line number for the last line you want to select. - 1. To ask your own question about the selected lines, click the {% data variables.product.prodname_copilot_short %} icon ({% octicon "copilot" aria-hidden="true" aria-label="copilot" %}) to the right of your selection. - This displays the {% data variables.copilot.copilot_chat %} panel with the selected lines indicated as the context of your question. - 1. To ask a predefined question, click the downward-pointing button beside the {% data variables.product.prodname_copilot_short %} icon, then choose one of the options. - - ![Screenshot of the {% data variables.product.prodname_copilot_short %} buttons, highlighted with a dark orange outline, to the right of some selected code.](/assets/images/help/copilot/copilot-buttons-inline-code.png) - -1. If you clicked the {% data variables.product.prodname_copilot_short %} icon, type a question in the prompt box at the bottom of the chat panel and press Enter. - - {% data variables.product.prodname_copilot_short %} responds to your request in the panel. - - ![Screenshot of a response to the question "What does the function at the selected lines do?"](/assets/images/help/copilot/copilot-sample-chat-response.png) - -## Asking questions about a specific pull request - -You can ask {% data variables.product.prodname_copilot_short %} different questions about a pull request, from different views within the pull request. For example, you can ask {% data variables.product.prodname_copilot_short %} to summarize a pull request, or explain what has changed within specific files or lines of code in a pull request. - -### Get a summary of a pull request - -1. On {% data variables.product.github %}, navigate to a pull request in a repository. -{% data reusables.copilot.open-chat-panel %} -{% data reusables.copilot.chat-previous-conversation %} -1. At the bottom of the {% data variables.copilot.copilot_chat_short %} panel, in the prompt box, type a question and press Enter. - -### Ask about changes to a specific file in a pull request - -1. On {% data variables.product.github %}, navigate to a pull request in a repository. -1. Click the **Files changed** tab. -1. Click {% octicon "kebab-horizontal" aria-label="Show options" %} at the top right of the file, then click **Ask {% data variables.product.prodname_copilot_short %} about this diff**. -1. Type a question in the prompt box at the bottom of the chat panel and press Enter. - -### Ask about specific lines within a file in a pull request - -1. On {% data variables.product.github %}, navigate to a pull request in a repository. -1. Click the **Files changed** tab. -1. Click the line number for the first line you want to select, then hold down Shift and click the line number for the last line you want to select. -1. Ask {% data variables.product.prodname_copilot_short %} a question, or choose from a list of predefined questions. - * _To ask your own question about the selected lines_, to the right of your selection, click the {% octicon "copilot" aria-hidden="true" aria-label="copilot" %} {% data variables.product.prodname_copilot_short %} icon. - This displays the {% data variables.copilot.copilot_chat %} panel with the selected lines indicated as the context of your question. - -### Ask why a workflow has failed - -1. On {% data variables.product.github %}, navigate to a pull request in a repository. -1. Scroll to the bottom of the page, then, next to one of the failing checks, click **Details**. -{% data reusables.copilot.open-chat-panel %} -{% data reusables.copilot.chat-previous-conversation %} -1. At the bottom of the {% data variables.copilot.copilot_chat_short %} panel, in the prompt box, ask {% data variables.product.prodname_copilot_short %} why the pull request has failed and press Enter. - - {% data variables.product.prodname_copilot_short %} responds with information about why the pull request failed. {% data variables.product.prodname_copilot_short %} may also provide suggestions for how to fix the issue. - -1. If {% data variables.product.prodname_copilot_short %} has provided steps to fix the issue, you can follow the steps to resolve the problem. - -## Asking a question about a specific issue or discussion - -You can ask {% data variables.product.prodname_copilot_short %} to summarize or answer questions about a specific issue or discussion. - -> [!NOTE] The quality of {% data variables.copilot.copilot_chat_short %}'s responses may be degraded when working with issues or discussions that have very long bodies or a large number of comments. For example, this may occur if you ask {% data variables.product.prodname_copilot_short %} to summarize a long-running discussion. Where this happens, {% data variables.product.prodname_copilot_short %} will warn you so you can double check its output. - -1. Navigate to an issue or discussion on {% data variables.product.github %}. -{% data reusables.copilot.open-chat-panel %} -{% data reusables.copilot.chat-previous-conversation %} -1. At the bottom of the {% data variables.product.prodname_copilot_short %} chat panel, in the prompt box, type a question and press Enter. +## Powered by skills - {% data variables.product.prodname_copilot_short %} responds to your request in the panel. +{% data variables.product.prodname_copilot_short %} has access to a collection of skills to fetch data from {% data variables.product.github %}, which are dynamically selected based on the question you ask. You can tell which skill {% data variables.product.prodname_copilot_short %} used by clicking {% octicon "chevron-down" aria-label="the down arrow" %} to expand the status information in the chat window. - > [!TIP] Instead of navigating to an issue or discussion in your browser to ask a question, you can include the relevant URL in your message. For example, `Summarize https://github.com/monalisa/octokit/issues/1`. +![Screenshot of the {% data variables.product.prodname_copilot_short %} chat panel with the status information expanded and the skill that was used highlighted with an orange outline.](/assets/images/help/copilot/chat-show-skill.png) -## Asking a question about a specific commit +You can explicitly ask {% data variables.copilot.copilot_chat_dotcom %} to use a particular skill - for example, `Use the Bing skill to find the latest GPT4 model from OpenAI`. -You can ask {% data variables.product.prodname_copilot_short %} to explain the changes in a commit. +You can generate a list of currently available skills by asking {% data variables.product.prodname_copilot_short %}: `What skills are available?` -1. Navigate to a commit on {% data variables.product.github %}. -{% data reusables.copilot.open-chat-panel %} -{% data reusables.copilot.chat-previous-conversation %} -1. At the bottom of the {% data variables.product.prodname_copilot_short %} chat panel, in the prompt box, type a question and press Enter. +## Asking {% data variables.copilot.copilot_chat_short %} questions in different contexts - > [!TIP] - > If you know the SHA for a commit, instead of navigating to the commit, you can ask {% data variables.product.prodname_copilot_short %} about the commit from any page in the repository on {% data variables.product.github %} by including the SHA in your message. For example, `What changed in commit a778e0eab?` +You can ask {% data variables.copilot.copilot_chat_short %} different types of questions depending on where you are on {% data variables.product.github %}. For example, to ask a question about a specific repository, you must be in the context of that repository. The following sections describe how to access the different contexts. -{% data reusables.copilot.stop-response-generation %} + For examples of the types of questions you can ask in different contexts, see [AUTOTITLE](/copilot/using-github-copilot/example-use-cases/example-prompts-for-copilot-chat?tool=webui). ## Using images in {% data variables.copilot.copilot_chat_short %} @@ -362,10 +189,6 @@ You can access {% data variables.product.prodname_copilot_short %}'s immersive v > [!NOTE] > If you don't see the {% data variables.copilot.copilot_chat_short %} prompt box on your dashboard, check that **Dashboard entry point** in enabled in your {% data variables.product.prodname_copilot %} settings. -## Extending {% data variables.copilot.copilot_chat_dotcom_short %} - -{% data reusables.copilot.copilot-extensions.extending-copilot-chat %} - ## Sharing {% data variables.copilot.copilot_chat_short %} conversations > [!NOTE] This feature is currently in {% data variables.release-phases.public_preview %} and subject to change. During the {% data variables.release-phases.public_preview %}, this feature is only available to users without enterprise or team memberships. diff --git a/content/copilot/how-tos/context/index.md b/content/copilot/how-tos/context/index.md index 168aa55564dc..362c04f4b0d0 100644 --- a/content/copilot/how-tos/context/index.md +++ b/content/copilot/how-tos/context/index.md @@ -10,6 +10,7 @@ children: - /copilot-spaces - /model-context-protocol - /creating-and-managing-copilot-knowledge-bases + - /using-knowledge-bases - /install-copilot-extensions redirect_from: - /copilot/customizing-copilot diff --git a/content/copilot/how-tos/context/using-knowledge-bases.md b/content/copilot/how-tos/context/using-knowledge-bases.md new file mode 100644 index 000000000000..ab9da9b50ea5 --- /dev/null +++ b/content/copilot/how-tos/context/using-knowledge-bases.md @@ -0,0 +1,32 @@ +--- +title: Using knowledge bases +shortTitle: Use knowledge bases +intro: 'Learn how to provide predefined context for {% data variables.copilot.copilot_chat %} with knowledge bases.' +topics: + - Copilot +versions: + feature: copilot-enterprise +--- + +## Introduction + +Knowledge bases are collections of documentation that you can use to provide context for your questions in {% data variables.copilot.copilot_chat %}. Knowledge bases are useful when you want to ask questions about a specific topic or set of topics, and you want the answers to be informed by the relevant documentation. + +Organization owners (with a {% data variables.copilot.copilot_enterprise_short %} subscription) can create knowledge bases, grouping together Markdown documentation across one or more repositories. You can use a knowledge base to ask questions with that context in mind. + +When you enter a query, {% data variables.product.prodname_copilot_short %} searches for relevant documentation snippets, synthesizes a summary of the relevant snippets to answer your question, and provides links to the source documentation for additional context. + +## Asking {% data variables.copilot.copilot_chat_short %} questions about a knowledge base + +{% data reusables.copilot.immersive-mode-instructions %} +1. To select a knowledge base for context, click **{% octicon "paperclip" aria-label="Add attachments" %} Attach** at the bottom of the chat panel, then click **Knowledge bases**. +1. In the "Select knowledge bases" dialog, type the name of the knowledge base you want to use as context, select the knowledge bases you want to use, and click **Save**. +1. In the prompt box, type a question and press Enter. + + You can click the **_n_ references** link at the top of the response to see the sources that {% data variables.product.prodname_copilot_short %} used to answer your question. + +1. Within a conversation thread, you can ask follow-up questions. Follow-up questions will continue to use the selected knowledge base as context until you explicitly detach the knowledge base or select a different one. + +## Further reading + +* [AUTOTITLE](//copilot/tutorials/using-copilot-to-explore-a-codebase) diff --git a/content/copilot/tutorials/index.md b/content/copilot/tutorials/index.md index f5bc7a81ef23..28043d1aa241 100644 --- a/content/copilot/tutorials/index.md +++ b/content/copilot/tutorials/index.md @@ -13,6 +13,8 @@ children: - /quickstart-for-github-copilot-extensions-using-agents - /speeding-up-development-work-with-copilot-spaces - /using-copilot-to-explore-a-codebase + - /using-copilot-to-explore-issues-and-discussions + - /using-copilot-to-explore-pull-requests - /writing-tests-with-github-copilot - /refactoring-code-with-github-copilot - /learning-a-new-programming-language-with-github-copilot diff --git a/content/copilot/tutorials/using-copilot-to-explore-a-codebase.md b/content/copilot/tutorials/using-copilot-to-explore-a-codebase.md index a71d97e78efa..b26506c90f2e 100644 --- a/content/copilot/tutorials/using-copilot-to-explore-a-codebase.md +++ b/content/copilot/tutorials/using-copilot-to-explore-a-codebase.md @@ -85,6 +85,38 @@ To find out about a specific file: 1. For a small file, ask {% data variables.product.prodname_copilot_short %}: `Explain this file`. 1. For a large file, ask: `Explain what this file does. Start with an overview of the purpose of the file. Then, in appropriately headed sections, go through each part of the file and explain what it does in detail.` +## Understanding specific lines of code + +Use {% data variables.product.prodname_copilot_short %} to help you understand specific lines of code in a file. + +To find out about a specific line of code: + +1. On {% data variables.product.github %}, navigate to a repository and open a file. +1. Select the lines by clicking the line number for the first line you want to select, holding down Shift and clicking the line number for the last line you want to select. +1. To ask your own question about the selected lines, click the {% data variables.product.prodname_copilot_short %} icon ({% octicon "copilot" aria-hidden="true" aria-label="copilot" %}) to the right of your selection. + This displays the {% data variables.copilot.copilot_chat %} panel with the selected lines indicated as the context of your question. +1. To ask a predefined question, click the downward-pointing button beside the {% data variables.product.prodname_copilot_short %} icon, then choose one of the options. + +![Screenshot of the {% data variables.product.prodname_copilot_short %} buttons, highlighted with a dark orange outline, to the right of some selected code.](/assets/images/help/copilot/copilot-buttons-inline-code.png) + +1. If you clicked the {% data variables.product.prodname_copilot_short %} icon, type a question in the prompt box at the bottom of the chat panel and press Enter. + +## Understanding a specific file or symbol + +Use {% data variables.product.prodname_copilot_short %} to help you understand the purpose of a specific file or symbol in the codebase. A symbol is a named entity in the code, such as a function, class, or variable. + +1. Navigate to a repository on {% data variables.product.github %}. +{% data reusables.copilot.open-chat-panel %} +1. In the prompt box, click **{% octicon "paperclip" aria-label="Add attachments" %} Attach**, then click **Files, folders, and symbols**. +1. Search for and select one or more files, folders, or symbols. +1. In the prompt box, type a question and press Enter. + + {% data variables.product.prodname_copilot_short %} replies in the chat panel. + + > [!TIP] + > + > {% data reusables.copilot.semantic-index-info %} + ## Finding out about commits One good way to familiarize yourself with a project is to look at the recent work that's been happening. You can do this by browsing the recent commits. diff --git a/content/copilot/tutorials/using-copilot-to-explore-issues-and-discussions.md b/content/copilot/tutorials/using-copilot-to-explore-issues-and-discussions.md new file mode 100644 index 000000000000..2b1afff43c8e --- /dev/null +++ b/content/copilot/tutorials/using-copilot-to-explore-issues-and-discussions.md @@ -0,0 +1,47 @@ +--- +title: Using Copilot to explore issues and discussions +shortTitle: Explore issues and discussions +intro: '{% data variables.copilot.copilot_chat %} can help you quickly gain context of lengthy discussions and issues.' +topics: + - Copilot +versions: + feature: copilot +--- + +## Introduction + +{% data variables.product.prodname_copilot_short %} can help you quickly gain context of lengthy discussions and issues on {% data variables.product.github %}. You can ask {% data variables.product.prodname_copilot_short %} to summarize discussions, identify key participants, and provide insights into the status of an issue or discussion. + +The quality of {% data variables.copilot.copilot_chat_short %}'s responses may be degraded when working with issues or discussions that have very long bodies or a large number of comments. For example, this may occur if you ask {% data variables.product.prodname_copilot_short %} to summarize a long-running discussion. Where this happens, {% data variables.product.prodname_copilot_short %} will warn you so you can double check its output. + +## Exploring issues and discussions + +1. Navigate to an issue or discussion on {% data variables.product.github %}. +{% data reusables.copilot.open-chat-panel %} +{% data reusables.copilot.chat-previous-conversation %} +1. At the bottom of the {% data variables.product.prodname_copilot_short %} chat panel, in the prompt box, type a question and press Enter. + + {% data variables.product.prodname_copilot_short %} responds to your request in the panel. + + > [!TIP] Instead of navigating to an issue or discussion in your browser to ask a question, you can include the relevant URL in your message. For example, `Summarize https://github.com/monalisa/octokit/issues/1`. + +## Example prompts + +The following prompts are examples of the kind of questions you can ask {% data variables.product.prodname_copilot_short %} to help you find out about an issue or discussion. + +### General questions + +* `Summarize this issue` +* `What is the current status of this discussion?` +* `What are the main points of contention in this issue?` +* `Who are the key participants in this discussion?` + +### Specific questions + +* `What are the proposed solutions for this issue?` +* `What are the potential impacts of this issue?` +* `What are the next steps for this discussion?` + +## Further reading + +* [AUTOTITLE](/copilot/tutorials/using-copilot-to-explore-a-codebase#further-reading) diff --git a/content/copilot/tutorials/using-copilot-to-explore-pull-requests.md b/content/copilot/tutorials/using-copilot-to-explore-pull-requests.md new file mode 100644 index 000000000000..cdd60a8653dc --- /dev/null +++ b/content/copilot/tutorials/using-copilot-to-explore-pull-requests.md @@ -0,0 +1,83 @@ +--- +title: Using Copilot to explore pull requests +shortTitle: Explore pull requests +intro: '{% data variables.copilot.copilot_chat %} can help you understand the content, functionality, and status of a pull request.' +topics: + - Copilot +versions: + feature: copilot +--- + +## Introduction + +You can ask {% data variables.product.prodname_copilot_short %} different questions about a pull request, from different views within the pull request. For example, you can ask {% data variables.product.prodname_copilot_short %} to summarize a pull request, or explain what has changed within specific files or lines of code in a pull request. + +## Get a summary of a pull request + +You can ask {% data variables.product.prodname_copilot_short %} to summarize a pull request, or to provide information about the status of a pull request. + +1. On {% data variables.product.github %}, navigate to a pull request in a repository. +{% data reusables.copilot.open-chat-panel %} +{% data reusables.copilot.chat-previous-conversation %} +1. At the bottom of the {% data variables.copilot.copilot_chat_short %} panel, in the prompt box, type a question and press Enter. + +### Example prompts + +The following prompts are examples of the kind of questions you can ask {% data variables.product.prodname_copilot_short %} to help you find out about a pull request. + +* `Summarize this pull request` +* `What is the current status of this pull request?` +* `What are the main changes in this pull request?` + +## Ask about changes to a specific file in a pull request + +You can ask {% data variables.product.prodname_copilot_short %} to explain the changes made to a specific file in a pull request, or to provide information about the status of a file in a pull request. + +1. On {% data variables.product.github %}, navigate to a pull request in a repository. +1. Click the **Files changed** tab. +1. Click {% octicon "kebab-horizontal" aria-label="Show options" %} at the top right of the file, then click **Ask {% data variables.product.prodname_copilot_short %} about this diff**. +1. Type a question in the prompt box at the bottom of the chat panel and press Enter. + +### Example prompts + +* `What are the changes in this file?` +* `What is the status of this file in the pull request?` + +## Ask about specific lines within a file in a pull request + +You can ask {% data variables.product.prodname_copilot_short %} to explain specific lines of code in a pull request, or to provide information about the status of those lines. + +1. On {% data variables.product.github %}, navigate to a pull request in a repository. +1. Click the **Files changed** tab. +1. Click the line number for the first line you want to select, then hold down Shift and click the line number for the last line you want to select. +1. Ask {% data variables.product.prodname_copilot_short %} a question, or choose from a list of predefined questions. + * _To ask your own question about the selected lines_, to the right of your selection, click the {% octicon "copilot" aria-hidden="true" aria-label="copilot" %} {% data variables.product.prodname_copilot_short %} icon. + This displays the {% data variables.copilot.copilot_chat %} panel with the selected lines indicated as the context of your question. + +### Example prompts + +* `Explain the selected lines of code` +* `What do these lines of code do?` + +## Ask why a workflow has failed + +You can ask {% data variables.product.prodname_copilot_short %} to explain why a workflow has failed in a pull request, and provide suggestions for how to fix the issue. + +1. On {% data variables.product.github %}, navigate to a pull request in a repository. +1. Scroll to the bottom of the page, then, next to one of the failing checks, click **Details**. +{% data reusables.copilot.open-chat-panel %} +{% data reusables.copilot.chat-previous-conversation %} +1. At the bottom of the {% data variables.copilot.copilot_chat_short %} panel, in the prompt box, ask {% data variables.product.prodname_copilot_short %} why the pull request has failed and press Enter. + + {% data variables.product.prodname_copilot_short %} responds with information about why the pull request failed. {% data variables.product.prodname_copilot_short %} may also provide suggestions for how to fix the issue. + +1. If {% data variables.product.prodname_copilot_short %} has provided steps to fix the issue, you can follow the steps to resolve the problem. + +### Example prompts + +* `Why has this workflow failed?` +* `What can I do to fix this issue?` + +## Further reading + +* [AUTOTITLE](//copilot/tutorials/using-copilot-to-explore-a-codebase) diff --git a/src/tools/lib/all-tools.ts b/src/tools/lib/all-tools.ts index 0eb961e1d67c..2c062cc02142 100644 --- a/src/tools/lib/all-tools.ts +++ b/src/tools/lib/all-tools.ts @@ -18,6 +18,8 @@ export const allTools: ToolsMapping = { curl: 'curl', desktop: 'Desktop', eclipse: 'Eclipse', + github_mobile: 'GitHub Mobile', + ides: 'IDEs', importer_cli: 'GitHub Enterprise Importer CLI', javascript: 'JavaScript', jetbrains: 'JetBrains IDEs', pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy