Cody AI Repo Context is not helpful

Hello I’ve installed Cody AI and I can see that it does some indexing after initialization and then in the chat window by default you have the current repo added as an additional context.

I have Django project with venv folder (contains all dependencies and added to .gitignore) and the problem I have is that repo context is totally useless for me right now because when I ask questions about the actual repo files, as context it retrieves bunch of files from dependencies folder which are irrelevant for the questions, so each time I have to remove default repo context and manually add files I’m interested in.

Can I improve current repo context retrieval, or at least disable it as default additional context when new chat is opened?

Hello @nrezvoi

Cody has its own context filter mechanism.
You can read more about it here: Manage Cody Context - Sourcegraph docs

If you have further questions then go ahead.

1 Like

Thank you, I’ll check it out

The Cody Ignore feature has been sunsetted and will no longer be maintained. We recommend using Cody Context Filters with Cody Enterprise for more flexible file exclusion and inclusion rules.

But the context filter documentation does not mention file/directories at all…

The Cody context filter is documented here: Manage Cody Context - Sourcegraph docs

And follows the same pattern like in the Sourcegraph search functionality which is documented here: Search Query Syntax - Sourcegraph docs

It’s still not clear at all to me how I would use the context filters to exclude certain files or directories though. Are there a filePattern key which is not documented? Can I use file: ... pattern in the value of a repoNamePattern?

As this is an enterprise feature, it will be best to talk to the dedicated enterprise tier communication channel or via support@sourcegraph.com with your organisation or Sourcegraph username.

thank you.