TRANSKRYPCJA VIDEO
Introducing the latest addition from GitHub - Copilot Chat, a newly designed chat feature that enhances your coding experience. By enhancing code suggestions, Copilot Chat provides developers with the ability to ask questions and provide additional context right in their editor. With Copilot Chat, experience pair programming like never before with a tool that not only improves code readability and maintainability but also proposes solutions for bugs, generates unit tests, and provides detailed examples. Designed to keep you focused, engaged, and eager to explore how AI assistants can revolutionize your coding process, Copilot Chat will be a game-changer in the world of coding. Copilot Chat is currently in its preview phase and will be launching later this year to a select group of developers. Stay updated for this exceptional game-changing update!
Hi, I'm Allison from GitHub, and I wanted to give you a sneak peek of the new chat functionality we're working on, powered by GitHub Copilot. Copilot is great for giving you code suggestions inline as you type. But there was no easy way to ask questions or provide additional context, until now. Copilot Chat gives you a much richer pair programming experience right in your editor. For example, here's some code I've inherited with a bunch of regular expressions in it. But it's poorly documented. Instead of pulling up a regular expression translator in my browser, let's just ask Copilot what they do. Okay, looks like we have validation for email addresses, phone numbers, and strong passwords.
I always try to leave code in a better shape than when I found it. So let's ask for help to make this code just a bit more readable. I'll type, make this code more readable. Not bad, but I'd like some more. Let's ask Copilot to separate out the validation functions and add more comments. Great, that's so much better. The code is now in separate functions with comments, and the variables have much more meaningful names. This will be so much easier to maintain going forward. So let's bring it over. Now let's take a look at some code that isn't working and see if Copilot can help me figure out why.
I'll ask Copilot to propose a fix for the bugs in my code. By looking at my comment and comparing it to the code, Copilot recognized that I was treating the data as comma separated rather than space separated. Copilot also noticed from the comment that I was returning the values in the wrong order, and it's adding error checking that it typically sees with this type of code. Let's bring this code over and run it. Yep, that works. While we're here, let's ask Copilot to create some unit tests so we don't accidentally break the code again. Perfect.
Copilot is analyzing the code paths that we take in our code and using context from the comment to generate unit tests to test for all branches of logic it sees. This is a great start for us, so we could copy this over into a test function and then build it out over time. Now let me show you one last thing. With chat functionality right in your editor, it's so much easier to stay focused and on task. You can ask for help about coding right where you code. You can even have a conversation with Copilot to learn more. Let's ask for an example.
However, we are deliberately constraining the prompt to ensure we're only asking questions that we detect have an intent around development. So if you stray outside of programming, Copilot will politely decline. Developers all over the world are already using GitHub Copilot to code faster, focus on business logic over boilerplate, and do what matters most, building great software. Bringing chat to the experience will help you keep your focus, but also help you experiment and learn how AI assistants can best help you. My team is actively working on bringing this chat functionality to you later in the year.
We are just starting to get previews of Copilot chat into the hands of other developers to give us feedback and help make this new version of Copilot even better. Join the waitlist if you'd like to get notified as we bring on more people. I'm looking forward to seeing what you think. .