
In this video, we dive into GitHub Copilot Chat in VS Code, exploring its powerful capabilities and unique features. Join me to understand how this tool works and its potential to enhance your programming workflow. We discuss limitations, provide insights, and help you determine if it's worth incorporating into your development process. Stay tuned for a comprehensive overview of GitHub Copilot Chat!
--- type: transcript date: 2023-05-30 youtube_id: Bp73PR_3Fr0 --- # Transcript: GitHub Copilot Chat in today's video I'm going to be showing you GitHub copilot chat and its capabilities so by the end of the video hopefully you'll have an understanding on how the tool Works its unique features and also some of its limitations so you'll have a better Insight on whether it's something that's worth incorporating into your programming workflow so to begin one thing that I want to note is currently GitHub copilot chat is behind a waitlist so if you want access to GitHub copilot chat first make sure you have an active subscription to GitHub co-pilot then head over to this URL here github.com GitHub copilot slash Chat waitlist sign up and join make sure to join that list if you'd like access to this so there's no firm date on when this will be out hopefully I'd imagine by the end of the year it will be rolled out across the board to any paying GitHub users but just so you know it is currently behind a waitlist so it took me about one to two months or so to get access and I just got access to this last week so I've been playing around with this ever since so another thing to note is there are some other options that you can request access for for some other features that they're working on so co-pilot for pull requests or co-pilot for dogs if you want to have a look at GitHub next.com you can go and see some of the things that they have in their Pipeline and if you'd like to experiment with one of them and get on a wait list go ahead and request access there so I'm going to be showing you GitHub copilot chat in vs code Insider's Edition so the reason why I'm using Insider editions is that's what they told me to do within the instructions so I did try and use this within my regular vs code I did see the extension was there but it didn't work as it does in the Insiders Edition so even though I have everything set up on my normal vs code I will be using the vs code insiders Edition for this so the first thing to note is once you have it installed you'll have this chat window here and one thing to note you do have to have the GitHub copilot installed this is a dependency so without GitHub copilot you won't be able to access the features so make sure you have it installed log in do all that good stuff to make sure that it works so once you have it set up you'll have this interface here and right off the bat you do have the slash command so as it shows right in that prompt box so there's seven slash commands so explain is pretty self-explanatory if you just click enter you can see it will go ahead and explain the bit of code for you so pretty self-explanatory I won't go through demonstrating all of these but just to sort of run through what they all are so EXT that gives you the ability to write extensions within vs code so if you're interested in extension development that can be helpful for you fix is self-explanatory so if you have a bug or a typo or some issue within your code that you're looking to have resolved highlight it click fix and run that command help self-explanatory but one thing to note with help I will show you this one it is super helpful when you get this plug-in you can sort of get a sense on what you can do with it what you can't do and definitely something worth looking into when you first got the the the extension so tests if you'd like to generate unit tests for your functions or applications that's there's a command in there for that the vs code another cool thing with uh this extension is it has the context of vs code itself so if you have any questions on Where to find something or you know how do I add a particular feature or something along those lines or a particular setting where do I find that you put in your command so let's say where is the settings object in vs code so you could have done this within the command prompt like you know like you're used to in vs code but this also gives you the ability to click options and it will route you to the particular place within vs code so if you want to see okay here's the Json option for it you can just click you'll have that prompt come up uh you know as if you were writing it and then you click you can click enter and then see it there so super helpful if you're looking to you know change a view maybe or do something like that configure your settings it's all right there so handy to have that built in for sure so another thing is just the clear command so clear as you might expect you type clear and it will clear your chat window so those are those are sort of some housekeeping things but now when you're actually using it within a programming context let's just say write me a more efficient version of this function so you see I'm not putting anything within the code that I have here on the right pane into the chat window it has that contact so if you have the window open it will be able to understand the contacts now one thing that I haven't tested too much are on particularly long files so this might be more relevant for you know if you're working on something within production or you have something that has you know there's just a you know a a sizable amount of code it might struggle with the context of it if it's you know an incredibly large code base or workspace that you're working in but like I mentioned I haven't tested that too much myself I've been using little cases like this just trying to see and flesh out what it can do and can't do so one thing that I thought was neat with this is it will also give you suggestions that you can just simply click similar to that vs code functionality so if you just click this you can say okay can you explain how a hash table works in the twosome function so maybe you're practicing for a whiteboarding session or or something along those lines and you're learning different algorithms and different structures on you know like how to implement your code uh this can be a perfect tutor for you you know it can be something that's within your code editor you know you can try and write your functions out and then if you run into a blocker maybe you can run the fix command and see okay that fixed it but then maybe you don't understand what exactly is happening there so you can have it explain it or you know go back and forth or ask the time complexity so you can sort of imagine how you could use this in an interview case but there's a lot of other ways that you can use this as you might imagine so just off the bat so just with this simple example so I have my Brute Force solution of twosome here and if I want to implement my new version here there's a couple options that I have here so one thing to note with this icon here so it's insert at cursor so I think a lot of people when they first click this they're playing around with this and they just click this button without having the tool tip come up they might expect that it would just have the you know know-it-all to actually replace the function but this is replace at cursor so it doesn't quite have that ability to just you know you uh put in your your code on you know on the right hand window here and then on the left you start to have a conversation like fix this fix this you still have to make sure you target where you want it and whatnot so just to sort of demonstrate at that so see I have my cursor here if I just bring it down here you can have it down there now while I'm on this I'm just going to close the window for a moment and bring this up so my favorite feature of uh GitHub called pilot chat is the ability to have the prompt window in line so what do I mean by that so say if I wanted to have that same question or or query rather of you know it make my function more efficient I could do that right within line so on Mac if you click command I or on Windows or Linux I believe it's control I you can have this prompt window come up so if I just say make this perform better we'll give it a moment now the thing I like about this view is it gives me a diff so I can see exactly what it's removing and replacing so you can see here largely what it's replacing is the nested for Loop and instead it's adding uh a hash object and then it's doing the necessary check for the hash map there so if I want to accept it I just click click command enter and then there we go I have a more performant piece of code there so I love that because it's you know I have the keyboarding or Keem binding rather I just hit command I write in what I want and then command enter to accept or escape to reject so I think personally I'm going to be using this view a whole lot more than this View I think it is probably the least resistance that I've experienced when leveraging an llm so just to sort of talk on Resistance so um you might have had the experience of say you're working with Chad gbt and you're copying things back and forth say from the chat GPT window into vs code and then you might do some edits and then you might bring it back over to chatgpt so the thing with that obviously it causes a lot of friction because you have to remember that any tweaks you make within your code editor that llm prompt window doesn't have all that context so you have to always be mindful of updating it and it's really just a pain right you're copying it back and forth whereas this it's right there it has your files it has your workspace and it has the environment that you want to work in so that's why I think this is pretty pretty amazing so just a few other housekeeping things here I'm not going to go through building out like an application or anything like that but just really show you some of the the the use cases that I found useful and you can sort of extrapolate for yourself uh you know how it could be applicable in what you do day to day and how it can improve what you want to do so another thing to note is you do have the saved history here so if you have uh or you if you want to save the chat history you do have that built in similar to chat GPT you have your history on the left hand side there and you can um you know have your your child history that you can reference reference back into so another thing you can open it within an editor view so if you don't like that side pane you can have it within here just within another tab in your vs code so that might be a more useful you know more useful maybe if it's you know you really want to have a conversation with it rather than just having it pop in and out or maybe if you're really trying to figure out a piece of code or or what have you so if I bring this back and close this out other things so we can open it in the editor and then we can clear it from here so we went through the slash commands now one of the things that I wanted to show you was now I'm actually going to open up an editor one more time here and one thing to note actually so there are it's still experimental so you will get errors like this so it's good that one actually came up so it's not uh perfectly Polished um and there are some limitations which I am going to touch on so this being one of them and actually while this uh came up if we just touch on limitations now so one thing that I've noticed as a limitation which isn't necessarily a gripe on GitHub co-pilot chat but just llms in particular for the context of coding is it doesn't know the most recent and relevant information that you might be looking for so an example of that is so say you're a JavaScript or node.js developer and you're used to relying on some libraries say some npm libraries now the thing with that is say if you wanted to use a new library like Lang chain it doesn't have the contact so if you're asking questions on okay I want to start a uh Lang chain application and I want it to be a you know an agent that does this that and the other thing it won't know that and it can also come up in other situations of say there's a library where before the model was trained and to now there were breaking changes between now and then it might give you suggestions that aren't right or will cause errors so just to be mindful of that if you you are using this and you do have a lot of external libraries or if you're trying to build an application with external libraries and there have been breaking changes or things like that it can become an issue so and also around that sometimes you will see hallucinations if you're really really trying to push the limits on this and have it like you know scaffold out like an entire application for you you can run into some issues but for things like you know fixes and tweaks and improvements and refactoring I think it does a really excellent job so since this pane isn't working right now I'll actually just demonstrate it here so if you look in my workspace here I have one file I have an index.js and that's it in my directory now the cool thing with copilot chat is you can have it answer questions that you might have otherwise you know been Googling for stack overflowing for for say if you wanted to have a terminal command so let's say an example of I want to create a handful of files in the terminal what's the command to create create oh create them and let's just say I want a indexed HTML style CSS and script.js so if I click enter here you can see okay you use the touch command so it gives you that response but similar to the code functionality where you can push it in at the cursor or copy it you actually have the ability to run it in the terminal so if you simply click run in terminal you'll see okay now you have that within the terminal and you can just go ahead and run that so now that I've ran that you'll see okay now we have a handful of files here from our terminal so that's just a simple example but you can imagine if maybe there's something from the terminal that you you know you need and you know you you really have to reference um you know another resource like if you're trying to like recursively crawl a directory and do this that and the other thing what's the command to do that this is going to be an excellent tool for stuff like that so I think a lot of people have been looking for a tool that integrates llms within the terminal and while this isn't directly in the terminal it's a pretty nice uh you know complementary piece to terminal commands so I just wanted to point that out as well so just minor things to point out from here so there is the ability to uh you know show that this is a good answer or a bad answer so I'm sure the GitHub team would definitely appreciate that if you you know you rate your answers if you're willing to do that if not obviously not a big deal and then in terms of any other features I'm just looking at my notes Here it does seem like they're using a GPT 3.5 and not four yet I believe four is going to come out when they release GitHub copilot X which similar there isn't a firm date as to when that will be rolling out to the masses yet so that's pretty much it there are some other key Bindings that you can run through I'm not going to run through these here I ran through the main one you know just having that command I I think is going to be huge for developers that leverage this in vs code it's you know it's a huge feature that uh you know I'm going to be using day to day it's similar to there was a a code editor that gained a significant amount of popularity all of a sudden called cursor on GitHub on yes GitHub and that code editor one of its uh core features was exactly that functionality is have a key binding bring up a prompt and then based on that prompt you can see the diff and you know it's a very similar experience to that what I demonstrated earlier on so if you found this video useful please like comment share and subscribe if I get access to any other GitHub co-pilot features or waitlist that I'm on I'll make sure to make a video and do a little overview like this for you and yeah if you have any questions on what you'd like to see demonstrated or or what it works well or not well in just let me know in the comments below but otherwise yeah hit subscribe and I'll see in the next one
Technical content at the intersection of AI and development. Building with AI agents, Claude Code, and modern dev tools - then showing you exactly how it works.
Weekly deep dives on AI agents, coding tools, and building with LLMs - delivered to your inbox.
Free forever. No spam.
Subscribe FreeNew tutorials, open-source projects, and deep dives on coding agents - delivered weekly.