Now, just as with GitHub Copilot, when using cursor, you can also add comments to basically
add a prompt, you could say, for this smart suggestion completion feature.
So here I could say, read user input and store it in a file.
Ask the user for more input until they're done.
Now it suggests even more comments here for me, wow, lots of comments, and it now got
stuck here in a mode where it just adds more and more comments, actually the same comment
over and over again.
And that is something that can also happen with AI.
So it's good that it happened here.
Might not happen for you, but AI can get stuck.
It can get stuck with generating something you don't want.
Now what's the way out of that?
Well, the way out of that is to simply write some code where you overwrite whatever the
AI is suggesting to you here.
So for example, here I know that I'm interested in some user input, so I'll start writing
some actual code, and now cursor suggests meaningful code again, which makes sense.
So it wants to get the user input, append that to my output text file, and so on.
Though it's not asking for more input until it's done, so what we could do, well, now
it's suggesting to add a while loop, and it indented this code here as well.
So we can do that, and now we would have a way of adding more input until we quit the
program or until we enter done, for example, to break out of it, or we enter nothing if
that's our exit signal, whatever we want to do.
So again, cursor doing its job here.
You just always have to keep in mind that you're the developer and that you can control
and steer the AI.
Don't trust it blindly.
Don't get mad because you're stuck in some code generation you don't want, like with
that wall of comments before.
Instead, be smart, write your own code so that the AI can again pick up on that code
and make more smart suggestions.
That's the most efficient way of using it, and as you can see, the cursor AI is really
powerful, really tries to help you a lot, but still, you need to control it here and
there.