This extension prevents accidental auto-imports from __private__ folders when you are outside the allowed scope, while keeping valid suggestions for files in the parent directory and its descendants.
Quick demo
What you get
Out-of-scope files do not get auto-imports from __private__
In-scope files still get normal suggestions and quick fixes
Works with path completions and import-related code actions
Scope rule
Allowed: parent directory of __private__ and all descendants