在 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 代碼擴展的參與者。 用戶現在無需離開其當前的工作環境即可在 GitHub Copilot 聊天中添加 參與者,以利用 @powerpages 。 此集成可確保使用者可以充分利用這兩種 Copilot 功能。

Important

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

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

先決條件

在開始將 Power Platform Tools 的 VS Code 擴充功能與 GitHub Copilot Chat 配合使用之前,請驗證以下先決條件:

在適用於 VS Code 的 GitHub Copilot Chat 中使用 @powerpages 參與者

一旦安裝了 Power Platform Tools VS Code 擴充功能和 GitHub Copilot 聊天擴充功能,您就可以在 GitHub Copilot 聊天中使用 @powerpages 參與者,以獲得針對 Power Pages 的目標編程協助。

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

  1. 在 VS Code 中開啟網站內容:

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

    Power Platform Tools 延伸模組能可自動啟用在 Visual Studio Code 內透過 Visual Studio Code 整合式終端機使用 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 中將 Power Pages 參與者添加到 GitHub Copilot 聊天中的螢幕截圖。