* True when the on-disk index was built by an engine whose extraction is * older than the one now running — i.e. a re-index would add data a migration * can't backfill. False when there's no index yet (nothing to refresh) or the * stamp is current. This is the signal behind `codegraph statu
()
| 2242 | * hint and `codegraph upgrade`'s reminder. |
| 2243 | */ |
| 2244 | isIndexStale(): boolean { |
| 2245 | if (this.queries.getLastIndexedAt() == null) return false; |
| 2246 | const { extractionVersion } = this.getIndexBuildInfo(); |
| 2247 | return extractionVersion == null || extractionVersion < EXTRACTION_VERSION; |
| 2248 | } |
| 2249 | |
| 2250 | /** |
| 2251 | * Extract nodes and edges from source code (without storing) |