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, or choose to disable it entirely.

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 JetBrains AI widget icon will change, and a notification that AI features are disabled for the project will appear. This information will also be duplicated in the AI Chat.

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

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.

Restrict usage of AI Assistant for a project

As an alternative to disabling AI Assistant, you can create a file that will restrict the usage of AI features in the 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.

Project root contains a .noai file

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/

Hide AI Assistant toolbar and widget

Even if you do not have the AI Assistant plugin installed, you may still notice 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. However, if you still wish to remove them, you can do so.

To hide the AI Chat tool window, right-click the icon and select 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.

Hiding the widget
    Last modified: 20 May 2025