ภาพรวมการปรับแต่งโค้ด
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
การปรับแต่งโค้ด ซึ่งเป็นฟีเจอร์ใน Gemini Code Assist Enterprise
ช่วยให้คุณรับคำแนะนำโค้ดจาก Gemini Code Assist Enterprise
ที่อิงตามที่เก็บข้อมูลส่วนตัวขององค์กร และสอดคล้องกับรูปแบบการเขียนโค้ดขององค์กร
การปรับแต่งโค้ดช่วยให้นักพัฒนาซอฟต์แวร์ใช้บริบทระยะไกลจาก
องค์กรของคุณใน IDE ได้โดยตรง ดังที่แสดงในไดอะแกรมต่อไปนี้
ขณะที่คุณเขียนโค้ด Gemini Code Assist จะค้นหาดัชนีส่วนตัวของคุณเพื่อหา
โค้ดที่คล้ายกับโค้ดที่คุณพยายามเขียน จากนั้นจะรวมการจับคู่ที่เกี่ยวข้อง
ไว้ในพรอมต์โค้ดและส่งการจับคู่เหล่านี้ไปยัง
บริการคำแนะนำของ Gemini Code Assist การปรับแต่งโค้ด
จะช่วยให้คำแนะนำเป็นข้อมูลล่าสุดโดยการจัดทำดัชนีฐานโค้ดใหม่ทุก 24 ชั่วโมง เพื่อ
ให้มั่นใจว่าคำแนะนำโค้ดจะเป็นข้อมูลล่าสุดอยู่เสมอ
Gemini Code Assist จะส่งโค้ดที่สร้างขึ้นให้คุณ
การค้นหาการปรับแต่งโค้ดจะค้นหารีโปทั้งหมดในดัชนีของคุณ ซึ่งต่างจากฟีเจอร์การรับรู้โค้ดเบสทั้งหมดที่จำกัดเฉพาะการค้นหาไฟล์ในโฟลเดอร์ปัจจุบันและแท็บที่เปิดใน IDE
หลังจากตั้งค่าการปรับแต่งโค้ดแล้ว การปรับแต่งดังกล่าวจะทำงานเป็นส่วนหนึ่ง
ของฟีเจอร์การเติมโค้ดอัตโนมัติและการสร้างโค้ด
ทั้ง Gemini Code Assist และการปรับแต่งโค้ดเป็นบริการที่มีการจัดการ
คุณอนุญาตให้ใช้ตามที่นั่งต่อเดือน
การรักษาความปลอดภัยในการเข้าถึงและการจัดเก็บโค้ดส่วนตัว
Google ให้ความปลอดภัยแก่โค้ดส่วนตัวที่จัดเก็บไว้ด้วยวิธีต่างๆ ดังนี้
- เราจะจัดทำดัชนีและจัดเก็บโค้ดของคุณในสภาพแวดล้อมแบบผู้เช่ารายเดียวโดยเฉพาะ
- การควบคุมการเข้าถึงระดับผู้ดูแลระบบ
ช่วยป้องกันไม่ให้พนักงานของ Google เข้าถึงเนื้อหาของคุณโดยไม่มีเหตุผล
และอาจต้องได้รับอนุมัติอย่างชัดเจน
- โมเดล Gemini ไม่ได้ฝึกจากซอร์สโค้ดส่วนตัวของคุณ
- ผลการตรวจของคุณจะเป็นข้อมูลส่วนตัว และเราจะไม่แชร์ผลการตรวจของคุณกับลูกค้า
รายอื่นๆ
ดูรายละเอียดเพิ่มเติมเกี่ยวกับมาตรการรักษาความปลอดภัยของ Google ได้ที่
ภาพรวมความปลอดภัยของ Google
วิธีควบคุมการเข้าถึงข้อมูลของคุณมีดังนี้
- คุณใช้สิทธิ์ Identity and Access Management เพื่อช่วยควบคุมบุคคล
ที่รับคำแนะนำโค้ดจากโค้ดเบสได้
- คุณสามารถ
สร้าง
.aiexclude
ไฟล์
เพื่อเลือกที่เก็บหรือส่วนของที่เก็บที่
Gemini Code Assist จัดทำดัชนี
หากต้องการกำหนดค่าการปรับแต่งโค้ดใน IDE โปรดดูหัวข้อ
กำหนดค่าการปรับแต่งโค้ดของ Gemini Code Assist
ข้อจำกัด
- Google จำกัดจำนวนดัชนีที่เก็บโค้ดไว้ที่ 1 รายการต่อโปรเจ็กต์
และต่อองค์กร
- จำนวนที่เก็บสูงสุดที่จัดทำดัชนีได้คือ 20,000 รายการ
- จำนวนกลุ่มที่เก็บสูงสุดต่อดัชนีที่เก็บโค้ดคือ 500
- จำนวนที่เก็บสูงสุดต่อกลุ่มที่เก็บคือ 500
- การปรับแต่งโค้ดได้รับการรองรับในส่วนขยาย Gemini Code Assist ของ VS Code (เวอร์ชัน 2.18.0 ขึ้นไป), ปลั๊กอิน Gemini Code Assist ของ IntelliJ (เวอร์ชัน 1.1.0), Cloud Workstations และ Cloud Shell Editor
- การปรับแต่งโค้ดรองรับที่เก็บที่โฮสต์ใน github.com, gitlab.com,
bitbucket.org และที่เก็บภายในองค์กรที่โฮสต์ใน GitLab Enterprise, GitHub
Enterprise และ Bitbucket Data Center
- การปรับแต่งโค้ดไม่รองรับการจำกัด IP ของ GitHub Enterprise Cloud
- การปรับแต่งโค้ดรองรับเฉพาะการเชื่อมต่อ Developer Connect
ในสถานที่ตั้ง (ภูมิภาค) ต่อไปนี้
us-central1
europe-west1
asia-southeast1
การปรับแต่งโค้ดจะไม่จัดทำดัชนีสื่อ การปรับแต่งโค้ดรองรับเฉพาะ
เอกสารประกอบ (ใน Markdown) และภาษาต่อไปนี้
- C, C++ และ C#
- Golang
- Java
- JavaScript
- Kotlin
- PHP
- Python
- Rust
- TypeScript
ระบบจะไม่จัดทำดัชนีหรือใช้ภาษาการเขียนโค้ดอื่นๆ ในการปรับแต่งโค้ด หากต้องการขอรับการสนับสนุนสำหรับภาษาการเขียนโค้ด ให้คลิกส่งความคิดเห็นในหน้านี้
แล้วเลือกความคิดเห็นเกี่ยวกับผลิตภัณฑ์
ขั้นตอนถัดไป
กำหนดค่า Gemini Code Assist
การปรับแต่งโค้ด
เมื่อกำหนดค่าการปรับแต่งโค้ดใน IDE แล้ว ให้ดูใช้การปรับแต่งโค้ด
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-08-31 UTC
[null,null,["อัปเดตล่าสุด 2025-08-31 UTC"],[[["\u003cp\u003eCode customization in Gemini Code Assist provides code suggestions tailored to your organization's private repositories and coding style by analyzing and indexing your code.\u003c/p\u003e\n"],["\u003cp\u003eGemini Code Assist uses a private index to search for code similar to what you're writing and includes relevant matches in the code prompt, updating the index every 24 hours to ensure suggestions are current.\u003c/p\u003e\n"],["\u003cp\u003eCode customization offers enhanced code search capabilities compared to full codebase awareness, as it searches all indexed repositories, rather than just the current folder and open tabs.\u003c/p\u003e\n"],["\u003cp\u003eGoogle secures private code through a dedicated single-tenant environment, administrative access controls, and ensures that the Gemini model doesn't train on your private code, while keeping your results private.\u003c/p\u003e\n"],["\u003cp\u003eCode Customization is available on VS Code Gemini Code Assist extension, IntelliJ Gemini Code Assist plugin, Cloud Workstations, and the Cloud Shell Editor, with limited support for GitHub.com and GitLab.com, as well as only being able to index certain programming languages.\u003c/p\u003e\n"]]],[],null,["# Code customization overview\n\n| **Note:** Gemini Code Assist code customization is available only in Gemini Code Assist Enterprise. For more information, see [Gemini Code Assist supported features](/gemini-code-assist/docs/overview#supported-features).\n\nCode customization, a feature in\n\n[Gemini Code Assist](/gemini-code-assist/docs/overview) Enterprise,\nlets you get code suggestions from Gemini Code Assist\nEnterprise that are based on your organization's private repositories, and thus\naligned to your organization's coding style.\n\nWith code customization, developers can use remote context from your\norganization directly in the IDE, as the following diagram shows:\n\nAs you code, Gemini Code Assist searches your private index for\ncode that is similar to what you're trying to write. It then includes relevant\nmatches in the code prompt and sends these matches to the\nGemini Code Assist recommendations service. Code customization\nkeeps recommendations fresh by reindexing your codebase every 24 hours to\nensure that code suggestions remain up to date.\nGemini Code Assist returns the generated code to you.\n\nUnlike the full codebase awareness feature, which is limited to searching files\nin the current folder and open tabs in your IDE, code customization searches all\nrepositories in your index. After code customization is set up, it works as part\nof the code completion and code generation features.\n\nBoth Gemini Code Assist and code customization are managed\nservices. You license usage by seats per month.\n\nSecuring access and storage of private code\n-------------------------------------------\n\nGoogle provides security of your stored private code in several ways:\n\n- We index and store your code in a dedicated single-tenant environment.\n- [Administrative access controls](https://cloud.google.com/assured-workloads/cloud-provider-access-management/docs/administrative-access) help prevent Google employees from accessing your content without justification and, optionally, explicit approval.\n- The Gemini model doesn't train on your private source code.\n- Your results are private to you, and we don't share your results with other customers.\n\nFor further details on Google's security measures, see the\n[Google security overview](https://cloud.google.com/security/overview/whitepaper).\n\nHere's how you can control access to your data:\n\n- You can use Identity and Access Management permissions to help control individuals who can get code suggestions from your codebase.\n- You can [create an `.aiexclude` file](/gemini-code-assist/docs/code-customization#optional_choose_which_files_are_not_indexed) to choose specific repositories or parts of repositories that Gemini Code Assist indexes.\n\nTo configure code customization in your IDE, see\n\n[Configure Gemini Code Assist code customization](/gemini-code-assist/docs/code-customization).\n\n\nLimitations\n-----------\n\n- Google limits the number of code repository indexes to one for each project and for each organization.\n- The maximum number of repositories that can be indexed is 20,000.\n- The maximum number of repository groups per code repository index is 500.\n- The maximum number of repositories per repository group is 500.\n- Code customization is supported in the VS Code Gemini Code Assist extension (version 2.18.0+), the IntelliJ Gemini Code Assist plugin (version 1.1.0), Cloud Workstations, and the Cloud Shell Editor.\n- Code customization supports repositories hosted on github.com, gitlab.com, bitbucket.org, and on-premises repositories hosted on GitLab Enterprise, GitHub Enterprise, and Bitbucket Data Center.\n- Code customization doesn't support [GitHub Enterprise Cloud IP restrictions](https://docs.github.com/en/enterprise-cloud@latest/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/managing-allowed-ip-addresses-for-your-organization).\n- Code customization supports only Developer Connect connections in the following locations (regions):\n - `us-central1`\n - `europe-west1`\n - `asia-southeast1`\n- Code customization doesn't index media. Code customization supports only\n documentation (in Markdown) and the following languages:\n\n - C, C++, and C#\n - Golang\n - Java\n - JavaScript\n - Kotlin\n - PHP\n - Python\n - Rust\n - TypeScript\n\n All other coding languages are not indexed or used in code customization. To\n request support for a coding language, click **Send feedback** on this page,\n and then select **Product feedback**.\n\nWhat's next\n-----------\n\n1.\n [Configure Gemini Code Assist\n code customization](/gemini-code-assist/docs/code-customization).\n\n2. Once you've configured code customization in your IDE, see\n\n [Use code customization](/gemini-code-assist/docs/use-code-customization)."]]