In this article we will learn about GitHub Copilot Chat in VS Code for Developers. Here we will explore what GitHub Copilot is, why it is utilized, what benefits developers may gain from it, and ultimately how to enable this. Please read my previous article of Hangfire with ASP.Net Core 7.0- Background Jobs.
What is GitHub Copilot?
Github copilot chat is an artificial intelligence (AI) application that assists developers in answering questions and generating code in a simple and engaging manner. It is a Chat GPT for developers, to summarize.
It is important to emphasize that this tool is in preview mode. Those who have access to the beta and have a Github copilot account can use it in test mode at the moment.
- A GitHub copilot account (prices and plans here: https://github.com/features/copilot/)
- Visual Studio Code insider version (Include preview) https://code.visualstudio.com/insiders/
- GitHub copilot extension chat extension for Visual Code https://marketplace.visualstudio.com/items?itemName=GitHub.copilot-chat
Configuring GitHub Copilot chat in VS Code
Step-1 : GitHub Copilot account
- To configure GitHub Copilot let’s, open the GitHub copilot link and login with GitHub account and then click on Free Trial.
- On the following screen, we can see two alternatives, monthly plan and yearly plan, and we may click on the highlighted button. Note: The first month is free, then you may be charged money according to the plan, so you can withdraw the payment details before the charge money.
- On below screen, we need to add the communication address and select the payment method and save payment method information.
In the first month Free trial is there, on the next month it will charge so be cautious on it.
- Once the payment method is done then we can see below screenshot of the GitHub copilot is ready.
- Install Visual Studio Code insider version( It is on Preview ).
- Install the below two copilot extension.
- GitHub Copilot
- GitHub Copilot Chat
Step-2: Install VS Code insider version
That’s it the configuration. Let’s we have see how we can use both Copilot and Copilot Chat.
How to use GitHub Copilot
- We can see on below the the GitHub copilot is running in our code with the blow highlighted, we can disable at any time.
How to use Copilot Chat
- After the Free trial registration we need to wait some time, then on email we got a prompt that now we are ready to use the Copilot Chat.
- Move to the VS Code Insiders and then we can see a chat Icon displaying that enables the Copilot Chat.
Explain a line or part of the code
If you are unfamiliar with something in the code you are working on or require additional information. The Github copilot chat can explain the code you request in the chat.
Adding Exception on my Controller
Create a sample Model for me
We can create easily common components like controllers in a .NET API.
Adding comments in my Controller
GitHub copilot chat can take a specific file of the project and return it, including comments. This a very simple way to document the code.
Adding region element in the Code
We can add region of the elements so that we can differentiate the code easily.
Adding Unit Test on the Controller
No matter if you have services, models, classes, controllers, or other elements in your project, You can generate the unit test easily with mock data using GitHub copilot chat.
For full details of how we can use GitHub copilot chat use in VS Code please check the below video link.
There are plenty additional remarkable capabilities available in this powerful application. The only limit is your imagination, however here are a few instances.
- Recommendations for libraries to use in your projects
- Procedures for updating the version of your framework or libraries.
- Inquire about the security hazards in your initiatives.
- Look for the hardcode string in your code.
- Learn how to use a function or utility in different situations.
In this article we discussed about GitHub Copilot Chat in VS Code for Developers. Github copilot chat is an artificial intelligence (AI) application that assists developers in answering questions and generating code in a simple and engaging manner. Github copilot chat is a Chat GPT for developers, to summarize.
Leave behind your valuable queries and suggestions in the comment section below. Also, if you think this article helps you, do not forget to share this with your developer community. Happy Coding 🙂
- Create CRUD Operation using ReactJs and ASP.Net Core API- Starter Template
- Introduction to GraphQL
- Creating a Sample ReactJs Application using VS Code
- How to use Policy-based Authorization using JWT in .Net Core 7 and Angular
- Intro to Azure Logic Apps- Complete Guide
- How to use Azure Key Vault in ASP.Net Core
- How to create Azure Functions using Azure Portal
- How to Build ASP.Net Core API using Azure Cosmos DB Local Emulator
- How to Send Emails from ASP.NET Core using Azure
- Send Emails from ASP.NET Core using Amazon SES