I got a slight problem with the code that was generated.
It's not following the code style I'd like to have, and
why would it? I didn't tell the AI about it.
So, of course, I could do so, and therefore, I can go
back to my past messages either here in that sidebar or
in the Agents tab as well. So I can edit this and, for
example, say, "Any functions you create should use the
and it should only use arrow functions for anonymous functions and closures." Now,
in case you don't know JavaScript, which is totally fine, this here is a
function, a function written in this arrow function
syntax. And that is fine, you can use that, but there is another
way of writing functions as well, using a function keyword, and that's the
style I'd like to use. Now, here the AI did not use it out of
the box, and in my experience for React, most of the time it doesn't, but it
is a style I would like to use. So, of course, I can add
here and I can resend that message.
And what will happen if I do so? Keep in mind, we're editing an existing
message. Well, you can always go back and you
cannot just go back to edit it. You can, in
general, go back to old messages if you're not editing it by
clicking on this Back button. And what this will do is it will
revert all the changes that were made after this message
was sent. So even without using version control,
undo the changes even if you already accepted them by clicking
on this Back button, this Revert button here.
Alternatively, if you know that you wanna revert and edit,
edit the message as I'm doing it here and resend it.
And then here, it'll ask me if I wanna submit this and revert those
changes. And I can, of course, also tick this to not be asked
again, and I can then either continue without
it will kind of re-execute my instructions, but it will
use the updated code as a baseline.
I can cancel, of course, or I can continue and revert, so
undo those changes and redo them based on the updated
instructions, and that is what I'll do here.
So since I was in Plan mode, it will now create a new plan again
first before it changes anything.
And please note that this time, I'm doing all of
mode, and therefore, here I can take a look at this updated
now where it clearly specifies that the function keyword should
be used. And that plan looks good to me, so I'll build
this. Again, still in this Agent's
tab, you can also switch whilst it's building,
You don't have to stay there, and you could start another agent
would have another task that should be completed.
I don't have such a task here though.
So now it's done. Again, I can click Review to review
all those changes, and I can already see this time these
in the way I want them to be created.
And this time, it even thought about adding this type.
Keep in mind, I reverted all the changes, so this is not there because I
changed it before, but because the AI did it this time,
example for the fact that the AI still is
kind of random or still acts kind of random, which is why
it's so important to give it clear instructions.
Again, even without accepting, we can already test those
changes, and as you see, the UI looks a bit different now because
was all
recreated.
But it still works fine, so
I'll keep that and accept that.