Maybe I’ve missed this, but can’t find it in the app or any info on it here yet.
Is there a way to prompt the agent to create new files in a project? Right now, I’m only able to get it to suggest the file contents in the chat. Given how ‘New AI project…’ works it seems like having the agent create and update files should be possible from the chat too, right?
Not production support for this at the moment, other than using Cmd+K to generate a file from scratch. Curious to learn more about what you’d use this for. Do you have an example?
Of course GPT-4 can be a big help in working through ideas outside of / along side code – for example brainstorming and refining specs or thinking through the necessary elements (and related code) for an app.
Chat helps navigate and connect these ideas outside of a single ‘create this’ command.
Similar to how ‘New AI project’ self-queries steps and creates/edits files, I’d like to be able to chat through ideas and then at specific points ask Cursor to create or update specific files based on the current context in the chat.
I created a basic slots game on the flipper zero and the agent created a new application directory with the fap, art assets and C code and it worked on the flipper flawlessly the first time. Trying to figure out how to re-create this but I happened to stumble on functionality that doesn’t seem prod ready atm.
I run into this use case frequently. Eg create a modal for updating billing information. I don’t want the modal to be in the same file, but rather created in a different file and controlled in the current file. Another example: Callout to this endpoint and make the endpoint do x. Would be very powerful if I didn’t have to create the file for the endpoint in between.
At times, I need to break multiple functions (in one file) into separate files. This feature would be very useful to me. Save quite a bit of copypasta.
Please add this feature. It is currently the one thing holding me back from using Cursor full time in development. If you need more use cases:
I ask to refactor a function by extracting it into a separate utils file. It changes the current file and tells me to create that utils file manually and place the function in there. It feels like it should be able to do this easily by iteself.
I ask to translate a react component using i18n. It replaces all text with translation function but then tells me to create the JSON files with the translations manually.
Etc etc. Many more other cases where creating a new file is required.
Sorry, not sure if I understand - ctrl + i does not appear to do anything in the chat context. Within the code context it just seems to do regular suggestions (like ctrl + space).
I was about to create a new thread with the same original question as I still cannot find a way for the agent to automatically create files. Specifically for a scenario like this, where I have asked it to create a new component:
This is one of the big features that would have me much more convinced to keep my subscription.
The agent being able to create the new files it suggests (e.g. new components) it would be another productivity boost.
I would like to apply all changes at once in all files, and the agent being able to create the necessary file structure. It means I can try all changes right away (without me manually creating the files) or discard them.
Composer (Ctrl + I) is the feature to use for multi-file creation and editing.
Here is a simple example of how it can be used:
Note, the screenshots in that post are from a few versions ago, so it looks a bit different, but the main functionality is essentially the same - eg, tell it to create a simple html site with js and css that tells funny pirate jokes and has a color scheme inspired by the timber in wooden ships, and it will generate all the files for you .
My example is that we have a contract first repo to house our OpenApi contract.
I asked cursor “command + i” pasted the combined contract and asked it to split it into files. It created new files and named them and included the ref.