[Translation] IntelliJ IDEA 2023.2 Latest Changes - AI Assistant in JetBrains IDE

This article is translated from the IntelliJ IDEA official website blog:

https://blog.jetbrains.com/idea/2023/06/ai-assistant-in-jetbrains-ides/

Preface

This week's EAP releases of all IntelliJ-based IDEs and .NET tools include a major new feature: AI Assistant . This blog focuses on our IntelliJ-based IDE, and a dedicated .NET tools blog will be coming soon.

Generative AI and large language models are rapidly changing the landscape of software development tools, 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 aspects:

  • Integrate AI assistance into core IDE user workflows.
  • Deeply integrating AI functions with code understanding has always been the strength of JetBrains IDE.

AI capabilities are powered by JetBrains AI services. 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 launches with support for OpenAI and additionally hosts many smaller models created by JetBrains. In the future, we plan to expand this to more providers to give our users access to the best options and models.

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 put the AI-generated code into the editor, or just copy it.

To ask the AI ​​for a specific piece of code, select it in the editor and invoke an action from the AI ​​actions menu (available in the editor context menu or accessed with the Alt+Enter shortcut). New chat using select actions allows you to provide your own tips or requests. You can enter other standard AI help tips by selecting Explain Code , Suggest Refactoring , or Find Potential Issues as appropriate . *

Document generation

If you need to use LLM to generate a declaration document, call the AI ​​operation menu and select the Generate Documentation operation. This feature is currently supported in Java, Kotlin and Python.

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 the statically known parts of the annotation (such as the @param tag in Java) and the AI ​​will generate the actual documentation text for you.

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 | Tools | Artificial Intelligence Assistant .

Submit message generation

The commit message dialog now has a Generate commit message using AI Assistant button. Clicking it sends the diff of your changes to LLM, which will generate a commit message describing your changes.

AI assistant capabilities may vary by product. For more details on specific products, check out the following dedicated posts: CLion , GoLand , IntelliJ , PhpStorm , PyCharm , ReSharper , Rider , RubyMine , WebStorm , and Fleet .

Guess you like

Origin blog.csdn.net/powertoolsteam/article/details/132690555