
Can you use ChatGPT in VS Code??
Can you use ChatGPT in VS Code??
A hands-on look at the new GitHub Copilot Chat features coming soon to VS Code.
Sign-up for early access: https://code.visualstudio.com/blogs/2…
#ai #chatgpt #vscode
Content
0.24 -> you've no doubt seen and probably even
2.82 -> used chat GPT an AI that can answer
6.6 -> questions summarize text translate
9.3 -> languages chat with humans and write
12 -> code in this video we're going to take a
14.46 -> first look at the new chat GPT like
16.859 -> experience that's coming soon to vs code
19.02 -> and we're going to see how to use it to
21.779 -> get the most out of it and make it work
23.699 -> for you the new chat functionality is
26.279 -> enabled by the GitHub copilot extension
28.32 -> and for now you'll need to sign up for
30.18 -> the waitlist to get this new experience
31.8 -> Link in the video description once
34.32 -> that's installed and you've signed into
36.42 -> GitHub co-pilot there's a new chat icon
39.48 -> in the activity bar this opens a chat
42.42 -> sidebar that functions very much like
44.579 -> chatgpt with the important difference
47.04 -> that co-pilot knows about your code and
50.399 -> the tabs that you have open you don't
52.44 -> need to copy things in and out of a chat
54.6 -> window and just like chat GPT you can
57.78 -> have a conversation with it about pretty
59.94 -> much anything programming related for
62.28 -> instance we might ask it how to build a
64.32 -> website with node and it gives us some
66.479 -> suggestions but they're quite generic
68.1 -> and Broad just like if you were talking
70.439 -> to a human the more detail you give
72.96 -> co-pilot the better answer you get back
75.36 -> for instance if I ask it to create an
78.6 -> Express app using typescript and View
80.88 -> for the front end it gives me actual
83.46 -> code and the steps that I need to take
85.5 -> to create that app if we click this copy
88.32 -> button we can copy the code if we click
91.14 -> the add to file at cursor button it adds
94.32 -> the code to the file at the cursor now
97.32 -> I've been a developer for a while and I
99.479 -> know a thing or two about Express and
100.86 -> I've got a mostly completed Express app
102.78 -> here I know that I need routes views and
105.9 -> models it's still up to me to structure
108.06 -> this app correctly and I'm not always a
109.92 -> hundred percent sure that I'm doing this
111.659 -> and that causes a feeling of resistance
114.24 -> in me towards this whole project but
116.88 -> copilot is your pair programmer so I can
120 -> ask copilot what it would recommend and
122.82 -> I see that it's saying that I should
123.96 -> have a folder for controllers that
125.46 -> contains all of my route logic
127.74 -> interesting I kind of like this nice
130.2 -> pattern and separation of concerns I
132.3 -> might implement this chat in the sidebar
134.459 -> is great for longer conversations and
136.44 -> bootstrapping code but the whole point
138.42 -> of putting the chat in vs code is to
140.58 -> reduce your context switching and we can
142.92 -> reduce it even further by getting chat
145.14 -> out of the sidebar and into your actual
148.2 -> coding flow so we've added a brand new
150.84 -> inline chat experience that you can open
153.18 -> right from within your code for instance
155.7 -> here in this HTML file I know that I
158.04 -> want to iterate over the to-do's array
160.26 -> but I can never remember what the
162.3 -> template syntax is for that so let's
164.819 -> just ask copilot to do it and it knows
167.459 -> about the CSS framework that I've
169.2 -> included here so it attempts to use
171.18 -> those styles
172.68 -> but I don't like this answer that it's
175.08 -> given me I don't like this table layout
176.94 -> so I'm gonna ask it to use an unordered
179.819 -> list instead iteration is key to using
182.7 -> copilot effectively as you aren't always
184.62 -> going to like the answer that it gives
186.3 -> you so this new inline chat experience
188.58 -> makes it easy to iterate with copilot to
191.58 -> get you to the right place now not only
193.92 -> does copilot know about my code but it
196.2 -> knows about my vs code there are some
199.019 -> special slash commands that you can use
200.879 -> in this box to scope the context for
203.7 -> your chat I can use the slash DS code
206.64 -> command and ask it to attach the
208.44 -> debugger
211.68 -> and it gives me a launch config which is
214.379 -> exactly what vs code needs to do this
216.18 -> and its knowledge of vs code is super
218.94 -> handy for finding things like settings
220.76 -> especially the Obscure ones for instance
224.04 -> if I like the minimap but I don't like
226.44 -> it when I'm writing markdown I can ask
228.599 -> copilot how to disable the minimap while
231.06 -> editing markdown and it gives me the
233.159 -> exact setting that I need
234.84 -> we're working on fine-tuning this
236.879 -> context experience so that you can scope
238.799 -> your conversations and get much more
241.08 -> accurate answers and there are other
243.36 -> slash commands in here as well the
245.819 -> explain command is super handy when you
247.739 -> come across some code that you've never
249.18 -> seen before or you have zero memory of
252 -> writing like when you get assigned an
254.159 -> issue on an app that you haven't touched
255.659 -> in ages or if you're just starting out
258.359 -> in a new language the explain command
260.76 -> will tell you what the code is doing in
262.8 -> this case this is a react component that
264.96 -> conditionally displays content if a user
267.24 -> is logged in that's good to know let's
270.24 -> open the inline chat here and ask it to
272.4 -> document this for the next time I see it
274.8 -> and can't remember what it's doing
277.139 -> we probably need a unit test here as
279.54 -> well so we'll use the slash test command
282 -> to create one and we'll double check the
284.699 -> code before we run it because remember
286.88 -> you are still the pilot copilot is just
290.1 -> here to help the debug command can tell
292.5 -> you why your code isn't working or what
295.32 -> you can do to make your code more robust
297.72 -> and the fix will try to fix this
300.36 -> selected text for me now I may not like
303.479 -> the fix that it gives me but at least it
305.759 -> gives me an idea for how to fix it and
308.4 -> therefore a starting point for my brain
310.32 -> if you want to try out this new chat
312.24 -> experience click the link in the video
313.86 -> description to get on the waitlist now
315.84 -> and to learn more about what we're going
317.82 -> to be doing with Visual Studio code and
320.04 -> AI powered by GitHub Copilot
322.68 -> happy coding
Source: https://www.youtube.com/watch?v=gDJzr9DBKTI