Feature request: Reviwing AI generaed code before integrating it in project
For human-maintained projects it would be helpful for AI code to live in a staging area until approved by the dev. It is easy enough to see what AI changed, but I have not found good tools to manage the process of inspecting the code it generates and approving it, particularly when the changes are more complex.
Workaround #1: Only ask AI for small contained changes. Drawbacks: not all changes fall in this category; token usage increases as you have to spin up AI over and over instead of providing it with a list of requests.
Workaround #2: Have a totally independent AI copy of the project. Synch both to the repository before any AI requests. Have AI change its copy. Examine the AI proposed modifications by opening a second CLion UI side by side with the one of the “real” project + external diff tool. Migrate changes manually as they pass your quality filter. Drawback: it is very clunky.
EDIT: Right now working on a change that spans 20 files. Workaround #2 is kind of okay in this setting. Claude did mostly well. I'm still on file #3. I did find one meaningful defect. Otherwise small tweaks... early days :)
请先登录再写评论。
This is a problem I have had as well, I often will push my current branch and create a new branch if I think AI will want to make significant changes. Allowing myself to later edit the changes as a PR.
Something automatic along these lines would be useful.
I think this would be great if somehow we were able to integrate it all. Below is two separate instances of CLion – each is a separate source tree of the same project.
The diff tool is just an artifact to aid in communicating within this post. That 3rd window would not exit in the final product.
You could come up with a messaging protocol between the 2 instances of CLion. You connect them and bang! They sync up which file is loaded, scrolling, highlight differences, and allow you to copy from A to B with a click. Because they are full CLion UIs, both A and B have independent context for searches, usages, compilation, running tests, everything.
That is kind of a dream feature to compare codebases!
Proposed feature regarding reviewing and approving the AI changes directly in the chat, there is a YouTrack ticket regarding this, available here: https://youtrack.jetbrains.com/issue/LLM-28167 . Please upvote it to mark it as relevant and to follow the progress of its implementation.
Regards,
JetBrains Support