يقدم التحديث الأخير لـ Visual Studio وضع الوكيل (Agent Mode)، وهي ميزة ثورية مدعومة من GitHub Copilot تعد بتحويل سير عمل تطوير البرمجيات. يسمح هذا الإصدار التجريبي للمطورين بتفويض مهام الترميز المعقدة إلى وكيل ذكاء اصطناعي يمكنه التخطيط بشكل مستقل، وتعديل قواعد التعليمات البرمجية، واستدعاء الأدوات، والتكرار حتى تكتمل المهمة. على عكس التكرارات السابقة لـ Copilot التي قدمت اقتراحات أو تعديلات ملفات فردية، يوفر وضع الوكيل نهجًا مستمرًا للتصحيح الذاتي للترميز، مما قد يوفر وقتًا وجهدًا كبيرين. تلخص مشاركة المدونة هذه الجوانب الرئيسية لوضع الوكيل، بما في ذلك قدراته وكيفية تمكينه وحالات الاستخدام المحتملة والتكامل مع خوادم بروتوكول سياق النموذج (MCP).
وضع الوكيل: إطلاق العنان لاستقلالية الترميز
يمثل وضع الوكيل خطوة مهمة إلى الأمام في الترميز المدعوم بالذكاء الاصطناعي. فهو يمكّن المطورين من تحديد المهام باستخدام مطالبات اللغة الطبيعية، مما يسمح لـ Copilot بتولي زمام المبادرة في تنفيذ تلك المهام. يمتد هذا الاستقلالية إلى ما هو أبعد من مجرد إنشاء التعليمات البرمجية ليشمل سير عمل التطوير بأكمله، من التخطيط الأولي إلى الاختبار وحل الأخطاء.
- وضع الوكيل متاح الآن في معاينة عامة لجميع المستخدمين في Visual Studio 17.14.
- إنه يعمل بشكل متكرر، ويفحص ويحسن مخرجاته باستمرار حتى تكتمل المطالبة.
- يمثل وضع الوكيل تطورًا لتعديلات Copilot، مما يوفر للمطورين المزيد من القوة والتحكم.
ما الذي يمكن أن يفعله وضع الوكيل
تكمن القوة الحقيقية لوضع الوكيل في قدرته على التعامل مع المهام المعقدة ومتعددة الأوجه. لا يتعلق الأمر فقط بإنشاء مقتطفات التعليمات البرمجية؛ يتعلق الأمر بفهم سياق المشروع واتخاذ خطوات استباقية لتحقيق النتيجة المرجوة.
- الوعي المستقل بالسياق: يحدد وضع الوكيل بذكاء السياق والملفات ذات الصلة التي تتطلب التعديل.
- استدعاء الأدوات الذكية: يقترح الوكيل وينفذ أوامر المحطة الطرفية، مما يبسط عملية التطوير.
- التحسين التكراري: يتحقق وضع الوكيل باستمرار من الأخطاء، ويقوم بتشغيل عمليات الإنشاء والاختبارات، ويحسن مخرجاته حتى تكتمل المهمة بنجاح.
- تكامل الأدوات عبر MCP: يستفيد وضع الوكيل من خوادم بروتوكول سياق النموذج (MCP) للوصول إلى مجموعة من الأدوات الموثوقة، بما في ذلك المدققون ومشغلو الاختبار والمحللون الثابتون.
تمكين واستخدام وضع الوكيل
تفعيل وضع الوكيل بسيط. على الرغم من أنه معطل افتراضيًا في مرحلة المعاينة الحالية، إلا أن التمكين سهل:
- تأكد من أنك تستخدم Visual Studio 17.14 GA أو أحدث.
- استخدم ميزة البحث (Ctrl + Q) للبحث عن “copilot-chat.agent”.
- تمكين “Copilot Chat: Agent Enabled”.
- قم بالتبديل إلى “Agent” داخل نافذة Copilot Chat وابدأ مطالبة عالية المستوى.
تطبيقات وضع الوكيل
وضع الوكيل هو أداة متعددة الاستخدامات مع مجموعة واسعة من التطبيقات المحتملة عبر مهام التطوير المتنوعة. إن قدرته على التعامل مع المشاريع المعقدة وأتمتة المهام المتكررة تجعله لا يقدر بثمن.
- إنشاء تطبيقات من البداية
- إعادة هيكلة التعليمات البرمجية عبر ملفات متعددة
- كتابة وتشغيل الاختبارات
- إنشاء الوثائق
- دمج المكتبات الجديدة
- تنفيذ المهام الثقيلة الطرفية
- الإجابة على الأسئلة حول قواعد التعليمات البرمجية المعقدة
تعزيز وضع الوكيل بخوادم MCP
تعمل خوادم بروتوكول سياق النموذج (MCP) على تحسين وضع الوكيل بشكل كبير من خلال توفير الوصول إلى سياق وأدوات وبيانات وموارد إضافية. من خلال العمل كمحولات عالمية، تمكن خوادم MCP تطبيقات الذكاء الاصطناعي من الاتصال بمصادر بيانات متنوعة دون الحاجة إلى اتصالات مخصصة. بعض الأمثلة تشمل:
- التفاعل مع بيئتك السحابية من خلال خادم Azure MCP للوصول إلى الخدمات والأدوات مثل Azure Storage و Cosmos DB و Azure CLI.
- الاستعلام عن قواعد البيانات وإدارتها، مثل تنفيذ الاستعلامات مقابل حاويات Cosmos DB أو إدارة حاويات Azure Storage blob.
- البحث عن منصات التحكم في الإصدار وإدارتها مثل GitHub API لإنشاء مشكلات مجمعة أو تحديث الملفات.
التحديثات الشهرية و Visual Studio Hub
ينتقل Visual Studio إلى جدول إصدار شهري لتحديثات Copilot، مما يضمن حصول المطورين على أحدث الميزات والتحسينات. يعمل Visual Studio Hub الجديد على دمج ملاحظات الإصدار ومقاطع فيديو YouTube والتحديثات الاجتماعية ومناقشات المجتمع في مكان واحد.
في الختام، يقدم وضع الوكيل في Visual Studio، المدعوم من GitHub Copilot، نموذجًا جديدًا في تطوير البرمجيات. إن قدراته المستقلة، جنبًا إلى جنب مع تكامله مع خوادم MCP وقدرته على التعلم من ملاحظات المطورين، تجعله أداة قوية لزيادة الإنتاجية وتحسين جودة التعليمات البرمجية. من خلال تولي زمام المهام المعقدة، يحرر وضع الوكيل المطورين للتركيز على التصميم والابتكار عالي المستوى.
المصدر: Microsoft Visual Studio
The latest update to Visual Studio introduces Agent Mode, a revolutionary feature powered by GitHub Copilot that promises to transform the software development workflow. This preview release allows developers to delegate complex coding tasks to an AI agent that can autonomously plan, edit codebases, invoke tools, and iterate until the task is complete. Unlike previous Copilot iterations that offered single suggestions or file edits, Agent Mode provides a continuous, self-correcting approach to coding, potentially saving significant time and effort. This blog post summarizes the key aspects of Agent Mode, including its capabilities, how to enable it, potential use cases, and integration with Model Context Protocol (MCP) servers.
Agent Mode: Coding Autonomy Unleashed
Agent Mode represents a significant step forward in AI-assisted coding. It empowers developers to define tasks using natural language prompts, allowing Copilot to take the lead in executing those tasks. This autonomy extends beyond simple code generation to encompass entire development workflows, from initial planning to testing and error resolution.
- Agent mode is now available in public preview for all users in Visual Studio 17.14.
- It works iteratively, continuously examining and refining its output until the prompt is completed.
- Agent Mode represents the evolution of Copilot Edits, offering developers even more power and control.
What Agent Mode Can Do
The true power of Agent Mode lies in its ability to handle complex, multi-faceted tasks. It’s not just about generating code snippets; it’s about understanding the context of a project and taking proactive steps to achieve a desired outcome.
- Autonomous Context Awareness: Agent Mode intelligently identifies the relevant context and files requiring modification.
- Intelligent Tool Invocation: The agent suggests and executes terminal commands, streamlining the development process.
- Iterative Refinement: Agent Mode constantly checks for errors, runs builds and tests, and refines its output until the task is successfully completed.
- Tool Integration via MCP: Agent Mode leverages Model Context Protocol (MCP) servers to access a range of trusted tools, including linters, test runners, and static analyzers.
Enabling and Using Agent Mode
Activating Agent Mode is straightforward. While it’s disabled by default in the current preview phase, enabling is easy:
- Ensure you are using Visual Studio 17.14 GA or later.
- Use Feature Search (Ctrl + Q) to search for “copilot-chat.agent”.
- Enable “Copilot Chat: Agent Enabled”.
- Switch to “Agent” within the Copilot Chat window and initiate a high-level prompt.
Applications of Agent Mode
Agent Mode is a versatile tool with a wide range of potential applications across diverse development tasks. Its ability to handle complex projects and automate repetitive tasks makes it invaluable.
- Create apps from scratch
- Refactor code across multiple files
- Write and run tests
- Generate documentation
- Integrate new libraries
- Implement terminal-heavy tasks
- Answer questions about complex codebases
Enhancing Agent Mode with MCP Servers
Model Context Protocol (MCP) servers significantly enhance Agent Mode by providing access to additional context, tools, data, and resources. Acting as universal adaptors, MCP servers enable AI applications to connect to diverse data sources without requiring custom connections. Some examples include:
- Interacting with your cloud environment through Azure MCP server to access services and tools like Azure Storage, Cosmos DB, and the Azure CLI.
- Querying and managing databases, such as executing queries against Cosmos DB containers or managing Azure Storage blob containers.
- Searching and managing version control platforms such as GitHub API to batch create issues or update files.
Monthly Updates and Visual Studio Hub
Visual Studio is transitioning to a monthly release schedule for Copilot updates, ensuring developers have access to the latest features and improvements. The new Visual Studio Hub consolidates release notes, YouTube videos, social updates, and community discussions in a single location.
In conclusion, Agent Mode in Visual Studio, powered by GitHub Copilot, introduces a new paradigm in software development. Its autonomous capabilities, combined with its integration with MCP servers and its ability to learn from developer feedback, make it a powerful tool for increasing productivity and improving code quality. By taking the reins on complex tasks, Agent Mode frees up developers to focus on higher-level design and innovation.
Source: Microsoft Visual Studio
جاري تحميل التعليقات...