r/Jetbrains • • 1d ago

AI Explain changes button in Air IDE plugin code review

Sometimes when I'm reviewing changes in the code I would like an explanation why it's been changed and/or how the new code works, but so far I can't find a quick and easy way to do so. I think it would be a good feature for JetBrains to add to the plugin, as a button on the whole diff and/or in the right click menu for a code snippet.

People that use the Air plugin, how do you review your code? And would you benefit from such a feature?

9 Upvotes

3 comments sorted by

4

u/fnk_ie 1d ago

My plugin does just that, if it detects AIR plugin is installed it uses it for the “explain this PR with AI” feature

https://plugins.jetbrains.com/plugin/35502-diffy--bitbucket-pr-review

tho it’s only for bitbucket PRs, same instructions I guess could be used more widely for any PR

1

u/k1ll3rM 1d ago edited 1d ago

Ideally it would be implemented in all diff windows in JetBrains IDE's, that way plugins that use this window can also use it. Specifically for Air and other AI plugins it would be nice if it includes the session that generated the code in it's context for more accurate explanations

1

u/THenrich 14h ago

It would be a nice feature. As a workaround, you can tell Air to add comments with an explanation for each change.
I would create a plugin to remove these comments afterwards. Make the comment start with a keyword so that the plugin deletes only those comments.
I vibe coded a plugin for a specific use case, and I know nothing about Kotlin or how to develop an IDEA plugin. It was pretty easy.