diff --git a/.vscode/launch.json b/.vscode/launch.json index d641772be..9a8a7ccab 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -139,5 +139,24 @@ "NODE_OPTIONS": "--experimental-vm-modules" } } + // { + // "name": "[openai-adapters] Jest Test Debugger, Current Open File", + // "type": "node", + // "request": "launch", + // "runtimeArgs": [ + // "--inspect-brk", + // "${workspaceRoot}/packages/openai-adapters/node_modules/jest/bin/jest.js", + // "--runInBand", + // "--config", + // "${workspaceRoot}/packages/openai-adapters/jest.config.mjs", + // "${relativeFile}" + // ], + // "cwd": "${workspaceRoot}/packages/openai-adapters", + // "console": "integratedTerminal", + // "internalConsoleOptions": "neverOpen", + // "env": { + // "NODE_OPTIONS": "--experimental-vm-modules" + // } + // } ] } diff --git a/core/config/load.ts b/core/config/load.ts index 71b094549..3077768d8 100644 --- a/core/config/load.ts +++ b/core/config/load.ts @@ -36,6 +36,7 @@ import CustomLLMClass from "../llm/llms/CustomLLM.js"; import FreeTrial from "../llm/llms/FreeTrial.js"; import { llmFromDescription } from "../llm/llms/index.js"; +import { execSync } from "child_process"; import CodebaseContextProvider from "../context/providers/CodebaseContextProvider.js"; import ContinueProxyContextProvider from "../context/providers/ContinueProxyContextProvider.js"; import { fetchwithRequestOptions } from "../util/fetchWithOptions.js"; @@ -61,7 +62,7 @@ import { getPromptFiles, slashCommandFromPromptFile, } from "./promptFile.js"; -import { execSync } from "child_process"; + function resolveSerializedConfig(filepath: string): SerializedContinueConfig { let content = fs.readFileSync(filepath, "utf8"); const config = JSONC.parse(content) as unknown as SerializedContinueConfig; diff --git a/core/context/providers/DocsContextProvider.ts b/core/context/providers/DocsContextProvider.ts index 77a22cc27..972c12190 100644 --- a/core/context/providers/DocsContextProvider.ts +++ b/core/context/providers/DocsContextProvider.ts @@ -1,3 +1,4 @@ +import { BaseContextProvider } from "../"; import { Chunk, ContextItem, @@ -9,7 +10,6 @@ import { import DocsService from "../../indexing/docs/DocsService"; import preIndexedDocs from "../../indexing/docs/preIndexedDocs"; import { Telemetry } from "../../util/posthog"; -import { BaseContextProvider } from "../"; class DocsContextProvider extends BaseContextProvider { static nRetrieve = 30; @@ -108,9 +108,8 @@ class DocsContextProvider extends BaseContextProvider { }); } - const embeddingsProvider = await docsService.getEmbeddingsProvider( - !!preIndexedDoc, - ); + const embeddingsProvider = + await docsService.getEmbeddingsProvider(!!preIndexedDoc); const [vector] = await embeddingsProvider.embed([extras.fullInput]); diff --git a/core/indexing/docs/DocsService.ts b/core/indexing/docs/DocsService.ts index 8f5cc6cf7..9384bb753 100644 --- a/core/indexing/docs/DocsService.ts +++ b/core/indexing/docs/DocsService.ts @@ -1,3 +1,8 @@ +import { open, type Database } from "sqlite"; +import sqlite3 from "sqlite3"; +import lancedb, { Connection } from "vectordb"; +import { ConfigHandler } from "../../config/ConfigHandler.js"; +import DocsContextProvider from "../../context/providers/DocsContextProvider.js"; import { Chunk, ContinueConfig, @@ -6,13 +11,19 @@ import { IndexingProgressUpdate, SiteIndexingConfig, } from "../../index.js"; +import { FromCoreProtocol, ToCoreProtocol } from "../../protocol/index.js"; +import { GlobalContext } from "../../util/GlobalContext.js"; +import { IMessenger } from "../../util/messenger.js"; import { editConfigJson, getDocsSqlitePath, getLanceDbPath, } from "../../util/paths.js"; +import { Telemetry } from "../../util/posthog.js"; +import TransformersJsEmbeddingsProvider from "../embeddings/TransformersJsEmbeddingsProvider.js"; import { Article, chunkArticle, pageToArticle } from "./article.js"; import { crawlPage } from "./crawl.js"; +import { runLanceMigrations, runSqliteMigrations } from "./migrations.js"; import { downloadFromS3, getS3Filename, @@ -20,17 +31,6 @@ import { SiteIndexingResults, } from "./preIndexed.js"; import preIndexedDocs from "./preIndexedDocs.js"; -import TransformersJsEmbeddingsProvider from "../embeddings/TransformersJsEmbeddingsProvider.js"; -import { ConfigHandler } from "../../config/ConfigHandler.js"; -import lancedb, { Connection } from "vectordb"; -import { GlobalContext } from "../../util/GlobalContext.js"; -import DocsContextProvider from "../../context/providers/DocsContextProvider.js"; -import { open, type Database } from "sqlite"; -import sqlite3 from "sqlite3"; -import { Telemetry } from "../../util/posthog.js"; -import { runSqliteMigrations, runLanceMigrations } from "./migrations.js"; -import { IMessenger } from "../../util/messenger.js"; -import { ToCoreProtocol, FromCoreProtocol } from "../../protocol/index.js"; // Purposefully lowercase because lancedb converts export interface LanceDbDocsRow { @@ -522,9 +522,8 @@ export default class DocsService { private async getLanceTableNameFromEmbeddingsProvider( isPreIndexedDoc: boolean, ) { - const embeddingsProvider = await this.getEmbeddingsProvider( - isPreIndexedDoc, - ); + const embeddingsProvider = + await this.getEmbeddingsProvider(isPreIndexedDoc); const embeddingsProviderId = this.removeInvalidLanceTableNameChars( embeddingsProvider.id, ); diff --git a/core/indexing/walkDir.ts b/core/indexing/walkDir.ts index 789758248..bc70503a8 100644 --- a/core/indexing/walkDir.ts +++ b/core/indexing/walkDir.ts @@ -1,6 +1,6 @@ +import ignore, { Ignore } from "ignore"; import path from "node:path"; import { FileType, IDE } from "../index.d.js"; -import ignore, { Ignore } from "ignore"; import { DEFAULT_IGNORE_DIRS, DEFAULT_IGNORE_FILETYPES, @@ -105,17 +105,18 @@ class DFSWalker { if (ignoreFilesInDir.length === 0) { return parentIgnore; } - const patterns = ignoreFilesInDir.map(c => { - return c.split(/\r?\n/) - .map((l) => l.trim()) - .filter((l) => !/^#|^$/.test(l)); - }).flat(); + const patterns = ignoreFilesInDir + .map((c) => { + return c + .split(/\r?\n/) + .map((l) => l.trim()) + .filter((l) => !/^#|^$/.test(l)); + }) + .flat(); return ignore().add(parentIgnore).add(patterns); } - private async loadIgnoreFiles( - entries: WalkableEntry[], - ): Promise { + private async loadIgnoreFiles(entries: WalkableEntry[]): Promise { const ignoreEntries = entries.filter((w) => this.isIgnoreFile(w.entry)); const promises = ignoreEntries.map(async (w) => { return await this.ide.readFile(w.absPath); @@ -128,10 +129,7 @@ class DFSWalker { return this.ignoreFileNames.has(p); } - private shouldInclude( - walkableEntry: WalkableEntry, - ignore: Ignore, - ) { + private shouldInclude(walkableEntry: WalkableEntry, ignore: Ignore) { if (this.entryIsSymlink(walkableEntry.entry)) { // If called from the root, a symlink either links to a real file in this repository, // and therefore will be walked OR it linksto something outside of the repository and diff --git a/core/llm/llms/Bedrock.ts b/core/llm/llms/Bedrock.ts index 11a8d5143..226671c52 100644 --- a/core/llm/llms/Bedrock.ts +++ b/core/llm/llms/Bedrock.ts @@ -1,99 +1,108 @@ import { - BedrockRuntimeClient, - ConverseStreamCommand, - } from "@aws-sdk/client-bedrock-runtime"; - import { fromIni } from "@aws-sdk/credential-providers"; - import { - ChatMessage, - CompletionOptions, - LLMOptions, - MessageContent, - ModelProvider, - } from "../../index.js"; - import { stripImages } from "../images.js"; - import { BaseLLM } from "../index.js"; - - class Bedrock extends BaseLLM { - private static PROFILE_NAME: string = "bedrock"; - static providerName: ModelProvider = "bedrock"; - static defaultOptions: Partial = { - region: "us-east-1", - model: "anthropic.claude-3-sonnet-20240229-v1:0", - contextLength: 200_000, - }; - - constructor(options: LLMOptions) { - super(options); - if (!options.apiBase) { - this.apiBase = `https://bedrock-runtime.${options.region}.amazonaws.com`; - } + BedrockRuntimeClient, + ConverseStreamCommand, +} from "@aws-sdk/client-bedrock-runtime"; +import { fromIni } from "@aws-sdk/credential-providers"; +import { + ChatMessage, + CompletionOptions, + LLMOptions, + MessageContent, + ModelProvider, +} from "../../index.js"; +import { stripImages } from "../images.js"; +import { BaseLLM } from "../index.js"; + +class Bedrock extends BaseLLM { + private static PROFILE_NAME: string = "bedrock"; + static providerName: ModelProvider = "bedrock"; + static defaultOptions: Partial = { + region: "us-east-1", + model: "anthropic.claude-3-sonnet-20240229-v1:0", + contextLength: 200_000, + }; + + constructor(options: LLMOptions) { + super(options); + if (!options.apiBase) { + this.apiBase = `https://bedrock-runtime.${options.region}.amazonaws.com`; } - - protected async *_streamComplete( - prompt: string, - options: CompletionOptions, - ): AsyncGenerator { - const messages = [{ role: "user" as const, content: prompt }]; - for await (const update of this._streamChat(messages, options)) { - yield stripImages(update.content); - } + } + + protected async *_streamComplete( + prompt: string, + options: CompletionOptions, + ): AsyncGenerator { + const messages = [{ role: "user" as const, content: prompt }]; + for await (const update of this._streamChat(messages, options)) { + yield stripImages(update.content); } - - protected async *_streamChat( - messages: ChatMessage[], - options: CompletionOptions, - ): AsyncGenerator { - const credentials = await this._getCredentials(); - const client = new BedrockRuntimeClient({ - region: this.region, - credentials: { - accessKeyId: credentials.accessKeyId, - secretAccessKey: credentials.secretAccessKey, - sessionToken: credentials.sessionToken || "", - }, - }); - - const input = this._generateConverseInput(messages, options); - const command = new ConverseStreamCommand(input); - const response = await client.send(command); - - if (response.stream) { - for await (const chunk of response.stream) { - if (chunk.contentBlockDelta?.delta?.text) { - yield { role: "assistant", content: chunk.contentBlockDelta.delta.text }; - } + } + + protected async *_streamChat( + messages: ChatMessage[], + options: CompletionOptions, + ): AsyncGenerator { + const credentials = await this._getCredentials(); + const client = new BedrockRuntimeClient({ + region: this.region, + credentials: { + accessKeyId: credentials.accessKeyId, + secretAccessKey: credentials.secretAccessKey, + sessionToken: credentials.sessionToken || "", + }, + }); + + const input = this._generateConverseInput(messages, options); + const command = new ConverseStreamCommand(input); + const response = await client.send(command); + + if (response.stream) { + for await (const chunk of response.stream) { + if (chunk.contentBlockDelta?.delta?.text) { + yield { + role: "assistant", + content: chunk.contentBlockDelta.delta.text, + }; } } } - - private _generateConverseInput(messages: ChatMessage[], options: CompletionOptions): any { - const convertedMessages = this._convertMessages(messages); - - return { - modelId: options.model, - messages: convertedMessages, - system: this.systemMessage ? [{ text: this.systemMessage }] : undefined, - inferenceConfig: { - maxTokens: options.maxTokens, - temperature: options.temperature, - topP: options.topP, - stopSequences: options.stop?.filter((stop) => stop.trim() !== ""), - }, - }; - } - - private _convertMessages(messages: ChatMessage[]): any[] { - return messages.filter((message)=>message.role!=="system").map((message) => ({ + } + + private _generateConverseInput( + messages: ChatMessage[], + options: CompletionOptions, + ): any { + const convertedMessages = this._convertMessages(messages); + + return { + modelId: options.model, + messages: convertedMessages, + system: this.systemMessage ? [{ text: this.systemMessage }] : undefined, + inferenceConfig: { + maxTokens: options.maxTokens, + temperature: options.temperature, + topP: options.topP, + stopSequences: options.stop?.filter((stop) => stop.trim() !== ""), + }, + }; + } + + private _convertMessages(messages: ChatMessage[]): any[] { + return messages + .filter((message) => message.role !== "system") + .map((message) => ({ role: message.role, content: this._convertMessageContent(message.content), })); + } + + private _convertMessageContent(messageContent: MessageContent): any[] { + if (typeof messageContent === "string") { + return [{ text: messageContent }]; } - - private _convertMessageContent(messageContent: MessageContent): any[] { - if (typeof messageContent === "string") { - return [{ text: messageContent }]; - } - return messageContent.map((part) => { + return messageContent + .map((part) => { if (part.type === "text") { return { text: part.text }; } @@ -108,21 +117,22 @@ import { }; } return null; - }).filter(Boolean); - } - - private async _getCredentials() { - try { - return await fromIni({ - profile: Bedrock.PROFILE_NAME, - })(); - } catch (e) { - console.warn( - `AWS profile with name ${Bedrock.PROFILE_NAME} not found in ~/.aws/credentials, using default profile`, - ); - return await fromIni()(); - } + }) + .filter(Boolean); + } + + private async _getCredentials() { + try { + return await fromIni({ + profile: Bedrock.PROFILE_NAME, + })(); + } catch (e) { + console.warn( + `AWS profile with name ${Bedrock.PROFILE_NAME} not found in ~/.aws/credentials, using default profile`, + ); + return await fromIni()(); } } - - export default Bedrock; \ No newline at end of file +} + +export default Bedrock; diff --git a/core/llm/llms/OpenAI.ts b/core/llm/llms/OpenAI.ts index 366f6bd60..cea8ec524 100644 --- a/core/llm/llms/OpenAI.ts +++ b/core/llm/llms/OpenAI.ts @@ -104,13 +104,13 @@ class OpenAI extends BaseLLM { this.maxStopWords !== undefined ? options.stop?.slice(0, this.maxStopWords) : url.host === "api.deepseek.com" - ? options.stop?.slice(0, 16) - : url.port === "1337" || - url.host === "api.openai.com" || - url.host === "api.groq.com" || - this.apiType === "azure" - ? options.stop?.slice(0, 4) - : options.stop, + ? options.stop?.slice(0, 16) + : url.port === "1337" || + url.host === "api.openai.com" || + url.host === "api.groq.com" || + this.apiType === "azure" + ? options.stop?.slice(0, 4) + : options.stop, }; return finalOptions; @@ -139,7 +139,7 @@ class OpenAI extends BaseLLM { return completion; } - private _getEndpoint( + protected _getEndpoint( endpoint: "chat/completions" | "completions" | "models", ) { if (this.apiType === "azure") { diff --git a/core/llm/llms/Vllm.ts b/core/llm/llms/Vllm.ts new file mode 100644 index 000000000..d0ad32816 --- /dev/null +++ b/core/llm/llms/Vllm.ts @@ -0,0 +1,30 @@ +import { LLMOptions, ModelProvider } from "../../index.js"; +import OpenAI from "./OpenAI.js"; + +class Vllm extends OpenAI { + constructor(options: LLMOptions) { + super(options); + this._setupCompletionOptions(); + } + + private _setupCompletionOptions() { + this.fetch(this._getEndpoint("models"), { + method: "GET", + headers: this._getHeaders(), + }).then(async (response) => { + if (response.status !== 200) { + console.warn( + "Error calling vLLM /models endpoint: ", + await response.text(), + ); + return; + } + const json = await response.json(); + const data = json.data; + this.model = data.id; + this.contextLength = Number.parseInt(data.max_model_len); + }); + } +} + +export default Vllm; diff --git a/core/llm/llms/index.ts b/core/llm/llms/index.ts index 5a3062e06..cd084207e 100644 --- a/core/llm/llms/index.ts +++ b/core/llm/llms/index.ts @@ -5,9 +5,11 @@ import { LLMOptions, ModelDescription, } from "../.."; +import { renderTemplatedString } from "../../promptFiles/renderTemplatedString"; import { DEFAULT_MAX_TOKENS } from "../constants"; import { BaseLLM } from "../index"; import Anthropic from "./Anthropic"; +import Azure from "./Azure"; import Bedrock from "./Bedrock"; import Cloudflare from "./Cloudflare"; import Cohere from "./Cohere"; @@ -25,16 +27,14 @@ import LlamaCpp from "./LlamaCpp"; import Llamafile from "./Llamafile"; import Mistral from "./Mistral"; import Msty from "./Msty"; -import Azure from "./Azure"; import Ollama from "./Ollama"; import OpenAI from "./OpenAI"; import Replicate from "./Replicate"; +import SageMaker from "./SageMaker"; import TextGenWebUI from "./TextGenWebUI"; import Together from "./Together"; -import ContinueProxy from "./stubs/ContinueProxy"; import WatsonX from "./WatsonX"; -import SageMaker from "./SageMaker"; -import { renderTemplatedString } from "../../promptFiles/renderTemplatedString"; +import ContinueProxy from "./stubs/ContinueProxy"; const LLMs = [ Anthropic, diff --git a/docs/docs/reference/Model Providers/openai.md b/docs/docs/reference/Model Providers/openai.md index 10c86206d..628ec8c42 100644 --- a/docs/docs/reference/Model Providers/openai.md +++ b/docs/docs/reference/Model Providers/openai.md @@ -12,6 +12,7 @@ OpenAI compatible servers - [LocalAI](https://localai.io/basics/getting_started/) - [llama-cpp-python](https://github.com/abetlen/llama-cpp-python#web-server) - [TensorRT-LLM](https://github.com/NVIDIA/trt-llm-as-openai-windows?tab=readme-ov-file#examples) +- [vLLM](https://docs.vllm.ai/en/latest/serving/openai_compatible_server.html) [^1] OpenAI compatible APIs @@ -40,4 +41,7 @@ To force usage of `chat/completions` instead of `completions` endpoint you can s "useLegacyCompletionsEndpoint": false ``` +[^1]: Use the [Vllm Model Provider](./vllm.md) instead. + + [View the source](https://github.com/continuedev/continue/blob/main/core/llm/llms/OpenAI.ts) diff --git a/docs/docs/reference/Model Providers/vllm.md b/docs/docs/reference/Model Providers/vllm.md new file mode 100644 index 000000000..71a5f3cba --- /dev/null +++ b/docs/docs/reference/Model Providers/vllm.md @@ -0,0 +1,22 @@ +# vLLM + +Run the OpenAI-compatible server by vLLM using `vllm serve`. See their [server documentation](https://docs.vllm.ai/en/latest/serving/openai_compatible_server.html) and the [engine arguments documentation](https://docs.vllm.ai/en/latest/models/engine_args.html). + +```shell +vllm serve NousResearch/Meta-Llama-3-8B-Instruct --max-model-len 1024 +``` + +The continue implementation uses [OpenAI](./openai.md) under the hood and automatically selects the available model. You only need to set the `apiBase` like this: + +```json title="~/.continue/config.json" +{ + "models": [ + { + "title": "My vLLM OpenAI-compatible server", + "apiBase": "http://localhost:8000/v1" + } + ] +} +``` + +[View the source](https://github.com/continuedev/continue/blob/main/core/llm/llms/Vllm.ts) diff --git a/docs/docs/setup/select-model.md b/docs/docs/setup/select-model.md index ff4df470e..f78e29339 100644 --- a/docs/docs/setup/select-model.md +++ b/docs/docs/setup/select-model.md @@ -49,7 +49,7 @@ _You can also use other commercial chat models by adding them to your `config.js ## Autocomplete -You likely want to use a model that is 1-15B parameters for autocomplete. +You likely want to use a model that is 1-15B parameters for autocomplete. You can read more about it [here](../features/tab-autocomplete.md#tab-autocomplete-beta) ### Commercial LLMs diff --git a/docs/static/schemas/config.json b/docs/static/schemas/config.json index ae3f26e66..40bf1233d 100644 --- a/docs/static/schemas/config.json +++ b/docs/static/schemas/config.json @@ -1489,6 +1489,46 @@ } }, "allOf": [ + { + "if": { + "properties": { + "name": { + "enum": ["docs"] + } + } + }, + "then": { + "properties": { + "params": { + "properties": { + "sites": { + "type": "array", + "items": { + "type": "object", + "properties": { + "title": { + "type": "string" + }, + "startUrl": { + "type": "string" + }, + "rootUrl": { + "type": "string" + }, + "maxDepth": { + "type": "integer" + } + }, + "required": ["title", "startUrl"] + } + } + }, + "required": ["sites"] + } + }, + "required": ["params"] + } + }, { "if": { "properties": { diff --git a/extensions/intellij/src/main/resources/config_schema.json b/extensions/intellij/src/main/resources/config_schema.json index ae3f26e66..40bf1233d 100644 --- a/extensions/intellij/src/main/resources/config_schema.json +++ b/extensions/intellij/src/main/resources/config_schema.json @@ -1489,6 +1489,46 @@ } }, "allOf": [ + { + "if": { + "properties": { + "name": { + "enum": ["docs"] + } + } + }, + "then": { + "properties": { + "params": { + "properties": { + "sites": { + "type": "array", + "items": { + "type": "object", + "properties": { + "title": { + "type": "string" + }, + "startUrl": { + "type": "string" + }, + "rootUrl": { + "type": "string" + }, + "maxDepth": { + "type": "integer" + } + }, + "required": ["title", "startUrl"] + } + } + }, + "required": ["sites"] + } + }, + "required": ["params"] + } + }, { "if": { "properties": { diff --git a/extensions/vscode/config_schema.json b/extensions/vscode/config_schema.json index ae3f26e66..40bf1233d 100644 --- a/extensions/vscode/config_schema.json +++ b/extensions/vscode/config_schema.json @@ -1489,6 +1489,46 @@ } }, "allOf": [ + { + "if": { + "properties": { + "name": { + "enum": ["docs"] + } + } + }, + "then": { + "properties": { + "params": { + "properties": { + "sites": { + "type": "array", + "items": { + "type": "object", + "properties": { + "title": { + "type": "string" + }, + "startUrl": { + "type": "string" + }, + "rootUrl": { + "type": "string" + }, + "maxDepth": { + "type": "integer" + } + }, + "required": ["title", "startUrl"] + } + } + }, + "required": ["sites"] + } + }, + "required": ["params"] + } + }, { "if": { "properties": { diff --git a/extensions/vscode/continue_rc_schema.json b/extensions/vscode/continue_rc_schema.json index 222e41a7b..e8eacda83 100644 --- a/extensions/vscode/continue_rc_schema.json +++ b/extensions/vscode/continue_rc_schema.json @@ -1646,6 +1646,55 @@ } }, "allOf": [ + { + "if": { + "properties": { + "name": { + "enum": [ + "docs" + ] + } + } + }, + "then": { + "properties": { + "params": { + "properties": { + "sites": { + "type": "array", + "items": { + "type": "object", + "properties": { + "title": { + "type": "string" + }, + "startUrl": { + "type": "string" + }, + "rootUrl": { + "type": "string" + }, + "maxDepth": { + "type": "integer" + } + }, + "required": [ + "title", + "startUrl" + ] + } + } + }, + "required": [ + "sites" + ] + } + }, + "required": [ + "params" + ] + } + }, { "if": { "properties": { diff --git a/extensions/vscode/src/extension/VsCodeExtension.ts b/extensions/vscode/src/extension/VsCodeExtension.ts index d63b92e1a..6baa27b06 100644 --- a/extensions/vscode/src/extension/VsCodeExtension.ts +++ b/extensions/vscode/src/extension/VsCodeExtension.ts @@ -259,6 +259,9 @@ export class VsCodeExtension { const indexer = await this.core.codebaseIndexerPromise; indexer.refreshFile(filepath); } + + // Reindex the workspaces + this.core.invoke("index/forceReIndex", undefined); }); // When GitHub sign-in status changes, reload config diff --git a/extensions/vscode/src/lang-server/codeLens/providers/QuickActionsCodeLensProvider.ts b/extensions/vscode/src/lang-server/codeLens/providers/QuickActionsCodeLensProvider.ts index 66a914402..8f0c8adfe 100644 --- a/extensions/vscode/src/lang-server/codeLens/providers/QuickActionsCodeLensProvider.ts +++ b/extensions/vscode/src/lang-server/codeLens/providers/QuickActionsCodeLensProvider.ts @@ -1,12 +1,12 @@ import { ContinueConfig, QuickActionConfig } from "core"; +import { Telemetry } from "core/util/posthog"; import * as vscode from "vscode"; +import { QuickEditShowParams } from "../../../quickEdit/QuickEditQuickPick"; import { CONTINUE_WORKSPACE_KEY, getContinueWorkspaceConfig, } from "../../../util/workspaceConfig"; import { isTutorialFile } from "./TutorialCodeLensProvider"; -import { Telemetry } from "core/util/posthog"; -import { QuickEditShowParams } from "../../../quickEdit/QuickEditQuickPick"; export const ENABLE_QUICK_ACTIONS_KEY = "enableQuickActions"; diff --git a/extensions/vscode/src/quickEdit/ContextProvidersQuickPick.ts b/extensions/vscode/src/quickEdit/ContextProvidersQuickPick.ts index bcb1fdc45..ed79e1a05 100644 --- a/extensions/vscode/src/quickEdit/ContextProvidersQuickPick.ts +++ b/extensions/vscode/src/quickEdit/ContextProvidersQuickPick.ts @@ -1,6 +1,6 @@ import { ContinueConfig, IDE } from "core"; -import { QuickPickItem, window } from "vscode"; import { fetchwithRequestOptions } from "core/util/fetchWithOptions"; +import { QuickPickItem, window } from "vscode"; export async function getContextProviderItems({ contextProviders, diff --git a/gui/src/components/dialogs/AddDocsDialog.tsx b/gui/src/components/dialogs/AddDocsDialog.tsx index 51632d838..bce4d9a83 100644 --- a/gui/src/components/dialogs/AddDocsDialog.tsx +++ b/gui/src/components/dialogs/AddDocsDialog.tsx @@ -1,3 +1,4 @@ +import { ChevronDownIcon, ChevronUpIcon } from "@heroicons/react/24/outline"; import { SiteIndexingConfig } from "core"; import { usePostHog } from "posthog-js/react"; import { useContext, useLayoutEffect, useRef, useState } from "react"; @@ -5,7 +6,6 @@ import { useDispatch } from "react-redux"; import { Button, HelperText, Input, lightGray } from ".."; import { IdeMessengerContext } from "../../context/IdeMessenger"; import { setShowDialog } from "../../redux/slices/uiStateSlice"; -import { ChevronDownIcon, ChevronUpIcon } from "@heroicons/react/24/outline"; const DEFAULT_MAX_DEPTH = 3; diff --git a/gui/src/components/gui/StepContainer.tsx b/gui/src/components/gui/StepContainer.tsx index 362b63325..95e8b0bec 100644 --- a/gui/src/components/gui/StepContainer.tsx +++ b/gui/src/components/gui/StepContainer.tsx @@ -1,6 +1,7 @@ import { ArrowPathIcon, BarsArrowDownIcon, + CubeIcon, HandThumbDownIcon, HandThumbUpIcon, TrashIcon,