Thanks for the feedback! That's a really good idea and we will definitely give that a shot!
If it provides more clarity, we are trying to tackle this in stages. Can the AI produce helpful and descriptive code for
1. Basic + Short (less than 100 lines) files?
2. Basic + Long (more than 100 lines) files?
3. Complex / Vague + Long files?
After stage 3, which I believe is what you are referring to, we then hope to explore stage 4.
4. Can AI incorporate programmers' intentions into the comments?
We played around with this for a bit actually. One idea we had was to generate a PlantUML diagram to show how the different components of a file or even a repository connected with one another. However, given the current limitations with GPT context, even when using GPT-4, this quickly became impractical for large files. We would need to leverage an AI with a much larger context length.
That said, perhaps if the entire repository is fed into a vectorised database, a high-level overview would be possible? Just thinking aloud right now and am happy to collaborate with anyone interested in exploring this further!
"My advice for developers has been to write comments before writing the code."
Haha yeah, however in our experience thus far, quite a number of developers really only explain their intentions verbally so nothing ever makes it into the codebase unfortunately. And after a few months, they themselves may not understand why the code was written in a particular manner.
"The issue tho is that most open source code is technical code and code that relies on it serves a business function."
Wow yeah never thought about it in that way before!
Interesting! We are personally not the most comfortable with editing things directly from the terminal, especially when GPT hallucinates, but we can definitely see how this would provide users with more flexibility. Thanks for sharing!
Thanks for the feedback! We can't figure out how to hack together something like that just yet (and if it is even something that should / can be solved by a tech product) but if we do, we'll definitely share that as an update! :)
Wow, thanks for the insightful discussion and feedback! This is definitely something that we will take into consideration and ideally, provide as an option.
Fair enough, that is a problem that we are facing too but we have no idea how to solve it at this point to be honest. Perhaps connecting one's github repository and commit history into a vectorised database for additional context? Hmmm
Hey, that is an interesting way to lens the possible future. There is definitely talk about the "singularity" of programming languages, similar to how you can translate from one language to another using the meaning behind the words. In fact, Copilot seems to be a glimpse into that future. Thank you for the comment!
If it provides more clarity, we are trying to tackle this in stages. Can the AI produce helpful and descriptive code for 1. Basic + Short (less than 100 lines) files? 2. Basic + Long (more than 100 lines) files? 3. Complex / Vague + Long files?
After stage 3, which I believe is what you are referring to, we then hope to explore stage 4. 4. Can AI incorporate programmers' intentions into the comments?