Omówienie dostosowywania kodu
Zadbaj o dobrą organizację dzięki kolekcji
Zapisuj i kategoryzuj treści zgodnie ze swoimi preferencjami.
Dostosowywanie kodu, funkcja w Gemini Code Assist Enterprise, umożliwia uzyskiwanie sugestii kodu z Gemini Code Assist Enterprise, które są oparte na prywatnych repozytoriach Twojej organizacji, a tym samym dostosowane do stylu kodowania w Twojej organizacji.
Dzięki dostosowywaniu kodu deweloperzy mogą używać kontekstu zdalnego z Twojej organizacji bezpośrednio w środowisku IDE, jak pokazano na tym diagramie:
Podczas pisania kodu Gemini Code Assist przeszukuje Twój prywatny indeks w poszukiwaniu kodu podobnego do tego, który próbujesz napisać. Następnie uwzględnia odpowiednie dopasowania w prompcie dotyczącym kodu i wysyła je do usługi rekomendacji Gemini Code Assist. Dostosowywanie kodu
zapewnia aktualność rekomendacji dzięki ponownemu indeksowaniu bazy kodu co 24 godziny, co pozwala mieć pewność, że sugestie kodu są aktualne.
Gemini Code Assist zwraca wygenerowany kod.
W przeciwieństwie do funkcji pełnej znajomości bazy kodu, która jest ograniczona do wyszukiwania plików w bieżącym folderze i otwartych kartach w środowisku IDE, dostosowywanie kodu przeszukuje wszystkie repozytoria w indeksie. Po skonfigurowaniu dostosowywania kodu działa ono w ramach funkcji uzupełniania i generowania kodu.
Zarówno Gemini Code Assist, jak i dostosowywanie kodu to usługi zarządzane. Licencje są przyznawane na podstawie liczby stanowisk miesięcznie.
Zabezpieczanie dostępu do prywatnego kodu i jego przechowywania
Google zapewnia bezpieczeństwo przechowywanego kodu prywatnego na kilka sposobów:
- Indeksujemy i przechowujemy Twój kod w dedykowanym środowisku z jednym najemcą.
- Administracyjne mechanizmy kontroli dostępu pomagają zapobiegać uzyskiwaniu przez pracowników Google dostępu do Twoich treści bez uzasadnienia i opcjonalnie bez wyraźnej zgody.
- Model Gemini nie jest trenowany na podstawie Twojego prywatnego kodu źródłowego.
- Twoje wyniki są prywatne i nie udostępniamy ich innym klientom.
Więcej informacji o środkach bezpieczeństwa stosowanych przez Google znajdziesz w omówieniu zabezpieczeń Google.
Oto jak możesz kontrolować dostęp do swoich danych:
- Za pomocą uprawnień usługi Identity and Access Management możesz kontrolować, kto może otrzymywać sugestie dotyczące kodu z Twojej bazy kodu.
- Możesz utworzyć
.aiexclude
plik, aby wybrać konkretne repozytoria lub ich części, które Gemini Code Assist indeksuje.
Aby skonfigurować dostosowywanie kodu w IDE, zapoznaj się z artykułem Konfigurowanie dostosowywania kodu w Gemini Code Assist.
Ograniczenia
- Google ogranicza liczbę indeksów repozytorium kodu do jednego na projekt i na organizację.
- Maksymalna liczba repozytoriów, które można indeksować, to 20 000.
- Maksymalna liczba grup repozytoriów na indeks repozytorium kodu to 500.
- Maksymalna liczba repozytoriów w grupie repozytoriów to 500.
- Dostosowywanie kodu jest obsługiwane w rozszerzeniu Gemini Code Assist w VS Code (wersja 2.18.0 lub nowsza), wtyczce Gemini Code Assist w IntelliJ (wersja 1.1.0), Cloud Workstations i edytorze Cloud Shell.
- Dostosowywanie kodu obsługuje repozytoria hostowane na platformach github.com, gitlab.com, bitbucket.org oraz repozytoria lokalne hostowane na platformach GitLab Enterprise, GitHub Enterprise i Bitbucket Data Center.
- Dostosowywanie kodu nie obsługuje ograniczeń adresów IP w GitHub Enterprise Cloud.
- Dostosowywanie kodu jest obsługiwane tylko w przypadku połączeń Developer Connect w tych lokalizacjach (regionach):
us-central1
europe-west1
asia-southeast1
Dostosowywanie kodu nie indeksuje multimediów. Dostosowywanie kodu obsługuje tylko dokumentację (w języku Markdown) i te języki:
- C, C++ i C#
- Golang
- Java
- JavaScript
- Kotlin
- PHP
- Python
- Rust
- TypeScript
Wszystkie inne języki kodowania nie są indeksowane ani używane w dostosowywaniu kodu. Aby poprosić o pomoc dotyczącą języka programowania, kliknij na tej stronie Prześlij opinię, a potem wybierz Opinia o usłudze.
Co dalej?
Skonfiguruj dostosowywanie kodu w Gemini Code Assist.
Po skonfigurowaniu dostosowywania kodu w IDE zapoznaj się z artykułem Korzystanie z dostosowywania kodu.
O ile nie stwierdzono inaczej, treść tej strony jest objęta licencją Creative Commons – uznanie autorstwa 4.0, a fragmenty kodu są dostępne na licencji Apache 2.0. Szczegółowe informacje na ten temat zawierają zasady dotyczące witryny Google Developers. Java jest zastrzeżonym znakiem towarowym firmy Oracle i jej podmiotów stowarzyszonych.
Ostatnia aktualizacja: 2025-08-31 UTC.
[null,null,["Ostatnia aktualizacja: 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)."]]