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

Function unfinishedIndexWarning

src/bin/codegraph.ts:762–774  ·  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

760 * now, whose `indexing` is that run's own, not an interrupted one's.
761 */
762function unfinishedIndexWarning(indexState: string | null, rebuildInProgress: boolean): string | null {
763 if (rebuildInProgress) return null;
764 switch (indexState) {
765 case 'indexing':
766 return 'The last index run never finished (killed mid-index?) — the index is truncated. Re-run "codegraph index".';
767 case 'partial':
768 return 'The last index run silently dropped files — the index is partial. Re-run "codegraph index".';
769 case 'failed':
770 return 'The last index run failed — results may be incomplete. Re-run "codegraph index".';
771 default:
772 return null;
773 }
774}
775
776/**
777 * 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