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.3k stars 925 forks source link

jetBrains plugin: Unable to add new @docs context using a URL #1608

Open akg83 opened 1 week ago

akg83 commented 1 week ago

Before submitting your bug report

Relevant environment info

- OS: Ubuntu 22.04.4 LTS
- Continue: 0.0.50
- IDE: jetBrains phpStorm and pyCharm

Description

Unable to add a new "docs" context via URL, getting the following error:

Error getting context items from folder: Error: local_files_only=true or env.allowRemoteModels=false and file was not found locally at "/snapshot/continue-deploy/binary/models/all-MiniLM-L6-v2/tokenizer.json".

I can't seem to find any solution by changing the config file, or placing the all-MiniLM-L6-v2 model folder at the requested folder path or anything like this.

if it helps, I am using continue.dev completely local via an exposed local API of text-generation-webui (supported by Continue.dev), I don't use ollama or something like that

To reproduce

  1. Open the "Continue.dev" pane/console (installed in an jetBrains IDE e.g. IDEA, PyCharm or phpStorm etc.)
  2. Click at the prompt input "Add Context", then choose "Docs", finally click "Add Docs"
  3. Type-in the direct URL to the documentation you would like to add/index, as well as a title text
  4. click on "Done"
  5. within 1-2 seconds you will see the given error message (in my case at the bottom of the IDE which disappear after 2-3 seconds)

Log output

No response

Patrick-Erichsen commented 1 week ago

@akg83 thanks for the report! Could you share your config.json file?

sestinj commented 1 week ago

Right now we aren't shipping with support for transformer.js in the JetBrains extension, which is causing the error you're seeing. In newer versions we will have more clear error messages.

Due to the way that docs currently works, it is coupled to transformers.js, so for the time being (though we will fix this soon), the docs context provider isn't supported in JetBrains. We are putting a lot more focus into JetBrains right now, so I hope to have an update for you soon!

dandv commented 1 week ago

I don't even see "Add docs" in Pycharm:

image

Clicking the "Add more context providers" option takes me to https://docs.continue.dev/customization/context-providers#built-in-context-providers

dandv commented 1 week ago

transformers.js, so for the time being (though we will fix this soon), the docs context provider isn't supported in JetBrains.

I've installed Continue in PyCharm, and do see this in config.json:

  "embeddingsProvider": {
    "provider": "transformers.js"
  }

Was that intended, since transformers.js doesn't work in JetBrains IDEs? Or have I pasted it from somewhere, and Continue ships with "provider": "free-trial" by default?

sestinj commented 1 week ago

I believe that we were setting transformers.js as default when going through local onboarding, which is probably what caused that. Again something that is already fixed for the next release.

As you've noticed JetBrains is slightly behind, but there's been a pretty big push this week that will continue until it's up-to-date with VS Code, including much more frequent automated releases

akg83 commented 1 week ago

I don't even see "Add docs" in Pycharm:

image

Clicking the "Add more context providers" option takes me to https://docs.continue.dev/customization/context-providers#built-in-context-providers

This is not done by adding a context provider, it is done by typing @docs, so that the docs sub menu opens, then you can either choose one of the docs that are available with the continue.dev extension by default, or at the very bottom of this list you have an option to type a specific URL (which point to a documentation root) and add it so that continue.dev can index it and you can use it as doc.

I actually have PyCharm and can get to add a new "docs" URL by using my given instructions

akg83 commented 1 week ago

@akg83 thanks for the report! Could you share your config.json file?

sure here is my config json:

{ "models": [ { "title": "Ollama", "provider": "ollama", "model": "AUTODETECT" }, ], "slashCommands": [ { "name": "edit", "description": "Edit selected code" }, { "name": "comment", "description": "Write comments for the selected code" }, { "name": "share", "description": "Export this session as markdown" }, { "name": "cmd", "description": "Generate a shell command" } ], "customCommands": [ { "name": "test", "prompt": "Write 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" } ], "contextProviders": [ { "name": "diff", "params": {} }, { "name": "open", "params": {} }, { "name": "terminal", "params": {} }, { "name": "problems", "params": {} }, { "name": "codebase", "params": {} }, { "name": "code", "params": {} }, { "name": "docs", "params": {} } ], "tabAutocompleteModel": { "title": "Starcoder 3b", "provider": "ollama", "model": "starcoder2:3b" }, "embeddingsProvider": { "provider": "transformers.js" } }

akg83 commented 1 week ago

@sestinj is there any way to "mannually" add custom @docs documentation item ? at least until that issue is fixed for InteliJ

fry69 commented 1 week ago

@akg83 Manually adding a @docs via config.json is a feature request -> https://github.com/continuedev/continue/issues/1442 and the implementation is currently in draft stage -> https://github.com/continuedev/continue/pull/1594

akg83 commented 1 week ago

@akg83 Manually adding a @docs via config.json is a feature request -> #1442 and the implementation is currently in draft stage -> #1594

ahh ok, I thought of it is a temporary solution until the issue it self is resolved and a new jetBrains plugin is released. if so, makes more sense to wait for the fix in the net jetBrains plugin to come.