continuedev / continue

⏩ Continue is the leading open-source AI code assistant. You can connect any models and any context to build custom autocomplete and chat experiences inside VS Code and JetBrains
https://docs.continue.dev/
Apache License 2.0
13.64k stars 957 forks source link

The Continue screen keeps solid white with no content #1444

Open rudifus opened 1 month ago

rudifus commented 1 month ago

Before submitting your bug report

Relevant environment info

- OS: Windows 10 Pro 22H2 64bit
- Continue: 0.0.50
- IDE: Android Studio Jellyfish | 2023.3.1 Patch 1
Model: codestral with API key

Hint: I have fixed the JCEF is not supported in this env or failed to initialize 
by changing Boot IDE JRE version to one with JCEF support

Description

The Continue screen keeps solid white with no content. in Plugin core.log I can see the attached error message. Android project with java is opened in Android Studio

To reproduce

1.) Ctrl+J opens blank white Continue Window in Android Studio

Log output

core.log
[info] Starting Continue core...
[2024-06-07T19:15:20] [info] Starting Continue core... 
[2024-06-07T19:15:22] Error updating the vectordb::all-MiniLM-L6-v2 index: Error: `local_files_only=true` or `env.allowRemoteModels=false` and file was not found locally at "C:\snapshot\continue-deploy\binary\models/all-MiniLM-L6-v2/tokenizer.json".
sestinj commented 1 month ago

@rudifus the vectordb error is solvable by switching to an embeddingsProvider other than transformers.js: https://docs.continue.dev/walkthroughs/codebase-embeddings#embeddings-providers

If you right click on the window, is there an option to Open Dev Tools and view the console?

eladamittai commented 1 month ago

@rudifus the vectordb error is solvable by switching to an embeddingsProvider other than transformers.js: https://docs.continue.dev/walkthroughs/codebase-embeddings#embeddings-providers

If you right click on the window, is there an option to Open Dev Tools and view the console?

I encountered a similar problem with an openAI embeddings provider. My config works for pycharm 2023.1.1, but not for 2023.2

IDE: pycharm community 2023.2 Plugin version: 0.0.50 OS: windows 10

IMG_20240618_112351.jpg

The logs:

Core.log [Info] starting continue core... Unknown context provider files Unknown context provider files [Info] exiting continue core...

Config:


