Files used by Cursor Composer

Does cursor composer automatically detect the files being imported and use it for context. For example, file A imports objects from file B, and the context of file B is important for cursor compose, would it automatically look at file B or does it need to be explicitly mentioned by @FileB?

When should we use @Codebase when using cursor compose, is that the way to edit things for the whole codebase?

Cursor Compose online docs are not clear on some of these topics