-
Notifications
You must be signed in to change notification settings - Fork 477
Implement exclude patterns from workspace settings #8190
base: main
Are you sure you want to change the base?
Conversation
| await this.fetchIfNeeded() | ||
|
|
||
| // Check VS Code exclude patterns | ||
| if (ContextFiltersProvider.excludePatternGetter) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@thenamankumar your pr description strikes-through the search exclusion but the code is still present as seen here
|
|
||
| if (useIgnoreFiles && workspaceFolder) { | ||
| sgignoreExclude = await readIgnoreFile( | ||
| vscode.Uri.joinPath(workspaceFolder.uri, '.cody', 'ignore') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should use .sourcegraph/ignore like we had in Beatrix's pr.
| return | ||
| } | ||
|
|
||
| const useIgnoreFiles = vscode.workspace |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same it seems we rely on the vscode search exclusion which shouldn't happen based on the pr description
b9f23cf to
512108a
Compare
3599ab9 to
960b53a
Compare
960b53a to
a950d31
Compare
ichim-david
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving to unblock, the problem was always from the tests

Re-implementing PR: https://github.com/sourcegraph/cody/pull/8037
This introduces the ability to exclude files from Cody's context based on the
files.exclude, search.exclude, and .gitignore / .sourcegraph/.ignore.cody/ignorefiles located in the codebase root directory settings in VS Code.The
ContextFiltersProvidernow utilizes these settings to determine if a file should be ignored. This is achieved by:minimatchas a dependency to perform pattern matching.excludePatternGetterto fetch the exclude patterns and workspace folder.This enhancement ensures that Cody respects the user's VS Code settings for excluding files, preventing irrelevant files from being included in the context.
Note: .sourcegraph/.ignore instead of .codyignore so that the same file can be used across sourcegraph products and not just codyTest plan