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

Function resolveConfiguredDir

packages/agent-core/src/skill/scanner.ts:472–477  ·  view source on GitHub ↗
(dir: string, projectRoot: string, userHomeDir: string)

Source from the content-addressed store, hash-verified

470}
471
472function resolveConfiguredDir(dir: string, projectRoot: string, userHomeDir: string): string {
473 if (dir === '~') return userHomeDir;
474 if (dir.startsWith('~/')) return path.join(userHomeDir, dir.slice(2));
475 if (path.isAbsolute(dir)) return dir;
476 return path.resolve(projectRoot, dir);
477}
478
479function isWithin(child: string, parent: string): boolean {
480 const relative = path.relative(parent, child);

Callers 1

pushConfiguredDirsFunction · 0.85

Calls 1

resolveMethod · 0.65

Tested by

no test coverage detected