Understanding of Add context in chat window & codebase indexing

Hi there,

Love Cursor!
i am not sure if i really understand the add context in chat.
sometimes i forgot to add the file i am currently working on with cursor and still cursor seems to know the file (i mention it in chat) and can code the feature.
so it also has access to the file if i don’t mention it?
does it have access to all my files of the project, is that the codebase indexing in settings?
Or what is codebase indexing and how can i tell cursor what to index (or does it always index all my opened project?)

Thank you for clarifying

Jakob

2 Likes

waiting for someone to answer this.

Hi @jakob-gross

I think so, it can see your codebase, and even if you don’t refer to a file, it still knows everything you’ve provided to it.

You can limit access to any files or folders by using the .cursorignore file.

Let me add a ‘me too’ to this question.
Its unclear to me whether cursor AI has access to and knows my codebase or if I have to manually add a file to the chat. sometimes when i ask for it to make a change to my code, it rewrites the method as if the method doesn’t exist, rather than making a minimal modification of the already-existing method. If i explicitly attach the code file and tell it that it exists, its more likely to make a surgical change as i wanted it to.