JetBrains AI Releases

JetBrains AI Assistant 2024.1 Updates

In the new JetBrains AI Assistant version 2024.1, we’ve implemented improved test generation, full line code completion for Java, Kotlin, Python, JavaScript, TypeScript, CSS, PHP, Go, and Ruby, custom prompts for commit messages, creation files from code snippets, and updated in-editor code generation.

JetBrains AI Assistant, released in December 2023, has become the fastest-growing of all JetBrains products. Powered by artificial intelligence, it is woven into the core IDE user workflows and connects you to different large language models (LLMs) hosted either by JetBrains or external providers like OpenAI.

Local full line code completion

2024.1 versions of JetBrains IDEs come with full line code completion (FLCC), which is currently available for Java, Kotlin, Python, JavaScript, TypeScript, CSS, PHP, Go, and Ruby. This feature is powered by an advanced deep learning model seamlessly integrated into the IDE. It enhances coding efficiency by predicting and suggesting entire lines of code based on contextual analysis. These suggestions are powered by specialized language models that we’ve trained explicitly for different languages and frameworks and that run entirely on your local device, ensuring your data remains secure without any need for communication with an external server.

Full line code completion and JetBrains AI Assistant are seamlessly integrated, and AI Assistant makes FLCC even more powerful with multi-line code completion.

Read more about full line code completion, how it works, and what’s under the hood.

Improved test generation

We’ve enhanced AI test generation for Java and PHP. Now, you can find dedicated existing files where tests used to be written. AI Assistant automatically finds a suitable test file, adds new test cases to an existing file, and uses an existing file as a sample to provide the appropriate type/style for tests.

The test generation feature helps you uncover edge cases and suspicious behavior in seconds, freeing up more time to craft new code. Now, you can easily generate meaningful tests for code segments, as AI Assistant analyzes both your code and documentation to recommend tests that will provide insights into your code’s behavior. To run the tests, you just need to approve the suggestions. 

Commit message generation custom prompts

We improved the AI prompts library with this release. Now, you can ask the AI Assistant to customize a commit message generation prompt by specifying a different language and choosing the format or the required number of characters.

Improvements in cloud code completion 

Now you can easily accept a one-line suggestion by using the ctrl+alt RIGHT (⌃⌘→ on a mac) shortcut. It’s also possible to get the completion in a variety of configuration file types as well as for languages we don’t support. This feature is disabled by default, you can turn it on in Settings | Tools | AI Assistant | Enable experimental universal inline completion

If you want to get completions in the middle of the current line, you can choose to invoke it automatically after hitting the Spacebar. This feature has a debounce delay to avoid interrupting your typing and a filter model to hide less valuable suggestions. To enable it, go to Settings | Tools | AI Assistant | Automatic trigger for current line.

Create files from code snippets

AI Assistant has a new functionality that lets you create files from snippets.  

  • Type some code in the AI Assistant chat.
  • Click on Create File from Snippet.

Please read the documentation for more information on how to create or edit your snippets.

In-editor code generation feature update

In-editor code generation gives you more control over what the LLM modifies and what it doesn’t.

If invoked on a selection, only this selection will be subject to modifications by the LLM. If invoked on no selection, the generated code will only be inserted at the caret.

Also, the feature now has a larger code context to increase the quality of the results: for the response improvement, the AI Assistant uses code information not only about the current file used but also from other relevant files in the project.

Improve the quality of generated SQL queries in DataGrip

Use the new Show Database context AI feature in DataGrip to improve the quality of generated SQL queries by attaching database schema as a chat context. In the Beta version, it’s only possible to provide tables with their columns (no views, routines, etc.), and the maximum number of tables is limited to 50.

We’ve also updated the editor’s context menu features to include an Explain code option, so you can understand the current schema when invoking from database consoles. AI Assistant can now search for database objects in their project (user consent must be provided in Settings).

AI Assistant availability

In 2024.1, AI Assistant has been unbundled and is now available in JetBrains IDEs as a separate plugin. This change is driven by the need to offer greater flexibility in decision-making regarding the use of AI-powered technologies, providing you with more control over your preferences and the requirements of your working environments.

For those using IDE version 2023.3 who update to v2024.1, the AI Assistant plugin will be automatically installed.

JetBrains AI Assistant is available in the 2024.1 versions of all our commercial IDEs and ReSharper, as well as in Fleet, and it works with many of the languages these products support. You can use it as a supplemental feature with a JetBrains AI service subscription. Try AI features with a 7-day trial period and continue using them with a monthly or yearly subscription. You can also try AI Assistant for free in JetBrains YouTrack and Datalore team tools.

Access to the AI service is restricted to the territories where our providers’ service is available. You can check the full list of territories here.

Feedback

We encourage you to download the 2024.1 version of your go-to JetBrains IDE, open the AI Assistant tool window, log in with your JetBrains Account, and try the new functionality. Feel free to share your thoughts in the comments below or via X (formerly Twitter).

You can also tell us about your experience via the Share your feedback link in the AI Assistant tool window or by submitting feature requests or bug reports in the AI Assistant YouTrack project

Happy developing!

image description