mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-21 01:07:46 +00:00
Improve some tools to support abortSignal (#997)
This commit is contained in:
committed by
GitHub
parent
1c7774e35b
commit
28e656f882
@@ -7,7 +7,7 @@
|
||||
import { GitIgnoreParser, GitIgnoreFilter } from '../utils/gitIgnoreParser.js';
|
||||
import { isGitRepository } from '../utils/gitUtils.js';
|
||||
import * as path from 'path';
|
||||
import fg from 'fast-glob';
|
||||
import { glob, type GlobOptions } from 'glob';
|
||||
|
||||
export interface FileDiscoveryOptions {
|
||||
respectGitIgnore?: boolean;
|
||||
@@ -35,12 +35,12 @@ export class FileDiscoveryService {
|
||||
|
||||
async glob(
|
||||
pattern: string | string[],
|
||||
options: fg.Options = {},
|
||||
options: GlobOptions = {},
|
||||
): Promise<string[]> {
|
||||
const files = await fg(pattern, {
|
||||
const files = (await glob(pattern, {
|
||||
...options,
|
||||
caseSensitiveMatch: false,
|
||||
});
|
||||
nocase: true,
|
||||
})) as string[];
|
||||
return this.filterFiles(files);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user