mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-20 08:47:44 +00:00
Co-authored-by: Ryan Fang <ryan.fang@gllue.com>
This commit is contained in:
@@ -84,6 +84,24 @@ export class FileDiscoveryService {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unified method to check if a file should be ignored based on filtering options
|
||||
*/
|
||||
shouldIgnoreFile(
|
||||
filePath: string,
|
||||
options: FilterFilesOptions = {},
|
||||
): boolean {
|
||||
const { respectGitIgnore = true, respectGeminiIgnore = true } = options;
|
||||
|
||||
if (respectGitIgnore && this.shouldGitIgnoreFile(filePath)) {
|
||||
return true;
|
||||
}
|
||||
if (respectGeminiIgnore && this.shouldGeminiIgnoreFile(filePath)) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns loaded patterns from .geminiignore
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user