تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
استخدِم "مكتبة الطلبات" لحفظ الطلبات المستخدَمة بشكل متكرّر وإدارتها واسترجاعها بسرعة عند الحاجة. إذا كان هناك طلب تستخدمه بشكل متكرر مع ملفات مختلفة أو أقسام مختلفة من الرمز، يمكنك استخدام متغيّر نموذج الطلب الذي يتم استبداله تلقائيًا بالرمز أو الملف المحدّد أثناء تنفيذ الطلب. يؤدي سير العمل المبسّط هذا إلى عدم الحاجة إلى إعادة كتابة الطلبات الشائعة الاستخدام، ما يوفّر عليك الوقت والجهد.
لفتح "مكتبة الطلبات"، انتقِل إلى ملف (Android Studio على نظام التشغيل macOS)
الإعدادات > الأدوات > Gemini > مكتبة الطلبات.
حفظ طلب
لإضافة طلب، اتّبِع الخطوات التالية:
افتح "مكتبة الطلبات" من خلال النقر على ملف (Android Studio على نظام التشغيل macOS)
> الإعدادات > الأدوات > Gemini > مكتبة الطلبات.
لضبط نطاق الطلب، استخدِم القائمة المنسدلة النطاق:
تكون القواعد على مستوى بيئة التطوير المتكاملة خاصة بك ويمكن استخدامها في مشاريع متعددة.
أدخِل اسمًا للطلب. هذا الاسم هو ما يظهر في قائمة مكتبة الطلبات إذا أردت تطبيق الطلب من المحرّر.
أدخِل الطلب في الحقل المخصّص. إذا كان الطلب يتضمّن الإشارة إلى رمز برمجي محدّد، يمكنك إضافة الرمز البرمجي ذي الصلة أثناء تنفيذ الطلب باستخدام المتغيّرات التالية في طلبك:
$SELECTION: يمثّل النص المحدّد أو النص المحيط بالمؤشر
في حال عدم تحديد أي نص.
$CURRENT_FILE: يمثّل كل النص في الملف النشط حاليًا في المحرّر.
اختياري: إذا كنت لا تريد أن تظهر الطلب في قائمة "مكتبة الطلبات"، أزِل العلامة من المربّع بجانب العرض في قائمة "مكتبة الطلبات".
لتطبيق التغييرات ومواصلة ضبط الإعدادات الأخرى، انقر على تطبيق.
لتطبيق التغييرات والخروج من مربّع حوار الإعدادات على الفور، انقر على حسنًا.
يمكنك أيضًا النقر بزر الماوس الأيمن على طلب في المحادثة لحفظه واستخدامه لاحقًا. لتطبيق طلب محفوظ، انقر بزر الماوس الأيمن في "المحرّر" وانتقِل إلى Gemini > مكتبة الطلبات لتطبيق الطلب.
استخدام طلب محفوظ
لاستخدام طلب من "مكتبة الطلبات"، اتّبِع الخطوات التالية:
حدِّد الرمز ذي الصلة، إذا كان ذلك منطبقًا على الطلب الذي تنوي استخدامه. إذا لم يشر الطلب إلى رمز معيّن، لن يهم مكان المؤشر في الملف.
للحصول على قائمة الطلبات، انقر بزر الماوس الأيمن في المحرّر وانتقِل إلى
Gemini > مكتبة الطلبات.
لإرسال الطلب إلى Gemini، اختَر الطلب من القائمة.
مشاركة الطلبات على مستوى المشروع وإدارتها
يمكنك مشاركة الطلبات على مستوى المشروع وإدارتها مع أعضاء الفريق الذين يعملون على المشروع نفسه. عند حفظ طلب على مستوى المشروع في "مكتبة الطلبات"، يتم تخزين الطلب في <project-root>/.idea/project.prompts.xml. لمشاركة الطلبات على مستوى المشروع وإدارتها، أضِف المجلد .idea إلى نظام التحكّم بالإصدارات.
يخضع كل من المحتوى وعيّنات التعليمات البرمجية في هذه الصفحة للتراخيص الموضحّة في ترخيص استخدام المحتوى. إنّ Java وOpenJDK هما علامتان تجاريتان مسجَّلتان لشركة Oracle و/أو الشركات التابعة لها.
تاريخ التعديل الأخير: 2025-07-31 (حسب التوقيت العالمي المتفَّق عليه)
[[["يسهُل فهم المحتوى.","easyToUnderstand","thumb-up"],["ساعَدني المحتوى في حلّ مشكلتي.","solvedMyProblem","thumb-up"],["غير ذلك","otherUp","thumb-up"]],[["لا يحتوي على المعلومات التي أحتاج إليها.","missingTheInformationINeed","thumb-down"],["الخطوات معقدة للغاية / كثيرة جدًا.","tooComplicatedTooManySteps","thumb-down"],["المحتوى قديم.","outOfDate","thumb-down"],["ثمة مشكلة في الترجمة.","translationIssue","thumb-down"],["مشكلة في العيّنات / التعليمات البرمجية","samplesCodeIssue","thumb-down"],["غير ذلك","otherDown","thumb-down"]],["تاريخ التعديل الأخير: 2025-07-31 (حسب التوقيت العالمي المتفَّق عليه)"],[],[],null,["# Save and manage prompts with the Prompt Library\n\nUse the Prompt Library to save and manage your frequently used prompts and\nquickly recall them when needed. If there's a prompt that you use often for\ndifferent files or different sections of code, you can use a prompt template\nvariable that is automatically replaced with the selected code or file during\nprompt execution. This streamlined workflow eliminates the need to retype\ncommonly used prompts, saving you time and effort.\n\nTo open the Prompt Library, go to **File** (**Android Studio** on macOS)\n**Settings \\\u003e Tools \\\u003e Gemini \\\u003e Prompt Library**.\n\nSave a prompt\n-------------\n\nTo add a prompt, follow these steps:\n\n1. Open the Prompt Library by clicking **File** (**Android Studio** on macOS) **\\\u003e Settings \\\u003e Tools \\\u003e Gemini \\\u003e Prompt Library**.\n2. To set the scope of the prompt, use the **Scope** drop-down:\n - IDE-level rules are private to yourself and can be used across multiple projects.\n - Project-level rules can be [shared among teammates](#share-project-prompts) working on the same project.\n3. To add a new prompt, click **Add** .\n4. Give the prompt a name. This name is what appears in the [Prompt Library menu](#use-saved-prompt) if you want to apply the prompt from the editor.\n5. Enter the prompt in the field provided. If the prompt involves referencing specific code, you can add the relevant code during prompt execution by using the following variables in your prompt:\n - `$SELECTION` - Represents the selected text, or text surrounding the cursor if no text is selected.\n - `$CURRENT_FILE` - Represents all the text in the file that's currently active in the editor.\n6. Optional: If you don't want the prompt to show up in the [Prompt Library menu](#use-saved-prompt), un-check **Show in Prompt Library menu**.\n7. To apply the changes and continue configuring other settings, click **Apply** . To apply the changes and immediately exit the settings dialog, click **Ok**.\n\nYou can also right-click on a prompt in chat to save it for later use. To apply\na saved prompt, right-click in the Editor and navigate to **Gemini \\\u003e Prompt\nLibrary** to apply the prompt.\n\nUse a saved prompt\n------------------\n\nTo use a prompt from the Prompt Library, follow these steps:\n\n1. Highlight the relevant code, if applicable to the prompt that you're planning to use. If the prompt doesn't reference specific code, it doesn't matter where your cursor is in the file.\n2. To get your list of prompts, right-click in the editor and go to **Gemini \\\u003e Prompt Library**.\n3. To submit the prompt to Gemini, select the prompt from the menu.\n\nShare and manage project-level prompts\n--------------------------------------\n\nYou can share and manage project-level prompts with teammates working on the\nsame project. When you save a prompt at the project level in the Prompt Library,\nthe prompt is stored at `\u003cproject-root\u003e/.idea/project.prompts.xml`. To share and\nmanage project-level prompts, add the `.idea` folder to your version control\nsystem."]]