配置本地代码库感知
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
本地代码库感知通过索引编制和支持技术来提高 Gemini Code Assist 回答的相关性。
默认情况下,本地代码库感知处于启用状态。如需停用本地代码库感知,请执行以下任务:
VS Code
在 IDE 中,依次前往设置 > 扩展程序 > Gemini Code Assist。
搜索本地代码库感知设置。
取消选中相应复选框即可停用本地代码库感知。
重新加载 IDE。
IntelliJ
Gemini Code Assist for IntelliJ 和其他 JetBrains IDE 不支持本地代码库感知配置设置。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-08-31。
[null,null,["最后更新时间 (UTC):2025-08-31。"],[],[],null,["# Configure local codebase awareness\n\n| **Preview**\n|\n| Specifying folders to use as context with Gemini Code Assist\n| is a feature that is in preview. Products and features that are in preview are\n| available \"as is\".\n\nLocal codebase awareness improves the relevance of\nGemini Code Assist responses through indexing and supporting\ntechniques.\n\nBy default, local codebase awareness is enabled. To disable local codebase\nawareness, perform the following tasks: \n\n### VS Code\n\n1. In your IDE, navigate to **Settings** \\\u003e **Extensions**\n \\\u003e **Gemini Code Assist**.\n\n2. Search for the **Local Codebase Awareness** setting.\n\n3. Unselect the checkbox to disable local codebase awareness.\n\n4. Reload your IDE.\n\n### IntelliJ\n\nLocal codebase awareness configuration settings aren't supported in\nGemini Code Assist for IntelliJ and other JetBrains IDEs."]]