本文說明如何啟用 Gemini Code Assist 工具。Google Cloud 管理員應完成這些步驟,為 IDE 中的開發人員啟用工具。
如要進一步瞭解工具,請參閱 Gemini Code Assist 工具總覽。如要在 IDE 中設定工具,請參閱「設定 Gemini Code Assist 工具」。
事前準備
- 設定 Gemini Code Assist。
-
Verify that billing is enabled for your Google Cloud project.
-
Enable the Developer Connect API.
Developer Connect 可用於在使用者帳戶和 Gemini Code Assist 工具服務之間建立連線。
必要的角色
如要取得啟用 Gemini Code Assist 工具所需的權限,請要求管理員授予您專案的 Gemini Code Assist 工具管理員 (roles/cloudaicompanion.codeToolsAdmin
) 身分與存取權管理角色。 Google Cloud 如要進一步瞭解如何授予角色,請參閱「管理專案、資料夾和機構的存取權」。
啟用工具
前往 Google Cloud 控制台的 Gemini Code Assist「工具」頁面。
找出要啟用的工具,然後按一下「啟用」。工具詳細資料頁面隨即開啟。
在「Configuration」(設定) 部分,選取要建立工具的 Developer Connect 帳戶連接器區域。如要查看可用區域,請參閱「Developer Connect 地點」。
按一下「啟用」。
工具已啟用。
系統會提示您連結帳戶,以便在 IDE 中使用這項工具。如要在 IDE 中使用這項工具,請按一下「連結」,然後按照指示連結帳戶。如果不想使用這項工具,可以略過連線步驟。
在專案中授予開發人員「Gemini Code Assist 工具使用者」 (
roles/cloudaicompanion.codeToolsUser
) 角色。 Google Cloud開發人員可在 IDE 中使用這項工具。使用者可以在 Gemini Code Assist 對話中輸入
@TOOL_NAME
提示,向已啟用的 Gemini Code Assist 工具進行驗證。其中 TOOL_NAME 是 Gemini Code Assist 工具的名稱。