AI Assistant- Changes could not be applied

Can anyone help with this error. I tried using the AI to generate scroll-to-top on my page, and i got the error below. Im using Claude Sonnet. Changes to the js,css and index files were created but when i click apply all, i get the error message below.

This can happen if the assistant’s proposed changes fail to match your page. In that case you can press the retry icon under the reply, so it tries again (the one on the left in this image):

If it still fails, copy the reply by clicking the right icon, and send it to us as a bug report here.

The problem is that if you’re not specific in defining what you want, the AI ​​will try to do what you asked without really understanding your needs. It’s probably something simple you can solve with just classes. That’s one way to do what you want; perhaps with a little CSS you can adapt it to your requirements. But the point is, don’t use AI to create .js files because it could be the end of your website. I’m not against using AI, but to prevent problems, it’s better to limit it now, while we’re free. Once AI invades Bootstrap Studio, creative freedom will be limited because it could even moderate the content we create without our supervision. Freedom has a price, and if preserving it requires remaining archaic and conservative, we’ll do it.

<div class="position-absolute bottom-0 end-0"><a class="btn btn-primary" role="button" href="#<section-ID>">Button</a></div>