Use .continueignore to exclude from auto complete
Validations
- [X] I believe this is a way to improve. I'll try to join the Continue Discord for questions
- [X] I'm not able to find an open issue that requests the same enhancement
Problem
To exclude files from auto complete I have to add disableInFiles
Solution
It would be better I exclude/hide files from auto complete using the .continueignore file so there is one file to exclude from auto complete and indexing
@salah-8 I had the same issue a few days ago but on second though, I believe these should be separate. The files you want to ignore may not always overlap. For example, you may want to disable completions in all Markdown files but still want to have them indexed.
Out of curiosity, what's your use case and what types of files would you like to ignore?
@tomasz-stefaniak Hey, I understand your point. But it would be better to at least make it a file like .continueignore instead of adding a long list in the config.json file
Out of curiosity, what's your use case and what types of files would you like to ignore?
most of the files I want to ignore/hide from AI in general (indexing or auto completion) is the files that have secrets, keys, or anything sensitive stuff from my company's codebase in general
@salah-8 we're currently working on a new version on config.json. I'm tagging @sestinj so that he's aware of this feedback.
IMHO .continueignore indicates that the globs get ignored for continue completely. It's confusing to have multiple places for configuration.
We may combine a block-list and allow-list for indexing and autocomplete. That would overwrite .continueignore if explicitly defined.
For me the purpose of .continueignore is to not send secrets via the wire.
My 2 cents, disableInFiles makes 100% sense for ignoring in the tab autocomplete, for all the reasons mentioned above, and .continueignore makes sense for continue to fully ignore a file (auto-complete and indexing).
I also think there should be an option in config.json called ignoreFiles that is a glob allowing you to do the same thing as .continueignore. This way you could add something like secrets/* to it, so you don't need a custom .continueignore for every repo.
-
Please stick to one standard syntax (like used for
.gitignore) and support respect multiple file names like.aiexcludeand.continueignoreto avoid the need to create multiple files when using multiple AI tools for projects. -
Default to blocking all files if no exclude file is present — critical for protecting credentials (API keys, passwords, etc.) from leaking to external AI providers. Especially, when opening existing projects with VSCode which have not been prepared for AI tools yet.
-
Access to files like
.aiexcludeor.continueignoreshould be not modifiable by AI, or at least require explicit user consent. -
Optional: Add a logging option to track all file accesses (read/write/delete) by AI, stored safely outside the project.
Helps debug exclude configs and check if the AI used the right files for code generation (i.e. especially good for evaluating reranker models).
PS: Thanks for the developing / providing support for this great tool!
Implemented here: https://github.com/continuedev/continue/commit/dd7c7cadb1706e28c4493c1f56c4dc1c604dbd31
You can add files inside HOME_DIR/.continue/.continueignore or PROJECT_ROOT/.continueignore and it should be respected.