Here are some chat transcripts that give a flavor of what it’s like to code with AI this way:
My tool is open source, and currently only works if you have a gpt-4 api key.
I wrote up some notes on the first step I made in this direction:
https://github.com/paul-gauthier/aider/blob/main/docs/ctags....
As for the getting a suggestion by writing comments, an "insert from prompt" action perhaps, or just a separate prompt pane/popup/whatever-you-prefer combined with using good ol' copy+paste would suffice.
If you want to know what some code does, just select it & hit a keyboard shortcut (or right click and choose explain from menu).
If you want AI to write code for you, write a comment starting with a specific word, it suggests the implementation and you can choose to accept & replace the comment with it.
You can select code and ask it to explain it to you, or ask it to generate some boilerplate / code and then insert it at your cursor position without adding any comments like you described for prompting the Copilot autocomplete.
It seems okay, but I don't really use vscode that much
- As mentioned in this paper I definitely do not want the AI suggestion crowding out a suggestion generated directly from the type bindings
- I often do want the AI to write an entirely new block of boilerplate. To do this you have to write a comment string targeted at the AI, then delete this afterwards
- Sometimes I'd just like the AI to explain to me what some code does without writing anything
- This isn't something I always want on; I find myself turning the plugin on and off depending on the context
Overall I think we need a novel UX to really unlock the AI's helpfulness