Codebase Index: Only .gitignore is indexed?

Hi all,

In using the @codebase chat, the “Final Codebase Context” only lists .gitignore. Their is briefly a heading that says “Global Context” but then is disappears.

Here is the prompt (the component is loaded into the chat):

Ok now look through the codebase and tell me which file defines
“config”, which is accessed via this.config.api.vendors that isused in this component.

and it’s reply is:

The file that defines the [config](file:///[…]/.gitignore#5%2C9-5%2C9) object accessed via this.config.api.vendors in the Vendor.vue component is not explicitly shown in the provided code snippets. You may need to search the project’s source code for a configuration file or a setup script where [config](file:///[…]/.gitignore#5%2C9-5%2C9) is defined, typically found in files like config.js, settings.js, or similar. Look for a file where api and vendors properties are set on a [config](file:///[…]/.gitignore#5%2C9-5%2C9) object.

I have tried deleting / re-indexing so far. No dice.
Any ideas? tia

add the Gitignore to .cursorignore. Problem solved,

i think

1 Like

That did it, thanks.

edit: I can’t get index/@codebase to work, but have not seen this particular behavior again.

So what exactly is solution here? Adding .gitignore to .cursorignore will make Cursor indexing to ignore files listed in .gitignore? Or I need to copy .gitignore contents to .cursorignore?

If you’ve got a .gitignore in your project, you won’t need a .cursorignore unless there’s something else to exclude. Then, just add a .cursorignore file. Otherwise, .gitignore’s got it covered. Here’s something to think about:

1 Like