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

Function unfinishedIndexWarning

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

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