Skip to content

Commit e624a71

Browse files
authored
Don't allow GH search syntax words as the freeform component of a search (#6412)
1 parent 72a55b6 commit e624a71

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/lm/tools/searchTools.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,9 @@ You are getting ready to make a GitHub search query. Given a natural language qu
234234
if (labels.some(label => freeForm.includes(label) || label.includes(freeForm))) {
235235
return '';
236236
}
237+
if (Object.keys(githubSearchSyntax).includes(freeForm)) {
238+
return '';
239+
}
237240
return freeForm;
238241
}
239242

0 commit comments

Comments
 (0)