.ai AdMob फ़ाइलों की मदद से, कॉन्टेक्स्ट शेयर करने की सुविधा कॉन्फ़िगर करें
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
Android Studio में Gemini के साथ अपने प्रोजेक्ट का कॉन्टेक्स्ट शेयर करने का विकल्प चुनने पर, आपके पास यह कंट्रोल करने का विकल्प होता है कि कोडबेस की कौनसी फ़ाइलें शेयर की जाएं. इसके लिए, .aiexclude
फ़ाइलों का इस्तेमाल करें. Android Studio में मौजूद एआई की सुविधाएं, मौजूदा प्रोजेक्ट और उससे जुड़ी वर्शन कंट्रोल रूट के बाहर की फ़ाइलों को ऐक्सेस नहीं कर सकतीं. इसे ध्यान में रखते हुए, प्रोजेक्ट और उसके वीसीएस रूट में .aiexclude
फ़ाइलों को कहीं भी रखा जा सकता है. इससे यह कंट्रोल किया जा सकता है कि एआई की सुविधाओं को किन फ़ाइलों को ऐक्सेस करने की अनुमति है.
.gitignore
फ़ाइल की तरह ही, .aiexclude
फ़ाइल उन फ़ाइलों को ट्रैक करती है जिन्हें Android Studio में Gemini के साथ शेयर नहीं किया जाना चाहिए. इनमें चैट के साथ-साथ, एडिटर में काम करने वाली एआई की सुविधाएं भी शामिल हैं. जैसे, कोड पूरा करने की सुविधा. .aiexclude
फ़ाइल, उस डायरेक्ट्री में मौजूद फ़ाइलों पर काम करती है जिसमें वह मौजूद है.

.aiexclude
फ़ाइलें लिखने का तरीका
.aiexclude
फ़ाइल का सिंटैक्स, .gitignore
फ़ाइल के सिंटैक्स जैसा ही होता है.
उदाहरण
यहां .aiexclude
फ़ाइल कॉन्फ़िगरेशन के उदाहरण दिए गए हैं:
- पैटर्न
KEYS
, "KEYS" नाम की उन सभी फ़ाइलों को ब्लॉक करता है जिनका कोई फ़ाइल एक्सटेंशन नहीं है. ये फ़ाइलें, .aiexclude
फ़ाइल वाली डायरेक्ट्री में या उसके नीचे मौजूद होती हैं.
KEYS
- पैटर्न
KEYS.*
, "KEYS" नाम की उन सभी फ़ाइलों को ब्लॉक करता है जिनका फ़ाइल एक्सटेंशन कुछ भी हो. ये फ़ाइलें, उस डायरेक्ट्री में या उसके नीचे मौजूद होती हैं जिसमें . मौजूद होता है.aiexclude
फ़ाइल.
KEYS.*
- पैटर्न
*.kt
, .aiexclude
फ़ाइल वाली डायरेक्ट्री में या उसके नीचे मौजूद सभी Kotlin फ़ाइलों या .kt
एक्सटेंशन वाली फ़ाइलों को ब्लॉक करता है.
*.kt
/*.kt
पैटर्न, .aiexclude
डायरेक्ट्री में मौजूद सभी .kt
फ़ाइलों को ब्लॉक करता है. हालांकि, यह पैटर्न इसके नीचे मौजूद फ़ाइलों को ब्लॉक नहीं करता.
/*.kt
my/sensitive/dir/
पैटर्न, my/sensitive/dir
डायरेक्ट्री और उसके नीचे मौजूद सभी फ़ाइलों को ब्लॉक करता है. फ़ाइल पाथ, उस डायरेक्ट्री के हिसाब से होता है जिसमें .aiexclude
फ़ाइल मौजूद है.
my/sensitive/dir/
- पैटर्न
my/sensitive/dir/**/.txt
, my/sensitive/dir/
डायरेक्ट्री में मौजूद या उससे नीचे की सभी .txt
फ़ाइलों को ब्लॉक करता है.
my/sensitive/dir/**/.txt
- पैटर्न
my/sensitive/dir/*.txt
, डायरेक्ट्री my/sensitive/dir
में मौजूद सभी .txt
फ़ाइलों को ब्लॉक करता है. हालांकि, यह सब-डायरेक्ट्री में मौजूद फ़ाइलों को ब्लॉक नहीं करता.
my/sensitive/dir/*.txt
इस पेज पर मौजूद कॉन्टेंट और कोड सैंपल कॉन्टेंट के लाइसेंस में बताए गए लाइसेंस के हिसाब से हैं. Java और OpenJDK, Oracle और/या इससे जुड़ी हुई कंपनियों के ट्रेडमार्क या रजिस्टर किए हुए ट्रेडमार्क हैं.
आखिरी बार 2025-07-31 (UTC) को अपडेट किया गया.
[null,null,["आखिरी बार 2025-07-31 (UTC) को अपडेट किया गया."],[],[],null,["# Configure context sharing with .aiexclude files\n\nWhen you opt in to sharing your project context with Gemini in Android Studio,\nyou can control which files specifically from the codebase are shared using\n`.aiexclude` files. AI features in Android Studio cannot access files outside of\nthe current project and the version control roots attached to it. With this in\nmind, you can place `.aiexclude` files anywhere within the project and its VCS\nroots to control which files AI features are allowed to access.\n\nMuch like a `.gitignore` file, an `.aiexclude` file tracks files that shouldn't\nbe shared with Gemini in Android Studio, including the chat experience as well\nas AI features that operate in the editor, like [code completion](/studio/gemini/code-completion). An\n`.aiexclude` file operates on files at or below the directory that contains it.\n\nHow to write `.aiexclude` files\n-------------------------------\n\nAn `.aiexclude` file follow the same syntax as a\n[`.gitignore` file](https://git-scm.com/docs/gitignore).\n\nExamples\n--------\n\nHere are example `.aiexclude` file configurations:\n\n- The pattern `KEYS` blocks all files called \"KEYS\" with no file extension at or below the directory that contains the `.aiexclude` file.\n\n KEYS\n\n- The pattern `KEYS.*` blocks all files called \"KEYS\" with any file extension at or below the directory that contains the .`aiexclude` file.\n\n KEYS.*\n\n- The pattern `*.kt` blocks all Kotlin files, or files with the extension `.kt`, at or below the directory that contains the `.aiexclude` file.\n\n *.kt\n\n- The pattern `/*.kt` blocks all `.kt` files in the `.aiexclude` directory, but not below.\n\n /*.kt\n\n- The pattern `my/sensitive/dir/` blocks all files in the `my/sensitive/dir` directory and below. The file path is relative to the directory that contains the `.aiexclude` file.\n\n my/sensitive/dir/\n\n- The pattern `my/sensitive/dir/**/.txt` blocks all `.txt` files at or below the directory `my/sensitive/dir/`.\n\n my/sensitive/dir/**/.txt\n\n- The pattern `my/sensitive/dir/*.txt` blocks all `.txt` files in the directory `my/sensitive/dir`, but not in sub-directories.\n\n my/sensitive/dir/*.txt"]]