Use AI in editor
Install the AI Assistant plugin
This functionality relies on the AI Assistant plugin, which you need to install and enable.
Press Control+Alt+S to open the IDE settings and then select
.Open the Marketplace tab, find the AI Assistant plugin, and click Install (restart the IDE if prompted).
Generate code in editor
Generate code and use prompts right in the editor.
Place the caret anywhere in the editor.
Right-click to open the context menu, select AI Actions and then Generate code.
In the input field, write your prompt and press Enter.
The generated code opens in a separate AI Diff tab. Wait for the generation to complete. In the upper-right corner, select Unified or Two-Side view to review the suggested changes.
If you want to improve the generated code, click Specify, add new requirements, and press Enter.
AI Assistant will regenerate the code while taking into account the new specifications.
If you want to regenerate the answer, click Regenerate.
Click Accept to insert the generated fragment to the rest of the code. Otherwise, close the diff viewer to skip code generation.