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

Function expandHome

packages/agent-core/src/config/workspace-local.ts:251–255  ·  view source on GitHub ↗
(kaos: Kaos, value: string)

Source from the content-addressed store, hash-verified

249}
250
251function expandHome(kaos: Kaos, value: string): string {
252 if (value === '~') return kaos.gethome();
253 if (value.startsWith('~/')) return join(kaos.gethome(), value.slice(2));
254 return value;
255}
256
257function hasSameAdditionalDir(kaos: Kaos, dirs: readonly string[], target: string): boolean {
258 const normalizedTarget = normalizeForCompare(kaos, target);

Callers 1

resolvePathFunction · 0.85

Calls 1

gethomeMethod · 0.65

Tested by

no test coverage detected