-
Notifications
You must be signed in to change notification settings - Fork 251
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: allow configuring file exclusions #1358
Conversation
@tjdevries would this approach work for neovim/agent? |
@abeatrix Some random ideas:
|
I did, but because we will need to support other clients, including web, I was thinking config option might be the best option. Let me move this conversation to Slack and check with them to see if that's viable.
Cool, I can look into that. Thanks Philipp!
Since agent is not using the vscode-editor.ts atm, this would not work for other clients I presume? I'll check with them on Slack. |
Agent is using vs code apis to read files so if we wrap the VS Code API (e.g. |
moved to #1382 |
Close: #1049
This change allows configuring file exclusions via the new
'cody.excludeFiles'
configuration option.Files can now be excluded from fetched context before they are sent to LLM to prevent sharing sensitive information from a known location, e.g. directory, file name, etc.
Examples
configuration: cody.excludeFiles = [".json", ".env", "path/to/my/file.js", "/dirName/"]
files that will be excluded:
.json
in the file name, e.g.package.json
,cody.json
etc.env
in the file name, e.g..env
,vscode/.env
, etcpath/to/my/file.js
, e.g.path/to/my/file.js
, ornew/path/to/my/file.js
etc/dirName/
directory, e.g.path/to/dirName/file.js
,path/dirName/file.js
etcI wanted to do the filtering in codebase-context/index.ts, but then we will need to do the filtering again when we combine them with context from the editor, so for now I think it makes more sense to do it at the recipe level. Open to other ideas and suggestions though!
Test plan
WIP