在 GitHub Copilot Chat for Visual Studio Code 中使用 @powerpages (預覽)

[本主題是發行前版本文件,可能會在未來變更。]

GitHub Copilot Chat for Visual Studio Code 架構使 Visual Studio Code (VS Code) 擴充功能能夠將其工具與 GitHub Copilot 聊天體驗無縫整合。 此整合是透過創建使用聊天擴展 API 的 GitHub Copilot 聊天擴展,將聊天參與者添加到 VS Code 環境來實現的。

此功能允許 @powerpages 成為 Power Platform Tools VS 代碼擴展的參與者。 用戶現在可以通過在聊天中添加 Power Pages 參與者來 利用 @powerpages AI Code 功能 GitHub Copilot ,而無需離開其當前的工作環境。 此集成可確保使用者可以充分利用這兩種 Copilot 功能。

重要

  • 這是預覽功能。
  • 預覽功能不供生產時使用,而且可能功能受限。 這些功能是在正式發行前先行推出,讓客戶能夠搶先體驗並提供意見反應。

Visual Studio Code 中 Power Pages 參與者 GitHub Copilot 的回覆螢幕截圖。

先決條件

在開始將 Power Platform Tools VS 代碼擴展與 Chat 配合使用 GitHub Copilot 之前,請驗證以下先決條件:

使用 GitHub Copilot Chat for VS Code 聊天中的 @powerpages 參與者

一旦 Power Platform Tools VS 程式碼擴充功能與 GitHub Copilot 聊天擴充功能一起安裝,您就可以開始使用 GitHub Copilot 聊天中的 @powerpages 參與者來接收 Power Pages。

要將 @powerpages 參與者加入聊天中:

  1. 在 VS 代碼開啟網站內容:

    使用 CLI 下載 Power Platform 網站內容。 若要對 Microsoft Dataverse 環境進行驗證,並下載網站內容,請參閱教學課程將 Microsoft Power Platform CLI 與 Power Pages 搭配使用 - 下載網站內容

    Power Platform Tools 擴充功能會自動啟用透過 Visual Studio Code 整合終端在 Visual Studio 程式碼內使用 Microsoft Power Platform CLI 指令。

  2. 啟動 GitHub Copilot 聊天:

    選擇左側導覽列中的聊天圖標,開啟 Copilot 聊天介面。

    Visual Studio Code 中 Copilot 聊天圖示的螢幕擷取畫面。

    驗證 Copilot 聊天是否處於活動狀態。

    Visual Studio Code 中的 GitHub GitHub Copilot 聊天體驗的螢幕截圖。

  3. 新增@powerpages參與者:

    在 Copilot 聊天中,輸入 @powerpages 後跟您的請求。 例如,你可以說 @powerpages write JavaScript code for form field validation to verify the phone field value is in the valid format 或問 @powerpages explain the following code {% include 'Page Copy'%}。 Copilot 提供量身訂製的 Power Pages回應,説明您編寫解釋代碼。

    在 Visual Studio Code 中 GitHub Copilot 將電源頁面參與者添加到聊天的螢幕截圖。