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

Function runIndex

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

Source from the content-addressed store, hash-verified

873 // index if the user opts gitignored child repos in below (#1156).
874 const dbPath = getDatabasePath(projectPath);
875 const runIndex = async (): Promise<IndexResult> => {
876 const supervision = installCommandSupervision('init', { progressPaths: [dbPath, `${dbPath}-wal`] });
877 try {
878 if (options.verbose) {
879 return await cg.indexAll({ onProgress: createVerboseProgress(), verbose: true });
880 }
881 process.stdout.write(`${colors.dim}${getGlyphs().rail}${colors.reset}\n`);
882 const progress = createShimmerProgress();
883 const r = await cg.indexAll({ onProgress: progress.onProgress });
884 await progress.stop();
885 return r;
886 } finally {
887 supervision.stop();
888 }
889 };
890 const result = await runIndex();
891 printIndexResult(clack, result, projectPath);
892 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