by w-m · 3y ago · 0 comments
I hope we can get to a point where I can give quick commands to a Copilot-like system to do more complex changes. Changes which traditional refactoring tools balk at. Stuff you would discuss with other humans. Like "this value needs to be calculated once, move the code to the constructor", which then requires code being removed in one method, a member variable being created, and possibly a constructor, and some code being moved there, and perhaps a few changes in method parameter lists.
The jump from single-point edits to multi-point edits is obviously a huge one, not only for the AI part, but also for the UI (being able to understand, accept or modify the changes, for the human). That for me would be truly next level (up from the amazing place where we are already with Copilot), and I can't wait for it to get there.
I find that looking at code and looking at diffs are different mental modes, for lack of a better word. For me, parsing diffs seems to engage a different part in the brain, and is much more exhausting than reading code.
In comparison, reading code while someone makes changes to it seems to stay in the same code-mode. And I don't want to switch back and forth from code-mode to diff-mode all the time.
How about after being prompted, Copilot acts like a remote user in my code base, with its own cursor, changing the code at the speed that ChatGPT currently writes out answers? Perhaps even commenting on what it does next to it. You could still have accept/modify/reject buttons at the code change locations, but they would change the new version, not a diff.
Getting this slightly wrong will of course make you curse the whole thing to hell and back.
You can test the concept on my site https://aidev.codes although I don't have github integration yet.