Continue.dev cannot index two highly similar directories for @Codebase #4254
Labels
area:indexing
Relates to embedding and indexing
ide:vscode
Relates specifically to VS Code extension
kind:bug
Indicates an unexpected problem or unintended behavior
"needs-triage"
Before submitting your bug report
Relevant environment info
Description
If I open a directory containing identical files as a previously indexed directory, then I will not be able to retrieve any context items with
@Codebase
in the new directory. It will only include the files that are currently open in the IDE. If the two directories are similar but not fully identical, then all the identical files will be invisible to@Codebase
, and only modified files can appear.To reproduce
Here I provide very precise repro steps, it doesn't have to be done this way.
First, clone this repo: https://github.com/dateutil/dateutil
Then, make a copy of the directory called dateutil_v2.
Open dateutil in VSCode, and follow the steps in this video. At some point in the middle, I open the dateutil_v2 directory.
continue_dev_similar_repo.mp4
I went a step further and looked inside the
index.sqlite
file, while also debugging to see what query was being run. There, I find that the query includes the filter clauseWHERE ... chunk_tags.tag IN ([directory name])
. I see no new chunks were being added for the new directory, so there is nothing corresponding to the new directory in thechunks_tags
table, but the SQL query is still looking for the new directory name in that table, so nothing is retrieved since everything is filtered out of theWHERE
clause.This sounds to me like a caching optimization is being done to efficiently update the index when a given code base is being updated, but that this caching is also affecting the indexing of new directories. The new directory contents are not indexed since the chunks match cached items, but the search cannot actually use these cached chunks due to the way the SQL queries are made, so nothing can be found in the index.
Log output
The text was updated successfully, but these errors were encountered: