From 1500281bb547f7308aa7316f6783072e4f81fbc1 Mon Sep 17 00:00:00 2001 From: Shawn Smith Date: Fri, 23 May 2025 06:35:53 +0000 Subject: [PATCH 001/118] feat: :bricks: Enable terminals for additional vscode Remote Host Types --- core/tools/implementations/runTerminalCommand.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/tools/implementations/runTerminalCommand.ts b/core/tools/implementations/runTerminalCommand.ts index cfe7ced9e..da69e3afe 100644 --- a/core/tools/implementations/runTerminalCommand.ts +++ b/core/tools/implementations/runTerminalCommand.ts @@ -7,13 +7,15 @@ import { isProcessBackgrounded, removeBackgroundedProcess } from "../../util/pro const asyncExec = util.promisify(childProcess.exec); +const ENABLED_FOR_REMOTES = ["","local","wsl","dev-container","devcontainer","ssh-remote","attached-container","codespaces","tunnel"]; + export const runTerminalCommandImpl: ToolImpl = async (args, extras) => { // Default to waiting for completion if not specified const waitForCompletion = args.waitForCompletion !== false; const ideInfo = await extras.ide.getIdeInfo(); const toolCallId = extras.toolCallId || ""; - if (ideInfo.remoteName === "local" || ideInfo.remoteName === "") { + if (ENABLED_FOR_REMOTES.includes(ideInfo.remoteName)) { // For streaming output if (extras.onPartialOutput) { return new Promise((resolve, reject) => { From 6e2d847e9589e3775747ecfdb8e8365d8455b332 Mon Sep 17 00:00:00 2001 From: Nate Date: Sat, 24 May 2025 10:59:24 -0700 Subject: [PATCH 002/118] use OpenAI client for Azure in openai-adapters --- packages/openai-adapters/package-lock.json | 130 +-------- packages/openai-adapters/package.json | 1 - .../openai-adapters/src/apis/AzureOpenAI.ts | 274 ------------------ packages/openai-adapters/src/apis/OpenAI.ts | 8 +- packages/openai-adapters/src/index.ts | 4 +- 5 files changed, 9 insertions(+), 408 deletions(-) delete mode 100644 packages/openai-adapters/src/apis/AzureOpenAI.ts diff --git a/packages/openai-adapters/package-lock.json b/packages/openai-adapters/package-lock.json index c069bf45e..52676f3fa 100644 --- a/packages/openai-adapters/package-lock.json +++ b/packages/openai-adapters/package-lock.json @@ -1,15 +1,14 @@ { "name": "@continuedev/openai-adapters", - "version": "1.0.21", + "version": "1.0.26", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@continuedev/openai-adapters", - "version": "1.0.21", + "version": "1.0.26", "license": "Apache-2.0", "dependencies": { - "@azure/openai": "^1.0.0-beta.12", "@continuedev/config-types": "^1.0.5", "@continuedev/config-yaml": "^1.0.51", "@continuedev/fetch": "^1.0.3", @@ -43,126 +42,6 @@ "node": ">=6.0.0" } }, - "node_modules/@azure-rest/core-client": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@azure-rest/core-client/-/core-client-1.4.0.tgz", - "integrity": "sha512-ozTDPBVUDR5eOnMIwhggbnVmOrka4fXCs8n8mvUo4WLLc38kki6bAOByDoVZZPz/pZy2jMt2kwfpvy/UjALj6w==", - "dependencies": { - "@azure/abort-controller": "^2.0.0", - "@azure/core-auth": "^1.3.0", - "@azure/core-rest-pipeline": "^1.5.0", - "@azure/core-tracing": "^1.0.1", - "@azure/core-util": "^1.0.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@azure/abort-controller": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/@azure/abort-controller/-/abort-controller-2.1.2.tgz", - "integrity": "sha512-nBrLsEWm4J2u5LpAPjxADTlq3trDgVZZXHNKabeXZtpq3d3AbN/KGO82R87rdDz5/lYB024rtEf10/q0urNgsA==", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@azure/core-auth": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/@azure/core-auth/-/core-auth-1.7.2.tgz", - "integrity": "sha512-Igm/S3fDYmnMq1uKS38Ae1/m37B3zigdlZw+kocwEhh5GjyKjPrXKO2J6rzpC1wAxrNil/jX9BJRqBshyjnF3g==", - "dependencies": { - "@azure/abort-controller": "^2.0.0", - "@azure/core-util": "^1.1.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@azure/core-rest-pipeline": { - "version": "1.16.2", - "resolved": "https://registry.npmjs.org/@azure/core-rest-pipeline/-/core-rest-pipeline-1.16.2.tgz", - "integrity": "sha512-Hnhm/PG9/SQ07JJyLDv3l9Qr8V3xgAe1hFoBYzt6LaalMxfL/ZqFaZf/bz5VN3pMcleCPwl8ivlS2Fjxq/iC8Q==", - "dependencies": { - "@azure/abort-controller": "^2.0.0", - "@azure/core-auth": "^1.4.0", - "@azure/core-tracing": "^1.0.1", - "@azure/core-util": "^1.9.0", - "@azure/logger": "^1.0.0", - "http-proxy-agent": "^7.0.0", - "https-proxy-agent": "^7.0.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@azure/core-sse": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/@azure/core-sse/-/core-sse-2.1.2.tgz", - "integrity": "sha512-yf+pFIu8yCzXu9RbH2+8kp9vITIKJLHgkLgFNA6hxiDHK3fxeP596cHUj4c8Cm8JlooaUnYdHmF84KCZt3jbmw==", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@azure/core-tracing": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@azure/core-tracing/-/core-tracing-1.1.2.tgz", - "integrity": "sha512-dawW9ifvWAWmUm9/h+/UQ2jrdvjCJ7VJEuCJ6XVNudzcOwm53BFZH4Q845vjfgoUAM8ZxokvVNxNxAITc502YA==", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@azure/core-util": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/@azure/core-util/-/core-util-1.9.1.tgz", - "integrity": "sha512-OLsq0etbHO1MA7j6FouXFghuHrAFGk+5C1imcpQ2e+0oZhYF07WLA+NW2Vqs70R7d+zOAWiWM3tbE1sXcDN66g==", - "dependencies": { - "@azure/abort-controller": "^2.0.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@azure/logger": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@azure/logger/-/logger-1.1.3.tgz", - "integrity": "sha512-J8/cIKNQB1Fc9fuYqBVnrppiUtW+5WWJPCj/tAokC5LdSTwkWWttN+jsRgw9BLYD7JDBx7PceiqOBxJJ1tQz3Q==", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@azure/openai": { - "version": "1.0.0-beta.12", - "resolved": "https://registry.npmjs.org/@azure/openai/-/openai-1.0.0-beta.12.tgz", - "integrity": "sha512-qKblxr6oVa8GsyNzY+/Ub9VmEsPYKhBrUrPaNEQiM+qrxnBPVm9kaeqGFFb/U78Q2zOabmhF9ctYt3xBW0nWnQ==", - "dependencies": { - "@azure-rest/core-client": "^1.1.7", - "@azure/core-auth": "^1.4.0", - "@azure/core-rest-pipeline": "^1.13.0", - "@azure/core-sse": "^2.0.0", - "@azure/core-util": "^1.4.0", - "@azure/logger": "^1.0.3", - "tslib": "^2.4.0" - }, - "engines": { - "node": ">=18.0.0" - } - }, "node_modules/@babel/code-frame": { "version": "7.24.7", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.7.tgz", @@ -4271,11 +4150,6 @@ } } }, - "node_modules/tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" - }, "node_modules/type-detect": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", diff --git a/packages/openai-adapters/package.json b/packages/openai-adapters/package.json index 966f5a858..4a630e2c7 100644 --- a/packages/openai-adapters/package.json +++ b/packages/openai-adapters/package.json @@ -12,7 +12,6 @@ "author": "Nate Sesti and Ty Dunn", "license": "Apache-2.0", "dependencies": { - "@azure/openai": "^1.0.0-beta.12", "@continuedev/config-types": "^1.0.5", "@continuedev/config-yaml": "^1.0.51", "@continuedev/fetch": "^1.0.3", diff --git a/packages/openai-adapters/src/apis/AzureOpenAI.ts b/packages/openai-adapters/src/apis/AzureOpenAI.ts deleted file mode 100644 index fc9fbdda8..000000000 --- a/packages/openai-adapters/src/apis/AzureOpenAI.ts +++ /dev/null @@ -1,274 +0,0 @@ -import { AzureKeyCredential, OpenAIClient } from "@azure/openai"; - -import dotenv from "dotenv"; -import { - Completion, - CompletionCreateParamsNonStreaming, - CompletionCreateParamsStreaming, -} from "openai/resources/completions.js"; -import { - ChatCompletion, - ChatCompletionChunk, - ChatCompletionCreateParamsNonStreaming, - ChatCompletionCreateParamsStreaming, - CreateEmbeddingResponse, - EmbeddingCreateParams, - Model, -} from "openai/resources/index.js"; -import { AzureConfig } from "../types.js"; -import { embedding } from "../util.js"; -import { - BaseLlmApi, - CreateRerankResponse, - FimCreateParamsStreaming, - RerankCreateParams, -} from "./base.js"; - -dotenv.config(); - -const HTTPS_PROXY = process.env.HTTPS_PROXY; -const HTTP_PROXY = process.env.HTTP_PROXY; - -const MS_TOKEN = 30; - -export class AzureOpenAIApi implements BaseLlmApi { - private client: OpenAIClient; - - constructor(private config: AzureConfig) { - let proxyOptions; - const PROXY = HTTPS_PROXY ?? HTTP_PROXY; - if (PROXY) { - const url = new URL(PROXY); - proxyOptions = { - host: (url.protocol ? url.protocol + "//" : "") + url.hostname, - port: Number(url.port || 80), - username: url.username, - password: url.password, - }; - } - - if (!config.apiBase || !config.apiKey) { - throw new Error("Azure OpenAI API requires apiBase and apiKey"); - } - - this.client = new OpenAIClient( - config.apiBase, - new AzureKeyCredential(config.apiKey), - { - proxyOptions, - }, - ); - } - - private _bodyToOptions( - body: - | ChatCompletionCreateParamsStreaming - | ChatCompletionCreateParamsNonStreaming, - signal: AbortSignal, - ) { - return { - maxTokens: body.max_tokens ?? undefined, - temperature: body.temperature ?? undefined, - topP: body.top_p ?? undefined, - frequencyPenalty: body.frequency_penalty ?? undefined, - presencePenalty: body.presence_penalty ?? undefined, - stop: - typeof body.stop === "string" ? [body.stop] : (body.stop ?? undefined), - abortSignal: signal, - }; - } - - async chatCompletionNonStream( - body: ChatCompletionCreateParamsNonStreaming, - signal: AbortSignal, - ): Promise { - const completion = await this.client.getChatCompletions( - body.model, - body.messages, - this._bodyToOptions(body, signal), - ); - return { - ...completion, - object: "chat.completion", - model: body.model, - created: completion.created.getTime(), - usage: completion.usage - ? { - total_tokens: completion.usage.totalTokens, - completion_tokens: completion.usage.completionTokens, - prompt_tokens: completion.usage.promptTokens, - } - : undefined, - choices: completion.choices.map((choice) => ({ - ...choice, - logprobs: null, - finish_reason: "stop", - message: { - role: "assistant", - content: choice.message?.content ?? null, - refusal: null, - }, - })), - }; - } - async *chatCompletionStream( - body: ChatCompletionCreateParamsStreaming, - signal: AbortSignal, - ): AsyncGenerator { - const events = await this.client.streamChatCompletions( - body.model, - body.messages, - this._bodyToOptions(body, signal), - ); - - const eventBuffer: ChatCompletionChunk[] = []; - let done = false; - let tokensOutput = 0; - const ms = MS_TOKEN; - (async () => { - for await (const event of events) { - eventBuffer.push({ - ...event, - object: "chat.completion.chunk", - model: body.model, - created: event.created.getTime(), - choices: event.choices.map((choice: any) => ({ - ...choice, - logprobs: undefined, - finish_reason: null, - delta: { - role: (choice.delta?.role as any) ?? "assistant", - content: choice.delta?.content ?? "", - }, - })), - usage: undefined, - }); - } - done = true; - })(); - - while (!done) { - if (eventBuffer.length > 0) { - const event = eventBuffer.shift()!; - yield event; - tokensOutput += event.choices[0]?.delta.content?.length ?? 0; - } else { - await new Promise((resolve) => setTimeout(resolve, 5)); - continue; - } - - if (tokensOutput < 100 && eventBuffer.length > 30) { - await new Promise((resolve) => setTimeout(resolve, ms / 3)); - } else if (eventBuffer.length < 12) { - await new Promise((resolve) => - setTimeout(resolve, ms + 20 * (12 - eventBuffer.length)), - ); - } else if (eventBuffer.length > 40) { - await new Promise((resolve) => setTimeout(resolve, ms / 2)); - } else { - // await new Promise((resolve) => setTimeout(resolve, Math.max(25, 50 - 2 * eventBuffer.length))); - await new Promise((resolve) => setTimeout(resolve, ms)); - } - } - - for (const event of eventBuffer) yield event; - } - async completionNonStream( - body: CompletionCreateParamsNonStreaming, - signal: AbortSignal, - ): Promise { - const { prompt, logprobs, ...restOfBody } = body; - const messages = [ - { - role: "user" as any, - content: prompt as any, - }, - ]; - const resp = await this.chatCompletionNonStream( - { - messages, - ...restOfBody, - }, - signal, - ); - return { - ...resp, - object: "text_completion", - choices: resp.choices.map((choice) => ({ - ...choice, - text: choice.message.content ?? "", - finish_reason: "stop", - logprobs: null, - })), - }; - } - async *completionStream( - body: CompletionCreateParamsStreaming, - signal: AbortSignal, - ): AsyncGenerator { - const { prompt, logprobs, ...restOfBody } = body; - const messages = [ - { - role: "user" as any, - content: prompt as any, - }, - ]; - for await (const event of this.chatCompletionStream( - { - messages, - ...restOfBody, - }, - signal, - )) { - yield { - ...event, - object: "text_completion", - usage: { - completion_tokens: event.usage?.completion_tokens ?? 0, - prompt_tokens: event.usage?.prompt_tokens ?? 0, - total_tokens: event.usage?.total_tokens ?? 0, - }, - choices: event.choices.map((choice) => ({ - ...choice, - text: choice.delta.content ?? "", - finish_reason: "stop", - logprobs: null, - })), - }; - } - } - fimStream( - body: FimCreateParamsStreaming, - ): AsyncGenerator { - throw new Error( - "Azure OpenAI does not support fill-in-the-middle (FIM) completions.", - ); - } - - async embed(body: EmbeddingCreateParams): Promise { - const input = typeof body.input === "string" ? [body.input] : body.input; - const response = await this.client.getEmbeddings(body.model, input as any, { - dimensions: body.dimensions, - model: body.model, - }); - - const output = embedding({ - data: response.data.map((item) => item.embedding), - model: body.model, - usage: { - prompt_tokens: response.usage.promptTokens, - total_tokens: response.usage.totalTokens, - }, - }); - - return output; - } - - async rerank(body: RerankCreateParams): Promise { - throw new Error("Azure OpenAI does not support reranking."); - } - - list(): Promise { - throw new Error("Method not implemented."); - } -} diff --git a/packages/openai-adapters/src/apis/OpenAI.ts b/packages/openai-adapters/src/apis/OpenAI.ts index 745b94186..616a9a5f3 100644 --- a/packages/openai-adapters/src/apis/OpenAI.ts +++ b/packages/openai-adapters/src/apis/OpenAI.ts @@ -12,7 +12,7 @@ import { Model, } from "openai/resources/index"; import { z } from "zod"; -import { OpenAIConfigSchema } from "../types.js"; +import { AzureConfigSchema, OpenAIConfigSchema } from "../types.js"; import { customFetch } from "../util.js"; import { BaseLlmApi, @@ -25,7 +25,11 @@ export class OpenAIApi implements BaseLlmApi { openai: OpenAI; apiBase: string = "https://api.openai.com/v1/"; - constructor(protected config: z.infer) { + constructor( + protected config: z.infer< + typeof OpenAIConfigSchema | typeof AzureConfigSchema + >, + ) { this.apiBase = config.apiBase ?? this.apiBase; this.openai = new OpenAI({ apiKey: config.apiKey, diff --git a/packages/openai-adapters/src/index.ts b/packages/openai-adapters/src/index.ts index eea617cf7..75f2b4fef 100644 --- a/packages/openai-adapters/src/index.ts +++ b/packages/openai-adapters/src/index.ts @@ -1,7 +1,6 @@ import dotenv from "dotenv"; import { z } from "zod"; import { AnthropicApi } from "./apis/Anthropic.js"; -import { AzureOpenAIApi } from "./apis/AzureOpenAI.js"; import { CohereApi } from "./apis/Cohere.js"; import { DeepSeekApi } from "./apis/DeepSeek.js"; import { GeminiApi } from "./apis/Gemini.js"; @@ -30,9 +29,8 @@ function openAICompatible( export function constructLlmApi(config: LLMConfig): BaseLlmApi | undefined { switch (config.provider) { case "openai": - return new OpenAIApi(config); case "azure": - return new AzureOpenAIApi(config); + return new OpenAIApi(config); case "cohere": return new CohereApi(config); case "anthropic": From 53f4312b89f6fe109cb2491b4e1ad307b5c10078 Mon Sep 17 00:00:00 2001 From: Nate Date: Sat, 24 May 2025 11:01:45 -0700 Subject: [PATCH 003/118] bump --- packages/openai-adapters/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/openai-adapters/package.json b/packages/openai-adapters/package.json index 4a630e2c7..9d0dcb4b0 100644 --- a/packages/openai-adapters/package.json +++ b/packages/openai-adapters/package.json @@ -1,6 +1,6 @@ { "name": "@continuedev/openai-adapters", - "version": "1.0.26", + "version": "1.0.27", "description": "", "main": "dist/index.js", "types": "dist/index.d.ts", From 837ee0181686a124449a95c1b2aebe6f10f256cd Mon Sep 17 00:00:00 2001 From: Nate Date: Sat, 24 May 2025 12:57:48 -0700 Subject: [PATCH 004/118] bump again --- packages/openai-adapters/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/openai-adapters/package.json b/packages/openai-adapters/package.json index 9d0dcb4b0..1b3aaa28f 100644 --- a/packages/openai-adapters/package.json +++ b/packages/openai-adapters/package.json @@ -1,6 +1,6 @@ { "name": "@continuedev/openai-adapters", - "version": "1.0.27", + "version": "1.0.28", "description": "", "main": "dist/index.js", "types": "dist/index.d.ts", From a2df09eda2267cc06d9b40d785706f0466d17ed1 Mon Sep 17 00:00:00 2001 From: Nate Date: Sat, 24 May 2025 13:53:58 -0700 Subject: [PATCH 005/118] fix watsonx zen-api-key --- packages/openai-adapters/package.json | 2 +- packages/openai-adapters/src/apis/WatsonX.ts | 18 ++++++++++-------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/packages/openai-adapters/package.json b/packages/openai-adapters/package.json index 1b3aaa28f..ea6966fa9 100644 --- a/packages/openai-adapters/package.json +++ b/packages/openai-adapters/package.json @@ -1,6 +1,6 @@ { "name": "@continuedev/openai-adapters", - "version": "1.0.28", + "version": "1.0.29", "description": "", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/packages/openai-adapters/src/apis/WatsonX.ts b/packages/openai-adapters/src/apis/WatsonX.ts index 3962662d2..cfb8ccc2e 100644 --- a/packages/openai-adapters/src/apis/WatsonX.ts +++ b/packages/openai-adapters/src/apis/WatsonX.ts @@ -35,14 +35,6 @@ export class WatsonXApi implements BaseLlmApi { this.deploymentId = config.env.deploymentId; } - private async getHeaders(): Promise> { - const bearer = await this.getBearerToken(); - return { - "Content-Type": "application/json", - Authorization: `Bearer ${bearer.token}`, - }; - } - async getBearerToken(): Promise<{ token: string; expiration: number }> { if (this.apiBase?.includes("cloud.ibm.com")) { // watsonx SaaS @@ -153,6 +145,16 @@ export class WatsonXApi implements BaseLlmApi { return payload; } + private async getHeaders(): Promise> { + const bearer = await this.getBearerToken(); + const isZenApiKey = bearer.expiration === -1; + + return { + "Content-Type": "application/json", + Authorization: `${isZenApiKey ? "ZenApiKey" : "Bearer"} ${bearer.token}`, + }; + } + async chatCompletionNonStream( body: ChatCompletionCreateParamsNonStreaming, signal: AbortSignal, From 1e2692646267630915f05af1efaae1961dab8ae9 Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Mon, 26 May 2025 16:42:21 -0700 Subject: [PATCH 006/118] inception provider --- extensions/vscode/config_schema.json | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/extensions/vscode/config_schema.json b/extensions/vscode/config_schema.json index fde20fbb2..4f67ed26b 100644 --- a/extensions/vscode/config_schema.json +++ b/extensions/vscode/config_schema.json @@ -233,7 +233,8 @@ "relace", "morph", "ovhcloud", - "venice" + "venice", + "inception" ], "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)", @@ -283,7 +284,8 @@ "### Relace\n Relace provides a fast apply model. To get started, obtain an API key from [here](https://app.relace.ai/settings/api-keys).", "### Morph\nMorph provides a fast apply model. To get started, obtain an API key from [here](https://morphllm.com/dashboard).", "### OVHcloud AI Endpoints is a serverless inference API that provides access to a curated selection of models (e.g., Llama, Mistral, Qwen, Deepseek). It is designed with security and data privacy in mind and is compliant with GDPR. To get started, create an API key on the OVHcloud [AI Endpoints website](https://endpoints.ai.cloud.ovh.net/). For more information, including pricing, visit the OVHcloud [AI Endpoints product page](https://www.ovhcloud.com/en/public-cloud/ai-endpoints/).", - "### Venice\n Venice.AI is a privacy-focused generative AI platform, allowing users to interact with open-source LLMs without storing any private user data.\nHosted models support the OpenAI API standard, providing seamless integration for users seeking privacy and flexibility.\nTo get started with the Venice API, either purchase a pro account, stake $VVV for daily inference allotments, or fund your account with USD.\nVisit the [API settings page](https://venice.ai/settings/api) or learn more at the [Venice API documentation](https://venice.ai/api)." + "### Venice\n Venice.AI is a privacy-focused generative AI platform, allowing users to interact with open-source LLMs without storing any private user data.\nHosted models support the OpenAI API standard, providing seamless integration for users seeking privacy and flexibility.\nTo get started with the Venice API, either purchase a pro account, stake $VVV for daily inference allotments, or fund your account with USD.\nVisit the [API settings page](https://venice.ai/settings/api) or learn more at the [Venice API documentation](https://venice.ai/api).", + "### Inception\n Inception Labs offer a new generation of diffusion-based LLMs.\nVisit the [API settings page](https://platform.inceptionlabs.ai/) or learn more at the [Inception docs](https://platform.inceptionlabs.ai/docs)." ], "type": "string" }, @@ -1515,7 +1517,11 @@ "then": { "properties": { "model": { - "enum": ["llama3.1-8b", "llama3.1-70b", "llama-4-scout-17b-16e-instruct"] + "enum": [ + "llama3.1-8b", + "llama3.1-70b", + "llama-4-scout-17b-16e-instruct" + ] } } } From 2df6708606b9008c516b0a972561a9430bbeb93a Mon Sep 17 00:00:00 2001 From: Nate Date: Tue, 27 May 2025 17:50:58 -0700 Subject: [PATCH 007/118] always show active file in input toolbar, not codebase --- extensions/vscode/package-lock.json | 6 +-- gui/src/components/mainInput/InputToolbar.tsx | 50 ++++++++----------- 2 files changed, 24 insertions(+), 32 deletions(-) diff --git a/extensions/vscode/package-lock.json b/extensions/vscode/package-lock.json index 5634027da..f2db4b382 100644 --- a/extensions/vscode/package-lock.json +++ b/extensions/vscode/package-lock.json @@ -1,12 +1,12 @@ { "name": "continue", - "version": "1.1.39", + "version": "1.1.40", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "continue", - "version": "1.1.39", + "version": "1.1.40", "license": "Apache-2.0", "dependencies": { "@continuedev/config-types": "^1.0.14", @@ -110,7 +110,7 @@ "@continuedev/fetch": "^1.0.10", "@continuedev/llm-info": "^1.0.8", "@continuedev/openai-adapters": "^1.0.25", - "@modelcontextprotocol/sdk": "^1.5.0", + "@modelcontextprotocol/sdk": "^1.12.0", "@mozilla/readability": "^0.5.0", "@octokit/rest": "^20.1.1", "@typescript-eslint/eslint-plugin": "^7.8.0", diff --git a/gui/src/components/mainInput/InputToolbar.tsx b/gui/src/components/mainInput/InputToolbar.tsx index fe3cd83f0..23d242ae2 100644 --- a/gui/src/components/mainInput/InputToolbar.tsx +++ b/gui/src/components/mainInput/InputToolbar.tsx @@ -11,11 +11,7 @@ import { } from "../../redux/selectors/selectCurrentToolCall"; import { selectSelectedChatModel } from "../../redux/slices/configSlice"; import { exitEdit } from "../../redux/thunks/edit"; -import { - getAltKeyLabel, - getMetaKeyLabel, - isMetaEquivalentKeyPressed, -} from "../../util"; +import { getAltKeyLabel, isMetaEquivalentKeyPressed } from "../../util"; import { ToolTip } from "../gui/Tooltip"; import ModelSelect from "../modelSelection/ModelSelect"; import { ModeSelect } from "../ModeSelect"; @@ -160,32 +156,28 @@ function InputToolbar(props: InputToolbarProps) { )} - {isInEdit && ( Date: Wed, 28 May 2025 15:22:18 -0700 Subject: [PATCH 008/118] bump openai-adapters' version of fetch --- packages/openai-adapters/package-lock.json | 21 +++++++++++++++++++-- packages/openai-adapters/package.json | 1 + 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/packages/openai-adapters/package-lock.json b/packages/openai-adapters/package-lock.json index 4eac677b3..dd1d75796 100644 --- a/packages/openai-adapters/package-lock.json +++ b/packages/openai-adapters/package-lock.json @@ -1,18 +1,19 @@ { "name": "@continuedev/openai-adapters", - "version": "1.0.22", + "version": "1.0.26", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@continuedev/openai-adapters", - "version": "1.0.22", + "version": "1.0.26", "license": "Apache-2.0", "dependencies": { "@azure/openai": "^1.0.0-beta.12", "@continuedev/config-types": "^1.0.5", "@continuedev/config-yaml": "^1.0.51", "@continuedev/fetch": "^1.0.10", + "@continuedev/openai-adapters": "^1.0.29", "dotenv": "^16.5.0", "json-schema": "^0.4.0", "node-fetch": "^3.3.2", @@ -727,6 +728,22 @@ "node-fetch": "^3.3.2" } }, + "node_modules/@continuedev/openai-adapters": { + "version": "1.0.29", + "resolved": "https://registry.npmjs.org/@continuedev/openai-adapters/-/openai-adapters-1.0.29.tgz", + "integrity": "sha512-WWdueNpeKNN8WtE+5BM4zMMB0ZAXEwCHEd5QChCAq59KiiLHvPosZoWE18pIhmUddVVyO1xRT1K3xGWd3qHwhg==", + "dependencies": { + "@continuedev/config-types": "^1.0.5", + "@continuedev/config-yaml": "^1.0.51", + "@continuedev/fetch": "^1.0.3", + "dotenv": "^16.5.0", + "json-schema": "^0.4.0", + "node-fetch": "^3.3.2", + "openai": "^4.76.0", + "uuid": "^11.1.0", + "zod": "^3.24.2" + } + }, "node_modules/@cspotcode/source-map-support": { "version": "0.8.1", "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", diff --git a/packages/openai-adapters/package.json b/packages/openai-adapters/package.json index ca4e60a12..8520560ab 100644 --- a/packages/openai-adapters/package.json +++ b/packages/openai-adapters/package.json @@ -16,6 +16,7 @@ "@continuedev/config-types": "^1.0.5", "@continuedev/config-yaml": "^1.0.51", "@continuedev/fetch": "^1.0.10", + "@continuedev/openai-adapters": "^1.0.29", "dotenv": "^16.5.0", "json-schema": "^0.4.0", "node-fetch": "^3.3.2", From 2623f90b45e8f1f41ab60eca1c08c8a2c2bdb77e Mon Sep 17 00:00:00 2001 From: Nate Date: Wed, 28 May 2025 17:25:19 -0700 Subject: [PATCH 009/118] add *.notes.md to .gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 3f3671e74..c40a9558d 100644 --- a/.gitignore +++ b/.gitignore @@ -145,6 +145,7 @@ Icon? .aider* notes.md +*.notes.md manual-testing-sandbox/.idea/** manual-testing-sandbox/.continue/** From a8cfddd3c8b45366459f4bd1dd1e4b539b6c71aa Mon Sep 17 00:00:00 2001 From: Nate Date: Wed, 28 May 2025 18:15:38 -0700 Subject: [PATCH 010/118] in OpenAI-adapters, use only username, api_key auth --- packages/openai-adapters/src/apis/WatsonX.ts | 114 ++++++++++++------- packages/openai-adapters/src/types.ts | 1 + 2 files changed, 74 insertions(+), 41 deletions(-) diff --git a/packages/openai-adapters/src/apis/WatsonX.ts b/packages/openai-adapters/src/apis/WatsonX.ts index 3962662d2..bcfc4cb9c 100644 --- a/packages/openai-adapters/src/apis/WatsonX.ts +++ b/packages/openai-adapters/src/apis/WatsonX.ts @@ -64,48 +64,80 @@ export class WatsonXApi implements BaseLlmApi { }; } else { // watsonx Software - if (!this.config.apiKey?.includes(":")) { - // Using ZenApiKey auth - return { - token: this.config.apiKey ?? "", - expiration: -1, - }; - } else { - // Using username/password auth - const userPass = this.config.apiKey?.split(":"); - const wxToken = (await ( - await customFetch(this.config.requestOptions)( - `${this.apiBase}/icp4d-api/v1/authorize`, - { - method: "POST", - headers: { - "Content-Type": "application/json", - Accept: "application/json", - }, - body: JSON.stringify({ - username: userPass[0], - password: userPass[1], - }), + // if (this.config.env.bearerTokenRequired) { + // In certain WatsonX environments, ZenApiKey authentication is disabled, + // and it's necessary to call this endpoint with username+api_key to get a bearer token. + // See the docs: https://www.ibm.com/docs/en/watsonx/w-and-w/2.1.0?topic=keys-generating-bearer-token + // Ask @sestinj why the rest is commented out. + const base64Decoded = Buffer.from( + this.config.apiKey ?? "", + "base64", + ).toString(); + const [username, api_key] = base64Decoded.split(":"); + + const wxToken = (await ( + await customFetch(this.config.requestOptions)( + `${this.apiBase}/icp4d-api/v1/authorize`, + { + method: "POST", + headers: { + "Content-Type": "application/json", + Accept: "application/json", }, - ) - ).json()) as any; - const wxTokenExpiry = (await ( - await customFetch(this.config.requestOptions)( - `${this.apiBase}/usermgmt/v1/user/tokenExpiry`, - { - method: "GET", - headers: { - Accept: "application/json", - Authorization: `Bearer ${wxToken["token"]}`, - }, - }, - ) - ).json()) as any; - return { - token: wxToken["token"], - expiration: wxTokenExpiry["exp"], - }; - } + body: JSON.stringify({ + username, + api_key, + }), + }, + ) + ).json()) as any; + + return { + token: wxToken["access_token"], + expiration: 0, + }; + // } else if (!this.config.apiKey?.includes(":")) { + // // Using ZenApiKey auth + // return { + // token: this.config.apiKey ?? "", + // expiration: -1, + // }; + // } else { + // // Using username/password auth + // const userPass = this.config.apiKey?.split(":"); + // const wxToken = (await ( + // await customFetch(this.config.requestOptions)( + // `${this.apiBase}/icp4d-api/v1/authorize`, + // { + // method: "POST", + // headers: { + // "Content-Type": "application/json", + // Accept: "application/json", + // }, + // body: JSON.stringify({ + // username: userPass[0], + // password: userPass[1], + // }), + // }, + // ) + // ).json()) as any; + // const wxTokenExpiry = (await ( + // await customFetch(this.config.requestOptions)( + // `${this.apiBase}/usermgmt/v1/user/tokenExpiry`, + // { + // method: "GET", + // headers: { + // Accept: "application/json", + // Authorization: `Bearer ${wxToken["token"]}`, + // }, + // }, + // ) + // ).json()) as any; + // return { + // token: wxToken["token"], + // expiration: wxTokenExpiry["exp"], + // }; + // } } } diff --git a/packages/openai-adapters/src/types.ts b/packages/openai-adapters/src/types.ts index fd7ad94db..cb352b241 100644 --- a/packages/openai-adapters/src/types.ts +++ b/packages/openai-adapters/src/types.ts @@ -106,6 +106,7 @@ export const WatsonXConfigSchema = BasePlusConfig.extend({ apiVersion: z.string().optional(), projectId: z.string().optional(), deploymentId: z.string().optional(), + bearerTokenRequired: z.boolean().optional(), }), }); export type WatsonXConfig = z.infer; From fa8c84dfd60437bb9af8a4ed38281d0fb23ba878 Mon Sep 17 00:00:00 2001 From: Nate Date: Wed, 28 May 2025 18:25:46 -0700 Subject: [PATCH 011/118] bump openai-adapters --- packages/openai-adapters/package-lock.json | 25 ++++------------------ packages/openai-adapters/package.json | 5 ++--- 2 files changed, 6 insertions(+), 24 deletions(-) diff --git a/packages/openai-adapters/package-lock.json b/packages/openai-adapters/package-lock.json index dd1d75796..55d116280 100644 --- a/packages/openai-adapters/package-lock.json +++ b/packages/openai-adapters/package-lock.json @@ -12,8 +12,7 @@ "@azure/openai": "^1.0.0-beta.12", "@continuedev/config-types": "^1.0.5", "@continuedev/config-yaml": "^1.0.51", - "@continuedev/fetch": "^1.0.10", - "@continuedev/openai-adapters": "^1.0.29", + "@continuedev/fetch": "^1.0.11", "dotenv": "^16.5.0", "json-schema": "^0.4.0", "node-fetch": "^3.3.2", @@ -717,9 +716,9 @@ } }, "node_modules/@continuedev/fetch": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/@continuedev/fetch/-/fetch-1.0.10.tgz", - "integrity": "sha512-RBUXtm/VDz+9Itgw+CxrHXwVXoHCAedGzPOgA7gS5HZ9lObaeCJgEfzmfbln1ocFsfqSFmn5X5wSE7DHgfxpVA==", + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@continuedev/fetch/-/fetch-1.0.11.tgz", + "integrity": "sha512-GRYqAdV3DhRxg463zeSzOdVIk/bhjuuxAxzX0fG35Kz6sHUsU2wr7SDY91zO2ataYUkjnbOa3q1xIpnRnOoRHA==", "dependencies": { "@continuedev/config-types": "^1.0.5", "follow-redirects": "^1.15.6", @@ -728,22 +727,6 @@ "node-fetch": "^3.3.2" } }, - "node_modules/@continuedev/openai-adapters": { - "version": "1.0.29", - "resolved": "https://registry.npmjs.org/@continuedev/openai-adapters/-/openai-adapters-1.0.29.tgz", - "integrity": "sha512-WWdueNpeKNN8WtE+5BM4zMMB0ZAXEwCHEd5QChCAq59KiiLHvPosZoWE18pIhmUddVVyO1xRT1K3xGWd3qHwhg==", - "dependencies": { - "@continuedev/config-types": "^1.0.5", - "@continuedev/config-yaml": "^1.0.51", - "@continuedev/fetch": "^1.0.3", - "dotenv": "^16.5.0", - "json-schema": "^0.4.0", - "node-fetch": "^3.3.2", - "openai": "^4.76.0", - "uuid": "^11.1.0", - "zod": "^3.24.2" - } - }, "node_modules/@cspotcode/source-map-support": { "version": "0.8.1", "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", diff --git a/packages/openai-adapters/package.json b/packages/openai-adapters/package.json index 8520560ab..3e941000e 100644 --- a/packages/openai-adapters/package.json +++ b/packages/openai-adapters/package.json @@ -1,6 +1,6 @@ { "name": "@continuedev/openai-adapters", - "version": "1.0.26", + "version": "1.0.30", "description": "", "main": "dist/index.js", "types": "dist/index.d.ts", @@ -15,8 +15,7 @@ "@azure/openai": "^1.0.0-beta.12", "@continuedev/config-types": "^1.0.5", "@continuedev/config-yaml": "^1.0.51", - "@continuedev/fetch": "^1.0.10", - "@continuedev/openai-adapters": "^1.0.29", + "@continuedev/fetch": "^1.0.11", "dotenv": "^16.5.0", "json-schema": "^0.4.0", "node-fetch": "^3.3.2", From 230853c87cb4bfe17649d6cd261894f98b04db3d Mon Sep 17 00:00:00 2001 From: Nate Date: Wed, 28 May 2025 18:27:22 -0700 Subject: [PATCH 012/118] don't use zen api key in openai-adapters --- packages/openai-adapters/src/apis/WatsonX.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/openai-adapters/src/apis/WatsonX.ts b/packages/openai-adapters/src/apis/WatsonX.ts index 3a591be03..ebe46ae57 100644 --- a/packages/openai-adapters/src/apis/WatsonX.ts +++ b/packages/openai-adapters/src/apis/WatsonX.ts @@ -179,11 +179,12 @@ export class WatsonXApi implements BaseLlmApi { private async getHeaders(): Promise> { const bearer = await this.getBearerToken(); - const isZenApiKey = bearer.expiration === -1; + // const isZenApiKey = bearer.expiration === -1; return { "Content-Type": "application/json", - Authorization: `${isZenApiKey ? "ZenApiKey" : "Bearer"} ${bearer.token}`, + // Authorization: `${isZenApiKey ? "ZenApiKey" : "Bearer"} ${bearer.token}`, + Authorization: `Bearer ${bearer.token}`, }; } From ad0c5446c2df44c369452b5bf30b35fa680ba2fe Mon Sep 17 00:00:00 2001 From: Nate Date: Wed, 28 May 2025 18:28:43 -0700 Subject: [PATCH 013/118] bump package-lock --- packages/openai-adapters/package-lock.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/openai-adapters/package-lock.json b/packages/openai-adapters/package-lock.json index 67dcf8ace..4d0b1d36f 100644 --- a/packages/openai-adapters/package-lock.json +++ b/packages/openai-adapters/package-lock.json @@ -1,12 +1,12 @@ { "name": "@continuedev/openai-adapters", - "version": "1.0.26", + "version": "1.0.30", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@continuedev/openai-adapters", - "version": "1.0.26", + "version": "1.0.30", "license": "Apache-2.0", "dependencies": { "@continuedev/config-types": "^1.0.5", From ec0fe620ce0ff686259f237da124a00a7a068365 Mon Sep 17 00:00:00 2001 From: Nate Date: Wed, 28 May 2025 19:58:56 -0700 Subject: [PATCH 014/118] look for token as well as access_token --- packages/openai-adapters/package-lock.json | 4 ++-- packages/openai-adapters/package.json | 2 +- packages/openai-adapters/src/apis/WatsonX.ts | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/openai-adapters/package-lock.json b/packages/openai-adapters/package-lock.json index 4d0b1d36f..f122ce733 100644 --- a/packages/openai-adapters/package-lock.json +++ b/packages/openai-adapters/package-lock.json @@ -1,12 +1,12 @@ { "name": "@continuedev/openai-adapters", - "version": "1.0.30", + "version": "1.0.31", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@continuedev/openai-adapters", - "version": "1.0.30", + "version": "1.0.31", "license": "Apache-2.0", "dependencies": { "@continuedev/config-types": "^1.0.5", diff --git a/packages/openai-adapters/package.json b/packages/openai-adapters/package.json index 0825744c9..0dbf5e225 100644 --- a/packages/openai-adapters/package.json +++ b/packages/openai-adapters/package.json @@ -1,6 +1,6 @@ { "name": "@continuedev/openai-adapters", - "version": "1.0.30", + "version": "1.0.31", "description": "", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/packages/openai-adapters/src/apis/WatsonX.ts b/packages/openai-adapters/src/apis/WatsonX.ts index ebe46ae57..a339f1f80 100644 --- a/packages/openai-adapters/src/apis/WatsonX.ts +++ b/packages/openai-adapters/src/apis/WatsonX.ts @@ -85,7 +85,7 @@ export class WatsonXApi implements BaseLlmApi { ).json()) as any; return { - token: wxToken["access_token"], + token: wxToken["access_token"] ?? wxToken["token"], expiration: 0, }; // } else if (!this.config.apiKey?.includes(":")) { From 5d6c7f03e0b9fe9c5531d86752235ddbb45e5fba Mon Sep 17 00:00:00 2001 From: Patrick Erichsen Date: Thu, 29 May 2025 09:51:24 -0700 Subject: [PATCH 015/118] Delete docs/docs/customize/tutorials/build-your-own-slash-command.md --- .../tutorials/build-your-own-slash-command.md | 71 ------------------- 1 file changed, 71 deletions(-) delete mode 100644 docs/docs/customize/tutorials/build-your-own-slash-command.md diff --git a/docs/docs/customize/tutorials/build-your-own-slash-command.md b/docs/docs/customize/tutorials/build-your-own-slash-command.md deleted file mode 100644 index 03543a22f..000000000 --- a/docs/docs/customize/tutorials/build-your-own-slash-command.md +++ /dev/null @@ -1,71 +0,0 @@ ---- -title: Build your own slash command ---- - -:::info -Slash commands can currently only be added using [`config.json`](../../json-reference.md) or `config.ts`. The [`YAML Config Format`](../../reference.md) is the new and preferred format. We recommend looking into [Prompt Files](../deep-dives/prompts.md) to achieve similar functionality. -::: - -There are two ways to add custom slash commands: - -1. With natural language prompts - this is simpler and only requires writing a string or string template. -2. With a custom function - this gives you full access to the Continue SDK and allows you to write arbitrary Typescript code. - -### "Custom Commands" (Use Natural Language) - -You can add custom slash commands by adding to the `customCommands` property in `config.json`. - -- `name`: the name of the command, which will be invoked with `/name` -- `description`: a short description of the command, which will appear in the dropdown -- `prompt`: a templated prompt to send to the LLM - -Custom commands are great when you are frequently reusing a prompt. For example, if you've crafted a great prompt and frequently ask the LLM to check for mistakes in your code, you could add a command like this: - -```json title="config.json" -{ - "customCommands": [ - { - "name": "check", - "description": "Check for mistakes in my code", - "prompt": "{{{ input }}}\n\nPlease read the highlighted code and check for any mistakes. You should look for the following, and be extremely vigilant:\n- Syntax errors\n- Logic errors\n- Security vulnerabilities\n- Performance issues\n- Anything else that looks wrong\n\nOnce you find an error, please explain it as clearly as possible, but without using extra words. For example, instead of saying 'I think there is a syntax error on line 5', you should say 'Syntax error on line 5'. Give your answer as one bullet point per mistake found." - } - ] -} -``` - -#### Templating - -The `prompt` property supports templating with Handlebars syntax. You can use the following variables: - -- `input` (used in the example above): any additional input entered with the slash command. For example, if you type `/test only write one test`, `input` will be `only write one test`. This will also include highlighted code blocks. -- File names: You can reference any file by providing an absolute path or a path relative to the current working directory. - -### Custom Slash Commands - -If you want to go a step further than writing custom commands with natural language, you can write a custom function that returns the response. This requires using `config.ts` instead of `config.json`. - -To do this, push a new `SlashCommand` object to the `slashCommands` list. This object contains "name", the name that you will type to invoke the slash command, "description", the description seen in the dropdown menu, and "run". The `run` function is any async generator that should yield strings as you want them to be streamed to the UI. As an argument to the function, you have access to a `ContinueSDK` object with utilities such as access to certain information/actions within the IDE, the current language model, and a few other utilities. For example, here is a slash command that generates a commit message: - -```typescript title="~/.continue/config.ts" -export function modifyConfig(config: Config): Config { - config.slashCommands?.push({ - name: "commit", - description: "Write a commit message", - run: async function* (sdk) { - // The getDiff function takes a boolean parameter that indicates whether - // to include unstaged changes in the diff or not. - const diff = await sdk.ide.getDiff(false); // Pass false to exclude unstaged changes - for await (const message of sdk.llm.streamComplete( - `${diff}\n\nWrite a commit message for the above changes. Use no more than 20 tokens to give a brief description in the imperative mood (e.g. 'Add feature' not 'Added feature'):`, - new AbortController().signal, - { - maxTokens: 20, - }, - )) { - yield message; - } - }, - }); - return config; -} -``` From 7e0b9280cbfda4bc473bc71a31f882edc4138309 Mon Sep 17 00:00:00 2001 From: Nate Date: Thu, 29 May 2025 10:06:16 -0700 Subject: [PATCH 016/118] always use custom fetch in openai-adapters --- packages/openai-adapters/package.json | 2 +- packages/openai-adapters/src/util.ts | 11 ++--------- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/packages/openai-adapters/package.json b/packages/openai-adapters/package.json index 0dbf5e225..b8e77241d 100644 --- a/packages/openai-adapters/package.json +++ b/packages/openai-adapters/package.json @@ -1,6 +1,6 @@ { "name": "@continuedev/openai-adapters", - "version": "1.0.31", + "version": "1.0.32", "description": "", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/packages/openai-adapters/src/util.ts b/packages/openai-adapters/src/util.ts index 16681e8d4..3fd87e112 100644 --- a/packages/openai-adapters/src/util.ts +++ b/packages/openai-adapters/src/util.ts @@ -1,6 +1,5 @@ import { RequestOptions } from "@continuedev/config-types"; import { fetchwithRequestOptions } from "@continuedev/fetch"; -import fetch from "node-fetch"; import { ChatCompletionChunk, CompletionUsage, @@ -137,13 +136,7 @@ export function model(options: { id: string; owned_by?: string }): Model { }; } -export function maybeCustomFetch(requestOptions: RequestOptions | undefined) { - return requestOptions - ? (url: any, init: any) => - fetchwithRequestOptions(url, init, requestOptions) - : undefined; -} - export function customFetch(requestOptions: RequestOptions | undefined) { - return maybeCustomFetch(requestOptions) ?? fetch; + return (url: any, init: any) => + fetchwithRequestOptions(url, init, requestOptions); } From 07ad240b0c75f5734f986c407d5bb514443454c7 Mon Sep 17 00:00:00 2001 From: Nate Date: Thu, 29 May 2025 13:23:54 -0700 Subject: [PATCH 017/118] fix edge cases for watsonx --- packages/openai-adapters/package-lock.json | 4 ++-- packages/openai-adapters/package.json | 2 +- packages/openai-adapters/src/apis/WatsonX.ts | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/openai-adapters/package-lock.json b/packages/openai-adapters/package-lock.json index f122ce733..ab89785e3 100644 --- a/packages/openai-adapters/package-lock.json +++ b/packages/openai-adapters/package-lock.json @@ -1,12 +1,12 @@ { "name": "@continuedev/openai-adapters", - "version": "1.0.31", + "version": "1.0.32", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@continuedev/openai-adapters", - "version": "1.0.31", + "version": "1.0.32", "license": "Apache-2.0", "dependencies": { "@continuedev/config-types": "^1.0.5", diff --git a/packages/openai-adapters/package.json b/packages/openai-adapters/package.json index b8e77241d..234905a7b 100644 --- a/packages/openai-adapters/package.json +++ b/packages/openai-adapters/package.json @@ -1,6 +1,6 @@ { "name": "@continuedev/openai-adapters", - "version": "1.0.32", + "version": "1.0.33", "description": "", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/packages/openai-adapters/src/apis/WatsonX.ts b/packages/openai-adapters/src/apis/WatsonX.ts index a339f1f80..0dd3690c8 100644 --- a/packages/openai-adapters/src/apis/WatsonX.ts +++ b/packages/openai-adapters/src/apis/WatsonX.ts @@ -69,7 +69,7 @@ export class WatsonXApi implements BaseLlmApi { const wxToken = (await ( await customFetch(this.config.requestOptions)( - `${this.apiBase}/icp4d-api/v1/authorize`, + new URL("icp4d-api/v1/authorize", this.apiBase), { method: "POST", headers: { @@ -77,8 +77,8 @@ export class WatsonXApi implements BaseLlmApi { Accept: "application/json", }, body: JSON.stringify({ - username, - api_key, + username: username?.trim(), + api_key: api_key?.trim(), }), }, ) From 38fd139c5bd4d07867bc035a7e8c831ce89ded3b Mon Sep 17 00:00:00 2001 From: Nate Date: Thu, 29 May 2025 13:34:48 -0700 Subject: [PATCH 018/118] pass stream in the body instead of the path --- packages/openai-adapters/package-lock.json | 4 ++-- packages/openai-adapters/package.json | 2 +- packages/openai-adapters/src/apis/WatsonX.ts | 13 +++++++++++-- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/packages/openai-adapters/package-lock.json b/packages/openai-adapters/package-lock.json index ab89785e3..f742e0387 100644 --- a/packages/openai-adapters/package-lock.json +++ b/packages/openai-adapters/package-lock.json @@ -1,12 +1,12 @@ { "name": "@continuedev/openai-adapters", - "version": "1.0.32", + "version": "1.0.33", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@continuedev/openai-adapters", - "version": "1.0.32", + "version": "1.0.33", "license": "Apache-2.0", "dependencies": { "@continuedev/config-types": "^1.0.5", diff --git a/packages/openai-adapters/package.json b/packages/openai-adapters/package.json index 234905a7b..bbee6b436 100644 --- a/packages/openai-adapters/package.json +++ b/packages/openai-adapters/package.json @@ -1,6 +1,6 @@ { "name": "@continuedev/openai-adapters", - "version": "1.0.33", + "version": "1.0.34", "description": "", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/packages/openai-adapters/src/apis/WatsonX.ts b/packages/openai-adapters/src/apis/WatsonX.ts index 0dd3690c8..fbc861ae1 100644 --- a/packages/openai-adapters/src/apis/WatsonX.ts +++ b/packages/openai-adapters/src/apis/WatsonX.ts @@ -134,7 +134,7 @@ export class WatsonXApi implements BaseLlmApi { } private getEndpoint(endpoint: string): string { - return `${this.apiBase}ml/v1/${this.deploymentId ? `deployments/${this.deploymentId}/` : ""}text/${endpoint}_stream?version=${this.apiVersion}`; + return `${this.apiBase}ml/v1/${this.deploymentId ? `deployments/${this.deploymentId}/` : ""}text/${endpoint}?version=${this.apiVersion}`; } private _convertBody(oaiBody: ChatCompletionCreateParams) { @@ -174,6 +174,10 @@ export class WatsonXApi implements BaseLlmApi { } } + if (oaiBody.stream) { + payload.stream = oaiBody.stream; + } + return payload; } @@ -216,7 +220,12 @@ export class WatsonXApi implements BaseLlmApi { ): AsyncGenerator { const url = this.getEndpoint("chat"); const headers = await this.getHeaders(); - const stringifiedBody = JSON.stringify(this._convertBody(body)); + const stringifiedBody = JSON.stringify( + this._convertBody({ + ...body, + stream: true, + }), + ); const response = await customFetch(this.config.requestOptions)(url, { method: "POST", headers, From b52910b43351e5df8c07cfb27beca8fba5463074 Mon Sep 17 00:00:00 2001 From: Patrick Erichsen Date: Thu, 29 May 2025 14:31:18 -0700 Subject: [PATCH 019/118] fix: old docs --- docs/docs/customize/deep-dives/configuration.md | 2 -- docs/docs/json-reference.md | 2 -- 2 files changed, 4 deletions(-) diff --git a/docs/docs/customize/deep-dives/configuration.md b/docs/docs/customize/deep-dives/configuration.md index ec30bb46e..1a567ea4f 100644 --- a/docs/docs/customize/deep-dives/configuration.md +++ b/docs/docs/customize/deep-dives/configuration.md @@ -84,5 +84,3 @@ export function modifyConfig(config: Config): Config { return config; } ``` - -For examples of how to use `config.ts`, see [writing custom slash commands](../tutorials/build-your-own-slash-command.md#custom-slash-commands) or [writing custom context providers](../tutorials/build-your-own-context-provider.mdx). diff --git a/docs/docs/json-reference.md b/docs/docs/json-reference.md index c139a6ca2..cced1e36e 100644 --- a/docs/docs/json-reference.md +++ b/docs/docs/json-reference.md @@ -385,8 +385,6 @@ Example: } ``` -You can also add your own slash command by following [this tutorial](./customize/tutorials/build-your-own-slash-command.md). - ### `customCommands` User-defined commands for prompt shortcuts in the sidebar, allowing quick access to common actions. From e2cda3551bc4f1d7dece723b9f39fe7d2ef562ad Mon Sep 17 00:00:00 2001 From: Nate Date: Fri, 30 May 2025 08:54:12 -0700 Subject: [PATCH 020/118] update package.json --- core/package-lock.json | 64 ++++------------------------- core/package.json | 2 +- extensions/vscode/package-lock.json | 6 +-- gui/package-lock.json | 2 +- 4 files changed, 13 insertions(+), 61 deletions(-) diff --git a/core/package-lock.json b/core/package-lock.json index b2da9407e..d5fd767ef 100644 --- a/core/package-lock.json +++ b/core/package-lock.json @@ -16,7 +16,7 @@ "@continuedev/config-yaml": "file:../packages/config-yaml", "@continuedev/fetch": "^1.0.10", "@continuedev/llm-info": "^1.0.8", - "@continuedev/openai-adapters": "^1.0.25", + "@continuedev/openai-adapters": "^1.0.32", "@modelcontextprotocol/sdk": "^1.12.0", "@mozilla/readability": "^0.5.0", "@octokit/rest": "^20.1.1", @@ -948,22 +948,6 @@ } } }, - "node_modules/@azure-rest/core-client": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@azure-rest/core-client/-/core-client-1.4.0.tgz", - "integrity": "sha512-ozTDPBVUDR5eOnMIwhggbnVmOrka4fXCs8n8mvUo4WLLc38kki6bAOByDoVZZPz/pZy2jMt2kwfpvy/UjALj6w==", - "dependencies": { - "@azure/abort-controller": "^2.0.0", - "@azure/core-auth": "^1.3.0", - "@azure/core-rest-pipeline": "^1.5.0", - "@azure/core-tracing": "^1.0.1", - "@azure/core-util": "^1.0.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, "node_modules/@azure/abort-controller": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/@azure/abort-controller/-/abort-controller-2.1.2.tgz", @@ -1061,17 +1045,6 @@ "node": ">=18.0.0" } }, - "node_modules/@azure/core-sse": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/@azure/core-sse/-/core-sse-2.1.3.tgz", - "integrity": "sha512-KSSdIKy8kvWCpYr8Hzpu22j3wcXsVTYE0IlgmI1T/aHvBDsLgV91y90UTfVWnuiuApRLCCVC4gS09ApBGOmYQA==", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, "node_modules/@azure/core-tracing": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/@azure/core-tracing/-/core-tracing-1.2.0.tgz", @@ -1210,24 +1183,6 @@ "uuid": "dist/bin/uuid" } }, - "node_modules/@azure/openai": { - "version": "1.0.0-beta.13", - "resolved": "https://registry.npmjs.org/@azure/openai/-/openai-1.0.0-beta.13.tgz", - "integrity": "sha512-oHE5ScnPTXALmyEBgqokZlYVT7F76EfrKjMWF+YcFJdUxk9Adhvht2iL5v+QpmlAIMdkih1q8DkTs/tApDjBpw==", - "deprecated": "The Azure OpenAI client library for JavaScript beta has been retired. Please migrate to the stable OpenAI SDK for JavaScript using the migration guide: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/openai/openai/MIGRATION.md.", - "dependencies": { - "@azure-rest/core-client": "^1.1.7", - "@azure/core-auth": "^1.4.0", - "@azure/core-rest-pipeline": "^1.13.0", - "@azure/core-sse": "^2.0.0", - "@azure/core-util": "^1.4.0", - "@azure/logger": "^1.0.3", - "tslib": "^2.4.0" - }, - "engines": { - "node": ">=18.0.0" - } - }, "node_modules/@babel/code-frame": { "version": "7.26.2", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.26.2.tgz", @@ -2927,10 +2882,9 @@ "link": true }, "node_modules/@continuedev/fetch": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/@continuedev/fetch/-/fetch-1.0.10.tgz", - "integrity": "sha512-RBUXtm/VDz+9Itgw+CxrHXwVXoHCAedGzPOgA7gS5HZ9lObaeCJgEfzmfbln1ocFsfqSFmn5X5wSE7DHgfxpVA==", - "license": "Apache-2.0", + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@continuedev/fetch/-/fetch-1.0.11.tgz", + "integrity": "sha512-GRYqAdV3DhRxg463zeSzOdVIk/bhjuuxAxzX0fG35Kz6sHUsU2wr7SDY91zO2ataYUkjnbOa3q1xIpnRnOoRHA==", "dependencies": { "@continuedev/config-types": "^1.0.5", "follow-redirects": "^1.15.6", @@ -2945,15 +2899,13 @@ "integrity": "sha512-/htL7p4li3zQSwn9bXkI23WRpZNklWTPzRSSG3Fd5gvYW8cizjhlf7OzeDdKxBfi1S0lpqMm0VwHlx3KjMKLpw==" }, "node_modules/@continuedev/openai-adapters": { - "version": "1.0.25", - "resolved": "https://registry.npmjs.org/@continuedev/openai-adapters/-/openai-adapters-1.0.25.tgz", - "integrity": "sha512-YG7bcAlUk3BnqIOZw+ClmxmZU6G3OaaZqbhfqgiCnJem5i7oDy0pkAVHjig4iRTQkpvDokKmBXCH9wmQNRbWNw==", - "license": "Apache-2.0", + "version": "1.0.32", + "resolved": "https://registry.npmjs.org/@continuedev/openai-adapters/-/openai-adapters-1.0.32.tgz", + "integrity": "sha512-teNzbpcsa7Y0eBk+dxlLDo0m43sWI5txTYMIk6ezyS0cZAKFJODDB0Gkp3aEHXbD8mDE7H5dDSlM23ohKCirAA==", "dependencies": { - "@azure/openai": "^1.0.0-beta.12", "@continuedev/config-types": "^1.0.5", "@continuedev/config-yaml": "^1.0.51", - "@continuedev/fetch": "^1.0.10", + "@continuedev/fetch": "^1.0.11", "dotenv": "^16.5.0", "json-schema": "^0.4.0", "node-fetch": "^3.3.2", diff --git a/core/package.json b/core/package.json index 5622cc903..1684ef5c0 100644 --- a/core/package.json +++ b/core/package.json @@ -51,7 +51,7 @@ "@continuedev/config-yaml": "file:../packages/config-yaml", "@continuedev/fetch": "^1.0.10", "@continuedev/llm-info": "^1.0.8", - "@continuedev/openai-adapters": "^1.0.25", + "@continuedev/openai-adapters": "^1.0.32", "@modelcontextprotocol/sdk": "^1.12.0", "@mozilla/readability": "^0.5.0", "@octokit/rest": "^20.1.1", diff --git a/extensions/vscode/package-lock.json b/extensions/vscode/package-lock.json index f2db4b382..b08ede404 100644 --- a/extensions/vscode/package-lock.json +++ b/extensions/vscode/package-lock.json @@ -1,12 +1,12 @@ { "name": "continue", - "version": "1.1.40", + "version": "1.1.41", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "continue", - "version": "1.1.40", + "version": "1.1.41", "license": "Apache-2.0", "dependencies": { "@continuedev/config-types": "^1.0.14", @@ -109,7 +109,7 @@ "@continuedev/config-yaml": "file:../packages/config-yaml", "@continuedev/fetch": "^1.0.10", "@continuedev/llm-info": "^1.0.8", - "@continuedev/openai-adapters": "^1.0.25", + "@continuedev/openai-adapters": "^1.0.32", "@modelcontextprotocol/sdk": "^1.12.0", "@mozilla/readability": "^0.5.0", "@octokit/rest": "^20.1.1", diff --git a/gui/package-lock.json b/gui/package-lock.json index 17f6b1514..8206d49ac 100644 --- a/gui/package-lock.json +++ b/gui/package-lock.json @@ -113,7 +113,7 @@ "@continuedev/config-yaml": "file:../packages/config-yaml", "@continuedev/fetch": "^1.0.10", "@continuedev/llm-info": "^1.0.8", - "@continuedev/openai-adapters": "^1.0.25", + "@continuedev/openai-adapters": "^1.0.32", "@modelcontextprotocol/sdk": "^1.12.0", "@mozilla/readability": "^0.5.0", "@octokit/rest": "^20.1.1", From 93a393a490cabed39ccef692ff358c74b2f40320 Mon Sep 17 00:00:00 2001 From: Nate Date: Fri, 30 May 2025 08:55:13 -0700 Subject: [PATCH 021/118] Revert "pass stream in the body instead of the path" This reverts commit 38fd139c5bd4d07867bc035a7e8c831ce89ded3b. --- packages/openai-adapters/package-lock.json | 4 ++-- packages/openai-adapters/package.json | 2 +- packages/openai-adapters/src/apis/WatsonX.ts | 13 ++----------- 3 files changed, 5 insertions(+), 14 deletions(-) diff --git a/packages/openai-adapters/package-lock.json b/packages/openai-adapters/package-lock.json index f742e0387..ab89785e3 100644 --- a/packages/openai-adapters/package-lock.json +++ b/packages/openai-adapters/package-lock.json @@ -1,12 +1,12 @@ { "name": "@continuedev/openai-adapters", - "version": "1.0.33", + "version": "1.0.32", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@continuedev/openai-adapters", - "version": "1.0.33", + "version": "1.0.32", "license": "Apache-2.0", "dependencies": { "@continuedev/config-types": "^1.0.5", diff --git a/packages/openai-adapters/package.json b/packages/openai-adapters/package.json index bbee6b436..234905a7b 100644 --- a/packages/openai-adapters/package.json +++ b/packages/openai-adapters/package.json @@ -1,6 +1,6 @@ { "name": "@continuedev/openai-adapters", - "version": "1.0.34", + "version": "1.0.33", "description": "", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/packages/openai-adapters/src/apis/WatsonX.ts b/packages/openai-adapters/src/apis/WatsonX.ts index fbc861ae1..0dd3690c8 100644 --- a/packages/openai-adapters/src/apis/WatsonX.ts +++ b/packages/openai-adapters/src/apis/WatsonX.ts @@ -134,7 +134,7 @@ export class WatsonXApi implements BaseLlmApi { } private getEndpoint(endpoint: string): string { - return `${this.apiBase}ml/v1/${this.deploymentId ? `deployments/${this.deploymentId}/` : ""}text/${endpoint}?version=${this.apiVersion}`; + return `${this.apiBase}ml/v1/${this.deploymentId ? `deployments/${this.deploymentId}/` : ""}text/${endpoint}_stream?version=${this.apiVersion}`; } private _convertBody(oaiBody: ChatCompletionCreateParams) { @@ -174,10 +174,6 @@ export class WatsonXApi implements BaseLlmApi { } } - if (oaiBody.stream) { - payload.stream = oaiBody.stream; - } - return payload; } @@ -220,12 +216,7 @@ export class WatsonXApi implements BaseLlmApi { ): AsyncGenerator { const url = this.getEndpoint("chat"); const headers = await this.getHeaders(); - const stringifiedBody = JSON.stringify( - this._convertBody({ - ...body, - stream: true, - }), - ); + const stringifiedBody = JSON.stringify(this._convertBody(body)); const response = await customFetch(this.config.requestOptions)(url, { method: "POST", headers, From 92324e822210c9940971e9c557dd516e04454fc5 Mon Sep 17 00:00:00 2001 From: Nate Date: Fri, 30 May 2025 08:55:50 -0700 Subject: [PATCH 022/118] bump oai-adapters --- packages/openai-adapters/package-lock.json | 4 ++-- packages/openai-adapters/package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/openai-adapters/package-lock.json b/packages/openai-adapters/package-lock.json index ab89785e3..c7935e885 100644 --- a/packages/openai-adapters/package-lock.json +++ b/packages/openai-adapters/package-lock.json @@ -1,12 +1,12 @@ { "name": "@continuedev/openai-adapters", - "version": "1.0.32", + "version": "1.0.35", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@continuedev/openai-adapters", - "version": "1.0.32", + "version": "1.0.35", "license": "Apache-2.0", "dependencies": { "@continuedev/config-types": "^1.0.5", diff --git a/packages/openai-adapters/package.json b/packages/openai-adapters/package.json index 234905a7b..841f07703 100644 --- a/packages/openai-adapters/package.json +++ b/packages/openai-adapters/package.json @@ -1,6 +1,6 @@ { "name": "@continuedev/openai-adapters", - "version": "1.0.33", + "version": "1.0.35", "description": "", "main": "dist/index.js", "types": "dist/index.d.ts", From 4f3737a00b119ea59bf24ed34d43cf14d694349b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 30 May 2025 22:21:18 +0000 Subject: [PATCH 023/118] Bump vite from 5.4.18 to 6.3.5 in /gui Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 5.4.18 to 6.3.5. - [Release notes](https://github.com/vitejs/vite/releases) - [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md) - [Commits](https://github.com/vitejs/vite/commits/v6.3.5/packages/vite) --- updated-dependencies: - dependency-name: vite dependency-version: 6.3.5 dependency-type: indirect ... Signed-off-by: dependabot[bot] --- gui/package-lock.json | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/gui/package-lock.json b/gui/package-lock.json index 17f6b1514..c3445ab4e 100644 --- a/gui/package-lock.json +++ b/gui/package-lock.json @@ -12376,9 +12376,9 @@ } }, "node_modules/vite": { - "version": "6.3.4", - "resolved": "https://registry.npmjs.org/vite/-/vite-6.3.4.tgz", - "integrity": "sha512-BiReIiMS2fyFqbqNT/Qqt4CVITDU9M9vE+DKcVAsB+ZV0wvTKd+3hMbkpxz1b+NmEDMegpVbisKiAZOnvO92Sw==", + "version": "6.3.5", + "resolved": "https://registry.npmjs.org/vite/-/vite-6.3.5.tgz", + "integrity": "sha512-cZn6NDFE7wdTpINgs++ZJ4N49W2vRp8LCKrn3Ob1kYNtOo21vfDoaV5GzBfLU4MovSAB8uNRm4jgzVQZ+mBzPQ==", "dev": true, "license": "MIT", "dependencies": { @@ -12878,10 +12878,11 @@ } }, "node_modules/vite-node/node_modules/vite": { - "version": "5.4.18", - "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.18.tgz", - "integrity": "sha512-1oDcnEp3lVyHCuQ2YFelM4Alm2o91xNoMncRm1U7S+JdYfYOvbiGZ3/CxGttrOu2M/KcGz7cRC2DoNUA6urmMA==", + "version": "5.4.19", + "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.19.tgz", + "integrity": "sha512-qO3aKv3HoQC8QKiNSTuUM1l9o/XX3+c+VTgLHbJWHZGeTPVAg2XwazI9UWzoxjIJCGCV2zU60uqMzjeLZuULqA==", "dev": true, + "license": "MIT", "dependencies": { "esbuild": "^0.21.3", "postcss": "^8.4.43", @@ -13460,10 +13461,11 @@ } }, "node_modules/vitest/node_modules/vite": { - "version": "5.4.18", - "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.18.tgz", - "integrity": "sha512-1oDcnEp3lVyHCuQ2YFelM4Alm2o91xNoMncRm1U7S+JdYfYOvbiGZ3/CxGttrOu2M/KcGz7cRC2DoNUA6urmMA==", + "version": "5.4.19", + "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.19.tgz", + "integrity": "sha512-qO3aKv3HoQC8QKiNSTuUM1l9o/XX3+c+VTgLHbJWHZGeTPVAg2XwazI9UWzoxjIJCGCV2zU60uqMzjeLZuULqA==", "dev": true, + "license": "MIT", "dependencies": { "esbuild": "^0.21.3", "postcss": "^8.4.43", From 28271147dd81faf7778233c8be10ac0bc4226601 Mon Sep 17 00:00:00 2001 From: Nate Date: Fri, 30 May 2025 15:28:33 -0700 Subject: [PATCH 024/118] changes --- packages/openai-adapters/package-lock.json | 4 ++-- packages/openai-adapters/package.json | 2 +- packages/openai-adapters/src/apis/WatsonX.ts | 6 +++++- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/packages/openai-adapters/package-lock.json b/packages/openai-adapters/package-lock.json index c7935e885..1d88a8b5e 100644 --- a/packages/openai-adapters/package-lock.json +++ b/packages/openai-adapters/package-lock.json @@ -1,12 +1,12 @@ { "name": "@continuedev/openai-adapters", - "version": "1.0.35", + "version": "1.0.36", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@continuedev/openai-adapters", - "version": "1.0.35", + "version": "1.0.36", "license": "Apache-2.0", "dependencies": { "@continuedev/config-types": "^1.0.5", diff --git a/packages/openai-adapters/package.json b/packages/openai-adapters/package.json index 841f07703..08c1581b6 100644 --- a/packages/openai-adapters/package.json +++ b/packages/openai-adapters/package.json @@ -1,6 +1,6 @@ { "name": "@continuedev/openai-adapters", - "version": "1.0.35", + "version": "1.0.36", "description": "", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/packages/openai-adapters/src/apis/WatsonX.ts b/packages/openai-adapters/src/apis/WatsonX.ts index 0dd3690c8..2f1e197fc 100644 --- a/packages/openai-adapters/src/apis/WatsonX.ts +++ b/packages/openai-adapters/src/apis/WatsonX.ts @@ -216,7 +216,11 @@ export class WatsonXApi implements BaseLlmApi { ): AsyncGenerator { const url = this.getEndpoint("chat"); const headers = await this.getHeaders(); - const stringifiedBody = JSON.stringify(this._convertBody(body)); + const stringifiedBody = JSON.stringify({ + time_limit: 8000, + ...this._convertBody(body), + stream: true, + }); const response = await customFetch(this.config.requestOptions)(url, { method: "POST", headers, From d99514995588cc2c502df99757e22f5ac3e2c7a1 Mon Sep 17 00:00:00 2001 From: Patrick Erichsen Date: Fri, 30 May 2025 17:45:02 -0700 Subject: [PATCH 025/118] feat: skip hub onboarding in free trial --- extensions/vscode/package-lock.json | 4 +- .../vscode/src/stubs/WorkOsAuthProvider.ts | 15 +++--- gui/src/components/ModeSelect/ModeSelect.tsx | 2 +- .../OnboardingCard/platform/tabs/main.tsx | 9 ++-- gui/src/components/PageHeader.tsx | 12 +++-- .../components/dialogs/ConfirmationDialog.tsx | 9 ++-- gui/src/components/index.ts | 1 - gui/src/components/ui/Button.tsx | 49 +++++++++++++++++++ gui/src/components/ui/Listbox.tsx | 2 +- gui/src/pages/config/AccountButton.tsx | 20 +++++--- gui/src/pages/config/KeyboardShortcuts.tsx | 6 +-- 11 files changed, 90 insertions(+), 39 deletions(-) create mode 100644 gui/src/components/ui/Button.tsx diff --git a/extensions/vscode/package-lock.json b/extensions/vscode/package-lock.json index f2db4b382..78fa03df8 100644 --- a/extensions/vscode/package-lock.json +++ b/extensions/vscode/package-lock.json @@ -1,12 +1,12 @@ { "name": "continue", - "version": "1.1.40", + "version": "1.1.41", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "continue", - "version": "1.1.40", + "version": "1.1.41", "license": "Apache-2.0", "dependencies": { "@continuedev/config-types": "^1.0.14", diff --git a/extensions/vscode/src/stubs/WorkOsAuthProvider.ts b/extensions/vscode/src/stubs/WorkOsAuthProvider.ts index 73f36afdb..aa1634ddb 100644 --- a/extensions/vscode/src/stubs/WorkOsAuthProvider.ts +++ b/extensions/vscode/src/stubs/WorkOsAuthProvider.ts @@ -170,14 +170,11 @@ export class WorkOsAuthProvider implements AuthenticationProvider, Disposable { return url.toString(); } - public static useOnboardingUri: boolean = false; + public static shouldRedirectToExtension: boolean = false; get redirectUri() { - if (WorkOsAuthProvider.useOnboardingUri) { - const url = new URL(controlPlaneEnv.APP_URL); - url.pathname = `/onboarding/redirect/${env.uriScheme}`; - return url.toString(); - } - return this.ideRedirectUri; + return WorkOsAuthProvider.shouldRedirectToExtension + ? `${env.uriScheme}://Continue.continue` + : this.ideRedirectUri; } async refreshSessions() { @@ -514,7 +511,7 @@ export async function getControlPlaneSessionInfo( try { if (useOnboarding) { - WorkOsAuthProvider.useOnboardingUri = true; + WorkOsAuthProvider.shouldRedirectToExtension = true; } const session = await authentication.getSession( @@ -534,6 +531,6 @@ export async function getControlPlaneSessionInfo( }, }; } finally { - WorkOsAuthProvider.useOnboardingUri = false; + WorkOsAuthProvider.shouldRedirectToExtension = false; } } diff --git a/gui/src/components/ModeSelect/ModeSelect.tsx b/gui/src/components/ModeSelect/ModeSelect.tsx index 75046e476..dbd5cabfe 100644 --- a/gui/src/components/ModeSelect/ModeSelect.tsx +++ b/gui/src/components/ModeSelect/ModeSelect.tsx @@ -72,7 +72,7 @@ export function ModeSelect() {
diff --git a/gui/src/components/OnboardingCard/platform/tabs/main.tsx b/gui/src/components/OnboardingCard/platform/tabs/main.tsx index c5590e7d8..b5d72ad75 100644 --- a/gui/src/components/OnboardingCard/platform/tabs/main.tsx +++ b/gui/src/components/OnboardingCard/platform/tabs/main.tsx @@ -1,12 +1,13 @@ import { ChevronRightIcon } from "@heroicons/react/24/outline"; import { useContext } from "react"; -import { Button, ButtonSubtext } from "../../.."; +import { ButtonSubtext } from "../../.."; import { useAuth } from "../../../../context/Auth"; import { IdeMessengerContext } from "../../../../context/IdeMessenger"; import { selectCurrentOrg } from "../../../../redux"; import { useAppSelector } from "../../../../redux/hooks"; import { hasPassedFTL } from "../../../../util/freeTrial"; import ContinueLogo from "../../../gui/ContinueLogo"; +import { Button } from "../../../ui/Button"; import { useOnboardingCard } from "../../hooks"; export default function MainTab({ @@ -22,7 +23,7 @@ export default function MainTab({ const currentOrg = useAppSelector(selectCurrentOrg); function onGetStarted() { - auth.login(true).then((success) => { + void auth.login(true).then((success) => { if (success) { onboardingCard.close(isDialog); } @@ -89,14 +90,14 @@ export default function MainTab({ {onboardingCard.activeTab === "ExistingUserHubIntro" ? ( onboardingCard.close(isDialog)}> -
+
Or, use Continue as usual
) : ( -
+
Or, remain local
diff --git a/gui/src/components/PageHeader.tsx b/gui/src/components/PageHeader.tsx index ceb9bd64a..0e935b6a5 100644 --- a/gui/src/components/PageHeader.tsx +++ b/gui/src/components/PageHeader.tsx @@ -1,5 +1,5 @@ import { ArrowLeftIcon } from "@heroicons/react/24/outline"; -import { fontSize } from "../util"; +import { useFontSize } from "./ui/font"; export interface PageHeaderProps { onTitleClick?: () => void; @@ -14,9 +14,11 @@ export function PageHeader({ rightContent, showBorder, }: PageHeaderProps) { + const fontSize = useFontSize(-1); + return (
{title ? (
{title} diff --git a/gui/src/components/dialogs/ConfirmationDialog.tsx b/gui/src/components/dialogs/ConfirmationDialog.tsx index 1a3cd09e7..20024b1f8 100644 --- a/gui/src/components/dialogs/ConfirmationDialog.tsx +++ b/gui/src/components/dialogs/ConfirmationDialog.tsx @@ -1,7 +1,6 @@ import { useDispatch } from "react-redux"; -import styled from "styled-components"; -import { Button, SecondaryButton } from ".."; import { setDialogMessage, setShowDialog } from "../../redux/slices/uiSlice"; +import { Button } from "../ui/Button"; interface ConfirmationDialogProps { onConfirm: () => void; @@ -26,8 +25,8 @@ function ConfirmationDialog(props: ConfirmationDialogProps) {
{!!props.hideCancelButton || ( - { dispatch(setShowDialog(false)); dispatch(setDialogMessage(undefined)); @@ -35,7 +34,7 @@ function ConfirmationDialog(props: ConfirmationDialogProps) { }} > Cancel - + )} ); } @@ -42,7 +42,7 @@ export function AccountButton() { {selectedOrg === null ? "Personal" : selectedOrg.name} - {" "} +
@@ -65,9 +65,13 @@ export function AccountButton() {
)} - +
diff --git a/gui/src/pages/config/KeyboardShortcuts.tsx b/gui/src/pages/config/KeyboardShortcuts.tsx index 77d8c2733..489c28456 100644 --- a/gui/src/pages/config/KeyboardShortcuts.tsx +++ b/gui/src/pages/config/KeyboardShortcuts.tsx @@ -11,7 +11,7 @@ interface KeyboardShortcutProps { function KeyboardShortcut(props: KeyboardShortcutProps) { return (
{props.description}: @@ -132,8 +132,8 @@ function KeyboardShortcuts() { }, []); return ( -
-

Keyboard shortcuts

+
+

Keyboard shortcuts

{shortcuts.map((shortcut, i) => { return ( From bae74c1b324b51c2e9b14b548f92557c75025f51 Mon Sep 17 00:00:00 2001 From: Patrick Erichsen Date: Sat, 31 May 2025 14:23:31 -0700 Subject: [PATCH 026/118] fix: use ide scheme auth redirect --- .../vscode/src/stubs/WorkOsAuthProvider.ts | 27 ++++++++++--------- .../OnboardingCard/platform/tabs/main.tsx | 4 +-- 2 files changed, 17 insertions(+), 14 deletions(-) diff --git a/extensions/vscode/src/stubs/WorkOsAuthProvider.ts b/extensions/vscode/src/stubs/WorkOsAuthProvider.ts index aa1634ddb..e0c5210d8 100644 --- a/extensions/vscode/src/stubs/WorkOsAuthProvider.ts +++ b/extensions/vscode/src/stubs/WorkOsAuthProvider.ts @@ -1,5 +1,11 @@ import crypto from "crypto"; +import { + AuthType, + ControlPlaneSessionInfo, + HubEnv, + isHubEnv, +} from "core/control-plane/AuthTypes"; import { getControlPlaneEnvSync } from "core/control-plane/env"; import fetch from "node-fetch"; import { v4 as uuidv4 } from "uuid"; @@ -17,12 +23,6 @@ import { window, } from "vscode"; -import { - AuthType, - ControlPlaneSessionInfo, - HubEnv, - isHubEnv, -} from "core/control-plane/AuthTypes"; import { PromiseAdapter, promiseFromEvent } from "./promiseUtils"; import { SecretStorage } from "./SecretStorage"; import { UriEventHandler } from "./uriHandler"; @@ -170,11 +170,14 @@ export class WorkOsAuthProvider implements AuthenticationProvider, Disposable { return url.toString(); } - public static shouldRedirectToExtension: boolean = false; + public static useOnboardingUri: boolean = false; get redirectUri() { - return WorkOsAuthProvider.shouldRedirectToExtension - ? `${env.uriScheme}://Continue.continue` - : this.ideRedirectUri; + if (WorkOsAuthProvider.useOnboardingUri) { + const url = new URL(controlPlaneEnv.APP_URL); + url.pathname = `/auth/${env.uriScheme}-redirect`; + return url.toString(); + } + return this.ideRedirectUri; } async refreshSessions() { @@ -511,7 +514,7 @@ export async function getControlPlaneSessionInfo( try { if (useOnboarding) { - WorkOsAuthProvider.shouldRedirectToExtension = true; + WorkOsAuthProvider.useOnboardingUri = true; } const session = await authentication.getSession( @@ -531,6 +534,6 @@ export async function getControlPlaneSessionInfo( }, }; } finally { - WorkOsAuthProvider.shouldRedirectToExtension = false; + WorkOsAuthProvider.useOnboardingUri = false; } } diff --git a/gui/src/components/OnboardingCard/platform/tabs/main.tsx b/gui/src/components/OnboardingCard/platform/tabs/main.tsx index b5d72ad75..9bad6a50f 100644 --- a/gui/src/components/OnboardingCard/platform/tabs/main.tsx +++ b/gui/src/components/OnboardingCard/platform/tabs/main.tsx @@ -70,7 +70,7 @@ export default function MainTab({ onClick={onGetStarted} className="mt-4 grid w-full grid-flow-col items-center gap-2" > - Get started + Get started with Free Trial ) : ( @@ -83,7 +83,7 @@ export default function MainTab({ onClick={onGetStarted} className="mt-4 grid w-full grid-flow-col items-center gap-2" > - Get started + Get started with Free Trial )} From f5a06b158faedbf421659bce8025e8e81cda332d Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Mon, 2 Jun 2025 11:58:52 -0700 Subject: [PATCH 027/118] fix rules section border --- .../mainInput/Lump/sections/RulesSection.tsx | 24 +++++++------------ 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/gui/src/components/mainInput/Lump/sections/RulesSection.tsx b/gui/src/components/mainInput/Lump/sections/RulesSection.tsx index fa9dff106..2e01157dc 100644 --- a/gui/src/components/mainInput/Lump/sections/RulesSection.tsx +++ b/gui/src/components/mainInput/Lump/sections/RulesSection.tsx @@ -6,13 +6,12 @@ import { } from "@heroicons/react/24/outline"; import { RuleWithSource } from "core"; import { + DEFAULT_AGENT_SYSTEM_MESSAGE, + DEFAULT_AGENT_SYSTEM_MESSAGE_URL, DEFAULT_CHAT_SYSTEM_MESSAGE, DEFAULT_CHAT_SYSTEM_MESSAGE_URL, - DEFAULT_AGENT_SYSTEM_MESSAGE, - DEFAULT_AGENT_SYSTEM_MESSAGE_URL } from "core/llm/constructMessages"; import { useContext, useMemo } from "react"; -import { defaultBorderRadius, vscCommandCenterActiveBorder } from "../../.."; import { useAuth } from "../../../../context/Auth"; import { IdeMessengerContext } from "../../../../context/IdeMessenger"; import { useAppDispatch, useAppSelector } from "../../../../redux/hooks"; @@ -91,13 +90,7 @@ const RuleCard: React.FC = ({ rule }) => { const smallFont = useFontSize(-2); const tinyFont = useFontSize(-3); return ( -
+
= ({ rule }) => { {" "} - {rule.source === "default-chat" || rule.source === "default-agent" ? ( + {rule.source === "default-chat" || + rule.source === "default-agent" ? ( @@ -195,24 +189,24 @@ export function RulesSection() { rules.unshift({ rule: config.selectedModelByRole.chat?.baseAgentSystemMessage, source: "model-agent-options", - }) + }); } else { rules.unshift({ rule: DEFAULT_AGENT_SYSTEM_MESSAGE, source: "default-agent", - }) + }); } } else { if (config.selectedModelByRole.chat?.baseChatSystemMessage) { rules.unshift({ rule: config.selectedModelByRole.chat?.baseChatSystemMessage, source: "model-chat-options", - }) + }); } else { rules.unshift({ rule: DEFAULT_CHAT_SYSTEM_MESSAGE, source: "default-chat", - }) + }); } } From b2cbe2562dd1ec1f088cb032fccb2873732665cc Mon Sep 17 00:00:00 2001 From: Brian 'bdougie' Douglas Date: Tue, 3 Jun 2025 14:05:56 -0700 Subject: [PATCH 028/118] expands on rules docs --- docs/docs/agent/how-to-customize.md | 5 +++++ docs/docs/blocks/rules.md | 8 +++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/docs/docs/agent/how-to-customize.md b/docs/docs/agent/how-to-customize.md index 93f3c6188..d19edacb1 100644 --- a/docs/docs/agent/how-to-customize.md +++ b/docs/docs/agent/how-to-customize.md @@ -5,6 +5,11 @@ keywords: [customize, chat] sidebar_position: 5 --- +## Add Rules Blocks +Adding Rules can be done in your assistant locally or in the Hub. + +[Explore Rules on the Hub](https://hub.continue.dev/explore/rules) and see the [Ruls deep dive](../customize/deep-dives/rules.md) for more details and tips on creating rules. + ## Add MCP tools You can add MCP servers to your assistant to give Agent access to more tools. [Explore MCP Servers on the Hub](https://hub.continue.dev/explore/mcp) and see the [MCP guide](../customize/deep-dives/mcp.mdx) for more details. diff --git a/docs/docs/blocks/rules.md b/docs/docs/blocks/rules.md index bc1baaf4b..570552b29 100644 --- a/docs/docs/blocks/rules.md +++ b/docs/docs/blocks/rules.md @@ -6,13 +6,19 @@ keywords: [rules, blocks, standards, practices, guardrails] sidebar_position: 5 --- +Rules allow you to provide specific instructions that guide how the AI assistant behaves when working with your code. Instead of the AI making assumptions about your coding standards, architecture patterns, or project-specific requirements, you can explicitly define guidelines that ensure consistent, contextually appropriate responses. + Think of these as the guardrails for your AI coding assistants: - **Enforce company-specific coding standards** and security practices - **Implement quality checks** that match your engineering culture - **Create paved paths** for developers to follow organizational best practices -![Rules Blocks Overview](/img/rules-blocks-overview.png) +By implementing rules, you transform the AI from a generic coding assistant into a knowledgeable team member that understands your project's unique requirements and constraints. + +### How Rules Work + +Your assistant detects rule blocks and applies the specified rules while in [Agent](agent/how-to-use-it), [Chat](chat/how-to-use-it), and [Edit](edit/how-to-use-it) modes. ## Learn More From 0304c748b1c88b95aa5e2f3284f66e55920f5425 Mon Sep 17 00:00:00 2001 From: Brian 'bdougie' Douglas Date: Tue, 3 Jun 2025 14:32:19 -0700 Subject: [PATCH 029/118] rules deep dive improvementS --- docs/docs/customize/deep-dives/rules.md | 36 ++++++++++++------------- 1 file changed, 17 insertions(+), 19 deletions(-) diff --git a/docs/docs/customize/deep-dives/rules.md b/docs/docs/customize/deep-dives/rules.md index 52ea34e0c..7faa9bf70 100644 --- a/docs/docs/customize/deep-dives/rules.md +++ b/docs/docs/customize/deep-dives/rules.md @@ -5,9 +5,9 @@ keywords: [rules, .continuerules, system, prompt, message] # Rules -Rules are used to provide instructions to the model for [Chat](../../chat/how-to-use-it.md), [Edit](../../edit/how-to-use-it.md), and [Agent](../../agent/how-to-use-it.md) requests. +Rules provide instructions to the model for [Chat](../../chat/how-to-use-it.md), [Edit](../../edit/how-to-use-it.md), and [Agent](../../agent/how-to-use-it.md) requests. -Rules are not included in most other requests, such as [autocomplete](./autocomplete.mdx) or [apply](../model-roles/apply.mdx). +:::info Rules are not included in [autocomplete](./autocomplete.mdx) or [apply](../model-roles/apply.mdx). You can view the current rules by clicking the pen icon above the main toolbar: @@ -35,21 +35,19 @@ Rules blocks can be simple text, written in YAML configuration files, or as Mark ```yaml title="config.yaml" rules: - - Always annotate Python functions with their parameter and return types + - name: Color Themes + rule: | + When adding colors to components, use tailwind color classes. + Do NOT use explicit colors like text-gray-400. Instead, use theme colors. - - name: TypeScript best practices - rule: Always use TypeScript interfaces to define shape of objects. Use type aliases sparingly. - globs: "**/*.{ts,tsx}" + The common available theme colors are: + - For normal text: foreground, description, description-muted + - For other text, icons, etc: success, warning, error, accent, link + - For general components background, border, border-focus + - For specific components: - - name: TypeScript test patterns - rule: In TypeScript tests, use Jest's describe/it pattern and follow best practices for mocking. - globs: - - "src/**/*.test.ts" - - "tests/**/*.ts" - - - uses: myprofile/my-mood-setter - with: - TONE: concise + Any of these colors can be used in tailwind e.g. bg-primary, text-success, border-error, hover:bg-list-hover, etc. + globs: "*/*.tsx" ``` ## Chat System Message @@ -60,21 +58,21 @@ This can be viewed in the rules section of the toolbar (see above), or visit the Advanced users can override this system message for a specific model if needed by using `chatOptions.baseSystemMessage`. See the [`config.yaml` reference](../../reference.md#models). -## `.continuerules` +## `.continue/rules` -You can create project-specific rules by adding a `.continuerules` file to the root of your project. This file is raw text and its full contents will be used as rules. +You can create project-specific rules by adding a `.continue/rules` file to the root of your project. This file is raw text and its full contents will be used as rules. ### Simple Examples - If you want concise answers: -```title=.continuerules +```title=.continue/rules Please provide concise answers. Don't explain obvious concepts. You can assume that I am knowledgable about most programming topics. ``` - If you want to ensure certain practices are followed, for example in React: -```title=.continuerules +```title=.continue/rules Whenever you are writing React code, make sure to - use functional components instead of class components - use hooks for state management From 0fa75a28b59db92f1c5cd62bb16b1434318671b6 Mon Sep 17 00:00:00 2001 From: Brian 'bdougie' Douglas Date: Tue, 3 Jun 2025 14:44:35 -0700 Subject: [PATCH 030/118] info block fix --- docs/docs/customize/deep-dives/rules.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/docs/customize/deep-dives/rules.md b/docs/docs/customize/deep-dives/rules.md index 7faa9bf70..576a7e9ce 100644 --- a/docs/docs/customize/deep-dives/rules.md +++ b/docs/docs/customize/deep-dives/rules.md @@ -8,6 +8,7 @@ keywords: [rules, .continuerules, system, prompt, message] Rules provide instructions to the model for [Chat](../../chat/how-to-use-it.md), [Edit](../../edit/how-to-use-it.md), and [Agent](../../agent/how-to-use-it.md) requests. :::info Rules are not included in [autocomplete](./autocomplete.mdx) or [apply](../model-roles/apply.mdx). +::: You can view the current rules by clicking the pen icon above the main toolbar: @@ -21,9 +22,9 @@ Rules can be added to an Assistant on the Continue Hub. Explore available rules :::info Automatically create local rule blocks When in Agent mode, you can simply prompt the agent to create a rule for you using the `builtin_create_rule_block` tool if enabled. +::: For example, you can say "Create a rule for this", and a rule will be created for you in `.continue/rules` based on your conversation. -::: ### Syntax @@ -66,13 +67,13 @@ You can create project-specific rules by adding a `.continue/rules` file to the - If you want concise answers: -```title=.continue/rules +```title=.continuerules Please provide concise answers. Don't explain obvious concepts. You can assume that I am knowledgable about most programming topics. ``` - If you want to ensure certain practices are followed, for example in React: -```title=.continue/rules +```title=.continuerules Whenever you are writing React code, make sure to - use functional components instead of class components - use hooks for state management From c2a616573e41e1c3f7fdb09f1dd4b48396b212e6 Mon Sep 17 00:00:00 2001 From: Jacob Kim Date: Tue, 3 Jun 2025 14:51:45 -0700 Subject: [PATCH 031/118] add autocompleteOptions for ILLM interface --- core/index.d.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/index.d.ts b/core/index.d.ts index ad778d3d8..ba3712d05 100644 --- a/core/index.d.ts +++ b/core/index.d.ts @@ -94,6 +94,8 @@ export interface ILLM get providerName(): string; get underlyingProviderName(): string; + autocompleteOptions?: Partial; + complete( prompt: string, signal: AbortSignal, @@ -563,6 +565,7 @@ export interface LLMOptions { uniqueId?: string; baseAgentSystemMessage?: string; baseChatSystemMessage?: string; + autocompleteOptions?: Partial; contextLength?: number; maxStopWords?: number; completionOptions?: CompletionOptions; @@ -1090,6 +1093,7 @@ export interface RerankerDescription { params?: { [key: string]: any }; } +// TODO: We should consider renaming this to AutocompleteOptions. export interface TabAutocompleteOptions { disable: boolean; maxPromptTokens: number; From 2af7850205c29896c14d030d8b30cf8f76d96710 Mon Sep 17 00:00:00 2001 From: Jacob Kim Date: Tue, 3 Jun 2025 14:52:25 -0700 Subject: [PATCH 032/118] prepare the LLM first, then use it to get per-model autocompleteOptions --- core/autocomplete/CompletionProvider.ts | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/core/autocomplete/CompletionProvider.ts b/core/autocomplete/CompletionProvider.ts index cf6f3b298..f810e3a18 100644 --- a/core/autocomplete/CompletionProvider.ts +++ b/core/autocomplete/CompletionProvider.ts @@ -114,11 +114,12 @@ export class CompletionProvider { this.loggingService.markDisplayed(completionId, outcome); } - private async _getAutocompleteOptions() { + private async _getAutocompleteOptions(llm: ILLM) { const { config } = await this.configHandler.loadConfig(); const options = { ...DEFAULT_AUTOCOMPLETE_OPTS, ...config?.tabAutocompleteOptions, + ...llm.autocompleteOptions, }; return options; } @@ -136,15 +137,19 @@ export class CompletionProvider { token = controller.signal; } const startTime = Date.now(); - const options = await this._getAutocompleteOptions(); - // Debounce - if (await this.debouncer.delayAndShouldDebounce(options.debounceDelay)) { + // NOTE: There shouldn't be too big of a performance penalty here. + // If this ends up introducing too big of a bottleneck, + // we should consider a more clever way of passing llm to _getAutocompleteOptions. + const llm = await this._prepareLlm(); + if (!llm) { return undefined; } - const llm = await this._prepareLlm(); - if (!llm) { + const options = await this._getAutocompleteOptions(llm); + + // Debounce + if (await this.debouncer.delayAndShouldDebounce(options.debounceDelay)) { return undefined; } From 154257a2a00bbfb6b5f3ec56cff1eae1f5ba778d Mon Sep 17 00:00:00 2001 From: Jacob Kim Date: Tue, 3 Jun 2025 14:52:44 -0700 Subject: [PATCH 033/118] read autocompleteOptions from config --- core/config/yaml/models.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/core/config/yaml/models.ts b/core/config/yaml/models.ts index ffa891df6..edb47f59e 100644 --- a/core/config/yaml/models.ts +++ b/core/config/yaml/models.ts @@ -68,6 +68,7 @@ async function modelConfigToBaseLLM({ tools: model.capabilities?.includes("tool_use"), uploadImage: model.capabilities?.includes("image_input"), }, + autocompleteOptions: model.autocompleteOptions, }; // Model capabilities - need to be undefined if not found From 3d7294c27c42af64dd6a5c7e9801d5151af69cba Mon Sep 17 00:00:00 2001 From: Jacob Kim Date: Tue, 3 Jun 2025 14:53:29 -0700 Subject: [PATCH 034/118] conform BaseLLM to the new ILLM interface with autocompleteOptions --- core/llm/index.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/llm/index.ts b/core/llm/index.ts index 0d25d882c..ca33b7437 100644 --- a/core/llm/index.ts +++ b/core/llm/index.ts @@ -25,6 +25,7 @@ import { PromptLog, PromptTemplate, RequestOptions, + TabAutocompleteOptions, TemplateType, } from "../index.js"; import mergeJson from "../util/merge.js"; @@ -96,6 +97,8 @@ export abstract class BaseLLM implements ILLM { return this.providerName; } + autocompleteOptions?: Partial; + supportsFim(): boolean { return false; } @@ -275,6 +278,8 @@ export abstract class BaseLLM implements ILLM { this.maxEmbeddingChunkSize = options.maxEmbeddingChunkSize ?? DEFAULT_MAX_CHUNK_SIZE; this.embeddingId = `${this.constructor.name}::${this.model}::${this.maxEmbeddingChunkSize}`; + + this.autocompleteOptions = options.autocompleteOptions; } getConfigurationStatus() { From a3c5c22a20671b31a07ca6b938e1e55ea6e21e52 Mon Sep 17 00:00:00 2001 From: Jacob Kim Date: Tue, 3 Jun 2025 14:54:03 -0700 Subject: [PATCH 035/118] create a zod schema for autocompleteOptions --- packages/config-yaml/src/schemas/models.ts | 30 ++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/packages/config-yaml/src/schemas/models.ts b/packages/config-yaml/src/schemas/models.ts index 242baa737..f25c08843 100644 --- a/packages/config-yaml/src/schemas/models.ts +++ b/packages/config-yaml/src/schemas/models.ts @@ -106,6 +106,35 @@ const templateSchema = z.enum([ "codestral", ]); +export const autocompleteOptionsSchema = z.object({ + disable: z.boolean().optional(), + maxPromptTokens: z.number().optional(), + debounceDelay: z.number().optional(), + modelTimeout: z.number().optional(), + maxSuffixPercentage: z.number().optional(), + prefixPercentage: z.number().optional(), + transform: z.boolean().optional(), // not in docs: https://docs.continue.dev/json-reference#models + template: z.string().optional(), + multilineCompletions: z.enum(["always", "never", "auto"]).optional(), // not in docs + slidingWindowPrefixPercentage: z.number().optional(), // not in docs + slidingWindowSize: z.number().optional(), // not in docs + useCache: z.boolean().optional(), // not in docs + onlyMyCode: z.boolean().optional(), + useRecentlyEdited: z.boolean().optional(), // not in docs + disableInFiles: z.array(z.string()).optional(), // not in docs + useImports: z.boolean().optional(), // not in docs + showWhateverWeHaveAtXMs: z.number().optional(), // not in docs + experimental_includeClipboard: z.union([z.boolean(), z.number()]).optional(), // not in docs + experimental_includeRecentlyVisitedRanges: z + .union([z.boolean(), z.number()]) + .optional(), // not in docs + experimental_includeRecentlyEditedRanges: z + .union([z.boolean(), z.number()]) + .optional(), // not in docs + experimental_includeDiff: z.union([z.boolean(), z.number()]).optional(), // not in docs +}); +// .partial(); + /** Prompt templates use Handlebars syntax */ const promptTemplatesSchema = z.object({ apply: z.string().optional(), @@ -133,6 +162,7 @@ const baseModelFields = { env: z .record(z.string(), z.union([z.string(), z.boolean(), z.number()])) .optional(), + autocompleteOptions: autocompleteOptionsSchema.optional(), }; export const modelSchema = z.union([ From 1ee1df84b4011d6fbe28163d562bd9cd48921cae Mon Sep 17 00:00:00 2001 From: Brian 'bdougie' Douglas Date: Tue, 3 Jun 2025 14:54:21 -0700 Subject: [PATCH 036/118] fix broken links --- docs/docs/blocks/rules.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/blocks/rules.md b/docs/docs/blocks/rules.md index 570552b29..c43a28b5a 100644 --- a/docs/docs/blocks/rules.md +++ b/docs/docs/blocks/rules.md @@ -18,7 +18,7 @@ By implementing rules, you transform the AI from a generic coding assistant into ### How Rules Work -Your assistant detects rule blocks and applies the specified rules while in [Agent](agent/how-to-use-it), [Chat](chat/how-to-use-it), and [Edit](edit/how-to-use-it) modes. +Your assistant detects rule blocks and applies the specified rules while in [Agent](../agent/how-to-use-it), [Chat](../chat/how-to-use-it), and [Edit](../edit/how-to-use-it) modes. ## Learn More From 3164adbf00a3107087ca1804d0e7b798524631fb Mon Sep 17 00:00:00 2001 From: Jacob Kim Date: Tue, 3 Jun 2025 14:54:23 -0700 Subject: [PATCH 037/118] add vitest --- extensions/vscode/package-lock.json | 3 ++- gui/package-lock.json | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/extensions/vscode/package-lock.json b/extensions/vscode/package-lock.json index 78fa03df8..e516f171e 100644 --- a/extensions/vscode/package-lock.json +++ b/extensions/vscode/package-lock.json @@ -199,7 +199,8 @@ "onnxruntime-common": "1.14.0", "onnxruntime-web": "1.14.0", "ts-jest": "^29.1.1", - "typescript": "^5.6.3" + "typescript": "^5.6.3", + "vitest": "^3.1.4" }, "engines": { "node": ">=20.19.0" diff --git a/gui/package-lock.json b/gui/package-lock.json index 17f6b1514..1fb8463d7 100644 --- a/gui/package-lock.json +++ b/gui/package-lock.json @@ -203,7 +203,8 @@ "onnxruntime-common": "1.14.0", "onnxruntime-web": "1.14.0", "ts-jest": "^29.1.1", - "typescript": "^5.6.3" + "typescript": "^5.6.3", + "vitest": "^3.1.4" }, "engines": { "node": ">=20.19.0" From d70b434facb2f73c1be4b94ecbaccfeff760f793 Mon Sep 17 00:00:00 2001 From: Brian 'bdougie' Douglas Date: Tue, 3 Jun 2025 14:59:55 -0700 Subject: [PATCH 038/118] fix broken block --- docs/docs/customize/deep-dives/rules.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/customize/deep-dives/rules.md b/docs/docs/customize/deep-dives/rules.md index 576a7e9ce..4e4f1586a 100644 --- a/docs/docs/customize/deep-dives/rules.md +++ b/docs/docs/customize/deep-dives/rules.md @@ -22,9 +22,9 @@ Rules can be added to an Assistant on the Continue Hub. Explore available rules :::info Automatically create local rule blocks When in Agent mode, you can simply prompt the agent to create a rule for you using the `builtin_create_rule_block` tool if enabled. -::: For example, you can say "Create a rule for this", and a rule will be created for you in `.continue/rules` based on your conversation. +::: ### Syntax From 84f08d02fae5ba88c8c7326a5ae0bfcb5356c699 Mon Sep 17 00:00:00 2001 From: Brian 'bdougie' Douglas Date: Tue, 3 Jun 2025 15:39:33 -0700 Subject: [PATCH 039/118] fix typo in agent docs --- docs/docs/agent/how-to-customize.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/agent/how-to-customize.md b/docs/docs/agent/how-to-customize.md index d19edacb1..1770768a6 100644 --- a/docs/docs/agent/how-to-customize.md +++ b/docs/docs/agent/how-to-customize.md @@ -8,7 +8,7 @@ sidebar_position: 5 ## Add Rules Blocks Adding Rules can be done in your assistant locally or in the Hub. -[Explore Rules on the Hub](https://hub.continue.dev/explore/rules) and see the [Ruls deep dive](../customize/deep-dives/rules.md) for more details and tips on creating rules. +[Explore Rules on the Hub](https://hub.continue.dev/explore/rules) and see the [Rules deep dive](../customize/deep-dives/rules.md) for more details and tips on creating rules. ## Add MCP tools From 21d1b2374bf0917e4aa64d42dbee61387c8f4e68 Mon Sep 17 00:00:00 2001 From: Brian 'bdougie' Douglas Date: Tue, 3 Jun 2025 15:40:36 -0700 Subject: [PATCH 040/118] revert .continuerules change --- docs/docs/customize/deep-dives/rules.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/docs/docs/customize/deep-dives/rules.md b/docs/docs/customize/deep-dives/rules.md index 4e4f1586a..8218d5db2 100644 --- a/docs/docs/customize/deep-dives/rules.md +++ b/docs/docs/customize/deep-dives/rules.md @@ -59,9 +59,15 @@ This can be viewed in the rules section of the toolbar (see above), or visit the Advanced users can override this system message for a specific model if needed by using `chatOptions.baseSystemMessage`. See the [`config.yaml` reference](../../reference.md#models). -## `.continue/rules` +## `.continuerules` -You can create project-specific rules by adding a `.continue/rules` file to the root of your project. This file is raw text and its full contents will be used as rules. +:::warning + +`.contninuerules` will be deprecarted in a future release. Please use `.continue/rules` instead. + +::: + +You can create project-specific rules by adding a `.continuerules` file to the root of your project. This file is raw text and its full contents will be used as rules. ### Simple Examples From 00d9c0b71b84371dd9a4d8eb0acb5d833b58a5d6 Mon Sep 17 00:00:00 2001 From: Brian 'bdougie' Douglas Date: Tue, 3 Jun 2025 16:06:25 -0700 Subject: [PATCH 041/118] reorg the file to flow better --- docs/docs/customize/deep-dives/rules.md | 51 +++++++++++++++---------- 1 file changed, 30 insertions(+), 21 deletions(-) diff --git a/docs/docs/customize/deep-dives/rules.md b/docs/docs/customize/deep-dives/rules.md index 8218d5db2..dc65bb788 100644 --- a/docs/docs/customize/deep-dives/rules.md +++ b/docs/docs/customize/deep-dives/rules.md @@ -26,50 +26,50 @@ When in Agent mode, you can simply prompt the agent to create a rule for you usi For example, you can say "Create a rule for this", and a rule will be created for you in `.continue/rules` based on your conversation. ::: +### `.continue/rules` folder +You can create project-specific rules by adding a `.continue/rules` folder to the root of your project and adding new rule files. + +```yaml title="new-rule.yaml" +name: New rule +version: 0.0.1 +schema: v1 +rules: + - Always give concise responses + +``` +This is also done when selecting "Add Rule" in the Assistant settings. This will create a new folder in `.continue/rules` with a default file named `new-rule.yaml`. + ### Syntax Rules blocks can be simple text, written in YAML configuration files, or as Markdown (`.md`) files. They can have the following properties: - `name` (**required**): A display name/title for the rule - `rule` (**required**): The text content of the rule +- `schema` (**required**): The schema version of the YAML file (e.g., `v1`) - `globs` (optional): When files are provided as context that match this glob pattern, the rule will be included. This can be either a single pattern (e.g., `"**/*.{ts,tsx}"`) or an array of patterns (e.g., `["src/**/*.ts", "tests/**/*.ts"]`). -```yaml title="config.yaml" +```yaml title=colors.yaml" +name: New rules +version: 0.0.1 +schema: v1 rules: - - name: Color Themes + - name: Tailwind Color Themes rule: | When adding colors to components, use tailwind color classes. Do NOT use explicit colors like text-gray-400. Instead, use theme colors. - - The common available theme colors are: - - For normal text: foreground, description, description-muted - - For other text, icons, etc: success, warning, error, accent, link - - For general components background, border, border-focus - - For specific components: - - Any of these colors can be used in tailwind e.g. bg-primary, text-success, border-error, hover:bg-list-hover, etc. globs: "*/*.tsx" ``` - -## Chat System Message - -Continue includes a simple default system message for [Chat](../../chat/how-to-use-it.md) and [Agent](../../agent/how-to-use-it.md) requests, to help the model provide reliable codeblock formats in its output. - -This can be viewed in the rules section of the toolbar (see above), or visit the source code [here](https://github.com/continuedev/continue/blob/main/core/llm/constructMessages.ts#L4) - -Advanced users can override this system message for a specific model if needed by using `chatOptions.baseSystemMessage`. See the [`config.yaml` reference](../../reference.md#models). - ## `.continuerules` :::warning -`.contninuerules` will be deprecarted in a future release. Please use `.continue/rules` instead. +`.contninuerules` will be deprecated in a future release. Please use the `.continue/rules` folder instead. ::: You can create project-specific rules by adding a `.continuerules` file to the root of your project. This file is raw text and its full contents will be used as rules. -### Simple Examples +## Simple Examples - If you want concise answers: @@ -87,3 +87,12 @@ Whenever you are writing React code, make sure to - use Tailwind CSS for styling - modularize components into smaller, reusable pieces ``` + +## Chat System Message + +Continue includes a simple default system message for [Chat](../../chat/how-to-use-it.md) and [Agent](../../agent/how-to-use-it.md) requests, to help the model provide reliable codeblock formats in its output. + +This can be viewed in the rules section of the toolbar (see above), or visit the source code [here](https://github.com/continuedev/continue/blob/main/core/llm/constructMessages.ts#L4) + +Advanced users can override this system message for a specific model if needed by using `chatOptions.baseSystemMessage`. See the [`config.yaml` reference](../../reference.md#models). + From c4d47bac6147b64e45eef7d7056746b096df9b3e Mon Sep 17 00:00:00 2001 From: Brian 'bdougie' Douglas Date: Tue, 3 Jun 2025 16:14:05 -0700 Subject: [PATCH 042/118] example improvements --- docs/docs/customize/deep-dives/rules.md | 76 +++++++++++++------------ 1 file changed, 41 insertions(+), 35 deletions(-) diff --git a/docs/docs/customize/deep-dives/rules.md b/docs/docs/customize/deep-dives/rules.md index dc65bb788..c176c392e 100644 --- a/docs/docs/customize/deep-dives/rules.md +++ b/docs/docs/customize/deep-dives/rules.md @@ -21,11 +21,31 @@ To form the system message, rules are joined with new lines, in the order they a Rules can be added to an Assistant on the Continue Hub. Explore available rules [here](https://hub.continue.dev/explore/rules), or [create your own](https://hub.continue.dev/new?type=block&blockType=rules) in the Hub. These blocks are defined using the [`config.yaml` syntax](../../reference.md#rules) and can also be created locally. :::info Automatically create local rule blocks -When in Agent mode, you can simply prompt the agent to create a rule for you using the `builtin_create_rule_block` tool if enabled. +When in Agent mode, you can prompt the agent to create a rule for you using the `builtin_create_rule_block` tool if enabled. For example, you can say "Create a rule for this", and a rule will be created for you in `.continue/rules` based on your conversation. ::: +### Syntax + +Rules blocks can be simple text, written in YAML configuration files, or as Markdown (`.md`) files. They can have the following properties: + +- `name` (**required**): A display name/title for the rule +- `rule` (**required**): The text content of the rule +- `schema` (**required**): The schema version of the YAML file (e.g., `v1`) +- `globs` (optional): When files are provided as context that match this glob pattern, the rule will be included. This can be either a single pattern (e.g., `"**/*.{ts,tsx}"`) or an array of patterns (e.g., `["src/**/*.ts", "tests/**/*.ts"]`). + +```yaml title=colors-rule.yaml" +name: New rules +version: 0.0.1 +schema: v1 +rules: + - name: Tailwind Color Themes + rule: | + When adding colors to components, use tailwind color classes. + Do NOT use explicit colors like text-gray-400. Instead, use theme colors. + globs: "*/*.tsx" +``` ### `.continue/rules` folder You can create project-specific rules by adding a `.continue/rules` folder to the root of your project and adding new rule files. @@ -39,27 +59,7 @@ rules: ``` This is also done when selecting "Add Rule" in the Assistant settings. This will create a new folder in `.continue/rules` with a default file named `new-rule.yaml`. -### Syntax - -Rules blocks can be simple text, written in YAML configuration files, or as Markdown (`.md`) files. They can have the following properties: - -- `name` (**required**): A display name/title for the rule -- `rule` (**required**): The text content of the rule -- `schema` (**required**): The schema version of the YAML file (e.g., `v1`) -- `globs` (optional): When files are provided as context that match this glob pattern, the rule will be included. This can be either a single pattern (e.g., `"**/*.{ts,tsx}"`) or an array of patterns (e.g., `["src/**/*.ts", "tests/**/*.ts"]`). - -```yaml title=colors.yaml" -name: New rules -version: 0.0.1 -schema: v1 -rules: - - name: Tailwind Color Themes - rule: | - When adding colors to components, use tailwind color classes. - Do NOT use explicit colors like text-gray-400. Instead, use theme colors. - globs: "*/*.tsx" -``` -## `.continuerules` +### `.continuerules` :::warning @@ -69,23 +69,29 @@ rules: You can create project-specific rules by adding a `.continuerules` file to the root of your project. This file is raw text and its full contents will be used as rules. -## Simple Examples +### Examples -- If you want concise answers: +If you want concise answers: -```title=.continuerules -Please provide concise answers. Don't explain obvious concepts. You can assume that I am knowledgable about most programming topics. +```yaml title="concise-rule.yaml" +rules: + - name: Always give concise answers + rule: | + Please provide concise answers. Don't explain obvious concepts. + You can assume that I am knowledgable about most programming topics. ``` +If you want to ensure certain practices are followed, for example in React: -- If you want to ensure certain practices are followed, for example in React: - -```title=.continuerules -Whenever you are writing React code, make sure to -- use functional components instead of class components -- use hooks for state management -- define an interface for your component props -- use Tailwind CSS for styling -- modularize components into smaller, reusable pieces +```yaml title="functional-rule.yaml" +rules: + - name: Always use functional components + rule: | + Whenever you are writing React code, make sure to + - use functional components instead of class components + - use hooks for state management + - define an interface for your component props + - use Tailwind CSS for styling + - modularize components into smaller, reusable pieces ``` ## Chat System Message From f87289abfbf5b6c92fd94f65906593061184337b Mon Sep 17 00:00:00 2001 From: Brian 'bdougie' Douglas Date: Tue, 3 Jun 2025 16:26:11 -0700 Subject: [PATCH 043/118] updates filenames --- docs/docs/customize/deep-dives/rules.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/docs/customize/deep-dives/rules.md b/docs/docs/customize/deep-dives/rules.md index c176c392e..a2560f867 100644 --- a/docs/docs/customize/deep-dives/rules.md +++ b/docs/docs/customize/deep-dives/rules.md @@ -35,7 +35,7 @@ Rules blocks can be simple text, written in YAML configuration files, or as Mark - `schema` (**required**): The schema version of the YAML file (e.g., `v1`) - `globs` (optional): When files are provided as context that match this glob pattern, the rule will be included. This can be either a single pattern (e.g., `"**/*.{ts,tsx}"`) or an array of patterns (e.g., `["src/**/*.ts", "tests/**/*.ts"]`). -```yaml title=colors-rule.yaml" +```yaml title=".continue/rules/colors-rule.yaml" name: New rules version: 0.0.1 schema: v1 @@ -49,7 +49,7 @@ rules: ### `.continue/rules` folder You can create project-specific rules by adding a `.continue/rules` folder to the root of your project and adding new rule files. -```yaml title="new-rule.yaml" +```yaml title=".continue/rules/new-rule.yaml" name: New rule version: 0.0.1 schema: v1 @@ -73,7 +73,7 @@ You can create project-specific rules by adding a `.continuerules` file to the r If you want concise answers: -```yaml title="concise-rule.yaml" +```yaml title=".continue/rules/concise-rule.yaml" rules: - name: Always give concise answers rule: | @@ -82,7 +82,7 @@ rules: ``` If you want to ensure certain practices are followed, for example in React: -```yaml title="functional-rule.yaml" +```yaml title=".continue/rules/functional-rule.yaml" rules: - name: Always use functional components rule: | From b7fad2cc78f4f6026f3f9e9a88f97238b5ff42e8 Mon Sep 17 00:00:00 2001 From: Jacob Kim Date: Tue, 3 Jun 2025 17:59:07 -0700 Subject: [PATCH 044/118] read .continueignore and check if the current filepath matches the pattern in continueignore --- core/autocomplete/prefiltering/index.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/core/autocomplete/prefiltering/index.ts b/core/autocomplete/prefiltering/index.ts index 8db50cda6..33a0856f3 100644 --- a/core/autocomplete/prefiltering/index.ts +++ b/core/autocomplete/prefiltering/index.ts @@ -1,6 +1,7 @@ import ignore from "ignore"; import { IDE } from "../.."; +import { getGlobalContinueIgArray } from "../../indexing/ignore"; import { getConfigJsonPath } from "../../util/paths"; import { findUriInDirs } from "../../util/uri"; import { HelperVars } from "../util/HelperVars"; @@ -50,7 +51,11 @@ export async function shouldPrefilter( } // Check whether autocomplete is disabled for this file - const disableInFiles = [...(helper.options.disableInFiles ?? []), "*.prompt"]; + const disableInFiles = [ + ...(helper.options.disableInFiles ?? []), + "*.prompt", + ...getGlobalContinueIgArray(), + ]; if (await isDisabledForFile(helper.filepath, disableInFiles, ide)) { return true; } From e64d70338b063304b6122616604d024a571526e0 Mon Sep 17 00:00:00 2001 From: Jacob Kim Date: Tue, 3 Jun 2025 17:59:34 -0700 Subject: [PATCH 045/118] update deps --- extensions/vscode/package-lock.json | 3 ++- gui/package-lock.json | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/extensions/vscode/package-lock.json b/extensions/vscode/package-lock.json index 78fa03df8..e516f171e 100644 --- a/extensions/vscode/package-lock.json +++ b/extensions/vscode/package-lock.json @@ -199,7 +199,8 @@ "onnxruntime-common": "1.14.0", "onnxruntime-web": "1.14.0", "ts-jest": "^29.1.1", - "typescript": "^5.6.3" + "typescript": "^5.6.3", + "vitest": "^3.1.4" }, "engines": { "node": ">=20.19.0" diff --git a/gui/package-lock.json b/gui/package-lock.json index 17f6b1514..1fb8463d7 100644 --- a/gui/package-lock.json +++ b/gui/package-lock.json @@ -203,7 +203,8 @@ "onnxruntime-common": "1.14.0", "onnxruntime-web": "1.14.0", "ts-jest": "^29.1.1", - "typescript": "^5.6.3" + "typescript": "^5.6.3", + "vitest": "^3.1.4" }, "engines": { "node": ">=20.19.0" From b86bc6f727e292c2d3a8fb1511646c36e2a2531f Mon Sep 17 00:00:00 2001 From: Patrick Erichsen Date: Tue, 3 Jun 2025 20:36:25 -0700 Subject: [PATCH 046/118] feat: refactor onboarding card --- .continue/rules/gui-link-opening.md | 10 + core/protocol/core.ts | 7 +- gui/src/components/AddModelButtonSubtext.tsx | 2 +- gui/src/components/Layout.tsx | 13 +- .../OnboardingCard/OnboardingCard.tsx | 66 ++++--- ...ubmitButton.tsx => ApiKeySubmitButton.tsx} | 13 +- .../components/BestExperienceConfigForm.tsx | 171 ------------------ .../components/OllamaModelDownload.tsx | 2 +- .../components/OnboardingApiKeyTab.tsx | 13 ++ .../components/OnboardingCardLanding.tsx | 101 +++++++++++ .../components/OnboardingCardTabs.tsx | 59 ++---- ...ngLocalTab.tsx => OnboardingOllamaTab.tsx} | 19 +- .../components/ProviderAlert.tsx | 36 ---- .../OnboardingCard/components/index.ts | 9 + .../OnboardingCard/hooks/useOnboardingCard.ts | 23 ++- .../platform/PlatformOnboardingCard.tsx | 66 ------- .../OnboardingCard/platform/tabs/main.tsx | 108 ----------- .../OnboardingCard/tabs/OnboardingBestTab.tsx | 22 --- .../tabs/OnboardingQuickstartTab.tsx | 31 ---- .../components/OnboardingCard/tabs/index.ts | 3 - gui/src/components/OnboardingCard/utils.ts | 8 +- .../dialogs/FreeTrialOverDialog.tsx | 4 +- gui/src/components/index.ts | 7 - .../LumpToolbar/BlockSettingsTopToolbar.tsx | 4 +- .../components/modelSelection/ModelSelect.tsx | 16 +- .../modelSelection/ModelSelectionListbox.tsx | 72 ++++---- gui/src/forms/AddModelForm.tsx | 16 +- gui/src/pages/config/HelpCenterSection.tsx | 7 +- gui/src/pages/gui/Chat.tsx | 3 +- gui/src/pages/gui/EmptyChatBody.tsx | 8 +- 30 files changed, 302 insertions(+), 617 deletions(-) create mode 100644 .continue/rules/gui-link-opening.md rename gui/src/components/OnboardingCard/components/{QuickStartSubmitButton.tsx => ApiKeySubmitButton.tsx} (84%) delete mode 100644 gui/src/components/OnboardingCard/components/BestExperienceConfigForm.tsx create mode 100644 gui/src/components/OnboardingCard/components/OnboardingApiKeyTab.tsx create mode 100644 gui/src/components/OnboardingCard/components/OnboardingCardLanding.tsx rename gui/src/components/OnboardingCard/components/{OnboardingLocalTab.tsx => OnboardingOllamaTab.tsx} (91%) delete mode 100644 gui/src/components/OnboardingCard/components/ProviderAlert.tsx create mode 100644 gui/src/components/OnboardingCard/components/index.ts delete mode 100644 gui/src/components/OnboardingCard/platform/PlatformOnboardingCard.tsx delete mode 100644 gui/src/components/OnboardingCard/platform/tabs/main.tsx delete mode 100644 gui/src/components/OnboardingCard/tabs/OnboardingBestTab.tsx delete mode 100644 gui/src/components/OnboardingCard/tabs/OnboardingQuickstartTab.tsx delete mode 100644 gui/src/components/OnboardingCard/tabs/index.ts diff --git a/.continue/rules/gui-link-opening.md b/.continue/rules/gui-link-opening.md new file mode 100644 index 000000000..db791e67a --- /dev/null +++ b/.continue/rules/gui-link-opening.md @@ -0,0 +1,10 @@ +--- +globs: gui/**/* +description: Ensures consistent URL opening behavior in GUI components using the + IDE messenger pattern +alwaysApply: false +--- + +# GUI Link Opening + +When adding functionality to open external links in GUI components, use `ideMessenger.post("openUrl", url)` where `ideMessenger` is obtained from `useContext(IdeMessengerContext)` diff --git a/core/protocol/core.ts b/core/protocol/core.ts index 142764d19..4d899b92c 100644 --- a/core/protocol/core.ts +++ b/core/protocol/core.ts @@ -35,7 +35,10 @@ import { import { SerializedOrgWithProfiles } from "../config/ProfileLifecycleManager"; import { ControlPlaneSessionInfo } from "../control-plane/AuthTypes"; -export type OnboardingModes = "Local" | "Best" | "Custom" | "Quickstart"; +export enum OnboardingModes { + API_KEYS = "API Keys", + OLLAMA = "Ollama", +} export interface ListHistoryOptions { offset?: number; @@ -197,7 +200,7 @@ export type ToCoreFromIdeOrWebviewProtocol = { { contextItems: ContextItem[]; errorMessage?: string }, ]; "clipboardCache/add": [{ content: string }, void]; - "controlPlane/openUrl": [{ path: string; orgSlug: string | undefined }, void]; + "controlPlane/openUrl": [{ path: string; orgSlug?: string }, void]; isItemTooBig: [{ item: ContextItemWithId }, boolean]; didChangeControlPlaneSessionInfo: [ { sessionInfo: ControlPlaneSessionInfo | undefined }, diff --git a/gui/src/components/AddModelButtonSubtext.tsx b/gui/src/components/AddModelButtonSubtext.tsx index aa7ef99b5..ed4bbda14 100644 --- a/gui/src/components/AddModelButtonSubtext.tsx +++ b/gui/src/components/AddModelButtonSubtext.tsx @@ -9,7 +9,7 @@ function AddModelButtonSubtext() { This will update your{" "} ideMessenger.post("config/openProfile", { profileId: undefined, diff --git a/gui/src/components/Layout.tsx b/gui/src/components/Layout.tsx index b5e4ebda6..b9a81d63d 100644 --- a/gui/src/components/Layout.tsx +++ b/gui/src/components/Layout.tsx @@ -1,3 +1,4 @@ +import { OnboardingModes } from "core/protocol/core"; import { useContext, useEffect } from "react"; import { Outlet, useLocation, useNavigate } from "react-router-dom"; import styled from "styled-components"; @@ -13,13 +14,14 @@ import { enterEdit, exitEdit } from "../redux/thunks/edit"; import { saveCurrentSession } from "../redux/thunks/session"; import { fontSize, isMetaEquivalentKeyPressed } from "../util"; import { incrementFreeTrialCount } from "../util/freeTrial"; +import { getLocalStorage } from "../util/localStorage"; import { ROUTES } from "../util/navigation"; import { FatalErrorIndicator } from "./config/FatalErrorNotice"; import TextDialog from "./dialogs"; import Footer from "./Footer"; import { LumpProvider } from "./mainInput/Lump/LumpContext"; import { useMainEditor } from "./mainInput/TipTapEditor"; -import { isNewUserOnboarding, useOnboardingCard } from "./OnboardingCard"; +import { useOnboardingCard } from "./OnboardingCard"; import OSRContextMenu from "./OSRContextMenu"; import PostHogPageView from "./PosthogPageView"; @@ -131,7 +133,7 @@ const Layout = () => { useWebviewListener( "openOnboardingCard", async () => { - onboardingCard.open("Best"); + onboardingCard.open(OnboardingModes.API_KEYS); }, [], ); @@ -139,7 +141,7 @@ const Layout = () => { useWebviewListener( "setupLocalConfig", async () => { - onboardingCard.open("Local"); + onboardingCard.open(OnboardingModes.OLLAMA); }, [], ); @@ -179,7 +181,6 @@ const Layout = () => { if (isMetaEquivalentKeyPressed(event) && event.code === "KeyC") { const selection = window.getSelection()?.toString(); if (selection) { - // Copy to clipboard setTimeout(() => { void navigator.clipboard.writeText(selection); }, 100); @@ -196,10 +197,10 @@ const Layout = () => { useEffect(() => { if ( - isNewUserOnboarding() && + !getLocalStorage("onboardingStatus") && (location.pathname === "/" || location.pathname === "/index.html") ) { - onboardingCard.open("Quickstart"); + onboardingCard.open(); } }, [location]); diff --git a/gui/src/components/OnboardingCard/OnboardingCard.tsx b/gui/src/components/OnboardingCard/OnboardingCard.tsx index aa8be2a29..89e89a0aa 100644 --- a/gui/src/components/OnboardingCard/OnboardingCard.tsx +++ b/gui/src/components/OnboardingCard/OnboardingCard.tsx @@ -1,13 +1,18 @@ +import { OnboardingModes } from "core/protocol/core"; import { useAppSelector } from "../../redux/hooks"; import { getLocalStorage, setLocalStorage } from "../../util/localStorage"; import { ReusableCard } from "../ReusableCard"; -import { OnboardingCardTabs, TabTitle } from "./components/OnboardingCardTabs"; -import { useOnboardingCard } from "./hooks/useOnboardingCard"; -import * as Tabs from "./tabs"; +import { + OnboardingApiKeyTab, + OnboardingCardLanding, + OnboardingCardTabs, + OnboardingOllamaTab, +} from "./components"; +import { useOnboardingCard } from "./hooks"; export interface OnboardingCardState { show?: boolean; - activeTab?: TabTitle; + activeTab?: OnboardingModes; } interface OnboardingCardProps { @@ -15,37 +20,48 @@ interface OnboardingCardProps { } export function OnboardingCard({ isDialog }: OnboardingCardProps) { - const onboardingCard = useOnboardingCard(); + const { activeTab, close, setActiveTab } = useOnboardingCard(); const config = useAppSelector((store) => store.config.config); - function renderTabContent() { - switch (onboardingCard.activeTab) { - case "Quickstart": - return ; - case "Best": - return ; - case "Local": - return ; - default: - return ; - } - } - if (getLocalStorage("onboardingStatus") === undefined) { setLocalStorage("onboardingStatus", "Started"); } + function renderTabContent() { + switch (activeTab) { + case OnboardingModes.API_KEYS: + return ; + case OnboardingModes.OLLAMA: + return ; + default: + return ; + } + } + + if (activeTab) { + return ( + + + {renderTabContent()} + + ); + } + return ( onboardingCard.close()} - testId="onboarding-card" + onClose={close} > - - {renderTabContent()} +
+ setActiveTab(OnboardingModes.API_KEYS)} + isDialog={isDialog} + /> +
); } diff --git a/gui/src/components/OnboardingCard/components/QuickStartSubmitButton.tsx b/gui/src/components/OnboardingCard/components/ApiKeySubmitButton.tsx similarity index 84% rename from gui/src/components/OnboardingCard/components/QuickStartSubmitButton.tsx rename to gui/src/components/OnboardingCard/components/ApiKeySubmitButton.tsx index 07688fe6b..54f56f583 100644 --- a/gui/src/components/OnboardingCard/components/QuickStartSubmitButton.tsx +++ b/gui/src/components/OnboardingCard/components/ApiKeySubmitButton.tsx @@ -1,3 +1,4 @@ +import { OnboardingModes } from "core/protocol/core"; import { useContext } from "react"; import { useDispatch } from "react-redux"; import { Button, ButtonSubtext } from "../.."; @@ -7,15 +8,17 @@ import { isJetBrains } from "../../../util"; import { useSubmitOnboarding } from "../hooks"; import JetBrainsFetchGitHubTokenDialog from "./JetBrainsFetchGitHubTokenDialog"; -interface QuickstartSubmitButtonProps { +interface ApiKeySubmitButtonProps { isDialog?: boolean; } -function QuickstartSubmitButton({ isDialog }: QuickstartSubmitButtonProps) { +function ApiKeySubmitButton({ isDialog }: ApiKeySubmitButtonProps) { const ideMessenger = useContext(IdeMessengerContext); const dispatch = useDispatch(); - - const { submitOnboarding } = useSubmitOnboarding("Quickstart", isDialog); + const { submitOnboarding } = useSubmitOnboarding( + OnboardingModes.API_KEYS, + isDialog, + ); function onComplete() { submitOnboarding(); @@ -66,4 +69,4 @@ function QuickstartSubmitButton({ isDialog }: QuickstartSubmitButtonProps) { ); } -export default QuickstartSubmitButton; +export default ApiKeySubmitButton; diff --git a/gui/src/components/OnboardingCard/components/BestExperienceConfigForm.tsx b/gui/src/components/OnboardingCard/components/BestExperienceConfigForm.tsx deleted file mode 100644 index 0929aad8b..000000000 --- a/gui/src/components/OnboardingCard/components/BestExperienceConfigForm.tsx +++ /dev/null @@ -1,171 +0,0 @@ -import { CubeIcon } from "@heroicons/react/24/outline"; -import { FormEventHandler, useContext, useState } from "react"; -import { Button, Input, InputSubtext, lightGray } from "../.."; -import { useAuth } from "../../../context/Auth"; -import { IdeMessengerContext } from "../../../context/IdeMessenger"; -import { models } from "../../../pages/AddNewModel/configs/models"; -import { providers } from "../../../pages/AddNewModel/configs/providers"; -import { useAppDispatch } from "../../../redux/hooks"; -import { updateSelectedModelByRole } from "../../../redux/thunks"; -import AddModelButtonSubtext from "../../AddModelButtonSubtext"; - -const { anthropic, mistral } = providers; -const chatProvider = anthropic!; -const autocompleteProvider = mistral!; - -const { - claude35Sonnet: chatModel, - claude35Haiku: repoMapModel, - codestral: autocompleteModel, -} = models; - -interface BestExperienceConfigFormProps { - onComplete: () => void; -} - -function BestExperienceConfigForm({ - onComplete, -}: BestExperienceConfigFormProps) { - const dispatch = useAppDispatch(); - const { selectedProfile } = useAuth(); - - const ideMessenger = useContext(IdeMessengerContext); - - const [autocompleteApiKey, setAutocompleteApiKey] = useState(""); - const [chatApiKey, setChatApiKey] = useState(""); - - const handleSubmit: FormEventHandler = async (e) => { - e.preventDefault(); - - const chatModelConfig = { - model: chatModel.params.model, - provider: chatProvider.provider, - underlyingProviderName: chatProvider.provider, - apiKey: chatApiKey, - title: chatModel.params.title, - }; - - const repoMapConfig = { - model: repoMapModel.params.model, - provider: chatProvider.provider, - underlyingProviderName: chatProvider.provider, - apiKey: chatApiKey, - title: repoMapModel.params.title, - }; - - const autocompleteModelConfig = { - title: autocompleteModel.params.title, - provider: autocompleteProvider.provider, - underlyingProviderName: autocompleteProvider.provider, - model: autocompleteModel.params.model, - apiKey: autocompleteApiKey, - }; - - ideMessenger.post("config/addModel", { model: chatModelConfig }); - ideMessenger.post("config/addModel", { - model: repoMapConfig, - role: "repoMapFileSelection", - }); - - dispatch( - updateSelectedModelByRole({ - selectedProfile, - role: "chat", - modelTitle: chatModelConfig.title, - }), - ); - - if (!!autocompleteApiKey) { - await ideMessenger.request("addAutocompleteModel", { - model: autocompleteModelConfig, - }); - } - - onComplete(); - }; - - return ( -
-
-
-
- -
- - - {chatModel.title}{" "} - by Anthropic - -
-
- -
- setChatApiKey(e.target.value)} - data-testid="best-chat-api-key-input" - /> - - - Click here - {" "} - to create an Anthropic API key - -
-
- -
-
- -
- - - {autocompleteModel.title}{" "} - by Mistral - -
-
- -
- setAutocompleteApiKey(e.target.value)} - data-testid="best-autocomplete-api-key-input" - /> - - - Click here - {" "} - to create a Mistral API key - -
-
- -
- - -
-
-
- ); -} - -export default BestExperienceConfigForm; diff --git a/gui/src/components/OnboardingCard/components/OllamaModelDownload.tsx b/gui/src/components/OnboardingCard/components/OllamaModelDownload.tsx index c98ca6794..abce87d86 100644 --- a/gui/src/components/OnboardingCard/components/OllamaModelDownload.tsx +++ b/gui/src/components/OnboardingCard/components/OllamaModelDownload.tsx @@ -27,7 +27,7 @@ function OllamaModelDownload({ return (
-

{title}

+

{title}

{hasDownloaded ? ( ) : ( diff --git a/gui/src/components/OnboardingCard/components/OnboardingApiKeyTab.tsx b/gui/src/components/OnboardingCard/components/OnboardingApiKeyTab.tsx new file mode 100644 index 000000000..54ed617be --- /dev/null +++ b/gui/src/components/OnboardingCard/components/OnboardingApiKeyTab.tsx @@ -0,0 +1,13 @@ +import Alert from "../../gui/Alert"; + +interface OnboardingApiKeyTabProps { + isDialog?: boolean; +} + +export function OnboardingApiKeyTab({ isDialog }: OnboardingApiKeyTabProps) { + return ( +
+ Configure Continue to a variety of model providers +
+ ); +} diff --git a/gui/src/components/OnboardingCard/components/OnboardingCardLanding.tsx b/gui/src/components/OnboardingCard/components/OnboardingCardLanding.tsx new file mode 100644 index 000000000..d6e6b8a19 --- /dev/null +++ b/gui/src/components/OnboardingCard/components/OnboardingCardLanding.tsx @@ -0,0 +1,101 @@ +import { ChevronRightIcon } from "@heroicons/react/24/outline"; +import { useContext } from "react"; +import { Button, ButtonSubtext } from "../.."; +import { useAuth } from "../../../context/Auth"; +import { IdeMessengerContext } from "../../../context/IdeMessenger"; +import { selectCurrentOrg } from "../../../redux"; +import { useAppSelector } from "../../../redux/hooks"; +import { hasPassedFTL } from "../../../util/freeTrial"; +import ContinueLogo from "../../gui/ContinueLogo"; +import { ToolTip } from "../../gui/Tooltip"; +import { useOnboardingCard } from "../hooks"; + +export function OnboardingCardLanding({ + onSelectConfigure, + isDialog, +}: { + onSelectConfigure: () => void; + isDialog?: boolean; +}) { + const ideMessenger = useContext(IdeMessengerContext); + const onboardingCard = useOnboardingCard(); + const auth = useAuth(); + const currentOrg = useAppSelector(selectCurrentOrg); + + function onGetStarted() { + void auth.login(true).then((success) => { + if (success) { + onboardingCard.close(isDialog); + } + }); + } + + function openPastFreeTrialOnboarding() { + ideMessenger.post("controlPlane/openUrl", { + path: "setup-models", + orgSlug: currentOrg?.slug, + }); + onboardingCard.close(isDialog); + } + + const pastFreeTrialLimit = hasPassedFTL(); + + return ( +
+
+ +
+ + {pastFreeTrialLimit ? ( + <> +

+ You've reached the free trial limit. Visit the Continue Platform to + select a Coding Assistant. +

+ + + ) : ( + <> +

+ Log in to access a free trial of the +
+ + ideMessenger.post("controlPlane/openUrl", { + path: "pricing", + }) + } + > + Models Add-On + + + Free trial includes 50 Chat requests and 2,000 autocomplete + requests + +

+ + + + )} + + +
+ Or, configure your own models + +
+
+
+ ); +} diff --git a/gui/src/components/OnboardingCard/components/OnboardingCardTabs.tsx b/gui/src/components/OnboardingCard/components/OnboardingCardTabs.tsx index b1543ea58..26db153ed 100644 --- a/gui/src/components/OnboardingCard/components/OnboardingCardTabs.tsx +++ b/gui/src/components/OnboardingCard/components/OnboardingCardTabs.tsx @@ -1,33 +1,12 @@ +import { OnboardingModes } from "core/protocol/core"; import styled from "styled-components"; import { vscForeground } from "../.."; -import { hasPassedFTL } from "../../../util/freeTrial"; interface OnboardingCardTabsProps { - activeTab: TabTitle; - onTabClick: (tabName: TabTitle) => void; + activeTab: OnboardingModes; + onTabClick: (tabName: OnboardingModes) => void; } -export type TabTitle = "Quickstart" | "Best" | "Local" | "ExistingUserHubIntro"; - -export const TabTitles: { [k in TabTitle]: { md: string; default: string } } = { - Quickstart: { - md: "Quickstart", - default: "Quickstart", - }, - Best: { - md: "Best", - default: "Best experience", - }, - Local: { - md: "Local", - default: "Local with Ollama", - }, - ExistingUserHubIntro: { - md: "Try out hub.continue.dev", - default: "Try out hub.continue.dev", - }, -}; - const StyledSelect = styled.select` width: 100%; padding: 0.5rem; @@ -73,27 +52,21 @@ export function OnboardingCardTabs({ activeTab, onTabClick, }: OnboardingCardTabsProps) { + console.log({ keys: Object.values(OnboardingModes) }); return (
- {Object.entries(TabTitles).map(([tabType, titles]) => { - if (hasPassedFTL() && tabType === "Quickstart") { - return undefined; - } - + {Object.values(OnboardingModes).map((tabTitle) => { return ( onTabClick(tabType as TabTitle)} - data-testid={`onboarding-tab-${tabType}`} + key={tabTitle} + isActive={activeTab === tabTitle} + onClick={() => onTabClick(tabTitle as OnboardingModes)} + data-testid={`onboarding-tab-${tabTitle}`} > -

- {titles.default} -

-

{titles.md}

+

{tabTitle}

); })} @@ -102,16 +75,12 @@ export function OnboardingCardTabs({
onTabClick(e.target.value as TabTitle)} + onChange={(e) => onTabClick(e.target.value as OnboardingModes)} > - {Object.entries(TabTitles).map(([tabType, titles]) => { - if (hasPassedFTL() && tabType === "Quickstart") { - return null; - } - + {Object.values(OnboardingModes).map((tabTitle) => { return ( - ); })} diff --git a/gui/src/components/OnboardingCard/components/OnboardingLocalTab.tsx b/gui/src/components/OnboardingCard/components/OnboardingOllamaTab.tsx similarity index 91% rename from gui/src/components/OnboardingCard/components/OnboardingLocalTab.tsx rename to gui/src/components/OnboardingCard/components/OnboardingOllamaTab.tsx index b0cc6f179..e447fe530 100644 --- a/gui/src/components/OnboardingCard/components/OnboardingLocalTab.tsx +++ b/gui/src/components/OnboardingCard/components/OnboardingOllamaTab.tsx @@ -5,6 +5,7 @@ import { LOCAL_ONBOARDING_FIM_MODEL, LOCAL_ONBOARDING_PROVIDER_TITLE, } from "core/config/onboarding"; +import { OnboardingModes } from "core/protocol/core"; import { useContext, useEffect, useState } from "react"; import { Button, ButtonSubtext } from "../.."; import { useAuth } from "../../../context/Auth"; @@ -12,20 +13,24 @@ import { IdeMessengerContext } from "../../../context/IdeMessenger"; import { useAppDispatch } from "../../../redux/hooks"; import { setDialogMessage, setShowDialog } from "../../../redux/slices/uiSlice"; import { updateSelectedModelByRole } from "../../../redux/thunks"; +import Alert from "../../gui/Alert"; import { useSubmitOnboarding } from "../hooks"; import OllamaModelDownload from "./OllamaModelDownload"; import { OllamaStatus } from "./OllamaStatus"; const OLLAMA_CHECK_INTERVAL_MS = 3000; -interface OnboardingLocalTabProps { +interface OnboardingOllamaTabProps { isDialog?: boolean; } -function OnboardingLocalTab({ isDialog }: OnboardingLocalTabProps) { +export function OnboardingOllamaTab({ isDialog }: OnboardingOllamaTabProps) { const dispatch = useAppDispatch(); const ideMessenger = useContext(IdeMessengerContext); - const { submitOnboarding } = useSubmitOnboarding("Local", isDialog); + const { submitOnboarding } = useSubmitOnboarding( + OnboardingModes.OLLAMA, + isDialog, + ); const [hasLoadedChatModel, setHasLoadedChatModel] = useState(false); const [downloadedOllamaModels, setDownloadedOllamaModels] = useState< string[] @@ -133,10 +138,10 @@ function OnboardingLocalTab({ isDialog }: OnboardingLocalTabProps) { return (
+ Configure Continue to run models locally using Ollama +
-

- Install Ollama -

+

Install Ollama

@@ -175,5 +180,3 @@ function OnboardingLocalTab({ isDialog }: OnboardingLocalTabProps) {
); } - -export default OnboardingLocalTab; diff --git a/gui/src/components/OnboardingCard/components/ProviderAlert.tsx b/gui/src/components/OnboardingCard/components/ProviderAlert.tsx deleted file mode 100644 index 13e2eae11..000000000 --- a/gui/src/components/OnboardingCard/components/ProviderAlert.tsx +++ /dev/null @@ -1,36 +0,0 @@ -import { useDispatch } from "react-redux"; -import AddModelForm from "../../../forms/AddModelForm"; -import { setDialogMessage, setShowDialog } from "../../../redux/slices/uiSlice"; -import Alert from "../../gui/Alert"; -import { useSubmitOnboarding } from "../hooks"; - -function ProviderAlert() { - const dispatch = useDispatch(); - const { submitOnboarding } = useSubmitOnboarding("Custom"); - - function onClick() { - dispatch(setShowDialog(true)); - dispatch(setDialogMessage()); - } - - return ( -
- -

- Prefer to use a different provider like OpenAI? -

-

- - Click here - {" "} - to add a Chat model from OpenAI, Gemini, and more -

-
-
- ); -} - -export default ProviderAlert; diff --git a/gui/src/components/OnboardingCard/components/index.ts b/gui/src/components/OnboardingCard/components/index.ts new file mode 100644 index 000000000..bf7efbfd5 --- /dev/null +++ b/gui/src/components/OnboardingCard/components/index.ts @@ -0,0 +1,9 @@ +export * from "./ApiKeySubmitButton"; +export * from "./JetBrainsFetchGitHubTokenDialog"; +export * from "./OllamaCompletedStep"; +export * from "./OllamaModelDownload"; +export * from "./OllamaStatus"; +export * from "./OnboardingApiKeyTab"; +export * from "./OnboardingCardLanding"; +export * from "./OnboardingCardTabs"; +export * from "./OnboardingOllamaTab"; diff --git a/gui/src/components/OnboardingCard/hooks/useOnboardingCard.ts b/gui/src/components/OnboardingCard/hooks/useOnboardingCard.ts index 9622754c4..388ba8353 100644 --- a/gui/src/components/OnboardingCard/hooks/useOnboardingCard.ts +++ b/gui/src/components/OnboardingCard/hooks/useOnboardingCard.ts @@ -1,21 +1,19 @@ -import { useDispatch } from "react-redux"; +import { OnboardingModes } from "core/protocol/core"; import { useNavigate } from "react-router-dom"; -import { TabTitle } from "../components/OnboardingCardTabs"; +import { OnboardingCardState } from ".."; +import { useAppDispatch, useAppSelector } from "../../../redux/hooks"; import { setDialogMessage, setOnboardingCard, setShowDialog, } from "../../../redux/slices/uiSlice"; -import { OnboardingCardState } from ".."; import { getLocalStorage, setLocalStorage } from "../../../util/localStorage"; -import { useAppDispatch, useAppSelector } from "../../../redux/hooks"; -import { saveCurrentSession } from "../../../redux/thunks/session"; export interface UseOnboardingCard { show: OnboardingCardState["show"]; activeTab: OnboardingCardState["activeTab"]; - setActiveTab: (tab: TabTitle) => void; - open: (tab: TabTitle) => void; + setActiveTab: (tab: OnboardingModes) => void; + open: (tab?: OnboardingModes) => void; close: (isDialog?: boolean) => void; } @@ -40,9 +38,14 @@ export function useOnboardingCard(): UseOnboardingCard { show = onboardingStatus !== "Completed" && !hasDismissedOnboardingCard; } - async function open(tab: TabTitle) { + async function open(tab?: OnboardingModes) { navigate("/"); - dispatch(setOnboardingCard({ show: true, activeTab: tab })); + dispatch( + setOnboardingCard({ + show: true, + activeTab: tab ?? OnboardingModes.API_KEYS, + }), + ); } function close(isDialog = false) { @@ -54,7 +57,7 @@ export function useOnboardingCard(): UseOnboardingCard { } } - function setActiveTab(tab: TabTitle) { + function setActiveTab(tab: OnboardingModes) { dispatch(setOnboardingCard({ show: true, activeTab: tab })); } diff --git a/gui/src/components/OnboardingCard/platform/PlatformOnboardingCard.tsx b/gui/src/components/OnboardingCard/platform/PlatformOnboardingCard.tsx deleted file mode 100644 index 883ea66d1..000000000 --- a/gui/src/components/OnboardingCard/platform/PlatformOnboardingCard.tsx +++ /dev/null @@ -1,66 +0,0 @@ -import { useState } from "react"; -import { useAuth } from "../../../context/Auth"; -import { useAppSelector } from "../../../redux/hooks"; -import { getLocalStorage, setLocalStorage } from "../../../util/localStorage"; -import Alert from "../../gui/Alert"; -import { ReusableCard } from "../../ReusableCard"; -import { TabTitle } from "../components/OnboardingCardTabs"; -import OnboardingLocalTab from "../components/OnboardingLocalTab"; -import { useOnboardingCard } from "../hooks"; -import MainTab from "./tabs/main"; - -export interface OnboardingCardState { - show?: boolean; - activeTab?: TabTitle; -} - -interface OnboardingCardProps { - isDialog: boolean; -} - -export function PlatformOnboardingCard({ isDialog }: OnboardingCardProps) { - const onboardingCard = useOnboardingCard(); - const config = useAppSelector((store) => store.config.config); - const auth = useAuth(); - const [currentTab, setCurrentTab] = useState<"main" | "local">("main"); - - if (getLocalStorage("onboardingStatus") === undefined) { - setLocalStorage("onboardingStatus", "Started"); - } - - function onGetStarted() { - auth.login(true).then((success) => { - if (success) { - onboardingCard.close(isDialog); - } - }); - } - - return ( - onboardingCard.close()} - > -
- {currentTab === "main" ? ( - setCurrentTab("local")} - isDialog={isDialog} - /> - ) : ( -
- - By choosing this option, Continue will be configured by a local - config.yaml file. If you're just looking to use Ollama and still - want to manage your configuration through Continue, click{" "} - - here - - - -
- )} -
-
- ); -} diff --git a/gui/src/components/OnboardingCard/platform/tabs/main.tsx b/gui/src/components/OnboardingCard/platform/tabs/main.tsx deleted file mode 100644 index 9bad6a50f..000000000 --- a/gui/src/components/OnboardingCard/platform/tabs/main.tsx +++ /dev/null @@ -1,108 +0,0 @@ -import { ChevronRightIcon } from "@heroicons/react/24/outline"; -import { useContext } from "react"; -import { ButtonSubtext } from "../../.."; -import { useAuth } from "../../../../context/Auth"; -import { IdeMessengerContext } from "../../../../context/IdeMessenger"; -import { selectCurrentOrg } from "../../../../redux"; -import { useAppSelector } from "../../../../redux/hooks"; -import { hasPassedFTL } from "../../../../util/freeTrial"; -import ContinueLogo from "../../../gui/ContinueLogo"; -import { Button } from "../../../ui/Button"; -import { useOnboardingCard } from "../../hooks"; - -export default function MainTab({ - onRemainLocal, - isDialog, -}: { - onRemainLocal: () => void; - isDialog: boolean; -}) { - const ideMessenger = useContext(IdeMessengerContext); - const onboardingCard = useOnboardingCard(); - const auth = useAuth(); - const currentOrg = useAppSelector(selectCurrentOrg); - - function onGetStarted() { - void auth.login(true).then((success) => { - if (success) { - onboardingCard.close(isDialog); - } - }); - } - - function openPastFreeTrialOnboarding() { - ideMessenger.post("controlPlane/openUrl", { - path: "setup-models", - orgSlug: currentOrg?.slug, - }); - onboardingCard.close(isDialog); - } - - const pastFreeTrialLimit = hasPassedFTL(); - - return ( -
-
- -
- - {pastFreeTrialLimit ? ( - <> -

- You've reached the free trial limit. Visit the Continue Platform to - select a Coding Assistant. -

- - - ) : onboardingCard.activeTab === "ExistingUserHubIntro" ? ( - <> -

- You can now browse and create custom AI code assistants at{" "} - hub.continue.dev -

- - - - ) : ( - <> -

- Log in to quickly build your first custom AI code assistant -

- - - - )} - - {onboardingCard.activeTab === "ExistingUserHubIntro" ? ( - onboardingCard.close(isDialog)}> -
- Or, use Continue as usual - -
-
- ) : ( - -
- Or, remain local - -
-
- )} -
- ); -} diff --git a/gui/src/components/OnboardingCard/tabs/OnboardingBestTab.tsx b/gui/src/components/OnboardingCard/tabs/OnboardingBestTab.tsx deleted file mode 100644 index 17d2ead00..000000000 --- a/gui/src/components/OnboardingCard/tabs/OnboardingBestTab.tsx +++ /dev/null @@ -1,22 +0,0 @@ -import BestExperienceConfigForm from "../components/BestExperienceConfigForm"; -import ProviderAlert from "../components/ProviderAlert"; -import { useSubmitOnboarding } from "../hooks"; - -interface OnboardingBestTabProps { - isDialog?: boolean; -} - -function OnboardingBestTab({ isDialog }: OnboardingBestTabProps) { - const { submitOnboarding } = useSubmitOnboarding("Best", isDialog); - - return ( -
-
- -
- -
- ); -} - -export default OnboardingBestTab; diff --git a/gui/src/components/OnboardingCard/tabs/OnboardingQuickstartTab.tsx b/gui/src/components/OnboardingCard/tabs/OnboardingQuickstartTab.tsx deleted file mode 100644 index f291cf7c8..000000000 --- a/gui/src/components/OnboardingCard/tabs/OnboardingQuickstartTab.tsx +++ /dev/null @@ -1,31 +0,0 @@ -import ContinueLogo from "../../gui/ContinueLogo"; -import QuickStartSubmitButton from "../components/QuickStartSubmitButton"; - -interface OnboardingQuickstartTabProps { - isDialog?: boolean; -} - -function OnboardingQuickstartTab({ isDialog }: OnboardingQuickstartTabProps) { - return ( -
-
-
- -
- -

- Quickly get up and running using our API keys. After this trial, we'll - help you set up your own models. -

- -

- To prevent abuse, we'll ask you to sign in to GitHub. -

- - -
-
- ); -} - -export default OnboardingQuickstartTab; diff --git a/gui/src/components/OnboardingCard/tabs/index.ts b/gui/src/components/OnboardingCard/tabs/index.ts deleted file mode 100644 index 1e6aae37d..000000000 --- a/gui/src/components/OnboardingCard/tabs/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export { default as Local } from "../components/OnboardingLocalTab"; -export { default as Best } from "./OnboardingBestTab"; -export { default as Quickstart } from "./OnboardingQuickstartTab"; diff --git a/gui/src/components/OnboardingCard/utils.ts b/gui/src/components/OnboardingCard/utils.ts index 4d2b8ef2c..45822ead4 100644 --- a/gui/src/components/OnboardingCard/utils.ts +++ b/gui/src/components/OnboardingCard/utils.ts @@ -1,14 +1,10 @@ +import { OnboardingModes } from "core/protocol/core"; import { getLocalStorage, setLocalStorage } from "../../util/localStorage"; import { OnboardingCardState } from "./OnboardingCard"; -// Note that there is no "NotStarted" status since the -// local storage value is null until onboarding begins export type OnboardingStatus = "Started" | "Completed"; -// If there is no value in local storage for "onboardingStatus", -// it implies that the user has not begun or completed onboarding. export function isNewUserOnboarding() { - // We used to use "onboardingComplete", but switched to "onboardingStatus" const onboardingCompleteLegacyValue = localStorage.getItem("onboardingComplete"); @@ -24,7 +20,7 @@ export function isNewUserOnboarding() { export const defaultOnboardingCardState: OnboardingCardState = { show: false, - activeTab: "Quickstart", + activeTab: OnboardingModes.API_KEYS, }; export enum OllamaConnectionStatuses { diff --git a/gui/src/components/dialogs/FreeTrialOverDialog.tsx b/gui/src/components/dialogs/FreeTrialOverDialog.tsx index a200b2f15..8f66075bc 100644 --- a/gui/src/components/dialogs/FreeTrialOverDialog.tsx +++ b/gui/src/components/dialogs/FreeTrialOverDialog.tsx @@ -2,7 +2,7 @@ import { useEffect } from "react"; import { useDispatch } from "react-redux"; import { useAppSelector } from "../../redux/hooks"; import { setDialogMessage, setShowDialog } from "../../redux/slices/uiSlice"; -import { PlatformOnboardingCard } from "../OnboardingCard/platform/PlatformOnboardingCard"; +import { OnboardingCard } from "../OnboardingCard"; function FreeTrialOverDialog() { const dispatch = useDispatch(); @@ -17,7 +17,7 @@ function FreeTrialOverDialog() { return (
- +
); } diff --git a/gui/src/components/index.ts b/gui/src/components/index.ts index 217c9203d..a13b7643a 100644 --- a/gui/src/components/index.ts +++ b/gui/src/components/index.ts @@ -85,13 +85,6 @@ export const GhostButton = styled.button` } `; -export const InputSubtext = styled.span` - font-size: 0.75rem; - line-height: 1rem; - color: ${lightGray}; - margin-top: 0.25rem; -`; - export const ButtonSubtext = styled.span` display: block; margin-top: 0; diff --git a/gui/src/components/mainInput/Lump/LumpToolbar/BlockSettingsTopToolbar.tsx b/gui/src/components/mainInput/Lump/LumpToolbar/BlockSettingsTopToolbar.tsx index 8fe721155..a9bf99d71 100644 --- a/gui/src/components/mainInput/Lump/LumpToolbar/BlockSettingsTopToolbar.tsx +++ b/gui/src/components/mainInput/Lump/LumpToolbar/BlockSettingsTopToolbar.tsx @@ -99,7 +99,7 @@ function BlockSettingsToolbarIcon( ? "bg-error" : "bg-badge" : undefined - } relative flex select-none items-center rounded-full px-[3px] transition-all duration-200 focus:outline-none focus-visible:ring-2 focus-visible:ring-blue-500/50 sm:px-1 ${props.className || ""}`} + } relative flex select-none items-center rounded-full px-[3px] py-0.5 transition-all duration-200 focus:outline-none focus-visible:ring-2 focus-visible:ring-blue-500/50 sm:px-1 ${props.className || ""}`} >
-
+
- {isSelected && } - {hovered && ( - - )} + +
@@ -251,7 +251,7 @@ function ModelSelect() { onClick={onClickAddModel} value={"addModel" as any} > -
+
Add Chat model
diff --git a/gui/src/components/modelSelection/ModelSelectionListbox.tsx b/gui/src/components/modelSelection/ModelSelectionListbox.tsx index 3db8ce9c5..aa61e18f5 100644 --- a/gui/src/components/modelSelection/ModelSelectionListbox.tsx +++ b/gui/src/components/modelSelection/ModelSelectionListbox.tsx @@ -22,6 +22,7 @@ import { Transition, } from "../../components/ui"; import { DisplayInfo } from "../../pages/AddNewModel/configs/models"; + export const StyledListbox = styled(Listbox)` background-color: ${vscBackground}; `; @@ -82,6 +83,7 @@ export const StyledListboxOptions = styled(ListboxOptions)` outline: none; } `; + export const StyledListboxOption = styled(ListboxOption)<{ selected: boolean; }>` @@ -93,6 +95,7 @@ export const StyledListboxOption = styled(ListboxOption)<{ display: flex; gap: 8px; align-items: center; + justify-content: space-between; &:hover { background-color: ${vscListActiveBackground}; @@ -128,7 +131,7 @@ function ModelSelectionListbox({ @@ -146,28 +149,27 @@ function ModelSelectionListbox({ {({ selected }) => ( <> - {option.title === "Autodetect" ? ( - - ) : ( - window.vscMediaUrl && - option.icon && ( - - ) - )} - {option.title} - +
+ {option.title === "Autodetect" ? ( + + ) : ( + window.vscMediaUrl && + option.icon && ( + + ) + )} + {option.title} +
{selected && ( - - +
)} diff --git a/gui/src/pages/config/HelpCenterSection.tsx b/gui/src/pages/config/HelpCenterSection.tsx index e49a17780..004e5b78a 100644 --- a/gui/src/pages/config/HelpCenterSection.tsx +++ b/gui/src/pages/config/HelpCenterSection.tsx @@ -81,7 +81,12 @@ export function HelpCenterSection() { generateTitle: true, }), ); - dispatch(setOnboardingCard({ show: true, activeTab: "Best" })); + dispatch( + setOnboardingCard({ + show: true, + activeTab: undefined, + }), + ); ideMessenger.post("showTutorial", undefined); }} /> diff --git a/gui/src/pages/gui/Chat.tsx b/gui/src/pages/gui/Chat.tsx index c3e8ac512..eb6259f07 100644 --- a/gui/src/pages/gui/Chat.tsx +++ b/gui/src/pages/gui/Chat.tsx @@ -54,6 +54,7 @@ import { incrementFreeTrialCount, } from "../../util/freeTrial"; +import { OnboardingModes } from "core/protocol/core"; import { getLocalStorage, setLocalStorage } from "../../util/localStorage"; import { EmptyChatBody } from "./EmptyChatBody"; import { ExploreDialogWatcher } from "./ExploreDialogWatcher"; @@ -207,7 +208,7 @@ export function Chat() { // Card in chat will only show if no history // Also, note that platform card ignore the "Best", always opens to main tab - onboardingCard.open("Best"); + onboardingCard.open(OnboardingModes.API_KEYS); // If history, show the dialog, which will automatically close if there is not history if (history.length) { diff --git a/gui/src/pages/gui/EmptyChatBody.tsx b/gui/src/pages/gui/EmptyChatBody.tsx index ac8ba7631..54185f597 100644 --- a/gui/src/pages/gui/EmptyChatBody.tsx +++ b/gui/src/pages/gui/EmptyChatBody.tsx @@ -1,7 +1,6 @@ import { ConversationStarterCards } from "../../components/ConversationStarters"; import { ExploreHubCard } from "../../components/ExploreHubCard"; import { OnboardingCard } from "../../components/OnboardingCard"; -import { PlatformOnboardingCard } from "../../components/OnboardingCard/platform/PlatformOnboardingCard"; export interface EmptyChatBodyProps { showOnboardingCard?: boolean; @@ -11,12 +10,7 @@ export function EmptyChatBody({ showOnboardingCard }: EmptyChatBodyProps) { if (showOnboardingCard) { return (
- {true ? ( - // For now we are excluding local onboarding options other than ollama - - ) : ( - - )} +
); } From 7fc3a8d9e8b356f3b0be0fc638a8e43079fc66a6 Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Tue, 3 Jun 2025 20:54:37 -0700 Subject: [PATCH 047/118] update gemini llm info and create new update llm info prompt --- .continue/prompts/update-llm-info.prompt | 79 ++++++++++++++++++++ packages/llm-info/src/providers/gemini.ts | 87 ++++++++++++++++++++--- 2 files changed, 158 insertions(+), 8 deletions(-) create mode 100644 .continue/prompts/update-llm-info.prompt diff --git a/.continue/prompts/update-llm-info.prompt b/.continue/prompts/update-llm-info.prompt new file mode 100644 index 000000000..7264ebf38 --- /dev/null +++ b/.continue/prompts/update-llm-info.prompt @@ -0,0 +1,79 @@ +name: Update LLM Info +description: Updates Gemini blocks with latest information +version: 2 +--- +I need you to update this repo with the latest information about large language models from certain providers. +The information is stored in the `packages/llm-info` directory, which operates as its own npm package. +Information is stored in a simple JSON format, with one file of models per "provider" (e.g. gemini, ollama, openai, etc). +For example, Gemini model information is stored in `packages/llm-info/src/providers/gemini.ts`. + +To make these updates for a given provider, perform the following steps one at a time: + +1. VIEW CURRENT INFORMATION + +To view the current llm info, read the file (e.g. `packages/llm-info/src/providers/gemini.ts`) using the read_file tool. +If you do not see a tool for reading files, let me know. + +For reference, here is the LLMInfo interface used to store the information: + +```typescript +export interface LlmInfo { + model: string; // the model name used to distinguish the model at the API layer, e.g. "gemini-2.5-pro-preview-05-06" + displayName?: string; // A fitting display name, e.g. "Gemini 2.5 Pro Preview" + description?: string; // A short description of the model, as similar as possible to descriptions found on the provider's website + contextLength?: number; // The size of the context window in tokens, often called "max input tokens" or "context length" + maxCompletionTokens?: number; // The maximum number of tokens the model can output + regex?: RegExp; // A regex expression to uniquely match the model name if it had some slight modifications/upgrades, e.g. /gemini-2\.5-pro-preview/i + mediaTypes?: MediaType[]; // Input/output types supported by the model, e.g. [MediaType.Text, MediaType.Image] +} + +export enum MediaType { + Text = "text", + Image = "image", + Audio = "audio", + Video = "video", +} + +export const AllMediaTypes = [ + MediaType.Text, + MediaType.Image, + MediaType.Audio, + MediaType.Video, +]; +``` + +2. EXTRACT NEW INFORMATION + +New information will be pulled from the internet. +If you do not see a web search tool, let me know. + +Retrieve the following sites per these providers, and consider these notes on how to extract the information: +- "gemini": https://ai.google.dev/gemini-api/docs/models - maxCompletionTokens is called "Output token limit", contextLength is called "Input token limit" +// TODO: add info for openai, ollama, etc + +For any other providers, search the web for "latest [provider] models" and find the most relevant model information using your best judgement. +Generally, ignore models that do not support text output. These models will be used in a coding assistant client that only supports text/image input and text/output, so extraneous capabilities can be ignored. +Sometimes, "Experimental", "Preview", or similar versions of models are available. The latest-date version of each should have its own information maintained. + +3. UPDATE THE INFORMATION + +Use the edit file tool to submit updates to the relevant provider file (e.g. `packages/llm-info/src/providers/gemini.ts`). +Let me know if you do not see a tool for editing files. + +Generally, avoid making changes to existing information, as it is probably up to date. +Primarily, focus on adding new models or adding missing information to existing models. +NEVER delete any existing models, but let me know if you think one should be removed. +Stop to ask me if you are unsure about any changes, and let me know if there are updates that seem nuanced, complex, or extremely notable. +Provide a summary of changes after the fact. + +4. ASK IF I WANT TO PUBLISH TO NPM +After you are done updating everything, remind me that I need to publish the changes to npm. + +// TODO too sensitive for now +// If yes, update `packages/llm-info/package.json` with the new version number and then +// - use the terminal tool to commit the changes +// - use the terminal tool to publish changes to npm +// If you do not see a tool for running terminal commands, let me know. + +// User input +Please update LLM Info for the following providers. If "all", update all providers mentioned above: diff --git a/packages/llm-info/src/providers/gemini.ts b/packages/llm-info/src/providers/gemini.ts index 25af94688..214ad1299 100644 --- a/packages/llm-info/src/providers/gemini.ts +++ b/packages/llm-info/src/providers/gemini.ts @@ -1,10 +1,45 @@ import { AllMediaTypes, ModelProvider } from "../types.js"; +// See https://ai.google.dev/gemini-api/docs/models export const Gemini: ModelProvider = { models: [ { - model: "gemini-2.0-flash", + model: "gemini-2.5-pro-preview-05-06", + displayName: "Gemini 2.5 Pro Preview", + description: + "Google's most advanced model with strong reasoning, multimodal capabilities, and advanced coding skills", + contextLength: 1048576, + maxCompletionTokens: 65536, + mediaTypes: AllMediaTypes, + regex: /gemini-2\.5-pro-preview/i, + recommendedFor: ["chat"], + }, + { + model: "gemini-2.5-pro-exp-03-25", + displayName: "Gemini 2.5 Pro Experimental", + description: + "Experimental release of Gemini 2.5 Pro with 1M token context window", + contextLength: 1048576, + maxCompletionTokens: 65536, + mediaTypes: AllMediaTypes, + regex: /gemini-2\.5-pro-exp/i, + recommendedFor: ["chat"], + }, + { + model: "gemini-2.5-flash-preview-05-20", + displayName: "Gemini 2.5 Flash Preview", + description: + "Fast, token-efficient multimodal model for complex tasks with 1M context window", + contextLength: 1048576, + maxCompletionTokens: 65536, + mediaTypes: AllMediaTypes, + regex: /gemini-2\.5-flash-preview/i, + recommendedFor: ["chat"], + }, + { + model: "gemini-2.0-flash", // stable gemini-2.0-flash-001 displayName: "Gemini 2.0 Flash", + description: "Fast, efficient model with strong multimodal capabilities", contextLength: 1048576, maxCompletionTokens: 8192, mediaTypes: AllMediaTypes, @@ -12,58 +47,94 @@ export const Gemini: ModelProvider = { recommendedFor: ["chat"], }, { - model: "gemini-2.0-flash-lite", + model: "gemini-2.0-flash-lite", // stable gemini-2.0-flash-lite-001 displayName: "Gemini 2.0 Flash Lite", + description: + "Small, fast model with reduced latency and memory requirements", contextLength: 1048576, maxCompletionTokens: 8192, mediaTypes: AllMediaTypes, regex: /gemini-2\.0-flash-lite/i, recommendedFor: ["chat"], }, + { + model: "gemini-2.0-flash-preview-image-generation", + displayName: "Gemini 2.0 Flash Image Generation Preview", + description: + "Model with image generation capabilities and improved visual quality", + contextLength: 32000, + maxCompletionTokens: 8192, + mediaTypes: AllMediaTypes, + regex: /gemini-2\.0-flash-preview-image-generation/i, + recommendedFor: ["chat"], + }, { model: "gemini-2.0-flash-exp-image-generation", - displayName: "Gemini 2.0 Flash Image Generation", - contextLength: 32768, + displayName: "Gemini 2.0 Flash Image Generation Experimental", + description: "Experimental model with image generation capabilities", + contextLength: 32000, maxCompletionTokens: 8192, mediaTypes: AllMediaTypes, regex: /gemini-2\.0-flash-exp-image-generation/i, recommendedFor: ["chat"], }, { - model: "gemini-2.5-pro-exp-03-25", - displayName: "Gemini 2.5 Pro Exp", + model: "gemini-2.0-flash-exp", + displayName: "Gemini 2.0 Flash Experimental", + description: + "Experimental version of Gemini 2.0 Flash with extended capabilities", contextLength: 1048576, - maxCompletionTokens: 65536, + maxCompletionTokens: 8192, mediaTypes: AllMediaTypes, - regex: /gemini-2\.5-pro-exp-03-25/i, + regex: /gemini-2\.0-flash-exp/i, recommendedFor: ["chat"], }, { model: "gemini-1.5-flash", displayName: "Gemini 1.5 Flash", + description: "Fast multimodal model with 1M token context window", contextLength: 1048576, maxCompletionTokens: 8192, mediaTypes: AllMediaTypes, regex: /gemini-1\.5-flash/i, recommendedFor: ["chat"], }, + { + model: "gemini-1.5-flash-8b", + displayName: "Gemini 1.5 Flash 8b", + description: + "Smaller version of Gemini 1.5 Flash optimized for efficiency", + contextLength: 1048576, + maxCompletionTokens: 8192, + mediaTypes: AllMediaTypes, + regex: /gemini-1\.5-flash-8b/i, + recommendedFor: ["chat"], + }, { model: "gemini-1.5-pro", displayName: "Gemini 1.5 Pro", + description: + "Mid-size multimodal model capable of handling extensive inputs and complex reasoning tasks", contextLength: 2097152, maxCompletionTokens: 8192, + mediaTypes: AllMediaTypes, regex: /gemini-1\.5-pro/i, recommendedFor: ["chat"], }, { model: "gemini-1.0-pro", displayName: "Gemini 1.0 Pro", + description: "First generation Gemini pro model", + contextLength: 32768, + maxCompletionTokens: 8192, + mediaTypes: AllMediaTypes, regex: /gemini-1\.0-pro/i, }, // embed { model: "models/text-embedding-004", displayName: "Gemini Text Embedding", + description: "Text embedding model for vectorizing content", recommendedFor: ["embed"], }, ], From 18462b6b852eeb7f5ef02159f10f2ef139247950 Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Tue, 3 Jun 2025 20:57:39 -0700 Subject: [PATCH 048/118] Update Gemini models with detailed descriptions and metadata --- packages/llm-info/package-lock.json | 22 ++++++++++++++++++++-- packages/llm-info/package.json | 6 +++--- 2 files changed, 23 insertions(+), 5 deletions(-) diff --git a/packages/llm-info/package-lock.json b/packages/llm-info/package-lock.json index 80db35a66..e067640dd 100644 --- a/packages/llm-info/package-lock.json +++ b/packages/llm-info/package-lock.json @@ -1,17 +1,28 @@ { "name": "@continuedev/llm-info", - "version": "1.0.6", + "version": "1.0.9", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@continuedev/llm-info", - "version": "1.0.6", + "version": "1.0.9", "license": "Apache-2.0", "devDependencies": { + "@types/node": "^22.15.29", "typescript": "^5.5.2" } }, + "node_modules/@types/node": { + "version": "22.15.29", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.15.29.tgz", + "integrity": "sha512-LNdjOkUDlU1RZb8e1kOIUpN1qQUlzGkEtbVNo53vbrwDg5om6oduhm4SiUaPW5ASTXhAiP0jInWG8Qx9fVlOeQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": "~6.21.0" + } + }, "node_modules/typescript": { "version": "5.6.3", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.3.tgz", @@ -24,6 +35,13 @@ "engines": { "node": ">=14.17" } + }, + "node_modules/undici-types": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", + "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==", + "dev": true, + "license": "MIT" } } } diff --git a/packages/llm-info/package.json b/packages/llm-info/package.json index 64061fe97..75989edbb 100644 --- a/packages/llm-info/package.json +++ b/packages/llm-info/package.json @@ -1,6 +1,6 @@ { "name": "@continuedev/llm-info", - "version": "1.0.8", + "version": "1.0.9", "description": "", "main": "dist/index.js", "types": "dist/index.d.ts", @@ -12,7 +12,7 @@ "author": "Nate Sesti and Ty Dunn", "license": "Apache-2.0", "devDependencies": { + "@types/node": "^22.15.29", "typescript": "^5.5.2" - }, - "dependencies": {} + } } From efaeb80d4efb0aa6d2442fb5658902b6e940cc4d Mon Sep 17 00:00:00 2001 From: Brian 'bdougie' Douglas Date: Tue, 3 Jun 2025 21:41:13 -0700 Subject: [PATCH 049/118] more structure and img --- docs/docs/customize/deep-dives/rules.md | 8 ++++++-- docs/static/img/add-local-rules.png | Bin 0 -> 54904 bytes 2 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 docs/static/img/add-local-rules.png diff --git a/docs/docs/customize/deep-dives/rules.md b/docs/docs/customize/deep-dives/rules.md index a2560f867..2b7904e8a 100644 --- a/docs/docs/customize/deep-dives/rules.md +++ b/docs/docs/customize/deep-dives/rules.md @@ -10,15 +10,17 @@ Rules provide instructions to the model for [Chat](../../chat/how-to-use-it.md), :::info Rules are not included in [autocomplete](./autocomplete.mdx) or [apply](../model-roles/apply.mdx). ::: +## How it works You can view the current rules by clicking the pen icon above the main toolbar: ![rules input toolbar section](/img/notch-rules.png) To form the system message, rules are joined with new lines, in the order they appear in the toolbar. This includes the base chat system message ([see below](#chat-system-message)). -## `rules` blocks +## Creating `rules` blocks +Rules can be added locally using the "Add Rules" button while viewing the Local Assistant's rules. -Rules can be added to an Assistant on the Continue Hub. Explore available rules [here](https://hub.continue.dev/explore/rules), or [create your own](https://hub.continue.dev/new?type=block&blockType=rules) in the Hub. These blocks are defined using the [`config.yaml` syntax](../../reference.md#rules) and can also be created locally. +![add local rules button](/img/add-local-rules.png) :::info Automatically create local rule blocks When in Agent mode, you can prompt the agent to create a rule for you using the `builtin_create_rule_block` tool if enabled. @@ -26,6 +28,8 @@ When in Agent mode, you can prompt the agent to create a rule for you using the For example, you can say "Create a rule for this", and a rule will be created for you in `.continue/rules` based on your conversation. ::: +Rules can also be added to an Assistant on the Continue Hub. Explore available rules [here](https://hub.continue.dev/explore/rules), or [create your own](https://hub.continue.dev/new?type=block&blockType=rules) in the Hub. These blocks are defined using the [`config.yaml` syntax](../../reference.md#rules) and can also be created locally. + ### Syntax Rules blocks can be simple text, written in YAML configuration files, or as Markdown (`.md`) files. They can have the following properties: diff --git a/docs/static/img/add-local-rules.png b/docs/static/img/add-local-rules.png new file mode 100644 index 0000000000000000000000000000000000000000..67417d3022937d700e7f3ecc0c8b17ba56f74c25 GIT binary patch literal 54904 zcma%i1ymf%*6!f$0fG+@2!Y`4PH+wG5M*$7cZUQU+#$F-!6m`n-Q8UuIp^G)v;OzL zwcgC?)z!P|t6h6nb#?c*t3u^vKcOJvBLV;b6bW$=MF0Sj4gi1{hlhQY44ex9UoW&l z!ou zYgTsfS(>?tAuTJ3A&?feGuTsOMxqYDXWUn(ntP<{)ViwA$PIU>j67cmap)YA>{&c= zzvNIG$8suNDmM*$PC#izUE2*S<bScrjRcx4-CaCUo z?ko+p_Sz?)H%=IeCTKYj{&gs#Rio47%lGXIo-lbYfJ>hX3_Kr^RrM;!pm)ID04_Z?jju%Md7CRd+P;D5$z~cUJj(hcYf{~hp zv5X9W`ZWy?fPugSK)t3QUjG0Hd;rW}X#hYHg5bYtMF^^Y%0L1D!5{$iKV>vt&%b{$ zug5F;pEK0AAOPI!73S*^kO}#p(vWnSQ2$9ojKAgq1eJs(Bwo)-hIU3qR`#aW4tfkb z#jgSc8*z1e004*L_W>cH`0n&|z|4R?t2wC2NOKulThi%&u{JQGbFsAfT@QfAh3hqG zY2=^}bg{IsvgdN)CHt!c*K7K>n4S#yR}lwuUNSWqd7!Yhoe_|Yj)9JWj1Lh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+++++++++++++++++++++++- docs/static/img/pirate-rule-test.png | Bin 0 -> 78915 bytes 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 docs/static/img/pirate-rule-test.png diff --git a/docs/docs/customize/deep-dives/rules.md b/docs/docs/customize/deep-dives/rules.md index 2b7904e8a..309adef3d 100644 --- a/docs/docs/customize/deep-dives/rules.md +++ b/docs/docs/customize/deep-dives/rules.md @@ -17,6 +17,27 @@ You can view the current rules by clicking the pen icon above the main toolbar: To form the system message, rules are joined with new lines, in the order they appear in the toolbar. This includes the base chat system message ([see below](#chat-system-message)). +## Quick Start + +Below is a quick example of setting up a new rule file: + +1. Create a folder called `.continue/rules` at the top level of your workspace +2. Add a file called `pirates-rule.yaml` to this folder. +3. Write the following contents to `pirates-rule.prompt` and save. + +```yaml title=".continue/rules/pirates-rule.yaml" +name: Pirate rule +version: 0.0.1 +schema: v1 +rules: + - Talk like a pirate. +``` + +Now test your rules by asking a question about a file in chat. + +![pirate rule test](/img/pirate-rule-test.png) + + ## Creating `rules` blocks Rules can be added locally using the "Add Rules" button while viewing the Local Assistant's rules. @@ -28,7 +49,9 @@ When in Agent mode, you can prompt the agent to create a rule for you using the For example, you can say "Create a rule for this", and a rule will be created for you in `.continue/rules` based on your conversation. ::: -Rules can also be added to an Assistant on the Continue Hub. Explore available rules [here](https://hub.continue.dev/explore/rules), or [create your own](https://hub.continue.dev/new?type=block&blockType=rules) in the Hub. These blocks are defined using the [`config.yaml` syntax](../../reference.md#rules) and can also be created locally. +Rules can also be added to an Assistant on the Continue Hub. + +Explore available rules [here](https://hub.continue.dev/explore/rules), or [create your own](https://hub.continue.dev/new?type=block&blockType=rules) in the Hub. These blocks are defined using the [`config.yaml` syntax](../../reference.md#rules) and can also be created locally. ### Syntax diff --git a/docs/static/img/pirate-rule-test.png b/docs/static/img/pirate-rule-test.png new file mode 100644 index 0000000000000000000000000000000000000000..13d0c1972116f18caec95993fb0dc9d85b64228e GIT binary patch literal 78915 zcmeFZcT`hb*EbrF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as Date: Tue, 3 Jun 2025 21:56:32 -0700 Subject: [PATCH 051/118] revert syntax example for now --- docs/docs/customize/deep-dives/rules.md | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/docs/docs/customize/deep-dives/rules.md b/docs/docs/customize/deep-dives/rules.md index 309adef3d..52e5223c8 100644 --- a/docs/docs/customize/deep-dives/rules.md +++ b/docs/docs/customize/deep-dives/rules.md @@ -62,16 +62,23 @@ Rules blocks can be simple text, written in YAML configuration files, or as Mark - `schema` (**required**): The schema version of the YAML file (e.g., `v1`) - `globs` (optional): When files are provided as context that match this glob pattern, the rule will be included. This can be either a single pattern (e.g., `"**/*.{ts,tsx}"`) or an array of patterns (e.g., `["src/**/*.ts", "tests/**/*.ts"]`). -```yaml title=".continue/rules/colors-rule.yaml" -name: New rules -version: 0.0.1 -schema: v1 +```yaml title=".config.yaml" rules: - - name: Tailwind Color Themes - rule: | - When adding colors to components, use tailwind color classes. - Do NOT use explicit colors like text-gray-400. Instead, use theme colors. - globs: "*/*.tsx" + - Always annotate Python functions with their parameter and return types + + - name: TypeScript best practices + rule: Always use TypeScript interfaces to define shape of objects. Use type aliases sparingly. + globs: "**/*.{ts,tsx}" + + - name: TypeScript test patterns + rule: In TypeScript tests, use Jest's describe/it pattern and follow best practices for mocking. + globs: + - "src/**/*.test.ts" + - "tests/**/*.ts" + + - uses: myprofile/my-mood-setter + with: + TONE: concise ``` ### `.continue/rules` folder You can create project-specific rules by adding a `.continue/rules` folder to the root of your project and adding new rule files. From e4b3f9e2a4799ba202656e3332d40eed266ec513 Mon Sep 17 00:00:00 2001 From: Nate Date: Wed, 4 Jun 2025 09:00:04 -0700 Subject: [PATCH 052/118] bump fetch --- core/package-lock.json | 9 +- core/package.json | 2 +- packages/fetch/package-lock.json | 267 +------------------------------ packages/fetch/package.json | 2 +- 4 files changed, 8 insertions(+), 272 deletions(-) diff --git a/core/package-lock.json b/core/package-lock.json index 8079461a3..f6eabcae4 100644 --- a/core/package-lock.json +++ b/core/package-lock.json @@ -14,7 +14,7 @@ "@aws-sdk/credential-providers": "^3.778.0", "@continuedev/config-types": "^1.0.13", "@continuedev/config-yaml": "file:../packages/config-yaml", - "@continuedev/fetch": "^1.0.10", + "@continuedev/fetch": "^1.0.13", "@continuedev/llm-info": "^1.0.8", "@continuedev/openai-adapters": "^1.0.25", "@modelcontextprotocol/sdk": "^1.12.0", @@ -2928,10 +2928,9 @@ "link": true }, "node_modules/@continuedev/fetch": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/@continuedev/fetch/-/fetch-1.0.10.tgz", - "integrity": "sha512-RBUXtm/VDz+9Itgw+CxrHXwVXoHCAedGzPOgA7gS5HZ9lObaeCJgEfzmfbln1ocFsfqSFmn5X5wSE7DHgfxpVA==", - "license": "Apache-2.0", + "version": "1.0.13", + "resolved": "https://registry.npmjs.org/@continuedev/fetch/-/fetch-1.0.13.tgz", + "integrity": "sha512-7vwsefFBozsutv355zD7mEhFfl6UT4KXRH1QXRzjdbCaYneiRdFLe6UAwV2wGnH71Lj76gOLnTlcGoTV357OZg==", "dependencies": { "@continuedev/config-types": "^1.0.5", "follow-redirects": "^1.15.6", diff --git a/core/package.json b/core/package.json index cb2274cc6..370896a6f 100644 --- a/core/package.json +++ b/core/package.json @@ -51,7 +51,7 @@ "@aws-sdk/credential-providers": "^3.778.0", "@continuedev/config-types": "^1.0.13", "@continuedev/config-yaml": "file:../packages/config-yaml", - "@continuedev/fetch": "^1.0.10", + "@continuedev/fetch": "^1.0.13", "@continuedev/llm-info": "^1.0.8", "@continuedev/openai-adapters": "^1.0.25", "@modelcontextprotocol/sdk": "^1.12.0", diff --git a/packages/fetch/package-lock.json b/packages/fetch/package-lock.json index 58a83593b..1bf3a3a0b 100644 --- a/packages/fetch/package-lock.json +++ b/packages/fetch/package-lock.json @@ -1,12 +1,12 @@ { "name": "@continuedev/fetch", - "version": "1.0.12", + "version": "1.0.13", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@continuedev/fetch", - "version": "1.0.12", + "version": "1.0.13", "license": "Apache-2.0", "dependencies": { "@continuedev/config-types": "^1.0.5", @@ -17,8 +17,6 @@ }, "devDependencies": { "@types/follow-redirects": "^1.14.4", - "cross-env": "^7.0.3", - "ts-node": "^10.9.2", "vitest": "^3.2.0" } }, @@ -30,28 +28,6 @@ "zod": "^3.23.8" } }, - "node_modules/@cspotcode/source-map-support": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", - "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", - "dev": true, - "dependencies": { - "@jridgewell/trace-mapping": "0.3.9" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/@cspotcode/source-map-support/node_modules/@jridgewell/trace-mapping": { - "version": "0.3.9", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", - "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", - "dev": true, - "dependencies": { - "@jridgewell/resolve-uri": "^3.0.3", - "@jridgewell/sourcemap-codec": "^1.4.10" - } - }, "node_modules/@esbuild/aix-ppc64": { "version": "0.25.5", "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.5.tgz", @@ -452,15 +428,6 @@ "node": ">=18" } }, - "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", - "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", - "dev": true, - "engines": { - "node": ">=6.0.0" - } - }, "node_modules/@jridgewell/sourcemap-codec": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", @@ -727,30 +694,6 @@ "win32" ] }, - "node_modules/@tsconfig/node10": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.11.tgz", - "integrity": "sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw==", - "dev": true - }, - "node_modules/@tsconfig/node12": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", - "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", - "dev": true - }, - "node_modules/@tsconfig/node14": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", - "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", - "dev": true - }, - "node_modules/@tsconfig/node16": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz", - "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==", - "dev": true - }, "node_modules/@types/chai": { "version": "5.2.2", "resolved": "https://registry.npmjs.org/@types/chai/-/chai-5.2.2.tgz", @@ -897,30 +840,6 @@ "url": "https://opencollective.com/vitest" } }, - "node_modules/acorn": { - "version": "8.14.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.1.tgz", - "integrity": "sha512-OvQ/2pUDKmgfCg++xsTX1wGxfTaszcHVcTctW4UJB4hibJx2HXxxO5UmVgyjMa+ZDsiaf5wWLXYpRWMmBI0QHg==", - "dev": true, - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/acorn-walk": { - "version": "8.3.4", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.4.tgz", - "integrity": "sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g==", - "dev": true, - "dependencies": { - "acorn": "^8.11.0" - }, - "engines": { - "node": ">=0.4.0" - } - }, "node_modules/agent-base": { "version": "7.1.1", "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.1.tgz", @@ -932,12 +851,6 @@ "node": ">= 14" } }, - "node_modules/arg": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", - "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", - "dev": true - }, "node_modules/assertion-error": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-2.0.1.tgz", @@ -981,44 +894,6 @@ "node": ">= 16" } }, - "node_modules/create-require": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", - "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", - "dev": true - }, - "node_modules/cross-env": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-env/-/cross-env-7.0.3.tgz", - "integrity": "sha512-+/HKd6EgcQCJGh2PSjZuUitQBQynKor4wrFbRg4DtAgS1aWO+gU52xpH7M9ScGgXSYmAVS9bIJ8EzuaGw0oNAw==", - "dev": true, - "dependencies": { - "cross-spawn": "^7.0.1" - }, - "bin": { - "cross-env": "src/bin/cross-env.js", - "cross-env-shell": "src/bin/cross-env-shell.js" - }, - "engines": { - "node": ">=10.14", - "npm": ">=6", - "yarn": ">=1" - } - }, - "node_modules/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "dev": true, - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, "node_modules/data-uri-to-buffer": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz", @@ -1052,15 +927,6 @@ "node": ">=6" } }, - "node_modules/diff": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", - "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", - "dev": true, - "engines": { - "node": ">=0.3.1" - } - }, "node_modules/es-module-lexer": { "version": "1.7.0", "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.7.0.tgz", @@ -1215,12 +1081,6 @@ "node": ">= 14" } }, - "node_modules/isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "dev": true - }, "node_modules/loupe": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/loupe/-/loupe-3.1.3.tgz", @@ -1236,12 +1096,6 @@ "@jridgewell/sourcemap-codec": "^1.5.0" } }, - "node_modules/make-error": { - "version": "1.3.6", - "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", - "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", - "dev": true - }, "node_modules/ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", @@ -1300,15 +1154,6 @@ "url": "https://opencollective.com/node-fetch" } }, - "node_modules/path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/pathe": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/pathe/-/pathe-2.0.3.tgz", @@ -1397,27 +1242,6 @@ "fsevents": "~2.3.2" } }, - "node_modules/shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, - "dependencies": { - "shebang-regex": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/siginfo": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/siginfo/-/siginfo-2.0.0.tgz", @@ -1526,75 +1350,12 @@ "node": ">=14.0.0" } }, - "node_modules/ts-node": { - "version": "10.9.2", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz", - "integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==", - "dev": true, - "dependencies": { - "@cspotcode/source-map-support": "^0.8.0", - "@tsconfig/node10": "^1.0.7", - "@tsconfig/node12": "^1.0.7", - "@tsconfig/node14": "^1.0.0", - "@tsconfig/node16": "^1.0.2", - "acorn": "^8.4.1", - "acorn-walk": "^8.1.1", - "arg": "^4.1.0", - "create-require": "^1.1.0", - "diff": "^4.0.1", - "make-error": "^1.1.1", - "v8-compile-cache-lib": "^3.0.1", - "yn": "3.1.1" - }, - "bin": { - "ts-node": "dist/bin.js", - "ts-node-cwd": "dist/bin-cwd.js", - "ts-node-esm": "dist/bin-esm.js", - "ts-node-script": "dist/bin-script.js", - "ts-node-transpile-only": "dist/bin-transpile.js", - "ts-script": "dist/bin-script-deprecated.js" - }, - "peerDependencies": { - "@swc/core": ">=1.2.50", - "@swc/wasm": ">=1.2.50", - "@types/node": "*", - "typescript": ">=2.7" - }, - "peerDependenciesMeta": { - "@swc/core": { - "optional": true - }, - "@swc/wasm": { - "optional": true - } - } - }, - "node_modules/typescript": { - "version": "5.8.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.3.tgz", - "integrity": "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==", - "dev": true, - "peer": true, - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=14.17" - } - }, "node_modules/undici-types": { "version": "5.26.5", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", "dev": true }, - "node_modules/v8-compile-cache-lib": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", - "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", - "dev": true - }, "node_modules/vite": { "version": "6.3.5", "resolved": "https://registry.npmjs.org/vite/-/vite-6.3.5.tgz", @@ -1809,21 +1570,6 @@ "node": ">= 8" } }, - "node_modules/which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, "node_modules/why-is-node-running": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/why-is-node-running/-/why-is-node-running-2.3.0.tgz", @@ -1840,15 +1586,6 @@ "node": ">=8" } }, - "node_modules/yn": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", - "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", - "dev": true, - "engines": { - "node": ">=6" - } - }, "node_modules/zod": { "version": "3.23.8", "resolved": "https://registry.npmjs.org/zod/-/zod-3.23.8.tgz", diff --git a/packages/fetch/package.json b/packages/fetch/package.json index 9300bb2a2..f17bcfc69 100644 --- a/packages/fetch/package.json +++ b/packages/fetch/package.json @@ -1,6 +1,6 @@ { "name": "@continuedev/fetch", - "version": "1.0.12", + "version": "1.0.13", "description": "", "main": "dist/index.js", "types": "dist/index.d.ts", From 3eade31a803ed7b6bb65780931c8fed2d8d5ad70 Mon Sep 17 00:00:00 2001 From: Nate Date: Wed, 4 Jun 2025 10:39:35 -0700 Subject: [PATCH 053/118] update keywords --- extensions/vscode/package.json | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/extensions/vscode/package.json b/extensions/vscode/package.json index 5b05594ec..03b607b2a 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": "1.1.42", + "version": "1.1.43", "repository": { "type": "git", "url": "https://github.com/continuedev/continue" @@ -18,7 +18,7 @@ "homepage": "https://continue.dev", "qna": "https://github.com/continuedev/continue/issues/new/choose", "license": "Apache-2.0", - "displayName": "Continue - Codestral, Claude, and more", + "displayName": "Continue", "pricing": "Free", "description": "The leading open-source AI code assistant", "publisher": "Continue", @@ -41,15 +41,14 @@ ], "keywords": [ "chatgpt", + "cline", + "roo", "github", "copilot", "claude", - "sonnet", "mistral", "codestral", - "codegpt", - "ai", - "llama" + "ai" ], "activationEvents": [ "onUri", From 04f1e98ac26459f5c127712d4c10ff8c03cfd6bb Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Wed, 4 Jun 2025 11:08:42 -0700 Subject: [PATCH 054/118] premature close tinkering --- packages/fetch/package-lock.json | 263 ------------ packages/fetch/src/chunk-transformer.test.ts | 137 +++++++ packages/fetch/src/node-fetch-bug.test.ts | 135 +++++++ packages/fetch/src/premature-close.test.ts | 405 +++++++++++++++++++ 4 files changed, 677 insertions(+), 263 deletions(-) create mode 100644 packages/fetch/src/chunk-transformer.test.ts create mode 100644 packages/fetch/src/node-fetch-bug.test.ts create mode 100644 packages/fetch/src/premature-close.test.ts diff --git a/packages/fetch/package-lock.json b/packages/fetch/package-lock.json index 58a83593b..f2f55c648 100644 --- a/packages/fetch/package-lock.json +++ b/packages/fetch/package-lock.json @@ -17,8 +17,6 @@ }, "devDependencies": { "@types/follow-redirects": "^1.14.4", - "cross-env": "^7.0.3", - "ts-node": "^10.9.2", "vitest": "^3.2.0" } }, @@ -30,28 +28,6 @@ "zod": "^3.23.8" } }, - "node_modules/@cspotcode/source-map-support": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", - "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", - "dev": true, - "dependencies": { - "@jridgewell/trace-mapping": "0.3.9" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/@cspotcode/source-map-support/node_modules/@jridgewell/trace-mapping": { - "version": "0.3.9", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", - "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", - "dev": true, - "dependencies": { - "@jridgewell/resolve-uri": "^3.0.3", - "@jridgewell/sourcemap-codec": "^1.4.10" - } - }, "node_modules/@esbuild/aix-ppc64": { "version": "0.25.5", "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.5.tgz", @@ -452,15 +428,6 @@ "node": ">=18" } }, - "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", - "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", - "dev": true, - "engines": { - "node": ">=6.0.0" - } - }, "node_modules/@jridgewell/sourcemap-codec": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", @@ -727,30 +694,6 @@ "win32" ] }, - "node_modules/@tsconfig/node10": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.11.tgz", - "integrity": "sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw==", - "dev": true - }, - "node_modules/@tsconfig/node12": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", - "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", - "dev": true - }, - "node_modules/@tsconfig/node14": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", - "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", - "dev": true - }, - "node_modules/@tsconfig/node16": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz", - "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==", - "dev": true - }, "node_modules/@types/chai": { "version": "5.2.2", "resolved": "https://registry.npmjs.org/@types/chai/-/chai-5.2.2.tgz", @@ -897,30 +840,6 @@ "url": "https://opencollective.com/vitest" } }, - "node_modules/acorn": { - "version": "8.14.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.1.tgz", - "integrity": "sha512-OvQ/2pUDKmgfCg++xsTX1wGxfTaszcHVcTctW4UJB4hibJx2HXxxO5UmVgyjMa+ZDsiaf5wWLXYpRWMmBI0QHg==", - "dev": true, - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/acorn-walk": { - "version": "8.3.4", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.4.tgz", - "integrity": "sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g==", - "dev": true, - "dependencies": { - "acorn": "^8.11.0" - }, - "engines": { - "node": ">=0.4.0" - } - }, "node_modules/agent-base": { "version": "7.1.1", "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.1.tgz", @@ -932,12 +851,6 @@ "node": ">= 14" } }, - "node_modules/arg": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", - "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", - "dev": true - }, "node_modules/assertion-error": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-2.0.1.tgz", @@ -981,44 +894,6 @@ "node": ">= 16" } }, - "node_modules/create-require": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", - "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", - "dev": true - }, - "node_modules/cross-env": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-env/-/cross-env-7.0.3.tgz", - "integrity": "sha512-+/HKd6EgcQCJGh2PSjZuUitQBQynKor4wrFbRg4DtAgS1aWO+gU52xpH7M9ScGgXSYmAVS9bIJ8EzuaGw0oNAw==", - "dev": true, - "dependencies": { - "cross-spawn": "^7.0.1" - }, - "bin": { - "cross-env": "src/bin/cross-env.js", - "cross-env-shell": "src/bin/cross-env-shell.js" - }, - "engines": { - "node": ">=10.14", - "npm": ">=6", - "yarn": ">=1" - } - }, - "node_modules/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "dev": true, - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, "node_modules/data-uri-to-buffer": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz", @@ -1052,15 +927,6 @@ "node": ">=6" } }, - "node_modules/diff": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", - "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", - "dev": true, - "engines": { - "node": ">=0.3.1" - } - }, "node_modules/es-module-lexer": { "version": "1.7.0", "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.7.0.tgz", @@ -1215,12 +1081,6 @@ "node": ">= 14" } }, - "node_modules/isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "dev": true - }, "node_modules/loupe": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/loupe/-/loupe-3.1.3.tgz", @@ -1236,12 +1096,6 @@ "@jridgewell/sourcemap-codec": "^1.5.0" } }, - "node_modules/make-error": { - "version": "1.3.6", - "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", - "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", - "dev": true - }, "node_modules/ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", @@ -1300,15 +1154,6 @@ "url": "https://opencollective.com/node-fetch" } }, - "node_modules/path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/pathe": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/pathe/-/pathe-2.0.3.tgz", @@ -1397,27 +1242,6 @@ "fsevents": "~2.3.2" } }, - "node_modules/shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, - "dependencies": { - "shebang-regex": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/siginfo": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/siginfo/-/siginfo-2.0.0.tgz", @@ -1526,75 +1350,12 @@ "node": ">=14.0.0" } }, - "node_modules/ts-node": { - "version": "10.9.2", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz", - "integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==", - "dev": true, - "dependencies": { - "@cspotcode/source-map-support": "^0.8.0", - "@tsconfig/node10": "^1.0.7", - "@tsconfig/node12": "^1.0.7", - "@tsconfig/node14": "^1.0.0", - "@tsconfig/node16": "^1.0.2", - "acorn": "^8.4.1", - "acorn-walk": "^8.1.1", - "arg": "^4.1.0", - "create-require": "^1.1.0", - "diff": "^4.0.1", - "make-error": "^1.1.1", - "v8-compile-cache-lib": "^3.0.1", - "yn": "3.1.1" - }, - "bin": { - "ts-node": "dist/bin.js", - "ts-node-cwd": "dist/bin-cwd.js", - "ts-node-esm": "dist/bin-esm.js", - "ts-node-script": "dist/bin-script.js", - "ts-node-transpile-only": "dist/bin-transpile.js", - "ts-script": "dist/bin-script-deprecated.js" - }, - "peerDependencies": { - "@swc/core": ">=1.2.50", - "@swc/wasm": ">=1.2.50", - "@types/node": "*", - "typescript": ">=2.7" - }, - "peerDependenciesMeta": { - "@swc/core": { - "optional": true - }, - "@swc/wasm": { - "optional": true - } - } - }, - "node_modules/typescript": { - "version": "5.8.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.3.tgz", - "integrity": "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==", - "dev": true, - "peer": true, - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=14.17" - } - }, "node_modules/undici-types": { "version": "5.26.5", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", "dev": true }, - "node_modules/v8-compile-cache-lib": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", - "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", - "dev": true - }, "node_modules/vite": { "version": "6.3.5", "resolved": "https://registry.npmjs.org/vite/-/vite-6.3.5.tgz", @@ -1809,21 +1570,6 @@ "node": ">= 8" } }, - "node_modules/which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, "node_modules/why-is-node-running": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/why-is-node-running/-/why-is-node-running-2.3.0.tgz", @@ -1840,15 +1586,6 @@ "node": ">=8" } }, - "node_modules/yn": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", - "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", - "dev": true, - "engines": { - "node": ">=6" - } - }, "node_modules/zod": { "version": "3.23.8", "resolved": "https://registry.npmjs.org/zod/-/zod-3.23.8.tgz", diff --git a/packages/fetch/src/chunk-transformer.test.ts b/packages/fetch/src/chunk-transformer.test.ts new file mode 100644 index 000000000..1f8354e62 --- /dev/null +++ b/packages/fetch/src/chunk-transformer.test.ts @@ -0,0 +1,137 @@ +import { RequestOptions } from "@continuedev/config-types"; +import { Response } from "node-fetch"; +import { fetchwithRequestOptions } from "./fetch.js"; + +// Buffer accumulator that ensures proper chunk boundaries +class ChunkAccumulatorTransform implements Transformer { + private buffer: Uint8Array = new Uint8Array(0); + private expectedChunkSize: number | null = null; + private readonly minBufferSize = 8192; // 8KB minimum buffer + + constructor() { + this.buffer = new Uint8Array(0); + } + + private concatUint8Arrays(a: Uint8Array, b: Uint8Array): Uint8Array { + const result = new Uint8Array(a.length + b.length); + result.set(a, 0); + result.set(b, a.length); + return result; + } + + private tryParseChunkSize( + data: Uint8Array, + startIndex: number, + ): { size: number | null; endIndex: number } { + let size = 0; + let i = startIndex; + + // Look for the chunk size end marker + while (i < data.length - 1) { + // Check for CRLF + if (data[i] === 0x0d && data[i + 1] === 0x0a) { + return { size, endIndex: i + 2 }; + } + + // Parse hex digit + const char = String.fromCharCode(data[i]); + const digit = parseInt(char, 16); + if (!isNaN(digit)) { + size = (size << 4) | digit; + } + i++; + } + + return { size: null, endIndex: startIndex }; + } + + transform( + chunk: Uint8Array, + controller: TransformStreamDefaultController, + ) { + // Accumulate incoming data + this.buffer = this.concatUint8Arrays(this.buffer, chunk); + + // Process buffer while we have enough data + while (this.buffer.length > 0) { + // If we don't have a chunk size yet, try to parse it + if (this.expectedChunkSize === null) { + const { size, endIndex } = this.tryParseChunkSize(this.buffer, 0); + + if (size === null) { + // Not enough data to parse chunk size + if (this.buffer.length > this.minBufferSize) { + // Buffer is getting too large, flush it + controller.enqueue(this.buffer); + this.buffer = new Uint8Array(0); + } + return; + } + + this.expectedChunkSize = size; + this.buffer = this.buffer.slice(endIndex); + } + + // Check if we have a complete chunk + const expectedTotalSize = this.expectedChunkSize + 2; // +2 for CRLF + if (this.buffer.length < expectedTotalSize) { + return; // Wait for more data + } + + // We have a complete chunk, emit it + const chunk = this.buffer.slice(0, expectedTotalSize); + controller.enqueue(chunk); + + // Keep the rest in the buffer + this.buffer = this.buffer.slice(expectedTotalSize); + this.expectedChunkSize = null; + + // Check for end chunk + if ( + chunk.length >= 5 && + chunk[0] === 0x30 && // '0' + chunk[1] === 0x0d && // CR + chunk[2] === 0x0a && // LF + chunk[3] === 0x0d && // CR + chunk[4] === 0x0a + ) { + // LF + controller.terminate(); + return; + } + } + } + + flush(controller: TransformStreamDefaultController) { + if (this.buffer.length > 0) { + controller.enqueue(this.buffer); + } + } +} + +/** + * Creates a robust fetch function that handles ambiguous chunk boundaries + */ +export async function robustFetch( + url: string, + options?: RequestOptions, +): Promise { + const response = await fetchwithRequestOptions(url, options); + + // Only transform chunked responses + const transferEncoding = response.headers.get("transfer-encoding"); + if (transferEncoding?.toLowerCase().includes("chunked")) { + const transformStream = new TransformStream( + new ChunkAccumulatorTransform(), + ); + + // Create a new response with the transformed body + return new Response(response.body?.pipeThrough(transformStream), { + status: response.status, + statusText: response.statusText, + headers: options?.headers, + }); + } + + return response; +} diff --git a/packages/fetch/src/node-fetch-bug.test.ts b/packages/fetch/src/node-fetch-bug.test.ts new file mode 100644 index 000000000..d1b320f75 --- /dev/null +++ b/packages/fetch/src/node-fetch-bug.test.ts @@ -0,0 +1,135 @@ +import { Buffer } from "buffer"; +import { EventEmitter } from "events"; +import { describe, expect, it } from "vitest"; + +/** + * This test reproduces the issue described in + * https://github.com/node-fetch/node-fetch/issues/1576 + * + * The issue is that node-fetch has a hard-coded assumption about how the end-of-chunked-response + * marker (0\r\n\r\n) might be split across chunks. It only handles two specific cases: + * 1. The entire marker is in the last chunk + * 2. The marker is split exactly as [0\r\n] + [\r\n] + * + * However, in real-world scenarios, the marker can be split in other ways, causing + * "Premature close" errors. + */ + +describe("node-fetch chunked encoding bug", () => { + // Mock the relevant portion of node-fetch's response handling + const LAST_CHUNK = Buffer.from("0\r\n\r\n"); + + function simulateChunkedResponseHandling(chunks: Buffer[]) { + const socket = new EventEmitter(); + let previousChunk: Buffer | undefined; + let properLastChunkReceived = false; + + // This is the problematic code from node-fetch + const onData = (buf: Buffer) => { + // Check if the entire marker is in the current chunk + properLastChunkReceived = Buffer.compare(buf.slice(-5), LAST_CHUNK) === 0; + + // This is the limited assumption - it only handles one specific way the marker can be split + if (!properLastChunkReceived && previousChunk) { + properLastChunkReceived = + Buffer.compare(previousChunk.slice(-3), LAST_CHUNK.slice(0, 3)) === + 0 && Buffer.compare(buf.slice(-2), LAST_CHUNK.slice(3)) === 0; + } + + previousChunk = buf; + }; + + // Simulate receiving chunks + chunks.forEach((chunk) => { + onData(chunk); + socket.emit("data", chunk); + }); + + return properLastChunkReceived; + } + + // This is the improved code proposed in the GitHub issue by Treverix + function simulateImprovedChunkedResponseHandling(chunks: Buffer[]) { + const socket = new EventEmitter(); + let previousChunk: Buffer | undefined; + let properLastChunkReceived = false; + + const onData = (buf: Buffer) => { + // Check if the entire marker is in the current chunk + properLastChunkReceived = Buffer.compare(buf.slice(-5), LAST_CHUNK) === 0; + + // More flexible handling of split markers + if (!properLastChunkReceived && previousChunk) { + if (buf.length < 5) { + // Create a composite buffer from the end of previous chunk and the current chunk + const composite = Buffer.from([...previousChunk.slice(-5), ...buf]); + properLastChunkReceived = + Buffer.compare(composite.slice(-5), LAST_CHUNK) === 0; + } + } + + previousChunk = buf; + }; + + // Simulate receiving chunks + chunks.forEach((chunk) => { + onData(chunk); + socket.emit("data", chunk); + }); + + return properLastChunkReceived; + } + + it("fails to detect end of chunked response when split in unexpected way", () => { + // This is the case reported in the GitHub issue + // previousChunk = [ (...), 0, 13, 10, 48, 13] + // lastChunk = [ 10, 13, 10] + // Where 13 = \r and 10 = \n + const previousChunk = Buffer.from([0, 13, 10, 48, 13]); + const lastChunk = Buffer.from([10, 13, 10]); + + // With the original implementation, it fails to detect the end marker + const originalResult = simulateChunkedResponseHandling([ + previousChunk, + lastChunk, + ]); + expect(originalResult).toBe(false); + + // With the improved implementation, it correctly detects the end marker + const improvedResult = simulateImprovedChunkedResponseHandling([ + previousChunk, + lastChunk, + ]); + expect(improvedResult).toBe(true); + }); + + it("handles various ways the end marker can be split", () => { + // Test various ways the marker can be split across chunks + const testCases = [ + // Case 1: [0] + [\r\n\r\n] + [Buffer.from([0]), Buffer.from([13, 10, 13, 10])], + + // Case 2: [0\r] + [\n\r\n] + [Buffer.from([0, 13]), Buffer.from([10, 13, 10])], + + // Case 3: [0\r\n] + [\r\n] + [Buffer.from([0, 13, 10]), Buffer.from([13, 10])], + + // Case 4: [0\r\n\r] + [\n] + [Buffer.from([0, 13, 10, 13]), Buffer.from([10])], + + // Case 5: [..., 0, \r, \n, \r] + [\n, ...] + [Buffer.from([99, 0, 13, 10, 13]), Buffer.from([10, 99])], + ]; + + testCases.forEach((chunks, index) => { + // The original implementation only handles case 3 correctly + const originalResult = simulateChunkedResponseHandling(chunks); + expect(originalResult).toBe(index === 2); + + // The improved implementation handles all cases + const improvedResult = simulateImprovedChunkedResponseHandling(chunks); + expect(improvedResult).toBe(true); + }); + }); +}); diff --git a/packages/fetch/src/premature-close.test.ts b/packages/fetch/src/premature-close.test.ts new file mode 100644 index 000000000..699dcde6c --- /dev/null +++ b/packages/fetch/src/premature-close.test.ts @@ -0,0 +1,405 @@ +import { createServer } from "http"; +import { describe, expect, it } from "vitest"; +import { fetchwithRequestOptions } from "./fetch.js"; +import { streamResponse } from "./stream.js"; +describe("Fetch Premature Close Tests", () => { + // This test specifically forces conditions that cause premature close + it("should reproduce premature close error with chunked encoding", async () => { + // Create a server that intentionally misbehaves + const server = createServer((req, res) => { + // Set chunked transfer encoding + res.writeHead(200, { + "Content-Type": "text/plain", + "Transfer-Encoding": "chunked", + }); + + let chunk = 0; + const interval = setInterval(() => { + // Send malformed chunk sizes occasionally + if (chunk === 2) { + // Send a malformed chunk that will trigger the issue + res.write("5\r\nHello\r\n3\r"); // Intentionally incomplete chunk + clearInterval(interval); + + // Force socket closure mid-stream + setTimeout(() => { + // @ts-ignore - accessing private property for test + res.socket?.destroy(); + }, 50); + + return; + } + + res.write(`${chunk.toString(16)}\r\nChunk${chunk}\r\n`); + chunk++; + }, 10); + }); + + // Start server on random port + await new Promise((resolve) => server.listen(0, resolve)); + const port = (server.address() as any).port; + + try { + // Make request and attempt to stream response + const response = await fetchwithRequestOptions( + `http://localhost:${port}`, + { + headers: { + Connection: "keep-alive", + }, + }, + ); + + // Try to consume the stream + const chunks: string[] = []; + try { + for await (const chunk of streamResponse( + response as unknown as Response, + )) { + chunks.push(chunk); + } + // If we get here, the test failed because we expected an error + throw new Error( + "Expected premature close error but stream completed successfully", + ); + } catch (e) { + // Verify we got the expected error + expect(e).toBeTruthy(); + expect((e as Error).message).toMatch(/premature close/i); + } + } finally { + // Cleanup + server.close(); + } + }); + + // This test reproduces the issue using timing and connection pooling + it("should reproduce premature close with connection reuse", async () => { + // Create a server that intentionally causes issues with keep-alive connections + const server = createServer((req, res) => { + res.writeHead(200, { + "Content-Type": "text/plain", + Connection: "keep-alive", + "Transfer-Encoding": "chunked", + }); + + let bytesSent = 0; + const streamSize = 1024 * 1024; // 1MB + const chunkSize = 16384; // 16KB + + const writeChunk = () => { + if (bytesSent >= streamSize) { + res.end(); + return; + } + + const chunk = Buffer.alloc(chunkSize).fill("x"); + bytesSent += chunk.length; + + // Randomly corrupt the stream + if (Math.random() < 0.1) { + // @ts-ignore - accessing private property for test + res.socket?.destroy(); + return; + } + + res.write(chunk); + setImmediate(writeChunk); + }; + + writeChunk(); + }); + + await new Promise((resolve) => server.listen(0, resolve)); + const port = (server.address() as any).port; + + try { + // Make multiple concurrent requests to force connection pooling + const requests = Array(5) + .fill(null) + .map(async (_, i) => { + try { + const response = await fetchwithRequestOptions( + `http://localhost:${port}`, + { + headers: { + Connection: "keep-alive", + }, + }, + ); + + const chunks: string[] = []; + for await (const chunk of streamResponse( + response as unknown as Response, + )) { + chunks.push(chunk); + } + } catch (e) { + expect(e).toBeTruthy(); + expect((e as Error).message).toMatch( + /premature close|socket hang up/i, + ); + } + }); + + await Promise.all(requests); + } finally { + server.close(); + } + }); + + // This test reproduces the issue using a delayed response + it("should reproduce premature close with delayed response", async () => { + const server = createServer((req, res) => { + res.writeHead(200, { + "Content-Type": "text/plain", + "Transfer-Encoding": "chunked", + }); + + // Start sending data + let count = 0; + const interval = setInterval(() => { + if (count >= 5) { + clearInterval(interval); + // Delay then destroy the socket + setTimeout(() => { + // @ts-ignore - accessing private property for test + res.socket?.destroy(); + }, 100); + return; + } + + // Send a chunk with a delay + setTimeout(() => { + res.write(`chunk ${count}\n`); + }, count * 50); + + count++; + }, 10); + }); + + await new Promise((resolve) => server.listen(0, resolve)); + const port = (server.address() as any).port; + + try { + const response = await fetchwithRequestOptions( + `http://localhost:${port}`, + ); + + const chunks: string[] = []; + try { + for await (const chunk of streamResponse( + response as unknown as Response, + )) { + chunks.push(chunk); + // Optional artificial processing delay + await new Promise((resolve) => setTimeout(resolve, 20)); + } + throw new Error( + "Expected premature close error but stream completed successfully", + ); + } catch (e) { + expect(e).toBeTruthy(); + expect((e as Error).message).toMatch(/premature close/i); + } + } finally { + server.close(); + } + }); + + it("should properly handle chunk boundary in the terminating sequence", async () => { + // Flag to track if response was fully sent + let responseFullySent = false; + + const server = createServer((req, res) => { + res.writeHead(200, { + "Content-Type": "text/plain", + "Transfer-Encoding": "chunked", + }); + + // Send normal chunks directly as data (not writing the chunk headers manually) + // Node's HTTP server will handle adding the proper chunk headers + res.write("Hello"); + res.write("World!!"); + + // Now manually control the terminating sequence to split it at the boundary + // First, end the response but intercept the actual write + const originalEnd = res.end; + res.end = function () { + // Instead of letting Node send the terminating sequence normally, + // we'll send it split across a boundary + + // Manually send the first part of the termination sequence "0\r\n\r" + // @ts-ignore - accessing private property for test + const socket = res.socket; + socket?.write("0\r\n\r", "utf8"); + + // Small delay to ensure split across packets + setTimeout(() => { + // Send the final "\n" to complete the terminating sequence + socket?.write("\n", "utf8", () => { + // Mark that we've fully sent the response + responseFullySent = true; + }); + }, 20); + + // Don't call the original end since we're manually handling it + return res; + }; + }); + + await new Promise((resolve) => server.listen(0, resolve)); + const port = (server.address() as any).port; + + try { + const response = await fetchwithRequestOptions( + `http://localhost:${port}`, + { + headers: { + Connection: "keep-alive", + }, + }, + ); + + const chunks: Uint8Array[] = []; + let streamCompleted = false; + + try { + // Collect chunks as raw buffers to avoid encoding issues + for await (const chunk of streamResponse( + response as unknown as Response, + )) { + // Store the raw chunk + chunks.push(Buffer.from(chunk) as Uint8Array); + } + + // If we get here, the stream completed successfully + streamCompleted = true; + + // Wait a bit more to ensure server has time to set responseFullySent flag + await new Promise((resolve) => setTimeout(resolve, 100)); + + // Verify the response was fully sent by the server + expect(responseFullySent).toBe(true); + + // Convert all chunks to a single string and verify content + const content = Buffer.concat(chunks).toString("utf8"); + expect(content).toBe("HelloWorld!!"); + } catch (e) { + // If the server fully sent the response but we got an error, + // this confirms the client has an issue with the split boundary + if (responseFullySent) { + // This is the assertion that proves the 3/2 boundary issue exists + console.log( + "Server sent complete response but client failed to parse it properly", + ); + console.log("Error:", (e as Error).message); + expect((e as Error).message).toMatch( + /premature close|invalid chunked encoding/i, + ); + + // We should still verify we got some data before the error + const partialContent = Buffer.concat(chunks).toString("utf8"); + expect(partialContent).toContain("Hello"); + } else { + // If the server didn't fully send the response, the test is inconclusive + throw new Error( + "Test inconclusive: Server didn't complete sending response before error occurred", + ); + } + } + + // If the stream completed and the response was fully sent, + // the client correctly handled the split boundary + if (streamCompleted && responseFullySent) { + console.log("Client correctly handled split terminating sequence"); + } + } finally { + server.close(); + } + }); + + // This test reproduces the 3/2 assumption bug with multiline chunks + it("should reproduce premature close with multiline chunks containing line breaks", async () => { + const server = createServer((req, res) => { + res.writeHead(200, { + "Content-Type": "text/plain", + "Transfer-Encoding": "chunked", + }); + + // First send a normal chunk + res.write("A\r\nHello there\r\n"); + + // Send a chunk with a size that contains multiline data with \r\n inside + // This is valid chunked encoding but might confuse parsers + // The chunk size "1E" = 30 bytes + res.write("1E\r\n"); // Chunk size header + res.write("Line 1\r\nLine 2\r\nLine 3 not done yet"); // 30 bytes total + res.write("\r\n"); // Chunk terminator + + // Now send another chunk that starts with a line continuation + // This creates a situation where \r\n appears in data and as chunk boundaries + res.write("14\r\n"); // Size of 20 bytes + res.write(" continued from before\r\n"); + res.write("\r\n"); // Chunk terminator + + // Here's where we'll try to trigger the bug + // Send the final chunk marker but split across what could be mistaken for a line boundary + setTimeout(() => { + // Send "0\r" first - this could be mistaken for start of a line ending + res.write("0\r"); + + // Small delay to ensure separate TCP packets + setTimeout(() => { + // Now send "\n\r\n" - this creates ambiguous line endings + res.write("\n\r\n"); + + // Force close after a small delay to simulate network issues + setTimeout(() => { + // @ts-ignore - accessing private property for test + res.socket?.destroy(); + }, 20); + }, 10); + }, 10); + }); + + await new Promise((resolve) => server.listen(0, resolve)); + const port = (server.address() as any).port; + + try { + const response = await fetchwithRequestOptions( + `http://localhost:${port}`, + { + headers: { + Connection: "keep-alive", + }, + }, + ); + + const chunks: string[] = []; + try { + for await (const chunk of streamResponse( + response as unknown as Response, + )) { + chunks.push(chunk); + } + throw new Error( + "Expected premature close error but stream completed successfully", + ); + } catch (e) { + expect(e).toBeTruthy(); + expect((e as Error).message).toMatch(/premature close/i); + + // Verify we received the multiline data before the error + const receivedData = chunks.join(""); + expect(receivedData).toContain("Hello there"); + expect(receivedData).toContain("Line 1"); + expect(receivedData).toContain("Line 2"); + expect(receivedData).toContain("Line 3 not done yet"); + expect(receivedData).toContain("continued from before"); + } + } finally { + server.close(); + } + }); +}); From d4f39e85c22c23f3388dd15e4be07c5e1c3697e8 Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Wed, 4 Jun 2025 12:13:26 -0700 Subject: [PATCH 055/118] disable completions for apply --- core/llm/llms/stubs/ContinueProxy.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/llm/llms/stubs/ContinueProxy.ts b/core/llm/llms/stubs/ContinueProxy.ts index e07668ffd..ea9178d48 100644 --- a/core/llm/llms/stubs/ContinueProxy.ts +++ b/core/llm/llms/stubs/ContinueProxy.ts @@ -85,6 +85,9 @@ class ContinueProxy extends OpenAI { } supportsCompletions(): boolean { + if (this.underlyingProviderName === "relace") { + return false; + } return true; } From 6a978db5c1630257046faafb63bae731f1266728 Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Wed, 4 Jun 2025 12:36:47 -0700 Subject: [PATCH 056/118] only support completions through continue proxy for vllm --- core/llm/llms/stubs/ContinueProxy.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/core/llm/llms/stubs/ContinueProxy.ts b/core/llm/llms/stubs/ContinueProxy.ts index ea9178d48..3506dcb32 100644 --- a/core/llm/llms/stubs/ContinueProxy.ts +++ b/core/llm/llms/stubs/ContinueProxy.ts @@ -85,10 +85,13 @@ class ContinueProxy extends OpenAI { } supportsCompletions(): boolean { - if (this.underlyingProviderName === "relace") { - return false; + // This was a hotfix and contains duplicate logic from class-specific completion support methods + if (this.underlyingProviderName === "vllm") { + return true; } - return true; + // other providers that don't support completions include groq, mistral, nvidia, deepseek, etc. + // For now disabling all except vllm + return false; } supportsFim(): boolean { From d90039d886d4cb633a82c5a760c5064c6fb55391 Mon Sep 17 00:00:00 2001 From: Nate Date: Wed, 4 Jun 2025 12:45:02 -0700 Subject: [PATCH 057/118] bump --- extensions/vscode/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/vscode/package.json b/extensions/vscode/package.json index 03b607b2a..0a08c2321 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": "1.1.43", + "version": "1.1.44", "repository": { "type": "git", "url": "https://github.com/continuedev/continue" From 889be2118ec4e591d3c0f2ad4b5388ef45a6687e Mon Sep 17 00:00:00 2001 From: Brian 'bdougie' Douglas Date: Wed, 4 Jun 2025 12:49:35 -0700 Subject: [PATCH 058/118] add prettier --- docs/docs/agent/how-to-customize.md | 1 + docs/docs/customize/deep-dives/rules.md | 17 ++++++++++------- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/docs/docs/agent/how-to-customize.md b/docs/docs/agent/how-to-customize.md index 1770768a6..495dd9547 100644 --- a/docs/docs/agent/how-to-customize.md +++ b/docs/docs/agent/how-to-customize.md @@ -6,6 +6,7 @@ sidebar_position: 5 --- ## Add Rules Blocks + Adding Rules can be done in your assistant locally or in the Hub. [Explore Rules on the Hub](https://hub.continue.dev/explore/rules) and see the [Rules deep dive](../customize/deep-dives/rules.md) for more details and tips on creating rules. diff --git a/docs/docs/customize/deep-dives/rules.md b/docs/docs/customize/deep-dives/rules.md index 52e5223c8..6a608090e 100644 --- a/docs/docs/customize/deep-dives/rules.md +++ b/docs/docs/customize/deep-dives/rules.md @@ -11,6 +11,7 @@ Rules provide instructions to the model for [Chat](../../chat/how-to-use-it.md), ::: ## How it works + You can view the current rules by clicking the pen icon above the main toolbar: ![rules input toolbar section](/img/notch-rules.png) @@ -37,8 +38,8 @@ Now test your rules by asking a question about a file in chat. ![pirate rule test](/img/pirate-rule-test.png) - ## Creating `rules` blocks + Rules can be added locally using the "Add Rules" button while viewing the Local Assistant's rules. ![add local rules button](/img/add-local-rules.png) @@ -49,7 +50,7 @@ When in Agent mode, you can prompt the agent to create a rule for you using the For example, you can say "Create a rule for this", and a rule will be created for you in `.continue/rules` based on your conversation. ::: -Rules can also be added to an Assistant on the Continue Hub. +Rules can also be added to an Assistant on the Continue Hub. Explore available rules [here](https://hub.continue.dev/explore/rules), or [create your own](https://hub.continue.dev/new?type=block&blockType=rules) in the Hub. These blocks are defined using the [`config.yaml` syntax](../../reference.md#rules) and can also be created locally. @@ -80,7 +81,9 @@ rules: with: TONE: concise ``` + ### `.continue/rules` folder + You can create project-specific rules by adding a `.continue/rules` folder to the root of your project and adding new rule files. ```yaml title=".continue/rules/new-rule.yaml" @@ -89,9 +92,9 @@ version: 0.0.1 schema: v1 rules: - Always give concise responses - ``` -This is also done when selecting "Add Rule" in the Assistant settings. This will create a new folder in `.continue/rules` with a default file named `new-rule.yaml`. + +This is also done when selecting "Add Rule" in the Assistant settings. This will create a new folder in `.continue/rules` with a default file named `new-rule.yaml`. ### `.continuerules` @@ -110,16 +113,17 @@ If you want concise answers: ```yaml title=".continue/rules/concise-rule.yaml" rules: - name: Always give concise answers - rule: | + rule: | Please provide concise answers. Don't explain obvious concepts. You can assume that I am knowledgable about most programming topics. ``` + If you want to ensure certain practices are followed, for example in React: ```yaml title=".continue/rules/functional-rule.yaml" rules: - name: Always use functional components - rule: | + rule: | Whenever you are writing React code, make sure to - use functional components instead of class components - use hooks for state management @@ -135,4 +139,3 @@ Continue includes a simple default system message for [Chat](../../chat/how-to-u This can be viewed in the rules section of the toolbar (see above), or visit the source code [here](https://github.com/continuedev/continue/blob/main/core/llm/constructMessages.ts#L4) Advanced users can override this system message for a specific model if needed by using `chatOptions.baseSystemMessage`. See the [`config.yaml` reference](../../reference.md#models). - From e87a3a5c5e8f81e587fdb8fd7fa5e186e4425d3b Mon Sep 17 00:00:00 2001 From: Brian 'bdougie' Douglas Date: Wed, 4 Jun 2025 13:35:23 -0700 Subject: [PATCH 059/118] reorder list for a better flow --- docs/docs/customize/deep-dives/rules.md | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/docs/docs/customize/deep-dives/rules.md b/docs/docs/customize/deep-dives/rules.md index 6a608090e..36be61127 100644 --- a/docs/docs/customize/deep-dives/rules.md +++ b/docs/docs/customize/deep-dives/rules.md @@ -96,16 +96,6 @@ rules: This is also done when selecting "Add Rule" in the Assistant settings. This will create a new folder in `.continue/rules` with a default file named `new-rule.yaml`. -### `.continuerules` - -:::warning - -`.contninuerules` will be deprecated in a future release. Please use the `.continue/rules` folder instead. - -::: - -You can create project-specific rules by adding a `.continuerules` file to the root of your project. This file is raw text and its full contents will be used as rules. - ### Examples If you want concise answers: @@ -132,10 +122,20 @@ rules: - modularize components into smaller, reusable pieces ``` -## Chat System Message +### Chat System Message Continue includes a simple default system message for [Chat](../../chat/how-to-use-it.md) and [Agent](../../agent/how-to-use-it.md) requests, to help the model provide reliable codeblock formats in its output. This can be viewed in the rules section of the toolbar (see above), or visit the source code [here](https://github.com/continuedev/continue/blob/main/core/llm/constructMessages.ts#L4) Advanced users can override this system message for a specific model if needed by using `chatOptions.baseSystemMessage`. See the [`config.yaml` reference](../../reference.md#models). + +### `.continuerules` + +:::warning + +`.contninuerules` will be deprecated in a future release. Please use the `.continue/rules` folder instead. + +::: + +You can create project-specific rules by adding a `.continuerules` file to the root of your project. This file is raw text and its full contents will be used as rules. From cd0a5e0af99f8e80d8ddf09bd8bdf1b62284bb64 Mon Sep 17 00:00:00 2001 From: Jacob Kim Date: Wed, 4 Jun 2025 15:24:32 -0700 Subject: [PATCH 060/118] propagate errors to render in the extension gui --- core/config/yaml/loadYaml.ts | 65 ++++++++++++++++++++---------------- 1 file changed, 36 insertions(+), 29 deletions(-) diff --git a/core/config/yaml/loadYaml.ts b/core/config/yaml/loadYaml.ts index aa4c3919a..b8cbf1938 100644 --- a/core/config/yaml/loadYaml.ts +++ b/core/config/yaml/loadYaml.ts @@ -117,39 +117,46 @@ async function loadConfigYaml(options: { // `Loading config.yaml from ${JSON.stringify(packageIdentifier)} with root path ${rootPath}`, // ); - let config = - overrideConfigYaml ?? - // This is how we allow use of blocks locally - (await unrollAssistant( - packageIdentifier, - new RegistryClient({ - accessToken: await controlPlaneClient.getAccessToken(), - apiBase: getControlPlaneEnvSync(ideSettings.continueTestEnvironment) - .CONTROL_PLANE_URL, - rootPath, - }), - { - currentUserSlug: "", - onPremProxyUrl: null, + // This is how we allow use of blocks locally + const NEED_ERROR_PROPAGATION = true; + const unrollResult = await unrollAssistant( + packageIdentifier, + new RegistryClient({ + accessToken: await controlPlaneClient.getAccessToken(), + apiBase: getControlPlaneEnvSync(ideSettings.continueTestEnvironment) + .CONTROL_PLANE_URL, + rootPath, + }), + { + currentUserSlug: "", + onPremProxyUrl: null, + orgScopeId, + platformClient: new LocalPlatformClient( orgScopeId, - platformClient: new LocalPlatformClient( - orgScopeId, - controlPlaneClient, - ide, - ), - renderSecrets: true, - injectBlocks: allLocalBlocks, - }, - )); + controlPlaneClient, + ide, + ), + renderSecrets: true, + injectBlocks: allLocalBlocks, + }, + NEED_ERROR_PROPAGATION, + ); - const errors = isAssistantUnrolledNonNullable(config) - ? validateConfigYaml(config) - : [ - { + const errors: ConfigValidationError[] = []; + + let config = overrideConfigYaml ?? unrollResult.config; + if (config) { + isAssistantUnrolledNonNullable(config) + ? errors.push(...validateConfigYaml(config)) + : errors.push({ fatal: true, message: "Assistant includes blocks that don't exist", - }, - ]; + }); + } + + if (unrollResult.errors) { + errors.push(...unrollResult.errors); + } if (errors?.some((error) => error.fatal)) { return { From 803e6c8099a69418b1a923075f438d38ddd9354f Mon Sep 17 00:00:00 2001 From: Jacob Kim Date: Wed, 4 Jun 2025 15:26:45 -0700 Subject: [PATCH 061/118] add overloads to unrollAssistant and unrollAssistantFromContent to handle cases where we need error propagation, return a sum type from unrollBlocks, wrap objects in JSON.stringify to avoid displaying [object Object]. --- packages/config-yaml/src/load/unroll.ts | 132 ++++++++++++++++++++++-- 1 file changed, 124 insertions(+), 8 deletions(-) diff --git a/packages/config-yaml/src/load/unroll.ts b/packages/config-yaml/src/load/unroll.ts index 0b5003473..b90072b9b 100644 --- a/packages/config-yaml/src/load/unroll.ts +++ b/packages/config-yaml/src/load/unroll.ts @@ -17,6 +17,7 @@ import { configYamlSchema, Rule, } from "../schemas/index.js"; +import { ConfigResult } from "../validation.js"; import { packageIdentifierToShorthandSlug, useProxyForUnrenderedSecrets, @@ -204,14 +205,49 @@ export type UnrollAssistantOptions = | DoNotRenderSecretsUnrollAssistantOptions | RenderSecretsUnrollAssistantOptions; +// Overload when we need error propapagation. export async function unrollAssistant( id: PackageIdentifier, registry: Registry, options: UnrollAssistantOptions, -): Promise { + needErrorPropagation: true, +): Promise>; + +// Overload when we don't need error propapagation. +export async function unrollAssistant( + id: PackageIdentifier, + registry: Registry, + options: UnrollAssistantOptions, + needErrorPropagation?: false, +): Promise; + +export async function unrollAssistant( + id: PackageIdentifier, + registry: Registry, + options: UnrollAssistantOptions, + needErrorPropagation: boolean = false, +): Promise> { // Request the content from the registry const rawContent = await registry.getContent(id); - return unrollAssistantFromContent(id, rawContent, registry, options); + + // Somewhat annoyingly, we need this redundant ternary to circumvent overload matching error. + // Without it TypeScript complains that no overloads of unrollAssistant + // has a field needErrorPropagation that accepts a boolean. + return needErrorPropagation + ? unrollAssistantFromContent( + id, + rawContent, + registry, + options, + needErrorPropagation, + ) + : unrollAssistantFromContent( + id, + rawContent, + registry, + options, + needErrorPropagation, + ); } function renderTemplateData( @@ -231,12 +267,31 @@ function renderTemplateData( return templatedYaml; } +// Overload when we need error propapagation. export async function unrollAssistantFromContent( id: PackageIdentifier, rawYaml: string, registry: Registry, options: UnrollAssistantOptions, -): Promise { + needErrorPropagation: true, +): Promise>; + +// Overload when we need don't error propapagation. +export async function unrollAssistantFromContent( + id: PackageIdentifier, + rawYaml: string, + registry: Registry, + options: UnrollAssistantOptions, + needErrorPropagation?: false, +): Promise; + +export async function unrollAssistantFromContent( + id: PackageIdentifier, + rawYaml: string, + registry: Registry, + options: UnrollAssistantOptions, + needErrorPropagation: boolean = false, +): Promise> { // Parse string to Zod-validated YAML let parsedYaml = parseConfigYaml(rawYaml); @@ -245,10 +300,15 @@ export async function unrollAssistantFromContent( parsedYaml, registry, options.injectBlocks, + needErrorPropagation, ); // Back to a string so we can fill in template variables - const rawUnrolledYaml = YAML.stringify(unrolledAssistant); + const rawUnrolledYaml = needErrorPropagation + ? YAML.stringify( + (unrolledAssistant as ConfigResult).config, + ) + : YAML.stringify(unrolledAssistant); // Convert all of the template variables to FQSNs // Secrets from the block will have the assistant slug prepended to the FQSN @@ -277,14 +337,37 @@ export async function unrollAssistantFromContent( options.orgScopeId, options.onPremProxyUrl, ); + + if (needErrorPropagation) { + return { + config: finalConfig, + errors: (unrolledAssistant as ConfigResult).errors, + configLoadInterrupted: ( + unrolledAssistant as ConfigResult + ).configLoadInterrupted, + }; + } + return finalConfig; } +// We don't need oveloads here because +// the only place unrollBlocks is called directly is this file. +// unrollAssistantFromContent and unrollAssistant +// are called elsewhere in this project +// and imported in other projects. export async function unrollBlocks( assistant: ConfigYaml, registry: Registry, injectBlocks: PackageIdentifier[] | undefined, -): Promise { + needErrorPropagation: boolean = false, +): Promise> { + const configResult: ConfigResult = { + config: undefined, + errors: [], + configLoadInterrupted: false, + }; + const unrolledAssistant: AssistantUnrolled = { name: assistant.name, version: assistant.version, @@ -316,8 +399,16 @@ export async function unrollBlocks( ); } } catch (err) { + if (needErrorPropagation) { + configResult.errors?.push({ + fatal: false, + // Using JSON.stringify to avoid printing [object Object]. + message: `Failed to unroll block ${JSON.stringify(unrolledBlock.uses)}: ${(err as Error).message}`, + }); + } + console.error( - `Failed to unroll block ${unrolledBlock.uses}: ${(err as Error).message}`, + `Failed to unroll block ${JSON.stringify(unrolledBlock.uses)}: ${(err as Error).message}`, ); sectionBlocks.push(null); } @@ -349,8 +440,16 @@ export async function unrollBlocks( rules.push(block); } } catch (err) { + if (needErrorPropagation) { + configResult.errors?.push({ + fatal: false, + // Using JSON.stringify to avoid printing [object Object]. + message: `Failed to unroll block ${JSON.stringify(rule.uses)}: ${(err as Error).message}`, + }); + } + console.error( - `Failed to unroll block ${rule.uses}: ${(err as Error).message}`, + `Failed to unroll block ${JSON.stringify(rule.uses)}: ${(err as Error).message}`, ); rules.push(null); } @@ -381,12 +480,29 @@ export async function unrollBlocks( ); } } catch (err) { + if (needErrorPropagation) { + configResult.errors?.push({ + fatal: false, + // Using JSON.stringify to avoid printing [object Object]. + message: `Failed to unroll block ${JSON.stringify(injectBlock)}: ${(err as Error).message}`, + }); + } + console.error( - `Failed to unroll block ${injectBlock}: ${(err as Error).message}`, + `Failed to unroll block ${JSON.stringify(injectBlock)}: ${(err as Error).message}`, ); } } + if (needErrorPropagation) { + configResult.config = unrolledAssistant; + if (configResult.errors?.length == 0) { + configResult.errors = undefined; + } + configResult.configLoadInterrupted = false; + return configResult; + } + return unrolledAssistant; } From 96ecb2cf1bb9e2c82aabb8061c66faaa0cffaa33 Mon Sep 17 00:00:00 2001 From: Jacob Kim Date: Wed, 4 Jun 2025 15:27:24 -0700 Subject: [PATCH 062/118] fix a bug where icons will shrink depending on error message size --- .../mainInput/Lump/sections/errors/ErrorSection.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gui/src/components/mainInput/Lump/sections/errors/ErrorSection.tsx b/gui/src/components/mainInput/Lump/sections/errors/ErrorSection.tsx index c5aa0a039..bd06d197d 100644 --- a/gui/src/components/mainInput/Lump/sections/errors/ErrorSection.tsx +++ b/gui/src/components/mainInput/Lump/sections/errors/ErrorSection.tsx @@ -24,9 +24,9 @@ export function ErrorSection() { }`} > {error.fatal ? ( - + ) : ( - + )}

Date: Wed, 4 Jun 2025 15:27:33 -0700 Subject: [PATCH 063/118] update deps --- extensions/vscode/package-lock.json | 6 +++--- gui/package-lock.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/extensions/vscode/package-lock.json b/extensions/vscode/package-lock.json index e516f171e..1656cee97 100644 --- a/extensions/vscode/package-lock.json +++ b/extensions/vscode/package-lock.json @@ -1,12 +1,12 @@ { "name": "continue", - "version": "1.1.41", + "version": "1.1.43", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "continue", - "version": "1.1.41", + "version": "1.1.43", "license": "Apache-2.0", "dependencies": { "@continuedev/config-types": "^1.0.14", @@ -107,7 +107,7 @@ "@aws-sdk/credential-providers": "^3.778.0", "@continuedev/config-types": "^1.0.13", "@continuedev/config-yaml": "file:../packages/config-yaml", - "@continuedev/fetch": "^1.0.10", + "@continuedev/fetch": "^1.0.13", "@continuedev/llm-info": "^1.0.8", "@continuedev/openai-adapters": "^1.0.25", "@modelcontextprotocol/sdk": "^1.12.0", diff --git a/gui/package-lock.json b/gui/package-lock.json index 1fb8463d7..b34d65846 100644 --- a/gui/package-lock.json +++ b/gui/package-lock.json @@ -111,7 +111,7 @@ "@aws-sdk/credential-providers": "^3.778.0", "@continuedev/config-types": "^1.0.13", "@continuedev/config-yaml": "file:../packages/config-yaml", - "@continuedev/fetch": "^1.0.10", + "@continuedev/fetch": "^1.0.13", "@continuedev/llm-info": "^1.0.8", "@continuedev/openai-adapters": "^1.0.25", "@modelcontextprotocol/sdk": "^1.12.0", From 0f2cb9417cd760c234d54039c1d577cf15a1babf Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Wed, 4 Jun 2025 15:47:19 -0700 Subject: [PATCH 064/118] include mcp server names in tool names --- core/config/profile/doLoadConfig.ts | 4 +- core/index.d.ts | 1 + core/tools/mcpToolName.ts | 9 +++ core/tools/mcpToolName.vitest.ts | 57 +++++++++++++++++++ .../sections/tool-policies/ToolPolicyItem.tsx | 10 ++-- 5 files changed, 75 insertions(+), 6 deletions(-) create mode 100644 core/tools/mcpToolName.ts create mode 100644 core/tools/mcpToolName.vitest.ts diff --git a/core/config/profile/doLoadConfig.ts b/core/config/profile/doLoadConfig.ts index 863c4d447..dd04d1915 100644 --- a/core/config/profile/doLoadConfig.ts +++ b/core/config/profile/doLoadConfig.ts @@ -27,6 +27,7 @@ import { TeamAnalytics } from "../../control-plane/TeamAnalytics.js"; import ContinueProxy from "../../llm/llms/stubs/ContinueProxy"; import { getConfigDependentToolDefinitions } from "../../tools"; import { encodeMCPToolUri } from "../../tools/callTool"; +import { getMCPToolName } from "../../tools/mcpToolName"; import { getConfigJsonPath, getConfigYamlPath } from "../../util/paths"; import { localPathOrUriToPath } from "../../util/pathToUri"; import { Telemetry } from "../../util/posthog"; @@ -156,7 +157,7 @@ export default async function doLoadConfig(options: { displayTitle: server.name + " " + tool.name, function: { description: tool.description, - name: tool.name, + name: getMCPToolName(server, tool), parameters: tool.inputSchema, }, faviconUrl: server.faviconUrl, @@ -164,6 +165,7 @@ export default async function doLoadConfig(options: { type: "function" as const, uri: encodeMCPToolUri(server.id, tool.name), group: server.name, + originalFunctionName: tool.name, })); newConfig.tools.push(...serverTools); diff --git a/core/index.d.ts b/core/index.d.ts index ad778d3d8..f16713dc5 100644 --- a/core/index.d.ts +++ b/core/index.d.ts @@ -989,6 +989,7 @@ export interface Tool { uri?: string; faviconUrl?: string; group: string; + originalFunctionName?: string; } interface ToolChoice { diff --git a/core/tools/mcpToolName.ts b/core/tools/mcpToolName.ts new file mode 100644 index 000000000..6440ef5e7 --- /dev/null +++ b/core/tools/mcpToolName.ts @@ -0,0 +1,9 @@ +import { MCPServerStatus, MCPTool } from ".."; + +export function getMCPToolName(server: MCPServerStatus, tool: MCPTool) { + const serverPrefix = server.name.split(" ").join("_").toLowerCase(); + if (tool.name.startsWith(serverPrefix)) { + return tool.name; + } + return `${serverPrefix}_${tool.name}`; +} diff --git a/core/tools/mcpToolName.vitest.ts b/core/tools/mcpToolName.vitest.ts new file mode 100644 index 000000000..8c20f630a --- /dev/null +++ b/core/tools/mcpToolName.vitest.ts @@ -0,0 +1,57 @@ +import { expect, test } from "vitest"; +import { MCPServerStatus, MCPTool } from ".."; +import { getMCPToolName } from "./mcpToolName"; + +const createMcpServer = (name: string): MCPServerStatus => ({ + name, + errors: [], + prompts: [], + tools: [], + resources: [], + resourceTemplates: [], + status: "connected", + id: "", + transport: { + type: "sse", + url: "", + }, +}); + +const createMCPTool = (name: string): MCPTool => ({ + name, + inputSchema: { + type: "object", + }, +}); + +test("getMCPToolName - adds server prefix to tool name when not present", () => { + const server = createMcpServer("Github"); + const tool = createMCPTool("create_pull_request"); + + const result = getMCPToolName(server, tool); + expect(result).toBe("github_create_pull_request"); +}); + +test("getMCPToolName - preserves tool name when it already starts with server prefix", () => { + const server = createMcpServer("Github"); + const tool = createMCPTool("github_create_pull_request"); + + const result = getMCPToolName(server, tool); + expect(result).toBe("github_create_pull_request"); +}); + +test("getMCPToolName - handles server names with spaces", () => { + const server = createMcpServer("Azure DevOps"); + const tool = createMCPTool("create_pipeline"); + + const result = getMCPToolName(server, tool); + expect(result).toBe("azure_devops_create_pipeline"); +}); + +test("getMCPToolName - handles mixed case in server names", () => { + const server = createMcpServer("GitLab"); + const tool = createMCPTool("create_merge_request"); + + const result = getMCPToolName(server, tool); + expect(result).toBe("gitlab_create_merge_request"); +}); diff --git a/gui/src/components/mainInput/Lump/sections/tool-policies/ToolPolicyItem.tsx b/gui/src/components/mainInput/Lump/sections/tool-policies/ToolPolicyItem.tsx index f7b0a97d1..b92816839 100644 --- a/gui/src/components/mainInput/Lump/sections/tool-policies/ToolPolicyItem.tsx +++ b/gui/src/components/mainInput/Lump/sections/tool-policies/ToolPolicyItem.tsx @@ -102,7 +102,7 @@ function ToolPolicyItem(props: ToolDropdownItemProps) { /> )} - {props.tool.function.name} + {props.tool.originalFunctionName ?? props.tool.function.name}

@@ -124,16 +124,16 @@ function ToolPolicyItem(props: ToolDropdownItemProps) { ) : policy === "allowedWithoutPermission" ? ( <> - Auto - + Auto + Automatic ) : ( // allowedWithPermission <> - Ask - + Ask + Ask First From 364603e4dc9b83da51af04328139a73c374400f6 Mon Sep 17 00:00:00 2001 From: Jacob Kim Date: Wed, 4 Jun 2025 16:20:13 -0700 Subject: [PATCH 065/118] fix prettier checks by pulling from main --- core/tools/implementations/runTerminalCommand.ts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/core/tools/implementations/runTerminalCommand.ts b/core/tools/implementations/runTerminalCommand.ts index b83adc479..785f4ee30 100644 --- a/core/tools/implementations/runTerminalCommand.ts +++ b/core/tools/implementations/runTerminalCommand.ts @@ -10,7 +10,17 @@ import { const asyncExec = util.promisify(childProcess.exec); -const ENABLED_FOR_REMOTES = ["","local","wsl","dev-container","devcontainer","ssh-remote","attached-container","codespaces","tunnel"]; +const ENABLED_FOR_REMOTES = [ + "", + "local", + "wsl", + "dev-container", + "devcontainer", + "ssh-remote", + "attached-container", + "codespaces", + "tunnel", +]; export const runTerminalCommandImpl: ToolImpl = async (args, extras) => { // Default to waiting for completion if not specified From cd6e2ab23f1445c4da567f13e3ee5f9b45343fd5 Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Wed, 4 Jun 2025 16:48:27 -0700 Subject: [PATCH 066/118] BROKEN: mcp conversion utils, tool name updates --- core/commands/slash/mcp.ts | 22 +++--- core/config/profile/doLoadConfig.ts | 90 +++++++++------------- core/tools/mcpToolName.vitest.ts | 2 +- core/tools/{mcpToolName.ts => mcpTools.ts} | 6 +- 4 files changed, 51 insertions(+), 69 deletions(-) rename core/tools/{mcpToolName.ts => mcpTools.ts} (51%) diff --git a/core/commands/slash/mcp.ts b/core/commands/slash/mcp.ts index 84df38989..a4dad2802 100644 --- a/core/commands/slash/mcp.ts +++ b/core/commands/slash/mcp.ts @@ -1,28 +1,30 @@ import { Client } from "@modelcontextprotocol/sdk/client/index.js"; import { PromptMessage } from "@modelcontextprotocol/sdk/types.js"; -import { ChatMessage, SlashCommand } from "../../index.js"; +import { ChatMessage, MCPPrompt, SlashCommand } from "../../index.js"; import { renderChatMessage } from "../../util/messageContent.js"; -export function constructMcpSlashCommand( +export function mcpPromptToSlashCommand( client: Client, - name: string, - description?: string, - args?: string[], + prompt: MCPPrompt, ): SlashCommand { return { - name, - description: description ?? "MCP Prompt", + name: prompt.name, + description: prompt.description ?? "MCP Prompt", params: {}, run: async function* (context) { const argsObject: { [key: string]: string } = {}; const userInput = context.input.split(" ").slice(1).join(" "); - if (args) { - args.forEach((arg, i) => { + if (prompt.arguments) { + const argNames = prompt.arguments.map((a) => a.name); + argNames.forEach((arg, i) => { argsObject[arg] = ""; // userInput }); } - const result = await client.getPrompt({ name, arguments: argsObject }); + const result = await client.getPrompt({ + name: prompt.name, + arguments: argsObject, + }); const mcpMessages: PromptMessage[] = result.messages; const messages: ChatMessage[] = mcpMessages.map((msg) => { if (msg.content.type !== "text") { diff --git a/core/config/profile/doLoadConfig.ts b/core/config/profile/doLoadConfig.ts index dd04d1915..ee93210fb 100644 --- a/core/config/profile/doLoadConfig.ts +++ b/core/config/profile/doLoadConfig.ts @@ -17,7 +17,7 @@ import { SerializedContinueConfig, Tool, } from "../../"; -import { constructMcpSlashCommand } from "../../commands/slash/mcp"; +import { mcpPromptToSlashCommand } from "../../commands/slash/mcp"; import { MCPManagerSingleton } from "../../context/mcp/MCPManagerSingleton"; import MCPContextProvider from "../../context/providers/MCPContextProvider"; import { ControlPlaneProxyInfo } from "../../control-plane/analytics/IAnalyticsProvider.js"; @@ -26,8 +26,7 @@ import { getControlPlaneEnv } from "../../control-plane/env.js"; import { TeamAnalytics } from "../../control-plane/TeamAnalytics.js"; import ContinueProxy from "../../llm/llms/stubs/ContinueProxy"; import { getConfigDependentToolDefinitions } from "../../tools"; -import { encodeMCPToolUri } from "../../tools/callTool"; -import { getMCPToolName } from "../../tools/mcpToolName"; +import { mcpToolToTool } from "../../tools/mcpTools"; import { getConfigJsonPath, getConfigYamlPath } from "../../util/paths"; import { localPathOrUriToPath } from "../../util/pathToUri"; import { Telemetry } from "../../util/posthog"; @@ -140,6 +139,13 @@ export default async function doLoadConfig(options: { // Rectify model selections for each role newConfig = rectifySelectedModelsFromGlobalContext(newConfig, profileId); + // Add tools that depend on rules etc. + newConfig.tools.push( + ...getConfigDependentToolDefinitions({ + rules: newConfig.rules, + }), + ); + // Add things from MCP servers const mcpManager = MCPManagerSingleton.getInstance(); const mcpServerStatuses = mcpManager.getStatuses(); @@ -151,31 +157,22 @@ export default async function doLoadConfig(options: { }); newConfig.mcpServerStatuses = serializableStatuses; + // Keep track of tool names to avoid duplicates + const toolNames = new Set(); + + newConfig.tools.forEach((tool) => { + toolNames.add(tool.function.name); + }); + for (const server of mcpServerStatuses) { if (server.status === "connected") { - const serverTools: Tool[] = server.tools.map((tool) => ({ - displayTitle: server.name + " " + tool.name, - function: { - description: tool.description, - name: getMCPToolName(server, tool), - parameters: tool.inputSchema, - }, - faviconUrl: server.faviconUrl, - readonly: false, - type: "function" as const, - uri: encodeMCPToolUri(server.id, tool.name), - group: server.name, - originalFunctionName: tool.name, - })); + const serverTools: Tool[] = server.tools.map((tool) => + mcpToolToTool(server, tool), + ); newConfig.tools.push(...serverTools); const serverSlashCommands = server.prompts.map((prompt) => - constructMcpSlashCommand( - server.client, - prompt.name, - prompt.description, - prompt.arguments?.map((a: any) => a.name), - ), + mcpPromptToSlashCommand(server.client, prompt), ); newConfig.slashCommands.push(...serverSlashCommands); @@ -205,45 +202,28 @@ export default async function doLoadConfig(options: { } } - newConfig.tools.push( - ...getConfigDependentToolDefinitions({ - rules: newConfig.rules, - }), - ); + // Warn user about duplicate tool names + // Could change this behavior in a few ways, e.g. to prepend server name to all tool names from that server if ANY are duplicate + // Object.entries(toolNameCounts).forEach(([toolName, count]) => { + // if (count > 1) { + // errors!.push({ + // fatal: false, + // message: `Duplicate (${count}) tools named "${toolName}" detected. Permissions will conflict and usage may be unpredictable`, + // }); + // } + // }); - // Detect duplicate tool names - const counts: Record = {}; - newConfig.tools.forEach((tool) => { - if (counts[tool.function.name]) { - counts[tool.function.name] = counts[tool.function.name] + 1; - } else { - counts[tool.function.name] = 1; - } - }); - - Object.entries(counts).forEach(([toolName, count]) => { - if (count > 1) { - errors!.push({ - fatal: false, - message: `Duplicate (${count}) tools named "${toolName}" detected. Permissions will conflict and usage may be unpredictable`, - }); - } - }); - - const ruleCounts: Record = {}; + // Warn about duplicate rules + const ruleCounts = new Map(); newConfig.rules.forEach((rule) => { if (rule.name) { - if (ruleCounts[rule.name]) { - ruleCounts[rule.name] = ruleCounts[rule.name] + 1; - } else { - ruleCounts[rule.name] = 1; - } + ruleCounts.set(rule.name, (ruleCounts.get(rule.name) || 0) + 1); } }); - Object.entries(ruleCounts).forEach(([ruleName, count]) => { + ruleCounts.forEach((count, ruleName) => { if (count > 1) { - errors!.push({ + errors.push({ fatal: false, message: `Duplicate (${count}) rules named "${ruleName}" detected. This may cause unexpected behavior`, }); diff --git a/core/tools/mcpToolName.vitest.ts b/core/tools/mcpToolName.vitest.ts index 8c20f630a..7b11b26dd 100644 --- a/core/tools/mcpToolName.vitest.ts +++ b/core/tools/mcpToolName.vitest.ts @@ -1,6 +1,6 @@ import { expect, test } from "vitest"; import { MCPServerStatus, MCPTool } from ".."; -import { getMCPToolName } from "./mcpToolName"; +import { getMCPToolName } from "./mcpTools"; const createMcpServer = (name: string): MCPServerStatus => ({ name, diff --git a/core/tools/mcpToolName.ts b/core/tools/mcpTools.ts similarity index 51% rename from core/tools/mcpToolName.ts rename to core/tools/mcpTools.ts index 6440ef5e7..5e4a3f132 100644 --- a/core/tools/mcpToolName.ts +++ b/core/tools/mcpTools.ts @@ -1,9 +1,9 @@ import { MCPServerStatus, MCPTool } from ".."; export function getMCPToolName(server: MCPServerStatus, tool: MCPTool) { - const serverPrefix = server.name.split(" ").join("_").toLowerCase(); - if (tool.name.startsWith(serverPrefix)) { + const serverSuffix = server.name.split(" ").join("_").toLowerCase(); + if (tool.name.endsWith(serverSuffix)) { return tool.name; } - return `${serverPrefix}_${tool.name}`; + return `${tool.name}_${serverSuffix}`; } From fd21b80f590752a10a52b4ad0dcb9461924db043 Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Wed, 4 Jun 2025 16:52:14 -0700 Subject: [PATCH 067/118] Revert "BROKEN: mcp conversion utils, tool name updates" This reverts commit cd6e2ab23f1445c4da567f13e3ee5f9b45343fd5. --- core/commands/slash/mcp.ts | 22 +++-- core/config/profile/doLoadConfig.ts | 94 +++++++++++++--------- core/tools/{mcpTools.ts => mcpToolName.ts} | 6 +- core/tools/mcpToolName.vitest.ts | 2 +- 4 files changed, 71 insertions(+), 53 deletions(-) rename core/tools/{mcpTools.ts => mcpToolName.ts} (51%) diff --git a/core/commands/slash/mcp.ts b/core/commands/slash/mcp.ts index a4dad2802..84df38989 100644 --- a/core/commands/slash/mcp.ts +++ b/core/commands/slash/mcp.ts @@ -1,30 +1,28 @@ import { Client } from "@modelcontextprotocol/sdk/client/index.js"; import { PromptMessage } from "@modelcontextprotocol/sdk/types.js"; -import { ChatMessage, MCPPrompt, SlashCommand } from "../../index.js"; +import { ChatMessage, SlashCommand } from "../../index.js"; import { renderChatMessage } from "../../util/messageContent.js"; -export function mcpPromptToSlashCommand( +export function constructMcpSlashCommand( client: Client, - prompt: MCPPrompt, + name: string, + description?: string, + args?: string[], ): SlashCommand { return { - name: prompt.name, - description: prompt.description ?? "MCP Prompt", + name, + description: description ?? "MCP Prompt", params: {}, run: async function* (context) { const argsObject: { [key: string]: string } = {}; const userInput = context.input.split(" ").slice(1).join(" "); - if (prompt.arguments) { - const argNames = prompt.arguments.map((a) => a.name); - argNames.forEach((arg, i) => { + if (args) { + args.forEach((arg, i) => { argsObject[arg] = ""; // userInput }); } - const result = await client.getPrompt({ - name: prompt.name, - arguments: argsObject, - }); + const result = await client.getPrompt({ name, arguments: argsObject }); const mcpMessages: PromptMessage[] = result.messages; const messages: ChatMessage[] = mcpMessages.map((msg) => { if (msg.content.type !== "text") { diff --git a/core/config/profile/doLoadConfig.ts b/core/config/profile/doLoadConfig.ts index ee93210fb..dd04d1915 100644 --- a/core/config/profile/doLoadConfig.ts +++ b/core/config/profile/doLoadConfig.ts @@ -17,7 +17,7 @@ import { SerializedContinueConfig, Tool, } from "../../"; -import { mcpPromptToSlashCommand } from "../../commands/slash/mcp"; +import { constructMcpSlashCommand } from "../../commands/slash/mcp"; import { MCPManagerSingleton } from "../../context/mcp/MCPManagerSingleton"; import MCPContextProvider from "../../context/providers/MCPContextProvider"; import { ControlPlaneProxyInfo } from "../../control-plane/analytics/IAnalyticsProvider.js"; @@ -26,7 +26,8 @@ import { getControlPlaneEnv } from "../../control-plane/env.js"; import { TeamAnalytics } from "../../control-plane/TeamAnalytics.js"; import ContinueProxy from "../../llm/llms/stubs/ContinueProxy"; import { getConfigDependentToolDefinitions } from "../../tools"; -import { mcpToolToTool } from "../../tools/mcpTools"; +import { encodeMCPToolUri } from "../../tools/callTool"; +import { getMCPToolName } from "../../tools/mcpToolName"; import { getConfigJsonPath, getConfigYamlPath } from "../../util/paths"; import { localPathOrUriToPath } from "../../util/pathToUri"; import { Telemetry } from "../../util/posthog"; @@ -139,13 +140,6 @@ export default async function doLoadConfig(options: { // Rectify model selections for each role newConfig = rectifySelectedModelsFromGlobalContext(newConfig, profileId); - // Add tools that depend on rules etc. - newConfig.tools.push( - ...getConfigDependentToolDefinitions({ - rules: newConfig.rules, - }), - ); - // Add things from MCP servers const mcpManager = MCPManagerSingleton.getInstance(); const mcpServerStatuses = mcpManager.getStatuses(); @@ -157,22 +151,31 @@ export default async function doLoadConfig(options: { }); newConfig.mcpServerStatuses = serializableStatuses; - // Keep track of tool names to avoid duplicates - const toolNames = new Set(); - - newConfig.tools.forEach((tool) => { - toolNames.add(tool.function.name); - }); - for (const server of mcpServerStatuses) { if (server.status === "connected") { - const serverTools: Tool[] = server.tools.map((tool) => - mcpToolToTool(server, tool), - ); + const serverTools: Tool[] = server.tools.map((tool) => ({ + displayTitle: server.name + " " + tool.name, + function: { + description: tool.description, + name: getMCPToolName(server, tool), + parameters: tool.inputSchema, + }, + faviconUrl: server.faviconUrl, + readonly: false, + type: "function" as const, + uri: encodeMCPToolUri(server.id, tool.name), + group: server.name, + originalFunctionName: tool.name, + })); newConfig.tools.push(...serverTools); const serverSlashCommands = server.prompts.map((prompt) => - mcpPromptToSlashCommand(server.client, prompt), + constructMcpSlashCommand( + server.client, + prompt.name, + prompt.description, + prompt.arguments?.map((a: any) => a.name), + ), ); newConfig.slashCommands.push(...serverSlashCommands); @@ -202,28 +205,45 @@ export default async function doLoadConfig(options: { } } - // Warn user about duplicate tool names - // Could change this behavior in a few ways, e.g. to prepend server name to all tool names from that server if ANY are duplicate - // Object.entries(toolNameCounts).forEach(([toolName, count]) => { - // if (count > 1) { - // errors!.push({ - // fatal: false, - // message: `Duplicate (${count}) tools named "${toolName}" detected. Permissions will conflict and usage may be unpredictable`, - // }); - // } - // }); + newConfig.tools.push( + ...getConfigDependentToolDefinitions({ + rules: newConfig.rules, + }), + ); - // Warn about duplicate rules - const ruleCounts = new Map(); - newConfig.rules.forEach((rule) => { - if (rule.name) { - ruleCounts.set(rule.name, (ruleCounts.get(rule.name) || 0) + 1); + // Detect duplicate tool names + const counts: Record = {}; + newConfig.tools.forEach((tool) => { + if (counts[tool.function.name]) { + counts[tool.function.name] = counts[tool.function.name] + 1; + } else { + counts[tool.function.name] = 1; } }); - ruleCounts.forEach((count, ruleName) => { + Object.entries(counts).forEach(([toolName, count]) => { if (count > 1) { - errors.push({ + errors!.push({ + fatal: false, + message: `Duplicate (${count}) tools named "${toolName}" detected. Permissions will conflict and usage may be unpredictable`, + }); + } + }); + + const ruleCounts: Record = {}; + newConfig.rules.forEach((rule) => { + if (rule.name) { + if (ruleCounts[rule.name]) { + ruleCounts[rule.name] = ruleCounts[rule.name] + 1; + } else { + ruleCounts[rule.name] = 1; + } + } + }); + + Object.entries(ruleCounts).forEach(([ruleName, count]) => { + if (count > 1) { + errors!.push({ fatal: false, message: `Duplicate (${count}) rules named "${ruleName}" detected. This may cause unexpected behavior`, }); diff --git a/core/tools/mcpTools.ts b/core/tools/mcpToolName.ts similarity index 51% rename from core/tools/mcpTools.ts rename to core/tools/mcpToolName.ts index 5e4a3f132..6440ef5e7 100644 --- a/core/tools/mcpTools.ts +++ b/core/tools/mcpToolName.ts @@ -1,9 +1,9 @@ import { MCPServerStatus, MCPTool } from ".."; export function getMCPToolName(server: MCPServerStatus, tool: MCPTool) { - const serverSuffix = server.name.split(" ").join("_").toLowerCase(); - if (tool.name.endsWith(serverSuffix)) { + const serverPrefix = server.name.split(" ").join("_").toLowerCase(); + if (tool.name.startsWith(serverPrefix)) { return tool.name; } - return `${tool.name}_${serverSuffix}`; + return `${serverPrefix}_${tool.name}`; } diff --git a/core/tools/mcpToolName.vitest.ts b/core/tools/mcpToolName.vitest.ts index 7b11b26dd..8c20f630a 100644 --- a/core/tools/mcpToolName.vitest.ts +++ b/core/tools/mcpToolName.vitest.ts @@ -1,6 +1,6 @@ import { expect, test } from "vitest"; import { MCPServerStatus, MCPTool } from ".."; -import { getMCPToolName } from "./mcpTools"; +import { getMCPToolName } from "./mcpToolName"; const createMcpServer = (name: string): MCPServerStatus => ({ name, From 156248133f34f857f2b380d3f5ac21f4269d84b1 Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Wed, 4 Jun 2025 16:52:47 -0700 Subject: [PATCH 068/118] run terminal command formatting --- core/tools/implementations/runTerminalCommand.ts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/core/tools/implementations/runTerminalCommand.ts b/core/tools/implementations/runTerminalCommand.ts index b83adc479..785f4ee30 100644 --- a/core/tools/implementations/runTerminalCommand.ts +++ b/core/tools/implementations/runTerminalCommand.ts @@ -10,7 +10,17 @@ import { const asyncExec = util.promisify(childProcess.exec); -const ENABLED_FOR_REMOTES = ["","local","wsl","dev-container","devcontainer","ssh-remote","attached-container","codespaces","tunnel"]; +const ENABLED_FOR_REMOTES = [ + "", + "local", + "wsl", + "dev-container", + "devcontainer", + "ssh-remote", + "attached-container", + "codespaces", + "tunnel", +]; export const runTerminalCommandImpl: ToolImpl = async (args, extras) => { // Default to waiting for completion if not specified From 67ab05821191d75a201e516b725a679671f94734 Mon Sep 17 00:00:00 2001 From: Patrick Erichsen Date: Wed, 4 Jun 2025 17:29:11 -0700 Subject: [PATCH 069/118] fix: linting error --- core/tools/implementations/runTerminalCommand.ts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/core/tools/implementations/runTerminalCommand.ts b/core/tools/implementations/runTerminalCommand.ts index b83adc479..785f4ee30 100644 --- a/core/tools/implementations/runTerminalCommand.ts +++ b/core/tools/implementations/runTerminalCommand.ts @@ -10,7 +10,17 @@ import { const asyncExec = util.promisify(childProcess.exec); -const ENABLED_FOR_REMOTES = ["","local","wsl","dev-container","devcontainer","ssh-remote","attached-container","codespaces","tunnel"]; +const ENABLED_FOR_REMOTES = [ + "", + "local", + "wsl", + "dev-container", + "devcontainer", + "ssh-remote", + "attached-container", + "codespaces", + "tunnel", +]; export const runTerminalCommandImpl: ToolImpl = async (args, extras) => { // Default to waiting for completion if not specified From e391d583041c54edb3fa0836eb9186c61e6b063d Mon Sep 17 00:00:00 2001 From: chezsmithy Date: Wed, 4 Jun 2025 17:13:01 -0700 Subject: [PATCH 070/118] fix: :bug: Codebase Indexing was not starting on load --- core/core.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/core.ts b/core/core.ts index aae912b11..4fabefed3 100644 --- a/core/core.ts +++ b/core/core.ts @@ -184,7 +184,7 @@ export class Core { return; } - await this.codeBaseIndexer.refreshCodebaseIndex(dirs); + void this.codeBaseIndexer.refreshCodebaseIndex(dirs); }); }); From 1933a29ec4536d4887130703f1b0f94c3cd3db8d Mon Sep 17 00:00:00 2001 From: Patrick Erichsen Date: Thu, 5 Jun 2025 10:21:23 -0700 Subject: [PATCH 071/118] fix: cleanup model select --- .../components/modelSelection/ModelSelect.tsx | 114 +++++++++--------- .../platform/AssistantSelect.tsx | 21 +--- 2 files changed, 57 insertions(+), 78 deletions(-) diff --git a/gui/src/components/modelSelection/ModelSelect.tsx b/gui/src/components/modelSelection/ModelSelect.tsx index a2b6d72e3..00ced3d60 100644 --- a/gui/src/components/modelSelection/ModelSelect.tsx +++ b/gui/src/components/modelSelection/ModelSelect.tsx @@ -6,14 +6,17 @@ import { PlusIcon, } from "@heroicons/react/24/outline"; import { useContext, useEffect, useRef, useState } from "react"; -import { lightGray } from ".."; import { useAuth } from "../../context/Auth"; import { IdeMessengerContext } from "../../context/IdeMessenger"; import AddModelForm from "../../forms/AddModelForm"; import { useAppDispatch, useAppSelector } from "../../redux/hooks"; import { setDialogMessage, setShowDialog } from "../../redux/slices/uiSlice"; import { updateSelectedModelByRole } from "../../redux/thunks"; -import { getMetaKeyLabel, isMetaEquivalentKeyPressed } from "../../util"; +import { + fontSize, + getMetaKeyLabel, + isMetaEquivalentKeyPressed, +} from "../../util"; import { Listbox, ListboxButton, ListboxOption, ListboxOptions } from "../ui"; interface ModelOptionProps { @@ -48,15 +51,6 @@ function ModelOption({ }: ModelOptionProps) { const ideMessenger = useContext(IdeMessengerContext); - const [hovered, setHovered] = useState(false); - - function onClickGear(e: any) { - e.stopPropagation(); - e.preventDefault(); - - ideMessenger.post("config/openProfile", { profileId: undefined }); - } - function handleOptionClick(e: any) { if (showMissingApiKeyMsg) { e.preventDefault(); @@ -69,33 +63,21 @@ function ModelOption({ key={idx} disabled={showMissingApiKeyMsg} value={option.value} - onMouseEnter={() => setHovered(true)} - onMouseLeave={() => setHovered(false)} onClick={handleOptionClick} > -
-
-
- - - {option.title} - {showMissingApiKeyMsg && ( - - (Missing API key) - - )} - -
-
- - -
+
+
+ + + {option.title} + {showMissingApiKeyMsg && ( + (Missing API key) + )} +
+
); @@ -106,6 +88,11 @@ function ModelSelect() { const isInEdit = useAppSelector((store) => store.session.isInEdit); const config = useAppSelector((state) => state.config.config); + const ideMessenger = useContext(IdeMessengerContext); + const buttonRef = useRef(null); + const [options, setOptions] = useState([]); + const [sortedOptions, setSortedOptions] = useState([]); + const { selectedProfile } = useAuth(); let selectedModel = null; let allModels = null; @@ -120,11 +107,6 @@ function ModelSelect() { allModels = config.modelsByRole.chat; } - const buttonRef = useRef(null); - const [options, setOptions] = useState([]); - const [sortedOptions, setSortedOptions] = useState([]); - const { selectedProfile } = useAuth(); - // Sort so that options without an API key are at the end useEffect(() => { const alphaSort = options.sort((a, b) => a.title.localeCompare(b.title)); @@ -230,8 +212,20 @@ function ModelSelect() { aria-hidden="true" /> - -
+ +
+ Models + + ideMessenger.post("config/openProfile", { + profileId: undefined, + }) + } + /> +
+ +
{sortedOptions.map((option, idx) => ( -
- {selectedProfile?.profileType === "local" && ( - <> - -
- - Add Chat model -
-
- - )} + {selectedProfile?.profileType === "local" && ( + +
+ + Add Chat model +
+
+ )} - - {getMetaKeyLabel()}' to toggle model - +
+ {getMetaKeyLabel()}' to toggle model
diff --git a/gui/src/components/modelSelection/platform/AssistantSelect.tsx b/gui/src/components/modelSelection/platform/AssistantSelect.tsx index 194346045..a9a3b9e58 100644 --- a/gui/src/components/modelSelection/platform/AssistantSelect.tsx +++ b/gui/src/components/modelSelection/platform/AssistantSelect.tsx @@ -32,7 +32,6 @@ import { import type { ProfileDescription } from "core/config/ConfigHandler"; import { useNavigate } from "react-router-dom"; -import { vscCommandCenterInactiveBorder } from "../.."; import { cn } from "../../../util/cn"; import { ROUTES } from "../../../util/navigation"; import { useLump } from "../../mainInput/Lump/LumpContext"; @@ -116,7 +115,7 @@ const AssistantSelectOption = ({ {profile.errors && profile.errors?.length > 0 && ( { e.preventDefault(); e.stopPropagation(); @@ -292,7 +291,7 @@ export default function AssistantSelect() {
- Assistants + Assistants
{ @@ -328,18 +327,11 @@ export default function AssistantSelect() {
-
-
login(false)} >
-
-
Date: Thu, 5 Jun 2025 10:23:50 -0700 Subject: [PATCH 072/118] Update ModelSelect.tsx --- gui/src/components/modelSelection/ModelSelect.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gui/src/components/modelSelection/ModelSelect.tsx b/gui/src/components/modelSelection/ModelSelect.tsx index 00ced3d60..5a1dd9118 100644 --- a/gui/src/components/modelSelection/ModelSelect.tsx +++ b/gui/src/components/modelSelection/ModelSelect.tsx @@ -244,7 +244,12 @@ function ModelSelect() { value={"addModel" as any} className="border-border border-x-0 border-y border-solid" > -
+
Add Chat model
From f7fc1b83f2fb67caaaeed41e8df9381d08764272 Mon Sep 17 00:00:00 2001 From: Jacob Kim Date: Thu, 5 Jun 2025 11:53:19 -0700 Subject: [PATCH 073/118] remove NEED_ERROR_PROPAGATION, pass asConfigResult as part of the option instead --- core/config/yaml/loadYaml.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/core/config/yaml/loadYaml.ts b/core/config/yaml/loadYaml.ts index b8cbf1938..68f849aaf 100644 --- a/core/config/yaml/loadYaml.ts +++ b/core/config/yaml/loadYaml.ts @@ -118,7 +118,6 @@ async function loadConfigYaml(options: { // ); // This is how we allow use of blocks locally - const NEED_ERROR_PROPAGATION = true; const unrollResult = await unrollAssistant( packageIdentifier, new RegistryClient({ @@ -138,20 +137,21 @@ async function loadConfigYaml(options: { ), renderSecrets: true, injectBlocks: allLocalBlocks, + asConfigResult: true }, - NEED_ERROR_PROPAGATION, ); const errors: ConfigValidationError[] = []; - let config = overrideConfigYaml ?? unrollResult.config; + const config = overrideConfigYaml ?? unrollResult.config; + if (config) { isAssistantUnrolledNonNullable(config) ? errors.push(...validateConfigYaml(config)) : errors.push({ - fatal: true, - message: "Assistant includes blocks that don't exist", - }); + fatal: true, + message: "Assistant includes blocks that don't exist", + }); } if (unrollResult.errors) { From cdcb35484dac4dd2cd670a7d04243657e57b88ff Mon Sep 17 00:00:00 2001 From: Jacob Kim Date: Thu, 5 Jun 2025 11:54:42 -0700 Subject: [PATCH 074/118] add asConfigResult field to BaseUnrollAssistantOptions --- packages/config-yaml/src/load/unroll.ts | 134 ++++++++---------------- 1 file changed, 46 insertions(+), 88 deletions(-) diff --git a/packages/config-yaml/src/load/unroll.ts b/packages/config-yaml/src/load/unroll.ts index b90072b9b..7d201d22b 100644 --- a/packages/config-yaml/src/load/unroll.ts +++ b/packages/config-yaml/src/load/unroll.ts @@ -17,7 +17,7 @@ import { configYamlSchema, Rule, } from "../schemas/index.js"; -import { ConfigResult } from "../validation.js"; +import { ConfigResult, ConfigValidationError } from "../validation.js"; import { packageIdentifierToShorthandSlug, useProxyForUnrenderedSecrets, @@ -184,6 +184,7 @@ async function extractRenderedSecretsMap( export interface BaseUnrollAssistantOptions { renderSecrets: boolean; injectBlocks?: PackageIdentifier[]; + asConfigResult?: true; } export interface DoNotRenderSecretsUnrollAssistantOptions @@ -205,49 +206,35 @@ export type UnrollAssistantOptions = | DoNotRenderSecretsUnrollAssistantOptions | RenderSecretsUnrollAssistantOptions; -// Overload when we need error propapagation. +// Overload to satisfy existing consumers of unrollAssistant. export async function unrollAssistant( id: PackageIdentifier, registry: Registry, - options: UnrollAssistantOptions, - needErrorPropagation: true, + options: UnrollAssistantOptions & { asConfigResult: true } ): Promise>; -// Overload when we don't need error propapagation. export async function unrollAssistant( id: PackageIdentifier, registry: Registry, - options: UnrollAssistantOptions, - needErrorPropagation?: false, + options: UnrollAssistantOptions ): Promise; export async function unrollAssistant( id: PackageIdentifier, registry: Registry, options: UnrollAssistantOptions, - needErrorPropagation: boolean = false, ): Promise> { // Request the content from the registry const rawContent = await registry.getContent(id); - // Somewhat annoyingly, we need this redundant ternary to circumvent overload matching error. - // Without it TypeScript complains that no overloads of unrollAssistant - // has a field needErrorPropagation that accepts a boolean. - return needErrorPropagation - ? unrollAssistantFromContent( - id, - rawContent, - registry, - options, - needErrorPropagation, - ) - : unrollAssistantFromContent( - id, - rawContent, - registry, - options, - needErrorPropagation, - ); + const result = unrollAssistantFromContent( + id, + rawContent, + registry, + options, + ) + + return result; } function renderTemplateData( @@ -267,30 +254,11 @@ function renderTemplateData( return templatedYaml; } -// Overload when we need error propapagation. export async function unrollAssistantFromContent( id: PackageIdentifier, rawYaml: string, registry: Registry, options: UnrollAssistantOptions, - needErrorPropagation: true, -): Promise>; - -// Overload when we need don't error propapagation. -export async function unrollAssistantFromContent( - id: PackageIdentifier, - rawYaml: string, - registry: Registry, - options: UnrollAssistantOptions, - needErrorPropagation?: false, -): Promise; - -export async function unrollAssistantFromContent( - id: PackageIdentifier, - rawYaml: string, - registry: Registry, - options: UnrollAssistantOptions, - needErrorPropagation: boolean = false, ): Promise> { // Parse string to Zod-validated YAML let parsedYaml = parseConfigYaml(rawYaml); @@ -300,15 +268,16 @@ export async function unrollAssistantFromContent( parsedYaml, registry, options.injectBlocks, - needErrorPropagation, + options.asConfigResult ?? false ); // Back to a string so we can fill in template variables - const rawUnrolledYaml = needErrorPropagation - ? YAML.stringify( - (unrolledAssistant as ConfigResult).config, - ) - : YAML.stringify(unrolledAssistant); + const rawUnrolledYaml = YAML.stringify(unrolledAssistant); + // const rawUnrolledYaml = needErrorPropagation + // ? YAML.stringify( + // (unrolledAssistant as ConfigResult).config, + // ) + // : YAML.stringify(unrolledAssistant); // Convert all of the template variables to FQSNs // Secrets from the block will have the assistant slug prepended to the FQSN @@ -338,7 +307,7 @@ export async function unrollAssistantFromContent( options.onPremProxyUrl, ); - if (needErrorPropagation) { + if (options.asConfigResult) { return { config: finalConfig, errors: (unrolledAssistant as ConfigResult).errors, @@ -351,22 +320,13 @@ export async function unrollAssistantFromContent( return finalConfig; } -// We don't need oveloads here because -// the only place unrollBlocks is called directly is this file. -// unrollAssistantFromContent and unrollAssistant -// are called elsewhere in this project -// and imported in other projects. export async function unrollBlocks( assistant: ConfigYaml, registry: Registry, injectBlocks: PackageIdentifier[] | undefined, - needErrorPropagation: boolean = false, + asConfigError: boolean ): Promise> { - const configResult: ConfigResult = { - config: undefined, - errors: [], - configLoadInterrupted: false, - }; + const errors: ConfigValidationError[] = []; const unrolledAssistant: AssistantUnrolled = { name: assistant.name, @@ -399,13 +359,11 @@ export async function unrollBlocks( ); } } catch (err) { - if (needErrorPropagation) { - configResult.errors?.push({ - fatal: false, - // Using JSON.stringify to avoid printing [object Object]. - message: `Failed to unroll block ${JSON.stringify(unrolledBlock.uses)}: ${(err as Error).message}`, - }); - } + errors.push({ + fatal: false, + // Using JSON.stringify to avoid printing [object Object]. + message: `${(err as Error).message}:\n${JSON.stringify(unrolledBlock.uses)}`, + }); console.error( `Failed to unroll block ${JSON.stringify(unrolledBlock.uses)}: ${(err as Error).message}`, @@ -440,13 +398,11 @@ export async function unrollBlocks( rules.push(block); } } catch (err) { - if (needErrorPropagation) { - configResult.errors?.push({ - fatal: false, - // Using JSON.stringify to avoid printing [object Object]. - message: `Failed to unroll block ${JSON.stringify(rule.uses)}: ${(err as Error).message}`, - }); - } + errors.push({ + fatal: false, + // Using JSON.stringify to avoid printing [object Object]. + message: `${(err as Error).message}:\n${JSON.stringify(rule.uses)}`, + }); console.error( `Failed to unroll block ${JSON.stringify(rule.uses)}: ${(err as Error).message}`, @@ -480,13 +436,11 @@ export async function unrollBlocks( ); } } catch (err) { - if (needErrorPropagation) { - configResult.errors?.push({ - fatal: false, - // Using JSON.stringify to avoid printing [object Object]. - message: `Failed to unroll block ${JSON.stringify(injectBlock)}: ${(err as Error).message}`, - }); - } + errors.push({ + fatal: false, + // Using JSON.stringify to avoid printing [object Object]. + message: `${(err as Error).message}:\n${JSON.stringify(injectBlock)}`, + }); console.error( `Failed to unroll block ${JSON.stringify(injectBlock)}: ${(err as Error).message}`, @@ -494,12 +448,16 @@ export async function unrollBlocks( } } - if (needErrorPropagation) { + if (asConfigError) { + const configResult: ConfigResult = { + config: undefined, + errors: undefined, + configLoadInterrupted: false, + }; configResult.config = unrolledAssistant; - if (configResult.errors?.length == 0) { - configResult.errors = undefined; + if (errors.length > 0) { + configResult.errors = errors; } - configResult.configLoadInterrupted = false; return configResult; } From fd51701939610ae8122fc0bfe78c2752a111985d Mon Sep 17 00:00:00 2001 From: Jacob Kim Date: Thu, 5 Jun 2025 11:55:05 -0700 Subject: [PATCH 075/118] bump version --- extensions/vscode/package-lock.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extensions/vscode/package-lock.json b/extensions/vscode/package-lock.json index 1656cee97..38efaa08a 100644 --- a/extensions/vscode/package-lock.json +++ b/extensions/vscode/package-lock.json @@ -1,12 +1,12 @@ { "name": "continue", - "version": "1.1.43", + "version": "1.1.44", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "continue", - "version": "1.1.43", + "version": "1.1.44", "license": "Apache-2.0", "dependencies": { "@continuedev/config-types": "^1.0.14", From 36895bcea810486b3dfb357142d5c04409562fa1 Mon Sep 17 00:00:00 2001 From: Jacob Kim Date: Thu, 5 Jun 2025 11:58:58 -0700 Subject: [PATCH 076/118] pass prettier checks --- core/config/yaml/loadYaml.ts | 8 ++++---- packages/config-yaml/src/load/unroll.ts | 15 +++++---------- 2 files changed, 9 insertions(+), 14 deletions(-) diff --git a/core/config/yaml/loadYaml.ts b/core/config/yaml/loadYaml.ts index 68f849aaf..29c6cc5dd 100644 --- a/core/config/yaml/loadYaml.ts +++ b/core/config/yaml/loadYaml.ts @@ -137,7 +137,7 @@ async function loadConfigYaml(options: { ), renderSecrets: true, injectBlocks: allLocalBlocks, - asConfigResult: true + asConfigResult: true, }, ); @@ -149,9 +149,9 @@ async function loadConfigYaml(options: { isAssistantUnrolledNonNullable(config) ? errors.push(...validateConfigYaml(config)) : errors.push({ - fatal: true, - message: "Assistant includes blocks that don't exist", - }); + fatal: true, + message: "Assistant includes blocks that don't exist", + }); } if (unrollResult.errors) { diff --git a/packages/config-yaml/src/load/unroll.ts b/packages/config-yaml/src/load/unroll.ts index 7d201d22b..db350052a 100644 --- a/packages/config-yaml/src/load/unroll.ts +++ b/packages/config-yaml/src/load/unroll.ts @@ -210,13 +210,13 @@ export type UnrollAssistantOptions = export async function unrollAssistant( id: PackageIdentifier, registry: Registry, - options: UnrollAssistantOptions & { asConfigResult: true } + options: UnrollAssistantOptions & { asConfigResult: true }, ): Promise>; export async function unrollAssistant( id: PackageIdentifier, registry: Registry, - options: UnrollAssistantOptions + options: UnrollAssistantOptions, ): Promise; export async function unrollAssistant( @@ -227,12 +227,7 @@ export async function unrollAssistant( // Request the content from the registry const rawContent = await registry.getContent(id); - const result = unrollAssistantFromContent( - id, - rawContent, - registry, - options, - ) + const result = unrollAssistantFromContent(id, rawContent, registry, options); return result; } @@ -268,7 +263,7 @@ export async function unrollAssistantFromContent( parsedYaml, registry, options.injectBlocks, - options.asConfigResult ?? false + options.asConfigResult ?? false, ); // Back to a string so we can fill in template variables @@ -324,7 +319,7 @@ export async function unrollBlocks( assistant: ConfigYaml, registry: Registry, injectBlocks: PackageIdentifier[] | undefined, - asConfigError: boolean + asConfigError: boolean, ): Promise> { const errors: ConfigValidationError[] = []; From 0d476473bda2ef8bea78064c89c5bc1f6818fec1 Mon Sep 17 00:00:00 2001 From: Patrick Erichsen Date: Thu, 5 Jun 2025 13:31:51 -0700 Subject: [PATCH 077/118] feat: v1 onboarding card --- core/core.ts | 43 +- core/protocol/core.ts | 1 + gui/package-lock.json | 9 +- gui/package.json | 2 +- .../components/OnboardingApiKeyTab.tsx | 25 +- .../loaders/FreeTrialProgressBar.tsx | 2 +- .../components/modelSelection/ModelSelect.tsx | 38 +- gui/src/forms/AddModelForm.tsx | 546 +++++++++++------- gui/src/forms/index.ts | 1 + gui/src/redux/slices/configSlice.ts | 2 +- 10 files changed, 424 insertions(+), 245 deletions(-) create mode 100644 gui/src/forms/index.ts diff --git a/core/core.ts b/core/core.ts index 497e64c66..33f777bf2 100644 --- a/core/core.ts +++ b/core/core.ts @@ -46,11 +46,7 @@ import { import { ConfigYaml } from "@continuedev/config-yaml"; import { isLocalAssistantFile } from "./config/loadLocalAssistants"; -import { - setupBestConfig, - setupLocalConfig, - setupQuickstartConfig, -} from "./config/onboarding"; +import { setupLocalConfig, setupQuickstartConfig } from "./config/onboarding"; import { createNewWorkspaceBlockFile } from "./config/workspace/workspaceBlocks"; import { MCPManagerSingleton } from "./context/mcp/MCPManagerSingleton"; import { streamDiffLines } from "./edit/streamDiffLines"; @@ -60,6 +56,7 @@ import { LLMError } from "./llm"; import { LLMLogger } from "./llm/logger"; import { llmStreamChat } from "./llm/streamChat"; import type { FromCoreProtocol, ToCoreProtocol } from "./protocol"; +import { OnboardingModes } from "./protocol/core"; import type { IMessenger, Message } from "./protocol/messenger"; import { StreamAbortManager } from "./util/abortManager"; @@ -892,26 +889,36 @@ export class Core { } } - private async handleCompleteOnboarding(msg: Message<{ mode: string }>) { - const mode = msg.data.mode; - - if (mode === "Custom") { - return; - } + private async handleCompleteOnboarding( + msg: Message<{ mode: OnboardingModes; models?: any[] }>, + ) { + const { mode, models } = msg.data; let editConfigYamlCallback: (config: ConfigYaml) => ConfigYaml; switch (mode) { - case "Local": + case OnboardingModes.OLLAMA: editConfigYamlCallback = setupLocalConfig; break; - case "Quickstart": - editConfigYamlCallback = setupQuickstartConfig; - break; - - case "Best": - editConfigYamlCallback = setupBestConfig; + case OnboardingModes.API_KEYS: + if (models && models.length > 0) { + editConfigYamlCallback = (config: ConfigYaml) => ({ + ...config, + models: [ + ...(config.models ?? []), + ...models.map((model) => ({ + name: model.title, + provider: model.provider, + model: model.model, + apiKey: model.apiKey, + roles: ["chat", "edit"] as any, + })), + ], + }); + } else { + editConfigYamlCallback = setupQuickstartConfig; + } break; default: diff --git a/core/protocol/core.ts b/core/protocol/core.ts index 4d899b92c..8f33c79fe 100644 --- a/core/protocol/core.ts +++ b/core/protocol/core.ts @@ -174,6 +174,7 @@ export type ToCoreFromIdeOrWebviewProtocol = { completeOnboarding: [ { mode: OnboardingModes; + models?: any[]; }, void, ]; diff --git a/gui/package-lock.json b/gui/package-lock.json index 17f6b1514..f86181e1c 100644 --- a/gui/package-lock.json +++ b/gui/package-lock.json @@ -38,7 +38,7 @@ "react": "^18.2.0", "react-dom": "^18.2.0", "react-error-boundary": "^4.0.11", - "react-hook-form": "^7.47.0", + "react-hook-form": "^7.57.0", "react-intersection-observer": "^9.13.1", "react-markdown": "^9.0.1", "react-redux": "^8.0.5", @@ -9799,9 +9799,10 @@ } }, "node_modules/react-hook-form": { - "version": "7.53.0", - "resolved": "https://registry.npmjs.org/react-hook-form/-/react-hook-form-7.53.0.tgz", - "integrity": "sha512-M1n3HhqCww6S2hxLxciEXy2oISPnAzxY7gvwVPrtlczTM/1dDadXgUxDpHMrMTblDOcm/AXtXxHwZ3jpg1mqKQ==", + "version": "7.57.0", + "resolved": "https://registry.npmjs.org/react-hook-form/-/react-hook-form-7.57.0.tgz", + "integrity": "sha512-RbEks3+cbvTP84l/VXGUZ+JMrKOS8ykQCRYdm5aYsxnDquL0vspsyNhGRO7pcH6hsZqWlPOjLye7rJqdtdAmlg==", + "license": "MIT", "engines": { "node": ">=18.0.0" }, diff --git a/gui/package.json b/gui/package.json index de6da1959..eb510e87d 100644 --- a/gui/package.json +++ b/gui/package.json @@ -47,7 +47,7 @@ "react": "^18.2.0", "react-dom": "^18.2.0", "react-error-boundary": "^4.0.11", - "react-hook-form": "^7.47.0", + "react-hook-form": "^7.57.0", "react-intersection-observer": "^9.13.1", "react-markdown": "^9.0.1", "react-redux": "^8.0.5", diff --git a/gui/src/components/OnboardingCard/components/OnboardingApiKeyTab.tsx b/gui/src/components/OnboardingCard/components/OnboardingApiKeyTab.tsx index 54ed617be..2f99d2d6e 100644 --- a/gui/src/components/OnboardingCard/components/OnboardingApiKeyTab.tsx +++ b/gui/src/components/OnboardingCard/components/OnboardingApiKeyTab.tsx @@ -1,13 +1,34 @@ -import Alert from "../../gui/Alert"; +import { OnboardingModes } from "core/protocol/core"; +import { useContext } from "react"; +import { IdeMessengerContext } from "../../../context/IdeMessenger"; +import { AddModelForm } from "../../../forms"; +import { useSubmitOnboarding } from "../hooks/useSubmitOnboarding"; interface OnboardingApiKeyTabProps { isDialog?: boolean; } export function OnboardingApiKeyTab({ isDialog }: OnboardingApiKeyTabProps) { + const ideMessenger = useContext(IdeMessengerContext); + const { submitOnboarding } = useSubmitOnboarding( + OnboardingModes.API_KEYS, + isDialog, + ); + + const handleSubmit = (models: any[]) => { + // Send the models to core for configuration + ideMessenger.post("completeOnboarding", { + mode: OnboardingModes.API_KEYS, + models, + }); + + // Complete the onboarding flow + submitOnboarding(); + }; + return (
- Configure Continue to a variety of model providers +
); } diff --git a/gui/src/components/loaders/FreeTrialProgressBar.tsx b/gui/src/components/loaders/FreeTrialProgressBar.tsx index dd8d2be39..1307ba900 100644 --- a/gui/src/components/loaders/FreeTrialProgressBar.tsx +++ b/gui/src/components/loaders/FreeTrialProgressBar.tsx @@ -1,7 +1,7 @@ import { ExclamationCircleIcon } from "@heroicons/react/24/outline"; import { useDispatch } from "react-redux"; import { useNavigate } from "react-router-dom"; -import AddModelForm from "../../forms/AddModelForm"; +import { AddModelForm } from "../../forms"; import { setDialogMessage, setShowDialog } from "../../redux/slices/uiSlice"; import { FREE_TRIAL_LIMIT_REQUESTS } from "../../util/freeTrial"; import { ToolTip } from "../gui/Tooltip"; diff --git a/gui/src/components/modelSelection/ModelSelect.tsx b/gui/src/components/modelSelection/ModelSelect.tsx index 5a1dd9118..15a979668 100644 --- a/gui/src/components/modelSelection/ModelSelect.tsx +++ b/gui/src/components/modelSelection/ModelSelect.tsx @@ -1,4 +1,5 @@ import { + ArrowPathIcon, CheckIcon, ChevronDownIcon, Cog6ToothIcon, @@ -8,8 +9,9 @@ import { import { useContext, useEffect, useRef, useState } from "react"; import { useAuth } from "../../context/Auth"; import { IdeMessengerContext } from "../../context/IdeMessenger"; -import AddModelForm from "../../forms/AddModelForm"; +import { AddModelForm } from "../../forms"; import { useAppDispatch, useAppSelector } from "../../redux/hooks"; +import { EMPTY_CONFIG } from "../../redux/slices/configSlice"; import { setDialogMessage, setShowDialog } from "../../redux/slices/uiSlice"; import { updateSelectedModelByRole } from "../../redux/thunks"; import { @@ -185,6 +187,9 @@ function ModelSelect() { ); } + const isConfigLoading = config === EMPTY_CONFIG; + const hasNoModels = allModels?.length === 0; + return ( { @@ -226,18 +231,29 @@ function ModelSelect() {
- {sortedOptions.map((option, idx) => ( - - ))} + {isConfigLoading ? ( +
+ + Loading config +
+ ) : hasNoModels ? ( +
+ No models configured +
+ ) : ( + sortedOptions.map((option, idx) => ( + + )) + )}
- {selectedProfile?.profileType === "local" && ( + {!isConfigLoading && selectedProfile?.profileType === "local" && ( void; + onDone?: () => void; + onSubmit?: (models: any[]) => void; hideFreeTrialLimitMessage?: boolean; } @@ -27,21 +38,41 @@ const MODEL_PROVIDERS_URL = const CODESTRAL_URL = "https://console.mistral.ai/codestral"; const CONTINUE_SETUP_URL = "https://docs.continue.dev/setup/overview"; -function AddModelForm({ +interface ProviderFormData { + provider: ProviderInfo; + apiKey?: string; + selectedModels: string[]; + [key: string]: any; +} + +interface FormData { + providers: ProviderFormData[]; +} + +export function AddModelForm({ onDone, + onSubmit: onSubmitProp, hideFreeTrialLimitMessage, }: QuickModelSetupProps) { - const [selectedProvider, setSelectedProvider] = useState( - providers["openai"]!, - ); const dispatch = useAppDispatch(); const { selectedProfile } = useAuth(); - const [selectedModel, setSelectedModel] = useState( - selectedProvider.packages[0], - ); + const formMethods = useForm({ + defaultValues: { + providers: [ + { + provider: providers["openai"]!, + selectedModels: [], + }, + ], + }, + }); + + const { fields, append, remove } = useFieldArray({ + control: formMethods.control, + name: "providers", + }); - const formMethods = useForm(); const ideMessenger = useContext(IdeMessengerContext); const popularProviderTitles = [ @@ -51,13 +82,14 @@ function AddModelForm({ providers["gemini"]?.title || "", providers["azure"]?.title || "", providers["ollama"]?.title || "", + providers["deepseek"]?.title || "", ]; const allProviders = Object.entries(providers) .filter(([key]) => !["freetrial", "openai-aiohttp"].includes(key)) .map(([, provider]) => provider) .filter((provider) => !!provider) - .map((provider) => provider!); // for type checking + .map((provider) => provider!); const popularProviders = allProviders .filter((provider) => popularProviderTitles.includes(provider.title)) @@ -67,77 +99,115 @@ function AddModelForm({ .filter((provider) => !popularProviderTitles.includes(provider.title)) .sort((a, b) => a.title.localeCompare(b.title)); - const selectedProviderApiKeyUrl = selectedModel.params.model.startsWith( - "codestral", - ) - ? CODESTRAL_URL - : selectedProvider.apiKeyUrl; - function isDisabled() { - if ( - selectedProvider.downloadUrl || - selectedProvider.provider === "free-trial" - ) { - return false; + const providersData = formMethods.watch("providers"); + + for (let i = 0; i < providersData.length; i++) { + const providerData = providersData[i]; + const selectedProvider = providerData.provider; + + if (providerData.selectedModels.length === 0) { + return true; + } + + if ( + !selectedProvider.downloadUrl && + selectedProvider.provider !== "free-trial" + ) { + const required = selectedProvider.collectInputFor + ?.filter((input) => input.required) + .map((input) => { + const value = formMethods.watch(`providers.${i}.${input.key}`); + return value; + }); + + if ( + !required?.every((value) => value !== undefined && value.length > 0) + ) { + return true; + } + } } - const required = selectedProvider.collectInputFor - ?.filter((input) => input.required) - .map((input) => { - const value = formMethods.watch(input.key); - return value; - }); - - return !required?.every((value) => value !== undefined && value.length > 0); + return false; } - useEffect(() => { - setSelectedModel(selectedProvider.packages[0]); - }, [selectedProvider]); - function onSubmit() { - const apiKey = formMethods.watch("apiKey"); - const hasValidApiKey = apiKey !== undefined && apiKey !== ""; - const reqInputFields: Record = {}; - for (let input of selectedProvider.collectInputFor ?? []) { - reqInputFields[input.key] = formMethods.watch(input.key); - } + const providersData = formMethods.watch("providers"); + const models: any[] = []; - const model = { - ...selectedProvider.params, - ...selectedModel.params, - ...reqInputFields, - provider: selectedProvider.provider, - title: selectedModel.title, - ...(hasValidApiKey ? { apiKey } : {}), - }; + providersData.forEach((providerData) => { + const selectedProvider = providerData.provider; - ideMessenger.post("config/addModel", { model }); - ideMessenger.post("config/openProfile", { - profileId: "local", + providerData.selectedModels.forEach((modelTitle) => { + const modelPackage = selectedProvider.packages.find( + (pkg) => pkg.title === modelTitle, + ); + + if (modelPackage) { + const apiKey = providerData.apiKey; + const hasValidApiKey = apiKey !== undefined && apiKey !== ""; + const reqInputFields: Record = {}; + + for (let input of selectedProvider.collectInputFor ?? []) { + if (input.key !== "apiKey") { + reqInputFields[input.key] = (providerData as any)[input.key]; + } + } + + const model = { + ...selectedProvider.params, + ...modelPackage.params, + ...reqInputFields, + provider: selectedProvider.provider, + title: modelPackage.title, + ...(hasValidApiKey ? { apiKey } : {}), + }; + + models.push(model); + } + }); }); - dispatch( - updateSelectedModelByRole({ - selectedProfile, - role: "chat", - modelTitle: model.title, - }), - ); + if (onSubmitProp) { + onSubmitProp(models); + } else { + models.forEach((model) => { + ideMessenger.post("config/addModel", { model }); + }); - onDone(); + ideMessenger.post("config/openProfile", { + profileId: "local", + }); + + if (models.length > 0) { + void dispatch( + updateSelectedModelByRole({ + selectedProfile, + role: "chat", + modelTitle: models[0].title, + }), + ); + } + } + + if (onDone) { + onDone(); + } } - function onClickDownloadProvider() { - selectedProvider.downloadUrl && - ideMessenger.post("openUrl", selectedProvider.downloadUrl); + function addProvider() { + append({ + provider: providers["openai"]!, + selectedModels: [], + }); } return (
-

Add Chat model

+

Add Chat models

{!hideFreeTrialLimitMessage && hasPassedFTL() && (

You've reached the free trial limit of {FREE_TRIAL_LIMIT_REQUESTS}{" "} @@ -153,147 +223,211 @@ function AddModelForm({

)} -
-
- - { - const match = [...popularProviders, ...otherProviders].find( - (provider) => provider.title === val.title, - ); - if (match) { - setSelectedProvider(match); - } - }} - topOptions={popularProviders} - otherOptions={otherProviders} - /> - - Don't see your provider?{" "} - - ideMessenger.post("openUrl", MODEL_PROVIDERS_URL) - } +
+ {fields.map((field, index) => { + const selectedProvider = formMethods.watch( + `providers.${index}.provider`, + ); + const selectedModels = + formMethods.watch(`providers.${index}.selectedModels`) || []; + + const selectedProviderApiKeyUrl = selectedProvider.packages.some( + (pkg) => pkg.params.model?.startsWith("codestral"), + ) + ? CODESTRAL_URL + : selectedProvider.apiKeyUrl; + + return ( +
- Click here - {" "} - to view the full list - -
- - {selectedProvider.downloadUrl && ( -
- - - -

- {selectedProvider.downloadUrl} -

- -
-
- )} - -
- - { - const options = - Object.entries(providers).find( - ([, provider]) => - provider?.title === selectedProvider.title, - )?.[1]?.packages ?? []; - const match = options.find( - (option) => option.title === val.title, - ); - if (match) { - setSelectedModel(match); - } - }} - otherOptions={ - Object.entries(providers).find( - ([, provider]) => - provider?.title === selectedProvider.title, - )?.[1]?.packages - } - /> -
- - {selectedModel.params.model.startsWith("codestral") && ( -
- -

Codestral API key

-

- Note that codestral requires a different API key from other - Mistral models -

-
-
- )} - - {selectedProvider.apiKeyUrl && ( - - )} - - {selectedProvider.collectInputFor && - selectedProvider.collectInputFor - .filter( - (field) => - !Object.values(completionParamsInputs).some( - (input) => input.key === field.key, - ) && - field.required && - field.key !== "apiKey", - ) - .map((field) => ( -
- <> - - - +
+ + {fields.length > 1 && ( + remove(index)} + className="text-description-muted" + > + + + )}
- ))} + +
+
+ + { + const match = [ + ...popularProviders, + ...otherProviders, + ].find((provider) => provider.title === val.title); + if (match) { + formMethods.setValue( + `providers.${index}.provider`, + match, + ); + formMethods.setValue( + `providers.${index}.selectedModels`, + [], + ); + } + }} + topOptions={popularProviders} + otherOptions={otherProviders} + /> +
+ + {selectedProvider.downloadUrl && ( +
+ + { + selectedProvider.downloadUrl && + ideMessenger.post( + "openUrl", + selectedProvider.downloadUrl, + ); + }} + > +

+ {selectedProvider.downloadUrl} +

+ +
+
+ )} + + {selectedProvider.packages.some((pkg) => + pkg.params.model?.startsWith("codestral"), + ) && ( +
+ +

+ Codestral API key +

+

+ Note that codestral requires a different API key + from other Mistral models +

+
+
+ )} + + {selectedProvider.apiKeyUrl && ( + + )} + + {selectedProvider.collectInputFor && + selectedProvider.collectInputFor + .filter( + (field) => + !Object.values(completionParamsInputs).some( + (input) => input.key === field.key, + ) && + field.required && + field.key !== "apiKey", + ) + .map((field) => ( +
+ + +
+ ))} + +
+ +
+ {selectedProvider.packages.map((model) => ( +
+ { + const currentSelected = selectedModels; + if (e.target.checked) { + formMethods.setValue( + `providers.${index}.selectedModels`, + [...currentSelected, model.title], + ); + } else { + formMethods.setValue( + `providers.${index}.selectedModels`, + currentSelected.filter( + (m) => m !== model.title, + ), + ); + } + }} + className="mr-2" + /> + +
+ ))} +
+
+
+
+ ); + })} + + + + Add another provider +
@@ -307,5 +441,3 @@ function AddModelForm({ ); } - -export default AddModelForm; diff --git a/gui/src/forms/index.ts b/gui/src/forms/index.ts new file mode 100644 index 000000000..410a55a37 --- /dev/null +++ b/gui/src/forms/index.ts @@ -0,0 +1 @@ +export * from "./AddModelForm"; diff --git a/gui/src/redux/slices/configSlice.ts b/gui/src/redux/slices/configSlice.ts index 0c78a27e0..b26d596c8 100644 --- a/gui/src/redux/slices/configSlice.ts +++ b/gui/src/redux/slices/configSlice.ts @@ -8,7 +8,7 @@ export type ConfigState = { config: BrowserSerializedContinueConfig; }; -const EMPTY_CONFIG: BrowserSerializedContinueConfig = { +export const EMPTY_CONFIG: BrowserSerializedContinueConfig = { slashCommands: [ { name: "share", From 3d78ce12f36d2d1c428a1201ecce8e6c29552c27 Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Thu, 5 Jun 2025 13:37:08 -0700 Subject: [PATCH 078/118] node fetch patch --- packages/fetch/package-lock.json | 203 ++++++++ packages/fetch/src/chunk-transformer.test.ts | 137 ----- packages/fetch/src/fetch.ts | 3 +- packages/fetch/src/node-fetch-bug.test.ts | 135 ----- packages/fetch/src/node-fetch-patch.js | 512 +++++++++++++++++++ packages/fetch/src/patch-test.test.js | 66 +++ packages/fetch/src/premature-close.test.ts | 405 --------------- 7 files changed, 783 insertions(+), 678 deletions(-) delete mode 100644 packages/fetch/src/chunk-transformer.test.ts delete mode 100644 packages/fetch/src/node-fetch-bug.test.ts create mode 100644 packages/fetch/src/node-fetch-patch.js create mode 100644 packages/fetch/src/patch-test.test.js delete mode 100644 packages/fetch/src/premature-close.test.ts diff --git a/packages/fetch/package-lock.json b/packages/fetch/package-lock.json index f2f55c648..087ca68a3 100644 --- a/packages/fetch/package-lock.json +++ b/packages/fetch/package-lock.json @@ -428,12 +428,79 @@ "node": ">=18" } }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.8.tgz", + "integrity": "sha512-imAbBGkb+ebQyxKgzv5Hu2nmROxoDOXHh80evxdoXNOrvAnVx7zimzc1Oo5h9RlfV4vPXaE2iM5pOFbvOCClWA==", + "dev": true, + "license": "MIT", + "optional": true, + "peer": true, + "dependencies": { + "@jridgewell/set-array": "^1.2.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.24" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "dev": true, + "license": "MIT", + "optional": true, + "peer": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/set-array": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", + "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", + "dev": true, + "license": "MIT", + "optional": true, + "peer": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/source-map": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.6.tgz", + "integrity": "sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ==", + "dev": true, + "license": "MIT", + "optional": true, + "peer": true, + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.25" + } + }, "node_modules/@jridgewell/sourcemap-codec": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", "dev": true }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.25", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", + "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", + "dev": true, + "license": "MIT", + "optional": true, + "peer": true, + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, "node_modules/@rollup/rollup-android-arm-eabi": { "version": "4.41.1", "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.41.1.tgz", @@ -860,6 +927,15 @@ "node": ">=12" } }, + "node_modules/buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "dev": true, + "license": "MIT", + "optional": true, + "peer": true + }, "node_modules/cac": { "version": "6.7.14", "resolved": "https://registry.npmjs.org/cac/-/cac-6.7.14.tgz", @@ -894,10 +970,20 @@ "node": ">= 16" } }, + "node_modules/commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true, + "license": "MIT", + "optional": true, + "peer": true + }, "node_modules/data-uri-to-buffer": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz", "integrity": "sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==", + "license": "MIT", "engines": { "node": ">= 12" } @@ -1005,6 +1091,7 @@ "url": "https://paypal.me/jimmywarting" } ], + "license": "MIT", "dependencies": { "node-domexception": "^1.0.0", "web-streams-polyfill": "^3.0.3" @@ -1036,6 +1123,7 @@ "version": "4.0.10", "resolved": "https://registry.npmjs.org/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz", "integrity": "sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==", + "license": "MIT", "dependencies": { "fetch-blob": "^3.1.2" }, @@ -1123,6 +1211,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz", "integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==", + "deprecated": "Use your platform's native DOMException instead", "funding": [ { "type": "github", @@ -1133,6 +1222,7 @@ "url": "https://paypal.me/jimmywarting" } ], + "license": "MIT", "engines": { "node": ">=10.5.0" } @@ -1141,6 +1231,7 @@ "version": "3.3.2", "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.2.tgz", "integrity": "sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==", + "license": "MIT", "dependencies": { "data-uri-to-buffer": "^4.0.0", "fetch-blob": "^3.1.4", @@ -1248,6 +1339,18 @@ "integrity": "sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==", "dev": true }, + "node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "license": "BSD-3-Clause", + "optional": true, + "peer": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/source-map-js": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", @@ -1257,6 +1360,19 @@ "node": ">=0.10.0" } }, + "node_modules/source-map-support": { + "version": "0.5.21", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", + "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", + "dev": true, + "license": "MIT", + "optional": true, + "peer": true, + "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, "node_modules/stackback": { "version": "0.0.2", "resolved": "https://registry.npmjs.org/stackback/-/stackback-0.0.2.tgz", @@ -1269,6 +1385,42 @@ "integrity": "sha512-UGvjygr6F6tpH7o2qyqR6QYpwraIjKSdtzyBdyytFOHmPZY917kwdwLG0RbOjWOnKmnm3PeHjaoLLMie7kPLQw==", "dev": true }, + "node_modules/terser": { + "version": "5.41.0", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.41.0.tgz", + "integrity": "sha512-H406eLPXpZbAX14+B8psIuvIr8+3c+2hkuYzpMkoE0ij+NdsVATbA78vb8neA/eqrj7rywa2pIkdmWRsXW6wmw==", + "dev": true, + "license": "BSD-2-Clause", + "optional": true, + "peer": true, + "dependencies": { + "@jridgewell/source-map": "^0.3.3", + "acorn": "^8.14.0", + "commander": "^2.20.0", + "source-map-support": "~0.5.20" + }, + "bin": { + "terser": "bin/terser" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/terser/node_modules/acorn": { + "version": "8.14.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.1.tgz", + "integrity": "sha512-OvQ/2pUDKmgfCg++xsTX1wGxfTaszcHVcTctW4UJB4hibJx2HXxxO5UmVgyjMa+ZDsiaf5wWLXYpRWMmBI0QHg==", + "dev": true, + "license": "MIT", + "optional": true, + "peer": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, "node_modules/tinybench": { "version": "2.9.0", "resolved": "https://registry.npmjs.org/tinybench/-/tinybench-2.9.0.tgz", @@ -1566,6 +1718,7 @@ "version": "3.3.3", "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.3.3.tgz", "integrity": "sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw==", + "license": "MIT", "engines": { "node": ">= 8" } @@ -1586,6 +1739,21 @@ "node": ">=8" } }, + "node_modules/yaml": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.8.0.tgz", + "integrity": "sha512-4lLa/EcQCB0cJkyts+FpIRx5G/llPxfP6VQU5KByHEhLxY3IJCH0f0Hy1MHI8sClTvsIb8qwRJ6R/ZdlDJ/leQ==", + "dev": true, + "license": "ISC", + "optional": true, + "peer": true, + "bin": { + "yaml": "bin.mjs" + }, + "engines": { + "node": ">= 14.6" + } + }, "node_modules/zod": { "version": "3.23.8", "resolved": "https://registry.npmjs.org/zod/-/zod-3.23.8.tgz", @@ -1593,6 +1761,41 @@ "funding": { "url": "https://github.com/sponsors/colinhacks" } + }, + "vendor/node-fetch": { + "version": "3.3.2", + "extraneous": true, + "license": "MIT", + "dependencies": { + "data-uri-to-buffer": "^4.0.0", + "fetch-blob": "^3.1.4", + "formdata-polyfill": "^4.0.10" + }, + "devDependencies": { + "abort-controller": "^3.0.0", + "abortcontroller-polyfill": "^1.7.1", + "busboy": "^1.4.0", + "c8": "^7.7.2", + "chai": "^4.3.4", + "chai-as-promised": "^7.1.1", + "chai-iterator": "^3.0.2", + "chai-string": "^1.5.0", + "coveralls": "^3.1.0", + "form-data": "^4.0.0", + "formdata-node": "^4.2.4", + "mocha": "^9.1.3", + "p-timeout": "^5.0.0", + "stream-consumers": "^1.0.1", + "tsd": "^0.14.0", + "xo": "^0.39.1" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/node-fetch" + } } } } diff --git a/packages/fetch/src/chunk-transformer.test.ts b/packages/fetch/src/chunk-transformer.test.ts deleted file mode 100644 index 1f8354e62..000000000 --- a/packages/fetch/src/chunk-transformer.test.ts +++ /dev/null @@ -1,137 +0,0 @@ -import { RequestOptions } from "@continuedev/config-types"; -import { Response } from "node-fetch"; -import { fetchwithRequestOptions } from "./fetch.js"; - -// Buffer accumulator that ensures proper chunk boundaries -class ChunkAccumulatorTransform implements Transformer { - private buffer: Uint8Array = new Uint8Array(0); - private expectedChunkSize: number | null = null; - private readonly minBufferSize = 8192; // 8KB minimum buffer - - constructor() { - this.buffer = new Uint8Array(0); - } - - private concatUint8Arrays(a: Uint8Array, b: Uint8Array): Uint8Array { - const result = new Uint8Array(a.length + b.length); - result.set(a, 0); - result.set(b, a.length); - return result; - } - - private tryParseChunkSize( - data: Uint8Array, - startIndex: number, - ): { size: number | null; endIndex: number } { - let size = 0; - let i = startIndex; - - // Look for the chunk size end marker - while (i < data.length - 1) { - // Check for CRLF - if (data[i] === 0x0d && data[i + 1] === 0x0a) { - return { size, endIndex: i + 2 }; - } - - // Parse hex digit - const char = String.fromCharCode(data[i]); - const digit = parseInt(char, 16); - if (!isNaN(digit)) { - size = (size << 4) | digit; - } - i++; - } - - return { size: null, endIndex: startIndex }; - } - - transform( - chunk: Uint8Array, - controller: TransformStreamDefaultController, - ) { - // Accumulate incoming data - this.buffer = this.concatUint8Arrays(this.buffer, chunk); - - // Process buffer while we have enough data - while (this.buffer.length > 0) { - // If we don't have a chunk size yet, try to parse it - if (this.expectedChunkSize === null) { - const { size, endIndex } = this.tryParseChunkSize(this.buffer, 0); - - if (size === null) { - // Not enough data to parse chunk size - if (this.buffer.length > this.minBufferSize) { - // Buffer is getting too large, flush it - controller.enqueue(this.buffer); - this.buffer = new Uint8Array(0); - } - return; - } - - this.expectedChunkSize = size; - this.buffer = this.buffer.slice(endIndex); - } - - // Check if we have a complete chunk - const expectedTotalSize = this.expectedChunkSize + 2; // +2 for CRLF - if (this.buffer.length < expectedTotalSize) { - return; // Wait for more data - } - - // We have a complete chunk, emit it - const chunk = this.buffer.slice(0, expectedTotalSize); - controller.enqueue(chunk); - - // Keep the rest in the buffer - this.buffer = this.buffer.slice(expectedTotalSize); - this.expectedChunkSize = null; - - // Check for end chunk - if ( - chunk.length >= 5 && - chunk[0] === 0x30 && // '0' - chunk[1] === 0x0d && // CR - chunk[2] === 0x0a && // LF - chunk[3] === 0x0d && // CR - chunk[4] === 0x0a - ) { - // LF - controller.terminate(); - return; - } - } - } - - flush(controller: TransformStreamDefaultController) { - if (this.buffer.length > 0) { - controller.enqueue(this.buffer); - } - } -} - -/** - * Creates a robust fetch function that handles ambiguous chunk boundaries - */ -export async function robustFetch( - url: string, - options?: RequestOptions, -): Promise { - const response = await fetchwithRequestOptions(url, options); - - // Only transform chunked responses - const transferEncoding = response.headers.get("transfer-encoding"); - if (transferEncoding?.toLowerCase().includes("chunked")) { - const transformStream = new TransformStream( - new ChunkAccumulatorTransform(), - ); - - // Create a new response with the transformed body - return new Response(response.body?.pipeThrough(transformStream), { - status: response.status, - statusText: response.statusText, - headers: options?.headers, - }); - } - - return response; -} diff --git a/packages/fetch/src/fetch.ts b/packages/fetch/src/fetch.ts index 9bf0d77ed..3b145012f 100644 --- a/packages/fetch/src/fetch.ts +++ b/packages/fetch/src/fetch.ts @@ -2,8 +2,9 @@ import { RequestOptions } from "@continuedev/config-types"; import * as followRedirects from "follow-redirects"; import { HttpProxyAgent } from "http-proxy-agent"; import { HttpsProxyAgent } from "https-proxy-agent"; -import fetch, { BodyInit, RequestInit, Response } from "node-fetch"; +import { BodyInit, RequestInit, Response } from "node-fetch"; import { getAgentOptions } from "./getAgentOptions.js"; +import fetch from "./node-fetch-patch.js"; import { getProxyFromEnv, shouldBypassProxy } from "./util.js"; const { http, https } = (followRedirects as any).default; diff --git a/packages/fetch/src/node-fetch-bug.test.ts b/packages/fetch/src/node-fetch-bug.test.ts deleted file mode 100644 index d1b320f75..000000000 --- a/packages/fetch/src/node-fetch-bug.test.ts +++ /dev/null @@ -1,135 +0,0 @@ -import { Buffer } from "buffer"; -import { EventEmitter } from "events"; -import { describe, expect, it } from "vitest"; - -/** - * This test reproduces the issue described in - * https://github.com/node-fetch/node-fetch/issues/1576 - * - * The issue is that node-fetch has a hard-coded assumption about how the end-of-chunked-response - * marker (0\r\n\r\n) might be split across chunks. It only handles two specific cases: - * 1. The entire marker is in the last chunk - * 2. The marker is split exactly as [0\r\n] + [\r\n] - * - * However, in real-world scenarios, the marker can be split in other ways, causing - * "Premature close" errors. - */ - -describe("node-fetch chunked encoding bug", () => { - // Mock the relevant portion of node-fetch's response handling - const LAST_CHUNK = Buffer.from("0\r\n\r\n"); - - function simulateChunkedResponseHandling(chunks: Buffer[]) { - const socket = new EventEmitter(); - let previousChunk: Buffer | undefined; - let properLastChunkReceived = false; - - // This is the problematic code from node-fetch - const onData = (buf: Buffer) => { - // Check if the entire marker is in the current chunk - properLastChunkReceived = Buffer.compare(buf.slice(-5), LAST_CHUNK) === 0; - - // This is the limited assumption - it only handles one specific way the marker can be split - if (!properLastChunkReceived && previousChunk) { - properLastChunkReceived = - Buffer.compare(previousChunk.slice(-3), LAST_CHUNK.slice(0, 3)) === - 0 && Buffer.compare(buf.slice(-2), LAST_CHUNK.slice(3)) === 0; - } - - previousChunk = buf; - }; - - // Simulate receiving chunks - chunks.forEach((chunk) => { - onData(chunk); - socket.emit("data", chunk); - }); - - return properLastChunkReceived; - } - - // This is the improved code proposed in the GitHub issue by Treverix - function simulateImprovedChunkedResponseHandling(chunks: Buffer[]) { - const socket = new EventEmitter(); - let previousChunk: Buffer | undefined; - let properLastChunkReceived = false; - - const onData = (buf: Buffer) => { - // Check if the entire marker is in the current chunk - properLastChunkReceived = Buffer.compare(buf.slice(-5), LAST_CHUNK) === 0; - - // More flexible handling of split markers - if (!properLastChunkReceived && previousChunk) { - if (buf.length < 5) { - // Create a composite buffer from the end of previous chunk and the current chunk - const composite = Buffer.from([...previousChunk.slice(-5), ...buf]); - properLastChunkReceived = - Buffer.compare(composite.slice(-5), LAST_CHUNK) === 0; - } - } - - previousChunk = buf; - }; - - // Simulate receiving chunks - chunks.forEach((chunk) => { - onData(chunk); - socket.emit("data", chunk); - }); - - return properLastChunkReceived; - } - - it("fails to detect end of chunked response when split in unexpected way", () => { - // This is the case reported in the GitHub issue - // previousChunk = [ (...), 0, 13, 10, 48, 13] - // lastChunk = [ 10, 13, 10] - // Where 13 = \r and 10 = \n - const previousChunk = Buffer.from([0, 13, 10, 48, 13]); - const lastChunk = Buffer.from([10, 13, 10]); - - // With the original implementation, it fails to detect the end marker - const originalResult = simulateChunkedResponseHandling([ - previousChunk, - lastChunk, - ]); - expect(originalResult).toBe(false); - - // With the improved implementation, it correctly detects the end marker - const improvedResult = simulateImprovedChunkedResponseHandling([ - previousChunk, - lastChunk, - ]); - expect(improvedResult).toBe(true); - }); - - it("handles various ways the end marker can be split", () => { - // Test various ways the marker can be split across chunks - const testCases = [ - // Case 1: [0] + [\r\n\r\n] - [Buffer.from([0]), Buffer.from([13, 10, 13, 10])], - - // Case 2: [0\r] + [\n\r\n] - [Buffer.from([0, 13]), Buffer.from([10, 13, 10])], - - // Case 3: [0\r\n] + [\r\n] - [Buffer.from([0, 13, 10]), Buffer.from([13, 10])], - - // Case 4: [0\r\n\r] + [\n] - [Buffer.from([0, 13, 10, 13]), Buffer.from([10])], - - // Case 5: [..., 0, \r, \n, \r] + [\n, ...] - [Buffer.from([99, 0, 13, 10, 13]), Buffer.from([10, 99])], - ]; - - testCases.forEach((chunks, index) => { - // The original implementation only handles case 3 correctly - const originalResult = simulateChunkedResponseHandling(chunks); - expect(originalResult).toBe(index === 2); - - // The improved implementation handles all cases - const improvedResult = simulateImprovedChunkedResponseHandling(chunks); - expect(improvedResult).toBe(true); - }); - }); -}); diff --git a/packages/fetch/src/node-fetch-patch.js b/packages/fetch/src/node-fetch-patch.js new file mode 100644 index 000000000..94d25c8cb --- /dev/null +++ b/packages/fetch/src/node-fetch-patch.js @@ -0,0 +1,512 @@ +/** + * Index.js + * + * a request API compatible with window.fetch + * + * All spec algorithm step numbers are based on https://fetch.spec.whatwg.org/commit-snapshots/ae716822cb3a61843226cd090eefc6589446c1d2/. + */ + +import { Buffer } from "node:buffer"; +import http from "node:http"; +import https from "node:https"; +import Stream, { PassThrough, pipeline as pump } from "node:stream"; +import zlib from "node:zlib"; + +import dataUriToBuffer from "data-uri-to-buffer"; + +import { + Blob, + blobFrom, + blobFromSync, + File, + fileFrom, + fileFromSync, +} from "fetch-blob/from.js"; +import { FormData } from "formdata-polyfill/esm.min.js"; +import { clone, writeToStream } from "node-fetch/src/body.js"; +import { AbortError } from "node-fetch/src/errors/abort-error.js"; +import { FetchError } from "node-fetch/src/errors/fetch-error.js"; +import Headers, { fromRawHeaders } from "node-fetch/src/headers.js"; +import Request, { getNodeRequestOptions } from "node-fetch/src/request.js"; +import Response from "node-fetch/src/response.js"; +import { isRedirect } from "node-fetch/src/utils/is-redirect.js"; +import { + isDomainOrSubdomain, + isSameProtocol, +} from "node-fetch/src/utils/is.js"; +import { parseReferrerPolicyFromHeader } from "node-fetch/src/utils/referrer.js"; + +export { + AbortError, + Blob, + blobFrom, + blobFromSync, + FetchError, + File, + fileFrom, + fileFromSync, + FormData, + Headers, + isRedirect, + Request, + Response, +}; + +const supportedSchemas = new Set(["data:", "http:", "https:"]); + +/** + * Fetch function + * + * @param {string | URL | import('./request').default} url - Absolute url or Request instance + * @param {*} [options_] - Fetch options + * @return {Promise} + */ +export default async function fetch(url, options_) { + return new Promise((resolve, reject) => { + // Build request object + const request = new Request(url, options_); + const { parsedURL, options } = getNodeRequestOptions(request); + if (!supportedSchemas.has(parsedURL.protocol)) { + throw new TypeError( + `node-fetch cannot load ${url}. URL scheme "${parsedURL.protocol.replace(/:$/, "")}" is not supported.`, + ); + } + + if (parsedURL.protocol === "data:") { + const data = dataUriToBuffer(request.url); + const response = new Response(data, { + headers: { "Content-Type": data.typeFull }, + }); + resolve(response); + return; + } + + // Wrap http.request into fetch + const send = (parsedURL.protocol === "https:" ? https : http).request; + const { signal } = request; + let response = null; + + const abort = () => { + const error = new AbortError("The operation was aborted."); + reject(error); + if (request.body && request.body instanceof Stream.Readable) { + request.body.destroy(error); + } + + if (!response || !response.body) { + return; + } + + response.body.emit("error", error); + }; + + if (signal && signal.aborted) { + abort(); + return; + } + + const abortAndFinalize = () => { + abort(); + finalize(); + }; + + // Send request + const request_ = send(parsedURL.toString(), options); + + if (signal) { + signal.addEventListener("abort", abortAndFinalize); + } + + const finalize = () => { + request_.abort(); + if (signal) { + signal.removeEventListener("abort", abortAndFinalize); + } + }; + + request_.on("error", (error) => { + reject( + new FetchError( + `request to ${request.url} failed, reason: ${error.message}`, + "system", + error, + ), + ); + finalize(); + }); + + fixResponseChunkedTransferBadEnding(request_, (error) => { + if (response && response.body) { + response.body.destroy(error); + } + }); + + /* c8 ignore next 18 */ + if (process.version < "v14") { + // Before Node.js 14, pipeline() does not fully support async iterators and does not always + // properly handle when the socket close/end events are out of order. + request_.on("socket", (s) => { + let endedWithEventsCount; + s.prependListener("end", () => { + endedWithEventsCount = s._eventsCount; + }); + s.prependListener("close", (hadError) => { + // if end happened before close but the socket didn't emit an error, do it now + if (response && endedWithEventsCount < s._eventsCount && !hadError) { + const error = new Error("Premature close"); + error.code = "ERR_STREAM_PREMATURE_CLOSE"; + response.body.emit("error", error); + } + }); + }); + } + + request_.on("response", (response_) => { + request_.setTimeout(0); + const headers = fromRawHeaders(response_.rawHeaders); + + // HTTP fetch step 5 + if (isRedirect(response_.statusCode)) { + // HTTP fetch step 5.2 + const location = headers.get("Location"); + + // HTTP fetch step 5.3 + let locationURL = null; + try { + locationURL = + location === null ? null : new URL(location, request.url); + } catch { + // error here can only be invalid URL in Location: header + // do not throw when options.redirect == manual + // let the user extract the errorneous redirect URL + if (request.redirect !== "manual") { + reject( + new FetchError( + `uri requested responds with an invalid redirect URL: ${location}`, + "invalid-redirect", + ), + ); + finalize(); + return; + } + } + + // HTTP fetch step 5.5 + switch (request.redirect) { + case "error": + reject( + new FetchError( + `uri requested responds with a redirect, redirect mode is set to error: ${request.url}`, + "no-redirect", + ), + ); + finalize(); + return; + case "manual": + // Nothing to do + break; + case "follow": { + // HTTP-redirect fetch step 2 + if (locationURL === null) { + break; + } + + // HTTP-redirect fetch step 5 + if (request.counter >= request.follow) { + reject( + new FetchError( + `maximum redirect reached at: ${request.url}`, + "max-redirect", + ), + ); + finalize(); + return; + } + + // HTTP-redirect fetch step 6 (counter increment) + // Create a new Request object. + const requestOptions = { + headers: new Headers(request.headers), + follow: request.follow, + counter: request.counter + 1, + agent: request.agent, + compress: request.compress, + method: request.method, + body: clone(request), + signal: request.signal, + size: request.size, + referrer: request.referrer, + referrerPolicy: request.referrerPolicy, + }; + + // when forwarding sensitive headers like "Authorization", + // "WWW-Authenticate", and "Cookie" to untrusted targets, + // headers will be ignored when following a redirect to a domain + // that is not a subdomain match or exact match of the initial domain. + // For example, a redirect from "foo.com" to either "foo.com" or "sub.foo.com" + // will forward the sensitive headers, but a redirect to "bar.com" will not. + // headers will also be ignored when following a redirect to a domain using + // a different protocol. For example, a redirect from "https://foo.com" to "http://foo.com" + // will not forward the sensitive headers + if ( + !isDomainOrSubdomain(request.url, locationURL) || + !isSameProtocol(request.url, locationURL) + ) { + for (const name of [ + "authorization", + "www-authenticate", + "cookie", + "cookie2", + ]) { + requestOptions.headers.delete(name); + } + } + + // HTTP-redirect fetch step 9 + if ( + response_.statusCode !== 303 && + request.body && + options_.body instanceof Stream.Readable + ) { + reject( + new FetchError( + "Cannot follow redirect with body being a readable stream", + "unsupported-redirect", + ), + ); + finalize(); + return; + } + + // HTTP-redirect fetch step 11 + if ( + response_.statusCode === 303 || + ((response_.statusCode === 301 || response_.statusCode === 302) && + request.method === "POST") + ) { + requestOptions.method = "GET"; + requestOptions.body = undefined; + requestOptions.headers.delete("content-length"); + } + + // HTTP-redirect fetch step 14 + const responseReferrerPolicy = + parseReferrerPolicyFromHeader(headers); + if (responseReferrerPolicy) { + requestOptions.referrerPolicy = responseReferrerPolicy; + } + + // HTTP-redirect fetch step 15 + resolve(fetch(new Request(locationURL, requestOptions))); + finalize(); + return; + } + + default: + return reject( + new TypeError( + `Redirect option '${request.redirect}' is not a valid value of RequestRedirect`, + ), + ); + } + } + + // Prepare response + if (signal) { + response_.once("end", () => { + signal.removeEventListener("abort", abortAndFinalize); + }); + } + + let body = pump(response_, new PassThrough(), (error) => { + if (error) { + reject(error); + } + }); + // see https://github.com/nodejs/node/pull/29376 + /* c8 ignore next 3 */ + if (process.version < "v12.10") { + response_.on("aborted", abortAndFinalize); + } + + const responseOptions = { + url: request.url, + status: response_.statusCode, + statusText: response_.statusMessage, + headers, + size: request.size, + counter: request.counter, + highWaterMark: request.highWaterMark, + }; + + // HTTP-network fetch step 12.1.1.3 + const codings = headers.get("Content-Encoding"); + + // HTTP-network fetch step 12.1.1.4: handle content codings + + // in following scenarios we ignore compression support + // 1. compression support is disabled + // 2. HEAD request + // 3. no Content-Encoding header + // 4. no content response (204) + // 5. content not modified response (304) + if ( + !request.compress || + request.method === "HEAD" || + codings === null || + response_.statusCode === 204 || + response_.statusCode === 304 + ) { + response = new Response(body, responseOptions); + resolve(response); + return; + } + + // For Node v6+ + // Be less strict when decoding compressed responses, since sometimes + // servers send slightly invalid responses that are still accepted + // by common browsers. + // Always using Z_SYNC_FLUSH is what cURL does. + const zlibOptions = { + flush: zlib.Z_SYNC_FLUSH, + finishFlush: zlib.Z_SYNC_FLUSH, + }; + + // For gzip + if (codings === "gzip" || codings === "x-gzip") { + body = pump(body, zlib.createGunzip(zlibOptions), (error) => { + if (error) { + reject(error); + } + }); + response = new Response(body, responseOptions); + resolve(response); + return; + } + + // For deflate + if (codings === "deflate" || codings === "x-deflate") { + // Handle the infamous raw deflate response from old servers + // a hack for old IIS and Apache servers + const raw = pump(response_, new PassThrough(), (error) => { + if (error) { + reject(error); + } + }); + raw.once("data", (chunk) => { + // See http://stackoverflow.com/questions/37519828 + if ((chunk[0] & 0x0f) === 0x08) { + body = pump(body, zlib.createInflate(), (error) => { + if (error) { + reject(error); + } + }); + } else { + body = pump(body, zlib.createInflateRaw(), (error) => { + if (error) { + reject(error); + } + }); + } + + response = new Response(body, responseOptions); + resolve(response); + }); + raw.once("end", () => { + // Some old IIS servers return zero-length OK deflate responses, so + // 'data' is never emitted. See https://github.com/node-fetch/node-fetch/pull/903 + if (!response) { + response = new Response(body, responseOptions); + resolve(response); + } + }); + return; + } + + // For br + if (codings === "br") { + body = pump(body, zlib.createBrotliDecompress(), (error) => { + if (error) { + reject(error); + } + }); + response = new Response(body, responseOptions); + resolve(response); + return; + } + + // Otherwise, use response as-is + response = new Response(body, responseOptions); + resolve(response); + }); + + // eslint-disable-next-line promise/prefer-await-to-then + writeToStream(request_, request).catch(reject); + }); +} + +function fixResponseChunkedTransferBadEnding(request, errorCallback) { + const LAST_CHUNK = Buffer.from("0\r\n\r\n"); + + let isChunkedTransfer = false; + let properLastChunkReceived = false; + let previousChunk; + + request.on("response", (response) => { + const { headers } = response; + isChunkedTransfer = + headers["transfer-encoding"] === "chunked" && !headers["content-length"]; + }); + + request.on("socket", (socket) => { + const onSocketClose = () => { + if (isChunkedTransfer && !properLastChunkReceived) { + const error = new Error("Premature close"); + error.code = "ERR_STREAM_PREMATURE_CLOSE"; + errorCallback(error); + } + }; + + // const onData = buf => { + // properLastChunkReceived = Buffer.compare(buf.slice(-5), LAST_CHUNK) === 0; + + // // Sometimes final 0-length chunk and end of message code are in separate packets + // if (!properLastChunkReceived && previousChunk) { + // properLastChunkReceived = ( + // Buffer.compare(previousChunk.slice(-3), LAST_CHUNK.slice(0, 3)) === 0 && + // Buffer.compare(buf.slice(-2), LAST_CHUNK.slice(3)) === 0 + // ); + // } + + // previousChunk = buf; + // }; + + // VENDOR note - THIS IS THE REASON I AM PATCHING THIS PACKAGE + // See https://github.com/node-fetch/node-fetch/issues/1576 + // FIXES BOUNDARY CHUNKING ISSUE + const onData = (buf) => { + properLastChunkReceived = Buffer.compare(buf.slice(-5), LAST_CHUNK) === 0; + + // Sometimes final 0-length chunk and end of message code are in separate packets + if (!properLastChunkReceived && previousChunk) { + if (buf.length < 5) { + properLastChunkReceived = + Buffer.compare( + Buffer.from([...previousChunk.slice(-5), ...buf]).slice(-5), + LAST_CHUNK, + ) === 0; + } + } + + previousChunk = buf; + }; + + socket.prependListener("close", onSocketClose); + socket.on("data", onData); + + request.on("close", () => { + socket.removeListener("close", onSocketClose); + socket.removeListener("data", onData); + }); + }); +} diff --git a/packages/fetch/src/patch-test.test.js b/packages/fetch/src/patch-test.test.js new file mode 100644 index 000000000..ee92e8dea --- /dev/null +++ b/packages/fetch/src/patch-test.test.js @@ -0,0 +1,66 @@ +import { Buffer } from "node:buffer"; +import { describe, expect, it } from "vitest"; + +describe("Chunked Transfer Encoding Patch Logic", () => { + // The LAST_CHUNK marker "0\r\n\r\n" + const LAST_CHUNK = Buffer.from("0\r\n\r\n"); + + it("should detect complete marker at the end (normal case)", () => { + const normalCase = Buffer.from("data data data 0\r\n\r\n"); + const result = Buffer.compare(normalCase.slice(-5), LAST_CHUNK) === 0; + expect(result).toBe(true); + }); + + it("should handle chunks split across original pattern (0\\r\\n | \\r\\n)", () => { + const previousChunk = Buffer.from("data data 0\r\n"); + const lastChunk = Buffer.from("\r\n"); + + const result = + Buffer.compare(previousChunk.slice(-3), LAST_CHUNK.slice(0, 3)) === 0 && + Buffer.compare(lastChunk.slice(-2), LAST_CHUNK.slice(3)) === 0; + + expect(result).toBe(true); + }); + + it("should handle problematic case from issue #1576 with new patch", () => { + // The problematic case: data ends with "0\r\n0\r" and the next chunk is "\n\r\n" + const previousChunk = Buffer.from([ + ...Array(10).fill(42), + 48, + 13, + 10, + 48, + 13, + ]); // some data + "0\r\n0\r" + const lastChunk = Buffer.from([10, 13, 10]); // "\n\r\n" + + // Check 1: Direct check for complete marker (should fail) + const check1 = Buffer.compare(lastChunk.slice(-5), LAST_CHUNK) === 0; + expect(check1).toBe(false); + + // Check 2: Original split pattern check (should fail) + const check2 = + Buffer.compare(previousChunk.slice(-3), LAST_CHUNK.slice(0, 3)) === 0 && + Buffer.compare(lastChunk.slice(-2), LAST_CHUNK.slice(3)) === 0; + expect(check2).toBe(false); + + // Check 3: New patch check (should pass) + const lastChunkLength = lastChunk.length; + const newPatchCheck = + lastChunkLength < 5 && + Buffer.compare( + Buffer.from([...previousChunk.slice(-5), ...lastChunk]).slice(-5), + LAST_CHUNK, + ) === 0; + expect(newPatchCheck).toBe(true); + + // Verification of the combined buffer + const combinedBuffer = Buffer.from([ + ...previousChunk.slice(-5), + ...lastChunk, + ]); + const combinedResult = + Buffer.compare(combinedBuffer.slice(-5), LAST_CHUNK) === 0; + expect(combinedResult).toBe(true); + }); +}); diff --git a/packages/fetch/src/premature-close.test.ts b/packages/fetch/src/premature-close.test.ts deleted file mode 100644 index 699dcde6c..000000000 --- a/packages/fetch/src/premature-close.test.ts +++ /dev/null @@ -1,405 +0,0 @@ -import { createServer } from "http"; -import { describe, expect, it } from "vitest"; -import { fetchwithRequestOptions } from "./fetch.js"; -import { streamResponse } from "./stream.js"; -describe("Fetch Premature Close Tests", () => { - // This test specifically forces conditions that cause premature close - it("should reproduce premature close error with chunked encoding", async () => { - // Create a server that intentionally misbehaves - const server = createServer((req, res) => { - // Set chunked transfer encoding - res.writeHead(200, { - "Content-Type": "text/plain", - "Transfer-Encoding": "chunked", - }); - - let chunk = 0; - const interval = setInterval(() => { - // Send malformed chunk sizes occasionally - if (chunk === 2) { - // Send a malformed chunk that will trigger the issue - res.write("5\r\nHello\r\n3\r"); // Intentionally incomplete chunk - clearInterval(interval); - - // Force socket closure mid-stream - setTimeout(() => { - // @ts-ignore - accessing private property for test - res.socket?.destroy(); - }, 50); - - return; - } - - res.write(`${chunk.toString(16)}\r\nChunk${chunk}\r\n`); - chunk++; - }, 10); - }); - - // Start server on random port - await new Promise((resolve) => server.listen(0, resolve)); - const port = (server.address() as any).port; - - try { - // Make request and attempt to stream response - const response = await fetchwithRequestOptions( - `http://localhost:${port}`, - { - headers: { - Connection: "keep-alive", - }, - }, - ); - - // Try to consume the stream - const chunks: string[] = []; - try { - for await (const chunk of streamResponse( - response as unknown as Response, - )) { - chunks.push(chunk); - } - // If we get here, the test failed because we expected an error - throw new Error( - "Expected premature close error but stream completed successfully", - ); - } catch (e) { - // Verify we got the expected error - expect(e).toBeTruthy(); - expect((e as Error).message).toMatch(/premature close/i); - } - } finally { - // Cleanup - server.close(); - } - }); - - // This test reproduces the issue using timing and connection pooling - it("should reproduce premature close with connection reuse", async () => { - // Create a server that intentionally causes issues with keep-alive connections - const server = createServer((req, res) => { - res.writeHead(200, { - "Content-Type": "text/plain", - Connection: "keep-alive", - "Transfer-Encoding": "chunked", - }); - - let bytesSent = 0; - const streamSize = 1024 * 1024; // 1MB - const chunkSize = 16384; // 16KB - - const writeChunk = () => { - if (bytesSent >= streamSize) { - res.end(); - return; - } - - const chunk = Buffer.alloc(chunkSize).fill("x"); - bytesSent += chunk.length; - - // Randomly corrupt the stream - if (Math.random() < 0.1) { - // @ts-ignore - accessing private property for test - res.socket?.destroy(); - return; - } - - res.write(chunk); - setImmediate(writeChunk); - }; - - writeChunk(); - }); - - await new Promise((resolve) => server.listen(0, resolve)); - const port = (server.address() as any).port; - - try { - // Make multiple concurrent requests to force connection pooling - const requests = Array(5) - .fill(null) - .map(async (_, i) => { - try { - const response = await fetchwithRequestOptions( - `http://localhost:${port}`, - { - headers: { - Connection: "keep-alive", - }, - }, - ); - - const chunks: string[] = []; - for await (const chunk of streamResponse( - response as unknown as Response, - )) { - chunks.push(chunk); - } - } catch (e) { - expect(e).toBeTruthy(); - expect((e as Error).message).toMatch( - /premature close|socket hang up/i, - ); - } - }); - - await Promise.all(requests); - } finally { - server.close(); - } - }); - - // This test reproduces the issue using a delayed response - it("should reproduce premature close with delayed response", async () => { - const server = createServer((req, res) => { - res.writeHead(200, { - "Content-Type": "text/plain", - "Transfer-Encoding": "chunked", - }); - - // Start sending data - let count = 0; - const interval = setInterval(() => { - if (count >= 5) { - clearInterval(interval); - // Delay then destroy the socket - setTimeout(() => { - // @ts-ignore - accessing private property for test - res.socket?.destroy(); - }, 100); - return; - } - - // Send a chunk with a delay - setTimeout(() => { - res.write(`chunk ${count}\n`); - }, count * 50); - - count++; - }, 10); - }); - - await new Promise((resolve) => server.listen(0, resolve)); - const port = (server.address() as any).port; - - try { - const response = await fetchwithRequestOptions( - `http://localhost:${port}`, - ); - - const chunks: string[] = []; - try { - for await (const chunk of streamResponse( - response as unknown as Response, - )) { - chunks.push(chunk); - // Optional artificial processing delay - await new Promise((resolve) => setTimeout(resolve, 20)); - } - throw new Error( - "Expected premature close error but stream completed successfully", - ); - } catch (e) { - expect(e).toBeTruthy(); - expect((e as Error).message).toMatch(/premature close/i); - } - } finally { - server.close(); - } - }); - - it("should properly handle chunk boundary in the terminating sequence", async () => { - // Flag to track if response was fully sent - let responseFullySent = false; - - const server = createServer((req, res) => { - res.writeHead(200, { - "Content-Type": "text/plain", - "Transfer-Encoding": "chunked", - }); - - // Send normal chunks directly as data (not writing the chunk headers manually) - // Node's HTTP server will handle adding the proper chunk headers - res.write("Hello"); - res.write("World!!"); - - // Now manually control the terminating sequence to split it at the boundary - // First, end the response but intercept the actual write - const originalEnd = res.end; - res.end = function () { - // Instead of letting Node send the terminating sequence normally, - // we'll send it split across a boundary - - // Manually send the first part of the termination sequence "0\r\n\r" - // @ts-ignore - accessing private property for test - const socket = res.socket; - socket?.write("0\r\n\r", "utf8"); - - // Small delay to ensure split across packets - setTimeout(() => { - // Send the final "\n" to complete the terminating sequence - socket?.write("\n", "utf8", () => { - // Mark that we've fully sent the response - responseFullySent = true; - }); - }, 20); - - // Don't call the original end since we're manually handling it - return res; - }; - }); - - await new Promise((resolve) => server.listen(0, resolve)); - const port = (server.address() as any).port; - - try { - const response = await fetchwithRequestOptions( - `http://localhost:${port}`, - { - headers: { - Connection: "keep-alive", - }, - }, - ); - - const chunks: Uint8Array[] = []; - let streamCompleted = false; - - try { - // Collect chunks as raw buffers to avoid encoding issues - for await (const chunk of streamResponse( - response as unknown as Response, - )) { - // Store the raw chunk - chunks.push(Buffer.from(chunk) as Uint8Array); - } - - // If we get here, the stream completed successfully - streamCompleted = true; - - // Wait a bit more to ensure server has time to set responseFullySent flag - await new Promise((resolve) => setTimeout(resolve, 100)); - - // Verify the response was fully sent by the server - expect(responseFullySent).toBe(true); - - // Convert all chunks to a single string and verify content - const content = Buffer.concat(chunks).toString("utf8"); - expect(content).toBe("HelloWorld!!"); - } catch (e) { - // If the server fully sent the response but we got an error, - // this confirms the client has an issue with the split boundary - if (responseFullySent) { - // This is the assertion that proves the 3/2 boundary issue exists - console.log( - "Server sent complete response but client failed to parse it properly", - ); - console.log("Error:", (e as Error).message); - expect((e as Error).message).toMatch( - /premature close|invalid chunked encoding/i, - ); - - // We should still verify we got some data before the error - const partialContent = Buffer.concat(chunks).toString("utf8"); - expect(partialContent).toContain("Hello"); - } else { - // If the server didn't fully send the response, the test is inconclusive - throw new Error( - "Test inconclusive: Server didn't complete sending response before error occurred", - ); - } - } - - // If the stream completed and the response was fully sent, - // the client correctly handled the split boundary - if (streamCompleted && responseFullySent) { - console.log("Client correctly handled split terminating sequence"); - } - } finally { - server.close(); - } - }); - - // This test reproduces the 3/2 assumption bug with multiline chunks - it("should reproduce premature close with multiline chunks containing line breaks", async () => { - const server = createServer((req, res) => { - res.writeHead(200, { - "Content-Type": "text/plain", - "Transfer-Encoding": "chunked", - }); - - // First send a normal chunk - res.write("A\r\nHello there\r\n"); - - // Send a chunk with a size that contains multiline data with \r\n inside - // This is valid chunked encoding but might confuse parsers - // The chunk size "1E" = 30 bytes - res.write("1E\r\n"); // Chunk size header - res.write("Line 1\r\nLine 2\r\nLine 3 not done yet"); // 30 bytes total - res.write("\r\n"); // Chunk terminator - - // Now send another chunk that starts with a line continuation - // This creates a situation where \r\n appears in data and as chunk boundaries - res.write("14\r\n"); // Size of 20 bytes - res.write(" continued from before\r\n"); - res.write("\r\n"); // Chunk terminator - - // Here's where we'll try to trigger the bug - // Send the final chunk marker but split across what could be mistaken for a line boundary - setTimeout(() => { - // Send "0\r" first - this could be mistaken for start of a line ending - res.write("0\r"); - - // Small delay to ensure separate TCP packets - setTimeout(() => { - // Now send "\n\r\n" - this creates ambiguous line endings - res.write("\n\r\n"); - - // Force close after a small delay to simulate network issues - setTimeout(() => { - // @ts-ignore - accessing private property for test - res.socket?.destroy(); - }, 20); - }, 10); - }, 10); - }); - - await new Promise((resolve) => server.listen(0, resolve)); - const port = (server.address() as any).port; - - try { - const response = await fetchwithRequestOptions( - `http://localhost:${port}`, - { - headers: { - Connection: "keep-alive", - }, - }, - ); - - const chunks: string[] = []; - try { - for await (const chunk of streamResponse( - response as unknown as Response, - )) { - chunks.push(chunk); - } - throw new Error( - "Expected premature close error but stream completed successfully", - ); - } catch (e) { - expect(e).toBeTruthy(); - expect((e as Error).message).toMatch(/premature close/i); - - // Verify we received the multiline data before the error - const receivedData = chunks.join(""); - expect(receivedData).toContain("Hello there"); - expect(receivedData).toContain("Line 1"); - expect(receivedData).toContain("Line 2"); - expect(receivedData).toContain("Line 3 not done yet"); - expect(receivedData).toContain("continued from before"); - } - } finally { - server.close(); - } - }); -}); From 207cf9766d8019a4b7c322fb7550492f3ccfc9dd Mon Sep 17 00:00:00 2001 From: Jacob Kim Date: Thu, 5 Jun 2025 14:05:55 -0700 Subject: [PATCH 079/118] create a function to include files listed inside workspace .continueignore --- core/indexing/ignore.ts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/core/indexing/ignore.ts b/core/indexing/ignore.ts index 7f5e8a039..f70633b1b 100644 --- a/core/indexing/ignore.ts +++ b/core/indexing/ignore.ts @@ -2,6 +2,7 @@ import fs from "fs"; import ignore from "ignore"; +import { IDE } from ".."; import { getGlobalContinueIgnorePath } from "../util/paths"; export const DEFAULT_IGNORE_FILETYPES = [ @@ -129,3 +130,20 @@ export const getGlobalContinueIgArray = () => { const contents = fs.readFileSync(getGlobalContinueIgnorePath(), "utf8"); return gitIgArrayFromFile(contents); }; + +export const getWorkspaceContinueIgArray = async (ide: IDE) => { + const dirs = await ide.getWorkspaceDirs(); + return await dirs.reduce( + async (accPromise, dir) => { + const acc = await accPromise; + try { + const contents = await ide.readFile(`${dir}/.continueignore`); + return [...acc, ...gitIgArrayFromFile(contents)]; + } catch (err) { + console.error(err); + return acc; + } + }, + Promise.resolve([] as string[]), + ); +}; From d27dddef3d7d7d85e6605027da53bc059b8a151b Mon Sep 17 00:00:00 2001 From: Jacob Kim Date: Thu, 5 Jun 2025 14:06:10 -0700 Subject: [PATCH 080/118] include files listed inside workspace .continueignore --- core/autocomplete/prefiltering/index.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core/autocomplete/prefiltering/index.ts b/core/autocomplete/prefiltering/index.ts index 33a0856f3..ec18879f7 100644 --- a/core/autocomplete/prefiltering/index.ts +++ b/core/autocomplete/prefiltering/index.ts @@ -1,7 +1,10 @@ import ignore from "ignore"; import { IDE } from "../.."; -import { getGlobalContinueIgArray } from "../../indexing/ignore"; +import { + getGlobalContinueIgArray, + getWorkspaceContinueIgArray, +} from "../../indexing/ignore"; import { getConfigJsonPath } from "../../util/paths"; import { findUriInDirs } from "../../util/uri"; import { HelperVars } from "../util/HelperVars"; @@ -55,6 +58,7 @@ export async function shouldPrefilter( ...(helper.options.disableInFiles ?? []), "*.prompt", ...getGlobalContinueIgArray(), + ...(await getWorkspaceContinueIgArray(ide)), ]; if (await isDisabledForFile(helper.filepath, disableInFiles, ide)) { return true; From d9702a7e8b2fc0681e6337fb0ca68193377443b7 Mon Sep 17 00:00:00 2001 From: Jacob Kim Date: Thu, 5 Jun 2025 14:06:24 -0700 Subject: [PATCH 081/118] bump version --- extensions/vscode/package-lock.json | 6 +++--- gui/package-lock.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/extensions/vscode/package-lock.json b/extensions/vscode/package-lock.json index e516f171e..38efaa08a 100644 --- a/extensions/vscode/package-lock.json +++ b/extensions/vscode/package-lock.json @@ -1,12 +1,12 @@ { "name": "continue", - "version": "1.1.41", + "version": "1.1.44", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "continue", - "version": "1.1.41", + "version": "1.1.44", "license": "Apache-2.0", "dependencies": { "@continuedev/config-types": "^1.0.14", @@ -107,7 +107,7 @@ "@aws-sdk/credential-providers": "^3.778.0", "@continuedev/config-types": "^1.0.13", "@continuedev/config-yaml": "file:../packages/config-yaml", - "@continuedev/fetch": "^1.0.10", + "@continuedev/fetch": "^1.0.13", "@continuedev/llm-info": "^1.0.8", "@continuedev/openai-adapters": "^1.0.25", "@modelcontextprotocol/sdk": "^1.12.0", diff --git a/gui/package-lock.json b/gui/package-lock.json index 020586519..a9d589b98 100644 --- a/gui/package-lock.json +++ b/gui/package-lock.json @@ -111,7 +111,7 @@ "@aws-sdk/credential-providers": "^3.778.0", "@continuedev/config-types": "^1.0.13", "@continuedev/config-yaml": "file:../packages/config-yaml", - "@continuedev/fetch": "^1.0.10", + "@continuedev/fetch": "^1.0.13", "@continuedev/llm-info": "^1.0.8", "@continuedev/openai-adapters": "^1.0.25", "@modelcontextprotocol/sdk": "^1.12.0", From fbaa58ce26ec746e371944b53e6a83170be303df Mon Sep 17 00:00:00 2001 From: Jacob Kim Date: Thu, 5 Jun 2025 14:16:00 -0700 Subject: [PATCH 082/118] remove comments --- core/autocomplete/CompletionProvider.ts | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/core/autocomplete/CompletionProvider.ts b/core/autocomplete/CompletionProvider.ts index f810e3a18..d324c767c 100644 --- a/core/autocomplete/CompletionProvider.ts +++ b/core/autocomplete/CompletionProvider.ts @@ -138,9 +138,6 @@ export class CompletionProvider { } const startTime = Date.now(); - // NOTE: There shouldn't be too big of a performance penalty here. - // If this ends up introducing too big of a bottleneck, - // we should consider a more clever way of passing llm to _getAutocompleteOptions. const llm = await this._prepareLlm(); if (!llm) { return undefined; @@ -223,11 +220,11 @@ export class CompletionProvider { const processedCompletion = helper.options.transform ? postprocessCompletion({ - completion, - prefix: helper.prunedPrefix, - suffix: helper.prunedSuffix, - llm, - }) + completion, + prefix: helper.prunedPrefix, + suffix: helper.prunedSuffix, + llm, + }) : completion; completion = processedCompletion; From b2c4eae6849286a42af1971134ee5d2902bcfc15 Mon Sep 17 00:00:00 2001 From: Jacob Kim Date: Thu, 5 Jun 2025 14:16:14 -0700 Subject: [PATCH 083/118] remove fields not in docs --- packages/config-yaml/src/schemas/models.ts | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/packages/config-yaml/src/schemas/models.ts b/packages/config-yaml/src/schemas/models.ts index f25c08843..893f7117a 100644 --- a/packages/config-yaml/src/schemas/models.ts +++ b/packages/config-yaml/src/schemas/models.ts @@ -113,27 +113,9 @@ export const autocompleteOptionsSchema = z.object({ modelTimeout: z.number().optional(), maxSuffixPercentage: z.number().optional(), prefixPercentage: z.number().optional(), - transform: z.boolean().optional(), // not in docs: https://docs.continue.dev/json-reference#models template: z.string().optional(), - multilineCompletions: z.enum(["always", "never", "auto"]).optional(), // not in docs - slidingWindowPrefixPercentage: z.number().optional(), // not in docs - slidingWindowSize: z.number().optional(), // not in docs - useCache: z.boolean().optional(), // not in docs onlyMyCode: z.boolean().optional(), - useRecentlyEdited: z.boolean().optional(), // not in docs - disableInFiles: z.array(z.string()).optional(), // not in docs - useImports: z.boolean().optional(), // not in docs - showWhateverWeHaveAtXMs: z.number().optional(), // not in docs - experimental_includeClipboard: z.union([z.boolean(), z.number()]).optional(), // not in docs - experimental_includeRecentlyVisitedRanges: z - .union([z.boolean(), z.number()]) - .optional(), // not in docs - experimental_includeRecentlyEditedRanges: z - .union([z.boolean(), z.number()]) - .optional(), // not in docs - experimental_includeDiff: z.union([z.boolean(), z.number()]).optional(), // not in docs }); -// .partial(); /** Prompt templates use Handlebars syntax */ const promptTemplatesSchema = z.object({ From dbe6f5213e24ba110182f26a0a6fb8e7264ed641 Mon Sep 17 00:00:00 2001 From: Jacob Kim Date: Thu, 5 Jun 2025 14:16:28 -0700 Subject: [PATCH 084/118] bump version --- extensions/vscode/package-lock.json | 6 +++--- gui/package-lock.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/extensions/vscode/package-lock.json b/extensions/vscode/package-lock.json index e516f171e..38efaa08a 100644 --- a/extensions/vscode/package-lock.json +++ b/extensions/vscode/package-lock.json @@ -1,12 +1,12 @@ { "name": "continue", - "version": "1.1.41", + "version": "1.1.44", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "continue", - "version": "1.1.41", + "version": "1.1.44", "license": "Apache-2.0", "dependencies": { "@continuedev/config-types": "^1.0.14", @@ -107,7 +107,7 @@ "@aws-sdk/credential-providers": "^3.778.0", "@continuedev/config-types": "^1.0.13", "@continuedev/config-yaml": "file:../packages/config-yaml", - "@continuedev/fetch": "^1.0.10", + "@continuedev/fetch": "^1.0.13", "@continuedev/llm-info": "^1.0.8", "@continuedev/openai-adapters": "^1.0.25", "@modelcontextprotocol/sdk": "^1.12.0", diff --git a/gui/package-lock.json b/gui/package-lock.json index 020586519..a9d589b98 100644 --- a/gui/package-lock.json +++ b/gui/package-lock.json @@ -111,7 +111,7 @@ "@aws-sdk/credential-providers": "^3.778.0", "@continuedev/config-types": "^1.0.13", "@continuedev/config-yaml": "file:../packages/config-yaml", - "@continuedev/fetch": "^1.0.10", + "@continuedev/fetch": "^1.0.13", "@continuedev/llm-info": "^1.0.8", "@continuedev/openai-adapters": "^1.0.25", "@modelcontextprotocol/sdk": "^1.12.0", From 55e1dc9571380c4acc042867cbe4ce1937281b05 Mon Sep 17 00:00:00 2001 From: Jacob Kim Date: Thu, 5 Jun 2025 14:22:19 -0700 Subject: [PATCH 085/118] pass prettier check --- core/autocomplete/CompletionProvider.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/core/autocomplete/CompletionProvider.ts b/core/autocomplete/CompletionProvider.ts index d324c767c..8a579c231 100644 --- a/core/autocomplete/CompletionProvider.ts +++ b/core/autocomplete/CompletionProvider.ts @@ -220,11 +220,11 @@ export class CompletionProvider { const processedCompletion = helper.options.transform ? postprocessCompletion({ - completion, - prefix: helper.prunedPrefix, - suffix: helper.prunedSuffix, - llm, - }) + completion, + prefix: helper.prunedPrefix, + suffix: helper.prunedSuffix, + llm, + }) : completion; completion = processedCompletion; From bc23d5afcc4998dd10968c0ea19567c79490016d Mon Sep 17 00:00:00 2001 From: Jacob Kim Date: Thu, 5 Jun 2025 15:13:27 -0700 Subject: [PATCH 086/118] fix a bug where rawUnrolledYaml could pass as ConfigResult --- packages/config-yaml/src/load/unroll.ts | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/packages/config-yaml/src/load/unroll.ts b/packages/config-yaml/src/load/unroll.ts index db350052a..1bb04e3fd 100644 --- a/packages/config-yaml/src/load/unroll.ts +++ b/packages/config-yaml/src/load/unroll.ts @@ -267,12 +267,11 @@ export async function unrollAssistantFromContent( ); // Back to a string so we can fill in template variables - const rawUnrolledYaml = YAML.stringify(unrolledAssistant); - // const rawUnrolledYaml = needErrorPropagation - // ? YAML.stringify( - // (unrolledAssistant as ConfigResult).config, - // ) - // : YAML.stringify(unrolledAssistant); + const rawUnrolledYaml = options.asConfigResult + ? YAML.stringify( + (unrolledAssistant as ConfigResult).config, + ) + : YAML.stringify(unrolledAssistant); // Convert all of the template variables to FQSNs // Secrets from the block will have the assistant slug prepended to the FQSN From 3c60adef0be22cda95f9a16e73c3e926c495b864 Mon Sep 17 00:00:00 2001 From: Nate Date: Thu, 5 Jun 2025 22:34:58 -0700 Subject: [PATCH 087/118] streamable-http support in YAML --- extensions/vscode/package-lock.json | 6 +++--- gui/package-lock.json | 2 +- packages/config-yaml/src/schemas/index.ts | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/extensions/vscode/package-lock.json b/extensions/vscode/package-lock.json index e516f171e..38efaa08a 100644 --- a/extensions/vscode/package-lock.json +++ b/extensions/vscode/package-lock.json @@ -1,12 +1,12 @@ { "name": "continue", - "version": "1.1.41", + "version": "1.1.44", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "continue", - "version": "1.1.41", + "version": "1.1.44", "license": "Apache-2.0", "dependencies": { "@continuedev/config-types": "^1.0.14", @@ -107,7 +107,7 @@ "@aws-sdk/credential-providers": "^3.778.0", "@continuedev/config-types": "^1.0.13", "@continuedev/config-yaml": "file:../packages/config-yaml", - "@continuedev/fetch": "^1.0.10", + "@continuedev/fetch": "^1.0.13", "@continuedev/llm-info": "^1.0.8", "@continuedev/openai-adapters": "^1.0.25", "@modelcontextprotocol/sdk": "^1.12.0", diff --git a/gui/package-lock.json b/gui/package-lock.json index 020586519..a9d589b98 100644 --- a/gui/package-lock.json +++ b/gui/package-lock.json @@ -111,7 +111,7 @@ "@aws-sdk/credential-providers": "^3.778.0", "@continuedev/config-types": "^1.0.13", "@continuedev/config-yaml": "file:../packages/config-yaml", - "@continuedev/fetch": "^1.0.10", + "@continuedev/fetch": "^1.0.13", "@continuedev/llm-info": "^1.0.8", "@continuedev/openai-adapters": "^1.0.25", "@modelcontextprotocol/sdk": "^1.12.0", diff --git a/packages/config-yaml/src/schemas/index.ts b/packages/config-yaml/src/schemas/index.ts index 816697f62..3dbbf5840 100644 --- a/packages/config-yaml/src/schemas/index.ts +++ b/packages/config-yaml/src/schemas/index.ts @@ -13,7 +13,7 @@ export const contextSchema = z.object({ const mcpServerSchema = z.object({ name: z.string(), command: z.string().optional(), - type: z.enum(["sse", "stdio"]).optional(), + type: z.enum(["sse", "stdio", "streamable-http"]).optional(), url: z.string().optional(), faviconUrl: z.string().optional(), args: z.array(z.string()).optional(), From 18c42093f6de27bd43c1445fc21a1f446f225a41 Mon Sep 17 00:00:00 2001 From: Nate Date: Thu, 5 Jun 2025 22:35:38 -0700 Subject: [PATCH 088/118] bump --- extensions/vscode/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/vscode/package.json b/extensions/vscode/package.json index 0a08c2321..54f93c509 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": "1.1.44", + "version": "1.1.45", "repository": { "type": "git", "url": "https://github.com/continuedev/continue" From ba725ea96f544b751e900b43464d8eb88dfe559e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 6 Jun 2025 15:49:55 +0000 Subject: [PATCH 089/118] Bump django from 3.2.7 to 4.2.22 in /manual-testing-sandbox Bumps [django](https://github.com/django/django) from 3.2.7 to 4.2.22. - [Commits](https://github.com/django/django/compare/3.2.7...4.2.22) --- updated-dependencies: - dependency-name: django dependency-version: 4.2.22 dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- manual-testing-sandbox/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manual-testing-sandbox/requirements.txt b/manual-testing-sandbox/requirements.txt index 44147f676..55452b992 100644 --- a/manual-testing-sandbox/requirements.txt +++ b/manual-testing-sandbox/requirements.txt @@ -5,7 +5,7 @@ scipy==1.7.1 # Web development flask==2.0.2 -django==3.2.7 +django==4.2.22 # Request handling requests==2.26.0 From 8e24fcf4a0ee655dfbe83d95b82855041f0ba246 Mon Sep 17 00:00:00 2001 From: Patrick Erichsen Date: Fri, 6 Jun 2025 12:08:13 -0700 Subject: [PATCH 090/118] feat: use correct deployment for azure --- packages/openai-adapters/src/apis/Azure.ts | 108 ++++++++++++++++++ packages/openai-adapters/src/apis/OpenAI.ts | 10 +- packages/openai-adapters/src/index.ts | 4 +- .../openai-adapters/src/test/main.test.ts | 28 ++++- packages/openai-adapters/src/test/util.ts | 3 - packages/openai-adapters/src/types.ts | 13 +++ packages/openai-adapters/tsconfig.json | 4 +- 7 files changed, 152 insertions(+), 18 deletions(-) create mode 100644 packages/openai-adapters/src/apis/Azure.ts diff --git a/packages/openai-adapters/src/apis/Azure.ts b/packages/openai-adapters/src/apis/Azure.ts new file mode 100644 index 000000000..57f48c3e0 --- /dev/null +++ b/packages/openai-adapters/src/apis/Azure.ts @@ -0,0 +1,108 @@ +import { OpenAI } from "openai/index"; +import { + ChatCompletionChunk, + ChatCompletionCreateParams, + ChatCompletionCreateParamsStreaming, +} from "openai/resources/index"; +import { z } from "zod"; +import { AzureConfigSchema } from "../types.js"; +import { customFetch } from "../util.js"; +import { OpenAIApi } from "./OpenAI.js"; + +export class AzureApi extends OpenAIApi { + constructor(private azureConfig: z.infer) { + super({ + ...azureConfig, + provider: "openai", + }); + + this.openai = new OpenAI({ + apiKey: azureConfig.apiKey, + baseURL: this._getAzureBaseURL(azureConfig), + defaultQuery: azureConfig.env?.apiVersion + ? { "api-version": azureConfig.env.apiVersion } + : {}, + fetch: customFetch(azureConfig.requestOptions), + }); + } + + /** + * Default is `azure-openai`, but previously was `azure` + * @param apiType + * @returns + */ + private _isAzureOpenAI(apiType?: string): boolean { + return apiType === "azure-openai" || apiType === "azure"; + } + + private _getAzureBaseURL(config: z.infer): string { + const baseURL = new URL(this.apiBase).toString().replace(/\/$/, ""); + + // Default is `azure-openai` in docs, but previously was `azure` + if (this._isAzureOpenAI(config.env?.apiType)) { + if (!config.env?.deployment) { + throw new Error( + "Azure deployment is required if `apiType` is `azure-openai` or `azure`", + ); + } + + return `${baseURL}/openai/deployments/${config.env.deployment}`; + } + + return baseURL; + } + + /** + * Filters out empty text content parts from messages. + * + * Azure models may not support empty content parts, which can cause issues. + * This function removes any text content parts that are empty or contain only whitespace. + */ + private _filterEmptyContentParts( + body: T, + ): T { + const result = { ...body }; + + result.messages = result.messages.map((message: any) => { + if (Array.isArray(message.content)) { + const filteredContent = message.content.filter((part: any) => { + return !( + part.type === "text" && + (!part.text || part.text.trim() === "") + ); + }); + return { + ...message, + content: + filteredContent.length > 0 ? filteredContent : message.content, + }; + } + return message; + }) as any; + + return result; + } + + modifyChatBody(body: T): T { + let modifiedBody = super.modifyChatBody(body); + modifiedBody = this._filterEmptyContentParts(modifiedBody); + return modifiedBody; + } + + async *chatCompletionStream( + body: ChatCompletionCreateParamsStreaming, + signal: AbortSignal, + ): AsyncGenerator { + const response = await this.openai.chat.completions.create( + this.modifyChatBody(body), + { signal }, + ); + + for await (const result of response) { + // Skip chunks with no choices (common with Azure content filtering) + if (result.choices && result.choices.length > 0) { + yield result; + } + } + } +} diff --git a/packages/openai-adapters/src/apis/OpenAI.ts b/packages/openai-adapters/src/apis/OpenAI.ts index 616a9a5f3..81a4b1c73 100644 --- a/packages/openai-adapters/src/apis/OpenAI.ts +++ b/packages/openai-adapters/src/apis/OpenAI.ts @@ -12,7 +12,7 @@ import { Model, } from "openai/resources/index"; import { z } from "zod"; -import { AzureConfigSchema, OpenAIConfigSchema } from "../types.js"; +import { OpenAIConfigSchema } from "../types.js"; import { customFetch } from "../util.js"; import { BaseLlmApi, @@ -25,11 +25,7 @@ export class OpenAIApi implements BaseLlmApi { openai: OpenAI; apiBase: string = "https://api.openai.com/v1/"; - constructor( - protected config: z.infer< - typeof OpenAIConfigSchema | typeof AzureConfigSchema - >, - ) { + constructor(protected config: z.infer) { this.apiBase = config.apiBase ?? this.apiBase; this.openai = new OpenAI({ apiKey: config.apiKey, @@ -37,7 +33,6 @@ export class OpenAIApi implements BaseLlmApi { fetch: customFetch(config.requestOptions), }); } - modifyChatBody(body: T): T { // o-series models - only apply for official OpenAI API const isOfficialOpenAIAPI = this.apiBase === "https://api.openai.com/v1/"; @@ -74,6 +69,7 @@ export class OpenAIApi implements BaseLlmApi { ); return response; } + async *chatCompletionStream( body: ChatCompletionCreateParamsStreaming, signal: AbortSignal, diff --git a/packages/openai-adapters/src/index.ts b/packages/openai-adapters/src/index.ts index 75f2b4fef..9f0cf341c 100644 --- a/packages/openai-adapters/src/index.ts +++ b/packages/openai-adapters/src/index.ts @@ -1,6 +1,7 @@ import dotenv from "dotenv"; import { z } from "zod"; import { AnthropicApi } from "./apis/Anthropic.js"; +import { AzureApi } from "./apis/Azure.js"; import { CohereApi } from "./apis/Cohere.js"; import { DeepSeekApi } from "./apis/DeepSeek.js"; import { GeminiApi } from "./apis/Gemini.js"; @@ -29,8 +30,9 @@ function openAICompatible( export function constructLlmApi(config: LLMConfig): BaseLlmApi | undefined { switch (config.provider) { case "openai": - case "azure": return new OpenAIApi(config); + case "azure": + return new AzureApi(config); case "cohere": return new CohereApi(config); case "anthropic": diff --git a/packages/openai-adapters/src/test/main.test.ts b/packages/openai-adapters/src/test/main.test.ts index 3a5e6f979..2a3739ce4 100644 --- a/packages/openai-adapters/src/test/main.test.ts +++ b/packages/openai-adapters/src/test/main.test.ts @@ -4,7 +4,7 @@ import { DEEPSEEK_API_BASE } from "../apis/DeepSeek.js"; import { INCEPTION_API_BASE } from "../apis/Inception.js"; import { OpenAIApi } from "../apis/OpenAI.js"; import { constructLlmApi } from "../index.js"; -import { getLlmApi, testChat, testCompletion, testEmbed } from "./util.js"; +import { getLlmApi, testChat, testEmbed } from "./util.js"; dotenv.config(); @@ -17,10 +17,6 @@ function testConfig(config: ModelConfig) { env: config.env, }); - if (false) { - testCompletion(api, model); - } - if ( ["chat", "summarize", "edit", "apply"].some((role) => config.roles?.includes(role as any), @@ -106,6 +102,28 @@ const TESTS: Omit[] = [ // apiKey: process.env.COHERE_API_KEY!, // roles: ["rerank"], // }, + { + provider: "azure", + model: "gpt-4.1", + apiBase: "https://continue-openai.openai.azure.com", + apiKey: process.env.AZURE_OPENAI_API_KEY, + env: { + deployment: "gpt-4.1", + apiVersion: "2024-02-15-preview", + apiType: "azure-openai", + }, + roles: ["chat"], + }, + { + provider: "azure", + model: "mistral-small-2503", + apiBase: "https://nate-0276-resource.services.ai.azure.com/models", + apiKey: process.env.AZURE_FOUNDRY_API_KEY, + env: { + deployment: "mistral-small-2503", + }, + roles: ["chat"], + }, ]; TESTS.forEach((config) => { diff --git a/packages/openai-adapters/src/test/util.ts b/packages/openai-adapters/src/test/util.ts index ba4490f2a..453290711 100644 --- a/packages/openai-adapters/src/test/util.ts +++ b/packages/openai-adapters/src/test/util.ts @@ -8,7 +8,6 @@ export function getLlmApi(config: LLMConfig) { } return api; } - export function testEmbed(api: BaseLlmApi, model: string) { test("should successfully embed", async () => { const response = await api.embed({ @@ -155,7 +154,6 @@ export function testChat(api: BaseLlmApi, model: string) { let completion = ""; for await (const result of stream) { completion += result.choices[0].delta.content ?? ""; - expect(result.choices.length).toBeGreaterThan(0); } expect(completion.length).toBeGreaterThan(0); @@ -313,7 +311,6 @@ export function testChat(api: BaseLlmApi, model: string) { }, new AbortController().signal, )) { - console.log(JSON.stringify(chunk, null, 2)); response += chunk.choices[0].delta.content ?? ""; } diff --git a/packages/openai-adapters/src/types.ts b/packages/openai-adapters/src/types.ts index cb352b241..7b68ec59d 100644 --- a/packages/openai-adapters/src/types.ts +++ b/packages/openai-adapters/src/types.ts @@ -84,6 +84,19 @@ export type CohereConfig = z.infer; export const AzureConfigSchema = OpenAIConfigSchema.extend({ provider: z.literal("azure"), + env: z + .object({ + apiVersion: z.string().optional(), + apiType: z + .union([ + z.literal("azure-foundry"), + z.literal("azure-openai"), + z.literal("azure"), // Legacy + ]) + .optional(), + deployment: z.string().optional(), + }) + .optional(), }); export type AzureConfig = z.infer; diff --git a/packages/openai-adapters/tsconfig.json b/packages/openai-adapters/tsconfig.json index 63587b995..dad27ccc6 100644 --- a/packages/openai-adapters/tsconfig.json +++ b/packages/openai-adapters/tsconfig.json @@ -16,8 +16,8 @@ "noEmitOnError": false, "types": ["node", "jest"], "outDir": "dist", - "declaration": true - // "sourceMap": true + "declaration": true, + "sourceMap": true }, "include": ["src/**/*"] } From 78a620662229ef4775d31aef1cc7f42e5191e719 Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Fri, 6 Jun 2025 12:42:40 -0700 Subject: [PATCH 091/118] better comments --- packages/fetch/src/node-fetch-patch.js | 10 ++++++++-- .../{patch-test.test.js => node-fetch-patch.test.js} | 1 + 2 files changed, 9 insertions(+), 2 deletions(-) rename packages/fetch/src/{patch-test.test.js => node-fetch-patch.test.js} (95%) diff --git a/packages/fetch/src/node-fetch-patch.js b/packages/fetch/src/node-fetch-patch.js index 94d25c8cb..10bb96531 100644 --- a/packages/fetch/src/node-fetch-patch.js +++ b/packages/fetch/src/node-fetch-patch.js @@ -1,3 +1,10 @@ +/* +This is a patched version of index.js from node-fetch 3.3.2 (see packages/fetch/node_modules/node-fetch/src/index.js) +This is to fix "Premature close" errors caused by chunked encoding assumptions - see https://github.com/continuedev/continue/issues/5502 +The patch adjusts boundary chunk detection logic (see "PATCH" comment next to patch) +And is based on https://github.com/node-fetch/node-fetch/issues/1576 +*/ + /** * Index.js * @@ -481,9 +488,8 @@ function fixResponseChunkedTransferBadEnding(request, errorCallback) { // previousChunk = buf; // }; - // VENDOR note - THIS IS THE REASON I AM PATCHING THIS PACKAGE + // PATCH - THIS IS WHERE THE PATCH IS - FIXES BOUNDARY CHUNKING ISSUE // See https://github.com/node-fetch/node-fetch/issues/1576 - // FIXES BOUNDARY CHUNKING ISSUE const onData = (buf) => { properLastChunkReceived = Buffer.compare(buf.slice(-5), LAST_CHUNK) === 0; diff --git a/packages/fetch/src/patch-test.test.js b/packages/fetch/src/node-fetch-patch.test.js similarity index 95% rename from packages/fetch/src/patch-test.test.js rename to packages/fetch/src/node-fetch-patch.test.js index ee92e8dea..21f930ecb 100644 --- a/packages/fetch/src/patch-test.test.js +++ b/packages/fetch/src/node-fetch-patch.test.js @@ -1,6 +1,7 @@ import { Buffer } from "node:buffer"; import { describe, expect, it } from "vitest"; +// Tests the boundary chunking patch to node fetch made in node-fetch-patch.js (see that file for details). describe("Chunked Transfer Encoding Patch Logic", () => { // The LAST_CHUNK marker "0\r\n\r\n" const LAST_CHUNK = Buffer.from("0\r\n\r\n"); From 9a42322337f86cd9362fb655b0f479c5f8de088d Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Fri, 6 Jun 2025 12:44:25 -0700 Subject: [PATCH 092/118] restore fetch package lock --- packages/fetch/package-lock.json | 998 ++++++++++++++++++++++++------- 1 file changed, 780 insertions(+), 218 deletions(-) diff --git a/packages/fetch/package-lock.json b/packages/fetch/package-lock.json index 0b83e6377..1bf3a3a0b 100644 --- a/packages/fetch/package-lock.json +++ b/packages/fetch/package-lock.json @@ -22,18 +22,84 @@ }, "node_modules/@continuedev/config-types": { "version": "1.0.5", - "license": "Apache-2.0", + "resolved": "https://registry.npmjs.org/@continuedev/config-types/-/config-types-1.0.5.tgz", + "integrity": "sha512-Uv3JWKmpgSo9cMhZb2hWoJgR2ezuAn3CenEziWT/5d7mddPLzvuuHgFX6aDjLVVMojS1ul0rpfAd2LGxEb6nDQ==", "dependencies": { "zod": "^3.23.8" } }, - "node_modules/@esbuild/darwin-arm64": { + "node_modules/@esbuild/aix-ppc64": { "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.5.tgz", + "integrity": "sha512-9o3TMmpmftaCMepOdA5k/yDw8SfInyzWWTjYTFCX3kPSDJMROQTb8jg+h9Cnwnmm1vOzvxN7gIfB5V2ewpjtGA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.5.tgz", + "integrity": "sha512-AdJKSPeEHgi7/ZhuIPtcQKr5RQdo6OO2IL87JkianiMYMPbCtot9fxPbrMiBADOWWm3T2si9stAiVsGbTQFkbA==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.5.tgz", + "integrity": "sha512-VGzGhj4lJO+TVGV1v8ntCZWJktV7SGCs3Pn1GRWI1SBFtRALoomm8k5E9Pmwg3HOAal2VDc2F9+PM/rEY6oIDg==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.5.tgz", + "integrity": "sha512-D2GyJT1kjvO//drbRT3Hib9XPwQeWd9vZoBJn+bu/lVsOZ13cqNdDeqIF/xQ5/VmWvMduP6AmXvylO/PIc2isw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.5.tgz", + "integrity": "sha512-GtaBgammVvdF7aPIgH2jxMDdivezgFu6iKpmT+48+F8Hhg5J/sfnDieg0aeG/jfSvkYQU2/pceFPDKlqZzwnfQ==", "cpu": [ "arm64" ], "dev": true, - "license": "MIT", "optional": true, "os": [ "darwin" @@ -42,118 +108,636 @@ "node": ">=18" } }, - "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.8", + "node_modules/@esbuild/darwin-x64": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.5.tgz", + "integrity": "sha512-1iT4FVL0dJ76/q1wd7XDsXrSW+oLoquptvh4CLR4kITDtqi2e/xwXwdCVH8hVHU43wgJdsq7Gxuzcs6Iq/7bxQ==", + "cpu": [ + "x64" + ], "dev": true, - "license": "MIT", "optional": true, - "peer": true, - "dependencies": { - "@jridgewell/set-array": "^1.2.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.24" - }, + "os": [ + "darwin" + ], "engines": { - "node": ">=6.0.0" + "node": ">=18" } }, - "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.2", - "dev": true, - "license": "MIT", - "optional": true, - "peer": true, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/set-array": { - "version": "1.2.1", - "dev": true, - "license": "MIT", - "optional": true, - "peer": true, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/source-map": { - "version": "0.3.6", - "dev": true, - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "@jridgewell/gen-mapping": "^0.3.5", - "@jridgewell/trace-mapping": "^0.3.25" - } - }, - "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.5.0", - "dev": true, - "license": "MIT" - }, - "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.25", - "dev": true, - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "@jridgewell/resolve-uri": "^3.1.0", - "@jridgewell/sourcemap-codec": "^1.4.14" - } - }, - "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.41.1", + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.5.tgz", + "integrity": "sha512-nk4tGP3JThz4La38Uy/gzyXtpkPW8zSAmoUhK9xKKXdBCzKODMc2adkB2+8om9BDYugz+uGV7sLmpTYzvmz6Sw==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.5.tgz", + "integrity": "sha512-PrikaNjiXdR2laW6OIjlbeuCPrPaAl0IwPIaRv+SMV8CiM8i2LqVUHFC1+8eORgWyY7yhQY+2U2fA55mBzReaw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.5.tgz", + "integrity": "sha512-cPzojwW2okgh7ZlRpcBEtsX7WBuqbLrNXqLU89GxWbNt6uIg78ET82qifUy3W6OVww6ZWobWub5oqZOVtwolfw==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.5.tgz", + "integrity": "sha512-Z9kfb1v6ZlGbWj8EJk9T6czVEjjq2ntSYLY2cw6pAZl4oKtfgQuS4HOq41M/BcoLPzrUbNd+R4BXFyH//nHxVg==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.5.tgz", + "integrity": "sha512-sQ7l00M8bSv36GLV95BVAdhJ2QsIbCuCjh/uYrWiMQSUuV+LpXwIqhgJDcvMTj+VsQmqAHL2yYaasENvJ7CDKA==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.5.tgz", + "integrity": "sha512-0ur7ae16hDUC4OL5iEnDb0tZHDxYmuQyhKhsPBV8f99f6Z9KQM02g33f93rNH5A30agMS46u2HP6qTdEt6Q1kg==", + "cpu": [ + "loong64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.5.tgz", + "integrity": "sha512-kB/66P1OsHO5zLz0i6X0RxlQ+3cu0mkxS3TKFvkb5lin6uwZ/ttOkP3Z8lfR9mJOBk14ZwZ9182SIIWFGNmqmg==", + "cpu": [ + "mips64el" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.5.tgz", + "integrity": "sha512-UZCmJ7r9X2fe2D6jBmkLBMQetXPXIsZjQJCjgwpVDz+YMcS6oFR27alkgGv3Oqkv07bxdvw7fyB71/olceJhkQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.5.tgz", + "integrity": "sha512-kTxwu4mLyeOlsVIFPfQo+fQJAV9mh24xL+y+Bm6ej067sYANjyEw1dNHmvoqxJUCMnkBdKpvOn0Ahql6+4VyeA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.5.tgz", + "integrity": "sha512-K2dSKTKfmdh78uJ3NcWFiqyRrimfdinS5ErLSn3vluHNeHVnBAFWC8a4X5N+7FgVE1EjXS1QDZbpqZBjfrqMTQ==", + "cpu": [ + "s390x" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.5.tgz", + "integrity": "sha512-uhj8N2obKTE6pSZ+aMUbqq+1nXxNjZIIjCjGLfsWvVpy7gKCOL6rsY1MhRh9zLtUtAI7vpgLMK6DxjO8Qm9lJw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-arm64": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.5.tgz", + "integrity": "sha512-pwHtMP9viAy1oHPvgxtOv+OkduK5ugofNTVDilIzBLpoWAM16r7b/mxBvfpuQDpRQFMfuVr5aLcn4yveGvBZvw==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.5.tgz", + "integrity": "sha512-WOb5fKrvVTRMfWFNCroYWWklbnXH0Q5rZppjq0vQIdlsQKuw6mdSihwSo4RV/YdQ5UCKKvBy7/0ZZYLBZKIbwQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-arm64": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.5.tgz", + "integrity": "sha512-7A208+uQKgTxHd0G0uqZO8UjK2R0DDb4fDmERtARjSHWxqMTye4Erz4zZafx7Di9Cv+lNHYuncAkiGFySoD+Mw==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.5.tgz", + "integrity": "sha512-G4hE405ErTWraiZ8UiSoesH8DaCsMm0Cay4fsFWOOUcz8b8rC6uCvnagr+gnioEjWn0wC+o1/TAHt+It+MpIMg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.5.tgz", + "integrity": "sha512-l+azKShMy7FxzY0Rj4RCt5VD/q8mG/e+mDivgspo+yL8zW7qEwctQ6YqKX34DTEleFAvCIUviCFX1SDZRSyMQA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.5.tgz", + "integrity": "sha512-O2S7SNZzdcFG7eFKgvwUEZ2VG9D/sn/eIiz8XRZ1Q/DO5a3s76Xv0mdBzVM5j5R639lXQmPmSo0iRpHqUUrsxw==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.5.tgz", + "integrity": "sha512-onOJ02pqs9h1iMJ1PQphR+VZv8qBMQ77Klcsqv9CNW2w6yLqoURLcgERAIurY6QE63bbLuqgP9ATqajFLK5AMQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.5.tgz", + "integrity": "sha512-TXv6YnJ8ZMVdX+SXWVBo/0p8LTcrUYngpWjvm91TMjjBQii7Oz11Lw5lbDV5Y0TzuhSJHwiH4hEtC1I42mMS0g==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", + "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", + "dev": true + }, + "node_modules/@rollup/rollup-android-arm-eabi": { + "version": "4.41.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.41.1.tgz", + "integrity": "sha512-NELNvyEWZ6R9QMkiytB4/L4zSEaBC03KIXEghptLGLZWJ6VPrL63ooZQCOnlx36aQPGhzuOMwDerC1Eb2VmrLw==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-android-arm64": { + "version": "4.41.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.41.1.tgz", + "integrity": "sha512-DXdQe1BJ6TK47ukAoZLehRHhfKnKg9BjnQYUu9gzhI8Mwa1d2fzxA1aw2JixHVl403bwp1+/o/NhhHtxWJBgEA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-darwin-arm64": { + "version": "4.41.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.41.1.tgz", + "integrity": "sha512-5afxvwszzdulsU2w8JKWwY8/sJOLPzf0e1bFuvcW5h9zsEg+RQAojdW0ux2zyYAz7R8HvvzKCjLNJhVq965U7w==", "cpu": [ "arm64" ], "dev": true, - "license": "MIT", "optional": true, "os": [ "darwin" ] }, + "node_modules/@rollup/rollup-darwin-x64": { + "version": "4.41.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.41.1.tgz", + "integrity": "sha512-egpJACny8QOdHNNMZKf8xY0Is6gIMz+tuqXlusxquWu3F833DcMwmGM7WlvCO9sB3OsPjdC4U0wHw5FabzCGZg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-freebsd-arm64": { + "version": "4.41.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.41.1.tgz", + "integrity": "sha512-DBVMZH5vbjgRk3r0OzgjS38z+atlupJ7xfKIDJdZZL6sM6wjfDNo64aowcLPKIx7LMQi8vybB56uh1Ftck/Atg==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-freebsd-x64": { + "version": "4.41.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.41.1.tgz", + "integrity": "sha512-3FkydeohozEskBxNWEIbPfOE0aqQgB6ttTkJ159uWOFn42VLyfAiyD9UK5mhu+ItWzft60DycIN1Xdgiy8o/SA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-linux-arm-gnueabihf": { + "version": "4.41.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.41.1.tgz", + "integrity": "sha512-wC53ZNDgt0pqx5xCAgNunkTzFE8GTgdZ9EwYGVcg+jEjJdZGtq9xPjDnFgfFozQI/Xm1mh+D9YlYtl+ueswNEg==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm-musleabihf": { + "version": "4.41.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.41.1.tgz", + "integrity": "sha512-jwKCca1gbZkZLhLRtsrka5N8sFAaxrGz/7wRJ8Wwvq3jug7toO21vWlViihG85ei7uJTpzbXZRcORotE+xyrLA==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-gnu": { + "version": "4.41.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.41.1.tgz", + "integrity": "sha512-g0UBcNknsmmNQ8V2d/zD2P7WWfJKU0F1nu0k5pW4rvdb+BIqMm8ToluW/eeRmxCared5dD76lS04uL4UaNgpNA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-musl": { + "version": "4.41.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.41.1.tgz", + "integrity": "sha512-XZpeGB5TKEZWzIrj7sXr+BEaSgo/ma/kCgrZgL0oo5qdB1JlTzIYQKel/RmhT6vMAvOdM2teYlAaOGJpJ9lahg==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-loongarch64-gnu": { + "version": "4.41.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.41.1.tgz", + "integrity": "sha512-bkCfDJ4qzWfFRCNt5RVV4DOw6KEgFTUZi2r2RuYhGWC8WhCA8lCAJhDeAmrM/fdiAH54m0mA0Vk2FGRPyzI+tw==", + "cpu": [ + "loong64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { + "version": "4.41.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.41.1.tgz", + "integrity": "sha512-3mr3Xm+gvMX+/8EKogIZSIEF0WUu0HL9di+YWlJpO8CQBnoLAEL/roTCxuLncEdgcfJcvA4UMOf+2dnjl4Ut1A==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-gnu": { + "version": "4.41.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.41.1.tgz", + "integrity": "sha512-3rwCIh6MQ1LGrvKJitQjZFuQnT2wxfU+ivhNBzmxXTXPllewOF7JR1s2vMX/tWtUYFgphygxjqMl76q4aMotGw==", + "cpu": [ + "riscv64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-musl": { + "version": "4.41.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.41.1.tgz", + "integrity": "sha512-LdIUOb3gvfmpkgFZuccNa2uYiqtgZAz3PTzjuM5bH3nvuy9ty6RGc/Q0+HDFrHrizJGVpjnTZ1yS5TNNjFlklw==", + "cpu": [ + "riscv64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-s390x-gnu": { + "version": "4.41.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.41.1.tgz", + "integrity": "sha512-oIE6M8WC9ma6xYqjvPhzZYk6NbobIURvP/lEbh7FWplcMO6gn7MM2yHKA1eC/GvYwzNKK/1LYgqzdkZ8YFxR8g==", + "cpu": [ + "s390x" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-gnu": { + "version": "4.41.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.41.1.tgz", + "integrity": "sha512-cWBOvayNvA+SyeQMp79BHPK8ws6sHSsYnK5zDcsC3Hsxr1dgTABKjMnMslPq1DvZIp6uO7kIWhiGwaTdR4Og9A==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-musl": { + "version": "4.41.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.41.1.tgz", + "integrity": "sha512-y5CbN44M+pUCdGDlZFzGGBSKCA4A/J2ZH4edTYSSxFg7ce1Xt3GtydbVKWLlzL+INfFIZAEg1ZV6hh9+QQf9YQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-win32-arm64-msvc": { + "version": "4.41.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.41.1.tgz", + "integrity": "sha512-lZkCxIrjlJlMt1dLO/FbpZbzt6J/A8p4DnqzSa4PWqPEUUUnzXLeki/iyPLfV0BmHItlYgHUqJe+3KiyydmiNQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-ia32-msvc": { + "version": "4.41.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.41.1.tgz", + "integrity": "sha512-+psFT9+pIh2iuGsxFYYa/LhS5MFKmuivRsx9iPJWNSGbh2XVEjk90fmpUEjCnILPEPJnikAU6SFDiEUyOv90Pg==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-msvc": { + "version": "4.41.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.41.1.tgz", + "integrity": "sha512-Wq2zpapRYLfi4aKxf2Xff0tN+7slj2d4R87WEzqw7ZLsVvO5zwYCIuEGSZYiK41+GlwUo1HiR+GdkLEJnCKTCw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ] + }, "node_modules/@types/chai": { "version": "5.2.2", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-5.2.2.tgz", + "integrity": "sha512-8kB30R7Hwqf40JPiKhVzodJs2Qc1ZJ5zuT3uzw5Hq/dhNCl3G3l83jfpdI1e20BP348+fV7VIL/+FxaXkqBmWg==", "dev": true, - "license": "MIT", "dependencies": { "@types/deep-eql": "*" } }, "node_modules/@types/deep-eql": { "version": "4.0.2", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/@types/deep-eql/-/deep-eql-4.0.2.tgz", + "integrity": "sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw==", + "dev": true }, "node_modules/@types/estree": { "version": "1.0.7", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.7.tgz", + "integrity": "sha512-w28IoSUCJpidD/TGviZwwMJckNESJZXFu7NBZ5YJ4mEUnNraUn9Pm8HSZm/jDF1pDWYKspWE7oVphigUPRakIQ==", + "dev": true }, "node_modules/@types/follow-redirects": { "version": "1.14.4", + "resolved": "https://registry.npmjs.org/@types/follow-redirects/-/follow-redirects-1.14.4.tgz", + "integrity": "sha512-GWXfsD0Jc1RWiFmMuMFCpXMzi9L7oPDVwxUnZdg89kDNnqsRfUKXEtUYtA98A6lig1WXH/CYY/fvPW9HuN5fTA==", "dev": true, - "license": "MIT", "dependencies": { "@types/node": "*" } }, "node_modules/@types/node": { "version": "20.14.10", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.14.10.tgz", + "integrity": "sha512-MdiXf+nDuMvY0gJKxyfZ7/6UFsETO7mGKF54MVD/ekJS6HdFtpZFBgrh6Pseu64XTb2MLyFPlbW6hj8HYRQNOQ==", "dev": true, - "license": "MIT", "dependencies": { "undici-types": "~5.26.4" } }, "node_modules/@vitest/expect": { "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-3.2.0.tgz", + "integrity": "sha512-0v4YVbhDKX3SKoy0PHWXpKhj44w+3zZkIoVES9Ex2pq+u6+Bijijbi2ua5kE+h3qT6LBWFTNZSCOEU37H8Y5sA==", "dev": true, - "license": "MIT", "dependencies": { "@types/chai": "^5.2.2", "@vitest/spy": "3.2.0", @@ -167,8 +751,9 @@ }, "node_modules/@vitest/mocker": { "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-3.2.0.tgz", + "integrity": "sha512-HFcW0lAMx3eN9vQqis63H0Pscv0QcVMo1Kv8BNysZbxcmHu3ZUYv59DS6BGYiGQ8F5lUkmsfMMlPm4DJFJdf/A==", "dev": true, - "license": "MIT", "dependencies": { "@vitest/spy": "3.2.0", "estree-walker": "^3.0.3", @@ -192,8 +777,9 @@ }, "node_modules/@vitest/pretty-format": { "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-3.2.0.tgz", + "integrity": "sha512-gUUhaUmPBHFkrqnOokmfMGRBMHhgpICud9nrz/xpNV3/4OXCn35oG+Pl8rYYsKaTNd/FAIrqRHnwpDpmYxCYZw==", "dev": true, - "license": "MIT", "dependencies": { "tinyrainbow": "^2.0.0" }, @@ -203,8 +789,9 @@ }, "node_modules/@vitest/runner": { "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-3.2.0.tgz", + "integrity": "sha512-bXdmnHxuB7fXJdh+8vvnlwi/m1zvu+I06i1dICVcDQFhyV4iKw2RExC/acavtDn93m/dRuawUObKsrNE1gJacA==", "dev": true, - "license": "MIT", "dependencies": { "@vitest/utils": "3.2.0", "pathe": "^2.0.3" @@ -215,8 +802,9 @@ }, "node_modules/@vitest/snapshot": { "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-3.2.0.tgz", + "integrity": "sha512-z7P/EneBRMe7hdvWhcHoXjhA6at0Q4ipcoZo6SqgxLyQQ8KSMMCmvw1cSt7FHib3ozt0wnRHc37ivuUMbxzG/A==", "dev": true, - "license": "MIT", "dependencies": { "@vitest/pretty-format": "3.2.0", "magic-string": "^0.30.17", @@ -228,8 +816,9 @@ }, "node_modules/@vitest/spy": { "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-3.2.0.tgz", + "integrity": "sha512-s3+TkCNUIEOX99S0JwNDfsHRaZDDZZR/n8F0mop0PmsEbQGKZikCGpTGZ6JRiHuONKew3Fb5//EPwCP+pUX9cw==", "dev": true, - "license": "MIT", "dependencies": { "tinyspy": "^4.0.3" }, @@ -239,8 +828,9 @@ }, "node_modules/@vitest/utils": { "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-3.2.0.tgz", + "integrity": "sha512-gXXOe7Fj6toCsZKVQouTRLJftJwmvbhH5lKOBR6rlP950zUq9AitTUjnFoXS/CqjBC2aoejAztLPzzuva++XBw==", "dev": true, - "license": "MIT", "dependencies": { "@vitest/pretty-format": "3.2.0", "loupe": "^3.1.3", @@ -252,7 +842,8 @@ }, "node_modules/agent-base": { "version": "7.1.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.1.tgz", + "integrity": "sha512-H0TSyFNDMomMNJQBn8wFV5YC/2eJ+VXECwOadZJT554xP6cODZHPX3H9QMQECxvrgiSOP1pHjy1sMWQVYJOUOA==", "dependencies": { "debug": "^4.3.4" }, @@ -262,31 +853,27 @@ }, "node_modules/assertion-error": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-2.0.1.tgz", + "integrity": "sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==", "dev": true, - "license": "MIT", "engines": { "node": ">=12" } }, - "node_modules/buffer-from": { - "version": "1.1.2", - "dev": true, - "license": "MIT", - "optional": true, - "peer": true - }, "node_modules/cac": { "version": "6.7.14", + "resolved": "https://registry.npmjs.org/cac/-/cac-6.7.14.tgz", + "integrity": "sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/chai": { "version": "5.2.0", + "resolved": "https://registry.npmjs.org/chai/-/chai-5.2.0.tgz", + "integrity": "sha512-mCuXncKXk5iCLhfhwTc0izo0gtEmpz5CtG2y8GiOINBlMVS6v8TMRc5TaLWKS6692m9+dVVfzgeVxR5UxWHTYw==", "dev": true, - "license": "MIT", "dependencies": { "assertion-error": "^2.0.1", "check-error": "^2.1.1", @@ -300,29 +887,25 @@ }, "node_modules/check-error": { "version": "2.1.1", + "resolved": "https://registry.npmjs.org/check-error/-/check-error-2.1.1.tgz", + "integrity": "sha512-OAlb+T7V4Op9OwdkjmguYRqncdlx5JiofwOAUkmTF+jNdHwzTaTs4sRAGpzLF3oOz5xAyDGrPgeIDFQmDOTiJw==", "dev": true, - "license": "MIT", "engines": { "node": ">= 16" } }, - "node_modules/commander": { - "version": "2.20.3", - "dev": true, - "license": "MIT", - "optional": true, - "peer": true - }, "node_modules/data-uri-to-buffer": { "version": "4.0.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz", + "integrity": "sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==", "engines": { "node": ">= 12" } }, "node_modules/debug": { "version": "4.4.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.1.tgz", + "integrity": "sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==", "dependencies": { "ms": "^2.1.3" }, @@ -337,22 +920,25 @@ }, "node_modules/deep-eql": { "version": "5.0.2", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-5.0.2.tgz", + "integrity": "sha512-h5k/5U50IJJFpzfL6nO9jaaumfjO/f2NjK/oYB2Djzm4p9L+3T9qWpZqZ2hAbLPuuYq9wrU08WQyBTL5GbPk5Q==", "dev": true, - "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/es-module-lexer": { "version": "1.7.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.7.0.tgz", + "integrity": "sha512-jEQoCwk8hyb2AZziIOLhDqpm5+2ww5uIE6lkO/6jcOCusfk6LhMHpXXfBLXTZ7Ydyt0j4VoUQv6uGNYbdW+kBA==", + "dev": true }, "node_modules/esbuild": { "version": "0.25.5", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.5.tgz", + "integrity": "sha512-P8OtKZRv/5J5hhz0cUAdu/cLuPIKXpQl1R9pZtvmHWQvrAUVd0UNIPT4IB4W3rNOqVO0rlqHmCIbSwxh/c9yUQ==", "dev": true, "hasInstallScript": true, - "license": "MIT", "bin": { "esbuild": "bin/esbuild" }, @@ -389,22 +975,26 @@ }, "node_modules/estree-walker": { "version": "3.0.3", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz", + "integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==", "dev": true, - "license": "MIT", "dependencies": { "@types/estree": "^1.0.0" } }, "node_modules/expect-type": { "version": "1.2.1", + "resolved": "https://registry.npmjs.org/expect-type/-/expect-type-1.2.1.tgz", + "integrity": "sha512-/kP8CAwxzLVEeFrMm4kMmy4CCDlpipyA7MYLVrdJIkV0fYF0UaigQHRsxHiuY/GEea+bh4KSv3TIlgr+2UL6bw==", "dev": true, - "license": "Apache-2.0", "engines": { "node": ">=12.0.0" } }, "node_modules/fetch-blob": { "version": "3.2.0", + "resolved": "https://registry.npmjs.org/fetch-blob/-/fetch-blob-3.2.0.tgz", + "integrity": "sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==", "funding": [ { "type": "github", @@ -415,7 +1005,6 @@ "url": "https://paypal.me/jimmywarting" } ], - "license": "MIT", "dependencies": { "node-domexception": "^1.0.0", "web-streams-polyfill": "^3.0.3" @@ -426,13 +1015,14 @@ }, "node_modules/follow-redirects": { "version": "1.15.6", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz", + "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==", "funding": [ { "type": "individual", "url": "https://github.com/sponsors/RubenVerborgh" } ], - "license": "MIT", "engines": { "node": ">=4.0" }, @@ -444,7 +1034,8 @@ }, "node_modules/formdata-polyfill": { "version": "4.0.10", - "license": "MIT", + "resolved": "https://registry.npmjs.org/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz", + "integrity": "sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==", "dependencies": { "fetch-blob": "^3.1.2" }, @@ -454,8 +1045,10 @@ }, "node_modules/fsevents": { "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", "dev": true, - "license": "MIT", + "hasInstallScript": true, "optional": true, "os": [ "darwin" @@ -466,7 +1059,8 @@ }, "node_modules/http-proxy-agent": { "version": "7.0.2", - "license": "MIT", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz", + "integrity": "sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==", "dependencies": { "agent-base": "^7.1.0", "debug": "^4.3.4" @@ -477,7 +1071,8 @@ }, "node_modules/https-proxy-agent": { "version": "7.0.5", - "license": "MIT", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.5.tgz", + "integrity": "sha512-1e4Wqeblerz+tMKPIq2EMGiiWW1dIjZOksyHWSUm1rmuvw/how9hBHZ38lAGj5ID4Ik6EdkOw7NmWPy6LAwalw==", "dependencies": { "agent-base": "^7.0.2", "debug": "4" @@ -488,23 +1083,28 @@ }, "node_modules/loupe": { "version": "3.1.3", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/loupe/-/loupe-3.1.3.tgz", + "integrity": "sha512-kkIp7XSkP78ZxJEsSxW3712C6teJVoeHHwgo9zJ380de7IYyJ2ISlxojcH2pC5OFLewESmnRi/+XCDIEEVyoug==", + "dev": true }, "node_modules/magic-string": { "version": "0.30.17", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.17.tgz", + "integrity": "sha512-sNPKHvyjVf7gyjwS4xGTaW/mCnF8wnjtifKBEhxfZ7E/S8tQ0rssrwGNn6q8JH/ohItJfSQp9mBtQYuTlH5QnA==", "dev": true, - "license": "MIT", "dependencies": { "@jridgewell/sourcemap-codec": "^1.5.0" } }, "node_modules/ms": { "version": "2.1.3", - "license": "MIT" + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" }, "node_modules/nanoid": { "version": "3.3.11", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.11.tgz", + "integrity": "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==", "dev": true, "funding": [ { @@ -512,7 +1112,6 @@ "url": "https://github.com/sponsors/ai" } ], - "license": "MIT", "bin": { "nanoid": "bin/nanoid.cjs" }, @@ -522,6 +1121,8 @@ }, "node_modules/node-domexception": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz", + "integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==", "funding": [ { "type": "github", @@ -532,14 +1133,14 @@ "url": "https://paypal.me/jimmywarting" } ], - "license": "MIT", "engines": { "node": ">=10.5.0" } }, "node_modules/node-fetch": { "version": "3.3.2", - "license": "MIT", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.2.tgz", + "integrity": "sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==", "dependencies": { "data-uri-to-buffer": "^4.0.0", "fetch-blob": "^3.1.4", @@ -555,24 +1156,29 @@ }, "node_modules/pathe": { "version": "2.0.3", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/pathe/-/pathe-2.0.3.tgz", + "integrity": "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==", + "dev": true }, "node_modules/pathval": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/pathval/-/pathval-2.0.0.tgz", + "integrity": "sha512-vE7JKRyES09KiunauX7nd2Q9/L7lhok4smP9RZTDeD4MVs72Dp2qNFVz39Nz5a0FVEW0BJR6C0DYrq6unoziZA==", "dev": true, - "license": "MIT", "engines": { "node": ">= 14.16" } }, "node_modules/picocolors": { "version": "1.1.1", - "dev": true, - "license": "ISC" + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "dev": true }, "node_modules/postcss": { "version": "8.5.4", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.4.tgz", + "integrity": "sha512-QSa9EBe+uwlGTFmHsPKokv3B/oEMQZxfqW0QqNCyhpa6mB1afzulwn8hihglqAb2pOw+BJgNlmXQ8la2VeHB7w==", "dev": true, "funding": [ { @@ -588,7 +1194,6 @@ "url": "https://github.com/sponsors/ai" } ], - "license": "MIT", "dependencies": { "nanoid": "^3.3.11", "picocolors": "^1.1.1", @@ -600,8 +1205,9 @@ }, "node_modules/rollup": { "version": "4.41.1", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.41.1.tgz", + "integrity": "sha512-cPmwD3FnFv8rKMBc1MxWCwVQFxwf1JEmSX3iQXrRVVG15zerAIXRjMFVWnd5Q5QvgKF7Aj+5ykXFhUl+QGnyOw==", "dev": true, - "license": "MIT", "dependencies": { "@types/estree": "1.0.7" }, @@ -638,94 +1244,48 @@ }, "node_modules/siginfo": { "version": "2.0.0", - "dev": true, - "license": "ISC" - }, - "node_modules/source-map": { - "version": "0.6.1", - "dev": true, - "license": "BSD-3-Clause", - "optional": true, - "peer": true, - "engines": { - "node": ">=0.10.0" - } + "resolved": "https://registry.npmjs.org/siginfo/-/siginfo-2.0.0.tgz", + "integrity": "sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==", + "dev": true }, "node_modules/source-map-js": { "version": "1.2.1", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", + "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", "dev": true, - "license": "BSD-3-Clause", "engines": { "node": ">=0.10.0" } }, - "node_modules/source-map-support": { - "version": "0.5.21", - "dev": true, - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - } - }, "node_modules/stackback": { "version": "0.0.2", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/stackback/-/stackback-0.0.2.tgz", + "integrity": "sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==", + "dev": true }, "node_modules/std-env": { "version": "3.9.0", - "dev": true, - "license": "MIT" - }, - "node_modules/terser": { - "version": "5.41.0", - "dev": true, - "license": "BSD-2-Clause", - "optional": true, - "peer": true, - "dependencies": { - "@jridgewell/source-map": "^0.3.3", - "acorn": "^8.14.0", - "commander": "^2.20.0", - "source-map-support": "~0.5.20" - }, - "bin": { - "terser": "bin/terser" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/terser/node_modules/acorn": { - "version": "8.14.1", - "dev": true, - "license": "MIT", - "optional": true, - "peer": true, - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } + "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.9.0.tgz", + "integrity": "sha512-UGvjygr6F6tpH7o2qyqR6QYpwraIjKSdtzyBdyytFOHmPZY917kwdwLG0RbOjWOnKmnm3PeHjaoLLMie7kPLQw==", + "dev": true }, "node_modules/tinybench": { "version": "2.9.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/tinybench/-/tinybench-2.9.0.tgz", + "integrity": "sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==", + "dev": true }, "node_modules/tinyexec": { "version": "0.3.2", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-0.3.2.tgz", + "integrity": "sha512-KQQR9yN7R5+OSwaK0XQoj22pwHoTlgYqmUscPYoknOoWCWfj/5/ABTMRi69FrKU5ffPVh5QcFikpWJI/P1ocHA==", + "dev": true }, "node_modules/tinyglobby": { "version": "0.2.14", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.14.tgz", + "integrity": "sha512-tX5e7OM1HnYr2+a2C/4V0htOcSQcoSTH9KgJnVvNm5zm/cyEWKJ7j7YutsH9CxMdtOkkLFy2AHrMci9IM8IPZQ==", "dev": true, - "license": "MIT", "dependencies": { "fdir": "^6.4.4", "picomatch": "^4.0.2" @@ -739,8 +1299,9 @@ }, "node_modules/tinyglobby/node_modules/fdir": { "version": "6.4.5", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.4.5.tgz", + "integrity": "sha512-4BG7puHpVsIYxZUbiUE3RqGloLaSSwzYie5jvasC4LWuBWzZawynvYouhjbQKw2JuIGYdm0DzIxl8iVidKlUEw==", "dev": true, - "license": "MIT", "peerDependencies": { "picomatch": "^3 || ^4" }, @@ -752,8 +1313,9 @@ }, "node_modules/tinyglobby/node_modules/picomatch": { "version": "4.0.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz", + "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==", "dev": true, - "license": "MIT", "engines": { "node": ">=12" }, @@ -763,37 +1325,42 @@ }, "node_modules/tinypool": { "version": "1.1.0", + "resolved": "https://registry.npmjs.org/tinypool/-/tinypool-1.1.0.tgz", + "integrity": "sha512-7CotroY9a8DKsKprEy/a14aCCm8jYVmR7aFy4fpkZM8sdpNJbKkixuNjgM50yCmip2ezc8z4N7k3oe2+rfRJCQ==", "dev": true, - "license": "MIT", "engines": { "node": "^18.0.0 || >=20.0.0" } }, "node_modules/tinyrainbow": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/tinyrainbow/-/tinyrainbow-2.0.0.tgz", + "integrity": "sha512-op4nsTR47R6p0vMUUoYl/a+ljLFVtlfaXkLQmqfLR1qHma1h/ysYk4hEXZ880bf2CYgTskvTa/e196Vd5dDQXw==", "dev": true, - "license": "MIT", "engines": { "node": ">=14.0.0" } }, "node_modules/tinyspy": { "version": "4.0.3", + "resolved": "https://registry.npmjs.org/tinyspy/-/tinyspy-4.0.3.tgz", + "integrity": "sha512-t2T/WLB2WRgZ9EpE4jgPJ9w+i66UZfDc8wHh0xrwiRNN+UwH98GIJkTeZqX9rg0i0ptwzqW+uYeIF0T4F8LR7A==", "dev": true, - "license": "MIT", "engines": { "node": ">=14.0.0" } }, "node_modules/undici-types": { "version": "5.26.5", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", + "dev": true }, "node_modules/vite": { "version": "6.3.5", + "resolved": "https://registry.npmjs.org/vite/-/vite-6.3.5.tgz", + "integrity": "sha512-cZn6NDFE7wdTpINgs++ZJ4N49W2vRp8LCKrn3Ob1kYNtOo21vfDoaV5GzBfLU4MovSAB8uNRm4jgzVQZ+mBzPQ==", "dev": true, - "license": "MIT", "dependencies": { "esbuild": "^0.25.0", "fdir": "^6.4.4", @@ -865,8 +1432,9 @@ }, "node_modules/vite-node": { "version": "3.2.0", + "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-3.2.0.tgz", + "integrity": "sha512-8Fc5Ko5Y4URIJkmMF/iFP1C0/OJyY+VGVe9Nw6WAdZyw4bTO+eVg9mwxWkQp/y8NnAoQY3o9KAvE1ZdA2v+Vmg==", "dev": true, - "license": "MIT", "dependencies": { "cac": "^6.7.14", "debug": "^4.4.1", @@ -886,8 +1454,9 @@ }, "node_modules/vite/node_modules/fdir": { "version": "6.4.5", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.4.5.tgz", + "integrity": "sha512-4BG7puHpVsIYxZUbiUE3RqGloLaSSwzYie5jvasC4LWuBWzZawynvYouhjbQKw2JuIGYdm0DzIxl8iVidKlUEw==", "dev": true, - "license": "MIT", "peerDependencies": { "picomatch": "^3 || ^4" }, @@ -899,8 +1468,9 @@ }, "node_modules/vite/node_modules/picomatch": { "version": "4.0.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz", + "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==", "dev": true, - "license": "MIT", "engines": { "node": ">=12" }, @@ -910,8 +1480,9 @@ }, "node_modules/vitest": { "version": "3.2.0", + "resolved": "https://registry.npmjs.org/vitest/-/vitest-3.2.0.tgz", + "integrity": "sha512-P7Nvwuli8WBNmeMHHek7PnGW4oAZl9za1fddfRVidZar8wDZRi7hpznLKQePQ8JPLwSBEYDK11g+++j7uFJV8Q==", "dev": true, - "license": "MIT", "dependencies": { "@types/chai": "^5.2.2", "@vitest/expect": "3.2.0", @@ -981,8 +1552,9 @@ }, "node_modules/vitest/node_modules/picomatch": { "version": "4.0.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz", + "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==", "dev": true, - "license": "MIT", "engines": { "node": ">=12" }, @@ -992,15 +1564,17 @@ }, "node_modules/web-streams-polyfill": { "version": "3.3.3", - "license": "MIT", + "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.3.3.tgz", + "integrity": "sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw==", "engines": { "node": ">= 8" } }, "node_modules/why-is-node-running": { "version": "2.3.0", + "resolved": "https://registry.npmjs.org/why-is-node-running/-/why-is-node-running-2.3.0.tgz", + "integrity": "sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w==", "dev": true, - "license": "MIT", "dependencies": { "siginfo": "^2.0.0", "stackback": "0.0.2" @@ -1012,22 +1586,10 @@ "node": ">=8" } }, - "node_modules/yaml": { - "version": "2.8.0", - "dev": true, - "license": "ISC", - "optional": true, - "peer": true, - "bin": { - "yaml": "bin.mjs" - }, - "engines": { - "node": ">= 14.6" - } - }, "node_modules/zod": { "version": "3.23.8", - "license": "MIT", + "resolved": "https://registry.npmjs.org/zod/-/zod-3.23.8.tgz", + "integrity": "sha512-XBx9AXhXktjUqnepgTiE5flcKIYWi/rme0Eaj+5Y0lftuGBq+jyRu/md4WnuxqgP1ubdpNCsYEYPxrzVHD8d6g==", "funding": { "url": "https://github.com/sponsors/colinhacks" } From f15b379daf0be4d4390aefe71c6c08448bdc7cd0 Mon Sep 17 00:00:00 2001 From: Patrick Erichsen Date: Fri, 6 Jun 2025 13:32:42 -0700 Subject: [PATCH 093/118] Update main.test.ts --- packages/openai-adapters/src/test/main.test.ts | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/packages/openai-adapters/src/test/main.test.ts b/packages/openai-adapters/src/test/main.test.ts index 2a3739ce4..e7b9916e8 100644 --- a/packages/openai-adapters/src/test/main.test.ts +++ b/packages/openai-adapters/src/test/main.test.ts @@ -114,16 +114,6 @@ const TESTS: Omit[] = [ }, roles: ["chat"], }, - { - provider: "azure", - model: "mistral-small-2503", - apiBase: "https://nate-0276-resource.services.ai.azure.com/models", - apiKey: process.env.AZURE_FOUNDRY_API_KEY, - env: { - deployment: "mistral-small-2503", - }, - roles: ["chat"], - }, ]; TESTS.forEach((config) => { From 1dddae2381cb320fa5f0d3d05d96328057a90c79 Mon Sep 17 00:00:00 2001 From: Jacob Kim Date: Fri, 6 Jun 2025 14:04:57 -0700 Subject: [PATCH 094/118] lazily unroll local assistant --- core/config/yaml/loadYaml.ts | 68 +++++++++++++++++++----------------- 1 file changed, 36 insertions(+), 32 deletions(-) diff --git a/core/config/yaml/loadYaml.ts b/core/config/yaml/loadYaml.ts index 29c6cc5dd..5a0bc99ba 100644 --- a/core/config/yaml/loadYaml.ts +++ b/core/config/yaml/loadYaml.ts @@ -117,45 +117,49 @@ async function loadConfigYaml(options: { // `Loading config.yaml from ${JSON.stringify(packageIdentifier)} with root path ${rootPath}`, // ); - // This is how we allow use of blocks locally - const unrollResult = await unrollAssistant( - packageIdentifier, - new RegistryClient({ - accessToken: await controlPlaneClient.getAccessToken(), - apiBase: getControlPlaneEnvSync(ideSettings.continueTestEnvironment) - .CONTROL_PLANE_URL, - rootPath, - }), - { - currentUserSlug: "", - onPremProxyUrl: null, - orgScopeId, - platformClient: new LocalPlatformClient( - orgScopeId, - controlPlaneClient, - ide, - ), - renderSecrets: true, - injectBlocks: allLocalBlocks, - asConfigResult: true, - }, - ); - const errors: ConfigValidationError[] = []; - const config = overrideConfigYaml ?? unrollResult.config; + let config: AssistantUnrolled | undefined; + + if (overrideConfigYaml) { + config = overrideConfigYaml; + } else { + // This is how we allow use of blocks locally + const unrollResult = await unrollAssistant( + packageIdentifier, + new RegistryClient({ + accessToken: await controlPlaneClient.getAccessToken(), + apiBase: getControlPlaneEnvSync(ideSettings.continueTestEnvironment) + .CONTROL_PLANE_URL, + rootPath, + }), + { + currentUserSlug: "", + onPremProxyUrl: null, + orgScopeId, + platformClient: new LocalPlatformClient( + orgScopeId, + controlPlaneClient, + ide, + ), + renderSecrets: true, + injectBlocks: allLocalBlocks, + asConfigResult: true, + }, + ); + config = unrollResult.config; + if (unrollResult.errors) { + errors.push(...unrollResult.errors); + } + } if (config) { isAssistantUnrolledNonNullable(config) ? errors.push(...validateConfigYaml(config)) : errors.push({ - fatal: true, - message: "Assistant includes blocks that don't exist", - }); - } - - if (unrollResult.errors) { - errors.push(...unrollResult.errors); + fatal: true, + message: "Assistant includes blocks that don't exist", + }); } if (errors?.some((error) => error.fatal)) { From 13b4b5092f830762c3a7fa7a0d9a27efd5af6fc3 Mon Sep 17 00:00:00 2001 From: Jacob Kim Date: Fri, 6 Jun 2025 14:05:12 -0700 Subject: [PATCH 095/118] better error formatting --- packages/config-yaml/src/load/unroll.ts | 80 +++++++++++++++++++------ 1 file changed, 62 insertions(+), 18 deletions(-) diff --git a/packages/config-yaml/src/load/unroll.ts b/packages/config-yaml/src/load/unroll.ts index 1bb04e3fd..7c112a108 100644 --- a/packages/config-yaml/src/load/unroll.ts +++ b/packages/config-yaml/src/load/unroll.ts @@ -1,4 +1,6 @@ +import * as path from "path"; import * as YAML from "yaml"; +import { ZodError } from "zod"; import { PlatformClient, Registry } from "../interfaces/index.js"; import { encodeSecretLocation } from "../interfaces/SecretResult.js"; import { @@ -31,16 +33,25 @@ export function parseConfigYaml(configYaml: string): ConfigYaml { if (result.success) { return result.data; } - throw new Error( - result.error.errors - .map((e) => `${e.path.join(".")}: ${e.message}`) - .join(""), - ); + + throw new Error(formatZodError(result.error), { + cause: "result.success was false", + }); } catch (e) { - console.log("Failed to parse rolled assistant:", configYaml); - throw new Error( - `Failed to parse assistant:\n${e instanceof Error ? e.message : e}`, - ); + console.error("Failed to parse rolled assistant:", configYaml); + if ( + e instanceof Error && + "cause" in e && + e.cause === "result.success was false" + ) { + throw new Error(`Failed to parse assistant: ${e.message}`); + } else if (e instanceof ZodError) { + throw new Error(`Failed to parse assistant: ${formatZodError(e)}`); + } else { + throw new Error( + `Failed to parse assistant: ${e instanceof Error ? e.message : e}`, + ); + } } } @@ -50,9 +61,10 @@ export function parseAssistantUnrolled(configYaml: string): AssistantUnrolled { const result = assistantUnrolledSchema.parse(parsed); return result; } catch (e: any) { - throw new Error( + console.error( `Failed to parse unrolled assistant: ${e.message}\n\n${configYaml}`, ); + throw new Error(`Failed to parse unrolled assistant: ${formatZodError(e)}`); } } @@ -62,7 +74,7 @@ export function parseBlock(configYaml: string): Block { const result = blockSchema.parse(parsed); return result; } catch (e: any) { - throw new Error(`Failed to parse block: ${e.message}`); + throw new Error(`Failed to parse block: ${formatZodError(e)}`); } } @@ -353,10 +365,19 @@ export async function unrollBlocks( ); } } catch (err) { + let msg = ""; + if ( + typeof unrolledBlock.uses !== "string" && + "filePath" in unrolledBlock.uses + ) { + msg = `${(err as Error).message}.\n> ${shortenedPath(unrolledBlock.uses.filePath)}`; + } else { + msg = `${(err as Error).message}.\n> ${JSON.stringify(unrolledBlock.uses)}`; + } + errors.push({ fatal: false, - // Using JSON.stringify to avoid printing [object Object]. - message: `${(err as Error).message}:\n${JSON.stringify(unrolledBlock.uses)}`, + message: msg, }); console.error( @@ -394,12 +415,11 @@ export async function unrollBlocks( } catch (err) { errors.push({ fatal: false, - // Using JSON.stringify to avoid printing [object Object]. - message: `${(err as Error).message}:\n${JSON.stringify(rule.uses)}`, + message: `${(err as Error).message}:\n${rule.uses}`, }); console.error( - `Failed to unroll block ${JSON.stringify(rule.uses)}: ${(err as Error).message}`, + `Failed to unroll block ${rule.uses}: ${(err as Error).message}`, ); rules.push(null); } @@ -430,10 +450,15 @@ export async function unrollBlocks( ); } } catch (err) { + let msg = ""; + if (injectBlock.uriType === "file") { + msg = `${(err as Error).message}.\n> ${shortenedPath(injectBlock.filePath)}`; + } else { + msg = `${(err as Error).message}.\n> ${injectBlock.fullSlug}`; + } errors.push({ fatal: false, - // Using JSON.stringify to avoid printing [object Object]. - message: `${(err as Error).message}:\n${JSON.stringify(injectBlock)}`, + message: msg, }); console.error( @@ -507,3 +532,22 @@ export function mergeOverrides>( } return block; } + +function formatZodError(error: any): string { + if (error.errors && Array.isArray(error.errors)) { + return error.errors + .map((e: any) => { + const path = e.path.length > 0 ? `${e.path.join(".")}: ` : ""; + return `${path}${e.message}`; + }) + .join(", "); + } + return error.message || "Validation failed"; +} + +function shortenedPath(filePath: string): string { + const basename = path.posix.basename(filePath); + const parent = path.posix.basename(path.posix.dirname(filePath)); + const shortenedPath = `${parent}/${basename}`; + return shortenedPath; +} From f55f79eeb45d096ee9c36814af7630994cde6684 Mon Sep 17 00:00:00 2001 From: Jacob Kim Date: Fri, 6 Jun 2025 14:05:21 -0700 Subject: [PATCH 096/118] bump version --- extensions/vscode/package-lock.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extensions/vscode/package-lock.json b/extensions/vscode/package-lock.json index 38efaa08a..349212a6a 100644 --- a/extensions/vscode/package-lock.json +++ b/extensions/vscode/package-lock.json @@ -1,12 +1,12 @@ { "name": "continue", - "version": "1.1.44", + "version": "1.1.45", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "continue", - "version": "1.1.44", + "version": "1.1.45", "license": "Apache-2.0", "dependencies": { "@continuedev/config-types": "^1.0.14", From f5dfc4dfee6b5766005d05dab18664424adeaea0 Mon Sep 17 00:00:00 2001 From: Jacob Kim Date: Fri, 6 Jun 2025 14:15:38 -0700 Subject: [PATCH 097/118] pass prettier checks --- core/config/yaml/loadYaml.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/config/yaml/loadYaml.ts b/core/config/yaml/loadYaml.ts index 5a0bc99ba..2217d222c 100644 --- a/core/config/yaml/loadYaml.ts +++ b/core/config/yaml/loadYaml.ts @@ -157,9 +157,9 @@ async function loadConfigYaml(options: { isAssistantUnrolledNonNullable(config) ? errors.push(...validateConfigYaml(config)) : errors.push({ - fatal: true, - message: "Assistant includes blocks that don't exist", - }); + fatal: true, + message: "Assistant includes blocks that don't exist", + }); } if (errors?.some((error) => error.fatal)) { From e871252ddd9d0cd4e6bcfeee7985b31aa56a1976 Mon Sep 17 00:00:00 2001 From: Jacob Kim Date: Fri, 6 Jun 2025 15:20:06 -0700 Subject: [PATCH 098/118] use existing util function to resolve URIs --- packages/config-yaml/src/load/unroll.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/config-yaml/src/load/unroll.ts b/packages/config-yaml/src/load/unroll.ts index 7c112a108..8e9507b79 100644 --- a/packages/config-yaml/src/load/unroll.ts +++ b/packages/config-yaml/src/load/unroll.ts @@ -1,6 +1,7 @@ import * as path from "path"; import * as YAML from "yaml"; import { ZodError } from "zod"; +import { getLastNUriRelativePathParts } from "../../../../core/util/uri.js"; import { PlatformClient, Registry } from "../interfaces/index.js"; import { encodeSecretLocation } from "../interfaces/SecretResult.js"; import { @@ -370,7 +371,7 @@ export async function unrollBlocks( typeof unrolledBlock.uses !== "string" && "filePath" in unrolledBlock.uses ) { - msg = `${(err as Error).message}.\n> ${shortenedPath(unrolledBlock.uses.filePath)}`; + msg = `${(err as Error).message}.\n> ${getLastNUriRelativePathParts([], unrolledBlock.uses.filePath, 2)}`; } else { msg = `${(err as Error).message}.\n> ${JSON.stringify(unrolledBlock.uses)}`; } @@ -452,7 +453,7 @@ export async function unrollBlocks( } catch (err) { let msg = ""; if (injectBlock.uriType === "file") { - msg = `${(err as Error).message}.\n> ${shortenedPath(injectBlock.filePath)}`; + msg = `${(err as Error).message}.\n> ${getLastNUriRelativePathParts([], injectBlock.filePath, 2)}`; } else { msg = `${(err as Error).message}.\n> ${injectBlock.fullSlug}`; } From 6ca026852df36310e2214cd595b0277212820f71 Mon Sep 17 00:00:00 2001 From: Jacob Kim Date: Fri, 6 Jun 2025 15:43:42 -0700 Subject: [PATCH 099/118] rever to printing full file path --- packages/config-yaml/src/load/unroll.ts | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/packages/config-yaml/src/load/unroll.ts b/packages/config-yaml/src/load/unroll.ts index 8e9507b79..9d3040721 100644 --- a/packages/config-yaml/src/load/unroll.ts +++ b/packages/config-yaml/src/load/unroll.ts @@ -1,7 +1,5 @@ -import * as path from "path"; import * as YAML from "yaml"; import { ZodError } from "zod"; -import { getLastNUriRelativePathParts } from "../../../../core/util/uri.js"; import { PlatformClient, Registry } from "../interfaces/index.js"; import { encodeSecretLocation } from "../interfaces/SecretResult.js"; import { @@ -371,7 +369,7 @@ export async function unrollBlocks( typeof unrolledBlock.uses !== "string" && "filePath" in unrolledBlock.uses ) { - msg = `${(err as Error).message}.\n> ${getLastNUriRelativePathParts([], unrolledBlock.uses.filePath, 2)}`; + msg = `${(err as Error).message}.\n> ${unrolledBlock.uses.filePath}`; } else { msg = `${(err as Error).message}.\n> ${JSON.stringify(unrolledBlock.uses)}`; } @@ -453,7 +451,7 @@ export async function unrollBlocks( } catch (err) { let msg = ""; if (injectBlock.uriType === "file") { - msg = `${(err as Error).message}.\n> ${getLastNUriRelativePathParts([], injectBlock.filePath, 2)}`; + msg = `${(err as Error).message}.\n> ${injectBlock.filePath}`; } else { msg = `${(err as Error).message}.\n> ${injectBlock.fullSlug}`; } @@ -545,10 +543,3 @@ function formatZodError(error: any): string { } return error.message || "Validation failed"; } - -function shortenedPath(filePath: string): string { - const basename = path.posix.basename(filePath); - const parent = path.posix.basename(path.posix.dirname(filePath)); - const shortenedPath = `${parent}/${basename}`; - return shortenedPath; -} From 4a7393c1e6e6fcd61c95ec195df77466cf8e0772 Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Sat, 7 Jun 2025 23:07:22 -0700 Subject: [PATCH 100/118] more tool call merging tests and cases --- gui/src/util/toolCallState.test.ts | 123 +++++++++++++++++++++++++++++ gui/src/util/toolCallState.ts | 23 +++++- 2 files changed, 144 insertions(+), 2 deletions(-) diff --git a/gui/src/util/toolCallState.test.ts b/gui/src/util/toolCallState.test.ts index 86ee6914c..3207b606a 100644 --- a/gui/src/util/toolCallState.test.ts +++ b/gui/src/util/toolCallState.test.ts @@ -57,6 +57,129 @@ describe("addToolCallDeltaToState", () => { expect(result.toolCall.function.name).toBe("searchFiles"); }); + it("should handle name streaming in full progressive chunks", () => { + // Test case where model streams the name progressively but includes full prefix each time + // e.g. "readFi" -> "readFil" -> "readFile" + const currentState: ToolCallState = { + status: "generating", + toolCall: { + id: "call123", + type: "function", + function: { + name: "readFi", + arguments: "{}", + }, + }, + toolCallId: "call123", + parsedArgs: {}, + }; + + const delta: ToolCallDelta = { + function: { + name: "readFil", + }, + }; + + const result = addToolCallDeltaToState(delta, currentState); + expect(result.toolCall.function.name).toBe("readFil"); + + // Continue the streaming + const nextDelta: ToolCallDelta = { + function: { + name: "readFile", + }, + }; + + const finalResult = addToolCallDeltaToState(nextDelta, result); + expect(finalResult.toolCall.function.name).toBe("readFile"); + }); + + it("should keep original name when receiving duplicate name chunks", () => { + // Test case where model streams the complete name multiple times + // e.g. "readFile" -> "readFile" -> "readFile" + const currentState: ToolCallState = { + status: "generating", + toolCall: { + id: "call123", + type: "function", + function: { + name: "readFile", + arguments: "{}", + }, + }, + toolCallId: "call123", + parsedArgs: {}, + }; + + const delta: ToolCallDelta = { + function: { + name: "readFile", + }, + }; + + const result = addToolCallDeltaToState(delta, currentState); + expect(result.toolCall.function.name).toBe("readFile"); + }); + + it("should handle partial name streaming", () => { + // Test case where model streams the name in parts + // e.g. "read" -> "File" + const currentState: ToolCallState = { + status: "generating", + toolCall: { + id: "call123", + type: "function", + function: { + name: "read", + arguments: "{}", + }, + }, + toolCallId: "call123", + parsedArgs: {}, + }; + + const delta: ToolCallDelta = { + function: { + name: "File", + }, + }; + + const result = addToolCallDeltaToState(delta, currentState); + expect(result.toolCall.function.name).toBe("readFile"); + }); + + it("should ignore new tool calls with different IDs", () => { + const currentState: ToolCallState = { + status: "generating", + toolCall: { + id: "call123", + type: "function", + function: { + name: "searchFiles", + arguments: '{"query":"test"}', + }, + }, + toolCallId: "call123", + parsedArgs: { query: "test" }, + }; + + const delta: ToolCallDelta = { + id: "call456", // Different ID + type: "function", + function: { + name: "readFile", + arguments: '{"path":"file.txt"}', + }, + }; + + const result = addToolCallDeltaToState(delta, currentState); + + // Should keep the original state and ignore the new call + expect(result).toBe(currentState); + expect(result.toolCall.id).toBe("call123"); + expect(result.toolCall.function.name).toBe("searchFiles"); + }); + it("should merge function argument deltas correctly", () => { const currentState: ToolCallState = { status: "generating", diff --git a/gui/src/util/toolCallState.ts b/gui/src/util/toolCallState.ts index 8e3656b5b..e42ac6430 100644 --- a/gui/src/util/toolCallState.ts +++ b/gui/src/util/toolCallState.ts @@ -8,6 +8,15 @@ export function addToolCallDeltaToState( toolCallDelta: ToolCallDelta, currentState: ToolCallState | undefined, ): ToolCallState { + // This prevents multiple tool calls for now, by ignoring new tool call ids + if ( + toolCallDelta.id && + currentState?.toolCallId && + toolCallDelta.id !== currentState?.toolCallId + ) { + return currentState; + } + const currentCall = currentState?.toolCall; // These will/should not be partially streamed @@ -21,8 +30,18 @@ export function addToolCallDeltaToState( const nameDelta = toolCallDelta.function?.name ?? ""; const argsDelta = toolCallDelta.function?.arguments ?? ""; - const mergedName = - currentName === nameDelta ? currentName : currentName + nameDelta; // Some models may include the name repeatedly. This doesn't account for an edge case where the name is like "dothisdothis" and it happens to stream name in chunks "dothis" and "dothis" but that's a super edge case + let mergedName = currentName; + if (nameDelta.startsWith(currentName)) { + // Case where model progresssively streams name but full name each time e.g. "readFi" -> "readFil" -> "readFile" + mergedName = nameDelta; + } else if (currentName.startsWith(nameDelta)) { + // Case where model streams in full name each time e.g. readFile -> readFile -> readFile + // do nothing + } else { + // Case where model streams in name in parts e.g. "read" -> "File" + mergedName = currentName + nameDelta; + } + const mergedArgs = currentArgs + argsDelta; const [_, parsedArgs] = incrementalParseJson(mergedArgs || "{}"); From 1b453083b14e60afda14de69b7bfb2f7ce74194b Mon Sep 17 00:00:00 2001 From: Patrick Erichsen Date: Sun, 8 Jun 2025 10:15:56 -0700 Subject: [PATCH 101/118] feat: use hub blocks for local onboarding --- core/config/onboarding.ts | 57 ++ core/core.ts | 34 +- core/core_temp.ts | 0 core/index.d.ts | 6 + core/protocol/core.ts | 13 +- core/protocol/passThrough.ts | 2 +- .../constants/MessageTypes.kt | 2 +- extensions/vscode/package-lock.json | 4 +- gui/package-lock.json | 14 + gui/package.json | 1 + gui/src/components/AddModelButtonSubtext.tsx | 25 - gui/src/components/Layout.tsx | 4 +- .../OnboardingCard/OnboardingCard.tsx | 16 +- .../components/ApiKeySubmitButton.tsx | 43 -- .../components/OnboardingApiKeyTab.tsx | 34 -- .../components/OnboardingCardLanding.tsx | 14 +- .../components/OnboardingCardTabs.tsx | 87 ++- ...ngOllamaTab.tsx => OnboardingLocalTab.tsx} | 88 +-- .../components/OnboardingProvidersTab.tsx | 105 ++++ .../OnboardingCard/components/index.ts | 6 +- .../OnboardingCard/hooks/useOnboardingCard.ts | 2 +- .../hooks/useSubmitOnboarding.ts | 11 +- gui/src/components/OnboardingCard/utils.ts | 2 +- .../modelSelection/ModelSelectionListbox.tsx | 130 +---- gui/src/forms/AddModelForm.tsx | 528 +++++++----------- gui/src/pages/gui/Chat.tsx | 2 +- gui/src/util/providers.ts | 29 + packages/llm-info/src/index.ts | 2 + packages/llm-info/tsconfig.json | 4 +- 29 files changed, 581 insertions(+), 684 deletions(-) create mode 100644 core/core_temp.ts delete mode 100644 gui/src/components/AddModelButtonSubtext.tsx delete mode 100644 gui/src/components/OnboardingCard/components/ApiKeySubmitButton.tsx delete mode 100644 gui/src/components/OnboardingCard/components/OnboardingApiKeyTab.tsx rename gui/src/components/OnboardingCard/components/{OnboardingOllamaTab.tsx => OnboardingLocalTab.tsx} (68%) create mode 100644 gui/src/components/OnboardingCard/components/OnboardingProvidersTab.tsx create mode 100644 gui/src/util/providers.ts diff --git a/core/config/onboarding.ts b/core/config/onboarding.ts index 9b3826ff8..a3396ac66 100644 --- a/core/config/onboarding.ts +++ b/core/config/onboarding.ts @@ -8,6 +8,21 @@ export const LOCAL_ONBOARDING_CHAT_TITLE = "Llama 3.1 8B"; export const LOCAL_ONBOARDING_EMBEDDINGS_MODEL = "nomic-embed-text:latest"; export const LOCAL_ONBOARDING_EMBEDDINGS_TITLE = "Nomic Embed"; +const ANTHROPIC_MODEL_CONFIG = { + slugs: ["anthropic/claude-3-7-sonnet", "anthropic/claude-4-sonnet"], + apiKeyInputName: "ANTHROPIC_API_KEY", +}; +const OPENAI_MODEL_CONFIG = { + slugs: ["openai/o3", "openai/gpt-4.1-mini", "openai/gpt-4.1"], + apiKeyInputName: "OPENAI_API_KEY", +}; + +// TODO: These need updating on the hub +const GEMINI_MODEL_CONFIG = { + slugs: ["google/gemini-2.0-flash", "google/gemini-2.5-pro"], + apiKeyInputName: "GEMINI_API_KEY", +}; + /** * We set the "best" chat + autocopmlete models by default * whenever a user doesn't have a config.json @@ -49,3 +64,45 @@ export function setupLocalConfig(config: ConfigYaml): ConfigYaml { export function setupQuickstartConfig(config: ConfigYaml): ConfigYaml { return config; } + +export function setupProviderConfig( + config: ConfigYaml, + provider: string, + apiKey: string, +): ConfigYaml { + let newModels; + + switch (provider) { + case "openai": + newModels = OPENAI_MODEL_CONFIG.slugs.map((slug) => ({ + uses: slug, + with: { + [OPENAI_MODEL_CONFIG.apiKeyInputName]: apiKey, + }, + })); + break; + case "anthropic": + newModels = ANTHROPIC_MODEL_CONFIG.slugs.map((slug) => ({ + uses: slug, + with: { + [ANTHROPIC_MODEL_CONFIG.apiKeyInputName]: apiKey, + }, + })); + break; + case "gemini": + newModels = GEMINI_MODEL_CONFIG.slugs.map((slug) => ({ + uses: slug, + with: { + [GEMINI_MODEL_CONFIG.apiKeyInputName]: apiKey, + }, + })); + break; + default: + throw new Error(`Unknown provider: ${provider}`); + } + + return { + ...config, + models: [...(config.models ?? []), ...newModels], + }; +} diff --git a/core/core.ts b/core/core.ts index 1e34f1e57..dfa91e1f7 100644 --- a/core/core.ts +++ b/core/core.ts @@ -34,6 +34,7 @@ import { getSymbolsForManyFiles } from "./util/treeSitter"; import { TTS } from "./util/tts"; import { + CompleteOnboardingPayload, ContextItemWithId, IdeSettings, ModelDescription, @@ -46,7 +47,11 @@ import { import { ConfigYaml } from "@continuedev/config-yaml"; import { getDiffFn, GitDiffCache } from "./autocomplete/snippets/gitDiffCache"; import { isLocalAssistantFile } from "./config/loadLocalAssistants"; -import { setupLocalConfig, setupQuickstartConfig } from "./config/onboarding"; +import { + setupLocalConfig, + setupProviderConfig, + setupQuickstartConfig, +} from "./config/onboarding"; import { createNewWorkspaceBlockFile } from "./config/workspace/workspaceBlocks"; import { MCPManagerSingleton } from "./context/mcp/MCPManagerSingleton"; import { setMdmLicenseKey } from "./control-plane/mdm/mdm"; @@ -506,7 +511,7 @@ export class Core { abortManager.clear(); }); - on("completeOnboarding", this.handleCompleteOnboarding.bind(this)); + on("onboarding/complete", this.handleCompleteOnboarding.bind(this)); on("addAutocompleteModel", this.handleAddAutocompleteModel.bind(this)); @@ -874,32 +879,21 @@ export class Core { } private async handleCompleteOnboarding( - msg: Message<{ mode: OnboardingModes; models?: any[] }>, + msg: Message, ) { - const { mode, models } = msg.data; + const { mode, provider, apiKey } = msg.data; let editConfigYamlCallback: (config: ConfigYaml) => ConfigYaml; switch (mode) { - case OnboardingModes.OLLAMA: + case OnboardingModes.LOCAL: editConfigYamlCallback = setupLocalConfig; break; - case OnboardingModes.API_KEYS: - if (models && models.length > 0) { - editConfigYamlCallback = (config: ConfigYaml) => ({ - ...config, - models: [ - ...(config.models ?? []), - ...models.map((model) => ({ - name: model.title, - provider: model.provider, - model: model.model, - apiKey: model.apiKey, - roles: ["chat", "edit"] as any, - })), - ], - }); + case OnboardingModes.PROVIDERS: + if (provider && apiKey) { + editConfigYamlCallback = (config: ConfigYaml) => + setupProviderConfig(config, provider, apiKey); } else { editConfigYamlCallback = setupQuickstartConfig; } diff --git a/core/core_temp.ts b/core/core_temp.ts new file mode 100644 index 000000000..e69de29bb diff --git a/core/index.d.ts b/core/index.d.ts index d3487fe30..da9d6fc10 100644 --- a/core/index.d.ts +++ b/core/index.d.ts @@ -1578,3 +1578,9 @@ export interface RuleWithSource { ruleFile?: string; alwaysApply?: boolean; } + +export interface CompleteOnboardingPayload { + mode: OnboardingModes; + provider?: string; + apiKey?: string; +} diff --git a/core/protocol/core.ts b/core/protocol/core.ts index 235b901d9..1358e0a3a 100644 --- a/core/protocol/core.ts +++ b/core/protocol/core.ts @@ -12,6 +12,7 @@ import { GlobalContextModelSelections } from "../util/GlobalContext"; import { BrowserSerializedContinueConfig, ChatMessage, + CompleteOnboardingPayload, ContextItem, ContextItemWithId, ContextSubmenuItem, @@ -37,8 +38,8 @@ import { ControlPlaneSessionInfo } from "../control-plane/AuthTypes"; import { FreeTrialStatus } from "../control-plane/client"; export enum OnboardingModes { - API_KEYS = "API Keys", - OLLAMA = "Ollama", + PROVIDERS = "Providers", + LOCAL = "Local", } export interface ListHistoryOptions { @@ -172,13 +173,7 @@ export type ToCoreFromIdeOrWebviewProtocol = { void, ]; "index/indexingProgressBarInitialized": [undefined, void]; - completeOnboarding: [ - { - mode: OnboardingModes; - models?: any[]; - }, - void, - ]; + "onboarding/complete": [CompleteOnboardingPayload, void]; // File changes "files/changed": [{ uris?: string[] }, void]; diff --git a/core/protocol/passThrough.ts b/core/protocol/passThrough.ts index 51c8f4a78..d1e1a0e8f 100644 --- a/core/protocol/passThrough.ts +++ b/core/protocol/passThrough.ts @@ -55,7 +55,7 @@ export const WEBVIEW_TO_CORE_PASS_THROUGH: (keyof ToCoreFromWebviewProtocol)[] = "docs/initStatuses", "docs/getDetails", // - "completeOnboarding", + "onboarding/complete", "addAutocompleteModel", "didChangeSelectedProfile", "didChangeSelectedOrg", diff --git a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/constants/MessageTypes.kt b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/constants/MessageTypes.kt index 89ca73cd7..6b55ace95 100644 --- a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/constants/MessageTypes.kt +++ b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/constants/MessageTypes.kt @@ -121,7 +121,7 @@ class MessageTypes { "docs/initStatuses", "docs/getDetails", // - "completeOnboarding", + onboarding/complete, "addAutocompleteModel", "didChangeSelectedProfile", "didChangeSelectedOrg", diff --git a/extensions/vscode/package-lock.json b/extensions/vscode/package-lock.json index 38efaa08a..349212a6a 100644 --- a/extensions/vscode/package-lock.json +++ b/extensions/vscode/package-lock.json @@ -1,12 +1,12 @@ { "name": "continue", - "version": "1.1.44", + "version": "1.1.45", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "continue", - "version": "1.1.44", + "version": "1.1.45", "license": "Apache-2.0", "dependencies": { "@continuedev/config-types": "^1.0.14", diff --git a/gui/package-lock.json b/gui/package-lock.json index 724b7b64c..87b96c1ab 100644 --- a/gui/package-lock.json +++ b/gui/package-lock.json @@ -8,6 +8,7 @@ "license": "Apache-2.0", "dependencies": { "@continuedev/config-yaml": "file:../packages/config-yaml", + "@continuedev/llm-info": "file:../packages/llm-info", "@headlessui/react": "^2.2.0", "@heroicons/react": "^2.0.18", "@reduxjs/toolkit": "^2.3.0", @@ -232,6 +233,15 @@ "zod-to-json-schema": "^3.24.5" } }, + "../packages/llm-info": { + "name": "@continuedev/llm-info", + "version": "1.0.9", + "license": "Apache-2.0", + "devDependencies": { + "@types/node": "^22.15.29", + "typescript": "^5.5.2" + } + }, "node_modules/@adobe/css-tools": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/@adobe/css-tools/-/css-tools-4.4.0.tgz", @@ -576,6 +586,10 @@ "resolved": "../packages/config-yaml", "link": true }, + "node_modules/@continuedev/llm-info": { + "resolved": "../packages/llm-info", + "link": true + }, "node_modules/@emotion/is-prop-valid": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/@emotion/is-prop-valid/-/is-prop-valid-1.3.1.tgz", diff --git a/gui/package.json b/gui/package.json index eb510e87d..bb3f21e11 100644 --- a/gui/package.json +++ b/gui/package.json @@ -17,6 +17,7 @@ }, "dependencies": { "@continuedev/config-yaml": "file:../packages/config-yaml", + "@continuedev/llm-info": "file:../packages/llm-info", "@headlessui/react": "^2.2.0", "@heroicons/react": "^2.0.18", "@reduxjs/toolkit": "^2.3.0", diff --git a/gui/src/components/AddModelButtonSubtext.tsx b/gui/src/components/AddModelButtonSubtext.tsx deleted file mode 100644 index ed4bbda14..000000000 --- a/gui/src/components/AddModelButtonSubtext.tsx +++ /dev/null @@ -1,25 +0,0 @@ -import { useContext } from "react"; -import { ButtonSubtext } from "."; -import { IdeMessengerContext } from "../context/IdeMessenger"; - -function AddModelButtonSubtext() { - const ideMessenger = useContext(IdeMessengerContext); - - return ( - - This will update your{" "} - - ideMessenger.post("config/openProfile", { - profileId: undefined, - }) - } - > - config file - - - ); -} - -export default AddModelButtonSubtext; diff --git a/gui/src/components/Layout.tsx b/gui/src/components/Layout.tsx index b9a81d63d..86bb0cf0d 100644 --- a/gui/src/components/Layout.tsx +++ b/gui/src/components/Layout.tsx @@ -133,7 +133,7 @@ const Layout = () => { useWebviewListener( "openOnboardingCard", async () => { - onboardingCard.open(OnboardingModes.API_KEYS); + onboardingCard.open(OnboardingModes.PROVIDERS); }, [], ); @@ -141,7 +141,7 @@ const Layout = () => { useWebviewListener( "setupLocalConfig", async () => { - onboardingCard.open(OnboardingModes.OLLAMA); + onboardingCard.open(OnboardingModes.LOCAL); }, [], ); diff --git a/gui/src/components/OnboardingCard/OnboardingCard.tsx b/gui/src/components/OnboardingCard/OnboardingCard.tsx index 89e89a0aa..1c0569c80 100644 --- a/gui/src/components/OnboardingCard/OnboardingCard.tsx +++ b/gui/src/components/OnboardingCard/OnboardingCard.tsx @@ -3,10 +3,10 @@ import { useAppSelector } from "../../redux/hooks"; import { getLocalStorage, setLocalStorage } from "../../util/localStorage"; import { ReusableCard } from "../ReusableCard"; import { - OnboardingApiKeyTab, OnboardingCardLanding, OnboardingCardTabs, - OnboardingOllamaTab, + OnboardingLocalTab, + OnboardingProvidersTab, } from "./components"; import { useOnboardingCard } from "./hooks"; @@ -29,12 +29,12 @@ export function OnboardingCard({ isDialog }: OnboardingCardProps) { function renderTabContent() { switch (activeTab) { - case OnboardingModes.API_KEYS: - return ; - case OnboardingModes.OLLAMA: - return ; + case OnboardingModes.PROVIDERS: + return ; + case OnboardingModes.LOCAL: + return ; default: - return ; + return ; } } @@ -58,7 +58,7 @@ export function OnboardingCard({ isDialog }: OnboardingCardProps) { >
setActiveTab(OnboardingModes.API_KEYS)} + onSelectConfigure={() => setActiveTab(OnboardingModes.PROVIDERS)} isDialog={isDialog} />
diff --git a/gui/src/components/OnboardingCard/components/ApiKeySubmitButton.tsx b/gui/src/components/OnboardingCard/components/ApiKeySubmitButton.tsx deleted file mode 100644 index 16b6cc383..000000000 --- a/gui/src/components/OnboardingCard/components/ApiKeySubmitButton.tsx +++ /dev/null @@ -1,43 +0,0 @@ -import { OnboardingModes } from "core/protocol/core"; -import { useContext } from "react"; -import { useDispatch } from "react-redux"; -import { Button, ButtonSubtext } from "../.."; -import { IdeMessengerContext } from "../../../context/IdeMessenger"; -import { useSubmitOnboarding } from "../hooks"; - -interface ApiKeySubmitButtonProps { - isDialog?: boolean; -} - -function ApiKeySubmitButton({ isDialog }: ApiKeySubmitButtonProps) { - const ideMessenger = useContext(IdeMessengerContext); - const dispatch = useDispatch(); - const { submitOnboarding } = useSubmitOnboarding( - OnboardingModes.API_KEYS, - isDialog, - ); - - function onComplete() { - submitOnboarding(); - } - - async function onClick() { - // REMOVED THIS LOGIC TO GET GITHUB TOKEN - // SINCE NOW USES THE HUB FOR FREE TRIAL - // AND COMPONENT IS CURRENTLY UNUSED - } - - return ( -
- - Try 50 chat and 2k autocomplete requests -
- ); -} - -export default ApiKeySubmitButton; diff --git a/gui/src/components/OnboardingCard/components/OnboardingApiKeyTab.tsx b/gui/src/components/OnboardingCard/components/OnboardingApiKeyTab.tsx deleted file mode 100644 index 2f99d2d6e..000000000 --- a/gui/src/components/OnboardingCard/components/OnboardingApiKeyTab.tsx +++ /dev/null @@ -1,34 +0,0 @@ -import { OnboardingModes } from "core/protocol/core"; -import { useContext } from "react"; -import { IdeMessengerContext } from "../../../context/IdeMessenger"; -import { AddModelForm } from "../../../forms"; -import { useSubmitOnboarding } from "../hooks/useSubmitOnboarding"; - -interface OnboardingApiKeyTabProps { - isDialog?: boolean; -} - -export function OnboardingApiKeyTab({ isDialog }: OnboardingApiKeyTabProps) { - const ideMessenger = useContext(IdeMessengerContext); - const { submitOnboarding } = useSubmitOnboarding( - OnboardingModes.API_KEYS, - isDialog, - ); - - const handleSubmit = (models: any[]) => { - // Send the models to core for configuration - ideMessenger.post("completeOnboarding", { - mode: OnboardingModes.API_KEYS, - models, - }); - - // Complete the onboarding flow - submitOnboarding(); - }; - - return ( -
- -
- ); -} diff --git a/gui/src/components/OnboardingCard/components/OnboardingCardLanding.tsx b/gui/src/components/OnboardingCard/components/OnboardingCardLanding.tsx index d6e6b8a19..efef32934 100644 --- a/gui/src/components/OnboardingCard/components/OnboardingCardLanding.tsx +++ b/gui/src/components/OnboardingCard/components/OnboardingCardLanding.tsx @@ -1,6 +1,5 @@ -import { ChevronRightIcon } from "@heroicons/react/24/outline"; import { useContext } from "react"; -import { Button, ButtonSubtext } from "../.."; +import { Button, SecondaryButton } from "../.."; import { useAuth } from "../../../context/Auth"; import { IdeMessengerContext } from "../../../context/IdeMessenger"; import { selectCurrentOrg } from "../../../redux"; @@ -61,7 +60,7 @@ export function OnboardingCardLanding({ ) : ( <> -

+

Log in to access a free trial of the
)} - -

- Or, configure your own models - -
- + + Or, configure your own models +
); } diff --git a/gui/src/components/OnboardingCard/components/OnboardingCardTabs.tsx b/gui/src/components/OnboardingCard/components/OnboardingCardTabs.tsx index 26db153ed..b92a82e40 100644 --- a/gui/src/components/OnboardingCard/components/OnboardingCardTabs.tsx +++ b/gui/src/components/OnboardingCard/components/OnboardingCardTabs.tsx @@ -1,79 +1,64 @@ +import { KeyIcon } from "@heroicons/react/24/outline"; import { OnboardingModes } from "core/protocol/core"; -import styled from "styled-components"; -import { vscForeground } from "../.."; interface OnboardingCardTabsProps { + /** The currently active tab */ activeTab: OnboardingModes; + /** Callback function called when a tab is clicked */ onTabClick: (tabName: OnboardingModes) => void; } -const StyledSelect = styled.select` - width: 100%; - padding: 0.5rem; - background-color: transparent; - color: ${vscForeground}; - border: none; - border-bottom: 1px solid ${vscForeground}; - border-radius: 0; - font-size: 1rem; - cursor: pointer; - display: block; - - &:focus { - outline: none; +const getTabIcon = (tabTitle: OnboardingModes) => { + if (tabTitle === OnboardingModes.PROVIDERS) { + return ; } -`; - -const TabButton = styled.button<{ isActive: boolean }>` - margin-bottom: -1px; - focus: outline-none; - background: transparent; - cursor: pointer; - color: ${vscForeground}; - border: none; - - ${({ isActive }) => - isActive && - ` - border-style: solid; - border-width: 0 0 2.5px 0; - border-color: ${vscForeground}; - font-weight: bold; - `} -`; - -const TabList = styled.div` - border-style: solid; - border-width: 0 0 0.5px 0; - border-color: ${vscForeground}; -`; + if (tabTitle === OnboardingModes.LOCAL) { + return ( + Ollama + ); + } + return null; +}; +/** + * Tab navigation component for onboarding modes with responsive design + */ export function OnboardingCardTabs({ activeTab, onTabClick, }: OnboardingCardTabsProps) { - console.log({ keys: Object.values(OnboardingModes) }); return (
+ {/* Desktop/tablet tabs */}
- +
{Object.values(OnboardingModes).map((tabTitle) => { + const isActive = activeTab === tabTitle; + return ( - onTabClick(tabTitle as OnboardingModes)} data-testid={`onboarding-tab-${tabTitle}`} > -

{tabTitle}

-
+

+ {getTabIcon(tabTitle)} + {tabTitle} +

+ ); })} - +
+
- onTabClick(e.target.value as OnboardingModes)} > @@ -84,7 +69,7 @@ export function OnboardingCardTabs({ ); })} - +
); diff --git a/gui/src/components/OnboardingCard/components/OnboardingOllamaTab.tsx b/gui/src/components/OnboardingCard/components/OnboardingLocalTab.tsx similarity index 68% rename from gui/src/components/OnboardingCard/components/OnboardingOllamaTab.tsx rename to gui/src/components/OnboardingCard/components/OnboardingLocalTab.tsx index e447fe530..797fcbff0 100644 --- a/gui/src/components/OnboardingCard/components/OnboardingOllamaTab.tsx +++ b/gui/src/components/OnboardingCard/components/OnboardingLocalTab.tsx @@ -7,28 +7,27 @@ import { } from "core/config/onboarding"; import { OnboardingModes } from "core/protocol/core"; import { useContext, useEffect, useState } from "react"; -import { Button, ButtonSubtext } from "../.."; +import { Button } from "../.."; import { useAuth } from "../../../context/Auth"; import { IdeMessengerContext } from "../../../context/IdeMessenger"; import { useAppDispatch } from "../../../redux/hooks"; import { setDialogMessage, setShowDialog } from "../../../redux/slices/uiSlice"; import { updateSelectedModelByRole } from "../../../redux/thunks"; -import Alert from "../../gui/Alert"; import { useSubmitOnboarding } from "../hooks"; import OllamaModelDownload from "./OllamaModelDownload"; import { OllamaStatus } from "./OllamaStatus"; const OLLAMA_CHECK_INTERVAL_MS = 3000; -interface OnboardingOllamaTabProps { +interface OnboardingLocalTabProps { isDialog?: boolean; } -export function OnboardingOllamaTab({ isDialog }: OnboardingOllamaTabProps) { +export function OnboardingLocalTab({ isDialog }: OnboardingLocalTabProps) { const dispatch = useAppDispatch(); const ideMessenger = useContext(IdeMessengerContext); const { submitOnboarding } = useSubmitOnboarding( - OnboardingModes.OLLAMA, + OnboardingModes.LOCAL, isDialog, ); const [hasLoadedChatModel, setHasLoadedChatModel] = useState(false); @@ -114,7 +113,7 @@ export function OnboardingOllamaTab({ isDialog }: OnboardingOllamaTabProps) { dispatch(setShowDialog(false)); } - dispatch( + void dispatch( updateSelectedModelByRole({ selectedProfile, role: "chat", @@ -137,45 +136,52 @@ export function OnboardingOllamaTab({ isDialog }: OnboardingOllamaTabProps) { }; return ( -
- Configure Continue to run models locally using Ollama +
+
+
+
+

+ Install Ollama +

+ +
-
-

Install Ollama

- -
+ - + - + - - -
- - - - Skip and configure manually - - +
+ +
+ + Skip and configure manually + +
+
+
); diff --git a/gui/src/components/OnboardingCard/components/OnboardingProvidersTab.tsx b/gui/src/components/OnboardingCard/components/OnboardingProvidersTab.tsx new file mode 100644 index 000000000..3ccff0fa6 --- /dev/null +++ b/gui/src/components/OnboardingCard/components/OnboardingProvidersTab.tsx @@ -0,0 +1,105 @@ +import { OnboardingModes } from "core/protocol/core"; +import { FormProvider, useForm } from "react-hook-form"; +import { providers } from "../../../pages/AddNewModel/configs/providers"; +import { Button, Input } from "../../index"; +import { useSubmitOnboarding } from "../hooks/useSubmitOnboarding"; + +interface OnboardingProvidersTabProps { + /** Whether this is being shown in a dialog context */ + isDialog?: boolean; +} + +export function OnboardingProvidersTab({ + isDialog, +}: OnboardingProvidersTabProps) { + const formMethods = useForm(); + const { submitOnboarding } = useSubmitOnboarding( + OnboardingModes.PROVIDERS, + isDialog, + ); + + const providerConfigs = [ + providers["openai"], + providers["anthropic"], + providers["gemini"], + ]; + + const handleFormSubmit = () => { + // Find the first provider with an API key entered + for (const config of providerConfigs) { + const apiKey = formMethods.watch(`${config?.provider}_apiKey`); + if (apiKey?.trim()) { + submitOnboarding(config?.provider, apiKey); + return; + } + } + }; + + const hasAnyApiKey = providerConfigs.some((config) => { + const apiKey = formMethods.watch(`${config?.provider}_apiKey`); + return apiKey?.trim(); + }); + + return ( +
+
+ +
+
+ {providerConfigs.map((config) => ( +
+ + + + + Click here + {" "} + to create a {config?.title} API key + +
+ ))} +
+ +
+ + +
+ + Click here{" "} + to view more providers + +
+
+
+
+
+
+ ); +} diff --git a/gui/src/components/OnboardingCard/components/index.ts b/gui/src/components/OnboardingCard/components/index.ts index bf7efbfd5..7dcf5e7f6 100644 --- a/gui/src/components/OnboardingCard/components/index.ts +++ b/gui/src/components/OnboardingCard/components/index.ts @@ -1,9 +1,7 @@ -export * from "./ApiKeySubmitButton"; -export * from "./JetBrainsFetchGitHubTokenDialog"; export * from "./OllamaCompletedStep"; export * from "./OllamaModelDownload"; export * from "./OllamaStatus"; -export * from "./OnboardingApiKeyTab"; export * from "./OnboardingCardLanding"; export * from "./OnboardingCardTabs"; -export * from "./OnboardingOllamaTab"; +export * from "./OnboardingLocalTab"; +export * from "./OnboardingProvidersTab"; diff --git a/gui/src/components/OnboardingCard/hooks/useOnboardingCard.ts b/gui/src/components/OnboardingCard/hooks/useOnboardingCard.ts index 388ba8353..264824a98 100644 --- a/gui/src/components/OnboardingCard/hooks/useOnboardingCard.ts +++ b/gui/src/components/OnboardingCard/hooks/useOnboardingCard.ts @@ -43,7 +43,7 @@ export function useOnboardingCard(): UseOnboardingCard { dispatch( setOnboardingCard({ show: true, - activeTab: tab ?? OnboardingModes.API_KEYS, + activeTab: tab ?? OnboardingModes.PROVIDERS, }), ); } diff --git a/gui/src/components/OnboardingCard/hooks/useSubmitOnboarding.ts b/gui/src/components/OnboardingCard/hooks/useSubmitOnboarding.ts index 9e1bd8a9b..da4c1953e 100644 --- a/gui/src/components/OnboardingCard/hooks/useSubmitOnboarding.ts +++ b/gui/src/components/OnboardingCard/hooks/useSubmitOnboarding.ts @@ -10,13 +10,16 @@ export function useSubmitOnboarding(mode: OnboardingModes, isDialog = false) { const ideMessenger = useContext(IdeMessengerContext); const { close: closeOnboardingCard } = useOnboardingCard(); - function submitOnboarding() { + function submitOnboarding(provider?: string, apiKey?: string) { const onboardingStatus = getLocalStorage("onboardingStatus"); - // Always close the onboarding card and update config.json + // Always close the onboarding card and update config.yaml closeOnboardingCard(isDialog); - ideMessenger.post("completeOnboarding", { + + ideMessenger.post("onboarding/complete", { mode, + provider, + apiKey, }); if (onboardingStatus === "Started") { @@ -32,6 +35,8 @@ export function useSubmitOnboarding(mode: OnboardingModes, isDialog = false) { // Move to next step in onboarding ideMessenger.post("showTutorial", undefined); } + + ideMessenger.post("config/openProfile", { profileId: undefined }); } return { diff --git a/gui/src/components/OnboardingCard/utils.ts b/gui/src/components/OnboardingCard/utils.ts index 45822ead4..690444097 100644 --- a/gui/src/components/OnboardingCard/utils.ts +++ b/gui/src/components/OnboardingCard/utils.ts @@ -20,7 +20,7 @@ export function isNewUserOnboarding() { export const defaultOnboardingCardState: OnboardingCardState = { show: false, - activeTab: OnboardingModes.API_KEYS, + activeTab: OnboardingModes.PROVIDERS, }; export enum OllamaConnectionStatuses { diff --git a/gui/src/components/modelSelection/ModelSelectionListbox.tsx b/gui/src/components/modelSelection/ModelSelectionListbox.tsx index aa61e18f5..04510b6bb 100644 --- a/gui/src/components/modelSelection/ModelSelectionListbox.tsx +++ b/gui/src/components/modelSelection/ModelSelectionListbox.tsx @@ -4,16 +4,6 @@ import { CubeIcon, } from "@heroicons/react/24/outline"; import { Fragment } from "react"; -import styled from "styled-components"; -import { - defaultBorderRadius, - lightGray, - vscBackground, - vscForeground, - vscInputBackground, - vscListActiveBackground, - vscListActiveForeground, -} from ".."; import { Listbox, ListboxButton, @@ -23,87 +13,8 @@ import { } from "../../components/ui"; import { DisplayInfo } from "../../pages/AddNewModel/configs/models"; -export const StyledListbox = styled(Listbox)` - background-color: ${vscBackground}; -`; - -export const StyledListboxButton = styled(ListboxButton)` - cursor: pointer; - background-color: ${vscBackground}; - text-align: left; - - padding-left: 0.75rem; - padding-right: 2.5rem; - padding-top: 0.5rem; - padding-bottom: 0.5rem; - - border-radius: 0.5em; - border: 1px solid ${lightGray}; - - margin: 0; - height: 100%; - width: 100%; - - position: relative; - - display: grid; - grid-template-columns: 1fr auto; - align-items: center; - - color: ${vscForeground}; - - &:focus { - outline: none; - } - - &:hover { - background-color: ${vscInputBackground}; - } -`; - -export const StyledListboxOptions = styled(ListboxOptions)` - background-color: ${vscInputBackground}; - padding: 0; - - position: absolute; - top: 100%; - left: 0; - - margin-top: 0.25rem; - - height: fit-content; - max-height: 15rem; - width: 60%; - - border-radius: ${defaultBorderRadius}; - overflow-y: auto; - z-index: 10; - - &:focus { - outline: none; - } -`; - -export const StyledListboxOption = styled(ListboxOption)<{ - selected: boolean; -}>` - background-color: ${({ selected }) => - selected ? vscListActiveBackground : vscInputBackground}; - cursor: pointer; - padding: 6px 8px 6px 12px; - - display: flex; - gap: 8px; - align-items: center; - justify-content: space-between; - - &:hover { - background-color: ${vscListActiveBackground}; - color: ${vscListActiveForeground}; - } -`; - interface ModelSelectionListboxProps { + /** Model selection listbox for choosing AI providers */ selectedProvider: DisplayInfo; setSelectedProvider: (val: DisplayInfo) => void; topOptions?: DisplayInfo[]; @@ -117,9 +28,9 @@ function ModelSelectionListbox({ otherOptions = [], }: ModelSelectionListboxProps) { return ( - +
- + {window.vscMediaUrl && selectedProvider.icon && ( - + + - + {topOptions.length > 0 && (
+
+ Popular +
{topOptions.map((option, index) => ( - + ` ${selected ? "bg-list-active" : "bg-input"} hover:bg-list-active hover:text-list-active-foreground relative flex cursor-default cursor-pointer select-none items-center justify-between gap-2 p-1.5 px-3 py-2 pr-4` + } value={option} > {({ selected }) => ( @@ -173,22 +89,24 @@ function ModelSelectionListbox({ )} )} - + ))}
)} - {topOptions.length > 0 && otherOptions.length > 0 && (
)} - {otherOptions.length > 0 && (
+
+ Additional providers +
{otherOptions.map((option, index) => ( - + ` ${selected ? "bg-list-active" : "bg-input"} hover:bg-list-active hover:text-list-active-foreground relative flex cursor-default cursor-pointer select-none items-center justify-between gap-2 p-1.5 px-3 py-2 pr-4` + } value={option} > {({ selected }) => ( @@ -213,14 +131,14 @@ function ModelSelectionListbox({ )} )} - + ))}
)} - +
- + ); } diff --git a/gui/src/forms/AddModelForm.tsx b/gui/src/forms/AddModelForm.tsx index df2751acd..e6145b263 100644 --- a/gui/src/forms/AddModelForm.tsx +++ b/gui/src/forms/AddModelForm.tsx @@ -1,18 +1,7 @@ -import { - ArrowTopRightOnSquareIcon, - PlusCircleIcon, - XCircleIcon, -} from "@heroicons/react/24/outline"; -import { useContext } from "react"; -import { FormProvider, useFieldArray, useForm } from "react-hook-form"; -import { - Button, - GhostButton, - Input, - SecondaryButton, - StyledActionButton, -} from "../components"; -import AddModelButtonSubtext from "../components/AddModelButtonSubtext"; +import { ArrowTopRightOnSquareIcon } from "@heroicons/react/24/outline"; +import { useContext, useEffect, useState } from "react"; +import { FormProvider, useForm } from "react-hook-form"; +import { Button, Input, StyledActionButton } from "../components"; import Alert from "../components/gui/Alert"; import ModelSelectionListbox from "../components/modelSelection/ModelSelectionListbox"; import { useAuth } from "../context/Auth"; @@ -26,9 +15,8 @@ import { import { useAppDispatch } from "../redux/hooks"; import { updateSelectedModelByRole } from "../redux/thunks"; -interface QuickModelSetupProps { - onDone?: () => void; - onSubmit?: (models: any[]) => void; +interface AddModelFormProps { + onDone: () => void; hideFreeTrialLimitMessage?: boolean; } @@ -37,41 +25,19 @@ const MODEL_PROVIDERS_URL = const CODESTRAL_URL = "https://console.mistral.ai/codestral"; const CONTINUE_SETUP_URL = "https://docs.continue.dev/setup/overview"; -interface ProviderFormData { - provider: ProviderInfo; - apiKey?: string; - selectedModels: string[]; - [key: string]: any; -} - -interface FormData { - providers: ProviderFormData[]; -} - export function AddModelForm({ onDone, - onSubmit: onSubmitProp, hideFreeTrialLimitMessage, -}: QuickModelSetupProps) { +}: AddModelFormProps) { + const [selectedProvider, setSelectedProvider] = useState( + providers["openai"]!, + ); const dispatch = useAppDispatch(); const { selectedProfile } = useAuth(); - - const formMethods = useForm({ - defaultValues: { - providers: [ - { - provider: providers["openai"]!, - selectedModels: [], - }, - ], - }, - }); - - const { fields, append, remove } = useFieldArray({ - control: formMethods.control, - name: "providers", - }); - + const [selectedModel, setSelectedModel] = useState( + selectedProvider.packages[0], + ); + const formMethods = useForm(); const ideMessenger = useContext(IdeMessengerContext); const popularProviderTitles = [ @@ -81,14 +47,13 @@ export function AddModelForm({ providers["gemini"]?.title || "", providers["azure"]?.title || "", providers["ollama"]?.title || "", - providers["deepseek"]?.title || "", ]; const allProviders = Object.entries(providers) .filter(([key]) => !["openai-aiohttp"].includes(key)) .map(([, provider]) => provider) .filter((provider) => !!provider) - .map((provider) => provider!); + .map((provider) => provider!); // for type checking const popularProviders = allProviders .filter((provider) => popularProviderTitles.includes(provider.title)) @@ -98,6 +63,12 @@ export function AddModelForm({ .filter((provider) => !popularProviderTitles.includes(provider.title)) .sort((a, b) => a.title.localeCompare(b.title)); + const selectedProviderApiKeyUrl = selectedModel.params.model.startsWith( + "codestral", + ) + ? CODESTRAL_URL + : selectedProvider.apiKeyUrl; + function isDisabled() { if (selectedProvider.downloadUrl) { return false; @@ -110,86 +81,51 @@ export function AddModelForm({ return value; }); - if ( - !required?.every((value) => value !== undefined && value.length > 0) - ) { - return true; - } - } - } - - return false; + return !required?.every((value) => value !== undefined && value.length > 0); } + useEffect(() => { + setSelectedModel(selectedProvider.packages[0]); + }, [selectedProvider]); + function onSubmit() { - const providersData = formMethods.watch("providers"); - const models: any[] = []; + const apiKey = formMethods.watch("apiKey"); + const hasValidApiKey = apiKey !== undefined && apiKey !== ""; - providersData.forEach((providerData) => { - const selectedProvider = providerData.provider; + const reqInputFields: Record = {}; + for (let input of selectedProvider.collectInputFor ?? []) { + reqInputFields[input.key] = formMethods.watch(input.key); + } - providerData.selectedModels.forEach((modelTitle) => { - const modelPackage = selectedProvider.packages.find( - (pkg) => pkg.title === modelTitle, - ); + const model = { + ...selectedProvider.params, + ...selectedModel.params, + ...reqInputFields, + provider: selectedProvider.provider, + title: selectedModel.title, + ...(hasValidApiKey ? { apiKey } : {}), + }; - if (modelPackage) { - const apiKey = providerData.apiKey; - const hasValidApiKey = apiKey !== undefined && apiKey !== ""; - const reqInputFields: Record = {}; + ideMessenger.post("config/addModel", { model }); - for (let input of selectedProvider.collectInputFor ?? []) { - if (input.key !== "apiKey") { - reqInputFields[input.key] = (providerData as any)[input.key]; - } - } - - const model = { - ...selectedProvider.params, - ...modelPackage.params, - ...reqInputFields, - provider: selectedProvider.provider, - title: modelPackage.title, - ...(hasValidApiKey ? { apiKey } : {}), - }; - - models.push(model); - } - }); + ideMessenger.post("config/openProfile", { + profileId: "local", }); - if (onSubmitProp) { - onSubmitProp(models); - } else { - models.forEach((model) => { - ideMessenger.post("config/addModel", { model }); - }); + void dispatch( + updateSelectedModelByRole({ + selectedProfile, + role: "chat", + modelTitle: model.title, + }), + ); - ideMessenger.post("config/openProfile", { - profileId: "local", - }); - - if (models.length > 0) { - void dispatch( - updateSelectedModelByRole({ - selectedProfile, - role: "chat", - modelTitle: models[0].title, - }), - ); - } - } - - if (onDone) { - onDone(); - } + onDone(); } - function addProvider() { - append({ - provider: providers["openai"]!, - selectedModels: [], - }); + function onClickDownloadProvider() { + selectedProvider.downloadUrl && + ideMessenger.post("openUrl", selectedProvider.downloadUrl); } return ( @@ -197,6 +133,7 @@ export function AddModelForm({

Add Chat model

+ {/* TODO sync free trial limit with hub */} {/* {!hideFreeTrialLimitMessage && hasPassedFTL() && (

@@ -213,221 +150,172 @@ export function AddModelForm({

)} */} -
- {fields.map((field, index) => { - const selectedProvider = formMethods.watch( - `providers.${index}.provider`, - ); - const selectedModels = - formMethods.watch(`providers.${index}.selectedModels`) || []; - - const selectedProviderApiKeyUrl = selectedProvider.packages.some( - (pkg) => pkg.params.model?.startsWith("codestral"), - ) - ? CODESTRAL_URL - : selectedProvider.apiKeyUrl; - - return ( -
+
+ + { + const match = [...popularProviders, ...otherProviders].find( + (provider) => provider.title === val.title, + ); + if (match) { + setSelectedProvider(match); + } + }} + topOptions={popularProviders} + otherOptions={otherProviders} + /> + + Don't see your provider?{" "} + + ideMessenger.post("openUrl", MODEL_PROVIDERS_URL) + } > -
- - {fields.length > 1 && ( - remove(index)} - className="text-description-muted" - > - - - )} -
+ Click here +
{" "} + to view the full list +
+
-
-
- - { - const match = [ - ...popularProviders, - ...otherProviders, - ].find((provider) => provider.title === val.title); - if (match) { - formMethods.setValue( - `providers.${index}.provider`, - match, - ); - formMethods.setValue( - `providers.${index}.selectedModels`, - [], - ); - } - }} - topOptions={popularProviders} - otherOptions={otherProviders} + {selectedProvider.downloadUrl && ( +
+ + +

+ {selectedProvider.downloadUrl} +

+ +
+
+ )} + +
+ + { + const options = + Object.entries(providers).find( + ([, provider]) => + provider?.title === selectedProvider.title, + )?.[1]?.packages ?? []; + const match = options.find( + (option) => option.title === val.title, + ); + if (match) { + setSelectedModel(match); + } + }} + otherOptions={ + Object.entries(providers).find( + ([, provider]) => + provider?.title === selectedProvider.title, + )?.[1]?.packages + } + /> +
+ + {selectedModel.params.model.startsWith("codestral") && ( +
+ +

Codestral API key

+

+ Note that codestral requires a different API key from other + Mistral models +

+
+
+ )} + + {selectedProvider.apiKeyUrl && ( + + )} + + {selectedProvider.collectInputFor && + selectedProvider.collectInputFor + .filter( + (field) => + !Object.values(completionParamsInputs).some( + (input) => input.key === field.key, + ) && + field.required && + field.key !== "apiKey", + ) + .map((field) => ( +
+ <> + + -
- - {selectedProvider.downloadUrl && ( -
- - { - selectedProvider.downloadUrl && - ideMessenger.post( - "openUrl", - selectedProvider.downloadUrl, - ); - }} - > -

- {selectedProvider.downloadUrl} -

- -
-
- )} - - {selectedProvider.packages.some((pkg) => - pkg.params.model?.startsWith("codestral"), - ) && ( -
- -

- Codestral API key -

-

- Note that codestral requires a different API key - from other Mistral models -

-
-
- )} - - {selectedProvider.apiKeyUrl && ( - - )} - - {selectedProvider.collectInputFor && - selectedProvider.collectInputFor - .filter( - (field) => - !Object.values(completionParamsInputs).some( - (input) => input.key === field.key, - ) && - field.required && - field.key !== "apiKey", - ) - .map((field) => ( -
- - -
- ))} - -
- -
- {selectedProvider.packages.map((model) => ( -
- { - const currentSelected = selectedModels; - if (e.target.checked) { - formMethods.setValue( - `providers.${index}.selectedModels`, - [...currentSelected, model.title], - ); - } else { - formMethods.setValue( - `providers.${index}.selectedModels`, - currentSelected.filter( - (m) => m !== model.title, - ), - ); - } - }} - className="mr-2" - /> - -
- ))} -
-
+
-
- ); - })} - - - - Add another provider - + ))}
- + + + This will update your{" "} + + ideMessenger.post("config/openProfile", { + profileId: undefined, + }) + } + > + config file + +
); } + +export default AddModelForm; diff --git a/gui/src/pages/gui/Chat.tsx b/gui/src/pages/gui/Chat.tsx index d82c8a19a..88d9f5843 100644 --- a/gui/src/pages/gui/Chat.tsx +++ b/gui/src/pages/gui/Chat.tsx @@ -204,7 +204,7 @@ export function Chat() { // Card in chat will only show if no history // Also, note that platform card ignore the "Best", always opens to main tab - onboardingCard.open(OnboardingModes.API_KEYS); + onboardingCard.open(OnboardingModes.PROVIDERS); // // If history, show the dialog, which will automatically close if there is not history // if (history.length) { diff --git a/gui/src/util/providers.ts b/gui/src/util/providers.ts new file mode 100644 index 000000000..f32103724 --- /dev/null +++ b/gui/src/util/providers.ts @@ -0,0 +1,29 @@ +import { providers } from "../pages/AddNewModel/configs/providers"; + +export const popularProviderTitles = [ + providers["openai"]?.title || "", + providers["anthropic"]?.title || "", + providers["mistral"]?.title || "", + providers["gemini"]?.title || "", + providers["azure"]?.title || "", + providers["ollama"]?.title || "", + providers["deepseek"]?.title || "", +].filter(Boolean); + +export const getSortedProviders = () => { + const allProviders = Object.entries(providers) + .filter(([key]) => !["freetrial", "openai-aiohttp"].includes(key)) + .map(([, provider]) => provider) + .filter((provider) => !!provider) + .map((provider) => provider!); + + const popularProviders = allProviders + .filter((provider) => popularProviderTitles.includes(provider.title)) + .sort((a, b) => a.title.localeCompare(b.title)); + + const otherProviders = allProviders + .filter((provider) => !popularProviderTitles.includes(provider.title)) + .sort((a, b) => a.title.localeCompare(b.title)); + + return { popularProviders, otherProviders }; +}; diff --git a/packages/llm-info/src/index.ts b/packages/llm-info/src/index.ts index fe71f419d..dbbd7b96d 100644 --- a/packages/llm-info/src/index.ts +++ b/packages/llm-info/src/index.ts @@ -38,3 +38,5 @@ export function findLlmInfo(model: string): LlmInfo | undefined { export function getAllRecommendedFor(useCase: UseCase): LlmInfo[] { return allLlms.filter((llm) => llm.recommendedFor?.includes(useCase)); } + +export { Anthropic, Gemini, OpenAi }; diff --git a/packages/llm-info/tsconfig.json b/packages/llm-info/tsconfig.json index f21949f4b..fe4304611 100644 --- a/packages/llm-info/tsconfig.json +++ b/packages/llm-info/tsconfig.json @@ -16,8 +16,8 @@ "noEmitOnError": false, "types": ["node"], "outDir": "dist", - "declaration": true - // "sourceMap": true + "declaration": true, + "sourceMap": true }, "include": ["src/**/*"] } From f77f662c6e7313db645656e003c9d0145646388e Mon Sep 17 00:00:00 2001 From: Patrick Erichsen Date: Sun, 8 Jun 2025 11:08:58 -0700 Subject: [PATCH 102/118] feat: open lump on submit onboarding --- docs/docs/customize/model-roles/apply.mdx | 6 + gui/package-lock.json | 8 +- gui/package.json | 3 +- gui/src/components/Layout.tsx | 5 +- .../components/OnboardingProvidersTab.tsx | 25 ++- .../hooks/useSubmitOnboarding.ts | 3 + gui/src/components/OnboardingCard/utils.ts | 5 + .../mainInput/Lump/sections/ModelsSection.tsx | 8 +- .../components/modelSelection/ModelSelect.tsx | 18 +- gui/src/pages/config/ModelRoleSelector.tsx | 181 ++++++++++-------- 10 files changed, 156 insertions(+), 106 deletions(-) diff --git a/docs/docs/customize/model-roles/apply.mdx b/docs/docs/customize/model-roles/apply.mdx index 6cce4acbc..f4e35ce05 100644 --- a/docs/docs/customize/model-roles/apply.mdx +++ b/docs/docs/customize/model-roles/apply.mdx @@ -1,3 +1,9 @@ +--- +title: Apply Role +description: Apply model role +keywords: [apply, model, role] +--- + When editing code, Chat and Edit model output often doesn't clearly align with existing code. A model with the `apply` role is used to generate a more precise diff to apply changes to a file. ## Recommended Apply models diff --git a/gui/package-lock.json b/gui/package-lock.json index 87b96c1ab..a985e6c29 100644 --- a/gui/package-lock.json +++ b/gui/package-lock.json @@ -8,7 +8,6 @@ "license": "Apache-2.0", "dependencies": { "@continuedev/config-yaml": "file:../packages/config-yaml", - "@continuedev/llm-info": "file:../packages/llm-info", "@headlessui/react": "^2.2.0", "@heroicons/react": "^2.0.18", "@reduxjs/toolkit": "^2.3.0", @@ -39,7 +38,7 @@ "react": "^18.2.0", "react-dom": "^18.2.0", "react-error-boundary": "^4.0.11", - "react-hook-form": "^7.57.0", + "react-hook-form": "^7.47.0", "react-intersection-observer": "^9.13.1", "react-markdown": "^9.0.1", "react-redux": "^8.0.5", @@ -236,6 +235,7 @@ "../packages/llm-info": { "name": "@continuedev/llm-info", "version": "1.0.9", + "extraneous": true, "license": "Apache-2.0", "devDependencies": { "@types/node": "^22.15.29", @@ -586,10 +586,6 @@ "resolved": "../packages/config-yaml", "link": true }, - "node_modules/@continuedev/llm-info": { - "resolved": "../packages/llm-info", - "link": true - }, "node_modules/@emotion/is-prop-valid": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/@emotion/is-prop-valid/-/is-prop-valid-1.3.1.tgz", diff --git a/gui/package.json b/gui/package.json index bb3f21e11..de6da1959 100644 --- a/gui/package.json +++ b/gui/package.json @@ -17,7 +17,6 @@ }, "dependencies": { "@continuedev/config-yaml": "file:../packages/config-yaml", - "@continuedev/llm-info": "file:../packages/llm-info", "@headlessui/react": "^2.2.0", "@heroicons/react": "^2.0.18", "@reduxjs/toolkit": "^2.3.0", @@ -48,7 +47,7 @@ "react": "^18.2.0", "react-dom": "^18.2.0", "react-error-boundary": "^4.0.11", - "react-hook-form": "^7.57.0", + "react-hook-form": "^7.47.0", "react-intersection-observer": "^9.13.1", "react-markdown": "^9.0.1", "react-redux": "^8.0.5", diff --git a/gui/src/components/Layout.tsx b/gui/src/components/Layout.tsx index 86bb0cf0d..811297e81 100644 --- a/gui/src/components/Layout.tsx +++ b/gui/src/components/Layout.tsx @@ -14,14 +14,13 @@ import { enterEdit, exitEdit } from "../redux/thunks/edit"; import { saveCurrentSession } from "../redux/thunks/session"; import { fontSize, isMetaEquivalentKeyPressed } from "../util"; import { incrementFreeTrialCount } from "../util/freeTrial"; -import { getLocalStorage } from "../util/localStorage"; import { ROUTES } from "../util/navigation"; import { FatalErrorIndicator } from "./config/FatalErrorNotice"; import TextDialog from "./dialogs"; import Footer from "./Footer"; import { LumpProvider } from "./mainInput/Lump/LumpContext"; import { useMainEditor } from "./mainInput/TipTapEditor"; -import { useOnboardingCard } from "./OnboardingCard"; +import { isNewUserOnboarding, useOnboardingCard } from "./OnboardingCard"; import OSRContextMenu from "./OSRContextMenu"; import PostHogPageView from "./PosthogPageView"; @@ -197,7 +196,7 @@ const Layout = () => { useEffect(() => { if ( - !getLocalStorage("onboardingStatus") && + isNewUserOnboarding() && (location.pathname === "/" || location.pathname === "/index.html") ) { onboardingCard.open(); diff --git a/gui/src/components/OnboardingCard/components/OnboardingProvidersTab.tsx b/gui/src/components/OnboardingCard/components/OnboardingProvidersTab.tsx index 3ccff0fa6..348acd475 100644 --- a/gui/src/components/OnboardingCard/components/OnboardingProvidersTab.tsx +++ b/gui/src/components/OnboardingCard/components/OnboardingProvidersTab.tsx @@ -1,6 +1,9 @@ import { OnboardingModes } from "core/protocol/core"; import { FormProvider, useForm } from "react-hook-form"; +import { AddModelForm } from "../../../forms"; import { providers } from "../../../pages/AddNewModel/configs/providers"; +import { useAppDispatch } from "../../../redux/hooks"; +import { setDialogMessage, setShowDialog } from "../../../redux/slices/uiSlice"; import { Button, Input } from "../../index"; import { useSubmitOnboarding } from "../hooks/useSubmitOnboarding"; @@ -13,6 +16,7 @@ export function OnboardingProvidersTab({ isDialog, }: OnboardingProvidersTabProps) { const formMethods = useForm(); + const dispatch = useAppDispatch(); const { submitOnboarding } = useSubmitOnboarding( OnboardingModes.PROVIDERS, isDialog, @@ -35,6 +39,20 @@ export function OnboardingProvidersTab({ } }; + const handleClickMoreProviders = () => { + dispatch(setShowDialog(true)); + dispatch( + setDialogMessage( + { + dispatch(setShowDialog(false)); + submitOnboarding(); + }} + />, + ), + ); + }; + const hasAnyApiKey = providerConfigs.some((config) => { const apiKey = formMethods.watch(`${config?.provider}_apiKey`); return apiKey?.trim(); @@ -92,7 +110,12 @@ export function OnboardingProvidersTab({
- Click here{" "} + + Click here + {" "} to view more providers
diff --git a/gui/src/components/OnboardingCard/hooks/useSubmitOnboarding.ts b/gui/src/components/OnboardingCard/hooks/useSubmitOnboarding.ts index da4c1953e..259dd6392 100644 --- a/gui/src/components/OnboardingCard/hooks/useSubmitOnboarding.ts +++ b/gui/src/components/OnboardingCard/hooks/useSubmitOnboarding.ts @@ -3,12 +3,14 @@ import { usePostHog } from "posthog-js/react"; import { useContext } from "react"; import { IdeMessengerContext } from "../../../context/IdeMessenger"; import { getLocalStorage, setLocalStorage } from "../../../util/localStorage"; +import { useLump } from "../../mainInput/Lump/LumpContext"; import { useOnboardingCard } from "./useOnboardingCard"; export function useSubmitOnboarding(mode: OnboardingModes, isDialog = false) { const posthog = usePostHog(); const ideMessenger = useContext(IdeMessengerContext); const { close: closeOnboardingCard } = useOnboardingCard(); + const { setSelectedSection } = useLump(); function submitOnboarding(provider?: string, apiKey?: string) { const onboardingStatus = getLocalStorage("onboardingStatus"); @@ -37,6 +39,7 @@ export function useSubmitOnboarding(mode: OnboardingModes, isDialog = false) { } ideMessenger.post("config/openProfile", { profileId: undefined }); + setSelectedSection("models"); } return { diff --git a/gui/src/components/OnboardingCard/utils.ts b/gui/src/components/OnboardingCard/utils.ts index 690444097..dbd805210 100644 --- a/gui/src/components/OnboardingCard/utils.ts +++ b/gui/src/components/OnboardingCard/utils.ts @@ -2,9 +2,14 @@ import { OnboardingModes } from "core/protocol/core"; import { getLocalStorage, setLocalStorage } from "../../util/localStorage"; import { OnboardingCardState } from "./OnboardingCard"; +// Note that there is no "NotStarted" status since the +// local storage value is null until onboarding begins export type OnboardingStatus = "Started" | "Completed"; +// If there is no value in local storage for "onboardingStatus", +// it implies that the user has not begun or completed onboarding. export function isNewUserOnboarding() { + // We used to use "onboardingComplete", but switched to "onboardingStatus" const onboardingCompleteLegacyValue = localStorage.getItem("onboardingComplete"); diff --git a/gui/src/components/mainInput/Lump/sections/ModelsSection.tsx b/gui/src/components/mainInput/Lump/sections/ModelsSection.tsx index b128db0a2..becf95cfd 100644 --- a/gui/src/components/mainInput/Lump/sections/ModelsSection.tsx +++ b/gui/src/components/mainInput/Lump/sections/ModelsSection.tsx @@ -19,7 +19,7 @@ export function ModelsSection() { return; } - dispatch( + void dispatch( updateSelectedModelByRole({ role, selectedProfile, @@ -37,6 +37,7 @@ export function ModelsSection() { models={config.modelsByRole.chat} selectedModel={config.selectedModelByRole.chat} onSelect={(model) => handleRoleUpdate("chat", model)} + setupURL="https://docs.continue.dev/chat/model-setup" /> handleRoleUpdate("autocomplete", model)} + setupURL="https://docs.continue.dev/autocomplete/model-setup" /> {/* Jetbrains has a model selector inline */} {!jetbrains && ( @@ -53,6 +55,7 @@ export function ModelsSection() { models={config.modelsByRole.edit} selectedModel={config.selectedModelByRole.edit} onSelect={(model) => handleRoleUpdate("edit", model)} + setupURL="https://docs.continue.dev/edit/model-setup" /> )} handleRoleUpdate("apply", model)} + setupURL="https://docs.continue.dev/customize/model-roles/apply" /> handleRoleUpdate("embed", model)} + setupURL="https://docs.continue.dev/customize/model-roles/embeddings" /> handleRoleUpdate("rerank", model)} + setupURL="https://docs.continue.dev/customize/model-roles/reranking" />
diff --git a/gui/src/components/modelSelection/ModelSelect.tsx b/gui/src/components/modelSelection/ModelSelect.tsx index 15a979668..c6f946b89 100644 --- a/gui/src/components/modelSelection/ModelSelect.tsx +++ b/gui/src/components/modelSelection/ModelSelect.tsx @@ -232,8 +232,8 @@ function ModelSelect() {
{isConfigLoading ? ( -
- +
+ Loading config
) : hasNoModels ? ( @@ -272,12 +272,14 @@ function ModelSelect() { )} -
- {getMetaKeyLabel()}' to toggle model -
+ {!isConfigLoading && ( +
+ {getMetaKeyLabel()}' to toggle model +
+ )}
diff --git a/gui/src/pages/config/ModelRoleSelector.tsx b/gui/src/pages/config/ModelRoleSelector.tsx index 2214853a4..25fb7b358 100644 --- a/gui/src/pages/config/ModelRoleSelector.tsx +++ b/gui/src/pages/config/ModelRoleSelector.tsx @@ -26,6 +26,7 @@ interface ModelRoleSelectorProps { onSelect: (model: ModelDescription | null) => void; displayName: string; description: string; + setupURL: string; } const ModelRoleSelector = ({ @@ -34,6 +35,7 @@ const ModelRoleSelector = ({ onSelect, displayName, description, + setupURL, }: ModelRoleSelectorProps) => { const ideMessenger = useContext(IdeMessengerContext); const [hoveredIdx, setHoveredIdx] = useState(null); @@ -65,102 +67,111 @@ const ModelRoleSelector = ({ return ( <>
- - {displayName} - + {displayName} {description}
+
- - {models.length === 0 || noConfiguredModels ? ( - - {`No ${models.length === 0 ? "" : "valid "}${displayName} models${ - ["Chat", "Apply", "Edit"].includes(displayName) - ? ". Using Chat model" - : "" - }`} - - ) : ( - - {selectedModel?.title ?? `Select ${displayName} model`} - - )} - {models.length ? ( -
-
- ) : null} -
- - - ideMessenger.post("openUrl", setupURL)} + className="bg-vsc-editor-background hover:bg-list-active hover:text-list-active-foreground text-description w-full justify-between px-2 py-1 underline hover:underline" > - {[...models] - .sort((a, b) => a.title.localeCompare(b.title)) - .map((option, idx) => { - const showMissingApiKeyMsg = - option.configurationStatus === - LLMConfigurationStatuses.MISSING_API_KEY; + + Setup a {displayName} model + + + ) : ( + <> + + {models.length === 0 || noConfiguredModels ? ( + + {`No ${models.length === 0 ? "" : "valid "}${displayName} models${ + ["Chat", "Apply", "Edit"].includes(displayName) + ? ". Using Chat model" + : "" + }`} + + ) : ( + + {selectedModel?.title ?? `Select ${displayName} model`} + + )} - return ( - setHoveredIdx(idx)} - onMouseLeave={() => setHoveredIdx(null)} - onClick={(e: any) => - handleOptionClick(showMissingApiKeyMsg, e) - } - className={""} - > -
-
-
- - - {option.title} - {showMissingApiKeyMsg && ( - - (Missing API key) + {models.length > 0 && ( +
+
+ )} + + + + {[...models] + .sort((a, b) => a.title.localeCompare(b.title)) + .map((option, idx) => { + const showMissingApiKeyMsg = + option.configurationStatus === + LLMConfigurationStatuses.MISSING_API_KEY; + + return ( + setHoveredIdx(idx)} + onMouseLeave={() => setHoveredIdx(null)} + onClick={(e: any) => + handleOptionClick(showMissingApiKeyMsg, e) + } + className="" + > +
+
+
+ + + {option.title} + {showMissingApiKeyMsg && ( + + (Missing API key) + + )} - )} - +
+ +
+ {hoveredIdx === idx && ( + + )} + {option.title === selectedModel?.title && ( + + )} +
+
-
- {hoveredIdx === idx && ( - - )} - {option.title === selectedModel?.title && ( - - )} -
-
-
- - ); - })} - - + + ); + })} + + + + )}
From 6c294e76834561848305ac8fb6bcb707ea21b172 Mon Sep 17 00:00:00 2001 From: Patrick Erichsen Date: Sun, 8 Jun 2025 11:13:54 -0700 Subject: [PATCH 103/118] feat: more cleanup --- .../components/OnboardingCardTabs.tsx | 1 - gui/src/util/providers.ts | 29 ------------------- packages/llm-info/src/index.ts | 2 -- packages/llm-info/tsconfig.json | 4 +-- 4 files changed, 2 insertions(+), 34 deletions(-) delete mode 100644 gui/src/util/providers.ts diff --git a/gui/src/components/OnboardingCard/components/OnboardingCardTabs.tsx b/gui/src/components/OnboardingCard/components/OnboardingCardTabs.tsx index b92a82e40..07de1e42e 100644 --- a/gui/src/components/OnboardingCard/components/OnboardingCardTabs.tsx +++ b/gui/src/components/OnboardingCard/components/OnboardingCardTabs.tsx @@ -33,7 +33,6 @@ export function OnboardingCardTabs({ }: OnboardingCardTabsProps) { return (
- {/* Desktop/tablet tabs */}
{Object.values(OnboardingModes).map((tabTitle) => { diff --git a/gui/src/util/providers.ts b/gui/src/util/providers.ts deleted file mode 100644 index f32103724..000000000 --- a/gui/src/util/providers.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { providers } from "../pages/AddNewModel/configs/providers"; - -export const popularProviderTitles = [ - providers["openai"]?.title || "", - providers["anthropic"]?.title || "", - providers["mistral"]?.title || "", - providers["gemini"]?.title || "", - providers["azure"]?.title || "", - providers["ollama"]?.title || "", - providers["deepseek"]?.title || "", -].filter(Boolean); - -export const getSortedProviders = () => { - const allProviders = Object.entries(providers) - .filter(([key]) => !["freetrial", "openai-aiohttp"].includes(key)) - .map(([, provider]) => provider) - .filter((provider) => !!provider) - .map((provider) => provider!); - - const popularProviders = allProviders - .filter((provider) => popularProviderTitles.includes(provider.title)) - .sort((a, b) => a.title.localeCompare(b.title)); - - const otherProviders = allProviders - .filter((provider) => !popularProviderTitles.includes(provider.title)) - .sort((a, b) => a.title.localeCompare(b.title)); - - return { popularProviders, otherProviders }; -}; diff --git a/packages/llm-info/src/index.ts b/packages/llm-info/src/index.ts index dbbd7b96d..fe71f419d 100644 --- a/packages/llm-info/src/index.ts +++ b/packages/llm-info/src/index.ts @@ -38,5 +38,3 @@ export function findLlmInfo(model: string): LlmInfo | undefined { export function getAllRecommendedFor(useCase: UseCase): LlmInfo[] { return allLlms.filter((llm) => llm.recommendedFor?.includes(useCase)); } - -export { Anthropic, Gemini, OpenAi }; diff --git a/packages/llm-info/tsconfig.json b/packages/llm-info/tsconfig.json index fe4304611..f21949f4b 100644 --- a/packages/llm-info/tsconfig.json +++ b/packages/llm-info/tsconfig.json @@ -16,8 +16,8 @@ "noEmitOnError": false, "types": ["node"], "outDir": "dist", - "declaration": true, - "sourceMap": true + "declaration": true + // "sourceMap": true }, "include": ["src/**/*"] } From 4a2254e25d5dd58d75571420772762eae4ef155b Mon Sep 17 00:00:00 2001 From: Nate Date: Sun, 8 Jun 2025 13:44:44 -0700 Subject: [PATCH 104/118] switch to the free trial assistant once logged in for the first time --- core/llm/utils/extractPathsFromCodeBlocks.ts | 2 -- .../OnboardingCard/platform/tabs/main.tsx | 8 ++++- gui/src/redux/thunks/index.ts | 1 + gui/src/redux/thunks/selectFirstHubProfile.ts | 33 +++++++++++++++++++ 4 files changed, 41 insertions(+), 3 deletions(-) create mode 100644 gui/src/redux/thunks/selectFirstHubProfile.ts diff --git a/core/llm/utils/extractPathsFromCodeBlocks.ts b/core/llm/utils/extractPathsFromCodeBlocks.ts index 00f723c7a..99f2764b2 100644 --- a/core/llm/utils/extractPathsFromCodeBlocks.ts +++ b/core/llm/utils/extractPathsFromCodeBlocks.ts @@ -2,8 +2,6 @@ * Extracts file paths from markdown code blocks */ export function extractPathsFromCodeBlocks(content: string): string[] { - console.log("CONTENT", content); - const paths: string[] = []; // Match code block opening patterns: diff --git a/gui/src/components/OnboardingCard/platform/tabs/main.tsx b/gui/src/components/OnboardingCard/platform/tabs/main.tsx index 9bad6a50f..31fad1c4e 100644 --- a/gui/src/components/OnboardingCard/platform/tabs/main.tsx +++ b/gui/src/components/OnboardingCard/platform/tabs/main.tsx @@ -4,7 +4,8 @@ import { ButtonSubtext } from "../../.."; import { useAuth } from "../../../../context/Auth"; import { IdeMessengerContext } from "../../../../context/IdeMessenger"; import { selectCurrentOrg } from "../../../../redux"; -import { useAppSelector } from "../../../../redux/hooks"; +import { useAppDispatch, useAppSelector } from "../../../../redux/hooks"; +import { selectFirstHubProfile } from "../../../../redux/thunks"; import { hasPassedFTL } from "../../../../util/freeTrial"; import ContinueLogo from "../../../gui/ContinueLogo"; import { Button } from "../../../ui/Button"; @@ -20,12 +21,17 @@ export default function MainTab({ const ideMessenger = useContext(IdeMessengerContext); const onboardingCard = useOnboardingCard(); const auth = useAuth(); + const dispatch = useAppDispatch(); const currentOrg = useAppSelector(selectCurrentOrg); function onGetStarted() { void auth.login(true).then((success) => { if (success) { onboardingCard.close(isDialog); + + // A new assistant is created when the account is created + // We want to switch to this immediately + void dispatch(selectFirstHubProfile()); } }); } diff --git a/gui/src/redux/thunks/index.ts b/gui/src/redux/thunks/index.ts index 81c3e937c..43e35fd21 100644 --- a/gui/src/redux/thunks/index.ts +++ b/gui/src/redux/thunks/index.ts @@ -4,6 +4,7 @@ export * from "./cancelStream"; export * from "./edit"; export * from "./gatherContext"; export * from "./resetStateForNewMessage"; +export * from "./selectFirstHubProfile"; export * from "./streamNormalInput"; export * from "./streamResponse"; export * from "./streamResponseAfterToolCall"; diff --git a/gui/src/redux/thunks/selectFirstHubProfile.ts b/gui/src/redux/thunks/selectFirstHubProfile.ts new file mode 100644 index 000000000..f8018702c --- /dev/null +++ b/gui/src/redux/thunks/selectFirstHubProfile.ts @@ -0,0 +1,33 @@ +import { createAsyncThunk } from "@reduxjs/toolkit"; +import { setSelectedProfile } from "../slices"; +import { ThunkApiType } from "../store"; + +/** + * If there is a hub profile, select it. + * Used primarily after onboarding when a new profile is created and we + * want to switch to it immediately + */ +export const selectFirstHubProfile = createAsyncThunk< + void, + undefined, + ThunkApiType +>("selectFirstHubProfile", async (messages, { dispatch, extra, getState }) => { + const state = getState(); + + const currentOrgProfiles = state.profiles.organizations.find( + (org) => org.id === (state.profiles.selectedOrganizationId ?? "personal"), + ); + + const firstHubProfile = currentOrgProfiles?.profiles.find( + (profile) => profile.profileType === "platform", + ); + + if (!firstHubProfile) { + return; + } + + dispatch(setSelectedProfile(firstHubProfile.id)); + extra.ideMessenger.post("didChangeSelectedProfile", { + id: firstHubProfile.id, + }); +}); From 8a822edbfdc03f67b7b6ef99e4df138ab477ad7f Mon Sep 17 00:00:00 2001 From: Nate Date: Sun, 8 Jun 2025 18:33:09 -0700 Subject: [PATCH 105/118] small fixes for free trial onboarding --- core/config/load.ts | 1 + core/protocol/passThrough.ts | 1 + .../components/modelSelection/platform/FreeTrialButton.tsx | 6 +++--- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/core/config/load.ts b/core/config/load.ts index 9bf8d1466..fe0c4de61 100644 --- a/core/config/load.ts +++ b/core/config/load.ts @@ -640,6 +640,7 @@ function llmToSerializedModelDescription(llm: ILLM): ModelDescription { capabilities: llm.capabilities, roles: llm.roles, configurationStatus: llm.getConfigurationStatus(), + apiKeyLocation: llm.apiKeyLocation, }; } diff --git a/core/protocol/passThrough.ts b/core/protocol/passThrough.ts index 51c8f4a78..36cb9b485 100644 --- a/core/protocol/passThrough.ts +++ b/core/protocol/passThrough.ts @@ -64,6 +64,7 @@ export const WEBVIEW_TO_CORE_PASS_THROUGH: (keyof ToCoreFromWebviewProtocol)[] = "isItemTooBig", "process/markAsBackgrounded", "process/isBackgrounded", + "controlPlane/getFreeTrialStatus", ]; // Message types to pass through from core to webview diff --git a/gui/src/components/modelSelection/platform/FreeTrialButton.tsx b/gui/src/components/modelSelection/platform/FreeTrialButton.tsx index 71f529e12..c34d0abce 100644 --- a/gui/src/components/modelSelection/platform/FreeTrialButton.tsx +++ b/gui/src/components/modelSelection/platform/FreeTrialButton.tsx @@ -114,7 +114,7 @@ export default function FreeTrialButton({ { await ideMessenger.request("controlPlane/openUrl", { - path: "/pricing", + path: "pricing", orgSlug: undefined, }); }} @@ -141,7 +141,7 @@ export default function FreeTrialButton({ className="flex-1" onClick={async () => { await ideMessenger.request("controlPlane/openUrl", { - path: "/setup-models", + path: "setup-models", orgSlug: undefined, }); }} @@ -152,7 +152,7 @@ export default function FreeTrialButton({ className="flex-1" onClick={async () => { await ideMessenger.request("controlPlane/openUrl", { - path: "/settings/billing", + path: "settings/billing", orgSlug: undefined, }); }} From d19221b9e5ba5559b63bf2ca5f36601846cd4471 Mon Sep 17 00:00:00 2001 From: Nate Date: Sun, 8 Jun 2025 18:46:22 -0700 Subject: [PATCH 106/118] fix model dropdown heading --- gui/src/forms/AddModelForm.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gui/src/forms/AddModelForm.tsx b/gui/src/forms/AddModelForm.tsx index e6145b263..afc2055c2 100644 --- a/gui/src/forms/AddModelForm.tsx +++ b/gui/src/forms/AddModelForm.tsx @@ -211,7 +211,7 @@ export function AddModelForm({ setSelectedModel(match); } }} - otherOptions={ + topOptions={ Object.entries(providers).find( ([, provider]) => provider?.title === selectedProvider.title, From 45403e3489e96645f1643045e0cda35cf78390a0 Mon Sep 17 00:00:00 2001 From: Nate Date: Sun, 8 Jun 2025 18:47:52 -0700 Subject: [PATCH 107/118] rename "PROVIDERS" to "API_KEY" --- core/core.ts | 2 +- core/protocol/core.ts | 2 +- gui/src/components/Layout.tsx | 2 +- gui/src/components/OnboardingCard/OnboardingCard.tsx | 4 ++-- .../OnboardingCard/components/OnboardingCardTabs.tsx | 2 +- .../OnboardingCard/components/OnboardingProvidersTab.tsx | 2 +- gui/src/components/OnboardingCard/hooks/useOnboardingCard.ts | 2 +- gui/src/components/OnboardingCard/utils.ts | 2 +- gui/src/pages/gui/Chat.tsx | 2 +- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/core/core.ts b/core/core.ts index dfa91e1f7..822d430ee 100644 --- a/core/core.ts +++ b/core/core.ts @@ -890,7 +890,7 @@ export class Core { editConfigYamlCallback = setupLocalConfig; break; - case OnboardingModes.PROVIDERS: + case OnboardingModes.API_KEY: if (provider && apiKey) { editConfigYamlCallback = (config: ConfigYaml) => setupProviderConfig(config, provider, apiKey); diff --git a/core/protocol/core.ts b/core/protocol/core.ts index 1358e0a3a..e34a332bd 100644 --- a/core/protocol/core.ts +++ b/core/protocol/core.ts @@ -38,7 +38,7 @@ import { ControlPlaneSessionInfo } from "../control-plane/AuthTypes"; import { FreeTrialStatus } from "../control-plane/client"; export enum OnboardingModes { - PROVIDERS = "Providers", + API_KEY = "API Key", LOCAL = "Local", } diff --git a/gui/src/components/Layout.tsx b/gui/src/components/Layout.tsx index 811297e81..0d9f66072 100644 --- a/gui/src/components/Layout.tsx +++ b/gui/src/components/Layout.tsx @@ -132,7 +132,7 @@ const Layout = () => { useWebviewListener( "openOnboardingCard", async () => { - onboardingCard.open(OnboardingModes.PROVIDERS); + onboardingCard.open(OnboardingModes.API_KEY); }, [], ); diff --git a/gui/src/components/OnboardingCard/OnboardingCard.tsx b/gui/src/components/OnboardingCard/OnboardingCard.tsx index 1c0569c80..eff33936e 100644 --- a/gui/src/components/OnboardingCard/OnboardingCard.tsx +++ b/gui/src/components/OnboardingCard/OnboardingCard.tsx @@ -29,7 +29,7 @@ export function OnboardingCard({ isDialog }: OnboardingCardProps) { function renderTabContent() { switch (activeTab) { - case OnboardingModes.PROVIDERS: + case OnboardingModes.API_KEY: return ; case OnboardingModes.LOCAL: return ; @@ -58,7 +58,7 @@ export function OnboardingCard({ isDialog }: OnboardingCardProps) { >
setActiveTab(OnboardingModes.PROVIDERS)} + onSelectConfigure={() => setActiveTab(OnboardingModes.API_KEY)} isDialog={isDialog} />
diff --git a/gui/src/components/OnboardingCard/components/OnboardingCardTabs.tsx b/gui/src/components/OnboardingCard/components/OnboardingCardTabs.tsx index 07de1e42e..de881edf4 100644 --- a/gui/src/components/OnboardingCard/components/OnboardingCardTabs.tsx +++ b/gui/src/components/OnboardingCard/components/OnboardingCardTabs.tsx @@ -9,7 +9,7 @@ interface OnboardingCardTabsProps { } const getTabIcon = (tabTitle: OnboardingModes) => { - if (tabTitle === OnboardingModes.PROVIDERS) { + if (tabTitle === OnboardingModes.API_KEY) { return ; } if (tabTitle === OnboardingModes.LOCAL) { diff --git a/gui/src/components/OnboardingCard/components/OnboardingProvidersTab.tsx b/gui/src/components/OnboardingCard/components/OnboardingProvidersTab.tsx index 348acd475..afbffb854 100644 --- a/gui/src/components/OnboardingCard/components/OnboardingProvidersTab.tsx +++ b/gui/src/components/OnboardingCard/components/OnboardingProvidersTab.tsx @@ -18,7 +18,7 @@ export function OnboardingProvidersTab({ const formMethods = useForm(); const dispatch = useAppDispatch(); const { submitOnboarding } = useSubmitOnboarding( - OnboardingModes.PROVIDERS, + OnboardingModes.API_KEY, isDialog, ); diff --git a/gui/src/components/OnboardingCard/hooks/useOnboardingCard.ts b/gui/src/components/OnboardingCard/hooks/useOnboardingCard.ts index 264824a98..94a7fb7a8 100644 --- a/gui/src/components/OnboardingCard/hooks/useOnboardingCard.ts +++ b/gui/src/components/OnboardingCard/hooks/useOnboardingCard.ts @@ -43,7 +43,7 @@ export function useOnboardingCard(): UseOnboardingCard { dispatch( setOnboardingCard({ show: true, - activeTab: tab ?? OnboardingModes.PROVIDERS, + activeTab: tab ?? OnboardingModes.API_KEY, }), ); } diff --git a/gui/src/components/OnboardingCard/utils.ts b/gui/src/components/OnboardingCard/utils.ts index dbd805210..04f8f4b00 100644 --- a/gui/src/components/OnboardingCard/utils.ts +++ b/gui/src/components/OnboardingCard/utils.ts @@ -25,7 +25,7 @@ export function isNewUserOnboarding() { export const defaultOnboardingCardState: OnboardingCardState = { show: false, - activeTab: OnboardingModes.PROVIDERS, + activeTab: OnboardingModes.API_KEY, }; export enum OllamaConnectionStatuses { diff --git a/gui/src/pages/gui/Chat.tsx b/gui/src/pages/gui/Chat.tsx index 88d9f5843..b369e0a53 100644 --- a/gui/src/pages/gui/Chat.tsx +++ b/gui/src/pages/gui/Chat.tsx @@ -204,7 +204,7 @@ export function Chat() { // Card in chat will only show if no history // Also, note that platform card ignore the "Best", always opens to main tab - onboardingCard.open(OnboardingModes.PROVIDERS); + onboardingCard.open(OnboardingModes.API_KEY); // // If history, show the dialog, which will automatically close if there is not history // if (history.length) { From ee4731c1436f9e2d4896bf03f308f9bbef56e407 Mon Sep 17 00:00:00 2001 From: Nate Date: Sun, 8 Jun 2025 18:52:19 -0700 Subject: [PATCH 108/118] switch model order --- core/config/onboarding.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/config/onboarding.ts b/core/config/onboarding.ts index a3396ac66..dde0fefe7 100644 --- a/core/config/onboarding.ts +++ b/core/config/onboarding.ts @@ -13,13 +13,13 @@ const ANTHROPIC_MODEL_CONFIG = { apiKeyInputName: "ANTHROPIC_API_KEY", }; const OPENAI_MODEL_CONFIG = { - slugs: ["openai/o3", "openai/gpt-4.1-mini", "openai/gpt-4.1"], + slugs: ["openai/gpt-4.1", "openai/o3", "openai/gpt-4.1-mini"], apiKeyInputName: "OPENAI_API_KEY", }; // TODO: These need updating on the hub const GEMINI_MODEL_CONFIG = { - slugs: ["google/gemini-2.0-flash", "google/gemini-2.5-pro"], + slugs: ["google/gemini-2.5-pro", "google/gemini-2.0-flash"], apiKeyInputName: "GEMINI_API_KEY", }; From a1a69d86c1fbbc3eb2b590bd4834dbcc58a758e5 Mon Sep 17 00:00:00 2001 From: Nate Date: Sun, 8 Jun 2025 19:00:42 -0700 Subject: [PATCH 109/118] fix typo --- gui/src/pages/config/ModelRoleSelector.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gui/src/pages/config/ModelRoleSelector.tsx b/gui/src/pages/config/ModelRoleSelector.tsx index 25fb7b358..0065552a8 100644 --- a/gui/src/pages/config/ModelRoleSelector.tsx +++ b/gui/src/pages/config/ModelRoleSelector.tsx @@ -82,7 +82,7 @@ const ModelRoleSelector = ({ className="bg-vsc-editor-background hover:bg-list-active hover:text-list-active-foreground text-description w-full justify-between px-2 py-1 underline hover:underline" > - Setup a {displayName} model + Setup {displayName} model ) : ( From 5b6e32d0738ded77e042a9e1f6319dc512f0bba3 Mon Sep 17 00:00:00 2001 From: Nate Date: Sun, 8 Jun 2025 19:02:29 -0700 Subject: [PATCH 110/118] remove Add Model button --- gui/src/components/mainInput/Lump/sections/ModelsSection.tsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/gui/src/components/mainInput/Lump/sections/ModelsSection.tsx b/gui/src/components/mainInput/Lump/sections/ModelsSection.tsx index becf95cfd..4d821980b 100644 --- a/gui/src/components/mainInput/Lump/sections/ModelsSection.tsx +++ b/gui/src/components/mainInput/Lump/sections/ModelsSection.tsx @@ -5,7 +5,6 @@ import ModelRoleSelector from "../../../../pages/config/ModelRoleSelector"; import { useAppDispatch, useAppSelector } from "../../../../redux/hooks"; import { updateSelectedModelByRole } from "../../../../redux/thunks"; import { isJetBrains } from "../../../../util"; -import { ExploreBlocksButton } from "./ExploreBlocksButton"; export function ModelsSection() { const { selectedProfile } = useAuth(); @@ -30,7 +29,7 @@ export function ModelsSection() { return (
-
+
-
); } From 8e774303441f6f653ae3a145b76c5332fa48aaf8 Mon Sep 17 00:00:00 2001 From: Nate Date: Sun, 8 Jun 2025 19:38:44 -0700 Subject: [PATCH 111/118] change default onboarding card state to show landing --- gui/src/components/OnboardingCard/utils.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/gui/src/components/OnboardingCard/utils.ts b/gui/src/components/OnboardingCard/utils.ts index 04f8f4b00..33d4e59d3 100644 --- a/gui/src/components/OnboardingCard/utils.ts +++ b/gui/src/components/OnboardingCard/utils.ts @@ -1,4 +1,3 @@ -import { OnboardingModes } from "core/protocol/core"; import { getLocalStorage, setLocalStorage } from "../../util/localStorage"; import { OnboardingCardState } from "./OnboardingCard"; @@ -25,7 +24,7 @@ export function isNewUserOnboarding() { export const defaultOnboardingCardState: OnboardingCardState = { show: false, - activeTab: OnboardingModes.API_KEY, + activeTab: undefined, }; export enum OllamaConnectionStatuses { From 11b9388690c74d1767662c82dcf113b623bfa8f9 Mon Sep 17 00:00:00 2001 From: Nate Date: Sun, 8 Jun 2025 20:35:50 -0700 Subject: [PATCH 112/118] go straight to sign up page when onboarding --- extensions/vscode/src/stubs/WorkOsAuthProvider.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/extensions/vscode/src/stubs/WorkOsAuthProvider.ts b/extensions/vscode/src/stubs/WorkOsAuthProvider.ts index e0c5210d8..0d4827087 100644 --- a/extensions/vscode/src/stubs/WorkOsAuthProvider.ts +++ b/extensions/vscode/src/stubs/WorkOsAuthProvider.ts @@ -393,6 +393,9 @@ export class WorkOsAuthProvider implements AuthenticationProvider, Disposable { code_challenge: codeChallenge, code_challenge_method: "S256", provider: "authkit", + screen_hint: WorkOsAuthProvider.useOnboardingUri + ? "sign-up" + : "sign-in", }; Object.keys(params).forEach((key) => From 9d477c346c316b441a61396bd11fc2af44ba90e5 Mon Sep 17 00:00:00 2001 From: Nate Date: Sun, 8 Jun 2025 20:42:10 -0700 Subject: [PATCH 113/118] poll for new hub assistant --- gui/src/redux/thunks/selectFirstHubProfile.ts | 47 ++++++++++++++----- 1 file changed, 35 insertions(+), 12 deletions(-) diff --git a/gui/src/redux/thunks/selectFirstHubProfile.ts b/gui/src/redux/thunks/selectFirstHubProfile.ts index f8018702c..d1715ed98 100644 --- a/gui/src/redux/thunks/selectFirstHubProfile.ts +++ b/gui/src/redux/thunks/selectFirstHubProfile.ts @@ -11,23 +11,46 @@ export const selectFirstHubProfile = createAsyncThunk< void, undefined, ThunkApiType ->("selectFirstHubProfile", async (messages, { dispatch, extra, getState }) => { - const state = getState(); +>("selectFirstHubProfile", async (_, { dispatch, extra, getState }) => { + let attempts = 0; + const maxAttempts = 3; - const currentOrgProfiles = state.profiles.organizations.find( - (org) => org.id === (state.profiles.selectedOrganizationId ?? "personal"), - ); + const findAndSelectProfile = () => { + const state = getState(); - const firstHubProfile = currentOrgProfiles?.profiles.find( - (profile) => profile.profileType === "platform", - ); + const currentOrgProfiles = state.profiles.organizations.find( + (org) => org.id === (state.profiles.selectedOrganizationId ?? "personal"), + ); - if (!firstHubProfile) { + const firstHubProfile = currentOrgProfiles?.profiles.find( + (profile) => profile.profileType === "platform", + ); + + if (firstHubProfile) { + dispatch(setSelectedProfile(firstHubProfile.id)); + extra.ideMessenger.post("didChangeSelectedProfile", { + id: firstHubProfile.id, + }); + return true; + } + + return false; + }; + + // Try immediately first + if (findAndSelectProfile()) { return; } - dispatch(setSelectedProfile(firstHubProfile.id)); - extra.ideMessenger.post("didChangeSelectedProfile", { - id: firstHubProfile.id, + // If not found, poll every second for up to maxAttempts + return new Promise((resolve) => { + const interval = setInterval(() => { + attempts++; + + if (findAndSelectProfile() || attempts >= maxAttempts) { + clearInterval(interval); + resolve(); + } + }, 1000); }); }); From abe96e60e4b852f2d9dbd9ded784576e99c36097 Mon Sep 17 00:00:00 2001 From: Nate Date: Sun, 8 Jun 2025 21:09:07 -0700 Subject: [PATCH 114/118] poll for free trial status --- .../LumpToolbar/BlockSettingsTopToolbar.tsx | 34 ++++++++++++++----- 1 file changed, 25 insertions(+), 9 deletions(-) diff --git a/gui/src/components/mainInput/Lump/LumpToolbar/BlockSettingsTopToolbar.tsx b/gui/src/components/mainInput/Lump/LumpToolbar/BlockSettingsTopToolbar.tsx index b83a1cb3b..50e5a2509 100644 --- a/gui/src/components/mainInput/Lump/LumpToolbar/BlockSettingsTopToolbar.tsx +++ b/gui/src/components/mainInput/Lump/LumpToolbar/BlockSettingsTopToolbar.tsx @@ -154,15 +154,31 @@ export function BlockSettingsTopToolbar() { const isUsingFreeTrial = usesFreeTrialApiKey(config); useEffect(() => { - ideMessenger - .request("controlPlane/getFreeTrialStatus", undefined) - .then((resp) => { - if (resp.status === "success") { - setFreeTrialStatus(resp.content); - } - }) - .catch(() => {}); - }, []); + const fetchFreeTrialStatus = () => { + ideMessenger + .request("controlPlane/getFreeTrialStatus", undefined) + .then((resp) => { + if (resp.status === "success") { + setFreeTrialStatus(resp.content); + } + }) + .catch(() => {}); + }; + + fetchFreeTrialStatus(); + + let intervalId: NodeJS.Timeout | null = null; + + if (isUsingFreeTrial) { + intervalId = setInterval(fetchFreeTrialStatus, 15000); + } + + return () => { + if (intervalId) { + clearInterval(intervalId); + } + }; + }, [ideMessenger, isUsingFreeTrial]); const handleEllipsisClick = () => { if (isToolbarExpanded) { From 46fed6312fc6dd4d3111a712f4354976d130b372 Mon Sep 17 00:00:00 2001 From: Nate Date: Sun, 8 Jun 2025 21:09:31 -0700 Subject: [PATCH 115/118] bump --- extensions/vscode/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/vscode/package.json b/extensions/vscode/package.json index 54f93c509..6027f17bc 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": "1.1.45", + "version": "1.1.46", "repository": { "type": "git", "url": "https://github.com/continuedev/continue" From 9f92372dd5045133803e4e2cbc30672df4f85aae Mon Sep 17 00:00:00 2001 From: Nate Date: Sun, 8 Jun 2025 21:51:18 -0700 Subject: [PATCH 116/118] update tests to run in CI --- .github/workflows/pr_checks.yaml | 2 + .../openai-adapters/src/test/main.test.ts | 21 +- packages/openai-adapters/src/test/util.ts | 211 +++++++++--------- 3 files changed, 128 insertions(+), 106 deletions(-) diff --git a/.github/workflows/pr_checks.yaml b/.github/workflows/pr_checks.yaml index 25a1b9a1e..919ae0fe7 100644 --- a/.github/workflows/pr_checks.yaml +++ b/.github/workflows/pr_checks.yaml @@ -435,6 +435,8 @@ jobs: MISTRAL_API_KEY: ${{ secrets.MISTRAL_API_KEY }} AZURE_OPENAI_API_KEY: ${{ secrets.AZURE_OPENAI_API_KEY }} AZURE_FOUNDRY_API_KEY: ${{ secrets.AZURE_FOUNDRY_API_KEY }} + AZURE_FOUNDRY_MISTRAL_SMALL_API_KEY: ${{ secrets.AZURE_FOUNDRY_MISTRAL_SMALL_API_KEY }} + AZURE_OPENAI_GPT41_API_KEY: ${{ secrets.AZURE_OPENAI_GPT41_API_KEY }} package-tests: runs-on: ubuntu-latest diff --git a/packages/openai-adapters/src/test/main.test.ts b/packages/openai-adapters/src/test/main.test.ts index e7b9916e8..c1e1ff29a 100644 --- a/packages/openai-adapters/src/test/main.test.ts +++ b/packages/openai-adapters/src/test/main.test.ts @@ -8,7 +8,12 @@ import { getLlmApi, testChat, testEmbed } from "./util.js"; dotenv.config(); -function testConfig(config: ModelConfig) { +export interface TestConfigOptions { + skipTools: boolean; +} + +function testConfig(_config: ModelConfig & { options?: TestConfigOptions }) { + const { options, ...config } = _config; const model = config.model; const api = getLlmApi({ provider: config.provider as any, @@ -22,7 +27,7 @@ function testConfig(config: ModelConfig) { config.roles?.includes(role as any), ) ) { - testChat(api, model); + testChat(api, model, options); } if (config.roles?.includes("embed")) { @@ -34,7 +39,7 @@ function testConfig(config: ModelConfig) { } } -const TESTS: Omit[] = [ +const TESTS: Omit[] = [ { provider: "openai", model: "gpt-4o", @@ -106,7 +111,7 @@ const TESTS: Omit[] = [ provider: "azure", model: "gpt-4.1", apiBase: "https://continue-openai.openai.azure.com", - apiKey: process.env.AZURE_OPENAI_API_KEY, + apiKey: process.env.AZURE_OPENAI_GPT41_API_KEY, env: { deployment: "gpt-4.1", apiVersion: "2024-02-15-preview", @@ -114,6 +119,14 @@ const TESTS: Omit[] = [ }, roles: ["chat"], }, + { + provider: "azure", + model: "mistral-small-2503", + apiBase: "https://nate-0276-resource.services.ai.azure.com/models", + apiKey: process.env.AZURE_FOUNDRY_MISTRAL_SMALL_API_KEY, + roles: ["chat"], + options: { skipTools: true }, + }, ]; TESTS.forEach((config) => { diff --git a/packages/openai-adapters/src/test/util.ts b/packages/openai-adapters/src/test/util.ts index 453290711..03c3d7f4a 100644 --- a/packages/openai-adapters/src/test/util.ts +++ b/packages/openai-adapters/src/test/util.ts @@ -1,5 +1,6 @@ import { BaseLlmApi, constructLlmApi } from "../index.js"; import { LLMConfig } from "../types.js"; +import { TestConfigOptions } from "./main.test.js"; export function getLlmApi(config: LLMConfig) { const api = constructLlmApi(config); @@ -72,7 +73,11 @@ export function testFim(api: BaseLlmApi, model: string) { }); } -export function testChat(api: BaseLlmApi, model: string) { +export function testChat( + api: BaseLlmApi, + model: string, + options?: TestConfigOptions, +) { test("should successfully stream chat", async () => { const stream = api.chatCompletionStream( { @@ -199,123 +204,125 @@ export function testChat(api: BaseLlmApi, model: string) { expect(completion?.startsWith("RESPONSE: ")).toBe(true); }); - test("Tool Call works", async () => { - let args = ""; - let isFirstChunk = true; - for await (const chunk of api.chatCompletionStream( - { - messages: [ - { - role: "user", - content: - "Hi, my name is Nate. Please call the say_hello function to respond to me.", - }, - ], - tools: [ - { - function: { - name: "say_hello", - description: "Say Hello", - parameters: { - type: "object", - properties: { - name: { - type: "string", - description: "The name of the person to greet", + if (options?.skipTools === false) { + test("Tool Call works", async () => { + let args = ""; + let isFirstChunk = true; + for await (const chunk of api.chatCompletionStream( + { + messages: [ + { + role: "user", + content: + "Hi, my name is Nate. Please call the say_hello function to respond to me.", + }, + ], + tools: [ + { + function: { + name: "say_hello", + description: "Say Hello", + parameters: { + type: "object", + properties: { + name: { + type: "string", + description: "The name of the person to greet", + }, }, }, }, + type: "function", }, + ], + tool_choice: { type: "function", + function: { + name: "say_hello", + }, }, - ], - tool_choice: { - type: "function", - function: { - name: "say_hello", - }, + stream: true, + model, }, - stream: true, - model, - }, - new AbortController().signal, - )) { - const toolCall = chunk.choices[0].delta.tool_calls?.[0]; - if (!toolCall) { - continue; + new AbortController().signal, + )) { + const toolCall = chunk.choices[0].delta.tool_calls?.[0]; + if (!toolCall) { + continue; + } + args += toolCall.function?.arguments ?? ""; + + expect(chunk.choices[0].delta.tool_calls).toHaveLength(1); + + if (isFirstChunk) { + isFirstChunk = false; + expect(toolCall.id).toBeDefined(); + expect(toolCall.function!.name).toBe("say_hello"); + } } - args += toolCall.function?.arguments ?? ""; - expect(chunk.choices[0].delta.tool_calls).toHaveLength(1); + const parsedArgs = JSON.parse(args); + expect(parsedArgs.name).toBe("Nate"); + }); - if (isFirstChunk) { - isFirstChunk = false; - expect(toolCall.id).toBeDefined(); - expect(toolCall.function!.name).toBe("say_hello"); - } - } - - const parsedArgs = JSON.parse(args); - expect(parsedArgs.name).toBe("Nate"); - }); - - test("Tool Call second message works", async () => { - let response = ""; - for await (const chunk of api.chatCompletionStream( - { - messages: [ - { - role: "user", - content: - "Hi, my name is Nate. Please call the say_hello function to respond to me, then respond to me again.", - }, - { - role: "assistant", - tool_calls: [ - { - function: { - arguments: '{"name":"Nate"}', - name: "say_hello", + test("Tool Call second message works", async () => { + let response = ""; + for await (const chunk of api.chatCompletionStream( + { + messages: [ + { + role: "user", + content: + "Hi, my name is Nate. Please call the say_hello function to respond to me, then respond to me again.", + }, + { + role: "assistant", + tool_calls: [ + { + function: { + arguments: '{"name":"Nate"}', + name: "say_hello", + }, + id: "tool_call_1", + type: "function", }, - id: "tool_call_1", - type: "function", - }, - ], - }, - { - role: "tool", - tool_call_id: "tool_call_1", - content: "Nate was greeted", - }, - ], - tools: [ - { - function: { - name: "say_hello", - description: "Say Hello", - parameters: { - type: "object", - properties: { - name: { - type: "string", - description: "The name of the person to greet", + ], + }, + { + role: "tool", + tool_call_id: "tool_call_1", + content: "Nate was greeted", + }, + ], + tools: [ + { + function: { + name: "say_hello", + description: "Say Hello", + parameters: { + type: "object", + properties: { + name: { + type: "string", + description: "The name of the person to greet", + }, }, }, }, + type: "function", }, - type: "function", - }, - ], - stream: true, - model, - }, - new AbortController().signal, - )) { - response += chunk.choices[0].delta.content ?? ""; - } + ], + stream: true, + model, + }, + new AbortController().signal, + )) { + response += chunk.choices[0].delta.content ?? ""; + } - expect(response.length).toBeGreaterThan(0); - }); + expect(response.length).toBeGreaterThan(0); + }); + } } export function testCompletion(api: BaseLlmApi, model: string) { From 4180e0e05be66dee7f2d6ffd4d362f109bea08ee Mon Sep 17 00:00:00 2001 From: Nate Date: Sun, 8 Jun 2025 22:00:14 -0700 Subject: [PATCH 117/118] remove dead code bearerTokenRequired --- packages/openai-adapters/src/types.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/openai-adapters/src/types.ts b/packages/openai-adapters/src/types.ts index 7b68ec59d..2f26a4c80 100644 --- a/packages/openai-adapters/src/types.ts +++ b/packages/openai-adapters/src/types.ts @@ -119,7 +119,6 @@ export const WatsonXConfigSchema = BasePlusConfig.extend({ apiVersion: z.string().optional(), projectId: z.string().optional(), deploymentId: z.string().optional(), - bearerTokenRequired: z.boolean().optional(), }), }); export type WatsonXConfig = z.infer; From 137ffdaecc82a592ad30d6a6bcaace9d3394599d Mon Sep 17 00:00:00 2001 From: Nate Date: Sun, 8 Jun 2025 23:11:53 -0700 Subject: [PATCH 118/118] fix error --- .../continueintellijextension/constants/MessageTypes.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/constants/MessageTypes.kt b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/constants/MessageTypes.kt index 6b55ace95..66ebac070 100644 --- a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/constants/MessageTypes.kt +++ b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/constants/MessageTypes.kt @@ -121,7 +121,7 @@ class MessageTypes { "docs/initStatuses", "docs/getDetails", // - onboarding/complete, + "onboarding/complete", "addAutocompleteModel", "didChangeSelectedProfile", "didChangeSelectedOrg",