Chat with AI
This functionality relies on the AI Assistant plugin that requires an additional license.
For more information about licensing and enabling AI Assistant, refer to JetBrains AI Service licensing and Enable AI Assistant.
Use the AI Assistant tool window to have a conversation with the LLM (Large Language Model), ask questions about your project, or iterate on a task.
AI Assistant takes into consideration the language and technologies used in your project, as well as local changes and version control system commits. You can search for files, classes, and element usages.
Click View | AI Assistant to open AI Assistant.
In the input field, type your question.
The AI chat now supports slash commands to streamline your interactions. You can use the following commands to perform specific actions directly within the chat:
/chat_new: Opens a new AI chat tab.
/chat_stop: Stops the ongoing response generation.
/chat_regenerate: Deletes the latest response and regenerates it.
/docs: Queries Fleet and other JetBrains documentation directly.
To disable slash commands, add the following setting to your settings.json file:
ai.chat.commands.enabled=false
This setting disables all slash commands in the AI chat.
Press to submit your query.
You can configure AI Assistant to provide responses in a specific language.
Press to open settings and then select Tools | AI Assistant.
In the Natural Language section, enable the Receive AI Assistant chat responses in a custom language setting.
In the text field, specify the language in which you want to receive chat responses.
Click Apply.
After that, AI Assistant will use the specified language in its responses.
note
Enabling this feature updates the active chat to use the selected language. New chats will also use the selected language; however, existing ones will remain in a language that was selected previously.
You can ask the AI Assistant questions about some particular code in your file or about all the code in the file.
Explain This File: right-click any place in the opened file and navigate to AI Actions | Explain This File. Alternatively, to open the popup with AI Assistant actions, press .
Explain This Code: select code in the file and navigate to AI Actions | Explain This Code. Alternatively, to open the popup with AI Assistant actions, press .
In the query field, type your question about the code or file.
Click View | AI Assistant to open AI Assistant.
Use natural language to request information based on the context of your workspace. Here are some examples:
Request recent files: to retrieve a list of files you have recently viewed.
Ask for the current file: to display the full content of the currently opened file.
Request visible code: to retrieve the code currently visible in your editor.
Ask for local changes: to display uncommitted changes in your file tree.
Find information in README: to search for relevant information within README files.
Check recently changed files: to list files modified in the ten latest commits.
When asking questions in the chat, you can add context to your query directly from a UI element. It can be a terminal, tool window, console, etc. For example, you can attach a build log from the console to ask why your build failed.
In the chat, click
Add attachment.
Select the Add context from UI option from the menu.
Select the UI element that contains data that you want to add to the context.
Type your question in the chat and submit the query.
AI Assistant will consider the added context when generating the response.

AI Assistant can generate script commands based on your input. The generated command can be executed instantly, saving you the trouble of manually copying and pasting it into the terminal.
Ask AI Assistant to provide an appropriate script command for your task.
In the upper-right corner of the field with the generated command, click
Run Snippet.