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

Function runIndex

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

Source from the content-addressed store, hash-verified

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