()
| 7 | import { CombinedAutocompleteProvider } from "../src/autocomplete.ts"; |
| 8 | |
| 9 | const 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 | |
| 20 | type FolderStructure = { |
| 21 | dirs?: string[]; |