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

Function resolveFdPath

packages/pi-tui/test/autocomplete.test.ts:9–18  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

7import { CombinedAutocompleteProvider } from "../src/autocomplete.ts";
8
9const resolveFdPath = (): string | null => {
10 const command = process.platform === "win32" ? "where" : "which";
11 const result = spawnSync(command, ["fd"], { encoding: "utf-8" });
12 if (result.status !== 0 || !result.stdout) {
13 return null;
14 }
15
16 const firstLine = result.stdout.split(/\r?\n/).find(Boolean);
17 return firstLine ? firstLine.trim() : null;
18};
19
20type FolderStructure = {
21 dirs?: string[];

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected