You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/copilot/how-tos/copilot-on-github/chat-with-copilot/get-started-with-chat.md
+11-1Lines changed: 11 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,9 +23,11 @@ category:
23
23
24
24
## Repository questions
25
25
26
-
Navigate to a repository to ask about its code, structure, or history.
26
+
Navigate to a repository to ask about its purpose, structure, code, or history. {% data variables.copilot.copilot_chat_short %} grounds its answers in the actual files and symbols in the repository, so you can get a high-level overview and then ask follow-up questions within the same context.
27
27
28
28
* {% prompt %}What is the main purpose of this repo?{% endprompt %}
29
+
* {% prompt %}Give me an overview of how this project is structured.{% endprompt %}
30
+
* {% prompt %}How do I set up and run this project locally?{% endprompt %}
29
31
* {% prompt %}Where is rate limiting implemented in our API?{% endprompt %}
30
32
* {% prompt %}What was the last merged PR by USERNAME{% endprompt %}
31
33
@@ -47,6 +49,14 @@ Navigate to a pull request to ask about changes, reviews, or failing workflows.
47
49
* {% prompt %}What did {% data variables.product.prodname_copilot_short %} change in this PR and why?{% endprompt %}
48
50
* {% prompt %}What did {% data variables.product.prodname_copilot_short %} validate before opening this PR?{% endprompt %}
49
51
52
+
## Debugging questions
53
+
54
+
Navigate to a failed workflow run, a pull request with a failing check, or paste a stack trace to get help diagnosing and fixing the problem.
55
+
56
+
* {% prompt %}Why did this workflow run fail?{% endprompt %}
57
+
* {% prompt %}Explain this stack trace and suggest a fix.{% endprompt %}
58
+
* {% prompt %}Which change in this PR most likely caused the failing test?{% endprompt %}
59
+
50
60
## Security alert questions
51
61
52
62
Navigate to a {% data variables.product.prodname_code_scanning %}, {% data variables.product.prodname_secret_scanning %}, or {% data variables.product.prodname_dependabot %} alert to ask about it.
@@ -21,15 +21,28 @@ If you've been assigned to work on a project that you're not familiar with—or
21
21
22
22
Throughout this guide, we'll work with {% data variables.copilot.copilot_chat_short %} on {% data variables.product.prodname_dotcom_the_website %}, which you can find at [github.com/copilot](https://github.com/copilot?ref_product=copilot&ref_type=engagement&ref_style=text).
23
23
24
-
## Attaching a codebase
24
+
## Providing repository context
25
25
26
-
Before {% data variables.copilot.copilot_chat_short %} can help you, you need to attach the codebase you want to explore.
26
+
You can ask {% data variables.copilot.copilot_chat_short %} about a codebase in either of these ways.
27
+
28
+
### Attaching a repository in chat
29
+
30
+
Attaching a repository gives {% data variables.copilot.copilot_chat_short %} access to the code in the repository, and is best when you want to compare or switch between repositories during a conversation.
27
31
28
32
1. On {% data variables.product.github %}, navigate to [github.com/copilot](https://github.com/copilot?ref_product=copilot&ref_type=engagement&ref_style=text).
29
33
1. In the text box, click **{% octicon "plus" aria-label="Add attachments" %} Add repositories, files, and spaces**, then click **Repositories**.
30
34
1. Search for and select the repository you want to explore.
31
35
32
-
{% data variables.copilot.copilot_chat_short %} now has access to the code in that repository, and you can start asking questions about it.
36
+
### Asking from the repository page
37
+
38
+
> [!NOTE]
39
+
> This feature is currently in {% data variables.release-phases.public_preview %} and subject to change.
40
+
41
+
You can ask {% data variables.copilot.copilot_chat_short %} about a repository directly from its page on {% data variables.product.github %}, without attaching it first. This is a quick way to get oriented in a project you haven't worked on before.
42
+
43
+
1. On {% data variables.product.github %}, navigate to the repository you want to explore.
44
+
1. Open {% data variables.copilot.copilot_chat_short %} from the repository page and ask a question. {% data variables.product.prodname_copilot_short %} uses the repository as context and grounds its answers in the repository's actual files and symbols.
45
+
1. Ask a follow-up question to go deeper, using the same shared context.
33
46
34
47
## Example prompts
35
48
@@ -41,6 +54,10 @@ The following prompts are examples of the kind of questions you can ask {% data
41
54
42
55
*`Based on the code in this repository, give me an overview of the architecture of the codebase. Provide evidence.`
43
56
57
+
*`Give me an overview of this repository: its purpose, structure, key components, and how to run it.`
58
+
59
+
*`What are the main entry points and how do the key components fit together?`
60
+
44
61
*`Which languages are used in this repo? Show the percentages for each language.`
45
62
46
63
*`What are the core algorithms implemented in this repo?`
@@ -104,7 +121,7 @@ Use {% data variables.product.prodname_copilot_short %} to help you understand t
104
121
105
122
1. On {% data variables.product.github %}, navigate to a repository and open a file.
106
123
1. At the top of the file, click the {% data variables.product.prodname_copilot_short %} icon (**{% octicon "copilot" aria-label="Copilot icon" %}**) to open {% data variables.copilot.copilot_chat_short %}.
107
-
124
+
108
125
{% data variables.product.prodname_copilot_short %} will display the file contents in a split screen as context for your question.
109
126
110
127
1. If you want to ask about a specific symbol, highlight the symbol in the file.
Copy file name to clipboardExpand all lines: content/copilot/tutorials/explore-pull-requests.md
+15Lines changed: 15 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,6 +34,18 @@ The following prompts are examples of the kind of questions you can ask {% data
34
34
*`What is the current status of this pull request?`
35
35
*`What are the main changes in this pull request?`
36
36
37
+
## Ask {% data variables.product.prodname_copilot_short %} to explain changes in a pull request
38
+
39
+
You can ask {% data variables.product.prodname_copilot_short %} to examine the changes in a pull request and provide insights. {% data variables.product.prodname_copilot_short %} can return a story of the commits made, a list of unresolved feedback, or assistance with performing a structured review with insights and actionable suggestions, using context from the pull request's file changes, commits, comments, and existing reviews.
40
+
41
+
1. On {% data variables.product.github %}, navigate to a pull request in a repository.
42
+
1. Open {% data variables.copilot.copilot_chat_short %}, type your question, and press <kbd>Enter</kbd>.
43
+
44
+
### Example prompts
45
+
*`Help me understand the commits made in this pull request.`
46
+
*`Is there any unresolved feedback in this pull request?`
47
+
*`Help review this pull request.`
48
+
37
49
## Ask about changes to a specific file in a pull request
38
50
39
51
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.
@@ -43,6 +55,8 @@ You can ask {% data variables.product.prodname_copilot_short %} to explain the c
43
55
1. To the right side of a line in the file you want to ask about, click the {% octicon "triangle-down" aria-hidden="true" aria-label="Show file actions" %} icon, then click **{% octicon "copilot" aria-hidden="true" aria-label="copilot" %} {% data variables.product.prodname_copilot_short %}**, and select **Ask about this diff**.
44
56
45
57
This opens {% data variables.copilot.copilot_chat_short %} with the file changes indicated as the context of your question.
58
+
59
+
Your conversation appears alongside the diff, so you can review the code and chat at the same time.
46
60
1. Type a question in the prompt box at the bottom of the chat panel and press <kbd>Enter</kbd>.
47
61
48
62
### Example prompts
@@ -96,3 +110,4 @@ When you view a pull request created by {% data variables.copilot.copilot_cloud_
0 commit comments