Skip to content

Commit f7c187d

Browse files
authored
Merge pull request #39450 from github/repo-sync
Repo sync
2 parents 73e9a86 + 3f1644e commit f7c187d

10 files changed

+264
-196
lines changed
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
---
2+
title: About GitHub Copilot Chat
3+
intro: 'Learn how you can use {% data variables.copilot.copilot_chat %} to enhance your coding experience.'
4+
versions:
5+
feature: copilot
6+
topics:
7+
- Copilot
8+
type: overview
9+
---
10+
11+
# Overview
12+
13+
{% 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.
14+
15+
{% 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.
16+
17+
{% data variables.copilot.copilot_chat %} is available in various environments:
18+
19+
* {% data variables.product.github %} (the website).
20+
* A range of IDEs such as {% data variables.product.prodname_vscode %}, Xcode, and JetBrains IDEs.
21+
* {% data variables.product.prodname_mobile %}.
22+
23+
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).
24+
25+
## Limitations
26+
27+
{% 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.
28+
29+
## Customizing {% data variables.copilot.copilot_chat_short %} responses
30+
31+
{% 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.
32+
33+
There are two types of custom instructions you can add for {% data variables.copilot.copilot_chat_short %}:
34+
* 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
35+
* Personal instructions: You can add personal instructions so that all the chat responses you, as a user, receive are tailored to your preferences
36+
37+
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).
38+
39+
## AI models for {% data variables.copilot.copilot_chat_short %}
40+
41+
{% data reusables.copilot.change-the-ai-model %}
42+
43+
## Extending {% data variables.copilot.copilot_chat_dotcom_short %}
44+
45+
{% data reusables.copilot.copilot-extensions.extending-copilot-chat %}

content/copilot/concepts/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ children:
1212
- /completions
1313
- /prompt-engineering-for-copilot-chat
1414
- /about-customizing-github-copilot-chat-responses
15+
- /about-github-copilot-chat
1516
- /content-exclusion-for-github-copilot
1617
- /indexing-repositories-for-copilot-chat
1718
- /about-copilot-coding-agent

content/copilot/how-tos/chat/asking-github-copilot-questions-in-github.md

Lines changed: 19 additions & 196 deletions
Large diffs are not rendered by default.

content/copilot/how-tos/context/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ children:
1010
- /copilot-spaces
1111
- /model-context-protocol
1212
- /creating-and-managing-copilot-knowledge-bases
13+
- /using-knowledge-bases
1314
- /install-copilot-extensions
1415
redirect_from:
1516
- /copilot/customizing-copilot
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
title: Using knowledge bases
3+
shortTitle: Use knowledge bases
4+
intro: 'Learn how to provide predefined context for {% data variables.copilot.copilot_chat %} with knowledge bases.'
5+
topics:
6+
- Copilot
7+
versions:
8+
feature: copilot-enterprise
9+
---
10+
11+
## Introduction
12+
13+
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.
14+
15+
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.
16+
17+
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.
18+
19+
## Asking {% data variables.copilot.copilot_chat_short %} questions about a knowledge base
20+
21+
{% data reusables.copilot.immersive-mode-instructions %}
22+
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**.
23+
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**.
24+
1. In the prompt box, type a question and press <kbd>Enter</kbd>.
25+
26+
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.
27+
28+
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.
29+
30+
## Further reading
31+
32+
* [AUTOTITLE](//copilot/tutorials/using-copilot-to-explore-a-codebase)

content/copilot/tutorials/index.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ children:
1313
- /quickstart-for-github-copilot-extensions-using-agents
1414
- /speeding-up-development-work-with-copilot-spaces
1515
- /using-copilot-to-explore-a-codebase
16+
- /using-copilot-to-explore-issues-and-discussions
17+
- /using-copilot-to-explore-pull-requests
1618
- /writing-tests-with-github-copilot
1719
- /refactoring-code-with-github-copilot
1820
- /learning-a-new-programming-language-with-github-copilot

content/copilot/tutorials/using-copilot-to-explore-a-codebase.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,38 @@ To find out about a specific file:
8585
1. For a small file, ask {% data variables.product.prodname_copilot_short %}: `Explain this file`.
8686
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.`
8787

88+
## Understanding specific lines of code
89+
90+
Use {% data variables.product.prodname_copilot_short %} to help you understand specific lines of code in a file.
91+
92+
To find out about a specific line of code:
93+
94+
1. On {% data variables.product.github %}, navigate to a repository and open a file.
95+
1. Select the lines by clicking the line number for the first line you want to select, holding down <kbd>Shift</kbd> and clicking the line number for the last line you want to select.
96+
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.
97+
This displays the {% data variables.copilot.copilot_chat %} panel with the selected lines indicated as the context of your question.
98+
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.
99+
100+
![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)
101+
102+
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 <kbd>Enter</kbd>.
103+
104+
## Understanding a specific file or symbol
105+
106+
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.
107+
108+
1. Navigate to a repository on {% data variables.product.github %}.
109+
{% data reusables.copilot.open-chat-panel %}
110+
1. In the prompt box, click **{% octicon "paperclip" aria-label="Add attachments" %} Attach**, then click **Files, folders, and symbols**.
111+
1. Search for and select one or more files, folders, or symbols.
112+
1. In the prompt box, type a question and press <kbd>Enter</kbd>.
113+
114+
{% data variables.product.prodname_copilot_short %} replies in the chat panel.
115+
116+
> [!TIP]
117+
>
118+
> {% data reusables.copilot.semantic-index-info %}
119+
88120
## Finding out about commits
89121

90122
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.
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
---
2+
title: Using Copilot to explore issues and discussions
3+
shortTitle: Explore issues and discussions
4+
intro: '{% data variables.copilot.copilot_chat %} can help you quickly gain context of lengthy discussions and issues.'
5+
topics:
6+
- Copilot
7+
versions:
8+
feature: copilot
9+
---
10+
11+
## Introduction
12+
13+
{% 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.
14+
15+
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.
16+
17+
## Exploring issues and discussions
18+
19+
1. Navigate to an issue or discussion on {% data variables.product.github %}.
20+
{% data reusables.copilot.open-chat-panel %}
21+
{% data reusables.copilot.chat-previous-conversation %}
22+
1. At the bottom of the {% data variables.product.prodname_copilot_short %} chat panel, in the prompt box, type a question and press <kbd>Enter</kbd>.
23+
24+
{% data variables.product.prodname_copilot_short %} responds to your request in the panel.
25+
26+
> [!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`.
27+
28+
## Example prompts
29+
30+
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.
31+
32+
### General questions
33+
34+
* `Summarize this issue`
35+
* `What is the current status of this discussion?`
36+
* `What are the main points of contention in this issue?`
37+
* `Who are the key participants in this discussion?`
38+
39+
### Specific questions
40+
41+
* `What are the proposed solutions for this issue?`
42+
* `What are the potential impacts of this issue?`
43+
* `What are the next steps for this discussion?`
44+
45+
## Further reading
46+
47+
* [AUTOTITLE](/copilot/tutorials/using-copilot-to-explore-a-codebase#further-reading)
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
---
2+
title: Using Copilot to explore pull requests
3+
shortTitle: Explore pull requests
4+
intro: '{% data variables.copilot.copilot_chat %} can help you understand the content, functionality, and status of a pull request.'
5+
topics:
6+
- Copilot
7+
versions:
8+
feature: copilot
9+
---
10+
11+
## Introduction
12+
13+
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.
14+
15+
## Get a summary of a pull request
16+
17+
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.
18+
19+
1. On {% data variables.product.github %}, navigate to a pull request in a repository.
20+
{% data reusables.copilot.open-chat-panel %}
21+
{% data reusables.copilot.chat-previous-conversation %}
22+
1. At the bottom of the {% data variables.copilot.copilot_chat_short %} panel, in the prompt box, type a question and press <kbd>Enter</kbd>.
23+
24+
### Example prompts
25+
26+
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.
27+
28+
* `Summarize this pull request`
29+
* `What is the current status of this pull request?`
30+
* `What are the main changes in this pull request?`
31+
32+
## Ask about changes to a specific file in a pull request
33+
34+
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.
35+
36+
1. On {% data variables.product.github %}, navigate to a pull request in a repository.
37+
1. Click the **Files changed** tab.
38+
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**.
39+
1. Type a question in the prompt box at the bottom of the chat panel and press <kbd>Enter</kbd>.
40+
41+
### Example prompts
42+
43+
* `What are the changes in this file?`
44+
* `What is the status of this file in the pull request?`
45+
46+
## Ask about specific lines within a file in a pull request
47+
48+
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.
49+
50+
1. On {% data variables.product.github %}, navigate to a pull request in a repository.
51+
1. Click the **Files changed** tab.
52+
1. Click the line number for the first line you want to select, then hold down <kbd>Shift</kbd> and click the line number for the last line you want to select.
53+
1. Ask {% data variables.product.prodname_copilot_short %} a question, or choose from a list of predefined questions.
54+
* _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.
55+
This displays the {% data variables.copilot.copilot_chat %} panel with the selected lines indicated as the context of your question.
56+
57+
### Example prompts
58+
59+
* `Explain the selected lines of code`
60+
* `What do these lines of code do?`
61+
62+
## Ask why a workflow has failed
63+
64+
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.
65+
66+
1. On {% data variables.product.github %}, navigate to a pull request in a repository.
67+
1. Scroll to the bottom of the page, then, next to one of the failing checks, click **Details**.
68+
{% data reusables.copilot.open-chat-panel %}
69+
{% data reusables.copilot.chat-previous-conversation %}
70+
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 <kbd>Enter</kbd>.
71+
72+
{% 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.
73+
74+
1. If {% data variables.product.prodname_copilot_short %} has provided steps to fix the issue, you can follow the steps to resolve the problem.
75+
76+
### Example prompts
77+
78+
* `Why has this workflow failed?`
79+
* `What can I do to fix this issue?`
80+
81+
## Further reading
82+
83+
* [AUTOTITLE](//copilot/tutorials/using-copilot-to-explore-a-codebase)

src/tools/lib/all-tools.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ export const allTools: ToolsMapping = {
1818
curl: 'curl',
1919
desktop: 'Desktop',
2020
eclipse: 'Eclipse',
21+
github_mobile: 'GitHub Mobile',
22+
ides: 'IDEs',
2123
importer_cli: 'GitHub Enterprise Importer CLI',
2224
javascript: 'JavaScript',
2325
jetbrains: 'JetBrains IDEs',

0 commit comments

Comments
 (0)
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