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

Function unfinishedIndexWarning

src/bin/codegraph.ts:752–764  ·  view source on GitHub ↗

* What `status` and `init` say about an index whose last run didn't end well: * null for a complete index, and for one another process is rebuilding right * now, whose `indexing` is that run's own, not an interrupted one's.

(indexState: string | null, rebuildInProgress: boolean)

Source from the content-addressed store, hash-verified

750 * now, whose `indexing` is that run's own, not an interrupted one's.
751 */
752function unfinishedIndexWarning(indexState: string | null, rebuildInProgress: boolean): string | null {
753 if (rebuildInProgress) return null;
754 switch (indexState) {
755 case 'indexing':
756 return 'The last index run never finished (killed mid-index?) — the index is truncated. Re-run "codegraph index".';
757 case 'partial':
758 return 'The last index run silently dropped files — the index is partial. Re-run "codegraph index".';
759 case 'failed':
760 return 'The last index run failed — results may be incomplete. Re-run "codegraph index".';
761 default:
762 return null;
763 }
764}
765
766/**
767 * How the last index run of an initialized project ended, read the way

Callers 2

readLastIndexRunFunction · 0.85
mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected