vscode-copilot-chat: Your AI Peer Programmer in VS Code

Summary
The vscode-copilot-chat extension brings conversational AI assistance directly into Visual Studio Code. It acts as an AI peer programmer, helping developers write code faster and smarter through chat interactions and intelligent suggestions. This powerful tool enhances the coding experience by providing context-aware help and automating multi-step tasks.
Repository Info
Tags
Click on any tag to explore related repositories
Introduction
GitHub Copilot is an AI peer programming tool designed to help you write code more efficiently and intelligently. The vscode-copilot-chat extension is a key component of this experience within Visual Studio Code, providing conversational AI assistance that complements the inline coding suggestions of the main GitHub Copilot extension.
This extension adapts to your unique needs, allowing you to select the best model for your project, customize chat responses, and utilize advanced modes for seamless peer programming sessions.
Installation
To get started with GitHub Copilot Chat, you first need an active GitHub Copilot subscription. You can sign up for GitHub Copilot Free or request access from your enterprise administrator.
Once you have access, installing Copilot in Visual Studio Code provides two extensions:
- GitHub Copilot: Offers inline coding suggestions as you type.
- GitHub Copilot Chat (this extension): Provides conversational AI assistance, allowing you to interact with Copilot through chat.
Note that Copilot Chat releases in lockstep with VS Code, meaning each new version is compatible only with the latest VS Code release.
Examples
vscode-copilot-chat offers several powerful features to enhance your coding workflow:
- AI-Powered Coding Sessions: Start tailored coding sessions with Copilot Edits, allowing quick iteration on code changes across multiple files using natural language. For more autonomous assistance, agent mode performs multi-step coding tasks, handling errors and monitoring output until completion. Edit mode provides a conversational, step-by-step experience, applying edits directly to your codebase for review.
- Inline Suggestions: Beyond chat, Copilot automatically provides inline suggestions in the editor. Ghost text suggestions offer real-time code completions tailored to your style, while next edit suggestions predict and suggest your next logical code changes, allowing for rapid development.
- Ask and Learn with Chat: Engage with Copilot in the Chat view to ask for help with any task or question, bringing in context from your current files. Copilot provides relevant answers using information from participants, variables, and slash commands. You can also apply Copilot's AI suggestions directly to your code using Inline chat, staying in the flow for tasks like refactoring, adding error handling, or explaining complex algorithms.
Why Use It
GitHub Copilot Chat transforms your coding experience by integrating an AI peer programmer directly into your VS Code environment. It helps you:
- Code Faster: Receive instant suggestions and automate routine tasks, significantly speeding up development.
- Code Smarter: Get context-aware assistance, explanations, and refactoring suggestions that improve code quality.
- Learn and Explore: Ask questions about your codebase or general programming concepts and receive relevant, intelligent answers.
- Support for Many Languages: Copilot works across virtually any language, including Java, PHP, Python, JavaScript, Ruby, Go, C#, and C++, leveraging its training on public repositories.
Links
Here are some useful resources to learn more and get started with GitHub Copilot Chat: