Get new issues of The GitHub Insider in your inbox. Sign up now →
The GitHub Insider
Now you can type or talk  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏
GitHub

At GitHub, we’re all about empowering developers to raise their voices and build technology that empowers humanity. And we mean that both literally and figuratively! Case in point, GitHub Copilot Chat. Not only can you use the tool to chat with your IDE over text in Visual Studio Code, but you can talk to your editor, as well. How cool is that?! In this edition of The GitHub Insider, we’ll offer some best practices for getting the most out of GitHub Copilot Chat, no matter what voice you want to use.

#1: Install and ask your first question 🗣️

GitHub Copilot Chat works in Visual Studio, Visual Studio Code, and as of this month, JetBrains IDEs. Note: not all features are available for all platforms. You’ll need a GitHub Copilot for Individuals or GitHub Copilot for Business subscription to access the feature. Then, just install your plugin for your IDE of choice.

Now, you can ask as many questions as you want, simply by typing directly into the chat window. You might want to ask a simple question like, “How do I set up a new Ruby project?” and GitHub Copilot Chat will offer you a suggestion.

#2: Use slash commands for common tasks 🫡

As we described in previous Insider editions, prompt engineering is the name of the game when it comes to getting the most out of AI tools. Which is just a fancy term for providing context about your project.

Using slash commands is a great way to do this—they act as explicit instructions that can help guide GitHub Copilot Chat more precisely than natural language instructions alone. To start, type / in the input box and you'll see multiple options come up.

Choose one of the options and then ask a question to get a suggestion. The options in your slash commands will depend on what IDE you’re using, but Visual Studio Code, Visual Studio, and JetBrains all include options such as test, explain, and feedback. Some IDEs will have their own slash commands.

#3: In Visual Studio Code, use your voice to talk 💋

Typing is great and all, but sometimes talking is much more effective for helping you stay in the flow. Using the VS Code Speech extension, you can use speech-to-text capabilities across Visual Studio Code wherever it supports chat capabilities, including within GitHub Copilot Chat.

This feature, which is still under development (and getting better all the time) is especially useful because historically, speech-to-text tools struggled when working with code.

As of the February 2024 edition of Visual Studio Code (1.87), you can now use the command Voice: Start Voice Chat everywhere in your editor. This means you can bring up a voice chat no matter where your focus is (inline chat in the editor or the panel chat).

You can also enable “walky-talky” mode by pressing and holding the keybinding for voice chat (⌘I for Mac, Ctrl+I for Windows). Voice recognition will be active until you release the keys (just like a walkie-talkie).

#4: Reference files to scope results 💡

Want GitHub Copilot Chat to provide you with more relevant answers? Introducing the wonder of references. By selecting a specific context in your codebase, you'll be able to form better questions without having to write out or paste long pieces of information.

To easily reference a file, simply add # at the beginning of the file name. For example, if you have a file named BasketService.cs, refer to it in the chat as #BasketService.cs. Here are some examples of using references for context control:

#5: Organize your convos to keep the tool focused on the task at hand 🗃️

Asking GitHub Copilot Chat many questions throughout your project? Organize your conversations in a way that keeps the tool on-topic.

In Visual Studio, you can do this by creating new threads in your chat window focused on specific parts of your project. To create a new thread, select the “Create new thread” button from the dropdown in the GitHub Copilot Chat window as seen below.

These threads are then organized by date and you can easily switch between threads to find the best historical context for your question.

Phew! We hope these tips and tricks make your GitHub Copilot Chat experience as smooth as butter. And if you need more inspiration to begin using the tool, here’s a short video on the top three reasons why we love using GitHub Copilot Chat so much. 👇

Happy chatting!

Dive into GitHub Copilot Chat


✨ This newsletter was written by Christina Warren and produced by Gwen Davis. ✨

More to explore 🌎

In this session, learn from GitHub and Microsoft experts about the fundamentals of GitHub Copilot Chat and how you can get started today.

Watch now

Subscribe to our LinkedIn newsletter 🚀

Do your best work on GitHub. Subscribe to our LinkedIn newsletter, Branching Out_.

Sign up now



Join our GitHub Copilot conversations 🤖

Visit our community forum to see what people are saying + offer your own two cents.

Visit now




GitHub

The world’s leading AI-powered developer platform.