# Using Copilot cloud agent from Raycast

Start and track Copilot云代理 sessions from the Raycast launcher.

[Raycast](https://www.raycast.com/) 是适用于 Windows 和 macOS 的可扩展启动器。
GitHub Copilot使用 Raycast 的扩展，您可以在您的计算机上随时随地启动和跟踪Copilot云代理任务，并实时观看会话日志。

## Prerequisites

1. 从 [Raycast 网站](https://www.raycast.com)安装 Raycast。
2. GitHub Copilot单击**扩展页上的**“[安装扩展](https://www.raycast.com/github/github-copilot)”按钮，安装 Raycast 的扩展。

## Starting a session

1. Open Raycast, search for "Copilot," find the **Create Task** command, then press <kbd>Enter</kbd>.
2. Click **Sign in with GitHub**, then complete the authentication flow. Raycast will re-open.
3. Type a prompt describing what you want Copilot to do.

   For example, `Implement a user friendly message for common errors.`
4. Select the repository you want Copilot to work in.
5. Optionally, select a base branch for Copilot's pull request. Copilot will create a new branch based on this branch, then push the changes to a pull request targeting that branch.
6. （可选）从下拉菜单中选择具有专用行为和工具的 自定义智能体。 有关详细信息，请参阅“[为Copilot云代理创建自定义代理](/zh/copilot/how-tos/use-copilot-agents/cloud-agent/create-custom-agents)”。
7. （可选）可以使用下拉菜单来选择将使用的 Copilot 模型。 有关详细信息，请参阅“[更改 GitHub Copilot 云代理的 AI 模型](/zh/copilot/how-tos/use-copilot-agents/cloud-agent/changing-the-ai-model)”。
8. Press <kbd>Command</kbd>+<kbd>Enter</kbd> (macOS) or <kbd>Ctrl</kbd>+<kbd>Enter</kbd> (Windows) to start the task.

   Copilot will start a new session. Copilot 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.

> \[!NOTE]
>
> 如果在启动任务时无法选择特定存储库，则拥有该存储库的组织可能已启用 OAuth app 访问限制。 要了解如何请求批准“GitHub Copilot for Raycast” OAuth app，请参阅 [请求组织批准 OAuth 应用](/zh/account-and-profile/how-tos/setting-up-and-managing-your-personal-account-on-github/managing-your-membership-in-organizations/requesting-organization-approval-for-oauth-apps)。

## Assigning an issue from Raycast

1. Open Raycast, search for "Copilot," find the **Assign Issues to Copilot** command, then press <kbd>Enter</kbd>.
2. Click **Sign in with GitHub**, then complete the authentication flow. Raycast will re-open.
3. Select the repository you want Copilot to work in.
4. Select the issue you want to assign to Copilot.
5. Optionally, select a base branch for Copilot's pull request. Copilot will create a new branch based on this branch, then push the changes to a pull request targeting that branch.
6. （可选）从下拉菜单中选择具有专用行为和工具的 自定义智能体。 有关详细信息，请参阅“[为Copilot云代理创建自定义代理](/zh/copilot/how-tos/use-copilot-agents/cloud-agent/create-custom-agents)”。
7. （可选）可以使用下拉菜单来选择将使用的 Copilot 模型。 有关详细信息，请参阅“[更改 GitHub Copilot 云代理的 AI 模型](/zh/copilot/how-tos/use-copilot-agents/cloud-agent/changing-the-ai-model)”。
8. Optionally, provide additional instructions. These will be passed to Copilot alongside your issue contents.
9. Press <kbd>Command</kbd>+<kbd>Enter</kbd> (macOS) or <kbd>Ctrl</kbd>+<kbd>Enter</kbd> (Windows) to assign the issue.

   Copilot will start a new session. Copilot 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.

> \[!NOTE]
>
> 如果在启动任务时无法选择特定存储库，则拥有该存储库的组织可能已启用 OAuth app 访问限制。 要了解如何请求批准“GitHub Copilot for Raycast” OAuth app，请参阅 [请求组织批准 OAuth 应用](/zh/account-and-profile/how-tos/setting-up-and-managing-your-personal-account-on-github/managing-your-membership-in-organizations/requesting-organization-approval-for-oauth-apps)。

## Tracking your sessions

1. Open Raycast, search for "Copilot," find the **View Tasks** command, then press <kbd>Enter</kbd>.
2. Click **Sign in with GitHub**, then complete the authentication flow. Raycast will re-open.
3. You'll see a list of your tasks. Select a task, then use the following keyboard shortcuts:
   * To watch the session logs live, press <kbd>Enter</kbd>. The logs update in real time, so you can monitor Copilot's progress without leaving Raycast.
   * To open the session logs in the browser, press <kbd>Command</kbd>+<kbd>Enter</kbd> (macOS) or <kbd>Ctrl</kbd>+<kbd>Enter</kbd> (Windows).
   * To open the linked pull request, press <kbd>Command</kbd>+<kbd>P</kbd> (macOS) or <kbd>Ctrl</kbd>+<kbd>P</kbd> (Windows).

> \[!NOTE]
> If you are unable to see some tasks in Raycast, the organization that owns the repository may have enabled OAuth app access restrictions. To learn how to request approval for the "GitHub Copilot for Raycast" OAuth app, see [请求组织批准 OAuth 应用](/zh/account-and-profile/how-tos/setting-up-and-managing-your-personal-account-on-github/managing-your-membership-in-organizations/requesting-organization-approval-for-oauth-apps).

## Further reading

* [管理智能体会话](/zh/copilot/how-tos/copilot-on-github/use-copilot-agents/manage-and-track-agents)
* [使用GitHub Copilot处理任务的最佳做法](/zh/copilot/tutorials/cloud-agent/get-the-best-results)