{
"embeddingsProvider": {
"provider": "openai",
"model": "codet5p-110m-embedding",
"apiBase": " my api base",
"apiKey": " my api key "
},
"contextProviders": [
{
"name": "files",
"params": {}
}
]
}```
sestinj commented 1 month ago

@eladamittai the "files" context provider is built in, so you don't need to add it manually. However I tried this to double-check whether this was causing the core to exit, but that doesn't seem to be the problem.

If you could try inspecting the Dev Tools console logs that would likely point to the source of the problem

rudifus commented 1 month ago

@rudifus the vectordb error is solvable by switching to an embeddingsProvider other than transformers.js: https://docs.continue.dev/walkthroughs/codebase-embeddings#embeddings-providers

If you right click on the window, is there an option to Open Dev Tools and view the console?

@eladamittai So in my case the windows is not anymore white - as I have already updated bott IDE JRE with JCEF support - that helped

@sestinj The screen is actually black (likely deppends on system UI theme flag)- though no possibility to access the above mentioned dev console, nor settings .. the window is simply empty. On my other linux machine the Continue plugin works without issues there and I have settings icon available there.

here is my config

{
  "models": [
    {
      "title": "Codestral",
      "provider": "mistral",
      "model": "codestral-latest",
      "apiKey": "my_api-key",
      "apiBase": "https://codestral.mistral.ai/v1/"
    }
  ],
  "customCommands": [
    {
      "name": "test",
      "prompt": "{{{ input }}}\n\nWrite a comprehensive set of unit tests for the selected code. It should setup, run tests that check for correctness including important edge cases, and teardown. Ensure that the tests are complete and sophisticated. Give the tests just as chat output, don't edit any file.",
      "description": "Write unit tests for highlighted code"
    }
  ],
"tabAutocompleteModel": {
    "title": "Codestral",
    "provider": "mistral",
    "model": "codestral-latest",
    "apiKey": "my_api_key",
    "apiBase": "https://codestral.mistral.ai/v1/"
  },
  "embeddingsProvider": {
    "provider": "mistral",
    "model": "codestral-latest",
        "apiKey": "my_api_key",
    "apiBase": "https://codestral.mistral.ai/v1/"
  },
  "allowAnonymousTelemetry": false
}

and after I added the embeddings provider for mistral - the log now contains

[info] Starting Continue core...
[2024-06-18T20:22:26] [info] Starting Continue core... 
[2024-06-18T20:22:29] Error updating the vectordb::undefined index: TypeError: this.embeddingsProvider.embed is not a function

I can update my config based what I got in my other linux machine later during week ;0) thank You for your assitance

rudifus commented 3 weeks ago

I have updated wondows config.json

{
  "models": [
    {
      "title": "Codestral",
      "provider": "mistral",
      "model": "codestral-latest",
      "apiKey": "my_key",
      "apiBase": "https://codestral.mistral.ai/v1/"
    }
  ],

  "embeddingsProvider": {
    "provider": "mistral",
    "model": "codestral-latest",
    "apiKey": "my_key",
    "apiBase": "https://codestral.mistral.ai/v1/"
  },
  "allowAnonymousTelemetry": true
}

though the plugin in Android Studio is not yet initialized properly

[info] Starting Continue core...
[2024-06-25T18:15:26] [info] Starting Continue core... 
[2024-06-25T18:15:33] Error updating the vectordb::undefined index: TypeError: this.embeddingsProvider.embed is not a function
fry69 commented 3 weeks ago

You cannot use Codestral as an embeddings provider. Either remove the embeddingsProvider definition completely or use a local embeddings model via ollama like this

"embeddingsProvider": {
  "provider": "ollama",
  "model": "nomic-embed-text",
  "apiBase": "http://localhost:11434"
},
mat-gritz commented 3 weeks ago

I'm also facing the same issue in Intellij Community Edition. My core.log is pretty much empty.

[info] Starting Continue core...
[2024-06-25T18:49:20] [info] Starting Continue core... 
[2024-06-25T18:49:20] Setup 
[2024-06-25T18:49:20] Core started 

Here's my config.js

{
  "models": [
    {
      "model": "claude-3-5-sonnet-20240620",
      "contextLength": 200000,
      "title": "Claude 3.5 Sonnet",
      "apiKey": "MYAPIKEY",
      "provider": "anthropic"
    },
    {
      "title": "Codestral",
      "model": "codestral-latest",
      "provider": "mistral",
      "apiKey": "MYAPIKEY"
    }
  ],
  "customCommands": [
    {
      "name": "test",
      "prompt": "{{{ input }}}\n\nWrite a comprehensive set of unit tests for the selected code. It should setup, run tests that check for correctness including important edge cases, and teardown. Ensure that the tests are complete and sophisticated. Give the tests just as chat output, don't edit any file.",
      "description": "Write unit tests for highlighted code"
    }
  ],
  "tabAutocompleteModel": {
    "title": "Codestral",
    "provider": "mistral",
    "model": "codestral-latest",
    "apiKey": "MYAPIKEY"
  },
  "allowAnonymousTelemetry": false,
  "embeddingsProvider": {
    "provider": "ollama",
    "model": "nomic-embed-text",
    "apiBase": "http://localhost:11434"
  },
  "reranker": {
    "name": "free-trial"
  }
}

I noticed that the DevTools console is failing to load the index.js and index.css resources. image

Both files appear to be empty, according to the DevTools application tab. image image

rudifus commented 3 weeks ago

@fry69 thank you for hint how to change env so that I can access Mistral AI remotely via Continue plugin inside Android Studio?

now the core.log says:

[info] Starting Continue core...
[2024-06-25T18:53:57] [info] Starting Continue core... 
[2024-06-25T18:53:58] Error updating the vectordb::all-MiniLM-L6-v2 index: Error: `local_files_only=true` or `env.allowRemoteModels=false` and file was not found locally at "C:\snapshot\continue-deploy\binary\models/all-MiniLM-L6-v2/tokenizer.json". 
sestinj commented 3 weeks ago

@matgritz9 Are you on version 0.0.52 by any chance? We had a defect in the build that would have caused this index.js/index.css missing error, but I've since removed it from the store, and we'll have new versions up soon. If you're on an older version and still seeing the error that would be helpful to know as well

fry69 commented 3 weeks ago

@rudifus Looks like my hint for just removing the embeddings model was not helpful. This triggers the transformers.js MiniLM model as a default. But that is not supported in JetBrains IDEs. Sorry for that.

I have three options for you now, let's see if one works:

Try setting an empty embeddingsProvider:

  "embeddingsProvider": {},

or use the "Free Trial" embeddings Provider:

  "embeddingsProvider": {
    "provider": "free-trial"
  },

or use ollama/Nomic as described above.

I have no clue about your remote AndroidStudio setup question, sorry.

mat-gritz commented 3 weeks ago

@sestinj Yeah, I'm on 0.0.52. I wasn't aware of that issue, I just uninstalled it and installed 0.0.50. Everything appears to be working as intended now. Thanks for the help and for the work into continue!

rudifus commented 3 weeks ago

@fry69 the "Free Trial" embeddings seems to resolve some issues, yet the Continue tab is empty

[info] Starting Continue core...
[2024-06-25T19:55:11] [info] Starting Continue core... 
[2024-06-25T19:55:15] Chunk with more than 500 tokens constructed:  ....Location.java 1791
...
[2024-06-25T19:55:36] Error updating the vectordb::voyage-code-2 index: Error: Failed to embed: 500 Error in Continue free trial server: Cannot read properties of undefined (reading 'map') 

with ollama's local model instances - the core .log has no errors anymore, unfortunately the Continue tab screen keeps empty, no console access there :(