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

Function runIndex

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

Source from the content-addressed store, hash-verified

801 // index if the user opts gitignored child repos in below (#1156).
802 const dbPath = getDatabasePath(projectPath);
803 const runIndex = async (): Promise<IndexResult> => {
804 const supervision = installCommandSupervision('init', { progressPaths: [dbPath, `${dbPath}-wal`] });
805 try {
806 if (options.verbose) {
807 return await cg.indexAll({ onProgress: createVerboseProgress(), verbose: true });
808 }
809 process.stdout.write(`${colors.dim}${getGlyphs().rail}${colors.reset}\n`);
810 const progress = createShimmerProgress();
811 const r = await cg.indexAll({ onProgress: progress.onProgress });
812 await progress.stop();
813 return r;
814 } finally {
815 supervision.stop();
816 }
817 };
818 const result = await runIndex();
819 printIndexResult(clack, result, projectPath);
820 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