This repository was archived by the owner on Aug 1, 2025. It is now read-only.
File tree Expand file tree Collapse file tree
lib/shared/src/cody-ignore Expand file tree Collapse file tree Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments