Integrating AI Into the IDEs

AI has demonstrated its immense potential in aiding coding tasks, such as answering questions, generating code snippets, explaining code, and detecting issues. However, the current approach of using Web UIs like ChatGPT and relying heavily on copy/paste methods can be cumbersome and less efficient. To maximize the benefits of AI in coding, tighter integration of AI capabilities within modern Integrated Development Environments (IDEs) is essential. Several ideas can be explored to achieve this seamless integration, some of which have already been implemented in IDEs like IntelliJ IDEA, while others remain untapped opportunities.

There are two major concepts of such an integration: AI Actions and AI Assistant (Chat UI).

ChatGPT Functions: Observations, Tips, and Tricks

Recently introduced ChatGPT functions represent a huge leap forward that lets ChatGPT use your local files, data, and system services. So, if you supply proper functions to ChatGPT, you can ask it something like “Email Kate Bell with birthday greetings” and see a new email message pop up with correct email address, correct subject and generated email text with birthday best wishes. 

Pretty cool, right?  

AI Code Intentions

Any modern IDE includes Code Intentions that allow you to perform some predefined actions on your code based on a context. For example, for a  for statement, there can be several intentions like Convert to while, Reverse orderUse Streams, etc. The use of Intentions is very handy as it allows us to perform quick refactoring or do some manipulation with the code. 

Intentions are pretty hard to develop, so they are usually hard-coded and bundled with the IDEs by respective IDEs vendors. In some IDEs, it is possible to develop your own Intentions, but it is not so easy as it requires good knowledge of an IDE platform, writing lots of code, developing plug-ins to deploy your Intentions, etc.