MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / matcher

Method matcher

packages/agent-core/src/services/fs/fsService.ts:409–423  ·  view source on GitHub ↗
(realCwd: string)

Source from the content-addressed store, hash-verified

407 }
408
409 protected async matcher(realCwd: string): Promise<Ignore | undefined> {
410 const cached = this.gitignoreCache.get(realCwd);
411 if (cached !== undefined) return cached;
412 const ig = ignore();
413
414 ig.add('.git/');
415 try {
416 const contents = await fs.readFile(path.join(realCwd, '.gitignore'), 'utf-8');
417 ig.add(contents);
418 } catch {
419
420 }
421 this.gitignoreCache.set(realCwd, ig);
422 return ig;
423 }
424}
425
426function isHidden(name: string): boolean {

Callers 1

listMethod · 0.95

Calls 4

getMethod · 0.65
addMethod · 0.65
readFileMethod · 0.65
setMethod · 0.65

Tested by

no test coverage detected