WEBVTT

00:00:00.080 --> 00:00:03.240
I got a slight problem with the code
that was generated.

00:00:03.260 --> 00:00:07.160
It's not following the code style I'd like
to have, and

00:00:07.640 --> 00:00:10.520
why would it?
I didn't tell the AI about it.

00:00:11.260 --> 00:00:15.040
So, of course, I could do so,
and therefore, I can go

00:00:15.100 --> 00:00:19.000
back to my past messages either here in
that sidebar or

00:00:19.040 --> 00:00:22.680
in the Agents tab as well.
So I can edit this and, for

00:00:22.720 --> 00:00:26.340
example, say,
"Any functions you create should use the

00:00:27.040 --> 00:00:31.010
and it should only use arrow functions for
anonymous functions and closures." Now,

00:00:31.040 --> 00:00:34.700
in case you don't know JavaScript,
which is totally fine, this here is a

00:00:34.740 --> 00:00:38.360
function,
a function written in this arrow function

00:00:38.400 --> 00:00:42.300
syntax. And that is fine,
you can use that, but there is another

00:00:42.340 --> 00:00:45.990
way of writing functions as well,
using a function keyword, and that's the

00:00:46.080 --> 00:00:50.070
style I'd like to use. Now,
here the AI did not use it out of

00:00:50.120 --> 00:00:54.089
the box, and in my experience for React,
most of the time it doesn't, but it

00:00:54.120 --> 00:00:57.710
is a style I would like to use. So,
of course, I can add

00:00:57.760 --> 00:00:59.949
here and I can resend that message.

00:00:59.949 --> 00:01:03.780
And what will happen if I do so?
Keep in mind, we're editing an existing

00:01:03.800 --> 00:01:07.750
message. Well, you can always go back
and you

00:01:07.780 --> 00:01:11.300
cannot just go back to edit it. You can,
in

00:01:11.380 --> 00:01:15.230
general, go back to old messages
if you're not editing it by

00:01:15.260 --> 00:01:18.730
clicking on this Back button.
And what this will do is it will

00:01:18.760 --> 00:01:22.560
revert all the changes that
were made after this message

00:01:22.640 --> 00:01:26.390
was sent.
So even without using version control,

00:01:26.480 --> 00:01:30.360
undo the changes even
if you already accepted them by clicking

00:01:30.400 --> 00:01:33.740
on this Back button,
this Revert button here.

00:01:33.780 --> 00:01:37.520
Alternatively, if you know
that you wanna revert and edit,

00:01:37.960 --> 00:01:41.520
edit the message as I'm doing it here
and resend it.

00:01:41.540 --> 00:01:45.300
And then here, it'll ask me
if I wanna submit this and revert those

00:01:45.340 --> 00:01:49.080
changes. And I can, of course,
also tick this to not be asked

00:01:49.120 --> 00:01:52.760
again,
and I can then either continue without

00:01:53.300 --> 00:01:57.080
it will kind of re-execute my
instructions, but it will

00:01:57.240 --> 00:02:00.160
use the updated code as a baseline.

00:02:00.200 --> 00:02:03.700
I can cancel, of course,
or I can continue and revert, so

00:02:03.960 --> 00:02:07.660
undo those changes
and redo them based on the updated

00:02:07.700 --> 00:02:10.570
instructions, and that
is what I'll do here.

00:02:12.440 --> 00:02:16.360
So since I was in Plan mode,
it will now create a new plan again

00:02:16.400 --> 00:02:19.940
first before it changes anything.

00:02:19.960 --> 00:02:23.940
And please note that this time,
I'm doing all of

00:02:23.980 --> 00:02:27.680
mode, and therefore,
here I can take a look at this updated

00:02:27.720 --> 00:02:31.620
now where it clearly specifies
that the function keyword should

00:02:31.660 --> 00:02:35.220
be used. And that plan looks good to me,
so I'll build

00:02:35.230 --> 00:02:38.800
this. Again, still in this Agent's

00:02:38.840 --> 00:02:42.460
tab,
you can also switch whilst it's building,

00:02:42.480 --> 00:02:46.400
You don't have to stay there,
and you could start another agent

00:02:46.480 --> 00:02:49.120
would have another task
that should be completed.

00:02:49.320 --> 00:02:52.300
I don't have such a task here though.

00:02:52.440 --> 00:02:56.260
So now it's done. Again,
I can click Review to review

00:02:56.420 --> 00:03:00.280
all those changes,
and I can already see this time these

00:03:00.340 --> 00:03:02.400
in the way I want them to be created.

00:03:02.440 --> 00:03:05.160
And this time,
it even thought about adding this type.

00:03:05.200 --> 00:03:08.900
Keep in mind, I reverted all the changes,
so this is not there because I

00:03:08.960 --> 00:03:12.840
changed it before,
but because the AI did it this time,

00:03:12.900 --> 00:03:16.740
example for the fact that the AI still is

00:03:16.820 --> 00:03:20.730
kind of random or still acts kind of
random, which is why

00:03:20.760 --> 00:03:24.060
it's so important to give it clear
instructions.

00:03:24.100 --> 00:03:27.800
Again, even without accepting,
we can already test those

00:03:27.900 --> 00:03:31.780
changes, and as you see,
the UI looks a bit different now because

00:03:31.840 --> 00:03:32.340
was all

00:03:32.400 --> 00:03:36.080
recreated.

00:03:36.100 --> 00:03:39.800
But it still works fine, so

00:03:39.880 --> 00:03:42.540
I'll keep that and accept that.
