From 06013a955f91b8077ecc8d0b38a5248669a797ab Mon Sep 17 00:00:00 2001 From: Patrick Erichsen Date: Wed, 16 Oct 2024 11:32:15 -0700 Subject: [PATCH 01/70] Update troubleshooting.md --- docs/docs/troubleshooting.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/troubleshooting.md b/docs/docs/troubleshooting.md index 67a0f1070..d10d2c104 100644 --- a/docs/docs/troubleshooting.md +++ b/docs/docs/troubleshooting.md @@ -126,7 +126,7 @@ This can be accomplished using the following command: `Continue: Rebuild codebas ### Android Studio - "Nothing to show" in Chat -This can be fixed by selecting `Actions > Choose Boot runtime for the IDE` then selecting the latest version, and then restarting Android Studio. [See this thread](https://github.com/continuedev/continue/issues/2280#issuecomment-2365231567) for details. +This can be fixed by selecting `Actions > Choose Boot runtime for the IDE` then selecting the latest version, and then restarting Android Studio. [See this thread](https://github.com/continuedev/continue/issues/596#issuecomment-1789327178) for details. ## Still having trouble? From 90e994db3c106f9b63bd043203111e5e101071ba Mon Sep 17 00:00:00 2001 From: Mahdi Malaki Date: Thu, 17 Oct 2024 17:45:20 -0400 Subject: [PATCH 02/70] fix: 'inferenceConfig.stopSequences' failed to satisfy constraint: Member must have length less than or equal to 4 #2538 --- core/llm/llms/Bedrock.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/core/llm/llms/Bedrock.ts b/core/llm/llms/Bedrock.ts index 485b87015..9c6e4bb52 100644 --- a/core/llm/llms/Bedrock.ts +++ b/core/llm/llms/Bedrock.ts @@ -111,7 +111,15 @@ class Bedrock extends BaseLLM { maxTokens: options.maxTokens, temperature: options.temperature, topP: options.topP, - stopSequences: options.stop?.filter((stop) => stop.trim() !== ""), + // TODO: The current approach selects the first 4 items from the list to comply with Bedrock's requirement + // of having at least 4 stop sequences, as per the AWS documentation: + // https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent_InferenceConfiguration.html + // However, it might be better to implement a strategy that dynamically selects the most appropriate stop sequences + // based on the context. + // TODO: Additionally, consider implementing a global exception handler for the provider to give users clearer feedback. + // For example, differentiate between client-side errors (4XX status codes) and server-side issues (5XX status codes), + // providing meaningful error messages to improve the user experience. + stopSequences: options.stop?.filter((stop) => stop.trim() !== "").slice(0, 4), }, }; } From 43349830ee3269479dad3e595d1ffb757dbd4650 Mon Sep 17 00:00:00 2001 From: Mahdi Malaki Date: Thu, 17 Oct 2024 22:07:16 -0400 Subject: [PATCH 03/70] fix the misleading comment --- core/llm/llms/Bedrock.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/llm/llms/Bedrock.ts b/core/llm/llms/Bedrock.ts index 9c6e4bb52..1e6586a2a 100644 --- a/core/llm/llms/Bedrock.ts +++ b/core/llm/llms/Bedrock.ts @@ -112,7 +112,7 @@ class Bedrock extends BaseLLM { temperature: options.temperature, topP: options.topP, // TODO: The current approach selects the first 4 items from the list to comply with Bedrock's requirement - // of having at least 4 stop sequences, as per the AWS documentation: + // of having at most 4 stop sequences, as per the AWS documentation: // https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent_InferenceConfiguration.html // However, it might be better to implement a strategy that dynamically selects the most appropriate stop sequences // based on the context. From b35d3e7d15c658d204286432df102dbcfe6cf192 Mon Sep 17 00:00:00 2001 From: Mahdi Malaki Date: Thu, 17 Oct 2024 22:13:11 -0400 Subject: [PATCH 04/70] modify the comment. --- core/llm/llms/Bedrock.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/llm/llms/Bedrock.ts b/core/llm/llms/Bedrock.ts index 1e6586a2a..c143fa412 100644 --- a/core/llm/llms/Bedrock.ts +++ b/core/llm/llms/Bedrock.ts @@ -116,7 +116,7 @@ class Bedrock extends BaseLLM { // https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent_InferenceConfiguration.html // However, it might be better to implement a strategy that dynamically selects the most appropriate stop sequences // based on the context. - // TODO: Additionally, consider implementing a global exception handler for the provider to give users clearer feedback. + // TODO: Additionally, consider implementing a global exception handler for the providers to give users clearer feedback. // For example, differentiate between client-side errors (4XX status codes) and server-side issues (5XX status codes), // providing meaningful error messages to improve the user experience. stopSequences: options.stop?.filter((stop) => stop.trim() !== "").slice(0, 4), From 83a5c5c800fb15510eee9ed6210ea9d6ef12d964 Mon Sep 17 00:00:00 2001 From: sadie100 <03sadie@gmail.com> Date: Fri, 18 Oct 2024 13:10:37 +0900 Subject: [PATCH 05/70] docs: add Ollama provider explanation --- docs/docs/customize/model-providers/top-level/ollama.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/docs/customize/model-providers/top-level/ollama.md b/docs/docs/customize/model-providers/top-level/ollama.md index 7a6a0776a..08ae3eec9 100644 --- a/docs/docs/customize/model-providers/top-level/ollama.md +++ b/docs/docs/customize/model-providers/top-level/ollama.md @@ -3,6 +3,8 @@ title: Ollama slug: ../ollama --- +Ollama is an open-source tool that allows users to run large language models (LLMs) locally on their own computers. To use Ollama providers, you need to install Ollama [here](https://ollama.ai/download) and download the model you want to run by `ollama pull` command. + ## Chat model We recommend configuring **Llama3.1 8B** as your chat model. From 6b35b5983b36dcfc0f039e80bca3eb7d0f6a40db Mon Sep 17 00:00:00 2001 From: sadie100 <03sadie@gmail.com> Date: Fri, 18 Oct 2024 14:13:29 +0900 Subject: [PATCH 06/70] docs: add Azure OpenAI explanation and link detailed setup info to the top --- docs/docs/customize/model-providers/top-level/azure.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/docs/customize/model-providers/top-level/azure.md b/docs/docs/customize/model-providers/top-level/azure.md index 814a056ea..8ade702f0 100644 --- a/docs/docs/customize/model-providers/top-level/azure.md +++ b/docs/docs/customize/model-providers/top-level/azure.md @@ -3,6 +3,14 @@ title: Azure OpenAI slug: ../azure --- +Azure OpenAI is a cloud-based service that provides access to OpenAI's large language models including GPT series, integrated with the security and enterprise features of the Microsoft Azure platform. To get started, you have to create an Azure OpenAI resource in [Azure portal](https://portal.azure.com). + +:::info + +For details on model setup, see [General model configuration](#general-model-configuration). + +::: + ## Chat model We recommend configuring **GPT-4o** as your chat model. From 0f8625faf4a43931fbee5cc5f9b1f14d6c67146c Mon Sep 17 00:00:00 2001 From: DongjaJ Date: Fri, 18 Oct 2024 14:24:42 +0900 Subject: [PATCH 07/70] refactor: declare private class properties and initialize --- core/indexing/chunk/ChunkCodebaseIndex.ts | 4 +--- core/indexing/refreshIndex.ts | 6 ++--- core/indexing/walkDir.ts | 22 +++++++++---------- core/util/generateRepoMap.ts | 12 +++++----- .../vscode/src/diff/vertical/decorations.ts | 12 +++------- .../vscode/src/diff/vertical/handler.ts | 18 +++++---------- .../vscode/src/terminal/terminalEmulator.ts | 5 +---- .../vscode/src/util/loadAutocompleteModel.ts | 6 +---- .../openai-adapters/src/apis/AzureOpenAI.ts | 4 +--- 9 files changed, 29 insertions(+), 60 deletions(-) diff --git a/core/indexing/chunk/ChunkCodebaseIndex.ts b/core/indexing/chunk/ChunkCodebaseIndex.ts index cdf91f359..e2d316d67 100644 --- a/core/indexing/chunk/ChunkCodebaseIndex.ts +++ b/core/indexing/chunk/ChunkCodebaseIndex.ts @@ -23,9 +23,7 @@ export class ChunkCodebaseIndex implements CodebaseIndex { private readonly pathSep: string, private readonly continueServerClient: IContinueServerClient, private readonly maxChunkSize: number, - ) { - this.readFile = readFile; - } + ) {} async *update( tag: IndexTag, diff --git a/core/indexing/refreshIndex.ts b/core/indexing/refreshIndex.ts index 51cbdb646..cf59899f1 100644 --- a/core/indexing/refreshIndex.ts +++ b/core/indexing/refreshIndex.ts @@ -416,11 +416,9 @@ export async function getComputeDeleteAddRemove( export class GlobalCacheCodeBaseIndex implements CodebaseIndex { relativeExpectedTime: number = 1; - private db: DatabaseConnection; - constructor(db: DatabaseConnection) { - this.db = db; - } + constructor(private db: DatabaseConnection) {} + artifactId = "globalCache"; static async create(): Promise { diff --git a/core/indexing/walkDir.ts b/core/indexing/walkDir.ts index eeeb064d0..4ce2d3961 100644 --- a/core/indexing/walkDir.ts +++ b/core/indexing/walkDir.ts @@ -38,15 +38,13 @@ type IgnoreContext = { }; class DFSWalker { - private readonly path: string; - private readonly ide: IDE; - private readonly options: WalkerOptions; private readonly ignoreFileNames: Set; - constructor(path: string, ide: IDE, options: WalkerOptions) { - this.path = path; - this.ide = ide; - this.options = options; + constructor( + private readonly path: string, + private readonly ide: IDE, + private readonly options: WalkerOptions, + ) { this.ignoreFileNames = new Set(options.ignoreFiles); } @@ -128,10 +126,7 @@ class DFSWalker { ignore: ignore().add(patterns), dirname: curDir.walkableEntry.relPath, }; - return [ - ...curDir.ignoreContexts, - newIgnoreContext - ]; + return [...curDir.ignoreContexts, newIgnoreContext]; } private async loadIgnoreFiles(entries: WalkableEntry[]): Promise { @@ -147,7 +142,10 @@ class DFSWalker { return this.ignoreFileNames.has(p); } - private shouldInclude(walkableEntry: WalkableEntry, ignoreContexts: IgnoreContext[]) { + private shouldInclude( + walkableEntry: WalkableEntry, + ignoreContexts: IgnoreContext[], + ) { 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/util/generateRepoMap.ts b/core/util/generateRepoMap.ts index 785a62c41..fb4be85d7 100644 --- a/core/util/generateRepoMap.ts +++ b/core/util/generateRepoMap.ts @@ -12,9 +12,6 @@ export interface RepoMapOptions { } class RepoMapGenerator { - private llm: ILLM; - private ide: IDE; - private options: RepoMapOptions; private maxRepoMapTokens: number; private repoMapPath: string = getRepoMapFilePath(); @@ -32,10 +29,11 @@ class RepoMapGenerator { "this map contains the name of the file, and the signature for any " + "classes, methods, or functions in the file.\n\n"; - constructor(llm: ILLM, ide: IDE, options: RepoMapOptions) { - this.llm = llm; - this.ide = ide; - this.options = options; + constructor( + private llm: ILLM, + private ide: IDE, + private options: RepoMapOptions, + ) { this.maxRepoMapTokens = llm.contextLength * this.REPO_MAX_CONTEXT_LENGTH_RATIO; } diff --git a/extensions/vscode/src/diff/vertical/decorations.ts b/extensions/vscode/src/diff/vertical/decorations.ts index 276145207..5d3ae7525 100644 --- a/extensions/vscode/src/diff/vertical/decorations.ts +++ b/extensions/vscode/src/diff/vertical/decorations.ts @@ -36,16 +36,10 @@ export const belowIndexDecorationType = }); export class DecorationTypeRangeManager { - private decorationType: vscode.TextEditorDecorationType; - private editor: vscode.TextEditor; - constructor( - decorationType: vscode.TextEditorDecorationType, - editor: vscode.TextEditor, - ) { - this.decorationType = decorationType; - this.editor = editor; - } + private decorationType: vscode.TextEditorDecorationType, + private editor: vscode.TextEditor, + ) {} private ranges: vscode.Range[] = []; diff --git a/extensions/vscode/src/diff/vertical/handler.ts b/extensions/vscode/src/diff/vertical/handler.ts index 125bf065d..d04e7a386 100644 --- a/extensions/vscode/src/diff/vertical/handler.ts +++ b/extensions/vscode/src/diff/vertical/handler.ts @@ -17,9 +17,6 @@ export interface VerticalDiffHandlerOptions { } export class VerticalDiffHandler implements vscode.Disposable { - private editor: vscode.TextEditor; - private startLine: number; - private endLine: number; private currentLineIndex: number; private cancelled = false; @@ -31,12 +28,10 @@ export class VerticalDiffHandler implements vscode.Disposable { private newLinesAdded = 0; - public options: VerticalDiffHandlerOptions; - constructor( - startLine: number, - endLine: number, - editor: vscode.TextEditor, + private startLine: number, + private endLine: number, + private editor: vscode.TextEditor, private readonly editorToVerticalDiffCodeLens: Map< string, VerticalDiffCodeLens[] @@ -46,18 +41,15 @@ export class VerticalDiffHandler implements vscode.Disposable { accept: boolean, ) => void, private readonly refreshCodeLens: () => void, - options: VerticalDiffHandlerOptions, + public options: VerticalDiffHandlerOptions, ) { this.currentLineIndex = startLine; - this.startLine = startLine; - this.endLine = endLine; - this.editor = editor; - this.options = options; this.redDecorationManager = new DecorationTypeRangeManager( redDecorationType, this.editor, ); + this.greenDecorationManager = new DecorationTypeRangeManager( greenDecorationType, this.editor, diff --git a/extensions/vscode/src/terminal/terminalEmulator.ts b/extensions/vscode/src/terminal/terminalEmulator.ts index d76823da6..b2a7a99a9 100644 --- a/extensions/vscode/src/terminal/terminalEmulator.ts +++ b/extensions/vscode/src/terminal/terminalEmulator.ts @@ -129,7 +129,6 @@ export class CapturedTerminal { private readonly writeEmitter: vscode.EventEmitter; private splitByCommandsBuffer = ""; - private readonly onCommandOutput: ((output: string) => void) | undefined; splitByCommandsListener(data: string) { // Split the output by commands so it can be sent to Continue Server @@ -164,10 +163,8 @@ export class CapturedTerminal { constructor( options: { name: string } & Partial, - onCommandOutput?: (output: string) => void, + private readonly onCommandOutput?: (output: string) => void, ) { - this.onCommandOutput = onCommandOutput; - // this.shellCmd = "bash"; // getDefaultShell(); this.shellCmd = getDefaultShell(); diff --git a/extensions/vscode/src/util/loadAutocompleteModel.ts b/extensions/vscode/src/util/loadAutocompleteModel.ts index 4437c11d1..9b86c7751 100644 --- a/extensions/vscode/src/util/loadAutocompleteModel.ts +++ b/extensions/vscode/src/util/loadAutocompleteModel.ts @@ -13,11 +13,7 @@ export class TabAutocompleteModel { private shownOllamaWarning = false; private shownDeepseekWarning = false; - private configHandler: ConfigHandler; - - constructor(configHandler: ConfigHandler) { - this.configHandler = configHandler; - } + constructor(private configHandler: ConfigHandler) {} clearLlm() { this._llm = undefined; diff --git a/packages/openai-adapters/src/apis/AzureOpenAI.ts b/packages/openai-adapters/src/apis/AzureOpenAI.ts index 6d74c029f..4ca592717 100644 --- a/packages/openai-adapters/src/apis/AzureOpenAI.ts +++ b/packages/openai-adapters/src/apis/AzureOpenAI.ts @@ -31,10 +31,8 @@ const MS_TOKEN = 30; export class AzureOpenAIApi implements BaseLlmApi { private client: OpenAIClient; - private config: LlmApiConfig; - constructor(config: LlmApiConfig) { - this.config = config; + constructor(private config: LlmApiConfig) { let proxyOptions; const PROXY = HTTPS_PROXY ?? HTTP_PROXY; if (PROXY) { From 87bc0f0ab42b852f77582d0df9f060a1c00442db Mon Sep 17 00:00:00 2001 From: DongjaJ Date: Fri, 18 Oct 2024 14:26:59 +0900 Subject: [PATCH 08/70] refactor: declare public class properties and initialize --- core/autocomplete/cache.ts | 6 +----- core/context/providers/CustomContextProvider.ts | 5 +---- .../codeLens/providers/DiffViewerCodeLensProvider.ts | 6 +----- .../providers/QuickActionsCodeLensProvider.ts | 12 +++--------- 4 files changed, 6 insertions(+), 23 deletions(-) diff --git a/core/autocomplete/cache.ts b/core/autocomplete/cache.ts index 5005480bf..3808edcb6 100644 --- a/core/autocomplete/cache.ts +++ b/core/autocomplete/cache.ts @@ -8,11 +8,7 @@ export class AutocompleteLruCache { private static capacity = 1000; private mutex = new Mutex(); - db: DatabaseConnection; - - constructor(db: DatabaseConnection) { - this.db = db; - } + constructor(public db: DatabaseConnection) {} static async get(): Promise { const db = await open({ diff --git a/core/context/providers/CustomContextProvider.ts b/core/context/providers/CustomContextProvider.ts index ac14dc9f4..26c9eaf87 100644 --- a/core/context/providers/CustomContextProvider.ts +++ b/core/context/providers/CustomContextProvider.ts @@ -8,10 +8,7 @@ import type { } from "../../"; class CustomContextProviderClass implements IContextProvider { - custom: CustomContextProvider; - constructor(custom: CustomContextProvider) { - this.custom = custom; - } + constructor(public custom: CustomContextProvider) {} get description(): ContextProviderDescription { return { diff --git a/extensions/vscode/src/lang-server/codeLens/providers/DiffViewerCodeLensProvider.ts b/extensions/vscode/src/lang-server/codeLens/providers/DiffViewerCodeLensProvider.ts index 405df9a24..4d5b23d55 100644 --- a/extensions/vscode/src/lang-server/codeLens/providers/DiffViewerCodeLensProvider.ts +++ b/extensions/vscode/src/lang-server/codeLens/providers/DiffViewerCodeLensProvider.ts @@ -4,11 +4,7 @@ import { DiffManager, DIFF_DIRECTORY } from "../../../diff/horizontal"; import { getMetaKeyLabel } from "../../../util/util"; export class DiffViewerCodeLensProvider implements vscode.CodeLensProvider { - diffManager: DiffManager; - - constructor(diffManager: DiffManager) { - this.diffManager = diffManager; - } + constructor(public diffManager: DiffManager) {} public provideCodeLenses( document: vscode.TextDocument, diff --git a/extensions/vscode/src/lang-server/codeLens/providers/QuickActionsCodeLensProvider.ts b/extensions/vscode/src/lang-server/codeLens/providers/QuickActionsCodeLensProvider.ts index 5f6748b61..5511a9098 100644 --- a/extensions/vscode/src/lang-server/codeLens/providers/QuickActionsCodeLensProvider.ts +++ b/extensions/vscode/src/lang-server/codeLens/providers/QuickActionsCodeLensProvider.ts @@ -62,13 +62,7 @@ export class QuickActionsCodeLensProvider implements vscode.CodeLensProvider { vscode.SymbolKind.Constructor, ]; - customQuickActionsConfig?: QuickActionConfig[]; - - constructor(customQuickActionsConfigs?: QuickActionConfig[]) { - if (customQuickActionsConfigs) { - this.customQuickActionsConfig = customQuickActionsConfigs; - } - } + constructor(public customQuickActionsConfigs?: QuickActionConfig[]) {} getCustomCommands( range: vscode.Range, @@ -145,8 +139,8 @@ export class QuickActionsCodeLensProvider implements vscode.CodeLensProvider { const symbols = await this.getTopLevelAndChildrenSymbols(document.uri); return symbols.flatMap(({ range }) => { - const commands: vscode.Command[] = !!this.customQuickActionsConfig - ? this.getCustomCommands(range, this.customQuickActionsConfig) + const commands: vscode.Command[] = !!this.customQuickActionsConfigs + ? this.getCustomCommands(range, this.customQuickActionsConfigs) : this.getDefaultCommand(range); return commands.map((command) => new vscode.CodeLens(range, command)); From dd71bf61afcd2d4cc46e7a6330c08e41d8ad3307 Mon Sep 17 00:00:00 2001 From: sadie100 <03sadie@gmail.com> Date: Fri, 18 Oct 2024 14:54:18 +0900 Subject: [PATCH 09/70] docs: add Anthropic explanation --- docs/docs/customize/model-providers/top-level/anthropic.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/docs/customize/model-providers/top-level/anthropic.md b/docs/docs/customize/model-providers/top-level/anthropic.md index c4bb24a4c..fd22b3d6d 100644 --- a/docs/docs/customize/model-providers/top-level/anthropic.md +++ b/docs/docs/customize/model-providers/top-level/anthropic.md @@ -3,6 +3,8 @@ title: Anthropic slug: ../anthropic --- +Anthropic provider offers access to the Claude series of large language models, developed by Anthropic. + :::info You can get an API key from the [Anthropic console](https://console.anthropic.com/account/keys). From f8f681b523a6ccddd6658b76b78c65100e1d99ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=91=A3=E6=96=87=E6=B6=9B?= Date: Fri, 18 Oct 2024 15:56:39 +0800 Subject: [PATCH 10/70] fix edit command prefix and suffix range bug maxStartLine should minus 1 curEndLine should plus 1 --- core/commands/slash/edit.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/commands/slash/edit.ts b/core/commands/slash/edit.ts index c39fb2dc0..aafafa67e 100644 --- a/core/commands/slash/edit.ts +++ b/core/commands/slash/edit.ts @@ -95,10 +95,10 @@ export async function getPromptParts( } let filePrefix = fullFileContentsList - .slice(curStartLine, maxStartLine) + .slice(curStartLine, maxStartLine - 1) .join("\n"); let fileSuffix = fullFileContentsList - .slice(minEndLine, curEndLine - 1) + .slice(minEndLine, curEndLine + 1) .join("\n"); if (rif.contents.length > 0) { From dba31495fdcdc2d1f3331c00616b590ae64e10a3 Mon Sep 17 00:00:00 2001 From: classbinu Date: Fri, 18 Oct 2024 22:30:43 +0900 Subject: [PATCH 11/70] docs: Update Recommended reranking models --- docs/docs/customize/model-types/reranking.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/docs/customize/model-types/reranking.md b/docs/docs/customize/model-types/reranking.md index 5f3fd77a3..2032aaf13 100644 --- a/docs/docs/customize/model-types/reranking.md +++ b/docs/docs/customize/model-types/reranking.md @@ -11,11 +11,11 @@ In Continue, reranking is used by [@Codebase](../deep-dives/codebase.md) in orde ## Recommended reranking models -If you have the ability to use any model, we recommend `rerank-1` by Voyage AI, which is listed below along with the rest of the options for rerankers. +If you have the ability to use any model, we recommend `rerank-2` by Voyage AI, which is listed below along with the rest of the options for rerankers. ### Voyage AI -Voyage AI offers the best reranking model for code with their `rerank-1` model. After obtaining an API key from [here](https://www.voyageai.com/), you can configure like this: +Voyage AI offers the best reranking model for code with their `rerank-2` model. After obtaining an API key from [here](https://www.voyageai.com/), you can configure like this: ```json title="config.json" { From 97a4a81f4dc27f3662d0c0522604a5db4624b05d Mon Sep 17 00:00:00 2001 From: Kyle Li Date: Fri, 18 Oct 2024 17:01:08 -0700 Subject: [PATCH 12/70] fix history bug --- extensions/vscode/package-lock.json | 1 + gui/src/hooks/useChatHandler.ts | 12 +++++++++++- gui/src/hooks/useHistory.tsx | 8 +++++--- 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/extensions/vscode/package-lock.json b/extensions/vscode/package-lock.json index f7ab438b3..1abf35ad9 100644 --- a/extensions/vscode/package-lock.json +++ b/extensions/vscode/package-lock.json @@ -116,6 +116,7 @@ "dotenv": "^16.4.5", "fastest-levenshtein": "^1.0.16", "follow-redirects": "^1.15.5", + "google-auth-library": "^9.14.2", "handlebars": "^4.7.8", "http-proxy-agent": "^7.0.1", "https-proxy-agent": "^7.0.3", diff --git a/gui/src/hooks/useChatHandler.ts b/gui/src/hooks/useChatHandler.ts index 655cfce96..c90c044dc 100644 --- a/gui/src/hooks/useChatHandler.ts +++ b/gui/src/hooks/useChatHandler.ts @@ -15,7 +15,7 @@ import { constructMessages } from "core/llm/constructMessages"; import { stripImages } from "core/llm/images"; import { getBasename, getRelativePath } from "core/util"; import { usePostHog } from "posthog-js/react"; -import { useEffect, useRef } from "react"; +import { useEffect, useRef, useState } from "react"; import { useSelector } from "react-redux"; import resolveEditorContent, { hasSlashCommandOrContextProvider, @@ -35,6 +35,7 @@ import { } from "../redux/slices/stateSlice"; import { resetNextCodeBlockToApplyIndex } from "../redux/slices/uiStateSlice"; import { RootState } from "../redux/store"; +import useHistory from "./useHistory"; function useChatHandler(dispatch: Dispatch, ideMessenger: IIdeMessenger) { const posthog = usePostHog(); @@ -56,6 +57,14 @@ function useChatHandler(dispatch: Dispatch, ideMessenger: IIdeMessenger) { const active = useSelector((store: RootState) => store.state.active); const activeRef = useRef(active); + const {saveSession} = useHistory(dispatch); + const [save, triggerSave] = useState(false); + + useEffect(() => { + saveSession(false); + }, [save]); + + useEffect(() => { activeRef.current = active; }, [active]); @@ -309,6 +318,7 @@ function useChatHandler(dispatch: Dispatch, ideMessenger: IIdeMessenger) { ]); } finally { dispatch(setInactive()); + triggerSave(!save); } } diff --git a/gui/src/hooks/useHistory.tsx b/gui/src/hooks/useHistory.tsx index 62ccf5165..5f5391ebc 100644 --- a/gui/src/hooks/useHistory.tsx +++ b/gui/src/hooks/useHistory.tsx @@ -48,11 +48,14 @@ function useHistory(dispatch: Dispatch) { return result.status === "success" ? result.content : undefined; } - async function saveSession() { + async function saveSession(open_new_session = true) { if (state.history.length === 0) return; const stateCopy = { ...state }; - dispatch(newSession()); + if (open_new_session){ + dispatch(newSession()); + updateLastSessionId(stateCopy.sessionId); + } await new Promise((resolve) => setTimeout(resolve, 10)); if ( @@ -93,7 +96,6 @@ function useHistory(dispatch: Dispatch) { sessionId: stateCopy.sessionId, workspaceDirectory: window.workspacePaths?.[0] || "", }; - updateLastSessionId(stateCopy.sessionId); return await ideMessenger.request("history/save", sessionInfo); } From 889d49505d34726cbae85a380f0ef770e61ab9de Mon Sep 17 00:00:00 2001 From: sadie100 <03sadie@gmail.com> Date: Sat, 19 Oct 2024 10:13:30 +0900 Subject: [PATCH 13/70] docs: add Amazon Bedrock explanation --- docs/docs/customize/model-providers/top-level/bedrock.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/docs/customize/model-providers/top-level/bedrock.md b/docs/docs/customize/model-providers/top-level/bedrock.md index 14cc70211..7129fd3bc 100644 --- a/docs/docs/customize/model-providers/top-level/bedrock.md +++ b/docs/docs/customize/model-providers/top-level/bedrock.md @@ -3,6 +3,8 @@ title: Amazon Bedrock slug: ../bedrock --- +Amazon Bedrock is a fully managed service that provides access to various foundation models from various AI companies through a single API, offering capabilities for building secure and responsible generative AI applications. + ## Chat model We recommend configuring **Claude 3.5 Sonnet** as your chat model. From 7204ea2bd049e01b443e5f050c5204b4588b824e Mon Sep 17 00:00:00 2001 From: Kyle Li Date: Fri, 18 Oct 2024 19:51:19 -0700 Subject: [PATCH 14/70] log quickEdit --- extensions/vscode/package-lock.json | 1 + extensions/vscode/src/diff/vertical/handler.ts | 3 +++ extensions/vscode/src/diff/vertical/manager.ts | 8 +++++--- extensions/vscode/src/quickEdit/QuickEditQuickPick.ts | 4 +++- 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/extensions/vscode/package-lock.json b/extensions/vscode/package-lock.json index f7ab438b3..1abf35ad9 100644 --- a/extensions/vscode/package-lock.json +++ b/extensions/vscode/package-lock.json @@ -116,6 +116,7 @@ "dotenv": "^16.4.5", "fastest-levenshtein": "^1.0.16", "follow-redirects": "^1.15.5", + "google-auth-library": "^9.14.2", "handlebars": "^4.7.8", "http-proxy-agent": "^7.0.1", "https-proxy-agent": "^7.0.3", diff --git a/extensions/vscode/src/diff/vertical/handler.ts b/extensions/vscode/src/diff/vertical/handler.ts index 125bf065d..ff42ede80 100644 --- a/extensions/vscode/src/diff/vertical/handler.ts +++ b/extensions/vscode/src/diff/vertical/handler.ts @@ -344,6 +344,7 @@ export class VerticalDiffHandler implements vscode.Disposable { } async run(diffLineGenerator: AsyncGenerator) { + let diffLines = [] try { // As an indicator of loading this.updateIndexLineDecorations(); @@ -352,6 +353,7 @@ export class VerticalDiffHandler implements vscode.Disposable { if (this.isCancelled) { return; } + diffLines.push(diffLine) await this.queueDiffLine(diffLine); } @@ -374,6 +376,7 @@ export class VerticalDiffHandler implements vscode.Disposable { this.clearForFilepath(this.filepath, false); throw e; } + return diffLines } async acceptRejectBlock( diff --git a/extensions/vscode/src/diff/vertical/manager.ts b/extensions/vscode/src/diff/vertical/manager.ts index 985a6ba29..5a6f8a96d 100644 --- a/extensions/vscode/src/diff/vertical/manager.ts +++ b/extensions/vscode/src/diff/vertical/manager.ts @@ -22,6 +22,8 @@ export class VerticalDiffManager { private userChangeListener: vscode.Disposable | undefined; + logDiffs: DiffLine[] | undefined; + constructor( private readonly configHandler: ConfigHandler, private readonly webviewProtocol: VsCodeWebviewProtocol, @@ -237,8 +239,8 @@ export class VerticalDiffManager { ); try { - await diffHandler.run(diffStream); - + this.logDiffs = await diffHandler.run(diffStream); + // enable a listener for user edits to file while diff is open this.enableDocumentChangeListener(); } catch (e) { @@ -410,7 +412,7 @@ export class VerticalDiffManager { ); try { - await diffHandler.run( + this.logDiffs = await diffHandler.run( streamDiffLines( prefix, rangeContent, diff --git a/extensions/vscode/src/quickEdit/QuickEditQuickPick.ts b/extensions/vscode/src/quickEdit/QuickEditQuickPick.ts index 0cc11a0ad..3f3b014eb 100644 --- a/extensions/vscode/src/quickEdit/QuickEditQuickPick.ts +++ b/extensions/vscode/src/quickEdit/QuickEditQuickPick.ts @@ -15,6 +15,7 @@ import { ConfigHandler } from "core/config/ConfigHandler"; import { getModelByRole } from "core/config/util"; // @ts-ignore import MiniSearch from "minisearch"; +import { logDevData } from "core/util/devdata"; /** * Used to track what action to take after a user interacts @@ -236,7 +237,8 @@ export class QuickEdit { default: break; } - + let model = await this.getCurModelTitle(); + logDevData('quickEdit', {prompt, path, label, diffs: this.verticalDiffManager.logDiffs, model}); quickPick.dispose(); }); } From e83f8e19289803d29fdfa5fd2e2330e58e17ce4a Mon Sep 17 00:00:00 2001 From: Kyle Li Date: Fri, 18 Oct 2024 20:59:06 -0700 Subject: [PATCH 15/70] focus continue session id command --- core/protocol/ideWebview.ts | 1 + extensions/vscode/package-lock.json | 1 + extensions/vscode/package.json | 6 ++++++ extensions/vscode/src/commands.ts | 8 ++++++++ gui/src/components/mainInput/TipTapEditor.tsx | 13 ++++++++++++- 5 files changed, 28 insertions(+), 1 deletion(-) diff --git a/core/protocol/ideWebview.ts b/core/protocol/ideWebview.ts index 3b357b679..bf79315ee 100644 --- a/core/protocol/ideWebview.ts +++ b/core/protocol/ideWebview.ts @@ -66,6 +66,7 @@ export type ToWebviewFromIdeProtocol = ToWebviewFromIdeOrCoreProtocol & { * @deprecated Use navigateTo with a path instead. */ viewHistory: [undefined, void]; + focusContinueSessionId: [{ sessionId: string | undefined }, void]; newSession: [undefined, void]; setTheme: [{ theme: any }, void]; setColors: [{ [key: string]: string }, void]; diff --git a/extensions/vscode/package-lock.json b/extensions/vscode/package-lock.json index f7ab438b3..1abf35ad9 100644 --- a/extensions/vscode/package-lock.json +++ b/extensions/vscode/package-lock.json @@ -116,6 +116,7 @@ "dotenv": "^16.4.5", "fastest-levenshtein": "^1.0.16", "follow-redirects": "^1.15.5", + "google-auth-library": "^9.14.2", "handlebars": "^4.7.8", "http-proxy-agent": "^7.0.1", "https-proxy-agent": "^7.0.3", diff --git a/extensions/vscode/package.json b/extensions/vscode/package.json index 174c5dfdc..3166260c5 100644 --- a/extensions/vscode/package.json +++ b/extensions/vscode/package.json @@ -280,6 +280,12 @@ "category": "Continue", "title": "Docs Force Re-Index", "group": "Continue" + }, + { + "command": "continue.focusContinueSessionId", + "category": "Continue", + "title": "Focus Continue Chat", + "group": "Continue" } ], "keybindings": [ diff --git a/extensions/vscode/src/commands.ts b/extensions/vscode/src/commands.ts index babc695e3..e7373a300 100644 --- a/extensions/vscode/src/commands.ts +++ b/extensions/vscode/src/commands.ts @@ -480,6 +480,14 @@ const commandsMap: ( "continue.viewHistory": () => { sidebar.webviewProtocol?.request("viewHistory", undefined); }, + "continue.focusContinueSessionId": async (sessionId: string | undefined) => { + if (!sessionId) { + sessionId = await vscode.window.showInputBox({ + prompt: "Enter the Session ID" + }); + } + sidebar.webviewProtocol?.request("focusContinueSessionId", { sessionId }); + }, "continue.applyCodeFromChat": () => { sidebar.webviewProtocol.request("applyCodeFromChat", undefined); }, diff --git a/gui/src/components/mainInput/TipTapEditor.tsx b/gui/src/components/mainInput/TipTapEditor.tsx index d98bfef63..3e59f60de 100644 --- a/gui/src/components/mainInput/TipTapEditor.tsx +++ b/gui/src/components/mainInput/TipTapEditor.tsx @@ -151,7 +151,7 @@ function TipTapEditor(props: TipTapEditorProps) { ); const useActiveFile = useSelector(selectUseActiveFile); - const { saveSession } = useHistory(dispatch); + const { saveSession, loadSession } = useHistory(dispatch); const posthog = usePostHog(); const [isEditorFocused, setIsEditorFocused] = useState(false); @@ -807,6 +807,17 @@ function TipTapEditor(props: TipTapEditorProps) { !props.isMainInput, ); + useWebviewListener( + "focusContinueSessionId", + async (data) => { + if (!props.isMainInput) { + return; + } + loadSession(data.sessionId); + }, + [loadSession, props.isMainInput], + ); + const [showDragOverMsg, setShowDragOverMsg] = useState(false); useEffect(() => { From c36f23322265a0d9c28eb401acf49d76294a1249 Mon Sep 17 00:00:00 2001 From: DongjaJ Date: Sat, 19 Oct 2024 14:07:54 +0900 Subject: [PATCH 16/70] fix: modify access modifier public to private --- core/autocomplete/cache.ts | 2 +- core/context/providers/CustomContextProvider.ts | 2 +- .../codeLens/providers/DiffViewerCodeLensProvider.ts | 2 +- .../codeLens/providers/QuickActionsCodeLensProvider.ts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/core/autocomplete/cache.ts b/core/autocomplete/cache.ts index 3808edcb6..4886feb23 100644 --- a/core/autocomplete/cache.ts +++ b/core/autocomplete/cache.ts @@ -8,7 +8,7 @@ export class AutocompleteLruCache { private static capacity = 1000; private mutex = new Mutex(); - constructor(public db: DatabaseConnection) {} + constructor(private db: DatabaseConnection) {} static async get(): Promise { const db = await open({ diff --git a/core/context/providers/CustomContextProvider.ts b/core/context/providers/CustomContextProvider.ts index 26c9eaf87..f87a4554f 100644 --- a/core/context/providers/CustomContextProvider.ts +++ b/core/context/providers/CustomContextProvider.ts @@ -8,7 +8,7 @@ import type { } from "../../"; class CustomContextProviderClass implements IContextProvider { - constructor(public custom: CustomContextProvider) {} + constructor(private custom: CustomContextProvider) {} get description(): ContextProviderDescription { return { diff --git a/extensions/vscode/src/lang-server/codeLens/providers/DiffViewerCodeLensProvider.ts b/extensions/vscode/src/lang-server/codeLens/providers/DiffViewerCodeLensProvider.ts index 4d5b23d55..b67db0e52 100644 --- a/extensions/vscode/src/lang-server/codeLens/providers/DiffViewerCodeLensProvider.ts +++ b/extensions/vscode/src/lang-server/codeLens/providers/DiffViewerCodeLensProvider.ts @@ -4,7 +4,7 @@ import { DiffManager, DIFF_DIRECTORY } from "../../../diff/horizontal"; import { getMetaKeyLabel } from "../../../util/util"; export class DiffViewerCodeLensProvider implements vscode.CodeLensProvider { - constructor(public diffManager: DiffManager) {} + constructor(private diffManager: DiffManager) {} public provideCodeLenses( document: vscode.TextDocument, diff --git a/extensions/vscode/src/lang-server/codeLens/providers/QuickActionsCodeLensProvider.ts b/extensions/vscode/src/lang-server/codeLens/providers/QuickActionsCodeLensProvider.ts index 5511a9098..08decb215 100644 --- a/extensions/vscode/src/lang-server/codeLens/providers/QuickActionsCodeLensProvider.ts +++ b/extensions/vscode/src/lang-server/codeLens/providers/QuickActionsCodeLensProvider.ts @@ -62,7 +62,7 @@ export class QuickActionsCodeLensProvider implements vscode.CodeLensProvider { vscode.SymbolKind.Constructor, ]; - constructor(public customQuickActionsConfigs?: QuickActionConfig[]) {} + constructor(private customQuickActionsConfigs?: QuickActionConfig[]) {} getCustomCommands( range: vscode.Range, From dac28f939ba2f6988458809831fbfef3d1a491e5 Mon Sep 17 00:00:00 2001 From: Anantha Kandrapu Date: Fri, 18 Oct 2024 23:44:46 -0700 Subject: [PATCH 17/70] Added Cohere embeddings with bedrock provider --- .../embeddings/BedrockEmbeddingsProvider.ts | 68 +++++++++++++------ 1 file changed, 47 insertions(+), 21 deletions(-) diff --git a/core/indexing/embeddings/BedrockEmbeddingsProvider.ts b/core/indexing/embeddings/BedrockEmbeddingsProvider.ts index bf3bcac88..a5cfce6c4 100644 --- a/core/indexing/embeddings/BedrockEmbeddingsProvider.ts +++ b/core/indexing/embeddings/BedrockEmbeddingsProvider.ts @@ -6,11 +6,14 @@ import { fromIni } from "@aws-sdk/credential-providers"; import { EmbeddingsProviderName, EmbedOptions, FetchFunction } from "../../index.js"; import BaseEmbeddingsProvider from "./BaseEmbeddingsProvider.js"; +interface ModelConfig { + formatPayload: (text: string) => any; + extractEmbeddings: (responseBody: any) => number[][]; +} + class BedrockEmbeddingsProvider extends BaseEmbeddingsProvider { - static providerName: EmbeddingsProviderName = "bedrock"; - - static defaultOptions: Partial | undefined = { + static defaultOptions: Partial = { model: "amazon.titan-embed-text-v2:0", region: "us-east-1" }; @@ -18,6 +21,7 @@ class BedrockEmbeddingsProvider extends BaseEmbeddingsProvider { constructor(options: EmbedOptions, fetch: FetchFunction) { super(options, fetch); + this.options.model = this.options.model || BedrockEmbeddingsProvider.defaultOptions.model!; if (!options.apiBase) { options.apiBase = `https://bedrock-runtime.${options.region}.amazonaws.com`; } @@ -29,7 +33,7 @@ class BedrockEmbeddingsProvider extends BaseEmbeddingsProvider { } } - async embed(chunks: string[]) { + async embed(chunks: string[]): Promise { const credentials = await this._getCredentials(); const client = new BedrockRuntimeClient({ region: this.options.region, @@ -43,41 +47,64 @@ class BedrockEmbeddingsProvider extends BaseEmbeddingsProvider { return ( await Promise.all( chunks.map(async (chunk) => { - const input = this._generateInvokeModelCommandInput(chunk, this.options); + const input = this._generateInvokeModelCommandInput(chunk); const command = new InvokeModelCommand(input); const response = await client.send(command); - if (response.body) { const responseBody = JSON.parse(new TextDecoder().decode(response.body)); - return [responseBody.embedding]; + return this._extractEmbeddings(responseBody); } + return []; }), ) ).flat(); } - private _generateInvokeModelCommandInput( - prompt: string, - options: EmbedOptions, - ): any { - const payload = { - "inputText": prompt, - "dimensions": 512, - "normalize": true - }; + private _generateInvokeModelCommandInput(text: string): any { + const modelConfig = this._getModelConfig(); + const payload = modelConfig.formatPayload(text); return { body: JSON.stringify(payload), modelId: this.options.model, - accept: "application/json", - contentType: "application/json" + accept: "*/*", + contentType: "application/json", }; } + private _extractEmbeddings(responseBody: any): number[][] { + const modelConfig = this._getModelConfig(); + return modelConfig.extractEmbeddings(responseBody); + } + + private _getModelConfig() { + const modelConfigs: { [key: string]: ModelConfig } = { + 'cohere': { + formatPayload: (text: string) => ({ + texts: [text], + input_type: "search_document", + truncate: "END", + }), + extractEmbeddings: (responseBody: any) => responseBody.embeddings || [], + }, + 'amazon.titan-embed': { + formatPayload: (text: string) => ({ + inputText: text, + }), + extractEmbeddings: (responseBody: any) => responseBody.embedding ? [responseBody.embedding] : [], + }, + }; + + const modelPrefix = Object.keys(modelConfigs).find(prefix => this.options.model!.startsWith(prefix)); + if (!modelPrefix) { + throw new Error(`Unsupported model: ${this.options.model}`); + } + return modelConfigs[modelPrefix]; + } + private async _getCredentials() { try { - return await - fromIni({ + return await fromIni({ profile: this.profile, ignoreCache: true })(); @@ -88,7 +115,6 @@ class BedrockEmbeddingsProvider extends BaseEmbeddingsProvider { return await fromIni()(); } } - } export default BedrockEmbeddingsProvider; From bfd9ed388cf05ba28b3844dd290c9214cd1e335e Mon Sep 17 00:00:00 2001 From: Anantha Kandrapu <90415186+Anantha-Kandrapu@users.noreply.github.com> Date: Sat, 19 Oct 2024 20:23:36 -0700 Subject: [PATCH 18/70] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 597256325..9751d618d 100644 --- a/README.md +++ b/README.md @@ -62,4 +62,4 @@ Check out the [contribution ideas board](https://github.com/orgs/continuedev/pro ## License -[Apache 2.0 © 2023 Continue Dev, Inc.](./LICENSE) +[Apache 2.0 © 2023-2024 Continue Dev, Inc.](./LICENSE) From 0d6e941fd44fec760154a2396589b8a651276590 Mon Sep 17 00:00:00 2001 From: Anantha Kandrapu <90415186+Anantha-Kandrapu@users.noreply.github.com> Date: Sat, 19 Oct 2024 20:24:56 -0700 Subject: [PATCH 19/70] Update CHANGELOG.md --- extensions/vscode/CHANGELOG.md | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/extensions/vscode/CHANGELOG.md b/extensions/vscode/CHANGELOG.md index 55bd200ac..cabf54bf2 100644 --- a/extensions/vscode/CHANGELOG.md +++ b/extensions/vscode/CHANGELOG.md @@ -5,11 +5,7 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html), and is generated by [Changie](https://github.com/miniscruff/changie). -## 0.8.54 - 2024-10-15 -### Fixed -* Hotfix: throttle transformers.js embeddings provider - -## 0.8.53 - 2024-10-11 +Pre-release Changes ### Added * Web context provider * Cerebras inference provider From d4168ede774ec75d8ca9264c194d6f852ce22fcb Mon Sep 17 00:00:00 2001 From: tomasz-io Date: Mon, 21 Oct 2024 22:39:10 +0700 Subject: [PATCH 20/70] improv: linting --- .eslintrc.shared.json | 36 ++++++++++++++++++++++++++++++++ core/.eslintrc.json | 13 ++---------- core/package.json | 2 -- extensions/vscode/.eslintrc.json | 16 ++++---------- extensions/vscode/package.json | 3 +-- package.json | 4 +++- 6 files changed, 46 insertions(+), 28 deletions(-) create mode 100644 .eslintrc.shared.json diff --git a/.eslintrc.shared.json b/.eslintrc.shared.json new file mode 100644 index 000000000..f4b9c4c78 --- /dev/null +++ b/.eslintrc.shared.json @@ -0,0 +1,36 @@ +{ + "parser": "@typescript-eslint/parser", + "parserOptions": { + "ecmaVersion": 6, + "sourceType": "module" + }, + "plugins": ["@typescript-eslint", "import"], + "rules": { + "@typescript-eslint/semi": "warn", + "curly": "warn", + "eqeqeq": "warn", + "no-throw-literal": "warn", + "semi": "off", + "import/order": [ + "warn", + { + "groups": [ + "builtin", + "external", + "internal", + "parent", + "sibling", + "index", + "object", + "type" + ], + "alphabetize": { + "order": "asc", + "caseInsensitive": true + }, + "newlines-between": "always" + } + ] + }, + "ignorePatterns": ["out", "dist", "**/*.d.ts"] +} diff --git a/core/.eslintrc.json b/core/.eslintrc.json index 04097f4db..ce1bc2575 100644 --- a/core/.eslintrc.json +++ b/core/.eslintrc.json @@ -1,21 +1,12 @@ { "root": true, - "parser": "@typescript-eslint/parser", + "extends": ["../.eslintrc.shared.json"], "parserOptions": { - "ecmaVersion": 6, - "sourceType": "module", "project": "./tsconfig.json" }, - "plugins": ["@typescript-eslint", "import"], "rules": { "quotes": ["warn", "double", {}], "@typescript-eslint/naming-convention": "off", - "@typescript-eslint/semi": "warn", - "curly": "warn", - "eqeqeq": "warn", - "no-throw-literal": "warn", - "semi": "off", "@typescript-eslint/no-floating-promises": "warn" - }, - "ignorePatterns": ["out", "dist", "**/*.d.ts"] + } } diff --git a/core/package.json b/core/package.json index bdda48184..ed489d1f2 100644 --- a/core/package.json +++ b/core/package.json @@ -32,7 +32,6 @@ "cross-env": "^7.0.3", "esbuild": "0.17.19", "eslint": "^8", - "eslint-plugin-import": "^2.29.1", "jest": "^29.7.0", "jest-environment-jsdom": "^29.7.0", "myers-diff": "^2.1.0", @@ -49,7 +48,6 @@ "@mozilla/readability": "^0.5.0", "@octokit/rest": "^20.0.2", "@typescript-eslint/eslint-plugin": "^7.8.0", - "@typescript-eslint/parser": "^7.8.0", "@xenova/transformers": "2.14.0", "adf-to-md": "^1.1.0", "async-mutex": "^0.5.0", diff --git a/extensions/vscode/.eslintrc.json b/extensions/vscode/.eslintrc.json index 5dfecab7e..c25ccff20 100644 --- a/extensions/vscode/.eslintrc.json +++ b/extensions/vscode/.eslintrc.json @@ -1,18 +1,10 @@ { "root": true, - "parser": "@typescript-eslint/parser", "parserOptions": { - "ecmaVersion": 6, - "sourceType": "module" + "project": "./tsconfig.json" }, - "plugins": ["@typescript-eslint"], + "extends": ["../../.eslintrc.shared.json"], "rules": { - "@typescript-eslint/naming-convention": "warn", - "@typescript-eslint/semi": "warn", - "curly": "warn", - "eqeqeq": "warn", - "no-throw-literal": "warn", - "semi": "off" - }, - "ignorePatterns": ["out", "dist", "**/*.d.ts"] + "@typescript-eslint/naming-convention": "warn" + } } diff --git a/extensions/vscode/package.json b/extensions/vscode/package.json index 28a70181a..49b687fe3 100644 --- a/extensions/vscode/package.json +++ b/extensions/vscode/package.json @@ -2,7 +2,7 @@ "name": "continue", "icon": "media/icon.png", "author": "Continue Dev, Inc", - "version": "0.9.220", + "version": "0.9.222", "repository": { "type": "git", "url": "https://github.com/continuedev/continue" @@ -539,7 +539,6 @@ "@types/vscode": "1.70", "@types/ws": "^8.5.4", "@typescript-eslint/eslint-plugin": "^5.45.0", - "@typescript-eslint/parser": "^5.45.0", "@vscode/vsce": "^2.22.0", "cargo-cp-artifact": "^0.1", "esbuild": "0.17.19", diff --git a/package.json b/package.json index 88e26a707..6d93be403 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,8 @@ { "devDependencies": { "prettier": "^3.3.3", - "prettier-plugin-tailwindcss": "^0.6.8" + "prettier-plugin-tailwindcss": "^0.6.8", + "@typescript-eslint/parser": "^7.8.0", + "eslint-plugin-import": "^2.29.1" } } From 3508a7944cc9f0f57b620ae7c6026ec72b77dd5a Mon Sep 17 00:00:00 2001 From: Pierre Grandin Date: Mon, 21 Oct 2024 13:19:44 -0600 Subject: [PATCH 21/70] minor typo fix --- docs/docs/introduction.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/introduction.md b/docs/docs/introduction.md index 9f5bbe9be..b3f6d87d6 100644 --- a/docs/docs/introduction.md +++ b/docs/docs/introduction.md @@ -20,6 +20,6 @@ keywords: **Continue is the leading open-source AI code assistant inside of [VS Code](https://marketplace.visualstudio.com/items?itemName=Continue.continue) and [JetBrains](https://plugins.jetbrains.com/plugin/22707-continue-extension)** - [Chat](chat/how-to-use-it.md) to understand and iterate on code in the sidebar -- [Autocomplete](autocomplete/how-to-use-it.md) to recieve inline code suggestions as you type +- [Autocomplete](autocomplete/how-to-use-it.md) to receive inline code suggestions as you type - [Edit](edit/how-to-use-it.md) to modify code without leaving your current file - [Actions](actions/how-to-use-it.md) to establish shortcuts for common use cases From 3bb7b7882f853360fc586182c1857e48a1fc3fff Mon Sep 17 00:00:00 2001 From: Rene Brandel <4989523+renebrandel@users.noreply.github.com> Date: Mon, 21 Oct 2024 21:14:55 -0400 Subject: [PATCH 22/70] Adding support for AWS docs for preindexing --- core/indexing/docs/preIndexedDocs.ts | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/core/indexing/docs/preIndexedDocs.ts b/core/indexing/docs/preIndexedDocs.ts index 9da86ef85..83b439d42 100644 --- a/core/indexing/docs/preIndexedDocs.ts +++ b/core/indexing/docs/preIndexedDocs.ts @@ -299,6 +299,30 @@ const preIndexedDocs: Record< rootUrl: "https://docs.godotengine.org/en/latest/", faviconUrl: "https://godotengine.org/favicon.ico", }, + "https://docs.amplify.aws/react/": { + title: "AWS Amplify (Gen 2)", + startUrl: "https://docs.amplify.aws/react/start/", + rootUrl: "https://docs.amplify.aws/react/", + faviconUrl: "https://docs.amplify.aws/favicon.ico" + }, + "https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/": { + title: "AWS SDK for JavaScript v3", + startUrl: "https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/", + rootUrl: "https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/", + faviconUrl: "https://docs.aws.amazon.com/favicon.ico" + }, + "https://docs.aws.amazon.com/cdk/api/v2/docs/aws-construct-library.html": { + title: "AWS CDK v2", + startUrl: "https://docs.aws.amazon.com/cdk/api/v2/docs/aws-construct-library.html", + rootUrl: "https://docs.aws.amazon.com/cdk/api/v2/docs/", + faviconUrl: "https://docs.aws.amazon.com/cdk/api/v2/img/favicon-32x32.png" + }, + "https://awscli.amazonaws.com/v2/documentation/api/latest/index.html": { + title: "AWS CLI commands", + startUrl: "https://awscli.amazonaws.com/v2/documentation/api/latest/index.html", + rootUrl: "https://awscli.amazonaws.com/v2/documentation/api/latest/", + faviconUrl: "https://docs.aws.amazon.com/favicon.ico" + } }; export default preIndexedDocs; From b6e6826676e5d6e87690b505d38806c39639d868 Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Tue, 22 Oct 2024 15:59:52 +0200 Subject: [PATCH 23/70] replace tab-autocomplete untrained model error with warning --- core/autocomplete/completionProvider.ts | 54 +++++++++---------- .../src/quickEdit/QuickEditQuickPick.ts | 7 ++- 2 files changed, 29 insertions(+), 32 deletions(-) diff --git a/core/autocomplete/completionProvider.ts b/core/autocomplete/completionProvider.ts index bc826f934..52b48d6ca 100644 --- a/core/autocomplete/completionProvider.ts +++ b/core/autocomplete/completionProvider.ts @@ -480,9 +480,8 @@ export class CompletionProvider { !llm.model.toLowerCase().includes("codestral") ) { shownGptClaudeWarning = true; - throw new Error( - `Warning: ${llm.model} is not trained for tab-autocomplete, and will result in low-quality suggestions. See the docs to learn more about why: https://docs.continue.dev/features/tab-autocomplete#i-want-better-completions-should-i-use-gpt-4`, - ); + await this.ide.showToast("warning", `${llm.model} is not trained for tab-autocomplete, and will result in low-quality suggestions. See the docs to learn more about why: https://docs.continue.dev/features/tab-autocomplete#i-want-better-completions-should-i-use-gpt-4`); + return; // will not attempt autocomplete first time warning message shown } // Prompt @@ -494,11 +493,10 @@ export class CompletionProvider { if (input.injectDetails) { const lines = fullPrefix.split("\n"); - fullPrefix = `${lines.slice(0, -1).join("\n")}\n${ - lang.singleLineComment - } ${input.injectDetails - .split("\n") - .join(`\n${lang.singleLineComment} `)}\n${lines[lines.length - 1]}`; + fullPrefix = `${lines.slice(0, -1).join("\n")}\n${lang.singleLineComment + } ${input.injectDetails + .split("\n") + .join(`\n${lang.singleLineComment} `)}\n${lines[lines.length - 1]}`; } const fullSuffix = getRangeInString(fileContents, { @@ -519,17 +517,17 @@ export class CompletionProvider { let extrasSnippets = options.useOtherFiles ? ((await Promise.race([ - this.getDefinitionsFromLsp( - filepath, - fullPrefix + fullSuffix, - fullPrefix.length, - this.ide, - lang, - ), - new Promise((resolve) => { - setTimeout(() => resolve([]), 100); - }), - ])) as AutocompleteSnippet[]) + this.getDefinitionsFromLsp( + filepath, + fullPrefix + fullSuffix, + fullPrefix.length, + this.ide, + lang, + ), + new Promise((resolve) => { + setTimeout(() => resolve([]), 100); + }), + ])) as AutocompleteSnippet[]) : []; const workspaceDirs = await this.ide.getWorkspaceDirs(); @@ -568,8 +566,8 @@ export class CompletionProvider { completionOptions, compilePrefixSuffix = undefined, } = options.template - ? { template: options.template, completionOptions: {} } - : getTemplateForModel(llm.model); + ? { template: options.template, completionOptions: {} } + : getTemplateForModel(llm.model); let prompt: string; const filename = getBasename(filepath); @@ -666,14 +664,14 @@ export class CompletionProvider { () => llm.supportsFim() ? llm.streamFim(prefix, suffix, { - ...completionOptions, - stop, - }) + ...completionOptions, + stop, + }) : llm.streamComplete(prompt, { - ...completionOptions, - raw: true, - stop, - }), + ...completionOptions, + raw: true, + stop, + }), multiline, ); diff --git a/extensions/vscode/src/quickEdit/QuickEditQuickPick.ts b/extensions/vscode/src/quickEdit/QuickEditQuickPick.ts index 0cc11a0ad..1116ed67f 100644 --- a/extensions/vscode/src/quickEdit/QuickEditQuickPick.ts +++ b/extensions/vscode/src/quickEdit/QuickEditQuickPick.ts @@ -319,9 +319,8 @@ export class QuickEdit { return isSelectionEmpty ? `Edit ${fileName}` - : `Edit ${fileName}:${start.line}${ - end.line > start.line ? `-${end.line}` : "" - }`; + : `Edit ${fileName}:${start.line}${end.line > start.line ? `-${end.line}` : "" + }`; }; private async _streamEditWithInputAndContext( @@ -385,7 +384,7 @@ export class QuickEdit { const modelTitle = await this.getCurModelTitle(); if (!modelTitle) { - this.ide.showToast("info", "Please configure a model to use Quick Edit"); + this.ide.showToast("error", "Please configure a model to use Quick Edit"); return { label: undefined, value: undefined }; } From 902042c5755c4a201d5cdf72def76efeb58c6650 Mon Sep 17 00:00:00 2001 From: Test Date: Tue, 22 Oct 2024 15:55:20 -0700 Subject: [PATCH 24/70] bugfix(jb): parse .continuerc.json --- core/config/profile/doLoadConfig.ts | 46 ++++++++++++------- .../intellij/.run/Run Extension.run.xml | 2 +- extensions/intellij/CONTRIBUTING.md | 2 +- .../continue/IdeProtocolClient.kt | 4 +- extensions/vscode/package-lock.json | 2 +- gui/package-lock.json | 2 +- 6 files changed, 35 insertions(+), 23 deletions(-) diff --git a/core/config/profile/doLoadConfig.ts b/core/config/profile/doLoadConfig.ts index aa8806867..2bdd9b5fd 100644 --- a/core/config/profile/doLoadConfig.ts +++ b/core/config/profile/doLoadConfig.ts @@ -1,22 +1,22 @@ -import { ContinueProxyReranker } from "../../context/rerankers/ContinueProxyReranker.js"; -import { ControlPlaneProxyInfo } from "../../control-plane/analytics/IAnalyticsProvider.js"; +import { ContinueProxyReranker } from "../../context/rerankers/ContinueProxyReranker"; +import { ControlPlaneProxyInfo } from "../../control-plane/analytics/IAnalyticsProvider"; import { ControlPlaneClient, DEFAULT_CONTROL_PLANE_PROXY_URL, -} from "../../control-plane/client.js"; -import { TeamAnalytics } from "../../control-plane/TeamAnalytics.js"; +} from "../../control-plane/client"; +import { TeamAnalytics } from "../../control-plane/TeamAnalytics"; import { ContinueConfig, ContinueRcJson, IDE, IdeSettings, SerializedContinueConfig, -} from "../../index.js"; -import ContinueProxyEmbeddingsProvider from "../../indexing/embeddings/ContinueProxyEmbeddingsProvider.js"; -import ContinueProxy from "../../llm/llms/stubs/ContinueProxy.js"; -import { Telemetry } from "../../util/posthog.js"; -import { TTS } from "../../util/tts.js"; -import { ConfigResult, loadFullConfigNode } from "../load.js"; +} from "../../"; +import ContinueProxyEmbeddingsProvider from "../../indexing/embeddings/ContinueProxyEmbeddingsProvider"; +import ContinueProxy from "../../llm/llms/stubs/ContinueProxy"; +import { Telemetry } from "../../util/posthog"; +import { TTS } from "../../util/tts"; +import { ConfigResult, loadFullConfigNode } from "../load"; export default async function doLoadConfig( ide: IDE, @@ -26,13 +26,7 @@ export default async function doLoadConfig( overrideConfigJson: SerializedContinueConfig | undefined, workspaceId?: string, ): Promise> { - let workspaceConfigs: ContinueRcJson[] = []; - try { - workspaceConfigs = await ide.getWorkspaceConfigs(); - } catch (e) { - console.warn("Failed to load workspace configs"); - } - + const workspaceConfigs = await getWorkspaceConfigs(ide); const ideInfo = await ide.getIdeInfo(); const uniqueId = await ide.getUniqueId(); const ideSettings = await ideSettingsPromise; @@ -127,3 +121,21 @@ async function injectControlPlaneProxyInfo( return config; } + +async function getWorkspaceConfigs(ide: IDE): Promise { + const ideInfo = await ide.getIdeInfo(); + let workspaceConfigs: ContinueRcJson[] = []; + + try { + workspaceConfigs = await ide.getWorkspaceConfigs(); + + // Config is sent over the wire from JB so we need to parse it + if (ideInfo.ideType === "jetbrains") { + workspaceConfigs = (workspaceConfigs as any).map(JSON.parse); + } + } catch (e) { + console.debug("Failed to load workspace configs: ", e); + } + + return workspaceConfigs; +} diff --git a/extensions/intellij/.run/Run Extension.run.xml b/extensions/intellij/.run/Run Extension.run.xml index 9e5ae46a9..fd9562480 100644 --- a/extensions/intellij/.run/Run Extension.run.xml +++ b/extensions/intellij/.run/Run Extension.run.xml @@ -4,7 +4,7 @@ diff --git a/extensions/intellij/CONTRIBUTING.md b/extensions/intellij/CONTRIBUTING.md index 544cb6323..a08430c3b 100644 --- a/extensions/intellij/CONTRIBUTING.md +++ b/extensions/intellij/CONTRIBUTING.md @@ -86,7 +86,7 @@ through the `Core binary` task. - `extensions/intellij`: Breakpoints can be set in Intellij - `gui`: You'll need to set explicit `debugger` statements in the source code, or through the browser dev tools -- `core`: Breakpoints can be set in VS Code +- `core`: Breakpoints can be set in VS Code (requires restarting the _Core Binary_ task) ### Available Gradle tasks diff --git a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/IdeProtocolClient.kt b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/IdeProtocolClient.kt index f523451f7..2b07229ae 100644 --- a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/IdeProtocolClient.kt +++ b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/IdeProtocolClient.kt @@ -300,7 +300,7 @@ class IdeProtocolClient( "getWorkspaceConfigs" -> { val workspaceDirs = workspaceDirectories() - val configs: List = listOf() + val configs = mutableListOf() for (workspaceDir in workspaceDirs) { val workspacePath = File(workspaceDir) val dir = VirtualFileManager.getInstance().findFileByUrl("file://$workspacePath") @@ -312,7 +312,7 @@ class IdeProtocolClient( if (file.endsWith(".continuerc.json")) { val filePath = workspacePath.resolve(file) val fileContent = File(filePath.toString()).readText() - configs.plus(fileContent) + configs.add(fileContent) } } } diff --git a/extensions/vscode/package-lock.json b/extensions/vscode/package-lock.json index 916003d86..4c137be21 100644 --- a/extensions/vscode/package-lock.json +++ b/extensions/vscode/package-lock.json @@ -98,7 +98,7 @@ "@aws-sdk/client-bedrock-runtime": "^3.620.1", "@aws-sdk/client-sagemaker-runtime": "^3.621.0", "@aws-sdk/credential-providers": "^3.620.1", - "@continuedev/config-types": "^1.0.10", + "@continuedev/config-types": "^1.0.13", "@continuedev/llm-info": "^1.0.2", "@mozilla/readability": "^0.5.0", "@octokit/rest": "^20.0.2", diff --git a/gui/package-lock.json b/gui/package-lock.json index e86bfa61f..25a992592 100644 --- a/gui/package-lock.json +++ b/gui/package-lock.json @@ -99,7 +99,7 @@ "@aws-sdk/client-bedrock-runtime": "^3.620.1", "@aws-sdk/client-sagemaker-runtime": "^3.621.0", "@aws-sdk/credential-providers": "^3.620.1", - "@continuedev/config-types": "^1.0.10", + "@continuedev/config-types": "^1.0.13", "@continuedev/llm-info": "^1.0.2", "@mozilla/readability": "^0.5.0", "@octokit/rest": "^20.0.2", From a95558fc9989a7d0f3959a02f14e24fa5cb22200 Mon Sep 17 00:00:00 2001 From: Test Date: Tue, 22 Oct 2024 18:11:24 -0700 Subject: [PATCH 25/70] Update CodeBlockToolbar.tsx --- .../components/markdown/CodeBlockToolbar.tsx | 43 ++++++++++++------- 1 file changed, 27 insertions(+), 16 deletions(-) diff --git a/gui/src/components/markdown/CodeBlockToolbar.tsx b/gui/src/components/markdown/CodeBlockToolbar.tsx index aecaa1b84..c2049d7b4 100644 --- a/gui/src/components/markdown/CodeBlockToolbar.tsx +++ b/gui/src/components/markdown/CodeBlockToolbar.tsx @@ -225,9 +225,20 @@ function CodeBlockToolBar(props: CodeBlockToolBarProps) { style={{ backgroundColor: vscEditorBackground }} onClick={onClickApply} > - + )} + + {isApplying ? ( + + ) : ( + + )} + - + @@ -246,7 +257,7 @@ function CodeBlockToolBar(props: CodeBlockToolBarProps) { return (
@@ -256,18 +267,18 @@ function CodeBlockToolBar(props: CodeBlockToolBarProps) {
{isCopied ? ( <> - + Copied ) : ( <> - - Copy + + Copy )}
@@ -281,11 +292,11 @@ function CodeBlockToolBar(props: CodeBlockToolBarProps) { style={{ color: lightGray }} >
- - Apply + + Apply
) : applyState === "done" ? ( @@ -294,8 +305,8 @@ function CodeBlockToolBar(props: CodeBlockToolBarProps) { onClick={onClickReject} tooltipContent={`${getMetaKeyLabel()}⇧⌫`} > - -
+ +
Reject
@@ -304,16 +315,16 @@ function CodeBlockToolBar(props: CodeBlockToolBarProps) { onClick={onClickAccept} tooltipContent={`${getMetaKeyLabel()}⇧⏎`} > - -
+ +
Accept
) : ( -
+
Date: Tue, 22 Oct 2024 19:15:30 -0700 Subject: [PATCH 26/70] Fix false positives when checking if a file is in a workspace --- core/autocomplete/completionProvider.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/autocomplete/completionProvider.ts b/core/autocomplete/completionProvider.ts index bc826f934..9b9f0a455 100644 --- a/core/autocomplete/completionProvider.ts +++ b/core/autocomplete/completionProvider.ts @@ -268,7 +268,10 @@ export class CompletionProvider { const workspaceDirs = await this.ide.getWorkspaceDirs(); let filepath = input.filepath; for (const workspaceDir of workspaceDirs) { - if (filepath.startsWith(workspaceDir)) { + const relativePath = path.relative(workspaceDir, filepath); + const relativePathBase = relativePath.split(path.sep).at(0); + const isInWorkspace = !path.isAbsolute(relativePath) && relativePathBase !== ".."; + if (isInWorkspace) { filepath = path.relative(workspaceDir, filepath); break; } From 0a5dc2bed250ecc37b1c1642012ff192aa029e8b Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Wed, 23 Oct 2024 04:27:43 +0200 Subject: [PATCH 27/70] validate tabautocomplete model(s) in config --- core/autocomplete/completionProvider.ts | 2 +- core/config/validation.ts | 33 +++++++++++++++++++++++-- sync/src/sync/merkle.rs | 2 +- 3 files changed, 33 insertions(+), 4 deletions(-) diff --git a/core/autocomplete/completionProvider.ts b/core/autocomplete/completionProvider.ts index 52b48d6ca..94e969e3b 100644 --- a/core/autocomplete/completionProvider.ts +++ b/core/autocomplete/completionProvider.ts @@ -129,7 +129,7 @@ function formatExternalSnippet( } let shownGptClaudeWarning = false; -const nonAutocompleteModels = [ +export const nonAutocompleteModels = [ // "gpt", // "claude", "mistral", diff --git a/core/config/validation.ts b/core/config/validation.ts index 9da86c6ef..4177c7b2a 100644 --- a/core/config/validation.ts +++ b/core/config/validation.ts @@ -1,4 +1,5 @@ -import { SerializedContinueConfig } from "../"; +import { ModelDescription, SerializedContinueConfig } from "../"; +import { nonAutocompleteModels } from "../autocomplete/completionProvider"; import { Telemetry } from "../util/posthog"; export interface ConfigValidationError { @@ -14,7 +15,7 @@ export interface ConfigValidationError { export function validateConfig(config: SerializedContinueConfig) { const errors: ConfigValidationError[] = []; - // Validate models + // Validate chat models if (!Array.isArray(config.models) || config.models.length === 0) { errors.push({ fatal: true, @@ -34,9 +35,37 @@ export function validateConfig(config: SerializedContinueConfig) { message: `Model at index ${index} has an invalid 'provider'.`, }); } + if (typeof model.provider !== "string") { + errors.push({ + fatal: true, + message: `Model at index ${index} has an invalid 'provider'.`, + }); + } }); } + // Validate tab autocomplete model(s) + if (config.tabAutocompleteModel) { + function checkTabAutocompleteModel(modelDescription: ModelDescription, index?: number) { + if ( + nonAutocompleteModels.some((m) => modelDescription.model.includes(m)) && + !modelDescription.model.toLowerCase().includes("deepseek") && + !modelDescription.model.toLowerCase().includes("codestral") + ) { + errors.push({ + fatal: false, + message: `${modelDescription.model} is not trained for tab-autocomplete, and will result in low-quality suggestions. See the docs to learn more about why: https://docs.continue.dev/features/tab-autocomplete#i-want-better-completions-should-i-use-gpt-4`, + }); + } + } + + if (Array.isArray(config.tabAutocompleteModel)) { + config.tabAutocompleteModel.forEach(checkTabAutocompleteModel); + } else { + checkTabAutocompleteModel(config.tabAutocompleteModel); + } + } + // Validate slashCommands if (config.slashCommands) { if (!Array.isArray(config.slashCommands)) { diff --git a/sync/src/sync/merkle.rs b/sync/src/sync/merkle.rs index 7dd99702a..5c78fb38f 100644 --- a/sync/src/sync/merkle.rs +++ b/sync/src/sync/merkle.rs @@ -423,7 +423,7 @@ fn global_ignore_path() -> PathBuf { let mut path = get_my_home().unwrap().unwrap(); path.push(".continue"); path.push("index"); - path.push(".globalcontinueignore"); + path.push(".continueignore"); path } From 8d0d6831d1d4b8c092664b170ec94fa5b34f8c12 Mon Sep 17 00:00:00 2001 From: Nate Date: Tue, 22 Oct 2024 19:33:57 -0700 Subject: [PATCH 28/70] refactor auth environment constants --- .vscode/launch.json | 4 +- core/config/profile/doLoadConfig.ts | 17 ++++--- .../providers/ContinueProxyContextProvider.ts | 12 +++-- core/control-plane/client.ts | 14 +----- core/control-plane/env.ts | 50 +++++++++++++++++++ .../src/ContinueGUIWebviewViewProvider.ts | 2 +- extensions/vscode/src/VsCodeIde.ts | 2 +- .../vscode/src/activation/inlineTips.ts | 2 +- .../vscode/src/autocomplete/statusBar.ts | 2 +- extensions/vscode/src/commands.ts | 2 +- .../vscode/src/extension/VsCodeExtension.ts | 4 +- .../vscode/src/stubs/WorkOsAuthProvider.ts | 47 ++++++++--------- extensions/vscode/src/stubs/activation.ts | 2 +- extensions/vscode/src/stubs/auth.ts | 2 +- extensions/vscode/src/stubs/remoteConfig.ts | 2 +- extensions/vscode/src/util/constants.ts | 5 -- extensions/vscode/src/util/ideUtils.ts | 2 +- 17 files changed, 104 insertions(+), 67 deletions(-) create mode 100644 core/control-plane/env.ts delete mode 100644 extensions/vscode/src/util/constants.ts diff --git a/.vscode/launch.json b/.vscode/launch.json index 60c99a924..e895a880b 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -20,7 +20,9 @@ "outFiles": ["${workspaceFolder}/extensions/vscode/out/extension.js"], "preLaunchTask": "vscode-extension:build", "env": { - "CONTROL_PLANE_ENV": "local" + // "staging" for the preview deployment + // "local" for entirely local development of control plane/proxy + // "CONTROL_PLANE_ENV": "staging" } }, { diff --git a/core/config/profile/doLoadConfig.ts b/core/config/profile/doLoadConfig.ts index aa8806867..eede8f7d7 100644 --- a/core/config/profile/doLoadConfig.ts +++ b/core/config/profile/doLoadConfig.ts @@ -1,9 +1,7 @@ import { ContinueProxyReranker } from "../../context/rerankers/ContinueProxyReranker.js"; import { ControlPlaneProxyInfo } from "../../control-plane/analytics/IAnalyticsProvider.js"; -import { - ControlPlaneClient, - DEFAULT_CONTROL_PLANE_PROXY_URL, -} from "../../control-plane/client.js"; +import { ControlPlaneClient } from "../../control-plane/client.js"; +import { controlPlaneEnv } from "../../control-plane/env.js"; import { TeamAnalytics } from "../../control-plane/TeamAnalytics.js"; import { ContinueConfig, @@ -71,10 +69,13 @@ export default async function doLoadConfig( await TTS.setup(); // Set up control plane proxy if configured - let controlPlaneProxyUrl: string = - (newConfig as any).controlPlane?.useContinueForTeamsProxy === false - ? (newConfig as any).controlPlane?.proxyUrl - : DEFAULT_CONTROL_PLANE_PROXY_URL; + const controlPlane = (newConfig as any).controlPlane; + const useOnPremProxy = + controlPlane?.useContinueForTeamsProxy === false && controlPlane?.proxyUrl; + let controlPlaneProxyUrl: string = useOnPremProxy + ? controlPlane?.proxyUrl + : controlPlaneEnv.DEFAULT_CONTROL_PLANE_PROXY_URL; + if (!controlPlaneProxyUrl.endsWith("/")) { controlPlaneProxyUrl += "/"; } diff --git a/core/context/providers/ContinueProxyContextProvider.ts b/core/context/providers/ContinueProxyContextProvider.ts index dc1c9ef22..2dcb91cc8 100644 --- a/core/context/providers/ContinueProxyContextProvider.ts +++ b/core/context/providers/ContinueProxyContextProvider.ts @@ -1,4 +1,4 @@ -import { CONTROL_PLANE_URL } from "../../control-plane/client.js"; +import { controlPlaneEnv } from "../../control-plane/env.js"; import { ContextItem, ContextProviderDescription, @@ -36,7 +36,10 @@ class ContinueProxyContextProvider extends BaseContextProvider { args: LoadSubmenuItemsArgs, ): Promise { const response = await args.fetch( - new URL(`/proxy/context/${this.options.id}/list`, CONTROL_PLANE_URL), + new URL( + `/proxy/context/${this.options.id}/list`, + controlPlaneEnv.CONTROL_PLANE_URL, + ), { method: "GET", headers: { @@ -54,7 +57,10 @@ class ContinueProxyContextProvider extends BaseContextProvider { extras: ContextProviderExtras, ): Promise { const response = await extras.fetch( - new URL(`/proxy/context/${this.options.id}/retrieve`, CONTROL_PLANE_URL), + new URL( + `/proxy/context/${this.options.id}/retrieve`, + controlPlaneEnv.CONTROL_PLANE_URL, + ), { method: "POST", headers: { diff --git a/core/control-plane/client.ts b/core/control-plane/client.ts index 16df8f90c..22d5c7cdb 100644 --- a/core/control-plane/client.ts +++ b/core/control-plane/client.ts @@ -1,6 +1,7 @@ import { ConfigJson } from "@continuedev/config-types"; import fetch, { RequestInit, Response } from "node-fetch"; import { ModelDescription } from "../index.js"; +import { controlPlaneEnv } from "./env.js"; export interface ControlPlaneSessionInfo { accessToken: string; @@ -21,19 +22,8 @@ export interface ControlPlaneModelDescription extends ModelDescription {} export const TRIAL_PROXY_URL = "https://proxy-server-blue-l6vsfbzhba-uw.a.run.app"; -export const DEFAULT_CONTROL_PLANE_PROXY_URL = - process.env.CONTROL_PLANE_ENV === "local" - ? "http://localhost:3001/" - : "https://control-plane-api-service-i3dqylpbqa-uc.a.run.app/"; -// : "https://control-plane-proxy.continue.dev/"; - -export const CONTROL_PLANE_URL = - process.env.CONTROL_PLANE_ENV === "local" - ? "http://localhost:3001/" - : "https://control-plane-api-service-i3dqylpbqa-uc.a.run.app/"; - export class ControlPlaneClient { - private static URL = CONTROL_PLANE_URL; + private static URL = controlPlaneEnv.CONTROL_PLANE_URL; private static ACCESS_TOKEN_VALID_FOR_MS = 1000 * 60 * 5; // 5 minutes private lastAccessTokenRefresh = 0; diff --git a/core/control-plane/env.ts b/core/control-plane/env.ts new file mode 100644 index 000000000..4556ce90f --- /dev/null +++ b/core/control-plane/env.ts @@ -0,0 +1,50 @@ +interface ControlPlaneEnv { + DEFAULT_CONTROL_PLANE_PROXY_URL: string; + CONTROL_PLANE_URL: string; + AUTH_TYPE: string; + WORKOS_CLIENT_ID: string; + APP_URL: string; +} + +export const EXTENSION_NAME = "continue"; + +const WORKOS_CLIENT_ID_PRODUCTION = "client_01J0FW6XN8N2XJAECF7NE0Y65J"; +const WORKOS_CLIENT_ID_STAGING = "client_01J0FW6XCPMJMQ3CG51RB4HBZQ"; + +const WORKOS_ENV_ID_PRODUCTION = "continue"; +const WORKOS_ENV_ID_STAGING = "continue-staging"; + +const PRODUCTION_ENV: ControlPlaneEnv = { + DEFAULT_CONTROL_PLANE_PROXY_URL: + "https://control-plane-api-service-i3dqylpbqa-uc.a.run.app/", + CONTROL_PLANE_URL: + "https://control-plane-api-service-i3dqylpbqa-uc.a.run.app/", + AUTH_TYPE: WORKOS_ENV_ID_PRODUCTION, + WORKOS_CLIENT_ID: WORKOS_CLIENT_ID_PRODUCTION, + APP_URL: "https://app.continue.dev", +}; + +const STAGING_ENV: ControlPlaneEnv = { + DEFAULT_CONTROL_PLANE_PROXY_URL: + "https://control-plane-api-service-537175798139.us-central1.run.app/", + CONTROL_PLANE_URL: + "https://control-plane-api-service-537175798139.us-central1.run.app/", + AUTH_TYPE: WORKOS_CLIENT_ID_STAGING, + WORKOS_CLIENT_ID: WORKOS_CLIENT_ID_STAGING, + APP_URL: "https://app-preview.continue.dev", +}; + +const LOCAL_ENV: ControlPlaneEnv = { + DEFAULT_CONTROL_PLANE_PROXY_URL: "http://localhost:3001/", + CONTROL_PLANE_URL: "http://localhost:3001/", + AUTH_TYPE: WORKOS_ENV_ID_STAGING, + WORKOS_CLIENT_ID: WORKOS_CLIENT_ID_STAGING, + APP_URL: "http://localhost:3000", +}; + +export const controlPlaneEnv = + process.env.CONTROL_PLANE_ENV === "local" + ? LOCAL_ENV + : process.env.CONTROL_PLANE_ENV === "staging" + ? STAGING_ENV + : PRODUCTION_ENV; diff --git a/extensions/vscode/src/ContinueGUIWebviewViewProvider.ts b/extensions/vscode/src/ContinueGUIWebviewViewProvider.ts index ee11a1a64..f685f942d 100644 --- a/extensions/vscode/src/ContinueGUIWebviewViewProvider.ts +++ b/extensions/vscode/src/ContinueGUIWebviewViewProvider.ts @@ -1,7 +1,7 @@ import type { FileEdit } from "core"; import { ConfigHandler } from "core/config/ConfigHandler"; +import { EXTENSION_NAME } from "core/control-plane/env"; import * as vscode from "vscode"; -import { EXTENSION_NAME } from "./util/constants"; import { getTheme } from "./util/getTheme"; import { getExtensionVersion } from "./util/util"; import { getExtensionUri, getNonce, getUniqueId } from "./util/vscode"; diff --git a/extensions/vscode/src/VsCodeIde.ts b/extensions/vscode/src/VsCodeIde.ts index 5d5cd536b..43911c6f8 100644 --- a/extensions/vscode/src/VsCodeIde.ts +++ b/extensions/vscode/src/VsCodeIde.ts @@ -15,6 +15,7 @@ import type { Thread, } from "core"; import { Range } from "core"; +import { EXTENSION_NAME } from "core/control-plane/env"; import { walkDir } from "core/indexing/walkDir"; import { GetGhTokenArgs } from "core/protocol/ide"; import { @@ -26,7 +27,6 @@ import * as vscode from "vscode"; import { executeGotoProvider } from "./autocomplete/lsp"; import { DiffManager } from "./diff/horizontal"; import { Repository } from "./otherExtensions/git"; -import { EXTENSION_NAME } from "./util/constants"; import { VsCodeIdeUtils } from "./util/ideUtils"; import { getExtensionUri, diff --git a/extensions/vscode/src/activation/inlineTips.ts b/extensions/vscode/src/activation/inlineTips.ts index 00a921db2..7cd1ef2bc 100644 --- a/extensions/vscode/src/activation/inlineTips.ts +++ b/extensions/vscode/src/activation/inlineTips.ts @@ -1,5 +1,5 @@ +import { EXTENSION_NAME } from "core/control-plane/env"; import * as vscode from "vscode"; -import { EXTENSION_NAME } from "../util/constants"; import { getMetaKeyName } from "../util/util"; const inlineTipDecoration = vscode.window.createTextEditorDecorationType({ diff --git a/extensions/vscode/src/autocomplete/statusBar.ts b/extensions/vscode/src/autocomplete/statusBar.ts index 5f59b9660..df7ae1dad 100644 --- a/extensions/vscode/src/autocomplete/statusBar.ts +++ b/extensions/vscode/src/autocomplete/statusBar.ts @@ -1,7 +1,7 @@ import { ILLM } from "core"; +import { EXTENSION_NAME } from "core/control-plane/env"; import * as vscode from "vscode"; import { Battery } from "../util/battery"; -import { EXTENSION_NAME } from "../util/constants"; import { CONTINUE_WORKSPACE_KEY, getContinueWorkspaceConfig, diff --git a/extensions/vscode/src/commands.ts b/extensions/vscode/src/commands.ts index babc695e3..e81ae2380 100644 --- a/extensions/vscode/src/commands.ts +++ b/extensions/vscode/src/commands.ts @@ -4,6 +4,7 @@ import { CompletionProvider } from "core/autocomplete/completionProvider"; import { ConfigHandler } from "core/config/ConfigHandler"; import { getModelByRole } from "core/config/util"; import { ContinueServerClient } from "core/continueServer/stubs/client"; +import { EXTENSION_NAME } from "core/control-plane/env"; import { Core } from "core/core"; import { walkDirAsync } from "core/indexing/walkDir"; import { GlobalContext } from "core/util/GlobalContext"; @@ -28,7 +29,6 @@ import { DiffManager } from "./diff/horizontal"; import { VerticalDiffManager } from "./diff/vertical/manager"; import { QuickEdit, QuickEditShowParams } from "./quickEdit/QuickEditQuickPick"; import { Battery } from "./util/battery"; -import { EXTENSION_NAME } from "./util/constants"; import { getFullyQualifiedPath } from "./util/util"; import { uriFromFilePath } from "./util/vscode"; import type { VsCodeWebviewProtocol } from "./webviewProtocol"; diff --git a/extensions/vscode/src/extension/VsCodeExtension.ts b/extensions/vscode/src/extension/VsCodeExtension.ts index ce0f97979..78541f8ea 100644 --- a/extensions/vscode/src/extension/VsCodeExtension.ts +++ b/extensions/vscode/src/extension/VsCodeExtension.ts @@ -1,5 +1,6 @@ import { IContextProvider } from "core"; import { ConfigHandler } from "core/config/ConfigHandler"; +import { controlPlaneEnv, EXTENSION_NAME } from "core/control-plane/env"; import { Core } from "core/core"; import { FromCoreProtocol, ToCoreProtocol } from "core/protocol"; import { InProcessMessenger } from "core/util/messenger"; @@ -26,7 +27,6 @@ import { } from "../stubs/WorkOsAuthProvider"; import { arePathsEqual } from "../util/arePathsEqual"; import { Battery } from "../util/battery"; -import { AUTH_TYPE, EXTENSION_NAME } from "../util/constants"; import { TabAutocompleteModel } from "../util/loadAutocompleteModel"; import { VsCodeIde } from "../VsCodeIde"; import type { VsCodeWebviewProtocol } from "../webviewProtocol"; @@ -281,7 +281,7 @@ export class VsCodeExtension { vscode.authentication.onDidChangeSessions(async (e) => { if (e.provider.id === "github") { this.configHandler.reloadConfig(); - } else if (e.provider.id === AUTH_TYPE) { + } else if (e.provider.id === controlPlaneEnv.AUTH_TYPE) { const sessionInfo = await getControlPlaneSessionInfo(true); this.webviewProtocolPromise.then(async (webviewProtocol) => { webviewProtocol.request("didChangeControlPlaneSessionInfo", { diff --git a/extensions/vscode/src/stubs/WorkOsAuthProvider.ts b/extensions/vscode/src/stubs/WorkOsAuthProvider.ts index c9259553f..da9ae55f8 100644 --- a/extensions/vscode/src/stubs/WorkOsAuthProvider.ts +++ b/extensions/vscode/src/stubs/WorkOsAuthProvider.ts @@ -17,15 +17,8 @@ import { import { PromiseAdapter, promiseFromEvent } from "./promiseUtils"; const AUTH_NAME = "Continue"; -const CLIENT_ID = - process.env.CONTROL_PLANE_ENV === "local" - ? "client_01J0FW6XCPMJMQ3CG51RB4HBZQ" - : "client_01J0FW6XN8N2XJAECF7NE0Y65J"; -const APP_URL = - process.env.CONTROL_PLANE_ENV === "local" - ? "http://localhost:3000" - : "https://app.continue.dev"; -const SESSIONS_SECRET_KEY = `${AUTH_TYPE}.sessions`; + +const SESSIONS_SECRET_KEY = `${controlPlaneEnv.AUTH_TYPE}.sessions`; class UriEventHandler extends EventEmitter implements UriHandler { public handleUri(uri: Uri) { @@ -33,12 +26,9 @@ class UriEventHandler extends EventEmitter implements UriHandler { } } -import { - CONTROL_PLANE_URL, - ControlPlaneSessionInfo, -} from "core/control-plane/client"; +import { ControlPlaneSessionInfo } from "core/control-plane/client"; +import { controlPlaneEnv } from "core/control-plane/env"; import crypto from "crypto"; -import { AUTH_TYPE } from "../util/constants"; import { SecretStorage } from "./SecretStorage"; // Function to generate a random string of specified length @@ -93,7 +83,7 @@ export class WorkOsAuthProvider implements AuthenticationProvider, Disposable { constructor(private readonly context: ExtensionContext) { this._disposable = Disposable.from( authentication.registerAuthenticationProvider( - AUTH_TYPE, + controlPlaneEnv.AUTH_TYPE, AUTH_NAME, this, { supportsMultipleAccounts: false }, @@ -162,7 +152,7 @@ export class WorkOsAuthProvider implements AuthenticationProvider, Disposable { get redirectUri() { if (env.uriScheme === "vscode-insiders" || env.uriScheme === "vscode") { // We redirect to a page that says "you can close this page", and that page finishes the redirect - const url = new URL(APP_URL); + const url = new URL(controlPlaneEnv.APP_URL); url.pathname = `/auth/${env.uriScheme}-redirect`; return url.toString(); } @@ -228,15 +218,18 @@ export class WorkOsAuthProvider implements AuthenticationProvider, Disposable { refreshToken: string; expiresInMs: number; }> { - const response = await fetch(new URL("/auth/refresh", CONTROL_PLANE_URL), { - method: "POST", - headers: { - "Content-Type": "application/json", + const response = await fetch( + new URL("/auth/refresh", controlPlaneEnv.CONTROL_PLANE_URL), + { + method: "POST", + headers: { + "Content-Type": "application/json", + }, + body: JSON.stringify({ + refreshToken, + }), }, - body: JSON.stringify({ - refreshToken, - }), - }); + ); if (!response.ok) { const text = await response.text(); throw new Error("Error refreshing token: " + text); @@ -356,7 +349,7 @@ export class WorkOsAuthProvider implements AuthenticationProvider, Disposable { const url = new URL("https://api.workos.com/user_management/authorize"); const params = { response_type: "code", - client_id: CLIENT_ID, + client_id: controlPlaneEnv.WORKOS_CLIENT_ID, redirect_uri: this.redirectUri, state: stateId, code_challenge: codeChallenge, @@ -453,7 +446,7 @@ export class WorkOsAuthProvider implements AuthenticationProvider, Disposable { "Content-Type": "application/json", }, body: JSON.stringify({ - client_id: CLIENT_ID, + client_id: controlPlaneEnv.WORKOS_CLIENT_ID, code_verifier: codeVerifier, grant_type: "authorization_code", code: token, @@ -470,7 +463,7 @@ export async function getControlPlaneSessionInfo( silent: boolean, ): Promise { const session = await authentication.getSession( - AUTH_TYPE, + controlPlaneEnv.AUTH_TYPE, [], silent ? { silent: true } : { createIfNone: true }, ); diff --git a/extensions/vscode/src/stubs/activation.ts b/extensions/vscode/src/stubs/activation.ts index 0f8866b55..bcec4b5a6 100644 --- a/extensions/vscode/src/stubs/activation.ts +++ b/extensions/vscode/src/stubs/activation.ts @@ -1,5 +1,5 @@ +import { EXTENSION_NAME } from "core/control-plane/env"; import * as vscode from "vscode"; -import { EXTENSION_NAME } from "../util/constants"; import { getUserToken } from "./auth"; import { RemoteConfigSync } from "./remoteConfig"; diff --git a/extensions/vscode/src/stubs/auth.ts b/extensions/vscode/src/stubs/auth.ts index 7a5244501..093587b90 100644 --- a/extensions/vscode/src/stubs/auth.ts +++ b/extensions/vscode/src/stubs/auth.ts @@ -1,5 +1,5 @@ +import { EXTENSION_NAME } from "core/control-plane/env"; import * as vscode from "vscode"; -import { EXTENSION_NAME } from "../util/constants"; export async function getUserToken(): Promise { // Prefer manual user token first diff --git a/extensions/vscode/src/stubs/remoteConfig.ts b/extensions/vscode/src/stubs/remoteConfig.ts index 4a4c4f002..24c197bd8 100644 --- a/extensions/vscode/src/stubs/remoteConfig.ts +++ b/extensions/vscode/src/stubs/remoteConfig.ts @@ -1,11 +1,11 @@ import { ContinueServerClient } from "core/continueServer/stubs/client"; +import { EXTENSION_NAME } from "core/control-plane/env"; import { getConfigJsPathForRemote, getConfigJsonPathForRemote, } from "core/util/paths"; import * as fs from "fs"; import * as vscode from "vscode"; -import { EXTENSION_NAME } from "../util/constants"; import { CONTINUE_WORKSPACE_KEY } from "../util/workspaceConfig"; export class RemoteConfigSync { diff --git a/extensions/vscode/src/util/constants.ts b/extensions/vscode/src/util/constants.ts deleted file mode 100644 index 2db7798f8..000000000 --- a/extensions/vscode/src/util/constants.ts +++ /dev/null @@ -1,5 +0,0 @@ -export const EXTENSION_NAME = "continue"; -export const AUTH_TYPE = - process.env.CONTROL_PLANE_ENV === "local" - ? `${EXTENSION_NAME}-staging` - : EXTENSION_NAME; diff --git a/extensions/vscode/src/util/ideUtils.ts b/extensions/vscode/src/util/ideUtils.ts index 99ee2ce37..14ebd9ed2 100644 --- a/extensions/vscode/src/util/ideUtils.ts +++ b/extensions/vscode/src/util/ideUtils.ts @@ -17,8 +17,8 @@ import { uriFromFilePath, } from "./vscode"; +import { EXTENSION_NAME } from "core/control-plane/env"; import _ from "lodash"; -import { EXTENSION_NAME } from "./constants"; const util = require("node:util"); const asyncExec = util.promisify(require("node:child_process").exec); From 93c87fe561b048565dd1a9bf0674aa1a05ce158f Mon Sep 17 00:00:00 2001 From: Nate Date: Tue, 22 Oct 2024 19:34:35 -0700 Subject: [PATCH 29/70] bump package.json --- extensions/vscode/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/vscode/package.json b/extensions/vscode/package.json index 28a70181a..2d7a5af4f 100644 --- a/extensions/vscode/package.json +++ b/extensions/vscode/package.json @@ -2,7 +2,7 @@ "name": "continue", "icon": "media/icon.png", "author": "Continue Dev, Inc", - "version": "0.9.220", + "version": "0.9.221", "repository": { "type": "git", "url": "https://github.com/continuedev/continue" From 935295b26a55232bdc87e8ad475f9e1755126aa2 Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Wed, 23 Oct 2024 04:41:44 +0200 Subject: [PATCH 30/70] validate tabautocomplete models in config v2 --- core/autocomplete/completionProvider.ts | 19 +++++++++++-------- core/config/validation.ts | 14 +++++--------- sync/src/sync/merkle.rs | 2 +- 3 files changed, 17 insertions(+), 18 deletions(-) diff --git a/core/autocomplete/completionProvider.ts b/core/autocomplete/completionProvider.ts index 94e969e3b..9d08e33a8 100644 --- a/core/autocomplete/completionProvider.ts +++ b/core/autocomplete/completionProvider.ts @@ -9,6 +9,7 @@ import { streamLines } from "../diff/util.js"; import { IDE, ILLM, + ModelDescription, ModelProvider, Position, Range, @@ -128,13 +129,20 @@ function formatExternalSnippet( return lines.join("\n"); } -let shownGptClaudeWarning = false; -export const nonAutocompleteModels = [ +const nonAutocompleteModels = [ // "gpt", // "claude", "mistral", "instruct", ]; +export function isModelTrainedForTabAutocomplete(model: string) { + return !( + nonAutocompleteModels.some((m) => model.includes(m)) && + !model.toLowerCase().includes("deepseek") && + !model.toLowerCase().includes("codestral") + ); +} +let shownGptClaudeWarning = false; export type GetLspDefinitionsFunction = ( filepath: string, @@ -473,12 +481,7 @@ export class CompletionProvider { llm.model = TRIAL_FIM_MODEL; } - if ( - !shownGptClaudeWarning && - nonAutocompleteModels.some((model) => llm.model.includes(model)) && - !llm.model.toLowerCase().includes("deepseek") && - !llm.model.toLowerCase().includes("codestral") - ) { + if (!isModelTrainedForTabAutocomplete(llm.model)) { shownGptClaudeWarning = true; await this.ide.showToast("warning", `${llm.model} is not trained for tab-autocomplete, and will result in low-quality suggestions. See the docs to learn more about why: https://docs.continue.dev/features/tab-autocomplete#i-want-better-completions-should-i-use-gpt-4`); return; // will not attempt autocomplete first time warning message shown diff --git a/core/config/validation.ts b/core/config/validation.ts index 4177c7b2a..94b3f4f2c 100644 --- a/core/config/validation.ts +++ b/core/config/validation.ts @@ -1,5 +1,5 @@ import { ModelDescription, SerializedContinueConfig } from "../"; -import { nonAutocompleteModels } from "../autocomplete/completionProvider"; +import { isModelTrainedForTabAutocomplete } from "../autocomplete/completionProvider"; import { Telemetry } from "../util/posthog"; export interface ConfigValidationError { @@ -46,12 +46,8 @@ export function validateConfig(config: SerializedContinueConfig) { // Validate tab autocomplete model(s) if (config.tabAutocompleteModel) { - function checkTabAutocompleteModel(modelDescription: ModelDescription, index?: number) { - if ( - nonAutocompleteModels.some((m) => modelDescription.model.includes(m)) && - !modelDescription.model.toLowerCase().includes("deepseek") && - !modelDescription.model.toLowerCase().includes("codestral") - ) { + function validateTabAutocompleteModel(modelDescription: ModelDescription) { + if (!isModelTrainedForTabAutocomplete(modelDescription.model)) { errors.push({ fatal: false, message: `${modelDescription.model} is not trained for tab-autocomplete, and will result in low-quality suggestions. See the docs to learn more about why: https://docs.continue.dev/features/tab-autocomplete#i-want-better-completions-should-i-use-gpt-4`, @@ -60,9 +56,9 @@ export function validateConfig(config: SerializedContinueConfig) { } if (Array.isArray(config.tabAutocompleteModel)) { - config.tabAutocompleteModel.forEach(checkTabAutocompleteModel); + config.tabAutocompleteModel.forEach(validateTabAutocompleteModel); } else { - checkTabAutocompleteModel(config.tabAutocompleteModel); + validateTabAutocompleteModel(config.tabAutocompleteModel); } } diff --git a/sync/src/sync/merkle.rs b/sync/src/sync/merkle.rs index 5c78fb38f..deb96ac80 100644 --- a/sync/src/sync/merkle.rs +++ b/sync/src/sync/merkle.rs @@ -446,7 +446,7 @@ pub fn build_walk(dir: &Path) -> Walk { let path = create_global_ignore_file(); // Make sure it sorts alphabetically by default let mut binding = WalkBuilder::new(dir); - let builder = binding.add_custom_ignore_filename(".continueignore"); + let builder = binding.add_custom_ignore_filename(".globalcontinueignore"); builder.add_ignore(path); builder.build() From 80d0b0484db24dd3753b1ed24710b7f8ff804a53 Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Wed, 23 Oct 2024 04:43:28 +0200 Subject: [PATCH 31/70] reverse merkel update --- sync/src/sync/merkle.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sync/src/sync/merkle.rs b/sync/src/sync/merkle.rs index deb96ac80..7dd99702a 100644 --- a/sync/src/sync/merkle.rs +++ b/sync/src/sync/merkle.rs @@ -423,7 +423,7 @@ fn global_ignore_path() -> PathBuf { let mut path = get_my_home().unwrap().unwrap(); path.push(".continue"); path.push("index"); - path.push(".continueignore"); + path.push(".globalcontinueignore"); path } @@ -446,7 +446,7 @@ pub fn build_walk(dir: &Path) -> Walk { let path = create_global_ignore_file(); // Make sure it sorts alphabetically by default let mut binding = WalkBuilder::new(dir); - let builder = binding.add_custom_ignore_filename(".globalcontinueignore"); + let builder = binding.add_custom_ignore_filename(".continueignore"); builder.add_ignore(path); builder.build() From 0918f24a296d021659135b3f6a3f86ca3dc45f4a Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Wed, 23 Oct 2024 08:54:47 +0200 Subject: [PATCH 32/70] model names --- core/index.d.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/index.d.ts b/core/index.d.ts index 183d5e427..798721937 100644 --- a/core/index.d.ts +++ b/core/index.d.ts @@ -691,6 +691,11 @@ export type ModelName = // Llama 3.1 | "llama3.1-8b" | "llama3.1-70b" + // Llama 3.2 + | "llama3.2-1b" + | "llama3.2-3b" + | "llama3.2-11b" + | "llama3.2-90b" // Other Open-source | "phi2" | "phind-codellama-34b" From f6494d2f6647811d1078f08af83a334dd0393bfb Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Wed, 23 Oct 2024 09:09:02 +0200 Subject: [PATCH 33/70] update contributing model addition section --- CONTRIBUTING.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d813a18a2..d1ca16637 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -200,10 +200,9 @@ Continue has support for more than a dozen different LLM "providers", making it While any model that works with a supported provider can be used with Continue, we keep a list of recommended models that can be automatically configured from the UI or `config.json`. The following files should be updated when adding a model: - [config_schema.json](./extensions/vscode/config_schema.json) - This is the JSON Schema definition that is used to validate `config.json`. You'll notice a number of rules defined in "definitions.ModelDescription.allOf". Here is where you write rules that can specify something like "for the provider 'anthropic', only models 'claude-2' and 'claude-instant-1' are allowed. Look through all of these rules and make sure that your model is included for providers that support it. -- [modelData.ts](./gui/src/util/modelData.ts) - This file defines that information that is shown in the model selection UI in the side bar. To add a new model: - 1. create a `ModelPackage` object, following the lead of the many examples near the top of the file - 2. add the `ModelPackage` to the `MODEL_INFO` array if you would like it to be displayed in the "Models" tab - 3. if you would like it to be displayed as an option under any of the providers, go to the `PROVIDER_INFO` object and add it to the `packages` array for each provider that you want it to be displayed under. If it is an OS model that should be valid for most providers offering OS models, you might just be able to add it to the `osModels` array as shorthand. +- [AddNewModel page](./gui/src/pages/AddNewModel) - This directory defines which model options are shown in the side bar model selection UI. To add a new model: + 1. Add a `ModelPackage` entry for the model into [configs/models.ts](./gui/src/pages/AddNewModel/configs/models.ts), following the lead of the many examples near the top of the file + 2. Add the model within its provider's array to [AddNewModel.tsx](./gui/src/pages/AddNewModel/AddNewModel.tsx) (add provider if needed) - [index.d.ts](./core/index.d.ts) - This file defines the TypeScript types used throughout Continue. You'll find a `ModelName` type. Be sure to add the name of your model to this. - LLM Providers: Since many providers use their own custom strings to identify models, you'll have to add the translation from Continue's model name (the one you added to `index.d.ts`) and the model string for each of these providers: [Ollama](./core/llm/llms/Ollama.ts), [Together](./core/llm/llms/Together.ts), and [Replicate](./core/llm/llms/Replicate.ts). You can find their full model lists here: [Ollama](https://ollama.ai/library), [Together](https://docs.together.ai/docs/inference-models), [Replicate](https://replicate.com/collections/streaming-language-models). - [Prompt Templates](./core/llm/index.ts) - In this file you'll find the `autodetectTemplateType` function. Make sure that for the model name you just added, this function returns the correct template type. This is assuming that the chat template for that model is already built in Continue. If not, you will have to add the template type and corresponding edit and chat templates. From 15baeea3e458a98978e236973c64405417195094 Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Wed, 23 Oct 2024 10:29:15 +0200 Subject: [PATCH 34/70] merkel --- sync/src/sync/merkle.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sync/src/sync/merkle.rs b/sync/src/sync/merkle.rs index 7dd99702a..827b63371 100644 --- a/sync/src/sync/merkle.rs +++ b/sync/src/sync/merkle.rs @@ -422,8 +422,7 @@ const GLOBAL_IGNORE_PATTERNS: &[&str] = &[ fn global_ignore_path() -> PathBuf { let mut path = get_my_home().unwrap().unwrap(); path.push(".continue"); - path.push("index"); - path.push(".globalcontinueignore"); + path.push(".continueignore"); path } From 1b4be003a137fba4ce0c51475e62861acb1a33b4 Mon Sep 17 00:00:00 2001 From: Nate Date: Wed, 23 Oct 2024 08:41:04 -0700 Subject: [PATCH 35/70] destructure autocomplete object --- core/autocomplete/completionProvider.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/autocomplete/completionProvider.ts b/core/autocomplete/completionProvider.ts index bc826f934..3fd95dceb 100644 --- a/core/autocomplete/completionProvider.ts +++ b/core/autocomplete/completionProvider.ts @@ -388,7 +388,7 @@ export class CompletionProvider { // Wait 10 seconds, then assume it wasn't accepted outcome.accepted = false; logDevData("autocomplete", outcome); - const { prompt, completion, ...restOfOutcome } = outcome; + const { prompt, completion, prefix, suffix, ...restOfOutcome } = outcome; void Telemetry.capture( "autocomplete", { From 5782a2c809c124f530fe12a7d952c25ca33fe915 Mon Sep 17 00:00:00 2001 From: Nate Date: Wed, 23 Oct 2024 09:53:02 -0700 Subject: [PATCH 36/70] explicit, don't use spread operator --- core/autocomplete/completionProvider.ts | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/core/autocomplete/completionProvider.ts b/core/autocomplete/completionProvider.ts index 3fd95dceb..7e863e1c4 100644 --- a/core/autocomplete/completionProvider.ts +++ b/core/autocomplete/completionProvider.ts @@ -392,7 +392,19 @@ export class CompletionProvider { void Telemetry.capture( "autocomplete", { - ...restOfOutcome, + accepted: restOfOutcome.accepted, + cacheHit: restOfOutcome.cacheHit, + completionId: restOfOutcome.completionId, + completionOptions: restOfOutcome.completionOptions, + debounceDelay: restOfOutcome.debounceDelay, + fileExtension: restOfOutcome.filepath.split(".")?.slice(-1)[0], + maxPromptTokens: restOfOutcome.maxPromptTokens, + modelName: restOfOutcome.modelName, + modelProvider: restOfOutcome.modelProvider, + multilineCompletions: restOfOutcome.multilineCompletions, + time: restOfOutcome.time, + useRecentlyEdited: restOfOutcome.useRecentlyEdited, + useRootPathContext: restOfOutcome.useRootPathContext, }, true, ); From 0fe142a0cd99e8c2c0b4f5ca7702a039b822f568 Mon Sep 17 00:00:00 2001 From: Test Date: Wed, 23 Oct 2024 12:20:20 -0700 Subject: [PATCH 37/70] chore: add release notes link to JB --- extensions/intellij/src/main/resources/META-INF/plugin.xml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/extensions/intellij/src/main/resources/META-INF/plugin.xml b/extensions/intellij/src/main/resources/META-INF/plugin.xml index 572fe74b6..640fa05c1 100644 --- a/extensions/intellij/src/main/resources/META-INF/plugin.xml +++ b/extensions/intellij/src/main/resources/META-INF/plugin.xml @@ -2,7 +2,10 @@ com.github.continuedev.continueintellijextension Continue - continue-dev + continue-dev + + View the latest release notes on <a href="https://github.com/continuedev/continue/releases">GitHub</a> + com.intellij.modules.platform com.intellij.modules.json From a2d76930ee3600edfe70fecf15c50c6af452d21b Mon Sep 17 00:00:00 2001 From: Test Date: Wed, 23 Oct 2024 12:32:17 -0700 Subject: [PATCH 38/70] Update CONTRIBUTING.md --- extensions/intellij/CONTRIBUTING.md | 42 +++++++++++++++++------------ 1 file changed, 25 insertions(+), 17 deletions(-) diff --git a/extensions/intellij/CONTRIBUTING.md b/extensions/intellij/CONTRIBUTING.md index a08430c3b..0cd7b1d6a 100644 --- a/extensions/intellij/CONTRIBUTING.md +++ b/extensions/intellij/CONTRIBUTING.md @@ -1,23 +1,25 @@ # Contributing to Continue (JetBrains extension) -This file is for contribution guidelines specific to the JetBrains extension. See the root [`CONTRIBUTING.md`](../../CONTRIBUTING.md) for general contribution guidelines. +This file is for contribution guidelines specific to the JetBrains extension. See the root [ +`CONTRIBUTING.md`](../../CONTRIBUTING.md) for general contribution guidelines. ## Table of Contents - [Architecture Overview](#architecture-overview) - [Environment Setup](#environment-setup) - - [IDE Installation](#ide-installation) - - [IDE configuration](#ide-configuration) - - [Node.js Requirements](#nodejs-requirements) - - [Install all dependencies](#install-all-dependencies) - - [Misc](#misc) + - [IDE Installation](#ide-installation) + - [IDE configuration](#ide-configuration) + - [Node.js Requirements](#nodejs-requirements) + - [Install all dependencies](#install-all-dependencies) + - [Misc](#misc) - [Development Workflow](#development-workflow) - - [Running the extension](#running-the-extension) - - [Reloading changes](#reloading-changes) - - [Setting breakpoints](#setting-breakpoints) - - [Available Gradle tasks](#available-gradle-tasks) - - [Packaging](#packaging) - - [Testing the packaged extension](#testing-the-packaged-extension) + - [Running the extension](#running-the-extension) + - [Accessing files in the `.continue` directory](#accessing-files-in-the-continue-directory) + - [Reloading changes](#reloading-changes) + - [Setting breakpoints](#setting-breakpoints) + - [Available Gradle tasks](#available-gradle-tasks) + - [Packaging](#packaging) + - [Testing the packaged extension](#testing-the-packaged-extension) ## Architecture Overview @@ -65,20 +67,25 @@ have VS Code installed. - Open the project in VS Code and star the `Core binary` task - Switch back to Intellij and select the "Run Continue" configuration in the top-right corner of the IDE - Click the "Debug" button - - The first time running this will install the IDE version specified by the `platformVersion` property in [ - `./run/Run Extension.run.xml`](./.run/Run%20Extension.run.xml). This will take a moment as the installation size - can be close to 1GB. + - The first time running this will install the IDE version specified by the `platformVersion` property in [ + `./run/Run Extension.run.xml`](./.run/Run%20Extension.run.xml). This will take a moment as the installation size + can be close to 1GB. ![run-extension-screenshot](../../media/run-intellij-extension.png)\ This should open a new instance on IntelliJ with the extension installed and connected via TCP to the server started through the `Core binary` task. +### Accessing files in the `.continue` directory + +When running the `Core Binary` task, we set the location of your Continue directory to `./binary/.continue`. This is to +allow for changes to your `config.json` and other files during development, without affecting your actual configuration. + ### Reloading changes - `extensions/intellij`: Attempt to reload changed classes by selecting _Run | Debugging Actions | Reload Changed Classes`_ - - This will often fail on new imports, schema changes etc. In that case, you need to stop and restart the extension + - This will often fail on new imports, schema changes etc. In that case, you need to stop and restart the extension - `gui`: Changes will be reloaded automatically - `core`: Run `npm run build` from the `binary` directory and restart the `Core binary` task in VS Code @@ -111,7 +118,8 @@ verifyPluginConfiguration - Checks if Java and Kotlin compilers configuration me - Unix: `./gradlew buildPlugin` - Windows: `./gradlew.bat buildPlugin` -This will generate a .zip file in `./build/distributions` with the version defined in [`./gradle.properties`](./gradle.properties) +This will generate a .zip file in `./build/distributions` with the version defined in [ +`./gradle.properties`](./gradle.properties) #### Testing the packaged extension From b6c0a58b0eb099e2d9526937ed681190ed9dd7de Mon Sep 17 00:00:00 2001 From: Nate Date: Wed, 23 Oct 2024 13:35:30 -0700 Subject: [PATCH 39/70] adjust wording in docs --- docs/docs/customize/model-providers/top-level/anthropic.md | 2 -- docs/docs/customize/model-providers/top-level/azure.md | 2 +- docs/docs/customize/model-providers/top-level/bedrock.md | 2 +- docs/docs/customize/model-providers/top-level/ollama.md | 2 +- 4 files changed, 3 insertions(+), 5 deletions(-) diff --git a/docs/docs/customize/model-providers/top-level/anthropic.md b/docs/docs/customize/model-providers/top-level/anthropic.md index fd22b3d6d..c4bb24a4c 100644 --- a/docs/docs/customize/model-providers/top-level/anthropic.md +++ b/docs/docs/customize/model-providers/top-level/anthropic.md @@ -3,8 +3,6 @@ title: Anthropic slug: ../anthropic --- -Anthropic provider offers access to the Claude series of large language models, developed by Anthropic. - :::info You can get an API key from the [Anthropic console](https://console.anthropic.com/account/keys). diff --git a/docs/docs/customize/model-providers/top-level/azure.md b/docs/docs/customize/model-providers/top-level/azure.md index 8ade702f0..adb390538 100644 --- a/docs/docs/customize/model-providers/top-level/azure.md +++ b/docs/docs/customize/model-providers/top-level/azure.md @@ -3,7 +3,7 @@ title: Azure OpenAI slug: ../azure --- -Azure OpenAI is a cloud-based service that provides access to OpenAI's large language models including GPT series, integrated with the security and enterprise features of the Microsoft Azure platform. To get started, you have to create an Azure OpenAI resource in [Azure portal](https://portal.azure.com). +Azure OpenAI is a cloud-based service that provides access to OpenAI's models, integrated with the security and enterprise features of the Microsoft Azure platform. To get started, create an Azure OpenAI resource in the [Azure portal](https://portal.azure.com). :::info diff --git a/docs/docs/customize/model-providers/top-level/bedrock.md b/docs/docs/customize/model-providers/top-level/bedrock.md index 7129fd3bc..8d46c5ad9 100644 --- a/docs/docs/customize/model-providers/top-level/bedrock.md +++ b/docs/docs/customize/model-providers/top-level/bedrock.md @@ -3,7 +3,7 @@ title: Amazon Bedrock slug: ../bedrock --- -Amazon Bedrock is a fully managed service that provides access to various foundation models from various AI companies through a single API, offering capabilities for building secure and responsible generative AI applications. +Amazon Bedrock is a fully managed service on AWS that provides access to foundation models from various AI companies through a single API. ## Chat model diff --git a/docs/docs/customize/model-providers/top-level/ollama.md b/docs/docs/customize/model-providers/top-level/ollama.md index 08ae3eec9..ae97d30c3 100644 --- a/docs/docs/customize/model-providers/top-level/ollama.md +++ b/docs/docs/customize/model-providers/top-level/ollama.md @@ -3,7 +3,7 @@ title: Ollama slug: ../ollama --- -Ollama is an open-source tool that allows users to run large language models (LLMs) locally on their own computers. To use Ollama providers, you need to install Ollama [here](https://ollama.ai/download) and download the model you want to run by `ollama pull` command. +Ollama is an open-source tool that allows to run large language models (LLMs) locally on their own computers. To use Ollama, you can install it [here](https://ollama.ai/download) and download the model you want to run with the `ollama run` command. ## Chat model From 44210afe7d9cfc63802189033200ac4de9dd2e43 Mon Sep 17 00:00:00 2001 From: Test Date: Wed, 23 Oct 2024 13:42:04 -0700 Subject: [PATCH 40/70] chore: add config to run core from intellij --- extensions/intellij/.run/Run Continue.run.xml | 3 ++- extensions/intellij/.run/Start Dev Server (core).run.xml | 9 +++++++++ ...ail Dev Logs.run.xml => Tail Dev Logs (core).run.xml} | 2 +- .../components/JetBrainsFetchGitHubTokenDialog.tsx | 4 ++-- 4 files changed, 14 insertions(+), 4 deletions(-) create mode 100644 extensions/intellij/.run/Start Dev Server (core).run.xml rename extensions/intellij/.run/{Tail Dev Logs.run.xml => Tail Dev Logs (core).run.xml} (88%) diff --git a/extensions/intellij/.run/Run Continue.run.xml b/extensions/intellij/.run/Run Continue.run.xml index 32ba73bb9..cc705773b 100644 --- a/extensions/intellij/.run/Run Continue.run.xml +++ b/extensions/intellij/.run/Run Continue.run.xml @@ -1,7 +1,8 @@ - + + diff --git a/extensions/intellij/.run/Start Dev Server (core).run.xml b/extensions/intellij/.run/Start Dev Server (core).run.xml new file mode 100644 index 000000000..e7fe0ccac --- /dev/null +++ b/extensions/intellij/.run/Start Dev Server (core).run.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/extensions/intellij/.run/Tail Dev Logs.run.xml b/extensions/intellij/.run/Tail Dev Logs (core).run.xml similarity index 88% rename from extensions/intellij/.run/Tail Dev Logs.run.xml rename to extensions/intellij/.run/Tail Dev Logs (core).run.xml index 5685b4fd8..c92599ea4 100644 --- a/extensions/intellij/.run/Tail Dev Logs.run.xml +++ b/extensions/intellij/.run/Tail Dev Logs (core).run.xml @@ -1,5 +1,5 @@ - + diff --git a/gui/src/components/OnboardingCard/components/JetBrainsFetchGitHubTokenDialog.tsx b/gui/src/components/OnboardingCard/components/JetBrainsFetchGitHubTokenDialog.tsx index 38d1b526b..f69d5c807 100644 --- a/gui/src/components/OnboardingCard/components/JetBrainsFetchGitHubTokenDialog.tsx +++ b/gui/src/components/OnboardingCard/components/JetBrainsFetchGitHubTokenDialog.tsx @@ -36,8 +36,8 @@ function JetBrainsFetchGitHubTokenDialog({ return (
-

Sign in with GitHub

-

+

Sign in with GitHub

+

Continue will request read access to your GitHub email so that we can prevent abuse of the free trial. If you prefer not to sign in, you can use Continue with your own API keys or local model. From 7032602b3d1c462a47315f315a8cfd4a4fa493f2 Mon Sep 17 00:00:00 2001 From: Test Date: Wed, 23 Oct 2024 14:06:37 -0700 Subject: [PATCH 41/70] chore: update scopes --- .idea/modules.xml | 4 +--- .idea/modules/continue-intellij-extension.iml | 8 ++++++++ .idea/scopes/Continue.xml | 2 +- 3 files changed, 10 insertions(+), 4 deletions(-) create mode 100644 .idea/modules/continue-intellij-extension.iml diff --git a/.idea/modules.xml b/.idea/modules.xml index 0a26ef9e0..ba5b279fb 100644 --- a/.idea/modules.xml +++ b/.idea/modules.xml @@ -2,9 +2,7 @@ - - - + \ No newline at end of file diff --git a/.idea/modules/continue-intellij-extension.iml b/.idea/modules/continue-intellij-extension.iml new file mode 100644 index 000000000..713a88bca --- /dev/null +++ b/.idea/modules/continue-intellij-extension.iml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/scopes/Continue.xml b/.idea/scopes/Continue.xml index dce173a74..3b28a76b1 100644 --- a/.idea/scopes/Continue.xml +++ b/.idea/scopes/Continue.xml @@ -1,3 +1,3 @@ - + \ No newline at end of file From 4bb171702763c212b1544a60310319fa930ee007 Mon Sep 17 00:00:00 2001 From: Nate Date: Wed, 23 Oct 2024 16:17:45 -0700 Subject: [PATCH 42/70] remove unnecessary dependsOnIndexing properties --- core/context/providers/FileContextProvider.ts | 3 +-- core/context/providers/FileTreeContextProvider.ts | 1 - core/context/providers/RepoMapContextProvider.ts | 3 +-- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/core/context/providers/FileContextProvider.ts b/core/context/providers/FileContextProvider.ts index d1ac2d6e2..26fb9dc73 100644 --- a/core/context/providers/FileContextProvider.ts +++ b/core/context/providers/FileContextProvider.ts @@ -1,3 +1,4 @@ +import { BaseContextProvider } from "../"; import { ContextItem, ContextProviderDescription, @@ -11,7 +12,6 @@ import { getUniqueFilePath, groupByLastNPathParts, } from "../../util/"; -import { BaseContextProvider } from "../"; const MAX_SUBMENU_ITEMS = 10_000; @@ -21,7 +21,6 @@ class FileContextProvider extends BaseContextProvider { displayTitle: "Files", description: "Type to search", type: "submenu", - dependsOnIndexing: true, }; async getContextItems( diff --git a/core/context/providers/FileTreeContextProvider.ts b/core/context/providers/FileTreeContextProvider.ts index 5b5d99fed..52af97823 100644 --- a/core/context/providers/FileTreeContextProvider.ts +++ b/core/context/providers/FileTreeContextProvider.ts @@ -34,7 +34,6 @@ class FileTreeContextProvider extends BaseContextProvider { description: "Attach a representation of the file tree", type: "normal", renderInlineAs: "", - dependsOnIndexing: true, }; async getContextItems( diff --git a/core/context/providers/RepoMapContextProvider.ts b/core/context/providers/RepoMapContextProvider.ts index 6aefe0301..183ff3cb6 100644 --- a/core/context/providers/RepoMapContextProvider.ts +++ b/core/context/providers/RepoMapContextProvider.ts @@ -7,9 +7,9 @@ import { LoadSubmenuItemsArgs, } from "../../"; import { - groupByLastNPathParts, getBasename, getUniqueFilePath, + groupByLastNPathParts, } from "../../util"; import generateRepoMap from "../../util/generateRepoMap"; @@ -25,7 +25,6 @@ class RepoMapContextProvider extends BaseContextProvider { displayTitle: "Repository Map", description: "Select a folder", type: "submenu", - dependsOnIndexing: true, }; async getContextItems( From 2ce5f5a121683710cbf5dd1dba7d1f31750cde0e Mon Sep 17 00:00:00 2001 From: Test Date: Wed, 23 Oct 2024 16:50:15 -0700 Subject: [PATCH 43/70] update run configs --- .vscode/launch.json | 19 ------- .../.run/Tail Dev Logs (core).run.xml | 17 ------ extensions/intellij/CONTRIBUTING.md | 51 ++++++++---------- .../JetBrainsFetchGitHubTokenDialog.tsx | 2 +- media/run-continue-intellij.png | Bin 20185 -> 11535 bytes 5 files changed, 23 insertions(+), 66 deletions(-) delete mode 100644 extensions/intellij/.run/Tail Dev Logs (core).run.xml diff --git a/.vscode/launch.json b/.vscode/launch.json index e895a880b..a2450e67c 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -137,24 +137,5 @@ "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/extensions/intellij/.run/Tail Dev Logs (core).run.xml b/extensions/intellij/.run/Tail Dev Logs (core).run.xml deleted file mode 100644 index c92599ea4..000000000 --- a/extensions/intellij/.run/Tail Dev Logs (core).run.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - \ No newline at end of file diff --git a/extensions/intellij/CONTRIBUTING.md b/extensions/intellij/CONTRIBUTING.md index a08430c3b..291364978 100644 --- a/extensions/intellij/CONTRIBUTING.md +++ b/extensions/intellij/CONTRIBUTING.md @@ -1,23 +1,24 @@ # Contributing to Continue (JetBrains extension) -This file is for contribution guidelines specific to the JetBrains extension. See the root [`CONTRIBUTING.md`](../../CONTRIBUTING.md) for general contribution guidelines. +This file is for contribution guidelines specific to the JetBrains extension. See the root [ +`CONTRIBUTING.md`](../../CONTRIBUTING.md) for general contribution guidelines. ## Table of Contents - [Architecture Overview](#architecture-overview) - [Environment Setup](#environment-setup) - - [IDE Installation](#ide-installation) - - [IDE configuration](#ide-configuration) - - [Node.js Requirements](#nodejs-requirements) - - [Install all dependencies](#install-all-dependencies) - - [Misc](#misc) + - [IDE Installation](#ide-installation) + - [IDE configuration](#ide-configuration) + - [Node.js Requirements](#nodejs-requirements) + - [Install all dependencies](#install-all-dependencies) + - [Misc](#misc) - [Development Workflow](#development-workflow) - - [Running the extension](#running-the-extension) - - [Reloading changes](#reloading-changes) - - [Setting breakpoints](#setting-breakpoints) - - [Available Gradle tasks](#available-gradle-tasks) - - [Packaging](#packaging) - - [Testing the packaged extension](#testing-the-packaged-extension) + - [Running the extension](#running-the-extension) + - [Reloading changes](#reloading-changes) + - [Setting breakpoints](#setting-breakpoints) + - [Available Gradle tasks](#available-gradle-tasks) + - [Packaging](#packaging) + - [Testing the packaged extension](#testing-the-packaged-extension) ## Architecture Overview @@ -57,36 +58,27 @@ This project requires Node.js version 20.11.0 (LTS) or higher. You have two opti ## Development Workflow -Because the `gui` and `core` are written in TypeScript, our development workflow is built around the assumption that you -have VS Code installed. +### Running the extension in debug mode -### Running the extension +Select the "Run Continue" task in the top right corner of the IDE and then select the "Debug" option. -- Open the project in VS Code and star the `Core binary` task -- Switch back to Intellij and select the "Run Continue" configuration in the top-right corner of the IDE -- Click the "Debug" button - - The first time running this will install the IDE version specified by the `platformVersion` property in [ - `./run/Run Extension.run.xml`](./.run/Run%20Extension.run.xml). This will take a moment as the installation size - can be close to 1GB. +![run-extension-screenshot](../../media/run-continue-intellij.png) -![run-extension-screenshot](../../media/run-intellij-extension.png)\ - -This should open a new instance on IntelliJ with the extension installed and connected via TCP to the server started -through the `Core binary` task. +This should open a new instance on IntelliJ with the extension installed. ### Reloading changes - `extensions/intellij`: Attempt to reload changed classes by selecting _Run | Debugging Actions | Reload Changed Classes`_ - - This will often fail on new imports, schema changes etc. In that case, you need to stop and restart the extension + - This will often fail on new imports, schema changes etc. In that case, you need to stop and restart the extension - `gui`: Changes will be reloaded automatically -- `core`: Run `npm run build` from the `binary` directory and restart the `Core binary` task in VS Code +- `core`: Run `npm run build` from the `binary` directory (requires restarting the `Start Dev Server (core)` task) ### Setting breakpoints - `extensions/intellij`: Breakpoints can be set in Intellij - `gui`: You'll need to set explicit `debugger` statements in the source code, or through the browser dev tools -- `core`: Breakpoints can be set in VS Code (requires restarting the _Core Binary_ task) +- `core`: Breakpoints can be set in Intellij (requires restarting the `Start Dev Server (core)` task) ### Available Gradle tasks @@ -111,7 +103,8 @@ verifyPluginConfiguration - Checks if Java and Kotlin compilers configuration me - Unix: `./gradlew buildPlugin` - Windows: `./gradlew.bat buildPlugin` -This will generate a .zip file in `./build/distributions` with the version defined in [`./gradle.properties`](./gradle.properties) +This will generate a .zip file in `./build/distributions` with the version defined in [ +`./gradle.properties`](./gradle.properties) #### Testing the packaged extension diff --git a/gui/src/components/OnboardingCard/components/JetBrainsFetchGitHubTokenDialog.tsx b/gui/src/components/OnboardingCard/components/JetBrainsFetchGitHubTokenDialog.tsx index f69d5c807..cc20e77d7 100644 --- a/gui/src/components/OnboardingCard/components/JetBrainsFetchGitHubTokenDialog.tsx +++ b/gui/src/components/OnboardingCard/components/JetBrainsFetchGitHubTokenDialog.tsx @@ -36,7 +36,7 @@ function JetBrainsFetchGitHubTokenDialog({ return (

-

Sign in with GitHub

+

Sign in with GitHub

Continue will request read access to your GitHub email so that we can prevent abuse of the free trial. If you prefer not to sign in, you can diff --git a/media/run-continue-intellij.png b/media/run-continue-intellij.png index 75d0a04f31e728422201e89aa16ed97e59781cbd..129cf37bbb87c3815a41ca66e1982a41faa60820 100644 GIT binary patch delta 11108 zcmX9^b6nrw_fN|$+jj3|+qPSFEnBZ_y)&1!?3T7{FWYu&xnG~}@BVQg=klC;^vCm_ z@6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O_x&d|7ghHSfBEaes^2?)*EHXI+Q-3xHfnkonrRjwjs39o?6asESfYm2Dhf;d7 z8b7^q7 Date: Wed, 23 Oct 2024 16:51:27 -0700 Subject: [PATCH 44/70] Update CONTRIBUTING.md --- extensions/intellij/CONTRIBUTING.md | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/extensions/intellij/CONTRIBUTING.md b/extensions/intellij/CONTRIBUTING.md index 291364978..89c9d014c 100644 --- a/extensions/intellij/CONTRIBUTING.md +++ b/extensions/intellij/CONTRIBUTING.md @@ -7,18 +7,18 @@ This file is for contribution guidelines specific to the JetBrains extension. Se - [Architecture Overview](#architecture-overview) - [Environment Setup](#environment-setup) - - [IDE Installation](#ide-installation) - - [IDE configuration](#ide-configuration) - - [Node.js Requirements](#nodejs-requirements) - - [Install all dependencies](#install-all-dependencies) - - [Misc](#misc) + - [IDE Installation](#ide-installation) + - [IDE configuration](#ide-configuration) + - [Node.js Requirements](#nodejs-requirements) + - [Install all dependencies](#install-all-dependencies) + - [Misc](#misc) - [Development Workflow](#development-workflow) - - [Running the extension](#running-the-extension) - - [Reloading changes](#reloading-changes) - - [Setting breakpoints](#setting-breakpoints) - - [Available Gradle tasks](#available-gradle-tasks) - - [Packaging](#packaging) - - [Testing the packaged extension](#testing-the-packaged-extension) + - [Running the extension in debug mode](#running-the-extension-in-debug-mode) + - [Reloading changes](#reloading-changes) + - [Setting breakpoints](#setting-breakpoints) + - [Available Gradle tasks](#available-gradle-tasks) + - [Packaging](#packaging) + - [Testing the packaged extension](#testing-the-packaged-extension) ## Architecture Overview @@ -70,7 +70,7 @@ This should open a new instance on IntelliJ with the extension installed. - `extensions/intellij`: Attempt to reload changed classes by selecting _Run | Debugging Actions | Reload Changed Classes`_ - - This will often fail on new imports, schema changes etc. In that case, you need to stop and restart the extension + - This will often fail on new imports, schema changes etc. In that case, you need to stop and restart the extension - `gui`: Changes will be reloaded automatically - `core`: Run `npm run build` from the `binary` directory (requires restarting the `Start Dev Server (core)` task) From 395f87e622e3a55ffa255909c5567166f523a808 Mon Sep 17 00:00:00 2001 From: Test Date: Wed, 23 Oct 2024 16:54:45 -0700 Subject: [PATCH 45/70] Update CONTRIBUTING.md --- extensions/intellij/CONTRIBUTING.md | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/extensions/intellij/CONTRIBUTING.md b/extensions/intellij/CONTRIBUTING.md index 332b79d27..7dd776055 100644 --- a/extensions/intellij/CONTRIBUTING.md +++ b/extensions/intellij/CONTRIBUTING.md @@ -7,13 +7,14 @@ This file is for contribution guidelines specific to the JetBrains extension. Se - [Architecture Overview](#architecture-overview) - [Environment Setup](#environment-setup) - - [IDE Installation](#ide-installation) - - [IDE configuration](#ide-configuration) - - [Node.js Requirements](#nodejs-requirements) - - [Install all dependencies](#install-all-dependencies) - - [Misc](#misc) + - [IDE Installation](#ide-installation) + - [IDE configuration](#ide-configuration) + - [Node.js Requirements](#nodejs-requirements) + - [Install all dependencies](#install-all-dependencies) + - [Misc](#misc) - [Development Workflow](#development-workflow) - [Running the extension in debug mode](#running-the-extension-in-debug-mode) + - [Accessing files in the `.continue` directory](#accessing-files-in-the-continue-directory) - [Reloading changes](#reloading-changes) - [Setting breakpoints](#setting-breakpoints) - [Available Gradle tasks](#available-gradle-tasks) @@ -60,7 +61,7 @@ This project requires Node.js version 20.11.0 (LTS) or higher. You have two opti ### Running the extension in debug mode -Select the "Run Continue" task in the top right corner of the IDE and then select the "Debug" option. +Select the `Run Continue` task in the top right corner of the IDE and then select the "Debug" option. ![run-extension-screenshot](../../media/run-continue-intellij.png) @@ -75,7 +76,7 @@ allow for changes to your `config.json` and other files during development, with - `extensions/intellij`: Attempt to reload changed classes by selecting _Run | Debugging Actions | Reload Changed Classes`_ - - This will often fail on new imports, schema changes etc. In that case, you need to stop and restart the extension + - This will often fail on new imports, schema changes etc. In that case, you need to stop and restart the extension - `gui`: Changes will be reloaded automatically - `core`: Run `npm run build` from the `binary` directory (requires restarting the `Start Dev Server (core)` task) From d0f834da6b29733b5d12bfa1927cd9903b395cb3 Mon Sep 17 00:00:00 2001 From: Test Date: Wed, 23 Oct 2024 18:25:26 -0700 Subject: [PATCH 46/70] gui: misc css fixes --- .../components/History/HistoryTableRow.tsx | 6 +-- gui/src/components/mainInput/TutorialCard.tsx | 19 +++---- .../modelSelection/ModelSelectionListbox.tsx | 31 +++++++---- gui/src/forms/AddModelForm.tsx | 54 +++++++++---------- gui/src/pages/More/KeyboardShortcuts.tsx | 12 ++--- gui/src/pages/More/More.tsx | 16 +++--- gui/src/pages/history/HistoryHeader.tsx | 2 +- gui/src/pages/stats.tsx | 10 ++-- 8 files changed, 77 insertions(+), 73 deletions(-) diff --git a/gui/src/components/History/HistoryTableRow.tsx b/gui/src/components/History/HistoryTableRow.tsx index ca140c8ab..76c241d63 100644 --- a/gui/src/components/History/HistoryTableRow.tsx +++ b/gui/src/components/History/HistoryTableRow.tsx @@ -56,10 +56,10 @@ export function HistoryTableRow({ onMouseLeave={() => setHovered(false)} >

{ // Save current session - saveSession(); + await saveSession(); await loadSession(session.sessionId); navigate("/"); }} @@ -113,7 +113,7 @@ export function HistoryTableRow({ { - deleteSession(session.sessionId); + await deleteSession(session.sessionId); onDelete(session.sessionId); }} > diff --git a/gui/src/components/mainInput/TutorialCard.tsx b/gui/src/components/mainInput/TutorialCard.tsx index cd5be630b..3a424e257 100644 --- a/gui/src/components/mainInput/TutorialCard.tsx +++ b/gui/src/components/mainInput/TutorialCard.tsx @@ -52,10 +52,10 @@ export function TutorialCard({ onClose }: TutorialCardProps) {
    {!isJetBrains() && (
  • - + ideMessenger.request( "vscode/openMoveRightMarkdown", @@ -70,32 +70,33 @@ export function TutorialCard({ onClose }: TutorialCardProps) {
  • )}
  • - + Highlight code and press {getMetaKeyLabel() + "I"} to quickly make natural language edits
  • - + Highlight code and press {getMetaKeyLabel() + "L"} to add it to the chat window
  • - + Click the gear icon in the bottom right to configure Continue
  • - + + ideMessenger.post("openUrl", "https://docs.continue.dev") + } > Read our documentation {" "} diff --git a/gui/src/components/modelSelection/ModelSelectionListbox.tsx b/gui/src/components/modelSelection/ModelSelectionListbox.tsx index 451be0e16..629463943 100644 --- a/gui/src/components/modelSelection/ModelSelectionListbox.tsx +++ b/gui/src/components/modelSelection/ModelSelectionListbox.tsx @@ -1,5 +1,9 @@ import { Transition } from "@headlessui/react"; -import { CheckIcon, ChevronUpDownIcon } from "@heroicons/react/24/outline"; +import { + CheckIcon, + ChevronUpDownIcon, + CubeIcon, +} from "@heroicons/react/24/outline"; import { Dispatch, Fragment, SetStateAction } from "react"; import { Listbox } from "@headlessui/react"; import styled from "styled-components"; @@ -111,7 +115,7 @@ function ModelSelectionListbox({ }: ModelSelectionListboxProps) { return ( -
    +
    {window.vscMediaUrl && selectedProvider.icon && ( @@ -141,25 +145,30 @@ function ModelSelectionListbox({ {({ selected }) => ( <> - {window.vscMediaUrl && option.icon && ( - + {option.title === "Autodetect" ? ( + + ) : ( + window.vscMediaUrl && + option.icon && ( + + ) )} {option.title} - {selected ? ( + {selected && ( - ) : null} + )} )} diff --git a/gui/src/forms/AddModelForm.tsx b/gui/src/forms/AddModelForm.tsx index e045ca13e..861333517 100644 --- a/gui/src/forms/AddModelForm.tsx +++ b/gui/src/forms/AddModelForm.tsx @@ -20,6 +20,11 @@ interface QuickModelSetupProps { hideFreeTrialLimitMessage?: boolean; } +const MODEL_PROVIDERS_URL = + "https://docs.continue.dev/customize/model-providers"; +const CODESTRAL_URL = "https://console.mistral.ai/codestral"; +const CONTINUE_SETUP_URL = "https://docs.continue.dev/setup/overview"; + function AddModelForm({ onDone, hideFreeTrialLimitMessage, @@ -39,7 +44,7 @@ function AddModelForm({ const selectedProviderApiKeyUrl = selectedModel.params.model.startsWith( "codestral", ) - ? "https://console.mistral.ai/codestral" + ? CODESTRAL_URL : selectedProvider.apiKeyUrl; function isDisabled() { @@ -97,23 +102,16 @@ function AddModelForm({ return (
    -
    -

    Add Chat model

    +
    +

    Add Chat model

    {!hideFreeTrialLimitMessage && hasPassedFTL() && ( -

    +

    You've reached the free trial limit of {FREE_TRIAL_LIMIT_REQUESTS}{" "} free inputs. To keep using Continue, you can either use your own API key, or use a local LLM. To read more about the options, see our{" "} - ideMessenger.post( - "openUrl", - "https://docs.continue.dev/setup/overview", - ) - } + onClick={() => ideMessenger.post("openUrl", CONTINUE_SETUP_URL)} > documentation @@ -121,7 +119,7 @@ function AddModelForm({

    )} -
    +
    !["freetrial", "openai-aiohttp"].includes(key), ) .map(([, provider]) => provider)} - > + /> Don't see your provider?{" "} + ideMessenger.post("openUrl", MODEL_PROVIDERS_URL) + } > Click here {" "} @@ -148,12 +147,12 @@ function AddModelForm({ {selectedProvider.downloadUrl && (
    -
    {selectedModel.params.model.startsWith("codestral") && (
    -

    Codestral API key

    +

    Codestral API key

    Note that codestral requires a different API key from other Mistral models @@ -189,7 +188,7 @@ function AddModelForm({ {selectedProvider.apiKeyUrl && (

    <> -
    )} - + {selectedProvider.collectInputFor && selectedProvider.collectInputFor .filter( @@ -225,7 +225,7 @@ function AddModelForm({ .map((field) => (
    <> -