AI Assistant Help

Restrict or Disable AI Assistant features

You can restrict the use of AI Assistant if you do not want to share source code with third parties.

Disable AI Assistant for the current project

You can disable AI Assistant for the project that is currently open in your IDE.

  1. Click the JetBrains AI widget located in the toolbar in the window header.

    JetBrains AI settings
  2. Hover over the Disable AI Assistant option and click Disable for This Project.

    Disable for This Project

The icon in the toolbar will change, notifying that AI features are disabled for the project. This information will also be duplicated in the JetBrains AI settings manager and AI Chat.

As a result, all AI Assistant icons in the toolbars and AI actions in the context menu will become unavailable.

Restrict usage of AI Assistant for a project

  • Create an empty file named .noai in the root directory of the project.

When this file is present, all AI Assistant features are fully disabled for the project. Even if this project is opened in another IDE, the AI Assistant features will not be available.

Note that this file affects only the JetBrains AI Assistant plugin and does not affect any third-party AI integration plugins for JetBrains IDEs or other tools that may send code to external LLMs (Large Language Model).

Restrict usage of AI Assistant in specific files or folders

You can restrict AI Assistant from processing specific files or folders by creating and configuring an .aiignore file.

  1. Navigate to Settings | Tools | AI Assistant | Project Settings.

  2. Select the Enable .aiignore checkbox and click Create .aiignore file.

  3. Specify a pattern to exclude files and/or folders from processing by AI Assistant. The .aiignore file uses the same syntax as a .gitignore file and provides a configuration template.

    Add restricted files and folders to the .aiignore file

    The configured file might look like this:

    # Ignore build output directories target/ out/ # Ignore Maven wrapper files .mvn/ # Ignore project files .idea/ *.iml # Ignore compiled Java class files *.class # Ignore all .java files except the ones from the 'src/main' folder *.java !src/main/**/*.java # Ignore test reports and test directories test-results/ allure-results/ # Ignore logs and temporary files logs/ *.log *.tmp

As a result, if you try to invoke any AI Assistant action in a restricted file, you will receive the following message:

AI Has No Access to This File warning

Disable AI Assistant on a network level

You can restrict access to AI Assistant by blocking the following JetBrains AI service's base URLs on a network level:

  • https://api.jetbrains.ai/

    (for Mainland China: https://api.ai.jetbrains.com.cn/)

  • https://api.app.prod.grazie.aws.intellij.net/

Permanently disable AI Assistant

To disable AI Assistant on the IDE level, you can disable the AI Assistant plugin.

  1. Click the JetBrains AI widget located in the toolbar in the window header.

    JetBrains AI settings
  2. Hover over the Disable AI Assistant option and select the Disable Permanently via Plugin option.

    Disable Permanently via Plugin
  3. On the plugin's description pane that opens, click Disable.

You can also uninstall the plugin on the same plugin's description pane by clicking the arrow button to open the actions list, selecting Uninstall, and then restarting the IDE.

Hide AI Assistant toolbar and widget

If you do not have the AI Assistant plugin installed, you may still see the installation tool window offering to install the plugin, and the JetBrains AI widget in the toolbar in the window header.

AI Assistant installation tool window

These items are not the AI Assistant plugin, and they have no access to your code.

AI Assistant will not be active and will not have access to your code unless you install the plugin, acquire a JetBrains AI Service license and give your explicit consent to JetBrains AI Terms of Service and JetBrains AI Acceptable Use Policy while installing the plugin.

You can hide the tool window by right-clicking it and selecting Hide.

Hiding the tool window

To hide the JetBrains AI widget, right-click the icon, select Customize Toolbar, click Remove, and then click Apply to save the changes.

    Last modified: 17 April 2025