Blog Post

Educator Developer Blog
3 MIN READ

How to Customize Visual Studio Code Chat with GitHub Copilot and Semantic Kernel

kinfey's avatar
kinfey
Icon for Microsoft rankMicrosoft
Jan 20, 2025

GitHub Copilot can be used to improve developers' programming efficiency with AI. Different chat participants can also enable developers to complete AI empowerment in different scenarios. For example, @workspace can not only create simple projects and notebooks, but also help you maintain project code and generate test environments. You can enter /help in GitHub Copilot Chat to learn about the chat participants that come with the system. Of course, you can also customize various chat participants for your own workflow. Now you can customize chat participants based on Visual Studio Code Chat Extension, or you can directly create Copilot Extensions to support more IDE applications.

Note: This blog focuses on the chat extension of Visual Studio Code.

In my previous blog, you can see how to use Semantic Kernel to orchestrate multi-Agents https://techcommunity.microsoft.com/blog/educatordeveloperblog/using-azure-ai-agent-service-with-autogen--semantic-kernel-to-build-a-multi-agen/4363121. Combined with the capabilities of LLM, we can use multi-Agents to complete more complex tasks, such as support in software engineering. In the past, we used IDE to create projects with simple frameworks and then wrote different codes step by step according to the requirement. After the support of generative AI, we may hope to use the requirement combined with LLM to quickly complete the code generation work. Not only has a framework, but also can complete the generation of logical code.

Use Azure AI Agent Service to provide various agents in the DevOps environment to complete multi-Agents orchestration for different workflows. For example, to create a project, we need two agents to cooperate with our work, one agent to read the requirement and generate code, and the other agent to save the code. Combined with the capabilities of Semantic Kernel, we can quickly complete the project creation work. Next, let's build a custom Visual Studio Code Chat participant around the scenario created by the Python Flask project.

Model selection

In order to read requirements and generate code in certain steps, we need a model with strong reasoning. o1-mini is a great choice, and we also recommend you use Phi-4 to try it. As for the code saving behavior, gpt-4o-mini can do it.

Multi-Agent orchestration

Use Azure AI Inference SDK to call o1-mini of GitHub Models to create a code-generated Agent and use Azure AI Foundry SDK to create a code-saving Agent based on Azure AI Agent Service. Use Semantic Kernel for Multi-Agent orchestration, bind with Plugin as shown, and set the Agent interaction mode in GroupChat.

 

Architecture

 

.NET Aspire is a very good distributed application framework. We use .NET Aspire to manage our Agent services. By integrating .NET + Semantic Kernel, we can easily create Chat participant customized interface services. We can see that Chat participant can be used to cope with different development scenarios, and different AI Agents can be used to complete the definition very well. But we must say that in the LLM/SLM era, we need to adapt the workflow more flexibly. Semantic Kernel/AutoGen both have the orchestration capabilities of AI Agent.

As for Visual Studio Code Chat Extension, we define two instructions /help and /proj to define the work of self-introduction and project creation.

  • /help uses gpt-4o provided by GitHub Copilot to complete simple introduction work. No need to bind any third-party agent,
  • /proj builds the project, you need to write the requirements, and call the multi-agent interface orchestrated by the encapsulated Semantic Kernel through fetch

Sample Code Click here

Resources

  1. Learn about Azure AI Agent Service https://learn.microsoft.com/en-us/azure/ai-services/agents/
  2. Learn Microsoft AutoGen https://microsoft.github.io/autogen/dev/
  3. Learn Microsoft Semantic Kernel https://github.com/microsoft/semantic-kernel
  4. Learn Visual Studio Code Chat extensions https://code.visualstudio.com/api/extension-guides/chat
  5. Sign up to use GitHub Copilot for free https://aka.ms/CopilotFree_R
  6. Blog - Using Azure AI Agent Service with AutoGen / Semantic Kernel to build a multi-agent's solution https://techcommunity.microsoft.com/blog/educatordeveloperblog/using-azure-ai-agent-service-with-autogen--semantic-kernel-to-build-a-multi-agen/4363121
Updated Jan 20, 2025
Version 2.0
No CommentsBe the first to comment