Use @powerpages within GitHub Copilot Chat for Visual Studio Code (preview)

[This topic is prerelease documentation and is subject to change.]

The GitHub Copilot Chat for Visual Studio Code architecture enables Visual Studio Code (VS Code) extensions to integrate their tools seamlessly with the GitHub Copilot Chat experience. This integration is achieved by creating chat extensions that use the GitHub Copilot Chat extension API, adding a Chat participant to the VS Code environment.

This feature allows @powerpages to be a participant in the Power Platform Tools VS Code extension. Users can now utilize the Power Pages AI Code capabilities by adding the @powerpages participant within GitHub Copilot chat without leaving their current work context. This integration ensures that users can make the most out of both Copilot capabilities.

Important

  • This is a preview feature.
  • Preview features aren’t meant for production use and may have restricted functionality. These features are available before an official release so that customers can get early access and provide feedback.

Screenshot of a response from the Power Pages participant in GitHub Copilot within Visual Studio Code.

Prerequisites

Before you can start using the Power Platform Tools VS Code extension with GitHub Copilot Chat, verify the following prerequisites:

Use the @powerpages participant in GitHub Copilot Chat for VS Code

Once the Power Platform Tools VS Code extension is installed along with GitHub Copilot Chat extension, you can start using the @powerpages participant within GitHub Copilot chat to receive targeted coding assistance for Power Pages.

To add the @powerpages participant to a chat:

  1. Open website content in VS Code:

    Download the website content using Power Platform CLI. To authenticate against a Microsoft Dataverse environment, and to download website content, refer to the tutorial Use Microsoft Power Platform CLI with Power Pages - download website content.

    The Power Platform Tools Extension automatically enables using Microsoft Power Platform CLI commands from within Visual Studio Code through Visual Studio Code Integrated Terminal.

  2. Activate GitHub Copilot Chat:

    Open Copilot chat interface by selecting the Chat icon in the left navigation bar.

    Screenshot of the Copilot chat icon in Visual Studio Code.

    Verify Copilot chat is active.

    Screenshot of the GitHub Copilot chat experience in Visual Studio Code.

  3. Add the @powerpages participant:

    In the Copilot chat, type @powerpages followed by your request. For example, you could say @powerpages write JavaScript code for form field validation to verify the phone field value is in the valid format or ask @powerpages explain the following code {% include 'Page Copy'%}. Copilot provides responses tailored to Power Pages, helping you with writing or explaining code.

    Screenshot of adding the powerpages participant to the GitHub Copilot chat in Visual Studio Code.