Continue reindexes all docs on every startup
Before submitting your bug report
- [x] I believe this is a bug. I'll try to join the Continue Discord for questions
- [x] I'm not able to find an open issue that reports the same bug
- [x] I've seen the troubleshooting guide on the Continue Docs
Relevant environment info
- OS: All
- Continue version: Latest stable
- IDE version: Latest VSCode and IntelliJ
- Model: nomic-embed-text
- config: https://hub.continue.dev/expedientfalcon/expedientfalcon-versatile
Description
Every time I start either VSCode or IntelliJ, Continue clears all my previous Docs indexes and reindexes all of them from scratch. This seems completely unnecessary and wastes my CPU/GPU power. Continue needs to be able to skip re-indexing if a site is already in the local Lancedb index for a given model.
To reproduce
- Have a moderate number of docs
- Restart your IDE
- Look at Docs tab
- See that they are all reindexing from scratch
Log output
I have a suspicion it's being caused by this block in DocsService.ts
// Anything found in sqlite but not in new config should be deleted
const deletedDocs = currentlyIndexedDocs.filter(
(doc) => !newConfigStartUrls.includes(doc.startUrl),
);
...
for (const doc of deletedDocs) {
await this.deleteIndexes(doc.startUrl);
}
When Continue loads, it takes several seconds for it to fetch the remote assistant configs. Until then, it defaults back to the local assistant config. If the user has their docs set up in the remote assistant but not in the local assistant, then this code to delete all non-existent docs from the index will cause all doc indexes to be cleared out on every restart, which is the behavior I am seeing.
:tada: This issue has been resolved in version 1.1.0 :tada:
The release is available on:
Your semantic-release bot :package::rocket: