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

Function runIndex

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

Source from the content-addressed store, hash-verified

660 // index if the user opts gitignored child repos in below (#1156).
661 const dbPath = getDatabasePath(projectPath);
662 const runIndex = async (): Promise<IndexResult> => {
663 const supervision = installCommandSupervision('init', { progressPaths: [dbPath, `${dbPath}-wal`] });
664 try {
665 if (options.verbose) {
666 return await cg.indexAll({ onProgress: createVerboseProgress(), verbose: true });
667 }
668 process.stdout.write(`${colors.dim}${getGlyphs().rail}${colors.reset}\n`);
669 const progress = createShimmerProgress();
670 const r = await cg.indexAll({ onProgress: progress.onProgress });
671 await progress.stop();
672 return r;
673 } finally {
674 supervision.stop();
675 }
676 };
677 const result = await runIndex();
678 printIndexResult(clack, result, projectPath);
679 await recordIndexTelemetry(cg, result);

Callers 1

runInitFunction · 0.85

Calls 7

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

Tested by

no test coverage detected