LanceDb/indexing issue
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: macOS 14.4.1
- Continue: main
- IDE: vscode
Description
When building from the main branch in the vscode debugger, no lancedb is created within the .continue directory. This leads to indexing issues when the @Docs or @Codebase contexts are used.
Downloading an older version, leaving the .continue directory alone, then installing main again works because .continue/index/lancedb already exists in that scenario.
To reproduce
- Remove all references to
.continueon your environment. - Run Task
install-dependanciesand run VSCode Debugger inmain. - Verify LanceDB directory doesn't show up at
.continue/index/lancedb. - Run
@Docsor@Codebase. - Get an error popup and failure to index.
Log output
Error refreshing index: TypeError: failed to downcast any to Array
at Object.connect (.../continue/core/node_modules/vectordb/src/index.ts:195:20)
at _LanceDbIndex.update (.../continue/core/indexing/LanceDbIndex.ts:141:30)
at async CodebaseIndexer.refresh (.../continue/core/indexing/indexCodebase.ts:104:43)
at async _VsCodeExtension.refreshCodebaseIndex (.../continue/extensions/vscode/out/extension.js:331802:26) {stack: 'TypeError: failed to downcast any to Array
a…extensions/vscode/out/extension.js:331802:26)', message: 'failed to downcast any to Array'}
@nmcostello thanks for making an issue for this—I've been seeing it the last couple of days in the preview branch as well, but oddly not in production. I've not yet confirmed that it doesn't happen after packaging, but that seems to be the case.
Probably a git bisect will reveal the offending commit (assuming there is one)
I am seeing this issue as well -- even after packaging and installing the extension (built from source).
@spew @sestinj We fixed the issue today by doing a few things:
- Delete
core/package-lock.jsonandextensions/vscode/package-lock.json - Modify the
vectordbentry in bothcore/package.jsonandextensions/vscode/package.json:"dependencies": { - "vectordb": "0.4.12", + "vectordb": "^0.4.12", } - Run
install-dependencies.sh(via command line or VSCode tasks) - Install
.vsixor run the debugger
Edit: I ran git clean -fdX and removed any uncommited code before doing all of this. I don't know if that was necessary or not I just wanted to start from a clean slate.
Definitely happening with me. I've been seeing it for a few days.
@nmcostello thanks for sharing the fix. Will try and get this integrated today
Confirming that switching back to ^0.4.12 solves the issue (https://github.com/continuedev/continue/commit/3749a8cc40a885ac845ea36a281df517785435bf).
The original reason for pinning to 0.4.12 was this, which is now fixed, so the change is safe.
I'm making a release for 0.9.127 right now, but I'll leave this issue for a couple of days to confirm that the new version solves the problem