(rootPath)
| 67 | } |
| 68 | |
| 69 | function hasIndexArtifacts(rootPath) { |
| 70 | const contextDir = path.join(rootPath, '.codebase-context'); |
| 71 | const keywordIndexPath = path.join(contextDir, 'index.json'); |
| 72 | const vectorDirPath = path.join(contextDir, 'index'); |
| 73 | return existsSync(keywordIndexPath) && existsSync(vectorDirPath); |
| 74 | } |
| 75 | |
| 76 | async function maybeReindex(rootPath, skipReindex) { |
| 77 | if (skipReindex && hasIndexArtifacts(rootPath)) { |