GitHub Copilot just got exponentially smarter

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
there's been some big announcements around vs code and co-pilot in the last couple weeks co-pilot essentially got exponentially smarter how does that work let's take a look all right I've got a project here where I want to add an additional login button for Facebook but I'm not exactly sure where in the project this login is done cuz there's like a lot of files in here okay so let's ask hilot to tell us where in the project this login is being done and as you can see it doesn't really know and that's because it doesn't know everything about my project and all it can give me is a generic answer and that's because one of the limitations of these large language models like chat GPT is that the size of the messages that you can send to the model is limited we call these tokens and because of that it's impossible to send your entire project and all your source code up to the large language model it's simply too big and so while GitHub co-pilot does a really good job it only has a partial view of your world and that can be quite limiting so we remove that limit we've added a brand new workspace command here that allows co-pilot to search your entire project and it does this all on your local machine we get back an answer that shows us everywhere login might be implemented which is quite a few places and this is how most real world projects are functionality is just rarely contained all in one file but with the new works space command GitHub co-pilot now knows about your whole project and can give you holistic answers and in addition to knowing about your whole project all chat in GitHub co-pilot is now handled by gp4 okay so I think this is what I'm looking for for this login button the Moto login component and it even tells me that there's Twitter login there so let's click on that to jump directly to that file so in the modal login component I want to add a new button right here below the existing Twitter button there's a lot of markup here so I'm not sure exactly what I need and what I don't so what I'm going to do is open up the quick chat here with command and shift I or control shift I and that lets us jump right into a chat window without having to go back and forth to the sidebar and I'm going to ask it for a new login button okay nice it's given us a button but for GitHub let's just go ahead and copy this code in and then we'll iterate iteration is key to success with co-pilot so let's open the inline chat here and tell it to make this a Facebook button instead and here the changes comes streaming in in real time so you can watch what co-pilot is writing as it writes it and it gives us a Facebook button now part of the magic of co-pilot has always been its ability to anticipate what you're going to do next so for instance I need a Facebook URL here which is gotten from the configuration file and it automatically writes that code for me but even crazier than this is that if I go down to the CSS and I ask for a new style for that Facebook button it knows what color to make that button it knows the color of the Facebook logo that's nuts now how do I run this I assume the instructions are in the read me which I could open and ask co-pilot about but co-pilot now let you specify context for your chat including specific files so I'm going to use the pound file command here and select the read me and then ask the question about how I run this app and I will just take this serve command and select run in terminal here and run it now when I do this I get an error and it's cryptic something about GBC I have no idea what that is but you'll notice there is a new co-pilot icon that you'll see in a lot of places in vs code it looks like these little sparkles so keep your eyes out for it now when we click on this co-pilot looks at the last terminal command and output and gives us an answer about GBC and we have options one of them is to upgrade our system which it does not recommend but the other one is to use a different version of node and as it turns out I already have NVM installed and I'm using node 18 so let's take this suggestion and change that to node 10 and problem solved now the project builds and this new button it looks great I just want to tweak it a tad but we know know that typing messages to AI like chat GPT can feel laborious after a while especially if you're doing a lot of it the whole point of coding is to move faster with shortcuts not type everything that's in your brain right but how do you do this with an AI there is a brand new extension called vs code speech which provides speech to text support in vs code and it means that we can quite literally talk to co-pilot so watch me bring up the inline chat here and ask it for a new class with some margin and some drop shadow and then I'm even going to ask it to add that class to the buttons automatically check this out create a new class which adds some margin and a subtle drop shadow and then add this class to the two login buttons in the HTML above co-pilot creates the new class and it adds that class to the buttons in the markup in both buttons at the correct place all right my button looks great and I'm ready to commit this now commit messages are notoriously tedious to write but since co-pilot is your pair programmer it knows what we've been working on so there's a co-pilot button right here the sparkles in the commit box and co-pilot will automatically write a good commit message for us and if that doesn't blow your mind when we create the pr for this feature why write a description when co-pilot is perfectly capable of doing that as well and all of this is available in co-pilot today you can use it today all the links you need are in the video description below and as always happy [Music] coding
Info
Channel: Visual Studio Code
Views: 366,814
Rating: undefined out of 5
Keywords: vscode, visual studio code, vs code
Id: SZVCJRUADc4
Channel Id: undefined
Length: 6min 25sec (385 seconds)
Published: Mon Dec 04 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.