continue
continue copied to clipboard
codebase status aways initicalize
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:
- Continue version:
- IDE version:
- Model:
- config:
OR link to assistant in Continue hub:
Description
No response
To reproduce
I noticed that on my machine, the status of my codebase has been stuck in a "loading" state. While debugging through the source code, I traced the issue to CodebaseIndexer.ts, where the method this.updateProgress is called. However, this method waits indefinitely for a promise to complete, causing the process to enter a lengthy waiting state the first time it reaches this point.
I suspect this occurs because the indexProgress event is not registered on the page at this stage. Since this event is registered in IndexingProgress.tsx, and the component hasn't been loaded yet when the process first arrives here, would adding a timeout mechanism be a viable solution?
For example, this is my attempt:
private async updateProgress(update: IndexingProgressUpdate) {
this.codebaseIndexingState = update;
if (this.messenger) {
await Promise.race([
this.messenger.request("indexProgress", update),
new Promise((res) => {
setTimeout(() => {
console.log('indexProgress timeout')
res(undefined)
}, 5000);
})
])
}
}
Alternatively, a timeout mechanism should be added to the messager's request method. Although the timeout is caught here, the actual request operation has not been terminated. I'm not an excellent developer, so I'm seeking a robust solution here and hoping to receive feedback.
Log output