continue icon indicating copy to clipboard operation
continue copied to clipboard

Error throw when using @codebase in the prompt: Cannot read properties of undefined (reading 'sort')

Open CallMeLaNN opened this issue 1 year ago • 7 comments

Before submitting your bug report

Relevant environment info

- OS: MacOS 12.6
- Continue: v0.8.43
- IDE: VSCode 1.91.1 (Universal)
- Model: Any
- config.json:
  
  {
    "models": [...],
    ...,
    "embeddingsProvider": {
      ... // Any provider I tried, transformer.js, ollama and openai (voyage)
    },
    "reranker": {
      "name": "voyage",
      "params": {
        "model": "rerank-1",
        "contextLength": 8000,
        "apiKey": "abcd"
      }
    },
    "contextProviders": [
      ...,
      {
        "name": "codebase",
        "params": {
          "nRetrieve": 25,
          "nFinal": 5,
          "useReranking": true
        }
      },
    ],
  }

Description

I'm evaluating different embeddings models and config. I don't have embeddings issue before but since yesterday, I got this error. I try to change different settings, try different provider, use back the old one but it doesn't work anymore.

I don't provide the embeddings config above because I tried each one of the provider but still doesn't work. It was working before. Let me know if you still need one example of mine.

To reproduce

  1. Update embeddings config
  2. In the Continue chat, click green dot besides model dropdown list to force reindex.
  3. Clear the Continue log in VSCode OUTPUT tab.
  4. Start Continue chat with "@codebase "
  5. VSCode notification and DevTool Console produce the error above
  6. Observe the Continue log. It doesn't add the relevant context to LLM
  7. LLM give general answer as it don't know about the code
  8. Try restart the VSCode and repeat, try different embeddings model, provider and config. Same result.

Log output

==========================================================================
==========================================================================
Settings:
contextLength: 4096
model: meta-llama/llama-3.1-8b-instruct:free
maxTokens: 1024
log: undefined

############################################

<user>
where is the relevant code and files that set the theming for this website?

==========================================================================
==========================================================================
Completion:

Unfortunately, I don't have the capability to browse the internet or access any specific website's code or files. However, I can give you some general information about where to look for theming-related code on a website.

Most modern websites use a combination of HTML, CSS, and JavaScript to display their content and apply their theme. Here are some places you might look to find the relevant code and files:

...

Keep in mind that the location and naming conventions may vary depending on the website's architecture and technology stack. To find the relevant code and files, you can use a combination of search engines, developer tools, and DNS reconnaissance techniques.

EDIT: Before this thing happened, I know my embedding was working fine, I saw the log produce a relevant context of my codebase

CallMeLaNN avatar Jul 27 '24 07:07 CallMeLaNN