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

Method create

packages/kaos/src/local.ts:215–222  ·  view source on GitHub ↗

* Construct a fresh `LocalKaos` after probing the host environment. * * Each call returns a new instance with its own `_cwd`; concurrent * callers can therefore operate on independent working directories * without polluting one another.

()

Source from the content-addressed store, hash-verified

213 * without polluting one another.
214 */
215 static async create(): Promise<LocalKaos> {
216 // Enrich process.env.PATH from the user's login shell so spawned
217 // commands find user-installed tools (e.g. Homebrew's gh) even when
218 // kimi-code itself was launched without the full profile PATH. Both
219 // probes are memoised, independent, and run concurrently.
220 const [osEnv] = await Promise.all([detectEnvironmentFromNode(), applyLoginShellPathFromNode()]);
221 return new LocalKaos(osEnv);
222 }
223
224 withCwd(cwd: string): LocalKaos {
225 return new LocalKaos(this.osEnv, cwd, this._envLayers);

Callers

nothing calls this directly

Calls 2

Tested by

no test coverage detected