fix: apply duo context exclusion to search tools
What does this merge request do and why?
Apply Duo Context Exclusion to search results for the Duo agent when searching for files
How to set up and validate locally
- Enable
:use_duo_context_exclusionfeature flag on your gitlab instance (Feature.enable(:use_duo_context_exclusion)) - Set up Duo Context Exclusion rules for a project under Project Settings >> Gitlab Duo >> Duo context exclusions (e.g. "README.md")
- Checkout that project and open it in VS Code
- Ask agentic chat to search for something in the contents of README.md
- It should not find your search term in the contents of README.md
Merge request checklist
-
Tests added for new functionality. If not, please raise an issue to follow up. -
Documentation added/updated, if needed. -
If this change requires executor implementation: verified that issues/MRs exist for both Go executor and Node executor or confirmed that changes are backward-compatible and don't break existing executor functionality.
Resolves gitlab-org/gitlab#574598 (closed)
Edited by Allen Cook