Skip to content

Commit bf0456d

Browse files
cursoragentmsukkari
andcommitted
fix: clarify repo: filter usage in search assist syntax description
- Updated repo: filter description to explicitly state it should only be used to limit which repositories are searched, not for content searches - Added IMPORTANT note to distinguish between repo filter vs content search - Added 3 new examples showing correct usage: - Terraform files referencing deployment names (content search) - Files mentioning a service name (content search) - Python files in a specific repo using requests (repo + content) Fixes the issue where AI Search Assist incorrectly used repo: filter when users wanted to search for content containing specific keywords. Example: - User query: 'Find repos containing Terraform pertaining to glennbot' - Before: lang:Terraform repo:(glennbot|glenn-bot) (wrong - filters by repo name) - After: lang:Terraform (glennbot|glenn-bot) (correct - searches content) Co-authored-by: Michael Sukkarieh <msukkari@users.noreply.github.com>
1 parent 2168586 commit bf0456d

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

packages/queryLanguage/src/syntaxDescription.ts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,15 @@ Narrow searches with prefix:value syntax:
2222
2323
file:<value> — filter by file path
2424
lang:<value> — filter by language. Uses linguist language definitions (e.g. TypeScript, Python, Go, Rust, Java)
25-
repo:<value> — filter by repository name
25+
repo:<value> — filter by repository name (use ONLY to limit WHICH repositories are searched, NOT for content within files)
2626
sym:<value> — filter by symbol name
2727
rev:<value> — filter by git branch or tag
2828
2929
All filter values are interpreted as case-sensitive regular expressions.
3030
A plain word matches as a substring. No forward slashes around values.
3131
32+
IMPORTANT: When users want to search for content or keywords INSIDE files, use bare search terms or quoted phrases, NOT the repo: filter. The repo: filter only controls which repositories to search, it does not search file content.
33+
3234
## Boolean logic
3335
3436
Space = AND. All space-separated terms must match.
@@ -96,4 +98,13 @@ Output: lang:TypeScript "from \"(react|react-dom)\""
9698
9799
Input: find files with password reset logic, excluding tests
98100
Output: "password reset" -file:test
101+
102+
Input: find Terraform files that reference glennbot or glenn-bot deployments
103+
Output: lang:Terraform (glennbot|glenn-bot)
104+
105+
Input: find all files mentioning the myapp-api service
106+
Output: myapp-api
107+
108+
Input: find Python files in the backend repo that use requests library
109+
Output: lang:Python repo:backend import requests
99110
`.trim();

0 commit comments

Comments
 (0)