Apply seems to be broken?

I have noticed on that Apply seems to be broken.
I’m a Pro subscriber and using sonnet-3.5.

Giving composer and image for how an existing React component should look like

Chat does come up with code for the updated UI, but when applying, It duplicates the content (NOT rewrite) of the file. So, now there exist two declarations for every variable, function, etc.

You can see stuff being repeated starting line 389 (I can’t upload more than one image since I’m new here.)

1 Like

I’ve definitely been having some issues with the ‘Apply’ in the last few days (again Pro with sonnet-3.5). Sometimes slowness and timeouts, connection failures, or sometimes the button just doing nothing. Other times there’s been mangling of the code, such as sections being replaced with " # … rest of your code here… ". And over the last 24hrs frequent issues with code blocks not being identified:

Here the text right before the code literally says “In the socketio.js file, add…” and yet the IDE is saying it doesn’t know which file to put the code in. Today almost every time I’ve come to apply something from chat I’m back to manually telling it where to put it, or copying and pasting from chat into the editor. This definitely makes chat less useful, as it’s one of the best things about it when it’s working.

I’ve found myself going back to using ChatGPT web, because I feel less bad about making it regenerate entire script files on every change :slight_smile:

Any chance one of our Cursor staff superstars could take a look at why this might be falling short of its normally great functionality? Thanks.

1 Like

What version of Cursor do you have installed?

Version: 0.40.4
VSCode Version: 1.91.1
Commit: 63dae81aea2c3fc079420fe72578a8eef26ba870
Date: 2024-09-05T02:52:05.660Z
Electron: 29.4.0
ElectronBuildId: undefined
Chromium: 122.0.6261.156
Node.js: 20.9.0
V8: 12.2.281.27-electron.0
OS: Windows_NT x64 10.0.22631

As a temporary solution, you can downgrade to version 0.40.3

https://downloader.cursor.sh/builds/240829epqamqp7h/windows/nsis/x64

1 Like

I’m also on 0.40.4; I’m pretty sure I was seeing some of the same on 0.40.3 as I only upgraded to 0.40.4 this morning in the hope of things improving. The failure to identify the file does seem recent though so may be just 0.40.4. I’ll go back to the previous version and walk back through them if it doesn’t resolve. Thanks @deanrie

1 Like

Possibly stupid question - how did you find the download link? I managed to locate some previous version links via winget-pkgs on github but only for Windows. I’m looking for the Mac ones. Existing forum questions on where to find a list of previous version download links seem to have gone unanswered so far.

Here:

1 Like

I’m having this exact same issue (duplicating code, rather than replacing/rewriting code).

I have a JS file about 680 lines long, when I ask Composer to update some function, it duplicates almost the entire code, leaving me with 1200+ lines of code - but, oddly, it doesn’t seem to duplicate ALL of the code - it stop some ways through.

So, I end up with about 480+lines of code with no changes, and also 600+ lines of old code. It seems to be inserting new code, rather than rewriting code, to make changes. A bunch of duplicated functions, etc …

Version: 0.40.4
VSCode Version: 1.91.1
Commit: 63dae81aea2c3fc079420fe72578a8eef26ba870
Date: 2024-09-05T02:52:05.660Z
Electron: 29.4.0
ElectronBuildId: undefined
Chromium: 122.0.6261.156
Node.js: 20.9.0
V8: 12.2.281.27-electron.0
OS: Windows_NT x64 10.0.22631

Also, I tried uninstalling 0.40.4, then installing 0.40.3, asking composer to make changes again (didn’t work, also duplicated code), then when I relaunched Cursor 0.40.3, it force-updated me back to 0.40.4.

I first noticed this just yesterday. Cursor had been working like a charm until then. Now, I’m back to writing code the ‘old way.’

Same here - started yesterday :cry:

fyi - I have tried changing models (Sonnet, GPT-4o, etc), using Cursor 0.40.3 and 0.40.4 - still having the issue

It seems to be a problem with the Cursor backend.

Same, Luckily I was saving it often… It started a duplication spree like no other. I love Cursor, please please fix the duplication. At first, I could just delete the top part and it would be fine. Now its duplicating like each function as it pleases and even my html templates.

yeah, seeing same from couple hours, output significantly reduced causing broken code.

For the duplication issue, one thing that can lead to it is when the model puts an “// existing code here” comment at the top of the file, see: Hint: one particular circumstance that can lead to duplicated code from chat

I’m at a loss on the can’t-predict-origin-file issue though, it’s not like the model isn’t being clear enough (explicit both in the introductory sentence and the provided code snippet)

1 Like