Skip to main content
Skip to content

Using plan mode in your IDE

Have Copilot research a task and draft an implementation plan for your review before any code is changed.

Introduction

计划模式有助于在执行计划之前创建详细的实施计划。 这可确保在进行任何代码更改之前考虑并解决所有要求。 计划代理在审核和批准计划之前不会进行任何代码更改。 批准后,可以将计划移交给默认代理,或将其保存,以便进行进一步的优化、评审或团队讨论。

计划代理旨在:

  • 使用只读工具和代码库分析全面研究任务,以确定要求和约束。
  • 将任务分解为可管理、可作的步骤,并包括有关不明确要求的公开问题。
  • 根据标准化的计划格式呈现简洁的计划草稿,供用户查看和迭代。

Plan mode is available in Visual Studio Code, JetBrains IDEs, Xcode, and Eclipse. It is not currently available in Visual Studio. Click the tabs above for instructions for your editor.

To run a task without planning it first, see Using agent mode in your IDE.

Using the plan agent

  1. If the chat view is not already displayed, select Open Chat from the Copilot Chat menu.

  2. At the bottom of the chat view, select Plan from the agents dropdown.

  3. Type a prompt that describes a task, such as adding a feature to an existing application, refactoring code, fixing a bug, or creating an initial version of a new application.

    For example: Create a simple to-do web app with HTML, CSS, and JS files.

    After a few moments, the plan agent outputs a plan in the chat view. The plan provides a high-level summary and a breakdown of steps, including any open questions for clarification.

  4. 查看计划并回答代理提出的任何问题。

    可以多次迭代,来阐明要求、调整项目范围或回答问题。

  5. 完成计划后,可以:

    • 单击 “开始实现 ”,将 Copilot Chat 切换到代理模式,并根据实施计划启动代理会话来实现所需的更改。
    • 单击 “在编辑器中打开 ”,将 Copilot Chat 切换到代理模式,并在编辑器的选项卡中启动生成 Markdown 的代理会话,其中包含实现计划的详细信息。 可以自行完成计划,或将计划保存为 Markdown 文件供以后使用。

For more information, see Planning with agents in VS Code in the Visual Studio Code documentation.

Further reading

Using plan mode

  1. If it is not already displayed, open the Copilot Chat panel by clicking the GitHub Copilot Chat icon at the right side of the JetBrains IDE window.

  2. At the bottom of the Copilot Chat panel, select Plan from the agents dropdown.

  3. Type a prompt that describes a task, such as adding a feature to an existing application, refactoring code, fixing a bug, or creating an initial version of a new application.

    For example: Create a simple to-do web app with HTML, CSS, and JS files.

  4. Submit the prompt.

    After a few moments, the plan agent outputs a plan in the chat panel. The plan provides a high-level summary and a breakdown of steps, including any open questions for clarification.

  5. 查看计划并回答代理提出的任何问题。

    可以多次迭代,来阐明要求、调整项目范围或回答问题。

  6. 完成计划后,可以:

    • 单击 “开始实现 ”,将 Copilot Chat 切换到代理模式,并根据实施计划启动代理会话来实现所需的更改。
    • 单击 “在编辑器中打开 ”,将 Copilot Chat 切换到代理模式,并在编辑器的选项卡中启动生成 Markdown 的代理会话,其中包含实现计划的详细信息。 可以自行完成计划,或将计划保存为 Markdown 文件供以后使用。

Further reading

注意

Plan mode is currently in 公开预览 and subject to change.

Using plan mode

  1. If it is not already displayed, open the Copilot Chat window by clicking Editor in the menu bar, then clicking GitHub Copilot then Open Chat.

  2. At the bottom of the Copilot Chat window, select Plan from the agents dropdown.

  3. Type a prompt that describes a task, such as adding a feature to an existing application, refactoring code, fixing a bug, or creating an initial version of a new application.

    For example: Create a simple to-do app with Swift files.

  4. Submit the prompt.

    After a few moments, the plan agent outputs a plan in the chat panel. The plan provides a high-level summary and a breakdown of steps, including any open questions for clarification.

  5. 查看计划并回答代理提出的任何问题。

    可以多次迭代,来阐明要求、调整项目范围或回答问题。

  6. 完成计划后,可以:

    • 单击 “开始实现 ”,将 Copilot Chat 切换到代理模式,并根据实施计划启动代理会话来实现所需的更改。
    • 单击 “在编辑器中打开 ”,将 Copilot Chat 切换到代理模式,并在编辑器的选项卡中启动生成 Markdown 的代理会话,其中包含实现计划的详细信息。 可以自行完成计划,或将计划保存为 Markdown 文件供以后使用。

Further reading

注意

Plan mode is currently in 公开预览 and subject to change.

Using plan mode

  1. If it is not already displayed, open the Copilot Chat panel by clicking the Copilot icon () in the status bar at the bottom of Eclipse, then clicking Open Chat.

  2. At the bottom of the chat panel, select Plan from the agents dropdown.

  3. Type a prompt that describes a task, such as adding a feature to an existing application, refactoring code, fixing a bug, or creating an initial version of a new application.

    For example: Create a simple to-do app using JavaFX.

  4. Submit the prompt.

    After a few moments, the plan agent outputs a plan in the chat panel. The plan provides a high-level summary and a breakdown of steps, including any open questions for clarification.

  5. 查看计划并回答代理提出的任何问题。

    可以多次迭代,来阐明要求、调整项目范围或回答问题。

  6. 完成计划后,可以:

    • 单击 “开始实现 ”,将 Copilot Chat 切换到代理模式,并根据实施计划启动代理会话来实现所需的更改。
    • 单击 “在编辑器中打开 ”,将 Copilot Chat 切换到代理模式,并在编辑器的选项卡中启动生成 Markdown 的代理会话,其中包含实现计划的详细信息。 可以自行完成计划,或将计划保存为 Markdown 文件供以后使用。

Further reading