Skip to content
This repository was archived by the owner on Aug 1, 2025. It is now read-only.

Commit d62daa2

Browse files
committed
fix tests
1 parent 0b8ed0e commit d62daa2

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

lib/shared/src/cody-ignore/context-filters-provider.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,6 @@ export class ContextFiltersProvider implements vscode.Disposable {
335335
}
336336

337337
private parseExcludePatternString(patternString: string): string[] {
338-
// Handle empty or null pattern string
339338
if (!patternString || typeof patternString !== 'string') {
340339
return []
341340
}
@@ -346,7 +345,12 @@ export class ContextFiltersProvider implements vscode.Disposable {
346345
return content ? content.split(',').filter(pattern => pattern.trim() !== '') : []
347346
}
348347

349-
// Handle single pattern without braces: pattern
348+
// Handle single pattern without braces - but reject patterns that look malformed
349+
// (contains commas, unmatched braces)
350+
if (patternString.includes(',') || patternString.includes('{') || patternString.includes('}')) {
351+
return []
352+
}
353+
350354
return [patternString.trim()].filter(pattern => pattern !== '')
351355
}
352356

0 commit comments

Comments
 (0)