getcursor / cursor

The AI Code Editor
https://cursor.com
25.06k stars 1.56k forks source link

Better handling of non-existent files in AI code suggestions #1623

Open wanguolin opened 3 months ago

wanguolin commented 3 months ago

Is your feature request related to a problem? Please describe. When I ask the AI to suggest code layouts or new features, it often includes code for files that don't exist yet. If I try to apply these suggestions, I get a small notification saying "AI did not predict an origin file for this codeblock." Then, the system tries to dump the code into my current file. It's pretty annoying and messes up my workflow.

Describe the solution you'd like I think it'd be great if we could:

  1. Get a highlighted heads-up when the AI is suggesting code for a new file.
  2. Have some options like:
    • Make the new file and put the code there
    • Guide user manually create the non-existing file
  3. Stop the automatic code dump into my current file.

This way, I'd have more control over where the code goes and wouldn't get surprised by random code appearing in my current file. image

Additional context This becomes a real pain when working on bigger projects or when using AI to help set up new features across multiple files. Fixing this would make the whole AI coding assistant experience much smoother.

aoganesyan commented 2 months ago

having the same issue

stjema commented 1 month ago

and back to continue.dev

lordspace commented 1 month ago

me too. for php and flutter code. it's annoying to have to keep clicking Accept, continue, Apply