Skip to content

Commit bdb5f24

Browse files
authored
Merge pull request #7846 from continuedev/pe/indexing-issue
fix: race condition on disabled indexing
2 parents fab3d6a + 1f7a93e commit bdb5f24

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

core/core.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,17 @@ export class Core {
232232
return;
233233
}
234234

235+
// Check for disableIndexing to prevent race condition
236+
const { config } = await this.configHandler.loadConfig();
237+
if (!config || config.disableIndexing) {
238+
void this.messenger.request("indexProgress", {
239+
progress: 0,
240+
desc: "Indexing is disabled",
241+
status: "disabled",
242+
});
243+
return;
244+
}
245+
235246
void this.codeBaseIndexer.refreshCodebaseIndex(dirs);
236247
});
237248
});

0 commit comments

Comments
 (0)