Skip to content

Commit 756f0da

Browse files
timrogersCopilotnhu-doam-stead
authored
Document Copilot coding agent integration's into VS Code with the GitHub Pull Requests extension (#56590)
Co-authored-by: Copilot <[email protected]> Co-authored-by: Nhu Do <[email protected]> Co-authored-by: Anne-Marie <[email protected]>
1 parent 2225c5b commit 756f0da

File tree

3 files changed

+68
-23
lines changed

3 files changed

+68
-23
lines changed

content/copilot/concepts/about-copilot-coding-agent.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ With {% data variables.copilot.copilot_coding_agent %}, {% data variables.produc
3030
* Update documentation
3131
* Address technical debt
3232

33-
To delegate development tasks to {% data variables.product.prodname_copilot_short %}, you can:
33+
To delegate tasks to {% data variables.product.prodname_copilot_short %}, you can:
3434

3535
* Assign an issue to {% data variables.product.prodname_copilot_short %}. See [AUTOTITLE](/copilot/using-github-copilot/coding-agent/using-copilot-to-work-on-an-issue).
36-
* Use {% data variables.copilot.copilot_chat %} to ask {% data variables.product.prodname_copilot_short %} to create a pull request. See [AUTOTITLE](/copilot/using-github-copilot/coding-agent/asking-copilot-to-create-a-pull-request).
36+
* Ask {% data variables.product.prodname_copilot_short %} to create a pull request from the Agents page on {% data variables.product.github %}, {% data variables.copilot.copilot_chat %} or your favorite IDE or agentic coding tool with MCP support. See [AUTOTITLE](/copilot/using-github-copilot/coding-agent/asking-copilot-to-create-a-pull-request).
3737

3838
{% data variables.product.prodname_copilot_short %} will evaluate the task it has been assigned based on the prompt you give it—whether that's from the issue description or a chat message. Then {% data variables.product.prodname_copilot_short %} will make the required changes and open a pull request. When {% data variables.product.prodname_copilot_short %} finishes, it will request a review from you, and you can leave pull request comments to ask {% data variables.product.prodname_copilot_short %} to iterate.
3939

content/copilot/how-tos/agents/copilot-coding-agent/asking-copilot-to-create-a-pull-request.md

Lines changed: 47 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Asking Copilot to create a pull request
3-
shortTitle: Create a PR from chat
4-
intro: 'You can ask {% data variables.product.prodname_copilot_short %} to create a pull request from the Agents page or from {% data variables.copilot.copilot_chat_short %}.'
3+
shortTitle: Create a PR
4+
intro: 'You can ask {% data variables.product.prodname_copilot_short %} to create a pull request from the Agents page, {% data variables.copilot.copilot_chat_short %}, or agentic coding tools and IDEs with Model Context Protocol (MCP) support.'
55
product: '{% data reusables.gated-features.copilot-coding-agent %}<br><a href="https://github.com/features/copilot/plans?ref_cta=Copilot+plans+signup&ref_loc=asking+copilot+to+create+a+pull+request&ref_page=docs" target="_blank" class="btn btn-primary mt-3 mr-3 no-underline"><span>Sign up for {% data variables.product.prodname_copilot_short %}</span> {% octicon "link-external" height:16 %}</a>'
66
versions:
77
feature: copilot
@@ -20,7 +20,11 @@ redirect_from:
2020
2121
## Introduction
2222

23-
You can ask {% data variables.product.prodname_copilot_short %} to work on a task from the Agents page on {% data variables.product.github %}, or from {% data variables.copilot.copilot_chat_short %} in {% data variables.product.prodname_vscode %}, {% data variables.product.prodname_vs %}, JetBrains IDEs and {% data variables.product.prodname_dotcom_the_website %}.
23+
You can ask {% data variables.product.prodname_copilot_short %} to work on a task from:
24+
25+
* The Agents page on {% data variables.product.github %}
26+
* {% data variables.copilot.copilot_chat_short %} in {% data variables.product.prodname_vscode %}, {% data variables.product.prodname_vs %}, JetBrains IDEs and {% data variables.product.prodname_dotcom_the_website %}
27+
* Your preferred IDE or agentic coding tool with Model Context Protocol (MCP) support
2428

2529
{% data variables.product.prodname_copilot_short %} will start working on the task, raise a pull request, then request a review from you when it's finished working. For more information, see [AUTOTITLE](/copilot/using-github-copilot/coding-agent/about-assigning-tasks-to-copilot).
2630

@@ -41,18 +45,31 @@ You can ask {% data variables.product.prodname_copilot_short %} to work on a tas
4145

4246
{% data variables.product.prodname_copilot_short %} will start a new session, which will appear in the list below the prompt box. {% data variables.product.prodname_copilot_short %} will work on the task and push changes to its pull request, then add you as a reviewer when it has finished, triggering a notification.
4347

44-
## Asking {% data variables.product.prodname_copilot_short %} to create a pull request from {% data variables.copilot.copilot_chat_short %}
48+
## Asking {% data variables.product.prodname_copilot_short %} to create a pull request from {% data variables.copilot.copilot_chat_short %} in {% data variables.product.prodname_vscode %}
4549

46-
> [!NOTE]
47-
> * You can ask {% data variables.product.prodname_copilot_short %} to create a pull request from {% data variables.copilot.copilot_chat_short %} in {% data variables.product.prodname_vscode %}, {% data variables.product.prodname_vs %}, JetBrains IDEs, and on {% data variables.product.prodname_dotcom_the_website %}.
50+
1. Install the [GitHub Pull Requests extension](https://marketplace.visualstudio.com/items?itemName=GitHub.vscode-pull-request-github) for {% data variables.product.prodname_vscode %}.
51+
1. Open {% data variables.copilot.copilot_chat %} in {% data variables.product.prodname_vscode %}.
52+
1. Type a prompt explaining what you want {% data variables.product.prodname_copilot_short %} to do, and add `#copilotCodingAgent` to the prompt.
4853

49-
1. Open {% data variables.copilot.copilot_chat %}, in your IDE or on {% data variables.product.prodname_dotcom_the_website %}.
50-
1. Type a prompt asking {% data variables.product.prodname_copilot_short %} to create a pull request, and giving details of what you want {% data variables.product.prodname_copilot_short %} to change.
54+
For example, `Put backticks around file names and variables in output #copilotCodingAgent`
5155

52-
For example, `@github Create a PR to put backticks around file names and variables in output.`
56+
> [!TIP]
57+
> * To help {% data variables.product.prodname_copilot_short %}, you can select the relevant line(s) of code before submitting your prompt.
58+
59+
1. Submit your prompt.
5360

54-
> [!IMPORTANT]
55-
> {% data reusables.copilot.coding-agent.use-chat-participant-in-vsc %}
61+
{% data variables.product.prodname_copilot_short %} will typically do some research and context-gathering in {% data variables.product.prodname_vscode %}, and then will ask you to confirm that you want to use the coding agent to create a pull request.
62+
63+
1. Click **Continue**.
64+
65+
{% data variables.product.prodname_copilot_short %} will push up any local changes, start a new session and respond with a link to the pull request it creates. It will work on the task and push changes to the pull request, and then add you as a reviewer when it has finished, triggering a notification.
66+
67+
## Asking {% data variables.product.prodname_copilot_short %} to create a pull request from {% data variables.copilot.copilot_chat_short %} in other IDEs
68+
69+
1. Open {% data variables.copilot.copilot_chat %} in {% data variables.product.prodname_vs %} or JetBrains IDEs.
70+
1. Type a prompt, starting with `@github`, asking {% data variables.product.prodname_copilot_short %} to create a pull request, and giving details of what you want {% data variables.product.prodname_copilot_short %} to change.
71+
72+
For example, `@github Create a PR to put backticks around file names and variables in output.`
5673

5774
> [!TIP]
5875
> * To help {% data variables.product.prodname_copilot_short %}, you can select the relevant line(s) of code before submitting your prompt.
@@ -66,6 +83,24 @@ You can ask {% data variables.product.prodname_copilot_short %} to work on a tas
6683

6784
{% data variables.product.prodname_copilot_short %} will start a new session and respond with a link to the pull request it creates. It will work on the task and push changes to the pull request, and then add you as a reviewer when it has finished, triggering a notification.
6885

86+
## Asking {% data variables.product.prodname_copilot_short %} to create a pull request from {% data variables.copilot.copilot_chat_short %} in {% data variables.product.prodname_dotcom_the_website %}
87+
88+
1. Open {% data variables.copilot.copilot_chat %} on {% data variables.product.prodname_dotcom_the_website %}.
89+
1. Type a prompt asking {% data variables.product.prodname_copilot_short %} to create a pull request, and giving details of what you want {% data variables.product.prodname_copilot_short %} to change.
90+
91+
For example, `Create a PR in monalisa/bookstore to put backticks around file names and variables in output.`
92+
93+
> [!TIP]
94+
> * You can ask {% data variables.product.prodname_copilot_short %} to open a pull request using a specific branch as the base branch by including it in your prompt.
95+
96+
1. Submit your prompt.
97+
98+
{% data variables.product.prodname_copilot_short %} asks you to confirm that you want to use the coding agent to create a pull request.
99+
100+
1. Click **Allow**.
101+
102+
{% data variables.product.prodname_copilot_short %} will start a new session and respond with a link to the pull request it creates. It will work on the task and push changes to the pull request, and then add you as a reviewer when it has finished, triggering a notification.
103+
69104
## Asking {% data variables.product.prodname_copilot_short %} to create a pull request from the {% data variables.product.github %} MCP server
70105

71106
As an alternative to using {% data variables.copilot.copilot_chat_short %}, you can use the remote {% data variables.product.github %} MCP server to trigger {% data variables.copilot.copilot_coding_agent %} from any MCP host.
@@ -92,11 +127,7 @@ As an alternative to using {% data variables.copilot.copilot_chat_short %}, you
92127

93128
## Monitoring progress
94129

95-
You can view your current and past {% data variables.product.prodname_copilot_short %} sessions from the [Agents page](https://github.com/copilot/agents). See [AUTOTITLE](/copilot/using-github-copilot/coding-agent/using-the-copilot-coding-agent-logs).
96-
97-
You can see what {% data variables.product.prodname_copilot_short %} is doing while it is working on a task by viewing the session logs. You can access the session logs by clicking the **View session** button in the timeline of {% data variables.product.prodname_copilot_short %}'s pull request.
98-
99-
From the session logs page, you can also stop {% data variables.product.prodname_copilot_short %} from working on a task by clicking **Stop session**.
130+
You can view your current and past {% data variables.product.prodname_copilot_short %} sessions from the [Agents page](https://github.com/copilot/agents) and {% data variables.product.prodname_vscode %}. See [AUTOTITLE](/copilot/how-tos/agents/copilot-coding-agent/tracking-copilots-sessions).
100131

101132
## Further reading
102133

content/copilot/how-tos/agents/copilot-coding-agent/tracking-copilots-sessions.md

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Tracking Copilot's sessions
33
shortTitle: Track Copilot sessions
4-
intro: "You can use the Agents page and session logs to track {% data variables.product.prodname_copilot_short %}'s progress and understand its approach."
4+
intro: "You can use the Agents page, {% data variables.product.prodname_vscode %} and session logs to track {% data variables.product.prodname_copilot_short %}'s progress and understand its approach."
55
product: '{% data reusables.gated-features.copilot-coding-agent %}<br><a href="https://github.com/features/copilot/plans?ref_cta=Copilot+plans+signup&ref_loc=using+the+copilot+coding+agent+logs&ref_page=docs" target="_blank" class="btn btn-primary mt-3 mr-3 no-underline"><span>Sign up for {% data variables.product.prodname_copilot_short %}</span> {% octicon "link-external" height:16 %}</a>'
66
versions:
77
feature: copilot
@@ -25,6 +25,8 @@ After you give {% data variables.product.prodname_copilot_short %} a task, it wo
2525

2626
The [Agents page](https://github.com/copilot/agents) provides an overview of your agent sessions across repositories. From this page, you can kick off new tasks and track {% data variables.product.prodname_copilot_short %}'s progress.
2727

28+
You can also track {% data variables.product.prodname_copilot_short %}'s sessions in a specific repository from {% data variables.product.prodname_vscode %}.
29+
2830
During or after an agent session, you can inspect the session logs to understand {% data variables.product.prodname_copilot_short %}'s approach to your problem.
2931

3032
## Tracking agent sessions from the Agents page
@@ -37,15 +39,27 @@ You can also reach this page by clicking the **{% octicon "copilot" aria-label="
3739

3840
For each session listed below the prompt field, you can see its status at a glance, or click on it to navigate to the linked pull request.
3941

42+
To view the session logs, click through to the pull request in the list, then find the "{% data variables.product.prodname_copilot_short %} started work..." event in the timeline, and then click **View session**.
43+
44+
![Screenshot of a section of a pull request with the 'View session' button highlighted.](/assets/images/help/copilot/coding-agent/log-view-session.png)
45+
4046
You can also start new agent sessions from this page. See [AUTOTITLE](/copilot/how-tos/agents/copilot-coding-agent/asking-copilot-to-create-a-pull-request).
4147

42-
## Using the session logs to understand {% data variables.product.prodname_copilot_short %}'s approach
48+
## Tracking sessions from {% data variables.product.prodname_vscode %}
4349

44-
You can dive into {% data variables.product.prodname_copilot_short %}'s session logs to understand how it approached your task.
50+
You can see a list of your running and past agent sessions for a specific repository in {% data variables.product.prodname_vscode %} with the [GitHub Pull Requests extension](https://marketplace.visualstudio.com/items?itemName=GitHub.vscode-pull-request-github).
4551

46-
To view the session logs, click **View session** in the pull request timeline.
52+
Once you've installed the extension, you can see {% data variables.product.prodname_copilot_short %}'s sessions by clicking the **{% data variables.product.github %}** button in the sidebar.
4753

48-
![Screenshot of a section of a pull request with the 'View session' button highlighted.](/assets/images/help/copilot/coding-agent/log-view-session.png)
54+
For each session listed, you can see its status at a glance, or click on it to navigate to the pull request within {% data variables.product.prodname_vscode %}.
55+
56+
To view the session logs, click on the pull request in the list, then click **View Session**.
57+
58+
You can also start new agent sessions from {% data variables.product.prodname_vscode %}. See [AUTOTITLE](/copilot/how-tos/agents/copilot-coding-agent/asking-copilot-to-create-a-pull-request#asking-copilot-to-create-a-pull-request-from-copilot-chat-in-visual-studio-code).
59+
60+
## Using the session logs to understand {% data variables.product.prodname_copilot_short %}'s approach
61+
62+
You can dive into {% data variables.product.prodname_copilot_short %}'s session logs in {% data variables.product.github %} or {% data variables.product.prodname_vscode %} to understand how it approached your task.
4963

5064
In the session logs, you can see {% data variables.product.prodname_copilot_short %}'s internal monologue and the tools it used to understand your repository, make changes and validate its work.
5165

0 commit comments

Comments
 (0)