From ae8ab99bf3e18683a1ab850bea9522339d9d9fd7 Mon Sep 17 00:00:00 2001 From: Fred Bricon Date: Mon, 13 Jan 2025 16:40:25 +0100 Subject: [PATCH 001/262] Fix syntax highlighting for .class files Signed-off-by: Fred Bricon --- core/util/index.test.ts | 11 ++++++++--- core/util/index.ts | 16 ++++++++++++++-- 2 files changed, 22 insertions(+), 5 deletions(-) diff --git a/core/util/index.test.ts b/core/util/index.test.ts index 74ee3ccc8..fc48a49b2 100644 --- a/core/util/index.test.ts +++ b/core/util/index.test.ts @@ -207,7 +207,7 @@ World it("should handle strings with only whitespace", () => { const result = dedent` - + `; expect(result).toBe(""); }); @@ -249,9 +249,9 @@ World it("should handle a string with only one non-empty line", () => { const result = dedent` - + Hello World! - + `; expect(result).toBe("Hello World!"); }); @@ -373,11 +373,16 @@ describe("getMarkdownLanguageTagForFile", () => { expect(getMarkdownLanguageTagForFile("test.py")).toBe("python"); expect(getMarkdownLanguageTagForFile("test.tsx")).toBe("tsx"); expect(getMarkdownLanguageTagForFile("test.java")).toBe("java"); + expect(getMarkdownLanguageTagForFile("test.class")).toBe("java"); expect(getMarkdownLanguageTagForFile("test.md")).toBe("markdown"); expect(getMarkdownLanguageTagForFile("test.sh")).toBe("shell"); expect(getMarkdownLanguageTagForFile("test.sql")).toBe("sql"); }); + it("should sanitize ranges from the extension", () => { + expect(getMarkdownLanguageTagForFile("test.java (1-5)")).toBe("java"); + }); + it("should return the extension if not in the known list", () => { expect(getMarkdownLanguageTagForFile("file.unknownext")).toBe("unknownext"); }); diff --git a/core/util/index.ts b/core/util/index.ts index 04dc6d567..4cb0f4920 100644 --- a/core/util/index.ts +++ b/core/util/index.ts @@ -74,6 +74,7 @@ export function getMarkdownLanguageTagForFile(filepath: string): string { tsx: "tsx", ts: "typescript", java: "java", + class:"java", //.class files decompile to Java go: "go", rb: "ruby", rs: "rust", @@ -96,17 +97,28 @@ export function getMarkdownLanguageTagForFile(filepath: string): string { ps1: "powershell", }; - const ext = filepath.split(".").pop(); + const ext = sanitizeExtension(filepath.split(".").pop()); return ext ? (extToLangMap[ext] ?? ext) : ""; } + +function sanitizeExtension(ext?: string): string|undefined { + if (ext) { + //ignore ranges in extension eg. "java (11-23)" + const match = ext.match(/^(\S+)\s*(\(.*\))?$/); + if (match) { + ext = match[1]; + } + } + return ext; +} + export function copyOf(obj: any): any { if (obj === null || obj === undefined) { return obj; } return JSON.parse(JSON.stringify(obj)); } -``; export function deduplicateArray( array: T[], From 16b9a21a34f4f91b2758458e16d35252eafeb1f0 Mon Sep 17 00:00:00 2001 From: Fred Bricon Date: Wed, 15 Jan 2025 19:07:24 +0100 Subject: [PATCH 002/262] Intercept Ollama errors before Webview, to display Download/Start options Signed-off-by: Fred Bricon --- core/util/ollamaHelper.ts | 8 +++--- .../src/autocomplete/completionProvider.ts | 6 ++--- extensions/vscode/src/commands.ts | 4 +++ extensions/vscode/src/webviewProtocol.ts | 25 ++++++++++++++++++- 4 files changed, 35 insertions(+), 8 deletions(-) diff --git a/core/util/ollamaHelper.ts b/core/util/ollamaHelper.ts index 1e9c52490..a00e869dd 100644 --- a/core/util/ollamaHelper.ts +++ b/core/util/ollamaHelper.ts @@ -11,7 +11,7 @@ export async function isOllamaInstalled(): Promise { }); } -export async function startLocalOllama(ide: IDE): Promise { +export async function startLocalOllama(ide: IDE): Promise { let startCommand: string | undefined; switch (process.platform) { @@ -20,16 +20,16 @@ export async function startLocalOllama(ide: IDE): Promise { break; case "win32"://Windows - startCommand = `& "ollama app.exe"\n`; + startCommand = "& \"ollama app.exe\"\n"; break; default: //Linux... - const start_script_path = path.resolve(__dirname, './start_ollama.sh'); + const start_script_path = path.resolve(__dirname, "./start_ollama.sh"); if (await ide.fileExists(`file:/${start_script_path}`)) { startCommand = `set -e && chmod +x ${start_script_path} && ${start_script_path}\n`; console.log(`Ollama Linux startup script at : ${start_script_path}`); } else { - ide.showToast("error", `Cannot start Ollama: could not find ${start_script_path}!`) + return ide.showToast("error", `Cannot start Ollama: could not find ${start_script_path}!`) } } if (startCommand) { diff --git a/extensions/vscode/src/autocomplete/completionProvider.ts b/extensions/vscode/src/autocomplete/completionProvider.ts index c10d4d5f1..b7680b686 100644 --- a/extensions/vscode/src/autocomplete/completionProvider.ts +++ b/extensions/vscode/src/autocomplete/completionProvider.ts @@ -44,11 +44,11 @@ export class ContinueCompletionProvider implements vscode.InlineCompletionItemProvider { private onError(e: any) { - const options = ["Documentation"]; + let options = ["Documentation"]; if (e.message.includes("Ollama may not be installed")) { options.push("Download Ollama"); } else if (e.message.includes("Ollama may not be running")) { - options.unshift("Start Ollama"); // We want "Start" to be the default choice + options = ["Start Ollama"]; // We want "Start" to be the only choice } if (e.message.includes("Please sign in with GitHub")) { @@ -70,7 +70,7 @@ export class ContinueCompletionProvider ); } else if (val === "Download Ollama") { vscode.env.openExternal(vscode.Uri.parse("https://ollama.ai/download")); - } else if (val == "Start Ollama") { + } else if (val === "Start Ollama") { startLocalOllama(this.ide); } }); diff --git a/extensions/vscode/src/commands.ts b/extensions/vscode/src/commands.ts index d8019cfe1..bbf1cfd74 100644 --- a/extensions/vscode/src/commands.ts +++ b/extensions/vscode/src/commands.ts @@ -33,6 +33,7 @@ import { Battery } from "./util/battery"; import { VsCodeIde } from "./VsCodeIde"; import type { VsCodeWebviewProtocol } from "./webviewProtocol"; +import { startLocalOllama } from "core/util/ollamaHelper"; let fullScreenPanel: vscode.WebviewPanel | undefined; @@ -1000,6 +1001,9 @@ const getCommandsMap: ( "continue.openAccountDialog": () => { sidebar.webviewProtocol?.request("openDialogMessage", "account"); }, + "continue.startLocalOllama": () => { + startLocalOllama(ide); + }, }; }; diff --git a/extensions/vscode/src/webviewProtocol.ts b/extensions/vscode/src/webviewProtocol.ts index bfbb37ce6..c5853d12a 100644 --- a/extensions/vscode/src/webviewProtocol.ts +++ b/extensions/vscode/src/webviewProtocol.ts @@ -81,6 +81,30 @@ export class VsCodeWebviewProtocol respond({ done: true, content: response ?? {}, status: "success" }); } } catch (e: any) { + let message = e.message; + //Intercept Ollama errors for special handling + if (message.includes("Ollama may not")) { + const options = []; + if (message.includes("be installed")) { + options.push("Download Ollama"); + } else if (message.includes("be running")) { + options.push("Start Ollama"); + } + if (options.length > 0) { + // Respond without an error, so the UI doesn't show the error component + respond({ done: true, status: "error" }); + // Show native vscode error message instead, with options to download/start Ollama + vscode.window.showErrorMessage(e.message, ...options).then(async (val) => { + if (val === "Download Ollama") { + vscode.env.openExternal(vscode.Uri.parse("https://ollama.ai/download")); + } else if (val === "Start Ollama") { + vscode.commands.executeCommand("continue.startLocalOllama"); + } + }); + return; + } + } + respond({ done: true, error: e.message, status: "error" }); const stringified = JSON.stringify({ msg }, null, 2); @@ -96,7 +120,6 @@ export class VsCodeWebviewProtocol return; } - let message = e.message; if (e.cause) { if (e.cause.name === "ConnectTimeoutError") { message = `Connection timed out. If you expect it to take a long time to connect, you can increase the timeout in config.json by setting "requestOptions": { "timeout": 10000 }. You can find the full config reference here: https://docs.continue.dev/reference/config`; From 3b7029350ba265ea1dcd70b7cbbdcdadac3a160a Mon Sep 17 00:00:00 2001 From: henry Date: Wed, 15 Jan 2025 17:54:05 -0600 Subject: [PATCH 003/262] full screen opens in front of vscode --- extensions/vscode/src/commands.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/extensions/vscode/src/commands.ts b/extensions/vscode/src/commands.ts index d8019cfe1..b322d6afb 100644 --- a/extensions/vscode/src/commands.ts +++ b/extensions/vscode/src/commands.ts @@ -776,6 +776,7 @@ const getCommandsMap: ( sessionId, ); } + panel.reveal(); sessionLoader.dispose(); }); From e2d5f9b3fbe5cdc57fb3a319fdd0b283ae94a4b9 Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Thu, 16 Jan 2025 23:19:23 -0800 Subject: [PATCH 004/262] json block titles --- docs/docs/customize/context-providers.md | 2 +- .../docs/customize/deep-dives/autocomplete.md | 2 +- docs/docs/customize/deep-dives/docs.md | 4 +- .../docs/customize/deep-dives/prompt-files.md | 2 +- .../customize/model-providers/moonshot.md | 15 ++--- .../customize/model-providers/more/asksage.md | 61 ++++++++++--------- .../model-providers/more/llamacpp.md | 2 +- .../customize/model-providers/more/vllm.md | 2 +- .../model-providers/top-level/anthropic.md | 2 +- .../model-providers/top-level/azure.md | 2 +- .../model-providers/top-level/openai.md | 16 ++++- .../model-providers/top-level/xAI.md | 8 --- docs/docs/customize/slash-commands.md | 5 +- docs/docs/customize/tools.md | 2 +- .../build-your-own-context-provider.md | 12 ++-- docs/docs/edit/how-to-customize.md | 16 ----- docs/docs/edit/how-to-customize.mdx | 44 +++++++++++++ docs/docs/troubleshooting.md | 2 +- .../model-providers/top-level/xai.md | 14 ++++- .../build-your-own-context-provider.md | 4 +- .../current/customize/tutorials/llama3.1.md | 2 +- 21 files changed, 131 insertions(+), 88 deletions(-) delete mode 100644 docs/docs/edit/how-to-customize.md create mode 100644 docs/docs/edit/how-to-customize.mdx diff --git a/docs/docs/customize/context-providers.md b/docs/docs/customize/context-providers.md index d49b38c93..2ab18613a 100644 --- a/docs/docs/customize/context-providers.md +++ b/docs/docs/customize/context-providers.md @@ -302,7 +302,7 @@ Reference the architecture and platform of your current operating system. The [Model Context Protocol](https://modelcontextprotocol.io/introduction) is a standard proposed by Anthropic to unify prompts, context, and tool use. Continue supports any MCP server with the MCP context provider. Read their [quickstart](https://modelcontextprotocol.io/quickstart) to learn how to set up a local server and then configure your `config.json` like this: -```json +```json title="config.json" { "experimental": { "modelContextProtocolServers": [ diff --git a/docs/docs/customize/deep-dives/autocomplete.md b/docs/docs/customize/deep-dives/autocomplete.md index 221a6d49f..3936643e5 100644 --- a/docs/docs/customize/deep-dives/autocomplete.md +++ b/docs/docs/customize/deep-dives/autocomplete.md @@ -7,7 +7,7 @@ keywords: [autocomplete] If you want to have the best autocomplete experience, we recommend using Codestral, which is available through the [Mistral API](https://console.mistral.ai/). To do this, obtain an API key and add it to your `config.json`: -```json +```json title="config.json" { "tabAutocompleteModel": { "title": "Codestral", diff --git a/docs/docs/customize/deep-dives/docs.md b/docs/docs/customize/deep-dives/docs.md index 58612106d..0d3913ccd 100644 --- a/docs/docs/customize/deep-dives/docs.md +++ b/docs/docs/customize/deep-dives/docs.md @@ -12,7 +12,7 @@ The [`@Docs` context provider](customize/context-providers.md#docs) allows you t To enable the `@Docs` context provider, you need to add it to the list of context providers in your `config.json` file. -```json +```json title="config.json" { "contextProviders": [ { @@ -53,7 +53,7 @@ To add multiple documentation sites, we recommend adding them in bulk to your `c The [configuration schema for docs](https://github.com/continuedev/continue/blob/v0.9.212-vscode/extensions/vscode/config_schema.json#L1943-L1973) is as follows: -```json +```json title="config.json" "docs": [ { "title": "Continue", diff --git a/docs/docs/customize/deep-dives/prompt-files.md b/docs/docs/customize/deep-dives/prompt-files.md index 7269a459a..a6cb58f1f 100644 --- a/docs/docs/customize/deep-dives/prompt-files.md +++ b/docs/docs/customize/deep-dives/prompt-files.md @@ -16,7 +16,7 @@ Below is a quick example of setting up a prompt file to de 2. Add a file called `rails.prompt` to this folder. 3. Write the following contents to `rails.prompt` and save. -``` +```.prompt name: Rails Project description: Information about this project --- diff --git a/docs/docs/customize/model-providers/moonshot.md b/docs/docs/customize/model-providers/moonshot.md index 64017d1bd..cba20fb82 100644 --- a/docs/docs/customize/model-providers/moonshot.md +++ b/docs/docs/customize/model-providers/moonshot.md @@ -9,7 +9,7 @@ To use Moonshot AI models, you need to: 1. Get an API key from [Moonshot AI Platform](https://platform.moonshot.cn/) 2. Add the following configuration to your `config.json`: -```json +```json title="config.json" { "models": [ { @@ -32,17 +32,17 @@ Moonshot AI currently provides the following models: ## Configuration Options -| Option | Description | Default | -|--------|-------------|---------| -| `apiKey` | Moonshot API key | Required | -| `apiBase` | API base URL | `https://api.moonshot.cn/v1/` | -| `model` | Model name to use | `moonshot-v1-8k` | +| Option | Description | Default | +| --------- | ----------------- | ----------------------------- | +| `apiKey` | Moonshot API key | Required | +| `apiBase` | API base URL | `https://api.moonshot.cn/v1/` | +| `model` | Model name to use | `moonshot-v1-8k` | ## Example Here's a complete configuration example: -```json +```json title="config.json" { "models": [ { @@ -58,3 +58,4 @@ Here's a complete configuration example: } ] } +``` diff --git a/docs/docs/customize/model-providers/more/asksage.md b/docs/docs/customize/model-providers/more/asksage.md index e21133cb8..382f6862f 100644 --- a/docs/docs/customize/model-providers/more/asksage.md +++ b/docs/docs/customize/model-providers/more/asksage.md @@ -2,7 +2,7 @@ :::info -To get an Ask Sage API key login to the Ask Sage platform (If you don't have an account, you can create one [here](https://chat.asksage.ai/)) and follow the instructions in the Ask Sage Docs:[Ask Sage API Key](https://docs.asksage.ai/docs/api-documentation/api-documentation.html) +To get an Ask Sage API key login to the Ask Sage platform (If you don't have an account, you can create one [here](https://chat.asksage.ai/)) and follow the instructions in the Ask Sage Docs:[Ask Sage API Key](https://docs.asksage.ai/docs/api-documentation/api-documentation.html) ::: @@ -10,12 +10,12 @@ To get an Ask Sage API key login to the Ask Sage platform (If you don't have an To use the Ask Sage models, the following configuration is required to the `config.json` file: -```json +```json title="config.json" { "models": [ { - "apiKey": "YOUR_API_KEY", - "apiBase": "https://api.asksage.ai/server/", // apiBase will be the same for all models, but will vary based on tenant. + "apiKey": "YOUR_API_KEY", + "apiBase": "https://api.asksage.ai/server/", // apiBase will be the same for all models, but will vary based on tenant. "model": "gpt4-gov", "title": "GPT-4 gov", "provider": "askSage" @@ -27,12 +27,13 @@ To use the Ask Sage models, the following configuration is required to the `conf The `apiBase` will be listed on the Ask Sage platform when you generate an `API key`. You will see context as shown below: > Server API for query/training etc.: +> > - Documentation: https://app.swaggerhub.com/apis-docs/NICOLASCHAILLAN_1/server_ask-sage_api/1.0 > - URL for this API is: https://api.asksage.ai/server/ ## Usage -Currently, the setup for the models provided by Ask Sage is to support the following two functionalities provided by Continue.Dev: +Currently, the setup for the models provided by Ask Sage is to support the following two functionalities provided by Continue.Dev: - `Chat` to understand and iterate on code in the sidebar - `Edit` to modify code without leaving your current file @@ -41,34 +42,34 @@ More models, functionalities and documentation will be added in the future for A > We recommend to utilize the`OpenAI` or `Anthropic` models for the best performance and results for the `Chat` and `Edit` functionalities. -## Ask Sage Documentation +## Ask Sage Documentation + Ask Sage documentation is not available with Continue.Dev, so if you have any questions or need help with Ask Sage type `@ask` and select the `Ask Sage` option in the chat. Then procced to ask your question about Ask Sage. ## Current Models From Ask Sage Supported The current Models available provided by Ask Sage are: -| Index | Model | Added | Status | -|-------|------------------------|-------|--------| -| 1 | GPT-4 Gov | Yes | ✅ | -| 2 | GPT-4o Gov | Yes | ✅ | -| 3 | GPT-4o-mini Gov | Yes | ✅ | -| 4 | GPT-3.5-Turbo Gov | Yes | ✅ | -| 5 | GPT-4o | Yes | ✅ | -| 6 | GPT-4o-mini | Yes | ✅ | -| 7 | GPT-4 | Yes | ✅ | -| 8 | GPT-4-32K | Yes | ✅ | -| 9 | GPT-o1 | Yes | ✅ | -| 10 | GPT-o1-mini | Yes | ✅ | -| 11 | GPT-3.5-turbo | Yes | ✅ | -| 12 | Calude 3.5 Sonnet Gov | Yes | ✅ | -| 13 | Calude 3 Opus | Yes | ✅ | -| 14 | Calude 3 Sonet | Yes | ✅ | -| 15 | Calude 3.5 Sonnet | Yes | ✅ | -| 16 | Grok (xAI) | Yes | ✅ | -| 17 | Groq Llama 3.3 | Yes | ✅ | -| 18 | Groq 70B | Yes | ✅ | -| 19 | Gemini Pro | Yes | ✅ | -| 20 | llama 3 | Yes | ✅ | -| 21 | Mistral Large | Yes | ✅ | - +| Index | Model | Added | Status | +| ----- | --------------------- | ----- | ------ | +| 1 | GPT-4 Gov | Yes | ✅ | +| 2 | GPT-4o Gov | Yes | ✅ | +| 3 | GPT-4o-mini Gov | Yes | ✅ | +| 4 | GPT-3.5-Turbo Gov | Yes | ✅ | +| 5 | GPT-4o | Yes | ✅ | +| 6 | GPT-4o-mini | Yes | ✅ | +| 7 | GPT-4 | Yes | ✅ | +| 8 | GPT-4-32K | Yes | ✅ | +| 9 | GPT-o1 | Yes | ✅ | +| 10 | GPT-o1-mini | Yes | ✅ | +| 11 | GPT-3.5-turbo | Yes | ✅ | +| 12 | Calude 3.5 Sonnet Gov | Yes | ✅ | +| 13 | Calude 3 Opus | Yes | ✅ | +| 14 | Calude 3 Sonet | Yes | ✅ | +| 15 | Calude 3.5 Sonnet | Yes | ✅ | +| 16 | Grok (xAI) | Yes | ✅ | +| 17 | Groq Llama 3.3 | Yes | ✅ | +| 18 | Groq 70B | Yes | ✅ | +| 19 | Gemini Pro | Yes | ✅ | +| 20 | llama 3 | Yes | ✅ | +| 21 | Mistral Large | Yes | ✅ | diff --git a/docs/docs/customize/model-providers/more/llamacpp.md b/docs/docs/customize/model-providers/more/llamacpp.md index 7dbdd47ca..8cb367e3f 100644 --- a/docs/docs/customize/model-providers/more/llamacpp.md +++ b/docs/docs/customize/model-providers/more/llamacpp.md @@ -2,7 +2,7 @@ Run the llama.cpp server binary to start the API server. If running on a remote server, be sure to set host to 0.0.0.0: -```shell +```bash .\server.exe -c 4096 --host 0.0.0.0 -t 16 --mlock -m models\meta\llama\codellama-7b-instruct.Q8_0.gguf ``` diff --git a/docs/docs/customize/model-providers/more/vllm.md b/docs/docs/customize/model-providers/more/vllm.md index fe6932cc5..594f0b428 100644 --- a/docs/docs/customize/model-providers/more/vllm.md +++ b/docs/docs/customize/model-providers/more/vllm.md @@ -5,6 +5,7 @@ vLLM is an open-source library for fast LLM inference which typically is used to ```shell vllm serve meta-llama/Meta-Llama-3.1-8B-Instruct ``` + ## Chat model We recommend configuring **Llama3.1 8B** as your chat model. @@ -55,5 +56,4 @@ We recommend configuring **Nomic Embed Text** as your embeddings model. [Click here](../../model-types/reranking.md) to see a list of reranking model providers. - The continue implementation uses [OpenAI](../top-level/openai.md) under the hood. [View the source](https://github.com/continuedev/continue/blob/main/core/llm/llms/Vllm.ts) diff --git a/docs/docs/customize/model-providers/top-level/anthropic.md b/docs/docs/customize/model-providers/top-level/anthropic.md index 9333a8e84..963734fd4 100644 --- a/docs/docs/customize/model-providers/top-level/anthropic.md +++ b/docs/docs/customize/model-providers/top-level/anthropic.md @@ -50,7 +50,7 @@ Anthropic supports [prompt caching with Claude](https://docs.anthropic.com/en/do To enable caching of the system message and the turn-by-turn conversation, update your your model configuration as following: -```json +```json title="config.json" { "models": [ { diff --git a/docs/docs/customize/model-providers/top-level/azure.md b/docs/docs/customize/model-providers/top-level/azure.md index 45b49f734..ccf8b814e 100644 --- a/docs/docs/customize/model-providers/top-level/azure.md +++ b/docs/docs/customize/model-providers/top-level/azure.md @@ -79,7 +79,7 @@ To find this information in _Azure AI Foundry_, first select the model that you For example, a Target URI of `https://just-an-example.openai.azure.com/openai/deployments/gpt-4o-july/chat/completions?api-version=2023-03-15-preview` would map to the following: -```json +```json title="config.json" { "title": "GPT-4o Azure", "model": "gpt-4o", diff --git a/docs/docs/customize/model-providers/top-level/openai.md b/docs/docs/customize/model-providers/top-level/openai.md index 6b31b0b22..40126fb9b 100644 --- a/docs/docs/customize/model-providers/top-level/openai.md +++ b/docs/docs/customize/model-providers/top-level/openai.md @@ -86,8 +86,18 @@ If you are using an OpenAI compatible server / API, you can change the `apiBase` } ``` -To force usage of `chat/completions` instead of `completions` endpoint you can set +To force usage of `chat/completions` instead of `completions` endpoint you can set: -```json -"useLegacyCompletionsEndpoint": false +```json title="config.json" +{ + "models": [ + { + "title": "OpenAI-compatible server / API", + "provider": "openai", + "model": "MODEL_NAME", + "apiBase": "http://localhost:8000/v1", + "useLegacyCompletionsEndpoint": true + } + ] +} ``` diff --git a/docs/docs/customize/model-providers/top-level/xAI.md b/docs/docs/customize/model-providers/top-level/xAI.md index fbdfa83ad..9bf23be83 100644 --- a/docs/docs/customize/model-providers/top-level/xAI.md +++ b/docs/docs/customize/model-providers/top-level/xAI.md @@ -43,11 +43,3 @@ xAI currently does not offer any embeddings models. xAI currently does not offer any reranking models. [Click here](../../model-types/reranking.md) to see a list of reranking model providers. - -## Legacy Completions - -To force usage of `chat/completions` instead of `completions` endpoint you can set - -```json -"useLegacyCompletionsEndpoint": false -``` diff --git a/docs/docs/customize/slash-commands.md b/docs/docs/customize/slash-commands.md index bc3bac24a..f640b715f 100644 --- a/docs/docs/customize/slash-commands.md +++ b/docs/docs/customize/slash-commands.md @@ -111,7 +111,7 @@ The onboard slash command helps to familiarize yourself with a new project by an The [Model Context Protocol](https://modelcontextprotocol.io/introduction) is a standard proposed by Anthropic to unify prompts, context, and tool use. Continue supports MCP "prompts" by creating slash commands. Read their [quickstart](https://modelcontextprotocol.io/quickstart) to learn how to set up a local server and then configure your `config.json` like this: -```json +```json title="config.json" { "experimental": { "modelContextProtocolServers": [ @@ -128,4 +128,5 @@ The [Model Context Protocol](https://modelcontextprotocol.io/introduction) is a ``` ### Build your own Slash Command -You can build your own slash command by following [this tutorial](/customize/tutorials/build-your-own-slash-command). \ No newline at end of file + +You can build your own slash command by following [this tutorial](/customize/tutorials/build-your-own-slash-command). diff --git a/docs/docs/customize/tools.md b/docs/docs/customize/tools.md index 020c38459..fe461d1bd 100644 --- a/docs/docs/customize/tools.md +++ b/docs/docs/customize/tools.md @@ -23,7 +23,7 @@ To let you balance speed and safety, each tool can be set to 1 of 3 modes: Currently custom tools can be configured using the [Model Context Protocol](https://modelcontextprotocol.io/introduction), a standard proposed by Anthropic to unify prompts, context, and tool use. Read their [quickstart](https://modelcontextprotocol.io/quickstart) to learn how to set up a local server and then configure your `config.json` like this: -```json title="~/.continue/config.json" +```json title="config.json" { "experimental": { "modelContextProtocolServers": [ diff --git a/docs/docs/customize/tutorials/build-your-own-context-provider.md b/docs/docs/customize/tutorials/build-your-own-context-provider.md index 3d37790cd..fae404cd4 100644 --- a/docs/docs/customize/tutorials/build-your-own-context-provider.md +++ b/docs/docs/customize/tutorials/build-your-own-context-provider.md @@ -107,17 +107,19 @@ const ReadMeContextProvider: CustomContextProvider = { const { ide } = args; // Filter all workspace files for READMEs - const workspaceDirs = await ide.getWorkspaceDirs() + const workspaceDirs = await ide.getWorkspaceDirs(); const allFiles = await Promise.all( - workspaceDirs.map(dir => ide.subprocess(`find ${dir} -name "README.md"`)), + workspaceDirs.map((dir) => + ide.subprocess(`find ${dir} -name "README.md"`), + ), ); // 'readmes' now contains an array of file paths for each README.md file found in the workspace, // excluding those in 'node_modules' const readmes = allFiles - .flatMap(mds => mds[0].split("\n")) - .filter(file => file.trim() !== '' && !file.includes("/node_modules/")) + .flatMap((mds) => mds[0].split("\n")) + .filter((file) => file.trim() !== "" && !file.includes("/node_modules/")); // Return the items that will be shown in the dropdown return readmes.map((filepath) => { @@ -182,7 +184,7 @@ Continue will use [esbuild](https://esbuild.github.io/) to bundle your `config.t If you'd like to write a context provider in a language other than TypeScript, you can use the "http" context provider to call a server that hosts your own code. Add the context provider to `config.json` like this: -```json +```json title="config.json" { "name": "http", "params": { diff --git a/docs/docs/edit/how-to-customize.md b/docs/docs/edit/how-to-customize.md deleted file mode 100644 index aa9d464c7..000000000 --- a/docs/docs/edit/how-to-customize.md +++ /dev/null @@ -1,16 +0,0 @@ ---- -title: How to customize -sidebar_position: 5 -description: How to customize Edit -keywords: [edit, cmd i, works] ---- - -You can configure a particular model to be used for Edit using the `inlineEdit` property. - -```json title="config.json" -"experimental": { - "modelRoles": { - "inlineEdit": "MODEL_TITLE", - } -} -``` \ No newline at end of file diff --git a/docs/docs/edit/how-to-customize.mdx b/docs/docs/edit/how-to-customize.mdx new file mode 100644 index 000000000..25d1680f1 --- /dev/null +++ b/docs/docs/edit/how-to-customize.mdx @@ -0,0 +1,44 @@ +--- +title: How to customize +sidebar_position: 5 +description: How to customize Edit +keywords: [edit, cmd i, works] +--- + +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + +You can configure a particular model to be used for Edit: + + + + Use model roles. + ```yaml title="Package or config.yaml" + models: + - name: Claude 3.5 Sonnet + provider: anthropic + model: claude-3-5-sonnet-latest + roles: + - edit + apiKeySecret: ANTHOPIC_API_KEY + ``` + + + Set the `experimental.modelRoles.inlineEdit` property in `config.json`. + ```json title="config.json" + { + "models": { + "name": "Claude 3.5 Sonnet", + "provider": "anthropic", + "model": "claude-3-5-sonnet-latest", + "apiKey": "[API_KEY]" + }, + "experimental": { + "modelRoles": { + "inlineEdit": "Claude 3.5 Sonnet", + } + } + } + ``` + + diff --git a/docs/docs/troubleshooting.md b/docs/docs/troubleshooting.md index d4bbe69db..a8632457e 100644 --- a/docs/docs/troubleshooting.md +++ b/docs/docs/troubleshooting.md @@ -85,7 +85,7 @@ If your keyboard shortcuts are not resolving, you may have other commands that a 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: -```json +```json title="config.json" { "models": [ { diff --git a/docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/customize/model-providers/top-level/xai.md b/docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/customize/model-providers/top-level/xai.md index fbdfa83ad..c920114b0 100644 --- a/docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/customize/model-providers/top-level/xai.md +++ b/docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/customize/model-providers/top-level/xai.md @@ -46,8 +46,16 @@ xAI currently does not offer any reranking models. ## Legacy Completions -To force usage of `chat/completions` instead of `completions` endpoint you can set +To force usage of `chat/completions` instead of `completions` endpoint you can set `useLegacyCompletionsEndpoint` to `true`: -```json -"useLegacyCompletionsEndpoint": false +```json title="config.json" + "models": [ + { + "title": "Grok Beta", + "provider": "xAI", + "model": "grok-beta", + "apiKey": "[API_KEY]", + "useLegacyCompletionsEndpoint": false + } + ] ``` diff --git a/docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/customize/tutorials/build-your-own-context-provider.md b/docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/customize/tutorials/build-your-own-context-provider.md index 735f405de..abe3612ce 100644 --- a/docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/customize/tutorials/build-your-own-context-provider.md +++ b/docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/customize/tutorials/build-your-own-context-provider.md @@ -68,7 +68,7 @@ export function modifyConfig(config: Config): Config { } ``` -不需要对 `config.json` 做修改。 +不需要对 `config.json` 做修改。 ## 定制有 submenu 或 query 的上下文提供者 @@ -174,7 +174,7 @@ Continue 将使用 [esbuild](https://esbuild.github.io/) 打包你的 `config.ts 如果你想要用除了 TypeScript 的其他语言编写上下文提供者,你可以使用 "http" 上下文提供者,来调用一个托管你自己代码的服务器。添加上下文提供者到 `config.json` ,像这样: -```json +```json title="config.json" { "name": "http", "params": { diff --git a/docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/customize/tutorials/llama3.1.md b/docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/customize/tutorials/llama3.1.md index e02ba6741..877864a15 100644 --- a/docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/customize/tutorials/llama3.1.md +++ b/docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/customize/tutorials/llama3.1.md @@ -99,7 +99,7 @@ SambaNova Cloud 提供 Llama3.1 70B/405B 服务的世界记录。 2. 复制你的 API key 3. 更新你的 Continue 配置文件像这样: -```json title="~/.continue/config.json" +```json title="config.json" { "models": [ { From adb852f0c4bcd705718e217f661dd5243a5b67dd Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Thu, 16 Jan 2025 23:22:48 -0800 Subject: [PATCH 005/262] deprecated json titles --- docs/docs/actions/how-to-use-it.md | 2 +- docs/docs/autocomplete/how-to-customize.md | 2 +- docs/docs/autocomplete/model-setup.md | 8 ++- docs/docs/chat/model-setup.mdx | 22 +++---- docs/docs/customize/context-providers.md | 64 +++++++++---------- .../docs/customize/deep-dives/autocomplete.md | 6 +- docs/docs/customize/deep-dives/codebase.md | 2 +- docs/docs/customize/deep-dives/docs.md | 8 +-- .../customize/model-providers/moonshot.md | 4 +- .../model-providers/more/SambaNova.md | 2 +- .../customize/model-providers/more/asksage.md | 2 +- .../model-providers/more/cerebras.md | 2 +- .../model-providers/more/cloudflare.md | 2 +- .../customize/model-providers/more/cohere.md | 6 +- .../model-providers/more/deepinfra.md | 2 +- .../customize/model-providers/more/flowise.md | 2 +- .../model-providers/more/function-network.md | 7 +- .../customize/model-providers/more/groq.md | 2 +- .../more/huggingfaceinferenceapi.md | 2 +- .../model-providers/more/ipex_llm.md | 4 +- .../customize/model-providers/more/kindo.md | 4 +- .../model-providers/more/llamacpp.md | 2 +- .../model-providers/more/llamafile.md | 2 +- .../model-providers/more/lmstudio.md | 6 +- .../customize/model-providers/more/msty.md | 4 +- .../customize/model-providers/more/nebius.md | 4 +- .../customize/model-providers/more/novita.md | 2 +- .../customize/model-providers/more/nvidia.md | 4 +- .../model-providers/more/openrouter.md | 4 +- .../model-providers/more/replicatellm.md | 2 +- .../model-providers/more/sagemaker.md | 4 +- .../model-providers/more/scaleway.md | 6 +- .../model-providers/more/siliconflow.md | 4 +- .../model-providers/more/textgenwebui.md | 2 +- .../model-providers/more/together.md | 2 +- .../customize/model-providers/more/vllm.md | 6 +- .../model-providers/top-level/anthropic.md | 4 +- .../model-providers/top-level/azure.md | 8 +-- .../model-providers/top-level/bedrock.md | 12 ++-- .../model-providers/top-level/deepseek.md | 4 +- .../model-providers/top-level/gemini.md | 4 +- .../model-providers/top-level/mistral.md | 6 +- .../model-providers/top-level/ollama.md | 8 +-- .../model-providers/top-level/openai.md | 8 +-- .../model-providers/top-level/vertexai.md | 6 +- .../model-providers/top-level/xAI.md | 2 +- docs/docs/customize/model-types/embeddings.md | 6 +- docs/docs/customize/model-types/reranking.md | 10 +-- docs/docs/customize/slash-commands.md | 14 ++-- docs/docs/customize/tools.md | 2 +- .../build-your-own-context-provider.md | 2 +- .../tutorials/build-your-own-slash-command.md | 2 +- .../customize/tutorials/custom-code-rag.md | 2 +- .../tutorials/how-to-self-host-a-model.md | 6 +- docs/docs/customize/tutorials/llama3.1.md | 10 +-- .../customize/tutorials/set-up-codestral.md | 2 +- docs/docs/edit/how-to-customize.mdx | 4 +- docs/docs/reference.md | 26 ++++---- docs/docs/telemetry.md | 2 +- docs/docs/troubleshooting.md | 2 +- docs/docs/yaml-migration.md | 12 ++-- 61 files changed, 189 insertions(+), 184 deletions(-) diff --git a/docs/docs/actions/how-to-use-it.md b/docs/docs/actions/how-to-use-it.md index 5be83b2e7..80f057453 100644 --- a/docs/docs/actions/how-to-use-it.md +++ b/docs/docs/actions/how-to-use-it.md @@ -36,7 +36,7 @@ Below is a quick example of setting up a prompt file to write unit tests using J 2. Add a file called `test.prompt` to this folder. The name of this file will be the name of the slash command you will use to generate your prompt. 3. Write the following contents to `test.prompt` and save. -``` +```.prompt {{{ input }}} Write unit tests for the above selected code, following each of these instructions: diff --git a/docs/docs/autocomplete/how-to-customize.md b/docs/docs/autocomplete/how-to-customize.md index ccd1dca9d..066621368 100644 --- a/docs/docs/autocomplete/how-to-customize.md +++ b/docs/docs/autocomplete/how-to-customize.md @@ -7,7 +7,7 @@ sidebar_position: 5 Continue offers a handful of parameters in [`config.json`](../reference.md) that can be tuned to find the perfect balance between suggestion quality and system performance for your specific needs and hardware capabilities: -```json title="config.json" +```json title="config.json (Deprecated)" "tabAutocompleteOptions": { "maxPromptTokens": 400, "prefixPercentage": 0.5, diff --git a/docs/docs/autocomplete/model-setup.md b/docs/docs/autocomplete/model-setup.md index 7d8c98944..c42c8318c 100644 --- a/docs/docs/autocomplete/model-setup.md +++ b/docs/docs/autocomplete/model-setup.md @@ -13,7 +13,7 @@ This page recommends models and providers for Autocomplete. Read more about how For the best Autocomplete experience, we recommend using Codestral through the [Mistral API](https://console.mistral.ai/). This model offers high-quality completions with an excellent understanding of code context: -```json title="config.json"" +```json title="config.json (Deprecated)"" { "tabAutocompleteModel": { "title": "Codestral", @@ -32,7 +32,7 @@ The API keys for Codestral and the general Mistral APIs are different. If you ar For those preferring local execution or self-hosting,`Qwen2.5-Coder 1.5B` offers a good balance of performance and quality for most users (e.g. using [Ollama](../customize/model-providers/top-level/ollama.md) or [LM Studio](../customize/model-providers/more/lmstudio.md)). -```json title="config.json"" +```json title="config.json (Deprecated)"" { "tabAutocompleteModel": { "title": "Qwen2.5-Coder 1.5B", @@ -49,11 +49,12 @@ Have more compute? Use `qwen2.5-coder:7b-base` for potentially higher-quality su For LM Studio users, navigate to the "My Models" section, find your desired model, and copy the path (e.g., `Qwen/Qwen2.5-Coder-1.5B-Instruct-GGUF/qwen2.5-coder-1.5b-instruct-q4_k_m.gguf`). Use this path as the `model` value in your configuration. ::: + ### Using a remote instance When using a remote instance you need to set the `"apiBase"` value in the configuration: -```json title="config.json"" +```json title="config.json (Deprecated)"" { "tabAutocompleteModel": { "title": "Qwen2.5-Coder 1.5B", @@ -63,6 +64,7 @@ When using a remote instance you need to set the `"apiBase"` value in the config } } ``` + ## Other experiences There are many more models and providers you can use with Autocomplete. Check them out [here](../customize/model-types/autocomplete.md). You can also see more examples of Autocomplete configuration [here](../customize/deep-dives/autocomplete.md) diff --git a/docs/docs/chat/model-setup.mdx b/docs/docs/chat/model-setup.mdx index eb7dc5430..b055adf24 100644 --- a/docs/docs/chat/model-setup.mdx +++ b/docs/docs/chat/model-setup.mdx @@ -20,7 +20,7 @@ For the best overall Chat experience, you will want to use a 400B+ parameter mod Our current top recommendation is Claude Sonnet 3.5 from [Anthropic](../customize/model-providers/top-level/anthropic.md). -```json title="config.json" +```json title="config.json (Deprecated)" "models": [ { "title": "Claude 3.5 Sonnet", @@ -37,7 +37,7 @@ If you prefer to use an open-weight model, then Llama 3.1 405B from Meta is your - ```json title="config.json" + ```json title="config.json (Deprecated)" "models": [ { "title": "Llama 3.1 405B", @@ -49,7 +49,7 @@ If you prefer to use an open-weight model, then Llama 3.1 405B from Meta is your ``` - ```json title="config.json" + ```json title="config.json (Deprecated)" "models": [ { "title": "Llama 3.1 405B", @@ -61,7 +61,7 @@ If you prefer to use an open-weight model, then Llama 3.1 405B from Meta is your ``` - ```json title="config.json" + ```json title="config.json (Deprecated)" "models": [ { "title": "Llama 3.1 405B", @@ -72,7 +72,7 @@ If you prefer to use an open-weight model, then Llama 3.1 405B from Meta is your ``` - ```json title="config.json" + ```json title="config.json (Deprecated)" "models": [ { "title": "Llama 3.1 405B", @@ -88,7 +88,7 @@ If you prefer to use an open-weight model, then Llama 3.1 405B from Meta is your If you prefer to use a model from [OpenAI](../customize/model-providers/top-level/openai.md), then we recommend GPT-4o. -```json title="config.json" +```json title="config.json (Deprecated)" "models": [ { "title": "GPT-4o", @@ -103,7 +103,7 @@ If you prefer to use a model from [OpenAI](../customize/model-providers/top-leve If you prefer to use a model from [Google](../customize/model-providers/top-level/gemini.md), then we recommend Gemini 1.5 Pro. -```json title="config.json" +```json title="config.json (Deprecated)" "models": [ { "title": "Gemini 1.5 Pro", @@ -124,7 +124,7 @@ If your local machine can run an 8B parameter model, then we recommend running L - ```json title="config.json" + ```json title="config.json (Deprecated)" "models": [ { "title": "Llama 3.1 8B", @@ -135,7 +135,7 @@ If your local machine can run an 8B parameter model, then we recommend running L ``` - ```json title="config.json" + ```json title="config.json (Deprecated)" "models": [ { "title": "Llama 3.1 8B", @@ -153,7 +153,7 @@ If your local machine can run a 16B parameter model, then we recommend running D - ```json title="config.json" + ```json title="config.json (Deprecated)" "models": [ { "title": "DeepSeek Coder 2 16B", @@ -166,7 +166,7 @@ If your local machine can run a 16B parameter model, then we recommend running D - ```json title="config.json" + ```json title="config.json (Deprecated)" "models": [ { "title": "DeepSeek Coder 2 16B", diff --git a/docs/docs/customize/context-providers.md b/docs/docs/customize/context-providers.md index 2ab18613a..daf8b2d83 100644 --- a/docs/docs/customize/context-providers.md +++ b/docs/docs/customize/context-providers.md @@ -18,7 +18,7 @@ To use any of the built-in context providers, open `config.json` and add it to t Reference any file in your current workspace. -```json title="config.json" +```json title="config.json (Deprecated)" { "contextProviders": [ { @@ -32,7 +32,7 @@ Reference any file in your current workspace. Reference specific functions or classes from throughout your project. -```json title="config.json" +```json title="config.json (Deprecated)" { "contextProviders": [ { @@ -46,7 +46,7 @@ Reference specific functions or classes from throughout your project. Reference all of the changes you've made to your current branch. This is useful if you want to summarize what you've done or ask for a general review of your work before committing. -```json title="config.json" +```json title="config.json (Deprecated)" { "contextProviders": [ { @@ -60,7 +60,7 @@ Reference all of the changes you've made to your current branch. This is useful Reference the currently open file. -```json title="config.json" +```json title="config.json (Deprecated)" { "contextProviders": [ { @@ -74,7 +74,7 @@ Reference the currently open file. Reference the last command you ran in your IDE's terminal and its output. -```json title="config.json" +```json title="config.json (Deprecated)" { "contextProviders": [ { @@ -88,7 +88,7 @@ Reference the last command you ran in your IDE's terminal and its output. Reference the contents from any documentation site. -```json title="config.json" +```json title="config.json (Deprecated)" { "contextProviders": [ { @@ -106,7 +106,7 @@ To use it, you need to add a documentation site to your `config.json`. See the [ Reference the contents of all of your open files. Set `onlyPinned` to `true` to only reference pinned files. -```json title="config.json" +```json title="config.json (Deprecated)" { "contextProviders": [ { @@ -125,7 +125,7 @@ Reference relevant pages from across the web, automatically determined from your Optionally, set "n" to limit the number of results returned (default 6). -```json title="config.json" +```json title="config.json (Deprecated)" { "contextProviders": [ { @@ -142,7 +142,7 @@ Optionally, set "n" to limit the number of results returned (default 6). Reference the most relevant snippets from your codebase. -```json title="config.json" +```json title="config.json (Deprecated)" { "contextProviders": [ { @@ -158,7 +158,7 @@ Read more about indexing and retrieval [here](../customize/deep-dives/codebase.m Uses the same retrieval mechanism as `@Codebase`, but only on a single folder. -```json title="config.json" +```json title="config.json (Deprecated)" { "contextProviders": [ { @@ -172,7 +172,7 @@ Uses the same retrieval mechanism as `@Codebase`, but only on a single folder. Reference the results of codebase search, just like the results you would get from VS Code search. -```json title="config.json" +```json title="config.json (Deprecated)" { "contextProviders": [ { @@ -188,7 +188,7 @@ This context provider is powered by [ripgrep](https://github.com/BurntSushi/ripg Reference the markdown converted contents of a given URL. -```json title="config.json" +```json title="config.json (Deprecated)" { "contextProviders": [ { @@ -202,7 +202,7 @@ Reference the markdown converted contents of a given URL. Reference recent clipboard items -```json title="config.json" +```json title="config.json (Deprecated)" { "contextProviders": [ { @@ -216,7 +216,7 @@ Reference recent clipboard items Reference the structure of your current workspace. -```json title="config.json" +```json title="config.json (Deprecated)" { "contextProviders": [ { @@ -230,7 +230,7 @@ Reference the structure of your current workspace. Get Problems from the current file. -```json title="config.json" +```json title="config.json (Deprecated)" { "contextProviders": [ { @@ -244,7 +244,7 @@ Get Problems from the current file. Reference the contents of the local variables in the debugger. Currently only available in VS Code. -```json title="config.json" +```json title="config.json (Deprecated)" { "contextProviders": [ { @@ -265,7 +265,7 @@ Reference the outline of your codebase. By default, signatures are included alon `includeSignatures` params can be set to false to exclude signatures. This could be necessary for large codebases and/or to reduce context size significantly. Signatures will not be included if indexing is disabled. -```json title="config.json" +```json title="config.json (Deprecated)" { "contextProviders": [ { @@ -288,7 +288,7 @@ This context provider is inpsired by [Aider's repository map](https://aider.chat Reference the architecture and platform of your current operating system. -```json title="config.json" +```json title="config.json (Deprecated)" { "contextProviders": [ { @@ -302,7 +302,7 @@ Reference the architecture and platform of your current operating system. The [Model Context Protocol](https://modelcontextprotocol.io/introduction) is a standard proposed by Anthropic to unify prompts, context, and tool use. Continue supports any MCP server with the MCP context provider. Read their [quickstart](https://modelcontextprotocol.io/quickstart) to learn how to set up a local server and then configure your `config.json` like this: -```json title="config.json" +```json title="config.json (Deprecated)" { "experimental": { "modelContextProtocolServers": [ @@ -328,7 +328,7 @@ See [Prompt Files](/customize/deep-dives/prompt-files). Prompt files are not add Reference the conversation in a GitHub issue. -```json title="config.json" +```json title="config.json (Deprecated)" { "contextProviders": [ { @@ -353,7 +353,7 @@ Make sure to include your own [GitHub personal access token](https://docs.github Reference table schemas from Sqlite, Postgres, MSSQL, and MySQL databases. -```json title="config.json" +```json title="config.json (Deprecated)" { "contextProviders": [ { @@ -407,7 +407,7 @@ Available connection types: Reference the schema of a table, and some sample rows -```json title="config.json" +```json title="config.json (Deprecated)" { "contextProviders": [ { @@ -436,7 +436,7 @@ By default, the `schema` filter is set to `public`, and the `sampleRows` is set Reference the results of a Google search. -```json title="config.json" +```json title="config.json (Deprecated)" { "contextProviders": [ { @@ -457,7 +457,7 @@ Note: You can get an API key for free at [serper.dev](https://serper.dev). Reference an open MR for this branch on GitLab. -```json title="config.json" +```json title="config.json (Deprecated)" { "contextProviders": [ { @@ -476,7 +476,7 @@ You will need to create a [personal access token](https://docs.gitlab.com/ee/use You can specify the domain to communicate with by setting the `domain` parameter in your configurtion. By default this is set to `gitlab.com`. -```json title="config.json" +```json title="config.json (Deprecated)" { "contextProviders": [ { @@ -498,7 +498,7 @@ If you select some code to be edited, you can have the context provider filter o Reference the conversation in a Jira issue. -```json title="config.json" +```json title="config.json (Deprecated)" { "contextProviders": [ { @@ -520,7 +520,7 @@ This context provider supports both Jira API version 2 and 3. It will use versio that's what the cloud version uses, but if you have the datacenter version of Jira, you'll need to set the API Version to 2 using the `apiVersion` property. -```json title="config.json" +```json title="config.json (Deprecated)" { "contextProviders": [ { @@ -547,7 +547,7 @@ You can override this query by setting the `issueQuery` parameter. Reference the messages in a Discord channel. -```json title="config.json" +```json title="config.json (Deprecated)" { "contextProviders": [ { @@ -577,7 +577,7 @@ Make sure to include your own [Bot Token](https://discord.com/developers/applica The HttpContextProvider makes a POST request to the url passed in the configuration. The server must return 200 OK with a ContextItem object or an array of ContextItems. -```json title="config.json" +```json title="config.json (Deprecated)" { "contextProviders": [ { @@ -622,7 +622,7 @@ The response 200 OK should be a JSON object with the following structure: Reference specific git commit metadata and diff or all of the recent commits. -```json title="config.json" +```json title="config.json (Deprecated)" { "contextProviders": [ { @@ -643,7 +643,7 @@ The LastXCommitsDepth is how many recent commits will be included, defaults to 1 Reference recent clipboard items -```json title="config.json" +```json title="config.json (Deprecated)" { "contextProviders": [ { @@ -657,7 +657,7 @@ Reference recent clipboard items Query a [Greptile](https://www.greptile.com/) index of the current repo/branch. -```json title="config.json" +```json title="config.json (Deprecated)" { "contextProviders": [ { diff --git a/docs/docs/customize/deep-dives/autocomplete.md b/docs/docs/customize/deep-dives/autocomplete.md index 3936643e5..43c096669 100644 --- a/docs/docs/customize/deep-dives/autocomplete.md +++ b/docs/docs/customize/deep-dives/autocomplete.md @@ -7,7 +7,7 @@ keywords: [autocomplete] If you want to have the best autocomplete experience, we recommend using Codestral, which is available through the [Mistral API](https://console.mistral.ai/). To do this, obtain an API key and add it to your `config.json`: -```json title="config.json" +```json title="config.json (Deprecated)" { "tabAutocompleteModel": { "title": "Codestral", @@ -32,7 +32,7 @@ Once it has been downloaded, you should begin to see completions in VS Code. 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="config.json" +```json title="config.json (Deprecated)" { "tabAutocompleteModel": { "title": "Tab Autocomplete Model", @@ -71,7 +71,7 @@ This object allows you to customize the behavior of tab-autocomplete. The availa ### Full example -```json title="config.json" +```json title="config.json (Deprecated)" { "tabAutocompleteModel": { "title": "Tab Autocomplete Model", diff --git a/docs/docs/customize/deep-dives/codebase.md b/docs/docs/customize/deep-dives/codebase.md index 4da920943..a5a06644f 100644 --- a/docs/docs/customize/deep-dives/codebase.md +++ b/docs/docs/customize/deep-dives/codebase.md @@ -40,7 +40,7 @@ Here are use cases where it is not useful: There are a few options that let you configure the behavior of the codebase context provider. These can be set in `config.json`, and are the same for the codebase, docs, and folder context providers: -```json title="config.json" +```json title="config.json (Deprecated)" { "contextProviders": [ { diff --git a/docs/docs/customize/deep-dives/docs.md b/docs/docs/customize/deep-dives/docs.md index 0d3913ccd..bfc85ed7e 100644 --- a/docs/docs/customize/deep-dives/docs.md +++ b/docs/docs/customize/deep-dives/docs.md @@ -12,7 +12,7 @@ The [`@Docs` context provider](customize/context-providers.md#docs) allows you t To enable the `@Docs` context provider, you need to add it to the list of context providers in your `config.json` file. -```json title="config.json" +```json title="config.json (Deprecated)" { "contextProviders": [ { @@ -53,7 +53,7 @@ To add multiple documentation sites, we recommend adding them in bulk to your `c The [configuration schema for docs](https://github.com/continuedev/continue/blob/v0.9.212-vscode/extensions/vscode/config_schema.json#L1943-L1973) is as follows: -```json title="config.json" +```json title="config.json (Deprecated)" "docs": [ { "title": "Continue", @@ -73,7 +73,7 @@ The [configuration schema for docs](https://github.com/continuedev/continue/blob As with [@Codebase context provider configuration](https://docs.continue.dev/customize/deep-dives/codebase#configuration), you can adjust the behavior of the docs context provider with the `nRetrieve`, `nFinal`, and `useReranking` -```json title="config.json" +```json title="config.json (Deprecated)" { "contextProviders": [ { @@ -94,7 +94,7 @@ By default, we use a lighter weight tool to crawl documentation sites that canno If you want to crawl a site that is dynamically generated, or you get an error while attempting to crawl a site, you can enable the experimental `useChromiumForDocsCrawling` feature in your `config.json`. This will download and install Chromium to `~/.continue/.utils`. -```json title="config.json" +```json title="config.json (Deprecated)" "experimental": { "useChromiumForDocsCrawling": true } diff --git a/docs/docs/customize/model-providers/moonshot.md b/docs/docs/customize/model-providers/moonshot.md index cba20fb82..c182cf4dd 100644 --- a/docs/docs/customize/model-providers/moonshot.md +++ b/docs/docs/customize/model-providers/moonshot.md @@ -9,7 +9,7 @@ To use Moonshot AI models, you need to: 1. Get an API key from [Moonshot AI Platform](https://platform.moonshot.cn/) 2. Add the following configuration to your `config.json`: -```json title="config.json" +```json title="config.json (Deprecated)" { "models": [ { @@ -42,7 +42,7 @@ Moonshot AI currently provides the following models: Here's a complete configuration example: -```json title="config.json" +```json title="config.json (Deprecated)" { "models": [ { diff --git a/docs/docs/customize/model-providers/more/SambaNova.md b/docs/docs/customize/model-providers/more/SambaNova.md index f35c56dd5..ab1e7238d 100644 --- a/docs/docs/customize/model-providers/more/SambaNova.md +++ b/docs/docs/customize/model-providers/more/SambaNova.md @@ -2,7 +2,7 @@ The SambaNova Cloud is a cloud platform for running large AI models with the world record Llama 3.1 70B/405B performance. You can follow the instructions in [this blog post](https://sambanova.ai/blog/accelerating-coding-with-sambanova-cloud?ref=blog.continue.dev) to configure your setup. -```json title="config.json" +```json title="config.json (Deprecated)" { "models": [ { diff --git a/docs/docs/customize/model-providers/more/asksage.md b/docs/docs/customize/model-providers/more/asksage.md index 382f6862f..a4445ba77 100644 --- a/docs/docs/customize/model-providers/more/asksage.md +++ b/docs/docs/customize/model-providers/more/asksage.md @@ -10,7 +10,7 @@ To get an Ask Sage API key login to the Ask Sage platform (If you don't have an To use the Ask Sage models, the following configuration is required to the `config.json` file: -```json title="config.json" +```json title="config.json (Deprecated)" { "models": [ { diff --git a/docs/docs/customize/model-providers/more/cerebras.md b/docs/docs/customize/model-providers/more/cerebras.md index d9cbd31dc..1fdc040ed 100644 --- a/docs/docs/customize/model-providers/more/cerebras.md +++ b/docs/docs/customize/model-providers/more/cerebras.md @@ -6,7 +6,7 @@ Cerebras Inference uses specialized silicon to provides fast inference. 2. Create and copy the API key for use in Continue. 3. Update your Continue config file: -```json title="config.json" +```json title="config.json (Deprecated)" { "models": [ { diff --git a/docs/docs/customize/model-providers/more/cloudflare.md b/docs/docs/customize/model-providers/more/cloudflare.md index 5281cba79..fb355704b 100644 --- a/docs/docs/customize/model-providers/more/cloudflare.md +++ b/docs/docs/customize/model-providers/more/cloudflare.md @@ -2,7 +2,7 @@ Cloudflare Workers AI can be used for both chat and tab autocompletion in Continue. To setup Cloudflare Workers AI, add the following to your `config.json` file: -```json title="config.json" +```json title="config.json (Deprecated)" { "models": [ { diff --git a/docs/docs/customize/model-providers/more/cohere.md b/docs/docs/customize/model-providers/more/cohere.md index 8a1f069a6..4e2309e4f 100644 --- a/docs/docs/customize/model-providers/more/cohere.md +++ b/docs/docs/customize/model-providers/more/cohere.md @@ -6,7 +6,7 @@ Before using Cohere, visit the [Cohere dashboard](https://dashboard.cohere.com/a We recommend configuring **Command-R Plus** as your chat model. -```json title="config.json" +```json title="config.json (Deprecated)" { "models": [ { @@ -29,7 +29,7 @@ Cohere currently does not offer any autocomplete models. We recommend configuring **embed-english-v3.0** as your embeddings model. -```json title="config.json" +```json title="config.json (Deprecated)" { "embeddingsProvider": { "provider": "cohere", @@ -43,7 +43,7 @@ We recommend configuring **embed-english-v3.0** as your embeddings model. We recommend configuring **rerank-english-v3.0** as your reranking model. -```json title="config.json" +```json title="config.json (Deprecated)" { "reranker": { "name": "cohere", diff --git a/docs/docs/customize/model-providers/more/deepinfra.md b/docs/docs/customize/model-providers/more/deepinfra.md index f79824cce..0c31466e4 100644 --- a/docs/docs/customize/model-providers/more/deepinfra.md +++ b/docs/docs/customize/model-providers/more/deepinfra.md @@ -2,7 +2,7 @@ [DeepInfra](https://deepinfra.com) provides inference for open-source models at very low cost. To get started with DeepInfra, obtain your API key [here](https://deepinfra.com/dash). Then, find the model you want to use [here](https://deepinfra.com/models?type=text-generation) and copy the name of the model. Continue can then be configured to use the `DeepInfra` LLM class, like the example here: -```json title="config.json" +```json title="config.json (Deprecated)" { "models": [ { diff --git a/docs/docs/customize/model-providers/more/flowise.md b/docs/docs/customize/model-providers/more/flowise.md index f860d966b..8302f0936 100644 --- a/docs/docs/customize/model-providers/more/flowise.md +++ b/docs/docs/customize/model-providers/more/flowise.md @@ -2,7 +2,7 @@ [Flowise](https://flowiseai.com/) is a low-code/no-code drag & drop tool with the aim to make it easy for people to visualize and build LLM apps. Continue can then be configured to use the `Flowise` LLM class, like the example here: -```json title="config.json" +```json title="config.json (Deprecated)" { "models": [ { diff --git a/docs/docs/customize/model-providers/more/function-network.md b/docs/docs/customize/model-providers/more/function-network.md index c48e899d8..5c9ee3b40 100644 --- a/docs/docs/customize/model-providers/more/function-network.md +++ b/docs/docs/customize/model-providers/more/function-network.md @@ -2,6 +2,7 @@ title: Function Network slug: ../function-network --- + # Function Network > Private, Affordable User-Owned AI @@ -16,7 +17,7 @@ To get an API key, login to the Function Network Developer Platform. If you don' Function Network supports a number of models for chat. We recommend using LLama 3.1 70b or Qwen2.5-Coder-32B-Instruct. -```json title="config.json" +```json title="config.json (Deprecated)" { "models": [ { @@ -35,7 +36,7 @@ Function Network supports a number of models for chat. We recommend using LLama Function Network supports a number of models for autocomplete. We recommend using Llama 3.1 8b or Qwen2.5-Coder-1.5B. -```json title="config.json" +```json title="config.json (Deprecated)" { "tabAutocompleteModel": { "title": "Deepseek Coder 6.7b", @@ -50,7 +51,7 @@ Function Network supports a number of models for autocomplete. We recommend usin Function Network supports a number of models for embeddings. We recommend using baai/bge-base-en-v1.5. -```json title="config.json" +```json title="config.json (Deprecated)" { "embeddingsProvider": { "provider": "function-network", diff --git a/docs/docs/customize/model-providers/more/groq.md b/docs/docs/customize/model-providers/more/groq.md index 54e678abc..ab8a7e278 100644 --- a/docs/docs/customize/model-providers/more/groq.md +++ b/docs/docs/customize/model-providers/more/groq.md @@ -5,7 +5,7 @@ Groq provides the fastest available inference for open-source language models, i 1. Obtain an API key [here](https://console.groq.com/keys) 2. Update your Continue config file like this: -```json title="config.json" +```json title="config.json (Deprecated)" { "models": [ { diff --git a/docs/docs/customize/model-providers/more/huggingfaceinferenceapi.md b/docs/docs/customize/model-providers/more/huggingfaceinferenceapi.md index a2122fc4d..76f0d6f3b 100644 --- a/docs/docs/customize/model-providers/more/huggingfaceinferenceapi.md +++ b/docs/docs/customize/model-providers/more/huggingfaceinferenceapi.md @@ -2,7 +2,7 @@ Hugging Face Inference Endpoints are an easy way to setup instances of open-source language models on any cloud. Sign up for an account and add billing [here](https://huggingface.co/settings/billing), access the Inference Endpoints [here](https://ui.endpoints.huggingface.co), click on “New endpoint”, and fill out the form (e.g. select a model like [WizardCoder-Python-34B-V1.0](https://huggingface.co/WizardLM/WizardCoder-Python-34B-V1.0)), and then deploy your model by clicking “Create Endpoint”. Change `~/.continue/config.json` to look like this: -```json title="config.json" +```json title="config.json (Deprecated)" { "models": [ { diff --git a/docs/docs/customize/model-providers/more/ipex_llm.md b/docs/docs/customize/model-providers/more/ipex_llm.md index 47bb18b2a..60c3a792a 100644 --- a/docs/docs/customize/model-providers/more/ipex_llm.md +++ b/docs/docs/customize/model-providers/more/ipex_llm.md @@ -6,7 +6,7 @@ IPEX-LLM supports accelerated Ollama backend to be hosted on Intel GPU. Refer to [this guide](https://ipex-llm.readthedocs.io/en/latest/doc/LLM/Quickstart/ollama_quickstart.html) from IPEX-LLM official documentation about how to install and run Ollama serve accelerated by IPEX-LLM on Intel GPU. You can then configure Continue to use the IPEX-LLM accelerated `"ollama"` provider as follows: -```json title="config.json" +```json title="config.json (Deprecated)" { "models": [ { @@ -20,7 +20,7 @@ IPEX-LLM supports accelerated Ollama backend to be hosted on Intel GPU. Refer to If you would like to reach the Ollama service from another machine, make sure you set or export the environment variable `OLLAMA_HOST=0.0.0.0` before executing the command `ollama serve`. Then, in the Continue configuration, set `'apiBase'` to correspond with the IP address / port of the remote machine. That is, Continue can be configured to be: -```json title="config.json" +```json title="config.json (Deprecated)" { "models": [ { diff --git a/docs/docs/customize/model-providers/more/kindo.md b/docs/docs/customize/model-providers/more/kindo.md index 9e205c66e..a324cf2f0 100644 --- a/docs/docs/customize/model-providers/more/kindo.md +++ b/docs/docs/customize/model-providers/more/kindo.md @@ -4,7 +4,7 @@ Kindo offers centralized control over your organization's AI operations, ensurin ## Config Example -```json title="config.json" +```json title="config.json (Deprecated)" { "models": [ { @@ -19,7 +19,7 @@ Kindo offers centralized control over your organization's AI operations, ensurin ## Tab Autocomplete Config Example -```json title="config.json" +```json title="config.json (Deprecated)" { "tabAutocompleteModel": [ { diff --git a/docs/docs/customize/model-providers/more/llamacpp.md b/docs/docs/customize/model-providers/more/llamacpp.md index 8cb367e3f..e1534c651 100644 --- a/docs/docs/customize/model-providers/more/llamacpp.md +++ b/docs/docs/customize/model-providers/more/llamacpp.md @@ -8,7 +8,7 @@ Run the llama.cpp server binary to start the API server. If running on a remote After it's up and running, change `~/.continue/config.json` to look like this: -```json title="config.json" +```json title="config.json (Deprecated)" { "models": [ { diff --git a/docs/docs/customize/model-providers/more/llamafile.md b/docs/docs/customize/model-providers/more/llamafile.md index 71f4f7f07..b11870624 100644 --- a/docs/docs/customize/model-providers/more/llamafile.md +++ b/docs/docs/customize/model-providers/more/llamafile.md @@ -2,7 +2,7 @@ A [llamafile](https://github.com/Mozilla-Ocho/llamafile#readme) is a self-contained binary that can run an open-source LLM. You can configure this provider in your config.json as follows: -```json title="config.json" +```json title="config.json (Deprecated)" { "models": [ { diff --git a/docs/docs/customize/model-providers/more/lmstudio.md b/docs/docs/customize/model-providers/more/lmstudio.md index a901f811a..19114c217 100644 --- a/docs/docs/customize/model-providers/more/lmstudio.md +++ b/docs/docs/customize/model-providers/more/lmstudio.md @@ -2,7 +2,7 @@ [LM Studio](https://lmstudio.ai) is an application for Mac, Windows, and Linux that makes it easy to locally run open-source models and comes with a great UI. To get started with LM Studio, download from the website, use the UI to download a model, and then start the local inference server. Continue can then be configured to use the `LMStudio` LLM class: -```json title="config.json" +```json title="config.json (Deprecated)" { "models": [ { @@ -18,7 +18,7 @@ LMStudio supports embeddings endpoints, and comes with the `nomic-ai/nomic-embed-text-v1.5-GGUF` model (as of Nov 2024, check your models) -```json title="config.json" +```json title="config.json (Deprecated)" { "embeddingsProvider": { "provider": "lmstudio", @@ -31,7 +31,7 @@ LMStudio supports embeddings endpoints, and comes with the `nomic-ai/nomic-embed To configure a remote instance of LM Studio, add the `"apiBase"` property to your model in config.json: -```json title="config.json" +```json title="config.json (Deprecated)" { "title": "LM Studio", "model": "codestral", diff --git a/docs/docs/customize/model-providers/more/msty.md b/docs/docs/customize/model-providers/more/msty.md index 1fda1d88b..ce930ace3 100644 --- a/docs/docs/customize/model-providers/more/msty.md +++ b/docs/docs/customize/model-providers/more/msty.md @@ -2,7 +2,7 @@ [Msty](https://msty.app/) is an application for Windows, Mac, and Linux that makes it really easy to run online as well as local open-source models, including Llama-2, DeepSeek Coder, etc. No need to fidget with your terminal, run a command, or anything. Just download the app from the website, click a button, and you are up and running. Continue can then be configured to use the `Msty` LLM class: -```json title="config.json" +```json title="config.json (Deprecated)" { "models": [ { @@ -30,7 +30,7 @@ In addition to the model type, you can also configure some of the parameters tha If you need to send custom headers for authentication, you may use the `requestOptions.headers` property like this: -```json title="config.json" +```json title="config.json (Deprecated)" { "models": [ { diff --git a/docs/docs/customize/model-providers/more/nebius.md b/docs/docs/customize/model-providers/more/nebius.md index d4cfa344b..92bc6a997 100644 --- a/docs/docs/customize/model-providers/more/nebius.md +++ b/docs/docs/customize/model-providers/more/nebius.md @@ -8,7 +8,7 @@ Available models can be found on the [Nebius AI Studio models page](https://stud ## Chat model -```json title="config.json" +```json title="config.json (Deprecated)" { "models": [ { @@ -25,7 +25,7 @@ Available models can be found on the [Nebius AI Studio models page](https://stud Available models can be found on the [Nebius AI Studio embeddings page](https://studio.nebius.ai/models/embedding) -```json title="config.json" +```json title="config.json (Deprecated)" { "embeddingsProvider": { "provider": "nebius", diff --git a/docs/docs/customize/model-providers/more/novita.md b/docs/docs/customize/model-providers/more/novita.md index 02f7cefb5..5b829bf91 100644 --- a/docs/docs/customize/model-providers/more/novita.md +++ b/docs/docs/customize/model-providers/more/novita.md @@ -2,7 +2,7 @@ [Novita AI](https://novita.ai?utm_source=github_continuedev&utm_medium=github_readme&utm_campaign=github_link) offers an affordable, reliable, and simple inference platform with scalable [LLM API](https://novita.ai/docs/model-api/reference/introduction.html), empowering developers to build AI applications. Try the [Novita AI Llama 3 API Demo](https://novita.ai/model-api/product/llm-api/playground/meta-llama-llama-3.1-70b-instruct?utm_source=github_continuedev&utm_medium=github_readme&utm_campaign=github_link) today!. You can sign up [here](https://novita.ai/user/login?&redirect=/&utm_source=github_continuedev&utm_medium=github_readme&utm_campaign=github_link), copy your API key on the [Key Management](https://novita.ai/settings/key-management?utm_source=github_continuedev&utm_medium=github_readme&utm_campaign=github_link), and then hit the play button on any model from the [Novita AI Models list](https://novita.ai/llm-api?utm_source=github_continuedev&utm_medium=github_readme&utm_campaign=github_link). Change `~/.continue/config.json` to look like this: -```json title="config.json" +```json title="config.json (Deprecated)" { "models": [ { diff --git a/docs/docs/customize/model-providers/more/nvidia.md b/docs/docs/customize/model-providers/more/nvidia.md index 049ff7754..89e2136e8 100644 --- a/docs/docs/customize/model-providers/more/nvidia.md +++ b/docs/docs/customize/model-providers/more/nvidia.md @@ -12,7 +12,7 @@ title: NVIDIA We recommend configuring **Nemotron-4-340B-Instruct** as your chat model. -```json title="config.json" +```json title="config.json (Deprecated)" { "models": [ { @@ -35,7 +35,7 @@ NVIDIA currently does not offer any autocomplete models. We recommend configuring **NVIDIA Retrieval QA Mistral 7B** as your embeddings model. -```json title="config.json" +```json title="config.json (Deprecated)" { "embeddingsProvider": { "provider": "nvidia", diff --git a/docs/docs/customize/model-providers/more/openrouter.md b/docs/docs/customize/model-providers/more/openrouter.md index d08f754f5..bfd86ec69 100644 --- a/docs/docs/customize/model-providers/more/openrouter.md +++ b/docs/docs/customize/model-providers/more/openrouter.md @@ -4,7 +4,7 @@ OpenRouter is a unified interface for commercial and open-source models, giving Change `~/.continue/config.json` to look like the following. -```json title="config.json" +```json title="config.json (Deprecated)" { "models": [ { @@ -22,7 +22,7 @@ To utilize features such as provider preferences or model routing configuration, For example, to prevent extra long prompts from being compressed, you can explicitly turn off the feature like so: -```json title="config.json" +```json title="config.json (Deprecated)" { "models": [ { diff --git a/docs/docs/customize/model-providers/more/replicatellm.md b/docs/docs/customize/model-providers/more/replicatellm.md index 065825729..34c72e010 100644 --- a/docs/docs/customize/model-providers/more/replicatellm.md +++ b/docs/docs/customize/model-providers/more/replicatellm.md @@ -2,7 +2,7 @@ Replicate is a great option for newly released language models or models that you've deployed through their platform. Sign up for an account [here](https://replicate.ai/), copy your API key, and then select any model from the [Replicate Streaming List](https://replicate.com/collections/streaming-language-models). Change `~/.continue/config.json` to look like this: -```json title="config.json" +```json title="config.json (Deprecated)" { "models": [ { diff --git a/docs/docs/customize/model-providers/more/sagemaker.md b/docs/docs/customize/model-providers/more/sagemaker.md index 0c9eba812..a7b82c353 100644 --- a/docs/docs/customize/model-providers/more/sagemaker.md +++ b/docs/docs/customize/model-providers/more/sagemaker.md @@ -4,7 +4,7 @@ SageMaker can be used for both chat and embedding models. Chat models are suppor To setup SageMaker as a chat model provider, add the following to your `config.json` file: -```json title="config.json" +```json title="config.json (Deprecated)" { "models": [ { @@ -17,7 +17,7 @@ To setup SageMaker as a chat model provider, add the following to your `config.j "embeddingsProvider": { "provider": "sagemaker", "model": "mxbai-embed-large-v1-endpoint" - }, + } } ``` diff --git a/docs/docs/customize/model-providers/more/scaleway.md b/docs/docs/customize/model-providers/more/scaleway.md index 411e95f3a..dce234f49 100644 --- a/docs/docs/customize/model-providers/more/scaleway.md +++ b/docs/docs/customize/model-providers/more/scaleway.md @@ -15,7 +15,7 @@ Read the [quickstart documentation here](https://www.scaleway.com/en/docs/ai-dat We recommend configuring **Qwen2.5-Coder-32B-Instruct** as your chat model. [Click here](https://www.scaleway.com/en/docs/ai-data/generative-apis/reference-content/supported-models/) to see the list of available chat models. -```json title="config.json" +```json title="config.json (Deprecated)" { "models": [ { @@ -38,7 +38,7 @@ Scaleway currently does not offer any autocomplete models. We recommend configuring **BGE-Multilingual-Gemma2** as your embeddings model. -```json title="config.json" +```json title="config.json (Deprecated)" { "embeddingsProvider": { "provider": "scaleway", @@ -46,4 +46,4 @@ We recommend configuring **BGE-Multilingual-Gemma2** as your embeddings model. "apiKey": "[API_KEY]" } } -``` \ No newline at end of file +``` diff --git a/docs/docs/customize/model-providers/more/siliconflow.md b/docs/docs/customize/model-providers/more/siliconflow.md index c27fbbdaf..96c7a90df 100644 --- a/docs/docs/customize/model-providers/more/siliconflow.md +++ b/docs/docs/customize/model-providers/more/siliconflow.md @@ -12,7 +12,7 @@ You can get an API key from the [Silicon Cloud](https://cloud.siliconflow.cn/acc We recommend configuring **Qwen/Qwen2.5-Coder-32B-Instruct** as your chat model. -```json title="config.json" +```json title="config.json (Deprecated)" { "models": [ { @@ -29,7 +29,7 @@ We recommend configuring **Qwen/Qwen2.5-Coder-32B-Instruct** as your chat model. We recommend configuring **Qwen/Qwen2.5-Coder-7B-Instruct** as your autocomplete model. -```json title="config.json" +```json title="config.json (Deprecated)" { "tabAutocompleteModel": { "title": "Qwen", diff --git a/docs/docs/customize/model-providers/more/textgenwebui.md b/docs/docs/customize/model-providers/more/textgenwebui.md index 723079735..66ea07268 100644 --- a/docs/docs/customize/model-providers/more/textgenwebui.md +++ b/docs/docs/customize/model-providers/more/textgenwebui.md @@ -2,7 +2,7 @@ TextGenWebUI is a comprehensive, open-source language model UI and local server. You can set it up with an OpenAI-compatible server plugin, and then configure it in your `config.json` like this: -```json title="config.json" +```json title="config.json (Deprecated)" { "models": [ { diff --git a/docs/docs/customize/model-providers/more/together.md b/docs/docs/customize/model-providers/more/together.md index e5ed9abd0..9025c50b1 100644 --- a/docs/docs/customize/model-providers/more/together.md +++ b/docs/docs/customize/model-providers/more/together.md @@ -2,7 +2,7 @@ The Together API is a cloud platform for running large AI models. You can sign up [here](https://api.together.xyz/signup), copy your API key on the initial welcome screen, and then hit the play button on any model from the [Together Models list](https://docs.together.ai/docs/serverless-models). Change `~/.continue/config.json` to look like this: -```json title="config.json" +```json title="config.json (Deprecated)" { "models": [ { diff --git a/docs/docs/customize/model-providers/more/vllm.md b/docs/docs/customize/model-providers/more/vllm.md index 594f0b428..45daa168e 100644 --- a/docs/docs/customize/model-providers/more/vllm.md +++ b/docs/docs/customize/model-providers/more/vllm.md @@ -10,7 +10,7 @@ vllm serve meta-llama/Meta-Llama-3.1-8B-Instruct We recommend configuring **Llama3.1 8B** as your chat model. -```json title="config.json" +```json title="config.json (Deprecated)" { "models": [ { @@ -27,7 +27,7 @@ We recommend configuring **Llama3.1 8B** as your chat model. We recommend configuring **Qwen2.5-Coder 1.5B** as your autocomplete model. -```json title="config.json" +```json title="config.json (Deprecated)" { "tabAutocompleteModel": { "title": "Qwen2.5-Coder 1.5B", @@ -42,7 +42,7 @@ We recommend configuring **Qwen2.5-Coder 1.5B** as your autocomplete model. We recommend configuring **Nomic Embed Text** as your embeddings model. -```json title="config.json" +```json title="config.json (Deprecated)" { "embeddingsProvider": { "provider": "vllm", diff --git a/docs/docs/customize/model-providers/top-level/anthropic.md b/docs/docs/customize/model-providers/top-level/anthropic.md index 963734fd4..a7fa42888 100644 --- a/docs/docs/customize/model-providers/top-level/anthropic.md +++ b/docs/docs/customize/model-providers/top-level/anthropic.md @@ -13,7 +13,7 @@ You can get an API key from the [Anthropic console](https://console.anthropic.co We recommend configuring **Claude 3.5 Sonnet** as your chat model. -```json title="config.json" +```json title="config.json (Deprecated)" { "models": [ { @@ -50,7 +50,7 @@ Anthropic supports [prompt caching with Claude](https://docs.anthropic.com/en/do To enable caching of the system message and the turn-by-turn conversation, update your your model configuration as following: -```json title="config.json" +```json title="config.json (Deprecated)" { "models": [ { diff --git a/docs/docs/customize/model-providers/top-level/azure.md b/docs/docs/customize/model-providers/top-level/azure.md index ccf8b814e..02cfcdd0d 100644 --- a/docs/docs/customize/model-providers/top-level/azure.md +++ b/docs/docs/customize/model-providers/top-level/azure.md @@ -15,7 +15,7 @@ For details on OpenAI model setup, see [Azure OpenAI Service configuration](#gen We recommend configuring **GPT-4o** as your chat model. -```json title="config.json" +```json title="config.json (Deprecated)" "models": [{ "title": "GPT-4o", "provider": "azure", @@ -30,7 +30,7 @@ We recommend configuring **GPT-4o** as your chat model. We recommend configuring **Codestral** as your autocomplete model. -```json title="config.json" +```json title="config.json (Deprecated)" { "tabAutocompleteModel": { "title": "Codestral", @@ -44,7 +44,7 @@ We recommend configuring **Codestral** as your autocomplete model. We recommend configuring **text-embedding-3-large** as your embeddings model. -```json title="config.json" +```json title="config.json (Deprecated)" "embeddingsProvider": { "provider": "openai", "model": "text-embedding-3-large", @@ -79,7 +79,7 @@ To find this information in _Azure AI Foundry_, first select the model that you For example, a Target URI of `https://just-an-example.openai.azure.com/openai/deployments/gpt-4o-july/chat/completions?api-version=2023-03-15-preview` would map to the following: -```json title="config.json" +```json title="config.json (Deprecated)" { "title": "GPT-4o Azure", "model": "gpt-4o", diff --git a/docs/docs/customize/model-providers/top-level/bedrock.md b/docs/docs/customize/model-providers/top-level/bedrock.md index 67d919a2f..53ae537bf 100644 --- a/docs/docs/customize/model-providers/top-level/bedrock.md +++ b/docs/docs/customize/model-providers/top-level/bedrock.md @@ -9,7 +9,7 @@ Amazon Bedrock is a fully managed service on AWS that provides access to foundat We recommend configuring **Claude 3.5 Sonnet** as your chat model. -```json title="config.json" +```json title="config.json (Deprecated)" { "models": [ { @@ -22,10 +22,12 @@ We recommend configuring **Claude 3.5 Sonnet** as your chat model. ] } ``` + > If you run into the following error when connecting to the new Claude 3.5 Sonnet 2 models from AWS - `400 Invocation of model ID anthropic.claude-3-5-sonnet-20241022-v2:0 with on-demand throughput isn’t supported. Retry your request with the ID or ARN of an inference profile that contains this model.` > You can fix this using the following config.json -```json title="config.json" + +```json title="config.json (Deprecated)" { "models": [ { @@ -49,7 +51,7 @@ Bedrock currently does not offer any autocomplete models. We recommend configuring [`amazon.titan-embed-text-v2:0`](https://docs.aws.amazon.com/bedrock/latest/devguide/models.html#amazon.titan-embed-text-v2-0) as your embeddings model. -```json title="~/.continue/config.json" +```json title="config.json (Deprecated)" { "embeddingsProvider": { "title": "Embeddings Model", @@ -64,7 +66,7 @@ We recommend configuring [`amazon.titan-embed-text-v2:0`](https://docs.aws.amazo We recommend configuring `cohere.rerank-v3-5:0` as your reranking model, you may also use `amazon.rerank-v1:0`. -```json title="~/.continue/config.json" +```json title="config.json (Deprecated)" { "reranker": { "name": "bedrock", @@ -92,7 +94,7 @@ aws_session_token = pqrstuvwxyz # Optional: means short term creds. To setup Bedrock using custom imported models, add the following to your `config.json` file: -```json title="config.json" +```json title="config.json (Deprecated)" { "models": [ { diff --git a/docs/docs/customize/model-providers/top-level/deepseek.md b/docs/docs/customize/model-providers/top-level/deepseek.md index 1ea875785..6698ebbb5 100644 --- a/docs/docs/customize/model-providers/top-level/deepseek.md +++ b/docs/docs/customize/model-providers/top-level/deepseek.md @@ -13,7 +13,7 @@ You can get an API key from the [DeepSeek console](https://www.deepseek.com/). We recommend configuring **DeepSeek Chat** as your chat model. -```json title="config.json" +```json title="config.json (Deprecated)" { "models": [ { @@ -30,7 +30,7 @@ We recommend configuring **DeepSeek Chat** as your chat model. We recommend configuring **DeepSeek Coder** as your autocomplete model. -```json title="config.json" +```json title="config.json (Deprecated)" { "tabAutocompleteModel": { "title": "DeepSeek Coder", diff --git a/docs/docs/customize/model-providers/top-level/gemini.md b/docs/docs/customize/model-providers/top-level/gemini.md index eff3e91ac..9b6247484 100644 --- a/docs/docs/customize/model-providers/top-level/gemini.md +++ b/docs/docs/customize/model-providers/top-level/gemini.md @@ -13,7 +13,7 @@ You can get an API key from the [Google AI Studio](https://aistudio.google.com/) We recommend configuring **Gemini 1.5 Pro** as your chat model. -```json title="config.json" +```json title="config.json (Deprecated)" { "models": [ { @@ -36,7 +36,7 @@ Gemini currently does not offer any autocomplete models. We recommend configuring **text-embedding-004** as your embeddings model. -```json title="config.json" +```json title="config.json (Deprecated)" { "embeddingsProvider": { "provider": "gemini", diff --git a/docs/docs/customize/model-providers/top-level/mistral.md b/docs/docs/customize/model-providers/top-level/mistral.md index 2c1eb81e1..67ba28b3e 100644 --- a/docs/docs/customize/model-providers/top-level/mistral.md +++ b/docs/docs/customize/model-providers/top-level/mistral.md @@ -13,7 +13,7 @@ You can get an API key from the [Mistral Dashboard](https://console.mistral.ai). We recommend configuring **Mistral Large** as your chat model. -```json title="config.json" +```json title="config.json (Deprecated)" { "models": [ { @@ -30,7 +30,7 @@ We recommend configuring **Mistral Large** as your chat model. We recommend configuring **Codestral** as your autocomplete model. -```json title="config.json" +```json title="config.json (Deprecated)" { "tabAutocompleteModel": { "title": "Codestral", @@ -45,7 +45,7 @@ We recommend configuring **Codestral** as your autocomplete model. We recommend configuring **Mistral Embed** as your embeddings model. -```json title="config.json" +```json title="config.json (Deprecated)" { "embeddingsProvider": { "provider": "mistral", diff --git a/docs/docs/customize/model-providers/top-level/ollama.md b/docs/docs/customize/model-providers/top-level/ollama.md index 611c3dad8..f2229c3b6 100644 --- a/docs/docs/customize/model-providers/top-level/ollama.md +++ b/docs/docs/customize/model-providers/top-level/ollama.md @@ -9,7 +9,7 @@ Ollama is an open-source tool that allows to run large language models (LLMs) lo We recommend configuring **Llama3.1 8B** as your chat model. -```json title="config.json" +```json title="config.json (Deprecated)" { "models": [ { @@ -25,7 +25,7 @@ We recommend configuring **Llama3.1 8B** as your chat model. We recommend configuring **Qwen2.5-Coder 1.5B** as your autocomplete model. -```json title="config.json" +```json title="config.json (Deprecated)" { "tabAutocompleteModel": { "title": "Qwen2.5-Coder 1.5B", @@ -39,7 +39,7 @@ We recommend configuring **Qwen2.5-Coder 1.5B** as your autocomplete model. We recommend configuring **Nomic Embed Text** as your embeddings model. -```json title="config.json" +```json title="config.json (Deprecated)" { "embeddingsProvider": { "provider": "ollama", @@ -58,7 +58,7 @@ Ollama currently does not offer any reranking models. To configure a remote instance of Ollama, add the `"apiBase"` property to your model in config.json: -```json title="config.json" +```json title="config.json (Deprecated)" { "models": [ { diff --git a/docs/docs/customize/model-providers/top-level/openai.md b/docs/docs/customize/model-providers/top-level/openai.md index 40126fb9b..d59fe1f6a 100644 --- a/docs/docs/customize/model-providers/top-level/openai.md +++ b/docs/docs/customize/model-providers/top-level/openai.md @@ -13,7 +13,7 @@ You can get an API key from the [OpenAI console](https://platform.openai.com/acc We recommend configuring **GPT-4o** as your chat model. -```json title="config.json" +```json title="config.json (Deprecated)" { "models": [ { @@ -36,7 +36,7 @@ OpenAI currently does not offer any autocomplete models. We recommend configuring **text-embedding-3-large** as your embeddings model. -```json title="config.json" +```json title="config.json (Deprecated)" { "embeddingsProvider": { "provider": "openai", @@ -72,7 +72,7 @@ OpenAI compatible APIs If you are using an OpenAI compatible server / API, you can change the `apiBase` like this: -```json title="config.json" +```json title="config.json (Deprecated)" { "models": [ { @@ -88,7 +88,7 @@ If you are using an OpenAI compatible server / API, you can change the `apiBase` To force usage of `chat/completions` instead of `completions` endpoint you can set: -```json title="config.json" +```json title="config.json (Deprecated)" { "models": [ { diff --git a/docs/docs/customize/model-providers/top-level/vertexai.md b/docs/docs/customize/model-providers/top-level/vertexai.md index 50958cae0..a02609f35 100644 --- a/docs/docs/customize/model-providers/top-level/vertexai.md +++ b/docs/docs/customize/model-providers/top-level/vertexai.md @@ -13,7 +13,7 @@ You need to enable the [Vertex AI API](https://console.cloud.google.com/marketpl We recommend configuring **Claude 3.5 Sonnet** as your chat model. -```json title="config.json" +```json title="config.json (Deprecated)" { "models": [ { @@ -31,7 +31,7 @@ We recommend configuring **Claude 3.5 Sonnet** as your chat model. We recommend configuring **Codestral** or **code-gecko** as your autocomplete model. -```json title="config.json" +```json title="config.json (Deprecated)" { "tabAutocompleteModel": { "title": "Codestral (Vertex AI)", @@ -47,7 +47,7 @@ We recommend configuring **Codestral** or **code-gecko** as your autocomplete mo We recommend configuring **text-embedding-004** as your embeddings model. -```json title="config.json" +```json title="config.json (Deprecated)" { "embeddingsProvider": { "provider": "vertexai", diff --git a/docs/docs/customize/model-providers/top-level/xAI.md b/docs/docs/customize/model-providers/top-level/xAI.md index 9bf23be83..c9317758b 100644 --- a/docs/docs/customize/model-providers/top-level/xAI.md +++ b/docs/docs/customize/model-providers/top-level/xAI.md @@ -13,7 +13,7 @@ You can get an API key from the [xAI console](https://console.x.ai/) We recommend configuring **grok-beta** as your chat model. -```json title="config.json" +```json title="config.json (Deprecated)" { "models": [ { diff --git a/docs/docs/customize/model-types/embeddings.md b/docs/docs/customize/model-types/embeddings.md index 137f6c260..66fcf9a20 100644 --- a/docs/docs/customize/model-types/embeddings.md +++ b/docs/docs/customize/model-types/embeddings.md @@ -27,7 +27,7 @@ If you want to generate embeddings locally, we recommend using `nomic-embed-text After obtaining an API key from [here](https://www.voyageai.com/), you can configure like this: -```json title="config.json" +```json title="config.json (Deprecated)" { "embeddingsProvider": { "provider": "voyage", @@ -45,7 +45,7 @@ See [here](../model-providers/top-level/ollama.md#embeddings-model) for instruct [Transformers.js](https://huggingface.co/docs/transformers.js/index) is a JavaScript port of the popular [Transformers](https://huggingface.co/transformers/) library. It allows embeddings to be calculated entirely locally. The model used is `all-MiniLM-L6-v2`, which is shipped alongside the Continue extension. -```json title="config.json" +```json title="config.json (Deprecated)" { "embeddingsProvider": { "provider": "transformers.js" @@ -57,7 +57,7 @@ See [here](../model-providers/top-level/ollama.md#embeddings-model) for instruct [Hugging Face Text Embeddings Inference](https://huggingface.co/docs/text-embeddings-inference/en/index) enables you to host your own embeddings endpoint. You can configure embeddings to use your endpoint as follows: -```json title="config.json" +```json title="config.json (Deprecated)" { "embeddingsProvider": { "provider": "huggingface-tei", diff --git a/docs/docs/customize/model-types/reranking.md b/docs/docs/customize/model-types/reranking.md index a87918cb2..c66445831 100644 --- a/docs/docs/customize/model-types/reranking.md +++ b/docs/docs/customize/model-types/reranking.md @@ -17,7 +17,7 @@ If you have the ability to use any model, we recommend `rerank-2` by Voyage AI, Voyage AI offers the best reranking model for code with their `rerank-2` model. After obtaining an API key from [here](https://www.voyageai.com/), you can configure like this: -```json title="config.json" +```json title="config.json (Deprecated)" { "reranker": { "name": "voyage", @@ -33,7 +33,7 @@ Voyage AI offers the best reranking model for code with their `rerank-2` model. See Cohere's documentation for rerankers [here](https://docs.cohere.com/docs/rerank-2). -```json title="config.json" +```json title="config.json (Deprecated)" { "reranker": { "name": "cohere", @@ -49,7 +49,7 @@ See Cohere's documentation for rerankers [here](https://docs.cohere.com/docs/rer If you only have access to a single LLM, then you can use it as a reranker. This is discouraged unless truly necessary, because it will be much more expensive and still less accurate than any of the above models trained specifically for the task. Note that this will not work if you are using a local model, for example with Ollama, because too many parallel requests need to be made. -```json title="config.json" +```json title="config.json (Deprecated)" { "reranker": { "name": "llm", @@ -66,7 +66,7 @@ The `"modelTitle"` field must match one of the models in your "models" array in [Hugging Face Text Embeddings Inference](https://huggingface.co/docs/text-embeddings-inference/en/index) enables you to host your own [reranker endpoint](https://huggingface.github.io/text-embeddings-inference/#/Text%20Embeddings%20Inference/rerank). You can configure your reranker as follows: -```json title="config.json" +```json title="config.json (Deprecated)" { "reranker": { "name": "huggingface-tei", @@ -84,7 +84,7 @@ The `"modelTitle"` field must match one of the models in your "models" array in Continue offers a free trial of Voyage AI's reranking model. -```json title="config.json" +```json title="config.json (Deprecated)" { "reranker": { "name": "free-trial" diff --git a/docs/docs/customize/slash-commands.md b/docs/docs/customize/slash-commands.md index f640b715f..5afffdb77 100644 --- a/docs/docs/customize/slash-commands.md +++ b/docs/docs/customize/slash-commands.md @@ -16,7 +16,7 @@ To use any of the built-in slash commands, open `config.json` and add it to the Generate a shareable markdown transcript of your current chat history. -```json title="config.json" +```json title="config.json (Deprecated)" { "slashCommands": [ { @@ -34,7 +34,7 @@ Use the `outputDir` parameter to specify where you want to the markdown file to Generate a shell command from natural language and (only in VS Code) automatically paste it into the terminal. -```json title="config.json" +```json title="config.json (Deprecated)" { "slashCommands": [ { @@ -49,7 +49,7 @@ Generate a shell command from natural language and (only in VS Code) automatical Shows the LLM your current git diff and asks it to generate a commit message. -```json title="config.json" +```json title="config.json (Deprecated)" { "slashCommands": [ { @@ -64,7 +64,7 @@ Shows the LLM your current git diff and asks it to generate a commit message. Write a custom slash command at your own HTTP endpoint. Set 'url' in the params object for the endpoint you have setup. The endpoint should return a sequence of string updates, which will be streamed to the Continue sidebar. See our basic [FastAPI example](https://github.com/continuedev/continue/blob/74002369a5e435735b83278fb965e004ae38a97d/core/context/providers/context_provider_server.py#L34-L45) for reference. -```json title="config.json" +```json title="config.json (Deprecated)" { "slashCommands": [ { @@ -80,7 +80,7 @@ Write a custom slash command at your own HTTP endpoint. Set 'url' in the params Describe the issue you'd like to generate, and Continue will turn into a well-formatted title and body, then give you a link to the draft so you can submit. Make sure to set the URL of the repository you want to generate issues for. -```json title="config.json" +```json title="config.json (Deprecated)" { "slashCommands": [ { @@ -96,7 +96,7 @@ Describe the issue you'd like to generate, and Continue will turn into a well-fo The onboard slash command helps to familiarize yourself with a new project by analyzing the project structure, READMEs, and dependency files. It identifies key folders, explains their purpose, and highlights popular packages used. Additionally, it offers insights into the project's architecture. -```json title="config.json" +```json title="config.json (Deprecated)" { "slashCommands": [ { @@ -111,7 +111,7 @@ The onboard slash command helps to familiarize yourself with a new project by an The [Model Context Protocol](https://modelcontextprotocol.io/introduction) is a standard proposed by Anthropic to unify prompts, context, and tool use. Continue supports MCP "prompts" by creating slash commands. Read their [quickstart](https://modelcontextprotocol.io/quickstart) to learn how to set up a local server and then configure your `config.json` like this: -```json title="config.json" +```json title="config.json (Deprecated)" { "experimental": { "modelContextProtocolServers": [ diff --git a/docs/docs/customize/tools.md b/docs/docs/customize/tools.md index fe461d1bd..9047f50ff 100644 --- a/docs/docs/customize/tools.md +++ b/docs/docs/customize/tools.md @@ -23,7 +23,7 @@ To let you balance speed and safety, each tool can be set to 1 of 3 modes: Currently custom tools can be configured using the [Model Context Protocol](https://modelcontextprotocol.io/introduction), a standard proposed by Anthropic to unify prompts, context, and tool use. Read their [quickstart](https://modelcontextprotocol.io/quickstart) to learn how to set up a local server and then configure your `config.json` like this: -```json title="config.json" +```json title="config.json (Deprecated)" { "experimental": { "modelContextProtocolServers": [ diff --git a/docs/docs/customize/tutorials/build-your-own-context-provider.md b/docs/docs/customize/tutorials/build-your-own-context-provider.md index fae404cd4..48ec810e9 100644 --- a/docs/docs/customize/tutorials/build-your-own-context-provider.md +++ b/docs/docs/customize/tutorials/build-your-own-context-provider.md @@ -184,7 +184,7 @@ Continue will use [esbuild](https://esbuild.github.io/) to bundle your `config.t If you'd like to write a context provider in a language other than TypeScript, you can use the "http" context provider to call a server that hosts your own code. Add the context provider to `config.json` like this: -```json title="config.json" +```json title="config.json (Deprecated)" { "name": "http", "params": { diff --git a/docs/docs/customize/tutorials/build-your-own-slash-command.md b/docs/docs/customize/tutorials/build-your-own-slash-command.md index dc450cdd4..9c0c6f2d4 100644 --- a/docs/docs/customize/tutorials/build-your-own-slash-command.md +++ b/docs/docs/customize/tutorials/build-your-own-slash-command.md @@ -17,7 +17,7 @@ You can add custom slash commands by adding to the `customCommands` property in Custom commands are great when you are frequently reusing a prompt. For example, if you've crafted a great prompt and frequently ask the LLM to check for mistakes in your code, you could add a command like this: -```json title="config.json" +```json title="config.json (Deprecated)" customCommands=[{ "name": "check", "description": "Check for mistakes in my code", diff --git a/docs/docs/customize/tutorials/custom-code-rag.md b/docs/docs/customize/tutorials/custom-code-rag.md index b6f1cc251..653ada9c4 100644 --- a/docs/docs/customize/tutorials/custom-code-rag.md +++ b/docs/docs/customize/tutorials/custom-code-rag.md @@ -124,7 +124,7 @@ async def create_item(item: ContextProviderInput): After you've set up your server, you can configure Continue to use it by adding the "http" context provider to your `contextProviders` array in `config.json`: -```json title="config.json" +```json title="config.json (Deprecated)" { "name": "http", "params": { diff --git a/docs/docs/customize/tutorials/how-to-self-host-a-model.md b/docs/docs/customize/tutorials/how-to-self-host-a-model.md index 4f97824d1..bd4093402 100644 --- a/docs/docs/customize/tutorials/how-to-self-host-a-model.md +++ b/docs/docs/customize/tutorials/how-to-self-host-a-model.md @@ -20,7 +20,7 @@ However, if neither of these are the case, you will need to wire up a new LLM ob Basic authentication can be done with any provider using the `apiKey` field: -```json title="config.json" +```json title="config.json (Deprecated)" { "models": [ { @@ -37,7 +37,7 @@ 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="config.json" +```json title="config.json (Deprecated)" { "models": [ { @@ -56,7 +56,7 @@ If you need to send custom headers for authentication, you may use the `requestO Similarly if your model requires a Certificate for authentication, you may use the `requestOptions.clientCertificate` property like in the example below: -```json title="config.json" +```json title="config.json (Deprecated)" { "models": [ { diff --git a/docs/docs/customize/tutorials/llama3.1.md b/docs/docs/customize/tutorials/llama3.1.md index e2ac72986..038055265 100644 --- a/docs/docs/customize/tutorials/llama3.1.md +++ b/docs/docs/customize/tutorials/llama3.1.md @@ -18,7 +18,7 @@ Ollama is the fastest way to get up and running with local language models. We r 2. Open a terminal and run `ollama run llama3.1:8b` 3. Change your Continue config file like this: -```json title="config.json" +```json title="config.json (Deprecated)" { "models": [ { @@ -37,7 +37,7 @@ Groq provides the fastest available inference for open-source language models, i 1. Obtain an API key [here](https://console.groq.com/keys) 2. Update your Continue config file like this: -```json title="config.json" +```json title="config.json (Deprecated)" { "models": [ { @@ -58,7 +58,7 @@ Together AI provides fast and reliable inference of open-source models. You'll b 2. Copy your API key that appears on the welcome screen 3. Update your Continue config file like this: -```json title="config.json" +```json title="config.json (Deprecated)" { "models": [ { @@ -78,7 +78,7 @@ Replicate makes it easy to host and run open-source AI with an API. 1. Get your Replicate API key [here](https://replicate.ai/) 2. Change your Continue config file like this: -```json title="config.json" +```json title="config.json (Deprecated)" { "models": [ { @@ -120,7 +120,7 @@ Cerebras Inference uses specialized silicon to provides fast inference for the L 2. Create and copy the API key for use in Continue. 3. Update your Continue config file: -```json title="config.json" +```json title="config.json (Deprecated)" { "models": [ { diff --git a/docs/docs/customize/tutorials/set-up-codestral.md b/docs/docs/customize/tutorials/set-up-codestral.md index c48fea653..426a0037f 100644 --- a/docs/docs/customize/tutorials/set-up-codestral.md +++ b/docs/docs/customize/tutorials/set-up-codestral.md @@ -16,7 +16,7 @@ keywords: [codestral, mistral, model setup] 4. To use Codestral as your model for both `autocomplete` and `chat`, replace `[API_KEY]` with your Mistral API key below and add it to your `config.json` file: -```json title="config.json" +```json title="config.json (Deprecated)" { "models": [ { diff --git a/docs/docs/edit/how-to-customize.mdx b/docs/docs/edit/how-to-customize.mdx index 25d1680f1..677a38642 100644 --- a/docs/docs/edit/how-to-customize.mdx +++ b/docs/docs/edit/how-to-customize.mdx @@ -23,9 +23,9 @@ You can configure a particular model to be used for Edit: apiKeySecret: ANTHOPIC_API_KEY ``` - + Set the `experimental.modelRoles.inlineEdit` property in `config.json`. - ```json title="config.json" + ```json title="config.json (Deprecated)" { "models": { "name": "Claude 3.5 Sonnet", diff --git a/docs/docs/reference.md b/docs/docs/reference.md index 814f6e4af..e0eca3902 100644 --- a/docs/docs/reference.md +++ b/docs/docs/reference.md @@ -41,7 +41,7 @@ _(AWS Only)_ Example: -```json title="config.json" +```json title="config.json (Deprecated)" { "models": [ { @@ -66,7 +66,7 @@ Specifies the model or models for tab autocompletion, defaulting to an Ollama in Example -```json title="config.json" +```json title="config.json (Deprecated)" { "tabAutocompleteModel": { "title": "My Starcoder", @@ -96,7 +96,7 @@ Specifies options for tab autocompletion behavior. Example -```json title="config.json" +```json title="config.json (Deprecated)" { "tabAutocompleteOptions": { "debounceDelay": 500, @@ -127,7 +127,7 @@ Embeddings model settings - the model used for @Codebase and @docs. Example: -```json title="config.json" +```json title="config.json (Deprecated)" { "embeddingsProvider": { "provider": "openai", @@ -160,7 +160,7 @@ Parameters that control the behavior of text generation and completion settings. Example -```json title="config.json" +```json title="config.json (Deprecated)" { "completionOptions": { "stream": false, @@ -190,7 +190,7 @@ Default HTTP request options that apply to all models and context providers, unl Example -```json title="config.json" +```json title="config.json (Deprecated)" { "requestOptions": { "headers": { @@ -214,7 +214,7 @@ Configuration for the reranker model used in response ranking. Example -```json title="config.json" +```json title="config.json (Deprecated)" { "reranker": { "name": "voyage", @@ -240,7 +240,7 @@ List of documentation sites to index. Example -```json title="config.json" +```json title="config.json (Deprecated)" "docs": [ { "title": "Continue", @@ -264,7 +264,7 @@ Custom commands initiated by typing "/" in the sidebar. Commands include predefi Example: -```json title="config.json" +```json title="config.json (Deprecated)" { "slashCommands": [ { @@ -295,7 +295,7 @@ User-defined commands for prompt shortcuts in the sidebar, allowing quick access Example: -```json title="config.json" +```json title="config.json (Deprecated)" { "customCommands": [ { @@ -318,7 +318,7 @@ List of the pre-defined context providers that will show up as options while typ Example -```json title="config.json" +```json title="config.json (Deprecated)" { "contextProviders": [ { @@ -359,7 +359,7 @@ Customizable UI settings to control interface appearance and behavior. Example: -```json title="config.json" +```json title="config.json (Deprecated)" { "ui": { "codeBlockToolbarPosition": "bottom", @@ -414,7 +414,7 @@ Several experimental config parameters are available, as described below: Example -```json title="config.json" +```json title="config.json (Deprecated)" { "experimental": { "modelRoles": { diff --git a/docs/docs/telemetry.md b/docs/docs/telemetry.md index 8e7152d01..d4fc97840 100644 --- a/docs/docs/telemetry.md +++ b/docs/docs/telemetry.md @@ -28,7 +28,7 @@ The following usage information is collected and reported: You can disable anonymous telemetry by modifying the `config.json` file located in the `~/.continue` directory. This file typically includes the following entry: -```json title="config.json" +```json title="config.json (Deprecated)" { "allowAnonymousTelemetry": true } diff --git a/docs/docs/troubleshooting.md b/docs/docs/troubleshooting.md index a8632457e..f6aaffb38 100644 --- a/docs/docs/troubleshooting.md +++ b/docs/docs/troubleshooting.md @@ -85,7 +85,7 @@ If your keyboard shortcuts are not resolving, you may have other commands that a 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: -```json title="config.json" +```json title="config.json (Deprecated)" { "models": [ { diff --git a/docs/docs/yaml-migration.md b/docs/docs/yaml-migration.md index ad62efaa7..a27e5d20d 100644 --- a/docs/docs/yaml-migration.md +++ b/docs/docs/yaml-migration.md @@ -46,7 +46,7 @@ Model-level `completionOptions` are replaced by `defaultCompletionOptions`, with **Before** -```json title="config.json" +```json title="config.json (Deprecated)" { "models": [ { @@ -156,7 +156,7 @@ The JSON `contextProviders` field is replaced by the YAML `context` array. **Before** -```json title="config.json" +```json title="config.json (Deprecated)" { "contextProviders": [ { @@ -197,7 +197,7 @@ The `systemMessage` property has been replaced with a `rules` property that take **Before** -```json title="config.json" +```json title="config.json (Deprecated)" { "systemMessage": "Always give concise responses" } @@ -216,7 +216,7 @@ Rather than with `customCommands`, you can now use the `prompts` field to define **Before** -```json title="config.json" +```json title="config.json (Deprecated)" { "customCommands": [ { @@ -251,7 +251,7 @@ Documentation is largely the same, but the `title` property has been replaced wi **Before** -```json title="config.json" +```json title="config.json (Deprecated)" { "docs": [ { @@ -290,7 +290,7 @@ docs: **Before** -```json title="config.json" +```json title="config.json (Deprecated)" { "experimental": { "modelContextProtocolServers": [ From 29719edf6fe916cc91e7fd92afa0fdc737a973cc Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Thu, 16 Jan 2025 23:45:40 -0800 Subject: [PATCH 006/262] remove duplicate autocomplete readme, update github issue template --- .github/ISSUE_TEMPLATE/bug_report.yml | 7 +- core/autocomplete/README.md | 158 -------------------------- 2 files changed, 4 insertions(+), 161 deletions(-) delete mode 100644 core/autocomplete/README.md diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 93c04fe38..c6e087b38 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -27,14 +27,15 @@ body: - **Continue version**: v0.9.4 - **IDE version**: VSCode 1.85.1 - Model: Claude Sonnet 3.5 - - config.json: `{ "models": ... }` + - config.yaml: `models: ...` + - OR config.json: `{ "models": ... }` value: | - OS: - Continue version: - IDE version: - Model: - - config.json: - ```json + - config: + ```yaml ``` render: Markdown diff --git a/core/autocomplete/README.md b/core/autocomplete/README.md deleted file mode 100644 index ab6e9adfb..000000000 --- a/core/autocomplete/README.md +++ /dev/null @@ -1,158 +0,0 @@ -# Tab Autocomplete (beta) - -Continue now provides support for tab autocomplete in [VS Code](https://marketplace.visualstudio.com/items?itemName=Continue.continue) and [JetBrains IDEs](https://plugins.jetbrains.com/plugin/22707-continue/edit). 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) - -We recommend setting up tab-autocomplete with a local Ollama instance. To do this, first download the latest version of Ollama from [here](https://ollama.ai). Then, run the following command to download our recommended model: - -```bash -ollama run qwen2.5-coder:1.5b-base -``` - -Once it has been downloaded, you should begin to see completions in VS Code. - -## Setting up with LM Studio - -You can also set up tab-autocomplete with a local LM Studio instance by following these steps: - -1. Download the latest version of LM Studio from [here](https://lmstudio.ai/) -2. Download a model (e.g. search for `Qwen/Qwen2.5-Coder-1.5B-Instruct-GGUF` and choose one of the options there) -3. Go to the server section (button is on the left), select your model from the dropdown at the top, and click "Start Server" -4. Go to the "My Models" section (button is on the left), find your selected model, and copy the name the path (example: `Qwen/Qwen2.5-Coder-1.5B-Instruct-GGUF/qwen2.5-coder-1.5b-instruct-q4_k_m.gguf`); this will be used as the "model" attribute in Continue -5. Go to Continue and modify the configurations for a [custom model](#setting-up-a-custom-model) -6. Set the "provider" to `lmstudio` and the "model" to the path copied earlier - -Example: - -```json title="config.json" -{ - "tabAutocompleteModel": { - "title": "Qwen2.5-Coder 1.5b", - "model": "Qwen/Qwen2.5-Coder-1.5B-Instruct-GGUF", - "provider": "lmstudio" - } -} -``` - -## 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 vLLM instance you would edit your `config.json` like this (note that it is not inside the models array), filling in the correct model name and vLLM endpoint: - -```json title="config.json" -{ - "tabAutocompleteModel": { - "title": "Tab Autocomplete Model", - "provider": "openai", - "model": "", - "apiBase": "" - }, - ... -} -``` - -As another example, say you want to use a different model, `deepseek-coder:6.7b-base`, with Ollama: - -```json title="config.json" -{ - "tabAutocompleteModel": { - "title": "Tab Autocomplete Model", - "provider": "ollama", - "model": "deepseek-coder:6.7b-base" - }, - ... -} -``` - -If you aren't yet familiar with the available options, you can learn more in our [overview](../setup/overview.md). - -### What model should I use? - -If you are running the model locally, we recommend `qwen2.5-coder:1.5b`. - -If you have a bit more compute, or are running a model in the cloud, you can upgrade to `qwen2.5-coder:7b`. - -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`: - -### `tabAutocompleteModel` - -This is just another object like the ones in the `"models"` array of `config.json`. You can choose and configure any model you would like, but we strongly suggest using a small model made for tab-autocomplete, such as `deepseek-1b`, `qwen2.5-coder:1.5b`, or `starcoder-3b`. - -### `tabAutocompleteOptions` - -This object allows you to customize the behavior of tab-autocomplete. The available options are: - -- `useFileSuffix`: Determines whether to use the file suffix in the prompt. (Boolean) -- `maxPromptTokens`: The maximum number of prompt tokens to use. A smaller number will yield faster completions, but less context. (Number) -- `debounceDelay`: The delay in milliseconds before triggering autocomplete after a keystroke. (Number) -- `maxSuffixPercentage`: The maximum percentage of the prompt that can be dedicated to the suffix. (Number) -- `prefixPercentage`: The percentage of the input that should be dedicated to the prefix. (Number) -- `template`: An optional template string to be used for autocomplete. It will be rendered with the Mustache templating language, and is passed the 'prefix' and 'suffix' variables. (String) -- `multilineCompletions`: Whether to enable multiline completions ("always", "never", or "auto"). Defaults to "auto". - -### Full example - -```json title="config.json" -{ - "tabAutocompleteModel": { - "title": "Tab Autocomplete Model", - "provider": "ollama", - "model": "qwen2.5-coder:1.5b-base", - "apiBase": "https://" - }, - "tabAutocompleteOptions": { - "maxPromptTokens": 400, - "prefixPercentage": 0.5 - } -} -``` - -## 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/main/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 "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 qwen2.5-coder:1.5b-base` 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. If you are using another Ollama model for chat and your resources are limited, this will cause Ollama to constantly load and unload the models from memory, resulting in slow responses (or none at all) for both. A resolution for this could be using the same model for chat and autocomplete. -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/logs/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 - -Depending on your hardware, you may want to try a smaller, faster model. If 3b isn't working for you we recommend trying `deepseek-coder:1.3b-base`. - -### Completions don't know about my code - -We are working on this! Right now Continue uses the Language Server Protocol to add definitions to the prompt, as well as using similarity search over recently edited files. We will be improving the accuracy of this system greatly over the next few weeks. - -### Completions contain formatting errors - -If you're seeing a common pattern of mistake that might be helpful to report, please share in Discord. We will do our best to fix it as soon as possible. - -## How to turn off autocomplete - -### VS Code - -Click the "Continue" button in the status panel at the bottom right of the screen. The checkmark will become a "cancel" symbol and you will no longer see completions. You can click again to turn it back on. - -Alternatively, open VS Code settings, search for "Continue" and uncheck the box for "Enable Tab Autocomplete". - -### JetBrains - -Open Settings -> Tools -> Continue and uncheck the box for "Enable Tab Autocomplete". - -### Feedback - -If you're turning off autocomplete, we'd love to hear how we can improve! Please let us know in our [Discord](https://discord.gg/vapESyrFmJ) or file an issue on GitHub. From 89045f79e768760704f723d0e2af96ffac5d12d9 Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Fri, 17 Jan 2025 03:42:50 -0800 Subject: [PATCH 007/262] config yaml examples part 1 --- docs/docs/actions/context-selection.md | 2 +- .../{how-it-works.md => how-it-works.mdx} | 4 +- docs/docs/actions/how-to-customize.md | 3 +- docs/docs/autocomplete/how-to-customize.md | 2 +- .../{model-setup.md => model-setup.mdx} | 103 +- docs/docs/chat/context-selection.md | 14 +- docs/docs/chat/model-setup.mdx | 332 ++++-- docs/docs/customize/context-providers.md | 676 ------------ docs/docs/customize/context-providers.mdx | 990 ++++++++++++++++++ .../{autocomplete.md => autocomplete.mdx} | 111 +- .../deep-dives/{codebase.md => codebase.mdx} | 43 +- .../customize/deep-dives/configuration.md | 2 +- docs/docs/customize/deep-dives/docs.md | 2 +- .../docs/customize/deep-dives/prompt-files.md | 2 +- .../model-providers/top-level/bedrock.md | 120 --- .../model-providers/top-level/bedrock.mdx | 192 ++++ .../top-level/{deepseek.md => deepseek.mdx} | 0 .../model-providers/top-level/gemini.md | 53 - .../model-providers/top-level/gemini.mdx | 80 ++ .../model-providers/top-level/mistral.md | 63 -- .../model-providers/top-level/mistral.mdx | 104 ++ .../model-providers/top-level/ollama.md | 72 -- .../model-providers/top-level/ollama.mdx | 120 +++ .../model-providers/top-level/openai.md | 103 -- .../model-providers/top-level/openai.mdx | 160 +++ .../{slash-commands.md => slash-commands.mdx} | 50 +- docs/docs/customize/{tools.md => tools.mdx} | 44 +- .../tutorials/build-your-own-slash-command.md | 10 +- docs/docs/edit/model-setup.md | 2 +- docs/docs/introduction.md | 8 +- docs/docs/json-reference.md | 451 ++++++++ docs/docs/reference.md | 620 +++++------ ...troubleshooting.md => troubleshooting.mdx} | 42 +- docs/docs/yaml-migration.md | 6 +- docs/docs/yaml-reference.md | 321 ------ .../current/actions/how-to-customize.md | 2 +- .../current/autocomplete/how-to-customize.md | 2 +- .../current/chat/context-selection.md | 14 +- .../current/chat/model-setup.mdx | 2 +- .../customize/deep-dives/autocomplete.md | 2 +- .../current/customize/deep-dives/codebase.md | 2 +- .../customize/deep-dives/prompt-files.md | 2 +- .../current/customize/overview.md | 4 +- .../current/edit/model-setup.md | 2 +- docs/sidebars.js | 10 +- 45 files changed, 2898 insertions(+), 2051 deletions(-) rename docs/docs/actions/{how-it-works.md => how-it-works.mdx} (85%) rename docs/docs/autocomplete/{model-setup.md => model-setup.mdx} (51%) delete mode 100644 docs/docs/customize/context-providers.md create mode 100644 docs/docs/customize/context-providers.mdx rename docs/docs/customize/deep-dives/{autocomplete.md => autocomplete.mdx} (79%) rename docs/docs/customize/deep-dives/{codebase.md => codebase.mdx} (81%) delete mode 100644 docs/docs/customize/model-providers/top-level/bedrock.md create mode 100644 docs/docs/customize/model-providers/top-level/bedrock.mdx rename docs/docs/customize/model-providers/top-level/{deepseek.md => deepseek.mdx} (100%) delete mode 100644 docs/docs/customize/model-providers/top-level/gemini.md create mode 100644 docs/docs/customize/model-providers/top-level/gemini.mdx delete mode 100644 docs/docs/customize/model-providers/top-level/mistral.md create mode 100644 docs/docs/customize/model-providers/top-level/mistral.mdx delete mode 100644 docs/docs/customize/model-providers/top-level/ollama.md create mode 100644 docs/docs/customize/model-providers/top-level/ollama.mdx delete mode 100644 docs/docs/customize/model-providers/top-level/openai.md create mode 100644 docs/docs/customize/model-providers/top-level/openai.mdx rename docs/docs/customize/{slash-commands.md => slash-commands.mdx} (77%) rename docs/docs/customize/{tools.md => tools.mdx} (67%) create mode 100644 docs/docs/json-reference.md rename docs/docs/{troubleshooting.md => troubleshooting.mdx} (91%) delete mode 100644 docs/docs/yaml-reference.md diff --git a/docs/docs/actions/context-selection.md b/docs/docs/actions/context-selection.md index a63eeda38..4e154dcd3 100644 --- a/docs/docs/actions/context-selection.md +++ b/docs/docs/actions/context-selection.md @@ -7,7 +7,7 @@ sidebar_position: 3 ## Slash commands -Slash commands can be combined with additional instructions, including [context providers](chat/context-selection.md) or [highlighted code](chat/context-selection.md). +Slash commands can be combined with additional instructions, including [context providers](../customize/context-providers.mdx) or [highlighted code](../edit/context-selection#highlighted-code). For example, with the “/edit” slash command you should describe the edit that you want the LLM to perform. diff --git a/docs/docs/actions/how-it-works.md b/docs/docs/actions/how-it-works.mdx similarity index 85% rename from docs/docs/actions/how-it-works.md rename to docs/docs/actions/how-it-works.mdx index 57afa90ea..49d2e8db0 100644 --- a/docs/docs/actions/how-it-works.md +++ b/docs/docs/actions/how-it-works.mdx @@ -7,6 +7,6 @@ sidebar_position: 4 While many Actions are based on templated prompts and can be customized with .prompt files, there are a number that execute more complex code under the hood. -Actions that generate inline diffs, like “/edit”, “/comment”, or right click actions, use the same prompt and response processing logic as [Edit](edit/how-it-works.md). +Actions that generate inline diffs, like “/edit”, “/comment”, or right click actions, use the same prompt and response processing logic as [Edit](edit/how-it-works). -To learn how other slash commands work, see the full reference [here](../customize/slash-commands.md). +To learn how other slash commands work, see the full reference [here](../customize/slash-commands). diff --git a/docs/docs/actions/how-to-customize.md b/docs/docs/actions/how-to-customize.md index 81d33967b..0cd40903a 100644 --- a/docs/docs/actions/how-to-customize.md +++ b/docs/docs/actions/how-to-customize.md @@ -7,7 +7,7 @@ sidebar_position: 5 ## Built-in slash commands -Continue has a large library of built-in slash commands, but when you first install we only display the most commonly used ones, like “/edit”, “/comment”, and “/share”. To add more actions, you can open [config.json](../reference.md) and add them to the `slashCommands` array. +Continue has a large library of built-in slash commands, but when you first install we only display the most commonly used ones, like “/edit”, “/comment”, and “/share”. To add more actions, you can open [config.json](../json-reference.md) and add them to the `slashCommands` array. ## Custom slash commands @@ -50,6 +50,7 @@ export function modifyConfig(config: Config): Config { return config; } ``` + diff --git a/docs/docs/autocomplete/how-to-customize.md b/docs/docs/autocomplete/how-to-customize.md index 066621368..317b09775 100644 --- a/docs/docs/autocomplete/how-to-customize.md +++ b/docs/docs/autocomplete/how-to-customize.md @@ -5,7 +5,7 @@ keywords: [customize] sidebar_position: 5 --- -Continue offers a handful of parameters in [`config.json`](../reference.md) that can be tuned to find the perfect balance between suggestion quality and system performance for your specific needs and hardware capabilities: +Continue offers a handful of parameters in [`config.json` (Deprecated)](../json-reference.md) that can be tuned to find the perfect balance between suggestion quality and system performance for your specific needs and hardware capabilities: ```json title="config.json (Deprecated)" "tabAutocompleteOptions": { diff --git a/docs/docs/autocomplete/model-setup.md b/docs/docs/autocomplete/model-setup.mdx similarity index 51% rename from docs/docs/autocomplete/model-setup.md rename to docs/docs/autocomplete/model-setup.mdx index c42c8318c..e975e51fe 100644 --- a/docs/docs/autocomplete/model-setup.md +++ b/docs/docs/autocomplete/model-setup.mdx @@ -5,24 +5,40 @@ keywords: [model, autocomplete] sidebar_position: 2 --- +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + :::info -This page recommends models and providers for Autocomplete. Read more about how to set up your `config.json` [here](../reference.md). +This page recommends models and providers for Autocomplete. Read more about how to set up your `config.yaml` [here](../reference.md). ::: ## Best overall experience For the best Autocomplete experience, we recommend using Codestral through the [Mistral API](https://console.mistral.ai/). This model offers high-quality completions with an excellent understanding of code context: -```json title="config.json (Deprecated)"" -{ - "tabAutocompleteModel": { - "title": "Codestral", - "provider": "mistral", - "model": "codestral-latest", - "apiKey": "YOUR_API_KEY" - } -} -``` + + + ```yaml title="config.yaml" + models: + - name: Codestral + provider: mistral + model: codestral-latest + apiKey: YOUR_API_KEY + roles: + - autocomplete + ``` + + + ```json title="config.json (Deprecated)" + "tabAutocompleteModel": { + "title": "Codestral", + "provider": "mistral", + "model": "codestral-latest", + "apiKey": "YOUR_API_KEY" + } + ``` + + :::tip[Codestral API Key] The API keys for Codestral and the general Mistral APIs are different. If you are using Codestral, you probably want a Codestral API key, but if you are sharing the key as a team or otherwise want to use `api.mistral.ai`, then make sure to set `"apiBase": "https://api.mistral.ai/v1"` in your `tabAutocompleteModel`. @@ -32,38 +48,65 @@ The API keys for Codestral and the general Mistral APIs are different. If you ar For those preferring local execution or self-hosting,`Qwen2.5-Coder 1.5B` offers a good balance of performance and quality for most users (e.g. using [Ollama](../customize/model-providers/top-level/ollama.md) or [LM Studio](../customize/model-providers/more/lmstudio.md)). -```json title="config.json (Deprecated)"" -{ - "tabAutocompleteModel": { - "title": "Qwen2.5-Coder 1.5B", - "model": "qwen2.5-coder:1.5b-base", - "provider": "ollama" + + + ```yaml title="config.yaml" + models: + - name: Qwen2.5-Coder 1.5B + model: qwen2.5-coder:1.5b-base + provider: ollama + roles: + - autocomplete + ``` + + + ```json title="config.json (Deprecated)" + { + "tabAutocompleteModel": { + "title": "Qwen2.5-Coder 1.5B", + "model": "qwen2.5-coder:1.5b-base", + "provider": "ollama" + } } -} -``` + ``` + + Have more compute? Use `qwen2.5-coder:7b-base` for potentially higher-quality suggestions. :::note - For LM Studio users, navigate to the "My Models" section, find your desired model, and copy the path (e.g., `Qwen/Qwen2.5-Coder-1.5B-Instruct-GGUF/qwen2.5-coder-1.5b-instruct-q4_k_m.gguf`). Use this path as the `model` value in your configuration. - ::: ### Using a remote instance When using a remote instance you need to set the `"apiBase"` value in the configuration: -```json title="config.json (Deprecated)"" -{ - "tabAutocompleteModel": { - "title": "Qwen2.5-Coder 1.5B", - "model": "qwen2.5-coder:1.5b-base", - "provider": "ollama" - "apiBase": "http://:11434" + + + ```yaml title="config.yaml" + models: + - name: Qwen2.5-Coder 1.5B + model: qwen2.5-coder:1.5b-base + provider: ollama + apiBase: http://:11434 + roles: + - autocomplete + ``` + + + ```json title="config.json (Deprecated)" + { + "tabAutocompleteModel": { + "title": "Qwen2.5-Coder 1.5B", + "model": "qwen2.5-coder:1.5b-base", + "provider": "ollama", + "apiBase": "http://:11434" + } } -} -``` + ``` + + ## Other experiences diff --git a/docs/docs/chat/context-selection.md b/docs/docs/chat/context-selection.md index e4c35ddc5..e32ea3c51 100644 --- a/docs/docs/chat/context-selection.md +++ b/docs/docs/chat/context-selection.md @@ -19,28 +19,28 @@ You can include the currently open file as context by pressing opt + ## Specific file -You can include a specific file in your current workspace as context by typing [`@Files`](../customize/context-providers.md#file) and selecting the file. +You can include a specific file in your current workspace as context by typing [`@Files`](../customize/context-providers.mdx#file) and selecting the file. ## Specific folder -You can include a folder in your current workspace as context by typing [`@Folder`](../customize/context-providers.md#folder) and selecting the directory. It [works like `@Codebase`](../customize/deep-dives/codebase.md) but only includes the files in the selected folder. +You can include a folder in your current workspace as context by typing [`@Folder`](../customize/context-providers.mdx#folder) and selecting the directory. It [works like `@Codebase`](../customize/deep-dives/codebase.md) but only includes the files in the selected folder. ## Codebase search -You can automatically include relevant files from your codebase as context by typing [`@Codebase`](../customize/context-providers.md#codebase). You can learn about how @Codebase works [here](../customize/deep-dives/codebase.md). +You can automatically include relevant files from your codebase as context by typing [`@Codebase`](../customize/context-providers.mdx#codebase). You can learn about how @Codebase works [here](../customize/deep-dives/codebase.md). ## Documentation site -You can include a documentation site as context by typing [`@Docs`](../customize/context-providers.md#docs) and selecting the documentation site. You can learn about how @Docs works [here](../customize/deep-dives/docs.md). +You can include a documentation site as context by typing [`@Docs`](../customize/context-providers.mdx#docs) and selecting the documentation site. You can learn about how @Docs works [here](../customize/deep-dives/docs.md). ## Terminal contents -You can include the contents of the terminal in your IDE as context by typing [`@Terminal`](../customize/context-providers.md#terminal). +You can include the contents of the terminal in your IDE as context by typing [`@Terminal`](../customize/context-providers.mdx#terminal). ## Git diff -You can include all of the changes you've made to your current branch by typing [`@Git Diff`](../customize/context-providers.md#git-diff). +You can include all of the changes you've made to your current branch by typing [`@Git Diff`](../customize/context-providers.mdx#git-diff). ## Other context -You can see a full list of built-in context providers [here](../customize/context-providers.md) and how to create your own custom context provider [here](../customize/tutorials/build-your-own-context-provider.md). +You can see a full list of built-in context providers [here](../customize/context-providers.mdx) and how to create your own custom context provider [here](../customize/tutorials/build-your-own-context-provider.md). diff --git a/docs/docs/chat/model-setup.mdx b/docs/docs/chat/model-setup.mdx index b055adf24..9bdb09c7c 100644 --- a/docs/docs/chat/model-setup.mdx +++ b/docs/docs/chat/model-setup.mdx @@ -9,7 +9,7 @@ import Tabs from "@theme/Tabs"; import TabItem from "@theme/TabItem"; :::info -This page recommends models and providers for Chat. Read more about how to set up your `config.json` [here](../reference.md). +This page recommends models and providers for Chat. Read more about how to set up your config [here](../reference.md). ::: ## Best overall experience @@ -20,99 +20,180 @@ For the best overall Chat experience, you will want to use a 400B+ parameter mod Our current top recommendation is Claude Sonnet 3.5 from [Anthropic](../customize/model-providers/top-level/anthropic.md). -```json title="config.json (Deprecated)" - "models": [ - { - "title": "Claude 3.5 Sonnet", - "provider": "anthropic", - "model": "claude-3-5-sonnet-latest", - "apiKey": "[ANTHROPIC_API_KEY]" - } - ] -``` + + + ```yaml title="Package or config.yaml" + models: + - title: Claude 3.5 Sonnet + provider: anthropic + model: claude-3-5-sonnet-latest + apiKeySecret: ANTHROPIC_API_KEY + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "title": "Claude 3.5 Sonnet", + "provider": "anthropic", + "model": "claude-3-5-sonnet-latest", + "apiKey": "[ANTHROPIC_API_KEY]" + } + ] + ``` + + ### Llama 3.1 405B from Meta If you prefer to use an open-weight model, then Llama 3.1 405B from Meta is your best option right now. You will need to decide if you use it through a SaaS model provider (e.g. [Together](../customize/model-providers/more/together.md) or [Groq](../customize/model-providers/more/groq.md)) or self-host it (e.g. using [vLLM](../customize/model-providers//more/vllm.md) or [Ollama](../customize/model-providers/top-level/ollama.md)). - - - ```json title="config.json (Deprecated)" - "models": [ - { - "title": "Llama 3.1 405B", - "provider": "together", - "model": "llama3.1-405b", - "apiKey": "[TOGETHER_API_KEY]" - } - ] + + + + + ```yaml title="Package or config.yaml" + models: + - title: "Llama 3.1 405B" + provider: "together" + model: "llama3.1-405b" + apiKeySecret: "TOGETHER_API_KEY" ``` - - - ```json title="config.json (Deprecated)" - "models": [ - { - "title": "Llama 3.1 405B", - "provider": "groq", - "model": "llama3.1-405b", - "apiKey": "[GROQ_API_KEY]" - } - ] + + + ```yaml title="Package or config.yaml" + models: + - title: "Llama 3.1 405B" + provider: "groq" + model: "llama3.1-405b" + apiKeySecret: "GROQ_API_KEY" ``` - - - ```json title="config.json (Deprecated)" - "models": [ - { - "title": "Llama 3.1 405B", - "provider": "vllm", - "model": "llama3.1-405b" - } - ] + + + ```yaml title="Package or config.yaml" + models: + - title: "Llama 3.1 405B" + provider: "vllm" + model: "llama3.1-405b" ``` - - - ```json title="config.json (Deprecated)" - "models": [ - { - "title": "Llama 3.1 405B", - "provider": "ollama", - "model": "llama3.1:405b" - } - ] + + + ```yaml title="Package or config.yaml" + models: + - title: "Llama 3.1 405B" + provider: "ollama" + model: "llama3.1:405b" ``` - + + + + + + + ```json title="config.json (Deprecated)" + "models": [ + { + "title": "Llama 3.1 405B", + "provider": "together", + "model": "llama3.1-405b", + "apiKey": "[TOGETHER_API_KEY]" + } + ] + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "title": "Llama 3.1 405B", + "provider": "groq", + "model": "llama3.1-405b", + "apiKey": "[GROQ_API_KEY]" + } + ] + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "title": "Llama 3.1 405B", + "provider": "vllm", + "model": "llama3.1-405b" + } + ] + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "title": "Llama 3.1 405B", + "provider": "ollama", + "model": "llama3.1:405b" + } + ] + ``` + + + ### GPT-4o from OpenAI If you prefer to use a model from [OpenAI](../customize/model-providers/top-level/openai.md), then we recommend GPT-4o. -```json title="config.json (Deprecated)" - "models": [ - { - "title": "GPT-4o", - "provider": "openai", - "model": "", - "apiKey": "[OPENAI_API_KEY]" - } - ] -``` + + + ```yaml title="Package or config.yaml" + models: + - title: GPT-4o + provider: openai + model: '' + apiKey: [OPENAI_API_KEY] + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "title": "GPT-4o", + "provider": "openai", + "model": "", + "apiKey": "[OPENAI_API_KEY]" + } + ] + ``` + + ### Gemini 1.5 Pro from Google If you prefer to use a model from [Google](../customize/model-providers/top-level/gemini.md), then we recommend Gemini 1.5 Pro. -```json title="config.json (Deprecated)" - "models": [ - { - "title": "Gemini 1.5 Pro", - "provider": "gemini", - "model": "gemini-1.5-pro-latest", - "apiKey": "[GEMINI_API_KEY]" - } - ] -``` + + + ```yaml title="Package or config.yaml" + models: + - title: Gemini 1.5 Pro + provider: gemini + model: gemini-1.5-pro-latest + apiKey: [GEMINI_API_KEY] + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "title": "Gemini 1.5 Pro", + "provider": "gemini", + "model": "gemini-1.5-pro-latest", + "apiKey": "[GEMINI_API_KEY]" + } + ] + ``` + + ## Local, offline experience @@ -122,37 +203,83 @@ For the best local, offline Chat experience, you will want to use a model that i If your local machine can run an 8B parameter model, then we recommend running Llama 3.1 8B on your machine (e.g. using [Ollama](../customize/model-providers/top-level/ollama.md) or [LM Studio](../customize/model-providers/more/lmstudio.md)). - - - ```json title="config.json (Deprecated)" - "models": [ - { - "title": "Llama 3.1 8B", - "provider": "ollama", - "model": "llama3.1:8b" - } - ] + + + + + ```yaml title="Package or config.yaml" + models: + - title: Llama 3.1 8B + provider: ollama + model: llama3.1:8b ``` - - - ```json title="config.json (Deprecated)" - "models": [ - { - "title": "Llama 3.1 8B", - "provider": "lmstudio", - "model": "llama3.1-8b" - } - ] + + + ```yaml title="Package or config.yaml" + models: + - title: Llama 3.1 8B + provider: lmstudio + model: llama3.1:8b ``` - + + + + + + + ```json title="config.json (Deprecated)" + "models": [ + { + "title": "Llama 3.1 8B", + "provider": "ollama", + "model": "llama3.1:8b" + } + ] + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "title": "Llama 3.1 8B", + "provider": "lmstudio", + "model": "llama3.1-8b" + } + ] + ``` + + + ### DeepSeek Coder 2 16B If your local machine can run a 16B parameter model, then we recommend running DeepSeek Coder 2 16B (e.g. using [Ollama](../customize/model-providers/top-level/ollama.md) or [LM Studio](../customize/model-providers/more/lmstudio.md)). - - + + + + + ```yaml title="Package or config.yaml" + models: + - title: DeepSeek Coder 2 16B + provider: ollama + model: deepseek-coder-v2:16b + ``` + + + ```yaml title="Package or config.yaml" + models: + - title: DeepSeek Coder 2 16B + provider: lmstudio + model: deepseek-coder-v2:16b + ``` + + + + + + ```json title="config.json (Deprecated)" "models": [ { @@ -162,10 +289,8 @@ If your local machine can run a 16B parameter model, then we recommend running D } ] ``` - - - - + + ```json title="config.json (Deprecated)" "models": [ { @@ -175,8 +300,9 @@ If your local machine can run a 16B parameter model, then we recommend running D } ] ``` - - + + + ## Other experiences diff --git a/docs/docs/customize/context-providers.md b/docs/docs/customize/context-providers.md deleted file mode 100644 index daf8b2d83..000000000 --- a/docs/docs/customize/context-providers.md +++ /dev/null @@ -1,676 +0,0 @@ ---- -title: Context providers -description: Type '@' to select content to the LLM as context -keywords: [context, "@", provider, LLM] ---- - -Context Providers allow you to type '@' and see a dropdown of content that can all be fed to the LLM as context. Every context provider is a plugin, which means if you want to reference some source of information that you don't see here, you can request (or build!) a new context provider. - -As an example, say you are working on solving a new GitHub Issue. You type '@Issue' and select the one you are working on. Continue can now see the issue title and contents. You also know that the issue is related to the files 'readme.md' and 'helloNested.py', so you type '@readme' and '@hello' to find and select them. Now these 3 "Context Items" are displayed inline with the rest of your input. - -![Context Items](/img/context-provider-example.png) - -## Built-in Context Providers - -To use any of the built-in context providers, open `config.json` and add it to the `contextProviders` list. - -### `@File` - -Reference any file in your current workspace. - -```json title="config.json (Deprecated)" -{ - "contextProviders": [ - { - "name": "file" - } - ] -} -``` - -### `@Code` - -Reference specific functions or classes from throughout your project. - -```json title="config.json (Deprecated)" -{ - "contextProviders": [ - { - "name": "code" - } - ] -} -``` - -### `@Git Diff` - -Reference all of the changes you've made to your current branch. This is useful if you want to summarize what you've done or ask for a general review of your work before committing. - -```json title="config.json (Deprecated)" -{ - "contextProviders": [ - { - "name": "diff" - } - ] -} -``` - -### `@Current File` - -Reference the currently open file. - -```json title="config.json (Deprecated)" -{ - "contextProviders": [ - { - "name": "currentFile" - } - ] -} -``` - -### `@Terminal` - -Reference the last command you ran in your IDE's terminal and its output. - -```json title="config.json (Deprecated)" -{ - "contextProviders": [ - { - "name": "terminal" - } - ] -} -``` - -### `@Docs` - -Reference the contents from any documentation site. - -```json title="config.json (Deprecated)" -{ - "contextProviders": [ - { - "name": "docs" - } - ] -} -``` - -Note that this will only enable the `@Docs` context provider. - -To use it, you need to add a documentation site to your `config.json`. See the [docs](../customize/deep-dives/docs.md) page for more information. - -### `@Open` - -Reference the contents of all of your open files. Set `onlyPinned` to `true` to only reference pinned files. - -```json title="config.json (Deprecated)" -{ - "contextProviders": [ - { - "name": "open", - "params": { - "onlyPinned": true - } - } - ] -} -``` - -### `@Web` - -Reference relevant pages from across the web, automatically determined from your input. - -Optionally, set "n" to limit the number of results returned (default 6). - -```json title="config.json (Deprecated)" -{ - "contextProviders": [ - { - "name": "web", - "params": { - "n": 5 - } - } - ] -} -``` - -### `@Codebase` - -Reference the most relevant snippets from your codebase. - -```json title="config.json (Deprecated)" -{ - "contextProviders": [ - { - "name": "codebase" - } - ] -} -``` - -Read more about indexing and retrieval [here](../customize/deep-dives/codebase.md). - -### `@Folder` - -Uses the same retrieval mechanism as `@Codebase`, but only on a single folder. - -```json title="config.json (Deprecated)" -{ - "contextProviders": [ - { - "name": "folder" - } - ] -} -``` - -### `@Search` - -Reference the results of codebase search, just like the results you would get from VS Code search. - -```json title="config.json (Deprecated)" -{ - "contextProviders": [ - { - "name": "search" - } - ] -} -``` - -This context provider is powered by [ripgrep](https://github.com/BurntSushi/ripgrep). - -### `@Url` - -Reference the markdown converted contents of a given URL. - -```json title="config.json (Deprecated)" -{ - "contextProviders": [ - { - "name": "url" - } - ] -} -``` - -### `@Clipboard` - -Reference recent clipboard items - -```json title="config.json (Deprecated)" -{ - "contextProviders": [ - { - "name": "clipboard" - } - ] -} -``` - -### `@Tree` - -Reference the structure of your current workspace. - -```json title="config.json (Deprecated)" -{ - "contextProviders": [ - { - "name": "tree" - } - ] -} -``` - -### `@Problems` - -Get Problems from the current file. - -```json title="config.json (Deprecated)" -{ - "contextProviders": [ - { - "name": "problems" - } - ] -} -``` - -### `@Debugger` - -Reference the contents of the local variables in the debugger. Currently only available in VS Code. - -```json title="config.json (Deprecated)" -{ - "contextProviders": [ - { - "name": "debugger", - "params": { - "stackDepth": 3 - } - } - ] -} -``` - -Uses the top _n_ levels (defaulting to 3) of the call stack for that thread. - -### `@Repository Map` - -Reference the outline of your codebase. By default, signatures are included along with file in the repo map. - -`includeSignatures` params can be set to false to exclude signatures. This could be necessary for large codebases and/or to reduce context size significantly. Signatures will not be included if indexing is disabled. - -```json title="config.json (Deprecated)" -{ - "contextProviders": [ - { - "name": "repo-map", - "params": { - "includeSignatures": false // default true - } - } - ] -} -``` - -Provides a list of files and the call signatures of top-level classes, functions, and methods in those files. This helps the model better understand how a particular piece of code relates to the rest of the codebase. - -In the submenu that appears, you can select either `Entire codebase`, or specify a subfolder to generate the repostiory map from. - -This context provider is inpsired by [Aider's repository map](https://aider.chat/2023/10/22/repomap.html). - -### `@Operating System` - -Reference the architecture and platform of your current operating system. - -```json title="config.json (Deprecated)" -{ - "contextProviders": [ - { - "name": "os" - } - ] -} -``` - -### Model Context Protocol - -The [Model Context Protocol](https://modelcontextprotocol.io/introduction) is a standard proposed by Anthropic to unify prompts, context, and tool use. Continue supports any MCP server with the MCP context provider. Read their [quickstart](https://modelcontextprotocol.io/quickstart) to learn how to set up a local server and then configure your `config.json` like this: - -```json title="config.json (Deprecated)" -{ - "experimental": { - "modelContextProtocolServers": [ - { - "transport": { - "type": "stdio", - "command": "uvx", - "args": ["mcp-server-sqlite", "--db-path", "/Users/NAME/test.db"] - } - } - ] - } -} -``` - -You'll then be able to type "@" and see "MCP" in the context providers dropdown. - -### Prompt Files - -See [Prompt Files](/customize/deep-dives/prompt-files). Prompt files are not added directly to the config file; prompt files are parsed and injected into the config automatically, to be used like other context providers. - -### `@Issue` - -Reference the conversation in a GitHub issue. - -```json title="config.json (Deprecated)" -{ - "contextProviders": [ - { - "name": "issue", - "params": { - "repos": [ - { - "owner": "continuedev", - "repo": "continue" - } - ], - "githubToken": "ghp_xxx" - } - } - ] -} -``` - -Make sure to include your own [GitHub personal access token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-fine-grained-personal-access-token) to avoid being rate-limited. - -### `@Database` - -Reference table schemas from Sqlite, Postgres, MSSQL, and MySQL databases. - -```json title="config.json (Deprecated)" -{ - "contextProviders": [ - { - "name": "database", - "params": { - "connections": [ - { - "name": "examplePostgres", - "connection_type": "postgres", - "connection": { - "user": "username", - "host": "localhost", - "database": "exampleDB", - "password": "yourPassword", - "port": 5432 - } - }, - { - "name": "exampleMssql", - "connection_type": "mssql", - "connection": { - "user": "username", - "server": "localhost", - "database": "exampleDB", - "password": "yourPassword" - } - }, - { - "name": "exampleSqlite", - "connection_type": "sqlite", - "connection": { - "filename": "/path/to/your/sqlite/database.db" - } - } - ] - } - } - ] -} -``` - -Each connection should include a unique name, the `connection_type`, and the necessary connection parameters specific to each database type. - -Available connection types: - -- `postgres` -- `mysql` -- `sqlite` - -### `@Postgres` - -Reference the schema of a table, and some sample rows - -```json title="config.json (Deprecated)" -{ - "contextProviders": [ - { - "name": "postgres", - "params": { - "host": "localhost", - "port": 5436, - "user": "myuser", - "password": "catsarecool", - "database": "animals", - "schema": "public", - "sampleRows": 3 - } - } - ] -} -``` - -The only required settings are those for creating the database connection: `host`, `port`, `user`, `password`, and `database`. - -By default, the `schema` filter is set to `public`, and the `sampleRows` is set to 3. You may unset the schema if you want to include tables from all schemas. - -[Here is a short demo.](https://github.com/continuedev/continue/pull/859) - -### `@Google` - -Reference the results of a Google search. - -```json title="config.json (Deprecated)" -{ - "contextProviders": [ - { - "name": "google", - "params": { - "serperApiKey": "" - } - } - ] -} -``` - -For example, type "@Google python tutorial" if you want to search and discuss ways of learning Python. - -Note: You can get an API key for free at [serper.dev](https://serper.dev). - -### `@Gitlab Merge Request` - -Reference an open MR for this branch on GitLab. - -```json title="config.json (Deprecated)" -{ - "contextProviders": [ - { - "name": "gitlab-mr", - "params": { - "token": "..." - } - } - ] -} -``` - -You will need to create a [personal access token](https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html) with the `read_api` scope. - -#### Using Self-Hosted GitLab - -You can specify the domain to communicate with by setting the `domain` parameter in your configurtion. By default this is set to `gitlab.com`. - -```json title="config.json (Deprecated)" -{ - "contextProviders": [ - { - "name": "gitlab-mr", - "params": { - "token": "...", - "domain": "gitlab.example.com" - } - } - ] -} -``` - -#### Filtering Comments - -If you select some code to be edited, you can have the context provider filter out comments for other files. To enable this feature, set `filterComments` to `true`. - -### `@Jira` - -Reference the conversation in a Jira issue. - -```json title="config.json (Deprecated)" -{ - "contextProviders": [ - { - "name": "jira", - "params": { - "domain": "company.atlassian.net", - "token": "ATATT..." - } - } - ] -} -``` - -Make sure to include your own [Atlassian API Token](https://id.atlassian.com/manage-profile/security/api-tokens), or use your `email` and `token`, with token set to your password for basic authentication. If you use your own Atlassian API Token, don't configure your email. - -#### Jira Datacenter Support - -This context provider supports both Jira API version 2 and 3. It will use version 3 by default since -that's what the cloud version uses, but if you have the datacenter version of Jira, you'll need -to set the API Version to 2 using the `apiVersion` property. - -```json title="config.json (Deprecated)" -{ - "contextProviders": [ - { - "name": "jira", - "params": { - "apiVersion": "2" - } - } - ] -} -``` - -#### Issue Query - -By default, the following query will be used to find issues: - -```jql -assignee = currentUser() AND resolution = Unresolved order by updated DESC -``` - -You can override this query by setting the `issueQuery` parameter. - -### `@Discord` - -Reference the messages in a Discord channel. - -```json title="config.json (Deprecated)" -{ - "contextProviders": [ - { - "name": "discord", - "params": { - "discordKey": "bot token", - "guildId": "1234567890", - "channels": [ - { - "id": "123456", - "name": "example-channel" - }, - { - "id": "678901", - "name": "example-channel-2" - } - ] - } - } - ] -} -``` - -Make sure to include your own [Bot Token](https://discord.com/developers/applications), and join it to your related server . If you want more granular control over which channels are searched, you can specify a list of channel IDs to search in. If you don't want to specify any channels, just include the guild id(Server ID) and all channels will be included. The provider only reads text channels. - -### `@HTTP` - -The HttpContextProvider makes a POST request to the url passed in the configuration. The server must return 200 OK with a ContextItem object or an array of ContextItems. - -```json title="config.json (Deprecated)" -{ - "contextProviders": [ - { - "name": "http", - "params": { - "url": "https://api.example.com/v1/users" - } - } - ] -} -``` - -The receiving URL should expect to receive the following parameters: - -```js title="POST parameters" -{ - query: string, - fullInput: string -} -``` - -The response 200 OK should be a JSON object with the following structure: - -```json title="Response" -[ - { - "name": "", - "description": "", - "content": "" - } -] - -// OR -{ - "name": "", - "description": "", - "content": "" -} -``` - -### `@Commits` - -Reference specific git commit metadata and diff or all of the recent commits. - -```json title="config.json (Deprecated)" -{ - "contextProviders": [ - { - "name": "commit", - "params": { - "Depth": 50, - "LastXCommitsDepth": 10 - } - } - ] -} -``` - -The depth is how many commits will be loaded into the submenu, defaults to 50. -The LastXCommitsDepth is how many recent commits will be included, defaults to 10. - -### `@Clipboard` - -Reference recent clipboard items - -```json title="config.json (Deprecated)" -{ - "contextProviders": [ - { - "name": "clipboard" - } - ] -} -``` - -### `@Greptile` - -Query a [Greptile](https://www.greptile.com/) index of the current repo/branch. - -```json title="config.json (Deprecated)" -{ - "contextProviders": [ - { - "name": "greptile", - "params": { - "GreptileToken": "...", - "GithubToken": "..." - } - } - ] -} -``` - -### Requesting Context Providers - -Not seeing what you want? Create an issue [here](https://github.com/continuedev/continue/issues/new?assignees=TyDunn&labels=enhancement&projects=&template=feature-request-%F0%9F%92%AA.md&title=) to request a new Context Provider. diff --git a/docs/docs/customize/context-providers.mdx b/docs/docs/customize/context-providers.mdx new file mode 100644 index 000000000..667b055f9 --- /dev/null +++ b/docs/docs/customize/context-providers.mdx @@ -0,0 +1,990 @@ +--- +title: Context providers +description: Type '@' to select content to the LLM as context +keywords: [context, "@", provider, LLM] +--- + +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + +Context Providers allow you to type '@' and see a dropdown of content that can all be fed to the LLM as context. Every context provider is a plugin, which means if you want to reference some source of information that you don't see here, you can request (or build!) a new context provider. + +As an example, say you are working on solving a new GitHub Issue. You type '@Issue' and select the one you are working on. Continue can now see the issue title and contents. You also know that the issue is related to the files 'readme.md' and 'helloNested.py', so you type '@readme' and '@hello' to find and select them. Now these 3 "Context Items" are displayed inline with the rest of your input. + +![Context Items](/img/context-provider-example.png) + +## Built-in Context Providers + +To use any of the built-in context providers, open `config.json` and add it to the `contextProviders` list. + +### `@File` + +Reference any file in your current workspace. + + + + ```yaml title="Package or config.yaml" + context: + - uses: file + ``` + + + ```json title="config.json (Deprecated)" + "contextProviders": [ + { + "name": "file" + } + ] + ``` + + + +### `@Code` + +Reference specific functions or classes from throughout your project. + + + + ```yaml title="Package or config.yaml" + context: + - uses: code + ``` + + + ```json title="config.json (Deprecated)" + "contextProviders": [ + { + "name": "code" + } + ] + ``` + + + +### `@Git Diff` + +Reference all of the changes you've made to your current branch. This is useful if you want to summarize what you've done or ask for a general review of your work before committing. + + + + ```yaml title="Package or config.yaml" + context: + - uses: diff + ``` + + + ```json title="config.json (Deprecated)" + "contextProviders": [ + { + "name": "diff" + } + ] + ``` + + + +### `@Current File` + +Reference the currently open file. + + + + ```yaml title="Package or config.yaml" + context: + - uses: currentFile + ``` + + + ```json title="config.json (Deprecated)" + "contextProviders": [ + { + "name": "currentFile" + } + ] + ``` + + + +### `@Terminal` + +Reference the last command you ran in your IDE's terminal and its output. + + + + ```yaml title="Package or config.yaml" + context: + - uses: terminal + ``` + + + ```json title="config.json (Deprecated)" + "contextProviders": [ + { + "name": "terminal" + } + ] + ``` + + + +### `@Docs` + +Reference the contents from any documentation site. + + + + ```yaml title="Package or config.yaml" + context: + - uses: docs + ``` + + + ```json title="config.json (Deprecated)" + "contextProviders": [ + { + "name": "docs" + } + ] + ``` + + + +Note that this will only enable the `@Docs` context provider. + +To use it, you need to add a documentation site to your `config.json`. See the [docs](../customize/deep-dives/docs.md) page for more information. + +### `@Open` + +Reference the contents of all of your open files. Set `onlyPinned` to `true` to only reference pinned files. + + + + ```yaml title="Package or config.yaml" + context: + - uses: open + with: + onlyPinned: true + ``` + + + ```json title="config.json (Deprecated)" + "contextProviders": [ + { + "name": "open", + "params": { + "onlyPinned": true + } + } + ] + ``` + + + +### `@Web` + +Reference relevant pages from across the web, automatically determined from your input. + +Optionally, set `n` to limit the number of results returned (default 6). + + + + ```yaml title="Package or config.yaml" + context: + - uses: web + with: + n: 5 + ``` + + + ```json title="config.json (Deprecated)" + "contextProviders": [ + { + "name": "web", + "params": { + "n": 5 + } + } + ] + ``` + + + +### `@Codebase` + +Reference the most relevant snippets from your codebase. + + + + ```yaml title="Package or config.yaml" + context: + - uses: codebase + ``` + + + ```json title="config.json (Deprecated)" + "contextProviders": [ + { + "name": "codebase" + } + ] + ``` + + + +Read more about indexing and retrieval [here](../customize/deep-dives/codebase.md). + +### `@Folder` + +Uses the same retrieval mechanism as `@Codebase`, but only on a single folder. + + + + ```yaml title="Package or config.yaml" + context: + - uses: folder + ``` + + + ```json title="config.json (Deprecated)" + "contextProviders": [ + { + "name": "folder" + } + ] + ``` + + + +### `@Search` + +Reference the results of codebase search, just like the results you would get from VS Code search. + + + + ```yaml title="Package or config.yaml" + context: + - uses: search + ``` + + + ```json title="config.json (Deprecated)" + "contextProviders": [ + { + "name": "search" + } + ] + ``` + + + +This context provider is powered by [ripgrep](https://github.com/BurntSushi/ripgrep). + +This context provider is powered by [ripgrep](https://github.com/BurntSushi/ripgrep). + +### `@Url` + +Reference the markdown converted contents of a given URL. + + + + ```yaml title="Package or config.yaml" + context: + - uses: url + ``` + + + ```json title="config.json (Deprecated)" + "contextProviders": [ + { + "name": "url" + } + ] + ``` + + + +### `@Clipboard` + +Reference recent clipboard items + + + + ```yaml title="Package or config.yaml" + context: + - uses: clipboard + ``` + + + ```json title="config.json (Deprecated)" + "contextProviders": [ + { + "name": "clipboard" + } + ] + ``` + + + +### `@Tree` + +Reference the structure of your current workspace. + + + + ```yaml title="Package or config.yaml" + context: + - uses: tree + ``` + + + ```json title="config.json (Deprecated)" + "contextProviders": [ + { + "name": "tree" + } + ] + ``` + + + +### `@Problems` + +Get Problems from the current file. + + + + ```yaml title="Package or config.yaml" + context: + - uses: problems + ``` + + + ```json title="config.json (Deprecated)" + "contextProviders": [ + { + "name": "problems" + } + ] + ``` + + + +### `@Debugger` + +Reference the contents of the local variables in the debugger. Currently only available in VS Code. + + + + ```yaml title="Package or config.yaml" + context: + - uses: debugger + with: + stackDepth: 3 + ``` + + + ```json title="config.json (Deprecated)" + "contextProviders": [ + { + "name": "debugger", + "params": { + "stackDepth": 3 + } + } + ] + ``` + + + +Uses the top _n_ levels (defaulting to 3) of the call stack for that thread. + +### `@Repository Map` + +Reference the outline of your codebase. By default, signatures are included along with file in the repo map. + +`includeSignatures` params can be set to false to exclude signatures. This could be necessary for large codebases and/or to reduce context size significantly. Signatures will not be included if indexing is disabled. + + + + ```yaml title="Package or config.yaml" + context: + - uses: repo-map + with: + includeSignatures: false # default true + ``` + + + ```json title="config.json (Deprecated)" + "contextProviders": [ + { + "name": "repo-map", + "params": { + "includeSignatures": false // default true + } + } + ] + ``` + + + +Provides a list of files and the call signatures of top-level classes, functions, and methods in those files. This helps the model better understand how a particular piece of code relates to the rest of the codebase. + +In the submenu that appears, you can select either `Entire codebase`, or specify a subfolder to generate the repostiory map from. + +This context provider is inpsired by [Aider's repository map](https://aider.chat/2023/10/22/repomap.html). + +### `@Operating System` + +Reference the architecture and platform of your current operating system. + + + + ```yaml title="Package or config.yaml" + context: + - uses: os + ``` + + + ```json title="config.json (Deprecated)" + "contextProviders": [ + { + "name": "os" + } + ] + ``` + + + +### Model Context Protocol + +The [Model Context Protocol](https://modelcontextprotocol.io/introduction) is a standard proposed by Anthropic to unify prompts, context, and tool use. Continue supports any MCP server with the MCP context provider. Read their [quickstart](https://modelcontextprotocol.io/quickstart) to learn how to set up a local server and then set up your configuration like this: + + + + ```yaml title="Package or config.yaml" + mcpServers: + - name: My MCP Server + command: uvx + args: + - mcp-server-sqlite + - --db-path + - /Users/NAME/test.db + ``` + + + ```json title="config.json (Deprecated)" + "experimental": { + "modelContextProtocolServers": [ + { + "transport": { + "type": "stdio", + "command": "uvx", + "args": ["mcp-server-sqlite", "--db-path", "/Users/NAME/test.db"] + } + } + ] + } + ``` + + + +You'll then be able to type "@" and see "MCP" in the context providers dropdown. + +### Prompt Files + +See [Prompt Files](/customize/deep-dives/prompt-files). Prompt files are not added directly to the config file; prompt files are parsed and injected into the config automatically, to be used like other context providers. + +### `@Issue` + +Reference the conversation in a GitHub issue. + + + + ```yaml title="Package or config.yaml" + context: + - uses: issue + with: + repos: + - owner: continuedev + repo: continue + githubToken: ghp_xxx + ``` + + + ```json title="config.json (Deprecated)" + "contextProviders": [ + { + "name": "issue", + "params": { + "repos": [ + { + "owner": "continuedev", + "repo": "continue" + } + ], + "githubToken": "ghp_xxx" + } + } + ] + ``` + + + +Make sure to include your own [GitHub personal access token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-fine-grained-personal-access-token) to avoid being rate-limited. + +### `@Database` + +Reference table schemas from Sqlite, Postgres, MSSQL, and MySQL databases. + + + + ```yaml title="Package or config.yaml" + context: + - uses: database + with: + connections: + - name: examplePostgres + connection_type: postgres + connection: + user: username + host: localhost + database: exampleDB + password: yourPassword + port: 5432 + - name: exampleMssql + connection_type: mssql + connection: + user: username + server: localhost + database: exampleDB + password: yourPassword + - name: exampleSqlite + connection_type: sqlite + connection: + filename: /path/to/your/sqlite/database.db + ``` + + + ```json title="config.json (Deprecated)" + "contextProviders": [ + { + "name": "database", + "params": { + "connections": [ + { + "name": "examplePostgres", + "connection_type": "postgres", + "connection": { + "user": "username", + "host": "localhost", + "database": "exampleDB", + "password": "yourPassword", + "port": 5432 + } + }, + { + "name": "exampleMssql", + "connection_type": "mssql", + "connection": { + "user": "username", + "server": "localhost", + "database": "exampleDB", + "password": "yourPassword" + } + }, + { + "name": "exampleSqlite", + "connection_type": "sqlite", + "connection": { + "filename": "/path/to/your/sqlite/database.db" + } + } + ] + } + } + ] + ``` + + + +Each connection should include a unique name, the `connection_type`, and the necessary connection parameters specific to each database type. + +Available connection types: + +- `postgres` +- `mysql` +- `sqlite` + +### `@Postgres` + +Reference the schema of a table, and some sample rows + + + + ```yaml title="Package or config.yaml" + context: + - uses: postgres + with: + host: localhost + port: 5436 + user: myuser + password: catsarecool + database: animals + schema: public + sampleRows: 3 + ``` + + + ```json title="config.json (Deprecated)" + "contextProviders": [ + { + "name": "postgres", + "params": { + "host": "localhost", + "port": 5436, + "user": "myuser", + "password": "catsarecool", + "database": "animals", + "schema": "public", + "sampleRows": 3 + } + } + ] + ``` + + + +The only required settings are those for creating the database connection: `host`, `port`, `user`, `password`, and `database`. + +By default, the `schema` filter is set to `public`, and the `sampleRows` is set to 3. You may unset the schema if you want to include tables from all schemas. + +[Here is a short demo.](https://github.com/continuedev/continue/pull/859) + +### `@Google` + +Reference the results of a Google search. + + + + ```yaml title="Package or config.yaml" + context: + - uses: google + with: + serperApiKey: "" + ``` + + + ```json title="config.json (Deprecated)" + "contextProviders": [ + { + "name": "google", + "params": { + "serperApiKey": "" + } + } + ] + ``` + + + +For example, type "@Google python tutorial" if you want to search and discuss ways of learning Python. + +Note: You can get an API key for free at [serper.dev](https://serper.dev). + +### `@Gitlab Merge Request` + +Reference an open MR for this branch on GitLab. + + + + ```yaml title="Package or config.yaml" + context: + - uses: gitlab-mr + with: + token: "..." + ``` + + + ```json title="config.json (Deprecated)" + "contextProviders": [ + { + "name": "gitlab-mr", + "params": { + "token": "..." + } + } + ] + ``` + + + +You will need to create a [personal access token](https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html) with the `read_api` scope. + +#### Using Self-Hosted GitLab + +You can specify the domain to communicate with by setting the `domain` parameter in your configurtion. By default this is set to `gitlab.com`. + + + + ```yaml title="Package or config.yaml" + context: + - uses: gitlab-mr + with: + token: "..." + domain: "gitlab.example.com" + ``` + + + ```json title="config.json (Deprecated)" + "contextProviders": [ + { + "name": "gitlab-mr", + "params": { + "token": "...", + "domain": "gitlab.example.com" + } + } + ] + ``` + + + +#### Filtering Comments + +If you select some code to be edited, you can have the context provider filter out comments for other files. To enable this feature, set `filterComments` to `true`. + +### `@Jira` + +Reference the conversation in a Jira issue. + + + + ```yaml title="Package or config.yaml" + context: + - uses: jira + with: + domain: company.atlassian.net + token: ATATT... + ``` + + + ```json title="config.json (Deprecated)" + "contextProviders": [ + { + "name": "jira", + "params": { + "domain": "company.atlassian.net", + "token": "ATATT..." + } + } + ] + ``` + + + +Make sure to include your own [Atlassian API Token](https://id.atlassian.com/manage-profile/security/api-tokens), or use your `email` and `token`, with token set to your password for basic authentication. If you use your own Atlassian API Token, don't configure your email. + +#### Jira Datacenter Support + +This context provider supports both Jira API version 2 and 3. It will use version 3 by default since +that's what the cloud version uses, but if you have the datacenter version of Jira, you'll need +to set the API Version to 2 using the `apiVersion` property. + + + + ```yaml title="Package or config.yaml" + context: + - uses: jira + with: + apiVersion: "2" + ``` + + + ```json title="config.json (Deprecated)" + "contextProviders": [ + { + "name": "jira", + "params": { + "apiVersion": "2" + } + } + ] + ``` + + + +#### Issue Query + +By default, the following query will be used to find issues: + +```jql +assignee = currentUser() AND resolution = Unresolved order by updated DESC +``` + +You can override this query by setting the `issueQuery` parameter. + +### `@Discord` + +Reference the messages in a Discord channel. + + + + ```yaml title="Package or config.yaml" + context: + - uses: discord + with: + discordKey: "bot token" + guildId: "1234567890" + channels: + - id: "123456" + name: "example-channel" + - id: "678901" + name: "example-channel-2" + ``` + + + ```json title="config.json (Deprecated)" + "contextProviders": [ + { + "name": "discord", + "params": { + "discordKey": "bot token", + "guildId": "1234567890", + "channels": [ + { + "id": "123456", + "name": "example-channel" + }, + { + "id": "678901", + "name": "example-channel-2" + } + ] + } + } + ] + ``` + + + +Make sure to include your own [Bot Token](https://discord.com/developers/applications), and join it to your related server . If you want more granular control over which channels are searched, you can specify a list of channel IDs to search in. If you don't want to specify any channels, just include the guild id(Server ID) and all channels will be included. The provider only reads text channels. + +### `@HTTP` + +The HttpContextProvider makes a POST request to the url passed in the configuration. The server must return 200 OK with a ContextItem object or an array of ContextItems. + + + + ```yaml title="Package or config.yaml" + context: + - uses: http + with: + url: "https://api.example.com/v1/users" + ``` + + + ```json title="config.json (Deprecated)" + "contextProviders": [ + { + "name": "http", + "params": { + "url": "https://api.example.com/v1/users" + } + } + ] + ``` + + + +The receiving URL should expect to receive the following parameters: + +```js title="POST parameters" +{ + query: string, + fullInput: string +} +``` + +The response 200 OK should be a JSON object with the following structure: + +```json title="Response" +[ + { + "name": "", + "description": "", + "content": "" + } +] + +// OR +{ + "name": "", + "description": "", + "content": "" +} +``` + +### `@Commits` + +Reference specific git commit metadata and diff or all of the recent commits. + + + + ```yaml title="Package or config.yaml" + context: + - uses: commit + with: + Depth: 50 + LastXCommitsDepth: 10 + ``` + + + ```json title="config.json (Deprecated)" + "contextProviders": [ + { + "name": "commit", + "params": { + "Depth": 50, + "LastXCommitsDepth": 10 + } + } + ] + ``` + + + +The depth is how many commits will be loaded into the submenu, defaults to 50. +The LastXCommitsDepth is how many recent commits will be included, defaults to 10. + +### `@Greptile` + +Query a [Greptile](https://www.greptile.com/) index of the current repo/branch. + + + + ```yaml title="Package or config.yaml" + context: + - uses: greptile + with: + greptileToken: "..." + githubToken: "..." + ``` + + + ```json title="config.json (Deprecated)" + "contextProviders": [ + { + "name": "greptile", + "params": { + "GreptileToken": "...", + "GithubToken": "..." + } + } + ] + ``` + + + +### Requesting Context Providers + +Not seeing what you want? Create an issue [here](https://github.com/continuedev/continue/issues/new?assignees=TyDunn&labels=enhancement&projects=&template=feature-request-%F0%9F%92%AA.md&title=) to request a new Context Provider. diff --git a/docs/docs/customize/deep-dives/autocomplete.md b/docs/docs/customize/deep-dives/autocomplete.mdx similarity index 79% rename from docs/docs/customize/deep-dives/autocomplete.md rename to docs/docs/customize/deep-dives/autocomplete.mdx index 43c096669..5dba5d800 100644 --- a/docs/docs/customize/deep-dives/autocomplete.md +++ b/docs/docs/customize/deep-dives/autocomplete.mdx @@ -3,20 +3,38 @@ title: Autocomplete keywords: [autocomplete] --- +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + ### Setting up with Codestral (recommended) If you want to have the best autocomplete experience, we recommend using Codestral, which is available through the [Mistral API](https://console.mistral.ai/). To do this, obtain an API key and add it to your `config.json`: -```json title="config.json (Deprecated)" -{ - "tabAutocompleteModel": { - "title": "Codestral", - "provider": "mistral", - "model": "codestral-latest", - "apiKey": "YOUR_API_KEY" + + + ```yaml title="config.yaml" + models: + - name: Codestral + provider: mistral + model: codestral-latest + apiKeySecret: CODESTRAL_API_KEY + roles: + - autocomplete + ``` + + + ```json title="config.json (Deprecated)" + { + "tabAutocompleteModel": { + "title": "Codestral", + "provider": "mistral", + "model": "codestral-latest", + "apiKey": "YOUR_API_KEY" + } } -} -``` + ``` + + ### Setting up with Ollama (default) @@ -32,17 +50,29 @@ Once it has been downloaded, you should begin to see completions in VS Code. 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="config.json (Deprecated)" -{ + + + ```yaml title="config.yaml" + models: + - name: Tab Autocomplete Model + provider: ollama + model: qwen2.5-coder:1.5b-base + apiBase: https:// + roles: + - autocomplete + ``` + + + ```json title="config.json (Deprecated)" "tabAutocompleteModel": { - "title": "Tab Autocomplete Model", - "provider": "ollama", - "model": "qwen2.5-coder:1.5b-base", - "apiBase": "https://" - }, - ... -} -``` + "title": "Tab Autocomplete Model", + "provider": "ollama", + "model": "qwen2.5-coder:1.5b-base", + "apiBase": "https://" + } + ``` + + If you aren't yet familiar with the available options, you can find the full reference [here](./configuration.md). @@ -71,21 +101,36 @@ This object allows you to customize the behavior of tab-autocomplete. The availa ### Full example -```json title="config.json (Deprecated)" -{ - "tabAutocompleteModel": { - "title": "Tab Autocomplete Model", - "provider": "ollama", - "model": "qwen2.5-coder:1.5b-base", - "apiBase": "https://" - }, - "tabAutocompleteOptions": { - "debounceDelay": 500, - "maxPromptTokens": 1500, - "disableInFiles": ["*.md"] + + + ```yaml title="config.yaml" + models: + - name: Tab Autocomplete Model + provider: ollama + model: qwen2.5-coder:1.5b-base + apiBase: https:// + roles: + - autocomplete + ``` + + + ```json title="config.json (Deprecated)" + { + "tabAutocompleteModel": { + "title": "Tab Autocomplete Model", + "provider": "ollama", + "model": "qwen2.5-coder:1.5b-base", + "apiBase": "https://" + }, + "tabAutocompleteOptions": { + "debounceDelay": 500, + "maxPromptTokens": 1500, + "disableInFiles": ["*.md"] + } } -} -``` + ``` + + ## FAQs diff --git a/docs/docs/customize/deep-dives/codebase.md b/docs/docs/customize/deep-dives/codebase.mdx similarity index 81% rename from docs/docs/customize/deep-dives/codebase.md rename to docs/docs/customize/deep-dives/codebase.mdx index a5a06644f..994cb848d 100644 --- a/docs/docs/customize/deep-dives/codebase.md +++ b/docs/docs/customize/deep-dives/codebase.mdx @@ -3,6 +3,9 @@ description: Talk to your codebase keywords: [talk, embeddings, reranker, codebase, experimental] --- +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + # @Codebase Continue indexes your codebase so that it can later automatically pull in the most relevant context from throughout your workspace. This is done via a combination of embeddings-based retrieval and keyword search. By default, all embeddings are calculated locally using `transformers.js` and stored locally in `~/.continue/index`. @@ -40,20 +43,32 @@ Here are use cases where it is not useful: There are a few options that let you configure the behavior of the codebase context provider. These can be set in `config.json`, and are the same for the codebase, docs, and folder context providers: -```json title="config.json (Deprecated)" -{ - "contextProviders": [ - { - "name": "codebase", - "params": { - "nRetrieve": 25, - "nFinal": 5, - "useReranking": true + + + ```yaml title="Package or config.yaml" + context: + - uses: codebase + with: + nRetrieve: 25, + nFinal: 5, + useReranking: true + ``` + + + ```json title="config.json (Deprecated)" + "contextProviders": [ + { + "name": "codebase", + "params": { + "nRetrieve": 25, + "nFinal": 5, + "useReranking": true + } } - } - ] -} -``` + ] + ``` + + ### `nRetrieve` @@ -79,4 +94,4 @@ If you need to force a refresh of the index, reload the VS Code window with If you run into the following error when connecting to the new Claude 3.5 Sonnet 2 models from AWS - `400 Invocation of model ID anthropic.claude-3-5-sonnet-20241022-v2:0 with on-demand throughput isn’t supported. Retry your request with the ID or ARN of an inference profile that contains this model.` - -> You can fix this using the following config.json - -```json title="config.json (Deprecated)" -{ - "models": [ - { - "title": "Claude 3.5 Sonnet", - "provider": "bedrock", - "model": "us.anthropic.claude-3-5-sonnet-20241022-v2:0", - "region": "us-east-1", - "profile": "bedrock" - } - ] -} -``` - -## Autocomplete model - -Bedrock currently does not offer any autocomplete models. - -[Click here](../../model-types/autocomplete.md) to see a list of autocomplete model providers. - -## Embeddings model - -We recommend configuring [`amazon.titan-embed-text-v2:0`](https://docs.aws.amazon.com/bedrock/latest/devguide/models.html#amazon.titan-embed-text-v2-0) as your embeddings model. - -```json title="config.json (Deprecated)" -{ - "embeddingsProvider": { - "title": "Embeddings Model", - "provider": "bedrock", - "model": "amazon.titan-embed-text-v2:0", - "region": "us-west-2" - } -} -``` - -## Reranking model - -We recommend configuring `cohere.rerank-v3-5:0` as your reranking model, you may also use `amazon.rerank-v1:0`. - -```json title="config.json (Deprecated)" -{ - "reranker": { - "name": "bedrock", - "params": { - "model": "cohere.rerank-v3-5:0", - "region": "us-west-2" - } - } -} -``` - -## Authentication - -Authentication will be through temporary or long-term credentials in -`~/.aws/credentials` under a configured profile (e.g. "bedrock"). - -```title="~/.aws/credentials -[bedrock] -aws_access_key_id = abcdefg -aws_secret_access_key = hijklmno -aws_session_token = pqrstuvwxyz # Optional: means short term creds. -``` - -## Custom Imported Models - -To setup Bedrock using custom imported models, add the following to your `config.json` file: - -```json title="config.json (Deprecated)" -{ - "models": [ - { - "title": "AWS Bedrock deepseek-coder-6.7b-instruct", - "provider": "bedrockimport", - "model": "deepseek-coder-6.7b-instruct", - "modelArn": "arn:aws:bedrock:us-west-2:XXXXX:imported-model/XXXXXX", - "region": "us-west-2", - "profile": "bedrock" - } - ] -} -``` - -Authentication will be through temporary or long-term credentials in -~/.aws/credentials under a configured profile (e.g. "bedrock"). - -```title="~/.aws/credentials -[bedrock] -aws_access_key_id = abcdefg -aws_secret_access_key = hijklmno -aws_session_token = pqrstuvwxyz # Optional: means short term creds. -``` diff --git a/docs/docs/customize/model-providers/top-level/bedrock.mdx b/docs/docs/customize/model-providers/top-level/bedrock.mdx new file mode 100644 index 000000000..cf6edf0e4 --- /dev/null +++ b/docs/docs/customize/model-providers/top-level/bedrock.mdx @@ -0,0 +1,192 @@ +--- +title: Amazon Bedrock +slug: ../bedrock +--- + +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + +Amazon Bedrock is a fully managed service on AWS that provides access to foundation models from various AI companies through a single API. + +## Chat model + +We recommend configuring **Claude 3.5 Sonnet** as your chat model. + + + + ```yaml title="config.yaml" + models: + - name: Claude 3.5 Sonnet + provider: bedrock + model: anthropic.claude-3-5-sonnet-20240620-v1:0 + region: us-east-1 + profile: bedrock + roles: + - chat + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "title": "Claude 3.5 Sonnet", + "provider": "bedrock", + "model": "anthropic.claude-3-5-sonnet-20240620-v1:0", + "region": "us-east-1", + "profile": "bedrock" + } + ] + ``` + + + +> If you run into the following error when connecting to the new Claude 3.5 Sonnet 2 models from AWS - `400 Invocation of model ID anthropic.claude-3-5-sonnet-20241022-v2:0 with on-demand throughput isn't supported. Retry your request with the ID or ARN of an inference profile that contains this model.` + +> You can fix this using the following config: + + + + ```yaml title="config.yaml" + models: + - name: Claude 3.5 Sonnet + provider: bedrock + model: us.anthropic.claude-3-5-sonnet-20241022-v2:0 + region: us-east-1 + profile: bedrock + roles: + - chat + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "title": "Claude 3.5 Sonnet", + "provider": "bedrock", + "model": "us.anthropic.claude-3-5-sonnet-20241022-v2:0", + "region": "us-east-1", + "profile": "bedrock" + } + ] + ``` + + + +## Autocomplete model + +Bedrock currently does not offer any autocomplete models. + +[Click here](../../model-types/autocomplete.md) to see a list of autocomplete model providers. + +## Embeddings model + +We recommend configuring [`amazon.titan-embed-text-v2:0`](https://docs.aws.amazon.com/bedrock/latest/devguide/models.html#amazon.titan-embed-text-v2-0) as your embeddings model. + + + + ```yaml title="config.yaml" + models: + - name: Embeddings Model + provider: bedrock + model: amazon.titan-embed-text-v2:0 + region: us-west-2 + roles: + - embed + ``` + + + ```json title="config.json (Deprecated)" + "embeddingsProvider": { + "title": "Embeddings Model", + "provider": "bedrock", + "model": "amazon.titan-embed-text-v2:0", + "region": "us-west-2" + } + ``` + + + +## Reranking model + +We recommend configuring `cohere.rerank-v3-5:0` as your reranking model, you may also use `amazon.rerank-v1:0`. + + + + ```yaml title="config.yaml" + models: + - name: Bedrock Reranker + provider: bedrock + model: cohere.rerank-v3-5:0 + region: us-west-2 + roles: + - rerank + ``` + + + ```json title="config.json (Deprecated)" + "reranker": { + "name": "bedrock", + "params": { + "model": "cohere.rerank-v3-5:0", + "region": "us-west-2" + } + } + ``` + + + +## Authentication + +Authentication will be through temporary or long-term credentials in +`~/.aws/credentials` under a configured profile (e.g. "bedrock"). + +```title="~/.aws/credentials +[bedrock] +aws_access_key_id = abcdefg +aws_secret_access_key = hijklmno +aws_session_token = pqrstuvwxyz # Optional: means short term creds. +``` + +## Custom Imported Models + +To setup Bedrock using custom imported models, add the following to your config file: + + + + ```yaml title="config.yaml" + models: + - name: AWS Bedrock deepseek-coder-6.7b-instruct + provider: bedrockimport + model: deepseek-coder-6.7b-instruct + modelArn: arn:aws:bedrock:us-west-2:XXXXX:imported-model/XXXXXX + region: us-west-2 + profile: bedrock + roles: + - chat + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "title": "AWS Bedrock deepseek-coder-6.7b-instruct", + "provider": "bedrockimport", + "model": "deepseek-coder-6.7b-instruct", + "modelArn": "arn:aws:bedrock:us-west-2:XXXXX:imported-model/XXXXXX", + "region": "us-west-2", + "profile": "bedrock" + } + ] + ``` + + + +Authentication will be through temporary or long-term credentials in +~/.aws/credentials under a configured profile (e.g. "bedrock"). + +```title="~/.aws/credentials +[bedrock] +aws_access_key_id = abcdefg +aws_secret_access_key = hijklmno +aws_session_token = pqrstuvwxyz # Optional: means short term creds. +``` diff --git a/docs/docs/customize/model-providers/top-level/deepseek.md b/docs/docs/customize/model-providers/top-level/deepseek.mdx similarity index 100% rename from docs/docs/customize/model-providers/top-level/deepseek.md rename to docs/docs/customize/model-providers/top-level/deepseek.mdx diff --git a/docs/docs/customize/model-providers/top-level/gemini.md b/docs/docs/customize/model-providers/top-level/gemini.md deleted file mode 100644 index 9b6247484..000000000 --- a/docs/docs/customize/model-providers/top-level/gemini.md +++ /dev/null @@ -1,53 +0,0 @@ ---- -title: Gemini -slug: ../gemini ---- - -:::info - -You can get an API key from the [Google AI Studio](https://aistudio.google.com/). - -::: - -## Chat model - -We recommend configuring **Gemini 1.5 Pro** as your chat model. - -```json title="config.json (Deprecated)" -{ - "models": [ - { - "title": "Gemini 1.5 Pro", - "provider": "gemini", - "model": "gemini-1.5-pro-latest", - "apiKey": "[API_KEY]" - } - ] -} -``` - -## Autocomplete model - -Gemini currently does not offer any autocomplete models. - -[Click here](../../model-types/autocomplete.md) to see a list of autocomplete model providers. - -## Embeddings model - -We recommend configuring **text-embedding-004** as your embeddings model. - -```json title="config.json (Deprecated)" -{ - "embeddingsProvider": { - "provider": "gemini", - "model": "models/text-embedding-004", - "apiKey": "[API_KEY]" - } -} -``` - -## Reranking model - -Gemini currently does not offer any reranking models. - -[Click here](../../model-types/reranking.md) to see a list of reranking model providers. diff --git a/docs/docs/customize/model-providers/top-level/gemini.mdx b/docs/docs/customize/model-providers/top-level/gemini.mdx new file mode 100644 index 000000000..490c00996 --- /dev/null +++ b/docs/docs/customize/model-providers/top-level/gemini.mdx @@ -0,0 +1,80 @@ +--- +title: Gemini +slug: ../gemini +--- + +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + +:::info +You can get an API key from the [Google AI Studio](https://aistudio.google.com/). +::: + +## Chat model + +We recommend configuring **Gemini 1.5 Pro** as your chat model. + + + + ```yaml title="config.yaml" + models: + - name: Gemini 1.5 Pro + provider: gemini + model: gemini-1.5-pro-latest + apiKey: "[API_KEY]" + roles: + - chat + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "title": "Gemini 1.5 Pro", + "provider": "gemini", + "model": "gemini-1.5-pro-latest", + "apiKey": "[API_KEY]" + } + ] + ``` + + + +## Autocomplete model + +Gemini currently does not offer any autocomplete models. + +[Click here](../../model-types/autocomplete.md) to see a list of autocomplete model providers. + +## Embeddings model + +We recommend configuring **text-embedding-004** as your embeddings model. + + + + ```yaml title="config.yaml" + models: + - name: Gemini Embeddings + provider: gemini + model: models/text-embedding-004 + apiKey: "[API_KEY]" + roles: + - embed + ``` + + + ```json title="config.json (Deprecated)" + "embeddingsProvider": { + "provider": "gemini", + "model": "models/text-embedding-004", + "apiKey": "[API_KEY]" + } + ``` + + + +## Reranking model + +Gemini currently does not offer any reranking models. + +[Click here](../../model-types/reranking.md) to see a list of reranking model providers. diff --git a/docs/docs/customize/model-providers/top-level/mistral.md b/docs/docs/customize/model-providers/top-level/mistral.md deleted file mode 100644 index 67ba28b3e..000000000 --- a/docs/docs/customize/model-providers/top-level/mistral.md +++ /dev/null @@ -1,63 +0,0 @@ ---- -title: Mistral -slug: ../mistral ---- - -:::info - -You can get an API key from the [Mistral Dashboard](https://console.mistral.ai). Note that the API key for Codestral (codestral.mistral.ai) is different from for all other models (api.mistral.ai). If you are using a Codestral API key, you should set the `apiBase` to `https://codestral.mistral.ai/v1`. Otherwise, we will default to using `https://api.mistral.ai/v1`. - -::: - -## Chat model - -We recommend configuring **Mistral Large** as your chat model. - -```json title="config.json (Deprecated)" -{ - "models": [ - { - "title": "Mistral Large", - "provider": "mistral", - "model": "mistral-large-latest", - "apiKey": "[API_KEY]" - } - ] -} -``` - -## Autocomplete model - -We recommend configuring **Codestral** as your autocomplete model. - -```json title="config.json (Deprecated)" -{ - "tabAutocompleteModel": { - "title": "Codestral", - "provider": "mistral", - "model": "codestral-latest" - // "apiBase": "https://codestral.mistral.ai/v1" // Do this if you are using a Codestral API key - } -} -``` - -## Embeddings model - -We recommend configuring **Mistral Embed** as your embeddings model. - -```json title="config.json (Deprecated)" -{ - "embeddingsProvider": { - "provider": "mistral", - "model": "mistral-embed", - "apiKey": "[API_KEY]", - "apiBase": "https://api.mistral.ai/v1" - } -} -``` - -## Reranking model - -Mistral currently does not offer any reranking models. - -[Click here](../../model-types/reranking.md) to see a list of reranking model providers. diff --git a/docs/docs/customize/model-providers/top-level/mistral.mdx b/docs/docs/customize/model-providers/top-level/mistral.mdx new file mode 100644 index 000000000..158b8169f --- /dev/null +++ b/docs/docs/customize/model-providers/top-level/mistral.mdx @@ -0,0 +1,104 @@ +--- +title: Mistral +slug: ../mistral +--- + +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + +:::info +You can get an API key from the [Mistral Dashboard](https://console.mistral.ai). Note that the API key for Codestral (codestral.mistral.ai) is different from for all other models (api.mistral.ai). If you are using a Codestral API key, you should set the `apiBase` to `https://codestral.mistral.ai/v1`. Otherwise, we will default to using `https://api.mistral.ai/v1`. +::: + +## Chat model + +We recommend configuring **Mistral Large** as your chat model. + + + + ```yaml title="config.yaml" + models: + - name: Mistral Large + provider: mistral + model: mistral-large-latest + apiKeySecret: MISTRAL_API_KEY + roles: + - chat + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "title": "Mistral Large", + "provider": "mistral", + "model": "mistral-large-latest", + "apiKey": "[API_KEY]" + } + ] + ``` + + + +## Autocomplete model + +We recommend configuring **Codestral** as your autocomplete model. + + + + ```yaml title="config.yaml" + models: + - name: Codestral + provider: mistral + model: codestral-latest + # apiBase: https://codestral.mistral.ai/v1 # Do this if you are using a Codestral API key + roles: + - autocomplete + ``` + + + ```json title="config.json (Deprecated)" + "tabAutocompleteModel": { + "title": "Codestral", + "provider": "mistral", + "model": "codestral-latest" + // "apiBase": "https://codestral.mistral.ai/v1" // Do this if you are using a Codestral API key + } + ``` + + + +## Embeddings model + +We recommend configuring **Mistral Embed** as your embeddings model. + + + + ```yaml title="config.yaml" + models: + - name: Mistral Embed + provider: mistral + model: mistral-embed + apiKeySecret: MISTRAL_API_KEY + apiBase: https://api.mistral.ai/v1 + roles: + - embed + ``` + + + ```json title="config.json (Deprecated)" + "embeddingsProvider": { + "provider": "mistral", + "model": "mistral-embed", + "apiKey": "[API_KEY]", + "apiBase": "https://api.mistral.ai/v1" + } + ``` + + + +## Reranking model + +Mistral currently does not offer any reranking models. + +[Click here](../../model-types/reranking.md) to see a list of reranking model providers. diff --git a/docs/docs/customize/model-providers/top-level/ollama.md b/docs/docs/customize/model-providers/top-level/ollama.md deleted file mode 100644 index f2229c3b6..000000000 --- a/docs/docs/customize/model-providers/top-level/ollama.md +++ /dev/null @@ -1,72 +0,0 @@ ---- -title: Ollama -slug: ../ollama ---- - -Ollama is an open-source tool that allows to run large language models (LLMs) locally on their own computers. To use Ollama, you can install it [here](https://ollama.ai/download) and download the model you want to run with the `ollama run` command. - -## Chat model - -We recommend configuring **Llama3.1 8B** as your chat model. - -```json title="config.json (Deprecated)" -{ - "models": [ - { - "title": "Llama3.1 8B", - "provider": "ollama", - "model": "llama3.1:8b" - } - ] -} -``` - -## Autocomplete model - -We recommend configuring **Qwen2.5-Coder 1.5B** as your autocomplete model. - -```json title="config.json (Deprecated)" -{ - "tabAutocompleteModel": { - "title": "Qwen2.5-Coder 1.5B", - "provider": "ollama", - "model": "qwen2.5-coder:1.5b-base" - } -} -``` - -## Embeddings model - -We recommend configuring **Nomic Embed Text** as your embeddings model. - -```json title="config.json (Deprecated)" -{ - "embeddingsProvider": { - "provider": "ollama", - "model": "nomic-embed-text" - } -} -``` - -## Reranking model - -Ollama currently does not offer any reranking models. - -[Click here](../../model-types/reranking.md) to see a list of reranking model providers. - -## Using a remote instance - -To configure a remote instance of Ollama, add the `"apiBase"` property to your model in config.json: - -```json title="config.json (Deprecated)" -{ - "models": [ - { - "title": "Llama3.1 8B", - "provider": "ollama", - "model": "llama3.1:8b", - "apiBase": "http://:11434" - } - ] -} -``` diff --git a/docs/docs/customize/model-providers/top-level/ollama.mdx b/docs/docs/customize/model-providers/top-level/ollama.mdx new file mode 100644 index 000000000..6052372f0 --- /dev/null +++ b/docs/docs/customize/model-providers/top-level/ollama.mdx @@ -0,0 +1,120 @@ +--- +title: Ollama +slug: ../ollama +--- + +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + +Ollama is an open-source tool that allows to run large language models (LLMs) locally on their own computers. To use Ollama, you can install it [here](https://ollama.ai/download) and download the model you want to run with the `ollama run` command. + +## Chat model + +We recommend configuring **Llama3.1 8B** as your chat model. + + + + ```yaml title="Package or config.yaml" + models: + - name: Llama3.1 8B + provider: ollama + model: llama3.1:8b + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "title": "Llama3.1 8B", + "provider": "ollama", + "model": "llama3.1:8b" + } + ] + ``` + + + +## Autocomplete model + +We recommend configuring **Qwen2.5-Coder 1.5B** as your autocomplete model. + + + + ```yaml title="Package or config.yaml" + models: + - name: Qwen2.5-Coder 1.5B + provider: ollama + model: qwen2.5-coder:1.5b-base + roles: + - autocomplete + ``` + + + ```json title="config.json (Deprecated)" + "tabAutocompleteModel": { + "title": "Qwen2.5-Coder 1.5B", + "provider": "ollama", + "model": "qwen2.5-coder:1.5b-base" + } + ``` + + + +## Embeddings model + +We recommend configuring **Nomic Embed Text** as your embeddings model. + + + + ```yaml title="Package or config.yaml" + models: + - name: Nomic Embed Text + provider: ollama + model: nomic-embed-text + roles: + - embed + ``` + + + ```json title="config.json (Deprecated)" + "embeddingsProvider": { + "provider": "ollama", + "model": "nomic-embed-text" + } + ``` + + + +## Reranking model + +Ollama currently does not offer any reranking models. + +[Click here](../../model-types/reranking.md) to see a list of reranking model providers. + +## Using a remote instance + +To configure a remote instance of Ollama, add the `"apiBase"` property to your model in config.json: + + + + ```yaml title="Package or config.yaml" + models: + - title: Llama3.1 8B + provider: ollama + model: llama3.1:8b + apiBase: http://:11434 + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "title": "Llama3.1 8B", + "provider": "ollama", + "model": "llama3.1:8b", + "apiBase": "http://:11434" + } + ] + ``` + + diff --git a/docs/docs/customize/model-providers/top-level/openai.md b/docs/docs/customize/model-providers/top-level/openai.md deleted file mode 100644 index d59fe1f6a..000000000 --- a/docs/docs/customize/model-providers/top-level/openai.md +++ /dev/null @@ -1,103 +0,0 @@ ---- -title: OpenAI -slug: ../openai ---- - -:::info - -You can get an API key from the [OpenAI console](https://platform.openai.com/account/api-keys) - -::: - -## Chat model - -We recommend configuring **GPT-4o** as your chat model. - -```json title="config.json (Deprecated)" -{ - "models": [ - { - "title": "GPT-4o", - "provider": "openai", - "model": "gpt-4o", - "apiKey": "[API_KEY]" - } - ] -} -``` - -## Autocomplete model - -OpenAI currently does not offer any autocomplete models. - -[Click here](../../model-types/autocomplete.md) to see a list of autocomplete model providers. - -## Embeddings model - -We recommend configuring **text-embedding-3-large** as your embeddings model. - -```json title="config.json (Deprecated)" -{ - "embeddingsProvider": { - "provider": "openai", - "model": "text-embedding-3-large", - "apiKey": "[API_KEY]" - } -} -``` - -## Reranking model - -OpenAI currently does not offer any reranking models. - -[Click here](../../model-types/reranking.md) to see a list of reranking model providers. - -## OpenAI compatible servers / APIs - -OpenAI compatible servers - -- [KoboldCpp](https://github.com/lostruins/koboldcpp) -- [text-gen-webui](https://github.com/oobabooga/text-generation-webui/tree/main/extensions/openai#setup--installation) -- [FastChat](https://github.com/lm-sys/FastChat/blob/main/docs/openai_api.md) -- [LocalAI](https://localai.io/basics/getting_started/) -- [llama-cpp-python](https://github.com/abetlen/llama-cpp-python#web-server) -- [TensorRT-LLM](https://github.com/NVIDIA/trt-llm-as-openai-windows?tab=readme-ov-file#examples) -- [vLLM](https://docs.vllm.ai/en/latest/serving/openai_compatible_server.html) -- [BerriAI/litellm](https://github.com/BerriAI/litellm) - -OpenAI compatible APIs - -- [Anyscale Endpoints](https://github.com/continuedev/deploy-os-code-llm#others) -- [Anyscale Private Endpoints](https://github.com/continuedev/deploy-os-code-llm#anyscale-private-endpoints) - -If you are using an OpenAI compatible server / API, you can change the `apiBase` like this: - -```json title="config.json (Deprecated)" -{ - "models": [ - { - "title": "OpenAI-compatible server / API", - "provider": "openai", - "model": "MODEL_NAME", - "apiKey": "EMPTY", - "apiBase": "http://localhost:8000/v1" - } - ] -} -``` - -To force usage of `chat/completions` instead of `completions` endpoint you can set: - -```json title="config.json (Deprecated)" -{ - "models": [ - { - "title": "OpenAI-compatible server / API", - "provider": "openai", - "model": "MODEL_NAME", - "apiBase": "http://localhost:8000/v1", - "useLegacyCompletionsEndpoint": true - } - ] -} -``` diff --git a/docs/docs/customize/model-providers/top-level/openai.mdx b/docs/docs/customize/model-providers/top-level/openai.mdx new file mode 100644 index 000000000..c4338e036 --- /dev/null +++ b/docs/docs/customize/model-providers/top-level/openai.mdx @@ -0,0 +1,160 @@ +--- +title: OpenAI +slug: ../openai +--- + +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + +:::info +You can get an API key from the [OpenAI console](https://platform.openai.com/account/api-keys) +::: + +## Chat model + +We recommend configuring **GPT-4o** as your chat model. + + + + ```yaml title="config.yaml" + models: + - name: GPT-4o + provider: openai + model: gpt-4o + apiKeySecret: OPENAI_KEY + ``` + + + ```json title="config.json (Deprecated)" + { + "models": [ + { + "title": "GPT-4o", + "provider": "openai", + "model": "gpt-4o", + "apiKey": "[API_KEY]" + } + ] + } + ``` + + + +## Autocomplete model + +OpenAI currently does not offer any autocomplete models. + +[Click here](../../model-types/autocomplete.md) to see a list of autocomplete model providers. + +## Embeddings model + +We recommend configuring **text-embedding-3-large** as your embeddings model. + + + + ```yaml title="config.yaml" + models: + - name: OpenAI Embeddings + provider: openai + model: text-embedding-3-large + apiKey: + roles: + - embed + ``` + + + ```json title="config.json (Deprecated)" + { + "embeddingsProvider": { + "provider": "openai", + "model": "text-embedding-3-large", + "apiKey": "[API_KEY]" + } + } + ``` + + + +## Reranking model + +OpenAI currently does not offer any reranking models. + +[Click here](../../model-types/reranking.md) to see a list of reranking model providers. + +## OpenAI compatible servers / APIs + +OpenAI compatible servers + +- [KoboldCpp](https://github.com/lostruins/koboldcpp) +- [text-gen-webui](https://github.com/oobabooga/text-generation-webui/tree/main/extensions/openai#setup--installation) +- [FastChat](https://github.com/lm-sys/FastChat/blob/main/docs/openai_api.md) +- [LocalAI](https://localai.io/basics/getting_started/) +- [llama-cpp-python](https://github.com/abetlen/llama-cpp-python#web-server) +- [TensorRT-LLM](https://github.com/NVIDIA/trt-llm-as-openai-windows?tab=readme-ov-file#examples) +- [vLLM](https://docs.vllm.ai/en/latest/serving/openai_compatible_server.html) +- [BerriAI/litellm](https://github.com/BerriAI/litellm) + +OpenAI compatible APIs + +- [Anyscale Endpoints](https://github.com/continuedev/deploy-os-code-llm#others) +- [Anyscale Private Endpoints](https://github.com/continuedev/deploy-os-code-llm#anyscale-private-endpoints) + +If you are using an OpenAI compatible server / API, you can change the `apiBase` like this: + + + + ```yaml title="config.yaml" + models: + - name: OpenAI-compatible server / API + provider: openai + model: MODEL_NAME + apiBase: http://localhost:8000/v1 + apiKeySecret: EMPTY + roles: + - chat + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "title": "OpenAI-compatible server / API", + "provider": "openai", + "model": "MODEL_NAME", + "apiKey": "EMPTY", + "apiBase": "http://localhost:8000/v1" + } + ] + ``` + + + +To force usage of `chat/completions` instead of `completions` endpoint you can set: + + + + ```yaml title="config.yaml" + models: + - name: OpenAI-compatible server / API + provider: openai + model: MODEL_NAME + apiBase: http://localhost:8000/v1 + useLegacyCompletionsEndpoint: true + ``` + + + ```json title="config.json (Deprecated)" + { + "models": [ + { + "title": "OpenAI-compatible server / API", + "provider": "openai", + "model": "MODEL_NAME", + "apiBase": "http://localhost:8000/v1", + "useLegacyCompletionsEndpoint": true + } + ] + } + ``` + + diff --git a/docs/docs/customize/slash-commands.md b/docs/docs/customize/slash-commands.mdx similarity index 77% rename from docs/docs/customize/slash-commands.md rename to docs/docs/customize/slash-commands.mdx index 5afffdb77..79cede310 100644 --- a/docs/docs/customize/slash-commands.md +++ b/docs/docs/customize/slash-commands.mdx @@ -4,6 +4,13 @@ description: Shortcuts that can be activated by prefacing your input with '/' keywords: [slash command, custom commands, step] --- +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + +:::info +Slash commands can currently only be added using [`config.json`](../json-reference.md), which has been deprecated in favor of the [`YAML Config Format`](../reference.md). We recommend looking into [Prompt Files](../customize/deep-dives//prompt-files.md) to achieve similar functionality. +::: + Slash commands are shortcuts that can be activated by typing '/' and selecting from the dropdown. For example, the built-in '/edit' slash command lets you stream edits directly into your editor. ![slash-commands](/img/slash-commands.png) @@ -109,23 +116,36 @@ The onboard slash command helps to familiarize yourself with a new project by an ### Model Context Protocol -The [Model Context Protocol](https://modelcontextprotocol.io/introduction) is a standard proposed by Anthropic to unify prompts, context, and tool use. Continue supports MCP "prompts" by creating slash commands. Read their [quickstart](https://modelcontextprotocol.io/quickstart) to learn how to set up a local server and then configure your `config.json` like this: +The [Model Context Protocol](https://modelcontextprotocol.io/introduction) is a standard proposed by Anthropic to unify prompts, context, and tool use. Continue supports MCP "prompts" by creating slash commands. Read their [quickstart](https://modelcontextprotocol.io/quickstart) to learn how to set up a local server and then set up your configuration like this: -```json title="config.json (Deprecated)" -{ - "experimental": { - "modelContextProtocolServers": [ - { - "transport": { - "type": "stdio", - "command": "uvx", - "args": ["mcp-server-sqlite", "--db-path", "/Users/NAME/test.db"] + + + ```yaml title="Package or config.yaml" + mcpServers: + - name: My MCP Server + command: uvx + args: + - mcp-server-sqlite + - --db-path + - /Users/NAME/test.db + ``` + + + ```json title="config.json (Deprecated)" + "experimental": { + "modelContextProtocolServers": [ + { + "transport": { + "type": "stdio", + "command": "uvx", + "args": ["mcp-server-sqlite", "--db-path", "/Users/NAME/test.db"] + } } - } - ] - } -} -``` + ] + } + ``` + + ### Build your own Slash Command diff --git a/docs/docs/customize/tools.md b/docs/docs/customize/tools.mdx similarity index 67% rename from docs/docs/customize/tools.md rename to docs/docs/customize/tools.mdx index 9047f50ff..8f94462b1 100644 --- a/docs/docs/customize/tools.md +++ b/docs/docs/customize/tools.mdx @@ -4,6 +4,9 @@ description: Tool use and customization keywords: [tool, use, function calling, claude, automatic] --- +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + Tools allow Continue to take action in your IDE and beyond (when you give permission). Currently, they are only supported for the following providers: - [Anthropic](./model-providers/top-level/anthropic.md) - see recommended models [here](https://docs.anthropic.com/en/docs/build-with-claude/tool-use#choosing-a-model). @@ -23,18 +26,31 @@ To let you balance speed and safety, each tool can be set to 1 of 3 modes: Currently custom tools can be configured using the [Model Context Protocol](https://modelcontextprotocol.io/introduction), a standard proposed by Anthropic to unify prompts, context, and tool use. Read their [quickstart](https://modelcontextprotocol.io/quickstart) to learn how to set up a local server and then configure your `config.json` like this: -```json title="config.json (Deprecated)" -{ - "experimental": { - "modelContextProtocolServers": [ - { - "transport": { - "type": "stdio", - "command": "uvx", - "args": ["mcp-server-sqlite", "--db-path", "/Users/NAME/test.db"] + + + ```yaml title="Package or config.yaml" + mcpServers: + - name: My MCP Server + command: uvx + args: + - mcp-server-sqlite + - --db-path + - /Users/NAME/test.db + ``` + + + ```json title="config.json (Deprecated)" + "experimental": { + "modelContextProtocolServers": [ + { + "transport": { + "type": "stdio", + "command": "uvx", + "args": ["mcp-server-sqlite", "--db-path", "/Users/NAME/test.db"] + } } - } - ] - } -} -``` + ] + } + ``` + + diff --git a/docs/docs/customize/tutorials/build-your-own-slash-command.md b/docs/docs/customize/tutorials/build-your-own-slash-command.md index 9c0c6f2d4..1692970fc 100644 --- a/docs/docs/customize/tutorials/build-your-own-slash-command.md +++ b/docs/docs/customize/tutorials/build-your-own-slash-command.md @@ -2,6 +2,10 @@ title: Build your own slash command --- +:::info +Slash commands can currently only be added using [`config.json`](../json-reference.md) or `config.ts`, which have been deprecated in favor of the [`YAML Config Format`](../reference.md). We recommend looking into [Prompt Files](../customize/deep-dives//prompt-files.md) to achieve similar functionality. +::: + There are two ways to add custom slash commands: 1. With natural language prompts - this is simpler and only requires writing a string or string template. @@ -19,9 +23,9 @@ Custom commands are great when you are frequently reusing a prompt. For example, ```json title="config.json (Deprecated)" customCommands=[{ - "name": "check", - "description": "Check for mistakes in my code", - "prompt": "{{{ input }}}\n\nPlease read the highlighted code and check for any mistakes. You should look for the following, and be extremely vigilant:\n- Syntax errors\n- Logic errors\n- Security vulnerabilities\n- Performance issues\n- Anything else that looks wrong\n\nOnce you find an error, please explain it as clearly as possible, but without using extra words. For example, instead of saying 'I think there is a syntax error on line 5', you should say 'Syntax error on line 5'. Give your answer as one bullet point per mistake found." + "name": "check", + "description": "Check for mistakes in my code", + "prompt": "{{{ input }}}\n\nPlease read the highlighted code and check for any mistakes. You should look for the following, and be extremely vigilant:\n- Syntax errors\n- Logic errors\n- Security vulnerabilities\n- Performance issues\n- Anything else that looks wrong\n\nOnce you find an error, please explain it as clearly as possible, but without using extra words. For example, instead of saying 'I think there is a syntax error on line 5', you should say 'Syntax error on line 5'. Give your answer as one bullet point per mistake found." }] ``` diff --git a/docs/docs/edit/model-setup.md b/docs/docs/edit/model-setup.md index ded10c2a4..64f5f69d6 100644 --- a/docs/docs/edit/model-setup.md +++ b/docs/docs/edit/model-setup.md @@ -7,4 +7,4 @@ keywords: [edit, cmd l, model] By default, Edit uses the [same model as Chat](chat/model-setup.mdx) since we recommend a similar, 400B+ parameter model or one of the frontier model for code edits. -You can configure a different model to be used for edits by updating your [`config.json`](../reference.md). +You can configure a different model to be used for edits by updating your [configuration](../reference.md). diff --git a/docs/docs/introduction.md b/docs/docs/introduction.md index 64f83436d..cfa1301cd 100644 --- a/docs/docs/introduction.md +++ b/docs/docs/introduction.md @@ -19,7 +19,7 @@ keywords: **Continue is the leading open-source AI code assistant inside of [VS Code](https://marketplace.visualstudio.com/items?itemName=Continue.continue) and [JetBrains](https://plugins.jetbrains.com/plugin/22707-continue-extension)** -- [Chat](chat/how-to-use-it.md) to understand and iterate on code in the sidebar -- [Autocomplete](autocomplete/how-to-use-it.md) to receive inline code suggestions as you type -- [Edit](edit/how-to-use-it.md) to modify code without leaving your current file -- [Actions](actions/how-to-use-it.md) to establish shortcuts for common use cases +- [Chat](chat/how-to-use-it) to understand and iterate on code in the sidebar +- [Autocomplete](autocomplete/how-to-use-it) to receive inline code suggestions as you type +- [Edit](edit/how-to-use-it) to modify code without leaving your current file +- [Actions](actions/how-to-use-it) to establish shortcuts for common use cases diff --git a/docs/docs/json-reference.md b/docs/docs/json-reference.md new file mode 100644 index 000000000..4faceb9a9 --- /dev/null +++ b/docs/docs/json-reference.md @@ -0,0 +1,451 @@ +--- +title: config.json Reference +description: Reference for the Continue _config.json_ configuration file +keywords: [config, config_schema.json, json] +--- + +:::info +`config.json` has been deprecated in favor of the [`YAML Config Format`](./yaml-reference). See the [migration guide](./yaml-migration). +::: + +Below are details for each property that can be set in `config.json`. The config schema code is found in [`extensions/vscode/config_schema.json`](https://github.com/continuedev/continue/blob/main/extensions/vscode/config_schema.json). + +**All properties at all levels are optional unless explicitly marked required** + +### `models` + +Your **chat** models are defined here, which are used for [Chat](./chat/how-to-use-it), [Edit](./edit/how-to-use-it), and [Actions](./actions/how-to-use-it). +Each model has specific configuration options tailored to its provider and functionality, which can be seen as suggestions while editing the json. + +**Properties:** + +- `title` (**required**): The title to assign to your model, shown in dropdowns, etc. +- `provider` (**required**): The provider of the model, which determines the type and interaction method. Options inclued `openai`, `ollama`, etc., see intelliJ suggestions. +- `model` (**required**): The name of the model, used for prompt template auto-detection. Use `AUTODETECT` special name to get all available models. +- `apiKey`: API key required by providers like OpenAI, Anthropic, and Cohere. +- `apiBase`: The base URL of the LLM API. +- `contextLength`: Maximum context length of the model, typically in tokens (default: 2048). +- `maxStopWords`: Maximum number of stop words allowed, to avoid API errors with extensive lists. +- `template`: Chat template to format messages. Auto-detected for most models but can be overridden. See intelliJ suggestions. +- `promptTemplates`: A mapping of prompt template names (e.g., `edit`) to template strings. [Customization Guide](https://docs.continue.dev/model-setup/configuration#customizing-the-edit-prompt). +- `completionOptions`: Model-specific completion options, same format as top-level [`completionOptions`](#completionoptions), which they override. +- `systemMessage`: A system message that will precede responses from the LLM. +- `requestOptions`: Model-specific HTTP request options, same format as top-level [`requestOptions`](#requestoptions), which they override. +- `apiType`: Specifies the type of API (`openai` or `azure`). +- `apiVersion`: Azure API version (e.g., `2023-07-01-preview`). +- `engine`: Engine for Azure OpenAI requests. +- `capabilities`: Override auto-detected capabilities: + - `uploadImage`: Boolean indicating if the model supports image uploads. + +_(AWS Only)_ + +- `profile`: AWS security profile for authorization. +- `modelArn`: AWS ARN for imported models (e.g., for `bedrockimport` provider). +- `region`: Region where the model is hosted (e.g., `us-east-1`, `eu-central-1`). + +Example: + +```json title="config.json" +{ + "models": [ + { + "title": "Ollama", + "provider": "ollama", + "model": "AUTODETECT" + }, + { + "model": "gpt-4o", + "contextLength": 128000, + "title": "GPT-4o", + "provider": "openai", + "apiKey": "YOUR_API_KEY" + } + ] +} +``` + +### `tabAutocompleteModel` + +Specifies the model or models for tab autocompletion, defaulting to an Ollama instance. This property uses the same format as `models`. Can be an array of models or an object for one model. + +Example + +```json title="config.json" +{ + "tabAutocompleteModel": { + "title": "My Starcoder", + "provider": "ollama", + "model": "starcoder2:3b" + } +} +``` + +### `tabAutocompleteOptions` + +Specifies options for tab autocompletion behavior. + +**Properties:** + +- `disable`: If `true`, disables tab autocomplete (default: `false`). +- `useFileSuffix`: If `true`, includes file suffix in the prompt. +- `maxPromptTokens`: Maximum number of tokens for the prompt. +- `debounceDelay`: Delay (in ms) before triggering autocomplete. +- `maxSuffixPercentage`: Maximum percentage of prompt for suffix. +- `prefixPercentage`: Percentage of input for prefix. +- `template`: Template string for autocomplete, using Mustache templating. You can use the `{{{ prefix }}}`, `{{{ suffix }}}`, `{{{ filename }}}`, `{{{ reponame }}}`, and `{{{ language }}}` variables. +- `multilineCompletions`: Controls multiline completions (`"always"`, `"never"`, or `"auto"`). +- `useCache`: If `true`, caches completions. +- `onlyMyCode`: If `true`, only includes code within the repository. +- `disableInFiles`: Array of glob patterns for files where autocomplete is disabled. + +Example + +```json title="config.json" +{ + "tabAutocompleteOptions": { + "debounceDelay": 500, + "maxPromptTokens": 1500, + "disableInFiles": ["*.md"] + } +} +``` + +### `embeddingsProvider` + +Embeddings model settings - the model used for @Codebase and @docs. + +**Properties:** + +- `provider` (**required**): Specifies the embeddings provider, with options including `transformers.js`, `ollama`, `openai`, `cohere`, `free-trial`, `gemini`, etc +- `model`: Model name for embeddings. +- `apiKey`: API key for the provider. +- `apiBase`: Base URL for API requests. +- `requestOptions`: Additional HTTP request settings specific to the embeddings provider. +- `maxChunkSize`: Maximum tokens per document chunk. Minimum is 128 tokens. +- `maxBatchSize`: Maximum number of chunks per request. Minimum is 1 chunk. + +(AWS ONLY) + +- `region`: Specifies the region hosting the model. +- `profile`: AWS security profile. + +Example: + +```json title="config.json" +{ + "embeddingsProvider": { + "provider": "openai", + "model": "text-embedding-ada-002", + "apiKey": "", + "maxChunkSize": 256, + "maxBatchSize": 5 + } +} +``` + +### `completionOptions` + +Parameters that control the behavior of text generation and completion settings. Top-level `completionOptions` apply to all models, _unless overridden at the model level_. + +**Properties:** + +- `stream`: Whether to stream the LLM response. Currently only respected by the `anthropic` and `ollama` providers; other providers will always stream (default: `true`). +- `temperature`: Controls the randomness of the completion. Higher values result in more diverse outputs. +- `topP`: The cumulative probability for nucleus sampling. Lower values limit responses to tokens within the top probability mass. +- `topK`: The maximum number of tokens considered at each step. Limits the generated text to tokens within this probability. +- `presencePenalty`: Discourages the model from generating tokens that have already appeared in the output. +- `frequencePenalty`: Penalizes tokens based on their frequency in the text, reducing repetition. +- `mirostat`: Enables Mirostat sampling, which controls the perplexity during text generation. Supported by Ollama, LM Studio, and llama.cpp providers (default: `0`, where `0` = disabled, `1` = Mirostat, and `2` = Mirostat 2.0). +- `stop`: An array of stop tokens that, when encountered, will terminate the completion. Allows specifying multiple end conditions. +- `maxTokens`: The maximum number of tokens to generate in a completion (default: `2048`). +- `numThreads`: The number of threads used during the generation process. Available only for Ollama as `num_thread`. +- `keepAlive`: For Ollama, this parameter sets the number of seconds to keep the model loaded after the last request, unloading it from memory if inactive (default: `1800` seconds, or 30 minutes). +- `useMmap`: For Ollama, this parameter allows the model to be mapped into memory. If disabled can enhance response time on low end devices but will slow down the stream. + +Example + +```json title="config.json" +{ + "completionOptions": { + "stream": false, + "temperature": 0.5 + } +} +``` + +### `requestOptions` + +Default HTTP request options that apply to all models and context providers, unless overridden at the model level. + +**Properties:** + +- `timeout`: Timeout for each request to the LLM (default: 7200 seconds). +- `verifySsl`: Whether to verify SSL certificates for requests. +- `caBundlePath`: Path to a custom CA bundle for HTTP requests - path to `.pem` file (or array of paths) +- `proxy`: Proxy URL to use for HTTP requests. +- `headers`: Custom headers for HTTP requests. +- `extraBodyProperties`: Additional properties to merge with the HTTP request body. +- `noProxy`: List of hostnames that should bypass the specified proxy. +- `clientCertificate`: Client certificate for HTTP requests. + + - `cert`: Path to the client certificate file. + - `key`: Path to the client certificate key file. + - `passphrase`: Optional passphrase for the client certificate key file. + +Example + +```json title="config.json" +{ + "requestOptions": { + "headers": { + "X-Auth-Token": "xxx" + } + } +} +``` + +### `reranker` + +Configuration for the reranker model used in response ranking. + +**Properties:** + +- `name` (**required**): Reranker name, e.g., `cohere`, `voyage`, `llm`, `free-trial`, `huggingface-tei`, `bedrock` +- `params`: + - `model`: Model name + - `apiKey`: Api key + - `region`: Region (for Bedrock only) + +Example + +```json title="config.json" +{ + "reranker": { + "name": "voyage", + "params": { + "model": "rerank-2", + "apiKey": "" + } + } +} +``` + +### `docs` + +List of documentation sites to index. + +**Properties:** + +- `title` (**required**): Title of the documentation site, displayed in dropdowns, etc. +- `startUrl` (**required**): Start page for crawling - usually root or intro page for docs +- `rootUrl`: Crawler will only index docs within this domain - pages that contain this URL +- `maxDepth`: Maximum depth for crawling. Default `3` +- `favicon`: URL for site favicon (default is `/favicon.ico` from `startUrl`). + +Example + +```json title="config.json" +"docs": [ + { + "title": "Continue", + "startUrl": "https://docs.continue.dev/intro", + "rootUrl": "https://docs.continue.dev", + "faviconUrl": "https://docs.continue.dev/favicon.ico", + } +] +``` + +### `slashCommands` + +Custom commands initiated by typing "/" in the sidebar. Commands include predefined functionality or may be user-defined. + +**Properties:** + +- `name`: The command name. Options include "issue", "share", "cmd", "http", "commit", and "review". +- `description`: Brief description of the command. +- `step`: Used for built-in commands; set the name for pre-configured options. +- `params`: Additional parameters to configure command behavior (command-specific - see code for command) + +Example: + +```json title="config.json" +{ + "slashCommands": [ + { + "name": "commit", + "description": "Generate a commit message" + }, + { + "name": "share", + "description": "Export this session as markdown" + }, + { + "name": "cmd", + "description": "Generate a shell command" + } + ] +} +``` + +### `customCommands` + +User-defined commands for prompt shortcuts in the sidebar, allowing quick access to common actions. + +**Properties:** + +- `name`: The name of the custom command. +- `prompt`: Text prompt for the command. +- `description`: Brief description explaining the command's function. + +Example: + +```json title="config.json" +{ + "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` + +List of the pre-defined context providers that will show up as options while typing in the chat, and their customization with `params`. + +**Properties:** + +- `name`: Name of the context provider, e.g. `docs` or `web` +- `params`: A context-provider-specific record of params to configure the context behavior + +Example + +```json title="config.json" +{ + "contextProviders": [ + { + "name": "code", + "params": {} + }, + { + "name": "docs", + "params": {} + }, + { + "name": "diff", + "params": {} + }, + { + "name": "open", + "params": {} + } + ] +} +``` + +### `disableSessionTitles` + +Prevents generating summary titles for each chat session when set to `true`. + +### `ui` + +Customizable UI settings to control interface appearance and behavior. + +**Properties:** + +- `codeBlockToolbarPosition`: Sets the toolbar position within code blocks, either `top` (default) or `bottom`. +- `fontSize`: Specifies font size for UI elements. +- `displayRawMarkdown`: If `true`, shows raw markdown in responses. +- `showChatScrollbar`: If `true`, enables a scrollbar in the chat window. +- `codeWrap`: If `true`, enables text wrapping in code blocks. + +Example: + +```json title="config.json" +{ + "ui": { + "codeBlockToolbarPosition": "bottom", + "fontSize": 14, + "displayRawMarkdown": false, + "showChatScrollbar": false, + "codeWrap": false + } +} +``` + +### `allowAnonymousTelemetry` + +When `true`, anonymous usage data is collected using Posthog, to improve features. Default is `true`. + +### `userToken` + +An optional token that identifies the user, primarily for authenticated services. + +### `systemMessage` + +Defines a system message that appears before every response from the language model, providing guidance or context. + +### `disableIndexing` + +Prevents indexing of the codebase, useful primarily for debugging purposes. + +### `experimental` + +Several experimental config parameters are available, as described below: + +`experimental`: + +- `defaultContext`: Defines the default context for the LLM. Uses the same format as `contextProviders` but includes an additional `query` property to specify custom query parameters.= +- `modelRoles`: + - `inlineEdit`: Model title for inline edits. + - `applyCodeBlock`: Model title for applying code blocks. + - `repoMapFileSelection`: Model title for repo map selections. +- `readResponseTTS`: If `true`, reads LLM responses aloud with TTS. Default is `true`. +- `promptPath`: Change the path to custom prompt files from the default ".prompts" +- `quickActions`: Array of custom quick actions + - `title` (**required**): Display title for the quick action. + - `prompt` (**required**): Prompt for quick action. + - `sendToChat`: If `true`, sends result to chat; else inserts in document. Default is `false`. +- `contextMenuPrompts`: + - `comment`: Prompt for commenting code. + - `docstring`: Prompt for adding docstrings. + - `fix`: Prompt for fixing code. + - `optimize`: Prompt for optimizing code. +- `useChromiumForDocsCrawling`: Use Chromium to crawl docs locally. Useful if the default Cheerio crawler fails on sites that require JavaScript rendering. Downloads and installs Chromium to `~/.continue/.utils`.. +- `modelContextProtocolServers`: See [Model Context Protocol](/customize/context-providers#model-context-protocol) + +Example + +```json title="config.json" +{ + "experimental": { + "modelRoles": { + "inlineEdit": "Edit Model" + }, + "promptPath": "custom/.prompts", + "quickActions": [ + { + "title": "Tags", + "prompt": "Return a list of any function and class names from the included code block", + "sendToChat": true + } + ], + "contextMenuPrompts": { + "fixGrammar": "Fix grammar in the above but allow for typos." + }, + "readResponseTTS": false, + "useChromiumForDocsCrawling": true, + "modelContextProtocolServers": [ + { + "transport": { + "type": "stdio", + "command": "uvx", + "args": ["mcp-server-sqlite", "--db-path", "/Users/NAME/test.db"] + } + } + ] + } +} +``` diff --git a/docs/docs/reference.md b/docs/docs/reference.md index e0eca3902..3b86fb248 100644 --- a/docs/docs/reference.md +++ b/docs/docs/reference.md @@ -1,230 +1,175 @@ --- -title: config.json Reference -description: Reference for the Continue _config.json_ configuration file -keywords: [config, config_schema.json, json] +title: Config YAML Reference +description: Reference for the Continue configuration YAML file +keywords: [config, yaml, configuration, customize, customization] --- -Below are details for each property that can be set in `config.json`. The config schema code is found in [`extensions/vscode/config_schema.json`](https://github.com/continuedev/continue/blob/main/extensions/vscode/config_schema.json). +# Config YAML Reference -**All properties at all levels are optional unless explicitly marked required** + + +Continue can be configured using a YAML file `config.yaml` which for local configuration can be placed in your global `.continue` folder (`~/.continue` on Mac, `%USERPROFILE%\.continue`) + +Below are details for each property that can be set in `config.yaml`. + +:::info +Config YAML replaces `config.json`, which has been deprecated. View the **[Migration Guide](/yaml-migration)**. `config.yaml` currently only works in VS Code pre-release. +::: + +**All properties at all levels are optional unless explicitly marked as required.** + +## Properties + +The top-level properties in the `config.yaml` configuration file are: + +- [`name`](#name) (**required**) + +- [`version`](#version) (**required**) +- [`models`](#models) +- [`context`](#context) +- [`rules`](#rules) +- [`prompts`](#prompts) +- [`docs`](#docs) + + +- [`mcpServers`](#mcpservers) + +--- + +### `name` + +The `name` property specifies the name of your project or configuration. + +```yaml title="config.yaml" +name: MyProject +``` + +### `version` + +The `version` property specifies the version of your project or configuration. + +--- ### `models` -Your **chat** models are defined here, which are used for [Chat](./chat/how-to-use-it.md), [Edit](./edit/how-to-use-it.md), and [Actions](./actions/how-to-use-it.md). -Each model has specific configuration options tailored to its provider and functionality, which can be seen as suggestions while editing the json. +The `models` section defines the language models used in your configuration. Models are used for functionalities such as chat, editing, and summarizing. **Properties:** -- `title` (**required**): The title to assign to your model, shown in dropdowns, etc. -- `provider` (**required**): The provider of the model, which determines the type and interaction method. Options inclued `openai`, `ollama`, etc., see intelliJ suggestions. -- `model` (**required**): The name of the model, used for prompt template auto-detection. Use `AUTODETECT` special name to get all available models. -- `apiKey`: API key required by providers like OpenAI, Anthropic, and Cohere. -- `apiBase`: The base URL of the LLM API. -- `contextLength`: Maximum context length of the model, typically in tokens (default: 2048). -- `maxStopWords`: Maximum number of stop words allowed, to avoid API errors with extensive lists. -- `template`: Chat template to format messages. Auto-detected for most models but can be overridden. See intelliJ suggestions. -- `promptTemplates`: A mapping of prompt template names (e.g., `edit`) to template strings. [Customization Guide](https://docs.continue.dev/model-setup/configuration#customizing-the-edit-prompt). -- `completionOptions`: Model-specific completion options, same format as top-level [`completionOptions`](#completionoptions), which they override. -- `systemMessage`: A system message that will precede responses from the LLM. -- `requestOptions`: Model-specific HTTP request options, same format as top-level [`requestOptions`](#requestoptions), which they override. -- `apiType`: Specifies the type of API (`openai` or `azure`). -- `apiVersion`: Azure API version (e.g., `2023-07-01-preview`). -- `engine`: Engine for Azure OpenAI requests. -- `capabilities`: Override auto-detected capabilities: - - `uploadImage`: Boolean indicating if the model supports image uploads. +- `name` (**required**): A unique name to identify the model within your configuration. +- `provider` (**required**): The provider of the model (e.g., `openai`, `ollama`). +- `model` (**required**): The specific model name (e.g., `gpt-4`, `starcoder`). +- `roles`: An array specifying the roles this model can fulfill, such as `chat`, `autocomplete`, `embed`, `rerank`, `edit`, `apply`, `summarize`. +- `defaultCompletionOptions`: Default completion options for model settings. -_(AWS Only)_ + **Properties:** -- `profile`: AWS security profile for authorization. -- `modelArn`: AWS ARN for imported models (e.g., for `bedrockimport` provider). -- `region`: Region where the model is hosted (e.g., `us-east-1`, `eu-central-1`). + - `contextLength`: Maximum context length of the model, typically in tokens. + - `maxTokens`: Maximum number of tokens to generate in a completion. + - `temperature`: Controls the randomness of the completion. Values range from `0.0` (deterministic) to `1.0` (random). + - `topP`: The cumulative probability for nucleus sampling. + - `topK`: Maximum number of tokens considered at each step. + - `stop`: An array of stop tokens that will terminate the completion. + - `n`: Number of completions to generate. -Example: +- `requestOptions`: HTTP request options specific to the model. -```json title="config.json (Deprecated)" -{ - "models": [ - { - "title": "Ollama", - "provider": "ollama", - "model": "AUTODETECT" - }, - { - "model": "gpt-4o", - "contextLength": 128000, - "title": "GPT-4o", - "provider": "openai", - "apiKey": "YOUR_API_KEY" - } - ] -} + **Properties:** + + - `timeout`: Timeout for each request to the language model. + - `verifySsl`: Whether to verify SSL certificates for requests. + - `caBundlePath`: Path to a custom CA bundle for HTTP requests. + - `proxy`: Proxy URL for HTTP requests. + - `headers`: Custom headers for HTTP requests. + - `extraBodyProperties`: Additional properties to merge with the HTTP request body. + - `noProxy`: List of hostnames that should bypass the specified proxy. + - `clientCertificate`: Client certificate for HTTP requests. + - `cert`: Path to the client certificate file. + - `key`: Path to the client certificate key file. + - `passphrase`: Optional passphrase for the client certificate key file. + +#### Example: + +```yaml title="config.yaml" +models: + - name: GPT-4o + provider: openai + model: gpt-4o + roles: + - chat + - edit + - apply + defaultCompletionOptions: + temperature: 0.7 + maxTokens: 1500 + + - name: Codestral + provider: mistral + model: codestral-latest + roles: + - autocomplete ``` -### `tabAutocompleteModel` +--- -Specifies the model or models for tab autocompletion, defaulting to an Ollama instance. This property uses the same format as `models`. Can be an array of models or an object for one model. +### `context` + +The `context` section defines context providers, which supply additional information or context to the language models. Each context provider can be configured with specific parameters. + +More information about usage/params for each context provider can be found [here](/customize/context-providers) + +**Properties:** + +- `uses` (**required**): The identifier or name of the context provider (e.g., `code`, `docs`, `web`). +- `with`: Optional parameters to configure the context provider's behavior. + +**Example:** + +```yaml title="config.yaml" +context: + - uses: files + - uses: code + - uses: codebase + with: + nFinal: 10 + - uses: docs + - uses: diff + - uses: folder + - uses: terminal +``` + +--- + +### `rules` + +List of rules that the LLM should follow. These are inserted into the system message for all chat requests. Example -```json title="config.json (Deprecated)" -{ - "tabAutocompleteModel": { - "title": "My Starcoder", - "provider": "ollama", - "model": "starcoder2:3b" - } -} +```yaml title="config.yaml" +rules: + - Always annotate Python functions with their parameter and return types + - Always write Google style docstrings for functions and classes ``` -### `tabAutocompleteOptions` +--- -Specifies options for tab autocompletion behavior. +### `prompts` -**Properties:** +A list of custom prompts that can be invoked from the chat window. Each prompt has a name, description, and the actual prompt text. -- `disable`: If `true`, disables tab autocomplete (default: `false`). -- `useFileSuffix`: If `true`, includes file suffix in the prompt. -- `maxPromptTokens`: Maximum number of tokens for the prompt. -- `debounceDelay`: Delay (in ms) before triggering autocomplete. -- `maxSuffixPercentage`: Maximum percentage of prompt for suffix. -- `prefixPercentage`: Percentage of input for prefix. -- `template`: Template string for autocomplete, using Mustache templating. You can use the `{{{ prefix }}}`, `{{{ suffix }}}`, `{{{ filename }}}`, `{{{ reponame }}}`, and `{{{ language }}}` variables. -- `multilineCompletions`: Controls multiline completions (`"always"`, `"never"`, or `"auto"`). -- `useCache`: If `true`, caches completions. -- `onlyMyCode`: If `true`, only includes code within the repository. -- `disableInFiles`: Array of glob patterns for files where autocomplete is disabled. - -Example - -```json title="config.json (Deprecated)" -{ - "tabAutocompleteOptions": { - "debounceDelay": 500, - "maxPromptTokens": 1500, - "disableInFiles": ["*.md"] - } -} +```yaml title="config.yaml" +prompts: + - name: check + description: Check for mistakes in my code + prompt: | + Please read the highlighted code and check for any mistakes. You should look for the following, and be extremely vigilant: + - Syntax errors + - Logic errors + - Security vulnerabilities ``` -### `embeddingsProvider` - -Embeddings model settings - the model used for @Codebase and @docs. - -**Properties:** - -- `provider` (**required**): Specifies the embeddings provider, with options including `transformers.js`, `ollama`, `openai`, `cohere`, `free-trial`, `gemini`, etc -- `model`: Model name for embeddings. -- `apiKey`: API key for the provider. -- `apiBase`: Base URL for API requests. -- `requestOptions`: Additional HTTP request settings specific to the embeddings provider. -- `maxChunkSize`: Maximum tokens per document chunk. Minimum is 128 tokens. -- `maxBatchSize`: Maximum number of chunks per request. Minimum is 1 chunk. - -(AWS ONLY) - -- `region`: Specifies the region hosting the model. -- `profile`: AWS security profile. - -Example: - -```json title="config.json (Deprecated)" -{ - "embeddingsProvider": { - "provider": "openai", - "model": "text-embedding-ada-002", - "apiKey": "", - "maxChunkSize": 256, - "maxBatchSize": 5 - } -} -``` - -### `completionOptions` - -Parameters that control the behavior of text generation and completion settings. Top-level `completionOptions` apply to all models, _unless overridden at the model level_. - -**Properties:** - -- `stream`: Whether to stream the LLM response. Currently only respected by the `anthropic` and `ollama` providers; other providers will always stream (default: `true`). -- `temperature`: Controls the randomness of the completion. Higher values result in more diverse outputs. -- `topP`: The cumulative probability for nucleus sampling. Lower values limit responses to tokens within the top probability mass. -- `topK`: The maximum number of tokens considered at each step. Limits the generated text to tokens within this probability. -- `presencePenalty`: Discourages the model from generating tokens that have already appeared in the output. -- `frequencePenalty`: Penalizes tokens based on their frequency in the text, reducing repetition. -- `mirostat`: Enables Mirostat sampling, which controls the perplexity during text generation. Supported by Ollama, LM Studio, and llama.cpp providers (default: `0`, where `0` = disabled, `1` = Mirostat, and `2` = Mirostat 2.0). -- `stop`: An array of stop tokens that, when encountered, will terminate the completion. Allows specifying multiple end conditions. -- `maxTokens`: The maximum number of tokens to generate in a completion (default: `2048`). -- `numThreads`: The number of threads used during the generation process. Available only for Ollama as `num_thread`. -- `keepAlive`: For Ollama, this parameter sets the number of seconds to keep the model loaded after the last request, unloading it from memory if inactive (default: `1800` seconds, or 30 minutes). -- `useMmap`: For Ollama, this parameter allows the model to be mapped into memory. If disabled can enhance response time on low end devices but will slow down the stream. - -Example - -```json title="config.json (Deprecated)" -{ - "completionOptions": { - "stream": false, - "temperature": 0.5 - } -} -``` - -### `requestOptions` - -Default HTTP request options that apply to all models and context providers, unless overridden at the model level. - -**Properties:** - -- `timeout`: Timeout for each request to the LLM (default: 7200 seconds). -- `verifySsl`: Whether to verify SSL certificates for requests. -- `caBundlePath`: Path to a custom CA bundle for HTTP requests - path to `.pem` file (or array of paths) -- `proxy`: Proxy URL to use for HTTP requests. -- `headers`: Custom headers for HTTP requests. -- `extraBodyProperties`: Additional properties to merge with the HTTP request body. -- `noProxy`: List of hostnames that should bypass the specified proxy. -- `clientCertificate`: Client certificate for HTTP requests. - - - `cert`: Path to the client certificate file. - - `key`: Path to the client certificate key file. - - `passphrase`: Optional passphrase for the client certificate key file. - -Example - -```json title="config.json (Deprecated)" -{ - "requestOptions": { - "headers": { - "X-Auth-Token": "xxx" - } - } -} -``` - -### `reranker` - -Configuration for the reranker model used in response ranking. - -**Properties:** - -- `name` (**required**): Reranker name, e.g., `cohere`, `voyage`, `llm`, `free-trial`, `huggingface-tei`, `bedrock` -- `params`: - - `model`: Model name - - `apiKey`: Api key - - `region`: Region (for Bedrock only) - -Example - -```json title="config.json (Deprecated)" -{ - "reranker": { - "name": "voyage", - "params": { - "model": "rerank-2", - "apiKey": "" - } - } -} -``` +--- ### `docs` @@ -232,216 +177,145 @@ List of documentation sites to index. **Properties:** -- `title` (**required**): Title of the documentation site, displayed in dropdowns, etc. +- `name` (**required**): Name of the documentation site, displayed in dropdowns, etc. - `startUrl` (**required**): Start page for crawling - usually root or intro page for docs - `rootUrl`: Crawler will only index docs within this domain - pages that contain this URL -- `maxDepth`: Maximum depth for crawling. Default `3` - `favicon`: URL for site favicon (default is `/favicon.ico` from `startUrl`). Example -```json title="config.json (Deprecated)" -"docs": [ - { - "title": "Continue", - "startUrl": "https://docs.continue.dev/intro", - "rootUrl": "https://docs.continue.dev", - "faviconUrl": "https://docs.continue.dev/favicon.ico", - } -] +```yaml title="config.yaml" +docs: + - name: Continue + startUrl: https://docs.continue.dev/intro + rootUrl: https://docs.continue.dev + favicon: https://docs.continue.dev/favicon.ico ``` -### `slashCommands` +--- -Custom commands initiated by typing "/" in the sidebar. Commands include predefined functionality or may be user-defined. + -User-defined commands for prompt shortcuts in the sidebar, allowing quick access to common actions. +### `mcpServers` + + + +The [Model Context Protocol](https://modelcontextprotocol.io/introduction) is a standard proposed by Anthropic to unify prompts, context, and tool use. Continue supports any MCP server with the MCP context provider. **Properties:** -- `name`: The name of the custom command. -- `prompt`: Text prompt for the command. -- `description`: Brief description explaining the command's function. +- `name` (**required**): The name of the MCP server. +- `command` (**required**): The command used to start the server. +- `args`: An optional array of arguments for the command. +- `env`: An optional map of environment variables for the server process. -Example: +**Example:** -```json title="config.json (Deprecated)" -{ - "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" - } - ] -} +```yaml title="config.yaml" +mcpServers: + - name: My MCP Server + command: uvx + args: + - mcp-server-sqlite + - --db-path + - /Users/NAME/test.db ``` -### `contextProviders` + -Prevents generating summary titles for each chat session when set to `true`. +--- -### `ui` +## Complete YAML Config Example -Customizable UI settings to control interface appearance and behavior. +Putting it all together, here's a complete example of a `config.yaml` configuration file: -**Properties:** +```yaml title="config.yaml" +name: MyProject +version: 0.0.1 -- `codeBlockToolbarPosition`: Sets the toolbar position within code blocks, either `top` (default) or `bottom`. -- `fontSize`: Specifies font size for UI elements. -- `displayRawMarkdown`: If `true`, shows raw markdown in responses. -- `showChatScrollbar`: If `true`, enables a scrollbar in the chat window. -- `codeWrap`: If `true`, enables text wrapping in code blocks. +models: + - name: GPT-4 + provider: openai + model: gpt-4 + roles: + - chat + - edit + defaultCompletionOptions: + temperature: 0.5 + maxTokens: 2000 + requestOptions: + headers: + Authorization: Bearer YOUR_OPENAI_API_KEY -Example: + - name: Ollama Starcoder + provider: ollama + model: starcoder + roles: + - autocomplete + defaultCompletionOptions: + temperature: 0.3 + stop: + - "\n" -```json title="config.json (Deprecated)" -{ - "ui": { - "codeBlockToolbarPosition": "bottom", - "fontSize": 14, - "displayRawMarkdown": false, - "showChatScrollbar": false, - "codeWrap": false - } -} -``` - -### `allowAnonymousTelemetry` - -When `true`, anonymous usage data is collected using Posthog, to improve features. Default is `true`. - -### `userToken` - -An optional token that identifies the user, primarily for authenticated services. - -### `systemMessage` - -Defines a system message that appears before every response from the language model, providing guidance or context. - -### `disableIndexing` - -Prevents indexing of the codebase, useful primarily for debugging purposes. - -### `experimental` - -Several experimental config parameters are available, as described below: - -`experimental`: - -- `defaultContext`: Defines the default context for the LLM. Uses the same format as `contextProviders` but includes an additional `query` property to specify custom query parameters.= -- `modelRoles`: - - `inlineEdit`: Model title for inline edits. - - `applyCodeBlock`: Model title for applying code blocks. - - `repoMapFileSelection`: Model title for repo map selections. -- `readResponseTTS`: If `true`, reads LLM responses aloud with TTS. Default is `true`. -- `promptPath`: Change the path to custom prompt files from the default ".prompts" -- `quickActions`: Array of custom quick actions - - `title` (**required**): Display title for the quick action. - - `prompt` (**required**): Prompt for quick action. - - `sendToChat`: If `true`, sends result to chat; else inserts in document. Default is `false`. -- `contextMenuPrompts`: - - `comment`: Prompt for commenting code. - - `docstring`: Prompt for adding docstrings. - - `fix`: Prompt for fixing code. - - `optimize`: Prompt for optimizing code. -- `useChromiumForDocsCrawling`: Use Chromium to crawl docs locally. Useful if the default Cheerio crawler fails on sites that require JavaScript rendering. Downloads and installs Chromium to `~/.continue/.utils`.. -- `modelContextProtocolServers`: See [Model Context Protocol](/customize/context-providers#model-context-protocol) - -Example - -```json title="config.json (Deprecated)" -{ - "experimental": { - "modelRoles": { - "inlineEdit": "Edit Model" - }, - "promptPath": "custom/.prompts", - "quickActions": [ - { - "title": "Tags", - "prompt": "Return a list of any function and class names from the included code block", - "sendToChat": true - } - ], - "contextMenuPrompts": { - "fixGrammar": "Fix grammar in the above but allow for typos." - }, - "readResponseTTS": false, - "useChromiumForDocsCrawling": true, - "modelContextProtocolServers": [ - { - "transport": { - "type": "stdio", - "command": "uvx", - "args": ["mcp-server-sqlite", "--db-path", "/Users/NAME/test.db"] - } - } - ] - } -} +rules: + - Give concise responses + - Always assume TypeScript rather than JavaScript + +prompts: + - name: test + description: Unit test a function + prompt: | + Please write a complete suite of unit tests for this function. You should use the Jest testing framework. The tests should cover all possible edge cases and should be as thorough as possible. You should also include a description of each test case. + +context: + - uses: diff + - uses: file + - uses: codebase + - uses: code + - uses: docs + with: + startUrl: https://docs.example.com/introduction + rootUrl: https://docs.example.com + maxDepth: 3 + +mcpServers: + - name: DevServer + command: npm + args: + - run + - dev + env: + PORT: "3000" ``` diff --git a/docs/docs/troubleshooting.md b/docs/docs/troubleshooting.mdx similarity index 91% rename from docs/docs/troubleshooting.md rename to docs/docs/troubleshooting.mdx index f6aaffb38..3b2713323 100644 --- a/docs/docs/troubleshooting.md +++ b/docs/docs/troubleshooting.mdx @@ -4,6 +4,9 @@ description: Troubleshooting while waiting for help during beta / alpha testing keywords: [reload, delete, manually, logs, server, console] --- +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + The Continue VS Code extension is currently in beta, and the JetBrains extension is in Alpha. If you are having trouble, please follow the steps below. 1. [Check the logs](#check-the-logs) @@ -24,7 +27,9 @@ To solve many problems, the first step is reading the logs to find the relevant In order to view debug logs, which contain extra information, click the dropdown at the top that says "Default levels" and select "Verbose". ::: -1. cmd + shift + P for MacOS or ctrl + shift + P for Windows +1. cmd + shift + P for MacOS or ctrl + + shift + + P for 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 @@ -85,20 +90,31 @@ If your keyboard shortcuts are not resolving, you may have other commands that a 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: -```json title="config.json (Deprecated)" -{ - "models": [ - { - "title": "My Model", + + + ```yaml title="config.yaml" + models: + - name: My Model ... - "requestOptions": { - "caBundlePath": "/path/to/cert.pem" + requestOptions: + caBundlePath: /path/to/cert.pem + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "title": "My Model", + ... + "requestOptions": { + "caBundlePath": "/path/to/cert.pem" + } } - } - ], - ... -} -``` + ], + ... + ``` + + You may also set `requestOptions.caBundlePath` to an array of paths to multiple certificates. diff --git a/docs/docs/yaml-migration.md b/docs/docs/yaml-migration.md index a27e5d20d..f6a70bc64 100644 --- a/docs/docs/yaml-migration.md +++ b/docs/docs/yaml-migration.md @@ -11,8 +11,8 @@ Continue's YAML configuration format provides more readable, maintainable, consi See also - [Intro to YAML](https://yaml.org/) -- [JSON Continue Config Reference](/reference) -- [YAML Continue Config Reference](/yaml-reference) +- [JSON Continue Config Reference](/json-reference) +- [YAML Continue Config Reference](/reference) ## Create YAML file @@ -279,8 +279,6 @@ docs: ### MCP Servers - - **Properties:** - `name` (**required**): The name of the MCP server. diff --git a/docs/docs/yaml-reference.md b/docs/docs/yaml-reference.md deleted file mode 100644 index 4b3372f0c..000000000 --- a/docs/docs/yaml-reference.md +++ /dev/null @@ -1,321 +0,0 @@ ---- -title: Config YAML Reference -description: Reference for the Continue configuration YAML file -keywords: [config, yaml, configuration, customize, customization] ---- - -# Config YAML Reference - - - -Continue can be configured using a YAML file `config.yaml` which for local configuration can be placed in your global `.continue` folder (`~/.continue` on Mac, `%USERPROFILE%\.continue`) - -Below are details for each property that can be set in `config.yaml`. - -:::info -Config YAML does not work alongside `config.json` - it replaces it. View the **[Migration Guide](/yaml-migration)**. `config.yaml` currently only works in VS Code pre-release. -::: - -**All properties at all levels are optional unless explicitly marked as required.** - -## Properties - -The top-level properties in the `config.yaml` configuration file are: - -- [`name`](#name) (**required**) - -- [`version`](#version) (**required**) -- [`models`](#models) -- [`context`](#context) -- [`rules`](#rules) -- [`prompts`](#prompts) -- [`docs`](#docs) - - -- [`mcpServers`](#mcpservers) - ---- - -### `name` - -The `name` property specifies the name of your project or configuration. - -```yaml title="config.yaml" -name: MyProject -``` - -### `version` - -The `version` property specifies the version of your project or configuration. - ---- - -### `models` - -The `models` section defines the language models used in your configuration. Models are used for functionalities such as chat, editing, and summarizing. - -**Properties:** - -- `name` (**required**): A unique name to identify the model within your configuration. -- `provider` (**required**): The provider of the model (e.g., `openai`, `ollama`). -- `model` (**required**): The specific model name (e.g., `gpt-4`, `starcoder`). -- `roles`: An array specifying the roles this model can fulfill, such as `chat`, `autocomplete`, `embed`, `rerank`, `edit`, `apply`, `summarize`. -- `defaultCompletionOptions`: Default completion options for model settings. - - **Properties:** - - - `contextLength`: Maximum context length of the model, typically in tokens. - - `maxTokens`: Maximum number of tokens to generate in a completion. - - `temperature`: Controls the randomness of the completion. Values range from `0.0` (deterministic) to `1.0` (random). - - `topP`: The cumulative probability for nucleus sampling. - - `topK`: Maximum number of tokens considered at each step. - - `stop`: An array of stop tokens that will terminate the completion. - - `n`: Number of completions to generate. - -- `requestOptions`: HTTP request options specific to the model. - - **Properties:** - - - `timeout`: Timeout for each request to the language model. - - `verifySsl`: Whether to verify SSL certificates for requests. - - `caBundlePath`: Path to a custom CA bundle for HTTP requests. - - `proxy`: Proxy URL for HTTP requests. - - `headers`: Custom headers for HTTP requests. - - `extraBodyProperties`: Additional properties to merge with the HTTP request body. - - `noProxy`: List of hostnames that should bypass the specified proxy. - - `clientCertificate`: Client certificate for HTTP requests. - - `cert`: Path to the client certificate file. - - `key`: Path to the client certificate key file. - - `passphrase`: Optional passphrase for the client certificate key file. - -#### Example: - -```yaml title="config.yaml" -models: - - name: GPT-4o - provider: openai - model: gpt-4o - roles: - - chat - - edit - - apply - defaultCompletionOptions: - temperature: 0.7 - maxTokens: 1500 - - - name: Codestral - provider: mistral - model: codestral-latest - roles: - - autocomplete -``` - ---- - -### `context` - -The `context` section defines context providers, which supply additional information or context to the language models. Each context provider can be configured with specific parameters. - -More information about usage/params for each context provider can be found [here](/customize/context-providers) - -**Properties:** - -- `uses` (**required**): The identifier or name of the context provider (e.g., `code`, `docs`, `web`). -- `with`: Optional parameters to configure the context provider's behavior. - -**Example:** - -```yaml title="config.yaml" -context: - - uses: files - - uses: code - - uses: codebase - with: - nFinal: 10 - - uses: docs - - uses: diff - - uses: folder - - uses: terminal -``` - ---- - -### `rules` - -List of rules that the LLM should follow. These are inserted into the system message for all chat requests. - -Example - -```yaml title="config.yaml" -rules: - - Always annotate Python functions with their parameter and return types - - Always write Google style docstrings for functions and classes -``` - ---- - -### `prompts` - -A list of custom prompts that can be invoked from the chat window. Each prompt has a name, description, and the actual prompt text. - -```yaml title="config.yaml" -prompts: - - name: check - description: Check for mistakes in my code - prompt: | - Please read the highlighted code and check for any mistakes. You should look for the following, and be extremely vigilant: - - Syntax errors - - Logic errors - - Security vulnerabilities -``` - ---- - -### `docs` - -List of documentation sites to index. - -**Properties:** - -- `name` (**required**): Name of the documentation site, displayed in dropdowns, etc. -- `startUrl` (**required**): Start page for crawling - usually root or intro page for docs -- `rootUrl`: Crawler will only index docs within this domain - pages that contain this URL -- `favicon`: URL for site favicon (default is `/favicon.ico` from `startUrl`). - -Example - -```yaml title="config.yaml" -docs: - - name: Continue - startUrl: https://docs.continue.dev/intro - rootUrl: https://docs.continue.dev - favicon: https://docs.continue.dev/favicon.ico -``` - ---- - - - -### `mcpServers` - - - -The [Model Context Protocol](https://modelcontextprotocol.io/introduction) is a standard proposed by Anthropic to unify prompts, context, and tool use. Continue supports any MCP server with the MCP context provider. - -**Properties:** - -- `name` (**required**): The name of the MCP server. -- `command` (**required**): The command used to start the server. -- `args`: An optional array of arguments for the command. -- `env`: An optional map of environment variables for the server process. - -**Example:** - -```yaml title="config.yaml" -mcpServers: - - name: My MCP Server - command: uvx - args: - - mcp-server-sqlite - - --db-path - - /Users/NAME/test.db -``` - - - ---- - -## Complete YAML Config Example - -Putting it all together, here's a complete example of a `config.yaml` configuration file: - -```yaml title="config.yaml" -name: MyProject -version: 0.0.1 - -models: - - name: GPT-4 - provider: openai - model: gpt-4 - roles: - - chat - - edit - defaultCompletionOptions: - temperature: 0.5 - maxTokens: 2000 - requestOptions: - headers: - Authorization: Bearer YOUR_OPENAI_API_KEY - - - name: Ollama Starcoder - provider: ollama - model: starcoder - roles: - - autocomplete - defaultCompletionOptions: - temperature: 0.3 - stop: - - "\n" - -rules: - - Give concise responses - - Always assume TypeScript rather than JavaScript - -prompts: - - name: test - description: Unit test a function - prompt: | - Please write a complete suite of unit tests for this function. You should use the Jest testing framework. The tests should cover all possible edge cases and should be as thorough as possible. You should also include a description of each test case. - -context: - - uses: diff - - uses: file - - uses: codebase - - uses: code - - uses: docs - with: - startUrl: https://docs.example.com/introduction - rootUrl: https://docs.example.com - maxDepth: 3 - -mcpServers: - - name: DevServer - command: npm - args: - - run - - dev - env: - PORT: "3000" -``` diff --git a/docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/actions/how-to-customize.md b/docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/actions/how-to-customize.md index 2ffc4d0f2..aeadb68f8 100644 --- a/docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/actions/how-to-customize.md +++ b/docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/actions/how-to-customize.md @@ -7,7 +7,7 @@ sidebar_position: 5 ## 内置的斜杠命令 -Continue 有一个大的内置斜杠命令库,但是当你首次安装时,我们只显示最常用的一些,比如 "/edit", "/comment" 和 "/share" 。为了添加更多的 action ,你可以打开 [config.json](../reference.md) 并添加它们到 `slashCommands` 列表中。 +Continue 有一个大的内置斜杠命令库,但是当你首次安装时,我们只显示最常用的一些,比如 "/edit", "/comment" 和 "/share" 。为了添加更多的 action ,你可以打开 [config.json](../json-reference.md) 并添加它们到 `slashCommands` 列表中。 ## 定制斜杠命令 diff --git a/docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/autocomplete/how-to-customize.md b/docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/autocomplete/how-to-customize.md index 143645591..14a062a50 100644 --- a/docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/autocomplete/how-to-customize.md +++ b/docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/autocomplete/how-to-customize.md @@ -5,7 +5,7 @@ keywords: [定制] sidebar_position: 5 --- -Continue 在 [`config.json`](../reference.md) 提供少量的参数,对于你的特定需求和硬件能力,可以调整找到建议质量和系统性能之间的最佳平衡: +Continue 在 [`config.json`](../json-reference.md) 提供少量的参数,对于你的特定需求和硬件能力,可以调整找到建议质量和系统性能之间的最佳平衡: ```json title="config.json" "tabAutocompleteOptions": { diff --git a/docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/chat/context-selection.md b/docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/chat/context-selection.md index a52a5a3d7..301de5524 100644 --- a/docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/chat/context-selection.md +++ b/docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/chat/context-selection.md @@ -19,28 +19,28 @@ sidebar_position: 3 ## 指定文件 -你可以通过输入 [`@Files`](../customize/context-providers.md#file) 并选择文件,包含当前工作区中的指定文件作为上下文。 +你可以通过输入 [`@Files`](../customize/context-providers.mdx#file) 并选择文件,包含当前工作区中的指定文件作为上下文。 ## 指定目录 -你可以通过输入 [`@Folder`](../customize/context-providers.md#folder) 并选择目录,包含当前工作区中指定目录作为上下文。它像 [`@Codebase`](../customize/deep-dives/codebase.md) 一样工作,但是只包含指定目录中的文件。 +你可以通过输入 [`@Folder`](../customize/context-providers.mdx#folder) 并选择目录,包含当前工作区中指定目录作为上下文。它像 [`@Codebase`](../customize/deep-dives/codebase.md) 一样工作,但是只包含指定目录中的文件。 ## 整个代码库 -你可以通过输入 [`@Codebase`](../customize/context-providers.md#codebase) 包含整个代码库作为上下文。你可以 [在这里](../customize/deep-dives/codebase.md) 了解 `@Codebase` 是如何工作的。 +你可以通过输入 [`@Codebase`](../customize/context-providers.mdx#codebase) 包含整个代码库作为上下文。你可以 [在这里](../customize/deep-dives/codebase.md) 了解 `@Codebase` 是如何工作的。 ## 文档网址 -你可以通过输入 [`@Docs`](../customize/context-providers.md#docs) 并选择文档网址,包含文档网址作文上下文。你可以 [在这里](../customize/deep-dives/docs.md) 了解 `@Docs` 是如何工作的。 +你可以通过输入 [`@Docs`](../customize/context-providers.mdx#docs) 并选择文档网址,包含文档网址作文上下文。你可以 [在这里](../customize/deep-dives/docs.md) 了解 `@Docs` 是如何工作的。 ## 终端内容 -你可以通过输入 [`@Terminal`](../customize/context-providers.md#terminal) ,包含 IDE 中终端的内容作为上下文。 +你可以通过输入 [`@Terminal`](../customize/context-providers.mdx#terminal) ,包含 IDE 中终端的内容作为上下文。 ## Git diff -你可以通过输入 [`@Git Diff`](../customize/context-providers.md#git-diff) ,包含当前分支中你做的所有变更作为上下文。 +你可以通过输入 [`@Git Diff`](../customize/context-providers.mdx#git-diff) ,包含当前分支中你做的所有变更作为上下文。 ## 其他上下文 -你可以 [在这里](../customize/context-providers.md) 看到完整的内置上下文提供者列表,以及 [在这里](../customize/tutorials/build-your-own-context-provider.md) 看到如何创建你自己定制的上下文提供者。 +你可以 [在这里](../customize/context-providers.mdx) 看到完整的内置上下文提供者列表,以及 [在这里](../customize/tutorials/build-your-own-context-provider.md) 看到如何创建你自己定制的上下文提供者。 diff --git a/docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/chat/model-setup.mdx b/docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/chat/model-setup.mdx index cbbef8761..b6360c8d3 100644 --- a/docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/chat/model-setup.mdx +++ b/docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/chat/model-setup.mdx @@ -9,7 +9,7 @@ import Tabs from "@theme/Tabs"; import TabItem from "@theme/TabItem"; :::info -这个页面推荐聊天的模型和提供者。在 [这里](../reference.md) 了解更多关于如何设置你的 `config.json` 。 +这个页面推荐聊天的模型和提供者。在 [这里](../json-reference.md) 了解更多关于如何设置你的 `config.json` 。 ::: ## 最好的总体体验 diff --git a/docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/customize/deep-dives/autocomplete.md b/docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/customize/deep-dives/autocomplete.md index 15cb94c4d..b31de7a74 100644 --- a/docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/customize/deep-dives/autocomplete.md +++ b/docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/customize/deep-dives/autocomplete.md @@ -44,7 +44,7 @@ ollama run starcoder2:3b } ``` -如果你对可用选项不熟悉,你可以在 [这里](../../reference.md) 查找完整的参考。 +如果你对可用选项不熟悉,你可以在 [这里](../../json-reference.md) 查找完整的参考。 ## 配置选项 diff --git a/docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/customize/deep-dives/codebase.md b/docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/customize/deep-dives/codebase.md index eb55aa668..969e394a0 100644 --- a/docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/customize/deep-dives/codebase.md +++ b/docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/customize/deep-dives/codebase.md @@ -73,4 +73,4 @@ Continue 遵守 `.gitignore` 文件,为了确定哪些文件不需要索引。 ## 仓库 map -Claude 3, Llama 3.1, Gemini 1.5 和 GPT-4o 家族的模型在代码库检索时会自动地使用 [仓库 map](../context-providers.md#repository-map) ,允许模型理解你的代码库的结构,并使用它回答问题。当前,仓库 map 仅包含代码库中的文件路径。 +Claude 3, Llama 3.1, Gemini 1.5 和 GPT-4o 家族的模型在代码库检索时会自动地使用 [仓库 map](../context-providers.mdx#repository-map) ,允许模型理解你的代码库的结构,并使用它回答问题。当前,仓库 map 仅包含代码库中的文件路径。 diff --git a/docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/customize/deep-dives/prompt-files.md b/docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/customize/deep-dives/prompt-files.md index bbcd0d36b..b419231fe 100644 --- a/docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/customize/deep-dives/prompt-files.md +++ b/docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/customize/deep-dives/prompt-files.md @@ -79,7 +79,7 @@ Write unit tests for the above selected code, following each of these instructio ### 上下文提供者 -任何你添加到配置中的 [上下文提供者](../context-providers.md) ,可以使用上下文提供者的名称引用。接收输入的上下文提供者也支持。 +任何你添加到配置中的 [上下文提供者](../context-providers.mdx) ,可以使用上下文提供者的名称引用。接收输入的上下文提供者也支持。 - `{{{ terminal }}}` - 终端的内容 - `{{{ url "https://github.com/continuedev/continue" }}}` - URL 的内容 diff --git a/docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/customize/overview.md b/docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/customize/overview.md index 1c5d041e2..0d94978c1 100644 --- a/docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/customize/overview.md +++ b/docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/customize/overview.md @@ -8,13 +8,13 @@ Continue 可以深度定制。这个主要通过编辑位于 `~/.continue/config ## 开始 -要打开 `config.json` ,在 Continue 聊天侧边栏的右下角点击 "齿轮" 图标。当编辑这个文件时,你可以使用 IntelliSense ,随着你的输入来查看有效的选项,或者你可以查看 [完整参考](../reference.md) 。 +要打开 `config.json` ,在 Continue 聊天侧边栏的右下角点击 "齿轮" 图标。当编辑这个文件时,你可以使用 IntelliSense ,随着你的输入来查看有效的选项,或者你可以查看 [完整参考](../json-reference.md) 。 当你保存 `config.json` 时, Continue 会自动地刷新,应用你的变更。 ## 每个工作区的配置 -如果你想要限制指定的配置到一个特定的工作区,你可以添加一个 `.continuerc.json` 到你的项目根目录。它有和 `config.json` 相同的 [定义](../reference.md) ,会自动地应用到本地 `config.json` 之上。 +如果你想要限制指定的配置到一个特定的工作区,你可以添加一个 `.continuerc.json` 到你的项目根目录。它有和 `config.json` 相同的 [定义](../json-reference.md) ,会自动地应用到本地 `config.json` 之上。 ## 可编程的配置 diff --git a/docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/edit/model-setup.md b/docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/edit/model-setup.md index 07a0a6c65..f0db33bbc 100644 --- a/docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/edit/model-setup.md +++ b/docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/edit/model-setup.md @@ -7,4 +7,4 @@ keywords: [编辑, cmd l, 模型] 默认情况下,编辑使用 [与聊天相同的模型](../chat/model-setup.mdx) ,所以对于代码编辑,我们推荐相同的 400B+ 参数模型或者领先的模型之一。 -你可以通过更新你的 [`config.json`](../reference.md) 为编辑配置一个不同的模型。 +你可以通过更新你的 [`config.json`](../json-reference.md) 为编辑配置一个不同的模型。 diff --git a/docs/sidebars.js b/docs/sidebars.js index c5026b1ef..12b084cd8 100644 --- a/docs/sidebars.js +++ b/docs/sidebars.js @@ -138,11 +138,11 @@ const sidebars = { label: "Reference", href: "/reference", }, - // { - // type: "link", - // label: "YAML Reference", - // href: "/yaml-reference", - // }, + { + type: "link", + label: "JSON Reference", + href: "/json-reference", + }, // { // type: "link", // label: "YAML Migration", From 3b302d7023282fc2880af3d48ccfd1d28f242904 Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Fri, 17 Jan 2025 03:50:39 -0800 Subject: [PATCH 008/262] config yaml example -model providers p1 --- .../more/{SambaNova.md => SambaNova.mdx} | 3 + .../more/{asksage.md => asksage.mdx} | 5 +- .../more/{cerebras.md => cerebras.mdx} | 3 + .../more/{cloudflare.md => cloudflare.mdx} | 3 + .../more/{cohere.md => cohere.mdx} | 3 + .../more/{deepinfra.md => deepinfra.mdx} | 3 + .../more/{flowise.md => flowise.mdx} | 3 + .../more/{free-trial.md => free-trial.mdx} | 3 + ...nction-network.md => function-network.mdx} | 3 + .../more/{groq.md => groq.mdx} | 3 + ...enceapi.md => huggingfaceinferenceapi.mdx} | 3 + .../more/{ipex_llm.md => ipex_llm.mdx} | 3 + .../more/{kindo.md => kindo.mdx} | 3 + .../more/{llamacpp.md => llamacpp.mdx} | 3 + .../more/{llamafile.md => llamafile.mdx} | 3 + .../more/{lmstudio.md => lmstudio.mdx} | 3 + .../{moonshot.md => more/moonshot.mdx} | 3 + .../more/{msty.md => msty.mdx} | 3 + .../more/{nebius.md => nebius.mdx} | 3 + .../more/{novita.md => novita.mdx} | 3 + .../more/{nvidia.md => nvidia.mdx} | 5 +- .../more/{openrouter.md => openrouter.mdx} | 3 + .../{replicatellm.md => replicatellm.mdx} | 3 + .../more/{sagemaker.md => sagemaker.mdx} | 3 + .../more/{scaleway.md => scaleway.mdx} | 5 +- .../more/{siliconflow.md => siliconflow.mdx} | 5 +- .../{textgenwebui.md => textgenwebui.mdx} | 3 + .../more/{together.md => together.mdx} | 3 + .../more/{vllm.md => vllm.mdx} | 3 + .../more/{watsonx.md => watsonx.mdx} | 57 ++++++++++--------- .../top-level/{anthropic.md => anthropic.mdx} | 5 +- .../top-level/{azure.md => azure.mdx} | 3 + .../top-level/{vertexai.md => vertexai.mdx} | 5 +- .../top-level/{xAI.md => xAI.mdx} | 0 34 files changed, 125 insertions(+), 40 deletions(-) rename docs/docs/customize/model-providers/more/{SambaNova.md => SambaNova.mdx} (89%) rename docs/docs/customize/model-providers/more/{asksage.md => asksage.mdx} (97%) rename docs/docs/customize/model-providers/more/{cerebras.md => cerebras.mdx} (86%) rename docs/docs/customize/model-providers/more/{cloudflare.md => cloudflare.mdx} (95%) rename docs/docs/customize/model-providers/more/{cohere.md => cohere.mdx} (94%) rename docs/docs/customize/model-providers/more/{deepinfra.md => deepinfra.mdx} (91%) rename docs/docs/customize/model-providers/more/{flowise.md => flowise.mdx} (88%) rename docs/docs/customize/model-providers/more/{free-trial.md => free-trial.mdx} (95%) rename docs/docs/customize/model-providers/more/{function-network.md => function-network.mdx} (95%) rename docs/docs/customize/model-providers/more/{groq.md => groq.mdx} (85%) rename docs/docs/customize/model-providers/more/{huggingfaceinferenceapi.md => huggingfaceinferenceapi.mdx} (93%) rename docs/docs/customize/model-providers/more/{ipex_llm.md => ipex_llm.mdx} (95%) rename docs/docs/customize/model-providers/more/{kindo.md => kindo.mdx} (94%) rename docs/docs/customize/model-providers/more/{llamacpp.md => llamacpp.mdx} (89%) rename docs/docs/customize/model-providers/more/{llamafile.md => llamafile.mdx} (86%) rename docs/docs/customize/model-providers/more/{lmstudio.md => lmstudio.mdx} (94%) rename docs/docs/customize/model-providers/{moonshot.md => more/moonshot.mdx} (95%) rename docs/docs/customize/model-providers/more/{msty.md => msty.mdx} (97%) rename docs/docs/customize/model-providers/more/{nebius.md => nebius.mdx} (91%) rename docs/docs/customize/model-providers/more/{novita.md => novita.mdx} (95%) rename docs/docs/customize/model-providers/more/{nvidia.md => nvidia.mdx} (94%) rename docs/docs/customize/model-providers/more/{openrouter.md => openrouter.mdx} (94%) rename docs/docs/customize/model-providers/more/{replicatellm.md => replicatellm.mdx} (92%) rename docs/docs/customize/model-providers/more/{sagemaker.md => sagemaker.mdx} (94%) rename docs/docs/customize/model-providers/more/{scaleway.md => scaleway.mdx} (95%) rename docs/docs/customize/model-providers/more/{siliconflow.md => siliconflow.mdx} (93%) rename docs/docs/customize/model-providers/more/{textgenwebui.md => textgenwebui.mdx} (86%) rename docs/docs/customize/model-providers/more/{together.md => together.mdx} (90%) rename docs/docs/customize/model-providers/more/{vllm.md => vllm.mdx} (96%) rename docs/docs/customize/model-providers/more/{watsonx.md => watsonx.mdx} (73%) rename docs/docs/customize/model-providers/top-level/{anthropic.md => anthropic.mdx} (95%) rename docs/docs/customize/model-providers/top-level/{azure.md => azure.mdx} (97%) rename docs/docs/customize/model-providers/top-level/{vertexai.md => vertexai.mdx} (95%) rename docs/docs/customize/model-providers/top-level/{xAI.md => xAI.mdx} (100%) diff --git a/docs/docs/customize/model-providers/more/SambaNova.md b/docs/docs/customize/model-providers/more/SambaNova.mdx similarity index 89% rename from docs/docs/customize/model-providers/more/SambaNova.md rename to docs/docs/customize/model-providers/more/SambaNova.mdx index ab1e7238d..ffaf4b53d 100644 --- a/docs/docs/customize/model-providers/more/SambaNova.md +++ b/docs/docs/customize/model-providers/more/SambaNova.mdx @@ -1,3 +1,6 @@ +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + # SambaNova Cloud The SambaNova Cloud is a cloud platform for running large AI models with the world record Llama 3.1 70B/405B performance. You can follow the instructions in [this blog post](https://sambanova.ai/blog/accelerating-coding-with-sambanova-cloud?ref=blog.continue.dev) to configure your setup. diff --git a/docs/docs/customize/model-providers/more/asksage.md b/docs/docs/customize/model-providers/more/asksage.mdx similarity index 97% rename from docs/docs/customize/model-providers/more/asksage.md rename to docs/docs/customize/model-providers/more/asksage.mdx index a4445ba77..fcccdd750 100644 --- a/docs/docs/customize/model-providers/more/asksage.md +++ b/docs/docs/customize/model-providers/more/asksage.mdx @@ -1,9 +1,10 @@ # Ask Sage +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + :::info - To get an Ask Sage API key login to the Ask Sage platform (If you don't have an account, you can create one [here](https://chat.asksage.ai/)) and follow the instructions in the Ask Sage Docs:[Ask Sage API Key](https://docs.asksage.ai/docs/api-documentation/api-documentation.html) - ::: ## Configuration diff --git a/docs/docs/customize/model-providers/more/cerebras.md b/docs/docs/customize/model-providers/more/cerebras.mdx similarity index 86% rename from docs/docs/customize/model-providers/more/cerebras.md rename to docs/docs/customize/model-providers/more/cerebras.mdx index 1fdc040ed..f9ccb88cc 100644 --- a/docs/docs/customize/model-providers/more/cerebras.md +++ b/docs/docs/customize/model-providers/more/cerebras.mdx @@ -1,5 +1,8 @@ # Cerebras Inference +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + Cerebras Inference uses specialized silicon to provides fast inference. 1. Create an account in the portal [here](https://cloud.cerebras.ai/). diff --git a/docs/docs/customize/model-providers/more/cloudflare.md b/docs/docs/customize/model-providers/more/cloudflare.mdx similarity index 95% rename from docs/docs/customize/model-providers/more/cloudflare.md rename to docs/docs/customize/model-providers/more/cloudflare.mdx index fb355704b..7d3058548 100644 --- a/docs/docs/customize/model-providers/more/cloudflare.md +++ b/docs/docs/customize/model-providers/more/cloudflare.mdx @@ -1,3 +1,6 @@ +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + # Cloudflare Workers AI Cloudflare Workers AI can be used for both chat and tab autocompletion in Continue. To setup Cloudflare Workers AI, add the following to your `config.json` file: diff --git a/docs/docs/customize/model-providers/more/cohere.md b/docs/docs/customize/model-providers/more/cohere.mdx similarity index 94% rename from docs/docs/customize/model-providers/more/cohere.md rename to docs/docs/customize/model-providers/more/cohere.mdx index 4e2309e4f..dcdd39b01 100644 --- a/docs/docs/customize/model-providers/more/cohere.md +++ b/docs/docs/customize/model-providers/more/cohere.mdx @@ -1,3 +1,6 @@ +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + # Cohere Before using Cohere, visit the [Cohere dashboard](https://dashboard.cohere.com/api-keys) to create an API key. diff --git a/docs/docs/customize/model-providers/more/deepinfra.md b/docs/docs/customize/model-providers/more/deepinfra.mdx similarity index 91% rename from docs/docs/customize/model-providers/more/deepinfra.md rename to docs/docs/customize/model-providers/more/deepinfra.mdx index 0c31466e4..418ff15f9 100644 --- a/docs/docs/customize/model-providers/more/deepinfra.md +++ b/docs/docs/customize/model-providers/more/deepinfra.mdx @@ -1,3 +1,6 @@ +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + # DeepInfra [DeepInfra](https://deepinfra.com) provides inference for open-source models at very low cost. To get started with DeepInfra, obtain your API key [here](https://deepinfra.com/dash). Then, find the model you want to use [here](https://deepinfra.com/models?type=text-generation) and copy the name of the model. Continue can then be configured to use the `DeepInfra` LLM class, like the example here: diff --git a/docs/docs/customize/model-providers/more/flowise.md b/docs/docs/customize/model-providers/more/flowise.mdx similarity index 88% rename from docs/docs/customize/model-providers/more/flowise.md rename to docs/docs/customize/model-providers/more/flowise.mdx index 8302f0936..91516ee12 100644 --- a/docs/docs/customize/model-providers/more/flowise.md +++ b/docs/docs/customize/model-providers/more/flowise.mdx @@ -1,3 +1,6 @@ +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + # Flowise [Flowise](https://flowiseai.com/) is a low-code/no-code drag & drop tool with the aim to make it easy for people to visualize and build LLM apps. Continue can then be configured to use the `Flowise` LLM class, like the example here: diff --git a/docs/docs/customize/model-providers/more/free-trial.md b/docs/docs/customize/model-providers/more/free-trial.mdx similarity index 95% rename from docs/docs/customize/model-providers/more/free-trial.md rename to docs/docs/customize/model-providers/more/free-trial.mdx index a51d2e61c..b5fd710f8 100644 --- a/docs/docs/customize/model-providers/more/free-trial.md +++ b/docs/docs/customize/model-providers/more/free-trial.mdx @@ -3,6 +3,9 @@ title: Free Trial slug: ../free-trial --- +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + The `"free-trial"` provider lets new users quickly try out the best experience in Continue using our API keys through a secure proxy server. To prevent abuse, we will ask you to sign in with GitHub, which you can read more about below. While the Continue extension is always free to use, we cannot support infinite free LLM usage for all of our users. You will eventually need to either: diff --git a/docs/docs/customize/model-providers/more/function-network.md b/docs/docs/customize/model-providers/more/function-network.mdx similarity index 95% rename from docs/docs/customize/model-providers/more/function-network.md rename to docs/docs/customize/model-providers/more/function-network.mdx index 5c9ee3b40..b48f80f97 100644 --- a/docs/docs/customize/model-providers/more/function-network.md +++ b/docs/docs/customize/model-providers/more/function-network.mdx @@ -3,6 +3,9 @@ title: Function Network slug: ../function-network --- +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + # Function Network > Private, Affordable User-Owned AI diff --git a/docs/docs/customize/model-providers/more/groq.md b/docs/docs/customize/model-providers/more/groq.mdx similarity index 85% rename from docs/docs/customize/model-providers/more/groq.md rename to docs/docs/customize/model-providers/more/groq.mdx index ab8a7e278..13f9bbc87 100644 --- a/docs/docs/customize/model-providers/more/groq.md +++ b/docs/docs/customize/model-providers/more/groq.mdx @@ -1,3 +1,6 @@ +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + # Groq Groq provides the fastest available inference for open-source language models, including the entire Llama 3.1 family. diff --git a/docs/docs/customize/model-providers/more/huggingfaceinferenceapi.md b/docs/docs/customize/model-providers/more/huggingfaceinferenceapi.mdx similarity index 93% rename from docs/docs/customize/model-providers/more/huggingfaceinferenceapi.md rename to docs/docs/customize/model-providers/more/huggingfaceinferenceapi.mdx index 76f0d6f3b..516cc15b6 100644 --- a/docs/docs/customize/model-providers/more/huggingfaceinferenceapi.md +++ b/docs/docs/customize/model-providers/more/huggingfaceinferenceapi.mdx @@ -1,3 +1,6 @@ +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + # HuggingFace Inference Endpoints Hugging Face Inference Endpoints are an easy way to setup instances of open-source language models on any cloud. Sign up for an account and add billing [here](https://huggingface.co/settings/billing), access the Inference Endpoints [here](https://ui.endpoints.huggingface.co), click on “New endpoint”, and fill out the form (e.g. select a model like [WizardCoder-Python-34B-V1.0](https://huggingface.co/WizardLM/WizardCoder-Python-34B-V1.0)), and then deploy your model by clicking “Create Endpoint”. Change `~/.continue/config.json` to look like this: diff --git a/docs/docs/customize/model-providers/more/ipex_llm.md b/docs/docs/customize/model-providers/more/ipex_llm.mdx similarity index 95% rename from docs/docs/customize/model-providers/more/ipex_llm.md rename to docs/docs/customize/model-providers/more/ipex_llm.mdx index 60c3a792a..c711a81ac 100644 --- a/docs/docs/customize/model-providers/more/ipex_llm.md +++ b/docs/docs/customize/model-providers/more/ipex_llm.mdx @@ -1,3 +1,6 @@ +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + # IPEX-LLM :::info diff --git a/docs/docs/customize/model-providers/more/kindo.md b/docs/docs/customize/model-providers/more/kindo.mdx similarity index 94% rename from docs/docs/customize/model-providers/more/kindo.md rename to docs/docs/customize/model-providers/more/kindo.mdx index a324cf2f0..745ec3019 100644 --- a/docs/docs/customize/model-providers/more/kindo.md +++ b/docs/docs/customize/model-providers/more/kindo.mdx @@ -1,3 +1,6 @@ +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + # Kindo Kindo offers centralized control over your organization's AI operations, ensuring data protection and compliance with internal policies while supporting various commercial and open-source models. To get started, sign up [here](https://app.kindo.ai/), create an API key in [Settings > API > API Keys](https://app.kindo.ai/settings/api), and choose a model from the list of supported models in the "Available Models" tab or copy and paste the config in [Plugins > Your Configuration](https://app.kindo.ai/plugins). diff --git a/docs/docs/customize/model-providers/more/llamacpp.md b/docs/docs/customize/model-providers/more/llamacpp.mdx similarity index 89% rename from docs/docs/customize/model-providers/more/llamacpp.md rename to docs/docs/customize/model-providers/more/llamacpp.mdx index e1534c651..12f2264d8 100644 --- a/docs/docs/customize/model-providers/more/llamacpp.md +++ b/docs/docs/customize/model-providers/more/llamacpp.mdx @@ -1,3 +1,6 @@ +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + # LlamaCpp Run the llama.cpp server binary to start the API server. If running on a remote server, be sure to set host to 0.0.0.0: diff --git a/docs/docs/customize/model-providers/more/llamafile.md b/docs/docs/customize/model-providers/more/llamafile.mdx similarity index 86% rename from docs/docs/customize/model-providers/more/llamafile.md rename to docs/docs/customize/model-providers/more/llamafile.mdx index b11870624..58df64c23 100644 --- a/docs/docs/customize/model-providers/more/llamafile.md +++ b/docs/docs/customize/model-providers/more/llamafile.mdx @@ -1,3 +1,6 @@ +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + # Llamafile A [llamafile](https://github.com/Mozilla-Ocho/llamafile#readme) is a self-contained binary that can run an open-source LLM. You can configure this provider in your config.json as follows: diff --git a/docs/docs/customize/model-providers/more/lmstudio.md b/docs/docs/customize/model-providers/more/lmstudio.mdx similarity index 94% rename from docs/docs/customize/model-providers/more/lmstudio.md rename to docs/docs/customize/model-providers/more/lmstudio.mdx index 19114c217..6bca26aa9 100644 --- a/docs/docs/customize/model-providers/more/lmstudio.md +++ b/docs/docs/customize/model-providers/more/lmstudio.mdx @@ -1,3 +1,6 @@ +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + # LM Studio [LM Studio](https://lmstudio.ai) is an application for Mac, Windows, and Linux that makes it easy to locally run open-source models and comes with a great UI. To get started with LM Studio, download from the website, use the UI to download a model, and then start the local inference server. Continue can then be configured to use the `LMStudio` LLM class: diff --git a/docs/docs/customize/model-providers/moonshot.md b/docs/docs/customize/model-providers/more/moonshot.mdx similarity index 95% rename from docs/docs/customize/model-providers/moonshot.md rename to docs/docs/customize/model-providers/more/moonshot.mdx index c182cf4dd..0a6f5381e 100644 --- a/docs/docs/customize/model-providers/moonshot.md +++ b/docs/docs/customize/model-providers/more/moonshot.mdx @@ -1,3 +1,6 @@ +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + # Moonshot [Moonshot AI](https://platform.moonshot.cn/) provides high-quality large language model services with competitive pricing and excellent performance. diff --git a/docs/docs/customize/model-providers/more/msty.md b/docs/docs/customize/model-providers/more/msty.mdx similarity index 97% rename from docs/docs/customize/model-providers/more/msty.md rename to docs/docs/customize/model-providers/more/msty.mdx index ce930ace3..77d9a1056 100644 --- a/docs/docs/customize/model-providers/more/msty.md +++ b/docs/docs/customize/model-providers/more/msty.mdx @@ -1,3 +1,6 @@ +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + # Msty [Msty](https://msty.app/) is an application for Windows, Mac, and Linux that makes it really easy to run online as well as local open-source models, including Llama-2, DeepSeek Coder, etc. No need to fidget with your terminal, run a command, or anything. Just download the app from the website, click a button, and you are up and running. Continue can then be configured to use the `Msty` LLM class: diff --git a/docs/docs/customize/model-providers/more/nebius.md b/docs/docs/customize/model-providers/more/nebius.mdx similarity index 91% rename from docs/docs/customize/model-providers/more/nebius.md rename to docs/docs/customize/model-providers/more/nebius.mdx index 92bc6a997..ec32edd23 100644 --- a/docs/docs/customize/model-providers/more/nebius.md +++ b/docs/docs/customize/model-providers/more/nebius.mdx @@ -1,3 +1,6 @@ +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + # Nebius AI Studio You can get an API key from the [Nebius AI Studio API keys page](https://studio.nebius.ai/settings/api-keys) diff --git a/docs/docs/customize/model-providers/more/novita.md b/docs/docs/customize/model-providers/more/novita.mdx similarity index 95% rename from docs/docs/customize/model-providers/more/novita.md rename to docs/docs/customize/model-providers/more/novita.mdx index 5b829bf91..799a4cf62 100644 --- a/docs/docs/customize/model-providers/more/novita.md +++ b/docs/docs/customize/model-providers/more/novita.mdx @@ -1,3 +1,6 @@ +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + # Novita [Novita AI](https://novita.ai?utm_source=github_continuedev&utm_medium=github_readme&utm_campaign=github_link) offers an affordable, reliable, and simple inference platform with scalable [LLM API](https://novita.ai/docs/model-api/reference/introduction.html), empowering developers to build AI applications. Try the [Novita AI Llama 3 API Demo](https://novita.ai/model-api/product/llm-api/playground/meta-llama-llama-3.1-70b-instruct?utm_source=github_continuedev&utm_medium=github_readme&utm_campaign=github_link) today!. You can sign up [here](https://novita.ai/user/login?&redirect=/&utm_source=github_continuedev&utm_medium=github_readme&utm_campaign=github_link), copy your API key on the [Key Management](https://novita.ai/settings/key-management?utm_source=github_continuedev&utm_medium=github_readme&utm_campaign=github_link), and then hit the play button on any model from the [Novita AI Models list](https://novita.ai/llm-api?utm_source=github_continuedev&utm_medium=github_readme&utm_campaign=github_link). Change `~/.continue/config.json` to look like this: diff --git a/docs/docs/customize/model-providers/more/nvidia.md b/docs/docs/customize/model-providers/more/nvidia.mdx similarity index 94% rename from docs/docs/customize/model-providers/more/nvidia.md rename to docs/docs/customize/model-providers/more/nvidia.mdx index 89e2136e8..fde522cea 100644 --- a/docs/docs/customize/model-providers/more/nvidia.md +++ b/docs/docs/customize/model-providers/more/nvidia.mdx @@ -2,10 +2,11 @@ title: NVIDIA --- +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + :::info - [View the docs](https://docs.nvidia.com/nim/large-language-models/latest/getting-started.html#option-1-from-api-catalog) to learn how to get an API key. - ::: ## Chat model diff --git a/docs/docs/customize/model-providers/more/openrouter.md b/docs/docs/customize/model-providers/more/openrouter.mdx similarity index 94% rename from docs/docs/customize/model-providers/more/openrouter.md rename to docs/docs/customize/model-providers/more/openrouter.mdx index bfd86ec69..7f01c463a 100644 --- a/docs/docs/customize/model-providers/more/openrouter.md +++ b/docs/docs/customize/model-providers/more/openrouter.mdx @@ -1,3 +1,6 @@ +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + # OpenRouter OpenRouter is a unified interface for commercial and open-source models, giving you access to the best models at the best prices. You can sign up [here](https://openrouter.ai/signup), create your API key on the [keys page](https://openrouter.ai/keys), and then choose a model from the [list of supported models](https://openrouter.ai/models). diff --git a/docs/docs/customize/model-providers/more/replicatellm.md b/docs/docs/customize/model-providers/more/replicatellm.mdx similarity index 92% rename from docs/docs/customize/model-providers/more/replicatellm.md rename to docs/docs/customize/model-providers/more/replicatellm.mdx index 34c72e010..c87b152a3 100644 --- a/docs/docs/customize/model-providers/more/replicatellm.md +++ b/docs/docs/customize/model-providers/more/replicatellm.mdx @@ -1,3 +1,6 @@ +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + # ReplicateLLM Replicate is a great option for newly released language models or models that you've deployed through their platform. Sign up for an account [here](https://replicate.ai/), copy your API key, and then select any model from the [Replicate Streaming List](https://replicate.com/collections/streaming-language-models). Change `~/.continue/config.json` to look like this: diff --git a/docs/docs/customize/model-providers/more/sagemaker.md b/docs/docs/customize/model-providers/more/sagemaker.mdx similarity index 94% rename from docs/docs/customize/model-providers/more/sagemaker.md rename to docs/docs/customize/model-providers/more/sagemaker.mdx index a7b82c353..c39b5bc7f 100644 --- a/docs/docs/customize/model-providers/more/sagemaker.md +++ b/docs/docs/customize/model-providers/more/sagemaker.mdx @@ -1,3 +1,6 @@ +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + # AWS SageMaker SageMaker can be used for both chat and embedding models. Chat models are supported for endpoints deployed with [LMI](https://docs.djl.ai/docs/serving/serving/docs/lmi/index.html), and embedding models are supported for endpoints deployed with [HuggingFace TEI](https://huggingface.co/blog/sagemaker-huggingface-embedding) diff --git a/docs/docs/customize/model-providers/more/scaleway.md b/docs/docs/customize/model-providers/more/scaleway.mdx similarity index 95% rename from docs/docs/customize/model-providers/more/scaleway.md rename to docs/docs/customize/model-providers/more/scaleway.mdx index dce234f49..3f0d8ac54 100644 --- a/docs/docs/customize/model-providers/more/scaleway.md +++ b/docs/docs/customize/model-providers/more/scaleway.mdx @@ -2,12 +2,13 @@ title: Scaleway --- -:::info +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; +:::info Scaleway Generative APIs give you instant access to leading AI models hosted in European data centers, ideal for developers requiring low latency, full data privacy, and compliance with EU AI Act. You can generate your API key in [Scaleway's console](https://console.scaleway.com/generative-api/models). Read the [quickstart documentation here](https://www.scaleway.com/en/docs/ai-data/generative-apis/quickstart/). - ::: ## Chat model diff --git a/docs/docs/customize/model-providers/more/siliconflow.md b/docs/docs/customize/model-providers/more/siliconflow.mdx similarity index 93% rename from docs/docs/customize/model-providers/more/siliconflow.md rename to docs/docs/customize/model-providers/more/siliconflow.mdx index 96c7a90df..d5814d567 100644 --- a/docs/docs/customize/model-providers/more/siliconflow.md +++ b/docs/docs/customize/model-providers/more/siliconflow.mdx @@ -2,10 +2,11 @@ title: SiliconFlow --- +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + :::info - You can get an API key from the [Silicon Cloud](https://cloud.siliconflow.cn/account/ak). - ::: ## Chat model diff --git a/docs/docs/customize/model-providers/more/textgenwebui.md b/docs/docs/customize/model-providers/more/textgenwebui.mdx similarity index 86% rename from docs/docs/customize/model-providers/more/textgenwebui.md rename to docs/docs/customize/model-providers/more/textgenwebui.mdx index 66ea07268..ea9c626b5 100644 --- a/docs/docs/customize/model-providers/more/textgenwebui.md +++ b/docs/docs/customize/model-providers/more/textgenwebui.mdx @@ -1,3 +1,6 @@ +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + # TextGenWebUI TextGenWebUI is a comprehensive, open-source language model UI and local server. You can set it up with an OpenAI-compatible server plugin, and then configure it in your `config.json` like this: diff --git a/docs/docs/customize/model-providers/more/together.md b/docs/docs/customize/model-providers/more/together.mdx similarity index 90% rename from docs/docs/customize/model-providers/more/together.md rename to docs/docs/customize/model-providers/more/together.mdx index 9025c50b1..8cab190da 100644 --- a/docs/docs/customize/model-providers/more/together.md +++ b/docs/docs/customize/model-providers/more/together.mdx @@ -1,3 +1,6 @@ +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + # Together The Together API is a cloud platform for running large AI models. You can sign up [here](https://api.together.xyz/signup), copy your API key on the initial welcome screen, and then hit the play button on any model from the [Together Models list](https://docs.together.ai/docs/serverless-models). Change `~/.continue/config.json` to look like this: diff --git a/docs/docs/customize/model-providers/more/vllm.md b/docs/docs/customize/model-providers/more/vllm.mdx similarity index 96% rename from docs/docs/customize/model-providers/more/vllm.md rename to docs/docs/customize/model-providers/more/vllm.mdx index 45daa168e..3bbf89707 100644 --- a/docs/docs/customize/model-providers/more/vllm.md +++ b/docs/docs/customize/model-providers/more/vllm.mdx @@ -1,3 +1,6 @@ +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + # vLLM vLLM is an open-source library for fast LLM inference which typically is used to serve multiple users at the same. It can also be used to run a large model on multiple GPU:s (e.g. when it doesn´t fit in a single GPU). Run their OpenAI-compatible server using `vllm serve`. See their [server documentation](https://docs.vllm.ai/en/latest/serving/openai_compatible_server.html) and the [engine arguments documentation](https://docs.vllm.ai/en/latest/usage/engine_args.html). diff --git a/docs/docs/customize/model-providers/more/watsonx.md b/docs/docs/customize/model-providers/more/watsonx.mdx similarity index 73% rename from docs/docs/customize/model-providers/more/watsonx.md rename to docs/docs/customize/model-providers/more/watsonx.mdx index eeeb6073f..428e7f0d3 100644 --- a/docs/docs/customize/model-providers/more/watsonx.md +++ b/docs/docs/customize/model-providers/more/watsonx.mdx @@ -1,3 +1,6 @@ +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + # IBM watsonx watsonx, developed by IBM, offers a variety of pre-trained AI foundation models that can be used for natural language processing (NLP), computer vision, and speech recognition tasks. @@ -21,20 +24,20 @@ To authenticate to watsonx.ai SaaS with Continue, you will need to create a proj To authenticate to your watsonx.ai Software instance with Continue, you can use either `username/password` or `ZenApiKey` method: 1. _Option 1_ (Recommended): using `ZenApiKey` authentication: - - Set **apiBase** to your watsonx software endpoint, e.g. `https://cpd-watsonx.apps.example.com`. - - Set **projectId** to your watsonx project ID. - - Set **apiKey** to your watsonx Zen API Key. To generate it: - 1. Log in to the CPD web client. - 2. From the toolbar, click your avatar. - 3. Click **Profile and settings**. - 4. Click **API key** > **Generate new key**. - 5. Click **Generate**. - 6. Click **Copy** and save your key somewhere safe. You cannot recover this key if you lose it. - 7. Generate your ZenApiKey by running the following command in your preferred terminal: `echo ":" | base64`, replacing `` with your CPD username and `` with the API Key you just created. + - Set **apiBase** to your watsonx software endpoint, e.g. `https://cpd-watsonx.apps.example.com`. + - Set **projectId** to your watsonx project ID. + - Set **apiKey** to your watsonx Zen API Key. To generate it: + 1. Log in to the CPD web client. + 2. From the toolbar, click your avatar. + 3. Click **Profile and settings**. + 4. Click **API key** > **Generate new key**. + 5. Click **Generate**. + 6. Click **Copy** and save your key somewhere safe. You cannot recover this key if you lose it. + 7. Generate your ZenApiKey by running the following command in your preferred terminal: `echo ":" | base64`, replacing `` with your CPD username and `` with the API Key you just created. 2. _Option 2_: using `username/password` authentication: - - Set **apiBase** to your watsonx software endpoint, e.g. `https://cpd-watsonx.apps.example.com`. - - Set **projectId** to your watsonx project ID. - - Set **API Key** to your watsonx Username and Password using `username:password` as format. + - Set **apiBase** to your watsonx software endpoint, e.g. `https://cpd-watsonx.apps.example.com`. + - Set **projectId** to your watsonx project ID. + - Set **API Key** to your watsonx Username and Password using `username:password` as format. ## Configuration @@ -58,7 +61,6 @@ Add the following configuration to your `config.json` file to use the watsonx pr `apiVersion` is optional and defaults to the latest version. - If you are using a custom deployment endpoint, set `deploymentID` to the model's deployment ID. You can find it in the watsonx.ai Prompt Lab UI by selecting the corresponding model and opening the `` tab on the right, which will display the endpoint's URL containing the deployment ID. ```json title="~/.continue/config.json" @@ -101,10 +103,7 @@ You can also configure generation parameters, such as temperature, topP, topK, f "topK": 20, "maxTokens": 2000, "frequencyPenalty": 1.1, - "stop": [ - "Question:", - "\n\n\n" - ] + "stop": ["Question:", "\n\n\n"] } } ] @@ -114,24 +113,26 @@ You can also configure generation parameters, such as temperature, topP, topK, f ## Tab Auto Complete Model Granite models are recommended for tab auto complete. The configuration is similar to that of the chat models: + ```json title="~/.continue/config.json" { - "tabAutocompleteModel": { - "model": "ibm/granite-8b-code-instruct", - "title": "Granite Code 8b", - "provider": "watsonx", - "apiBase": "watsonx endpoint e.g. https://us-south.ml.cloud.ibm.com", - "projectId": "PROJECT_ID", - "apiKey": "API_KEY/ZENAPI_KEY/USERNAME:PASSWORD", - "apiVersion": "2024-03-14", - "contextLength": 4000 - } + "tabAutocompleteModel": { + "model": "ibm/granite-8b-code-instruct", + "title": "Granite Code 8b", + "provider": "watsonx", + "apiBase": "watsonx endpoint e.g. https://us-south.ml.cloud.ibm.com", + "projectId": "PROJECT_ID", + "apiKey": "API_KEY/ZENAPI_KEY/USERNAME:PASSWORD", + "apiVersion": "2024-03-14", + "contextLength": 4000 + } } ``` ## Embeddings Model To view the list of available embeddings models, visit [this page](https://dataplatform.cloud.ibm.com/docs/content/wsj/analyze-data/fm-models-embed.html?context=wx&pos=2#ibm-provided). + ```json title="~/.continue/config.json { "embeddingsProvider": { diff --git a/docs/docs/customize/model-providers/top-level/anthropic.md b/docs/docs/customize/model-providers/top-level/anthropic.mdx similarity index 95% rename from docs/docs/customize/model-providers/top-level/anthropic.md rename to docs/docs/customize/model-providers/top-level/anthropic.mdx index a7fa42888..8ef4ebb64 100644 --- a/docs/docs/customize/model-providers/top-level/anthropic.md +++ b/docs/docs/customize/model-providers/top-level/anthropic.mdx @@ -3,10 +3,11 @@ title: Anthropic slug: ../anthropic --- +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + :::info - You can get an API key from the [Anthropic console](https://console.anthropic.com/account/keys). - ::: ## Chat model diff --git a/docs/docs/customize/model-providers/top-level/azure.md b/docs/docs/customize/model-providers/top-level/azure.mdx similarity index 97% rename from docs/docs/customize/model-providers/top-level/azure.md rename to docs/docs/customize/model-providers/top-level/azure.mdx index 02cfcdd0d..111460b73 100644 --- a/docs/docs/customize/model-providers/top-level/azure.md +++ b/docs/docs/customize/model-providers/top-level/azure.mdx @@ -3,6 +3,9 @@ title: Azure AI Foundry slug: ../azure --- +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + Azure AI Foundry is a cloud-based service that provides access to models from OpenAI, Mistral AI, and others, integrated with the security and enterprise features of the Microsoft Azure platform. To get started, create an Azure AI Foundry resource in the [Azure portal](https://portal.azure.com). :::info diff --git a/docs/docs/customize/model-providers/top-level/vertexai.md b/docs/docs/customize/model-providers/top-level/vertexai.mdx similarity index 95% rename from docs/docs/customize/model-providers/top-level/vertexai.md rename to docs/docs/customize/model-providers/top-level/vertexai.mdx index a02609f35..5f5eb4fb7 100644 --- a/docs/docs/customize/model-providers/top-level/vertexai.md +++ b/docs/docs/customize/model-providers/top-level/vertexai.mdx @@ -3,10 +3,11 @@ title: Vertex AI slug: ../vertexai --- +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + :::info - You need to enable the [Vertex AI API](https://console.cloud.google.com/marketplace/product/google/aiplatform.googleapis.com) and set up the [Google Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc). - ::: ## Chat model diff --git a/docs/docs/customize/model-providers/top-level/xAI.md b/docs/docs/customize/model-providers/top-level/xAI.mdx similarity index 100% rename from docs/docs/customize/model-providers/top-level/xAI.md rename to docs/docs/customize/model-providers/top-level/xAI.mdx From f046f8bd4d106d76b43645ddc10e784bda74a639 Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Fri, 17 Jan 2025 10:08:30 -0800 Subject: [PATCH 009/262] model provider yaml examples continued --- .../more/huggingfaceinferenceapi.mdx | 38 +++-- .../model-providers/more/together.mdx | 35 ++-- .../model-providers/top-level/deepseek.mdx | 70 +++++--- .../model-providers/top-level/vertexai.mdx | 108 ++++++++---- .../model-providers/top-level/xAI.mdx | 40 +++-- .../{embeddings.md => embeddings.mdx} | 0 docs/docs/customize/model-types/reranking.md | 93 ----------- docs/docs/customize/model-types/reranking.mdx | 156 ++++++++++++++++++ docs/docs/getting-started/install.md | 4 +- 9 files changed, 353 insertions(+), 191 deletions(-) rename docs/docs/customize/model-types/{embeddings.md => embeddings.mdx} (100%) delete mode 100644 docs/docs/customize/model-types/reranking.md create mode 100644 docs/docs/customize/model-types/reranking.mdx diff --git a/docs/docs/customize/model-providers/more/huggingfaceinferenceapi.mdx b/docs/docs/customize/model-providers/more/huggingfaceinferenceapi.mdx index 516cc15b6..ae08459e0 100644 --- a/docs/docs/customize/model-providers/more/huggingfaceinferenceapi.mdx +++ b/docs/docs/customize/model-providers/more/huggingfaceinferenceapi.mdx @@ -5,18 +5,30 @@ import TabItem from "@theme/TabItem"; Hugging Face Inference Endpoints are an easy way to setup instances of open-source language models on any cloud. Sign up for an account and add billing [here](https://huggingface.co/settings/billing), access the Inference Endpoints [here](https://ui.endpoints.huggingface.co), click on “New endpoint”, and fill out the form (e.g. select a model like [WizardCoder-Python-34B-V1.0](https://huggingface.co/WizardLM/WizardCoder-Python-34B-V1.0)), and then deploy your model by clicking “Create Endpoint”. Change `~/.continue/config.json` to look like this: -```json title="config.json (Deprecated)" -{ - "models": [ - { - "title": "Hugging Face Inference API", - "provider": "huggingface-inference-api", - "model": "MODEL_NAME", - "apiKey": "YOUR_HF_TOKEN", - "apiBase": "INFERENCE_API_ENDPOINT_URL" - } - ] -} -``` + + + ```yaml title="config.yaml" + models: + - name: Hugging Face Inference API + provider: huggingface-inference-api + model: MODEL_NAME + apiKeySecret: HF_TOKEN + apiBase: HF_URL_BASE + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "title": "Hugging Face Inference API", + "provider": "huggingface-inference-api", + "model": "MODEL_NAME", + "apiKey": "YOUR_HF_TOKEN", + "apiBase": "" + } + ] + ``` + + [View the source](https://github.com/continuedev/continue/blob/main/core/llm/llms/HuggingFaceInferenceAPI.ts) diff --git a/docs/docs/customize/model-providers/more/together.mdx b/docs/docs/customize/model-providers/more/together.mdx index 8cab190da..095005bf5 100644 --- a/docs/docs/customize/model-providers/more/together.mdx +++ b/docs/docs/customize/model-providers/more/together.mdx @@ -5,17 +5,28 @@ import TabItem from "@theme/TabItem"; The Together API is a cloud platform for running large AI models. You can sign up [here](https://api.together.xyz/signup), copy your API key on the initial welcome screen, and then hit the play button on any model from the [Together Models list](https://docs.together.ai/docs/serverless-models). Change `~/.continue/config.json` to look like this: -```json title="config.json (Deprecated)" -{ - "models": [ - { - "title": "Together Qwen2.5 Coder", - "provider": "together", - "model": "Qwen/Qwen2.5-Coder-32B-Instruct", - "apiKey": "YOUR_API_KEY" - } - ] -} -``` + + + ```yaml title="Package or config.yaml" + models: + - name: Together Qwen2.5 Coder + provider: together + model: Qwen/Qwen2.5-Coder-32B-Instruct + apiKeySecret: TOGETHER_API_KEY + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "title": "Together Qwen2.5 Coder", + "provider": "together", + "model": "Qwen/Qwen2.5-Coder-32B-Instruct", + "apiKey": "YOUR_API_KEY" + } + ] + ``` + + [View the source](https://github.com/continuedev/continue/blob/main/core/llm/llms/Together.ts) diff --git a/docs/docs/customize/model-providers/top-level/deepseek.mdx b/docs/docs/customize/model-providers/top-level/deepseek.mdx index 6698ebbb5..f6c1701f1 100644 --- a/docs/docs/customize/model-providers/top-level/deepseek.mdx +++ b/docs/docs/customize/model-providers/top-level/deepseek.mdx @@ -3,42 +3,66 @@ title: DeepSeek slug: ../deepseek --- +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + :::info - You can get an API key from the [DeepSeek console](https://www.deepseek.com/). - ::: ## Chat model We recommend configuring **DeepSeek Chat** as your chat model. -```json title="config.json (Deprecated)" -{ - "models": [ - { - "title": "DeepSeek Chat", - "provider": "deepseek", - "model": "deepseek-chat", - "apiKey": "[API_KEY]" - } - ] -} -``` + + + ```yaml title="config.yaml" + models: + - name: DeepSeek Chat + provider: deepseek + model: deepseek-chat + apiKey: [API_KEY] + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "title": "DeepSeek Chat", + "provider": "deepseek", + "model": "deepseek-chat", + "apiKey": "[API_KEY]" + } + ] + ``` + + ## Autocomplete model We recommend configuring **DeepSeek Coder** as your autocomplete model. -```json title="config.json (Deprecated)" -{ - "tabAutocompleteModel": { - "title": "DeepSeek Coder", - "provider": "deepseek", - "model": "deepseek-coder" - } -} -``` + + + ```yaml title="config.yaml" + models: + - name: DeepSeek Coder + provider: deepseek + model: deepseek-coder + roles: + - autocomplete + ``` + + + ```json title="config.json (Deprecated)" + "tabAutocompleteModel": { + "title": "DeepSeek Coder", + "provider": "deepseek", + "model": "deepseek-coder" + } + ``` + + ## Embeddings model diff --git a/docs/docs/customize/model-providers/top-level/vertexai.mdx b/docs/docs/customize/model-providers/top-level/vertexai.mdx index 5f5eb4fb7..6146e1ce3 100644 --- a/docs/docs/customize/model-providers/top-level/vertexai.mdx +++ b/docs/docs/customize/model-providers/top-level/vertexai.mdx @@ -14,50 +14,90 @@ You need to enable the [Vertex AI API](https://console.cloud.google.com/marketpl We recommend configuring **Claude 3.5 Sonnet** as your chat model. -```json title="config.json (Deprecated)" -{ - "models": [ - { - "title": "Claude 3.5 Sonnet", - "provider": "vertexai", - "model": "claude-3-5-sonnet-20240620", - "projectId": "[PROJECT_ID]", - "region": "us-east5" - } - ] -} -``` + + + ```yaml title="Package or config.yaml" + models: + - name: Claude 3.5 Sonnet + provider: vertexai + model: claude-3-5-sonnet-20240620 + projectId: [PROJECT_ID] + region: us-east5 + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "title": "Claude 3.5 Sonnet", + "provider": "vertexai", + "model": "claude-3-5-sonnet-20240620", + "projectId": "[PROJECT_ID]", + "region": "us-east5" + } + ] + ``` + + ## Autocomplete model We recommend configuring **Codestral** or **code-gecko** as your autocomplete model. -```json title="config.json (Deprecated)" -{ - "tabAutocompleteModel": { - "title": "Codestral (Vertex AI)", - "provider": "vertexai", - "model": "codestral", - "projectId": "[PROJECT_ID]", - "region": "us-central1" - } -} -``` + + + ```yaml title="config.yaml" + models: + - name: Codestral (Vertex AI) + provider: vertexai + model: codestral + projectId: [PROJECT_ID] + region: us-central1 + roles: + - autocomplete + ``` + + + ```json title="config.json (Deprecated)" + "tabAutocompleteModel": { + "title": "Codestral (Vertex AI)", + "provider": "vertexai", + "model": "codestral", + "projectId": "[PROJECT_ID]", + "region": "us-central1" + } + ``` + + ## Embeddings model We recommend configuring **text-embedding-004** as your embeddings model. -```json title="config.json (Deprecated)" -{ - "embeddingsProvider": { - "provider": "vertexai", - "model": "text-embedding-004", - "projectId": "[PROJECT_ID]", - "region": "us-central1" - } -} -``` + + + ```yaml title="config.yaml" + models: + - name: Text Embedding-004 + provider: vertexai + model: text-embedding-004 + projectId: [PROJECT_ID] + region: us-central1 + roles: + - embed + ``` + + + ```json title="config.json (Deprecated)" + "embeddingsProvider": { + "provider": "vertexai", + "model": "text-embedding-004", + "projectId": "[PROJECT_ID]", + "region": "us-central1" + } + ``` + + ## Reranking model diff --git a/docs/docs/customize/model-providers/top-level/xAI.mdx b/docs/docs/customize/model-providers/top-level/xAI.mdx index c9317758b..130ffa775 100644 --- a/docs/docs/customize/model-providers/top-level/xAI.mdx +++ b/docs/docs/customize/model-providers/top-level/xAI.mdx @@ -3,28 +3,40 @@ title: xAI slug: ../xai --- +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + :::info - You can get an API key from the [xAI console](https://console.x.ai/) - ::: ## Chat model We recommend configuring **grok-beta** as your chat model. -```json title="config.json (Deprecated)" -{ - "models": [ - { - "title": "Grok Beta", - "provider": "xAI", - "model": "grok-beta", - "apiKey": "[API_KEY]" - } - ] -} -``` + + + ```yaml title="config.yaml" + models: + - name: Grok Beta + provider: xAI + model: grok-beta + apiKey: + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "title": "Grok Beta", + "provider": "xAI", + "model": "grok-beta", + "apiKey": "[API_KEY]" + } + ] + ``` + + ## Autocomplete model diff --git a/docs/docs/customize/model-types/embeddings.md b/docs/docs/customize/model-types/embeddings.mdx similarity index 100% rename from docs/docs/customize/model-types/embeddings.md rename to docs/docs/customize/model-types/embeddings.mdx diff --git a/docs/docs/customize/model-types/reranking.md b/docs/docs/customize/model-types/reranking.md deleted file mode 100644 index c66445831..000000000 --- a/docs/docs/customize/model-types/reranking.md +++ /dev/null @@ -1,93 +0,0 @@ ---- -title: Reranking model -description: Reranking model -keywords: [rerank] -sidebar_position: 4 ---- - -A "reranking model" is trained to take two pieces of text (often a user question and a document) and return a relevancy score between 0 and 1, estimating how useful the document will be in answering the question. Rerankers are typically much smaller than LLMs, and will be extremely fast and cheap in comparison. - -In Continue, reranking is used by [@Codebase](../deep-dives/codebase.md) in order to select the most relevant code snippets after vector search. - -## Recommended reranking models - -If you have the ability to use any model, we recommend `rerank-2` by Voyage AI, which is listed below along with the rest of the options for rerankers. - -### Voyage AI - -Voyage AI offers the best reranking model for code with their `rerank-2` model. After obtaining an API key from [here](https://www.voyageai.com/), you can configure like this: - -```json title="config.json (Deprecated)" -{ - "reranker": { - "name": "voyage", - "params": { - "model": "rerank-2", - "apiKey": "" - } - } -} -``` - -### Cohere - -See Cohere's documentation for rerankers [here](https://docs.cohere.com/docs/rerank-2). - -```json title="config.json (Deprecated)" -{ - "reranker": { - "name": "cohere", - "params": { - "model": "rerank-english-v3.0", - "apiKey": "" - } - } -} -``` - -### LLM - -If you only have access to a single LLM, then you can use it as a reranker. This is discouraged unless truly necessary, because it will be much more expensive and still less accurate than any of the above models trained specifically for the task. Note that this will not work if you are using a local model, for example with Ollama, because too many parallel requests need to be made. - -```json title="config.json (Deprecated)" -{ - "reranker": { - "name": "llm", - "params": { - "modelTitle": "My Model Title" - } - } -} -``` - -The `"modelTitle"` field must match one of the models in your "models" array in config.json. - -### Text Embeddings Inference - -[Hugging Face Text Embeddings Inference](https://huggingface.co/docs/text-embeddings-inference/en/index) enables you to host your own [reranker endpoint](https://huggingface.github.io/text-embeddings-inference/#/Text%20Embeddings%20Inference/rerank). You can configure your reranker as follows: - -```json title="config.json (Deprecated)" -{ - "reranker": { - "name": "huggingface-tei", - "params": { - "apiBase": "http://localhost:8080", - "apiKey": "", - "truncate": true, - "truncation_direction": "Right" - } - } -} -``` - -### Free Trial (Voyage AI) - -Continue offers a free trial of Voyage AI's reranking model. - -```json title="config.json (Deprecated)" -{ - "reranker": { - "name": "free-trial" - } -} -``` diff --git a/docs/docs/customize/model-types/reranking.mdx b/docs/docs/customize/model-types/reranking.mdx new file mode 100644 index 000000000..ef2622105 --- /dev/null +++ b/docs/docs/customize/model-types/reranking.mdx @@ -0,0 +1,156 @@ +--- +title: Reranking model +description: Reranking model +keywords: [rerank] +sidebar_position: 4 +--- + +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + +A "reranking model" is trained to take two pieces of text (often a user question and a document) and return a relevancy score between 0 and 1, estimating how useful the document will be in answering the question. Rerankers are typically much smaller than LLMs, and will be extremely fast and cheap in comparison. + +In Continue, reranking is used by [@Codebase](../deep-dives/codebase.md) in order to select the most relevant code snippets after vector search. + +## Recommended reranking models + +If you have the ability to use any model, we recommend `rerank-2` by Voyage AI, which is listed below along with the rest of the options for rerankers. + +### Voyage AI + +Voyage AI offers the best reranking model for code with their `rerank-2` model. After obtaining an API key from [here](https://www.voyageai.com/), you can configure like this: + + + + ```yaml title="config.yaml" + models: + - name: My Voyage Reranker + provider: voyage + apiKey: + model: rerank-2 + roles: + - rerank + ``` + + + ```json title="config.json (Deprecated)" + "reranker": { + "name": "voyage", + "params": { + "model": "rerank-2", + "apiKey": "" + } + } + ``` + + + +### Cohere + +See Cohere's documentation for rerankers [here](https://docs.cohere.com/docs/rerank-2). + + + + ```yaml title="config.yaml" + models: + - name: Cohere Reranker + provider: cohere + model: rerank-english-v3.0 + apiKey: + roles: + - rerank + ``` + + + ```json title="config.json (Deprecated)" + "reranker": { + "name": "cohere", + "params": { + "model": "rerank-english-v3.0", + "apiKey": "" + } + } + ``` + + + +### LLM + +If you only have access to a single LLM, then you can use it as a reranker. This is discouraged unless truly necessary, because it will be much more expensive and still less accurate than any of the above models trained specifically for the task. Note that this will not work if you are using a local model, for example with Ollama, because too many parallel requests need to be made. + + + + ```yaml title="config.yaml" + models: + - name: LLM Reranker + provider: openai + model: gpt-4o + roles: + - rerank + ``` + + + ```json title="config.json (Deprecated)" + "reranker": { + "name": "llm", + "params": { + "modelTitle": "My Model Title" + } + } + ``` + + + +The `"modelTitle"` field must match one of the models in your "models" array in config.json. + +### Text Embeddings Inference + +[Hugging Face Text Embeddings Inference](https://huggingface.co/docs/text-embeddings-inference/en/index) enables you to host your own [reranker endpoint](https://huggingface.github.io/text-embeddings-inference/#/Text%20Embeddings%20Inference/rerank). You can configure your reranker as follows: + + + + ```yaml title="Package or config.yaml" + models: + - name: Huggingface-tei Reranker + provider: huggingface-tei + apiBase: http://localhost:8080 + apiKey: + roles: + - rerank + ``` + + + ```json title="config.json (Deprecated)" + "reranker": { + "name": "huggingface-tei", + "params": { + "apiBase": "http://localhost:8080", + "apiKey": "" + } + } + ``` + + + +### Free Trial (Voyage AI) + +Continue offers a free trial of Voyage AI's reranking model. + + + + ```yaml title="config.yaml" + models: + - name: Free Trial Reranker + provider: free-trial + roles: + - rerank + ``` + + + ```json title="config.json (Deprecated)" + "reranker": { + "name": "free-trial" + } + ``` + + diff --git a/docs/docs/getting-started/install.md b/docs/docs/getting-started/install.md index 3729edbfd..f144a37a1 100644 --- a/docs/docs/getting-started/install.md +++ b/docs/docs/getting-started/install.md @@ -13,7 +13,7 @@ keywords: [install, installation, getting started, vs code, jetbrains] ![move-to-right-sidebar](/img/move-to-right-sidebar.gif) :::info[Troubleshooting] -If you have any problems, see the [troubleshooting guide](troubleshooting.md) or ask for help in [our Discord](https://discord.gg/NWtdYexhMs) +If you have any problems, see the [troubleshooting guide](../troubleshooting.mdx) or ask for help in [our Discord](https://discord.gg/NWtdYexhMs) ::: ## JetBrains @@ -25,5 +25,5 @@ If you have any problems, see the [troubleshooting guide](troubleshooting.md) or ![jetbrains-getting-started.png](/img/jetbrains-getting-started.png) :::info[Troubleshooting] -If you have any problems, see the [troubleshooting guide](troubleshooting.md) or ask for help in [our Discord](https://discord.com/invite/EfJEfdFnDQ) +If you have any problems, see the [troubleshooting guide](../troubleshooting.mdx) or ask for help in [our Discord](https://discord.com/invite/EfJEfdFnDQ) ::: From eed77fbcb59ddd9312b2b6e903ed5f241eb49d6b Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Fri, 17 Jan 2025 17:23:39 -0800 Subject: [PATCH 010/262] clean up some edges with config.json mentions, finish provider docs --- docs/docs/actions/how-it-works.mdx | 2 +- docs/docs/actions/how-to-customize.md | 10 - docs/docs/actions/how-to-use-it.md | 2 +- docs/docs/autocomplete/how-it-works.md | 4 +- docs/docs/autocomplete/how-to-customize.md | 2 +- docs/docs/autocomplete/model-setup.mdx | 6 +- docs/docs/chat/context-selection.md | 2 +- docs/docs/chat/how-it-works.md | 4 +- docs/docs/chat/how-to-customize.md | 6 +- docs/docs/chat/model-setup.mdx | 92 +++---- docs/docs/customize/context-providers.mdx | 10 +- .../customize/deep-dives/autocomplete.mdx | 4 +- docs/docs/customize/deep-dives/codebase.mdx | 4 +- .../customize/deep-dives/configuration.md | 31 ++- docs/docs/customize/deep-dives/docs.md | 2 +- .../model-providers/more/SambaNova.mdx | 35 ++- .../model-providers/more/asksage.mdx | 70 +++--- .../model-providers/more/cerebras.mdx | 35 ++- .../model-providers/more/cloudflare.mdx | 99 +++++--- .../customize/model-providers/more/cohere.mdx | 99 +++++--- .../model-providers/more/deepinfra.mdx | 35 ++- .../model-providers/more/flowise.mdx | 35 ++- .../model-providers/more/free-trial.mdx | 4 +- .../model-providers/more/function-network.mdx | 101 +++++--- .../customize/model-providers/more/groq.mdx | 37 ++- .../more/huggingfaceinferenceapi.mdx | 2 +- .../model-providers/more/ipex_llm.mdx | 69 ++++-- .../customize/model-providers/more/kindo.mdx | 74 ++++-- .../model-providers/more/llamacpp.mdx | 35 ++- .../model-providers/more/llamafile.mdx | 32 ++- .../model-providers/more/lmstudio.mdx | 88 +++++-- .../model-providers/more/moonshot.mdx | 84 ++++--- .../customize/model-providers/more/msty.mdx | 74 ++++-- .../customize/model-providers/more/nebius.mdx | 66 +++-- .../customize/model-providers/more/novita.mdx | 35 ++- .../customize/model-providers/more/nvidia.mdx | 68 ++++-- .../model-providers/more/openrouter.mdx | 79 ++++-- .../model-providers/more/replicatellm.mdx | 35 ++- .../model-providers/more/sagemaker.mdx | 48 ++-- .../model-providers/more/scaleway.mdx | 66 +++-- .../model-providers/more/siliconflow.mdx | 78 ++++-- .../model-providers/more/textgenwebui.mdx | 37 ++- .../model-providers/more/together.mdx | 2 +- .../customize/model-providers/more/vllm.mdx | 103 +++++--- .../model-providers/more/watsonx.mdx | 231 ++++++++++++------ .../model-providers/top-level/anthropic.mdx | 64 +++-- .../model-providers/top-level/azure.mdx | 143 +++++++---- .../model-providers/top-level/bedrock.mdx | 2 - .../model-providers/top-level/deepseek.mdx | 6 +- .../model-providers/top-level/gemini.mdx | 8 +- .../model-providers/top-level/mistral.mdx | 6 +- .../model-providers/top-level/ollama.mdx | 4 +- .../model-providers/top-level/openai.mdx | 12 +- .../model-providers/top-level/vertexai.mdx | 8 +- .../model-providers/top-level/xAI.mdx | 8 +- .../customize/model-types/autocomplete.md | 4 +- docs/docs/customize/model-types/chat.md | 6 +- .../docs/customize/model-types/embeddings.mdx | 107 +++++--- docs/docs/customize/model-types/reranking.mdx | 8 +- docs/docs/customize/overview.md | 28 +-- docs/docs/customize/slash-commands.mdx | 2 +- docs/docs/customize/tools.mdx | 2 +- .../build-your-own-context-provider.md | 6 +- ...custom-code-rag.md => custom-code-rag.mdx} | 46 +++- .../tutorials/how-to-self-host-a-model.md | 76 ------ .../tutorials/how-to-self-host-a-model.mdx | 118 +++++++++ docs/docs/customize/tutorials/llama3.1.md | 134 ---------- docs/docs/customize/tutorials/llama3.1.mdx | 202 +++++++++++++++ .../running-continue-without-internet.md | 2 +- ...t-up-codestral.md => set-up-codestral.mdx} | 46 ++-- docs/docs/edit/how-it-works.md | 2 +- docs/docs/edit/how-to-customize.mdx | 2 +- docs/docs/edit/model-setup.md | 2 +- docs/docs/json-reference.md | 4 +- docs/docs/reference.md | 2 +- docs/docs/telemetry.md | 16 +- docs/docs/troubleshooting.mdx | 2 +- docs/docs/yaml-migration.md | 20 +- 78 files changed, 2007 insertions(+), 1128 deletions(-) rename docs/docs/customize/tutorials/{custom-code-rag.md => custom-code-rag.mdx} (86%) delete mode 100644 docs/docs/customize/tutorials/how-to-self-host-a-model.md create mode 100644 docs/docs/customize/tutorials/how-to-self-host-a-model.mdx delete mode 100644 docs/docs/customize/tutorials/llama3.1.md create mode 100644 docs/docs/customize/tutorials/llama3.1.mdx rename docs/docs/customize/tutorials/{set-up-codestral.md => set-up-codestral.mdx} (59%) diff --git a/docs/docs/actions/how-it-works.mdx b/docs/docs/actions/how-it-works.mdx index 49d2e8db0..afb1b2396 100644 --- a/docs/docs/actions/how-it-works.mdx +++ b/docs/docs/actions/how-it-works.mdx @@ -9,4 +9,4 @@ While many Actions are based on templated prompts and can be customized with .pr Actions that generate inline diffs, like “/edit”, “/comment”, or right click actions, use the same prompt and response processing logic as [Edit](edit/how-it-works). -To learn how other slash commands work, see the full reference [here](../customize/slash-commands). +To learn how other slash commands work, see the full reference [here](../customize/slash-commands.mdx). diff --git a/docs/docs/actions/how-to-customize.md b/docs/docs/actions/how-to-customize.md index 0cd40903a..5bf2d496d 100644 --- a/docs/docs/actions/how-to-customize.md +++ b/docs/docs/actions/how-to-customize.md @@ -18,11 +18,6 @@ There are two ways to add custom slash commands: ### Custom Slash Commands with `config.ts` - - - If you want to go a step further than writing custom commands with natural language, you can write a custom function that returns the response. This requires using `config.ts` instead of `config.json`. To do this, push a new `SlashCommand` object to the `slashCommands` list. This object contains "name", the name that you will type to invoke the slash command, "description", the description seen in the dropdown menu, and "run". The `run` function is any async generator that should yield strings as you want them to be streamed to the UI. As an argument to the function, you have access to a `ContinueSDK` object with utilities such as access to certain information/actions within the IDE, the current language model, and a few other utilities. For example, here is a slash command that generates a commit message: @@ -51,11 +46,6 @@ export function modifyConfig(config: Config): Config { } ``` - - - ## Other custom actions Currently the other action triggers are not open for configuration, but we plan to allow this via .prompt files in the future. - - diff --git a/docs/docs/actions/how-to-use-it.md b/docs/docs/actions/how-to-use-it.md index 80f057453..018a7c941 100644 --- a/docs/docs/actions/how-to-use-it.md +++ b/docs/docs/actions/how-to-use-it.md @@ -18,7 +18,7 @@ The most common way to invoke an action is with a slash command. These are short ![slash-commands](/img/slash-commands.png) -A few of the most useful slash commands are available by default, like “/edit”, “/comment”, and “/share”, but Continue has a large built-in library of other options. To enable these, learn more [here](../customize/slash-commands.md). +A few of the most useful slash commands are available by default, like “/edit”, “/comment”, and “/share”, but Continue has a large built-in library of other options. To enable these, learn more [here](../customize/slash-commands.mdx). ### Prompt files diff --git a/docs/docs/autocomplete/how-it-works.md b/docs/docs/autocomplete/how-it-works.md index 9d87819b3..c97b71c03 100644 --- a/docs/docs/autocomplete/how-it-works.md +++ b/docs/docs/autocomplete/how-it-works.md @@ -16,7 +16,7 @@ In order to display suggestions quickly, without sending too many requests, we d ## Context -As explained on the [context selection](context-selection.md) page, Continue uses a number of retrieval methods to find relevant snippets from your codebase to include in the prompt. +As explained on the [context selection](./context-selection.md) page, Continue uses a number of retrieval methods to find relevant snippets from your codebase to include in the prompt. ## Filtering @@ -28,4 +28,4 @@ Language models aren't perfect, but can be made much closer by adjusting their o We will also occasionally entirely filter out responses if they are bad. This is often due to extreme repetition. -You can learn more about how it works in the [Autocomplete deep dive](../customize/deep-dives/autocomplete.md). +You can learn more about how it works in the [Autocomplete deep dive](../customize/deep-dives/autocomplete.mdx). diff --git a/docs/docs/autocomplete/how-to-customize.md b/docs/docs/autocomplete/how-to-customize.md index 317b09775..8b0fd8d96 100644 --- a/docs/docs/autocomplete/how-to-customize.md +++ b/docs/docs/autocomplete/how-to-customize.md @@ -19,4 +19,4 @@ Continue offers a handful of parameters in [`config.json` (Deprecated)](../json- - `prefixPercentage`: Defines the proportion of the prompt dedicated to the code before the cursor. - `multilineCompletions`: Controls whether suggestions can span multiple lines ("always", "never", or "auto"). -For a comprehensive guide on all configuration options and their impacts, see the [Autocomplete deep dive](../customize/deep-dives/autocomplete.md). +For a comprehensive guide on all configuration options and their impacts, see the [Autocomplete deep dive](../customize/deep-dives/autocomplete.mdx). diff --git a/docs/docs/autocomplete/model-setup.mdx b/docs/docs/autocomplete/model-setup.mdx index e975e51fe..31330d5a9 100644 --- a/docs/docs/autocomplete/model-setup.mdx +++ b/docs/docs/autocomplete/model-setup.mdx @@ -23,7 +23,7 @@ For the best Autocomplete experience, we recommend using Codestral through the [ - name: Codestral provider: mistral model: codestral-latest - apiKey: YOUR_API_KEY + apiKey: CODESTRAL_API_KEY roles: - autocomplete ``` @@ -46,7 +46,7 @@ The API keys for Codestral and the general Mistral APIs are different. If you ar ## Local, offline / self-hosted experience -For those preferring local execution or self-hosting,`Qwen2.5-Coder 1.5B` offers a good balance of performance and quality for most users (e.g. using [Ollama](../customize/model-providers/top-level/ollama.md) or [LM Studio](../customize/model-providers/more/lmstudio.md)). +For those preferring local execution or self-hosting,`Qwen2.5-Coder 1.5B` offers a good balance of performance and quality for most users (e.g. using [Ollama](../customize/model-providers/top-level/ollama.mdx) or [LM Studio](../customize/model-providers/more/lmstudio.mdx)). @@ -110,4 +110,4 @@ When using a remote instance you need to set the `"apiBase"` value in the config ## Other experiences -There are many more models and providers you can use with Autocomplete. Check them out [here](../customize/model-types/autocomplete.md). You can also see more examples of Autocomplete configuration [here](../customize/deep-dives/autocomplete.md) +There are many more models and providers you can use with Autocomplete. Check them out [here](../customize/model-types/autocomplete.md). You can also see more examples of Autocomplete configuration [here](../customize/deep-dives/autocomplete.mdx) diff --git a/docs/docs/chat/context-selection.md b/docs/docs/chat/context-selection.md index e32ea3c51..f93a6a93e 100644 --- a/docs/docs/chat/context-selection.md +++ b/docs/docs/chat/context-selection.md @@ -27,7 +27,7 @@ You can include a folder in your current workspace as context by typing [`@Folde ## Codebase search -You can automatically include relevant files from your codebase as context by typing [`@Codebase`](../customize/context-providers.mdx#codebase). You can learn about how @Codebase works [here](../customize/deep-dives/codebase.md). +You can automatically include relevant files from your codebase as context by typing [`@Codebase`](../customize/context-providers.mdx#codebase). You can learn about how @Codebase works [here](../customize/deep-dives/codebase.mdx). ## Documentation site diff --git a/docs/docs/chat/how-it-works.md b/docs/docs/chat/how-it-works.md index 84c81582e..e799e0a07 100644 --- a/docs/docs/chat/how-it-works.md +++ b/docs/docs/chat/how-it-works.md @@ -9,6 +9,6 @@ Using any selected code sections, all context that you have selected with @, and The model response is then streamed directly back to the sidebar. Each code section included in the response will be placed into its own code block, which gives you buttons to either “Apply to current file”, “Insert at cursor”, or “Copy” for each section. When you press cmd/ctrl + L (VS Code) or cmd/ctrl + J (JetBrains) at the end of a session, all context is cleared and a new session is started, so that you can begin a new task. -If you would like to view the exact prompt that is sent to the model during Chat, you can [view this in the prompt logs](troubleshooting.md#llm-prompt-logs). +If you would like to view the exact prompt that is sent to the model during Chat, you can [view this in the prompt logs](troubleshooting.mdx#llm-prompt-logs). -You can learn more about how `@Codebase` works [here](../customize/deep-dives/codebase.md) and `@Docs` [here](../customize/deep-dives/docs.md). +You can learn more about how `@Codebase` works [here](../customize/deep-dives/codebase.mdx) and `@Docs` [here](../customize/deep-dives/docs.md). diff --git a/docs/docs/chat/how-to-customize.md b/docs/docs/chat/how-to-customize.md index ee26a6a84..b375d6b1d 100644 --- a/docs/docs/chat/how-to-customize.md +++ b/docs/docs/chat/how-to-customize.md @@ -8,8 +8,8 @@ sidebar_position: 5 There are a number of different ways to customize Chat - You can add a [`.continuerules`](../customize/deep-dives/rules.md) file to the root of your project to customize the system prompt -- You can configure [`@Codebase`](../customize/deep-dives/codebase.md) -- You can create your own [custom code RAG](../customize/tutorials/custom-code-rag.md) +- You can configure [`@Codebase`](../customize/deep-dives/codebase.mdx) +- You can create your own [custom code RAG](../customize/tutorials/custom-code-rag.mdx) - You can configure [`@Docs`](../customize/deep-dives/docs.md) - You can [build your own context provider](../customize/tutorials/build-your-own-context-provider.md) -- You can configure and create custom [tools](../customize/tools.md) +- You can configure and create custom [tools](../customize/tools.mdx) diff --git a/docs/docs/chat/model-setup.mdx b/docs/docs/chat/model-setup.mdx index 9bdb09c7c..371696597 100644 --- a/docs/docs/chat/model-setup.mdx +++ b/docs/docs/chat/model-setup.mdx @@ -18,16 +18,16 @@ For the best overall Chat experience, you will want to use a 400B+ parameter mod ### Claude Sonnet 3.5 from Anthropic -Our current top recommendation is Claude Sonnet 3.5 from [Anthropic](../customize/model-providers/top-level/anthropic.md). +Our current top recommendation is Claude Sonnet 3.5 from [Anthropic](../customize/model-providers/top-level/anthropic.mdx). ```yaml title="Package or config.yaml" models: - - title: Claude 3.5 Sonnet + - name: Claude 3.5 Sonnet provider: anthropic model: claude-3-5-sonnet-latest - apiKeySecret: ANTHROPIC_API_KEY + apiKey: ${{ secrets.ANTHROPIC_API_KEY }} ``` @@ -46,7 +46,7 @@ Our current top recommendation is Claude Sonnet 3.5 from [Anthropic](../customiz ### Llama 3.1 405B from Meta -If you prefer to use an open-weight model, then Llama 3.1 405B from Meta is your best option right now. You will need to decide if you use it through a SaaS model provider (e.g. [Together](../customize/model-providers/more/together.md) or [Groq](../customize/model-providers/more/groq.md)) or self-host it (e.g. using [vLLM](../customize/model-providers//more/vllm.md) or [Ollama](../customize/model-providers/top-level/ollama.md)). +If you prefer to use an open-weight model, then Llama 3.1 405B from Meta is your best option right now. You will need to decide if you use it through a SaaS model provider (e.g. [Together](../customize/model-providers/more/together.mdx) or [Groq](../customize/model-providers/more/groq.mdx)) or self-host it (e.g. using [vLLM](../customize/model-providers//more/vllm.mdx) or [Ollama](../customize/model-providers/top-level/ollama.mdx)). @@ -54,35 +54,35 @@ If you prefer to use an open-weight model, then Llama 3.1 405B from Meta is your ```yaml title="Package or config.yaml" models: - - title: "Llama 3.1 405B" - provider: "together" - model: "llama3.1-405b" - apiKeySecret: "TOGETHER_API_KEY" + - name: "Llama 3.1 405B" + provider: "together" + model: "llama3.1-405b" + apiKey: ${{ secrets.TOGETHER_API_KEY }} ``` ```yaml title="Package or config.yaml" models: - - title: "Llama 3.1 405B" - provider: "groq" - model: "llama3.1-405b" - apiKeySecret: "GROQ_API_KEY" + - name: "Llama 3.1 405B" + provider: "groq" + model: "llama3.1-405b" + apiKey: ${{ secrets.GROQ_API_KEY }} ``` ```yaml title="Package or config.yaml" models: - - title: "Llama 3.1 405B" - provider: "vllm" - model: "llama3.1-405b" + - name: "Llama 3.1 405B" + provider: "vllm" + model: "llama3.1-405b" ``` ```yaml title="Package or config.yaml" models: - - title: "Llama 3.1 405B" - provider: "ollama" - model: "llama3.1:405b" + - name: "Llama 3.1 405B" + provider: "ollama" + model: "llama3.1:405b" ``` @@ -141,16 +141,16 @@ If you prefer to use an open-weight model, then Llama 3.1 405B from Meta is your ### GPT-4o from OpenAI -If you prefer to use a model from [OpenAI](../customize/model-providers/top-level/openai.md), then we recommend GPT-4o. +If you prefer to use a model from [OpenAI](../customize/model-providers/top-level/openai.mdx), then we recommend GPT-4o. ```yaml title="Package or config.yaml" models: - - title: GPT-4o - provider: openai - model: '' - apiKey: [OPENAI_API_KEY] + - name: GPT-4o + provider: openai + model: '' + apiKey: ${{ secrets.OPENAI_API_KEY }} ``` @@ -169,28 +169,28 @@ If you prefer to use a model from [OpenAI](../customize/model-providers/top-leve ### Gemini 1.5 Pro from Google -If you prefer to use a model from [Google](../customize/model-providers/top-level/gemini.md), then we recommend Gemini 1.5 Pro. +If you prefer to use a model from [Google](../customize/model-providers/top-level/gemini.mdx), then we recommend Gemini 1.5 Pro. ```yaml title="Package or config.yaml" models: - - title: Gemini 1.5 Pro + - name: Gemini 1.5 Pro provider: gemini model: gemini-1.5-pro-latest - apiKey: [GEMINI_API_KEY] + apiKey: ${{ secrets.GEMINI_API_KEY }} ``` ```json title="config.json (Deprecated)" - "models": [ + "models": [ { - "title": "Gemini 1.5 Pro", - "provider": "gemini", - "model": "gemini-1.5-pro-latest", - "apiKey": "[GEMINI_API_KEY]" + "title": "Gemini 1.5 Pro", + "provider": "gemini", + "model": "gemini-1.5-pro-latest", + "apiKey": "[GEMINI_API_KEY]" } - ] + ] ``` @@ -201,7 +201,7 @@ For the best local, offline Chat experience, you will want to use a model that i ### Llama 3.1 8B -If your local machine can run an 8B parameter model, then we recommend running Llama 3.1 8B on your machine (e.g. using [Ollama](../customize/model-providers/top-level/ollama.md) or [LM Studio](../customize/model-providers/more/lmstudio.md)). +If your local machine can run an 8B parameter model, then we recommend running Llama 3.1 8B on your machine (e.g. using [Ollama](../customize/model-providers/top-level/ollama.mdx) or [LM Studio](../customize/model-providers/more/lmstudio.mdx)). @@ -209,17 +209,17 @@ If your local machine can run an 8B parameter model, then we recommend running L ```yaml title="Package or config.yaml" models: - - title: Llama 3.1 8B - provider: ollama - model: llama3.1:8b + - name: Llama 3.1 8B + provider: ollama + model: llama3.1:8b ``` ```yaml title="Package or config.yaml" models: - - title: Llama 3.1 8B - provider: lmstudio - model: llama3.1:8b + - name: Llama 3.1 8B + provider: lmstudio + model: llama3.1:8b ``` @@ -254,7 +254,7 @@ If your local machine can run an 8B parameter model, then we recommend running L ### DeepSeek Coder 2 16B -If your local machine can run a 16B parameter model, then we recommend running DeepSeek Coder 2 16B (e.g. using [Ollama](../customize/model-providers/top-level/ollama.md) or [LM Studio](../customize/model-providers/more/lmstudio.md)). +If your local machine can run a 16B parameter model, then we recommend running DeepSeek Coder 2 16B (e.g. using [Ollama](../customize/model-providers/top-level/ollama.mdx) or [LM Studio](../customize/model-providers/more/lmstudio.mdx)). @@ -262,17 +262,17 @@ If your local machine can run a 16B parameter model, then we recommend running D ```yaml title="Package or config.yaml" models: - - title: DeepSeek Coder 2 16B - provider: ollama - model: deepseek-coder-v2:16b + - name: DeepSeek Coder 2 16B + provider: ollama + model: deepseek-coder-v2:16b ``` ```yaml title="Package or config.yaml" models: - - title: DeepSeek Coder 2 16B - provider: lmstudio - model: deepseek-coder-v2:16b + - name: DeepSeek Coder 2 16B + provider: lmstudio + model: deepseek-coder-v2:16b ``` diff --git a/docs/docs/customize/context-providers.mdx b/docs/docs/customize/context-providers.mdx index 667b055f9..cd7c5a5e7 100644 --- a/docs/docs/customize/context-providers.mdx +++ b/docs/docs/customize/context-providers.mdx @@ -15,7 +15,7 @@ As an example, say you are working on solving a new GitHub Issue. You type '@Iss ## Built-in Context Providers -To use any of the built-in context providers, open `config.json` and add it to the `contextProviders` list. +You can add any built-in context-providers in your config file as shown below: ### `@File` @@ -151,7 +151,7 @@ Reference the contents from any documentation site. Note that this will only enable the `@Docs` context provider. -To use it, you need to add a documentation site to your `config.json`. See the [docs](../customize/deep-dives/docs.md) page for more information. +To use it, you need to add a documentation site to your config file. See the [docs](../customize/deep-dives/docs.md) page for more information. ### `@Open` @@ -231,7 +231,7 @@ Reference the most relevant snippets from your codebase. -Read more about indexing and retrieval [here](../customize/deep-dives/codebase.md). +Read more about indexing and retrieval [here](../customize/deep-dives/codebase.mdx). ### `@Folder` @@ -279,8 +279,6 @@ Reference the results of codebase search, just like the results you would get fr This context provider is powered by [ripgrep](https://github.com/BurntSushi/ripgrep). -This context provider is powered by [ripgrep](https://github.com/BurntSushi/ripgrep). - ### `@Url` Reference the markdown converted contents of a given URL. @@ -492,7 +490,7 @@ You'll then be able to type "@" and see "MCP" in the context providers dropdown. ### Prompt Files -See [Prompt Files](/customize/deep-dives/prompt-files). Prompt files are not added directly to the config file; prompt files are parsed and injected into the config automatically, to be used like other context providers. +See [Prompt Files](/customize/deep-dives/prompt-file.mdx). Prompt files are not added directly to the config file; prompt files are parsed and injected into the config automatically, to be used like other context providers. ### `@Issue` diff --git a/docs/docs/customize/deep-dives/autocomplete.mdx b/docs/docs/customize/deep-dives/autocomplete.mdx index 5dba5d800..d6d3755ef 100644 --- a/docs/docs/customize/deep-dives/autocomplete.mdx +++ b/docs/docs/customize/deep-dives/autocomplete.mdx @@ -8,7 +8,7 @@ import TabItem from "@theme/TabItem"; ### Setting up with Codestral (recommended) -If you want to have the best autocomplete experience, we recommend using Codestral, which is available through the [Mistral API](https://console.mistral.ai/). To do this, obtain an API key and add it to your `config.json`: +If you want to have the best autocomplete experience, we recommend using Codestral, which is available through the [Mistral API](https://console.mistral.ai/). To do this, obtain an API key and add it to your config: @@ -17,7 +17,7 @@ If you want to have the best autocomplete experience, we recommend using Codestr - name: Codestral provider: mistral model: codestral-latest - apiKeySecret: CODESTRAL_API_KEY + apiKey: ${{ secrets.CODESTRAL_API_KEY }} roles: - autocomplete ``` diff --git a/docs/docs/customize/deep-dives/codebase.mdx b/docs/docs/customize/deep-dives/codebase.mdx index 994cb848d..dfed9cda9 100644 --- a/docs/docs/customize/deep-dives/codebase.mdx +++ b/docs/docs/customize/deep-dives/codebase.mdx @@ -11,7 +11,7 @@ import TabItem from "@theme/TabItem"; Continue indexes your codebase so that it can later automatically pull in the most relevant context from throughout your workspace. This is done via a combination of embeddings-based retrieval and keyword search. By default, all embeddings are calculated locally using `transformers.js` and stored locally in `~/.continue/index`. :::info[`transformers.js cannot be used in JetBrains`] -Currently, `transformers.js` cannot be used in JetBrains IDEs. However, you can select a differet embeddings model from [the list here](../model-types/embeddings.md). +Currently, `transformers.js` cannot be used in JetBrains IDEs. However, you can select a differet embeddings model from [the list here](../model-types/embeddings.mdx). ::: Currently, the codebase retrieval feature is available as the "codebase" and "folder" context providers. You can use them by typing `@Codebase` or `@Folder` in the input box, and then asking a question. The contents of the input box will be compared with the embeddings from the rest of the codebase (or folder) to determine relevant files. @@ -41,7 +41,7 @@ Here are use cases where it is not useful: ## Configuration -There are a few options that let you configure the behavior of the codebase context provider. These can be set in `config.json`, and are the same for the codebase, docs, and folder context providers: +There are a few options that let you configure the behavior of the `@codebase` context provider, which are the same for the `@folder` context provider: diff --git a/docs/docs/customize/deep-dives/configuration.md b/docs/docs/customize/deep-dives/configuration.md index 6182807d6..504bf4d09 100644 --- a/docs/docs/customize/deep-dives/configuration.md +++ b/docs/docs/customize/deep-dives/configuration.md @@ -5,27 +5,32 @@ keywords: [config, settings, customize] # Configuration -Continue can be deeply customized. User-level configuration is stored and can be edited in your home directory in [`config.json`](#configjson): +## YAML Config -- `~/.continue/config.json` (MacOS / Linux) -- `%USERPROFILE%\.continue\config.json` (Windows) +Continue can be deeply customized. User-level configuration is stored and can be edited in your home directory in `config.yaml`: -To open `config.json`, you can click the "gear" icon in the bottom right corner of the Continue Chat sidebar. When editing this file, you can see the available options suggested as you type, or check the reference below. +- `~/.continue/config.yaml` (MacOS / Linux) +- `%USERPROFILE%\.continue\config.yaml` (Windows) -When you save `config.json`, Continue will automatically refresh to take into account your changes. `config.json` is automatically created the first time you use Continue. `config.json` is automatically generated if it doesn't exist. +To open your configuration file, you can click the "gear" icon in the bottom right corner of the Continue Chat sidebar. When editing this file, you can see the available options suggested as you type, or check the reference below. -In the vast majority of cases, you will only need to edit `config.json`. However, Continue offers two additional ways to customize configuration: +When you save a config file from the IDE, Continue will automatically refresh to take into account your changes. A config file is automatically created the first time you use Continue, and always automatically generated with default values if it doesn't exist. -- [`.continuerc.json`](#continuercjson) - Workspace-level configuration. If you'd like to scope certain settings to a particular workspace, you can add a `.continuerc.json` to the root of your project. This can be set to merge with _or_ override the user-level `config.json` +See the full reference for `config.yaml` [here](../../reference.md). + +## Deprecated configuration methods + +:::info +View the `config.json` migration guide [here](../../yaml-migration.md) +::: + +- [`config.json`](../../json-reference.md) - The original configuration format which is stored in a file at the same location as `config.yaml` +- [`.continuerc.json`](#continuercjson) - Workspace-level configuration - [`config.ts`](#configts) - Advanced configuration (probably unnecessary) - a TypeScript file in your home directory that can be used to programmatically modify (_merged_) the `config.json` schema: - `~/.continue/config.ts` (MacOS / Linux) - `%USERPROFILE%\.continue\config.ts` (Windows) -## `config.json` - -See the full reference for `config.json` [here](../../json-reference.md). - -## `.continuerc.json` +### `.continuerc.json` The format of `.continuerc.json` is the same as `config.json`, plus one _additional_ property `mergeBehavior`, which can be set to either "merge" or "overwrite". If set to "merge" (the default), `.continuerc.json` will be applied on top of `config.json` (arrays and objects are merged). If set to "overwrite", then every top-level property of `.continuerc.json` will overwrite that property from `config.json`. @@ -40,7 +45,7 @@ Example } ``` -## `config.ts` +### `config.ts` To programatically extend `config.json`, you can place a `config.ts` script in same directory as `config.json` and export a `modifyConfig` function, like: diff --git a/docs/docs/customize/deep-dives/docs.md b/docs/docs/customize/deep-dives/docs.md index e519f3d30..79d2735b3 100644 --- a/docs/docs/customize/deep-dives/docs.md +++ b/docs/docs/customize/deep-dives/docs.md @@ -71,7 +71,7 @@ The [configuration schema for docs](https://github.com/continuedev/continue/blob ## Configuration -As with [@Codebase context provider configuration](https://docs.continue.dev/customize/deep-dives/codebase#configuration), you can adjust the behavior of the docs context provider with the `nRetrieve`, `nFinal`, and `useReranking` +As with [@Codebase context provider configuration](../deep-dives/codebase.mdx#configuration), you can adjust the behavior of the docs context provider with the `nRetrieve`, `nFinal`, and `useReranking` ```json title="config.json (Deprecated)" { diff --git a/docs/docs/customize/model-providers/more/SambaNova.mdx b/docs/docs/customize/model-providers/more/SambaNova.mdx index ffaf4b53d..31147e252 100644 --- a/docs/docs/customize/model-providers/more/SambaNova.mdx +++ b/docs/docs/customize/model-providers/more/SambaNova.mdx @@ -5,17 +5,28 @@ import TabItem from "@theme/TabItem"; The SambaNova Cloud is a cloud platform for running large AI models with the world record Llama 3.1 70B/405B performance. You can follow the instructions in [this blog post](https://sambanova.ai/blog/accelerating-coding-with-sambanova-cloud?ref=blog.continue.dev) to configure your setup. -```json title="config.json (Deprecated)" -{ - "models": [ - { - "title": "SambaNova Llama 3.1 405B", - "provider": "sambanova", - "model": "llama3.1-405b", - "apiKey": "YOUR_API_KEY" - } - ] -} -``` + + + ```yaml title="Package or config.yaml" + models: + - name: SambaNova Llama 3.1 405B + provider: sambanova + model: llama3.1-405b + apiKey: ${{ secrets.SAMBANOVA_API_KEY }} + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "title": "SambaNova Llama 3.1 405B", + "provider": "sambanova", + "model": "llama3.1-405b", + "apiKey": "SAMBANOVA_API_KEY" + } + ] + ``` + + [View the source](https://github.com/continuedev/continue/blob/main/core/llm/llms/SambaNova.ts) diff --git a/docs/docs/customize/model-providers/more/asksage.mdx b/docs/docs/customize/model-providers/more/asksage.mdx index fcccdd750..eb8608e88 100644 --- a/docs/docs/customize/model-providers/more/asksage.mdx +++ b/docs/docs/customize/model-providers/more/asksage.mdx @@ -9,21 +9,33 @@ To get an Ask Sage API key login to the Ask Sage platform (If you don't have an ## Configuration -To use the Ask Sage models, the following configuration is required to the `config.json` file: +To use the Ask Sage models, you can use the following -```json title="config.json (Deprecated)" -{ + + + ```yaml title="Package or config.yaml" + models: + - name: GPT-4 gov + provider: askSage + apiKey: ${{ secrets.ASK_SAGE_API_KEY }} + apiBase: https://api.asksage.ai/server/ + model: gpt4-gov + ``` + + + ```json title="config.json (Deprecated)" "models": [ { "apiKey": "YOUR_API_KEY", - "apiBase": "https://api.asksage.ai/server/", // apiBase will be the same for all models, but will vary based on tenant. + "apiBase": "https://api.asksage.ai/server/", "model": "gpt4-gov", "title": "GPT-4 gov", "provider": "askSage" } ] -} -``` + ``` + + The `apiBase` will be listed on the Ask Sage platform when you generate an `API key`. You will see context as shown below: @@ -51,26 +63,26 @@ Ask Sage documentation is not available with Continue.Dev, so if you have any qu The current Models available provided by Ask Sage are: -| Index | Model | Added | Status | -| ----- | --------------------- | ----- | ------ | -| 1 | GPT-4 Gov | Yes | ✅ | -| 2 | GPT-4o Gov | Yes | ✅ | -| 3 | GPT-4o-mini Gov | Yes | ✅ | -| 4 | GPT-3.5-Turbo Gov | Yes | ✅ | -| 5 | GPT-4o | Yes | ✅ | -| 6 | GPT-4o-mini | Yes | ✅ | -| 7 | GPT-4 | Yes | ✅ | -| 8 | GPT-4-32K | Yes | ✅ | -| 9 | GPT-o1 | Yes | ✅ | -| 10 | GPT-o1-mini | Yes | ✅ | -| 11 | GPT-3.5-turbo | Yes | ✅ | -| 12 | Calude 3.5 Sonnet Gov | Yes | ✅ | -| 13 | Calude 3 Opus | Yes | ✅ | -| 14 | Calude 3 Sonet | Yes | ✅ | -| 15 | Calude 3.5 Sonnet | Yes | ✅ | -| 16 | Grok (xAI) | Yes | ✅ | -| 17 | Groq Llama 3.3 | Yes | ✅ | -| 18 | Groq 70B | Yes | ✅ | -| 19 | Gemini Pro | Yes | ✅ | -| 20 | llama 3 | Yes | ✅ | -| 21 | Mistral Large | Yes | ✅ | +| Index | Model | Added | +| ----- | --------------------- | ----- | +| 1 | GPT-4 Gov | ✅ | +| 2 | GPT-4o Gov | ✅ | +| 3 | GPT-4o-mini Gov | ✅ | +| 4 | GPT-3.5-Turbo Gov | ✅ | +| 5 | GPT-4o | ✅ | +| 6 | GPT-4o-mini | ✅ | +| 7 | GPT-4 | ✅ | +| 8 | GPT-4-32K | ✅ | +| 9 | GPT-o1 | ✅ | +| 10 | GPT-o1-mini | ✅ | +| 11 | GPT-3.5-turbo | ✅ | +| 12 | Calude 3.5 Sonnet Gov | ✅ | +| 13 | Calude 3 Opus | ✅ | +| 14 | Calude 3 Sonet | ✅ | +| 15 | Calude 3.5 Sonnet | ✅ | +| 16 | Grok (xAI) | ✅ | +| 17 | Groq Llama 3.3 | ✅ | +| 18 | Groq 70B | ✅ | +| 19 | Gemini Pro | ✅ | +| 20 | llama 3 | ✅ | +| 21 | Mistral Large | ✅ | diff --git a/docs/docs/customize/model-providers/more/cerebras.mdx b/docs/docs/customize/model-providers/more/cerebras.mdx index f9ccb88cc..9375c974f 100644 --- a/docs/docs/customize/model-providers/more/cerebras.mdx +++ b/docs/docs/customize/model-providers/more/cerebras.mdx @@ -9,15 +9,26 @@ Cerebras Inference uses specialized silicon to provides fast inference. 2. Create and copy the API key for use in Continue. 3. Update your Continue config file: -```json title="config.json (Deprecated)" -{ - "models": [ - { - "title": "Cerebras Llama 3.1 70B", - "provider": "cerebras", - "model": "llama3.1-70b", - "apiKey": "YOUR_API_KEY" - } - ] -} -``` + + + ```yaml title="Package or config.yaml" + models: + - name: Cerebras Llama 3.1 70B + provider: cerebras + model: llama3.1-70b + apiKey: ${{ secrets.CEREBRAS_API_KEY }} + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "title": "Cerebras Llama 3.1 70B", + "provider": "cerebras", + "model": "llama3.1-70b", + "apiKey": "YOUR_API_KEY" + } + ] + ``` + + diff --git a/docs/docs/customize/model-providers/more/cloudflare.mdx b/docs/docs/customize/model-providers/more/cloudflare.mdx index 7d3058548..5388e2a6a 100644 --- a/docs/docs/customize/model-providers/more/cloudflare.mdx +++ b/docs/docs/customize/model-providers/more/cloudflare.mdx @@ -3,44 +3,77 @@ import TabItem from "@theme/TabItem"; # Cloudflare Workers AI -Cloudflare Workers AI can be used for both chat and tab autocompletion in Continue. To setup Cloudflare Workers AI, add the following to your `config.json` file: +Cloudflare Workers AI can be used for both chat and tab autocompletion in Continue. Here is an example of Cloudflare Workers AI configuration: -```json title="config.json (Deprecated)" -{ - "models": [ - { - "accountId": "YOUR CLOUDFLARE ACCOUNT ID", - "apiKey": "YOUR CLOUDFLARE API KEY", - "contextLength": 2400, - "completionOptions": { - "maxTokens": 500 + + + ```yaml title="config.yaml" + models: + - name: Llama 3 8B + provider: cloudflare + accountId: YOUR CLOUDFLARE ACCOUNT ID + apiKey: ${{ secrets.CLOUDFARE_API_KEY }} + model: "@cf/meta/llama-3-8b-instruct" + contextLength: 2400 + defaultCompletionOptions: + maxTokens: 500 + roles: + - chat + - name: DeepSeek Coder 6.7b Instruct + provider: cloudflare + accountId: YOUR CLOUDFLARE ACCOUNT ID + apiKey: ${{ secrets.CLOUDFARE_API_KEY }} + model: "@hf/thebloke/deepseek-coder-6.7b-instruct-awq" + contextLength: 2400 + defaultCompletionOptions: + maxTokens: 500 + roles: + - chat + - name: DeepSeek 7b + provider: cloudflare + accountId: YOUR CLOUDFLARE ACCOUNT ID + apiKey: ${{ secrets.CLOUDFARE_API_KEY }} + model: "@hf/thebloke/deepseek-coder-6.7b-base-awq" + roles: + - autocomplete + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "title": "Llama 3 8B", + "provider": "cloudflare", + "accountId": "YOUR CLOUDFLARE ACCOUNT ID", + "apiKey": "YOUR CLOUDFLARE API KEY", + "contextLength": 2400, + "completionOptions": { + "maxTokens": 500 + }, + "model": "@cf/meta/llama-3-8b-instruct" }, - "model": "@cf/meta/llama-3-8b-instruct", // This can be the name of any model supported by Workers AI - "provider": "cloudflare", - "title": "Llama 3 8B" - }, - { - "accountId": "YOUR CLOUDFLARE ACCOUNT ID", - "apiKey": "YOUR CLOUDFLARE API KEY", - "contextLength": 2400, - "completionOptions": { - "maxTokens": 500 - }, - "model": "@hf/thebloke/deepseek-coder-6.7b-instruct-awq", - "provider": "cloudflare", - "title": "DeepSeek Coder 6.7b Instruct" - } - ... + { + "title": "DeepSeek Coder 6.7b Instruct", + "provider": "cloudflare", + "accountId": "YOUR CLOUDFLARE ACCOUNT ID", + "apiKey": "YOUR CLOUDFLARE API KEY", + "contextLength": 2400, + "completionOptions": { + "maxTokens": 500 + }, + "model": "@hf/thebloke/deepseek-coder-6.7b-instruct-awq" + } + ], "tabAutocompleteModel": { + "title": "DeepSeek 7b", + "provider": "cloudflare", "accountId": "YOUR CLOUDFLARE ACCOUNT ID", "apiKey": "YOUR CLOUDFLARE API KEY", - "model": "@hf/thebloke/deepseek-coder-6.7b-base-awq", - "provider": "cloudflare", - "title": "DeepSeek 7b" - }, - ] -} -``` + "model": "@hf/thebloke/deepseek-coder-6.7b-base-awq" + } + ``` + + Visit the [Cloudflare dashboard](https://dash.cloudflare.com/) to [create an API key](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). diff --git a/docs/docs/customize/model-providers/more/cohere.mdx b/docs/docs/customize/model-providers/more/cohere.mdx index dcdd39b01..966964f53 100644 --- a/docs/docs/customize/model-providers/more/cohere.mdx +++ b/docs/docs/customize/model-providers/more/cohere.mdx @@ -9,18 +9,29 @@ Before using Cohere, visit the [Cohere dashboard](https://dashboard.cohere.com/a We recommend configuring **Command-R Plus** as your chat model. -```json title="config.json (Deprecated)" -{ - "models": [ - { - "title": "Cohere", - "provider": "cohere", - "model": "command-r-plus", - "apiKey": "YOUR_API_KEY" - } - ] -} -``` + + + ```yaml title="Package or config.yaml" + models: + - name: Cohere + provider: cohere + model: command-r-plus + apiKey: ${{ secrets.COHERE_API_KEY }} + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "title": "Cohere", + "provider": "cohere", + "model": "command-r-plus", + "apiKey": "YOUR_API_KEY" + } + ] + ``` + + ## Autocomplete model @@ -32,28 +43,54 @@ Cohere currently does not offer any autocomplete models. We recommend configuring **embed-english-v3.0** as your embeddings model. -```json title="config.json (Deprecated)" -{ - "embeddingsProvider": { - "provider": "cohere", - "model": "embed-english-v3.0", - "apiKey": "" - } -} -``` + + + ```yaml title="config.yaml" + models: + - name: Cohere Embed + provider: cohere + model: embed-english-v3.0 + apiKey: ${{ secrets.COHERE_API_KEY }} + roles: + - embed + ``` + + + ```json title="config.json (Deprecated)" + "embeddingsProvider": { + "provider": "cohere", + "model": "embed-english-v3.0", + "apiKey": "" + } + ``` + + ## Reranking model We recommend configuring **rerank-english-v3.0** as your reranking model. -```json title="config.json (Deprecated)" -{ - "reranker": { - "name": "cohere", - "params": { - "model": "rerank-english-v3.0", - "apiKey": "" + + + ```yaml title="config.yaml" + models: + - name: Cohere Reranker + provider: cohere + model: rerank-english-v3.0 + apiKey: ${{ secrets.COHERE_API_KEY }} + roles: + - rerank + ``` + + + ```json title="config.json (Deprecated)" + "reranker": { + "name": "cohere", + "params": { + "model": "rerank-english-v3.0", + "apiKey": "" + } } - } -} -``` + ``` + + diff --git a/docs/docs/customize/model-providers/more/deepinfra.mdx b/docs/docs/customize/model-providers/more/deepinfra.mdx index 418ff15f9..51e3943e7 100644 --- a/docs/docs/customize/model-providers/more/deepinfra.mdx +++ b/docs/docs/customize/model-providers/more/deepinfra.mdx @@ -5,17 +5,28 @@ import TabItem from "@theme/TabItem"; [DeepInfra](https://deepinfra.com) provides inference for open-source models at very low cost. To get started with DeepInfra, obtain your API key [here](https://deepinfra.com/dash). Then, find the model you want to use [here](https://deepinfra.com/models?type=text-generation) and copy the name of the model. Continue can then be configured to use the `DeepInfra` LLM class, like the example here: -```json title="config.json (Deprecated)" -{ - "models": [ - { - "provider": "deepinfra", - "title": "DeepInfra", - "model": "mistralai/Mixtral-8x7B-Instruct-v0.1", - "apiKey": "" - } - ] -} -``` + + + ```yaml title="config.yaml" + models: + - name: DeepInfra + provider: deepinfra + model: mistralai/Mixtral-8x7B-Instruct-v0.1 + apiKey: ${{ secrets.DEEP_INFRA_API_KEY }} + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "provider": "deepinfra", + "title": "DeepInfra", + "model": "mistralai/Mixtral-8x7B-Instruct-v0.1", + "apiKey": "" + } + ] + ``` + + [View the source](https://github.com/continuedev/continue/blob/main/core/llm/llms/DeepInfra.ts) diff --git a/docs/docs/customize/model-providers/more/flowise.mdx b/docs/docs/customize/model-providers/more/flowise.mdx index 91516ee12..d6abf9ee5 100644 --- a/docs/docs/customize/model-providers/more/flowise.mdx +++ b/docs/docs/customize/model-providers/more/flowise.mdx @@ -5,17 +5,28 @@ import TabItem from "@theme/TabItem"; [Flowise](https://flowiseai.com/) is a low-code/no-code drag & drop tool with the aim to make it easy for people to visualize and build LLM apps. Continue can then be configured to use the `Flowise` LLM class, like the example here: -```json title="config.json (Deprecated)" -{ - "models": [ - { - "provider": "flowise", - "title": "Flowise", - "model": "", - "apiBase": "" - } - ] -} -``` + + + ```yaml title="Package or config.yaml" + models: + - name: Flowise + provider: flowise + model: + apiBase: + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "provider": "flowise", + "title": "Flowise", + "model": "", + "apiBase": "" + } + ] + ``` + + [View the source](https://github.com/continuedev/continue/blob/main/core/llm/llms/Flowise.ts) diff --git a/docs/docs/customize/model-providers/more/free-trial.mdx b/docs/docs/customize/model-providers/more/free-trial.mdx index b5fd710f8..ddc16d5e4 100644 --- a/docs/docs/customize/model-providers/more/free-trial.mdx +++ b/docs/docs/customize/model-providers/more/free-trial.mdx @@ -10,8 +10,8 @@ The `"free-trial"` provider lets new users quickly try out the best experience i While the Continue extension is always free to use, we cannot support infinite free LLM usage for all of our users. You will eventually need to either: -1. Select an open-source model to use for free [locally](../top-level/ollama.md), or -2. Add your own API key for [Anthropic](../top-level/anthropic.md) or [another LLM provider](/customize/model-providers) +1. Select an open-source model to use for free [locally](../top-level/ollama.mdx), or +2. Add your own API key for [Anthropic](../top-level/anthropic.mdx) or [another LLM provider](../../model-providers/) ## FAQ about the trial diff --git a/docs/docs/customize/model-providers/more/function-network.mdx b/docs/docs/customize/model-providers/more/function-network.mdx index b48f80f97..751fdccb6 100644 --- a/docs/docs/customize/model-providers/more/function-network.mdx +++ b/docs/docs/customize/model-providers/more/function-network.mdx @@ -20,18 +20,31 @@ To get an API key, login to the Function Network Developer Platform. If you don' Function Network supports a number of models for chat. We recommend using LLama 3.1 70b or Qwen2.5-Coder-32B-Instruct. -```json title="config.json (Deprecated)" -{ - "models": [ - { - "title": "Llama 3.1 70b", - "provider": "function-network", - "model": "meta/llama-3.1-70b-instruct", - "apiKey": "YOUR_API_KEY" - } - ] -} -``` + + + ```yaml title="Package or config.yaml" + models: + - name: Llama 3.1 70b + provider: function-network + model: meta/llama-3.1-70b-instruct + apiKey: ${{ secrets.FUNCTION_NETWORK_API_KEY }} + roles: + - chat + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "title": "Llama 3.1 70b", + "provider": "function-network", + "model": "meta/llama-3.1-70b-instruct", + "apiKey": "YOUR_API_KEY" + } + ] + ``` + + [Click here](https://docs.function.network/models-supported/chat-and-code-completion) to see a list of chat model providers. @@ -39,30 +52,56 @@ Function Network supports a number of models for chat. We recommend using LLama Function Network supports a number of models for autocomplete. We recommend using Llama 3.1 8b or Qwen2.5-Coder-1.5B. -```json title="config.json (Deprecated)" -{ - "tabAutocompleteModel": { - "title": "Deepseek Coder 6.7b", - "provider": "function-network", - "model": "thebloke/deepseek-coder-6.7b-base-awq", - "apiKey": "YOUR_API_KEY" - } -} -``` + + + ```yaml title="Package or config.yaml" + models: + - name: Deepseek Coder 6.7b + provider: function-network + model: thebloke/deepseek-coder-6.7b-base-awq + apiKey: ${{ secrets.FUNCTION_NETWORK_API_KEY }} + roles: + - autocomplete + ``` + + + ```json title="config.json (Deprecated)" + "tabAutocompleteModel": { + "title": "Deepseek Coder 6.7b", + "provider": "function-network", + "model": "thebloke/deepseek-coder-6.7b-base-awq", + "apiKey": "YOUR_API_KEY" + } + ``` + + ## Embeddings model Function Network supports a number of models for embeddings. We recommend using baai/bge-base-en-v1.5. -```json title="config.json (Deprecated)" -{ - "embeddingsProvider": { - "provider": "function-network", - "model": "baai/bge-base-en-v1.5", - "apiKey": "YOUR_API_KEY" - } -} -``` + + + ```yaml title="config.yaml" + models: + - name: BGE Base En + provider: function-network + model: baai/bge-base-en-v1.5 + apiKey: ${{ secrets.FUNCTION_NETWORK_API_KEY }} + roles: + - embed + ``` + + + ```json title="config.json (Deprecated)" + "embeddingsProvider": { + "provider": "function-network", + "model": "baai/bge-base-en-v1.5", + "apiKey": "YOUR_API_KEY" + } + ``` + + [Click here](https://docs.function.network/models-supported/embeddings) to see a list of embeddings model providers. diff --git a/docs/docs/customize/model-providers/more/groq.mdx b/docs/docs/customize/model-providers/more/groq.mdx index 13f9bbc87..4282b1293 100644 --- a/docs/docs/customize/model-providers/more/groq.mdx +++ b/docs/docs/customize/model-providers/more/groq.mdx @@ -8,15 +8,28 @@ Groq provides the fastest available inference for open-source language models, i 1. Obtain an API key [here](https://console.groq.com/keys) 2. Update your Continue config file like this: -```json title="config.json (Deprecated)" -{ - "models": [ - { - "title": "Llama 3.1 405b", - "provider": "groq", - "model": "llama3.1-405b", - "apiKey": "" - } - ] -} -``` + + + ```yaml title="Package or config.yaml" + models: + - name: Llama 3.1 405b + provider: groq + model: llama3.1-405b + apiKey: ${{ secrets.GROQ_API_KEY }} + roles: + - chat + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "title": "Llama 3.1 405b", + "provider": "groq", + "model": "llama3.1-405b", + "apiKey": "" + } + ] + ``` + + diff --git a/docs/docs/customize/model-providers/more/huggingfaceinferenceapi.mdx b/docs/docs/customize/model-providers/more/huggingfaceinferenceapi.mdx index ae08459e0..08b60c1cc 100644 --- a/docs/docs/customize/model-providers/more/huggingfaceinferenceapi.mdx +++ b/docs/docs/customize/model-providers/more/huggingfaceinferenceapi.mdx @@ -12,7 +12,7 @@ Hugging Face Inference Endpoints are an easy way to setup instances of open-sour - name: Hugging Face Inference API provider: huggingface-inference-api model: MODEL_NAME - apiKeySecret: HF_TOKEN + apiKey: ${{ secrets.HF_API_KEY }} apiBase: HF_URL_BASE ``` diff --git a/docs/docs/customize/model-providers/more/ipex_llm.mdx b/docs/docs/customize/model-providers/more/ipex_llm.mdx index c711a81ac..2413aa6ce 100644 --- a/docs/docs/customize/model-providers/more/ipex_llm.mdx +++ b/docs/docs/customize/model-providers/more/ipex_llm.mdx @@ -9,35 +9,54 @@ import TabItem from "@theme/TabItem"; IPEX-LLM supports accelerated Ollama backend to be hosted on Intel GPU. Refer to [this guide](https://ipex-llm.readthedocs.io/en/latest/doc/LLM/Quickstart/ollama_quickstart.html) from IPEX-LLM official documentation about how to install and run Ollama serve accelerated by IPEX-LLM on Intel GPU. You can then configure Continue to use the IPEX-LLM accelerated `"ollama"` provider as follows: -```json title="config.json (Deprecated)" -{ - "models": [ - { - "title": "IPEX-LLM", - "provider": "ollama", - "model": "AUTODETECT" - } - ] -} -``` + + + ```yaml title="Package or config.yaml" + models: + - name: IPEX-LLM + provider: ollama + model: AUTODETECT + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "title": "IPEX-LLM", + "provider": "ollama", + "model": "AUTODETECT" + } + ] + ``` + + If you would like to reach the Ollama service from another machine, make sure you set or export the environment variable `OLLAMA_HOST=0.0.0.0` before executing the command `ollama serve`. Then, in the Continue configuration, set `'apiBase'` to correspond with the IP address / port of the remote machine. That is, Continue can be configured to be: -```json title="config.json (Deprecated)" -{ - "models": [ - { - "title": "IPEX-LLM", - "provider": "ollama", - "model": "AUTODETECT", - "apiBase": "http://your-ollama-service-ip:11434" - } - ] -} -``` + + + ```yaml title="Package or config.yaml" + models: + - name: IPEX-LLM + provider: ollama + model: AUTODETECT + apiBase: http://your-ollama-service-ip:11434 + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "title": "IPEX-LLM", + "provider": "ollama", + "model": "AUTODETECT", + "apiBase": "http://your-ollama-service-ip:11434" + } + ] + ``` + + :::tip - If you would like to preload the model before your first conversation with that model in Continue, you could refer to [here](https://ipex-llm.readthedocs.io/en/latest/doc/LLM/Quickstart/continue_quickstart.html#pull-and-prepare-the-model) for more information. - ::: diff --git a/docs/docs/customize/model-providers/more/kindo.mdx b/docs/docs/customize/model-providers/more/kindo.mdx index 745ec3019..cb0c87922 100644 --- a/docs/docs/customize/model-providers/more/kindo.mdx +++ b/docs/docs/customize/model-providers/more/kindo.mdx @@ -7,34 +7,58 @@ Kindo offers centralized control over your organization's AI operations, ensurin ## Config Example -```json title="config.json (Deprecated)" -{ - "models": [ - { - "title": "Claude 3.5 Sonnet", - "provider": "kindo", - "model": "claude-3-5-sonnet", - "apiKey": "" - } - ] -} -``` + + + ```yaml title="Package or config.yaml" + models: + - name: Claude 3.5 Sonnet + provider: kindo + model: claude-3-5-sonnet + apiKey: ${{ secrets.KINDO_API_KEY }} + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "title": "Claude 3.5 Sonnet", + "provider": "kindo", + "model": "claude-3-5-sonnet", + "apiKey": "" + } + ] + ``` + + ## Tab Autocomplete Config Example -```json title="config.json (Deprecated)" -{ - "tabAutocompleteModel": [ - { - "title": "WhiteRabbitNeo", - "provider": "kindo", - "model": "/models/WhiteRabbitNeo-33B-DeepSeekCoder", - "apiKey": "", - "template": "none" - } - ] -} -``` + + + ```yaml title="Package or config.yaml" + models: + - name: WhiteRabbitNeo + provider: kindo + model: /models/WhiteRabbitNeo-33B-DeepSeekCoder + apiKey: ${{ secrets.KINDO_API_KEY }} + roles: + - autocomplete + ``` + + + ```json title="config.json (Deprecated)" + "tabAutocompleteModel": [ + { + "title": "WhiteRabbitNeo", + "provider": "kindo", + "model": "/models/WhiteRabbitNeo-33B-DeepSeekCoder", + "apiKey": "", + "template": "none" + } + ] + ``` + + ## Security diff --git a/docs/docs/customize/model-providers/more/llamacpp.mdx b/docs/docs/customize/model-providers/more/llamacpp.mdx index 12f2264d8..b8d43a830 100644 --- a/docs/docs/customize/model-providers/more/llamacpp.mdx +++ b/docs/docs/customize/model-providers/more/llamacpp.mdx @@ -11,17 +11,28 @@ Run the llama.cpp server binary to start the API server. If running on a remote After it's up and running, change `~/.continue/config.json` to look like this: -```json title="config.json (Deprecated)" -{ - "models": [ - { - "title": "Llama CPP", - "provider": "llama.cpp", - "model": "MODEL_NAME", - "apiBase": "http://localhost:8080" - } - ] -} -``` + + + ```yaml title="Package or config.yaml" + models: + - name: Llama CPP + provider: llama.cpp + model: MODEL_NAME + apiBase: http://localhost:8080 + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "title": "Llama CPP", + "provider": "llama.cpp", + "model": "MODEL_NAME", + "apiBase": "http://localhost:8080" + } + ] + ``` + + [View the source](https://github.com/continuedev/continue/blob/main/core/llm/llms/LlamaCpp.ts) diff --git a/docs/docs/customize/model-providers/more/llamafile.mdx b/docs/docs/customize/model-providers/more/llamafile.mdx index 58df64c23..4563bf630 100644 --- a/docs/docs/customize/model-providers/more/llamafile.mdx +++ b/docs/docs/customize/model-providers/more/llamafile.mdx @@ -5,16 +5,26 @@ import TabItem from "@theme/TabItem"; A [llamafile](https://github.com/Mozilla-Ocho/llamafile#readme) is a self-contained binary that can run an open-source LLM. You can configure this provider in your config.json as follows: -```json title="config.json (Deprecated)" -{ - "models": [ - { - "title": "Llamafile", - "provider": "llamafile", - "model": "mistral-7b" - } - ] -} -``` + + + ```yaml title="config.yaml" + models: + - name: Llamafile + provider: llamafile + model: mistral-7b + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "title": "Llamafile", + "provider": "llamafile", + "model": "mistral-7b" + } + ] + ``` + + [View the source](https://github.com/continuedev/continue/blob/main/core/llm/llms/Llamafile.ts) diff --git a/docs/docs/customize/model-providers/more/lmstudio.mdx b/docs/docs/customize/model-providers/more/lmstudio.mdx index 6bca26aa9..b3d5d31b2 100644 --- a/docs/docs/customize/model-providers/more/lmstudio.mdx +++ b/docs/docs/customize/model-providers/more/lmstudio.mdx @@ -5,43 +5,77 @@ import TabItem from "@theme/TabItem"; [LM Studio](https://lmstudio.ai) is an application for Mac, Windows, and Linux that makes it easy to locally run open-source models and comes with a great UI. To get started with LM Studio, download from the website, use the UI to download a model, and then start the local inference server. Continue can then be configured to use the `LMStudio` LLM class: -```json title="config.json (Deprecated)" -{ - "models": [ - { - "title": "LM Studio", - "provider": "lmstudio", - "model": "llama2-7b" - } - ] -} -``` + + + ```yaml title="Package or config.yaml" + models: + - name: LM Studio + provider: lmstudio + model: llama2-7b + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "title": "LM Studio", + "provider": "lmstudio", + "model": "llama2-7b" + } + ] + ``` + + ### Embeddings model LMStudio supports embeddings endpoints, and comes with the `nomic-ai/nomic-embed-text-v1.5-GGUF` model (as of Nov 2024, check your models) -```json title="config.json (Deprecated)" -{ - "embeddingsProvider": { - "provider": "lmstudio", - "model": "nomic-ai/nomic-embed-text-v1.5-GGUF" - } -} -``` + + + ```yaml title="Package or config.yaml" + models: + - name: Nomic Embed Text + provider: lmstudio + model: nomic-ai/nomic-embed-text-v1.5-GGUF + roles: + - embed + ``` + + + ```json title="config.json (Deprecated)" + "embeddingsProvider": { + "provider": "lmstudio", + "model": "nomic-ai/nomic-embed-text-v1.5-GGUF" + } + ``` + + ## Setting up a remote instance To configure a remote instance of LM Studio, add the `"apiBase"` property to your model in config.json: -```json title="config.json (Deprecated)" -{ - "title": "LM Studio", - "model": "codestral", - "provider": "lmstudio", - "apiBase": "http://x.x.x.x:1234/v1/" -} -``` + + + ```yaml title="Package or config.yaml" + models: + - name: Nomic Embed Text + provider: lmstudio + model: nomic-ai/nomic-embed-text-v1.5-GGUF + roles: + - embed + ``` + + + ```json title="config.json (Deprecated)" + "embeddingsProvider": { + "provider": "lmstudio", + "model": "nomic-ai/nomic-embed-text-v1.5-GGUF" + } + ``` + + This `apiBase` will now be used instead of the default `http://localhost:1234/v1`. diff --git a/docs/docs/customize/model-providers/more/moonshot.mdx b/docs/docs/customize/model-providers/more/moonshot.mdx index 0a6f5381e..e9e9d4f1a 100644 --- a/docs/docs/customize/model-providers/more/moonshot.mdx +++ b/docs/docs/customize/model-providers/more/moonshot.mdx @@ -10,20 +10,31 @@ import TabItem from "@theme/TabItem"; To use Moonshot AI models, you need to: 1. Get an API key from [Moonshot AI Platform](https://platform.moonshot.cn/) -2. Add the following configuration to your `config.json`: +2. Add the following configuration: -```json title="config.json (Deprecated)" -{ - "models": [ - { - "title": "Moonshot", - "provider": "moonshot", - "model": "moonshot-v1-8k", - "apiKey": "YOUR_API_KEY" - } - ] -} -``` + + + ```yaml title="Package or config.yaml" + models: + - name: Moonshot + provider: moonshot + model: moonshot-v1-8k + apiKey: apiKey: ${{ secrets.MOONSHOT_API_KEY }} + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "title": "Moonshot", + "provider": "moonshot", + "model": "moonshot-v1-8k", + "apiKey": "YOUR_API_KEY" + } + ] + ``` + + ## Available Models @@ -45,20 +56,35 @@ Moonshot AI currently provides the following models: Here's a complete configuration example: -```json title="config.json (Deprecated)" -{ - "models": [ - { - "title": "Moonshot-8K", - "provider": "moonshot", - "model": "moonshot-v1-8k", - "apiKey": "YOUR_API_KEY", - "completionOptions": { - "temperature": 0.7, - "topP": 0.95, - "maxTokens": 2048 + + + ```yaml title="Package or config.yaml" + models: + - name: Moonshot-8K + provider: moonshot + model: moonshot-v1-8k + apiKey: apiKey: ${{ secrets.MOONSHOT_API_KEY }} + defaultCompletionOptions: + temperature: 0.7 + topP: 0.95 + maxTokens: 2048 + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "title": "Moonshot-8K", + "provider": "moonshot", + "model": "moonshot-v1-8k", + "apiKey": "YOUR_API_KEY", + "completionOptions": { + "temperature": 0.7, + "topP": 0.95, + "maxTokens": 2048 + } } - } - ] -} -``` + ] + ``` + + diff --git a/docs/docs/customize/model-providers/more/msty.mdx b/docs/docs/customize/model-providers/more/msty.mdx index 77d9a1056..b741a314d 100644 --- a/docs/docs/customize/model-providers/more/msty.mdx +++ b/docs/docs/customize/model-providers/more/msty.mdx @@ -5,18 +5,27 @@ import TabItem from "@theme/TabItem"; [Msty](https://msty.app/) is an application for Windows, Mac, and Linux that makes it really easy to run online as well as local open-source models, including Llama-2, DeepSeek Coder, etc. No need to fidget with your terminal, run a command, or anything. Just download the app from the website, click a button, and you are up and running. Continue can then be configured to use the `Msty` LLM class: -```json title="config.json (Deprecated)" -{ - "models": [ - { - "title": "Msty", - "provider": "msty", - "model": "deepseek-coder:6.7b", - "completionOptions": {} - } - ] -} -``` + + + ```yaml title="Package or config.yaml" + models: + - name: Msty + provider: msty + model: deepseek-coder:6.7b + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "title": "Msty", + "provider": "msty", + "model": "deepseek-coder:6.7b", + } + ] + ``` + + ## Completion Options @@ -33,21 +42,34 @@ In addition to the model type, you can also configure some of the parameters tha If you need to send custom headers for authentication, you may use the `requestOptions.headers` property like this: -```json title="config.json (Deprecated)" -{ - "models": [ - { - "title": "Msty", - "provider": "msty", - "model": "deepseek-coder:6.7b", - "requestOptions": { - "headers": { - "Authorization": "Bearer xxx" + + + ```yaml title="Package or config.yaml" + models: + - name: Msty + provider: msty + model: deepseek-coder:6.7b + requestOptions: + headers: + Authorization: Bearer xxx + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "title": "Msty", + "provider": "msty", + "model": "deepseek-coder:6.7b", + "requestOptions": { + "headers": { + "Authorization": "Bearer xxx" + } } } - } - ] -} -``` + ] + ``` + + [View the source](https://github.com/continuedev/continue/blob/main/core/llm/llms/Msty.ts) diff --git a/docs/docs/customize/model-providers/more/nebius.mdx b/docs/docs/customize/model-providers/more/nebius.mdx index ec32edd23..5c010d38c 100644 --- a/docs/docs/customize/model-providers/more/nebius.mdx +++ b/docs/docs/customize/model-providers/more/nebius.mdx @@ -11,29 +11,53 @@ Available models can be found on the [Nebius AI Studio models page](https://stud ## Chat model -```json title="config.json (Deprecated)" -{ - "models": [ - { - "title": "Llama 3.1 405b", - "provider": "nebius", - "model": "llama3.1-405b", - "apiKey": "[API_KEY]" - } - ] -} -``` + + + ```yaml title="Package or config.yaml" + models: + - name: Llama 3.1 405b + provider: nebius + model: llama3.1-405b + apiKey: ${{ secrets.NEBIUS_API_KEY }} + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "title": "Llama 3.1 405b", + "provider": "nebius", + "model": "llama3.1-405b", + "apiKey": "[API_KEY]" + } + ] + ``` + + ## Embeddings model Available models can be found on the [Nebius AI Studio embeddings page](https://studio.nebius.ai/models/embedding) -```json title="config.json (Deprecated)" -{ - "embeddingsProvider": { - "provider": "nebius", - "model": "BAAI/bge-en-icl", - "apiKey": "[API_KEY]" - } -} -``` + + + ```yaml title="config.yaml" + models: + - name: BAAI Embedder + provider: nebius + model: BAAI/bge-en-icl + apiKey: ${{ secrets.NEBIUS_API_KEY }} + roles: + - embed + ``` + + + ```json title="config.json (Deprecated)" + "embeddingsProvider": { + "provider": "nebius", + "model": "BAAI/bge-en-icl", + "apiKey": "[API_KEY]" + } + ``` + + diff --git a/docs/docs/customize/model-providers/more/novita.mdx b/docs/docs/customize/model-providers/more/novita.mdx index 799a4cf62..1fb2b2644 100644 --- a/docs/docs/customize/model-providers/more/novita.mdx +++ b/docs/docs/customize/model-providers/more/novita.mdx @@ -5,17 +5,28 @@ import TabItem from "@theme/TabItem"; [Novita AI](https://novita.ai?utm_source=github_continuedev&utm_medium=github_readme&utm_campaign=github_link) offers an affordable, reliable, and simple inference platform with scalable [LLM API](https://novita.ai/docs/model-api/reference/introduction.html), empowering developers to build AI applications. Try the [Novita AI Llama 3 API Demo](https://novita.ai/model-api/product/llm-api/playground/meta-llama-llama-3.1-70b-instruct?utm_source=github_continuedev&utm_medium=github_readme&utm_campaign=github_link) today!. You can sign up [here](https://novita.ai/user/login?&redirect=/&utm_source=github_continuedev&utm_medium=github_readme&utm_campaign=github_link), copy your API key on the [Key Management](https://novita.ai/settings/key-management?utm_source=github_continuedev&utm_medium=github_readme&utm_campaign=github_link), and then hit the play button on any model from the [Novita AI Models list](https://novita.ai/llm-api?utm_source=github_continuedev&utm_medium=github_readme&utm_campaign=github_link). Change `~/.continue/config.json` to look like this: -```json title="config.json (Deprecated)" -{ - "models": [ - { - "title": "Llama 3.1 8B", - "provider": "novita", - "model": "meta-llama/llama-3.1-8b-instruct", - "apiKey": "YOUR_API_KEY" - } - ] -} -``` + + + ```yaml title="Package or config.yaml" + models: + - name: Llama 3.1 8B + provider: novita + model: meta-llama/llama-3.1-8b-instruct + apiKey: ${{ secrets.NOVITA_API_KEY }} + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "title": "Llama 3.1 8B", + "provider": "novita", + "model": "meta-llama/llama-3.1-8b-instruct", + "apiKey": "YOUR_API_KEY" + } + ] + ``` + + [View the source](https://github.com/continuedev/continue/blob/main/core/llm/llms/Novita.ts) diff --git a/docs/docs/customize/model-providers/more/nvidia.mdx b/docs/docs/customize/model-providers/more/nvidia.mdx index fde522cea..b60c99a4e 100644 --- a/docs/docs/customize/model-providers/more/nvidia.mdx +++ b/docs/docs/customize/model-providers/more/nvidia.mdx @@ -13,18 +13,29 @@ import TabItem from "@theme/TabItem"; We recommend configuring **Nemotron-4-340B-Instruct** as your chat model. -```json title="config.json (Deprecated)" -{ - "models": [ - { - "title": "Nemotron-4-340B-Instruct", - "provider": "nvidia", - "model": "nvidia-nemotron-4-340b-instruct", - "apiKey": "[API_KEY]" - } - ] -} -``` + + + ```yaml title="config.yaml" + models: + - name: Nemotron-4-340B-Instruct + provider: nvidia + model: nvidia-nemotron-4-340b-instruct + apiKey: ${{ secrets.NVIDIA_API_KEY }} + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "title": "Nemotron-4-340B-Instruct", + "provider": "nvidia", + "model": "nvidia-nemotron-4-340b-instruct", + "apiKey": "[API_KEY]" + } + ] + ``` + + ## Autocomplete model @@ -36,18 +47,31 @@ NVIDIA currently does not offer any autocomplete models. We recommend configuring **NVIDIA Retrieval QA Mistral 7B** as your embeddings model. -```json title="config.json (Deprecated)" -{ - "embeddingsProvider": { - "provider": "nvidia", - "model": "nvidia/nv-embedqa-mistral-7b-v2", - "apiKey": "[API_KEY]" - } -} -``` + + + ```yaml title="config.yaml" + models: + - name: Nvidia Embedder + provider: nvidia + model: nvidia/nv-embedqa-mistral-7b-v2 + apiKey: ${{ secrets.NVIDIA_API_KEY }} + roles: + - embed + ``` + + + ```json title="config.json (Deprecated)" + "embeddingsProvider": { + "provider": "nvidia", + "model": "nvidia/nv-embedqa-mistral-7b-v2", + "apiKey": "[API_KEY]" + } + ``` + + ## Reranking model NVIDIA currently does not offer any reranking models. -[Click here](../../model-types/reranking.md) to see a list of reranking model providers. +[Click here](../../model-types/reranking.mdx) to see a list of reranking model providers. diff --git a/docs/docs/customize/model-providers/more/openrouter.mdx b/docs/docs/customize/model-providers/more/openrouter.mdx index 7f01c463a..c112cda36 100644 --- a/docs/docs/customize/model-providers/more/openrouter.mdx +++ b/docs/docs/customize/model-providers/more/openrouter.mdx @@ -7,37 +7,64 @@ OpenRouter is a unified interface for commercial and open-source models, giving Change `~/.continue/config.json` to look like the following. -```json title="config.json (Deprecated)" -{ - "models": [ - { - "title": "OpenRouter LLaMA 70 8B", - "provider": "openrouter", - "model": "meta-llama/llama-3-70b-instruct", - "apiBase": "https://openrouter.ai/api/v1", - "apiKey": "..." - } - ] -} -``` + + + ```yaml title="Package or config.yaml" + models: + - name: OpenRouter LLaMA 70 8B + provider: openrouter + model: meta-llama/llama-3-70b-instruct + apiBase: https://openrouter.ai/api/v1 + apiKey: ${{ secrets.OPEN_ROUTER_API_KEY }} + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "title": "OpenRouter LLaMA 70 8B", + "provider": "openrouter", + "model": "meta-llama/llama-3-70b-instruct", + "apiBase": "https://openrouter.ai/api/v1", + "apiKey": "" + } + ] + ``` + + To utilize features such as provider preferences or model routing configuration, include these parameters inside the `models[].requestsOptions.extraBodyProperties` field of your plugin config. For example, to prevent extra long prompts from being compressed, you can explicitly turn off the feature like so: -```json title="config.json (Deprecated)" -{ - "models": [ - { - ... - "requestOptions": { - "extraBodyProperties": { - "transforms": [] + + + ```yaml title="Package or config.yaml" + models: + - name: Example Model + provider: exampleProvider + model: example-model + requestOptions: + extraBodyProperties: + transforms: [] + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "title": "Example Model", + "provider": "exampleProvider", + "model": "example-model", + "requestOptions": { + "extraBodyProperties": { + "transforms": [] + } + } } - } - } - ] -} -``` + ] + ``` + + Learn more about available settings [here](https://openrouter.ai/docs). diff --git a/docs/docs/customize/model-providers/more/replicatellm.mdx b/docs/docs/customize/model-providers/more/replicatellm.mdx index c87b152a3..f226b082e 100644 --- a/docs/docs/customize/model-providers/more/replicatellm.mdx +++ b/docs/docs/customize/model-providers/more/replicatellm.mdx @@ -5,18 +5,29 @@ import TabItem from "@theme/TabItem"; Replicate is a great option for newly released language models or models that you've deployed through their platform. Sign up for an account [here](https://replicate.ai/), copy your API key, and then select any model from the [Replicate Streaming List](https://replicate.com/collections/streaming-language-models). Change `~/.continue/config.json` to look like this: -```json title="config.json (Deprecated)" -{ - "models": [ - { - "title": "Replicate CodeLLama", - "provider": "replicate", - "model": "codellama-13b", - "apiKey": "YOUR_API_KEY" - } - ] -} -``` + + + ```yaml title="Package or config.yaml" + models: + - name: Replicate CodeLLama + provider: replicate + model: codellama-13b + apiKey: ${{ secrets.REPLICATE_API_KEY }} + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "title": "Replicate CodeLLama", + "provider": "replicate", + "model": "codellama-13b", + "apiKey": "REPLICATE_API_KEY" + } + ] + ``` + + If you don't specify the `model` parameter, it will default to `replicate/llama-2-70b-chat:58d078176e02c219e11eb4da5a02a7830a283b14cf8f94537af893ccff5ee781`. diff --git a/docs/docs/customize/model-providers/more/sagemaker.mdx b/docs/docs/customize/model-providers/more/sagemaker.mdx index c39b5bc7f..9a25b3990 100644 --- a/docs/docs/customize/model-providers/more/sagemaker.mdx +++ b/docs/docs/customize/model-providers/more/sagemaker.mdx @@ -5,24 +5,42 @@ import TabItem from "@theme/TabItem"; SageMaker can be used for both chat and embedding models. Chat models are supported for endpoints deployed with [LMI](https://docs.djl.ai/docs/serving/serving/docs/lmi/index.html), and embedding models are supported for endpoints deployed with [HuggingFace TEI](https://huggingface.co/blog/sagemaker-huggingface-embedding) -To setup SageMaker as a chat model provider, add the following to your `config.json` file: +Here is an example Sagemaker configuration setup: -```json title="config.json (Deprecated)" -{ - "models": [ - { - "title": "deepseek-6.7b-instruct", + + + ```yaml title="config.yaml" + models: + - name: deepseek-6.7b-instruct + provider: sagemaker + model: lmi-model-deepseek-coder-xxxxxxx + region: us-west-2 + roles: + - chat + - name: mxbai-embed + provider: sagemaker + model: mxbai-embed-large-v1-endpoint + roles: + - embed + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "title": "deepseek-6.7b-instruct", + "provider": "sagemaker", + "model": "lmi-model-deepseek-coder-xxxxxxx", + "region": "us-west-2" + } + ], + "embeddingsProvider": { "provider": "sagemaker", - "model": "lmi-model-deepseek-coder-xxxxxxx", - "region": "us-west-2" + "model": "mxbai-embed-large-v1-endpoint" } - ], - "embeddingsProvider": { - "provider": "sagemaker", - "model": "mxbai-embed-large-v1-endpoint" - } -} -``` + ``` + + The value in model should be the SageMaker endpoint name you deployed. diff --git a/docs/docs/customize/model-providers/more/scaleway.mdx b/docs/docs/customize/model-providers/more/scaleway.mdx index 3f0d8ac54..46681134b 100644 --- a/docs/docs/customize/model-providers/more/scaleway.mdx +++ b/docs/docs/customize/model-providers/more/scaleway.mdx @@ -16,18 +16,29 @@ Read the [quickstart documentation here](https://www.scaleway.com/en/docs/ai-dat We recommend configuring **Qwen2.5-Coder-32B-Instruct** as your chat model. [Click here](https://www.scaleway.com/en/docs/ai-data/generative-apis/reference-content/supported-models/) to see the list of available chat models. -```json title="config.json (Deprecated)" -{ - "models": [ - { - "title": "Qwen2.5-Coder-32B-Instruct", - "provider": "scaleway", - "model": "qwen2.5-coder-32b-instruct", - "apiKey": "[API_KEY]" - } - ] -} -``` + + + ```yaml title="Package or config.yaml" + models: + - name: Qwen2.5-Coder-32B-Instruct + provider: scaleway + model: qwen2.5-coder-32b-instruct + apiKey: ${{ secrets.SCALEWAY_API_KEY }} + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "title": "Qwen2.5-Coder-32B-Instruct", + "provider": "scaleway", + "model": "qwen2.5-coder-32b-instruct", + "apiKey": "[API_KEY]" + } + ] + ``` + + ## Autocomplete model @@ -39,12 +50,25 @@ Scaleway currently does not offer any autocomplete models. We recommend configuring **BGE-Multilingual-Gemma2** as your embeddings model. -```json title="config.json (Deprecated)" -{ - "embeddingsProvider": { - "provider": "scaleway", - "model": "bge-multilingual-gemma2", - "apiKey": "[API_KEY]" - } -} -``` + + + ```yaml title="config.yaml" + models: + - name: BGE Multilingual Gemma2 + provider: scaleway + model: bge-multilingual-gemma2 + apiKey: ${{ secrets.SCALEWAY_API_KEY }} + roles: + - embed + ``` + + + ```json title="config.json (Deprecated)" + "embeddingsProvider": { + "provider": "scaleway", + "model": "bge-multilingual-gemma2", + "apiKey": "[API_KEY]" + } + ``` + + diff --git a/docs/docs/customize/model-providers/more/siliconflow.mdx b/docs/docs/customize/model-providers/more/siliconflow.mdx index d5814d567..2dba25ec8 100644 --- a/docs/docs/customize/model-providers/more/siliconflow.mdx +++ b/docs/docs/customize/model-providers/more/siliconflow.mdx @@ -13,33 +13,67 @@ You can get an API key from the [Silicon Cloud](https://cloud.siliconflow.cn/acc We recommend configuring **Qwen/Qwen2.5-Coder-32B-Instruct** as your chat model. -```json title="config.json (Deprecated)" -{ - "models": [ - { - "title": "Qwen", - "provider": "siliconflow", - "model": "Qwen/Qwen2.5-Coder-32B-Instruct", - "apiKey": "[API_KEY]" - } - ] -} -``` + + + ```yaml title="config.yaml" + models: + - name: Qwen + provider: siliconflow + model: Qwen/Qwen2.5-Coder-32B-Instruct + apiKey: ${{ secrets.SILICONFLOW_API_KEY }} + roles: + - chat + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "title": "Qwen", + "provider": "siliconflow", + "model": "Qwen/Qwen2.5-Coder-32B-Instruct", + "apiKey": "[API_KEY]" + } + ] + ``` + + ## Autocomplete model We recommend configuring **Qwen/Qwen2.5-Coder-7B-Instruct** as your autocomplete model. -```json title="config.json (Deprecated)" -{ - "tabAutocompleteModel": { - "title": "Qwen", - "provider": "siliconflow", - "model": "Qwen/Qwen2.5-Coder-7B-Instruct", - "apiKey": "[API_KEY]" - } -} -``` + + + ```yaml title="config.yaml" + models: + - name: Qwen + provider: siliconflow + model: Qwen/Qwen2.5-Coder-32B-Instruct + apiKey: ${{ secrets.SILICONFLOW_API_KEY }} + roles: + - autocomplete + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "title": "Qwen", + "provider": "siliconflow", + "model": "Qwen/Qwen2.5-Coder-32B-Instruct", + "apiKey": "[API_KEY]" + } + ] + "tabAutocompleteModel": { + "title": "Qwen", + "provider": "siliconflow", + "model": "Qwen/Qwen2.5-Coder-7B-Instruct", + "apiKey": "[API_KEY]" + } + ``` + + ## Embeddings model diff --git a/docs/docs/customize/model-providers/more/textgenwebui.mdx b/docs/docs/customize/model-providers/more/textgenwebui.mdx index ea9c626b5..a61230bf2 100644 --- a/docs/docs/customize/model-providers/more/textgenwebui.mdx +++ b/docs/docs/customize/model-providers/more/textgenwebui.mdx @@ -3,17 +3,28 @@ import TabItem from "@theme/TabItem"; # TextGenWebUI -TextGenWebUI is a comprehensive, open-source language model UI and local server. You can set it up with an OpenAI-compatible server plugin, and then configure it in your `config.json` like this: +TextGenWebUI is a comprehensive, open-source language model UI and local server. You can set it up with an OpenAI-compatible server plugin, and then configure it like this: -```json title="config.json (Deprecated)" -{ - "models": [ - { - "title": "Text Generation WebUI", - "provider": "text-gen-webui", - "apiBase": "http://localhost:5000/v1", - "model": "MODEL_NAME" - } - ] -} -``` + + + ```yaml title="Package or config.yaml" + models: + - name: Text Generation WebUI + provider: text-gen-webui + apiBase: http://localhost:5000/v1 + model: MODEL_NAME + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "title": "Text Generation WebUI", + "provider": "text-gen-webui", + "apiBase": "http://localhost:5000/v1", + "model": "MODEL_NAME" + } + ] + ``` + + diff --git a/docs/docs/customize/model-providers/more/together.mdx b/docs/docs/customize/model-providers/more/together.mdx index 095005bf5..2e776da1c 100644 --- a/docs/docs/customize/model-providers/more/together.mdx +++ b/docs/docs/customize/model-providers/more/together.mdx @@ -12,7 +12,7 @@ The Together API is a cloud platform for running large AI models. You can sign u - name: Together Qwen2.5 Coder provider: together model: Qwen/Qwen2.5-Coder-32B-Instruct - apiKeySecret: TOGETHER_API_KEY + apiKey: ${{ secrets.TOGETHER_API_KEY }} ``` diff --git a/docs/docs/customize/model-providers/more/vllm.mdx b/docs/docs/customize/model-providers/more/vllm.mdx index 3bbf89707..ec962347a 100644 --- a/docs/docs/customize/model-providers/more/vllm.mdx +++ b/docs/docs/customize/model-providers/more/vllm.mdx @@ -13,50 +13,87 @@ vllm serve meta-llama/Meta-Llama-3.1-8B-Instruct We recommend configuring **Llama3.1 8B** as your chat model. -```json title="config.json (Deprecated)" -{ - "models": [ - { - "title": "Llama3.1 8B Instruct", - "provider": "vllm", - "model": "meta-llama/Meta-Llama-3.1-8B-Instruct", - "apiBase": "http:///v1" - } - ] -} -``` + + + ```yaml title="config.yaml" + models: + - name: Llama3.1 8B Instruct + provider: vllm + model: meta-llama/Meta-Llama-3.1-8B-Instruct + apiBase: http:///v1 + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "title": "Llama3.1 8B Instruct", + "provider": "vllm", + "model": "meta-llama/Meta-Llama-3.1-8B-Instruct", + "apiBase": "http:///v1" + } + ] + ``` + + ## Autocomplete model We recommend configuring **Qwen2.5-Coder 1.5B** as your autocomplete model. -```json title="config.json (Deprecated)" -{ - "tabAutocompleteModel": { - "title": "Qwen2.5-Coder 1.5B", - "provider": "vllm", - "model": "Qwen/Qwen2.5-Coder-1.5B" - "apiBase": "http:///v1" - } -} -``` + + + ```yaml title="Package or config.yaml" + models: + - name: Qwen2.5-Coder 1.5B + provider: vllm + model: Qwen/Qwen2.5-Coder-1.5B + apiBase: http:///v1 + roles: + - autocomplete + ``` + + + ```json title="config.json (Deprecated)" + "tabAutocompleteModel": { + "title": "Qwen2.5-Coder 1.5B", + "provider": "vllm", + "model": "Qwen/Qwen2.5-Coder-1.5B", + "apiBase": "http:///v1" + } + ``` + + ## Embeddings model We recommend configuring **Nomic Embed Text** as your embeddings model. -```json title="config.json (Deprecated)" -{ - "embeddingsProvider": { - "provider": "vllm", - "model": "nomic-ai/nomic-embed-text-v1" - "apiBase": "http:///v1" - } -} -``` + + + ```yaml title="Package or config.yaml" + models: + - name: VLLM Nomad Embed Text + provider: vllm + model: nomic-ai/nomic-embed-text-v1 + apiBase: http:///v1 + roles: + - embed + ``` + + + ```json title="config.json (Deprecated)" + "embeddingsProvider": { + "provider": "vllm", + "model": "nomic-ai/nomic-embed-text-v1", + "apiBase": "http:///v1" + } + ``` + + ## Reranking model -[Click here](../../model-types/reranking.md) to see a list of reranking model providers. +[Click here](../../model-types/reranking.mdx) to see a list of reranking model providers. -The continue implementation uses [OpenAI](../top-level/openai.md) under the hood. [View the source](https://github.com/continuedev/continue/blob/main/core/llm/llms/Vllm.ts) +The continue implementation uses [OpenAI](../top-level/openai.mdx) under the hood. [View the source](https://github.com/continuedev/continue/blob/main/core/llm/llms/Vllm.ts) diff --git a/docs/docs/customize/model-providers/more/watsonx.mdx b/docs/docs/customize/model-providers/more/watsonx.mdx index 428e7f0d3..f468af6e1 100644 --- a/docs/docs/customize/model-providers/more/watsonx.mdx +++ b/docs/docs/customize/model-providers/more/watsonx.mdx @@ -41,100 +41,184 @@ To authenticate to your watsonx.ai Software instance with Continue, you can use ## Configuration -Add the following configuration to your `config.json` file to use the watsonx provider. +Add the following configuration: -```json title="~/.continue/config.json" -{ - "models": [ - { - "model": "model ID", - "title": "watsonx - Model Name", - "provider": "watsonx", - "apiBase": "watsonx endpoint e.g. https://us-south.ml.cloud.ibm.com", - "projectId": "PROJECT_ID", - "apiKey": "API_KEY/ZENAPI_KEY/USERNAME:PASSWORD", - "apiVersion": "2024-03-14" - } - ] -} -``` + + + ```yaml title="Package or config.yaml" + models: + - name: watsonx - Model Name + provider: watsonx + model: model ID + apiBase: https://us-south.ml.cloud.ibm.com + projectId: PROJECT_ID + apiKey: API_KEY/ZENAPI_KEY/USERNAME:PASSWORD + apiVersion: 2024-03-14 + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "model": "model ID", + "title": "watsonx - Model Name", + "provider": "watsonx", + "apiBase": "https://us-south.ml.cloud.ibm.com", + "projectId": "PROJECT_ID", + "apiKey": "API_KEY/ZENAPI_KEY/USERNAME:PASSWORD", + "apiVersion": "2024-03-14" + } + ] + ``` + + `apiVersion` is optional and defaults to the latest version. If you are using a custom deployment endpoint, set `deploymentID` to the model's deployment ID. You can find it in the watsonx.ai Prompt Lab UI by selecting the corresponding model and opening the `` tab on the right, which will display the endpoint's URL containing the deployment ID. -```json title="~/.continue/config.json" -{ - "models": [ - { - "model": "model ID", - "title": "watsonx - Model Name", - "provider": "watsonx", - "apiBase": "watsonx endpoint e.g. https://us-south.ml.cloud.ibm.com", - "apiKey": "API_KEY/ZENAPI_KEY/USERNAME:PASSWORD", - "apiVersion": "2024-03-14", - "deploymentId": "DEPLOYMENT_ID" - } - ] -} -``` + + + ```yaml title="Package or config.yaml" + models: + - name: watsonx - Model Name + provider: watsonx + model: model ID + apiBase: watsonx endpoint e.g. https://us-south.ml.cloud.ibm.com + apiKey: API_KEY/ZENAPI_KEY/USERNAME:PASSWORD + apiVersion: 2024-03-14 + deploymentId: DEPLOYMENT_ID + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "model": "model ID", + "title": "watsonx - Model Name", + "provider": "watsonx", + "apiBase": "watsonx endpoint e.g. https://us-south.ml.cloud.ibm.com", + "apiKey": "API_KEY/ZENAPI_KEY/USERNAME:PASSWORD", + "apiVersion": "2024-03-14", + "deploymentId": "DEPLOYMENT_ID" + } + ] + ``` + + ### Configuration Options Make sure to specify a template name, such as `granite` or `llama3`, and to set the `contextLength` to the model's context window size. You can also configure generation parameters, such as temperature, topP, topK, frequency penalty, and stop sequences: -```json title="~/.continue/config.json" -{ - "models": [ - { - "model": "ibm/granite-20b-code-instruct", - "title": "Granite Code 20b", - "provider": "watsonx", - "apiBase": "watsonx endpoint e.g. https://us-south.ml.cloud.ibm.com", - "projectId": "PROJECT_ID", - "apiKey": "API_KEY/ZENAPI_KEY/USERNAME:PASSWORD", - "apiVersion": "2024-03-14", - "template": "granite", - "contextLength": 8000, - "completionOptions": { - "temperature": 0.1, - "topP": 0.3, - "topK": 20, - "maxTokens": 2000, - "frequencyPenalty": 1.1, - "stop": ["Question:", "\n\n\n"] + + + ```yaml title="config.yaml" + models: + - name: Granite Code 20b + provider: watsonx + model: ibm/granite-20b-code-instruct + apiBase: watsonx endpoint e.g. https://us-south.ml.cloud.ibm.com + projectId: PROJECT_ID + apiKey: API_KEY/ZENAPI_KEY/USERNAME:PASSWORD + apiVersion: 2024-03-14 + template: granite + contextLength: 8000 + defaultCompletionOptions: + temperature: 0.1 + topP: 0.3 + topK: 20 + maxTokens: 2000 + frequencyPenalty: 1.1 + stop: + - Question: + - "\n\n\n" + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "model": "ibm/granite-20b-code-instruct", + "title": "Granite Code 20b", + "provider": "watsonx", + "apiBase": "watsonx endpoint e.g. https://us-south.ml.cloud.ibm.com", + "projectId": "PROJECT_ID", + "apiKey": "API_KEY/ZENAPI_KEY/USERNAME:PASSWORD", + "apiVersion": "2024-03-14", + "template": "granite", + "contextLength": 8000, + "completionOptions": { + "temperature": 0.1, + "topP": 0.3, + "topK": 20, + "maxTokens": 2000, + "frequencyPenalty": 1.1, + "stop": ["Question:", "\n\n\n"] + } } - } - ] -} -``` + ] + ``` + + ## Tab Auto Complete Model Granite models are recommended for tab auto complete. The configuration is similar to that of the chat models: -```json title="~/.continue/config.json" -{ - "tabAutocompleteModel": { - "model": "ibm/granite-8b-code-instruct", - "title": "Granite Code 8b", - "provider": "watsonx", - "apiBase": "watsonx endpoint e.g. https://us-south.ml.cloud.ibm.com", - "projectId": "PROJECT_ID", - "apiKey": "API_KEY/ZENAPI_KEY/USERNAME:PASSWORD", - "apiVersion": "2024-03-14", - "contextLength": 4000 - } -} -``` + + + ```yaml title="Package or config.yaml" + models: + - name: Granite Code 8b + provider: watsonx + model: ibm/granite-8b-code-instruct + apiBase: watsonx endpoint e.g. https://us-south.ml.cloud.ibm.com + projectId: PROJECT_ID + apiKey: API_KEY/ZENAPI_KEY/USERNAME:PASSWORD + apiVersion: 2024-03-14 + roles: + - autocomplete + ``` + + + ```json title="config.json (Deprecated)" + "tabAutocompleteModel": { + "model": "ibm/granite-8b-code-instruct", + "title": "Granite Code 8b", + "provider": "watsonx", + "apiBase": "watsonx endpoint e.g. https://us-south.ml.cloud.ibm.com", + "projectId": "PROJECT_ID", + "apiKey": "API_KEY/ZENAPI_KEY/USERNAME:PASSWORD", + "apiVersion": "2024-03-14", + "contextLength": 4000 + } + ``` + + ## Embeddings Model To view the list of available embeddings models, visit [this page](https://dataplatform.cloud.ibm.com/docs/content/wsj/analyze-data/fm-models-embed.html?context=wx&pos=2#ibm-provided). -```json title="~/.continue/config.json -{ + + + ```yaml title="config.yaml" + models: + - name: Watsonx Embedder + provider: watsonx + model: ibm/slate-30m-english-rtrvr-v2 + apiBase: https://us-south.ml.cloud.ibm.com + projectId: PROJECT_ID + apiKey: API_KEY/ZENAPI_KEY/USERNAME:PASSWORD + apiVersion: 2024-03-14 + roles: + - embed + ``` + + + ```json title="config.json (Deprecated)" "embeddingsProvider": { "provider": "watsonx", "model": "ibm/slate-30m-english-rtrvr-v2", @@ -143,5 +227,6 @@ To view the list of available embeddings models, visit [this page](https://datap "apiKey": "API_KEY/ZENAPI_KEY/USERNAME:PASSWORD", "apiVersion": "2024-03-14" } -} -``` + ``` + + diff --git a/docs/docs/customize/model-providers/top-level/anthropic.mdx b/docs/docs/customize/model-providers/top-level/anthropic.mdx index 8ef4ebb64..6cfc9d06c 100644 --- a/docs/docs/customize/model-providers/top-level/anthropic.mdx +++ b/docs/docs/customize/model-providers/top-level/anthropic.mdx @@ -14,18 +14,29 @@ You can get an API key from the [Anthropic console](https://console.anthropic.co We recommend configuring **Claude 3.5 Sonnet** as your chat model. -```json title="config.json (Deprecated)" -{ - "models": [ - { - "title": "Claude 3.5 Sonnet", - "provider": "anthropic", - "model": "claude-3-5-sonnet-latest", - "apiKey": "[API_KEY]" - } - ] -} -``` + + + ```yaml title="config.yaml" + models: + - name: Claude 3.5 Sonnet + provider: anthropic + model: claude-3-5-sonnet-latest + apiKey: ${{ secrets.ANTHROPIC_API_KEY }} + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "title": "Claude 3.5 Sonnet", + "provider": "anthropic", + "model": "claude-3-5-sonnet-latest", + "apiKey": "[API_KEY]" + } + ] + ``` + + ## Autocomplete model @@ -37,13 +48,13 @@ Anthropic currently does not offer any autocomplete models. Anthropic currently does not offer any embeddings models. -[Click here](../../model-types/embeddings.md) to see a list of embeddings model providers. +[Click here](../../model-types/embeddings.mdx) to see a list of embeddings model providers. ## Reranking model Anthropic currently does not offer any reranking models. -[Click here](../../model-types/reranking.md) to see a list of reranking model providers. +[Click here](../../model-types/reranking.mdx) to see a list of reranking model providers. ## Prompt caching @@ -51,11 +62,25 @@ Anthropic supports [prompt caching with Claude](https://docs.anthropic.com/en/do To enable caching of the system message and the turn-by-turn conversation, update your your model configuration as following: -```json title="config.json (Deprecated)" -{ + + + ```yaml title="Package or config.yaml" + models: + - name: Anthropic + provider: anthropic + model: claude-3-5-sonnet-latest + apiKey: ${{ secrets.ANTHROPIC_API_KEY }} + roles: + - chat + cacheBehavior: + cacheSystemMessage: true + cacheConversation: true + ``` + + + ```json title="config.json (Deprecated)" "models": [ { - // Enable prompt caching "cacheBehavior": { "cacheSystemMessage": true, "cacheConversation": true @@ -66,5 +91,6 @@ To enable caching of the system message and the turn-by-turn conversation, updat "apiKey": "[API_KEY]" } ] -} -``` + ``` + + diff --git a/docs/docs/customize/model-providers/top-level/azure.mdx b/docs/docs/customize/model-providers/top-level/azure.mdx index 111460b73..79e4c7522 100644 --- a/docs/docs/customize/model-providers/top-level/azure.mdx +++ b/docs/docs/customize/model-providers/top-level/azure.mdx @@ -9,60 +9,101 @@ import TabItem from "@theme/TabItem"; Azure AI Foundry is a cloud-based service that provides access to models from OpenAI, Mistral AI, and others, integrated with the security and enterprise features of the Microsoft Azure platform. To get started, create an Azure AI Foundry resource in the [Azure portal](https://portal.azure.com). :::info - For details on OpenAI model setup, see [Azure OpenAI Service configuration](#general-model-configuration). - ::: ## Chat model We recommend configuring **GPT-4o** as your chat model. -```json title="config.json (Deprecated)" -"models": [{ - "title": "GPT-4o", - "provider": "azure", - "model": "gpt-4o", - "apiBase": "", - "deployment": "", - "apiKey": "" // If you use subscription key, try using Azure gateway to rename it apiKey -}] -``` + + + ```yaml title="config.yaml" + models: + - name: GPT-4o + provider: azure + model: gpt-4o + apiBase: + deployment: + apiKey: ${{ secrets.AZURE_API_KEY }} # If you use subscription key, try using Azure gateway to rename it apiKey + ``` + + + ```json title="config.json (Deprecated)" + "models": [{ + "title": "GPT-4o", + "provider": "azure", + "model": "gpt-4o", + "apiBase": "", + "deployment": "", + "apiKey": "" // If you use subscription key, try using Azure gateway to rename it apiKey + }] + ``` + + ## Autocomplete model We recommend configuring **Codestral** as your autocomplete model. -```json title="config.json (Deprecated)" -{ - "tabAutocompleteModel": { - "title": "Codestral", - "provider": "mistral", - "model": "codestral-latest" - } -} -``` + + + ```yaml title="Package or config.yaml" + models: + - name: Codestral + provider: mistral + model: codestral-latest + roles: + - autocomplete + ``` + + + ```json title="config.json (Deprecated)" + "tabAutocompleteModel": { + "title": "Codestral", + "provider": "mistral", + "model": "codestral-latest" + } + ``` + + ## Embeddings model We recommend configuring **text-embedding-3-large** as your embeddings model. -```json title="config.json (Deprecated)" -"embeddingsProvider": { - "provider": "openai", - "model": "text-embedding-3-large", - "apiBase": "", - "deployment": "", - "apiType": "azure", - "apiKey": "" -} -``` + + + ```yaml title="Package or config.yaml" + models: + - name: Text Embedding-3 Large + provider: openai + model: text-embedding-3-large + apiBase: + deployment: + apiType: azure + apiKey: ${{ secrets.AZURE_API_KEY }} + ``` + + + ```json title="config.json (Deprecated)" + "embeddingsProvider": { + "provider": "openai", + "model": "text-embedding-3-large", + "apiBase": "", + "deployment": "", + "apiType": "azure", + "apiKey": "" + } + ``` + + ## Reranking model Azure OpenAI currently does not offer any reranking models. -[Click here](../../model-types/reranking.md) to see a list of reranking models. +[Click here](../../model-types/reranking.mdx) to see a list of reranking models. ## Privacy @@ -82,14 +123,30 @@ To find this information in _Azure AI Foundry_, first select the model that you For example, a Target URI of `https://just-an-example.openai.azure.com/openai/deployments/gpt-4o-july/chat/completions?api-version=2023-03-15-preview` would map to the following: -```json title="config.json (Deprecated)" -{ - "title": "GPT-4o Azure", - "model": "gpt-4o", - "provider": "openai", - "apiBase": "https://just-an-example.openai.azure.com", - "deployment": "gpt-4o-july", - "apiVersion": "2023-03-15-preview", - "apiKey": "" -} -``` + + + ```yaml title="Package or config.yaml" + models: + - name: GPT-4o Azure + model: gpt-4o + provider: openai + apiBase: https://just-an-example.openai.azure.com + deployment: gpt-4o-july + apiVersion: 2023-03-15-preview + apiKey: ${{ secrets.AZURE_API_KEY }} + ``` + + + ```json title="config.json (Deprecated)" + { + "title": "GPT-4o Azure", + "model": "gpt-4o", + "provider": "openai", + "apiBase": "https://just-an-example.openai.azure.com", + "deployment": "gpt-4o-july", + "apiVersion": "2023-03-15-preview", + "apiKey": "" + } + ``` + + diff --git a/docs/docs/customize/model-providers/top-level/bedrock.mdx b/docs/docs/customize/model-providers/top-level/bedrock.mdx index cf6edf0e4..be716081e 100644 --- a/docs/docs/customize/model-providers/top-level/bedrock.mdx +++ b/docs/docs/customize/model-providers/top-level/bedrock.mdx @@ -161,8 +161,6 @@ To setup Bedrock using custom imported models, add the following to your config modelArn: arn:aws:bedrock:us-west-2:XXXXX:imported-model/XXXXXX region: us-west-2 profile: bedrock - roles: - - chat ``` diff --git a/docs/docs/customize/model-providers/top-level/deepseek.mdx b/docs/docs/customize/model-providers/top-level/deepseek.mdx index f6c1701f1..703959473 100644 --- a/docs/docs/customize/model-providers/top-level/deepseek.mdx +++ b/docs/docs/customize/model-providers/top-level/deepseek.mdx @@ -21,7 +21,7 @@ We recommend configuring **DeepSeek Chat** as your chat model. - name: DeepSeek Chat provider: deepseek model: deepseek-chat - apiKey: [API_KEY] + apiKey: ${{ secrets.DEEPSEEK_API_KEY }} ``` @@ -68,10 +68,10 @@ We recommend configuring **DeepSeek Coder** as your autocomplete model. DeepSeek currently does not offer any embeddings models. -[Click here](../../model-types/embeddings.md) to see a list of embeddings model providers. +[Click here](../../model-types/embeddings.mdx) to see a list of embeddings model providers. ## Reranking model DeepSeek currently does not offer any reranking models. -[Click here](../../model-types/reranking.md) to see a list of reranking model providers. +[Click here](../../model-types/reranking.mdx) to see a list of reranking model providers. diff --git a/docs/docs/customize/model-providers/top-level/gemini.mdx b/docs/docs/customize/model-providers/top-level/gemini.mdx index 490c00996..eaf4e981d 100644 --- a/docs/docs/customize/model-providers/top-level/gemini.mdx +++ b/docs/docs/customize/model-providers/top-level/gemini.mdx @@ -21,9 +21,7 @@ We recommend configuring **Gemini 1.5 Pro** as your chat model. - name: Gemini 1.5 Pro provider: gemini model: gemini-1.5-pro-latest - apiKey: "[API_KEY]" - roles: - - chat + apiKey: ${{ secrets.GEMINI_API_KEY }} ``` @@ -57,7 +55,7 @@ We recommend configuring **text-embedding-004** as your embeddings model. - name: Gemini Embeddings provider: gemini model: models/text-embedding-004 - apiKey: "[API_KEY]" + apiKey: ${{ secrets.GEMINI_API_KEY }} roles: - embed ``` @@ -77,4 +75,4 @@ We recommend configuring **text-embedding-004** as your embeddings model. Gemini currently does not offer any reranking models. -[Click here](../../model-types/reranking.md) to see a list of reranking model providers. +[Click here](../../model-types/reranking.mdx) to see a list of reranking model providers. diff --git a/docs/docs/customize/model-providers/top-level/mistral.mdx b/docs/docs/customize/model-providers/top-level/mistral.mdx index 158b8169f..4a86454eb 100644 --- a/docs/docs/customize/model-providers/top-level/mistral.mdx +++ b/docs/docs/customize/model-providers/top-level/mistral.mdx @@ -21,7 +21,7 @@ We recommend configuring **Mistral Large** as your chat model. - name: Mistral Large provider: mistral model: mistral-large-latest - apiKeySecret: MISTRAL_API_KEY + apiKey: MISTRAL_API_KEY roles: - chat ``` @@ -79,7 +79,7 @@ We recommend configuring **Mistral Embed** as your embeddings model. - name: Mistral Embed provider: mistral model: mistral-embed - apiKeySecret: MISTRAL_API_KEY + apiKey: MISTRAL_API_KEY apiBase: https://api.mistral.ai/v1 roles: - embed @@ -101,4 +101,4 @@ We recommend configuring **Mistral Embed** as your embeddings model. Mistral currently does not offer any reranking models. -[Click here](../../model-types/reranking.md) to see a list of reranking model providers. +[Click here](../../model-types/reranking.mdx) to see a list of reranking model providers. diff --git a/docs/docs/customize/model-providers/top-level/ollama.mdx b/docs/docs/customize/model-providers/top-level/ollama.mdx index 6052372f0..b3da6a978 100644 --- a/docs/docs/customize/model-providers/top-level/ollama.mdx +++ b/docs/docs/customize/model-providers/top-level/ollama.mdx @@ -89,7 +89,7 @@ We recommend configuring **Nomic Embed Text** as your embeddings model. Ollama currently does not offer any reranking models. -[Click here](../../model-types/reranking.md) to see a list of reranking model providers. +[Click here](../../model-types/reranking.mdx) to see a list of reranking model providers. ## Using a remote instance @@ -99,7 +99,7 @@ To configure a remote instance of Ollama, add the `"apiBase"` property to your m ```yaml title="Package or config.yaml" models: - - title: Llama3.1 8B + - name: Llama3.1 8B provider: ollama model: llama3.1:8b apiBase: http://:11434 diff --git a/docs/docs/customize/model-providers/top-level/openai.mdx b/docs/docs/customize/model-providers/top-level/openai.mdx index c4338e036..e057cbd1f 100644 --- a/docs/docs/customize/model-providers/top-level/openai.mdx +++ b/docs/docs/customize/model-providers/top-level/openai.mdx @@ -21,7 +21,7 @@ We recommend configuring **GPT-4o** as your chat model. - name: GPT-4o provider: openai model: gpt-4o - apiKeySecret: OPENAI_KEY + apiKey: ${{ secrets.HUGGINGFACE_TEI_API_KEY }} ``` @@ -57,7 +57,7 @@ We recommend configuring **text-embedding-3-large** as your embeddings model. - name: OpenAI Embeddings provider: openai model: text-embedding-3-large - apiKey: + apiKey: ${{ secrets.HUGGINGFACE_TEI_API_KEY }} roles: - embed ``` @@ -79,7 +79,7 @@ We recommend configuring **text-embedding-3-large** as your embeddings model. OpenAI currently does not offer any reranking models. -[Click here](../../model-types/reranking.md) to see a list of reranking model providers. +[Click here](../../model-types/reranking.mdx) to see a list of reranking model providers. ## OpenAI compatible servers / APIs @@ -109,9 +109,7 @@ If you are using an OpenAI compatible server / API, you can change the `apiBase` provider: openai model: MODEL_NAME apiBase: http://localhost:8000/v1 - apiKeySecret: EMPTY - roles: - - chat + apiKey: ${{ secrets.CUSTOM_API_KEY }} ``` @@ -121,7 +119,7 @@ If you are using an OpenAI compatible server / API, you can change the `apiBase` "title": "OpenAI-compatible server / API", "provider": "openai", "model": "MODEL_NAME", - "apiKey": "EMPTY", + "apiKey": "CUSTOM_API_KEY", "apiBase": "http://localhost:8000/v1" } ] diff --git a/docs/docs/customize/model-providers/top-level/vertexai.mdx b/docs/docs/customize/model-providers/top-level/vertexai.mdx index 6146e1ce3..07be57891 100644 --- a/docs/docs/customize/model-providers/top-level/vertexai.mdx +++ b/docs/docs/customize/model-providers/top-level/vertexai.mdx @@ -21,7 +21,7 @@ We recommend configuring **Claude 3.5 Sonnet** as your chat model. - name: Claude 3.5 Sonnet provider: vertexai model: claude-3-5-sonnet-20240620 - projectId: [PROJECT_ID] + projectId: region: us-east5 ``` @@ -51,7 +51,7 @@ We recommend configuring **Codestral** or **code-gecko** as your autocomplete mo - name: Codestral (Vertex AI) provider: vertexai model: codestral - projectId: [PROJECT_ID] + projectId: region: us-central1 roles: - autocomplete @@ -81,7 +81,7 @@ We recommend configuring **text-embedding-004** as your embeddings model. - name: Text Embedding-004 provider: vertexai model: text-embedding-004 - projectId: [PROJECT_ID] + projectId: region: us-central1 roles: - embed @@ -103,4 +103,4 @@ We recommend configuring **text-embedding-004** as your embeddings model. Vertex AI currently does not offer any reranking models. -[Click here](../../model-types/reranking.md) to see a list of reranking model providers. +[Click here](../../model-types/reranking.mdx) to see a list of reranking model providers. diff --git a/docs/docs/customize/model-providers/top-level/xAI.mdx b/docs/docs/customize/model-providers/top-level/xAI.mdx index 130ffa775..fea7b261d 100644 --- a/docs/docs/customize/model-providers/top-level/xAI.mdx +++ b/docs/docs/customize/model-providers/top-level/xAI.mdx @@ -21,7 +21,7 @@ We recommend configuring **grok-beta** as your chat model. - name: Grok Beta provider: xAI model: grok-beta - apiKey: + apiKey: ${{ secrets.GROK_API_KEY }} ``` @@ -31,7 +31,7 @@ We recommend configuring **grok-beta** as your chat model. "title": "Grok Beta", "provider": "xAI", "model": "grok-beta", - "apiKey": "[API_KEY]" + "apiKey": "" } ] ``` @@ -48,10 +48,10 @@ xAI currently does not offer any autocomplete models. xAI currently does not offer any embeddings models. -[Click here](../../model-types/embeddings.md) to see a list of embeddings model providers. +[Click here](../../model-types/embeddings.mdx) to see a list of embeddings model providers. ## Reranking model xAI currently does not offer any reranking models. -[Click here](../../model-types/reranking.md) to see a list of reranking model providers. +[Click here](../../model-types/reranking.mdx) to see a list of reranking model providers. diff --git a/docs/docs/customize/model-types/autocomplete.md b/docs/docs/customize/model-types/autocomplete.md index d85920605..4b14775d1 100644 --- a/docs/docs/customize/model-types/autocomplete.md +++ b/docs/docs/customize/model-types/autocomplete.md @@ -11,6 +11,6 @@ In Continue, these models are used to display inline [Autocomplete](../../autoco ## Recommended Autocomplete models -If you have the ability to use any model, we recommend `Codestral` with [Mistral](../model-providers/top-level/mistral.md#autocomplete-model) or [Vertex AI](../model-providers/top-level/vertexai.md#autocomplete-model). +If you have the ability to use any model, we recommend `Codestral` with [Mistral](../model-providers/top-level/mistral.mdx#autocomplete-model) or [Vertex AI](../model-providers/top-level/vertexai.mdx#autocomplete-model). -If you want to run a model locally, we recommend `Qwen2.5-Coder 1.5B` with [Ollama](../model-providers/top-level/ollama.md#autocomplete-model). +If you want to run a model locally, we recommend `Qwen2.5-Coder 1.5B` with [Ollama](../model-providers/top-level/ollama.mdx#autocomplete-model). diff --git a/docs/docs/customize/model-types/chat.md b/docs/docs/customize/model-types/chat.md index fb6a91f15..447021251 100644 --- a/docs/docs/customize/model-types/chat.md +++ b/docs/docs/customize/model-types/chat.md @@ -9,10 +9,10 @@ A "chat model" is an LLM that is trained to respond in a conversational format. ## Recommended Chat models -If you have the ability to use any model, we recommend [Claude 3.5 Sonnet](../model-providers/top-level/anthropic.md). +If you have the ability to use any model, we recommend [Claude 3.5 Sonnet](../model-providers/top-level/anthropic.mdx). Otherwise, some of the next best options are: -- [GPT-4o](../model-providers/top-level/openai.md) -- [Gemini 1.5 Pro](../model-providers/top-level/gemini.md) +- [GPT-4o](../model-providers/top-level/openai.mdx) +- [Gemini 1.5 Pro](../model-providers/top-level/gemini.mdx) - [Llama3.1 405B](../tutorials/llama3.1.md) diff --git a/docs/docs/customize/model-types/embeddings.mdx b/docs/docs/customize/model-types/embeddings.mdx index 66fcf9a20..3f3d76dda 100644 --- a/docs/docs/customize/model-types/embeddings.mdx +++ b/docs/docs/customize/model-types/embeddings.mdx @@ -7,7 +7,7 @@ sidebar_position: 3 An "embeddings model" is trained to convert a piece of text into a vector, which can later be rapidly compared to other vectors to determine similarity between the pieces of text. Embeddings models are typically much smaller than LLMs, and will be extremely fast and cheap in comparison. -In Continue, embeddings are generated during indexing and then used by [@Codebase](../deep-dives/codebase.md) to perform similarity search over your codebase. +In Continue, embeddings are generated during indexing and then used by [@Codebase](../deep-dives/codebase.mdx) to perform similarity search over your codebase. :::info[Default model (VS Code only)] `transformers.js` is used as a default embeddings model in VS Code. In JetBrains, there currently is no default. @@ -21,83 +21,118 @@ The free trial supports embeddings (provider: `free-trial`) If you have the ability to use any model, we recommend `voyage-code-3`, which is listed below along with the rest of the options for embeddings models. -If you want to generate embeddings locally, we recommend using `nomic-embed-text` with [Ollama](../model-providers/top-level/ollama.md#embeddings-model). +If you want to generate embeddings locally, we recommend using `nomic-embed-text` with [Ollama](../model-providers/top-level/ollama.mdx#embeddings-model). ### Voyage AI After obtaining an API key from [here](https://www.voyageai.com/), you can configure like this: -```json title="config.json (Deprecated)" -{ - "embeddingsProvider": { - "provider": "voyage", - "model": "voyage-code-3", - "apiKey": "" - } -} -``` + + + ```yaml title="Package or config.yaml" + models: + - name: Voyage Code 3 + provider: voyage + model: voyage-code-3 + apiKey: ${{ secrets.VOYAGE_API_KEY }} + roles: + - embed + ``` + + + ```json title="config.json (Deprecated)" + "embeddingsProvider": { + "provider": "voyage", + "model": "voyage-code-3", + "apiKey": "" + } + ``` + + ### Ollama -See [here](../model-providers/top-level/ollama.md#embeddings-model) for instructions on how to use Ollama for embeddings. +See [here](../model-providers/top-level/ollama.mdx#embeddings-model) for instructions on how to use Ollama for embeddings. ### Transformers.js (currently VS Code only) [Transformers.js](https://huggingface.co/docs/transformers.js/index) is a JavaScript port of the popular [Transformers](https://huggingface.co/transformers/) library. It allows embeddings to be calculated entirely locally. The model used is `all-MiniLM-L6-v2`, which is shipped alongside the Continue extension. -```json title="config.json (Deprecated)" -{ - "embeddingsProvider": { - "provider": "transformers.js" - } -} -``` + + + ```yaml title="Package or config.yaml" + models: + - name: default-transformers + provider: transformers.js + roles: + - embed + ``` + + + ```json title="config.json (Deprecated)" + "embeddingsProvider": { + "provider": "transformers.js" + } + ``` + + ### Text Embeddings Inference [Hugging Face Text Embeddings Inference](https://huggingface.co/docs/text-embeddings-inference/en/index) enables you to host your own embeddings endpoint. You can configure embeddings to use your endpoint as follows: -```json title="config.json (Deprecated)" -{ - "embeddingsProvider": { - "provider": "huggingface-tei", - "apiBase": "http://localhost:8080" - } -} -``` + + + ```yaml title="Package or config.yaml" + models: + - name: Huggingface TEI Embedder + provider: huggingface-tei + apiBase: http://localhost:8080 + roles: [embed] + ``` + + + ```json title="config.json (Deprecated)" + "embeddingsProvider": { + "provider": "huggingface-tei", + "apiBase": "http://localhost:8080" + } + ``` + + ### OpenAI -See [here](../model-providers/top-level/openai.md#embeddings-model) for instructions on how to use OpenAI for embeddings. +See [here](../model-providers/top-level/openai.mdx#embeddings-model) for instructions on how to use OpenAI for embeddings. ### Cohere -See [here](../model-providers/more/cohere.md#embeddings-model) for instructions on how to use Cohere for embeddings. +See [here](../model-providers/more/cohere.mdx#embeddings-model) for instructions on how to use Cohere for embeddings. ### Gemini -See [here](../model-providers/top-level/gemini.md#embeddings-model) for instructions on how to use Gemini for embeddings. +See [here](../model-providers/top-level/gemini.mdx#embeddings-model) for instructions on how to use Gemini for embeddings. ### Vertex -See [here](../model-providers/top-level/vertexai.md#embeddings-model) for instructions on how to use Vertex for embeddings. +See [here](../model-providers/top-level/vertexai.mdx#embeddings-model) for instructions on how to use Vertex for embeddings. ### Mistral -See [here](../model-providers/top-level/mistral.md#embeddings-model) for instructions on how to use Mistral for embeddings. +See [here](../model-providers/top-level/mistral.mdx#embeddings-model) for instructions on how to use Mistral for embeddings. ### NVIDIA -See [here](../model-providers/more/nvidia.md#embeddings-model) for instructions on how to use NVIDIA for embeddings. +See [here](../model-providers/more/nvidia.mdx#embeddings-model) for instructions on how to use NVIDIA for embeddings. ### Bedrock -See [here](../model-providers/top-level/bedrock.md#embeddings-model) for instructions on how to use Bedrock for embeddings. +See [here](../model-providers/top-level/bedrock.mdx#embeddings-model) for instructions on how to use Bedrock for embeddings. ### WatsonX -See [here](../model-providers/more/watsonx.md#embeddings-model) for instructions on how to use WatsonX for embeddings. +See [here](../model-providers/more/watsonx.mdx#embeddings-model) for instructions on how to use WatsonX for embeddings. ### LMStudio -See [here](../model-providers/more/lmstudio.md#embeddings-model) for instructions on how to use LMStudio for embeddings. +See [here](../model-providers/more/lmstudio.mdx#embeddings-model) for instructions on how to use LMStudio for embeddings. diff --git a/docs/docs/customize/model-types/reranking.mdx b/docs/docs/customize/model-types/reranking.mdx index ef2622105..b824a2220 100644 --- a/docs/docs/customize/model-types/reranking.mdx +++ b/docs/docs/customize/model-types/reranking.mdx @@ -10,7 +10,7 @@ import TabItem from "@theme/TabItem"; A "reranking model" is trained to take two pieces of text (often a user question and a document) and return a relevancy score between 0 and 1, estimating how useful the document will be in answering the question. Rerankers are typically much smaller than LLMs, and will be extremely fast and cheap in comparison. -In Continue, reranking is used by [@Codebase](../deep-dives/codebase.md) in order to select the most relevant code snippets after vector search. +In Continue, reranking is used by [@Codebase](../deep-dives/codebase.mdx) in order to select the most relevant code snippets after vector search. ## Recommended reranking models @@ -26,7 +26,7 @@ Voyage AI offers the best reranking model for code with their `rerank-2` model. models: - name: My Voyage Reranker provider: voyage - apiKey: + apiKey: ${{ secrets.VOYAGE_API_KEY }} model: rerank-2 roles: - rerank @@ -56,7 +56,7 @@ See Cohere's documentation for rerankers [here](https://docs.cohere.com/docs/rer - name: Cohere Reranker provider: cohere model: rerank-english-v3.0 - apiKey: + apiKey: ${{ secrets.COHERE_API_KEY }} roles: - rerank ``` @@ -114,7 +114,7 @@ The `"modelTitle"` field must match one of the models in your "models" array in - name: Huggingface-tei Reranker provider: huggingface-tei apiBase: http://localhost:8080 - apiKey: + apiKey: ${{ secrets.HUGGINGFACE_TEI_API_KEY }} roles: - rerank ``` diff --git a/docs/docs/customize/overview.md b/docs/docs/customize/overview.md index 83e479132..fdbd1a61e 100644 --- a/docs/docs/customize/overview.md +++ b/docs/docs/customize/overview.md @@ -6,36 +6,36 @@ keywords: [customize, configure, config] Continue can be deeply customized. For example you might: -- **Change your Model Provider**. Continue allows you to choose your favorite or even add multiple model providers. This allows you to use different models for different tasks, or to try another model if you're not happy with the results from your current model. Continue supports all of the popular model providers, including OpenAI, Anthropic, Microsoft/Azure, Mistral, and more. You can even self host your own model provider if you'd like. Learn more about [model providers](/customize/model-providers). -- **Select different model providers for each Compose feature**. Different Continue features can use different model providers. We call these _model types_. For example, you can use a different model provider for chat than you do for autocomplete. Learn more about [model types](/customize/model-types) . -- **Add a Context Provider**. Context providers allow you to add information to your prompts, giving your LLM additional context to work with. Context providers allow you to reference snippets from your codebase, or lookup relevant documentation, or use a search engine to find information and much more. Learn more about [context providers](/customize/context-providers). -- **Create a Slash Command**. Slash commands allow you to easily add custom functionality to Continue. You can use a slash command that allows you to generate a shell command from natural language, or perhaps generate a commit message, or create your own custom command to do whatever you want. Learn more about [slash commands](/customize/slash-commands). -- **Call external tools and functions**. Unchain your LLM with the power of _Tools_. You can call any external tool or function from your prompts. Currently only available with Anthropic. Learn more about [Tools](/customize/tools). +- **Change your Model Provider**. Continue allows you to choose your favorite or even add multiple model providers. This allows you to use different models for different tasks, or to try another model if you're not happy with the results from your current model. Continue supports all of the popular model providers, including OpenAI, Anthropic, Microsoft/Azure, Mistral, and more. You can even self host your own model provider if you'd like. Learn more about [model providers](../customize/model-providers/). +- **Select different model providers for each Compose feature**. Different Continue features can use different model providers. We call these _model types_. For example, you can use a different model provider for chat than you do for autocomplete. Learn more about [model types](../customize/model-types/) . +- **Add a Context Provider**. Context providers allow you to add information to your prompts, giving your LLM additional context to work with. Context providers allow you to reference snippets from your codebase, or lookup relevant documentation, or use a search engine to find information and much more. Learn more about [context providers](/customize/context-providers). +- **Create a Slash Command**. Slash commands allow you to easily add custom functionality to Continue. You can use a slash command that allows you to generate a shell command from natural language, or perhaps generate a commit message, or create your own custom command to do whatever you want. Learn more about [slash commands](/customize/slash-commands). +- **Call external tools and functions**. Unchain your LLM with the power of _Tools_. You can call any external tool or function from your prompts. Currently only available with Anthropic. Learn more about [Tools](/customize/tools). -Whatever you choose, you'll probably start by editing `config.json`. +Whatever you choose, you'll probably start by editing `config.yaml`. ## Editing config.json -Most custom configuration is done by editing `config.json`. This file is a JSON file that allows you to customize Continue to your liking. It is found at: +Most custom configuration is done by editing `config.yaml` (or Deprecated `config.json`). This is a YAML file that allows you to customize Continue to your liking. It is found at: -- MacOS and Linux: `~/.continue/config.json` -- Windows: `%USERPROFILE%\.continue\config.json` +- MacOS and Linux: `~/.continue/config.yaml` +- Windows: `%USERPROFILE%\.continue\config.yaml` -You can easily access `config.json` from the Continue Chat sidebar. Open the sidebar by pressing cmd/ctrl + L (VS Code) or cmd/ctrl + J (JetBrains) and click the "gear" icon in the bottom right corner. +You can easily access config file from the Continue Chat sidebar. Open the sidebar by pressing cmd/ctrl + L (VS Code) or cmd/ctrl + J (JetBrains) and click the "gear" icon in the bottom right corner. ![configure-continue](/img/configure-continue.png) -When editing this file, you can see the available options suggested as you type, or you can check the [full reference](./deep-dives/configuration.md). +When editing this file, you can see the available options suggested as you type, or you can check the [full reference](./deep-dives/configuration.mdx). :::info -`config.json` is created the first time you use Continue. If you'd like to reset your configuration to the default, you can delete this file and Continue will automatically recreate it with the default settings. +A configuration file is created the first time you use Continue. If you'd like to reset your configuration to the default, you can delete this file and Continue will automatically recreate it with the default settings. ::: :::info -When you save `config.json`, Continue will automatically refresh to take into account your changes. +When you save a configuration file from the IDE, Continue will automatically refresh to take into account your changes. ::: @@ -45,6 +45,6 @@ If you'd like to scope certain settings to a particular workspace, you can add a ## Programmatic configuration -`config.json` can handle the vast majority of necessary configuration, so we recommend using it whenever possible. However, if you need to programmatically configure Continue, you can use `config.ts`, which is located at `~/.continue/config.ts` (MacOS / Linux) or `%USERPROFILE%\.continue\config.ts` (Windows). +`config.yaml` or `config.json` can handle the vast majority of necessary configuration, so we recommend using it whenever possible. However, if you need to programmatically configure Continue, you can use `config.ts`, which is located at `~/.continue/config.ts` (MacOS / Linux) or `%USERPROFILE%\.continue\config.ts` (Windows). For examples of how to use `config.ts`, see [writing custom slash commands](./tutorials/build-your-own-slash-command.md#custom-slash-commands) or [writing custom context providers](./tutorials/build-your-own-context-provider.md). diff --git a/docs/docs/customize/slash-commands.mdx b/docs/docs/customize/slash-commands.mdx index 79cede310..661501097 100644 --- a/docs/docs/customize/slash-commands.mdx +++ b/docs/docs/customize/slash-commands.mdx @@ -8,7 +8,7 @@ import Tabs from "@theme/Tabs"; import TabItem from "@theme/TabItem"; :::info -Slash commands can currently only be added using [`config.json`](../json-reference.md), which has been deprecated in favor of the [`YAML Config Format`](../reference.md). We recommend looking into [Prompt Files](../customize/deep-dives//prompt-files.md) to achieve similar functionality. +Slash commands can currently only be added using [`config.json`](../json-reference.md), which has been deprecated in favor of the [`YAML Config Format`](../reference.md). We recommend looking into [Prompt Files](../customize/deep-dives/prompt-files.md) to achieve similar functionality. ::: Slash commands are shortcuts that can be activated by typing '/' and selecting from the dropdown. For example, the built-in '/edit' slash command lets you stream edits directly into your editor. diff --git a/docs/docs/customize/tools.mdx b/docs/docs/customize/tools.mdx index 8f94462b1..6fac7f651 100644 --- a/docs/docs/customize/tools.mdx +++ b/docs/docs/customize/tools.mdx @@ -24,7 +24,7 @@ To let you balance speed and safety, each tool can be set to 1 of 3 modes: ### Custom tools -Currently custom tools can be configured using the [Model Context Protocol](https://modelcontextprotocol.io/introduction), a standard proposed by Anthropic to unify prompts, context, and tool use. Read their [quickstart](https://modelcontextprotocol.io/quickstart) to learn how to set up a local server and then configure your `config.json` like this: +Currently custom tools can be configured using the [Model Context Protocol](https://modelcontextprotocol.io/introduction), a standard proposed by Anthropic to unify prompts, context, and tool use. Read their [quickstart](https://modelcontextprotocol.io/quickstart) to learn how to set up a local server and then configure your [config](../customize/deep-dives/configuration.md) like this: diff --git a/docs/docs/customize/tutorials/build-your-own-context-provider.md b/docs/docs/customize/tutorials/build-your-own-context-provider.md index 48ec810e9..53c40f910 100644 --- a/docs/docs/customize/tutorials/build-your-own-context-provider.md +++ b/docs/docs/customize/tutorials/build-your-own-context-provider.md @@ -2,6 +2,10 @@ title: Build your own context provider --- +:::info +Custom context providers are added through `~/config.ts`, which has been deprecated in favor of the [`YAML Config Format`](../reference.md). We recommend looking into [Prompt Files](../deep-dives/prompt-files.md) and [MCP Servers](../context-providers.mdx#modelcontextprotocol) to achieve similar functionality. +::: + ## Introductory Example To write your own context provider, you just have to implement the `CustomContextProvider` @@ -69,7 +73,7 @@ export function modifyConfig(config: Config): Config { } ``` -No modification in `config.json` is necessary. +This is automatically appended to your configuration. ## Custom Context Providers with Submenu or Query diff --git a/docs/docs/customize/tutorials/custom-code-rag.md b/docs/docs/customize/tutorials/custom-code-rag.mdx similarity index 86% rename from docs/docs/customize/tutorials/custom-code-rag.md rename to docs/docs/customize/tutorials/custom-code-rag.mdx index 653ada9c4..82f41b396 100644 --- a/docs/docs/customize/tutorials/custom-code-rag.md +++ b/docs/docs/customize/tutorials/custom-code-rag.mdx @@ -1,6 +1,9 @@ +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + # Custom code RAG -While Continue comes with [@Codebase](../deep-dives/codebase.md) out of the box, you might wish to set up your own vector database and build a custom retrieval-augmented generation (RAG) system. This can allow you to access code that is not available locally, to index code a single time across all users, or to include custom logic. In this guide, we'll walk you through the steps it takes to build this. +While Continue comes with [@Codebase](../deep-dives/codebase.mdx) out of the box, you might wish to set up your own vector database and build a custom retrieval-augmented generation (RAG) system. This can allow you to access code that is not available locally, to index code a single time across all users, or to include custom logic. In this guide, we'll walk you through the steps it takes to build this. ## Step 1: Choose an embeddings model @@ -122,19 +125,36 @@ async def create_item(item: ContextProviderInput): return context_items ``` -After you've set up your server, you can configure Continue to use it by adding the "http" context provider to your `contextProviders` array in `config.json`: +After you've set up your server, you can configure Continue to use it by adding the "http" context provider to your `contextProviders` array in your configuration: -```json title="config.json (Deprecated)" -{ - "name": "http", - "params": { - "url": "https://myserver.com/retrieve", - "title": "http", - "description": "Custom HTTP Context Provider", - "displayTitle": "My Custom Context" - } -} -``` + + + ```yaml title="config.yaml" + context: + - uses: http + with: + url: https://myserver.com/retrieve + name: http + description: Custom HTTP Context Provider + displayTitle: My Custom Context + ``` + + + ```json title="config.json (Deprecated)" + "contextProviders": [ + { + "name": "http", + "params": { + "url": "https://myserver.com/retrieve", + "title": "http", + "description": "Custom HTTP Context Provider", + "displayTitle": "My Custom Context" + } + } + ] + ``` + + ## Step 7 (Bonus): Set up reranking diff --git a/docs/docs/customize/tutorials/how-to-self-host-a-model.md b/docs/docs/customize/tutorials/how-to-self-host-a-model.md deleted file mode 100644 index bd4093402..000000000 --- a/docs/docs/customize/tutorials/how-to-self-host-a-model.md +++ /dev/null @@ -1,76 +0,0 @@ ---- -title: How to self-host a model ---- - -You can deploy a model in your [AWS](https://github.com/continuedev/deploy-os-code-llm#aws), [GCP](https://github.com/continuedev/deploy-os-code-llm#gcp), [Azure](https://github.com/continuedev/deploy-os-code-llm#azure), [Lambda](https://lambdalabs.com/), or [other clouds](https://github.com/continuedev/deploy-os-code-llm#others-2) using: - -- [HuggingFace TGI](https://github.com/continuedev/deploy-os-code-llm#tgi) -- [vLLM](https://github.com/continuedev/deploy-os-code-llm#vllm) -- [SkyPilot](https://github.com/continuedev/deploy-os-code-llm#skypilot) -- [Anyscale Private Endpoints](https://github.com/continuedev/deploy-os-code-llm#anyscale-private-endpoints) (OpenAI compatible API) -- [Lambda](https://github.com/continuedev/deploy-os-code-llm#lambda) - -## Self-hosting an open-source model - -For many cases, either Continue will have a built-in provider or the API you use will be OpenAI-compatible, in which case you can use the "openai" provider and change the "baseUrl" to point to the server. - -However, if neither of these are the case, you will need to wire up a new LLM object. - -## Authentication - -Basic authentication can be done with any provider using the `apiKey` field: - -```json title="config.json (Deprecated)" -{ - "models": [ - { - "title": "Ollama", - "provider": "ollama", - "model": "llama2-7b", - "apiKey": "xxx" - } - ] -} -``` - -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="config.json (Deprecated)" -{ - "models": [ - { - "title": "Ollama", - "provider": "ollama", - "model": "llama2-7b", - "requestOptions": { - "headers": { - "X-Auth-Token": "xxx" - } - } - } - ] -} -``` - -Similarly if your model requires a Certificate for authentication, you may use the `requestOptions.clientCertificate` property like in the example below: - -```json title="config.json (Deprecated)" -{ - "models": [ - { - "title": "Ollama", - "provider": "ollama", - "model": "llama2-7b", - "requestOptions": { - "clientCertificate": { - "cert": "C:\tempollama.pem", - "key": "C:\tempollama.key", - "passphrase": "c0nt!nu3" - } - } - } - ] -} -``` diff --git a/docs/docs/customize/tutorials/how-to-self-host-a-model.mdx b/docs/docs/customize/tutorials/how-to-self-host-a-model.mdx new file mode 100644 index 000000000..3652cd43c --- /dev/null +++ b/docs/docs/customize/tutorials/how-to-self-host-a-model.mdx @@ -0,0 +1,118 @@ +--- +title: How to self-host a model +--- + +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + +You can deploy a model in your [AWS](https://github.com/continuedev/deploy-os-code-llm#aws), [GCP](https://github.com/continuedev/deploy-os-code-llm#gcp), [Azure](https://github.com/continuedev/deploy-os-code-llm#azure), [Lambda](https://lambdalabs.com/), or [other clouds](https://github.com/continuedev/deploy-os-code-llm#others-2) using: + +- [HuggingFace TGI](https://github.com/continuedev/deploy-os-code-llm#tgi) +- [vLLM](https://github.com/continuedev/deploy-os-code-llm#vllm) +- [SkyPilot](https://github.com/continuedev/deploy-os-code-llm#skypilot) +- [Anyscale Private Endpoints](https://github.com/continuedev/deploy-os-code-llm#anyscale-private-endpoints) (OpenAI compatible API) +- [Lambda](https://github.com/continuedev/deploy-os-code-llm#lambda) + +## Self-hosting an open-source model + +For many cases, either Continue will have a built-in provider or the API you use will be OpenAI-compatible, in which case you can use the "openai" provider and change the "baseUrl" to point to the server. + +However, if neither of these are the case, you will need to wire up a new LLM object. + +## Authentication + +Basic authentication can be done with any provider using the `apiKey` field: + + + + ```yaml title="Package or config.yaml" + models: + - name: Ollama + provider: ollama + model: llama2-7b + apiKey: xxx + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "title": "Ollama", + "provider": "ollama", + "model": "llama2-7b", + "apiKey": "xxx" + } + ] + ``` + + + +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: + + + + ```yaml title="Package or config.yaml" + models: + - name: Ollama + provider: ollama + model: llama2-7b + requestOptions: + headers: + X-Auth-Token: xxx + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "title": "Ollama", + "provider": "ollama", + "model": "llama2-7b", + "requestOptions": { + "headers": { + "X-Auth-Token": "xxx" + } + } + } + ] + ``` + + + +Similarly if your model requires a Certificate for authentication, you may use the `requestOptions.clientCertificate` property like in the example below: + + + + ```yaml title="config.yaml" + models: + - name: Ollama + provider: ollama + model: llama2-7b + requestOptions: + clientCertificate: + cert: C:\tempollama.pem + key: C:\tempollama.key + passphrase: c0nt!nu3 + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "title": "Ollama", + "provider": "ollama", + "model": "llama2-7b", + "requestOptions": { + "clientCertificate": { + "cert": "C:\\tempollama.pem", + "key": "C:\\tempollama.key", + "passphrase": "c0nt!nu3" + } + } + } + ] + ``` + + diff --git a/docs/docs/customize/tutorials/llama3.1.md b/docs/docs/customize/tutorials/llama3.1.md deleted file mode 100644 index 038055265..000000000 --- a/docs/docs/customize/tutorials/llama3.1.md +++ /dev/null @@ -1,134 +0,0 @@ ---- -title: Using Llama 3.1 with Continue -description: How to use Llama 3.1 with Continue -keywords: [llama, meta, togetherai, novita, ollama, replicate] ---- - -Continue makes it easy to code with the latest open-source models, including the entire Llama 3.1 family of models. Llama 3.2 models are also supported but not recommended for chat, because they are specifically designed to be small or multi-modal. - -If you haven't already installed Continue, you can do that [here for VS Code](https://marketplace.visualstudio.com/items?itemName=Continue.continue) or [here for JetBrains](https://plugins.jetbrains.com/plugin/22707-continue). For more general information on customizing Continue, read [our customization docs](../overview.md). - -Below we share some of the easiest ways to get up and running, depending on your use-case. - -## Ollama - -Ollama is the fastest way to get up and running with local language models. We recommend trying Llama 3.1 8b, which is impressive for its size and will perform well on most hardware. - -1. Download Ollama [here](https://ollama.ai/) (it should walk you through the rest of these steps) -2. Open a terminal and run `ollama run llama3.1:8b` -3. Change your Continue config file like this: - -```json title="config.json (Deprecated)" -{ - "models": [ - { - "title": "Llama 3.1 8b", - "provider": "ollama", - "model": "llama3.1-8b" - } - ] -} -``` - -## Groq - -Groq provides the fastest available inference for open-source language models, including the entire Llama 3.1 family. - -1. Obtain an API key [here](https://console.groq.com/keys) -2. Update your Continue config file like this: - -```json title="config.json (Deprecated)" -{ - "models": [ - { - "title": "Llama 3.1 405b", - "provider": "groq", - "model": "llama3.1-405b", - "apiKey": "" - } - ] -} -``` - -## Together AI - -Together AI provides fast and reliable inference of open-source models. You'll be able to run the 405b model with good speed. - -1. Create an account [here](https://api.together.xyz/signup) -2. Copy your API key that appears on the welcome screen -3. Update your Continue config file like this: - -```json title="config.json (Deprecated)" -{ - "models": [ - { - "title": "Llama 3.1 405b", - "provider": "together", - "model": "llama3.1-405b", - "apiKey": "" - } - ] -} -``` - -## Replicate - -Replicate makes it easy to host and run open-source AI with an API. - -1. Get your Replicate API key [here](https://replicate.ai/) -2. Change your Continue config file like this: - -```json title="config.json (Deprecated)" -{ - "models": [ - { - "title": "Llama 3.1 405b", - "provider": "replicate", - "model": "llama3.1-405b", - "apiKey": "" - } - ] -} -``` - -## SambaNova - -SambaNova Cloud provides world record Llama3.1 70B/405B serving. - -1. Create an account [here](https://cloud.sambanova.ai/) -2. Copy your API key -3. Update your Continue config file like this: - -```json title="~/.continue/config.json" -{ - "models": [ - { - "title": "SambaNova Llama 3.1 405B", - "provider": "sambanova", - "model": "llama3.1-405b", - "apiKey": "YOUR_API_KEY" - } - ] -} -``` - -## Cerebras Inference - -Cerebras Inference uses specialized silicon to provides fast inference for the Llama3.1 8B/70B. - -1. Create an account in the portal [here](https://cloud.cerebras.ai/). -2. Create and copy the API key for use in Continue. -3. Update your Continue config file: - -```json title="config.json (Deprecated)" -{ - "models": [ - { - "title": "Cerebras Llama 3.1 70B", - "provider": "cerebras", - "model": "llama3.1-70b", - "apiKey": "YOUR_API_KEY" - } - ] -} -``` diff --git a/docs/docs/customize/tutorials/llama3.1.mdx b/docs/docs/customize/tutorials/llama3.1.mdx new file mode 100644 index 000000000..ed6a7bf18 --- /dev/null +++ b/docs/docs/customize/tutorials/llama3.1.mdx @@ -0,0 +1,202 @@ +--- +title: Using Llama 3.1 with Continue +description: How to use Llama 3.1 with Continue +keywords: [llama, meta, togetherai, novita, ollama, replicate] +--- + +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + +Continue makes it easy to code with the latest open-source models, including the entire Llama 3.1 family of models. Llama 3.2 models are also supported but not recommended for chat, because they are specifically designed to be small or multi-modal. + +If you haven't already installed Continue, you can do that [here for VS Code](https://marketplace.visualstudio.com/items?itemName=Continue.continue) or [here for JetBrains](https://plugins.jetbrains.com/plugin/22707-continue). For more general information on customizing Continue, read [our customization docs](../overview.md). + +Below we share some of the easiest ways to get up and running, depending on your use-case. + +## Ollama + +Ollama is the fastest way to get up and running with local language models. We recommend trying Llama 3.1 8b, which is impressive for its size and will perform well on most hardware. + +1. Download Ollama [here](https://ollama.ai/) (it should walk you through the rest of these steps) +2. Open a terminal and run `ollama run llama3.1:8b` +3. Change your Continue config file like this: + + + + ```yaml title="Package or config.yaml" + models: + - name: Llama 3.1 8b + provider: ollama + model: llama3.1-8b + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "title": "Llama 3.1 8b", + "provider": "ollama", + "model": "llama3.1-8b" + } + ] + ``` + + + +## Groq + +Groq provides the fastest available inference for open-source language models, including the entire Llama 3.1 family. + +1. Obtain an API key [here](https://console.groq.com/keys) +2. Update your Continue config file like this: + + + + ```yaml title="config.yaml" + models: + - name: Llama 3.1 405b + provider: groq + model: llama3.1-405b + apiKey: ${{ secrets.GROQ_API_KEY }} + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "title": "Llama 3.1 405b", + "provider": "groq", + "model": "llama3.1-405b", + "apiKey": "" + } + ] + ``` + + + +## Together AI + +Together AI provides fast and reliable inference of open-source models. You'll be able to run the 405b model with good speed. + +1. Create an account [here](https://api.together.xyz/signup) +2. Copy your API key that appears on the welcome screen +3. Update your Continue config file like this: + + + + ```yaml title="Package or config.yaml" + models: + - name: Llama 3.1 405b + provider: together + model: llama3.1-405b + apiKey: ${{ secrets.TOGETHER_API_KEY }} + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "title": "Llama 3.1 405b", + "provider": "together", + "model": "llama3.1-405b", + "apiKey": "" + } + ] + ``` + + + +## Replicate + +Replicate makes it easy to host and run open-source AI with an API. + +1. Get your Replicate API key [here](https://replicate.ai/) +2. Change your Continue config file like this: + + + + ```yaml title="Package or config.yaml" + models: + - name: Llama 3.1 405b + provider: replicate + model: llama3.1-405b + apiKey: ${{ secrets.REPLICATE_API_KEY }} + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "title": "Llama 3.1 405b", + "provider": "replicate", + "model": "llama3.1-405b", + "apiKey": "" + } + ] + ``` + + + +## SambaNova + +SambaNova Cloud provides world record Llama3.1 70B/405B serving. + +1. Create an account [here](https://cloud.sambanova.ai/) +2. Copy your API key +3. Update your Continue config file like this: + + + + ```yaml title="config.yaml" + models: + - name: SambaNova Llama 3.1 405B + provider: sambanova + model: llama3.1-405b + apiKey: ${{ secrets.SAMBA_API_KEY }} + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "title": "SambaNova Llama 3.1 405B", + "provider": "sambanova", + "model": "llama3.1-405b", + "apiKey": "SAMBA_API_KEY" + } + ] + ``` + + + +## Cerebras Inference + +Cerebras Inference uses specialized silicon to provides fast inference for the Llama3.1 8B/70B. + +1. Create an account in the portal [here](https://cloud.cerebras.ai/). +2. Create and copy the API key for use in Continue. +3. Update your Continue config file: + + + + ```yaml title="Package or config.yaml" + models: + - name: Cerebras Llama 3.1 70B + provider: cerebras + model: llama3.1-70b + apiKey: ${{ secrets.ANTHROPIC_API_KEY }} + ``` + + + ```json title="config.json (Deprecated)" + "models": [ + { + "title": "Cerebras Llama 3.1 70B", + "provider": "cerebras", + "model": "llama3.1-70b", + "apiKey": "" + } + ] + ``` + + diff --git a/docs/docs/customize/tutorials/running-continue-without-internet.md b/docs/docs/customize/tutorials/running-continue-without-internet.md index c945f8c43..81ecbc7c3 100644 --- a/docs/docs/customize/tutorials/running-continue-without-internet.md +++ b/docs/docs/customize/tutorials/running-continue-without-internet.md @@ -9,4 +9,4 @@ Continue can be run even on an air-gapped computer if you use a local model. Onl 1. Download the latest .vsix file from the [Open VSX Registry](https://open-vsx.org/extension/Continue/continue) and [install it to VS Code](https://code.visualstudio.com/docs/editor/extension-marketplace#_install-from-a-vsix). 2. Open `~/.continue/config.json` and set `"allowAnonymousTelemetry": false`. This will stop Continue from attempting requests to PostHog for [anonymous telemetry](../../telemetry.md). 3. Also in `config.json`, set the default model to a local model. You can available options [here](../model-providers/). -4. Restart VS Code to ensure that the changes to `config.json` take effect. +4. Restart VS Code to ensure that the changes to `config.json` or `config.yaml` take effect. diff --git a/docs/docs/customize/tutorials/set-up-codestral.md b/docs/docs/customize/tutorials/set-up-codestral.mdx similarity index 59% rename from docs/docs/customize/tutorials/set-up-codestral.md rename to docs/docs/customize/tutorials/set-up-codestral.mdx index 426a0037f..026948f8a 100644 --- a/docs/docs/customize/tutorials/set-up-codestral.md +++ b/docs/docs/customize/tutorials/set-up-codestral.mdx @@ -4,6 +4,9 @@ description: How to set up Codestral keywords: [codestral, mistral, model setup] --- +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + ![mistral x continue](../../../static/img/mistral-x-continue.png) **Here is a step-by-step guide on how to set up Codestral with Continue using the Mistral AI API:** @@ -14,11 +17,25 @@ keywords: [codestral, mistral, model setup] 3. Log in and create an API key on Mistral AI's La Plateforme [here](https://console.mistral.ai/codestral). Make sure you get an API key from the "Codestral" page. -4. To use Codestral as your model for both `autocomplete` and `chat`, replace `[API_KEY]` with your Mistral API key below and add it to your `config.json` file: +4. To use Codestral as your model for both `autocomplete` and `chat`, insert your Mistral API key below and add it to your configuration file: -```json title="config.json (Deprecated)" -{ - "models": [ + + + ```yaml title="config.yaml" + models: + - name: Codestral + provider: mistral + model: codestral-latest + apiKey: ${{ secrets.CODESTRAL_API_KEY }} + apiBase: https://codestral.mistral.ai/v1 + roles: + - chat + - autocomplete + ``` + + + ```json title="config.json (Deprecated)" + "models": [ { "title": "Codestral", "provider": "mistral", @@ -26,16 +43,17 @@ keywords: [codestral, mistral, model setup] "apiKey": "[API_KEY]", "apiBase": "https://codestral.mistral.ai/v1" } - ], - "tabAutocompleteModel": { - "title": "Codestral", - "provider": "mistral", - "model": "codestral-latest", - "apiKey": "[API_KEY]", - "apiBase": "https://codestral.mistral.ai/v1" - } -} -``` + ], + "tabAutocompleteModel": { + "title": "Codestral", + "provider": "mistral", + "model": "codestral-latest", + "apiKey": "[API_KEY]", + "apiBase": "https://codestral.mistral.ai/v1" + } + ``` + + 5. If you run into any issues or have any questions, please join our Discord and post in the `#help` channel [here](https://discord.gg/EfJEfdFnDQ) diff --git a/docs/docs/edit/how-it-works.md b/docs/docs/edit/how-it-works.md index 19f107782..453d1e98f 100644 --- a/docs/docs/edit/how-it-works.md +++ b/docs/docs/edit/how-it-works.md @@ -11,4 +11,4 @@ The model response is then streamed directly back to the highlighted range in yo If you accept the diff, we remove the previously highlighted lines, and if you reject the diff, we remove the proposed changes. -If you would like to view the exact prompt that is sent to the model during an edit, you can [view this in the prompt logs](troubleshooting.md#check-the-logs). +If you would like to view the exact prompt that is sent to the model during an edit, you can [view this in the prompt logs](../troubleshooting.mdx#check-the-logs). diff --git a/docs/docs/edit/how-to-customize.mdx b/docs/docs/edit/how-to-customize.mdx index 677a38642..d7ebf4e77 100644 --- a/docs/docs/edit/how-to-customize.mdx +++ b/docs/docs/edit/how-to-customize.mdx @@ -20,7 +20,7 @@ You can configure a particular model to be used for Edit: model: claude-3-5-sonnet-latest roles: - edit - apiKeySecret: ANTHOPIC_API_KEY + apiKey: ${{ secrets.ANTHROPIC_API_KEY }} ``` diff --git a/docs/docs/edit/model-setup.md b/docs/docs/edit/model-setup.md index 64f5f69d6..ad884b334 100644 --- a/docs/docs/edit/model-setup.md +++ b/docs/docs/edit/model-setup.md @@ -5,6 +5,6 @@ description: How to set up an Edit model keywords: [edit, cmd l, model] --- -By default, Edit uses the [same model as Chat](chat/model-setup.mdx) since we recommend a similar, 400B+ parameter model or one of the frontier model for code edits. +By default, Edit uses the [same model as Chat](../chat/model-setup.mdx) since we recommend a similar, 400B+ parameter model or one of the frontier model for code edits. You can configure a different model to be used for edits by updating your [configuration](../reference.md). diff --git a/docs/docs/json-reference.md b/docs/docs/json-reference.md index 4faceb9a9..8b6f9e7f2 100644 --- a/docs/docs/json-reference.md +++ b/docs/docs/json-reference.md @@ -5,7 +5,7 @@ keywords: [config, config_schema.json, json] --- :::info -`config.json` has been deprecated in favor of the [`YAML Config Format`](./yaml-reference). See the [migration guide](./yaml-migration). +`config.json` has been deprecated in favor of the [`YAML Config Format`](./reference). See the [migration guide](./yaml-migration). ::: Below are details for each property that can be set in `config.json`. The config schema code is found in [`extensions/vscode/config_schema.json`](https://github.com/continuedev/continue/blob/main/extensions/vscode/config_schema.json). @@ -27,7 +27,7 @@ Each model has specific configuration options tailored to its provider and funct - `contextLength`: Maximum context length of the model, typically in tokens (default: 2048). - `maxStopWords`: Maximum number of stop words allowed, to avoid API errors with extensive lists. - `template`: Chat template to format messages. Auto-detected for most models but can be overridden. See intelliJ suggestions. -- `promptTemplates`: A mapping of prompt template names (e.g., `edit`) to template strings. [Customization Guide](https://docs.continue.dev/model-setup/configuration#customizing-the-edit-prompt). +- `promptTemplates`: A mapping of prompt template names (e.g., `edit`) to template strings. [Customization Guide](/model-setup/configuration#customizing-the-edit-prompt). - `completionOptions`: Model-specific completion options, same format as top-level [`completionOptions`](#completionoptions), which they override. - `systemMessage`: A system message that will precede responses from the LLM. - `requestOptions`: Model-specific HTTP request options, same format as top-level [`requestOptions`](#requestoptions), which they override. diff --git a/docs/docs/reference.md b/docs/docs/reference.md index 3b86fb248..c2c34b09f 100644 --- a/docs/docs/reference.md +++ b/docs/docs/reference.md @@ -116,7 +116,7 @@ models: The `context` section defines context providers, which supply additional information or context to the language models. Each context provider can be configured with specific parameters. -More information about usage/params for each context provider can be found [here](/customize/context-providers) +More information about usage/params for each context provider can be found [here](/customize/context-providers.mdx) **Properties:** diff --git a/docs/docs/telemetry.md b/docs/docs/telemetry.md index d4fc97840..58be882e1 100644 --- a/docs/docs/telemetry.md +++ b/docs/docs/telemetry.md @@ -26,24 +26,14 @@ The following usage information is collected and reported: ## How to Opt Out -You can disable anonymous telemetry by modifying the `config.json` file located in the `~/.continue` directory. This file typically includes the following entry: - -```json title="config.json (Deprecated)" -{ - "allowAnonymousTelemetry": true -} -``` - -To opt out, change the value of `allowAnonymousTelemetry` to `false`. Alternatively, you can disable telemetry through your VS Code settings by unchecking the "Continue: Telemetry Enabled" box. - -### Steps to Disable Telemetry via Configuration File +### Via `config.json` File 1. Open the `~/.continue/config.json` file in your text editor. -2. Locate the `"allowAnonymousTelemetry"` setting. +2. Locate and/or add the `"allowAnonymousTelemetry"` setting. 3. Change the value from `true` to `false`. 4. Save the file. -### Steps to Disable Telemetry via VS Code Settings +### Via VS Code Settings 1. Open VS Code. 2. Navigate to `File` > `Preferences` > `Settings` (or use the keyboard shortcut ctrl + , on Windows/Linux or cmd + , on macOS). diff --git a/docs/docs/troubleshooting.mdx b/docs/docs/troubleshooting.mdx index 3b2713323..4b0e35941 100644 --- a/docs/docs/troubleshooting.mdx +++ b/docs/docs/troubleshooting.mdx @@ -88,7 +88,7 @@ If your keyboard shortcuts are not resolving, you may have other commands that a #### 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: +If you're seeing a `fetch failed` error and your network requires custom certificates, you will need to configure them in your config file. In each of the objects in the `"models"` array, add `requestOptions.caBundlePath` like this: diff --git a/docs/docs/yaml-migration.md b/docs/docs/yaml-migration.md index f6a70bc64..79a3906fa 100644 --- a/docs/docs/yaml-migration.md +++ b/docs/docs/yaml-migration.md @@ -37,11 +37,10 @@ Add all model configurations in `config.json`, including models in `models`, `ta - `inlineEdit` -> e.g. `roles: [chat, edit]` - `applyCodeBlock` -> e.g. `roles: [chat, apply]` -Model-level `requestOptions` remain, with minor changes. See [YAML Continue Config Reference](/yaml-reference#requestoptions) +Model-level `requestOptions` remain, with minor changes. See [YAML Continue Config Reference](/reference#requestoptions) -Model-level `completionOptions` are replaced by `defaultCompletionOptions`, with minor changes. See [YAML Continue Config Reference](/yaml-reference#completionoptions) +Model-level `completionOptions` are replaced by `defaultCompletionOptions`, with minor changes. See [YAML Continue Config Reference](/reference#completionoptions) - **Before** @@ -103,7 +102,7 @@ models: - name: GPT-4 provider: openai model: gpt-4 - apiKey: + apiKey: ${{ secrets.OPENAI_KEY }} defaultCompletionOptions: temperature: 0.5 maxTokens: 2000 @@ -113,7 +112,7 @@ models: - name: My Voyage Reranker provider: voyage - apiKey: + apiKey: ${{ secrets.VOYAGE_KEY }} roles: - rerank @@ -125,7 +124,7 @@ models: - name: My Ada Embedder provider: openai - apiKey: + apiKey: ${{ secrets.ADA_API_KEY }} roles: - embed @@ -139,7 +138,7 @@ models: apiBase: http://3.3.3.3/v1 requestOptions: headers: - X-Auth-Token: + X-Auth-Token: ${{ secrets.CUSTOM_API_KEY }} roles: - chat - apply @@ -325,13 +324,16 @@ mcpServers: ## Deprecated configuration options -The following top-level fields from `config.json` have been deprecated. Most UI-related and user-specific options will move into a settings page in the UI +The following top-level fields are not yet supported in the YAML config file, and you will need to stick with `config.json` to use them for now - Slash commands (JSON `slashCommands`) - top-level `requestOptions` - top-level `completionOptions` - `tabAutocompleteOptions` - `analytics` + +The following top-level fields from `config.json` have been deprecated. Most UI-related and user-specific options will move into a settings page in the UI + - `customCommands` - `disableSessionTitles` - `experimental` @@ -342,4 +344,4 @@ The following top-level fields from `config.json` have been deprecated. Most UI- ## New Configuration options -The YAML configuration format offers new configuration options not available in the JSON format. See the [YAML Config Reference](/yaml-reference) for more information. +The YAML configuration format offers new configuration options not available in the JSON format. See the [YAML Config Reference](./reference) for more information. From ca1d2f49d9572198591924358bed5e7ee302df6d Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Fri, 17 Jan 2025 17:35:37 -0800 Subject: [PATCH 011/262] fix build errors --- docs/docs/customize/model-types/embeddings.mdx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/docs/customize/model-types/embeddings.mdx b/docs/docs/customize/model-types/embeddings.mdx index 3f3d76dda..edb6921f7 100644 --- a/docs/docs/customize/model-types/embeddings.mdx +++ b/docs/docs/customize/model-types/embeddings.mdx @@ -5,6 +5,9 @@ keywords: [embedding] sidebar_position: 3 --- +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + An "embeddings model" is trained to convert a piece of text into a vector, which can later be rapidly compared to other vectors to determine similarity between the pieces of text. Embeddings models are typically much smaller than LLMs, and will be extremely fast and cheap in comparison. In Continue, embeddings are generated during indexing and then used by [@Codebase](../deep-dives/codebase.mdx) to perform similarity search over your codebase. From a9db81cbe27ec73a902d55b5b0d4047b561d0bae Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Fri, 17 Jan 2025 18:24:14 -0800 Subject: [PATCH 012/262] fix broken docs links --- docs/docs/actions/how-it-works.mdx | 2 +- docs/docs/chat/context-selection.md | 2 +- docs/docs/customize/context-providers.mdx | 2 +- docs/docs/customize/model-types/chat.md | 2 +- docs/docs/customize/overview.md | 2 +- docs/docs/customize/tools.mdx | 4 ++-- .../customize/tutorials/build-your-own-context-provider.md | 2 +- docs/docs/customize/tutorials/build-your-own-slash-command.md | 2 +- docs/docs/json-reference.md | 2 +- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/docs/docs/actions/how-it-works.mdx b/docs/docs/actions/how-it-works.mdx index afb1b2396..90bd4bb20 100644 --- a/docs/docs/actions/how-it-works.mdx +++ b/docs/docs/actions/how-it-works.mdx @@ -7,6 +7,6 @@ sidebar_position: 4 While many Actions are based on templated prompts and can be customized with .prompt files, there are a number that execute more complex code under the hood. -Actions that generate inline diffs, like “/edit”, “/comment”, or right click actions, use the same prompt and response processing logic as [Edit](edit/how-it-works). +Actions that generate inline diffs, like “/edit”, “/comment”, or right click actions, use the same prompt and response processing logic as [Edit](../edit/how-it-works.md). To learn how other slash commands work, see the full reference [here](../customize/slash-commands.mdx). diff --git a/docs/docs/chat/context-selection.md b/docs/docs/chat/context-selection.md index f93a6a93e..aa1d052fe 100644 --- a/docs/docs/chat/context-selection.md +++ b/docs/docs/chat/context-selection.md @@ -23,7 +23,7 @@ You can include a specific file in your current workspace as context by typing [ ## Specific folder -You can include a folder in your current workspace as context by typing [`@Folder`](../customize/context-providers.mdx#folder) and selecting the directory. It [works like `@Codebase`](../customize/deep-dives/codebase.md) but only includes the files in the selected folder. +You can include a folder in your current workspace as context by typing [`@Folder`](../customize/context-providers.mdx#folder) and selecting the directory. It [works like `@Codebase`](../customize/deep-dives/codebase.mdx) but only includes the files in the selected folder. ## Codebase search diff --git a/docs/docs/customize/context-providers.mdx b/docs/docs/customize/context-providers.mdx index cd7c5a5e7..2833d45a3 100644 --- a/docs/docs/customize/context-providers.mdx +++ b/docs/docs/customize/context-providers.mdx @@ -490,7 +490,7 @@ You'll then be able to type "@" and see "MCP" in the context providers dropdown. ### Prompt Files -See [Prompt Files](/customize/deep-dives/prompt-file.mdx). Prompt files are not added directly to the config file; prompt files are parsed and injected into the config automatically, to be used like other context providers. +See [Prompt Files](./deep-dives/prompt-files.md). Prompt files are not added directly to the config file; prompt files are parsed and injected into the config automatically, to be used like other context providers. ### `@Issue` diff --git a/docs/docs/customize/model-types/chat.md b/docs/docs/customize/model-types/chat.md index 447021251..e5fb7e3d4 100644 --- a/docs/docs/customize/model-types/chat.md +++ b/docs/docs/customize/model-types/chat.md @@ -15,4 +15,4 @@ Otherwise, some of the next best options are: - [GPT-4o](../model-providers/top-level/openai.mdx) - [Gemini 1.5 Pro](../model-providers/top-level/gemini.mdx) -- [Llama3.1 405B](../tutorials/llama3.1.md) +- [Llama3.1 405B](../tutorials/llama3.1.mdx) diff --git a/docs/docs/customize/overview.md b/docs/docs/customize/overview.md index fdbd1a61e..6104799b9 100644 --- a/docs/docs/customize/overview.md +++ b/docs/docs/customize/overview.md @@ -25,7 +25,7 @@ You can easily access config file from the Continue Chat sidebar. Open the sideb ![configure-continue](/img/configure-continue.png) -When editing this file, you can see the available options suggested as you type, or you can check the [full reference](./deep-dives/configuration.mdx). +When editing this file, you can see the available options suggested as you type, or you can check the [full reference](./deep-dives/configuration.md). :::info diff --git a/docs/docs/customize/tools.mdx b/docs/docs/customize/tools.mdx index 6fac7f651..1c2d9a97a 100644 --- a/docs/docs/customize/tools.mdx +++ b/docs/docs/customize/tools.mdx @@ -9,8 +9,8 @@ import TabItem from "@theme/TabItem"; Tools allow Continue to take action in your IDE and beyond (when you give permission). Currently, they are only supported for the following providers: -- [Anthropic](./model-providers/top-level/anthropic.md) - see recommended models [here](https://docs.anthropic.com/en/docs/build-with-claude/tool-use#choosing-a-model). -- [Ollama](./model-providers/top-level/ollama.md) - see recommended models [here](https://ollama.com/search?c=tools). +- [Anthropic](./model-providers/top-level/anthropic.mdx) - see recommended models [here](https://docs.anthropic.com/en/docs/build-with-claude/tool-use#choosing-a-model). +- [Ollama](./model-providers/top-level/ollama.mdx) - see recommended models [here](https://ollama.com/search?c=tools). To use tools, click on the icon in the input toolbar like below. diff --git a/docs/docs/customize/tutorials/build-your-own-context-provider.md b/docs/docs/customize/tutorials/build-your-own-context-provider.md index 53c40f910..00140013e 100644 --- a/docs/docs/customize/tutorials/build-your-own-context-provider.md +++ b/docs/docs/customize/tutorials/build-your-own-context-provider.md @@ -3,7 +3,7 @@ title: Build your own context provider --- :::info -Custom context providers are added through `~/config.ts`, which has been deprecated in favor of the [`YAML Config Format`](../reference.md). We recommend looking into [Prompt Files](../deep-dives/prompt-files.md) and [MCP Servers](../context-providers.mdx#modelcontextprotocol) to achieve similar functionality. +Custom context providers are added through `~/config.ts`, which has been deprecated in favor of the [`YAML Config Format`](../../reference.md). We recommend looking into [Prompt Files](../deep-dives/prompt-files.md) and [MCP Servers](../context-providers.mdx#modelcontextprotocol) to achieve similar functionality. ::: ## Introductory Example diff --git a/docs/docs/customize/tutorials/build-your-own-slash-command.md b/docs/docs/customize/tutorials/build-your-own-slash-command.md index 1692970fc..d3f9d3c11 100644 --- a/docs/docs/customize/tutorials/build-your-own-slash-command.md +++ b/docs/docs/customize/tutorials/build-your-own-slash-command.md @@ -3,7 +3,7 @@ title: Build your own slash command --- :::info -Slash commands can currently only be added using [`config.json`](../json-reference.md) or `config.ts`, which have been deprecated in favor of the [`YAML Config Format`](../reference.md). We recommend looking into [Prompt Files](../customize/deep-dives//prompt-files.md) to achieve similar functionality. +Slash commands can currently only be added using [`config.json`](../../json-reference.md) or `config.ts`, which have been deprecated in favor of the [`YAML Config Format`](../../reference.md). We recommend looking into [Prompt Files](../deep-dives/prompt-files.md) to achieve similar functionality. ::: There are two ways to add custom slash commands: diff --git a/docs/docs/json-reference.md b/docs/docs/json-reference.md index 8b6f9e7f2..59a15d572 100644 --- a/docs/docs/json-reference.md +++ b/docs/docs/json-reference.md @@ -27,7 +27,7 @@ Each model has specific configuration options tailored to its provider and funct - `contextLength`: Maximum context length of the model, typically in tokens (default: 2048). - `maxStopWords`: Maximum number of stop words allowed, to avoid API errors with extensive lists. - `template`: Chat template to format messages. Auto-detected for most models but can be overridden. See intelliJ suggestions. -- `promptTemplates`: A mapping of prompt template names (e.g., `edit`) to template strings. [Customization Guide](/model-setup/configuration#customizing-the-edit-prompt). +- `promptTemplates`: A mapping of prompt template names (e.g., `edit`) to template strings. (DEPRECATED) - `completionOptions`: Model-specific completion options, same format as top-level [`completionOptions`](#completionoptions), which they override. - `systemMessage`: A system message that will precede responses from the LLM. - `requestOptions`: Model-specific HTTP request options, same format as top-level [`requestOptions`](#requestoptions), which they override. From e23e9c9a7184e622332eeb2d004b1d673f20bdbd Mon Sep 17 00:00:00 2001 From: Nate Date: Sat, 25 Jan 2025 12:21:58 -0800 Subject: [PATCH 013/262] jb-onboarding flow --- core/control-plane/auth/index.ts | 3 +- core/core.ts | 5 +- core/protocol/core.ts | 2 +- .../ContinuePluginStartupActivity.kt | 2 +- .../auth/ContinueAuthDialog.kt | 7 +- .../auth/ContinueAuthService.kt | 30 ++++-- .../continue/IdeProtocolClient.kt | 2 +- .../continue/IntelliJIde.kt | 1 + .../continueintellijextension/protocol/ide.kt | 2 +- .../ContinueExtensionSettingsService.kt | 14 ++- .../continueintellijextension/types.kt | 3 +- gui/src/components/AccountDialog.tsx | 96 ++++++++++--------- 12 files changed, 103 insertions(+), 64 deletions(-) diff --git a/core/control-plane/auth/index.ts b/core/control-plane/auth/index.ts index 8965f4fdb..a3441ab65 100644 --- a/core/control-plane/auth/index.ts +++ b/core/control-plane/auth/index.ts @@ -4,13 +4,14 @@ import { getControlPlaneEnv } from "../env"; export async function getAuthUrlForTokenPage( ideSettingsPromise: Promise, + useOnboarding: boolean, ): Promise { const env = await getControlPlaneEnv(ideSettingsPromise); const url = new URL("https://api.workos.com/user_management/authorize"); const params = { response_type: "code", client_id: env.WORKOS_CLIENT_ID, - redirect_uri: `${env.APP_URL}tokens/callback`, + redirect_uri: `${env.APP_URL}tokens/${useOnboarding ? "onboarding-" : ""}callback`, // redirect_uri: "http://localhost:3000/tokens/callback", state: uuidv4(), provider: "authkit", diff --git a/core/core.ts b/core/core.ts index cf24053b4..6c5572bdb 100644 --- a/core/core.ts +++ b/core/core.ts @@ -873,7 +873,10 @@ export class Core { this.configHandler.updateControlPlaneSessionInfo(msg.data.sessionInfo); }); on("auth/getAuthUrl", async (msg) => { - const url = await getAuthUrlForTokenPage(ideSettingsPromise); + const url = await getAuthUrlForTokenPage( + ideSettingsPromise, + msg.data.useOnboarding, + ); return { url }; }); diff --git a/core/protocol/core.ts b/core/protocol/core.ts index 52cffb027..72801a908 100644 --- a/core/protocol/core.ts +++ b/core/protocol/core.ts @@ -185,7 +185,7 @@ export type ToCoreFromIdeOrWebviewProtocol = { "profiles/switch": [{ id: string }, undefined]; - "auth/getAuthUrl": [undefined, { url: string }]; + "auth/getAuthUrl": [{ useOnboarding: boolean }, { url: string }]; "tools/call": [ { toolCall: ToolCall; selectedModelTitle: string }, { contextItems: ContextItem[] }, diff --git a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/activities/ContinuePluginStartupActivity.kt b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/activities/ContinuePluginStartupActivity.kt index 72819421a..2fcb7066d 100644 --- a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/activities/ContinuePluginStartupActivity.kt +++ b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/activities/ContinuePluginStartupActivity.kt @@ -196,7 +196,7 @@ class ContinuePluginStartupActivity : StartupActivity, DumbAware { connection.subscribe(AuthListener.TOPIC, object : AuthListener { override fun startAuthFlow() { - authService.startAuthFlow(project) + authService.startAuthFlow(project, false) } override fun handleUpdatedSessionInfo(sessionInfo: ControlPlaneSessionInfo?) { diff --git a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/auth/ContinueAuthDialog.kt b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/auth/ContinueAuthDialog.kt index b8a862fad..b9faf65d7 100644 --- a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/auth/ContinueAuthDialog.kt +++ b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/auth/ContinueAuthDialog.kt @@ -7,7 +7,8 @@ import javax.swing.JComponent import javax.swing.JPanel import java.awt.BorderLayout -class ContinueAuthDialog(private val onTokenEntered: (String) -> Unit) : DialogWrapper(true) { +class ContinueAuthDialog(private val useOnboarding: Boolean, private val onTokenEntered: (String) -> Unit) : + DialogWrapper(true) { private val tokenField = JBTextField() init { @@ -17,7 +18,9 @@ class ContinueAuthDialog(private val onTokenEntered: (String) -> Unit) : DialogW override fun createCenterPanel(): JComponent { val panel = JPanel(BorderLayout()) - panel.add(JBLabel("Please enter your Continue authentication token:"), BorderLayout.NORTH) + val message = + if (useOnboarding) "After onboarding you will be shown an authentication token. Please enter it here:" else "Please enter your Continue authentication token:" + panel.add(JBLabel(message), BorderLayout.NORTH) panel.add(tokenField, BorderLayout.CENTER) return panel } diff --git a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/auth/ContinueAuthService.kt b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/auth/ContinueAuthService.kt index d23308cf1..639e4d442 100644 --- a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/auth/ContinueAuthService.kt +++ b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/auth/ContinueAuthService.kt @@ -33,8 +33,18 @@ class ContinueAuthService { private const val REFRESH_TOKEN_KEY = "ContinueRefreshToken" private const val ACCOUNT_ID_KEY = "ContinueAccountId" private const val ACCOUNT_LABEL_KEY = "ContinueAccountLabel" - private const val CONTROL_PLANE_URL = "https://control-plane-api-service-i3dqylpbqa-uc.a.run.app" -// private const val CONTROL_PLANE_URL = "http://localhost:3001" + } + + private fun getControlPlaneUrl(): String { + val env = service().continueState.continueTestEnvironment; + when (env) { + "none" -> return "https://control-plane-api-service-i3dqylpbqa-uc.a.run.app" + "local" -> return "http://localhost:3001" + "production" -> return "https://api.continue.dev" + "test" -> return "https://api-test.continue.dev" + } + + return "https://control-plane-api-service-i3dqylpbqa-uc.a.run.app" } init { @@ -44,13 +54,13 @@ class ContinueAuthService { } } - fun startAuthFlow(project: Project) { + fun startAuthFlow(project: Project, useOnboarding: Boolean) { // Open login page - openSignInPage(project) + openSignInPage(project, useOnboarding) // Open a dialog where the user should paste their sign-in token ApplicationManager.getApplication().invokeLater { - val dialog = ContinueAuthDialog() { token -> + val dialog = ContinueAuthDialog(useOnboarding) { token -> // Store the token updateRefreshToken(token) } @@ -111,7 +121,7 @@ class ContinueAuthService { private suspend fun refreshToken(refreshToken: String) = withContext(Dispatchers.IO) { val client = OkHttpClient() - val url = URL(CONTROL_PLANE_URL).toURI().resolve("/auth/refresh").toURL() + val url = URL(getControlPlaneUrl()).toURI().resolve("/auth/refresh").toURL() val jsonBody = mapOf("refreshToken" to refreshToken) val jsonString = Gson().toJson(jsonBody) val requestBody = jsonString.toRequestBody("application/json".toMediaType()) @@ -132,9 +142,13 @@ class ContinueAuthService { } - private fun openSignInPage(project: Project) { + private fun openSignInPage(project: Project, useOnboarding: Boolean) { val coreMessenger = project.service().coreMessenger - coreMessenger?.request("auth/getAuthUrl", null, null) { response -> + coreMessenger?.request( + "auth/getAuthUrl", mapOf( + "useOnboarding" to useOnboarding + ), null + ) { response -> val authUrl = ((response as? Map<*, *>)?.get("content") as? Map<*, *>)?.get("url") as? String if (authUrl != null) { // Open the auth URL in the browser diff --git a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/IdeProtocolClient.kt b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/IdeProtocolClient.kt index 0a0b6b83a..674b991f7 100644 --- a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/IdeProtocolClient.kt +++ b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/IdeProtocolClient.kt @@ -97,7 +97,7 @@ class IdeProtocolClient( val sessionInfo = authService.loadControlPlaneSessionInfo() respond(sessionInfo) } else { - authService.startAuthFlow(project) + authService.startAuthFlow(project, params.useOnboarding) respond(null) } } diff --git a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/IntelliJIde.kt b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/IntelliJIde.kt index d30a5d5fe..3b59c2503 100644 --- a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/IntelliJIde.kt +++ b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/IntelliJIde.kt @@ -93,6 +93,7 @@ class IntelliJIDE( remoteConfigSyncPeriod = settings.continueState.remoteConfigSyncPeriod, userToken = settings.continueState.userToken ?: "", enableControlServerBeta = settings.continueState.enableContinueTeamsBeta, + continueTestEnvironment = settings.continueState.continueTestEnvironment, pauseCodebaseIndexOnStart = false, // TODO: Needs to be implemented enableDebugLogs = false // TODO: Needs to be implemented ) diff --git a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/protocol/ide.kt b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/protocol/ide.kt index 4aa433f52..5ce49e80a 100644 --- a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/protocol/ide.kt +++ b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/protocol/ide.kt @@ -2,7 +2,7 @@ package com.github.continuedev.continueintellijextension.protocol import com.github.continuedev.continueintellijextension.* -data class GetControlPlaneSessionInfoParams(val silent: Boolean) +data class GetControlPlaneSessionInfoParams(val silent: Boolean, val useOnboarding: Boolean) data class WriteFileParams( val path: String, diff --git a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/services/ContinueExtensionSettingsService.kt b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/services/ContinueExtensionSettingsService.kt index ce548e5f5..4901bd018 100644 --- a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/services/ContinueExtensionSettingsService.kt +++ b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/services/ContinueExtensionSettingsService.kt @@ -2,6 +2,7 @@ package com.github.continuedev.continueintellijextension.services import com.github.continuedev.continueintellijextension.constants.getConfigJsPath import com.github.continuedev.continueintellijextension.constants.getConfigJsonPath +import com.intellij.execution.target.value.constant import com.intellij.openapi.application.ApplicationInfo import com.intellij.openapi.application.ApplicationManager import com.intellij.openapi.components.* @@ -33,6 +34,7 @@ class ContinueSettingsComponent : DumbAware { val enableOSR: JCheckBox = JCheckBox("Enable Off-Screen Rendering") val displayEditorTooltip: JCheckBox = JCheckBox("Display Editor Tooltip") val showIDECompletionSideBySide: JCheckBox = JCheckBox("Show IDE completions side-by-side") + val continueTestEnvironment: JComboBox = JComboBox(arrayOf("none", "production", "test", "local")) init { val constraints = GridBagConstraints() @@ -66,6 +68,11 @@ class ContinueSettingsComponent : DumbAware { constraints.gridy++ panel.add(showIDECompletionSideBySide, constraints) constraints.gridy++ + panel.add(JLabel("Continue test environment"), constraints) + constraints.gridy++ + constraints.gridy++ + panel.add(continueTestEnvironment, constraints) + constraints.gridy++ // Add a "filler" component that takes up all remaining vertical space constraints.weighty = 1.0 @@ -98,6 +105,7 @@ open class ContinueExtensionSettings : PersistentStateComponent

Account

@@ -89,53 +89,57 @@ export default function AccountDialog() { -
- Current workspace + {controlServerBetaEnabled && ( +
+ Current workspace - - {({ open }) => ( -
- - {selectedProfile?.title} -
-
-
+ + {({ open }) => ( +
+ + + {selectedProfile?.title} + +
+
+
- - - {profiles.map((option, idx) => ( - - - {option.title} - - - ))} - {profiles.length === 0 && ( -
- No workspaces found -
- )} -
-
-
- )} -
-
+ + + {profiles.map((option, idx) => ( + + + {option.title} + + + ))} + {profiles.length === 0 && ( +
+ No workspaces found +
+ )} +
+
+
+ )} + +
+ )}
From dbab35643689138c1764ffbda124a8dbaaee10e2 Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Tue, 28 Jan 2025 14:28:15 -0800 Subject: [PATCH 014/262] remove view history message --- core/protocol/ideWebview.ts | 4 ---- .../actions/ContinuePluginActions.kt | 3 ++- extensions/vscode/src/commands.ts | 2 +- gui/src/components/Layout.tsx | 13 ------------- 4 files changed, 3 insertions(+), 19 deletions(-) diff --git a/core/protocol/ideWebview.ts b/core/protocol/ideWebview.ts index 9cc19504d..3598e06ea 100644 --- a/core/protocol/ideWebview.ts +++ b/core/protocol/ideWebview.ts @@ -79,10 +79,6 @@ export type ToWebviewFromIdeProtocol = ToWebviewFromIdeOrCoreProtocol & { navigateTo: [{ path: string; toggle?: boolean }, void]; addModel: [undefined, void]; - /** - * @deprecated Use navigateTo with a path instead. - */ - viewHistory: [undefined, void]; focusContinueSessionId: [{ sessionId: string | undefined }, void]; newSession: [undefined, void]; setTheme: [{ theme: any }, void]; diff --git a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/actions/ContinuePluginActions.kt b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/actions/ContinuePluginActions.kt index 852fb4f02..6a3150145 100644 --- a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/actions/ContinuePluginActions.kt +++ b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/actions/ContinuePluginActions.kt @@ -113,7 +113,8 @@ class NewContinueSessionAction : AnAction() { class ViewHistoryAction : AnAction() { override fun actionPerformed(e: AnActionEvent) { val continuePluginService = getContinuePluginService(e.project) ?: return - continuePluginService.sendToWebview("viewHistory", null) + val params = mapOf("path" to "/history", "toggle" to true) + continuePluginService.sendToWebview("navigateTo", params) } } diff --git a/extensions/vscode/src/commands.ts b/extensions/vscode/src/commands.ts index d8019cfe1..66072e9b9 100644 --- a/extensions/vscode/src/commands.ts +++ b/extensions/vscode/src/commands.ts @@ -708,7 +708,7 @@ const getCommandsMap: ( sidebar.webviewProtocol?.request("newSession", undefined); }, "continue.viewHistory": () => { - sidebar.webviewProtocol?.request("viewHistory", undefined); + vscode.commands.executeCommand("continue.navigateTo", "/history", true); }, "continue.focusContinueSessionId": async ( sessionId: string | undefined, diff --git a/gui/src/components/Layout.tsx b/gui/src/components/Layout.tsx index cadaa5830..e18becbf7 100644 --- a/gui/src/components/Layout.tsx +++ b/gui/src/components/Layout.tsx @@ -122,19 +122,6 @@ const Layout = () => { [navigate], ); - useWebviewListener( - "viewHistory", - async () => { - // Toggle the history page / main page - if (location.pathname === "/history") { - navigate("/"); - } else { - navigate("/history"); - } - }, - [location, navigate], - ); - useWebviewListener( "navigateTo", async (data) => { From 270b3a4f59a19e6dfe0ffec006a922cb4e779f6b Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Wed, 29 Jan 2025 11:12:18 -0800 Subject: [PATCH 015/262] don't send uris to model --- .../providers/CurrentFileContextProvider.ts | 10 ++++--- core/context/providers/FileContextProvider.ts | 16 +++++++---- gui/src/redux/thunks/gatherContext.ts | 27 ++++++++++--------- 3 files changed, 32 insertions(+), 21 deletions(-) diff --git a/core/context/providers/CurrentFileContextProvider.ts b/core/context/providers/CurrentFileContextProvider.ts index d3cef2dc1..16374a7e6 100644 --- a/core/context/providers/CurrentFileContextProvider.ts +++ b/core/context/providers/CurrentFileContextProvider.ts @@ -4,7 +4,7 @@ import { ContextProviderDescription, ContextProviderExtras, } from "../../"; -import { getUriPathBasename } from "../../util/uri"; +import { findUriInDirs, getUriPathBasename } from "../../util/uri"; class CurrentFileContextProvider extends BaseContextProvider { static description: ContextProviderDescription = { @@ -23,11 +23,15 @@ class CurrentFileContextProvider extends BaseContextProvider { if (!currentFile) { return []; } + const { relativePathOrBasename } = findUriInDirs( + currentFile.path, + await extras.ide.getWorkspaceDirs(), + ); const baseName = getUriPathBasename(currentFile.path); return [ { - description: currentFile.path, - content: `This is the currently open file:\n\n\`\`\`${baseName}\n${currentFile.contents}\n\`\`\``, + description: relativePathOrBasename, + content: `This is the currently open file:\n\n\`\`\`${relativePathOrBasename}\n${currentFile.contents}\n\`\`\``, name: baseName, uri: { type: "file", diff --git a/core/context/providers/FileContextProvider.ts b/core/context/providers/FileContextProvider.ts index 674cc1a00..460ca34ab 100644 --- a/core/context/providers/FileContextProvider.ts +++ b/core/context/providers/FileContextProvider.ts @@ -10,6 +10,7 @@ import { walkDirs } from "../../indexing/walkDir"; import { getUriPathBasename, getShortestUniqueRelativeUriPaths, + findUriInDirs, } from "../../util/uri"; const MAX_SUBMENU_ITEMS = 10_000; @@ -27,16 +28,21 @@ class FileContextProvider extends BaseContextProvider { extras: ContextProviderExtras, ): Promise { // Assume the query is a filepath - query = query.trim(); - const content = await extras.ide.readFile(query); + const fileUri = query.trim(); + const basename = getUriPathBasename(fileUri); + const { relativePathOrBasename } = findUriInDirs( + fileUri, + await extras.ide.getWorkspaceDirs(), + ); + const content = await extras.ide.readFile(fileUri); return [ { - name: query.split(/[\\/]/).pop() ?? query, + name: basename, description: query, - content: `\`\`\`${query}\n${content}\n\`\`\``, + content: `\`\`\`${relativePathOrBasename}\n${content}\n\`\`\``, uri: { type: "file", - value: query, + value: fileUri, }, }, ]; diff --git a/gui/src/redux/thunks/gatherContext.ts b/gui/src/redux/thunks/gatherContext.ts index 0883ec3eb..3b690c9f7 100644 --- a/gui/src/redux/thunks/gatherContext.ts +++ b/gui/src/redux/thunks/gatherContext.ts @@ -10,6 +10,7 @@ import resolveEditorContent from "../../components/mainInput/resolveInput"; import { ThunkApiType } from "../store"; import { selectDefaultModel } from "../slices/configSlice"; import { findUriInDirs, getUriPathBasename } from "core/util/uri"; +import * as URI from "uri-js"; export const gatherContext = createAsyncThunk< { @@ -66,27 +67,27 @@ export const gatherContext = createAsyncThunk< .join("\n"); } if ( - !selectedContextItems.find( - (item) => item.uri?.value === currentFile.path, + // don't add the file if it's already in the context items + !selectedContextItems.find((item) => + URI.equal(item.uri?.value ?? "", currentFile.path), ) ) { - // don't add the file if it's already in the context items + const { relativePathOrBasename, uri } = findUriInDirs( + currentFile.path, + await extra.ideMessenger.ide.getWorkspaceDirs(), + ); + const basename = getUriPathBasename(currentFile.path); selectedContextItems.unshift({ - content: `The following file is currently open. Don't reference it if it's not relevant to the user's message.\n\n\`\`\`${ - findUriInDirs( - currentFile.path, - await extra.ideMessenger.ide.getWorkspaceDirs(), - ).relativePathOrBasename - }\n${currentFileContents}\n\`\`\``, - name: `Active file: ${getUriPathBasename(currentFile.path)}`, - description: currentFile.path, + content: `The following file is currently open. Don't reference it if it's not relevant to the user's message.\n\n\`\`\`${relativePathOrBasename}\n${currentFileContents}\n\`\`\``, + name: `Active file: ${basename}`, + description: relativePathOrBasename, id: { - itemId: currentFile.path, + itemId: uri, providerTitle: "file", }, uri: { type: "file", - value: currentFile.path, + value: uri, }, }); } From a277ff08a22fcdd194c956c19d97177c9e301e93 Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Wed, 29 Jan 2025 13:40:47 -0800 Subject: [PATCH 016/262] current file context provider updates --- .../providers/CurrentFileContextProvider.ts | 15 +++- core/context/providers/FileContextProvider.ts | 2 +- gui/src/redux/thunks/gatherContext.ts | 73 ++++++++++--------- 3 files changed, 54 insertions(+), 36 deletions(-) diff --git a/core/context/providers/CurrentFileContextProvider.ts b/core/context/providers/CurrentFileContextProvider.ts index 16374a7e6..c5e3b8304 100644 --- a/core/context/providers/CurrentFileContextProvider.ts +++ b/core/context/providers/CurrentFileContextProvider.ts @@ -28,11 +28,22 @@ class CurrentFileContextProvider extends BaseContextProvider { await extras.ide.getWorkspaceDirs(), ); const baseName = getUriPathBasename(currentFile.path); + + let prefix = "This is the currently open file:"; + let name = baseName; + + // This allows frontend to retrieve when using alt + enter or default context with slightly different copy + if (query === "non-mention-usage") { + prefix = + "The following file is currently open. Don't reference it if it's not relevant to the user's message:"; + name = "Active file: " + baseName; + } + return [ { description: relativePathOrBasename, - content: `This is the currently open file:\n\n\`\`\`${relativePathOrBasename}\n${currentFile.contents}\n\`\`\``, - name: baseName, + content: `${prefix}\n\n\`\`\`${relativePathOrBasename}\n${currentFile.contents}\n\`\`\``, + name, uri: { type: "file", value: currentFile.path, diff --git a/core/context/providers/FileContextProvider.ts b/core/context/providers/FileContextProvider.ts index 460ca34ab..4bcbdfb81 100644 --- a/core/context/providers/FileContextProvider.ts +++ b/core/context/providers/FileContextProvider.ts @@ -38,7 +38,7 @@ class FileContextProvider extends BaseContextProvider { return [ { name: basename, - description: query, + description: relativePathOrBasename, content: `\`\`\`${relativePathOrBasename}\n${content}\n\`\`\``, uri: { type: "file", diff --git a/gui/src/redux/thunks/gatherContext.ts b/gui/src/redux/thunks/gatherContext.ts index 3b690c9f7..8bae5227e 100644 --- a/gui/src/redux/thunks/gatherContext.ts +++ b/gui/src/redux/thunks/gatherContext.ts @@ -11,6 +11,7 @@ import { ThunkApiType } from "../store"; import { selectDefaultModel } from "../slices/configSlice"; import { findUriInDirs, getUriPathBasename } from "core/util/uri"; import * as URI from "uri-js"; +import { v4 as uuidv4 } from "uuid"; export const gatherContext = createAsyncThunk< { @@ -35,7 +36,7 @@ export const gatherContext = createAsyncThunk< const defaultContextProviders = state.config.config.experimental?.defaultContext ?? []; - if (!state.config.defaultModelTitle) { + if (!defaultModel) { console.error( "gatherContext thunk: Cannot gather context, no model selected", ); @@ -50,46 +51,52 @@ export const gatherContext = createAsyncThunk< ideMessenger: extra.ideMessenger, defaultContextProviders, dispatch, - selectedModelTitle: state.config.defaultModelTitle, + selectedModelTitle: defaultModel.title, }); // Automatically use currently open file if (!modifiers.noContext) { const usingFreeTrial = defaultModel?.provider === "free-trial"; - const currentFile = await extra.ideMessenger.ide.getCurrentFile(); - if (currentFile) { - let currentFileContents = currentFile.contents; - if (usingFreeTrial) { - currentFileContents = currentFile.contents - .split("\n") - .slice(0, 1000) - .join("\n"); - } - if ( + const currentFileResponse = await extra.ideMessenger.request( + "context/getContextItems", + { + name: "currentFile", + query: "non-mention-usage", + fullInput: "", + selectedCode: [], + selectedModelTitle: defaultModel.title, + }, + ); + if (currentFileResponse.status === "success") { + const items = currentFileResponse.content; + if (items.length > 0) { + const currentFile = items[0]; + const uri = currentFile.uri?.value; + // don't add the file if it's already in the context items - !selectedContextItems.find((item) => - URI.equal(item.uri?.value ?? "", currentFile.path), - ) - ) { - const { relativePathOrBasename, uri } = findUriInDirs( - currentFile.path, - await extra.ideMessenger.ide.getWorkspaceDirs(), - ); - const basename = getUriPathBasename(currentFile.path); - selectedContextItems.unshift({ - content: `The following file is currently open. Don't reference it if it's not relevant to the user's message.\n\n\`\`\`${relativePathOrBasename}\n${currentFileContents}\n\`\`\``, - name: `Active file: ${basename}`, - description: relativePathOrBasename, - id: { - itemId: uri, + if ( + uri && + !selectedContextItems.find( + (item) => item.uri?.value && URI.equal(item.uri.value, uri), + ) + ) { + // Limit to 1000 lines if using free trial + if (usingFreeTrial) { + currentFile.content = currentFile.content + .split("\n") + .slice(0, 1000) + .join("\n"); + if (!currentFile.content.endsWith("```")) { + currentFile.content += "\n```"; + } + } + currentFile.id = { providerTitle: "file", - }, - uri: { - type: "file", - value: uri, - }, - }); + itemId: uri, + }; + selectedContextItems.unshift(currentFile); + } } } } From c2a91063497855792d489e5a4103bbb73b009027 Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Wed, 29 Jan 2025 14:19:02 -0800 Subject: [PATCH 017/262] update all context item descriptions to be consistent --- core/context/providers/CodeContextProvider.ts | 6 +++++- .../providers/CurrentFileContextProvider.ts | 8 ++++---- core/context/providers/FileContextProvider.ts | 13 +++++++------ .../providers/OpenFilesContextProvider.ts | 15 +++++++++------ .../providers/ProblemsContextProvider.ts | 12 ++++++++---- core/context/retrieval/retrieval.ts | 15 +++++++-------- core/indexing/CodeSnippetsIndex.ts | 18 ++++++++++++++---- .../implementations/readCurrentlyOpenFile.ts | 13 ++++++++----- core/util/uri.ts | 16 ++++++++++++++++ 9 files changed, 78 insertions(+), 38 deletions(-) diff --git a/core/context/providers/CodeContextProvider.ts b/core/context/providers/CodeContextProvider.ts index 837e4d05d..b746199b0 100644 --- a/core/context/providers/CodeContextProvider.ts +++ b/core/context/providers/CodeContextProvider.ts @@ -24,8 +24,12 @@ class CodeContextProvider extends BaseContextProvider { extras: ContextProviderExtras, ): Promise { // Assume the query is the id as returned by loadSubmenuItems + const workspaceDirs = await extras.ide.getWorkspaceDirs(); return [ - await CodeSnippetsCodebaseIndex.getForId(Number.parseInt(query, 10)), + await CodeSnippetsCodebaseIndex.getForId( + Number.parseInt(query, 10), + workspaceDirs, + ), ]; } diff --git a/core/context/providers/CurrentFileContextProvider.ts b/core/context/providers/CurrentFileContextProvider.ts index c5e3b8304..e624f539a 100644 --- a/core/context/providers/CurrentFileContextProvider.ts +++ b/core/context/providers/CurrentFileContextProvider.ts @@ -4,7 +4,7 @@ import { ContextProviderDescription, ContextProviderExtras, } from "../../"; -import { findUriInDirs, getUriPathBasename } from "../../util/uri"; +import { getUriDescription } from "../../util/uri"; class CurrentFileContextProvider extends BaseContextProvider { static description: ContextProviderDescription = { @@ -23,11 +23,11 @@ class CurrentFileContextProvider extends BaseContextProvider { if (!currentFile) { return []; } - const { relativePathOrBasename } = findUriInDirs( + + const { relativePathOrBasename, last2Parts, baseName } = getUriDescription( currentFile.path, await extras.ide.getWorkspaceDirs(), ); - const baseName = getUriPathBasename(currentFile.path); let prefix = "This is the currently open file:"; let name = baseName; @@ -41,7 +41,7 @@ class CurrentFileContextProvider extends BaseContextProvider { return [ { - description: relativePathOrBasename, + description: last2Parts, content: `${prefix}\n\n\`\`\`${relativePathOrBasename}\n${currentFile.contents}\n\`\`\``, name, uri: { diff --git a/core/context/providers/FileContextProvider.ts b/core/context/providers/FileContextProvider.ts index 4bcbdfb81..4953f5bdc 100644 --- a/core/context/providers/FileContextProvider.ts +++ b/core/context/providers/FileContextProvider.ts @@ -10,7 +10,7 @@ import { walkDirs } from "../../indexing/walkDir"; import { getUriPathBasename, getShortestUniqueRelativeUriPaths, - findUriInDirs, + getUriDescription, } from "../../util/uri"; const MAX_SUBMENU_ITEMS = 10_000; @@ -29,16 +29,17 @@ class FileContextProvider extends BaseContextProvider { ): Promise { // Assume the query is a filepath const fileUri = query.trim(); - const basename = getUriPathBasename(fileUri); - const { relativePathOrBasename } = findUriInDirs( + const content = await extras.ide.readFile(fileUri); + + const { relativePathOrBasename, last2Parts, baseName } = getUriDescription( fileUri, await extras.ide.getWorkspaceDirs(), ); - const content = await extras.ide.readFile(fileUri); + return [ { - name: basename, - description: relativePathOrBasename, + name: baseName, + description: last2Parts, content: `\`\`\`${relativePathOrBasename}\n${content}\n\`\`\``, uri: { type: "file", diff --git a/core/context/providers/OpenFilesContextProvider.ts b/core/context/providers/OpenFilesContextProvider.ts index 318ebb648..8267bf1c9 100644 --- a/core/context/providers/OpenFilesContextProvider.ts +++ b/core/context/providers/OpenFilesContextProvider.ts @@ -3,7 +3,7 @@ import { ContextProviderDescription, ContextProviderExtras, } from "../../index.js"; -import { findUriInDirs, getUriPathBasename } from "../../util/uri.js"; +import { getUriDescription } from "../../util/uri.js"; import { BaseContextProvider } from "../index.js"; class OpenFilesContextProvider extends BaseContextProvider { @@ -24,14 +24,17 @@ class OpenFilesContextProvider extends BaseContextProvider { ? await ide.getPinnedFiles() : await ide.getOpenFiles(); const workspaceDirs = await extras.ide.getWorkspaceDirs(); + return await Promise.all( openFiles.map(async (filepath: string) => { + const content = await ide.readFile(filepath); + const { relativePathOrBasename, last2Parts, baseName } = + getUriDescription(filepath, workspaceDirs); + return { - description: filepath, - content: `\`\`\`${ - findUriInDirs(filepath, workspaceDirs).relativePathOrBasename - }\n${await ide.readFile(filepath)}\n\`\`\``, - name: getUriPathBasename(filepath), + description: last2Parts, + content: `\`\`\`${relativePathOrBasename}\n${content}\n\`\`\``, + name: baseName, uri: { type: "file", value: filepath, diff --git a/core/context/providers/ProblemsContextProvider.ts b/core/context/providers/ProblemsContextProvider.ts index b1a0372a5..d8df5687f 100644 --- a/core/context/providers/ProblemsContextProvider.ts +++ b/core/context/providers/ProblemsContextProvider.ts @@ -3,7 +3,7 @@ import { ContextProviderDescription, ContextProviderExtras, } from "../../index.js"; -import { getUriPathBasename } from "../../util/uri.js"; +import { getUriDescription } from "../../util/uri.js"; import { BaseContextProvider } from "../index.js"; class ProblemsContextProvider extends BaseContextProvider { @@ -20,10 +20,14 @@ class ProblemsContextProvider extends BaseContextProvider { ): Promise { const ide = extras.ide; const problems = await ide.getProblems(); + const workspaceDirs = await ide.getWorkspaceDirs(); const items = await Promise.all( problems.map(async (problem) => { - const fileName = getUriPathBasename(problem.filepath); + const { relativePathOrBasename, baseName } = getUriDescription( + problem.filepath, + workspaceDirs, + ); const content = await ide.readFile(problem.filepath); const lines = content.split("\n"); const rangeContent = lines @@ -35,8 +39,8 @@ class ProblemsContextProvider extends BaseContextProvider { return { description: "Problems in current file", - content: `\`\`\`${fileName}\n${rangeContent}\n\`\`\`\n${problem.message}\n\n`, - name: `Warning in ${fileName}`, + content: `\`\`\`${relativePathOrBasename}\n${rangeContent}\n\`\`\`\n${problem.message}\n\n`, + name: `Warning in ${baseName}`, }; }), ); diff --git a/core/context/retrieval/retrieval.ts b/core/context/retrieval/retrieval.ts index 14dba3341..d2e73e060 100644 --- a/core/context/retrieval/retrieval.ts +++ b/core/context/retrieval/retrieval.ts @@ -1,6 +1,6 @@ import { BranchAndDir, ContextItem, ContextProviderExtras } from "../../"; import TransformersJsEmbeddingsProvider from "../../llm/llms/TransformersJsEmbeddingsProvider"; -import { getUriPathBasename } from "../../util/uri"; +import { getUriDescription } from "../../util/uri"; import { INSTRUCTIONS_BASE_ITEM } from "../providers/utils"; import { RetrievalPipelineOptions } from "./pipelines/BaseRetrievalPipeline"; @@ -111,18 +111,17 @@ export async function retrieveContextItemsFromEmbeddings( ...results .sort((a, b) => a.filepath.localeCompare(b.filepath)) .map((r) => { - const basename = getUriPathBasename(r.filepath); - const name = `${basename} (${r.startLine}-${r.endLine})`; - const description = `${r.filepath}`; + const { relativePathOrBasename, last2Parts, baseName } = + getUriDescription(r.filepath, workspaceDirs); - if (basename === "package.json") { + if (baseName === "package.json") { console.warn("Retrieval pipeline: package.json detected"); } return { - name, - description, - content: `\`\`\`${name}\n${r.content}\n\`\`\``, + name: `${baseName} (${r.startLine}-${r.endLine})`, + description: last2Parts, + content: `\`\`\`${relativePathOrBasename}\n${r.content}\n\`\`\``, uri: { type: "file" as const, value: r.filepath, diff --git a/core/indexing/CodeSnippetsIndex.ts b/core/indexing/CodeSnippetsIndex.ts index f207f096b..c0d386d07 100644 --- a/core/indexing/CodeSnippetsIndex.ts +++ b/core/indexing/CodeSnippetsIndex.ts @@ -28,7 +28,12 @@ import type { IndexTag, IndexingProgressUpdate, } from "../"; -import { getLastNPathParts, getUriPathBasename } from "../util/uri"; +import { + findUriInDirs, + getLastNPathParts, + getLastNUriRelativePathParts, + getUriPathBasename, +} from "../util/uri"; type SnippetChunk = ChunkWithoutID & { title: string; signature: string }; @@ -347,14 +352,19 @@ export class CodeSnippetsCodebaseIndex implements CodebaseIndex { } } - static async getForId(id: number): Promise { + static async getForId( + id: number, + workspaceDirs: string[], + ): Promise { const db = await SqliteDb.get(); const row = await db.get("SELECT * FROM code_snippets WHERE id = ?", [id]); + const last2Parts = getLastNUriRelativePathParts(workspaceDirs, row.path, 2); + const { relativePathOrBasename } = findUriInDirs(row.path, workspaceDirs); return { name: row.title, - description: getLastNPathParts(row.path, 2), - content: `\`\`\`${getUriPathBasename(row.path)}\n${row.content}\n\`\`\``, + description: last2Parts, + content: `\`\`\`${relativePathOrBasename}\n${row.content}\n\`\`\``, uri: { type: "file", value: row.path, diff --git a/core/tools/implementations/readCurrentlyOpenFile.ts b/core/tools/implementations/readCurrentlyOpenFile.ts index d0db3b60c..a55aee2bd 100644 --- a/core/tools/implementations/readCurrentlyOpenFile.ts +++ b/core/tools/implementations/readCurrentlyOpenFile.ts @@ -1,4 +1,4 @@ -import { getUriPathBasename } from "../../util/uri"; +import { getUriDescription } from "../../util/uri"; import { ToolImpl } from "."; @@ -9,13 +9,16 @@ export const readCurrentlyOpenFileImpl: ToolImpl = async (args, extras) => { return []; } - const basename = getUriPathBasename(result.path); + const { relativePathOrBasename, last2Parts, baseName } = getUriDescription( + result.path, + await extras.ide.getWorkspaceDirs(), + ); return [ { - name: "Current file", - description: basename, - content: `\`\`\`${basename}\n${result.contents}\n\`\`\``, + name: `Current file: ${baseName}`, + description: last2Parts, + content: `\`\`\`${relativePathOrBasename}\n${result.contents}\n\`\`\``, uri: { type: "file", value: result.path, diff --git a/core/util/uri.ts b/core/util/uri.ts index a1bcd7745..13d7956ac 100644 --- a/core/util/uri.ts +++ b/core/util/uri.ts @@ -177,3 +177,19 @@ export function getLastNPathParts(filepath: string, n: number): string { } return filepath.split(/[\\/]/).slice(-n).join("/"); } + +export function getUriDescription(uri: string, dirUriCandidates: string[]) { + const { relativePathOrBasename, foundInDir } = findUriInDirs( + uri, + dirUriCandidates, + ); + const baseName = getUriPathBasename(uri); + const last2Parts = getLastNUriRelativePathParts(dirUriCandidates, uri, 2); + return { + uri, + relativePathOrBasename, + foundInDir, + last2Parts, + baseName, + }; +} From fce2b561d5cc341df5185d23a0cd958c16275059 Mon Sep 17 00:00:00 2001 From: ferenci84 Date: Fri, 31 Jan 2025 16:33:51 +0100 Subject: [PATCH 018/262] update autocomplete templates and snippets handling --- .../templating/AutocompleteTemplate.ts | 53 +++++++++---------- core/autocomplete/templating/filtering.ts | 3 +- .../RecentlyVisitedRangesService.ts | 11 ++-- 3 files changed, 33 insertions(+), 34 deletions(-) diff --git a/core/autocomplete/templating/AutocompleteTemplate.ts b/core/autocomplete/templating/AutocompleteTemplate.ts index 8f7bbd66d..92dbf76fa 100644 --- a/core/autocomplete/templating/AutocompleteTemplate.ts +++ b/core/autocomplete/templating/AutocompleteTemplate.ts @@ -21,16 +21,16 @@ export interface AutocompleteTemplate { workspaceUris: string[], ) => [string, string]; template: - | string - | (( - prefix: string, - suffix: string, - filepath: string, - reponame: string, - language: string, - snippets: AutocompleteSnippet[], - workspaceUris: string[], - ) => string); + | string + | (( + prefix: string, + suffix: string, + filepath: string, + reponame: string, + language: string, + snippets: AutocompleteSnippet[], + workspaceUris: string[], + ) => string); completionOptions?: Partial; } @@ -87,14 +87,16 @@ const codestralMultifileFimTemplate: AutocompleteTemplate = { ): [string, string] => { if (snippets.length === 0) { if (suffix.trim().length === 0 && prefix.trim().length === 0) { - return [ - `+++++ ${getLastNUriRelativePathParts(workspaceUris, filepath, 2)}\n${prefix}`, - suffix, - ]; + return [`${getLastNUriRelativePathParts(workspaceUris, filepath, 2)}\n\n[PREFIX]\n${prefix}`, suffix]; } return [prefix, suffix]; } + //snippets = snippets.filter((snippet) => "filepath" in snippet); + + // reverse the snippets so that the most recent snippet is last + snippets = [...snippets].reverse(); + const relativePaths = getShortestUniqueRelativeUriPaths( [ ...snippets.map((snippet) => @@ -111,19 +113,17 @@ const codestralMultifileFimTemplate: AutocompleteTemplate = { return snippet.content; } - return `+++++ ${relativePaths[i].uri} \n${snippet.content}`; + return `// ${relativePaths[i].uri} \n${snippet.content}`; }) .join("\n\n"); return [ - `${otherFiles}\n\n+++++ ${ - relativePaths[relativePaths.length - 1].uri - }\n${prefix}`, - suffix, + `${otherFiles}[PREFIX]${prefix}`, + `${suffix}`, ]; }, template: (prefix: string, suffix: string): string => { - return `[SUFFIX]${suffix}[PREFIX]${prefix}`; + return "NOT USED!"; //`[SUFFIX]${suffix}[PREFIX]${prefix}`; }, completionOptions: { stop: ["[PREFIX]", "[SUFFIX]"], @@ -160,10 +160,10 @@ const starcoder2FimTemplate: AutocompleteTemplate = { snippets.length === 0 ? "" : `${snippets - .map((snippet) => { - return snippet.content; - }) - .join("")}`; + .map((snippet) => { + return snippet.content; + }) + .join("")}`; const prompt = `${otherFiles}${prefix}${suffix}`; return prompt; @@ -218,9 +218,8 @@ const codegeexFimTemplate: AutocompleteTemplate = { [...snippets.map((snippet) => snippet.filepath), filepath], workspaceUris, ); - const baseTemplate = `###PATH:${ - relativePaths[relativePaths.length - 1] - }\n###LANGUAGE:${language}\n###MODE:BLOCK\n<|code_suffix|>${suffix}<|code_prefix|>${prefix}<|code_middle|>`; + const baseTemplate = `###PATH:${relativePaths[relativePaths.length - 1] + }\n###LANGUAGE:${language}\n###MODE:BLOCK\n<|code_suffix|>${suffix}<|code_prefix|>${prefix}<|code_middle|>`; if (snippets.length === 0) { return `<|user|>\n${baseTemplate}<|assistant|>\n`; } diff --git a/core/autocomplete/templating/filtering.ts b/core/autocomplete/templating/filtering.ts index c741dedc8..7dc16c9d0 100644 --- a/core/autocomplete/templating/filtering.ts +++ b/core/autocomplete/templating/filtering.ts @@ -43,9 +43,10 @@ export const getSnippets = ( payload: SnippetPayload, ): AutocompleteSnippet[] => { const snippets = [ - ...payload.diffSnippets, ...payload.clipboardSnippets, ...payload.recentlyVisitedRangesSnippets, + ...payload.recentlyEditedRangeSnippets, + //...payload.diffSnippets, ...shuffleArray( filterSnippetsAlreadyInCaretWindow( [...payload.rootPathSnippets, ...payload.importDefinitionSnippets], diff --git a/extensions/vscode/src/autocomplete/RecentlyVisitedRangesService.ts b/extensions/vscode/src/autocomplete/RecentlyVisitedRangesService.ts index 2dba327ef..6f850d0ce 100644 --- a/extensions/vscode/src/autocomplete/RecentlyVisitedRangesService.ts +++ b/extensions/vscode/src/autocomplete/RecentlyVisitedRangesService.ts @@ -16,10 +16,10 @@ export class RecentlyVisitedRangesService { Array >; // Default value, we override in initWithPostHog - private numSurroundingLines = 5; + private numSurroundingLines = 20; private maxRecentFiles = 3; private maxSnippetsPerFile = 3; - private isEnabled = false; + private isEnabled = true; constructor(private readonly ide: IDE) { this.cache = new LRUCache< @@ -38,12 +38,11 @@ export class RecentlyVisitedRangesService { PosthogFeatureFlag.RecentlyVisitedRangesNumSurroundingLines, ); - if (!recentlyVisitedRangesNumSurroundingLines) { - return; + if (recentlyVisitedRangesNumSurroundingLines) { + this.isEnabled = true; + this.numSurroundingLines = recentlyVisitedRangesNumSurroundingLines; } - this.isEnabled = true; - this.numSurroundingLines = recentlyVisitedRangesNumSurroundingLines; vscode.window.onDidChangeTextEditorSelection( this.cacheCurrentSelectionContext, ); From d92a7e08b924c63b876904194a8702c30c7dbee0 Mon Sep 17 00:00:00 2001 From: ferenci84 Date: Sat, 1 Feb 2025 12:19:42 +0100 Subject: [PATCH 019/262] Snippet handling with experimental hidden autocomplete options, Qwen coder template with ollama --- .../templating/AutocompleteTemplate.ts | 56 ++++++++-- core/autocomplete/templating/filtering.ts | 100 +++++++++++++++--- core/index.d.ts | 49 +++++---- core/llm/llms/Ollama.ts | 10 +- core/util/parameters.ts | 4 + 5 files changed, 174 insertions(+), 45 deletions(-) diff --git a/core/autocomplete/templating/AutocompleteTemplate.ts b/core/autocomplete/templating/AutocompleteTemplate.ts index 92dbf76fa..afb2c61d1 100644 --- a/core/autocomplete/templating/AutocompleteTemplate.ts +++ b/core/autocomplete/templating/AutocompleteTemplate.ts @@ -52,8 +52,47 @@ const stableCodeFimTemplate: AutocompleteTemplate = { // https://github.com/QwenLM/Qwen2.5-Coder?tab=readme-ov-file#3-file-level-code-completion-fill-in-the-middle const qwenCoderFimTemplate: AutocompleteTemplate = { - template: - "<|fim_prefix|>{{{prefix}}}<|fim_suffix|>{{{suffix}}}<|fim_middle|>", + compilePrefixSuffix: ( + prefix: string, + suffix: string, + filepath: string, + reponame: string, + snippets: AutocompleteSnippet[], + workspaceUris: string[] + ): [string, string] => { + // Helper function to get file name from snippet + function getFileName(snippet: { uri: string; uniquePath: string }) { + return snippet.uri.startsWith("file://") ? snippet.uniquePath : snippet.uri; + } + + // Start building the prompt with repo name + let prompt = `<|repo_name|>${reponame}`; + + const relativePaths = getShortestUniqueRelativeUriPaths( + [ + ...snippets.map((snippet) => + "filepath" in snippet ? snippet.filepath : "file:///Untitled.txt" + ), + filepath, + ], + workspaceUris + ); + + // Add each snippet with its file path + snippets.forEach((snippet, i) => { + const content = snippet.type === AutocompleteSnippetType.Diff + ? snippet.content + : snippet.content; + prompt += `\n<|file_sep|>${getFileName(relativePaths[i])}\n${content}`; + }); + + // Add the current file's prefix and suffix + prompt += `<|fim_prefix|>${prefix}<|fim_suffix|>${suffix}<|fim_middle|>`; + + // Empty suffix will make the prefix be used as a single prompt + return [prompt, ""]; + }, + template: "<|fim_prefix|>{{{prefix}}}<|fim_suffix|>{{{suffix}}}<|fim_middle|>", completionOptions: { stop: [ "<|endoftext|>", @@ -85,9 +124,14 @@ const codestralMultifileFimTemplate: AutocompleteTemplate = { snippets, workspaceUris, ): [string, string] => { + + function getFileName(snippet: { uri: string, uniquePath: string }) { + return snippet.uri.startsWith("file://") ? snippet.uniquePath : snippet.uri + } + if (snippets.length === 0) { if (suffix.trim().length === 0 && prefix.trim().length === 0) { - return [`${getLastNUriRelativePathParts(workspaceUris, filepath, 2)}\n\n[PREFIX]\n${prefix}`, suffix]; + return [`+++++ ${getLastNUriRelativePathParts(workspaceUris, filepath, 2)}\n\n[PREFIX]\n${prefix}`, suffix]; } return [prefix, suffix]; } @@ -113,12 +157,12 @@ const codestralMultifileFimTemplate: AutocompleteTemplate = { return snippet.content; } - return `// ${relativePaths[i].uri} \n${snippet.content}`; + return `+++++ ${getFileName(relativePaths[i])} \n${snippet.content}`; }) .join("\n\n"); return [ - `${otherFiles}[PREFIX]${prefix}`, + `${otherFiles}\n\n+++++ ${getFileName(relativePaths[relativePaths.length - 1])}\n[PREFIX]${prefix}`, `${suffix}`, ]; }, @@ -126,7 +170,7 @@ const codestralMultifileFimTemplate: AutocompleteTemplate = { return "NOT USED!"; //`[SUFFIX]${suffix}[PREFIX]${prefix}`; }, completionOptions: { - stop: ["[PREFIX]", "[SUFFIX]"], + stop: ["[PREFIX]", "[SUFFIX]", "\n+++++ "], }, }; diff --git a/core/autocomplete/templating/filtering.ts b/core/autocomplete/templating/filtering.ts index 7dc16c9d0..12c3ac6ce 100644 --- a/core/autocomplete/templating/filtering.ts +++ b/core/autocomplete/templating/filtering.ts @@ -42,25 +42,95 @@ export const getSnippets = ( helper: HelperVars, payload: SnippetPayload, ): AutocompleteSnippet[] => { - const snippets = [ - ...payload.clipboardSnippets, - ...payload.recentlyVisitedRangesSnippets, - ...payload.recentlyEditedRangeSnippets, - //...payload.diffSnippets, - ...shuffleArray( - filterSnippetsAlreadyInCaretWindow( - [...payload.rootPathSnippets, ...payload.importDefinitionSnippets], - helper.prunedCaretWindow, - ), - ), - ]; + + const snippets = { + "clipboard": payload.clipboardSnippets, + "recentlyVisitedRanges": payload.recentlyVisitedRangesSnippets, + "recentlyEditedRanges": payload.recentlyEditedRangeSnippets, + "diff": payload.diffSnippets, + "base": shuffleArray(filterSnippetsAlreadyInCaretWindow( + [...payload.rootPathSnippets, ...payload.importDefinitionSnippets], + helper.prunedCaretWindow, + )), + } + + // Define snippets with their priorities + const snippetConfigs: { + key: keyof typeof snippets; + enabledOrPriority: boolean | number; + defaultPriority: number; + snippets: AutocompleteSnippet[]; + }[] = [ + { + key: "clipboard", + enabledOrPriority: helper.options.experimental_includeClipboard, + defaultPriority: 1, + snippets: payload.clipboardSnippets, + }, + { + key: "recentlyVisitedRanges", + enabledOrPriority: helper.options.experimental_includeRecentlyVisitedRanges, + defaultPriority: 2, + snippets: payload.recentlyVisitedRangesSnippets, + /* TODO: recentlyVisitedRanges also contain contents from other windows like terminal or output + if they are visible. We should handle them separately so that we can control their priority + and whether they should be included or not. */ + }, + { + key: "recentlyEditedRanges", + enabledOrPriority: helper.options.experimental_includeRecentlyEditedRanges, + defaultPriority: 3, + snippets: payload.recentlyEditedRangeSnippets, + }, + { + key: "diff", + enabledOrPriority: helper.options.experimental_includeDiff, + defaultPriority: 4, + snippets: payload.diffSnippets, + // TODO: diff is commonly too large, thus anything lower in priority is not included. + }, + { + key: "base", + enabledOrPriority: true, + defaultPriority: 99, // make sure it's the last one to be processed, but still possible to override + snippets: shuffleArray(filterSnippetsAlreadyInCaretWindow( + [...payload.rootPathSnippets, ...payload.importDefinitionSnippets], + helper.prunedCaretWindow, + )), + // TODO: Add this too to experimental config, maybe move upper in the order, since it's almost + // always not inlucded due to diff being commonly large + }, + ]; + + // Create a readable order of enabled snippets + const snippetOrder = snippetConfigs + .filter(({ enabledOrPriority }) => enabledOrPriority) + .map(({ key, enabledOrPriority, defaultPriority }) => ({ + key, + priority: typeof enabledOrPriority === 'number' ? enabledOrPriority : defaultPriority, + })) + .sort((a, b) => a.priority - b.priority); + + // Log the snippet order for debugging - uncomment if needed + /* console.log( + 'Snippet processing order:', + snippetOrder + .map(({ key, priority }) => `${key} (priority: ${priority})`).join("\n") + ); */ + + // Convert configs to prioritized snippets + const prioritizedSnippets = snippetOrder + .flatMap(({ key, priority }) => + snippets[key].map(snippet => ({ snippet, priority })) + ) + .sort((a, b) => a.priority - b.priority) + .map(({ snippet }) => snippet); const finalSnippets = []; - let remainingTokenCount = getRemainingTokenCount(helper); - while (remainingTokenCount > 0 && snippets.length > 0) { - const snippet = snippets.shift(); + while (remainingTokenCount > 0 && prioritizedSnippets.length > 0) { + const snippet = prioritizedSnippets.shift(); if (!snippet || !isValidSnippet(snippet)) { continue; } diff --git a/core/index.d.ts b/core/index.d.ts index f65c10622..040233c62 100644 --- a/core/index.d.ts +++ b/core/index.d.ts @@ -43,13 +43,13 @@ export interface IndexingProgressUpdate { desc: string; shouldClearIndexes?: boolean; status: - | "loading" - | "indexing" - | "done" - | "failed" - | "paused" - | "disabled" - | "cancelled"; + | "loading" + | "indexing" + | "done" + | "failed" + | "paused" + | "disabled" + | "cancelled"; debugInfo?: string; } @@ -666,10 +666,10 @@ export interface IDE { getCurrentFile(): Promise< | undefined | { - isUntitled: boolean; - path: string; - contents: string; - } + isUntitled: boolean; + path: string; + contents: string; + } >; getPinnedFiles(): Promise; @@ -848,11 +848,11 @@ export interface CustomCommand { export interface Prediction { type: "content"; content: - | string - | { - type: "text"; - text: string; - }[]; + | string + | { + type: "text"; + text: string; + }[]; } export interface ToolExtras { @@ -971,6 +971,11 @@ export interface TabAutocompleteOptions { disableInFiles?: string[]; useImports?: boolean; showWhateverWeHaveAtXMs?: number; + // true = enabled, false = disabled, number = enabled with priority + experimental_includeClipboard: boolean | number; + experimental_includeRecentlyVisitedRanges: boolean | number; + experimental_includeRecentlyEditedRanges: boolean | number; + experimental_includeDiff: boolean | number; } export interface StdioOptions { @@ -1171,9 +1176,9 @@ export interface Config { embeddingsProvider?: EmbeddingsProviderDescription | ILLM; /** The model that Continue will use for tab autocompletions. */ tabAutocompleteModel?: - | CustomLLM - | ModelDescription - | (CustomLLM | ModelDescription)[]; + | CustomLLM + | ModelDescription + | (CustomLLM | ModelDescription)[]; /** Options for tab autocomplete */ tabAutocompleteOptions?: Partial; /** UI styles customization */ @@ -1264,9 +1269,9 @@ export type PackageDetailsSuccess = PackageDetails & { export type PackageDocsResult = { packageInfo: ParsedPackageInfo; } & ( - | { error: string; details?: never } - | { details: PackageDetailsSuccess; error?: never } -); + | { error: string; details?: never } + | { details: PackageDetailsSuccess; error?: never } + ); export interface TerminalOptions { reuseTerminal?: boolean; diff --git a/core/llm/llms/Ollama.ts b/core/llm/llms/Ollama.ts index b9734acb9..c770dbfe5 100644 --- a/core/llm/llms/Ollama.ts +++ b/core/llm/llms/Ollama.ts @@ -297,16 +297,22 @@ class Ollama extends BaseLLM { prompt: string, suffix?: string, ): OllamaRawOptions { - return { + const generateOptions: OllamaRawOptions = { model: this._getModel(), prompt, - suffix, raw: options.raw, options: this._getModelFileParams(options), keep_alive: options.keepAlive ?? 60 * 30, // 30 minutes stream: options.stream, // Not supported yet: context, images, system, template, format }; + + // Only add suffix if it's not empty. This allows composing the fim template in a way that uses prompt only + if (suffix && suffix !== "") { + generateOptions.suffix = suffix; + } + + return generateOptions; } private getEndpoint(endpoint: string): URL { diff --git a/core/util/parameters.ts b/core/util/parameters.ts index 648253712..05ab61e06 100644 --- a/core/util/parameters.ts +++ b/core/util/parameters.ts @@ -18,6 +18,10 @@ export const DEFAULT_AUTOCOMPLETE_OPTS: TabAutocompleteOptions = { useImports: true, transform: true, showWhateverWeHaveAtXMs: 300, + experimental_includeClipboard: true, + experimental_includeRecentlyVisitedRanges: true, + experimental_includeRecentlyEditedRanges: true, + experimental_includeDiff: true, }; export const COUNT_COMPLETION_REJECTED_AFTER = 10_000; From 3d08fc96bfd93ca315fde2c06d7ee1aa0e4a99f0 Mon Sep 17 00:00:00 2001 From: ferenci84 Date: Sat, 1 Feb 2025 19:46:27 +0100 Subject: [PATCH 020/262] add promptOnly option to handle single prompt with suffix for Ollama provider --- core/autocomplete/templating/AutocompleteTemplate.ts | 7 ++++++- core/llm/llms/Ollama.ts | 11 +++++++---- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/core/autocomplete/templating/AutocompleteTemplate.ts b/core/autocomplete/templating/AutocompleteTemplate.ts index afb2c61d1..bf24627c4 100644 --- a/core/autocomplete/templating/AutocompleteTemplate.ts +++ b/core/autocomplete/templating/AutocompleteTemplate.ts @@ -11,6 +11,10 @@ import { AutocompleteSnippetType, } from "../snippets/types.js"; +export interface AutocompleteCompletionOptions { + promptOnly?: boolean; +} + export interface AutocompleteTemplate { compilePrefixSuffix?: ( prefix: string, @@ -31,7 +35,7 @@ export interface AutocompleteTemplate { snippets: AutocompleteSnippet[], workspaceUris: string[], ) => string); - completionOptions?: Partial; + completionOptions?: Partial & Partial; } // https://huggingface.co/stabilityai/stable-code-3b @@ -105,6 +109,7 @@ const qwenCoderFimTemplate: AutocompleteTemplate = { "<|im_start|>", "<|im_end|>", ], + promptOnly: true // with ollama provider this makes sure a single prompt is sent (with suffix as part of the prompt, not as a separate parameter) }, }; diff --git a/core/llm/llms/Ollama.ts b/core/llm/llms/Ollama.ts index c770dbfe5..5c5df1488 100644 --- a/core/llm/llms/Ollama.ts +++ b/core/llm/llms/Ollama.ts @@ -4,6 +4,7 @@ import { ChatMessage, CompletionOptions, LLMOptions } from "../../index.js"; import { renderChatMessage } from "../../util/messageContent.js"; import { BaseLLM } from "../index.js"; import { streamResponse } from "../stream.js"; +import { AutocompleteCompletionOptions } from "../../autocomplete/templating/AutocompleteTemplate.js"; type OllamaChatMessage = { role: "tool" | "user" | "assistant" | "system"; @@ -293,7 +294,7 @@ class Ollama extends BaseLLM { } private _getGenerateOptions( - options: CompletionOptions, + options: CompletionOptions & Partial, prompt: string, suffix?: string, ): OllamaRawOptions { @@ -303,13 +304,15 @@ class Ollama extends BaseLLM { raw: options.raw, options: this._getModelFileParams(options), keep_alive: options.keepAlive ?? 60 * 30, // 30 minutes + suffix, stream: options.stream, // Not supported yet: context, images, system, template, format }; - // Only add suffix if it's not empty. This allows composing the fim template in a way that uses prompt only - if (suffix && suffix !== "") { - generateOptions.suffix = suffix; + if (options.promptOnly) { + console.log("fim: removing suffix"); + + delete generateOptions.suffix; } return generateOptions; From 839747b01fb581c37e7043983664bdaa56978f05 Mon Sep 17 00:00:00 2001 From: burias <22649451+burias@users.noreply.github.com> Date: Sat, 1 Feb 2025 18:46:43 -0500 Subject: [PATCH 021/262] Added note about unsupported models from OpenRouter --- docs/docs/troubleshooting.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/docs/troubleshooting.md b/docs/docs/troubleshooting.md index d4bbe69db..52dc785b2 100644 --- a/docs/docs/troubleshooting.md +++ b/docs/docs/troubleshooting.md @@ -118,6 +118,12 @@ By default the Continue window is on the left side of VS Code, but it can be dra If you have entered a valid API key and model, but are still getting a 404 error from OpenAI, this may be because you need to add credits to your billing account. You can do so from the [billing console](https://platform.openai.com/settings/organization/billing/overview). If you just want to check that this is in fact the cause of the error, you can try adding $1 to your account and checking whether the error persists. +### I'm getting a 404 error from OpenRouter + +If you have entered a valid API key and model, but are still getting a 404 error from OpenRouter, this may be because models that do not support function calling will return an error to Continue when a request is sent. +Example error: +`HTTP 404 Not Found from https://openrouter.ai/api/v1/chat/completions` + ### Indexing issues If you are having persistent errors with indexing, our recommendation is to rebuild your index from scratch. Note that for large codebases this may take some time. From 5fb848d1631338368765b054f5e06d6f5d2d4549 Mon Sep 17 00:00:00 2001 From: ferenci84 Date: Sun, 2 Feb 2025 06:17:50 +0100 Subject: [PATCH 022/262] Exclude Continue's own output from autocomplete snippets --- core/autocomplete/templating/filtering.ts | 7 ++++++- .../src/autocomplete/RecentlyVisitedRangesService.ts | 5 ++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/core/autocomplete/templating/filtering.ts b/core/autocomplete/templating/filtering.ts index 12c3ac6ce..02dbade36 100644 --- a/core/autocomplete/templating/filtering.ts +++ b/core/autocomplete/templating/filtering.ts @@ -119,13 +119,18 @@ export const getSnippets = ( ); */ // Convert configs to prioritized snippets - const prioritizedSnippets = snippetOrder + let prioritizedSnippets = snippetOrder .flatMap(({ key, priority }) => snippets[key].map(snippet => ({ snippet, priority })) ) .sort((a, b) => a.priority - b.priority) .map(({ snippet }) => snippet); + // Exclude Continue's own output as it makes it super-hard for users to test the autocomplete feature + // while looking at the prompts in the Continue's output + prioritizedSnippets = prioritizedSnippets.filter((snippet) => + !(snippet as AutocompleteCodeSnippet).filepath?.startsWith("output:extension-output-Continue.continue")); + const finalSnippets = []; let remainingTokenCount = getRemainingTokenCount(helper); diff --git a/extensions/vscode/src/autocomplete/RecentlyVisitedRangesService.ts b/extensions/vscode/src/autocomplete/RecentlyVisitedRangesService.ts index 6f850d0ce..a20e88ac3 100644 --- a/extensions/vscode/src/autocomplete/RecentlyVisitedRangesService.ts +++ b/extensions/vscode/src/autocomplete/RecentlyVisitedRangesService.ts @@ -113,7 +113,10 @@ export class RecentlyVisitedRangesService { } return allSnippets - .filter((s) => !currentFilepath || s.filepath !== currentFilepath) + .filter((s) => !currentFilepath || (s.filepath !== currentFilepath && + // Exclude Continue's own output as it makes it super-hard for users to test the autocomplete feature + // while looking at the prompts in the Continue's output + !s.filepath.startsWith("output:extension-output-Continue.continue"))) .sort((a, b) => b.timestamp - a.timestamp) .map(({ timestamp, ...snippet }) => snippet); } From 5aaab9c91e0377a0ba5e9111da380369be45682c Mon Sep 17 00:00:00 2001 From: ferenci84 Date: Sun, 2 Feb 2025 07:29:35 +0100 Subject: [PATCH 023/262] update template logic codestral and qwen --- .../templating/AutocompleteTemplate.ts | 26 +++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/core/autocomplete/templating/AutocompleteTemplate.ts b/core/autocomplete/templating/AutocompleteTemplate.ts index bf24627c4..ab336b89f 100644 --- a/core/autocomplete/templating/AutocompleteTemplate.ts +++ b/core/autocomplete/templating/AutocompleteTemplate.ts @@ -96,7 +96,7 @@ const qwenCoderFimTemplate: AutocompleteTemplate = { // Empty suffix will make the prefix be used as a single prompt return [prompt, ""]; }, - template: "<|fim_prefix|>{{{prefix}}}<|fim_suffix|>{{{suffix}}}<|fim_middle|>", + template: "{{{prefix}}}", // output of compilePrefixSuffix already compiles everything into a single prompt completionOptions: { stop: [ "<|endoftext|>", @@ -172,7 +172,29 @@ const codestralMultifileFimTemplate: AutocompleteTemplate = { ]; }, template: (prefix: string, suffix: string): string => { - return "NOT USED!"; //`[SUFFIX]${suffix}[PREFIX]${prefix}`; + /* + This template is ignored with codestral provider, however theoretically it's possible that a provider + not supporting fim endpoint would have a model name matched with this template, + or the codestral implementation will be changed, so we provide a usable implementation. + */ + + const prefixMarkerIndex = prefix.lastIndexOf('[PREFIX]'); + + if (prefixMarkerIndex === -1) { + return suffix ? `[SUFFIX]${suffix}[PREFIX]${prefix}` : `[PREFIX]${prefix}`; + } + + if (!suffix) { + // [PREFIX] already in the prompt, but suffix is an empty string + return prefix; + } + + // Insert [SUFFIX]${suffix} just before [PREFIX] + return ( + prefix.substring(0, prefixMarkerIndex) + + '[SUFFIX]' + suffix + + prefix.substring(prefixMarkerIndex) + ); }, completionOptions: { stop: ["[PREFIX]", "[SUFFIX]", "\n+++++ "], From 14d57880961b43a49fb2c865dc9262f5fdbfe81b Mon Sep 17 00:00:00 2001 From: Nate Date: Sun, 2 Feb 2025 12:49:31 -0800 Subject: [PATCH 024/262] allow merge even when pr_checks is skipped --- .github/workflows/pr_checks_skip.yaml | 28 +++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/pr_checks_skip.yaml diff --git a/.github/workflows/pr_checks_skip.yaml b/.github/workflows/pr_checks_skip.yaml new file mode 100644 index 000000000..53476d79c --- /dev/null +++ b/.github/workflows/pr_checks_skip.yaml @@ -0,0 +1,28 @@ +# When none of the paths are matched for the pr_checks.yaml workflow +# we still need the require-all-checks-to-pass job to pass +name: PR checks skip + +on: + pull_request: + branches: + - main + paths: + - docs/** + + push: + branches: + - main + paths: + - docs/** + +jobs: + require-all-checks-to-pass: + if: always() + runs-on: ubuntu-latest + steps: + - name: Decide whether the needed jobs succeeded or failed + uses: re-actors/alls-green@release/v1 + with: + allowed-failures: + allowed-skips: + jobs: [] From 787c4632c58faa195ef8acc032546076459e4b80 Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Sun, 2 Feb 2025 17:05:19 -0800 Subject: [PATCH 025/262] include message in messenger error handling --- binary/src/IpcMessenger.ts | 8 ++++---- binary/src/TcpMessenger.ts | 6 +++--- core/core.ts | 1 - core/protocol/messenger/index.ts | 6 +++--- extensions/vscode/src/webviewProtocol.ts | 11 +++++------ 5 files changed, 15 insertions(+), 17 deletions(-) diff --git a/binary/src/IpcMessenger.ts b/binary/src/IpcMessenger.ts index e90fbeb84..b92a8e6a2 100644 --- a/binary/src/IpcMessenger.ts +++ b/binary/src/IpcMessenger.ts @@ -75,7 +75,7 @@ class IPCMessengerBase< console.warn(`Error running handler for "${msg.messageType}": `, e); this._onErrorHandlers.forEach((handler) => { - handler(e); + handler(msg, e); }); } }); @@ -112,9 +112,9 @@ class IPCMessengerBase< lines.forEach((line) => this._handleLine(line)); } - private _onErrorHandlers: ((error: Error) => void)[] = []; + private _onErrorHandlers: ((message: Message, error: Error) => void)[] = []; - onError(handler: (error: Error) => void) { + onError(handler: (message: Message, error: Error) => void) { this._onErrorHandlers.push(handler); } @@ -217,7 +217,7 @@ export class CoreBinaryMessenger< extends IPCMessengerBase implements IMessenger { - private errorHandler: (error: Error) => void = () => {}; + private errorHandler: (message: Message, error: Error) => void = () => {}; private messageHandlers: Map< keyof ToProtocol, (message: Message) => Promise | any diff --git a/binary/src/TcpMessenger.ts b/binary/src/TcpMessenger.ts index ad4713473..907e32ed7 100644 --- a/binary/src/TcpMessenger.ts +++ b/binary/src/TcpMessenger.ts @@ -41,9 +41,9 @@ export class TcpMessenger< }); } - private _onErrorHandlers: ((error: Error) => void)[] = []; + private _onErrorHandlers: ((message: Message, error: Error) => void)[] = []; - onError(handler: (error: Error) => void) { + onError(handler: (message: Message, error: Error) => void) { this._onErrorHandlers.push(handler); } @@ -111,7 +111,7 @@ export class TcpMessenger< console.warn(`Error running handler for "${msg.messageType}": `, e); this._onErrorHandlers.forEach((handler) => { - handler(e); + handler(msg, e); }); } }); diff --git a/core/core.ts b/core/core.ts index 52e5a58cd..4bc7e8893 100644 --- a/core/core.ts +++ b/core/core.ts @@ -57,7 +57,6 @@ import type { FromCoreProtocol, ToCoreProtocol } from "./protocol"; import type { IMessenger, Message } from "./protocol/messenger"; export class Core { - // implements IMessenger configHandler: ConfigHandler; codebaseIndexerPromise: Promise; completionProvider: CompletionProvider; diff --git a/core/protocol/messenger/index.ts b/core/protocol/messenger/index.ts index 8b7245224..fb2528ae2 100644 --- a/core/protocol/messenger/index.ts +++ b/core/protocol/messenger/index.ts @@ -21,7 +21,7 @@ export interface IMessenger< ToProtocol extends IProtocol, FromProtocol extends IProtocol, > { - onError(handler: (error: Error) => void): void; + onError(handler: (message: Message, error: Error) => void): void; send( messageType: T, data: FromProtocol[T][0], @@ -64,9 +64,9 @@ export class InProcessMessenger< (message: Message) => any >(); - protected _onErrorHandlers: ((error: Error) => void)[] = []; + protected _onErrorHandlers: ((message: Message, error: Error) => void)[] = []; - onError(handler: (error: Error) => void) { + onError(handler: (message: Message, error: Error) => void) { this._onErrorHandlers.push(handler); } diff --git a/extensions/vscode/src/webviewProtocol.ts b/extensions/vscode/src/webviewProtocol.ts index 2129c0ce3..5c78da15f 100644 --- a/extensions/vscode/src/webviewProtocol.ts +++ b/extensions/vscode/src/webviewProtocol.ts @@ -10,7 +10,8 @@ import { IMessenger } from "../../../core/protocol/messenger"; import { showFreeTrialLoginMessage } from "./util/messages"; export class VsCodeWebviewProtocol - implements IMessenger { + implements IMessenger +{ listeners = new Map< keyof FromWebviewProtocol, ((message: Message) => any)[] @@ -114,8 +115,7 @@ export class VsCodeWebviewProtocol message = message.split("\n").filter((l: string) => l !== "")[1]; try { message = JSON.parse(message).message; - } catch { - } + } catch {} if (message.includes("exceeded")) { message += " To keep using Continue, you can set up a local model or use your own API key."; @@ -152,8 +152,7 @@ export class VsCodeWebviewProtocol this._webviewListener = this._webview.onDidReceiveMessage(handleMessage); } - constructor(private readonly reloadConfig: () => void) { - } + constructor(private readonly reloadConfig: () => void) {} invoke( messageType: T, @@ -163,7 +162,7 @@ export class VsCodeWebviewProtocol throw new Error("Method not implemented."); } - onError(handler: (error: Error) => void): void { + onError(handler: (message: Message, error: Error) => void): void { throw new Error("Method not implemented."); } From ffb180b99e1413068b671e10778bbc0188a7a0d9 Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Sun, 2 Feb 2025 17:11:18 -0800 Subject: [PATCH 026/262] implement fix --- core/core.ts | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/core/core.ts b/core/core.ts index 4bc7e8893..5eefc706e 100644 --- a/core/core.ts +++ b/core/core.ts @@ -208,13 +208,23 @@ export class Core { // Note, VsCode's in-process messenger doesn't do anything with this // It will only show for jetbrains - this.messenger.onError((err) => { - console.error(err); + this.messenger.onError((message, err) => { void Telemetry.capture("core_messenger_error", { message: err.message, stack: err.stack, }); - void this.ide.showToast("error", err.message); + + // Again, specifically for jetbrains to prevent duplicate error messages + // The same logic can currently be found in the webview protocol + // bc streaming errors are handled in the GUI + if ( + ["llm/streamChat", "chatDescriber/describe"].includes( + message.messageType, + ) + ) { + } else { + void this.ide.showToast("error", err.message); + } }); on("update/selectTabAutocompleteModel", async (msg) => { From 631dc07a01458d6552738d9cc86a96a9dba5aec4 Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Sun, 2 Feb 2025 17:34:02 -0800 Subject: [PATCH 027/262] cleanup --- core/core.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/core/core.ts b/core/core.ts index 5eefc706e..403b45c5b 100644 --- a/core/core.ts +++ b/core/core.ts @@ -222,6 +222,7 @@ export class Core { message.messageType, ) ) { + return; } else { void this.ide.showToast("error", err.message); } From ddd0be1e6175d127cf5b45427a30d2087724606f Mon Sep 17 00:00:00 2001 From: ferenci84 Date: Mon, 3 Feb 2025 09:37:28 +0100 Subject: [PATCH 028/262] Change mistral template to produce a single prompt --- .../templating/AutocompleteTemplate.ts | 29 +++---------------- core/llm/openaiTypeConverters.ts | 5 ++-- 2 files changed, 7 insertions(+), 27 deletions(-) diff --git a/core/autocomplete/templating/AutocompleteTemplate.ts b/core/autocomplete/templating/AutocompleteTemplate.ts index ab336b89f..3480a55c9 100644 --- a/core/autocomplete/templating/AutocompleteTemplate.ts +++ b/core/autocomplete/templating/AutocompleteTemplate.ts @@ -167,37 +167,16 @@ const codestralMultifileFimTemplate: AutocompleteTemplate = { .join("\n\n"); return [ - `${otherFiles}\n\n+++++ ${getFileName(relativePaths[relativePaths.length - 1])}\n[PREFIX]${prefix}`, - `${suffix}`, + `${otherFiles}\n\n+++++ ${getFileName(relativePaths[relativePaths.length - 1])}\n[SUFFIX]${suffix}\n[PREFIX]${prefix}`, + "", ]; }, template: (prefix: string, suffix: string): string => { - /* - This template is ignored with codestral provider, however theoretically it's possible that a provider - not supporting fim endpoint would have a model name matched with this template, - or the codestral implementation will be changed, so we provide a usable implementation. - */ - - const prefixMarkerIndex = prefix.lastIndexOf('[PREFIX]'); - - if (prefixMarkerIndex === -1) { - return suffix ? `[SUFFIX]${suffix}[PREFIX]${prefix}` : `[PREFIX]${prefix}`; - } - - if (!suffix) { - // [PREFIX] already in the prompt, but suffix is an empty string - return prefix; - } - - // Insert [SUFFIX]${suffix} just before [PREFIX] - return ( - prefix.substring(0, prefixMarkerIndex) + - '[SUFFIX]' + suffix + - prefix.substring(prefixMarkerIndex) - ); + return prefix }, completionOptions: { stop: ["[PREFIX]", "[SUFFIX]", "\n+++++ "], + promptOnly: true }, }; diff --git a/core/llm/openaiTypeConverters.ts b/core/llm/openaiTypeConverters.ts index 4ed8be1c4..af21bf470 100644 --- a/core/llm/openaiTypeConverters.ts +++ b/core/llm/openaiTypeConverters.ts @@ -16,6 +16,7 @@ import { MessageContent, TextMessagePart, } from ".."; +import { AutocompleteCompletionOptions } from "../autocomplete/templating/AutocompleteTemplate"; export function toChatMessage( message: ChatMessage, @@ -138,12 +139,12 @@ export function toCompleteBody( export function toFimBody( prefix: string, suffix: string, - options: CompletionOptions, + options: CompletionOptions & AutocompleteCompletionOptions, ): FimCreateParamsStreaming { return { model: options.model, prompt: prefix, - suffix, + suffix: options.promptOnly ? undefined : suffix, max_tokens: options.maxTokens, temperature: options.temperature, top_p: options.topP, From a0526c2ed6e8172ce37b3dc7302c1acc44aeaae9 Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Mon, 3 Feb 2025 07:01:49 -0800 Subject: [PATCH 029/262] remove deprecation notes --- docs/docs/autocomplete/how-to-customize.md | 4 +- docs/docs/autocomplete/model-setup.mdx | 6 +- docs/docs/chat/model-setup.mdx | 22 +++---- docs/docs/customize/context-providers.mdx | 62 +++++++++---------- .../customize/deep-dives/autocomplete.mdx | 6 +- docs/docs/customize/deep-dives/codebase.mdx | 2 +- docs/docs/customize/deep-dives/docs.md | 8 +-- .../model-providers/more/SambaNova.mdx | 2 +- .../model-providers/more/asksage.mdx | 2 +- .../model-providers/more/cerebras.mdx | 2 +- .../model-providers/more/cloudflare.mdx | 2 +- .../customize/model-providers/more/cohere.mdx | 6 +- .../model-providers/more/deepinfra.mdx | 2 +- .../model-providers/more/flowise.mdx | 2 +- .../model-providers/more/function-network.mdx | 6 +- .../customize/model-providers/more/groq.mdx | 2 +- .../more/huggingfaceinferenceapi.mdx | 2 +- .../model-providers/more/ipex_llm.mdx | 4 +- .../customize/model-providers/more/kindo.mdx | 4 +- .../model-providers/more/llamacpp.mdx | 2 +- .../model-providers/more/llamafile.mdx | 2 +- .../model-providers/more/lmstudio.mdx | 6 +- .../model-providers/more/moonshot.mdx | 4 +- .../customize/model-providers/more/msty.mdx | 4 +- .../customize/model-providers/more/nebius.mdx | 4 +- .../customize/model-providers/more/novita.mdx | 2 +- .../customize/model-providers/more/nvidia.mdx | 4 +- .../model-providers/more/openrouter.mdx | 4 +- .../model-providers/more/replicatellm.mdx | 2 +- .../model-providers/more/sagemaker.mdx | 2 +- .../model-providers/more/scaleway.mdx | 4 +- .../model-providers/more/siliconflow.mdx | 4 +- .../model-providers/more/textgenwebui.mdx | 2 +- .../model-providers/more/together.mdx | 2 +- .../customize/model-providers/more/vllm.mdx | 6 +- .../model-providers/more/watsonx.mdx | 10 +-- .../model-providers/top-level/anthropic.mdx | 4 +- .../model-providers/top-level/azure.mdx | 8 +-- .../model-providers/top-level/bedrock.mdx | 10 +-- .../model-providers/top-level/deepseek.mdx | 4 +- .../model-providers/top-level/gemini.mdx | 4 +- .../model-providers/top-level/mistral.mdx | 6 +- .../model-providers/top-level/ollama.mdx | 8 +-- .../model-providers/top-level/openai.mdx | 8 +-- .../model-providers/top-level/vertexai.mdx | 6 +- .../model-providers/top-level/xAI.mdx | 2 +- .../docs/customize/model-types/embeddings.mdx | 6 +- docs/docs/customize/model-types/reranking.mdx | 10 +-- docs/docs/customize/overview.md | 2 +- docs/docs/customize/slash-commands.mdx | 16 ++--- docs/docs/customize/tools.mdx | 2 +- .../build-your-own-context-provider.md | 4 +- .../tutorials/build-your-own-slash-command.md | 4 +- .../customize/tutorials/custom-code-rag.mdx | 2 +- .../tutorials/how-to-self-host-a-model.mdx | 6 +- docs/docs/customize/tutorials/llama3.1.mdx | 12 ++-- .../customize/tutorials/set-up-codestral.mdx | 2 +- docs/docs/edit/how-to-customize.mdx | 2 +- docs/docs/json-reference.md | 2 +- docs/docs/reference.md | 2 +- docs/docs/troubleshooting.mdx | 2 +- docs/docs/yaml-migration.md | 14 ++--- 62 files changed, 179 insertions(+), 179 deletions(-) diff --git a/docs/docs/autocomplete/how-to-customize.md b/docs/docs/autocomplete/how-to-customize.md index 8b0fd8d96..2df3ba73d 100644 --- a/docs/docs/autocomplete/how-to-customize.md +++ b/docs/docs/autocomplete/how-to-customize.md @@ -5,9 +5,9 @@ keywords: [customize] sidebar_position: 5 --- -Continue offers a handful of parameters in [`config.json` (Deprecated)](../json-reference.md) that can be tuned to find the perfect balance between suggestion quality and system performance for your specific needs and hardware capabilities: +Continue offers a handful of parameters in [`config.json`](../json-reference.md) that can be tuned to find the perfect balance between suggestion quality and system performance for your specific needs and hardware capabilities: -```json title="config.json (Deprecated)" +```json title="config.json"" "tabAutocompleteOptions": { "maxPromptTokens": 400, "prefixPercentage": 0.5, diff --git a/docs/docs/autocomplete/model-setup.mdx b/docs/docs/autocomplete/model-setup.mdx index 31330d5a9..cb2ad091d 100644 --- a/docs/docs/autocomplete/model-setup.mdx +++ b/docs/docs/autocomplete/model-setup.mdx @@ -29,7 +29,7 @@ For the best Autocomplete experience, we recommend using Codestral through the [ ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "tabAutocompleteModel": { "title": "Codestral", "provider": "mistral", @@ -60,7 +60,7 @@ For those preferring local execution or self-hosting,`Qwen2.5-Coder 1.5B` offers ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" { "tabAutocompleteModel": { "title": "Qwen2.5-Coder 1.5B", @@ -95,7 +95,7 @@ When using a remote instance you need to set the `"apiBase"` value in the config ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" { "tabAutocompleteModel": { "title": "Qwen2.5-Coder 1.5B", diff --git a/docs/docs/chat/model-setup.mdx b/docs/docs/chat/model-setup.mdx index 371696597..1f4cad4b5 100644 --- a/docs/docs/chat/model-setup.mdx +++ b/docs/docs/chat/model-setup.mdx @@ -31,7 +31,7 @@ Our current top recommendation is Claude Sonnet 3.5 from [Anthropic](../customiz ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "models": [ { "title": "Claude 3.5 Sonnet", @@ -90,7 +90,7 @@ If you prefer to use an open-weight model, then Llama 3.1 405B from Meta is your - ```json title="config.json (Deprecated)" + ```json title="config.json"" "models": [ { "title": "Llama 3.1 405B", @@ -102,7 +102,7 @@ If you prefer to use an open-weight model, then Llama 3.1 405B from Meta is your ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "models": [ { "title": "Llama 3.1 405B", @@ -114,7 +114,7 @@ If you prefer to use an open-weight model, then Llama 3.1 405B from Meta is your ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "models": [ { "title": "Llama 3.1 405B", @@ -125,7 +125,7 @@ If you prefer to use an open-weight model, then Llama 3.1 405B from Meta is your ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "models": [ { "title": "Llama 3.1 405B", @@ -154,7 +154,7 @@ If you prefer to use a model from [OpenAI](../customize/model-providers/top-leve ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "models": [ { "title": "GPT-4o", @@ -182,7 +182,7 @@ If you prefer to use a model from [Google](../customize/model-providers/top-leve ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "models": [ { "title": "Gemini 1.5 Pro", @@ -227,7 +227,7 @@ If your local machine can run an 8B parameter model, then we recommend running L - ```json title="config.json (Deprecated)" + ```json title="config.json"" "models": [ { "title": "Llama 3.1 8B", @@ -238,7 +238,7 @@ If your local machine can run an 8B parameter model, then we recommend running L ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "models": [ { "title": "Llama 3.1 8B", @@ -280,7 +280,7 @@ If your local machine can run a 16B parameter model, then we recommend running D - ```json title="config.json (Deprecated)" + ```json title="config.json"" "models": [ { "title": "DeepSeek Coder 2 16B", @@ -291,7 +291,7 @@ If your local machine can run a 16B parameter model, then we recommend running D ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "models": [ { "title": "DeepSeek Coder 2 16B", diff --git a/docs/docs/customize/context-providers.mdx b/docs/docs/customize/context-providers.mdx index 2833d45a3..1a5ba97a1 100644 --- a/docs/docs/customize/context-providers.mdx +++ b/docs/docs/customize/context-providers.mdx @@ -29,7 +29,7 @@ Reference any file in your current workspace. ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "contextProviders": [ { "name": "file" @@ -51,7 +51,7 @@ Reference specific functions or classes from throughout your project. ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "contextProviders": [ { "name": "code" @@ -73,7 +73,7 @@ Reference all of the changes you've made to your current branch. This is useful ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "contextProviders": [ { "name": "diff" @@ -95,7 +95,7 @@ Reference the currently open file. ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "contextProviders": [ { "name": "currentFile" @@ -117,7 +117,7 @@ Reference the last command you ran in your IDE's terminal and its output. ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "contextProviders": [ { "name": "terminal" @@ -139,7 +139,7 @@ Reference the contents from any documentation site. ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "contextProviders": [ { "name": "docs" @@ -167,7 +167,7 @@ Reference the contents of all of your open files. Set `onlyPinned` to `true` to ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "contextProviders": [ { "name": "open", @@ -196,7 +196,7 @@ Optionally, set `n` to limit the number of results returned (default 6). ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "contextProviders": [ { "name": "web", @@ -221,7 +221,7 @@ Reference the most relevant snippets from your codebase. ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "contextProviders": [ { "name": "codebase" @@ -245,7 +245,7 @@ Uses the same retrieval mechanism as `@Codebase`, but only on a single folder. ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "contextProviders": [ { "name": "folder" @@ -267,7 +267,7 @@ Reference the results of codebase search, just like the results you would get fr ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "contextProviders": [ { "name": "search" @@ -291,7 +291,7 @@ Reference the markdown converted contents of a given URL. ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "contextProviders": [ { "name": "url" @@ -313,7 +313,7 @@ Reference recent clipboard items ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "contextProviders": [ { "name": "clipboard" @@ -335,7 +335,7 @@ Reference the structure of your current workspace. ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "contextProviders": [ { "name": "tree" @@ -357,7 +357,7 @@ Get Problems from the current file. ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "contextProviders": [ { "name": "problems" @@ -381,7 +381,7 @@ Reference the contents of the local variables in the debugger. Currently only av ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "contextProviders": [ { "name": "debugger", @@ -412,7 +412,7 @@ Reference the outline of your codebase. By default, signatures are included alon ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "contextProviders": [ { "name": "repo-map", @@ -443,7 +443,7 @@ Reference the architecture and platform of your current operating system. ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "contextProviders": [ { "name": "os" @@ -470,7 +470,7 @@ The [Model Context Protocol](https://modelcontextprotocol.io/introduction) is a ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "experimental": { "modelContextProtocolServers": [ { @@ -509,7 +509,7 @@ Reference the conversation in a GitHub issue. ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "contextProviders": [ { "name": "issue", @@ -563,7 +563,7 @@ Reference table schemas from Sqlite, Postgres, MSSQL, and MySQL databases. ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "contextProviders": [ { "name": "database", @@ -633,7 +633,7 @@ Reference the schema of a table, and some sample rows ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "contextProviders": [ { "name": "postgres", @@ -672,7 +672,7 @@ Reference the results of a Google search. ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "contextProviders": [ { "name": "google", @@ -703,7 +703,7 @@ Reference an open MR for this branch on GitLab. ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "contextProviders": [ { "name": "gitlab-mr", @@ -733,7 +733,7 @@ You can specify the domain to communicate with by setting the `domain` parameter ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "contextProviders": [ { "name": "gitlab-mr", @@ -766,7 +766,7 @@ Reference the conversation in a Jira issue. ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "contextProviders": [ { "name": "jira", @@ -798,7 +798,7 @@ to set the API Version to 2 using the `apiVersion` property. ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "contextProviders": [ { "name": "jira", @@ -841,7 +841,7 @@ Reference the messages in a Discord channel. ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "contextProviders": [ { "name": "discord", @@ -881,7 +881,7 @@ The HttpContextProvider makes a POST request to the url passed in the configurat ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "contextProviders": [ { "name": "http", @@ -937,7 +937,7 @@ Reference specific git commit metadata and diff or all of the recent commits. ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "contextProviders": [ { "name": "commit", @@ -969,7 +969,7 @@ Query a [Greptile](https://www.greptile.com/) index of the current repo/branch. ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "contextProviders": [ { "name": "greptile", diff --git a/docs/docs/customize/deep-dives/autocomplete.mdx b/docs/docs/customize/deep-dives/autocomplete.mdx index d6d3755ef..bc44cafa2 100644 --- a/docs/docs/customize/deep-dives/autocomplete.mdx +++ b/docs/docs/customize/deep-dives/autocomplete.mdx @@ -23,7 +23,7 @@ If you want to have the best autocomplete experience, we recommend using Codestr ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" { "tabAutocompleteModel": { "title": "Codestral", @@ -63,7 +63,7 @@ All of the configuration options available for chat models are available to use ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "tabAutocompleteModel": { "title": "Tab Autocomplete Model", "provider": "ollama", @@ -114,7 +114,7 @@ This object allows you to customize the behavior of tab-autocomplete. The availa ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" { "tabAutocompleteModel": { "title": "Tab Autocomplete Model", diff --git a/docs/docs/customize/deep-dives/codebase.mdx b/docs/docs/customize/deep-dives/codebase.mdx index dfed9cda9..2c594078f 100644 --- a/docs/docs/customize/deep-dives/codebase.mdx +++ b/docs/docs/customize/deep-dives/codebase.mdx @@ -55,7 +55,7 @@ There are a few options that let you configure the behavior of the `@codebase` c ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "contextProviders": [ { "name": "codebase", diff --git a/docs/docs/customize/deep-dives/docs.md b/docs/docs/customize/deep-dives/docs.md index 79d2735b3..a0b4d11fa 100644 --- a/docs/docs/customize/deep-dives/docs.md +++ b/docs/docs/customize/deep-dives/docs.md @@ -12,7 +12,7 @@ The [`@Docs` context provider](customize/context-providers.mdx#docs) allows you To enable the `@Docs` context provider, you need to add it to the list of context providers in your `config.json` file. -```json title="config.json (Deprecated)" +```json title="config.json"" { "contextProviders": [ { @@ -53,7 +53,7 @@ To add multiple documentation sites, we recommend adding them in bulk to your `c The [configuration schema for docs](https://github.com/continuedev/continue/blob/v0.9.212-vscode/extensions/vscode/config_schema.json#L1943-L1973) is as follows: -```json title="config.json (Deprecated)" +```json title="config.json"" "docs": [ { "title": "Continue", @@ -73,7 +73,7 @@ The [configuration schema for docs](https://github.com/continuedev/continue/blob As with [@Codebase context provider configuration](../deep-dives/codebase.mdx#configuration), you can adjust the behavior of the docs context provider with the `nRetrieve`, `nFinal`, and `useReranking` -```json title="config.json (Deprecated)" +```json title="config.json"" { "contextProviders": [ { @@ -94,7 +94,7 @@ By default, we use a lighter weight tool to crawl documentation sites that canno If you want to crawl a site that is dynamically generated, or you get an error while attempting to crawl a site, you can enable the experimental `useChromiumForDocsCrawling` feature in your `config.json`. This will download and install Chromium to `~/.continue/.utils`. -```json title="config.json (Deprecated)" +```json title="config.json"" "experimental": { "useChromiumForDocsCrawling": true } diff --git a/docs/docs/customize/model-providers/more/SambaNova.mdx b/docs/docs/customize/model-providers/more/SambaNova.mdx index 31147e252..49b5304e5 100644 --- a/docs/docs/customize/model-providers/more/SambaNova.mdx +++ b/docs/docs/customize/model-providers/more/SambaNova.mdx @@ -16,7 +16,7 @@ The SambaNova Cloud is a cloud platform for running large AI models with the wor ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "models": [ { "title": "SambaNova Llama 3.1 405B", diff --git a/docs/docs/customize/model-providers/more/asksage.mdx b/docs/docs/customize/model-providers/more/asksage.mdx index eb8608e88..8bf11f7a0 100644 --- a/docs/docs/customize/model-providers/more/asksage.mdx +++ b/docs/docs/customize/model-providers/more/asksage.mdx @@ -23,7 +23,7 @@ To use the Ask Sage models, you can use the following ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "models": [ { "apiKey": "YOUR_API_KEY", diff --git a/docs/docs/customize/model-providers/more/cerebras.mdx b/docs/docs/customize/model-providers/more/cerebras.mdx index 9375c974f..b1bddc168 100644 --- a/docs/docs/customize/model-providers/more/cerebras.mdx +++ b/docs/docs/customize/model-providers/more/cerebras.mdx @@ -20,7 +20,7 @@ Cerebras Inference uses specialized silicon to provides fast inference. ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "models": [ { "title": "Cerebras Llama 3.1 70B", diff --git a/docs/docs/customize/model-providers/more/cloudflare.mdx b/docs/docs/customize/model-providers/more/cloudflare.mdx index 5388e2a6a..3fe97f18c 100644 --- a/docs/docs/customize/model-providers/more/cloudflare.mdx +++ b/docs/docs/customize/model-providers/more/cloudflare.mdx @@ -39,7 +39,7 @@ Cloudflare Workers AI can be used for both chat and tab autocompletion in Contin ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "models": [ { "title": "Llama 3 8B", diff --git a/docs/docs/customize/model-providers/more/cohere.mdx b/docs/docs/customize/model-providers/more/cohere.mdx index 966964f53..d8c161302 100644 --- a/docs/docs/customize/model-providers/more/cohere.mdx +++ b/docs/docs/customize/model-providers/more/cohere.mdx @@ -20,7 +20,7 @@ We recommend configuring **Command-R Plus** as your chat model. ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "models": [ { "title": "Cohere", @@ -56,7 +56,7 @@ We recommend configuring **embed-english-v3.0** as your embeddings model. ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "embeddingsProvider": { "provider": "cohere", "model": "embed-english-v3.0", @@ -83,7 +83,7 @@ We recommend configuring **rerank-english-v3.0** as your reranking model. ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "reranker": { "name": "cohere", "params": { diff --git a/docs/docs/customize/model-providers/more/deepinfra.mdx b/docs/docs/customize/model-providers/more/deepinfra.mdx index 51e3943e7..db025bb8a 100644 --- a/docs/docs/customize/model-providers/more/deepinfra.mdx +++ b/docs/docs/customize/model-providers/more/deepinfra.mdx @@ -16,7 +16,7 @@ import TabItem from "@theme/TabItem"; ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "models": [ { "provider": "deepinfra", diff --git a/docs/docs/customize/model-providers/more/flowise.mdx b/docs/docs/customize/model-providers/more/flowise.mdx index d6abf9ee5..3c6867e54 100644 --- a/docs/docs/customize/model-providers/more/flowise.mdx +++ b/docs/docs/customize/model-providers/more/flowise.mdx @@ -16,7 +16,7 @@ import TabItem from "@theme/TabItem"; ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "models": [ { "provider": "flowise", diff --git a/docs/docs/customize/model-providers/more/function-network.mdx b/docs/docs/customize/model-providers/more/function-network.mdx index 751fdccb6..a24f845fc 100644 --- a/docs/docs/customize/model-providers/more/function-network.mdx +++ b/docs/docs/customize/model-providers/more/function-network.mdx @@ -33,7 +33,7 @@ Function Network supports a number of models for chat. We recommend using LLama ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "models": [ { "title": "Llama 3.1 70b", @@ -65,7 +65,7 @@ Function Network supports a number of models for autocomplete. We recommend usin ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "tabAutocompleteModel": { "title": "Deepseek Coder 6.7b", "provider": "function-network", @@ -93,7 +93,7 @@ Function Network supports a number of models for embeddings. We recommend using ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "embeddingsProvider": { "provider": "function-network", "model": "baai/bge-base-en-v1.5", diff --git a/docs/docs/customize/model-providers/more/groq.mdx b/docs/docs/customize/model-providers/more/groq.mdx index 4282b1293..f05aac8af 100644 --- a/docs/docs/customize/model-providers/more/groq.mdx +++ b/docs/docs/customize/model-providers/more/groq.mdx @@ -21,7 +21,7 @@ Groq provides the fastest available inference for open-source language models, i ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "models": [ { "title": "Llama 3.1 405b", diff --git a/docs/docs/customize/model-providers/more/huggingfaceinferenceapi.mdx b/docs/docs/customize/model-providers/more/huggingfaceinferenceapi.mdx index 08b60c1cc..0ebcff983 100644 --- a/docs/docs/customize/model-providers/more/huggingfaceinferenceapi.mdx +++ b/docs/docs/customize/model-providers/more/huggingfaceinferenceapi.mdx @@ -17,7 +17,7 @@ Hugging Face Inference Endpoints are an easy way to setup instances of open-sour ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "models": [ { "title": "Hugging Face Inference API", diff --git a/docs/docs/customize/model-providers/more/ipex_llm.mdx b/docs/docs/customize/model-providers/more/ipex_llm.mdx index 2413aa6ce..248e155cb 100644 --- a/docs/docs/customize/model-providers/more/ipex_llm.mdx +++ b/docs/docs/customize/model-providers/more/ipex_llm.mdx @@ -19,7 +19,7 @@ IPEX-LLM supports accelerated Ollama backend to be hosted on Intel GPU. Refer to ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "models": [ { "title": "IPEX-LLM", @@ -44,7 +44,7 @@ If you would like to reach the Ollama service from another machine, make sure yo ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "models": [ { "title": "IPEX-LLM", diff --git a/docs/docs/customize/model-providers/more/kindo.mdx b/docs/docs/customize/model-providers/more/kindo.mdx index cb0c87922..64892d636 100644 --- a/docs/docs/customize/model-providers/more/kindo.mdx +++ b/docs/docs/customize/model-providers/more/kindo.mdx @@ -18,7 +18,7 @@ Kindo offers centralized control over your organization's AI operations, ensurin ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "models": [ { "title": "Claude 3.5 Sonnet", @@ -46,7 +46,7 @@ Kindo offers centralized control over your organization's AI operations, ensurin ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "tabAutocompleteModel": [ { "title": "WhiteRabbitNeo", diff --git a/docs/docs/customize/model-providers/more/llamacpp.mdx b/docs/docs/customize/model-providers/more/llamacpp.mdx index b8d43a830..72600c368 100644 --- a/docs/docs/customize/model-providers/more/llamacpp.mdx +++ b/docs/docs/customize/model-providers/more/llamacpp.mdx @@ -22,7 +22,7 @@ After it's up and running, change `~/.continue/config.json` to look like this: ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "models": [ { "title": "Llama CPP", diff --git a/docs/docs/customize/model-providers/more/llamafile.mdx b/docs/docs/customize/model-providers/more/llamafile.mdx index 4563bf630..6c4bb0e75 100644 --- a/docs/docs/customize/model-providers/more/llamafile.mdx +++ b/docs/docs/customize/model-providers/more/llamafile.mdx @@ -15,7 +15,7 @@ A [llamafile](https://github.com/Mozilla-Ocho/llamafile#readme) is a self-contai ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "models": [ { "title": "Llamafile", diff --git a/docs/docs/customize/model-providers/more/lmstudio.mdx b/docs/docs/customize/model-providers/more/lmstudio.mdx index b3d5d31b2..bb093f749 100644 --- a/docs/docs/customize/model-providers/more/lmstudio.mdx +++ b/docs/docs/customize/model-providers/more/lmstudio.mdx @@ -15,7 +15,7 @@ import TabItem from "@theme/TabItem"; ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "models": [ { "title": "LM Studio", @@ -43,7 +43,7 @@ LMStudio supports embeddings endpoints, and comes with the `nomic-ai/nomic-embed ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "embeddingsProvider": { "provider": "lmstudio", "model": "nomic-ai/nomic-embed-text-v1.5-GGUF" @@ -68,7 +68,7 @@ To configure a remote instance of LM Studio, add the `"apiBase"` property to you ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "embeddingsProvider": { "provider": "lmstudio", "model": "nomic-ai/nomic-embed-text-v1.5-GGUF" diff --git a/docs/docs/customize/model-providers/more/moonshot.mdx b/docs/docs/customize/model-providers/more/moonshot.mdx index e9e9d4f1a..7eeea1df0 100644 --- a/docs/docs/customize/model-providers/more/moonshot.mdx +++ b/docs/docs/customize/model-providers/more/moonshot.mdx @@ -23,7 +23,7 @@ To use Moonshot AI models, you need to: ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "models": [ { "title": "Moonshot", @@ -71,7 +71,7 @@ Here's a complete configuration example: ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "models": [ { "title": "Moonshot-8K", diff --git a/docs/docs/customize/model-providers/more/msty.mdx b/docs/docs/customize/model-providers/more/msty.mdx index b741a314d..b10cd7168 100644 --- a/docs/docs/customize/model-providers/more/msty.mdx +++ b/docs/docs/customize/model-providers/more/msty.mdx @@ -15,7 +15,7 @@ import TabItem from "@theme/TabItem"; ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "models": [ { "title": "Msty", @@ -55,7 +55,7 @@ If you need to send custom headers for authentication, you may use the `requestO ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "models": [ { "title": "Msty", diff --git a/docs/docs/customize/model-providers/more/nebius.mdx b/docs/docs/customize/model-providers/more/nebius.mdx index 5c010d38c..038cc182c 100644 --- a/docs/docs/customize/model-providers/more/nebius.mdx +++ b/docs/docs/customize/model-providers/more/nebius.mdx @@ -22,7 +22,7 @@ Available models can be found on the [Nebius AI Studio models page](https://stud ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "models": [ { "title": "Llama 3.1 405b", @@ -52,7 +52,7 @@ Available models can be found on the [Nebius AI Studio embeddings page](https:// ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "embeddingsProvider": { "provider": "nebius", "model": "BAAI/bge-en-icl", diff --git a/docs/docs/customize/model-providers/more/novita.mdx b/docs/docs/customize/model-providers/more/novita.mdx index 1fb2b2644..47b176fdb 100644 --- a/docs/docs/customize/model-providers/more/novita.mdx +++ b/docs/docs/customize/model-providers/more/novita.mdx @@ -16,7 +16,7 @@ import TabItem from "@theme/TabItem"; ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "models": [ { "title": "Llama 3.1 8B", diff --git a/docs/docs/customize/model-providers/more/nvidia.mdx b/docs/docs/customize/model-providers/more/nvidia.mdx index b60c99a4e..6ec3b5640 100644 --- a/docs/docs/customize/model-providers/more/nvidia.mdx +++ b/docs/docs/customize/model-providers/more/nvidia.mdx @@ -24,7 +24,7 @@ We recommend configuring **Nemotron-4-340B-Instruct** as your chat model. ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "models": [ { "title": "Nemotron-4-340B-Instruct", @@ -60,7 +60,7 @@ We recommend configuring **NVIDIA Retrieval QA Mistral 7B** as your embeddings m ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "embeddingsProvider": { "provider": "nvidia", "model": "nvidia/nv-embedqa-mistral-7b-v2", diff --git a/docs/docs/customize/model-providers/more/openrouter.mdx b/docs/docs/customize/model-providers/more/openrouter.mdx index c112cda36..29155ed5a 100644 --- a/docs/docs/customize/model-providers/more/openrouter.mdx +++ b/docs/docs/customize/model-providers/more/openrouter.mdx @@ -19,7 +19,7 @@ Change `~/.continue/config.json` to look like the following. ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "models": [ { "title": "OpenRouter LLaMA 70 8B", @@ -50,7 +50,7 @@ For example, to prevent extra long prompts from being compressed, you can explic ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "models": [ { "title": "Example Model", diff --git a/docs/docs/customize/model-providers/more/replicatellm.mdx b/docs/docs/customize/model-providers/more/replicatellm.mdx index f226b082e..9a549c120 100644 --- a/docs/docs/customize/model-providers/more/replicatellm.mdx +++ b/docs/docs/customize/model-providers/more/replicatellm.mdx @@ -16,7 +16,7 @@ Replicate is a great option for newly released language models or models that yo ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "models": [ { "title": "Replicate CodeLLama", diff --git a/docs/docs/customize/model-providers/more/sagemaker.mdx b/docs/docs/customize/model-providers/more/sagemaker.mdx index 9a25b3990..69c87919a 100644 --- a/docs/docs/customize/model-providers/more/sagemaker.mdx +++ b/docs/docs/customize/model-providers/more/sagemaker.mdx @@ -25,7 +25,7 @@ Here is an example Sagemaker configuration setup: ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "models": [ { "title": "deepseek-6.7b-instruct", diff --git a/docs/docs/customize/model-providers/more/scaleway.mdx b/docs/docs/customize/model-providers/more/scaleway.mdx index 46681134b..9a55e4a60 100644 --- a/docs/docs/customize/model-providers/more/scaleway.mdx +++ b/docs/docs/customize/model-providers/more/scaleway.mdx @@ -27,7 +27,7 @@ We recommend configuring **Qwen2.5-Coder-32B-Instruct** as your chat model. ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "models": [ { "title": "Qwen2.5-Coder-32B-Instruct", @@ -63,7 +63,7 @@ We recommend configuring **BGE-Multilingual-Gemma2** as your embeddings model. ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "embeddingsProvider": { "provider": "scaleway", "model": "bge-multilingual-gemma2", diff --git a/docs/docs/customize/model-providers/more/siliconflow.mdx b/docs/docs/customize/model-providers/more/siliconflow.mdx index 2dba25ec8..c6e54fec2 100644 --- a/docs/docs/customize/model-providers/more/siliconflow.mdx +++ b/docs/docs/customize/model-providers/more/siliconflow.mdx @@ -26,7 +26,7 @@ We recommend configuring **Qwen/Qwen2.5-Coder-32B-Instruct** as your chat model. ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "models": [ { "title": "Qwen", @@ -56,7 +56,7 @@ We recommend configuring **Qwen/Qwen2.5-Coder-7B-Instruct** as your autocomplete ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "models": [ { "title": "Qwen", diff --git a/docs/docs/customize/model-providers/more/textgenwebui.mdx b/docs/docs/customize/model-providers/more/textgenwebui.mdx index a61230bf2..804529ba8 100644 --- a/docs/docs/customize/model-providers/more/textgenwebui.mdx +++ b/docs/docs/customize/model-providers/more/textgenwebui.mdx @@ -16,7 +16,7 @@ TextGenWebUI is a comprehensive, open-source language model UI and local server. ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "models": [ { "title": "Text Generation WebUI", diff --git a/docs/docs/customize/model-providers/more/together.mdx b/docs/docs/customize/model-providers/more/together.mdx index 2e776da1c..67e026897 100644 --- a/docs/docs/customize/model-providers/more/together.mdx +++ b/docs/docs/customize/model-providers/more/together.mdx @@ -16,7 +16,7 @@ The Together API is a cloud platform for running large AI models. You can sign u ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "models": [ { "title": "Together Qwen2.5 Coder", diff --git a/docs/docs/customize/model-providers/more/vllm.mdx b/docs/docs/customize/model-providers/more/vllm.mdx index ec962347a..ecbc7e3db 100644 --- a/docs/docs/customize/model-providers/more/vllm.mdx +++ b/docs/docs/customize/model-providers/more/vllm.mdx @@ -24,7 +24,7 @@ We recommend configuring **Llama3.1 8B** as your chat model. ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "models": [ { "title": "Llama3.1 8B Instruct", @@ -54,7 +54,7 @@ We recommend configuring **Qwen2.5-Coder 1.5B** as your autocomplete model. ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "tabAutocompleteModel": { "title": "Qwen2.5-Coder 1.5B", "provider": "vllm", @@ -82,7 +82,7 @@ We recommend configuring **Nomic Embed Text** as your embeddings model. ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "embeddingsProvider": { "provider": "vllm", "model": "nomic-ai/nomic-embed-text-v1", diff --git a/docs/docs/customize/model-providers/more/watsonx.mdx b/docs/docs/customize/model-providers/more/watsonx.mdx index f468af6e1..3409479bd 100644 --- a/docs/docs/customize/model-providers/more/watsonx.mdx +++ b/docs/docs/customize/model-providers/more/watsonx.mdx @@ -57,7 +57,7 @@ Add the following configuration: ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "models": [ { "model": "model ID", @@ -91,7 +91,7 @@ If you are using a custom deployment endpoint, set `deploymentID` to the model's ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "models": [ { "model": "model ID", @@ -137,7 +137,7 @@ You can also configure generation parameters, such as temperature, topP, topK, f ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "models": [ { "model": "ibm/granite-20b-code-instruct", @@ -183,7 +183,7 @@ Granite models are recommended for tab auto complete. The configuration is simil ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "tabAutocompleteModel": { "model": "ibm/granite-8b-code-instruct", "title": "Granite Code 8b", @@ -218,7 +218,7 @@ To view the list of available embeddings models, visit [this page](https://datap ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "embeddingsProvider": { "provider": "watsonx", "model": "ibm/slate-30m-english-rtrvr-v2", diff --git a/docs/docs/customize/model-providers/top-level/anthropic.mdx b/docs/docs/customize/model-providers/top-level/anthropic.mdx index 6cfc9d06c..141cf7782 100644 --- a/docs/docs/customize/model-providers/top-level/anthropic.mdx +++ b/docs/docs/customize/model-providers/top-level/anthropic.mdx @@ -25,7 +25,7 @@ We recommend configuring **Claude 3.5 Sonnet** as your chat model. ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "models": [ { "title": "Claude 3.5 Sonnet", @@ -78,7 +78,7 @@ To enable caching of the system message and the turn-by-turn conversation, updat ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "models": [ { "cacheBehavior": { diff --git a/docs/docs/customize/model-providers/top-level/azure.mdx b/docs/docs/customize/model-providers/top-level/azure.mdx index 79e4c7522..b42479aeb 100644 --- a/docs/docs/customize/model-providers/top-level/azure.mdx +++ b/docs/docs/customize/model-providers/top-level/azure.mdx @@ -29,7 +29,7 @@ We recommend configuring **GPT-4o** as your chat model. ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "models": [{ "title": "GPT-4o", "provider": "azure", @@ -58,7 +58,7 @@ We recommend configuring **Codestral** as your autocomplete model. ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "tabAutocompleteModel": { "title": "Codestral", "provider": "mistral", @@ -86,7 +86,7 @@ We recommend configuring **text-embedding-3-large** as your embeddings model. ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "embeddingsProvider": { "provider": "openai", "model": "text-embedding-3-large", @@ -137,7 +137,7 @@ For example, a Target URI of `https://just-an-example.openai.azure.com/openai/de ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" { "title": "GPT-4o Azure", "model": "gpt-4o", diff --git a/docs/docs/customize/model-providers/top-level/bedrock.mdx b/docs/docs/customize/model-providers/top-level/bedrock.mdx index be716081e..355bf0a64 100644 --- a/docs/docs/customize/model-providers/top-level/bedrock.mdx +++ b/docs/docs/customize/model-providers/top-level/bedrock.mdx @@ -26,7 +26,7 @@ We recommend configuring **Claude 3.5 Sonnet** as your chat model. ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "models": [ { "title": "Claude 3.5 Sonnet", @@ -58,7 +58,7 @@ We recommend configuring **Claude 3.5 Sonnet** as your chat model. ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "models": [ { "title": "Claude 3.5 Sonnet", @@ -95,7 +95,7 @@ We recommend configuring [`amazon.titan-embed-text-v2:0`](https://docs.aws.amazo ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "embeddingsProvider": { "title": "Embeddings Model", "provider": "bedrock", @@ -123,7 +123,7 @@ We recommend configuring `cohere.rerank-v3-5:0` as your reranking model, you may ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "reranker": { "name": "bedrock", "params": { @@ -164,7 +164,7 @@ To setup Bedrock using custom imported models, add the following to your config ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "models": [ { "title": "AWS Bedrock deepseek-coder-6.7b-instruct", diff --git a/docs/docs/customize/model-providers/top-level/deepseek.mdx b/docs/docs/customize/model-providers/top-level/deepseek.mdx index 703959473..e62eb018f 100644 --- a/docs/docs/customize/model-providers/top-level/deepseek.mdx +++ b/docs/docs/customize/model-providers/top-level/deepseek.mdx @@ -25,7 +25,7 @@ We recommend configuring **DeepSeek Chat** as your chat model. ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "models": [ { "title": "DeepSeek Chat", @@ -54,7 +54,7 @@ We recommend configuring **DeepSeek Coder** as your autocomplete model. ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "tabAutocompleteModel": { "title": "DeepSeek Coder", "provider": "deepseek", diff --git a/docs/docs/customize/model-providers/top-level/gemini.mdx b/docs/docs/customize/model-providers/top-level/gemini.mdx index eaf4e981d..a93685ff6 100644 --- a/docs/docs/customize/model-providers/top-level/gemini.mdx +++ b/docs/docs/customize/model-providers/top-level/gemini.mdx @@ -25,7 +25,7 @@ We recommend configuring **Gemini 1.5 Pro** as your chat model. ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "models": [ { "title": "Gemini 1.5 Pro", @@ -61,7 +61,7 @@ We recommend configuring **text-embedding-004** as your embeddings model. ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "embeddingsProvider": { "provider": "gemini", "model": "models/text-embedding-004", diff --git a/docs/docs/customize/model-providers/top-level/mistral.mdx b/docs/docs/customize/model-providers/top-level/mistral.mdx index 4a86454eb..14b40db58 100644 --- a/docs/docs/customize/model-providers/top-level/mistral.mdx +++ b/docs/docs/customize/model-providers/top-level/mistral.mdx @@ -27,7 +27,7 @@ We recommend configuring **Mistral Large** as your chat model. ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "models": [ { "title": "Mistral Large", @@ -57,7 +57,7 @@ We recommend configuring **Codestral** as your autocomplete model. ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "tabAutocompleteModel": { "title": "Codestral", "provider": "mistral", @@ -86,7 +86,7 @@ We recommend configuring **Mistral Embed** as your embeddings model. ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "embeddingsProvider": { "provider": "mistral", "model": "mistral-embed", diff --git a/docs/docs/customize/model-providers/top-level/ollama.mdx b/docs/docs/customize/model-providers/top-level/ollama.mdx index b3da6a978..33454a3ca 100644 --- a/docs/docs/customize/model-providers/top-level/ollama.mdx +++ b/docs/docs/customize/model-providers/top-level/ollama.mdx @@ -22,7 +22,7 @@ We recommend configuring **Llama3.1 8B** as your chat model. ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "models": [ { "title": "Llama3.1 8B", @@ -50,7 +50,7 @@ We recommend configuring **Qwen2.5-Coder 1.5B** as your autocomplete model. ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "tabAutocompleteModel": { "title": "Qwen2.5-Coder 1.5B", "provider": "ollama", @@ -76,7 +76,7 @@ We recommend configuring **Nomic Embed Text** as your embeddings model. ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "embeddingsProvider": { "provider": "ollama", "model": "nomic-embed-text" @@ -106,7 +106,7 @@ To configure a remote instance of Ollama, add the `"apiBase"` property to your m ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "models": [ { "title": "Llama3.1 8B", diff --git a/docs/docs/customize/model-providers/top-level/openai.mdx b/docs/docs/customize/model-providers/top-level/openai.mdx index e057cbd1f..a6e72c1e4 100644 --- a/docs/docs/customize/model-providers/top-level/openai.mdx +++ b/docs/docs/customize/model-providers/top-level/openai.mdx @@ -25,7 +25,7 @@ We recommend configuring **GPT-4o** as your chat model. ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" { "models": [ { @@ -63,7 +63,7 @@ We recommend configuring **text-embedding-3-large** as your embeddings model. ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" { "embeddingsProvider": { "provider": "openai", @@ -113,7 +113,7 @@ If you are using an OpenAI compatible server / API, you can change the `apiBase` ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "models": [ { "title": "OpenAI-compatible server / API", @@ -141,7 +141,7 @@ To force usage of `chat/completions` instead of `completions` endpoint you can s ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" { "models": [ { diff --git a/docs/docs/customize/model-providers/top-level/vertexai.mdx b/docs/docs/customize/model-providers/top-level/vertexai.mdx index 07be57891..9b302190b 100644 --- a/docs/docs/customize/model-providers/top-level/vertexai.mdx +++ b/docs/docs/customize/model-providers/top-level/vertexai.mdx @@ -26,7 +26,7 @@ We recommend configuring **Claude 3.5 Sonnet** as your chat model. ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "models": [ { "title": "Claude 3.5 Sonnet", @@ -58,7 +58,7 @@ We recommend configuring **Codestral** or **code-gecko** as your autocomplete mo ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "tabAutocompleteModel": { "title": "Codestral (Vertex AI)", "provider": "vertexai", @@ -88,7 +88,7 @@ We recommend configuring **text-embedding-004** as your embeddings model. ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "embeddingsProvider": { "provider": "vertexai", "model": "text-embedding-004", diff --git a/docs/docs/customize/model-providers/top-level/xAI.mdx b/docs/docs/customize/model-providers/top-level/xAI.mdx index fea7b261d..1e943e9a1 100644 --- a/docs/docs/customize/model-providers/top-level/xAI.mdx +++ b/docs/docs/customize/model-providers/top-level/xAI.mdx @@ -25,7 +25,7 @@ We recommend configuring **grok-beta** as your chat model. ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "models": [ { "title": "Grok Beta", diff --git a/docs/docs/customize/model-types/embeddings.mdx b/docs/docs/customize/model-types/embeddings.mdx index edb6921f7..a584dad44 100644 --- a/docs/docs/customize/model-types/embeddings.mdx +++ b/docs/docs/customize/model-types/embeddings.mdx @@ -43,7 +43,7 @@ After obtaining an API key from [here](https://www.voyageai.com/), you can confi ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "embeddingsProvider": { "provider": "voyage", "model": "voyage-code-3", @@ -72,7 +72,7 @@ See [here](../model-providers/top-level/ollama.mdx#embeddings-model) for instruc ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "embeddingsProvider": { "provider": "transformers.js" } @@ -95,7 +95,7 @@ See [here](../model-providers/top-level/ollama.mdx#embeddings-model) for instruc ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "embeddingsProvider": { "provider": "huggingface-tei", "apiBase": "http://localhost:8080" diff --git a/docs/docs/customize/model-types/reranking.mdx b/docs/docs/customize/model-types/reranking.mdx index b824a2220..71ed1546a 100644 --- a/docs/docs/customize/model-types/reranking.mdx +++ b/docs/docs/customize/model-types/reranking.mdx @@ -33,7 +33,7 @@ Voyage AI offers the best reranking model for code with their `rerank-2` model. ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "reranker": { "name": "voyage", "params": { @@ -62,7 +62,7 @@ See Cohere's documentation for rerankers [here](https://docs.cohere.com/docs/rer ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "reranker": { "name": "cohere", "params": { @@ -90,7 +90,7 @@ If you only have access to a single LLM, then you can use it as a reranker. This ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "reranker": { "name": "llm", "params": { @@ -120,7 +120,7 @@ The `"modelTitle"` field must match one of the models in your "models" array in ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "reranker": { "name": "huggingface-tei", "params": { @@ -147,7 +147,7 @@ Continue offers a free trial of Voyage AI's reranking model. ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "reranker": { "name": "free-trial" } diff --git a/docs/docs/customize/overview.md b/docs/docs/customize/overview.md index 6104799b9..33f671448 100644 --- a/docs/docs/customize/overview.md +++ b/docs/docs/customize/overview.md @@ -16,7 +16,7 @@ Whatever you choose, you'll probably start by editing `config.yaml`. ## Editing config.json -Most custom configuration is done by editing `config.yaml` (or Deprecated `config.json`). This is a YAML file that allows you to customize Continue to your liking. It is found at: +Most custom configuration is done by editing `config.yaml` (or the older `config.json`). This is a YAML file that allows you to customize Continue to your liking. It is found at: - MacOS and Linux: `~/.continue/config.yaml` - Windows: `%USERPROFILE%\.continue\config.yaml` diff --git a/docs/docs/customize/slash-commands.mdx b/docs/docs/customize/slash-commands.mdx index 661501097..bf1f072ab 100644 --- a/docs/docs/customize/slash-commands.mdx +++ b/docs/docs/customize/slash-commands.mdx @@ -8,7 +8,7 @@ import Tabs from "@theme/Tabs"; import TabItem from "@theme/TabItem"; :::info -Slash commands can currently only be added using [`config.json`](../json-reference.md), which has been deprecated in favor of the [`YAML Config Format`](../reference.md). We recommend looking into [Prompt Files](../customize/deep-dives/prompt-files.md) to achieve similar functionality. +Slash commands can currently only be added using [`config.json`](../json-reference.md). The [`YAML Config Format`](../reference.md) is the new and preferred format. We recommend looking into [Prompt Files](../customize/deep-dives/prompt-files.md) to achieve similar functionality. ::: Slash commands are shortcuts that can be activated by typing '/' and selecting from the dropdown. For example, the built-in '/edit' slash command lets you stream edits directly into your editor. @@ -23,7 +23,7 @@ To use any of the built-in slash commands, open `config.json` and add it to the Generate a shareable markdown transcript of your current chat history. -```json title="config.json (Deprecated)" +```json title="config.json"" { "slashCommands": [ { @@ -41,7 +41,7 @@ Use the `outputDir` parameter to specify where you want to the markdown file to Generate a shell command from natural language and (only in VS Code) automatically paste it into the terminal. -```json title="config.json (Deprecated)" +```json title="config.json"" { "slashCommands": [ { @@ -56,7 +56,7 @@ Generate a shell command from natural language and (only in VS Code) automatical Shows the LLM your current git diff and asks it to generate a commit message. -```json title="config.json (Deprecated)" +```json title="config.json"" { "slashCommands": [ { @@ -71,7 +71,7 @@ Shows the LLM your current git diff and asks it to generate a commit message. Write a custom slash command at your own HTTP endpoint. Set 'url' in the params object for the endpoint you have setup. The endpoint should return a sequence of string updates, which will be streamed to the Continue sidebar. See our basic [FastAPI example](https://github.com/continuedev/continue/blob/74002369a5e435735b83278fb965e004ae38a97d/core/context/providers/context_provider_server.py#L34-L45) for reference. -```json title="config.json (Deprecated)" +```json title="config.json"" { "slashCommands": [ { @@ -87,7 +87,7 @@ Write a custom slash command at your own HTTP endpoint. Set 'url' in the params Describe the issue you'd like to generate, and Continue will turn into a well-formatted title and body, then give you a link to the draft so you can submit. Make sure to set the URL of the repository you want to generate issues for. -```json title="config.json (Deprecated)" +```json title="config.json"" { "slashCommands": [ { @@ -103,7 +103,7 @@ Describe the issue you'd like to generate, and Continue will turn into a well-fo The onboard slash command helps to familiarize yourself with a new project by analyzing the project structure, READMEs, and dependency files. It identifies key folders, explains their purpose, and highlights popular packages used. Additionally, it offers insights into the project's architecture. -```json title="config.json (Deprecated)" +```json title="config.json"" { "slashCommands": [ { @@ -131,7 +131,7 @@ The [Model Context Protocol](https://modelcontextprotocol.io/introduction) is a ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "experimental": { "modelContextProtocolServers": [ { diff --git a/docs/docs/customize/tools.mdx b/docs/docs/customize/tools.mdx index 1c2d9a97a..4c910a02d 100644 --- a/docs/docs/customize/tools.mdx +++ b/docs/docs/customize/tools.mdx @@ -39,7 +39,7 @@ Currently custom tools can be configured using the [Model Context Protocol](http ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "experimental": { "modelContextProtocolServers": [ { diff --git a/docs/docs/customize/tutorials/build-your-own-context-provider.md b/docs/docs/customize/tutorials/build-your-own-context-provider.md index 00140013e..0c5c8eaf0 100644 --- a/docs/docs/customize/tutorials/build-your-own-context-provider.md +++ b/docs/docs/customize/tutorials/build-your-own-context-provider.md @@ -3,7 +3,7 @@ title: Build your own context provider --- :::info -Custom context providers are added through `~/config.ts`, which has been deprecated in favor of the [`YAML Config Format`](../../reference.md). We recommend looking into [Prompt Files](../deep-dives/prompt-files.md) and [MCP Servers](../context-providers.mdx#modelcontextprotocol) to achieve similar functionality. +Custom context providers are added through `~/config.ts`. The [`YAML Config Format`](../../reference.md) is the new and preferred config format. We recommend looking into [Prompt Files](../deep-dives/prompt-files.md) and [MCP Servers](../context-providers.mdx#modelcontextprotocol) to achieve similar functionality. ::: ## Introductory Example @@ -188,7 +188,7 @@ Continue will use [esbuild](https://esbuild.github.io/) to bundle your `config.t If you'd like to write a context provider in a language other than TypeScript, you can use the "http" context provider to call a server that hosts your own code. Add the context provider to `config.json` like this: -```json title="config.json (Deprecated)" +```json title="config.json"" { "name": "http", "params": { diff --git a/docs/docs/customize/tutorials/build-your-own-slash-command.md b/docs/docs/customize/tutorials/build-your-own-slash-command.md index d3f9d3c11..85a08cb32 100644 --- a/docs/docs/customize/tutorials/build-your-own-slash-command.md +++ b/docs/docs/customize/tutorials/build-your-own-slash-command.md @@ -3,7 +3,7 @@ title: Build your own slash command --- :::info -Slash commands can currently only be added using [`config.json`](../../json-reference.md) or `config.ts`, which have been deprecated in favor of the [`YAML Config Format`](../../reference.md). We recommend looking into [Prompt Files](../deep-dives/prompt-files.md) to achieve similar functionality. +Slash commands can currently only be added using [`config.json`](../../json-reference.md) or `config.ts`. The [`YAML Config Format`](../../reference.md) is the new and preferred format. We recommend looking into [Prompt Files](../deep-dives/prompt-files.md) to achieve similar functionality. ::: There are two ways to add custom slash commands: @@ -21,7 +21,7 @@ You can add custom slash commands by adding to the `customCommands` property in Custom commands are great when you are frequently reusing a prompt. For example, if you've crafted a great prompt and frequently ask the LLM to check for mistakes in your code, you could add a command like this: -```json title="config.json (Deprecated)" +```json title="config.json"" customCommands=[{ "name": "check", "description": "Check for mistakes in my code", diff --git a/docs/docs/customize/tutorials/custom-code-rag.mdx b/docs/docs/customize/tutorials/custom-code-rag.mdx index 82f41b396..13ab25ae9 100644 --- a/docs/docs/customize/tutorials/custom-code-rag.mdx +++ b/docs/docs/customize/tutorials/custom-code-rag.mdx @@ -140,7 +140,7 @@ After you've set up your server, you can configure Continue to use it by adding ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "contextProviders": [ { "name": "http", diff --git a/docs/docs/customize/tutorials/how-to-self-host-a-model.mdx b/docs/docs/customize/tutorials/how-to-self-host-a-model.mdx index 3652cd43c..139b58347 100644 --- a/docs/docs/customize/tutorials/how-to-self-host-a-model.mdx +++ b/docs/docs/customize/tutorials/how-to-self-host-a-model.mdx @@ -34,7 +34,7 @@ Basic authentication can be done with any provider using the `apiKey` field: ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "models": [ { "title": "Ollama", @@ -64,7 +64,7 @@ If you need to send custom headers for authentication, you may use the `requestO ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "models": [ { "title": "Ollama", @@ -98,7 +98,7 @@ Similarly if your model requires a Certificate for authentication, you may use t ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "models": [ { "title": "Ollama", diff --git a/docs/docs/customize/tutorials/llama3.1.mdx b/docs/docs/customize/tutorials/llama3.1.mdx index ed6a7bf18..763b20b6d 100644 --- a/docs/docs/customize/tutorials/llama3.1.mdx +++ b/docs/docs/customize/tutorials/llama3.1.mdx @@ -31,7 +31,7 @@ Ollama is the fastest way to get up and running with local language models. We r ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "models": [ { "title": "Llama 3.1 8b", @@ -61,7 +61,7 @@ Groq provides the fastest available inference for open-source language models, i ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "models": [ { "title": "Llama 3.1 405b", @@ -93,7 +93,7 @@ Together AI provides fast and reliable inference of open-source models. You'll b ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "models": [ { "title": "Llama 3.1 405b", @@ -124,7 +124,7 @@ Replicate makes it easy to host and run open-source AI with an API. ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "models": [ { "title": "Llama 3.1 405b", @@ -156,7 +156,7 @@ SambaNova Cloud provides world record Llama3.1 70B/405B serving. ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "models": [ { "title": "SambaNova Llama 3.1 405B", @@ -188,7 +188,7 @@ Cerebras Inference uses specialized silicon to provides fast inference for the L ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "models": [ { "title": "Cerebras Llama 3.1 70B", diff --git a/docs/docs/customize/tutorials/set-up-codestral.mdx b/docs/docs/customize/tutorials/set-up-codestral.mdx index 026948f8a..7d4c7b66d 100644 --- a/docs/docs/customize/tutorials/set-up-codestral.mdx +++ b/docs/docs/customize/tutorials/set-up-codestral.mdx @@ -34,7 +34,7 @@ import TabItem from "@theme/TabItem"; ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "models": [ { "title": "Codestral", diff --git a/docs/docs/edit/how-to-customize.mdx b/docs/docs/edit/how-to-customize.mdx index d7ebf4e77..ac54f8c3b 100644 --- a/docs/docs/edit/how-to-customize.mdx +++ b/docs/docs/edit/how-to-customize.mdx @@ -25,7 +25,7 @@ You can configure a particular model to be used for Edit: Set the `experimental.modelRoles.inlineEdit` property in `config.json`. - ```json title="config.json (Deprecated)" + ```json title="config.json"" { "models": { "name": "Claude 3.5 Sonnet", diff --git a/docs/docs/json-reference.md b/docs/docs/json-reference.md index 59a15d572..f90d62c66 100644 --- a/docs/docs/json-reference.md +++ b/docs/docs/json-reference.md @@ -5,7 +5,7 @@ keywords: [config, config_schema.json, json] --- :::info -`config.json` has been deprecated in favor of the [`YAML Config Format`](./reference). See the [migration guide](./yaml-migration). +`config.json` is the original Continue configuration format. The newer and preferred format is [`YAML Config`](./reference). See the [migration guide](./yaml-migration). ::: Below are details for each property that can be set in `config.json`. The config schema code is found in [`extensions/vscode/config_schema.json`](https://github.com/continuedev/continue/blob/main/extensions/vscode/config_schema.json). diff --git a/docs/docs/reference.md b/docs/docs/reference.md index c2c34b09f..f35d70fc7 100644 --- a/docs/docs/reference.md +++ b/docs/docs/reference.md @@ -13,7 +13,7 @@ Continue can be configured using a YAML file `config.yaml` which for local confi Below are details for each property that can be set in `config.yaml`. :::info -Config YAML replaces `config.json`, which has been deprecated. View the **[Migration Guide](/yaml-migration)**. `config.yaml` currently only works in VS Code pre-release. +Config YAML replaces `config.json`. View the **[Migration Guide](/yaml-migration)**. `config.yaml` currently only works in VS Code pre-release. ::: **All properties at all levels are optional unless explicitly marked as required.** diff --git a/docs/docs/troubleshooting.mdx b/docs/docs/troubleshooting.mdx index 4b0e35941..11e17f22b 100644 --- a/docs/docs/troubleshooting.mdx +++ b/docs/docs/troubleshooting.mdx @@ -101,7 +101,7 @@ If you're seeing a `fetch failed` error and your network requires custom certifi ``` - ```json title="config.json (Deprecated)" + ```json title="config.json"" "models": [ { "title": "My Model", diff --git a/docs/docs/yaml-migration.md b/docs/docs/yaml-migration.md index 79a3906fa..fd3b81f92 100644 --- a/docs/docs/yaml-migration.md +++ b/docs/docs/yaml-migration.md @@ -45,7 +45,7 @@ Model-level `completionOptions` are replaced by `defaultCompletionOptions`, with **Before** -```json title="config.json (Deprecated)" +```json title="config.json"" { "models": [ { @@ -150,12 +150,12 @@ Note that the `repoMapFileSelection` experimental model role has been deprecated The JSON `contextProviders` field is replaced by the YAML `context` array. -- JSON `name` maps to `uses` +- JSON `name` maps to `provider` - JSON `params` map to `with` **Before** -```json title="config.json (Deprecated)" +```json title="config.json"" { "contextProviders": [ { @@ -196,7 +196,7 @@ The `systemMessage` property has been replaced with a `rules` property that take **Before** -```json title="config.json (Deprecated)" +```json title="config.json"" { "systemMessage": "Always give concise responses" } @@ -215,7 +215,7 @@ Rather than with `customCommands`, you can now use the `prompts` field to define **Before** -```json title="config.json (Deprecated)" +```json title="config.json"" { "customCommands": [ { @@ -250,7 +250,7 @@ Documentation is largely the same, but the `title` property has been replaced wi **Before** -```json title="config.json (Deprecated)" +```json title="config.json"" { "docs": [ { @@ -287,7 +287,7 @@ docs: **Before** -```json title="config.json (Deprecated)" +```json title="config.json"" { "experimental": { "modelContextProtocolServers": [ From b40803ad184a870834faf6125d76a4dc06a275af Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Mon, 3 Feb 2025 07:04:01 -0800 Subject: [PATCH 030/262] update context providers to block format --- docs/docs/customize/context-providers.mdx | 92 +++++++++---------- docs/docs/customize/deep-dives/codebase.mdx | 4 +- .../customize/tutorials/custom-code-rag.mdx | 4 +- docs/docs/reference.md | 28 +++--- docs/docs/yaml-migration.md | 8 +- 5 files changed, 68 insertions(+), 68 deletions(-) diff --git a/docs/docs/customize/context-providers.mdx b/docs/docs/customize/context-providers.mdx index 1a5ba97a1..f9e9bd29f 100644 --- a/docs/docs/customize/context-providers.mdx +++ b/docs/docs/customize/context-providers.mdx @@ -25,7 +25,7 @@ Reference any file in your current workspace. ```yaml title="Package or config.yaml" context: - - uses: file + - provider: file ``` @@ -47,7 +47,7 @@ Reference specific functions or classes from throughout your project. ```yaml title="Package or config.yaml" context: - - uses: code + - provider: code ``` @@ -69,7 +69,7 @@ Reference all of the changes you've made to your current branch. This is useful ```yaml title="Package or config.yaml" context: - - uses: diff + - provider: diff ``` @@ -91,7 +91,7 @@ Reference the currently open file. ```yaml title="Package or config.yaml" context: - - uses: currentFile + - provider: currentFile ``` @@ -113,7 +113,7 @@ Reference the last command you ran in your IDE's terminal and its output. ```yaml title="Package or config.yaml" context: - - uses: terminal + - provider: terminal ``` @@ -135,7 +135,7 @@ Reference the contents from any documentation site. ```yaml title="Package or config.yaml" context: - - uses: docs + - provider: docs ``` @@ -161,8 +161,8 @@ Reference the contents of all of your open files. Set `onlyPinned` to `true` to ```yaml title="Package or config.yaml" context: - - uses: open - with: + - provider: open + params: onlyPinned: true ``` @@ -190,8 +190,8 @@ Optionally, set `n` to limit the number of results returned (default 6). ```yaml title="Package or config.yaml" context: - - uses: web - with: + - provider: web + params: n: 5 ``` @@ -217,7 +217,7 @@ Reference the most relevant snippets from your codebase. ```yaml title="Package or config.yaml" context: - - uses: codebase + - provider: codebase ``` @@ -241,7 +241,7 @@ Uses the same retrieval mechanism as `@Codebase`, but only on a single folder. ```yaml title="Package or config.yaml" context: - - uses: folder + - provider: folder ``` @@ -263,7 +263,7 @@ Reference the results of codebase search, just like the results you would get fr ```yaml title="Package or config.yaml" context: - - uses: search + - provider: search ``` @@ -287,7 +287,7 @@ Reference the markdown converted contents of a given URL. ```yaml title="Package or config.yaml" context: - - uses: url + - provider: url ``` @@ -309,7 +309,7 @@ Reference recent clipboard items ```yaml title="Package or config.yaml" context: - - uses: clipboard + - provider: clipboard ``` @@ -331,7 +331,7 @@ Reference the structure of your current workspace. ```yaml title="Package or config.yaml" context: - - uses: tree + - provider: tree ``` @@ -353,7 +353,7 @@ Get Problems from the current file. ```yaml title="Package or config.yaml" context: - - uses: problems + - provider: problems ``` @@ -375,8 +375,8 @@ Reference the contents of the local variables in the debugger. Currently only av ```yaml title="Package or config.yaml" context: - - uses: debugger - with: + - provider: debugger + params: stackDepth: 3 ``` @@ -406,8 +406,8 @@ Reference the outline of your codebase. By default, signatures are included alon ```yaml title="Package or config.yaml" context: - - uses: repo-map - with: + - provider: repo-map + params: includeSignatures: false # default true ``` @@ -439,7 +439,7 @@ Reference the architecture and platform of your current operating system. ```yaml title="Package or config.yaml" context: - - uses: os + - provider: os ``` @@ -500,8 +500,8 @@ Reference the conversation in a GitHub issue. ```yaml title="Package or config.yaml" context: - - uses: issue - with: + - provider: issue + params: repos: - owner: continuedev repo: continue @@ -538,8 +538,8 @@ Reference table schemas from Sqlite, Postgres, MSSQL, and MySQL databases. ```yaml title="Package or config.yaml" context: - - uses: database - with: + - provider: database + params: connections: - name: examplePostgres connection_type: postgres @@ -621,8 +621,8 @@ Reference the schema of a table, and some sample rows ```yaml title="Package or config.yaml" context: - - uses: postgres - with: + - provider: postgres + params: host: localhost port: 5436 user: myuser @@ -666,8 +666,8 @@ Reference the results of a Google search. ```yaml title="Package or config.yaml" context: - - uses: google - with: + - provider: google + params: serperApiKey: "" ``` @@ -697,8 +697,8 @@ Reference an open MR for this branch on GitLab. ```yaml title="Package or config.yaml" context: - - uses: gitlab-mr - with: + - provider: gitlab-mr + params: token: "..." ``` @@ -726,8 +726,8 @@ You can specify the domain to communicate with by setting the `domain` parameter ```yaml title="Package or config.yaml" context: - - uses: gitlab-mr - with: + - provider: gitlab-mr + params: token: "..." domain: "gitlab.example.com" ``` @@ -759,8 +759,8 @@ Reference the conversation in a Jira issue. ```yaml title="Package or config.yaml" context: - - uses: jira - with: + - provider: jira + params: domain: company.atlassian.net token: ATATT... ``` @@ -792,8 +792,8 @@ to set the API Version to 2 using the `apiVersion` property. ```yaml title="Package or config.yaml" context: - - uses: jira - with: + - provider: jira + params: apiVersion: "2" ``` @@ -829,8 +829,8 @@ Reference the messages in a Discord channel. ```yaml title="Package or config.yaml" context: - - uses: discord - with: + - provider: discord + params: discordKey: "bot token" guildId: "1234567890" channels: @@ -875,8 +875,8 @@ The HttpContextProvider makes a POST request to the url passed in the configurat ```yaml title="Package or config.yaml" context: - - uses: http - with: + - provider: http + params: url: "https://api.example.com/v1/users" ``` @@ -930,8 +930,8 @@ Reference specific git commit metadata and diff or all of the recent commits. ```yaml title="Package or config.yaml" context: - - uses: commit - with: + - provider: commit + params: Depth: 50 LastXCommitsDepth: 10 ``` @@ -962,8 +962,8 @@ Query a [Greptile](https://www.greptile.com/) index of the current repo/branch. ```yaml title="Package or config.yaml" context: - - uses: greptile - with: + - provider: greptile + params: greptileToken: "..." githubToken: "..." ``` diff --git a/docs/docs/customize/deep-dives/codebase.mdx b/docs/docs/customize/deep-dives/codebase.mdx index 2c594078f..d85aebd0d 100644 --- a/docs/docs/customize/deep-dives/codebase.mdx +++ b/docs/docs/customize/deep-dives/codebase.mdx @@ -47,8 +47,8 @@ There are a few options that let you configure the behavior of the `@codebase` c ```yaml title="Package or config.yaml" context: - - uses: codebase - with: + - provider: codebase + params: nRetrieve: 25, nFinal: 5, useReranking: true diff --git a/docs/docs/customize/tutorials/custom-code-rag.mdx b/docs/docs/customize/tutorials/custom-code-rag.mdx index 13ab25ae9..b9dde20df 100644 --- a/docs/docs/customize/tutorials/custom-code-rag.mdx +++ b/docs/docs/customize/tutorials/custom-code-rag.mdx @@ -131,8 +131,8 @@ After you've set up your server, you can configure Continue to use it by adding ```yaml title="config.yaml" context: - - uses: http - with: + - provider: http + params: url: https://myserver.com/retrieve name: http description: Custom HTTP Context Provider diff --git a/docs/docs/reference.md b/docs/docs/reference.md index f35d70fc7..19c4b8c1e 100644 --- a/docs/docs/reference.md +++ b/docs/docs/reference.md @@ -127,15 +127,15 @@ More information about usage/params for each context provider can be found [here ```yaml title="config.yaml" context: - - uses: files - - uses: code - - uses: codebase - with: + - provider: files + - provider: code + - provider: codebase + params: nFinal: 10 - - uses: docs - - uses: diff - - uses: folder - - uses: terminal + - provider: docs + - provider: diff + - provider: folder + - provider: terminal ``` --- @@ -300,12 +300,12 @@ prompts: Please write a complete suite of unit tests for this function. You should use the Jest testing framework. The tests should cover all possible edge cases and should be as thorough as possible. You should also include a description of each test case. context: - - uses: diff - - uses: file - - uses: codebase - - uses: code - - uses: docs - with: + - provider: diff + - provider: file + - provider: codebase + - provider: code + - provider: docs + params: startUrl: https://docs.example.com/introduction rootUrl: https://docs.example.com maxDepth: 3 diff --git a/docs/docs/yaml-migration.md b/docs/docs/yaml-migration.md index fd3b81f92..cd795c304 100644 --- a/docs/docs/yaml-migration.md +++ b/docs/docs/yaml-migration.md @@ -180,14 +180,14 @@ The JSON `contextProviders` field is replaced by the YAML `context` array. ```yaml title="config.yaml" context: - - uses: docs + - provider: docs - - uses: codebase - with: + - provider: codebase + params: nRetrieve: 30 nFinal: 3 - - uses: diff + - provider: diff ``` ### System Message From 29cd7ad789a02f5d66d6c6cf86d675008d696f0c Mon Sep 17 00:00:00 2001 From: Sherman Boyd Date: Sat, 1 Feb 2025 13:39:22 -0700 Subject: [PATCH 031/262] Use meta keys and improve formatting on quickpick items --- extensions/vscode/src/commands.ts | 8 ++++++-- extensions/vscode/src/util/util.ts | 4 ++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/extensions/vscode/src/commands.ts b/extensions/vscode/src/commands.ts index da5e7db94..d896fbe12 100644 --- a/extensions/vscode/src/commands.ts +++ b/extensions/vscode/src/commands.ts @@ -31,6 +31,7 @@ import EditDecorationManager from "./quickEdit/EditDecorationManager"; import { QuickEdit, QuickEditShowParams } from "./quickEdit/QuickEditQuickPick"; import { Battery } from "./util/battery"; import { VsCodeIde } from "./VsCodeIde"; +import { getMetaKeyLabel } from "./util/util"; import type { VsCodeWebviewProtocol } from "./webviewProtocol"; @@ -902,15 +903,18 @@ const getCommandsMap: ( ? StatusBarStatus.Enabled : StatusBarStatus.Disabled; } + quickPick.items = [ { label: "$(question) Open help center", }, { - label: "$(comment) Open chat (Cmd+L)", + label: "$(comment) Open chat", + description: getMetaKeyLabel() + " + L", }, { - label: "$(screen-full) Open full screen chat (Cmd+K Cmd+M)", + label: "$(screen-full) Open full screen chat", + description: getMetaKeyLabel() + " + K, " + getMetaKeyLabel() + " + M", }, { label: quickPickStatusText(targetStatus), diff --git a/extensions/vscode/src/util/util.ts b/extensions/vscode/src/util/util.ts index 6691a66d2..916d7b3bc 100644 --- a/extensions/vscode/src/util/util.ts +++ b/extensions/vscode/src/util/util.ts @@ -99,9 +99,9 @@ export function getMetaKeyLabel() { return "⌘"; case "linux": case "windows": - return "^"; + return "Ctrl"; default: - return "^"; + return "Ctrl"; } } From 6e81720186d4215d6a650835f72ed1c6cc20e28f Mon Sep 17 00:00:00 2001 From: Patrick Erichsen Date: Mon, 3 Feb 2025 21:01:58 -0800 Subject: [PATCH 032/262] feat: cache org selection results --- core/config/ConfigHandler.ts | 31 ++++- core/control-plane/client.ts | 63 ++++++++- core/core.ts | 6 + core/protocol/coreWebview.ts | 1 + core/protocol/passThrough.ts | 1 + core/util/GlobalContext.ts | 4 + .../constants/MessageTypes.kt | 1 + .../platform/AssistantSelectOptions.tsx | 129 ++++++++++++++++++ gui/src/context/Auth.tsx | 44 ++++-- gui/src/pages/config/ScopeSelect.tsx | 93 +++++++++++++ gui/src/redux/thunks/setOrgId.ts | 13 ++ 11 files changed, 375 insertions(+), 11 deletions(-) create mode 100644 gui/src/components/modelSelection/platform/AssistantSelectOptions.tsx create mode 100644 gui/src/pages/config/ScopeSelect.tsx create mode 100644 gui/src/redux/thunks/setOrgId.ts diff --git a/core/config/ConfigHandler.ts b/core/config/ConfigHandler.ts index edcf62071..904dcb2db 100644 --- a/core/config/ConfigHandler.ts +++ b/core/config/ConfigHandler.ts @@ -48,6 +48,7 @@ export class ConfigHandler { private additionalContextProviders: IContextProvider[] = []; private profiles: ProfileLifecycleManager[]; private selectedProfileId: string; + private selectedOrgId: string | null; constructor( private readonly ide: IDE, @@ -68,6 +69,7 @@ export class ConfigHandler { ); this.profiles = [new ProfileLifecycleManager(localProfileLoader, this.ide)]; this.selectedProfileId = localProfileLoader.description.id; + this.selectedOrgId = null; // Always load local profile immediately in case control plane doesn't load try { @@ -76,6 +78,20 @@ export class ConfigHandler { console.error("Failed to load config: ", e); } + void this.init(); + } + + private async init() { + const workspaceId = await this.getWorkspaceId(); + const lastSelectedOrgIds = + this.globalContext.get("lastSelectedOrgIdForWorkspace") ?? {}; + const selectedOrgId = lastSelectedOrgIds[workspaceId]; + + // We want to set the org ID before fetching control plane profiles + if (selectedOrgId) { + this.selectedOrgId = selectedOrgId; + } + // Load control plane profiles void this.fetchControlPlaneProfiles(); } @@ -118,7 +134,7 @@ export class ConfigHandler { private async loadPlatformProfiles() { // Get the profiles and create their lifecycle managers this.controlPlaneClient - .listAssistants() + .listAssistants(this.selectedOrgId) .then(async (assistants) => { const hubProfiles = await Promise.all( assistants.map(async (assistant) => { @@ -162,6 +178,7 @@ export class ConfigHandler { const workspaceId = await this.getWorkspaceId(); const lastSelectedWorkspaceIds = this.globalContext.get("lastSelectedProfileForWorkspace") ?? {}; + const selectedWorkspaceId = lastSelectedWorkspaceIds[workspaceId]; if (selectedWorkspaceId) { this.selectedProfileId = selectedWorkspaceId; @@ -211,7 +228,9 @@ export class ConfigHandler { // If so, we do the full (more expensive) reload this.platformProfilesRefreshInterval = setInterval(async () => { const newFullSlugsList = - await this.controlPlaneClient.listAssistantFullSlugs(); + await this.controlPlaneClient.listAssistantFullSlugs( + this.selectedOrgId, + ); if (newFullSlugsList) { const shouldReload = this.fullSlugsListsDiffer( @@ -273,6 +292,14 @@ export class ConfigHandler { } } + async setSelectedOrgId(orgId: string | null) { + this.selectedOrgId = orgId; + const selectedOrgs = + this.globalContext.get("lastSelectedOrgIdForWorkspace") ?? {}; + selectedOrgs[await this.getWorkspaceId()] = orgId; + this.globalContext.update("lastSelectedOrgIdForWorkspace", selectedOrgs); + } + async setSelectedProfile(profileId: string) { this.selectedProfileId = profileId; const result = await this.loadConfig(); diff --git a/core/control-plane/client.ts b/core/control-plane/client.ts index 6200bc8de..1bf4fe558 100644 --- a/core/control-plane/client.ts +++ b/core/control-plane/client.ts @@ -107,7 +107,13 @@ export class ControlPlaneClient { } } +<<<<<<< Updated upstream public async listAssistants(): Promise< +||||||| Stash base + public async listAssistants(organizationId?: string): Promise< +======= + public async listAssistants(organizationId: string | null): Promise< +>>>>>>> Stashed changes { configResult: ConfigResult; ownerSlug: string; @@ -130,14 +136,69 @@ export class ControlPlaneClient { } } +<<<<<<< Updated upstream public async listAssistantFullSlugs(): Promise { +||||||| Stash base + public async listOrganizations(): Promise> { + return [ + { + id: "1", + iconUrl: + "https://cdn.prod.website-files.com/663e06c56841363663ffbbcf/663e1b9fb023f0b622ad3608_log-text.svg", + name: "Continue", + }, + ]; + // const userId = await this.userId; + // if (!userId) { + // return []; + // } + + // try { + // const resp = await this.request("ide/list-organizations", { + // method: "GET", + // }); + // const { organizations } = (await resp.json()) as any; + // return organizations; + // } catch (e) { + // return []; + // } + } + + public async listAssistantFullSlugs(): Promise { +======= + public async listOrganizations(): Promise> { + const userId = await this.userId; + + if (!userId) { + return []; + } + + try { + const resp = await this.request("ide/list-organizations", { + method: "GET", + }); + const { organizations } = (await resp.json()) as any; + return organizations; + } catch (e) { + return []; + } + } + + public async listAssistantFullSlugs( + organizationId: string | null, + ): Promise { +>>>>>>> Stashed changes const userId = await this.userId; if (!userId) { return null; } + const url = organizationId + ? `ide/list-assistant-full-slugs?organizationId=${organizationId}` + : "ide/list-assistant-full-slugs"; + try { - const resp = await this.request("ide/list-assistant-full-slugs", { + const resp = await this.request(url, { method: "GET", }); const { fullSlugs } = (await resp.json()) as any; diff --git a/core/core.ts b/core/core.ts index 4db77443c..4b76084b8 100644 --- a/core/core.ts +++ b/core/core.ts @@ -877,6 +877,12 @@ export class Core { void this.configHandler.setSelectedProfile(msg.data.id); void this.configHandler.reloadConfig(); }); + + on("didChangeSelectedOrg", (msg) => { + void this.configHandler.setSelectedOrgId(msg.data.id); + void this.configHandler.reloadConfig(); + }); + on("didChangeControlPlaneSessionInfo", async (msg) => { this.configHandler.updateControlPlaneSessionInfo(msg.data.sessionInfo); }); diff --git a/core/protocol/coreWebview.ts b/core/protocol/coreWebview.ts index 1622b4be5..e8ef70ab9 100644 --- a/core/protocol/coreWebview.ts +++ b/core/protocol/coreWebview.ts @@ -5,6 +5,7 @@ import { ToWebviewFromIdeOrCoreProtocol } from "./webview.js"; export type ToCoreFromWebviewProtocol = ToCoreFromIdeOrWebviewProtocol & { didChangeSelectedProfile: [{ id: string }, void]; + didChangeSelectedOrg: [{ id: string | null }, void]; }; export type ToWebviewFromCoreProtocol = ToWebviewFromIdeOrCoreProtocol & { didChangeAvailableProfiles: [{ profiles: ProfileDescription[] }, void]; diff --git a/core/protocol/passThrough.ts b/core/protocol/passThrough.ts index 0ce81bfe8..e157eac67 100644 --- a/core/protocol/passThrough.ts +++ b/core/protocol/passThrough.ts @@ -59,6 +59,7 @@ export const WEBVIEW_TO_CORE_PASS_THROUGH: (keyof ToCoreFromWebviewProtocol)[] = "addAutocompleteModel", "profiles/switch", "didChangeSelectedProfile", + "didChangeSelectedOrg", "tools/call", "controlPlane/openUrl", ]; diff --git a/core/util/GlobalContext.ts b/core/util/GlobalContext.ts index 90b403d41..aa1b66fcf 100644 --- a/core/util/GlobalContext.ts +++ b/core/util/GlobalContext.ts @@ -12,6 +12,10 @@ export type GlobalContextType = { indexingPaused: boolean; selectedTabAutocompleteModel: string; lastSelectedProfileForWorkspace: { [workspaceIdentifier: string]: string }; + lastSelectedOrgIdForWorkspace: { + [workspaceIdentifier: string]: string | null; + }; + /** * This is needed to handle the case where a JetBrains user has created * docs embeddings using one provider, and then updates to a new provider. diff --git a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/constants/MessageTypes.kt b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/constants/MessageTypes.kt index 2388ce8ab..6a4647c43 100644 --- a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/constants/MessageTypes.kt +++ b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/constants/MessageTypes.kt @@ -116,6 +116,7 @@ class MessageTypes { "addAutocompleteModel", "profiles/switch", "didChangeSelectedProfile", + "didChangeSelectedOrg", "tools/call", "controlPlane/openUrl" ) diff --git a/gui/src/components/modelSelection/platform/AssistantSelectOptions.tsx b/gui/src/components/modelSelection/platform/AssistantSelectOptions.tsx new file mode 100644 index 000000000..d02bc6788 --- /dev/null +++ b/gui/src/components/modelSelection/platform/AssistantSelectOptions.tsx @@ -0,0 +1,129 @@ +import { BuildingOfficeIcon, PlusIcon } from "@heroicons/react/24/outline"; +import { useContext } from "react"; +import { lightGray } from "../.."; +import { useAuth } from "../../../context/Auth"; +import { IdeMessengerContext } from "../../../context/IdeMessenger"; +import { useAppDispatch } from "../../../redux/hooks"; +import { setDialogMessage, setShowDialog } from "../../../redux/slices/uiSlice"; +import { setProfileId } from "../../../redux/thunks/setProfileId"; +import { getFontSize, getMetaKeyLabel } from "../../../util"; +import AboutAssistantDialog from "../../dialogs/AboutAssistantDialog"; +import { Divider, Option, OptionDiv } from "./shared"; +import { getProfileDisplayText } from "./utils"; +import { useNavigate } from "react-router-dom"; +import { ROUTES } from "../../../util/navigation"; + +interface AssistantSelectOptionsProps { + onClose: () => void; +} + +export function AssistantSelectOptions(props: AssistantSelectOptionsProps) { + const ideMessenger = useContext(IdeMessengerContext); + const { profiles, selectedProfile, selectedOrganization } = useAuth(); + const dispatch = useAppDispatch(); + const navigate = useNavigate(); + + function onNewAssistant() { + ideMessenger.post("controlPlane/openUrl", { + path: "platform/new", + }); + } + + function handleOptionLink(e: React.MouseEvent, profileId: string) { + e.stopPropagation(); + e.preventDefault(); + ideMessenger.post("config/openProfile", { profileId }); + } + + function handleConfigure(e: React.MouseEvent, option: any) { + e.stopPropagation(); + e.preventDefault(); + + if (option.id === "local") { + ideMessenger.post("config/openProfile", { profileId: option.id }); + } else { + props.onClose(); + dispatch(setDialogMessage()); + dispatch(setShowDialog(true)); + } + } + + function handleClickError(profileId: string) { + ideMessenger.post("config/openProfile", { profileId }); + } + + return ( +
+
+ {profiles.map((profile, idx) => ( + + ))} +
+ +
+ +
+ + New Assistant +
+
+ + + +
+ + {getMetaKeyLabel()} ⇧ ' to toggle + +
navigate(ROUTES.CONFIG)} + > + {selectedOrganization?.iconUrl ? ( + + ) : ( + + )} + + {selectedOrganization?.name || "Personal"} + +
+
+
+
+ ); +} diff --git a/gui/src/context/Auth.tsx b/gui/src/context/Auth.tsx index c81aa1bc1..5154c67ae 100644 --- a/gui/src/context/Auth.tsx +++ b/gui/src/context/Auth.tsx @@ -1,4 +1,7 @@ -import { ProfileDescription } from "core/config/ProfileLifecycleManager"; +import { + OrganizationDescription, + ProfileDescription, +} from "core/config/ProfileLifecycleManager"; import { ControlPlaneSessionInfo } from "core/control-plane/client"; import React, { createContext, @@ -28,6 +31,8 @@ interface AuthContextType { selectedProfile: ProfileDescription | undefined; profiles: ProfileDescription[]; controlServerBetaEnabled: boolean; + organizations: OrganizationDescription[]; + selectedOrganization: OrganizationDescription | undefined; } const AuthContext = createContext(undefined); @@ -39,6 +44,20 @@ export const AuthProvider: React.FC<{ children: React.ReactNode }> = ({ undefined, ); + const [organizations, setOrganizations] = useState( + [], + ); + + const ideMessenger = useContext(IdeMessengerContext); + + const selectedOrganizationId = useAppSelector( + (store) => store.session.selectedOrganizationId, + ); + + const selectedOrganization = useMemo(() => { + return organizations.find((p) => p.id === selectedOrganizationId); + }, [organizations, selectedOrganizationId]); + const profiles = useAppSelector(selectAvailableProfiles); const selectedProfileId = useAppSelector( @@ -48,13 +67,8 @@ export const AuthProvider: React.FC<{ children: React.ReactNode }> = ({ return profiles.find((p) => p.id === selectedProfileId); }, [profiles, selectedProfileId]); - const ideMessenger = useContext(IdeMessengerContext); const dispatch = useDispatch(); - const lastControlServerBetaEnabledStatus = useAppSelector( - (state) => state.misc.lastControlServerBetaEnabledStatus, - ); - const login: AuthContextType["login"] = (useOnboarding: boolean) => { return new Promise((resolve) => { ideMessenger @@ -142,11 +156,23 @@ export const AuthProvider: React.FC<{ children: React.ReactNode }> = ({ enableControlServerBeta || continueTestEnvironment !== "none"; setControlServerBetaEnabled(enabled); dispatch(setLastControlServerBetaEnabledStatus(enabled)); - - const shouldShowPopup = !lastControlServerBetaEnabledStatus && enabled; }); }, []); + useEffect(() => { + if (session) { + ideMessenger + .request("controlPlane/listOrganizations", undefined) + .then((result) => { + if (result.status === "success") { + setOrganizations(result.content); + } + }); + } else { + setOrganizations([]); + } + }, [session]); + useWebviewListener( "didChangeIdeSettings", async (msg) => { @@ -185,6 +211,8 @@ export const AuthProvider: React.FC<{ children: React.ReactNode }> = ({ login, selectedProfile, profiles, + selectedOrganization, + organizations, controlServerBetaEnabled, }} > diff --git a/gui/src/pages/config/ScopeSelect.tsx b/gui/src/pages/config/ScopeSelect.tsx new file mode 100644 index 000000000..d1b4d99f8 --- /dev/null +++ b/gui/src/pages/config/ScopeSelect.tsx @@ -0,0 +1,93 @@ +// gui/src/pages/config/ScopeSelect.tsx + +import { Listbox } from "@headlessui/react"; +import { + ChevronDownIcon, + UserCircleIcon, + BuildingOfficeIcon, +} from "@heroicons/react/24/outline"; +import { useState } from "react"; +import { useAuth } from "../../context/Auth"; +import { setOrgId } from "../../redux/thunks/setOrgId"; +import { useAppDispatch } from "../../redux/hooks"; + +const USER_PROFILE_VAL = "personal"; + +export function ScopeSelect() { + const { organizations, selectedOrganization } = useAuth(); + const [value, setValue] = useState( + selectedOrganization?.id || USER_PROFILE_VAL, + ); + const dispatch = useAppDispatch(); + + const handleChange = (newValue: string) => { + setValue(newValue); + + const orgId = newValue === USER_PROFILE_VAL ? null : newValue; + dispatch(setOrgId(orgId)); + }; + const selectedDisplay = + value === USER_PROFILE_VAL + ? { name: "Personal", iconUrl: null } + : organizations.find((org) => org.id === value); + + return ( + +
+ +
+
+ {selectedDisplay?.iconUrl ? ( + + ) : ( + + )} + + {selectedDisplay?.name || "Select Organization"} + +
+
+
+ + + {organizations.length > 0 && ( + <> +
+ Organizations +
+ {organizations.map((org) => ( + +
+ {org.iconUrl ? ( + + ) : ( + + )} + {org.name} +
+
+ ))} + +
+ + )} + + +
+ + Personal +
+
+ +
+ + ); +} diff --git a/gui/src/redux/thunks/setOrgId.ts b/gui/src/redux/thunks/setOrgId.ts new file mode 100644 index 000000000..9db496365 --- /dev/null +++ b/gui/src/redux/thunks/setOrgId.ts @@ -0,0 +1,13 @@ +import { createAsyncThunk } from "@reduxjs/toolkit"; +import { setSelectedOrganizationId } from "../slices/sessionSlice"; +import { ThunkApiType } from "../store"; + +export const setOrgId = createAsyncThunk( + "profile/setOrgId", + async (id, { dispatch, extra }) => { + dispatch(setSelectedOrganizationId(id)); + extra.ideMessenger.post("didChangeSelectedOrg", { + id, + }); + }, +); From 13d566831db9e66ae270ff70e2b5c63304df6458 Mon Sep 17 00:00:00 2001 From: Patrick Erichsen Date: Mon, 3 Feb 2025 21:04:19 -0800 Subject: [PATCH 033/262] feat: cache org selection results --- core/control-plane/client.ts | 45 ++++-------------------------------- 1 file changed, 4 insertions(+), 41 deletions(-) diff --git a/core/control-plane/client.ts b/core/control-plane/client.ts index 1bf4fe558..7c45718ee 100644 --- a/core/control-plane/client.ts +++ b/core/control-plane/client.ts @@ -1,8 +1,4 @@ import { ConfigJson } from "@continuedev/config-types"; -import fetch, { RequestInit, Response } from "node-fetch"; - -import { IdeSettings, ModelDescription } from "../index.js"; - import { AssistantUnrolled, ConfigResult, @@ -10,6 +6,10 @@ import { FullSlug, SecretResult, } from "@continuedev/config-yaml"; +import fetch, { RequestInit, Response } from "node-fetch"; + +import { IdeSettings, ModelDescription } from "../index.js"; + import { getControlPlaneEnv } from "./env.js"; export interface ControlPlaneSessionInfo { @@ -107,13 +107,7 @@ export class ControlPlaneClient { } } -<<<<<<< Updated upstream - public async listAssistants(): Promise< -||||||| Stash base - public async listAssistants(organizationId?: string): Promise< -======= public async listAssistants(organizationId: string | null): Promise< ->>>>>>> Stashed changes { configResult: ConfigResult; ownerSlug: string; @@ -136,36 +130,6 @@ export class ControlPlaneClient { } } -<<<<<<< Updated upstream - public async listAssistantFullSlugs(): Promise { -||||||| Stash base - public async listOrganizations(): Promise> { - return [ - { - id: "1", - iconUrl: - "https://cdn.prod.website-files.com/663e06c56841363663ffbbcf/663e1b9fb023f0b622ad3608_log-text.svg", - name: "Continue", - }, - ]; - // const userId = await this.userId; - // if (!userId) { - // return []; - // } - - // try { - // const resp = await this.request("ide/list-organizations", { - // method: "GET", - // }); - // const { organizations } = (await resp.json()) as any; - // return organizations; - // } catch (e) { - // return []; - // } - } - - public async listAssistantFullSlugs(): Promise { -======= public async listOrganizations(): Promise> { const userId = await this.userId; @@ -187,7 +151,6 @@ export class ControlPlaneClient { public async listAssistantFullSlugs( organizationId: string | null, ): Promise { ->>>>>>> Stashed changes const userId = await this.userId; if (!userId) { return null; From 505795eb4d6644415b6a7af4c254dc279e522785 Mon Sep 17 00:00:00 2001 From: Patrick Erichsen Date: Mon, 3 Feb 2025 21:05:12 -0800 Subject: [PATCH 034/262] Update ScopeSelect.tsx --- gui/src/pages/config/ScopeSelect.tsx | 2 -- 1 file changed, 2 deletions(-) diff --git a/gui/src/pages/config/ScopeSelect.tsx b/gui/src/pages/config/ScopeSelect.tsx index d1b4d99f8..99bdba606 100644 --- a/gui/src/pages/config/ScopeSelect.tsx +++ b/gui/src/pages/config/ScopeSelect.tsx @@ -1,5 +1,3 @@ -// gui/src/pages/config/ScopeSelect.tsx - import { Listbox } from "@headlessui/react"; import { ChevronDownIcon, From 95144dd2775bb98916df56e1760b9f09b77ec9a7 Mon Sep 17 00:00:00 2001 From: ferenci84 Date: Tue, 4 Feb 2025 09:42:06 +0100 Subject: [PATCH 035/262] add comment linking to issue about the qwen fim template --- core/autocomplete/templating/AutocompleteTemplate.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/autocomplete/templating/AutocompleteTemplate.ts b/core/autocomplete/templating/AutocompleteTemplate.ts index 3480a55c9..eb5a01cce 100644 --- a/core/autocomplete/templating/AutocompleteTemplate.ts +++ b/core/autocomplete/templating/AutocompleteTemplate.ts @@ -55,6 +55,8 @@ const stableCodeFimTemplate: AutocompleteTemplate = { }; // https://github.com/QwenLM/Qwen2.5-Coder?tab=readme-ov-file#3-file-level-code-completion-fill-in-the-middle +// This issue asks about the use of <|repo_name|> and <|file_sep|> together with <|fim_prefix|>, <|fim_suffix|> and <|fim_middle|> +// https://github.com/QwenLM/Qwen2.5-Coder/issues/343 const qwenCoderFimTemplate: AutocompleteTemplate = { compilePrefixSuffix: ( prefix: string, From 9ebae75e740a1cd80101e3a6ac4a1f3615d53252 Mon Sep 17 00:00:00 2001 From: Patrick Erichsen Date: Tue, 4 Feb 2025 09:43:13 -0800 Subject: [PATCH 036/262] update settings UI --- extensions/vscode/package.json | 2 +- gui/src/pages/config/ScopeSelect.tsx | 2 +- gui/src/pages/config/index.tsx | 7 +++++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/extensions/vscode/package.json b/extensions/vscode/package.json index 6ad3051a7..45d02f90d 100644 --- a/extensions/vscode/package.json +++ b/extensions/vscode/package.json @@ -220,7 +220,7 @@ { "command": "continue.openConfigPage", "category": "Continue", - "title": "Open Continue Config", + "title": "Open Settings", "icon": "$(gear)", "group": "Continue" }, diff --git a/gui/src/pages/config/ScopeSelect.tsx b/gui/src/pages/config/ScopeSelect.tsx index 99bdba606..9ee287e8b 100644 --- a/gui/src/pages/config/ScopeSelect.tsx +++ b/gui/src/pages/config/ScopeSelect.tsx @@ -32,7 +32,7 @@ export function ScopeSelect() { return (
- +
{selectedDisplay?.iconUrl ? ( diff --git a/gui/src/pages/config/index.tsx b/gui/src/pages/config/index.tsx index 5f9cf3d09..3f9cc611b 100644 --- a/gui/src/pages/config/index.tsx +++ b/gui/src/pages/config/index.tsx @@ -150,14 +150,17 @@ function ConfigPage() {

Configuration

- + Open configuration file
-

User settings

+

User settings

From badafeac26d626a6710d8a8cdd0fff08164128ba Mon Sep 17 00:00:00 2001 From: tomasz-io Date: Tue, 4 Feb 2025 12:36:03 -0800 Subject: [PATCH 037/262] improv: groq docs --- docs/docs/customize/model-providers/more/groq.md | 10 ++++++++-- docs/docs/customize/tutorials/llama3.1.md | 10 ++++++++-- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/docs/docs/customize/model-providers/more/groq.md b/docs/docs/customize/model-providers/more/groq.md index 54e678abc..fa5bac12f 100644 --- a/docs/docs/customize/model-providers/more/groq.md +++ b/docs/docs/customize/model-providers/more/groq.md @@ -1,5 +1,11 @@ # Groq +:::info + +Check if your chosen model is still supported by referring to the [model documentation](https://console.groq.com/docs/models). If a model has been deprecated, you may encounter a 404 error when attempting to use it. + +::: + Groq provides the fastest available inference for open-source language models, including the entire Llama 3.1 family. 1. Obtain an API key [here](https://console.groq.com/keys) @@ -9,9 +15,9 @@ Groq provides the fastest available inference for open-source language models, i { "models": [ { - "title": "Llama 3.1 405b", + "title": "Llama 3.3 70b Versatile", "provider": "groq", - "model": "llama3.1-405b", + "model": "llama-3.3-70b-versatile", "apiKey": "" } ] diff --git a/docs/docs/customize/tutorials/llama3.1.md b/docs/docs/customize/tutorials/llama3.1.md index e2ac72986..bd40ad585 100644 --- a/docs/docs/customize/tutorials/llama3.1.md +++ b/docs/docs/customize/tutorials/llama3.1.md @@ -32,6 +32,12 @@ Ollama is the fastest way to get up and running with local language models. We r ## Groq +:::info + +Check if your chosen model is still supported by referring to the [model documentation](https://console.groq.com/docs/models). If a model has been deprecated, you may encounter a 404 error when attempting to use it. + +::: + Groq provides the fastest available inference for open-source language models, including the entire Llama 3.1 family. 1. Obtain an API key [here](https://console.groq.com/keys) @@ -41,9 +47,9 @@ Groq provides the fastest available inference for open-source language models, i { "models": [ { - "title": "Llama 3.1 405b", + "title": "Llama 3.3 70b Versatile", "provider": "groq", - "model": "llama3.1-405b", + "model": "llama-3.3-70b-versatile", "apiKey": "" } ] From cf1bcbdf5020b46b9f0d2f011fd9234b2e80aec9 Mon Sep 17 00:00:00 2001 From: Nate Date: Tue, 4 Feb 2025 13:20:47 -0800 Subject: [PATCH 038/262] update ci file --- .github/workflows/pr_checks_skip.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr_checks_skip.yaml b/.github/workflows/pr_checks_skip.yaml index 53476d79c..e8c542a46 100644 --- a/.github/workflows/pr_checks_skip.yaml +++ b/.github/workflows/pr_checks_skip.yaml @@ -7,13 +7,13 @@ on: branches: - main paths: - - docs/** + - "docs/**" push: branches: - main paths: - - docs/** + - "docs/**" jobs: require-all-checks-to-pass: From f1fae8629a46b7a4cd0b7c92178c349223353fd9 Mon Sep 17 00:00:00 2001 From: Nate Date: Tue, 4 Feb 2025 13:26:17 -0800 Subject: [PATCH 039/262] update ci --- .github/workflows/{pr_checks_skip.yaml => pr_checks_docs.yaml} | 3 +++ 1 file changed, 3 insertions(+) rename .github/workflows/{pr_checks_skip.yaml => pr_checks_docs.yaml} (88%) diff --git a/.github/workflows/pr_checks_skip.yaml b/.github/workflows/pr_checks_docs.yaml similarity index 88% rename from .github/workflows/pr_checks_skip.yaml rename to .github/workflows/pr_checks_docs.yaml index e8c542a46..b19916750 100644 --- a/.github/workflows/pr_checks_skip.yaml +++ b/.github/workflows/pr_checks_docs.yaml @@ -20,6 +20,9 @@ jobs: if: always() runs-on: ubuntu-latest steps: + - name: Check out the repository + uses: actions/checkout@v4 + - name: Decide whether the needed jobs succeeded or failed uses: re-actors/alls-green@release/v1 with: From 17d190e1e737b2009ea03b29aef7b42fd0285896 Mon Sep 17 00:00:00 2001 From: Nate Date: Tue, 4 Feb 2025 13:35:32 -0800 Subject: [PATCH 040/262] update ci again --- .github/workflows/pr_checks_docs.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pr_checks_docs.yaml b/.github/workflows/pr_checks_docs.yaml index b19916750..19a424538 100644 --- a/.github/workflows/pr_checks_docs.yaml +++ b/.github/workflows/pr_checks_docs.yaml @@ -1,19 +1,19 @@ # When none of the paths are matched for the pr_checks.yaml workflow # we still need the require-all-checks-to-pass job to pass -name: PR checks skip +name: PR checks docs on: pull_request: branches: - main - paths: - - "docs/**" + # paths: + # - "docs/**" push: branches: - main - paths: - - "docs/**" + # paths: + # - "docs/**" jobs: require-all-checks-to-pass: From 3091403304f0ffc2c2e4902b580486991e39542c Mon Sep 17 00:00:00 2001 From: Nate Date: Tue, 4 Feb 2025 13:46:56 -0800 Subject: [PATCH 041/262] remove if always --- .github/workflows/pr_checks_docs.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/pr_checks_docs.yaml b/.github/workflows/pr_checks_docs.yaml index 19a424538..bfda5862d 100644 --- a/.github/workflows/pr_checks_docs.yaml +++ b/.github/workflows/pr_checks_docs.yaml @@ -17,7 +17,6 @@ on: jobs: require-all-checks-to-pass: - if: always() runs-on: ubuntu-latest steps: - name: Check out the repository From 136689746aad2268a8b343c89f63edc6c44dd675 Mon Sep 17 00:00:00 2001 From: Nate Date: Tue, 4 Feb 2025 13:51:49 -0800 Subject: [PATCH 042/262] just run all tests on docs only prs --- .github/workflows/pr_checks.yaml | 1 + .github/workflows/pr_checks_docs.yaml | 30 --------------------------- 2 files changed, 1 insertion(+), 30 deletions(-) delete mode 100644 .github/workflows/pr_checks_docs.yaml diff --git a/.github/workflows/pr_checks.yaml b/.github/workflows/pr_checks.yaml index 578e0974b..455a58428 100644 --- a/.github/workflows/pr_checks.yaml +++ b/.github/workflows/pr_checks.yaml @@ -10,6 +10,7 @@ on: - "core/**" - "gui/**" - ".github/workflows/**" + - "docs/**" push: branches: diff --git a/.github/workflows/pr_checks_docs.yaml b/.github/workflows/pr_checks_docs.yaml deleted file mode 100644 index bfda5862d..000000000 --- a/.github/workflows/pr_checks_docs.yaml +++ /dev/null @@ -1,30 +0,0 @@ -# When none of the paths are matched for the pr_checks.yaml workflow -# we still need the require-all-checks-to-pass job to pass -name: PR checks docs - -on: - pull_request: - branches: - - main - # paths: - # - "docs/**" - - push: - branches: - - main - # paths: - # - "docs/**" - -jobs: - require-all-checks-to-pass: - runs-on: ubuntu-latest - steps: - - name: Check out the repository - uses: actions/checkout@v4 - - - name: Decide whether the needed jobs succeeded or failed - uses: re-actors/alls-green@release/v1 - with: - allowed-failures: - allowed-skips: - jobs: [] From d072af95b440ffa3f76e0a24ac7c71211d7286dd Mon Sep 17 00:00:00 2001 From: Samuel Huang Date: Tue, 4 Feb 2025 19:07:39 -0500 Subject: [PATCH 043/262] Specify name and icon for GUI view --- extensions/vscode/package.json | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/extensions/vscode/package.json b/extensions/vscode/package.json index c688eda3f..a2dafa82d 100644 --- a/extensions/vscode/package.json +++ b/extensions/vscode/package.json @@ -580,7 +580,8 @@ { "type": "webview", "id": "continue.continueGUIView", - "name": "", + "name": "Continue", + "icon": "media/sidebar-icon.png", "visibility": "visible" } ] @@ -702,6 +703,7 @@ "ncp": "^2.0.0", "node-fetch": "^3.3.2", "node-machine-id": "^1.1.12", + "partial-json": "^0.1.7", "posthog-node": "^3.6.3", "react-markdown": "^8.0.7", "react-redux": "^8.0.5", @@ -718,6 +720,7 @@ "vectordb": "^0.4.20", "vscode-languageclient": "^8.0.2", "ws": "^8.13.0", - "yarn": "^1.22.21" + "yarn": "^1.22.21", + "zod": "^3.24.1" } } From 949b3540089e2749d4902d31bd0367b7088b7cb0 Mon Sep 17 00:00:00 2001 From: Nate Date: Tue, 4 Feb 2025 17:09:48 -0800 Subject: [PATCH 044/262] update link paths --- core/config/ConfigHandler.ts | 2 +- extensions/vscode/package.json | 2 +- .../modelSelection/platform/AssistantSelectOptions.tsx | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/core/config/ConfigHandler.ts b/core/config/ConfigHandler.ts index e2d1b5061..4ad045d30 100644 --- a/core/config/ConfigHandler.ts +++ b/core/config/ConfigHandler.ts @@ -128,7 +128,7 @@ export class ConfigHandler { } } else { const env = await getControlPlaneEnv(this.ide.getIdeSettings()); - await this.ide.openUrl(`${env.APP_URL}platform/${openProfileId}`); + await this.ide.openUrl(`${env.APP_URL}${openProfileId}`); } } diff --git a/extensions/vscode/package.json b/extensions/vscode/package.json index 09f98e789..815401124 100644 --- a/extensions/vscode/package.json +++ b/extensions/vscode/package.json @@ -2,7 +2,7 @@ "name": "continue", "icon": "media/icon.png", "author": "Continue Dev, Inc", - "version": "0.9.259", + "version": "0.9.260", "repository": { "type": "git", "url": "https://github.com/continuedev/continue" diff --git a/gui/src/components/modelSelection/platform/AssistantSelectOptions.tsx b/gui/src/components/modelSelection/platform/AssistantSelectOptions.tsx index 6c95b9f45..436005f23 100644 --- a/gui/src/components/modelSelection/platform/AssistantSelectOptions.tsx +++ b/gui/src/components/modelSelection/platform/AssistantSelectOptions.tsx @@ -1,5 +1,6 @@ import { BuildingOfficeIcon, PlusIcon } from "@heroicons/react/24/outline"; import { useContext } from "react"; +import { useNavigate } from "react-router-dom"; import { lightGray } from "../.."; import { useAuth } from "../../../context/Auth"; import { IdeMessengerContext } from "../../../context/IdeMessenger"; @@ -7,12 +8,11 @@ import { useAppDispatch } from "../../../redux/hooks"; import { setDialogMessage, setShowDialog } from "../../../redux/slices/uiSlice"; import { setProfileId } from "../../../redux/thunks/setProfileId"; import { getFontSize, getMetaKeyLabel, isLocalProfile } from "../../../util"; +import { ROUTES } from "../../../util/navigation"; import AboutAssistantDialog from "../../dialogs/AboutAssistantDialog"; +import AssistantIcon from "./AssistantIcon"; import { Divider, Option, OptionDiv } from "./shared"; import { getProfileDisplayText } from "./utils"; -import { useNavigate } from "react-router-dom"; -import { ROUTES } from "../../../util/navigation"; -import AssistantIcon from "./AssistantIcon"; interface AssistantSelectOptionsProps { onClose: () => void; @@ -26,7 +26,7 @@ export function AssistantSelectOptions(props: AssistantSelectOptionsProps) { function onNewAssistant() { ideMessenger.post("controlPlane/openUrl", { - path: "platform/new", + path: "new", }); } From 0ed86127825b269dd452ad90f3833aa3a8fc82b0 Mon Sep 17 00:00:00 2001 From: Nate Date: Tue, 4 Feb 2025 17:26:56 -0800 Subject: [PATCH 045/262] switch repo map tool to show signatures --- core/tools/implementations/viewRepoMap.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/tools/implementations/viewRepoMap.ts b/core/tools/implementations/viewRepoMap.ts index 69f624feb..9d7c44809 100644 --- a/core/tools/implementations/viewRepoMap.ts +++ b/core/tools/implementations/viewRepoMap.ts @@ -5,7 +5,7 @@ import { ToolImpl } from "."; export const viewRepoMapImpl: ToolImpl = async (args, extras) => { const repoMap = await generateRepoMap(extras.llm, extras.ide, { outputRelativeUriPaths: true, - includeSignatures: false, + includeSignatures: true, }); return [ { From 74f9a23d58e6130a5adf739423fdae7e8caf90aa Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Tue, 4 Feb 2025 17:50:51 -0800 Subject: [PATCH 046/262] comment adjustments --- .../src/main/resources/continue_tutorial.java | 24 ++++++++--------- .../src/main/resources/continue_tutorial.ts | 26 +++++++++---------- 2 files changed, 24 insertions(+), 26 deletions(-) diff --git a/extensions/intellij/src/main/resources/continue_tutorial.java b/extensions/intellij/src/main/resources/continue_tutorial.java index 41ac854c0..808f51021 100644 --- a/extensions/intellij/src/main/resources/continue_tutorial.java +++ b/extensions/intellij/src/main/resources/continue_tutorial.java @@ -1,14 +1,14 @@ -/* _________ _____ _____ - __ ____/______ _______ __ /____(_)_______ ____ _______ - _ / _ __ \__ __ \_ __/__ / __ __ \_ / / /_ _ \ - / /___ / /_/ /_ / / // /_ _ / _ / / // /_/ / / __/ - \____/ \____/ /_/ /_/ \__/ /_/ /_/ /_/ \__,_/ \___/ - - Chat, Edit, and Autocomplete tutorial -*/ +// _________ _____ _____ +// __ ____/______ _______ __ /____(_)_______ ____ _______ +// _ / _ __ \__ __ \_ __/__ / __ __ \_ / / /_ _ \ +// / /___ / /_/ /_ / / // /_ _ / _ / / // /_/ / / __/ +// \____/ \____/ /_/ /_/ \__/ /_/ /_/ /_/ \__,_/ \___/ +// +// Chat, Edit, and Autocomplete tutorial +// -/* ————————————————————————————————————————————————— Chat ————————————————————————————————————————————————— */ +// ————————————————————————————————————————————————— Chat ————————————————————————————————————————————————— // Highlight the code below // Press [Cmd/Ctrl + J] to add to Chat @@ -26,7 +26,7 @@ public static int[] sortingAlgorithm(int[] x) { return x; } -/* ————————————————————————————————————————————————— Edit ————————————————————————————————————————————————— */ +// ————————————————————————————————————————————————— Edit ————————————————————————————————————————————————— // Highlight the code below // Press [Cmd/Ctrl + I] to Edit @@ -44,7 +44,7 @@ public static int[] sortingAlgorithm2(int[] x) { return x; } -/* ————————————————————————————————————————————— Autocomplete —————————————————————————————————————————————— */ +// ————————————————————————————————————————————— Autocomplete —————————————————————————————————————————————— // Place cursor after `sortingAlgorithm...` below and press [Enter] // Press [Tab] to accept the Autocomplete suggestion @@ -52,4 +52,4 @@ public static int[] sortingAlgorithm2(int[] x) { // Basic assertion for sortingAlgorithm... -/* —————————————————— Learn more at https://docs.continue.dev/getting-started/overview ——————————————————— */ +// —————————————————— Learn more at https://docs.continue.dev/getting-started/overview ——————————————————— diff --git a/extensions/intellij/src/main/resources/continue_tutorial.ts b/extensions/intellij/src/main/resources/continue_tutorial.ts index 301fc248c..1f4714249 100644 --- a/extensions/intellij/src/main/resources/continue_tutorial.ts +++ b/extensions/intellij/src/main/resources/continue_tutorial.ts @@ -1,14 +1,13 @@ -/* _________ _____ _____ - __ ____/______ _______ __ /____(_)_______ ____ _______ - _ / _ __ \__ __ \_ __/__ / __ __ \_ / / /_ _ \ - / /___ / /_/ /_ / / // /_ _ / _ / / // /_/ / / __/ - \____/ \____/ /_/ /_/ \__/ /_/ /_/ /_/ \__,_/ \___/ +// _________ _____ _____ +// __ ____/______ _______ __ /____(_)_______ ____ _______ +// _ / _ __ \__ __ \_ __/__ / __ __ \_ / / /_ _ \ +// / /___ / /_/ /_ / / // /_ _ / _ / / // /_/ / / __/ +// \____/ \____/ /_/ /_/ \__/ /_/ /_/ /_/ \__,_/ \___/ +// +// Chat, Edit, and Autocomplete tutorial +// - Chat, Edit, and Autocomplete tutorial -*/ - - -/* ————————————————————————————————————————————————— Chat ————————————————————————————————————————————————— */ +// ————————————————————————————————————————————————— Chat ————————————————————————————————————————————————— // Highlight the code below // Press [Cmd/Ctrl + J] to add to Chat @@ -26,7 +25,7 @@ function sortingAlgorithm(x: number[]): number[] { return x; } -/* ————————————————————————————————————————————————— Edit ————————————————————————————————————————————————— */ +// ————————————————————————————————————————————————— Edit ————————————————————————————————————————————————— // Highlight the code below // Press [Cmd/Ctrl + I] to Edit @@ -44,12 +43,11 @@ function sortingAlgorithm2(x: number[]): number[] { return x; } -/* ————————————————————————————————————————————— Autocomplete —————————————————————————————————————————————— */ +// ————————————————————————————————————————————— Autocomplete —————————————————————————————————————————————— // Place cursor after `sortingAlgorithm...` below and press [Enter] // Press [Tab] to accept the Autocomplete suggestion // Basic assertion for sortingAlgorithm... - -/* —————————————————— Learn more at https://docs.continue.dev/getting-started/overview ——————————————————— */ +// —————————————————— Learn more at https://docs.continue.dev/getting-started/overview ——————————————————— From 98ba407941d773fa46e5867d05974e2ca052ee35 Mon Sep 17 00:00:00 2001 From: Nate Date: Tue, 4 Feb 2025 18:00:06 -0800 Subject: [PATCH 047/262] fix bug loading config.yaml --- core/config/yaml/loadYaml.ts | 10 +++++++--- extensions/vscode/package-lock.json | 4 ++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/core/config/yaml/loadYaml.ts b/core/config/yaml/loadYaml.ts index 9503c0865..666317447 100644 --- a/core/config/yaml/loadYaml.ts +++ b/core/config/yaml/loadYaml.ts @@ -3,6 +3,7 @@ import fs from "node:fs"; import { AssistantUnrolled, ConfigResult, + parseAssistantUnrolled, validateConfigYaml, } from "@continuedev/config-yaml"; import { fetchwithRequestOptions } from "@continuedev/fetch"; @@ -34,10 +35,10 @@ import { PlatformConfigMetadata } from "../profile/PlatformProfileLoader"; import { slashFromCustomCommand } from "../../commands"; import { allTools } from "../../tools"; -import { clientRenderHelper } from "./clientRender"; -import { llmsFromModelConfig } from "./models"; import { GlobalContext } from "../../util/GlobalContext"; import { modifyContinueConfigWithSharedConfig } from "../sharedConfig"; +import { clientRenderHelper } from "./clientRender"; +import { llmsFromModelConfig } from "./models"; async function loadConfigYaml( workspaceConfigs: string[], @@ -46,9 +47,12 @@ async function loadConfigYaml( ide: IDE, controlPlaneClient: ControlPlaneClient, ): Promise> { + const ideSettings = await ide.getIdeSettings(); let config = overrideConfigYaml ?? - (await clientRenderHelper(rawYaml, ide, controlPlaneClient)); + (ideSettings.continueTestEnvironment === "production" + ? await clientRenderHelper(rawYaml, ide, controlPlaneClient) + : parseAssistantUnrolled(rawYaml)); const errors = validateConfigYaml(config); if (errors?.some((error) => error.fatal)) { diff --git a/extensions/vscode/package-lock.json b/extensions/vscode/package-lock.json index 816822f52..9c55ed3d7 100644 --- a/extensions/vscode/package-lock.json +++ b/extensions/vscode/package-lock.json @@ -1,12 +1,12 @@ { "name": "continue", - "version": "0.9.259", + "version": "0.9.260", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "continue", - "version": "0.9.259", + "version": "0.9.260", "license": "Apache-2.0", "dependencies": { "@continuedev/fetch": "^1.0.3", From accd5d4b50d459bbe49d58fd052ffd269f932e71 Mon Sep 17 00:00:00 2001 From: Nate Date: Tue, 4 Feb 2025 19:17:42 -0800 Subject: [PATCH 048/262] catch all config loading errors --- binary/package-lock.json | 2 +- core/config/ProfileLifecycleManager.ts | 20 ++++++++++++++++++-- core/config/profile/doLoadConfig.ts | 2 +- core/package-lock.json | 8 ++++---- core/package.json | 2 +- 5 files changed, 25 insertions(+), 9 deletions(-) diff --git a/binary/package-lock.json b/binary/package-lock.json index 84b831ecf..72c044f14 100644 --- a/binary/package-lock.json +++ b/binary/package-lock.json @@ -48,7 +48,7 @@ "@aws-sdk/client-sagemaker-runtime": "^3.621.0", "@aws-sdk/credential-providers": "^3.620.1", "@continuedev/config-types": "^1.0.13", - "@continuedev/config-yaml": "^1.0.23", + "@continuedev/config-yaml": "^1.0.24", "@continuedev/fetch": "^1.0.4", "@continuedev/llm-info": "^1.0.2", "@continuedev/openai-adapters": "^1.0.10", diff --git a/core/config/ProfileLifecycleManager.ts b/core/config/ProfileLifecycleManager.ts index fc18f34b0..9fc3dc960 100644 --- a/core/config/ProfileLifecycleManager.ts +++ b/core/config/ProfileLifecycleManager.ts @@ -50,7 +50,9 @@ export class ProfileLifecycleManager { } // Clear saved config and reload - async reloadConfig(additionalContextProviders: IContextProvider[] = []): Promise> { + async reloadConfig( + additionalContextProviders: IContextProvider[] = [], + ): Promise> { this.savedConfigResult = undefined; this.savedBrowserConfigResult = undefined; this.pendingConfigPromise = undefined; @@ -73,7 +75,21 @@ export class ProfileLifecycleManager { // Set pending config promise this.pendingConfigPromise = new Promise(async (resolve, reject) => { - const result = await this.profileLoader.doLoadConfig(); + let result: ConfigResult; + try { + result = await this.profileLoader.doLoadConfig(); + } catch (e: any) { + result = { + errors: [ + { + fatal: true, + message: e.message, + }, + ], + config: undefined, + configLoadInterrupted: true, + }; + } if (result.config) { // Add registered context providers diff --git a/core/config/profile/doLoadConfig.ts b/core/config/profile/doLoadConfig.ts index 86f975965..af8c59c97 100644 --- a/core/config/profile/doLoadConfig.ts +++ b/core/config/profile/doLoadConfig.ts @@ -21,9 +21,9 @@ import { getConfigJsonPath, getConfigYamlPath } from "../../util/paths"; import { Telemetry } from "../../util/posthog"; import { TTS } from "../../util/tts"; import { loadContinueConfigFromJson } from "../load"; +import { migrateJsonSharedConfig } from "../migrateSharedConfig"; import { loadContinueConfigFromYaml } from "../yaml/loadYaml"; import { PlatformConfigMetadata } from "./PlatformProfileLoader"; -import { migrateJsonSharedConfig } from "../migrateSharedConfig"; export default async function doLoadConfig( ide: IDE, diff --git a/core/package-lock.json b/core/package-lock.json index 7edab380e..b0e604749 100644 --- a/core/package-lock.json +++ b/core/package-lock.json @@ -13,7 +13,7 @@ "@aws-sdk/client-sagemaker-runtime": "^3.621.0", "@aws-sdk/credential-providers": "^3.620.1", "@continuedev/config-types": "^1.0.13", - "@continuedev/config-yaml": "^1.0.23", + "@continuedev/config-yaml": "^1.0.24", "@continuedev/fetch": "^1.0.4", "@continuedev/llm-info": "^1.0.2", "@continuedev/openai-adapters": "^1.0.10", @@ -3038,9 +3038,9 @@ } }, "node_modules/@continuedev/config-yaml": { - "version": "1.0.23", - "resolved": "https://registry.npmjs.org/@continuedev/config-yaml/-/config-yaml-1.0.23.tgz", - "integrity": "sha512-F2Hwc85iCwAHJuwJALOsmZIBeHdF+87mS0YT7dlC6QiE+zAhZKUHcLQ/nTt9bJuhyVyufpb9LApkp40UdGsaWw==", + "version": "1.0.24", + "resolved": "https://registry.npmjs.org/@continuedev/config-yaml/-/config-yaml-1.0.24.tgz", + "integrity": "sha512-xA4tRUh9r9p3aHIXr9zl5GQd5VygEusIc7Zw7AAFCbbl6ahMB4CDcweT8+iz0UvxJ11PLYizFSygpvxu/Yl19Q==", "dependencies": { "@continuedev/config-types": "^1.0.14", "yaml": "^2.6.1", diff --git a/core/package.json b/core/package.json index 111fbe902..cfb17e1c4 100644 --- a/core/package.json +++ b/core/package.json @@ -46,7 +46,7 @@ "@aws-sdk/client-sagemaker-runtime": "^3.621.0", "@aws-sdk/credential-providers": "^3.620.1", "@continuedev/config-types": "^1.0.13", - "@continuedev/config-yaml": "^1.0.23", + "@continuedev/config-yaml": "^1.0.24", "@continuedev/fetch": "^1.0.4", "@continuedev/llm-info": "^1.0.2", "@continuedev/openai-adapters": "^1.0.10", From b0ae81fa740a83d9e4dca336ee9a2aac9c0426a0 Mon Sep 17 00:00:00 2001 From: Nate Date: Tue, 4 Feb 2025 19:24:44 -0800 Subject: [PATCH 049/262] fix onboarding --- .../continueintellijextension/continue/IntelliJIde.kt | 1 + .../services/ContinueExtensionSettingsService.kt | 1 + .../com/github/continuedev/continueintellijextension/types.kt | 1 + 3 files changed, 3 insertions(+) diff --git a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/IntelliJIde.kt b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/IntelliJIde.kt index f871fc69e..4482aa5fe 100644 --- a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/IntelliJIde.kt +++ b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/IntelliJIde.kt @@ -94,6 +94,7 @@ class IntelliJIDE( userToken = settings.continueState.userToken ?: "", enableControlServerBeta = settings.continueState.enableContinueTeamsBeta, pauseCodebaseIndexOnStart = false, // TODO: Needs to be implemented + continueTestEnvironment = "none" ) } diff --git a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/services/ContinueExtensionSettingsService.kt b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/services/ContinueExtensionSettingsService.kt index ce548e5f5..7430f2bcb 100644 --- a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/services/ContinueExtensionSettingsService.kt +++ b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/services/ContinueExtensionSettingsService.kt @@ -98,6 +98,7 @@ open class ContinueExtensionSettings : PersistentStateComponent Date: Tue, 4 Feb 2025 22:27:20 -0800 Subject: [PATCH 050/262] fix PATH bug in MCP startup --- core/context/mcp/index.ts | 6 +++- core/package-lock.json | 50 ++++++++++++++++++++++++++--- core/package.json | 2 +- extensions/vscode/package-lock.json | 2 +- gui/package-lock.json | 2 +- 5 files changed, 53 insertions(+), 9 deletions(-) diff --git a/core/context/mcp/index.ts b/core/context/mcp/index.ts index 304c2a8c4..b1a960910 100644 --- a/core/context/mcp/index.ts +++ b/core/context/mcp/index.ts @@ -69,10 +69,14 @@ class MCPConnection { private constructTransport(options: MCPOptions): Transport { switch (options.transport.type) { case "stdio": + const env: Record = options.transport.env || {}; + if (process.env.PATH !== undefined) { + env.PATH = process.env.PATH; + } return new StdioClientTransport({ command: options.transport.command, args: options.transport.args, - env: options.transport.env, + env, }); case "websocket": return new WebSocketClientTransport(new URL(options.transport.url)); diff --git a/core/package-lock.json b/core/package-lock.json index 7edab380e..8f8f6d40b 100644 --- a/core/package-lock.json +++ b/core/package-lock.json @@ -17,7 +17,7 @@ "@continuedev/fetch": "^1.0.4", "@continuedev/llm-info": "^1.0.2", "@continuedev/openai-adapters": "^1.0.10", - "@modelcontextprotocol/sdk": "^1.0.0", + "@modelcontextprotocol/sdk": "^1.4.1", "@mozilla/readability": "^0.5.0", "@octokit/rest": "^20.0.2", "@typescript-eslint/eslint-plugin": "^7.8.0", @@ -4218,13 +4218,34 @@ ] }, "node_modules/@modelcontextprotocol/sdk": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@modelcontextprotocol/sdk/-/sdk-1.0.3.tgz", - "integrity": "sha512-2as3cX/VJ0YBHGmdv3GFyTpoM8q2gqE98zh3Vf1NwnsSY0h3mvoO07MUzfygCKkWsFjcZm4otIiqD6Xh7kiSBQ==", + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/@modelcontextprotocol/sdk/-/sdk-1.4.1.tgz", + "integrity": "sha512-wS6YC4lkUZ9QpP+/7NBTlVNiEvsnyl0xF7rRusLF+RsG0xDPc/zWR7fEEyhKnnNutGsDAZh59l/AeoWGwIb1+g==", "dependencies": { "content-type": "^1.0.5", + "eventsource": "^3.0.2", "raw-body": "^3.0.0", - "zod": "^3.23.8" + "zod": "^3.23.8", + "zod-to-json-schema": "^3.24.1" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@modelcontextprotocol/sdk/node_modules/zod": { + "version": "3.24.1", + "resolved": "https://registry.npmjs.org/zod/-/zod-3.24.1.tgz", + "integrity": "sha512-muH7gBL9sI1nciMZV67X5fTKKBLtwpZ5VBp1vsOQzj1MhrBZ4wlVCm3gedKZWLp0Oyel8sIGfeiz54Su+OVT+A==", + "funding": { + "url": "https://github.com/sponsors/colinhacks" + } + }, + "node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema": { + "version": "3.24.1", + "resolved": "https://registry.npmjs.org/zod-to-json-schema/-/zod-to-json-schema-3.24.1.tgz", + "integrity": "sha512-3h08nf3Vw3Wl3PK+q3ow/lIil81IT2Oa7YpQyUUDsEWbXveMesdfK1xBd2RhCkynwZndAxixji/7SYJJowr62w==", + "peerDependencies": { + "zod": "^3.24.1" } }, "node_modules/@mozilla/readability": { @@ -8313,6 +8334,25 @@ "node": ">=0.8.x" } }, + "node_modules/eventsource": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/eventsource/-/eventsource-3.0.5.tgz", + "integrity": "sha512-LT/5J605bx5SNyE+ITBDiM3FxffBiq9un7Vx0EwMDM3vg8sWKx/tO2zC+LMqZ+smAM0F2hblaDZUVZF0te2pSw==", + "dependencies": { + "eventsource-parser": "^3.0.0" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/eventsource-parser": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/eventsource-parser/-/eventsource-parser-3.0.0.tgz", + "integrity": "sha512-T1C0XCUimhxVQzW4zFipdx0SficT651NnkR0ZSH3yQwh+mFMdLfgjABVi4YtMTtaL4s168593DaoaRLMqryavA==", + "engines": { + "node": ">=18.0.0" + } + }, "node_modules/execa": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", diff --git a/core/package.json b/core/package.json index 111fbe902..10efa03f9 100644 --- a/core/package.json +++ b/core/package.json @@ -50,7 +50,7 @@ "@continuedev/fetch": "^1.0.4", "@continuedev/llm-info": "^1.0.2", "@continuedev/openai-adapters": "^1.0.10", - "@modelcontextprotocol/sdk": "^1.0.0", + "@modelcontextprotocol/sdk": "^1.4.1", "@mozilla/readability": "^0.5.0", "@octokit/rest": "^20.0.2", "@typescript-eslint/eslint-plugin": "^7.8.0", diff --git a/extensions/vscode/package-lock.json b/extensions/vscode/package-lock.json index 9c55ed3d7..78a61be2b 100644 --- a/extensions/vscode/package-lock.json +++ b/extensions/vscode/package-lock.json @@ -110,7 +110,7 @@ "@continuedev/fetch": "^1.0.4", "@continuedev/llm-info": "^1.0.2", "@continuedev/openai-adapters": "^1.0.10", - "@modelcontextprotocol/sdk": "^1.0.0", + "@modelcontextprotocol/sdk": "^1.4.1", "@mozilla/readability": "^0.5.0", "@octokit/rest": "^20.0.2", "@typescript-eslint/eslint-plugin": "^7.8.0", diff --git a/gui/package-lock.json b/gui/package-lock.json index cca979250..0984ae74d 100644 --- a/gui/package-lock.json +++ b/gui/package-lock.json @@ -112,7 +112,7 @@ "@continuedev/fetch": "^1.0.4", "@continuedev/llm-info": "^1.0.2", "@continuedev/openai-adapters": "^1.0.10", - "@modelcontextprotocol/sdk": "^1.0.0", + "@modelcontextprotocol/sdk": "^1.4.1", "@mozilla/readability": "^0.5.0", "@octokit/rest": "^20.0.2", "@typescript-eslint/eslint-plugin": "^7.8.0", From 7749349f8996f5da186ba1a8b2910443121ea2fc Mon Sep 17 00:00:00 2001 From: vercelInfrAI Date: Wed, 5 Feb 2025 15:01:35 +0800 Subject: [PATCH 051/262] feat: replace logo and deepseek model base info --- core/llm/llms/Novita.ts | 2 ++ extensions/vscode/config_schema.json | 2 ++ gui/public/logos/novita.png | Bin 6726 -> 2713 bytes 3 files changed, 4 insertions(+) diff --git a/core/llm/llms/Novita.ts b/core/llm/llms/Novita.ts index 2f5c61b55..55b944829 100644 --- a/core/llm/llms/Novita.ts +++ b/core/llm/llms/Novita.ts @@ -9,6 +9,8 @@ class Novita extends OpenAI { }; private static MODEL_IDS: { [name: string]: string } = { + "deepseek-r1": "deepseek/deepseek-r1", + "deepseek_v3": "deepseek/deepseek_v3", "llama3-8b": "meta-llama/llama-3-8b-instruct", "llama3-70b": "meta-llama/llama-3-70b-instruct", "llama3.1-8b": "meta-llama/llama-3.1-8b-instruct", diff --git a/extensions/vscode/config_schema.json b/extensions/vscode/config_schema.json index 2b12cf21e..827662dd2 100644 --- a/extensions/vscode/config_schema.json +++ b/extensions/vscode/config_schema.json @@ -998,6 +998,8 @@ "anyOf": [ { "enum": [ + "deepseek-r1", + "deepseek_v3", "llama3-8b", "llama3-70b", "llama3.1-8b", diff --git a/gui/public/logos/novita.png b/gui/public/logos/novita.png index b744cd35cc7825bba5c201be63d76e3993a75ec9..30ccb507e23b1c0491e35514c3b9858c515529be 100644 GIT binary patch literal 2713 zcmbW2i91yLAIE1f#w?f_vtx|0WX-NDlV;2?Wy!uTk!7+ZOLn@U8zwO-en@3aH%pdK zqD5uMlH?i`H*&*`ex%ascjkBRUvSU!I?r?7pYQu~-k)=xbDnRWlcTLPoD2tnK+*>| zEEf<6TqHWB#DPjz(377akXWCSy&D^lATS`nAaO8QTnsEB28M`(CB?x|39u9ZL<|NI zgG-7bB*lGAj)!*G_0fwR#FuwsfLqO$4l-aKs5+ZO(Il_2-PM*b;wX% zvea&QDLr{9eFZ54MJYo?DI*HZm;y6Vf|*ibd#JFz$}lr!m^lp&V4(uHRDsh~;QLhJ zRsd><{b~q?I)bT=u-=7WX&~4dNE=P0ttOJAg*>2zJgAMd(?QznNIU3CJL*aw+AZy* zC+(~!?V>N^sxRYiDC1!$<7Fi4Z7l0!BI|1+>t`bCZ;A@ogF3ty6|@%>Y=$}lV2%ng zM~7OV!z|F@mS`>j9etFJj@XBZ+=q#>!bAh?#~j;_iD6)lGvs2Ka&Z9Ga`D!32`sr2 zEV)FsToN0bWP?q%!KT<^Q*E(nw%BwIF5>_$^8oJTLEJ9~ai{EXS@!sBdwh-q{P7mG7pcsfRPIfx@F4?S@+DXLk}vy_ulSL#`je{y29=A?=hu5fEcBFG1U9VsSl1*AI4Jq0ph5S;;4_~m7l~b4f2o>_YZO>%Q5o_=kV2UF#Oz-(s;M%3Yf08rZd;0JSvd?B0V z?0nty{v7I^F=7(q47TuS= z({@UGN_YLCRC87?Z8U4S-*Na4tz5j*BTtmB@RG70WE_g!z_AJ{3{KymVmI)t0!324 zJ1RdJQT=7D?4PTYHR2<8)JR=!3$?t*;Cwf{+Dz2cuDPI{8`c$y^JHwL_xh$@+$lidgxeaHcV;IK8Km>QMs8;#zPwoH5=$CxJvAT>ZTd3rrL|_2Z zCxEv08uLU+hwTHV%KZVjO_0mlxy@k=Ko`L>Ami>)A|1jCWF$bezrw4ZmW_KB)gy%C z?kJPWv7+Xzh84?_1RTrZtzq5YZ`R?hei+tpy>sLz!J(dZC87=!8vW$ z!YKZEudd?*B~4Ive(dnUJlfF}4*E162<$g zBeQP_W#0;DBQqAi0_oq{zu#HI*#YT4gqfA}Ob`3aI)V8+lCNxj@?U)2Ha*Dis~hKo zKf1<{zt1*XX@ps=Gftm;he-oEUakDMtMXo{2D9*%?yCa)$(a=kv(^O9h@59n9c1&r zPcHhJZCbDLwh|_-zt)G}NsIb+k%dle>=K+?S!?Z|`l7Qn{0lgHiir1a^N%=b)i)e@ z)oQHOvUl*NV9KJl-L_EgLQ>K3zNMPqi`Q28+8iQ_zd55mPdTa7n|5Q{!o}v5mFFpj zp^6SK{dc-Qz0;?bnVmDtouIv1=BscTE+6)OGl9je+;w^^0W%q^z)zP`%(8OsOzHB{ zpPQ)B_j$B3m^W6ic{3%DPuuScH z!#(u#varD=J7@HY7vB5X_2RUsuYCt)F{wHRx@{?t&l;;6J3CXHkH#7E&!9Npkn;;a zDJ_cuEpt|`s#%oxTE9_WgC@pSO^2uBr4Cee2R@323aGG&E?zO=UdtO3gH{}B^ zx=3(n%fXZ1sb;x2{xY=kZF!#sH}hNms)5}&6h2bSZ@F5jnpY#Gw$EFVq#e!t@p?s^)#p7C(h z&Vgqieeotm@9AESaN?6-zI3(tMGgDH6?uUXXSw|nZG>LAaVb~|bIvrQ%wMn5KD_XI zc8;qlBE)Urr5KFYTgM%@R7x~vQTW%ztJJDL%@%20-k-Z2 z^Wd0>YeWJmc(#92v4SrF`#5oy=NCD>XsEWE!=*p%7EpUArRtmVkvo@T`H_vOe#OtO zbT}%>6K>Dc4?NEMG5P+kaNACai>YmDm9naL3;%Ho`mgspQ6v5*h@ZIZ=D~{}6UhT? LM^-cQaMu3-W*{(N literal 6726 zcmV-M8oA|(P)b`>$2vY1tM6d%M!!jF(Kj5*%-r3p+W*mt{kce$Xh#*L8*hNBQ!U|=9$6mk= zoL^w)AAs1f%DfRmGO)<(h#gNC_uf-a)l;Y2B!cPJhIFC$81%v7ew6b= zl{K~{Z70LxIhk4IPWN?`cSL*T?KFe!l9pco_P>1JULlW{?ayERia&P&{NwucQ40y^ zi-NVfLWFDM&&~yXKCWAywf06C8;>K;v$F$%`amobP z&N9ZiKDzb!-}IY1PyYI|ervs6kH#p`(Hfadjq+|~IUr?DA4GbWB>7#24e6 z6-XZ`1hJlaR`l%3xRqSS;{yJ&;G%68@QRhUc4n_npGyFy zrq+O!7;2@>9a8Ht!AP2;GEU1C6BAC7Xe-kUW-5f3AvKR}7#TB`aNC|#T+3MwebnJyDO2&*uN zZ3fd5DtBI)CK5LrMY2s1 z2Fo-{*pV1Hlm{=9FAXN6Tn1~>iDjn=Yt%3$s%fq`)b_s2KD9O#f$gEJ zii&{l91FGtP*ss|?9dCZbsQxaOU3XU>uBXLA`#JkEQ&4Z(bv}nD->OW0A>`U4Co=7 zSr5?=NK*H{ujn+ii(AQ1^u!9tS` zOiAb_+}e}G`tDvr@DqbTXo`CY4<>>u?bp!DY~q}eab6k1bS^wqzcP!>F0GG)EOQw( z{a+g_!Xc;a09+9oakd`^?d-rjLLo;^$J3;O^D?cSom!cjbUop?hMG0SS6n63MJWj% z%Xf4MyI7euESBj%X^X32G8CKO2ZHbI8EK4kEzB!HU>PfMBxk?wtDQciN2z(o+>!zf zLhvp)YAOsbZEUp(Q+pqWq^AnVB!lg8N?r6CQLN_TJRz)9y z;;R@Y+Wci_HYG*+MDozafi$B%YYB{7g>ZMhfAhUZa0lx&X%8sly66?-{=bEB@8dYJ z>-V-l7pI?1*?V`im>=PEdLJL27CUZlu6J#$iat$MKa{`n;E{9?QsA6notjffUV zX!C*(D+gEVevQnuV^iYVFBkR;TdkZF5T*<~whHLx8g$?Ki^u(P&Azklp1kqeyM4Ff z5%t{-Ht|wT9y!JNq96$VM|LqZMd137z;}R{B&$lqMRCJ&0{V5ody% zuOB{zyI+6YU;oq3`VD+clgTv|O!H(?w((<`<_Q^%9E5SKAMSWx;E8=a+p*llQ^)-w zgpwF$A{*O%z^7NtzqLyB=AW%Fv-bDK{S{`u`Eh}nvS4VW1>*SRWW}!~M;8=4%#y1e z4k-f(;fz>M^Rbf>&i=Rih+?j<_pe@D;O^H}nE8_xW?p{CVTM-E@Yj&AIoKk*Kk3RM zL?os!T$><+7im8w32Cq<0&YOt8e{nxyJ$SZYa;~<9e2gO###xd*2vg$K*Ttbz=%fII=rHnoG6qtRf#;d zLeZ_|0yqEYbAGu(&Krjh@W$hErJmx=L%nW z+5rFP+$SfIab{w3*H+bROS4mlQW1|@5+k7}*VpZfU%=ac@VGyRt4XA-E2KtV;m6P? ziM3NhT#i?k5HkQY+mmC-SJQl;?_PV`a8+UKf;t6T90VW`#Rw<_xD1oMzM9NizyE|k zjWegE7Ml7*rsxCclQdkeczkS&A*SWoz$kR2Sqr5bD3r5K>A1}{)saRS#dGe!%T9bQ zpH2dI(SB%|Ej?oR2b?>38)KkjPZWmu9xCOYmTahIe;KZ+CT4%KUNU#sm`uS;n!D8M zVlo)@Oqu8!;bgw)*s|DGx7AJ5IvR8DeY}%t9tc z<)%H8DQ7!Tn|}?{^xT>;WZ-vnBuyHv>3_UqJ2~3W9+aj-X5If_6HKY{Owv5;t^aZkN;O>#s~MaO^_XdfsAF=58p z62~xlmgQt5eXdq$F8D3u;Zdx7AaDR2FDj*GM<>UcZH>U@%x3LR&F0LsECGIE(nRKp z36ELpg0m*>7A)2+5Y%?DX1Q{i)%W9PbV@**inpD0bce8=H}+}$yDgGKG+(r!7^%=g z!T7O|425}3FrJojbP(p8Ng2HTS*(}|iI}3S2@m#t&E+6#73l~WjdZQzs$GvrT+9oN zVV2q`8h~mGB7`I?7u;p)J`FgXYQDAyXNHl)?7->$5YA?Ohj!!vGfuPo(Co@IYVls4 zp~r znH75w7k{?@i#1JF1!+z^V1$Z=cH~U7*mHf>lCf3J!~#TfH4OAAijcg7tc+Cw^>k@v zv;Y-k&_SW7Mx8A!r65S!XtmakMys-N;Ay!+N~B)Z4k5F z+Br4Gz2e>EB^oI$R#4JIA)ADkglz;YH4`+cLpUL0vy4mR1H#i4gnskWWpF2_NG%dBKcJm?2x&bZcjz&m}IBL~q)nIQtvC@U{K?m{n$kD(qgmH@9 z0Ut-ipyRckH&Hs(nGQzjV!R9_zfnPOGI!)n9PAaPu>R%@;W7d9%u9>w(D@;xHcduE z6bbHO7G7Iox%e+Ze2XDHmt{?2=oTK5vG5}cuo$drd-k#5{Bd@kh|)zem$j0@?W74} zeQbjOJ1(^8Lk#-ZX*!)D#JWsY4FQ3H=)fwfP^6=t)R~Ofj9~rN&IHZWa!1#ob0%st zonYkUSY#b2l`y_lM^^nR3UJOM=Rvc-j5gG9mC5UDvpG8r2SWkcRuZg3iMEFkh47nu zs4>XX09TO|K7j61YD^WTYIFjgVvS1PJ}O$NX_af=IpFPpd^%NXetrO|Fgjg?!UHXf zP!f^N&RmZQLv4zr{7B&my3UbAA*)w|e#CI(TFnC@T-hz*lO{7r?@TmEW$CZMurMcd zy?Nz?ox&QlZ%B}VxU}80M~G?d1;o`-z?pGGtj*zVrL!NGE59Ry;I`Ok$(s5G=4c4Z z&V<`JyM&{hm-mG#pknP--`m2J$$f(&Z3tZ`I@l{&&n8wYjOawhG|C!d-fNj|iv@#O zFf~;ycs%nuh05n9A)#piuS|DzoC|AEJc~AJ)-~|nCt;i3vktBx$)0ICzayD&YEV(5Srqz`*iOTp=@c%uYrK-F*=G`#mXm0 z$mpO=NaE?F;i~bYgrjYd;n-1c72jEJE;G#Q@KWG)=0xZ)v?bsHf!03JI}Ypv+?DDu zLX3!ph`gyd$v{RNEPFs5aP(TFBJ&(=PqfYn5^o{1#_;z0kzoqqfLmYtcYF4|NAQKU z$Q^LguI+RCNtOWvsdpJlfbWJDq05k@e@0 z70UF-GfFO{P19Ex@o5c3+DHgtJJW<{C-~w%^7D@y!`HlT>vLQogy?IcLH(GWsD$`O(8b-#;FYrYj^a?R=%k$B; z;rv)qj+m>IE##F6Ptk837?#6W%{c}Ot1yQpva=A#fttxEBBF#vCMYI^a!ngJj?JZ< zYWFrN`pUOH>(`laKg_eC*_G%v7?Rrj{e$t0%=Hh`{-qrv_fGaShC*o+f2fi0WD??1Jcm*&aXk!K%$<_=V#oIWL&Pxsq)$$lOdqWn)m0cq|Yr(0EN7bZd+t zgPIGL&Px_FqtNXAVKD7zdnlG+xkMV}@;3u4TNJV!*H?z${pRD2jAe1Wc608Ocw6Jm zNBpzpbK`m|s~g$5Q{z%#zt-d(M*?s?GZ{|Ms#AE|1kmrMYB;95KnE6O&BT4$ab}%qU1eS= z)b>zy^Q)z=iqShAD9w%c6=ivg*lbZ}FT7f2oFOxj*~r+?k3rn0c)OgOcRCkYwAnMg zX=P!$=b%W$a4wqXoksZiT_l;qZ8>5%g0Ao{wGQMcEswNY$048qbDZnBR+8_v^TUV? zFgXj>7@j+vhf9b!F|!tQ&^6UCdG-z^jLm2KJWC=S^2IbRRyxK@pM~yFOS4fhg2JM< ztCHny8Z6Mc59m>b{PrAZEFF`Vokxy-=3<1E(qXMF7;1N#mZMC*qG+TTXqeZ6Oc*_Q zSbXrLvF$&~!m3L_vU`dRo!ARnhBbWS)V-`iV^nKefW-IaeMQFBaFb5x{AaTzS*jzN zIn7GQa5&D9SRSktjUHm5Q}iC*VN~$IFHUZV)%lgkuAf);4hJ6w5$zm`WuFy=_;A89 z38E}(@&$=E^l4L5(#-zcO zc@!^0m}uU$KQ%l@UyNVQd_H@b=|Dn7YCP$)7&{fx6tklRTU1ZNnJqYq_5B)u7*DOmgW#gt47#Z zx^kZNPEZ^*t{4XtR%9YW z<(o9ST21VQ6l|edl&hyG?Ni*J)(>*U&r&lj%M^k9t%A10K5PHJ4YdevUO^HX>Nn3Y zn2%B{CKrYuYqqk+3!g0~kfx^4(+u#we{`&MqB)U3?@0X5Mm51VF+)-J_N z4gIRD`Ts_&m*(d8nplUEFiqCci49r=;1Vib!PgckSSl~FOlfy&ctG8~JC}C3EEjl- zjm0lFH_f(DL0h$n3Oh+y_BqPvA{LoTCpc+!R;HFyuuZd(xIbR!4*fjOEoLAPD}A~j zX=;JYTg&Y{UY>u~-dUOX7IcMgT4GJDi%w1vp^0o_;i%`I^Hk;#Ea#J*d>1veS zxj%GT@I{(T>58!tRx)qB{16xT^R4c#5AVH?7uVc>=HTR#9x0hwAzwL4&XOej%PO3< zQf`)*HVZMY)+Y-IB|E`7tE9#Fez524iDOH+(0oNwOU1djzWvgj`2F>r#24?`y%+w| zzHqQz0++0m0k(F;M>@6Vs$Z0Wbw08g$1!tb)y|X1Zi4OH-!g@k6sOsh9nu-Jx$r~A zk%~6xd*}WIe(TP^*;{PGPBr}Z|x2*e-l}yCM;OSY`8O+~*RV2}8W%kQwWcGtd*YJSS^W!J3 zwio{HGk$Zm>syHLM@M$55m(La(;_RV7BjN?sZ(^YyS|Z{jjC8K-~-f zWp6zHANK6Zsi)T0i?$v2MMfke>6(b2@aogjtvX2nrc?Oc0bk{I&Hpi-mBdxsFW1+d zmGMt~V0d$Q^wO($n%)K$= zI^o0wPByL|4i(rg5xXBG0`s4D&Hk{oYx}zcW_*Jg8``eB?bhGVpFP$uQS=IH9`5v! z>ca*zzq2y_g?DXZ`m-y~-dwXU<%B*V#1umI`$aI{KH`D=lMCnKw6>aok*a zc*7#Z%Y8f>$A-BJv{(Lljz<2!>GxJ`zqLj)D+f1?|I!xCKz4HCQ_1N#xs cozYwRAM>ak5A>yRrT_o{07*qoM6N<$g587>V*mgE From a31c3ebc8334f931281cdb0a348150347c99d0e6 Mon Sep 17 00:00:00 2001 From: vercelInfrAI Date: Wed, 5 Feb 2025 15:31:16 +0800 Subject: [PATCH 052/262] feat: add deepseek models for novita ai --- gui/src/pages/AddNewModel/configs/models.ts | 54 +++++++++++++++++++ .../pages/AddNewModel/configs/providers.ts | 3 +- 2 files changed, 56 insertions(+), 1 deletion(-) diff --git a/gui/src/pages/AddNewModel/configs/models.ts b/gui/src/pages/AddNewModel/configs/models.ts index 3bd4c262d..607e466d9 100644 --- a/gui/src/pages/AddNewModel/configs/models.ts +++ b/gui/src/pages/AddNewModel/configs/models.ts @@ -37,6 +37,60 @@ export interface ModelPackage { } export const models: { [key: string]: ModelPackage } = { + deepseekV3Chat: { + title: "deepseek v3", + description: "A model from deekseek for chat", + refUrl: "", + params: { + title: "deepseek_v3", + model: "deepseek/deepseek_v3", + contextLength: 2048, + }, + icon: "deepseek.png", + dimensions: [ + { + name: "Parameter Count", + description: "The number of parameters in the model", + options: { + "r1": { + model: "deepseek/deepseek_v3", + title: "deepseek_v3", + } + }, + }, + ], + providerOptions: [ + "novita" + ], + isOpenSource: true, + }, + deepseekR1Chat: { + title: "deepseek r1", + description: "A model from deekseek for chat", + refUrl: "", + params: { + title: "deepseek-r1", + model: "deepseek/deepseek-r1", + contextLength: 2048, + }, + icon: "deepseek.png", + dimensions: [ + { + name: "Parameter Count", + description: "The number of parameters in the model", + options: { + "r1": { + model: "deepseek/deepseek-r1", + title: "deepseek-r1", + } + }, + }, + ], + providerOptions: [ + "novita" + ], + isOpenSource: true, + }, llama318BChat: { title: "Llama 3.1 8B", description: "A model from Meta, fine-tuned for chat", diff --git a/gui/src/pages/AddNewModel/configs/providers.ts b/gui/src/pages/AddNewModel/configs/providers.ts index bf6fe735d..604f1a108 100644 --- a/gui/src/pages/AddNewModel/configs/providers.ts +++ b/gui/src/pages/AddNewModel/configs/providers.ts @@ -427,7 +427,8 @@ Select the \`GPT-4o\` model below to complete your provider configuration, but n }, ...completionParamsInputsConfigs, ], - packages: [models.llama318BChat, models.mistralChat].map((p) => { + packages: [models.llama318BChat, models.mistralChat, + models.deepseekR1Chat, models.deepseekV3Chat].map((p) => { p.params.contextLength = 4096; return p; }), From f7e4e34ac52511d15c60409ed50c2e3fb304af4b Mon Sep 17 00:00:00 2001 From: Piotr Czekaj Date: Wed, 5 Feb 2025 11:08:57 +0100 Subject: [PATCH 053/262] Fix contradictory instruction in .continuerules docs --- docs/docs/customize/deep-dives/rules.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/customize/deep-dives/rules.md b/docs/docs/customize/deep-dives/rules.md index f53135b50..ae8347f29 100644 --- a/docs/docs/customize/deep-dives/rules.md +++ b/docs/docs/customize/deep-dives/rules.md @@ -12,7 +12,7 @@ You can create a project-specific system message by adding a `.continuerules` fi - If you want concise answers: ```title=.continuerules -Please provide concise answers. Do explain obvious concepts. You can assume that I am knowledgable about most programming topics. +Please provide concise answers. Don't explain obvious concepts. You can assume that I am knowledgable about most programming topics. ``` - If you want to ensure certain practices are followed, for example in React: From d5b51fe38e038e97948982984cec30878d1494b8 Mon Sep 17 00:00:00 2001 From: ferenci84 Date: Wed, 5 Feb 2025 17:38:58 +0100 Subject: [PATCH 054/262] update completion provider to handle alternating diff patterns --- .../vscode/src/autocomplete/completionProvider.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/extensions/vscode/src/autocomplete/completionProvider.ts b/extensions/vscode/src/autocomplete/completionProvider.ts index c10d4d5f1..f7ddf82f5 100644 --- a/extensions/vscode/src/autocomplete/completionProvider.ts +++ b/extensions/vscode/src/autocomplete/completionProvider.ts @@ -280,8 +280,14 @@ export class ContinueCompletionProvider document.lineAt(startPos).range.end, ); } else if ( - diffPatternMatches(diffs, ["+", "-"]) || - diffPatternMatches(diffs, ["-", "+"]) + //diffPatternMatches(diffs, ["+", "-"]) || + //diffPatternMatches(diffs, ["-", "+"]) + diffs.every((diff, index) => + index % 2 === 0 ? diff.added : diff.removed + ) || + diffs.every((diff, index) => + index % 2 === 0 ? diff.removed : diff.added + ) ) { // We are midline and the model just inserted without repeating to the end of the line // We want to move the cursor to the end of the line From aaae90417b6344cc31b556e9f1231cab0f6b1fc0 Mon Sep 17 00:00:00 2001 From: ferenci84 Date: Wed, 5 Feb 2025 18:11:38 +0100 Subject: [PATCH 055/262] update completion logic to handle midline insertions more accurately in completionProvider.ts --- .../vscode/src/autocomplete/completionProvider.ts | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/extensions/vscode/src/autocomplete/completionProvider.ts b/extensions/vscode/src/autocomplete/completionProvider.ts index f7ddf82f5..aca4c5478 100644 --- a/extensions/vscode/src/autocomplete/completionProvider.ts +++ b/extensions/vscode/src/autocomplete/completionProvider.ts @@ -41,8 +41,7 @@ interface VsCodeCompletionInput { } export class ContinueCompletionProvider - implements vscode.InlineCompletionItemProvider -{ + implements vscode.InlineCompletionItemProvider { private onError(e: any) { const options = ["Documentation"]; if (e.message.includes("Ollama may not be installed")) { @@ -280,14 +279,8 @@ export class ContinueCompletionProvider document.lineAt(startPos).range.end, ); } else if ( - //diffPatternMatches(diffs, ["+", "-"]) || - //diffPatternMatches(diffs, ["-", "+"]) - diffs.every((diff, index) => - index % 2 === 0 ? diff.added : diff.removed - ) || - diffs.every((diff, index) => - index % 2 === 0 ? diff.removed : diff.added - ) + diffPatternMatches(diffs, ["+", "-"]) || + diffPatternMatches(diffs, ["-", "+"]) ) { // We are midline and the model just inserted without repeating to the end of the line // We want to move the cursor to the end of the line @@ -310,7 +303,7 @@ export class ContinueCompletionProvider } else { // If the first part of the diff isn't an insertion, then the model is // probably rewriting other parts of the line - return undefined; + // return undefined; - Let's assume it's simply an insertion } } } else { From 3366ee2866afc60d8e37d0b1ae14c2df8cbfc8b1 Mon Sep 17 00:00:00 2001 From: Nate Date: Wed, 5 Feb 2025 09:54:11 -0800 Subject: [PATCH 056/262] bump version --- extensions/vscode/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/vscode/package.json b/extensions/vscode/package.json index 815401124..5ef76d3dc 100644 --- a/extensions/vscode/package.json +++ b/extensions/vscode/package.json @@ -2,7 +2,7 @@ "name": "continue", "icon": "media/icon.png", "author": "Continue Dev, Inc", - "version": "0.9.260", + "version": "0.9.261", "repository": { "type": "git", "url": "https://github.com/continuedev/continue" From 0c2de5cb5fa744895436d2a70d1d8d90c58befca Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Wed, 5 Feb 2025 10:38:38 -0800 Subject: [PATCH 057/262] update tutorial files --- .../ContinuePluginStartupActivity.kt | 8 +++++ .../src/main/resources/continue_tutorial.java | 19 +++++++++--- .../src/main/resources/continue_tutorial.py | 29 ++++++++++++++----- .../src/main/resources/continue_tutorial.ts | 23 +++++++++++---- extensions/vscode/src/util/tutorial.ts | 7 ++++- 5 files changed, 68 insertions(+), 18 deletions(-) diff --git a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/activities/ContinuePluginStartupActivity.kt b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/activities/ContinuePluginStartupActivity.kt index 72819421a..bae7857a4 100644 --- a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/activities/ContinuePluginStartupActivity.kt +++ b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/activities/ContinuePluginStartupActivity.kt @@ -47,7 +47,15 @@ fun showTutorial(project: Project) { throw IOException("Resource not found: $tutorialFileName") } var content = StreamUtil.readText(`is`, StandardCharsets.UTF_8) + + // All jetbrains will use J instead of L + content = content.replace("[Cmd + L]", "[Cmd + J]") + content = content.replace("[Cmd + Shift + L]", "[Cmd + Shift + J]") + if (!System.getProperty("os.name").lowercase().contains("mac")) { + content = content.replace("[Cmd + J]", "[Ctrl + J]") + content = content.replace("[Cmd + Shift + J]", "[Ctrl + Shift + J]") + content = content.replace("[Cmd + I]", "[Ctrl + I]") content = content.replace("⌘", "⌃") } val filepath = Paths.get(getContinueGlobalPath(), tutorialFileName).toString() diff --git a/extensions/intellij/src/main/resources/continue_tutorial.java b/extensions/intellij/src/main/resources/continue_tutorial.java index 808f51021..ace69a67d 100644 --- a/extensions/intellij/src/main/resources/continue_tutorial.java +++ b/extensions/intellij/src/main/resources/continue_tutorial.java @@ -7,11 +7,18 @@ // Chat, Edit, and Autocomplete tutorial // +// ———————————————————————————————————————————————— Setup ————————————————————————————————————————————————- + +// First, open the Continue sidebar by pressing [Cmd + L] or clicking the Continue icon. + +// See an example at https://docs.continue.dev/getting-started/install + +// Follow the instructions in the sidebar to setup models for Chat and Autocomplete. // ————————————————————————————————————————————————— Chat ————————————————————————————————————————————————— // Highlight the code below -// Press [Cmd/Ctrl + J] to add to Chat +// Press [Cmd + L] to add to Chat // Try asking Continue "what sorting algorithm is this?" public static int[] sortingAlgorithm(int[] x) { for (int i = 0; i < x.length; i++) { @@ -26,10 +33,13 @@ public static int[] sortingAlgorithm(int[] x) { return x; } +// [Cmd + L] always starts a new chat. Now, try the same thing using [Cmd + Shift + L]. +// This will add the code into the current chat + // ————————————————————————————————————————————————— Edit ————————————————————————————————————————————————— // Highlight the code below -// Press [Cmd/Ctrl + I] to Edit +// Press [Cmd + I] to Edit // Try asking Continue to "make this more readable" public static int[] sortingAlgorithm2(int[] x) { for (int i = 0; i < x.length; i++) { @@ -46,10 +56,11 @@ public static int[] sortingAlgorithm2(int[] x) { // ————————————————————————————————————————————— Autocomplete —————————————————————————————————————————————— -// Place cursor after `sortingAlgorithm...` below and press [Enter] +// Place cursor after `sortingAlgorithm:` below and press [Enter] // Press [Tab] to accept the Autocomplete suggestion -// Basic assertion for sortingAlgorithm... +// Basic assertion for sortingAlgorithm: + // —————————————————— Learn more at https://docs.continue.dev/getting-started/overview ——————————————————— diff --git a/extensions/intellij/src/main/resources/continue_tutorial.py b/extensions/intellij/src/main/resources/continue_tutorial.py index 16a297c16..0b526993d 100644 --- a/extensions/intellij/src/main/resources/continue_tutorial.py +++ b/extensions/intellij/src/main/resources/continue_tutorial.py @@ -7,11 +7,18 @@ Chat, Edit, and Autocomplete tutorial """ +# ———————————————————————————————————————————————— Setup ————————————————————————————————————————————————- -# ————————————————————————————————————————————————— Chat ————————————————————————————————————————————————— # +# First, open the Continue sidebar by pressing [Cmd + L] or clicking the Continue icon. + +# See an example at https://docs.continue.dev/getting-started/install + +# Follow the instructions in the sidebar to set up models for Chat and Autocomplete. + +# ————————————————————————————————————————————————— Chat ————————————————————————————————————————————————— ## Highlight the code below -## Press [Cmd/Ctrl + J] to add to Chat +## Press [Cmd + L] to add to Chat ## Try asking Continue "what sorting algorithm is this?" def sorting_algorithm(x): for i in range(len(x)): @@ -20,11 +27,13 @@ def sorting_algorithm(x): x[j], x[j + 1] = x[j + 1], x[j] return x +# [Cmd + L] always starts a new chat. Now, try the same thing using [Cmd + Shift + L]. +# This will add the code into the current chat -# ————————————————————————————————————————————————— Edit ————————————————————————————————————————————————— # +# ————————————————————————————————————————————————— Edit ————————————————————————————————————————————————— ## Highlight the code below -## Press [Cmd/Ctrl + I] to Edit +## Press [Cmd + I] to Edit ## Try asking Continue to "make this more readable" def sorting_algorithm(x): for i in range(len(x)): @@ -33,12 +42,16 @@ def sorting_algorithm(x): x[j], x[j + 1] = x[j + 1], x[j] return x -# ————————————————————————————————————————————— Autocomplete —————————————————————————————————————————————— # +# ————————————————————————————————————————————— Autocomplete —————————————————————————————————————————————— -## Place cursor after `sorting_algorithm...` below and press [Enter] +## Place cursor after `sorting_algorithm:` below and press [Enter] ## Press [Tab] to accept the Autocomplete suggestion -# Basic assertion for sorting_algorithm... +# Basic assertion for sorting_algorithm: -# —————————————————— Learn more at https://docs.continue.dev/getting-started/overview ——————————————————— # + + +# —————————————————————————————————————————————- Learn More -—————————————————————————————————————————————— + +# Visit the Continue Docs at https://docs.continue.dev/getting-started/overview diff --git a/extensions/intellij/src/main/resources/continue_tutorial.ts b/extensions/intellij/src/main/resources/continue_tutorial.ts index 1f4714249..9d6271e57 100644 --- a/extensions/intellij/src/main/resources/continue_tutorial.ts +++ b/extensions/intellij/src/main/resources/continue_tutorial.ts @@ -7,10 +7,18 @@ // Chat, Edit, and Autocomplete tutorial // +// ———————————————————————————————————————————————— Setup ————————————————————————————————————————————————- + +// First, open the Continue sidebar by pressing [Cmd + L] or clicking the Continue icon. + +// See an example at https://docs.continue.dev/getting-started/install + +// Follow the instructions in the sidebar to set up models for Chat and Autocomplete. + // ————————————————————————————————————————————————— Chat ————————————————————————————————————————————————— // Highlight the code below -// Press [Cmd/Ctrl + J] to add to Chat +// Press [Cmd + L] to add to Chat // Try asking Continue "what sorting algorithm is this?" function sortingAlgorithm(x: number[]): number[] { for (let i = 0; i < x.length; i++) { @@ -25,10 +33,13 @@ function sortingAlgorithm(x: number[]): number[] { return x; } +// [Cmd + L] always starts a new chat. Now, try the same thing using [Cmd + Shift + L]. +// This will add the code into the current chat + // ————————————————————————————————————————————————— Edit ————————————————————————————————————————————————— // Highlight the code below -// Press [Cmd/Ctrl + I] to Edit +// Press [Cmd + I] to Edit // Try asking Continue to "make this more readable" function sortingAlgorithm2(x: number[]): number[] { for (let i = 0; i < x.length; i++) { @@ -45,9 +56,11 @@ function sortingAlgorithm2(x: number[]): number[] { // ————————————————————————————————————————————— Autocomplete —————————————————————————————————————————————— -// Place cursor after `sortingAlgorithm...` below and press [Enter] +// Place cursor after `sortingAlgorithm:` below and press [Enter] // Press [Tab] to accept the Autocomplete suggestion -// Basic assertion for sortingAlgorithm... +// Basic assertion for sortingAlgorithm: -// —————————————————— Learn more at https://docs.continue.dev/getting-started/overview ——————————————————— +// —————————————————————————————————————————————- Learn More -—————————————————————————————————————————————— + +// Visit the Continue Docs at https://docs.continue.dev/getting-started/overview diff --git a/extensions/vscode/src/util/tutorial.ts b/extensions/vscode/src/util/tutorial.ts index 45a86a675..6557b5790 100644 --- a/extensions/vscode/src/util/tutorial.ts +++ b/extensions/vscode/src/util/tutorial.ts @@ -16,7 +16,12 @@ export async function showTutorial(ide: IDE) { // Ensure keyboard shortcuts match OS if (process.platform !== "darwin") { let tutorialContent = await ide.readFile(tutorialUri.toString()); - tutorialContent = tutorialContent.replace("⌘", "^").replace("Cmd", "Ctrl"); + tutorialContent = tutorialContent + .replaceAll("[Cmd + L]", "[Ctrl + L]") + .replaceAll("[Cmd + Shift + L]", "[Ctrl + Shift + L]") + .replaceAll("[Cmd + I]", "[Ctrl + I]") + .replaceAll("⌘", "^"); + await ide.writeFile(tutorialUri.toString(), tutorialContent); } From ed690c72576de1eee0dc4e4e78b74ab1b4cb6bcd Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Wed, 5 Feb 2025 10:39:52 -0800 Subject: [PATCH 058/262] tutorial file unify --- extensions/intellij/src/main/resources/continue_tutorial.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/extensions/intellij/src/main/resources/continue_tutorial.java b/extensions/intellij/src/main/resources/continue_tutorial.java index ace69a67d..a0cb9fa5d 100644 --- a/extensions/intellij/src/main/resources/continue_tutorial.java +++ b/extensions/intellij/src/main/resources/continue_tutorial.java @@ -63,4 +63,6 @@ public static int[] sortingAlgorithm2(int[] x) { -// —————————————————— Learn more at https://docs.continue.dev/getting-started/overview ——————————————————— +// —————————————————————————————————————————————- Learn More -—————————————————————————————————————————————— + +// Visit the Continue Docs at https://docs.continue.dev/getting-started/overview From 0728b17cdb5b9433ffa8e031cb6aa570afa55d8d Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Wed, 5 Feb 2025 11:38:46 -0800 Subject: [PATCH 059/262] tutorial copy updates --- extensions/intellij/src/main/resources/continue_tutorial.java | 2 +- extensions/intellij/src/main/resources/continue_tutorial.py | 2 +- extensions/intellij/src/main/resources/continue_tutorial.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/extensions/intellij/src/main/resources/continue_tutorial.java b/extensions/intellij/src/main/resources/continue_tutorial.java index a0cb9fa5d..e566b14ce 100644 --- a/extensions/intellij/src/main/resources/continue_tutorial.java +++ b/extensions/intellij/src/main/resources/continue_tutorial.java @@ -13,7 +13,7 @@ // See an example at https://docs.continue.dev/getting-started/install -// Follow the instructions in the sidebar to setup models for Chat and Autocomplete. +// Follow the instructions in the sidebar to set up a Chat/Edit modela and an Autocomplete model. // ————————————————————————————————————————————————— Chat ————————————————————————————————————————————————— diff --git a/extensions/intellij/src/main/resources/continue_tutorial.py b/extensions/intellij/src/main/resources/continue_tutorial.py index 0b526993d..4670772df 100644 --- a/extensions/intellij/src/main/resources/continue_tutorial.py +++ b/extensions/intellij/src/main/resources/continue_tutorial.py @@ -13,7 +13,7 @@ # See an example at https://docs.continue.dev/getting-started/install -# Follow the instructions in the sidebar to set up models for Chat and Autocomplete. +# Follow the instructions in the sidebar to set up a Chat/Edit modela and an Autocomplete model. # ————————————————————————————————————————————————— Chat ————————————————————————————————————————————————— diff --git a/extensions/intellij/src/main/resources/continue_tutorial.ts b/extensions/intellij/src/main/resources/continue_tutorial.ts index 9d6271e57..4cde323ca 100644 --- a/extensions/intellij/src/main/resources/continue_tutorial.ts +++ b/extensions/intellij/src/main/resources/continue_tutorial.ts @@ -13,7 +13,7 @@ // See an example at https://docs.continue.dev/getting-started/install -// Follow the instructions in the sidebar to set up models for Chat and Autocomplete. +// Follow the instructions in the sidebar to set up a Chat/Edit modela and an Autocomplete model. // ————————————————————————————————————————————————— Chat ————————————————————————————————————————————————— From 4f088a2d0ba7b85715f9ee4c191d724cce9b9f58 Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Wed, 5 Feb 2025 11:46:11 -0800 Subject: [PATCH 060/262] padding between consecutive codeblocks --- gui/src/components/markdown/StepContainerPreActionButtons.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gui/src/components/markdown/StepContainerPreActionButtons.tsx b/gui/src/components/markdown/StepContainerPreActionButtons.tsx index 641e17c13..5cb33d939 100644 --- a/gui/src/components/markdown/StepContainerPreActionButtons.tsx +++ b/gui/src/components/markdown/StepContainerPreActionButtons.tsx @@ -84,7 +84,7 @@ export default function StepContainerPreActionButtons({ tabIndex={-1} onMouseEnter={() => setHovering(true)} onMouseLeave={() => setHovering(false)} - className="bg-vsc-editor-background border-vsc-input-border relative rounded-md border-[1px] border-solid" + className="bg-vsc-editor-background border-vsc-input-border relative my-2.5 rounded-md border-[1px] border-solid" >
{children}
{hovering && !isStreaming && ( From bcf2ac9ebf68f11e3705b96c6d9575e7b8d74216 Mon Sep 17 00:00:00 2001 From: Nate Date: Wed, 5 Feb 2025 13:32:35 -0800 Subject: [PATCH 061/262] revert package.json dep changes --- extensions/vscode/package.json | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/extensions/vscode/package.json b/extensions/vscode/package.json index a2dafa82d..35d360a67 100644 --- a/extensions/vscode/package.json +++ b/extensions/vscode/package.json @@ -703,7 +703,6 @@ "ncp": "^2.0.0", "node-fetch": "^3.3.2", "node-machine-id": "^1.1.12", - "partial-json": "^0.1.7", "posthog-node": "^3.6.3", "react-markdown": "^8.0.7", "react-redux": "^8.0.5", @@ -720,7 +719,6 @@ "vectordb": "^0.4.20", "vscode-languageclient": "^8.0.2", "ws": "^8.13.0", - "yarn": "^1.22.21", - "zod": "^3.24.1" + "yarn": "^1.22.21" } } From ee8634453ed6c11b36385aecfcf9b3df4b765eee Mon Sep 17 00:00:00 2001 From: Nate Date: Wed, 5 Feb 2025 13:50:06 -0800 Subject: [PATCH 062/262] comment out toast --- core/config/migrateSharedConfig.ts | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/core/config/migrateSharedConfig.ts b/core/config/migrateSharedConfig.ts index b68e3adec..189bb21ed 100644 --- a/core/config/migrateSharedConfig.ts +++ b/core/config/migrateSharedConfig.ts @@ -1,13 +1,9 @@ -import * as fs from "fs"; - -import * as JSONC from "comment-json"; - -import { IDE, SerializedContinueConfig } from ".."; -import { SharedConfigSchema } from "./sharedConfig"; +import { IDE } from ".."; +import { deduplicateArray } from "../util"; import { GlobalContext } from "../util/GlobalContext"; import { editConfigJson } from "../util/paths"; import { resolveSerializedConfig } from "./load"; -import { deduplicateArray } from "../util"; +import { SharedConfigSchema } from "./sharedConfig"; /* This migration function eliminates deprecated values from the json file @@ -201,10 +197,10 @@ export function migrateJsonSharedConfig(filepath: string, ide: IDE): void { if (effected) { new GlobalContext().updateSharedConfig(shareConfigUpdates); editConfigJson(() => config); - void ide.showToast( - "warning", - "Migrated deprecated Continue JSON settings. Edit in the Settings Page", - ); + // void ide.showToast( + // "warning", + // "Migrated deprecated Continue JSON settings. Edit in the Settings Page", + // ); } } catch (e) { throw new Error(`Migration: Failed to parse config.json: ${e}`); From b8098c8ff159076e3338f2dbbf43e641041f6220 Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Wed, 5 Feb 2025 14:02:33 -0800 Subject: [PATCH 063/262] osr context menu --- gui/src/components/Layout.tsx | 2 + gui/src/components/OSRContextMenu.tsx | 100 ++++++++++++++++++++++++++ 2 files changed, 102 insertions(+) create mode 100644 gui/src/components/OSRContextMenu.tsx diff --git a/gui/src/components/Layout.tsx b/gui/src/components/Layout.tsx index 747c2ddab..94a9fb616 100644 --- a/gui/src/components/Layout.tsx +++ b/gui/src/components/Layout.tsx @@ -23,6 +23,7 @@ import { AuthProvider } from "../context/Auth"; import { exitEditMode } from "../redux/thunks"; import { loadLastSession, saveCurrentSession } from "../redux/thunks/session"; import { incrementFreeTrialCount } from "../util/freeTrial"; +import OSRContextMenu from "./OSRContextMenu"; const LayoutTopDiv = styled(CustomScrollbarDiv)` height: 100%; @@ -261,6 +262,7 @@ const Layout = () => { return ( +
{ + const ideMessenger = useContext(IdeMessengerContext); + + const [position, setPosition] = useState<{ + top?: number; + left?: number; + bottom?: number; + right?: number; + } | null>(null); + const menuRef = React.useRef(null); + + const isOSREnabled = useIsOSREnabled(); + useEffect(() => { + function leaveWindowHandler(event: MouseEvent) { + setPosition(null); + } + function contextMenuHandler(event: MouseEvent) { + event.preventDefault(); + } + function rightClickHandler(event: MouseEvent) { + if (!menuRef.current?.contains(event.target as Node)) { + setPosition(null); + } + if (event.button === 2) { + event.preventDefault(); + + // always open towards inside of window from click + const toRight = event.clientX > window.innerWidth / 2; + const toBottom = event.clientY > window.innerHeight / 2; + if (toRight) { + if (toBottom) { + setPosition({ + bottom: window.innerHeight - event.clientY, + right: window.innerWidth - event.clientX, + }); + } else { + setPosition({ + top: event.clientY, + right: window.innerWidth - event.clientX, + }); + } + } else { + if (toBottom) { + setPosition({ + bottom: window.innerHeight - event.clientY, + left: event.clientX, + }); + } else { + setPosition({ + top: event.clientY, + left: event.clientX, + }); + } + } + } + } + + if (isOSREnabled) { + document.addEventListener("mouseleave", leaveWindowHandler); + document.addEventListener("contextmenu", contextMenuHandler); + document.addEventListener("mousedown", rightClickHandler); + } + + return () => { + document.removeEventListener("mouseleave", leaveWindowHandler); + document.removeEventListener("contextmenu", contextMenuHandler); + document.removeEventListener("mousedown", rightClickHandler); + }; + }, [isOSREnabled, menuRef]); + + if (!position) { + return null; + } + return ( +
+
{ + e.stopPropagation(); + ideMessenger.post("toggleDevTools", undefined); + }} + > + Toggle Dev Tools +
+
+ ); +}; + +export default OSRContextMenu; From 4106405b78641703763a95714bb7e1d969630200 Mon Sep 17 00:00:00 2001 From: Nate Date: Wed, 5 Feb 2025 15:10:16 -0800 Subject: [PATCH 064/262] remove unused workspace switcher --- extensions/vscode/package-lock.json | 6 +- gui/package-lock.json | 2 +- gui/src/components/AccountDialog.tsx | 110 +++++----- gui/src/components/ProfileSwitcher.tsx | 271 ------------------------- gui/src/context/Auth.tsx | 8 +- 5 files changed, 58 insertions(+), 339 deletions(-) delete mode 100644 gui/src/components/ProfileSwitcher.tsx diff --git a/extensions/vscode/package-lock.json b/extensions/vscode/package-lock.json index 78a61be2b..2d0215b19 100644 --- a/extensions/vscode/package-lock.json +++ b/extensions/vscode/package-lock.json @@ -1,12 +1,12 @@ { "name": "continue", - "version": "0.9.260", + "version": "0.9.261", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "continue", - "version": "0.9.260", + "version": "0.9.261", "license": "Apache-2.0", "dependencies": { "@continuedev/fetch": "^1.0.3", @@ -106,7 +106,7 @@ "@aws-sdk/client-sagemaker-runtime": "^3.621.0", "@aws-sdk/credential-providers": "^3.620.1", "@continuedev/config-types": "^1.0.13", - "@continuedev/config-yaml": "^1.0.23", + "@continuedev/config-yaml": "^1.0.24", "@continuedev/fetch": "^1.0.4", "@continuedev/llm-info": "^1.0.2", "@continuedev/openai-adapters": "^1.0.10", diff --git a/gui/package-lock.json b/gui/package-lock.json index 0984ae74d..e77dcafc9 100644 --- a/gui/package-lock.json +++ b/gui/package-lock.json @@ -108,7 +108,7 @@ "@aws-sdk/client-sagemaker-runtime": "^3.621.0", "@aws-sdk/credential-providers": "^3.620.1", "@continuedev/config-types": "^1.0.13", - "@continuedev/config-yaml": "^1.0.23", + "@continuedev/config-yaml": "^1.0.24", "@continuedev/fetch": "^1.0.4", "@continuedev/llm-info": "^1.0.2", "@continuedev/openai-adapters": "^1.0.10", diff --git a/gui/src/components/AccountDialog.tsx b/gui/src/components/AccountDialog.tsx index 2b8e17ae4..8c5dbfd7f 100644 --- a/gui/src/components/AccountDialog.tsx +++ b/gui/src/components/AccountDialog.tsx @@ -53,19 +53,6 @@ export default function AccountDialog() { ); } - if (!controlServerBetaEnabled) { - return ( -
-

Account

-

- Continue For Teams is not enabled. You can enable it in your IDE - settings. -

-

Using local config.

-
- ); - } - const dispatch = useDispatch(); const changeProfileId = (id: string) => { @@ -82,60 +69,63 @@ export default function AccountDialog() { "Signed in" ) : ( <> - Signed in as{" "} - {session.account.label} + Signed in as {session.account.id} )}
-
- Current workspace + {controlServerBetaEnabled && ( +
+ Current workspace - - {({ open }) => ( -
- - {selectedProfile?.title} -
-
-
+ + {({ open }) => ( +
+ + + {selectedProfile?.title} + +
+
+
- - - {profiles.map((option, idx) => ( - - - {option.title} - - - ))} - {profiles.length === 0 && ( -
- No workspaces found -
- )} -
-
-
- )} -
-
+ + + {profiles.map((option, idx) => ( + + + {option.title} + + + ))} + {profiles.length === 0 && ( +
+ No workspaces found +
+ )} +
+
+
+ )} + +
+ )}
diff --git a/gui/src/components/ProfileSwitcher.tsx b/gui/src/components/ProfileSwitcher.tsx deleted file mode 100644 index 0cecdf815..000000000 --- a/gui/src/components/ProfileSwitcher.tsx +++ /dev/null @@ -1,271 +0,0 @@ -import { Listbox, Transition } from "@headlessui/react"; -import { - ChevronUpDownIcon, - UserCircleIcon as UserCircleIconOutline, -} from "@heroicons/react/24/outline"; -import { UserCircleIcon as UserCircleIconSolid } from "@heroicons/react/24/solid"; -import { ProfileDescription } from "core/config/ConfigHandler"; -import { Fragment, useContext, useEffect, useState } from "react"; -import ReactDOM from "react-dom"; -import { useDispatch } from "react-redux"; -import styled from "styled-components"; -import { - defaultBorderRadius, - lightGray, - vscBackground, - vscForeground, - vscInputBackground, - vscListActiveBackground, - vscListActiveForeground, -} from "."; -import { useAuth } from "../context/Auth"; -import { IdeMessengerContext } from "../context/IdeMessenger"; -import { useWebviewListener } from "../hooks/useWebviewListener"; -import { useAppSelector } from "../redux/hooks"; -import { setLastControlServerBetaEnabledStatus } from "../redux/slices/miscSlice"; -import { getFontSize } from "../util"; -import HeaderButtonWithToolTip from "./gui/HeaderButtonWithToolTip"; - -const StyledListbox = styled(Listbox)` - background-color: ${vscBackground}; - min-width: 80px; -`; - -const StyledListboxButton = styled(Listbox.Button)` - position: relative; - cursor: pointer; - background-color: ${vscBackground}; - text-align: left; - border: none; - margin: 0; - height: 100%; - width: 100%; - max-width: 180px; - white-space: nowrap; - overflow: hidden; - - border: 0.5px solid ${lightGray}; - border-radius: ${defaultBorderRadius}; - - display: grid; - grid-template-columns: 1fr auto; - align-items: center; - - color: ${vscForeground}; - - padding: 3px 6px; - - &:focus { - outline: none; - } - - &:hover { - background-color: ${vscInputBackground}; - } - - font-size: ${getFontSize() - 2}px; -`; - -const StyledListboxOptions = styled(Listbox.Options)` - background-color: ${vscInputBackground}; - padding: 0; - - position: absolute; - bottom: calc(100% - 16px); - max-width: 100%; - max-height: 80vh; - - border-radius: ${defaultBorderRadius}; - overflow-y: scroll; -`; - -const StyledListboxOption = styled(Listbox.Option)<{ selected: boolean }>` - background-color: ${({ selected }) => - selected ? vscListActiveBackground : vscInputBackground}; - cursor: pointer; - padding: 6px 8px; - - &:hover { - background-color: ${vscListActiveBackground}; - color: ${vscListActiveForeground}; - } -`; - -function ListBoxOption({ - option, - idx, - showDelete, - selected, -}: { - option: ProfileDescription; - idx: number; - showDelete?: boolean; - selected: boolean; -}) { - const [hovered, setHovered] = useState(false); - - return ( - { - setHovered(true); - }} - onMouseLeave={() => { - setHovered(false); - }} - > -
- {option.title} -
-
- ); -} - -function ProfileSwitcher() { - const ideMessenger = useContext(IdeMessengerContext); - const { session, logout, login } = useAuth(); - const [profiles, setProfiles] = useState([]); - - const dispatch = useDispatch(); - const lastControlServerBetaEnabledStatus = useAppSelector( - (state) => state.misc.lastControlServerBetaEnabledStatus, - ); - - const selectedProfileId = useAppSelector( - (store) => store.session.selectedProfileId, - ); - - const [controlServerBetaEnabled, setControlServerBetaEnabled] = - useState(false); - - useEffect(() => { - ideMessenger.ide.getIdeSettings().then(({ enableControlServerBeta }) => { - setControlServerBetaEnabled(enableControlServerBeta); - dispatch(setLastControlServerBetaEnabledStatus(enableControlServerBeta)); - - const shouldShowPopup = - !lastControlServerBetaEnabledStatus && enableControlServerBeta; - }); - }, []); - - useWebviewListener( - "didChangeIdeSettings", - async (msg) => { - const { settings } = msg; - setControlServerBetaEnabled(settings.enableControlServerBeta); - dispatch( - setLastControlServerBetaEnabledStatus(settings.enableControlServerBeta), - ); - }, - [], - ); - - useEffect(() => { - ideMessenger - .request("config/listProfiles", undefined) - .then( - (result) => result.status === "success" && setProfiles(result.content), - ); - }, []); - - useWebviewListener( - "didChangeAvailableProfiles", - async (data) => { - setProfiles(data.profiles); - }, - [], - ); - - const topDiv = document.getElementById("profile-select-top-div"); - - function selectedProfile() { - return profiles.find((p) => p.id === selectedProfileId); - } - - return ( - <> - {controlServerBetaEnabled && session?.account?.id && ( - { - ideMessenger.post("didChangeSelectedProfile", { id }); - }} - > -
- - {selectedProfile()?.title} -
-
-
- {topDiv && - ReactDOM.createPortal( - - - {profiles.map((option, idx) => ( - 1} - /> - ))} -
- {profiles.length === 0 ? ( - No workspaces found - ) : ( - "Select workspace" - )} -
-
-
, - topDiv, - )} -
-
- )} - - {controlServerBetaEnabled && - (session?.account ? ( - - - - ) : ( - - - - ))} - - ); -} - -export default ProfileSwitcher; diff --git a/gui/src/context/Auth.tsx b/gui/src/context/Auth.tsx index 5154c67ae..0e5641abd 100644 --- a/gui/src/context/Auth.tsx +++ b/gui/src/context/Auth.tsx @@ -152,10 +152,10 @@ export const AuthProvider: React.FC<{ children: React.ReactNode }> = ({ ideMessenger.ide .getIdeSettings() .then(({ enableControlServerBeta, continueTestEnvironment }) => { - const enabled = - enableControlServerBeta || continueTestEnvironment !== "none"; - setControlServerBetaEnabled(enabled); - dispatch(setLastControlServerBetaEnabledStatus(enabled)); + setControlServerBetaEnabled(enableControlServerBeta); + dispatch( + setLastControlServerBetaEnabledStatus(enableControlServerBeta), + ); }); }, []); From fc23e41e1d036aa1b38ebbff09c5a48a8a6d9271 Mon Sep 17 00:00:00 2001 From: Nate Date: Wed, 5 Feb 2025 15:11:47 -0800 Subject: [PATCH 065/262] border-solid on scope select --- gui/src/pages/config/ScopeSelect.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gui/src/pages/config/ScopeSelect.tsx b/gui/src/pages/config/ScopeSelect.tsx index 9ee287e8b..91602f13d 100644 --- a/gui/src/pages/config/ScopeSelect.tsx +++ b/gui/src/pages/config/ScopeSelect.tsx @@ -1,13 +1,13 @@ import { Listbox } from "@headlessui/react"; import { + BuildingOfficeIcon, ChevronDownIcon, UserCircleIcon, - BuildingOfficeIcon, } from "@heroicons/react/24/outline"; import { useState } from "react"; import { useAuth } from "../../context/Auth"; -import { setOrgId } from "../../redux/thunks/setOrgId"; import { useAppDispatch } from "../../redux/hooks"; +import { setOrgId } from "../../redux/thunks/setOrgId"; const USER_PROFILE_VAL = "personal"; @@ -32,7 +32,7 @@ export function ScopeSelect() { return (
- +
{selectedDisplay?.iconUrl ? ( From 284ad970d7b6d3cb78a8dc581b71358ad8bd8098 Mon Sep 17 00:00:00 2001 From: Nate Date: Wed, 5 Feb 2025 15:16:30 -0800 Subject: [PATCH 066/262] remove AboutAssistantDialog --- .../dialogs/AboutAssistantDialog.tsx | 80 ------------------- .../platform/AssistantSelectOptions.tsx | 12 +-- 2 files changed, 2 insertions(+), 90 deletions(-) delete mode 100644 gui/src/components/dialogs/AboutAssistantDialog.tsx diff --git a/gui/src/components/dialogs/AboutAssistantDialog.tsx b/gui/src/components/dialogs/AboutAssistantDialog.tsx deleted file mode 100644 index 6f1734a92..000000000 --- a/gui/src/components/dialogs/AboutAssistantDialog.tsx +++ /dev/null @@ -1,80 +0,0 @@ -import { useAppSelector } from "../../redux/hooks"; -import { RootState } from "../../redux/store"; - -export default function AboutAssistantDialog() { - const configJson = useAppSelector((store: RootState) => store.config.config); - - const selectedProfileId = useAppSelector( - (store) => store.session.selectedProfileId, - ); - - return ( -
-

About {selectedProfileId} assistant

- {configJson.models?.length > 0 && ( -
- Chat models -
    - {configJson.models.map((model, index) => ( -
  • {model.title}
  • - ))} -
-
- )} - - {configJson.embeddingsProvider && ( -
- Embedding model -

{configJson.embeddingsProvider}

-
- )} - - {configJson.reranker?.name && ( -
- Rerank model -

{configJson.reranker.name}

-
- )} - - {configJson.systemMessage && ( -
- Rules -

{configJson.systemMessage}

-
- )} - - {configJson.contextProviders?.length ? ( -
- Context -
    - {configJson.contextProviders.map((provider, index) => ( -
  • {provider.title}
  • - ))} -
-
- ) : null} - - {configJson.tools.length > 0 && ( -
- Tools -
    - {configJson.tools.map((tool, index) => ( -
  • {tool.displayTitle}
  • - ))} -
-
- )} - - {configJson.docs?.length ? ( -
- Docs -
    - {configJson.docs.map((doc, index) => ( -
  • {doc.title}
  • - ))} -
-
- ) : null} -
- ); -} diff --git a/gui/src/components/modelSelection/platform/AssistantSelectOptions.tsx b/gui/src/components/modelSelection/platform/AssistantSelectOptions.tsx index 436005f23..d9964dc54 100644 --- a/gui/src/components/modelSelection/platform/AssistantSelectOptions.tsx +++ b/gui/src/components/modelSelection/platform/AssistantSelectOptions.tsx @@ -5,11 +5,9 @@ import { lightGray } from "../.."; import { useAuth } from "../../../context/Auth"; import { IdeMessengerContext } from "../../../context/IdeMessenger"; import { useAppDispatch } from "../../../redux/hooks"; -import { setDialogMessage, setShowDialog } from "../../../redux/slices/uiSlice"; import { setProfileId } from "../../../redux/thunks/setProfileId"; import { getFontSize, getMetaKeyLabel, isLocalProfile } from "../../../util"; import { ROUTES } from "../../../util/navigation"; -import AboutAssistantDialog from "../../dialogs/AboutAssistantDialog"; import AssistantIcon from "./AssistantIcon"; import { Divider, Option, OptionDiv } from "./shared"; import { getProfileDisplayText } from "./utils"; @@ -40,13 +38,7 @@ export function AssistantSelectOptions(props: AssistantSelectOptionsProps) { e.stopPropagation(); e.preventDefault(); - if (option.id === "local") { - ideMessenger.post("config/openProfile", { profileId: option.id }); - } else { - props.onClose(); - dispatch(setDialogMessage()); - dispatch(setShowDialog(true)); - } + ideMessenger.post("config/openProfile", { profileId: option.id }); } function handleClickError(profileId: string) { @@ -61,7 +53,7 @@ export function AssistantSelectOptions(props: AssistantSelectOptionsProps) { key={idx} idx={idx} disabled={!!profile.errors?.length} - showConfigure={true} + showConfigure={profile.id === "local"} selected={profile.id === selectedProfile?.id} onLink={ !isLocalProfile(profile) From c401e1832fd2a9ccd543493c76750751aaaabe7d Mon Sep 17 00:00:00 2001 From: Nate Date: Wed, 5 Feb 2025 17:14:39 -0800 Subject: [PATCH 067/262] open control plane links with orgSlug --- core/config/ProfileLifecycleManager.ts | 1 + core/core.ts | 6 +++++- core/protocol/core.ts | 2 +- gui/src/components/OnboardingCard/platform/tabs/main.tsx | 7 ++++--- .../modelSelection/platform/AssistantSelectOptions.tsx | 1 + 5 files changed, 12 insertions(+), 5 deletions(-) diff --git a/core/config/ProfileLifecycleManager.ts b/core/config/ProfileLifecycleManager.ts index 9fc3dc960..deaf5f40e 100644 --- a/core/config/ProfileLifecycleManager.ts +++ b/core/config/ProfileLifecycleManager.ts @@ -27,6 +27,7 @@ export interface OrganizationDescription { id: string; iconUrl: string; name: string; + slug: string | undefined; // TODO: This doesn't need to be undefined, just doing while transitioning the backend } export class ProfileLifecycleManager { diff --git a/core/core.ts b/core/core.ts index edfbc6c95..06f7e923d 100644 --- a/core/core.ts +++ b/core/core.ts @@ -315,7 +315,11 @@ export class Core { on("controlPlane/openUrl", async (msg) => { const env = await getControlPlaneEnv(this.ide.getIdeSettings()); - await this.messenger.request("openUrl", `${env.APP_URL}${msg.data.path}`); + let url = `${env.APP_URL}${msg.data.path}`; + if (msg.data.orgSlug) { + url += `?org=${msg.data.orgSlug}`; + } + await this.messenger.request("openUrl", url); }); on("controlPlane/listOrganizations", async (msg) => { diff --git a/core/protocol/core.ts b/core/protocol/core.ts index 64bc5f5d4..c234b668d 100644 --- a/core/protocol/core.ts +++ b/core/protocol/core.ts @@ -197,6 +197,6 @@ export type ToCoreFromIdeOrWebviewProtocol = { { contextItems: ContextItem[] }, ]; "clipboardCache/add": [{ content: string }, void]; - "controlPlane/openUrl": [{ path: string }, void]; + "controlPlane/openUrl": [{ path: string; orgSlug: string | undefined }, void]; "controlPlane/listOrganizations": [undefined, OrganizationDescription[]]; }; diff --git a/gui/src/components/OnboardingCard/platform/tabs/main.tsx b/gui/src/components/OnboardingCard/platform/tabs/main.tsx index 94e3c0de0..51a40e46d 100644 --- a/gui/src/components/OnboardingCard/platform/tabs/main.tsx +++ b/gui/src/components/OnboardingCard/platform/tabs/main.tsx @@ -1,11 +1,11 @@ import { ChevronRightIcon } from "@heroicons/react/24/outline"; +import { useContext } from "react"; import { Button, ButtonSubtext } from "../../.."; import { useAuth } from "../../../../context/Auth"; +import { IdeMessengerContext } from "../../../../context/IdeMessenger"; +import { hasPassedFTL } from "../../../../util/freeTrial"; import ContinueLogo from "../../../gui/ContinueLogo"; import { useOnboardingCard } from "../../hooks"; -import { hasPassedFTL } from "../../../../util/freeTrial"; -import { useContext } from "react"; -import { IdeMessengerContext } from "../../../../context/IdeMessenger"; export default function MainTab({ onRemainLocal, @@ -29,6 +29,7 @@ export default function MainTab({ function openPastFreeTrialOnboarding() { ideMessenger.post("controlPlane/openUrl", { path: "setup-models", + orgSlug: auth.selectedOrganization?.slug, }); onboardingCard.close(isDialog); } diff --git a/gui/src/components/modelSelection/platform/AssistantSelectOptions.tsx b/gui/src/components/modelSelection/platform/AssistantSelectOptions.tsx index d9964dc54..ab2b6716e 100644 --- a/gui/src/components/modelSelection/platform/AssistantSelectOptions.tsx +++ b/gui/src/components/modelSelection/platform/AssistantSelectOptions.tsx @@ -25,6 +25,7 @@ export function AssistantSelectOptions(props: AssistantSelectOptionsProps) { function onNewAssistant() { ideMessenger.post("controlPlane/openUrl", { path: "new", + orgSlug: selectedOrganization?.slug, }); } From 008afdaf0a8a995d0976b6e5e50c1454e5fff518 Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Wed, 5 Feb 2025 17:17:07 -0800 Subject: [PATCH 068/262] add copy cut paste --- gui/src/components/OSRContextMenu.tsx | 156 +++++++++++++++++++++++--- 1 file changed, 138 insertions(+), 18 deletions(-) diff --git a/gui/src/components/OSRContextMenu.tsx b/gui/src/components/OSRContextMenu.tsx index 063e3de25..a8dd53037 100644 --- a/gui/src/components/OSRContextMenu.tsx +++ b/gui/src/components/OSRContextMenu.tsx @@ -1,34 +1,112 @@ -import React, { useContext, useEffect, useState } from "react"; +import React, { useContext, useEffect, useRef, useState } from "react"; import useIsOSREnabled from "../hooks/useIsOSREnabled"; import { IdeMessengerContext } from "../context/IdeMessenger"; +interface Position { + top?: number; + left?: number; + bottom?: number; + right?: number; +} + const OSRContextMenu = () => { const ideMessenger = useContext(IdeMessengerContext); - const [position, setPosition] = useState<{ - top?: number; - left?: number; - bottom?: number; - right?: number; - } | null>(null); + const [position, setPosition] = useState(null); + const [canCopy, setCanCopy] = useState(false); + const [canCut, setCanCut] = useState(false); + const [canPaste, setCanPaste] = useState(false); + const menuRef = React.useRef(null); + const selectedTextRef = useRef(null); + const selectedRangeRef = useRef(null); + + function onMenuItemClick( + event: React.MouseEvent, + ) { + event.preventDefault(); + + // restore selection + if (selectedRangeRef.current) { + const selection = window.getSelection(); + selection?.removeAllRanges(); + selection?.addRange(selectedRangeRef.current); + } + + // Hide menu + setPosition(null); + } const isOSREnabled = useIsOSREnabled(); useEffect(() => { - function leaveWindowHandler(event: MouseEvent) { + function leaveWindowHandler() { setPosition(null); } function contextMenuHandler(event: MouseEvent) { event.preventDefault(); } - function rightClickHandler(event: MouseEvent) { + function clickHandler(event: MouseEvent) { + // If clicked outside of menu, close menu if (!menuRef.current?.contains(event.target as Node)) { setPosition(null); } + if (event.button === 2) { + // Prevent default context menu event.preventDefault(); - // always open towards inside of window from click + selectedRangeRef.current = null; + selectedTextRef.current = null; + + const selection = window.getSelection(); + let isClickWithinSelection = false; + if (selection && selection.rangeCount > 0) { + const range = selection.getRangeAt(0); + const selectedText = range.toString(); + selectedRangeRef.current = range.cloneRange(); + + if (selectedText.length > 0) { + if (selectedText) { + selectedTextRef.current = selectedText; + const rects = range.getClientRects(); + for (let i = 0; i < rects.length; i++) { + const rect = rects[i]; + if ( + event.clientX >= rect.left && + event.clientX <= rect.right && + event.clientY >= rect.top && + event.clientY <= rect.bottom + ) { + isClickWithinSelection = true; + break; + } + } + } + } + } + + // Check if right clicked on editable content (allows paste/cut) + let isEditable = false; + if ( + event.target && + "isContentEditable" in event.target && + typeof event.target.isContentEditable === "boolean" + ) { + isEditable = event.target.isContentEditable; + } + + setCanCopy(!!selectedTextRef.current && isClickWithinSelection); + setCanCut( + !!(isEditable && selectedTextRef.current && isClickWithinSelection), + ); + + // TODO only can paste if there is text in clipboard? + setCanPaste(isEditable); + // navigator.clipboard.readText().then((text) => { + // setCanPaste(text || null); + // }); + + // Open towards inside of window from click const toRight = event.clientX > window.innerWidth / 2; const toBottom = event.clientY > window.innerHeight / 2; if (toRight) { @@ -59,39 +137,81 @@ const OSRContextMenu = () => { } } + setPosition(null); if (isOSREnabled) { document.addEventListener("mouseleave", leaveWindowHandler); document.addEventListener("contextmenu", contextMenuHandler); - document.addEventListener("mousedown", rightClickHandler); + document.addEventListener("mousedown", clickHandler); } return () => { document.removeEventListener("mouseleave", leaveWindowHandler); document.removeEventListener("contextmenu", contextMenuHandler); - document.removeEventListener("mousedown", rightClickHandler); + document.removeEventListener("mousedown", clickHandler); }; - }, [isOSREnabled, menuRef]); + }, [isOSREnabled]); if (!position) { return null; } return (
+ {canCopy && ( +
{ + onMenuItemClick(e); + document.execCommand("copy"); + }} + > + Copy +
+ )} + {canCut && ( +
{ + onMenuItemClick(e); + document.execCommand("cut"); + }} + > + Cut +
+ )} + {/* PASTING is currently broken, can't get the clipboard text */} + {/* {canPaste && ( +
{ + onMenuItemClick(e); + const clipboardText = await navigator.clipboard.readText(); + // const out = await navigator.clipboard.read(); + if (clipboardText) { + selectedRangeRef.current?.deleteContents(); + selectedRangeRef.current?.insertNode( + document.createTextNode(clipboardText), + ); + } + }} + > + Paste +
+ )} */}
{ - e.stopPropagation(); + onMenuItemClick(e); ideMessenger.post("toggleDevTools", undefined); }} > - Toggle Dev Tools + Open Dev Tools
); From c0e728ad644355ef7a1a1b8598fa7770f4052b8c Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Wed, 5 Feb 2025 17:27:06 -0800 Subject: [PATCH 069/262] don't show for mac --- gui/src/components/OSRContextMenu.tsx | 8 +++++++- gui/src/components/mainInput/handleMetaKeyIssues.ts | 3 ++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/gui/src/components/OSRContextMenu.tsx b/gui/src/components/OSRContextMenu.tsx index a8dd53037..5fcfafefe 100644 --- a/gui/src/components/OSRContextMenu.tsx +++ b/gui/src/components/OSRContextMenu.tsx @@ -1,6 +1,7 @@ import React, { useContext, useEffect, useRef, useState } from "react"; import useIsOSREnabled from "../hooks/useIsOSREnabled"; import { IdeMessengerContext } from "../context/IdeMessenger"; +import { getPlatform } from "../util"; interface Position { top?: number; @@ -11,6 +12,7 @@ interface Position { const OSRContextMenu = () => { const ideMessenger = useContext(IdeMessengerContext); + const platform = useRef(getPlatform()); const [position, setPosition] = useState(null); const [canCopy, setCanCopy] = useState(false); @@ -39,6 +41,10 @@ const OSRContextMenu = () => { const isOSREnabled = useIsOSREnabled(); useEffect(() => { + if (platform.current === "mac") { + return; + } + function leaveWindowHandler() { setPosition(null); } @@ -151,7 +157,7 @@ const OSRContextMenu = () => { }; }, [isOSREnabled]); - if (!position) { + if (platform.current === "mac" || !isOSREnabled || !position) { return null; } return ( diff --git a/gui/src/components/mainInput/handleMetaKeyIssues.ts b/gui/src/components/mainInput/handleMetaKeyIssues.ts index 14bf3f792..1adf5593a 100644 --- a/gui/src/components/mainInput/handleMetaKeyIssues.ts +++ b/gui/src/components/mainInput/handleMetaKeyIssues.ts @@ -3,7 +3,6 @@ import { KeyboardEvent } from "react"; import { getPlatform, isWebEnvironment } from "../../util"; const isWebEnv = isWebEnvironment(); -const platform = getPlatform(); /** * This handles various keypress issues when OSR is enabled @@ -14,6 +13,7 @@ export const handleJetBrainsOSRMetaKeyIssues = ( ) => { const selection = window.getSelection(); const alter = e.shiftKey ? "extend" : "move"; + const platform = getPlatform(); const handlers: Record void> = { Backspace: () => handleJetBrainsMetaBackspace(editor), @@ -108,6 +108,7 @@ export const handleJetBrainsMetaBackspace = (editor: Editor) => { } // For Linux/Windows, only delete the word to the left of the cursor + const platform = getPlatform(); if (platform !== "mac") { deleteSingleWord(editor); break; From d840d48b7900a50797d515375feaf6b193abdef5 Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Wed, 5 Feb 2025 17:30:52 -0800 Subject: [PATCH 070/262] fix platform logic for custom context menu --- gui/src/components/OSRContextMenu.tsx | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/gui/src/components/OSRContextMenu.tsx b/gui/src/components/OSRContextMenu.tsx index 5fcfafefe..f6cf6e33c 100644 --- a/gui/src/components/OSRContextMenu.tsx +++ b/gui/src/components/OSRContextMenu.tsx @@ -12,6 +12,7 @@ interface Position { const OSRContextMenu = () => { const ideMessenger = useContext(IdeMessengerContext); + const isOSREnabled = useIsOSREnabled(); const platform = useRef(getPlatform()); const [position, setPosition] = useState(null); @@ -39,12 +40,7 @@ const OSRContextMenu = () => { setPosition(null); } - const isOSREnabled = useIsOSREnabled(); useEffect(() => { - if (platform.current === "mac") { - return; - } - function leaveWindowHandler() { setPosition(null); } @@ -144,16 +140,16 @@ const OSRContextMenu = () => { } setPosition(null); - if (isOSREnabled) { + if (isOSREnabled && platform.current !== "mac") { + document.addEventListener("mousedown", clickHandler); document.addEventListener("mouseleave", leaveWindowHandler); document.addEventListener("contextmenu", contextMenuHandler); - document.addEventListener("mousedown", clickHandler); } return () => { + document.removeEventListener("mousedown", clickHandler); document.removeEventListener("mouseleave", leaveWindowHandler); document.removeEventListener("contextmenu", contextMenuHandler); - document.removeEventListener("mousedown", clickHandler); }; }, [isOSREnabled]); From 0e70ff083ea4cdad70e56b303b6e740fc0f816b8 Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Wed, 5 Feb 2025 17:38:09 -0800 Subject: [PATCH 071/262] remove default chat and autocomplete models --- core/config/default.ts | 20 ++----------------- .../components/BestExperienceConfigForm.tsx | 4 ---- 2 files changed, 2 insertions(+), 22 deletions(-) diff --git a/core/config/default.ts b/core/config/default.ts index 8662be678..23e709603 100644 --- a/core/config/default.ts +++ b/core/config/default.ts @@ -5,20 +5,6 @@ import { SlashCommandDescription, } from "../"; -export const DEFAULT_CHAT_MODEL_CONFIG: ModelDescription = { - model: "claude-3-5-sonnet-latest", - provider: "anthropic", - apiKey: "", - title: "Claude 3.5 Sonnet", -}; - -export const DEFAULT_AUTOCOMPLETE_MODEL_CONFIG: ModelDescription = { - title: "Codestral", - provider: "mistral", - model: "codestral-latest", - apiKey: "", -}; - export const FREE_TRIAL_MODELS: ModelDescription[] = [ { title: "Claude 3.5 Sonnet (Free Trial)", @@ -93,15 +79,13 @@ export const defaultSlashCommandsJetBrains = [ ]; export const defaultConfig: SerializedContinueConfig = { - models: [DEFAULT_CHAT_MODEL_CONFIG], - tabAutocompleteModel: DEFAULT_AUTOCOMPLETE_MODEL_CONFIG, + models: [], contextProviders: defaultContextProvidersVsCode, slashCommands: defaultSlashCommandsVscode, }; export const defaultConfigJetBrains: SerializedContinueConfig = { - models: [DEFAULT_CHAT_MODEL_CONFIG], - tabAutocompleteModel: DEFAULT_AUTOCOMPLETE_MODEL_CONFIG, + models: [], contextProviders: defaultContextProvidersJetBrains, slashCommands: defaultSlashCommandsJetBrains, }; diff --git a/gui/src/components/OnboardingCard/components/BestExperienceConfigForm.tsx b/gui/src/components/OnboardingCard/components/BestExperienceConfigForm.tsx index 86e7cd693..98f71cce2 100644 --- a/gui/src/components/OnboardingCard/components/BestExperienceConfigForm.tsx +++ b/gui/src/components/OnboardingCard/components/BestExperienceConfigForm.tsx @@ -1,5 +1,4 @@ import { CubeIcon } from "@heroicons/react/24/outline"; -import { DEFAULT_CHAT_MODEL_CONFIG } from "core/config/default"; import { FormEventHandler, useContext, useState } from "react"; import { useDispatch } from "react-redux"; import { Button, Input, InputSubtext, lightGray } from "../.."; @@ -57,9 +56,6 @@ function BestExperienceConfigForm({ apiKey: autocompleteApiKey, }; - ideMessenger.post("config/deleteModel", { - title: DEFAULT_CHAT_MODEL_CONFIG.title, - }); ideMessenger.post("config/addModel", { model: chatModelConfig }); ideMessenger.post("config/addModel", { model: repoMapConfig, From dac8bae2ba3541fd976249e28d53fd5b3a53b08a Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Wed, 5 Feb 2025 17:52:37 -0800 Subject: [PATCH 072/262] hide onboarding close X's if no models in config --- gui/src/components/OnboardingCard/OnboardingCard.tsx | 4 +++- .../OnboardingCard/platform/PlatformOnboardingCard.tsx | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/gui/src/components/OnboardingCard/OnboardingCard.tsx b/gui/src/components/OnboardingCard/OnboardingCard.tsx index eebbfb2bc..f48e2939d 100644 --- a/gui/src/components/OnboardingCard/OnboardingCard.tsx +++ b/gui/src/components/OnboardingCard/OnboardingCard.tsx @@ -5,6 +5,7 @@ import styled from "styled-components"; import { CloseButton, defaultBorderRadius, vscInputBackground } from "../"; import { getLocalStorage, setLocalStorage } from "../../util/localStorage"; import { useOnboardingCard } from "./hooks/useOnboardingCard"; +import { useAppSelector } from "../../redux/hooks"; const StyledCard = styled.div` margin: auto; @@ -26,6 +27,7 @@ interface OnboardingCardProps { export function OnboardingCard({ isDialog }: OnboardingCardProps) { const onboardingCard = useOnboardingCard(); + const config = useAppSelector((store) => store.config.config); function renderTabContent() { switch (onboardingCard.activeTab) { @@ -53,7 +55,7 @@ export function OnboardingCard({ isDialog }: OnboardingCardProps) { activeTab={onboardingCard.activeTab || "Best"} onTabClick={onboardingCard.setActiveTab} /> - {!isDialog && ( + {!isDialog && !!config.models.length && ( onboardingCard.close()}> diff --git a/gui/src/components/OnboardingCard/platform/PlatformOnboardingCard.tsx b/gui/src/components/OnboardingCard/platform/PlatformOnboardingCard.tsx index ede9295b3..51e951497 100644 --- a/gui/src/components/OnboardingCard/platform/PlatformOnboardingCard.tsx +++ b/gui/src/components/OnboardingCard/platform/PlatformOnboardingCard.tsx @@ -8,6 +8,7 @@ import { TabTitle } from "../components/OnboardingCardTabs"; import { useOnboardingCard } from "../hooks"; import OnboardingLocalTab from "../tabs/OnboardingLocalTab"; import MainTab from "./tabs/main"; +import { useAppSelector } from "../../../redux/hooks"; const StyledCard = styled.div` margin: auto; @@ -29,6 +30,7 @@ interface OnboardingCardProps { export function PlatformOnboardingCard({ isDialog }: OnboardingCardProps) { const onboardingCard = useOnboardingCard(); + const config = useAppSelector((store) => store.config.config); if (getLocalStorage("onboardingStatus") === undefined) { setLocalStorage("onboardingStatus", "Started"); @@ -38,7 +40,7 @@ export function PlatformOnboardingCard({ isDialog }: OnboardingCardProps) { return ( - {!isDialog && ( + {!isDialog && !!config.models.length && ( onboardingCard.close()}> From 85fbf451ffc0d5465112de8494c2220f6018d4d8 Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Wed, 5 Feb 2025 18:51:59 -0800 Subject: [PATCH 073/262] handle git diff errors and logic --- core/autocomplete/snippets/getAllSnippets.ts | 7 ++++++- .../v1/slashCommandFromPromptFile.ts | 17 +++++++++++------ 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/core/autocomplete/snippets/getAllSnippets.ts b/core/autocomplete/snippets/getAllSnippets.ts index 198bf16c6..fc6538b41 100644 --- a/core/autocomplete/snippets/getAllSnippets.ts +++ b/core/autocomplete/snippets/getAllSnippets.ts @@ -90,7 +90,12 @@ const getClipboardSnippets = async ( const getDiffSnippets = async ( ide: IDE, ): Promise => { - const diff = await ide.getDiff(true); + let diff: string[] = []; + try { + diff = await ide.getDiff(true); + } catch (e) { + console.error("Error getting diff for autocomplete", e); + } return diff.map((item) => { return { diff --git a/core/promptFiles/v1/slashCommandFromPromptFile.ts b/core/promptFiles/v1/slashCommandFromPromptFile.ts index d89ee1082..b0dc0f881 100644 --- a/core/promptFiles/v1/slashCommandFromPromptFile.ts +++ b/core/promptFiles/v1/slashCommandFromPromptFile.ts @@ -25,15 +25,20 @@ async function renderPromptV1( ) { const helpers = getContextProviderHelpers(context); - // A few context providers that don't need to be in config.json to work in .prompt files - const diff = await context.ide.getDiff(true); - const currentFile = await context.ide.getCurrentFile(); const inputData: Record = { - diff: diff.join("\n"), input: userInput, }; - if (currentFile) { - inputData.currentFile = currentFile.path; + + // A few context providers that don't need to be in config.json to work in .prompt files + if (helpers?.find((helper) => helper[0] === "diff")) { + const diff = await context.ide.getDiff(true); + inputData.diff = diff.join("\n"); + } + if (helpers?.find((helper) => helper[0] === "currentFile")) { + const currentFile = await context.ide.getCurrentFile(); + if (currentFile) { + inputData.currentFile = currentFile.path; + } } return renderTemplatedString( From 19f0d6bab368dd9c49db448d41212fe8dedf8cc4 Mon Sep 17 00:00:00 2001 From: Nate Date: Wed, 5 Feb 2025 18:57:46 -0800 Subject: [PATCH 074/262] padding to top of assistant selector --- gui/src/components/PageHeader.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gui/src/components/PageHeader.tsx b/gui/src/components/PageHeader.tsx index 04317c947..02b117ac1 100644 --- a/gui/src/components/PageHeader.tsx +++ b/gui/src/components/PageHeader.tsx @@ -12,7 +12,7 @@ export default function PageHeader({ rightContent, }: PageHeaderProps) { return ( -
+
{title && (
Date: Wed, 5 Feb 2025 18:58:04 -0800 Subject: [PATCH 075/262] check for HTTP at beginning of error message --- gui/src/pages/gui/StreamError.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gui/src/pages/gui/StreamError.tsx b/gui/src/pages/gui/StreamError.tsx index ca3bc04bc..2a8465c30 100644 --- a/gui/src/pages/gui/StreamError.tsx +++ b/gui/src/pages/gui/StreamError.tsx @@ -51,7 +51,8 @@ const StreamErrorDialog = ({ error }: StreamErrorProps) => { typeof error["message"] === "string" ) { message = error["message"]; - const status = message?.split(" ")[0]; + const parts = message?.split(" ") ?? []; + const status = parts[0] === "HTTP" ? parts[1] : parts[0]; if (status) { const code = Number(status); if (!Number.isNaN(statusCode)) { From d3c9f679de18621cad0dc40a3a91c99f3acff525 Mon Sep 17 00:00:00 2001 From: Nate Date: Wed, 5 Feb 2025 19:28:32 -0800 Subject: [PATCH 076/262] remove "welcome to continue for teams" --- gui/src/context/Auth.tsx | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/gui/src/context/Auth.tsx b/gui/src/context/Auth.tsx index 0e5641abd..0c61cfeed 100644 --- a/gui/src/context/Auth.tsx +++ b/gui/src/context/Auth.tsx @@ -21,7 +21,6 @@ import { setAvailableProfiles, } from "../redux/slices/sessionSlice"; import { setDialogMessage, setShowDialog } from "../redux/slices/uiSlice"; -import { getLocalStorage, setLocalStorage } from "../util/localStorage"; import { IdeMessengerContext } from "./IdeMessenger"; interface AuthContextType { @@ -85,23 +84,6 @@ export const AuthProvider: React.FC<{ children: React.ReactNode }> = ({ const session = result.content; setSession(session); - // If this is the first time the user has logged in, explain how profiles work - if (!getLocalStorage("shownProfilesIntroduction")) { - dispatch(setShowDialog(true)); - dispatch( - setDialogMessage( - {}} - />, - ), - ); - setLocalStorage("shownProfilesIntroduction", true); - } - resolve(true); }); }); From daa1c0ac8068f87e8028bc389cbf68821e1c8bdb Mon Sep 17 00:00:00 2001 From: Nate Date: Wed, 5 Feb 2025 19:39:25 -0800 Subject: [PATCH 077/262] adjust padding of assistant select --- gui/src/components/PageHeader.tsx | 2 +- gui/src/pages/gui/Chat.tsx | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/gui/src/components/PageHeader.tsx b/gui/src/components/PageHeader.tsx index 02b117ac1..22755926e 100644 --- a/gui/src/components/PageHeader.tsx +++ b/gui/src/components/PageHeader.tsx @@ -12,7 +12,7 @@ export default function PageHeader({ rightContent, }: PageHeaderProps) { return ( -
+
{title && (
0 ? "flex-1" : ""}`} + className={`overflow-y-scroll ${showScrollbar ? "thin-scrollbar" : "no-scrollbar"} ${history.length > 0 ? "flex-1" : ""}`} > {highlights} {history.map((item, index: number) => ( From cd5f4a7266ebb23f3b79337950596b15bbae0357 Mon Sep 17 00:00:00 2001 From: Nate Date: Wed, 5 Feb 2025 19:49:48 -0800 Subject: [PATCH 078/262] color / style updates --- gui/src/components/index.ts | 8 ++++---- gui/src/pages/config/ScopeSelect.tsx | 2 +- gui/src/pages/config/index.tsx | 2 +- gui/src/pages/gui/Chat.tsx | 6 ++++-- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/gui/src/components/index.ts b/gui/src/components/index.ts index 8f1455c67..d1892bff8 100644 --- a/gui/src/components/index.ts +++ b/gui/src/components/index.ts @@ -134,7 +134,7 @@ export function parseColorForHex(colorVar: string): string { } export const Button = styled.button` - padding: 10px 12px; + padding: 6px 12px; margin: 8px 0; border-radius: ${defaultBorderRadius}; @@ -162,13 +162,13 @@ type NumberInputProps = { }; export const SecondaryButton = styled.button` - padding: 10px 12px; + padding: 6px 12px; margin: 8px 0; border-radius: ${defaultBorderRadius}; - border: 1px solid ${vscForeground}; + border: 1px solid ${vscInputBorder}; color: ${vscForeground}; - background-color: inherit; + background-color: ${vscInputBackground}; &:disabled { color: gray; diff --git a/gui/src/pages/config/ScopeSelect.tsx b/gui/src/pages/config/ScopeSelect.tsx index 91602f13d..a9761a5ea 100644 --- a/gui/src/pages/config/ScopeSelect.tsx +++ b/gui/src/pages/config/ScopeSelect.tsx @@ -32,7 +32,7 @@ export function ScopeSelect() { return (
- +
{selectedDisplay?.iconUrl ? ( diff --git a/gui/src/pages/config/index.tsx b/gui/src/pages/config/index.tsx index 3f9cc611b..c66ad80d0 100644 --- a/gui/src/pages/config/index.tsx +++ b/gui/src/pages/config/index.tsx @@ -154,7 +154,7 @@ function ConfigPage() { onClick={handleOpenConfig} className="!my-0 max-w-[400px]" > - Open configuration file + Open config file
diff --git a/gui/src/pages/gui/Chat.tsx b/gui/src/pages/gui/Chat.tsx index 5f676303a..227eb1154 100644 --- a/gui/src/pages/gui/Chat.tsx +++ b/gui/src/pages/gui/Chat.tsx @@ -365,9 +365,11 @@ export function Chat() { useAutoScroll(stepsDivRef, history); + const showPageHeader = isInEditMode || usePlatform; + return ( <> - {(isInEditMode || usePlatform) && ( + {showPageHeader && ( 0 ? "flex-1" : ""}`} + className={`overflow-y-scroll ${showPageHeader ? "" : "pt-[8px]"} ${showScrollbar ? "thin-scrollbar" : "no-scrollbar"} ${history.length > 0 ? "flex-1" : ""}`} > {highlights} {history.map((item, index: number) => ( From 9fafa83ba19aead93947219e1294f20da7a33d42 Mon Sep 17 00:00:00 2001 From: Ru Chern Chong Date: Thu, 6 Feb 2025 11:51:31 +0800 Subject: [PATCH 079/262] Add gemini-2.0-flash to schema --- extensions/vscode/config_schema.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/extensions/vscode/config_schema.json b/extensions/vscode/config_schema.json index 827662dd2..d9dab076b 100644 --- a/extensions/vscode/config_schema.json +++ b/extensions/vscode/config_schema.json @@ -936,7 +936,8 @@ "gemini-1.5-flash-latest", "gemini-1.5-flash", "gemini-1.5-flash-8b", - "gemini-2.0-flash-exp" + "gemini-2.0-flash-exp", + "gemini-2.0-flash" ] } } From 90a150d2afe4c686293c2635ea4885b9514a0894 Mon Sep 17 00:00:00 2001 From: Nate Date: Wed, 5 Feb 2025 21:33:49 -0800 Subject: [PATCH 080/262] fix timing bug in MCP loading --- core/config/yaml/loadYaml.ts | 81 ++++++++++++--------- gui/src/context/SubmenuContextProviders.tsx | 23 +++--- 2 files changed, 59 insertions(+), 45 deletions(-) diff --git a/core/config/yaml/loadYaml.ts b/core/config/yaml/loadYaml.ts index 666317447..57a863fb9 100644 --- a/core/config/yaml/loadYaml.ts +++ b/core/config/yaml/loadYaml.ts @@ -3,6 +3,7 @@ import fs from "node:fs"; import { AssistantUnrolled, ConfigResult, + ConfigValidationError, parseAssistantUnrolled, validateConfigYaml, } from "@continuedev/config-yaml"; @@ -100,7 +101,8 @@ async function configYamlToContinueConfig( workOsAccessToken: string | undefined, platformConfigMetadata: PlatformConfigMetadata | undefined, allowFreeTrial: boolean = true, -): Promise { +): Promise<{ config: ContinueConfig; errors: ConfigValidationError[] }> { + const errors: ConfigValidationError[] = []; const continueConfig: ContinueConfig = { slashCommands: [ ...(await slashCommandsFromV1PromptFiles(ide)), @@ -259,40 +261,49 @@ async function configYamlToContinueConfig( // Apply MCP if specified const mcpManager = MCPManagerSingleton.getInstance(); - config.mcpServers?.forEach(async (server) => { - const mcpId = server.name; - const mcpConnection = mcpManager.createConnection(mcpId, { - transport: { - type: "stdio", - args: [], - ...server, - }, - }); - if (!mcpConnection) { - return; - } - - const abortController = new AbortController(); - const mcpConnectionTimeout = setTimeout( - () => abortController.abort(), - 2000, - ); - - try { - await mcpConnection.modifyConfig( - continueConfig, - mcpId, - abortController.signal, - ); - } catch (e: any) { - if (e.name !== "AbortError") { - throw e; + await Promise.all( + config.mcpServers?.map(async (server) => { + const mcpId = server.name; + const mcpConnection = mcpManager.createConnection(mcpId, { + transport: { + type: "stdio", + args: [], + ...server, + }, + }); + if (!mcpConnection) { + return; } - } - clearTimeout(mcpConnectionTimeout); - }); - return continueConfig; + const abortController = new AbortController(); + const mcpConnectionTimeout = setTimeout( + () => abortController.abort(), + 5000, + ); + + try { + const mcpError = await mcpConnection.modifyConfig( + continueConfig, + mcpId, + abortController.signal, + ); + if (mcpError) { + errors.push(mcpError); + } + } catch (e: any) { + errors.push({ + fatal: false, + message: `Failed to load MCP server: ${e.message}`, + }); + if (e.name !== "AbortError") { + throw e; + } + } + clearTimeout(mcpConnectionTimeout); + }) ?? [], + ); + + return { config: continueConfig, errors }; } export async function loadContinueConfigFromYaml( @@ -328,7 +339,7 @@ export async function loadContinueConfigFromYaml( }; } - const continueConfig = await configYamlToContinueConfig( + const { config: continueConfig, errors } = await configYamlToContinueConfig( configYamlResult.config, ide, ideSettings, @@ -357,7 +368,7 @@ export async function loadContinueConfigFromYaml( return { config: withShared, - errors: configYamlResult.errors, + errors: [...(configYamlResult.errors ?? []), ...errors], configLoadInterrupted: false, }; } diff --git a/gui/src/context/SubmenuContextProviders.tsx b/gui/src/context/SubmenuContextProviders.tsx index 5b6e58fa4..123168e51 100644 --- a/gui/src/context/SubmenuContextProviders.tsx +++ b/gui/src/context/SubmenuContextProviders.tsx @@ -3,18 +3,24 @@ import { ContextProviderName, ContextSubmenuItemWithProvider, } from "core"; -import { createContext } from "react"; import { deduplicateArray } from "core/util"; -import MiniSearch, { SearchResult } from "minisearch"; -import { useCallback, useContext, useEffect, useRef, useState } from "react"; -import { IdeMessengerContext } from "./IdeMessenger"; -import { selectSubmenuContextProviders } from "../redux/selectors"; -import { useWebviewListener } from "../hooks/useWebviewListener"; -import { useAppSelector } from "../redux/hooks"; import { getShortestUniqueRelativeUriPaths, getUriPathBasename, } from "core/util/uri"; +import MiniSearch, { SearchResult } from "minisearch"; +import { + createContext, + useCallback, + useContext, + useEffect, + useRef, + useState, +} from "react"; +import { useWebviewListener } from "../hooks/useWebviewListener"; +import { useAppSelector } from "../redux/hooks"; +import { selectSubmenuContextProviders } from "../redux/selectors"; +import { IdeMessengerContext } from "./IdeMessenger"; const MINISEARCH_OPTIONS = { prefix: true, @@ -246,9 +252,6 @@ export const SubmenuContextProvidersProvider = ({ abortControllers.get(description.title)?.abort(); abortControllers.set(description.title, controller); providersLoading.add(description.title); - console.log( - `Refreshing items for ${description.title} submenu provider`, - ); const result = await ideMessenger.request( "context/loadSubmenuItems", { From 26eb176d9b7ddd3958a742a3e31d82967fe77fac Mon Sep 17 00:00:00 2001 From: Nate Date: Wed, 5 Feb 2025 21:50:44 -0800 Subject: [PATCH 081/262] always show tools button, but have disabled --- gui/src/components/mainInput/InputToolbar.tsx | 6 ++--- .../InputToolbar/ToggleToolsButton.tsx | 26 ++++++++++++------- 2 files changed, 20 insertions(+), 12 deletions(-) diff --git a/gui/src/components/mainInput/InputToolbar.tsx b/gui/src/components/mainInput/InputToolbar.tsx index 93b437fdc..f4ea214d0 100644 --- a/gui/src/components/mainInput/InputToolbar.tsx +++ b/gui/src/components/mainInput/InputToolbar.tsx @@ -91,7 +91,7 @@ function InputToolbar(props: InputToolbarProps) { const hasCodeToEdit = useAppSelector(selectHasCodeToEdit); const isEditModeAndNoCodeToEdit = isInEditMode && !hasCodeToEdit; const isEnterDisabled = props.disabled || isEditModeAndNoCodeToEdit; - const shouldRenderToolsButton = + const toolsSupported = defaultModel && modelSupportsTools(defaultModel.model, defaultModel.provider) && !props.toolbarOptions?.hideTools; @@ -158,14 +158,14 @@ function InputToolbar(props: InputToolbarProps) { )} - {shouldRenderToolsButton && } +
{!props.toolbarOptions?.hideUseCodebase && !isInEditMode && (
- {availableTools.map((tool) => ( + {availableTools.map((tool: any) => ( Date: Wed, 5 Feb 2025 22:18:03 -0800 Subject: [PATCH 083/262] favicon for mcp --- core/config/yaml/loadYaml.ts | 2 ++ core/context/mcp/index.ts | 10 +++++++--- core/core.ts | 6 ++++++ core/index.d.ts | 2 ++ core/package-lock.json | 8 ++++---- core/package.json | 2 +- .../mainInput/InputToolbar/ToolDropdownItem.tsx | 9 ++++++++- gui/src/pages/gui/ToolCallDiv/ThreadDiv.tsx | 13 +++++++------ packages/config-yaml/package.json | 2 +- packages/config-yaml/src/schemas/index.ts | 1 + 10 files changed, 39 insertions(+), 16 deletions(-) diff --git a/core/config/yaml/loadYaml.ts b/core/config/yaml/loadYaml.ts index 57a863fb9..e20c02caa 100644 --- a/core/config/yaml/loadYaml.ts +++ b/core/config/yaml/loadYaml.ts @@ -286,6 +286,8 @@ async function configYamlToContinueConfig( continueConfig, mcpId, abortController.signal, + server.name, + server.faviconUrl, ); if (mcpError) { errors.push(mcpError); diff --git a/core/context/mcp/index.ts b/core/context/mcp/index.ts index b1a960910..ca5dddfe2 100644 --- a/core/context/mcp/index.ts +++ b/core/context/mcp/index.ts @@ -121,6 +121,8 @@ class MCPConnection { config: ContinueConfig, mcpId: string, signal: AbortSignal, + name: string, + faviconUrl: string | undefined, ): Promise { try { await Promise.race([ @@ -152,6 +154,7 @@ class MCPConnection { title: resource.name, description: resource.description, id: resource.uri, + icon: faviconUrl, })); if (!config.contextProviders) { @@ -169,19 +172,20 @@ class MCPConnection { if (capabilities?.tools) { const { tools } = await this.client.listTools({}, { signal }); const continueTools: Tool[] = tools.map((tool: any) => ({ - displayTitle: tool.name, + displayTitle: name + " " + tool.name, function: { description: tool.description, name: tool.name, parameters: tool.inputSchema, }, + faviconUrl, readonly: false, type: "function", - wouldLikeTo: `use the ${tool.name} tool`, + wouldLikeTo: `use the ${name} ${tool.name} tool`, uri: encodeMCPToolUri(mcpId, tool.name), })); - config.tools = [...config.tools, ...continueTools]; + config.tools = [...continueTools, ...config.tools]; } // Prompts <—> Slash commands diff --git a/core/core.ts b/core/core.ts index 06f7e923d..73ff29f8f 100644 --- a/core/core.ts +++ b/core/core.ts @@ -954,6 +954,12 @@ export class Core { }, ); + if (tool.faviconUrl) { + contextItems.forEach((item) => { + item.icon = tool.faviconUrl; + }); + } + return { contextItems }; }); } diff --git a/core/index.d.ts b/core/index.d.ts index 1184b412b..ca9536911 100644 --- a/core/index.d.ts +++ b/core/index.d.ts @@ -874,6 +874,7 @@ export interface Tool { wouldLikeTo: string; readonly: boolean; uri?: string; + faviconUrl?: string; } interface ToolChoice { @@ -994,6 +995,7 @@ export type TransportOptions = StdioOptions | WebSocketOptions | SSEOptions; export interface MCPOptions { transport: TransportOptions; + faviconUrl?: string; } export interface ContinueUIConfig { diff --git a/core/package-lock.json b/core/package-lock.json index 9c6ab8b38..4b2290060 100644 --- a/core/package-lock.json +++ b/core/package-lock.json @@ -13,7 +13,7 @@ "@aws-sdk/client-sagemaker-runtime": "^3.621.0", "@aws-sdk/credential-providers": "^3.620.1", "@continuedev/config-types": "^1.0.13", - "@continuedev/config-yaml": "^1.0.24", + "@continuedev/config-yaml": "^1.0.25", "@continuedev/fetch": "^1.0.4", "@continuedev/llm-info": "^1.0.2", "@continuedev/openai-adapters": "^1.0.10", @@ -3038,9 +3038,9 @@ } }, "node_modules/@continuedev/config-yaml": { - "version": "1.0.24", - "resolved": "https://registry.npmjs.org/@continuedev/config-yaml/-/config-yaml-1.0.24.tgz", - "integrity": "sha512-xA4tRUh9r9p3aHIXr9zl5GQd5VygEusIc7Zw7AAFCbbl6ahMB4CDcweT8+iz0UvxJ11PLYizFSygpvxu/Yl19Q==", + "version": "1.0.25", + "resolved": "https://registry.npmjs.org/@continuedev/config-yaml/-/config-yaml-1.0.25.tgz", + "integrity": "sha512-pEiWNJIfKD8WBUXkRe8Ww8rmAl9zRU931kGuq8tJEJO6o9kwOxqd45dRJT6oFA4I/wRj93PkKjDE2QINNqoBwg==", "dependencies": { "@continuedev/config-types": "^1.0.14", "yaml": "^2.6.1", diff --git a/core/package.json b/core/package.json index c0f7f736d..7afc752a6 100644 --- a/core/package.json +++ b/core/package.json @@ -46,7 +46,7 @@ "@aws-sdk/client-sagemaker-runtime": "^3.621.0", "@aws-sdk/credential-providers": "^3.620.1", "@continuedev/config-types": "^1.0.13", - "@continuedev/config-yaml": "^1.0.24", + "@continuedev/config-yaml": "^1.0.25", "@continuedev/fetch": "^1.0.4", "@continuedev/llm-info": "^1.0.2", "@continuedev/openai-adapters": "^1.0.10", diff --git a/gui/src/components/mainInput/InputToolbar/ToolDropdownItem.tsx b/gui/src/components/mainInput/InputToolbar/ToolDropdownItem.tsx index 4309b7a95..5df66f147 100644 --- a/gui/src/components/mainInput/InputToolbar/ToolDropdownItem.tsx +++ b/gui/src/components/mainInput/InputToolbar/ToolDropdownItem.tsx @@ -1,8 +1,8 @@ import { Tool } from "core"; import { useEffect } from "react"; import { useDispatch, useSelector } from "react-redux"; -import { RootState } from "../../../redux/store"; import { addTool, toggleToolSetting } from "../../../redux/slices/uiSlice"; +import { RootState } from "../../../redux/store"; interface ToolDropdownItemProps { tool: Tool; @@ -34,6 +34,13 @@ function ToolDropdownItem(props: ToolDropdownItemProps) { }} > + {props.tool.faviconUrl && ( + {props.tool.displayTitle} + )} {props.tool.displayTitle}{" "} {/* props.toolCall.function?.name === tool.function.name, + ); + return ( @@ -60,13 +64,10 @@ export function ThreadDiv(props: ThreadDivProps) { > {props.icon}
- Continue wants to{" "} - {renderWouldLikeToMessage( - availableTools.find( - (tool) => props.toolCall.function?.name === tool.function.name, - ), - props.toolCallState, + {tool?.faviconUrl && ( + )} + Continue wants to {renderWouldLikeToMessage(tool, props.toolCallState)} {props.children} diff --git a/packages/config-yaml/package.json b/packages/config-yaml/package.json index c3c5419a9..85bbe3ef3 100644 --- a/packages/config-yaml/package.json +++ b/packages/config-yaml/package.json @@ -1,6 +1,6 @@ { "name": "@continuedev/config-yaml", - "version": "1.0.23", + "version": "1.0.25", "description": "", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/packages/config-yaml/src/schemas/index.ts b/packages/config-yaml/src/schemas/index.ts index 557e40b28..c456b4ab3 100644 --- a/packages/config-yaml/src/schemas/index.ts +++ b/packages/config-yaml/src/schemas/index.ts @@ -21,6 +21,7 @@ const toolSchema = z.object({ const mcpServerSchema = z.object({ name: z.string(), command: z.string(), + faviconUrl: z.string().optional(), args: z.array(z.string()).optional(), env: z.record(z.string()).optional(), }); From 35584f2e2603f3d33b9ca649052d09b7d04875a4 Mon Sep 17 00:00:00 2001 From: Nate Date: Wed, 5 Feb 2025 22:25:22 -0800 Subject: [PATCH 084/262] improvements to tool call display --- core/config/load.ts | 6 ++++-- core/core.ts | 3 ++- core/index.d.ts | 1 + core/tools/callTool.ts | 15 +++++++++++---- 4 files changed, 18 insertions(+), 7 deletions(-) diff --git a/core/config/load.ts b/core/config/load.ts index da95ec5a8..5400bc81b 100644 --- a/core/config/load.ts +++ b/core/config/load.ts @@ -63,6 +63,8 @@ import { } from "../util/paths"; import { ConfigResult, ConfigValidationError } from "@continuedev/config-yaml"; +import { useHub } from "../control-plane/env"; +import { localPathToUri } from "../util/pathToUri"; import { defaultContextProvidersJetBrains, defaultContextProvidersVsCode, @@ -70,8 +72,6 @@ import { defaultSlashCommandsVscode, } from "./default"; import { getSystemPromptDotFile } from "./getSystemPromptDotFile"; -import { useHub } from "../control-plane/env"; -import { localPathToUri } from "../util/pathToUri"; import { modifyContinueConfigWithSharedConfig } from "./sharedConfig"; import { validateConfig } from "./validation.js"; @@ -517,6 +517,8 @@ async function intermediateToFinalConfig( continueConfig, mcpId, abortController.signal, + "MCP Server", + server.faviconUrl, ); if (mcpError) { errors.push(mcpError); diff --git a/core/core.ts b/core/core.ts index 73ff29f8f..32be84cda 100644 --- a/core/core.ts +++ b/core/core.ts @@ -944,13 +944,14 @@ export class Core { const llm = await this.configHandler.llmFromTitle(selectedModelTitle); const contextItems = await callTool( - tool.uri ?? tool.function.name, + tool, JSON.parse(toolCall.function.arguments || "{}"), { ide: this.ide, llm, fetch: (url, init) => fetchwithRequestOptions(url, init, config.requestOptions), + tool, }, ); diff --git a/core/index.d.ts b/core/index.d.ts index ca9536911..b1d15847a 100644 --- a/core/index.d.ts +++ b/core/index.d.ts @@ -859,6 +859,7 @@ export interface ToolExtras { ide: IDE; llm: ILLM; fetch: FetchFunction; + tool: Tool; } export interface Tool { diff --git a/core/tools/callTool.ts b/core/tools/callTool.ts index 706fa57d9..f3b565285 100644 --- a/core/tools/callTool.ts +++ b/core/tools/callTool.ts @@ -1,4 +1,4 @@ -import { ContextItem, ToolExtras } from ".."; +import { ContextItem, Tool, ToolExtras } from ".."; import { MCPManagerSingleton } from "../context/mcp"; import { BuiltInToolNames } from "./builtIn"; @@ -86,13 +86,18 @@ async function callToolFromUri( throw new Error(`Failed to call tool: ${toolName}`); } - return (response.content as any).map((item: any) => { + return (response.content as any).map((item: any): ContextItem => { if (item.type !== "text") { throw new Error( `Continue received item of type "${item.type}" from MCP tool, but currently only supports "text".`, ); } - return { name: toolName, description: toolName, content: item.text }; + return { + name: extras.tool.displayTitle, + description: "Tool output", + content: item.text, + icon: extras.tool.faviconUrl, + }; }); default: @@ -101,10 +106,12 @@ async function callToolFromUri( } export async function callTool( - uri: string, + tool: Tool, args: any, extras: ToolExtras, ): Promise { + const uri = tool.uri ?? tool.function.name; + switch (uri) { case BuiltInToolNames.ReadFile: return await readFileImpl(args, extras); From d282974c34cbc9adc39c7d0c096b76d0920f2828 Mon Sep 17 00:00:00 2001 From: ferenci84 Date: Thu, 6 Feb 2025 08:04:58 +0100 Subject: [PATCH 085/262] remove AutocompleteCompletionOptions and related logic --- .../templating/AutocompleteTemplate.ts | 90 +++++-------------- core/llm/llms/Ollama.ts | 15 +--- core/llm/openaiTypeConverters.ts | 5 +- 3 files changed, 29 insertions(+), 81 deletions(-) diff --git a/core/autocomplete/templating/AutocompleteTemplate.ts b/core/autocomplete/templating/AutocompleteTemplate.ts index eb5a01cce..f3fcc7eea 100644 --- a/core/autocomplete/templating/AutocompleteTemplate.ts +++ b/core/autocomplete/templating/AutocompleteTemplate.ts @@ -11,10 +11,6 @@ import { AutocompleteSnippetType, } from "../snippets/types.js"; -export interface AutocompleteCompletionOptions { - promptOnly?: boolean; -} - export interface AutocompleteTemplate { compilePrefixSuffix?: ( prefix: string, @@ -25,17 +21,17 @@ export interface AutocompleteTemplate { workspaceUris: string[], ) => [string, string]; template: - | string - | (( - prefix: string, - suffix: string, - filepath: string, - reponame: string, - language: string, - snippets: AutocompleteSnippet[], - workspaceUris: string[], - ) => string); - completionOptions?: Partial & Partial; + | string + | (( + prefix: string, + suffix: string, + filepath: string, + reponame: string, + language: string, + snippets: AutocompleteSnippet[], + workspaceUris: string[], + ) => string); + completionOptions?: Partial; } // https://huggingface.co/stabilityai/stable-code-3b @@ -58,47 +54,8 @@ const stableCodeFimTemplate: AutocompleteTemplate = { // This issue asks about the use of <|repo_name|> and <|file_sep|> together with <|fim_prefix|>, <|fim_suffix|> and <|fim_middle|> // https://github.com/QwenLM/Qwen2.5-Coder/issues/343 const qwenCoderFimTemplate: AutocompleteTemplate = { - compilePrefixSuffix: ( - prefix: string, - suffix: string, - filepath: string, - reponame: string, - snippets: AutocompleteSnippet[], - workspaceUris: string[] - ): [string, string] => { - // Helper function to get file name from snippet - function getFileName(snippet: { uri: string; uniquePath: string }) { - return snippet.uri.startsWith("file://") ? snippet.uniquePath : snippet.uri; - } - - // Start building the prompt with repo name - let prompt = `<|repo_name|>${reponame}`; - - const relativePaths = getShortestUniqueRelativeUriPaths( - [ - ...snippets.map((snippet) => - "filepath" in snippet ? snippet.filepath : "file:///Untitled.txt" - ), - filepath, - ], - workspaceUris - ); - - // Add each snippet with its file path - snippets.forEach((snippet, i) => { - const content = snippet.type === AutocompleteSnippetType.Diff - ? snippet.content - : snippet.content; - prompt += `\n<|file_sep|>${getFileName(relativePaths[i])}\n${content}`; - }); - - // Add the current file's prefix and suffix - prompt += `<|fim_prefix|>${prefix}<|fim_suffix|>${suffix}<|fim_middle|>`; - - // Empty suffix will make the prefix be used as a single prompt - return [prompt, ""]; - }, - template: "{{{prefix}}}", // output of compilePrefixSuffix already compiles everything into a single prompt + template: + "<|fim_prefix|>{{{prefix}}}<|fim_suffix|>{{{suffix}}}<|fim_middle|>", completionOptions: { stop: [ "<|endoftext|>", @@ -111,7 +68,6 @@ const qwenCoderFimTemplate: AutocompleteTemplate = { "<|im_start|>", "<|im_end|>", ], - promptOnly: true // with ollama provider this makes sure a single prompt is sent (with suffix as part of the prompt, not as a separate parameter) }, }; @@ -138,7 +94,10 @@ const codestralMultifileFimTemplate: AutocompleteTemplate = { if (snippets.length === 0) { if (suffix.trim().length === 0 && prefix.trim().length === 0) { - return [`+++++ ${getLastNUriRelativePathParts(workspaceUris, filepath, 2)}\n\n[PREFIX]\n${prefix}`, suffix]; + return [ + `+++++ ${getLastNUriRelativePathParts(workspaceUris, filepath, 2)}\n${prefix}`, + suffix, + ]; } return [prefix, suffix]; } @@ -169,16 +128,15 @@ const codestralMultifileFimTemplate: AutocompleteTemplate = { .join("\n\n"); return [ - `${otherFiles}\n\n+++++ ${getFileName(relativePaths[relativePaths.length - 1])}\n[SUFFIX]${suffix}\n[PREFIX]${prefix}`, - "", + `${otherFiles}\n\n+++++ ${getFileName(relativePaths[relativePaths.length - 1])}\n${prefix}`, + suffix, ]; }, template: (prefix: string, suffix: string): string => { - return prefix + return `[SUFFIX]${suffix}[PREFIX]${prefix}`; }, completionOptions: { stop: ["[PREFIX]", "[SUFFIX]", "\n+++++ "], - promptOnly: true }, }; @@ -212,10 +170,10 @@ const starcoder2FimTemplate: AutocompleteTemplate = { snippets.length === 0 ? "" : `${snippets - .map((snippet) => { - return snippet.content; - }) - .join("")}`; + .map((snippet) => { + return snippet.content; + }) + .join("")}`; const prompt = `${otherFiles}${prefix}${suffix}`; return prompt; diff --git a/core/llm/llms/Ollama.ts b/core/llm/llms/Ollama.ts index 5c5df1488..b9734acb9 100644 --- a/core/llm/llms/Ollama.ts +++ b/core/llm/llms/Ollama.ts @@ -4,7 +4,6 @@ import { ChatMessage, CompletionOptions, LLMOptions } from "../../index.js"; import { renderChatMessage } from "../../util/messageContent.js"; import { BaseLLM } from "../index.js"; import { streamResponse } from "../stream.js"; -import { AutocompleteCompletionOptions } from "../../autocomplete/templating/AutocompleteTemplate.js"; type OllamaChatMessage = { role: "tool" | "user" | "assistant" | "system"; @@ -294,28 +293,20 @@ class Ollama extends BaseLLM { } private _getGenerateOptions( - options: CompletionOptions & Partial, + options: CompletionOptions, prompt: string, suffix?: string, ): OllamaRawOptions { - const generateOptions: OllamaRawOptions = { + return { model: this._getModel(), prompt, + suffix, raw: options.raw, options: this._getModelFileParams(options), keep_alive: options.keepAlive ?? 60 * 30, // 30 minutes - suffix, stream: options.stream, // Not supported yet: context, images, system, template, format }; - - if (options.promptOnly) { - console.log("fim: removing suffix"); - - delete generateOptions.suffix; - } - - return generateOptions; } private getEndpoint(endpoint: string): URL { diff --git a/core/llm/openaiTypeConverters.ts b/core/llm/openaiTypeConverters.ts index af21bf470..4ed8be1c4 100644 --- a/core/llm/openaiTypeConverters.ts +++ b/core/llm/openaiTypeConverters.ts @@ -16,7 +16,6 @@ import { MessageContent, TextMessagePart, } from ".."; -import { AutocompleteCompletionOptions } from "../autocomplete/templating/AutocompleteTemplate"; export function toChatMessage( message: ChatMessage, @@ -139,12 +138,12 @@ export function toCompleteBody( export function toFimBody( prefix: string, suffix: string, - options: CompletionOptions & AutocompleteCompletionOptions, + options: CompletionOptions, ): FimCreateParamsStreaming { return { model: options.model, prompt: prefix, - suffix: options.promptOnly ? undefined : suffix, + suffix, max_tokens: options.maxTokens, temperature: options.temperature, top_p: options.topP, From d80dbff7a7c2e3fea59d9a4e8ac20026ea1002fd Mon Sep 17 00:00:00 2001 From: ferenci84 Date: Thu, 6 Feb 2025 08:12:27 +0100 Subject: [PATCH 086/262] remove commented snippet filtering and reversing logic in AutocompleteTemplate.ts --- core/autocomplete/templating/AutocompleteTemplate.ts | 5 ----- 1 file changed, 5 deletions(-) diff --git a/core/autocomplete/templating/AutocompleteTemplate.ts b/core/autocomplete/templating/AutocompleteTemplate.ts index f3fcc7eea..7f5366df0 100644 --- a/core/autocomplete/templating/AutocompleteTemplate.ts +++ b/core/autocomplete/templating/AutocompleteTemplate.ts @@ -102,11 +102,6 @@ const codestralMultifileFimTemplate: AutocompleteTemplate = { return [prefix, suffix]; } - //snippets = snippets.filter((snippet) => "filepath" in snippet); - - // reverse the snippets so that the most recent snippet is last - snippets = [...snippets].reverse(); - const relativePaths = getShortestUniqueRelativeUriPaths( [ ...snippets.map((snippet) => From d18518228b09dbd9689a06908817682a497ed9e2 Mon Sep 17 00:00:00 2001 From: prakashsharma91 Date: Thu, 6 Feb 2025 17:37:00 +0530 Subject: [PATCH 087/262] Correct or add chat model icons --- gui/public/logos/siliconflow.png | Bin 0 -> 29089 bytes gui/src/pages/AddNewModel/configs/providers.ts | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) create mode 100644 gui/public/logos/siliconflow.png diff --git a/gui/public/logos/siliconflow.png b/gui/public/logos/siliconflow.png new file mode 100644 index 0000000000000000000000000000000000000000..f32fc6ebf84f0a60fabd3e0a42f27bded426931f GIT binary patch literal 29089 zcmdpe{Xf(D|Nl!)IUUvNbV?=EiLS^xr*u85Q(+t_3AyfcN(e>BnCYlgLak6L%3L&Z zabh%@QKuZ0*5o2{u^eJ(rp(4>+xPLDbKbYl-|+q6+&Vq?yna3|?vMN9@#^yaeb%$T zTk;)-VY5j#dmJ(B8~EREuy1F;A5;U=IQV1cDVxKg7^XWP{ilVc-(7@Z%P`WOT~253 ze(t1{<@kDjP;OX0)3{sdnVj@Ky*!b@tcXFdRQQ~R2(}t9m8D7^pt_aE`>&sf1e2a%2Kqpzins^ zKX5qE`#>w7SWqC^>hAY7&|=KgZcyM7N+s2cKADWEokOW%_DX6?N3o^XV6Z8J!_HOd znJ{I|9bMiB@7#SzQzTl*7{ie!GF)p1-#~p;5IUI|6~s9ZN!C&rR<0dKdet} zJHhSd-cc$NV-mG6>{Pm_-Gbm7%2cu&cEo(`b5p-+`|-(bennc7_x^)azj{%>e-Otj zL>;$%;omEGx`pMeCQCO*MGsAZ=Nitv*;LIcvakMK>UKGXJq^P~)|k7qrBBoAyvtHv zIuu5Jooyl$KV&HPlSGF~In~^SPt*CcyIwO*!pVFRHU0-`Kizy9m!Uu>VOM`jE zEOzbYe!GZ4d3t+-t>xDz!l4Bi_A&eFrX(A_y z4w=aGpX)96V<~J%O6yH7?SceLBMgh3zNzvdq2y6{@oEOgM;bV3!AyQz`)tL)!L_VT zkB}%<1X8?JpI&+1&}pbX@p-)BYo2PAMa5BGLSpuf;_UDzz2%V;7j*EKEFECB$S6B_ zXJ)pFVj-(&X$ng8@-gmI*beI0X6%SMcC2!R{4PA_FTX~dEb1Cb_N6X=#8Nwxl)1va zdmE*P92K3Fn5gGFq{<(YjrO<7IgeP%=mwFE#BsS_ZP)B;b>8zSNiao3Pk!fS%ST1! z{Y@R-o(I+YCEqXi>yG+#qV?P;ox2Ghc|2|0fHLkpEO0xh7SY-RLrd1%EZJ{T5h3;t z-cILkgD0~s4IV0DQ4ZFNHrx6eC3wv>o?S&##0LxuzNbjFuo}lFC&&1sn_5?L@3Ku~ zNk?`>uenwh?LBwP_Jl0%ZVX#=mmQTSTf-t0_DVx7WXXGQYMPT{)a%vBM)N6_)3BOl zpB;Ku-2`+7pxsJ!;NtwB{_J**quf!48vbgNOYnG|h0Fy>r(ubSUj}I6-OO*l!F;-JGVA4^ z@oqeArtvx_hVrarVm8RW`b7+bvo88lYW9V~6yfMn4BK}?>fU0KsP-g@g8$L+CAmrX ze^$1rk4f4<@iN!*w-O>u$0%T>|H8eYZMV537_SRGRtTrg08!qV(kxwI!HlrNv1!>cinM7($q{=6`XD~nXe+(l zLZd<@C8ngoi2Pnv8a;8hEV&v~w&dgBU~ht*e{q80DHD=1$dsXUk|?KvVF+s;);9u| zL;{1!iz_r9Ft!zW?-6VVi75$|7BdK(zHsB{TPeo&4&^ld*)qjDI$gX1)xNA!*F9w}+FQBZG zXJ}(PV|g#Tb)u>`#_JqRm_&Y61UXZvz=5E>Ib+=*y7RQto0eMqxFti6qBjluIBT_@ zk!q4A54OVHr)A%=9gersW9nE5k}>SVN~9I;46!Lg9Vi)DL;B8qOq^Ja*TPC>5Au8M z{0D<|jkcJOMjNePy-IQW}e4&-XiWEyg&P z4A;Ye!|)?*WpZLQod47nsVF^TgQ9?wDZOFb%-s*Fz>|U6?AzseFZ#5-=pIiy$Jp^gOzgCbTC*;0)OS2vnaBY*Ak3YnvfE1ioqed&IOFIPcVWf<>z%-Tj^UH8B&Pa z*vBAyFtz1WZ%2;boQu|^#%V5&1-u9gSinau=ULzE@X{x&x20V?P_KOVIqxW49E@Sn zw8D)s{v_p2Ny%!`5@!=;a8h-h7PelI#ku!BG$06{&oW3b{N9B0ydYa86-F6gHI4eB zt&@=^%!)m@cv|+6irYBi8hM5eR#N7l5xtwF45r8bLTVg=yR?x|aG1}42f1ESZ6QnB zgNvhOe_~{Zk3Vh>;3ib-OvB6)dHmi`yFrc-;agjHEt zwFQx_hDV&mM=o^A_N^n2-vEserE2WEKu-&s;fLhXE{HRqC?V0B@+_GBRswx!_m$qT zv#5~8;r z@~)WxX38C@WaMggt|B=S>dPC?Mo5(NF`oxFnbN0idTaOMLTJX#QI7uZJlTFM_QLw8 zq2C)sd%Lyo8j~h6KnFU7QERZ84*funP!6qKeaW!P7@pk~{HVt4%ACL~TkyBYM`-PL zvUE0+XoKvNp@oH30v9c;&(U+p!HnfOpHM=gIXUbG>~^WTVjA}5Ug21IUSCUAyakE2 z&z+&>3KgbUjYpfuogJlps_P@W>}lE2^0f@3OVxGIJ(2cO&F4;%Xczgb4WfUSuoq&> zJnTgi2pT-UZA=Qgv(|6&rckjC+j)N=DV?uNkN+7q5}w8%rHd;uY&jDAgN{*$#&@nH zIa+GxsNVBrURdmgpt4YM5J^eBfIA8=v!TVEF6My#Hsz%KDt32NH*a0^moX_lgT=ot zj9QP?EDlBJ;~~r2fOwunJJY8hxHRUJguMv!Y4>CWe7&FEeuo~9C(-=(-ktMFf zu=c_Hu@$&A40Vj;qY26Jgx{nCU0e_C$8XNDeB3838hKzx%O2q$?gu@ zc^CZfUG8>Uf8qkduOwR8>M6G}49&?YO)=}q*J#Fm*DL*%fA7u`3jiqDG!*W^9iSPn zbE9|08yZk>I@lIJcNR53g28G(ZgRU59VDSF1xVY(RN;LEzbz%~gn2I|0*>d&La_btYV%~_SZviphPNSMHHo(Ip<|SKz0v^|#p}9%5mb?>g>spSqhbJRru_*{lG<8r- zqqjiw{gjSPbg>M>OiMYodvI1X}~9xB;yOlo|m|LM!oEU^Nsq47EWa_i;}@WPj%H`!$Dj+N>A(k!tOY-`Mbchqjl zP8jgBQ;7P#Fp7wkWcv@}lMF8!liX5m{W*&$Vwifrz49_wG#=HU9A;sQc6tB z+<%a`gzzm~*RO$nUt0HY0V#aXLZJ7cIzhPHhL(M-0HF}@p0Os5p^6EimZmLRRS^UD zcgspVnhIJZkJUwwkj3w{=a6d z)hGmOx~PQrQt~-nF1~;x(2NHPvihfCJ~g(3_*-%3tigSlGn2iLGHKfHm$%ea`3F^; zM}5~tG1Qqt7EJMwSESva)}-DM{qedn={*Ewd$=8Uc zOvmzCJCgR|w$qFmTuZh3t*{N|xX*jZi%;voT}17E+4FZgHVujJ6KzU8UlZ?{0RLAJZ+VE^nO@(*_Q!T}Te>WyS)xRm?3&(#le!viFz(D5(J3x$WZutnzwlG@t8>-Rx3 zPZXsv>&cQb*zeAU8(>6F8j~D}M@(eiNf`^^LKX!st)w<6D}~*ll4Dg)AypIkWBRHX z$y3b;kz#7o4zBegqP1p!H=}z`L-cEf+YFB`$f3C#!E2qE>TfTy;5|h7pwW>&g>r`_}lZ}H2gXQ7qj}OV?LO_KR3}Z2yOHHn(iDslZtlR^k~1SA*wNY@@ke~5dl3? zOq%9VP2o`wgsOQ{=bb+muL!s2Ue;X2>WRO5Y=bs)Yhz&rO9l!&4XFqIyL>&m&QkPx zZm>5bO6MLH+`wm0{@g!~y60wkkVJW!SKaCFUwql{6zpDolV3I2YlNNRpUn9(oZkND zIFjGy?Q0nZ85E*}NxYbZ$!9 zOe*sBqV@r)?Xb8L+0wll)dXWSm+%>Gspqv?$2NV(rhnC2_QO;wQ5NxBwK3)w$w}C9 z(`Vg_&vXpIOtIU(a(qLMNIalb6QQEO`P~XqV@QNj)uf*K!4=q}ejnj=W4}l{WgMdT zrfgN^wu#@U$~5COMYMJc`q&EZxdfmnwSlu@32VVz<*Z{y1bIb22XWEHYHAYA{WCp7 zt4yNDVWyd;EKbas15rNz+D$pm8b<^(cGN_c*;Wxi-X}3b_7nv`57Cjei5@{`qQvpWY3V8z> z1Ncadorn&|S@D#J&CLQjYvdeUX}8QbEbyxd zPey@QHKoIAyUuRV%jfIHGOH(_#p&%4jDiDl{(8NxAtq*Z^m)NBE|L=1?A&z9gJHzFPQic=uWlsJ5j0rHrt#g6%bJ9WZCFib zK8v%Bd;&Igz?7x-BT>Y!UY)U)5CA0vB_c}*T!ye4V8R7cCI^sgv9-n>_d|StfOMna znGOJpg%4@%RYU$!Z%-U0hikx*v3@D%*H>Eg7w`E^ zfQlXf)7v6Goh+0xg^EpB&6)xro+JpJ1x-uO^(Arq|H2)n z88_@QsqhMkiadPhQPdqGwtmr_0+GNP=SDNWkS6D)^SLb@oL6abEi4Y)NRI}>UgIl# zsRNmm2Lc41^(hWBun(KuS$X5#fKE3!4O-jzbDTptziEuQ>u9!BP9b?+JGSYzLbHM;NLurODN68O=SJJpzi5$CJ51 z_)&7ZotSL+0W2l}b($hGwIilKDYJ-jx?a=>e4M2l@#}QeV;nZ(ce9CV5p(}W_C#^7 zsvD>g2+Eq8y0%2wMb;~Q0p+Ygyrlk@(&L=`$0_pa!yt#LO|rq>JA_;21tQbq0*6wF zHvP&!BsbPtCv7TXc}qawe2yd{>a{Q2PO^U;=})G+tv~f(NYp`lk)G`!afkaqVpp3{ zVV1Ow4k0a_3+lh+SZRg*OI#Q2%yF<|=0Ls!rf&28?5nG4k)KWDm}z6{&jPDyh3loA zkq6X)p&_Uie`&%CUiIJw8k3U=Kw~bVo|ebhq-DQ95Jd$O0oIubJh_1;E?Erv8A|U{ z8TG`6leS%OtddIcf&jrre(3mU7WW{K)&Uh9Lin5+ktF%7lnz`=Q%rfEYMqHuq=#f; zCd8FTr8z+Ru#G8|5HD<3jgkXyjPYJc9tlIi#w>J%EC4+|3V;ElldRy5jG1aI{Z<&M zy}t7Rkb}`5(#j-2KNqmP2?{fHO4Ul-6-xu4TJ~>h<@-zC;r;6Elnwx`MyAJr(MW{L zT536I=T>PuZ1j*tp+fL@)e?enpONF<*@r?o=Hz+T%62qZwt71Xs)Ac3cZD0~0ur<$ z-M}Y$%`jfKTVw;et>WV_Y?uEaKGAy?;=S6pgC}Go&NGXP_@v+78vv0<*ZYR_JbH@t zD-B&K&jv)AQ*pb_A<64|=o}Iy`uyNG2@Cl9 zyE_{ING8N(Ul0$18U9B&It#;|=)?7OEH#@$TUajbE8M}_B8RucEaM>a@De|lwy==K zH%e=gS!EtUd~iO4{S*26wX!V`TL0lExeQhJ2{S`6ydo%6e zXq!IRQUpuQ3~19#83Lz+Q8AK8AoowwAK9|;XzrLI;G9AOEbYv`~w7?|i ziujbC=e9u=7x1fT<#|mj!Pp5)K`_2`2EwuWz74;qsGZXlZj}ihv1aK*mRh*fYz=K+ z1Vb5CZ*8bYc?pw*W+4gy5)ytz>;QGfkkJB4HER9`u?AlzsD7^S!qFPKlM7&!K1E1Db>5Q8Hx_BOIb+XPa$#E!zk9jdQeT|JCD6Ksb!w=nC|_GAKhuUTr!qC`l( z{y5Op6x8Mxpf;A9fynfE*elh4;n&ml6^5gH#hy$6Ts0kch95HQ|4Ca!%5wrjDeqg* zY77Ou&-74Jy>bE17qu;W<)(NkG_h(VfE|`k@#V{5{2!3nJ1hBd#Xtt6XYMG6tc~VT zz%pRE*#N+V$E+IbU4UCOO^mS4gydAsG#1k8<3yu{>~}WXCSJKkc}dz}b7r?5Z#tap zb=>$~vX`-qd?Q&&_|F%0SUI=rn8hwi(zl20t{svZD z=tL4xP}+$LE_8?vSR3=%1?UO)2lu(D{6d+OK*VVp)E+l2mCq2Wb%jDqCAhPTWKP-V%o_H;T5-I`T zgv|nqAdjwRNU8u9kv`=&&|>!?w%&^;(1L=c*TI6LrtE6i-3iz^;V3M#s02`_n676;qEx25tfB+X zMe%wNaUpx$#?BkU2upap*mK~745}w>>@qki=+R!3E#1s}om}dW%M3kS|{BNthl4FhE)%dl=RWmxWhX%)EaZID^lO8%S<@6) zR9>7|4cWq2lY_u83Xj>i6}eSu@NY2%R<3Vq3cBQdDLZG-nqCaX)~8-WF!uQ@rlsaX z68!SNV@JmmveF>sFM3N?$oab7~Sh*?fch2)EAmS*(KW=OmUFW9){H})>(wGu%1 z&kwq_8&%IG**OBCZw-oomsg@KzWdz%H$Ck~KR;WMURH4=x`mVu>elErwA5@w-h0Di z)X?%FiAIK|2S5QST9Yk*l&7P?PWH+;Uc&V9C)Qe0MX7%a&^ z(LvB0@1*Qqtw|cbz*~fttpYM`E@vqzPFyk7u|8#EGuj#O+P{V{wZKJY9byyN&Je#e_fOrp~n>U3T1s)tg=&1IQpbCr< zM@RMBk?Eu*r%Yt=h7?!mLX>Czg>6~g2pF2m_NR?D}+{kyJ# zND>V!hoIHF2iB`YylOPWcWxw6GQIdTEZE~e+-i*{HSRZMu+8O5VAz(TT-5`i328}? z=oqhc3!LQ@LIn_vPeKS-N^6h!ck>z;rf2N;cVJF^#onm{-O&?_9Ol8^gpO3_sbl}_ zMvz?ShNh2*2%c(tj8awPU9^iG&P&8eQ>U^W+zKr-I)U>t(wynh&5bd(qpCKdmiElOQ=`DJh0aL@#+e!MZ%cEBExL%ZCc(o0 z#;7w!V5Ji%6ZgMSc+GBrLbianKjl#`()lON*zXpgnBae#AiKl^QnCru2XKUyy(m5l zdOQSGhWAWNS0vE??_WVe{_kHE$yVsqK*>?f4Mg?HUbO57eIPH``py19_=NxSSCo)o z84bP7UFSWsHheJGHNz&1okF75#$HA0j1O3uv=YHqKTpRNdo zyjIN94)x<~X*DF{)A`w;hEaqw{o(DOsRg~^_7G%Qj0qr_dmNlogxOO(1K3P^<*Ubh zwLMV!ts5huw22sr3eFIad}KEBe=o7{?dM`K%EX~!mkzKj+pBl%4t?&fK|!=-Jw~;EE3eSn-yb*Pet6q@?SFEg z_gPvoQqd38%1J3}^!=B_iF6tN&vZp5XmLDt4~ zKjI`a*D33W+)O!7SnEjJC_qN0WT!c2mrX08L(f8#6C6m}fr z0VmCx`$Yd%XdP4x2_GDQXRy=cr-b!{a7jSyM}Elr9*)dsy4a^h)62>yGLgaw;1c#4V7ix|fsej>gWH^VY zKLIq&3O1wxLHm1ab4Lst!dcoXZWn~lMUQ@k?AbHS?nv3`@!C4UvlMyeo7&mCps$^C zz49d_0ZZ|>5j&@;6csLB?6V(b<&G1fa#MXu@&NMj5ZSa<9Z05rIWy?;_PDcnF1FJ<(oonXE;fED`dMGlm%J75wQnj3V;?I>yBpt zy(yjy2lADL^4bEVfWX_i$A;w6%U;Kcu&FQ5w_e3L5*)lx399qQ2G; z-R2PM@LoPppc3FvD9Tw5(qX*Ly^eY$z(JwIi_%)}gYF#apCCvxq6pzv(reGEoL;H6 zhB1|W>A(`c$-Zej!gM1@1We{Xvo_ z!WuXPbAxWw-x@@-Lr*P3>+#<@Do&vEw0K#~ z;!XUpkCSZ<=Mj1*LVh0P=>h-GHp3E>a$(=Ve0QS4?$9XeWH+SDjMqF=55CqqQiJsH zW>d^>(x%`!bC#l6|MVoZ&&!hi@NuIl@U}FC_uJa#XoTOswG56D6`Gony|wnW`YJ;e z=O9kv#V4QxY&9Drwmluc$i33#85?y30+tlWGQ`}sfhp66YzL{9l@BT5k~!KPyVJbS zj{HHBCyzhkppiGA*wqrJ<#X<4Q>eWXpM^uo6Hn(vX zwA2ck{2WsIq^@M2lHnS{WE>JMlTqfdIAGYhJPrz(gPjB#BLG(^5i_K%P;cC2Sar`F5wXRDOZ-?RGt-K zcFPV@A!!{!x*Qvg8l1Vwx0V%G+~ZX(1Pcf$QySmly!Tx+ZVQl=>=k(qxB4tnw< zJlS)+E!rJFx7<;n$BwF98vUNCz9CG2Dj*WAoY@p~OZjC3Sto8TB$~3)6=U6cS@47L zy~~b@2SUQEw@(^6RIFfm8Z?&uimXrMVBe@+e4w#6ALWS? z_MyptTN}`WPv~m!(YKFiYVuk{d4M+Jc*dk+^WNYSCF?X5O})~u!h~N@_r4qeKUonL zTMDf}${;1OT>cMg&t|P1t7zz2W56!0_4^6wD2+e#3~z=eORqz;MU;L=0E$8%=1O0V z=pwU9>#L}+5(k|sz6#l*)Q+y7bo6dOt8qgZ6zH&@*RDYX8)%dvWgeQQ@kb!Fym?Ve z?>2g?0tTtyQ?xYASx`?B|v7IJT3Jq|> z;SA(HTZwlr0k@C*9wqFcSlk5^@67li6YOqkvY)r+9n*zX;x%2OEG1y(}N z%KJI~8+5!SWQIL@2&>?8W(@e;;Te9K=F}P0Yst9ZXKKP!FNjOwyc>bZTT9maz5XVA zmjYqCBtf&uRH#AFId1eKscYup@9+41ZMLXz&+;DE47nMB)BYyu@ zFrKLh>&72Pt2Ro80|Y;?iH|=D#=U{V8`pcRSv95-sgwcjf<@;6puR`+{zT1w^4pM+ zIWAdP|3^M#-XyxNXx%1<@*%p+W+4;-4fTC|VT$H`wMw9=!L+QO)|UCw;UU8)F{WE1 z?Q(*@X)=)PdB5+{uz?WEELCP9uV_3L? zY3KhcYNyK_{s3{t%P$~wL>g@GT)KCS!acqEvOuON-SpTO4LzBp$%GVx>t7U3=49|VUlHN$#s7a6RPw4 zLA$HNwPwJ#gIJ_iwzP^Ta|-;$Gu`s%=u@!alJ&Ovo)XVP`W@qvwt7#0^<2Ue=;^xD z#6eAwP!8#PY<{H3(pd;?3CGq|{6O(;p0R03Q`F5S%f*Be)YEuuWc(3XA>3ZDsl>cB z?JpckU@WxFH%hE7_SbgTFYBH>cyHt!d^1?{8%dPHi*OFyA0>Oc&x}!R8oeKF;Zlsb zyeogU|2lj1=(Jg@(Qx=o0O~B919$e+KG>e-w2G$8@nhYmb?g;z@5m38~zGi z&2nj|jv2Zha9VsD_&O>!=)t&D* z*cP?!#jQk(weny6?jlhhsyj>?WAe12mLT>8RAv2jHZ0r`HS^puhA$i1pv9gh(8a~u z-d1|3L$qdm4=uVU*D*s;Tas1eR|+o zQTcx!g{-?_LD-q$qP9ZYeDzYIX5up@&E8P7?td?3m*P*M7U)Hdw50s!wgr^r=50%g z-|qX`4ykmkl74+Ko-Y2=&DX@<(8w|tnm#PFEg~8~x5{+U=Maj61p9Ya#rn8B*_G;g ze}lvjW$o0Q;Rnt za~;HZw)ZttJBPL5W1iRk24M_k(9|B=pKL)lu~FS%mDZl8=cBo!k-=`}#;qIV<^^F+ zAqFpS%V2!@Wq7kc-KT{*oh8cslbUn8+l=8f_v4u# zJkw|=3^uEFDi(#e!WT0~nMsvrM)aRgZS$AZ z5LQh+{JN*BK|*>Sz83v6ebFAYsWP{^fv;5{O3b%?>a(6jt$*Q+p?zVyFQ>@GLPbFmotaX(oxBW5*9Y66S z0=E~p9+vqBT*Xgb_wM~bacEw-@s*CzLPAY!^}~3$7FWlpsI+!{&R=#MK$%}xsDl}7 zdbYF{Op&L*%S*L*4puU0TSWaCX|;rK=nlAz#k{y#uG1J^?v6^EH2#oX5qBtrz_EL8 z9sXQ;pHfvkKG>uDVd812Z=Oe4$j71A_hYOVw;0{yu%Heh%F{o1$gyheq&fza4${cf zmsRFfV=p^5F;9gtVz!X)Yqi@GI&!4AQNhI&53c^~A)lCC$!>KJXx#hosa_ji*PLY; zpsEi8hp6Jr2LrL+ks_LivvWw;#`V*6bHDxhis6Zx@-OFT{7|ds(oVg?rIqiKrU$DY z)QkmmO!q9Jes%}ju(_yLYF#ZA#PxYUNHjcI^M`y=JdF3U6Lr8lb^Y0}J)-rq^RX?S zYZ$6u(gv-cs}=CQQ|yGp+J5Smwg;bzU!xDc=74)?<)$`yHP3Fxty8$vSgJ*_@?V2@ zX<>4Im1tkFe27FR=nRMVMm*JBKN4#*c8WCCaO_>o$sJqH^cxT!+39fpv>V$DHsq38 z2G-Y+*g___-F#V)c9%bUaDMdm?=V+4 z>x_hr6J5g4wDKoI0;T~GJ6C9-Rz~?d7!(^mJu2A-UvbPBdt}~ByhZ)RP!&7_E77v` zPivsgSWJ1_xNtM|St2@WnBm9lf7EEWt?yP_!%P=UQJCPdP>ek7zC+5xY z$-pl@p(##8$BSc^%~ksCC-#eZIY3Shh4Iu-z*8|ErLL9y$?IP=9jY9D%$xrS!=`Eh ze8zpg+4N$PBsHnXOy|ff$%TjeS{i%b(1yJCsH33X@)m8ds`5zGe#vc8ZKBH@il+ny zSl5qP9CJ|cg<-i4i5K68Chc%Nt))_GVMWwtMJRWBRJg5VD@pg=>gH8-I9s0;DNX|S zi#LKVdwI+GNP>nOmBC$$;7eFrQIAQh_==^z-?_Cc6=}TYn@xXB)=NxUuNN!uRsp7A z5ovryR^4>$-EM}e_UzcJ;wzRozjNuti9dU#jFH-zODkyY3hOv+T(XzTndf~*FV8SM zKYSwFOBTV`ao!}+V{_zhW;9N7zW6>xsP)~+H{!}Z@9oK62hWV+W`1^5#E*XgdCPGs zUdK|tIvb`Aq;m;w?T&Y!zD@3nXdC5gAGK);2eyFT_D-6^DU(YcEb7?H%U%>IJ?Bd-J{JwR3dG5O#Ju<)ex>ba7K2GHas_ zqx8DPSc$8xf973|$PYx%RQ@z8umb^{G=2(Cd&!pX80_F^XST1T@<9XgS9V3M7m~MP z%lHdSn0d)M@xx0gmb~xF0G8lu?#~F?MH(wysER@Q3v#MQkYcfg0M3VKgUNRzq@SUf z?{X>>4^tBjJ8IV1h{hZUJzv}R6zlQj(ctEk2OJ4o)D-IGyOtZ}v$9MIv*mo@xj7wW zG`@N(_0)hLFW|yIUzdXeC|(g2?O%-d`+C;bGBBj{o@bE-`JMJ=uz*tCuf5?s(+mHA z^i^1XgT;PYPkqb1-m1=(-~4i0!C5K4`yj*V>jSC*Vf>uFONg@l%V6zxtK#`?cPl}8 z3}=0dwZrG?^F4#~igUt?>^Q#+Iw~S~^R=GLgR2m{N{P7awW91Sp!J28mRhmyse{Z> zqVT3i<{=RMt;ovp`oA4}3fda)Fze$C+n}^Gf+&FAs0Bd!v#j&JdF$p24nKTMfakc)N#8&YeD@oCOaJ*V^JW+8WEV_WKpQd{ zWk1Q5UZp{VR@n5uuAuZr7Wdo62E%1`{+U-ZcGT!KJs%aEwJx5`H*E0MZOf4+ji1)V zUgsLFWhr|mkGwIda5=+Leg%!?s`EK`rcSbpOt4A5beTbDX9;0-Oo*2Een(&h!gjS6 zoX+TA_X2(Qd78Jx*M!Ng`R$H(FSwt&4!88XEYJ%JwXUkV(@8mEx|P$T+vj6oA8K zvi&vVff3`DZ07QFl>RtM)qUo@P^yzbcR>{Ao5jZDsNmFC2U{v};ty^L+5N zcTn^=F^R9>4V{CspP>kY$UA!^A1)f2vQ%dzZm_}GYZ)pV$&8s4XAnn-Y4#LPcdNF| z=gcQmKj7N>Lcm*@4$+bE`E5~0P;*I?78^Lh;A z{t#NRXV}orWFuSQ83KGv=y@+&k#ANjHb$qIx^x{=J-R&d6OK@p+MaA(tVJ_6@Y}d$ zWJH)aPyVo1n%sYnu-$|_dp{Kfz)A8X-V)AsTr!zvJYeIQVQEf2dLCLti5coam!9{& ztKe#OOFqP_7}UiCwFzk()KxG3qQ64&)?4)9r*>#-=2$%+*s8l;^}yTlo)wouq9rxu zNMDU4&Lih$4{WyPQpPF}YVXG+4QEdY-||AeY1tFOzYu?5ulc1oTlz{ESsc@v6DJTd zV@sIG2MJkt(qQDM&b2Uxmp*g~&L$VOs{H0bc)BUta%b|*Cd2szu?dL~EEpbG%+vo- z^2Uzd&)yik@lo9LTex>d5btuMNRC{62=%++=f5W#7ZAibc&8A>d*N0s_I3CKxBsaz zqd$y6u!!D$UNv4S+={381;h;uPJ5#(ynwtQHxgzT3W*AmT>O^u(~@#=QpRXwnu{YP zK++ML@#IHxwH=M@1$lYhlI6ePnj*xS>*&wH7iZV^^z`dUo==Yqse*Y)gQrcJBlZSg zd^g|WN`|;G(L!UJ2Y=V<`__zoz;e7~s*`6?eAedOu4IPir(#RD-bxSZPth4Wjk4vz z^!_SiMxJL`h;U!G{&LCAdJ)H(8!^zgcH$k!oaLoQaPetN*~nh4*%E&;-~O@$c#V>gvQCvwrUlNaQie}80Hn#8O) zZ<5Bpzzg-@R4j0wisntOWSEC}UMiN_x~HwVuNC)UB{z>VlvYdv$!Z@mhZZz-WJ zrw1IR?w8S-sr&O?tpA;by%tunKW=n64Pki%w0EH2I&_0p}9VvE_J{`L? z&BUu2f<~({ynXfZXiErHDil|WlQMc}*@lO}I|>_csgC&pyis@lC1il#aPpU0=J_lZ zS)NjBF6#gUMi+u(O3quw$(5+v!_Ny!wzfF0tjg-IFlJbXu_$Kb(YTzACvjKMLWclI zjo^nW$dClvcEhPWpoLqN;U z*yu$#TPIA!r5>alM9Vy;(B40kf zyGQR|UZaNw-w_J8cH`Ckdj{+; zwLgRHuLIc$JmZE}ld8UbkiVG~ z3-+UrF2p{3!>Hay4uXfG!9RlW-eWGhUqEZOr{8ifak9-XPRM9SFJ$|kIv;lIh&8k1QO(IrqPsDi4jIm z9gyhwZ+u8x44R*KLfqAM8G=QmE>~^+xtEaQW|RfX7I>qlZ?qLffO#sL2kzwK(DVNJ zW`)}{x}9-mS4M|994cqbg%|3kT&E?-%NCMtHN~<_)xuFW3rtP1$qbe zGEwz@%G`Ds8W56wZYN$0gNjNQA6-=Mwx1+sopqoQRA!*c={J7 zcTJ*UP&CocD(iwT)RQxIm%Mq2h%;^|7{;|M$X|`dnaGB~qqsTrlnxT~d{i}#`k9v7 zw~~uMgq_mbL(!T2k+*_%7_)|wFCq`a@LZtTOF^&veK)ud))ybO5Yx5OX2rB2fi*V_`HG8BkGgrMYs?rPT=5yR z#IL=IfBI*eRmpROEaa!)v+;E?;4EBl$?@-__5w;c0q)|!h(+gH?1Aglmi zV7O@Zpo10al1@x{noV9$ehVl8%I-%!!Ee5d43Uk@o=XPWN-CT%H?XJgQmTX#)7aMr zsRA4Iz2O+DUjo<=HnJk12tzbp~fE#%Eb%glg7lzk%^}BWC zE_f&?ejh*(%7(Pgnj1Cn8W6rf$kL)52vMYIHshzk1S`&4LUq{z$B4`<9Di+n;a#MR>!h*Z_zeJbBp8`{C;`lkU-J`N4k^Co__u7w5CvPvDvsH#9#Z!cuU^T-{lAv3JrJt&e;-uZucYl>%4{3m zv287-nA*rv#3G1_X?N=g@fvzgo~#MpHU4XSV1k{DqMxm1{F)@>$? zG4p%g)9>FiulKy?yzlv3p6B^|)GeoZ7bV`!y|L`4h#Vz1#vc2C3Ci%E!6x0fo@{2^ILOk$?b&RNIJMX?R0kUzLRnO`}92zZ0k* zHrKenj^li)d^PeFmQKN+Hwd6GHoPnq`4-D!G!FTkq1`6?T+`|8vr~HPvo48}wIX6! zdIiS`nZh})B_E)XAF&q15Nu7?*!KA+ObW%dysNX2fgW4+=!1P?Z(-+t{ZUsL2WjBN z?Io%XP5*OS0`m)7qc(GP)CJRFs{@Jy_b=Qqv`(PLAClZG5c?opt0{JnX3?;sXWb{k zdj<1R)w&>|!d>L|o1vZULYR+|bVbQ%&6n3!XL1K#N9Ru|KOFFlXBoZq?GNcU8-S zF4fB}iuz6&+Ij7^lj?RR83w&{ifnPNy{9w-yfYUM8>N=l{&9xEuZ&yB-`l@H_|p#w zvN>TTR_n-YEIWA^$y99x^ZpRv0JBE4V{_6i&aze`Cl_s=I-@8ip=I^)sdfELPLbB2 zfYPeI4vKA?FJxh-(vHpe%0Hj2c^6L)MC)dS@-}jiwNn?J-lKMxUB{#CSl_ZQIG{7h zC@9n^a)QReSsM$&h`%V^Bbd&JtQ0LkTqz91Y?o>(vgVfW)3inSeUPm!vGvSlwh~nG zn%4O?+UFE*OGr<;`(ANZQZsXdnNjgb;(B3(Op#KP?I2%?3^1)~VbEPY>QCu878A>V zYVRAFX8vQxD|pDh-(SXT7c6Oh^#mXf9Tt{H?*|CESGMqLyZRb4n(@?MmS<&D=otP; zp(W}&V|FX{h4OzD@XbE5dzwuv3w6@O5c357mC(zKVPCJbXnZuxA37KDeCHXKLxBo# z*Ak<~`2WQ(_ZHgwZsZtWH2g3ZsM$%$j#(RaW|lWU(kMOz3Y;-!W-FVo*<{+7{TcJ+ zU;)NIO_5eTG~d}Vn!)iQxu_a2<${sVaMS|F-WZ! zAo4p$2GZtim$!4e;wp`>gxwMl)X1Y=mb#Sjk9GWH??;d!GlVa&t3Sp~(Kav;p3qDh z_m3Xa>UnagvBg$k&h<5REH6w~v`Kh8?_uD53}F))T~qNj_Iw3r)?~ANz6>CeqcmgG z_u^Y~)<#*Fr?07wdSr^(o8vp;SRr`GZrJ6xHtQ2PYt`AIb^&ZzX}*6APunAy+oZhF z0UW>br#msWk<(j^IZ|xMwKA1?mQLP(HQkpLGQFyeZ3N5~Awev|OU{=yn~w;Ahl@d}4PzH2mZn|F1i*Ets2OSriVw@(6p zKA5y}Mh2=6hxt>^Aq}w+*u}Qmtky0^Ztj=-QE#IAq_bUpQSN)iTS?9AGcLhp$5rm1 zXqqt0C&kKeaYO%#lJbM9vUUk?=~rkVwXR3c#L}1(0P)Eif&@r(=eXVzYqMH2o~FG3 zVessHxvG#^%r`D!&7A1hSaUw1k8dq-1Zp+XzYo~54Lhq+(>~0C*B)l~lAT;(5n46V z{KciRM2}h&M_DQ>HsxJ_#%zx8CusXxfpsk9I8UDInd2E~DxD(#0>PRzV$IffSGIYH zGZdEr?2P`w408CC@u@=+hSm@70#$p(k{xqiZSU^C?GBL7WO(Pp4W9K z{>_11e&0UJ* zS{}E8HA}_Qs!J+PJLe)$W=Zm|8`|kNDI@+8>90Wzvm##-LasC`vkQ`cL(jBr!!D<` z^T{I&ls2@@6+Q)va-MVVqmP$9cl#wnpGWwhjib^gQ?Aocd1cG5#mLJ~%JkZ*YQdD| z5?HBcon3-ij!9v}DK@IZb$%X-mgJ*NUJ_84*th2HRPyhuIqO=S|_Fr;&`&h@LRP%#W^bT2{ zs0SKG#=vzM5-Nm}p$NOqa^r+M9Aa`N&v6YApnJ#vXphhH?h=zoROjtjL^jlZ~Ot-szn8 ziV;x~u5Et>Ax2s)H2%i^B$-Jw_d_A0OZ#kYF24N~eZjvKQsqeSU=kX=D6Rm)rLT7; zsaYnRms2QLK|=3)8jRwj8o+Io_z2<;&Dm769R9${5hBU};>ncVIEHt7JLy!a)(IP! zL{im3{S8#*Un_wTD;A-HOp!0~Dn??5RP!TL^!~rDE`x~lJXX@OH+ZoP`z=M;W~VE1 z7jHU<#>BfYNg1uhFe!GlWq0Gp1K)7{Wn)m+1-L`O(V4W7sx)3vGEq&VN>-c5VhH0< zi~vru1Fdqp&rOjpPpgH1KVZDn!)vB66C^5B3Cn43!N>V-{zMY5{i>aBBsKVhCyj@; z^YP8PT_B+YBEP*R^-x@O`xEL1(|%rT%|~+~w`Lj}%h#p`#5kvB zB_R!t9(g?8R;%EEvHbuZ2{A@Q*ssF#GqBNY&&E4n9dK=)<9 z0e&OIa<8K=PrJRkQ(KGj_PMf$w_I@_&z&o9kjh0dxHbk-e`9kedVg4-iy++x^G7G{*g4mhOI}9CBJ~$*Bz8_Ss#tpi+ z;^VB=L!7j4;+ur4}V|4j=DUVLu*W9s8gAX=p_6Ukl@dhAcQ6FYJjr>l!34UQhvkrU6ZG z+Hb@~c!v84CQqUQUnonq(r3XP_qsgk1PtDnrsRJF95Ey8h83PF7C41cGK?;bkleJg z7IN=l!reK9J6ol=`!x>Dov~S5hb--PdJCw^@9pGFYrZpPo8mGgW1ePwiw>>3gC}A? ze^e`Q`;+=O5OrOOL{W?`^%c%%NZRp%pG7^huw*-_gY*H6k2S-BiuTU5+NAIxcPKFt zANrkK`hijQm1E#M?lNe+lUn~@J}{uU$cl=l(l(EkONLQ@(wu6a+dhXoig$?&eX^)$ z24;SI#lve6cPfncE?-8);jX$HskL8WHL)$l!CjuEt+`W~=U~T|0v+V4E*RQvCBghd zy``|V1perm4ioH=*rJ}wybRECd13r#TDu!Vp@kS}Z*oW1pR)*H(0>KfZY7E0Q+eqC zq=$Ja0Dk9jUtp-tPl+w2whSjKTK9dn8mHt5eM%7X$1r}v#cv@i8AdIMTOIA%gN4gf zm73I|cn}I`kb-$1z?E7m>ToTlp^c6P(rRau>-rGt^#+e;4?NPLf<8J4IRs)>Y+eE{ zW%uS^MWsn$_Cr0mq_z9>oA_s}Y;j-$5Q?o8#muKVBvI-NDt9e1S>w<>lFF3Yzf+yImvgu4jCvH9h!uF`t=xefNK&s z_w<_>XRH{Q*{B8;g5GN{w?>&MJg|(`wC)Ymg|pSKY4NdA@BJV(9Qta!P|R zwD%9u&9hQLP(-ijZ8NDg@p}X;0_Izxt}pbYiQC4|+X*c(5A__VyxF~- zW3?YsN8sSo^>eB(X@`~={J~tWQ5o)1B^ocq`>QFs+PoA=WgK&ZMy1)6UdF$KQxx8Y zxc|*BVAW1Bk|7iU4N8l@toys5#I^;_?vkpvo65U!c@Oh%cGt5q>;6vsP}Oj>>f#en^iy<~l_PQp^@s!i-rDu)#OR|r z)S6UmO~Z2Qelh0LuRl8SU_3OFyIFN%GNrSukbk!AHeQMujgZ;Ny+^m|P;<9WIR2#zisf5Jt)C zRxr@hItrx&1v6;YB~!RYbzusnzoIZ3;vCWVU2MzuVdNy2?(te2<*F5}yDNCS!7cf? zpG*b8e!&GgZFGV@Dn*w%uQpYi;8V9VZ}}|h9v>cfq)*+o^>w+@`QANs#2IftKt%f) zqek->##^exRXxPKmb<+_4S&{>MG`safEPwx(~3^Rola@1ptoNvHrD`!t`|lH4fm#q z@}{Sb>>x9}Id-Ua=gJb{*Qy|G%KQnbd-2)dKK()q<1u51>Tqb>Mgyo;E3wc$QhY&B zPel&KSW?%r!-#7ZGVxA~eV~>Jtc_#JH0t~^x%a`6%@nT25Au#}(Tdp47$&9Y)q2+{ zV~NUA;N;o8PGvzF(@#(`JKz3S#GUz~i|k_H_2rUTldR#zhTcg7ZLald;^Jk@wSm3EW+shjaT7f3W zwtfkxP3SWfx*(_PXCm8h51ts8Xf35$5T2DLEK?hCye^SXXgzO>b7CI@P2V+M-Eu1P z#beGB@-f?o6-3|M>og%9*k(wz)Kt-g++$W%_C=wnfq39m8LdUs@E!q$D(kXu^c6)%F z%kr3*(!iWB>JIWoQH(PMhoDptf@twW`dLWS;1z75Gs9gc6yOG z1S-0%kclcj4)%Ubmk4dJb{#jc+tn=8z1GYHh@u#;=r((KnqNtVWP+4Z3J({Bs3Ko36Cvpk*2OnNFLBcybnZ%M{n0@*VW2(1&In0D1{{giQ8-jLRBV zw>_0Qd-~3M!8{ztdI!sxE;#Dhq0DmwP%C?|z&kRV-5buh$CH(!dAi{nf5Jy1myKm^ z(egK!*D04|569$e7Z9UfzdNk$b-r_V|DEKDY&a*~yixl=!LG~r%Cf1Eu1m;b z$62{*t;vG+8B)U;LKdk4)35XIQ3kbuyVYx^bh{ofiT0E8V2|t*f4h0q*(71qf(>DLwF04Q@XlD{0n~darlf6OFwvKxl}R! z(J=FRDs?PFjwb38U_rC%m6l@9K=wJSYg+zS6Iv>c{==u=5AqO4M#TFI_oTEXvfu$aLHjGgXlzD`e2t)6WcW_h1bRqdleMl^uyFRs=G-junQd^kN zd5fgEdgoYrWP4cz{C}yfQF#?oE}B%CfC)ibes9hq|m)QmvUc$v%+L8$8iTYCyINj$mmC<#)-!8ar8nwb^EzDw9dYTw8f*qFsK(#=b%eDnOL43aCJ5noJzqU#DwjRLOi-#sr<|`X3 zhV_y4q2KNGitI>LQ#4dF4^8zezh67*EW zFg^vJ`=#n4&n(9ez?~G|YWkOh>Fv>*>gk>dyq`gaXxu3C3(p>VSsuSx9;sonvhvBQ z5~(TVN@oM92uV`yxhe*^4!Dq4M$JvBA1JQCTXd?frF29%O2Pq#Y4Jtj22?BQ+n zh<2D3bQxQNkluNUd{ZjHud(rW20!Fq>Jdz#wJ?vT+*^?8xi6R-mAG8*49lF{Ct#Qq zVZ?iUL&WfZYb`=GVNzkkiyO>_b(}b2I}3iL1y!E8XoYSypF4IUxiqy}K5r!Bskya4 z8~1>OganYFcFXqYt*OkIdR0+8G0cDaoR_eU7h)@GMeqkYu-kC~1Lo~{``R{w^dI=* zDoXjix&;HY7KD(yn9Ka|pC%Q3pvC@nkoTvWI_53D(rP7w=o}?sW<1M7vOnqKX?Op2 zdrPiLT%FL;B}!c73SB|%bFX$W)ac2aCtby7lgr4$3UX=TV`pgBKf{{A^9YB}NhYVi{&(K|Z+J(&!FUoqj@Lu))ft?Cr*hM7!M|m+3mN`g-hAiv3zWhP zEBIe1_m6f>Gwbi0;MI41N~dKihi>40hNs0iN)Sr>lL|A_fS}EgxWh5tcDQ6awgZ7Q z%-N6Q;a-D{!x71~{NLL$EaJ-R9vIt8xwhpsfHRMB=s`JY(^z3cPd9-g3xd&bs&&i}KmOOcS!YpD482j*oDrn?h2B(b@cAgkwT zr4zCad{8dzIrDX=Z@y0`6kpT6;Igk3ssH?aNBq3v2p%NF&u2*b&NK0i1?N67kO}4K z1XfJqZM%tVcdY;KccuycNiMPsfZpwc@kj;l-y*&`p=jT5`=P`J181mH6Z;}JZ;LkF zoLS)@y@D{cIWMY*<_@c}$P#?ClDuTyj=s#H{1Z#r3l8@uspaO1@1HHRmp<#Oc%g1x zS{pyVNZTfU8+kUTEyEFoVCaG%pDt@)9etmqnHgoGeEV$e>P!RW+XGBTh8U$7_pj2+ z0IS4M6kT<{UeOJ(&B3Tq3?cQ~<&$Dl4Uh_efY?ONut$X-jUC-1F@vG89g%q+Ao@t? zbd4GbUcXc?-a&e4F!61dGf?{|Q9u5B3JfM%iJqZFZ5zl}0XCU{`GpTc3n9)Z^KeM) zVYF#-z$R{{)!6D=K^f(=LjFU*xhg)~6N^%>F~j+qsHYzU9VSea>=Q!W3mXJ7^B64k}nut3uryy~0P z(m2mR-goMas4R&o+rw Date: Thu, 6 Feb 2025 10:39:49 -0800 Subject: [PATCH 088/262] Update package.json --- extensions/vscode/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/vscode/package.json b/extensions/vscode/package.json index 5ef76d3dc..406064ffb 100644 --- a/extensions/vscode/package.json +++ b/extensions/vscode/package.json @@ -213,7 +213,7 @@ { "command": "continue.toggleFullScreen", "category": "Continue", - "title": "Toggle Full Screen", + "title": "Open in new window", "icon": "$(link-external)", "group": "Continue" }, From dcf6c10ffb6100a7e144d241a250ff077c5928a1 Mon Sep 17 00:00:00 2001 From: Nate Date: Thu, 6 Feb 2025 11:43:16 -0800 Subject: [PATCH 089/262] prioritize org over user secrets --- packages/config-yaml/src/interfaces/index.ts | 14 +++++++------- packages/config-yaml/src/load/clientRender.ts | 19 +++++++------------ packages/config-yaml/test/index.test.ts | 2 ++ 3 files changed, 16 insertions(+), 19 deletions(-) diff --git a/packages/config-yaml/src/interfaces/index.ts b/packages/config-yaml/src/interfaces/index.ts index 3bbd17d92..f8db8b1d4 100644 --- a/packages/config-yaml/src/interfaces/index.ts +++ b/packages/config-yaml/src/interfaces/index.ts @@ -36,7 +36,13 @@ export async function resolveFQSN( const reversedSlugs = [...fqsn.packageSlugs].reverse(); const locationsToLook: SecretLocation[] = [ - // Packages first + // Organization first + ...reversedSlugs.map((slug) => ({ + secretType: SecretType.Organization as const, + orgSlug: slug.ownerSlug, + secretName: fqsn.secretName, + })), + // Then packages ...reversedSlugs.map((slug) => ({ secretType: SecretType.Package as const, packageSlug: slug, @@ -48,12 +54,6 @@ export async function resolveFQSN( userSlug: currentUserSlug, secretName: fqsn.secretName, }, - // Then organization - ...reversedSlugs.map((slug) => ({ - secretType: SecretType.Organization as const, - orgSlug: slug.ownerSlug, - secretName: fqsn.secretName, - })), ]; // Then try to get the secret from each location diff --git a/packages/config-yaml/src/load/clientRender.ts b/packages/config-yaml/src/load/clientRender.ts index 63bca7e0e..d55d694af 100644 --- a/packages/config-yaml/src/load/clientRender.ts +++ b/packages/config-yaml/src/load/clientRender.ts @@ -14,7 +14,7 @@ import { export async function clientRender( unrolledConfigContent: string, - secretStore: SecretStore, + clientSecretStore: SecretStore, platformClient?: PlatformClient, ): Promise { // 1. First we need to get a list of all the FQSNs that are required to render the config @@ -23,16 +23,9 @@ export async function clientRender( // 2. Then, we will check which of the secrets are found in the local personal secret store. Here we’re checking for anything that matches the last part of the FQSN, not worrying about the owner/package/owner/package slugs const secretsTemplateData: Record = {}; - const unresolvedFQSNs: FQSN[] = []; - for (const secret of secrets) { - const fqsn = decodeFQSN(secret.replace("secrets.", "")); - const secretValue = await secretStore.get(fqsn.secretName); - if (secretValue) { - secretsTemplateData[secret] = secretValue; - } else { - unresolvedFQSNs.push(fqsn); - } - } + const unresolvedFQSNs: FQSN[] = secrets.map((secret) => { + return decodeFQSN(secret.replace("secrets.", "")); + }); // Don't use platform client in local mode if (platformClient) { @@ -46,7 +39,9 @@ export async function clientRender( } if ("value" in secretResult) { - secretStore.set(secretResult.fqsn.secretName, secretResult.value); + // clientSecretStore.set(secretResult.fqsn.secretName, secretResult.value); + // const secretValue = await clientSecretStore.get(fqsn.secretName); + secretsTemplateData[encodeFQSN(secretResult.fqsn)] = secretResult.value; } secretsTemplateData["secrets." + encodeFQSN(secretResult.fqsn)] = diff --git a/packages/config-yaml/test/index.test.ts b/packages/config-yaml/test/index.test.ts index 8bba163ce..9573b8ae3 100644 --- a/packages/config-yaml/test/index.test.ts +++ b/packages/config-yaml/test/index.test.ts @@ -176,4 +176,6 @@ describe("E2E Scenarios", () => { ); expect(geminiSecretValue2).toBe("gemini-api-key"); }); + + it.skip("should prioritize org over user / package secrets", () => {}); }); From a1ff2f57419ecc700dd9d435c597f3f1c749fb8f Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Thu, 6 Feb 2025 12:25:06 -0800 Subject: [PATCH 090/262] fix templateMessages null logic --- core/llm/autodetect.ts | 7 +++++-- core/llm/index.ts | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/core/llm/autodetect.ts b/core/llm/autodetect.ts index 8232f8288..ed1901641 100644 --- a/core/llm/autodetect.ts +++ b/core/llm/autodetect.ts @@ -1,4 +1,4 @@ -import { ModelCapability, TemplateType } from "../index.js"; +import { ChatMessage, ModelCapability, TemplateType } from "../index.js"; import { anthropicTemplateMessages, @@ -257,7 +257,10 @@ function autodetectTemplateFunction( const templateType = explicitTemplate ?? autodetectTemplateType(model); if (templateType) { - const mapping: Record = { + const mapping: Record< + TemplateType, + null | ((msg: ChatMessage[]) => string) + > = { llama2: llama2TemplateMessages, alpaca: templateAlpacaMessages, phi2: phi2TemplateMessages, diff --git a/core/llm/index.ts b/core/llm/index.ts index da1825407..4989f14fa 100644 --- a/core/llm/index.ts +++ b/core/llm/index.ts @@ -191,7 +191,8 @@ export abstract class BaseLLM implements ILLM { options.model, this.providerName, options.template, - ); + ) ?? + undefined; this.writeLog = options.writeLog; this.llmRequestHook = options.llmRequestHook; this.apiKey = options.apiKey; @@ -957,7 +958,9 @@ export abstract class BaseLLM implements ILLM { this.providerName, autodetectTemplateType(this.model), ); - return templateMessages(rendered); + if (templateMessages) { + return templateMessages(rendered); + } } return rendered; } From 9140c1ea81f06f9e0756d4226b9d6bb87e3858c5 Mon Sep 17 00:00:00 2001 From: Adam Shedivy Date: Thu, 6 Feb 2025 16:47:48 -0600 Subject: [PATCH 091/262] Refactor reloadConfig method to use class property for additional context providers --- core/config/ConfigHandler.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/config/ConfigHandler.ts b/core/config/ConfigHandler.ts index 4ad045d30..4638613b9 100644 --- a/core/config/ConfigHandler.ts +++ b/core/config/ConfigHandler.ts @@ -365,11 +365,11 @@ export class ConfigHandler { this.updateListeners.push(listener); } - async reloadConfig(additionalContextProviders: IContextProvider[] = []) { + async reloadConfig() { // TODO: this isn't right, there are two different senses in which you want to "reload" const { config, errors, configLoadInterrupted } = - await this.currentProfile.reloadConfig(additionalContextProviders); + await this.currentProfile.reloadConfig(this.additionalContextProviders); if (config) { this.inactiveProfiles.forEach((profile) => profile.clearConfig()); @@ -419,6 +419,6 @@ export class ConfigHandler { registerCustomContextProvider(contextProvider: IContextProvider) { this.additionalContextProviders.push(contextProvider); - void this.reloadConfig(this.additionalContextProviders); + void this.reloadConfig(); } } From c6eb626c82e18ccfb63f3bddbe029ede28335199 Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Thu, 6 Feb 2025 15:11:03 -0800 Subject: [PATCH 092/262] remove LocalAfterFreeTrial --- core/config/onboarding.ts | 21 ------------------- core/core.ts | 5 ----- core/protocol/core.ts | 7 +------ .../tabs/OnboardingLocalTab.tsx | 6 +----- 4 files changed, 2 insertions(+), 37 deletions(-) diff --git a/core/config/onboarding.ts b/core/config/onboarding.ts index 426a7a4ba..e042a6f8f 100644 --- a/core/config/onboarding.ts +++ b/core/config/onboarding.ts @@ -68,24 +68,3 @@ export function setupQuickstartConfig( }, }; } - -export function setupLocalConfigAfterFreeTrial( - config: SerializedContinueConfig, -): SerializedContinueConfig { - return { - ...config, - models: [ - { - title: LOCAL_ONBOARDING_CHAT_TITLE, - provider: "ollama", - model: LOCAL_ONBOARDING_CHAT_MODEL, - }, - { - title: ONBOARDING_LOCAL_MODEL_TITLE, - provider: "ollama", - model: "AUTODETECT", - }, - ...config.models.filter((model) => model.provider !== "free-trial"), - ], - }; -} diff --git a/core/core.ts b/core/core.ts index edfbc6c95..a0586344e 100644 --- a/core/core.ts +++ b/core/core.ts @@ -11,7 +11,6 @@ import { SYSTEM_PROMPT_DOT_FILE } from "./config/getSystemPromptDotFile"; import { setupBestConfig, setupLocalConfig, - setupLocalConfigAfterFreeTrial, setupQuickstartConfig, } from "./config/onboarding"; import { addContextProvider, addModel, deleteModel } from "./config/util"; @@ -734,10 +733,6 @@ export class Core { editConfigJsonCallback = setupQuickstartConfig; break; - case "LocalAfterFreeTrial": - editConfigJsonCallback = setupLocalConfigAfterFreeTrial; - break; - case "Best": editConfigJsonCallback = setupBestConfig; break; diff --git a/core/protocol/core.ts b/core/protocol/core.ts index 64bc5f5d4..964b46138 100644 --- a/core/protocol/core.ts +++ b/core/protocol/core.ts @@ -28,12 +28,7 @@ import type { ToolCall, } from "../"; -export type OnboardingModes = - | "Local" - | "Best" - | "Custom" - | "Quickstart" - | "LocalAfterFreeTrial"; +export type OnboardingModes = "Local" | "Best" | "Custom" | "Quickstart"; export interface ListHistoryOptions { offset?: number; diff --git a/gui/src/components/OnboardingCard/tabs/OnboardingLocalTab.tsx b/gui/src/components/OnboardingCard/tabs/OnboardingLocalTab.tsx index 76ba5bf5c..7fc0d1d69 100644 --- a/gui/src/components/OnboardingCard/tabs/OnboardingLocalTab.tsx +++ b/gui/src/components/OnboardingCard/tabs/OnboardingLocalTab.tsx @@ -8,7 +8,6 @@ import { useContext, useEffect, useState } from "react"; import { useDispatch } from "react-redux"; import { Button } from "../.."; import { IdeMessengerContext } from "../../../context/IdeMessenger"; -import { hasPassedFTL } from "../../../util/freeTrial"; import AddModelButtonSubtext from "../../AddModelButtonSubtext"; import OllamaModelDownload from "../components/OllamaModelDownload"; import { OllamaStatus } from "../components/OllamaStatus"; @@ -25,10 +24,7 @@ interface OnboardingLocalTabProps { function OnboardingLocalTab({ isDialog }: OnboardingLocalTabProps) { const dispatch = useDispatch(); const ideMessenger = useContext(IdeMessengerContext); - const { submitOnboarding } = useSubmitOnboarding( - hasPassedFTL() ? "LocalAfterFreeTrial" : "Local", - isDialog, - ); + const { submitOnboarding } = useSubmitOnboarding("Local", isDialog); const [hasLoadedChatModel, setHasLoadedChatModel] = useState(false); const [downloadedOllamaModels, setDownloadedOllamaModels] = useState< string[] From 4e38172202c00a73ddcf076f7bf6717515875d42 Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Thu, 6 Feb 2025 16:00:02 -0800 Subject: [PATCH 093/262] local onboarding edits --- core/config/ConfigHandler.ts | 4 +- core/config/onboarding.ts | 3 +- .../components/OllamaModelDownload.tsx | 4 +- .../components/OllamaStatus.tsx | 13 +++-- .../tabs/OnboardingLocalTab.tsx | 51 ++++++++++++------- 5 files changed, 47 insertions(+), 28 deletions(-) diff --git a/core/config/ConfigHandler.ts b/core/config/ConfigHandler.ts index 4ad045d30..5ae2c2275 100644 --- a/core/config/ConfigHandler.ts +++ b/core/config/ConfigHandler.ts @@ -27,7 +27,7 @@ import { localPathToUri } from "../util/pathToUri.js"; import { LOCAL_ONBOARDING_CHAT_MODEL, - ONBOARDING_LOCAL_MODEL_TITLE, + LOCAL_ONBOARDING_PROVIDER_TITLE, } from "./onboarding.js"; import ControlPlaneProfileLoader from "./profile/ControlPlaneProfileLoader.js"; import LocalProfileLoader from "./profile/LocalProfileLoader.js"; @@ -401,7 +401,7 @@ export class ConfigHandler { const { config } = await this.loadConfig(); const model = config?.models.find((m) => m.title === title); if (!model) { - if (title === ONBOARDING_LOCAL_MODEL_TITLE) { + if (title === LOCAL_ONBOARDING_PROVIDER_TITLE) { // Special case, make calls to Ollama before we have it in the config const ollama = new Ollama({ model: LOCAL_ONBOARDING_CHAT_MODEL, diff --git a/core/config/onboarding.ts b/core/config/onboarding.ts index e042a6f8f..fc327accc 100644 --- a/core/config/onboarding.ts +++ b/core/config/onboarding.ts @@ -3,10 +3,11 @@ import { SerializedContinueConfig } from "../"; import { FREE_TRIAL_MODELS } from "./default"; export const TRIAL_FIM_MODEL = "codestral-latest"; -export const ONBOARDING_LOCAL_MODEL_TITLE = "Ollama"; +export const LOCAL_ONBOARDING_PROVIDER_TITLE = "Ollama"; export const LOCAL_ONBOARDING_FIM_MODEL = "qwen2.5-coder:1.5b-base"; export const LOCAL_ONBOARDING_CHAT_MODEL = "llama3.1:8b"; export const LOCAL_ONBOARDING_CHAT_TITLE = "Llama 3.1 8B"; +export const LOCAL_ONBOARDING_EMBEDDINGS_MODEL = "nomic-embed-text:latest"; /** * We set the "best" chat + autocopmlete models by default diff --git a/gui/src/components/OnboardingCard/components/OllamaModelDownload.tsx b/gui/src/components/OnboardingCard/components/OllamaModelDownload.tsx index 7a4eede07..b68b3fc09 100644 --- a/gui/src/components/OnboardingCard/components/OllamaModelDownload.tsx +++ b/gui/src/components/OnboardingCard/components/OllamaModelDownload.tsx @@ -27,13 +27,13 @@ function OllamaModelDownload({ return (
-

{title}

+

{title}

{hasDownloaded ? ( ) : ( <> -

{command}

+

{command}

diff --git a/gui/src/components/OnboardingCard/components/OllamaStatus.tsx b/gui/src/components/OnboardingCard/components/OllamaStatus.tsx index 15132518e..24a9f511d 100644 --- a/gui/src/components/OnboardingCard/components/OllamaStatus.tsx +++ b/gui/src/components/OnboardingCard/components/OllamaStatus.tsx @@ -2,7 +2,7 @@ import { ArrowPathIcon, ArrowTopRightOnSquareIcon, } from "@heroicons/react/24/outline"; -import { useState, useContext } from "react"; +import { useState, useContext, useEffect } from "react"; import { IdeMessengerContext } from "../../../context/IdeMessenger"; import { providers } from "../../../pages/AddNewModel/configs/providers"; import { StyledActionButton } from "../.."; @@ -19,10 +19,15 @@ export function OllamaStatus({ isOllamaConnected }: OllamaStatusProps) { const ideMessenger = useContext(IdeMessengerContext); const [status, setStatus] = useState( - isOllamaConnected - ? OllamaConnectionStatuses.Connected - : OllamaConnectionStatuses.WaitingToDownload, + OllamaConnectionStatuses.WaitingToDownload, ); + useEffect(() => { + if (isOllamaConnected) { + setStatus(OllamaConnectionStatuses.Connected); + } else if (status !== OllamaConnectionStatuses.Downloading) { + setStatus(OllamaConnectionStatuses.WaitingToDownload); + } + }, [status, isOllamaConnected]); function onClickDownload() { ideMessenger.post("openUrl", downloadUrl); diff --git a/gui/src/components/OnboardingCard/tabs/OnboardingLocalTab.tsx b/gui/src/components/OnboardingCard/tabs/OnboardingLocalTab.tsx index 7fc0d1d69..2894530cb 100644 --- a/gui/src/components/OnboardingCard/tabs/OnboardingLocalTab.tsx +++ b/gui/src/components/OnboardingCard/tabs/OnboardingLocalTab.tsx @@ -1,8 +1,9 @@ import { LOCAL_ONBOARDING_CHAT_MODEL, LOCAL_ONBOARDING_CHAT_TITLE, + LOCAL_ONBOARDING_EMBEDDINGS_MODEL, LOCAL_ONBOARDING_FIM_MODEL, - ONBOARDING_LOCAL_MODEL_TITLE, + LOCAL_ONBOARDING_PROVIDER_TITLE, } from "core/config/onboarding"; import { useContext, useEffect, useState } from "react"; import { useDispatch } from "react-redux"; @@ -33,17 +34,28 @@ function OnboardingLocalTab({ isDialog }: OnboardingLocalTabProps) { const [isOllamaConnected, setIsOllamaConnected] = useState(false); const hasDownloadedChatModel = Array.isArray(downloadedOllamaModels) - ? downloadedOllamaModels.some((ollamaModel) => - ollamaModel.startsWith(LOCAL_ONBOARDING_CHAT_MODEL), + ? downloadedOllamaModels.some( + (ollamaModel) => ollamaModel === LOCAL_ONBOARDING_CHAT_MODEL, ) : false; const hasDownloadedAutocompleteModel = Array.isArray(downloadedOllamaModels) - ? downloadedOllamaModels.some((ollamaModel) => - ollamaModel.startsWith(LOCAL_ONBOARDING_CHAT_MODEL), + ? downloadedOllamaModels.some( + (ollamaModel) => ollamaModel === LOCAL_ONBOARDING_FIM_MODEL, ) : false; + const hasDownloadedEmbeddingsModel = Array.isArray(downloadedOllamaModels) + ? downloadedOllamaModels.some( + (ollamaModel) => ollamaModel === LOCAL_ONBOARDING_EMBEDDINGS_MODEL, + ) + : false; + + const allDownloaded = + hasDownloadedAutocompleteModel && + hasDownloadedChatModel && + hasDownloadedEmbeddingsModel; + /** * The first time we detect that a chat model has been loaded, * we send an empty request to load it @@ -53,7 +65,7 @@ function OnboardingLocalTab({ isDialog }: OnboardingLocalTabProps) { ideMessenger.post("llm/complete", { completionOptions: {}, prompt: "", - title: ONBOARDING_LOCAL_MODEL_TITLE, + title: LOCAL_ONBOARDING_PROVIDER_TITLE, }); setHasLoadedChatModel(true); @@ -64,18 +76,11 @@ function OnboardingLocalTab({ isDialog }: OnboardingLocalTabProps) { const fetchDownloadedModels = async () => { try { const result = await ideMessenger.request("llm/listModels", { - title: ONBOARDING_LOCAL_MODEL_TITLE, + title: LOCAL_ONBOARDING_PROVIDER_TITLE, }); if (result.status === "success") { - // TODO - temporary fix, see notes - // https://github.com/continuedev/continue/pull/3059 - if (Array.isArray(result.content)) { - setDownloadedOllamaModels(result.content); - setIsOllamaConnected(true); - } else { - setDownloadedOllamaModels([]); - setIsOllamaConnected(false); - } + setDownloadedOllamaModels(result.content ?? []); + setIsOllamaConnected(!!result.content); } else { throw new Error("Failed to fetch models"); } @@ -96,9 +101,11 @@ function OnboardingLocalTab({ isDialog }: OnboardingLocalTabProps) { }, []); return ( -
+
-

Install Ollama

+

+ Install Ollama +

@@ -114,6 +121,12 @@ function OnboardingLocalTab({ isDialog }: OnboardingLocalTabProps) { hasDownloaded={hasDownloadedAutocompleteModel} /> + +
From 16d7e0a9266461f8abc4e1d60e1c70bdb1a7f3e7 Mon Sep 17 00:00:00 2001 From: Nate Date: Thu, 6 Feb 2025 17:53:57 -0800 Subject: [PATCH 094/262] fix opt+enter when currentFile ctx provider not configured --- core/core.ts | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/core/core.ts b/core/core.ts index 32be84cda..4b5e07b81 100644 --- a/core/core.ts +++ b/core/core.ts @@ -53,6 +53,8 @@ import { type IndexingProgressUpdate, } from "."; +import CodebaseContextProvider from "./context/providers/CodebaseContextProvider"; +import CurrentFileContextProvider from "./context/providers/CurrentFileContextProvider"; import type { FromCoreProtocol, ToCoreProtocol } from "./protocol"; import type { IMessenger, Message } from "./protocol/messenger"; @@ -365,9 +367,17 @@ export class Core { } const llm = await this.configHandler.llmFromTitle(selectedModelTitle); - const provider = config.contextProviders?.find( - (provider) => provider.description.title === name, - ); + const provider = + config.contextProviders?.find( + (provider) => provider.description.title === name, + ) ?? + [ + // user doesn't need these in their config.json for the shortcuts to work + // option+enter + new CurrentFileContextProvider({}), + // cmd+enter + new CodebaseContextProvider({}), + ].find((provider) => provider.description.title === name); if (!provider) { return []; } From ecec00b84aec0de2df9ba6dd790eb3a01b2ab868 Mon Sep 17 00:00:00 2001 From: Nate Date: Thu, 6 Feb 2025 17:55:03 -0800 Subject: [PATCH 095/262] update config-yaml version --- core/package-lock.json | 8 ++++---- core/package.json | 2 +- extensions/vscode/package-lock.json | 2 +- gui/package-lock.json | 10 +++++----- gui/package.json | 2 +- gui/src/redux/thunks/gatherContext.ts | 8 +++----- packages/config-yaml/package.json | 2 +- 7 files changed, 16 insertions(+), 18 deletions(-) diff --git a/core/package-lock.json b/core/package-lock.json index 4b2290060..814c77601 100644 --- a/core/package-lock.json +++ b/core/package-lock.json @@ -13,7 +13,7 @@ "@aws-sdk/client-sagemaker-runtime": "^3.621.0", "@aws-sdk/credential-providers": "^3.620.1", "@continuedev/config-types": "^1.0.13", - "@continuedev/config-yaml": "^1.0.25", + "@continuedev/config-yaml": "^1.0.26", "@continuedev/fetch": "^1.0.4", "@continuedev/llm-info": "^1.0.2", "@continuedev/openai-adapters": "^1.0.10", @@ -3038,9 +3038,9 @@ } }, "node_modules/@continuedev/config-yaml": { - "version": "1.0.25", - "resolved": "https://registry.npmjs.org/@continuedev/config-yaml/-/config-yaml-1.0.25.tgz", - "integrity": "sha512-pEiWNJIfKD8WBUXkRe8Ww8rmAl9zRU931kGuq8tJEJO6o9kwOxqd45dRJT6oFA4I/wRj93PkKjDE2QINNqoBwg==", + "version": "1.0.26", + "resolved": "https://registry.npmjs.org/@continuedev/config-yaml/-/config-yaml-1.0.26.tgz", + "integrity": "sha512-Fxu59+AR4S6WaoyyGysiQWVwMvQQt+pR68P1mVQGstDw4YpIghFioK0m6jXrN9vw1fJTIr6tFtcA9N41xI5mDQ==", "dependencies": { "@continuedev/config-types": "^1.0.14", "yaml": "^2.6.1", diff --git a/core/package.json b/core/package.json index 7afc752a6..d57fa66c2 100644 --- a/core/package.json +++ b/core/package.json @@ -46,7 +46,7 @@ "@aws-sdk/client-sagemaker-runtime": "^3.621.0", "@aws-sdk/credential-providers": "^3.620.1", "@continuedev/config-types": "^1.0.13", - "@continuedev/config-yaml": "^1.0.25", + "@continuedev/config-yaml": "^1.0.26", "@continuedev/fetch": "^1.0.4", "@continuedev/llm-info": "^1.0.2", "@continuedev/openai-adapters": "^1.0.10", diff --git a/extensions/vscode/package-lock.json b/extensions/vscode/package-lock.json index 2d0215b19..dabe51aff 100644 --- a/extensions/vscode/package-lock.json +++ b/extensions/vscode/package-lock.json @@ -106,7 +106,7 @@ "@aws-sdk/client-sagemaker-runtime": "^3.621.0", "@aws-sdk/credential-providers": "^3.620.1", "@continuedev/config-types": "^1.0.13", - "@continuedev/config-yaml": "^1.0.24", + "@continuedev/config-yaml": "^1.0.26", "@continuedev/fetch": "^1.0.4", "@continuedev/llm-info": "^1.0.2", "@continuedev/openai-adapters": "^1.0.10", diff --git a/gui/package-lock.json b/gui/package-lock.json index e77dcafc9..2519bc970 100644 --- a/gui/package-lock.json +++ b/gui/package-lock.json @@ -7,7 +7,7 @@ "name": "gui", "license": "Apache-2.0", "dependencies": { - "@continuedev/config-yaml": "^1.0.23", + "@continuedev/config-yaml": "^1.0.26", "@headlessui/react": "^1.7.17", "@heroicons/react": "^2.0.18", "@reduxjs/toolkit": "^2.3.0", @@ -108,7 +108,7 @@ "@aws-sdk/client-sagemaker-runtime": "^3.621.0", "@aws-sdk/credential-providers": "^3.620.1", "@continuedev/config-types": "^1.0.13", - "@continuedev/config-yaml": "^1.0.24", + "@continuedev/config-yaml": "^1.0.26", "@continuedev/fetch": "^1.0.4", "@continuedev/llm-info": "^1.0.2", "@continuedev/openai-adapters": "^1.0.10", @@ -556,9 +556,9 @@ } }, "node_modules/@continuedev/config-yaml": { - "version": "1.0.23", - "resolved": "https://registry.npmjs.org/@continuedev/config-yaml/-/config-yaml-1.0.23.tgz", - "integrity": "sha512-F2Hwc85iCwAHJuwJALOsmZIBeHdF+87mS0YT7dlC6QiE+zAhZKUHcLQ/nTt9bJuhyVyufpb9LApkp40UdGsaWw==", + "version": "1.0.26", + "resolved": "https://registry.npmjs.org/@continuedev/config-yaml/-/config-yaml-1.0.26.tgz", + "integrity": "sha512-Fxu59+AR4S6WaoyyGysiQWVwMvQQt+pR68P1mVQGstDw4YpIghFioK0m6jXrN9vw1fJTIr6tFtcA9N41xI5mDQ==", "dependencies": { "@continuedev/config-types": "^1.0.14", "yaml": "^2.6.1", diff --git a/gui/package.json b/gui/package.json index 4500287fa..8476573b2 100644 --- a/gui/package.json +++ b/gui/package.json @@ -15,7 +15,7 @@ "test:watch": "vitest" }, "dependencies": { - "@continuedev/config-yaml": "^1.0.23", + "@continuedev/config-yaml": "^1.0.26", "@headlessui/react": "^1.7.17", "@heroicons/react": "^2.0.18", "@reduxjs/toolkit": "^2.3.0", diff --git a/gui/src/redux/thunks/gatherContext.ts b/gui/src/redux/thunks/gatherContext.ts index 8bae5227e..6b1f11db4 100644 --- a/gui/src/redux/thunks/gatherContext.ts +++ b/gui/src/redux/thunks/gatherContext.ts @@ -6,12 +6,10 @@ import { MessageContent, RangeInFile, } from "core"; -import resolveEditorContent from "../../components/mainInput/resolveInput"; -import { ThunkApiType } from "../store"; -import { selectDefaultModel } from "../slices/configSlice"; -import { findUriInDirs, getUriPathBasename } from "core/util/uri"; import * as URI from "uri-js"; -import { v4 as uuidv4 } from "uuid"; +import resolveEditorContent from "../../components/mainInput/resolveInput"; +import { selectDefaultModel } from "../slices/configSlice"; +import { ThunkApiType } from "../store"; export const gatherContext = createAsyncThunk< { diff --git a/packages/config-yaml/package.json b/packages/config-yaml/package.json index 85bbe3ef3..6c620677e 100644 --- a/packages/config-yaml/package.json +++ b/packages/config-yaml/package.json @@ -1,6 +1,6 @@ { "name": "@continuedev/config-yaml", - "version": "1.0.25", + "version": "1.0.26", "description": "", "main": "dist/index.js", "types": "dist/index.d.ts", From d0d9e74da6e98a8ce394c33a6b6461e8ad0e2de3 Mon Sep 17 00:00:00 2001 From: Nate Date: Thu, 6 Feb 2025 19:52:49 -0800 Subject: [PATCH 096/262] adjust colors --- gui/src/components/gui/Tooltip.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gui/src/components/gui/Tooltip.tsx b/gui/src/components/gui/Tooltip.tsx index 6822dc06b..b1477ba73 100644 --- a/gui/src/components/gui/Tooltip.tsx +++ b/gui/src/components/gui/Tooltip.tsx @@ -1,17 +1,17 @@ import ReactDOM from "react-dom"; import { Tooltip } from "react-tooltip"; -import { vscForeground, vscInputBackground } from ".."; +import { vscBackground, vscForeground, vscInputBorder } from ".."; import { getFontSize } from "../../util"; const TooltipStyles = { fontSize: `${getFontSize() - 2}px`, - backgroundColor: vscInputBackground, + backgroundColor: vscBackground, + outline: `0.5px solid ${vscInputBorder}`, color: vscForeground, padding: "4px 8px", zIndex: 1000, maxWidth: "80vw", textAlign: "center", - overflow: "hidden", }; export function ToolTip(props: any) { From d8dac1168f56dcf5396e2b8fc372f2b37200cdf1 Mon Sep 17 00:00:00 2001 From: Nate Date: Thu, 6 Feb 2025 20:13:44 -0800 Subject: [PATCH 097/262] focus border --- gui/src/components/index.ts | 8 ++++++ gui/src/components/mainInput/TipTapEditor.tsx | 25 ++++++++----------- 2 files changed, 19 insertions(+), 14 deletions(-) diff --git a/gui/src/components/index.ts b/gui/src/components/index.ts index d1892bff8..8c2c7aad7 100644 --- a/gui/src/components/index.ts +++ b/gui/src/components/index.ts @@ -26,6 +26,10 @@ export const VSC_DIFF_REMOVED_LINE_BACKGROUND_VAR = "--vscode-diffEditor-removedLineBackground"; export const VSC_DIFF_INSERTED_LINE_BACKGROUND_VAR = "--vscode-diffEditor-insertedLineBackground"; +export const VSC_COMMAND_CENTER_ACTIVE_BORDER_VAR = + "--vscode-commandCenter-activeBorder"; +export const VSC_COMMAND_CENTER_INACTIVE_BORDER_VAR = + "--vscode-commandCenter-inactiveBorder"; export const VSC_THEME_COLOR_VARS = [ VSC_INPUT_BACKGROUND_VAR, @@ -48,6 +52,8 @@ export const VSC_THEME_COLOR_VARS = [ VSC_BADGE_FOREGROUND_VAR, VSC_DIFF_REMOVED_LINE_BACKGROUND_VAR, VSC_DIFF_INSERTED_LINE_BACKGROUND_VAR, + VSC_COMMAND_CENTER_ACTIVE_BORDER_VAR, + VSC_COMMAND_CENTER_INACTIVE_BORDER_VAR, ]; export const defaultBorderRadius = "5px"; @@ -67,6 +73,8 @@ export const vscListActiveForeground = `var(${VSC_LIST_ACTIVE_FOREGROUND_VAR}, $ export const vscInputBorder = `var(${VSC_INPUT_BORDER_VAR}, ${lightGray})`; export const vscInputBorderFocus = `var(${VSC_INPUT_BORDER_FOCUS_VAR}, ${lightGray})`; export const vscBadgeBackground = `var(${VSC_BADGE_BACKGROUND_VAR}, #1bbe84)`; +export const vscCommandCenterActiveBorder = `var(${VSC_COMMAND_CENTER_ACTIVE_BORDER_VAR}, #1bbe84)`; +export const vscCommandCenterInactiveBorder = `var(${VSC_COMMAND_CENTER_INACTIVE_BORDER_VAR}, #1bbe84)`; if (typeof document !== "undefined") { for (const colorVar of VSC_THEME_COLOR_VARS) { diff --git a/gui/src/components/mainInput/TipTapEditor.tsx b/gui/src/components/mainInput/TipTapEditor.tsx index f78b58720..20bfb8c87 100644 --- a/gui/src/components/mainInput/TipTapEditor.tsx +++ b/gui/src/components/mainInput/TipTapEditor.tsx @@ -5,13 +5,7 @@ import Paragraph from "@tiptap/extension-paragraph"; import Placeholder from "@tiptap/extension-placeholder"; import Text from "@tiptap/extension-text"; import { Plugin } from "@tiptap/pm/state"; -import { - AnyExtension, - Editor, - EditorContent, - JSONContent, - useEditor, -} from "@tiptap/react"; +import { Editor, EditorContent, JSONContent, useEditor } from "@tiptap/react"; import { ContextProviderDescription, InputModifiers } from "core"; import { rifWithContentsToContextItem } from "core/commands/util"; import { modelSupportsImages } from "core/llm/autodetect"; @@ -30,9 +24,10 @@ import { defaultBorderRadius, lightGray, vscBadgeBackground, + vscCommandCenterActiveBorder, + vscCommandCenterInactiveBorder, vscForeground, vscInputBackground, - vscInputBorder, vscInputBorderFocus, } from ".."; import { IdeMessengerContext } from "../../context/IdeMessenger"; @@ -66,6 +61,7 @@ import { import { AddCodeToEdit } from "./AddCodeToEditExtension"; import { CodeBlockExtension } from "./CodeBlockExtension"; import { SlashCommand } from "./CommandsExtension"; +import { MockExtension } from "./FillerExtension"; import InputToolbar, { ToolbarOptions } from "./InputToolbar"; import { Mention } from "./MentionExtension"; import "./TipTapEditor.css"; @@ -78,9 +74,8 @@ import { handleVSCMetaKeyIssues, } from "./handleMetaKeyIssues"; import { ComboBoxItem } from "./types"; -import { MockExtension } from "./FillerExtension"; -const InputBoxDiv = styled.div<{ border?: string }>` +const InputBoxDiv = styled.div<{}>` resize: none; padding-bottom: 4px; font-family: inherit; @@ -90,8 +85,12 @@ const InputBoxDiv = styled.div<{ border?: string }>` width: 100%; background-color: ${vscInputBackground}; color: ${vscForeground}; - border: ${(props) => - props.border ? props.border : `0.5px solid ${vscInputBorder}`}; + + border: 1px solid ${vscCommandCenterInactiveBorder}; + &:focus-within { + border: 1px solid ${vscCommandCenterActiveBorder}; + } + outline: none; font-size: ${getFontSize()}px; @@ -173,7 +172,6 @@ interface TipTapEditorProps { ) => void; editorState?: JSONContent; toolbarOptions?: ToolbarOptions; - border?: string; placeholder?: string; historyKey: string; inputId: string; @@ -925,7 +923,6 @@ function TipTapEditor(props: TipTapEditorProps) { return ( Date: Thu, 6 Feb 2025 20:21:43 -0800 Subject: [PATCH 098/262] get rid of lag from generating session title --- gui/src/components/Layout.tsx | 23 +++++++++++-------- gui/src/components/mainInput/TipTapEditor.tsx | 2 ++ gui/src/pages/More/More.tsx | 13 ++++++----- gui/src/redux/thunks/session.ts | 13 ++++++----- gui/src/redux/thunks/streamThunkWrapper.tsx | 5 ++-- 5 files changed, 33 insertions(+), 23 deletions(-) diff --git a/gui/src/components/Layout.tsx b/gui/src/components/Layout.tsx index 747c2ddab..12c9a5ed8 100644 --- a/gui/src/components/Layout.tsx +++ b/gui/src/components/Layout.tsx @@ -2,27 +2,27 @@ import { useEffect, useMemo } from "react"; import { Outlet, useLocation, useNavigate } from "react-router-dom"; import styled from "styled-components"; import { CustomScrollbarDiv, defaultBorderRadius } from "."; +import { AuthProvider } from "../context/Auth"; import { useWebviewListener } from "../hooks/useWebviewListener"; import { useAppDispatch, useAppSelector } from "../redux/hooks"; -import { setEditStatus, focusEdit } from "../redux/slices/editModeState"; -import { setDialogMessage, setShowDialog } from "../redux/slices/uiSlice"; +import { focusEdit, setEditStatus } from "../redux/slices/editModeState"; import { addCodeToEdit, - updateApplyState, - setMode, newSession, + setMode, + updateApplyState, } from "../redux/slices/sessionSlice"; +import { setDialogMessage, setShowDialog } from "../redux/slices/uiSlice"; +import { exitEditMode } from "../redux/thunks"; +import { loadLastSession, saveCurrentSession } from "../redux/thunks/session"; import { getFontSize, isMetaEquivalentKeyPressed } from "../util"; +import { incrementFreeTrialCount } from "../util/freeTrial"; import { ROUTES } from "../util/navigation"; +import AccountDialog from "./AccountDialog"; import TextDialog from "./dialogs"; import Footer from "./Footer"; import { isNewUserOnboarding, useOnboardingCard } from "./OnboardingCard"; import PostHogPageView from "./PosthogPageView"; -import AccountDialog from "./AccountDialog"; -import { AuthProvider } from "../context/Auth"; -import { exitEditMode } from "../redux/thunks"; -import { loadLastSession, saveCurrentSession } from "../redux/thunks/session"; -import { incrementFreeTrialCount } from "../util/freeTrial"; const LayoutTopDiv = styled(CustomScrollbarDiv)` height: 100%; @@ -62,6 +62,7 @@ const Layout = () => { await dispatch( saveCurrentSession({ openNewSession: true, + generateTitle: true, }), ); dispatch(exitEditMode()); @@ -85,6 +86,7 @@ const Layout = () => { await dispatch( saveCurrentSession({ openNewSession: true, + generateTitle: true, }), ); dispatch(exitEditMode()); @@ -181,6 +183,8 @@ const Layout = () => { await dispatch( saveCurrentSession({ openNewSession: false, + // Because this causes a lag before Edit mode is focused. TODO just have that happen in background + generateTitle: false, }), ); dispatch(newSession()); @@ -196,6 +200,7 @@ const Layout = () => { await dispatch( saveCurrentSession({ openNewSession: true, + generateTitle: true, }), ); dispatch(focusEdit()); diff --git a/gui/src/components/mainInput/TipTapEditor.tsx b/gui/src/components/mainInput/TipTapEditor.tsx index 20bfb8c87..532fc6d70 100644 --- a/gui/src/components/mainInput/TipTapEditor.tsx +++ b/gui/src/components/mainInput/TipTapEditor.tsx @@ -728,6 +728,7 @@ function TipTapEditor(props: TipTapEditorProps) { await dispatch( saveCurrentSession({ openNewSession: false, + generateTitle: true, }), ); } @@ -761,6 +762,7 @@ function TipTapEditor(props: TipTapEditorProps) { await dispatch( saveCurrentSession({ openNewSession: true, + generateTitle: true, }), ); setTimeout(() => { diff --git a/gui/src/pages/More/More.tsx b/gui/src/pages/More/More.tsx index 360a5951f..b9bc3f4d3 100644 --- a/gui/src/pages/More/More.tsx +++ b/gui/src/pages/More/More.tsx @@ -5,16 +5,16 @@ import { } from "@heroicons/react/24/outline"; import { useContext } from "react"; import { useNavigate } from "react-router-dom"; -import KeyboardShortcuts from "./KeyboardShortcuts"; -import { IdeMessengerContext } from "../../context/IdeMessenger"; -import { useNavigationListener } from "../../hooks/useNavigationListener"; -import { setOnboardingCard } from "../../redux/slices/uiSlice"; -import MoreHelpRow from "./MoreHelpRow"; -import IndexingProgress from "./IndexingProgress"; import DocsIndexingStatuses from "../../components/indexing/DocsIndexingStatuses"; import PageHeader from "../../components/PageHeader"; +import { IdeMessengerContext } from "../../context/IdeMessenger"; +import { useNavigationListener } from "../../hooks/useNavigationListener"; import { useAppDispatch, useAppSelector } from "../../redux/hooks"; +import { setOnboardingCard } from "../../redux/slices/uiSlice"; import { saveCurrentSession } from "../../redux/thunks/session"; +import IndexingProgress from "./IndexingProgress"; +import KeyboardShortcuts from "./KeyboardShortcuts"; +import MoreHelpRow from "./MoreHelpRow"; function MorePage() { useNavigationListener(); @@ -100,6 +100,7 @@ function MorePage() { await dispatch( saveCurrentSession({ openNewSession: true, + generateTitle: true, }), ); dispatch(setOnboardingCard({ show: true, activeTab: "Best" })); diff --git a/gui/src/redux/thunks/session.ts b/gui/src/redux/thunks/session.ts index c311df194..be43f725e 100644 --- a/gui/src/redux/thunks/session.ts +++ b/gui/src/redux/thunks/session.ts @@ -1,15 +1,15 @@ -import { createAsyncThunk, Dispatch, unwrapResult } from "@reduxjs/toolkit"; +import { createAsyncThunk, unwrapResult } from "@reduxjs/toolkit"; import { ChatMessage, Session, SessionMetadata } from "core"; import { NEW_SESSION_TITLE } from "core/util/constants"; import { renderChatMessage } from "core/util/messageContent"; -import { ThunkApiType } from "../store"; +import { IIdeMessenger } from "../../context/IdeMessenger"; import { deleteSessionMetadata, newSession, setAllSessionMetadata, updateSessionMetadata, } from "../slices/sessionSlice"; -import { IIdeMessenger } from "../../context/IdeMessenger"; +import { ThunkApiType } from "../store"; const MAX_TITLE_LENGTH = 100; @@ -97,6 +97,7 @@ export const loadSession = createAsyncThunk< const result = await dispatch( saveCurrentSession({ openNewSession: false, + generateTitle: true, }), ); unwrapResult(result); @@ -147,11 +148,11 @@ function getChatTitleFromMessage(message: ChatMessage) { export const saveCurrentSession = createAsyncThunk< void, - { openNewSession: boolean }, + { openNewSession: boolean; generateTitle: boolean }, ThunkApiType >( "session/saveCurrent", - async ({ openNewSession }, { dispatch, extra, getState }) => { + async ({ openNewSession, generateTitle }, { dispatch, extra, getState }) => { const state = getState(); if (state.session.history.length === 0) { return; @@ -173,7 +174,7 @@ export const saveCurrentSession = createAsyncThunk< ?.filter((h) => h.message.role === "assistant")[0] ?.message?.content?.toString(); - if (assistantResponse) { + if (assistantResponse && generateTitle) { try { const result = await extra.ideMessenger.request( "chatDescriber/describe", diff --git a/gui/src/redux/thunks/streamThunkWrapper.tsx b/gui/src/redux/thunks/streamThunkWrapper.tsx index cd9f10f6d..7bd5a82f9 100644 --- a/gui/src/redux/thunks/streamThunkWrapper.tsx +++ b/gui/src/redux/thunks/streamThunkWrapper.tsx @@ -1,9 +1,9 @@ import { createAsyncThunk } from "@reduxjs/toolkit"; +import StreamErrorDialog from "../../pages/gui/StreamError"; import { clearLastEmptyResponse, setInactive } from "../slices/sessionSlice"; +import { setDialogMessage, setShowDialog } from "../slices/uiSlice"; import { ThunkApiType } from "../store"; import { saveCurrentSession } from "./session"; -import { setDialogMessage, setShowDialog } from "../slices/uiSlice"; -import StreamErrorDialog from "../../pages/gui/StreamError"; export const streamThunkWrapper = createAsyncThunk< void, @@ -23,6 +23,7 @@ export const streamThunkWrapper = createAsyncThunk< await dispatch( saveCurrentSession({ openNewSession: false, + generateTitle: true, }), ); } From cacddc5d969bc6fabbd945ed369d289413e66182 Mon Sep 17 00:00:00 2001 From: Nate Date: Thu, 6 Feb 2025 20:25:04 -0800 Subject: [PATCH 099/262] transition border color --- gui/src/components/mainInput/TipTapEditor.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/gui/src/components/mainInput/TipTapEditor.tsx b/gui/src/components/mainInput/TipTapEditor.tsx index 532fc6d70..51fb3e91f 100644 --- a/gui/src/components/mainInput/TipTapEditor.tsx +++ b/gui/src/components/mainInput/TipTapEditor.tsx @@ -87,6 +87,7 @@ const InputBoxDiv = styled.div<{}>` color: ${vscForeground}; border: 1px solid ${vscCommandCenterInactiveBorder}; + transition: border-color 0.15s ease-in-out; &:focus-within { border: 1px solid ${vscCommandCenterActiveBorder}; } From 49cdf130f75f468ee375ce73a835c3c5d5d4f7b5 Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Fri, 7 Feb 2025 04:28:17 -0800 Subject: [PATCH 100/262] onboarding style changes --- core/config/onboarding.ts | 5 +++-- .../OnboardingCard/components/OllamaCompletedStep.tsx | 2 +- .../OnboardingCard/components/OllamaModelDownload.tsx | 4 ++-- .../components/OnboardingCard/components/OllamaStatus.tsx | 4 ++-- .../OnboardingCard/components/OnboardingCardTabs.tsx | 2 +- .../OnboardingCard/platform/PlatformOnboardingCard.tsx | 2 +- .../components/OnboardingCard/tabs/OnboardingLocalTab.tsx | 6 ++---- 7 files changed, 12 insertions(+), 13 deletions(-) diff --git a/core/config/onboarding.ts b/core/config/onboarding.ts index fc327accc..8babfffde 100644 --- a/core/config/onboarding.ts +++ b/core/config/onboarding.ts @@ -5,6 +5,7 @@ import { FREE_TRIAL_MODELS } from "./default"; export const TRIAL_FIM_MODEL = "codestral-latest"; export const LOCAL_ONBOARDING_PROVIDER_TITLE = "Ollama"; export const LOCAL_ONBOARDING_FIM_MODEL = "qwen2.5-coder:1.5b-base"; +export const LOCAL_ONBOARDING_FIM_TITLE = "Qwen2.5-Coder 1.5B"; export const LOCAL_ONBOARDING_CHAT_MODEL = "llama3.1:8b"; export const LOCAL_ONBOARDING_CHAT_TITLE = "Llama 3.1 8B"; export const LOCAL_ONBOARDING_EMBEDDINGS_MODEL = "nomic-embed-text:latest"; @@ -36,13 +37,13 @@ export function setupLocalConfig( ...config.models.filter((model) => model.provider !== "free-trial"), ], tabAutocompleteModel: { - title: "Qwen2.5-Coder 1.5B", + title: LOCAL_ONBOARDING_FIM_TITLE, provider: "ollama", model: LOCAL_ONBOARDING_FIM_MODEL, }, embeddingsProvider: { provider: "ollama", - model: "nomic-embed-text", + model: LOCAL_ONBOARDING_EMBEDDINGS_MODEL, }, }; } diff --git a/gui/src/components/OnboardingCard/components/OllamaCompletedStep.tsx b/gui/src/components/OnboardingCard/components/OllamaCompletedStep.tsx index 1b2cbea0a..d7a396804 100644 --- a/gui/src/components/OnboardingCard/components/OllamaCompletedStep.tsx +++ b/gui/src/components/OnboardingCard/components/OllamaCompletedStep.tsx @@ -7,7 +7,7 @@ interface OllamaCompletedStepProps { function OllamaCompletedStep({ text }: OllamaCompletedStepProps) { return (
-

{text}

+

{text}

); diff --git a/gui/src/components/OnboardingCard/components/OllamaModelDownload.tsx b/gui/src/components/OnboardingCard/components/OllamaModelDownload.tsx index b68b3fc09..6a7075fac 100644 --- a/gui/src/components/OnboardingCard/components/OllamaModelDownload.tsx +++ b/gui/src/components/OnboardingCard/components/OllamaModelDownload.tsx @@ -27,13 +27,13 @@ function OllamaModelDownload({ return (
-

{title}

+

{title}

{hasDownloaded ? ( ) : ( <> -

{command}

+

{command}

diff --git a/gui/src/components/OnboardingCard/components/OllamaStatus.tsx b/gui/src/components/OnboardingCard/components/OllamaStatus.tsx index 24a9f511d..515958503 100644 --- a/gui/src/components/OnboardingCard/components/OllamaStatus.tsx +++ b/gui/src/components/OnboardingCard/components/OllamaStatus.tsx @@ -38,14 +38,14 @@ export function OllamaStatus({ isOllamaConnected }: OllamaStatusProps) { case OllamaConnectionStatuses.WaitingToDownload: return ( -

{downloadUrl}

+

{downloadUrl}

); case OllamaConnectionStatuses.Downloading: return (
-

+

Checking for connection to Ollama at http://localhost:11434

diff --git a/gui/src/components/OnboardingCard/components/OnboardingCardTabs.tsx b/gui/src/components/OnboardingCard/components/OnboardingCardTabs.tsx index e14d7aa2c..0cac5b1d5 100644 --- a/gui/src/components/OnboardingCard/components/OnboardingCardTabs.tsx +++ b/gui/src/components/OnboardingCard/components/OnboardingCardTabs.tsx @@ -70,7 +70,7 @@ export function OnboardingCardTabs({ onTabClick, }: OnboardingCardTabsProps) { return ( -
+
{Object.entries(TabTitles).map(([tabType, titles]) => { diff --git a/gui/src/components/OnboardingCard/platform/PlatformOnboardingCard.tsx b/gui/src/components/OnboardingCard/platform/PlatformOnboardingCard.tsx index ede9295b3..c64421a0e 100644 --- a/gui/src/components/OnboardingCard/platform/PlatformOnboardingCard.tsx +++ b/gui/src/components/OnboardingCard/platform/PlatformOnboardingCard.tsx @@ -51,7 +51,7 @@ export function PlatformOnboardingCard({ isDialog }: OnboardingCardProps) { isDialog={isDialog} /> ) : ( -
+
By choosing this option, Continue will be configured by a local{" "} config.yaml file. If you're just looking to use diff --git a/gui/src/components/OnboardingCard/tabs/OnboardingLocalTab.tsx b/gui/src/components/OnboardingCard/tabs/OnboardingLocalTab.tsx index 2894530cb..81b0a7a6b 100644 --- a/gui/src/components/OnboardingCard/tabs/OnboardingLocalTab.tsx +++ b/gui/src/components/OnboardingCard/tabs/OnboardingLocalTab.tsx @@ -101,11 +101,9 @@ function OnboardingLocalTab({ isDialog }: OnboardingLocalTabProps) { }, []); return ( -
+
-

- Install Ollama -

+

Install Ollama

From f41cdd58d096ced9a8d6e76c9011187231a1cb7d Mon Sep 17 00:00:00 2001 From: Patrick Erichsen Date: Fri, 7 Feb 2025 07:22:14 -0800 Subject: [PATCH 101/262] Update preview.yaml --- .github/workflows/preview.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/preview.yaml b/.github/workflows/preview.yaml index bd5f4b7ac..b35e7d203 100644 --- a/.github/workflows/preview.yaml +++ b/.github/workflows/preview.yaml @@ -4,6 +4,13 @@ on: release: types: [prereleased] + workflow_dispatch: + inputs: + publish_build: + description: "Whether or not to publish the built extension to the VS Code marketplace" + required: true + default: false + jobs: check_release_name: runs-on: ubuntu-latest From d3d5e470e9436188d008753c0d3959708b3f6ae9 Mon Sep 17 00:00:00 2001 From: Patrick Erichsen Date: Fri, 7 Feb 2025 09:41:38 -0800 Subject: [PATCH 102/262] Update preview.yaml --- .github/workflows/preview.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/preview.yaml b/.github/workflows/preview.yaml index b35e7d203..945f8d84b 100644 --- a/.github/workflows/preview.yaml +++ b/.github/workflows/preview.yaml @@ -28,7 +28,7 @@ jobs: build: needs: check_release_name - if: needs.check_release_name.outputs.should_run == 'true' + if: needs.check_release_name.outputs.should_run == 'true' || github.event_name == 'workflow_dispatch' strategy: matrix: include: @@ -204,6 +204,7 @@ jobs: runs-on: ubuntu-latest needs: - build + if: github.event.inputs.publish_build == 'true' permissions: contents: write steps: From 62be9e68b09d23becac7777f60cbb4fb4d107c8b Mon Sep 17 00:00:00 2001 From: Nate Date: Fri, 7 Feb 2025 10:13:06 -0800 Subject: [PATCH 103/262] claude 35 haiku, not 3 --- core/llm/llms/FreeTrial.ts | 2 +- .../components/BestExperienceConfigForm.tsx | 4 +-- gui/src/pages/AddNewModel/AddNewModel.tsx | 10 ++++-- gui/src/pages/AddNewModel/configs/models.ts | 36 ++++++++----------- .../pages/AddNewModel/configs/providers.ts | 18 +++++++--- 5 files changed, 37 insertions(+), 33 deletions(-) diff --git a/core/llm/llms/FreeTrial.ts b/core/llm/llms/FreeTrial.ts index c092a1ecb..ab69aff70 100644 --- a/core/llm/llms/FreeTrial.ts +++ b/core/llm/llms/FreeTrial.ts @@ -215,7 +215,7 @@ class FreeTrial extends BaseLLM { "llama3.1-70b", "gpt-4o", "gpt-3.5-turbo", - "claude-3-haiku-20240307", + "claude-3-5-haiku-latest", "gemini-1.5-pro-latest", ]; } diff --git a/gui/src/components/OnboardingCard/components/BestExperienceConfigForm.tsx b/gui/src/components/OnboardingCard/components/BestExperienceConfigForm.tsx index 98f71cce2..389ed72dd 100644 --- a/gui/src/components/OnboardingCard/components/BestExperienceConfigForm.tsx +++ b/gui/src/components/OnboardingCard/components/BestExperienceConfigForm.tsx @@ -5,8 +5,8 @@ import { Button, Input, InputSubtext, lightGray } from "../.."; import { IdeMessengerContext } from "../../../context/IdeMessenger"; import { models } from "../../../pages/AddNewModel/configs/models"; import { providers } from "../../../pages/AddNewModel/configs/providers"; -import AddModelButtonSubtext from "../../AddModelButtonSubtext"; import { setDefaultModel } from "../../../redux/slices/configSlice"; +import AddModelButtonSubtext from "../../AddModelButtonSubtext"; const { anthropic, mistral } = providers; const chatProvider = anthropic!; @@ -14,7 +14,7 @@ const autocompleteProvider = mistral!; const { claude35Sonnet: chatModel, - claude3Haiku: repoMapModel, + claude35Haiku: repoMapModel, codestral: autocompleteModel, } = models; diff --git a/gui/src/pages/AddNewModel/AddNewModel.tsx b/gui/src/pages/AddNewModel/AddNewModel.tsx index d74cbf25c..f5caa2419 100644 --- a/gui/src/pages/AddNewModel/AddNewModel.tsx +++ b/gui/src/pages/AddNewModel/AddNewModel.tsx @@ -13,10 +13,10 @@ import ModelCard from "../../components/modelSelection/ModelCard"; import Toggle from "../../components/modelSelection/Toggle"; import { IdeMessengerContext } from "../../context/IdeMessenger"; import { useNavigationListener } from "../../hooks/useNavigationListener"; +import { setDefaultModel } from "../../redux/slices/configSlice"; import { ModelPackage, models } from "./configs/models"; import { providers } from "./configs/providers"; import { CustomModelButton } from "./ConfigureProvider"; -import { setDefaultModel } from "../../redux/slices/configSlice"; const IntroDiv = styled.div` padding: 8px 12px; @@ -39,7 +39,7 @@ const GridDiv = styled.div` */ const modelsByProvider: Record = { "Open AI": [models.gpt4turbo, models.gpt4o, models.gpt35turbo], - Anthropic: [models.claude3Opus, models.claude3Sonnet, models.claude3Haiku], + Anthropic: [models.claude3Opus, models.claude3Sonnet, models.claude35Haiku], Mistral: [ models.codestral, models.mistral7b, @@ -49,7 +49,11 @@ const modelsByProvider: Record = { models.mistralLarge, ], Cohere: [models.commandR, models.commandRPlus], - DeepSeek: [models.deepseekCoderApi, models.deepseekChatApi, models.deepseekReasonerApi], + DeepSeek: [ + models.deepseekCoderApi, + models.deepseekChatApi, + models.deepseekReasonerApi, + ], Gemini: [models.geminiPro, models.gemini15Pro, models.gemini15Flash], "Open Source": [models.llama3Chat, models.mistralOs, models.deepseek], }; diff --git a/gui/src/pages/AddNewModel/configs/models.ts b/gui/src/pages/AddNewModel/configs/models.ts index 607e466d9..3b3486e79 100644 --- a/gui/src/pages/AddNewModel/configs/models.ts +++ b/gui/src/pages/AddNewModel/configs/models.ts @@ -52,16 +52,14 @@ export const models: { [key: string]: ModelPackage } = { name: "Parameter Count", description: "The number of parameters in the model", options: { - "r1": { + r1: { model: "deepseek/deepseek_v3", title: "deepseek_v3", - } + }, }, }, ], - providerOptions: [ - "novita" - ], + providerOptions: ["novita"], isOpenSource: true, }, deepseekR1Chat: { @@ -79,16 +77,14 @@ export const models: { [key: string]: ModelPackage } = { name: "Parameter Count", description: "The number of parameters in the model", options: { - "r1": { + r1: { model: "deepseek/deepseek-r1", title: "deepseek-r1", - } + }, }, }, ], - providerOptions: [ - "novita" - ], + providerOptions: ["novita"], isOpenSource: true, }, llama318BChat: { @@ -109,13 +105,11 @@ export const models: { [key: string]: ModelPackage } = { "8b": { model: "meta-llama/llama-3.1-8b-instruct", title: "Llama3.1-8b", - } + }, }, }, ], - providerOptions: [ - "novita" - ], + providerOptions: ["novita"], isOpenSource: true, }, mistralChat: { @@ -140,9 +134,7 @@ export const models: { [key: string]: ModelPackage } = { }, ], icon: "mistral.png", - providerOptions: [ - "novita", - ], + providerOptions: ["novita"], isOpenSource: true, }, llama31Chat: { @@ -995,14 +987,14 @@ export const models: { [key: string]: ModelPackage } = { icon: "anthropic.png", isOpenSource: false, }, - claude3Haiku: { - title: "Claude 3 Haiku", + claude35Haiku: { + title: "Claude 3.5 Haiku", description: - "The third most capable model in the Claude 3 series: fastest and most compact model for near-instant responsiveness", + "The fastest model in the Claude 3.5 series: a compact model for near-instant responsiveness", params: { - model: "claude-3-haiku-20240307", + model: "claude-3-5-haiku-latest", contextLength: 200_000, - title: "Claude 3 Haiku", + title: "Claude 3.5 Haiku", apiKey: "", }, providerOptions: ["anthropic", "free-trial"], diff --git a/gui/src/pages/AddNewModel/configs/providers.ts b/gui/src/pages/AddNewModel/configs/providers.ts index 7e0560942..d6f9f76dc 100644 --- a/gui/src/pages/AddNewModel/configs/providers.ts +++ b/gui/src/pages/AddNewModel/configs/providers.ts @@ -111,7 +111,7 @@ export const providers: Partial> = { models.claude35Sonnet, models.claude3Opus, models.claude3Sonnet, - models.claude3Haiku, + models.claude35Haiku, ], apiKeyUrl: "https://console.anthropic.com/account/keys", }, @@ -370,7 +370,11 @@ Select the \`GPT-4o\` model below to complete your provider configuration, but n required: true, }, ], - packages: [models.deepseekCoderApi, models.deepseekChatApi, models.deepseekReasonerApi], + packages: [ + models.deepseekCoderApi, + models.deepseekChatApi, + models.deepseekReasonerApi, + ], apiKeyUrl: "https://platform.deepseek.com/api_keys", }, together: { @@ -427,8 +431,12 @@ Select the \`GPT-4o\` model below to complete your provider configuration, but n }, ...completionParamsInputsConfigs, ], - packages: [models.llama318BChat, models.mistralChat, - models.deepseekR1Chat, models.deepseekV3Chat].map((p) => { + packages: [ + models.llama318BChat, + models.mistralChat, + models.deepseekR1Chat, + models.deepseekV3Chat, + ].map((p) => { p.params.contextLength = 4096; return p; }), @@ -681,7 +689,7 @@ To get started, [register](https://dataplatform.cloud.ibm.com/registration/stepo { ...models.claude35Sonnet, title: "Claude 3.5 Sonnet (trial)" }, { ...models.gpt4o, title: "GPT-4o (trial)" }, { ...models.gpt35turbo, title: "GPT-3.5-Turbo (trial)" }, - { ...models.claude3Haiku, title: "Claude 3 Haiku (trial)" }, + { ...models.claude35Haiku, title: "Claude 3.5 Haiku (trial)" }, models.mixtralTrial, { ...models.gemini15Pro, title: "Gemini 1.5 Pro (trial)" }, { From a92368c566f8d97863ab87feae2df3828075dafb Mon Sep 17 00:00:00 2001 From: Nate Date: Fri, 7 Feb 2025 10:58:04 -0800 Subject: [PATCH 104/262] if any docs used, add the docs context provider --- core/config/yaml/loadYaml.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/core/config/yaml/loadYaml.ts b/core/config/yaml/loadYaml.ts index e20c02caa..e4cec3859 100644 --- a/core/config/yaml/loadYaml.ts +++ b/core/config/yaml/loadYaml.ts @@ -35,6 +35,7 @@ import { getSystemPromptDotFile } from "../getSystemPromptDotFile"; import { PlatformConfigMetadata } from "../profile/PlatformProfileLoader"; import { slashFromCustomCommand } from "../../commands"; +import DocsContextProvider from "../../context/providers/DocsContextProvider"; import { allTools } from "../../tools"; import { GlobalContext } from "../../util/GlobalContext"; import { modifyContinueConfigWithSharedConfig } from "../sharedConfig"; @@ -216,6 +217,15 @@ async function configYamlToContinueConfig( .filter((p) => !!p) ?? []) as IContextProvider[]; continueConfig.contextProviders.push(...DEFAULT_CONTEXT_PROVIDERS); + if ( + continueConfig.docs?.length && + !continueConfig.contextProviders?.some( + (cp) => cp.description.title === "docs", + ) + ) { + continueConfig.contextProviders.push(new DocsContextProvider({})); + } + // Embeddings Provider const embedConfig = config.models?.find((model) => model.roles?.includes("embed"), From 027732073aa0fb5202b558f4c0d71c71c6b8acbb Mon Sep 17 00:00:00 2001 From: Patrick Erichsen Date: Fri, 7 Feb 2025 12:28:06 -0800 Subject: [PATCH 105/262] feat: use @lancedb/vectordb-win32-arm64-msvc --- .github/workflows/jetbrains-release.yaml | 16 ++- binary/build.js | 2 +- extensions/vscode/scripts/prepackage.js | 118 ++++++++++------------- 3 files changed, 65 insertions(+), 71 deletions(-) diff --git a/.github/workflows/jetbrains-release.yaml b/.github/workflows/jetbrains-release.yaml index 9b79be9c1..ffc4a967f 100644 --- a/.github/workflows/jetbrains-release.yaml +++ b/.github/workflows/jetbrains-release.yaml @@ -6,11 +6,11 @@ name: JetBrains Release on: release: - types: [ prereleased ] + types: [prereleased] workflow_dispatch: inputs: publish_build: - description: 'Whether or not to publish the built extension to the JetBrains marketplace' + description: "Whether or not to publish the built extension to the JetBrains marketplace" required: true default: false @@ -241,6 +241,12 @@ jobs: name: continue-binary-win32-x64 path: ./binary/bin/win32-x64/ + - name: Upload artifact (win32-arm64) + uses: actions/upload-artifact@v4 + with: + name: continue-binary-win32-arm64 + path: ./binary/bin/win32-arm64/ + - name: Upload artifact (linux-arm64) uses: actions/upload-artifact@v4 with: @@ -345,7 +351,7 @@ jobs: # Run tests and upload a code coverage report test: name: Test - needs: [ build ] + needs: [build] runs-on: ubuntu-latest steps: # Check out current repository @@ -387,7 +393,7 @@ jobs: inspectCode: if: false name: Inspect code - needs: [ build ] + needs: [build] runs-on: ubuntu-latest permissions: contents: write @@ -422,7 +428,7 @@ jobs: verify: if: false name: Verify plugin - needs: [ build ] + needs: [build] runs-on: ubuntu-latest steps: # Free GitHub Actions Environment Disk Space diff --git a/binary/build.js b/binary/build.js index 11aaf5c59..5e0ba4c8b 100644 --- a/binary/build.js +++ b/binary/build.js @@ -53,7 +53,7 @@ const targetToLanceDb = { "linux-arm64": "@lancedb/vectordb-linux-arm64-gnu", "linux-x64": "@lancedb/vectordb-linux-x64-gnu", "win32-x64": "@lancedb/vectordb-win32-x64-msvc", - "win32-arm64": "@lancedb/vectordb-win32-x64-msvc", // they don't have a win32-arm64 build + "win32-arm64": "@lancedb/vectordb-win32-arm64-msvc", }; async function installNodeModuleInTempDirAndCopyToCurrent(packageName, toCopy) { diff --git a/extensions/vscode/scripts/prepackage.js b/extensions/vscode/scripts/prepackage.js index 4f3650ff0..9a4562b7c 100644 --- a/extensions/vscode/scripts/prepackage.js +++ b/extensions/vscode/scripts/prepackage.js @@ -1,12 +1,15 @@ const fs = require("fs"); -const ncp = require("ncp").ncp; const path = require("path"); + +const ncp = require("ncp").ncp; const { rimrafSync } = require("rimraf"); + const { validateFilesPresent, execCmdSync, autodetectPlatformAndArch, } = require("../../../scripts/util/index"); + const { copyConfigSchema } = require("./utils"); // Clear folders that will be packaged to ensure clean slate @@ -46,6 +49,17 @@ console.log("[info] Using target: ", target); const exe = os === "win32" ? ".exe" : ""; +const isInGitHubAction = !!process.env.GITHUB_ACTIONS; + +const isArmTarget = + target === "darwin-arm64" || + target === "linux-arm64" || + target === "win32-arm64"; + +const isWinTarget = target?.startsWith("win"); +const isLinuxTarget = target?.startsWith("linux"); +const isMacTarget = target?.startsWith("darwin"); + (async () => { console.log("[info] Packaging extension for target ", target); @@ -66,7 +80,7 @@ const exe = os === "win32" ? ".exe" : ""; execCmdSync("npm install"); console.log("[info] npm install in gui completed"); - if (ghAction()) { + if (isInGitHubAction) { execCmdSync("npm run build"); } @@ -222,7 +236,7 @@ const exe = os === "win32" ? ".exe" : ""; "../../../core/llm/llamaTokenizerWorkerPool.mjs", "../../../core/llm/llamaTokenizer.mjs", "../../../core/llm/tiktokenWorkerPool.mjs", - "../../../core/util/start_ollama.sh" + "../../../core/util/start_ollama.sh", ]; for (const f of filesToCopy) { @@ -262,22 +276,6 @@ const exe = os === "win32" ? ".exe" : ""; ); }); - function ghAction() { - return !!process.env.GITHUB_ACTIONS; - } - - function isArm() { - return ( - target === "darwin-arm64" || - target === "linux-arm64" || - target === "win32-arm64" - ); - } - - function isWin() { - return target?.startsWith("win"); - } - async function installNodeModuleInTempDirAndCopyToCurrent( packageName, toCopy, @@ -341,42 +339,40 @@ const exe = os === "win32" ? ".exe" : ""; } // GitHub Actions doesn't support ARM, so we need to download pre-saved binaries - if (ghAction() && isArm()) { - // sqlite3 - if (!isWin()) { - // Neither lancedb nor sqlite3 have pre-built windows arm64 binaries + // 02/07/25 - the above comment is out of date, there is now support for ARM runners on GitHub Actions + if (isInGitHubAction && isArmTarget) { + // lancedb binary + const packageToInstall = { + "darwin-arm64": "@lancedb/vectordb-darwin-arm64", + "linux-arm64": "@lancedb/vectordb-linux-arm64-gnu", + "win32-arm64": "@lancedb/vectordb-win32-arm64-msvc", + }[target]; + console.log( + "[info] Downloading pre-built lancedb binary: " + packageToInstall, + ); - // lancedb binary - const packageToInstall = { - "darwin-arm64": "@lancedb/vectordb-darwin-arm64", - "linux-arm64": "@lancedb/vectordb-linux-arm64-gnu", - }[target]; - console.log( - "[info] Downloading pre-built lancedb binary: " + packageToInstall, - ); + await installNodeModuleInTempDirAndCopyToCurrent( + packageToInstall, + "@lancedb", + ); - await installNodeModuleInTempDirAndCopyToCurrent( - packageToInstall, - "@lancedb", - ); - - // Replace the installed with pre-built - console.log("[info] Downloading pre-built sqlite3 binary"); - rimrafSync("../../core/node_modules/sqlite3/build"); - const downloadUrl = { - "darwin-arm64": - "https://github.com/TryGhost/node-sqlite3/releases/download/v5.1.7/sqlite3-v5.1.7-napi-v6-darwin-arm64.tar.gz", - "linux-arm64": - "https://github.com/TryGhost/node-sqlite3/releases/download/v5.1.7/sqlite3-v5.1.7-napi-v3-linux-arm64.tar.gz", - }[target]; - execCmdSync( - `curl -L -o ../../core/node_modules/sqlite3/build.tar.gz ${downloadUrl}`, - ); - execCmdSync( - "cd ../../core/node_modules/sqlite3 && tar -xvzf build.tar.gz", - ); - fs.unlinkSync("../../core/node_modules/sqlite3/build.tar.gz"); - } + // Replace the installed with pre-built + console.log("[info] Downloading pre-built sqlite3 binary"); + rimrafSync("../../core/node_modules/sqlite3/build"); + const downloadUrl = { + "darwin-arm64": + "https://github.com/TryGhost/node-sqlite3/releases/download/v5.1.7/sqlite3-v5.1.7-napi-v6-darwin-arm64.tar.gz", + "linux-arm64": + "https://github.com/TryGhost/node-sqlite3/releases/download/v5.1.7/sqlite3-v5.1.7-napi-v3-linux-arm64.tar.gz", + // node-sqlite3 doesn't have a pre-built binary for win32-arm64 + "win32-arm64": + "https://continue-server-binaries.s3.us-west-1.amazonaws.com/win32-arm64/node_sqlite3.node", + }[target]; + execCmdSync( + `curl -L -o ../../core/node_modules/sqlite3/build.tar.gz ${downloadUrl}`, + ); + execCmdSync("cd ../../core/node_modules/sqlite3 && tar -xvzf build.tar.gz"); + fs.unlinkSync("../../core/node_modules/sqlite3/build.tar.gz"); // Download and unzip esbuild console.log("[info] Downloading pre-built esbuild binary"); @@ -483,9 +479,9 @@ const exe = os === "win32" ? ".exe" : ""; // onnx runtime bindngs `bin/napi-v3/${os}/${arch}/onnxruntime_binding.node`, `bin/napi-v3/${os}/${arch}/${ - os === "darwin" + isMacTarget ? "libonnxruntime.1.14.0.dylib" - : os === "linux" + : isLinuxTarget ? "libonnxruntime.so.1.14.0" : "onnxruntime.dll" }`, @@ -522,17 +518,9 @@ const exe = os === "win32" ? ".exe" : ""; // out/node_modules (to be accessed by extension.js) `out/node_modules/@vscode/ripgrep/bin/rg${exe}`, `out/node_modules/@esbuild/${ - target === "win32-arm64" - ? "esbuild.exe" - : target === "win32-x64" - ? "win32-x64/esbuild.exe" - : `${target}/bin/esbuild` + isWinTarget ? `${target}/esbuild.exe` : `${target}/bin/esbuild` }`, - `out/node_modules/@lancedb/vectordb-${ - os === "win32" - ? "win32-x64-msvc" - : `${target}${os === "linux" ? "-gnu" : ""}` - }/index.node`, + `out/node_modules/@lancedb/vectordb-${target}${isLinuxTarget ? "-gnu" : ""}/index.node`, `out/node_modules/esbuild/lib/main.js`, `out/node_modules/esbuild/bin/esbuild`, ]); From 1c1849b04564e9c21b35c67ea325cf9f0f83e4eb Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Fri, 7 Feb 2025 12:46:44 -0800 Subject: [PATCH 106/262] fix messaging logic --- .../continue/IdeProtocolClient.kt | 25 ++++--------------- .../toolWindow/ContinueBrowser.kt | 8 ++++-- 2 files changed, 11 insertions(+), 22 deletions(-) diff --git a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/IdeProtocolClient.kt b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/IdeProtocolClient.kt index efffc54ee..0e009001a 100644 --- a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/IdeProtocolClient.kt +++ b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/IdeProtocolClient.kt @@ -43,27 +43,12 @@ class IdeProtocolClient( ) } - private fun send(messageType: String, data: Any?, messageId: String? = null) { - val id = messageId ?: uuid() - continuePluginService.sendToWebview(messageType, data, id) - } - fun handleMessage(msg: String, respond: (Any?) -> Unit) { coroutineScope.launch(Dispatchers.IO) { val message = Gson().fromJson(msg, Message::class.java) val messageType = message.messageType val dataElement = message.data - // A couple oddball messages respond directly to GUI, expect a different message format - // e.g. jetbrains/isOSREnabled - fun respondToWebview(content: Any) { - respond(mutableMapOf( - "done" to true, - "status" to "success", - "content" to content - )) - } - try { when (messageType) { "toggleDevTools" -> { @@ -77,12 +62,12 @@ class IdeProtocolClient( "jetbrains/isOSREnabled" -> { val isOSREnabled = ServiceManager.getService(ContinueExtensionSettings::class.java).continueState.enableOSR - respondToWebview(isOSREnabled) + respond(isOSREnabled) } "jetbrains/getColors" -> { val colors = GetTheme().getTheme(); - respondToWebview(colors) + respond(colors) } "jetbrains/onLoad" -> { @@ -92,7 +77,7 @@ class IdeProtocolClient( "vscMachineId" to getMachineUniqueID(), "vscMediaUrl" to "http://continue", ) - respondToWebview(jsonData) + respond(jsonData) } "getIdeSettings" -> { @@ -593,11 +578,11 @@ class IdeProtocolClient( fun sendAcceptRejectDiff(accepted: Boolean, stepIndex: Int) { - send("acceptRejectDiff", AcceptRejectDiff(accepted, stepIndex), uuid()) + continuePluginService.sendToWebview("acceptRejectDiff", AcceptRejectDiff(accepted, stepIndex), uuid()) } fun deleteAtIndex(index: Int) { - send("deleteAtIndex", DeleteAtIndex(index), uuid()) + continuePluginService.sendToWebview("deleteAtIndex", DeleteAtIndex(index), uuid()) } private fun getModelByRole( diff --git a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/toolWindow/ContinueBrowser.kt b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/toolWindow/ContinueBrowser.kt index 2eb9ae924..cf1b58bcb 100644 --- a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/toolWindow/ContinueBrowser.kt +++ b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/toolWindow/ContinueBrowser.kt @@ -53,9 +53,13 @@ class ContinueBrowser(val project: Project, url: String) { ContinuePluginService::class.java ) - + // Webview always expects to receive this format when it initiates val respond = fun(data: Any?) { - sendToWebview(messageType, data, messageId ?: uuid()) + sendToWebview(messageType, mapOf( + "status" to "success", + "content" to data, + "done" to true + ), messageId ?: uuid()) } if (PASS_THROUGH_TO_CORE.contains(messageType)) { From 1f2f3af84ed7d4f7bf1b59597bdde9a60cfa61f0 Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Fri, 7 Feb 2025 13:15:27 -0800 Subject: [PATCH 107/262] webview responder --- .../toolWindow/ContinueBrowser.kt | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/toolWindow/ContinueBrowser.kt b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/toolWindow/ContinueBrowser.kt index cf1b58bcb..c665efcf3 100644 --- a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/toolWindow/ContinueBrowser.kt +++ b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/toolWindow/ContinueBrowser.kt @@ -55,11 +55,7 @@ class ContinueBrowser(val project: Project, url: String) { // Webview always expects to receive this format when it initiates val respond = fun(data: Any?) { - sendToWebview(messageType, mapOf( - "status" to "success", - "content" to data, - "done" to true - ), messageId ?: uuid()) + sendToWebview(messageType, data, messageId ?: uuid()) } if (PASS_THROUGH_TO_CORE.contains(messageType)) { @@ -67,8 +63,16 @@ class ContinueBrowser(val project: Project, url: String) { return@addHandler null } + val respondToWebview = fun(data: Any?) { + sendToWebview(messageType, mapOf( + "status" to "success", + "content" to data, + "done" to true + ), messageId ?: uuid()) + } + if (msg != null) { - continuePluginService.ideProtocolClient?.handleMessage(msg, respond) + continuePluginService.ideProtocolClient?.handleMessage(msg, respondToWebview) } null From 3179d5fd83013d2fe11fdf12de61ba8f50d03c57 Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Fri, 7 Feb 2025 13:24:19 -0800 Subject: [PATCH 108/262] comment --- .../continueintellijextension/toolWindow/ContinueBrowser.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/toolWindow/ContinueBrowser.kt b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/toolWindow/ContinueBrowser.kt index c665efcf3..4c2ad3b59 100644 --- a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/toolWindow/ContinueBrowser.kt +++ b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/toolWindow/ContinueBrowser.kt @@ -53,7 +53,6 @@ class ContinueBrowser(val project: Project, url: String) { ContinuePluginService::class.java ) - // Webview always expects to receive this format when it initiates val respond = fun(data: Any?) { sendToWebview(messageType, data, messageId ?: uuid()) } @@ -63,6 +62,8 @@ class ContinueBrowser(val project: Project, url: String) { return@addHandler null } + // If not pass through, then put it in the status/content/done format for webview + // Core already sends this format val respondToWebview = fun(data: Any?) { sendToWebview(messageType, mapOf( "status" to "success", From 04e9aaa244a79e6a30fb6bdc5675a84babba28f1 Mon Sep 17 00:00:00 2001 From: Patrick Erichsen Date: Fri, 7 Feb 2025 13:57:41 -0800 Subject: [PATCH 109/262] Update prepackage.js --- extensions/vscode/scripts/prepackage.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/vscode/scripts/prepackage.js b/extensions/vscode/scripts/prepackage.js index 9a4562b7c..19a95a133 100644 --- a/extensions/vscode/scripts/prepackage.js +++ b/extensions/vscode/scripts/prepackage.js @@ -366,7 +366,7 @@ const isMacTarget = target?.startsWith("darwin"); "https://github.com/TryGhost/node-sqlite3/releases/download/v5.1.7/sqlite3-v5.1.7-napi-v3-linux-arm64.tar.gz", // node-sqlite3 doesn't have a pre-built binary for win32-arm64 "win32-arm64": - "https://continue-server-binaries.s3.us-west-1.amazonaws.com/win32-arm64/node_sqlite3.node", + "https://continue-server-binaries.s3.us-west-1.amazonaws.com/win32-arm64/node_sqlite3.zip", }[target]; execCmdSync( `curl -L -o ../../core/node_modules/sqlite3/build.tar.gz ${downloadUrl}`, From fa017454aa3356c9d768bea16c38ccc30ad9948a Mon Sep 17 00:00:00 2001 From: Patrick Erichsen Date: Fri, 7 Feb 2025 14:07:58 -0800 Subject: [PATCH 110/262] Update prepackage.js --- extensions/vscode/scripts/prepackage.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/extensions/vscode/scripts/prepackage.js b/extensions/vscode/scripts/prepackage.js index 19a95a133..7e98ccbc3 100644 --- a/extensions/vscode/scripts/prepackage.js +++ b/extensions/vscode/scripts/prepackage.js @@ -371,7 +371,18 @@ const isMacTarget = target?.startsWith("darwin"); execCmdSync( `curl -L -o ../../core/node_modules/sqlite3/build.tar.gz ${downloadUrl}`, ); - execCmdSync("cd ../../core/node_modules/sqlite3 && tar -xvzf build.tar.gz"); + + // TODO: Remove the if/else once we upload the new binary + if (isWinTarget) { + execCmdSync( + "cd ../../core/node_modules/sqlite3 && mkdir -p build/Release && tar -xvzf build.tar.gz -C build/Release", + ); + } else { + execCmdSync( + "cd ../../core/node_modules/sqlite3 && tar -xvzf build.tar.gz", + ); + } + fs.unlinkSync("../../core/node_modules/sqlite3/build.tar.gz"); // Download and unzip esbuild @@ -390,6 +401,7 @@ const isMacTarget = target?.startsWith("darwin"); "esbuild@0.17.19", "@esbuild", ); + x; } console.log("[info] Copying sqlite node binding from core"); From 88729ee44f3373bcb48cea1efcd3d8cb71be041d Mon Sep 17 00:00:00 2001 From: Patrick Erichsen Date: Fri, 7 Feb 2025 14:08:15 -0800 Subject: [PATCH 111/262] Update prepackage.js --- extensions/vscode/scripts/prepackage.js | 1 - 1 file changed, 1 deletion(-) diff --git a/extensions/vscode/scripts/prepackage.js b/extensions/vscode/scripts/prepackage.js index 7e98ccbc3..46f2efd28 100644 --- a/extensions/vscode/scripts/prepackage.js +++ b/extensions/vscode/scripts/prepackage.js @@ -401,7 +401,6 @@ const isMacTarget = target?.startsWith("darwin"); "esbuild@0.17.19", "@esbuild", ); - x; } console.log("[info] Copying sqlite node binding from core"); From 2f5c213abfdc7e371a232cb1b986244839dc3490 Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Fri, 7 Feb 2025 16:38:08 -0800 Subject: [PATCH 112/262] fix sonarqube --- .../autocomplete/AutocompleteEditorListener.kt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/autocomplete/AutocompleteEditorListener.kt b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/autocomplete/AutocompleteEditorListener.kt index f4ef8128b..19b0dfa3a 100644 --- a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/autocomplete/AutocompleteEditorListener.kt +++ b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/autocomplete/AutocompleteEditorListener.kt @@ -3,6 +3,7 @@ package com.github.continuedev.continueintellijextension.autocomplete import com.intellij.openapi.application.invokeLater import com.intellij.openapi.components.service import com.intellij.openapi.editor.Editor +import com.intellij.openapi.editor.EditorKind import com.intellij.openapi.editor.event.* import com.intellij.openapi.fileEditor.FileEditorManager import com.intellij.openapi.fileEditor.FileEditorManagerEvent @@ -11,6 +12,10 @@ import com.intellij.openapi.util.TextRange class AutocompleteCaretListener : CaretListener { override fun caretPositionChanged(event: CaretEvent) { + if(event.editor.editorKind != EditorKind.MAIN_EDITOR) { + return + } + val caret = event.caret ?: return val offset = caret.offset val editor = caret.editor From a016eb438f9b69250b377b55b7b962b555c1d557 Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Fri, 7 Feb 2025 17:32:57 -0800 Subject: [PATCH 113/262] fix file provider submenu loads --- core/core.ts | 6 ++++++ gui/src/context/SubmenuContextProviders.tsx | 6 ++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/core/core.ts b/core/core.ts index edfbc6c95..b50b8ddca 100644 --- a/core/core.ts +++ b/core/core.ts @@ -841,12 +841,18 @@ export class Core { on("files/created", async ({ data }) => { if (data?.uris?.length) { + this.messenger.send("refreshSubmenuItems", { + providers: ["file"], + }); await this.refreshCodebaseIndexFiles(data.uris); } }); on("files/deleted", async ({ data }) => { if (data?.uris?.length) { + this.messenger.send("refreshSubmenuItems", { + providers: ["file"], + }); await this.refreshCodebaseIndexFiles(data.uris); } }); diff --git a/gui/src/context/SubmenuContextProviders.tsx b/gui/src/context/SubmenuContextProviders.tsx index 5b6e58fa4..1af754b6c 100644 --- a/gui/src/context/SubmenuContextProviders.tsx +++ b/gui/src/context/SubmenuContextProviders.tsx @@ -246,9 +246,7 @@ export const SubmenuContextProvidersProvider = ({ abortControllers.get(description.title)?.abort(); abortControllers.set(description.title, controller); providersLoading.add(description.title); - console.log( - `Refreshing items for ${description.title} submenu provider`, - ); + const result = await ideMessenger.request( "context/loadSubmenuItems", { @@ -296,7 +294,7 @@ export const SubmenuContextProvidersProvider = ({ setFallbackResults((prev) => ({ ...prev, file: deduplicateArray( - [...lastOpenFilesRef.current, ...(prev.file ?? [])], + [...lastOpenFilesRef.current, ...itemsWithProvider], (a, b) => a.id === b.id, ), })); From 05a4e79d15dbe8321220bfd14f16fddc34da0139 Mon Sep 17 00:00:00 2001 From: Patrick Erichsen Date: Fri, 7 Feb 2025 17:58:40 -0800 Subject: [PATCH 114/262] Update gradle.properties --- extensions/intellij/gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/intellij/gradle.properties b/extensions/intellij/gradle.properties index 7028aa723..870baaad5 100644 --- a/extensions/intellij/gradle.properties +++ b/extensions/intellij/gradle.properties @@ -3,7 +3,7 @@ pluginGroup=com.github.continuedev.continueintellijextension pluginName=continue-intellij-extension pluginRepositoryUrl=https://github.com/continuedev/continue # SemVer format -> https://semver.org -pluginVersion=0.0.87 +pluginVersion=0.0.88 # Supported build number ranges and IntelliJ Platform versions -> https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html pluginSinceBuild=223 # IntelliJ Platform Properties -> https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html#configuration-intellij-extension From 82e41370885ffa2fc361b0970f2f1b4d82bc3784 Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Fri, 7 Feb 2025 18:11:17 -0800 Subject: [PATCH 115/262] fix apply button --- core/util/ideUtils.ts | 12 ++++++++++-- gui/src/components/Layout.tsx | 5 +++++ .../StepContainerPreToolbar.tsx | 10 ---------- 3 files changed, 15 insertions(+), 12 deletions(-) diff --git a/core/util/ideUtils.ts b/core/util/ideUtils.ts index 9ed4a47fc..352aad6ca 100644 --- a/core/util/ideUtils.ts +++ b/core/util/ideUtils.ts @@ -34,10 +34,11 @@ export async function resolveRelativePathInDir( If no meaninful path match just concatenates to first dir's uri */ export async function inferResolvedUriFromRelativePath( - relativePath: string, + _relativePath: string, ide: IDE, dirCandidates?: string[], ): Promise { + const relativePath = _relativePath.trim().replaceAll("\\", "/"); const dirs = dirCandidates ?? (await ide.getWorkspaceDirs()); if (dirs.length === 0) { @@ -51,7 +52,7 @@ export async function inferResolvedUriFromRelativePath( suffixes.push(segments.slice(i).join("/")); } - // For each suffix, try to find a unique matching directory + // For each suffix, try to find a unique matching dir/file for (const suffix of suffixes) { const uris = dirs.map((dir) => ({ dir, @@ -78,6 +79,13 @@ export async function inferResolvedUriFromRelativePath( } } + // Sometimes the model will decide to only output the base name or small number of path parts + // in which case we shouldn't create a new file if it matches the current file + const activeFile = await ide.getCurrentFile(); + if (activeFile && activeFile.path.endsWith(relativePath)) { + return activeFile.path; + } + // If no unique match found, use the first directory return joinPathsToUri(dirs[0], relativePath); } diff --git a/gui/src/components/Layout.tsx b/gui/src/components/Layout.tsx index 94a9fb616..887271a9c 100644 --- a/gui/src/components/Layout.tsx +++ b/gui/src/components/Layout.tsx @@ -11,6 +11,7 @@ import { updateApplyState, setMode, newSession, + selectIsInEditMode, } from "../redux/slices/sessionSlice"; import { getFontSize, isMetaEquivalentKeyPressed } from "../util"; import { ROUTES } from "../util/navigation"; @@ -221,7 +222,11 @@ const Layout = () => { [], ); + const isInEditMode = useAppSelector(selectIsInEditMode); useWebviewListener("exitEditMode", async () => { + if (!isInEditMode) { + return; + } dispatch( loadLastSession({ saveCurrentSession: false, diff --git a/gui/src/components/markdown/StepContainerPreToolbar/StepContainerPreToolbar.tsx b/gui/src/components/markdown/StepContainerPreToolbar/StepContainerPreToolbar.tsx index 45faf550a..99e449cc7 100644 --- a/gui/src/components/markdown/StepContainerPreToolbar/StepContainerPreToolbar.tsx +++ b/gui/src/components/markdown/StepContainerPreToolbar/StepContainerPreToolbar.tsx @@ -99,16 +99,6 @@ export default function StepContainerPreToolbar( ideMessenger.ide, ); - // Sometimes the model will decide to only output the base name - // in which case we shouldn't create a new file if it matches the current file - const exists = await ideMessenger.ide.fileExists(fileUri); - if (!exists) { - const activeFile = await ideMessenger.ide.getCurrentFile(); - if (activeFile && activeFile.path.endsWith(props.relativeFilepath)) { - fileUri = activeFile.path; - } - } - ideMessenger.post("applyToFile", { streamId: streamIdRef.current, filepath: fileUri, From 27820f60c7da0697a93eca82818f40037593b3ee Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Fri, 7 Feb 2025 18:35:14 -0800 Subject: [PATCH 116/262] tutorial card updates --- gui/src/components/mainInput/TutorialCard.tsx | 66 ++++++++++--------- 1 file changed, 34 insertions(+), 32 deletions(-) diff --git a/gui/src/components/mainInput/TutorialCard.tsx b/gui/src/components/mainInput/TutorialCard.tsx index 3eb0da2ef..99d5eb774 100644 --- a/gui/src/components/mainInput/TutorialCard.tsx +++ b/gui/src/components/mainInput/TutorialCard.tsx @@ -16,41 +16,34 @@ interface TutorialCardProps { onClose: () => void; } -const TutorialCardDiv = styled.div` - border: 1px solid ${lightGray}; - border-radius: ${defaultBorderRadius}; - background-color: ${vscBackground}; - padding: 1rem 2.5rem 1rem 2rem; - margin: 1rem; - max-width: 28rem; - position: relative; -`; - const CloseButton = styled.button` border: none; background-color: ${vscBackground}; color: ${lightGray}; position: absolute; - top: 0.4rem; - right: 0.5rem; - padding: 0.25rem; - display: flex; - align-items: center; - justify-content: center; - cursor: pointer; `; export function TutorialCard({ onClose }: TutorialCardProps) { const ideMessenger = useContext(IdeMessengerContext); + const jetbrains = isJetBrains(); return ( - - - - +
+
+

+
+ +
+
    - {!isJetBrains() && ( + {!jetbrains && (
  • @@ -67,27 +60,36 @@ export function TutorialCard({ onClose }: TutorialCardProps) {
  • )}
  • - +
    + +
    - Highlight code and press {getMetaKeyLabel()} + I to - quickly make natural language edits + Highlight code and press {getMetaKeyLabel()} +{" "} + I to quickly make natural language edits
  • - +
    + +
    - Highlight code and press {getMetaKeyLabel()} + L to - add it to the chat window + Highlight code and press {getMetaKeyLabel()} +{" "} + {jetbrains ? "J" : "L"} to add it to the chat window
  • - +
    + +
    - Click the gear icon in the bottom right to configure Continue + Click the gear icon at the top of the chat window to configure + Continue
  • - +
    + +
- +
); } From 511abbd9264dfddc6f4e4e22b43677363b60c834 Mon Sep 17 00:00:00 2001 From: Nate Date: Fri, 7 Feb 2025 18:49:21 -0800 Subject: [PATCH 117/262] update styling to match personal taste --- extensions/vscode/package-lock.json | 6 +++--- gui/package-lock.json | 2 +- .../OnboardingCard/components/OnboardingCardTabs.tsx | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/extensions/vscode/package-lock.json b/extensions/vscode/package-lock.json index 78a61be2b..2d0215b19 100644 --- a/extensions/vscode/package-lock.json +++ b/extensions/vscode/package-lock.json @@ -1,12 +1,12 @@ { "name": "continue", - "version": "0.9.260", + "version": "0.9.261", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "continue", - "version": "0.9.260", + "version": "0.9.261", "license": "Apache-2.0", "dependencies": { "@continuedev/fetch": "^1.0.3", @@ -106,7 +106,7 @@ "@aws-sdk/client-sagemaker-runtime": "^3.621.0", "@aws-sdk/credential-providers": "^3.620.1", "@continuedev/config-types": "^1.0.13", - "@continuedev/config-yaml": "^1.0.23", + "@continuedev/config-yaml": "^1.0.24", "@continuedev/fetch": "^1.0.4", "@continuedev/llm-info": "^1.0.2", "@continuedev/openai-adapters": "^1.0.10", diff --git a/gui/package-lock.json b/gui/package-lock.json index 0984ae74d..e77dcafc9 100644 --- a/gui/package-lock.json +++ b/gui/package-lock.json @@ -108,7 +108,7 @@ "@aws-sdk/client-sagemaker-runtime": "^3.621.0", "@aws-sdk/credential-providers": "^3.620.1", "@continuedev/config-types": "^1.0.13", - "@continuedev/config-yaml": "^1.0.23", + "@continuedev/config-yaml": "^1.0.24", "@continuedev/fetch": "^1.0.4", "@continuedev/llm-info": "^1.0.2", "@continuedev/openai-adapters": "^1.0.10", diff --git a/gui/src/components/OnboardingCard/components/OnboardingCardTabs.tsx b/gui/src/components/OnboardingCard/components/OnboardingCardTabs.tsx index 0cac5b1d5..e14d7aa2c 100644 --- a/gui/src/components/OnboardingCard/components/OnboardingCardTabs.tsx +++ b/gui/src/components/OnboardingCard/components/OnboardingCardTabs.tsx @@ -70,7 +70,7 @@ export function OnboardingCardTabs({ onTabClick, }: OnboardingCardTabsProps) { return ( -
+
{Object.entries(TabTitles).map(([tabType, titles]) => { From 638969b7c7594f36bfefd59a986032ba597f88fa Mon Sep 17 00:00:00 2001 From: Patrick Erichsen Date: Fri, 7 Feb 2025 19:29:35 -0800 Subject: [PATCH 118/262] feat: update azure uri for foundry users --- core/llm/llms/Azure.ts | 2 +- core/llm/llms/OpenAI.ts | 21 ++++++++++++------- .../model-providers/top-level/azure.md | 10 ++++----- extensions/vscode/package-lock.json | 6 +++--- gui/package-lock.json | 2 +- gui/src/pages/config/ScopeSelect.tsx | 6 +++++- 6 files changed, 28 insertions(+), 19 deletions(-) diff --git a/core/llm/llms/Azure.ts b/core/llm/llms/Azure.ts index b2beae921..bd27daeb1 100644 --- a/core/llm/llms/Azure.ts +++ b/core/llm/llms/Azure.ts @@ -14,7 +14,7 @@ class Azure extends OpenAI { static defaultOptions: Partial = { apiVersion: "2024-02-15-preview", - apiType: "azure", + apiType: "azure-openai", }; constructor(options: LLMOptions) { diff --git a/core/llm/llms/OpenAI.ts b/core/llm/llms/OpenAI.ts index e0acc961e..3576def6a 100644 --- a/core/llm/llms/OpenAI.ts +++ b/core/llm/llms/OpenAI.ts @@ -49,7 +49,7 @@ const CHAT_ONLY_MODELS = [ "gpt-4o-mini", "o1-preview", "o1-mini", - "o3-mini" + "o3-mini", ]; const formatMessageForO1 = (messages: ChatCompletionMessageParam[]) => { @@ -206,18 +206,25 @@ class OpenAI extends BaseLLM { protected _getEndpoint( endpoint: "chat/completions" | "completions" | "models", ) { - if (this.apiType === "azure") { - return new URL( - `openai/deployments/${this.deployment}/${endpoint}?api-version=${this.apiVersion}`, - this.apiBase, - ); - } if (!this.apiBase) { throw new Error( "No API base URL provided. Please set the 'apiBase' option in config.json", ); } + if (this.apiType?.includes("azure")) { + // Default is `azure-openai`, but previously was `azure` + const isAzureOpenAI = + this.apiType === "azure-openai" || this.apiType === "azure"; + + const path = isAzureOpenAI + ? `openai/deployments/${this.deployment}/${endpoint}` + : endpoint; + + const version = this.apiVersion ? `?api-version=${this.apiVersion}` : ""; + return new URL(`${path}${version}`, this.apiBase); + } + return new URL(endpoint, this.apiBase); } diff --git a/docs/docs/customize/model-providers/top-level/azure.md b/docs/docs/customize/model-providers/top-level/azure.md index 45b49f734..d51a10405 100644 --- a/docs/docs/customize/model-providers/top-level/azure.md +++ b/docs/docs/customize/model-providers/top-level/azure.md @@ -7,7 +7,7 @@ Azure AI Foundry is a cloud-based service that provides access to models from Op :::info -For details on OpenAI model setup, see [Azure OpenAI Service configuration](#general-model-configuration). +For details on OpenAI model setup, see [Azure OpenAI Service configuration](#azure-openai-service-configuration). ::: @@ -46,7 +46,7 @@ We recommend configuring **text-embedding-3-large** as your embeddings model. ```json title="config.json" "embeddingsProvider": { - "provider": "openai", + "provider": "azure", "model": "text-embedding-3-large", "apiBase": "", "deployment": "", @@ -66,9 +66,7 @@ Azure OpenAI currently does not offer any reranking models. If you'd like to use OpenAI models but are concerned about privacy, you can use the Azure OpenAI service, which is GDPR and HIPAA compliant. :::info[Getting access] -You need to apply for access to the Azure OpenAI service. Response times are typically within a few days. - -**[Click here to apply for access to the Azure OpenAI service](https://azure.microsoft.com/en-us/products/ai-services/openai-service)** +[Click here](https://azure.microsoft.com/en-us/products/ai-services/openai-service) to apply for access to the Azure OpenAI service. Response times are typically within a few days. ::: ## Azure OpenAI Service configuration @@ -83,7 +81,7 @@ For example, a Target URI of `https://just-an-example.openai.azure.com/openai/de { "title": "GPT-4o Azure", "model": "gpt-4o", - "provider": "openai", + "provider": "azure", "apiBase": "https://just-an-example.openai.azure.com", "deployment": "gpt-4o-july", "apiVersion": "2023-03-15-preview", diff --git a/extensions/vscode/package-lock.json b/extensions/vscode/package-lock.json index 78a61be2b..2d0215b19 100644 --- a/extensions/vscode/package-lock.json +++ b/extensions/vscode/package-lock.json @@ -1,12 +1,12 @@ { "name": "continue", - "version": "0.9.260", + "version": "0.9.261", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "continue", - "version": "0.9.260", + "version": "0.9.261", "license": "Apache-2.0", "dependencies": { "@continuedev/fetch": "^1.0.3", @@ -106,7 +106,7 @@ "@aws-sdk/client-sagemaker-runtime": "^3.621.0", "@aws-sdk/credential-providers": "^3.620.1", "@continuedev/config-types": "^1.0.13", - "@continuedev/config-yaml": "^1.0.23", + "@continuedev/config-yaml": "^1.0.24", "@continuedev/fetch": "^1.0.4", "@continuedev/llm-info": "^1.0.2", "@continuedev/openai-adapters": "^1.0.10", diff --git a/gui/package-lock.json b/gui/package-lock.json index 0984ae74d..e77dcafc9 100644 --- a/gui/package-lock.json +++ b/gui/package-lock.json @@ -108,7 +108,7 @@ "@aws-sdk/client-sagemaker-runtime": "^3.621.0", "@aws-sdk/credential-providers": "^3.620.1", "@continuedev/config-types": "^1.0.13", - "@continuedev/config-yaml": "^1.0.23", + "@continuedev/config-yaml": "^1.0.24", "@continuedev/fetch": "^1.0.4", "@continuedev/llm-info": "^1.0.2", "@continuedev/openai-adapters": "^1.0.10", diff --git a/gui/src/pages/config/ScopeSelect.tsx b/gui/src/pages/config/ScopeSelect.tsx index 9ee287e8b..2808b082c 100644 --- a/gui/src/pages/config/ScopeSelect.tsx +++ b/gui/src/pages/config/ScopeSelect.tsx @@ -24,6 +24,10 @@ export function ScopeSelect() { const orgId = newValue === USER_PROFILE_VAL ? null : newValue; dispatch(setOrgId(orgId)); }; + + const CurScopeEntityFallBackIcon = + value === "personal" ? UserCircleIcon : BuildingOfficeIcon; + const selectedDisplay = value === USER_PROFILE_VAL ? { name: "Personal", iconUrl: null } @@ -38,7 +42,7 @@ export function ScopeSelect() { {selectedDisplay?.iconUrl ? ( ) : ( - + )} {selectedDisplay?.name || "Select Organization"} From a094c7e200bfc058f3c25c2d5ce14b3dc3df18b8 Mon Sep 17 00:00:00 2001 From: Patrick Erichsen Date: Fri, 7 Feb 2025 19:33:55 -0800 Subject: [PATCH 119/262] Update azure.md --- docs/docs/customize/model-providers/top-level/azure.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/docs/docs/customize/model-providers/top-level/azure.md b/docs/docs/customize/model-providers/top-level/azure.md index d51a10405..eec9150b0 100644 --- a/docs/docs/customize/model-providers/top-level/azure.md +++ b/docs/docs/customize/model-providers/top-level/azure.md @@ -22,7 +22,8 @@ We recommend configuring **GPT-4o** as your chat model. "model": "gpt-4o", "apiBase": "", "deployment": "", - "apiKey": "" // If you use subscription key, try using Azure gateway to rename it apiKey + "apiKey": "", // If you use subscription key, try using Azure gateway to rename it apiKey + "apiType": "azure-foundry" // Or "azure-openai" if using OpenAI models }] ``` @@ -50,8 +51,8 @@ We recommend configuring **text-embedding-3-large** as your embeddings model. "model": "text-embedding-3-large", "apiBase": "", "deployment": "", - "apiType": "azure", - "apiKey": "" + "apiKey": "", + "apiType": "azure-foundry" // Or "azure-openai" if using OpenAI models } ``` @@ -85,6 +86,7 @@ For example, a Target URI of `https://just-an-example.openai.azure.com/openai/de "apiBase": "https://just-an-example.openai.azure.com", "deployment": "gpt-4o-july", "apiVersion": "2023-03-15-preview", - "apiKey": "" + "apiKey": "", + "apiType": "azure-openai" } ``` From fe8f581e2640a2298fe5d9ad9015cce98e31a3bf Mon Sep 17 00:00:00 2001 From: Patrick Erichsen Date: Fri, 7 Feb 2025 19:55:16 -0800 Subject: [PATCH 120/262] Update llm.test.ts --- core/llm/llm.test.ts | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/core/llm/llm.test.ts b/core/llm/llm.test.ts index 53729022a..9912b862e 100644 --- a/core/llm/llm.test.ts +++ b/core/llm/llm.test.ts @@ -2,12 +2,14 @@ import * as dotenv from "dotenv"; import { AssistantChatMessage, CompletionOptions } from ".."; -import { BaseLLM } from "."; import Anthropic from "./llms/Anthropic"; +import Azure from "./llms/Azure"; import Gemini from "./llms/Gemini"; import Mistral from "./llms/Mistral"; import OpenAI from "./llms/OpenAI"; +import { BaseLLM } from "."; + dotenv.config(); const COMPLETION_OPTIONS: Partial = { @@ -222,4 +224,25 @@ describe("LLM", () => { }), { testFim: true, skip: false }, ); + testLLM( + new Azure({ + apiKey: process.env.AZURE_OPENAI_API_KEY, + model: "gpt-4o", + apiVersion: "2024-05-01-preview", + apiBase: "https://continue-azure-openai-instance.openai.azure.com", + deployment: "azure-openai-deployment", + apiType: "azure-openai", + }), + { testFim: false, skip: false, timeout: 20000 }, + ); + testLLM( + new Azure({ + apiKey: process.env.AZURE_FOUNDRY_API_KEY, + model: "codestral-latest", + apiBase: + "https://codestral-2501-continue-testing.eastus.models.ai.azure.com", + apiType: "azure-foundry", + }), + { testFim: false, skip: false, timeout: 20000 }, + ); }); From d9ab4d82777b5476dc21b0c58dd99587b1f76447 Mon Sep 17 00:00:00 2001 From: Nate Date: Fri, 7 Feb 2025 20:42:46 -0800 Subject: [PATCH 121/262] bump version --- extensions/vscode/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/vscode/package.json b/extensions/vscode/package.json index f610d5887..7017d57da 100644 --- a/extensions/vscode/package.json +++ b/extensions/vscode/package.json @@ -2,7 +2,7 @@ "name": "continue", "icon": "media/icon.png", "author": "Continue Dev, Inc", - "version": "0.9.261", + "version": "0.9.262", "repository": { "type": "git", "url": "https://github.com/continuedev/continue" From f482ffd5fd9c357e92894f3a82065c143996ff9f Mon Sep 17 00:00:00 2001 From: liuk Date: Sat, 8 Feb 2025 16:55:23 +0800 Subject: [PATCH 122/262] refactor: Replace EmptyBorder with DPI-aware borders - Replaced all instances of EmptyBorder with JBUI.Borders for better DPI awareness. - Removed redundant calls to conversion methods and simplified color assignments. - Fixed unclear button text in light themes --- .../editor/InlineEditAction.kt | 37 +++++++++---------- .../editor/VerticalDiffBlock.kt | 20 +++++----- 2 files changed, 27 insertions(+), 30 deletions(-) diff --git a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/editor/InlineEditAction.kt b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/editor/InlineEditAction.kt index 9f314ede6..de65aa92c 100644 --- a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/editor/InlineEditAction.kt +++ b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/editor/InlineEditAction.kt @@ -29,7 +29,6 @@ import java.awt.geom.AffineTransform import java.awt.geom.Path2D import java.awt.geom.RoundRectangle2D import javax.swing.* -import javax.swing.border.EmptyBorder import javax.swing.event.DocumentEvent import javax.swing.event.DocumentListener import javax.swing.event.ListDataListener @@ -73,8 +72,8 @@ fun makePanel( onReject: () -> Unit ): JPanel { val topPanel = - ShadowPanel(MigLayout("wrap 1, insets 2 ${leftInset} 2 2, gap 0!")).apply { - background = JBColor(0x20888888.toInt(), 0x20888888.toInt()) + ShadowPanel(MigLayout("wrap 1, insets 2 $leftInset 2 2, gap 0!")).apply { + background = JBColor(0x20888888, 0x20888888) isOpaque = false } @@ -374,7 +373,7 @@ class CustomPanel( val closeIcon = IconLoader.getIcon("/icons/close.svg", javaClass) return JLabel(closeIcon).apply { background = Color(0, 0, 0, 0) - border = EmptyBorder(2, 6, 2, 0) + border = JBUI.Borders.empty(2, 6, 2, 0) toolTipText = "`esc` to cancel" isOpaque = false addMouseListener( @@ -406,7 +405,7 @@ class CustomPanel( background = defaultBackground foreground = Color(128, 128, 128, 200) font = UIUtil.getFontWithFallback("Arial", Font.PLAIN, 12) - border = EmptyBorder(8, 8, 8, 8) + border = JBUI.Borders.empty(8) isOpaque = false isEditable = false cursor = Cursor.getPredefinedCursor(Cursor.HAND_CURSOR) @@ -423,7 +422,7 @@ class CustomPanel( val component = super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus) if (component is JLabel) { - component.border = EmptyBorder(4, 6, 4, 6) + component.border = JBUI.Borders.empty(4, 6) } return component } @@ -451,9 +450,9 @@ class CustomPanel( val rightButton = CustomButton("⏎ Enter") { onEnter() } .apply { - background = JBColor(0x999998.toInt(), 0x999998.toInt()) - foreground = JBColor(0xF5F5F5.toInt(), 0xF5F5F5.toInt()) - border = EmptyBorder(2, 6, 2, 6) + background = JBColor(0x999998, 0x999998) + foreground = JBColor(0xF5F5F5, 0xF5F5F5) + border = JBUI.Borders.empty(2, 6) } val rightPanel = JPanel(MigLayout("insets 0, fillx")).apply { @@ -461,7 +460,7 @@ class CustomPanel( add(rightButton, "align right") } - border = EmptyBorder(0, 0, 16, 12) + border = JBUI.Borders.empty(0, 0, 16, 12) isOpaque = false add(dropdown, "align left") @@ -477,7 +476,7 @@ class CustomPanel( val progressBar = JProgressBar().apply { isIndeterminate = true } add(progressBar, BorderLayout.CENTER) - border = BorderFactory.createEmptyBorder(0, 0, 16, 12) + border = JBUI.Borders.empty(0, 0, 16, 12) } private val subPanelC: JPanel = @@ -486,21 +485,19 @@ class CustomPanel( JLabel("Type to re-prompt").apply { foreground = Color(156, 163, 175) // text-gray-400 font = UIUtil.getFontWithFallback("Arial", Font.PLAIN, 11) - border = EmptyBorder(0, 4, 0, 0) + border = JBUI.Borders.emptyLeft(4) } val leftButton = CustomButton("Reject All (${getMetaKeyLabel()}${getShiftKeyLabel()}⌫)") { onReject() } .apply { - background = JBColor(0x30FF0000.toInt(), 0x30FF0000.toInt()) - foreground = JBColor(0xF5F5F5.toInt(), 0xF5F5F5.toInt()) + background = JBColor(0x30FF0000, 0x30FF0000) } val rightButton = CustomButton("Accept All (${getMetaKeyLabel()}${getShiftKeyLabel()}⏎)") { onAccept() } .apply { - background = JBColor(0x3000FF00.toInt(), 0x3000FF00.toInt()) - foreground = JBColor(0xF5F5F5.toInt(), 0xF5F5F5.toInt()) + background = JBColor(0x3000FF00, 0x3000FF00) } val rightPanel = @@ -508,12 +505,12 @@ class CustomPanel( isOpaque = false add(leftButton, "align right") add(rightButton, "align right") - border = EmptyBorder(0, 0, 0, 0) + border = JBUI.Borders.empty() } add(leftLabel, "align left") add(rightPanel, "align right") - border = BorderFactory.createEmptyBorder(0, 0, 16, 12) + border = JBUI.Borders.empty(0, 0, 16, 12) isOpaque = false } @@ -625,7 +622,7 @@ class CustomButton(text: String, onClick: () -> Unit) : JLabel(text, CENTER) { }) font = UIUtil.getFontWithFallback("Arial", Font.PLAIN, 11) - border = EmptyBorder(2, 6, 2, 6) + border = JBUI.Borders.empty(2, 6) } override fun paintComponent(g: Graphics) { @@ -694,7 +691,7 @@ class TransparentArrowButtonUI : BasicComboBoxUI() { } override fun getInsets(): Insets { - return JBUI.insets(0, 6, 0, 0) + return JBUI.insetsLeft(6) } override fun installUI(c: JComponent?) { diff --git a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/editor/VerticalDiffBlock.kt b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/editor/VerticalDiffBlock.kt index 6f311c29b..e121e5687 100644 --- a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/editor/VerticalDiffBlock.kt +++ b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/editor/VerticalDiffBlock.kt @@ -13,8 +13,8 @@ import com.intellij.openapi.project.Project import com.intellij.openapi.util.TextRange import com.intellij.ui.JBColor import com.intellij.util.application +import com.intellij.util.ui.JBUI import java.awt.* -import javax.swing.BorderFactory import javax.swing.JButton import javax.swing.JTextArea import kotlin.math.min @@ -25,8 +25,8 @@ class VerticalDiffBlock( var startLine: Int, private val onAcceptReject: (VerticalDiffBlock, Boolean) -> Unit ) { - val deletedLines: MutableList = mutableListOf(); - val addedLines: MutableList = mutableListOf(); + val deletedLines: MutableList = mutableListOf() + val addedLines: MutableList = mutableListOf() private val acceptButton: JButton private val rejectButton: JButton private var deletionInlay: Disposable? = null @@ -155,10 +155,10 @@ class VerticalDiffBlock( val rejectBtn = createButton( "${getAltKeyLabel()}${getShiftKeyLabel()}N", - JBColor(0x99FF0000.toInt(), 0x99FF0000.toInt()) + JBColor(0x77FF0000, 0x77FF0000) ).apply { addActionListener { - handleReject(); + handleReject() onAcceptReject(this@VerticalDiffBlock, false) } @@ -168,10 +168,10 @@ class VerticalDiffBlock( createButton( "${getAltKeyLabel()}${ getShiftKeyLabel() - }Y", JBColor(0x7700BB00.toInt(), 0x7700BB00.toInt()) + }Y", JBColor(0x7700BB00, 0x7700BB00) ).apply { addActionListener { - handleAccept(); + handleAccept() onAcceptReject(this@VerticalDiffBlock, true) } } @@ -215,9 +215,9 @@ class VerticalDiffBlock( private fun createDeletionTextArea(text: String) = JTextArea(text).apply { isEditable = false - background = JBColor(0x30FF0000.toInt(), 0x30FF0000.toInt()) + background = JBColor(0x30FF0000, 0x30FF0000) foreground = JBColor.GRAY - border = BorderFactory.createEmptyBorder() + border = JBUI.Borders.empty() lineWrap = false wrapStyleWord = false font = editor.colorsScheme.getFont(EditorFontType.PLAIN) @@ -250,7 +250,7 @@ class VerticalDiffBlock( font = Font("Arial", Font.BOLD, 9) isContentAreaFilled = false isOpaque = false - border = BorderFactory.createEmptyBorder(4, 2, 4, 2) + border = JBUI.Borders.empty(4, 2) preferredSize = Dimension(preferredSize.width - 30, 14) cursor = Cursor(Cursor.HAND_CURSOR) } From f3161c1cb8ee309a2a646241ed2a662cc26b3023 Mon Sep 17 00:00:00 2001 From: Patrick Erichsen Date: Sat, 8 Feb 2025 19:27:59 -0800 Subject: [PATCH 123/262] Update prepackage.js --- extensions/vscode/scripts/prepackage.js | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/extensions/vscode/scripts/prepackage.js b/extensions/vscode/scripts/prepackage.js index 46f2efd28..19a95a133 100644 --- a/extensions/vscode/scripts/prepackage.js +++ b/extensions/vscode/scripts/prepackage.js @@ -371,18 +371,7 @@ const isMacTarget = target?.startsWith("darwin"); execCmdSync( `curl -L -o ../../core/node_modules/sqlite3/build.tar.gz ${downloadUrl}`, ); - - // TODO: Remove the if/else once we upload the new binary - if (isWinTarget) { - execCmdSync( - "cd ../../core/node_modules/sqlite3 && mkdir -p build/Release && tar -xvzf build.tar.gz -C build/Release", - ); - } else { - execCmdSync( - "cd ../../core/node_modules/sqlite3 && tar -xvzf build.tar.gz", - ); - } - + execCmdSync("cd ../../core/node_modules/sqlite3 && tar -xvzf build.tar.gz"); fs.unlinkSync("../../core/node_modules/sqlite3/build.tar.gz"); // Download and unzip esbuild From cc975128b2be8daf7069026240aeaa318b174abe Mon Sep 17 00:00:00 2001 From: Nate Date: Sun, 9 Feb 2025 14:57:48 -0800 Subject: [PATCH 124/262] pin vscode version for e2e tests --- extensions/vscode/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/vscode/package.json b/extensions/vscode/package.json index 7017d57da..331f3c8cd 100644 --- a/extensions/vscode/package.json +++ b/extensions/vscode/package.json @@ -624,7 +624,7 @@ "e2e:build": "npm --prefix ../../gui run build && npm run package", "e2e:create-storage": "mkdir -p ./e2e/storage", "e2e:get-chromedriver": "extest get-chromedriver --storage ./e2e/storage", - "e2e:get-vscode": "extest get-vscode --storage ./e2e/storage", + "e2e:get-vscode": "CODE_VERSION=\"1.95.0\" extest get-vscode --storage ./e2e/storage", "e2e:sign-vscode": "codesign --entitlements entitlements.plist --deep --force -s - './e2e/storage/Visual Studio Code.app'", "e2e:copy-vsix": "chmod +x ./e2e/get-latest-vsix.sh && bash ./e2e/get-latest-vsix.sh", "e2e:install-vsix": "extest install-vsix -f ./e2e/vsix/continue.vsix --extensions_dir ./e2e/.test-extensions --storage ./e2e/storage", From 9537b2339eaa81e203a4ef3a5768c3296b5c37a4 Mon Sep 17 00:00:00 2001 From: Nate Date: Sun, 9 Feb 2025 15:50:15 -0800 Subject: [PATCH 125/262] fix release ci --- .github/workflows/main.yaml | 2 +- .github/workflows/preview.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index d10d58ef1..46209d364 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -208,7 +208,7 @@ jobs: runs-on: ubuntu-latest needs: - build - if: github.event.inputs.publish_build == 'true' + if: github.event_name != 'workflow_dispatch' || github.event.inputs.publish_build == 'true' permissions: contents: write steps: diff --git a/.github/workflows/preview.yaml b/.github/workflows/preview.yaml index 945f8d84b..abf58e6e8 100644 --- a/.github/workflows/preview.yaml +++ b/.github/workflows/preview.yaml @@ -204,7 +204,7 @@ jobs: runs-on: ubuntu-latest needs: - build - if: github.event.inputs.publish_build == 'true' + if: github.event_name != 'workflow_dispatch' || github.event.inputs.publish_build == 'true' permissions: contents: write steps: From 20c5c4713c1e9afb7321ee4cae32db1607dc09d5 Mon Sep 17 00:00:00 2001 From: Patrick Erichsen Date: Sun, 9 Feb 2025 19:46:13 -0800 Subject: [PATCH 126/262] Update prepackage.js --- extensions/vscode/scripts/prepackage.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/extensions/vscode/scripts/prepackage.js b/extensions/vscode/scripts/prepackage.js index 19a95a133..85ca640f0 100644 --- a/extensions/vscode/scripts/prepackage.js +++ b/extensions/vscode/scripts/prepackage.js @@ -518,9 +518,13 @@ const isMacTarget = target?.startsWith("darwin"); // out/node_modules (to be accessed by extension.js) `out/node_modules/@vscode/ripgrep/bin/rg${exe}`, `out/node_modules/@esbuild/${ - isWinTarget ? `${target}/esbuild.exe` : `${target}/bin/esbuild` + target === "win32-arm64" + ? "esbuild.exe" + : target === "win32-x64" + ? "win32-x64/esbuild.exe" + : `${target}/bin/esbuild` }`, - `out/node_modules/@lancedb/vectordb-${target}${isLinuxTarget ? "-gnu" : ""}/index.node`, + `out/node_modules/@lancedb/vectordb-${target}${isWinTarget ? "-msvc" : ""}${isLinuxTarget ? "-gnu" : ""}/index.node`, `out/node_modules/esbuild/lib/main.js`, `out/node_modules/esbuild/bin/esbuild`, ]); From 4de76dddc1eb86f50d190614e5c540059e6831b0 Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Sun, 9 Feb 2025 23:45:03 -0800 Subject: [PATCH 127/262] use theme colors for jetbrains inline edit --- .../continueintellijextension/editor/InlineEditAction.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/editor/InlineEditAction.kt b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/editor/InlineEditAction.kt index 9f314ede6..c623afd07 100644 --- a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/editor/InlineEditAction.kt +++ b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/editor/InlineEditAction.kt @@ -451,8 +451,8 @@ class CustomPanel( val rightButton = CustomButton("⏎ Enter") { onEnter() } .apply { - background = JBColor(0x999998.toInt(), 0x999998.toInt()) - foreground = JBColor(0xF5F5F5.toInt(), 0xF5F5F5.toInt()) + background = globalScheme.defaultForeground + foreground = globalScheme.defaultBackground border = EmptyBorder(2, 6, 2, 6) } From 4fb0e3fea0e6442ce32e48a50406655e46e37efa Mon Sep 17 00:00:00 2001 From: Piotr Czekaj Date: Mon, 10 Feb 2025 09:52:18 +0100 Subject: [PATCH 128/262] Add tools support for o3-mini o3-mini will fail with `Unsupported parameter: 'parallel_tool_calls' is not supported with this model.` if parallel_tool_calls is specified --- core/llm/llms/OpenAI.ts | 2 +- core/llm/toolSupport.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/llm/llms/OpenAI.ts b/core/llm/llms/OpenAI.ts index e0acc961e..73bade7b0 100644 --- a/core/llm/llms/OpenAI.ts +++ b/core/llm/llms/OpenAI.ts @@ -267,7 +267,7 @@ class OpenAI extends BaseLLM { body.max_completion_tokens = undefined; } - if (body.tools?.length) { + if (body.tools?.length && !body.model?.startsWith("o3")) { // To ensure schema adherence: https://platform.openai.com/docs/guides/function-calling#parallel-function-calling-and-structured-outputs // In practice, setting this to true and asking for multiple tool calls // leads to "arguments" being something like '{"file": "test.ts"}{"file": "test.js"}' diff --git a/core/llm/toolSupport.ts b/core/llm/toolSupport.ts index dd8f72fb0..9b93fa279 100644 --- a/core/llm/toolSupport.ts +++ b/core/llm/toolSupport.ts @@ -13,7 +13,7 @@ export const PROVIDER_TOOL_SUPPORT: Record< }, openai: (model) => { // https://platform.openai.com/docs/guides/function-calling#models-supporting-function-calling - if (model.toLowerCase().startsWith("gpt-4")) { + if (model.toLowerCase().startsWith("gpt-4") || model.toLowerCase().startsWith("o3")) { return true; } }, From 72a565129c66b3bde5a43a218262b16e892d3907 Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Mon, 10 Feb 2025 00:53:29 -0800 Subject: [PATCH 129/262] cleanup --- gui/src/components/mainInput/TutorialCard.tsx | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/gui/src/components/mainInput/TutorialCard.tsx b/gui/src/components/mainInput/TutorialCard.tsx index 99d5eb774..5f6a2c47c 100644 --- a/gui/src/components/mainInput/TutorialCard.tsx +++ b/gui/src/components/mainInput/TutorialCard.tsx @@ -6,8 +6,7 @@ import { PencilSquareIcon, XMarkIcon, } from "@heroicons/react/24/outline"; -import styled from "styled-components"; -import { defaultBorderRadius, lightGray, vscBackground } from ".."; +import { lightGray } from ".."; import { getMetaKeyLabel, isJetBrains } from "../../util"; import { useContext } from "react"; import { IdeMessengerContext } from "../../context/IdeMessenger"; @@ -16,13 +15,6 @@ interface TutorialCardProps { onClose: () => void; } -const CloseButton = styled.button` - border: none; - background-color: ${vscBackground}; - color: ${lightGray}; - position: absolute; -`; - export function TutorialCard({ onClose }: TutorialCardProps) { const ideMessenger = useContext(IdeMessengerContext); const jetbrains = isJetBrains(); From 18fd7fbe58a03dfda382f755e261c5f16e88f38e Mon Sep 17 00:00:00 2001 From: Roger Meier Date: Mon, 10 Feb 2025 12:10:43 +0100 Subject: [PATCH 130/262] fix: bump node.js dependencies --- binary/package-lock.json | 27 ++++++++------- core/package-lock.json | 7 ++-- extensions/vscode/package-lock.json | 54 +++++++++++++++++------------ extensions/vscode/package.json | 2 +- gui/package-lock.json | 51 +++++++++++++++------------ gui/package.json | 2 +- package-lock.json | 7 ++-- 7 files changed, 86 insertions(+), 64 deletions(-) diff --git a/binary/package-lock.json b/binary/package-lock.json index 72c044f14..962cdaa79 100644 --- a/binary/package-lock.json +++ b/binary/package-lock.json @@ -48,11 +48,11 @@ "@aws-sdk/client-sagemaker-runtime": "^3.621.0", "@aws-sdk/credential-providers": "^3.620.1", "@continuedev/config-types": "^1.0.13", - "@continuedev/config-yaml": "^1.0.24", + "@continuedev/config-yaml": "^1.0.26", "@continuedev/fetch": "^1.0.4", "@continuedev/llm-info": "^1.0.2", "@continuedev/openai-adapters": "^1.0.10", - "@modelcontextprotocol/sdk": "^1.0.0", + "@modelcontextprotocol/sdk": "^1.4.1", "@mozilla/readability": "^0.5.0", "@octokit/rest": "^20.0.2", "@typescript-eslint/eslint-plugin": "^7.8.0", @@ -2556,9 +2556,10 @@ } }, "node_modules/axios": { - "version": "1.6.8", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.8.tgz", - "integrity": "sha512-v/ZHtJDU39mDpyBoFVkETcd/uNdxrWRrg3bKpOKzXFA6Bvqopts6ALSMU3y6ijYxbw2B+wPrIv46egTzJXCLGQ==", + "version": "1.7.9", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.9.tgz", + "integrity": "sha512-LhLcE7Hbiryz8oMDdDptSrWowmB4Bl6RCt6sIJKpRB4XtVf0iEgewX3au/pJqm+Py1kCASkb/FFKjxQaLtxJvw==", + "license": "MIT", "dependencies": { "follow-redirects": "^1.15.6", "form-data": "^4.0.0", @@ -3166,10 +3167,11 @@ } }, "node_modules/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", "dev": true, + "license": "MIT", "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", @@ -5135,12 +5137,13 @@ } }, "node_modules/micromatch": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", - "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", "dev": true, + "license": "MIT", "dependencies": { - "braces": "^3.0.2", + "braces": "^3.0.3", "picomatch": "^2.3.1" }, "engines": { diff --git a/core/package-lock.json b/core/package-lock.json index 814c77601..caf3f0a57 100644 --- a/core/package-lock.json +++ b/core/package-lock.json @@ -15560,9 +15560,10 @@ } }, "node_modules/undici": { - "version": "6.21.0", - "resolved": "https://registry.npmjs.org/undici/-/undici-6.21.0.tgz", - "integrity": "sha512-BUgJXc752Kou3oOIuU1i+yZZypyZRqNPW0vqoMPl8VaoalSfeR0D8/t4iAS3yirs79SSMTxTag+ZC86uswv+Cw==", + "version": "6.21.1", + "resolved": "https://registry.npmjs.org/undici/-/undici-6.21.1.tgz", + "integrity": "sha512-q/1rj5D0/zayJB2FraXdaWxbhWiNKDvu8naDT2dl1yTlvJp4BLtOcp2a5BvgGNQpYYJzau7tf1WgKv3b+7mqpQ==", + "license": "MIT", "engines": { "node": ">=18.17" } diff --git a/extensions/vscode/package-lock.json b/extensions/vscode/package-lock.json index dabe51aff..5daea83ea 100644 --- a/extensions/vscode/package-lock.json +++ b/extensions/vscode/package-lock.json @@ -1,12 +1,12 @@ { "name": "continue", - "version": "0.9.261", + "version": "0.9.262", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "continue", - "version": "0.9.261", + "version": "0.9.262", "license": "Apache-2.0", "dependencies": { "@continuedev/fetch": "^1.0.3", @@ -50,7 +50,7 @@ "socket.io-client": "^4.7.2", "strip-ansi": "^7.1.0", "svg-builder": "^2.0.0", - "systeminformation": "^5.22.10", + "systeminformation": "^5.23.7", "tailwindcss": "^3.3.2", "undici": "^6.2.0", "uuid": "^9.0.1", @@ -5735,9 +5735,10 @@ "integrity": "sha512-dX7e/LHVJ6W3DE1MHWi9S1EYzDESENfLrYohG2G++ovZrYOkm4Knwa0mc1cn84xJOR4KEU0WSchhLbd0UklbHw==" }, "node_modules/express": { - "version": "4.21.1", - "resolved": "https://registry.npmjs.org/express/-/express-4.21.1.tgz", - "integrity": "sha512-YSFlK1Ee0/GC8QaO91tHcDxJiE/X4FbpAyQWkxAvG6AXCuR65YzK8ua6D9hvi/TzUfZMpc+BwuM1IPw8fmQBiQ==", + "version": "4.21.2", + "resolved": "https://registry.npmjs.org/express/-/express-4.21.2.tgz", + "integrity": "sha512-28HqgMZAmih1Czt9ny7qr6ek2qddF4FclbMzwhCREB6OFfH+rXAnuNCwo1/wFvrtbgsQDb4kSbX9de9lFbrXnA==", + "license": "MIT", "dependencies": { "accepts": "~1.3.8", "array-flatten": "1.1.1", @@ -5758,7 +5759,7 @@ "methods": "~1.1.2", "on-finished": "2.4.1", "parseurl": "~1.3.3", - "path-to-regexp": "0.1.10", + "path-to-regexp": "0.1.12", "proxy-addr": "~2.0.7", "qs": "6.13.0", "range-parser": "~1.2.1", @@ -5773,6 +5774,10 @@ }, "engines": { "node": ">= 0.10.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" } }, "node_modules/express/node_modules/debug": { @@ -9098,15 +9103,16 @@ } }, "node_modules/nanoid": { - "version": "3.3.7", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", - "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", + "version": "3.3.8", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.8.tgz", + "integrity": "sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w==", "funding": [ { "type": "github", "url": "https://github.com/sponsors/ai" } ], + "license": "MIT", "bin": { "nanoid": "bin/nanoid.cjs" }, @@ -10059,9 +10065,10 @@ } }, "node_modules/path-to-regexp": { - "version": "0.1.10", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.10.tgz", - "integrity": "sha512-7lf7qcQidTku0Gu3YDPc8DJ1q7OOucfa/BSsIwjuh56VU7katFvuM8hULfkwB3Fns/rsVF7PwPKVw1sl5KQS9w==" + "version": "0.1.12", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.12.tgz", + "integrity": "sha512-RA1GjUVMnvYFxuqovrEqZoxxW5NUZqbwKtYz/Tt7nXerk0LbLblQmrsgdeOxV5SFHf0UDggjS/bSeOZwt1pmEQ==", + "license": "MIT" }, "node_modules/path-type": { "version": "4.0.0", @@ -12168,9 +12175,10 @@ } }, "node_modules/systeminformation": { - "version": "5.23.5", - "resolved": "https://registry.npmjs.org/systeminformation/-/systeminformation-5.23.5.tgz", - "integrity": "sha512-PEpJwhRYxZgBCAlWZhWIgfMTjXLqfcaZ1pJsJn9snWNfBW/Z1YQg1mbIUSWrEV3ErAHF7l/OoVLQeaZDlPzkpA==", + "version": "5.25.11", + "resolved": "https://registry.npmjs.org/systeminformation/-/systeminformation-5.25.11.tgz", + "integrity": "sha512-jI01fn/t47rrLTQB0FTlMCC+5dYx8o0RRF+R4BPiUNsvg5OdY0s9DKMFmJGrx5SwMZQ4cag0Gl6v8oycso9b/g==", + "license": "MIT", "os": [ "darwin", "linux", @@ -12911,9 +12919,10 @@ "dev": true }, "node_modules/undici": { - "version": "6.20.1", - "resolved": "https://registry.npmjs.org/undici/-/undici-6.20.1.tgz", - "integrity": "sha512-AjQF1QsmqfJys+LXfGTNum+qw4S88CojRInG/6t31W/1fk6G59s92bnAvGz5Cmur+kQv2SURXEvvudLmbrE8QA==", + "version": "6.21.1", + "resolved": "https://registry.npmjs.org/undici/-/undici-6.21.1.tgz", + "integrity": "sha512-q/1rj5D0/zayJB2FraXdaWxbhWiNKDvu8naDT2dl1yTlvJp4BLtOcp2a5BvgGNQpYYJzau7tf1WgKv3b+7mqpQ==", + "license": "MIT", "engines": { "node": ">=18.17" } @@ -13309,10 +13318,11 @@ } }, "node_modules/vite": { - "version": "4.5.5", - "resolved": "https://registry.npmjs.org/vite/-/vite-4.5.5.tgz", - "integrity": "sha512-ifW3Lb2sMdX+WU91s3R0FyQlAyLxOzCSCP37ujw0+r5POeHPwe6udWVIElKQq8gk3t7b8rkmvqC6IHBpCff4GQ==", + "version": "4.5.9", + "resolved": "https://registry.npmjs.org/vite/-/vite-4.5.9.tgz", + "integrity": "sha512-qK9W4xjgD3gXbC0NmdNFFnVFLMWSNiR3swj957yutwzzN16xF/E7nmtAyp1rT9hviDroQANjE4HK3H4WqWdFtw==", "dev": true, + "license": "MIT", "dependencies": { "esbuild": "^0.18.10", "postcss": "^8.4.27", diff --git a/extensions/vscode/package.json b/extensions/vscode/package.json index 331f3c8cd..9fd83f971 100644 --- a/extensions/vscode/package.json +++ b/extensions/vscode/package.json @@ -711,7 +711,7 @@ "socket.io-client": "^4.7.2", "strip-ansi": "^7.1.0", "svg-builder": "^2.0.0", - "systeminformation": "^5.22.10", + "systeminformation": "^5.23.7", "tailwindcss": "^3.3.2", "undici": "^6.2.0", "uuid": "^9.0.1", diff --git a/gui/package-lock.json b/gui/package-lock.json index 2519bc970..8b651815c 100644 --- a/gui/package-lock.json +++ b/gui/package-lock.json @@ -51,7 +51,7 @@ "redux-persist-transform-filter": "^0.0.22", "redux-thunk": "^3.1.0", "rehype-highlight": "^7.0.0", - "rehype-katex": "^7.0.0", + "rehype-katex": "^7.0.1", "rehype-wrap-all": "^1.1.0", "remark-math": "^6.0.0", "reselect": "^5.1.1", @@ -3871,10 +3871,11 @@ } }, "node_modules/bin-version/node_modules/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", "dev": true, + "license": "MIT", "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", @@ -5756,10 +5757,11 @@ } }, "node_modules/foreground-child/node_modules/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", "dev": true, + "license": "MIT", "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", @@ -7595,13 +7597,14 @@ } }, "node_modules/katex": { - "version": "0.16.11", - "resolved": "https://registry.npmjs.org/katex/-/katex-0.16.11.tgz", - "integrity": "sha512-RQrI8rlHY92OLf3rho/Ts8i/XvjgguEjOkO1BEXcU3N8BqPpSzBNwV/G0Ukr+P/l3ivvJUE/Fa/CwbS6HesGNQ==", + "version": "0.16.21", + "resolved": "https://registry.npmjs.org/katex/-/katex-0.16.21.tgz", + "integrity": "sha512-XvqR7FgOHtWupfMiigNzmh+MgUVmDGU2kXZm899ZkPfcuoPuFxyHmXsgATDpFZDAXCI8tvinaVcDo8PIIJSo4A==", "funding": [ "https://opencollective.com/katex", "https://github.com/sponsors/katex" ], + "license": "MIT", "dependencies": { "commander": "^8.3.0" }, @@ -8610,9 +8613,9 @@ } }, "node_modules/nanoid": { - "version": "3.3.7", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", - "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", + "version": "3.3.8", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.8.tgz", + "integrity": "sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w==", "dev": true, "funding": [ { @@ -8620,6 +8623,7 @@ "url": "https://github.com/sponsors/ai" } ], + "license": "MIT", "bin": { "nanoid": "bin/nanoid.cjs" }, @@ -12198,10 +12202,11 @@ } }, "node_modules/vite": { - "version": "4.5.5", - "resolved": "https://registry.npmjs.org/vite/-/vite-4.5.5.tgz", - "integrity": "sha512-ifW3Lb2sMdX+WU91s3R0FyQlAyLxOzCSCP37ujw0+r5POeHPwe6udWVIElKQq8gk3t7b8rkmvqC6IHBpCff4GQ==", + "version": "4.5.9", + "resolved": "https://registry.npmjs.org/vite/-/vite-4.5.9.tgz", + "integrity": "sha512-qK9W4xjgD3gXbC0NmdNFFnVFLMWSNiR3swj957yutwzzN16xF/E7nmtAyp1rT9hviDroQANjE4HK3H4WqWdFtw==", "dev": true, + "license": "MIT", "dependencies": { "esbuild": "^0.18.10", "postcss": "^8.4.27", @@ -12699,10 +12704,11 @@ } }, "node_modules/vite-node/node_modules/vite": { - "version": "5.4.9", - "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.9.tgz", - "integrity": "sha512-20OVpJHh0PAM0oSOELa5GaZNWeDjcAvQjGXy2Uyr+Tp+/D2/Hdz6NLgpJLsarPTA2QJ6v8mX2P1ZfbsSKvdMkg==", + "version": "5.4.14", + "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.14.tgz", + "integrity": "sha512-EK5cY7Q1D8JNhSaPKVK4pwBFvaTmZxEnoKXLG/U9gmdDcihQGNzFlgIvaxezFR4glP1LsuiedwMBqCXH3wZccA==", "dev": true, + "license": "MIT", "dependencies": { "esbuild": "^0.21.3", "postcss": "^8.4.43", @@ -13274,10 +13280,11 @@ } }, "node_modules/vitest/node_modules/vite": { - "version": "5.4.9", - "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.9.tgz", - "integrity": "sha512-20OVpJHh0PAM0oSOELa5GaZNWeDjcAvQjGXy2Uyr+Tp+/D2/Hdz6NLgpJLsarPTA2QJ6v8mX2P1ZfbsSKvdMkg==", + "version": "5.4.14", + "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.14.tgz", + "integrity": "sha512-EK5cY7Q1D8JNhSaPKVK4pwBFvaTmZxEnoKXLG/U9gmdDcihQGNzFlgIvaxezFR4glP1LsuiedwMBqCXH3wZccA==", "dev": true, + "license": "MIT", "dependencies": { "esbuild": "^0.21.3", "postcss": "^8.4.43", diff --git a/gui/package.json b/gui/package.json index 8476573b2..8e361f5e9 100644 --- a/gui/package.json +++ b/gui/package.json @@ -59,7 +59,7 @@ "redux-persist-transform-filter": "^0.0.22", "redux-thunk": "^3.1.0", "rehype-highlight": "^7.0.0", - "rehype-katex": "^7.0.0", + "rehype-katex": "^7.0.1", "rehype-wrap-all": "^1.1.0", "remark-math": "^6.0.0", "reselect": "^5.1.1", diff --git a/package-lock.json b/package-lock.json index c147efa72..6a0a55705 100644 --- a/package-lock.json +++ b/package-lock.json @@ -625,10 +625,11 @@ "dev": true }, "node_modules/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", "dev": true, + "license": "MIT", "peer": true, "dependencies": { "path-key": "^3.1.0", From 5a36f4ae32b69882d1e40ed423f36a440f5c3ec5 Mon Sep 17 00:00:00 2001 From: Nate Date: Mon, 10 Feb 2025 12:15:28 -0800 Subject: [PATCH 131/262] enable hub checkbox --- .../continue/IntelliJIde.kt | 1 - .../services/ContinueExtensionSettingsService.kt | 14 ++++++-------- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/IntelliJIde.kt b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/IntelliJIde.kt index 40eb84dc3..fc93425b9 100644 --- a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/IntelliJIde.kt +++ b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/IntelliJIde.kt @@ -95,7 +95,6 @@ class IntelliJIDE( enableControlServerBeta = settings.continueState.enableContinueTeamsBeta, continueTestEnvironment = settings.continueState.continueTestEnvironment, pauseCodebaseIndexOnStart = false, // TODO: Needs to be implemented - continueTestEnvironment = "none" ) } diff --git a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/services/ContinueExtensionSettingsService.kt b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/services/ContinueExtensionSettingsService.kt index 4901bd018..9e3d00d23 100644 --- a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/services/ContinueExtensionSettingsService.kt +++ b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/services/ContinueExtensionSettingsService.kt @@ -34,7 +34,7 @@ class ContinueSettingsComponent : DumbAware { val enableOSR: JCheckBox = JCheckBox("Enable Off-Screen Rendering") val displayEditorTooltip: JCheckBox = JCheckBox("Display Editor Tooltip") val showIDECompletionSideBySide: JCheckBox = JCheckBox("Show IDE completions side-by-side") - val continueTestEnvironment: JComboBox = JComboBox(arrayOf("none", "production", "test", "local")) + val enableContinueHub: JCheckBox = JCheckBox("Enable Continue Hub") init { val constraints = GridBagConstraints() @@ -68,10 +68,7 @@ class ContinueSettingsComponent : DumbAware { constraints.gridy++ panel.add(showIDECompletionSideBySide, constraints) constraints.gridy++ - panel.add(JLabel("Continue test environment"), constraints) - constraints.gridy++ - constraints.gridy++ - panel.add(continueTestEnvironment, constraints) + panel.add(enableContinueHub, constraints) constraints.gridy++ // Add a "filler" component that takes up all remaining vertical space @@ -220,7 +217,7 @@ class ContinueExtensionConfigurable : Configurable { mySettingsComponent?.enableOSR?.isSelected != settings.continueState.enableOSR || mySettingsComponent?.displayEditorTooltip?.isSelected != settings.continueState.displayEditorTooltip || mySettingsComponent?.showIDECompletionSideBySide?.isSelected != settings.continueState.showIDECompletionSideBySide || - mySettingsComponent?.continueTestEnvironment?.selectedItem.toString() != settings.continueState.continueTestEnvironment + (if (mySettingsComponent?.enableContinueHub?.isSelected == true) settings.continueState.continueTestEnvironment != "production" else settings.continueState.continueTestEnvironment == "production") return modified } @@ -237,7 +234,7 @@ class ContinueExtensionConfigurable : Configurable { settings.continueState.showIDECompletionSideBySide = mySettingsComponent?.showIDECompletionSideBySide?.isSelected ?: false settings.continueState.continueTestEnvironment = - mySettingsComponent?.continueTestEnvironment?.selectedItem.toString() + if (mySettingsComponent?.enableContinueHub?.isSelected == true) "production" else "none" ApplicationManager.getApplication().messageBus.syncPublisher(SettingsListener.TOPIC) .settingsUpdated(settings.continueState) @@ -255,7 +252,8 @@ class ContinueExtensionConfigurable : Configurable { mySettingsComponent?.displayEditorTooltip?.isSelected = settings.continueState.displayEditorTooltip mySettingsComponent?.showIDECompletionSideBySide?.isSelected = settings.continueState.showIDECompletionSideBySide - mySettingsComponent?.continueTestEnvironment?.selectedItem = settings.continueState.continueTestEnvironment + mySettingsComponent?.enableContinueHub?.isSelected = + settings.continueState.continueTestEnvironment == "production" ContinueExtensionSettings.instance.addRemoteSyncJob() } From 5e92eadfc2ea024a6885019cd2c897cc50848964 Mon Sep 17 00:00:00 2001 From: Nate Date: Mon, 10 Feb 2025 12:30:52 -0800 Subject: [PATCH 132/262] use email as account id --- binary/package-lock.json | 4 ++-- .../continueintellijextension/auth/ContinueAuthService.kt | 4 +++- extensions/vscode/package-lock.json | 4 ++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/binary/package-lock.json b/binary/package-lock.json index 72c044f14..061edcd86 100644 --- a/binary/package-lock.json +++ b/binary/package-lock.json @@ -48,11 +48,11 @@ "@aws-sdk/client-sagemaker-runtime": "^3.621.0", "@aws-sdk/credential-providers": "^3.620.1", "@continuedev/config-types": "^1.0.13", - "@continuedev/config-yaml": "^1.0.24", + "@continuedev/config-yaml": "^1.0.26", "@continuedev/fetch": "^1.0.4", "@continuedev/llm-info": "^1.0.2", "@continuedev/openai-adapters": "^1.0.10", - "@modelcontextprotocol/sdk": "^1.0.0", + "@modelcontextprotocol/sdk": "^1.4.1", "@mozilla/readability": "^0.5.0", "@octokit/rest": "^20.0.2", "@typescript-eslint/eslint-plugin": "^7.8.0", diff --git a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/auth/ContinueAuthService.kt b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/auth/ContinueAuthService.kt index 639e4d442..b9fe07fb7 100644 --- a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/auth/ContinueAuthService.kt +++ b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/auth/ContinueAuthService.kt @@ -88,10 +88,12 @@ class ContinueAuthService { val lastName = user?.get("lastName") as? String val label = "$firstName $lastName" val id = user?.get("id") as? String + val email = user?.get("email") as? String // Persist the session info setRefreshToken(refreshToken!!) - val sessionInfo = ControlPlaneSessionInfo(accessToken!!, ControlPlaneSessionInfo.Account(id!!, label)) + val sessionInfo = + ControlPlaneSessionInfo(accessToken!!, ControlPlaneSessionInfo.Account(email!!, label)) setControlPlaneSessionInfo(sessionInfo) // Notify listeners diff --git a/extensions/vscode/package-lock.json b/extensions/vscode/package-lock.json index dabe51aff..e521a53dc 100644 --- a/extensions/vscode/package-lock.json +++ b/extensions/vscode/package-lock.json @@ -1,12 +1,12 @@ { "name": "continue", - "version": "0.9.261", + "version": "0.9.262", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "continue", - "version": "0.9.261", + "version": "0.9.262", "license": "Apache-2.0", "dependencies": { "@continuedev/fetch": "^1.0.3", From 554260619d9e1608a238bc25f53313240ad61cb6 Mon Sep 17 00:00:00 2001 From: Nate Date: Mon, 10 Feb 2025 12:32:27 -0800 Subject: [PATCH 133/262] set explicit image size in assistants dropdown --- gui/src/components/modelSelection/platform/AssistantIcon.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gui/src/components/modelSelection/platform/AssistantIcon.tsx b/gui/src/components/modelSelection/platform/AssistantIcon.tsx index 8575f0277..cacc00055 100644 --- a/gui/src/components/modelSelection/platform/AssistantIcon.tsx +++ b/gui/src/components/modelSelection/platform/AssistantIcon.tsx @@ -1,6 +1,6 @@ +import { ComputerDesktopIcon, SparklesIcon } from "@heroicons/react/24/outline"; import { ProfileDescription } from "core/config/ProfileLifecycleManager"; import { isLocalProfile } from "../../../util"; -import { ComputerDesktopIcon, SparklesIcon } from "@heroicons/react/24/outline"; export interface AssistantIconProps { assistant: ProfileDescription; @@ -10,7 +10,7 @@ export default function AssistantIcon({ assistant }: AssistantIconProps) { if (isLocalProfile(assistant)) { return ; } else if (assistant.iconUrl) { - return ; + return ; } else { return ; } From 0b214619cad292dd8241f708a3035d02fbbb5fbe Mon Sep 17 00:00:00 2001 From: Nate Date: Mon, 10 Feb 2025 12:47:28 -0800 Subject: [PATCH 134/262] fix link opening --- .../continueintellijextension/constants/MessageTypes.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/constants/MessageTypes.kt b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/constants/MessageTypes.kt index d3f69bc7a..a3e1e5b77 100644 --- a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/constants/MessageTypes.kt +++ b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/constants/MessageTypes.kt @@ -41,6 +41,7 @@ class MessageTypes { "logoutOfControlPlane", "getTerminalContents", "showToast", + "openUrl" ) // Note: If updating these values, make a corresponding update in From c92159cadf0f0766ceffdeb0e482e518481c4623 Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Mon, 10 Feb 2025 15:56:38 -0800 Subject: [PATCH 135/262] docs-yaml-examples --- docs/docs/chat/context-selection.md | 2 +- docs/docs/chat/how-it-works.md | 2 +- docs/docs/chat/how-to-customize.md | 2 +- docs/docs/customize/context-providers.mdx | 2 +- .../deep-dives/{docs.md => docs.mdx} | 374 ++++++++++++------ 5 files changed, 256 insertions(+), 126 deletions(-) rename docs/docs/customize/deep-dives/{docs.md => docs.mdx} (53%) diff --git a/docs/docs/chat/context-selection.md b/docs/docs/chat/context-selection.md index aa1d052fe..65b76c72a 100644 --- a/docs/docs/chat/context-selection.md +++ b/docs/docs/chat/context-selection.md @@ -31,7 +31,7 @@ You can automatically include relevant files from your codebase as context by ty ## Documentation site -You can include a documentation site as context by typing [`@Docs`](../customize/context-providers.mdx#docs) and selecting the documentation site. You can learn about how @Docs works [here](../customize/deep-dives/docs.md). +You can include a documentation site as context by typing [`@Docs`](../customize/context-providers.mdx#docs) and selecting the documentation site. You can learn about how @Docs works [here](../customize/deep-dives/docs.mdx). ## Terminal contents diff --git a/docs/docs/chat/how-it-works.md b/docs/docs/chat/how-it-works.md index e799e0a07..92b6e75f9 100644 --- a/docs/docs/chat/how-it-works.md +++ b/docs/docs/chat/how-it-works.md @@ -11,4 +11,4 @@ The model response is then streamed directly back to the sidebar. Each code sect If you would like to view the exact prompt that is sent to the model during Chat, you can [view this in the prompt logs](troubleshooting.mdx#llm-prompt-logs). -You can learn more about how `@Codebase` works [here](../customize/deep-dives/codebase.mdx) and `@Docs` [here](../customize/deep-dives/docs.md). +You can learn more about how `@Codebase` works [here](../customize/deep-dives/codebase.mdx) and `@Docs` [here](../customize/deep-dives/docs.mdx). diff --git a/docs/docs/chat/how-to-customize.md b/docs/docs/chat/how-to-customize.md index b375d6b1d..3fcb7376f 100644 --- a/docs/docs/chat/how-to-customize.md +++ b/docs/docs/chat/how-to-customize.md @@ -10,6 +10,6 @@ There are a number of different ways to customize Chat - You can add a [`.continuerules`](../customize/deep-dives/rules.md) file to the root of your project to customize the system prompt - You can configure [`@Codebase`](../customize/deep-dives/codebase.mdx) - You can create your own [custom code RAG](../customize/tutorials/custom-code-rag.mdx) -- You can configure [`@Docs`](../customize/deep-dives/docs.md) +- You can configure [`@Docs`](../customize/deep-dives/docs.mdx) - You can [build your own context provider](../customize/tutorials/build-your-own-context-provider.md) - You can configure and create custom [tools](../customize/tools.mdx) diff --git a/docs/docs/customize/context-providers.mdx b/docs/docs/customize/context-providers.mdx index c22082e47..ccf09a3e2 100644 --- a/docs/docs/customize/context-providers.mdx +++ b/docs/docs/customize/context-providers.mdx @@ -151,7 +151,7 @@ Reference the contents from any documentation site. Note that this will only enable the `@Docs` context provider. -To use it, you need to add a documentation site to your config file. See the [docs](../customize/deep-dives/docs.md) page for more information. +To use it, you need to add a documentation site to your config file. See the [docs](../customize/deep-dives/docs.mdx) page for more information. ### `@Open` diff --git a/docs/docs/customize/deep-dives/docs.md b/docs/docs/customize/deep-dives/docs.mdx similarity index 53% rename from docs/docs/customize/deep-dives/docs.md rename to docs/docs/customize/deep-dives/docs.mdx index 2786d548c..cc371804e 100644 --- a/docs/docs/customize/deep-dives/docs.md +++ b/docs/docs/customize/deep-dives/docs.mdx @@ -14,6 +14,9 @@ keywords: toc_max_heading_level: 5 --- +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + # @Docs The [`@Docs` context provider](customize/context-providers.mdx#docs) allows you to efficiently reference documentation directly within Continue. @@ -22,15 +25,25 @@ The [`@Docs` context provider](customize/context-providers.mdx#docs) allows you To enable the `@Docs` context provider, add it to the list of context providers in your `config.json` file. -```json title="config.json" -{ - "contextProviders": [ - { - "name": "docs" - } - ] -} -``` + + + ```yaml title="config.yaml" + context: + - provider: docs + ``` + + + ```json title="config.json" + { + "contextProviders": [ + { + "name": "docs" + } + ] + } + ``` + + ## How It Works @@ -76,17 +89,29 @@ Documentation sources may be suggested based on package files in your repo. This For bulk documentation site adds or edits, we recommend editing your global configuration file directly. Documentation sites are stored in an array within `docs` in your global configuration, as follows: -```json title="config.json" -{ - "docs": [ - { - "title": "Nest.js", - "startUrl": "https://docs.nestjs.com/", - "faviconUrl": "https://docs.nestjs.com/favicon.ico" - } - ] -} -``` + + + ```yaml title="config.yaml" + docs: + - title: Nest.js + startUrl: https://docs.nestjs.com/ + faviconUrl: https://docs.nestjs.com/favicon.ico + ``` + + + ```json title="config.json" + { + "docs": [ + { + "title": "Nest.js", + "startUrl": "https://docs.nestjs.com/", + "faviconUrl": "https://docs.nestjs.com/favicon.ico" + } + ] + } + ``` + + See [the config reference](../../reference) for all documentation site configuration options. @@ -102,39 +127,63 @@ If you have set up an [embeddings provider](../model-types/embeddings.md), @docs As with [@Codebase context provider configuration](./codebase#configuration), you can adjust the reranking behavior of the `@Docs` context provider with the `nRetrieve`, `nFinal`, and `useReranking`. -```json title="config.json" -{ - "contextProviders": [ - { - "name": "docs", - "params": { - "nRetrieve": 25, // The number of docs to retreive from the embeddings query - "nFinal": 5, // The number of docs chunks to return IF reranking - "useReranking": true // use reranking if a reranker is configured (defaults to true) + + + ```yaml title="config.yaml" + context: + - provider: docs + params: + nRetrieve: 25 # The number of docs to retreive from the embeddings query + nFinal: 5 # The number of docs chunks to return IF reranking + useReranking: true # use reranking if a reranker is configured (defaults to true) + ``` + + + ```json title="config.json" + { + "contextProviders": [ + { + "name": "docs", + "params": { + "nRetrieve": 25, // The number of docs to retreive from the embeddings query + "nFinal": 5, // The number of docs chunks to return IF reranking + "useReranking": true // use reranking if a reranker is configured (defaults to true) + } } - } - ] -} -``` + ] + } + ``` + + ### Github The Github API rate limits public requests to 60 per hour. If you want to reliably index Github repos, you can add a github token to your config file: -<<<<<<< HEAD - -```json title="config.json" -{ - "contextProviders": [ - { - "name": "docs", - "params": { - "githubToken": "github_..." + + + ```yaml title="config.yaml" + context: + - provider: docs + params: + githubToken: ${{ secrets.GITHUB_TOKEN }} + ``` + + + ```json title="config.json" + { + "contextProviders": [ + { + "name": "docs", + "params": { + "githubToken": "github_..." + } } - } - ] -} -``` + ] + } + ``` + + ### Local Crawling @@ -142,18 +191,31 @@ By default, Continue crawls documentation sites using a specialized crawling ser If your documentation is private, you can skip the default crawler and use a local crawler instead by setting `useLocalCrawling` to `true`. -```json title="config.json" -{ - "docs": [ - { - "title": "My Private Docs", - "startUrl": "http://10.2.1.2/docs", - "faviconUrl": "http://10.2.1.2/docs/assets/favicon.ico", - "useLocalCrawling": true - } - ] -} -``` + + + ```yaml title="config.yaml" + docs: + - title: My Private Docs + startUrl: http://10.2.1.2/docs + faviconUrl: http://10.2.1.2/docs/assets/favicon.ico, + useLocalCrawling: true + ``` + + + ```json title="config.json" + { + "docs": [ + { + "title": "My Private Docs", + "startUrl": "http://10.2.1.2/docs", + "faviconUrl": "http://10.2.1.2/docs/assets/favicon.ico", + "useLocalCrawling": true + } + ] + } + ``` + + The default local crawler is a lightweight tool that cannot render sites that are dynamically generated using JavaScript. If your sites need to be rendered, you can enable the experimental `Use Chromium for Docs Crawling` feature from your [User Settings Page](../settings.md) This will download and install Chromium to `~/.continue/.utils`, and use it as the local crawler. @@ -184,41 +246,74 @@ You can also use the following IDE command to force a re-index of all docs: `Con The following configuration example works out of the box for VS Code. This uses the built-in embeddings provider with no reranking. Pre-indexed docs will be accessible. -```json title="config.json" - "contextProviders": [ - { - "name": "docs", - } - ], - "docs": [ - { - "title": "Nest.js", - "startUrl": "https://docs.nestjs.com/", - }, - ], -``` + + + ```yaml title="config.yaml" + context: + - provider: docs + + docs: + - title: Nest.js + startUrl: https://docs.nestjs.com/ + ``` + + + ```json title="config.json" + "contextProviders": [ + { + "name": "docs", + } + ], + "docs": [ + { + "title": "Nest.js", + "startUrl": "https://docs.nestjs.com/", + }, + ], + ``` + + ### Jetbrains minimal setup Here is the equivalent minimal example for Jetbrains, which requires setting up an [embeddings provider](../model-types/embeddings.md). Pre-indexed docs will _not_ be accessible. -```json title="config.json" - "contextProviders": [ - { - "name": "docs", - } - ], - "docs": [ - { - "title": "Nest.js", - "startUrl": "https://docs.nestjs.com/", + + + ```yaml title="config.yaml" + models: + - name: LMStudio embedder + provider: lmstudio + model: nomic-ai/nomic-embed-text-v1.5-GGUF + roles: + - embed + context: + - provider: docs + docs: + - title: Nest.js + startUrl: https://docs.nestjs.com/ + ``` + + + ```json title="config.json" + "contextProviders": [ + { + "name": "docs", + } + ], + "docs": [ + { + "title": "Nest.js", + "startUrl": "https://docs.nestjs.com/", + }, + ], + "embeddingsProvider": { + "provider": "lmstudio", + "model": "nomic-ai/nomic-embed-text-v1.5-GGUF" }, - ], - "embeddingsProvider": { - "provider": "lmstudio", - "model": "nomic-ai/nomic-embed-text-v1.5-GGUF" - }, -``` + ``` + + ### Full-power setup (VS Code or Jetbrains) @@ -229,44 +324,79 @@ The following configuration example includes: - A reranker model available, with reranking parameters customized - A Github token to enable Github crawling -```json title="config.json" -{ - "contextProviders": [ - { - "name": "docs", - "params": { - "githubToken": "github_...", - "nRetrieve": 25, - "nFinal": 5, - "useReranking": true + + + ```yaml title="config.yaml" + models: + - name: LMStudio Nomic Text + provider: lmstudio + model: nomic-ai/nomic-embed-text-v1.5-GGUF + roles: + - embed + - name: Voyage Rerank-2 + provider: voyage + apiKey: ${{ secrets.VOYAGE_API_KEY }} + model: rerank-2 + roles: + - rerank + context: + - provider: docs + params: + githubToken: ${{ secrets.GITHUB_TOKEN }} + nRetrieve: 25 + nFinal: 5 + useReranking: true + docs: + - title: Nest.js + startUrl: https://docs.nestjs.com/ + - title: My Private Docs + startUrl: http://10.2.1.2/docs + faviconUrl: http://10.2.1.2/docs/assets/favicon.ico + maxDepth: 4 + useLocalCrawling: true + ``` + + + ```json title="config.json" + { + "contextProviders": [ + { + "name": "docs", + "params": { + "githubToken": "github_...", + "nRetrieve": 25, + "nFinal": 5, + "useReranking": true + } + } + ], + "docs": [ + { + "title": "Nest.js", + "startUrl": "https://docs.nestjs.com/" + }, + { + "title": "My Private Docs", + "startUrl": "http://10.2.1.2/docs", + "faviconUrl": "http://10.2.1.2/docs/assets/favicon.ico", + "maxDepth": 4, + "useLocalCrawling": true + } + ], + "reranker": { + "name": "voyage", + "params": { + "model": "rerank-2", + "apiKey": "" } - } - ], - "docs": [ - { - "title": "Nest.js", - "startUrl": "https://docs.nestjs.com/" }, - { - "title": "My Private Docs", - "startUrl": "http://10.2.1.2/docs", - "faviconUrl": "http://10.2.1.2/docs/assets/favicon.ico", - "maxDepth": 4, - "useLocalCrawling": true + "embeddingsProvider": { + "provider": "lmstudio", + "model": "nomic-ai/nomic-embed-text-v1.5-GGUF" } - ], - "reranker": { - "name": "voyage", - "params": { - "model": "rerank-2", - "apiKey": "" - } - }, - "embeddingsProvider": { - "provider": "lmstudio", - "model": "nomic-ai/nomic-embed-text-v1.5-GGUF" } -} -``` + ``` + + This could also involve enabling Chromium as a backup for local documentation the [User Settings Page](../settings.md). From eea1fc3aba31e9e4260c8dda7237b3df26cd24ca Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Mon, 10 Feb 2025 16:06:08 -0800 Subject: [PATCH 136/262] fix build errors --- docs/docs/customize/deep-dives/docs.mdx | 4 +- .../model-providers/top-level/xAI.md | 53 ------------------- 2 files changed, 2 insertions(+), 55 deletions(-) delete mode 100644 docs/docs/customize/model-providers/top-level/xAI.md diff --git a/docs/docs/customize/deep-dives/docs.mdx b/docs/docs/customize/deep-dives/docs.mdx index cc371804e..93248c5ea 100644 --- a/docs/docs/customize/deep-dives/docs.mdx +++ b/docs/docs/customize/deep-dives/docs.mdx @@ -121,7 +121,7 @@ Indexing will re-sync upon saving the configuration file. ### Using Your Embeddings Provider -If you have set up an [embeddings provider](../model-types/embeddings.md), @docs will use your embeddings provider. Switching embeddings providers will trigger a re-index of all documentation sites in your configuration. +If you have set up an [embeddings provider](../model-types/embeddings.mdx), @docs will use your embeddings provider. Switching embeddings providers will trigger a re-index of all documentation sites in your configuration. ### Reranking @@ -276,7 +276,7 @@ The following configuration example works out of the box for VS Code. This uses ### Jetbrains minimal setup -Here is the equivalent minimal example for Jetbrains, which requires setting up an [embeddings provider](../model-types/embeddings.md). Pre-indexed docs will _not_ be accessible. +Here is the equivalent minimal example for Jetbrains, which requires setting up an [embeddings provider](../model-types/embeddings.mdx). Pre-indexed docs will _not_ be accessible. diff --git a/docs/docs/customize/model-providers/top-level/xAI.md b/docs/docs/customize/model-providers/top-level/xAI.md deleted file mode 100644 index 550cc0641..000000000 --- a/docs/docs/customize/model-providers/top-level/xAI.md +++ /dev/null @@ -1,53 +0,0 @@ ---- -title: xAI -slug: ../xai ---- - -:::info - -You can get an API key from the [xAI console](https://console.x.ai/) - -::: - -## Chat model - -We recommend configuring **grok-2-latest** as your chat model. For information on other available models, visit [xAI Documentation](https://docs.x.ai/docs/models). - -```json title="config.json" -{ - "models": [ - { - "title": "Grok 2", - "provider": "xAI", - "model": "grok-2-latest", - "apiKey": "[API_KEY]" - } - ] -} -``` - -## Autocomplete model - -xAI currently does not offer any autocomplete models. - -[Click here](../../model-types/autocomplete.md) to see a list of autocomplete model providers. - -## Embeddings model - -xAI currently does not offer any embeddings models. - -[Click here](../../model-types/embeddings.md) to see a list of embeddings model providers. - -## Reranking model - -xAI currently does not offer any reranking models. - -[Click here](../../model-types/reranking.md) to see a list of reranking model providers. - -## Legacy Completions - -To force usage of `chat/completions` instead of `completions` endpoint you can set - -```json -"useLegacyCompletionsEndpoint": false -``` From 1cfaf810a0526377eba864065e54b3d8996bd75c Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Mon, 10 Feb 2025 16:09:14 -0800 Subject: [PATCH 137/262] fix build errors --- docs/docs/chat/model-setup.mdx | 2 +- docs/docs/customize/model-providers/more/free-trial.mdx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/docs/chat/model-setup.mdx b/docs/docs/chat/model-setup.mdx index 3cc546c8d..d6a33b268 100644 --- a/docs/docs/chat/model-setup.mdx +++ b/docs/docs/chat/model-setup.mdx @@ -169,7 +169,7 @@ If you prefer to use a model from [OpenAI](../customize/model-providers/top-leve ### Grok-2 from xAI -If you prefer to use a model from [xAI](../customize/model-providers/top-level/xAI.md), then we recommend Grok-2. +If you prefer to use a model from [xAI](../customize/model-providers/top-level/xAI.mdx), then we recommend Grok-2. ```json title="config.json" "models": [ diff --git a/docs/docs/customize/model-providers/more/free-trial.mdx b/docs/docs/customize/model-providers/more/free-trial.mdx index ddc16d5e4..f6dab6840 100644 --- a/docs/docs/customize/model-providers/more/free-trial.mdx +++ b/docs/docs/customize/model-providers/more/free-trial.mdx @@ -11,7 +11,7 @@ The `"free-trial"` provider lets new users quickly try out the best experience i While the Continue extension is always free to use, we cannot support infinite free LLM usage for all of our users. You will eventually need to either: 1. Select an open-source model to use for free [locally](../top-level/ollama.mdx), or -2. Add your own API key for [Anthropic](../top-level/anthropic.mdx) or [another LLM provider](../../model-providers/) +2. Add your own API key for [Anthropic](../top-level/anthropic.mdx) or [another LLM provider](../../model-providers) ## FAQ about the trial From eac0cf14a6a3fc4c2191a6073be3b935975e6773 Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Mon, 10 Feb 2025 16:13:18 -0800 Subject: [PATCH 138/262] fix build errors --- docs/docs/customize/model-providers/more/free-trial.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/customize/model-providers/more/free-trial.mdx b/docs/docs/customize/model-providers/more/free-trial.mdx index f6dab6840..28d831738 100644 --- a/docs/docs/customize/model-providers/more/free-trial.mdx +++ b/docs/docs/customize/model-providers/more/free-trial.mdx @@ -11,7 +11,7 @@ The `"free-trial"` provider lets new users quickly try out the best experience i While the Continue extension is always free to use, we cannot support infinite free LLM usage for all of our users. You will eventually need to either: 1. Select an open-source model to use for free [locally](../top-level/ollama.mdx), or -2. Add your own API key for [Anthropic](../top-level/anthropic.mdx) or [another LLM provider](../../model-providers) +2. Add your own API key for [Anthropic](../top-level/anthropic.mdx) or [another LLM provider](/customize/model-providers) ## FAQ about the trial From 3c05e75b9f38c93858d26dbe49dbe0fdb2276ff7 Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Mon, 10 Feb 2025 17:17:18 -0800 Subject: [PATCH 139/262] docs indexing not dependent on disableIndexing --- core/indexing/docs/DocsService.ts | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/core/indexing/docs/DocsService.ts b/core/indexing/docs/DocsService.ts index f0d1e2f3c..83e51bb6f 100644 --- a/core/indexing/docs/DocsService.ts +++ b/core/indexing/docs/DocsService.ts @@ -210,11 +210,11 @@ export default class DocsService { if (isAborted) { return true; } - // Handle indexing disabled change mid-indexing - if (this.config.disableIndexing) { - this.abort(startUrl); - return true; - } + // // Handle indexing disabled change mid-indexing + // if (this.config.disableIndexing) { + // this.abort(startUrl); + // return true; + // } // Handle embeddings provider change mid-indexing if (this.config.embeddingsProvider.embeddingId !== startedWithEmbedder) { this.abort(startUrl); @@ -276,9 +276,9 @@ export default class DocsService { const oldConfig = this.config; this.config = newConfig; // IMPORTANT - need to set up top, other methods below use this without passing it in - if (this.config.disableIndexing) { - return; - } + // if (this.config.disableIndexing) { + // return; + // } // No point in indexing if no docs context provider const hasDocsContextProvider = this.hasDocsContextProvider(); @@ -367,10 +367,10 @@ export default class DocsService { siteIndexingConfig: SiteIndexingConfig, reIndex: boolean = false, ): Promise { - if (this.config.disableIndexing) { - console.warn("Attempting to add/index docs when indexing is disabled"); - return; - } + // if (this.config.disableIndexing) { + // console.warn("Attempting to add/index docs when indexing is disabled"); + // return; + // } const { startUrl, useLocalCrawling, maxDepth } = siteIndexingConfig; const { isPreindexed, provider } = From 2a6b2436b73c249218dba8c4eded5e096f110509 Mon Sep 17 00:00:00 2001 From: Nate Date: Mon, 10 Feb 2025 17:37:58 -0800 Subject: [PATCH 140/262] add promptTemplates to config.yaml models --- core/config/yaml/models.ts | 1 + core/package-lock.json | 8 ++++---- core/package.json | 2 +- gui/package-lock.json | 10 +++++----- gui/package.json | 2 +- packages/config-yaml/package.json | 2 +- packages/config-yaml/src/schemas/models.ts | 8 ++++++++ 7 files changed, 21 insertions(+), 12 deletions(-) diff --git a/core/config/yaml/models.ts b/core/config/yaml/models.ts index 8fe34677f..4c8e978ff 100644 --- a/core/config/yaml/models.ts +++ b/core/config/yaml/models.ts @@ -58,6 +58,7 @@ async function modelConfigToBaseLLM( title: model.name, model: modelName, systemMessage, + promptTemplates: model.promptTemplates, }; const llm = new cls(options); diff --git a/core/package-lock.json b/core/package-lock.json index 814c77601..33bf08077 100644 --- a/core/package-lock.json +++ b/core/package-lock.json @@ -13,7 +13,7 @@ "@aws-sdk/client-sagemaker-runtime": "^3.621.0", "@aws-sdk/credential-providers": "^3.620.1", "@continuedev/config-types": "^1.0.13", - "@continuedev/config-yaml": "^1.0.26", + "@continuedev/config-yaml": "^1.0.28", "@continuedev/fetch": "^1.0.4", "@continuedev/llm-info": "^1.0.2", "@continuedev/openai-adapters": "^1.0.10", @@ -3038,9 +3038,9 @@ } }, "node_modules/@continuedev/config-yaml": { - "version": "1.0.26", - "resolved": "https://registry.npmjs.org/@continuedev/config-yaml/-/config-yaml-1.0.26.tgz", - "integrity": "sha512-Fxu59+AR4S6WaoyyGysiQWVwMvQQt+pR68P1mVQGstDw4YpIghFioK0m6jXrN9vw1fJTIr6tFtcA9N41xI5mDQ==", + "version": "1.0.28", + "resolved": "https://registry.npmjs.org/@continuedev/config-yaml/-/config-yaml-1.0.28.tgz", + "integrity": "sha512-XTTRHeIYgLlwzPkub2jAPx4TqRf47g/TR2K9AIdZYQRNxYuHAeFRRqaIaAZPdykZATg30vdGQGGdssVr6IyCCg==", "dependencies": { "@continuedev/config-types": "^1.0.14", "yaml": "^2.6.1", diff --git a/core/package.json b/core/package.json index d57fa66c2..f6f194d7f 100644 --- a/core/package.json +++ b/core/package.json @@ -46,7 +46,7 @@ "@aws-sdk/client-sagemaker-runtime": "^3.621.0", "@aws-sdk/credential-providers": "^3.620.1", "@continuedev/config-types": "^1.0.13", - "@continuedev/config-yaml": "^1.0.26", + "@continuedev/config-yaml": "^1.0.28", "@continuedev/fetch": "^1.0.4", "@continuedev/llm-info": "^1.0.2", "@continuedev/openai-adapters": "^1.0.10", diff --git a/gui/package-lock.json b/gui/package-lock.json index 2519bc970..559d66d3d 100644 --- a/gui/package-lock.json +++ b/gui/package-lock.json @@ -7,7 +7,7 @@ "name": "gui", "license": "Apache-2.0", "dependencies": { - "@continuedev/config-yaml": "^1.0.26", + "@continuedev/config-yaml": "^1.0.28", "@headlessui/react": "^1.7.17", "@heroicons/react": "^2.0.18", "@reduxjs/toolkit": "^2.3.0", @@ -108,7 +108,7 @@ "@aws-sdk/client-sagemaker-runtime": "^3.621.0", "@aws-sdk/credential-providers": "^3.620.1", "@continuedev/config-types": "^1.0.13", - "@continuedev/config-yaml": "^1.0.26", + "@continuedev/config-yaml": "^1.0.28", "@continuedev/fetch": "^1.0.4", "@continuedev/llm-info": "^1.0.2", "@continuedev/openai-adapters": "^1.0.10", @@ -556,9 +556,9 @@ } }, "node_modules/@continuedev/config-yaml": { - "version": "1.0.26", - "resolved": "https://registry.npmjs.org/@continuedev/config-yaml/-/config-yaml-1.0.26.tgz", - "integrity": "sha512-Fxu59+AR4S6WaoyyGysiQWVwMvQQt+pR68P1mVQGstDw4YpIghFioK0m6jXrN9vw1fJTIr6tFtcA9N41xI5mDQ==", + "version": "1.0.28", + "resolved": "https://registry.npmjs.org/@continuedev/config-yaml/-/config-yaml-1.0.28.tgz", + "integrity": "sha512-XTTRHeIYgLlwzPkub2jAPx4TqRf47g/TR2K9AIdZYQRNxYuHAeFRRqaIaAZPdykZATg30vdGQGGdssVr6IyCCg==", "dependencies": { "@continuedev/config-types": "^1.0.14", "yaml": "^2.6.1", diff --git a/gui/package.json b/gui/package.json index 8476573b2..4682bef10 100644 --- a/gui/package.json +++ b/gui/package.json @@ -15,7 +15,7 @@ "test:watch": "vitest" }, "dependencies": { - "@continuedev/config-yaml": "^1.0.26", + "@continuedev/config-yaml": "^1.0.28", "@headlessui/react": "^1.7.17", "@heroicons/react": "^2.0.18", "@reduxjs/toolkit": "^2.3.0", diff --git a/packages/config-yaml/package.json b/packages/config-yaml/package.json index 6c620677e..005112b06 100644 --- a/packages/config-yaml/package.json +++ b/packages/config-yaml/package.json @@ -1,6 +1,6 @@ { "name": "@continuedev/config-yaml", - "version": "1.0.26", + "version": "1.0.28", "description": "", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/packages/config-yaml/src/schemas/models.ts b/packages/config-yaml/src/schemas/models.ts index 3037d750f..b5e40fcc1 100644 --- a/packages/config-yaml/src/schemas/models.ts +++ b/packages/config-yaml/src/schemas/models.ts @@ -42,6 +42,13 @@ export const completionOptionsSchema = z.object({ }); export type CompletionOptions = z.infer; +/** Prompt templates use Handlebars syntax */ +const promptTemplatesSchema = z.object({ + apply: z.string().optional(), + edit: z.string().optional(), +}); +export type PromptTemplates = z.infer; + const baseModelFields = { name: z.string(), model: z.string(), @@ -50,6 +57,7 @@ const baseModelFields = { roles: modelRolesSchema.array().optional(), defaultCompletionOptions: completionOptionsSchema.optional(), requestOptions: requestOptionsSchema.optional(), + promptTemplates: promptTemplatesSchema.optional(), }; export const modelSchema = z.union([ From b5d24a15004cdb8448fddaae9fc2c134bf556bf4 Mon Sep 17 00:00:00 2001 From: Nate Date: Mon, 10 Feb 2025 17:47:46 -0800 Subject: [PATCH 141/262] add missing await --- core/core.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/core.ts b/core/core.ts index 4b5e07b81..dd8c63ffc 100644 --- a/core/core.ts +++ b/core/core.ts @@ -913,7 +913,9 @@ export class Core { }); on("didChangeControlPlaneSessionInfo", async (msg) => { - this.configHandler.updateControlPlaneSessionInfo(msg.data.sessionInfo); + await this.configHandler.updateControlPlaneSessionInfo( + msg.data.sessionInfo, + ); }); on("auth/getAuthUrl", async (msg) => { const url = await getAuthUrlForTokenPage(ideSettingsPromise); From 201bfef1a01a63535c6ba7472a65c865c51af593 Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Mon, 10 Feb 2025 18:00:00 -0800 Subject: [PATCH 142/262] failed docs p1 --- core/indexing/docs/DocsService.ts | 18 ++++++--- core/util/GlobalContext.ts | 2 + .../components/indexing/DocsDetailsDialog.tsx | 39 ++++++++++++------- 3 files changed, 39 insertions(+), 20 deletions(-) diff --git a/core/indexing/docs/DocsService.ts b/core/indexing/docs/DocsService.ts index 83e51bb6f..a6f8e5c2b 100644 --- a/core/indexing/docs/DocsService.ts +++ b/core/indexing/docs/DocsService.ts @@ -41,6 +41,7 @@ import { } from "./preIndexed"; import preIndexedDocs from "./preIndexedDocs"; import { ConfigResult } from "@continuedev/config-yaml"; +import { GlobalContext } from "../../util/GlobalContext"; // Purposefully lowercase because lancedb converts export interface LanceDbDocsRow { @@ -908,19 +909,24 @@ export default class DocsService { } } } else { - const currentStatus = this.statuses.get(doc.startUrl); - if (currentStatus?.status !== "failed") { - newDocs.push(doc); - } + newDocs.push(doc); } } + const globalContext = new GlobalContext(); + const failedDocs = globalContext.get("failedDocs") ?? []; + + const newDocsNotFailed = newDocs.filter( + (doc) => + !failedDocs.find((d) => this.siteIndexingConfigsAreEqual(doc, d)), + ); + await Promise.allSettled([ ...changedDocs.map((doc) => this.indexAndAdd(doc, true)), - ...newDocs.map((doc) => this.indexAndAdd(doc)), + ...newDocsNotFailed.map((doc) => this.indexAndAdd(doc)), ]); - for (const doc of newDocs) { + for (const doc of newDocsNotFailed) { void Telemetry.capture("add_docs_config", { url: doc.startUrl }); } diff --git a/core/util/GlobalContext.ts b/core/util/GlobalContext.ts index aa1b66fcf..121c45946 100644 --- a/core/util/GlobalContext.ts +++ b/core/util/GlobalContext.ts @@ -7,6 +7,7 @@ import { } from "../config/sharedConfig"; import { getGlobalContextFilePath } from "./paths"; +import { SiteIndexingConfig } from ".."; export type GlobalContextType = { indexingPaused: boolean; @@ -27,6 +28,7 @@ export type GlobalContextType = { showConfigUpdateToast: boolean; isSupportedLanceDbCpuTarget: boolean; sharedConfig: SharedConfigSchema; + failedDocs: SiteIndexingConfig[]; }; /** diff --git a/gui/src/components/indexing/DocsDetailsDialog.tsx b/gui/src/components/indexing/DocsDetailsDialog.tsx index 7b824291a..f8d0a54e9 100644 --- a/gui/src/components/indexing/DocsDetailsDialog.tsx +++ b/gui/src/components/indexing/DocsDetailsDialog.tsx @@ -127,25 +127,36 @@ function DocsDetailsDialog({ startUrl }: DocsDetailsDialogProps) { - - {chunk.filepath} - - - {chunk.content} - ); })} + {/* Rending tooltips here because div can't be child of tbody apparently */} + {data.chunks.map((chunk, i) => { + const contentToolTipId = `docs-content-peek-${i}`; + const urlToolTipId = `docs-url-peek-${i}`; + return ( + <> + + {chunk.filepath} + + + {chunk.content} + + + ); + })}
)}
From f4a11e760365d9e387995ff37c9cac92e0e40a46 Mon Sep 17 00:00:00 2001 From: Patrick Erichsen Date: Mon, 10 Feb 2025 18:26:48 -0800 Subject: [PATCH 143/262] use correct .tar.gz --- binary/build.js | 12 +++++++++--- extensions/vscode/scripts/prepackage.js | 2 +- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/binary/build.js b/binary/build.js index 5e0ba4c8b..609a4b68c 100644 --- a/binary/build.js +++ b/binary/build.js @@ -248,9 +248,15 @@ async function installNodeModuleInTempDirAndCopyToCurrent(packageName, toCopy) { // Download and unzip prebuilt sqlite3 binary for the target console.log("[info] Downloading node-sqlite3"); - const downloadUrl = `https://github.com/TryGhost/node-sqlite3/releases/download/v5.1.7/sqlite3-v5.1.7-napi-v6-${ - target === "win32-arm64" ? "win32-ia32" : target - }.tar.gz`; + + const downloadUrl = + // node-sqlite3 doesn't have a pre-built binary for win32-arm64 + target === "win32-arm64" + ? "https://continue-server-binaries.s3.us-west-1.amazonaws.com/win32-arm64/node_sqlite3.tar.gz" + : `https://github.com/TryGhost/node-sqlite3/releases/download/v5.1.7/sqlite3-v5.1.7-napi-v6-${ + target + }.tar.gz`; + execCmdSync(`curl -L -o ${targetDir}/build.tar.gz ${downloadUrl}`); execCmdSync(`cd ${targetDir} && tar -xvzf build.tar.gz`); diff --git a/extensions/vscode/scripts/prepackage.js b/extensions/vscode/scripts/prepackage.js index 85ca640f0..20229018f 100644 --- a/extensions/vscode/scripts/prepackage.js +++ b/extensions/vscode/scripts/prepackage.js @@ -366,7 +366,7 @@ const isMacTarget = target?.startsWith("darwin"); "https://github.com/TryGhost/node-sqlite3/releases/download/v5.1.7/sqlite3-v5.1.7-napi-v3-linux-arm64.tar.gz", // node-sqlite3 doesn't have a pre-built binary for win32-arm64 "win32-arm64": - "https://continue-server-binaries.s3.us-west-1.amazonaws.com/win32-arm64/node_sqlite3.zip", + "https://continue-server-binaries.s3.us-west-1.amazonaws.com/win32-arm64/node_sqlite3.tar.gz", }[target]; execCmdSync( `curl -L -o ../../core/node_modules/sqlite3/build.tar.gz ${downloadUrl}`, From 06134357f9d0a2b0e1a808212124ed2002ce6152 Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Mon, 10 Feb 2025 18:28:11 -0800 Subject: [PATCH 144/262] remember failed docs index attempts --- core/indexing/docs/DocsService.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/core/indexing/docs/DocsService.ts b/core/indexing/docs/DocsService.ts index a6f8e5c2b..4c70840cf 100644 --- a/core/indexing/docs/DocsService.ts +++ b/core/indexing/docs/DocsService.ts @@ -420,6 +420,16 @@ export default class DocsService { } } + const markFailedInGlobalContext = () => { + const globalContext = new GlobalContext(); + const failedDocs = globalContext.get("failedDocs") ?? []; + const newFailedDocs = failedDocs.filter( + (d) => !this.siteIndexingConfigsAreEqual(siteIndexingConfig, d), + ); + newFailedDocs.push(siteIndexingConfig); + globalContext.update("failedDocs", newFailedDocs); + }; + try { this.docsIndexingQueue.add(startUrl); @@ -553,6 +563,7 @@ export default class DocsService { void this.ide.showToast("info", `Failed to index ${startUrl}`); this.docsIndexingQueue.delete(startUrl); + markFailedInGlobalContext(); return; } @@ -628,6 +639,7 @@ export default class DocsService { status: "failed", progress: 1, }); + markFailedInGlobalContext(); } finally { this.docsIndexingQueue.delete(startUrl); } From 6442115a1f8e5262b736d87099434b11503cb72f Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Mon, 10 Feb 2025 18:46:48 -0800 Subject: [PATCH 145/262] failed docs in global context --- core/indexing/docs/DocsService.ts | 51 ++++++++++++++++++++----------- 1 file changed, 33 insertions(+), 18 deletions(-) diff --git a/core/indexing/docs/DocsService.ts b/core/indexing/docs/DocsService.ts index 4c70840cf..d51fa89c4 100644 --- a/core/indexing/docs/DocsService.ts +++ b/core/indexing/docs/DocsService.ts @@ -366,7 +366,7 @@ export default class DocsService { async indexAndAdd( siteIndexingConfig: SiteIndexingConfig, - reIndex: boolean = false, + forceReindex: boolean = false, ): Promise { // if (this.config.disableIndexing) { // console.warn("Attempting to add/index docs when indexing is disabled"); @@ -397,7 +397,7 @@ export default class DocsService { type: "docs", id: siteIndexingConfig.startUrl, embeddingsProviderId: provider.embeddingId, - isReindexing: reIndex && indexExists, + isReindexing: forceReindex && indexExists, title: siteIndexingConfig.title, debugInfo: `max depth: ${siteIndexingConfig.maxDepth}`, icon: siteIndexingConfig.faviconUrl, @@ -406,7 +406,7 @@ export default class DocsService { // Clear current indexes if reIndexing if (indexExists) { - if (reIndex) { + if (forceReindex) { await this.deleteIndexes(startUrl); } else { this.handleStatusUpdate({ @@ -420,6 +420,21 @@ export default class DocsService { } } + // If not force-reindexing and has failed with same config, don't reattempt + if (!forceReindex) { + const globalContext = new GlobalContext(); + const failedDocs = globalContext.get("failedDocs") ?? []; + const hasFailed = failedDocs.find((d) => + this.siteIndexingConfigsAreEqual(siteIndexingConfig, d), + ); + if (hasFailed) { + console.log( + `Not reattempting to index ${siteIndexingConfig.startUrl}, has already failed with same config`, + ); + return; + } + } + const markFailedInGlobalContext = () => { const globalContext = new GlobalContext(); const failedDocs = globalContext.get("failedDocs") ?? []; @@ -430,6 +445,15 @@ export default class DocsService { globalContext.update("failedDocs", newFailedDocs); }; + const removeFromFailedGlobalContext = () => { + const globalContext = new GlobalContext(); + const failedDocs = globalContext.get("failedDocs") ?? []; + const newFailedDocs = failedDocs.filter( + (d) => !this.siteIndexingConfigsAreEqual(siteIndexingConfig, d), + ); + globalContext.update("failedDocs", newFailedDocs); + }; + try { this.docsIndexingQueue.add(startUrl); @@ -581,7 +605,7 @@ export default class DocsService { }); // Delete indexed docs if re-indexing - if (reIndex && indexExists) { + if (forceReindex && indexExists) { console.log("Deleting old embeddings"); await this.deleteIndexes(startUrl); } @@ -622,6 +646,8 @@ export default class DocsService { this.messenger?.send("refreshSubmenuItems", { providers: ["docs"], }); + + removeFromFailedGlobalContext(); } catch (e) { let description = `Error getting docs from: ${siteIndexingConfig.startUrl}`; if (e instanceof Error) { @@ -629,7 +655,7 @@ export default class DocsService { e.message.includes("github.com") && e.message.includes("rate limit") ) { - description = "Github rate limit exceeded"; + description = "Github rate limit exceeded"; // This text is used verbatim elsewhere } } console.error("Error indexing docs", e); @@ -922,26 +948,15 @@ export default class DocsService { } } else { newDocs.push(doc); + void Telemetry.capture("add_docs_config", { url: doc.startUrl }); } } - const globalContext = new GlobalContext(); - const failedDocs = globalContext.get("failedDocs") ?? []; - - const newDocsNotFailed = newDocs.filter( - (doc) => - !failedDocs.find((d) => this.siteIndexingConfigsAreEqual(doc, d)), - ); - await Promise.allSettled([ ...changedDocs.map((doc) => this.indexAndAdd(doc, true)), - ...newDocsNotFailed.map((doc) => this.indexAndAdd(doc)), + ...newDocs.map((doc) => this.indexAndAdd(doc)), ]); - for (const doc of newDocsNotFailed) { - void Telemetry.capture("add_docs_config", { url: doc.startUrl }); - } - for (const doc of deletedDocs) { await this.deleteIndexes(doc.startUrl); } From a665b9792d3958be8771b78bf1c5d2395546bf50 Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Mon, 10 Feb 2025 18:55:02 -0800 Subject: [PATCH 146/262] skip docs indexing if already failed --- core/indexing/docs/DocsService.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/indexing/docs/DocsService.ts b/core/indexing/docs/DocsService.ts index d51fa89c4..2b0a92bf3 100644 --- a/core/indexing/docs/DocsService.ts +++ b/core/indexing/docs/DocsService.ts @@ -431,6 +431,12 @@ export default class DocsService { console.log( `Not reattempting to index ${siteIndexingConfig.startUrl}, has already failed with same config`, ); + this.handleStatusUpdate({ + ...fixedStatus, + description: "Failed", + status: "failed", + progress: 1, + }); return; } } From 92a1e29b7b2910fa7e615d319f67aaec8ed4715b Mon Sep 17 00:00:00 2001 From: Nate Date: Mon, 10 Feb 2025 19:12:25 -0800 Subject: [PATCH 147/262] set model roles when loading config.yaml --- core/config/yaml/loadYaml.ts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/core/config/yaml/loadYaml.ts b/core/config/yaml/loadYaml.ts index e4cec3859..7bf59c343 100644 --- a/core/config/yaml/loadYaml.ts +++ b/core/config/yaml/loadYaml.ts @@ -166,6 +166,24 @@ async function configYamlToContinueConfig( ); continueConfig.tabAutocompleteModels?.push(...llms); } + + if ( + model.roles?.includes("apply") && + !continueConfig.experimental?.modelRoles?.applyCodeBlock + ) { + continueConfig.experimental ??= {}; + continueConfig.experimental!.modelRoles ??= {}; + continueConfig.experimental!.modelRoles!.applyCodeBlock = model.name; + } + + if ( + model.roles?.includes("edit") && + !continueConfig.experimental?.modelRoles?.inlineEdit + ) { + continueConfig.experimental ??= {}; + continueConfig.experimental!.modelRoles ??= {}; + continueConfig.experimental!.modelRoles!.inlineEdit = model.name; + } } if (allowFreeTrial) { From 9a10c1c076693d29c3f6517cf93ea2a2070db695 Mon Sep 17 00:00:00 2001 From: Nate Date: Mon, 10 Feb 2025 19:14:34 -0800 Subject: [PATCH 148/262] allow customized apply prompt in VS Code --- core/core.ts | 2 ++ core/edit/streamDiffLines.ts | 14 +++++--------- extensions/vscode/package-lock.json | 6 +++--- extensions/vscode/src/diff/vertical/manager.ts | 18 ++++++++++++++++-- .../vscode/src/extension/VsCodeMessenger.ts | 1 + 5 files changed, 27 insertions(+), 14 deletions(-) diff --git a/core/core.ts b/core/core.ts index dd8c63ffc..60e4b53b8 100644 --- a/core/core.ts +++ b/core/core.ts @@ -717,6 +717,8 @@ export class Core { llm, data.input, data.language, + false, + undefined, )) { if (abortedMessageIds.has(msg.messageId)) { abortedMessageIds.delete(msg.messageId); diff --git a/core/edit/streamDiffLines.ts b/core/edit/streamDiffLines.ts index 1d1202b91..f7b54dff6 100644 --- a/core/edit/streamDiffLines.ts +++ b/core/edit/streamDiffLines.ts @@ -54,7 +54,8 @@ export async function* streamDiffLines( llm: ILLM, input: string, language: string | undefined, - onlyOneInsertion?: boolean, + onlyOneInsertion: boolean, + overridePrompt: ChatMessage[] | undefined, ): AsyncGenerator { void Telemetry.capture( "inlineEdit", @@ -80,14 +81,9 @@ export async function* streamDiffLines( // Trim end of oldLines, otherwise we have trailing \r on every line for CRLF files oldLines = oldLines.map((line) => line.trimEnd()); - const prompt = constructPrompt( - prefix, - highlighted, - suffix, - llm, - input, - language, - ); + const prompt = + overridePrompt ?? + constructPrompt(prefix, highlighted, suffix, llm, input, language); const inept = modelIsInept(llm.model); const prediction: Prediction = { diff --git a/extensions/vscode/package-lock.json b/extensions/vscode/package-lock.json index dabe51aff..998d14722 100644 --- a/extensions/vscode/package-lock.json +++ b/extensions/vscode/package-lock.json @@ -1,12 +1,12 @@ { "name": "continue", - "version": "0.9.261", + "version": "0.9.262", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "continue", - "version": "0.9.261", + "version": "0.9.262", "license": "Apache-2.0", "dependencies": { "@continuedev/fetch": "^1.0.3", @@ -106,7 +106,7 @@ "@aws-sdk/client-sagemaker-runtime": "^3.621.0", "@aws-sdk/credential-providers": "^3.620.1", "@continuedev/config-types": "^1.0.13", - "@continuedev/config-yaml": "^1.0.26", + "@continuedev/config-yaml": "^1.0.28", "@continuedev/fetch": "^1.0.4", "@continuedev/llm-info": "^1.0.2", "@continuedev/openai-adapters": "^1.0.10", diff --git a/extensions/vscode/src/diff/vertical/manager.ts b/extensions/vscode/src/diff/vertical/manager.ts index 1e1b41a17..a62406b00 100644 --- a/extensions/vscode/src/diff/vertical/manager.ts +++ b/extensions/vscode/src/diff/vertical/manager.ts @@ -1,4 +1,4 @@ -import { DiffLine } from "core"; +import { ChatMessage, DiffLine } from "core"; import { ConfigHandler } from "core/config/ConfigHandler"; import { streamDiffLines } from "core/edit/streamDiffLines"; import { pruneLinesFromBottom, pruneLinesFromTop } from "core/llm/countTokens"; @@ -272,6 +272,7 @@ export class VerticalDiffManager { onlyOneInsertion?: boolean, quickEdit?: string, range?: vscode.Range, + newCode?: string, ): Promise { vscode.commands.executeCommand("setContext", "continue.diffVisible", true); @@ -386,6 +387,18 @@ export class VerticalDiffManager { llm.model, ); + let overridePrompt: ChatMessage[] | undefined; + if (llm.promptTemplates?.apply) { + const rendered = llm.renderPromptTemplate(llm.promptTemplates.apply, [], { + original_code: rangeContent, + new_code: newCode ?? "", + }); + overridePrompt = + typeof rendered === "string" + ? [{ role: "user", content: rendered }] + : rendered; + } + if (editor.selection) { // Unselect the range editor.selection = new vscode.Selection( @@ -413,7 +426,8 @@ export class VerticalDiffManager { llm, input, getMarkdownLanguageTagForFile(fileUri), - onlyOneInsertion, + !!onlyOneInsertion, + overridePrompt, ); for await (const line of stream) { diff --git a/extensions/vscode/src/extension/VsCodeMessenger.ts b/extensions/vscode/src/extension/VsCodeMessenger.ts index 6bce4818a..aac537d93 100644 --- a/extensions/vscode/src/extension/VsCodeMessenger.ts +++ b/extensions/vscode/src/extension/VsCodeMessenger.ts @@ -230,6 +230,7 @@ export class VsCodeMessenger { undefined, undefined, rangeToApplyTo, + data.text, ); } }); From ba23a977a37c5d09d9b1733a8f36ac42734c149f Mon Sep 17 00:00:00 2001 From: Nate Date: Mon, 10 Feb 2025 21:28:03 -0800 Subject: [PATCH 149/262] bump version --- extensions/vscode/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/vscode/package.json b/extensions/vscode/package.json index 9fd83f971..80ffa7c64 100644 --- a/extensions/vscode/package.json +++ b/extensions/vscode/package.json @@ -2,7 +2,7 @@ "name": "continue", "icon": "media/icon.png", "author": "Continue Dev, Inc", - "version": "0.9.262", + "version": "0.9.263", "repository": { "type": "git", "url": "https://github.com/continuedev/continue" From a522f701327ab9ed38bd8b2cd48ea83d0c5e104c Mon Sep 17 00:00:00 2001 From: Roger Meier Date: Mon, 10 Feb 2025 20:34:58 +0100 Subject: [PATCH 150/262] docs: add Angular to the pre indexed docs --- core/indexing/docs/preIndexedDocs.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/indexing/docs/preIndexedDocs.ts b/core/indexing/docs/preIndexedDocs.ts index 1e2a8dbc0..4b0c12fee 100644 --- a/core/indexing/docs/preIndexedDocs.ts +++ b/core/indexing/docs/preIndexedDocs.ts @@ -353,6 +353,11 @@ const preIndexedDocs: Record< startUrl: "https://docs.asksage.ai/", rootUrl: "https://docs.asksage.ai/", }, + "https://angular.dev/": { + title: "Angular", + startUrl: "https://angular.dev/", + rootUrl: "https://angular.dev/", + }, }; export default preIndexedDocs; From 77efd730b74aa2932e687e6d53a5072e76a00fe0 Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Tue, 11 Feb 2025 08:38:09 -0800 Subject: [PATCH 151/262] unwrap errors in tool calls --- gui/src/redux/thunks/callTool.ts | 12 ++++++++---- gui/src/redux/thunks/streamNormalInput.ts | 5 +++-- gui/src/redux/thunks/streamResponseAfterToolCall.ts | 6 +++--- 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/gui/src/redux/thunks/callTool.ts b/gui/src/redux/thunks/callTool.ts index a59a1d119..0bd367587 100644 --- a/gui/src/redux/thunks/callTool.ts +++ b/gui/src/redux/thunks/callTool.ts @@ -1,4 +1,4 @@ -import { createAsyncThunk } from "@reduxjs/toolkit"; +import { createAsyncThunk, unwrapResult } from "@reduxjs/toolkit"; import { selectCurrentToolCall } from "../selectors/selectCurrentToolCall"; import { acceptToolCall, @@ -23,8 +23,7 @@ export const callTool = createAsyncThunk( } if (!state.config.defaultModelTitle) { - console.error("Cannot call tools, no model selected"); - return; + throw new Error("No model selected"); } dispatch(setCalling()); @@ -40,12 +39,17 @@ export const callTool = createAsyncThunk( dispatch(acceptToolCall()); // Send to the LLM to continue the conversation - dispatch( + const response = await dispatch( streamResponseAfterToolCall({ toolCallId: toolCallState.toolCall.id, toolOutput: contextItems, }), ); + unwrapResult(response); + } else { + throw new Error( + `Failed to call tool ${toolCallState.toolCall.function.name}: ${result.error}`, + ); } }, ); diff --git a/gui/src/redux/thunks/streamNormalInput.ts b/gui/src/redux/thunks/streamNormalInput.ts index 9a19a471c..f0f6c9baa 100644 --- a/gui/src/redux/thunks/streamNormalInput.ts +++ b/gui/src/redux/thunks/streamNormalInput.ts @@ -1,4 +1,4 @@ -import { createAsyncThunk } from "@reduxjs/toolkit"; +import { createAsyncThunk, unwrapResult } from "@reduxjs/toolkit"; import { ChatMessage, PromptLog } from "core"; import { selectCurrentToolCall } from "../selectors/selectCurrentToolCall"; import { selectDefaultModel } from "../slices/configSlice"; @@ -70,7 +70,8 @@ export const streamNormalInput = createAsyncThunk< toolSettings[toolCallState.toolCall.function.name] === "allowedWithoutPermission" ) { - await dispatch(callTool()); + const response = await dispatch(callTool()); + unwrapResult(response); } } }); diff --git a/gui/src/redux/thunks/streamResponseAfterToolCall.ts b/gui/src/redux/thunks/streamResponseAfterToolCall.ts index 396ab6075..2710d0f5e 100644 --- a/gui/src/redux/thunks/streamResponseAfterToolCall.ts +++ b/gui/src/redux/thunks/streamResponseAfterToolCall.ts @@ -31,8 +31,7 @@ export const streamResponseAfterToolCall = createAsyncThunk< const defaultModel = selectDefaultModel(state); if (!defaultModel) { - console.error("No default model found"); - return; + throw new Error("No model selected"); } resetStateForNewMessage(); @@ -68,7 +67,8 @@ export const streamResponseAfterToolCall = createAsyncThunk< defaultModel.provider, useTools, ); - unwrapResult(await dispatch(streamNormalInput(messages))); + const output = await dispatch(streamNormalInput(messages)); + unwrapResult(output); }), ); }, From f90165aee2f309b4cad57e81101c277164fcf4ff Mon Sep 17 00:00:00 2001 From: Nate Date: Tue, 11 Feb 2025 09:33:20 -0800 Subject: [PATCH 152/262] add cors to local dev server so webview can use it --- gui/vite.config.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/gui/vite.config.ts b/gui/vite.config.ts index d4c4ba7d7..6c5cd6d75 100644 --- a/gui/vite.config.ts +++ b/gui/vite.config.ts @@ -16,6 +16,14 @@ export default defineConfig({ }, }, }, + server: { + cors: { + origin: "*", + methods: ["GET", "POST", "PUT", "DELETE", "PATCH", "OPTIONS"], + allowedHeaders: ["*", "Content-Type", "Authorization"], + credentials: true, + }, + }, test: { globals: true, environment: "jsdom", From 61a7273fb9920ef30344130eaa359cacc1a8fce9 Mon Sep 17 00:00:00 2001 From: Nate Date: Tue, 11 Feb 2025 09:34:13 -0800 Subject: [PATCH 153/262] add numLines to autocomplete telemetry event --- core/autocomplete/util/AutocompleteLoggingService.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/core/autocomplete/util/AutocompleteLoggingService.ts b/core/autocomplete/util/AutocompleteLoggingService.ts index 7fd49cfaf..96bf4b4bc 100644 --- a/core/autocomplete/util/AutocompleteLoggingService.ts +++ b/core/autocomplete/util/AutocompleteLoggingService.ts @@ -113,6 +113,7 @@ export class AutocompleteLoggingService { multilineCompletions: restOfOutcome.multilineCompletions, time: restOfOutcome.time, useRecentlyEdited: restOfOutcome.useRecentlyEdited, + numLines: restOfOutcome.numLines, }, true, ); From bd8b5d5b0fd161c70720ef620e4e9b682386f8ca Mon Sep 17 00:00:00 2001 From: Nate Date: Tue, 11 Feb 2025 10:00:27 -0800 Subject: [PATCH 154/262] adjust styling on accounts listbox --- extensions/vscode/package-lock.json | 4 ++-- gui/src/components/AccountDialog.tsx | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/extensions/vscode/package-lock.json b/extensions/vscode/package-lock.json index 2e51c407e..2e576ef1c 100644 --- a/extensions/vscode/package-lock.json +++ b/extensions/vscode/package-lock.json @@ -1,12 +1,12 @@ { "name": "continue", - "version": "0.9.262", + "version": "0.9.263", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "continue", - "version": "0.9.262", + "version": "0.9.263", "license": "Apache-2.0", "dependencies": { "@continuedev/fetch": "^1.0.3", diff --git a/gui/src/components/AccountDialog.tsx b/gui/src/components/AccountDialog.tsx index 8c5dbfd7f..1081a27ef 100644 --- a/gui/src/components/AccountDialog.tsx +++ b/gui/src/components/AccountDialog.tsx @@ -14,12 +14,14 @@ import { useAuth } from "../context/Auth"; import { IdeMessengerContext } from "../context/IdeMessenger"; import { setSelectedProfileId } from "../redux/slices/sessionSlice"; import { setDialogMessage, setShowDialog } from "../redux/slices/uiSlice"; +import { getFontSize } from "../util"; const StyledListboxOption = styled(Listbox.Option)<{ selected: boolean }>` background-color: ${({ selected }) => selected ? vscListActiveBackground : vscInputBackground}; cursor: pointer; - padding: 6px 8px; + padding: 4px 6px; + font-size: ${getFontSize() - 1}px; &:hover { background-color: ${vscListActiveBackground}; @@ -76,7 +78,7 @@ export default function AccountDialog() {
{controlServerBetaEnabled && ( -
+
Current workspace From f25c0ec34487fbaf7984f3afedc8fc30f3590f8c Mon Sep 17 00:00:00 2001 From: Nate Date: Tue, 11 Feb 2025 10:00:49 -0800 Subject: [PATCH 155/262] bump version --- extensions/vscode/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/vscode/package.json b/extensions/vscode/package.json index 80ffa7c64..30d9f6843 100644 --- a/extensions/vscode/package.json +++ b/extensions/vscode/package.json @@ -2,7 +2,7 @@ "name": "continue", "icon": "media/icon.png", "author": "Continue Dev, Inc", - "version": "0.9.263", + "version": "0.9.264", "repository": { "type": "git", "url": "https://github.com/continuedev/continue" From c2dd1df67a87f4a4d2143b6611ba5fd6363dc400 Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Tue, 11 Feb 2025 10:32:23 -0800 Subject: [PATCH 156/262] add error handling for missing transformers file' --- core/core.ts | 33 +++++++++++++++++++++++++++++---- 1 file changed, 29 insertions(+), 4 deletions(-) diff --git a/core/core.ts b/core/core.ts index 4b5e07b81..210c7f490 100644 --- a/core/core.ts +++ b/core/core.ts @@ -413,10 +413,35 @@ export class Core { id, })); } catch (e) { - void this.ide.showToast( - "error", - `Error getting context items from ${name}: ${e}`, - ); + let knownError = false; + + if (e instanceof Error) { + // A specific error where we're forcing the presence of embeddings provider on the config + // But Jetbrains doesn't support transformers JS + // So if a context provider needs it it will throw this error when the file isn't found + if (e.message.includes("all-MiniLM-L6-v2")) { + const toastOption = "See Docs"; + void this.ide + .showToast( + "error", + `Set up an embeddings model to use ${name}`, + toastOption, + ) + .then((userSelection) => { + if (userSelection === toastOption) { + void this.ide.openUrl( + "https://docs.continue.dev/customize/model-types/embeddings", + ); + } + }); + } + } + if (!knownError) { + void this.ide.showToast( + "error", + `Error getting context items from ${name}: ${e}`, + ); + } return []; } }); From 863cc481f9cdcda4779df478e300bb8a8cbdf489 Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Tue, 11 Feb 2025 10:57:10 -0800 Subject: [PATCH 157/262] open docs url --- core/core.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/core.ts b/core/core.ts index 210c7f490..7f9cbbeee 100644 --- a/core/core.ts +++ b/core/core.ts @@ -420,11 +420,12 @@ export class Core { // But Jetbrains doesn't support transformers JS // So if a context provider needs it it will throw this error when the file isn't found if (e.message.includes("all-MiniLM-L6-v2")) { + knownError = true; const toastOption = "See Docs"; void this.ide .showToast( "error", - `Set up an embeddings model to use ${name}`, + `Set up an embeddings model to use @${name}`, toastOption, ) .then((userSelection) => { From 3272ab462caa5e712f1c09caf768fc65c9fe1b28 Mon Sep 17 00:00:00 2001 From: Patrick Erichsen Date: Tue, 11 Feb 2025 11:09:55 -0800 Subject: [PATCH 158/262] Update pr_checks.yaml --- .github/workflows/pr_checks.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/pr_checks.yaml b/.github/workflows/pr_checks.yaml index 455a58428..236482fc1 100644 --- a/.github/workflows/pr_checks.yaml +++ b/.github/workflows/pr_checks.yaml @@ -291,6 +291,8 @@ jobs: ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }} MISTRAL_API_KEY: ${{ secrets.MISTRAL_API_KEY }} + AZURE_OPENAI_API_KEY: ${{ secrets.AZURE_OPENAI_API_KEY }} + AZURE_FOUNDRY_API_KEY: ${{ secrets.AZURE_FOUNDRY_API_KEY }} vscode-get-test-file-matrix: runs-on: ubuntu-latest From fda41312b57b67d9c4509f257ad8ddb078c46067 Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Tue, 11 Feb 2025 11:29:11 -0800 Subject: [PATCH 159/262] fix message types --- .../constants/MessageTypes.kt | 12 +++++++++ ....timestamp-1739302146824-3cd8a11b0ad45.mjs | 27 +++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 gui/vite.config.ts.timestamp-1739302146824-3cd8a11b0ad45.mjs diff --git a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/constants/MessageTypes.kt b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/constants/MessageTypes.kt index d3f69bc7a..bfa2a0410 100644 --- a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/constants/MessageTypes.kt +++ b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/constants/MessageTypes.kt @@ -41,6 +41,18 @@ class MessageTypes { "logoutOfControlPlane", "getTerminalContents", "showToast", + "openUrl", + + // These only come from the GUI for now but should be here to prevent confusionn + "toggleDevTools", + "showTutorial" + + // These are jetbrains only and only come from the GUI for now + // But again including for consistency + "copyText" + "jetbrains/isOSREnabled" + "jetbrains/getColors" + "jetbrains/onLoad" ) // Note: If updating these values, make a corresponding update in diff --git a/gui/vite.config.ts.timestamp-1739302146824-3cd8a11b0ad45.mjs b/gui/vite.config.ts.timestamp-1739302146824-3cd8a11b0ad45.mjs new file mode 100644 index 000000000..4f6a712e5 --- /dev/null +++ b/gui/vite.config.ts.timestamp-1739302146824-3cd8a11b0ad45.mjs @@ -0,0 +1,27 @@ +// vite.config.ts +import react from "file:///Users/dallin/Documents/code/continuedev/continue/gui/node_modules/@vitejs/plugin-react-swc/index.mjs"; +import tailwindcss from "file:///Users/dallin/Documents/code/continuedev/continue/gui/node_modules/tailwindcss/lib/index.js"; +import { defineConfig } from "file:///Users/dallin/Documents/code/continuedev/continue/gui/node_modules/vitest/dist/config.js"; +var vite_config_default = defineConfig({ + plugins: [react(), tailwindcss()], + build: { + // Change the output .js filename to not include a hash + rollupOptions: { + // external: ["vscode-webview"], + output: { + entryFileNames: `assets/[name].js`, + chunkFileNames: `assets/[name].js`, + assetFileNames: `assets/[name].[ext]` + } + } + }, + test: { + globals: true, + environment: "jsdom", + setupFiles: "./src/util/test/setupTests.ts" + } +}); +export { + vite_config_default as default +}; +//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsidml0ZS5jb25maWcudHMiXSwKICAic291cmNlc0NvbnRlbnQiOiBbImNvbnN0IF9fdml0ZV9pbmplY3RlZF9vcmlnaW5hbF9kaXJuYW1lID0gXCIvVXNlcnMvZGFsbGluL0RvY3VtZW50cy9jb2RlL2NvbnRpbnVlZGV2L2NvbnRpbnVlL2d1aVwiO2NvbnN0IF9fdml0ZV9pbmplY3RlZF9vcmlnaW5hbF9maWxlbmFtZSA9IFwiL1VzZXJzL2RhbGxpbi9Eb2N1bWVudHMvY29kZS9jb250aW51ZWRldi9jb250aW51ZS9ndWkvdml0ZS5jb25maWcudHNcIjtjb25zdCBfX3ZpdGVfaW5qZWN0ZWRfb3JpZ2luYWxfaW1wb3J0X21ldGFfdXJsID0gXCJmaWxlOi8vL1VzZXJzL2RhbGxpbi9Eb2N1bWVudHMvY29kZS9jb250aW51ZWRldi9jb250aW51ZS9ndWkvdml0ZS5jb25maWcudHNcIjtpbXBvcnQgcmVhY3QgZnJvbSBcIkB2aXRlanMvcGx1Z2luLXJlYWN0LXN3Y1wiO1xuaW1wb3J0IHRhaWx3aW5kY3NzIGZyb20gXCJ0YWlsd2luZGNzc1wiO1xuaW1wb3J0IHsgZGVmaW5lQ29uZmlnIH0gZnJvbSBcInZpdGVzdC9jb25maWdcIjtcblxuLy8gaHR0cHM6Ly92aXRlanMuZGV2L2NvbmZpZy9cbmV4cG9ydCBkZWZhdWx0IGRlZmluZUNvbmZpZyh7XG4gIHBsdWdpbnM6IFtyZWFjdCgpLCB0YWlsd2luZGNzcygpXSxcbiAgYnVpbGQ6IHtcbiAgICAvLyBDaGFuZ2UgdGhlIG91dHB1dCAuanMgZmlsZW5hbWUgdG8gbm90IGluY2x1ZGUgYSBoYXNoXG4gICAgcm9sbHVwT3B0aW9uczoge1xuICAgICAgLy8gZXh0ZXJuYWw6IFtcInZzY29kZS13ZWJ2aWV3XCJdLFxuICAgICAgb3V0cHV0OiB7XG4gICAgICAgIGVudHJ5RmlsZU5hbWVzOiBgYXNzZXRzL1tuYW1lXS5qc2AsXG4gICAgICAgIGNodW5rRmlsZU5hbWVzOiBgYXNzZXRzL1tuYW1lXS5qc2AsXG4gICAgICAgIGFzc2V0RmlsZU5hbWVzOiBgYXNzZXRzL1tuYW1lXS5bZXh0XWAsXG4gICAgICB9LFxuICAgIH0sXG4gIH0sXG4gIHRlc3Q6IHtcbiAgICBnbG9iYWxzOiB0cnVlLFxuICAgIGVudmlyb25tZW50OiBcImpzZG9tXCIsXG4gICAgc2V0dXBGaWxlczogXCIuL3NyYy91dGlsL3Rlc3Qvc2V0dXBUZXN0cy50c1wiLFxuICB9LFxufSk7XG4iXSwKICAibWFwcGluZ3MiOiAiO0FBQWlWLE9BQU8sV0FBVztBQUNuVyxPQUFPLGlCQUFpQjtBQUN4QixTQUFTLG9CQUFvQjtBQUc3QixJQUFPLHNCQUFRLGFBQWE7QUFBQSxFQUMxQixTQUFTLENBQUMsTUFBTSxHQUFHLFlBQVksQ0FBQztBQUFBLEVBQ2hDLE9BQU87QUFBQTtBQUFBLElBRUwsZUFBZTtBQUFBO0FBQUEsTUFFYixRQUFRO0FBQUEsUUFDTixnQkFBZ0I7QUFBQSxRQUNoQixnQkFBZ0I7QUFBQSxRQUNoQixnQkFBZ0I7QUFBQSxNQUNsQjtBQUFBLElBQ0Y7QUFBQSxFQUNGO0FBQUEsRUFDQSxNQUFNO0FBQUEsSUFDSixTQUFTO0FBQUEsSUFDVCxhQUFhO0FBQUEsSUFDYixZQUFZO0FBQUEsRUFDZDtBQUNGLENBQUM7IiwKICAibmFtZXMiOiBbXQp9Cg== From 52485baf48580c6ca94707976fe01b7a8ab3ce5b Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Tue, 11 Feb 2025 11:29:56 -0800 Subject: [PATCH 160/262] fix message types --- .../constants/MessageTypes.kt | 10 +++---- ....timestamp-1739302146824-3cd8a11b0ad45.mjs | 27 ------------------- 2 files changed, 5 insertions(+), 32 deletions(-) delete mode 100644 gui/vite.config.ts.timestamp-1739302146824-3cd8a11b0ad45.mjs diff --git a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/constants/MessageTypes.kt b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/constants/MessageTypes.kt index bfa2a0410..542ef6ef7 100644 --- a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/constants/MessageTypes.kt +++ b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/constants/MessageTypes.kt @@ -43,15 +43,15 @@ class MessageTypes { "showToast", "openUrl", - // These only come from the GUI for now but should be here to prevent confusionn + // These only come from the GUI for now but should be here to prevent confusion "toggleDevTools", - "showTutorial" + "showTutorial", // These are jetbrains only and only come from the GUI for now // But again including for consistency - "copyText" - "jetbrains/isOSREnabled" - "jetbrains/getColors" + "copyText", + "jetbrains/isOSREnabled", + "jetbrains/getColors", "jetbrains/onLoad" ) diff --git a/gui/vite.config.ts.timestamp-1739302146824-3cd8a11b0ad45.mjs b/gui/vite.config.ts.timestamp-1739302146824-3cd8a11b0ad45.mjs deleted file mode 100644 index 4f6a712e5..000000000 --- a/gui/vite.config.ts.timestamp-1739302146824-3cd8a11b0ad45.mjs +++ /dev/null @@ -1,27 +0,0 @@ -// vite.config.ts -import react from "file:///Users/dallin/Documents/code/continuedev/continue/gui/node_modules/@vitejs/plugin-react-swc/index.mjs"; -import tailwindcss from "file:///Users/dallin/Documents/code/continuedev/continue/gui/node_modules/tailwindcss/lib/index.js"; -import { defineConfig } from "file:///Users/dallin/Documents/code/continuedev/continue/gui/node_modules/vitest/dist/config.js"; -var vite_config_default = defineConfig({ - plugins: [react(), tailwindcss()], - build: { - // Change the output .js filename to not include a hash - rollupOptions: { - // external: ["vscode-webview"], - output: { - entryFileNames: `assets/[name].js`, - chunkFileNames: `assets/[name].js`, - assetFileNames: `assets/[name].[ext]` - } - } - }, - test: { - globals: true, - environment: "jsdom", - setupFiles: "./src/util/test/setupTests.ts" - } -}); -export { - vite_config_default as default -}; -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsidml0ZS5jb25maWcudHMiXSwKICAic291cmNlc0NvbnRlbnQiOiBbImNvbnN0IF9fdml0ZV9pbmplY3RlZF9vcmlnaW5hbF9kaXJuYW1lID0gXCIvVXNlcnMvZGFsbGluL0RvY3VtZW50cy9jb2RlL2NvbnRpbnVlZGV2L2NvbnRpbnVlL2d1aVwiO2NvbnN0IF9fdml0ZV9pbmplY3RlZF9vcmlnaW5hbF9maWxlbmFtZSA9IFwiL1VzZXJzL2RhbGxpbi9Eb2N1bWVudHMvY29kZS9jb250aW51ZWRldi9jb250aW51ZS9ndWkvdml0ZS5jb25maWcudHNcIjtjb25zdCBfX3ZpdGVfaW5qZWN0ZWRfb3JpZ2luYWxfaW1wb3J0X21ldGFfdXJsID0gXCJmaWxlOi8vL1VzZXJzL2RhbGxpbi9Eb2N1bWVudHMvY29kZS9jb250aW51ZWRldi9jb250aW51ZS9ndWkvdml0ZS5jb25maWcudHNcIjtpbXBvcnQgcmVhY3QgZnJvbSBcIkB2aXRlanMvcGx1Z2luLXJlYWN0LXN3Y1wiO1xuaW1wb3J0IHRhaWx3aW5kY3NzIGZyb20gXCJ0YWlsd2luZGNzc1wiO1xuaW1wb3J0IHsgZGVmaW5lQ29uZmlnIH0gZnJvbSBcInZpdGVzdC9jb25maWdcIjtcblxuLy8gaHR0cHM6Ly92aXRlanMuZGV2L2NvbmZpZy9cbmV4cG9ydCBkZWZhdWx0IGRlZmluZUNvbmZpZyh7XG4gIHBsdWdpbnM6IFtyZWFjdCgpLCB0YWlsd2luZGNzcygpXSxcbiAgYnVpbGQ6IHtcbiAgICAvLyBDaGFuZ2UgdGhlIG91dHB1dCAuanMgZmlsZW5hbWUgdG8gbm90IGluY2x1ZGUgYSBoYXNoXG4gICAgcm9sbHVwT3B0aW9uczoge1xuICAgICAgLy8gZXh0ZXJuYWw6IFtcInZzY29kZS13ZWJ2aWV3XCJdLFxuICAgICAgb3V0cHV0OiB7XG4gICAgICAgIGVudHJ5RmlsZU5hbWVzOiBgYXNzZXRzL1tuYW1lXS5qc2AsXG4gICAgICAgIGNodW5rRmlsZU5hbWVzOiBgYXNzZXRzL1tuYW1lXS5qc2AsXG4gICAgICAgIGFzc2V0RmlsZU5hbWVzOiBgYXNzZXRzL1tuYW1lXS5bZXh0XWAsXG4gICAgICB9LFxuICAgIH0sXG4gIH0sXG4gIHRlc3Q6IHtcbiAgICBnbG9iYWxzOiB0cnVlLFxuICAgIGVudmlyb25tZW50OiBcImpzZG9tXCIsXG4gICAgc2V0dXBGaWxlczogXCIuL3NyYy91dGlsL3Rlc3Qvc2V0dXBUZXN0cy50c1wiLFxuICB9LFxufSk7XG4iXSwKICAibWFwcGluZ3MiOiAiO0FBQWlWLE9BQU8sV0FBVztBQUNuVyxPQUFPLGlCQUFpQjtBQUN4QixTQUFTLG9CQUFvQjtBQUc3QixJQUFPLHNCQUFRLGFBQWE7QUFBQSxFQUMxQixTQUFTLENBQUMsTUFBTSxHQUFHLFlBQVksQ0FBQztBQUFBLEVBQ2hDLE9BQU87QUFBQTtBQUFBLElBRUwsZUFBZTtBQUFBO0FBQUEsTUFFYixRQUFRO0FBQUEsUUFDTixnQkFBZ0I7QUFBQSxRQUNoQixnQkFBZ0I7QUFBQSxRQUNoQixnQkFBZ0I7QUFBQSxNQUNsQjtBQUFBLElBQ0Y7QUFBQSxFQUNGO0FBQUEsRUFDQSxNQUFNO0FBQUEsSUFDSixTQUFTO0FBQUEsSUFDVCxhQUFhO0FBQUEsSUFDYixZQUFZO0FBQUEsRUFDZDtBQUNGLENBQUM7IiwKICAibmFtZXMiOiBbXQp9Cg== From 537f21c895e2560d0c9436dc887b747e36b0c6fc Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Tue, 11 Feb 2025 15:19:16 -0800 Subject: [PATCH 161/262] remove secrets in Yaml docs, use format --- docs/docs/autocomplete/model-setup.mdx | 4 ++-- docs/docs/chat/model-setup.mdx | 22 +++++++++---------- docs/docs/customize/context-providers.mdx | 4 ++-- .../customize/deep-dives/autocomplete.mdx | 4 ++-- docs/docs/customize/deep-dives/docs.mdx | 8 +++---- .../model-providers/more/SambaNova.mdx | 4 ++-- .../model-providers/more/asksage.mdx | 10 ++++----- .../model-providers/more/cerebras.mdx | 4 ++-- .../model-providers/more/cloudflare.mdx | 6 ++--- .../customize/model-providers/more/cohere.mdx | 12 +++++----- .../model-providers/more/deepinfra.mdx | 4 ++-- .../model-providers/more/function-network.mdx | 12 +++++----- .../customize/model-providers/more/groq.mdx | 4 ++-- .../more/huggingfaceinferenceapi.mdx | 8 +++---- .../customize/model-providers/more/kindo.mdx | 8 +++---- .../model-providers/more/moonshot.mdx | 8 +++---- .../customize/model-providers/more/nebius.mdx | 8 +++---- .../customize/model-providers/more/novita.mdx | 4 ++-- .../customize/model-providers/more/nvidia.mdx | 8 +++---- .../model-providers/more/openrouter.mdx | 4 ++-- .../model-providers/more/replicatellm.mdx | 4 ++-- .../model-providers/more/scaleway.mdx | 8 +++---- .../model-providers/more/siliconflow.mdx | 10 ++++----- .../model-providers/more/together.mdx | 4 ++-- .../model-providers/top-level/anthropic.mdx | 4 ++-- .../model-providers/top-level/azure.mdx | 12 +++++----- .../model-providers/top-level/deepseek.mdx | 8 ++++--- .../model-providers/top-level/gemini.mdx | 8 +++---- .../model-providers/top-level/mistral.mdx | 8 +++---- .../model-providers/top-level/openai.mdx | 12 +++++----- .../model-providers/top-level/xAI.mdx | 4 ++-- .../docs/customize/model-types/embeddings.mdx | 4 ++-- docs/docs/customize/model-types/reranking.mdx | 12 +++++----- .../tutorials/how-to-self-host-a-model.mdx | 4 ++-- docs/docs/customize/tutorials/llama3.1.mdx | 20 ++++++++--------- .../customize/tutorials/set-up-codestral.mdx | 6 ++--- docs/docs/edit/how-to-customize.mdx | 4 ++-- docs/docs/json-reference.md | 6 ++--- docs/docs/reference.md | 2 +- docs/docs/yaml-migration.md | 15 ++++++------- 40 files changed, 151 insertions(+), 150 deletions(-) diff --git a/docs/docs/autocomplete/model-setup.mdx b/docs/docs/autocomplete/model-setup.mdx index 08a2f5ce1..2db6f6e4d 100644 --- a/docs/docs/autocomplete/model-setup.mdx +++ b/docs/docs/autocomplete/model-setup.mdx @@ -23,7 +23,7 @@ For the best Autocomplete experience, we recommend using Codestral through the [ - name: Codestral provider: mistral model: codestral-latest - apiKey: CODESTRAL_API_KEY + apiKey: roles: - autocomplete ``` @@ -34,7 +34,7 @@ For the best Autocomplete experience, we recommend using Codestral through the [ "title": "Codestral", "provider": "mistral", "model": "codestral-latest", - "apiKey": "YOUR_API_KEY" + "apiKey": "" } ``` diff --git a/docs/docs/chat/model-setup.mdx b/docs/docs/chat/model-setup.mdx index d6a33b268..cb50dab90 100644 --- a/docs/docs/chat/model-setup.mdx +++ b/docs/docs/chat/model-setup.mdx @@ -27,7 +27,7 @@ Our current top recommendation is Claude Sonnet 3.5 from [Anthropic](../customiz - name: Claude 3.5 Sonnet provider: anthropic model: claude-3-5-sonnet-latest - apiKey: ${{ secrets.ANTHROPIC_API_KEY }} + apiKey: ``` @@ -37,7 +37,7 @@ Our current top recommendation is Claude Sonnet 3.5 from [Anthropic](../customiz "title": "Claude 3.5 Sonnet", "provider": "anthropic", "model": "claude-3-5-sonnet-latest", - "apiKey": "[ANTHROPIC_API_KEY]" + "apiKey": "" } ] ``` @@ -57,7 +57,7 @@ If you prefer to use an open-weight model, then Llama 3.1 405B from Meta is your - name: "Llama 3.1 405B" provider: "together" model: "llama3.1-405b" - apiKey: ${{ secrets.TOGETHER_API_KEY }} + apiKey: ``` @@ -66,7 +66,7 @@ If you prefer to use an open-weight model, then Llama 3.1 405B from Meta is your - name: "Llama 3.1 405B" provider: "groq" model: "llama3.1-405b" - apiKey: ${{ secrets.GROQ_API_KEY }} + apiKey: ``` @@ -96,7 +96,7 @@ If you prefer to use an open-weight model, then Llama 3.1 405B from Meta is your "title": "Llama 3.1 405B", "provider": "together", "model": "llama3.1-405b", - "apiKey": "[TOGETHER_API_KEY]" + "apiKey": "" } ] ``` @@ -108,7 +108,7 @@ If you prefer to use an open-weight model, then Llama 3.1 405B from Meta is your "title": "Llama 3.1 405B", "provider": "groq", "model": "llama3.1-405b", - "apiKey": "[GROQ_API_KEY]" + "apiKey": "" } ] ``` @@ -150,7 +150,7 @@ If you prefer to use a model from [OpenAI](../customize/model-providers/top-leve - name: GPT-4o provider: openai model: '' - apiKey: ${{ secrets.OPENAI_API_KEY }} + apiKey: ``` @@ -160,7 +160,7 @@ If you prefer to use a model from [OpenAI](../customize/model-providers/top-leve "title": "GPT-4o", "provider": "openai", "model": "", - "apiKey": "[OPENAI_API_KEY]" + "apiKey": "" } ] ``` @@ -177,7 +177,7 @@ If you prefer to use a model from [xAI](../customize/model-providers/top-level/x "title": "Grok-2", "provider": "xAI", "model": "grok-2-latest", - "apiKey": "[XAI_API_KEY]" + "apiKey": "" } ] ``` @@ -193,7 +193,7 @@ If you prefer to use a model from [Google](../customize/model-providers/top-leve - name: Gemini 1.5 Pro provider: gemini model: gemini-1.5-pro-latest - apiKey: ${{ secrets.GEMINI_API_KEY }} + apiKey: ``` @@ -203,7 +203,7 @@ If you prefer to use a model from [Google](../customize/model-providers/top-leve "title": "Gemini 1.5 Pro", "provider": "gemini", "model": "gemini-1.5-pro-latest", - "apiKey": "[GEMINI_API_KEY]" + "apiKey": "" } ] ``` diff --git a/docs/docs/customize/context-providers.mdx b/docs/docs/customize/context-providers.mdx index ccf09a3e2..08a8de84c 100644 --- a/docs/docs/customize/context-providers.mdx +++ b/docs/docs/customize/context-providers.mdx @@ -668,7 +668,7 @@ Reference the results of a Google search. context: - provider: google params: - serperApiKey: "" + serperApiKey: ``` @@ -677,7 +677,7 @@ Reference the results of a Google search. { "name": "google", "params": { - "serperApiKey": "" + "serperApiKey": "" } } ] diff --git a/docs/docs/customize/deep-dives/autocomplete.mdx b/docs/docs/customize/deep-dives/autocomplete.mdx index 3662f3e04..3812cd97e 100644 --- a/docs/docs/customize/deep-dives/autocomplete.mdx +++ b/docs/docs/customize/deep-dives/autocomplete.mdx @@ -17,7 +17,7 @@ If you want to have the best autocomplete experience, we recommend using Codestr - name: Codestral provider: mistral model: codestral-latest - apiKey: ${{ secrets.CODESTRAL_API_KEY }} + apiKey: roles: - autocomplete ``` @@ -29,7 +29,7 @@ If you want to have the best autocomplete experience, we recommend using Codestr "title": "Codestral", "provider": "mistral", "model": "codestral-latest", - "apiKey": "YOUR_API_KEY" + "apiKey": "" } } ``` diff --git a/docs/docs/customize/deep-dives/docs.mdx b/docs/docs/customize/deep-dives/docs.mdx index 93248c5ea..ffa16eb83 100644 --- a/docs/docs/customize/deep-dives/docs.mdx +++ b/docs/docs/customize/deep-dives/docs.mdx @@ -166,7 +166,7 @@ The Github API rate limits public requests to 60 per hour. If you want to reliab context: - provider: docs params: - githubToken: ${{ secrets.GITHUB_TOKEN }} + githubToken: ``` @@ -335,14 +335,14 @@ The following configuration example includes: - embed - name: Voyage Rerank-2 provider: voyage - apiKey: ${{ secrets.VOYAGE_API_KEY }} + apiKey: model: rerank-2 roles: - rerank context: - provider: docs params: - githubToken: ${{ secrets.GITHUB_TOKEN }} + githubToken: nRetrieve: 25 nFinal: 5 useReranking: true @@ -387,7 +387,7 @@ The following configuration example includes: "name": "voyage", "params": { "model": "rerank-2", - "apiKey": "" + "apiKey": "" } }, "embeddingsProvider": { diff --git a/docs/docs/customize/model-providers/more/SambaNova.mdx b/docs/docs/customize/model-providers/more/SambaNova.mdx index e3ebee0ca..e45042a3c 100644 --- a/docs/docs/customize/model-providers/more/SambaNova.mdx +++ b/docs/docs/customize/model-providers/more/SambaNova.mdx @@ -12,7 +12,7 @@ The SambaNova Cloud is a cloud platform for running large AI models with the wor - name: SambaNova Llama 3.1 405B provider: sambanova model: llama3.1-405b - apiKey: ${{ secrets.SAMBANOVA_API_KEY }} + apiKey: ``` @@ -22,7 +22,7 @@ The SambaNova Cloud is a cloud platform for running large AI models with the wor "title": "SambaNova Llama 3.1 405B", "provider": "sambanova", "model": "llama3.1-405b", - "apiKey": "SAMBANOVA_API_KEY" + "apiKey": "" } ] ``` diff --git a/docs/docs/customize/model-providers/more/asksage.mdx b/docs/docs/customize/model-providers/more/asksage.mdx index b989711bf..9403d652c 100644 --- a/docs/docs/customize/model-providers/more/asksage.mdx +++ b/docs/docs/customize/model-providers/more/asksage.mdx @@ -17,7 +17,7 @@ To use the Ask Sage models, you can use the following models: - name: GPT-4 gov provider: askSage - apiKey: ${{ secrets.ASK_SAGE_API_KEY }} + apiKey: apiBase: https://api.asksage.ai/server/ model: gpt4-gov ``` @@ -26,11 +26,11 @@ To use the Ask Sage models, you can use the following ```json title="config.json" "models": [ { - "apiKey": "YOUR_API_KEY", - "apiBase": "https://api.asksage.ai/server/", - "model": "gpt4-gov", "title": "GPT-4 gov", - "provider": "askSage" + "provider": "askSage", + "model": "gpt4-gov", + "apiBase": "https://api.asksage.ai/server/", + "apiKey": "" } ] ``` diff --git a/docs/docs/customize/model-providers/more/cerebras.mdx b/docs/docs/customize/model-providers/more/cerebras.mdx index 6226aef2e..eec853734 100644 --- a/docs/docs/customize/model-providers/more/cerebras.mdx +++ b/docs/docs/customize/model-providers/more/cerebras.mdx @@ -16,7 +16,7 @@ Cerebras Inference uses specialized silicon to provides fast inference. - name: Cerebras Llama 3.1 70B provider: cerebras model: llama3.1-70b - apiKey: ${{ secrets.CEREBRAS_API_KEY }} + apiKey: ``` @@ -26,7 +26,7 @@ Cerebras Inference uses specialized silicon to provides fast inference. "title": "Cerebras Llama 3.1 70B", "provider": "cerebras", "model": "llama3.1-70b", - "apiKey": "YOUR_API_KEY" + "apiKey": "" } ] ``` diff --git a/docs/docs/customize/model-providers/more/cloudflare.mdx b/docs/docs/customize/model-providers/more/cloudflare.mdx index ed58f32bf..d6a3b428d 100644 --- a/docs/docs/customize/model-providers/more/cloudflare.mdx +++ b/docs/docs/customize/model-providers/more/cloudflare.mdx @@ -12,7 +12,7 @@ Cloudflare Workers AI can be used for both chat and tab autocompletion in Contin - name: Llama 3 8B provider: cloudflare accountId: YOUR CLOUDFLARE ACCOUNT ID - apiKey: ${{ secrets.CLOUDFARE_API_KEY }} + apiKey: model: "@cf/meta/llama-3-8b-instruct" contextLength: 2400 defaultCompletionOptions: @@ -22,7 +22,7 @@ Cloudflare Workers AI can be used for both chat and tab autocompletion in Contin - name: DeepSeek Coder 6.7b Instruct provider: cloudflare accountId: YOUR CLOUDFLARE ACCOUNT ID - apiKey: ${{ secrets.CLOUDFARE_API_KEY }} + apiKey: model: "@hf/thebloke/deepseek-coder-6.7b-instruct-awq" contextLength: 2400 defaultCompletionOptions: @@ -32,7 +32,7 @@ Cloudflare Workers AI can be used for both chat and tab autocompletion in Contin - name: DeepSeek 7b provider: cloudflare accountId: YOUR CLOUDFLARE ACCOUNT ID - apiKey: ${{ secrets.CLOUDFARE_API_KEY }} + apiKey: model: "@hf/thebloke/deepseek-coder-6.7b-base-awq" roles: - autocomplete diff --git a/docs/docs/customize/model-providers/more/cohere.mdx b/docs/docs/customize/model-providers/more/cohere.mdx index bd8228e66..3aa7b78fe 100644 --- a/docs/docs/customize/model-providers/more/cohere.mdx +++ b/docs/docs/customize/model-providers/more/cohere.mdx @@ -16,7 +16,7 @@ We recommend configuring **Command-R Plus** as your chat model. - name: Cohere provider: cohere model: command-r-plus - apiKey: ${{ secrets.COHERE_API_KEY }} + apiKey: ``` @@ -26,7 +26,7 @@ We recommend configuring **Command-R Plus** as your chat model. "title": "Cohere", "provider": "cohere", "model": "command-r-plus", - "apiKey": "YOUR_API_KEY" + "apiKey": "" } ] ``` @@ -50,7 +50,7 @@ We recommend configuring **embed-english-v3.0** as your embeddings model. - name: Cohere Embed provider: cohere model: embed-english-v3.0 - apiKey: ${{ secrets.COHERE_API_KEY }} + apiKey: roles: - embed ``` @@ -60,7 +60,7 @@ We recommend configuring **embed-english-v3.0** as your embeddings model. "embeddingsProvider": { "provider": "cohere", "model": "embed-english-v3.0", - "apiKey": "" + "apiKey": "" } ``` @@ -77,7 +77,7 @@ We recommend configuring **rerank-english-v3.0** as your reranking model. - name: Cohere Reranker provider: cohere model: rerank-english-v3.0 - apiKey: ${{ secrets.COHERE_API_KEY }} + apiKey: roles: - rerank ``` @@ -88,7 +88,7 @@ We recommend configuring **rerank-english-v3.0** as your reranking model. "name": "cohere", "params": { "model": "rerank-english-v3.0", - "apiKey": "" + "apiKey": "" } } ``` diff --git a/docs/docs/customize/model-providers/more/deepinfra.mdx b/docs/docs/customize/model-providers/more/deepinfra.mdx index 271c56d41..61e2fcdab 100644 --- a/docs/docs/customize/model-providers/more/deepinfra.mdx +++ b/docs/docs/customize/model-providers/more/deepinfra.mdx @@ -12,7 +12,7 @@ import TabItem from "@theme/TabItem"; - name: DeepInfra provider: deepinfra model: mistralai/Mixtral-8x7B-Instruct-v0.1 - apiKey: ${{ secrets.DEEP_INFRA_API_KEY }} + apiKey: ``` @@ -22,7 +22,7 @@ import TabItem from "@theme/TabItem"; "provider": "deepinfra", "title": "DeepInfra", "model": "mistralai/Mixtral-8x7B-Instruct-v0.1", - "apiKey": "" + "apiKey": "" } ] ``` diff --git a/docs/docs/customize/model-providers/more/function-network.mdx b/docs/docs/customize/model-providers/more/function-network.mdx index f9aef6584..0534fdd8b 100644 --- a/docs/docs/customize/model-providers/more/function-network.mdx +++ b/docs/docs/customize/model-providers/more/function-network.mdx @@ -27,7 +27,7 @@ Function Network supports a number of models for chat. We recommend using LLama - name: Llama 3.1 70b provider: function-network model: meta/llama-3.1-70b-instruct - apiKey: ${{ secrets.FUNCTION_NETWORK_API_KEY }} + apiKey: roles: - chat ``` @@ -39,7 +39,7 @@ Function Network supports a number of models for chat. We recommend using LLama "title": "Llama 3.1 70b", "provider": "function-network", "model": "meta/llama-3.1-70b-instruct", - "apiKey": "YOUR_API_KEY" + "apiKey": "" } ] ``` @@ -59,7 +59,7 @@ Function Network supports a number of models for autocomplete. We recommend usin - name: Deepseek Coder 6.7b provider: function-network model: thebloke/deepseek-coder-6.7b-base-awq - apiKey: ${{ secrets.FUNCTION_NETWORK_API_KEY }} + apiKey: roles: - autocomplete ``` @@ -70,7 +70,7 @@ Function Network supports a number of models for autocomplete. We recommend usin "title": "Deepseek Coder 6.7b", "provider": "function-network", "model": "thebloke/deepseek-coder-6.7b-base-awq", - "apiKey": "YOUR_API_KEY" + "apiKey": "" } ``` @@ -87,7 +87,7 @@ Function Network supports a number of models for embeddings. We recommend using - name: BGE Base En provider: function-network model: baai/bge-base-en-v1.5 - apiKey: ${{ secrets.FUNCTION_NETWORK_API_KEY }} + apiKey: roles: - embed ``` @@ -97,7 +97,7 @@ Function Network supports a number of models for embeddings. We recommend using "embeddingsProvider": { "provider": "function-network", "model": "baai/bge-base-en-v1.5", - "apiKey": "YOUR_API_KEY" + "apiKey": "" } ``` diff --git a/docs/docs/customize/model-providers/more/groq.mdx b/docs/docs/customize/model-providers/more/groq.mdx index e8ff40441..1f637df99 100644 --- a/docs/docs/customize/model-providers/more/groq.mdx +++ b/docs/docs/customize/model-providers/more/groq.mdx @@ -19,7 +19,7 @@ Groq provides the fastest available inference for open-source language models, i - name: Llama 3.3 70b Versatile provider: groq model: llama-3.3-70b-versatile - apiKey: ${{ secrets.GROQ_API_KEY }} + apiKey: roles: - chat ``` @@ -31,7 +31,7 @@ Groq provides the fastest available inference for open-source language models, i "title": "Llama 3.3 70b Versatile", "provider": "groq", "model": "llama-3.3-70b-versatile", - "apiKey": "" + "apiKey": "" } ] ``` diff --git a/docs/docs/customize/model-providers/more/huggingfaceinferenceapi.mdx b/docs/docs/customize/model-providers/more/huggingfaceinferenceapi.mdx index 3e466bbbe..8a3a4235f 100644 --- a/docs/docs/customize/model-providers/more/huggingfaceinferenceapi.mdx +++ b/docs/docs/customize/model-providers/more/huggingfaceinferenceapi.mdx @@ -12,8 +12,8 @@ Hugging Face Inference Endpoints are an easy way to setup instances of open-sour - name: Hugging Face Inference API provider: huggingface-inference-api model: MODEL_NAME - apiKey: ${{ secrets.HF_API_KEY }} - apiBase: HF_URL_BASE + apiKey: + apiBase: ``` @@ -23,8 +23,8 @@ Hugging Face Inference Endpoints are an easy way to setup instances of open-sour "title": "Hugging Face Inference API", "provider": "huggingface-inference-api", "model": "MODEL_NAME", - "apiKey": "YOUR_HF_TOKEN", - "apiBase": "" + "apiKey": "", + "apiBase": "" } ] ``` diff --git a/docs/docs/customize/model-providers/more/kindo.mdx b/docs/docs/customize/model-providers/more/kindo.mdx index 52666f313..4b4b8a679 100644 --- a/docs/docs/customize/model-providers/more/kindo.mdx +++ b/docs/docs/customize/model-providers/more/kindo.mdx @@ -14,7 +14,7 @@ Kindo offers centralized control over your organization's AI operations, ensurin - name: Claude 3.5 Sonnet provider: kindo model: claude-3-5-sonnet - apiKey: ${{ secrets.KINDO_API_KEY }} + apiKey: ``` @@ -24,7 +24,7 @@ Kindo offers centralized control over your organization's AI operations, ensurin "title": "Claude 3.5 Sonnet", "provider": "kindo", "model": "claude-3-5-sonnet", - "apiKey": "" + "apiKey": "" } ] ``` @@ -40,7 +40,7 @@ Kindo offers centralized control over your organization's AI operations, ensurin - name: WhiteRabbitNeo provider: kindo model: /models/WhiteRabbitNeo-33B-DeepSeekCoder - apiKey: ${{ secrets.KINDO_API_KEY }} + apiKey: roles: - autocomplete ``` @@ -52,7 +52,7 @@ Kindo offers centralized control over your organization's AI operations, ensurin "title": "WhiteRabbitNeo", "provider": "kindo", "model": "/models/WhiteRabbitNeo-33B-DeepSeekCoder", - "apiKey": "", + "apiKey": "", "template": "none" } ] diff --git a/docs/docs/customize/model-providers/more/moonshot.mdx b/docs/docs/customize/model-providers/more/moonshot.mdx index ab883cbdd..3113e2c77 100644 --- a/docs/docs/customize/model-providers/more/moonshot.mdx +++ b/docs/docs/customize/model-providers/more/moonshot.mdx @@ -19,7 +19,7 @@ To use Moonshot AI models, you need to: - name: Moonshot provider: moonshot model: moonshot-v1-8k - apiKey: apiKey: ${{ secrets.MOONSHOT_API_KEY }} + apiKey: ``` @@ -29,7 +29,7 @@ To use Moonshot AI models, you need to: "title": "Moonshot", "provider": "moonshot", "model": "moonshot-v1-8k", - "apiKey": "YOUR_API_KEY" + "apiKey": "" } ] ``` @@ -63,7 +63,7 @@ Here's a complete configuration example: - name: Moonshot-8K provider: moonshot model: moonshot-v1-8k - apiKey: apiKey: ${{ secrets.MOONSHOT_API_KEY }} + apiKey: defaultCompletionOptions: temperature: 0.7 topP: 0.95 @@ -77,7 +77,7 @@ Here's a complete configuration example: "title": "Moonshot-8K", "provider": "moonshot", "model": "moonshot-v1-8k", - "apiKey": "YOUR_API_KEY", + "apiKey": "", "completionOptions": { "temperature": 0.7, "topP": 0.95, diff --git a/docs/docs/customize/model-providers/more/nebius.mdx b/docs/docs/customize/model-providers/more/nebius.mdx index 6d0b5ff14..87748b605 100644 --- a/docs/docs/customize/model-providers/more/nebius.mdx +++ b/docs/docs/customize/model-providers/more/nebius.mdx @@ -18,7 +18,7 @@ Available models can be found on the [Nebius AI Studio models page](https://stud - name: Llama 3.1 405b provider: nebius model: llama3.1-405b - apiKey: ${{ secrets.NEBIUS_API_KEY }} + apiKey: ``` @@ -28,7 +28,7 @@ Available models can be found on the [Nebius AI Studio models page](https://stud "title": "Llama 3.1 405b", "provider": "nebius", "model": "llama3.1-405b", - "apiKey": "[API_KEY]" + "apiKey": "" } ] ``` @@ -46,7 +46,7 @@ Available models can be found on the [Nebius AI Studio embeddings page](https:// - name: BAAI Embedder provider: nebius model: BAAI/bge-en-icl - apiKey: ${{ secrets.NEBIUS_API_KEY }} + apiKey: roles: - embed ``` @@ -56,7 +56,7 @@ Available models can be found on the [Nebius AI Studio embeddings page](https:// "embeddingsProvider": { "provider": "nebius", "model": "BAAI/bge-en-icl", - "apiKey": "[API_KEY]" + "apiKey": "" } ``` diff --git a/docs/docs/customize/model-providers/more/novita.mdx b/docs/docs/customize/model-providers/more/novita.mdx index 2ed722c74..b9f647955 100644 --- a/docs/docs/customize/model-providers/more/novita.mdx +++ b/docs/docs/customize/model-providers/more/novita.mdx @@ -12,7 +12,7 @@ import TabItem from "@theme/TabItem"; - name: Llama 3.1 8B provider: novita model: meta-llama/llama-3.1-8b-instruct - apiKey: ${{ secrets.NOVITA_API_KEY }} + apiKey: ``` @@ -22,7 +22,7 @@ import TabItem from "@theme/TabItem"; "title": "Llama 3.1 8B", "provider": "novita", "model": "meta-llama/llama-3.1-8b-instruct", - "apiKey": "YOUR_API_KEY" + "apiKey": "" } ] ``` diff --git a/docs/docs/customize/model-providers/more/nvidia.mdx b/docs/docs/customize/model-providers/more/nvidia.mdx index 12da60027..dcceaf31d 100644 --- a/docs/docs/customize/model-providers/more/nvidia.mdx +++ b/docs/docs/customize/model-providers/more/nvidia.mdx @@ -20,7 +20,7 @@ We recommend configuring **Nemotron-4-340B-Instruct** as your chat model. - name: Nemotron-4-340B-Instruct provider: nvidia model: nvidia-nemotron-4-340b-instruct - apiKey: ${{ secrets.NVIDIA_API_KEY }} + apiKey: ``` @@ -30,7 +30,7 @@ We recommend configuring **Nemotron-4-340B-Instruct** as your chat model. "title": "Nemotron-4-340B-Instruct", "provider": "nvidia", "model": "nvidia-nemotron-4-340b-instruct", - "apiKey": "[API_KEY]" + "apiKey": "" } ] ``` @@ -54,7 +54,7 @@ We recommend configuring **NVIDIA Retrieval QA Mistral 7B** as your embeddings m - name: Nvidia Embedder provider: nvidia model: nvidia/nv-embedqa-mistral-7b-v2 - apiKey: ${{ secrets.NVIDIA_API_KEY }} + apiKey: roles: - embed ``` @@ -64,7 +64,7 @@ We recommend configuring **NVIDIA Retrieval QA Mistral 7B** as your embeddings m "embeddingsProvider": { "provider": "nvidia", "model": "nvidia/nv-embedqa-mistral-7b-v2", - "apiKey": "[API_KEY]" + "apiKey": "" } ``` diff --git a/docs/docs/customize/model-providers/more/openrouter.mdx b/docs/docs/customize/model-providers/more/openrouter.mdx index 893298ee6..3f3305aa0 100644 --- a/docs/docs/customize/model-providers/more/openrouter.mdx +++ b/docs/docs/customize/model-providers/more/openrouter.mdx @@ -15,7 +15,7 @@ Change `~/.continue/config.json` to look like the following. provider: openrouter model: meta-llama/llama-3-70b-instruct apiBase: https://openrouter.ai/api/v1 - apiKey: ${{ secrets.OPEN_ROUTER_API_KEY }} + apiKey: ``` @@ -26,7 +26,7 @@ Change `~/.continue/config.json` to look like the following. "provider": "openrouter", "model": "meta-llama/llama-3-70b-instruct", "apiBase": "https://openrouter.ai/api/v1", - "apiKey": "" + "apiKey": "" } ] ``` diff --git a/docs/docs/customize/model-providers/more/replicatellm.mdx b/docs/docs/customize/model-providers/more/replicatellm.mdx index 58cd5b53b..42993d683 100644 --- a/docs/docs/customize/model-providers/more/replicatellm.mdx +++ b/docs/docs/customize/model-providers/more/replicatellm.mdx @@ -12,7 +12,7 @@ Replicate is a great option for newly released language models or models that yo - name: Replicate CodeLLama provider: replicate model: codellama-13b - apiKey: ${{ secrets.REPLICATE_API_KEY }} + apiKey: ``` @@ -22,7 +22,7 @@ Replicate is a great option for newly released language models or models that yo "title": "Replicate CodeLLama", "provider": "replicate", "model": "codellama-13b", - "apiKey": "REPLICATE_API_KEY" + "apiKey": "" } ] ``` diff --git a/docs/docs/customize/model-providers/more/scaleway.mdx b/docs/docs/customize/model-providers/more/scaleway.mdx index ad35d2c4f..64f43eb04 100644 --- a/docs/docs/customize/model-providers/more/scaleway.mdx +++ b/docs/docs/customize/model-providers/more/scaleway.mdx @@ -23,7 +23,7 @@ We recommend configuring **Qwen2.5-Coder-32B-Instruct** as your chat model. - name: Qwen2.5-Coder-32B-Instruct provider: scaleway model: qwen2.5-coder-32b-instruct - apiKey: ${{ secrets.SCALEWAY_API_KEY }} + apiKey: ``` @@ -33,7 +33,7 @@ We recommend configuring **Qwen2.5-Coder-32B-Instruct** as your chat model. "title": "Qwen2.5-Coder-32B-Instruct", "provider": "scaleway", "model": "qwen2.5-coder-32b-instruct", - "apiKey": "[API_KEY]" + "apiKey": "" } ] ``` @@ -57,7 +57,7 @@ We recommend configuring **BGE-Multilingual-Gemma2** as your embeddings model. - name: BGE Multilingual Gemma2 provider: scaleway model: bge-multilingual-gemma2 - apiKey: ${{ secrets.SCALEWAY_API_KEY }} + apiKey: roles: - embed ``` @@ -67,7 +67,7 @@ We recommend configuring **BGE-Multilingual-Gemma2** as your embeddings model. "embeddingsProvider": { "provider": "scaleway", "model": "bge-multilingual-gemma2", - "apiKey": "[API_KEY]" + "apiKey": "" } ``` diff --git a/docs/docs/customize/model-providers/more/siliconflow.mdx b/docs/docs/customize/model-providers/more/siliconflow.mdx index 5a00d74b6..e1b185230 100644 --- a/docs/docs/customize/model-providers/more/siliconflow.mdx +++ b/docs/docs/customize/model-providers/more/siliconflow.mdx @@ -20,7 +20,7 @@ We recommend configuring **Qwen/Qwen2.5-Coder-32B-Instruct** as your chat model. - name: Qwen provider: siliconflow model: Qwen/Qwen2.5-Coder-32B-Instruct - apiKey: ${{ secrets.SILICONFLOW_API_KEY }} + apiKey: roles: - chat ``` @@ -32,7 +32,7 @@ We recommend configuring **Qwen/Qwen2.5-Coder-32B-Instruct** as your chat model. "title": "Qwen", "provider": "siliconflow", "model": "Qwen/Qwen2.5-Coder-32B-Instruct", - "apiKey": "[API_KEY]" + "apiKey": "" } ] ``` @@ -50,7 +50,7 @@ We recommend configuring **Qwen/Qwen2.5-Coder-7B-Instruct** as your autocomplete - name: Qwen provider: siliconflow model: Qwen/Qwen2.5-Coder-32B-Instruct - apiKey: ${{ secrets.SILICONFLOW_API_KEY }} + apiKey: roles: - autocomplete ``` @@ -62,14 +62,14 @@ We recommend configuring **Qwen/Qwen2.5-Coder-7B-Instruct** as your autocomplete "title": "Qwen", "provider": "siliconflow", "model": "Qwen/Qwen2.5-Coder-32B-Instruct", - "apiKey": "[API_KEY]" + "apiKey": "" } ] "tabAutocompleteModel": { "title": "Qwen", "provider": "siliconflow", "model": "Qwen/Qwen2.5-Coder-7B-Instruct", - "apiKey": "[API_KEY]" + "apiKey": "" } ``` diff --git a/docs/docs/customize/model-providers/more/together.mdx b/docs/docs/customize/model-providers/more/together.mdx index 378b36539..1e8034a5e 100644 --- a/docs/docs/customize/model-providers/more/together.mdx +++ b/docs/docs/customize/model-providers/more/together.mdx @@ -12,7 +12,7 @@ The Together API is a cloud platform for running large AI models. You can sign u - name: Together Qwen2.5 Coder provider: together model: Qwen/Qwen2.5-Coder-32B-Instruct - apiKey: ${{ secrets.TOGETHER_API_KEY }} + apiKey: ``` @@ -22,7 +22,7 @@ The Together API is a cloud platform for running large AI models. You can sign u "title": "Together Qwen2.5 Coder", "provider": "together", "model": "Qwen/Qwen2.5-Coder-32B-Instruct", - "apiKey": "YOUR_API_KEY" + "apiKey": "" } ] ``` diff --git a/docs/docs/customize/model-providers/top-level/anthropic.mdx b/docs/docs/customize/model-providers/top-level/anthropic.mdx index 1a670fe2c..5a2a23696 100644 --- a/docs/docs/customize/model-providers/top-level/anthropic.mdx +++ b/docs/docs/customize/model-providers/top-level/anthropic.mdx @@ -69,7 +69,7 @@ To enable caching of the system message and the turn-by-turn conversation, updat - name: Anthropic provider: anthropic model: claude-3-5-sonnet-latest - apiKey: ${{ secrets.ANTHROPIC_API_KEY }} + apiKey: roles: - chat cacheBehavior: @@ -88,7 +88,7 @@ To enable caching of the system message and the turn-by-turn conversation, updat "title": "Anthropic", "provider": "anthropic", "model": "claude-3-5-sonnet-latest", - "apiKey": "[API_KEY]" + "apiKey": "" } ] ``` diff --git a/docs/docs/customize/model-providers/top-level/azure.mdx b/docs/docs/customize/model-providers/top-level/azure.mdx index a27febc92..b0c28c0e0 100644 --- a/docs/docs/customize/model-providers/top-level/azure.mdx +++ b/docs/docs/customize/model-providers/top-level/azure.mdx @@ -27,7 +27,7 @@ We recommend configuring **GPT-4o** as your chat model. model: gpt-4o apiBase: deployment: - apiKey: ${{ secrets.AZURE_API_KEY }} # If you use subscription key, try using Azure gateway to rename it apiKey + apiKey: # If you use subscription key, try using Azure gateway to rename it apiKey env: apiType: azure-foundry # Or "azure-openai" if using OpenAI models ``` @@ -40,7 +40,7 @@ We recommend configuring **GPT-4o** as your chat model. "model": "gpt-4o", "apiBase": "", "deployment": "", - "apiKey": "", // If you use subscription key, try using Azure gateway to rename it apiKey + "apiKey": "", // If you use subscription key, try using Azure gateway to rename it apiKey "apiType": "azure-foundry" // Or "azure-openai" if using OpenAI models }] ``` @@ -86,7 +86,7 @@ We recommend configuring **text-embedding-3-large** as your embeddings model. model: text-embedding-3-large apiBase: deployment: - apiKey: ${{ secrets.AZURE_API_KEY }} + apiKey: env: apiType: azure ``` @@ -98,7 +98,7 @@ We recommend configuring **text-embedding-3-large** as your embeddings model. "model": "text-embedding-3-large", "apiBase": "", "deployment": "", - "apiKey": "", + "apiKey": "", "apiType": "azure-foundry" // Or "azure-openai" if using OpenAI models } ``` @@ -137,7 +137,7 @@ For example, a Target URI of `https://just-an-example.openai.azure.com/openai/de apiBase: https://just-an-example.openai.azure.com deployment: gpt-4o-july apiVersion: 2023-03-15-preview - apiKey: ${{ secrets.AZURE_API_KEY }} + apiKey: env: apiType: azure-openai ``` @@ -151,7 +151,7 @@ For example, a Target URI of `https://just-an-example.openai.azure.com/openai/de "apiBase": "https://just-an-example.openai.azure.com", "deployment": "gpt-4o-july", "apiVersion": "2023-03-15-preview", - "apiKey": "", + "apiKey": "", "apiType": "azure-openai" } ``` diff --git a/docs/docs/customize/model-providers/top-level/deepseek.mdx b/docs/docs/customize/model-providers/top-level/deepseek.mdx index 6dd61426b..6971065e5 100644 --- a/docs/docs/customize/model-providers/top-level/deepseek.mdx +++ b/docs/docs/customize/model-providers/top-level/deepseek.mdx @@ -21,7 +21,7 @@ We recommend configuring **DeepSeek Chat** as your chat model. - name: DeepSeek Chat provider: deepseek model: deepseek-chat - apiKey: ${{ secrets.DEEPSEEK_API_KEY }} + apiKey: ``` @@ -31,7 +31,7 @@ We recommend configuring **DeepSeek Chat** as your chat model. "title": "DeepSeek Chat", "provider": "deepseek", "model": "deepseek-chat", - "apiKey": "[API_KEY]" + "apiKey": "" } ] ``` @@ -49,6 +49,7 @@ We recommend configuring **DeepSeek Coder** as your autocomplete model. - name: DeepSeek Coder provider: deepseek model: deepseek-coder + apiKey: roles: - autocomplete ``` @@ -58,7 +59,8 @@ We recommend configuring **DeepSeek Coder** as your autocomplete model. "tabAutocompleteModel": { "title": "DeepSeek Coder", "provider": "deepseek", - "model": "deepseek-coder" + "model": "deepseek-coder", + "apiKey": "" } ``` diff --git a/docs/docs/customize/model-providers/top-level/gemini.mdx b/docs/docs/customize/model-providers/top-level/gemini.mdx index 4e3b1a669..af41aee0f 100644 --- a/docs/docs/customize/model-providers/top-level/gemini.mdx +++ b/docs/docs/customize/model-providers/top-level/gemini.mdx @@ -21,7 +21,7 @@ We recommend configuring **Gemini 1.5 Pro** as your chat model. - name: Gemini 1.5 Pro provider: gemini model: gemini-1.5-pro-latest - apiKey: ${{ secrets.GEMINI_API_KEY }} + apiKey: ``` @@ -31,7 +31,7 @@ We recommend configuring **Gemini 1.5 Pro** as your chat model. "title": "Gemini 1.5 Pro", "provider": "gemini", "model": "gemini-1.5-pro-latest", - "apiKey": "[API_KEY]" + "apiKey": "" } ] ``` @@ -55,7 +55,7 @@ We recommend configuring **text-embedding-004** as your embeddings model. - name: Gemini Embeddings provider: gemini model: models/text-embedding-004 - apiKey: ${{ secrets.GEMINI_API_KEY }} + apiKey: roles: - embed ``` @@ -65,7 +65,7 @@ We recommend configuring **text-embedding-004** as your embeddings model. "embeddingsProvider": { "provider": "gemini", "model": "models/text-embedding-004", - "apiKey": "[API_KEY]" + "apiKey": "" } ``` diff --git a/docs/docs/customize/model-providers/top-level/mistral.mdx b/docs/docs/customize/model-providers/top-level/mistral.mdx index 7b8a8b7c5..fd563cafa 100644 --- a/docs/docs/customize/model-providers/top-level/mistral.mdx +++ b/docs/docs/customize/model-providers/top-level/mistral.mdx @@ -21,7 +21,7 @@ We recommend configuring **Mistral Large** as your chat model. - name: Mistral Large provider: mistral model: mistral-large-latest - apiKey: MISTRAL_API_KEY + apiKey: roles: - chat ``` @@ -33,7 +33,7 @@ We recommend configuring **Mistral Large** as your chat model. "title": "Mistral Large", "provider": "mistral", "model": "mistral-large-latest", - "apiKey": "[API_KEY]" + "apiKey": "" } ] ``` @@ -79,7 +79,7 @@ We recommend configuring **Mistral Embed** as your embeddings model. - name: Mistral Embed provider: mistral model: mistral-embed - apiKey: MISTRAL_API_KEY + apiKey: apiBase: https://api.mistral.ai/v1 roles: - embed @@ -90,7 +90,7 @@ We recommend configuring **Mistral Embed** as your embeddings model. "embeddingsProvider": { "provider": "mistral", "model": "mistral-embed", - "apiKey": "[API_KEY]", + "apiKey": "", "apiBase": "https://api.mistral.ai/v1" } ``` diff --git a/docs/docs/customize/model-providers/top-level/openai.mdx b/docs/docs/customize/model-providers/top-level/openai.mdx index 4627ced66..71d2b98e3 100644 --- a/docs/docs/customize/model-providers/top-level/openai.mdx +++ b/docs/docs/customize/model-providers/top-level/openai.mdx @@ -21,7 +21,7 @@ We recommend configuring **GPT-4o** as your chat model. - name: GPT-4o provider: openai model: gpt-4o - apiKey: ${{ secrets.HUGGINGFACE_TEI_API_KEY }} + apiKey: ``` @@ -32,7 +32,7 @@ We recommend configuring **GPT-4o** as your chat model. "title": "GPT-4o", "provider": "openai", "model": "gpt-4o", - "apiKey": "[API_KEY]" + "apiKey": "" } ] } @@ -57,7 +57,7 @@ We recommend configuring **text-embedding-3-large** as your embeddings model. - name: OpenAI Embeddings provider: openai model: text-embedding-3-large - apiKey: ${{ secrets.HUGGINGFACE_TEI_API_KEY }} + apiKey: roles: - embed ``` @@ -68,7 +68,7 @@ We recommend configuring **text-embedding-3-large** as your embeddings model. "embeddingsProvider": { "provider": "openai", "model": "text-embedding-3-large", - "apiKey": "[API_KEY]" + "apiKey": "" } } ``` @@ -109,7 +109,7 @@ If you are using an OpenAI compatible server / API, you can change the `apiBase` provider: openai model: MODEL_NAME apiBase: http://localhost:8000/v1 - apiKey: ${{ secrets.CUSTOM_API_KEY }} + apiKey: ``` @@ -119,7 +119,7 @@ If you are using an OpenAI compatible server / API, you can change the `apiBase` "title": "OpenAI-compatible server / API", "provider": "openai", "model": "MODEL_NAME", - "apiKey": "CUSTOM_API_KEY", + "apiKey": "", "apiBase": "http://localhost:8000/v1" } ] diff --git a/docs/docs/customize/model-providers/top-level/xAI.mdx b/docs/docs/customize/model-providers/top-level/xAI.mdx index 4fb8fce8e..89f50a2ba 100644 --- a/docs/docs/customize/model-providers/top-level/xAI.mdx +++ b/docs/docs/customize/model-providers/top-level/xAI.mdx @@ -21,7 +21,7 @@ We recommend configuring **grok-2-latest** as your chat model. For information o - name: Grok 2 provider: xAI model: grok-2-latest - apiKey: ${{ secrets.GROK_API_KEY }} + apiKey: ``` @@ -31,7 +31,7 @@ We recommend configuring **grok-2-latest** as your chat model. For information o "title": "Grok 2", "provider": "xAI", "model": "grok-2-latest", - "apiKey": "" + "apiKey": "" } ] ``` diff --git a/docs/docs/customize/model-types/embeddings.mdx b/docs/docs/customize/model-types/embeddings.mdx index 06f80b146..89b6b989a 100644 --- a/docs/docs/customize/model-types/embeddings.mdx +++ b/docs/docs/customize/model-types/embeddings.mdx @@ -37,7 +37,7 @@ After obtaining an API key from [here](https://www.voyageai.com/), you can confi - name: Voyage Code 3 provider: voyage model: voyage-code-3 - apiKey: ${{ secrets.VOYAGE_API_KEY }} + apiKey: roles: - embed ``` @@ -47,7 +47,7 @@ After obtaining an API key from [here](https://www.voyageai.com/), you can confi "embeddingsProvider": { "provider": "voyage", "model": "voyage-code-3", - "apiKey": "" + "apiKey": "" } ``` diff --git a/docs/docs/customize/model-types/reranking.mdx b/docs/docs/customize/model-types/reranking.mdx index 1ab61008e..fbe544606 100644 --- a/docs/docs/customize/model-types/reranking.mdx +++ b/docs/docs/customize/model-types/reranking.mdx @@ -26,7 +26,7 @@ Voyage AI offers the best reranking model for code with their `rerank-2` model. models: - name: My Voyage Reranker provider: voyage - apiKey: ${{ secrets.VOYAGE_API_KEY }} + apiKey: model: rerank-2 roles: - rerank @@ -38,7 +38,7 @@ Voyage AI offers the best reranking model for code with their `rerank-2` model. "name": "voyage", "params": { "model": "rerank-2", - "apiKey": "" + "apiKey": "" } } ``` @@ -56,7 +56,7 @@ See Cohere's documentation for rerankers [here](https://docs.cohere.com/docs/rer - name: Cohere Reranker provider: cohere model: rerank-english-v3.0 - apiKey: ${{ secrets.COHERE_API_KEY }} + apiKey: roles: - rerank ``` @@ -67,7 +67,7 @@ See Cohere's documentation for rerankers [here](https://docs.cohere.com/docs/rer "name": "cohere", "params": { "model": "rerank-english-v3.0", - "apiKey": "" + "apiKey": "" } } ``` @@ -114,7 +114,7 @@ The `"modelTitle"` field must match one of the models in your "models" array in - name: Huggingface-tei Reranker provider: huggingface-tei apiBase: http://localhost:8080 - apiKey: ${{ secrets.HUGGINGFACE_TEI_API_KEY }} + apiKey: roles: - rerank ``` @@ -125,7 +125,7 @@ The `"modelTitle"` field must match one of the models in your "models" array in "name": "huggingface-tei", "params": { "apiBase": "http://localhost:8080", - "apiKey": "" + "apiKey": "" } } ``` diff --git a/docs/docs/customize/tutorials/how-to-self-host-a-model.mdx b/docs/docs/customize/tutorials/how-to-self-host-a-model.mdx index dfa599730..3e9f7674c 100644 --- a/docs/docs/customize/tutorials/how-to-self-host-a-model.mdx +++ b/docs/docs/customize/tutorials/how-to-self-host-a-model.mdx @@ -30,7 +30,7 @@ Basic authentication can be done with any provider using the `apiKey` field: - name: Ollama provider: ollama model: llama2-7b - apiKey: xxx + apiKey: ``` @@ -40,7 +40,7 @@ Basic authentication can be done with any provider using the `apiKey` field: "title": "Ollama", "provider": "ollama", "model": "llama2-7b", - "apiKey": "xxx" + "apiKey": "" } ] ``` diff --git a/docs/docs/customize/tutorials/llama3.1.mdx b/docs/docs/customize/tutorials/llama3.1.mdx index f01e6644a..37cad183f 100644 --- a/docs/docs/customize/tutorials/llama3.1.mdx +++ b/docs/docs/customize/tutorials/llama3.1.mdx @@ -61,7 +61,7 @@ Groq provides the fastest available inference for open-source language models, i - name: Llama 3.3 70b Versatile provider: groq model: llama-3.3-70b-versatile - apiKey: ${{ secrets.GROQ_API_KEY }} + apiKey: ``` @@ -71,7 +71,7 @@ Groq provides the fastest available inference for open-source language models, i "title": "Llama 3.3 70b Versatile", "provider": "groq", "model": "llama-3.3-70b-versatile", - "apiKey": "" + "apiKey": "" } ] ``` @@ -93,7 +93,7 @@ Together AI provides fast and reliable inference of open-source models. You'll b - name: Llama 3.1 405b provider: together model: llama3.1-405b - apiKey: ${{ secrets.TOGETHER_API_KEY }} + apiKey: ``` @@ -103,7 +103,7 @@ Together AI provides fast and reliable inference of open-source models. You'll b "title": "Llama 3.1 405b", "provider": "together", "model": "llama3.1-405b", - "apiKey": "" + "apiKey": "" } ] ``` @@ -124,7 +124,7 @@ Replicate makes it easy to host and run open-source AI with an API. - name: Llama 3.1 405b provider: replicate model: llama3.1-405b - apiKey: ${{ secrets.REPLICATE_API_KEY }} + apiKey: ``` @@ -134,7 +134,7 @@ Replicate makes it easy to host and run open-source AI with an API. "title": "Llama 3.1 405b", "provider": "replicate", "model": "llama3.1-405b", - "apiKey": "" + "apiKey": "" } ] ``` @@ -156,7 +156,7 @@ SambaNova Cloud provides world record Llama3.1 70B/405B serving. - name: SambaNova Llama 3.1 405B provider: sambanova model: llama3.1-405b - apiKey: ${{ secrets.SAMBA_API_KEY }} + apiKey: ``` @@ -166,7 +166,7 @@ SambaNova Cloud provides world record Llama3.1 70B/405B serving. "title": "SambaNova Llama 3.1 405B", "provider": "sambanova", "model": "llama3.1-405b", - "apiKey": "SAMBA_API_KEY" + "apiKey": "" } ] ``` @@ -188,7 +188,7 @@ Cerebras Inference uses specialized silicon to provides fast inference for the L - name: Cerebras Llama 3.1 70B provider: cerebras model: llama3.1-70b - apiKey: ${{ secrets.ANTHROPIC_API_KEY }} + apiKey: ``` @@ -198,7 +198,7 @@ Cerebras Inference uses specialized silicon to provides fast inference for the L "title": "Cerebras Llama 3.1 70B", "provider": "cerebras", "model": "llama3.1-70b", - "apiKey": "" + "apiKey": "" } ] ``` diff --git a/docs/docs/customize/tutorials/set-up-codestral.mdx b/docs/docs/customize/tutorials/set-up-codestral.mdx index c37229317..67dc6f29e 100644 --- a/docs/docs/customize/tutorials/set-up-codestral.mdx +++ b/docs/docs/customize/tutorials/set-up-codestral.mdx @@ -26,7 +26,7 @@ import TabItem from "@theme/TabItem"; - name: Codestral provider: mistral model: codestral-latest - apiKey: ${{ secrets.CODESTRAL_API_KEY }} + apiKey: apiBase: https://codestral.mistral.ai/v1 roles: - chat @@ -40,7 +40,7 @@ import TabItem from "@theme/TabItem"; "title": "Codestral", "provider": "mistral", "model": "codestral-latest", - "apiKey": "[API_KEY]", + "apiKey": "", "apiBase": "https://codestral.mistral.ai/v1" } ], @@ -48,7 +48,7 @@ import TabItem from "@theme/TabItem"; "title": "Codestral", "provider": "mistral", "model": "codestral-latest", - "apiKey": "[API_KEY]", + "apiKey": "", "apiBase": "https://codestral.mistral.ai/v1" } ``` diff --git a/docs/docs/edit/how-to-customize.mdx b/docs/docs/edit/how-to-customize.mdx index c0cf4fee2..203cd6ff3 100644 --- a/docs/docs/edit/how-to-customize.mdx +++ b/docs/docs/edit/how-to-customize.mdx @@ -20,7 +20,7 @@ You can configure a particular model to be used for Edit: model: claude-3-5-sonnet-latest roles: - edit - apiKey: ${{ secrets.ANTHROPIC_API_KEY }} + apiKey: ``` @@ -31,7 +31,7 @@ You can configure a particular model to be used for Edit: "name": "Claude 3.5 Sonnet", "provider": "anthropic", "model": "claude-3-5-sonnet-latest", - "apiKey": "[API_KEY]" + "apiKey": "" }, "experimental": { "modelRoles": { diff --git a/docs/docs/json-reference.md b/docs/docs/json-reference.md index 6d532c92a..1082e64ad 100644 --- a/docs/docs/json-reference.md +++ b/docs/docs/json-reference.md @@ -58,7 +58,7 @@ Example: "contextLength": 128000, "title": "GPT-4o", "provider": "openai", - "apiKey": "YOUR_API_KEY" + "apiKey": "" } ] } @@ -131,7 +131,7 @@ Example: "embeddingsProvider": { "provider": "openai", "model": "text-embedding-ada-002", - "apiKey": "", + "apiKey": "", "maxChunkSize": 256, "maxBatchSize": 5 } @@ -219,7 +219,7 @@ Example "name": "voyage", "params": { "model": "rerank-2", - "apiKey": "" + "apiKey": "" } } } diff --git a/docs/docs/reference.md b/docs/docs/reference.md index 7b32a21d5..eae68825d 100644 --- a/docs/docs/reference.md +++ b/docs/docs/reference.md @@ -209,7 +209,7 @@ The `tools` section specifies external tools or APIs that can be used within you ```yaml title="config.yaml" tools: - url: https://api.exampletool.com/tool1 - apiKey: YOUR_API_KEY + apiKey: ``` --- --> diff --git a/docs/docs/yaml-migration.md b/docs/docs/yaml-migration.md index a107e1368..cc603ce1c 100644 --- a/docs/docs/yaml-migration.md +++ b/docs/docs/yaml-migration.md @@ -52,7 +52,7 @@ Model-level `completionOptions` are replaced by `defaultCompletionOptions`, with "title": "GPT-4", "provider": "openai", "model": "gpt-4", - "apiKey": "YOUR_API_KEY", + "apiKey": "", "completionOptions": { "temperature": 0.5, "maxTokens": 2000 @@ -81,7 +81,7 @@ Model-level `completionOptions` are replaced by `defaultCompletionOptions`, with "embeddingsProvider": { "provider": "openai", "model": "text-embedding-ada-002", - "apiKey": "", + "apiKey": "", "maxChunkSize": 256, "maxBatchSize": 5 }, @@ -89,7 +89,7 @@ Model-level `completionOptions` are replaced by `defaultCompletionOptions`, with "name": "voyage", "params": { "model": "rerank-2", - "apiKey": "" + "apiKey": "" } } } @@ -102,7 +102,7 @@ models: - name: GPT-4 provider: openai model: gpt-4 - apiKey: ${{ secrets.OPENAI_KEY }} + apiKey: defaultCompletionOptions: temperature: 0.5 maxTokens: 2000 @@ -112,8 +112,7 @@ models: - name: My Voyage Reranker provider: voyage - apiKey: ${{ secrets.VOYAGE_KEY }} - roles: + apiKey: - rerank - name: My Starcoder @@ -124,7 +123,7 @@ models: - name: My Ada Embedder provider: openai - apiKey: ${{ secrets.ADA_API_KEY }} + apiKey: roles: - embed @@ -138,7 +137,7 @@ models: apiBase: http://3.3.3.3/v1 requestOptions: headers: - X-Auth-Token: ${{ secrets.CUSTOM_API_KEY }} + X-Auth-Token: roles: - chat - apply From 0f7a67f1cd7fd29e427c1e89c8e024730ca4e520 Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Tue, 11 Feb 2025 16:22:50 -0800 Subject: [PATCH 162/262] indentation and brackets --- docs/docs/autocomplete/how-to-customize.md | 12 +- docs/docs/autocomplete/model-setup.mdx | 2 + docs/docs/chat/model-setup.mdx | 311 ++++++++++-------- docs/docs/customize/context-providers.mdx | 74 ++++- .../customize/deep-dives/autocomplete.mdx | 2 + docs/docs/customize/deep-dives/codebase.mdx | 2 + docs/docs/customize/deep-dives/docs.mdx | 8 +- .../model-providers/more/SambaNova.mdx | 2 + .../model-providers/more/asksage.mdx | 30 +- .../model-providers/more/cerebras.mdx | 2 + .../model-providers/more/cloudflare.mdx | 2 + .../customize/model-providers/more/cohere.mdx | 6 + .../model-providers/more/deepinfra.mdx | 2 + .../model-providers/more/flowise.mdx | 2 + .../model-providers/more/function-network.mdx | 28 +- .../customize/model-providers/more/groq.mdx | 24 +- .../more/huggingfaceinferenceapi.mdx | 48 +-- .../model-providers/more/ipex_llm.mdx | 4 + .../customize/model-providers/more/kindo.mdx | 44 +-- .../model-providers/more/llamacpp.mdx | 2 + .../model-providers/more/llamafile.mdx | 18 +- .../model-providers/more/lmstudio.mdx | 6 + .../model-providers/more/moonshot.mdx | 22 +- .../customize/model-providers/more/msty.mdx | 4 + .../customize/model-providers/more/nebius.mdx | 4 + .../customize/model-providers/more/novita.mdx | 2 + .../customize/model-providers/more/nvidia.mdx | 4 + .../model-providers/more/openrouter.mdx | 84 ++--- .../model-providers/more/replicatellm.mdx | 2 + .../model-providers/more/sagemaker.mdx | 2 + .../model-providers/more/scaleway.mdx | 20 +- .../model-providers/more/siliconflow.mdx | 4 + .../model-providers/more/textgenwebui.mdx | 18 +- .../model-providers/more/together.mdx | 28 +- .../customize/model-providers/more/vllm.mdx | 98 +++--- .../model-providers/more/watsonx.mdx | 118 ++++--- .../model-providers/top-level/anthropic.mdx | 32 +- .../model-providers/top-level/azure.mdx | 40 ++- .../model-providers/top-level/bedrock.mdx | 10 + .../model-providers/top-level/deepseek.mdx | 88 ++--- .../model-providers/top-level/gemini.mdx | 4 + .../model-providers/top-level/mistral.mdx | 6 + .../model-providers/top-level/ollama.mdx | 8 + .../model-providers/top-level/openai.mdx | 12 +- .../model-providers/top-level/vertexai.mdx | 42 ++- .../model-providers/top-level/xAI.mdx | 20 +- .../docs/customize/model-types/embeddings.mdx | 18 +- docs/docs/customize/model-types/reranking.mdx | 30 +- docs/docs/customize/slash-commands.mdx | 14 +- docs/docs/customize/tools.mdx | 14 +- .../tutorials/build-your-own-slash-command.md | 14 +- .../customize/tutorials/custom-code-rag.mdx | 2 + .../tutorials/how-to-self-host-a-model.mdx | 42 ++- docs/docs/customize/tutorials/llama3.1.mdx | 178 +++++----- .../customize/tutorials/set-up-codestral.mdx | 16 +- docs/docs/edit/how-to-customize.mdx | 12 +- docs/docs/json-reference.md | 16 +- docs/docs/troubleshooting.mdx | 3 +- 58 files changed, 987 insertions(+), 675 deletions(-) diff --git a/docs/docs/autocomplete/how-to-customize.md b/docs/docs/autocomplete/how-to-customize.md index e843e8658..abf4c5b11 100644 --- a/docs/docs/autocomplete/how-to-customize.md +++ b/docs/docs/autocomplete/how-to-customize.md @@ -8,11 +8,13 @@ sidebar_position: 5 Continue offers a handful of parameters in [`config.json`](../json-reference.md) that can be tuned to find the perfect balance between suggestion quality and system performance for your specific needs and hardware capabilities: ```json title="config.json" - "tabAutocompleteOptions": { - "maxPromptTokens": 400, - "prefixPercentage": 0.5, - "multilineCompletions": "always" - } +{ + "tabAutocompleteOptions": { + "maxPromptTokens": 400, + "prefixPercentage": 0.5, + "multilineCompletions": "always" + } +} ``` - `maxPromptTokens`: Sets the maximum number of tokens for the prompt, balancing context and speed. diff --git a/docs/docs/autocomplete/model-setup.mdx b/docs/docs/autocomplete/model-setup.mdx index 2db6f6e4d..8d37d39be 100644 --- a/docs/docs/autocomplete/model-setup.mdx +++ b/docs/docs/autocomplete/model-setup.mdx @@ -30,12 +30,14 @@ For the best Autocomplete experience, we recommend using Codestral through the [ ```json title="config.json" + { "tabAutocompleteModel": { "title": "Codestral", "provider": "mistral", "model": "codestral-latest", "apiKey": "" } + } ``` diff --git a/docs/docs/chat/model-setup.mdx b/docs/docs/chat/model-setup.mdx index cb50dab90..52dac63a2 100644 --- a/docs/docs/chat/model-setup.mdx +++ b/docs/docs/chat/model-setup.mdx @@ -24,14 +24,15 @@ Our current top recommendation is Claude Sonnet 3.5 from [Anthropic](../customiz ```yaml title="Package or config.yaml" models: - - name: Claude 3.5 Sonnet - provider: anthropic - model: claude-3-5-sonnet-latest - apiKey: + - name: Claude 3.5 Sonnet + provider: anthropic + model: claude-3-5-sonnet-latest + apiKey: ``` ```json title="config.json" + { "models": [ { "title": "Claude 3.5 Sonnet", @@ -40,6 +41,7 @@ Our current top recommendation is Claude Sonnet 3.5 from [Anthropic](../customiz "apiKey": "" } ] + } ``` @@ -90,50 +92,58 @@ If you prefer to use an open-weight model, then Llama 3.1 405B from Meta is your - ```json title="config.json" - "models": [ - { - "title": "Llama 3.1 405B", - "provider": "together", - "model": "llama3.1-405b", - "apiKey": "" - } - ] - ``` + ```json title="config.json" + { + "models": [ + { + "title": "Llama 3.1 405B", + "provider": "together", + "model": "llama3.1-405b", + "apiKey": "" + } + ] + } + ``` - ```json title="config.json" - "models": [ - { - "title": "Llama 3.1 405B", - "provider": "groq", - "model": "llama3.1-405b", - "apiKey": "" - } - ] - ``` + ```json title="config.json" + { + "models": [ + { + "title": "Llama 3.1 405B", + "provider": "groq", + "model": "llama3.1-405b", + "apiKey": "" + } + ] + } + ``` - ```json title="config.json" - "models": [ - { - "title": "Llama 3.1 405B", - "provider": "vllm", - "model": "llama3.1-405b" - } - ] - ``` + ```json title="config.json" + { + "models": [ + { + "title": "Llama 3.1 405B", + "provider": "vllm", + "model": "llama3.1-405b" + } + ] + } + ``` - ```json title="config.json" - "models": [ - { - "title": "Llama 3.1 405B", - "provider": "ollama", - "model": "llama3.1:405b" - } - ] - ``` + ```json title="config.json" + { + "models": [ + { + "title": "Llama 3.1 405B", + "provider": "ollama", + "model": "llama3.1:405b" + } + ] + } + ``` @@ -146,24 +156,26 @@ If you prefer to use a model from [OpenAI](../customize/model-providers/top-leve ```yaml title="Package or config.yaml" - models: - - name: GPT-4o - provider: openai - model: '' - apiKey: + models: + - name: GPT-4o + provider: openai + model: '' + apiKey: ``` - ```json title="config.json" + ```json title="config.json" + { "models": [ - { + { "title": "GPT-4o", "provider": "openai", "model": "", "apiKey": "" - } + } ] - ``` + } + ``` @@ -171,16 +183,31 @@ If you prefer to use a model from [OpenAI](../customize/model-providers/top-leve If you prefer to use a model from [xAI](../customize/model-providers/top-level/xAI.mdx), then we recommend Grok-2. -```json title="config.json" - "models": [ - { - "title": "Grok-2", - "provider": "xAI", - "model": "grok-2-latest", - "apiKey": "" - } - ] -``` + + + ```yaml title="Package or config.yaml" + models: + - name: Grok-2 + provider: xAI + model: grok-2-latest + apiKey: + ``` + + + ```json title="config.json" + { + "models": [ + { + "title": "Grok-2", + "provider": "xAI", + "model": "grok-2-latest", + "apiKey": "" + } + ] + } + ``` + + ### Gemini 1.5 Pro from Google @@ -189,24 +216,26 @@ If you prefer to use a model from [Google](../customize/model-providers/top-leve ```yaml title="Package or config.yaml" - models: - - name: Gemini 1.5 Pro - provider: gemini - model: gemini-1.5-pro-latest - apiKey: + models: + - name: Gemini 1.5 Pro + provider: gemini + model: gemini-1.5-pro-latest + apiKey: ``` - ```json title="config.json" - "models": [ - { - "title": "Gemini 1.5 Pro", - "provider": "gemini", - "model": "gemini-1.5-pro-latest", - "apiKey": "" - } - ] - ``` + ```json title="config.json" + { + "models": [ + { + "title": "Gemini 1.5 Pro", + "provider": "gemini", + "model": "gemini-1.5-pro-latest", + "apiKey": "" + } + ] + } + ``` @@ -221,48 +250,52 @@ If your local machine can run an 8B parameter model, then we recommend running L - - ```yaml title="Package or config.yaml" - models: - - name: Llama 3.1 8B - provider: ollama - model: llama3.1:8b - ``` - - - ```yaml title="Package or config.yaml" - models: - - name: Llama 3.1 8B - provider: lmstudio - model: llama3.1:8b - ``` - + + ```yaml title="Package or config.yaml" + models: + - name: Llama 3.1 8B + provider: ollama + model: llama3.1:8b + ``` + + + ```yaml title="Package or config.yaml" + models: + - name: Llama 3.1 8B + provider: lmstudio + model: llama3.1:8b + ``` + - - ```json title="config.json" - "models": [ - { - "title": "Llama 3.1 8B", - "provider": "ollama", - "model": "llama3.1:8b" - } - ] - ``` - - - ```json title="config.json" - "models": [ - { - "title": "Llama 3.1 8B", - "provider": "lmstudio", - "model": "llama3.1-8b" - } - ] - ``` - + + ```json title="config.json" + { + "models": [ + { + "title": "Llama 3.1 8B", + "provider": "ollama", + "model": "llama3.1:8b" + } + ] + } + ``` + + + ```json title="config.json" + { + "models": [ + { + "title": "Llama 3.1 8B", + "provider": "lmstudio", + "model": "llama3.1-8b" + } + ] + } + ``` + @@ -294,29 +327,33 @@ If your local machine can run a 16B parameter model, then we recommend running D - - ```json title="config.json" - "models": [ - { - "title": "DeepSeek Coder 2 16B", - "provider": "ollama", - "model": "deepseek-coder-v2:16b", - "apiBase": "http://localhost:11434" - } - ] - ``` - - - ```json title="config.json" - "models": [ - { - "title": "DeepSeek Coder 2 16B", - "provider": "lmstudio", - "model": "deepseek-coder-v2:16b" - } - ] - ``` - + + ```json title="config.json" + { + "models": [ + { + "title": "DeepSeek Coder 2 16B", + "provider": "ollama", + "model": "deepseek-coder-v2:16b", + "apiBase": "http://localhost:11434" + } + ] + } + ``` + + + ```json title="config.json" + { + "models": [ + { + "title": "DeepSeek Coder 2 16B", + "provider": "lmstudio", + "model": "deepseek-coder-v2:16b" + } + ] + } + ``` + diff --git a/docs/docs/customize/context-providers.mdx b/docs/docs/customize/context-providers.mdx index 08a8de84c..fe64a473f 100644 --- a/docs/docs/customize/context-providers.mdx +++ b/docs/docs/customize/context-providers.mdx @@ -30,11 +30,13 @@ Reference any file in your current workspace. ```json title="config.json" + { "contextProviders": [ { "name": "file" } ] + } ``` @@ -52,11 +54,13 @@ Reference specific functions or classes from throughout your project. ```json title="config.json" + { "contextProviders": [ { "name": "code" } ] + } ``` @@ -74,11 +78,13 @@ Reference all of the changes you've made to your current branch. This is useful ```json title="config.json" + { "contextProviders": [ { "name": "diff" } ] + } ``` @@ -96,11 +102,13 @@ Reference the currently open file. ```json title="config.json" + { "contextProviders": [ { "name": "currentFile" } ] + } ``` @@ -118,11 +126,13 @@ Reference the last command you ran in your IDE's terminal and its output. ```json title="config.json" + { "contextProviders": [ { "name": "terminal" } ] + } ``` @@ -140,11 +150,13 @@ Reference the contents from any documentation site. ```json title="config.json" + { "contextProviders": [ { "name": "docs" } ] + } ``` @@ -168,6 +180,7 @@ Reference the contents of all of your open files. Set `onlyPinned` to `true` to ```json title="config.json" + { "contextProviders": [ { "name": "open", @@ -176,6 +189,7 @@ Reference the contents of all of your open files. Set `onlyPinned` to `true` to } } ] + } ``` @@ -197,6 +211,7 @@ Optionally, set `n` to limit the number of results returned (default 6). ```json title="config.json" + { "contextProviders": [ { "name": "web", @@ -205,6 +220,7 @@ Optionally, set `n` to limit the number of results returned (default 6). } } ] + } ``` @@ -222,11 +238,13 @@ Reference the most relevant snippets from your codebase. ```json title="config.json" + { "contextProviders": [ { "name": "codebase" } ] + } ``` @@ -246,11 +264,13 @@ Uses the same retrieval mechanism as `@Codebase`, but only on a single folder. ```json title="config.json" + { "contextProviders": [ { "name": "folder" } ] + } ``` @@ -268,11 +288,13 @@ Reference the results of codebase search, just like the results you would get fr ```json title="config.json" + { "contextProviders": [ { "name": "search" } ] + } ``` @@ -292,11 +314,13 @@ Reference the markdown converted contents of a given URL. ```json title="config.json" + { "contextProviders": [ { "name": "url" } ] + } ``` @@ -314,11 +338,13 @@ Reference recent clipboard items ```json title="config.json" + { "contextProviders": [ { "name": "clipboard" } ] + } ``` @@ -336,11 +362,13 @@ Reference the structure of your current workspace. ```json title="config.json" + { "contextProviders": [ { "name": "tree" } ] + } ``` @@ -358,11 +386,13 @@ Get Problems from the current file. ```json title="config.json" + { "contextProviders": [ { "name": "problems" } ] + } ``` @@ -382,6 +412,7 @@ Reference the contents of the local variables in the debugger. Currently only av ```json title="config.json" + { "contextProviders": [ { "name": "debugger", @@ -390,6 +421,7 @@ Reference the contents of the local variables in the debugger. Currently only av } } ] + } ``` @@ -413,6 +445,7 @@ Reference the outline of your codebase. By default, signatures are included alon ```json title="config.json" + { "contextProviders": [ { "name": "repo-map", @@ -421,6 +454,7 @@ Reference the outline of your codebase. By default, signatures are included alon } } ] + } ``` @@ -444,11 +478,13 @@ Reference the architecture and platform of your current operating system. ```json title="config.json" + { "contextProviders": [ { "name": "os" } ] + } ``` @@ -461,16 +497,17 @@ The [Model Context Protocol](https://modelcontextprotocol.io/introduction) is a ```yaml title="Package or config.yaml" mcpServers: - - name: My MCP Server - command: uvx - args: - - mcp-server-sqlite - - --db-path - - /Users/NAME/test.db + - name: My MCP Server + command: uvx + args: + - mcp-server-sqlite + - --db-path + - /Users/NAME/test.db ``` ```json title="config.json" + { "experimental": { "modelContextProtocolServers": [ { @@ -482,6 +519,7 @@ The [Model Context Protocol](https://modelcontextprotocol.io/introduction) is a } ] } + } ``` @@ -510,6 +548,7 @@ Reference the conversation in a GitHub issue. ```json title="config.json" + { "contextProviders": [ { "name": "issue", @@ -524,6 +563,7 @@ Reference the conversation in a GitHub issue. } } ] + } ``` @@ -564,6 +604,7 @@ Reference table schemas from Sqlite, Postgres, MSSQL, and MySQL databases. ```json title="config.json" + { "contextProviders": [ { "name": "database", @@ -601,6 +642,7 @@ Reference table schemas from Sqlite, Postgres, MSSQL, and MySQL databases. } } ] + } ``` @@ -634,6 +676,7 @@ Reference the schema of a table, and some sample rows ```json title="config.json" + { "contextProviders": [ { "name": "postgres", @@ -648,6 +691,7 @@ Reference the schema of a table, and some sample rows } } ] + } ``` @@ -673,6 +717,7 @@ Reference the results of a Google search. ```json title="config.json" + { "contextProviders": [ { "name": "google", @@ -681,6 +726,7 @@ Reference the results of a Google search. } } ] + } ``` @@ -704,6 +750,7 @@ Reference an open MR for this branch on GitLab. ```json title="config.json" + { "contextProviders": [ { "name": "gitlab-mr", @@ -712,6 +759,7 @@ Reference an open MR for this branch on GitLab. } } ] + } ``` @@ -734,6 +782,7 @@ You can specify the domain to communicate with by setting the `domain` parameter ```json title="config.json" + { "contextProviders": [ { "name": "gitlab-mr", @@ -743,6 +792,7 @@ You can specify the domain to communicate with by setting the `domain` parameter } } ] + } ``` @@ -767,6 +817,7 @@ Reference the conversation in a Jira issue. ```json title="config.json" + { "contextProviders": [ { "name": "jira", @@ -776,6 +827,7 @@ Reference the conversation in a Jira issue. } } ] + } ``` @@ -799,6 +851,7 @@ to set the API Version to 2 using the `apiVersion` property. ```json title="config.json" + { "contextProviders": [ { "name": "jira", @@ -807,6 +860,7 @@ to set the API Version to 2 using the `apiVersion` property. } } ] + } ``` @@ -842,6 +896,7 @@ Reference the messages in a Discord channel. ```json title="config.json" + { "contextProviders": [ { "name": "discord", @@ -861,6 +916,7 @@ Reference the messages in a Discord channel. } } ] + } ``` @@ -882,6 +938,7 @@ The HttpContextProvider makes a POST request to the url passed in the configurat ```json title="config.json" + { "contextProviders": [ { "name": "http", @@ -890,6 +947,7 @@ The HttpContextProvider makes a POST request to the url passed in the configurat } } ] + } ``` @@ -938,6 +996,7 @@ Reference specific git commit metadata and diff or all of the recent commits. ```json title="config.json" + { "contextProviders": [ { "name": "commit", @@ -947,6 +1006,7 @@ Reference specific git commit metadata and diff or all of the recent commits. } } ] + } ``` @@ -970,6 +1030,7 @@ Query a [Greptile](https://www.greptile.com/) index of the current repo/branch. ```json title="config.json" + { "contextProviders": [ { "name": "greptile", @@ -979,6 +1040,7 @@ Query a [Greptile](https://www.greptile.com/) index of the current repo/branch. } } ] + } ``` diff --git a/docs/docs/customize/deep-dives/autocomplete.mdx b/docs/docs/customize/deep-dives/autocomplete.mdx index 3812cd97e..6713e4653 100644 --- a/docs/docs/customize/deep-dives/autocomplete.mdx +++ b/docs/docs/customize/deep-dives/autocomplete.mdx @@ -64,12 +64,14 @@ All of the configuration options available for chat models are available to use ```json title="config.json" + { "tabAutocompleteModel": { "title": "Tab Autocomplete Model", "provider": "ollama", "model": "qwen2.5-coder:1.5b-base", "apiBase": "https://" } + } ``` diff --git a/docs/docs/customize/deep-dives/codebase.mdx b/docs/docs/customize/deep-dives/codebase.mdx index 44987f8f1..acf19c4fc 100644 --- a/docs/docs/customize/deep-dives/codebase.mdx +++ b/docs/docs/customize/deep-dives/codebase.mdx @@ -56,6 +56,7 @@ There are a few options that let you configure the behavior of the `@codebase` c ```json title="config.json" + { "contextProviders": [ { "name": "codebase", @@ -66,6 +67,7 @@ There are a few options that let you configure the behavior of the `@codebase` c } } ] + } ``` diff --git a/docs/docs/customize/deep-dives/docs.mdx b/docs/docs/customize/deep-dives/docs.mdx index ffa16eb83..e48bac259 100644 --- a/docs/docs/customize/deep-dives/docs.mdx +++ b/docs/docs/customize/deep-dives/docs.mdx @@ -259,6 +259,7 @@ The following configuration example works out of the box for VS Code. This uses ```json title="config.json" + { "contextProviders": [ { "name": "docs", @@ -269,7 +270,8 @@ The following configuration example works out of the box for VS Code. This uses "title": "Nest.js", "startUrl": "https://docs.nestjs.com/", }, - ], + ] + } ``` @@ -296,6 +298,7 @@ Here is the equivalent minimal example for Jetbrains, which requires setting up ```json title="config.json" + { "contextProviders": [ { "name": "docs", @@ -310,7 +313,8 @@ Here is the equivalent minimal example for Jetbrains, which requires setting up "embeddingsProvider": { "provider": "lmstudio", "model": "nomic-ai/nomic-embed-text-v1.5-GGUF" - }, + } + } ``` diff --git a/docs/docs/customize/model-providers/more/SambaNova.mdx b/docs/docs/customize/model-providers/more/SambaNova.mdx index e45042a3c..86c2e9e0b 100644 --- a/docs/docs/customize/model-providers/more/SambaNova.mdx +++ b/docs/docs/customize/model-providers/more/SambaNova.mdx @@ -17,6 +17,7 @@ The SambaNova Cloud is a cloud platform for running large AI models with the wor ```json title="config.json" + { "models": [ { "title": "SambaNova Llama 3.1 405B", @@ -25,6 +26,7 @@ The SambaNova Cloud is a cloud platform for running large AI models with the wor "apiKey": "" } ] + } ``` diff --git a/docs/docs/customize/model-providers/more/asksage.mdx b/docs/docs/customize/model-providers/more/asksage.mdx index 9403d652c..f6966a517 100644 --- a/docs/docs/customize/model-providers/more/asksage.mdx +++ b/docs/docs/customize/model-providers/more/asksage.mdx @@ -15,24 +15,26 @@ To use the Ask Sage models, you can use the following ```yaml title="Package or config.yaml" models: - - name: GPT-4 gov - provider: askSage - apiKey: - apiBase: https://api.asksage.ai/server/ - model: gpt4-gov + - name: GPT-4 gov + provider: askSage + model: gpt4-gov + apiBase: https://api.asksage.ai/server/ + apiKey: ``` ```json title="config.json" - "models": [ - { - "title": "GPT-4 gov", - "provider": "askSage", - "model": "gpt4-gov", - "apiBase": "https://api.asksage.ai/server/", - "apiKey": "" - } - ] + { + "models": [ + { + "title": "GPT-4 gov", + "provider": "askSage", + "model": "gpt4-gov", + "apiBase": "https://api.asksage.ai/server/", + "apiKey": "" + } + ] + } ``` diff --git a/docs/docs/customize/model-providers/more/cerebras.mdx b/docs/docs/customize/model-providers/more/cerebras.mdx index eec853734..a0ffabc8b 100644 --- a/docs/docs/customize/model-providers/more/cerebras.mdx +++ b/docs/docs/customize/model-providers/more/cerebras.mdx @@ -21,6 +21,7 @@ Cerebras Inference uses specialized silicon to provides fast inference. ```json title="config.json" + { "models": [ { "title": "Cerebras Llama 3.1 70B", @@ -29,6 +30,7 @@ Cerebras Inference uses specialized silicon to provides fast inference. "apiKey": "" } ] + } ``` diff --git a/docs/docs/customize/model-providers/more/cloudflare.mdx b/docs/docs/customize/model-providers/more/cloudflare.mdx index d6a3b428d..fa95f4930 100644 --- a/docs/docs/customize/model-providers/more/cloudflare.mdx +++ b/docs/docs/customize/model-providers/more/cloudflare.mdx @@ -40,6 +40,7 @@ Cloudflare Workers AI can be used for both chat and tab autocompletion in Contin ```json title="config.json" + { "models": [ { "title": "Llama 3 8B", @@ -71,6 +72,7 @@ Cloudflare Workers AI can be used for both chat and tab autocompletion in Contin "apiKey": "YOUR CLOUDFLARE API KEY", "model": "@hf/thebloke/deepseek-coder-6.7b-base-awq" } + } ``` diff --git a/docs/docs/customize/model-providers/more/cohere.mdx b/docs/docs/customize/model-providers/more/cohere.mdx index 3aa7b78fe..dd7de0321 100644 --- a/docs/docs/customize/model-providers/more/cohere.mdx +++ b/docs/docs/customize/model-providers/more/cohere.mdx @@ -21,6 +21,7 @@ We recommend configuring **Command-R Plus** as your chat model. ```json title="config.json" + { "models": [ { "title": "Cohere", @@ -29,6 +30,7 @@ We recommend configuring **Command-R Plus** as your chat model. "apiKey": "" } ] + } ``` @@ -57,11 +59,13 @@ We recommend configuring **embed-english-v3.0** as your embeddings model. ```json title="config.json" + { "embeddingsProvider": { "provider": "cohere", "model": "embed-english-v3.0", "apiKey": "" } + } ``` @@ -84,6 +88,7 @@ We recommend configuring **rerank-english-v3.0** as your reranking model. ```json title="config.json" + { "reranker": { "name": "cohere", "params": { @@ -91,6 +96,7 @@ We recommend configuring **rerank-english-v3.0** as your reranking model. "apiKey": "" } } + } ``` diff --git a/docs/docs/customize/model-providers/more/deepinfra.mdx b/docs/docs/customize/model-providers/more/deepinfra.mdx index 61e2fcdab..de3e09e23 100644 --- a/docs/docs/customize/model-providers/more/deepinfra.mdx +++ b/docs/docs/customize/model-providers/more/deepinfra.mdx @@ -17,6 +17,7 @@ import TabItem from "@theme/TabItem"; ```json title="config.json" + { "models": [ { "provider": "deepinfra", @@ -25,6 +26,7 @@ import TabItem from "@theme/TabItem"; "apiKey": "" } ] + } ``` diff --git a/docs/docs/customize/model-providers/more/flowise.mdx b/docs/docs/customize/model-providers/more/flowise.mdx index 68fb45f3f..546e6a716 100644 --- a/docs/docs/customize/model-providers/more/flowise.mdx +++ b/docs/docs/customize/model-providers/more/flowise.mdx @@ -17,6 +17,7 @@ import TabItem from "@theme/TabItem"; ```json title="config.json" + { "models": [ { "provider": "flowise", @@ -25,6 +26,7 @@ import TabItem from "@theme/TabItem"; "apiBase": "" } ] + } ``` diff --git a/docs/docs/customize/model-providers/more/function-network.mdx b/docs/docs/customize/model-providers/more/function-network.mdx index 0534fdd8b..d734fde08 100644 --- a/docs/docs/customize/model-providers/more/function-network.mdx +++ b/docs/docs/customize/model-providers/more/function-network.mdx @@ -22,18 +22,19 @@ Function Network supports a number of models for chat. We recommend using LLama - ```yaml title="Package or config.yaml" - models: - - name: Llama 3.1 70b - provider: function-network - model: meta/llama-3.1-70b-instruct - apiKey: - roles: - - chat - ``` + ```yaml title="Package or config.yaml" + models: + - name: Llama 3.1 70b + provider: function-network + model: meta/llama-3.1-70b-instruct + apiKey: + roles: + - chat + ``` - ```json title="config.json" + ```json title="config.json" + { "models": [ { "title": "Llama 3.1 70b", @@ -42,7 +43,8 @@ Function Network supports a number of models for chat. We recommend using LLama "apiKey": "" } ] - ``` + } + ``` @@ -66,12 +68,14 @@ Function Network supports a number of models for autocomplete. We recommend usin ```json title="config.json" + { "tabAutocompleteModel": { "title": "Deepseek Coder 6.7b", "provider": "function-network", "model": "thebloke/deepseek-coder-6.7b-base-awq", "apiKey": "" } + } ``` @@ -94,11 +98,13 @@ Function Network supports a number of models for embeddings. We recommend using ```json title="config.json" + { "embeddingsProvider": { "provider": "function-network", "model": "baai/bge-base-en-v1.5", "apiKey": "" } + } ``` diff --git a/docs/docs/customize/model-providers/more/groq.mdx b/docs/docs/customize/model-providers/more/groq.mdx index 1f637df99..45cfd0a8a 100644 --- a/docs/docs/customize/model-providers/more/groq.mdx +++ b/docs/docs/customize/model-providers/more/groq.mdx @@ -14,18 +14,19 @@ Groq provides the fastest available inference for open-source language models, i - ```yaml title="Package or config.yaml" - models: - - name: Llama 3.3 70b Versatile - provider: groq - model: llama-3.3-70b-versatile - apiKey: - roles: - - chat - ``` + ```yaml title="Package or config.yaml" + models: + - name: Llama 3.3 70b Versatile + provider: groq + model: llama-3.3-70b-versatile + apiKey: + roles: + - chat + ``` - ```json title="config.json" + ```json title="config.json" + { "models": [ { "title": "Llama 3.3 70b Versatile", @@ -34,6 +35,7 @@ Groq provides the fastest available inference for open-source language models, i "apiKey": "" } ] - ``` + } + ``` diff --git a/docs/docs/customize/model-providers/more/huggingfaceinferenceapi.mdx b/docs/docs/customize/model-providers/more/huggingfaceinferenceapi.mdx index 8a3a4235f..91f37051a 100644 --- a/docs/docs/customize/model-providers/more/huggingfaceinferenceapi.mdx +++ b/docs/docs/customize/model-providers/more/huggingfaceinferenceapi.mdx @@ -6,29 +6,31 @@ import TabItem from "@theme/TabItem"; Hugging Face Inference Endpoints are an easy way to setup instances of open-source language models on any cloud. Sign up for an account and add billing [here](https://huggingface.co/settings/billing), access the Inference Endpoints [here](https://ui.endpoints.huggingface.co), click on “New endpoint”, and fill out the form (e.g. select a model like [WizardCoder-Python-34B-V1.0](https://huggingface.co/WizardLM/WizardCoder-Python-34B-V1.0)), and then deploy your model by clicking “Create Endpoint”. Change `~/.continue/config.json` to look like this: - - ```yaml title="config.yaml" - models: - - name: Hugging Face Inference API - provider: huggingface-inference-api - model: MODEL_NAME - apiKey: - apiBase: - ``` - - - ```json title="config.json" - "models": [ - { - "title": "Hugging Face Inference API", - "provider": "huggingface-inference-api", - "model": "MODEL_NAME", - "apiKey": "", - "apiBase": "" - } - ] - ``` - + + ```yaml title="config.yaml" + models: + - name: Hugging Face Inference API + provider: huggingface-inference-api + model: MODEL_NAME + apiKey: + apiBase: + ``` + + + ```json title="config.json" + { + "models": [ + { + "title": "Hugging Face Inference API", + "provider": "huggingface-inference-api", + "model": "MODEL_NAME", + "apiKey": "", + "apiBase": "" + } + ] + } + ``` + [View the source](https://github.com/continuedev/continue/blob/main/core/llm/llms/HuggingFaceInferenceAPI.ts) diff --git a/docs/docs/customize/model-providers/more/ipex_llm.mdx b/docs/docs/customize/model-providers/more/ipex_llm.mdx index fbdd0cb8b..02d20f89b 100644 --- a/docs/docs/customize/model-providers/more/ipex_llm.mdx +++ b/docs/docs/customize/model-providers/more/ipex_llm.mdx @@ -20,6 +20,7 @@ IPEX-LLM supports accelerated Ollama backend to be hosted on Intel GPU. Refer to ```json title="config.json" + { "models": [ { "title": "IPEX-LLM", @@ -27,6 +28,7 @@ IPEX-LLM supports accelerated Ollama backend to be hosted on Intel GPU. Refer to "model": "AUTODETECT" } ] + } ``` @@ -45,6 +47,7 @@ If you would like to reach the Ollama service from another machine, make sure yo ```json title="config.json" + { "models": [ { "title": "IPEX-LLM", @@ -53,6 +56,7 @@ If you would like to reach the Ollama service from another machine, make sure yo "apiBase": "http://your-ollama-service-ip:11434" } ] + } ``` diff --git a/docs/docs/customize/model-providers/more/kindo.mdx b/docs/docs/customize/model-providers/more/kindo.mdx index 4b4b8a679..e788b7e39 100644 --- a/docs/docs/customize/model-providers/more/kindo.mdx +++ b/docs/docs/customize/model-providers/more/kindo.mdx @@ -19,6 +19,7 @@ Kindo offers centralized control over your organization's AI operations, ensurin ```json title="config.json" + { "models": [ { "title": "Claude 3.5 Sonnet", @@ -27,6 +28,7 @@ Kindo offers centralized control over your organization's AI operations, ensurin "apiKey": "" } ] + } ``` @@ -35,28 +37,30 @@ Kindo offers centralized control over your organization's AI operations, ensurin - ```yaml title="Package or config.yaml" - models: - - name: WhiteRabbitNeo - provider: kindo - model: /models/WhiteRabbitNeo-33B-DeepSeekCoder - apiKey: - roles: - - autocomplete - ``` + ```yaml title="Package or config.yaml" + models: + - name: WhiteRabbitNeo + provider: kindo + model: /models/WhiteRabbitNeo-33B-DeepSeekCoder + apiKey: + roles: + - autocomplete + ``` - ```json title="config.json" - "tabAutocompleteModel": [ - { - "title": "WhiteRabbitNeo", - "provider": "kindo", - "model": "/models/WhiteRabbitNeo-33B-DeepSeekCoder", - "apiKey": "", - "template": "none" - } - ] - ``` + ```json title="config.json" + { + "tabAutocompleteModel": [ + { + "title": "WhiteRabbitNeo", + "provider": "kindo", + "model": "/models/WhiteRabbitNeo-33B-DeepSeekCoder", + "apiKey": "", + "template": "none" + } + ] + } + ``` diff --git a/docs/docs/customize/model-providers/more/llamacpp.mdx b/docs/docs/customize/model-providers/more/llamacpp.mdx index c5449b0cd..291ed0a5a 100644 --- a/docs/docs/customize/model-providers/more/llamacpp.mdx +++ b/docs/docs/customize/model-providers/more/llamacpp.mdx @@ -23,6 +23,7 @@ After it's up and running, change `~/.continue/config.json` to look like this: ```json title="config.json" + { "models": [ { "title": "Llama CPP", @@ -31,6 +32,7 @@ After it's up and running, change `~/.continue/config.json` to look like this: "apiBase": "http://localhost:8080" } ] + } ``` diff --git a/docs/docs/customize/model-providers/more/llamafile.mdx b/docs/docs/customize/model-providers/more/llamafile.mdx index 90b43151a..e674d2f83 100644 --- a/docs/docs/customize/model-providers/more/llamafile.mdx +++ b/docs/docs/customize/model-providers/more/llamafile.mdx @@ -7,15 +7,16 @@ A [llamafile](https://github.com/Mozilla-Ocho/llamafile#readme) is a self-contai - ```yaml title="config.yaml" - models: - - name: Llamafile - provider: llamafile - model: mistral-7b - ``` + ```yaml title="config.yaml" + models: + - name: Llamafile + provider: llamafile + model: mistral-7b + ``` - ```json title="config.json" + ```json title="config.json" + { "models": [ { "title": "Llamafile", @@ -23,7 +24,8 @@ A [llamafile](https://github.com/Mozilla-Ocho/llamafile#readme) is a self-contai "model": "mistral-7b" } ] - ``` + } + ``` diff --git a/docs/docs/customize/model-providers/more/lmstudio.mdx b/docs/docs/customize/model-providers/more/lmstudio.mdx index 0c27a7fe3..784c321cc 100644 --- a/docs/docs/customize/model-providers/more/lmstudio.mdx +++ b/docs/docs/customize/model-providers/more/lmstudio.mdx @@ -16,6 +16,7 @@ import TabItem from "@theme/TabItem"; ```json title="config.json" + { "models": [ { "title": "LM Studio", @@ -23,6 +24,7 @@ import TabItem from "@theme/TabItem"; "model": "llama2-7b" } ] + } ``` @@ -44,10 +46,12 @@ LMStudio supports embeddings endpoints, and comes with the `nomic-ai/nomic-embed ```json title="config.json" + { "embeddingsProvider": { "provider": "lmstudio", "model": "nomic-ai/nomic-embed-text-v1.5-GGUF" } + } ``` @@ -69,10 +73,12 @@ To configure a remote instance of LM Studio, add the `"apiBase"` property to you ```json title="config.json" + { "embeddingsProvider": { "provider": "lmstudio", "model": "nomic-ai/nomic-embed-text-v1.5-GGUF" } + } ``` diff --git a/docs/docs/customize/model-providers/more/moonshot.mdx b/docs/docs/customize/model-providers/more/moonshot.mdx index 3113e2c77..9fc429f6d 100644 --- a/docs/docs/customize/model-providers/more/moonshot.mdx +++ b/docs/docs/customize/model-providers/more/moonshot.mdx @@ -14,16 +14,17 @@ To use Moonshot AI models, you need to: - ```yaml title="Package or config.yaml" - models: - - name: Moonshot - provider: moonshot - model: moonshot-v1-8k - apiKey: - ``` + ```yaml title="Package or config.yaml" + models: + - name: Moonshot + provider: moonshot + model: moonshot-v1-8k + apiKey: + ``` - ```json title="config.json" + ```json title="config.json" + { "models": [ { "title": "Moonshot", @@ -32,7 +33,8 @@ To use Moonshot AI models, you need to: "apiKey": "" } ] - ``` + } + ``` @@ -72,6 +74,7 @@ Here's a complete configuration example: ```json title="config.json" + { "models": [ { "title": "Moonshot-8K", @@ -85,6 +88,7 @@ Here's a complete configuration example: } } ] + } ``` diff --git a/docs/docs/customize/model-providers/more/msty.mdx b/docs/docs/customize/model-providers/more/msty.mdx index e8532d0a2..e08d2ffff 100644 --- a/docs/docs/customize/model-providers/more/msty.mdx +++ b/docs/docs/customize/model-providers/more/msty.mdx @@ -16,6 +16,7 @@ import TabItem from "@theme/TabItem"; ```json title="config.json" + { "models": [ { "title": "Msty", @@ -23,6 +24,7 @@ import TabItem from "@theme/TabItem"; "model": "deepseek-coder:6.7b", } ] + } ``` @@ -56,6 +58,7 @@ If you need to send custom headers for authentication, you may use the `requestO ```json title="config.json" + { "models": [ { "title": "Msty", @@ -68,6 +71,7 @@ If you need to send custom headers for authentication, you may use the `requestO } } ] + } ``` diff --git a/docs/docs/customize/model-providers/more/nebius.mdx b/docs/docs/customize/model-providers/more/nebius.mdx index 87748b605..72af4334d 100644 --- a/docs/docs/customize/model-providers/more/nebius.mdx +++ b/docs/docs/customize/model-providers/more/nebius.mdx @@ -23,6 +23,7 @@ Available models can be found on the [Nebius AI Studio models page](https://stud ```json title="config.json" + { "models": [ { "title": "Llama 3.1 405b", @@ -31,6 +32,7 @@ Available models can be found on the [Nebius AI Studio models page](https://stud "apiKey": "" } ] + } ``` @@ -53,11 +55,13 @@ Available models can be found on the [Nebius AI Studio embeddings page](https:// ```json title="config.json" + { "embeddingsProvider": { "provider": "nebius", "model": "BAAI/bge-en-icl", "apiKey": "" } + } ``` diff --git a/docs/docs/customize/model-providers/more/novita.mdx b/docs/docs/customize/model-providers/more/novita.mdx index b9f647955..bf6e99421 100644 --- a/docs/docs/customize/model-providers/more/novita.mdx +++ b/docs/docs/customize/model-providers/more/novita.mdx @@ -17,6 +17,7 @@ import TabItem from "@theme/TabItem"; ```json title="config.json" + { "models": [ { "title": "Llama 3.1 8B", @@ -25,6 +26,7 @@ import TabItem from "@theme/TabItem"; "apiKey": "" } ] + } ``` diff --git a/docs/docs/customize/model-providers/more/nvidia.mdx b/docs/docs/customize/model-providers/more/nvidia.mdx index dcceaf31d..bc395cf0d 100644 --- a/docs/docs/customize/model-providers/more/nvidia.mdx +++ b/docs/docs/customize/model-providers/more/nvidia.mdx @@ -25,6 +25,7 @@ We recommend configuring **Nemotron-4-340B-Instruct** as your chat model. ```json title="config.json" + { "models": [ { "title": "Nemotron-4-340B-Instruct", @@ -33,6 +34,7 @@ We recommend configuring **Nemotron-4-340B-Instruct** as your chat model. "apiKey": "" } ] + } ``` @@ -61,11 +63,13 @@ We recommend configuring **NVIDIA Retrieval QA Mistral 7B** as your embeddings m ```json title="config.json" + { "embeddingsProvider": { "provider": "nvidia", "model": "nvidia/nv-embedqa-mistral-7b-v2", "apiKey": "" } + } ``` diff --git a/docs/docs/customize/model-providers/more/openrouter.mdx b/docs/docs/customize/model-providers/more/openrouter.mdx index 3f3305aa0..637366d6e 100644 --- a/docs/docs/customize/model-providers/more/openrouter.mdx +++ b/docs/docs/customize/model-providers/more/openrouter.mdx @@ -9,27 +9,29 @@ Change `~/.continue/config.json` to look like the following. - ```yaml title="Package or config.yaml" - models: - - name: OpenRouter LLaMA 70 8B - provider: openrouter - model: meta-llama/llama-3-70b-instruct - apiBase: https://openrouter.ai/api/v1 - apiKey: - ``` + ```yaml title="Package or config.yaml" + models: + - name: OpenRouter LLaMA 70 8B + provider: openrouter + model: meta-llama/llama-3-70b-instruct + apiBase: https://openrouter.ai/api/v1 + apiKey: + ``` - ```json title="config.json" - "models": [ - { - "title": "OpenRouter LLaMA 70 8B", - "provider": "openrouter", - "model": "meta-llama/llama-3-70b-instruct", - "apiBase": "https://openrouter.ai/api/v1", - "apiKey": "" - } - ] - ``` + ```json title="config.json" + { + "models": [ + { + "title": "OpenRouter LLaMA 70 8B", + "provider": "openrouter", + "model": "meta-llama/llama-3-70b-instruct", + "apiBase": "https://openrouter.ai/api/v1", + "apiKey": "" + } + ] + } + ``` @@ -39,31 +41,33 @@ For example, to prevent extra long prompts from being compressed, you can explic - ```yaml title="Package or config.yaml" - models: - - name: Example Model - provider: exampleProvider - model: example-model - requestOptions: - extraBodyProperties: - transforms: [] - ``` + ```yaml title="Package or config.yaml" + models: + - name: Example Model + provider: exampleProvider + model: example-model + requestOptions: + extraBodyProperties: + transforms: [] + ``` - ```json title="config.json" - "models": [ - { - "title": "Example Model", - "provider": "exampleProvider", - "model": "example-model", - "requestOptions": { - "extraBodyProperties": { - "transforms": [] - } + ```json title="config.json" + { + "models": [ + { + "title": "Example Model", + "provider": "exampleProvider", + "model": "example-model", + "requestOptions": { + "extraBodyProperties": { + "transforms": [] } } - ] - ``` + } + ] + } + ``` diff --git a/docs/docs/customize/model-providers/more/replicatellm.mdx b/docs/docs/customize/model-providers/more/replicatellm.mdx index 42993d683..958fc347a 100644 --- a/docs/docs/customize/model-providers/more/replicatellm.mdx +++ b/docs/docs/customize/model-providers/more/replicatellm.mdx @@ -17,6 +17,7 @@ Replicate is a great option for newly released language models or models that yo ```json title="config.json" + { "models": [ { "title": "Replicate CodeLLama", @@ -25,6 +26,7 @@ Replicate is a great option for newly released language models or models that yo "apiKey": "" } ] + } ``` diff --git a/docs/docs/customize/model-providers/more/sagemaker.mdx b/docs/docs/customize/model-providers/more/sagemaker.mdx index 78889f27a..33aa6e253 100644 --- a/docs/docs/customize/model-providers/more/sagemaker.mdx +++ b/docs/docs/customize/model-providers/more/sagemaker.mdx @@ -26,6 +26,7 @@ Here is an example Sagemaker configuration setup: ```json title="config.json" + { "models": [ { "title": "deepseek-6.7b-instruct", @@ -38,6 +39,7 @@ Here is an example Sagemaker configuration setup: "provider": "sagemaker", "model": "mxbai-embed-large-v1-endpoint" } + } ``` diff --git a/docs/docs/customize/model-providers/more/scaleway.mdx b/docs/docs/customize/model-providers/more/scaleway.mdx index 64f43eb04..462c362b5 100644 --- a/docs/docs/customize/model-providers/more/scaleway.mdx +++ b/docs/docs/customize/model-providers/more/scaleway.mdx @@ -28,14 +28,16 @@ We recommend configuring **Qwen2.5-Coder-32B-Instruct** as your chat model. ```json title="config.json" - "models": [ - { - "title": "Qwen2.5-Coder-32B-Instruct", - "provider": "scaleway", - "model": "qwen2.5-coder-32b-instruct", - "apiKey": "" - } - ] + { + "models": [ + { + "title": "Qwen2.5-Coder-32B-Instruct", + "provider": "scaleway", + "model": "qwen2.5-coder-32b-instruct", + "apiKey": "" + } + ] + } ``` @@ -64,11 +66,13 @@ We recommend configuring **BGE-Multilingual-Gemma2** as your embeddings model. ```json title="config.json" + { "embeddingsProvider": { "provider": "scaleway", "model": "bge-multilingual-gemma2", "apiKey": "" } + } ``` diff --git a/docs/docs/customize/model-providers/more/siliconflow.mdx b/docs/docs/customize/model-providers/more/siliconflow.mdx index e1b185230..a496d3757 100644 --- a/docs/docs/customize/model-providers/more/siliconflow.mdx +++ b/docs/docs/customize/model-providers/more/siliconflow.mdx @@ -27,6 +27,7 @@ We recommend configuring **Qwen/Qwen2.5-Coder-32B-Instruct** as your chat model. ```json title="config.json" + { "models": [ { "title": "Qwen", @@ -35,6 +36,7 @@ We recommend configuring **Qwen/Qwen2.5-Coder-32B-Instruct** as your chat model. "apiKey": "" } ] + } ``` @@ -57,6 +59,7 @@ We recommend configuring **Qwen/Qwen2.5-Coder-7B-Instruct** as your autocomplete ```json title="config.json" + { "models": [ { "title": "Qwen", @@ -71,6 +74,7 @@ We recommend configuring **Qwen/Qwen2.5-Coder-7B-Instruct** as your autocomplete "model": "Qwen/Qwen2.5-Coder-7B-Instruct", "apiKey": "" } + } ``` diff --git a/docs/docs/customize/model-providers/more/textgenwebui.mdx b/docs/docs/customize/model-providers/more/textgenwebui.mdx index f5f977058..0bfcbb442 100644 --- a/docs/docs/customize/model-providers/more/textgenwebui.mdx +++ b/docs/docs/customize/model-providers/more/textgenwebui.mdx @@ -17,14 +17,16 @@ TextGenWebUI is a comprehensive, open-source language model UI and local server. ```json title="config.json" - "models": [ - { - "title": "Text Generation WebUI", - "provider": "text-gen-webui", - "apiBase": "http://localhost:5000/v1", - "model": "MODEL_NAME" - } - ] + { + "models": [ + { + "title": "Text Generation WebUI", + "provider": "text-gen-webui", + "apiBase": "http://localhost:5000/v1", + "model": "MODEL_NAME" + } + ] + } ``` diff --git a/docs/docs/customize/model-providers/more/together.mdx b/docs/docs/customize/model-providers/more/together.mdx index 1e8034a5e..8af923471 100644 --- a/docs/docs/customize/model-providers/more/together.mdx +++ b/docs/docs/customize/model-providers/more/together.mdx @@ -6,17 +6,18 @@ import TabItem from "@theme/TabItem"; The Together API is a cloud platform for running large AI models. You can sign up [here](https://api.together.xyz/signup), copy your API key on the initial welcome screen, and then hit the play button on any model from the [Together Models list](https://docs.together.ai/docs/serverless-models). Change `~/.continue/config.json` to look like this: - - ```yaml title="Package or config.yaml" - models: - - name: Together Qwen2.5 Coder - provider: together - model: Qwen/Qwen2.5-Coder-32B-Instruct - apiKey: - ``` - - - ```json title="config.json" + + ```yaml title="Package or config.yaml" + models: + - name: Together Qwen2.5 Coder + provider: together + model: Qwen/Qwen2.5-Coder-32B-Instruct + apiKey: + ``` + + + ```json title="config.json" + { "models": [ { "title": "Together Qwen2.5 Coder", @@ -25,8 +26,9 @@ The Together API is a cloud platform for running large AI models. You can sign u "apiKey": "" } ] - ``` - + } + ``` + [View the source](https://github.com/continuedev/continue/blob/main/core/llm/llms/Together.ts) diff --git a/docs/docs/customize/model-providers/more/vllm.mdx b/docs/docs/customize/model-providers/more/vllm.mdx index 9026e8044..1c49ef620 100644 --- a/docs/docs/customize/model-providers/more/vllm.mdx +++ b/docs/docs/customize/model-providers/more/vllm.mdx @@ -25,14 +25,16 @@ We recommend configuring **Llama3.1 8B** as your chat model. ```json title="config.json" - "models": [ + { + "models": [ { - "title": "Llama3.1 8B Instruct", - "provider": "vllm", - "model": "meta-llama/Meta-Llama-3.1-8B-Instruct", - "apiBase": "http:///v1" + "title": "Llama3.1 8B Instruct", + "provider": "vllm", + "model": "meta-llama/Meta-Llama-3.1-8B-Instruct", + "apiBase": "http:///v1" } ] + } ``` @@ -42,27 +44,29 @@ We recommend configuring **Llama3.1 8B** as your chat model. We recommend configuring **Qwen2.5-Coder 1.5B** as your autocomplete model. - - ```yaml title="Package or config.yaml" - models: - - name: Qwen2.5-Coder 1.5B - provider: vllm - model: Qwen/Qwen2.5-Coder-1.5B - apiBase: http:///v1 - roles: - - autocomplete - ``` - - - ```json title="config.json" - "tabAutocompleteModel": { - "title": "Qwen2.5-Coder 1.5B", - "provider": "vllm", - "model": "Qwen/Qwen2.5-Coder-1.5B", - "apiBase": "http:///v1" - } - ``` - + + ```yaml title="Package or config.yaml" + models: + - name: Qwen2.5-Coder 1.5B + provider: vllm + model: Qwen/Qwen2.5-Coder-1.5B + apiBase: http:///v1 + roles: + - autocomplete + ``` + + + ```json title="config.json" + { + "tabAutocompleteModel": { + "title": "Qwen2.5-Coder 1.5B", + "provider": "vllm", + "model": "Qwen/Qwen2.5-Coder-1.5B", + "apiBase": "http:///v1" + } + } + ``` + ## Embeddings model @@ -70,26 +74,28 @@ We recommend configuring **Qwen2.5-Coder 1.5B** as your autocomplete model. We recommend configuring **Nomic Embed Text** as your embeddings model. - - ```yaml title="Package or config.yaml" - models: - - name: VLLM Nomad Embed Text - provider: vllm - model: nomic-ai/nomic-embed-text-v1 - apiBase: http:///v1 - roles: - - embed - ``` - - - ```json title="config.json" - "embeddingsProvider": { - "provider": "vllm", - "model": "nomic-ai/nomic-embed-text-v1", - "apiBase": "http:///v1" - } - ``` - + + ```yaml title="Package or config.yaml" + models: + - name: VLLM Nomad Embed Text + provider: vllm + model: nomic-ai/nomic-embed-text-v1 + apiBase: http:///v1 + roles: + - embed + ``` + + + ```json title="config.json" + { + "embeddingsProvider": { + "provider": "vllm", + "model": "nomic-ai/nomic-embed-text-v1", + "apiBase": "http:///v1" + } + } + ``` + ## Reranking model diff --git a/docs/docs/customize/model-providers/more/watsonx.mdx b/docs/docs/customize/model-providers/more/watsonx.mdx index 0a50593c7..e18b3e285 100644 --- a/docs/docs/customize/model-providers/more/watsonx.mdx +++ b/docs/docs/customize/model-providers/more/watsonx.mdx @@ -45,19 +45,20 @@ Add the following configuration: - ```yaml title="Package or config.yaml" - models: - - name: watsonx - Model Name - provider: watsonx - model: model ID - apiBase: https://us-south.ml.cloud.ibm.com - projectId: PROJECT_ID - apiKey: API_KEY/ZENAPI_KEY/USERNAME:PASSWORD - apiVersion: 2024-03-14 - ``` + ```yaml title="Package or config.yaml" + models: + - name: watsonx - Model Name + provider: watsonx + model: model ID + apiBase: https://us-south.ml.cloud.ibm.com + projectId: PROJECT_ID + apiKey: API_KEY/ZENAPI_KEY/USERNAME:PASSWORD + apiVersion: 2024-03-14 + ``` - ```json title="config.json" + ```json title="config.json" + { "models": [ { "model": "model ID", @@ -69,7 +70,8 @@ Add the following configuration: "apiVersion": "2024-03-14" } ] - ``` + } + ``` @@ -92,17 +94,19 @@ If you are using a custom deployment endpoint, set `deploymentID` to the model's ```json title="config.json" - "models": [ - { - "model": "model ID", - "title": "watsonx - Model Name", - "provider": "watsonx", - "apiBase": "watsonx endpoint e.g. https://us-south.ml.cloud.ibm.com", - "apiKey": "API_KEY/ZENAPI_KEY/USERNAME:PASSWORD", - "apiVersion": "2024-03-14", - "deploymentId": "DEPLOYMENT_ID" - } - ] + { + "models": [ + { + "model": "model ID", + "title": "watsonx - Model Name", + "provider": "watsonx", + "apiBase": "watsonx endpoint e.g. https://us-south.ml.cloud.ibm.com", + "apiKey": "API_KEY/ZENAPI_KEY/USERNAME:PASSWORD", + "apiVersion": "2024-03-14", + "deploymentId": "DEPLOYMENT_ID" + } + ] + } ``` @@ -138,6 +142,7 @@ You can also configure generation parameters, such as temperature, topP, topK, f ```json title="config.json" + { "models": [ { "model": "ibm/granite-20b-code-instruct", @@ -159,6 +164,7 @@ You can also configure generation parameters, such as temperature, topP, topK, f } } ] + } ``` @@ -169,32 +175,34 @@ Granite models are recommended for tab auto complete. The configuration is simil - ```yaml title="Package or config.yaml" - models: - - name: Granite Code 8b - provider: watsonx - model: ibm/granite-8b-code-instruct - apiBase: watsonx endpoint e.g. https://us-south.ml.cloud.ibm.com - projectId: PROJECT_ID - apiKey: API_KEY/ZENAPI_KEY/USERNAME:PASSWORD - apiVersion: 2024-03-14 - roles: - - autocomplete - ``` + ```yaml title="Package or config.yaml" + models: + - name: Granite Code 8b + provider: watsonx + model: ibm/granite-8b-code-instruct + apiBase: watsonx endpoint e.g. https://us-south.ml.cloud.ibm.com + projectId: PROJECT_ID + apiKey: API_KEY/ZENAPI_KEY/USERNAME:PASSWORD + apiVersion: 2024-03-14 + roles: + - autocomplete + ``` - ```json title="config.json" - "tabAutocompleteModel": { - "model": "ibm/granite-8b-code-instruct", - "title": "Granite Code 8b", - "provider": "watsonx", - "apiBase": "watsonx endpoint e.g. https://us-south.ml.cloud.ibm.com", - "projectId": "PROJECT_ID", - "apiKey": "API_KEY/ZENAPI_KEY/USERNAME:PASSWORD", - "apiVersion": "2024-03-14", - "contextLength": 4000 - } - ``` + ```json title="config.json" + { + "tabAutocompleteModel": { + "model": "ibm/granite-8b-code-instruct", + "title": "Granite Code 8b", + "provider": "watsonx", + "apiBase": "watsonx endpoint e.g. https://us-south.ml.cloud.ibm.com", + "projectId": "PROJECT_ID", + "apiKey": "API_KEY/ZENAPI_KEY/USERNAME:PASSWORD", + "apiVersion": "2024-03-14", + "contextLength": 4000 + } + } + ``` @@ -219,13 +227,15 @@ To view the list of available embeddings models, visit [this page](https://datap ```json title="config.json" - "embeddingsProvider": { - "provider": "watsonx", - "model": "ibm/slate-30m-english-rtrvr-v2", - "apiBase": "watsonx endpoint e.g. https://us-south.ml.cloud.ibm.com", - "projectId": "PROJECT_ID", - "apiKey": "API_KEY/ZENAPI_KEY/USERNAME:PASSWORD", - "apiVersion": "2024-03-14" + { + "embeddingsProvider": { + "provider": "watsonx", + "model": "ibm/slate-30m-english-rtrvr-v2", + "apiBase": "watsonx endpoint e.g. https://us-south.ml.cloud.ibm.com", + "projectId": "PROJECT_ID", + "apiKey": "API_KEY/ZENAPI_KEY/USERNAME:PASSWORD", + "apiVersion": "2024-03-14" + } } ``` diff --git a/docs/docs/customize/model-providers/top-level/anthropic.mdx b/docs/docs/customize/model-providers/top-level/anthropic.mdx index 5a2a23696..7844cf49c 100644 --- a/docs/docs/customize/model-providers/top-level/anthropic.mdx +++ b/docs/docs/customize/model-providers/top-level/anthropic.mdx @@ -21,19 +21,21 @@ We recommend configuring **Claude 3.5 Sonnet** as your chat model. - name: Claude 3.5 Sonnet provider: anthropic model: claude-3-5-sonnet-latest - apiKey: ${{ secrets.ANTHROPIC_API_KEY }} + apiKey: ``` ```json title="config.json" + { "models": [ { "title": "Claude 3.5 Sonnet", "provider": "anthropic", "model": "claude-3-5-sonnet-latest", - "apiKey": "[API_KEY]" + "apiKey": "" } ] + } ``` @@ -79,18 +81,20 @@ To enable caching of the system message and the turn-by-turn conversation, updat ```json title="config.json" - "models": [ - { - "cacheBehavior": { - "cacheSystemMessage": true, - "cacheConversation": true - }, - "title": "Anthropic", - "provider": "anthropic", - "model": "claude-3-5-sonnet-latest", - "apiKey": "" - } - ] + { + "models": [ + { + "cacheBehavior": { + "cacheSystemMessage": true, + "cacheConversation": true + }, + "title": "Anthropic", + "provider": "anthropic", + "model": "claude-3-5-sonnet-latest", + "apiKey": "" + } + ] + } ``` diff --git a/docs/docs/customize/model-providers/top-level/azure.mdx b/docs/docs/customize/model-providers/top-level/azure.mdx index b0c28c0e0..a4f1a3f93 100644 --- a/docs/docs/customize/model-providers/top-level/azure.mdx +++ b/docs/docs/customize/model-providers/top-level/azure.mdx @@ -34,15 +34,17 @@ We recommend configuring **GPT-4o** as your chat model. ```json title="config.json" - "models": [{ - "title": "GPT-4o", - "provider": "azure", - "model": "gpt-4o", - "apiBase": "", - "deployment": "", - "apiKey": "", // If you use subscription key, try using Azure gateway to rename it apiKey - "apiType": "azure-foundry" // Or "azure-openai" if using OpenAI models - }] + { + "models": [{ + "title": "GPT-4o", + "provider": "azure", + "model": "gpt-4o", + "apiBase": "", + "deployment": "", + "apiKey": "", // If you use subscription key, try using Azure gateway to rename it apiKey + "apiType": "azure-foundry" // Or "azure-openai" if using OpenAI models + }] + } ``` @@ -64,11 +66,13 @@ We recommend configuring **Codestral** as your autocomplete model. ```json title="config.json" + { "tabAutocompleteModel": { "title": "Codestral", "provider": "mistral", "model": "codestral-latest" } + } ``` @@ -93,6 +97,7 @@ We recommend configuring **text-embedding-3-large** as your embeddings model. ```json title="config.json" + { "embeddingsProvider": { "provider": "azure", "model": "text-embedding-3-large", @@ -101,6 +106,7 @@ We recommend configuring **text-embedding-3-large** as your embeddings model. "apiKey": "", "apiType": "azure-foundry" // Or "azure-openai" if using OpenAI models } + } ``` @@ -145,14 +151,14 @@ For example, a Target URI of `https://just-an-example.openai.azure.com/openai/de ```json title="config.json" { - "title": "GPT-4o Azure", - "model": "gpt-4o", - "provider": "openai", - "apiBase": "https://just-an-example.openai.azure.com", - "deployment": "gpt-4o-july", - "apiVersion": "2023-03-15-preview", - "apiKey": "", - "apiType": "azure-openai" + "title": "GPT-4o Azure", + "model": "gpt-4o", + "provider": "openai", + "apiBase": "https://just-an-example.openai.azure.com", + "deployment": "gpt-4o-july", + "apiVersion": "2023-03-15-preview", + "apiKey": "", + "apiType": "azure-openai" } ``` diff --git a/docs/docs/customize/model-providers/top-level/bedrock.mdx b/docs/docs/customize/model-providers/top-level/bedrock.mdx index 510775064..f472d42a5 100644 --- a/docs/docs/customize/model-providers/top-level/bedrock.mdx +++ b/docs/docs/customize/model-providers/top-level/bedrock.mdx @@ -27,6 +27,7 @@ We recommend configuring **Claude 3.5 Sonnet** as your chat model. ```json title="config.json" + { "models": [ { "title": "Claude 3.5 Sonnet", @@ -36,6 +37,7 @@ We recommend configuring **Claude 3.5 Sonnet** as your chat model. "profile": "bedrock" } ] + } ``` @@ -59,6 +61,7 @@ We recommend configuring **Claude 3.5 Sonnet** as your chat model. ```json title="config.json" + { "models": [ { "title": "Claude 3.5 Sonnet", @@ -68,6 +71,7 @@ We recommend configuring **Claude 3.5 Sonnet** as your chat model. "profile": "bedrock" } ] + } ``` @@ -96,12 +100,14 @@ We recommend configuring [`amazon.titan-embed-text-v2:0`](https://docs.aws.amazo ```json title="config.json" + { "embeddingsProvider": { "title": "Embeddings Model", "provider": "bedrock", "model": "amazon.titan-embed-text-v2:0", "region": "us-west-2" } + } ``` @@ -124,6 +130,7 @@ We recommend configuring `cohere.rerank-v3-5:0` as your reranking model, you may ```json title="config.json" + { "reranker": { "name": "bedrock", "params": { @@ -131,6 +138,7 @@ We recommend configuring `cohere.rerank-v3-5:0` as your reranking model, you may "region": "us-west-2" } } + } ``` @@ -165,6 +173,7 @@ To setup Bedrock using custom imported models, add the following to your config ```json title="config.json" + { "models": [ { "title": "AWS Bedrock deepseek-coder-6.7b-instruct", @@ -175,6 +184,7 @@ To setup Bedrock using custom imported models, add the following to your config "profile": "bedrock" } ] + } ``` diff --git a/docs/docs/customize/model-providers/top-level/deepseek.mdx b/docs/docs/customize/model-providers/top-level/deepseek.mdx index 6971065e5..0d15bb5f4 100644 --- a/docs/docs/customize/model-providers/top-level/deepseek.mdx +++ b/docs/docs/customize/model-providers/top-level/deepseek.mdx @@ -15,27 +15,29 @@ You can get an API key from the [DeepSeek console](https://www.deepseek.com/). We recommend configuring **DeepSeek Chat** as your chat model. - - ```yaml title="config.yaml" - models: - - name: DeepSeek Chat - provider: deepseek - model: deepseek-chat - apiKey: - ``` - - - ```json title="config.json" - "models": [ - { - "title": "DeepSeek Chat", - "provider": "deepseek", - "model": "deepseek-chat", - "apiKey": "" - } - ] - ``` - + + ```yaml title="config.yaml" + models: + - name: DeepSeek Chat + provider: deepseek + model: deepseek-chat + apiKey: + ``` + + + ```json title="config.json" + { + "models": [ + { + "title": "DeepSeek Chat", + "provider": "deepseek", + "model": "deepseek-chat", + "apiKey": "" + } + ] + } + ``` + ## Autocomplete model @@ -43,27 +45,29 @@ We recommend configuring **DeepSeek Chat** as your chat model. We recommend configuring **DeepSeek Coder** as your autocomplete model. - - ```yaml title="config.yaml" - models: - - name: DeepSeek Coder - provider: deepseek - model: deepseek-coder - apiKey: - roles: - - autocomplete - ``` - - - ```json title="config.json" - "tabAutocompleteModel": { - "title": "DeepSeek Coder", - "provider": "deepseek", - "model": "deepseek-coder", - "apiKey": "" - } - ``` - + + ```yaml title="config.yaml" + models: + - name: DeepSeek Coder + provider: deepseek + model: deepseek-coder + apiKey: + roles: + - autocomplete + ``` + + + ```json title="config.json" + { + "tabAutocompleteModel": { + "title": "DeepSeek Coder", + "provider": "deepseek", + "model": "deepseek-coder", + "apiKey": "" + } + } + ``` + ## Embeddings model diff --git a/docs/docs/customize/model-providers/top-level/gemini.mdx b/docs/docs/customize/model-providers/top-level/gemini.mdx index af41aee0f..6911a14a0 100644 --- a/docs/docs/customize/model-providers/top-level/gemini.mdx +++ b/docs/docs/customize/model-providers/top-level/gemini.mdx @@ -26,6 +26,7 @@ We recommend configuring **Gemini 1.5 Pro** as your chat model. ```json title="config.json" + { "models": [ { "title": "Gemini 1.5 Pro", @@ -34,6 +35,7 @@ We recommend configuring **Gemini 1.5 Pro** as your chat model. "apiKey": "" } ] + } ``` @@ -62,11 +64,13 @@ We recommend configuring **text-embedding-004** as your embeddings model. ```json title="config.json" + { "embeddingsProvider": { "provider": "gemini", "model": "models/text-embedding-004", "apiKey": "" } + } ``` diff --git a/docs/docs/customize/model-providers/top-level/mistral.mdx b/docs/docs/customize/model-providers/top-level/mistral.mdx index fd563cafa..dd584394d 100644 --- a/docs/docs/customize/model-providers/top-level/mistral.mdx +++ b/docs/docs/customize/model-providers/top-level/mistral.mdx @@ -28,6 +28,7 @@ We recommend configuring **Mistral Large** as your chat model. ```json title="config.json" + { "models": [ { "title": "Mistral Large", @@ -36,6 +37,7 @@ We recommend configuring **Mistral Large** as your chat model. "apiKey": "" } ] + } ``` @@ -58,12 +60,14 @@ We recommend configuring **Codestral** as your autocomplete model. ```json title="config.json" + { "tabAutocompleteModel": { "title": "Codestral", "provider": "mistral", "model": "codestral-latest" // "apiBase": "https://codestral.mistral.ai/v1" // Do this if you are using a Codestral API key } + } ``` @@ -87,12 +91,14 @@ We recommend configuring **Mistral Embed** as your embeddings model. ```json title="config.json" + { "embeddingsProvider": { "provider": "mistral", "model": "mistral-embed", "apiKey": "", "apiBase": "https://api.mistral.ai/v1" } + } ``` diff --git a/docs/docs/customize/model-providers/top-level/ollama.mdx b/docs/docs/customize/model-providers/top-level/ollama.mdx index 9376db736..f2a80386e 100644 --- a/docs/docs/customize/model-providers/top-level/ollama.mdx +++ b/docs/docs/customize/model-providers/top-level/ollama.mdx @@ -23,6 +23,7 @@ We recommend configuring **Llama3.1 8B** as your chat model. ```json title="config.json" + { "models": [ { "title": "Llama3.1 8B", @@ -30,6 +31,7 @@ We recommend configuring **Llama3.1 8B** as your chat model. "model": "llama3.1:8b" } ] + } ``` @@ -51,11 +53,13 @@ We recommend configuring **Qwen2.5-Coder 1.5B** as your autocomplete model. ```json title="config.json" + { "tabAutocompleteModel": { "title": "Qwen2.5-Coder 1.5B", "provider": "ollama", "model": "qwen2.5-coder:1.5b-base" } + } ``` @@ -77,10 +81,12 @@ We recommend configuring **Nomic Embed Text** as your embeddings model. ```json title="config.json" + { "embeddingsProvider": { "provider": "ollama", "model": "nomic-embed-text" } + } ``` @@ -107,6 +113,7 @@ To configure a remote instance of Ollama, add the `"apiBase"` property to your m ```json title="config.json" + { "models": [ { "title": "Llama3.1 8B", @@ -115,6 +122,7 @@ To configure a remote instance of Ollama, add the `"apiBase"` property to your m "apiBase": "http://:11434" } ] + } ``` diff --git a/docs/docs/customize/model-providers/top-level/openai.mdx b/docs/docs/customize/model-providers/top-level/openai.mdx index 71d2b98e3..71a117850 100644 --- a/docs/docs/customize/model-providers/top-level/openai.mdx +++ b/docs/docs/customize/model-providers/top-level/openai.mdx @@ -114,15 +114,17 @@ If you are using an OpenAI compatible server / API, you can change the `apiBase` ```json title="config.json" + { "models": [ { - "title": "OpenAI-compatible server / API", - "provider": "openai", - "model": "MODEL_NAME", - "apiKey": "", - "apiBase": "http://localhost:8000/v1" + "title": "OpenAI-compatible server / API", + "provider": "openai", + "model": "MODEL_NAME", + "apiKey": "", + "apiBase": "http://localhost:8000/v1" } ] + } ``` diff --git a/docs/docs/customize/model-providers/top-level/vertexai.mdx b/docs/docs/customize/model-providers/top-level/vertexai.mdx index a41b3de35..514b67cb4 100644 --- a/docs/docs/customize/model-providers/top-level/vertexai.mdx +++ b/docs/docs/customize/model-providers/top-level/vertexai.mdx @@ -27,6 +27,7 @@ We recommend configuring **Claude 3.5 Sonnet** as your chat model. ```json title="config.json" + { "models": [ { "title": "Claude 3.5 Sonnet", @@ -36,6 +37,7 @@ We recommend configuring **Claude 3.5 Sonnet** as your chat model. "region": "us-east5" } ] + } ``` @@ -59,6 +61,7 @@ We recommend configuring **Codestral** or **code-gecko** as your autocomplete mo ```json title="config.json" + { "tabAutocompleteModel": { "title": "Codestral (Vertex AI)", "provider": "vertexai", @@ -66,6 +69,7 @@ We recommend configuring **Codestral** or **code-gecko** as your autocomplete mo "projectId": "[PROJECT_ID]", "region": "us-central1" } + } ``` @@ -76,26 +80,28 @@ We recommend configuring **text-embedding-004** as your embeddings model. - ```yaml title="config.yaml" - models: - - name: Text Embedding-004 - provider: vertexai - model: text-embedding-004 - projectId: - region: us-central1 - roles: - - embed - ``` + ```yaml title="config.yaml" + models: + - name: Text Embedding-004 + provider: vertexai + model: text-embedding-004 + projectId: + region: us-central1 + roles: + - embed + ``` - ```json title="config.json" - "embeddingsProvider": { - "provider": "vertexai", - "model": "text-embedding-004", - "projectId": "[PROJECT_ID]", - "region": "us-central1" - } - ``` + ```json title="config.json" + { + "embeddingsProvider": { + "provider": "vertexai", + "model": "text-embedding-004", + "projectId": "[PROJECT_ID]", + "region": "us-central1" + } + } + ``` diff --git a/docs/docs/customize/model-providers/top-level/xAI.mdx b/docs/docs/customize/model-providers/top-level/xAI.mdx index 89f50a2ba..6fb459736 100644 --- a/docs/docs/customize/model-providers/top-level/xAI.mdx +++ b/docs/docs/customize/model-providers/top-level/xAI.mdx @@ -26,15 +26,17 @@ We recommend configuring **grok-2-latest** as your chat model. For information o ```json title="config.json" - "models": [ - { - "title": "Grok 2", - "provider": "xAI", - "model": "grok-2-latest", - "apiKey": "" - } - ] - ``` + { + "models": [ + { + "title": "Grok 2", + "provider": "xAI", + "model": "grok-2-latest", + "apiKey": "" + } + ] + } + ``` diff --git a/docs/docs/customize/model-types/embeddings.mdx b/docs/docs/customize/model-types/embeddings.mdx index 89b6b989a..ee22f7301 100644 --- a/docs/docs/customize/model-types/embeddings.mdx +++ b/docs/docs/customize/model-types/embeddings.mdx @@ -34,21 +34,23 @@ After obtaining an API key from [here](https://www.voyageai.com/), you can confi ```yaml title="Package or config.yaml" models: - - name: Voyage Code 3 - provider: voyage - model: voyage-code-3 - apiKey: - roles: - - embed + - name: Voyage Code 3 + provider: voyage + model: voyage-code-3 + apiKey: + roles: + - embed ``` ```json title="config.json" + { "embeddingsProvider": { "provider": "voyage", "model": "voyage-code-3", "apiKey": "" } + } ``` @@ -73,9 +75,11 @@ See [here](../model-providers/top-level/ollama.mdx#embeddings-model) for instruc ```json title="config.json" + { "embeddingsProvider": { "provider": "transformers.js" } + } ``` @@ -96,10 +100,12 @@ See [here](../model-providers/top-level/ollama.mdx#embeddings-model) for instruc ```json title="config.json" + { "embeddingsProvider": { "provider": "huggingface-tei", "apiBase": "http://localhost:8080" } + } ``` diff --git a/docs/docs/customize/model-types/reranking.mdx b/docs/docs/customize/model-types/reranking.mdx index fbe544606..098dd94bc 100644 --- a/docs/docs/customize/model-types/reranking.mdx +++ b/docs/docs/customize/model-types/reranking.mdx @@ -34,6 +34,7 @@ Voyage AI offers the best reranking model for code with their `rerank-2` model. ```json title="config.json" + { "reranker": { "name": "voyage", "params": { @@ -41,6 +42,7 @@ Voyage AI offers the best reranking model for code with their `rerank-2` model. "apiKey": "" } } + } ``` @@ -63,13 +65,15 @@ See Cohere's documentation for rerankers [here](https://docs.cohere.com/docs/rer ```json title="config.json" + { "reranker": { "name": "cohere", "params": { - "model": "rerank-english-v3.0", - "apiKey": "" + "model": "rerank-english-v3.0", + "apiKey": "" } } + } ``` @@ -91,12 +95,14 @@ If you only have access to a single LLM, then you can use it as a reranker. This ```json title="config.json" - "reranker": { - "name": "llm", - "params": { - "modelTitle": "My Model Title" - } - } + { + "reranker": { + "name": "llm", + "params": { + "modelTitle": "My Model Title" + } + } + } ``` @@ -121,6 +127,7 @@ The `"modelTitle"` field must match one of the models in your "models" array in ```json title="config.json" + { "reranker": { "name": "huggingface-tei", "params": { @@ -128,6 +135,7 @@ The `"modelTitle"` field must match one of the models in your "models" array in "apiKey": "" } } + } ``` @@ -148,8 +156,10 @@ Continue offers a free trial of Voyage AI's reranking model. ```json title="config.json" - "reranker": { - "name": "free-trial" + { + "reranker": { + "name": "free-trial" + } } ``` diff --git a/docs/docs/customize/slash-commands.mdx b/docs/docs/customize/slash-commands.mdx index 96027e4b3..710d5fd69 100644 --- a/docs/docs/customize/slash-commands.mdx +++ b/docs/docs/customize/slash-commands.mdx @@ -122,16 +122,17 @@ The [Model Context Protocol](https://modelcontextprotocol.io/introduction) is a ```yaml title="Package or config.yaml" mcpServers: - - name: My MCP Server - command: uvx - args: - - mcp-server-sqlite - - --db-path - - /Users/NAME/test.db + - name: My MCP Server + command: uvx + args: + - mcp-server-sqlite + - --db-path + - /Users/NAME/test.db ``` ```json title="config.json" + { "experimental": { "modelContextProtocolServers": [ { @@ -143,6 +144,7 @@ The [Model Context Protocol](https://modelcontextprotocol.io/introduction) is a } ] } + } ``` diff --git a/docs/docs/customize/tools.mdx b/docs/docs/customize/tools.mdx index 9225a2f00..2f06f5081 100644 --- a/docs/docs/customize/tools.mdx +++ b/docs/docs/customize/tools.mdx @@ -30,16 +30,17 @@ Currently custom tools can be configured using the [Model Context Protocol](http ```yaml title="Package or config.yaml" mcpServers: - - name: My MCP Server - command: uvx - args: - - mcp-server-sqlite - - --db-path - - /Users/NAME/test.db + - name: My MCP Server + command: uvx + args: + - mcp-server-sqlite + - --db-path + - /Users/NAME/test.db ``` ```json title="config.json" + { "experimental": { "modelContextProtocolServers": [ { @@ -51,6 +52,7 @@ Currently custom tools can be configured using the [Model Context Protocol](http } ] } + } ``` diff --git a/docs/docs/customize/tutorials/build-your-own-slash-command.md b/docs/docs/customize/tutorials/build-your-own-slash-command.md index 162541a90..27b0517b3 100644 --- a/docs/docs/customize/tutorials/build-your-own-slash-command.md +++ b/docs/docs/customize/tutorials/build-your-own-slash-command.md @@ -22,11 +22,15 @@ You can add custom slash commands by adding to the `customCommands` property in Custom commands are great when you are frequently reusing a prompt. For example, if you've crafted a great prompt and frequently ask the LLM to check for mistakes in your code, you could add a command like this: ```json title="config.json" -customCommands=[{ - "name": "check", - "description": "Check for mistakes in my code", - "prompt": "{{{ input }}}\n\nPlease read the highlighted code and check for any mistakes. You should look for the following, and be extremely vigilant:\n- Syntax errors\n- Logic errors\n- Security vulnerabilities\n- Performance issues\n- Anything else that looks wrong\n\nOnce you find an error, please explain it as clearly as possible, but without using extra words. For example, instead of saying 'I think there is a syntax error on line 5', you should say 'Syntax error on line 5'. Give your answer as one bullet point per mistake found." -}] +{ + "customCommands": [ + { + "name": "check", + "description": "Check for mistakes in my code", + "prompt": "{{{ input }}}\n\nPlease read the highlighted code and check for any mistakes. You should look for the following, and be extremely vigilant:\n- Syntax errors\n- Logic errors\n- Security vulnerabilities\n- Performance issues\n- Anything else that looks wrong\n\nOnce you find an error, please explain it as clearly as possible, but without using extra words. For example, instead of saying 'I think there is a syntax error on line 5', you should say 'Syntax error on line 5'. Give your answer as one bullet point per mistake found." + } + ] +} ``` #### Templating diff --git a/docs/docs/customize/tutorials/custom-code-rag.mdx b/docs/docs/customize/tutorials/custom-code-rag.mdx index 67e65a35d..f5e43dc8e 100644 --- a/docs/docs/customize/tutorials/custom-code-rag.mdx +++ b/docs/docs/customize/tutorials/custom-code-rag.mdx @@ -141,6 +141,7 @@ After you've set up your server, you can configure Continue to use it by adding ```json title="config.json" + { "contextProviders": [ { "name": "http", @@ -152,6 +153,7 @@ After you've set up your server, you can configure Continue to use it by adding } } ] + } ``` diff --git a/docs/docs/customize/tutorials/how-to-self-host-a-model.mdx b/docs/docs/customize/tutorials/how-to-self-host-a-model.mdx index 3e9f7674c..abd726aba 100644 --- a/docs/docs/customize/tutorials/how-to-self-host-a-model.mdx +++ b/docs/docs/customize/tutorials/how-to-self-host-a-model.mdx @@ -35,14 +35,16 @@ Basic authentication can be done with any provider using the `apiKey` field: ```json title="config.json" - "models": [ - { - "title": "Ollama", - "provider": "ollama", - "model": "llama2-7b", - "apiKey": "" - } - ] + { + "models": [ + { + "title": "Ollama", + "provider": "ollama", + "model": "llama2-7b", + "apiKey": "" + } + ] + } ``` @@ -65,18 +67,20 @@ If you need to send custom headers for authentication, you may use the `requestO ```json title="config.json" - "models": [ - { - "title": "Ollama", - "provider": "ollama", - "model": "llama2-7b", - "requestOptions": { - "headers": { - "X-Auth-Token": "xxx" + { + "models": [ + { + "title": "Ollama", + "provider": "ollama", + "model": "llama2-7b", + "requestOptions": { + "headers": { + "X-Auth-Token": "xxx" + } } } - } - ] + ] + } ``` @@ -99,6 +103,7 @@ Similarly if your model requires a Certificate for authentication, you may use t ```json title="config.json" + { "models": [ { "title": "Ollama", @@ -113,6 +118,7 @@ Similarly if your model requires a Certificate for authentication, you may use t } } ] + } ``` diff --git a/docs/docs/customize/tutorials/llama3.1.mdx b/docs/docs/customize/tutorials/llama3.1.mdx index 37cad183f..294fc4e8b 100644 --- a/docs/docs/customize/tutorials/llama3.1.mdx +++ b/docs/docs/customize/tutorials/llama3.1.mdx @@ -22,16 +22,17 @@ Ollama is the fastest way to get up and running with local language models. We r 3. Change your Continue config file like this: - - ```yaml title="Package or config.yaml" - models: - - name: Llama 3.1 8b - provider: ollama - model: llama3.1-8b - ``` - - - ```json title="config.json" + + ```yaml title="Package or config.yaml" + models: + - name: Llama 3.1 8b + provider: ollama + model: llama3.1-8b + ``` + + + ```json title="config.json" + { "models": [ { "title": "Llama 3.1 8b", @@ -39,8 +40,9 @@ Ollama is the fastest way to get up and running with local language models. We r "model": "llama3.1-8b" } ] - ``` - + } + ``` + ## Groq @@ -55,27 +57,29 @@ Groq provides the fastest available inference for open-source language models, i 2. Update your Continue config file like this: - - ```yaml title="config.yaml" - models: - - name: Llama 3.3 70b Versatile - provider: groq - model: llama-3.3-70b-versatile - apiKey: - ``` - - - ```json title="config.json" - "models": [ - { - "title": "Llama 3.3 70b Versatile", - "provider": "groq", - "model": "llama-3.3-70b-versatile", - "apiKey": "" - } - ] - ``` - + + ```yaml title="config.yaml" + models: + - name: Llama 3.3 70b Versatile + provider: groq + model: llama-3.3-70b-versatile + apiKey: + ``` + + + ```json title="config.json" + { + "models": [ + { + "title": "Llama 3.3 70b Versatile", + "provider": "groq", + "model": "llama-3.3-70b-versatile", + "apiKey": "" + } + ] + } + ``` + ## Together AI @@ -87,27 +91,29 @@ Together AI provides fast and reliable inference of open-source models. You'll b 3. Update your Continue config file like this: - - ```yaml title="Package or config.yaml" - models: - - name: Llama 3.1 405b - provider: together - model: llama3.1-405b - apiKey: - ``` - - - ```json title="config.json" - "models": [ - { - "title": "Llama 3.1 405b", - "provider": "together", - "model": "llama3.1-405b", - "apiKey": "" - } - ] - ``` - + + ```yaml title="Package or config.yaml" + models: + - name: Llama 3.1 405b + provider: together + model: llama3.1-405b + apiKey: + ``` + + + ```json title="config.json" + { + "models": [ + { + "title": "Llama 3.1 405b", + "provider": "together", + "model": "llama3.1-405b", + "apiKey": "" + } + ] + } + ``` + ## Replicate @@ -118,27 +124,29 @@ Replicate makes it easy to host and run open-source AI with an API. 2. Change your Continue config file like this: - - ```yaml title="Package or config.yaml" - models: - - name: Llama 3.1 405b - provider: replicate - model: llama3.1-405b - apiKey: - ``` - - - ```json title="config.json" - "models": [ - { - "title": "Llama 3.1 405b", - "provider": "replicate", - "model": "llama3.1-405b", - "apiKey": "" - } - ] - ``` - + + ```yaml title="Package or config.yaml" + models: + - name: Llama 3.1 405b + provider: replicate + model: llama3.1-405b + apiKey: + ``` + + + ```json title="config.json" + { + "models": [ + { + "title": "Llama 3.1 405b", + "provider": "replicate", + "model": "llama3.1-405b", + "apiKey": "" + } + ] + } + ``` + ## SambaNova @@ -161,6 +169,7 @@ SambaNova Cloud provides world record Llama3.1 70B/405B serving. ```json title="config.json" + { "models": [ { "title": "SambaNova Llama 3.1 405B", @@ -169,6 +178,7 @@ SambaNova Cloud provides world record Llama3.1 70B/405B serving. "apiKey": "" } ] + } ``` @@ -193,14 +203,16 @@ Cerebras Inference uses specialized silicon to provides fast inference for the L ```json title="config.json" - "models": [ - { - "title": "Cerebras Llama 3.1 70B", - "provider": "cerebras", - "model": "llama3.1-70b", - "apiKey": "" - } - ] + { + "models": [ + { + "title": "Cerebras Llama 3.1 70B", + "provider": "cerebras", + "model": "llama3.1-70b", + "apiKey": "" + } + ] + } ``` diff --git a/docs/docs/customize/tutorials/set-up-codestral.mdx b/docs/docs/customize/tutorials/set-up-codestral.mdx index 67dc6f29e..97ec3c981 100644 --- a/docs/docs/customize/tutorials/set-up-codestral.mdx +++ b/docs/docs/customize/tutorials/set-up-codestral.mdx @@ -35,14 +35,15 @@ import TabItem from "@theme/TabItem"; ```json title="config.json" - "models": [ { - "title": "Codestral", - "provider": "mistral", - "model": "codestral-latest", - "apiKey": "", - "apiBase": "https://codestral.mistral.ai/v1" - } + "models": [ + { + "title": "Codestral", + "provider": "mistral", + "model": "codestral-latest", + "apiKey": "", + "apiBase": "https://codestral.mistral.ai/v1" + } ], "tabAutocompleteModel": { "title": "Codestral", @@ -51,6 +52,7 @@ import TabItem from "@theme/TabItem"; "apiKey": "", "apiBase": "https://codestral.mistral.ai/v1" } + } ``` diff --git a/docs/docs/edit/how-to-customize.mdx b/docs/docs/edit/how-to-customize.mdx index 203cd6ff3..ef8e44a54 100644 --- a/docs/docs/edit/how-to-customize.mdx +++ b/docs/docs/edit/how-to-customize.mdx @@ -15,12 +15,12 @@ You can configure a particular model to be used for Edit: Use model roles. ```yaml title="Package or config.yaml" models: - - name: Claude 3.5 Sonnet - provider: anthropic - model: claude-3-5-sonnet-latest - roles: - - edit - apiKey: + - name: Claude 3.5 Sonnet + provider: anthropic + model: claude-3-5-sonnet-latest + apiKey: + roles: + - edit ``` diff --git a/docs/docs/json-reference.md b/docs/docs/json-reference.md index 1082e64ad..470d59921 100644 --- a/docs/docs/json-reference.md +++ b/docs/docs/json-reference.md @@ -240,14 +240,16 @@ List of documentation sites to index. Example ```json title="config.json" -"docs": [ +{ + "docs": [ { - "title": "Continue", - "startUrl": "https://docs.continue.dev/intro", - "rootUrl": "https://docs.continue.dev", - "faviconUrl": "https://docs.continue.dev/favicon.ico", - } -] + "title": "Continue", + "startUrl": "https://docs.continue.dev/intro", + "rootUrl": "https://docs.continue.dev", + "faviconUrl": "https://docs.continue.dev/favicon.ico" + } + ] +} ``` ### `slashCommands` diff --git a/docs/docs/troubleshooting.mdx b/docs/docs/troubleshooting.mdx index c7903e410..ae54ee8ac 100644 --- a/docs/docs/troubleshooting.mdx +++ b/docs/docs/troubleshooting.mdx @@ -102,6 +102,7 @@ If you're seeing a `fetch failed` error and your network requires custom certifi ```json title="config.json" + { "models": [ { "title": "My Model", @@ -111,7 +112,7 @@ If you're seeing a `fetch failed` error and your network requires custom certifi } } ], - ... + } ``` From 6e2187348804d2e3198b82ce252a2ef8cf45c647 Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Tue, 11 Feb 2025 18:59:21 -0800 Subject: [PATCH 163/262] model roles pass around --- core/config/load.ts | 1 + core/config/profile/PlatformProfileLoader.ts | 3 +- core/config/types.ts | 4 +-- core/config/util.ts | 9 ++++-- core/config/yaml/convertFromJson.ts | 3 +- core/config/yaml/default.ts | 2 +- core/config/yaml/loadYaml.ts | 24 +++++++-------- core/index.d.ts | 16 +++++----- core/llm/index.ts | 3 ++ core/package-lock.json | 13 +++----- core/package.json | 2 +- core/protocol/core.ts | 4 +-- extensions/vscode/config_schema.json | 27 ----------------- extensions/vscode/package-lock.json | 6 ++-- gui/package-lock.json | 32 ++++---------------- gui/package.json | 2 +- packages/config-yaml/package.json | 2 +- packages/config-yaml/src/converter.ts | 4 +-- packages/config-yaml/src/index.ts | 2 +- packages/config-yaml/src/schemas/models.ts | 2 +- 20 files changed, 57 insertions(+), 104 deletions(-) diff --git a/core/config/load.ts b/core/config/load.ts index 5400bc81b..157ae28ae 100644 --- a/core/config/load.ts +++ b/core/config/load.ts @@ -559,6 +559,7 @@ async function finalToBrowserConfig( requestOptions: m.requestOptions, promptTemplates: m.promptTemplates as any, capabilities: m.capabilities, + roles: m.roles, })), systemMessage: final.systemMessage, completionOptions: final.completionOptions, diff --git a/core/config/profile/PlatformProfileLoader.ts b/core/config/profile/PlatformProfileLoader.ts index 7650cb0e3..04f1d3acf 100644 --- a/core/config/profile/PlatformProfileLoader.ts +++ b/core/config/profile/PlatformProfileLoader.ts @@ -1,5 +1,4 @@ -import { ConfigResult } from "@continuedev/config-yaml"; -import { AssistantUnrolled } from "@continuedev/config-yaml/dist/schemas/index.js"; +import { ConfigResult, AssistantUnrolled } from "@continuedev/config-yaml"; import { ControlPlaneClient } from "../../control-plane/client.js"; import { ContinueConfig, IDE, IdeSettings } from "../../index.js"; diff --git a/core/config/types.ts b/core/config/types.ts index 384da0c8f..2a68c4c35 100644 --- a/core/config/types.ts +++ b/core/config/types.ts @@ -956,7 +956,7 @@ declare global { fixGrammar?: string; } - interface ModelRoles { + interface ExperimentalModelRoles { inlineEdit?: string; applyCodeBlock?: string; repoMapFileSelection?: string; @@ -1024,7 +1024,7 @@ declare global { interface ExperimentalConfig { contextMenuPrompts?: ContextMenuConfig; - modelRoles?: ModelRoles; + modelRoles?: ExperimentalModelRoles; defaultContext?: DefaultContextProvider[]; promptPath?: string; diff --git a/core/config/util.ts b/core/config/util.ts index 6d28dcbcb..06acdf2b1 100644 --- a/core/config/util.ts +++ b/core/config/util.ts @@ -7,7 +7,7 @@ import { IDE, ILLM, ModelDescription, - ModelRoles, + ExperimentalModelRoles, } from "../"; import { GlobalContext } from "../util/GlobalContext"; import { editConfigJson } from "../util/paths"; @@ -34,7 +34,10 @@ export function addContextProvider(provider: ContextProviderWithParams) { }); } -export function addModel(model: ModelDescription, role?: keyof ModelRoles) { +export function addModel( + model: ModelDescription, + role?: keyof ExperimentalModelRoles, +) { editConfigJson((config) => { if (config.models?.some((m: any) => stringify(m) === stringify(model))) { return config; @@ -85,7 +88,7 @@ export function deleteModel(title: string) { }); } -export function getModelByRole( +export function getModelByRole( config: ContinueConfig, role: T, ): ILLM | undefined { diff --git a/core/config/yaml/convertFromJson.ts b/core/config/yaml/convertFromJson.ts index 576e196c8..a989d2631 100644 --- a/core/config/yaml/convertFromJson.ts +++ b/core/config/yaml/convertFromJson.ts @@ -1,5 +1,4 @@ -import { ModelConfig } from "@continuedev/config-yaml"; -import { AssistantUnrolled } from "@continuedev/config-yaml/dist/schemas"; +import { ModelConfig, AssistantUnrolled } from "@continuedev/config-yaml"; import { SerializedContinueConfig } from "../.."; diff --git a/core/config/yaml/default.ts b/core/config/yaml/default.ts index 0bc872f88..c9ca4dc8e 100644 --- a/core/config/yaml/default.ts +++ b/core/config/yaml/default.ts @@ -1,4 +1,4 @@ -import { AssistantUnrolled } from "@continuedev/config-yaml/dist/schemas"; +import { AssistantUnrolled } from "@continuedev/config-yaml"; // TODO export const defaultConfigYaml: AssistantUnrolled = { diff --git a/core/config/yaml/loadYaml.ts b/core/config/yaml/loadYaml.ts index 7bf59c343..57660ce53 100644 --- a/core/config/yaml/loadYaml.ts +++ b/core/config/yaml/loadYaml.ts @@ -7,10 +7,10 @@ import { parseAssistantUnrolled, validateConfigYaml, } from "@continuedev/config-yaml"; +import { ModelRole } from "@continuedev/config-yaml"; import { fetchwithRequestOptions } from "@continuedev/fetch"; import { - BrowserSerializedContinueConfig, ContinueConfig, IContextProvider, IDE, @@ -18,9 +18,11 @@ import { IdeType, SlashCommand, } from "../.."; +import { slashFromCustomCommand } from "../../commands"; import { AllRerankers } from "../../context/allRerankers"; import { MCPManagerSingleton } from "../../context/mcp"; import CodebaseContextProvider from "../../context/providers/CodebaseContextProvider"; +import DocsContextProvider from "../../context/providers/DocsContextProvider"; import FileContextProvider from "../../context/providers/FileContextProvider"; import { contextProviderClassFromName } from "../../context/providers/index"; import PromptFilesContextProvider from "../../context/providers/PromptFilesContextProvider"; @@ -30,15 +32,13 @@ import FreeTrial from "../../llm/llms/FreeTrial"; import TransformersJsEmbeddingsProvider from "../../llm/llms/TransformersJsEmbeddingsProvider"; import { slashCommandFromPromptFileV1 } from "../../promptFiles/v1/slashCommandFromPromptFile"; import { getAllPromptFiles } from "../../promptFiles/v2/getPromptFiles"; +import { allTools } from "../../tools"; +import { GlobalContext } from "../../util/GlobalContext"; import { getConfigYamlPath } from "../../util/paths"; import { getSystemPromptDotFile } from "../getSystemPromptDotFile"; import { PlatformConfigMetadata } from "../profile/PlatformProfileLoader"; - -import { slashFromCustomCommand } from "../../commands"; -import DocsContextProvider from "../../context/providers/DocsContextProvider"; -import { allTools } from "../../tools"; -import { GlobalContext } from "../../util/GlobalContext"; import { modifyContinueConfigWithSharedConfig } from "../sharedConfig"; + import { clientRenderHelper } from "./clientRender"; import { llmsFromModelConfig } from "./models"; @@ -134,12 +134,10 @@ async function configYamlToContinueConfig( }; // Models + const modelsArrayRoles: ModelRole[] = ["chat", "summarize", "apply", "edit"]; for (const model of config.models ?? []) { - if ( - ["chat", "summarize", "apply", "edit"].some((role: any) => - model.roles?.includes(role), - ) - ) { + model.roles = model.roles ?? ["chat"]; // Default to chat role if not specified + if (modelsArrayRoles.some((role) => model.roles?.includes(role))) { // Main model array const llms = await llmsFromModelConfig( model, @@ -245,6 +243,7 @@ async function configYamlToContinueConfig( } // Embeddings Provider + // IMPORTANT this currently will grab the first model found with an embed role const embedConfig = config.models?.find((model) => model.roles?.includes("embed"), ); @@ -269,6 +268,7 @@ async function configYamlToContinueConfig( } // Reranker + // IMPORTANT this currently will grab the first model found with a rerank role const rerankConfig = config.models?.find((model) => model.roles?.includes("rerank"), ); @@ -402,5 +402,3 @@ export async function loadContinueConfigFromYaml( configLoadInterrupted: false, }; } - -export { type BrowserSerializedContinueConfig }; diff --git a/core/index.d.ts b/core/index.d.ts index b1d15847a..ca55db8a0 100644 --- a/core/index.d.ts +++ b/core/index.d.ts @@ -1,6 +1,6 @@ import Parser from "web-tree-sitter"; import { GetGhTokenArgs } from "./protocol/ide"; - +import { ModelRole } from "@continuedev/config-yaml"; declare global { interface Window { ide?: "vscode"; @@ -94,6 +94,8 @@ export interface ILLM extends LLMOptions { apiKey?: string; apiBase?: string; cacheBehavior?: CacheBehavior; + capabilities?: ModelCapability; + roles?: ModelRole[]; deployment?: string; apiVersion?: string; @@ -480,6 +482,8 @@ export interface LLMOptions { aiGatewaySlug?: string; apiBase?: string; cacheBehavior?: CacheBehavior; + capabilities?: ModelCapability; + roles?: ModelRole[]; useLegacyCompletionsEndpoint?: boolean; @@ -503,9 +507,6 @@ export interface LLMOptions { // AWS and GCP Options region?: string; - // GCP Options - capabilities?: ModelCapability; - // GCP and Watsonx Options projectId?: string; @@ -923,8 +924,9 @@ export interface ModelDescription { systemMessage?: string; requestOptions?: RequestOptions; promptTemplates?: { [key: string]: string }; - capabilities?: ModelCapability; cacheBehavior?: CacheBehavior; + capabilities?: ModelCapability; + roles?: ModelRole[]; } export interface EmbedOptions { @@ -1015,7 +1017,7 @@ export interface ContextMenuConfig { fixGrammar?: string; } -export interface ModelRoles { +export interface ExperimentalModelRoles { inlineEdit?: string; applyCodeBlock?: string; repoMapFileSelection?: string; @@ -1083,7 +1085,7 @@ export type DefaultContextProvider = ContextProviderWithParams & { export interface ExperimentalConfig { contextMenuPrompts?: ContextMenuConfig; - modelRoles?: ModelRoles; + modelRoles?: ExperimentalModelRoles; defaultContext?: DefaultContextProvider[]; promptPath?: string; diff --git a/core/llm/index.ts b/core/llm/index.ts index 4989f14fa..7e3c37fc2 100644 --- a/core/llm/index.ts +++ b/core/llm/index.ts @@ -56,6 +56,7 @@ import { toCompleteBody, toFimBody, } from "./openaiTypeConverters.js"; +import { ModelRole } from "@continuedev/config-yaml"; export abstract class BaseLLM implements ILLM { static providerName: string; @@ -121,6 +122,7 @@ export abstract class BaseLLM implements ILLM { apiBase?: string; cacheBehavior?: CacheBehavior; capabilities?: ModelCapability; + roles?: ModelRole[]; deployment?: string; apiVersion?: string; @@ -209,6 +211,7 @@ export abstract class BaseLLM implements ILLM { } this.accountId = options.accountId; this.capabilities = options.capabilities; + this.roles = options.roles; this.deployment = options.deployment; this.apiVersion = options.apiVersion; diff --git a/core/package-lock.json b/core/package-lock.json index 4179cc7a5..cf94c1af2 100644 --- a/core/package-lock.json +++ b/core/package-lock.json @@ -13,7 +13,7 @@ "@aws-sdk/client-sagemaker-runtime": "^3.621.0", "@aws-sdk/credential-providers": "^3.620.1", "@continuedev/config-types": "^1.0.13", - "@continuedev/config-yaml": "^1.0.28", + "@continuedev/config-yaml": "file:///Users/dallin/documents/code/continuedev/continue/packages/config-yaml/dist", "@continuedev/fetch": "^1.0.4", "@continuedev/llm-info": "^1.0.2", "@continuedev/openai-adapters": "^1.0.10", @@ -106,6 +106,7 @@ "node": ">=20.11.0" } }, + "../../../../../documents/code/continuedev/continue/packages/config-yaml/dist": {}, "node_modules/@75lb/deep-merge": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@75lb/deep-merge/-/deep-merge-1.1.2.tgz", @@ -3038,14 +3039,8 @@ } }, "node_modules/@continuedev/config-yaml": { - "version": "1.0.28", - "resolved": "https://registry.npmjs.org/@continuedev/config-yaml/-/config-yaml-1.0.28.tgz", - "integrity": "sha512-XTTRHeIYgLlwzPkub2jAPx4TqRf47g/TR2K9AIdZYQRNxYuHAeFRRqaIaAZPdykZATg30vdGQGGdssVr6IyCCg==", - "dependencies": { - "@continuedev/config-types": "^1.0.14", - "yaml": "^2.6.1", - "zod": "^3.23.8" - } + "resolved": "../../../../../documents/code/continuedev/continue/packages/config-yaml/dist", + "link": true }, "node_modules/@continuedev/fetch": { "version": "1.0.4", diff --git a/core/package.json b/core/package.json index f6f194d7f..c488404a1 100644 --- a/core/package.json +++ b/core/package.json @@ -46,7 +46,7 @@ "@aws-sdk/client-sagemaker-runtime": "^3.621.0", "@aws-sdk/credential-providers": "^3.620.1", "@continuedev/config-types": "^1.0.13", - "@continuedev/config-yaml": "^1.0.28", + "@continuedev/config-yaml": "file:///Users/dallin/documents/code/continuedev/continue/packages/config-yaml/dist", "@continuedev/fetch": "^1.0.4", "@continuedev/llm-info": "^1.0.2", "@continuedev/openai-adapters": "^1.0.10", diff --git a/core/protocol/core.ts b/core/protocol/core.ts index 8eafca5a1..43985583c 100644 --- a/core/protocol/core.ts +++ b/core/protocol/core.ts @@ -18,7 +18,7 @@ import type { IdeSettings, LLMFullCompletionOptions, ModelDescription, - ModelRoles, + ExperimentalModelRoles, PromptLog, RangeInFile, SerializedContinueConfig, @@ -52,7 +52,7 @@ export type ToCoreFromIdeOrWebviewProtocol = { "config/addModel": [ { model: SerializedContinueConfig["models"][number]; - role?: keyof ModelRoles; + role?: keyof ExperimentalModelRoles; }, void, ]; diff --git a/extensions/vscode/config_schema.json b/extensions/vscode/config_schema.json index d9dab076b..44cb6dfc3 100644 --- a/extensions/vscode/config_schema.json +++ b/extensions/vscode/config_schema.json @@ -1683,33 +1683,6 @@ } ] }, - "ModelRoles": { - "title": "ModelRoles", - "type": "object", - "properties": { - "default": { - "title": "Default", - "description": "The default model. If other model roles are not set, they will fall back to default.", - "type": "string" - }, - "chat": { - "title": "Chat", - "description": "The model to use for chat. If not set, will fall back to default.", - "type": "string" - }, - "edit": { - "title": "Edit", - "description": "The model to use for editing. If not set, will fall back to default.", - "type": "string" - }, - "summarize": { - "title": "Summarize", - "description": "The model to use for summarization. If not set, will fall back to default.", - "type": "string" - } - }, - "required": ["default"] - }, "SlashCommand": { "title": "SlashCommand", "type": "object", diff --git a/extensions/vscode/package-lock.json b/extensions/vscode/package-lock.json index 2e51c407e..52939ae0b 100644 --- a/extensions/vscode/package-lock.json +++ b/extensions/vscode/package-lock.json @@ -1,12 +1,12 @@ { "name": "continue", - "version": "0.9.262", + "version": "0.9.263", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "continue", - "version": "0.9.262", + "version": "0.9.263", "license": "Apache-2.0", "dependencies": { "@continuedev/fetch": "^1.0.3", @@ -106,7 +106,7 @@ "@aws-sdk/client-sagemaker-runtime": "^3.621.0", "@aws-sdk/credential-providers": "^3.620.1", "@continuedev/config-types": "^1.0.13", - "@continuedev/config-yaml": "^1.0.28", + "@continuedev/config-yaml": "file:///Users/dallin/documents/code/continuedev/continue/packages/config-yaml/dist", "@continuedev/fetch": "^1.0.4", "@continuedev/llm-info": "^1.0.2", "@continuedev/openai-adapters": "^1.0.10", diff --git a/gui/package-lock.json b/gui/package-lock.json index 5c134a9e6..283dd47f8 100644 --- a/gui/package-lock.json +++ b/gui/package-lock.json @@ -7,7 +7,7 @@ "name": "gui", "license": "Apache-2.0", "dependencies": { - "@continuedev/config-yaml": "^1.0.28", + "@continuedev/config-yaml": "file:///Users/dallin/documents/code/continuedev/continue/packages/config-yaml/dist", "@headlessui/react": "^1.7.17", "@heroicons/react": "^2.0.18", "@reduxjs/toolkit": "^2.3.0", @@ -99,6 +99,7 @@ "node": ">=20.11.0" } }, + "../../../../../documents/code/continuedev/continue/packages/config-yaml/dist": {}, "../core": { "name": "@continuedev/core", "version": "1.0.13", @@ -108,7 +109,7 @@ "@aws-sdk/client-sagemaker-runtime": "^3.621.0", "@aws-sdk/credential-providers": "^3.620.1", "@continuedev/config-types": "^1.0.13", - "@continuedev/config-yaml": "^1.0.28", + "@continuedev/config-yaml": "file:///Users/dallin/documents/code/continuedev/continue/packages/config-yaml/dist", "@continuedev/fetch": "^1.0.4", "@continuedev/llm-info": "^1.0.2", "@continuedev/openai-adapters": "^1.0.10", @@ -547,23 +548,9 @@ "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", "dev": true }, - "node_modules/@continuedev/config-types": { - "version": "1.0.14", - "resolved": "https://registry.npmjs.org/@continuedev/config-types/-/config-types-1.0.14.tgz", - "integrity": "sha512-PVHyHPyRXd2QsaNgnCpiKYU3uHFTlyuQSkqE8OwrBmQqO6/TXUVIr/2EGtyIZGrml4Y+rGMSH40WU4/0t4SGpQ==", - "dependencies": { - "zod": "^3.23.8" - } - }, "node_modules/@continuedev/config-yaml": { - "version": "1.0.28", - "resolved": "https://registry.npmjs.org/@continuedev/config-yaml/-/config-yaml-1.0.28.tgz", - "integrity": "sha512-XTTRHeIYgLlwzPkub2jAPx4TqRf47g/TR2K9AIdZYQRNxYuHAeFRRqaIaAZPdykZATg30vdGQGGdssVr6IyCCg==", - "dependencies": { - "@continuedev/config-types": "^1.0.14", - "yaml": "^2.6.1", - "zod": "^3.23.8" - } + "resolved": "../../../../../documents/code/continuedev/continue/packages/config-yaml/dist", + "link": true }, "node_modules/@emotion/is-prop-valid": { "version": "1.3.1", @@ -13735,6 +13722,7 @@ "version": "2.6.1", "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.6.1.tgz", "integrity": "sha512-7r0XPzioN/Q9kXBro/XPnA6kznR73DHq+GXh5ON7ZozRO6aMjbmiBuKste2wslTFkC5d1dw0GooOCepZXJ2SAg==", + "dev": true, "bin": { "yaml": "bin.mjs" }, @@ -13754,14 +13742,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/zod": { - "version": "3.24.1", - "resolved": "https://registry.npmjs.org/zod/-/zod-3.24.1.tgz", - "integrity": "sha512-muH7gBL9sI1nciMZV67X5fTKKBLtwpZ5VBp1vsOQzj1MhrBZ4wlVCm3gedKZWLp0Oyel8sIGfeiz54Su+OVT+A==", - "funding": { - "url": "https://github.com/sponsors/colinhacks" - } - }, "node_modules/zwitch": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/zwitch/-/zwitch-2.0.4.tgz", diff --git a/gui/package.json b/gui/package.json index b19106429..ecaafb023 100644 --- a/gui/package.json +++ b/gui/package.json @@ -15,7 +15,7 @@ "test:watch": "vitest" }, "dependencies": { - "@continuedev/config-yaml": "^1.0.28", + "@continuedev/config-yaml": "file:///Users/dallin/documents/code/continuedev/continue/packages/config-yaml/dist", "@headlessui/react": "^1.7.17", "@heroicons/react": "^2.0.18", "@reduxjs/toolkit": "^2.3.0", diff --git a/packages/config-yaml/package.json b/packages/config-yaml/package.json index 005112b06..a4b386bbe 100644 --- a/packages/config-yaml/package.json +++ b/packages/config-yaml/package.json @@ -1,6 +1,6 @@ { "name": "@continuedev/config-yaml", - "version": "1.0.28", + "version": "1.0.29", "description": "", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/packages/config-yaml/src/converter.ts b/packages/config-yaml/src/converter.ts index 56d5326d2..13f54cb8c 100644 --- a/packages/config-yaml/src/converter.ts +++ b/packages/config-yaml/src/converter.ts @@ -1,6 +1,6 @@ import { ConfigJson } from "@continuedev/config-types"; import { ConfigYaml } from "./schemas/index.js"; -import { ModelRoles } from "./schemas/models.js"; +import { ModelRole } from "./schemas/models.js"; type ModelYaml = NonNullable[number]; type ContextYaml = NonNullable[number]; @@ -8,7 +8,7 @@ type PromptYaml = NonNullable[number]; function convertModel( m: ConfigJson["models"][number], - roles: ModelRoles[], + roles: ModelRole[], ): ModelYaml { return { name: m.title, diff --git a/packages/config-yaml/src/index.ts b/packages/config-yaml/src/index.ts index 0fcd5ae10..51f9287c0 100644 --- a/packages/config-yaml/src/index.ts +++ b/packages/config-yaml/src/index.ts @@ -8,5 +8,5 @@ export * from "./load/merge.js"; export * from "./load/proxySecretResolution.js"; export * from "./load/unroll.js"; export * from "./schemas/index.js"; -export type { ModelConfig } from "./schemas/models.js"; +export type { ModelConfig, ModelRole } from "./schemas/models.js"; export * from "./validation.js"; diff --git a/packages/config-yaml/src/schemas/models.ts b/packages/config-yaml/src/schemas/models.ts index b5e40fcc1..05df2c1ad 100644 --- a/packages/config-yaml/src/schemas/models.ts +++ b/packages/config-yaml/src/schemas/models.ts @@ -29,7 +29,7 @@ export const modelRolesSchema = z.enum([ "apply", "summarize", ]); -export type ModelRoles = z.infer; +export type ModelRole = z.infer; export const completionOptionsSchema = z.object({ contextLength: z.number().optional(), From 41785c920c82503143e5461f9d45d29fb9d90bcc Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Tue, 11 Feb 2025 19:36:11 -0800 Subject: [PATCH 164/262] set default roles for json as well git push --- core/config/load.ts | 1 + .../components/modelSelection/ModelSelect.tsx | 16 +++++++++------- gui/vite.config.ts | 8 ++++++++ 3 files changed, 18 insertions(+), 7 deletions(-) diff --git a/core/config/load.ts b/core/config/load.ts index 157ae28ae..c8499dc8b 100644 --- a/core/config/load.ts +++ b/core/config/load.ts @@ -326,6 +326,7 @@ async function intermediateToFinalConfig( ...model.requestOptions, ...config.requestOptions, }; + model.roles = model.roles ?? ["chat"]; // Default to chat role if not specified } if (allowFreeTrial) { diff --git a/gui/src/components/modelSelection/ModelSelect.tsx b/gui/src/components/modelSelection/ModelSelect.tsx index 68f5ea996..efa717a0b 100644 --- a/gui/src/components/modelSelection/ModelSelect.tsx +++ b/gui/src/components/modelSelection/ModelSelect.tsx @@ -235,13 +235,15 @@ function ModelSelect() { useEffect(() => { setOptions( - allModels.map((model) => { - return { - value: model.title, - title: modelSelectTitle(model), - apiKey: model.apiKey, - }; - }), + allModels + .filter((m) => !m.roles || m.roles.includes("chat")) + .map((model) => { + return { + value: model.title, + title: modelSelectTitle(model), + apiKey: model.apiKey, + }; + }), ); }, [allModels]); diff --git a/gui/vite.config.ts b/gui/vite.config.ts index d4c4ba7d7..6c5cd6d75 100644 --- a/gui/vite.config.ts +++ b/gui/vite.config.ts @@ -16,6 +16,14 @@ export default defineConfig({ }, }, }, + server: { + cors: { + origin: "*", + methods: ["GET", "POST", "PUT", "DELETE", "PATCH", "OPTIONS"], + allowedHeaders: ["*", "Content-Type", "Authorization"], + credentials: true, + }, + }, test: { globals: true, environment: "jsdom", From 701d03ba3bce5ecedb899c56fd579893b4625c14 Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Tue, 11 Feb 2025 19:38:24 -0800 Subject: [PATCH 165/262] bump config yaml ? --- core/package.json | 2 +- gui/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/package.json b/core/package.json index c488404a1..6e032fb10 100644 --- a/core/package.json +++ b/core/package.json @@ -46,7 +46,7 @@ "@aws-sdk/client-sagemaker-runtime": "^3.621.0", "@aws-sdk/credential-providers": "^3.620.1", "@continuedev/config-types": "^1.0.13", - "@continuedev/config-yaml": "file:///Users/dallin/documents/code/continuedev/continue/packages/config-yaml/dist", + "@continuedev/config-yaml": "^1.0.29", "@continuedev/fetch": "^1.0.4", "@continuedev/llm-info": "^1.0.2", "@continuedev/openai-adapters": "^1.0.10", diff --git a/gui/package.json b/gui/package.json index ecaafb023..a3ab8240e 100644 --- a/gui/package.json +++ b/gui/package.json @@ -15,7 +15,7 @@ "test:watch": "vitest" }, "dependencies": { - "@continuedev/config-yaml": "file:///Users/dallin/documents/code/continuedev/continue/packages/config-yaml/dist", + "@continuedev/config-yaml": "^1.0.29", "@headlessui/react": "^1.7.17", "@heroicons/react": "^2.0.18", "@reduxjs/toolkit": "^2.3.0", From c1cefa991a597fcf0388df652d3877e4bddc0fbe Mon Sep 17 00:00:00 2001 From: Nate Date: Tue, 11 Feb 2025 21:12:58 -0800 Subject: [PATCH 166/262] fix auth edge case --- .../continueintellijextension/auth/ContinueAuthService.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/auth/ContinueAuthService.kt b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/auth/ContinueAuthService.kt index b9fe07fb7..23b6b66bd 100644 --- a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/auth/ContinueAuthService.kt +++ b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/auth/ContinueAuthService.kt @@ -224,7 +224,7 @@ class ContinueAuthService { val accountId = getAccountId() val accountLabel = getAccountLabel() - return if (accessToken != null && accountId != null && accountLabel != null) { + return if ((accessToken != null && accessToken != "") && accountId != null && accountLabel != null) { ControlPlaneSessionInfo( accessToken = accessToken, account = ControlPlaneSessionInfo.Account( From 1507d45325f9cb8f4bf2ef1e23d2c1c0c625794d Mon Sep 17 00:00:00 2001 From: Nate Date: Tue, 11 Feb 2025 21:13:42 -0800 Subject: [PATCH 167/262] bump version --- extensions/vscode/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/vscode/package.json b/extensions/vscode/package.json index 30d9f6843..57bdfea44 100644 --- a/extensions/vscode/package.json +++ b/extensions/vscode/package.json @@ -2,7 +2,7 @@ "name": "continue", "icon": "media/icon.png", "author": "Continue Dev, Inc", - "version": "0.9.264", + "version": "0.9.265", "repository": { "type": "git", "url": "https://github.com/continuedev/continue" From 7d252fb80571d94b28053d8382d2fb0978e2acf1 Mon Sep 17 00:00:00 2001 From: Nate Date: Tue, 11 Feb 2025 21:54:12 -0800 Subject: [PATCH 168/262] fix config loading error --- core/config/yaml/models.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/config/yaml/models.ts b/core/config/yaml/models.ts index 4c8e978ff..874406142 100644 --- a/core/config/yaml/models.ts +++ b/core/config/yaml/models.ts @@ -35,7 +35,8 @@ async function modelConfigToBaseLLM( return undefined; } - const usingContinueProxy = model.provider === "continue-proxy"; + const usingContinueProxy = + platformConfigMetadata && model.provider === "continue-proxy"; const modelName = usingContinueProxy ? getContinueProxyModelName( platformConfigMetadata!.ownerSlug, From 15dd4dfe3e6c6e94462b6e5f30e4022cb1f2d6e4 Mon Sep 17 00:00:00 2001 From: Nate Date: Tue, 11 Feb 2025 22:15:24 -0800 Subject: [PATCH 169/262] update webview session info on change (jb) --- .../continueintellijextension/continue/IdeProtocolClient.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/IdeProtocolClient.kt b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/IdeProtocolClient.kt index 6f5cd51a9..9b8f558c2 100644 --- a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/IdeProtocolClient.kt +++ b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/IdeProtocolClient.kt @@ -62,7 +62,7 @@ class IdeProtocolClient( "jetbrains/isOSREnabled" -> { val isOSREnabled = ServiceManager.getService(ContinueExtensionSettings::class.java).continueState.enableOSR - respond(isOSREnabled) + respond(isOSREnabled) } "jetbrains/getColors" -> { @@ -106,6 +106,10 @@ class IdeProtocolClient( authService.signOut() ApplicationManager.getApplication().messageBus.syncPublisher(AuthListener.TOPIC) .handleUpdatedSessionInfo(null) + + // Tell the webview that session info changed + continuePluginService.sendToWebview("didChangeControlPlaneSessionInfo", null, uuid()) + respond(null) } From a79bdda868bc9561667c69c8c81285e4de878460 Mon Sep 17 00:00:00 2001 From: Nate Date: Tue, 11 Feb 2025 22:15:33 -0800 Subject: [PATCH 170/262] update package-lock --- binary/package-lock.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/binary/package-lock.json b/binary/package-lock.json index 962cdaa79..7454d88e7 100644 --- a/binary/package-lock.json +++ b/binary/package-lock.json @@ -48,7 +48,7 @@ "@aws-sdk/client-sagemaker-runtime": "^3.621.0", "@aws-sdk/credential-providers": "^3.620.1", "@continuedev/config-types": "^1.0.13", - "@continuedev/config-yaml": "^1.0.26", + "@continuedev/config-yaml": "^1.0.28", "@continuedev/fetch": "^1.0.4", "@continuedev/llm-info": "^1.0.2", "@continuedev/openai-adapters": "^1.0.10", From 6a6d397f92fd733c265bbfd7f46a58a6feb4e285 Mon Sep 17 00:00:00 2001 From: Nate Date: Tue, 11 Feb 2025 22:31:24 -0800 Subject: [PATCH 171/262] add jetbrains border colors --- .../continueintellijextension/continue/GetTheme.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/GetTheme.kt b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/GetTheme.kt index 7eb4ab700..97a55c4a6 100644 --- a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/GetTheme.kt +++ b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/GetTheme.kt @@ -86,7 +86,9 @@ class GetTheme { "--vscode-input-border" to "#80808080", "--vscode-badge-background" to highlightHex, "--vscode-badge-foreground" to defaultForegroundHex, - "--vscode-sideBar-border" to "#80808080" + "--vscode-sideBar-border" to "#80808080", + "--vscode-commandCenter-activeBorder" to highlightHex, + "--vscode-commandCenter-inactiveBorder" to "#80808080" ) } catch (error: Error) { From 4ca8ee1e6616b405495aef283f781fddddb03474 Mon Sep 17 00:00:00 2001 From: Nate Date: Tue, 11 Feb 2025 22:47:41 -0800 Subject: [PATCH 172/262] bump jb version --- extensions/intellij/gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/intellij/gradle.properties b/extensions/intellij/gradle.properties index 870baaad5..1ff05ba34 100644 --- a/extensions/intellij/gradle.properties +++ b/extensions/intellij/gradle.properties @@ -3,7 +3,7 @@ pluginGroup=com.github.continuedev.continueintellijextension pluginName=continue-intellij-extension pluginRepositoryUrl=https://github.com/continuedev/continue # SemVer format -> https://semver.org -pluginVersion=0.0.88 +pluginVersion=0.0.89 # Supported build number ranges and IntelliJ Platform versions -> https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html pluginSinceBuild=223 # IntelliJ Platform Properties -> https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html#configuration-intellij-extension From 0ef4d66016c0278e8e24c5b796f6efed33883cac Mon Sep 17 00:00:00 2001 From: tomasz-io Date: Wed, 12 Feb 2025 13:32:16 -0800 Subject: [PATCH 173/262] improv: upgrade esbuild --- binary/package-lock.json | 2 +- core/package-lock.json | 264 +++++++++++++---------- core/package.json | 2 +- extensions/vscode/package-lock.json | 268 +++++++++++++----------- extensions/vscode/package.json | 4 +- extensions/vscode/scripts/prepackage.js | 2 +- gui/package-lock.json | 2 +- 7 files changed, 306 insertions(+), 238 deletions(-) diff --git a/binary/package-lock.json b/binary/package-lock.json index 7454d88e7..d3058c4d6 100644 --- a/binary/package-lock.json +++ b/binary/package-lock.json @@ -128,7 +128,7 @@ "@types/uuid": "^9.0.7", "@types/win-ca": "^3.5.4", "cross-env": "^7.0.3", - "esbuild": "0.17.19", + "esbuild": "0.24.0", "eslint": "^8", "jest": "^29.7.0", "jest-environment-jsdom": "^29.7.0", diff --git a/core/package-lock.json b/core/package-lock.json index 4179cc7a5..211969179 100644 --- a/core/package-lock.json +++ b/core/package-lock.json @@ -93,7 +93,7 @@ "@types/uuid": "^9.0.7", "@types/win-ca": "^3.5.4", "cross-env": "^7.0.3", - "esbuild": "0.17.19", + "esbuild": "0.24.0", "eslint": "^8", "jest": "^29.7.0", "jest-environment-jsdom": "^29.7.0", @@ -3077,10 +3077,26 @@ "zod": "^3.23.8" } }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.24.0.tgz", + "integrity": "sha512-WtKdFM7ls47zkKHFVzMz8opM7LkcsIp9amDUBIAWirg70RM71WRSjdILPsY5Uv1D42ZpUfaPILDlfactHgsRkw==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=18" + } + }, "node_modules/@esbuild/android-arm": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.17.19.tgz", - "integrity": "sha512-rIKddzqhmav7MSmoFCmDIb6e2W57geRsM94gV2l38fzhXMwq7hZoClug9USI2pFRGL06f4IOPHHpFNOkWieR8A==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.24.0.tgz", + "integrity": "sha512-arAtTPo76fJ/ICkXWetLCc9EwEHKaeya4vMrReVlEIUCAUncH7M4bhMQ+M9Vf+FFOZJdTNMXNBrWwW+OXWpSew==", "cpu": [ "arm" ], @@ -3090,13 +3106,13 @@ "android" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/android-arm64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.17.19.tgz", - "integrity": "sha512-KBMWvEZooR7+kzY0BtbTQn0OAYY7CsiydT63pVEaPtVYF0hXbUaOyZog37DKxK7NF3XacBJOpYT4adIJh+avxA==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.24.0.tgz", + "integrity": "sha512-Vsm497xFM7tTIPYK9bNTYJyF/lsP590Qc1WxJdlB6ljCbdZKU9SY8i7+Iin4kyhV/KV5J2rOKsBQbB77Ab7L/w==", "cpu": [ "arm64" ], @@ -3106,13 +3122,13 @@ "android" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/android-x64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.17.19.tgz", - "integrity": "sha512-uUTTc4xGNDT7YSArp/zbtmbhO0uEEK9/ETW29Wk1thYUJBz3IVnvgEiEwEa9IeLyvnpKrWK64Utw2bgUmDveww==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.24.0.tgz", + "integrity": "sha512-t8GrvnFkiIY7pa7mMgJd7p8p8qqYIz1NYiAoKc75Zyv73L3DZW++oYMSHPRarcotTKuSs6m3hTOa5CKHaS02TQ==", "cpu": [ "x64" ], @@ -3122,13 +3138,13 @@ "android" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/darwin-arm64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.17.19.tgz", - "integrity": "sha512-80wEoCfF/hFKM6WE1FyBHc9SfUblloAWx6FJkFWTWiCoht9Mc0ARGEM47e67W9rI09YoUxJL68WHfDRYEAvOhg==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.24.0.tgz", + "integrity": "sha512-CKyDpRbK1hXwv79soeTJNHb5EiG6ct3efd/FTPdzOWdbZZfGhpbcqIpiD0+vwmpu0wTIL97ZRPZu8vUt46nBSw==", "cpu": [ "arm64" ], @@ -3138,13 +3154,13 @@ "darwin" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/darwin-x64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.17.19.tgz", - "integrity": "sha512-IJM4JJsLhRYr9xdtLytPLSH9k/oxR3boaUIYiHkAawtwNOXKE8KoU8tMvryogdcT8AU+Bflmh81Xn6Q0vTZbQw==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.24.0.tgz", + "integrity": "sha512-rgtz6flkVkh58od4PwTRqxbKH9cOjaXCMZgWD905JOzjFKW+7EiUObfd/Kav+A6Gyud6WZk9w+xu6QLytdi2OA==", "cpu": [ "x64" ], @@ -3154,13 +3170,13 @@ "darwin" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/freebsd-arm64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.17.19.tgz", - "integrity": "sha512-pBwbc7DufluUeGdjSU5Si+P3SoMF5DQ/F/UmTSb8HXO80ZEAJmrykPyzo1IfNbAoaqw48YRpv8shwd1NoI0jcQ==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.24.0.tgz", + "integrity": "sha512-6Mtdq5nHggwfDNLAHkPlyLBpE5L6hwsuXZX8XNmHno9JuL2+bg2BX5tRkwjyfn6sKbxZTq68suOjgWqCicvPXA==", "cpu": [ "arm64" ], @@ -3170,13 +3186,13 @@ "freebsd" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/freebsd-x64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.17.19.tgz", - "integrity": "sha512-4lu+n8Wk0XlajEhbEffdy2xy53dpR06SlzvhGByyg36qJw6Kpfk7cp45DR/62aPH9mtJRmIyrXAS5UWBrJT6TQ==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.24.0.tgz", + "integrity": "sha512-D3H+xh3/zphoX8ck4S2RxKR6gHlHDXXzOf6f/9dbFt/NRBDIE33+cVa49Kil4WUjxMGW0ZIYBYtaGCa2+OsQwQ==", "cpu": [ "x64" ], @@ -3186,13 +3202,13 @@ "freebsd" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-arm": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.17.19.tgz", - "integrity": "sha512-cdmT3KxjlOQ/gZ2cjfrQOtmhG4HJs6hhvm3mWSRDPtZ/lP5oe8FWceS10JaSJC13GBd4eH/haHnqf7hhGNLerA==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.24.0.tgz", + "integrity": "sha512-gJKIi2IjRo5G6Glxb8d3DzYXlxdEj2NlkixPsqePSZMhLudqPhtZ4BUrpIuTjJYXxvF9njql+vRjB2oaC9XpBw==", "cpu": [ "arm" ], @@ -3202,13 +3218,13 @@ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-arm64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.17.19.tgz", - "integrity": "sha512-ct1Tg3WGwd3P+oZYqic+YZF4snNl2bsnMKRkb3ozHmnM0dGWuxcPTTntAF6bOP0Sp4x0PjSF+4uHQ1xvxfRKqg==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.24.0.tgz", + "integrity": "sha512-TDijPXTOeE3eaMkRYpcy3LarIg13dS9wWHRdwYRnzlwlA370rNdZqbcp0WTyyV/k2zSxfko52+C7jU5F9Tfj1g==", "cpu": [ "arm64" ], @@ -3218,13 +3234,13 @@ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-ia32": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.17.19.tgz", - "integrity": "sha512-w4IRhSy1VbsNxHRQpeGCHEmibqdTUx61Vc38APcsRbuVgK0OPEnQ0YD39Brymn96mOx48Y2laBQGqgZ0j9w6SQ==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.24.0.tgz", + "integrity": "sha512-K40ip1LAcA0byL05TbCQ4yJ4swvnbzHscRmUilrmP9Am7//0UjPreh4lpYzvThT2Quw66MhjG//20mrufm40mA==", "cpu": [ "ia32" ], @@ -3234,13 +3250,13 @@ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-loong64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.17.19.tgz", - "integrity": "sha512-2iAngUbBPMq439a+z//gE+9WBldoMp1s5GWsUSgqHLzLJ9WoZLZhpwWuym0u0u/4XmZ3gpHmzV84PonE+9IIdQ==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.24.0.tgz", + "integrity": "sha512-0mswrYP/9ai+CU0BzBfPMZ8RVm3RGAN/lmOMgW4aFUSOQBjA31UP8Mr6DDhWSuMwj7jaWOT0p0WoZ6jeHhrD7g==", "cpu": [ "loong64" ], @@ -3250,13 +3266,13 @@ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-mips64el": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.17.19.tgz", - "integrity": "sha512-LKJltc4LVdMKHsrFe4MGNPp0hqDFA1Wpt3jE1gEyM3nKUvOiO//9PheZZHfYRfYl6AwdTH4aTcXSqBerX0ml4A==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.24.0.tgz", + "integrity": "sha512-hIKvXm0/3w/5+RDtCJeXqMZGkI2s4oMUGj3/jM0QzhgIASWrGO5/RlzAzm5nNh/awHE0A19h/CvHQe6FaBNrRA==", "cpu": [ "mips64el" ], @@ -3266,13 +3282,13 @@ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-ppc64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.17.19.tgz", - "integrity": "sha512-/c/DGybs95WXNS8y3Ti/ytqETiW7EU44MEKuCAcpPto3YjQbyK3IQVKfF6nbghD7EcLUGl0NbiL5Rt5DMhn5tg==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.24.0.tgz", + "integrity": "sha512-HcZh5BNq0aC52UoocJxaKORfFODWXZxtBaaZNuN3PUX3MoDsChsZqopzi5UupRhPHSEHotoiptqikjN/B77mYQ==", "cpu": [ "ppc64" ], @@ -3282,13 +3298,13 @@ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-riscv64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.17.19.tgz", - "integrity": "sha512-FC3nUAWhvFoutlhAkgHf8f5HwFWUL6bYdvLc/TTuxKlvLi3+pPzdZiFKSWz/PF30TB1K19SuCxDTI5KcqASJqA==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.24.0.tgz", + "integrity": "sha512-bEh7dMn/h3QxeR2KTy1DUszQjUrIHPZKyO6aN1X4BCnhfYhuQqedHaa5MxSQA/06j3GpiIlFGSsy1c7Gf9padw==", "cpu": [ "riscv64" ], @@ -3298,13 +3314,13 @@ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-s390x": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.17.19.tgz", - "integrity": "sha512-IbFsFbxMWLuKEbH+7sTkKzL6NJmG2vRyy6K7JJo55w+8xDk7RElYn6xvXtDW8HCfoKBFK69f3pgBJSUSQPr+4Q==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.24.0.tgz", + "integrity": "sha512-ZcQ6+qRkw1UcZGPyrCiHHkmBaj9SiCD8Oqd556HldP+QlpUIe2Wgn3ehQGVoPOvZvtHm8HPx+bH20c9pvbkX3g==", "cpu": [ "s390x" ], @@ -3314,13 +3330,13 @@ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-x64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.17.19.tgz", - "integrity": "sha512-68ngA9lg2H6zkZcyp22tsVt38mlhWde8l3eJLWkyLrp4HwMUr3c1s/M2t7+kHIhvMjglIBrFpncX1SzMckomGw==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.24.0.tgz", + "integrity": "sha512-vbutsFqQ+foy3wSSbmjBXXIJ6PL3scghJoM8zCL142cGaZKAdCZHyf+Bpu/MmX9zT9Q0zFBVKb36Ma5Fzfa8xA==", "cpu": [ "x64" ], @@ -3330,13 +3346,13 @@ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/netbsd-x64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.17.19.tgz", - "integrity": "sha512-CwFq42rXCR8TYIjIfpXCbRX0rp1jo6cPIUPSaWwzbVI4aOfX96OXY8M6KNmtPcg7QjYeDmN+DD0Wp3LaBOLf4Q==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.24.0.tgz", + "integrity": "sha512-hjQ0R/ulkO8fCYFsG0FZoH+pWgTTDreqpqY7UnQntnaKv95uP5iW3+dChxnx7C3trQQU40S+OgWhUVwCjVFLvg==", "cpu": [ "x64" ], @@ -3346,13 +3362,29 @@ "netbsd" ], "engines": { - "node": ">=12" + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-arm64": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.24.0.tgz", + "integrity": "sha512-MD9uzzkPQbYehwcN583yx3Tu5M8EIoTD+tUgKF982WYL9Pf5rKy9ltgD0eUgs8pvKnmizxjXZyLt0z6DC3rRXg==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" } }, "node_modules/@esbuild/openbsd-x64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.17.19.tgz", - "integrity": "sha512-cnq5brJYrSZ2CF6c35eCmviIN3k3RczmHz8eYaVlNasVqsNY+JKohZU5MKmaOI+KkllCdzOKKdPs762VCPC20g==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.24.0.tgz", + "integrity": "sha512-4ir0aY1NGUhIC1hdoCzr1+5b43mw99uNwVzhIq1OY3QcEwPDO3B7WNXBzaKY5Nsf1+N11i1eOfFcq+D/gOS15Q==", "cpu": [ "x64" ], @@ -3362,13 +3394,13 @@ "openbsd" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/sunos-x64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.17.19.tgz", - "integrity": "sha512-vCRT7yP3zX+bKWFeP/zdS6SqdWB8OIpaRq/mbXQxTGHnIxspRtigpkUcDMlSCOejlHowLqII7K2JKevwyRP2rg==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.24.0.tgz", + "integrity": "sha512-jVzdzsbM5xrotH+W5f1s+JtUy1UWgjU0Cf4wMvffTB8m6wP5/kx0KiaLHlbJO+dMgtxKV8RQ/JvtlFcdZ1zCPA==", "cpu": [ "x64" ], @@ -3378,13 +3410,13 @@ "sunos" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/win32-arm64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.17.19.tgz", - "integrity": "sha512-yYx+8jwowUstVdorcMdNlzklLYhPxjniHWFKgRqH7IFlUEa0Umu3KuYplf1HUZZ422e3NU9F4LGb+4O0Kdcaag==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.24.0.tgz", + "integrity": "sha512-iKc8GAslzRpBytO2/aN3d2yb2z8XTVfNV0PjGlCxKo5SgWmNXx82I/Q3aG1tFfS+A2igVCY97TJ8tnYwpUWLCA==", "cpu": [ "arm64" ], @@ -3394,13 +3426,13 @@ "win32" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/win32-ia32": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.17.19.tgz", - "integrity": "sha512-eggDKanJszUtCdlVs0RB+h35wNlb5v4TWEkq4vZcmVt5u/HiDZrTXe2bWFQUez3RgNHwx/x4sk5++4NSSicKkw==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.24.0.tgz", + "integrity": "sha512-vQW36KZolfIudCcTnaTpmLQ24Ha1RjygBo39/aLkM2kmjkWmZGEJ5Gn9l5/7tzXA42QGIoWbICfg6KLLkIw6yw==", "cpu": [ "ia32" ], @@ -3410,13 +3442,13 @@ "win32" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/win32-x64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.17.19.tgz", - "integrity": "sha512-lAhycmKnVOuRYNtRtatQR1LPQf2oYCkRGkSFnseDAKPl8lu5SOsK/e1sXe5a0Pc5kHIHe6P2I/ilntNv2xf3cA==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.24.0.tgz", + "integrity": "sha512-7IAFPrjSQIJrGsK6flwg7NFmwBoSTyF3rl7If0hNUFQU4ilTsEPL6GuMuU9BfIWVVGuRnuIidkSMC+c0Otu8IA==", "cpu": [ "x64" ], @@ -3426,7 +3458,7 @@ "win32" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@eslint-community/eslint-utils": { @@ -7899,40 +7931,42 @@ } }, "node_modules/esbuild": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.17.19.tgz", - "integrity": "sha512-XQ0jAPFkK/u3LcVRcvVHQcTIqD6E2H1fvZMA5dQPSOWb3suUbWbfbRf94pjc0bNzRYLfIrDRQXr7X+LHIm5oHw==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.24.0.tgz", + "integrity": "sha512-FuLPevChGDshgSicjisSooU0cemp/sGXR841D5LHMB7mTVOmsEHcAxaH3irL53+8YDIeVNQEySh4DaYU/iuPqQ==", "dev": true, "hasInstallScript": true, "bin": { "esbuild": "bin/esbuild" }, "engines": { - "node": ">=12" + "node": ">=18" }, "optionalDependencies": { - "@esbuild/android-arm": "0.17.19", - "@esbuild/android-arm64": "0.17.19", - "@esbuild/android-x64": "0.17.19", - "@esbuild/darwin-arm64": "0.17.19", - "@esbuild/darwin-x64": "0.17.19", - "@esbuild/freebsd-arm64": "0.17.19", - "@esbuild/freebsd-x64": "0.17.19", - "@esbuild/linux-arm": "0.17.19", - "@esbuild/linux-arm64": "0.17.19", - "@esbuild/linux-ia32": "0.17.19", - "@esbuild/linux-loong64": "0.17.19", - "@esbuild/linux-mips64el": "0.17.19", - "@esbuild/linux-ppc64": "0.17.19", - "@esbuild/linux-riscv64": "0.17.19", - "@esbuild/linux-s390x": "0.17.19", - "@esbuild/linux-x64": "0.17.19", - "@esbuild/netbsd-x64": "0.17.19", - "@esbuild/openbsd-x64": "0.17.19", - "@esbuild/sunos-x64": "0.17.19", - "@esbuild/win32-arm64": "0.17.19", - "@esbuild/win32-ia32": "0.17.19", - "@esbuild/win32-x64": "0.17.19" + "@esbuild/aix-ppc64": "0.24.0", + "@esbuild/android-arm": "0.24.0", + "@esbuild/android-arm64": "0.24.0", + "@esbuild/android-x64": "0.24.0", + "@esbuild/darwin-arm64": "0.24.0", + "@esbuild/darwin-x64": "0.24.0", + "@esbuild/freebsd-arm64": "0.24.0", + "@esbuild/freebsd-x64": "0.24.0", + "@esbuild/linux-arm": "0.24.0", + "@esbuild/linux-arm64": "0.24.0", + "@esbuild/linux-ia32": "0.24.0", + "@esbuild/linux-loong64": "0.24.0", + "@esbuild/linux-mips64el": "0.24.0", + "@esbuild/linux-ppc64": "0.24.0", + "@esbuild/linux-riscv64": "0.24.0", + "@esbuild/linux-s390x": "0.24.0", + "@esbuild/linux-x64": "0.24.0", + "@esbuild/netbsd-x64": "0.24.0", + "@esbuild/openbsd-arm64": "0.24.0", + "@esbuild/openbsd-x64": "0.24.0", + "@esbuild/sunos-x64": "0.24.0", + "@esbuild/win32-arm64": "0.24.0", + "@esbuild/win32-ia32": "0.24.0", + "@esbuild/win32-x64": "0.24.0" } }, "node_modules/escalade": { diff --git a/core/package.json b/core/package.json index f6f194d7f..4abdd2281 100644 --- a/core/package.json +++ b/core/package.json @@ -32,7 +32,7 @@ "@types/uuid": "^9.0.7", "@types/win-ca": "^3.5.4", "cross-env": "^7.0.3", - "esbuild": "0.17.19", + "esbuild": "0.24.0", "eslint": "^8", "jest": "^29.7.0", "jest-environment-jsdom": "^29.7.0", diff --git a/extensions/vscode/package-lock.json b/extensions/vscode/package-lock.json index c0dfc8306..43d3f0d81 100644 --- a/extensions/vscode/package-lock.json +++ b/extensions/vscode/package-lock.json @@ -22,7 +22,7 @@ "dbinfoz": "^0.14.0", "diff": "^7.0.0", "downshift": "^7.6.0", - "esbuild": "^0.17.19", + "esbuild": "0.24.0", "express": "^4.18.2", "fkill": "^8.1.0", "follow-redirects": "^1.15.4", @@ -79,7 +79,7 @@ "@vscode/vsce": "^2.22.0", "cargo-cp-artifact": "^0.1", "chai": "^4.5.0", - "esbuild": "0.17.19", + "esbuild": "0.24.0", "esbuild-visualizer": "^0.6.0", "eslint": "^8.28.0", "glob": "^8.0.3", @@ -186,7 +186,7 @@ "@types/uuid": "^9.0.7", "@types/win-ca": "^3.5.4", "cross-env": "^7.0.3", - "esbuild": "0.17.19", + "esbuild": "0.24.0", "eslint": "^8", "jest": "^29.7.0", "jest-environment-jsdom": "^29.7.0", @@ -758,10 +758,26 @@ "node": ">=12.13.0" } }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.24.0.tgz", + "integrity": "sha512-WtKdFM7ls47zkKHFVzMz8opM7LkcsIp9amDUBIAWirg70RM71WRSjdILPsY5Uv1D42ZpUfaPILDlfactHgsRkw==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=18" + } + }, "node_modules/@esbuild/android-arm": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.17.19.tgz", - "integrity": "sha512-rIKddzqhmav7MSmoFCmDIb6e2W57geRsM94gV2l38fzhXMwq7hZoClug9USI2pFRGL06f4IOPHHpFNOkWieR8A==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.24.0.tgz", + "integrity": "sha512-arAtTPo76fJ/ICkXWetLCc9EwEHKaeya4vMrReVlEIUCAUncH7M4bhMQ+M9Vf+FFOZJdTNMXNBrWwW+OXWpSew==", "cpu": [ "arm" ], @@ -771,13 +787,13 @@ "android" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/android-arm64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.17.19.tgz", - "integrity": "sha512-KBMWvEZooR7+kzY0BtbTQn0OAYY7CsiydT63pVEaPtVYF0hXbUaOyZog37DKxK7NF3XacBJOpYT4adIJh+avxA==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.24.0.tgz", + "integrity": "sha512-Vsm497xFM7tTIPYK9bNTYJyF/lsP590Qc1WxJdlB6ljCbdZKU9SY8i7+Iin4kyhV/KV5J2rOKsBQbB77Ab7L/w==", "cpu": [ "arm64" ], @@ -787,13 +803,13 @@ "android" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/android-x64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.17.19.tgz", - "integrity": "sha512-uUTTc4xGNDT7YSArp/zbtmbhO0uEEK9/ETW29Wk1thYUJBz3IVnvgEiEwEa9IeLyvnpKrWK64Utw2bgUmDveww==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.24.0.tgz", + "integrity": "sha512-t8GrvnFkiIY7pa7mMgJd7p8p8qqYIz1NYiAoKc75Zyv73L3DZW++oYMSHPRarcotTKuSs6m3hTOa5CKHaS02TQ==", "cpu": [ "x64" ], @@ -803,13 +819,13 @@ "android" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/darwin-arm64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.17.19.tgz", - "integrity": "sha512-80wEoCfF/hFKM6WE1FyBHc9SfUblloAWx6FJkFWTWiCoht9Mc0ARGEM47e67W9rI09YoUxJL68WHfDRYEAvOhg==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.24.0.tgz", + "integrity": "sha512-CKyDpRbK1hXwv79soeTJNHb5EiG6ct3efd/FTPdzOWdbZZfGhpbcqIpiD0+vwmpu0wTIL97ZRPZu8vUt46nBSw==", "cpu": [ "arm64" ], @@ -819,13 +835,13 @@ "darwin" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/darwin-x64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.17.19.tgz", - "integrity": "sha512-IJM4JJsLhRYr9xdtLytPLSH9k/oxR3boaUIYiHkAawtwNOXKE8KoU8tMvryogdcT8AU+Bflmh81Xn6Q0vTZbQw==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.24.0.tgz", + "integrity": "sha512-rgtz6flkVkh58od4PwTRqxbKH9cOjaXCMZgWD905JOzjFKW+7EiUObfd/Kav+A6Gyud6WZk9w+xu6QLytdi2OA==", "cpu": [ "x64" ], @@ -835,13 +851,13 @@ "darwin" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/freebsd-arm64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.17.19.tgz", - "integrity": "sha512-pBwbc7DufluUeGdjSU5Si+P3SoMF5DQ/F/UmTSb8HXO80ZEAJmrykPyzo1IfNbAoaqw48YRpv8shwd1NoI0jcQ==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.24.0.tgz", + "integrity": "sha512-6Mtdq5nHggwfDNLAHkPlyLBpE5L6hwsuXZX8XNmHno9JuL2+bg2BX5tRkwjyfn6sKbxZTq68suOjgWqCicvPXA==", "cpu": [ "arm64" ], @@ -851,13 +867,13 @@ "freebsd" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/freebsd-x64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.17.19.tgz", - "integrity": "sha512-4lu+n8Wk0XlajEhbEffdy2xy53dpR06SlzvhGByyg36qJw6Kpfk7cp45DR/62aPH9mtJRmIyrXAS5UWBrJT6TQ==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.24.0.tgz", + "integrity": "sha512-D3H+xh3/zphoX8ck4S2RxKR6gHlHDXXzOf6f/9dbFt/NRBDIE33+cVa49Kil4WUjxMGW0ZIYBYtaGCa2+OsQwQ==", "cpu": [ "x64" ], @@ -867,13 +883,13 @@ "freebsd" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-arm": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.17.19.tgz", - "integrity": "sha512-cdmT3KxjlOQ/gZ2cjfrQOtmhG4HJs6hhvm3mWSRDPtZ/lP5oe8FWceS10JaSJC13GBd4eH/haHnqf7hhGNLerA==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.24.0.tgz", + "integrity": "sha512-gJKIi2IjRo5G6Glxb8d3DzYXlxdEj2NlkixPsqePSZMhLudqPhtZ4BUrpIuTjJYXxvF9njql+vRjB2oaC9XpBw==", "cpu": [ "arm" ], @@ -883,13 +899,13 @@ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-arm64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.17.19.tgz", - "integrity": "sha512-ct1Tg3WGwd3P+oZYqic+YZF4snNl2bsnMKRkb3ozHmnM0dGWuxcPTTntAF6bOP0Sp4x0PjSF+4uHQ1xvxfRKqg==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.24.0.tgz", + "integrity": "sha512-TDijPXTOeE3eaMkRYpcy3LarIg13dS9wWHRdwYRnzlwlA370rNdZqbcp0WTyyV/k2zSxfko52+C7jU5F9Tfj1g==", "cpu": [ "arm64" ], @@ -899,13 +915,13 @@ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-ia32": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.17.19.tgz", - "integrity": "sha512-w4IRhSy1VbsNxHRQpeGCHEmibqdTUx61Vc38APcsRbuVgK0OPEnQ0YD39Brymn96mOx48Y2laBQGqgZ0j9w6SQ==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.24.0.tgz", + "integrity": "sha512-K40ip1LAcA0byL05TbCQ4yJ4swvnbzHscRmUilrmP9Am7//0UjPreh4lpYzvThT2Quw66MhjG//20mrufm40mA==", "cpu": [ "ia32" ], @@ -915,13 +931,13 @@ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-loong64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.17.19.tgz", - "integrity": "sha512-2iAngUbBPMq439a+z//gE+9WBldoMp1s5GWsUSgqHLzLJ9WoZLZhpwWuym0u0u/4XmZ3gpHmzV84PonE+9IIdQ==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.24.0.tgz", + "integrity": "sha512-0mswrYP/9ai+CU0BzBfPMZ8RVm3RGAN/lmOMgW4aFUSOQBjA31UP8Mr6DDhWSuMwj7jaWOT0p0WoZ6jeHhrD7g==", "cpu": [ "loong64" ], @@ -931,13 +947,13 @@ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-mips64el": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.17.19.tgz", - "integrity": "sha512-LKJltc4LVdMKHsrFe4MGNPp0hqDFA1Wpt3jE1gEyM3nKUvOiO//9PheZZHfYRfYl6AwdTH4aTcXSqBerX0ml4A==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.24.0.tgz", + "integrity": "sha512-hIKvXm0/3w/5+RDtCJeXqMZGkI2s4oMUGj3/jM0QzhgIASWrGO5/RlzAzm5nNh/awHE0A19h/CvHQe6FaBNrRA==", "cpu": [ "mips64el" ], @@ -947,13 +963,13 @@ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-ppc64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.17.19.tgz", - "integrity": "sha512-/c/DGybs95WXNS8y3Ti/ytqETiW7EU44MEKuCAcpPto3YjQbyK3IQVKfF6nbghD7EcLUGl0NbiL5Rt5DMhn5tg==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.24.0.tgz", + "integrity": "sha512-HcZh5BNq0aC52UoocJxaKORfFODWXZxtBaaZNuN3PUX3MoDsChsZqopzi5UupRhPHSEHotoiptqikjN/B77mYQ==", "cpu": [ "ppc64" ], @@ -963,13 +979,13 @@ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-riscv64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.17.19.tgz", - "integrity": "sha512-FC3nUAWhvFoutlhAkgHf8f5HwFWUL6bYdvLc/TTuxKlvLi3+pPzdZiFKSWz/PF30TB1K19SuCxDTI5KcqASJqA==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.24.0.tgz", + "integrity": "sha512-bEh7dMn/h3QxeR2KTy1DUszQjUrIHPZKyO6aN1X4BCnhfYhuQqedHaa5MxSQA/06j3GpiIlFGSsy1c7Gf9padw==", "cpu": [ "riscv64" ], @@ -979,13 +995,13 @@ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-s390x": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.17.19.tgz", - "integrity": "sha512-IbFsFbxMWLuKEbH+7sTkKzL6NJmG2vRyy6K7JJo55w+8xDk7RElYn6xvXtDW8HCfoKBFK69f3pgBJSUSQPr+4Q==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.24.0.tgz", + "integrity": "sha512-ZcQ6+qRkw1UcZGPyrCiHHkmBaj9SiCD8Oqd556HldP+QlpUIe2Wgn3ehQGVoPOvZvtHm8HPx+bH20c9pvbkX3g==", "cpu": [ "s390x" ], @@ -995,13 +1011,13 @@ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-x64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.17.19.tgz", - "integrity": "sha512-68ngA9lg2H6zkZcyp22tsVt38mlhWde8l3eJLWkyLrp4HwMUr3c1s/M2t7+kHIhvMjglIBrFpncX1SzMckomGw==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.24.0.tgz", + "integrity": "sha512-vbutsFqQ+foy3wSSbmjBXXIJ6PL3scghJoM8zCL142cGaZKAdCZHyf+Bpu/MmX9zT9Q0zFBVKb36Ma5Fzfa8xA==", "cpu": [ "x64" ], @@ -1011,13 +1027,13 @@ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/netbsd-x64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.17.19.tgz", - "integrity": "sha512-CwFq42rXCR8TYIjIfpXCbRX0rp1jo6cPIUPSaWwzbVI4aOfX96OXY8M6KNmtPcg7QjYeDmN+DD0Wp3LaBOLf4Q==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.24.0.tgz", + "integrity": "sha512-hjQ0R/ulkO8fCYFsG0FZoH+pWgTTDreqpqY7UnQntnaKv95uP5iW3+dChxnx7C3trQQU40S+OgWhUVwCjVFLvg==", "cpu": [ "x64" ], @@ -1027,13 +1043,29 @@ "netbsd" ], "engines": { - "node": ">=12" + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-arm64": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.24.0.tgz", + "integrity": "sha512-MD9uzzkPQbYehwcN583yx3Tu5M8EIoTD+tUgKF982WYL9Pf5rKy9ltgD0eUgs8pvKnmizxjXZyLt0z6DC3rRXg==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" } }, "node_modules/@esbuild/openbsd-x64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.17.19.tgz", - "integrity": "sha512-cnq5brJYrSZ2CF6c35eCmviIN3k3RczmHz8eYaVlNasVqsNY+JKohZU5MKmaOI+KkllCdzOKKdPs762VCPC20g==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.24.0.tgz", + "integrity": "sha512-4ir0aY1NGUhIC1hdoCzr1+5b43mw99uNwVzhIq1OY3QcEwPDO3B7WNXBzaKY5Nsf1+N11i1eOfFcq+D/gOS15Q==", "cpu": [ "x64" ], @@ -1043,13 +1075,13 @@ "openbsd" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/sunos-x64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.17.19.tgz", - "integrity": "sha512-vCRT7yP3zX+bKWFeP/zdS6SqdWB8OIpaRq/mbXQxTGHnIxspRtigpkUcDMlSCOejlHowLqII7K2JKevwyRP2rg==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.24.0.tgz", + "integrity": "sha512-jVzdzsbM5xrotH+W5f1s+JtUy1UWgjU0Cf4wMvffTB8m6wP5/kx0KiaLHlbJO+dMgtxKV8RQ/JvtlFcdZ1zCPA==", "cpu": [ "x64" ], @@ -1059,13 +1091,13 @@ "sunos" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/win32-arm64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.17.19.tgz", - "integrity": "sha512-yYx+8jwowUstVdorcMdNlzklLYhPxjniHWFKgRqH7IFlUEa0Umu3KuYplf1HUZZ422e3NU9F4LGb+4O0Kdcaag==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.24.0.tgz", + "integrity": "sha512-iKc8GAslzRpBytO2/aN3d2yb2z8XTVfNV0PjGlCxKo5SgWmNXx82I/Q3aG1tFfS+A2igVCY97TJ8tnYwpUWLCA==", "cpu": [ "arm64" ], @@ -1075,13 +1107,13 @@ "win32" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/win32-ia32": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.17.19.tgz", - "integrity": "sha512-eggDKanJszUtCdlVs0RB+h35wNlb5v4TWEkq4vZcmVt5u/HiDZrTXe2bWFQUez3RgNHwx/x4sk5++4NSSicKkw==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.24.0.tgz", + "integrity": "sha512-vQW36KZolfIudCcTnaTpmLQ24Ha1RjygBo39/aLkM2kmjkWmZGEJ5Gn9l5/7tzXA42QGIoWbICfg6KLLkIw6yw==", "cpu": [ "ia32" ], @@ -1091,13 +1123,13 @@ "win32" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/win32-x64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.17.19.tgz", - "integrity": "sha512-lAhycmKnVOuRYNtRtatQR1LPQf2oYCkRGkSFnseDAKPl8lu5SOsK/e1sXe5a0Pc5kHIHe6P2I/ilntNv2xf3cA==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.24.0.tgz", + "integrity": "sha512-7IAFPrjSQIJrGsK6flwg7NFmwBoSTyF3rl7If0hNUFQU4ilTsEPL6GuMuU9BfIWVVGuRnuIidkSMC+c0Otu8IA==", "cpu": [ "x64" ], @@ -1107,7 +1139,7 @@ "win32" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@eslint-community/eslint-utils": { @@ -5320,40 +5352,42 @@ } }, "node_modules/esbuild": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.17.19.tgz", - "integrity": "sha512-XQ0jAPFkK/u3LcVRcvVHQcTIqD6E2H1fvZMA5dQPSOWb3suUbWbfbRf94pjc0bNzRYLfIrDRQXr7X+LHIm5oHw==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.24.0.tgz", + "integrity": "sha512-FuLPevChGDshgSicjisSooU0cemp/sGXR841D5LHMB7mTVOmsEHcAxaH3irL53+8YDIeVNQEySh4DaYU/iuPqQ==", "dev": true, "hasInstallScript": true, "bin": { "esbuild": "bin/esbuild" }, "engines": { - "node": ">=12" + "node": ">=18" }, "optionalDependencies": { - "@esbuild/android-arm": "0.17.19", - "@esbuild/android-arm64": "0.17.19", - "@esbuild/android-x64": "0.17.19", - "@esbuild/darwin-arm64": "0.17.19", - "@esbuild/darwin-x64": "0.17.19", - "@esbuild/freebsd-arm64": "0.17.19", - "@esbuild/freebsd-x64": "0.17.19", - "@esbuild/linux-arm": "0.17.19", - "@esbuild/linux-arm64": "0.17.19", - "@esbuild/linux-ia32": "0.17.19", - "@esbuild/linux-loong64": "0.17.19", - "@esbuild/linux-mips64el": "0.17.19", - "@esbuild/linux-ppc64": "0.17.19", - "@esbuild/linux-riscv64": "0.17.19", - "@esbuild/linux-s390x": "0.17.19", - "@esbuild/linux-x64": "0.17.19", - "@esbuild/netbsd-x64": "0.17.19", - "@esbuild/openbsd-x64": "0.17.19", - "@esbuild/sunos-x64": "0.17.19", - "@esbuild/win32-arm64": "0.17.19", - "@esbuild/win32-ia32": "0.17.19", - "@esbuild/win32-x64": "0.17.19" + "@esbuild/aix-ppc64": "0.24.0", + "@esbuild/android-arm": "0.24.0", + "@esbuild/android-arm64": "0.24.0", + "@esbuild/android-x64": "0.24.0", + "@esbuild/darwin-arm64": "0.24.0", + "@esbuild/darwin-x64": "0.24.0", + "@esbuild/freebsd-arm64": "0.24.0", + "@esbuild/freebsd-x64": "0.24.0", + "@esbuild/linux-arm": "0.24.0", + "@esbuild/linux-arm64": "0.24.0", + "@esbuild/linux-ia32": "0.24.0", + "@esbuild/linux-loong64": "0.24.0", + "@esbuild/linux-mips64el": "0.24.0", + "@esbuild/linux-ppc64": "0.24.0", + "@esbuild/linux-riscv64": "0.24.0", + "@esbuild/linux-s390x": "0.24.0", + "@esbuild/linux-x64": "0.24.0", + "@esbuild/netbsd-x64": "0.24.0", + "@esbuild/openbsd-arm64": "0.24.0", + "@esbuild/openbsd-x64": "0.24.0", + "@esbuild/sunos-x64": "0.24.0", + "@esbuild/win32-arm64": "0.24.0", + "@esbuild/win32-ia32": "0.24.0", + "@esbuild/win32-x64": "0.24.0" } }, "node_modules/esbuild-visualizer": { diff --git a/extensions/vscode/package.json b/extensions/vscode/package.json index 57bdfea44..fd5f69014 100644 --- a/extensions/vscode/package.json +++ b/extensions/vscode/package.json @@ -656,7 +656,7 @@ "@vscode/vsce": "^2.22.0", "cargo-cp-artifact": "^0.1", "chai": "^4.5.0", - "esbuild": "0.17.19", + "esbuild": "0.24.0", "esbuild-visualizer": "^0.6.0", "eslint": "^8.28.0", "glob": "^8.0.3", @@ -683,7 +683,7 @@ "dbinfoz": "^0.14.0", "diff": "^7.0.0", "downshift": "^7.6.0", - "esbuild": "^0.17.19", + "esbuild": "0.24.0", "express": "^4.18.2", "fkill": "^8.1.0", "follow-redirects": "^1.15.4", diff --git a/extensions/vscode/scripts/prepackage.js b/extensions/vscode/scripts/prepackage.js index 20229018f..8ba77dbf1 100644 --- a/extensions/vscode/scripts/prepackage.js +++ b/extensions/vscode/scripts/prepackage.js @@ -387,7 +387,7 @@ const isMacTarget = target?.startsWith("darwin"); // Download esbuild from npm in tmp and copy over console.log("npm installing esbuild binary"); await installNodeModuleInTempDirAndCopyToCurrent( - "esbuild@0.17.19", + "esbuild@0.24.0", "@esbuild", ); } diff --git a/gui/package-lock.json b/gui/package-lock.json index 5c134a9e6..9abf7aeee 100644 --- a/gui/package-lock.json +++ b/gui/package-lock.json @@ -188,7 +188,7 @@ "@types/uuid": "^9.0.7", "@types/win-ca": "^3.5.4", "cross-env": "^7.0.3", - "esbuild": "0.17.19", + "esbuild": "0.24.0", "eslint": "^8", "jest": "^29.7.0", "jest-environment-jsdom": "^29.7.0", From 0e7ea0fdb04ed91263b885ba6b7525e9fe495f51 Mon Sep 17 00:00:00 2001 From: tomasz-io Date: Wed, 12 Feb 2025 13:39:04 -0800 Subject: [PATCH 174/262] Revert "improv: upgrade esbuild" This reverts commit 0ef4d66016c0278e8e24c5b796f6efed33883cac. --- binary/package-lock.json | 2 +- core/package-lock.json | 264 ++++++++++------------- core/package.json | 2 +- extensions/vscode/package-lock.json | 268 +++++++++++------------- extensions/vscode/package.json | 4 +- extensions/vscode/scripts/prepackage.js | 2 +- gui/package-lock.json | 2 +- 7 files changed, 238 insertions(+), 306 deletions(-) diff --git a/binary/package-lock.json b/binary/package-lock.json index d3058c4d6..7454d88e7 100644 --- a/binary/package-lock.json +++ b/binary/package-lock.json @@ -128,7 +128,7 @@ "@types/uuid": "^9.0.7", "@types/win-ca": "^3.5.4", "cross-env": "^7.0.3", - "esbuild": "0.24.0", + "esbuild": "0.17.19", "eslint": "^8", "jest": "^29.7.0", "jest-environment-jsdom": "^29.7.0", diff --git a/core/package-lock.json b/core/package-lock.json index 211969179..4179cc7a5 100644 --- a/core/package-lock.json +++ b/core/package-lock.json @@ -93,7 +93,7 @@ "@types/uuid": "^9.0.7", "@types/win-ca": "^3.5.4", "cross-env": "^7.0.3", - "esbuild": "0.24.0", + "esbuild": "0.17.19", "eslint": "^8", "jest": "^29.7.0", "jest-environment-jsdom": "^29.7.0", @@ -3077,26 +3077,10 @@ "zod": "^3.23.8" } }, - "node_modules/@esbuild/aix-ppc64": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.24.0.tgz", - "integrity": "sha512-WtKdFM7ls47zkKHFVzMz8opM7LkcsIp9amDUBIAWirg70RM71WRSjdILPsY5Uv1D42ZpUfaPILDlfactHgsRkw==", - "cpu": [ - "ppc64" - ], - "dev": true, - "optional": true, - "os": [ - "aix" - ], - "engines": { - "node": ">=18" - } - }, "node_modules/@esbuild/android-arm": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.24.0.tgz", - "integrity": "sha512-arAtTPo76fJ/ICkXWetLCc9EwEHKaeya4vMrReVlEIUCAUncH7M4bhMQ+M9Vf+FFOZJdTNMXNBrWwW+OXWpSew==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.17.19.tgz", + "integrity": "sha512-rIKddzqhmav7MSmoFCmDIb6e2W57geRsM94gV2l38fzhXMwq7hZoClug9USI2pFRGL06f4IOPHHpFNOkWieR8A==", "cpu": [ "arm" ], @@ -3106,13 +3090,13 @@ "android" ], "engines": { - "node": ">=18" + "node": ">=12" } }, "node_modules/@esbuild/android-arm64": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.24.0.tgz", - "integrity": "sha512-Vsm497xFM7tTIPYK9bNTYJyF/lsP590Qc1WxJdlB6ljCbdZKU9SY8i7+Iin4kyhV/KV5J2rOKsBQbB77Ab7L/w==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.17.19.tgz", + "integrity": "sha512-KBMWvEZooR7+kzY0BtbTQn0OAYY7CsiydT63pVEaPtVYF0hXbUaOyZog37DKxK7NF3XacBJOpYT4adIJh+avxA==", "cpu": [ "arm64" ], @@ -3122,13 +3106,13 @@ "android" ], "engines": { - "node": ">=18" + "node": ">=12" } }, "node_modules/@esbuild/android-x64": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.24.0.tgz", - "integrity": "sha512-t8GrvnFkiIY7pa7mMgJd7p8p8qqYIz1NYiAoKc75Zyv73L3DZW++oYMSHPRarcotTKuSs6m3hTOa5CKHaS02TQ==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.17.19.tgz", + "integrity": "sha512-uUTTc4xGNDT7YSArp/zbtmbhO0uEEK9/ETW29Wk1thYUJBz3IVnvgEiEwEa9IeLyvnpKrWK64Utw2bgUmDveww==", "cpu": [ "x64" ], @@ -3138,13 +3122,13 @@ "android" ], "engines": { - "node": ">=18" + "node": ">=12" } }, "node_modules/@esbuild/darwin-arm64": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.24.0.tgz", - "integrity": "sha512-CKyDpRbK1hXwv79soeTJNHb5EiG6ct3efd/FTPdzOWdbZZfGhpbcqIpiD0+vwmpu0wTIL97ZRPZu8vUt46nBSw==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.17.19.tgz", + "integrity": "sha512-80wEoCfF/hFKM6WE1FyBHc9SfUblloAWx6FJkFWTWiCoht9Mc0ARGEM47e67W9rI09YoUxJL68WHfDRYEAvOhg==", "cpu": [ "arm64" ], @@ -3154,13 +3138,13 @@ "darwin" ], "engines": { - "node": ">=18" + "node": ">=12" } }, "node_modules/@esbuild/darwin-x64": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.24.0.tgz", - "integrity": "sha512-rgtz6flkVkh58od4PwTRqxbKH9cOjaXCMZgWD905JOzjFKW+7EiUObfd/Kav+A6Gyud6WZk9w+xu6QLytdi2OA==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.17.19.tgz", + "integrity": "sha512-IJM4JJsLhRYr9xdtLytPLSH9k/oxR3boaUIYiHkAawtwNOXKE8KoU8tMvryogdcT8AU+Bflmh81Xn6Q0vTZbQw==", "cpu": [ "x64" ], @@ -3170,13 +3154,13 @@ "darwin" ], "engines": { - "node": ">=18" + "node": ">=12" } }, "node_modules/@esbuild/freebsd-arm64": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.24.0.tgz", - "integrity": "sha512-6Mtdq5nHggwfDNLAHkPlyLBpE5L6hwsuXZX8XNmHno9JuL2+bg2BX5tRkwjyfn6sKbxZTq68suOjgWqCicvPXA==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.17.19.tgz", + "integrity": "sha512-pBwbc7DufluUeGdjSU5Si+P3SoMF5DQ/F/UmTSb8HXO80ZEAJmrykPyzo1IfNbAoaqw48YRpv8shwd1NoI0jcQ==", "cpu": [ "arm64" ], @@ -3186,13 +3170,13 @@ "freebsd" ], "engines": { - "node": ">=18" + "node": ">=12" } }, "node_modules/@esbuild/freebsd-x64": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.24.0.tgz", - "integrity": "sha512-D3H+xh3/zphoX8ck4S2RxKR6gHlHDXXzOf6f/9dbFt/NRBDIE33+cVa49Kil4WUjxMGW0ZIYBYtaGCa2+OsQwQ==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.17.19.tgz", + "integrity": "sha512-4lu+n8Wk0XlajEhbEffdy2xy53dpR06SlzvhGByyg36qJw6Kpfk7cp45DR/62aPH9mtJRmIyrXAS5UWBrJT6TQ==", "cpu": [ "x64" ], @@ -3202,13 +3186,13 @@ "freebsd" ], "engines": { - "node": ">=18" + "node": ">=12" } }, "node_modules/@esbuild/linux-arm": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.24.0.tgz", - "integrity": "sha512-gJKIi2IjRo5G6Glxb8d3DzYXlxdEj2NlkixPsqePSZMhLudqPhtZ4BUrpIuTjJYXxvF9njql+vRjB2oaC9XpBw==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.17.19.tgz", + "integrity": "sha512-cdmT3KxjlOQ/gZ2cjfrQOtmhG4HJs6hhvm3mWSRDPtZ/lP5oe8FWceS10JaSJC13GBd4eH/haHnqf7hhGNLerA==", "cpu": [ "arm" ], @@ -3218,13 +3202,13 @@ "linux" ], "engines": { - "node": ">=18" + "node": ">=12" } }, "node_modules/@esbuild/linux-arm64": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.24.0.tgz", - "integrity": "sha512-TDijPXTOeE3eaMkRYpcy3LarIg13dS9wWHRdwYRnzlwlA370rNdZqbcp0WTyyV/k2zSxfko52+C7jU5F9Tfj1g==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.17.19.tgz", + "integrity": "sha512-ct1Tg3WGwd3P+oZYqic+YZF4snNl2bsnMKRkb3ozHmnM0dGWuxcPTTntAF6bOP0Sp4x0PjSF+4uHQ1xvxfRKqg==", "cpu": [ "arm64" ], @@ -3234,13 +3218,13 @@ "linux" ], "engines": { - "node": ">=18" + "node": ">=12" } }, "node_modules/@esbuild/linux-ia32": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.24.0.tgz", - "integrity": "sha512-K40ip1LAcA0byL05TbCQ4yJ4swvnbzHscRmUilrmP9Am7//0UjPreh4lpYzvThT2Quw66MhjG//20mrufm40mA==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.17.19.tgz", + "integrity": "sha512-w4IRhSy1VbsNxHRQpeGCHEmibqdTUx61Vc38APcsRbuVgK0OPEnQ0YD39Brymn96mOx48Y2laBQGqgZ0j9w6SQ==", "cpu": [ "ia32" ], @@ -3250,13 +3234,13 @@ "linux" ], "engines": { - "node": ">=18" + "node": ">=12" } }, "node_modules/@esbuild/linux-loong64": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.24.0.tgz", - "integrity": "sha512-0mswrYP/9ai+CU0BzBfPMZ8RVm3RGAN/lmOMgW4aFUSOQBjA31UP8Mr6DDhWSuMwj7jaWOT0p0WoZ6jeHhrD7g==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.17.19.tgz", + "integrity": "sha512-2iAngUbBPMq439a+z//gE+9WBldoMp1s5GWsUSgqHLzLJ9WoZLZhpwWuym0u0u/4XmZ3gpHmzV84PonE+9IIdQ==", "cpu": [ "loong64" ], @@ -3266,13 +3250,13 @@ "linux" ], "engines": { - "node": ">=18" + "node": ">=12" } }, "node_modules/@esbuild/linux-mips64el": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.24.0.tgz", - "integrity": "sha512-hIKvXm0/3w/5+RDtCJeXqMZGkI2s4oMUGj3/jM0QzhgIASWrGO5/RlzAzm5nNh/awHE0A19h/CvHQe6FaBNrRA==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.17.19.tgz", + "integrity": "sha512-LKJltc4LVdMKHsrFe4MGNPp0hqDFA1Wpt3jE1gEyM3nKUvOiO//9PheZZHfYRfYl6AwdTH4aTcXSqBerX0ml4A==", "cpu": [ "mips64el" ], @@ -3282,13 +3266,13 @@ "linux" ], "engines": { - "node": ">=18" + "node": ">=12" } }, "node_modules/@esbuild/linux-ppc64": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.24.0.tgz", - "integrity": "sha512-HcZh5BNq0aC52UoocJxaKORfFODWXZxtBaaZNuN3PUX3MoDsChsZqopzi5UupRhPHSEHotoiptqikjN/B77mYQ==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.17.19.tgz", + "integrity": "sha512-/c/DGybs95WXNS8y3Ti/ytqETiW7EU44MEKuCAcpPto3YjQbyK3IQVKfF6nbghD7EcLUGl0NbiL5Rt5DMhn5tg==", "cpu": [ "ppc64" ], @@ -3298,13 +3282,13 @@ "linux" ], "engines": { - "node": ">=18" + "node": ">=12" } }, "node_modules/@esbuild/linux-riscv64": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.24.0.tgz", - "integrity": "sha512-bEh7dMn/h3QxeR2KTy1DUszQjUrIHPZKyO6aN1X4BCnhfYhuQqedHaa5MxSQA/06j3GpiIlFGSsy1c7Gf9padw==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.17.19.tgz", + "integrity": "sha512-FC3nUAWhvFoutlhAkgHf8f5HwFWUL6bYdvLc/TTuxKlvLi3+pPzdZiFKSWz/PF30TB1K19SuCxDTI5KcqASJqA==", "cpu": [ "riscv64" ], @@ -3314,13 +3298,13 @@ "linux" ], "engines": { - "node": ">=18" + "node": ">=12" } }, "node_modules/@esbuild/linux-s390x": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.24.0.tgz", - "integrity": "sha512-ZcQ6+qRkw1UcZGPyrCiHHkmBaj9SiCD8Oqd556HldP+QlpUIe2Wgn3ehQGVoPOvZvtHm8HPx+bH20c9pvbkX3g==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.17.19.tgz", + "integrity": "sha512-IbFsFbxMWLuKEbH+7sTkKzL6NJmG2vRyy6K7JJo55w+8xDk7RElYn6xvXtDW8HCfoKBFK69f3pgBJSUSQPr+4Q==", "cpu": [ "s390x" ], @@ -3330,13 +3314,13 @@ "linux" ], "engines": { - "node": ">=18" + "node": ">=12" } }, "node_modules/@esbuild/linux-x64": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.24.0.tgz", - "integrity": "sha512-vbutsFqQ+foy3wSSbmjBXXIJ6PL3scghJoM8zCL142cGaZKAdCZHyf+Bpu/MmX9zT9Q0zFBVKb36Ma5Fzfa8xA==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.17.19.tgz", + "integrity": "sha512-68ngA9lg2H6zkZcyp22tsVt38mlhWde8l3eJLWkyLrp4HwMUr3c1s/M2t7+kHIhvMjglIBrFpncX1SzMckomGw==", "cpu": [ "x64" ], @@ -3346,13 +3330,13 @@ "linux" ], "engines": { - "node": ">=18" + "node": ">=12" } }, "node_modules/@esbuild/netbsd-x64": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.24.0.tgz", - "integrity": "sha512-hjQ0R/ulkO8fCYFsG0FZoH+pWgTTDreqpqY7UnQntnaKv95uP5iW3+dChxnx7C3trQQU40S+OgWhUVwCjVFLvg==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.17.19.tgz", + "integrity": "sha512-CwFq42rXCR8TYIjIfpXCbRX0rp1jo6cPIUPSaWwzbVI4aOfX96OXY8M6KNmtPcg7QjYeDmN+DD0Wp3LaBOLf4Q==", "cpu": [ "x64" ], @@ -3362,29 +3346,13 @@ "netbsd" ], "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/openbsd-arm64": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.24.0.tgz", - "integrity": "sha512-MD9uzzkPQbYehwcN583yx3Tu5M8EIoTD+tUgKF982WYL9Pf5rKy9ltgD0eUgs8pvKnmizxjXZyLt0z6DC3rRXg==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "openbsd" - ], - "engines": { - "node": ">=18" + "node": ">=12" } }, "node_modules/@esbuild/openbsd-x64": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.24.0.tgz", - "integrity": "sha512-4ir0aY1NGUhIC1hdoCzr1+5b43mw99uNwVzhIq1OY3QcEwPDO3B7WNXBzaKY5Nsf1+N11i1eOfFcq+D/gOS15Q==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.17.19.tgz", + "integrity": "sha512-cnq5brJYrSZ2CF6c35eCmviIN3k3RczmHz8eYaVlNasVqsNY+JKohZU5MKmaOI+KkllCdzOKKdPs762VCPC20g==", "cpu": [ "x64" ], @@ -3394,13 +3362,13 @@ "openbsd" ], "engines": { - "node": ">=18" + "node": ">=12" } }, "node_modules/@esbuild/sunos-x64": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.24.0.tgz", - "integrity": "sha512-jVzdzsbM5xrotH+W5f1s+JtUy1UWgjU0Cf4wMvffTB8m6wP5/kx0KiaLHlbJO+dMgtxKV8RQ/JvtlFcdZ1zCPA==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.17.19.tgz", + "integrity": "sha512-vCRT7yP3zX+bKWFeP/zdS6SqdWB8OIpaRq/mbXQxTGHnIxspRtigpkUcDMlSCOejlHowLqII7K2JKevwyRP2rg==", "cpu": [ "x64" ], @@ -3410,13 +3378,13 @@ "sunos" ], "engines": { - "node": ">=18" + "node": ">=12" } }, "node_modules/@esbuild/win32-arm64": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.24.0.tgz", - "integrity": "sha512-iKc8GAslzRpBytO2/aN3d2yb2z8XTVfNV0PjGlCxKo5SgWmNXx82I/Q3aG1tFfS+A2igVCY97TJ8tnYwpUWLCA==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.17.19.tgz", + "integrity": "sha512-yYx+8jwowUstVdorcMdNlzklLYhPxjniHWFKgRqH7IFlUEa0Umu3KuYplf1HUZZ422e3NU9F4LGb+4O0Kdcaag==", "cpu": [ "arm64" ], @@ -3426,13 +3394,13 @@ "win32" ], "engines": { - "node": ">=18" + "node": ">=12" } }, "node_modules/@esbuild/win32-ia32": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.24.0.tgz", - "integrity": "sha512-vQW36KZolfIudCcTnaTpmLQ24Ha1RjygBo39/aLkM2kmjkWmZGEJ5Gn9l5/7tzXA42QGIoWbICfg6KLLkIw6yw==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.17.19.tgz", + "integrity": "sha512-eggDKanJszUtCdlVs0RB+h35wNlb5v4TWEkq4vZcmVt5u/HiDZrTXe2bWFQUez3RgNHwx/x4sk5++4NSSicKkw==", "cpu": [ "ia32" ], @@ -3442,13 +3410,13 @@ "win32" ], "engines": { - "node": ">=18" + "node": ">=12" } }, "node_modules/@esbuild/win32-x64": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.24.0.tgz", - "integrity": "sha512-7IAFPrjSQIJrGsK6flwg7NFmwBoSTyF3rl7If0hNUFQU4ilTsEPL6GuMuU9BfIWVVGuRnuIidkSMC+c0Otu8IA==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.17.19.tgz", + "integrity": "sha512-lAhycmKnVOuRYNtRtatQR1LPQf2oYCkRGkSFnseDAKPl8lu5SOsK/e1sXe5a0Pc5kHIHe6P2I/ilntNv2xf3cA==", "cpu": [ "x64" ], @@ -3458,7 +3426,7 @@ "win32" ], "engines": { - "node": ">=18" + "node": ">=12" } }, "node_modules/@eslint-community/eslint-utils": { @@ -7931,42 +7899,40 @@ } }, "node_modules/esbuild": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.24.0.tgz", - "integrity": "sha512-FuLPevChGDshgSicjisSooU0cemp/sGXR841D5LHMB7mTVOmsEHcAxaH3irL53+8YDIeVNQEySh4DaYU/iuPqQ==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.17.19.tgz", + "integrity": "sha512-XQ0jAPFkK/u3LcVRcvVHQcTIqD6E2H1fvZMA5dQPSOWb3suUbWbfbRf94pjc0bNzRYLfIrDRQXr7X+LHIm5oHw==", "dev": true, "hasInstallScript": true, "bin": { "esbuild": "bin/esbuild" }, "engines": { - "node": ">=18" + "node": ">=12" }, "optionalDependencies": { - "@esbuild/aix-ppc64": "0.24.0", - "@esbuild/android-arm": "0.24.0", - "@esbuild/android-arm64": "0.24.0", - "@esbuild/android-x64": "0.24.0", - "@esbuild/darwin-arm64": "0.24.0", - "@esbuild/darwin-x64": "0.24.0", - "@esbuild/freebsd-arm64": "0.24.0", - "@esbuild/freebsd-x64": "0.24.0", - "@esbuild/linux-arm": "0.24.0", - "@esbuild/linux-arm64": "0.24.0", - "@esbuild/linux-ia32": "0.24.0", - "@esbuild/linux-loong64": "0.24.0", - "@esbuild/linux-mips64el": "0.24.0", - "@esbuild/linux-ppc64": "0.24.0", - "@esbuild/linux-riscv64": "0.24.0", - "@esbuild/linux-s390x": "0.24.0", - "@esbuild/linux-x64": "0.24.0", - "@esbuild/netbsd-x64": "0.24.0", - "@esbuild/openbsd-arm64": "0.24.0", - "@esbuild/openbsd-x64": "0.24.0", - "@esbuild/sunos-x64": "0.24.0", - "@esbuild/win32-arm64": "0.24.0", - "@esbuild/win32-ia32": "0.24.0", - "@esbuild/win32-x64": "0.24.0" + "@esbuild/android-arm": "0.17.19", + "@esbuild/android-arm64": "0.17.19", + "@esbuild/android-x64": "0.17.19", + "@esbuild/darwin-arm64": "0.17.19", + "@esbuild/darwin-x64": "0.17.19", + "@esbuild/freebsd-arm64": "0.17.19", + "@esbuild/freebsd-x64": "0.17.19", + "@esbuild/linux-arm": "0.17.19", + "@esbuild/linux-arm64": "0.17.19", + "@esbuild/linux-ia32": "0.17.19", + "@esbuild/linux-loong64": "0.17.19", + "@esbuild/linux-mips64el": "0.17.19", + "@esbuild/linux-ppc64": "0.17.19", + "@esbuild/linux-riscv64": "0.17.19", + "@esbuild/linux-s390x": "0.17.19", + "@esbuild/linux-x64": "0.17.19", + "@esbuild/netbsd-x64": "0.17.19", + "@esbuild/openbsd-x64": "0.17.19", + "@esbuild/sunos-x64": "0.17.19", + "@esbuild/win32-arm64": "0.17.19", + "@esbuild/win32-ia32": "0.17.19", + "@esbuild/win32-x64": "0.17.19" } }, "node_modules/escalade": { diff --git a/core/package.json b/core/package.json index 4abdd2281..f6f194d7f 100644 --- a/core/package.json +++ b/core/package.json @@ -32,7 +32,7 @@ "@types/uuid": "^9.0.7", "@types/win-ca": "^3.5.4", "cross-env": "^7.0.3", - "esbuild": "0.24.0", + "esbuild": "0.17.19", "eslint": "^8", "jest": "^29.7.0", "jest-environment-jsdom": "^29.7.0", diff --git a/extensions/vscode/package-lock.json b/extensions/vscode/package-lock.json index 43d3f0d81..c0dfc8306 100644 --- a/extensions/vscode/package-lock.json +++ b/extensions/vscode/package-lock.json @@ -22,7 +22,7 @@ "dbinfoz": "^0.14.0", "diff": "^7.0.0", "downshift": "^7.6.0", - "esbuild": "0.24.0", + "esbuild": "^0.17.19", "express": "^4.18.2", "fkill": "^8.1.0", "follow-redirects": "^1.15.4", @@ -79,7 +79,7 @@ "@vscode/vsce": "^2.22.0", "cargo-cp-artifact": "^0.1", "chai": "^4.5.0", - "esbuild": "0.24.0", + "esbuild": "0.17.19", "esbuild-visualizer": "^0.6.0", "eslint": "^8.28.0", "glob": "^8.0.3", @@ -186,7 +186,7 @@ "@types/uuid": "^9.0.7", "@types/win-ca": "^3.5.4", "cross-env": "^7.0.3", - "esbuild": "0.24.0", + "esbuild": "0.17.19", "eslint": "^8", "jest": "^29.7.0", "jest-environment-jsdom": "^29.7.0", @@ -758,26 +758,10 @@ "node": ">=12.13.0" } }, - "node_modules/@esbuild/aix-ppc64": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.24.0.tgz", - "integrity": "sha512-WtKdFM7ls47zkKHFVzMz8opM7LkcsIp9amDUBIAWirg70RM71WRSjdILPsY5Uv1D42ZpUfaPILDlfactHgsRkw==", - "cpu": [ - "ppc64" - ], - "dev": true, - "optional": true, - "os": [ - "aix" - ], - "engines": { - "node": ">=18" - } - }, "node_modules/@esbuild/android-arm": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.24.0.tgz", - "integrity": "sha512-arAtTPo76fJ/ICkXWetLCc9EwEHKaeya4vMrReVlEIUCAUncH7M4bhMQ+M9Vf+FFOZJdTNMXNBrWwW+OXWpSew==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.17.19.tgz", + "integrity": "sha512-rIKddzqhmav7MSmoFCmDIb6e2W57geRsM94gV2l38fzhXMwq7hZoClug9USI2pFRGL06f4IOPHHpFNOkWieR8A==", "cpu": [ "arm" ], @@ -787,13 +771,13 @@ "android" ], "engines": { - "node": ">=18" + "node": ">=12" } }, "node_modules/@esbuild/android-arm64": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.24.0.tgz", - "integrity": "sha512-Vsm497xFM7tTIPYK9bNTYJyF/lsP590Qc1WxJdlB6ljCbdZKU9SY8i7+Iin4kyhV/KV5J2rOKsBQbB77Ab7L/w==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.17.19.tgz", + "integrity": "sha512-KBMWvEZooR7+kzY0BtbTQn0OAYY7CsiydT63pVEaPtVYF0hXbUaOyZog37DKxK7NF3XacBJOpYT4adIJh+avxA==", "cpu": [ "arm64" ], @@ -803,13 +787,13 @@ "android" ], "engines": { - "node": ">=18" + "node": ">=12" } }, "node_modules/@esbuild/android-x64": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.24.0.tgz", - "integrity": "sha512-t8GrvnFkiIY7pa7mMgJd7p8p8qqYIz1NYiAoKc75Zyv73L3DZW++oYMSHPRarcotTKuSs6m3hTOa5CKHaS02TQ==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.17.19.tgz", + "integrity": "sha512-uUTTc4xGNDT7YSArp/zbtmbhO0uEEK9/ETW29Wk1thYUJBz3IVnvgEiEwEa9IeLyvnpKrWK64Utw2bgUmDveww==", "cpu": [ "x64" ], @@ -819,13 +803,13 @@ "android" ], "engines": { - "node": ">=18" + "node": ">=12" } }, "node_modules/@esbuild/darwin-arm64": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.24.0.tgz", - "integrity": "sha512-CKyDpRbK1hXwv79soeTJNHb5EiG6ct3efd/FTPdzOWdbZZfGhpbcqIpiD0+vwmpu0wTIL97ZRPZu8vUt46nBSw==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.17.19.tgz", + "integrity": "sha512-80wEoCfF/hFKM6WE1FyBHc9SfUblloAWx6FJkFWTWiCoht9Mc0ARGEM47e67W9rI09YoUxJL68WHfDRYEAvOhg==", "cpu": [ "arm64" ], @@ -835,13 +819,13 @@ "darwin" ], "engines": { - "node": ">=18" + "node": ">=12" } }, "node_modules/@esbuild/darwin-x64": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.24.0.tgz", - "integrity": "sha512-rgtz6flkVkh58od4PwTRqxbKH9cOjaXCMZgWD905JOzjFKW+7EiUObfd/Kav+A6Gyud6WZk9w+xu6QLytdi2OA==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.17.19.tgz", + "integrity": "sha512-IJM4JJsLhRYr9xdtLytPLSH9k/oxR3boaUIYiHkAawtwNOXKE8KoU8tMvryogdcT8AU+Bflmh81Xn6Q0vTZbQw==", "cpu": [ "x64" ], @@ -851,13 +835,13 @@ "darwin" ], "engines": { - "node": ">=18" + "node": ">=12" } }, "node_modules/@esbuild/freebsd-arm64": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.24.0.tgz", - "integrity": "sha512-6Mtdq5nHggwfDNLAHkPlyLBpE5L6hwsuXZX8XNmHno9JuL2+bg2BX5tRkwjyfn6sKbxZTq68suOjgWqCicvPXA==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.17.19.tgz", + "integrity": "sha512-pBwbc7DufluUeGdjSU5Si+P3SoMF5DQ/F/UmTSb8HXO80ZEAJmrykPyzo1IfNbAoaqw48YRpv8shwd1NoI0jcQ==", "cpu": [ "arm64" ], @@ -867,13 +851,13 @@ "freebsd" ], "engines": { - "node": ">=18" + "node": ">=12" } }, "node_modules/@esbuild/freebsd-x64": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.24.0.tgz", - "integrity": "sha512-D3H+xh3/zphoX8ck4S2RxKR6gHlHDXXzOf6f/9dbFt/NRBDIE33+cVa49Kil4WUjxMGW0ZIYBYtaGCa2+OsQwQ==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.17.19.tgz", + "integrity": "sha512-4lu+n8Wk0XlajEhbEffdy2xy53dpR06SlzvhGByyg36qJw6Kpfk7cp45DR/62aPH9mtJRmIyrXAS5UWBrJT6TQ==", "cpu": [ "x64" ], @@ -883,13 +867,13 @@ "freebsd" ], "engines": { - "node": ">=18" + "node": ">=12" } }, "node_modules/@esbuild/linux-arm": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.24.0.tgz", - "integrity": "sha512-gJKIi2IjRo5G6Glxb8d3DzYXlxdEj2NlkixPsqePSZMhLudqPhtZ4BUrpIuTjJYXxvF9njql+vRjB2oaC9XpBw==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.17.19.tgz", + "integrity": "sha512-cdmT3KxjlOQ/gZ2cjfrQOtmhG4HJs6hhvm3mWSRDPtZ/lP5oe8FWceS10JaSJC13GBd4eH/haHnqf7hhGNLerA==", "cpu": [ "arm" ], @@ -899,13 +883,13 @@ "linux" ], "engines": { - "node": ">=18" + "node": ">=12" } }, "node_modules/@esbuild/linux-arm64": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.24.0.tgz", - "integrity": "sha512-TDijPXTOeE3eaMkRYpcy3LarIg13dS9wWHRdwYRnzlwlA370rNdZqbcp0WTyyV/k2zSxfko52+C7jU5F9Tfj1g==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.17.19.tgz", + "integrity": "sha512-ct1Tg3WGwd3P+oZYqic+YZF4snNl2bsnMKRkb3ozHmnM0dGWuxcPTTntAF6bOP0Sp4x0PjSF+4uHQ1xvxfRKqg==", "cpu": [ "arm64" ], @@ -915,13 +899,13 @@ "linux" ], "engines": { - "node": ">=18" + "node": ">=12" } }, "node_modules/@esbuild/linux-ia32": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.24.0.tgz", - "integrity": "sha512-K40ip1LAcA0byL05TbCQ4yJ4swvnbzHscRmUilrmP9Am7//0UjPreh4lpYzvThT2Quw66MhjG//20mrufm40mA==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.17.19.tgz", + "integrity": "sha512-w4IRhSy1VbsNxHRQpeGCHEmibqdTUx61Vc38APcsRbuVgK0OPEnQ0YD39Brymn96mOx48Y2laBQGqgZ0j9w6SQ==", "cpu": [ "ia32" ], @@ -931,13 +915,13 @@ "linux" ], "engines": { - "node": ">=18" + "node": ">=12" } }, "node_modules/@esbuild/linux-loong64": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.24.0.tgz", - "integrity": "sha512-0mswrYP/9ai+CU0BzBfPMZ8RVm3RGAN/lmOMgW4aFUSOQBjA31UP8Mr6DDhWSuMwj7jaWOT0p0WoZ6jeHhrD7g==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.17.19.tgz", + "integrity": "sha512-2iAngUbBPMq439a+z//gE+9WBldoMp1s5GWsUSgqHLzLJ9WoZLZhpwWuym0u0u/4XmZ3gpHmzV84PonE+9IIdQ==", "cpu": [ "loong64" ], @@ -947,13 +931,13 @@ "linux" ], "engines": { - "node": ">=18" + "node": ">=12" } }, "node_modules/@esbuild/linux-mips64el": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.24.0.tgz", - "integrity": "sha512-hIKvXm0/3w/5+RDtCJeXqMZGkI2s4oMUGj3/jM0QzhgIASWrGO5/RlzAzm5nNh/awHE0A19h/CvHQe6FaBNrRA==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.17.19.tgz", + "integrity": "sha512-LKJltc4LVdMKHsrFe4MGNPp0hqDFA1Wpt3jE1gEyM3nKUvOiO//9PheZZHfYRfYl6AwdTH4aTcXSqBerX0ml4A==", "cpu": [ "mips64el" ], @@ -963,13 +947,13 @@ "linux" ], "engines": { - "node": ">=18" + "node": ">=12" } }, "node_modules/@esbuild/linux-ppc64": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.24.0.tgz", - "integrity": "sha512-HcZh5BNq0aC52UoocJxaKORfFODWXZxtBaaZNuN3PUX3MoDsChsZqopzi5UupRhPHSEHotoiptqikjN/B77mYQ==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.17.19.tgz", + "integrity": "sha512-/c/DGybs95WXNS8y3Ti/ytqETiW7EU44MEKuCAcpPto3YjQbyK3IQVKfF6nbghD7EcLUGl0NbiL5Rt5DMhn5tg==", "cpu": [ "ppc64" ], @@ -979,13 +963,13 @@ "linux" ], "engines": { - "node": ">=18" + "node": ">=12" } }, "node_modules/@esbuild/linux-riscv64": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.24.0.tgz", - "integrity": "sha512-bEh7dMn/h3QxeR2KTy1DUszQjUrIHPZKyO6aN1X4BCnhfYhuQqedHaa5MxSQA/06j3GpiIlFGSsy1c7Gf9padw==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.17.19.tgz", + "integrity": "sha512-FC3nUAWhvFoutlhAkgHf8f5HwFWUL6bYdvLc/TTuxKlvLi3+pPzdZiFKSWz/PF30TB1K19SuCxDTI5KcqASJqA==", "cpu": [ "riscv64" ], @@ -995,13 +979,13 @@ "linux" ], "engines": { - "node": ">=18" + "node": ">=12" } }, "node_modules/@esbuild/linux-s390x": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.24.0.tgz", - "integrity": "sha512-ZcQ6+qRkw1UcZGPyrCiHHkmBaj9SiCD8Oqd556HldP+QlpUIe2Wgn3ehQGVoPOvZvtHm8HPx+bH20c9pvbkX3g==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.17.19.tgz", + "integrity": "sha512-IbFsFbxMWLuKEbH+7sTkKzL6NJmG2vRyy6K7JJo55w+8xDk7RElYn6xvXtDW8HCfoKBFK69f3pgBJSUSQPr+4Q==", "cpu": [ "s390x" ], @@ -1011,13 +995,13 @@ "linux" ], "engines": { - "node": ">=18" + "node": ">=12" } }, "node_modules/@esbuild/linux-x64": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.24.0.tgz", - "integrity": "sha512-vbutsFqQ+foy3wSSbmjBXXIJ6PL3scghJoM8zCL142cGaZKAdCZHyf+Bpu/MmX9zT9Q0zFBVKb36Ma5Fzfa8xA==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.17.19.tgz", + "integrity": "sha512-68ngA9lg2H6zkZcyp22tsVt38mlhWde8l3eJLWkyLrp4HwMUr3c1s/M2t7+kHIhvMjglIBrFpncX1SzMckomGw==", "cpu": [ "x64" ], @@ -1027,13 +1011,13 @@ "linux" ], "engines": { - "node": ">=18" + "node": ">=12" } }, "node_modules/@esbuild/netbsd-x64": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.24.0.tgz", - "integrity": "sha512-hjQ0R/ulkO8fCYFsG0FZoH+pWgTTDreqpqY7UnQntnaKv95uP5iW3+dChxnx7C3trQQU40S+OgWhUVwCjVFLvg==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.17.19.tgz", + "integrity": "sha512-CwFq42rXCR8TYIjIfpXCbRX0rp1jo6cPIUPSaWwzbVI4aOfX96OXY8M6KNmtPcg7QjYeDmN+DD0Wp3LaBOLf4Q==", "cpu": [ "x64" ], @@ -1043,29 +1027,13 @@ "netbsd" ], "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/openbsd-arm64": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.24.0.tgz", - "integrity": "sha512-MD9uzzkPQbYehwcN583yx3Tu5M8EIoTD+tUgKF982WYL9Pf5rKy9ltgD0eUgs8pvKnmizxjXZyLt0z6DC3rRXg==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "openbsd" - ], - "engines": { - "node": ">=18" + "node": ">=12" } }, "node_modules/@esbuild/openbsd-x64": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.24.0.tgz", - "integrity": "sha512-4ir0aY1NGUhIC1hdoCzr1+5b43mw99uNwVzhIq1OY3QcEwPDO3B7WNXBzaKY5Nsf1+N11i1eOfFcq+D/gOS15Q==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.17.19.tgz", + "integrity": "sha512-cnq5brJYrSZ2CF6c35eCmviIN3k3RczmHz8eYaVlNasVqsNY+JKohZU5MKmaOI+KkllCdzOKKdPs762VCPC20g==", "cpu": [ "x64" ], @@ -1075,13 +1043,13 @@ "openbsd" ], "engines": { - "node": ">=18" + "node": ">=12" } }, "node_modules/@esbuild/sunos-x64": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.24.0.tgz", - "integrity": "sha512-jVzdzsbM5xrotH+W5f1s+JtUy1UWgjU0Cf4wMvffTB8m6wP5/kx0KiaLHlbJO+dMgtxKV8RQ/JvtlFcdZ1zCPA==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.17.19.tgz", + "integrity": "sha512-vCRT7yP3zX+bKWFeP/zdS6SqdWB8OIpaRq/mbXQxTGHnIxspRtigpkUcDMlSCOejlHowLqII7K2JKevwyRP2rg==", "cpu": [ "x64" ], @@ -1091,13 +1059,13 @@ "sunos" ], "engines": { - "node": ">=18" + "node": ">=12" } }, "node_modules/@esbuild/win32-arm64": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.24.0.tgz", - "integrity": "sha512-iKc8GAslzRpBytO2/aN3d2yb2z8XTVfNV0PjGlCxKo5SgWmNXx82I/Q3aG1tFfS+A2igVCY97TJ8tnYwpUWLCA==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.17.19.tgz", + "integrity": "sha512-yYx+8jwowUstVdorcMdNlzklLYhPxjniHWFKgRqH7IFlUEa0Umu3KuYplf1HUZZ422e3NU9F4LGb+4O0Kdcaag==", "cpu": [ "arm64" ], @@ -1107,13 +1075,13 @@ "win32" ], "engines": { - "node": ">=18" + "node": ">=12" } }, "node_modules/@esbuild/win32-ia32": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.24.0.tgz", - "integrity": "sha512-vQW36KZolfIudCcTnaTpmLQ24Ha1RjygBo39/aLkM2kmjkWmZGEJ5Gn9l5/7tzXA42QGIoWbICfg6KLLkIw6yw==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.17.19.tgz", + "integrity": "sha512-eggDKanJszUtCdlVs0RB+h35wNlb5v4TWEkq4vZcmVt5u/HiDZrTXe2bWFQUez3RgNHwx/x4sk5++4NSSicKkw==", "cpu": [ "ia32" ], @@ -1123,13 +1091,13 @@ "win32" ], "engines": { - "node": ">=18" + "node": ">=12" } }, "node_modules/@esbuild/win32-x64": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.24.0.tgz", - "integrity": "sha512-7IAFPrjSQIJrGsK6flwg7NFmwBoSTyF3rl7If0hNUFQU4ilTsEPL6GuMuU9BfIWVVGuRnuIidkSMC+c0Otu8IA==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.17.19.tgz", + "integrity": "sha512-lAhycmKnVOuRYNtRtatQR1LPQf2oYCkRGkSFnseDAKPl8lu5SOsK/e1sXe5a0Pc5kHIHe6P2I/ilntNv2xf3cA==", "cpu": [ "x64" ], @@ -1139,7 +1107,7 @@ "win32" ], "engines": { - "node": ">=18" + "node": ">=12" } }, "node_modules/@eslint-community/eslint-utils": { @@ -5352,42 +5320,40 @@ } }, "node_modules/esbuild": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.24.0.tgz", - "integrity": "sha512-FuLPevChGDshgSicjisSooU0cemp/sGXR841D5LHMB7mTVOmsEHcAxaH3irL53+8YDIeVNQEySh4DaYU/iuPqQ==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.17.19.tgz", + "integrity": "sha512-XQ0jAPFkK/u3LcVRcvVHQcTIqD6E2H1fvZMA5dQPSOWb3suUbWbfbRf94pjc0bNzRYLfIrDRQXr7X+LHIm5oHw==", "dev": true, "hasInstallScript": true, "bin": { "esbuild": "bin/esbuild" }, "engines": { - "node": ">=18" + "node": ">=12" }, "optionalDependencies": { - "@esbuild/aix-ppc64": "0.24.0", - "@esbuild/android-arm": "0.24.0", - "@esbuild/android-arm64": "0.24.0", - "@esbuild/android-x64": "0.24.0", - "@esbuild/darwin-arm64": "0.24.0", - "@esbuild/darwin-x64": "0.24.0", - "@esbuild/freebsd-arm64": "0.24.0", - "@esbuild/freebsd-x64": "0.24.0", - "@esbuild/linux-arm": "0.24.0", - "@esbuild/linux-arm64": "0.24.0", - "@esbuild/linux-ia32": "0.24.0", - "@esbuild/linux-loong64": "0.24.0", - "@esbuild/linux-mips64el": "0.24.0", - "@esbuild/linux-ppc64": "0.24.0", - "@esbuild/linux-riscv64": "0.24.0", - "@esbuild/linux-s390x": "0.24.0", - "@esbuild/linux-x64": "0.24.0", - "@esbuild/netbsd-x64": "0.24.0", - "@esbuild/openbsd-arm64": "0.24.0", - "@esbuild/openbsd-x64": "0.24.0", - "@esbuild/sunos-x64": "0.24.0", - "@esbuild/win32-arm64": "0.24.0", - "@esbuild/win32-ia32": "0.24.0", - "@esbuild/win32-x64": "0.24.0" + "@esbuild/android-arm": "0.17.19", + "@esbuild/android-arm64": "0.17.19", + "@esbuild/android-x64": "0.17.19", + "@esbuild/darwin-arm64": "0.17.19", + "@esbuild/darwin-x64": "0.17.19", + "@esbuild/freebsd-arm64": "0.17.19", + "@esbuild/freebsd-x64": "0.17.19", + "@esbuild/linux-arm": "0.17.19", + "@esbuild/linux-arm64": "0.17.19", + "@esbuild/linux-ia32": "0.17.19", + "@esbuild/linux-loong64": "0.17.19", + "@esbuild/linux-mips64el": "0.17.19", + "@esbuild/linux-ppc64": "0.17.19", + "@esbuild/linux-riscv64": "0.17.19", + "@esbuild/linux-s390x": "0.17.19", + "@esbuild/linux-x64": "0.17.19", + "@esbuild/netbsd-x64": "0.17.19", + "@esbuild/openbsd-x64": "0.17.19", + "@esbuild/sunos-x64": "0.17.19", + "@esbuild/win32-arm64": "0.17.19", + "@esbuild/win32-ia32": "0.17.19", + "@esbuild/win32-x64": "0.17.19" } }, "node_modules/esbuild-visualizer": { diff --git a/extensions/vscode/package.json b/extensions/vscode/package.json index fd5f69014..57bdfea44 100644 --- a/extensions/vscode/package.json +++ b/extensions/vscode/package.json @@ -656,7 +656,7 @@ "@vscode/vsce": "^2.22.0", "cargo-cp-artifact": "^0.1", "chai": "^4.5.0", - "esbuild": "0.24.0", + "esbuild": "0.17.19", "esbuild-visualizer": "^0.6.0", "eslint": "^8.28.0", "glob": "^8.0.3", @@ -683,7 +683,7 @@ "dbinfoz": "^0.14.0", "diff": "^7.0.0", "downshift": "^7.6.0", - "esbuild": "0.24.0", + "esbuild": "^0.17.19", "express": "^4.18.2", "fkill": "^8.1.0", "follow-redirects": "^1.15.4", diff --git a/extensions/vscode/scripts/prepackage.js b/extensions/vscode/scripts/prepackage.js index 8ba77dbf1..20229018f 100644 --- a/extensions/vscode/scripts/prepackage.js +++ b/extensions/vscode/scripts/prepackage.js @@ -387,7 +387,7 @@ const isMacTarget = target?.startsWith("darwin"); // Download esbuild from npm in tmp and copy over console.log("npm installing esbuild binary"); await installNodeModuleInTempDirAndCopyToCurrent( - "esbuild@0.24.0", + "esbuild@0.17.19", "@esbuild", ); } diff --git a/gui/package-lock.json b/gui/package-lock.json index 9abf7aeee..5c134a9e6 100644 --- a/gui/package-lock.json +++ b/gui/package-lock.json @@ -188,7 +188,7 @@ "@types/uuid": "^9.0.7", "@types/win-ca": "^3.5.4", "cross-env": "^7.0.3", - "esbuild": "0.24.0", + "esbuild": "0.17.19", "eslint": "^8", "jest": "^29.7.0", "jest-environment-jsdom": "^29.7.0", From a96de28eb090a3448fa7f8a3d81c545742781a8c Mon Sep 17 00:00:00 2001 From: tomasz-io Date: Wed, 12 Feb 2025 13:40:37 -0800 Subject: [PATCH 175/262] Update prepackage.js --- extensions/vscode/scripts/prepackage.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/vscode/scripts/prepackage.js b/extensions/vscode/scripts/prepackage.js index 20229018f..7c9da4526 100644 --- a/extensions/vscode/scripts/prepackage.js +++ b/extensions/vscode/scripts/prepackage.js @@ -385,7 +385,7 @@ const isMacTarget = target?.startsWith("darwin"); fs.unlinkSync("node_modules/@esbuild/esbuild.zip"); } else { // Download esbuild from npm in tmp and copy over - console.log("npm installing esbuild binary"); + console.log("npm installing esbuild binary - TEST"); await installNodeModuleInTempDirAndCopyToCurrent( "esbuild@0.17.19", "@esbuild", From 6e71d922831670e86df77601fa3be3764a16edcd Mon Sep 17 00:00:00 2001 From: tomasz-io Date: Wed, 12 Feb 2025 13:44:04 -0800 Subject: [PATCH 176/262] Reapply "improv: upgrade esbuild" This reverts commit 0e7ea0fdb04ed91263b885ba6b7525e9fe495f51. --- binary/package-lock.json | 2 +- core/package-lock.json | 264 +++++++++++++---------- core/package.json | 2 +- extensions/vscode/package-lock.json | 268 +++++++++++++----------- extensions/vscode/package.json | 4 +- extensions/vscode/scripts/prepackage.js | 2 +- gui/package-lock.json | 2 +- 7 files changed, 306 insertions(+), 238 deletions(-) diff --git a/binary/package-lock.json b/binary/package-lock.json index 7454d88e7..d3058c4d6 100644 --- a/binary/package-lock.json +++ b/binary/package-lock.json @@ -128,7 +128,7 @@ "@types/uuid": "^9.0.7", "@types/win-ca": "^3.5.4", "cross-env": "^7.0.3", - "esbuild": "0.17.19", + "esbuild": "0.24.0", "eslint": "^8", "jest": "^29.7.0", "jest-environment-jsdom": "^29.7.0", diff --git a/core/package-lock.json b/core/package-lock.json index 4179cc7a5..211969179 100644 --- a/core/package-lock.json +++ b/core/package-lock.json @@ -93,7 +93,7 @@ "@types/uuid": "^9.0.7", "@types/win-ca": "^3.5.4", "cross-env": "^7.0.3", - "esbuild": "0.17.19", + "esbuild": "0.24.0", "eslint": "^8", "jest": "^29.7.0", "jest-environment-jsdom": "^29.7.0", @@ -3077,10 +3077,26 @@ "zod": "^3.23.8" } }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.24.0.tgz", + "integrity": "sha512-WtKdFM7ls47zkKHFVzMz8opM7LkcsIp9amDUBIAWirg70RM71WRSjdILPsY5Uv1D42ZpUfaPILDlfactHgsRkw==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=18" + } + }, "node_modules/@esbuild/android-arm": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.17.19.tgz", - "integrity": "sha512-rIKddzqhmav7MSmoFCmDIb6e2W57geRsM94gV2l38fzhXMwq7hZoClug9USI2pFRGL06f4IOPHHpFNOkWieR8A==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.24.0.tgz", + "integrity": "sha512-arAtTPo76fJ/ICkXWetLCc9EwEHKaeya4vMrReVlEIUCAUncH7M4bhMQ+M9Vf+FFOZJdTNMXNBrWwW+OXWpSew==", "cpu": [ "arm" ], @@ -3090,13 +3106,13 @@ "android" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/android-arm64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.17.19.tgz", - "integrity": "sha512-KBMWvEZooR7+kzY0BtbTQn0OAYY7CsiydT63pVEaPtVYF0hXbUaOyZog37DKxK7NF3XacBJOpYT4adIJh+avxA==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.24.0.tgz", + "integrity": "sha512-Vsm497xFM7tTIPYK9bNTYJyF/lsP590Qc1WxJdlB6ljCbdZKU9SY8i7+Iin4kyhV/KV5J2rOKsBQbB77Ab7L/w==", "cpu": [ "arm64" ], @@ -3106,13 +3122,13 @@ "android" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/android-x64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.17.19.tgz", - "integrity": "sha512-uUTTc4xGNDT7YSArp/zbtmbhO0uEEK9/ETW29Wk1thYUJBz3IVnvgEiEwEa9IeLyvnpKrWK64Utw2bgUmDveww==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.24.0.tgz", + "integrity": "sha512-t8GrvnFkiIY7pa7mMgJd7p8p8qqYIz1NYiAoKc75Zyv73L3DZW++oYMSHPRarcotTKuSs6m3hTOa5CKHaS02TQ==", "cpu": [ "x64" ], @@ -3122,13 +3138,13 @@ "android" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/darwin-arm64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.17.19.tgz", - "integrity": "sha512-80wEoCfF/hFKM6WE1FyBHc9SfUblloAWx6FJkFWTWiCoht9Mc0ARGEM47e67W9rI09YoUxJL68WHfDRYEAvOhg==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.24.0.tgz", + "integrity": "sha512-CKyDpRbK1hXwv79soeTJNHb5EiG6ct3efd/FTPdzOWdbZZfGhpbcqIpiD0+vwmpu0wTIL97ZRPZu8vUt46nBSw==", "cpu": [ "arm64" ], @@ -3138,13 +3154,13 @@ "darwin" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/darwin-x64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.17.19.tgz", - "integrity": "sha512-IJM4JJsLhRYr9xdtLytPLSH9k/oxR3boaUIYiHkAawtwNOXKE8KoU8tMvryogdcT8AU+Bflmh81Xn6Q0vTZbQw==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.24.0.tgz", + "integrity": "sha512-rgtz6flkVkh58od4PwTRqxbKH9cOjaXCMZgWD905JOzjFKW+7EiUObfd/Kav+A6Gyud6WZk9w+xu6QLytdi2OA==", "cpu": [ "x64" ], @@ -3154,13 +3170,13 @@ "darwin" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/freebsd-arm64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.17.19.tgz", - "integrity": "sha512-pBwbc7DufluUeGdjSU5Si+P3SoMF5DQ/F/UmTSb8HXO80ZEAJmrykPyzo1IfNbAoaqw48YRpv8shwd1NoI0jcQ==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.24.0.tgz", + "integrity": "sha512-6Mtdq5nHggwfDNLAHkPlyLBpE5L6hwsuXZX8XNmHno9JuL2+bg2BX5tRkwjyfn6sKbxZTq68suOjgWqCicvPXA==", "cpu": [ "arm64" ], @@ -3170,13 +3186,13 @@ "freebsd" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/freebsd-x64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.17.19.tgz", - "integrity": "sha512-4lu+n8Wk0XlajEhbEffdy2xy53dpR06SlzvhGByyg36qJw6Kpfk7cp45DR/62aPH9mtJRmIyrXAS5UWBrJT6TQ==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.24.0.tgz", + "integrity": "sha512-D3H+xh3/zphoX8ck4S2RxKR6gHlHDXXzOf6f/9dbFt/NRBDIE33+cVa49Kil4WUjxMGW0ZIYBYtaGCa2+OsQwQ==", "cpu": [ "x64" ], @@ -3186,13 +3202,13 @@ "freebsd" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-arm": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.17.19.tgz", - "integrity": "sha512-cdmT3KxjlOQ/gZ2cjfrQOtmhG4HJs6hhvm3mWSRDPtZ/lP5oe8FWceS10JaSJC13GBd4eH/haHnqf7hhGNLerA==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.24.0.tgz", + "integrity": "sha512-gJKIi2IjRo5G6Glxb8d3DzYXlxdEj2NlkixPsqePSZMhLudqPhtZ4BUrpIuTjJYXxvF9njql+vRjB2oaC9XpBw==", "cpu": [ "arm" ], @@ -3202,13 +3218,13 @@ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-arm64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.17.19.tgz", - "integrity": "sha512-ct1Tg3WGwd3P+oZYqic+YZF4snNl2bsnMKRkb3ozHmnM0dGWuxcPTTntAF6bOP0Sp4x0PjSF+4uHQ1xvxfRKqg==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.24.0.tgz", + "integrity": "sha512-TDijPXTOeE3eaMkRYpcy3LarIg13dS9wWHRdwYRnzlwlA370rNdZqbcp0WTyyV/k2zSxfko52+C7jU5F9Tfj1g==", "cpu": [ "arm64" ], @@ -3218,13 +3234,13 @@ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-ia32": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.17.19.tgz", - "integrity": "sha512-w4IRhSy1VbsNxHRQpeGCHEmibqdTUx61Vc38APcsRbuVgK0OPEnQ0YD39Brymn96mOx48Y2laBQGqgZ0j9w6SQ==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.24.0.tgz", + "integrity": "sha512-K40ip1LAcA0byL05TbCQ4yJ4swvnbzHscRmUilrmP9Am7//0UjPreh4lpYzvThT2Quw66MhjG//20mrufm40mA==", "cpu": [ "ia32" ], @@ -3234,13 +3250,13 @@ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-loong64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.17.19.tgz", - "integrity": "sha512-2iAngUbBPMq439a+z//gE+9WBldoMp1s5GWsUSgqHLzLJ9WoZLZhpwWuym0u0u/4XmZ3gpHmzV84PonE+9IIdQ==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.24.0.tgz", + "integrity": "sha512-0mswrYP/9ai+CU0BzBfPMZ8RVm3RGAN/lmOMgW4aFUSOQBjA31UP8Mr6DDhWSuMwj7jaWOT0p0WoZ6jeHhrD7g==", "cpu": [ "loong64" ], @@ -3250,13 +3266,13 @@ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-mips64el": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.17.19.tgz", - "integrity": "sha512-LKJltc4LVdMKHsrFe4MGNPp0hqDFA1Wpt3jE1gEyM3nKUvOiO//9PheZZHfYRfYl6AwdTH4aTcXSqBerX0ml4A==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.24.0.tgz", + "integrity": "sha512-hIKvXm0/3w/5+RDtCJeXqMZGkI2s4oMUGj3/jM0QzhgIASWrGO5/RlzAzm5nNh/awHE0A19h/CvHQe6FaBNrRA==", "cpu": [ "mips64el" ], @@ -3266,13 +3282,13 @@ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-ppc64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.17.19.tgz", - "integrity": "sha512-/c/DGybs95WXNS8y3Ti/ytqETiW7EU44MEKuCAcpPto3YjQbyK3IQVKfF6nbghD7EcLUGl0NbiL5Rt5DMhn5tg==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.24.0.tgz", + "integrity": "sha512-HcZh5BNq0aC52UoocJxaKORfFODWXZxtBaaZNuN3PUX3MoDsChsZqopzi5UupRhPHSEHotoiptqikjN/B77mYQ==", "cpu": [ "ppc64" ], @@ -3282,13 +3298,13 @@ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-riscv64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.17.19.tgz", - "integrity": "sha512-FC3nUAWhvFoutlhAkgHf8f5HwFWUL6bYdvLc/TTuxKlvLi3+pPzdZiFKSWz/PF30TB1K19SuCxDTI5KcqASJqA==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.24.0.tgz", + "integrity": "sha512-bEh7dMn/h3QxeR2KTy1DUszQjUrIHPZKyO6aN1X4BCnhfYhuQqedHaa5MxSQA/06j3GpiIlFGSsy1c7Gf9padw==", "cpu": [ "riscv64" ], @@ -3298,13 +3314,13 @@ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-s390x": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.17.19.tgz", - "integrity": "sha512-IbFsFbxMWLuKEbH+7sTkKzL6NJmG2vRyy6K7JJo55w+8xDk7RElYn6xvXtDW8HCfoKBFK69f3pgBJSUSQPr+4Q==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.24.0.tgz", + "integrity": "sha512-ZcQ6+qRkw1UcZGPyrCiHHkmBaj9SiCD8Oqd556HldP+QlpUIe2Wgn3ehQGVoPOvZvtHm8HPx+bH20c9pvbkX3g==", "cpu": [ "s390x" ], @@ -3314,13 +3330,13 @@ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-x64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.17.19.tgz", - "integrity": "sha512-68ngA9lg2H6zkZcyp22tsVt38mlhWde8l3eJLWkyLrp4HwMUr3c1s/M2t7+kHIhvMjglIBrFpncX1SzMckomGw==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.24.0.tgz", + "integrity": "sha512-vbutsFqQ+foy3wSSbmjBXXIJ6PL3scghJoM8zCL142cGaZKAdCZHyf+Bpu/MmX9zT9Q0zFBVKb36Ma5Fzfa8xA==", "cpu": [ "x64" ], @@ -3330,13 +3346,13 @@ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/netbsd-x64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.17.19.tgz", - "integrity": "sha512-CwFq42rXCR8TYIjIfpXCbRX0rp1jo6cPIUPSaWwzbVI4aOfX96OXY8M6KNmtPcg7QjYeDmN+DD0Wp3LaBOLf4Q==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.24.0.tgz", + "integrity": "sha512-hjQ0R/ulkO8fCYFsG0FZoH+pWgTTDreqpqY7UnQntnaKv95uP5iW3+dChxnx7C3trQQU40S+OgWhUVwCjVFLvg==", "cpu": [ "x64" ], @@ -3346,13 +3362,29 @@ "netbsd" ], "engines": { - "node": ">=12" + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-arm64": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.24.0.tgz", + "integrity": "sha512-MD9uzzkPQbYehwcN583yx3Tu5M8EIoTD+tUgKF982WYL9Pf5rKy9ltgD0eUgs8pvKnmizxjXZyLt0z6DC3rRXg==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" } }, "node_modules/@esbuild/openbsd-x64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.17.19.tgz", - "integrity": "sha512-cnq5brJYrSZ2CF6c35eCmviIN3k3RczmHz8eYaVlNasVqsNY+JKohZU5MKmaOI+KkllCdzOKKdPs762VCPC20g==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.24.0.tgz", + "integrity": "sha512-4ir0aY1NGUhIC1hdoCzr1+5b43mw99uNwVzhIq1OY3QcEwPDO3B7WNXBzaKY5Nsf1+N11i1eOfFcq+D/gOS15Q==", "cpu": [ "x64" ], @@ -3362,13 +3394,13 @@ "openbsd" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/sunos-x64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.17.19.tgz", - "integrity": "sha512-vCRT7yP3zX+bKWFeP/zdS6SqdWB8OIpaRq/mbXQxTGHnIxspRtigpkUcDMlSCOejlHowLqII7K2JKevwyRP2rg==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.24.0.tgz", + "integrity": "sha512-jVzdzsbM5xrotH+W5f1s+JtUy1UWgjU0Cf4wMvffTB8m6wP5/kx0KiaLHlbJO+dMgtxKV8RQ/JvtlFcdZ1zCPA==", "cpu": [ "x64" ], @@ -3378,13 +3410,13 @@ "sunos" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/win32-arm64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.17.19.tgz", - "integrity": "sha512-yYx+8jwowUstVdorcMdNlzklLYhPxjniHWFKgRqH7IFlUEa0Umu3KuYplf1HUZZ422e3NU9F4LGb+4O0Kdcaag==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.24.0.tgz", + "integrity": "sha512-iKc8GAslzRpBytO2/aN3d2yb2z8XTVfNV0PjGlCxKo5SgWmNXx82I/Q3aG1tFfS+A2igVCY97TJ8tnYwpUWLCA==", "cpu": [ "arm64" ], @@ -3394,13 +3426,13 @@ "win32" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/win32-ia32": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.17.19.tgz", - "integrity": "sha512-eggDKanJszUtCdlVs0RB+h35wNlb5v4TWEkq4vZcmVt5u/HiDZrTXe2bWFQUez3RgNHwx/x4sk5++4NSSicKkw==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.24.0.tgz", + "integrity": "sha512-vQW36KZolfIudCcTnaTpmLQ24Ha1RjygBo39/aLkM2kmjkWmZGEJ5Gn9l5/7tzXA42QGIoWbICfg6KLLkIw6yw==", "cpu": [ "ia32" ], @@ -3410,13 +3442,13 @@ "win32" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/win32-x64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.17.19.tgz", - "integrity": "sha512-lAhycmKnVOuRYNtRtatQR1LPQf2oYCkRGkSFnseDAKPl8lu5SOsK/e1sXe5a0Pc5kHIHe6P2I/ilntNv2xf3cA==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.24.0.tgz", + "integrity": "sha512-7IAFPrjSQIJrGsK6flwg7NFmwBoSTyF3rl7If0hNUFQU4ilTsEPL6GuMuU9BfIWVVGuRnuIidkSMC+c0Otu8IA==", "cpu": [ "x64" ], @@ -3426,7 +3458,7 @@ "win32" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@eslint-community/eslint-utils": { @@ -7899,40 +7931,42 @@ } }, "node_modules/esbuild": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.17.19.tgz", - "integrity": "sha512-XQ0jAPFkK/u3LcVRcvVHQcTIqD6E2H1fvZMA5dQPSOWb3suUbWbfbRf94pjc0bNzRYLfIrDRQXr7X+LHIm5oHw==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.24.0.tgz", + "integrity": "sha512-FuLPevChGDshgSicjisSooU0cemp/sGXR841D5LHMB7mTVOmsEHcAxaH3irL53+8YDIeVNQEySh4DaYU/iuPqQ==", "dev": true, "hasInstallScript": true, "bin": { "esbuild": "bin/esbuild" }, "engines": { - "node": ">=12" + "node": ">=18" }, "optionalDependencies": { - "@esbuild/android-arm": "0.17.19", - "@esbuild/android-arm64": "0.17.19", - "@esbuild/android-x64": "0.17.19", - "@esbuild/darwin-arm64": "0.17.19", - "@esbuild/darwin-x64": "0.17.19", - "@esbuild/freebsd-arm64": "0.17.19", - "@esbuild/freebsd-x64": "0.17.19", - "@esbuild/linux-arm": "0.17.19", - "@esbuild/linux-arm64": "0.17.19", - "@esbuild/linux-ia32": "0.17.19", - "@esbuild/linux-loong64": "0.17.19", - "@esbuild/linux-mips64el": "0.17.19", - "@esbuild/linux-ppc64": "0.17.19", - "@esbuild/linux-riscv64": "0.17.19", - "@esbuild/linux-s390x": "0.17.19", - "@esbuild/linux-x64": "0.17.19", - "@esbuild/netbsd-x64": "0.17.19", - "@esbuild/openbsd-x64": "0.17.19", - "@esbuild/sunos-x64": "0.17.19", - "@esbuild/win32-arm64": "0.17.19", - "@esbuild/win32-ia32": "0.17.19", - "@esbuild/win32-x64": "0.17.19" + "@esbuild/aix-ppc64": "0.24.0", + "@esbuild/android-arm": "0.24.0", + "@esbuild/android-arm64": "0.24.0", + "@esbuild/android-x64": "0.24.0", + "@esbuild/darwin-arm64": "0.24.0", + "@esbuild/darwin-x64": "0.24.0", + "@esbuild/freebsd-arm64": "0.24.0", + "@esbuild/freebsd-x64": "0.24.0", + "@esbuild/linux-arm": "0.24.0", + "@esbuild/linux-arm64": "0.24.0", + "@esbuild/linux-ia32": "0.24.0", + "@esbuild/linux-loong64": "0.24.0", + "@esbuild/linux-mips64el": "0.24.0", + "@esbuild/linux-ppc64": "0.24.0", + "@esbuild/linux-riscv64": "0.24.0", + "@esbuild/linux-s390x": "0.24.0", + "@esbuild/linux-x64": "0.24.0", + "@esbuild/netbsd-x64": "0.24.0", + "@esbuild/openbsd-arm64": "0.24.0", + "@esbuild/openbsd-x64": "0.24.0", + "@esbuild/sunos-x64": "0.24.0", + "@esbuild/win32-arm64": "0.24.0", + "@esbuild/win32-ia32": "0.24.0", + "@esbuild/win32-x64": "0.24.0" } }, "node_modules/escalade": { diff --git a/core/package.json b/core/package.json index f6f194d7f..4abdd2281 100644 --- a/core/package.json +++ b/core/package.json @@ -32,7 +32,7 @@ "@types/uuid": "^9.0.7", "@types/win-ca": "^3.5.4", "cross-env": "^7.0.3", - "esbuild": "0.17.19", + "esbuild": "0.24.0", "eslint": "^8", "jest": "^29.7.0", "jest-environment-jsdom": "^29.7.0", diff --git a/extensions/vscode/package-lock.json b/extensions/vscode/package-lock.json index c0dfc8306..43d3f0d81 100644 --- a/extensions/vscode/package-lock.json +++ b/extensions/vscode/package-lock.json @@ -22,7 +22,7 @@ "dbinfoz": "^0.14.0", "diff": "^7.0.0", "downshift": "^7.6.0", - "esbuild": "^0.17.19", + "esbuild": "0.24.0", "express": "^4.18.2", "fkill": "^8.1.0", "follow-redirects": "^1.15.4", @@ -79,7 +79,7 @@ "@vscode/vsce": "^2.22.0", "cargo-cp-artifact": "^0.1", "chai": "^4.5.0", - "esbuild": "0.17.19", + "esbuild": "0.24.0", "esbuild-visualizer": "^0.6.0", "eslint": "^8.28.0", "glob": "^8.0.3", @@ -186,7 +186,7 @@ "@types/uuid": "^9.0.7", "@types/win-ca": "^3.5.4", "cross-env": "^7.0.3", - "esbuild": "0.17.19", + "esbuild": "0.24.0", "eslint": "^8", "jest": "^29.7.0", "jest-environment-jsdom": "^29.7.0", @@ -758,10 +758,26 @@ "node": ">=12.13.0" } }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.24.0.tgz", + "integrity": "sha512-WtKdFM7ls47zkKHFVzMz8opM7LkcsIp9amDUBIAWirg70RM71WRSjdILPsY5Uv1D42ZpUfaPILDlfactHgsRkw==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=18" + } + }, "node_modules/@esbuild/android-arm": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.17.19.tgz", - "integrity": "sha512-rIKddzqhmav7MSmoFCmDIb6e2W57geRsM94gV2l38fzhXMwq7hZoClug9USI2pFRGL06f4IOPHHpFNOkWieR8A==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.24.0.tgz", + "integrity": "sha512-arAtTPo76fJ/ICkXWetLCc9EwEHKaeya4vMrReVlEIUCAUncH7M4bhMQ+M9Vf+FFOZJdTNMXNBrWwW+OXWpSew==", "cpu": [ "arm" ], @@ -771,13 +787,13 @@ "android" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/android-arm64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.17.19.tgz", - "integrity": "sha512-KBMWvEZooR7+kzY0BtbTQn0OAYY7CsiydT63pVEaPtVYF0hXbUaOyZog37DKxK7NF3XacBJOpYT4adIJh+avxA==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.24.0.tgz", + "integrity": "sha512-Vsm497xFM7tTIPYK9bNTYJyF/lsP590Qc1WxJdlB6ljCbdZKU9SY8i7+Iin4kyhV/KV5J2rOKsBQbB77Ab7L/w==", "cpu": [ "arm64" ], @@ -787,13 +803,13 @@ "android" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/android-x64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.17.19.tgz", - "integrity": "sha512-uUTTc4xGNDT7YSArp/zbtmbhO0uEEK9/ETW29Wk1thYUJBz3IVnvgEiEwEa9IeLyvnpKrWK64Utw2bgUmDveww==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.24.0.tgz", + "integrity": "sha512-t8GrvnFkiIY7pa7mMgJd7p8p8qqYIz1NYiAoKc75Zyv73L3DZW++oYMSHPRarcotTKuSs6m3hTOa5CKHaS02TQ==", "cpu": [ "x64" ], @@ -803,13 +819,13 @@ "android" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/darwin-arm64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.17.19.tgz", - "integrity": "sha512-80wEoCfF/hFKM6WE1FyBHc9SfUblloAWx6FJkFWTWiCoht9Mc0ARGEM47e67W9rI09YoUxJL68WHfDRYEAvOhg==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.24.0.tgz", + "integrity": "sha512-CKyDpRbK1hXwv79soeTJNHb5EiG6ct3efd/FTPdzOWdbZZfGhpbcqIpiD0+vwmpu0wTIL97ZRPZu8vUt46nBSw==", "cpu": [ "arm64" ], @@ -819,13 +835,13 @@ "darwin" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/darwin-x64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.17.19.tgz", - "integrity": "sha512-IJM4JJsLhRYr9xdtLytPLSH9k/oxR3boaUIYiHkAawtwNOXKE8KoU8tMvryogdcT8AU+Bflmh81Xn6Q0vTZbQw==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.24.0.tgz", + "integrity": "sha512-rgtz6flkVkh58od4PwTRqxbKH9cOjaXCMZgWD905JOzjFKW+7EiUObfd/Kav+A6Gyud6WZk9w+xu6QLytdi2OA==", "cpu": [ "x64" ], @@ -835,13 +851,13 @@ "darwin" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/freebsd-arm64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.17.19.tgz", - "integrity": "sha512-pBwbc7DufluUeGdjSU5Si+P3SoMF5DQ/F/UmTSb8HXO80ZEAJmrykPyzo1IfNbAoaqw48YRpv8shwd1NoI0jcQ==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.24.0.tgz", + "integrity": "sha512-6Mtdq5nHggwfDNLAHkPlyLBpE5L6hwsuXZX8XNmHno9JuL2+bg2BX5tRkwjyfn6sKbxZTq68suOjgWqCicvPXA==", "cpu": [ "arm64" ], @@ -851,13 +867,13 @@ "freebsd" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/freebsd-x64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.17.19.tgz", - "integrity": "sha512-4lu+n8Wk0XlajEhbEffdy2xy53dpR06SlzvhGByyg36qJw6Kpfk7cp45DR/62aPH9mtJRmIyrXAS5UWBrJT6TQ==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.24.0.tgz", + "integrity": "sha512-D3H+xh3/zphoX8ck4S2RxKR6gHlHDXXzOf6f/9dbFt/NRBDIE33+cVa49Kil4WUjxMGW0ZIYBYtaGCa2+OsQwQ==", "cpu": [ "x64" ], @@ -867,13 +883,13 @@ "freebsd" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-arm": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.17.19.tgz", - "integrity": "sha512-cdmT3KxjlOQ/gZ2cjfrQOtmhG4HJs6hhvm3mWSRDPtZ/lP5oe8FWceS10JaSJC13GBd4eH/haHnqf7hhGNLerA==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.24.0.tgz", + "integrity": "sha512-gJKIi2IjRo5G6Glxb8d3DzYXlxdEj2NlkixPsqePSZMhLudqPhtZ4BUrpIuTjJYXxvF9njql+vRjB2oaC9XpBw==", "cpu": [ "arm" ], @@ -883,13 +899,13 @@ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-arm64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.17.19.tgz", - "integrity": "sha512-ct1Tg3WGwd3P+oZYqic+YZF4snNl2bsnMKRkb3ozHmnM0dGWuxcPTTntAF6bOP0Sp4x0PjSF+4uHQ1xvxfRKqg==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.24.0.tgz", + "integrity": "sha512-TDijPXTOeE3eaMkRYpcy3LarIg13dS9wWHRdwYRnzlwlA370rNdZqbcp0WTyyV/k2zSxfko52+C7jU5F9Tfj1g==", "cpu": [ "arm64" ], @@ -899,13 +915,13 @@ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-ia32": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.17.19.tgz", - "integrity": "sha512-w4IRhSy1VbsNxHRQpeGCHEmibqdTUx61Vc38APcsRbuVgK0OPEnQ0YD39Brymn96mOx48Y2laBQGqgZ0j9w6SQ==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.24.0.tgz", + "integrity": "sha512-K40ip1LAcA0byL05TbCQ4yJ4swvnbzHscRmUilrmP9Am7//0UjPreh4lpYzvThT2Quw66MhjG//20mrufm40mA==", "cpu": [ "ia32" ], @@ -915,13 +931,13 @@ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-loong64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.17.19.tgz", - "integrity": "sha512-2iAngUbBPMq439a+z//gE+9WBldoMp1s5GWsUSgqHLzLJ9WoZLZhpwWuym0u0u/4XmZ3gpHmzV84PonE+9IIdQ==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.24.0.tgz", + "integrity": "sha512-0mswrYP/9ai+CU0BzBfPMZ8RVm3RGAN/lmOMgW4aFUSOQBjA31UP8Mr6DDhWSuMwj7jaWOT0p0WoZ6jeHhrD7g==", "cpu": [ "loong64" ], @@ -931,13 +947,13 @@ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-mips64el": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.17.19.tgz", - "integrity": "sha512-LKJltc4LVdMKHsrFe4MGNPp0hqDFA1Wpt3jE1gEyM3nKUvOiO//9PheZZHfYRfYl6AwdTH4aTcXSqBerX0ml4A==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.24.0.tgz", + "integrity": "sha512-hIKvXm0/3w/5+RDtCJeXqMZGkI2s4oMUGj3/jM0QzhgIASWrGO5/RlzAzm5nNh/awHE0A19h/CvHQe6FaBNrRA==", "cpu": [ "mips64el" ], @@ -947,13 +963,13 @@ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-ppc64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.17.19.tgz", - "integrity": "sha512-/c/DGybs95WXNS8y3Ti/ytqETiW7EU44MEKuCAcpPto3YjQbyK3IQVKfF6nbghD7EcLUGl0NbiL5Rt5DMhn5tg==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.24.0.tgz", + "integrity": "sha512-HcZh5BNq0aC52UoocJxaKORfFODWXZxtBaaZNuN3PUX3MoDsChsZqopzi5UupRhPHSEHotoiptqikjN/B77mYQ==", "cpu": [ "ppc64" ], @@ -963,13 +979,13 @@ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-riscv64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.17.19.tgz", - "integrity": "sha512-FC3nUAWhvFoutlhAkgHf8f5HwFWUL6bYdvLc/TTuxKlvLi3+pPzdZiFKSWz/PF30TB1K19SuCxDTI5KcqASJqA==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.24.0.tgz", + "integrity": "sha512-bEh7dMn/h3QxeR2KTy1DUszQjUrIHPZKyO6aN1X4BCnhfYhuQqedHaa5MxSQA/06j3GpiIlFGSsy1c7Gf9padw==", "cpu": [ "riscv64" ], @@ -979,13 +995,13 @@ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-s390x": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.17.19.tgz", - "integrity": "sha512-IbFsFbxMWLuKEbH+7sTkKzL6NJmG2vRyy6K7JJo55w+8xDk7RElYn6xvXtDW8HCfoKBFK69f3pgBJSUSQPr+4Q==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.24.0.tgz", + "integrity": "sha512-ZcQ6+qRkw1UcZGPyrCiHHkmBaj9SiCD8Oqd556HldP+QlpUIe2Wgn3ehQGVoPOvZvtHm8HPx+bH20c9pvbkX3g==", "cpu": [ "s390x" ], @@ -995,13 +1011,13 @@ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-x64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.17.19.tgz", - "integrity": "sha512-68ngA9lg2H6zkZcyp22tsVt38mlhWde8l3eJLWkyLrp4HwMUr3c1s/M2t7+kHIhvMjglIBrFpncX1SzMckomGw==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.24.0.tgz", + "integrity": "sha512-vbutsFqQ+foy3wSSbmjBXXIJ6PL3scghJoM8zCL142cGaZKAdCZHyf+Bpu/MmX9zT9Q0zFBVKb36Ma5Fzfa8xA==", "cpu": [ "x64" ], @@ -1011,13 +1027,13 @@ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/netbsd-x64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.17.19.tgz", - "integrity": "sha512-CwFq42rXCR8TYIjIfpXCbRX0rp1jo6cPIUPSaWwzbVI4aOfX96OXY8M6KNmtPcg7QjYeDmN+DD0Wp3LaBOLf4Q==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.24.0.tgz", + "integrity": "sha512-hjQ0R/ulkO8fCYFsG0FZoH+pWgTTDreqpqY7UnQntnaKv95uP5iW3+dChxnx7C3trQQU40S+OgWhUVwCjVFLvg==", "cpu": [ "x64" ], @@ -1027,13 +1043,29 @@ "netbsd" ], "engines": { - "node": ">=12" + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-arm64": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.24.0.tgz", + "integrity": "sha512-MD9uzzkPQbYehwcN583yx3Tu5M8EIoTD+tUgKF982WYL9Pf5rKy9ltgD0eUgs8pvKnmizxjXZyLt0z6DC3rRXg==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" } }, "node_modules/@esbuild/openbsd-x64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.17.19.tgz", - "integrity": "sha512-cnq5brJYrSZ2CF6c35eCmviIN3k3RczmHz8eYaVlNasVqsNY+JKohZU5MKmaOI+KkllCdzOKKdPs762VCPC20g==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.24.0.tgz", + "integrity": "sha512-4ir0aY1NGUhIC1hdoCzr1+5b43mw99uNwVzhIq1OY3QcEwPDO3B7WNXBzaKY5Nsf1+N11i1eOfFcq+D/gOS15Q==", "cpu": [ "x64" ], @@ -1043,13 +1075,13 @@ "openbsd" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/sunos-x64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.17.19.tgz", - "integrity": "sha512-vCRT7yP3zX+bKWFeP/zdS6SqdWB8OIpaRq/mbXQxTGHnIxspRtigpkUcDMlSCOejlHowLqII7K2JKevwyRP2rg==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.24.0.tgz", + "integrity": "sha512-jVzdzsbM5xrotH+W5f1s+JtUy1UWgjU0Cf4wMvffTB8m6wP5/kx0KiaLHlbJO+dMgtxKV8RQ/JvtlFcdZ1zCPA==", "cpu": [ "x64" ], @@ -1059,13 +1091,13 @@ "sunos" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/win32-arm64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.17.19.tgz", - "integrity": "sha512-yYx+8jwowUstVdorcMdNlzklLYhPxjniHWFKgRqH7IFlUEa0Umu3KuYplf1HUZZ422e3NU9F4LGb+4O0Kdcaag==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.24.0.tgz", + "integrity": "sha512-iKc8GAslzRpBytO2/aN3d2yb2z8XTVfNV0PjGlCxKo5SgWmNXx82I/Q3aG1tFfS+A2igVCY97TJ8tnYwpUWLCA==", "cpu": [ "arm64" ], @@ -1075,13 +1107,13 @@ "win32" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/win32-ia32": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.17.19.tgz", - "integrity": "sha512-eggDKanJszUtCdlVs0RB+h35wNlb5v4TWEkq4vZcmVt5u/HiDZrTXe2bWFQUez3RgNHwx/x4sk5++4NSSicKkw==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.24.0.tgz", + "integrity": "sha512-vQW36KZolfIudCcTnaTpmLQ24Ha1RjygBo39/aLkM2kmjkWmZGEJ5Gn9l5/7tzXA42QGIoWbICfg6KLLkIw6yw==", "cpu": [ "ia32" ], @@ -1091,13 +1123,13 @@ "win32" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/win32-x64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.17.19.tgz", - "integrity": "sha512-lAhycmKnVOuRYNtRtatQR1LPQf2oYCkRGkSFnseDAKPl8lu5SOsK/e1sXe5a0Pc5kHIHe6P2I/ilntNv2xf3cA==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.24.0.tgz", + "integrity": "sha512-7IAFPrjSQIJrGsK6flwg7NFmwBoSTyF3rl7If0hNUFQU4ilTsEPL6GuMuU9BfIWVVGuRnuIidkSMC+c0Otu8IA==", "cpu": [ "x64" ], @@ -1107,7 +1139,7 @@ "win32" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@eslint-community/eslint-utils": { @@ -5320,40 +5352,42 @@ } }, "node_modules/esbuild": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.17.19.tgz", - "integrity": "sha512-XQ0jAPFkK/u3LcVRcvVHQcTIqD6E2H1fvZMA5dQPSOWb3suUbWbfbRf94pjc0bNzRYLfIrDRQXr7X+LHIm5oHw==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.24.0.tgz", + "integrity": "sha512-FuLPevChGDshgSicjisSooU0cemp/sGXR841D5LHMB7mTVOmsEHcAxaH3irL53+8YDIeVNQEySh4DaYU/iuPqQ==", "dev": true, "hasInstallScript": true, "bin": { "esbuild": "bin/esbuild" }, "engines": { - "node": ">=12" + "node": ">=18" }, "optionalDependencies": { - "@esbuild/android-arm": "0.17.19", - "@esbuild/android-arm64": "0.17.19", - "@esbuild/android-x64": "0.17.19", - "@esbuild/darwin-arm64": "0.17.19", - "@esbuild/darwin-x64": "0.17.19", - "@esbuild/freebsd-arm64": "0.17.19", - "@esbuild/freebsd-x64": "0.17.19", - "@esbuild/linux-arm": "0.17.19", - "@esbuild/linux-arm64": "0.17.19", - "@esbuild/linux-ia32": "0.17.19", - "@esbuild/linux-loong64": "0.17.19", - "@esbuild/linux-mips64el": "0.17.19", - "@esbuild/linux-ppc64": "0.17.19", - "@esbuild/linux-riscv64": "0.17.19", - "@esbuild/linux-s390x": "0.17.19", - "@esbuild/linux-x64": "0.17.19", - "@esbuild/netbsd-x64": "0.17.19", - "@esbuild/openbsd-x64": "0.17.19", - "@esbuild/sunos-x64": "0.17.19", - "@esbuild/win32-arm64": "0.17.19", - "@esbuild/win32-ia32": "0.17.19", - "@esbuild/win32-x64": "0.17.19" + "@esbuild/aix-ppc64": "0.24.0", + "@esbuild/android-arm": "0.24.0", + "@esbuild/android-arm64": "0.24.0", + "@esbuild/android-x64": "0.24.0", + "@esbuild/darwin-arm64": "0.24.0", + "@esbuild/darwin-x64": "0.24.0", + "@esbuild/freebsd-arm64": "0.24.0", + "@esbuild/freebsd-x64": "0.24.0", + "@esbuild/linux-arm": "0.24.0", + "@esbuild/linux-arm64": "0.24.0", + "@esbuild/linux-ia32": "0.24.0", + "@esbuild/linux-loong64": "0.24.0", + "@esbuild/linux-mips64el": "0.24.0", + "@esbuild/linux-ppc64": "0.24.0", + "@esbuild/linux-riscv64": "0.24.0", + "@esbuild/linux-s390x": "0.24.0", + "@esbuild/linux-x64": "0.24.0", + "@esbuild/netbsd-x64": "0.24.0", + "@esbuild/openbsd-arm64": "0.24.0", + "@esbuild/openbsd-x64": "0.24.0", + "@esbuild/sunos-x64": "0.24.0", + "@esbuild/win32-arm64": "0.24.0", + "@esbuild/win32-ia32": "0.24.0", + "@esbuild/win32-x64": "0.24.0" } }, "node_modules/esbuild-visualizer": { diff --git a/extensions/vscode/package.json b/extensions/vscode/package.json index 57bdfea44..fd5f69014 100644 --- a/extensions/vscode/package.json +++ b/extensions/vscode/package.json @@ -656,7 +656,7 @@ "@vscode/vsce": "^2.22.0", "cargo-cp-artifact": "^0.1", "chai": "^4.5.0", - "esbuild": "0.17.19", + "esbuild": "0.24.0", "esbuild-visualizer": "^0.6.0", "eslint": "^8.28.0", "glob": "^8.0.3", @@ -683,7 +683,7 @@ "dbinfoz": "^0.14.0", "diff": "^7.0.0", "downshift": "^7.6.0", - "esbuild": "^0.17.19", + "esbuild": "0.24.0", "express": "^4.18.2", "fkill": "^8.1.0", "follow-redirects": "^1.15.4", diff --git a/extensions/vscode/scripts/prepackage.js b/extensions/vscode/scripts/prepackage.js index 7c9da4526..cf284efb6 100644 --- a/extensions/vscode/scripts/prepackage.js +++ b/extensions/vscode/scripts/prepackage.js @@ -387,7 +387,7 @@ const isMacTarget = target?.startsWith("darwin"); // Download esbuild from npm in tmp and copy over console.log("npm installing esbuild binary - TEST"); await installNodeModuleInTempDirAndCopyToCurrent( - "esbuild@0.17.19", + "esbuild@0.24.0", "@esbuild", ); } diff --git a/gui/package-lock.json b/gui/package-lock.json index 5c134a9e6..9abf7aeee 100644 --- a/gui/package-lock.json +++ b/gui/package-lock.json @@ -188,7 +188,7 @@ "@types/uuid": "^9.0.7", "@types/win-ca": "^3.5.4", "cross-env": "^7.0.3", - "esbuild": "0.17.19", + "esbuild": "0.24.0", "eslint": "^8", "jest": "^29.7.0", "jest-environment-jsdom": "^29.7.0", From e8387228f4852061a6d756d3a38878f8004afb30 Mon Sep 17 00:00:00 2001 From: tomasz-io Date: Wed, 12 Feb 2025 13:45:57 -0800 Subject: [PATCH 177/262] Revert "Update prepackage.js" This reverts commit a96de28eb090a3448fa7f8a3d81c545742781a8c. --- extensions/vscode/scripts/prepackage.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/vscode/scripts/prepackage.js b/extensions/vscode/scripts/prepackage.js index cf284efb6..8ba77dbf1 100644 --- a/extensions/vscode/scripts/prepackage.js +++ b/extensions/vscode/scripts/prepackage.js @@ -385,7 +385,7 @@ const isMacTarget = target?.startsWith("darwin"); fs.unlinkSync("node_modules/@esbuild/esbuild.zip"); } else { // Download esbuild from npm in tmp and copy over - console.log("npm installing esbuild binary - TEST"); + console.log("npm installing esbuild binary"); await installNodeModuleInTempDirAndCopyToCurrent( "esbuild@0.24.0", "@esbuild", From 20f70b6b18b9c547a12f967d6ae8d7f1f8a5ea2b Mon Sep 17 00:00:00 2001 From: Nate Date: Wed, 12 Feb 2025 15:57:27 -0800 Subject: [PATCH 178/262] update mcp typescript sdk version --- core/package-lock.json | 8 ++++---- core/package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/core/package-lock.json b/core/package-lock.json index 211969179..134bf9838 100644 --- a/core/package-lock.json +++ b/core/package-lock.json @@ -17,7 +17,7 @@ "@continuedev/fetch": "^1.0.4", "@continuedev/llm-info": "^1.0.2", "@continuedev/openai-adapters": "^1.0.10", - "@modelcontextprotocol/sdk": "^1.4.1", + "@modelcontextprotocol/sdk": "^1.5.0", "@mozilla/readability": "^0.5.0", "@octokit/rest": "^20.0.2", "@typescript-eslint/eslint-plugin": "^7.8.0", @@ -4250,9 +4250,9 @@ ] }, "node_modules/@modelcontextprotocol/sdk": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/@modelcontextprotocol/sdk/-/sdk-1.4.1.tgz", - "integrity": "sha512-wS6YC4lkUZ9QpP+/7NBTlVNiEvsnyl0xF7rRusLF+RsG0xDPc/zWR7fEEyhKnnNutGsDAZh59l/AeoWGwIb1+g==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@modelcontextprotocol/sdk/-/sdk-1.5.0.tgz", + "integrity": "sha512-IJ+5iVVs8FCumIHxWqpwgkwOzyhtHVKy45s6Ug7Dv0MfRpaYisH8QQ87rIWeWdOzlk8sfhitZ7HCyQZk7d6b8w==", "dependencies": { "content-type": "^1.0.5", "eventsource": "^3.0.2", diff --git a/core/package.json b/core/package.json index 4abdd2281..516e8a071 100644 --- a/core/package.json +++ b/core/package.json @@ -50,7 +50,7 @@ "@continuedev/fetch": "^1.0.4", "@continuedev/llm-info": "^1.0.2", "@continuedev/openai-adapters": "^1.0.10", - "@modelcontextprotocol/sdk": "^1.4.1", + "@modelcontextprotocol/sdk": "^1.5.0", "@mozilla/readability": "^0.5.0", "@octokit/rest": "^20.0.2", "@typescript-eslint/eslint-plugin": "^7.8.0", From 1b97cf369b7f7b0cebea49a5c4bdd8c02fc2b3d9 Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Wed, 12 Feb 2025 16:10:02 -0800 Subject: [PATCH 179/262] new history items at index 0 --- gui/src/redux/slices/sessionSlice.ts | 6 +++--- gui/src/redux/thunks/streamResponse.ts | 6 ++++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/gui/src/redux/slices/sessionSlice.ts b/gui/src/redux/slices/sessionSlice.ts index fa6cfb03c..5ee87d44c 100644 --- a/gui/src/redux/slices/sessionSlice.ts +++ b/gui/src/redux/slices/sessionSlice.ts @@ -191,13 +191,13 @@ export const sessionSlice = createSlice({ { payload, }: PayloadAction<{ - index?: number; + index: number; editorState: JSONContent; }>, ) => { const { index, editorState } = payload; - if (typeof index === "number" && index < state.history.length) { + if (state.history.length && index < state.history.length) { // Resubmission - update input message, truncate history after resubmit with new empty response message if (index % 2 === 1) { console.warn( @@ -260,7 +260,7 @@ export const sessionSlice = createSlice({ }>, ) => { const { index, updates } = payload; - if (!state.history[index]) { + if (index !== 0 && !state.history[index]) { console.error( `attempting to update history item at nonexistent index ${index}`, updates, diff --git a/gui/src/redux/thunks/streamResponse.ts b/gui/src/redux/thunks/streamResponse.ts index 1c191b662..e30fd63f7 100644 --- a/gui/src/redux/thunks/streamResponse.ts +++ b/gui/src/redux/thunks/streamResponse.ts @@ -74,13 +74,15 @@ export const streamResponseThunk = createAsyncThunk< const useTools = state.ui.useTools; const defaultModel = selectDefaultModel(state); const slashCommands = state.config.config.slashCommands || []; - const inputIndex = index ?? state.session.history.length; + const inputIndex = index ?? state.session.history.length; // Either given index or concat to end if (!defaultModel) { throw new Error("No chat model selected"); } - dispatch(submitEditorAndInitAtIndex({ index, editorState })); + dispatch( + submitEditorAndInitAtIndex({ index: inputIndex, editorState }), + ); resetStateForNewMessage(); const result = await dispatch( From de3636ddaee279c40165ade0f48d071c1716eee8 Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Wed, 12 Feb 2025 16:17:43 -0800 Subject: [PATCH 180/262] clear context items on resubmit --- gui/src/redux/slices/sessionSlice.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/gui/src/redux/slices/sessionSlice.ts b/gui/src/redux/slices/sessionSlice.ts index 5ee87d44c..101177b2a 100644 --- a/gui/src/redux/slices/sessionSlice.ts +++ b/gui/src/redux/slices/sessionSlice.ts @@ -208,6 +208,7 @@ export const sessionSlice = createSlice({ historyItem.message.content = ""; // IMPORTANT - this is quickly updated by resolveEditorContent based on editor state prior to streaming historyItem.editorState = payload.editorState; + historyItem.contextItems = []; state.history = state.history.slice(0, index + 1).concat({ message: { From 3c8b3ef59950731f6ec1748129c52adb07cb331a Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Wed, 12 Feb 2025 17:16:16 -0800 Subject: [PATCH 181/262] fix off by one error for codebase retrieval context items --- core/context/retrieval/retrieval.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/context/retrieval/retrieval.ts b/core/context/retrieval/retrieval.ts index d2e73e060..0f0a238eb 100644 --- a/core/context/retrieval/retrieval.ts +++ b/core/context/retrieval/retrieval.ts @@ -119,7 +119,7 @@ export async function retrieveContextItemsFromEmbeddings( } return { - name: `${baseName} (${r.startLine}-${r.endLine})`, + name: `${baseName} (${r.startLine + 1}-${r.endLine + 1})`, description: last2Parts, content: `\`\`\`${relativePathOrBasename}\n${r.content}\n\`\`\``, uri: { From 88ef5d0fba1489c064989f76ac505e1659fc9335 Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Wed, 12 Feb 2025 18:37:36 -0800 Subject: [PATCH 182/262] fix tochatmessage logic --- core/llm/openaiTypeConverters.ts | 48 +++++++++++++++++--------------- 1 file changed, 26 insertions(+), 22 deletions(-) diff --git a/core/llm/openaiTypeConverters.ts b/core/llm/openaiTypeConverters.ts index 4ed8be1c4..8e0acef56 100644 --- a/core/llm/openaiTypeConverters.ts +++ b/core/llm/openaiTypeConverters.ts @@ -57,30 +57,34 @@ export function toChatMessage( } return msg; } else { + if (typeof message.content === "string") { + return { + role: "user", + content: message.content ?? " ", // LM Studio (and other providers) don't accept empty content + }; + } + + // If no multi-media is in the message, just send as text + // for compatibility with OpenAI-"compatible" servers + // that don't support multi-media format return { role: "user", - content: - typeof message.content === "string" - ? message.content || " " // LM Studio (and other providers) don't accept empty content - : // If no multi-media is in the message, just send as text - // for compatibility with OpenAI-"compatible" servers - // that don't support multi-media format - message.content.some((item) => item.type !== "text") - ? message.content - .map((item) => (item as TextMessagePart).text) - .join("") || " " - : message.content.map((part) => { - if (part.type === "imageUrl") { - return { - type: "image_url" as const, - image_url: { - url: part.imageUrl.url, - detail: "auto" as const, - }, - }; - } - return part; - }), + content: !message.content.some((item) => item.type !== "text") + ? message.content + .map((item) => (item as TextMessagePart).text) + .join("") || " " + : message.content.map((part) => { + if (part.type === "imageUrl") { + return { + type: "image_url" as const, + image_url: { + url: part.imageUrl.url, + detail: "auto" as const, + }, + }; + } + return part; + }), }; } } From 6ecbeeccc592ca9df46a30e44ce4640c8dbdb72b Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Thu, 13 Feb 2025 00:23:45 -0800 Subject: [PATCH 183/262] cleanup unused classes --- .../continue/GetTheme.kt | 15 ++++++--- .../CodeToEditCard/AddFileCombobox.tsx | 4 +-- gui/src/components/find/FindWidget.tsx | 2 +- gui/src/components/index.ts | 25 ++------------- gui/src/index.css | 9 +----- gui/tailwind.config.cjs | 32 ++++++------------- 6 files changed, 26 insertions(+), 61 deletions(-) diff --git a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/GetTheme.kt b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/GetTheme.kt index 97a55c4a6..787bc80ae 100644 --- a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/GetTheme.kt +++ b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/GetTheme.kt @@ -75,18 +75,25 @@ class GetTheme { return mapOf( "--vscode-editor-foreground" to defaultForegroundHex, - "--vscode-sideBar-background" to defaultBackgroundHex, - "--vscode-input-background" to secondaryDarkHex, "--vscode-editor-background" to defaultBackgroundHex, + "--vscode-button-background" to defaultBackgroundHex, + "--vscode-button-foreground" to defaultForegroundHex, + "--vscode-list-activeSelectionBackground" to defaultBackgroundHex, - "--vscode-focusBorder" to highlightHex, + "--vscode-quickInputList-focusForeground" to defaultForegroundHex, "--vscode-quickInput-background" to secondaryDarkHex, - "--vscode-input-border" to "#80808080", + "--vscode-badge-background" to highlightHex, "--vscode-badge-foreground" to defaultForegroundHex, + + "--vscode-input-background" to secondaryDarkHex, + "--vscode-input-border" to "#80808080", + "--vscode-sideBar-background" to defaultBackgroundHex, "--vscode-sideBar-border" to "#80808080", + "--vscode-focusBorder" to highlightHex, + "--vscode-commandCenter-activeBorder" to highlightHex, "--vscode-commandCenter-inactiveBorder" to "#80808080" ) diff --git a/gui/src/components/CodeToEditCard/AddFileCombobox.tsx b/gui/src/components/CodeToEditCard/AddFileCombobox.tsx index abd7da72f..07ab68a2c 100644 --- a/gui/src/components/CodeToEditCard/AddFileCombobox.tsx +++ b/gui/src/components/CodeToEditCard/AddFileCombobox.tsx @@ -84,7 +84,7 @@ export default function AddFileCombobox({ className={({ active }) => `relative flex w-full cursor-pointer px-2 py-1 text-left text-xs ${ active - ? "bg-vsc-list-active-background text-vsc-list-active-foreground" + ? "bg-list-active text-list-active-foreground" : "" }` } @@ -112,7 +112,7 @@ export default function AddFileCombobox({ )) ) : ( -
+
No results
)} diff --git a/gui/src/components/find/FindWidget.tsx b/gui/src/components/find/FindWidget.tsx index 9bf965d0f..7f6874aeb 100644 --- a/gui/src/components/find/FindWidget.tsx +++ b/gui/src/components/find/FindWidget.tsx @@ -43,7 +43,7 @@ const HighlightOverlay = (props: HighlightOverlayProps) => { const { isCurrent, top, left, width, height } = props; return (
void; - max?: number; - min?: number; -}; - export const SecondaryButton = styled.button` padding: 6px 12px; margin: 8px 0; diff --git a/gui/src/index.css b/gui/src/index.css index d51fbf004..b151f3743 100644 --- a/gui/src/index.css +++ b/gui/src/index.css @@ -3,14 +3,7 @@ @tailwind utilities; :root { - --secondary-dark: rgb(37, 37, 38); - --vsc-background: rgb(30, 30, 30); - --button-color: rgb(113, 28, 59); - --button-color-hover: rgba(113, 28, 59, 0.667); - --def-border-radius: 5px; - --vscode-editor-background: rgb(30, 30, 30); - --vscode-editor-foreground: rgb(197, 200, 198); - --vscode-textBlockQuote-background: rgba(255, 255, 255, 1); + --example-var: rgb(30, 30, 30); } html, diff --git a/gui/tailwind.config.cjs b/gui/tailwind.config.cjs index c837eea75..b1959bd27 100644 --- a/gui/tailwind.config.cjs +++ b/gui/tailwind.config.cjs @@ -26,36 +26,22 @@ module.exports = { }, colors: { lightgray: "#999998", - "vsc-background": "rgb(var(--vsc-background) / )", - "secondary-dark": "rgb(var(--secondary-dark) / )", + "vsc-background": "var(--vsc-background)", // "rgb(var(--vsc-background) / )", "vsc-input-background": "var(--vscode-input-background, rgb(45 45 45))", - "vsc-quick-input-background": - "var(--vscode-quickInput-background, var(--vscode-input-background, rgb(45 45 45)))", "vsc-background": "var(--vscode-sideBar-background, rgb(30 30 30))", "vsc-foreground": "var(--vscode-editor-foreground, #fff)", - "vsc-button-background": "var(--vscode-button-background, #1bbe84)", - "vsc-button-foreground": "var(--vscode-button-foreground, #ffffff)", "vsc-editor-background": "var(--vscode-editor-background, var(--vscode-sideBar-background, rgb(30 30 30)))", - "vsc-list-active-background": - "var(--vscode-list-activeSelectionBackground, #1bbe84)", - "vsc-focus-border": "var(--vscode-focus-border, #1bbe84)", - "vsc-list-active-foreground": - "var(--vscode-quickInputList-focusForeground, var(--vscode-editor-foreground))", "vsc-input-border": "var(--vscode-input-border, #999998)", - "vsc-input-border-focus": "var(--vscode-focusBorder, #999998)", - "vsc-badge-background": "var(--vscode-badge-background, #1bbe84)", - "vsc-badge-foreground": "var(--vscode-badge-foreground, #fff)", - "vsc-sidebar-border": "var(--vscode-sideBar-border, transparent)", - "vsc-find-match": - "var(--vscode-editor-findMatchBackground, rgba(255, 255, 0, 0.6))", - "vsc-find-match-selected": - "var(--vscode-editor-findMatchHighlightBackground, rgba(255, 223, 0, 0.8))", "vsc-foreground-muted": "var(--vscode-foreground-muted, #999)", - "vsc-description-foreground": - "var(--vscode-descriptionForeground, #999)", - "vsc-input-placeholder-foreground": - "var(--vscode-input-placeholderForeground, #999)", + + // I've moved a few over to the non-vsc-specific approach + // TODO move the rest + "find-match-selected": + "var(--vscode-editor-findMatchHighlightBackground, rgba(255, 223, 0))", + "list-active": "var(--vscode-list-activeSelectionBackground, #1bbe84)", + "list-active-foreground": + "var(--vscode-quickInputList-focusForeground, var(--vscode-editor-foreground))", }, }, }, From 807aefa91ca59bc469287ab9a0f57b65727ba5b9 Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Thu, 13 Feb 2025 00:25:11 -0800 Subject: [PATCH 184/262] remove invalid muted class --- gui/src/components/dialogs/AddDocsDialog.tsx | 12 ++++++------ .../modelSelection/platform/AssistantSelect.tsx | 2 +- gui/src/pages/config/index.tsx | 6 +++--- gui/tailwind.config.cjs | 1 - 4 files changed, 10 insertions(+), 11 deletions(-) diff --git a/gui/src/components/dialogs/AddDocsDialog.tsx b/gui/src/components/dialogs/AddDocsDialog.tsx index 8439a70fa..b312c33ca 100644 --- a/gui/src/components/dialogs/AddDocsDialog.tsx +++ b/gui/src/components/dialogs/AddDocsDialog.tsx @@ -184,7 +184,7 @@ function AddDocsDialog() { {!!sortedDocsSuggestions.length && (

Suggestions

)} -
+
{sortedDocsSuggestions.map((docsResult) => { const { error, details } = docsResult; const { language, name, version } = docsResult.packageInfo; @@ -202,7 +202,7 @@ function AddDocsDialog() {
This may not be a docs page @@ -224,7 +224,7 @@ function AddDocsDialog() {
{error || !details?.docsLink ? ( - + No docs link found ) : ( @@ -251,7 +251,7 @@ function AddDocsDialog() { >

{`Version: ${version}`}

@@ -271,7 +271,7 @@ function AddDocsDialog() {
The title that will be displayed to users in the `@docs` @@ -297,7 +297,7 @@ function AddDocsDialog() {
The starting location to begin crawling the documentation diff --git a/gui/src/components/modelSelection/platform/AssistantSelect.tsx b/gui/src/components/modelSelection/platform/AssistantSelect.tsx index f1216ac3f..186ebde44 100644 --- a/gui/src/components/modelSelection/platform/AssistantSelect.tsx +++ b/gui/src/components/modelSelection/platform/AssistantSelect.tsx @@ -57,7 +57,7 @@ export default function AssistantSelect() {
diff --git a/gui/src/pages/config/index.tsx b/gui/src/pages/config/index.tsx index c66ad80d0..692d7798a 100644 --- a/gui/src/pages/config/index.tsx +++ b/gui/src/pages/config/index.tsx @@ -348,7 +348,7 @@ function ConfigPage() { ) : (
- +
)}
@@ -390,13 +390,13 @@ function ConfigPage() { ) : (
- +
)}
- + Comma-separated list of path matchers diff --git a/gui/tailwind.config.cjs b/gui/tailwind.config.cjs index b1959bd27..039761fac 100644 --- a/gui/tailwind.config.cjs +++ b/gui/tailwind.config.cjs @@ -33,7 +33,6 @@ module.exports = { "vsc-editor-background": "var(--vscode-editor-background, var(--vscode-sideBar-background, rgb(30 30 30)))", "vsc-input-border": "var(--vscode-input-border, #999998)", - "vsc-foreground-muted": "var(--vscode-foreground-muted, #999)", // I've moved a few over to the non-vsc-specific approach // TODO move the rest From 701c0dd950eafdba40e1b505ed365c2e1e732617 Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Thu, 13 Feb 2025 03:09:27 -0800 Subject: [PATCH 185/262] updating jetbrains colors --- core/protocol/webview.ts | 1 + .../ContinuePluginStartupActivity.kt | 13 ++- .../continue/GetTheme.kt | 93 +++++++++---------- gui/src/components/dialogs/AddDocsDialog.tsx | 4 +- gui/src/components/index.ts | 34 ++----- gui/src/hooks/useSetup.ts | 31 ++++++- gui/tailwind.config.cjs | 5 +- 7 files changed, 101 insertions(+), 80 deletions(-) diff --git a/core/protocol/webview.ts b/core/protocol/webview.ts index 822d9b532..013efbbd7 100644 --- a/core/protocol/webview.ts +++ b/core/protocol/webview.ts @@ -40,4 +40,5 @@ export type ToWebviewFromIdeOrCoreProtocol = { signInToControlPlane: [undefined, void]; openDialogMessage: ["account", void]; "docs/suggestions": [PackageDocsResult[], void]; + "jetbrains/setColors": [Record, void]; }; diff --git a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/activities/ContinuePluginStartupActivity.kt b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/activities/ContinuePluginStartupActivity.kt index 6a69ac9cd..fbd52b0b6 100644 --- a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/activities/ContinuePluginStartupActivity.kt +++ b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/activities/ContinuePluginStartupActivity.kt @@ -37,6 +37,7 @@ import com.intellij.openapi.vfs.newvfs.BulkFileListener import com.intellij.openapi.vfs.newvfs.events.VFileEvent import com.intellij.openapi.vfs.newvfs.events.VFileDeleteEvent import com.intellij.openapi.vfs.newvfs.events.VFileContentChangeEvent +import com.intellij.ide.ui.LafManagerListener fun showTutorial(project: Project) { val tutorialFileName = getTutorialFileName() @@ -182,7 +183,7 @@ class ContinuePluginStartupActivity : StartupActivity, DumbAware { val changedURIs = events.filterIsInstance() .mapNotNull { event -> event.file.toUriOrNull() } - // Send "files/changed" message if there are any content changes + // Notify core of content changes if (changedURIs.isNotEmpty()) { val data = mapOf("files" to changedURIs) continuePluginService.coreMessenger?.request("files/changed", data, null) { _ -> } @@ -190,6 +191,16 @@ class ContinuePluginStartupActivity : StartupActivity, DumbAware { } }) + // Listen for theme changes + connection.subscribe(LafManagerListener.TOPIC, LafManagerListener { + // val isDarkTheme = UIManager.getLookAndFeel()?.name?.lowercase()?.contains("dark") ?: false + val colors = GetTheme().getTheme(); + continuePluginService.sendToWebview( + "jetbrains/setColors", + colors + ) + }) + // Listen for clicking settings button to start the auth flow val authService = service() val initialSessionInfo = authService.loadControlPlaneSessionInfo() diff --git a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/GetTheme.kt b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/GetTheme.kt index 787bc80ae..34e42275b 100644 --- a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/GetTheme.kt +++ b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/GetTheme.kt @@ -1,15 +1,12 @@ package com.github.continuedev.continueintellijextension.`continue` -import com.intellij.codeInsight.template.impl.TemplateColors -import com.intellij.openapi.editor.DefaultLanguageHighlighterColors import com.intellij.openapi.editor.colors.EditorColors import com.intellij.openapi.editor.colors.EditorColorsManager -import com.intellij.openapi.editor.colors.EditorColorsScheme -import com.intellij.openapi.editor.colors.TextAttributesKey import java.awt.Color import kotlin.math.max import kotlin.math.min - +import com.intellij.ui.JBColor +import com.intellij.ui.ColorUtil class GetTheme { fun getSecondaryDark(): Color { @@ -42,62 +39,64 @@ class GetTheme { } fun getTheme(): Map { + fun toHex(color: Color): String { + return String.format("#%02x%02x%02x", color.red, color.green, color.blue) + } try { - val globalScheme = EditorColorsManager.getInstance().globalScheme - val defaultBackground = globalScheme.defaultBackground - val defaultForeground = globalScheme.defaultForeground - val highlight = globalScheme.getColor(EditorColors.MODIFIED_TAB_ICON_COLOR) ?: defaultForeground - val defaultBackgroundHex = - String.format("#%02x%02x%02x", defaultBackground.red, defaultBackground.green, defaultBackground.blue) - val defaultForegroundHex = - String.format("#%02x%02x%02x", defaultForeground.red, defaultForeground.green, defaultForeground.blue) - val highlightHex = String.format("#%02x%02x%02x", highlight.red, highlight.green, highlight.blue) + val background = JBColor.background() + val foreground = JBColor.foreground() - val grayscale = - (defaultBackground.red * 0.3 + defaultBackground.green * 0.59 + defaultBackground.blue * 0.11).toInt() + val buttonBackground = JBColor.namedColor("Button.background") + val buttonForeground = JBColor.namedColor("Button.foreground") - val adjustedRed: Int - val adjustedGreen: Int - val adjustedBlue: Int + val badgeBackground = JBColor.namedColor("Panel.background") + val badgeForeground = JBColor.namedColor("Panel.foreground") - val tint: Int = 20 - if (grayscale > 128) { // if closer to white - adjustedRed = max(0, defaultBackground.red - tint) - adjustedGreen = max(0, defaultBackground.green - tint) - adjustedBlue = max(0, defaultBackground.blue - tint) - } else { // if closer to black - adjustedRed = min(255, defaultBackground.red + tint) - adjustedGreen = min(255, defaultBackground.green + tint) - adjustedBlue = min(255, defaultBackground.blue + tint) - } + val inputBackground = JBColor.namedColor("TextField.background") - val secondaryDarkHex = String.format("#%02x%02x%02x", adjustedRed, adjustedGreen, adjustedBlue) + val border = JBColor.border() + val focusBorder = JBColor.namedColor("Focus.borderColor") - return mapOf( - "--vscode-editor-foreground" to defaultForegroundHex, - "--vscode-editor-background" to defaultBackgroundHex, + val editorScheme = EditorColorsManager.getInstance().globalScheme - "--vscode-button-background" to defaultBackgroundHex, - "--vscode-button-foreground" to defaultForegroundHex, + val editorBackground = editorScheme.defaultBackground + val editorForeground = editorScheme.defaultForeground - "--vscode-list-activeSelectionBackground" to defaultBackgroundHex, + val actionHoverBackground = JBColor.namedColor("ActionButton.hoverBackground") + // val inputBorder = JBColor.namedColor("TextField.borderColor") + // val focus = JBColor.namedColor("focusColor") + val highlight = editorScheme.getColor(EditorColors.MODIFIED_TAB_ICON_COLOR) ?: editorForeground - "--vscode-quickInputList-focusForeground" to defaultForegroundHex, - "--vscode-quickInput-background" to secondaryDarkHex, + val findMatchBackground = editorScheme.getAttributes(EditorColors.SEARCH_RESULT_ATTRIBUTES)?.backgroundColor ?: Color(255, 221, 0) - "--vscode-badge-background" to highlightHex, - "--vscode-badge-foreground" to defaultForegroundHex, + val theme = mapOf( + "--vscode-editor-foreground" to toHex(editorForeground), + "--vscode-editor-background" to toHex(editorBackground), - "--vscode-input-background" to secondaryDarkHex, - "--vscode-input-border" to "#80808080", - "--vscode-sideBar-background" to defaultBackgroundHex, - "--vscode-sideBar-border" to "#80808080", - "--vscode-focusBorder" to highlightHex, + "--vscode-button-background" to toHex(buttonBackground), + "--vscode-button-foreground" to toHex(buttonForeground), - "--vscode-commandCenter-activeBorder" to highlightHex, - "--vscode-commandCenter-inactiveBorder" to "#80808080" + "--vscode-list-activeSelectionBackground" to toHex(actionHoverBackground), + + "--vscode-quickInputList-focusForeground" to toHex(foreground), + "--vscode-quickInput-background" to toHex(inputBackground), + + "--vscode-badge-background" to toHex(badgeBackground), + "--vscode-badge-foreground" to toHex(badgeForeground), + + "--vscode-input-background" to toHex(inputBackground), + "--vscode-input-border" to toHex(border), + "--vscode-sideBar-background" to toHex(background), + "--vscode-sideBar-border" to toHex(border), + "--vscode-focusBorder" to toHex(focusBorder), + + "--vscode-commandCenter-activeBorder" to toHex(focusBorder), + "--vscode-commandCenter-inactiveBorder" to toHex(border), + + "--vscode-editor-findMatchHighlightBackground" to toHex(findMatchBackground) + "40" ) + return theme } catch (error: Error) { return mapOf() } diff --git a/gui/src/components/dialogs/AddDocsDialog.tsx b/gui/src/components/dialogs/AddDocsDialog.tsx index b312c33ca..df75e6203 100644 --- a/gui/src/components/dialogs/AddDocsDialog.tsx +++ b/gui/src/components/dialogs/AddDocsDialog.tsx @@ -202,14 +202,14 @@ function AddDocsDialog() {
This may not be a docs page
) : ( - + )}
diff --git a/gui/src/components/index.ts b/gui/src/components/index.ts index 10e69079e..04460f3b1 100644 --- a/gui/src/components/index.ts +++ b/gui/src/components/index.ts @@ -9,18 +9,19 @@ export const VSC_BUTTON_FOREGROUND_VAR = "--vscode-button-foreground"; export const VSC_EDITOR_BACKGROUND_VAR = "--vscode-editor-background"; export const VSC_LIST_SELECTION_BACKGROUND_VAR = "--vscode-list-activeSelectionBackground"; -export const VSC_FOCUS_BORDER = "--vscode-focus-border"; +export const VSC_FOCUS_BORDER_VAR = "--vscode-focusBorder"; export const VSC_LIST_ACTIVE_FOREGROUND_VAR = "--vscode-quickInputList-focusForeground"; export const VSC_QUICK_INPUT_BACKGROUND_VAR = "--vscode-quickInput-background"; export const VSC_INPUT_BORDER_VAR = "--vscode-input-border"; -export const VSC_INPUT_BORDER_FOCUS_VAR = "--vscode-focusBorder"; export const VSC_BADGE_BACKGROUND_VAR = "--vscode-badge-background"; export const VSC_BADGE_FOREGROUND_VAR = "--vscode-badge-foreground"; export const VSC_COMMAND_CENTER_ACTIVE_BORDER_VAR = "--vscode-commandCenter-activeBorder"; export const VSC_COMMAND_CENTER_INACTIVE_BORDER_VAR = "--vscode-commandCenter-inactiveBorder"; +export const VSC_FIND_MATCH_SELECTED_VAR = + "--vscode-editor-findMatchHighlightBackground"; export const VSC_THEME_COLOR_VARS = [ VSC_INPUT_BACKGROUND_VAR, @@ -30,15 +31,15 @@ export const VSC_THEME_COLOR_VARS = [ VSC_BUTTON_FOREGROUND_VAR, VSC_EDITOR_BACKGROUND_VAR, VSC_LIST_SELECTION_BACKGROUND_VAR, - VSC_FOCUS_BORDER, + VSC_FOCUS_BORDER_VAR, VSC_LIST_ACTIVE_FOREGROUND_VAR, VSC_QUICK_INPUT_BACKGROUND_VAR, VSC_INPUT_BORDER_VAR, - VSC_INPUT_BORDER_FOCUS_VAR, VSC_BADGE_BACKGROUND_VAR, VSC_BADGE_FOREGROUND_VAR, VSC_COMMAND_CENTER_ACTIVE_BORDER_VAR, VSC_COMMAND_CENTER_INACTIVE_BORDER_VAR, + VSC_FIND_MATCH_SELECTED_VAR, ]; export const defaultBorderRadius = "5px"; @@ -53,33 +54,14 @@ export const vscButtonBackground = `var(${VSC_BUTTON_BACKGROUND_VAR}, #1bbe84)`; export const vscButtonForeground = `var(${VSC_BUTTON_FOREGROUND_VAR}, #ffffff)`; export const vscEditorBackground = `var(${VSC_EDITOR_BACKGROUND_VAR}, ${VSC_BACKGROUND_VAR}, rgb(30 30 30))`; export const vscListActiveBackground = `var(${VSC_LIST_SELECTION_BACKGROUND_VAR}, #1bbe84)`; -export const vscFocusBorder = `var(${VSC_FOCUS_BORDER}, #1bbe84)`; +export const vscFocusBorder = `var(${VSC_FOCUS_BORDER_VAR}, #1bbe84)`; export const vscListActiveForeground = `var(${VSC_LIST_ACTIVE_FOREGROUND_VAR}, ${VSC_FOREGROUND_VAR})`; export const vscInputBorder = `var(${VSC_INPUT_BORDER_VAR}, ${lightGray})`; -export const vscInputBorderFocus = `var(${VSC_INPUT_BORDER_FOCUS_VAR}, ${lightGray})`; +export const vscInputBorderFocus = `var(${VSC_FOCUS_BORDER_VAR}, ${lightGray})`; export const vscBadgeBackground = `var(${VSC_BADGE_BACKGROUND_VAR}, #1bbe84)`; export const vscCommandCenterActiveBorder = `var(${VSC_COMMAND_CENTER_ACTIVE_BORDER_VAR}, #1bbe84)`; export const vscCommandCenterInactiveBorder = `var(${VSC_COMMAND_CENTER_INACTIVE_BORDER_VAR}, #1bbe84)`; - -if (typeof document !== "undefined") { - const jetbrains = isJetBrains(); - for (const colorVar of VSC_THEME_COLOR_VARS) { - if (jetbrains) { - const cached = localStorage.getItem(colorVar); - if (cached) { - document.body.style.setProperty(colorVar, cached); - } - } - - // Remove alpha channel from colors - const value = getComputedStyle(document.documentElement).getPropertyValue( - colorVar, - ); - if (colorVar.startsWith("#") && value.length > 7) { - document.body.style.setProperty(colorVar, value.slice(0, 7)); - } - } -} +export const vscFindMatchSelected = `var(${VSC_FIND_MATCH_SELECTED_VAR}, rgba(255, 223, 0))`; export function parseHexColor(hexColor: string): { r: number; diff --git a/gui/src/hooks/useSetup.ts b/gui/src/hooks/useSetup.ts index 5ea5c2975..582c962ad 100644 --- a/gui/src/hooks/useSetup.ts +++ b/gui/src/hooks/useSetup.ts @@ -124,7 +124,25 @@ function useSetup() { // Override persisted state dispatch(setInactive()); - if (isJetBrains()) { + const jetbrains = isJetBrains(); + for (const colorVar of VSC_THEME_COLOR_VARS) { + if (jetbrains) { + const cached = localStorage.getItem(colorVar); + if (cached) { + document.body.style.setProperty(colorVar, cached); + } + } + + // Remove alpha channel from colors + const value = getComputedStyle(document.documentElement).getPropertyValue( + colorVar, + ); + if (colorVar.startsWith("#") && value.length > 7) { + document.body.style.setProperty(colorVar, value.slice(0, 7)); + } + } + + if (jetbrains) { // Save theme colors to local storage for immediate loading in JetBrains ideMessenger.request("jetbrains/getColors", undefined).then((result) => { if (result.status === "success") { @@ -160,6 +178,17 @@ function useSetup() { } }, []); + useWebviewListener( + "jetbrains/setColors", + async (data) => { + Object.entries(data).forEach(([key, value]) => { + document.body.style.setProperty(key, value); + document.documentElement.style.setProperty(key, value); + }); + }, + [], + ); + useWebviewListener("docs/suggestions", async (data) => { dispatch(updateDocsSuggestions(data)); }); diff --git a/gui/tailwind.config.cjs b/gui/tailwind.config.cjs index 039761fac..3441bfdee 100644 --- a/gui/tailwind.config.cjs +++ b/gui/tailwind.config.cjs @@ -26,7 +26,6 @@ module.exports = { }, colors: { lightgray: "#999998", - "vsc-background": "var(--vsc-background)", // "rgb(var(--vsc-background) / )", "vsc-input-background": "var(--vscode-input-background, rgb(45 45 45))", "vsc-background": "var(--vscode-sideBar-background, rgb(30 30 30))", "vsc-foreground": "var(--vscode-editor-foreground, #fff)", @@ -34,8 +33,8 @@ module.exports = { "var(--vscode-editor-background, var(--vscode-sideBar-background, rgb(30 30 30)))", "vsc-input-border": "var(--vscode-input-border, #999998)", - // I've moved a few over to the non-vsc-specific approach - // TODO move the rest + // Starting to make things less vsc-specific + // TODO make it all non-IDE-specific naming "find-match-selected": "var(--vscode-editor-findMatchHighlightBackground, rgba(255, 223, 0))", "list-active": "var(--vscode-list-activeSelectionBackground, #1bbe84)", From d2bd618d86a58e3b8f1a18e311e10994621d1e38 Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Thu, 13 Feb 2025 03:35:12 -0800 Subject: [PATCH 186/262] cleanup, badge color change --- .../ContinuePluginStartupActivity.kt | 1 - .../continue/GetTheme.kt | 20 ++++++++----------- 2 files changed, 8 insertions(+), 13 deletions(-) diff --git a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/activities/ContinuePluginStartupActivity.kt b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/activities/ContinuePluginStartupActivity.kt index fbd52b0b6..b65266016 100644 --- a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/activities/ContinuePluginStartupActivity.kt +++ b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/activities/ContinuePluginStartupActivity.kt @@ -193,7 +193,6 @@ class ContinuePluginStartupActivity : StartupActivity, DumbAware { // Listen for theme changes connection.subscribe(LafManagerListener.TOPIC, LafManagerListener { - // val isDarkTheme = UIManager.getLookAndFeel()?.name?.lowercase()?.contains("dark") ?: false val colors = GetTheme().getTheme(); continuePluginService.sendToWebview( "jetbrains/setColors", diff --git a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/GetTheme.kt b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/GetTheme.kt index 34e42275b..6aecca81b 100644 --- a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/GetTheme.kt +++ b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/GetTheme.kt @@ -46,26 +46,22 @@ class GetTheme { val background = JBColor.background() val foreground = JBColor.foreground() - val buttonBackground = JBColor.namedColor("Button.background") - val buttonForeground = JBColor.namedColor("Button.foreground") + val buttonBackground = JBColor.namedColor("Button.background", Color(230, 230, 230)) + val buttonForeground = JBColor.namedColor("Button.foreground", Color(0, 0, 0)) - val badgeBackground = JBColor.namedColor("Panel.background") - val badgeForeground = JBColor.namedColor("Panel.foreground") + val badgeBackground = JBColor.namedColor("Badge.background", Color(150, 150, 150)) + val badgeForeground = JBColor.namedColor("Badge.foreground", Color(0, 0, 0)) - val inputBackground = JBColor.namedColor("TextField.background") + val inputBackground = JBColor.namedColor("TextField.background", Color(255, 255, 255)) val border = JBColor.border() - val focusBorder = JBColor.namedColor("Focus.borderColor") - + val focusBorder = JBColor.namedColor("Focus.borderColor", Color(100, 100, 255)) val editorScheme = EditorColorsManager.getInstance().globalScheme val editorBackground = editorScheme.defaultBackground val editorForeground = editorScheme.defaultForeground - val actionHoverBackground = JBColor.namedColor("ActionButton.hoverBackground") - // val inputBorder = JBColor.namedColor("TextField.borderColor") - // val focus = JBColor.namedColor("focusColor") - val highlight = editorScheme.getColor(EditorColors.MODIFIED_TAB_ICON_COLOR) ?: editorForeground + val actionHoverBackground = JBColor.namedColor("ActionButton.hoverBackground", Color(220, 220, 220)) val findMatchBackground = editorScheme.getAttributes(EditorColors.SEARCH_RESULT_ATTRIBUTES)?.backgroundColor ?: Color(255, 221, 0) @@ -76,7 +72,7 @@ class GetTheme { "--vscode-button-background" to toHex(buttonBackground), "--vscode-button-foreground" to toHex(buttonForeground), - "--vscode-list-activeSelectionBackground" to toHex(actionHoverBackground), + "--vscode-list-activeSelectionBackground" to toHex(actionHoverBackground) + "50", "--vscode-quickInputList-focusForeground" to toHex(foreground), "--vscode-quickInput-background" to toHex(inputBackground), From 76812ab196d697a6e10309c20be13fb3bfa813e6 Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Thu, 13 Feb 2025 03:50:57 -0800 Subject: [PATCH 187/262] tools capability --- core/llm/autodetect.ts | 16 +++++++++---- core/llm/constructMessages.ts | 23 ++++++++++++------- docs/docs/reference.md | 1 + extensions/vscode/config_schema.json | 4 ++++ gui/src/components/mainInput/InputToolbar.tsx | 2 +- gui/src/redux/thunks/streamNormalInput.ts | 3 +-- gui/src/redux/thunks/streamResponse.ts | 3 +-- .../thunks/streamResponseAfterToolCall.ts | 3 +-- 8 files changed, 36 insertions(+), 19 deletions(-) diff --git a/core/llm/autodetect.ts b/core/llm/autodetect.ts index ed1901641..ae1282b67 100644 --- a/core/llm/autodetect.ts +++ b/core/llm/autodetect.ts @@ -1,4 +1,9 @@ -import { ChatMessage, ModelCapability, TemplateType } from "../index.js"; +import { + ChatMessage, + ModelCapability, + ModelDescription, + TemplateType, +} from "../index.js"; import { anthropicTemplateMessages, @@ -87,12 +92,15 @@ const MODEL_SUPPORTS_IMAGES: string[] = [ "llama3.2", ]; -function modelSupportsTools(modelName: string, provider: string) { - const providerSupport = PROVIDER_TOOL_SUPPORT[provider]; +function modelSupportsTools(modelDescription: ModelDescription) { + if (modelDescription.capabilities?.tools) { + return true; + } + const providerSupport = PROVIDER_TOOL_SUPPORT[modelDescription.provider]; if (!providerSupport) { return false; } - return providerSupport(modelName) ?? false; + return providerSupport(modelDescription.model) ?? false; } function modelSupportsImages( diff --git a/core/llm/constructMessages.ts b/core/llm/constructMessages.ts index 4d948e7d0..fa6cdd558 100644 --- a/core/llm/constructMessages.ts +++ b/core/llm/constructMessages.ts @@ -1,4 +1,9 @@ -import { ChatHistoryItem, ChatMessage, MessagePart } from "../"; +import { + ChatHistoryItem, + ChatMessage, + MessagePart, + ModelDescription, +} from "../"; import { normalizeToMessageParts } from "../util/messageContent"; import { modelSupportsTools } from "./autodetect"; @@ -67,15 +72,18 @@ const TOOL_USE_RULES = `When using tools, follow the following guidelines: - Avoid calling tools unless they are absolutely necessary. For example, if you are asked a simple programming question you do not need web search. As another example, if the user asks you to explain something about code, do not create a new file.`; function constructSystemPrompt( - model: string, - provider: string, + modelDescription: ModelDescription, useTools: boolean, ): string | null { let systemMessage = ""; - if (CUSTOM_SYS_MSG_MODEL_FAMILIES.some((family) => model.includes(family))) { + if ( + CUSTOM_SYS_MSG_MODEL_FAMILIES.some((family) => + modelDescription.model.includes(family), + ) + ) { systemMessage = SYSTEM_MESSAGE; } - if (useTools && modelSupportsTools(model, provider)) { + if (useTools && modelSupportsTools(modelDescription)) { if (systemMessage) { systemMessage += "\n\n"; } @@ -89,8 +97,7 @@ const CANCELED_TOOL_CALL_MESSAGE = export function constructMessages( history: ChatHistoryItem[], - model: string, - provider: string, + modelDescription: ModelDescription, useTools: boolean, ): ChatMessage[] { const filteredHistory = history.filter( @@ -98,7 +105,7 @@ export function constructMessages( ); const msgs: ChatMessage[] = []; - const systemMessage = constructSystemPrompt(model, provider, useTools); + const systemMessage = constructSystemPrompt(modelDescription, useTools); if (systemMessage) { msgs.push({ role: "system", diff --git a/docs/docs/reference.md b/docs/docs/reference.md index a14da2944..4d09d4ac6 100644 --- a/docs/docs/reference.md +++ b/docs/docs/reference.md @@ -32,6 +32,7 @@ Each model has specific configuration options tailored to its provider and funct - `engine`: Engine for Azure OpenAI requests. - `capabilities`: Override auto-detected capabilities: - `uploadImage`: Boolean indicating if the model supports image uploads. + - `tools`: Boolean indicating if the model supports tool use. _(AWS Only)_ diff --git a/extensions/vscode/config_schema.json b/extensions/vscode/config_schema.json index d9dab076b..dac2f391b 100644 --- a/extensions/vscode/config_schema.json +++ b/extensions/vscode/config_schema.json @@ -440,6 +440,10 @@ "uploadImage": { "type": "boolean", "description": "Indicates whether the model can upload images." + }, + "tools": { + "type": "boolean", + "description": "Indicates whether the model can use tools" } } } diff --git a/gui/src/components/mainInput/InputToolbar.tsx b/gui/src/components/mainInput/InputToolbar.tsx index f4ea214d0..a6b92ab90 100644 --- a/gui/src/components/mainInput/InputToolbar.tsx +++ b/gui/src/components/mainInput/InputToolbar.tsx @@ -93,7 +93,7 @@ function InputToolbar(props: InputToolbarProps) { const isEnterDisabled = props.disabled || isEditModeAndNoCodeToEdit; const toolsSupported = defaultModel && - modelSupportsTools(defaultModel.model, defaultModel.provider) && + modelSupportsTools(defaultModel) && !props.toolbarOptions?.hideTools; const supportsImages = diff --git a/gui/src/redux/thunks/streamNormalInput.ts b/gui/src/redux/thunks/streamNormalInput.ts index f0f6c9baa..1bd82a030 100644 --- a/gui/src/redux/thunks/streamNormalInput.ts +++ b/gui/src/redux/thunks/streamNormalInput.ts @@ -27,8 +27,7 @@ export const streamNormalInput = createAsyncThunk< throw new Error("Default model not defined"); } - const includeTools = - useTools && modelSupportsTools(defaultModel.model, defaultModel.provider); + const includeTools = useTools && modelSupportsTools(defaultModel); // Send request const gen = extra.ideMessenger.llmStreamChat( diff --git a/gui/src/redux/thunks/streamResponse.ts b/gui/src/redux/thunks/streamResponse.ts index 1c191b662..353653264 100644 --- a/gui/src/redux/thunks/streamResponse.ts +++ b/gui/src/redux/thunks/streamResponse.ts @@ -120,8 +120,7 @@ export const streamResponseThunk = createAsyncThunk< const updatedHistory = getState().session.history; const messages = constructMessages( [...updatedHistory], - defaultModel.model, - defaultModel.provider, + defaultModel, useTools, ); diff --git a/gui/src/redux/thunks/streamResponseAfterToolCall.ts b/gui/src/redux/thunks/streamResponseAfterToolCall.ts index 2710d0f5e..3d41c664f 100644 --- a/gui/src/redux/thunks/streamResponseAfterToolCall.ts +++ b/gui/src/redux/thunks/streamResponseAfterToolCall.ts @@ -63,8 +63,7 @@ export const streamResponseAfterToolCall = createAsyncThunk< const updatedHistory = getState().session.history; const messages = constructMessages( [...updatedHistory], - defaultModel.model, - defaultModel.provider, + defaultModel, useTools, ); const output = await dispatch(streamNormalInput(messages)); From 4df1fc31a3a7f178a923b3c7d34ba94a2aa91841 Mon Sep 17 00:00:00 2001 From: Akim Tsvigun Date: Thu, 13 Feb 2025 16:34:03 +0100 Subject: [PATCH 188/262] Nebius info actualized --- core/llm/autodetect.ts | 2 ++ core/llm/llms/Nebius.ts | 4 ++++ gui/src/pages/AddNewModel/configs/models.ts | 16 ++++++++-------- gui/src/pages/AddNewModel/configs/providers.ts | 4 ++++ 4 files changed, 18 insertions(+), 8 deletions(-) diff --git a/core/llm/autodetect.ts b/core/llm/autodetect.ts index ed1901641..797749a7d 100644 --- a/core/llm/autodetect.ts +++ b/core/llm/autodetect.ts @@ -52,6 +52,7 @@ const PROVIDER_HANDLES_TEMPLATING: string[] = [ "sambanova", "vertexai", "watsonx", + "nebius", ]; const PROVIDER_SUPPORTS_IMAGES: string[] = [ @@ -68,6 +69,7 @@ const PROVIDER_SUPPORTS_IMAGES: string[] = [ "vertexai", "azure", "scaleway", + "nebius", ]; const MODEL_SUPPORTS_IMAGES: string[] = [ diff --git a/core/llm/llms/Nebius.ts b/core/llm/llms/Nebius.ts index dc97f94d0..e346e4ca8 100644 --- a/core/llm/llms/Nebius.ts +++ b/core/llm/llms/Nebius.ts @@ -10,6 +10,10 @@ class Nebius extends OpenAI { }; private static MODEL_IDS: { [name: string]: string } = { + "deepseek/deepseek_v3": "deepseek-ai/DeepSeek-V3", + "deepseek/deepseek-r1": "deepseek-ai/DeepSeek-R1", + "qwen2.5-coder-32b": "Qwen/Qwen2.5-Coder-32B-Instruct-fast", + "Qwen/QwQ-32B-Preview": "Qwen/QwQ-32B-Preview", "llama3.1-70b-nemotron": "nvidia/Llama-3.1-Nemotron-70B-Instruct-HF-fast", "llama3.1-8b": "meta-llama/Meta-Llama-3.1-70B-Instruct-fast", "llama3.1-70b": "meta-llama/Meta-Llama-3.1-70B-Instruct-fast", diff --git a/gui/src/pages/AddNewModel/configs/models.ts b/gui/src/pages/AddNewModel/configs/models.ts index 3b3486e79..72303ce17 100644 --- a/gui/src/pages/AddNewModel/configs/models.ts +++ b/gui/src/pages/AddNewModel/configs/models.ts @@ -59,7 +59,7 @@ export const models: { [key: string]: ModelPackage } = { }, }, ], - providerOptions: ["novita"], + providerOptions: ["novita", "nebius"], isOpenSource: true, }, deepseekR1Chat: { @@ -84,7 +84,7 @@ export const models: { [key: string]: ModelPackage } = { }, }, ], - providerOptions: ["novita"], + providerOptions: ["novita", "nebius"], isOpenSource: true, }, llama318BChat: { @@ -499,7 +499,7 @@ export const models: { [key: string]: ModelPackage } = { contextLength: 8192, }, icon: "meta.png", - providerOptions: ["groq", "scaleway"], + providerOptions: ["groq", "scaleway", "nebius"], isOpenSource: false, }, llama3170bChat: { @@ -512,7 +512,7 @@ export const models: { [key: string]: ModelPackage } = { contextLength: 8192, }, icon: "meta.png", - providerOptions: ["groq", "scaleway"], + providerOptions: ["groq", "scaleway", "nebius"], isOpenSource: false, }, llama31405bChat: { @@ -525,7 +525,7 @@ export const models: { [key: string]: ModelPackage } = { contextLength: 8192, }, icon: "meta.png", - providerOptions: ["groq"], + providerOptions: ["groq", "nebius"], isOpenSource: false, }, llama3170bNemotron: { @@ -551,7 +551,7 @@ export const models: { [key: string]: ModelPackage } = { contextLength: 8192, }, icon: "meta.png", - providerOptions: ["ollama", "groq", "llama.cpp", "sambanova"], + providerOptions: ["ollama", "groq", "llama.cpp", "sambanova", "nebius"], isOpenSource: false, }, llama323bChat: { @@ -1371,10 +1371,10 @@ export const models: { [key: string]: ModelPackage } = { params: { title: "Qwen 2.5 Coder 32b", model: "qwen2.5-coder-32b", - contextLength: 128_000, + contextLength: 32_000, }, icon: "qwen.png", - providerOptions: ["scaleway"], + providerOptions: ["scaleway", "nebius"], isOpenSource: true, }, grokBeta: { diff --git a/gui/src/pages/AddNewModel/configs/providers.ts b/gui/src/pages/AddNewModel/configs/providers.ts index d6f9f76dc..31c0bb2f6 100644 --- a/gui/src/pages/AddNewModel/configs/providers.ts +++ b/gui/src/pages/AddNewModel/configs/providers.ts @@ -867,6 +867,10 @@ To get started, [register](https://dataplatform.cloud.ibm.com/registration/stepo icon: "nebius.png", tags: [ModelProviderTags.RequiresApiKey, ModelProviderTags.OpenSource], packages: [ + models.deepseekR1Chat, + models.deepseekV3Chat, + models.QwenQwQ_32b_preview, + models.Qwen25Coder_32b, models.llama318bChat, models.llama3170bChat, models.llama31405bChat, From 2fafa1290e5193b6e346e7fcb80c543dd5417c5a Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Thu, 13 Feb 2025 09:59:30 -0800 Subject: [PATCH 189/262] respect false --- core/llm/autodetect.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/llm/autodetect.ts b/core/llm/autodetect.ts index ae1282b67..27ed9d46d 100644 --- a/core/llm/autodetect.ts +++ b/core/llm/autodetect.ts @@ -93,8 +93,8 @@ const MODEL_SUPPORTS_IMAGES: string[] = [ ]; function modelSupportsTools(modelDescription: ModelDescription) { - if (modelDescription.capabilities?.tools) { - return true; + if (modelDescription.capabilities?.tools !== undefined) { + return modelDescription.capabilities.tools; } const providerSupport = PROVIDER_TOOL_SUPPORT[modelDescription.provider]; if (!providerSupport) { From b2dad4b6cd77eb46610239454ef37a9ae90f59bd Mon Sep 17 00:00:00 2001 From: Nate Date: Thu, 13 Feb 2025 09:59:31 -0800 Subject: [PATCH 190/262] enable-hub-continue-dev feature flag --- core/control-plane/env.ts | 12 ++++++++++++ extensions/vscode/package-lock.json | 2 +- extensions/vscode/src/VsCodeIde.ts | 16 +++++++++++++--- .../vscode/src/extension/VsCodeExtension.ts | 2 +- gui/package-lock.json | 2 +- 5 files changed, 28 insertions(+), 6 deletions(-) diff --git a/core/control-plane/env.ts b/core/control-plane/env.ts index 8f5bb40a4..de8fb2ef8 100644 --- a/core/control-plane/env.ts +++ b/core/control-plane/env.ts @@ -1,3 +1,4 @@ +import fetch from "node-fetch"; import { IdeSettings } from ".."; export interface ControlPlaneEnv { @@ -60,6 +61,17 @@ const LOCAL_ENV: ControlPlaneEnv = { APP_URL: "http://localhost:3000/", }; +export async function enableHubContinueDev() { + try { + const resp = await fetch("http://localhost:3001/features/hub"); + const data = (await resp.json()) as any; + if ("enabled" in data && data.enabled === true) { + return true; + } + } catch (e: any) {} + return false; +} + export async function getControlPlaneEnv( ideSettingsPromise: Promise, ): Promise { diff --git a/extensions/vscode/package-lock.json b/extensions/vscode/package-lock.json index 43d3f0d81..12bad6086 100644 --- a/extensions/vscode/package-lock.json +++ b/extensions/vscode/package-lock.json @@ -110,7 +110,7 @@ "@continuedev/fetch": "^1.0.4", "@continuedev/llm-info": "^1.0.2", "@continuedev/openai-adapters": "^1.0.10", - "@modelcontextprotocol/sdk": "^1.4.1", + "@modelcontextprotocol/sdk": "^1.5.0", "@mozilla/readability": "^0.5.0", "@octokit/rest": "^20.0.2", "@typescript-eslint/eslint-plugin": "^7.8.0", diff --git a/extensions/vscode/src/VsCodeIde.ts b/extensions/vscode/src/VsCodeIde.ts index 7f9f561f6..08c77fd3e 100644 --- a/extensions/vscode/src/VsCodeIde.ts +++ b/extensions/vscode/src/VsCodeIde.ts @@ -2,7 +2,7 @@ import * as child_process from "node:child_process"; import { exec } from "node:child_process"; import { Range } from "core"; -import { EXTENSION_NAME } from "core/control-plane/env"; +import { enableHubContinueDev, EXTENSION_NAME } from "core/control-plane/env"; import { GetGhTokenArgs } from "core/protocol/ide"; import { editConfigJson, getConfigJsonPath } from "core/util/paths"; import * as vscode from "vscode"; @@ -619,7 +619,7 @@ class VsCodeIde implements IDE { return vscode.workspace.fs.readDirectory(vscode.Uri.parse(dir)) as any; } - getIdeSettingsSync(): IdeSettings { + private getIdeSettingsSync(): IdeSettings { const settings = vscode.workspace.getConfiguration(EXTENSION_NAME); const remoteConfigServerUrl = settings.get( "remoteConfigServerUrl", @@ -652,7 +652,17 @@ class VsCodeIde implements IDE { } async getIdeSettings(): Promise { - return this.getIdeSettingsSync(); + const ideSettings = this.getIdeSettingsSync(); + + // Feature flag for when hub is enabled + if (ideSettings.continueTestEnvironment !== "production") { + const enableHub = await enableHubContinueDev(); + if (enableHub) { + ideSettings.continueTestEnvironment = "production"; + } + } + + return ideSettings; } } diff --git a/extensions/vscode/src/extension/VsCodeExtension.ts b/extensions/vscode/src/extension/VsCodeExtension.ts index be58bb375..7d483b2bb 100644 --- a/extensions/vscode/src/extension/VsCodeExtension.ts +++ b/extensions/vscode/src/extension/VsCodeExtension.ts @@ -380,7 +380,7 @@ export class VsCodeExtension { .get("enableContinueHub"); vscode.workspace.onDidChangeConfiguration(async (event) => { if (event.affectsConfiguration(EXTENSION_NAME)) { - const settings = this.ide.getIdeSettingsSync(); + const settings = await this.ide.getIdeSettings(); const webviewProtocol = await this.webviewProtocolPromise; void webviewProtocol.request("didChangeIdeSettings", { settings, diff --git a/gui/package-lock.json b/gui/package-lock.json index 9abf7aeee..fd717a89e 100644 --- a/gui/package-lock.json +++ b/gui/package-lock.json @@ -112,7 +112,7 @@ "@continuedev/fetch": "^1.0.4", "@continuedev/llm-info": "^1.0.2", "@continuedev/openai-adapters": "^1.0.10", - "@modelcontextprotocol/sdk": "^1.4.1", + "@modelcontextprotocol/sdk": "^1.5.0", "@mozilla/readability": "^0.5.0", "@octokit/rest": "^20.0.2", "@typescript-eslint/eslint-plugin": "^7.8.0", From 2cbea9e3e13c703e3ac57fa3cbdfab7c5e79d490 Mon Sep 17 00:00:00 2001 From: Nate Date: Thu, 13 Feb 2025 10:39:42 -0800 Subject: [PATCH 191/262] update url, implement in intellij --- binary/package-lock.json | 2 +- core/control-plane/env.ts | 2 +- .../continue/IntelliJIde.kt | 43 ++++++++++++++++++- 3 files changed, 44 insertions(+), 3 deletions(-) diff --git a/binary/package-lock.json b/binary/package-lock.json index d3058c4d6..367b0eb93 100644 --- a/binary/package-lock.json +++ b/binary/package-lock.json @@ -52,7 +52,7 @@ "@continuedev/fetch": "^1.0.4", "@continuedev/llm-info": "^1.0.2", "@continuedev/openai-adapters": "^1.0.10", - "@modelcontextprotocol/sdk": "^1.4.1", + "@modelcontextprotocol/sdk": "^1.5.0", "@mozilla/readability": "^0.5.0", "@octokit/rest": "^20.0.2", "@typescript-eslint/eslint-plugin": "^7.8.0", diff --git a/core/control-plane/env.ts b/core/control-plane/env.ts index de8fb2ef8..5d03d1f8f 100644 --- a/core/control-plane/env.ts +++ b/core/control-plane/env.ts @@ -63,7 +63,7 @@ const LOCAL_ENV: ControlPlaneEnv = { export async function enableHubContinueDev() { try { - const resp = await fetch("http://localhost:3001/features/hub"); + const resp = await fetch("https://api.continue.dev/features/hub"); const data = (await resp.json()) as any; if ("enabled" in data && data.enabled === true) { return true; diff --git a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/IntelliJIde.kt b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/IntelliJIde.kt index fc93425b9..87b0d6970 100644 --- a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/IntelliJIde.kt +++ b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/IntelliJIde.kt @@ -6,6 +6,7 @@ import com.github.continuedev.continueintellijextension.utils.OS import com.github.continuedev.continueintellijextension.utils.getMachineUniqueID import com.github.continuedev.continueintellijextension.utils.getOS import com.github.continuedev.continueintellijextension.utils.toUriOrNull +import com.google.gson.Gson import com.intellij.codeInsight.daemon.impl.HighlightInfo import com.intellij.execution.configurations.GeneralCommandLine import com.intellij.execution.util.ExecUtil @@ -31,6 +32,10 @@ import com.intellij.psi.PsiDocumentManager import com.intellij.testFramework.LightVirtualFile import com.intellij.util.containers.toArray import kotlinx.coroutines.* +import okhttp3.MediaType.Companion.toMediaType +import okhttp3.OkHttpClient +import okhttp3.Request +import okhttp3.RequestBody.Companion.toRequestBody import java.awt.Desktop import java.awt.Toolkit import java.awt.datatransfer.DataFlavor @@ -39,6 +44,7 @@ import java.io.File import java.io.FileInputStream import java.io.InputStreamReader import java.net.URI +import java.net.URL import java.nio.charset.Charset import java.nio.file.Paths @@ -85,15 +91,50 @@ class IntelliJIDE( ) } + suspend fun enableHubContinueDev(): Boolean { + try { + val client = OkHttpClient() + val url = URL("https://api.continue.dev/features/hub") + + val request = Request.Builder() + .url(url) + .get() + .header("Content-Type", "application/json") + .build() + + val response = client.newCall(request).execute() + + val responseBody = response.body?.string() + val gson = Gson() + val responseMap = gson.fromJson(responseBody, Map::class.java) + + if (responseMap["enabled"] == true) { + return true + } + } catch (e: Exception) { + return false + } + return false + } + override suspend fun getIdeSettings(): IdeSettings { val settings = service() + + var continueTestEnvironment = settings.continueState.continueTestEnvironment + if (continueTestEnvironment != "production") { + val enableHub = enableHubContinueDev() + if (enableHub) { + continueTestEnvironment = "production" + } + } + return IdeSettings( remoteConfigServerUrl = settings.continueState.remoteConfigServerUrl, remoteConfigSyncPeriod = settings.continueState.remoteConfigSyncPeriod, userToken = settings.continueState.userToken ?: "", enableControlServerBeta = settings.continueState.enableContinueTeamsBeta, - continueTestEnvironment = settings.continueState.continueTestEnvironment, + continueTestEnvironment = continueTestEnvironment, pauseCodebaseIndexOnStart = false, // TODO: Needs to be implemented ) } From 333ccd3ab5363c62c65e463d51a8326d2b97a778 Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Thu, 13 Feb 2025 10:46:50 -0800 Subject: [PATCH 192/262] add tools boolean --- core/index.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/core/index.d.ts b/core/index.d.ts index b1d15847a..853209b71 100644 --- a/core/index.d.ts +++ b/core/index.d.ts @@ -907,6 +907,7 @@ export interface BaseCompletionOptions { export interface ModelCapability { uploadImage?: boolean; + tools?: boolean; } export interface ModelDescription { From 007bdcda25b35d81b58b7d183a2606e5919ceed3 Mon Sep 17 00:00:00 2001 From: Nate Date: Thu, 13 Feb 2025 10:50:13 -0800 Subject: [PATCH 193/262] update package lock files --- core/package-lock.json | 13 +++++++++---- gui/package-lock.json | 34 +++++++++++++++++++++++++++------- 2 files changed, 36 insertions(+), 11 deletions(-) diff --git a/core/package-lock.json b/core/package-lock.json index 6f1690f78..c96746622 100644 --- a/core/package-lock.json +++ b/core/package-lock.json @@ -13,7 +13,7 @@ "@aws-sdk/client-sagemaker-runtime": "^3.621.0", "@aws-sdk/credential-providers": "^3.620.1", "@continuedev/config-types": "^1.0.13", - "@continuedev/config-yaml": "file:///Users/dallin/documents/code/continuedev/continue/packages/config-yaml/dist", + "@continuedev/config-yaml": "^1.0.29", "@continuedev/fetch": "^1.0.4", "@continuedev/llm-info": "^1.0.2", "@continuedev/openai-adapters": "^1.0.10", @@ -106,7 +106,6 @@ "node": ">=20.11.0" } }, - "../../../../../documents/code/continuedev/continue/packages/config-yaml/dist": {}, "node_modules/@75lb/deep-merge": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@75lb/deep-merge/-/deep-merge-1.1.2.tgz", @@ -3039,8 +3038,14 @@ } }, "node_modules/@continuedev/config-yaml": { - "resolved": "../../../../../documents/code/continuedev/continue/packages/config-yaml/dist", - "link": true + "version": "1.0.29", + "resolved": "https://registry.npmjs.org/@continuedev/config-yaml/-/config-yaml-1.0.29.tgz", + "integrity": "sha512-5zKebdoNp52eSFCrs/EODF36I0basrDdE9gQ6Vxoxd9axzVTyWlbpm6gLXXeaHpJMSCaTcQMh/uzAiq8trwrYA==", + "dependencies": { + "@continuedev/config-types": "^1.0.14", + "yaml": "^2.6.1", + "zod": "^3.23.8" + } }, "node_modules/@continuedev/fetch": { "version": "1.0.4", diff --git a/gui/package-lock.json b/gui/package-lock.json index 869aca61b..f9642efc6 100644 --- a/gui/package-lock.json +++ b/gui/package-lock.json @@ -7,7 +7,7 @@ "name": "gui", "license": "Apache-2.0", "dependencies": { - "@continuedev/config-yaml": "file:///Users/dallin/documents/code/continuedev/continue/packages/config-yaml/dist", + "@continuedev/config-yaml": "^1.0.29", "@headlessui/react": "^1.7.17", "@heroicons/react": "^2.0.18", "@reduxjs/toolkit": "^2.3.0", @@ -99,7 +99,6 @@ "node": ">=20.11.0" } }, - "../../../../../documents/code/continuedev/continue/packages/config-yaml/dist": {}, "../core": { "name": "@continuedev/core", "version": "1.0.13", @@ -109,11 +108,11 @@ "@aws-sdk/client-sagemaker-runtime": "^3.621.0", "@aws-sdk/credential-providers": "^3.620.1", "@continuedev/config-types": "^1.0.13", - "@continuedev/config-yaml": "file:///Users/dallin/documents/code/continuedev/continue/packages/config-yaml/dist", + "@continuedev/config-yaml": "^1.0.29", "@continuedev/fetch": "^1.0.4", "@continuedev/llm-info": "^1.0.2", "@continuedev/openai-adapters": "^1.0.10", - "@modelcontextprotocol/sdk": "^1.4.1", + "@modelcontextprotocol/sdk": "^1.5.0", "@mozilla/readability": "^0.5.0", "@octokit/rest": "^20.0.2", "@typescript-eslint/eslint-plugin": "^7.8.0", @@ -548,9 +547,23 @@ "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", "dev": true }, + "node_modules/@continuedev/config-types": { + "version": "1.0.14", + "resolved": "https://registry.npmjs.org/@continuedev/config-types/-/config-types-1.0.14.tgz", + "integrity": "sha512-PVHyHPyRXd2QsaNgnCpiKYU3uHFTlyuQSkqE8OwrBmQqO6/TXUVIr/2EGtyIZGrml4Y+rGMSH40WU4/0t4SGpQ==", + "dependencies": { + "zod": "^3.23.8" + } + }, "node_modules/@continuedev/config-yaml": { - "resolved": "../../../../../documents/code/continuedev/continue/packages/config-yaml/dist", - "link": true + "version": "1.0.29", + "resolved": "https://registry.npmjs.org/@continuedev/config-yaml/-/config-yaml-1.0.29.tgz", + "integrity": "sha512-5zKebdoNp52eSFCrs/EODF36I0basrDdE9gQ6Vxoxd9axzVTyWlbpm6gLXXeaHpJMSCaTcQMh/uzAiq8trwrYA==", + "dependencies": { + "@continuedev/config-types": "^1.0.14", + "yaml": "^2.6.1", + "zod": "^3.23.8" + } }, "node_modules/@emotion/is-prop-valid": { "version": "1.3.1", @@ -13722,7 +13735,6 @@ "version": "2.6.1", "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.6.1.tgz", "integrity": "sha512-7r0XPzioN/Q9kXBro/XPnA6kznR73DHq+GXh5ON7ZozRO6aMjbmiBuKste2wslTFkC5d1dw0GooOCepZXJ2SAg==", - "dev": true, "bin": { "yaml": "bin.mjs" }, @@ -13742,6 +13754,14 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/zod": { + "version": "3.24.2", + "resolved": "https://registry.npmjs.org/zod/-/zod-3.24.2.tgz", + "integrity": "sha512-lY7CDW43ECgW9u1TcT3IoXHflywfVqDYze4waEz812jR/bZ8FHDsl7pFQoSZTz5N+2NqRXs8GBwnAwo3ZNxqhQ==", + "funding": { + "url": "https://github.com/sponsors/colinhacks" + } + }, "node_modules/zwitch": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/zwitch/-/zwitch-2.0.4.tgz", From a74ca543c6c535bd48f00264f5f76c1e56ceb9c2 Mon Sep 17 00:00:00 2001 From: Nate Date: Thu, 13 Feb 2025 10:50:22 -0800 Subject: [PATCH 194/262] update package lock --- extensions/vscode/package-lock.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extensions/vscode/package-lock.json b/extensions/vscode/package-lock.json index c0f826bc0..8d530b1de 100644 --- a/extensions/vscode/package-lock.json +++ b/extensions/vscode/package-lock.json @@ -106,11 +106,11 @@ "@aws-sdk/client-sagemaker-runtime": "^3.621.0", "@aws-sdk/credential-providers": "^3.620.1", "@continuedev/config-types": "^1.0.13", - "@continuedev/config-yaml": "file:///Users/dallin/documents/code/continuedev/continue/packages/config-yaml/dist", + "@continuedev/config-yaml": "^1.0.29", "@continuedev/fetch": "^1.0.4", "@continuedev/llm-info": "^1.0.2", "@continuedev/openai-adapters": "^1.0.10", - "@modelcontextprotocol/sdk": "^1.4.1", + "@modelcontextprotocol/sdk": "^1.5.0", "@mozilla/readability": "^0.5.0", "@octokit/rest": "^20.0.2", "@typescript-eslint/eslint-plugin": "^7.8.0", From eb59b5ba0e1dbaa90a961d681645cb8f2385f4c1 Mon Sep 17 00:00:00 2001 From: Nate Date: Thu, 13 Feb 2025 17:54:05 -0800 Subject: [PATCH 195/262] bump gradle version --- extensions/intellij/gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/intellij/gradle.properties b/extensions/intellij/gradle.properties index 1ff05ba34..5a17c95f0 100644 --- a/extensions/intellij/gradle.properties +++ b/extensions/intellij/gradle.properties @@ -3,7 +3,7 @@ pluginGroup=com.github.continuedev.continueintellijextension pluginName=continue-intellij-extension pluginRepositoryUrl=https://github.com/continuedev/continue # SemVer format -> https://semver.org -pluginVersion=0.0.89 +pluginVersion=0.0.90 # Supported build number ranges and IntelliJ Platform versions -> https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html pluginSinceBuild=223 # IntelliJ Platform Properties -> https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html#configuration-intellij-extension From d37c03fde9f14734f7e8666ff3acd0ba4f3e42ed Mon Sep 17 00:00:00 2001 From: Nate Date: Thu, 13 Feb 2025 21:51:26 -0800 Subject: [PATCH 196/262] don't register copy buffer spy --- extensions/vscode/src/commands.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/vscode/src/commands.ts b/extensions/vscode/src/commands.ts index 54e84b083..02afcdcec 100644 --- a/extensions/vscode/src/commands.ts +++ b/extensions/vscode/src/commands.ts @@ -1061,7 +1061,7 @@ export function registerAllCommands( core: Core, editDecorationManager: EditDecorationManager, ) { - registerCopyBufferSpy(context, core); + // registerCopyBufferSpy(context, core); for (const [command, callback] of Object.entries( getCommandsMap( From f93cad7b5795e81dcf11c47a1d029f1b07e16e36 Mon Sep 17 00:00:00 2001 From: Nate Date: Thu, 13 Feb 2025 22:19:39 -0800 Subject: [PATCH 197/262] add ability to use staging environment in vscode --- core/control-plane/env.ts | 20 +++++++++------- core/index.d.ts | 48 +++++++++++++++++++-------------------- core/util/paths.ts | 4 ++++ 3 files changed, 40 insertions(+), 32 deletions(-) diff --git a/core/control-plane/env.ts b/core/control-plane/env.ts index 5d03d1f8f..ca8a85a12 100644 --- a/core/control-plane/env.ts +++ b/core/control-plane/env.ts @@ -1,5 +1,7 @@ import fetch from "node-fetch"; +import * as fs from "node:fs"; import { IdeSettings } from ".."; +import { getStagingEnvironmentDotFilePath } from "../util/paths"; export interface ControlPlaneEnv { DEFAULT_CONTROL_PLANE_PROXY_URL: string; @@ -36,13 +38,11 @@ const PRODUCTION_HUB_ENV: ControlPlaneEnv = { }; const STAGING_ENV: ControlPlaneEnv = { - DEFAULT_CONTROL_PLANE_PROXY_URL: - "https://control-plane-api-service-537175798139.us-central1.run.app/", - CONTROL_PLANE_URL: - "https://control-plane-api-service-537175798139.us-central1.run.app/", - AUTH_TYPE: WORKOS_CLIENT_ID_STAGING, + DEFAULT_CONTROL_PLANE_PROXY_URL: "https://api.continue-stage.tools/", + CONTROL_PLANE_URL: "https://api.continue-stage.tools/", + AUTH_TYPE: WORKOS_ENV_ID_STAGING, WORKOS_CLIENT_ID: WORKOS_CLIENT_ID_STAGING, - APP_URL: "https://app-preview.continue.dev/", + APP_URL: "https://hub.continue-stage.tools/", }; const TEST_ENV: ControlPlaneEnv = { @@ -82,11 +82,15 @@ export async function getControlPlaneEnv( export function getControlPlaneEnvSync( ideTestEnvironment: IdeSettings["continueTestEnvironment"], ): ControlPlaneEnv { + if (fs.existsSync(getStagingEnvironmentDotFilePath())) { + return STAGING_ENV; + } + const env = ideTestEnvironment === "production" ? "hub" - : ideTestEnvironment === "test" - ? "test" + : ideTestEnvironment === "staging" + ? "staging" : ideTestEnvironment === "local" ? "local" : process.env.CONTROL_PLANE_ENV; diff --git a/core/index.d.ts b/core/index.d.ts index a88e544e6..19b1c4a68 100644 --- a/core/index.d.ts +++ b/core/index.d.ts @@ -1,6 +1,6 @@ +import { ModelRole } from "@continuedev/config-yaml"; import Parser from "web-tree-sitter"; import { GetGhTokenArgs } from "./protocol/ide"; -import { ModelRole } from "@continuedev/config-yaml"; declare global { interface Window { ide?: "vscode"; @@ -43,13 +43,13 @@ export interface IndexingProgressUpdate { desc: string; shouldClearIndexes?: boolean; status: - | "loading" - | "indexing" - | "done" - | "failed" - | "paused" - | "disabled" - | "cancelled"; + | "loading" + | "indexing" + | "done" + | "failed" + | "paused" + | "disabled" + | "cancelled"; debugInfo?: string; } @@ -600,7 +600,7 @@ export interface IdeSettings { remoteConfigSyncPeriod: number; userToken: string; enableControlServerBeta: boolean; - continueTestEnvironment: "none" | "production" | "test" | "local"; + continueTestEnvironment: "none" | "production" | "staging" | "local"; pauseCodebaseIndexOnStart: boolean; } @@ -667,10 +667,10 @@ export interface IDE { getCurrentFile(): Promise< | undefined | { - isUntitled: boolean; - path: string; - contents: string; - } + isUntitled: boolean; + path: string; + contents: string; + } >; getPinnedFiles(): Promise; @@ -849,11 +849,11 @@ export interface CustomCommand { export interface Prediction { type: "content"; content: - | string - | { - type: "text"; - text: string; - }[]; + | string + | { + type: "text"; + text: string; + }[]; } export interface ToolExtras { @@ -1181,9 +1181,9 @@ export interface Config { embeddingsProvider?: EmbeddingsProviderDescription | ILLM; /** The model that Continue will use for tab autocompletions. */ tabAutocompleteModel?: - | CustomLLM - | ModelDescription - | (CustomLLM | ModelDescription)[]; + | CustomLLM + | ModelDescription + | (CustomLLM | ModelDescription)[]; /** Options for tab autocomplete */ tabAutocompleteOptions?: Partial; /** UI styles customization */ @@ -1274,9 +1274,9 @@ export type PackageDetailsSuccess = PackageDetails & { export type PackageDocsResult = { packageInfo: ParsedPackageInfo; } & ( - | { error: string; details?: never } - | { details: PackageDetailsSuccess; error?: never } - ); + | { error: string; details?: never } + | { details: PackageDetailsSuccess; error?: never } +); export interface TerminalOptions { reuseTerminal?: boolean; diff --git a/core/util/paths.ts b/core/util/paths.ts index 1198dec49..a8861befa 100644 --- a/core/util/paths.ts +++ b/core/util/paths.ts @@ -377,6 +377,10 @@ export function getEsbuildBinaryPath(): string { return path.join(getContinueUtilsPath(), "esbuild"); } +export function getStagingEnvironmentDotFilePath(): string { + return path.join(getContinueGlobalPath(), ".staging"); +} + export function setupInitialDotContinueDirectory() { const devDataTypes = [ "chat", From 6c17e9e92a229d88613c9d40671f77e73fa7322e Mon Sep 17 00:00:00 2001 From: Nate Date: Thu, 13 Feb 2025 22:20:15 -0800 Subject: [PATCH 198/262] bump --- extensions/vscode/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/vscode/package.json b/extensions/vscode/package.json index fd5f69014..3c8438d7a 100644 --- a/extensions/vscode/package.json +++ b/extensions/vscode/package.json @@ -2,7 +2,7 @@ "name": "continue", "icon": "media/icon.png", "author": "Continue Dev, Inc", - "version": "0.9.265", + "version": "0.9.266", "repository": { "type": "git", "url": "https://github.com/continuedev/continue" From 07876115a39f791127b136e9e69377e332455cb1 Mon Sep 17 00:00:00 2001 From: Nate Date: Thu, 13 Feb 2025 23:28:07 -0800 Subject: [PATCH 199/262] move continue-proxy logic to config-yaml package --- core/config/ConfigHandler.ts | 4 ++++ core/config/yaml/clientRender.ts | 3 +++ core/config/yaml/loadYaml.ts | 11 +++++---- core/config/yaml/models.ts | 11 --------- core/package-lock.json | 8 +++---- core/package.json | 2 +- extensions/vscode/package-lock.json | 6 ++--- gui/package-lock.json | 10 ++++---- gui/package.json | 2 +- packages/config-yaml/package.json | 2 +- packages/config-yaml/src/load/clientRender.ts | 24 +++++++++++++++++-- packages/config-yaml/test/index.test.ts | 1 + 12 files changed, 51 insertions(+), 33 deletions(-) diff --git a/core/config/ConfigHandler.ts b/core/config/ConfigHandler.ts index 9d2899153..2cc8fd8ac 100644 --- a/core/config/ConfigHandler.ts +++ b/core/config/ConfigHandler.ts @@ -142,6 +142,10 @@ export class ConfigHandler { let renderedConfig: AssistantUnrolled | undefined = undefined; if (assistant.configResult.config) { renderedConfig = await clientRenderHelper( + { + ownerSlug: assistant.ownerSlug, + packageSlug: assistant.packageSlug, + }, YAML.stringify(assistant.configResult.config), this.ide, this.controlPlaneClient, diff --git a/core/config/yaml/clientRender.ts b/core/config/yaml/clientRender.ts index 8cb727456..14f7e718f 100644 --- a/core/config/yaml/clientRender.ts +++ b/core/config/yaml/clientRender.ts @@ -1,5 +1,6 @@ import { clientRender, + PackageSlug, PlatformClient, SecretStore, } from "@continuedev/config-yaml"; @@ -8,6 +9,7 @@ import { IDE } from "../.."; import { ControlPlaneClient } from "../../control-plane/client"; export async function clientRenderHelper( + packageSlug: PackageSlug, unrolledAssistant: string, ide: IDE, controlPlaneClient: ControlPlaneClient, @@ -33,6 +35,7 @@ export async function clientRenderHelper( const userId = await controlPlaneClient.userId; return await clientRender( + packageSlug, unrolledAssistant, ideSecretStore, userId ? platformClient : undefined, diff --git a/core/config/yaml/loadYaml.ts b/core/config/yaml/loadYaml.ts index 57660ce53..37abaf83e 100644 --- a/core/config/yaml/loadYaml.ts +++ b/core/config/yaml/loadYaml.ts @@ -4,10 +4,10 @@ import { AssistantUnrolled, ConfigResult, ConfigValidationError, + ModelRole, parseAssistantUnrolled, validateConfigYaml, } from "@continuedev/config-yaml"; -import { ModelRole } from "@continuedev/config-yaml"; import { fetchwithRequestOptions } from "@continuedev/fetch"; import { @@ -39,7 +39,6 @@ import { getSystemPromptDotFile } from "../getSystemPromptDotFile"; import { PlatformConfigMetadata } from "../profile/PlatformProfileLoader"; import { modifyContinueConfigWithSharedConfig } from "../sharedConfig"; -import { clientRenderHelper } from "./clientRender"; import { llmsFromModelConfig } from "./models"; async function loadConfigYaml( @@ -52,9 +51,11 @@ async function loadConfigYaml( const ideSettings = await ide.getIdeSettings(); let config = overrideConfigYaml ?? - (ideSettings.continueTestEnvironment === "production" - ? await clientRenderHelper(rawYaml, ide, controlPlaneClient) - : parseAssistantUnrolled(rawYaml)); + // (ideSettings.continueTestEnvironment === "production" + // ? await clientRenderHelper(rawYaml, ide, controlPlaneClient) + // : + parseAssistantUnrolled(rawYaml); + // ); const errors = validateConfigYaml(config); if (errors?.some((error) => error.fatal)) { diff --git a/core/config/yaml/models.ts b/core/config/yaml/models.ts index 874406142..e6d0ef00a 100644 --- a/core/config/yaml/models.ts +++ b/core/config/yaml/models.ts @@ -35,16 +35,6 @@ async function modelConfigToBaseLLM( return undefined; } - const usingContinueProxy = - platformConfigMetadata && model.provider === "continue-proxy"; - const modelName = usingContinueProxy - ? getContinueProxyModelName( - platformConfigMetadata!.ownerSlug, - platformConfigMetadata!.packageSlug, - model, - ) - : model.model; - let options: LLMOptions = { ...model, completionOptions: { @@ -57,7 +47,6 @@ async function modelConfigToBaseLLM( writeLog, uniqueId, title: model.name, - model: modelName, systemMessage, promptTemplates: model.promptTemplates, }; diff --git a/core/package-lock.json b/core/package-lock.json index c96746622..c4ab26e73 100644 --- a/core/package-lock.json +++ b/core/package-lock.json @@ -13,7 +13,7 @@ "@aws-sdk/client-sagemaker-runtime": "^3.621.0", "@aws-sdk/credential-providers": "^3.620.1", "@continuedev/config-types": "^1.0.13", - "@continuedev/config-yaml": "^1.0.29", + "@continuedev/config-yaml": "^1.0.31", "@continuedev/fetch": "^1.0.4", "@continuedev/llm-info": "^1.0.2", "@continuedev/openai-adapters": "^1.0.10", @@ -3038,9 +3038,9 @@ } }, "node_modules/@continuedev/config-yaml": { - "version": "1.0.29", - "resolved": "https://registry.npmjs.org/@continuedev/config-yaml/-/config-yaml-1.0.29.tgz", - "integrity": "sha512-5zKebdoNp52eSFCrs/EODF36I0basrDdE9gQ6Vxoxd9axzVTyWlbpm6gLXXeaHpJMSCaTcQMh/uzAiq8trwrYA==", + "version": "1.0.31", + "resolved": "https://registry.npmjs.org/@continuedev/config-yaml/-/config-yaml-1.0.31.tgz", + "integrity": "sha512-HNj+z7UTTARgsJTI0A1buM09fS4HoWVnn6Hbl6kJ2tZmOOm1OgogbcKP68AzHb4fy5H18MWnKS7XuseZpHFzHQ==", "dependencies": { "@continuedev/config-types": "^1.0.14", "yaml": "^2.6.1", diff --git a/core/package.json b/core/package.json index aaf16af5c..8d4ca8592 100644 --- a/core/package.json +++ b/core/package.json @@ -46,7 +46,7 @@ "@aws-sdk/client-sagemaker-runtime": "^3.621.0", "@aws-sdk/credential-providers": "^3.620.1", "@continuedev/config-types": "^1.0.13", - "@continuedev/config-yaml": "^1.0.29", + "@continuedev/config-yaml": "^1.0.31", "@continuedev/fetch": "^1.0.4", "@continuedev/llm-info": "^1.0.2", "@continuedev/openai-adapters": "^1.0.10", diff --git a/extensions/vscode/package-lock.json b/extensions/vscode/package-lock.json index 8d530b1de..f37e5bf36 100644 --- a/extensions/vscode/package-lock.json +++ b/extensions/vscode/package-lock.json @@ -1,12 +1,12 @@ { "name": "continue", - "version": "0.9.265", + "version": "0.9.266", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "continue", - "version": "0.9.265", + "version": "0.9.266", "license": "Apache-2.0", "dependencies": { "@continuedev/fetch": "^1.0.3", @@ -106,7 +106,7 @@ "@aws-sdk/client-sagemaker-runtime": "^3.621.0", "@aws-sdk/credential-providers": "^3.620.1", "@continuedev/config-types": "^1.0.13", - "@continuedev/config-yaml": "^1.0.29", + "@continuedev/config-yaml": "^1.0.31", "@continuedev/fetch": "^1.0.4", "@continuedev/llm-info": "^1.0.2", "@continuedev/openai-adapters": "^1.0.10", diff --git a/gui/package-lock.json b/gui/package-lock.json index f9642efc6..72164bb92 100644 --- a/gui/package-lock.json +++ b/gui/package-lock.json @@ -7,7 +7,7 @@ "name": "gui", "license": "Apache-2.0", "dependencies": { - "@continuedev/config-yaml": "^1.0.29", + "@continuedev/config-yaml": "^1.0.31", "@headlessui/react": "^1.7.17", "@heroicons/react": "^2.0.18", "@reduxjs/toolkit": "^2.3.0", @@ -108,7 +108,7 @@ "@aws-sdk/client-sagemaker-runtime": "^3.621.0", "@aws-sdk/credential-providers": "^3.620.1", "@continuedev/config-types": "^1.0.13", - "@continuedev/config-yaml": "^1.0.29", + "@continuedev/config-yaml": "^1.0.31", "@continuedev/fetch": "^1.0.4", "@continuedev/llm-info": "^1.0.2", "@continuedev/openai-adapters": "^1.0.10", @@ -556,9 +556,9 @@ } }, "node_modules/@continuedev/config-yaml": { - "version": "1.0.29", - "resolved": "https://registry.npmjs.org/@continuedev/config-yaml/-/config-yaml-1.0.29.tgz", - "integrity": "sha512-5zKebdoNp52eSFCrs/EODF36I0basrDdE9gQ6Vxoxd9axzVTyWlbpm6gLXXeaHpJMSCaTcQMh/uzAiq8trwrYA==", + "version": "1.0.31", + "resolved": "https://registry.npmjs.org/@continuedev/config-yaml/-/config-yaml-1.0.31.tgz", + "integrity": "sha512-HNj+z7UTTARgsJTI0A1buM09fS4HoWVnn6Hbl6kJ2tZmOOm1OgogbcKP68AzHb4fy5H18MWnKS7XuseZpHFzHQ==", "dependencies": { "@continuedev/config-types": "^1.0.14", "yaml": "^2.6.1", diff --git a/gui/package.json b/gui/package.json index a3ab8240e..d351e0f30 100644 --- a/gui/package.json +++ b/gui/package.json @@ -15,7 +15,7 @@ "test:watch": "vitest" }, "dependencies": { - "@continuedev/config-yaml": "^1.0.29", + "@continuedev/config-yaml": "^1.0.31", "@headlessui/react": "^1.7.17", "@heroicons/react": "^2.0.18", "@reduxjs/toolkit": "^2.3.0", diff --git a/packages/config-yaml/package.json b/packages/config-yaml/package.json index a4b386bbe..09f933d42 100644 --- a/packages/config-yaml/package.json +++ b/packages/config-yaml/package.json @@ -1,6 +1,6 @@ { "name": "@continuedev/config-yaml", - "version": "1.0.29", + "version": "1.0.31", "description": "", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/packages/config-yaml/src/load/clientRender.ts b/packages/config-yaml/src/load/clientRender.ts index d55d694af..1746be516 100644 --- a/packages/config-yaml/src/load/clientRender.ts +++ b/packages/config-yaml/src/load/clientRender.ts @@ -4,7 +4,12 @@ import { encodeSecretLocation, SecretLocation, } from "../interfaces/SecretResult.js"; -import { decodeFQSN, encodeFQSN, FQSN } from "../interfaces/slugs.js"; +import { + decodeFQSN, + encodeFQSN, + FQSN, + PackageSlug, +} from "../interfaces/slugs.js"; import { AssistantUnrolled } from "../schemas/index.js"; import { fillTemplateVariables, @@ -13,6 +18,7 @@ import { } from "./unroll.js"; export async function clientRender( + packageSlug: PackageSlug, unrolledConfigContent: string, clientSecretStore: SecretStore, platformClient?: PlatformClient, @@ -61,7 +67,7 @@ export async function clientRender( const parsedYaml = parseAssistantUnrolled(renderedYaml); // 7. We update any of the items with the proxy version if there are un-rendered secrets - const finalConfig = useProxyForUnrenderedSecrets(parsedYaml); + const finalConfig = useProxyForUnrenderedSecrets(parsedYaml, packageSlug); return finalConfig; } @@ -89,8 +95,17 @@ function getUnrenderedSecretLocation( return undefined; } +function getContinueProxyModelName( + packageSlug: PackageSlug, + provider: string, + model: string, +): string { + return `${packageSlug.ownerSlug}/${packageSlug.packageSlug}/${provider}/${model}`; +} + function useProxyForUnrenderedSecrets( config: AssistantUnrolled, + packageSlug: PackageSlug, ): AssistantUnrolled { if (config.models) { for (let i = 0; i < config.models.length; i++) { @@ -101,6 +116,11 @@ function useProxyForUnrenderedSecrets( config.models[i] = { ...config.models[i], provider: "continue-proxy", + model: getContinueProxyModelName( + packageSlug, + config.models[i].provider, + config.models[i].model, + ), apiKeyLocation: encodeSecretLocation(apiKeyLocation), apiKey: undefined, }; diff --git a/packages/config-yaml/test/index.test.ts b/packages/config-yaml/test/index.test.ts index 9573b8ae3..d634d6092 100644 --- a/packages/config-yaml/test/index.test.ts +++ b/packages/config-yaml/test/index.test.ts @@ -120,6 +120,7 @@ describe("E2E Scenarios", () => { ); const clientRendered = await clientRender( + { ownerSlug: "test-org", packageSlug: "assistant" }, YAML.stringify(unrolledConfig), localUserSecretStore, platformClient, From 1311c190220076dd161a4ca1049255efcb016d8b Mon Sep 17 00:00:00 2001 From: Nate Date: Thu, 13 Feb 2025 23:53:45 -0800 Subject: [PATCH 200/262] bump jb --- extensions/intellij/gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/intellij/gradle.properties b/extensions/intellij/gradle.properties index 5a17c95f0..b8b36867e 100644 --- a/extensions/intellij/gradle.properties +++ b/extensions/intellij/gradle.properties @@ -3,7 +3,7 @@ pluginGroup=com.github.continuedev.continueintellijextension pluginName=continue-intellij-extension pluginRepositoryUrl=https://github.com/continuedev/continue # SemVer format -> https://semver.org -pluginVersion=0.0.90 +pluginVersion=0.0.91 # Supported build number ranges and IntelliJ Platform versions -> https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html pluginSinceBuild=223 # IntelliJ Platform Properties -> https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html#configuration-intellij-extension From aa98e1975c0bcb1439702effd01e15358c11cac3 Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Fri, 14 Feb 2025 00:04:18 -0800 Subject: [PATCH 201/262] move select profile and org logic to thunks --- core/config/ConfigHandler.test.ts | 2 +- core/config/ConfigHandler.ts | 105 ++-- core/core.ts | 25 +- core/protocol/core.ts | 4 +- core/protocol/coreWebview.ts | 2 +- core/protocol/passThrough.ts | 3 - core/protocol/webview.ts | 4 +- core/util/GlobalContext.ts | 4 +- .../actions/ContinuePluginActions.kt | 7 - .../constants/MessageTypes.kt | 3 - .../src/main/resources/META-INF/plugin.xml | 9 - extensions/vscode/package.json | 26 +- extensions/vscode/src/commands.ts | 9 +- .../vscode/src/extension/VsCodeExtension.ts | 8 - gui/src/components/AccountDialog.tsx | 148 ------ gui/src/components/Layout.tsx | 14 +- .../platform/AssistantSelectOptions.tsx | 87 ++-- .../modelSelection/platform/shared.tsx | 39 +- gui/src/context/Auth.tsx | 79 ++- gui/src/hooks/useSetup.ts | 15 +- gui/src/pages/config/ScopeSelect.tsx | 37 +- gui/src/pages/config/UserSettings.tsx | 322 ++++++++++++ gui/src/pages/config/index.tsx | 492 +++++------------- gui/src/redux/slices/sessionSlice.ts | 72 +-- gui/src/redux/thunks/cycleProfile.ts | 21 - gui/src/redux/thunks/profileAndOrg.ts | 74 +++ gui/src/redux/thunks/setOrgId.ts | 13 - gui/src/redux/thunks/setProfileId.ts | 13 - manual-testing-sandbox/AdvancedPage.tsx | 1 + 29 files changed, 761 insertions(+), 877 deletions(-) delete mode 100644 gui/src/components/AccountDialog.tsx create mode 100644 gui/src/pages/config/UserSettings.tsx delete mode 100644 gui/src/redux/thunks/cycleProfile.ts create mode 100644 gui/src/redux/thunks/profileAndOrg.ts delete mode 100644 gui/src/redux/thunks/setOrgId.ts delete mode 100644 gui/src/redux/thunks/setProfileId.ts diff --git a/core/config/ConfigHandler.test.ts b/core/config/ConfigHandler.test.ts index deb1deded..d0ce96207 100644 --- a/core/config/ConfigHandler.test.ts +++ b/core/config/ConfigHandler.test.ts @@ -14,7 +14,7 @@ describe.skip("Test the ConfigHandler and E2E config loading", () => { expect(profiles[0].id).toBe("local"); const currentProfile = testConfigHandler.currentProfile; - expect(currentProfile.profileDescription.id).toBe("local"); + expect(currentProfile?.profileDescription.id).toBe("local"); }); test("should load the default config successfully", async () => { diff --git a/core/config/ConfigHandler.ts b/core/config/ConfigHandler.ts index 9d2899153..13bc0a945 100644 --- a/core/config/ConfigHandler.ts +++ b/core/config/ConfigHandler.ts @@ -48,8 +48,9 @@ export class ConfigHandler { private readonly globalContext = new GlobalContext(); private additionalContextProviders: IContextProvider[] = []; private profiles: ProfileLifecycleManager[]; - private selectedProfileId: string; + private selectedProfileId: string | null; private selectedOrgId: string | null; + private localProfileManager: ProfileLifecycleManager; constructor( private readonly ide: IDE, @@ -68,21 +69,25 @@ export class ConfigHandler { controlPlaneClient, writeLog, ); - this.profiles = [new ProfileLifecycleManager(localProfileLoader, this.ide)]; + this.localProfileManager = new ProfileLifecycleManager( + localProfileLoader, + this.ide, + ); + this.profiles = [this.localProfileManager]; this.selectedProfileId = localProfileLoader.description.id; this.selectedOrgId = null; - // Always load local profile immediately in case control plane doesn't load - try { - void this.loadConfig(); - } catch (e) { - console.error("Failed to load config: ", e); - } - void this.init(); } private async init() { + // Always load local profile immediately in case control plane doesn't load + try { + await this.loadConfig(); + } catch (e) { + console.error("Failed to load config: ", e); + } + const workspaceId = await this.getWorkspaceId(); const lastSelectedOrgIds = this.globalContext.get("lastSelectedOrgIdForWorkspace") ?? {}; @@ -97,16 +102,17 @@ export class ConfigHandler { void this.fetchControlPlaneProfiles(); } - // This will be the local profile - private get fallbackProfile() { - return this.profiles[0]; - } - get currentProfile() { + if (!this.selectedProfileId) { + return null; + } + // IMPORTANT + // We must fall back to null, not the first or local profiles + // Because GUI must be the source of truth for selected profile return ( this.profiles.find( (p) => p.profileDescription.id === this.selectedProfileId, - ) ?? this.fallbackProfile + ) ?? null ); } @@ -165,12 +171,10 @@ export class ConfigHandler { }), ); - this.profiles = [ - ...this.profiles.filter( - (profile) => profile.profileDescription.id === "local", - ), - ...hubProfiles, - ]; + this.profiles = + this.selectedOrgId === null + ? [this.localProfileManager, ...hubProfiles] + : hubProfiles; this.notifyProfileListeners( this.profiles.map((profile) => profile.profileDescription), @@ -178,19 +182,19 @@ export class ConfigHandler { // Check the last selected workspace, and reload if it isn't local const workspaceId = await this.getWorkspaceId(); - const lastSelectedWorkspaceIds = + const lastSelectedIds = this.globalContext.get("lastSelectedProfileForWorkspace") ?? {}; - const selectedWorkspaceId = lastSelectedWorkspaceIds[workspaceId]; - if (selectedWorkspaceId) { - this.selectedProfileId = selectedWorkspaceId; + const selectedProfileId = lastSelectedIds[workspaceId]; + if (selectedProfileId) { + this.selectedProfileId = selectedProfileId; await this.loadConfig(); } else { // Otherwise we stick with local profile, and record choice - lastSelectedWorkspaceIds[workspaceId] = this.selectedProfileId; + lastSelectedIds[workspaceId] = this.selectedProfileId; this.globalContext.update( "lastSelectedProfileForWorkspace", - lastSelectedWorkspaceIds, + lastSelectedIds, ); } }) @@ -249,9 +253,7 @@ export class ConfigHandler { this.controlPlaneClient .listWorkspaces() .then(async (workspaces) => { - this.profiles = this.profiles.filter( - (profile) => profile.profileDescription.id === "local", - ); + this.profiles = [this.localProfileManager]; workspaces.forEach((workspace) => { const profileLoader = new ControlPlaneProfileLoader( workspace.id, @@ -273,18 +275,18 @@ export class ConfigHandler { // Check the last selected workspace, and reload if it isn't local const workspaceId = await this.getWorkspaceId(); - const lastSelectedWorkspaceIds = + const lastSelectedIds = this.globalContext.get("lastSelectedProfileForWorkspace") ?? {}; - const selectedWorkspaceId = lastSelectedWorkspaceIds[workspaceId]; - if (selectedWorkspaceId) { - this.selectedProfileId = selectedWorkspaceId; + const selectedProfileId = lastSelectedIds[workspaceId]; + if (selectedProfileId) { + this.selectedProfileId = selectedProfileId; await this.loadConfig(); } else { // Otherwise we stick with local profile, and record choice - lastSelectedWorkspaceIds[workspaceId] = this.selectedProfileId; + lastSelectedIds[workspaceId] = this.selectedProfileId; this.globalContext.update( "lastSelectedProfileForWorkspace", - lastSelectedWorkspaceIds, + lastSelectedIds, ); } }) @@ -302,7 +304,7 @@ export class ConfigHandler { this.globalContext.update("lastSelectedOrgIdForWorkspace", selectedOrgs); } - async setSelectedProfile(profileId: string) { + async setSelectedProfile(profileId: string | null) { this.selectedProfileId = profileId; const result = await this.loadConfig(); this.notifyConfigListeners(result); @@ -365,8 +367,15 @@ export class ConfigHandler { this.updateListeners.push(listener); } + // TODO: this isn't right, there are two different senses in which you want to "reload" async reloadConfig() { - // TODO: this isn't right, there are two different senses in which you want to "reload" + if (!this.currentProfile) { + return { + config: undefined, + errors: [], + configLoadInterrupted: true, + }; + } const { config, errors, configLoadInterrupted } = await this.currentProfile.reloadConfig(this.additionalContextProviders); @@ -376,13 +385,20 @@ export class ConfigHandler { } this.notifyConfigListeners({ config, errors, configLoadInterrupted }); - return { config, errors }; + return { config, errors, configLoadInterrupted }; } - getSerializedConfig(): Promise< + async getSerializedConfig(): Promise< ConfigResult > { - return this.currentProfile.getSerializedConfig( + if (!this.currentProfile) { + return { + config: undefined, + errors: [], + configLoadInterrupted: true, + }; + } + return await this.currentProfile.getSerializedConfig( this.additionalContextProviders, ); } @@ -392,6 +408,13 @@ export class ConfigHandler { } async loadConfig(): Promise> { + if (!this.currentProfile) { + return { + config: undefined, + errors: [], + configLoadInterrupted: true, + }; + } return await this.currentProfile.loadConfig( this.additionalContextProviders, ); diff --git a/core/core.ts b/core/core.ts index 5a2448e83..f84e1f6ac 100644 --- a/core/core.ts +++ b/core/core.ts @@ -73,10 +73,6 @@ export class Core { private abortedMessageIds: Set = new Set(); - private async config() { - return (await this.configHandler.loadConfig()).config; - } - invoke( messageType: T, data: ToCoreProtocol[T][0], @@ -136,7 +132,8 @@ export class Core { const serializedResult = await this.configHandler.getSerializedConfig(); this.messenger.send("configUpdate", { result: serializedResult, - profileId: this.configHandler.currentProfile.profileDescription.id, + profileId: + this.configHandler.currentProfile?.profileDescription.id ?? null, }); }); @@ -281,10 +278,8 @@ export class Core { }); on("config/newPromptFile", async (msg) => { - await createNewPromptFileV2( - this.ide, - (await this.config())?.experimental?.promptPath, - ); + const { config } = await this.configHandler.loadConfig(); + await createNewPromptFileV2(this.ide, config?.experimental?.promptPath); await this.configHandler.reloadConfig(); }); @@ -341,7 +336,7 @@ export class Core { }); on("context/loadSubmenuItems", async (msg) => { - const config = await this.config(); + const { config } = await this.configHandler.loadConfig(); if (!config) { return []; } @@ -358,13 +353,14 @@ export class Core { }); on("context/getContextItems", async (msg) => { - const { name, query, fullInput, selectedCode, selectedModelTitle } = - msg.data; - const config = await this.config(); + const { config } = await this.configHandler.loadConfig(); if (!config) { return []; } + const { name, query, fullInput, selectedCode, selectedModelTitle } = + msg.data; + const llm = await this.configHandler.llmFromTitle(selectedModelTitle); const provider = config.contextProviders?.find( @@ -454,7 +450,8 @@ export class Core { on("config/getSerializedProfileInfo", async (msg) => { return { result: await this.configHandler.getSerializedConfig(), - profileId: this.configHandler.currentProfile.profileDescription.id, + profileId: + this.configHandler.currentProfile?.profileDescription.id ?? null, }; }); diff --git a/core/protocol/core.ts b/core/protocol/core.ts index 82ce4eea7..c3084f6b8 100644 --- a/core/protocol/core.ts +++ b/core/protocol/core.ts @@ -62,7 +62,7 @@ export type ToCoreFromIdeOrWebviewProtocol = { undefined, { result: ConfigResult; - profileId: string; + profileId: string | null; }, ]; "config/deleteModel": [{ title: string }, void]; @@ -184,8 +184,6 @@ export type ToCoreFromIdeOrWebviewProtocol = { "docs/getDetails": [{ startUrl: string }, DocsIndexingDetails]; addAutocompleteModel: [{ model: ModelDescription }, void]; - "profiles/switch": [{ id: string }, undefined]; - "auth/getAuthUrl": [{ useOnboarding: boolean }, { url: string }]; "tools/call": [ { toolCall: ToolCall; selectedModelTitle: string }, diff --git a/core/protocol/coreWebview.ts b/core/protocol/coreWebview.ts index e8ef70ab9..ff99acd03 100644 --- a/core/protocol/coreWebview.ts +++ b/core/protocol/coreWebview.ts @@ -4,7 +4,7 @@ import { ToCoreFromIdeOrWebviewProtocol } from "./core.js"; import { ToWebviewFromIdeOrCoreProtocol } from "./webview.js"; export type ToCoreFromWebviewProtocol = ToCoreFromIdeOrWebviewProtocol & { - didChangeSelectedProfile: [{ id: string }, void]; + didChangeSelectedProfile: [{ id: string | null }, void]; didChangeSelectedOrg: [{ id: string | null }, void]; }; export type ToWebviewFromCoreProtocol = ToWebviewFromIdeOrCoreProtocol & { diff --git a/core/protocol/passThrough.ts b/core/protocol/passThrough.ts index 8ee0c5ae8..f0c66f465 100644 --- a/core/protocol/passThrough.ts +++ b/core/protocol/passThrough.ts @@ -57,7 +57,6 @@ export const WEBVIEW_TO_CORE_PASS_THROUGH: (keyof ToCoreFromWebviewProtocol)[] = // "completeOnboarding", "addAutocompleteModel", - "profiles/switch", "didChangeSelectedProfile", "didChangeSelectedOrg", "tools/call", @@ -82,7 +81,5 @@ export const CORE_TO_WEBVIEW_PASS_THROUGH: (keyof ToWebviewFromCoreProtocol)[] = "setTTSActive", "getWebviewHistoryLength", "getCurrentSessionId", - "signInToControlPlane", - "openDialogMessage", "docs/suggestions", ]; diff --git a/core/protocol/webview.ts b/core/protocol/webview.ts index 013efbbd7..90df4bd0f 100644 --- a/core/protocol/webview.ts +++ b/core/protocol/webview.ts @@ -12,7 +12,7 @@ export type ToWebviewFromIdeOrCoreProtocol = { configUpdate: [ { result: ConfigResult; - profileId: string; + profileId: string | null; }, void, ]; @@ -37,8 +37,6 @@ export type ToWebviewFromIdeOrCoreProtocol = { setTTSActive: [boolean, void]; getWebviewHistoryLength: [undefined, number]; getCurrentSessionId: [undefined, string]; - signInToControlPlane: [undefined, void]; - openDialogMessage: ["account", void]; "docs/suggestions": [PackageDocsResult[], void]; "jetbrains/setColors": [Record, void]; }; diff --git a/core/util/GlobalContext.ts b/core/util/GlobalContext.ts index 121c45946..34c3d8ddf 100644 --- a/core/util/GlobalContext.ts +++ b/core/util/GlobalContext.ts @@ -12,7 +12,9 @@ import { SiteIndexingConfig } from ".."; export type GlobalContextType = { indexingPaused: boolean; selectedTabAutocompleteModel: string; - lastSelectedProfileForWorkspace: { [workspaceIdentifier: string]: string }; + lastSelectedProfileForWorkspace: { + [workspaceIdentifier: string]: string | null; + }; lastSelectedOrgIdForWorkspace: { [workspaceIdentifier: string]: string | null; }; diff --git a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/actions/ContinuePluginActions.kt b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/actions/ContinuePluginActions.kt index 8e2d34de4..3c6b27f05 100644 --- a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/actions/ContinuePluginActions.kt +++ b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/actions/ContinuePluginActions.kt @@ -134,11 +134,4 @@ class OpenMorePageAction : AnAction() { val params = mapOf("path" to "/more", "toggle" to true) continuePluginService.sendToWebview("navigateTo", params) } -} - -class OpenAccountDialogAction : AnAction() { - override fun actionPerformed(e: AnActionEvent) { - val continuePluginService = getContinuePluginService(e.project) ?: return - continuePluginService.sendToWebview("openDialogMessage", "account") - } } \ No newline at end of file diff --git a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/constants/MessageTypes.kt b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/constants/MessageTypes.kt index 542ef6ef7..bb362b382 100644 --- a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/constants/MessageTypes.kt +++ b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/constants/MessageTypes.kt @@ -70,8 +70,6 @@ class MessageTypes { "setTTSActive", "getWebviewHistoryLength", "getCurrentSessionId", - "signInToControlPlane", - "openDialogMessage", "docs/suggestions", ) @@ -126,7 +124,6 @@ class MessageTypes { // "completeOnboarding", "addAutocompleteModel", - "profiles/switch", "didChangeSelectedProfile", "didChangeSelectedOrg", "tools/call", diff --git a/extensions/intellij/src/main/resources/META-INF/plugin.xml b/extensions/intellij/src/main/resources/META-INF/plugin.xml index 5a43ff24f..abc50a092 100644 --- a/extensions/intellij/src/main/resources/META-INF/plugin.xml +++ b/extensions/intellij/src/main/resources/META-INF/plugin.xml @@ -140,14 +140,6 @@ - - - - - diff --git a/extensions/vscode/package.json b/extensions/vscode/package.json index fd5f69014..c5c8a10cd 100644 --- a/extensions/vscode/package.json +++ b/extensions/vscode/package.json @@ -94,7 +94,7 @@ "continue.enableContinueForTeams": { "type": "boolean", "default": false, - "markdownDescription": "Enable Continue for teams beta features. To sign in, click the person icon in the bottom right of the sidebar." + "markdownDescription": "Enable Continue for teams beta features. To sign in, click the gear icon to go to the settings page, and click Sign In." }, "continue.enableContinueHub": { "type": "boolean", @@ -328,20 +328,6 @@ "category": "Continue", "title": "Focus Continue Chat", "group": "Continue" - }, - { - "command": "continue.signInToControlPlane", - "title": "Sign In", - "category": "Continue", - "group": "Continue", - "icon": "$(account)" - }, - { - "command": "continue.openAccountDialog", - "title": "Account", - "category": "Continue", - "group": "Continue", - "icon": "$(account)" } ], "keybindings": [ @@ -531,16 +517,6 @@ "group": "navigation@4", "when": "view == continue.continueGUIView" }, - { - "command": "continue.signInToControlPlane", - "group": "navigation@5", - "when": "(view == continue.continueGUIView) && (config.continue.enableContinueForTeams || config.continue.enableContinueHub) && !continue.isSignedInToControlPlane" - }, - { - "command": "continue.openAccountDialog", - "group": "navigation@5", - "when": "(view == continue.continueGUIView) && (config.continue.enableContinueForTeams || config.continue.enableContinueHub) && continue.isSignedInToControlPlane" - }, { "command": "continue.openMorePage", "group": "navigation@6", diff --git a/extensions/vscode/src/commands.ts b/extensions/vscode/src/commands.ts index 54e84b083..e745e2a30 100644 --- a/extensions/vscode/src/commands.ts +++ b/extensions/vscode/src/commands.ts @@ -916,7 +916,8 @@ const getCommandsMap: ( }, { label: "$(screen-full) Open full screen chat", - description: getMetaKeyLabel() + " + K, " + getMetaKeyLabel() + " + M", + description: + getMetaKeyLabel() + " + K, " + getMetaKeyLabel() + " + M", }, { label: quickPickStatusText(targetStatus), @@ -998,12 +999,6 @@ const getCommandsMap: ( sidebar.webviewProtocol?.request("navigateTo", { path, toggle }); focusGUI(); }, - "continue.signInToControlPlane": () => { - sidebar.webviewProtocol?.request("signInToControlPlane", undefined); - }, - "continue.openAccountDialog": () => { - sidebar.webviewProtocol?.request("openDialogMessage", "account"); - }, "continue.startLocalOllama": () => { startLocalOllama(ide); }, diff --git a/extensions/vscode/src/extension/VsCodeExtension.ts b/extensions/vscode/src/extension/VsCodeExtension.ts index 7d483b2bb..470320f44 100644 --- a/extensions/vscode/src/extension/VsCodeExtension.ts +++ b/extensions/vscode/src/extension/VsCodeExtension.ts @@ -168,12 +168,6 @@ export class VsCodeExtension { } else if (newConfig) { setupStatusBar(undefined, undefined, false); - const result = await this.configHandler.getSerializedConfig(); - this.sidebar.webviewProtocol?.request("configUpdate", { - result, - profileId: this.configHandler.currentProfile.profileDescription.id, - }); - this.tabAutocompleteModel.clearLlm(); registerAllCodeLensProviders( @@ -182,8 +176,6 @@ export class VsCodeExtension { newConfig, ); } - - this.sidebar.webviewProtocol?.request("configError", errors); }, ); diff --git a/gui/src/components/AccountDialog.tsx b/gui/src/components/AccountDialog.tsx deleted file mode 100644 index 1081a27ef..000000000 --- a/gui/src/components/AccountDialog.tsx +++ /dev/null @@ -1,148 +0,0 @@ -import { Listbox, Transition } from "@headlessui/react"; -import { ChevronUpDownIcon } from "@heroicons/react/24/outline"; -import { Fragment, useContext } from "react"; -import { useDispatch } from "react-redux"; -import styled from "styled-components"; -import { - Button, - SecondaryButton, - vscInputBackground, - vscListActiveBackground, - vscListActiveForeground, -} from "."; -import { useAuth } from "../context/Auth"; -import { IdeMessengerContext } from "../context/IdeMessenger"; -import { setSelectedProfileId } from "../redux/slices/sessionSlice"; -import { setDialogMessage, setShowDialog } from "../redux/slices/uiSlice"; -import { getFontSize } from "../util"; - -const StyledListboxOption = styled(Listbox.Option)<{ selected: boolean }>` - background-color: ${({ selected }) => - selected ? vscListActiveBackground : vscInputBackground}; - cursor: pointer; - padding: 4px 6px; - font-size: ${getFontSize() - 1}px; - - &:hover { - background-color: ${vscListActiveBackground}; - color: ${vscListActiveForeground}; - } -`; - -export default function AccountDialog() { - const ideMessenger = useContext(IdeMessengerContext); - const { - session, - logout, - login, - profiles, - selectedProfile, - controlServerBetaEnabled, - } = useAuth(); - - // These shouldn't usually show but just to be safe - if (!session?.account?.id) { - return ( -
-

Account

- - Signed out - - -
- ); - } - - const dispatch = useDispatch(); - - const changeProfileId = (id: string) => { - ideMessenger.post("didChangeSelectedProfile", { id }); - dispatch(setSelectedProfileId(id)); - }; - - return ( -
-
-

Account

- - {session.account.label === "" ? ( - "Signed in" - ) : ( - <> - Signed in as {session.account.id} - - )} - -
- - {controlServerBetaEnabled && ( -
- Current workspace - - - {({ open }) => ( -
- - - {selectedProfile?.title} - -
-
-
- - - - {profiles.map((option, idx) => ( - - - {option.title} - - - ))} - {profiles.length === 0 && ( -
- No workspaces found -
- )} -
-
-
- )} -
-
- )} - -
- - Sign out - - -
-
- ); -} diff --git a/gui/src/components/Layout.tsx b/gui/src/components/Layout.tsx index e9c12f993..b54db7549 100644 --- a/gui/src/components/Layout.tsx +++ b/gui/src/components/Layout.tsx @@ -13,13 +13,12 @@ import { setMode, updateApplyState, } from "../redux/slices/sessionSlice"; -import { setDialogMessage, setShowDialog } from "../redux/slices/uiSlice"; +import { setShowDialog } from "../redux/slices/uiSlice"; import { exitEditMode } from "../redux/thunks"; import { loadLastSession, saveCurrentSession } from "../redux/thunks/session"; import { getFontSize, isMetaEquivalentKeyPressed } from "../util"; import { incrementFreeTrialCount } from "../util/freeTrial"; import { ROUTES } from "../util/navigation"; -import AccountDialog from "./AccountDialog"; import TextDialog from "./dialogs"; import Footer from "./Footer"; import { isNewUserOnboarding, useOnboardingCard } from "./OnboardingCard"; @@ -97,17 +96,6 @@ const Layout = () => { location.pathname === ROUTES.HOME, ); - useWebviewListener( - "openDialogMessage", - async (message) => { - if (message === "account") { - dispatch(setShowDialog(true)); - dispatch(setDialogMessage()); - } - }, - [], - ); - useWebviewListener( "addModel", async () => { diff --git a/gui/src/components/modelSelection/platform/AssistantSelectOptions.tsx b/gui/src/components/modelSelection/platform/AssistantSelectOptions.tsx index ab2b6716e..0168cc806 100644 --- a/gui/src/components/modelSelection/platform/AssistantSelectOptions.tsx +++ b/gui/src/components/modelSelection/platform/AssistantSelectOptions.tsx @@ -5,18 +5,21 @@ import { lightGray } from "../.."; import { useAuth } from "../../../context/Auth"; import { IdeMessengerContext } from "../../../context/IdeMessenger"; import { useAppDispatch } from "../../../redux/hooks"; -import { setProfileId } from "../../../redux/thunks/setProfileId"; +import { setProfileId } from "../../../redux/thunks/profileAndOrg"; import { getFontSize, getMetaKeyLabel, isLocalProfile } from "../../../util"; import { ROUTES } from "../../../util/navigation"; import AssistantIcon from "./AssistantIcon"; import { Divider, Option, OptionDiv } from "./shared"; import { getProfileDisplayText } from "./utils"; +import { ProfileDescription } from "core/config/ConfigHandler"; interface AssistantSelectOptionsProps { onClose: () => void; } -export function AssistantSelectOptions(props: AssistantSelectOptionsProps) { +export function AssistantSelectOptions({ + onClose, +}: AssistantSelectOptionsProps) { const ideMessenger = useContext(IdeMessengerContext); const { profiles, selectedProfile, selectedOrganization } = useAuth(); const dispatch = useAppDispatch(); @@ -27,60 +30,56 @@ export function AssistantSelectOptions(props: AssistantSelectOptionsProps) { path: "new", orgSlug: selectedOrganization?.slug, }); + onClose(); } - function handleOptionLink(e: React.MouseEvent, profileId: string) { - e.stopPropagation(); - e.preventDefault(); - ideMessenger.post("config/openProfile", { profileId }); - } - - function handleConfigure(e: React.MouseEvent, option: any) { - e.stopPropagation(); - e.preventDefault(); - - ideMessenger.post("config/openProfile", { profileId: option.id }); + function handleConfigure(profile: ProfileDescription) { + ideMessenger.post("config/openProfile", { profileId: profile.id }); + onClose(); } function handleClickError(profileId: string) { ideMessenger.post("config/openProfile", { profileId }); + onClose(); } return (
- {profiles.map((profile, idx) => ( -