Skip to content

Commit 2d3d690

Browse files
fix(web): filterByFilepaths in chat tool now accepts regular expressions
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent b7e1c38 commit 2d3d690

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/web/src/features/chat/tools.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ export const createCodeSearchTool = (selectedRepos: string[]) => tool({
166166
.optional(),
167167
filterByFilepaths: z
168168
.array(z.string())
169-
.describe(`Scope the search to the provided filepaths.`)
169+
.describe(`Scope the search to the provided filepaths. Each filepath is a regular expression matched against the full file path.`)
170170
.optional(),
171171
caseSensitive: z
172172
.boolean()
@@ -206,7 +206,7 @@ export const createCodeSearchTool = (selectedRepos: string[]) => tool({
206206
}
207207

208208
if (filepaths.length > 0) {
209-
query += ` (file:${filepaths.map(filepath => escapeStringRegexp(filepath)).join(' or file:')})`;
209+
query += ` (file:${filepaths.join(' or file:')})`;
210210
}
211211

212212
if (ref) {

0 commit comments

Comments
 (0)