-
Notifications
You must be signed in to change notification settings - Fork 2.9k
fix intellij extension create file failed #6000
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Your cubic subscription is currently inactive. Please reactivate your subscription to receive AI reviews and use cubic. |
✅ Deploy Preview for continuedev canceled.
|
All contributors have signed the CLA ✍️ ✅ |
I have read the CLA Document and I hereby sign the CLA |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@G81192 can you provide more information about this approach? I'm thinking maybe it shouldn't be called "getOrOpen" if the create functionality is added. Maybe we could call it getOrCreate or something, or make the flow more clear. I want to make sure we're not creating files when we shouldn't
@RomneyDa Thank you for the reply. The issue I'm encountering is that, with the current unmodified code, when I try to create a new file generated by the LLM by clicking create file, nothing happens. Instead, the file currently open in the IDEA window gets modified. After looking into the code, I found that the getOrOpenEditor method returns the currently selected file as the editor when the target file does not exist. However, in my case, I need to create a new file — and since it doesn’t exist yet, this results in an error.
This PR is intended to fix this issue. If anything is unclear, I’m happy to provide more details. |
Hey! Just wondering if there's anything holding up the merge — happy to make changes if needed! |
I would +1 Dallin's feedback, I think the existing method should be left as is and instead we create the file in https://github.com/continuedev/continue/blob/main/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/ApplyToFileHandler.kt#L172 when we realize it doesnt exist. I don't think we always want the side effect of creating a new file in |
Description
[ What changed? Feel free to be brief. ]
Checklist
Screenshots
[ For visual changes, include screenshots. Screen recordings are particularly helpful, and appreciated! ]
Tests
[ What tests were added or updated to ensure the changes work as expected? ]
fix intellij extension create file failed for this issue #5999