MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / runIndex

Function runIndex

src/bin/codegraph.ts:644–658  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

642 // index if the user opts gitignored child repos in below (#1156).
643 const dbPath = getDatabasePath(projectPath);
644 const runIndex = async (): Promise<IndexResult> => {
645 const supervision = installCommandSupervision('init', { progressPaths: [dbPath, `${dbPath}-wal`] });
646 try {
647 if (options.verbose) {
648 return await cg.indexAll({ onProgress: createVerboseProgress(), verbose: true });
649 }
650 process.stdout.write(`${colors.dim}${getGlyphs().rail}${colors.reset}\n`);
651 const progress = createShimmerProgress();
652 const r = await cg.indexAll({ onProgress: progress.onProgress });
653 await progress.stop();
654 return r;
655 } finally {
656 supervision.stop();
657 }
658 };
659 const result = await runIndex();
660 printIndexResult(clack, result, projectPath);
661 await recordIndexTelemetry(cg, result);

Callers 1

mainFunction · 0.85

Calls 7

getGlyphsFunction · 0.90
createShimmerProgressFunction · 0.90
createVerboseProgressFunction · 0.85
stopMethod · 0.65
indexAllMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected