diff --git a/.vscode/launch.json b/.vscode/launch.json index c2a7f6318..4b89cbed9 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -70,7 +70,7 @@ ], "preLaunchTask": "vscode-extension:build", "env": { - "CONTROL_PLANE_ENV": "local" + // "CONTROL_PLANE_ENV": "local" } }, // Has to be run after starting the server (separately or using the compound configuration) diff --git a/binary/package-lock.json b/binary/package-lock.json index bafc0c421..078ccc165 100644 --- a/binary/package-lock.json +++ b/binary/package-lock.json @@ -82,6 +82,7 @@ "openai": "^4.20.1", "pg": "^8.11.3", "posthog-node": "^3.6.3", + "quick-lru": "^7.0.0", "replicate": "^0.26.0", "request": "^2.88.2", "socket.io-client": "^4.7.3", @@ -91,8 +92,9 @@ "tree-sitter-wasms": "^0.1.11", "uuid": "^9.0.1", "vectordb": "^0.4.20", - "web-tree-sitter": "^0.22.0", + "web-tree-sitter": "^0.21.0", "win-ca": "^3.5.1", + "workerpool": "^9.1.3", "yaml": "^2.4.2", "zod": "^3.23.8" }, diff --git a/core/core.ts b/core/core.ts index 780653ce5..1ae493aaf 100644 --- a/core/core.ts +++ b/core/core.ts @@ -294,7 +294,7 @@ export class Core { }); on("context/loadSubmenuItems", async (msg) => { const config = await this.config(); - const items = config.contextProviders + const items = await config.contextProviders ?.find((provider) => provider.description.title === msg.data.title) ?.loadSubmenuItems({ config, @@ -656,6 +656,7 @@ export class Core { on("didChangeSelectedProfile", (msg) => { this.configHandler.setSelectedProfile(msg.data.id); + this.configHandler.reloadConfig(); }); on("didChangeControlPlaneSessionInfo", async (msg) => { this.configHandler.updateControlPlaneSessionInfo(msg.data.sessionInfo); diff --git a/core/llm/countTokens.ts b/core/llm/countTokens.ts index acc923d33..5d042e3ca 100644 --- a/core/llm/countTokens.ts +++ b/core/llm/countTokens.ts @@ -1,10 +1,14 @@ import { Tiktoken, encodingForModel as _encodingForModel } from "js-tiktoken"; import { ChatMessage, MessageContent, MessagePart } from "../index.js"; +import { + AsyncEncoder, + GPTAsyncEncoder, + LlamaAsyncEncoder, +} from "./asyncEncoder.js"; import { autodetectTemplateType } from "./autodetect.js"; import { TOKEN_BUFFER_FOR_SAFETY } from "./constants.js"; -import llamaTokenizer from "./llamaTokenizer.js"; -import { AsyncEncoder, GPTAsyncEncoder, LlamaAsyncEncoder } from "./asyncEncoder.js"; import { stripImages } from "./images.js"; +import llamaTokenizer from "./llamaTokenizer.js"; interface Encoding { encode: Tiktoken["encode"]; decode: Tiktoken["decode"]; @@ -30,7 +34,8 @@ function asyncEncoderForModel(modelName: string): AsyncEncoder { if (!modelType || modelType === "none") { return gptAsyncEncoder; } - return llamaAsyncEncoder; + // Temporary due to issues packaging the worker files + return process.env.IS_BINARY ? gptAsyncEncoder : llamaAsyncEncoder; } function encodingForModel(modelName: string): Encoding { @@ -61,7 +66,7 @@ async function countTokensAsync( ): Promise { const encoding = asyncEncoderForModel(modelName); if (Array.isArray(content)) { - const promises = content.map(async part => { + const promises = content.map(async (part) => { if (part.type === "imageUrl") { return countImageTokens(part); } diff --git a/extensions/intellij/gradle.properties b/extensions/intellij/gradle.properties index d131d7c37..9356c4252 100644 --- a/extensions/intellij/gradle.properties +++ b/extensions/intellij/gradle.properties @@ -4,7 +4,7 @@ pluginGroup = com.github.continuedev.continueintellijextension pluginName = continue-intellij-extension pluginRepositoryUrl = https://github.com/continuedev/continue # SemVer format -> https://semver.org -pluginVersion = 0.0.56 +pluginVersion = 0.0.57 # Supported build number ranges and IntelliJ Platform versions -> https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html pluginSinceBuild = 223 diff --git a/extensions/vscode/package-lock.json b/extensions/vscode/package-lock.json index f637a56a9..d191d5500 100644 --- a/extensions/vscode/package-lock.json +++ b/extensions/vscode/package-lock.json @@ -1,12 +1,12 @@ { "name": "continue", - "version": "0.9.189", + "version": "0.9.191", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "continue", - "version": "0.9.189", + "version": "0.9.191", "license": "Apache-2.0", "dependencies": { "@electron/rebuild": "^3.2.10", diff --git a/extensions/vscode/package.json b/extensions/vscode/package.json index 9a31cfa07..46ae0d6ff 100644 --- a/extensions/vscode/package.json +++ b/extensions/vscode/package.json @@ -74,6 +74,11 @@ "default": true, "markdownDescription": "Continue collects anonymous usage data, cleaned of PII, to help us improve the product for our users. Read more at [continue.dev › Telemetry](https://docs.continue.dev/telemetry)." }, + "continue.enableContinueForTeamsBeta": { + "type": "boolean", + "default": false, + "markdownDescription": "Enable Continue for teams beta features (requires window reload)" + }, "continue.showInlineTip": { "type": "boolean", "default": true, diff --git a/extensions/vscode/src/ideProtocol.ts b/extensions/vscode/src/ideProtocol.ts index 968a85f4c..f20a8255c 100644 --- a/extensions/vscode/src/ideProtocol.ts +++ b/extensions/vscode/src/ideProtocol.ts @@ -20,7 +20,6 @@ import { editConfigJson, getConfigJsonPath, getContinueGlobalPath, - internalBetaPathExists, } from "core/util/paths"; import * as vscode from "vscode"; import { executeGotoProvider } from "./autocomplete/lsp"; @@ -523,7 +522,10 @@ class VsCodeIde implements IDE { 60, ), userToken: settings.get("userToken", ""), - enableControlServerBeta: internalBetaPathExists(), + enableControlServerBeta: settings.get( + "enableContinueForTeamsBeta", + false, + ), pauseCodebaseIndexOnStart: settings.get( "pauseCodebaseIndexOnStart", false,