diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 98ca8db1e..391d81cfb 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -77,6 +77,8 @@ nvm use 1. The new VS Code window with the extension is referred to as the _Host VS Code_ 2. The window you started debugging from is referred to as the _Main VS Code_ +4. To package the extension, run `npm run package` in the `extensions/vscode` directory. This will generate `extensions/vscode/build/continue-patch.vsix`, which you can install by right-clicking and selecting "Install Extension VSIX". + > Note: Breakpoints can be used in both the `core` and `extensions/vscode` folders while debugging, but are not currently supported inside of `gui` code. Hot-reloading is enabled with Vite, so if you make any changes to the `gui`, they should be automatically reflected without rebuilding. Similarly, any changes to `core` or `extensions/vscode` will be automatically included by just reloading the _Host VS Code_ window with cmd/ctrl+shift+p "Reload Window". #### JetBrains diff --git a/core/autocomplete/templates.ts b/core/autocomplete/templates.ts index c153badd7..2755771aa 100644 --- a/core/autocomplete/templates.ts +++ b/core/autocomplete/templates.ts @@ -113,7 +113,7 @@ export function getTemplateForModel(model: string): AutocompleteTemplate { return deepseekFimTemplate; } - if (lowerCaseModel.includes("gpt")) { + if (lowerCaseModel.includes("gpt") || lowerCaseModel.includes("davinci-002")) { return gptAutocompleteTemplate; } diff --git a/docs/docs/model-setup/configuration.md b/docs/docs/model-setup/configuration.md index b92c7a5e8..b1a35f56a 100644 --- a/docs/docs/model-setup/configuration.md +++ b/docs/docs/model-setup/configuration.md @@ -69,6 +69,8 @@ Basic authentication can be done with any provider using the `apiKey` field: } ``` +This translates to the header `"Authorization": "Bearer xxx"`. + If you need to send custom headers for authentication, you may use the `requestOptions.headers` property like in this example with Ollama: ```json title="~/.continue/config.json" diff --git a/docs/docs/troubleshooting.md b/docs/docs/troubleshooting.md index a733ec327..a452bff57 100644 --- a/docs/docs/troubleshooting.md +++ b/docs/docs/troubleshooting.md @@ -8,16 +8,22 @@ keywords: [reload, delete, manually, logs, server, console] The Continue VS Code extension is currently in beta, and the Intellij extension is in Alpha. If you are having trouble, please follow the steps below. -## Check the console logs (VS Code) +## Check the logs To solve many problems, the first step is reading the logs to find the relevant error message. To do this, follow these steps: +### VS Code + 1. `cmd+shift+p` (MacOS) / `ctrl+shift+p` (Windows) 2. Search for and then select "Developer: Toggle Developer Tools" 3. This will open the [Chrome DevTools window](https://developer.chrome.com/docs/devtools/) 4. Select the `Console` tab 5. Read the console logs +### JetBrains + +Open `~/.continue/core.log`. The most recent logs are found at the bottom of the file. + ## Configure Certificates If you're seeing a `fetch failed` error and your network requires custom certificates, you will need to configure them in `config.json`. In each of the objects in the `"models"` array, add `requestOptions.caBundlePath` like this: diff --git a/docs/docs/walkthroughs/tab-autocomplete.md b/docs/docs/walkthroughs/tab-autocomplete.md index e31506f01..08e3a12fc 100644 --- a/docs/docs/walkthroughs/tab-autocomplete.md +++ b/docs/docs/walkthroughs/tab-autocomplete.md @@ -1,6 +1,6 @@ # Tab Autocomplete (beta) -Continue now provides support for tab autocomplete in [the VS Code extension](https://marketplace.visualstudio.com/items?itemName=Continue.continue) (make sure to download the pre-release). We will be greatly improving the experience over the next few releases, and it is always helpful to hear feedback. If you have any problems or suggestions, please let us know in our [Discord](https://discord.gg/vapESyrFmJ). +Continue now provides support for tab autocomplete in [the VS Code extension](https://marketplace.visualstudio.com/items?itemName=Continue.continue). We will be greatly improving the experience over the next few releases, and it is always helpful to hear feedback. If you have any problems or suggestions, please let us know in our [Discord](https://discord.gg/vapESyrFmJ). ## Setting up with Ollama (default) @@ -14,7 +14,7 @@ Once it has been downloaded, you should begin to see completions in VS Code. ## Setting up a custom model -All of the configuration options available for chat models are available to use for tab-autocomplete. For example, if you wanted to use a remote Ollama instance you would edit your `config.json` like this: +All of the configuration options available for chat models are available to use for tab-autocomplete. For example, if you wanted to use a remote Ollama instance you would edit your `config.json` like this (note that it is not inside the models array): ```json title=~/.continue/config.json { @@ -30,6 +30,16 @@ All of the configuration options available for chat models are available to use If you aren't yet familiar with the available options, you can learn more in our [overview](../model-setup/overview.md). +### What model should I use? + +If you are running the model locally, we recommend `starcoder:3b`. + +If you find it to be too slow, you should try `deepseek-coder:1.3b-base`. + +If you have a bit more compute, or are running a model in the cloud, you can upgrade to `deepseek-coder:6.7b-base`. + +Regardless of what you are willing to spend, we do not recommend using GPT or Claude for autocomplete. Learn why [below](#i-want-better-completions-should-i-use-gpt-4). + ## Configuration Options The following can be configured in `config.json`: @@ -71,18 +81,21 @@ This object allows you to customize the behavior of tab-autocomplete. The availa ## Troubleshooting +### I want better completions, should I use GPT-4? + +Perhaps surprisingly, the answer is no. The models that we suggest for autocomplete are trained with a highly specific prompt format, which allows them to respond to requests for completing code (see examples of these prompts [here](https://github.com/continuedev/continue/blob/d2bc6359e8ebf647892ec953e418042dc7f8a685/core/autocomplete/templates.ts)). Some of the best commercial models like GPT-4 or Claude are not trained with this prompt format, which means that they won't generate useful completions. Luckily, a huge model is not required for great autocomplete. Most of the state-of-the-art autocomplete models are no more than 10b parameters, and increasing beyond this does not significantly improve performance. + ### I'm not seeing any completions Follow these steps to ensure that everything is set up correctly: -1. Make sure you have the pre-release version of the extension installed. -2. Make sure you have the "Enable Tab Autocomplete" setting checked (can toggle by clicking the "Continue" button in the status bar). -3. Make sure you have downloaded Ollama. -4. Run `ollama run starcoder:3b` to verify that the model is downloaded. -5. Make sure that any other completion providers are disabled (e.g. Copilot), as they may interfere. -6. Make sure that you aren't also using another Ollama model for chat. This will cause Ollama to constantly load and unload the models from memory, resulting in slow responses (or none at all) for both. -7. Check the output of the logs to find any potential errors (cmd/ctrl+shift+p -> "Toggle Developer Tools" -> "Console" tab). -8. If you are still having issues, please let us know in our [Discord](https://discord.gg/vapESyrFmJ) and we'll help as soon as possible. +1. Make sure you have the "Enable Tab Autocomplete" setting checked (in VS Code, you can toggle by clicking the "Continue" button in the status bar). +2. Make sure you have downloaded Ollama. +3. Run `ollama run starcoder:3b` to verify that the model is downloaded. +4. Make sure that any other completion providers are disabled (e.g. Copilot), as they may interfere. +5. Make sure that you aren't also using another Ollama model for chat. This will cause Ollama to constantly load and unload the models from memory, resulting in slow responses (or none at all) for both. +6. Check the output of the logs to find any potential errors (cmd/ctrl+shift+p -> "Toggle Developer Tools" -> "Console" tab in VS Code, ~/.continue/core.log in JetBrains). +7. If you are still having issues, please let us know in our [Discord](https://discord.gg/vapESyrFmJ) and we'll help as soon as possible. ### Completions are slow