From 3d4144697830e2d90aea7dddbc5eb7082c92e61c Mon Sep 17 00:00:00 2001 From: Adam Shedivy Date: Fri, 6 Dec 2024 13:01:56 -0600 Subject: [PATCH 01/46] check for mcp client attrubutes --- core/context/mcp/index.ts | 125 ++++++++++++++++------------ extensions/vscode/package-lock.json | 4 +- 2 files changed, 75 insertions(+), 54 deletions(-) diff --git a/core/context/mcp/index.ts b/core/context/mcp/index.ts index 984ba8f7b..e41136027 100644 --- a/core/context/mcp/index.ts +++ b/core/context/mcp/index.ts @@ -87,6 +87,15 @@ class MCPConnectionSingleton { } } + async checkClientAttribute(func: () => Promise): Promise { + try { + const result = await func(); + return result; + } catch (e) { + return null; + } + } + async modifyConfig(config: ContinueConfig): Promise { try { await this.connectClient(); @@ -96,60 +105,72 @@ class MCPConnectionSingleton { return config; } } - + // Resources <—> Context Provider - const { resources } = await this.client.listResources(); - - const submenuItems = resources.map((resource: any) => ({ - title: resource.name, - description: resource.description, - id: resource.uri, - })); - - if (!config.contextProviders) { - config.contextProviders = []; - } - - config.contextProviders!.push( - new MCPContextProvider({ - submenuItems, - client: this.client, - }), - ); - - // Tools <—> Tools - const { tools } = await this.client.listTools(); - const continueTools: Tool[] = tools.map((tool) => ({ - displayTitle: tool.name, - function: { - description: tool.description, - name: tool.name, - parameters: tool.inputSchema, - }, - readonly: false, - type: "function", - wouldLikeTo: `use the ${tool.name} tool`, - uri: `mcp://${tool.name}`, - })); - - config.tools = [...config.tools, ...continueTools]; - - // Prompts <—> Slash commands - const { prompts } = await this.client.listPrompts(); - if (!config.slashCommands) { - config.slashCommands = []; - } - - const slashCommands: SlashCommand[] = prompts.map((prompt) => { - return constructMcpSlashCommand( - this.client, - prompt.name, - prompt.description, - prompt.arguments?.map((a) => a.name), + const rawResources = await this.checkClientAttribute(() => this.client.listResources()); + if (rawResources && rawResources.resources) { + const submenuItems = rawResources.resources.map((resource: any) => ({ + title: resource.name, + description: resource.description, + id: resource.uri, + })); + + if (!config.contextProviders) { + config.contextProviders = []; + } + + config.contextProviders.push( + new MCPContextProvider({ + submenuItems, + client: this.client, + }), ); - }); - config.slashCommands!.push(...slashCommands); - + } else { + console.warn("Failed to retrieve resources or resources are empty"); + } + + // Tools <—> Tools + const rawTools = await this.checkClientAttribute(() => this.client.listTools()); + if (rawTools && rawTools.tools) { + const continueTools: Tool[] = rawTools.tools.map((tool: any) => ({ + displayTitle: tool.name, + function: { + description: tool.description, + name: tool.name, + parameters: tool.inputSchema, + }, + readonly: false, + type: "function", + wouldLikeTo: `use the ${tool.name} tool`, + uri: `mcp://${tool.name}`, + })); + + config.tools = [...config.tools, ...continueTools]; + } else { + console.warn("Failed to retrieve tools or tools are empty"); + } + + // Prompts <—> Slash commands + const rawPrompts = await this.checkClientAttribute(() => this.client.listPrompts()); + if (rawPrompts && rawPrompts.prompts) { + if (!config.slashCommands) { + config.slashCommands = []; + } + + const slashCommands: SlashCommand[] = rawPrompts.prompts.map((prompt: any) => + constructMcpSlashCommand( + this.client, + prompt.name, + prompt.description, + prompt.arguments?.map((a: any) => a.name), + ) + ); + + config.slashCommands.push(...slashCommands); + } else { + console.warn("Failed to retrieve prompts or prompts are empty"); + } + return config; } } diff --git a/extensions/vscode/package-lock.json b/extensions/vscode/package-lock.json index 923f4c9b5..ea5966c13 100644 --- a/extensions/vscode/package-lock.json +++ b/extensions/vscode/package-lock.json @@ -1,12 +1,12 @@ { "name": "continue", - "version": "0.9.244", + "version": "0.9.240", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "continue", - "version": "0.9.244", + "version": "0.9.240", "license": "Apache-2.0", "dependencies": { "@electron/rebuild": "^3.2.10", From 4e3b3004ff7edffe36bb833af68d548e4ee33040 Mon Sep 17 00:00:00 2001 From: Adam Shedivy Date: Fri, 6 Dec 2024 13:57:27 -0600 Subject: [PATCH 02/46] add prefix to built in tools --- core/tools/builtIn.ts | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/core/tools/builtIn.ts b/core/tools/builtIn.ts index 55e2c5214..d15db456c 100644 --- a/core/tools/builtIn.ts +++ b/core/tools/builtIn.ts @@ -1,11 +1,11 @@ export enum BuiltInToolNames { - ReadFile = "read_file", - ReadCurrentlyOpenFile = "read_currently_open_file", - CreateNewFile = "create_new_file", - RunTerminalCommand = "run_terminal_command", - ViewSubdirectory = "view_subdirectory", - ViewRepoMap = "view_repo_map", - ExactSearch = "exact_search", - SearchWeb = "search_web", - ViewDiff = "view_diff", -} + ReadFile = "builtin_read_file", + ReadCurrentlyOpenFile = "builtin_read_currently_open_file", + CreateNewFile = "builtin_create_new_file", + RunTerminalCommand = "builtin_run_terminal_command", + ViewSubdirectory = "builtin_view_subdirectory", + ViewRepoMap = "builtin_view_repo_map", + ExactSearch = "builtin_exact_search", + SearchWeb = "builtin_search_web", + ViewDiff = "builtin_view_diff", +} \ No newline at end of file From e86849a7f6fdee4de83622571cd5f1bd46f28493 Mon Sep 17 00:00:00 2001 From: Ruedi Steinmann Date: Sat, 7 Dec 2024 15:03:09 +0100 Subject: [PATCH 03/46] Use schema for the configuration JSON schema itself --- extensions/vscode/config_schema.json | 35 +++++++-------- extensions/vscode/scripts/utils.js | 2 +- extensions/vscode/vsc-extension-quickstart.md | 43 +++---------------- 3 files changed, 26 insertions(+), 54 deletions(-) diff --git a/extensions/vscode/config_schema.json b/extensions/vscode/config_schema.json index 36fe771da..8bab535a3 100644 --- a/extensions/vscode/config_schema.json +++ b/extensions/vscode/config_schema.json @@ -1,7 +1,8 @@ { + "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "config.json", - "$ref": "#/definitions/SerializedContinueConfig", - "definitions": { + "$ref": "#/$defs/SerializedContinueConfig", + "$defs": { "BaseCompletionOptions": { "title": "BaseCompletionOptions", "type": "object", @@ -154,7 +155,7 @@ "clientCertificate": { "title": "Client Certificate", "description": "Client certificate to use when making the HTTP request", - "$ref": "#/definitions/ClientCertificateOptions" + "$ref": "#/$defs/ClientCertificateOptions" } } }, @@ -386,7 +387,7 @@ }, "allOf": [ { - "$ref": "#/definitions/BaseCompletionOptions" + "$ref": "#/$defs/BaseCompletionOptions" } ] }, @@ -408,7 +409,7 @@ }, "allOf": [ { - "$ref": "#/definitions/RequestOptions" + "$ref": "#/$defs/RequestOptions" } ] }, @@ -2188,7 +2189,7 @@ }, "allOf": [ { - "$ref": "#/definitions/RequestOptions" + "$ref": "#/$defs/RequestOptions" } ] } @@ -2410,7 +2411,7 @@ ], "type": "array", "items": { - "$ref": "#/definitions/ModelDescription" + "$ref": "#/$defs/ModelDescription" } }, "systemMessage": { @@ -2432,7 +2433,7 @@ }, "allOf": [ { - "$ref": "#/definitions/BaseCompletionOptions" + "$ref": "#/$defs/BaseCompletionOptions" } ] }, @@ -2441,7 +2442,7 @@ "description": "Default request options for all fetch requests from models and context providers. These will be overriden by any model-specific request options.", "allOf": [ { - "$ref": "#/definitions/RequestOptions" + "$ref": "#/$defs/RequestOptions" } ] }, @@ -2452,7 +2453,7 @@ "default": [], "type": "array", "items": { - "$ref": "#/definitions/SlashCommand" + "$ref": "#/$defs/SlashCommand" } }, "customCommands": { @@ -2468,7 +2469,7 @@ ], "type": "array", "items": { - "$ref": "#/definitions/CustomCommand" + "$ref": "#/$defs/CustomCommand" } }, "contextProviders": { @@ -2478,7 +2479,7 @@ "default": [], "type": "array", "items": { - "$ref": "#/definitions/ContextProviderWithParams" + "$ref": "#/$defs/ContextProviderWithParams" } }, "userToken": { @@ -2542,7 +2543,7 @@ "requestOptions": { "title": "Request Options", "description": "Request options to be used in any fetch requests made by the embeddings provider", - "$ref": "#/definitions/RequestOptions" + "$ref": "#/$defs/RequestOptions" }, "maxChunkSize": { "title": "Maximum Chunk Size", @@ -2561,7 +2562,7 @@ "region": { "title": "Region", "description": "The region where the model is hosted", - "$ref": "#/definitions/ModelDescription/properties/region" + "$ref": "#/$defs/ModelDescription/properties/region" }, "profile": { "title": "Profile", @@ -2830,12 +2831,12 @@ }, "oneOf": [ { - "$ref": "#/definitions/ModelDescription" + "$ref": "#/$defs/ModelDescription" }, { "type": "array", "items": { - "$ref": "#/definitions/ModelDescription" + "$ref": "#/$defs/ModelDescription" } } ] @@ -2985,7 +2986,7 @@ "items": { "allOf": [ { - "$ref": "#/definitions/ContextProviderWithParams" + "$ref": "#/$defs/ContextProviderWithParams" }, { "properties": { diff --git a/extensions/vscode/scripts/utils.js b/extensions/vscode/scripts/utils.js index 7d62fefa4..550d0246c 100644 --- a/extensions/vscode/scripts/utils.js +++ b/extensions/vscode/scripts/utils.js @@ -13,7 +13,7 @@ const continueDir = path.join(__dirname, "..", "..", ".."); function copyConfigSchema() { // Modify and copy for .continuerc.json const schema = JSON.parse(fs.readFileSync("config_schema.json", "utf8")); - schema.definitions.SerializedContinueConfig.properties.mergeBehavior = { + schema.$defs.SerializedContinueConfig.properties.mergeBehavior = { type: "string", enum: ["merge", "overwrite"], default: "merge", diff --git a/extensions/vscode/vsc-extension-quickstart.md b/extensions/vscode/vsc-extension-quickstart.md index 04a57fc6a..a77988101 100644 --- a/extensions/vscode/vsc-extension-quickstart.md +++ b/extensions/vscode/vsc-extension-quickstart.md @@ -1,42 +1,13 @@ -# Welcome to your VS Code Extension - -## What's in the folder - -* This folder contains all of the files necessary for your extension. -* `package.json` - this is the manifest file in which you declare your extension and command. - * The sample plugin registers a command and defines its title and command name. With this information VS Code can show the command in the command palette. It doesn’t yet need to load the plugin. -* `src/extension.ts` - this is the main file where you will provide the implementation of your command. - * The file exports one function, `activate`, which is called the very first time your extension is activated (in this case by executing the command). Inside the `activate` function we call `registerCommand`. - * We pass the function containing the implementation of the command as the second parameter to `registerCommand`. +# Welcome to the Continue Visual Studio Code Extension ## Get up and running straight away -* Press `F5` to open a new window with your extension loaded. -* Run your command from the command palette by pressing (`Ctrl+Shift+P` or `Cmd+Shift+P` on Mac) and typing `Hello World`. -* Set breakpoints in your code inside `src/extension.ts` to debug your extension. -* Find output from your extension in the debug console. +- Open the root of the continue repository in visual studio code +- Press `F5` to open a new window with your extension loaded. +- The continue in the launched vs code instance uses `extensions/.continue-debug` as configuration folder +- Find output from your extension in the debug console. ## Make changes -* You can relaunch the extension from the debug toolbar after changing code in `src/extension.ts`. -* You can also reload (`Ctrl+R` or `Cmd+R` on Mac) the VS Code window with your extension to load your changes. - -## Explore the API - -* You can open the full set of our API when you open the file `node_modules/@types/vscode/index.d.ts`. - -## Run tests - -* Open the debug viewlet (`Ctrl+Shift+D` or `Cmd+Shift+D` on Mac) and from the launch configuration dropdown pick `Extension Tests`. -* Press `F5` to run the tests in a new window with your extension loaded. -* See the output of the test result in the debug console. -* Make changes to `src/test/suite/extension.test.ts` or create new test files inside the `test/suite` folder. - * The provided test runner will only consider files matching the name pattern `**.test.ts`. - * You can create folders inside the `test` folder to structure your tests any way you want. - -## Go further - -* [Follow UX guidelines](https://code.visualstudio.com/api/ux-guidelines/overview) to create extensions that seamlessly integrate with VS Code's native interface and patterns. - * Reduce the extension size and improve the startup time by [bundling your extension](https://code.visualstudio.com/api/working-with-extensions/bundling-extension). - * [Publish your extension](https://code.visualstudio.com/api/working-with-extensions/publishing-extension) on the VS Code extension marketplace. - * Automate builds by setting up [Continuous Integration](https://code.visualstudio.com/api/working-with-extensions/continuous-integration). +- You can relaunch the extension from the debug toolbar after changing code. +- You can also reload (`Ctrl+R` or `Cmd+R` on Mac) the VS Code window with your extension to load your changes. From 28617751b2df9d703dafc6a24a522b77f2a36a87 Mon Sep 17 00:00:00 2001 From: Adam Shedivy Date: Mon, 9 Dec 2024 17:21:05 -0600 Subject: [PATCH 04/46] use MCP interface to verify server capabilities --- core/context/mcp/index.ts | 46 ++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 25 deletions(-) diff --git a/core/context/mcp/index.ts b/core/context/mcp/index.ts index e41136027..772da7891 100644 --- a/core/context/mcp/index.ts +++ b/core/context/mcp/index.ts @@ -105,34 +105,34 @@ class MCPConnectionSingleton { return config; } } - + + const capabilities = this.client.getServerCapabilities(); + // Resources <—> Context Provider - const rawResources = await this.checkClientAttribute(() => this.client.listResources()); - if (rawResources && rawResources.resources) { - const submenuItems = rawResources.resources.map((resource: any) => ({ + if (capabilities?.resources) { + const { resources } = await this.client.listResources(); + const submenuItems = resources.map((resource: any) => ({ title: resource.name, description: resource.description, id: resource.uri, })); - + if (!config.contextProviders) { config.contextProviders = []; } - + config.contextProviders.push( new MCPContextProvider({ submenuItems, client: this.client, }), ); - } else { - console.warn("Failed to retrieve resources or resources are empty"); } - + // Tools <—> Tools - const rawTools = await this.checkClientAttribute(() => this.client.listTools()); - if (rawTools && rawTools.tools) { - const continueTools: Tool[] = rawTools.tools.map((tool: any) => ({ + if (capabilities?.tools) { + const { tools } = await this.client.listTools(); + const continueTools: Tool[] = tools.map((tool: any) => ({ displayTitle: tool.name, function: { description: tool.description, @@ -144,33 +144,29 @@ class MCPConnectionSingleton { wouldLikeTo: `use the ${tool.name} tool`, uri: `mcp://${tool.name}`, })); - + config.tools = [...config.tools, ...continueTools]; - } else { - console.warn("Failed to retrieve tools or tools are empty"); } - + // Prompts <—> Slash commands - const rawPrompts = await this.checkClientAttribute(() => this.client.listPrompts()); - if (rawPrompts && rawPrompts.prompts) { + if (capabilities?.prompts) { + const { prompts } = await this.client.listPrompts(); if (!config.slashCommands) { config.slashCommands = []; } - - const slashCommands: SlashCommand[] = rawPrompts.prompts.map((prompt: any) => + + const slashCommands: SlashCommand[] = prompts.map((prompt: any) => constructMcpSlashCommand( this.client, prompt.name, prompt.description, prompt.arguments?.map((a: any) => a.name), - ) + ), ); - + config.slashCommands.push(...slashCommands); - } else { - console.warn("Failed to retrieve prompts or prompts are empty"); } - + return config; } } From dddbdf6c7c7554e23e7faf0e0367b99fd053047e Mon Sep 17 00:00:00 2001 From: Nate Date: Mon, 9 Dec 2024 18:42:41 -0800 Subject: [PATCH 05/46] various small fixes --- extensions/vscode/package-lock.json | 4 ++-- extensions/vscode/src/commands.ts | 7 +++++-- gui/src/components/History/HistoryTableRow.tsx | 5 ++--- package.json | 2 +- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/extensions/vscode/package-lock.json b/extensions/vscode/package-lock.json index 7ea1c4c2d..c3d015969 100644 --- a/extensions/vscode/package-lock.json +++ b/extensions/vscode/package-lock.json @@ -1,12 +1,12 @@ { "name": "continue", - "version": "0.9.242", + "version": "0.9.248", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "continue", - "version": "0.9.242", + "version": "0.9.248", "license": "Apache-2.0", "dependencies": { "@continuedev/fetch": "^1.0.3", diff --git a/extensions/vscode/src/commands.ts b/extensions/vscode/src/commands.ts index 0ae80c0bd..c02055dcc 100644 --- a/extensions/vscode/src/commands.ts +++ b/extensions/vscode/src/commands.ts @@ -456,13 +456,16 @@ const getCommandsMap: ( hideGUI(); } else { void sidebar.webviewProtocol?.request( - "focusContinueInput", + "focusContinueInputWithNewSession", undefined, ); } } else { focusGUI(); - sidebar.webviewProtocol?.request("focusContinueInput", undefined); + sidebar.webviewProtocol?.request( + "focusContinueInputWithNewSession", + undefined, + ); void addHighlightedCodeToContext(sidebar.webviewProtocol); } }, diff --git a/gui/src/components/History/HistoryTableRow.tsx b/gui/src/components/History/HistoryTableRow.tsx index 29797cc81..a52927434 100644 --- a/gui/src/components/History/HistoryTableRow.tsx +++ b/gui/src/components/History/HistoryTableRow.tsx @@ -3,15 +3,15 @@ import { SessionMetadata } from "core"; import React, { useContext, useEffect, useState } from "react"; import { useNavigate } from "react-router-dom"; import { Input } from ".."; -import HeaderButtonWithToolTip from "../gui/HeaderButtonWithToolTip"; -import { useAppDispatch, useAppSelector } from "../../redux/hooks"; import { IdeMessengerContext } from "../../context/IdeMessenger"; +import { useAppDispatch, useAppSelector } from "../../redux/hooks"; import { deleteSession, getSession, loadSession, updateSession, } from "../../redux/thunks/session"; +import HeaderButtonWithToolTip from "../gui/HeaderButtonWithToolTip"; function lastPartOfPath(path: string): string { const sep = path.includes("/") ? "/" : "\\"; @@ -88,7 +88,6 @@ export function HistoryTableRow({ }} >
- {`history-row-${index}`} {editing ? (
Date: Mon, 9 Dec 2024 19:17:10 -0800 Subject: [PATCH 06/46] auto-assign PRs --- .github/auto_assign.yml | 10 ++++++++++ .../{auto-assign.yaml => auto-assign-issue.yaml} | 0 .github/workflows/auto-assign-pr.yaml | 10 ++++++++++ 3 files changed, 20 insertions(+) create mode 100644 .github/auto_assign.yml rename .github/workflows/{auto-assign.yaml => auto-assign-issue.yaml} (100%) create mode 100644 .github/workflows/auto-assign-pr.yaml diff --git a/.github/auto_assign.yml b/.github/auto_assign.yml new file mode 100644 index 000000000..ed05df6f9 --- /dev/null +++ b/.github/auto_assign.yml @@ -0,0 +1,10 @@ +# Reference: https://github.com/marketplace/actions/auto-assign-action +addAssignees: true + +assignees: + - sestinj + - Patrick-Erichsen + - tomasz-stefaniak + - RomneyDa + +numberOfAssignees: 2 diff --git a/.github/workflows/auto-assign.yaml b/.github/workflows/auto-assign-issue.yaml similarity index 100% rename from .github/workflows/auto-assign.yaml rename to .github/workflows/auto-assign-issue.yaml diff --git a/.github/workflows/auto-assign-pr.yaml b/.github/workflows/auto-assign-pr.yaml new file mode 100644 index 000000000..4fd701a15 --- /dev/null +++ b/.github/workflows/auto-assign-pr.yaml @@ -0,0 +1,10 @@ +name: PR assignment +on: + pull_request: + types: [opened, ready_for_review] + +jobs: + add-reviews: + runs-on: ubuntu-latest + steps: + - uses: kentaro-m/auto-assign-action@v2.0.0 From c93bf1df62cfad50f69624d67f5d2e4f4410b2c2 Mon Sep 17 00:00:00 2001 From: Dan Dascalescu Date: Tue, 10 Dec 2024 06:45:27 +0200 Subject: [PATCH 07/46] docs(install): Fix JetBrains settings hotkey --- docs/docs/getting-started/install.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/getting-started/install.md b/docs/docs/getting-started/install.md index e894596fb..20aa52baa 100644 --- a/docs/docs/getting-started/install.md +++ b/docs/docs/getting-started/install.md @@ -18,7 +18,7 @@ If you have any problems, see the [troubleshooting guide](troubleshooting.md) or ## JetBrains -1. Open your JetBrains IDE and open **Settings** using cmd/ctrl + , +1. Open your JetBrains IDE and open **Settings** using Ctrl + +Alt + S 2. Select **Plugins** on the sidebar and search for "Continue" in the marketplace 3. Click `Install`, which will cause the Continue logo to show up on the right toolbar From 4ea58773d6bc4af4c22612f795a0776e11013052 Mon Sep 17 00:00:00 2001 From: henry Date: Mon, 9 Dec 2024 23:33:30 -0600 Subject: [PATCH 08/46] updated docs --- docs/docs/reference.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/docs/reference.md b/docs/docs/reference.md index df3f08e75..3b94304cf 100644 --- a/docs/docs/reference.md +++ b/docs/docs/reference.md @@ -365,6 +365,7 @@ Customizable UI settings to control interface appearance and behavior. - `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: From 06b0bb85991513da583504d47b2ffd298d582f42 Mon Sep 17 00:00:00 2001 From: henry Date: Mon, 9 Dec 2024 23:38:14 -0600 Subject: [PATCH 09/46] updated example --- docs/docs/reference.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/docs/reference.md b/docs/docs/reference.md index 3b94304cf..417ac3b5e 100644 --- a/docs/docs/reference.md +++ b/docs/docs/reference.md @@ -374,7 +374,9 @@ Example: "ui": { "codeBlockToolbarPosition": "bottom", "fontSize": 14, - "displayRawMarkdown": false + "displayRawMarkdown": false, + "showScrollBar": false, + "codeWrap": false } } ``` From 9660c7ed088aa08fd4a7487f065fef69a9b7ddf3 Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Mon, 9 Dec 2024 20:47:34 -0500 Subject: [PATCH 10/46] vscode: Ensure extension.js is rebuilt when deleted Right now, the vscode-extension:continue-ui:build task deletes extension.js as part of its prepackage.js script. This wouldn't normally be a problem, because extension.js is generated by the vscode-extension:esbuild, and vscode-extension:continue-ui:build is a dependency of vscode-extension:esbuild, implying it should always get run first. But, vscode-extension:esbuild is a background task, that stays running after it's been started once. Future calls to run that task become no-ops, because it's already active. This means running vscode-extension:esbuild -> vscode-extension:continue-ui:build -> vscode-extension:esbuild will lead to the last vscode-extension:esbuild not regenerating extension.js. In order to resolve that problem, this commit adds a new foreground task into the build pipeline: vscode-extension:esbuild-notify that tickles the watching background task to wake up and regenerate extension.js --- .vscode/tasks.json | 10 ++++++++++ extensions/vscode/package.json | 1 + extensions/vscode/scripts/esbuild.js | 24 +++++++++++++++++++++++- 3 files changed, 34 insertions(+), 1 deletion(-) diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 968b98964..e3250d80a 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -28,6 +28,9 @@ "vscode-extension:continue-ui:build", // // To bundle the code the same way we do for publishing "vscode-extension:esbuild", + // To ensure extension.js is regenerated even if + // vscode-extension:esbuild was already running in background + "vscode-extension:esbuild-notify", // Start the React app that is used in the extension "gui:dev" ], @@ -36,6 +39,13 @@ "isDefault": true } }, + { + "label": "vscode-extension:esbuild-notify", + "dependsOn": ["vscode-extension:esbuild"], + "type": "npm", + "script": "esbuild-notify", + "path": "extensions/vscode" + }, { "label": "vscode-extension:esbuild", "dependsOn": ["vscode-extension:continue-ui:build"], diff --git a/extensions/vscode/package.json b/extensions/vscode/package.json index a109c52fe..4834c14e1 100644 --- a/extensions/vscode/package.json +++ b/extensions/vscode/package.json @@ -602,6 +602,7 @@ "vscode:prepublish": "npm run esbuild-base -- --minify", "esbuild": "npm run esbuild-base -- --sourcemap", "esbuild-watch": "npm run esbuild-base -- --sourcemap --watch", + "esbuild-notify": "npm run esbuild-base -- --sourcemap --notify", "esbuild:visualize": "esbuild-visualizer --metadata ./build/meta.json --filename ./build/stats.html --open", "tsc": "tsc -p ./", "tsc:check": "tsc -p ./ --noEmit", diff --git a/extensions/vscode/scripts/esbuild.js b/extensions/vscode/scripts/esbuild.js index bac602d79..e44fc60af 100644 --- a/extensions/vscode/scripts/esbuild.js +++ b/extensions/vscode/scripts/esbuild.js @@ -1,4 +1,5 @@ const esbuild = require("esbuild"); +const fs = require("fs"); const flags = process.argv.slice(2); @@ -31,7 +32,6 @@ const esbuildConfig = { throw new Error(result.errors); } else { try { - const fs = require("fs"); fs.writeFileSync( "./build/meta.json", JSON.stringify(result.metafile, null, 2), @@ -52,6 +52,28 @@ const esbuildConfig = { if (flags.includes("--watch")) { const ctx = await esbuild.context(esbuildConfig); await ctx.watch(); + } else if (flags.includes("--notify")) { + const inFile = esbuildConfig.entryPoints[0]; + const outFile = esbuildConfig.outfile; + + // The watcher automatically notices changes to source files + // so the only thing it needs to be notified about is if the + // output file gets removed. + if (fs.existsSync (outFile)) { + console.log("VS Code Extension esbuild up to date"); + return; + } + + fs.watchFile(outFile, (current, previous) => { + if (current.size > 0) { + console.log("VS Code Extension esbuild rebuild complete"); + fs.unwatchFile(outFile); + process.exit(0); + } + }); + + console.log("Triggering VS Code Extension esbuild rebuild..."); + fs.utimesSync(inFile, new Date(), new Date()); } else { await esbuild.build(esbuildConfig); } From 7edac91207db86b9e8b091b300e5af6bd6c22bed Mon Sep 17 00:00:00 2001 From: Thibault Genaitay Date: Tue, 10 Dec 2024 17:22:50 +0100 Subject: [PATCH 11/46] Add Scaleway as OpenAI compatible LLM and Embeddings provider --- core/llm/autodetect.ts | 1 + core/llm/llms/Scaleway.ts | 27 ++++++++++ core/llm/llms/index.ts | 1 + .../model-providers/more/scaleway.md | 49 +++++++++++++++++++ extensions/vscode/config_schema.json | 44 +++++++++++++++-- packages/openai-adapters/README.md | 1 + packages/openai-adapters/src/index.ts | 2 + packages/openai-adapters/test/main.test.ts | 11 +++++ 8 files changed, 132 insertions(+), 4 deletions(-) create mode 100644 core/llm/llms/Scaleway.ts create mode 100644 docs/docs/customize/model-providers/more/scaleway.md diff --git a/core/llm/autodetect.ts b/core/llm/autodetect.ts index 7dbab98bd..90d9f378d 100644 --- a/core/llm/autodetect.ts +++ b/core/llm/autodetect.ts @@ -65,6 +65,7 @@ const PROVIDER_SUPPORTS_IMAGES: string[] = [ "openrouter", "vertexai", "azure", + "scaleway", ]; const MODEL_SUPPORTS_IMAGES: string[] = [ diff --git a/core/llm/llms/Scaleway.ts b/core/llm/llms/Scaleway.ts new file mode 100644 index 000000000..95b8d6db3 --- /dev/null +++ b/core/llm/llms/Scaleway.ts @@ -0,0 +1,27 @@ +import OpenAI from "./OpenAI"; + +import { LLMOptions } from "../../index.js"; + + +class Scaleway extends OpenAI { + static providerName = "scaleway"; + static defaultOptions: Partial = { + apiBase: "https://api.scaleway.ai/v1/", + model: "qwen2.5-coder-32b-instruct", + useLegacyCompletionsEndpoint: false, + }; + + private static MODEL_IDS: { [name: string]: string } = { + "llama3.1-8b": "llama-3.1-8b-instruct", + "llama3.1-70b": "llama-3.1-70b-instruct", + "mistral-nemo": "mistral-nemo-instruct-2407", + "qwen2.5-coder-32b": "qwen2.5-coder-32b-instruct", + "pixtral": "pixtral-12b-2409", + }; + + protected _convertModelName(model: string) { + return Scaleway.MODEL_IDS[model] || this.model; + } +} + +export default Scaleway; diff --git a/core/llm/llms/index.ts b/core/llm/llms/index.ts index 9604cb9f6..19855fc12 100644 --- a/core/llm/llms/index.ts +++ b/core/llm/llms/index.ts @@ -42,6 +42,7 @@ import OpenRouter from "./OpenRouter"; import Replicate from "./Replicate"; import SageMaker from "./SageMaker"; import SambaNova from "./SambaNova"; +import Scaleway from "./Scaleway"; import ContinueProxy from "./stubs/ContinueProxy"; import TextGenWebUI from "./TextGenWebUI"; import Together from "./Together"; diff --git a/docs/docs/customize/model-providers/more/scaleway.md b/docs/docs/customize/model-providers/more/scaleway.md new file mode 100644 index 000000000..411e95f3a --- /dev/null +++ b/docs/docs/customize/model-providers/more/scaleway.md @@ -0,0 +1,49 @@ +--- +title: Scaleway +--- + +:::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 + +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" +{ + "models": [ + { + "title": "Qwen2.5-Coder-32B-Instruct", + "provider": "scaleway", + "model": "qwen2.5-coder-32b-instruct", + "apiKey": "[API_KEY]" + } + ] +} +``` + +## Autocomplete model + +Scaleway 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 **BGE-Multilingual-Gemma2** as your embeddings model. + +```json title="config.json" +{ + "embeddingsProvider": { + "provider": "scaleway", + "model": "bge-multilingual-gemma2", + "apiKey": "[API_KEY]" + } +} +``` \ No newline at end of file diff --git a/extensions/vscode/config_schema.json b/extensions/vscode/config_schema.json index 63144395f..7de7f1d9e 100644 --- a/extensions/vscode/config_schema.json +++ b/extensions/vscode/config_schema.json @@ -208,7 +208,8 @@ "kindo", "moonshot", "siliconflow", - "function-network" + "function-network", + "scaleway" ], "markdownEnumDescriptions": [ "### OpenAI\nUse gpt-4, gpt-3.5-turbo, or any other OpenAI model. See [here](https://openai.com/product#made-for-developers) to obtain an API key.\n\n> [Reference](https://docs.continue.dev/reference/Model%20Providers/openai)", @@ -248,7 +249,8 @@ "### Secure AI management software that helps enterprises adopt and manage AI across their workforce. To get started, obtain an API key from [the Kindo console](https://app.kindo.ai/settings/api), and see the [website](https://app.kindo.ai//)", "### Moonshot\nTo get started with Moonshot AI, obtain your API key from [Moonshot AI](https://platform.moonshot.cn/). Moonshot AI provides high-quality large language models with competitive pricing.\n> [Reference](https://platform.moonshot.cn/docs/api)", "### SiliconFlow\nTo get started with SiliconFlow, obtain your API key from [SiliconCloud](https://cloud.siliconflow.cn/account/ak). SiliconCloud provides cost-effective GenAI services based on excellent open source basic models.\n> [Models](https://siliconflow.cn/zh-cn/models)", - "### Function Network offers private, affordable user-owned AI\nTo get started with Function Network, obtain your API key from [Function Network](https://www.function.network/join-waitlist). Function Network provides a variety of models for chat, completion, and embeddings." + "### Function Network offers private, affordable user-owned AI\nTo get started with Function Network, obtain your API key from [Function Network](https://www.function.network/join-waitlist). Function Network provides a variety of models for chat, completion, and embeddings.", + "### Scaleway\n Generative APIs are serverless endpoints for the most popular AI models.\nHosted in European data centers and priced competitively per million tokens used, models served by Scaleway are ideal for users requiring low latency, full data privacy, and 100% compliance with EU AI Act. To get access to the Scaleway Generative APIs, read the [Quickstart guide](https://www.scaleway.com/en/docs/ai-data/generative-apis/quickstart/) and get a [valid API key](https://www.scaleway.com/en/docs/identity-and-access-management/iam/how-to/create-api-keys/)." ], "type": "string" }, @@ -476,7 +478,8 @@ "sambanova", "nebius", "xAI", - "kindo" + "kindo", + "scaleway" ] } }, @@ -1266,6 +1269,38 @@ } } }, + { + "if": { + "properties": { + "provider": { + "enum": ["scaleway"] + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "model": { + "anyOf": [ + { + "enum": [ + "llama-3.1-8b-instruct", + "llama-3.1-70b-instruct", + "mistral-nemo-instruct-2407", + "qwen2.5-coder-32b-instruct", + "pixtral-12b-2409" + ] + }, + { + "type": "string" + } + ], + "markdownDescription": "Select a pre-defined option, or find the exact model string from Scaleway [here](https://www.scaleway.com/en/docs/ai-data/generative-apis/reference-content/supported-models/).", + "x-intellij-html-description": "Select a pre-defined option, or find the exact model string from Scaleway here." + } + } + } + }, { "if": { "properties": { @@ -2533,7 +2568,8 @@ "watsonx", "lmstudio", "siliconflow", - "function-network" + "function-network", + "scaleway" ] }, "model": { diff --git a/packages/openai-adapters/README.md b/packages/openai-adapters/README.md index 3035ead86..3eb6de50a 100644 --- a/packages/openai-adapters/README.md +++ b/packages/openai-adapters/README.md @@ -53,6 +53,7 @@ They are concerned with: - [ ] Replicate - [ ] SageMaker - [x] SambaNova +- [x] Scaleway - [ ] Silicon Flow - [x] TextGen Web UI - [x] Together diff --git a/packages/openai-adapters/src/index.ts b/packages/openai-adapters/src/index.ts index 752a69dd6..fa02153fa 100644 --- a/packages/openai-adapters/src/index.ts +++ b/packages/openai-adapters/src/index.ts @@ -67,6 +67,8 @@ export function constructLlmApi(config: LLMConfig): BaseLlmApi | undefined { return openAICompatible("http://localhost:10000", config); case "nvidia": return openAICompatible("https://integrate.api.nvidia.com/v1/", config); + case "scaleway": + return openAICompatible("https://api.scaleway.ai/v1/", config); case "fireworks": return openAICompatible("https://api.fireworks.ai/inference/v1/", config); case "together": diff --git a/packages/openai-adapters/test/main.test.ts b/packages/openai-adapters/test/main.test.ts index 7dc73c489..4a9117cab 100644 --- a/packages/openai-adapters/test/main.test.ts +++ b/packages/openai-adapters/test/main.test.ts @@ -279,6 +279,12 @@ const COMPLETION_TESTS: ({ chatOnly?: boolean } & LlmApiConfig)[] = [ apiKey: process.env.NEBIUS_API_KEY!, chatOnly: true, }, + { + provider: "scaleway", + model: "llama3.1-8b", + apiKey: process.env.SCALEWAY_API_KEY!, + chatOnly: true, + }, ]; const FIM_TESTS: LlmApiConfig[] = [ @@ -322,6 +328,11 @@ const EMBEDDINGS_TESTS: LlmApiConfig[] = [ model: "BAAI/bge-en-icl", apiKey: process.env.NEBIUS_API_KEY!, }, + { + provider: "scaleway", + model: "bge-multilingual-gemma2", + apiKey: process.env.SCALEWAY_API_KEY!, + }, ]; const RERANK_TESTS: LlmApiConfig[] = [ From 4c9eebb57e57e6cfe1c746428db6a0117a1d6789 Mon Sep 17 00:00:00 2001 From: Nate Date: Tue, 10 Dec 2024 09:57:58 -0800 Subject: [PATCH 12/46] bump package.json 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 a109c52fe..755185f78 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.248", + "version": "0.9.242", "repository": { "type": "git", "url": "https://github.com/continuedev/continue" From 649e7eba5b9fb9819258cba6e80ada66206b20fb Mon Sep 17 00:00:00 2001 From: henry Date: Tue, 10 Dec 2024 12:01:01 -0600 Subject: [PATCH 13/46] typo fix --- docs/docs/reference.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/reference.md b/docs/docs/reference.md index 417ac3b5e..527820556 100644 --- a/docs/docs/reference.md +++ b/docs/docs/reference.md @@ -375,7 +375,7 @@ Example: "codeBlockToolbarPosition": "bottom", "fontSize": 14, "displayRawMarkdown": false, - "showScrollBar": false, + "showChatScrollbar": false, "codeWrap": false } } From f5251f65155f587b17046f836373dc35b643cb9d Mon Sep 17 00:00:00 2001 From: tomasz-io Date: Tue, 10 Dec 2024 10:10:04 -0800 Subject: [PATCH 14/46] improv: naming --- .github/workflows/pr_checks.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr_checks.yaml b/.github/workflows/pr_checks.yaml index 02bd2c333..dc76a5258 100644 --- a/.github/workflows/pr_checks.yaml +++ b/.github/workflows/pr_checks.yaml @@ -88,7 +88,7 @@ jobs: npx tsc --noEmit npm run lint - - name: Install Xvfb for Linux and run e2e tests + - name: Install Xvfb for Linux and run end to end tests run: | sudo apt-get install -y xvfb # Install Xvfb Xvfb :99 & # Start Xvfb From 653ca205dfbe2f7fec94891c99053d393d3efd0c Mon Sep 17 00:00:00 2001 From: tomasz-io Date: Tue, 10 Dec 2024 10:13:09 -0800 Subject: [PATCH 15/46] fix: actions --- .github/workflows/pr_checks.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pr_checks.yaml b/.github/workflows/pr_checks.yaml index dc76a5258..84d7b5421 100644 --- a/.github/workflows/pr_checks.yaml +++ b/.github/workflows/pr_checks.yaml @@ -9,6 +9,7 @@ on: - "extensions/vscode/**" - "core/**" - "gui/**" + - ".github/workflows**" jobs: tsc-check: From 3d4b877b2f68462cced9f918987eaf3055d6c45e Mon Sep 17 00:00:00 2001 From: tomasz-io Date: Tue, 10 Dec 2024 10:14:59 -0800 Subject: [PATCH 16/46] test: ci --- .github/workflows/pr_checks.yaml | 170 ++++++++++++++++++------------- 1 file changed, 97 insertions(+), 73 deletions(-) diff --git a/.github/workflows/pr_checks.yaml b/.github/workflows/pr_checks.yaml index 84d7b5421..869c626aa 100644 --- a/.github/workflows/pr_checks.yaml +++ b/.github/workflows/pr_checks.yaml @@ -4,125 +4,149 @@ on: pull_request: branches: - main - paths: - "extensions/vscode/**" - "core/**" - "gui/**" - - ".github/workflows**" - jobs: - tsc-check: + setup: runs-on: ubuntu-latest + outputs: + node-version: ${{ steps.node-setup.outputs.node-version }} steps: - # 1. Check-out repository - name: Check-out repository uses: actions/checkout@v4 - # 2. Install npm dependencies - name: Use Node.js from .nvmrc + id: node-setup uses: actions/setup-node@v4 with: node-version-file: ".nvmrc" - - name: Cache root node_modules - uses: actions/cache@v3 - with: - path: node_modules - key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }} + test-extension: + runs-on: ubuntu-latest + needs: setup - - name: Cache extension node_modules - uses: actions/cache@v3 - with: - path: extensions/vscode/node_modules - key: ${{ runner.os }}-node-${{ hashFiles('extensions/vscode/package-lock.json') }} + steps: + - name: Check-out repository + uses: actions/checkout@v4 - - name: Cache core node_modules - uses: actions/cache@v3 + - name: Setup Node.js + uses: actions/setup-node@v4 with: - path: core/node_modules - key: ${{ runner.os }}-node-${{ hashFiles('core/package-lock.json') }} - - - name: Cache gui node_modules + node-version-file: ".nvmrc" + - name: Cache extension dependencies uses: actions/cache@v3 + id: cache-extension with: - path: gui/node_modules - key: ${{ runner.os }}-node-${{ hashFiles('gui/package-lock.json') }} + path: | + node_modules + extensions/vscode/node_modules + key: ${{ runner.os }}-ext-${{ hashFiles('package-lock.json', 'extensions/vscode/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-ext- - - name: Cache binary node_modules - uses: actions/cache@v3 - with: - path: binary/node_modules - key: ${{ runner.os }}-node-${{ hashFiles('binary/package-lock.json') }} - - - name: root install + - name: Install dependencies + if: steps.cache-extension.outputs.cache-hit != 'true' run: | npm ci - - - name: extensions/vscode install - run: | - cd extensions/vscode - npm ci + cd extensions/vscode && npm ci env: - # https://github.com/microsoft/vscode-ripgrep/issues/9#issuecomment-643965333 GITHUB_TOKEN: ${{ secrets.CI_GITHUB_TOKEN }} - - name: core install - run: | - cd core - npm ci - - - name: gui install - run: | - cd gui - npm ci - - - name: binary install - run: | - cd binary - npm ci - - - name: extensions/vscode checks + - name: Run checks run: | cd extensions/vscode npx tsc --noEmit npm run lint - - name: Install Xvfb for Linux and run end to end tests + - name: Run e2e tests run: | - sudo apt-get install -y xvfb # Install Xvfb - Xvfb :99 & # Start Xvfb - export DISPLAY=:99 # Export the display number to the environment + sudo apt-get install -y xvfb + Xvfb :99 & + export DISPLAY=:99 cd extensions/vscode npm run package npm run e2e:ci - - name: core checks + test-core: + runs-on: ubuntu-latest + needs: setup + + steps: + - name: Check-out repository + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version-file: ".nvmrc" + + - name: Cache core dependencies + uses: actions/cache@v3 + id: cache-core + with: + path: | + node_modules + core/node_modules + key: ${{ runner.os }}-core-${{ hashFiles('package-lock.json', 'core/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-core- + + - name: Install dependencies + if: steps.cache-core.outputs.cache-hit != 'true' + run: | + npm ci + cd core && npm ci + - name: Run checks run: | cd core - npm ci npx tsc --noEmit npm run lint env: OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} - - - name: gui checks - run: | - cd gui - npx tsc --noEmit - - - name: binary checks - run: | - cd binary - npx tsc --noEmit - - - name: Run core tests + - name: Run tests run: | cd core npm test - - name: Run gui tests + test-gui: + runs-on: ubuntu-latest + needs: setup + + steps: + - name: Check-out repository + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version-file: ".nvmrc" + + - name: Cache GUI dependencies + uses: actions/cache@v3 + id: cache-gui + with: + path: | + node_modules + gui/node_modules + key: ${{ runner.os }}-gui-${{ hashFiles('package-lock.json', 'gui/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-gui- + + - name: Install dependencies + if: steps.cache-gui.outputs.cache-hit != 'true' + run: | + npm ci + cd gui && npm ci + + - name: Run checks run: | cd gui - npm test + npx tsc --noEmit + + - name: Run tests + run: | + cd gui + npm test \ No newline at end of file From 60c32d622e7b6218d66ad878f2295c733d6ec856 Mon Sep 17 00:00:00 2001 From: tomasz-io Date: Tue, 10 Dec 2024 10:16:04 -0800 Subject: [PATCH 17/46] test --- .github/workflows/pr_checks.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pr_checks.yaml b/.github/workflows/pr_checks.yaml index 869c626aa..5ea1c31bf 100644 --- a/.github/workflows/pr_checks.yaml +++ b/.github/workflows/pr_checks.yaml @@ -8,6 +8,7 @@ on: - "extensions/vscode/**" - "core/**" - "gui/**" + - ".github/workflows**" jobs: setup: runs-on: ubuntu-latest @@ -149,4 +150,4 @@ jobs: - name: Run tests run: | cd gui - npm test \ No newline at end of file + npm test From 5eb037e3ae60e9ed987171c89e19311b560dac09 Mon Sep 17 00:00:00 2001 From: tomasz-io Date: Tue, 10 Dec 2024 10:22:27 -0800 Subject: [PATCH 18/46] fix --- .github/workflows/pr_checks.yaml | 171 +++++++++++++------------------ 1 file changed, 73 insertions(+), 98 deletions(-) diff --git a/.github/workflows/pr_checks.yaml b/.github/workflows/pr_checks.yaml index 5ea1c31bf..84d7b5421 100644 --- a/.github/workflows/pr_checks.yaml +++ b/.github/workflows/pr_checks.yaml @@ -4,150 +4,125 @@ on: pull_request: branches: - main + paths: - "extensions/vscode/**" - "core/**" - "gui/**" - ".github/workflows**" + jobs: - setup: + tsc-check: runs-on: ubuntu-latest - outputs: - node-version: ${{ steps.node-setup.outputs.node-version }} steps: + # 1. Check-out repository - name: Check-out repository uses: actions/checkout@v4 + # 2. Install npm dependencies - name: Use Node.js from .nvmrc - id: node-setup uses: actions/setup-node@v4 with: node-version-file: ".nvmrc" - test-extension: - runs-on: ubuntu-latest - needs: setup - - steps: - - name: Check-out repository - uses: actions/checkout@v4 - - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version-file: ".nvmrc" - - name: Cache extension dependencies + - name: Cache root node_modules uses: actions/cache@v3 - id: cache-extension with: - path: | - node_modules - extensions/vscode/node_modules - key: ${{ runner.os }}-ext-${{ hashFiles('package-lock.json', 'extensions/vscode/package-lock.json') }} - restore-keys: | - ${{ runner.os }}-ext- + path: node_modules + key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }} - - name: Install dependencies - if: steps.cache-extension.outputs.cache-hit != 'true' + - name: Cache extension node_modules + uses: actions/cache@v3 + with: + path: extensions/vscode/node_modules + key: ${{ runner.os }}-node-${{ hashFiles('extensions/vscode/package-lock.json') }} + + - name: Cache core node_modules + uses: actions/cache@v3 + with: + path: core/node_modules + key: ${{ runner.os }}-node-${{ hashFiles('core/package-lock.json') }} + + - name: Cache gui node_modules + uses: actions/cache@v3 + with: + path: gui/node_modules + key: ${{ runner.os }}-node-${{ hashFiles('gui/package-lock.json') }} + + - name: Cache binary node_modules + uses: actions/cache@v3 + with: + path: binary/node_modules + key: ${{ runner.os }}-node-${{ hashFiles('binary/package-lock.json') }} + + - name: root install run: | npm ci - cd extensions/vscode && npm ci + + - name: extensions/vscode install + run: | + cd extensions/vscode + npm ci env: + # https://github.com/microsoft/vscode-ripgrep/issues/9#issuecomment-643965333 GITHUB_TOKEN: ${{ secrets.CI_GITHUB_TOKEN }} - - name: Run checks + - name: core install + run: | + cd core + npm ci + + - name: gui install + run: | + cd gui + npm ci + + - name: binary install + run: | + cd binary + npm ci + + - name: extensions/vscode checks run: | cd extensions/vscode npx tsc --noEmit npm run lint - - name: Run e2e tests + - name: Install Xvfb for Linux and run end to end tests run: | - sudo apt-get install -y xvfb - Xvfb :99 & - export DISPLAY=:99 + sudo apt-get install -y xvfb # Install Xvfb + Xvfb :99 & # Start Xvfb + export DISPLAY=:99 # Export the display number to the environment cd extensions/vscode npm run package npm run e2e:ci - test-core: - runs-on: ubuntu-latest - needs: setup - - steps: - - name: Check-out repository - uses: actions/checkout@v4 - - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version-file: ".nvmrc" - - - name: Cache core dependencies - uses: actions/cache@v3 - id: cache-core - with: - path: | - node_modules - core/node_modules - key: ${{ runner.os }}-core-${{ hashFiles('package-lock.json', 'core/package-lock.json') }} - restore-keys: | - ${{ runner.os }}-core- - - - name: Install dependencies - if: steps.cache-core.outputs.cache-hit != 'true' - run: | - npm ci - cd core && npm ci - - name: Run checks + - name: core checks run: | cd core + npm ci npx tsc --noEmit npm run lint env: OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} - - name: Run tests - run: | - cd core - npm test - test-gui: - runs-on: ubuntu-latest - needs: setup - - steps: - - name: Check-out repository - uses: actions/checkout@v4 - - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version-file: ".nvmrc" - - - name: Cache GUI dependencies - uses: actions/cache@v3 - id: cache-gui - with: - path: | - node_modules - gui/node_modules - key: ${{ runner.os }}-gui-${{ hashFiles('package-lock.json', 'gui/package-lock.json') }} - restore-keys: | - ${{ runner.os }}-gui- - - - name: Install dependencies - if: steps.cache-gui.outputs.cache-hit != 'true' - run: | - npm ci - cd gui && npm ci - - - name: Run checks + - name: gui checks run: | cd gui npx tsc --noEmit - - name: Run tests + - name: binary checks + run: | + cd binary + npx tsc --noEmit + + - name: Run core tests + run: | + cd core + npm test + + - name: Run gui tests run: | cd gui npm test From fb9de703722f188108fec17ab32cf9ca9aa323d1 Mon Sep 17 00:00:00 2001 From: tomasz-io Date: Tue, 10 Dec 2024 10:34:41 -0800 Subject: [PATCH 19/46] improv: remove unused step --- .github/workflows/pr_checks.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/pr_checks.yaml b/.github/workflows/pr_checks.yaml index 84d7b5421..f385e1d33 100644 --- a/.github/workflows/pr_checks.yaml +++ b/.github/workflows/pr_checks.yaml @@ -101,7 +101,6 @@ jobs: - name: core checks run: | cd core - npm ci npx tsc --noEmit npm run lint env: From a782455f316ef0763e5e634c6d82bbaaabd7ee08 Mon Sep 17 00:00:00 2001 From: tomasz-io Date: Tue, 10 Dec 2024 10:42:12 -0800 Subject: [PATCH 20/46] test: parallelization --- .github/workflows/pr_checks.yaml | 184 +++++++++++++++++++------------ 1 file changed, 114 insertions(+), 70 deletions(-) diff --git a/.github/workflows/pr_checks.yaml b/.github/workflows/pr_checks.yaml index f385e1d33..dfff0fa90 100644 --- a/.github/workflows/pr_checks.yaml +++ b/.github/workflows/pr_checks.yaml @@ -4,7 +4,6 @@ on: pull_request: branches: - main - paths: - "extensions/vscode/**" - "core/**" @@ -12,93 +11,57 @@ on: - ".github/workflows**" jobs: - tsc-check: + vscode-checks: runs-on: ubuntu-latest - steps: - # 1. Check-out repository - - name: Check-out repository - uses: actions/checkout@v4 - - # 2. Install npm dependencies - - name: Use Node.js from .nvmrc - uses: actions/setup-node@v4 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: node-version-file: ".nvmrc" - - name: Cache root node_modules - uses: actions/cache@v3 + - uses: actions/cache@v3 with: - path: node_modules - key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }} + path: | + node_modules + extensions/vscode/node_modules + key: ${{ runner.os }}-node-vscode-${{ hashFiles('package-lock.json', 'extensions/vscode/package-lock.json') }} - - name: Cache extension node_modules - uses: actions/cache@v3 - with: - path: extensions/vscode/node_modules - key: ${{ runner.os }}-node-${{ hashFiles('extensions/vscode/package-lock.json') }} - - - name: Cache core node_modules - uses: actions/cache@v3 - with: - path: core/node_modules - key: ${{ runner.os }}-node-${{ hashFiles('core/package-lock.json') }} - - - name: Cache gui node_modules - uses: actions/cache@v3 - with: - path: gui/node_modules - key: ${{ runner.os }}-node-${{ hashFiles('gui/package-lock.json') }} - - - name: Cache binary node_modules - uses: actions/cache@v3 - with: - path: binary/node_modules - key: ${{ runner.os }}-node-${{ hashFiles('binary/package-lock.json') }} - - - name: root install + - name: Install dependencies run: | npm ci - - - name: extensions/vscode install - run: | cd extensions/vscode npm ci env: - # https://github.com/microsoft/vscode-ripgrep/issues/9#issuecomment-643965333 GITHUB_TOKEN: ${{ secrets.CI_GITHUB_TOKEN }} - - name: core install - run: | - cd core - npm ci - - - name: gui install - run: | - cd gui - npm ci - - - name: binary install - run: | - cd binary - npm ci - - - name: extensions/vscode checks + - name: Type check and lint run: | cd extensions/vscode npx tsc --noEmit npm run lint - - name: Install Xvfb for Linux and run end to end tests - run: | - sudo apt-get install -y xvfb # Install Xvfb - Xvfb :99 & # Start Xvfb - export DISPLAY=:99 # Export the display number to the environment - cd extensions/vscode - npm run package - npm run e2e:ci + core-checks: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version-file: ".nvmrc" - - name: core checks + - uses: actions/cache@v3 + with: + path: | + node_modules + core/node_modules + key: ${{ runner.os }}-node-core-${{ hashFiles('package-lock.json', 'core/package-lock.json') }} + + - name: Install dependencies + run: | + npm ci + cd core + npm ci + + - name: Type check and lint run: | cd core npx tsc --noEmit @@ -106,16 +69,97 @@ jobs: env: OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} - - name: gui checks + gui-checks: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version-file: ".nvmrc" + + - uses: actions/cache@v3 + with: + path: | + node_modules + gui/node_modules + key: ${{ runner.os }}-node-gui-${{ hashFiles('package-lock.json', 'gui/package-lock.json') }} + + - name: Install dependencies + run: | + npm ci + cd gui + npm ci + + - name: Type check run: | cd gui npx tsc --noEmit - - name: binary checks + binary-checks: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version-file: ".nvmrc" + + - uses: actions/cache@v3 + with: + path: | + node_modules + binary/node_modules + key: ${{ runner.os }}-node-binary-${{ hashFiles('package-lock.json', 'binary/package-lock.json') }} + + - name: Install dependencies + run: | + npm ci + cd binary + npm ci + + - name: Type check run: | cd binary npx tsc --noEmit + tests: + needs: [vscode-checks, core-checks, gui-checks, binary-checks] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version-file: ".nvmrc" + + - uses: actions/cache@v3 + with: + path: | + node_modules + extensions/vscode/node_modules + core/node_modules + gui/node_modules + key: ${{ runner.os }}-node-tests-${{ hashFiles('package-lock.json', '**/package-lock.json') }} + + - name: Install dependencies + run: | + npm ci + cd extensions/vscode && npm ci + cd ../core && npm ci + cd ../gui && npm ci + env: + GITHUB_TOKEN: ${{ secrets.CI_GITHUB_TOKEN }} + + - name: Install and setup Xvfb + run: | + sudo apt-get install -y xvfb + Xvfb :99 & + export DISPLAY=:99 + + - name: Run VSCode e2e tests + run: | + cd extensions/vscode + npm run package + npm run e2e:ci + - name: Run core tests run: | cd core From 1bb1d71565a244c7baebcae78c651a3fb1d8d512 Mon Sep 17 00:00:00 2001 From: tomasz-io Date: Tue, 10 Dec 2024 10:44:47 -0800 Subject: [PATCH 21/46] test: more parellelization --- .github/workflows/pr_checks.yaml | 81 +++++++++++++++++--------------- 1 file changed, 42 insertions(+), 39 deletions(-) diff --git a/.github/workflows/pr_checks.yaml b/.github/workflows/pr_checks.yaml index dfff0fa90..8c578b120 100644 --- a/.github/workflows/pr_checks.yaml +++ b/.github/workflows/pr_checks.yaml @@ -11,24 +11,38 @@ on: - ".github/workflows**" jobs: - vscode-checks: + install-root: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: node-version-file: ".nvmrc" - + - uses: actions/cache@v3 with: - path: | - node_modules - extensions/vscode/node_modules - key: ${{ runner.os }}-node-vscode-${{ hashFiles('package-lock.json', 'extensions/vscode/package-lock.json') }} + path: node_modules + key: ${{ runner.os }}-root-node-modules-${{ hashFiles('package-lock.json') }} - - name: Install dependencies + - name: Install root dependencies + run: npm ci + + vscode-checks: + needs: install-root + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version-file: ".nvmrc" + + - uses: actions/cache@v3 + with: + path: node_modules + key: ${{ runner.os }}-root-node-modules-${{ hashFiles('package-lock.json') }} + + - name: Install vscode dependencies run: | - npm ci cd extensions/vscode npm ci env: @@ -41,23 +55,21 @@ jobs: npm run lint core-checks: + needs: install-root runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: node-version-file: ".nvmrc" - + - uses: actions/cache@v3 with: - path: | - node_modules - core/node_modules - key: ${{ runner.os }}-node-core-${{ hashFiles('package-lock.json', 'core/package-lock.json') }} + path: node_modules + key: ${{ runner.os }}-root-node-modules-${{ hashFiles('package-lock.json') }} - - name: Install dependencies + - name: Install core dependencies run: | - npm ci cd core npm ci @@ -70,23 +82,21 @@ jobs: OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} gui-checks: + needs: install-root runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: node-version-file: ".nvmrc" - + - uses: actions/cache@v3 with: - path: | - node_modules - gui/node_modules - key: ${{ runner.os }}-node-gui-${{ hashFiles('package-lock.json', 'gui/package-lock.json') }} + path: node_modules + key: ${{ runner.os }}-root-node-modules-${{ hashFiles('package-lock.json') }} - - name: Install dependencies + - name: Install gui dependencies run: | - npm ci cd gui npm ci @@ -96,23 +106,21 @@ jobs: npx tsc --noEmit binary-checks: + needs: install-root runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: node-version-file: ".nvmrc" - + - uses: actions/cache@v3 with: - path: | - node_modules - binary/node_modules - key: ${{ runner.os }}-node-binary-${{ hashFiles('package-lock.json', 'binary/package-lock.json') }} + path: node_modules + key: ${{ runner.os }}-root-node-modules-${{ hashFiles('package-lock.json') }} - - name: Install dependencies + - name: Install binary dependencies run: | - npm ci cd binary npm ci @@ -129,19 +137,14 @@ jobs: - uses: actions/setup-node@v4 with: node-version-file: ".nvmrc" - + - uses: actions/cache@v3 with: - path: | - node_modules - extensions/vscode/node_modules - core/node_modules - gui/node_modules - key: ${{ runner.os }}-node-tests-${{ hashFiles('package-lock.json', '**/package-lock.json') }} + path: node_modules + key: ${{ runner.os }}-root-node-modules-${{ hashFiles('package-lock.json') }} - - name: Install dependencies + - name: Install all test dependencies run: | - npm ci cd extensions/vscode && npm ci cd ../core && npm ci cd ../gui && npm ci @@ -168,4 +171,4 @@ jobs: - name: Run gui tests run: | cd gui - npm test + npm test \ No newline at end of file From 5797c803026eb8093f825c73926182f0ce9e7d3a Mon Sep 17 00:00:00 2001 From: tomasz-io Date: Tue, 10 Dec 2024 10:52:55 -0800 Subject: [PATCH 22/46] test --- .github/workflows/pr_checks.yaml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/.github/workflows/pr_checks.yaml b/.github/workflows/pr_checks.yaml index 8c578b120..53c8ee0ea 100644 --- a/.github/workflows/pr_checks.yaml +++ b/.github/workflows/pr_checks.yaml @@ -106,6 +106,29 @@ jobs: npx tsc --noEmit binary-checks: + needs: [install-root, core-checks] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version-file: ".nvmrc" + + - uses: actions/cache@v3 + with: + path: node_modules + key: ${{ runner.os }}-root-node-modules-${{ hashFiles('package-lock.json') }} + + - name: Install binary dependencies + run: | + cd binary + npm ci + + - name: Type check + run: | + cd binary + npx tsc --noEmit + needs: install-root runs-on: ubuntu-latest steps: From 8f2419740044a5df2ca70905c2b9ecd0fef3389e Mon Sep 17 00:00:00 2001 From: tomasz-io Date: Tue, 10 Dec 2024 10:56:40 -0800 Subject: [PATCH 23/46] fix: binary --- .github/workflows/pr_checks.yaml | 35 ++++++-------------------------- 1 file changed, 6 insertions(+), 29 deletions(-) diff --git a/.github/workflows/pr_checks.yaml b/.github/workflows/pr_checks.yaml index 53c8ee0ea..2b2c32968 100644 --- a/.github/workflows/pr_checks.yaml +++ b/.github/workflows/pr_checks.yaml @@ -18,7 +18,7 @@ jobs: - uses: actions/setup-node@v4 with: node-version-file: ".nvmrc" - + - uses: actions/cache@v3 with: path: node_modules @@ -35,7 +35,7 @@ jobs: - uses: actions/setup-node@v4 with: node-version-file: ".nvmrc" - + - uses: actions/cache@v3 with: path: node_modules @@ -62,7 +62,7 @@ jobs: - uses: actions/setup-node@v4 with: node-version-file: ".nvmrc" - + - uses: actions/cache@v3 with: path: node_modules @@ -89,7 +89,7 @@ jobs: - uses: actions/setup-node@v4 with: node-version-file: ".nvmrc" - + - uses: actions/cache@v3 with: path: node_modules @@ -113,30 +113,7 @@ jobs: - uses: actions/setup-node@v4 with: node-version-file: ".nvmrc" - - - uses: actions/cache@v3 - with: - path: node_modules - key: ${{ runner.os }}-root-node-modules-${{ hashFiles('package-lock.json') }} - - name: Install binary dependencies - run: | - cd binary - npm ci - - - name: Type check - run: | - cd binary - npx tsc --noEmit - - needs: install-root - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version-file: ".nvmrc" - - uses: actions/cache@v3 with: path: node_modules @@ -160,7 +137,7 @@ jobs: - uses: actions/setup-node@v4 with: node-version-file: ".nvmrc" - + - uses: actions/cache@v3 with: path: node_modules @@ -194,4 +171,4 @@ jobs: - name: Run gui tests run: | cd gui - npm test \ No newline at end of file + npm test From e5fb4f17ad9d3b6e72d6c7e0920357e607c0e776 Mon Sep 17 00:00:00 2001 From: tomasz-io Date: Tue, 10 Dec 2024 11:14:06 -0800 Subject: [PATCH 24/46] fix: workflow --- .github/workflows/pr_checks.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr_checks.yaml b/.github/workflows/pr_checks.yaml index 2b2c32968..5ea57342d 100644 --- a/.github/workflows/pr_checks.yaml +++ b/.github/workflows/pr_checks.yaml @@ -82,7 +82,7 @@ jobs: OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} gui-checks: - needs: install-root + needs: [install-root, core-checks] runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 From 990709c353fdc842bab5d01bd7b995fbcc970666 Mon Sep 17 00:00:00 2001 From: tomasz-io Date: Tue, 10 Dec 2024 11:16:47 -0800 Subject: [PATCH 25/46] test --- .github/workflows/pr_checks.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/pr_checks.yaml b/.github/workflows/pr_checks.yaml index 5ea57342d..e20aa7f90 100644 --- a/.github/workflows/pr_checks.yaml +++ b/.github/workflows/pr_checks.yaml @@ -95,6 +95,11 @@ jobs: path: node_modules key: ${{ runner.os }}-root-node-modules-${{ hashFiles('package-lock.json') }} + - name: Install core dependencies + run: | + cd core + npm ci + - name: Install gui dependencies run: | cd gui From a62fa9df26b5fdb3847ea17267de7cb0fc0b8d87 Mon Sep 17 00:00:00 2001 From: tomasz-io Date: Tue, 10 Dec 2024 11:20:07 -0800 Subject: [PATCH 26/46] test: core --- .github/workflows/pr_checks.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/pr_checks.yaml b/.github/workflows/pr_checks.yaml index e20aa7f90..989cc3950 100644 --- a/.github/workflows/pr_checks.yaml +++ b/.github/workflows/pr_checks.yaml @@ -68,6 +68,11 @@ jobs: path: node_modules key: ${{ runner.os }}-root-node-modules-${{ hashFiles('package-lock.json') }} + - uses: actions/cache@v3 + with: + path: core/node_modules + key: ${{ runner.os }}-core-node-modules-${{ hashFiles('core/package-lock.json') }} + - name: Install core dependencies run: | cd core @@ -95,6 +100,11 @@ jobs: path: node_modules key: ${{ runner.os }}-root-node-modules-${{ hashFiles('package-lock.json') }} + - uses: actions/cache@v3 + with: + path: core/node_modules + key: ${{ runner.os }}-core-node-modules-${{ hashFiles('core/package-lock.json') }} + - name: Install core dependencies run: | cd core From 05958f4b4fb68da9f67f261159c82802860050a1 Mon Sep 17 00:00:00 2001 From: tomasz-io Date: Tue, 10 Dec 2024 11:25:58 -0800 Subject: [PATCH 27/46] test: gui --- .github/workflows/pr_checks.yaml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/pr_checks.yaml b/.github/workflows/pr_checks.yaml index 989cc3950..5c4ea8418 100644 --- a/.github/workflows/pr_checks.yaml +++ b/.github/workflows/pr_checks.yaml @@ -105,11 +105,6 @@ jobs: path: core/node_modules key: ${{ runner.os }}-core-node-modules-${{ hashFiles('core/package-lock.json') }} - - name: Install core dependencies - run: | - cd core - npm ci - - name: Install gui dependencies run: | cd gui From 9330af6a8cd03d1f2b9d70de33a68692a077a1c2 Mon Sep 17 00:00:00 2001 From: tomasz-io Date: Tue, 10 Dec 2024 11:29:27 -0800 Subject: [PATCH 28/46] ci: binary --- .github/workflows/pr_checks.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/pr_checks.yaml b/.github/workflows/pr_checks.yaml index 5c4ea8418..78ee1e496 100644 --- a/.github/workflows/pr_checks.yaml +++ b/.github/workflows/pr_checks.yaml @@ -129,6 +129,11 @@ jobs: path: node_modules key: ${{ runner.os }}-root-node-modules-${{ hashFiles('package-lock.json') }} + - uses: actions/cache@v3 + with: + path: core/node_modules + key: ${{ runner.os }}-core-node-modules-${{ hashFiles('core/package-lock.json') }} + - name: Install binary dependencies run: | cd binary From eaa8a2cb50287fe19e29b4a96fc8d8df877a362b Mon Sep 17 00:00:00 2001 From: tomasz-io Date: Tue, 10 Dec 2024 11:34:27 -0800 Subject: [PATCH 29/46] ci: vscode-checks fix --- .github/workflows/pr_checks.yaml | 59 +++++++++++++++++--------------- 1 file changed, 32 insertions(+), 27 deletions(-) diff --git a/.github/workflows/pr_checks.yaml b/.github/workflows/pr_checks.yaml index 78ee1e496..477705292 100644 --- a/.github/workflows/pr_checks.yaml +++ b/.github/workflows/pr_checks.yaml @@ -27,33 +27,6 @@ jobs: - name: Install root dependencies run: npm ci - vscode-checks: - needs: install-root - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version-file: ".nvmrc" - - - uses: actions/cache@v3 - with: - path: node_modules - key: ${{ runner.os }}-root-node-modules-${{ hashFiles('package-lock.json') }} - - - name: Install vscode dependencies - run: | - cd extensions/vscode - npm ci - env: - GITHUB_TOKEN: ${{ secrets.CI_GITHUB_TOKEN }} - - - name: Type check and lint - run: | - cd extensions/vscode - npx tsc --noEmit - npm run lint - core-checks: needs: install-root runs-on: ubuntu-latest @@ -144,6 +117,38 @@ jobs: cd binary npx tsc --noEmit + vscode-checks: + needs: [install-root, core-checks] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version-file: ".nvmrc" + + - uses: actions/cache@v3 + with: + path: node_modules + key: ${{ runner.os }}-root-node-modules-${{ hashFiles('package-lock.json') }} + + - uses: actions/cache@v3 + with: + path: core/node_modules + key: ${{ runner.os }}-core-node-modules-${{ hashFiles('core/package-lock.json') }} + + - name: Install vscode dependencies + run: | + cd extensions/vscode + npm ci + env: + GITHUB_TOKEN: ${{ secrets.CI_GITHUB_TOKEN }} + + - name: Type check and lint + run: | + cd extensions/vscode + npx tsc --noEmit + npm run lint + tests: needs: [vscode-checks, core-checks, gui-checks, binary-checks] runs-on: ubuntu-latest From d4e638b075ea9da77c217cb637a44a8592f1b17c Mon Sep 17 00:00:00 2001 From: sealad886 Date: Tue, 10 Dec 2024 19:37:53 +0000 Subject: [PATCH 30/46] * Adding Cohere's `rerank-v3.5` model to the list of acceptable options. --- 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 2949b7055..c3b8336a5 100644 --- a/extensions/vscode/config_schema.json +++ b/extensions/vscode/config_schema.json @@ -2718,7 +2718,8 @@ "rerank-english-v3.0", "rerank-multilingual-v3.0", "rerank-english-v2.0", - "rerank-multilingual-v2.0" + "rerank-multilingual-v2.0", + "rerank-v3.5" ] }, "apiBase": { From 047ff1e44739f29eb8d9d83b85cff76f8eb397d1 Mon Sep 17 00:00:00 2001 From: tomasz-io Date: Tue, 10 Dec 2024 11:43:32 -0800 Subject: [PATCH 31/46] ci: add caching --- .github/workflows/pr_checks.yaml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.github/workflows/pr_checks.yaml b/.github/workflows/pr_checks.yaml index 477705292..a948faf97 100644 --- a/.github/workflows/pr_checks.yaml +++ b/.github/workflows/pr_checks.yaml @@ -78,6 +78,11 @@ jobs: path: core/node_modules key: ${{ runner.os }}-core-node-modules-${{ hashFiles('core/package-lock.json') }} + - uses: actions/cache@v3 + with: + path: gui/node_modules + key: ${{ runner.os }}-gui-node-modules-${{ hashFiles('gui/package-lock.json') }} + - name: Install gui dependencies run: | cd gui @@ -107,6 +112,11 @@ jobs: path: core/node_modules key: ${{ runner.os }}-core-node-modules-${{ hashFiles('core/package-lock.json') }} + - uses: actions/cache@v3 + with: + path: binary/node_modules + key: ${{ runner.os }}-binary-node-modules-${{ hashFiles('binary/package-lock.json') }} + - name: Install binary dependencies run: | cd binary @@ -136,6 +146,11 @@ jobs: path: core/node_modules key: ${{ runner.os }}-core-node-modules-${{ hashFiles('core/package-lock.json') }} + - uses: actions/cache@v3 + with: + path: extensions/vscode/node_modules + key: ${{ runner.os }}-vscode-node-modules-${{ hashFiles('extensions/vscode/package-lock.json') }} + - name: Install vscode dependencies run: | cd extensions/vscode From 82daef93471dccd4dcfcbfe7e958722dab4a2eca Mon Sep 17 00:00:00 2001 From: tomasz-io Date: Tue, 10 Dec 2024 11:53:38 -0800 Subject: [PATCH 32/46] ci: split tests --- .github/workflows/pr_checks.yaml | 65 ++++++++++++++++++++++++-------- 1 file changed, 50 insertions(+), 15 deletions(-) diff --git a/.github/workflows/pr_checks.yaml b/.github/workflows/pr_checks.yaml index a948faf97..12ec216bf 100644 --- a/.github/workflows/pr_checks.yaml +++ b/.github/workflows/pr_checks.yaml @@ -164,8 +164,8 @@ jobs: npx tsc --noEmit npm run lint - tests: - needs: [vscode-checks, core-checks, gui-checks, binary-checks] + core-tests: + needs: [core-checks] runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -175,16 +175,32 @@ jobs: - uses: actions/cache@v3 with: - path: node_modules - key: ${{ runner.os }}-root-node-modules-${{ hashFiles('package-lock.json') }} + path: core/node_modules + key: ${{ runner.os }}-core-node-modules-${{ hashFiles('extensions/core/package-lock.json') }} - - name: Install all test dependencies + - name: Run core tests run: | - cd extensions/vscode && npm ci - cd ../core && npm ci - cd ../gui && npm ci - env: - GITHUB_TOKEN: ${{ secrets.CI_GITHUB_TOKEN }} + cd extensions/core + npm test + + vscode-tests: + needs: [vscode-checks, core-checks] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version-file: ".nvmrc" + + - uses: actions/cache@v3 + with: + path: extensions/vscode/node_modules + key: ${{ runner.os }}-vscode-node-modules-${{ hashFiles('extensions/vscode/package-lock.json') }} + + - uses: actions/cache@v3 + with: + path: core/node_modules + key: ${{ runner.os }}-core-node-modules-${{ hashFiles('core/package-lock.json') }} - name: Install and setup Xvfb run: | @@ -198,12 +214,31 @@ jobs: npm run package npm run e2e:ci - - name: Run core tests - run: | - cd core - npm test + gui-tests: + needs: [gui-checks, core-checks] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version-file: ".nvmrc" + + - uses: actions/cache@v3 + with: + path: gui/node_modules + key: ${{ runner.os }}-gui-node-modules-${{ hashFiles('gui/package-lock.json') }} + + - uses: actions/cache@v3 + with: + path: core/node_modules + key: ${{ runner.os }}-core-node-modules-${{ hashFiles('core/package-lock.json') }} + + - name: Install GUI dependencies + run: cd extensions/gui && npm ci + env: + GITHUB_TOKEN: ${{ secrets.CI_GITHUB_TOKEN }} - name: Run gui tests run: | - cd gui + cd extensions/gui npm test From bb33bbe823b08934f197d4a7bc2a7c97ac7bff71 Mon Sep 17 00:00:00 2001 From: tomasz-io Date: Tue, 10 Dec 2024 11:58:03 -0800 Subject: [PATCH 33/46] ci: fix dependencies --- .github/workflows/pr_checks.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pr_checks.yaml b/.github/workflows/pr_checks.yaml index 12ec216bf..ef31f210d 100644 --- a/.github/workflows/pr_checks.yaml +++ b/.github/workflows/pr_checks.yaml @@ -176,11 +176,11 @@ jobs: - uses: actions/cache@v3 with: path: core/node_modules - key: ${{ runner.os }}-core-node-modules-${{ hashFiles('extensions/core/package-lock.json') }} + key: ${{ runner.os }}-core-node-modules-${{ hashFiles('core/package-lock.json') }} - name: Run core tests run: | - cd extensions/core + cd core npm test vscode-tests: @@ -234,11 +234,11 @@ jobs: key: ${{ runner.os }}-core-node-modules-${{ hashFiles('core/package-lock.json') }} - name: Install GUI dependencies - run: cd extensions/gui && npm ci + run: cd gui && npm ci env: GITHUB_TOKEN: ${{ secrets.CI_GITHUB_TOKEN }} - name: Run gui tests run: | - cd extensions/gui + cd gui npm test From a7ac6627378a9b5d28851bd0af0c7b04f076d2c0 Mon Sep 17 00:00:00 2001 From: tomasz-io Date: Tue, 10 Dec 2024 12:10:03 -0800 Subject: [PATCH 34/46] ci: vscode e2e --- .github/workflows/pr_checks.yaml | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/.github/workflows/pr_checks.yaml b/.github/workflows/pr_checks.yaml index ef31f210d..b4e0dd677 100644 --- a/.github/workflows/pr_checks.yaml +++ b/.github/workflows/pr_checks.yaml @@ -202,14 +202,11 @@ jobs: path: core/node_modules key: ${{ runner.os }}-core-node-modules-${{ hashFiles('core/package-lock.json') }} - - name: Install and setup Xvfb - run: | - sudo apt-get install -y xvfb - Xvfb :99 & - export DISPLAY=:99 - - - name: Run VSCode e2e tests + - name: Install Xvfb for Linux and run e2e tests run: | + sudo apt-get install -y xvfb # Install Xvfb + Xvfb :99 & # Start Xvfb + export DISPLAY=:99 # Export the display number to the environment cd extensions/vscode npm run package npm run e2e:ci From 3465366db8dcf01541b4440c3faa31552975501e Mon Sep 17 00:00:00 2001 From: Nate Date: Tue, 10 Dec 2024 12:19:09 -0800 Subject: [PATCH 35/46] bump package.json 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 755185f78..c285e7586 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.242", + "version": "0.9.243", "repository": { "type": "git", "url": "https://github.com/continuedev/continue" From 89837f400ea006bc345b9f49784739ec961b9e21 Mon Sep 17 00:00:00 2001 From: Nate Date: Tue, 10 Dec 2024 12:52:36 -0800 Subject: [PATCH 36/46] export comment --- packages/openai-adapters/src/index.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/openai-adapters/src/index.ts b/packages/openai-adapters/src/index.ts index fa02153fa..c3db18bcf 100644 --- a/packages/openai-adapters/src/index.ts +++ b/packages/openai-adapters/src/index.ts @@ -68,7 +68,7 @@ export function constructLlmApi(config: LLMConfig): BaseLlmApi | undefined { case "nvidia": return openAICompatible("https://integrate.api.nvidia.com/v1/", config); case "scaleway": - return openAICompatible("https://api.scaleway.ai/v1/", config); + return openAICompatible("https://api.scaleway.ai/v1/", config); case "fireworks": return openAICompatible("https://api.fireworks.ai/inference/v1/", config); case "together": @@ -99,4 +99,5 @@ export { type CompletionCreateParamsStreaming, } from "openai/resources/index"; +// export export type { BaseLlmApi } from "./apis/base.js"; From 49b7e7c4e2ba4f6701eca6b30f7e9a88c3ffa327 Mon Sep 17 00:00:00 2001 From: tomasz-io Date: Tue, 10 Dec 2024 13:02:16 -0800 Subject: [PATCH 37/46] ci: use v4 cache --- .github/workflows/pr_checks.yaml | 37 ++++++++++++++++---------------- 1 file changed, 18 insertions(+), 19 deletions(-) diff --git a/.github/workflows/pr_checks.yaml b/.github/workflows/pr_checks.yaml index b4e0dd677..7c736c177 100644 --- a/.github/workflows/pr_checks.yaml +++ b/.github/workflows/pr_checks.yaml @@ -11,15 +11,14 @@ on: - ".github/workflows**" jobs: - install-root: - runs-on: ubuntu-latest + install-root:g steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: node-version-file: ".nvmrc" - - uses: actions/cache@v3 + - uses: actions/cache@v4 with: path: node_modules key: ${{ runner.os }}-root-node-modules-${{ hashFiles('package-lock.json') }} @@ -36,12 +35,12 @@ jobs: with: node-version-file: ".nvmrc" - - uses: actions/cache@v3 + - uses: actions/cache@v4 with: path: node_modules key: ${{ runner.os }}-root-node-modules-${{ hashFiles('package-lock.json') }} - - uses: actions/cache@v3 + - uses: actions/cache@v4 with: path: core/node_modules key: ${{ runner.os }}-core-node-modules-${{ hashFiles('core/package-lock.json') }} @@ -68,17 +67,17 @@ jobs: with: node-version-file: ".nvmrc" - - uses: actions/cache@v3 + - uses: actions/cache@v4 with: path: node_modules key: ${{ runner.os }}-root-node-modules-${{ hashFiles('package-lock.json') }} - - uses: actions/cache@v3 + - uses: actions/cache@v4 with: path: core/node_modules key: ${{ runner.os }}-core-node-modules-${{ hashFiles('core/package-lock.json') }} - - uses: actions/cache@v3 + - uses: actions/cache@v4 with: path: gui/node_modules key: ${{ runner.os }}-gui-node-modules-${{ hashFiles('gui/package-lock.json') }} @@ -102,17 +101,17 @@ jobs: with: node-version-file: ".nvmrc" - - uses: actions/cache@v3 + - uses: actions/cache@v4 with: path: node_modules key: ${{ runner.os }}-root-node-modules-${{ hashFiles('package-lock.json') }} - - uses: actions/cache@v3 + - uses: actions/cache@v4 with: path: core/node_modules key: ${{ runner.os }}-core-node-modules-${{ hashFiles('core/package-lock.json') }} - - uses: actions/cache@v3 + - uses: actions/cache@v4 with: path: binary/node_modules key: ${{ runner.os }}-binary-node-modules-${{ hashFiles('binary/package-lock.json') }} @@ -136,17 +135,17 @@ jobs: with: node-version-file: ".nvmrc" - - uses: actions/cache@v3 + - uses: actions/cache@v4 with: path: node_modules key: ${{ runner.os }}-root-node-modules-${{ hashFiles('package-lock.json') }} - - uses: actions/cache@v3 + - uses: actions/cache@v4 with: path: core/node_modules key: ${{ runner.os }}-core-node-modules-${{ hashFiles('core/package-lock.json') }} - - uses: actions/cache@v3 + - uses: actions/cache@v4 with: path: extensions/vscode/node_modules key: ${{ runner.os }}-vscode-node-modules-${{ hashFiles('extensions/vscode/package-lock.json') }} @@ -173,7 +172,7 @@ jobs: with: node-version-file: ".nvmrc" - - uses: actions/cache@v3 + - uses: actions/cache@v4 with: path: core/node_modules key: ${{ runner.os }}-core-node-modules-${{ hashFiles('core/package-lock.json') }} @@ -192,12 +191,12 @@ jobs: with: node-version-file: ".nvmrc" - - uses: actions/cache@v3 + - uses: actions/cache@v4 with: path: extensions/vscode/node_modules key: ${{ runner.os }}-vscode-node-modules-${{ hashFiles('extensions/vscode/package-lock.json') }} - - uses: actions/cache@v3 + - uses: actions/cache@v4 with: path: core/node_modules key: ${{ runner.os }}-core-node-modules-${{ hashFiles('core/package-lock.json') }} @@ -220,12 +219,12 @@ jobs: with: node-version-file: ".nvmrc" - - uses: actions/cache@v3 + - uses: actions/cache@v4 with: path: gui/node_modules key: ${{ runner.os }}-gui-node-modules-${{ hashFiles('gui/package-lock.json') }} - - uses: actions/cache@v3 + - uses: actions/cache@v4 with: path: core/node_modules key: ${{ runner.os }}-core-node-modules-${{ hashFiles('core/package-lock.json') }} From d24634363161d3b6c28a952d0a20fbefdb3cd041 Mon Sep 17 00:00:00 2001 From: tomasz-io Date: Tue, 10 Dec 2024 13:05:57 -0800 Subject: [PATCH 38/46] ci: run on each commit to main --- .github/workflows/pr_checks.yaml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pr_checks.yaml b/.github/workflows/pr_checks.yaml index 7c736c177..b796e9cf0 100644 --- a/.github/workflows/pr_checks.yaml +++ b/.github/workflows/pr_checks.yaml @@ -10,8 +10,17 @@ on: - "gui/**" - ".github/workflows**" + push: + branches: + - main + paths: + - "extensions/vscode/**" + - "core/**" + - "gui/**" + - ".github/workflows**" + jobs: - install-root:g + install-root: steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 From 3ecc89eaf55b970e1a494f88fed0850c4b85c565 Mon Sep 17 00:00:00 2001 From: tomasz-io Date: Tue, 10 Dec 2024 13:07:19 -0800 Subject: [PATCH 39/46] fix: path --- .github/workflows/pr_checks.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr_checks.yaml b/.github/workflows/pr_checks.yaml index b796e9cf0..90eab4812 100644 --- a/.github/workflows/pr_checks.yaml +++ b/.github/workflows/pr_checks.yaml @@ -8,7 +8,7 @@ on: - "extensions/vscode/**" - "core/**" - "gui/**" - - ".github/workflows**" + - ".github/workflows/**" push: branches: @@ -17,7 +17,7 @@ on: - "extensions/vscode/**" - "core/**" - "gui/**" - - ".github/workflows**" + - ".github/workflows/**" jobs: install-root: From 1ebd3a31bab5ed31374518022c5f1b7658c379f2 Mon Sep 17 00:00:00 2001 From: tomasz-io Date: Tue, 10 Dec 2024 13:08:24 -0800 Subject: [PATCH 40/46] fix: missing env --- .github/workflows/pr_checks.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pr_checks.yaml b/.github/workflows/pr_checks.yaml index 90eab4812..0b068565f 100644 --- a/.github/workflows/pr_checks.yaml +++ b/.github/workflows/pr_checks.yaml @@ -21,6 +21,7 @@ on: jobs: install-root: + runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 From 1d56217dca7adb6a11f3db6ea099059d04113945 Mon Sep 17 00:00:00 2001 From: tomasz-io Date: Tue, 10 Dec 2024 13:14:32 -0800 Subject: [PATCH 41/46] ci: revert actions on main --- .github/workflows/pr_checks.yaml | 9 --------- 1 file changed, 9 deletions(-) diff --git a/.github/workflows/pr_checks.yaml b/.github/workflows/pr_checks.yaml index 0b068565f..b30d9dddf 100644 --- a/.github/workflows/pr_checks.yaml +++ b/.github/workflows/pr_checks.yaml @@ -10,15 +10,6 @@ on: - "gui/**" - ".github/workflows/**" - push: - branches: - - main - paths: - - "extensions/vscode/**" - - "core/**" - - "gui/**" - - ".github/workflows/**" - jobs: install-root: runs-on: ubuntu-latest From 4cf69da2403f258a0b5e1d69a1dcdf1898bda0b6 Mon Sep 17 00:00:00 2001 From: tomasz-io Date: Tue, 10 Dec 2024 13:21:35 -0800 Subject: [PATCH 42/46] ci: conditional npm install --- .github/workflows/pr_checks.yaml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/pr_checks.yaml b/.github/workflows/pr_checks.yaml index b30d9dddf..cfe67c719 100644 --- a/.github/workflows/pr_checks.yaml +++ b/.github/workflows/pr_checks.yaml @@ -20,11 +20,13 @@ jobs: node-version-file: ".nvmrc" - uses: actions/cache@v4 + id: root-cache with: path: node_modules key: ${{ runner.os }}-root-node-modules-${{ hashFiles('package-lock.json') }} - name: Install root dependencies + if: steps.root-cache.outputs.cache-hit != 'true' run: npm ci core-checks: @@ -37,16 +39,19 @@ jobs: node-version-file: ".nvmrc" - uses: actions/cache@v4 + id: root-cache with: path: node_modules key: ${{ runner.os }}-root-node-modules-${{ hashFiles('package-lock.json') }} - uses: actions/cache@v4 + id: core-cache with: path: core/node_modules key: ${{ runner.os }}-core-node-modules-${{ hashFiles('core/package-lock.json') }} - name: Install core dependencies + if: steps.core-cache.outputs.cache-hit != 'true' run: | cd core npm ci @@ -79,11 +84,13 @@ jobs: key: ${{ runner.os }}-core-node-modules-${{ hashFiles('core/package-lock.json') }} - uses: actions/cache@v4 + id: gui-cache with: path: gui/node_modules key: ${{ runner.os }}-gui-node-modules-${{ hashFiles('gui/package-lock.json') }} - name: Install gui dependencies + if: steps.gui-cache.outputs.cache-hit != 'true' run: | cd gui npm ci @@ -113,11 +120,13 @@ jobs: key: ${{ runner.os }}-core-node-modules-${{ hashFiles('core/package-lock.json') }} - uses: actions/cache@v4 + id: binary-cache with: path: binary/node_modules key: ${{ runner.os }}-binary-node-modules-${{ hashFiles('binary/package-lock.json') }} - name: Install binary dependencies + if: steps.binary-cache.outputs.cache-hit != 'true' run: | cd binary npm ci @@ -147,11 +156,13 @@ jobs: key: ${{ runner.os }}-core-node-modules-${{ hashFiles('core/package-lock.json') }} - uses: actions/cache@v4 + id: vscode-cache with: path: extensions/vscode/node_modules key: ${{ runner.os }}-vscode-node-modules-${{ hashFiles('extensions/vscode/package-lock.json') }} - name: Install vscode dependencies + if: steps.vscode-cache.outputs.cache-hit != 'true' run: | cd extensions/vscode npm ci @@ -221,6 +232,7 @@ jobs: node-version-file: ".nvmrc" - uses: actions/cache@v4 + id: gui-cache with: path: gui/node_modules key: ${{ runner.os }}-gui-node-modules-${{ hashFiles('gui/package-lock.json') }} @@ -231,6 +243,7 @@ jobs: key: ${{ runner.os }}-core-node-modules-${{ hashFiles('core/package-lock.json') }} - name: Install GUI dependencies + if: steps.gui-cache.outputs.cache-hit != 'true' run: cd gui && npm ci env: GITHUB_TOKEN: ${{ secrets.CI_GITHUB_TOKEN }} From f0a04928ae371f007186aa3df43a0174ad6e2606 Mon Sep 17 00:00:00 2001 From: Test Date: Tue, 10 Dec 2024 13:26:45 -0800 Subject: [PATCH 43/46] bugfix: remove unused `node_modules` in binary --- binary/build.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/binary/build.js b/binary/build.js index 3afd1811a..e537ac67e 100644 --- a/binary/build.js +++ b/binary/build.js @@ -118,9 +118,6 @@ async function installNodeModuleInTempDirAndCopyToCurrent(packageName, toCopy) { } (async () => { - fs.mkdirSync("out/node_modules", { recursive: true }); - fs.mkdirSync("bin/node_modules", { recursive: true }); - console.log("[info] Downloading prebuilt lancedb..."); for (const target of targets) { if (targetToLanceDb[target]) { From 5a1bb2d36f1f52d6398d02c709500e7898913c6f Mon Sep 17 00:00:00 2001 From: Nate Date: Tue, 10 Dec 2024 13:39:35 -0800 Subject: [PATCH 44/46] hotfix for config without embeddings provider model name --- core/config/load.ts | 13 +++++++++++-- extensions/vscode/package-lock.json | 4 ++-- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/core/config/load.ts b/core/config/load.ts index b28734c46..9cd53e173 100644 --- a/core/config/load.ts +++ b/core/config/load.ts @@ -21,6 +21,7 @@ import { IdeSettings, IdeType, ILLM, + LLMOptions, ModelDescription, RerankerDescription, SerializedContinueConfig, @@ -454,8 +455,12 @@ async function intermediateToFinalConfig( ) { config.embeddingsProvider = new embeddingsProviderClass(); } else { + const llmOptions: LLMOptions = { + ...options, + model: "UNSPECIFIED", + }; config.embeddingsProvider = new embeddingsProviderClass( - options, + llmOptions, (url: string | URL, init: any) => fetchwithRequestOptions(url, init, { ...config.requestOptions, @@ -483,7 +488,11 @@ async function intermediateToFinalConfig( config.reranker = new LLMReranker(llm); } } else if (rerankerClass) { - config.reranker = new rerankerClass(params); + const llmOptions: LLMOptions = { + ...params, + model: "rerank-2", + }; + config.reranker = new rerankerClass(llmOptions); } } diff --git a/extensions/vscode/package-lock.json b/extensions/vscode/package-lock.json index c3d015969..73d13fd51 100644 --- a/extensions/vscode/package-lock.json +++ b/extensions/vscode/package-lock.json @@ -1,12 +1,12 @@ { "name": "continue", - "version": "0.9.248", + "version": "0.9.243", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "continue", - "version": "0.9.248", + "version": "0.9.243", "license": "Apache-2.0", "dependencies": { "@continuedev/fetch": "^1.0.3", From 1e90fe94b98818a8b267e1fda7a6cb4afbbcc58d Mon Sep 17 00:00:00 2001 From: Nate Date: Tue, 10 Dec 2024 17:35:06 -0800 Subject: [PATCH 45/46] fix groq undefined bug --- gui/src/pages/AddNewModel/configs/providers.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/gui/src/pages/AddNewModel/configs/providers.ts b/gui/src/pages/AddNewModel/configs/providers.ts index ed22bcbcd..a2ae69b13 100644 --- a/gui/src/pages/AddNewModel/configs/providers.ts +++ b/gui/src/pages/AddNewModel/configs/providers.ts @@ -312,7 +312,6 @@ Select the \`GPT-4o\` model below to complete your provider configuration, but n models.llama3170bChat, models.llama318bChat, { ...models.mixtralTrial, title: "Mixtral" }, - models.llama270bChat, { ...models.AUTODETECT, params: { From e6bdcfa7d1aef8d477c5a639b9562c32da72bea1 Mon Sep 17 00:00:00 2001 From: Nate Date: Tue, 10 Dec 2024 18:12:46 -0800 Subject: [PATCH 46/46] update changelog --- .changes/extensions/vscode/0.8.62.md | 6 ++++++ .changes/unreleased/Added-20241129-164631.yaml | 4 ---- .changes/unreleased/Added-20241129-164644.yaml | 4 ---- extensions/vscode/CHANGELOG.md | 4 +++- 4 files changed, 9 insertions(+), 9 deletions(-) create mode 100644 .changes/extensions/vscode/0.8.62.md delete mode 100644 .changes/unreleased/Added-20241129-164631.yaml delete mode 100644 .changes/unreleased/Added-20241129-164644.yaml diff --git a/.changes/extensions/vscode/0.8.62.md b/.changes/extensions/vscode/0.8.62.md new file mode 100644 index 000000000..c258fd285 --- /dev/null +++ b/.changes/extensions/vscode/0.8.62.md @@ -0,0 +1,6 @@ +## 0.8.62 - 2024-12-10 +### Added +* Tool use +* Support for Model Context Protocol +### Fixed +* hotfix: context providers no longer hidden when not in edit mode diff --git a/.changes/unreleased/Added-20241129-164631.yaml b/.changes/unreleased/Added-20241129-164631.yaml deleted file mode 100644 index cec797027..000000000 --- a/.changes/unreleased/Added-20241129-164631.yaml +++ /dev/null @@ -1,4 +0,0 @@ -project: extensions/vscode -kind: Added -body: Tool use -time: 2024-11-29T16:46:31.677532-08:00 diff --git a/.changes/unreleased/Added-20241129-164644.yaml b/.changes/unreleased/Added-20241129-164644.yaml deleted file mode 100644 index 7dfa427dd..000000000 --- a/.changes/unreleased/Added-20241129-164644.yaml +++ /dev/null @@ -1,4 +0,0 @@ -project: extensions/vscode -kind: Added -body: Support for Model Context Protocol -time: 2024-11-29T16:46:44.960691-08:00 diff --git a/extensions/vscode/CHANGELOG.md b/extensions/vscode/CHANGELOG.md index 8f6a1cd01..0a9868f14 100644 --- a/extensions/vscode/CHANGELOG.md +++ b/extensions/vscode/CHANGELOG.md @@ -5,10 +5,12 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html), and is generated by [Changie](https://github.com/miniscruff/changie). -Pre-release Changes +## 0.8.62 - 2024-12-10 ### Added * Tool use * Support for Model Context Protocol +### Fixed +* hotfix: context providers no longer hidden when not in edit mode ## 0.8.59 - 2024-11-25 ### Fixed