getcursor / cursor

The AI Code Editor
https://cursor.com
23.32k stars 1.48k forks source link

Edit mode fills files with garbage #1103

Open JamesGreen31 opened 9 months ago

JamesGreen31 commented 9 months ago

1) If you can, please include a screenshot of your problem I am not mucking up my html files for this issue again. It is super easy to reproduce.

2) Please include the name of your operating system win 11 pro

3) If you can, steps to reproduce are super helpful I am am editing HTML files and when I tell interpreter to edit a certain section as a follow up or even in general, it will basically fill the document with copies of what is being done until it is too large to process.

arvid220u commented 9 months ago

Thanks for the report! Does this only happen on interpreter mode, or also in normal chat?

Interpreter mode is still in beta and will have a decent number of bugs — please keep reporting and we will fix!

arvid220u commented 9 months ago

Also, if anyone else is having the same issue and happens to have a screenshot, it would be super helpful for debugging :)

bweinlich-wps commented 9 months ago

I don't have a screenshot at hand right now, but I can describe in more detail when this happens:

  1. I describe my task for Cursor with Interpreter Mode enabled
  2. I get (a pretty good) solution suggested for my problem with some change suggestions on different files (but the button to apply does not appear yet)
  3. I prompt "Do it!"
  4. The cursor starts to edit the first file. This can take quite a long time, especially at the end a popup "Organizing Import" appears for a very long time (I thought I had disabled this save action - maybe it comes from the Jupyter extension?)
  5. In the end, the edited file is broken. I had two strange cases here: Once, only blank lines were inserted and no code. In the other cases, the desired code was inserted but in addition the existing code was duplicated / concatenated about 20 times in a row. So I had to toll back und manually copy the proposed code (or use the "Apply" feature)
JamesGreen31 commented 9 months ago

I have a possible solution. If you instruct it to use the native python open and edit abilities it doesn't haev an issue. Apparently, the ide.open and ide.edit seem to be causing the issues.

If you tell it to write the files using python native libs it works.

I do want to add that it is much smarter in interpreter mode as well, at least thats how it feels. Good idea with this feature.

MeDott29 commented 8 months ago

I have a possible solution. If you instruct it to use the native python open and edit abilities it doesn't haev an issue. Apparently, the ide.open and ide.edit seem to be causing the issues.

If you tell it to write the files using python native libs it works.

I do want to add that it is much smarter in interpreter mode as well, at least thats how it feels. Good idea with this feature.

like this? image

what do you think could make it smarter in interpreter mode?