continue icon indicating copy to clipboard operation
continue copied to clipboard

codebase status aways initicalize

Open shuwenkai opened this issue 4 months ago • 0 comments

Before submitting your bug report

Relevant environment info

- OS:
- Continue version:
- IDE version:
- Model:
- config:
  

  
  OR link to assistant in Continue hub:

Description

No response

To reproduce

Image

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


shuwenkai avatar Jun 13 '25 06:06 shuwenkai