IntelliJ IDEA 2023.2 new version, embrace AI

IntelliJ IDEA has recently released multiple EAP versions in succession. While the official is continuously optimizing the user experience, it has also added some good functions, especially the supplement of artificial intelligence assistant, AI Assistant . I believe that in the subsequent use of IDEA, it will be beneficial to developers. Work efficiency has brought a good improvement.

The following is the official introduction and description of AI Assistant :

Generative artificial intelligence and large language models are rapidly changing the software development tooling landscape, and the decision to integrate this technology into our products was a no-brainer for us. Our approach to building AI assistant functionality focuses on two areas:

  • Integrate AI assistance into core IDE user workflows.

  • Deep integration of AI functions and code understanding has always been the strength of JetBrains IDE.

AI features are powered by JetBrains AI service. The service transparently connects you, the product user, to different Large Language Models (LLMs) and enables specific AI-driven functionality in many JetBrains products. The service supports OpenAI at launch and additionally hosts many smaller models created by JetBrains.

In the future, we plan to expand this to more providers, giving our users access to the best options and models.

We also plan to support native and native models. For native models, the supported feature set is likely to be limited.

Artificial intelligence characteristics

The current EAP release provides a functional example of where we are headed:

  • artificial intelligence chat

Use the AI ​​Assistant tool window to talk to LLM, ask questions, or iterate on tasks. The IDE will provide some project-specific context, such as the languages ​​and technologies used in the project. Once you're happy with the result, use the "Insert snippet at caret" feature to drop the AI-generated code into the editor, or simply copy it.

picture

To ask the AI ​​for a specific snippet, select it in the editor, then invoke the action from the AI ​​Actions menu (available in the editor context menu or accessed with the Alt+Enter shortcut). A new chat using select actions allows you to provide your own tips or requests. You can enter additional standard AI help prompts as needed by selecting Explain Code, Suggest Refactoring, or Find Potential Issues.

picture

  • document generation

If you need to generate claim documentation using LLM, invoke the AI ​​Actions menu and select the Generate Documentation action. Currently Java, Kotlin and Python support this feature.

For Java and Kotlin, it is recommended to generate documentation when you use the standard method of generating documentation comment stubs: type /**. The IDE will generate statically known parts of the annotation (such as tags in @paramJava), and the AI ​​will generate the actual documentation text for you.

picture

  • name suggestion

When you rename a Java, Kotlin, or Python declaration, AI will suggest name options for the declaration based on its content. This feature can be turned off in Settings | Settings. Tools | Artificial Intelligence Assistant.

picture

  • Commit message generation

The commit message dialog now has a Generate commit message with AI Assistant button. Click it to send a diff of your changes to LLM, which will generate a commit message describing your changes.

picture

How to access artificial intelligence features

To access AI features, you need to log in to the JetBrains AI service with a JetBrains account. You can log in from the AI ​​assistant tool window, or from "Settings | Login". Tools | Artificial Intelligence Assistant.

Note that JetBrains AI services may not be immediately available to everyone. We will let a certain number of users in first, and once the maximum capacity is reached, the remaining users will be added to the waiting list. Over the next few weeks, we will gradually invite more people to try the product.

Currently, access to AI services is limited to regions where OpenAI services are available. The AI ​​service is free to use within the EAP period. We will provide licensing and pricing models later.

Finally, it needs to be explained that due to the regional restrictions of OpenAi, this function cannot be used in mainland China now, and we can only look forward to the subsequent release.

Guess you like

Origin blog.csdn.net/2301_78588786/article/details/131943544