The @codebase index gets stuck in the 'Initializing' state
Before submitting your bug report
- [ ] I believe this is a bug. I'll try to join the Continue Discord for questions
- [ ] I'm not able to find an open issue that reports the same bug
- [ ] I've seen the troubleshooting guide on the Continue Docs
Relevant environment info
- OS:
- Continue version:
- IDE version:
- Model:
- config:
- name: Embed model
model: unclemusclez/jina-embeddings-v2-base-code
apiBase: http://xxxxx/client/api/
roles:
- embed
provider: openai
OR link to assistant in Continue hub:
Description
The latest pre-release version has an issue where the @codebase index gets stuck in the 'Initializing' state. Restarting both the IDE and the plugin does not resolve it. This occurs in the VS Code pre-release version 1.1.45.
To reproduce
No response
Log output
@RomneyDa I think the solution would be changing this line
await this.messenger.request("indexProgress", update);
to
this.messenger.send("indexProgress", update);
for updateProgress function in core/indexing/CodebaseIndexer.ts
The bug was because the function is waiting the first response from the useWebviewListener hook in gui/src/pages/config/IndexingProgress.tsx, but since users might not in the index page when the core was sending the first request, this request was missed and the indexing process just stuck there forever.
Because it's not necessary for the core to make sure that the webview do receive the index update message, we can just use send method instead. Also, it's very likely that users don't even check the index page during the entire codebase indexing process. The index/indexingProgressBarInitialized will take care of fetching the current status of the codebase indexing when users first navigate to the index page so it's not a problem to miss all the indexProgress messages.
I encountered this, and I can confirm this is a showstopper : no more indexing at all, whether you consult the indexing progress UI or not. Just init a new repo, add a few files, and check the calls to the indexing model: there is none.
This issue is fixed by https://github.com/continuedev/continue/commit/955ab93efc3f488127d16673b89f3900f75c2007.
However, I don't think it's a good practice to just call request function and add a few event listeners idling forever.
Strongly suggest using send function if we're not waiting or don't care about the response.
@RomneyDa What do you think?
This issue hasn't been updated in 90 days and will be closed after an additional 10 days without activity. If it's still important, please leave a comment and share any new information that would help us address the issue.
This issue was closed because it wasn't updated for 10 days after being marked stale. If it's still important, please reopen + comment and we'll gladly take another look!