Apply does not work for me

Hello. I am using Cursor. When I ask the AI a question in the chat and press the Apply button, it doesn’t apply. Even in files where I haven’t written any code, it doesn’t apply. Is there any solution for this?

I am asking the AI questions in Japanese. I haven’t registered for a paid plan or API.

What version of Cursor are you using? (see Help > About)

Are you using the chat in the chat panel (Ctrl + L)?

Attached are screenshots of what I see in the Ctrl +L panel.

Apply seems to add the diff to the file, and then I need to click to accept it.

Prompt and Response and Apply

Accept

Thank you for your replaying.

-The version of my Cursor
Version: 0.37.1
VSCode Version: 1.89.1
Commit: bee043c1bb0095dab94043787985ccfc7cc38e50
Date: 2024-07-14T03:18:35.590Z
Electron: 28.2.8
ElectronBuildId: undefined
Chromium: 120.0.6099.291
Node.js: 18.18.2
V8: 12.0.267.19-electron.0
OS: Windows_NT x64 10.0.22631

-I’m using chat panel.
Until now, the Apply button just didn’t respond when I pressed it, but after closing and reopening the Chat, the Apply button that appears above the code doesn’t appear anymore.
The AI copilot works within the code.

I will attach the screenshots. Is there ant solution for this problem?

This is what I tried.

Hopefully it will help in troubleshooting.

Scenario 01:

  • Ctrl + L
  • FIle is open
  • Prompt with current file as context
  • Receive Response
  • Don’t Apply
  • Close
  • Re-open
  • Apply button is still visible

Scenario 02:

  • Ctrl + L
  • File is open
  • Prompt with current file as context
  • Receive Response
  • Apply
  • Close
  • Re-open
  • Apply button is still visible

Scenario 03:

  • Ctrl + L
  • File is not open
  • Prompt with no context
  • Receive Response
  • Things are different…

You seem to be working with the built in tutorial files?

Maybe there is something buggy with them.

Perhaps create a new folder somewhere else and start playing around in there?

1 Like

The Apply button is not compatible with all models. Try the operation with GPT-4 family models or Claude 3.5 Sonnet, among others.
Check if the file name displayed in the code block of the AI chatbox matches the name of the currently open file.

Thank you for many solutions.
I tried to make a new file in Desktop and use Chat.
But, the error occurred.
I will attach the screenshots.
Also, I’m using GPT4-o

Sorry to hear you are still having difficulty getting it up and running.

Perhaps create a folder in your Documents folder named something like MyCursorPlayground.

Add some files in there.

In Cursor, click on File > Open Folder and select MyCursorPlayground.

Now, instead of seeing .cursor-tutor in your Cursor sidebar, you will see MyCursorPlayground and its contents.

Double click the files in the sidebar to open them in the editor area.

Hopefully Cursor will start playing nicely for you then and you can start testing out its features more.

Ctrl + L brings up the Cursor Chat in a side panel.

Ctrl + K can be used within the Editor to generate code - highlight relevant code first to pass it in as context to your prompt.

Ctrl + K can be used within the Terminal to generate terminal commands.

Ctrl + I can be used within the Editor to do multi-file editing and creation, eg you can say something like:

Create a folder called MyFirstTestWebsite that has CSS and JS folder and an index.html file. Make the website have motivational colors and quotes throughout it, and add some fun, snappy JavaScript functionality.

It will then suggest new folders, files and code to be created, and you can click Accept All to accept all the suggestions.

Here is a screenshot of the site the above prompt created :slight_smile: .

Thank you for the wonderful assistance.
As suggested, when I created a new folder in the document and made a file there, it worked perfectly.
Thank you very much to everyone who thought of various solutions.

2 Likes

Apply has been an absolute travesty at times. You must be careful with it.

It will delete entire blocks of working code randomly. You must go through whatever changes it is suggesting and review it line by line.

Other times it will delete small bits of relevant code and its not until you get to production you wonder why something is missing.

“Apply” is very very unstable and needs alot of work. I would use it sparingly for apps that are in production

2 Likes