diff --git a/content/copilot/how-tos/copilot-on-github/index.md b/content/copilot/how-tos/copilot-on-github/index.md index 75b88bbbd50f..3079db935f99 100644 --- a/content/copilot/how-tos/copilot-on-github/index.md +++ b/content/copilot/how-tos/copilot-on-github/index.md @@ -8,5 +8,6 @@ children: - /set-up-copilot - /chat-with-copilot - /copilot-for-github-tasks + - /use-copilot-agents contentType: how-tos --- diff --git a/content/copilot/how-tos/copilot-on-github/use-copilot-agents/copilot-code-review.md b/content/copilot/how-tos/copilot-on-github/use-copilot-agents/copilot-code-review.md new file mode 100644 index 000000000000..7365b897ee03 --- /dev/null +++ b/content/copilot/how-tos/copilot-on-github/use-copilot-agents/copilot-code-review.md @@ -0,0 +1,70 @@ +--- +title: Using {% data variables.copilot.copilot_code-review %} on {% data variables.product.github %} +shortTitle: '{% data variables.copilot.copilot_code-review_short %}' +allowTitleToDifferFromFilename: true +intro: '{% data variables.product.prodname_copilot %} reviews your pull requests and suggests ready-to-apply changes, so you get fast, actionable feedback on every commit.' +versions: + feature: copilot +contentType: how-tos +category: + - Author and optimize with Copilot +--- + +{% data variables.copilot.copilot_code-review_short %} is also available for organization members without a {% data variables.product.prodname_copilot_short %} license, when enabled by an enterprise administrator or organization owner. See [{% data variables.copilot.copilot_code-review_short %} for organization members without a {% data variables.product.prodname_copilot_short %} license](/copilot/concepts/agents/code-review#copilot-code-review-for-organization-members-without-a-copilot-license). + +## Request a review from {% data variables.product.prodname_copilot_short %} + +1. On {% data variables.product.prodname_dotcom_the_website %}, create or open a pull request. +1. Open the **Reviewers** menu, then select **{% data variables.product.prodname_copilot_short %}**. + + ![Screenshot of selecting '{% data variables.product.prodname_copilot_short %}' from the 'Reviewers' menu.](/assets/images/help/copilot/code-review/request-review@2x.png) + +1. Wait for {% data variables.product.prodname_copilot_short %} to finish reviewing. This usually takes less than 30 seconds. + +1. Read through {% data variables.product.prodname_copilot_short %}'s comments on the pull request. + + ![Screenshot of a code review left by {% data variables.product.prodname_copilot_short %}.](/assets/images/help/copilot/code-review/review-comment@2x.png) + +{% data variables.product.prodname_copilot_short %} always leaves a "Comment" review, not an "Approve" or "Request changes" review. Its reviews do not count toward required approvals and will not block merging. + +{% data variables.product.prodname_copilot_short %}'s review comments work like comments from human reviewers. Add reactions, reply, resolve, or hide them. Any replies you add are visible to other people but not to {% data variables.product.prodname_copilot_short %}. + +## Work with suggested changes + +{% data variables.product.prodname_copilot_short %}'s feedback often includes suggested changes you can apply in a few clicks. Accept a single suggestion or group multiple suggestions into one commit. For more information, see [AUTOTITLE](/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/incorporating-feedback-in-your-pull-request). + +To have {% data variables.copilot.copilot_cloud_agent %} implement suggested changes directly: + +1. Opt into the {% data variables.release-phases.public_preview %} for {% data variables.copilot.copilot_code-review-tools_short %} and enable {% data variables.copilot.copilot_cloud_agent %}. +1. On a review comment from {% data variables.copilot.copilot_code-review %}, click **Implement suggestion**. This creates a draft comment where you instruct {% data variables.product.prodname_copilot_short %} to address specific feedback. {% data variables.product.prodname_copilot_short %} then creates a new pull request against your branch with the suggestions applied. + +## Provide feedback on reviews + +Rate {% data variables.product.prodname_copilot_short %}'s comments to help improve future suggestions. + +1. On a review comment from {% data variables.product.prodname_copilot_short %}, click the thumbs up (:+1:) or thumbs down (:-1:) button. + + ![Screenshot showing a {% data variables.copilot.copilot_code-review_short %} comment with the thumbs up and thumbs down buttons.](/assets/images/help/copilot/code-review/feedback-controls@2x.png) + +1. If you click thumbs down, optionally pick a reason and leave a comment, then click **Submit feedback**. + + ![Screenshot of the form for providing additional information when you give negative feedback on a comment from {% data variables.product.prodname_copilot_short %}.](/assets/images/help/copilot/code-review/feedback-modal@2x.png) + +## Request a re-review + +{% data variables.product.prodname_copilot_short %} does not automatically re-review when you push new changes. To request a re-review, click the {% octicon "sync" aria-label="Re-request review" %} button next to {% data variables.product.prodname_copilot_short %}'s name in the **Reviewers** menu. + +When re-reviewing, {% data variables.product.prodname_copilot_short %} may repeat previous comments, even if you resolved or downvoted them. + +## Enable automatic reviews + +By default, you request reviews from {% data variables.product.prodname_copilot_short %} manually on each pull request. To enable automatic reviews for all pull requests, see [AUTOTITLE](/copilot/how-tos/agents/copilot-code-review/automatic-code-review). + +## Customize reviews with custom instructions + +{% data reusables.copilot.code-review.custom-instructions-information %} + +## Further reading + +* [AUTOTITLE](/copilot/concepts/code-review) +* [AUTOTITLE](/copilot/how-tos/copilot-on-github/use-copilot-agents/review-copilot-output) diff --git a/content/copilot/how-tos/copilot-on-github/use-copilot-agents/index.md b/content/copilot/how-tos/copilot-on-github/use-copilot-agents/index.md new file mode 100644 index 000000000000..af5e25070802 --- /dev/null +++ b/content/copilot/how-tos/copilot-on-github/use-copilot-agents/index.md @@ -0,0 +1,15 @@ +--- +title: 'Use {% data variables.product.prodname_copilot_short %} agents' +shortTitle: 'Use {% data variables.product.prodname_copilot_short %} agents' +intro: 'Delegate tasks to {% data variables.product.prodname_copilot %} agents on {% data variables.product.github %}, track their progress, and review the results.' +versions: + feature: copilot +children: + - /overview + - /kick-off-a-task + - /research-plan-iterate + - /manage-and-track-agents + - /copilot-code-review + - /review-copilot-output +contentType: how-tos +--- diff --git a/content/copilot/how-tos/copilot-on-github/use-copilot-agents/kick-off-a-task.md b/content/copilot/how-tos/copilot-on-github/use-copilot-agents/kick-off-a-task.md new file mode 100644 index 000000000000..da32e6c576ae --- /dev/null +++ b/content/copilot/how-tos/copilot-on-github/use-copilot-agents/kick-off-a-task.md @@ -0,0 +1,53 @@ +--- +title: Kick off a task with {% data variables.product.prodname_copilot_short %} agents on {% data variables.product.github %} +shortTitle: Kick off a task +intro: 'Decide whether {% data variables.copilot.copilot_cloud_agent %} creates a pull request immediately or works on a branch you review and iterate on first.' +product: '{% data reusables.gated-features.copilot-cloud-agent %}
Sign up for {% data variables.product.prodname_copilot_short %} {% octicon "link-external" height:16 %}' +versions: + feature: copilot +contentType: how-tos +category: + - Author and optimize with Copilot +--- + +You can start a {% data variables.copilot.copilot_cloud_agent %} task in several ways. **Assigning an issue** always creates a pull request. **Starting with a prompt** works on a branch by default, giving you a chance to review, steer, and iterate before you open a pull request. **Seeding a repository** creates a draft pull request with scaffolded code. + +## Assign an issue to {% data variables.product.prodname_copilot_short %} + +Assigning an issue always creates a pull request. {% data variables.product.prodname_copilot_short %} works on the task and requests your review when it finishes. + +1. In the right sidebar of the issue, click **Assignees**. +1. Click **Copilot** from the assignees list. +1. Optionally, add context in the **Optional prompt** field—for example, coding patterns, files to modify, or testing requirements. +1. Optionally, change the target repository or base branch using the dropdown menus. + +{% data reusables.copilot.optional-select-custom-agent-dotcom %} +{% data reusables.copilot.optional-select-copilot-cloud-agent-model %} + +{% data variables.product.prodname_copilot_short %} receives the issue title, description, and existing comments at assignment time. It does not see comments added after assignment, so post follow-up information on the pull request instead. + +## Start a task with a prompt + +{% data variables.copilot.copilot_cloud_agent_short_cap_c %} works on a branch by default. You can review the diff, iterate with follow-up prompts, and create a pull request when you're ready. + +{% data reusables.copilot.open-agents-panel-or-page %} +{% data reusables.copilot.cloud-agent.new-agent-task-form-instructions %} + +The same prompt box is available on your [dashboard](https://github.com) and in {% data variables.copilot.copilot_chat_short %} (type `/task`). + +For the full workflow of researching, planning, and iterating before creating a pull request, see [AUTOTITLE](/copilot/how-tos/copilot-on-github/use-copilot-agents/research-plan-iterate). + +## Seed a new repository + +When you create a new repository, you can have {% data variables.product.prodname_copilot_short %} generate starter code. + +{% data reusables.repositories.create_new %} +1. In the **Prompt** field, describe what you want {% data variables.product.prodname_copilot_short %} to build — for example, `Create a Rust CLI for converting CSV spreadsheets to Markdown`. +{% data reusables.repositories.create-repo %} + +{% data variables.product.prodname_copilot_short %} opens a draft pull request with the scaffolded code. + +## Further reading + +* [AUTOTITLE](/copilot/tutorials/cloud-agent/get-the-best-results) +* [AUTOTITLE](/copilot/how-tos/copilot-on-github/use-copilot-agents/manage-and-track-agents) diff --git a/content/copilot/how-tos/copilot-on-github/use-copilot-agents/manage-and-track-agents.md b/content/copilot/how-tos/copilot-on-github/use-copilot-agents/manage-and-track-agents.md new file mode 100644 index 000000000000..611e95ffbef4 --- /dev/null +++ b/content/copilot/how-tos/copilot-on-github/use-copilot-agents/manage-and-track-agents.md @@ -0,0 +1,60 @@ +--- +title: Manage and track {% data variables.copilot.copilot_cloud_agent %} sessions +shortTitle: Manage and track agents +intro: 'Monitor your agent''s progress in real time, steer it with follow-up prompts, and stop or archive sessions.' +product: '{% data reusables.gated-features.copilot-cloud-agent %}
Sign up for {% data variables.product.prodname_copilot_short %} {% octicon "link-external" height:16 %}' +versions: + feature: copilot +contentType: how-tos +category: + - Author and optimize with Copilot +redirect_from: + - /copilot/how-tos/use-copilot-agents/manage-agents +--- + +Use the agents panel on {% data variables.product.github %} to start, monitor, and manage agent sessions across your repositories. + +## Monitor agent activity + +Track sessions from the agents panel (available from any page on {% data variables.product.github %}) or from the [agents page](https://github.com/copilot/agents?ref_product=copilot&ref_type=engagement&ref_style=text). Sessions that you started, or that another user prompted {% data variables.product.prodname_copilot_short %} to work on, appear in your sessions list. + +Click a session to open the session log and overview, where you can monitor the agent's progress, token usage, and session length. + +## Review session logs + +Session logs show {% data variables.product.prodname_copilot_short %}'s internal reasoning and the tools it used to understand your repository, make changes, and validate its work. {% data variables.product.prodname_copilot_short %} has its own ephemeral development environment, so it can run automated tests and linters to validate changes before pushing. + +## Trace commits to session logs + +Commits from {% data variables.copilot.copilot_cloud_agent %} are authored by {% data variables.product.prodname_copilot_short %}, with the person who started the task listed as co-author. Each commit message includes a link to the session logs, so you can trace why a change was made during code review or an audit. Commits are signed and appear as "Verified" on {% data variables.product.github %}. + +## Steer an agent session + +If {% data variables.product.prodname_copilot_short %} is heading in the wrong direction, or you realize your original prompt needs adjusting, you can redirect it without stopping the session. + +1. Open the [agents page](https://github.com/copilot/agents?ref_product=copilot&ref_type=engagement&ref_style=text) and select the session. +1. In the prompt box below the session log, type your follow-up. For example: + + ```text + Use our existing ErrorHandler utility class instead of writing custom try-catch blocks for each endpoint. + ``` + +1. Press Enter. {% data variables.product.prodname_copilot_short %} implements your input after it finishes its current tool call. + +Each steering message uses **one premium request**. Steering is not available for third-party coding agents. + +## Stop a session + +If the task no longer needs to be done, or you want to start over with a new prompt, click **Stop session** in the session log viewer. Stopping a session ends the {% data variables.product.prodname_actions %} run and preserves any commits already pushed. + +## Archive sessions + +Archive stopped sessions to remove them from your sessions list. + +1. Open the stopped session. +1. Click **{% octicon "kebab-horizontal" aria-label="More actions" %}**, then click **{% octicon "inbox" aria-hidden="true" aria-label="inbox" %} Archive session**. +1. In the dialog, click **Yes, archive**. + +## Further reading + +* [AUTOTITLE](/copilot/tutorials/cloud-agent/get-the-best-results) diff --git a/content/copilot/how-tos/copilot-on-github/use-copilot-agents/overview.md b/content/copilot/how-tos/copilot-on-github/use-copilot-agents/overview.md new file mode 100644 index 000000000000..08ce20ac8723 --- /dev/null +++ b/content/copilot/how-tos/copilot-on-github/use-copilot-agents/overview.md @@ -0,0 +1,74 @@ +--- +title: Get started with {% data variables.product.prodname_copilot_short %} agents on {% data variables.product.github %} +shortTitle: Get started +intro: Try {% data variables.copilot.copilot_cloud_agent %} end-to-end in about ten minutes. +product: '{% data reusables.gated-features.copilot-cloud-agent %}
Sign up for {% data variables.product.prodname_copilot_short %} {% octicon "link-external" height:16 %}' +allowTitleToDifferFromFilename: true +versions: + feature: copilot +contentType: how-tos +--- + +## Prerequisite + +You need a repository where {% data variables.copilot.copilot_cloud_agent %} is enabled. For {% data variables.copilot.copilot_business_short %} and {% data variables.copilot.copilot_enterprise_short %} subscribers, an administrator must enable the agent before you can use it. See [AUTOTITLE](/copilot/concepts/agents/cloud-agent/access-management). + +## Step 1: Assign an issue to {% data variables.product.prodname_copilot_short %} + +Pick a repository where {% data variables.copilot.copilot_cloud_agent %} is enabled and find an open issue—or create a small one, such as "Add a CONTRIBUTING.md file." + +1. In the right sidebar, click **Assignees**, then select **Copilot**. +1. Optionally, add instructions in the **Optional prompt** field. + + For example: `Keep the file short and include a code of conduct section.` +1. Click **Assign**. + +{% data variables.product.prodname_copilot_short %} starts a session and begins working on a pull request. + +## Step 2: Start a research task at the same time + +While {% data variables.product.prodname_copilot_short %} works on the issue, start a second, non-coding task to see two sessions running in parallel. + +1. In the same repository, click the **{% octicon "agent" aria-hidden="true" aria-label="agent" %} Agents** tab. +1. Type a research prompt. + + For example: `Investigate which dependencies in this repo are outdated and summarize what upgrading would involve.` +1. Click **{% octicon "paper-airplane" aria-label="Start task" %}** or press Enter. + +A second session appears in the panel alongside the first. + +## Step 3: Watch both sessions + +Both sessions update in real time. Click either session to view the agent's reasoning, the files it reads, and the changes it makes. + +While a session is running, type in the prompt box below the log to steer the agent. + +For example: `Focus on security-related dependencies first.` + +For more details on monitoring, steering, and stopping sessions, see [AUTOTITLE](/copilot/how-tos/copilot-on-github/use-copilot-agents/manage-and-track-agents). + +## Step 4: Request a {% data variables.copilot.copilot_code-review_short %} on the pull request + +When the coding task finishes, {% data variables.product.prodname_copilot_short %} opens a pull request and adds you as a reviewer. + +1. Open the pull request from the notification or from the session log. +1. In the right sidebar, click **Reviewers**, then select **{% data variables.product.prodname_copilot_short %}**. +1. Wait for {% data variables.copilot.copilot_code-review_short %} to leave comments—usually under 30 seconds. + +Read through the review comments. {% data variables.product.prodname_copilot_short %} may suggest changes you can apply directly with a click. + +For the full set of code-review options, see [AUTOTITLE](/copilot/how-tos/copilot-on-github/use-copilot-agents/copilot-code-review). + +## Step 5: Review the output and iterate + +Now review the code changes yourself, just as you would for any contributor's pull request. + +* **Request changes from {% data variables.product.prodname_copilot_short %}** — mention `@copilot` in a comment describing what to fix. {% data variables.product.prodname_copilot_short %} pushes new commits to the same branch. +* **Make changes yourself** — check out the branch and push your own commits. +* **Approve and merge** — when you're satisfied, merge the pull request. + +For more on reviewing {% data variables.product.prodname_copilot_short %}'s work, see [AUTOTITLE](/copilot/how-tos/copilot-on-github/use-copilot-agents/review-copilot-output). + +## Next steps + +* [AUTOTITLE](/copilot/tutorials/cloud-agent/get-the-best-results) — Write effective prompts and get the most out of agents. diff --git a/content/copilot/how-tos/copilot-on-github/use-copilot-agents/research-plan-iterate.md b/content/copilot/how-tos/copilot-on-github/use-copilot-agents/research-plan-iterate.md new file mode 100644 index 000000000000..90d163bafecd --- /dev/null +++ b/content/copilot/how-tos/copilot-on-github/use-copilot-agents/research-plan-iterate.md @@ -0,0 +1,69 @@ +--- +title: Research, plan, and iterate on code changes with {% data variables.copilot.copilot_cloud_agent %} +shortTitle: Research, plan, iterate +intro: "Perform deep research on a repository, create an implementation plan, and make iterative code changes on a branch, then create a pull request when you're ready." +product: '{% data reusables.gated-features.copilot-cloud-agent %}
Sign up for {% data variables.product.prodname_copilot_short %} {% octicon "link-external" height:16 %}' +versions: + feature: copilot +contentType: how-tos +category: + - Author and optimize with Copilot +redirect_from: + - /copilot/how-tos/use-copilot-agents/coding-agent/research-plan-iterate + - /copilot/how-tos/use-copilot-agents/cloud-agent/research-plan-iterate + - /copilot/how-tos/use-copilot-agents/coding-agent/provide-visual-inputs + - /copilot/how-tos/use-copilot-agents/cloud-agent/provide-visual-inputs +--- + +{% data variables.copilot.copilot_cloud_agent_tmp %} lets you: + +* **Research** a repository by asking {% data variables.product.prodname_copilot_short %} questions. +* **Plan** and refine an approach before {% data variables.product.prodname_copilot_short %} makes changes. +* **Iterate** on code changes, review a diff, and **create a pull request when you're ready**. + +Sessions do not create pull requests automatically. To create one immediately, include that in your prompt—for example, "Create a pull request to ...". + +> [!NOTE] These capabilities are only available with {% data variables.copilot.copilot_cloud_agent %} on {% data variables.product.prodname_dotcom_the_website %}. {% data variables.copilot.copilot_cloud_agent_short_cap_c %} integrations (such as Azure Boards, JIRA, Linear, Slack, or Teams) only support creating a pull request directly. + +## Perform deep research + +Ask {% data variables.copilot.copilot_cloud_agent %} questions about a repository to understand how it works, find where to make a change, or confirm assumptions before planning. + +1. Start a task from the agents tab, panel, dashboard, or {% data variables.copilot.copilot_chat_short %}. See [AUTOTITLE](/copilot/how-tos/copilot-on-github/use-copilot-agents/kick-off-a-task). +1. Ask a question about the repository. + + For example: `Investigate performance issues in this app and suggest improvements.` + + > [!TIP] You can also open {% data variables.copilot.copilot_chat_short %} and attach the relevant repository as context. {% data variables.product.prodname_copilot_short %} prompts you to approve a deep research session. +1. Optionally, send follow-up prompts while {% data variables.product.prodname_copilot_short %} is working to steer the session. +1. Review the response and ask follow-up questions. + +## Create a plan + +Ask {% data variables.copilot.copilot_cloud_agent %} to propose a plan before making changes. + +1. Describe the plan you want. + + For example: `Create a plan to implement the most impactful performance improvements for this app.` +1. Review the plan and iterate with {% data variables.product.prodname_copilot_short %} until it matches your intent. + +## Iterate on code changes + +After research and planning, make changes on a branch, review the diff, and decide whether to iterate more or create a pull request. + +1. Describe the changes you want in your prompt. + + For example, reference the plan from earlier: `Implement the plan we agreed upon.` +1. Wait for {% data variables.product.prodname_copilot_short %} to finish the session. +1. Click **Diff** to review the changes. +1. Optionally, open the branch (`copilot/BRANCH-NAME`) to inspect the changes in context. +1. To request refinements, continue the conversation. For example: `Rename this to match our existing conventions.` +1. When the session is complete and you're satisfied, click **Create pull request**. + +## Provide visual context + +{% data variables.copilot.copilot_cloud_agent_short_cap_c %} processes images—such as screenshots, sketches, or designs—as part of your task description. Drag and drop an image into an issue body or a {% data variables.copilot.copilot_chat_short %} prompt, then describe what {% data variables.product.prodname_copilot_short %} should do with it. + +## Further reading + +* [AUTOTITLE](/copilot/concepts/agents/cloud-agent/about-cloud-agent) diff --git a/content/copilot/how-tos/copilot-on-github/use-copilot-agents/review-copilot-output.md b/content/copilot/how-tos/copilot-on-github/use-copilot-agents/review-copilot-output.md new file mode 100644 index 000000000000..9ad85e76bfd6 --- /dev/null +++ b/content/copilot/how-tos/copilot-on-github/use-copilot-agents/review-copilot-output.md @@ -0,0 +1,67 @@ +--- +title: Review output from {% data variables.product.prodname_copilot_short %} +shortTitle: Review {% data variables.product.prodname_copilot_short %} output +allowTitleToDifferFromFilename: true +intro: '{% data variables.product.prodname_copilot_short %} pull requests deserve the same thorough review as any contribution. Mention `@copilot` to request changes, or push commits directly to the branch.' +product: '{% data reusables.gated-features.copilot-cloud-agent %}
Sign up for {% data variables.product.prodname_copilot_short %} {% octicon "link-external" height:16 %}' +versions: + feature: copilot +redirect_from: + - /copilot/how-tos/use-copilot-agents/coding-agent/review-copilot-prs + - /copilot/how-tos/use-copilot-agents/cloud-agent/review-copilot-prs + - /copilot/using-github-copilot/using-copilot-coding-agent-to-work-on-tasks/reviewing-a-pull-request-created-by-copilot + - /copilot/using-github-copilot/coding-agent/reviewing-a-pull-request-created-by-copilot + - /copilot/how-tos/agents/copilot-coding-agent/reviewing-a-pull-request-created-by-copilot + - /copilot/how-tos/agents/copilot-coding-agent/review-copilot-prs + - /copilot/how-tos/agents/coding-agent/review-copilot-prs + - /copilot/how-tos/copilot-on-github/use-copilot-agents/iterate-with-copilot + - /copilot/how-tos/use-copilot-agents/coding-agent/make-changes-to-an-existing-pr + - /copilot/how-tos/use-copilot-agents/cloud-agent/make-changes-to-an-existing-pr +contentType: how-tos +category: + - Author and optimize with Copilot +--- + +## Review {% data variables.product.prodname_copilot_short %}'s changes + +When {% data variables.product.prodname_copilot_short %} finishes a coding task and requests your review, check the pull request thoroughly before merging. + +> [!IMPORTANT] +> If your repository requires pull request approvals, **your approval of a {% data variables.product.prodname_copilot_short %} pull request won't count** toward the required number. Another reviewer must approve the pull request before it can be merged. + +Mention `@copilot` in a pull request comment to request changes. By default, {% data variables.product.prodname_copilot_short %} pushes commits directly to the pull request branch. To create a separate pull request instead, describe that in your comment. You can also check out the branch and push changes yourself. + +Batch review comments instead of submitting them individually. When submitting a pull request comment (not a review or review comment) through the {% data variables.product.github %} web interface, select a model with the model picker. {% data variables.product.prodname_copilot_short %} uses the model from the original pull request by default. + +{% data reusables.copilot.cloud-agent.write-access-required %} + +When {% data variables.product.prodname_copilot_short %} starts a new session in response to your comment, an eyes emoji (👀) reaction appears on the comment. A "Copilot has started work" event appears in the pull request timeline. + +![Screenshot of a pull request timeline with a review comment with the eyes reaction and a "Copilot started work" timeline event.](/assets/images/help/copilot/cloud-agent/comment-to-agent-on-pr.png) + +{% data variables.product.prodname_copilot_short %} remembers context from previous sessions on the same pull request, so follow-up requests are faster and more reliable. If the pull request was created by a {% data variables.copilot.copilot_custom_agent_short %}, mentioning `@copilot` continues using that same agent. + +## Resolve merge conflicts + +You can ask {% data variables.product.prodname_copilot_short %} to resolve merge conflicts on a pull request in two ways: + +* **Using the "Fix with {% data variables.product.prodname_copilot_short %}" button**: If a pull request has merge conflicts, click the **Fix with {% data variables.product.prodname_copilot_short %}** button that appears in the merge box. +* **Using an @copilot mention**: Mention `@copilot` in a comment on the pull request and ask it to fix the conflicts—for example, "@copilot resolve the merge conflicts on this PR." + +{% data variables.product.prodname_copilot_short %} analyzes the conflicting changes, resolves them, and verifies that the build, tests, and linter still pass. It then requests your review so you can confirm the resolution before merging. + +## Manage {% data variables.product.prodname_actions %} workflow runs + +{% data reusables.copilot.cloud-agent-workflow-run-approval-default %} For more information, see [AUTOTITLE](/copilot/how-tos/use-copilot-agents/cloud-agent/configuring-agent-settings). + +## Give feedback on {% data variables.product.prodname_copilot_short %}'s work + +Use the feedback buttons on {% data variables.product.prodname_copilot_short %}'s pull requests and comments to rate the output. Your feedback helps improve {% data variables.product.prodname_copilot_short %}'s quality. + +1. On a pull request or comment from {% data variables.product.prodname_copilot_short %}, click the thumbs up (:+1:) or thumbs down (:-1:) button. +1. If you click the thumbs down button, optionally select a reason and leave a comment, then click **Submit feedback**. + +## Further reading + +* [AUTOTITLE](/copilot/tutorials/cloud-agent/get-the-best-results) +* [AUTOTITLE](/copilot/how-tos/use-copilot-agents/cloud-agent/troubleshoot-cloud-agent) diff --git a/content/copilot/how-tos/use-copilot-agents/cloud-agent/index.md b/content/copilot/how-tos/use-copilot-agents/cloud-agent/index.md index ac80c665de96..ccc6aeadc5c2 100644 --- a/content/copilot/how-tos/use-copilot-agents/cloud-agent/index.md +++ b/content/copilot/how-tos/use-copilot-agents/cloud-agent/index.md @@ -6,12 +6,8 @@ intro: 'Find out how {% data variables.product.prodname_copilot_short %} can res versions: feature: copilot children: - - /research-plan-iterate - /create-a-pr - - /make-changes-to-an-existing-pr - - /provide-visual-inputs - /track-copilot-sessions - - /review-copilot-prs - /create-custom-agents - /test-custom-agents - /add-skills diff --git a/content/copilot/how-tos/use-copilot-agents/cloud-agent/make-changes-to-an-existing-pr.md b/content/copilot/how-tos/use-copilot-agents/cloud-agent/make-changes-to-an-existing-pr.md deleted file mode 100644 index 327854647368..000000000000 --- a/content/copilot/how-tos/use-copilot-agents/cloud-agent/make-changes-to-an-existing-pr.md +++ /dev/null @@ -1,51 +0,0 @@ ---- -title: Asking GitHub Copilot to make changes to an existing pull request -shortTitle: Update existing PR -allowTitleToDifferFromFilename: true -intro: 'You can ask {% data variables.product.prodname_copilot_short %} to make changes to an existing pull request by mentioning `@copilot`.' -product: '{% data reusables.gated-features.copilot-cloud-agent %}
Sign up for {% data variables.product.prodname_copilot_short %} {% octicon "link-external" height:16 %}' -versions: - feature: copilot -contentType: how-tos -category: - - Author and optimize with Copilot -redirect_from: - - /copilot/how-tos/use-copilot-agents/coding-agent/make-changes-to-an-existing-pr ---- - -> [!NOTE] -> For an overview of {% data variables.copilot.copilot_cloud_agent %}, see [AUTOTITLE](/copilot/concepts/agents/cloud-agent/about-cloud-agent). - -## Introduction - -You can ask {% data variables.product.prodname_copilot_short %} to make changes to an existing pull request by mentioning `@copilot` in a comment. - -By default, {% data variables.product.prodname_copilot_short %} pushes commits directly to the pull request's branch. Once it has finished work on the changes you requested, it requests your review. - -If you prefer {% data variables.product.prodname_copilot_short %} to create a separate pull request instead, you can ask for this using natural language in your comment—for example, "open a PR to fix the tests." - -## Resolving merge conflicts - -You can ask {% data variables.product.prodname_copilot_short %} to resolve merge conflicts on a pull request in two ways: - -* **Using the "Fix with {% data variables.product.prodname_copilot_short %}" button**: If a pull request has merge conflicts, click the **Fix with {% data variables.product.prodname_copilot_short %}** button that appears in the merge box. This button is available if you have access to {% data variables.copilot.copilot_cloud_agent %} and it is enabled for the repository. -* **Using an @copilot mention**: Mention `@copilot` in a comment on the pull request and ask it to fix the conflicts using natural language, such as "@copilot resolve the merge conflicts on this PR." - -{% data variables.product.prodname_copilot_short %} will analyze the conflicting changes, resolve the conflicts, and ensure the build, tests, and linter still pass. Once it has finished, {% data variables.product.prodname_copilot_short %} will request your review so you can verify the conflict resolution before merging. - -## Asking {% data variables.product.prodname_copilot_short %} to make changes - -1. Navigate to the pull request that you want {% data variables.product.prodname_copilot_short %} to make changes to. -1. Write a comment or review mentioning {% data variables.product.prodname_copilot_short %} with `@copilot`. -1. Optionally, when leaving a pull request comment (not a review or review comment) through the {% data variables.product.github %} web interface, select a model using the model picker. -1. Submit your comment or review. - -If you prefer not to use this default behavior, you can ask {% data variables.product.prodname_copilot_short %} to create a new branch and a new pull request targeting your branch instead. Once the agent finishes work, it will request a review from you. - -{% data reusables.copilot.cloud-agent.monitoring-progress-heading %} - -## Further reading - -* [AUTOTITLE](/copilot/concepts/agents/cloud-agent/about-cloud-agent) -* [AUTOTITLE](/copilot/tutorials/cloud-agent/get-the-best-results) -* [AUTOTITLE](/copilot/how-tos/use-copilot-agents/cloud-agent/troubleshoot-cloud-agent#copilot-cant-create-a-pull-request-from-copilot-chat) diff --git a/content/copilot/how-tos/use-copilot-agents/cloud-agent/provide-visual-inputs.md b/content/copilot/how-tos/use-copilot-agents/cloud-agent/provide-visual-inputs.md deleted file mode 100644 index 13dc462bca92..000000000000 --- a/content/copilot/how-tos/use-copilot-agents/cloud-agent/provide-visual-inputs.md +++ /dev/null @@ -1,49 +0,0 @@ ---- -title: Provide visual inputs to GitHub Copilot -shortTitle: Provide visual inputs -intro: 'You can attach images to issues or {% data variables.copilot.copilot_chat_short %} prompts to help {% data variables.product.prodname_copilot_short %} understand your task.' -product: '{% data reusables.gated-features.copilot-cloud-agent %}
Sign up for {% data variables.product.prodname_copilot_short %} {% octicon "link-external" height:16 %}' -versions: - feature: copilot -contentType: how-tos -category: - - Author and optimize with Copilot -redirect_from: - - /copilot/how-tos/use-copilot-agents/coding-agent/provide-visual-inputs ---- - -> [!NOTE] -> For an overview of {% data variables.copilot.copilot_cloud_agent %}, see [AUTOTITLE](/copilot/concepts/agents/cloud-agent/about-cloud-agent). - -## Introduction - -{% data variables.copilot.copilot_cloud_agent_short_cap_c %} can process images, such as a photo or screenshot of a sketch or design, as part of your task description. This is useful when you want to show {% data variables.product.prodname_copilot_short %} what you're trying to achieve visually, for example, when updating a UI or implementing a design. - -You can provide images to {% data variables.product.prodname_copilot_short %} in two ways: - -* **In an issue**: Add an image to the issue body, with a description of the task you want {% data variables.product.prodname_copilot_short %} to complete, then assign the issue to {% data variables.product.prodname_copilot_short %}. -* **In {% data variables.copilot.copilot_chat_short %}**: Attach images to your prompt when you ask {% data variables.product.prodname_copilot_short %} to undertake a task or create a pull request. - -## Attaching images to an issue - -1. Navigate to the repository where you want to create the issue. -1. Create a new issue or open an existing issue. -1. In the issue body, drag and drop your image. -1. Add a clear description of what you want {% data variables.product.prodname_copilot_short %} to do with the image. For example, "Let's update the login form to match this mockup". -1. Assign the issue to {% data variables.product.prodname_copilot_short %}. For detailed instructions, see [Assign an issue to {% data variables.product.prodname_copilot_short %} on {% data variables.product.prodname_dotcom_the_website %}](/copilot/how-tos/use-copilot-agents/cloud-agent/create-a-pr#assigning-an-issue-to-copilot-on-githubcom). - -{% data variables.product.prodname_copilot_short %} will analyze the image along with your description when working on the task. - -## Attaching images in {% data variables.copilot.copilot_chat_short %} - -1. Open {% data variables.copilot.copilot_chat_short %}. -1. Attach your image to the chat prompt, and use `/task` to describe what you want {% data variables.product.prodname_copilot_short %} to do. For example, "Update the notification badge to match this mockup". - - For detailed instructions, see [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 %}](/copilot/how-tos/use-copilot-agents/cloud-agent/create-a-pr#asking-copilot-to-create-a-pull-request-from-copilot-chat-in-githubcom). -1. {% data variables.product.prodname_copilot_short %} will start work using the image as context for the task. - -## Further reading - -* [AUTOTITLE](/copilot/how-tos/use-copilot-agents/cloud-agent/create-a-pr) -* [AUTOTITLE](/copilot/tutorials/cloud-agent/get-the-best-results) -* [AUTOTITLE](/copilot/how-tos/use-copilot-agents/cloud-agent/review-copilot-prs) diff --git a/content/copilot/how-tos/use-copilot-agents/cloud-agent/research-plan-iterate.md b/content/copilot/how-tos/use-copilot-agents/cloud-agent/research-plan-iterate.md deleted file mode 100644 index ee12c65f4927..000000000000 --- a/content/copilot/how-tos/use-copilot-agents/cloud-agent/research-plan-iterate.md +++ /dev/null @@ -1,67 +0,0 @@ ---- -title: Research, plan, and iterate on code changes with Copilot cloud agent -shortTitle: Research, plan, iterate -intro: "Perform deep research on a repository, create an implementation plan, and make iterative code changes on a branch, then create a pull request when you're ready." -product: '{% data reusables.gated-features.copilot-cloud-agent %}
Sign up for {% data variables.product.prodname_copilot_short %} {% octicon "link-external" height:16 %}' -versions: - feature: copilot -contentType: how-tos -category: - - Author and optimize with Copilot -redirect_from: - - /copilot/how-tos/use-copilot-agents/coding-agent/research-plan-iterate ---- - -## Introduction - -You can use {% data variables.copilot.copilot_cloud_agent_tmp %} to: - -* Perform **deep research** on a repository by asking {% data variables.product.prodname_copilot_short %} questions. -* **Plan** and refine an approach before {% data variables.product.prodname_copilot_short %} makes changes. -* **Iterate** on code changes on a branch, review a diff, and get {% data variables.product.prodname_copilot_short %} to only **create a pull request when you're ready**. - -{% data variables.copilot.copilot_cloud_agent %} *won't* automatically open a pull request as part of the session. If you *do* want {% data variables.product.prodname_copilot_short %} to open a pull request for your task right away, you can explicitly ask for one in your prompt. For example, by stating **"Create a pull request to ..."**. - -> [!NOTE] Deep research, planning, and iterating on code changes before creating a pull request are only available with {% data variables.copilot.copilot_cloud_agent %} on {% data variables.product.prodname_dotcom_the_website %}. {% data variables.copilot.copilot_cloud_agent_short_cap_c %} integrations (such as Azure Boards, JIRA, Linear, Slack, or Teams) only support creating a pull request directly. - -## Performing deep research - -You can ask {% data variables.copilot.copilot_cloud_agent %} questions about a repository to understand how it works, identify where to make a change, or confirm assumptions before planning and implementation. {% data variables.product.prodname_copilot_short %} starts a **deep research** session to examine the repository and return a grounded answer. - -{% data reusables.copilot.open-agents-panel-or-page %} -1. Ask a question about the repository. - - For example: `Investigate performance issues in this app and suggest improvements.` - - > [!TIP] Alternatively, open {% data variables.copilot.copilot_chat_short %} and attach the relevant repository as context, then ask {% data variables.copilot.copilot_chat_short %} to do research. You will be prompted to approve a deep research session. -1. Optionally, send additional prompts while {% data variables.product.prodname_copilot_short %} is working to steer the session. -1. Review the response and ask follow-up questions. - -## Creating a plan - -You can ask {% data variables.copilot.copilot_cloud_agent %} to propose a plan before making changes, simply by prompting the agent. - -1. Ask the agent to create a plan. - - For example: `Create a plan to implement the most impactful performance improvements for this app.` -1. Review the plan and iterate with {% data variables.product.prodname_copilot_short %} until it matches what you want. - -## Iterating on code changes - -After research and planning, you can make changes on a branch, review the diff, and then decide whether to iterate more or create a pull request. - -1. Ask the agent to implement changes by describing what you want {% data variables.product.prodname_copilot_short %} to do in your prompt. - - For example, you might reference the plan you designed earlier: `Implement the plan we agreed upon.` -1. {% data variables.product.prodname_copilot_short %} starts a session to make the required changes. -1. Once the session completes, click **Diff** to review the changes. -1. Optionally, open the branch (`copilot/BRANCH-NAME`) that {% data variables.product.prodname_copilot_short %} created to inspect the changes in context. -1. If you want refinements, you can continue the conversation and ask the agent to adjust the work. For example: `Rename this to match our existing conventions.` -1. Continue iterating until you’re satisfied with the branch. -1. Once you're happy with the results, and when the session is complete, click **Create pull request**. - -## Further reading - -* [AUTOTITLE](/copilot/concepts/agents/cloud-agent/about-cloud-agent) -* [AUTOTITLE](/copilot/how-tos/use-copilot-agents/cloud-agent/create-a-pr) -* [AUTOTITLE](/copilot/how-tos/use-copilot-agents/cloud-agent/create-custom-agents) \ No newline at end of file diff --git a/content/copilot/how-tos/use-copilot-agents/cloud-agent/review-copilot-prs.md b/content/copilot/how-tos/use-copilot-agents/cloud-agent/review-copilot-prs.md deleted file mode 100644 index d5d2fcecc195..000000000000 --- a/content/copilot/how-tos/use-copilot-agents/cloud-agent/review-copilot-prs.md +++ /dev/null @@ -1,65 +0,0 @@ ---- -title: Reviewing a pull request created by GitHub Copilot -shortTitle: Review Copilot PRs -intro: 'After {% data variables.product.prodname_copilot_short %} creates a pull request, you should review it. You can mention `@copilot` to ask {% data variables.product.prodname_copilot_short %} to make changes, or push changes yourself.' -product: '{% data reusables.gated-features.copilot-cloud-agent %}
Sign up for {% data variables.product.prodname_copilot_short %} {% octicon "link-external" height:16 %}' -versions: - feature: copilot -redirect_from: - - /copilot/how-tos/use-copilot-agents/coding-agent/review-copilot-prs - - /copilot/using-github-copilot/using-copilot-coding-agent-to-work-on-tasks/reviewing-a-pull-request-created-by-copilot - - /copilot/using-github-copilot/coding-agent/reviewing-a-pull-request-created-by-copilot - - /copilot/how-tos/agents/copilot-coding-agent/reviewing-a-pull-request-created-by-copilot - - /copilot/how-tos/agents/copilot-coding-agent/review-copilot-prs - - /copilot/how-tos/agents/coding-agent/review-copilot-prs -contentType: how-tos -category: - - Author and optimize with Copilot ---- - -> [!NOTE] -> For an introduction to {% data variables.copilot.copilot_cloud_agent %}, see [AUTOTITLE](/copilot/concepts/agents/cloud-agent/about-cloud-agent). - -## Reviewing {% data variables.product.prodname_copilot_short %}'s changes - -After {% data variables.product.prodname_copilot_short %} has finished working on a coding task, and has requested a pull request review from you, you should review {% data variables.product.prodname_copilot_short %}'s work thoroughly before merging the pull request. - -> [!IMPORTANT] -> If you have rules or branch protections that require pull request approvals, and you ask {% data variables.product.prodname_copilot_short %} to create a pull request, you can approve the pull request, but **your approval won't count** toward the required number of approvals. Someone else must approve the pull request for it to be merged. - -You can ask {% data variables.product.prodname_copilot_short %} to make changes by mentioning `@copilot` in pull request comments. By default, {% data variables.product.prodname_copilot_short %} pushes commits directly to the pull request's branch. If you prefer, you can ask {% data variables.product.prodname_copilot_short %} to create a separate pull request instead by using natural language in your comment. You can also check out {% data variables.product.prodname_copilot_short %}'s branch and make changes yourself. - -Optionally, when submitting a pull request comment (not a review or review comment) through the {% data variables.product.github %} web interface, you can select a model using the model picker. By default, {% data variables.product.prodname_copilot_short %} will use the model originally used to create the pull request. - -> [!TIP] -> We recommend you batch your review comments instead of submitting them individually. - -{% data reusables.copilot.cloud-agent.write-access-required %} - -When {% data variables.product.prodname_copilot_short %} starts a new agent session in response to your comment, an eyes emoji (👀) is added as a reaction to the comment, and a "Copilot has started work" event is added to the pull request timeline. - -![Screenshot of a pull request timeline with a review comment with the eyes reaction and a "Copilot started work" timeline event.](/assets/images/help/copilot/cloud-agent/comment-to-agent-on-pr.png) - -When {% data variables.product.prodname_copilot_short %} starts a new session on the same pull request, it remembers context from the previous session, allowing it to work faster and more reliably. - -> [!NOTE] -> If the pull request was created by a {% data variables.copilot.copilot_custom_agent_short %}, when you mention `@copilot` in pull request comments, the same {% data variables.copilot.copilot_custom_agent_short %} will be used to make further changes. This ensures consistency in the agent's specialized configuration throughout the pull request lifecycle. See [AUTOTITLE](/copilot/how-tos/use-copilot-agents/cloud-agent/create-custom-agents). - -For more information, see the section "Use comments to iterate on a pull request" in [AUTOTITLE](/copilot/tutorials/cloud-agent/get-the-best-results#using-comments-to-iterate-on-a-pull-request). - -## Managing {% data variables.product.prodname_actions %} workflow runs - -{% data reusables.copilot.cloud-agent-workflow-run-approval-default %} For more information, see [AUTOTITLE](/copilot/how-tos/use-copilot-agents/cloud-agent/configuring-agent-settings). - -## Giving feedback on {% data variables.product.prodname_copilot_short %}'s work - -You can provide feedback on {% data variables.product.prodname_copilot_short %}'s work using the feedback buttons on {% data variables.product.prodname_copilot_short %}'s pull requests and comments. We use your feedback to improve the product and the quality of {% data variables.product.prodname_copilot_short %}'s solutions. - -1. On a pull request or comment from {% data variables.product.prodname_copilot_short %}, click the thumbs up (:+1:) or thumbs down (:-1:) button. -1. If you click the thumbs down button, you're asked to provide additional information. You can, optionally, pick the reason for your negative feedback and leave a comment before clicking **Submit feedback**. - -## Further reading - -* [AUTOTITLE](/copilot/tutorials/cloud-agent/get-the-best-results) -* [AUTOTITLE](/copilot/how-tos/use-copilot-agents/cloud-agent/track-copilot-sessions) -* [AUTOTITLE](/copilot/how-tos/use-copilot-agents/cloud-agent/troubleshoot-cloud-agent) diff --git a/content/copilot/how-tos/use-copilot-agents/index.md b/content/copilot/how-tos/use-copilot-agents/index.md index b7fbf1d6dc07..fcdaea84018e 100644 --- a/content/copilot/how-tos/use-copilot-agents/index.md +++ b/content/copilot/how-tos/use-copilot-agents/index.md @@ -5,7 +5,6 @@ intro: Learn how to use {% data variables.product.prodname_copilot %} agents. versions: feature: copilot children: - - /manage-agents - /cloud-agent - /request-a-code-review - /copilot-memory diff --git a/content/copilot/how-tos/use-copilot-agents/manage-agents.md b/content/copilot/how-tos/use-copilot-agents/manage-agents.md deleted file mode 100644 index c413fc7b688b..000000000000 --- a/content/copilot/how-tos/use-copilot-agents/manage-agents.md +++ /dev/null @@ -1,92 +0,0 @@ ---- -title: Managing cloud agents -shortTitle: Manage agents -intro: View your agent's progress and keep it on task. -product: 'Cloud agents are available with the {% data variables.copilot.copilot_pro %}, {% data variables.copilot.copilot_pro_plus %}, {% data variables.copilot.copilot_for_business %} and {% data variables.copilot.copilot_enterprise %} plans.
Sign up for {% data variables.product.prodname_copilot_short %} {% octicon "link-external" height:16 %}' -versions: - feature: copilot -contentType: how-tos -category: - - Author and optimize with Copilot ---- - -{% data reusables.copilot.cloud-agent.agent-management-intro %} - -## 1. Select a repository and choose your agent - -1. Start a new agent task. - - * Open the **{% octicon "agent" aria-label="The Agents icon" %} Agents** tab in a repository - * Open the [Agents page](https://github.com/copilot/agents?ref_product=copilot&ref_type=engagement&ref_style=text) - * Use the **Task** button or `/task` command from [{% data variables.copilot.copilot_chat_short %}](https://github.com/copilot?ref_product=copilot&ref_type=engagement&ref_style=text) - * Open the Agents panel by clicking the {% octicon "agent" aria-label="The Agents icon" %} at the top of any page on {% data variables.product.github %} -1. Using the dropdown menu, select the repository you want the cloud agent to work in. -1. Optionally, select a base branch for {% data variables.product.prodname_copilot_short %}'s pull request. -{% data reusables.copilot.optional-select-custom-agent-dotcom %} -1. Optionally, select the **CURRENT-MODEL** {% octicon "chevron-down" aria-hidden="true" aria-label="chevron-down" %} dropdown menu, then click the AI model of your choice. -1. Type a prompt describing your request. For example: - - ```text - Implement a user-friendly message for common errors. - ``` - -1. Click **{% octicon "paper-airplane" aria-label="Start task" %}** or press Enter. - - {% data variables.product.prodname_copilot_short %} will start work on the task and begin pushing changes to a new pull request, where it will automatically add you as a reviewer. - -For more information on ways to start new agent tasks, see [AUTOTITLE](/copilot/how-tos/use-copilot-agents/cloud-agent/create-a-pr). - -## 2. Monitor agent activity - -Once the agent starts working, it will continue to update the session log and overview with its progress and thought process. - -Each session displays its status. Click on a session to open the session log, where you can monitor the agent's progress, see the tools it's using, and track how long the session has been running. - -{% data variables.copilot.copilot_cloud_agent %} sessions can also be tracked from the {% data variables.product.prodname_cli %}, {% data variables.product.prodname_mobile %}, {% data variables.product.prodname_vscode %}, Raycast, and JetBrains IDEs. For more information, see [AUTOTITLE](/copilot/how-tos/use-copilot-agents/cloud-agent/track-copilot-sessions). - -## 3. Redirect agents as needed - -You can step in and provide **steering input** to {% data variables.product.prodname_copilot_short %} without stopping the run. Steering uses **one premium request** per message. - -> [!NOTE] Steering a session is currently not available for **third-party coding agents**. - -Reasons you might want to steer a session include: - -* {% data variables.product.prodname_copilot_short %} appears to be going in a wrong direction, and you want to give it more clarity. -* You made a mistake in your description of the required work, and you've decided to start over. - -In the prompt box under the agent session log, prompt {% data variables.product.prodname_copilot_short %} as it is working on a task. For example: - - ```text - Use our existing ErrorHandler utility class instead of writing custom try-catch blocks for each endpoint. - ``` - -{% data variables.product.prodname_copilot_short %} will start implementing your input after it has finished its current tool call. - -## 4. Open an agent session in your local development environment - -You can guide the agent in your local development environment on further changes, or make any edits that require human expertise. - -### {% data variables.product.prodname_vscode_shortname %} - -At the bottom of the agent session view, click the **{% octicon "vscode" aria-label="VS Code" %} Open in {% data variables.product.prodname_vscode_shortname %}** button to launch the session directly in {% data variables.product.prodname_vscode_shortname %}. - -{% data reusables.copilot.cloud-agent.use-latest-vscode %} - -### {% data variables.copilot.copilot_cli %} - 1. At the bottom of the agent session view, click the dropdown list next to **{% octicon "vscode" aria-label="VS Code" %} Open in {% data variables.product.prodname_vscode_shortname %}**. - 1. Click **{% octicon "agent" aria-label="Agent" %} Continue in {% data variables.copilot.copilot_cli %}** to copy the `copilot --resume=SESSION-ID` command to your clipboard. - ![Screenshot of the session action dropdown list, "Continue in Copilot CLI" is highlighted with a dark orange outline.](/assets/images/help/copilot/cloud-agent/open-agent-session-in-copilot-cli.png) - 1. In your terminal, paste and run the command to resume the agent session. - -## 5. Review and merge agent code - -Once the agent completes a session, you can navigate to the pull request to review the changes. From the pull request, you can scan the diff, request further improvements, or approve and merge the changes. See [AUTOTITLE](/copilot/how-tos/use-copilot-agents/cloud-agent/review-copilot-prs). - -## 6. Archive agent sessions - -Sessions that have been stopped can be archived to remove them from the sessions list. - -1. Open the agent session you want to archive. -1. In the top right corner, click **{% octicon "kebab-horizontal" aria-label="More actions" %}**, then click **{% octicon "inbox" aria-hidden="true" aria-label="inbox" %} Archive session**. -1. In the dialog box that opens, click **Yes, archive**.