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

Function runIndex

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

Source from the content-addressed store, hash-verified

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