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

Function resolvePath

packages/agent-core/src/config/workspace-local.ts:246–249  ·  view source on GitHub ↗
(kaos: Kaos, projectRoot: string, additionalDir: string)

Source from the content-addressed store, hash-verified

244}
245
246function resolvePath(kaos: Kaos, projectRoot: string, additionalDir: string): string {
247 const expanded = expandHome(kaos, additionalDir);
248 return isAbsolute(expanded) ? normalize(expanded) : resolve(projectRoot, expanded);
249}
250
251function expandHome(kaos: Kaos, value: string): string {
252 if (value === '~') return kaos.gethome();

Callers 2

resolveAdditionalDirFunction · 0.70

Calls 3

expandHomeFunction · 0.85
normalizeFunction · 0.85
resolveFunction · 0.50

Tested by

no test coverage detected