AI Assistant integration doesn't work as expected
已回答
I have a policy in my company that i shouldn't pass source code to AI chatbots. Therefore when i use AI assistant in IntelliJ i always set “Codebase off” in the prompt and expect that AI assistant doesn't access my code. Nevertheless sometimes i get answers which uses my sourcecode. Is this a bug or do i misunderstand the purpose of the Codebase button in the prompt?
Kinf Regards
Andreas
P.S.: By the way, Rider shows the same behavior
请先登录再写评论。
When you select "Codebase off" in the IntelliJ AI assistant, you are instructing it not to scan your project's files for context. However, this setting does not prevent the AI from processing the information you explicitly type or paste into the chat prompt. Therefore, if you copy and paste your source code into the prompt, the AI will use it to provide a response. This is not a bug, but rather the intended functionality of the tool—the "Codebase off" option manages automated code access, not user-provided input. choiceADVANTAGE
So i understand the option correct. But nevertheless even with “Codebase off” sometimes the answer contained methods and variables from my code base. Only after adding a .aiignore no more code from my code base was used (and luckily also prevents me from pasting code into the prompt).
Hi,
When the Codebase button is off, AI Assistant does not automatically access your project files. In this mode, the Assistant only has access to:
It will not scan or read your project files unless you manually attach them or switch Codebase on.
Please also note that in Edit mode, AI Assistant is designed to work with your code, so it automatically pulls in the relevant project context (though you can add/remove context manually).
If you notice a situation where AI Assistant provides answers using your code without you explicitly sharing it, please create a YouTrack issue or submit a support ticket so we can investigate further.
Thank you for the clarification. Meanwhile i couldn't reproduce the behavor so that i think it was my fault.
But currently i have another issue. While playing with the AI Assistant on private code I attached a source file with syntax errors to the chat and asked ChatGPT 5 to fix it. The anwser was in German (like my computers language settings) even if i explicitely configured AI Assistant to answer in english. I also tried Claude Sonnet 4 with the same result. Is this a bug or a fesature? As the german translations not always are the best i prefer to get the answers in english. I'm working with IntelliJ Ultimate 2025.3 EAP 253.20558.43