WEBVTT

00:00:00.060 --> 00:00:02.080
So let's take a look at this inline chat.

00:00:02.120 --> 00:00:05.960
You can also bring it up with this button
up here or by using the shortcut

00:00:06.000 --> 00:00:09.840
that's shown here.
And the idea behind the inline chat

00:00:09.850 --> 00:00:13.760
that you can highlight a piece of code
and then open that inline chat, for

00:00:13.820 --> 00:00:17.480
example, with the shortcut,
and then you can request code changes

00:00:17.560 --> 00:00:21.420
Like, for example, remove unused variable,
which I obviously could do

00:00:21.440 --> 00:00:25.340
myself, but this is an example. Now,
before we send this by hitting enter

00:00:25.360 --> 00:00:29.070
or using this button,
it's worth noting that here,

00:00:29.070 --> 00:00:30.980
different models, this time for real.

00:00:31.020 --> 00:00:34.900
So you can choose
which AI model will be used for fulfilling

00:00:34.940 --> 00:00:38.720
request,
and you can also provide some context here

00:00:38.780 --> 00:00:42.720
clicking this button. You can,
for example, point at some other

00:00:42.840 --> 00:00:46.740
window or at some files
that should be made aware to

00:00:46.800 --> 00:00:50.190
the AI for this chat,
and a bunch of other things as well.

00:00:50.220 --> 00:00:52.949
But I'll get back to context management
later.

00:00:52.980 --> 00:00:56.050
For this simple change,
we obviously need none of that,

00:00:56.100 --> 00:00:59.940
enter and it does its thing
and removes this variable.

00:00:59.980 --> 00:01:03.020
Or, to be precise,
it doesn't instantly remove it.

00:01:03.040 --> 00:01:06.760
Instead, with all these AI agents
and chats, you get a preview

00:01:06.860 --> 00:01:10.590
of what it wants to do. So here, this
is highlighted in red because it

00:01:10.620 --> 00:01:14.430
wants to delete that.
But you then decide if you wanna keep

00:01:14.460 --> 00:01:18.440
change,
or if you wanna open it in a diff editor

00:01:18.480 --> 00:01:22.140
complex changes. You can also accept
or deny with these buttons

00:01:22.180 --> 00:01:25.640
here.
So this inline chat can be great for

00:01:25.700 --> 00:01:29.600
targeted edits where you know exactly on
which code you wanna work.

00:01:29.660 --> 00:01:33.600
The other kind of chat besides the sidebar
chat that is worth taking

00:01:33.640 --> 00:01:37.580
a look at is this quick chat,
which you can open through that menu

00:01:37.640 --> 00:01:41.530
that shortcut. That quick chat
is really just what it sounds like.

00:01:41.580 --> 00:01:45.500
It's a quick way for you to bring up a
chat bar to, for example, ask

00:01:45.580 --> 00:01:48.260
questions about your code
or request changes.

00:01:49.000 --> 00:01:52.320
So here,
I could request to remove the combined

00:01:52.400 --> 00:01:56.280
function, and again, choose a model
that should do

00:01:56.320 --> 00:02:00.260
that, add context,
and then potentially open that in the

00:02:00.320 --> 00:02:03.060
chat view, so in that sidebar
if I wanted to.

00:02:03.100 --> 00:02:06.960
But I can also just send it here,
and this will now work on

00:02:07.000 --> 00:02:10.860
that file in this case, since the file
was open when I requested this,

00:02:10.979 --> 00:02:13.940
and it will tell me how to make this
change.

00:02:14.000 --> 00:02:17.220
I can then apply this change by hovering
over this code snippet

00:02:17.960 --> 00:02:20.870
and by then clicking this apply to main
button.

00:02:20.880 --> 00:02:24.690
I could also insert this change at my
cursor position,

00:02:24.720 --> 00:02:28.400
which for deleting a function doesn't make
too much sense, but which can be useful

00:02:28.460 --> 00:02:31.540
if you want the DAI to generate additional
code that should be

00:02:31.580 --> 00:02:35.360
inserted. Or you can just copy
that to manually paste it

00:02:35.420 --> 00:02:38.750
in.
You can also insert it into a terminal

00:02:38.780 --> 00:02:42.400
It simply depends on what you ask the AI
to do.

00:02:42.440 --> 00:02:46.410
So here, I can apply it, and then again,
I get this preview here

00:02:47.160 --> 00:02:50.500
and I can decide whether I want to keep
that or undo.

00:02:50.520 --> 00:02:53.790
Now as you saw,
it didn't change the code automatically,

00:02:53.820 --> 00:02:57.760
time where I'm recording this,
and therefore, this quick chat,

00:02:57.800 --> 00:03:01.690
is best if you want to ask a quick
question about your code or how

00:03:01.720 --> 00:03:05.320
to do something. For example,
here I could ask, "What

00:03:05.380 --> 00:03:07.160
does this program

00:03:10.180 --> 00:03:14.140
do?" And obviously that's a super simple
program, so it's not too complex

00:03:14.160 --> 00:03:17.660
to analyze, and I had to enable this

00:03:17.820 --> 00:03:21.020
specific AI model to be available for me
here.

00:03:21.040 --> 00:03:23.280
But then it does explain what this program
does.

00:03:23.320 --> 00:03:26.880
In this case,
it thinks first because I selected a

00:03:26.960 --> 00:03:30.810
model, but then in the end,
it spits out the final response.

00:03:30.840 --> 00:03:34.400
And depending on which model you selected,
you might have gotten the response

00:03:34.440 --> 00:03:38.300
quicker.
So it can be a great tool for explaining

00:03:38.360 --> 00:03:42.160
parts of programs,
or asking any other kind of question for

00:03:42.180 --> 00:03:44.880
just don't wanna leave this editor.
