cody web: do not include ignored files in context#59907
Conversation
0xnmn
left a comment
There was a problem hiding this comment.
I see we are using useCodyIgnore only to check the currently opened file path. Have we already hooked the same check at backend for files returned on fetching context using getCodyContext?
cc: @thenamankumar |
@thenamankumar I'm working on updating the |
|
@chwarwick, is the current plan to put checking the ignore file behind the feature flag (https://github.com/sourcegraph/sourcegraph/pull/59836/files#r1465507213)? |
Yes I was going to add an experimental setting for it since that aligns with vs code currently. |
@chwarwick, we should probably respect this setting on the client too. I'll hold on merging this PR until yours is merged. |
Co-authored-by: Chris Warwick <christopher.warwick@sourcegraph.com>
(cherry picked from commit daf29d1)
Excludes files from Cody scope if they match patterns from the Cody ignore file.
Ignored file content 👇🏻

Note
Known issue: Cody chat refers to the previously opened file in the current transcript if the current file is excluded from the scope (https://github.com/sourcegraph/cody/issues/2925). FYI when testing this PR.
Test plan
.cody/ignorefile