continue icon indicating copy to clipboard operation
continue copied to clipboard

Continue reindexes all docs on every startup

Open shssoichiro opened this issue 10 months ago • 1 comments

Before submitting your bug report

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

  1. Have a moderate number of docs
  2. Restart your IDE
  3. Look at Docs tab
  4. See that they are all reindexing from scratch

Log output


shssoichiro avatar Jun 16 '25 06:06 shssoichiro

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.

shssoichiro avatar Jun 16 '25 15:06 shssoichiro

:tada: This issue has been resolved in version 1.1.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

sestinj avatar Jul 22 '25 05:07 sestinj