From c3d4b69a2106f8d2eb737975d99af19552a43f87 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Mon, 5 Feb 2024 16:12:01 -0800 Subject: [PATCH 001/141] =?UTF-8?q?=F0=9F=9A=A7=20Start=20of=20Typescript?= =?UTF-8?q?=20IPC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/ipc/IpcIde.ts | 101 +++++++++++++++++++++++++++++++++++++++++ core/ipc/cli.ts | 9 ++++ core/ipc/interface.ts | 8 ++++ core/ipc/messenger.ts | 16 +++++++ core/package-lock.json | 17 +++++-- core/package.json | 1 + core/yarn.lock | 13 ++++-- 7 files changed, 157 insertions(+), 8 deletions(-) create mode 100644 core/ipc/IpcIde.ts create mode 100644 core/ipc/cli.ts create mode 100644 core/ipc/interface.ts create mode 100644 core/ipc/messenger.ts diff --git a/core/ipc/IpcIde.ts b/core/ipc/IpcIde.ts new file mode 100644 index 000000000..2606b34eb --- /dev/null +++ b/core/ipc/IpcIde.ts @@ -0,0 +1,101 @@ +import { Chunk, DiffLine, IDE, Problem } from ".."; +import { BrowserSerializedContinueConfig } from "../config/load"; + +export class IpcIde implements IDE { + getSerializedConfig(): Promise { + throw new Error("Method not implemented."); + } + getDiff(): Promise { + throw new Error("Method not implemented."); + } + getTerminalContents(): Promise { + throw new Error("Method not implemented."); + } + listWorkspaceContents(directory?: string | undefined): Promise { + throw new Error("Method not implemented."); + } + listFolders(): Promise { + throw new Error("Method not implemented."); + } + getWorkspaceDirs(): Promise { + throw new Error("Method not implemented."); + } + writeFile(path: string, contents: string): Promise { + throw new Error("Method not implemented."); + } + showVirtualFile(title: string, contents: string): Promise { + throw new Error("Method not implemented."); + } + getContinueDir(): Promise { + throw new Error("Method not implemented."); + } + openFile(path: string): Promise { + throw new Error("Method not implemented."); + } + runCommand(command: string): Promise { + throw new Error("Method not implemented."); + } + saveFile(filepath: string): Promise { + throw new Error("Method not implemented."); + } + readFile(filepath: string): Promise { + throw new Error("Method not implemented."); + } + showLines( + filepath: string, + startLine: number, + endLine: number + ): Promise { + throw new Error("Method not implemented."); + } + showDiff( + filepath: string, + newContents: string, + stepIndex: number + ): Promise { + throw new Error("Method not implemented."); + } + verticalDiffUpdate( + filepath: string, + startLine: number, + endLine: number, + diffLine: DiffLine + ): Promise { + throw new Error("Method not implemented."); + } + getOpenFiles(): Promise { + throw new Error("Method not implemented."); + } + getPinnedFiles(): Promise { + throw new Error("Method not implemented."); + } + getSearchResults(query: string): Promise { + throw new Error("Method not implemented."); + } + subprocess(command: string): Promise<[string, string]> { + throw new Error("Method not implemented."); + } + getProblems(filepath?: string | undefined): Promise { + throw new Error("Method not implemented."); + } + getBranch(dir: string): Promise { + throw new Error("Method not implemented."); + } + getFilesToEmbed(providerId: string): Promise<[string, string, string][]> { + throw new Error("Method not implemented."); + } + sendEmbeddingForChunk( + chunk: Chunk, + embedding: number[], + tags: string[] + ): void { + throw new Error("Method not implemented."); + } + retrieveChunks( + text: string, + n: number, + directory: string | undefined + ): Promise { + throw new Error("Method not implemented."); + } +} diff --git a/core/ipc/cli.ts b/core/ipc/cli.ts new file mode 100644 index 000000000..e70859803 --- /dev/null +++ b/core/ipc/cli.ts @@ -0,0 +1,9 @@ +import { Command } from "commander"; + +const program = new Command(); + +program.argument("", "input name").action((name) => { + console.log(`Hello, ${name}`); +}); + +program.parse(process.argv); diff --git a/core/ipc/interface.ts b/core/ipc/interface.ts new file mode 100644 index 000000000..67d77ddd6 --- /dev/null +++ b/core/ipc/interface.ts @@ -0,0 +1,8 @@ +import { Messenger } from "./messenger"; + +export class IpcInterface { + private messenger: Messenger; + constructor(messenger: Messenger) { + this.messenger = messenger; + } +} diff --git a/core/ipc/messenger.ts b/core/ipc/messenger.ts new file mode 100644 index 000000000..4b3d68769 --- /dev/null +++ b/core/ipc/messenger.ts @@ -0,0 +1,16 @@ +export abstract class Messenger { + abstract send(messageType: string, message: any): void; + abstract onMessage( + messageType: string, + handler: (message: any) => void + ): void; +} + +export class IpcMessenger extends Messenger { + send(messageType: string, message: any): void { + console.log(`Sending message: ${messageType}`); + } + onMessage(messageType: string, handler: (message: any) => void): void { + console.log(`Registering handler for message: ${messageType}`); + } +} diff --git a/core/package-lock.json b/core/package-lock.json index d33a76ad5..a292adfd3 100644 --- a/core/package-lock.json +++ b/core/package-lock.json @@ -13,11 +13,12 @@ "@types/node-fetch": "^2.6.11", "@xenova/transformers": "^2.14.0", "cheerio": "^1.0.0-rc.12", + "commander": "^12.0.0", "dotenv": "^16.3.1", "fastest-levenshtein": "^1.0.16", "handlebars": "^4.7.8", "js-tiktoken": "^1.0.8", - "llm-code-highlighter": "^0.0.1", + "llm-code-highlighter": "^0.0.3", "node-fetch": "^3.3.2", "node-html-markdown": "^1.3.0", "openai": "^4.20.1", @@ -2805,6 +2806,14 @@ "node": ">=12.17" } }, + "node_modules/commander": { + "version": "12.0.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-12.0.0.tgz", + "integrity": "sha512-MwVNWlYjDTtOjX5PiD7o5pK0UrFU/OYgcJfjjK4RaHZETNtjJqrZa9Y9ds88+A+f+d5lv+561eZ+yCKoS3gbAA==", + "engines": { + "node": ">=18" + } + }, "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", @@ -4770,9 +4779,9 @@ "dev": true }, "node_modules/llm-code-highlighter": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/llm-code-highlighter/-/llm-code-highlighter-0.0.1.tgz", - "integrity": "sha512-26PExkQxeh5EiBNroldpV82pZDrjC6C5v4PLcm5ZpGIKExrHs9Hqw36B+1Fg+dxXGZMnwlCZ+6EbC2FEVocmcw==", + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/llm-code-highlighter/-/llm-code-highlighter-0.0.3.tgz", + "integrity": "sha512-l/R+m6ngXRTYxzoCzqpBk5TiSVpS4Ek9fKx/PIy25HV6XDbCC6iOfVITPPSTGkh7NlI+tN5vWjdqUfN3YW+HwQ==", "dependencies": { "graphology": "^0.25.4", "graphology-metrics": "^2.2.0", diff --git a/core/package.json b/core/package.json index 50e0fdf21..46d891d3a 100644 --- a/core/package.json +++ b/core/package.json @@ -22,6 +22,7 @@ "@types/node-fetch": "^2.6.11", "@xenova/transformers": "^2.14.0", "cheerio": "^1.0.0-rc.12", + "commander": "^12.0.0", "dotenv": "^16.3.1", "fastest-levenshtein": "^1.0.16", "handlebars": "^4.7.8", diff --git a/core/yarn.lock b/core/yarn.lock index 3c04d91f7..cb3565a72 100644 --- a/core/yarn.lock +++ b/core/yarn.lock @@ -1465,6 +1465,11 @@ command-line-usage@^7.0.0, command-line-usage@7.0.1: table-layout "^3.0.0" typical "^7.1.1" +commander@^12.0.0: + version "12.0.0" + resolved "https://registry.npmjs.org/commander/-/commander-12.0.0.tgz" + integrity sha512-MwVNWlYjDTtOjX5PiD7o5pK0UrFU/OYgcJfjjK4RaHZETNtjJqrZa9Y9ds88+A+f+d5lv+561eZ+yCKoS3gbAA== + concat-map@0.0.1: version "0.0.1" resolved "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz" @@ -2695,10 +2700,10 @@ lines-and-columns@^1.1.6: resolved "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz" integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg== -llm-code-highlighter@^0.0.1: - version "0.0.1" - resolved "https://registry.npmjs.org/llm-code-highlighter/-/llm-code-highlighter-0.0.1.tgz" - integrity sha512-26PExkQxeh5EiBNroldpV82pZDrjC6C5v4PLcm5ZpGIKExrHs9Hqw36B+1Fg+dxXGZMnwlCZ+6EbC2FEVocmcw== +llm-code-highlighter@^0.0.3: + version "0.0.3" + resolved "https://registry.npmjs.org/llm-code-highlighter/-/llm-code-highlighter-0.0.3.tgz" + integrity sha512-l/R+m6ngXRTYxzoCzqpBk5TiSVpS4Ek9fKx/PIy25HV6XDbCC6iOfVITPPSTGkh7NlI+tN5vWjdqUfN3YW+HwQ== dependencies: graphology "^0.25.4" graphology-metrics "^2.2.0" From 7dd14fb2d0bf5876c22f236b38785460b585be40 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Fri, 9 Feb 2024 20:10:46 -0800 Subject: [PATCH 002/141] =?UTF-8?q?=F0=9F=9A=A7=20stdin/out=20messenger?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/ipc/IpcIde.ts | 7 +++++ core/ipc/interface.ts | 8 ----- core/ipc/messenger.ts | 68 +++++++++++++++++++++++++++++++++++++++---- 3 files changed, 69 insertions(+), 14 deletions(-) delete mode 100644 core/ipc/interface.ts diff --git a/core/ipc/IpcIde.ts b/core/ipc/IpcIde.ts index 2606b34eb..11d187daa 100644 --- a/core/ipc/IpcIde.ts +++ b/core/ipc/IpcIde.ts @@ -1,7 +1,14 @@ import { Chunk, DiffLine, IDE, Problem } from ".."; import { BrowserSerializedContinueConfig } from "../config/load"; +import { IpcMessenger } from "./messenger"; export class IpcIde implements IDE { + private messenger: IpcMessenger; + + constructor() { + this.messenger = new IpcMessenger(); + } + getSerializedConfig(): Promise { throw new Error("Method not implemented."); } diff --git a/core/ipc/interface.ts b/core/ipc/interface.ts deleted file mode 100644 index 67d77ddd6..000000000 --- a/core/ipc/interface.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Messenger } from "./messenger"; - -export class IpcInterface { - private messenger: Messenger; - constructor(messenger: Messenger) { - this.messenger = messenger; - } -} diff --git a/core/ipc/messenger.ts b/core/ipc/messenger.ts index 4b3d68769..fb2759247 100644 --- a/core/ipc/messenger.ts +++ b/core/ipc/messenger.ts @@ -1,16 +1,72 @@ +import { v4 as uuidv4 } from "uuid"; + export abstract class Messenger { - abstract send(messageType: string, message: any): void; + abstract send(messageType: string, message: any, messageId?: string): string; abstract onMessage( messageType: string, - handler: (message: any) => void + handler: (message: any) => Promise | undefined ): void; } +export interface Message { + messageType: string; + messageId: string; + message: any; +} + export class IpcMessenger extends Messenger { - send(messageType: string, message: any): void { - console.log(`Sending message: ${messageType}`); + listeners = new Map< + string, + ((message: Message) => Promise | undefined)[] + >(); + + constructor() { + super(); + + console.log = console.error; + + process.stdin.on("data", (data) => { + const d = data.toString(); + try { + const msg: Message = JSON.parse(d); + if ( + msg.message !== undefined || + msg.messageType !== undefined || + msg.messageId !== undefined + ) { + throw new Error("Invalid message sent: " + JSON.stringify(msg)); + } + + this.listeners.get(msg.messageType)?.forEach(async (handler) => { + const response = await handler(msg); + this.send(msg.messageType, response, msg.messageId); + }); + } catch (e) { + console.error("Invalid JSON:", d); + return; + } + }); } - onMessage(messageType: string, handler: (message: any) => void): void { - console.log(`Registering handler for message: ${messageType}`); + + send(messageType: string, message: any, messageId?: string): string { + messageId = messageId ?? uuidv4(); + const data: Message = { + messageType, + message, + messageId, + }; + // process.send?.(data); + process.stdout?.write(JSON.stringify(data)); + return messageId; + } + + onMessage( + messageType: string, + handler: (message: Message) => Promise | undefined + ): void { + if (!this.listeners.has(messageType)) { + this.listeners.set(messageType, []); + } + this.listeners.get(messageType)?.push(handler); } } From 70bf23c3fa29e5f7c57fa7e0f3ef7978f98d7a49 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Fri, 9 Feb 2024 22:34:33 -0800 Subject: [PATCH 003/141] =?UTF-8?q?=F0=9F=9A=A7=20working=20on=20core=20pr?= =?UTF-8?q?otocol?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/ipc/IpcIde.ts | 4 +- core/ipc/cli.ts | 7 +++- core/ipc/core.ts | 19 ++++++++++ core/ipc/messenger.ts | 38 +++++++++++-------- .../vscode/src => core/util}/history.ts | 4 +- extensions/vscode/src/debugPanel.ts | 2 +- 6 files changed, 52 insertions(+), 22 deletions(-) create mode 100644 core/ipc/core.ts rename {extensions/vscode/src => core/util}/history.ts (96%) diff --git a/core/ipc/IpcIde.ts b/core/ipc/IpcIde.ts index 11d187daa..97fa9ada2 100644 --- a/core/ipc/IpcIde.ts +++ b/core/ipc/IpcIde.ts @@ -5,8 +5,8 @@ import { IpcMessenger } from "./messenger"; export class IpcIde implements IDE { private messenger: IpcMessenger; - constructor() { - this.messenger = new IpcMessenger(); + constructor(messenger: IpcMessenger) { + this.messenger = messenger; } getSerializedConfig(): Promise { diff --git a/core/ipc/cli.ts b/core/ipc/cli.ts index e70859803..7b36a919b 100644 --- a/core/ipc/cli.ts +++ b/core/ipc/cli.ts @@ -1,9 +1,12 @@ import { Command } from "commander"; +import { Core } from "./core"; +import { IpcMessenger } from "./messenger"; const program = new Command(); -program.argument("", "input name").action((name) => { - console.log(`Hello, ${name}`); +program.action(() => { + const messenger = new IpcMessenger(); + const core = new Core(messenger); }); program.parse(process.argv); diff --git a/core/ipc/core.ts b/core/ipc/core.ts new file mode 100644 index 000000000..1c750ebd5 --- /dev/null +++ b/core/ipc/core.ts @@ -0,0 +1,19 @@ +import historyManager from "../util/history"; +import { IpcIde } from "./IpcIde"; +import { IpcMessenger } from "./messenger"; + +export class Core { + private messenger: IpcMessenger; + private ide: IpcIde; + constructor(messenger: IpcMessenger) { + this.messenger = messenger; + this.ide = new IpcIde(messenger); + + this.messenger.on("history/list", (msg) => { + return historyManager.list(); + }); + this.messenger.on("history/delete", (msg) => { + historyManager.delete(msg.data.id); + }); + } +} diff --git a/core/ipc/messenger.ts b/core/ipc/messenger.ts index fb2759247..e5217b5d1 100644 --- a/core/ipc/messenger.ts +++ b/core/ipc/messenger.ts @@ -1,24 +1,32 @@ import { v4 as uuidv4 } from "uuid"; +import { PersistedSessionInfo } from ".."; export abstract class Messenger { abstract send(messageType: string, message: any, messageId?: string): string; - abstract onMessage( - messageType: string, - handler: (message: any) => Promise | undefined - ): void; + abstract on(messageType: string, handler: (message: any) => any): void; } -export interface Message { +export interface Message { messageType: string; messageId: string; - message: any; + data: T; } +type Protocol = { + "history/list": [undefined, PersistedSessionInfo[]]; + "history/delete": [{ id: string }, void]; + "history/load": [{ id: string }, PersistedSessionInfo]; + "history/save": [PersistedSessionInfo, void]; + "devdata/log": [{ tableName: string; data: any }, void]; +}; +type ProtocolKeys = keyof Protocol; + +type ProtocolCallbacks = { + [K in ProtocolKeys]: (msg: Protocol[K][0]) => Protocol[K][1]; +}; + export class IpcMessenger extends Messenger { - listeners = new Map< - string, - ((message: Message) => Promise | undefined)[] - >(); + listeners = new Map any)[]>(); constructor() { super(); @@ -30,7 +38,7 @@ export class IpcMessenger extends Messenger { try { const msg: Message = JSON.parse(d); if ( - msg.message !== undefined || + msg.data !== undefined || msg.messageType !== undefined || msg.messageId !== undefined ) { @@ -52,7 +60,7 @@ export class IpcMessenger extends Messenger { messageId = messageId ?? uuidv4(); const data: Message = { messageType, - message, + data: message, messageId, }; // process.send?.(data); @@ -60,9 +68,9 @@ export class IpcMessenger extends Messenger { return messageId; } - onMessage( - messageType: string, - handler: (message: Message) => Promise | undefined + on( + messageType: T, + handler: (message: Message) => Protocol[T][1] ): void { if (!this.listeners.has(messageType)) { this.listeners.set(messageType, []); diff --git a/extensions/vscode/src/history.ts b/core/util/history.ts similarity index 96% rename from extensions/vscode/src/history.ts rename to core/util/history.ts index 87ed290d9..777af8805 100644 --- a/extensions/vscode/src/history.ts +++ b/core/util/history.ts @@ -1,6 +1,6 @@ -import { PersistedSessionInfo, SessionInfo } from "core"; -import { getSessionFilePath, getSessionsListPath } from "core/util/paths"; import * as fs from "fs"; +import { PersistedSessionInfo, SessionInfo } from ".."; +import { getSessionFilePath, getSessionsListPath } from "./paths"; class HistoryManager { list(): PersistedSessionInfo[] { diff --git a/extensions/vscode/src/debugPanel.ts b/extensions/vscode/src/debugPanel.ts index 2b06b7e7f..3a22c43f8 100644 --- a/extensions/vscode/src/debugPanel.ts +++ b/extensions/vscode/src/debugPanel.ts @@ -1,6 +1,7 @@ import { ContextItemId, DiffLine, FileEdit, ModelDescription } from "core"; import { indexDocs } from "core/indexing/docs"; import TransformersJsEmbeddingsProvider from "core/indexing/embeddings/TransformersJsEmbeddingsProvider"; +import historyManager from "core/util/history"; import { editConfigJson, getConfigJsonPath } from "core/util/paths"; import { readFileSync, writeFileSync } from "fs"; import { v4 as uuidv4 } from "uuid"; @@ -12,7 +13,6 @@ import { windowId, } from "./activation/activate"; import { streamEdit } from "./diff/verticalPerLine/manager"; -import historyManager from "./history"; import { VsCodeIde } from "./ideProtocol"; import { configHandler, llmFromTitle } from "./loadConfig"; import { getTheme } from "./util/getTheme"; From 5073f09ab75af2685a8f5c11b1664b3c52bbeb22 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Sat, 10 Feb 2024 16:24:35 -0800 Subject: [PATCH 004/141] =?UTF-8?q?=F0=9F=9A=A7=20fill=20out=20rest=20of?= =?UTF-8?q?=20core=20protocol?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/ipc/messenger.ts | 68 ++++++++++++++++++++++++++++- extensions/vscode/src/debugPanel.ts | 25 ----------- 2 files changed, 67 insertions(+), 26 deletions(-) diff --git a/core/ipc/messenger.ts b/core/ipc/messenger.ts index e5217b5d1..cf884f3d9 100644 --- a/core/ipc/messenger.ts +++ b/core/ipc/messenger.ts @@ -1,5 +1,13 @@ import { v4 as uuidv4 } from "uuid"; -import { PersistedSessionInfo } from ".."; +import { + ChatMessage, + CompletionOptions, + ContextItem, + ContextSubmenuItem, + PersistedSessionInfo, + RangeInFile, + SerializedContinueConfig, +} from ".."; export abstract class Messenger { abstract send(messageType: string, message: any, messageId?: string): string; @@ -13,11 +21,69 @@ export interface Message { } type Protocol = { + abort: [undefined, void]; "history/list": [undefined, PersistedSessionInfo[]]; "history/delete": [{ id: string }, void]; "history/load": [{ id: string }, PersistedSessionInfo]; "history/save": [PersistedSessionInfo, void]; "devdata/log": [{ tableName: string; data: any }, void]; + "config/addOpenAiKey": [string, void]; + "config/addModel": [ + { model: SerializedContinueConfig["models"][number] }, + void, + ]; + "config/deleteModel": [{ title: string }, void]; + "context/getContextItems": [ + { + name: string; + query: string; + fullInput: string; + selectedCode: RangeInFile[]; + }, + ContextItem[], + ]; + "context/loadSubmenuItems": [{ title: string }, ContextSubmenuItem[]]; + "context/addDocs": [{ title: string; url: string }, void]; + "autocomplete/complete": [ + { filepath: string; line: number; column: number }, + string[], + ]; + "command/run": [ + { + input: string; + history: ChatMessage[]; + modelTitle: string; + slashCommandName: string; + contextItems: ContextItem[]; + params: any; + historyIndex: number; + }, + AsyncGenerator, + ]; + "llm/complete": [ + { + prompt: string; + completionOptions: CompletionOptions; + title: string; + }, + AsyncGenerator, + ]; + "llm/streamComplete": [ + { + prompt: string; + completionOptions: CompletionOptions; + title: string; + }, + AsyncGenerator, + ]; + "llm/streamChat": [ + { + messages: ChatMessage[]; + completionOptions: CompletionOptions; + title: string; + }, + AsyncGenerator, + ]; }; type ProtocolKeys = keyof Protocol; diff --git a/extensions/vscode/src/debugPanel.ts b/extensions/vscode/src/debugPanel.ts index 3a22c43f8..3d16cb291 100644 --- a/extensions/vscode/src/debugPanel.ts +++ b/extensions/vscode/src/debugPanel.ts @@ -247,31 +247,6 @@ export function getSidebarContent( respond(await ide.subprocess(data.message.command)); break; } - case "getFilesToEmbed": { - let filesToEmbed = await ide.getFilesToEmbed(data.message.providerId); - respond(filesToEmbed); - break; - } - case "sendChunkForFile": { - respond( - await ide.sendEmbeddingForChunk( - data.message.chunk, - data.message.embedding, - data.message.tags - ) - ); - break; - } - case "retrieveChunks": { - respond( - await ide.retrieveChunks( - data.message.text, - data.message.n, - data.message.directory - ) - ); - break; - } // History case "history": { respond(historyManager.list()); From 8419509ba695d47c14fdc4f3106730f49cc06c9c Mon Sep 17 00:00:00 2001 From: Nick the Sick Date: Sun, 11 Feb 2024 12:35:17 +0100 Subject: [PATCH 005/141] Fully typed redux store --- gui/src/components/Layout.tsx | 12 +- .../dialogs/SelectContextGroupDialog.tsx | 4 +- gui/src/components/gui/StepContainer.tsx | 4 +- gui/src/components/loaders/Loader.tsx | 2 +- .../mainInput/CodeBlockExtension.tsx | 4 +- .../components/mainInput/ContinueInputBox.tsx | 6 +- gui/src/components/mainInput/TipTapEditor.tsx | 6 +- .../components/modelSelection/ModelSelect.tsx | 4 +- gui/src/hooks/CustomPostHogProvider.tsx | 4 +- gui/src/hooks/useChatHandler.ts | 10 +- gui/src/hooks/useHistory.tsx | 6 +- gui/src/hooks/useSetup.ts | 4 +- gui/src/pages/gui.tsx | 10 +- gui/src/pages/settings.tsx | 4 +- gui/src/redux/selectors/index.ts | 6 +- gui/src/redux/selectors/modelSelectors.ts | 6 +- gui/src/redux/selectors/uiStateSelectors.ts | 4 +- gui/src/redux/slices/configSlice.ts | 34 +-- gui/src/redux/slices/miscSlice.ts | 6 +- gui/src/redux/slices/serverStateReducer.ts | 58 ++-- gui/src/redux/slices/stateSlice.ts | 269 ++++++++---------- gui/src/redux/slices/uiStateSlice.ts | 39 ++- gui/src/redux/store.ts | 47 +-- 23 files changed, 239 insertions(+), 310 deletions(-) diff --git a/gui/src/components/Layout.tsx b/gui/src/components/Layout.tsx index a8fb8de28..44c971fa7 100644 --- a/gui/src/components/Layout.tsx +++ b/gui/src/components/Layout.tsx @@ -19,7 +19,7 @@ import { setBottomMessageCloseTimeout, setShowDialog, } from "../redux/slices/uiStateSlice"; -import { RootStore } from "../redux/store"; +import { RootState } from "../redux/store"; import { getFontSize, isMetaEquivalentKeyPressed } from "../util"; import HeaderButtonWithText from "./HeaderButtonWithText"; import TextDialog from "./dialogs"; @@ -106,23 +106,23 @@ const Layout = () => { const location = useLocation(); const dispatch = useDispatch(); const dialogMessage = useSelector( - (state: RootStore) => state.uiState.dialogMessage + (state: RootState) => state.uiState.dialogMessage ); const showDialog = useSelector( - (state: RootStore) => state.uiState.showDialog + (state: RootState) => state.uiState.showDialog ); const defaultModel = useSelector(defaultModelSelector); // #region Selectors const bottomMessage = useSelector( - (state: RootStore) => state.uiState.bottomMessage + (state: RootState) => state.uiState.bottomMessage ); const displayBottomMessageOnBottom = useSelector( - (state: RootStore) => state.uiState.displayBottomMessageOnBottom + (state: RootState) => state.uiState.displayBottomMessageOnBottom ); - const timeline = useSelector((state: RootStore) => state.state.history); + const timeline = useSelector((state: RootState) => state.state.history); // #endregion diff --git a/gui/src/components/dialogs/SelectContextGroupDialog.tsx b/gui/src/components/dialogs/SelectContextGroupDialog.tsx index 0d8e1c541..ddb21d6db 100644 --- a/gui/src/components/dialogs/SelectContextGroupDialog.tsx +++ b/gui/src/components/dialogs/SelectContextGroupDialog.tsx @@ -12,7 +12,7 @@ import { setDialogMessage, setShowDialog, } from "../../redux/slices/uiStateSlice"; -import { RootStore } from "../../redux/store"; +import { RootState } from "../../redux/store"; import HeaderButtonWithText from "../HeaderButtonWithText"; const MiniPillSpan = styled.span` @@ -50,7 +50,7 @@ const ContextGroupSelectDiv = styled.div` function SelectContextGroupDialog() { const dispatch = useDispatch(); const savedContextGroups = useSelector( - (state: RootStore) => state.serverState.savedContextGroups + (state: RootState) => state.serverState.savedContextGroups ); return ( diff --git a/gui/src/components/gui/StepContainer.tsx b/gui/src/components/gui/StepContainer.tsx index 1fb38ff2e..c24cd3dfa 100644 --- a/gui/src/components/gui/StepContainer.tsx +++ b/gui/src/components/gui/StepContainer.tsx @@ -13,7 +13,7 @@ import { vscBackground, vscInputBackground, } from ".."; -import { RootStore } from "../../redux/store"; +import { RootState } from "../../redux/store"; import { getFontSize } from "../../util"; import { logDevData } from "../../util/ide"; import HeaderButtonWithText from "../HeaderButtonWithText"; @@ -62,7 +62,7 @@ const ContentDiv = styled.div<{ isUserInput: boolean; fontSize?: number }>` function StepContainer(props: StepContainerProps) { const [isHovered, setIsHovered] = useState(false); const isUserInput = props.item.message.role === "user"; - const active = useSelector((store: RootStore) => store.state.active); + const active = useSelector((store: RootState) => store.state.active); const [feedback, setFeedback] = useState(undefined); diff --git a/gui/src/components/loaders/Loader.tsx b/gui/src/components/loaders/Loader.tsx index 1b0b838f2..a53216824 100644 --- a/gui/src/components/loaders/Loader.tsx +++ b/gui/src/components/loaders/Loader.tsx @@ -1,5 +1,5 @@ import { useSelector } from "react-redux"; -import { RootStore } from "../../redux/store"; +import { RootState } from "../../redux/store"; import styled from "styled-components"; import { PlayIcon } from "@heroicons/react/24/outline"; diff --git a/gui/src/components/mainInput/CodeBlockExtension.tsx b/gui/src/components/mainInput/CodeBlockExtension.tsx index 96e16c0d3..e680b644f 100644 --- a/gui/src/components/mainInput/CodeBlockExtension.tsx +++ b/gui/src/components/mainInput/CodeBlockExtension.tsx @@ -4,7 +4,7 @@ import { ContextItemWithId } from "core"; import { useDispatch, useSelector } from "react-redux"; import { vscBadgeBackground } from ".."; import { setEditingContextItemAtIndex } from "../../redux/slices/stateSlice"; -import { RootStore } from "../../redux/store"; +import { RootState } from "../../redux/store"; import CodeSnippetPreview from "../markdown/CodeSnippetPreview"; const CodeBlockComponent = ({ @@ -18,7 +18,7 @@ const CodeBlockComponent = ({ const item: ContextItemWithId = node.attrs.item; const contextItems = useSelector( - (state: RootStore) => state.state.contextItems + (state: RootState) => state.state.contextItems ); return ( diff --git a/gui/src/components/mainInput/ContinueInputBox.tsx b/gui/src/components/mainInput/ContinueInputBox.tsx index 15c31a564..523bde758 100644 --- a/gui/src/components/mainInput/ContinueInputBox.tsx +++ b/gui/src/components/mainInput/ContinueInputBox.tsx @@ -6,7 +6,7 @@ import styled, { keyframes } from "styled-components"; import { defaultBorderRadius, vscBackground } from ".."; import { selectSlashCommands } from "../../redux/selectors"; import { newSession } from "../../redux/slices/stateSlice"; -import { RootStore } from "../../redux/store"; +import { RootState } from "../../redux/store"; import ContextItemsPeek from "./ContextItemsPeek"; import TipTapEditor from "./TipTapEditor"; @@ -62,10 +62,10 @@ interface ContinueInputBoxProps { function ContinueInputBox(props: ContinueInputBoxProps) { const dispatch = useDispatch(); - const active = useSelector((store: RootStore) => store.state.active); + const active = useSelector((store: RootState) => store.state.active); const availableSlashCommands = useSelector(selectSlashCommands); const availableContextProviders = useSelector( - (store: RootStore) => store.state.config.contextProviders + (store: RootState) => store.state.config.contextProviders ); const [editorState, setEditorState] = useState(props.editorState); diff --git a/gui/src/components/mainInput/TipTapEditor.tsx b/gui/src/components/mainInput/TipTapEditor.tsx index 159250278..1f64f5842 100644 --- a/gui/src/components/mainInput/TipTapEditor.tsx +++ b/gui/src/components/mainInput/TipTapEditor.tsx @@ -27,7 +27,7 @@ import { SubmenuContextProvidersContext } from "../../App"; import useHistory from "../../hooks/useHistory"; import useUpdatingRef from "../../hooks/useUpdatingRef"; import { setEditingContextItemAtIndex } from "../../redux/slices/stateSlice"; -import { RootStore } from "../../redux/store"; +import { RootState } from "../../redux/store"; import { isMetaEquivalentKeyPressed } from "../../util"; import { errorPopup, isJetBrains, postToIde } from "../../util/ide"; import CodeBlockExtension from "./CodeBlockExtension"; @@ -130,7 +130,7 @@ function TipTapEditor(props: TipTapEditorProps) { const { getSubmenuContextItems } = useContext(SubmenuContextProvidersContext); const historyLength = useSelector( - (store: RootStore) => store.state.history.length + (store: RootState) => store.state.history.length ); const [inputFocused, setInputFocused] = useState(false); @@ -171,7 +171,7 @@ function TipTapEditor(props: TipTapEditorProps) { }; const contextItems = useSelector( - (store: RootStore) => store.state.contextItems + (store: RootState) => store.state.contextItems ); const getSubmenuContextItemsRef = useUpdatingRef(getSubmenuContextItems); diff --git a/gui/src/components/modelSelection/ModelSelect.tsx b/gui/src/components/modelSelection/ModelSelect.tsx index 25a7adcc7..7ad0f6af7 100644 --- a/gui/src/components/modelSelection/ModelSelect.tsx +++ b/gui/src/components/modelSelection/ModelSelect.tsx @@ -20,7 +20,7 @@ import { } from ".."; import { defaultModelSelector } from "../../redux/selectors/modelSelectors"; import { setDefaultModel } from "../../redux/slices/stateSlice"; -import { RootStore } from "../../redux/store"; +import { RootState } from "../../redux/store"; import { getMetaKeyLabel, isMetaEquivalentKeyPressed } from "../../util"; import { deleteModel } from "../../util/ide"; import HeaderButtonWithText from "../HeaderButtonWithText"; @@ -209,7 +209,7 @@ function ModelSelect(props: {}) { const dispatch = useDispatch(); const defaultModel = useSelector(defaultModelSelector); const allModels = useSelector( - (state: RootStore) => state.state.config.models + (state: RootState) => state.state.config.models ); const navigate = useNavigate(); diff --git a/gui/src/hooks/CustomPostHogProvider.tsx b/gui/src/hooks/CustomPostHogProvider.tsx index 9b97bad75..e835b2f8f 100644 --- a/gui/src/hooks/CustomPostHogProvider.tsx +++ b/gui/src/hooks/CustomPostHogProvider.tsx @@ -2,11 +2,11 @@ import posthog from "posthog-js"; import { PostHogProvider } from "posthog-js/react"; import React, { PropsWithChildren, useEffect } from "react"; import { useSelector } from "react-redux"; -import { RootStore } from "../redux/store"; +import { RootState } from "../redux/store"; const CustomPostHogProvider = ({ children }: PropsWithChildren) => { const allowAnonymousTelemetry = useSelector( - (store: RootStore) => store?.state?.config.allowAnonymousTelemetry + (store: RootState) => store?.state?.config.allowAnonymousTelemetry ); const [client, setClient] = React.useState(undefined); diff --git a/gui/src/hooks/useChatHandler.ts b/gui/src/hooks/useChatHandler.ts index 2e75cabfc..4e0d51d2f 100644 --- a/gui/src/hooks/useChatHandler.ts +++ b/gui/src/hooks/useChatHandler.ts @@ -25,7 +25,7 @@ import { setMessageAtIndex, streamUpdate, } from "../redux/slices/stateSlice"; -import { RootStore } from "../redux/store"; +import { RootState } from "../redux/store"; import { errorPopup } from "../util/ide"; function useChatHandler(dispatch: Dispatch) { @@ -34,15 +34,15 @@ function useChatHandler(dispatch: Dispatch) { const defaultModel = useSelector(defaultModelSelector); const slashCommands = useSelector( - (store: RootStore) => store.state.config.slashCommands || [] + (store: RootState) => store.state.config.slashCommands || [] ); const contextItems = useSelector( - (state: RootStore) => state.state.contextItems + (state: RootState) => state.state.contextItems ); - const history = useSelector((store: RootStore) => store.state.history); - const active = useSelector((store: RootStore) => store.state.active); + const history = useSelector((store: RootState) => store.state.history); + const active = useSelector((store: RootState) => store.state.active); const activeRef = useRef(active); useEffect(() => { activeRef.current = active; diff --git a/gui/src/hooks/useHistory.tsx b/gui/src/hooks/useHistory.tsx index 486070bf0..22156f136 100644 --- a/gui/src/hooks/useHistory.tsx +++ b/gui/src/hooks/useHistory.tsx @@ -6,7 +6,7 @@ import { stripImages } from "core/llm/countTokens"; import { useSelector } from "react-redux"; import { defaultModelSelector } from "../redux/selectors/modelSelectors"; import { newSession } from "../redux/slices/stateSlice"; -import { RootStore } from "../redux/store"; +import { RootState } from "../redux/store"; function truncateText(text: string, maxLength: number) { if (text.length > maxLength) { @@ -16,10 +16,10 @@ function truncateText(text: string, maxLength: number) { } function useHistory(dispatch: Dispatch) { - const state = useSelector((state: RootStore) => state.state); + const state = useSelector((state: RootState) => state.state); const defaultModel = useSelector(defaultModelSelector); const disableSessionTitles = useSelector( - (store: RootStore) => store.state.config.disableSessionTitles + (store: RootState) => store.state.config.disableSessionTitles ); async function getHistory(): Promise { diff --git a/gui/src/hooks/useSetup.ts b/gui/src/hooks/useSetup.ts index b91a9bf4a..d6165efe8 100644 --- a/gui/src/hooks/useSetup.ts +++ b/gui/src/hooks/useSetup.ts @@ -12,7 +12,7 @@ import { setConfig, setInactive, } from "../redux/slices/stateSlice"; -import { RootStore } from "../redux/store"; +import { RootState } from "../redux/store"; import useChatHandler from "./useChatHandler"; function useSetup(dispatch: Dispatch) { @@ -36,7 +36,7 @@ function useSetup(dispatch: Dispatch) { const { streamResponse } = useChatHandler(dispatch); const defaultModelTitle = useSelector( - (store: RootStore) => store.state.defaultModelTitle + (store: RootState) => store.state.defaultModelTitle ); // IDE event listeners diff --git a/gui/src/pages/gui.tsx b/gui/src/pages/gui.tsx index 490c17bfb..f054c0ebe 100644 --- a/gui/src/pages/gui.tsx +++ b/gui/src/pages/gui.tsx @@ -38,7 +38,7 @@ import { setDisplayBottomMessageOnBottom, setShowDialog, } from "../redux/slices/uiStateSlice"; -import { RootStore } from "../redux/store"; +import { RootState } from "../redux/store"; import { getMetaKeyLabel, isMetaEquivalentKeyPressed } from "../util"; import { isJetBrains } from "../util/ide"; @@ -141,11 +141,11 @@ function GUI(props: GUIProps) { // #endregion // #region Selectors - const sessionState = useSelector((state: RootStore) => state.state); + const sessionState = useSelector((state: RootState) => state.state); const defaultModel = useSelector(defaultModelSelector); - const active = useSelector((state: RootStore) => state.state.active); + const active = useSelector((state: RootState) => state.state.active); // #endregion @@ -169,7 +169,7 @@ function GUI(props: GUIProps) { // Set displayBottomMessageOnBottom const aboveComboBoxDivRef = useRef(null); const bottomMessage = useSelector( - (state: RootStore) => state.uiState.bottomMessage + (state: RootState) => state.uiState.bottomMessage ); useEffect(() => { if (!aboveComboBoxDivRef.current) return; @@ -184,7 +184,7 @@ function GUI(props: GUIProps) { const [userScrolledAwayFromBottom, setUserScrolledAwayFromBottom] = useState(false); - const state = useSelector((state: RootStore) => state.state); + const state = useSelector((state: RootState) => state.state); useEffect(() => { const handleScroll = () => { diff --git a/gui/src/pages/settings.tsx b/gui/src/pages/settings.tsx index 5ffcd32a6..9147be056 100644 --- a/gui/src/pages/settings.tsx +++ b/gui/src/pages/settings.tsx @@ -16,7 +16,7 @@ import { } from "../components"; import InfoHover from "../components/InfoHover"; import Loader from "../components/loaders/Loader"; -import { RootStore } from "../redux/store"; +import { RootState } from "../redux/store"; import { getFontSize, getPlatform } from "../util"; import { postToIde } from "../util/ide"; @@ -99,7 +99,7 @@ function Settings() { const onSubmit = (data: ContinueConfig) => console.log(data); const navigate = useNavigate(); - const config = useSelector((state: RootStore) => state.state.config); + const config = useSelector((state: RootState) => state.state.config); const dispatch = useDispatch(); const submitChanges = () => { diff --git a/gui/src/redux/selectors/index.ts b/gui/src/redux/selectors/index.ts index 4cd5673c2..4f9a8b7f8 100644 --- a/gui/src/redux/selectors/index.ts +++ b/gui/src/redux/selectors/index.ts @@ -1,9 +1,9 @@ import { createSelector } from "@reduxjs/toolkit"; import { ComboBoxItemType } from "../../components/mainInput/types"; -import { RootStore } from "../store"; +import { RootState } from "../store"; export const selectSlashCommands = createSelector( - [(store: RootStore) => store.state.config.slashCommands], + [(store: RootState) => store.state.config.slashCommands], (slashCommands) => { return ( slashCommands?.map((cmd) => { @@ -18,7 +18,7 @@ export const selectSlashCommands = createSelector( ); export const selectContextProviderDescriptions = createSelector( - [(store: RootStore) => store.state.config.contextProviders], + [(store: RootState) => store.state.config.contextProviders], (providers) => { return providers.filter((desc) => desc.type === "submenu") || []; } diff --git a/gui/src/redux/selectors/modelSelectors.ts b/gui/src/redux/selectors/modelSelectors.ts index a2fb54d18..76be21563 100644 --- a/gui/src/redux/selectors/modelSelectors.ts +++ b/gui/src/redux/selectors/modelSelectors.ts @@ -1,11 +1,11 @@ import { DEFAULT_MAX_TOKENS } from "core/llm/constants"; -import { RootStore } from "../store"; +import { RootState } from "../store"; -export const defaultModelSelector = (state: RootStore) => { +export const defaultModelSelector = (state: RootState) => { const title = state.state.defaultModelTitle; return state.state.config.models.find((model) => model.title === title); }; -export const contextLengthSelector = (state: RootStore) => { +export const contextLengthSelector = (state: RootState) => { return defaultModelSelector(state)?.contextLength || DEFAULT_MAX_TOKENS; }; diff --git a/gui/src/redux/selectors/uiStateSelectors.ts b/gui/src/redux/selectors/uiStateSelectors.ts index 7ebc93387..f8f08a263 100644 --- a/gui/src/redux/selectors/uiStateSelectors.ts +++ b/gui/src/redux/selectors/uiStateSelectors.ts @@ -1,5 +1,5 @@ -import { RootStore } from "../store"; +import { RootState } from "../store"; -const selectBottomMessage = (state: RootStore) => state.uiState.bottomMessage; +const selectBottomMessage = (state: RootState) => state.uiState.bottomMessage; export { selectBottomMessage }; diff --git a/gui/src/redux/slices/configSlice.ts b/gui/src/redux/slices/configSlice.ts index 8f317f4ca..0458c534c 100644 --- a/gui/src/redux/slices/configSlice.ts +++ b/gui/src/redux/slices/configSlice.ts @@ -1,38 +1,18 @@ -import { createSlice } from "@reduxjs/toolkit"; -import { RootStore } from "../store"; +import { PayloadAction, createSlice } from "@reduxjs/toolkit"; const windowAny: any = window; export const configSlice = createSlice({ name: "config", initialState: { - vscMachineId: windowAny.vscMachineId || undefined, - } as RootStore["config"], + vscMachineId: window.vscMachineId, + }, reducers: { - setVscMachineId: ( - state: RootStore["config"], - action: { type: string; payload: string } - ) => ({ - ...state, - vscMachineId: action.payload, - }), - setSessionId: ( - state: RootStore["config"], - action: { type: string; payload: string } - ) => ({ - ...state, - sessionId: action.payload, - }), - setDataSwitchOn: ( - state: RootStore["config"], - action: { type: string; payload: boolean } - ) => ({ - ...state, - dataSwitchOn: action.payload, - }), + setVscMachineId: (state, action: PayloadAction) => { + state.vscMachineId = action.payload; + }, }, }); -export const { setVscMachineId, setSessionId, setDataSwitchOn } = - configSlice.actions; +export const { setVscMachineId } = configSlice.actions; export default configSlice.reducer; diff --git a/gui/src/redux/slices/miscSlice.ts b/gui/src/redux/slices/miscSlice.ts index f569549ad..e07340590 100644 --- a/gui/src/redux/slices/miscSlice.ts +++ b/gui/src/redux/slices/miscSlice.ts @@ -1,4 +1,4 @@ -import { createSlice } from "@reduxjs/toolkit"; +import { PayloadAction, createSlice } from "@reduxjs/toolkit"; export const miscSlice = createSlice({ name: "misc", @@ -7,10 +7,10 @@ export const miscSlice = createSlice({ serverStatusMessage: "Continue Server Starting", }, reducers: { - setTakenActionTrue: (state: any, action) => { + setTakenActionTrue: (state) => { state.takenAction = true; }, - setServerStatusMessage: (state: any, action) => { + setServerStatusMessage: (state, action: PayloadAction) => { state.serverStatusMessage = action.payload; }, }, diff --git a/gui/src/redux/slices/serverStateReducer.ts b/gui/src/redux/slices/serverStateReducer.ts index ae3eaf8c6..249a4dd31 100644 --- a/gui/src/redux/slices/serverStateReducer.ts +++ b/gui/src/redux/slices/serverStateReducer.ts @@ -1,7 +1,11 @@ -import { createSlice } from "@reduxjs/toolkit"; +import { PayloadAction, createSlice } from "@reduxjs/toolkit"; import TransformersJsEmbeddingsProvider from "core/indexing/embeddings/TransformersJsEmbeddingsProvider"; import FreeTrial from "core/llm/llms/FreeTrial"; -import { RootStore } from "../store"; +import { + ContextProviderDescription, + ContinueConfig, + SlashCommandDescription, +} from "core"; const TEST_SLASH_COMMANDS = [ { @@ -18,7 +22,17 @@ const TEST_SLASH_COMMANDS = [ }, ]; -const initialState: RootStore["serverState"] = { +type ServerState = { + meilisearchUrl: string | undefined; + slashCommands: SlashCommandDescription[]; + selectedContextItems: any[]; + config: ContinueConfig; + contextProviders: ContextProviderDescription[]; + savedContextGroups: any[]; // TODO: Context groups + indexingProgress: number; +}; + +const initialState: ServerState = { meilisearchUrl: undefined, slashCommands: [], selectedContextItems: [], @@ -38,27 +52,27 @@ export const serverStateSlice = createSlice({ name: "serverState", initialState, reducers: { - setSlashCommands: (state, action) => { - return { - ...state, - slashCommands: [ - ...action.payload, - { name: "codebase", description: "Retrieve codebase context" }, - { name: "so", description: "Search StackOverflow" }, - ], - }; + setSlashCommands: ( + state, + action: PayloadAction + ) => { + state.slashCommands = [ + ...action.payload, + { name: "codebase", description: "Retrieve codebase context" }, + { name: "so", description: "Search StackOverflow" }, + ]; }, - setContextProviders: (state, action) => { - return { - ...state, - contextProviders: action.payload, - }; + setContextProviders: ( + state, + action: PayloadAction + ) => { + state.contextProviders = action.payload; }, - setIndexingProgress: (state, { payload }: { payload: number }) => { - return { - ...state, - indexingProgress: payload, - }; + setIndexingProgress: ( + state, + action: PayloadAction + ) => { + state.indexingProgress = action.payload; }, }, }); diff --git a/gui/src/redux/slices/stateSlice.ts b/gui/src/redux/slices/stateSlice.ts index d98541af7..524ccaaa9 100644 --- a/gui/src/redux/slices/stateSlice.ts +++ b/gui/src/redux/slices/stateSlice.ts @@ -1,7 +1,8 @@ -import { createSlice } from "@reduxjs/toolkit"; +import { PayloadAction, createSlice } from "@reduxjs/toolkit"; import { JSONContent } from "@tiptap/react"; import { ChatHistory, + ChatHistoryItem, ChatMessage, ContextItemId, ContextItemWithId, @@ -9,7 +10,6 @@ import { } from "core"; import { BrowserSerializedContinueConfig } from "core/config/load"; import { v4 } from "uuid"; -import { RootStore } from "../store"; const TEST_CONTEXT_ITEMS: ContextItemWithId[] = [ { @@ -81,7 +81,17 @@ fn bubble_sort(values: &mut[T]) { }, ]; -const initialState: RootStore["state"] = { +type State = { + history: ChatHistory; + contextItems: ContextItemWithId[]; + active: boolean; + config: BrowserSerializedContinueConfig; + title: string; + sessionId: string; + defaultModelTitle: string; +}; + +const initialState: State = { history: [], contextItems: [], active: false, @@ -129,123 +139,95 @@ export const stateSlice = createSlice({ reducers: { setConfig: ( state, - { payload }: { payload: BrowserSerializedContinueConfig } + { payload: config }: PayloadAction ) => { - const config = payload; - const defaultModelTitle = config.models.find( - (model) => model.title === state.defaultModelTitle - ) - ? state.defaultModelTitle - : config.models[0].title; - return { - ...state, - config, - defaultModelTitle, - }; + const defaultModelTitle = + config.models.find((model) => model.title === state.defaultModelTitle) + ?.title || config.models[0].title; + state.config = config; + state.defaultModelTitle = defaultModelTitle; }, - addLogs: (state, { payload }: { payload: [string, string][] }) => { - if (state.history.length === 0) { + addLogs: (state, { payload }: PayloadAction<[string, string][]>) => { + if (!state.history.length) { return; } + const lastHistory = state.history[state.history.length - 1]; - if (state.history[state.history.length - 1].promptLogs) { - state.history[state.history.length - 1].promptLogs.push(...payload); - } else { - state.history[state.history.length - 1].promptLogs = payload; - } + lastHistory.promptLogs = lastHistory.promptLogs + ? lastHistory.promptLogs.concat(payload) + : payload; }, setActive: (state) => { - return { - ...state, - active: true, - }; + state.active = true; }, - setContextItemsAtIndex: (state, action) => { - if (action.payload.index < state.history.length) { - return { - ...state, - history: state.history.map((historyItem, i) => { - if (i === action.payload.index) { - return { - ...historyItem, - contextItems: action.payload.contextItems, - }; - } - return historyItem; - }), - }; + setContextItemsAtIndex: ( + state, + { + payload: { index, contextItems }, + }: PayloadAction<{ + index: number; + contextItems: ChatHistoryItem["contextItems"]; + }> + ) => { + if (state.history[index]) { + state.history[index].contextItems = contextItems; } }, setEditingContextItemAtIndex: ( state, { payload: { index, item }, - }: { - payload: { index?: number; item: ContextItemWithId }; - } + }: PayloadAction<{ index?: number; item: ContextItemWithId }> ) => { if (index === undefined) { - if (state.contextItems[0]?.id.itemId === item.id.itemId) { - return { - ...state, - contextItems: [], - }; - } else { - return { - ...state, - contextItems: [{ ...item, editing: true }], - }; - } - } else { - // TODO + const isFirstContextItem = + state.contextItems[0]?.id.itemId === item.id.itemId; + + state.contextItems = isFirstContextItem + ? [] + : [{ ...item, editing: true }]; + return; } + // TODO }, - addContextItems: (state, action) => { - return { - ...state, - contextItems: [...state.contextItems, ...action.payload], - }; + addContextItems: (state, action: PayloadAction) => { + state.contextItems = state.contextItems.concat(action.payload); }, resubmitAtIndex: ( state, { payload, - }: { - payload: { - index: number; - editorState: JSONContent; - }; - } + }: PayloadAction<{ + index: number; + editorState: JSONContent; + }> ) => { - if (payload.index < state.history.length) { - state.history[payload.index].message.content = ""; - state.history[payload.index].editorState = payload.editorState; - - // Cut off history after the resubmitted message - state.history = [ - ...state.history.slice(0, payload.index + 1), - { - message: { - role: "assistant", - content: "", - }, - contextItems: [], - }, - ]; - - state.contextItems = []; - state.active = true; + const historyItem = state.history[payload.index]; + if (!historyItem) { + return; } + historyItem.message.content = ""; + historyItem.editorState = payload.editorState; + + // Cut off history after the resubmitted message + state.history = state.history.slice(0, payload.index + 1).concat({ + message: { + role: "assistant", + content: "", + }, + contextItems: [], + }); + + state.contextItems = []; + state.active = true; }, initNewActiveMessage: ( state, { payload, - }: { - payload: { - editorState: JSONContent; - }; - } + }: PayloadAction<{ + editorState: JSONContent; + }> ) => { state.history.push({ message: { role: "user", content: "" }, @@ -266,13 +248,11 @@ export const stateSlice = createSlice({ state, { payload, - }: { - payload: { - message: ChatMessage; - index: number; - contextItems?: ContextItemWithId[]; - }; - } + }: PayloadAction<{ + message: ChatMessage; + index: number; + contextItems?: ContextItemWithId[]; + }> ) => { state.history[payload.index].message = payload.message; state.history[payload.index].contextItems = payload.contextItems || []; @@ -281,91 +261,66 @@ export const stateSlice = createSlice({ state, { payload, - }: { - payload: { - index: number; - contextItems: ContextItemWithId[]; - }; - } + }: PayloadAction<{ + index: number; + contextItems: ContextItemWithId[]; + }> ) => { - if (payload.index < state.history.length) { - state.history[payload.index].contextItems.push(...payload.contextItems); + const historyItem = state.history[payload.index]; + if (!historyItem) { + return; } + historyItem.contextItems.push(...payload.contextItems); }, setInactive: (state) => { - return { - ...state, - active: false, - }; + state.active = false; }, - streamUpdate: (state, action) => { - if (state.history.length > 0) { + streamUpdate: (state, action: PayloadAction) => { + if (state.history.length) { state.history[state.history.length - 1].message.content += action.payload; } }, newSession: ( state, - { payload }: { payload: PersistedSessionInfo | undefined } + { payload }: PayloadAction ) => { if (payload) { - return { - ...state, - history: payload.history, - title: payload.title, - sessionId: payload.sessionId, - }; + state.history = payload.history; + state.title = payload.title; + state.sessionId = payload.sessionId; + } else { + state.history = []; + state.contextItems = []; + state.active = false; + state.title = "New Session"; + state.sessionId = v4(); } - return { - ...state, - history: [], - contextItems: [], - active: false, - title: "New Session", - sessionId: v4(), - }; }, deleteContextWithIds: ( state, { payload, - }: { payload: { ids: ContextItemId[]; index: number | undefined } } + }: PayloadAction<{ ids: ContextItemId[]; index: number | undefined }> ) => { - const ids = payload.ids.map((id) => `${id.providerTitle}-${id.itemId}`); - if (typeof payload.index === "undefined") { - return { - ...state, - contextItems: state.contextItems.filter( - (item) => - !ids.includes(`${item.id.providerTitle}-${item.id.itemId}`) - ), - }; - } else { - return { - ...state, - history: state.history.map((historyItem, i) => { - if (i === payload.index) { - return { - ...historyItem, + const getKey = (id: ContextItemId) => `${id.providerTitle}-${id.itemId}`; + const ids = new Set(payload.ids.map(getKey)); - contextItems: historyItem.contextItems.filter( - (item) => - !ids.includes(`${item.id.providerTitle}-${item.id.itemId}`) - ), - }; - } - return historyItem; - }), - }; + if (payload.index === undefined) { + state.contextItems = state.contextItems.filter( + (item) => !ids.has(getKey(item.id)) + ); + } else { + state.history[payload.index].contextItems = state.history[ + payload.index + ].contextItems.filter((item) => !ids.has(getKey(item.id))); } }, addHighlightedCode: ( state, { payload, - }: { - payload: { rangeInFileWithContents: any; edit: boolean }; - } + }: PayloadAction<{ rangeInFileWithContents: any; edit: boolean }> ) => { let contextItems = [...state.contextItems].map((item) => { return { ...item, editing: false }; @@ -428,7 +383,7 @@ export const stateSlice = createSlice({ state, { payload, - }: { payload: { ids: ContextItemId[]; index: number | undefined } } + }: PayloadAction<{ ids: ContextItemId[]; index: number | undefined }> ) => { const ids = payload.ids.map((id) => id.itemId); @@ -462,7 +417,7 @@ export const stateSlice = createSlice({ }; } }, - setDefaultModel: (state, { payload }: { payload: string }) => { + setDefaultModel: (state, { payload }: PayloadAction) => { const model = state.config.models.find( (model) => model.title === payload ); diff --git a/gui/src/redux/slices/uiStateSlice.ts b/gui/src/redux/slices/uiStateSlice.ts index d34596c90..f75a83125 100644 --- a/gui/src/redux/slices/uiStateSlice.ts +++ b/gui/src/redux/slices/uiStateSlice.ts @@ -1,4 +1,12 @@ -import { createSlice } from "@reduxjs/toolkit"; +import { PayloadAction, createSlice } from "@reduxjs/toolkit"; +type UiState = { + bottomMessage: JSX.Element | undefined; + bottomMessageCloseTimeout: NodeJS.Timeout | undefined; + displayBottomMessageOnBottom: boolean; + showDialog: boolean; + dialogMessage: string | JSX.Element; + dialogEntryOn: boolean; +}; export const uiStateSlice = createSlice({ name: "uiState", @@ -9,27 +17,42 @@ export const uiStateSlice = createSlice({ dialogMessage: "", dialogEntryOn: false, displayBottomMessageOnBottom: true, - }, + } as UiState, reducers: { - setBottomMessage: (state, action) => { + setBottomMessage: ( + state, + action: PayloadAction + ) => { state.bottomMessage = action.payload; }, - setBottomMessageCloseTimeout: (state, action) => { + setBottomMessageCloseTimeout: ( + state, + action: PayloadAction + ) => { if (state.bottomMessageCloseTimeout) { clearTimeout(state.bottomMessageCloseTimeout); } state.bottomMessageCloseTimeout = action.payload; }, - setDialogMessage: (state, action) => { + setDialogMessage: ( + state, + action: PayloadAction + ) => { state.dialogMessage = action.payload; }, - setDialogEntryOn: (state, action) => { + setDialogEntryOn: ( + state, + action: PayloadAction + ) => { state.dialogEntryOn = action.payload; }, - setShowDialog: (state, action) => { + setShowDialog: (state, action: PayloadAction) => { state.showDialog = action.payload; }, - setDisplayBottomMessageOnBottom: (state, action) => { + setDisplayBottomMessageOnBottom: ( + state, + action: PayloadAction + ) => { state.displayBottomMessageOnBottom = action.payload; }, }, diff --git a/gui/src/redux/store.ts b/gui/src/redux/store.ts index 7be1a34e8..16ac22ad9 100644 --- a/gui/src/redux/store.ts +++ b/gui/src/redux/store.ts @@ -5,14 +5,6 @@ import serverStateReducer from "./slices/serverStateReducer"; import stateReducer from "./slices/stateSlice"; import uiStateReducer from "./slices/uiStateSlice"; -import { - ChatHistory, - ContextItemWithId, - ContextProviderDescription, - ContinueConfig, - SlashCommandDescription, -} from "core"; -import { BrowserSerializedContinueConfig } from "core/config/load"; import { createTransform, persistReducer, persistStore } from "redux-persist"; import { createFilter } from "redux-persist-transform-filter"; import autoMergeLevel2 from "redux-persist/lib/stateReconciler/autoMergeLevel2"; @@ -23,43 +15,6 @@ export interface ChatMessage { content: string; } -export interface RootStore { - state: { - history: ChatHistory; - contextItems: ContextItemWithId[]; - active: boolean; - config: BrowserSerializedContinueConfig; - title: string; - sessionId: string; - defaultModelTitle: string; - }; - - config: { - vscMachineId: string | undefined; - }; - misc: { - takenAction: boolean; - serverStatusMessage: string; - }; - uiState: { - bottomMessage: JSX.Element | undefined; - bottomMessageCloseTimeout: NodeJS.Timeout | undefined; - displayBottomMessageOnBottom: boolean; - showDialog: boolean; - dialogMessage: string | JSX.Element; - dialogEntryOn: boolean; - }; - serverState: { - meilisearchUrl: string | undefined; - slashCommands: SlashCommandDescription[]; - selectedContextItems: any[]; - config: ContinueConfig; - contextProviders: ContextProviderDescription[]; - savedContextGroups: any[]; // TODO: Context groups - indexingProgress: number; - }; -} - const rootReducer = combineReducers({ state: stateReducer, config: configReducer, @@ -68,6 +23,8 @@ const rootReducer = combineReducers({ serverState: serverStateReducer, }); +export type RootState = ReturnType; + const windowIDTransform = (windowID) => createTransform( // transform state on its way to being serialized and persisted. From 060431e0bbf5cc3eee6a973b0e2d6a1e9a6a38df Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Tue, 13 Feb 2024 20:58:29 -0800 Subject: [PATCH 006/141] =?UTF-8?q?=F0=9F=9A=A7=20dep=20injection=20(rough?= =?UTF-8?q?ly)=20in=20vscode=20extension?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/commands/slash/index.ts | 2 - core/config/handler.ts | 166 ++++ core/config/types.ts | 7 - core/config/util.ts | 38 + core/context/retrieval.ts | 7 +- core/index.d.ts | 30 +- core/indexing/indexCodebase.ts | 91 ++ core/ipc/IpcIde.ts | 28 +- core/ipc/cli.ts | 4 +- core/ipc/core.ts | 125 ++- core/ipc/messenger.ts | 44 +- core/package-lock.json | 87 +- core/package.json | 4 + core/test/edit.test.ts | 2 +- core/util/devdata.ts | 8 + core/{ide => util}/filesystem.ts | 45 +- core/util/messenger.ts | 5 + core/{commands/slash => util}/verticalEdit.ts | 55 +- core/{ide/messaging.ts => web/message.ts} | 1 - core/{ide/index.ts => web/webviewIde.ts} | 50 +- core/web/webviewProtocol.ts | 108 +++ core/yarn.lock | 41 +- extensions/vscode/package-lock.json | 5 + extensions/vscode/src/activation/activate.ts | 74 +- extensions/vscode/src/commands.ts | 185 ++-- extensions/vscode/src/debugPanel.ts | 887 ++++-------------- extensions/vscode/src/diff/horizontal.ts | 40 +- .../src/diff/verticalPerLine/handler.ts | 25 +- .../src/diff/verticalPerLine/manager.ts | 178 ++-- .../vscode/src/extension/autocomplete.ts | 0 extensions/vscode/src/extension/indexing.ts | 0 .../vscode/src/extension/vscodeExtension.ts | 183 ++++ extensions/vscode/src/ideProtocol.ts | 183 ++-- .../lang-server/autocompletePromptBuilder.ts | 31 + extensions/vscode/src/lang-server/codeLens.ts | 31 +- .../src/lang-server/completionProvider.ts | 357 ++++--- extensions/vscode/src/loadConfig.ts | 300 ------ extensions/vscode/src/suggestions.ts | 11 +- .../ideUtils.ts} | 145 +-- extensions/vscode/src/util/indexCodebase.ts | 100 -- .../vscode/src/util/loadAutocompleteModel.ts | 90 ++ extensions/vscode/src/webviewProtocol.ts | 490 ++++++++++ extensions/vscode/yarn.lock | 11 +- gui/package-lock.json | 5 + gui/src/hooks/useSetup.ts | 5 +- gui/src/util/ide.ts | 7 - 46 files changed, 2301 insertions(+), 1990 deletions(-) create mode 100644 core/config/handler.ts create mode 100644 core/config/util.ts create mode 100644 core/indexing/indexCodebase.ts create mode 100644 core/util/devdata.ts rename core/{ide => util}/filesystem.ts (76%) create mode 100644 core/util/messenger.ts rename core/{commands/slash => util}/verticalEdit.ts (76%) rename core/{ide/messaging.ts => web/message.ts} (99%) rename core/{ide/index.ts => web/webviewIde.ts} (71%) create mode 100644 core/web/webviewProtocol.ts create mode 100644 extensions/vscode/src/extension/autocomplete.ts create mode 100644 extensions/vscode/src/extension/indexing.ts create mode 100644 extensions/vscode/src/extension/vscodeExtension.ts create mode 100644 extensions/vscode/src/lang-server/autocompletePromptBuilder.ts delete mode 100644 extensions/vscode/src/loadConfig.ts rename extensions/vscode/src/{continueIdeClient.ts => util/ideUtils.ts} (74%) delete mode 100644 extensions/vscode/src/util/indexCodebase.ts create mode 100644 extensions/vscode/src/util/loadAutocompleteModel.ts create mode 100644 extensions/vscode/src/webviewProtocol.ts diff --git a/core/commands/slash/index.ts b/core/commands/slash/index.ts index ca0907674..0c95060f5 100644 --- a/core/commands/slash/index.ts +++ b/core/commands/slash/index.ts @@ -6,7 +6,6 @@ import EditSlashCommand from "./edit"; import HttpSlashCommand from "./http"; import ShareSlashCommand from "./share"; import StackOverflowSlashCommand from "./stackOverflow"; -import VerticalEditSlashCommand from "./verticalEdit"; export default [ DraftIssueCommand, @@ -17,5 +16,4 @@ export default [ CommentSlashCommand, HttpSlashCommand, CommitMessageCommand, - VerticalEditSlashCommand, ]; diff --git a/core/config/handler.ts b/core/config/handler.ts new file mode 100644 index 000000000..f83ff8638 --- /dev/null +++ b/core/config/handler.ts @@ -0,0 +1,166 @@ +import { http, https } from "follow-redirects"; +import * as fs from "fs"; +import { HttpProxyAgent } from "http-proxy-agent"; +import { HttpsProxyAgent } from "https-proxy-agent"; +import fetch from "node-fetch"; +import { ContinueConfig, ContinueRcJson, IDE, ILLM } from ".."; +import { Telemetry } from "../util/posthog"; +import { + BrowserSerializedContinueConfig, + finalToBrowserConfig, + loadFullConfigNode, +} from "./load"; +const tls = require("tls"); +export class ConfigHandler { + private savedConfig: ContinueConfig | undefined; + private savedBrowserConfig?: BrowserSerializedContinueConfig; + + private readonly ide: IDE; + constructor(ide: IDE) { + this.ide = ide; + this.loadConfig(); + } + + reloadConfig() { + this.savedConfig = undefined; + this.savedBrowserConfig = undefined; + this.loadConfig(); + } + + async getSerializedConfig(): Promise { + if (!this.savedBrowserConfig) { + this.savedConfig = await this.loadConfig(); + this.savedBrowserConfig = finalToBrowserConfig(this.savedConfig); + } + return this.savedBrowserConfig; + } + + async loadConfig(): Promise { + try { + if (this.savedConfig) { + return this.savedConfig; + } + + let workspaceConfigs: ContinueRcJson[] = []; + try { + workspaceConfigs = await this.ide.getWorkspaceConfigs(); + } catch (e) { + console.warn("Failed to load workspace configs"); + } + + this.savedConfig = await loadFullConfigNode( + this.ide.readFile, + workspaceConfigs + ); + this.savedConfig.allowAnonymousTelemetry = + this.savedConfig.allowAnonymousTelemetry && + (await this.ide.isTelemetryEnabled()); + + // Setup telemetry only after (and if) we know it is enabled + await Telemetry.setup( + this.savedConfig.allowAnonymousTelemetry ?? true, + await this.ide.getUniqueId() + ); + + return this.savedConfig; + } catch (e) { + throw new Error("Failed to load config"); + } + } + + setupLlm(llm: ILLM): ILLM { + const TIMEOUT = 7200; // 7200 seconds = 2 hours + // Since we know this is happening in Node.js, we can add requestOptions through a custom agent + const ca = [...tls.rootCertificates]; + const customCerts = + typeof llm.requestOptions?.caBundlePath === "string" + ? [llm.requestOptions?.caBundlePath] + : llm.requestOptions?.caBundlePath; + if (customCerts) { + ca.push( + ...customCerts.map((customCert) => fs.readFileSync(customCert, "utf8")) + ); + } + + let timeout = (llm.requestOptions?.timeout || TIMEOUT) * 1000; // measured in ms + + const agentOptions = { + ca, + rejectUnauthorized: llm.requestOptions?.verifySsl, + timeout, + sessionTimeout: timeout, + keepAlive: true, + keepAliveMsecs: timeout, + }; + + const proxy = llm.requestOptions?.proxy; + + llm._fetch = async (input, init) => { + // Create agent + const protocol = new URL(input).protocol === "https:" ? https : http; + const agent = proxy + ? new URL(input).protocol === "https:" + ? new HttpsProxyAgent(proxy, agentOptions) + : new HttpProxyAgent(proxy, agentOptions) + : new protocol.Agent(agentOptions); + + const headers: { [key: string]: string } = + llm!.requestOptions?.headers || {}; + for (const [key, value] of Object.entries(init?.headers || {})) { + headers[key] = value as string; + } + + const resp = await fetch(input, { + ...init, + headers, + agent, + }); + + if (!resp.ok) { + let text = await resp.text(); + if (resp.status === 404 && !resp.url.includes("/v1")) { + if (text.includes("try pulling it first")) { + const model = JSON.parse(text).error.split(" ")[1].slice(1, -1); + text = `The model "${model}" was not found. To download it, run \`ollama run ${model}\`.`; + } else if (text.includes("/api/chat")) { + text = + "The /api/chat endpoint was not found. This may mean that you are using an older version of Ollama that does not support /api/chat. Upgrading to the latest version will solve the issue."; + } else { + text = + "This may mean that you forgot to add '/v1' to the end of your 'apiBase' in config.json."; + } + } + throw new Error( + `HTTP ${resp.status} ${resp.statusText} from ${resp.url}\n\n${text}` + ); + } + + return resp; + }; + + llm.writeLog = async (log: string) => { + // const outputChannel = vscode.window.createOutputChannel( + // "Continue - LLM Prompt/Completion" + // ); + // outputChannel.appendLine( + // "==========================================================================" + // ); + // outputChannel.appendLine( + // "==========================================================================" + // ); + // outputChannel.append(log); + }; + return llm; + } + + async llmFromTitle(title?: string): Promise { + const config = await this.loadConfig(); + const model = + config.models.find((m) => m.title === title) || config.models[0]; + if (!model) { + throw new Error("No model found"); + } + + return this.setupLlm(model); + } +} diff --git a/core/config/types.ts b/core/config/types.ts index 82d71289e..df8a19603 100644 --- a/core/config/types.ts +++ b/core/config/types.ts @@ -288,7 +288,6 @@ declare global { } export interface IDE { - getSerializedConfig(): Promise; getConfigJsUrl(): Promise; getDiff(): Promise; getTerminalContents(): Promise; @@ -307,12 +306,6 @@ declare global { newContents: string, stepIndex: number ): Promise; - verticalDiffUpdate( - filepath: string, - startLine: number, - endLine: number, - diffLine: DiffLine - ): Promise; getOpenFiles(): Promise; getPinnedFiles(): Promise; getSearchResults(query: string): Promise; diff --git a/core/config/util.ts b/core/config/util.ts new file mode 100644 index 000000000..94ebda6b8 --- /dev/null +++ b/core/config/util.ts @@ -0,0 +1,38 @@ +import { readFileSync, writeFileSync } from "fs"; +import { ModelDescription } from ".."; +import { editConfigJson, getConfigJsonPath } from "../util/paths"; + +export function addModel(model: ModelDescription) { + const config = readFileSync(getConfigJsonPath(), "utf8"); + const configJson = JSON.parse(config); + configJson.models.push(model); + const newConfigString = JSON.stringify( + configJson, + (key, value) => { + return value === null ? undefined : value; + }, + 2 + ); + writeFileSync(getConfigJsonPath(), newConfigString); + return newConfigString; +} + +export function addOpenAIKey(key: string) { + editConfigJson((config) => { + config.models = config.models.map((m: ModelDescription) => { + if (m.provider === "free-trial") { + m.apiKey = key; + m.provider = "openai"; + } + return m; + }); + return config; + }); +} + +export function deleteModel(title: string) { + editConfigJson((config) => { + config.models = config.models.filter((m: any) => m.title !== title); + return config; + }); +} diff --git a/core/context/retrieval.ts b/core/context/retrieval.ts index 6d9a26925..57c95405d 100644 --- a/core/context/retrieval.ts +++ b/core/context/retrieval.ts @@ -1,5 +1,6 @@ import { Chunk, ContextItem, ContextProviderExtras, ILLM } from ".."; import { FullTextSearchCodebaseIndex } from "../indexing/FullTextSearch"; +import { LanceDbIndex } from "../indexing/LanceDbIndex"; import { ChunkCodebaseIndex } from "../indexing/chunk/ChunkCodebaseIndex"; import { IndexTag } from "../indexing/types"; import { llmCanGenerateInParallel } from "../llm/autodetect"; @@ -147,7 +148,11 @@ export async function retrieveContextItemsFromEmbeddings( console.warn("Error retrieving from FTS:", e); } - let vecResults = await extras.ide.retrieveChunks( + const lanceDbIndex = new LanceDbIndex(extras.embeddingsProvider, (path) => + extras.ide.readFile(path) + ); + let vecResults = await lanceDbIndex.retrieve( + tags, extras.fullInput, nRetrieve, filterDirectory diff --git a/core/index.d.ts b/core/index.d.ts index bbef8b0b6..66fdd06a8 100644 --- a/core/index.d.ts +++ b/core/index.d.ts @@ -1,5 +1,3 @@ -import { BrowserSerializedContinueConfig } from "./config/load"; - export interface ChunkWithoutID { content: string; startLine: number; @@ -293,12 +291,14 @@ export class Problem { } export interface IDE { - getSerializedConfig(): Promise; getDiff(): Promise; + isTelemetryEnabled(): Promise; + getUniqueId(): Promise; getTerminalContents(): Promise; listWorkspaceContents(directory?: string): Promise; listFolders(): Promise; getWorkspaceDirs(): Promise; + getWorkspaceConfigs(): Promise; writeFile(path: string, contents: string): Promise; showVirtualFile(title: string, contents: string): Promise; getContinueDir(): Promise; @@ -306,6 +306,7 @@ export interface IDE { runCommand(command: string): Promise; saveFile(filepath: string): Promise; readFile(filepath: string): Promise; + readRangeInFile(filepath: string, range: Range): Promise; showLines( filepath: string, startLine: number, @@ -316,34 +317,13 @@ export interface IDE { newContents: string, stepIndex: number ): Promise; - verticalDiffUpdate( - filepath: string, - startLine: number, - endLine: number, - diffLine: DiffLine - ): Promise; getOpenFiles(): Promise; getPinnedFiles(): Promise; getSearchResults(query: string): Promise; subprocess(command: string): Promise<[string, string]>; getProblems(filepath?: string | undefined): Promise; getBranch(dir: string): Promise; - - // Embeddings - /** - * Returns list of [tag, filepath, hash of contents] that need to be embedded - */ - getFilesToEmbed(providerId: string): Promise<[string, string, string][]>; - sendEmbeddingForChunk( - chunk: Chunk, - embedding: number[], - tags: string[] - ): void; - retrieveChunks( - text: string, - n: number, - directory: string | undefined - ): Promise; + getStats(directory: string): Promise<{ [path: string]: number }>; } // Slash Commands diff --git a/core/indexing/indexCodebase.ts b/core/indexing/indexCodebase.ts new file mode 100644 index 000000000..f4797b0b8 --- /dev/null +++ b/core/indexing/indexCodebase.ts @@ -0,0 +1,91 @@ +import { IDE, IndexingProgressUpdate } from ".."; +import { ConfigHandler } from "../config/handler"; +import { FullTextSearchCodebaseIndex } from "./FullTextSearch"; +import { LanceDbIndex } from "./LanceDbIndex"; +import { ChunkCodebaseIndex } from "./chunk/ChunkCodebaseIndex"; +import { getComputeDeleteAddRemove } from "./refreshIndex"; +import { CodebaseIndex, IndexTag } from "./types"; + +export class CodebaseIndexer { + configHandler: ConfigHandler; + ide: IDE; + constructor(configHandler: ConfigHandler, ide: IDE) { + this.configHandler = configHandler; + this.ide = ide; + } + + private async getIndexesToBuild(): Promise { + const config = await this.configHandler.loadConfig(); + + const indexes = [ + new ChunkCodebaseIndex(this.ide.readFile.bind(this.ide)), // Chunking must come first + new LanceDbIndex(config.embeddingsProvider, this.ide.readFile), + new FullTextSearchCodebaseIndex(), + ]; + + return indexes; + } + + async *refresh( + workspaceDirs: string[] + ): AsyncGenerator { + const config = await this.configHandler.loadConfig(); + if (config.disableIndexing) { + return; + } + + const indexesToBuild = await this.getIndexesToBuild(); + + let completedDirs = 0; + + for (let directory of workspaceDirs) { + const stats = await this.ide.getStats(directory); + const branch = await this.ide.getBranch(directory); + let completedIndexes = 0; + + try { + for (let codebaseIndex of indexesToBuild) { + const tag: IndexTag = { + directory, + branch, + artifactId: codebaseIndex.artifactId, + }; + const [results, markComplete] = await getComputeDeleteAddRemove( + tag, + { ...stats }, + (filepath) => this.ide.readFile(filepath) + ); + + for await (let { progress, desc } of codebaseIndex.update( + tag, + results, + markComplete + )) { + yield { + progress: + (completedDirs + + (completedIndexes + progress) / indexesToBuild.length) / + workspaceDirs.length, + desc, + }; + } + completedIndexes++; + yield { + progress: + (completedDirs + completedIndexes / indexesToBuild.length) / + workspaceDirs.length, + desc: "Completed indexing " + codebaseIndex.artifactId, + }; + } + } catch (e) { + console.warn("Error refreshing index: ", e); + } + + completedDirs++; + yield { + progress: completedDirs / workspaceDirs.length, + desc: "Indexing Complete", + }; + } + } +} diff --git a/core/ipc/IpcIde.ts b/core/ipc/IpcIde.ts index 97fa9ada2..38f0e08b8 100644 --- a/core/ipc/IpcIde.ts +++ b/core/ipc/IpcIde.ts @@ -1,5 +1,4 @@ -import { Chunk, DiffLine, IDE, Problem } from ".."; -import { BrowserSerializedContinueConfig } from "../config/load"; +import { Chunk, ContinueRcJson, IDE, Problem, Range } from ".."; import { IpcMessenger } from "./messenger"; export class IpcIde implements IDE { @@ -8,8 +7,23 @@ export class IpcIde implements IDE { constructor(messenger: IpcMessenger) { this.messenger = messenger; } + readRangeInFile(filepath: string, range: Range): Promise { + throw new Error("Method not implemented."); + } - getSerializedConfig(): Promise { + getStats(directory: string): Promise<{ [path: string]: number }> { + throw new Error("Method not implemented."); + } + + isTelemetryEnabled(): Promise { + throw new Error("Method not implemented."); + } + + getUniqueId(): Promise { + throw new Error("Method not implemented."); + } + + getWorkspaceConfigs(): Promise { throw new Error("Method not implemented."); } getDiff(): Promise { @@ -62,14 +76,6 @@ export class IpcIde implements IDE { ): Promise { throw new Error("Method not implemented."); } - verticalDiffUpdate( - filepath: string, - startLine: number, - endLine: number, - diffLine: DiffLine - ): Promise { - throw new Error("Method not implemented."); - } getOpenFiles(): Promise { throw new Error("Method not implemented."); } diff --git a/core/ipc/cli.ts b/core/ipc/cli.ts index 7b36a919b..8122fe2ff 100644 --- a/core/ipc/cli.ts +++ b/core/ipc/cli.ts @@ -1,4 +1,5 @@ import { Command } from "commander"; +import { IpcIde } from "./IpcIde"; import { Core } from "./core"; import { IpcMessenger } from "./messenger"; @@ -6,7 +7,8 @@ const program = new Command(); program.action(() => { const messenger = new IpcMessenger(); - const core = new Core(messenger); + const ide = new IpcIde(messenger); + const core = new Core(messenger, ide); }); program.parse(process.argv); diff --git a/core/ipc/core.ts b/core/ipc/core.ts index 1c750ebd5..63a666dbc 100644 --- a/core/ipc/core.ts +++ b/core/ipc/core.ts @@ -1,19 +1,126 @@ +import { v4 as uuidv4 } from "uuid"; +import { ContextItemId, IDE } from ".."; +import { ConfigHandler } from "../config/handler"; +import { addModel, addOpenAIKey, deleteModel } from "../config/util"; +import { indexDocs } from "../indexing/docs"; +import TransformersJsEmbeddingsProvider from "../indexing/embeddings/TransformersJsEmbeddingsProvider"; +import { CodebaseIndexer } from "../indexing/indexCodebase"; +import { logDevData } from "../util/devdata"; import historyManager from "../util/history"; -import { IpcIde } from "./IpcIde"; -import { IpcMessenger } from "./messenger"; +import { Messenger, Protocol } from "./messenger"; export class Core { - private messenger: IpcMessenger; - private ide: IpcIde; - constructor(messenger: IpcMessenger) { - this.messenger = messenger; - this.ide = new IpcIde(messenger); + private messenger: Messenger; + private readonly ide: IDE; + private readonly configHandler: ConfigHandler; + private readonly codebaseIndexer: CodebaseIndexer; - this.messenger.on("history/list", (msg) => { + private selectedModelTitle: string | undefined; + + private async config() { + return this.configHandler.loadConfig(); + } + + private async getSelectedModel() { + return await this.configHandler.llmFromTitle(this.selectedModelTitle); + } + + constructor(messenger: Messenger, ide: IDE) { + this.messenger = messenger; + this.ide = ide; + this.configHandler = new ConfigHandler(this.ide); + this.codebaseIndexer = new CodebaseIndexer(this.configHandler, this.ide); + + const on = this.messenger.on; + + // New + on("update/modelChange", (msg) => { + this.selectedModelTitle = msg.data; + }); + + // History + on("history/list", (msg) => { return historyManager.list(); }); - this.messenger.on("history/delete", (msg) => { + on("history/delete", (msg) => { historyManager.delete(msg.data.id); }); + on("history/load", (msg) => { + return historyManager.load(msg.data.id); + }); + on("history/save", (msg) => { + historyManager.save(msg.data); + }); + + // Dev data + on("devdata/log", (msg) => { + logDevData(msg.data.tableName, msg.data.data); + }); + + // Edit config + on("config/addModel", (msg) => { + addModel(msg.data.model); + }); + on("config/addOpenAiKey", (msg) => { + addOpenAIKey(msg.data); + }); + on("config/deleteModel", (msg) => { + deleteModel(msg.data.title); + }); + on("config/reload", (msg) => {}); + + // Context providers + on("context/addDocs", async (msg) => { + for await (const _ of indexDocs( + msg.data.title, + new URL(msg.data.url), + new TransformersJsEmbeddingsProvider() + )) { + } + }); + on("context/loadSubmenuItems", async (msg) => { + const config = await this.config(); + const items = config.contextProviders + ?.find((provider) => provider.description.title === msg.data.title) + ?.loadSubmenuItems({ ide: this.ide }); + return items || []; + }); + on("context/getContextItems", async (msg) => { + const config = await this.config(); + const llm = await this.getSelectedModel(); + const provider = config.contextProviders?.find( + (provider) => provider.description.title === msg.data.name + ); + if (!provider) return []; + + const id: ContextItemId = { + providerTitle: provider.description.title, + itemId: uuidv4(), + }; + const items = await provider.getContextItems(msg.data.query, { + llm, + embeddingsProvider: config.embeddingsProvider, + fullInput: msg.data.fullInput, + ide, + selectedCode: msg.data.selectedCode, + }); + return items; + }); + } + + public invoke( + method: keyof Protocol, + data: Protocol[T][0] + ): Protocol[T][1] { + const response = this.messenger.invoke(method, data); + return response; } } + +/** + * configHandler should be in core? Probably everything should be in core? + * - get rc files (define in IpcIde) + * - override anonymous telemetry (telemetryAllowed) + * - send config to browser whenever it loads (triggers come from IDE so that should happen there) + * - access to a "readFile" function (ide.readFile) + */ diff --git a/core/ipc/messenger.ts b/core/ipc/messenger.ts index cf884f3d9..54819140a 100644 --- a/core/ipc/messenger.ts +++ b/core/ipc/messenger.ts @@ -8,20 +8,27 @@ import { RangeInFile, SerializedContinueConfig, } from ".."; +import { Message } from "../util/messenger"; export abstract class Messenger { abstract send(messageType: string, message: any, messageId?: string): string; - abstract on(messageType: string, handler: (message: any) => any): void; + abstract on( + messageType: T, + handler: (message: Message) => Protocol[T][1] + ): void; + abstract invoke( + messageType: T, + data: Protocol[T][0] + ): Protocol[T][1]; } -export interface Message { - messageType: string; - messageId: string; - data: T; -} - -type Protocol = { +export type Protocol = { + // New + "update/modelChange": [string, void]; + // Special abort: [undefined, void]; + + // History "history/list": [undefined, PersistedSessionInfo[]]; "history/delete": [{ id: string }, void]; "history/load": [{ id: string }, PersistedSessionInfo]; @@ -33,6 +40,7 @@ type Protocol = { void, ]; "config/deleteModel": [{ title: string }, void]; + "config/reload": [undefined, void]; "context/getContextItems": [ { name: string; @@ -40,9 +48,12 @@ type Protocol = { fullInput: string; selectedCode: RangeInFile[]; }, - ContextItem[], + Promise, + ]; + "context/loadSubmenuItems": [ + { title: string }, + Promise, ]; - "context/loadSubmenuItems": [{ title: string }, ContextSubmenuItem[]]; "context/addDocs": [{ title: string; url: string }, void]; "autocomplete/complete": [ { filepath: string; line: number; column: number }, @@ -92,7 +103,7 @@ type ProtocolCallbacks = { }; export class IpcMessenger extends Messenger { - listeners = new Map any)[]>(); + listeners = new Map any)[]>(); constructor() { super(); @@ -143,4 +154,15 @@ export class IpcMessenger extends Messenger { } this.listeners.get(messageType)?.push(handler); } + + invoke( + messageType: T, + data: Protocol[T][0] + ): Protocol[T][1] { + return this.listeners.get(messageType)?.[0]?.({ + messageId: uuidv4(), + messageType, + data, + }); + } } diff --git a/core/package-lock.json b/core/package-lock.json index 53d99ffea..88ae15d27 100644 --- a/core/package-lock.json +++ b/core/package-lock.json @@ -16,7 +16,10 @@ "commander": "^12.0.0", "dotenv": "^16.3.1", "fastest-levenshtein": "^1.0.16", + "follow-redirects": "^1.15.5", "handlebars": "^4.7.8", + "http-proxy-agent": "^7.0.1", + "https-proxy-agent": "^7.0.3", "js-tiktoken": "^1.0.8", "llm-code-highlighter": "^0.0.5", "node-fetch": "^3.3.2", @@ -34,6 +37,7 @@ "web-tree-sitter": "^0.20.8" }, "devDependencies": { + "@types/follow-redirects": "^1.14.4", "@types/handlebars": "^4.1.0", "@types/jest": "^29.5.11", "@types/jquery": "^3.5.29", @@ -1867,6 +1871,15 @@ "resolved": "https://registry.npmjs.org/@types/command-line-usage/-/command-line-usage-5.0.2.tgz", "integrity": "sha512-n7RlEEJ+4x4TS7ZQddTmNSxP+zziEG0TNsMfiRIxcIVXt71ENJ9ojeXmGO3wPoTdn7pJcU2xc3CJYMktNT6DPg==" }, + "node_modules/@types/follow-redirects": { + "version": "1.14.4", + "resolved": "https://registry.npmjs.org/@types/follow-redirects/-/follow-redirects-1.14.4.tgz", + "integrity": "sha512-GWXfsD0Jc1RWiFmMuMFCpXMzi9L7oPDVwxUnZdg89kDNnqsRfUKXEtUYtA98A6lig1WXH/CYY/fvPW9HuN5fTA==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, "node_modules/@types/graceful-fs": { "version": "4.1.9", "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.9.tgz", @@ -3787,30 +3800,49 @@ "optional": true }, "node_modules/http-proxy-agent": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz", - "integrity": "sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg==", - "optional": true, + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.1.tgz", + "integrity": "sha512-My1KCEPs6A0hb4qCVzYp8iEvA8j8YqcvXLZZH8C9OFuTYpYjHE7N2dtG3mRl1HMD4+VGXpF3XcDVcxGBT7yDZQ==", "dependencies": { - "@tootallnate/once": "1", - "agent-base": "6", - "debug": "4" + "agent-base": "^7.1.0", + "debug": "^4.3.4" }, "engines": { - "node": ">= 6" + "node": ">= 14" + } + }, + "node_modules/http-proxy-agent/node_modules/agent-base": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.0.tgz", + "integrity": "sha512-o/zjMZRhJxny7OyEF+Op8X+efiELC7k7yOjMzgfzVqOzXqkBkWI79YoTdOtsuWd5BWhAGAuOY/Xa6xpiaWXiNg==", + "dependencies": { + "debug": "^4.3.4" + }, + "engines": { + "node": ">= 14" } }, "node_modules/https-proxy-agent": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", - "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", - "optional": true, + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.3.tgz", + "integrity": "sha512-kCnwztfX0KZJSLOBrcL0emLeFako55NWMovvyPP2AjsghNk9RB1yjSI+jVumPHYZsNXegNoqupSW9IY3afSH8w==", "dependencies": { - "agent-base": "6", + "agent-base": "^7.0.2", "debug": "4" }, "engines": { - "node": ">= 6" + "node": ">= 14" + } + }, + "node_modules/https-proxy-agent/node_modules/agent-base": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.0.tgz", + "integrity": "sha512-o/zjMZRhJxny7OyEF+Op8X+efiELC7k7yOjMzgfzVqOzXqkBkWI79YoTdOtsuWd5BWhAGAuOY/Xa6xpiaWXiNg==", + "dependencies": { + "debug": "^4.3.4" + }, + "engines": { + "node": ">= 14" } }, "node_modules/human-signals": { @@ -4920,6 +4952,33 @@ "node": ">= 10" } }, + "node_modules/make-fetch-happen/node_modules/http-proxy-agent": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz", + "integrity": "sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg==", + "optional": true, + "dependencies": { + "@tootallnate/once": "1", + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/make-fetch-happen/node_modules/https-proxy-agent": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", + "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", + "optional": true, + "dependencies": { + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/make-fetch-happen/node_modules/lru-cache": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", diff --git a/core/package.json b/core/package.json index 5c5a921ab..e0098d33d 100644 --- a/core/package.json +++ b/core/package.json @@ -8,6 +8,7 @@ "author": "Nate Sesti and Ty Dunn", "license": "Apache-2.0", "devDependencies": { + "@types/follow-redirects": "^1.14.4", "@types/handlebars": "^4.1.0", "@types/jest": "^29.5.11", "@types/jquery": "^3.5.29", @@ -25,7 +26,10 @@ "commander": "^12.0.0", "dotenv": "^16.3.1", "fastest-levenshtein": "^1.0.16", + "follow-redirects": "^1.15.5", "handlebars": "^4.7.8", + "http-proxy-agent": "^7.0.1", + "https-proxy-agent": "^7.0.3", "js-tiktoken": "^1.0.8", "llm-code-highlighter": "^0.0.5", "node-fetch": "^3.3.2", diff --git a/core/test/edit.test.ts b/core/test/edit.test.ts index 4682601d1..48543ce4b 100644 --- a/core/test/edit.test.ts +++ b/core/test/edit.test.ts @@ -2,10 +2,10 @@ import * as dotenv from "dotenv"; import { ContinueSDK } from ".."; import EditSlashCommand, { getPromptParts } from "../commands/slash/edit"; import { contextItemToRangeInFileWithContents } from "../commands/util"; -import FileSystemIde from "../ide/filesystem"; import FreeTrial from "../llm/llms/FreeTrial"; import Ollama from "../llm/llms/Ollama"; import { dedentAndGetCommonWhitespace } from "../util"; +import FileSystemIde from "../util/filesystem"; jest.setTimeout(100_000); diff --git a/core/util/devdata.ts b/core/util/devdata.ts new file mode 100644 index 000000000..bb98b2527 --- /dev/null +++ b/core/util/devdata.ts @@ -0,0 +1,8 @@ +import { writeFileSync } from "fs"; +import { getDevDataFilePath } from "./paths"; + +export function logDevData(tableName: string, data: any) { + const filepath: string = getDevDataFilePath(tableName); + const jsonLine = JSON.stringify(data); + writeFileSync(filepath, `${jsonLine}\n`, { flag: "a" }); +} diff --git a/core/ide/filesystem.ts b/core/util/filesystem.ts similarity index 76% rename from core/ide/filesystem.ts rename to core/util/filesystem.ts index 910dd022a..9ce3de29c 100644 --- a/core/ide/filesystem.ts +++ b/core/util/filesystem.ts @@ -1,12 +1,22 @@ import * as fs from "fs"; -import { DiffLine, IDE, Problem } from ".."; -import { BrowserSerializedContinueConfig } from "../config/load"; -import { Chunk } from "../index"; -import { getContinueGlobalPath } from "../util/paths"; +import { ContinueRcJson, IDE, Problem, Range } from ".."; +import { getContinueGlobalPath } from "./paths"; class FileSystemIde implements IDE { - async getSerializedConfig(): Promise { - throw new Error("Not implemented"); + readRangeInFile(filepath: string, range: Range): Promise { + return Promise.resolve(""); + } + getStats(directory: string): Promise<{ [path: string]: number }> { + return Promise.resolve({}); + } + isTelemetryEnabled(): Promise { + return Promise.resolve(false); + } + getUniqueId(): Promise { + return Promise.resolve("NOT_UNIQUE"); + } + getWorkspaceConfigs(): Promise { + return Promise.resolve([]); } getDiff(): Promise { @@ -92,15 +102,6 @@ class FileSystemIde implements IDE { return Promise.resolve(""); } - async verticalDiffUpdate( - filepath: string, - startLine: number, - endLine: number, - diffLine: DiffLine - ) { - return Promise.resolve(); - } - getOpenFiles(): Promise { return Promise.resolve([]); } @@ -120,20 +121,6 @@ class FileSystemIde implements IDE { async subprocess(command: string): Promise<[string, string]> { return ["", ""]; } - - getFilesToEmbed(providerId: string): Promise<[string, string, string][]> { - return Promise.resolve([]); - } - - sendEmbeddingForChunk(chunk: Chunk, embedding: number[], tags: string[]) {} - - retrieveChunks( - text: string, - n: number, - directory: string | undefined - ): Promise { - return Promise.resolve([]); - } } export default FileSystemIde; diff --git a/core/util/messenger.ts b/core/util/messenger.ts new file mode 100644 index 000000000..9f12b9630 --- /dev/null +++ b/core/util/messenger.ts @@ -0,0 +1,5 @@ +export interface Message { + messageType: string; + messageId: string; + data: T; +} diff --git a/core/commands/slash/verticalEdit.ts b/core/util/verticalEdit.ts similarity index 76% rename from core/commands/slash/verticalEdit.ts rename to core/util/verticalEdit.ts index 7cd0ba4d9..d3d69ef66 100644 --- a/core/commands/slash/verticalEdit.ts +++ b/core/util/verticalEdit.ts @@ -1,17 +1,9 @@ -import { ContextItemWithId, DiffLine, ILLM, SlashCommand } from "../.."; -import { streamDiff } from "../../diff/streamDiff"; -import { LineStream, streamLines } from "../../diff/util"; -import { stripImages } from "../../llm/countTokens"; -import { gptEditPrompt } from "../../llm/templates/edit"; -import { - dedentAndGetCommonWhitespace, - getMarkdownLanguageTagForFile, - renderPromptTemplate, -} from "../../util"; -import { - RangeInFileWithContents, - contextItemToRangeInFileWithContents, -} from "../util"; +import { dedentAndGetCommonWhitespace, renderPromptTemplate } from "."; +import { DiffLine, ILLM } from ".."; +import { streamDiff } from "../diff/streamDiff"; +import { LineStream, streamLines } from "../diff/util"; +import { stripImages } from "../llm/countTokens"; +import { gptEditPrompt } from "../llm/templates/edit"; function shouldRemoveLineBeforeStart(line: string): boolean { return ( @@ -215,38 +207,3 @@ export async function* streamDiffLines( yield diffLine; } } - -const VerticalEditSlashCommand: SlashCommand = { - name: "verticalEdit", - description: "Edit selected code with vertical diff", - run: async function* ({ ide, llm, input, contextItems }) { - const contextItemToEdit = contextItems.find( - (item: ContextItemWithId) => - item.editing && item.id.providerTitle === "code" - ); - - if (!contextItemToEdit) { - yield "Highlight the code that you want to edit first"; - return; - } - - const rif: RangeInFileWithContents = - contextItemToRangeInFileWithContents(contextItemToEdit); - const startLine = rif.range.start.line; - const endLine = rif.range.end.line; - const filepath = rif.filepath; - - const diffLineGenerator = streamDiffLines( - rif.contents, - llm, - input, - getMarkdownLanguageTagForFile(rif.filepath) - ); - - for await (const diffLine of diffLineGenerator) { - await ide.verticalDiffUpdate(filepath, startLine, endLine, diffLine); - } - }, -}; - -export default VerticalEditSlashCommand; diff --git a/core/ide/messaging.ts b/core/web/message.ts similarity index 99% rename from core/ide/messaging.ts rename to core/web/message.ts index f8876a363..f0e9416cd 100644 --- a/core/ide/messaging.ts +++ b/core/web/message.ts @@ -1,4 +1,3 @@ -// import "vscode-webview"; import { v4 as uuidv4 } from "uuid"; import { ChatMessage, LLMFullCompletionOptions, LLMReturnValue } from ".."; interface vscode { diff --git a/core/ide/index.ts b/core/web/webviewIde.ts similarity index 71% rename from core/ide/index.ts rename to core/web/webviewIde.ts index 255c26a8e..b7b5584da 100644 --- a/core/ide/index.ts +++ b/core/web/webviewIde.ts @@ -1,14 +1,27 @@ -import { Chunk, DiffLine, Problem } from ".."; -import { BrowserSerializedContinueConfig } from "../config/load"; +import { ContinueRcJson, Problem, Range } from ".."; import { IDE } from "../index"; -import { ideRequest } from "./messaging"; +import { ideRequest } from "./message"; async function r(messageType: string, options: any = {}) { return await ideRequest(messageType, options); } -export class ExtensionIde implements IDE { - async getSerializedConfig(): Promise { - return await r("getSerializedConfig"); +export class WebviewIde implements IDE { + readRangeInFile(filepath: string, range: Range): Promise { + return r("readRangeInFile", { filepath, range }); + } + getStats(directory: string): Promise<{ [path: string]: number }> { + return r("getStats", { directory }); + } + isTelemetryEnabled(): Promise { + return r("isTelemetryEnabled"); + } + + getUniqueId(): Promise { + return r("getUniqueId"); + } + + getWorkspaceConfigs(): Promise { + return r("getWorkspaceConfigs"); } async getDiff() { @@ -80,15 +93,6 @@ export class ExtensionIde implements IDE { await r("showDiff", { filepath, newContents, stepIndex }); } - async verticalDiffUpdate( - filepath: string, - startLine: number, - endLine: number, - diffLine: DiffLine - ) { - await r("diffLine", { filepath, startLine, endLine, diffLine }); - } - getOpenFiles(): Promise { return r("getOpenFiles"); } @@ -109,23 +113,7 @@ export class ExtensionIde implements IDE { return r("subprocess", { command }); } - getFilesToEmbed(providerId: string): Promise<[string, string, string][]> { - return r("getFilesToEmbed", { providerId }); - } - - sendEmbeddingForChunk(chunk: Chunk, embedding: number[], tags: string[]) { - return r("sendChunkForFile", { chunk, embedding, tags }); - } - async getBranch(dir: string): Promise { return r("getBranch", { dir }); } - - retrieveChunks( - text: string, - n: number, - directory: string | undefined - ): Promise { - return r("retrieveChunks", { text, n, directory }); - } } diff --git a/core/web/webviewProtocol.ts b/core/web/webviewProtocol.ts new file mode 100644 index 000000000..c0bf50deb --- /dev/null +++ b/core/web/webviewProtocol.ts @@ -0,0 +1,108 @@ +import { + ChatMessage, + CompletionOptions, + ContextItem, + ContextItemWithId, + ContextSubmenuItem, + DiffLine, + MessageContent, + ModelDescription, + PersistedSessionInfo, + Problem, + RangeInFile, +} from ".."; +import { BrowserSerializedContinueConfig } from "../config/load"; + +export type WebviewProtocol = { + abort: [undefined, void]; + listWorkspaceContents: [undefined, Promise]; + getWorkspaceDirs: [undefined, Promise]; + listFolders: [undefined, Promise]; + writeFile: [{ path: string; contents: string }, void]; + showVirtualFile: [{ name: string; content: string }, void]; + getContinueDir: [undefined, Promise]; + openFile: [{ path: string }, void]; + runCommand: [{ command: string }, void]; + getSearchResults: [{ query: string }, Promise]; + subprocess: [{ command: string }, Promise<[string, string]>]; + history: [undefined, PersistedSessionInfo[]]; + saveSession: [PersistedSessionInfo, void]; + deleteSession: [string, void]; + loadSession: [string, PersistedSessionInfo]; + saveFile: [{ filepath: string }, void]; + readFile: [{ filepath: string }, Promise]; + showDiff: [ + { filepath: string; newContents: string; stepIndex: number }, + void, + ]; + diffLine: [ + { + diffLine: DiffLine; + filepath: string; + startLine: number; + endLine: number; + }, + void, + ]; + getProblems: [{ filepath: string }, Promise]; + getBranch: [{ dir: string }, Promise]; + getOpenFiles: [undefined, Promise]; + getPinnedFiles: [undefined, Promise]; + showLines: [{ filepath: string; startLine: number; endLine: number }, void]; + errorPopup: [{ message: string }, void]; + logDevData: [{ tableName: string; data: any }, void]; + addModel: [ModelDescription, void]; + deleteModel: [{ title: string }, void]; + addOpenAIKey: [{ key: string }, void]; + llmStreamComplete: [ + { title: string; prompt: string; completionOptions: CompletionOptions }, + AsyncGenerator<{ content: string; done?: boolean }>, + ]; + llmStreamChat: [ + { + title: string; + messages: ChatMessage[]; + completionOptions: CompletionOptions; + }, + AsyncGenerator<{ content: MessageContent; done?: boolean }>, + ]; + llmComplete: [ + { title: string; prompt: string; completionOptions: CompletionOptions }, + Promise<{ content: string }>, + ]; + runNodeJsSlashCommand: [ + { + input: string; + history: ChatMessage[]; + modelTitle: string; + slashCommandName: string; + contextItems: ContextItemWithId[]; + params: { [key: string]: any } | undefined; + historyIndex: number; + }, + AsyncGenerator<{ content: string; done?: boolean }>, + ]; + loadSubmenuItems: [{ title: string }, Promise]; + getContextItems: [ + { + name: string; + query: string; + fullInput: string; + selectedCode: RangeInFile[]; + }, + Promise, + ]; + addDocs: [{ url: string; title: string }, void]; + applyToCurrentFile: [{ text: string }, void]; + showTutorial: [undefined, void]; + showFile: [{ filepath: string }, void]; + openConfigJson: [undefined, void]; + readRangeInFile: [{ filepath: string }, void]; + toggleDevTools: [undefined, void]; + reloadWindow: [undefined, void]; + focusEditor: [undefined, void]; + toggleFullScreen: [undefined, void]; + getDiff: [undefined, Promise]; + getSerializedConfig: [undefined, Promise]; + getTerminalContents: [undefined, Promise]; +}; diff --git a/core/yarn.lock b/core/yarn.lock index 37739acab..25c0f5df8 100644 --- a/core/yarn.lock +++ b/core/yarn.lock @@ -822,6 +822,13 @@ resolved "https://registry.npmjs.org/@types/command-line-usage/-/command-line-usage-5.0.2.tgz" integrity sha512-n7RlEEJ+4x4TS7ZQddTmNSxP+zziEG0TNsMfiRIxcIVXt71ENJ9ojeXmGO3wPoTdn7pJcU2xc3CJYMktNT6DPg== +"@types/follow-redirects@^1.14.4": + version "1.14.4" + resolved "https://registry.npmjs.org/@types/follow-redirects/-/follow-redirects-1.14.4.tgz" + integrity sha512-GWXfsD0Jc1RWiFmMuMFCpXMzi9L7oPDVwxUnZdg89kDNnqsRfUKXEtUYtA98A6lig1WXH/CYY/fvPW9HuN5fTA== + dependencies: + "@types/node" "*" + "@types/graceful-fs@^4.1.3": version "4.1.9" resolved "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.9.tgz" @@ -974,6 +981,20 @@ agent-base@^6.0.2, agent-base@6: dependencies: debug "4" +agent-base@^7.0.2: + version "7.1.0" + resolved "https://registry.npmjs.org/agent-base/-/agent-base-7.1.0.tgz" + integrity sha512-o/zjMZRhJxny7OyEF+Op8X+efiELC7k7yOjMzgfzVqOzXqkBkWI79YoTdOtsuWd5BWhAGAuOY/Xa6xpiaWXiNg== + dependencies: + debug "^4.3.4" + +agent-base@^7.1.0: + version "7.1.0" + resolved "https://registry.npmjs.org/agent-base/-/agent-base-7.1.0.tgz" + integrity sha512-o/zjMZRhJxny7OyEF+Op8X+efiELC7k7yOjMzgfzVqOzXqkBkWI79YoTdOtsuWd5BWhAGAuOY/Xa6xpiaWXiNg== + dependencies: + debug "^4.3.4" + agentkeepalive@^4.1.3, agentkeepalive@^4.2.1: version "4.5.0" resolved "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.5.0.tgz" @@ -1541,7 +1562,7 @@ data-uri-to-buffer@^4.0.0: resolved "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz" integrity sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A== -debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.3, debug@~4.3.1, debug@~4.3.2, debug@4: +debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.3, debug@^4.3.4, debug@~4.3.1, debug@~4.3.2, debug@4: version "4.3.4" resolved "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz" integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== @@ -1872,7 +1893,7 @@ flatbuffers@23.5.26: resolved "https://registry.npmjs.org/flatbuffers/-/flatbuffers-23.5.26.tgz" integrity sha512-vE+SI9vrJDwi1oETtTIFldC/o9GsVKRM+s6EL0nQgxXlYV1Vc4Tk30hj4xGICftInKQKj1F3up2n8UbIVobISQ== -follow-redirects@^1.15.4: +follow-redirects@^1.15.4, follow-redirects@^1.15.5: version "1.15.5" resolved "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.5.tgz" integrity sha512-vSFWUON1B+yAw1VN4xMfxgn5fTUiaOzAJCKBwIIgT/+7CuGy9+r+5gITvP62j3RmaD5Ph65UaERdOSRGUzZtgw== @@ -2112,6 +2133,14 @@ http-proxy-agent@^4.0.1: agent-base "6" debug "4" +http-proxy-agent@^7.0.1: + version "7.0.1" + resolved "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.1.tgz" + integrity sha512-My1KCEPs6A0hb4qCVzYp8iEvA8j8YqcvXLZZH8C9OFuTYpYjHE7N2dtG3mRl1HMD4+VGXpF3XcDVcxGBT7yDZQ== + dependencies: + agent-base "^7.1.0" + debug "^4.3.4" + https-proxy-agent@^5.0.0: version "5.0.1" resolved "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz" @@ -2120,6 +2149,14 @@ https-proxy-agent@^5.0.0: agent-base "6" debug "4" +https-proxy-agent@^7.0.3: + version "7.0.3" + resolved "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.3.tgz" + integrity sha512-kCnwztfX0KZJSLOBrcL0emLeFako55NWMovvyPP2AjsghNk9RB1yjSI+jVumPHYZsNXegNoqupSW9IY3afSH8w== + dependencies: + agent-base "^7.0.2" + debug "4" + human-signals@^2.1.0: version "2.1.0" resolved "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz" diff --git a/extensions/vscode/package-lock.json b/extensions/vscode/package-lock.json index 294225b91..8ff6a2c00 100644 --- a/extensions/vscode/package-lock.json +++ b/extensions/vscode/package-lock.json @@ -89,9 +89,13 @@ "@types/node-fetch": "^2.6.11", "@xenova/transformers": "^2.14.0", "cheerio": "^1.0.0-rc.12", + "commander": "^12.0.0", "dotenv": "^16.3.1", "fastest-levenshtein": "^1.0.16", + "follow-redirects": "^1.15.5", "handlebars": "^4.7.8", + "http-proxy-agent": "^7.0.1", + "https-proxy-agent": "^7.0.3", "js-tiktoken": "^1.0.8", "llm-code-highlighter": "^0.0.5", "node-fetch": "^3.3.2", @@ -109,6 +113,7 @@ "web-tree-sitter": "^0.20.8" }, "devDependencies": { + "@types/follow-redirects": "^1.14.4", "@types/handlebars": "^4.1.0", "@types/jest": "^29.5.11", "@types/jquery": "^3.5.29", diff --git a/extensions/vscode/src/activation/activate.ts b/extensions/vscode/src/activation/activate.ts index 7b197e6b9..59344c564 100644 --- a/extensions/vscode/src/activation/activate.ts +++ b/extensions/vscode/src/activation/activate.ts @@ -2,26 +2,13 @@ import { getTsConfigPath, migrate } from "core/util/paths"; import { Telemetry } from "core/util/posthog"; import * as fs from "fs"; import path from "path"; -import { v4 } from "uuid"; import * as vscode from "vscode"; -import { registerAllCommands } from "../commands"; -import IdeProtocolClient from "../continueIdeClient"; -import { ContinueGUIWebviewViewProvider } from "../debugPanel"; +import { VsCodeExtension } from "../extension/vscodeExtension"; import registerQuickFixProvider from "../lang-server/codeActions"; -import { registerAllCodeLensProviders } from "../lang-server/codeLens"; -import { - ContinueCompletionProvider, - setupStatusBar, -} from "../lang-server/completionProvider"; -import { vsCodeIndexCodebase } from "../util/indexCodebase"; import { getExtensionVersion, getPlatform } from "../util/util"; import { getExtensionUri } from "../util/vscode"; import { setupInlineTips } from "./inlineTips"; -export let extensionContext: vscode.ExtensionContext | undefined = undefined; -export let ideProtocolClient: IdeProtocolClient; -export let windowId: string = v4(); - export async function showTutorial() { const tutorialPath = path.join( getExtensionUri().fsPath, @@ -47,7 +34,9 @@ async function openTutorialFirstTime(context: vscode.ExtensionContext) { } } -function showRefactorMigrationMessage() { +function showRefactorMigrationMessage( + extensionContext: vscode.ExtensionContext +) { // Only if the vscode setting continue.manuallyRunningSserver is true const manuallyRunningServer = vscode.workspace @@ -81,45 +70,13 @@ export async function activateExtension(context: vscode.ExtensionContext) { // Add necessary files getTsConfigPath(); - extensionContext = context; - // Register commands and providers - registerAllCodeLensProviders(context); - registerAllCommands(context); registerQuickFixProvider(); await openTutorialFirstTime(context); setupInlineTips(context); - showRefactorMigrationMessage(); - const config = vscode.workspace.getConfiguration("continue"); - const enabled = config.get("enableTabAutocomplete"); + showRefactorMigrationMessage(context); - // Register inline completion provider (odd versions are pre-release) - if (parseInt(context.extension.packageJSON.version.split(".")[1]) % 2 !== 0) { - setupStatusBar(enabled); - context.subscriptions.push( - vscode.languages.registerInlineCompletionItemProvider( - [{ pattern: "**" }], - new ContinueCompletionProvider() - ) - ); - } - - ideProtocolClient = new IdeProtocolClient(context); - - // Register Continue GUI as sidebar webview, and beginning a new session - const provider = new ContinueGUIWebviewViewProvider(); - - context.subscriptions.push( - vscode.window.registerWebviewViewProvider( - "continue.continueGUIView", - provider, - { - webviewOptions: { retainContextWhenHidden: true }, - } - ) - ); - - vsCodeIndexCodebase(ideProtocolClient.getWorkspaceDirectories()); + const vscodeExtension = new VsCodeExtension(context); migrate("showWelcome", () => { vscode.commands.executeCommand( @@ -130,25 +87,6 @@ export async function activateExtension(context: vscode.ExtensionContext) { ); }); - // (async () => { - // const defaultDocsPages = [ - // ["Socket.IO", "https://python-socketio.readthedocs.io/en/stable"], - // // ["Flask", "https://flask.palletsprojects.com/en/2.0.x/"], - // ]; - - // const config = await configHandler.loadConfig(new VsCodeIde()); - - // defaultDocsPages.forEach(async ([title, url]) => { - // for await (const update of indexDocs( - // title, - // new URL(url), - // config.embeddingsProvider - // )) { - // console.log(update.progress, update.desc); - // } - // }); - // })(); - if (getPlatform() === "mac") { // Icon is too large and distracting on other platforms try { diff --git a/extensions/vscode/src/commands.ts b/extensions/vscode/src/commands.ts index a8484c105..ab1f83e28 100644 --- a/extensions/vscode/src/commands.ts +++ b/extensions/vscode/src/commands.ts @@ -3,19 +3,18 @@ import * as os from "os"; import * as path from "path"; import * as vscode from "vscode"; -import { extensionContext, ideProtocolClient } from "./activation/activate"; -import { debugPanelWebview, getSidebarContent } from "./debugPanel"; -import { acceptDiffCommand, rejectDiffCommand } from "./diff/horizontal"; -import { - editorToVerticalDiffCodeLens, - streamEdit, - verticalPerLineDiffManager, -} from "./diff/verticalPerLine/manager"; -import { VsCodeIde } from "./ideProtocol"; +import { IDE } from "core"; +import { ConfigHandler } from "core/config/handler"; +import { logDevData } from "core/util/devdata"; +import { ContinueGUIWebviewViewProvider } from "./debugPanel"; +import { DiffManager } from "./diff/horizontal"; +import { VerticalPerLineDiffManager } from "./diff/verticalPerLine/manager"; import { AutocompleteOutcome } from "./lang-server/completionProvider"; -import { configHandler, llmFromTitle } from "./loadConfig"; -function addHighlightedCodeToContext(edit: boolean) { +function addHighlightedCodeToContext( + edit: boolean, + webview: vscode.Webview | undefined +) { const editor = vscode.window.activeTextEditor; if (editor) { const selection = editor.selection; @@ -37,7 +36,7 @@ function addHighlightedCodeToContext(edit: boolean) { }, }; - debugPanelWebview?.postMessage({ + webview?.postMessage({ type: "highlightedCode", rangeInFileWithContents, edit, @@ -45,14 +44,22 @@ function addHighlightedCodeToContext(edit: boolean) { } } -async function addEntireFileToContext(filepath: vscode.Uri, edit: boolean) { +async function addEntireFileToContext( + filepath: vscode.Uri, + edit: boolean, + debugPanelWebview: vscode.Webview | undefined +) { // If a directory, add all files in the directory const stat = await vscode.workspace.fs.stat(filepath); if (stat.type === vscode.FileType.Directory) { const files = await vscode.workspace.fs.readDirectory(filepath); for (const [filename, type] of files) { if (type === vscode.FileType.File) { - addEntireFileToContext(vscode.Uri.joinPath(filepath, filename), edit); + addEntireFileToContext( + vscode.Uri.joinPath(filepath, filename), + edit, + debugPanelWebview + ); } } return; @@ -82,50 +89,44 @@ async function addEntireFileToContext(filepath: vscode.Uri, edit: boolean) { }); } -function acceptRejectVerticalDiffBlock( - accept: boolean, - filepath?: string, - index?: number -) { - if (!filepath) { - const activeEditor = vscode.window.activeTextEditor; - if (!activeEditor) { - return; - } - filepath = activeEditor.document.uri.fsPath; - } - - if (typeof index === "undefined") { - index = 0; - } - - let blocks = editorToVerticalDiffCodeLens.get(filepath); - const block = blocks?.[index]; - if (!blocks || !block) { - return; - } - - const handler = verticalPerLineDiffManager.getHandlerForFile(filepath); - if (!handler) { - return; - } - - // CodeLens object removed from editorToVerticalDiffCodeLens here - handler.acceptRejectBlock(accept, block.start, block.numGreen, block.numRed); -} - // Copy everything over from extension.ts -const commandsMap: { [command: string]: (...args: any) => any } = { - "continue.acceptDiff": acceptDiffCommand, - "continue.rejectDiff": rejectDiffCommand, +const commandsMap: ( + ide: IDE, + extensionContext: vscode.ExtensionContext, + sidebar: ContinueGUIWebviewViewProvider, + configHandler: ConfigHandler, + diffManager: DiffManager, + verticalDiffManager: VerticalPerLineDiffManager +) => { [command: string]: (...args: any) => any } = ( + ide, + extensionContext, + sidebar, + configHandler, + diffManager, + verticalDiffManager +) => ({ + "continue.acceptDiff": async (newFilepath?: string | vscode.Uri) => { + if (newFilepath instanceof vscode.Uri) { + newFilepath = newFilepath.fsPath; + } + verticalDiffManager.clearForFilepath(newFilepath, true); + await diffManager.acceptDiff(newFilepath); + }, + "continue.rejectDiff": async (newFilepath?: string | vscode.Uri) => { + if (newFilepath instanceof vscode.Uri) { + newFilepath = newFilepath.fsPath; + } + verticalDiffManager.clearForFilepath(newFilepath, false); + await diffManager.rejectDiff(newFilepath); + }, "continue.acceptVerticalDiffBlock": (filepath?: string, index?: number) => { - acceptRejectVerticalDiffBlock(true, filepath, index); + verticalDiffManager.acceptRejectVerticalDiffBlock(true, filepath, index); }, "continue.rejectVerticalDiffBlock": (filepath?: string, index?: number) => { - acceptRejectVerticalDiffBlock(false, filepath, index); + verticalDiffManager.acceptRejectVerticalDiffBlock(false, filepath, index); }, "continue.quickFix": async (message: string, code: string, edit: boolean) => { - debugPanelWebview?.postMessage({ + sidebar.webview?.postMessage({ type: "newSessionWithPrompt", prompt: `${ edit ? "/edit " : "" @@ -137,17 +138,17 @@ const commandsMap: { [command: string]: (...args: any) => any } = { }, "continue.focusContinueInput": async () => { vscode.commands.executeCommand("continue.continueGUIView.focus"); - debugPanelWebview?.postMessage({ + sidebar.webview?.postMessage({ type: "focusContinueInput", }); - addHighlightedCodeToContext(false); + addHighlightedCodeToContext(false, sidebar.webview); }, "continue.focusContinueInputWithoutClear": async () => { vscode.commands.executeCommand("continue.continueGUIView.focus"); - debugPanelWebview?.postMessage({ + sidebar.webview?.postMessage({ type: "focusContinueInputWithoutClear", }); - addHighlightedCodeToContext(true); + addHighlightedCodeToContext(true, sidebar.webview); }, "continue.toggleAuxiliaryBar": () => { vscode.commands.executeCommand("workbench.action.toggleAuxiliaryBar"); @@ -167,7 +168,7 @@ const commandsMap: { [command: string]: (...args: any) => any } = { } if (text.length > 0) { - await streamEdit(text); + await verticalDiffManager.streamEdit(text); } else { // Pick context first const quickPickItems: Promise = configHandler @@ -201,7 +202,7 @@ const commandsMap: { [command: string]: (...args: any) => any } = { title: "Continue Quick Edit", }); if (text) { - const llm = await llmFromTitle(); + const llm = await configHandler.llmFromTitle(); const config = await configHandler.loadConfig(); const context = ( await Promise.all( @@ -216,7 +217,7 @@ const commandsMap: { [command: string]: (...args: any) => any } = { return provider.getContextItems("", { embeddingsProvider: config.embeddingsProvider, - ide: new VsCodeIde(), + ide, llm, fullInput: text || "", selectedCode: [], @@ -230,24 +231,24 @@ const commandsMap: { [command: string]: (...args: any) => any } = { "\n\n---\n\n" + text; - await streamEdit(text); + await verticalDiffManager.streamEdit(text); } } }, "continue.writeCommentsForCode": async () => { - await streamEdit("Write comments for this code"); + await verticalDiffManager.streamEdit("Write comments for this code"); }, "continue.writeDocstringForCode": async () => { - await streamEdit("Write a docstring for this code"); + await verticalDiffManager.streamEdit("Write a docstring for this code"); }, "continue.fixCode": async () => { - await streamEdit("Fix this code"); + await verticalDiffManager.streamEdit("Fix this code"); }, "continue.optimizeCode": async () => { - await streamEdit("Optimize this code"); + await verticalDiffManager.streamEdit("Optimize this code"); }, "continue.fixGrammar": async () => { - await streamEdit( + await verticalDiffManager.streamEdit( "If there are any grammar or spelling mistakes in this writing, fix them" ); }, @@ -264,9 +265,9 @@ const commandsMap: { [command: string]: (...args: any) => any } = { await vscode.window.showTextDocument(uri); }, "continue.debugTerminal": async () => { - const terminalContents = await ideProtocolClient.getTerminalContents(1); + const terminalContents = await ide.getTerminalContents(); vscode.commands.executeCommand("continue.continueGUIView.focus"); - debugPanelWebview?.postMessage({ + sidebar.webview?.postMessage({ type: "userInput", input: `I got the following error, can you please help explain how to fix it?\n\n${terminalContents}`, }); @@ -280,21 +281,21 @@ const commandsMap: { [command: string]: (...args: any) => any } = { // Commands without keyboard shortcuts "continue.addModel": () => { vscode.commands.executeCommand("continue.continueGUIView.focus"); - debugPanelWebview?.postMessage({ + sidebar.webview?.postMessage({ type: "addModel", }); }, "continue.openSettingsUI": () => { vscode.commands.executeCommand("continue.continueGUIView.focus"); - debugPanelWebview?.postMessage({ + sidebar.webview?.postMessage({ type: "openSettings", }); }, "continue.sendMainUserInput": (text: string) => { - ideProtocolClient.sendMainUserInput(text); + sidebar.sendMainUserInput(text); }, "continue.shareSession": () => { - ideProtocolClient.sendMainUserInput("/share"); + sidebar.sendMainUserInput("/share"); }, "continue.selectRange": (startLine: number, endLine: number) => { if (!vscode.window.activeTextEditor) { @@ -319,15 +320,15 @@ const commandsMap: { [command: string]: (...args: any) => any } = { }); }, "continue.sendToTerminal": (text: string) => { - ideProtocolClient.runCommand(text); + ide.runCommand(text); }, "continue.newSession": () => { - debugPanelWebview?.postMessage({ + sidebar.webview?.postMessage({ type: "newSession", }); }, "continue.viewHistory": () => { - debugPanelWebview?.postMessage({ + sidebar.webview?.postMessage({ type: "viewHistory", }); }, @@ -364,7 +365,7 @@ const commandsMap: { [command: string]: (...args: any) => any } = { return; } - // Close the sidebars + // Close the sidebar.webviews // vscode.commands.executeCommand("workbench.action.closeSidebar"); vscode.commands.executeCommand("workbench.action.closeAuxiliaryBar"); // vscode.commands.executeCommand("workbench.action.toggleZenMode"); @@ -373,9 +374,12 @@ const commandsMap: { [command: string]: (...args: any) => any } = { "Continue", vscode.ViewColumn.One ); - panel.webview.html = getSidebarContent( + panel.webview.html = sidebar.getSidebarContent( extensionContext, panel, + ide, + configHandler, + verticalDiffManager, undefined, undefined, true @@ -388,7 +392,7 @@ const commandsMap: { [command: string]: (...args: any) => any } = { vscode.commands.executeCommand("continue.continueGUIView.focus"); for (const uri of uris) { - addEntireFileToContext(uri, false); + addEntireFileToContext(uri, false, sidebar.webview); } }, "continue.updateAllReferences": (filepath: vscode.Uri) => { @@ -398,7 +402,7 @@ const commandsMap: { [command: string]: (...args: any) => any } = { return; } const position = editor.selection.active; - ideProtocolClient.sendMainUserInput( + sidebar.sendMainUserInput( `/references ${filepath.fsPath} ${position.line} ${position.character}` ); }, @@ -408,7 +412,7 @@ const commandsMap: { [command: string]: (...args: any) => any } = { ) => { clearTimeout(logRejectionTimeout); outcome.accepted = true; - ideProtocolClient.logDevData("autocomplete", outcome); + logDevData("autocomplete", outcome); }, "continue.toggleTabAutocompleteEnabled": () => { const config = vscode.workspace.getConfiguration("continue"); @@ -419,10 +423,27 @@ const commandsMap: { [command: string]: (...args: any) => any } = { vscode.ConfigurationTarget.Global ); }, -}; +}); -export function registerAllCommands(context: vscode.ExtensionContext) { - for (const [command, callback] of Object.entries(commandsMap)) { +export function registerAllCommands( + context: vscode.ExtensionContext, + ide: IDE, + extensionContext: vscode.ExtensionContext, + sidebar: ContinueGUIWebviewViewProvider, + configHandler: ConfigHandler, + diffManager: DiffManager, + verticalDiffManager: VerticalPerLineDiffManager +) { + for (const [command, callback] of Object.entries( + commandsMap( + ide, + extensionContext, + sidebar, + configHandler, + diffManager, + verticalDiffManager + ) + )) { context.subscriptions.push( vscode.commands.registerCommand(command, callback) ); diff --git a/extensions/vscode/src/debugPanel.ts b/extensions/vscode/src/debugPanel.ts index 3d16cb291..15e2c6cbe 100644 --- a/extensions/vscode/src/debugPanel.ts +++ b/extensions/vscode/src/debugPanel.ts @@ -1,721 +1,10 @@ -import { ContextItemId, DiffLine, FileEdit, ModelDescription } from "core"; -import { indexDocs } from "core/indexing/docs"; -import TransformersJsEmbeddingsProvider from "core/indexing/embeddings/TransformersJsEmbeddingsProvider"; -import historyManager from "core/util/history"; -import { editConfigJson, getConfigJsonPath } from "core/util/paths"; -import { readFileSync, writeFileSync } from "fs"; -import { v4 as uuidv4 } from "uuid"; +import { FileEdit, IDE } from "core"; +import { ConfigHandler } from "core/config/handler"; import * as vscode from "vscode"; -import { - extensionContext, - ideProtocolClient, - showTutorial, - windowId, -} from "./activation/activate"; -import { streamEdit } from "./diff/verticalPerLine/manager"; -import { VsCodeIde } from "./ideProtocol"; -import { configHandler, llmFromTitle } from "./loadConfig"; +import { VerticalPerLineDiffManager } from "./diff/verticalPerLine/manager"; import { getTheme } from "./util/getTheme"; import { getExtensionUri, getNonce, getUniqueId } from "./util/vscode"; - -export let debugPanelWebview: vscode.Webview | undefined; - -export async function webviewRequest( - messageType: string, - data: any = {} -): Promise { - return new Promise((resolve, reject) => { - if (!debugPanelWebview) { - resolve(undefined); - } - - const listener = debugPanelWebview?.onDidReceiveMessage((data) => { - if (data.type === messageType) { - resolve(data); - listener?.dispose(); - } - }); - - debugPanelWebview?.postMessage({ type: messageType, data }); - - setTimeout(() => { - reject("Error communciating with Continue side panel: timed out"); - listener?.dispose(); - }, 500); - }); -} - -const abortedMessageIds: Set = new Set(); - -export function getSidebarContent( - context: vscode.ExtensionContext | undefined, - panel: vscode.WebviewPanel | vscode.WebviewView, - page: string | undefined = undefined, - edits: FileEdit[] | undefined = undefined, - isFullScreen: boolean = false -): string { - if (!isFullScreen) { - debugPanelWebview = panel.webview; - panel.onDidDispose(() => { - debugPanelWebview = undefined; - }); - } - - let extensionUri = getExtensionUri(); - let scriptUri: string; - let styleMainUri: string; - let vscMediaUrl: string = panel.webview - .asWebviewUri(vscode.Uri.joinPath(extensionUri, "gui")) - .toString(); - - const inDevelopmentMode = - context?.extensionMode === vscode.ExtensionMode.Development; - if (!inDevelopmentMode) { - scriptUri = panel.webview - .asWebviewUri(vscode.Uri.joinPath(extensionUri, "gui/assets/index.js")) - .toString(); - styleMainUri = panel.webview - .asWebviewUri(vscode.Uri.joinPath(extensionUri, "gui/assets/index.css")) - .toString(); - } else { - scriptUri = "http://localhost:5173/src/main.tsx"; - styleMainUri = "http://localhost:5173/src/index.css"; - } - - panel.webview.options = { - enableScripts: true, - localResourceRoots: [ - vscode.Uri.joinPath(extensionUri, "gui"), - vscode.Uri.joinPath(extensionUri, "assets"), - ], - enableCommandUris: true, - portMapping: [ - { - webviewPort: 65433, - extensionHostPort: 65433, - }, - ], - }; - - const nonce = getNonce(); - - panel.webview.onDidReceiveMessage(async (data) => { - const ide = new VsCodeIde(); - const respond = (message: any) => { - panel.webview.postMessage({ - type: data.type, - messageId: data.messageId, - message: message, - }); - }; - try { - switch (data.type) { - case "abort": { - abortedMessageIds.add(data.messageId); - break; - } - case "showFile": { - ideProtocolClient.openFile(data.filepath); - break; - } - case "openConfigJson": { - ideProtocolClient.openFile(getConfigJsonPath()); - break; - } - case "readRangeInFile": { - vscode.workspace.openTextDocument(data.filepath).then((document) => { - let start = new vscode.Position(0, 0); - let end = new vscode.Position(5, 0); - let range = new vscode.Range(start, end); - - let contents = document.getText(range); - panel.webview.postMessage({ - type: "readRangeInFile", - messageId: data.messageId, - contents, - }); - }); - break; - } - case "toggleDevTools": { - vscode.commands.executeCommand("workbench.action.toggleDevTools"); - vscode.commands.executeCommand("continue.viewLogs"); - break; - } - case "reloadWindow": { - vscode.commands.executeCommand("workbench.action.reloadWindow"); - break; - } - case "focusEditor": { - vscode.commands.executeCommand( - "workbench.action.focusActiveEditorGroup" - ); - break; - } - case "toggleFullScreen": { - vscode.commands.executeCommand("continue.toggleFullScreen"); - break; - } - case "withProgress": { - // This message allows withProgress to be used in the webview - if (data.done) { - // Will be caught in the listener created below - break; - } - let title = data.title; - vscode.window.withProgress( - { - location: vscode.ProgressLocation.Notification, - title, - cancellable: false, - }, - async () => { - return new Promise((resolve, reject) => { - let listener = panel.webview.onDidReceiveMessage( - async (data) => { - if ( - data.type === "withProgress" && - data.done && - data.title === title - ) { - listener.dispose(); - resolve(); - } - } - ); - }); - } - ); - - break; - } - - // IDE - case "getDiff": { - respond(await ide.getDiff()); - break; - } - case "getSerializedConfig": { - respond(await ide.getSerializedConfig()); - break; - } - case "getTerminalContents": { - respond(await ide.getTerminalContents()); - break; - } - case "listWorkspaceContents": { - respond(await ide.listWorkspaceContents()); - break; - } - case "getWorkspaceDirs": { - respond(await ide.getWorkspaceDirs()); - break; - } - case "listFolders": { - respond(await ide.listFolders()); - break; - } - case "writeFile": { - respond( - await ide.writeFile(data.message.path, data.message.contents) - ); - break; - } - case "showVirtualFile": { - respond( - await ide.showVirtualFile(data.message.name, data.message.content) - ); - break; - } - case "getContinueDir": { - respond(await ide.getContinueDir()); - break; - } - case "openFile": { - respond(await ide.openFile(data.message.path)); - break; - } - case "runCommand": { - respond(await ide.runCommand(data.message.command)); - break; - } - case "getSearchResults": { - respond(await ide.getSearchResults(data.message.query)); - break; - } - case "subprocess": { - respond(await ide.subprocess(data.message.command)); - break; - } - // History - case "history": { - respond(historyManager.list()); - break; - } - case "saveSession": { - historyManager.save(data.message); - respond({}); - break; - } - case "deleteSession": { - historyManager.delete(data.message); - respond({}); - break; - } - case "loadSession": { - respond(historyManager.load(data.message)); - break; - } - case "saveFile": { - respond(await ide.saveFile(data.message.filepath)); - break; - } - case "readFile": { - respond(await ide.readFile(data.message.filepath)); - break; - } - case "showDiff": { - respond( - await ide.showDiff( - data.message.filepath, - data.message.newContents, - data.message.stepIndex - ) - ); - break; - } - case "diffLine": { - const { - diffLine, - filepath, - startLine, - endLine, - }: { - diffLine: DiffLine; - filepath: string; - startLine: number; - endLine: number; - } = data.message; - - respond( - await ide.verticalDiffUpdate(filepath, startLine, endLine, diffLine) - ); - break; - } - case "getProblems": { - respond(await ide.getProblems(data.message.filepath)); - break; - } - case "getBranch": { - const { dir } = data.message; - respond(await ide.getBranch(dir)); - break; - } - case "getOpenFiles": { - respond(await ide.getOpenFiles()); - break; - } - case "getPinnedFiles": { - respond(await ide.getPinnedFiles()); - break; - } - case "showLines": { - const { filepath, startLine, endLine } = data.message; - respond(await ide.showLines(filepath, startLine, endLine)); - break; - } - // Other - case "errorPopup": { - vscode.window - .showErrorMessage(data.message, "Show Logs") - .then((selection) => { - if (selection === "Show Logs") { - vscode.commands.executeCommand( - "workbench.action.toggleDevTools" - ); - } - }); - break; - } - case "logDevData": { - ideProtocolClient.logDevData(data.tableName, data.data); - break; - } - case "addModel": { - const model = data.model; - const config = readFileSync(getConfigJsonPath(), "utf8"); - const configJson = JSON.parse(config); - configJson.models.push(model); - const newConfigString = JSON.stringify( - configJson, - (key, value) => { - return value === null ? undefined : value; - }, - 2 - ); - writeFileSync(getConfigJsonPath(), newConfigString); - configHandler.reloadConfig(); - ideProtocolClient.openFile(getConfigJsonPath()); - - // Find the range where it was added and highlight - let lines = newConfigString.split("\n"); - let startLine; - let endLine; - for (let i = 0; i < lines.length; i++) { - let line = lines[i]; - - if (!startLine) { - if (line.trim() === `"title": "${data.model.title}",`) { - startLine = i - 1; - } - } else { - if (line.startsWith(" }")) { - endLine = i; - break; - } - } - } - - if (startLine && endLine) { - ideProtocolClient.highlightCode( - { - filepath: getConfigJsonPath(), - range: { - start: { character: 0, line: startLine }, - end: { character: 0, line: endLine }, - }, - }, - "#fff1" - ); - } - vscode.window.showInformationMessage( - "🎉 Your model has been successfully added to config.json. You can use this file to further edit its configuration." - ); - break; - } - case "deleteModel": { - const configJson = editConfigJson((config) => { - config.models = config.models.filter( - (m: any) => m.title !== data.title - ); - return config; - }); - configHandler.reloadConfig(); - break; - } - case "addOpenAIKey": { - const configJson = editConfigJson((config) => { - config.models = config.models.map((m: ModelDescription) => { - if (m.provider === "free-trial") { - m.apiKey = data.key; - m.provider = "openai"; - } - return m; - }); - return config; - }); - configHandler.reloadConfig(); - break; - } - case "llmStreamComplete": { - const model = await llmFromTitle(data.message.title); - const gen = model.streamComplete( - data.message.prompt, - data.message.completionOptions - ); - let next = await gen.next(); - while (!next.done) { - if (abortedMessageIds.has(data.messageId)) { - abortedMessageIds.delete(data.messageId); - next = await gen.return({ completion: "", prompt: "" }); - break; - } - respond({ content: next.value }); - next = await gen.next(); - } - - respond({ done: true, data: next.value }); - break; - } - case "llmStreamChat": { - const model = await llmFromTitle(data.message.title); - const gen = model.streamChat( - data.message.messages, - data.message.completionOptions - ); - let next = await gen.next(); - while (!next.done) { - if (abortedMessageIds.has(data.messageId)) { - abortedMessageIds.delete(data.messageId); - next = await gen.return({ completion: "", prompt: "" }); - break; - } - respond({ content: next.value.content }); - next = await gen.next(); - } - - respond({ done: true, data: next.value }); - break; - } - case "llmComplete": { - const model = await llmFromTitle(data.message.title); - const completion = await model.complete( - data.message.prompt, - data.message.completionOptions - ); - respond({ content: completion }); - break; - } - case "runNodeJsSlashCommand": { - const { - input, - history, - modelTitle, - slashCommandName, - contextItems, - params, - historyIndex, - } = data.message; - - const config = await configHandler.loadConfig(); - const llm = await llmFromTitle(modelTitle); - const slashCommand = config.slashCommands?.find( - (sc) => sc.name === slashCommandName - ); - if (!slashCommand) { - throw new Error(`Unknown slash command ${slashCommandName}`); - } - - for await (const update of slashCommand.run({ - input, - history, - llm, - contextItems, - params, - ide, - addContextItem: (item) => { - debugPanelWebview?.postMessage({ - type: "addContextItem", - message: { item, historyIndex }, - }); - }, - })) { - if (update) { - respond({ content: update }); - } - } - respond({ done: true }); - break; - } - case "loadSubmenuItems": { - const { title } = data.message; - const config = await configHandler.loadConfig(); - const provider = config.contextProviders?.find( - (p) => p.description.title === title - ); - if (!provider) { - vscode.window.showErrorMessage( - `Unknown provider ${title}. Existing providers: ${config.contextProviders - ?.map((p) => p.description.title) - .join(", ")}` - ); - respond({ items: [] }); - break; - } - - try { - const items = await provider.loadSubmenuItems({ ide }); - respond({ items }); - } catch (e) { - vscode.window.showErrorMessage( - `Error loading submenu items from ${title}: ${e}` - ); - respond({ items: [] }); - } - break; - } - case "getContextItems": { - const { name, query, fullInput, selectedCode } = data.message; - const config = await configHandler.loadConfig(); - const llm = await llmFromTitle(); - const provider = config.contextProviders?.find( - (p) => p.description.title === name - ); - if (!provider) { - vscode.window.showErrorMessage( - `Unknown provider ${name}. Existing providers: ${config.contextProviders - ?.map((p) => p.description.title) - .join(", ")}` - ); - respond({ items: [] }); - break; - } - - try { - const id: ContextItemId = { - providerTitle: provider.description.title, - itemId: uuidv4(), - }; - const items = await provider.getContextItems(query, { - llm, - embeddingsProvider: config.embeddingsProvider, - fullInput, - ide, - selectedCode, - }); - respond({ items: items.map((item) => ({ ...item, id })) }); - } catch (e) { - vscode.window.showErrorMessage( - `Error getting context items from ${name}: ${e}` - ); - respond({ items: [] }); - } - break; - } - case "addDocs": { - const { url, title } = data; - const embeddingsProvider = new TransformersJsEmbeddingsProvider(); - vscode.window.withProgress( - { - location: vscode.ProgressLocation.Notification, - title: `Indexing ${title}`, - cancellable: false, - }, - async (progress) => { - for await (const update of indexDocs( - title, - new URL(url), - embeddingsProvider - )) { - progress.report({ - increment: update.progress, - message: update.desc, - }); - } - - vscode.window.showInformationMessage( - `🎉 Successfully indexed ${title}` - ); - - debugPanelWebview?.postMessage({ - type: "refreshSubmenuItems", - }); - } - ); - break; - } - case "applyToCurrentFile": { - // Select the entire current file - const editor = vscode.window.activeTextEditor; - if (!editor) { - vscode.window.showErrorMessage( - "No active editor to apply edits to" - ); - break; - } - const document = editor.document; - const start = new vscode.Position(0, 0); - const end = new vscode.Position( - document.lineCount - 1, - document.lineAt(document.lineCount - 1).text.length - ); - editor.selection = new vscode.Selection(start, end); - - streamEdit( - `The following code was suggested as an edit:\n\`\`\`\n${data.text}\n\`\`\`\nPlease apply it to the previous code.` - ); - break; - } - case "showTutorial": { - showTutorial(); - break; - } - } - } catch (e: any) { - let message = `Continue error: ${e.message}`; - if (e.cause) { - if (e.cause.name === "ConnectTimeoutError") { - message = `Connection timed out. If you expect it to take a long time to connect, you can increase the timeout in config.json by setting "requestOptions": { "timeout": 10000 }. You can find the full config reference here: https://continue.dev/docs/reference/config`; - } else if (e.cause.code === "ECONNREFUSED") { - message = `Connection was refused. This likely means that there is no server running at the specified URL. If you are running your own server you may need to set the "apiBase" parameter in config.json. For example, you can set up an OpenAI-compatible server like here: https://continue.dev/docs/reference/Model%20Providers/openai#openai-compatible-servers--apis`; - } else { - message = `The request failed with "${e.cause.name}": ${e.cause.message}. If you're having trouble setting up Continue, please see the troubleshooting guide for help.`; - } - } - - vscode.window - .showErrorMessage(message, "Show Logs", "Troubleshooting") - .then((selection) => { - if (selection === "Show Logs") { - vscode.commands.executeCommand("workbench.action.toggleDevTools"); - } else if (selection === "Troubleshooting") { - vscode.env.openExternal( - vscode.Uri.parse("https://continue.dev/docs/troubleshooting") - ); - } - }); - respond({ done: true, data: {} }); - } - }); - - const currentTheme = getTheme(); - vscode.workspace.onDidChangeConfiguration((e) => { - if (e.affectsConfiguration("workbench.colorTheme")) { - // Send new theme to GUI to update embedded Monaco themes - debugPanelWebview?.postMessage({ type: "setTheme", theme: getTheme() }); - } - }); - - return ` - - - - - - - - Continue - - -
- - ${ - inDevelopmentMode - ? `` - : "" - } - - - - - - - - - - - - - - ${ - edits - ? `` - : "" - } - ${page ? `` : ""} - - `; -} +import { VsCodeWebviewProtocol } from "./webviewProtocol"; export class ContinueGUIWebviewViewProvider implements vscode.WebviewViewProvider @@ -727,6 +16,172 @@ export class ContinueGUIWebviewViewProvider _context: vscode.WebviewViewResolveContext, _token: vscode.CancellationToken ): void | Thenable { - webviewView.webview.html = getSidebarContent(extensionContext, webviewView); + this._webview = webviewView.webview; + webviewView.webview.html = this.getSidebarContent( + this.extensionContext, + webviewView, + this.ide, + this.configHandler, + this.verticalDiffManager + ); + } + + private _webview?: vscode.Webview; + + get webview() { + return this._webview; + } + + sendMainUserInput(input: string) { + this.webview?.postMessage({ + type: "userInput", + input, + }); + } + + constructor( + private readonly configHandler: ConfigHandler, + private readonly ide: IDE, + private readonly windowId: string, + private readonly extensionContext: vscode.ExtensionContext, + private readonly verticalDiffManager: VerticalPerLineDiffManager + ) {} + + async webviewRequest(messageType: string, data: any = {}): Promise { + return new Promise((resolve, reject) => { + if (!this._webview) { + resolve(undefined); + } + + const listener = this._webview?.onDidReceiveMessage((data) => { + if (data.type === messageType) { + resolve(data); + listener?.dispose(); + } + }); + + this._webview?.postMessage({ type: messageType, data }); + + setTimeout(() => { + reject("Error communciating with Continue side panel: timed out"); + listener?.dispose(); + }, 500); + }); + } + + getSidebarContent( + context: vscode.ExtensionContext | undefined, + panel: vscode.WebviewPanel | vscode.WebviewView, + ide: IDE, + configHandler: ConfigHandler, + verticalDiffManager: VerticalPerLineDiffManager, + page: string | undefined = undefined, + edits: FileEdit[] | undefined = undefined, + isFullScreen: boolean = false + ): string { + let extensionUri = getExtensionUri(); + let scriptUri: string; + let styleMainUri: string; + let vscMediaUrl: string = panel.webview + .asWebviewUri(vscode.Uri.joinPath(extensionUri, "gui")) + .toString(); + + const inDevelopmentMode = + context?.extensionMode === vscode.ExtensionMode.Development; + if (!inDevelopmentMode) { + scriptUri = panel.webview + .asWebviewUri(vscode.Uri.joinPath(extensionUri, "gui/assets/index.js")) + .toString(); + styleMainUri = panel.webview + .asWebviewUri(vscode.Uri.joinPath(extensionUri, "gui/assets/index.css")) + .toString(); + } else { + scriptUri = "http://localhost:5173/src/main.tsx"; + styleMainUri = "http://localhost:5173/src/index.css"; + } + + panel.webview.options = { + enableScripts: true, + localResourceRoots: [ + vscode.Uri.joinPath(extensionUri, "gui"), + vscode.Uri.joinPath(extensionUri, "assets"), + ], + enableCommandUris: true, + portMapping: [ + { + webviewPort: 65433, + extensionHostPort: 65433, + }, + ], + }; + + const nonce = getNonce(); + + const currentTheme = getTheme(); + vscode.workspace.onDidChangeConfiguration((e) => { + if (e.affectsConfiguration("workbench.colorTheme")) { + // Send new theme to GUI to update embedded Monaco themes + this._webview?.postMessage({ type: "setTheme", theme: getTheme() }); + } + }); + + const webviewProtocol = new VsCodeWebviewProtocol( + panel.webview, + ide, + configHandler, + verticalDiffManager + ); + + return ` + + + + + + + + Continue + + +
+ + ${ + inDevelopmentMode + ? `` + : "" + } + + + + + + + + + + + + + + ${ + edits + ? `` + : "" + } + ${page ? `` : ""} + + `; } } diff --git a/extensions/vscode/src/diff/horizontal.ts b/extensions/vscode/src/diff/horizontal.ts index d9c89bdd8..f07dec3e8 100644 --- a/extensions/vscode/src/diff/horizontal.ts +++ b/extensions/vscode/src/diff/horizontal.ts @@ -3,11 +3,8 @@ import * as fs from "fs"; import * as os from "os"; import * as path from "path"; import * as vscode from "vscode"; -import { extensionContext } from "../activation/activate"; -import { debugPanelWebview } from "../debugPanel"; import { getMetaKeyLabel, getPlatform } from "../util/util"; import { uriFromFilePath } from "../util/vscode"; -import { verticalPerLineDiffManager } from "./verticalPerLine/manager"; interface DiffInfo { originalFilepath: string; @@ -32,7 +29,7 @@ export const DIFF_DIRECTORY = path .join(os.homedir(), ".continue", "diffs") .replace(/^C:/, "c:"); -class DiffManager { +export class DiffManager { // Create a temporary file in the global .continue directory which displays the updated version // Doing this because virtual files are read-only private diffs: Map = new Map(); @@ -50,7 +47,16 @@ class DiffManager { } } - constructor() { + webview: vscode.Webview | undefined; + private readonly extensionContext: vscode.ExtensionContext; + + constructor( + webview: vscode.Webview | undefined, + extensionContext: vscode.ExtensionContext + ) { + this.webview = webview; + this.extensionContext = extensionContext; + this.setupDirectory(); // Listen for file closes, and if it's a diff file, clean up @@ -123,7 +129,7 @@ class DiffManager { .update("codeLens", true, vscode.ConfigurationTarget.Global); if ( - extensionContext?.globalState.get( + this.extensionContext.globalState.get( "continue.showDiffInfoMessage" ) !== false ) { @@ -136,7 +142,7 @@ class DiffManager { .then((selection) => { if (selection === "Don't show again") { // Get the global state - extensionContext?.globalState.update( + this.extensionContext.globalState.update( "continue.showDiffInfoMessage", false ); @@ -297,7 +303,7 @@ class DiffManager { } // Stop the step at step_index in case it is still streaming - debugPanelWebview?.postMessage({ type: "setInactive" }); + this.webview?.postMessage({ type: "setInactive" }); vscode.workspace.textDocuments .find((doc) => doc.uri.fsPath === newFilepath) @@ -310,8 +316,6 @@ class DiffManager { } } -export const diffManager = new DiffManager(); - async function recordAcceptReject(accepted: boolean, diffInfo: DiffInfo) { const devDataDir = devDataPath(); const suggestionsPath = path.join(devDataDir, "suggestions.json"); @@ -341,19 +345,3 @@ async function recordAcceptReject(accepted: boolean, diffInfo: DiffInfo) { JSON.stringify(suggestions, null, 4) ); } - -export async function acceptDiffCommand(newFilepath?: string | vscode.Uri) { - if (newFilepath instanceof vscode.Uri) { - newFilepath = newFilepath.fsPath; - } - verticalPerLineDiffManager.clearForFilepath(newFilepath, true); - await diffManager.acceptDiff(newFilepath); -} - -export async function rejectDiffCommand(newFilepath?: string | vscode.Uri) { - if (newFilepath instanceof vscode.Uri) { - newFilepath = newFilepath.fsPath; - } - verticalPerLineDiffManager.clearForFilepath(newFilepath, false); - await diffManager.rejectDiff(newFilepath); -} diff --git a/extensions/vscode/src/diff/verticalPerLine/handler.ts b/extensions/vscode/src/diff/verticalPerLine/handler.ts index d6b6e9704..7b7cbe1cf 100644 --- a/extensions/vscode/src/diff/verticalPerLine/handler.ts +++ b/extensions/vscode/src/diff/verticalPerLine/handler.ts @@ -7,10 +7,7 @@ import { indexDecorationType, redDecorationType, } from "./decorations"; -import { - editorToVerticalDiffCodeLens, - verticalPerLineDiffManager, -} from "./manager"; +import { VerticalDiffCodeLens } from "./manager"; export class VerticalPerLineDiffHandler { private editor: vscode.TextEditor; @@ -33,6 +30,14 @@ export class VerticalPerLineDiffHandler { startLine: number, endLine: number, editor: vscode.TextEditor, + private readonly editorToVerticalDiffCodeLens: Map< + string, + VerticalDiffCodeLens[] + >, + private readonly clearForFilepath: ( + filepath: string | undefined, + accept: boolean + ) => void, input?: string ) { this.currentLineIndex = startLine; @@ -71,13 +76,13 @@ export class VerticalPerLineDiffHandler { } if (this.deletionBuffer.length || this.insertedInCurrentBlock > 0) { - const blocks = editorToVerticalDiffCodeLens.get(this.filepath) || []; + const blocks = this.editorToVerticalDiffCodeLens.get(this.filepath) || []; blocks.push({ start: this.currentLineIndex - this.insertedInCurrentBlock, numRed: this.deletionBuffer.length, numGreen: this.insertedInCurrentBlock, }); - editorToVerticalDiffCodeLens.set(this.filepath, blocks); + this.editorToVerticalDiffCodeLens.set(this.filepath, blocks); } if (this.deletionBuffer.length === 0) { @@ -183,7 +188,7 @@ export class VerticalPerLineDiffHandler { this.greenDecorationManager.clear(); this.clearIndexLineDecorations(); - editorToVerticalDiffCodeLens.delete(this.filepath); + this.editorToVerticalDiffCodeLens.delete(this.filepath); this.editor.edit((editBuilder) => { for (const range of rangesToDelete) { @@ -246,7 +251,7 @@ export class VerticalPerLineDiffHandler { // } // }); } catch (e) { - verticalPerLineDiffManager.clearForFilepath(this.filepath, false); + this.clearForFilepath(this.filepath, false); throw e; } } @@ -283,7 +288,7 @@ export class VerticalPerLineDiffHandler { // Shift the codelens objects const blocks = - editorToVerticalDiffCodeLens + this.editorToVerticalDiffCodeLens .get(this.filepath) ?.filter((x) => x.start !== startLine) .map((x) => { @@ -292,6 +297,6 @@ export class VerticalPerLineDiffHandler { } return x; }) || []; - editorToVerticalDiffCodeLens.set(this.filepath, blocks); + this.editorToVerticalDiffCodeLens.set(this.filepath, blocks); } } diff --git a/extensions/vscode/src/diff/verticalPerLine/manager.ts b/extensions/vscode/src/diff/verticalPerLine/manager.ts index ed32376b0..e4dff637e 100644 --- a/extensions/vscode/src/diff/verticalPerLine/manager.ts +++ b/extensions/vscode/src/diff/verticalPerLine/manager.ts @@ -1,13 +1,23 @@ -import { streamDiffLines } from "core/commands/slash/verticalEdit"; +import { ConfigHandler } from "core/config/handler"; import { getMarkdownLanguageTagForFile } from "core/util"; +import { streamDiffLines } from "core/util/verticalEdit"; import * as vscode from "vscode"; -import { llmFromTitle } from "../../loadConfig"; import { VerticalPerLineDiffHandler } from "./handler"; -class VerticalPerLineDiffManager { +export interface VerticalDiffCodeLens { + start: number; + numRed: number; + numGreen: number; +} + +export class VerticalPerLineDiffManager { private filepathToEditorMap: Map = new Map(); + editorToVerticalDiffCodeLens: Map = new Map(); + + constructor(private readonly configHandler: ConfigHandler) {} + createVerticalPerLineDiffHandler( filepath: string, startLine: number, @@ -24,6 +34,8 @@ class VerticalPerLineDiffManager { startLine, endLine, editor, + this.editorToVerticalDiffCodeLens, + this.clearForFilepath, input ); this.filepathToEditorMap.set(filepath, handler); @@ -46,7 +58,9 @@ class VerticalPerLineDiffManager { const handler = new VerticalPerLineDiffHandler( startLine, endLine, - editor + editor, + this.editorToVerticalDiffCodeLens, + this.clearForFilepath ); this.filepathToEditorMap.set(filepath, handler); return handler; @@ -75,85 +89,113 @@ class VerticalPerLineDiffManager { this.filepathToEditorMap.delete(filepath); } } -} -export const verticalPerLineDiffManager = new VerticalPerLineDiffManager(); + acceptRejectVerticalDiffBlock( + accept: boolean, + filepath?: string, + index?: number + ) { + if (!filepath) { + const activeEditor = vscode.window.activeTextEditor; + if (!activeEditor) { + return; + } + filepath = activeEditor.document.uri.fsPath; + } -export async function streamEdit(input: string) { - const editor = vscode.window.activeTextEditor; - if (!editor) { - return; + if (typeof index === "undefined") { + index = 0; + } + + let blocks = this.editorToVerticalDiffCodeLens.get(filepath); + const block = blocks?.[index]; + if (!blocks || !block) { + return; + } + + const handler = this.getHandlerForFile(filepath); + if (!handler) { + return; + } + + // CodeLens object removed from editorToVerticalDiffCodeLens here + handler.acceptRejectBlock( + accept, + block.start, + block.numGreen, + block.numRed + ); } - const filepath = editor.document.uri.fsPath; - const startLine = editor.selection.start.line; - const endLine = editor.selection.end.line; + async streamEdit(input: string) { + const editor = vscode.window.activeTextEditor; + if (!editor) { + return; + } - const existingHandler = - verticalPerLineDiffManager.getHandlerForFile(filepath); - existingHandler?.clear(false); - await new Promise((resolve) => { - setTimeout(resolve, 200); - }); - const diffHandler = - verticalPerLineDiffManager.createVerticalPerLineDiffHandler( + const filepath = editor.document.uri.fsPath; + const startLine = editor.selection.start.line; + const endLine = editor.selection.end.line; + + const existingHandler = this.getHandlerForFile(filepath); + existingHandler?.clear(false); + await new Promise((resolve) => { + setTimeout(resolve, 200); + }); + const diffHandler = this.createVerticalPerLineDiffHandler( filepath, existingHandler?.range.start.line ?? startLine, existingHandler?.range.end.line ?? endLine, input ); - if (!diffHandler) { - return; - } - - const selectedRange = - existingHandler?.range ?? - new vscode.Range( - editor.selection.start.with(undefined, 0), - editor.selection.end.with(undefined, Number.MAX_SAFE_INTEGER) - ); - const rangeContent = editor.document.getText(selectedRange); - const llm = await llmFromTitle(); - - // Unselect the range - editor.selection = new vscode.Selection( - editor.selection.active, - editor.selection.active - ); - - vscode.commands.executeCommand("setContext", "continue.streamingDiff", true); - - if (existingHandler?.input) { - if (existingHandler.input.startsWith("Original request: ")) { - existingHandler.input = existingHandler.input.substring( - "Original request: ".length - ); + if (!diffHandler) { + return; } - input = `Original request: ${existingHandler.input}\nUpdated request: ${input}`; - } - try { - await diffHandler.run( - streamDiffLines( - rangeContent, - llm, - input, - getMarkdownLanguageTagForFile(filepath) - ) + + const selectedRange = + existingHandler?.range ?? + new vscode.Range( + editor.selection.start.with(undefined, 0), + editor.selection.end.with(undefined, Number.MAX_SAFE_INTEGER) + ); + const rangeContent = editor.document.getText(selectedRange); + const llm = await this.configHandler.llmFromTitle(); + + // Unselect the range + editor.selection = new vscode.Selection( + editor.selection.active, + editor.selection.active ); - } finally { + vscode.commands.executeCommand( "setContext", "continue.streamingDiff", - false + true ); + + if (existingHandler?.input) { + if (existingHandler.input.startsWith("Original request: ")) { + existingHandler.input = existingHandler.input.substring( + "Original request: ".length + ); + } + input = `Original request: ${existingHandler.input}\nUpdated request: ${input}`; + } + try { + await diffHandler.run( + streamDiffLines( + rangeContent, + llm, + input, + getMarkdownLanguageTagForFile(filepath) + ) + ); + } finally { + vscode.commands.executeCommand( + "setContext", + "continue.streamingDiff", + false + ); + } } } - -export interface VerticalDiffCodeLens { - start: number; - numRed: number; - numGreen: number; -} - -export const editorToVerticalDiffCodeLens: Map = - new Map(); diff --git a/extensions/vscode/src/extension/autocomplete.ts b/extensions/vscode/src/extension/autocomplete.ts new file mode 100644 index 000000000..e69de29bb diff --git a/extensions/vscode/src/extension/indexing.ts b/extensions/vscode/src/extension/indexing.ts new file mode 100644 index 000000000..e69de29bb diff --git a/extensions/vscode/src/extension/vscodeExtension.ts b/extensions/vscode/src/extension/vscodeExtension.ts new file mode 100644 index 000000000..ec429f945 --- /dev/null +++ b/extensions/vscode/src/extension/vscodeExtension.ts @@ -0,0 +1,183 @@ +import { ConfigHandler } from "core/config/handler"; +import { CodebaseIndexer } from "core/indexing/indexCodebase"; +import { v4 as uuidv4 } from "uuid"; +import * as vscode from "vscode"; +import { registerAllCommands } from "../commands"; +import { ContinueGUIWebviewViewProvider } from "../debugPanel"; +import { DiffManager } from "../diff/horizontal"; +import { VerticalPerLineDiffManager } from "../diff/verticalPerLine/manager"; +import { VsCodeIde } from "../ideProtocol"; +import { registerAllCodeLensProviders } from "../lang-server/codeLens"; +import { + ContinueCompletionProvider, + setupStatusBar, +} from "../lang-server/completionProvider"; +import { TabAutocompleteModel } from "../util/loadAutocompleteModel"; + +export class VsCodeExtension { + private configHandler: ConfigHandler; + private extensionContext: vscode.ExtensionContext; + private ide: VsCodeIde; + private tabAutocompleteModel: TabAutocompleteModel; + private sidebar: ContinueGUIWebviewViewProvider; + private windowId: string; + private indexer: CodebaseIndexer; + private diffManager: DiffManager; + private verticalDiffManager: VerticalPerLineDiffManager; + + constructor(context: vscode.ExtensionContext) { + this.diffManager = new DiffManager(undefined, context); + this.ide = new VsCodeIde(this.diffManager); + this.configHandler = new ConfigHandler(this.ide); + this.verticalDiffManager = new VerticalPerLineDiffManager( + this.configHandler + ); + this.extensionContext = context; + this.tabAutocompleteModel = new TabAutocompleteModel(this.configHandler); + this.windowId = uuidv4(); + this.sidebar = new ContinueGUIWebviewViewProvider( + this.configHandler, + this.ide, + this.windowId, + this.extensionContext, + this.verticalDiffManager + ); + this.diffManager.webview = this.sidebar.webview; + this.indexer = new CodebaseIndexer(this.configHandler, this.ide); + + // CodeLens + registerAllCodeLensProviders( + context, + this.diffManager, + this.verticalDiffManager.editorToVerticalDiffCodeLens + ); + + // Tab autocomplete + const config = vscode.workspace.getConfiguration("continue"); + const enabled = config.get("enableTabAutocomplete"); + + // Register inline completion provider (odd versions are pre-release) + if ( + parseInt(context.extension.packageJSON.version.split(".")[1]) % 2 !== + 0 + ) { + setupStatusBar(enabled); + context.subscriptions.push( + vscode.languages.registerInlineCompletionItemProvider( + [{ pattern: "**" }], + new ContinueCompletionProvider( + this.configHandler, + this.ide, + this.tabAutocompleteModel + ) + ) + ); + } + + // Sidebar + context.subscriptions.push( + vscode.window.registerWebviewViewProvider( + "continue.continueGUIView", + this.sidebar, + { + webviewOptions: { retainContextWhenHidden: true }, + } + ) + ); + + // Commands + registerAllCommands( + context, + this.ide, + context, + this.sidebar, + this.configHandler, + this.diffManager, + this.verticalDiffManager + ); + + // Indexing + this.ide.getWorkspaceDirs().then((dirs) => this.refreshCodebaseIndex(dirs)); + + // Listen for file saving + vscode.workspace.onDidSaveTextDocument((event) => { + const filepath = event.uri.fsPath; + + if ( + filepath.endsWith(".continue/config.json") || + filepath.endsWith(".continue\\config.json") || + filepath.endsWith(".continue/config.ts") || + filepath.endsWith(".continue\\config.ts") || + filepath.endsWith(".continuerc.json") + ) { + this.configHandler.reloadConfig(); + this.tabAutocompleteModel.clearLlm(); + } else if ( + filepath.endsWith(".continueignore") || + filepath.endsWith(".gitignore") + ) { + this.sidebar.webview?.postMessage({ + type: "updateEmbeddings", + }); + } + }); + + // Refresh index when branch is changed + this.ide.getWorkspaceDirs().then((dirs) => + dirs.forEach(async (dir) => { + const repo = await this.ide.getRepo(vscode.Uri.file(dir)); + if (repo) { + repo.state.onDidChange(() => { + // args passed to this callback are always undefined, so keep track of previous branch + const currentBranch = repo?.state?.HEAD?.name; + if (currentBranch) { + if (this.PREVIOUS_BRANCH_FOR_WORKSPACE_DIR[dir]) { + if ( + currentBranch !== this.PREVIOUS_BRANCH_FOR_WORKSPACE_DIR[dir] + ) { + // Trigger refresh of index only in this directory + this.refreshCodebaseIndex([dir]); + } + } + + this.PREVIOUS_BRANCH_FOR_WORKSPACE_DIR[dir] = currentBranch; + } + }); + } + }) + ); + + // Register a content provider for the readonly virtual documents + const documentContentProvider = new (class + implements vscode.TextDocumentContentProvider + { + // emitter and its event + onDidChangeEmitter = new vscode.EventEmitter(); + onDidChange = this.onDidChangeEmitter.event; + + provideTextDocumentContent(uri: vscode.Uri): string { + return uri.query; + } + })(); + context.subscriptions.push( + vscode.workspace.registerTextDocumentContentProvider( + VsCodeExtension.continueVirtualDocumentScheme, + documentContentProvider + ) + ); + } + + static continueVirtualDocumentScheme = "continue"; + + private PREVIOUS_BRANCH_FOR_WORKSPACE_DIR: { [dir: string]: string } = {}; + + private async refreshCodebaseIndex(dirs: string[]) { + for await (const { progress, desc } of this.indexer.refresh(dirs)) { + this.sidebar.webview?.postMessage({ + type: "indexProgress", + progress, + desc, + }); + } + } +} diff --git a/extensions/vscode/src/ideProtocol.ts b/extensions/vscode/src/ideProtocol.ts index e7855934a..469b38261 100644 --- a/extensions/vscode/src/ideProtocol.ts +++ b/extensions/vscode/src/ideProtocol.ts @@ -2,48 +2,97 @@ import { exec } from "child_process"; import { getContinueGlobalPath } from "core/util/paths"; import * as path from "path"; import * as vscode from "vscode"; -import { ideProtocolClient } from "./activation/activate"; import * as child_process from "child_process"; -import { Chunk, DiffLine, IDE, Problem } from "core"; -import { - BrowserSerializedContinueConfig, - finalToBrowserConfig, -} from "core/config/load"; -import { LanceDbIndex } from "core/indexing/LanceDbIndex"; -import { IndexTag } from "core/indexing/types"; -import { verticalPerLineDiffManager } from "./diff/verticalPerLine/manager"; -import { configHandler } from "./loadConfig"; +import { ContinueRcJson, IDE, Problem, Range } from "core"; +import { DiffManager } from "./diff/horizontal"; +import { VsCodeIdeUtils } from "./util/ideUtils"; import { traverseDirectory } from "./util/traverseDirectory"; import { getExtensionUri, openEditorAndRevealRange } from "./util/vscode"; class VsCodeIde implements IDE { - async getSerializedConfig(): Promise { - const config = await configHandler.loadConfig(); - return finalToBrowserConfig(config); + ideUtils: VsCodeIdeUtils; + + constructor(private readonly diffManager: DiffManager) { + this.ideUtils = new VsCodeIdeUtils(); + } + readRangeInFile(filepath: string, range: Range): Promise { + return this.ideUtils.readRangeInFile( + filepath, + new vscode.Range( + new vscode.Position(range.start.line, range.start.character), + new vscode.Position(range.end.line, range.end.character) + ) + ); + } + + async getStats(directory: string): Promise<{ [path: string]: number }> { + const files = await this.listWorkspaceContents(directory); + const pathToLastModified: { [path: string]: number } = {}; + await Promise.all( + files.map(async (file) => { + let stat = await vscode.workspace.fs.stat(vscode.Uri.file(file)); + pathToLastModified[file] = stat.mtime; + }) + ); + + return pathToLastModified; + } + + async getRepo(dir: vscode.Uri): Promise { + return this.ideUtils.getRepo(dir); + } + + async isTelemetryEnabled(): Promise { + return ( + (await vscode.workspace + .getConfiguration("continue") + .get("telemetryEnabled")) ?? true + ); + } + getUniqueId(): Promise { + return Promise.resolve(vscode.env.machineId); } async getDiff(): Promise { - return await ideProtocolClient.getDiff(); + return await this.ideUtils.getDiff(); } async getTerminalContents(): Promise { - return await ideProtocolClient.getTerminalContents(1); + return await this.ideUtils.getTerminalContents(1); } async listWorkspaceContents(directory?: string): Promise { if (directory) { - return await ideProtocolClient.getDirectoryContents(directory, true); + return await this.ideUtils.getDirectoryContents(directory, true); } else { const contents = await Promise.all( - ideProtocolClient + this.ideUtils .getWorkspaceDirectories() - .map((dir) => ideProtocolClient.getDirectoryContents(dir, true)) + .map((dir) => this.ideUtils.getDirectoryContents(dir, true)) ); return contents.flat(); } } + async getWorkspaceConfigs() { + const workspaceDirs = + vscode.workspace.workspaceFolders?.map((folder) => folder.uri) || []; + const configs: ContinueRcJson[] = []; + for (const workspaceDir of workspaceDirs) { + const files = await vscode.workspace.fs.readDirectory(workspaceDir); + for (const [filename, type] of files) { + if (type === vscode.FileType.File && filename === ".continuerc.json") { + const contents = await this.ideUtils.readFile( + vscode.Uri.joinPath(workspaceDir, filename).fsPath + ); + configs.push(JSON.parse(contents)); + } + } + } + return configs; + } + async listFolders(): Promise { const allDirs: string[] = []; @@ -63,7 +112,7 @@ class VsCodeIde implements IDE { } async getWorkspaceDirs(): Promise { - return ideProtocolClient.getWorkspaceDirectories(); + return this.ideUtils.getWorkspaceDirectories(); } async getContinueDir(): Promise { @@ -78,11 +127,11 @@ class VsCodeIde implements IDE { } async showVirtualFile(title: string, contents: string): Promise { - ideProtocolClient.showVirtualFile(title, contents); + this.ideUtils.showVirtualFile(title, contents); } async openFile(path: string): Promise { - ideProtocolClient.openFile(path); + this.ideUtils.openFile(path); } async showLines( @@ -95,53 +144,44 @@ class VsCodeIde implements IDE { new vscode.Position(endLine, 0) ); openEditorAndRevealRange(filepath, range).then(() => { - ideProtocolClient.highlightCode( - { - filepath, - range, - }, - "#fff1" - ); + // TODO: Highlight lines + // this.ideUtils.highlightCode( + // { + // filepath, + // range, + // }, + // "#fff1" + // ); }); } async runCommand(command: string): Promise { - await ideProtocolClient.runCommand(command); + if (vscode.window.terminals.length) { + vscode.window.terminals[0].show(); + vscode.window.terminals[0].sendText(command, false); + } else { + const terminal = vscode.window.createTerminal(); + terminal.show(); + terminal.sendText(command, false); + } } async saveFile(filepath: string): Promise { - await ideProtocolClient.saveFile(filepath); + await this.ideUtils.saveFile(filepath); } async readFile(filepath: string): Promise { - return await ideProtocolClient.readFile(filepath); + return await this.ideUtils.readFile(filepath); } async showDiff( filepath: string, newContents: string, stepIndex: number ): Promise { - await ideProtocolClient.showDiff(filepath, newContents, stepIndex); - } - - async verticalDiffUpdate( - filepath: string, - startLine: number, - endLine: number, - diffLine: DiffLine - ) { - const diffHandler = - verticalPerLineDiffManager.getOrCreateVerticalPerLineDiffHandler( - filepath, - startLine, - endLine - ); - if (diffHandler) { - await diffHandler.handleDiffLine(diffLine); - } + await this.diffManager.writeDiff(filepath, newContents, stepIndex); } async getOpenFiles(): Promise { - return await ideProtocolClient.getOpenFiles(); + return await this.ideUtils.getOpenFiles(); } async getPinnedFiles(): Promise { @@ -227,48 +267,7 @@ class VsCodeIde implements IDE { } async getBranch(dir: string): Promise { - return ideProtocolClient.getBranch(vscode.Uri.file(dir)); - } - - async getFilesToEmbed( - providerId: string - ): Promise<[string, string, string][]> { - return []; - } - - async sendEmbeddingForChunk( - chunk: Chunk, - embedding: number[], - tags: string[] - ) {} - - async retrieveChunks( - text: string, - n: number, - directory: string | undefined - ): Promise { - const embeddingsProvider = (await configHandler.loadConfig()) - .embeddingsProvider; - if (!embeddingsProvider) { - return []; - } - const lanceDbIndex = new LanceDbIndex(embeddingsProvider, (path) => - ideProtocolClient.readFile(path) - ); - - const tags = await Promise.all( - (await this.getWorkspaceDirs()).map(async (dir) => { - let branch = await ideProtocolClient.getBranch(vscode.Uri.file(dir)); - let tag: IndexTag = { - directory: dir, - branch, - artifactId: lanceDbIndex.artifactId, - }; - return tag; - }) - ); - let chunks = await lanceDbIndex.retrieve(tags, text, n, directory); - return chunks as any[]; + return this.ideUtils.getBranch(vscode.Uri.file(dir)); } } diff --git a/extensions/vscode/src/lang-server/autocompletePromptBuilder.ts b/extensions/vscode/src/lang-server/autocompletePromptBuilder.ts new file mode 100644 index 000000000..eab90c80e --- /dev/null +++ b/extensions/vscode/src/lang-server/autocompletePromptBuilder.ts @@ -0,0 +1,31 @@ +import { IDE } from "core"; +import { AutocompleteSnippet } from "core/autocomplete/constructPrompt"; +import * as vscode from "vscode"; + +export class AutocompletePromptBuilder { + constructor(private readonly ide: IDE) {} + + async getDefinition( + uri: string, + line: number, + character: number + ): Promise { + const definitions = (await vscode.commands.executeCommand( + "vscode.executeDefinitionProvider", + vscode.Uri.parse(uri), + new vscode.Position(line, character) + )) as any; + + if (definitions[0]?.targetRange) { + return { + filepath: uri, + content: await this.ide.readRangeInFile( + definitions[0].targetUri.fsPath, + definitions[0].targetRange + ), + }; + } + + return undefined; + } +} diff --git a/extensions/vscode/src/lang-server/codeLens.ts b/extensions/vscode/src/lang-server/codeLens.ts index 04915b777..1b28e6280 100644 --- a/extensions/vscode/src/lang-server/codeLens.ts +++ b/extensions/vscode/src/lang-server/codeLens.ts @@ -1,19 +1,26 @@ import * as os from "os"; import * as path from "path"; import * as vscode from "vscode"; -import { DIFF_DIRECTORY, diffManager } from "../diff/horizontal"; -import { editorToVerticalDiffCodeLens } from "../diff/verticalPerLine/manager"; +import { DIFF_DIRECTORY, DiffManager } from "../diff/horizontal"; +import { VerticalDiffCodeLens } from "../diff/verticalPerLine/manager"; import { editorSuggestionsLocked, editorToSuggestions } from "../suggestions"; import { getMetaKeyLabel } from "../util/util"; import { getExtensionUri } from "../util/vscode"; class VerticalPerLineCodeLensProvider implements vscode.CodeLensProvider { + constructor( + private readonly editorToVerticalDiffCodeLens: Map< + string, + VerticalDiffCodeLens[] + > + ) {} + public provideCodeLenses( document: vscode.TextDocument, _: vscode.CancellationToken ): vscode.CodeLens[] | Thenable { const filepath = document.uri.fsPath; - const blocks = editorToVerticalDiffCodeLens.get(filepath); + const blocks = this.editorToVerticalDiffCodeLens.get(filepath); if (!blocks) { return []; } @@ -96,6 +103,12 @@ class SuggestionsCodeLensProvider implements vscode.CodeLensProvider { } class DiffViewerCodeLensProvider implements vscode.CodeLensProvider { + diffManager: DiffManager; + + constructor(diffManager: DiffManager) { + this.diffManager = diffManager; + } + public provideCodeLenses( document: vscode.TextDocument, _: vscode.CancellationToken @@ -103,7 +116,7 @@ class DiffViewerCodeLensProvider implements vscode.CodeLensProvider { if (path.dirname(document.uri.fsPath) === DIFF_DIRECTORY) { const codeLenses: vscode.CodeLens[] = []; let range = new vscode.Range(0, 0, 1, 0); - const diffInfo = diffManager.diffAtNewFilepath(document.uri.fsPath); + const diffInfo = this.diffManager.diffAtNewFilepath(document.uri.fsPath); if (diffInfo) { range = diffInfo.range; } @@ -334,7 +347,11 @@ let suggestionsCodeLensDisposable: vscode.Disposable | undefined = undefined; let configPyCodeLensDisposable: vscode.Disposable | undefined = undefined; let tutorialCodeLensDisposable: vscode.Disposable | undefined = undefined; -export function registerAllCodeLensProviders(context: vscode.ExtensionContext) { +export function registerAllCodeLensProviders( + context: vscode.ExtensionContext, + diffManager: DiffManager, + editorToVerticalDiffCodeLens: Map +) { if (verticalPerLineCodeLensProvider) { verticalPerLineCodeLensProvider.dispose(); } @@ -353,7 +370,7 @@ export function registerAllCodeLensProviders(context: vscode.ExtensionContext) { verticalPerLineCodeLensProvider = vscode.languages.registerCodeLensProvider( "*", - new VerticalPerLineCodeLensProvider() + new VerticalPerLineCodeLensProvider(editorToVerticalDiffCodeLens) ); suggestionsCodeLensDisposable = vscode.languages.registerCodeLensProvider( "*", @@ -361,7 +378,7 @@ export function registerAllCodeLensProviders(context: vscode.ExtensionContext) { ); diffsCodeLensDisposable = vscode.languages.registerCodeLensProvider( "*", - new DiffViewerCodeLensProvider() + new DiffViewerCodeLensProvider(diffManager) ); configPyCodeLensDisposable = vscode.languages.registerCodeLensProvider( "*", diff --git a/extensions/vscode/src/lang-server/completionProvider.ts b/extensions/vscode/src/lang-server/completionProvider.ts index 515bbb9f2..c2af7f2c4 100644 --- a/extensions/vscode/src/lang-server/completionProvider.ts +++ b/extensions/vscode/src/lang-server/completionProvider.ts @@ -1,8 +1,7 @@ -import { TabAutocompleteOptions } from "core"; +import { IDE, TabAutocompleteOptions } from "core"; import { AutocompleteLruCache } from "core/autocomplete/cache"; import { onlyWhitespaceAfterEndOfLine } from "core/autocomplete/charStream"; import { - AutocompleteSnippet, constructAutocompletePrompt, languageForFilepath, } from "core/autocomplete/constructPrompt"; @@ -12,13 +11,14 @@ import { } from "core/autocomplete/lineStream"; import { DEFAULT_AUTOCOMPLETE_OPTS } from "core/autocomplete/parameters"; import { getTemplateForModel } from "core/autocomplete/templates"; +import { ConfigHandler } from "core/config/handler"; import { streamLines } from "core/diff/util"; import OpenAI from "core/llm/llms/OpenAI"; -import Handlebars from "handlebars"; +import { logDevData } from "core/util/devdata"; import { v4 as uuidv4 } from "uuid"; import * as vscode from "vscode"; -import { ideProtocolClient } from "../activation/activate"; -import { TabAutocompleteModel, configHandler } from "../loadConfig"; +import { TabAutocompleteModel } from "../util/loadAutocompleteModel"; +import { AutocompletePromptBuilder } from "./autocompletePromptBuilder"; const statusBarItemText = (enabled: boolean | undefined) => enabled ? "$(check) Continue" : "$(circle-slash) Continue"; @@ -70,30 +70,6 @@ export function setupStatusBar( }); } -async function getDefinition( - uri: string, - line: number, - character: number -): Promise { - const definitions = (await vscode.commands.executeCommand( - "vscode.executeDefinitionProvider", - vscode.Uri.parse(uri), - new vscode.Position(line, character) - )) as any; - - if (definitions[0]?.targetRange) { - return { - filepath: uri, - content: await ideProtocolClient.readRangeInFile( - definitions[0].targetUri.fsPath, - definitions[0].targetRange - ), - }; - } - - return undefined; -} - export interface AutocompleteOutcome { accepted?: boolean; time: number; @@ -234,157 +210,6 @@ class GeneratorReuseManager { } } -async function getTabCompletion( - document: vscode.TextDocument, - pos: vscode.Position, - token: vscode.CancellationToken, - options: TabAutocompleteOptions -): Promise { - const startTime = Date.now(); - - // Filter - const lang = languageForFilepath(document.fileName); - const line = document.lineAt(pos).text; - for (const endOfLine of lang.endOfLine) { - if (line.endsWith(endOfLine) && pos.character >= endOfLine.length) { - return undefined; - } - } - - try { - // Model - const llm = await TabAutocompleteModel.get(); - if (llm instanceof OpenAI) { - llm.useLegacyCompletionsEndpoint = true; - } - if (!llm) return; - - // Prompt - const fullPrefix = document.getText( - new vscode.Range(new vscode.Position(0, 0), pos) - ); - const fullSuffix = document.getText( - new vscode.Range( - pos, - new vscode.Position(document.lineCount, Number.MAX_SAFE_INTEGER) - ) - ); - const lineBelowCursor = document.lineAt( - Math.min(pos.line + 1, document.lineCount - 1) - ).text; - const clipboardText = await vscode.env.clipboard.readText(); - const { prefix, suffix } = await constructAutocompletePrompt( - document.uri.toString(), - fullPrefix, - fullSuffix, - clipboardText, - lang, - getDefinition, - options - ); - - const { template, completionOptions } = options.template - ? { template: options.template, completionOptions: {} } - : getTemplateForModel(llm.model); - - const compiledTemplate = Handlebars.compile(template); - const prompt = compiledTemplate({ prefix, suffix }); - - // Completion - let completion = ""; - - const cache = await autocompleteCache; - const cachedCompletion = await cache.get(prompt); - let cacheHit = false; - if (cachedCompletion) { - // Cache - cacheHit = true; - completion = cachedCompletion; - } else { - setupStatusBar(true, true); - - // Try to reuse pending requests if what the user typed matches start of completion - let stop = [ - ...(completionOptions?.stop || []), - "\n\n", - "```", - ...lang.stopWords, - ]; - if (options.disableMultiLineCompletions) { - stop.unshift("\n"); - } - let generator = GeneratorReuseManager.getGenerator(prefix, () => - llm.streamComplete(prompt, { - ...completionOptions, - temperature: 0, - raw: true, - stop, - }) - ); - - // LLM - let cancelled = false; - const generatorWithCancellation = async function* () { - for await (const update of generator) { - if (token.isCancellationRequested) { - stopStatusBarLoading(); - cancelled = true; - return undefined; - } - yield update; - } - }; - const gen2 = onlyWhitespaceAfterEndOfLine( - generatorWithCancellation(), - lang.endOfLine - ); - const lineGenerator = streamWithNewLines(streamLines(gen2)); - const finalGenerator = stopAtSimilarLine(lineGenerator, lineBelowCursor); - for await (const update of finalGenerator) { - completion += update; - } - - if (cancelled) { - return undefined; - } - - // Don't return empty - if (completion.trim().length <= 0) { - return undefined; - } - - // Post-processing - completion = completion.trimEnd(); - } - - const time = Date.now() - startTime; - return { - time, - completion, - prompt, - modelProvider: llm.providerName, - modelName: llm.model, - completionOptions, - cacheHit, - }; - } catch (e: any) { - console.warn("Error generating autocompletion: ", e); - if (!ContinueCompletionProvider.errorsShown.has(e.message)) { - ContinueCompletionProvider.errorsShown.add(e.message); - vscode.window.showErrorMessage(e.message, "Documentation").then((val) => { - if (val === "Documentation") { - vscode.env.openExternal( - vscode.Uri.parse( - "https://continue.dev/docs/walkthroughs/tab-autocomplete" - ) - ); - } - }); - } - return undefined; - } -} - export class ContinueCompletionProvider implements vscode.InlineCompletionItemProvider { @@ -394,6 +219,172 @@ export class ContinueCompletionProvider public static errorsShown: Set = new Set(); + private readonly promptBuilder: AutocompletePromptBuilder; + + constructor( + private readonly configHandler: ConfigHandler, + private readonly ide: IDE, + private readonly tabAutocompleteModel: TabAutocompleteModel + ) { + this.promptBuilder = new AutocompletePromptBuilder(ide); + } + + async getTabCompletion( + document: vscode.TextDocument, + pos: vscode.Position, + token: vscode.CancellationToken, + options: TabAutocompleteOptions + ): Promise { + const startTime = Date.now(); + + // Filter + const lang = languageForFilepath(document.fileName); + const line = document.lineAt(pos).text; + for (const endOfLine of lang.endOfLine) { + if (line.endsWith(endOfLine) && pos.character >= endOfLine.length) { + return undefined; + } + } + + try { + // Model + const llm = await this.tabAutocompleteModel.get(); + if (llm instanceof OpenAI) { + llm.useLegacyCompletionsEndpoint = true; + } + if (!llm) return; + + // Prompt + const fullPrefix = document.getText( + new vscode.Range(new vscode.Position(0, 0), pos) + ); + const fullSuffix = document.getText( + new vscode.Range( + pos, + new vscode.Position(document.lineCount, Number.MAX_SAFE_INTEGER) + ) + ); + const lineBelowCursor = document.lineAt( + Math.min(pos.line + 1, document.lineCount - 1) + ).text; + const clipboardText = await vscode.env.clipboard.readText(); + const { prefix, suffix } = await constructAutocompletePrompt( + document.uri.toString(), + fullPrefix, + fullSuffix, + clipboardText, + lang, + this.promptBuilder.getDefinition, + options + ); + + const { template, completionOptions } = options.template + ? { template: options.template, completionOptions: {} } + : getTemplateForModel(llm.model); + + const compiledTemplate = Handlebars.compile(template); + const prompt = compiledTemplate({ prefix, suffix }); + + // Completion + let completion = ""; + + const cache = await autocompleteCache; + const cachedCompletion = await cache.get(prompt); + let cacheHit = false; + if (cachedCompletion) { + // Cache + cacheHit = true; + completion = cachedCompletion; + } else { + setupStatusBar(true, true); + + // Try to reuse pending requests if what the user typed matches start of completion + let stop = [ + ...(completionOptions?.stop || []), + "\n\n", + "```", + ...lang.stopWords, + ]; + if (options.disableMultiLineCompletions) { + stop.unshift("\n"); + } + let generator = GeneratorReuseManager.getGenerator(prefix, () => + llm.streamComplete(prompt, { + ...completionOptions, + temperature: 0, + raw: true, + stop, + }) + ); + + // LLM + let cancelled = false; + const generatorWithCancellation = async function* () { + for await (const update of generator) { + if (token.isCancellationRequested) { + stopStatusBarLoading(); + cancelled = true; + return undefined; + } + yield update; + } + }; + const gen2 = onlyWhitespaceAfterEndOfLine( + generatorWithCancellation(), + lang.endOfLine + ); + const lineGenerator = streamWithNewLines(streamLines(gen2)); + const finalGenerator = stopAtSimilarLine( + lineGenerator, + lineBelowCursor + ); + for await (const update of finalGenerator) { + completion += update; + } + + if (cancelled) { + return undefined; + } + + // Don't return empty + if (completion.trim().length <= 0) { + return undefined; + } + + // Post-processing + completion = completion.trimEnd(); + } + + const time = Date.now() - startTime; + return { + time, + completion, + prompt, + modelProvider: llm.providerName, + modelName: llm.model, + completionOptions, + cacheHit, + }; + } catch (e: any) { + console.warn("Error generating autocompletion: ", e); + if (!ContinueCompletionProvider.errorsShown.has(e.message)) { + ContinueCompletionProvider.errorsShown.add(e.message); + vscode.window + .showErrorMessage(e.message, "Documentation") + .then((val) => { + if (val === "Documentation") { + vscode.env.openExternal( + vscode.Uri.parse( + "https://continue.dev/docs/walkthroughs/tab-autocomplete" + ) + ); + } + }); + } + return undefined; + } + } + public async provideInlineCompletionItems( document: vscode.TextDocument, position: vscode.Position, @@ -405,7 +396,7 @@ export class ContinueCompletionProvider const uuid = uuidv4(); ContinueCompletionProvider.lastUUID = uuid; - const config = await configHandler.loadConfig(); + const config = await this.configHandler.loadConfig(); const options = { ...config.tabAutocompleteOptions, ...DEFAULT_AUTOCOMPLETE_OPTS, @@ -437,7 +428,7 @@ export class ContinueCompletionProvider } try { - const outcome = await getTabCompletion( + const outcome = await this.getTabCompletion( document, position, token, @@ -459,7 +450,7 @@ export class ContinueCompletionProvider const logRejectionTimeout = setTimeout(() => { // Wait 10 seconds, then assume it wasn't accepted outcome.accepted = false; - ideProtocolClient.logDevData("autocomplete", outcome); + logDevData("autocomplete", outcome); }, 10_000); return [ diff --git a/extensions/vscode/src/loadConfig.ts b/extensions/vscode/src/loadConfig.ts deleted file mode 100644 index 4f2ddc502..000000000 --- a/extensions/vscode/src/loadConfig.ts +++ /dev/null @@ -1,300 +0,0 @@ -import { ContinueConfig, ContinueRcJson, ILLM } from "core"; -import defaultConfig from "core/config/default"; -import { - finalToBrowserConfig, - intermediateToFinalConfig, - loadFullConfigNode, - serializedToIntermediateConfig, -} from "core/config/load"; -import Ollama from "core/llm/llms/Ollama"; -import { getConfigJsonPath } from "core/util/paths"; -import { Telemetry } from "core/util/posthog"; -import { http, https } from "follow-redirects"; -import * as fs from "fs"; -import { HttpProxyAgent } from "http-proxy-agent"; -import { HttpsProxyAgent } from "https-proxy-agent"; -import fetch from "node-fetch"; -import * as vscode from "vscode"; -import { ideProtocolClient } from "./activation/activate"; -import { debugPanelWebview, webviewRequest } from "./debugPanel"; -import { getUniqueId } from "./util/vscode"; -const tls = require("tls"); - -const outputChannel = vscode.window.createOutputChannel( - "Continue - LLM Prompt/Completion" -); - -class VsCodeConfigHandler { - savedConfig: ContinueConfig | undefined; - - reloadConfig() { - this.savedConfig = undefined; - this.loadConfig(); - } - - private async _getWorkspaceConfigs() { - const workspaceDirs = - vscode.workspace.workspaceFolders?.map((folder) => folder.uri) || []; - const configs: ContinueRcJson[] = []; - for (const workspaceDir of workspaceDirs) { - const files = await vscode.workspace.fs.readDirectory(workspaceDir); - for (const [filename, type] of files) { - if (type === vscode.FileType.File && filename === ".continuerc.json") { - const contents = await ideProtocolClient.readFile( - vscode.Uri.joinPath(workspaceDir, filename).fsPath - ); - configs.push(JSON.parse(contents)); - } - } - } - return configs; - } - - async loadConfig(): Promise { - try { - if (this.savedConfig) { - return this.savedConfig; - } - let workspaceConfigs: ContinueRcJson[] = []; - try { - workspaceConfigs = await this._getWorkspaceConfigs(); - } catch (e) { - console.warn("Failed to load workspace configs"); - } - this.savedConfig = await loadFullConfigNode( - ideProtocolClient.readFile, - workspaceConfigs - ); - this.savedConfig.allowAnonymousTelemetry = - this.savedConfig.allowAnonymousTelemetry && - vscode.workspace.getConfiguration("continue").get("telemetryEnabled"); - - // Update the sidebar panel - const browserConfig = finalToBrowserConfig(this.savedConfig); - debugPanelWebview?.postMessage({ type: "configUpdate", browserConfig }); - - // Setup telemetry only after (and if) we know it is enabled - await Telemetry.setup( - this.savedConfig.allowAnonymousTelemetry ?? true, - getUniqueId() - ); - - return this.savedConfig; - } catch (e) { - vscode.window - .showErrorMessage( - "Error loading config.json. Please check your config.json file: " + e, - "Open config.json" - ) - .then((selection) => { - if (selection === "Open config.json") { - vscode.workspace - .openTextDocument(getConfigJsonPath()) - .then((doc) => { - vscode.window.showTextDocument(doc); - }); - } - }); - return intermediateToFinalConfig( - serializedToIntermediateConfig(defaultConfig), - ideProtocolClient.readFile - ); - } - } -} - -export const configHandler = new VsCodeConfigHandler(); - -const TIMEOUT = 7200; // 7200 seconds = 2 hours - -function setupLlm(llm: ILLM): ILLM { - // Since we know this is happening in Node.js, we can add requestOptions through a custom agent - const ca = [...tls.rootCertificates]; - const customCerts = - typeof llm.requestOptions?.caBundlePath === "string" - ? [llm.requestOptions?.caBundlePath] - : llm.requestOptions?.caBundlePath; - if (customCerts) { - ca.push( - ...customCerts.map((customCert) => fs.readFileSync(customCert, "utf8")) - ); - } - - let timeout = (llm.requestOptions?.timeout || TIMEOUT) * 1000; // measured in ms - - const agentOptions = { - ca, - rejectUnauthorized: llm.requestOptions?.verifySsl, - timeout, - sessionTimeout: timeout, - keepAlive: true, - keepAliveMsecs: timeout, - }; - - const proxy = llm.requestOptions?.proxy; - - llm._fetch = async (input, init) => { - // Create agent - const protocol = new URL(input).protocol === "https:" ? https : http; - const agent = proxy - ? new URL(input).protocol === "https:" - ? new HttpsProxyAgent(proxy, agentOptions) - : new HttpProxyAgent(proxy, agentOptions) - : new protocol.Agent(agentOptions); - - const headers: { [key: string]: string } = - llm!.requestOptions?.headers || {}; - for (const [key, value] of Object.entries(init?.headers || {})) { - headers[key] = value as string; - } - - const resp = await fetch(input, { - ...init, - headers, - agent, - }); - - if (!resp.ok) { - let text = await resp.text(); - if (resp.status === 404 && !resp.url.includes("/v1")) { - if (text.includes("try pulling it first")) { - const model = JSON.parse(text).error.split(" ")[1].slice(1, -1); - text = `The model "${model}" was not found. To download it, run \`ollama run ${model}\`.`; - } else if (text.includes("/api/chat")) { - text = - "The /api/chat endpoint was not found. This may mean that you are using an older version of Ollama that does not support /api/chat. Upgrading to the latest version will solve the issue."; - } else { - text = - "This may mean that you forgot to add '/v1' to the end of your 'apiBase' in config.json."; - } - } - throw new Error( - `HTTP ${resp.status} ${resp.statusText} from ${resp.url}\n\n${text}` - ); - } - - return resp; - }; - - llm.writeLog = async (log: string) => { - outputChannel.appendLine( - "==========================================================================" - ); - outputChannel.appendLine( - "==========================================================================" - ); - - outputChannel.append(log); - }; - return llm; -} - -export async function llmFromTitle(title?: string): Promise { - let config = await configHandler.loadConfig(); - - if (title === undefined) { - const resp = await webviewRequest("getDefaultModelTitle"); - if (resp?.defaultModelTitle) { - title = resp.defaultModelTitle; - } - } - - let llm = title - ? config.models.find((llm) => llm.title === title) - : config.models[0]; - if (!llm) { - // Try to reload config - configHandler.reloadConfig(); - config = await configHandler.loadConfig(); - llm = config.models.find((llm) => llm.title === title); - if (!llm) { - throw new Error(`Unknown model ${title}`); - } - } - - return setupLlm(llm); -} - -export class TabAutocompleteModel { - private static _llm: ILLM | undefined; - private static defaultTag: string = "deepseek-coder:1.3b-base"; - - private static shownOllamaWarning: boolean = false; - private static shownDeepseekWarning: boolean = false; - - static clearLlm() { - TabAutocompleteModel._llm = undefined; - } - - static async getDefaultTabAutocompleteModel() { - const llm = new Ollama({ - model: TabAutocompleteModel.defaultTag, - }); - - // Check that deepseek is already downloaded - try { - const models = await llm.listModels(); - if (!models.includes(TabAutocompleteModel.defaultTag)) { - // Raise warning and explain how to download - if (!TabAutocompleteModel.shownDeepseekWarning) { - vscode.window - .showWarningMessage( - `Your local Ollama instance doesn't yet have DeepSeek Coder. To download this model, run \`ollama run deepseek-coder:1.3b-base\` (recommended). If you'd like to use a custom model for tab autocomplete, learn more in the docs`, - "Documentation", - "Copy Command" - ) - .then((value) => { - if (value === "Documentation") { - vscode.env.openExternal( - vscode.Uri.parse( - "https://continue.dev/docs/walkthroughs/tab-autocomplete" - ) - ); - } else if (value === "Copy Command") { - vscode.env.clipboard.writeText( - "ollama run deepseek-coder:1.3b-base" - ); - } - }); - TabAutocompleteModel.shownDeepseekWarning = true; - } - return undefined; - } - } catch (e) { - if (!TabAutocompleteModel.shownOllamaWarning) { - vscode.window - .showWarningMessage( - "Continue failed to connect to Ollama, which is used by default for tab-autocomplete. If you haven't downloaded it yet, you can do so at https://ollama.ai (recommended). If you'd like to use a custom model for tab autocomplete, learn more in the docs", - "Documentation" - ) - .then((value) => { - if (value === "Documentation") { - vscode.env.openExternal( - vscode.Uri.parse( - "https://continue.dev/docs/walkthroughs/tab-autocomplete" - ) - ); - } - }); - TabAutocompleteModel.shownOllamaWarning = true; - } - return undefined; - } - - return llm; - } - - static async get() { - if (!TabAutocompleteModel._llm) { - const config = await configHandler.loadConfig(); - if (config.tabAutocompleteModel) { - TabAutocompleteModel._llm = setupLlm(config.tabAutocompleteModel); - } else { - TabAutocompleteModel._llm = - await TabAutocompleteModel.getDefaultTabAutocompleteModel(); - } - } - - return TabAutocompleteModel._llm; - } -} diff --git a/extensions/vscode/src/suggestions.ts b/extensions/vscode/src/suggestions.ts index b5be341dd..e13cb42b4 100644 --- a/extensions/vscode/src/suggestions.ts +++ b/extensions/vscode/src/suggestions.ts @@ -1,8 +1,5 @@ import * as vscode from "vscode"; -import { openEditorAndRevealRange } from "./util/vscode"; -import { translate } from "./util/vscode"; -import { registerAllCodeLensProviders } from "./lang-server/codeLens"; -import { extensionContext, ideProtocolClient } from "./activation/activate"; +import { openEditorAndRevealRange, translate } from "./util/vscode"; export interface SuggestionRanges { oldRange: vscode.Range; @@ -125,9 +122,9 @@ export function rerenderDecorations(editorUri: string) { vscode.TextEditorRevealType.Default ); - if (extensionContext) { - registerAllCodeLensProviders(extensionContext); - } + // if (extensionContext) { + // registerAllCodeLensProviders(extensionContext); + // } } export function suggestionDownCommand() { diff --git a/extensions/vscode/src/continueIdeClient.ts b/extensions/vscode/src/util/ideUtils.ts similarity index 74% rename from extensions/vscode/src/continueIdeClient.ts rename to extensions/vscode/src/util/ideUtils.ts index dda054467..15f51fb7c 100644 --- a/extensions/vscode/src/continueIdeClient.ts +++ b/extensions/vscode/src/util/ideUtils.ts @@ -1,104 +1,24 @@ import { FileEdit, RangeInFile } from "core"; -import { getDevDataFilePath } from "core/util/paths"; -import { writeFileSync } from "fs"; -import * as path from "path"; +import path from "path"; import * as vscode from "vscode"; -import { extensionContext } from "./activation/activate"; -import { debugPanelWebview, getSidebarContent } from "./debugPanel"; -import { diffManager } from "./diff/horizontal"; -import { TabAutocompleteModel, configHandler } from "./loadConfig"; +import { VsCodeExtension } from "../extension/vscodeExtension"; import { SuggestionRanges, acceptSuggestionCommand, editorSuggestionsLocked, rejectSuggestionCommand, showSuggestion as showSuggestionInEditor, -} from "./suggestions"; -import { vsCodeIndexCodebase } from "./util/indexCodebase"; -import { defaultIgnoreFile, traverseDirectory } from "./util/traverseDirectory"; +} from "../suggestions"; +import { defaultIgnoreFile, traverseDirectory } from "./traverseDirectory"; import { getUniqueId, openEditorAndRevealRange, uriFromFilePath, -} from "./util/vscode"; +} from "./vscode"; const util = require("util"); -const exec = util.promisify(require("child_process").exec); - -const continueVirtualDocumentScheme = "continue"; - -class IdeProtocolClient { - private static PREVIOUS_BRANCH_FOR_WORKSPACE_DIR: { [dir: string]: string } = - {}; - - constructor(context: vscode.ExtensionContext) { - // Listen for file saving - vscode.workspace.onDidSaveTextDocument((event) => { - const filepath = event.uri.fsPath; - - if ( - filepath.endsWith(".continue/config.json") || - filepath.endsWith(".continue\\config.json") || - filepath.endsWith(".continue/config.ts") || - filepath.endsWith(".continue\\config.ts") || - filepath.endsWith(".continuerc.json") - ) { - configHandler.reloadConfig(); - TabAutocompleteModel.clearLlm(); - } else if ( - filepath.endsWith(".continueignore") || - filepath.endsWith(".gitignore") - ) { - debugPanelWebview?.postMessage({ - type: "updateEmbeddings", - }); - } - }); - - // Refresh index when branch is changed - this.getWorkspaceDirectories().forEach(async (dir) => { - const repo = await this.getRepo(vscode.Uri.file(dir)); - if (repo) { - repo.state.onDidChange(() => { - // args passed to this callback are always undefined, so keep track of previous branch - const currentBranch = repo?.state?.HEAD?.name; - if (currentBranch) { - if (IdeProtocolClient.PREVIOUS_BRANCH_FOR_WORKSPACE_DIR[dir]) { - if ( - currentBranch !== - IdeProtocolClient.PREVIOUS_BRANCH_FOR_WORKSPACE_DIR[dir] - ) { - // Trigger refresh of index only in this directory - vsCodeIndexCodebase([dir]); - } - } - - IdeProtocolClient.PREVIOUS_BRANCH_FOR_WORKSPACE_DIR[dir] = - currentBranch; - } - }); - } - }); - - // Register a content provider for the readonly virtual documents - const documentContentProvider = new (class - implements vscode.TextDocumentContentProvider - { - // emitter and its event - onDidChangeEmitter = new vscode.EventEmitter(); - onDidChange = this.onDidChangeEmitter.event; - - provideTextDocumentContent(uri: vscode.Uri): string { - return uri.query; - } - })(); - context.subscriptions.push( - vscode.workspace.registerTextDocumentContentProvider( - continueVirtualDocumentScheme, - documentContentProvider - ) - ); - } +const asyncExec = util.promisify(require("child_process").exec); +export class VsCodeIdeUtils { visibleMessages: Set = new Set(); async gotoDefinition( @@ -207,10 +127,6 @@ class IdeProtocolClient { ); } - async showDiff(filepath: string, replacement: string, step_index: number) { - await diffManager.writeDiff(filepath, replacement, step_index); - } - showMultiFileEdit(edits: FileEdit[]) { vscode.commands.executeCommand("workbench.action.closeAuxiliaryBar"); const panel = vscode.window.createWebviewPanel( @@ -218,12 +134,13 @@ class IdeProtocolClient { "Continue", vscode.ViewColumn.One ); - panel.webview.html = getSidebarContent( - extensionContext, - panel, - "/monaco", - edits - ); + // panel.webview.html = this.sidebar.getSidebarContent( + // extensionContext, + // panel, + // this.ide, + // "/monaco", + // edits + // ); } openFile(filepath: string, range?: vscode.Range) { @@ -244,9 +161,9 @@ class IdeProtocolClient { vscode.workspace .openTextDocument( vscode.Uri.parse( - `${continueVirtualDocumentScheme}:${encodeURIComponent( - name - )}?${encodeURIComponent(contents)}` + `${ + VsCodeExtension.continueVirtualDocumentScheme + }:${encodeURIComponent(name)}?${encodeURIComponent(contents)}` ) ) .then((doc) => { @@ -485,7 +402,7 @@ class IdeProtocolClient { let repo = await this.getRepo(forDirectory); if (repo?.state?.HEAD?.name === undefined) { try { - const { stdout } = await exec("git rev-parse --abbrev-ref HEAD", { + const { stdout } = await asyncExec("git rev-parse --abbrev-ref HEAD", { cwd: forDirectory.fsPath, }); return stdout?.trim() || "NONE"; @@ -538,30 +455,4 @@ class IdeProtocolClient { }); return rangeInFiles; } - - async runCommand(command: string) { - if (vscode.window.terminals.length) { - vscode.window.terminals[0].show(); - vscode.window.terminals[0].sendText(command, false); - } else { - const terminal = vscode.window.createTerminal(); - terminal.show(); - terminal.sendText(command, false); - } - } - - sendMainUserInput(input: string) { - debugPanelWebview?.postMessage({ - type: "userInput", - input, - }); - } - - logDevData(tableName: string, data: any) { - const filepath: string = getDevDataFilePath(tableName); - const jsonLine = JSON.stringify(data); - writeFileSync(filepath, `${jsonLine}\n`, { flag: "a" }); - } } - -export default IdeProtocolClient; diff --git a/extensions/vscode/src/util/indexCodebase.ts b/extensions/vscode/src/util/indexCodebase.ts deleted file mode 100644 index 50d541c1f..000000000 --- a/extensions/vscode/src/util/indexCodebase.ts +++ /dev/null @@ -1,100 +0,0 @@ -import { FullTextSearchCodebaseIndex } from "core/indexing/FullTextSearch"; -import { LanceDbIndex } from "core/indexing/LanceDbIndex"; -import { ChunkCodebaseIndex } from "core/indexing/chunk/ChunkCodebaseIndex"; -import { getComputeDeleteAddRemove } from "core/indexing/refreshIndex"; -import { CodebaseIndex, IndexTag, LastModifiedMap } from "core/indexing/types"; -import * as vscode from "vscode"; -import { ideProtocolClient } from "../activation/activate"; -import { debugPanelWebview } from "../debugPanel"; -import { VsCodeIde } from "../ideProtocol"; -import { configHandler } from "../loadConfig"; - -const vscodeGetStats = async ( - directory: string | undefined -): Promise => { - const files = await new VsCodeIde().listWorkspaceContents(directory); - const pathToLastModified: { [path: string]: number } = {}; - await Promise.all( - files.map(async (file) => { - let stat = await vscode.workspace.fs.stat(vscode.Uri.file(file)); - pathToLastModified[file] = stat.mtime; - }) - ); - - return pathToLastModified; -}; - -async function getIndexesToBuild(): Promise { - const ide = new VsCodeIde(); - const config = await configHandler.loadConfig(); - - const indexes = [ - new ChunkCodebaseIndex(ide.readFile), // Chunking must come first - new LanceDbIndex(config.embeddingsProvider, ide.readFile), - new FullTextSearchCodebaseIndex(), - ]; - - return indexes; -} - -export async function vsCodeIndexCodebase(workspaceDirs: string[]) { - const update = (progress: number, desc: string) => { - debugPanelWebview?.postMessage({ type: "indexProgress", progress, desc }); - }; - - const config = await configHandler.loadConfig(); - if (config.disableIndexing) { - return; - } - - const indexesToBuild = await getIndexesToBuild(); - - let completedDirs = 0; - - for (let directory of workspaceDirs) { - const stats = await vscodeGetStats(directory); - const branch = await ideProtocolClient.getBranch( - vscode.Uri.file(directory) - ); - let completedIndexes = 0; - - try { - for (let codebaseIndex of indexesToBuild) { - const tag: IndexTag = { - directory, - branch, - artifactId: codebaseIndex.artifactId, - }; - const [results, markComplete] = await getComputeDeleteAddRemove( - tag, - { ...stats }, - (filepath) => ideProtocolClient.readFile(filepath) - ); - - for await (let { progress, desc } of codebaseIndex.update( - tag, - results, - markComplete - )) { - update( - (completedDirs + - (completedIndexes + progress) / indexesToBuild.length) / - workspaceDirs.length, - desc - ); - } - completedIndexes++; - update( - (completedDirs + completedIndexes / indexesToBuild.length) / - workspaceDirs.length, - "Completed indexing " + codebaseIndex.artifactId - ); - } - } catch (e) { - console.warn("Error refreshing index: ", e); - } - - completedDirs++; - update(completedDirs / workspaceDirs.length, "Indexing Complete"); - } -} diff --git a/extensions/vscode/src/util/loadAutocompleteModel.ts b/extensions/vscode/src/util/loadAutocompleteModel.ts new file mode 100644 index 000000000..a720cad51 --- /dev/null +++ b/extensions/vscode/src/util/loadAutocompleteModel.ts @@ -0,0 +1,90 @@ +import { ILLM } from "core"; +import { ConfigHandler } from "core/config/handler"; +import Ollama from "core/llm/llms/Ollama"; +import * as vscode from "vscode"; + +export class TabAutocompleteModel { + private _llm: ILLM | undefined; + private defaultTag: string = "starcoder:3b"; + private defaultTagName: string = "Starcoder 3b"; + + private shownOllamaWarning: boolean = false; + private shownDeepseekWarning: boolean = false; + + private configHandler: ConfigHandler; + + constructor(configHandler: ConfigHandler) { + this.configHandler = configHandler; + } + + clearLlm() { + this._llm = undefined; + } + + async getDefaultTabAutocompleteModel() { + const llm = new Ollama({ + model: this.defaultTag, + }); + + try { + const models = await llm.listModels(); + if (!models.includes(this.defaultTag)) { + if (!this.shownDeepseekWarning) { + vscode.window + .showWarningMessage( + `Your local Ollama instance doesn't yet have ${this.defaultTagName}. To download this model, run \`ollama run ${this.defaultTag}\` (recommended). If you'd like to use a custom model for tab autocomplete, learn more in the docs`, + "Documentation", + "Copy Command" + ) + .then((value) => { + if (value === "Documentation") { + vscode.env.openExternal( + vscode.Uri.parse( + "https://continue.dev/docs/walkthroughs/tab-autocomplete" + ) + ); + } else if (value === "Copy Command") { + vscode.env.clipboard.writeText(`ollama run ${this.defaultTag}`); + } + }); + this.shownDeepseekWarning = true; + } + return undefined; + } + } catch (e) { + if (!this.shownOllamaWarning) { + vscode.window + .showWarningMessage( + "Continue failed to connect to Ollama, which is used by default for tab-autocomplete. If you haven't downloaded it yet, you can do so at https://ollama.ai (recommended). If you'd like to use a custom model for tab autocomplete, learn more in the docs", + "Documentation" + ) + .then((value) => { + if (value === "Documentation") { + vscode.env.openExternal( + vscode.Uri.parse( + "https://continue.dev/docs/walkthroughs/tab-autocomplete" + ) + ); + } + }); + this.shownOllamaWarning = true; + } + return undefined; + } + + return llm; + } + + async get() { + if (!this._llm) { + const config = await this.configHandler.loadConfig(); + if (config.tabAutocompleteModel) { + this._llm = this.configHandler.setupLlm(config.tabAutocompleteModel); + } else { + this._llm = await this.getDefaultTabAutocompleteModel(); + } + } + + return this._llm; + } +} diff --git a/extensions/vscode/src/webviewProtocol.ts b/extensions/vscode/src/webviewProtocol.ts new file mode 100644 index 000000000..1ff475435 --- /dev/null +++ b/extensions/vscode/src/webviewProtocol.ts @@ -0,0 +1,490 @@ +import { ContextItemId, IDE } from "core"; +import { ConfigHandler } from "core/config/handler"; +import { addModel, addOpenAIKey, deleteModel } from "core/config/util"; +import { indexDocs } from "core/indexing/docs"; +import TransformersJsEmbeddingsProvider from "core/indexing/embeddings/TransformersJsEmbeddingsProvider"; +import { logDevData } from "core/util/devdata"; +import historyManager from "core/util/history"; +import { Message } from "core/util/messenger"; +import { getConfigJsonPath } from "core/util/paths"; +import { WebviewProtocol } from "core/web/webviewProtocol"; +import { v4 as uuidv4 } from "uuid"; +import * as vscode from "vscode"; +import { Webview } from "vscode"; +import { showTutorial } from "./activation/activate"; +import { VerticalPerLineDiffManager } from "./diff/verticalPerLine/manager"; + +export class VsCodeWebviewProtocol { + listeners = new Map any)[]>(); + abortedMessageIds: Set = new Set(); + + private send(messageType: string, message: any, messageId?: string): string { + const id = messageId || uuidv4(); + this.webview.postMessage({ + type: messageType, + message, + messageId: messageId || id, + }); + return id; + } + + private on( + messageType: T, + handler: (message: Message) => WebviewProtocol[T][1] + ): void { + if (!this.listeners.has(messageType)) { + this.listeners.set(messageType, []); + } + this.listeners.get(messageType)?.push(handler); + } + + constructor( + private readonly webview: Webview, + private readonly ide: IDE, + private readonly configHandler: ConfigHandler, + private readonly verticalDiffManager: VerticalPerLineDiffManager + ) { + webview.onDidReceiveMessage(async (msg) => { + if (!msg.messageType || !msg.messageId) { + throw new Error("Invalid webview protocol msg: " + JSON.stringify(msg)); + } + + const respond = (message: any) => + this.send(msg.messageType, message, msg.messageId); + + const handlers = this.listeners.get(msg.messageType) || []; + for (const handler of handlers) { + try { + const response = await handler(msg); + respond(response || {}); + } catch (e: any) { + console.error( + "Error handling webview message: " + + JSON.stringify({ msg }, null, 2) + ); + + let message = `Continue error: ${e.message}`; + if (e.cause) { + if (e.cause.name === "ConnectTimeoutError") { + message = `Connection timed out. If you expect it to take a long time to connect, you can increase the timeout in config.json by setting "requestOptions": { "timeout": 10000 }. You can find the full config reference here: https://continue.dev/docs/reference/config`; + } else if (e.cause.code === "ECONNREFUSED") { + message = `Connection was refused. This likely means that there is no server running at the specified URL. If you are running your own server you may need to set the "apiBase" parameter in config.json. For example, you can set up an OpenAI-compatible server like here: https://continue.dev/docs/reference/Model%20Providers/openai#openai-compatible-servers--apis`; + } else { + message = `The request failed with "${e.cause.name}": ${e.cause.message}. If you're having trouble setting up Continue, please see the troubleshooting guide for help.`; + } + } + + vscode.window + .showErrorMessage(message, "Show Logs", "Troubleshooting") + .then((selection) => { + if (selection === "Show Logs") { + vscode.commands.executeCommand( + "workbench.action.toggleDevTools" + ); + } else if (selection === "Troubleshooting") { + vscode.env.openExternal( + vscode.Uri.parse("https://continue.dev/docs/troubleshooting") + ); + } + }); + } + } + respond({ done: true, data: {} }); + }); + + this.on("abort", (msg) => { + this.abortedMessageIds.add(msg.messageId); + }); + this.on("showFile", (msg) => { + this.ide.openFile(msg.data.filepath); + }); + this.on("openConfigJson", (msg) => { + this.ide.openFile(getConfigJsonPath()); + }); + this.on("readRangeInFile", (msg) => { + vscode.workspace.openTextDocument(msg.data.filepath).then((document) => { + let start = new vscode.Position(0, 0); + let end = new vscode.Position(5, 0); + let range = new vscode.Range(start, end); + + let contents = document.getText(range); + return contents; + }); + }); + this.on("toggleDevTools", (msg) => { + vscode.commands.executeCommand("workbench.action.toggleDevTools"); + vscode.commands.executeCommand("continue.viewLogs"); + }); + this.on("reloadWindow", (msg) => { + vscode.commands.executeCommand("workbench.action.reloadWindow"); + }); + this.on("focusEditor", (msg) => { + vscode.commands.executeCommand("workbench.action.focusActiveEditorGroup"); + }); + this.on("toggleFullScreen", (msg) => { + vscode.commands.executeCommand("continue.toggleFullScreen"); + }); + + // IDE + this.on("getDiff", async (msg) => { + return await ide.getDiff(); + }); + this.on("getSerializedConfig", async (msg) => { + return await configHandler.getSerializedConfig(); + }); + this.on("getTerminalContents", async (msg) => { + return await ide.getTerminalContents(); + }); + this.on("listWorkspaceContents", async (msg) => { + return await ide.listWorkspaceContents(); + }); + this.on("getWorkspaceDirs", async (msg) => { + return await ide.getWorkspaceDirs(); + }); + this.on("listFolders", async (msg) => { + return await ide.listFolders(); + }); + this.on("writeFile", async (msg) => { + return await ide.writeFile(msg.data.path, msg.data.contents); + }); + this.on("showVirtualFile", async (msg) => { + return await ide.showVirtualFile(msg.data.name, msg.data.content); + }); + this.on("getContinueDir", async (msg) => { + return await ide.getContinueDir(); + }); + this.on("openFile", async (msg) => { + return await ide.openFile(msg.data.path); + }); + this.on("runCommand", async (msg) => { + await ide.runCommand(msg.data.command); + }); + this.on("getSearchResults", async (msg) => { + return await ide.getSearchResults(msg.data.query); + }); + this.on("subprocess", async (msg) => { + return await ide.subprocess(msg.data.command); + }); + // History + this.on("history", (msg) => { + return historyManager.list(); + }); + this.on("saveSession", (msg) => { + historyManager.save(msg.data); + return {}; + }); + this.on("deleteSession", (msg) => { + historyManager.delete(msg.data); + return {}; + }); + this.on("loadSession", (msg) => { + return historyManager.load(msg.data); + }); + this.on("saveFile", async (msg) => { + return await ide.saveFile(msg.data.filepath); + }); + this.on("readFile", async (msg) => { + return await ide.readFile(msg.data.filepath); + }); + this.on("showDiff", async (msg) => { + return await ide.showDiff( + msg.data.filepath, + msg.data.newContents, + msg.data.stepIndex + ); + }); + + this.on("getProblems", async (msg) => { + return await ide.getProblems(msg.data.filepath); + }); + this.on("getBranch", async (msg) => { + const { dir } = msg.data; + return await ide.getBranch(dir); + }); + this.on("getOpenFiles", async (msg) => { + return await ide.getOpenFiles(); + }); + this.on("getPinnedFiles", async (msg) => { + return await ide.getPinnedFiles(); + }); + this.on("showLines", async (msg) => { + const { filepath, startLine, endLine } = msg.data; + return await ide.showLines(filepath, startLine, endLine); + }); + // Other + this.on("errorPopup", (msg) => { + vscode.window + .showErrorMessage(msg.data.message, "Show Logs") + .then((selection) => { + if (selection === "Show Logs") { + vscode.commands.executeCommand("workbench.action.toggleDevTools"); + } + }); + }); + this.on("logDevData", (msg) => { + logDevData(msg.data.tableName, msg.data.data); + }); + this.on("addModel", (msg) => { + const model = msg.data; + const newConfigString = addModel(model); + this.configHandler.reloadConfig(); + this.ide.openFile(getConfigJsonPath()); + + // Find the range where it was added and highlight + let lines = newConfigString.split("\n"); + let startLine; + let endLine; + for (let i = 0; i < lines.length; i++) { + let line = lines[i]; + + if (!startLine) { + if (line.trim() === `"title": "${model.title}",`) { + startLine = i - 1; + } + } else { + if (line.startsWith(" }")) { + endLine = i; + break; + } + } + } + + if (startLine && endLine) { + this.ide.showLines( + getConfigJsonPath(), + startLine, + endLine + // "#fff1" + ); + } + vscode.window.showInformationMessage( + "🎉 Your model has been successfully added to config.json. You can use this file to further edit its configuration." + ); + }); + this.on("deleteModel", (msg) => { + deleteModel(msg.data.title); + this.configHandler.reloadConfig(); + }); + this.on("addOpenAIKey", async (msg) => { + addOpenAIKey(msg.data.key); + this.configHandler.reloadConfig(); + }); + + async function* llmStreamComplete( + protocol: VsCodeWebviewProtocol, + msg: Message + ) { + const model = await protocol.configHandler.llmFromTitle(msg.data.title); + const gen = model.streamComplete( + msg.data.prompt, + msg.data.completionOptions + ); + let next = await gen.next(); + while (!next.done) { + if (protocol.abortedMessageIds.has(msg.messageId)) { + protocol.abortedMessageIds.delete(msg.messageId); + next = await gen.return({ completion: "", prompt: "" }); + break; + } + yield { content: next.value }; + next = await gen.next(); + } + + return { done: true, content: next.value }; + } + this.on("llmStreamComplete", (msg) => llmStreamComplete(this, msg)); + + async function* llmStreamChat( + protocol: VsCodeWebviewProtocol, + msg: Message + ) { + const model = await protocol.configHandler.llmFromTitle(msg.data.title); + const gen = model.streamChat( + msg.data.messages, + msg.data.completionOptions + ); + let next = await gen.next(); + while (!next.done) { + if (protocol.abortedMessageIds.has(msg.messageId)) { + protocol.abortedMessageIds.delete(msg.messageId); + next = await gen.return({ completion: "", prompt: "" }); + break; + } + yield { content: next.value.content }; + next = await gen.next(); + } + + return { done: true, content: next.value }; + } + this.on("llmStreamChat", (msg) => llmStreamChat(this, msg)); + this.on("llmComplete", async (msg) => { + const model = await this.configHandler.llmFromTitle(msg.data.title); + const completion = await model.complete( + msg.data.prompt, + msg.data.completionOptions + ); + return { content: completion }; + }); + + async function* runNodeJsSlashCommand( + protocol: VsCodeWebviewProtocol, + msg: Message + ) { + const { + input, + history, + modelTitle, + slashCommandName, + contextItems, + params, + historyIndex, + } = msg.data; + + const config = await protocol.configHandler.loadConfig(); + const llm = await protocol.configHandler.llmFromTitle(modelTitle); + const slashCommand = config.slashCommands?.find( + (sc) => sc.name === slashCommandName + ); + if (!slashCommand) { + throw new Error(`Unknown slash command ${slashCommandName}`); + } + + for await (const content of slashCommand.run({ + input, + history, + llm, + contextItems, + params, + ide, + addContextItem: (item) => { + protocol.webview?.postMessage({ + type: "addContextItem", + message: { item, historyIndex }, + }); + }, + })) { + if (content) { + yield { content }; + } + } + yield { done: true, content: "" }; + } + this.on("runNodeJsSlashCommand", (msg) => runNodeJsSlashCommand(this, msg)); + + this.on("loadSubmenuItems", async (msg) => { + const { title } = msg.data; + const config = await this.configHandler.loadConfig(); + const provider = config.contextProviders?.find( + (p) => p.description.title === title + ); + if (!provider) { + vscode.window.showErrorMessage( + `Unknown provider ${title}. Existing providers: ${config.contextProviders + ?.map((p) => p.description.title) + .join(", ")}` + ); + return []; + } + + try { + const items = await provider.loadSubmenuItems({ ide }); + return items; + } catch (e) { + vscode.window.showErrorMessage( + `Error loading submenu items from ${title}: ${e}` + ); + return []; + } + }); + + this.on("getContextItems", async (msg) => { + const { name, query, fullInput, selectedCode } = msg.data; + const config = await this.configHandler.loadConfig(); + const llm = await this.configHandler.llmFromTitle(); + const provider = config.contextProviders?.find( + (p) => p.description.title === name + ); + if (!provider) { + vscode.window.showErrorMessage( + `Unknown provider ${name}. Existing providers: ${config.contextProviders + ?.map((p) => p.description.title) + .join(", ")}` + ); + return []; + } + + try { + const id: ContextItemId = { + providerTitle: provider.description.title, + itemId: uuidv4(), + }; + const items = await provider.getContextItems(query, { + llm, + embeddingsProvider: config.embeddingsProvider, + fullInput, + ide, + selectedCode, + }); + return items.map((item) => ({ ...item, id })); + } catch (e) { + vscode.window.showErrorMessage( + `Error getting context items from ${name}: ${e}` + ); + return []; + } + }); + this.on("addDocs", (msg) => { + const { url, title } = msg.data; + const embeddingsProvider = new TransformersJsEmbeddingsProvider(); + vscode.window.withProgress( + { + location: vscode.ProgressLocation.Notification, + title: `Indexing ${title}`, + cancellable: false, + }, + async (progress) => { + for await (const update of indexDocs( + title, + new URL(url), + embeddingsProvider + )) { + progress.report({ + increment: update.progress, + message: update.desc, + }); + } + + vscode.window.showInformationMessage( + `🎉 Successfully indexed ${title}` + ); + + this.webview?.postMessage({ + type: "refreshSubmenuItems", + }); + } + ); + }); + this.on("applyToCurrentFile", (msg) => { + // Select the entire current file + const editor = vscode.window.activeTextEditor; + if (!editor) { + vscode.window.showErrorMessage("No active editor to apply edits to"); + return; + } + const document = editor.document; + const start = new vscode.Position(0, 0); + const end = new vscode.Position( + document.lineCount - 1, + document.lineAt(document.lineCount - 1).text.length + ); + editor.selection = new vscode.Selection(start, end); + + this.verticalDiffManager.streamEdit( + `The following code was suggested as an edit:\n\`\`\`\n${msg.data.text}\n\`\`\`\nPlease apply it to the previous code.` + ); + }); + this.on("showTutorial", (msg) => { + showTutorial(); + }); + } +} diff --git a/extensions/vscode/yarn.lock b/extensions/vscode/yarn.lock index 91fe0f08c..5c9af9f54 100644 --- a/extensions/vscode/yarn.lock +++ b/extensions/vscode/yarn.lock @@ -696,7 +696,12 @@ resolved "https://registry.npmjs.org/@jsdevtools/ono/-/ono-7.1.3.tgz" integrity sha512-4JQNk+3mVzK3xh2rqd6RB4J46qUR19azEHBneZyTZM+c456qOrbbM/5xcR8huNCCcbVt7+UmizG6GuUvPvKUYg== -"@lancedb/vectordb-darwin-arm64@*", "@lancedb/vectordb-darwin-arm64@0.4.8": +"@lancedb/vectordb-darwin-arm64@*": + version "0.4.9" + resolved "https://registry.npmjs.org/@lancedb/vectordb-darwin-arm64/-/vectordb-darwin-arm64-0.4.9.tgz" + integrity sha512-u56TXU0hvdLbknGwC7Ebza3/CUFeCTkoCy/sC6h0FtOGya+NV7jraAeXEwDzoZbfW08VYYxnp3TsCcpNU9lpTA== + +"@lancedb/vectordb-darwin-arm64@0.4.8": version "0.4.8" resolved "https://registry.npmjs.org/@lancedb/vectordb-darwin-arm64/-/vectordb-darwin-arm64-0.4.8.tgz" integrity sha512-FpnJaw7KmNdD/FtOw9AcmPL5P+L04AcnfPj9ZyEjN8iCwB/qaOGYgdfBv+EbEtfHIsqA12q/1BRduu9KdB6BIA== @@ -2315,9 +2320,13 @@ core-util-is@1.0.2: "@types/node-fetch" "^2.6.11" "@xenova/transformers" "^2.14.0" cheerio "^1.0.0-rc.12" + commander "^12.0.0" dotenv "^16.3.1" fastest-levenshtein "^1.0.16" + follow-redirects "^1.15.5" handlebars "^4.7.8" + http-proxy-agent "^7.0.1" + https-proxy-agent "^7.0.3" js-tiktoken "^1.0.8" llm-code-highlighter "^0.0.5" node-fetch "^3.3.2" diff --git a/gui/package-lock.json b/gui/package-lock.json index 2f544738a..84788575a 100644 --- a/gui/package-lock.json +++ b/gui/package-lock.json @@ -77,9 +77,13 @@ "@types/node-fetch": "^2.6.11", "@xenova/transformers": "^2.14.0", "cheerio": "^1.0.0-rc.12", + "commander": "^12.0.0", "dotenv": "^16.3.1", "fastest-levenshtein": "^1.0.16", + "follow-redirects": "^1.15.5", "handlebars": "^4.7.8", + "http-proxy-agent": "^7.0.1", + "https-proxy-agent": "^7.0.3", "js-tiktoken": "^1.0.8", "llm-code-highlighter": "^0.0.5", "node-fetch": "^3.3.2", @@ -97,6 +101,7 @@ "web-tree-sitter": "^0.20.8" }, "devDependencies": { + "@types/follow-redirects": "^1.14.4", "@types/handlebars": "^4.1.0", "@types/jest": "^29.5.11", "@types/jquery": "^3.5.29", diff --git a/gui/src/hooks/useSetup.ts b/gui/src/hooks/useSetup.ts index b91a9bf4a..da972b54c 100644 --- a/gui/src/hooks/useSetup.ts +++ b/gui/src/hooks/useSetup.ts @@ -3,7 +3,7 @@ import { useEffect } from "react"; import { setServerStatusMessage } from "../redux/slices/miscSlice"; import { isJetBrains, postToIde } from "../util/ide"; -import { ExtensionIde } from "core/ide/index"; +import { ideRequest } from "core/ide/messaging"; import { useSelector } from "react-redux"; import { VSC_THEME_COLOR_VARS } from "../components"; import { setVscMachineId } from "../redux/slices/configSlice"; @@ -17,7 +17,8 @@ import useChatHandler from "./useChatHandler"; function useSetup(dispatch: Dispatch) { const loadConfig = async () => { - dispatch(setConfig(await new ExtensionIde().getSerializedConfig())); + const config = await ideRequest("getSerializedConfig", {}); + dispatch(setConfig(config)); }; // Load config from the IDE diff --git a/gui/src/util/ide.ts b/gui/src/util/ide.ts index 5f8fd4393..4bbca782a 100644 --- a/gui/src/util/ide.ts +++ b/gui/src/util/ide.ts @@ -55,13 +55,6 @@ export async function ideRequest(type: string, data: any): Promise { }); } -export async function withProgress(title: string, fn: () => Promise) { - postToIde("withProgress", { title, done: false }); - return fn().finally(() => { - postToIde("withProgress", { title, done: true }); - }); -} - export function errorPopup(message: string) { postToIde("errorPopup", { message }); } From 7e314df38035eff20110f596baef6b68eb8baee9 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Wed, 14 Feb 2024 16:49:00 -0800 Subject: [PATCH 007/141] =?UTF-8?q?=F0=9F=9A=A7=20reverse=20webview=20prot?= =?UTF-8?q?ocol?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/indexing/indexCodebase.ts | 5 +- core/ipc/messenger.ts | 3 +- core/util/history.ts | 2 +- core/web/message.ts | 137 -------------- core/web/webviewProtocol.ts | 102 ++++++++--- extensions/vscode/src/commands.ts | 55 +++--- extensions/vscode/src/debugPanel.ts | 5 +- extensions/vscode/src/diff/horizontal.ts | 14 +- .../vscode/src/extension/vscodeExtension.ts | 42 +++-- extensions/vscode/src/webviewProtocol.ts | 64 ++++--- gui/src/components/Layout.tsx | 56 +++--- gui/src/components/dialogs/AddDocsDialog.tsx | 2 +- .../components/mainInput/ContextItemsPeek.tsx | 8 +- .../components/mainInput/ContinueInputBox.tsx | 20 +-- gui/src/components/mainInput/TipTapEditor.tsx | 170 +++++++++++------- gui/src/components/mainInput/resolveInput.ts | 11 +- .../components/markdown/CodeBlockToolbar.tsx | 2 +- .../markdown/CodeSnippetPreview.tsx | 4 +- gui/src/hooks/useChatHandler.ts | 3 +- gui/src/hooks/useHistory.tsx | 40 ++--- gui/src/hooks/useNavigationListener.tsx | 60 ++++--- gui/src/hooks/useSetup.ts | 85 ++++----- gui/src/hooks/useSubmenuContextProviders.tsx | 24 +-- gui/src/hooks/useVscTheme.ts | 19 +- gui/src/hooks/useWebviewListener.ts | 25 +++ gui/src/pages/gui.tsx | 21 +-- gui/src/pages/help.tsx | 6 +- gui/src/pages/history.tsx | 4 +- gui/src/pages/modelconfig.tsx | 9 +- gui/src/pages/models.tsx | 18 +- gui/src/pages/monaco.tsx | 5 +- gui/src/util/ide.ts | 141 +++++++++++++-- {core/web => gui/src/util}/webviewIde.ts | 38 ++-- 33 files changed, 627 insertions(+), 573 deletions(-) delete mode 100644 core/web/message.ts create mode 100644 gui/src/hooks/useWebviewListener.ts rename {core/web => gui/src/util}/webviewIde.ts (72%) diff --git a/core/indexing/indexCodebase.ts b/core/indexing/indexCodebase.ts index f4797b0b8..32c85f2b9 100644 --- a/core/indexing/indexCodebase.ts +++ b/core/indexing/indexCodebase.ts @@ -19,7 +19,10 @@ export class CodebaseIndexer { const indexes = [ new ChunkCodebaseIndex(this.ide.readFile.bind(this.ide)), // Chunking must come first - new LanceDbIndex(config.embeddingsProvider, this.ide.readFile), + new LanceDbIndex( + config.embeddingsProvider, + this.ide.readFile.bind(this.ide) + ), new FullTextSearchCodebaseIndex(), ]; diff --git a/core/ipc/messenger.ts b/core/ipc/messenger.ts index 54819140a..b2b851cdb 100644 --- a/core/ipc/messenger.ts +++ b/core/ipc/messenger.ts @@ -7,6 +7,7 @@ import { PersistedSessionInfo, RangeInFile, SerializedContinueConfig, + SessionInfo, } from ".."; import { Message } from "../util/messenger"; @@ -29,7 +30,7 @@ export type Protocol = { abort: [undefined, void]; // History - "history/list": [undefined, PersistedSessionInfo[]]; + "history/list": [undefined, SessionInfo[]]; "history/delete": [{ id: string }, void]; "history/load": [{ id: string }, PersistedSessionInfo]; "history/save": [PersistedSessionInfo, void]; diff --git a/core/util/history.ts b/core/util/history.ts index 777af8805..bab04c4f8 100644 --- a/core/util/history.ts +++ b/core/util/history.ts @@ -3,7 +3,7 @@ import { PersistedSessionInfo, SessionInfo } from ".."; import { getSessionFilePath, getSessionsListPath } from "./paths"; class HistoryManager { - list(): PersistedSessionInfo[] { + list(): SessionInfo[] { const filepath = getSessionsListPath(); if (!fs.existsSync(filepath)) { return []; diff --git a/core/web/message.ts b/core/web/message.ts deleted file mode 100644 index f0e9416cd..000000000 --- a/core/web/message.ts +++ /dev/null @@ -1,137 +0,0 @@ -import { v4 as uuidv4 } from "uuid"; -import { ChatMessage, LLMFullCompletionOptions, LLMReturnValue } from ".."; -interface vscode { - postMessage(message: any): vscode; -} - -declare const vscode: any; - -function _postToIde(type: string, data: any) { - if (typeof vscode === "undefined") { - if (localStorage.getItem("ide") === "jetbrains") { - if ((window as any).postIntellijMessage === undefined) { - console.log( - "Unable to send message: postIntellijMessage is undefined. ", - type, - data - ); - throw new Error("postIntellijMessage is undefined"); - } - (window as any).postIntellijMessage?.(type, data); - return; - } else { - console.log("Unable to send message: vscode is undefined. ", type, data); - return; - } - } - vscode.postMessage({ - type, - ...data, - }); -} - -export function postToIde(type: string, data: any, attempt: number = 0) { - try { - _postToIde(type, data); - } catch (error) { - if (attempt < 5) { - console.log(`Attempt ${attempt} failed. Retrying...`); - setTimeout( - () => postToIde(type, data, attempt + 1), - Math.pow(2, attempt) * 1000 - ); - } else { - console.error("Max attempts reached. Message could not be sent.", error); - } - } -} - -export async function ideRequest(type: string, message: any): Promise { - // message, messageId, and type are passed back and forth - const messageId = uuidv4(); - - return new Promise((resolve) => { - const handler = (event: any) => { - if (event.data.messageId === messageId) { - window.removeEventListener("message", handler); - resolve(event.data.message); - } - }; - window.addEventListener("message", handler); - - postToIde(type, { message, messageId }); - }); -} - -export async function* ideStreamRequest( - type: string, - message: any, - cancelToken?: AbortSignal -): AsyncGenerator { - const messageId = uuidv4(); - - postToIde(type, { message, messageId }); - - let buffer = ""; - let index = 0; - let done = false; - let returnVal = undefined; - - const handler = (event: any) => { - if (event.data.messageId === messageId) { - if (event.data.message.done) { - window.removeEventListener("message", handler); - done = true; - returnVal = event.data.message.data; - } else { - buffer += event.data.message.content; - } - } - }; - window.addEventListener("message", handler); - - cancelToken?.addEventListener("abort", () => { - postToIde("abort", { messageId }); - }); - - while (!done) { - if (buffer.length > index) { - const chunk = buffer.slice(index); - index = buffer.length; - yield chunk; - } - await new Promise((resolve) => setTimeout(resolve, 50)); - } - - if (buffer.length > index) { - const chunk = buffer.slice(index); - index = buffer.length; - yield chunk; - } - - return returnVal; -} - -export async function* llmStreamChat( - modelTitle: string, - cancelToken: AbortSignal | undefined, - messages: ChatMessage[], - options: LLMFullCompletionOptions = {} -): AsyncGenerator { - const gen = ideStreamRequest( - "llmStreamChat", - { - messages, - title: modelTitle, - completionOptions: options, - }, - cancelToken - ); - - let next = await gen.next(); - while (!next.done) { - yield { role: "user", content: next.value }; - next = await gen.next(); - } - return { prompt: next.value?.prompt, completion: next.value?.completion }; -} diff --git a/core/web/webviewProtocol.ts b/core/web/webviewProtocol.ts index c0bf50deb..cc005b7ef 100644 --- a/core/web/webviewProtocol.ts +++ b/core/web/webviewProtocol.ts @@ -1,36 +1,49 @@ import { ChatMessage, - CompletionOptions, - ContextItem, ContextItemWithId, ContextSubmenuItem, + ContinueRcJson, DiffLine, + LLMFullCompletionOptions, MessageContent, ModelDescription, PersistedSessionInfo, Problem, + Range, RangeInFile, + SessionInfo, } from ".."; +import { RangeInFileWithContents } from "../commands/util"; import { BrowserSerializedContinueConfig } from "../config/load"; export type WebviewProtocol = { - abort: [undefined, void]; - listWorkspaceContents: [undefined, Promise]; - getWorkspaceDirs: [undefined, Promise]; - listFolders: [undefined, Promise]; + abort: [string, void]; + onLoad: [ + undefined, + { + windowId: string; + serverUrl: string; + workspacePaths: string[]; + vscMachineId: string; + vscMediaUrl: string; + }, + ]; + listWorkspaceContents: [undefined, string[]]; + getWorkspaceDirs: [undefined, string[]]; + listFolders: [undefined, string[]]; writeFile: [{ path: string; contents: string }, void]; showVirtualFile: [{ name: string; content: string }, void]; - getContinueDir: [undefined, Promise]; + getContinueDir: [undefined, string]; openFile: [{ path: string }, void]; runCommand: [{ command: string }, void]; - getSearchResults: [{ query: string }, Promise]; - subprocess: [{ command: string }, Promise<[string, string]>]; - history: [undefined, PersistedSessionInfo[]]; + getSearchResults: [{ query: string }, string]; + subprocess: [{ command: string }, [string, string]]; + history: [undefined, SessionInfo[]]; saveSession: [PersistedSessionInfo, void]; deleteSession: [string, void]; loadSession: [string, PersistedSessionInfo]; saveFile: [{ filepath: string }, void]; - readFile: [{ filepath: string }, Promise]; + readFile: [{ filepath: string }, string]; showDiff: [ { filepath: string; newContents: string; stepIndex: number }, void, @@ -44,10 +57,10 @@ export type WebviewProtocol = { }, void, ]; - getProblems: [{ filepath: string }, Promise]; - getBranch: [{ dir: string }, Promise]; - getOpenFiles: [undefined, Promise]; - getPinnedFiles: [undefined, Promise]; + getProblems: [{ filepath: string }, Problem[]]; + getBranch: [{ dir: string }, string]; + getOpenFiles: [undefined, string[]]; + getPinnedFiles: [undefined, string[]]; showLines: [{ filepath: string; startLine: number; endLine: number }, void]; errorPopup: [{ message: string }, void]; logDevData: [{ tableName: string; data: any }, void]; @@ -55,20 +68,28 @@ export type WebviewProtocol = { deleteModel: [{ title: string }, void]; addOpenAIKey: [{ key: string }, void]; llmStreamComplete: [ - { title: string; prompt: string; completionOptions: CompletionOptions }, + { + title: string; + prompt: string; + completionOptions: LLMFullCompletionOptions; + }, AsyncGenerator<{ content: string; done?: boolean }>, ]; llmStreamChat: [ { title: string; messages: ChatMessage[]; - completionOptions: CompletionOptions; + completionOptions: LLMFullCompletionOptions; }, AsyncGenerator<{ content: MessageContent; done?: boolean }>, ]; llmComplete: [ - { title: string; prompt: string; completionOptions: CompletionOptions }, - Promise<{ content: string }>, + { + title: string; + prompt: string; + completionOptions: LLMFullCompletionOptions; + }, + { content: string }, ]; runNodeJsSlashCommand: [ { @@ -82,7 +103,7 @@ export type WebviewProtocol = { }, AsyncGenerator<{ content: string; done?: boolean }>, ]; - loadSubmenuItems: [{ title: string }, Promise]; + loadSubmenuItems: [{ title: string }, ContextSubmenuItem[]]; getContextItems: [ { name: string; @@ -90,19 +111,50 @@ export type WebviewProtocol = { fullInput: string; selectedCode: RangeInFile[]; }, - Promise, + ContextItemWithId[], ]; addDocs: [{ url: string; title: string }, void]; applyToCurrentFile: [{ text: string }, void]; showTutorial: [undefined, void]; showFile: [{ filepath: string }, void]; openConfigJson: [undefined, void]; - readRangeInFile: [{ filepath: string }, void]; + readRangeInFile: [{ filepath: string; range: Range }, string]; toggleDevTools: [undefined, void]; reloadWindow: [undefined, void]; focusEditor: [undefined, void]; toggleFullScreen: [undefined, void]; - getDiff: [undefined, Promise]; - getSerializedConfig: [undefined, Promise]; - getTerminalContents: [undefined, Promise]; + getDiff: [undefined, string]; + getSerializedConfig: [undefined, BrowserSerializedContinueConfig]; + getTerminalContents: [undefined, string]; + isTelemetryEnabled: [undefined, boolean]; + getUniqueId: [undefined, string]; + getWorkspaceConfigs: [undefined, ContinueRcJson[]]; + getDefaultModelTitle: [{ defaultModelTitle: string }, void]; +}; + +export type ReverseWebviewProtocol = { + setInactive: [undefined, void]; + configUpdate: [undefined, void]; + submitMessage: [{ message: any }, void]; // any -> JSONContent from TipTap + addContextItem: [ + { + historyIndex: number; + item: ContextItemWithId; + }, + void, + ]; + getDefaultModelTitle: [undefined, string]; + newSessionWithPrompt: [{ prompt: string }, void]; + userInput: [{ input: string }, void]; + focusContinueInput: [undefined, void]; + focusContinueInputWithoutClear: [undefined, void]; + focusContinueInputWithNewSession: [undefined, void]; + highlightedCode: [{ rangeInFileWithContents: RangeInFileWithContents }, void]; + addModel: [undefined, void]; + openSettings: [undefined, void]; + viewHistory: [undefined, void]; + indexProgress: [{ progress: number; desc: string }, void]; + newSession: [undefined, void]; + refreshSubmenuItems: [undefined, void]; + setTheme: [{ theme: any }, void]; }; diff --git a/extensions/vscode/src/commands.ts b/extensions/vscode/src/commands.ts index ab1f83e28..307d35dfb 100644 --- a/extensions/vscode/src/commands.ts +++ b/extensions/vscode/src/commands.ts @@ -10,10 +10,11 @@ import { ContinueGUIWebviewViewProvider } from "./debugPanel"; import { DiffManager } from "./diff/horizontal"; import { VerticalPerLineDiffManager } from "./diff/verticalPerLine/manager"; import { AutocompleteOutcome } from "./lang-server/completionProvider"; +import { VsCodeWebviewProtocol } from "./webviewProtocol"; function addHighlightedCodeToContext( edit: boolean, - webview: vscode.Webview | undefined + webviewProtocol: VsCodeWebviewProtocol | undefined ) { const editor = vscode.window.activeTextEditor; if (editor) { @@ -36,10 +37,8 @@ function addHighlightedCodeToContext( }, }; - webview?.postMessage({ - type: "highlightedCode", + webviewProtocol?.request("highlightedCode", { rangeInFileWithContents, - edit, }); } } @@ -47,7 +46,7 @@ function addHighlightedCodeToContext( async function addEntireFileToContext( filepath: vscode.Uri, edit: boolean, - debugPanelWebview: vscode.Webview | undefined + webviewProtocol: VsCodeWebviewProtocol | undefined ) { // If a directory, add all files in the directory const stat = await vscode.workspace.fs.stat(filepath); @@ -58,7 +57,7 @@ async function addEntireFileToContext( addEntireFileToContext( vscode.Uri.joinPath(filepath, filename), edit, - debugPanelWebview + webviewProtocol ); } } @@ -82,10 +81,8 @@ async function addEntireFileToContext( }, }; - debugPanelWebview?.postMessage({ - type: "highlightedCode", + webviewProtocol?.request("highlightedCode", { rangeInFileWithContents, - edit, }); } @@ -126,29 +123,28 @@ const commandsMap: ( verticalDiffManager.acceptRejectVerticalDiffBlock(false, filepath, index); }, "continue.quickFix": async (message: string, code: string, edit: boolean) => { - sidebar.webview?.postMessage({ - type: "newSessionWithPrompt", + sidebar.webviewProtocol?.request("newSessionWithPrompt", { prompt: `${ edit ? "/edit " : "" }${code}\n\nHow do I fix this problem in the above code?: ${message}`, }); + if (!edit) { vscode.commands.executeCommand("continue.continueGUIView.focus"); } }, "continue.focusContinueInput": async () => { vscode.commands.executeCommand("continue.continueGUIView.focus"); - sidebar.webview?.postMessage({ - type: "focusContinueInput", - }); - addHighlightedCodeToContext(false, sidebar.webview); + sidebar.webviewProtocol?.request("focusContinueInput", undefined); + addHighlightedCodeToContext(false, sidebar.webviewProtocol); }, "continue.focusContinueInputWithoutClear": async () => { vscode.commands.executeCommand("continue.continueGUIView.focus"); - sidebar.webview?.postMessage({ - type: "focusContinueInputWithoutClear", - }); - addHighlightedCodeToContext(true, sidebar.webview); + sidebar.webviewProtocol?.request( + "focusContinueInputWithoutClear", + undefined + ); + addHighlightedCodeToContext(true, sidebar.webviewProtocol); }, "continue.toggleAuxiliaryBar": () => { vscode.commands.executeCommand("workbench.action.toggleAuxiliaryBar"); @@ -267,8 +263,7 @@ const commandsMap: ( "continue.debugTerminal": async () => { const terminalContents = await ide.getTerminalContents(); vscode.commands.executeCommand("continue.continueGUIView.focus"); - sidebar.webview?.postMessage({ - type: "userInput", + sidebar.webviewProtocol?.request("userInput", { input: `I got the following error, can you please help explain how to fix it?\n\n${terminalContents}`, }); }, @@ -281,15 +276,11 @@ const commandsMap: ( // Commands without keyboard shortcuts "continue.addModel": () => { vscode.commands.executeCommand("continue.continueGUIView.focus"); - sidebar.webview?.postMessage({ - type: "addModel", - }); + sidebar.webviewProtocol?.request("addModel", undefined); }, "continue.openSettingsUI": () => { vscode.commands.executeCommand("continue.continueGUIView.focus"); - sidebar.webview?.postMessage({ - type: "openSettings", - }); + sidebar.webviewProtocol?.request("openSettings", undefined); }, "continue.sendMainUserInput": (text: string) => { sidebar.sendMainUserInput(text); @@ -323,14 +314,10 @@ const commandsMap: ( ide.runCommand(text); }, "continue.newSession": () => { - sidebar.webview?.postMessage({ - type: "newSession", - }); + sidebar.webviewProtocol?.request("newSession", undefined); }, "continue.viewHistory": () => { - sidebar.webview?.postMessage({ - type: "viewHistory", - }); + sidebar.webviewProtocol?.request("viewHistory", undefined); }, "continue.toggleFullScreen": () => { // Check if full screen is already open by checking open tabs @@ -392,7 +379,7 @@ const commandsMap: ( vscode.commands.executeCommand("continue.continueGUIView.focus"); for (const uri of uris) { - addEntireFileToContext(uri, false, sidebar.webview); + addEntireFileToContext(uri, false, sidebar.webviewProtocol); } }, "continue.updateAllReferences": (filepath: vscode.Uri) => { diff --git a/extensions/vscode/src/debugPanel.ts b/extensions/vscode/src/debugPanel.ts index 15e2c6cbe..16927c040 100644 --- a/extensions/vscode/src/debugPanel.ts +++ b/extensions/vscode/src/debugPanel.ts @@ -10,6 +10,7 @@ export class ContinueGUIWebviewViewProvider implements vscode.WebviewViewProvider { public static readonly viewType = "continue.continueGUIView"; + public webviewProtocol?: VsCodeWebviewProtocol; resolveWebviewView( webviewView: vscode.WebviewView, @@ -121,11 +122,11 @@ export class ContinueGUIWebviewViewProvider vscode.workspace.onDidChangeConfiguration((e) => { if (e.affectsConfiguration("workbench.colorTheme")) { // Send new theme to GUI to update embedded Monaco themes - this._webview?.postMessage({ type: "setTheme", theme: getTheme() }); + this.webviewProtocol?.request("setTheme", { theme: getTheme() }); } }); - const webviewProtocol = new VsCodeWebviewProtocol( + this.webviewProtocol = new VsCodeWebviewProtocol( panel.webview, ide, configHandler, diff --git a/extensions/vscode/src/diff/horizontal.ts b/extensions/vscode/src/diff/horizontal.ts index f07dec3e8..c268f58b1 100644 --- a/extensions/vscode/src/diff/horizontal.ts +++ b/extensions/vscode/src/diff/horizontal.ts @@ -5,6 +5,7 @@ import * as path from "path"; import * as vscode from "vscode"; import { getMetaKeyLabel, getPlatform } from "../util/util"; import { uriFromFilePath } from "../util/vscode"; +import { VsCodeWebviewProtocol } from "../webviewProtocol"; interface DiffInfo { originalFilepath: string; @@ -47,16 +48,9 @@ export class DiffManager { } } - webview: vscode.Webview | undefined; - private readonly extensionContext: vscode.ExtensionContext; - - constructor( - webview: vscode.Webview | undefined, - extensionContext: vscode.ExtensionContext - ) { - this.webview = webview; - this.extensionContext = extensionContext; + webviewProtocol: VsCodeWebviewProtocol | undefined; + constructor(private readonly extensionContext: vscode.ExtensionContext) { this.setupDirectory(); // Listen for file closes, and if it's a diff file, clean up @@ -303,7 +297,7 @@ export class DiffManager { } // Stop the step at step_index in case it is still streaming - this.webview?.postMessage({ type: "setInactive" }); + this.webviewProtocol?.request("setInactive", undefined); vscode.workspace.textDocuments .find((doc) => doc.uri.fsPath === newFilepath) diff --git a/extensions/vscode/src/extension/vscodeExtension.ts b/extensions/vscode/src/extension/vscodeExtension.ts index ec429f945..43197d90b 100644 --- a/extensions/vscode/src/extension/vscodeExtension.ts +++ b/extensions/vscode/src/extension/vscodeExtension.ts @@ -13,6 +13,7 @@ import { setupStatusBar, } from "../lang-server/completionProvider"; import { TabAutocompleteModel } from "../util/loadAutocompleteModel"; +import { VsCodeWebviewProtocol } from "../webviewProtocol"; export class VsCodeExtension { private configHandler: ConfigHandler; @@ -24,9 +25,10 @@ export class VsCodeExtension { private indexer: CodebaseIndexer; private diffManager: DiffManager; private verticalDiffManager: VerticalPerLineDiffManager; + private webviewProtocol: VsCodeWebviewProtocol; constructor(context: vscode.ExtensionContext) { - this.diffManager = new DiffManager(undefined, context); + this.diffManager = new DiffManager(context); this.ide = new VsCodeIde(this.diffManager); this.configHandler = new ConfigHandler(this.ide); this.verticalDiffManager = new VerticalPerLineDiffManager( @@ -42,7 +44,20 @@ export class VsCodeExtension { this.extensionContext, this.verticalDiffManager ); - this.diffManager.webview = this.sidebar.webview; + + // Sidebar + context.subscriptions.push( + vscode.window.registerWebviewViewProvider( + "continue.continueGUIView", + this.sidebar, + { + webviewOptions: { retainContextWhenHidden: true }, + } + ) + ); + this.webviewProtocol = this.sidebar.webviewProtocol!; + + this.diffManager.webviewProtocol = this.webviewProtocol; this.indexer = new CodebaseIndexer(this.configHandler, this.ide); // CodeLens @@ -74,17 +89,6 @@ export class VsCodeExtension { ); } - // Sidebar - context.subscriptions.push( - vscode.window.registerWebviewViewProvider( - "continue.continueGUIView", - this.sidebar, - { - webviewOptions: { retainContextWhenHidden: true }, - } - ) - ); - // Commands registerAllCommands( context, @@ -116,9 +120,7 @@ export class VsCodeExtension { filepath.endsWith(".continueignore") || filepath.endsWith(".gitignore") ) { - this.sidebar.webview?.postMessage({ - type: "updateEmbeddings", - }); + // Update embeddings! (TODO) } }); @@ -172,12 +174,8 @@ export class VsCodeExtension { private PREVIOUS_BRANCH_FOR_WORKSPACE_DIR: { [dir: string]: string } = {}; private async refreshCodebaseIndex(dirs: string[]) { - for await (const { progress, desc } of this.indexer.refresh(dirs)) { - this.sidebar.webview?.postMessage({ - type: "indexProgress", - progress, - desc, - }); + for await (const update of this.indexer.refresh(dirs)) { + this.webviewProtocol.request("indexProgress", update); } } } diff --git a/extensions/vscode/src/webviewProtocol.ts b/extensions/vscode/src/webviewProtocol.ts index 1ff475435..44c93282d 100644 --- a/extensions/vscode/src/webviewProtocol.ts +++ b/extensions/vscode/src/webviewProtocol.ts @@ -7,10 +7,12 @@ import { logDevData } from "core/util/devdata"; import historyManager from "core/util/history"; import { Message } from "core/util/messenger"; import { getConfigJsonPath } from "core/util/paths"; -import { WebviewProtocol } from "core/web/webviewProtocol"; +import { + ReverseWebviewProtocol, + WebviewProtocol, +} from "core/web/webviewProtocol"; import { v4 as uuidv4 } from "uuid"; import * as vscode from "vscode"; -import { Webview } from "vscode"; import { showTutorial } from "./activation/activate"; import { VerticalPerLineDiffManager } from "./diff/verticalPerLine/manager"; @@ -18,19 +20,21 @@ export class VsCodeWebviewProtocol { listeners = new Map any)[]>(); abortedMessageIds: Set = new Set(); - private send(messageType: string, message: any, messageId?: string): string { + private send(messageType: string, data: any, messageId?: string): string { const id = messageId || uuidv4(); this.webview.postMessage({ - type: messageType, - message, - messageId: messageId || id, + messageType, + data, + messageId: id, }); return id; } private on( messageType: T, - handler: (message: Message) => WebviewProtocol[T][1] + handler: ( + message: Message + ) => Promise | WebviewProtocol[T][1] ): void { if (!this.listeners.has(messageType)) { this.listeners.set(messageType, []); @@ -39,7 +43,7 @@ export class VsCodeWebviewProtocol { } constructor( - private readonly webview: Webview, + readonly webview: vscode.Webview, private readonly ide: IDE, private readonly configHandler: ConfigHandler, private readonly verticalDiffManager: VerticalPerLineDiffManager @@ -101,15 +105,17 @@ export class VsCodeWebviewProtocol { this.on("openConfigJson", (msg) => { this.ide.openFile(getConfigJsonPath()); }); - this.on("readRangeInFile", (msg) => { - vscode.workspace.openTextDocument(msg.data.filepath).then((document) => { - let start = new vscode.Position(0, 0); - let end = new vscode.Position(5, 0); - let range = new vscode.Range(start, end); + this.on("readRangeInFile", async (msg) => { + return await vscode.workspace + .openTextDocument(msg.data.filepath) + .then((document) => { + let start = new vscode.Position(0, 0); + let end = new vscode.Position(5, 0); + let range = new vscode.Range(start, end); - let contents = document.getText(range); - return contents; - }); + let contents = document.getText(range); + return contents; + }); }); this.on("toggleDevTools", (msg) => { vscode.commands.executeCommand("workbench.action.toggleDevTools"); @@ -171,11 +177,9 @@ export class VsCodeWebviewProtocol { }); this.on("saveSession", (msg) => { historyManager.save(msg.data); - return {}; }); this.on("deleteSession", (msg) => { historyManager.delete(msg.data); - return {}; }); this.on("loadSession", (msg) => { return historyManager.load(msg.data); @@ -357,9 +361,9 @@ export class VsCodeWebviewProtocol { params, ide, addContextItem: (item) => { - protocol.webview?.postMessage({ - type: "addContextItem", - message: { item, historyIndex }, + protocol.request("addContextItem", { + item, + historyIndex, }); }, })) { @@ -458,9 +462,7 @@ export class VsCodeWebviewProtocol { `🎉 Successfully indexed ${title}` ); - this.webview?.postMessage({ - type: "refreshSubmenuItems", - }); + this.request("refreshSubmenuItems", undefined); } ); }); @@ -487,4 +489,18 @@ export class VsCodeWebviewProtocol { showTutorial(); }); } + + public request( + messageType: T, + data: ReverseWebviewProtocol[T][0] + ): Promise { + const messageId = uuidv4(); + return new Promise((resolve) => { + this.send(messageType, data, messageId); + const disposable = this.webview.onDidReceiveMessage((msg) => { + resolve(msg); + disposable.dispose(); + }); + }); + } } diff --git a/gui/src/components/Layout.tsx b/gui/src/components/Layout.tsx index a8fb8de28..a8237e46d 100644 --- a/gui/src/components/Layout.tsx +++ b/gui/src/components/Layout.tsx @@ -2,7 +2,6 @@ import { Cog6ToothIcon, QuestionMarkCircleIcon, } from "@heroicons/react/24/outline"; -import { postToIde } from "core/ide/messaging"; import { useEffect, useState } from "react"; import { useDispatch, useSelector } from "react-redux"; import { Outlet, useLocation, useNavigate } from "react-router-dom"; @@ -13,6 +12,7 @@ import { vscForeground, vscInputBackground, } from "."; +import { useWebviewListener } from "../hooks/useWebviewListener"; import { defaultModelSelector } from "../redux/selectors/modelSelectors"; import { setBottomMessage, @@ -21,6 +21,7 @@ import { } from "../redux/slices/uiStateSlice"; import { RootStore } from "../redux/store"; import { getFontSize, isMetaEquivalentKeyPressed } from "../util"; +import { postToIde } from "../util/ide"; import HeaderButtonWithText from "./HeaderButtonWithText"; import TextDialog from "./dialogs"; import IndexingProgressBar from "./loaders/IndexingProgressBar"; @@ -146,30 +147,35 @@ const Layout = () => { }; }, [timeline]); - useEffect(() => { - const handler = (event: any) => { - if (event.data.type === "addModel") { - navigate("/models"); - } else if (event.data.type === "openSettings") { - // navigate("/settings"); - postToIde("openConfigJson", {}); - } else if (event.data.type === "viewHistory") { - // Toggle the history page / main page - if (location.pathname === "/history") { - navigate("/"); - } else { - navigate("/history"); - } - } else if (event.data.type === "indexProgress") { - setIndexingProgress(event.data.progress); - setIndexingTask(event.data.desc); + useWebviewListener( + "addModel", + async () => { + navigate("/models"); + }, + [navigate] + ); + + useWebviewListener("openSettings", async () => { + postToIde("openConfigJson", undefined); + }); + + useWebviewListener( + "viewHistory", + async () => { + // Toggle the history page / main page + if (location.pathname === "/history") { + navigate("/"); + } else { + navigate("/history"); } - }; - window.addEventListener("message", handler); - return () => { - window.removeEventListener("message", handler); - }; - }, [location, navigate]); + }, + [location, navigate] + ); + + useWebviewListener("indexProgress", async (data) => { + setIndexingProgress(data.progress); + setIndexingTask(data.desc); + }); const [indexingProgress, setIndexingProgress] = useState(1); const [indexingTask, setIndexingTask] = useState("Indexing Codebase"); @@ -259,7 +265,7 @@ const Layout = () => { { // navigate("/settings"); - postToIde("openConfigJson", {}); + postToIde("openConfigJson", undefined); }} text="Config" > diff --git a/gui/src/components/dialogs/AddDocsDialog.tsx b/gui/src/components/dialogs/AddDocsDialog.tsx index 54a158078..76cf0953f 100644 --- a/gui/src/components/dialogs/AddDocsDialog.tsx +++ b/gui/src/components/dialogs/AddDocsDialog.tsx @@ -1,4 +1,3 @@ -import { postToIde } from "core/ide/messaging"; import { usePostHog } from "posthog-js/react"; import React, { useContext, useLayoutEffect } from "react"; import { useDispatch } from "react-redux"; @@ -6,6 +5,7 @@ import styled from "styled-components"; import { Button, Input } from ".."; import { SubmenuContextProvidersContext } from "../../App"; import { setShowDialog } from "../../redux/slices/uiStateSlice"; +import { postToIde } from "../../util/ide"; const GridDiv = styled.div` display: grid; diff --git a/gui/src/components/mainInput/ContextItemsPeek.tsx b/gui/src/components/mainInput/ContextItemsPeek.tsx index 877da274b..51c2a7c5f 100644 --- a/gui/src/components/mainInput/ContextItemsPeek.tsx +++ b/gui/src/components/mainInput/ContextItemsPeek.tsx @@ -1,7 +1,6 @@ import { ChevronDownIcon, ChevronUpIcon } from "@heroicons/react/24/outline"; import { ContextItemWithId } from "core"; import { contextItemToRangeInFileWithContents } from "core/commands/util"; -import { ExtensionIde } from "core/ide"; import React from "react"; import styled from "styled-components"; import { @@ -10,6 +9,7 @@ import { vscBackground, vscForeground, } from ".."; +import { WebviewIde } from "../../util/webviewIde"; import FileIcon from "../FileIcon"; const ContextItemDiv = styled.div` @@ -49,16 +49,16 @@ const ContextItemsPeek = (props: ContextItemsPeekProps) => { ) { if (contextItem.name.includes(" (") && contextItem.name.endsWith(")")) { const rif = contextItemToRangeInFileWithContents(contextItem); - new ExtensionIde().showLines( + new WebviewIde().showLines( rif.filepath, rif.range.start.line, rif.range.end.line ); } else { - new ExtensionIde().openFile(contextItem.description); + new WebviewIde().openFile(contextItem.description); } } else { - new ExtensionIde().showVirtualFile(contextItem.name, contextItem.content); + new WebviewIde().showVirtualFile(contextItem.name, contextItem.content); } } diff --git a/gui/src/components/mainInput/ContinueInputBox.tsx b/gui/src/components/mainInput/ContinueInputBox.tsx index 15c31a564..836e9aa3b 100644 --- a/gui/src/components/mainInput/ContinueInputBox.tsx +++ b/gui/src/components/mainInput/ContinueInputBox.tsx @@ -1,9 +1,10 @@ import { JSONContent } from "@tiptap/react"; import { ContextItemWithId } from "core"; -import { useEffect, useState } from "react"; +import { useState } from "react"; import { useDispatch, useSelector } from "react-redux"; import styled, { keyframes } from "styled-components"; import { defaultBorderRadius, vscBackground } from ".."; +import { useWebviewListener } from "../../hooks/useWebviewListener"; import { selectSlashCommands } from "../../redux/selectors"; import { newSession } from "../../redux/slices/stateSlice"; import { RootStore } from "../../redux/store"; @@ -70,19 +71,10 @@ function ContinueInputBox(props: ContinueInputBoxProps) { const [editorState, setEditorState] = useState(props.editorState); - useEffect(() => { - const listener = (e) => { - if (e.data.type === "newSessionWithPrompt") { - dispatch(newSession()); - setEditorState(e.data.prompt); - } - }; - - window.addEventListener("message", listener); - return () => { - window.removeEventListener("message", listener); - }; - }, []); + useWebviewListener("newSessionWithPrompt", async (data) => { + dispatch(newSession()); + setEditorState(data.prompt as any); // any -> JSONContent + }); return (
{ + if (!props.isMainInput) { + return; + } + editor?.commands.insertContent(data.input); + onEnterRef.current(editor.getJSON()); + }, + [editor, onEnterRef.current, props.isMainInput] + ); + + useWebviewListener( + "focusContinueInput", + async (data) => { + if (!props.isMainInput) { + return; + } + if (historyLength > 0) { + saveSession(); + } + editor?.commands.focus("end"); + }, + [historyLength, saveSession, editor, props.isMainInput] + ); + + useWebviewListener( + "focusContinueInputWithoutClear", + async () => { + if (!props.isMainInput) { + return; + } + editor?.commands.focus("end"); + }, + [editor, props.isMainInput] + ); + + useWebviewListener( + "focusContinueInputWithNewSession", + async () => { + if (!props.isMainInput) { + return; + } + saveSession(); + editor?.commands.focus("end"); + }, + [editor, props.isMainInput] + ); + + useWebviewListener( + "highlightedCode", + async (data) => { + if (!props.isMainInput || !editor) { + return; + } + if (!ignoreHighlightedCode) { + const rif: RangeInFile & { contents: string } = + data.rangeInFileWithContents; + const basename = getBasename(rif.filepath); + const item: ContextItemWithId = { + content: rif.contents, + name: `${basename} (${rif.range.start.line + 1}-${ + rif.range.end.line + 1 + })`, + description: rif.filepath, + id: { + providerTitle: "code", + itemId: rif.filepath, + }, + }; + + let index = 0; + for (const el of editor.getJSON().content) { + if (el.type === "codeBlock") { + index += 2; + } else { + break; + } + } + editor + .chain() + .insertContentAt(index, { + type: "codeBlock", + attrs: { + item, + }, + }) + .run(); + setTimeout(() => { + editor.commands.focus("end"); + }, 100); + } + setIgnoreHighlightedCode(false); + }, + [ + editor, + props.isMainInput, + historyLength, + ignoreHighlightedCode, + props.isMainInput, + ] + ); + useEffect(() => { if (!props.isMainInput) { return; @@ -377,68 +481,6 @@ function TipTapEditor(props: TipTapEditorProps) { if (editor && document.hasFocus()) { editor.commands.focus(); } - const handler = async (event: any) => { - if (!editor) return; - - if (event.data.type === "userInput") { - const input = event.data.input; - editor.commands.insertContent(input); - onEnterRef.current(editor.getJSON()); - } else if (event.data.type === "focusContinueInput") { - if (historyLength > 0) { - saveSession(); - } - editor.commands.focus("end"); - } else if (event.data.type === "focusContinueInputWithoutClear") { - editor.commands.focus("end"); - } else if (event.data.type === "focusContinueInputWithNewSession") { - saveSession(); - editor.commands.focus("end"); - } else if (event.data.type === "highlightedCode") { - if (!ignoreHighlightedCode) { - const rif: RangeInFile & { contents: string } = - event.data.rangeInFileWithContents; - const basename = getBasename(rif.filepath); - const item: ContextItemWithId = { - content: rif.contents, - name: `${basename} (${rif.range.start.line + 1}-${ - rif.range.end.line + 1 - })`, - description: rif.filepath, - id: { - providerTitle: "code", - itemId: rif.filepath, - }, - }; - - let index = 0; - for (const el of editor.getJSON().content) { - if (el.type === "codeBlock") { - index += 2; - } else { - break; - } - } - editor - .chain() - .insertContentAt(index, { - type: "codeBlock", - attrs: { - item, - }, - }) - .run(); - setTimeout(() => { - editor.commands.focus("end"); - }, 100); - } - setIgnoreHighlightedCode(false); - } - }; - window.addEventListener("message", handler); - return () => { - window.removeEventListener("message", handler); - }; }, [editor, props.isMainInput, historyLength, ignoreHighlightedCode]); const [showDragOverMsg, setShowDragOverMsg] = useState(false); diff --git a/gui/src/components/mainInput/resolveInput.ts b/gui/src/components/mainInput/resolveInput.ts index d9ee02ea2..79830852a 100644 --- a/gui/src/components/mainInput/resolveInput.ts +++ b/gui/src/components/mainInput/resolveInput.ts @@ -5,10 +5,10 @@ import { MessagePart, RangeInFile, } from "core"; -import { ExtensionIde } from "core/ide"; -import { ideRequest } from "core/ide/messaging"; import { stripImages } from "core/llm/countTokens"; import { getBasename } from "core/util"; +import { ideRequest } from "../../util/ide"; +import { WebviewIde } from "../../util/webviewIde"; interface MentionAttrs { label: string; @@ -87,7 +87,7 @@ async function resolveEditorContent( let contextItemsText = ""; let contextItems: ContextItemWithId[] = []; - const ide = new ExtensionIde(); + const ide = new WebviewIde(); for (const item of contextItemAttrs) { if (item.itemType === "file") { // This is a quick way to resolve @file references @@ -110,10 +110,7 @@ async function resolveEditorContent( fullInput: stripImages(parts), selectedCode, }; - const { items: resolvedItems } = await ideRequest( - "getContextItems", - data - ); + const resolvedItems = await ideRequest("getContextItems", data); contextItems.push(...resolvedItems); for (const resolvedItem of resolvedItems) { contextItemsText += resolvedItem.content + "\n\n"; diff --git a/gui/src/components/markdown/CodeBlockToolbar.tsx b/gui/src/components/markdown/CodeBlockToolbar.tsx index 97aa7ede0..30556dbad 100644 --- a/gui/src/components/markdown/CodeBlockToolbar.tsx +++ b/gui/src/components/markdown/CodeBlockToolbar.tsx @@ -3,10 +3,10 @@ import { ClipboardIcon, PlayIcon, } from "@heroicons/react/24/outline"; -import { postToIde } from "core/ide/messaging"; import { useState } from "react"; import styled from "styled-components"; import { vscEditorBackground } from ".."; +import { postToIde } from "../../util/ide"; import HeaderButtonWithText from "../HeaderButtonWithText"; const TopDiv = styled.div` diff --git a/gui/src/components/markdown/CodeSnippetPreview.tsx b/gui/src/components/markdown/CodeSnippetPreview.tsx index 5116cc9b0..0ce562239 100644 --- a/gui/src/components/markdown/CodeSnippetPreview.tsx +++ b/gui/src/components/markdown/CodeSnippetPreview.tsx @@ -5,13 +5,13 @@ import { XMarkIcon, } from "@heroicons/react/24/outline"; import { ContextItemWithId } from "core"; -import { ExtensionIde } from "core/ide"; import { getMarkdownLanguageTagForFile } from "core/util"; import React from "react"; import styled from "styled-components"; import { defaultBorderRadius, lightGray, vscEditorBackground } from ".."; import { getFontSize } from "../../util"; import { postToIde } from "../../util/ide"; +import { WebviewIde } from "../../util/webviewIde"; import FileIcon from "../FileIcon"; import HeaderButtonWithText from "../HeaderButtonWithText"; import StyledMarkdownPreview from "./StyledMarkdownPreview"; @@ -90,7 +90,7 @@ function CodeSnippetPreview(props: CodeSnippetPreviewProps) { .split("(")[1] .split(")")[0] .split("-"); - new ExtensionIde().showLines( + new WebviewIde().showLines( props.item.description, parseInt(lines[0]) - 1, parseInt(lines[1]) - 1 diff --git a/gui/src/hooks/useChatHandler.ts b/gui/src/hooks/useChatHandler.ts index 7f1191ceb..9c0190a28 100644 --- a/gui/src/hooks/useChatHandler.ts +++ b/gui/src/hooks/useChatHandler.ts @@ -9,7 +9,6 @@ import { MessageContent, SlashCommandDescription, } from "core"; -import { ideStreamRequest, llmStreamChat } from "core/ide/messaging"; import { constructMessages } from "core/llm/constructMessages"; import { stripImages } from "core/llm/countTokens"; import { usePostHog } from "posthog-js/react"; @@ -26,7 +25,7 @@ import { streamUpdate, } from "../redux/slices/stateSlice"; import { RootStore } from "../redux/store"; -import { errorPopup } from "../util/ide"; +import { errorPopup, ideStreamRequest, llmStreamChat } from "../util/ide"; function useChatHandler(dispatch: Dispatch) { const posthog = usePostHog(); diff --git a/gui/src/hooks/useHistory.tsx b/gui/src/hooks/useHistory.tsx index 486070bf0..ce54059d8 100644 --- a/gui/src/hooks/useHistory.tsx +++ b/gui/src/hooks/useHistory.tsx @@ -1,12 +1,13 @@ import { Dispatch } from "@reduxjs/toolkit"; import { PersistedSessionInfo, SessionInfo } from "core"; -import { ideRequest, llmStreamChat } from "core/ide/messaging"; + import { llmCanGenerateInParallel } from "core/llm/autodetect"; import { stripImages } from "core/llm/countTokens"; import { useSelector } from "react-redux"; import { defaultModelSelector } from "../redux/selectors/modelSelectors"; import { newSession } from "../redux/slices/stateSlice"; import { RootStore } from "../redux/store"; +import { ideRequest } from "../util/ide"; function truncateText(text: string, maxLength: number) { if (text.length > maxLength) { @@ -23,7 +24,7 @@ function useHistory(dispatch: Dispatch) { ); async function getHistory(): Promise { - return await ideRequest("history", {}); + return await ideRequest("history", undefined); } async function saveSession() { @@ -46,24 +47,23 @@ function useHistory(dispatch: Dispatch) { !disableSessionTitles && llmCanGenerateInParallel(defaultModel.provider, defaultModel.model) ) { - let fullContent = ""; - for await (const { content } of llmStreamChat( - defaultModel.title, - undefined, - [ - ...stateCopy.history.map((item) => item.message), - { - role: "user", - content: - "Give a maximum 40 character title to describe this conversation so far. The title should help me recall the conversation if I look for it later. DO NOT PUT QUOTES AROUND THE TITLE", - }, - ], - { maxTokens: 20 } - )) { - fullContent += content; - } - - title = stripImages(fullContent); + // let fullContent = ""; + // for await (const { content } of llmStreamChat( + // defaultModel.title, + // undefined, + // [ + // ...stateCopy.history.map((item) => item.message), + // { + // role: "user", + // content: + // "Give a maximum 40 character title to describe this conversation so far. The title should help me recall the conversation if I look for it later. DO NOT PUT QUOTES AROUND THE TITLE", + // }, + // ], + // { maxTokens: 20 } + // )) { + // fullContent += content; + // } + // title = stripImages(fullContent); } const sessionInfo: PersistedSessionInfo = { diff --git a/gui/src/hooks/useNavigationListener.tsx b/gui/src/hooks/useNavigationListener.tsx index cd5e1ffb1..c7e3cb6e6 100644 --- a/gui/src/hooks/useNavigationListener.tsx +++ b/gui/src/hooks/useNavigationListener.tsx @@ -1,7 +1,9 @@ -import { useEffect } from 'react'; -import { useNavigate, useLocation } from 'react-router-dom'; +import { ReverseWebviewProtocol } from "core/web/webviewProtocol"; +import { useLocation, useNavigate } from "react-router-dom"; +import { v4 as uuidv4 } from "uuid"; +import { useWebviewListener } from "./useWebviewListener"; -const openGUITypes = [ +const openGUITypes: (keyof ReverseWebviewProtocol)[] = [ "highlightedCode", "newSessionWithPrompt", "focusContinueInput", @@ -13,30 +15,36 @@ export const useNavigationListener = () => { const navigate = useNavigate(); const location = useLocation(); - useEffect(() => { - const listener = (e) => { - if(openGUITypes.includes(e.data.type)) { - + for (const messageType of openGUITypes) { + useWebviewListener( + messageType, + async (data) => { navigate("/"); setTimeout(() => { - window.postMessage(e.data, "*"); + window.postMessage( + { + messageType, + data, + messageId: uuidv4(), + }, + "*" + ); }, 200); + }, + [navigate] + ); + } + + useWebviewListener( + "viewHistory", + async () => { + // Toggle the history page / main page + if (location.pathname === "/history") { + navigate("/"); + } else { + navigate("/history"); } - - if(e.data.type === "viewHistory") { - // Toggle the history page / main page - if (location.pathname === "/history") { - navigate("/"); - } else { - navigate("/history"); - } - } - }; - - window.addEventListener("message", listener); - - return () => { - window.removeEventListener("message", listener); - }; - }, [navigate]); -} + }, + [location, navigate] + ); +}; diff --git a/gui/src/hooks/useSetup.ts b/gui/src/hooks/useSetup.ts index da972b54c..ffe408d7e 100644 --- a/gui/src/hooks/useSetup.ts +++ b/gui/src/hooks/useSetup.ts @@ -1,9 +1,5 @@ import { Dispatch } from "@reduxjs/toolkit"; import { useEffect } from "react"; -import { setServerStatusMessage } from "../redux/slices/miscSlice"; -import { isJetBrains, postToIde } from "../util/ide"; - -import { ideRequest } from "core/ide/messaging"; import { useSelector } from "react-redux"; import { VSC_THEME_COLOR_VARS } from "../components"; import { setVscMachineId } from "../redux/slices/configSlice"; @@ -13,11 +9,13 @@ import { setInactive, } from "../redux/slices/stateSlice"; import { RootStore } from "../redux/store"; +import { ideRequest, isJetBrains } from "../util/ide"; import useChatHandler from "./useChatHandler"; +import { useWebviewListener } from "./useWebviewListener"; function useSetup(dispatch: Dispatch) { const loadConfig = async () => { - const config = await ideRequest("getSerializedConfig", {}); + const config = await ideRequest("getSerializedConfig", undefined); dispatch(setConfig(config)); }; @@ -31,7 +29,15 @@ function useSetup(dispatch: Dispatch) { dispatch(setInactive()); // Tell JetBrains the webview is ready - postToIde("onLoad", {}); + ideRequest("onLoad", undefined).then((msg) => { + (window as any).windowId = msg.windowId; + (window as any).serverUrl = msg.serverUrl; + (window as any).workspacePaths = msg.workspacePaths; + (window as any).vscMachineId = msg.vscMachineId; + (window as any).vscMediaUrl = msg.vscMediaUrl; + dispatch(setVscMachineId(msg.vscMachineId)); + // dispatch(setVscMediaUrl(msg.vscMediaUrl)); + }); }, []); const { streamResponse } = useChatHandler(dispatch); @@ -41,47 +47,34 @@ function useSetup(dispatch: Dispatch) { ); // IDE event listeners - useEffect(() => { - const eventListener = (event: any) => { - switch (event.data.type) { - case "onLoad": - (window as any).windowId = event.data.windowId; - (window as any).serverUrl = event.data.serverUrl; - (window as any).workspacePaths = event.data.workspacePaths; - (window as any).vscMachineId = event.data.vscMachineId; - (window as any).vscMediaUrl = event.data.vscMediaUrl; - dispatch(setVscMachineId(event.data.vscMachineId)); - // dispatch(setVscMediaUrl(event.data.vscMediaUrl)); + useWebviewListener("setInactive", async () => { + dispatch(setInactive()); + }); - break; - case "serverStatus": - dispatch(setServerStatusMessage(event.data.message)); - break; - case "setInactive": - dispatch(setInactive()); - break; - case "configUpdate": - loadConfig(); - break; - case "submitMessage": - streamResponse(event.data.message); - break; - case "addContextItem": - dispatch( - addContextItemsAtIndex({ - index: event.data.message.historyIndex, - contextItems: [event.data.message.item], - }) - ); - break; - case "getDefaultModelTitle": - postToIde("getDefaultModelTitle", { defaultModelTitle }); - break; - } - }; - window.addEventListener("message", eventListener); - return () => window.removeEventListener("message", eventListener); - }, [defaultModelTitle]); + useWebviewListener("configUpdate", async () => { + loadConfig(); + }); + + useWebviewListener("submitMessage", async (data) => { + streamResponse(data.message); + }); + + useWebviewListener("addContextItem", async (data) => { + dispatch( + addContextItemsAtIndex({ + index: data.historyIndex, + contextItems: [data.item], + }) + ); + }); + + useWebviewListener( + "getDefaultModelTitle", + async () => { + return defaultModelTitle; + }, + [defaultModelTitle] + ); // Save theme colors to local storage for immediate loading in JetBrains useEffect(() => { diff --git a/gui/src/hooks/useSubmenuContextProviders.tsx b/gui/src/hooks/useSubmenuContextProviders.tsx index baf7b39f7..6cf22efa4 100644 --- a/gui/src/hooks/useSubmenuContextProviders.tsx +++ b/gui/src/hooks/useSubmenuContextProviders.tsx @@ -1,11 +1,12 @@ import { ContextSubmenuItem } from "core"; -import { ExtensionIde } from "core/ide"; -import { ideRequest } from "core/ide/messaging"; import { getBasename, getLastNPathParts } from "core/util"; import MiniSearch, { SearchResult } from "minisearch"; import { useEffect, useState } from "react"; import { useSelector } from "react-redux"; import { selectContextProviderDescriptions } from "../redux/selectors"; +import { ideRequest } from "../util/ide"; +import { WebviewIde } from "../util/webviewIde"; +import { useWebviewListener } from "./useWebviewListener"; const MINISEARCH_OPTIONS = { prefix: true, @@ -29,7 +30,7 @@ function useSubmenuContextProviders() { const [loaded, setLoaded] = useState(false); async function getOpenFileItems() { - const openFiles = await new ExtensionIde().getOpenFiles(); + const openFiles = await new WebviewIde().getOpenFiles(); return openFiles.map((file) => { return { id: file, @@ -40,18 +41,9 @@ function useSubmenuContextProviders() { }); } - useEffect(() => { - const handler = (e) => { - if (e.data.type !== "refreshSubmenuItems") { - return; - } - setLoaded(false); - }; - window.addEventListener("message", handler); - return () => { - window.removeEventListener("message", handler); - }; - }, []); + useWebviewListener("refreshSubmenuItems", async (data) => { + setLoaded(true); + }); function addItem(providerTitle: string, item: ContextSubmenuItem) { if (!minisearches[providerTitle]) { @@ -82,7 +74,7 @@ function useSubmenuContextProviders() { fields: ["title"], storeFields: ["id", "title", "description"], }); - const { items } = await ideRequest("loadSubmenuItems", { + const items = await ideRequest("loadSubmenuItems", { title: description.title, }); minisearch.addAll(items); diff --git a/gui/src/hooks/useVscTheme.ts b/gui/src/hooks/useVscTheme.ts index 6b1e86ea0..1eb268308 100644 --- a/gui/src/hooks/useVscTheme.ts +++ b/gui/src/hooks/useVscTheme.ts @@ -1,4 +1,5 @@ -import { useEffect, useState } from "react"; +import { useState } from "react"; +import { useWebviewListener } from "./useWebviewListener"; const hljsToTextMate = { ".hljs-comment": ["comment"], @@ -81,18 +82,10 @@ export function useVscTheme() { constructTheme((window as any).fullColorTheme || {}) ); - useEffect(() => { - const listener = (e) => { - if (e.data.type === "setTheme") { - (window as any).fullColorTheme = e.data.theme; - setTheme(constructTheme(e.data.theme)); - } - }; - window.addEventListener("message", listener); - return () => { - window.removeEventListener("message", listener); - }; - }, []); + useWebviewListener("setTheme", async (data) => { + (window as any).fullColorTheme = data.theme; + setTheme(constructTheme(data.theme)); + }); return theme; } diff --git a/gui/src/hooks/useWebviewListener.ts b/gui/src/hooks/useWebviewListener.ts new file mode 100644 index 000000000..ab56b1ffb --- /dev/null +++ b/gui/src/hooks/useWebviewListener.ts @@ -0,0 +1,25 @@ +import { Message } from "core/util/messenger"; +import { ReverseWebviewProtocol } from "core/web/webviewProtocol"; +import { useEffect } from "react"; +import { respondToIde } from "../util/ide"; + +export function useWebviewListener( + messageType: T, + handler: ( + data: ReverseWebviewProtocol[T][0] + ) => Promise, + dependencies?: any[] +) { + useEffect(() => { + const listener = async (event: { data: Message }) => { + if (event.data.messageType === messageType) { + const result = await handler(event.data.data); + respondToIde(messageType, result, event.data.messageId); + } + }; + window.addEventListener("message", listener); + return () => { + window.removeEventListener("message", listener); + }; + }, dependencies ?? []); +} diff --git a/gui/src/pages/gui.tsx b/gui/src/pages/gui.tsx index 490c17bfb..e2d535e48 100644 --- a/gui/src/pages/gui.tsx +++ b/gui/src/pages/gui.tsx @@ -30,6 +30,7 @@ import TimelineItem from "../components/gui/TimelineItem"; import ContinueInputBox from "../components/mainInput/ContinueInputBox"; import useChatHandler from "../hooks/useChatHandler"; import useHistory from "../hooks/useHistory"; +import { useWebviewListener } from "../hooks/useWebviewListener"; import { defaultModelSelector } from "../redux/selectors/modelSelectors"; import { newSession, setInactive } from "../redux/slices/stateSlice"; import { @@ -348,18 +349,14 @@ function GUI(props: GUIProps) { const { saveSession } = useHistory(dispatch); - useEffect(() => { - const handler = (event: any) => { - if (event.data.type === "newSession") { - saveSession(); - mainTextInputRef.current?.focus?.(); - } - }; - window.addEventListener("message", handler); - return () => { - window.removeEventListener("message", handler); - }; - }, [saveSession]); + useWebviewListener( + "newSession", + async () => { + saveSession(); + mainTextInputRef.current?.focus?.(); + }, + [saveSession] + ); const isLastUserInput = useCallback( (index: number): boolean => { diff --git a/gui/src/pages/help.tsx b/gui/src/pages/help.tsx index 0c8dfe845..a4b4cf0ec 100644 --- a/gui/src/pages/help.tsx +++ b/gui/src/pages/help.tsx @@ -1,12 +1,10 @@ import { ArrowLeftIcon } from "@heroicons/react/24/outline"; -import { postToIde } from "core/ide/messaging"; import { useNavigate } from "react-router-dom"; import styled from "styled-components"; import { Button, lightGray, vscBackground, vscForeground } from "../components"; import KeyboardShortcutsDialog from "../components/dialogs/KeyboardShortcuts"; import { useNavigationListener } from "../hooks/useNavigationListener"; - - +import { postToIde } from "../util/ide"; const IconDiv = styled.div<{ backgroundColor?: string }>` display: flex; @@ -56,7 +54,7 @@ function HelpPage() {

Help Center

{ - postToIde("showTutorial", {}); + postToIde("showTutorial", undefined); }} > Open tutorial diff --git a/gui/src/pages/history.tsx b/gui/src/pages/history.tsx index 57ed49bda..a97ab462b 100644 --- a/gui/src/pages/history.tsx +++ b/gui/src/pages/history.tsx @@ -7,9 +7,9 @@ import styled from "styled-components"; import { lightGray, vscBackground, vscInputBackground } from "../components"; import HeaderButtonWithText from "../components/HeaderButtonWithText"; import useHistory from "../hooks/useHistory"; +import { useNavigationListener } from "../hooks/useNavigationListener"; import { newSession } from "../redux/slices/stateSlice"; import { getFontSize } from "../util"; -import { useNavigationListener } from "../hooks/useNavigationListener"; const Tr = styled.tr` &:hover { @@ -128,7 +128,7 @@ function lastPartOfPath(path: string): string { function History() { useNavigationListener(); const navigate = useNavigate(); - + const [sessions, setSessions] = useState([]); const [filteredAndSortedSessions, setFilteredAndSortedSessions] = useState< SessionInfo[] diff --git a/gui/src/pages/modelconfig.tsx b/gui/src/pages/modelconfig.tsx index af44a4aa1..949c037c4 100644 --- a/gui/src/pages/modelconfig.tsx +++ b/gui/src/pages/modelconfig.tsx @@ -1,5 +1,4 @@ import { ArrowLeftIcon } from "@heroicons/react/24/outline"; -import { postToIde } from "core/ide/messaging"; import _ from "lodash"; import { useCallback, useEffect, useState } from "react"; import { FormProvider, useForm } from "react-hook-form"; @@ -14,15 +13,15 @@ import { } from "../components"; import StyledMarkdownPreview from "../components/markdown/StyledMarkdownPreview"; import ModelCard from "../components/modelSelection/ModelCard"; +import { useNavigationListener } from "../hooks/useNavigationListener"; import { setDefaultModel } from "../redux/slices/stateSlice"; -import { addModel } from "../util/ide"; +import { postToIde } from "../util/ide"; import { MODEL_PROVIDER_TAG_COLORS, ModelInfo, PROVIDER_INFO, updatedObj, } from "../util/modelData"; -import { useNavigationListener } from "../hooks/useNavigationListener"; const GridDiv = styled.div` display: grid; @@ -247,7 +246,7 @@ function ModelConfig() { ...formParams, provider: modelInfo.provider, }; - addModel(model); + postToIde("addModel", model); dispatch(setDefaultModel(model.title)); navigate("/"); }} @@ -265,7 +264,7 @@ function ModelConfig() { { - postToIde("openConfigJson", {}); + postToIde("openConfigJson", undefined); }} >

Open config.json

diff --git a/gui/src/pages/models.tsx b/gui/src/pages/models.tsx index 782a42984..097f67389 100644 --- a/gui/src/pages/models.tsx +++ b/gui/src/pages/models.tsx @@ -1,19 +1,17 @@ import { ArrowLeftIcon } from "@heroicons/react/24/outline"; import _ from "lodash"; import React from "react"; +import { useDispatch } from "react-redux"; import { useNavigate } from "react-router-dom"; import styled from "styled-components"; import { defaultBorderRadius, lightGray, vscBackground } from "../components"; import ModelCard from "../components/modelSelection/ModelCard"; - -import { postToIde } from "core/ide/messaging"; -import { useDispatch } from "react-redux"; import Toggle from "../components/modelSelection/Toggle"; +import { useNavigationListener } from "../hooks/useNavigationListener"; import { setDefaultModel } from "../redux/slices/stateSlice"; -import { addModel } from "../util/ide"; +import { postToIde } from "../util/ide"; import { MODEL_INFO, PROVIDER_INFO } from "../util/modelData"; import { CustomModelButton } from "./modelconfig"; -import { useNavigationListener } from "../hooks/useNavigationListener"; const IntroDiv = styled.div` padding: 8px 12px; @@ -75,10 +73,8 @@ function Models() {
  • a model (the LLM being run, e.g. GPT-4, CodeLlama).
  • To read more about the options, check out our{" "} - - overview - {" "} - in the docs. + overview in + the docs. {providersSelected ? ( @@ -121,7 +117,7 @@ function Models() { ), provider: PROVIDER_INFO[selectedProvider].provider, }; - addModel(model); + postToIde("addModel", model); dispatch(setDefaultModel(model.title)); navigate("/"); }} @@ -138,7 +134,7 @@ function Models() { { - postToIde("openConfigJson", {}); + postToIde("openConfigJson", undefined); }} >

    Open config.json

    diff --git a/gui/src/pages/monaco.tsx b/gui/src/pages/monaco.tsx index 1bddac4ec..b49b5b1b5 100644 --- a/gui/src/pages/monaco.tsx +++ b/gui/src/pages/monaco.tsx @@ -27,10 +27,7 @@ function EditorFrame(props: EditorFrameProps) { }; window.addEventListener("message", eventListener); - postToIde("readRangeInFile", { - filepath: props.filename, - messageId: messageId, - }); + postToIde("readFile", { filepath: props.filename }); return () => window.removeEventListener("message", eventListener); }, []); diff --git a/gui/src/util/ide.ts b/gui/src/util/ide.ts index 4bbca782a..90af1d856 100644 --- a/gui/src/util/ide.ts +++ b/gui/src/util/ide.ts @@ -1,39 +1,59 @@ +import { ChatMessage, LLMFullCompletionOptions, LLMReturnValue } from "core"; +import { Message } from "core/util/messenger"; +import { + ReverseWebviewProtocol, + WebviewProtocol, +} from "core/web/webviewProtocol"; +import { v4 as uuidv4 } from "uuid"; import "vscode-webview"; +interface vscode { + postMessage(message: any): vscode; +} declare const vscode: any; -function _postToIde(type: string, data: any) { +function _postToIde(messageType: string, data: any, messageId?: string) { if (typeof vscode === "undefined") { if (localStorage.getItem("ide") === "jetbrains") { if ((window as any).postIntellijMessage === undefined) { console.log( "Unable to send message: postIntellijMessage is undefined. ", - type, + messageType, data ); throw new Error("postIntellijMessage is undefined"); } - (window as any).postIntellijMessage?.(type, data); + (window as any).postIntellijMessage?.(messageType, data); return; } else { - console.log("Unable to send message: vscode is undefined. ", type, data); + console.log( + "Unable to send message: vscode is undefined. ", + messageType, + data + ); return; } } - vscode.postMessage({ - type, - ...data, - }); + const msg: Message = { + messageId: messageId ?? uuidv4(), + messageType, + data, + }; + vscode.postMessage(msg); } -export function postToIde(type: string, data: any, attempt: number = 0) { +export function postToIde( + messageType: T, + data: WebviewProtocol[T][0], + attempt: number = 0 +) { try { - _postToIde(type, data); + _postToIde(messageType, data); } catch (error) { if (attempt < 5) { console.log(`Attempt ${attempt} failed. Retrying...`); setTimeout( - () => postToIde(type, data, attempt + 1), + () => postToIde(messageType, data, attempt + 1), Math.pow(2, attempt) * 1000 ); } else { @@ -42,17 +62,104 @@ export function postToIde(type: string, data: any, attempt: number = 0) { } } -export async function ideRequest(type: string, data: any): Promise { +export function respondToIde( + messageType: T, + data: ReverseWebviewProtocol[T][1], + messageId: string +) { + _postToIde(messageType, data, messageId); +} + +export async function ideRequest( + messageType: T, + data: WebviewProtocol[T][0] +): Promise { + const messageId = uuidv4(); + return new Promise((resolve) => { const handler = (event: any) => { - if (event.data.type === type) { + if (event.data.messageId === messageId) { window.removeEventListener("message", handler); - resolve(event.data); + resolve(event.data.data); } }; window.addEventListener("message", handler); - postToIde(type, data); + + postToIde(messageType, data); + }) as any; +} + +export async function* ideStreamRequest( + messageType: T, + data: WebviewProtocol[T][0], + cancelToken?: AbortSignal +): WebviewProtocol[T][1] { + const messageId = uuidv4(); + + postToIde(messageType, data); + + let buffer = ""; + let index = 0; + let done = false; + let returnVal = undefined; + + const handler = (event: { data: Message }) => { + if (event.data.messageId === messageId) { + if (event.data.data.done) { + window.removeEventListener("message", handler); + done = true; + returnVal = event.data.data; + } else { + buffer += event.data.data.content; + } + } + }; + window.addEventListener("message", handler); + + cancelToken?.addEventListener("abort", () => { + postToIde("abort", messageId); }); + + while (!done) { + if (buffer.length > index) { + const chunk = buffer.slice(index); + index = buffer.length; + yield chunk; + } + await new Promise((resolve) => setTimeout(resolve, 50)); + } + + if (buffer.length > index) { + const chunk = buffer.slice(index); + index = buffer.length; + yield chunk; + } + + return returnVal; +} + +export async function* llmStreamChat( + modelTitle: string, + cancelToken: AbortSignal | undefined, + messages: ChatMessage[], + options: LLMFullCompletionOptions = {} +): AsyncGenerator { + const gen = ideStreamRequest( + "llmStreamChat", + { + messages, + title: modelTitle, + completionOptions: options, + }, + cancelToken + ); + + let next = await gen.next(); + while (!next.done) { + yield { role: "user", content: next.value }; + next = await gen.next(); + } + return { prompt: next.value?.prompt, completion: next.value?.completion }; } export function errorPopup(message: string) { @@ -63,10 +170,6 @@ export function logDevData(tableName: string, data: any) { postToIde("logDevData", { tableName, data }); } -export function addModel(model: any) { - postToIde("addModel", { model }); -} - export function deleteModel(title: any) { postToIde("deleteModel", { title }); } diff --git a/core/web/webviewIde.ts b/gui/src/util/webviewIde.ts similarity index 72% rename from core/web/webviewIde.ts rename to gui/src/util/webviewIde.ts index b7b5584da..6f993703e 100644 --- a/core/web/webviewIde.ts +++ b/gui/src/util/webviewIde.ts @@ -1,43 +1,45 @@ -import { ContinueRcJson, Problem, Range } from ".."; -import { IDE } from "../index"; - -import { ideRequest } from "./message"; -async function r(messageType: string, options: any = {}) { - return await ideRequest(messageType, options); +import { ContinueRcJson, IDE, Problem, Range } from "core"; +import { WebviewProtocol } from "core/web/webviewProtocol"; +import { ideRequest } from "./ide"; +function r( + messageType: T, + data: WebviewProtocol[T][0] +): Promise { + return ideRequest(messageType, data); } export class WebviewIde implements IDE { readRangeInFile(filepath: string, range: Range): Promise { return r("readRangeInFile", { filepath, range }); } getStats(directory: string): Promise<{ [path: string]: number }> { - return r("getStats", { directory }); + throw new Error("Method not implemented."); } isTelemetryEnabled(): Promise { - return r("isTelemetryEnabled"); + return r("isTelemetryEnabled", undefined); } getUniqueId(): Promise { - return r("getUniqueId"); + return r("getUniqueId", undefined); } getWorkspaceConfigs(): Promise { - return r("getWorkspaceConfigs"); + return r("getWorkspaceConfigs", undefined); } async getDiff() { - return await r("getDiff"); + return await r("getDiff", undefined); } async getTerminalContents() { - return await r("getTerminalContents"); + return await r("getTerminalContents", undefined); } async listWorkspaceContents(directory?: string): Promise { - return await r("listWorkspaceContents"); + return await r("listWorkspaceContents", undefined); } async getWorkspaceDirs(): Promise { - return await r("getWorkspaceDirs"); + return await r("getWorkspaceDirs", undefined); } async showLines( @@ -49,7 +51,7 @@ export class WebviewIde implements IDE { } async listFolders(): Promise { - return await r("listFolders"); + return await r("listFolders", undefined); } _continueDir: string | null = null; @@ -58,7 +60,7 @@ export class WebviewIde implements IDE { if (this._continueDir) { return this._continueDir; } - const dir = await r("getContinueDir"); + const dir = await r("getContinueDir", undefined); this._continueDir = dir; return dir; } @@ -94,11 +96,11 @@ export class WebviewIde implements IDE { } getOpenFiles(): Promise { - return r("getOpenFiles"); + return r("getOpenFiles", undefined); } getPinnedFiles(): Promise { - return r("getPinnedFiles"); + return r("getPinnedFiles", undefined); } getSearchResults(query: string): Promise { From fa106c569b542a1c6710c50a857f47d59948628d Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Wed, 14 Feb 2024 17:59:18 -0800 Subject: [PATCH 008/141] =?UTF-8?q?=F0=9F=9A=A7=20fixing=20webview=20messa?= =?UTF-8?q?ging?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/package-lock.json | 186 ++++--- core/yarn.lock | 34 +- extensions/vscode/package-lock.json | 47 +- extensions/vscode/src/debugPanel.ts | 37 +- .../vscode/src/extension/vscodeExtension.ts | 3 +- extensions/vscode/src/webviewProtocol.ts | 34 +- extensions/vscode/yarn.lock | 26 +- gui/package-lock.json | 472 ++++++++++-------- gui/src/util/ide.ts | 11 +- 9 files changed, 455 insertions(+), 395 deletions(-) diff --git a/core/package-lock.json b/core/package-lock.json index 88ae15d27..46f57ceda 100644 --- a/core/package-lock.json +++ b/core/package-lock.json @@ -2044,15 +2044,14 @@ } }, "node_modules/agent-base": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", - "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", - "optional": true, + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.0.tgz", + "integrity": "sha512-o/zjMZRhJxny7OyEF+Op8X+efiELC7k7yOjMzgfzVqOzXqkBkWI79YoTdOtsuWd5BWhAGAuOY/Xa6xpiaWXiNg==", "dependencies": { - "debug": "4" + "debug": "^4.3.4" }, "engines": { - "node": ">= 6.0.0" + "node": ">= 14" } }, "node_modules/agentkeepalive": { @@ -2179,6 +2178,20 @@ "node": "^12.13.0 || ^14.15.0 || >=16.0.0" } }, + "node_modules/are-we-there-yet/node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "optional": true, + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/argparse": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", @@ -2376,6 +2389,42 @@ "readable-stream": "^3.4.0" } }, + "node_modules/bl/node_modules/buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, + "node_modules/bl/node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/boolbase": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", @@ -2457,9 +2506,9 @@ } }, "node_modules/buffer": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", - "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", + "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", "funding": [ { "type": "github", @@ -2474,9 +2523,10 @@ "url": "https://feross.org/support" } ], + "optional": true, "dependencies": { "base64-js": "^1.3.1", - "ieee754": "^1.1.13" + "ieee754": "^1.2.1" } }, "node_modules/buffer-from": { @@ -3811,17 +3861,6 @@ "node": ">= 14" } }, - "node_modules/http-proxy-agent/node_modules/agent-base": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.0.tgz", - "integrity": "sha512-o/zjMZRhJxny7OyEF+Op8X+efiELC7k7yOjMzgfzVqOzXqkBkWI79YoTdOtsuWd5BWhAGAuOY/Xa6xpiaWXiNg==", - "dependencies": { - "debug": "^4.3.4" - }, - "engines": { - "node": ">= 14" - } - }, "node_modules/https-proxy-agent": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.3.tgz", @@ -3834,17 +3873,6 @@ "node": ">= 14" } }, - "node_modules/https-proxy-agent/node_modules/agent-base": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.0.tgz", - "integrity": "sha512-o/zjMZRhJxny7OyEF+Op8X+efiELC7k7yOjMzgfzVqOzXqkBkWI79YoTdOtsuWd5BWhAGAuOY/Xa6xpiaWXiNg==", - "dependencies": { - "debug": "^4.3.4" - }, - "engines": { - "node": ">= 14" - } - }, "node_modules/human-signals": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", @@ -4952,6 +4980,18 @@ "node": ">= 10" } }, + "node_modules/make-fetch-happen/node_modules/agent-base": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "optional": true, + "dependencies": { + "debug": "4" + }, + "engines": { + "node": ">= 6.0.0" + } + }, "node_modules/make-fetch-happen/node_modules/http-proxy-agent": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz", @@ -5837,6 +5877,19 @@ "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==" }, + "node_modules/prebuild-install/node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/prebuild-install/node_modules/tar-fs": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz", @@ -6019,16 +6072,19 @@ "dev": true }, "node_modules/readable-stream": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", - "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "version": "4.5.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.5.2.tgz", + "integrity": "sha512-yjavECdqeZ3GLXNgRXgeQEdz9fvDDkNKyHnbHRFtOr7/LcfgBcmct7t/ET+HaCTqfh06OzoAxrkN/IfjJBVe+g==", + "optional": true, "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" + "abort-controller": "^3.0.0", + "buffer": "^6.0.3", + "events": "^3.3.0", + "process": "^0.11.10", + "string_decoder": "^1.3.0" }, "engines": { - "node": ">= 6" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, "node_modules/repeat-string": { @@ -6053,46 +6109,6 @@ "readable-stream": ">=4.0.0" } }, - "node_modules/replicate/node_modules/buffer": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", - "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "optional": true, - "dependencies": { - "base64-js": "^1.3.1", - "ieee754": "^1.2.1" - } - }, - "node_modules/replicate/node_modules/readable-stream": { - "version": "4.5.2", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.5.2.tgz", - "integrity": "sha512-yjavECdqeZ3GLXNgRXgeQEdz9fvDDkNKyHnbHRFtOr7/LcfgBcmct7t/ET+HaCTqfh06OzoAxrkN/IfjJBVe+g==", - "optional": true, - "dependencies": { - "abort-controller": "^3.0.0", - "buffer": "^6.0.3", - "events": "^3.3.0", - "process": "^0.11.10", - "string_decoder": "^1.3.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - } - }, "node_modules/require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", @@ -6432,6 +6448,18 @@ "node": ">= 10" } }, + "node_modules/socks-proxy-agent/node_modules/agent-base": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "optional": true, + "dependencies": { + "debug": "4" + }, + "engines": { + "node": ">= 6.0.0" + } + }, "node_modules/source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", diff --git a/core/yarn.lock b/core/yarn.lock index 25c0f5df8..6f9f7285c 100644 --- a/core/yarn.lock +++ b/core/yarn.lock @@ -974,26 +974,26 @@ abort-controller@^3.0.0: dependencies: event-target-shim "^5.0.0" -agent-base@^6.0.2, agent-base@6: +agent-base@^6.0.2: version "6.0.2" resolved "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz" integrity sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ== dependencies: debug "4" -agent-base@^7.0.2: +agent-base@^7.0.2, agent-base@^7.1.0: version "7.1.0" resolved "https://registry.npmjs.org/agent-base/-/agent-base-7.1.0.tgz" integrity sha512-o/zjMZRhJxny7OyEF+Op8X+efiELC7k7yOjMzgfzVqOzXqkBkWI79YoTdOtsuWd5BWhAGAuOY/Xa6xpiaWXiNg== dependencies: debug "^4.3.4" -agent-base@^7.1.0: - version "7.1.0" - resolved "https://registry.npmjs.org/agent-base/-/agent-base-7.1.0.tgz" - integrity sha512-o/zjMZRhJxny7OyEF+Op8X+efiELC7k7yOjMzgfzVqOzXqkBkWI79YoTdOtsuWd5BWhAGAuOY/Xa6xpiaWXiNg== +agent-base@6: + version "6.0.2" + resolved "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz" + integrity sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ== dependencies: - debug "^4.3.4" + debug "4" agentkeepalive@^4.1.3, agentkeepalive@^4.2.1: version "4.5.0" @@ -3417,7 +3417,25 @@ react-is@^18.0.0: resolved "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz" integrity sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w== -readable-stream@^3.1.1, readable-stream@^3.4.0, readable-stream@^3.6.0: +readable-stream@^3.1.1: + version "3.6.2" + resolved "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz" + integrity sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA== + dependencies: + inherits "^2.0.3" + string_decoder "^1.1.1" + util-deprecate "^1.0.1" + +readable-stream@^3.4.0: + version "3.6.2" + resolved "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz" + integrity sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA== + dependencies: + inherits "^2.0.3" + string_decoder "^1.1.1" + util-deprecate "^1.0.1" + +readable-stream@^3.6.0: version "3.6.2" resolved "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz" integrity sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA== diff --git a/extensions/vscode/package-lock.json b/extensions/vscode/package-lock.json index 8ff6a2c00..170597b3a 100644 --- a/extensions/vscode/package-lock.json +++ b/extensions/vscode/package-lock.json @@ -4591,15 +4591,6 @@ "node": ">=10" } }, - "node_modules/concurrently/node_modules/yargs-parser": { - "version": "20.2.9", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", - "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", - "dev": true, - "engines": { - "node": ">=10" - } - }, "node_modules/consola": { "version": "2.15.3", "resolved": "https://registry.npmjs.org/consola/-/consola-2.15.3.tgz", @@ -4996,9 +4987,9 @@ "integrity": "sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw==" }, "node_modules/diff": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-5.1.0.tgz", - "integrity": "sha512-D+mk+qE8VC/PAUrlAU34N+VfXev0ghe5ywmpqrawphmVZc1bEfn56uo9qpyGp1p4xpzOHkSW4ztBd6L7Xx4ACw==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", + "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", "engines": { "node": ">=0.3.1" } @@ -9105,14 +9096,6 @@ "wrap-ansi": "^7.0.0" } }, - "node_modules/mocha/node_modules/diff": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", - "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", - "engines": { - "node": ">=0.3.1" - } - }, "node_modules/mocha/node_modules/minimatch": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz", @@ -9187,14 +9170,6 @@ "node": ">=10" } }, - "node_modules/mocha/node_modules/yargs-parser": { - "version": "20.2.4", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", - "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", - "engines": { - "node": ">=10" - } - }, "node_modules/monaco-editor": { "version": "0.45.0", "resolved": "https://registry.npmjs.org/monaco-editor/-/monaco-editor-0.45.0.tgz", @@ -13604,11 +13579,11 @@ } }, "node_modules/yargs-parser": { - "version": "21.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", - "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "version": "20.2.4", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", + "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", "engines": { - "node": ">=12" + "node": ">=10" } }, "node_modules/yargs-unparser": { @@ -13644,6 +13619,14 @@ "node": ">=8" } }, + "node_modules/yargs/node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "engines": { + "node": ">=12" + } + }, "node_modules/yarn": { "version": "1.22.21", "resolved": "https://registry.npmjs.org/yarn/-/yarn-1.22.21.tgz", diff --git a/extensions/vscode/src/debugPanel.ts b/extensions/vscode/src/debugPanel.ts index 16927c040..4be5a05c0 100644 --- a/extensions/vscode/src/debugPanel.ts +++ b/extensions/vscode/src/debugPanel.ts @@ -10,7 +10,7 @@ export class ContinueGUIWebviewViewProvider implements vscode.WebviewViewProvider { public static readonly viewType = "continue.continueGUIView"; - public webviewProtocol?: VsCodeWebviewProtocol; + public webviewProtocol: VsCodeWebviewProtocol; resolveWebviewView( webviewView: vscode.WebviewView, @@ -46,28 +46,12 @@ export class ContinueGUIWebviewViewProvider private readonly windowId: string, private readonly extensionContext: vscode.ExtensionContext, private readonly verticalDiffManager: VerticalPerLineDiffManager - ) {} - - async webviewRequest(messageType: string, data: any = {}): Promise { - return new Promise((resolve, reject) => { - if (!this._webview) { - resolve(undefined); - } - - const listener = this._webview?.onDidReceiveMessage((data) => { - if (data.type === messageType) { - resolve(data); - listener?.dispose(); - } - }); - - this._webview?.postMessage({ type: messageType, data }); - - setTimeout(() => { - reject("Error communciating with Continue side panel: timed out"); - listener?.dispose(); - }, 500); - }); + ) { + this.webviewProtocol = new VsCodeWebviewProtocol( + ide, + configHandler, + verticalDiffManager + ); } getSidebarContent( @@ -126,12 +110,7 @@ export class ContinueGUIWebviewViewProvider } }); - this.webviewProtocol = new VsCodeWebviewProtocol( - panel.webview, - ide, - configHandler, - verticalDiffManager - ); + this.webviewProtocol.webview = panel.webview; return ` diff --git a/extensions/vscode/src/extension/vscodeExtension.ts b/extensions/vscode/src/extension/vscodeExtension.ts index 43197d90b..a83b7838b 100644 --- a/extensions/vscode/src/extension/vscodeExtension.ts +++ b/extensions/vscode/src/extension/vscodeExtension.ts @@ -31,6 +31,7 @@ export class VsCodeExtension { this.diffManager = new DiffManager(context); this.ide = new VsCodeIde(this.diffManager); this.configHandler = new ConfigHandler(this.ide); + this.configHandler.reloadConfig(); this.verticalDiffManager = new VerticalPerLineDiffManager( this.configHandler ); @@ -55,7 +56,7 @@ export class VsCodeExtension { } ) ); - this.webviewProtocol = this.sidebar.webviewProtocol!; + this.webviewProtocol = this.sidebar.webviewProtocol; this.diffManager.webviewProtocol = this.webviewProtocol; this.indexer = new CodebaseIndexer(this.configHandler, this.ide); diff --git a/extensions/vscode/src/webviewProtocol.ts b/extensions/vscode/src/webviewProtocol.ts index 44c93282d..2f83e8cb0 100644 --- a/extensions/vscode/src/webviewProtocol.ts +++ b/extensions/vscode/src/webviewProtocol.ts @@ -22,7 +22,7 @@ export class VsCodeWebviewProtocol { private send(messageType: string, data: any, messageId?: string): string { const id = messageId || uuidv4(); - this.webview.postMessage({ + this.webview?.postMessage({ messageType, data, messageId: id, @@ -42,13 +42,18 @@ export class VsCodeWebviewProtocol { this.listeners.get(messageType)?.push(handler); } - constructor( - readonly webview: vscode.Webview, - private readonly ide: IDE, - private readonly configHandler: ConfigHandler, - private readonly verticalDiffManager: VerticalPerLineDiffManager - ) { - webview.onDidReceiveMessage(async (msg) => { + _webview?: vscode.Webview; + _webviewListener?: vscode.Disposable; + + get webview(): vscode.Webview | undefined { + return this._webview; + } + + set webview(webView: vscode.Webview) { + this._webview = webView; + this._webviewListener?.dispose(); + + this._webviewListener = this._webview.onDidReceiveMessage(async (msg) => { if (!msg.messageType || !msg.messageId) { throw new Error("Invalid webview protocol msg: " + JSON.stringify(msg)); } @@ -95,7 +100,13 @@ export class VsCodeWebviewProtocol { } respond({ done: true, data: {} }); }); + } + constructor( + private readonly ide: IDE, + private readonly configHandler: ConfigHandler, + private readonly verticalDiffManager: VerticalPerLineDiffManager + ) { this.on("abort", (msg) => { this.abortedMessageIds.add(msg.messageId); }); @@ -496,10 +507,15 @@ export class VsCodeWebviewProtocol { ): Promise { const messageId = uuidv4(); return new Promise((resolve) => { + if (!this.webview) { + resolve(undefined); + return; + } + this.send(messageType, data, messageId); const disposable = this.webview.onDidReceiveMessage((msg) => { resolve(msg); - disposable.dispose(); + disposable?.dispose(); }); }); } diff --git a/extensions/vscode/yarn.lock b/extensions/vscode/yarn.lock index 5c9af9f54..be8c6d1c0 100644 --- a/extensions/vscode/yarn.lock +++ b/extensions/vscode/yarn.lock @@ -697,9 +697,9 @@ integrity sha512-4JQNk+3mVzK3xh2rqd6RB4J46qUR19azEHBneZyTZM+c456qOrbbM/5xcR8huNCCcbVt7+UmizG6GuUvPvKUYg== "@lancedb/vectordb-darwin-arm64@*": - version "0.4.9" - resolved "https://registry.npmjs.org/@lancedb/vectordb-darwin-arm64/-/vectordb-darwin-arm64-0.4.9.tgz" - integrity sha512-u56TXU0hvdLbknGwC7Ebza3/CUFeCTkoCy/sC6h0FtOGya+NV7jraAeXEwDzoZbfW08VYYxnp3TsCcpNU9lpTA== + version "0.4.10" + resolved "https://registry.npmjs.org/@lancedb/vectordb-darwin-arm64/-/vectordb-darwin-arm64-0.4.10.tgz" + integrity sha512-y/uHOGb0g15pvqv5tdTyZ6oN+0QVpBmZDzKFWW6pPbuSZjB2uPqcs+ti0RB+AUdmS21kavVQqaNsw/HLKEGrHA== "@lancedb/vectordb-darwin-arm64@0.4.8": version "0.4.8" @@ -2546,12 +2546,7 @@ diff-sequences@^29.6.3: resolved "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.6.3.tgz" integrity sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q== -diff@^5.0.0: - version "5.1.0" - resolved "https://registry.npmjs.org/diff/-/diff-5.1.0.tgz" - integrity sha512-D+mk+qE8VC/PAUrlAU34N+VfXev0ghe5ywmpqrawphmVZc1bEfn56uo9qpyGp1p4xpzOHkSW4ztBd6L7Xx4ACw== - -diff@5.0.0: +diff@^5.0.0, diff@5.0.0: version "5.0.0" resolved "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz" integrity sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w== @@ -7588,21 +7583,16 @@ yaml@^2.3.4: resolved "https://registry.npmjs.org/yaml/-/yaml-2.3.4.tgz" integrity sha512-8aAvwVUSHpfEqTQ4w/KMlf3HcRdt50E5ODIQJBw1fQ5RL34xabzxtUlzTXVqc4rkZsPbvrXKWnABCD7kWSmocA== -yargs-parser@^20.2.2: - version "20.2.9" - resolved "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz" - integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w== +yargs-parser@^20.2.2, yargs-parser@20.2.4: + version "20.2.4" + resolved "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz" + integrity sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA== yargs-parser@^21.1.1: version "21.1.1" resolved "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz" integrity sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw== -yargs-parser@20.2.4: - version "20.2.4" - resolved "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz" - integrity sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA== - yargs-unparser@2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz" diff --git a/gui/package-lock.json b/gui/package-lock.json index 84788575a..632e8f618 100644 --- a/gui/package-lock.json +++ b/gui/package-lock.json @@ -839,12 +839,12 @@ } }, "node_modules/@floating-ui/dom": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/@floating-ui/dom/-/dom-1.6.1.tgz", - "integrity": "sha512-iA8qE43/H5iGozC3W0YSnVSW42Vh522yyM1gj+BqRwVsTNOyr231PsXDaV04yT39PsO0QL2QpbI/M0ZaLUQgRQ==", + "version": "1.6.3", + "resolved": "https://registry.npmjs.org/@floating-ui/dom/-/dom-1.6.3.tgz", + "integrity": "sha512-RnDthu3mzPlQ31Ss/BTwQ1zjzIhr3lk1gZB1OC56h/1vEtaXkESrOqL5fQVMfXpwGtRwX+YsZBdyHtJMQnkArw==", "dependencies": { - "@floating-ui/core": "^1.6.0", - "@floating-ui/utils": "^0.2.1" + "@floating-ui/core": "^1.0.0", + "@floating-ui/utils": "^0.2.0" } }, "node_modules/@floating-ui/utils": { @@ -907,9 +907,9 @@ } }, "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz", - "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", "engines": { "node": ">=6.0.0" } @@ -1116,13 +1116,13 @@ "integrity": "sha512-+9jVqKhRSpsc591z5vX+X5Yyw+he/HCB4iQ/RYxw35CEPaY1gnsNE43nf9n9AaYjAQrTiI/mOwKUKdUs9vf7Xg==" }, "node_modules/@swc/core": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@swc/core/-/core-1.4.0.tgz", - "integrity": "sha512-wc5DMI5BJftnK0Fyx9SNJKkA0+BZSJQx8430yutWmsILkHMBD3Yd9GhlMaxasab9RhgKqZp7Ht30hUYO5ZDvQg==", + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/@swc/core/-/core-1.4.1.tgz", + "integrity": "sha512-3y+Y8js+e7BbM16iND+6Rcs3jdiL28q3iVtYsCviYSSpP2uUVKkp5sJnCY4pg8AaVvyN7CGQHO7gLEZQ5ByozQ==", "dev": true, "hasInstallScript": true, "dependencies": { - "@swc/counter": "^0.1.1", + "@swc/counter": "^0.1.2", "@swc/types": "^0.1.5" }, "engines": { @@ -1133,16 +1133,16 @@ "url": "https://opencollective.com/swc" }, "optionalDependencies": { - "@swc/core-darwin-arm64": "1.4.0", - "@swc/core-darwin-x64": "1.4.0", - "@swc/core-linux-arm-gnueabihf": "1.4.0", - "@swc/core-linux-arm64-gnu": "1.4.0", - "@swc/core-linux-arm64-musl": "1.4.0", - "@swc/core-linux-x64-gnu": "1.4.0", - "@swc/core-linux-x64-musl": "1.4.0", - "@swc/core-win32-arm64-msvc": "1.4.0", - "@swc/core-win32-ia32-msvc": "1.4.0", - "@swc/core-win32-x64-msvc": "1.4.0" + "@swc/core-darwin-arm64": "1.4.1", + "@swc/core-darwin-x64": "1.4.1", + "@swc/core-linux-arm-gnueabihf": "1.4.1", + "@swc/core-linux-arm64-gnu": "1.4.1", + "@swc/core-linux-arm64-musl": "1.4.1", + "@swc/core-linux-x64-gnu": "1.4.1", + "@swc/core-linux-x64-musl": "1.4.1", + "@swc/core-win32-arm64-msvc": "1.4.1", + "@swc/core-win32-ia32-msvc": "1.4.1", + "@swc/core-win32-x64-msvc": "1.4.1" }, "peerDependencies": { "@swc/helpers": "^0.5.0" @@ -1154,9 +1154,9 @@ } }, "node_modules/@swc/core-darwin-arm64": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@swc/core-darwin-arm64/-/core-darwin-arm64-1.4.0.tgz", - "integrity": "sha512-UTJ/Vz+s7Pagef6HmufWt6Rs0aUu+EJF4Pzuwvr7JQQ5b1DZeAAUeUtkUTFx/PvCbM8Xfw4XdKBUZfrIKCfW8A==", + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/@swc/core-darwin-arm64/-/core-darwin-arm64-1.4.1.tgz", + "integrity": "sha512-ePyfx0348UbR4DOAW24TedeJbafnzha8liXFGuQ4bdXtEVXhLfPngprrxKrAddCuv42F9aTxydlF6+adD3FBhA==", "cpu": [ "arm64" ], @@ -1170,9 +1170,9 @@ } }, "node_modules/@swc/core-darwin-x64": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@swc/core-darwin-x64/-/core-darwin-x64-1.4.0.tgz", - "integrity": "sha512-f8v58u2GsGak8EtZFN9guXqE0Ep10Suny6xriaW2d8FGqESPyNrnBzli3aqkSeQk5gGqu2zJ7WiiKp3XoUOidA==", + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/@swc/core-darwin-x64/-/core-darwin-x64-1.4.1.tgz", + "integrity": "sha512-eLf4JSe6VkCMdDowjM8XNC5rO+BrgfbluEzAVtKR8L2HacNYukieumN7EzpYCi0uF1BYwu1ku6tLyG2r0VcGxA==", "cpu": [ "x64" ], @@ -1186,9 +1186,9 @@ } }, "node_modules/@swc/core-linux-arm-gnueabihf": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.4.0.tgz", - "integrity": "sha512-q2KAkBzmPcTnRij/Y1fgHCKAGevUX/H4uUESrw1J5gmUg9Qip6onKV80lTumA1/aooGJ18LOsB31qdbwmZk9OA==", + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.4.1.tgz", + "integrity": "sha512-K8VtTLWMw+rkN/jDC9o/Q9SMmzdiHwYo2CfgkwVT29NsGccwmNhCQx6XoYiPKyKGIFKt4tdQnJHKUFzxUqQVtQ==", "cpu": [ "arm" ], @@ -1202,9 +1202,9 @@ } }, "node_modules/@swc/core-linux-arm64-gnu": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.4.0.tgz", - "integrity": "sha512-SknGu96W0mzHtLHWm+62fk5+Omp9fMPFO7AWyGFmz2tr8EgRRXtTSrBUnWhAbgcalnhen48GsvtMdxf1KNputg==", + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.4.1.tgz", + "integrity": "sha512-0e8p4g0Bfkt8lkiWgcdiENH3RzkcqKtpRXIVNGOmVc0OBkvc2tpm2WTx/eoCnes2HpTT4CTtR3Zljj4knQ4Fvw==", "cpu": [ "arm64" ], @@ -1218,9 +1218,9 @@ } }, "node_modules/@swc/core-linux-arm64-musl": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.4.0.tgz", - "integrity": "sha512-/k3TDvpBRMDNskHooNN1KqwUhcwkfBlIYxRTnJvsfT2C7My4pffR+4KXmt0IKynlTTbCdlU/4jgX4801FSuliw==", + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.4.1.tgz", + "integrity": "sha512-b/vWGQo2n7lZVUnSQ7NBq3Qrj85GrAPPiRbpqaIGwOytiFSk8VULFihbEUwDe0rXgY4LDm8z8wkgADZcLnmdUA==", "cpu": [ "arm64" ], @@ -1234,9 +1234,9 @@ } }, "node_modules/@swc/core-linux-x64-gnu": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.4.0.tgz", - "integrity": "sha512-GYsTMvNt5+WTVlwwQzOOWsPMw6P/F41u5PGHWmfev8Nd4QJ1h3rWPySKk4mV42IJwH9MgQCVSl3ygwNqwl6kFg==", + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.4.1.tgz", + "integrity": "sha512-AFMQlvkKEdNi1Vk2GFTxxJzbICttBsOQaXa98kFTeWTnFFIyiIj2w7Sk8XRTEJ/AjF8ia8JPKb1zddBWr9+bEQ==", "cpu": [ "x64" ], @@ -1250,9 +1250,9 @@ } }, "node_modules/@swc/core-linux-x64-musl": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.4.0.tgz", - "integrity": "sha512-jGVPdM/VwF7kK/uYRW5N6FwzKf/FnDjGIR3RPvQokjYJy7Auk+3Oj21C0Jev7sIT9RYnO/TrFEoEozKeD/z2Qw==", + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.4.1.tgz", + "integrity": "sha512-QX2MxIECX1gfvUVZY+jk528/oFkS9MAl76e3ZRvG2KC/aKlCQL0KSzcTSm13mOxkDKS30EaGRDRQWNukGpMeRg==", "cpu": [ "x64" ], @@ -1266,9 +1266,9 @@ } }, "node_modules/@swc/core-win32-arm64-msvc": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.4.0.tgz", - "integrity": "sha512-biHYm1AronEKlt47O/H8sSOBM2BKXMmWT+ApvlxUw50m1RGNnVnE0bgY7tylFuuSiWyXsQPJbmUV708JqORXVg==", + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.4.1.tgz", + "integrity": "sha512-OklkJYXXI/tntD2zaY8i3iZldpyDw5q+NAP3k9OlQ7wXXf37djRsHLV0NW4+ZNHBjE9xp2RsXJ0jlOJhfgGoFA==", "cpu": [ "arm64" ], @@ -1282,9 +1282,9 @@ } }, "node_modules/@swc/core-win32-ia32-msvc": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.4.0.tgz", - "integrity": "sha512-TL5L2tFQb19kJwv6+elToGBj74QXCn9j+hZfwQatvZEJRA5rDK16eH6oAE751dGUArhnWlW3Vj65hViPvTuycw==", + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.4.1.tgz", + "integrity": "sha512-MBuc3/QfKX9FnLOU7iGN+6yHRTQaPQ9WskiC8s8JFiKQ+7I2p25tay2RplR9dIEEGgVAu6L7auv96LbNTh+FaA==", "cpu": [ "ia32" ], @@ -1298,9 +1298,9 @@ } }, "node_modules/@swc/core-win32-x64-msvc": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.4.0.tgz", - "integrity": "sha512-e2xVezU7XZ2Stzn4i7TOQe2Kn84oYdG0M3A7XI7oTdcpsKCcKwgiMoroiAhqCv+iN20KNqhnWwJiUiTj/qN5AA==", + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.4.1.tgz", + "integrity": "sha512-lu4h4wFBb/bOK6N2MuZwg7TrEpwYXgpQf5R7ObNSXL65BwZ9BG8XRzD+dLJmALu8l5N08rP/TrpoKRoGT4WSxw==", "cpu": [ "x64" ], @@ -1808,9 +1808,9 @@ "integrity": "sha512-nG96G3Wp6acyAgJqGasjODb+acrI7KltPiRxzHPXnP3NgI28bpQDRv53olbqGXbfcgF5aiiHmO3xpwEpS5Ld9g==" }, "node_modules/@types/node": { - "version": "20.11.16", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.16.tgz", - "integrity": "sha512-gKb0enTmRCzXSSUJDq6/sPcqrfCv2mkkG6Jt/clpn5eiCbKTY+SgZUxo+p8ZKMof5dCp9vHQUAB7wOUTod22wQ==", + "version": "20.11.17", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.17.tgz", + "integrity": "sha512-QmgQZGWu1Yw9TDyAP9ZzpFJKynYNeOvwMJmaxABfieQoVoiVOS6MN1WSpqpRcbeA5+RW82kraAVxCCJg+780Qw==", "dev": true, "dependencies": { "undici-types": "~5.26.4" @@ -2069,6 +2069,15 @@ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "dev": true }, + "node_modules/bcp-47-match": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/bcp-47-match/-/bcp-47-match-1.0.3.tgz", + "integrity": "sha512-LggQ4YTdjWQSKELZF5JwchnBa1u0pIQSZf5lSdOHEdbVP55h0qICA/FUp3+W99q0xqxYa1ZQizTUH87gecII5w==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/binary-extensions": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", @@ -2105,9 +2114,9 @@ } }, "node_modules/browserslist": { - "version": "4.22.3", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.22.3.tgz", - "integrity": "sha512-UAp55yfwNv0klWNapjs/ktHoguxuQNGnOzxYmfnXIS+8AsRDZkSDxg7R1AX3GKzn078SBI5dzwzj/Yx0Or0e3A==", + "version": "4.23.0", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.23.0.tgz", + "integrity": "sha512-QW8HiM1shhT2GuzkvklfjcKDiWFXHOeFCIA/huJPwHsslwcydgk7X+z2zXpEijP98UCY7HbubZt5J2Zgvf0CaQ==", "funding": [ { "type": "opencollective", @@ -2123,8 +2132,8 @@ } ], "dependencies": { - "caniuse-lite": "^1.0.30001580", - "electron-to-chromium": "^1.4.648", + "caniuse-lite": "^1.0.30001587", + "electron-to-chromium": "^1.4.668", "node-releases": "^2.0.14", "update-browserslist-db": "^1.0.13" }, @@ -2153,9 +2162,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001585", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001585.tgz", - "integrity": "sha512-yr2BWR1yLXQ8fMpdS/4ZZXpseBgE7o4g41x3a6AJOqZuOi+iE/WdJYAuZ6Y95i4Ohd2Y+9MzIWRR+uGABH4s3Q==", + "version": "1.0.30001587", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001587.tgz", + "integrity": "sha512-HMFNotUmLXn71BQxg8cijvqxnIAofforZOwGsxyXJ0qugTdspUF4sPSJ2vhgprHCB996tIDzEq1ubumPDV8ULA==", "funding": [ { "type": "opencollective", @@ -2378,6 +2387,11 @@ "node": ">=4" } }, + "node_modules/css-selector-parser": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/css-selector-parser/-/css-selector-parser-1.4.1.tgz", + "integrity": "sha512-HYPSb7y/Z7BNDCOrakL4raGO2zltZkbeXyAd6Tg9obzix6QhzxCotdBl6VT0Dv4vZfJGVz3WL/xaEI9Ly3ul0g==" + }, "node_modules/css-to-react-native": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/css-to-react-native/-/css-to-react-native-3.2.0.tgz", @@ -2481,6 +2495,18 @@ "integrity": "sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw==", "dev": true }, + "node_modules/direction": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/direction/-/direction-1.0.4.tgz", + "integrity": "sha512-GYqKi1aH7PJXxdhTeZBFrg8vUBeKXi+cNprXsC1kpJcbcVnV9wBsrOu1cQEdG0WeQwlfHiy3XvnKfIrJ2R0NzQ==", + "bin": { + "direction": "cli.js" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/dlv": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/dlv/-/dlv-1.1.3.tgz", @@ -2519,9 +2545,9 @@ "dev": true }, "node_modules/electron-to-chromium": { - "version": "1.4.661", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.661.tgz", - "integrity": "sha512-AFg4wDHSOk5F+zA8aR+SVIOabu7m0e7BiJnigCvPXzIGy731XENw/lmNxTySpVFtkFEy+eyt4oHhh5FF3NjQNw==" + "version": "1.4.669", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.669.tgz", + "integrity": "sha512-E2SmpffFPrZhBSgf8ibqanRS2mpuk3FIRDzLDwt7WFpfgJMKDHJs0hmacyP0PS1cWsq0dVkwIIzlscNaterkPg==" }, "node_modules/emoji-regex": { "version": "9.2.2", @@ -2853,9 +2879,9 @@ } }, "node_modules/hasown": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.0.tgz", - "integrity": "sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.1.tgz", + "integrity": "sha512-1/th4MHjnwncwXsIW6QMzlvYL9kG5e/CpVvLRZe4XPa8TOUNbCELqmvhDmnkNsAjwaG4+I8gJJL0JBvTTLO9qA==", "dev": true, "dependencies": { "function-bind": "^1.1.2" @@ -3069,6 +3095,15 @@ "url": "https://opencollective.com/unified" } }, + "node_modules/hast-util-has-property": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/hast-util-has-property/-/hast-util-has-property-1.0.4.tgz", + "integrity": "sha512-ghHup2voGfgFoHMGnaLHOjbYFACKrRh9KFttdCzMCbFoBMJXiNi2+XTrPP8+q6cDJM/RSqlCfVWrjp1H201rZg==", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, "node_modules/hast-util-is-element": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/hast-util-is-element/-/hast-util-is-element-3.0.0.tgz", @@ -3090,6 +3125,129 @@ "url": "https://opencollective.com/unified" } }, + "node_modules/hast-util-select": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/hast-util-select/-/hast-util-select-4.0.2.tgz", + "integrity": "sha512-8EEG2//bN5rrzboPWD2HdS3ugLijNioS1pqOTIolXNf67xxShYw4SQEmVXd3imiBG+U2bC2nVTySr/iRAA7Cjg==", + "dependencies": { + "bcp-47-match": "^1.0.0", + "comma-separated-tokens": "^1.0.0", + "css-selector-parser": "^1.0.0", + "direction": "^1.0.0", + "hast-util-has-property": "^1.0.0", + "hast-util-is-element": "^1.0.0", + "hast-util-to-string": "^1.0.0", + "hast-util-whitespace": "^1.0.0", + "not": "^0.1.0", + "nth-check": "^2.0.0", + "property-information": "^5.0.0", + "space-separated-tokens": "^1.0.0", + "unist-util-visit": "^2.0.0", + "zwitch": "^1.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/hast-util-select/node_modules/@types/unist": { + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.10.tgz", + "integrity": "sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==" + }, + "node_modules/hast-util-select/node_modules/comma-separated-tokens": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/comma-separated-tokens/-/comma-separated-tokens-1.0.8.tgz", + "integrity": "sha512-GHuDRO12Sypu2cV70d1dkA2EUmXHgntrzbpvOB+Qy+49ypNfGgFQIC2fhhXbnyrJRynDCAARsT7Ou0M6hirpfw==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/hast-util-select/node_modules/hast-util-is-element": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/hast-util-is-element/-/hast-util-is-element-1.1.0.tgz", + "integrity": "sha512-oUmNua0bFbdrD/ELDSSEadRVtWZOf3iF6Lbv81naqsIV99RnSCieTbWuWCY8BAeEfKJTKl0gRdokv+dELutHGQ==", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/hast-util-select/node_modules/hast-util-whitespace": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/hast-util-whitespace/-/hast-util-whitespace-1.0.4.tgz", + "integrity": "sha512-I5GTdSfhYfAPNztx2xJRQpG8cuDSNt599/7YUn7Gx/WxNMsG+a835k97TDkFgk123cwjfwINaZknkKkphx/f2A==", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/hast-util-select/node_modules/property-information": { + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/property-information/-/property-information-5.6.0.tgz", + "integrity": "sha512-YUHSPk+A30YPv+0Qf8i9Mbfe/C0hdPXk1s1jPVToV8pk8BQtpw10ct89Eo7OWkutrwqvT0eicAxlOg3dOAu8JA==", + "dependencies": { + "xtend": "^4.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/hast-util-select/node_modules/space-separated-tokens": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/space-separated-tokens/-/space-separated-tokens-1.1.5.tgz", + "integrity": "sha512-q/JSVd1Lptzhf5bkYm4ob4iWPjx0KiRe3sRFBNrVqbJkFaBm5vbbowy1mymoPNLRa52+oadOhJ+K49wsSeSjTA==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/hast-util-select/node_modules/unist-util-is": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-4.1.0.tgz", + "integrity": "sha512-ZOQSsnce92GrxSqlnEEseX0gi7GH9zTJZ0p9dtu87WRb/37mMPO2Ilx1s/t9vBHrFhbgweUwb+t7cIn5dxPhZg==", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/hast-util-select/node_modules/unist-util-visit": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-2.0.3.tgz", + "integrity": "sha512-iJ4/RczbJMkD0712mGktuGpm/U4By4FfDonL7N/9tATGIF4imikjOuagyMY53tnZq3NP6BcmlrHhEKAfGWjh7Q==", + "dependencies": { + "@types/unist": "^2.0.0", + "unist-util-is": "^4.0.0", + "unist-util-visit-parents": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/hast-util-select/node_modules/unist-util-visit-parents": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-3.1.1.tgz", + "integrity": "sha512-1KROIZWo6bcMrZEwiH2UrXDyalAa0uqzWCxCJj6lPOvTve2WkfgCytoDTPaMnodXh1WrXOq0haVYHj99ynJlsg==", + "dependencies": { + "@types/unist": "^2.0.0", + "unist-util-is": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/hast-util-select/node_modules/zwitch": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/zwitch/-/zwitch-1.0.5.tgz", + "integrity": "sha512-V50KMwwzqJV0NpZIZFwfOD5/lyny3WlSzRiXgA0G7VUnRlqttta1L6UQIHzd6EuBY/cHGfwTIck7w1yH6Q5zUw==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/hast-util-to-jsx-runtime": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/hast-util-to-jsx-runtime/-/hast-util-to-jsx-runtime-2.3.0.tgz", @@ -3116,6 +3274,15 @@ "url": "https://opencollective.com/unified" } }, + "node_modules/hast-util-to-string": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/hast-util-to-string/-/hast-util-to-string-1.0.4.tgz", + "integrity": "sha512-eK0MxRX47AV2eZ+Lyr18DCpQgodvaS3fAQO2+b9Two9F5HEoRPhiUMNzoXArMJfZi2yieFzUBMRl3HNJ3Jus3w==", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, "node_modules/hast-util-to-text": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/hast-util-to-text/-/hast-util-to-text-4.0.0.tgz", @@ -3701,9 +3868,9 @@ } }, "node_modules/mdast-util-mdx-jsx": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/mdast-util-mdx-jsx/-/mdast-util-mdx-jsx-3.0.0.tgz", - "integrity": "sha512-XZuPPzQNBPAlaqsTTgRrcJnyFbSOBovSadFgbFu8SnuNgm+6Bdx1K+IWoitsmj6Lq6MNtI+ytOqwN70n//NaBA==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/mdast-util-mdx-jsx/-/mdast-util-mdx-jsx-3.1.0.tgz", + "integrity": "sha512-A8AJHlR7/wPQ3+Jre1+1rq040fX9A4Q1jG8JxmSNp/PLPHg80A6475wxTp3KzHpApFH6yWxFotHrJQA3dXP6/w==", "dependencies": { "@types/estree-jsx": "^1.0.0", "@types/hast": "^3.0.0", @@ -4322,9 +4489,9 @@ "integrity": "sha512-ihFnidEeU8iXzcVHy74dhkxh/dn8Dc08ERl0xwoMMGqp4+LvRSCgicb+zGqWthVokQKvCSxITlh3P08OzdTYCQ==" }, "node_modules/monaco-editor": { - "version": "0.45.0", - "resolved": "https://registry.npmjs.org/monaco-editor/-/monaco-editor-0.45.0.tgz", - "integrity": "sha512-mjv1G1ZzfEE3k9HZN0dQ2olMdwIfaeAAjFiwNprLfYNRSz7ctv9XuCT7gPtBGrMUeV1/iZzYKj17Khu1hxoHOA==", + "version": "0.46.0", + "resolved": "https://registry.npmjs.org/monaco-editor/-/monaco-editor-0.46.0.tgz", + "integrity": "sha512-ADwtLIIww+9FKybWscd7OCfm9odsFYHImBRI1v9AviGce55QY8raT+9ihH8jX/E/e6QVSGM+pKj4jSUSRmALNQ==", "peer": true }, "node_modules/ms": { @@ -4661,12 +4828,15 @@ } }, "node_modules/postcss-load-config/node_modules/lilconfig": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.0.0.tgz", - "integrity": "sha512-K2U4W2Ff5ibV7j7ydLr+zLAkIg5JJ4lPn1Ltsdt+Tz/IjQ8buJ55pZAxoP34lqIiwtF9iAvtLv3JGv7CAyAg+g==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.0.tgz", + "integrity": "sha512-p3cz0JV5vw/XeouBU3Ldnp+ZkBjE+n8ydJ4mcwBrOiXXPqNlrzGBqWs9X4MWF7f+iKUBu794Y8Hh8yawiJbCjw==", "dev": true, "engines": { "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/antonk52" } }, "node_modules/postcss-nested": { @@ -4707,18 +4877,18 @@ "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==" }, "node_modules/posthog-js": { - "version": "1.105.4", - "resolved": "https://registry.npmjs.org/posthog-js/-/posthog-js-1.105.4.tgz", - "integrity": "sha512-hazxQYi4nxSqktu0Hh1xCV+sJCpN8mp5E5Ei/cfEa2nsb13xQbzn81Lf3VIDA0xMU1mXxNRStntlY267eQVC/w==", + "version": "1.105.9", + "resolved": "https://registry.npmjs.org/posthog-js/-/posthog-js-1.105.9.tgz", + "integrity": "sha512-i9DnfyXDktugF5E9x0ejihQ8Xdh1kdVnVh7GdL7+PvFtULGMoN/b4pDmWBCwmH+ciubmqTCImVuNrZYy8+eTbw==", "dependencies": { "fflate": "^0.4.8", "preact": "^10.19.3" } }, "node_modules/preact": { - "version": "10.19.3", - "resolved": "https://registry.npmjs.org/preact/-/preact-10.19.3.tgz", - "integrity": "sha512-nHHTeFVBTHRGxJXKkKu5hT8C/YWBkPso4/Gad6xuj5dbptt9iF9NZr9pHbPhBrnT2klheu7mHTxTZ/LjwJiEiQ==", + "version": "10.19.4", + "resolved": "https://registry.npmjs.org/preact/-/preact-10.19.4.tgz", + "integrity": "sha512-dwaX5jAh0Ga8uENBX1hSOujmKWgx9RtL80KaKUFLc6jb4vCEAc3EeZ0rnQO/FO4VgjfPMfoLFWnNG8bHuZ9VLw==", "funding": { "type": "opencollective", "url": "https://opencollective.com/preact" @@ -5474,11 +5644,11 @@ } }, "node_modules/react-tooltip": { - "version": "5.26.0", - "resolved": "https://registry.npmjs.org/react-tooltip/-/react-tooltip-5.26.0.tgz", - "integrity": "sha512-UBbwy3fo1KYDwRCOWwM6AEfQsk9shgVfNkXFqgwS33QHplzg7xao/7mX/6wd+lE6KSZzhUNTkB5TNk9SMaBV/A==", + "version": "5.26.2", + "resolved": "https://registry.npmjs.org/react-tooltip/-/react-tooltip-5.26.2.tgz", + "integrity": "sha512-C1qHiqWYn6l5c98kL/NKFyJSw5G11vUVJkgOPcKgn306c5iL5317LxMNn5Qg1GSSM7Qvtsd6KA5MvwfgxFF7Dg==", "dependencies": { - "@floating-ui/dom": "^1.0.0", + "@floating-ui/dom": "^1.6.1", "classnames": "^2.3.0" }, "peerDependencies": { @@ -5741,123 +5911,6 @@ "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.10.tgz", "integrity": "sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==" }, - "node_modules/rehype-wrap-all/node_modules/bcp-47-match": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/bcp-47-match/-/bcp-47-match-1.0.3.tgz", - "integrity": "sha512-LggQ4YTdjWQSKELZF5JwchnBa1u0pIQSZf5lSdOHEdbVP55h0qICA/FUp3+W99q0xqxYa1ZQizTUH87gecII5w==", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, - "node_modules/rehype-wrap-all/node_modules/comma-separated-tokens": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/comma-separated-tokens/-/comma-separated-tokens-1.0.8.tgz", - "integrity": "sha512-GHuDRO12Sypu2cV70d1dkA2EUmXHgntrzbpvOB+Qy+49ypNfGgFQIC2fhhXbnyrJRynDCAARsT7Ou0M6hirpfw==", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, - "node_modules/rehype-wrap-all/node_modules/css-selector-parser": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/css-selector-parser/-/css-selector-parser-1.4.1.tgz", - "integrity": "sha512-HYPSb7y/Z7BNDCOrakL4raGO2zltZkbeXyAd6Tg9obzix6QhzxCotdBl6VT0Dv4vZfJGVz3WL/xaEI9Ly3ul0g==" - }, - "node_modules/rehype-wrap-all/node_modules/direction": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/direction/-/direction-1.0.4.tgz", - "integrity": "sha512-GYqKi1aH7PJXxdhTeZBFrg8vUBeKXi+cNprXsC1kpJcbcVnV9wBsrOu1cQEdG0WeQwlfHiy3XvnKfIrJ2R0NzQ==", - "bin": { - "direction": "cli.js" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, - "node_modules/rehype-wrap-all/node_modules/hast-util-has-property": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/hast-util-has-property/-/hast-util-has-property-1.0.4.tgz", - "integrity": "sha512-ghHup2voGfgFoHMGnaLHOjbYFACKrRh9KFttdCzMCbFoBMJXiNi2+XTrPP8+q6cDJM/RSqlCfVWrjp1H201rZg==", - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/rehype-wrap-all/node_modules/hast-util-is-element": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/hast-util-is-element/-/hast-util-is-element-1.1.0.tgz", - "integrity": "sha512-oUmNua0bFbdrD/ELDSSEadRVtWZOf3iF6Lbv81naqsIV99RnSCieTbWuWCY8BAeEfKJTKl0gRdokv+dELutHGQ==", - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/rehype-wrap-all/node_modules/hast-util-select": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/hast-util-select/-/hast-util-select-4.0.2.tgz", - "integrity": "sha512-8EEG2//bN5rrzboPWD2HdS3ugLijNioS1pqOTIolXNf67xxShYw4SQEmVXd3imiBG+U2bC2nVTySr/iRAA7Cjg==", - "dependencies": { - "bcp-47-match": "^1.0.0", - "comma-separated-tokens": "^1.0.0", - "css-selector-parser": "^1.0.0", - "direction": "^1.0.0", - "hast-util-has-property": "^1.0.0", - "hast-util-is-element": "^1.0.0", - "hast-util-to-string": "^1.0.0", - "hast-util-whitespace": "^1.0.0", - "not": "^0.1.0", - "nth-check": "^2.0.0", - "property-information": "^5.0.0", - "space-separated-tokens": "^1.0.0", - "unist-util-visit": "^2.0.0", - "zwitch": "^1.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/rehype-wrap-all/node_modules/hast-util-to-string": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/hast-util-to-string/-/hast-util-to-string-1.0.4.tgz", - "integrity": "sha512-eK0MxRX47AV2eZ+Lyr18DCpQgodvaS3fAQO2+b9Two9F5HEoRPhiUMNzoXArMJfZi2yieFzUBMRl3HNJ3Jus3w==", - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/rehype-wrap-all/node_modules/hast-util-whitespace": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/hast-util-whitespace/-/hast-util-whitespace-1.0.4.tgz", - "integrity": "sha512-I5GTdSfhYfAPNztx2xJRQpG8cuDSNt599/7YUn7Gx/WxNMsG+a835k97TDkFgk123cwjfwINaZknkKkphx/f2A==", - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/rehype-wrap-all/node_modules/property-information": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/property-information/-/property-information-5.6.0.tgz", - "integrity": "sha512-YUHSPk+A30YPv+0Qf8i9Mbfe/C0hdPXk1s1jPVToV8pk8BQtpw10ct89Eo7OWkutrwqvT0eicAxlOg3dOAu8JA==", - "dependencies": { - "xtend": "^4.0.0" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, - "node_modules/rehype-wrap-all/node_modules/space-separated-tokens": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/space-separated-tokens/-/space-separated-tokens-1.1.5.tgz", - "integrity": "sha512-q/JSVd1Lptzhf5bkYm4ob4iWPjx0KiRe3sRFBNrVqbJkFaBm5vbbowy1mymoPNLRa52+oadOhJ+K49wsSeSjTA==", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, "node_modules/rehype-wrap-all/node_modules/unist-util-is": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-4.1.0.tgz", @@ -5894,15 +5947,6 @@ "url": "https://opencollective.com/unified" } }, - "node_modules/rehype-wrap-all/node_modules/zwitch": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/zwitch/-/zwitch-1.0.5.tgz", - "integrity": "sha512-V50KMwwzqJV0NpZIZFwfOD5/lyny3WlSzRiXgA0G7VUnRlqttta1L6UQIHzd6EuBY/cHGfwTIck7w1yH6Q5zUw==", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, "node_modules/remark-math": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/remark-math/-/remark-math-6.0.0.tgz", diff --git a/gui/src/util/ide.ts b/gui/src/util/ide.ts index 90af1d856..1cd49adb9 100644 --- a/gui/src/util/ide.ts +++ b/gui/src/util/ide.ts @@ -45,15 +45,16 @@ function _postToIde(messageType: string, data: any, messageId?: string) { export function postToIde( messageType: T, data: WebviewProtocol[T][0], + messageId?: string, attempt: number = 0 ) { try { - _postToIde(messageType, data); + _postToIde(messageType, data, messageId); } catch (error) { if (attempt < 5) { console.log(`Attempt ${attempt} failed. Retrying...`); setTimeout( - () => postToIde(messageType, data, attempt + 1), + () => postToIde(messageType, data, messageId, attempt + 1), Math.pow(2, attempt) * 1000 ); } else { @@ -85,7 +86,7 @@ export async function ideRequest( }; window.addEventListener("message", handler); - postToIde(messageType, data); + postToIde(messageType, data, messageId); }) as any; } @@ -96,7 +97,7 @@ export async function* ideStreamRequest( ): WebviewProtocol[T][1] { const messageId = uuidv4(); - postToIde(messageType, data); + postToIde(messageType, data, messageId); let buffer = ""; let index = 0; @@ -117,7 +118,7 @@ export async function* ideStreamRequest( window.addEventListener("message", handler); cancelToken?.addEventListener("abort", () => { - postToIde("abort", messageId); + postToIde("abort", undefined, messageId); }); while (!done) { From cc9f057454c73770c09e1bdbf32af55f7b95cfbc Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Wed, 14 Feb 2024 18:31:00 -0800 Subject: [PATCH 009/141] =?UTF-8?q?=F0=9F=90=9B=20stop=20infinite=20loop?= =?UTF-8?q?=20of=20messages=20between=20webview=20and=20ide?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- extensions/vscode/src/lang-server/completionProvider.ts | 1 + extensions/vscode/src/webviewProtocol.ts | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/vscode/src/lang-server/completionProvider.ts b/extensions/vscode/src/lang-server/completionProvider.ts index c2af7f2c4..626899754 100644 --- a/extensions/vscode/src/lang-server/completionProvider.ts +++ b/extensions/vscode/src/lang-server/completionProvider.ts @@ -15,6 +15,7 @@ import { ConfigHandler } from "core/config/handler"; import { streamLines } from "core/diff/util"; import OpenAI from "core/llm/llms/OpenAI"; import { logDevData } from "core/util/devdata"; +import Handlebars from "handlebars"; import { v4 as uuidv4 } from "uuid"; import * as vscode from "vscode"; import { TabAutocompleteModel } from "../util/loadAutocompleteModel"; diff --git a/extensions/vscode/src/webviewProtocol.ts b/extensions/vscode/src/webviewProtocol.ts index 2f83e8cb0..bbdf3d66b 100644 --- a/extensions/vscode/src/webviewProtocol.ts +++ b/extensions/vscode/src/webviewProtocol.ts @@ -98,7 +98,6 @@ export class VsCodeWebviewProtocol { }); } } - respond({ done: true, data: {} }); }); } From 3a39b4b28c50e86398fc3610a8fd8eb63a6e6bac Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Wed, 14 Feb 2024 18:47:29 -0800 Subject: [PATCH 010/141] =?UTF-8?q?=E2=9C=A8=20streaming?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- extensions/vscode/src/webviewProtocol.ts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/extensions/vscode/src/webviewProtocol.ts b/extensions/vscode/src/webviewProtocol.ts index bbdf3d66b..88d2d8039 100644 --- a/extensions/vscode/src/webviewProtocol.ts +++ b/extensions/vscode/src/webviewProtocol.ts @@ -65,7 +65,17 @@ export class VsCodeWebviewProtocol { for (const handler of handlers) { try { const response = await handler(msg); - respond(response || {}); + if ( + response && + typeof response[Symbol.asyncIterator] === "function" + ) { + for await (const update of response) { + respond(update); + } + respond({ done: true }); + } else { + respond(response || {}); + } } catch (e: any) { console.error( "Error handling webview message: " + From c54e2ce288d72dd45e21fefd7b73da8bbc3f5a3e Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Wed, 14 Feb 2024 20:21:04 -0800 Subject: [PATCH 011/141] =?UTF-8?q?=F0=9F=90=9B=20load=20onigasm.wasm=20in?= =?UTF-8?q?=20jetbrains?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- extensions/vscode/scripts/prepackage.js | 8 ++++++++ gui/src/main.tsx | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/extensions/vscode/scripts/prepackage.js b/extensions/vscode/scripts/prepackage.js index 4db78c7cb..756661d15 100644 --- a/extensions/vscode/scripts/prepackage.js +++ b/extensions/vscode/scripts/prepackage.js @@ -77,11 +77,19 @@ if (args[2] === "--target") { }); }); + // Put back index.html if (fs.existsSync(indexHtmlPath)) { fs.rmSync(indexHtmlPath, {}); } fs.copyFileSync("tmp_index.html", indexHtmlPath); fs.unlinkSync("tmp_index.html"); + + // Copy over other misc. files + fs.copyFileSync( + "../extensions/vscode/gui/onigasm.wasm", + path.join(intellijExtensionWebviewPath, "onigasm.wasm") + ); + console.log("[info] Copied gui build to Intellij extension"); // Then copy over the dist folder to the VSCode extension // diff --git a/gui/src/main.tsx b/gui/src/main.tsx index 9e46b8109..fe9196049 100644 --- a/gui/src/main.tsx +++ b/gui/src/main.tsx @@ -9,7 +9,7 @@ import "./index.css"; import { persistor, store } from "./redux/store"; (async () => { - const onigPath = (window as any).vscMediaUrl + "/onigasm.wasm"; + const onigPath = ((window as any).vscMediaUrl ?? "") + "/onigasm.wasm"; const resp = await fetch(onigPath); const onigWasm = await resp.arrayBuffer(); await loadWASM(onigWasm); From fb1d38436a8e49922984c7fbf67d903cb43a060d Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Wed, 14 Feb 2024 21:38:06 -0800 Subject: [PATCH 012/141] =?UTF-8?q?=F0=9F=9A=A7=20update=20jetbrains=20mes?= =?UTF-8?q?saging=20format?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../continue/IdeProtocolClient.kt | 26 ++----------------- .../factories/CustomhandlerFactory.kt | 2 +- .../ContinuePluginToolWindowFactory.kt | 22 +++++++++++----- gui/src/main.tsx | 1 + 4 files changed, 20 insertions(+), 31 deletions(-) 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 8a6f64ae4..b52384052 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 @@ -1,28 +1,19 @@ package com.github.continuedev.continueintellijextension.`continue` -import com.github.continuedev.continueintellijextension.* import com.github.continuedev.continueintellijextension.constants.* import com.github.continuedev.continueintellijextension.services.ContinuePluginService import com.google.gson.Gson import com.google.gson.GsonBuilder -import com.google.gson.JsonObject import com.google.gson.reflect.TypeToken -import com.intellij.execution.ExecutionManager -import com.intellij.execution.process.ProcessAdapter -import com.intellij.execution.process.ProcessEvent -import com.intellij.execution.ui.RunContentDescriptor import com.intellij.openapi.Disposable -import com.intellij.openapi.actionSystem.AnActionEvent import com.intellij.openapi.application.ApplicationInfo import com.intellij.openapi.application.ApplicationManager -import com.intellij.openapi.components.ServiceManager import com.intellij.openapi.editor.SelectionModel import com.intellij.openapi.fileEditor.FileDocumentManager import com.intellij.openapi.fileEditor.FileEditorManager import com.intellij.openapi.fileEditor.TextEditor import com.intellij.openapi.project.DumbAware import com.intellij.openapi.project.Project -import com.intellij.openapi.project.ProjectManagerListener import com.intellij.openapi.ui.MessageType import com.intellij.openapi.ui.popup.Balloon import com.intellij.openapi.ui.popup.JBPopupFactory @@ -32,15 +23,10 @@ import com.intellij.openapi.wm.WindowManager import com.intellij.testFramework.LightVirtualFile import com.intellij.ui.awt.RelativePoint import kotlinx.coroutines.* -import net.minidev.json.JSONObject -import org.jetbrains.annotations.NotNull import java.io.* import java.net.NetworkInterface import java.nio.charset.Charset -import java.nio.file.Files -import java.nio.file.Paths import java.util.* -import kotlin.coroutines.ContinuationInterceptor fun uuid(): String { @@ -146,27 +132,19 @@ class IdeProtocolClient ( continuePluginService.dispatchCustomEvent(json) } - fun handleWebsocketMessage(text: String) { + fun handleMessage(text: String, respond: (Any?) -> Unit) { coroutineScope.launch(Dispatchers.IO) { val parsedMessage: Map = Gson().fromJson( text, object : TypeToken>() {}.type ) - val messageType = parsedMessage["type"] as? String + val messageType = parsedMessage["messageType"] as? String if (messageType == null) { println("Recieved message without type: $text") return@launch } val data = parsedMessage["data"] as Map<*, *> - fun respond(responseData: Any?) { - if (data["messageId"] == null) { - println("Recieved message without messageId: $text") - return - } - send(messageType, responseData ?: emptyMap(), data["messageId"] as String); - } - val historyManager = HistoryManager() try { diff --git a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/factories/CustomhandlerFactory.kt b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/factories/CustomhandlerFactory.kt index 0bc9d70e6..4b3c3cdcd 100644 --- a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/factories/CustomhandlerFactory.kt +++ b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/factories/CustomhandlerFactory.kt @@ -35,7 +35,7 @@ class CustomResourceHandler : CefResourceHandler, DumbAware { ): Boolean { val url = cefRequest.url return if (url != null) { - val pathToResource = url.replace("http://continue", "webview/") + val pathToResource = url.replace("http://continue", "webview/").replace("http://localhost:5173", "webview/") val newUrl = javaClass.classLoader.getResource(pathToResource) state = OpenedConnection(newUrl?.openConnection()) currentUrl = url diff --git a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/toolWindow/ContinuePluginToolWindowFactory.kt b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/toolWindow/ContinuePluginToolWindowFactory.kt index 8f83decf7..50451b02f 100644 --- a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/toolWindow/ContinuePluginToolWindowFactory.kt +++ b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/toolWindow/ContinuePluginToolWindowFactory.kt @@ -68,6 +68,7 @@ class ContinuePluginToolWindowFactory : ToolWindowFactory, DumbAware { registerAppSchemeHandler() browser.loadURL("http://continue/index.html") +// browser.loadURL("http://localhost:5173/index.html") Disposer.register(project, browser) val continuePluginService = ServiceManager.getService( @@ -81,12 +82,23 @@ class ContinuePluginToolWindowFactory : ToolWindowFactory, DumbAware { myJSQueryOpenInBrowser.addHandler { msg: String? -> val parser = JsonParser() val json: JsonObject = parser.parse(msg).asJsonObject - val type = json.get("type").asString + val messageType = json.get("messageType").asString val data = json.get("data").asJsonObject + val messageId = json.get("messageId").asString val ide = continuePluginService.ideProtocolClient; - when (type) { + val respond = fun(data: Any?) { + val jsonData = mutableMapOf( + "messageId" to messageId, + "data" to data, + "messageType" to messageType + ) + val jsonString = Gson().toJson(jsonData) + browser.executeJavaScriptAsync("""window.postMessage($jsonString, "*");""") + } + + when (messageType) { "onLoad" -> { GlobalScope.launch { // Set the colors to match Intellij theme @@ -121,14 +133,12 @@ class ContinuePluginToolWindowFactory : ToolWindowFactory, DumbAware { browser.executeJavaScriptAsync("document.body.style.setProperty(\"--vscode-editor-background\", \"$defaultBackgroundHex\");") val jsonData = mutableMapOf( - "type" to "onLoad", "windowId" to continuePluginService.windowId, "workspacePaths" to continuePluginService.worksapcePaths, "vscMachineId" to getMachineUniqueID(), "vscMediaUrl" to "http://continue", ) - val jsonString = Gson().toJson(jsonData) - browser.executeJavaScriptAsync("""window.postMessage($jsonString, "*");""") + respond(jsonData) } } @@ -172,7 +182,7 @@ class ContinuePluginToolWindowFactory : ToolWindowFactory, DumbAware { // IDE // else -> { if (msg != null) { - ide?.handleWebsocketMessage(msg) + ide?.handleMessage(msg, respond) } } } diff --git a/gui/src/main.tsx b/gui/src/main.tsx index fe9196049..be4348f20 100644 --- a/gui/src/main.tsx +++ b/gui/src/main.tsx @@ -9,6 +9,7 @@ import "./index.css"; import { persistor, store } from "./redux/store"; (async () => { + // "" lets it pass through to the correct path for JetBrains const onigPath = ((window as any).vscMediaUrl ?? "") + "/onigasm.wasm"; const resp = await fetch(onigPath); const onigWasm = await resp.arrayBuffer(); From 758a81c7373f398294ccb80d00a5c7d181f151d7 Mon Sep 17 00:00:00 2001 From: Nicholas Wengel Date: Wed, 14 Feb 2024 22:13:08 -0700 Subject: [PATCH 013/141] feat: postgres context provider first slice --- .../providers/PostgresContextProvider.ts | 143 ++++++++++++++++++ core/context/providers/index.ts | 2 + core/index.d.ts | 3 +- 3 files changed, 147 insertions(+), 1 deletion(-) create mode 100644 core/context/providers/PostgresContextProvider.ts diff --git a/core/context/providers/PostgresContextProvider.ts b/core/context/providers/PostgresContextProvider.ts new file mode 100644 index 000000000..b76748a64 --- /dev/null +++ b/core/context/providers/PostgresContextProvider.ts @@ -0,0 +1,143 @@ +import { BaseContextProvider } from ".."; +import { + ContextItem, + ContextProviderDescription, + ContextProviderExtras, + LoadSubmenuItemsArgs, + ContextSubmenuItem, +} from "../.."; + +const ALL_TABLES = "__all_tables"; +const DEFAULT_SAMPLE_ROWS = 3; + +class PostgresContextProvider extends BaseContextProvider { + static description: ContextProviderDescription = { + title: "postgres", + displayTitle: "PostgreSQL", + description: "Retrieve PostgreSQL table schema and sample rows", + type: "submenu", + }; + + constructor(options: { + host: string; + port: number; + user: string; + password: string; + database: string; + schema?: string; + sampleRows?: number; + }) { + super(options); + } + + private async getPool() { + const pg = await require("pg"); + return new pg.Pool({ + host: this.options.host, + port: this.options.port, + user: this.options.user, + password: this.options.password, + database: this.options.database, + }); + } + + async getContextItems( + query: string = "", + _: ContextProviderExtras = {} as ContextProviderExtras + ): Promise { + const pool = await this.getPool(); + + try { + const contextItems: ContextItem[] = []; + + var schemaQuery = ` +SELECT column_name, data_type, character_maximum_length +FROM INFORMATION_SCHEMA.COLUMNS`; + if (this.options.query != ALL_TABLES) { + // Get the table schema + const tableName = query; + if (!tableName.includes(".")) { + throw new Error( + `Table name must be in format schema.table_name, got ${tableName}` + ); + } + schemaQuery += `WHERE table_name = '${tableName.split(".")[1]}'`; + } + + const { rows: tableSchemas } = await pool.query(schemaQuery); + + var prompt = `Postgres schema for database ${this.options.database}`; + for (const tableSchema of tableSchemas) { + const tableName = query; + + // Get the sample rows + const sampleRows = this.options.sampleRows ?? DEFAULT_SAMPLE_ROWS; + const { rows: sampleRowResults } = await pool.query(` +SELECT * +FROM ${tableName} +LIMIT ${sampleRows}`); + + // Create prompt from the table schema and sample rows + var prompt = `Table schema for ${tableName}:\n${JSON.stringify( + tableSchema, + null, + 2 + )}\n\n`; + prompt += `Sample rows: ${JSON.stringify(sampleRowResults, null, 2)}`; + } + + contextItems.push({ + name: `${this.options.database}-${query}-schema-and-sample-rows`, + description: `Schema and sample rows for ${ + query == ALL_TABLES ? "all table" : query + } in ${this.options.database} database`, + content: prompt, + }); + + return contextItems; + } catch (error) { + throw new Error(`Failed to query PostgreSQL database: ${error}`); + } finally { + } + } + + async loadSubmenuItems( + _: LoadSubmenuItemsArgs + ): Promise { + const pool = await this.getPool(); + + const schema = this.options.schema ?? "public"; + var tablesInfoQuery = ` +SELECT table_schema, table_name +FROM information_schema.tables`; + if (schema != null) { + tablesInfoQuery += ` WHERE table_schema = '${schema}'`; + } + const tablesInfo = await pool.query(tablesInfoQuery).rows; + + try { + const contextItems: ContextSubmenuItem[] = []; + + for (const tableInfo of tablesInfo) { + const tableName = `${tableInfo.table_schema}.${tableInfo.table_name}`; + + contextItems.push({ + id: tableName, + title: tableName, + description: `Schema from ${tableName} and ${this.options.sampleRows} sample rows.`, + }); + contextItems.push({ + id: ALL_TABLES, + title: "All tables", + description: `Schema from all tables and ${this.options.sampleRows} sample rows each.`, + }); + } + + return contextItems; + } catch (error) { + throw new Error(`Failed to query PostgreSQL database: ${error}`); + } + } +} + +export default PostgresContextProvider; diff --git a/core/context/providers/index.ts b/core/context/providers/index.ts index e335a8363..eff3c3b62 100644 --- a/core/context/providers/index.ts +++ b/core/context/providers/index.ts @@ -15,6 +15,7 @@ import ProblemsContextProvider from "./ProblemsContextProvider"; import SearchContextProvider from "./SearchContextProvider"; import TerminalContextProvider from "./TerminalContextProvider"; import URLContextProvider from "./URLContextProvider"; +import PostgresContextProvider from "./PostgresContextProvider"; const Providers: (typeof BaseContextProvider)[] = [ DiffContextProvider, @@ -32,6 +33,7 @@ const Providers: (typeof BaseContextProvider)[] = [ DocsContextProvider, CodeHighlightsContextProvider, CodeOutlineContextProvider, + PostgresContextProvider, ]; export function contextProviderClassFromName( diff --git a/core/index.d.ts b/core/index.d.ts index 1a1407d52..bb6f6be94 100644 --- a/core/index.d.ts +++ b/core/index.d.ts @@ -414,7 +414,8 @@ type ContextProviderName = | "http" | "codebase" | "problems" - | "folder"; + | "folder" + | "postgres"; type TemplateType = | "llama2" From 666fb186d6b4cee9dcc95e1adc6b42748300de4c Mon Sep 17 00:00:00 2001 From: Nicholas Wengel Date: Wed, 14 Feb 2024 22:20:38 -0700 Subject: [PATCH 014/141] feat: vscode config for json --- extensions/vscode/config_schema.json | 67 +++++++++++++++++++++++++++- 1 file changed, 65 insertions(+), 2 deletions(-) diff --git a/extensions/vscode/config_schema.json b/extensions/vscode/config_schema.json index 746737b6a..4e3514bb3 100644 --- a/extensions/vscode/config_schema.json +++ b/extensions/vscode/config_schema.json @@ -989,7 +989,8 @@ "docs", "tree", "highlights", - "outline" + "outline", + "postgres" ], "markdownEnumDescriptions": [ "Reference the contents of the current changes as given by `git diff`", @@ -1007,7 +1008,8 @@ "Display a file tree of the current workspace", "Include a repo map showing important code objects", "Displays important snippets of code from the currently open files", - "Displays definition lines from the currently open files" + "Displays definition lines from the currently open files", + "References Postgres table schema and sample rows" ], "type": "string" }, @@ -1169,6 +1171,67 @@ } } } + }, + { + "if": { + "properties": { + "name": { + "enum": [ + "postgres" + ] + } + } + }, + "then": { + "properties": { + "params": { + "properties": { + "host": { + "title": "Host", + "description": "Database host", + "default": "localhost", + "type": "string" + }, + "port": { + "title": "Port", + "description": "Database port", + "default": 5432, + "type": "integer" + }, + "user": { + "title": "User", + "description": "Database user", + "default": "postgres", + "type": "string" + }, + "password": { + "title": "Password", + "description": "Database password", + "type": "string" + }, + "database": { + "title": "Database", + "description": "Database name", + "default": "postgres", + "type": "string" + }, + "schema": { + "title": "Schema", + "description": "Database schema", + "default": "public", + "type": "string" + }, + "sampleRows": { + "title": "Sample Rows", + "description": "Number of rows to sample from the database", + "default": 3, + "type": "integer" + } + } + } + }, + "required": ["host", "port", "user", "password", "database"] + } } ], "required": ["name"] From 756cb7fead383fe649a5d70692b52109c6da01be Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Wed, 14 Feb 2024 23:14:29 -0800 Subject: [PATCH 015/141] =?UTF-8?q?=F0=9F=91=B7=20build=20with=20pkg?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/.continueignore | 1 + pkg/.gitignore | 4 + pkg/build.js | 34 + pkg/importMetaUrl.js | 2 + pkg/package-lock.json | 2480 +++++++++++++++++++++++++++ pkg/package.json | 41 + {core/ipc => pkg/src}/IpcIde.ts | 2 +- {core/ipc => pkg/src}/core.ts | 16 +- core/ipc/cli.ts => pkg/src/index.ts | 0 {core/ipc => pkg/src}/messenger.ts | 4 +- pkg/tsconfig.json | 19 + 11 files changed, 2592 insertions(+), 11 deletions(-) create mode 100644 pkg/.continueignore create mode 100644 pkg/.gitignore create mode 100644 pkg/build.js create mode 100644 pkg/importMetaUrl.js create mode 100644 pkg/package-lock.json create mode 100644 pkg/package.json rename {core/ipc => pkg/src}/IpcIde.ts (97%) rename {core/ipc => pkg/src}/core.ts (87%) rename core/ipc/cli.ts => pkg/src/index.ts (100%) rename {core/ipc => pkg/src}/messenger.ts (98%) create mode 100644 pkg/tsconfig.json diff --git a/pkg/.continueignore b/pkg/.continueignore new file mode 100644 index 000000000..01b7e33fd --- /dev/null +++ b/pkg/.continueignore @@ -0,0 +1 @@ +**/* \ No newline at end of file diff --git a/pkg/.gitignore b/pkg/.gitignore new file mode 100644 index 000000000..49383d4fc --- /dev/null +++ b/pkg/.gitignore @@ -0,0 +1,4 @@ +node_modules +bin +data +out \ No newline at end of file diff --git a/pkg/build.js b/pkg/build.js new file mode 100644 index 000000000..b55bfbf72 --- /dev/null +++ b/pkg/build.js @@ -0,0 +1,34 @@ +const esbuild = require("esbuild"); +const { execSync } = require("child_process"); + +const esbuildOutputFile = "out/index.js"; + +(async () => { + // console.log("[info] Building with ncc..."); + // execSync(`npx ncc build src/index.ts -o out`); + + console.log("[info] Building with esbuild..."); + // Bundles the extension into one file + await esbuild.build({ + entryPoints: ["src/index.ts"], + bundle: true, + outfile: esbuildOutputFile, + external: ["esbuild"], + format: "cjs", + platform: "node", + sourcemap: true, + loader: { + // eslint-disable-next-line @typescript-eslint/naming-convention + ".node": "file", + }, + + // To allow import.meta.path for transformers.js + // https://github.com/evanw/esbuild/issues/1492#issuecomment-893144483 + inject: ["./importMetaUrl.js"], + define: { "import.meta.url": "importMetaUrl" }, + }); + + console.log("[info] Building binary with pkg..."); + execSync("npx pkg ."); + console.log("[info] Done!"); +})(); diff --git a/pkg/importMetaUrl.js b/pkg/importMetaUrl.js new file mode 100644 index 000000000..0508c8d33 --- /dev/null +++ b/pkg/importMetaUrl.js @@ -0,0 +1,2 @@ +// https://github.com/evanw/esbuild/issues/1492#issuecomment-893144483 +export var importMetaUrl = require("url").pathToFileURL(__filename); diff --git a/pkg/package-lock.json b/pkg/package-lock.json new file mode 100644 index 000000000..973d4c0a7 --- /dev/null +++ b/pkg/package-lock.json @@ -0,0 +1,2480 @@ +{ + "name": "pkg", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "pkg", + "version": "1.0.0", + "license": "ISC", + "dependencies": { + "commander": "^12.0.0", + "core": "file:../core", + "uuid": "^9.0.1", + "vectordb": "^0.4.10" + }, + "bin": { + "pkg": "out/index.js" + }, + "devDependencies": { + "@types/uuid": "^9.0.8", + "@vercel/ncc": "^0.38.1", + "esbuild": "^0.19.11", + "pkg": "^5.8.1", + "typescript": "^5.3.3" + } + }, + "../core": { + "version": "1.0.0", + "license": "Apache-2.0", + "dependencies": { + "@octokit/rest": "^20.0.2", + "@types/node-fetch": "^2.6.11", + "@xenova/transformers": "^2.14.0", + "cheerio": "^1.0.0-rc.12", + "commander": "^12.0.0", + "dotenv": "^16.3.1", + "fastest-levenshtein": "^1.0.16", + "follow-redirects": "^1.15.5", + "handlebars": "^4.7.8", + "http-proxy-agent": "^7.0.1", + "https-proxy-agent": "^7.0.3", + "js-tiktoken": "^1.0.8", + "llm-code-highlighter": "^0.0.5", + "node-fetch": "^3.3.2", + "node-html-markdown": "^1.3.0", + "ollama": "^0.4.6", + "openai": "^4.20.1", + "posthog-node": "^3.6.2", + "replicate": "^0.26.0", + "socket.io-client": "^4.7.3", + "sqlite": "^5.1.1", + "sqlite3": "^5.1.7", + "tree-sitter-wasms": "^0.1.6", + "uuid": "^9.0.1", + "vectordb": "^0.4.3", + "web-tree-sitter": "^0.20.8" + }, + "devDependencies": { + "@types/follow-redirects": "^1.14.4", + "@types/handlebars": "^4.1.0", + "@types/jest": "^29.5.11", + "@types/jquery": "^3.5.29", + "@types/mustache": "^4.2.5", + "@types/uuid": "^9.0.7", + "esbuild": "^0.19.11", + "jest": "^29.7.0", + "ts-jest": "^29.1.1" + } + }, + "node_modules/@75lb/deep-merge": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@75lb/deep-merge/-/deep-merge-1.1.1.tgz", + "integrity": "sha512-xvgv6pkMGBA6GwdyJbNAnDmfAIR/DfWhrj9jgWh3TY7gRm3KO46x/GPjRg6wJ0nOepwqrNxFfojebh0Df4h4Tw==", + "dependencies": { + "lodash.assignwith": "^4.2.0", + "typical": "^7.1.1" + }, + "engines": { + "node": ">=12.17" + } + }, + "node_modules/@75lb/deep-merge/node_modules/typical": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/typical/-/typical-7.1.1.tgz", + "integrity": "sha512-T+tKVNs6Wu7IWiAce5BgMd7OZfNYUndHwc5MknN+UHOudi7sGZzuHdCadllRuqJ3fPtgFtIH9+lt9qRv6lmpfA==", + "engines": { + "node": ">=12.17" + } + }, + "node_modules/@apache-arrow/ts": { + "version": "14.0.2", + "resolved": "https://registry.npmjs.org/@apache-arrow/ts/-/ts-14.0.2.tgz", + "integrity": "sha512-CtwAvLkK0CZv7xsYeCo91ml6PvlfzAmAJZkRYuz2GNBwfYufj5SVi0iuSMwIMkcU/szVwvLdzORSLa5PlF/2ug==", + "dependencies": { + "@types/command-line-args": "5.2.0", + "@types/command-line-usage": "5.0.2", + "@types/node": "20.3.0", + "@types/pad-left": "2.1.1", + "command-line-args": "5.2.1", + "command-line-usage": "7.0.1", + "flatbuffers": "23.5.26", + "json-bignum": "^0.0.3", + "pad-left": "^2.1.0", + "tslib": "^2.5.3" + } + }, + "node_modules/@babel/generator": { + "version": "7.18.2", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.18.2.tgz", + "integrity": "sha512-W1lG5vUwFvfMd8HVXqdfbuG7RuaSrTCCD8cl8fP8wOivdbtbIg2Db3IWUcgvfxKbbn6ZBGYRW/Zk1MIwK49mgw==", + "dev": true, + "dependencies": { + "@babel/types": "^7.18.2", + "@jridgewell/gen-mapping": "^0.3.0", + "jsesc": "^2.5.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-string-parser": { + "version": "7.23.4", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.23.4.tgz", + "integrity": "sha512-803gmbQdqwdf4olxrX4AJyFBV/RTr3rSmOj0rKwesmzlfhYNDEs+/iOcznzpNWlJlIlTJC2QfPFcHB6DlzdVLQ==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", + "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/parser": { + "version": "7.18.4", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.18.4.tgz", + "integrity": "sha512-FDge0dFazETFcxGw/EXzOkN8uJp0PC7Qbm+Pe9T+av2zlBpOgunFHkQPPn+eRuClU73JF+98D531UgayY89tow==", + "dev": true, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/types": { + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.19.0.tgz", + "integrity": "sha512-YuGopBq3ke25BVSiS6fgF49Ul9gH1x70Bcr6bqRLjWCkcX8Hre1/5+z+IiWOIerRMSSEfGZVB9z9kyq7wVs9YA==", + "dev": true, + "dependencies": { + "@babel/helper-string-parser": "^7.18.10", + "@babel/helper-validator-identifier": "^7.18.6", + "to-fast-properties": "^2.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.19.11.tgz", + "integrity": "sha512-FnzU0LyE3ySQk7UntJO4+qIiQgI7KoODnZg5xzXIrFJlKd2P2gwHsHY4927xj9y5PJmJSzULiUCWmv7iWnNa7g==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.19.11.tgz", + "integrity": "sha512-5OVapq0ClabvKvQ58Bws8+wkLCV+Rxg7tUVbo9xu034Nm536QTII4YzhaFriQ7rMrorfnFKUsArD2lqKbFY4vw==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.19.11.tgz", + "integrity": "sha512-aiu7K/5JnLj//KOnOfEZ0D90obUkRzDMyqd/wNAUQ34m4YUPVhRZpnqKV9uqDGxT7cToSDnIHsGooyIczu9T+Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.19.11.tgz", + "integrity": "sha512-eccxjlfGw43WYoY9QgB82SgGgDbibcqyDTlk3l3C0jOVHKxrjdc9CTwDUQd0vkvYg5um0OH+GpxYvp39r+IPOg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.19.11.tgz", + "integrity": "sha512-ETp87DRWuSt9KdDVkqSoKoLFHYTrkyz2+65fj9nfXsaV3bMhTCjtQfw3y+um88vGRKRiF7erPrh/ZuIdLUIVxQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.19.11.tgz", + "integrity": "sha512-fkFUiS6IUK9WYUO/+22omwetaSNl5/A8giXvQlcinLIjVkxwTLSktbF5f/kJMftM2MJp9+fXqZ5ezS7+SALp4g==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.19.11.tgz", + "integrity": "sha512-lhoSp5K6bxKRNdXUtHoNc5HhbXVCS8V0iZmDvyWvYq9S5WSfTIHU2UGjcGt7UeS6iEYp9eeymIl5mJBn0yiuxA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.19.11.tgz", + "integrity": "sha512-JkUqn44AffGXitVI6/AbQdoYAq0TEullFdqcMY/PCUZ36xJ9ZJRtQabzMA+Vi7r78+25ZIBosLTOKnUXBSi1Kw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.19.11.tgz", + "integrity": "sha512-3CRkr9+vCV2XJbjwgzjPtO8T0SZUmRZla+UL1jw+XqHZPkPgZiyWvbDvl9rqAN8Zl7qJF0O/9ycMtjU67HN9/Q==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.19.11.tgz", + "integrity": "sha512-LneLg3ypEeveBSMuoa0kwMpCGmpu8XQUh+mL8XXwoYZ6Be2qBnVtcDI5azSvh7vioMDhoJFZzp9GWp9IWpYoUg==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.19.11.tgz", + "integrity": "sha512-caHy++CsD8Bgq2V5CodbJjFPEiDPq8JJmBdeyZ8GWVQMjRD0sU548nNdwPNvKjVpamYYVL40AORekgfIubwHoA==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.19.11.tgz", + "integrity": "sha512-ppZSSLVpPrwHccvC6nQVZaSHlFsvCQyjnvirnVjbKSHuE5N24Yl8F3UwYUUR1UEPaFObGD2tSvVKbvR+uT1Nrg==", + "cpu": [ + "loong64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.19.11.tgz", + "integrity": "sha512-B5x9j0OgjG+v1dF2DkH34lr+7Gmv0kzX6/V0afF41FkPMMqaQ77pH7CrhWeR22aEeHKaeZVtZ6yFwlxOKPVFyg==", + "cpu": [ + "mips64el" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.19.11.tgz", + "integrity": "sha512-MHrZYLeCG8vXblMetWyttkdVRjQlQUb/oMgBNurVEnhj4YWOr4G5lmBfZjHYQHHN0g6yDmCAQRR8MUHldvvRDA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.19.11.tgz", + "integrity": "sha512-f3DY++t94uVg141dozDu4CCUkYW+09rWtaWfnb3bqe4w5NqmZd6nPVBm+qbz7WaHZCoqXqHz5p6CM6qv3qnSSQ==", + "cpu": [ + "riscv64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.19.11.tgz", + "integrity": "sha512-A5xdUoyWJHMMlcSMcPGVLzYzpcY8QP1RtYzX5/bS4dvjBGVxdhuiYyFwp7z74ocV7WDc0n1harxmpq2ePOjI0Q==", + "cpu": [ + "s390x" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.19.11.tgz", + "integrity": "sha512-grbyMlVCvJSfxFQUndw5mCtWs5LO1gUlwP4CDi4iJBbVpZcqLVT29FxgGuBJGSzyOxotFG4LoO5X+M1350zmPA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.19.11.tgz", + "integrity": "sha512-13jvrQZJc3P230OhU8xgwUnDeuC/9egsjTkXN49b3GcS5BKvJqZn86aGM8W9pd14Kd+u7HuFBMVtrNGhh6fHEQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.19.11.tgz", + "integrity": "sha512-ysyOGZuTp6SNKPE11INDUeFVVQFrhcNDVUgSQVDzqsqX38DjhPEPATpid04LCoUr2WXhQTEZ8ct/EgJCUDpyNw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.19.11.tgz", + "integrity": "sha512-Hf+Sad9nVwvtxy4DXCZQqLpgmRTQqyFyhT3bZ4F2XlJCjxGmRFF0Shwn9rzhOYRB61w9VMXUkxlBy56dk9JJiQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.19.11.tgz", + "integrity": "sha512-0P58Sbi0LctOMOQbpEOvOL44Ne0sqbS0XWHMvvrg6NE5jQ1xguCSSw9jQeUk2lfrXYsKDdOe6K+oZiwKPilYPQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.19.11.tgz", + "integrity": "sha512-6YOrWS+sDJDmshdBIQU+Uoyh7pQKrdykdefC1avn76ss5c+RN6gut3LZA4E2cH5xUEp5/cA0+YxRaVtRAb0xBg==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.19.11.tgz", + "integrity": "sha512-vfkhltrjCAb603XaFhqhAF4LGDi2M4OrCRrFusyQ+iTLQ/o60QQXxc9cZC/FFpihBI9N1Grn6SMKVJ4KP7Fuiw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", + "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==", + "dev": true, + "dependencies": { + "@jridgewell/set-array": "^1.0.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.9" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz", + "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==", + "dev": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/set-array": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", + "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", + "dev": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.4.15", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", + "dev": true + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.21", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.21.tgz", + "integrity": "sha512-SRfKmRe1KvYnxjEMtxEr+J4HIeMX5YBg/qhRHpxEIGjhX1rshcHlnFUE9K0GazhVKWM7B+nARSkV8LuvJdJ5/g==", + "dev": true, + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "node_modules/@lancedb/vectordb-darwin-arm64": { + "version": "0.4.10", + "resolved": "https://registry.npmjs.org/@lancedb/vectordb-darwin-arm64/-/vectordb-darwin-arm64-0.4.10.tgz", + "integrity": "sha512-y/uHOGb0g15pvqv5tdTyZ6oN+0QVpBmZDzKFWW6pPbuSZjB2uPqcs+ti0RB+AUdmS21kavVQqaNsw/HLKEGrHA==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@lancedb/vectordb-darwin-x64": { + "version": "0.4.10", + "resolved": "https://registry.npmjs.org/@lancedb/vectordb-darwin-x64/-/vectordb-darwin-x64-0.4.10.tgz", + "integrity": "sha512-XbfR58OkQpAe0xMSTrwJh9ZjGSzG9EZ7zwO6HfYem8PxcLYAcC6eWRWoSG/T0uObyrPTcYYyvHsp0eNQWYBFAQ==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@lancedb/vectordb-linux-arm64-gnu": { + "version": "0.4.10", + "resolved": "https://registry.npmjs.org/@lancedb/vectordb-linux-arm64-gnu/-/vectordb-linux-arm64-gnu-0.4.10.tgz", + "integrity": "sha512-x40WKH9b+KxorRmKr9G7fv8p5mMj8QJQvRMA0v6v+nbZHr2FLlAZV+9mvhHOnm4AGIkPP5335cUgv6Qz6hgwkQ==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@lancedb/vectordb-linux-x64-gnu": { + "version": "0.4.10", + "resolved": "https://registry.npmjs.org/@lancedb/vectordb-linux-x64-gnu/-/vectordb-linux-x64-gnu-0.4.10.tgz", + "integrity": "sha512-CTGPpuzlqq2nVjUxI9gAJOT1oBANIovtIaFsOmBSnEAHgX7oeAxKy2b6L/kJzsgqSzvR5vfLwYcWFrr6ZmBxSA==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@lancedb/vectordb-win32-x64-msvc": { + "version": "0.4.10", + "resolved": "https://registry.npmjs.org/@lancedb/vectordb-win32-x64-msvc/-/vectordb-win32-x64-msvc-0.4.10.tgz", + "integrity": "sha512-Fd7r74coZyrKzkfXg4WthqOL+uKyJyPTia6imcrMNqKOlTGdKmHf02Qi2QxWZrFaabkRYo4Tpn5FeRJ3yYX8CA==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@neon-rs/load": { + "version": "0.0.74", + "resolved": "https://registry.npmjs.org/@neon-rs/load/-/load-0.0.74.tgz", + "integrity": "sha512-/cPZD907UNz55yrc/ud4wDgQKtU1TvkD9jeqZWG6J4IMmZkp6zgjkQcKA8UvpkZlcpPHvc8J17sGzLFbP/LUYg==" + }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@types/command-line-args": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/@types/command-line-args/-/command-line-args-5.2.0.tgz", + "integrity": "sha512-UuKzKpJJ/Ief6ufIaIzr3A/0XnluX7RvFgwkV89Yzvm77wCh1kFaFmqN8XEnGcN62EuHdedQjEMb8mYxFLGPyA==" + }, + "node_modules/@types/command-line-usage": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/@types/command-line-usage/-/command-line-usage-5.0.2.tgz", + "integrity": "sha512-n7RlEEJ+4x4TS7ZQddTmNSxP+zziEG0TNsMfiRIxcIVXt71ENJ9ojeXmGO3wPoTdn7pJcU2xc3CJYMktNT6DPg==" + }, + "node_modules/@types/node": { + "version": "20.3.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.3.0.tgz", + "integrity": "sha512-cumHmIAf6On83X7yP+LrsEyUOf/YlociZelmpRYaGFydoaPdxdt80MAbu6vWerQT2COCp2nPvHdsbD7tHn/YlQ==" + }, + "node_modules/@types/pad-left": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@types/pad-left/-/pad-left-2.1.1.tgz", + "integrity": "sha512-Xd22WCRBydkGSApl5Bw0PhAOHKSVjNL3E3AwzKaps96IMraPqy5BvZIsBVK6JLwdybUzjHnuWVwpDd0JjTfHXA==" + }, + "node_modules/@types/uuid": { + "version": "9.0.8", + "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-9.0.8.tgz", + "integrity": "sha512-jg+97EGIcY9AGHJJRaaPVgetKDsrTgbRjQ5Msgjh/DQKEFl0DtyRr/VCOyD1T2R1MNeWPK/u7JoGhlDZnKBAfA==", + "dev": true + }, + "node_modules/@vercel/ncc": { + "version": "0.38.1", + "resolved": "https://registry.npmjs.org/@vercel/ncc/-/ncc-0.38.1.tgz", + "integrity": "sha512-IBBb+iI2NLu4VQn3Vwldyi2QwaXt5+hTyh58ggAMoCGE6DJmPvwL3KPBWcJl1m9LYPChBLE980Jw+CS4Wokqxw==", + "dev": true, + "bin": { + "ncc": "dist/ncc/cli.js" + } + }, + "node_modules/agent-base": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "dev": true, + "dependencies": { + "debug": "4" + }, + "engines": { + "node": ">= 6.0.0" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/apache-arrow": { + "version": "14.0.2", + "resolved": "https://registry.npmjs.org/apache-arrow/-/apache-arrow-14.0.2.tgz", + "integrity": "sha512-EBO2xJN36/XoY81nhLcwCJgFwkboDZeyNQ+OPsG7bCoQjc2BT0aTyH/MR6SrL+LirSNz+cYqjGRlupMMlP1aEg==", + "dependencies": { + "@types/command-line-args": "5.2.0", + "@types/command-line-usage": "5.0.2", + "@types/node": "20.3.0", + "@types/pad-left": "2.1.1", + "command-line-args": "5.2.1", + "command-line-usage": "7.0.1", + "flatbuffers": "23.5.26", + "json-bignum": "^0.0.3", + "pad-left": "^2.1.0", + "tslib": "^2.5.3" + }, + "bin": { + "arrow2csv": "bin/arrow2csv.js" + } + }, + "node_modules/array-back": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/array-back/-/array-back-3.1.0.tgz", + "integrity": "sha512-TkuxA4UCOvxuDK6NZYXCalszEzj+TLszyASooky+i742l9TqsOdYCMJJupxRic61hwquNtppB3hgcuq9SVSH1Q==", + "engines": { + "node": ">=6" + } + }, + "node_modules/array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" + }, + "node_modules/at-least-node": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz", + "integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==", + "dev": true, + "engines": { + "node": ">= 4.0.0" + } + }, + "node_modules/axios": { + "version": "1.6.7", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.7.tgz", + "integrity": "sha512-/hDJGff6/c7u0hDkvkGxR/oy6CbCs8ziCsC7SqmhjfozqiJGc8Z11wrv9z9lYfY4K8l+H9TpjcMDX0xOZmx+RA==", + "dependencies": { + "follow-redirects": "^1.15.4", + "form-data": "^4.0.0", + "proxy-from-env": "^1.1.0" + } + }, + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/bl": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", + "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", + "dev": true, + "dependencies": { + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + } + }, + "node_modules/bl/node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dev": true, + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "dependencies": { + "fill-range": "^7.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/chalk-template": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/chalk-template/-/chalk-template-0.4.0.tgz", + "integrity": "sha512-/ghrgmhfY8RaSdeo43hNXxpoHAtxdbskUHjPpfqUWGttFgycUhYPGx3YZBCnUCvOa7Doivn1IZec3DEGFoMgLg==", + "dependencies": { + "chalk": "^4.1.2" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/chalk-template?sponsor=1" + } + }, + "node_modules/chownr": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", + "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==", + "dev": true + }, + "node_modules/cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "dev": true, + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/command-line-args": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/command-line-args/-/command-line-args-5.2.1.tgz", + "integrity": "sha512-H4UfQhZyakIjC74I9d34fGYDwk3XpSr17QhEd0Q3I9Xq1CETHo4Hcuo87WyWHpAF1aSLjLRf5lD9ZGX2qStUvg==", + "dependencies": { + "array-back": "^3.1.0", + "find-replace": "^3.0.0", + "lodash.camelcase": "^4.3.0", + "typical": "^4.0.0" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/command-line-usage": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/command-line-usage/-/command-line-usage-7.0.1.tgz", + "integrity": "sha512-NCyznE//MuTjwi3y84QVUGEOT+P5oto1e1Pk/jFPVdPPfsG03qpTIl3yw6etR+v73d0lXsoojRpvbru2sqePxQ==", + "dependencies": { + "array-back": "^6.2.2", + "chalk-template": "^0.4.0", + "table-layout": "^3.0.0", + "typical": "^7.1.1" + }, + "engines": { + "node": ">=12.20.0" + } + }, + "node_modules/command-line-usage/node_modules/array-back": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/array-back/-/array-back-6.2.2.tgz", + "integrity": "sha512-gUAZ7HPyb4SJczXAMUXMGAvI976JoK3qEx9v1FTmeYuJj0IBiaKttG1ydtGKdkfqWkIkouke7nG8ufGy77+Cvw==", + "engines": { + "node": ">=12.17" + } + }, + "node_modules/command-line-usage/node_modules/typical": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/typical/-/typical-7.1.1.tgz", + "integrity": "sha512-T+tKVNs6Wu7IWiAce5BgMd7OZfNYUndHwc5MknN+UHOudi7sGZzuHdCadllRuqJ3fPtgFtIH9+lt9qRv6lmpfA==", + "engines": { + "node": ">=12.17" + } + }, + "node_modules/commander": { + "version": "12.0.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-12.0.0.tgz", + "integrity": "sha512-MwVNWlYjDTtOjX5PiD7o5pK0UrFU/OYgcJfjjK4RaHZETNtjJqrZa9Y9ds88+A+f+d5lv+561eZ+yCKoS3gbAA==", + "engines": { + "node": ">=18" + } + }, + "node_modules/core": { + "resolved": "../core", + "link": true + }, + "node_modules/core-util-is": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", + "dev": true + }, + "node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/decompress-response": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", + "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==", + "dev": true, + "dependencies": { + "mimic-response": "^3.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/deep-extend": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", + "dev": true, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/detect-libc": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.2.tgz", + "integrity": "sha512-UX6sGumvvqSaXgdKGUsgZWqcUyIXZ/vZTrlRT/iobiKhGL0zL4d3osHj3uqllWJK+i+sixDS/3COVEOFbupFyw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "dev": true, + "dependencies": { + "path-type": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "node_modules/encoding": { + "version": "0.1.13", + "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.13.tgz", + "integrity": "sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==", + "dev": true, + "optional": true, + "peer": true, + "dependencies": { + "iconv-lite": "^0.6.2" + } + }, + "node_modules/end-of-stream": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "dev": true, + "dependencies": { + "once": "^1.4.0" + } + }, + "node_modules/esbuild": { + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.19.11.tgz", + "integrity": "sha512-HJ96Hev2hX/6i5cDVwcqiJBBtuo9+FeIJOtZ9W1kA5M6AMJRHUZlpYZ1/SbEwtO0ioNAW8rUooVpC/WehY2SfA==", + "dev": true, + "hasInstallScript": true, + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=12" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.19.11", + "@esbuild/android-arm": "0.19.11", + "@esbuild/android-arm64": "0.19.11", + "@esbuild/android-x64": "0.19.11", + "@esbuild/darwin-arm64": "0.19.11", + "@esbuild/darwin-x64": "0.19.11", + "@esbuild/freebsd-arm64": "0.19.11", + "@esbuild/freebsd-x64": "0.19.11", + "@esbuild/linux-arm": "0.19.11", + "@esbuild/linux-arm64": "0.19.11", + "@esbuild/linux-ia32": "0.19.11", + "@esbuild/linux-loong64": "0.19.11", + "@esbuild/linux-mips64el": "0.19.11", + "@esbuild/linux-ppc64": "0.19.11", + "@esbuild/linux-riscv64": "0.19.11", + "@esbuild/linux-s390x": "0.19.11", + "@esbuild/linux-x64": "0.19.11", + "@esbuild/netbsd-x64": "0.19.11", + "@esbuild/openbsd-x64": "0.19.11", + "@esbuild/sunos-x64": "0.19.11", + "@esbuild/win32-arm64": "0.19.11", + "@esbuild/win32-ia32": "0.19.11", + "@esbuild/win32-x64": "0.19.11" + } + }, + "node_modules/escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/expand-template": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/expand-template/-/expand-template-2.0.3.tgz", + "integrity": "sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/fast-glob": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", + "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", + "dev": true, + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "node_modules/fastq": { + "version": "1.16.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.16.0.tgz", + "integrity": "sha512-ifCoaXsDrsdkWTtiNJX5uzHDsrck5TzfKKDcuFFTIrrc/BS076qgEIfoIy1VeZqViznfKiysPYTh/QeHtnIsYA==", + "dev": true, + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/find-replace": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-replace/-/find-replace-3.0.0.tgz", + "integrity": "sha512-6Tb2myMioCAgv5kfvP5/PkZZ/ntTpVK39fHY7WkWBgvbeE+VHd/tZuZ4mrC+bxh4cfOZeYKVPaJIZtZXV7GNCQ==", + "dependencies": { + "array-back": "^3.0.1" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/flatbuffers": { + "version": "23.5.26", + "resolved": "https://registry.npmjs.org/flatbuffers/-/flatbuffers-23.5.26.tgz", + "integrity": "sha512-vE+SI9vrJDwi1oETtTIFldC/o9GsVKRM+s6EL0nQgxXlYV1Vc4Tk30hj4xGICftInKQKj1F3up2n8UbIVobISQ==" + }, + "node_modules/follow-redirects": { + "version": "1.15.5", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.5.tgz", + "integrity": "sha512-vSFWUON1B+yAw1VN4xMfxgn5fTUiaOzAJCKBwIIgT/+7CuGy9+r+5gITvP62j3RmaD5Ph65UaERdOSRGUzZtgw==", + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "engines": { + "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } + } + }, + "node_modules/form-data": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/from2": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/from2/-/from2-2.3.0.tgz", + "integrity": "sha512-OMcX/4IC/uqEPVgGeyfN22LJk6AZrMkRZHxcHBMBvHScDGgwTm2GT2Wkgtocyd3JfZffjj2kYUDXXII0Fk9W0g==", + "dev": true, + "dependencies": { + "inherits": "^2.0.1", + "readable-stream": "^2.0.0" + } + }, + "node_modules/fs-constants": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", + "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==", + "dev": true + }, + "node_modules/fs-extra": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", + "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", + "dev": true, + "dependencies": { + "at-least-node": "^1.0.0", + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true, + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/github-from-package": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz", + "integrity": "sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw==", + "dev": true + }, + "node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/globby": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "dev": true, + "dependencies": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true + }, + "node_modules/has": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.4.tgz", + "integrity": "sha512-qdSAmqLF6209RFj4VVItywPMbm3vWylknmB3nvNiUIs72xAimcM8nVYxYr7ncvZq5qzk9MKIZR8ijqD/1QuYjQ==", + "dev": true, + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "engines": { + "node": ">=8" + } + }, + "node_modules/hasown": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.0.tgz", + "integrity": "sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/https-proxy-agent": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", + "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", + "dev": true, + "dependencies": { + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/iconv-lite": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "dev": true, + "optional": true, + "peer": true, + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/ignore": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.0.tgz", + "integrity": "sha512-g7dmpshy+gD7mh88OC9NwSGTKoc3kyLAZQRU1mt53Aw/vnvfXnbC+F/7F7QoYVKbV+KNvJx8wArewKy1vXMtlg==", + "dev": true, + "engines": { + "node": ">= 4" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "node_modules/ini": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", + "dev": true + }, + "node_modules/into-stream": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/into-stream/-/into-stream-6.0.0.tgz", + "integrity": "sha512-XHbaOAvP+uFKUFsOgoNPRjLkwB+I22JFPFe5OjTkQ0nwgj6+pSjb4NmB6VMxaPshLiOf+zcpOCBQuLwC1KHhZA==", + "dev": true, + "dependencies": { + "from2": "^2.3.0", + "p-is-promise": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-core-module": { + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.9.0.tgz", + "integrity": "sha512-+5FPy5PnwmO3lvfMb0AsoPaBG+5KHUI0wYFXOtYPnVVVspTFUuMZNfNaNVRt3FZadstu2c8x23vykRW/NBoU6A==", + "dev": true, + "dependencies": { + "has": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", + "dev": true + }, + "node_modules/jsesc": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", + "dev": true, + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/json-bignum": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/json-bignum/-/json-bignum-0.0.3.tgz", + "integrity": "sha512-2WHyXj3OfHSgNyuzDbSxI1w2jgw5gkWSWhS7Qg4bWXx1nLk3jnbwfUeS0PSba3IzpTUWdHxBieELUzXRjQB2zg==", + "engines": { + "node": ">=0.8" + } + }, + "node_modules/jsonfile": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "dev": true, + "dependencies": { + "universalify": "^2.0.0" + }, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/lodash.assignwith": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/lodash.assignwith/-/lodash.assignwith-4.2.0.tgz", + "integrity": "sha512-ZznplvbvtjK2gMvnQ1BR/zqPFZmS6jbK4p+6Up4xcRYA7yMIwxHCfbTcrYxXKzzqLsQ05eJPVznEW3tuwV7k1g==" + }, + "node_modules/lodash.camelcase": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", + "integrity": "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==" + }, + "node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/micromatch": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "dev": true, + "dependencies": { + "braces": "^3.0.2", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mimic-response": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", + "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/mkdirp-classic": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", + "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==", + "dev": true + }, + "node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "node_modules/multistream": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/multistream/-/multistream-4.1.0.tgz", + "integrity": "sha512-J1XDiAmmNpRCBfIWJv+n0ymC4ABcf/Pl+5YvC5B/D2f/2+8PtHvCNxMPKiQcZyi922Hq69J2YOpb1pTywfifyw==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "once": "^1.4.0", + "readable-stream": "^3.6.0" + } + }, + "node_modules/multistream/node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dev": true, + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/napi-build-utils": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-1.0.2.tgz", + "integrity": "sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg==", + "dev": true + }, + "node_modules/node-abi": { + "version": "3.54.0", + "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.54.0.tgz", + "integrity": "sha512-p7eGEiQil0YUV3ItH4/tBb781L5impVmmx2E9FRKF7d18XXzp4PGT2tdYMFY6wQqgxD0IwNZOiSJ0/K0fSi/OA==", + "dev": true, + "dependencies": { + "semver": "^7.3.5" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/node-fetch": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", + "dev": true, + "dependencies": { + "whatwg-url": "^5.0.0" + }, + "engines": { + "node": "4.x || >=6.0.0" + }, + "peerDependencies": { + "encoding": "^0.1.0" + }, + "peerDependenciesMeta": { + "encoding": { + "optional": true + } + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dev": true, + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/p-is-promise": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-is-promise/-/p-is-promise-3.0.0.tgz", + "integrity": "sha512-Wo8VsW4IRQSKVXsJCn7TomUaVtyfjVDn3nUP7kE967BQk0CwFpdbZs0X0uk5sW9mkBa9eNM7hCMaG93WUAwxYQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/pad-left": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/pad-left/-/pad-left-2.1.0.tgz", + "integrity": "sha512-HJxs9K9AztdIQIAIa/OIazRAUW/L6B9hbQDxO4X07roW3eo9XqZc2ur9bn1StH9CnbbI9EgvejHQX7CBpCF1QA==", + "dependencies": { + "repeat-string": "^1.5.4" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true + }, + "node_modules/path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pkg": { + "version": "5.8.1", + "resolved": "https://registry.npmjs.org/pkg/-/pkg-5.8.1.tgz", + "integrity": "sha512-CjBWtFStCfIiT4Bde9QpJy0KeH19jCfwZRJqHFDFXfhUklCx8JoFmMj3wgnEYIwGmZVNkhsStPHEOnrtrQhEXA==", + "dev": true, + "dependencies": { + "@babel/generator": "7.18.2", + "@babel/parser": "7.18.4", + "@babel/types": "7.19.0", + "chalk": "^4.1.2", + "fs-extra": "^9.1.0", + "globby": "^11.1.0", + "into-stream": "^6.0.0", + "is-core-module": "2.9.0", + "minimist": "^1.2.6", + "multistream": "^4.1.0", + "pkg-fetch": "3.4.2", + "prebuild-install": "7.1.1", + "resolve": "^1.22.0", + "stream-meter": "^1.0.4" + }, + "bin": { + "pkg": "lib-es5/bin.js" + }, + "peerDependencies": { + "node-notifier": ">=9.0.1" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "node_modules/pkg-fetch": { + "version": "3.4.2", + "resolved": "https://registry.npmjs.org/pkg-fetch/-/pkg-fetch-3.4.2.tgz", + "integrity": "sha512-0+uijmzYcnhC0hStDjm/cl2VYdrmVVBpe7Q8k9YBojxmR5tG8mvR9/nooQq3QSXiQqORDVOTY3XqMEqJVIzkHA==", + "dev": true, + "dependencies": { + "chalk": "^4.1.2", + "fs-extra": "^9.1.0", + "https-proxy-agent": "^5.0.0", + "node-fetch": "^2.6.6", + "progress": "^2.0.3", + "semver": "^7.3.5", + "tar-fs": "^2.1.1", + "yargs": "^16.2.0" + }, + "bin": { + "pkg-fetch": "lib-es5/bin.js" + } + }, + "node_modules/prebuild-install": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-7.1.1.tgz", + "integrity": "sha512-jAXscXWMcCK8GgCoHOfIr0ODh5ai8mj63L2nWrjuAgXE6tDyYGnx4/8o/rCgU+B4JSyZBKbeZqzhtwtC3ovxjw==", + "dev": true, + "dependencies": { + "detect-libc": "^2.0.0", + "expand-template": "^2.0.3", + "github-from-package": "0.0.0", + "minimist": "^1.2.3", + "mkdirp-classic": "^0.5.3", + "napi-build-utils": "^1.0.1", + "node-abi": "^3.3.0", + "pump": "^3.0.0", + "rc": "^1.2.7", + "simple-get": "^4.0.0", + "tar-fs": "^2.0.0", + "tunnel-agent": "^0.6.0" + }, + "bin": { + "prebuild-install": "bin.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", + "dev": true + }, + "node_modules/progress": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", + "dev": true, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/proxy-from-env": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" + }, + "node_modules/pump": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "dev": true, + "dependencies": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/rc": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", + "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", + "dev": true, + "dependencies": { + "deep-extend": "^0.6.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" + }, + "bin": { + "rc": "cli.js" + } + }, + "node_modules/readable-stream": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", + "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", + "dev": true, + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/repeat-string": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha512-PV0dzCYDNfRi1jCDbJzpW7jNNDRuCOG/jI5ctQcGKt/clZD+YcPS3yIlWuTJMmESC8aevCFmWJy5wjAFgNqN6w==", + "engines": { + "node": ">=0.10" + } + }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/resolve": { + "version": "1.22.8", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", + "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", + "dev": true, + "dependencies": { + "is-core-module": "^2.13.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/resolve/node_modules/is-core-module": { + "version": "2.13.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.1.tgz", + "integrity": "sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==", + "dev": true, + "dependencies": { + "hasown": "^2.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dev": true, + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, + "node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true, + "optional": true, + "peer": true + }, + "node_modules/semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/simple-concat": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz", + "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/simple-get": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-4.0.1.tgz", + "integrity": "sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "decompress-response": "^6.0.0", + "once": "^1.3.1", + "simple-concat": "^1.0.0" + } + }, + "node_modules/slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/stream-meter": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/stream-meter/-/stream-meter-1.0.4.tgz", + "integrity": "sha512-4sOEtrbgFotXwnEuzzsQBYEV1elAeFSO8rSGeTwabuX1RRn/kEq9JVH7I0MRBhKVRR0sJkr0M0QCH7yOLf9fhQ==", + "dev": true, + "dependencies": { + "readable-stream": "^2.1.4" + } + }, + "node_modules/stream-read-all": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/stream-read-all/-/stream-read-all-3.0.1.tgz", + "integrity": "sha512-EWZT9XOceBPlVJRrYcykW8jyRSZYbkb/0ZK36uLEmoWVO5gxBOnntNTseNzfREsqxqdfEGQrD8SXQ3QWbBmq8A==", + "engines": { + "node": ">=10" + } + }, + "node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/table-layout": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/table-layout/-/table-layout-3.0.2.tgz", + "integrity": "sha512-rpyNZYRw+/C+dYkcQ3Pr+rLxW4CfHpXjPDnG7lYhdRoUcZTUt+KEsX+94RGp/aVp/MQU35JCITv2T/beY4m+hw==", + "dependencies": { + "@75lb/deep-merge": "^1.1.1", + "array-back": "^6.2.2", + "command-line-args": "^5.2.1", + "command-line-usage": "^7.0.0", + "stream-read-all": "^3.0.1", + "typical": "^7.1.1", + "wordwrapjs": "^5.1.0" + }, + "bin": { + "table-layout": "bin/cli.js" + }, + "engines": { + "node": ">=12.17" + } + }, + "node_modules/table-layout/node_modules/array-back": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/array-back/-/array-back-6.2.2.tgz", + "integrity": "sha512-gUAZ7HPyb4SJczXAMUXMGAvI976JoK3qEx9v1FTmeYuJj0IBiaKttG1ydtGKdkfqWkIkouke7nG8ufGy77+Cvw==", + "engines": { + "node": ">=12.17" + } + }, + "node_modules/table-layout/node_modules/typical": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/typical/-/typical-7.1.1.tgz", + "integrity": "sha512-T+tKVNs6Wu7IWiAce5BgMd7OZfNYUndHwc5MknN+UHOudi7sGZzuHdCadllRuqJ3fPtgFtIH9+lt9qRv6lmpfA==", + "engines": { + "node": ">=12.17" + } + }, + "node_modules/tar-fs": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz", + "integrity": "sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==", + "dev": true, + "dependencies": { + "chownr": "^1.1.1", + "mkdirp-classic": "^0.5.2", + "pump": "^3.0.0", + "tar-stream": "^2.1.4" + } + }, + "node_modules/tar-stream": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz", + "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", + "dev": true, + "dependencies": { + "bl": "^4.0.3", + "end-of-stream": "^1.4.1", + "fs-constants": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^3.1.1" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/tar-stream/node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dev": true, + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/to-fast-properties": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", + "dev": true + }, + "node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==", + "dev": true, + "dependencies": { + "safe-buffer": "^5.0.1" + }, + "engines": { + "node": "*" + } + }, + "node_modules/typescript": { + "version": "5.3.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz", + "integrity": "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/typical": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/typical/-/typical-4.0.0.tgz", + "integrity": "sha512-VAH4IvQ7BDFYglMd7BPRDfLgxZZX4O4TFcRDA6EN5X7erNJJq+McIEp8np9aVtxrCJ6qx4GTYVfOWNjcqwZgRw==", + "engines": { + "node": ">=8" + } + }, + "node_modules/universalify": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", + "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", + "dev": true, + "engines": { + "node": ">= 10.0.0" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "dev": true + }, + "node_modules/uuid": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", + "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "node_modules/vectordb": { + "version": "0.4.10", + "resolved": "https://registry.npmjs.org/vectordb/-/vectordb-0.4.10.tgz", + "integrity": "sha512-O6WR65CvpbIbTDs4awKV9smfymVuW1AqYOcdJf8PI0THr1b+h/LyDlAQBf3xBV5Ns8XeaIzWfSHoDspg+WJgKg==", + "cpu": [ + "x64", + "arm64" + ], + "os": [ + "darwin", + "linux", + "win32" + ], + "dependencies": { + "@apache-arrow/ts": "^14.0.2", + "@neon-rs/load": "^0.0.74", + "apache-arrow": "^14.0.2", + "axios": "^1.4.0" + }, + "optionalDependencies": { + "@lancedb/vectordb-darwin-arm64": "0.4.10", + "@lancedb/vectordb-darwin-x64": "0.4.10", + "@lancedb/vectordb-linux-arm64-gnu": "0.4.10", + "@lancedb/vectordb-linux-x64-gnu": "0.4.10", + "@lancedb/vectordb-win32-x64-msvc": "0.4.10" + } + }, + "node_modules/webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", + "dev": true + }, + "node_modules/whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "dev": true, + "dependencies": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, + "node_modules/wordwrapjs": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/wordwrapjs/-/wordwrapjs-5.1.0.tgz", + "integrity": "sha512-JNjcULU2e4KJwUNv6CHgI46UvDGitb6dGryHajXTDiLgg1/RiGoPSDw4kZfYnwGtEXf2ZMeIewDQgFGzkCB2Sg==", + "engines": { + "node": ">=12.17" + } + }, + "node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true + }, + "node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "node_modules/yargs": { + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "dev": true, + "dependencies": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs-parser": { + "version": "20.2.9", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", + "dev": true, + "engines": { + "node": ">=10" + } + } + } +} diff --git a/pkg/package.json b/pkg/package.json new file mode 100644 index 000000000..0c77fa7ed --- /dev/null +++ b/pkg/package.json @@ -0,0 +1,41 @@ +{ + "name": "pkg", + "version": "1.0.0", + "description": "", + "main": "out/index.js", + "bin": "out/index.js", + "pkg": { + "scripts": [ + "node_modules/axios/**/*" + ], + "assets": [ + "../core/node_modules/sqlite3/**/*", + "node_modules/@lancedb/**/*" + ], + "targets": [ + "node18-darwin-arm64" + ], + "outputPath": "bin" + }, + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1", + "build": "node build.js", + "build:old": "ncc build src/index.ts -o out && pkg .", + "build:dev": "tsc" + }, + "author": "", + "license": "ISC", + "devDependencies": { + "@types/uuid": "^9.0.8", + "@vercel/ncc": "^0.38.1", + "esbuild": "^0.19.11", + "pkg": "^5.8.1", + "typescript": "^5.3.3" + }, + "dependencies": { + "commander": "^12.0.0", + "core": "file:../core", + "uuid": "^9.0.1", + "vectordb": "^0.4.10" + } +} diff --git a/core/ipc/IpcIde.ts b/pkg/src/IpcIde.ts similarity index 97% rename from core/ipc/IpcIde.ts rename to pkg/src/IpcIde.ts index 38f0e08b8..06b5d6cc8 100644 --- a/core/ipc/IpcIde.ts +++ b/pkg/src/IpcIde.ts @@ -1,4 +1,4 @@ -import { Chunk, ContinueRcJson, IDE, Problem, Range } from ".."; +import { Chunk, ContinueRcJson, IDE, Problem, Range } from "../../core"; import { IpcMessenger } from "./messenger"; export class IpcIde implements IDE { diff --git a/core/ipc/core.ts b/pkg/src/core.ts similarity index 87% rename from core/ipc/core.ts rename to pkg/src/core.ts index 63a666dbc..3c0473905 100644 --- a/core/ipc/core.ts +++ b/pkg/src/core.ts @@ -1,12 +1,12 @@ +import { ContextItemId, IDE } from "core"; +import { ConfigHandler } from "core/config/handler"; +import { addModel, addOpenAIKey, deleteModel } from "core/config/util"; +import { indexDocs } from "core/indexing/docs"; +import TransformersJsEmbeddingsProvider from "core/indexing/embeddings/TransformersJsEmbeddingsProvider"; +import { CodebaseIndexer } from "core/indexing/indexCodebase"; +import { logDevData } from "core/util/devdata"; +import historyManager from "core/util/history"; import { v4 as uuidv4 } from "uuid"; -import { ContextItemId, IDE } from ".."; -import { ConfigHandler } from "../config/handler"; -import { addModel, addOpenAIKey, deleteModel } from "../config/util"; -import { indexDocs } from "../indexing/docs"; -import TransformersJsEmbeddingsProvider from "../indexing/embeddings/TransformersJsEmbeddingsProvider"; -import { CodebaseIndexer } from "../indexing/indexCodebase"; -import { logDevData } from "../util/devdata"; -import historyManager from "../util/history"; import { Messenger, Protocol } from "./messenger"; export class Core { diff --git a/core/ipc/cli.ts b/pkg/src/index.ts similarity index 100% rename from core/ipc/cli.ts rename to pkg/src/index.ts diff --git a/core/ipc/messenger.ts b/pkg/src/messenger.ts similarity index 98% rename from core/ipc/messenger.ts rename to pkg/src/messenger.ts index b2b851cdb..797240c08 100644 --- a/core/ipc/messenger.ts +++ b/pkg/src/messenger.ts @@ -8,8 +8,8 @@ import { RangeInFile, SerializedContinueConfig, SessionInfo, -} from ".."; -import { Message } from "../util/messenger"; +} from "../../core"; +import { Message } from "../../core/util/messenger"; export abstract class Messenger { abstract send(messageType: string, message: any, messageId?: string): string; diff --git a/pkg/tsconfig.json b/pkg/tsconfig.json new file mode 100644 index 000000000..94fbda91f --- /dev/null +++ b/pkg/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "ES2020", + "outDir": "out", + "lib": ["ES2020", "dom", "es6", "es5", "dom.iterable", "scripthost"], + "sourceMap": true, + "rootDirs": ["src", "../core"], + "allowJs": true, + "strict": true /* enable all strict type-checking options */, + /* Additional Checks */ + // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ + // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ + // "noUnusedParameters": true, /* Report errors on unused parameters. */ + "esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */, + "resolveJsonModule": true /* Enable importing .json files */ + }, + "include": ["src/**/*"] +} From 6d74e6b1fedf18b11ea12ba38164fcd146fdba4b Mon Sep 17 00:00:00 2001 From: Nicholas Wengel Date: Thu, 15 Feb 2024 00:40:12 -0700 Subject: [PATCH 016/141] fix: a bunch of bugs, commit residuals such as npm install pg --- .../providers/PostgresContextProvider.ts | 97 ++++++------ core/package-lock.json | 148 ++++++++++++++++++ core/package.json | 1 + core/yarn.lock | 117 ++++++++++++-- docs/static/schemas/config.json | 67 +++++++- extensions/vscode/continue_rc_schema.json | 73 ++++++++- extensions/vscode/package-lock.json | 5 +- extensions/vscode/package.json | 2 +- extensions/vscode/yarn.lock | 24 ++- gui/package-lock.json | 1 + 10 files changed, 456 insertions(+), 79 deletions(-) diff --git a/core/context/providers/PostgresContextProvider.ts b/core/context/providers/PostgresContextProvider.ts index b76748a64..34c829f4d 100644 --- a/core/context/providers/PostgresContextProvider.ts +++ b/core/context/providers/PostgresContextProvider.ts @@ -7,9 +7,6 @@ import { ContextSubmenuItem, } from "../.."; -const ALL_TABLES = "__all_tables"; -const DEFAULT_SAMPLE_ROWS = 3; - class PostgresContextProvider extends BaseContextProvider { static description: ContextProviderDescription = { title: "postgres", @@ -18,6 +15,9 @@ class PostgresContextProvider extends BaseContextProvider { type: "submenu", }; + static ALL_TABLES = "__all_tables"; + static DEFAULT_SAMPLE_ROWS = 3; + constructor(options: { host: string; port: number; @@ -41,6 +41,20 @@ class PostgresContextProvider extends BaseContextProvider { }); } + private async getTableNames(pool: any): Promise { + const schema = this.options.schema ?? "public"; + var tablesInfoQuery = ` +SELECT table_schema, table_name +FROM information_schema.tables`; + if (schema != null) { + tablesInfoQuery += ` WHERE table_schema = '${schema}'`; + } + const { rows: tablesInfo } = await pool.query(tablesInfoQuery); + return tablesInfo.map( + (tableInfo: any) => `${tableInfo.table_schema}.${tableInfo.table_name}` + ); + } + async getContextItems( query: string = "", _: ContextProviderExtras = {} as ContextProviderExtras @@ -50,49 +64,48 @@ class PostgresContextProvider extends BaseContextProvider { try { const contextItems: ContextItem[] = []; - var schemaQuery = ` -SELECT column_name, data_type, character_maximum_length -FROM INFORMATION_SCHEMA.COLUMNS`; - if (this.options.query != ALL_TABLES) { + const tableNames = []; + if (query === PostgresContextProvider.ALL_TABLES) { + tableNames.push(...(await this.getTableNames(pool))); + } else { + tableNames.push(query); + } + + for (const tableName of tableNames) { // Get the table schema - const tableName = query; if (!tableName.includes(".")) { throw new Error( `Table name must be in format schema.table_name, got ${tableName}` ); } - schemaQuery += `WHERE table_name = '${tableName.split(".")[1]}'`; - } - - const { rows: tableSchemas } = await pool.query(schemaQuery); - - var prompt = `Postgres schema for database ${this.options.database}`; - for (const tableSchema of tableSchemas) { - const tableName = query; + var schemaQuery = ` +SELECT column_name, data_type, character_maximum_length +FROM INFORMATION_SCHEMA.COLUMNS +WHERE table_schema = '${tableName.split(".")[0]}' + AND table_name = '${tableName.split(".")[1]}'`; + console.log("schemaQuery", schemaQuery); + const { rows: tableSchema } = await pool.query(schemaQuery); // Get the sample rows - const sampleRows = this.options.sampleRows ?? DEFAULT_SAMPLE_ROWS; + const sampleRows = + this.options.sampleRows ?? + PostgresContextProvider.DEFAULT_SAMPLE_ROWS; const { rows: sampleRowResults } = await pool.query(` SELECT * FROM ${tableName} LIMIT ${sampleRows}`); // Create prompt from the table schema and sample rows - var prompt = `Table schema for ${tableName}:\n${JSON.stringify( - tableSchema, - null, - 2 - )}\n\n`; + var prompt = `Postgres schema for database ${this.options.database} table ${tableName}:\n`; + prompt += `${JSON.stringify(tableSchema, null, 2)}\n\n`; prompt += `Sample rows: ${JSON.stringify(sampleRowResults, null, 2)}`; - } - contextItems.push({ - name: `${this.options.database}-${query}-schema-and-sample-rows`, - description: `Schema and sample rows for ${ - query == ALL_TABLES ? "all table" : query - } in ${this.options.database} database`, - content: prompt, - }); + contextItems.push({ + name: `${this.options.database}-${tableName}-schema-and-sample-rows`, + description: `Schema and sample rows for table ${tableName}`, + content: prompt, + }); + } return contextItems; } catch (error) { @@ -106,32 +119,22 @@ LIMIT ${sampleRows}`); ): Promise { const pool = await this.getPool(); - const schema = this.options.schema ?? "public"; - var tablesInfoQuery = ` -SELECT table_schema, table_name -FROM information_schema.tables`; - if (schema != null) { - tablesInfoQuery += ` WHERE table_schema = '${schema}'`; - } - const tablesInfo = await pool.query(tablesInfoQuery).rows; - try { const contextItems: ContextSubmenuItem[] = []; + const tableNames = await this.getTableNames(pool); - for (const tableInfo of tablesInfo) { - const tableName = `${tableInfo.table_schema}.${tableInfo.table_name}`; - + for (const tableName of tableNames) { contextItems.push({ id: tableName, title: tableName, description: `Schema from ${tableName} and ${this.options.sampleRows} sample rows.`, }); - contextItems.push({ - id: ALL_TABLES, - title: "All tables", - description: `Schema from all tables and ${this.options.sampleRows} sample rows each.`, - }); } + contextItems.push({ + id: PostgresContextProvider.ALL_TABLES, + title: "All tables", + description: `Schema from all tables and ${this.options.sampleRows} sample rows each.`, + }); return contextItems; } catch (error) { diff --git a/core/package-lock.json b/core/package-lock.json index 6ea8b6f89..ee487e639 100644 --- a/core/package-lock.json +++ b/core/package-lock.json @@ -22,6 +22,7 @@ "node-html-markdown": "^1.3.0", "ollama": "^0.4.6", "openai": "^4.20.1", + "pg": "^8.11.3", "posthog-node": "^3.6.2", "replicate": "^0.26.0", "socket.io-client": "^4.7.3", @@ -2471,6 +2472,14 @@ "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", "dev": true }, + "node_modules/buffer-writer": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/buffer-writer/-/buffer-writer-2.0.0.tgz", + "integrity": "sha512-a7ZpuTZU1TRtnwyCNW3I5dc0wWNC3VR9S++Ewyk2HHZdrO3CQJqSpd+95Us590V6AL7JqUAH2IwZ/398PmNFgw==", + "engines": { + "node": ">=4" + } + }, "node_modules/cacache": { "version": "15.3.0", "resolved": "https://registry.npmjs.org/cacache/-/cacache-15.3.0.tgz", @@ -5598,6 +5607,11 @@ "node": ">=6" } }, + "node_modules/packet-reader": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/packet-reader/-/packet-reader-1.0.0.tgz", + "integrity": "sha512-HAKu/fG3HpHFO0AA8WE8q2g+gBJaZ9MG7fcKk+IJPLTGAD6Psw4443l+9DGRbOIh3/aXr7Phy0TjilYivJo5XQ==" + }, "node_modules/pad-left": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/pad-left/-/pad-left-2.1.0.tgz", @@ -5683,6 +5697,89 @@ "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", "dev": true }, + "node_modules/pg": { + "version": "8.11.3", + "resolved": "https://registry.npmjs.org/pg/-/pg-8.11.3.tgz", + "integrity": "sha512-+9iuvG8QfaaUrrph+kpF24cXkH1YOOUeArRNYIxq1viYHZagBxrTno7cecY1Fa44tJeZvaoG+Djpkc3JwehN5g==", + "dependencies": { + "buffer-writer": "2.0.0", + "packet-reader": "1.0.0", + "pg-connection-string": "^2.6.2", + "pg-pool": "^3.6.1", + "pg-protocol": "^1.6.0", + "pg-types": "^2.1.0", + "pgpass": "1.x" + }, + "engines": { + "node": ">= 8.0.0" + }, + "optionalDependencies": { + "pg-cloudflare": "^1.1.1" + }, + "peerDependencies": { + "pg-native": ">=3.0.1" + }, + "peerDependenciesMeta": { + "pg-native": { + "optional": true + } + } + }, + "node_modules/pg-cloudflare": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/pg-cloudflare/-/pg-cloudflare-1.1.1.tgz", + "integrity": "sha512-xWPagP/4B6BgFO+EKz3JONXv3YDgvkbVrGw2mTo3D6tVDQRh1e7cqVGvyR3BE+eQgAvx1XhW/iEASj4/jCWl3Q==", + "optional": true + }, + "node_modules/pg-connection-string": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/pg-connection-string/-/pg-connection-string-2.6.2.tgz", + "integrity": "sha512-ch6OwaeaPYcova4kKZ15sbJ2hKb/VP48ZD2gE7i1J+L4MspCtBMAx8nMgz7bksc7IojCIIWuEhHibSMFH8m8oA==" + }, + "node_modules/pg-int8": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/pg-int8/-/pg-int8-1.0.1.tgz", + "integrity": "sha512-WCtabS6t3c8SkpDBUlb1kjOs7l66xsGdKpIPZsg4wR+B3+u9UAum2odSsF9tnvxg80h4ZxLWMy4pRjOsFIqQpw==", + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/pg-pool": { + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/pg-pool/-/pg-pool-3.6.1.tgz", + "integrity": "sha512-jizsIzhkIitxCGfPRzJn1ZdcosIt3pz9Sh3V01fm1vZnbnCMgmGl5wvGGdNN2EL9Rmb0EcFoCkixH4Pu+sP9Og==", + "peerDependencies": { + "pg": ">=8.0" + } + }, + "node_modules/pg-protocol": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/pg-protocol/-/pg-protocol-1.6.0.tgz", + "integrity": "sha512-M+PDm637OY5WM307051+bsDia5Xej6d9IR4GwJse1qA1DIhiKlksvrneZOYQq42OM+spubpcNYEo2FcKQrDk+Q==" + }, + "node_modules/pg-types": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/pg-types/-/pg-types-2.2.0.tgz", + "integrity": "sha512-qTAAlrEsl8s4OiEQY69wDvcMIdQN6wdz5ojQiOy6YRMuynxenON0O5oCpJI6lshc6scgAY8qvJ2On/p+CXY0GA==", + "dependencies": { + "pg-int8": "1.0.1", + "postgres-array": "~2.0.0", + "postgres-bytea": "~1.0.0", + "postgres-date": "~1.0.4", + "postgres-interval": "^1.1.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/pgpass": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/pgpass/-/pgpass-1.0.5.tgz", + "integrity": "sha512-FdW9r/jQZhSeohs1Z3sI1yxFQNFvMcnmfuj4WBMUTxOrAyLMaTcE1aAMBiTlbMNaXvBCQuVi0R7hd8udDSP7ug==", + "dependencies": { + "split2": "^4.1.0" + } + }, "node_modules/picocolors": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", @@ -5727,6 +5824,41 @@ "resolved": "https://registry.npmjs.org/platform/-/platform-1.3.6.tgz", "integrity": "sha512-fnWVljUchTro6RiCFvCXBbNhJc2NijN7oIQxbwsyL0buWJPG85v81ehlHI9fXrJsMNgTofEoWIQeClKpgxFLrg==" }, + "node_modules/postgres-array": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/postgres-array/-/postgres-array-2.0.0.tgz", + "integrity": "sha512-VpZrUqU5A69eQyW2c5CA1jtLecCsN2U/bD6VilrFDWq5+5UIEVO7nazS3TEcHf1zuPYO/sqGvUvW62g86RXZuA==", + "engines": { + "node": ">=4" + } + }, + "node_modules/postgres-bytea": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/postgres-bytea/-/postgres-bytea-1.0.0.tgz", + "integrity": "sha512-xy3pmLuQqRBZBXDULy7KbaitYqLcmxigw14Q5sj8QBVLqEwXfeybIKVWiqAXTlcvdvb0+xkOtDbfQMOf4lST1w==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/postgres-date": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/postgres-date/-/postgres-date-1.0.7.tgz", + "integrity": "sha512-suDmjLVQg78nMK2UZ454hAG+OAW+HQPZ6n++TNDUX+L0+uUlLywnoxJKDou51Zm+zTCjrCl0Nq6J9C5hP9vK/Q==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/postgres-interval": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/postgres-interval/-/postgres-interval-1.2.0.tgz", + "integrity": "sha512-9ZhXKM/rw350N1ovuWHbGxnGh/SNJ4cnxHiM0rxE4VN41wsg8P8zWn9hv/buK00RP4WvlOyr/RBDiptyxVbkZQ==", + "dependencies": { + "xtend": "^4.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/posthog-node": { "version": "3.6.2", "resolved": "https://registry.npmjs.org/posthog-node/-/posthog-node-3.6.2.tgz", @@ -6382,6 +6514,14 @@ "source-map": "^0.6.0" } }, + "node_modules/split2": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/split2/-/split2-4.2.0.tgz", + "integrity": "sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg==", + "engines": { + "node": ">= 10.x" + } + }, "node_modules/sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", @@ -7105,6 +7245,14 @@ "node": ">=0.4.0" } }, + "node_modules/xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", + "engines": { + "node": ">=0.4" + } + }, "node_modules/y18n": { "version": "5.0.8", "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", diff --git a/core/package.json b/core/package.json index dfb3e6f34..f0185b4a4 100644 --- a/core/package.json +++ b/core/package.json @@ -31,6 +31,7 @@ "node-html-markdown": "^1.3.0", "ollama": "^0.4.6", "openai": "^4.20.1", + "pg": "^8.11.3", "posthog-node": "^3.6.2", "replicate": "^0.26.0", "socket.io-client": "^4.7.3", diff --git a/core/yarn.lock b/core/yarn.lock index 295c042b7..08f24a731 100644 --- a/core/yarn.lock +++ b/core/yarn.lock @@ -321,10 +321,10 @@ resolved "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@esbuild/darwin-arm64@0.19.11": +"@esbuild/linux-x64@0.19.11": version "0.19.11" - resolved "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.19.11.tgz" - integrity sha512-ETp87DRWuSt9KdDVkqSoKoLFHYTrkyz2+65fj9nfXsaV3bMhTCjtQfw3y+um88vGRKRiF7erPrh/ZuIdLUIVxQ== + resolved "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.19.11.tgz" + integrity sha512-grbyMlVCvJSfxFQUndw5mCtWs5LO1gUlwP4CDi4iJBbVpZcqLVT29FxgGuBJGSzyOxotFG4LoO5X+M1350zmPA== "@gar/promisify@^1.0.1": version "1.1.3" @@ -576,10 +576,10 @@ "@jridgewell/resolve-uri" "^3.1.0" "@jridgewell/sourcemap-codec" "^1.4.14" -"@lancedb/vectordb-darwin-arm64@0.4.3": +"@lancedb/vectordb-linux-x64-gnu@0.4.3": version "0.4.3" - resolved "https://registry.npmjs.org/@lancedb/vectordb-darwin-arm64/-/vectordb-darwin-arm64-0.4.3.tgz" - integrity sha512-47CvvSaV1EdUsFEpXUJApTk+hMzAhCxVizipCFUlXCgcmzpCDL86wNgJij/X9a+j6zADhIX//Lsu0qd/an/Bpw== + resolved "https://registry.npmjs.org/@lancedb/vectordb-linux-x64-gnu/-/vectordb-linux-x64-gnu-0.4.3.tgz" + integrity sha512-OBx3WF3pK0xNfFJeErmuD9R2QWLa3XdeZspyTsIrQmBDeKj3HKh8y7Scpx4NH5Y09+9JNqRRKRZN7OqWTYhITg== "@neon-rs/load@^0.0.74": version "0.0.74" @@ -1238,6 +1238,11 @@ buffer-from@^1.0.0: resolved "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz" integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== +buffer-writer@2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/buffer-writer/-/buffer-writer-2.0.0.tgz" + integrity sha512-a7ZpuTZU1TRtnwyCNW3I5dc0wWNC3VR9S++Ewyk2HHZdrO3CQJqSpd+95Us590V6AL7JqUAH2IwZ/398PmNFgw== + buffer@^5.5.0: version "5.7.1" resolved "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz" @@ -1918,11 +1923,6 @@ fs.realpath@^1.0.0: resolved "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz" integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== -fsevents@^2.3.2: - version "2.3.3" - resolved "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz" - integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw== - function-bind@^1.1.2: version "1.1.2" resolved "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz" @@ -3178,6 +3178,11 @@ p-try@^2.0.0: resolved "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz" integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== +packet-reader@1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/packet-reader/-/packet-reader-1.0.0.tgz" + integrity sha512-HAKu/fG3HpHFO0AA8WE8q2g+gBJaZ9MG7fcKk+IJPLTGAD6Psw4443l+9DGRbOIh3/aXr7Phy0TjilYivJo5XQ== + pad-left@^2.1.0: version "2.1.0" resolved "https://registry.npmjs.org/pad-left/-/pad-left-2.1.0.tgz" @@ -3230,6 +3235,64 @@ path-parse@^1.0.7: resolved "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz" integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== +pg-cloudflare@^1.1.1: + version "1.1.1" + resolved "https://registry.npmjs.org/pg-cloudflare/-/pg-cloudflare-1.1.1.tgz" + integrity sha512-xWPagP/4B6BgFO+EKz3JONXv3YDgvkbVrGw2mTo3D6tVDQRh1e7cqVGvyR3BE+eQgAvx1XhW/iEASj4/jCWl3Q== + +pg-connection-string@^2.6.2: + version "2.6.2" + resolved "https://registry.npmjs.org/pg-connection-string/-/pg-connection-string-2.6.2.tgz" + integrity sha512-ch6OwaeaPYcova4kKZ15sbJ2hKb/VP48ZD2gE7i1J+L4MspCtBMAx8nMgz7bksc7IojCIIWuEhHibSMFH8m8oA== + +pg-int8@1.0.1: + version "1.0.1" + resolved "https://registry.npmjs.org/pg-int8/-/pg-int8-1.0.1.tgz" + integrity sha512-WCtabS6t3c8SkpDBUlb1kjOs7l66xsGdKpIPZsg4wR+B3+u9UAum2odSsF9tnvxg80h4ZxLWMy4pRjOsFIqQpw== + +pg-pool@^3.6.1: + version "3.6.1" + resolved "https://registry.npmjs.org/pg-pool/-/pg-pool-3.6.1.tgz" + integrity sha512-jizsIzhkIitxCGfPRzJn1ZdcosIt3pz9Sh3V01fm1vZnbnCMgmGl5wvGGdNN2EL9Rmb0EcFoCkixH4Pu+sP9Og== + +pg-protocol@^1.6.0: + version "1.6.0" + resolved "https://registry.npmjs.org/pg-protocol/-/pg-protocol-1.6.0.tgz" + integrity sha512-M+PDm637OY5WM307051+bsDia5Xej6d9IR4GwJse1qA1DIhiKlksvrneZOYQq42OM+spubpcNYEo2FcKQrDk+Q== + +pg-types@^2.1.0: + version "2.2.0" + resolved "https://registry.npmjs.org/pg-types/-/pg-types-2.2.0.tgz" + integrity sha512-qTAAlrEsl8s4OiEQY69wDvcMIdQN6wdz5ojQiOy6YRMuynxenON0O5oCpJI6lshc6scgAY8qvJ2On/p+CXY0GA== + dependencies: + pg-int8 "1.0.1" + postgres-array "~2.0.0" + postgres-bytea "~1.0.0" + postgres-date "~1.0.4" + postgres-interval "^1.1.0" + +pg@^8.11.3, pg@>=8.0: + version "8.11.3" + resolved "https://registry.npmjs.org/pg/-/pg-8.11.3.tgz" + integrity sha512-+9iuvG8QfaaUrrph+kpF24cXkH1YOOUeArRNYIxq1viYHZagBxrTno7cecY1Fa44tJeZvaoG+Djpkc3JwehN5g== + dependencies: + buffer-writer "2.0.0" + packet-reader "1.0.0" + pg-connection-string "^2.6.2" + pg-pool "^3.6.1" + pg-protocol "^1.6.0" + pg-types "^2.1.0" + pgpass "1.x" + optionalDependencies: + pg-cloudflare "^1.1.1" + +pgpass@1.x: + version "1.0.5" + resolved "https://registry.npmjs.org/pgpass/-/pgpass-1.0.5.tgz" + integrity sha512-FdW9r/jQZhSeohs1Z3sI1yxFQNFvMcnmfuj4WBMUTxOrAyLMaTcE1aAMBiTlbMNaXvBCQuVi0R7hd8udDSP7ug== + dependencies: + split2 "^4.1.0" + picocolors@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz" @@ -3257,6 +3320,28 @@ platform@^1.3.6: resolved "https://registry.npmjs.org/platform/-/platform-1.3.6.tgz" integrity sha512-fnWVljUchTro6RiCFvCXBbNhJc2NijN7oIQxbwsyL0buWJPG85v81ehlHI9fXrJsMNgTofEoWIQeClKpgxFLrg== +postgres-array@~2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/postgres-array/-/postgres-array-2.0.0.tgz" + integrity sha512-VpZrUqU5A69eQyW2c5CA1jtLecCsN2U/bD6VilrFDWq5+5UIEVO7nazS3TEcHf1zuPYO/sqGvUvW62g86RXZuA== + +postgres-bytea@~1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/postgres-bytea/-/postgres-bytea-1.0.0.tgz" + integrity sha512-xy3pmLuQqRBZBXDULy7KbaitYqLcmxigw14Q5sj8QBVLqEwXfeybIKVWiqAXTlcvdvb0+xkOtDbfQMOf4lST1w== + +postgres-date@~1.0.4: + version "1.0.7" + resolved "https://registry.npmjs.org/postgres-date/-/postgres-date-1.0.7.tgz" + integrity sha512-suDmjLVQg78nMK2UZ454hAG+OAW+HQPZ6n++TNDUX+L0+uUlLywnoxJKDou51Zm+zTCjrCl0Nq6J9C5hP9vK/Q== + +postgres-interval@^1.1.0: + version "1.2.0" + resolved "https://registry.npmjs.org/postgres-interval/-/postgres-interval-1.2.0.tgz" + integrity sha512-9ZhXKM/rw350N1ovuWHbGxnGh/SNJ4cnxHiM0rxE4VN41wsg8P8zWn9hv/buK00RP4WvlOyr/RBDiptyxVbkZQ== + dependencies: + xtend "^4.0.0" + posthog-node@^3.6.2: version "3.6.2" resolved "https://registry.npmjs.org/posthog-node/-/posthog-node-3.6.2.tgz" @@ -3611,6 +3696,11 @@ source-map@^0.6.0, source-map@^0.6.1: resolved "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz" integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== +split2@^4.1.0: + version "4.2.0" + resolved "https://registry.npmjs.org/split2/-/split2-4.2.0.tgz" + integrity sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg== + sprintf-js@~1.0.2: version "1.0.3" resolved "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz" @@ -4056,6 +4146,11 @@ xmlhttprequest-ssl@~2.0.0: resolved "https://registry.npmjs.org/xmlhttprequest-ssl/-/xmlhttprequest-ssl-2.0.0.tgz" integrity sha512-QKxVRxiRACQcVuQEYFsI1hhkrMlrXHPegbbd1yn9UHOmRxY+si12nQYzri3vbzt8VdTTRviqcKxcyllFas5z2A== +xtend@^4.0.0: + version "4.0.2" + resolved "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz" + integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== + y18n@^5.0.5: version "5.0.8" resolved "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz" diff --git a/docs/static/schemas/config.json b/docs/static/schemas/config.json index 746737b6a..4e3514bb3 100644 --- a/docs/static/schemas/config.json +++ b/docs/static/schemas/config.json @@ -989,7 +989,8 @@ "docs", "tree", "highlights", - "outline" + "outline", + "postgres" ], "markdownEnumDescriptions": [ "Reference the contents of the current changes as given by `git diff`", @@ -1007,7 +1008,8 @@ "Display a file tree of the current workspace", "Include a repo map showing important code objects", "Displays important snippets of code from the currently open files", - "Displays definition lines from the currently open files" + "Displays definition lines from the currently open files", + "References Postgres table schema and sample rows" ], "type": "string" }, @@ -1169,6 +1171,67 @@ } } } + }, + { + "if": { + "properties": { + "name": { + "enum": [ + "postgres" + ] + } + } + }, + "then": { + "properties": { + "params": { + "properties": { + "host": { + "title": "Host", + "description": "Database host", + "default": "localhost", + "type": "string" + }, + "port": { + "title": "Port", + "description": "Database port", + "default": 5432, + "type": "integer" + }, + "user": { + "title": "User", + "description": "Database user", + "default": "postgres", + "type": "string" + }, + "password": { + "title": "Password", + "description": "Database password", + "type": "string" + }, + "database": { + "title": "Database", + "description": "Database name", + "default": "postgres", + "type": "string" + }, + "schema": { + "title": "Schema", + "description": "Database schema", + "default": "public", + "type": "string" + }, + "sampleRows": { + "title": "Sample Rows", + "description": "Number of rows to sample from the database", + "default": 3, + "type": "integer" + } + } + } + }, + "required": ["host", "port", "user", "password", "database"] + } } ], "required": ["name"] diff --git a/extensions/vscode/continue_rc_schema.json b/extensions/vscode/continue_rc_schema.json index ea2a834e5..b63bef3c5 100644 --- a/extensions/vscode/continue_rc_schema.json +++ b/extensions/vscode/continue_rc_schema.json @@ -1132,7 +1132,8 @@ "docs", "tree", "highlights", - "outline" + "outline", + "postgres" ], "markdownEnumDescriptions": [ "Reference the contents of the current changes as given by `git diff`", @@ -1150,7 +1151,8 @@ "Display a file tree of the current workspace", "Include a repo map showing important code objects", "Displays important snippets of code from the currently open files", - "Displays definition lines from the currently open files" + "Displays definition lines from the currently open files", + "References Postgres table schema and sample rows" ], "type": "string" }, @@ -1344,6 +1346,73 @@ } } } + }, + { + "if": { + "properties": { + "name": { + "enum": [ + "postgres" + ] + } + } + }, + "then": { + "properties": { + "params": { + "properties": { + "host": { + "title": "Host", + "description": "Database host", + "default": "localhost", + "type": "string" + }, + "port": { + "title": "Port", + "description": "Database port", + "default": 5432, + "type": "integer" + }, + "user": { + "title": "User", + "description": "Database user", + "default": "postgres", + "type": "string" + }, + "password": { + "title": "Password", + "description": "Database password", + "type": "string" + }, + "database": { + "title": "Database", + "description": "Database name", + "default": "postgres", + "type": "string" + }, + "schema": { + "title": "Schema", + "description": "Database schema", + "default": "public", + "type": "string" + }, + "sampleRows": { + "title": "Sample Rows", + "description": "Number of rows to sample from the database", + "default": 3, + "type": "integer" + } + } + } + }, + "required": [ + "host", + "port", + "user", + "password", + "database" + ] + } } ], "required": [ diff --git a/extensions/vscode/package-lock.json b/extensions/vscode/package-lock.json index f56f37b61..749d267da 100644 --- a/extensions/vscode/package-lock.json +++ b/extensions/vscode/package-lock.json @@ -1,12 +1,12 @@ { "name": "continue", - "version": "0.9.65", + "version": "0.9.67", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "continue", - "version": "0.9.65", + "version": "0.9.67", "license": "Apache-2.0", "dependencies": { "@electron/rebuild": "^3.2.10", @@ -98,6 +98,7 @@ "node-html-markdown": "^1.3.0", "ollama": "^0.4.6", "openai": "^4.20.1", + "pg": "^8.11.3", "posthog-node": "^3.6.2", "replicate": "^0.26.0", "socket.io-client": "^4.7.3", diff --git a/extensions/vscode/package.json b/extensions/vscode/package.json index 6c45752fc..977787e74 100644 --- a/extensions/vscode/package.json +++ b/extensions/vscode/package.json @@ -1,7 +1,7 @@ { "name": "continue", "icon": "media/icon.png", - "version": "0.9.65", + "version": "0.9.67", "repository": { "type": "git", "url": "https://github.com/continuedev/continue" diff --git a/extensions/vscode/yarn.lock b/extensions/vscode/yarn.lock index 4d470fefc..57f43ac2a 100644 --- a/extensions/vscode/yarn.lock +++ b/extensions/vscode/yarn.lock @@ -368,15 +368,15 @@ tar "^6.0.5" yargs "^17.0.1" -"@esbuild/darwin-arm64@0.17.19": +"@esbuild/linux-x64@0.17.19": version "0.17.19" - resolved "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.17.19.tgz" - integrity sha512-80wEoCfF/hFKM6WE1FyBHc9SfUblloAWx6FJkFWTWiCoht9Mc0ARGEM47e67W9rI09YoUxJL68WHfDRYEAvOhg== + resolved "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.17.19.tgz" + integrity sha512-68ngA9lg2H6zkZcyp22tsVt38mlhWde8l3eJLWkyLrp4HwMUr3c1s/M2t7+kHIhvMjglIBrFpncX1SzMckomGw== -"@esbuild/darwin-arm64@0.18.20": +"@esbuild/linux-x64@0.18.20": version "0.18.20" - resolved "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.18.20.tgz" - integrity sha512-bxRHW5kHU38zS2lPTPOyuyTm+S+eobPUnTNkdJEfAddYgEcll4xkT8DB9d2008DtTbl7uJag2HuE5NZAZgnNEA== + resolved "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.18.20.tgz" + integrity sha512-UYqiqemphJcNsFEskc73jQ7B9jgwjWrSayxawS6UVFZGWrAAtkzjxSqnoclCXxWtfwLdzU+vTpcNYhpn43uP1w== "@eslint-community/eslint-utils@^4.2.0": version "4.4.0" @@ -696,10 +696,10 @@ resolved "https://registry.npmjs.org/@jsdevtools/ono/-/ono-7.1.3.tgz" integrity sha512-4JQNk+3mVzK3xh2rqd6RB4J46qUR19azEHBneZyTZM+c456qOrbbM/5xcR8huNCCcbVt7+UmizG6GuUvPvKUYg== -"@lancedb/vectordb-darwin-arm64@*", "@lancedb/vectordb-darwin-arm64@0.4.9": +"@lancedb/vectordb-linux-x64-gnu@0.4.9": version "0.4.9" - resolved "https://registry.npmjs.org/@lancedb/vectordb-darwin-arm64/-/vectordb-darwin-arm64-0.4.9.tgz" - integrity sha512-u56TXU0hvdLbknGwC7Ebza3/CUFeCTkoCy/sC6h0FtOGya+NV7jraAeXEwDzoZbfW08VYYxnp3TsCcpNU9lpTA== + resolved "https://registry.npmjs.org/@lancedb/vectordb-linux-x64-gnu/-/vectordb-linux-x64-gnu-0.4.9.tgz" + integrity sha512-HbvSym1WXgTTDb+gfEaD9R/x+NbI6PWM8PrqFaAXkhm2Zzi/eL9eHBl2vgTyYFbzUvucTYnHZzT8a8FzCuvW0A== "@lukeed/csprng@^1.0.0": version "1.1.0" @@ -2324,6 +2324,7 @@ core-util-is@1.0.2: node-html-markdown "^1.3.0" ollama "^0.4.6" openai "^4.20.1" + pg "^8.11.3" posthog-node "^3.6.2" replicate "^0.26.0" socket.io-client "^4.7.3" @@ -3341,11 +3342,6 @@ fs.realpath@^1.0.0: resolved "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz" integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== -fsevents@^2.3.2, fsevents@~2.3.2: - version "2.3.3" - resolved "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz" - integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw== - function-bind@^1.1.2: version "1.1.2" resolved "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz" diff --git a/gui/package-lock.json b/gui/package-lock.json index f1f681629..3443b0811 100644 --- a/gui/package-lock.json +++ b/gui/package-lock.json @@ -86,6 +86,7 @@ "node-html-markdown": "^1.3.0", "ollama": "^0.4.6", "openai": "^4.20.1", + "pg": "^8.11.3", "posthog-node": "^3.6.2", "replicate": "^0.26.0", "socket.io-client": "^4.7.3", From 6113e802d5863fe87f0ade9e6889e4b688b61693 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Wed, 14 Feb 2024 23:54:15 -0800 Subject: [PATCH 017/141] =?UTF-8?q?=F0=9F=9A=A7=20IpcIde=20in=20fewer=20li?= =?UTF-8?q?nes=20of=20code?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/util/messageIde.ts | 118 ++++++++++++++++++++++++++++++++ gui/src/util/webviewIde.ts | 114 ++---------------------------- pkg/package.json | 4 +- pkg/src/IpcIde.ts | 112 +----------------------------- pkg/src/core.ts | 9 +-- pkg/src/messenger.ts | 137 +++++++------------------------------ pkg/src/protocol.ts | 85 +++++++++++++++++++++++ 7 files changed, 244 insertions(+), 335 deletions(-) create mode 100644 core/util/messageIde.ts create mode 100644 pkg/src/protocol.ts diff --git a/core/util/messageIde.ts b/core/util/messageIde.ts new file mode 100644 index 000000000..d6bd21ca6 --- /dev/null +++ b/core/util/messageIde.ts @@ -0,0 +1,118 @@ +import { ContinueRcJson, IDE, Problem, Range } from ".."; + +export class MessageIde implements IDE { + constructor( + private readonly request: (messageType: string, data: any) => Promise + ) {} + + readRangeInFile(filepath: string, range: Range): Promise { + return this.request("readRangeInFile", { filepath, range }); + } + getStats(directory: string): Promise<{ [path: string]: number }> { + throw new Error("Method not implemented."); + } + isTelemetryEnabled(): Promise { + return this.request("isTelemetryEnabled", undefined); + } + + getUniqueId(): Promise { + return this.request("getUniqueId", undefined); + } + + getWorkspaceConfigs(): Promise { + return this.request("getWorkspaceConfigs", undefined); + } + + async getDiff() { + return await this.request("getDiff", undefined); + } + + async getTerminalContents() { + return await this.request("getTerminalContents", undefined); + } + + async listWorkspaceContents(directory?: string): Promise { + return await this.request("listWorkspaceContents", undefined); + } + + async getWorkspaceDirs(): Promise { + return await this.request("getWorkspaceDirs", undefined); + } + + async showLines( + filepath: string, + startLine: number, + endLine: number + ): Promise { + return await this.request("showLines", { filepath, startLine, endLine }); + } + + async listFolders(): Promise { + return await this.request("listFolders", undefined); + } + + _continueDir: string | null = null; + + async getContinueDir(): Promise { + if (this._continueDir) { + return this._continueDir; + } + const dir = await this.request("getContinueDir", undefined); + this._continueDir = dir; + return dir; + } + + async writeFile(path: string, contents: string): Promise { + await this.request("writeFile", { path, contents }); + } + + async showVirtualFile(title: string, contents: string): Promise { + await this.request("showVirtualFile", { name: title, content: contents }); + } + + async openFile(path: string): Promise { + await this.request("openFile", { path }); + } + + async runCommand(command: string): Promise { + await this.request("runCommand", { command }); + } + + async saveFile(filepath: string): Promise { + await this.request("saveFile", { filepath }); + } + async readFile(filepath: string): Promise { + return await this.request("readFile", { filepath }); + } + async showDiff( + filepath: string, + newContents: string, + stepIndex: number + ): Promise { + await this.request("showDiff", { filepath, newContents, stepIndex }); + } + + getOpenFiles(): Promise { + return this.request("getOpenFiles", undefined); + } + + getPinnedFiles(): Promise { + return this.request("getPinnedFiles", undefined); + } + + getSearchResults(query: string): Promise { + return this.request("getSearchResults", { query }); + } + + getProblems(filepath?: string | undefined): Promise { + return this.request("getProblems", { filepath }); + } + + subprocess(command: string): Promise<[string, string]> { + return this.request("subprocess", { command }); + } + + async getBranch(dir: string): Promise { + return this.request("getBranch", { dir }); + } +} diff --git a/gui/src/util/webviewIde.ts b/gui/src/util/webviewIde.ts index 6f993703e..236555b4a 100644 --- a/gui/src/util/webviewIde.ts +++ b/gui/src/util/webviewIde.ts @@ -1,4 +1,4 @@ -import { ContinueRcJson, IDE, Problem, Range } from "core"; +import { MessageIde } from "core/util/messageIde"; import { WebviewProtocol } from "core/web/webviewProtocol"; import { ideRequest } from "./ide"; function r( @@ -7,115 +7,9 @@ function r( ): Promise { return ideRequest(messageType, data); } -export class WebviewIde implements IDE { - readRangeInFile(filepath: string, range: Range): Promise { - return r("readRangeInFile", { filepath, range }); - } - getStats(directory: string): Promise<{ [path: string]: number }> { - throw new Error("Method not implemented."); - } - isTelemetryEnabled(): Promise { - return r("isTelemetryEnabled", undefined); - } - getUniqueId(): Promise { - return r("getUniqueId", undefined); - } - - getWorkspaceConfigs(): Promise { - return r("getWorkspaceConfigs", undefined); - } - - async getDiff() { - return await r("getDiff", undefined); - } - - async getTerminalContents() { - return await r("getTerminalContents", undefined); - } - - async listWorkspaceContents(directory?: string): Promise { - return await r("listWorkspaceContents", undefined); - } - - async getWorkspaceDirs(): Promise { - return await r("getWorkspaceDirs", undefined); - } - - async showLines( - filepath: string, - startLine: number, - endLine: number - ): Promise { - return await r("showLines", { filepath, startLine, endLine }); - } - - async listFolders(): Promise { - return await r("listFolders", undefined); - } - - _continueDir: string | null = null; - - async getContinueDir(): Promise { - if (this._continueDir) { - return this._continueDir; - } - const dir = await r("getContinueDir", undefined); - this._continueDir = dir; - return dir; - } - - async writeFile(path: string, contents: string): Promise { - await r("writeFile", { path, contents }); - } - - async showVirtualFile(title: string, contents: string): Promise { - await r("showVirtualFile", { name: title, content: contents }); - } - - async openFile(path: string): Promise { - await r("openFile", { path }); - } - - async runCommand(command: string): Promise { - await r("runCommand", { command }); - } - - async saveFile(filepath: string): Promise { - await r("saveFile", { filepath }); - } - async readFile(filepath: string): Promise { - return await r("readFile", { filepath }); - } - async showDiff( - filepath: string, - newContents: string, - stepIndex: number - ): Promise { - await r("showDiff", { filepath, newContents, stepIndex }); - } - - getOpenFiles(): Promise { - return r("getOpenFiles", undefined); - } - - getPinnedFiles(): Promise { - return r("getPinnedFiles", undefined); - } - - getSearchResults(query: string): Promise { - return r("getSearchResults", { query }); - } - - getProblems(filepath?: string | undefined): Promise { - return r("getProblems", { filepath }); - } - - subprocess(command: string): Promise<[string, string]> { - return r("subprocess", { command }); - } - - async getBranch(dir: string): Promise { - return r("getBranch", { dir }); +export class WebviewIde extends MessageIde { + constructor() { + super(r); } } diff --git a/pkg/package.json b/pkg/package.json index 0c77fa7ed..8f0f726d9 100644 --- a/pkg/package.json +++ b/pkg/package.json @@ -10,7 +10,9 @@ ], "assets": [ "../core/node_modules/sqlite3/**/*", - "node_modules/@lancedb/**/*" + "node_modules/@lancedb/**/*", + "out/tree-sitter.wasm", + "out/tree-sitter-wasms/*" ], "targets": [ "node18-darwin-arm64" diff --git a/pkg/src/IpcIde.ts b/pkg/src/IpcIde.ts index 06b5d6cc8..ff4c5fed1 100644 --- a/pkg/src/IpcIde.ts +++ b/pkg/src/IpcIde.ts @@ -1,114 +1,8 @@ -import { Chunk, ContinueRcJson, IDE, Problem, Range } from "../../core"; +import { MessageIde } from "core/util/messageIde"; import { IpcMessenger } from "./messenger"; -export class IpcIde implements IDE { - private messenger: IpcMessenger; - +export class IpcIde extends MessageIde { constructor(messenger: IpcMessenger) { - this.messenger = messenger; - } - readRangeInFile(filepath: string, range: Range): Promise { - throw new Error("Method not implemented."); - } - - getStats(directory: string): Promise<{ [path: string]: number }> { - throw new Error("Method not implemented."); - } - - isTelemetryEnabled(): Promise { - throw new Error("Method not implemented."); - } - - getUniqueId(): Promise { - throw new Error("Method not implemented."); - } - - getWorkspaceConfigs(): Promise { - throw new Error("Method not implemented."); - } - getDiff(): Promise { - throw new Error("Method not implemented."); - } - getTerminalContents(): Promise { - throw new Error("Method not implemented."); - } - listWorkspaceContents(directory?: string | undefined): Promise { - throw new Error("Method not implemented."); - } - listFolders(): Promise { - throw new Error("Method not implemented."); - } - getWorkspaceDirs(): Promise { - throw new Error("Method not implemented."); - } - writeFile(path: string, contents: string): Promise { - throw new Error("Method not implemented."); - } - showVirtualFile(title: string, contents: string): Promise { - throw new Error("Method not implemented."); - } - getContinueDir(): Promise { - throw new Error("Method not implemented."); - } - openFile(path: string): Promise { - throw new Error("Method not implemented."); - } - runCommand(command: string): Promise { - throw new Error("Method not implemented."); - } - saveFile(filepath: string): Promise { - throw new Error("Method not implemented."); - } - readFile(filepath: string): Promise { - throw new Error("Method not implemented."); - } - showLines( - filepath: string, - startLine: number, - endLine: number - ): Promise { - throw new Error("Method not implemented."); - } - showDiff( - filepath: string, - newContents: string, - stepIndex: number - ): Promise { - throw new Error("Method not implemented."); - } - getOpenFiles(): Promise { - throw new Error("Method not implemented."); - } - getPinnedFiles(): Promise { - throw new Error("Method not implemented."); - } - getSearchResults(query: string): Promise { - throw new Error("Method not implemented."); - } - subprocess(command: string): Promise<[string, string]> { - throw new Error("Method not implemented."); - } - getProblems(filepath?: string | undefined): Promise { - throw new Error("Method not implemented."); - } - getBranch(dir: string): Promise { - throw new Error("Method not implemented."); - } - getFilesToEmbed(providerId: string): Promise<[string, string, string][]> { - throw new Error("Method not implemented."); - } - sendEmbeddingForChunk( - chunk: Chunk, - embedding: number[], - tags: string[] - ): void { - throw new Error("Method not implemented."); - } - retrieveChunks( - text: string, - n: number, - directory: string | undefined - ): Promise { - throw new Error("Method not implemented."); + super(messenger.request); } } diff --git a/pkg/src/core.ts b/pkg/src/core.ts index 3c0473905..2e0f020e3 100644 --- a/pkg/src/core.ts +++ b/pkg/src/core.ts @@ -7,10 +7,11 @@ import { CodebaseIndexer } from "core/indexing/indexCodebase"; import { logDevData } from "core/util/devdata"; import historyManager from "core/util/history"; import { v4 as uuidv4 } from "uuid"; -import { Messenger, Protocol } from "./messenger"; +import { IpcMessenger } from "./messenger"; +import { Protocol } from "./protocol"; export class Core { - private messenger: Messenger; + private messenger: IpcMessenger; private readonly ide: IDE; private readonly configHandler: ConfigHandler; private readonly codebaseIndexer: CodebaseIndexer; @@ -25,13 +26,13 @@ export class Core { return await this.configHandler.llmFromTitle(this.selectedModelTitle); } - constructor(messenger: Messenger, ide: IDE) { + constructor(messenger: IpcMessenger, ide: IDE) { this.messenger = messenger; this.ide = ide; this.configHandler = new ConfigHandler(this.ide); this.codebaseIndexer = new CodebaseIndexer(this.configHandler, this.ide); - const on = this.messenger.on; + const on = this.messenger.on.bind(this.messenger); // New on("update/modelChange", (msg) => { diff --git a/pkg/src/messenger.ts b/pkg/src/messenger.ts index 797240c08..ba0138025 100644 --- a/pkg/src/messenger.ts +++ b/pkg/src/messenger.ts @@ -1,114 +1,13 @@ import { v4 as uuidv4 } from "uuid"; -import { - ChatMessage, - CompletionOptions, - ContextItem, - ContextSubmenuItem, - PersistedSessionInfo, - RangeInFile, - SerializedContinueConfig, - SessionInfo, -} from "../../core"; + import { Message } from "../../core/util/messenger"; +import { Protocol } from "./protocol"; -export abstract class Messenger { - abstract send(messageType: string, message: any, messageId?: string): string; - abstract on( - messageType: T, - handler: (message: Message) => Protocol[T][1] - ): void; - abstract invoke( - messageType: T, - data: Protocol[T][0] - ): Protocol[T][1]; -} - -export type Protocol = { - // New - "update/modelChange": [string, void]; - // Special - abort: [undefined, void]; - - // History - "history/list": [undefined, SessionInfo[]]; - "history/delete": [{ id: string }, void]; - "history/load": [{ id: string }, PersistedSessionInfo]; - "history/save": [PersistedSessionInfo, void]; - "devdata/log": [{ tableName: string; data: any }, void]; - "config/addOpenAiKey": [string, void]; - "config/addModel": [ - { model: SerializedContinueConfig["models"][number] }, - void, - ]; - "config/deleteModel": [{ title: string }, void]; - "config/reload": [undefined, void]; - "context/getContextItems": [ - { - name: string; - query: string; - fullInput: string; - selectedCode: RangeInFile[]; - }, - Promise, - ]; - "context/loadSubmenuItems": [ - { title: string }, - Promise, - ]; - "context/addDocs": [{ title: string; url: string }, void]; - "autocomplete/complete": [ - { filepath: string; line: number; column: number }, - string[], - ]; - "command/run": [ - { - input: string; - history: ChatMessage[]; - modelTitle: string; - slashCommandName: string; - contextItems: ContextItem[]; - params: any; - historyIndex: number; - }, - AsyncGenerator, - ]; - "llm/complete": [ - { - prompt: string; - completionOptions: CompletionOptions; - title: string; - }, - AsyncGenerator, - ]; - "llm/streamComplete": [ - { - prompt: string; - completionOptions: CompletionOptions; - title: string; - }, - AsyncGenerator, - ]; - "llm/streamChat": [ - { - messages: ChatMessage[]; - completionOptions: CompletionOptions; - title: string; - }, - AsyncGenerator, - ]; -}; -type ProtocolKeys = keyof Protocol; - -type ProtocolCallbacks = { - [K in ProtocolKeys]: (msg: Protocol[K][0]) => Protocol[K][1]; -}; - -export class IpcMessenger extends Messenger { - listeners = new Map any)[]>(); +export class IpcMessenger { + typeListeners = new Map any)[]>(); + idListeners = new Map any>(); constructor() { - super(); - console.log = console.error; process.stdin.on("data", (data) => { @@ -123,10 +22,14 @@ export class IpcMessenger extends Messenger { throw new Error("Invalid message sent: " + JSON.stringify(msg)); } - this.listeners.get(msg.messageType)?.forEach(async (handler) => { + // Call handler and respond with return value + this.typeListeners.get(msg.messageType)?.forEach(async (handler) => { const response = await handler(msg); this.send(msg.messageType, response, msg.messageId); }); + + // Call handler which is waiting for the response, nothing to return + this.idListeners.get(msg.messageId)?.(msg); } catch (e) { console.error("Invalid JSON:", d); return; @@ -150,20 +53,32 @@ export class IpcMessenger extends Messenger { messageType: T, handler: (message: Message) => Protocol[T][1] ): void { - if (!this.listeners.has(messageType)) { - this.listeners.set(messageType, []); + if (!this.typeListeners.has(messageType)) { + this.typeListeners.set(messageType, []); } - this.listeners.get(messageType)?.push(handler); + this.typeListeners.get(messageType)?.push(handler); } invoke( messageType: T, data: Protocol[T][0] ): Protocol[T][1] { - return this.listeners.get(messageType)?.[0]?.({ + return this.typeListeners.get(messageType)?.[0]?.({ messageId: uuidv4(), messageType, data, }); } + + request(messageType: string, data: any): Promise { + const messageId = uuidv4(); + return new Promise((resolve) => { + const handler = (msg: Message) => { + resolve(msg.data); + this.idListeners.delete(messageId); + }; + this.idListeners.set(messageId, handler); + this.send(messageType, data, messageId); + }); + } } diff --git a/pkg/src/protocol.ts b/pkg/src/protocol.ts new file mode 100644 index 000000000..ab5e4af8a --- /dev/null +++ b/pkg/src/protocol.ts @@ -0,0 +1,85 @@ +import { + ChatMessage, + CompletionOptions, + ContextItem, + ContextSubmenuItem, + PersistedSessionInfo, + RangeInFile, + SerializedContinueConfig, + SessionInfo, +} from "../../core"; + +export type Protocol = { + // New + "update/modelChange": [string, void]; + // Special + abort: [undefined, void]; + + // History + "history/list": [undefined, SessionInfo[]]; + "history/delete": [{ id: string }, void]; + "history/load": [{ id: string }, PersistedSessionInfo]; + "history/save": [PersistedSessionInfo, void]; + "devdata/log": [{ tableName: string; data: any }, void]; + "config/addOpenAiKey": [string, void]; + "config/addModel": [ + { model: SerializedContinueConfig["models"][number] }, + void, + ]; + "config/deleteModel": [{ title: string }, void]; + "config/reload": [undefined, void]; + "context/getContextItems": [ + { + name: string; + query: string; + fullInput: string; + selectedCode: RangeInFile[]; + }, + Promise, + ]; + "context/loadSubmenuItems": [ + { title: string }, + Promise, + ]; + "context/addDocs": [{ title: string; url: string }, void]; + "autocomplete/complete": [ + { filepath: string; line: number; column: number }, + string[], + ]; + "command/run": [ + { + input: string; + history: ChatMessage[]; + modelTitle: string; + slashCommandName: string; + contextItems: ContextItem[]; + params: any; + historyIndex: number; + }, + AsyncGenerator, + ]; + "llm/complete": [ + { + prompt: string; + completionOptions: CompletionOptions; + title: string; + }, + AsyncGenerator, + ]; + "llm/streamComplete": [ + { + prompt: string; + completionOptions: CompletionOptions; + title: string; + }, + AsyncGenerator, + ]; + "llm/streamChat": [ + { + messages: ChatMessage[]; + completionOptions: CompletionOptions; + title: string; + }, + AsyncGenerator, + ]; +}; From 7b78375301dfa679d045874a46be87602888f289 Mon Sep 17 00:00:00 2001 From: Nicholas Wengel Date: Thu, 15 Feb 2024 19:30:01 -0700 Subject: [PATCH 018/141] docs: add the docs --- docs/docs/customization/context-providers.md | 25 ++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/docs/docs/customization/context-providers.md b/docs/docs/customization/context-providers.md index d976eac8e..a688c3e74 100644 --- a/docs/docs/customization/context-providers.md +++ b/docs/docs/customization/context-providers.md @@ -128,6 +128,31 @@ Type '@highlights' to reference the 'highlights' from all currently open files. { "name": "highlights" } ``` +### PostgreSQL + +Type `@postgres` to reference the schema of a table, and some sample rows. A dropdown will appear, allowing you to select a specific table, or all tables. + +The only required settings are those for creating the database connection: `host`, `port`, `user`, `password`, and `database`. + +By default, the `schema` filter is set to `public`, and the `sampleRows` is set to 3. You may unset the schema if you want to include tables from all schemas. + +[Here is a short demo.](https://github.com/continuedev/continue/pull/859) + +```json +{ + "name": "postgres", + "params": { + "host": "localhost", + "port": 5436, + "user": "myuser", + "password": "catsarecool", + "database": "animals", + "schema": "public", + "sampleRows": 3 + } +} +``` + ### Requesting Context Providers Not seeing what you want? Create an issue [here](https://github.com/continuedev/continue/issues/new?assignees=TyDunn&labels=enhancement&projects=&template=feature-request-%F0%9F%92%AA.md&title=) to request a new ContextProvider. From 5bb270fa97ef9edc66fc198e9f43e76a7b2c61eb Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Thu, 15 Feb 2024 19:56:40 -0800 Subject: [PATCH 019/141] =?UTF-8?q?=F0=9F=9A=A7=20communication=20between?= =?UTF-8?q?=20core=20and=20jetbrains?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .vscode/launch.json | 12 ++ .vscode/tasks.json | 12 ++ core/config/handler.ts | 6 +- core/util/paths.ts | 4 + extensions/intellij/.gitignore | 3 +- extensions/intellij/build.gradle.kts | 6 + .../ContinuePluginStartupActivity.kt | 25 +++- .../continue/CoreMessenger.kt | 139 ++++++++++++++++++ pkg/build.js | 12 ++ pkg/package-lock.json | 11 ++ pkg/package.json | 5 +- pkg/src/IpcIde.ts | 2 +- pkg/src/core.ts | 12 ++ pkg/src/messenger.ts | 36 +++-- pkg/src/protocol.ts | 1 + 15 files changed, 264 insertions(+), 22 deletions(-) create mode 100644 extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/CoreMessenger.kt diff --git a/.vscode/launch.json b/.vscode/launch.json index ad855a194..c00f3a766 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -5,6 +5,18 @@ "version": "0.2.0", "compounds": [], "configurations": [ + { + "type": "node", + "request": "launch", + "name": "Core Binary", + "skipFiles": ["/**"], + "program": "${workspaceFolder}/pkg/out/index.js", + "preLaunchTask": "pkg:esbuild", + "outFiles": ["${workspaceFolder}/pkg/out/**/*.js"], + "sourceMaps": true, + "smartStep": true, + "internalConsoleOptions": "openOnSessionStart" + }, { "type": "node", "request": "launch", diff --git a/.vscode/tasks.json b/.vscode/tasks.json index c46520247..16c7f8614 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -136,6 +136,18 @@ } } ] + }, + // + // esbuild for the core binary + { + "label": "pkg:esbuild", + "type": "shell", + "command": "npm", + "args": ["run", "esbuild"], + "problemMatcher": [], + "options": { + "cwd": "pkg" + } } ] } diff --git a/core/config/handler.ts b/core/config/handler.ts index f83ff8638..8f134a8e1 100644 --- a/core/config/handler.ts +++ b/core/config/handler.ts @@ -18,7 +18,11 @@ export class ConfigHandler { private readonly ide: IDE; constructor(ide: IDE) { this.ide = ide; - this.loadConfig(); + try { + this.loadConfig(); + } catch (e) { + console.error("Failed to load config: ", e); + } } reloadConfig() { diff --git a/core/util/paths.ts b/core/util/paths.ts index 46c545102..ddf9c93da 100644 --- a/core/util/paths.ts +++ b/core/util/paths.ts @@ -183,3 +183,7 @@ export function getTabAutocompleteCacheSqlitePath(): string { export function getDocsSqlitePath(): string { return path.join(getIndexFolderPath(), "docs.sqlite"); } + +export function getCoreLogsPath(): string { + return path.join(getContinueGlobalPath(), "core.log"); +} diff --git a/extensions/intellij/.gitignore b/extensions/intellij/.gitignore index 73ab23c38..9873b602d 100644 --- a/extensions/intellij/.gitignore +++ b/extensions/intellij/.gitignore @@ -1 +1,2 @@ -src/main/resources/webview \ No newline at end of file +src/main/resources/webview +src/main/resources/bin \ No newline at end of file diff --git a/extensions/intellij/build.gradle.kts b/extensions/intellij/build.gradle.kts index 5c1ee1e69..034edeef4 100644 --- a/extensions/intellij/build.gradle.kts +++ b/extensions/intellij/build.gradle.kts @@ -79,6 +79,12 @@ koverReport { } tasks { + prepareSandbox { + from("../../pkg/bin") { + into("${intellij.pluginName.get()}/core/") + } + } + wrapper { gradleVersion = properties("gradleVersion").get() } diff --git a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/activities/ContinuePluginStartupActivity.kt b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/activities/ContinuePluginStartupActivity.kt index 1230ee60e..fe93bc637 100644 --- a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/activities/ContinuePluginStartupActivity.kt +++ b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/activities/ContinuePluginStartupActivity.kt @@ -1,6 +1,7 @@ package com.github.continuedev.continueintellijextension.activities import com.github.continuedev.continueintellijextension.constants.getContinueGlobalPath +import com.github.continuedev.continueintellijextension.`continue`.CoreMessenger import com.github.continuedev.continueintellijextension.`continue`.startProxyServer import com.github.continuedev.continueintellijextension.`continue`.DefaultTextSelectionStrategy import com.github.continuedev.continueintellijextension.`continue`.IdeProtocolClient @@ -30,7 +31,9 @@ import java.nio.charset.StandardCharsets import java.nio.file.Files import java.nio.file.Paths import javax.swing.* - +import com.intellij.openapi.application.PathManager; +import com.intellij.ide.plugins.PluginManager +import com.intellij.openapi.extensions.PluginId class WelcomeDialogWrapper(val project: Project) : DialogWrapper(true) { private var panel: JPanel? = null @@ -156,17 +159,17 @@ class ContinuePluginStartupActivity : StartupActivity, Disposable, DumbAware { // settings.continueState.shownWelcomeDialog = true } - GlobalScope.async(Dispatchers.IO) { - val ideProtocolClient = IdeProtocolClient( + val ideProtocolClient = IdeProtocolClient( continuePluginService, defaultStrategy, coroutineScope, project.basePath, project - ) + ) - continuePluginService.ideProtocolClient = ideProtocolClient + continuePluginService.ideProtocolClient = ideProtocolClient + GlobalScope.async(Dispatchers.IO) { val listener = ContinuePluginSelectionListener( ideProtocolClient, @@ -193,6 +196,18 @@ class ContinuePluginStartupActivity : StartupActivity, Disposable, DumbAware { } } + GlobalScope.async(Dispatchers.IO) { + val myPluginId = "com.github.continuedev.continueintellijextension" + val pluginDescriptor = PluginManager.getPlugin(PluginId.getId(myPluginId)) + + if (pluginDescriptor == null) { + throw Exception("Plugin not found") + } + val pluginPath = pluginDescriptor.pluginPath + val continueCorePath = Paths.get(pluginPath.toString(), "core", "pkg").toString() + + val coreMessenger = CoreMessenger(continueCorePath, ideProtocolClient); + } } } diff --git a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/CoreMessenger.kt b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/CoreMessenger.kt new file mode 100644 index 000000000..e1e505eb6 --- /dev/null +++ b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/CoreMessenger.kt @@ -0,0 +1,139 @@ +package com.github.continuedev.continueintellijextension.`continue` +import com.github.continuedev.continueintellijextension.services.ContinuePluginService +import java.io.BufferedReader +import java.io.InputStreamReader +import java.io.OutputStreamWriter + +import java.io.* + +import com.google.gson.Gson +import com.intellij.openapi.components.ServiceManager +import java.io.* + +class CoreMessenger(continueCorePath: String, ideProtocolClient: IdeProtocolClient) { + private val writer: OutputStreamWriter + private val reader: BufferedReader + private val process: Process + private val gson = Gson() + private val responseListeners = mutableMapOf Unit>() + private val ideProtocolClient = ideProtocolClient + + private fun write(message: String) { + writer.write(message + "\n") + writer.flush() + } + + private fun close() { + writer.close() + reader.close() + val exitCode = process.waitFor() + println("Subprocess exited with code: $exitCode") + } + + fun request(messageType: String, data: Any, onResponse: (String) -> Unit) { + val messageId = uuid(); + val message = gson.toJson(mapOf( + "messageId" to messageId, + "messageType" to messageType, + "data" to data + )) + responseListeners[messageId] = onResponse + write(message) + } + + private fun handleResponse(json: String) { + val responseMap = gson.fromJson(json, Map::class.java) + val messageId = responseMap["messageId"].toString() + val messageType = responseMap["messageType"].toString() + val responseData = gson.toJson(responseMap["data"]) + + // IDE listeners + if (ideMessageTypes.contains(responseMap["messageType"])) { + ideProtocolClient.handleMessage(json) { data -> + val message = gson.toJson(mapOf( + "messageId" to messageId, + "messageType" to messageType, + "data" to data + )) + write(message) + }; + } + + // Responses for messageId + responseListeners[messageId]?.let { listener -> + listener(responseData) + responseListeners.remove(messageId) + } + } + + private val ideMessageTypes = listOf( + "readRangeInFile", + "isTelemetryEnabled", + "getUniqueId", + "getWorkspaceConfigs", + "getDiff", + "getTerminalContents", + "listWorkspaceContents", + "getWorkspaceDirs", + "showLines", + "listFolders", + "getContinueDir", + "writeFile", + "showVirtualFile", + "openFile", + "runCommand", + "saveFile", + "readFile", + "showDiff", + "getOpenFiles", + "getPinnedFiles", + "getSearchResults", + "getProblems", + "subprocess", + "getBranch" + ) + + init { + // Start the subprocess + val processBuilder = ProcessBuilder(continueCorePath) + process = processBuilder.start() + + val outputStream = process.outputStream + val inputStream = process.inputStream + + writer = OutputStreamWriter(outputStream) + reader = BufferedReader(InputStreamReader(inputStream)) + + var sentPing = false + + Thread { + try { + while (true) { + if (!sentPing) { + sentPing = true + request("ping", "ping") { response -> + println("Response!: $response") + } + } + val line = reader.readLine() + println("Core: $line") + if (line != null && line.isNotEmpty()) { + handleResponse(line) + } + } + } catch (e: IOException) { + e.printStackTrace() + } finally { + try { + reader.close() + writer.close() + outputStream.close() + inputStream.close() + process.destroy() + } catch (e: IOException) { + e.printStackTrace() + } + } + }.start() + } +} diff --git a/pkg/build.js b/pkg/build.js index b55bfbf72..5ac8d0661 100644 --- a/pkg/build.js +++ b/pkg/build.js @@ -3,6 +3,14 @@ const { execSync } = require("child_process"); const esbuildOutputFile = "out/index.js"; +let esbuildOnly = false; +for (let i = 2; i < process.argv.length; i++) { + if (process.argv[i] === "--esbuild-only") { + esbuildOnly = true; + break; // Exit the loop once the flag is found + } +} + (async () => { // console.log("[info] Building with ncc..."); // execSync(`npx ncc build src/index.ts -o out`); @@ -28,6 +36,10 @@ const esbuildOutputFile = "out/index.js"; define: { "import.meta.url": "importMetaUrl" }, }); + if (esbuildOnly) { + return; + } + console.log("[info] Building binary with pkg..."); execSync("npx pkg ."); console.log("[info] Done!"); diff --git a/pkg/package-lock.json b/pkg/package-lock.json index 973d4c0a7..000992333 100644 --- a/pkg/package-lock.json +++ b/pkg/package-lock.json @@ -11,6 +11,7 @@ "dependencies": { "commander": "^12.0.0", "core": "file:../core", + "follow-redirects": "^1.15.5", "uuid": "^9.0.1", "vectordb": "^0.4.10" }, @@ -18,6 +19,7 @@ "pkg": "out/index.js" }, "devDependencies": { + "@types/follow-redirects": "^1.14.4", "@types/uuid": "^9.0.8", "@vercel/ncc": "^0.38.1", "esbuild": "^0.19.11", @@ -689,6 +691,15 @@ "resolved": "https://registry.npmjs.org/@types/command-line-usage/-/command-line-usage-5.0.2.tgz", "integrity": "sha512-n7RlEEJ+4x4TS7ZQddTmNSxP+zziEG0TNsMfiRIxcIVXt71ENJ9ojeXmGO3wPoTdn7pJcU2xc3CJYMktNT6DPg==" }, + "node_modules/@types/follow-redirects": { + "version": "1.14.4", + "resolved": "https://registry.npmjs.org/@types/follow-redirects/-/follow-redirects-1.14.4.tgz", + "integrity": "sha512-GWXfsD0Jc1RWiFmMuMFCpXMzi9L7oPDVwxUnZdg89kDNnqsRfUKXEtUYtA98A6lig1WXH/CYY/fvPW9HuN5fTA==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, "node_modules/@types/node": { "version": "20.3.0", "resolved": "https://registry.npmjs.org/@types/node/-/node-20.3.0.tgz", diff --git a/pkg/package.json b/pkg/package.json index 8f0f726d9..df62ee291 100644 --- a/pkg/package.json +++ b/pkg/package.json @@ -23,11 +23,13 @@ "test": "echo \"Error: no test specified\" && exit 1", "build": "node build.js", "build:old": "ncc build src/index.ts -o out && pkg .", - "build:dev": "tsc" + "build:dev": "tsc", + "esbuild": "node build.js --esbuild-only" }, "author": "", "license": "ISC", "devDependencies": { + "@types/follow-redirects": "^1.14.4", "@types/uuid": "^9.0.8", "@vercel/ncc": "^0.38.1", "esbuild": "^0.19.11", @@ -37,6 +39,7 @@ "dependencies": { "commander": "^12.0.0", "core": "file:../core", + "follow-redirects": "^1.15.5", "uuid": "^9.0.1", "vectordb": "^0.4.10" } diff --git a/pkg/src/IpcIde.ts b/pkg/src/IpcIde.ts index ff4c5fed1..5343a2430 100644 --- a/pkg/src/IpcIde.ts +++ b/pkg/src/IpcIde.ts @@ -3,6 +3,6 @@ import { IpcMessenger } from "./messenger"; export class IpcIde extends MessageIde { constructor(messenger: IpcMessenger) { - super(messenger.request); + super(messenger.request.bind(messenger)); } } diff --git a/pkg/src/core.ts b/pkg/src/core.ts index 2e0f020e3..453055377 100644 --- a/pkg/src/core.ts +++ b/pkg/src/core.ts @@ -39,6 +39,18 @@ export class Core { this.selectedModelTitle = msg.data; }); + // Special + on("abort", (msg) => { + // TODO + }); + + on("ping", (msg) => { + if (msg.data !== "ping") { + throw new Error("ping message incorrect"); + } + return "pong"; + }); + // History on("history/list", (msg) => { return historyManager.list(); diff --git a/pkg/src/messenger.ts b/pkg/src/messenger.ts index ba0138025..e396a8650 100644 --- a/pkg/src/messenger.ts +++ b/pkg/src/messenger.ts @@ -1,5 +1,7 @@ import { v4 as uuidv4 } from "uuid"; +import { getCoreLogsPath } from "core/util/paths"; +import * as fs from "fs"; import { Message } from "../../core/util/messenger"; import { Protocol } from "./protocol"; @@ -8,30 +10,37 @@ export class IpcMessenger { idListeners = new Map any>(); constructor() { - console.log = console.error; + const logger = (message: any, ...optionalParams: any[]) => { + const logFilePath = getCoreLogsPath(); + const logMessage = `${message} ${optionalParams.join(" ")}\n`; + fs.appendFileSync(logFilePath, logMessage); + }; + console.log = logger; + console.error = logger; + console.warn = logger; + console.log("[info] Starting Continue core..."); process.stdin.on("data", (data) => { - const d = data.toString(); + console.log("Receieved data: ", data); try { + const d = data.toString(); const msg: Message = JSON.parse(d); - if ( - msg.data !== undefined || - msg.messageType !== undefined || - msg.messageId !== undefined - ) { + if (msg.messageType === undefined || msg.messageId === undefined) { throw new Error("Invalid message sent: " + JSON.stringify(msg)); } // Call handler and respond with return value - this.typeListeners.get(msg.messageType)?.forEach(async (handler) => { - const response = await handler(msg); - this.send(msg.messageType, response, msg.messageId); - }); + this.typeListeners + .get(msg.messageType as any) + ?.forEach(async (handler) => { + const response = await handler(msg); + this.send(msg.messageType, response, msg.messageId); + }); // Call handler which is waiting for the response, nothing to return this.idListeners.get(msg.messageId)?.(msg); } catch (e) { - console.error("Invalid JSON:", d); + console.error("Invalid JSON:", data); return; } }); @@ -45,7 +54,8 @@ export class IpcMessenger { messageId, }; // process.send?.(data); - process.stdout?.write(JSON.stringify(data)); + process.stdout?.write(JSON.stringify(data) + "\n"); + console.log("Sent: ", JSON.stringify(data)); return messageId; } diff --git a/pkg/src/protocol.ts b/pkg/src/protocol.ts index ab5e4af8a..f30586fae 100644 --- a/pkg/src/protocol.ts +++ b/pkg/src/protocol.ts @@ -13,6 +13,7 @@ export type Protocol = { // New "update/modelChange": [string, void]; // Special + ping: [string, string]; abort: [undefined, void]; // History From 05b8776bd3e5646e9f51d23ea704cae1973bef33 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Thu, 15 Feb 2024 21:42:54 -0800 Subject: [PATCH 020/141] =?UTF-8?q?=F0=9F=9A=A7=20jetbrains=20webview=20me?= =?UTF-8?q?ssenging?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../actions/ContinuePluginActions.kt | 12 +- .../continue/CoreMessenger.kt | 13 +- .../continue/IdeProtocolClient.kt | 116 +++++++++++++----- .../services/ContinuePluginService.kt | 16 ++- pkg/src/messenger.ts | 2 +- 5 files changed, 106 insertions(+), 53 deletions(-) diff --git a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/actions/ContinuePluginActions.kt b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/actions/ContinuePluginActions.kt index 0fca2a3e8..3e1aaa1d5 100644 --- a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/actions/ContinuePluginActions.kt +++ b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/actions/ContinuePluginActions.kt @@ -4,13 +4,11 @@ import com.github.continuedev.continueintellijextension.services.ContinuePluginS import com.google.gson.Gson import com.intellij.openapi.actionSystem.AnAction import com.intellij.openapi.actionSystem.AnActionEvent -import com.intellij.openapi.actionSystem.impl.SimpleDataContext import com.intellij.openapi.components.ServiceManager import com.intellij.openapi.ui.DialogWrapper import com.intellij.openapi.ui.Messages import com.intellij.openapi.wm.ToolWindowManager import java.awt.Dimension -import java.awt.GridLayout import javax.swing.* import javax.swing.event.DocumentEvent import javax.swing.event.DocumentListener @@ -130,7 +128,7 @@ class QuickTextEntryAction : AnAction() { } continuePluginService.continuePluginWindow?.content?.components?.get(0)?.requestFocus() - continuePluginService.dispatchCustomEvent(Gson().toJson(mutableMapOf("type" to "focusContinueInput"))) + continuePluginService.sendToWebview("focusContinueInput", null) } } @@ -179,7 +177,7 @@ class FocusContinueInputWithoutClearAction : AnAction() { val continuePluginService = pluginServiceFromActionEvent(e) ?: return continuePluginService.continuePluginWindow?.content?.components?.get(0)?.requestFocus() - continuePluginService.dispatchCustomEvent(Gson().toJson(mutableMapOf("type" to "focusContinueInputWithoutClear"))) + continuePluginService.sendToWebview("focusContinueInputWithoutClear", null) continuePluginService.ideProtocolClient?.sendHighlightedCode() } @@ -202,7 +200,7 @@ class FocusContinueInputAction : AnAction() { val continuePluginService = pluginServiceFromActionEvent(e) ?: return continuePluginService.continuePluginWindow?.content?.components?.get(0)?.requestFocus() - continuePluginService.dispatchCustomEvent(Gson().toJson(mutableMapOf("type" to "focusContinueInput"))) + continuePluginService.sendToWebview("focusContinueInput", null) continuePluginService.ideProtocolClient?.sendHighlightedCode() } @@ -225,7 +223,7 @@ class NewContinueSessionAction : AnAction() { val continuePluginService = pluginServiceFromActionEvent(e) ?: return continuePluginService.continuePluginWindow?.content?.components?.get(0)?.requestFocus() - continuePluginService.dispatchCustomEvent(Gson().toJson(mutableMapOf("type" to "focusContinueInputWithNewSession"))) + continuePluginService.sendToWebview("focusContinueInputWithNewSession", null) } } @@ -239,6 +237,6 @@ class ViewHistoryAction : AnAction() { val continuePluginService = pluginServiceFromActionEvent(e) ?: return - continuePluginService.dispatchCustomEvent(Gson().toJson(mutableMapOf("type" to "viewHistory"))) + continuePluginService.sendToWebview("viewHistory", null) } } \ No newline at end of file diff --git a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/CoreMessenger.kt b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/CoreMessenger.kt index e1e505eb6..ca6d94c20 100644 --- a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/CoreMessenger.kt +++ b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/CoreMessenger.kt @@ -1,5 +1,4 @@ package com.github.continuedev.continueintellijextension.`continue` -import com.github.continuedev.continueintellijextension.services.ContinuePluginService import java.io.BufferedReader import java.io.InputStreamReader import java.io.OutputStreamWriter @@ -7,8 +6,6 @@ import java.io.OutputStreamWriter import java.io.* import com.google.gson.Gson -import com.intellij.openapi.components.ServiceManager -import java.io.* class CoreMessenger(continueCorePath: String, ideProtocolClient: IdeProtocolClient) { private val writer: OutputStreamWriter @@ -41,14 +38,14 @@ class CoreMessenger(continueCorePath: String, ideProtocolClient: IdeProtocolClie write(message) } - private fun handleResponse(json: String) { + private fun handleMessage(json: String) { val responseMap = gson.fromJson(json, Map::class.java) val messageId = responseMap["messageId"].toString() val messageType = responseMap["messageType"].toString() - val responseData = gson.toJson(responseMap["data"]) + val data = gson.toJson(responseMap["data"]) // IDE listeners - if (ideMessageTypes.contains(responseMap["messageType"])) { + if (ideMessageTypes.contains(messageType)) { ideProtocolClient.handleMessage(json) { data -> val message = gson.toJson(mapOf( "messageId" to messageId, @@ -61,7 +58,7 @@ class CoreMessenger(continueCorePath: String, ideProtocolClient: IdeProtocolClie // Responses for messageId responseListeners[messageId]?.let { listener -> - listener(responseData) + listener(data) responseListeners.remove(messageId) } } @@ -118,7 +115,7 @@ class CoreMessenger(continueCorePath: String, ideProtocolClient: IdeProtocolClie val line = reader.readLine() println("Core: $line") if (line != null && line.isNotEmpty()) { - handleResponse(line) + handleMessage(line) } } } catch (e: IOException) { 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 b52384052..4da8e70dc 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 @@ -123,13 +123,7 @@ class IdeProtocolClient ( private fun send(messageType: String, data: Any?, messageId: String? = null) { val id = messageId ?: uuid() - val message = IdeMessage( - messageType, - id, - data - ) - val json = Gson().toJson(message) - continuePluginService.dispatchCustomEvent(json) + continuePluginService.sendToWebview(messageType, data, id) } fun handleMessage(text: String, respond: (Any?) -> Unit) { @@ -143,7 +137,7 @@ class IdeProtocolClient ( println("Recieved message without type: $text") return@launch } - val data = parsedMessage["data"] as Map<*, *> + val data = parsedMessage["data"] val historyManager = HistoryManager() @@ -171,8 +165,12 @@ class IdeProtocolClient ( )) } + "getUniqueId" -> { + respond(uniqueId()) + } + "showDiff" -> { - val data = data["message"] as Map + val data = data as Map diffManager.showDiff( data["filepath"] as String, data["newContents"] as String, @@ -182,10 +180,31 @@ class IdeProtocolClient ( } "readFile" -> { - val msg = readFile((data["message"] as Map)["filepath"] as String) + val msg = readFile((data as Map)["filepath"] as String) respond(msg) } + "isTelemetryEnabled" -> { + respond(true) + } + + "readRangeInFile" -> { + val fullContents = readFile((data as Map)["filepath"] as String) + val range = data["range"] as Map + val start = range["start"] as Map + val end = range["end"] as Map + val startLine = start["line"] as Int + val startCharacter = start["character"] as Int + val endLine = end["line"] as Int + val endCharacter = end["character"] as Int + + val firstLine = fullContents.split("\n")[startLine].slice(startCharacter until fullContents.split("\n")[startLine].length) + val lastLine = fullContents.split("\n")[endLine].slice(0 until endCharacter) + val between = fullContents.split("\n").slice(startLine + 1 until endLine).joinToString("\n") + + respond(firstLine + "\n" + between + "\n" + lastLine) + } + "listWorkspaceContents" -> { respond(listDirectoryContents(null)) } @@ -194,6 +213,10 @@ class IdeProtocolClient ( respond(workspaceDirectories()) } + "getWorkspaceConfigs" -> { + respond(emptyList()) + } + "getTerminalContents" -> { respond( mapOf("contents" to "Terminal cannot be accessed in JetBrains IDE") @@ -207,10 +230,11 @@ class IdeProtocolClient ( } "saveFile" -> { - saveFile((data["message"] as Map)["filepath"] ?: throw Exception("No filepath provided")) + saveFile((data as Map)["filepath"] ?: throw Exception("No filepath provided")) respond(null) } "showVirtualFile" -> { + val data = data as Map showVirtualFile( data["name"] as String, data["contents"] as String @@ -220,10 +244,11 @@ class IdeProtocolClient ( "connected" -> {} "showMessage" -> { - showMessage(data["message"] as String) + showMessage(data as String) respond(null) } "setFileOpen" -> { + val data = data as Map setFileOpen( data["filepath"] as String, data["open"] as Boolean @@ -231,8 +256,27 @@ class IdeProtocolClient ( respond(null) } + "showLines" -> { + val data = data as Map + val filepath = data["filepath"] as String + val startLine = data["startLine"] as Int + val endLine = data["endLine"] as Int + highlightCode( + RangeInFile( + filepath, + Range( + Position(startLine, 0), + Position(endLine, 0) + ) + ), + data["color"] as String + ) + respond(null) + } + "highlightCode" -> { val gson = Gson() + val data = data as Map val json = gson.toJson(data["rangeInFile"]) val type = object : TypeToken() {}.type val rangeInFile = @@ -304,7 +348,7 @@ class IdeProtocolClient ( respond(configJsDataUrl) } "writeFile" -> { - val msg = data["message"] as Map; + val msg = data as Map; val file = File(msg["path"]) file.writeText(msg["contents"] as String) respond(null); @@ -313,7 +357,7 @@ class IdeProtocolClient ( respond(getContinueGlobalPath()) } "openFile" -> { - setFileOpen((data["message"] as Map)["path"] as String) + setFileOpen((data as Map)["path"] as String) respond(null) } "runCommand" -> { @@ -321,7 +365,12 @@ class IdeProtocolClient ( // Running commands not yet supported in JetBrains } "errorPopup" -> { - showMessage(data["message"] as String) + showMessage(data as String) + respond(null) + } + + "listFolders" -> { + respond(null) } // History @@ -329,15 +378,15 @@ class IdeProtocolClient ( respond(historyManager.list()); } "saveSession" -> { - historyManager.save(data["message"] as PersistedSessionInfo); + historyManager.save(data as PersistedSessionInfo); respond(null); } "deleteSession" -> { - historyManager.delete(data["message"] as String); + historyManager.delete(data as String); respond(null); } "loadSession" -> { - val session = historyManager.load(data["message"] as String) + val session = historyManager.load(data as String) respond(session) } "getSearchResults" -> { @@ -349,7 +398,12 @@ class IdeProtocolClient ( val openFiles = visibleFiles() respond(openFiles) } + "getPinnedFiles" -> { + val openFiles = visibleFiles() + respond(openFiles) + } "logDevData" -> { + val data = data as Map val filename = data["tableName"] as String val jsonLine = data["data"] val filepath = getDevDataFilepath(filename) @@ -357,6 +411,7 @@ class IdeProtocolClient ( File(filepath).appendText(contents) } "addModel" -> { + val data = data as Map val model = data["model"] as Map val updatedConfig = editConfigJson { val models = it["models"] as MutableList> @@ -370,7 +425,7 @@ class IdeProtocolClient ( "deleteModel" -> { val configJson = editConfigJson { config -> var models: MutableList> = config["models"] as MutableList> - + val data = data as Map val model = data["title"] as String models = models.filter { it["title"] != model }.toMutableList() config["models"] = models @@ -380,6 +435,7 @@ class IdeProtocolClient ( } "addOpenAIKey" -> { val updatedConfig = editConfigJson { config -> + val data = data as Map val key = data["key"] as String var models = config["models"] as MutableList> models = models.map { @@ -410,12 +466,7 @@ class IdeProtocolClient ( } fun configUpdate(config: Map) { - val data = mapOf( - "type" to "configUpdate", - "config" to config - ) - val json = Gson().toJson(data) - continuePluginService.dispatchCustomEvent(json) + continuePluginService.sendToWebview("configUpdate", config) } private fun editConfigJson(callback: (config: MutableMap) -> Map): Map { @@ -559,20 +610,17 @@ class IdeProtocolClient ( // edit // )) - continuePluginService.dispatchCustomEvent( - Gson().toJson(mapOf( - "type" to "highlightedCode", + continuePluginService.sendToWebview( +"highlightedCode", + mapOf( "rangeInFileWithContents" to rif, "edit" to edit - ))) + ) + ) } fun sendMainUserInput(input: String) { - val data = mapOf( - "type" to "userInput", - "input" to input, - ) - continuePluginService.dispatchCustomEvent(Gson().toJson(data)) + continuePluginService.sendToWebview("userInput", mapOf("input" to input)) } fun sendAcceptRejectDiff(accepted: Boolean, stepIndex: Int) { diff --git a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/services/ContinuePluginService.kt b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/services/ContinuePluginService.kt index 7e944a97a..06ec7327a 100644 --- a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/services/ContinuePluginService.kt +++ b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/services/ContinuePluginService.kt @@ -1,6 +1,7 @@ package com.github.continuedev.continueintellijextension.services import com.github.continuedev.continueintellijextension.`continue`.IdeProtocolClient +import com.github.continuedev.continueintellijextension.`continue`.uuid import com.github.continuedev.continueintellijextension.toolWindow.ContinuePluginToolWindowFactory import com.google.gson.Gson import com.intellij.openapi.Disposable @@ -33,10 +34,19 @@ class ContinuePluginService(project: Project) : Disposable, DumbAware { } } - fun dispatchCustomEvent( - data: String + fun sendToWebview( + messageType: String, + data: Any?, + messageId: String = uuid() ) { - val jsCode = buildJavaScript(data) + val jsonData = Gson().toJson( + mapOf( + "messageId" to messageId, + "messageType" to messageType, + "data" to data + ) + ) + val jsCode = buildJavaScript(jsonData) try { continuePluginWindow?.webView?.executeJavaScriptAsync(jsCode) diff --git a/pkg/src/messenger.ts b/pkg/src/messenger.ts index e396a8650..4fdeb1078 100644 --- a/pkg/src/messenger.ts +++ b/pkg/src/messenger.ts @@ -54,7 +54,7 @@ export class IpcMessenger { messageId, }; // process.send?.(data); - process.stdout?.write(JSON.stringify(data) + "\n"); + process.stdout?.write(JSON.stringify(data) + "\r\n"); console.log("Sent: ", JSON.stringify(data)); return messageId; } From a4b8b1c4e779b86d3a76fd481174d866d976e2ff Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Fri, 16 Feb 2024 08:59:33 -0800 Subject: [PATCH 021/141] =?UTF-8?q?=F0=9F=9A=A7=20pass=20messages=20throug?= =?UTF-8?q?h=20to=20core?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ContinuePluginStartupActivity.kt | 1 + .../continue/CoreMessenger.kt | 2 +- .../services/ContinuePluginService.kt | 2 ++ .../ContinuePluginToolWindowFactory.kt | 21 +++++++++++++++---- gui/src/util/ide.ts | 6 +++++- 5 files changed, 26 insertions(+), 6 deletions(-) diff --git a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/activities/ContinuePluginStartupActivity.kt b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/activities/ContinuePluginStartupActivity.kt index fe93bc637..817f3902f 100644 --- a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/activities/ContinuePluginStartupActivity.kt +++ b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/activities/ContinuePluginStartupActivity.kt @@ -207,6 +207,7 @@ class ContinuePluginStartupActivity : StartupActivity, Disposable, DumbAware { val continueCorePath = Paths.get(pluginPath.toString(), "core", "pkg").toString() val coreMessenger = CoreMessenger(continueCorePath, ideProtocolClient); + continuePluginService.coreMessenger = coreMessenger } } } diff --git a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/CoreMessenger.kt b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/CoreMessenger.kt index ca6d94c20..0c5e0f86f 100644 --- a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/CoreMessenger.kt +++ b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/CoreMessenger.kt @@ -27,7 +27,7 @@ class CoreMessenger(continueCorePath: String, ideProtocolClient: IdeProtocolClie println("Subprocess exited with code: $exitCode") } - fun request(messageType: String, data: Any, onResponse: (String) -> Unit) { + fun request(messageType: String, data: Any?, onResponse: (String) -> Unit) { val messageId = uuid(); val message = gson.toJson(mapOf( "messageId" to messageId, diff --git a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/services/ContinuePluginService.kt b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/services/ContinuePluginService.kt index 06ec7327a..bac9d3096 100644 --- a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/services/ContinuePluginService.kt +++ b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/services/ContinuePluginService.kt @@ -1,5 +1,6 @@ package com.github.continuedev.continueintellijextension.services +import com.github.continuedev.continueintellijextension.`continue`.CoreMessenger import com.github.continuedev.continueintellijextension.`continue`.IdeProtocolClient import com.github.continuedev.continueintellijextension.`continue`.uuid import com.github.continuedev.continueintellijextension.toolWindow.ContinuePluginToolWindowFactory @@ -21,6 +22,7 @@ class ContinuePluginService(project: Project) : Disposable, DumbAware { var continuePluginWindow: ContinuePluginToolWindowFactory.ContinuePluginWindow? = null var ideProtocolClient: IdeProtocolClient? = null + var coreMessenger: CoreMessenger? = null var worksapcePaths: Array? = null var windowId: String = UUID.randomUUID().toString() diff --git a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/toolWindow/ContinuePluginToolWindowFactory.kt b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/toolWindow/ContinuePluginToolWindowFactory.kt index 50451b02f..289170d1b 100644 --- a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/toolWindow/ContinuePluginToolWindowFactory.kt +++ b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/toolWindow/ContinuePluginToolWindowFactory.kt @@ -55,6 +55,10 @@ class ContinuePluginToolWindowFactory : ToolWindowFactory, DumbAware { class ContinuePluginWindow(toolWindow: ToolWindow, project: Project) { + val PASS_THROUGH_TO_CORE = listOf( + "getSerializedConfig" + ) + init { System.setProperty("ide.browser.jcef.jsQueryPoolSize", JS_QUERY_POOL_SIZE) } @@ -83,8 +87,8 @@ class ContinuePluginToolWindowFactory : ToolWindowFactory, DumbAware { val parser = JsonParser() val json: JsonObject = parser.parse(msg).asJsonObject val messageType = json.get("messageType").asString - val data = json.get("data").asJsonObject - val messageId = json.get("messageId").asString + val data = json.get("data") + val messageId = json.get("messageId")?.asString val ide = continuePluginService.ideProtocolClient; @@ -98,6 +102,11 @@ class ContinuePluginToolWindowFactory : ToolWindowFactory, DumbAware { browser.executeJavaScriptAsync("""window.postMessage($jsonString, "*");""") } + if (PASS_THROUGH_TO_CORE.contains(messageType)) { + continuePluginService.coreMessenger?.request(messageType, data, respond) + return@addHandler null + } + when (messageType) { "onLoad" -> { GlobalScope.launch { @@ -143,6 +152,7 @@ class ContinuePluginToolWindowFactory : ToolWindowFactory, DumbAware { } "showLines" -> { + val data = data.asJsonObject ide?.highlightCode(RangeInFile( data.get("filepath").asString, Range(Position( @@ -156,9 +166,11 @@ class ContinuePluginToolWindowFactory : ToolWindowFactory, DumbAware { ),"#00ff0022") } "showVirtualFile" -> { + val data = data.asJsonObject ide?.showVirtualFile(data.get("name").asString, data.get("content").asString) } "showFile" -> { + val data = data.asJsonObject ide?.setFileOpen(data.get("filepath").asString) } "reloadWindow" -> {} @@ -166,6 +178,7 @@ class ContinuePluginToolWindowFactory : ToolWindowFactory, DumbAware { ide?.setFileOpen(getConfigJsonPath()) } "readRangeInFile" -> { + val data = data.asJsonObject ide?.readRangeInFile(RangeInFile( data.get("filepath").asString, Range(Position( @@ -211,8 +224,8 @@ class ContinuePluginToolWindowFactory : ToolWindowFactory, DumbAware { fun executeJavaScript(browser: CefBrowser?, myJSQueryOpenInBrowser: JBCefJSQuery) { // Execute JavaScript - you might want to handle potential exceptions here - val script = """window.postIntellijMessage = function(type, data) { - const msg = JSON.stringify({type, data}); + val script = """window.postIntellijMessage = function(messageType, data, messageId) { + const msg = JSON.stringify({messageType, data, messageId}); ${myJSQueryOpenInBrowser.inject("msg")} }""".trimIndent() diff --git a/gui/src/util/ide.ts b/gui/src/util/ide.ts index 1cd49adb9..ee61c6253 100644 --- a/gui/src/util/ide.ts +++ b/gui/src/util/ide.ts @@ -23,7 +23,11 @@ function _postToIde(messageType: string, data: any, messageId?: string) { ); throw new Error("postIntellijMessage is undefined"); } - (window as any).postIntellijMessage?.(messageType, data); + (window as any).postIntellijMessage?.( + messageType, + data, + messageId ?? uuidv4() + ); return; } else { console.log( From ce04a7527433bf5aec3f71e8a2120a7514797213 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Sat, 17 Feb 2024 11:16:09 -0800 Subject: [PATCH 022/141] =?UTF-8?q?=F0=9F=9A=A7=20messaging?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/config/default.ts | 5 -- core/config/handler.ts | 5 +- core/config/load.ts | 2 +- .../ContinuePluginStartupActivity.kt | 7 +-- .../continue/CoreMessenger.kt | 10 +--- .../continue/GetTheme.kt | 38 ++++++++++++ .../continue/IdeProtocolClient.kt | 23 -------- .../ContinuePluginToolWindowFactory.kt | 7 +-- gui/src/util/ide.ts | 7 +-- pkg/src/core.ts | 5 ++ pkg/src/index.ts | 16 +++-- pkg/src/messenger.ts | 58 ++++++++++++------- pkg/src/protocol.ts | 4 ++ 13 files changed, 107 insertions(+), 80 deletions(-) create mode 100644 extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/GetTheme.kt diff --git a/core/config/default.ts b/core/config/default.ts index 0d3a7798f..7af901c99 100644 --- a/core/config/default.ts +++ b/core/config/default.ts @@ -2,11 +2,6 @@ import { SerializedContinueConfig } from ".."; const defaultConfig: SerializedContinueConfig = { models: [ - { - title: "GPT-4 (Free Trial)", - provider: "free-trial", - model: "gpt-4", - }, { title: "GPT-4 Vision (Free Trial)", provider: "free-trial", diff --git a/core/config/handler.ts b/core/config/handler.ts index 8f134a8e1..c1b30b563 100644 --- a/core/config/handler.ts +++ b/core/config/handler.ts @@ -67,8 +67,9 @@ export class ConfigHandler { ); return this.savedConfig; - } catch (e) { - throw new Error("Failed to load config"); + } catch (e: any) { + console.error("Failed to load config: ", e.message); + throw new Error("Failed to load config: " + e.message); } } diff --git a/core/config/load.ts b/core/config/load.ts index 34e7150ad..6b059cc75 100644 --- a/core/config/load.ts +++ b/core/config/load.ts @@ -340,7 +340,7 @@ async function buildConfigTs(browser: boolean) { sourcemap: true, }); } catch (e) { - throw new Error( + console.log( "Build error. Please check your ~/.continue/config.ts file: " + e ); return undefined; diff --git a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/activities/ContinuePluginStartupActivity.kt b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/activities/ContinuePluginStartupActivity.kt index 817f3902f..203e05a23 100644 --- a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/activities/ContinuePluginStartupActivity.kt +++ b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/activities/ContinuePluginStartupActivity.kt @@ -1,10 +1,7 @@ package com.github.continuedev.continueintellijextension.activities import com.github.continuedev.continueintellijextension.constants.getContinueGlobalPath -import com.github.continuedev.continueintellijextension.`continue`.CoreMessenger -import com.github.continuedev.continueintellijextension.`continue`.startProxyServer -import com.github.continuedev.continueintellijextension.`continue`.DefaultTextSelectionStrategy -import com.github.continuedev.continueintellijextension.`continue`.IdeProtocolClient +import com.github.continuedev.continueintellijextension.`continue`.* import com.github.continuedev.continueintellijextension.listeners.ContinuePluginSelectionListener import com.github.continuedev.continueintellijextension.services.ContinueExtensionSettings import com.github.continuedev.continueintellijextension.services.ContinuePluginService @@ -124,6 +121,8 @@ class ContinuePluginStartupActivity : StartupActivity, Disposable, DumbAware { ContinuePluginService::class.java ) + val theme = GetTheme().getTheme() + val defaultStrategy = DefaultTextSelectionStrategy() coroutineScope.launch { diff --git a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/CoreMessenger.kt b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/CoreMessenger.kt index 0c5e0f86f..98ff3d568 100644 --- a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/CoreMessenger.kt +++ b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/CoreMessenger.kt @@ -16,7 +16,7 @@ class CoreMessenger(continueCorePath: String, ideProtocolClient: IdeProtocolClie private val ideProtocolClient = ideProtocolClient private fun write(message: String) { - writer.write(message + "\n") + writer.write(message + "\r\n") writer.flush() } @@ -101,17 +101,9 @@ class CoreMessenger(continueCorePath: String, ideProtocolClient: IdeProtocolClie writer = OutputStreamWriter(outputStream) reader = BufferedReader(InputStreamReader(inputStream)) - var sentPing = false - Thread { try { while (true) { - if (!sentPing) { - sentPing = true - request("ping", "ping") { response -> - println("Response!: $response") - } - } val line = reader.readLine() println("Core: $line") if (line != null && line.isNotEmpty()) { diff --git a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/GetTheme.kt b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/GetTheme.kt new file mode 100644 index 000000000..bf9ae4d5f --- /dev/null +++ b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/GetTheme.kt @@ -0,0 +1,38 @@ +package com.github.continuedev.continueintellijextension.`continue` +import com.intellij.openapi.editor.colors.EditorColorsManager +import com.intellij.openapi.editor.colors.EditorColorsScheme +import com.intellij.openapi.editor.colors.TextAttributesKey + +/* +[ + "--vscode-input-background", + "--vscode-sideBar-background", + "--vscode-editor-foreground", + "--vscode-button-background", + "--vscode-editor-background", + "--vscode-list-activeSelectionBackground", + "--vscode-focus-border", + "--vscode-quickInputList-focusForeground", + "--vscode-quickInput-background", + "--vscode-input-border", + "--vscode-focusBorder", + "--vscode-badge-background", + "--vscode-badge-foreground", + "--vscode-sideBar-border" +] + + */ +val vscToJetBrainsColorName = listOf( + arrayOf("--vscode-input-background", "?"), + arrayOf("--vscode-sideBar-background", "?"), + arrayOf("--vscode-editor-foreground", "?"), + +) + +class GetTheme { + fun getTheme(): EditorColorsScheme { + val editorColorsManager: EditorColorsManager = EditorColorsManager.getInstance() + val scheme: EditorColorsScheme = editorColorsManager.globalScheme + return scheme + } +} \ No newline at end of file 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 4da8e70dc..ffae756b5 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 @@ -317,29 +317,6 @@ class IdeProtocolClient ( respond(output.toString()); } - "getSerializedConfig" -> { - val configPath = getConfigJsonPath() - var config = File(configPath).readText() - - migrate("camelCaseConfig") { - if (config.contains("_")) { - config = config - .replace(Regex("(_\\w)")) { it.value[1].uppercase() } - .replace("openai-aiohttp", "openai") - // Rewrite to config.json - File(configPath).writeText(config) - } - } - - migrate("renameFreeTrialProvider") { - config = config.replace("openai-free-trial", "free-trial"); - File(configPath).writeText(config) - } - - val mapType = object : TypeToken>() {}.type - val parsed: Map = Gson().fromJson(config, mapType) - respond(parsed) - } "getConfigJsUrl" -> { // Calculate a data URL for the config.js file val configJsPath = getConfigJsPath() diff --git a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/toolWindow/ContinuePluginToolWindowFactory.kt b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/toolWindow/ContinuePluginToolWindowFactory.kt index 289170d1b..8cbf8a499 100644 --- a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/toolWindow/ContinuePluginToolWindowFactory.kt +++ b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/toolWindow/ContinuePluginToolWindowFactory.kt @@ -1,10 +1,7 @@ package com.github.continuedev.continueintellijextension.toolWindow import com.github.continuedev.continueintellijextension.constants.getConfigJsonPath -import com.github.continuedev.continueintellijextension.`continue`.Position -import com.github.continuedev.continueintellijextension.`continue`.Range -import com.github.continuedev.continueintellijextension.`continue`.RangeInFile -import com.github.continuedev.continueintellijextension.`continue`.getMachineUniqueID +import com.github.continuedev.continueintellijextension.`continue`.* import com.github.continuedev.continueintellijextension.factories.CustomSchemeHandlerFactory import com.github.continuedev.continueintellijextension.services.ContinuePluginService import com.google.gson.Gson @@ -99,7 +96,7 @@ class ContinuePluginToolWindowFactory : ToolWindowFactory, DumbAware { "messageType" to messageType ) val jsonString = Gson().toJson(jsonData) - browser.executeJavaScriptAsync("""window.postMessage($jsonString, "*");""") + continuePluginService.sendToWebview(messageType, data, messageId ?: uuid()) } if (PASS_THROUGH_TO_CORE.contains(messageType)) { diff --git a/gui/src/util/ide.ts b/gui/src/util/ide.ts index ee61c6253..4bcca0a5e 100644 --- a/gui/src/util/ide.ts +++ b/gui/src/util/ide.ts @@ -23,11 +23,8 @@ function _postToIde(messageType: string, data: any, messageId?: string) { ); throw new Error("postIntellijMessage is undefined"); } - (window as any).postIntellijMessage?.( - messageType, - data, - messageId ?? uuidv4() - ); + messageId = messageId ?? uuidv4(); + (window as any).postIntellijMessage?.(messageType, data, messageId); return; } else { console.log( diff --git a/pkg/src/core.ts b/pkg/src/core.ts index 453055377..ff848bca3 100644 --- a/pkg/src/core.ts +++ b/pkg/src/core.ts @@ -119,6 +119,11 @@ export class Core { }); return items; }); + + // Pass-through + on("getSerializedConfig", (msg) => { + return this.configHandler.getSerializedConfig(); + }); } public invoke( diff --git a/pkg/src/index.ts b/pkg/src/index.ts index 8122fe2ff..4b5b81288 100644 --- a/pkg/src/index.ts +++ b/pkg/src/index.ts @@ -1,14 +1,22 @@ import { Command } from "commander"; -import { IpcIde } from "./IpcIde"; +import FileSystemIde from "core/util/filesystem"; +import fs from "fs"; import { Core } from "./core"; import { IpcMessenger } from "./messenger"; const program = new Command(); program.action(() => { - const messenger = new IpcMessenger(); - const ide = new IpcIde(messenger); - const core = new Core(messenger, ide); + try { + const messenger = new IpcMessenger(); + // const ide = new IpcIde(messenger); + const ide = new FileSystemIde(); + const core = new Core(messenger, ide); + } catch (e) { + fs.writeFileSync("./error.log", `${new Date().toISOString()} ${e}\n`); + console.log("Error: ", e); + process.exit(1); + } }); program.parse(process.argv); diff --git a/pkg/src/messenger.ts b/pkg/src/messenger.ts index 4fdeb1078..56700de1d 100644 --- a/pkg/src/messenger.ts +++ b/pkg/src/messenger.ts @@ -21,29 +21,43 @@ export class IpcMessenger { console.log("[info] Starting Continue core..."); process.stdin.on("data", (data) => { - console.log("Receieved data: ", data); - try { - const d = data.toString(); - const msg: Message = JSON.parse(d); - if (msg.messageType === undefined || msg.messageId === undefined) { - throw new Error("Invalid message sent: " + JSON.stringify(msg)); - } - - // Call handler and respond with return value - this.typeListeners - .get(msg.messageType as any) - ?.forEach(async (handler) => { - const response = await handler(msg); - this.send(msg.messageType, response, msg.messageId); - }); - - // Call handler which is waiting for the response, nothing to return - this.idListeners.get(msg.messageId)?.(msg); - } catch (e) { - console.error("Invalid JSON:", data); - return; - } + this._handleData(data); }); + process.stdout.on("close", () => { + fs.writeFileSync("./error.log", `${new Date().toISOString()}\n`); + console.log("[info] Exiting Continue core..."); + process.exit(1); + }); + process.stdin.on("close", () => { + fs.writeFileSync("./error.log", `${new Date().toISOString()}\n`); + console.log("[info] Exiting Continue core..."); + process.exit(1); + }); + } + + private _handleData(data: Buffer) { + console.log("Receieved data: ", data); + try { + const d = data.toString(); + const msg: Message = JSON.parse(d); + if (msg.messageType === undefined || msg.messageId === undefined) { + throw new Error("Invalid message sent: " + JSON.stringify(msg)); + } + + // Call handler and respond with return value + this.typeListeners + .get(msg.messageType as any) + ?.forEach(async (handler) => { + const response = await handler(msg); + this.send(msg.messageType, response, msg.messageId); + }); + + // Call handler which is waiting for the response, nothing to return + this.idListeners.get(msg.messageId)?.(msg); + } catch (e) { + console.error("Invalid JSON:", data); + return; + } } send(messageType: string, message: any, messageId?: string): string { diff --git a/pkg/src/protocol.ts b/pkg/src/protocol.ts index f30586fae..2a666c81c 100644 --- a/pkg/src/protocol.ts +++ b/pkg/src/protocol.ts @@ -1,3 +1,4 @@ +import { BrowserSerializedContinueConfig } from "core/config/load"; import { ChatMessage, CompletionOptions, @@ -83,4 +84,7 @@ export type Protocol = { }, AsyncGenerator, ]; + + // Pass-through from webview + getSerializedConfig: [undefined, Promise]; }; From 5ff47248eb30e7b05801a969c4edfd232ae36433 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Sat, 17 Feb 2024 13:07:22 -0800 Subject: [PATCH 023/141] =?UTF-8?q?=F0=9F=9A=A7=20json.parse=20incoming=20?= =?UTF-8?q?messages=20in=20webview?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gui/src/util/ide.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gui/src/util/ide.ts b/gui/src/util/ide.ts index 4bcca0a5e..73638eba9 100644 --- a/gui/src/util/ide.ts +++ b/gui/src/util/ide.ts @@ -82,7 +82,8 @@ export async function ideRequest( const handler = (event: any) => { if (event.data.messageId === messageId) { window.removeEventListener("message", handler); - resolve(event.data.data); + const responseData = JSON.parse(event.data.data ?? null); + resolve(responseData); } }; window.addEventListener("message", handler); From 998ceec5df12592e7ae9eb404c81feade0c5bc3b Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Sat, 17 Feb 2024 15:01:47 -0800 Subject: [PATCH 024/141] =?UTF-8?q?=F0=9F=9A=A7=20messaging?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/llm/llms/Ollama.ts | 76 +++++++++--------- core/web/webviewProtocol.ts | 1 + .../continue/CoreMessenger.kt | 3 +- .../continue/GetTheme.kt | 78 ++++++++++++------- .../ContinuePluginToolWindowFactory.kt | 50 +++++------- .../components/modelSelection/ModelSelect.tsx | 32 +------- gui/src/hooks/useSetup.ts | 6 ++ pkg/src/index.ts | 8 ++ pkg/src/messenger.ts | 5 ++ 9 files changed, 132 insertions(+), 127 deletions(-) diff --git a/core/llm/llms/Ollama.ts b/core/llm/llms/Ollama.ts index 1e2fa32aa..3925c02f4 100644 --- a/core/llm/llms/Ollama.ts +++ b/core/llm/llms/Ollama.ts @@ -26,40 +26,44 @@ class Ollama extends BaseLLM { method: "POST", headers: {}, body: JSON.stringify({ name: this._getModel() }), - }).then(async (response) => { - if (response.status !== 200) { - console.warn( - "Error calling Ollama /api/show endpoint: ", - await response.text() - ); - return; - } - const body = await response.json(); - if (body.parameters) { - const params = []; - for (let line of body.parameters.split("\n")) { - let parts = line.split(" "); - if (parts.length < 2) { - continue; - } - let key = parts[0]; - let value = parts[parts.length - 1]; - switch (key) { - case "num_ctx": - this.contextLength = parseInt(value); - break; - case "stop": - if (!this.completionOptions.stop) { - this.completionOptions.stop = []; - } - this.completionOptions.stop.push(value); - break; - default: - break; + }) + .then(async (response) => { + if (response.status !== 200) { + console.warn( + "Error calling Ollama /api/show endpoint: ", + await response.text() + ); + return; + } + const body = await response.json(); + if (body.parameters) { + const params = []; + for (let line of body.parameters.split("\n")) { + let parts = line.split(" "); + if (parts.length < 2) { + continue; + } + let key = parts[0]; + let value = parts[parts.length - 1]; + switch (key) { + case "num_ctx": + this.contextLength = parseInt(value); + break; + case "stop": + if (!this.completionOptions.stop) { + this.completionOptions.stop = []; + } + this.completionOptions.stop.push(value); + break; + default: + break; + } } } - } - }); + }) + .catch((e) => { + console.warn(`Error calling Ollama /api/show endpoint: ${e}`); + }); } private _getModel() { @@ -178,16 +182,16 @@ class Ollama extends BaseLLM { ): AsyncGenerator { const client = new ollama.Ollama({ host: this.apiBase, - + fetch: (input, config) => { return fetch(input, { ...config, headers: { ...(config?.headers || {}), - ...(this.requestOptions?.headers || {}) - } + ...(this.requestOptions?.headers || {}), + }, }); - } + }, }); const response = await client.chat({ ...this._convertArgs(options, messages), diff --git a/core/web/webviewProtocol.ts b/core/web/webviewProtocol.ts index cc005b7ef..1bd07192e 100644 --- a/core/web/webviewProtocol.ts +++ b/core/web/webviewProtocol.ts @@ -157,4 +157,5 @@ export type ReverseWebviewProtocol = { newSession: [undefined, void]; refreshSubmenuItems: [undefined, void]; setTheme: [{ theme: any }, void]; + setColors: [{ [key: string]: string }, void]; }; diff --git a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/CoreMessenger.kt b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/CoreMessenger.kt index 98ff3d568..98039434a 100644 --- a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/CoreMessenger.kt +++ b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/CoreMessenger.kt @@ -105,9 +105,10 @@ class CoreMessenger(continueCorePath: String, ideProtocolClient: IdeProtocolClie try { while (true) { val line = reader.readLine() - println("Core: $line") if (line != null && line.isNotEmpty()) { handleMessage(line) + } else { + Thread.sleep(100) } } } catch (e: IOException) { diff --git a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/GetTheme.kt b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/GetTheme.kt index bf9ae4d5f..b8cf94e76 100644 --- a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/GetTheme.kt +++ b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/GetTheme.kt @@ -1,38 +1,58 @@ package com.github.continuedev.continueintellijextension.`continue` +import com.intellij.codeInsight.template.impl.TemplateColors +import com.intellij.openapi.editor.DefaultLanguageHighlighterColors +import com.intellij.openapi.editor.colors.EditorColors import com.intellij.openapi.editor.colors.EditorColorsManager import com.intellij.openapi.editor.colors.EditorColorsScheme import com.intellij.openapi.editor.colors.TextAttributesKey +import kotlin.math.max +import kotlin.math.min -/* -[ - "--vscode-input-background", - "--vscode-sideBar-background", - "--vscode-editor-foreground", - "--vscode-button-background", - "--vscode-editor-background", - "--vscode-list-activeSelectionBackground", - "--vscode-focus-border", - "--vscode-quickInputList-focusForeground", - "--vscode-quickInput-background", - "--vscode-input-border", - "--vscode-focusBorder", - "--vscode-badge-background", - "--vscode-badge-foreground", - "--vscode-sideBar-border" -] - - */ -val vscToJetBrainsColorName = listOf( - arrayOf("--vscode-input-background", "?"), - arrayOf("--vscode-sideBar-background", "?"), - arrayOf("--vscode-editor-foreground", "?"), - -) class GetTheme { - fun getTheme(): EditorColorsScheme { - val editorColorsManager: EditorColorsManager = EditorColorsManager.getInstance() - val scheme: EditorColorsScheme = editorColorsManager.globalScheme - return scheme + fun getTheme(): Map { + val globalScheme = EditorColorsManager.getInstance().globalScheme + val defaultBackground = globalScheme.defaultBackground + val defaultForeground = globalScheme.defaultForeground + val highlight = globalScheme.getColor(EditorColors.MODIFIED_TAB_ICON_COLOR) ?: defaultForeground + val defaultBackgroundHex = String.format("#%02x%02x%02x", defaultBackground.red, defaultBackground.green, defaultBackground.blue) + val defaultForegroundHex = String.format("#%02x%02x%02x", defaultForeground.red, defaultForeground.green, defaultForeground.blue) + val highlightHex = String.format("#%02x%02x%02x", highlight.red, highlight.green, highlight.blue) + + val grayscale = (defaultBackground.red * 0.3 + defaultBackground.green * 0.59 + defaultBackground.blue * 0.11).toInt() + + val adjustedRed: Int + val adjustedGreen: Int + val adjustedBlue: Int + + val tint: Int = 20 + if (grayscale > 128) { // if closer to white + adjustedRed = max(0, defaultBackground.red - tint) + adjustedGreen = max(0, defaultBackground.green - tint) + adjustedBlue = max(0, defaultBackground.blue - tint) + } else { // if closer to black + adjustedRed = min(255, defaultBackground.red + tint) + adjustedGreen = min(255, defaultBackground.green + tint) + adjustedBlue = min(255, defaultBackground.blue + tint) + } + + val secondaryDarkHex = String.format("#%02x%02x%02x", adjustedRed, adjustedGreen, adjustedBlue) + + return mapOf( + "--vscode-editor-foreground" to defaultForegroundHex, + "--vscode-sideBar-background" to defaultBackgroundHex, + "--vscode-input-background" to secondaryDarkHex, + "--vscode-editor-background" to defaultBackgroundHex, + "--vscode-button-background" to defaultBackgroundHex, + "--vscode-list-activeSelectionBackground" to secondaryDarkHex, + "--vscode-focusBorder" to highlightHex, + "--vscode-quickInputList-focusForeground" to defaultForegroundHex, + "--vscode-quickInput-background" to defaultBackgroundHex, + "--vscode-input-border" to "#80808080", + "--vscode-badge-background" to highlightHex, + "--vscode-badge-foreground" to defaultForegroundHex, + "--vscode-sideBar-border" to "#80808080" + ) + } } \ No newline at end of file diff --git a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/toolWindow/ContinuePluginToolWindowFactory.kt b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/toolWindow/ContinuePluginToolWindowFactory.kt index 8cbf8a499..90c1b549b 100644 --- a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/toolWindow/ContinuePluginToolWindowFactory.kt +++ b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/toolWindow/ContinuePluginToolWindowFactory.kt @@ -53,7 +53,24 @@ class ContinuePluginToolWindowFactory : ToolWindowFactory, DumbAware { class ContinuePluginWindow(toolWindow: ToolWindow, project: Project) { val PASS_THROUGH_TO_CORE = listOf( - "getSerializedConfig" + "abort", + "getContinueDir", + "history", + "saveSession", + "deleteSession", + "loadSession", + "logDevData", + "addModel", + "deleteModel", + "addOpenAIKey", + "llmStreamComplete", + "llmStreamChat", + "llmComplete", + "runNodeJsSlashCommand", + "loadSubmenuItems", + "getContextItems", + "addDocs", + "getSerializedConfig", ) init { @@ -108,35 +125,8 @@ class ContinuePluginToolWindowFactory : ToolWindowFactory, DumbAware { "onLoad" -> { GlobalScope.launch { // Set the colors to match Intellij theme - val globalScheme = EditorColorsManager.getInstance().globalScheme - val defaultBackground = globalScheme.defaultBackground - val defaultForeground = globalScheme.defaultForeground - val defaultBackgroundHex = String.format("#%02x%02x%02x", defaultBackground.red, defaultBackground.green, defaultBackground.blue) - val defaultForegroundHex = String.format("#%02x%02x%02x", defaultForeground.red, defaultForeground.green, defaultForeground.blue) - - val grayscale = (defaultBackground.red * 0.3 + defaultBackground.green * 0.59 + defaultBackground.blue * 0.11).toInt() - - val adjustedRed: Int - val adjustedGreen: Int - val adjustedBlue: Int - - val tint: Int = 20 - if (grayscale > 128) { // if closer to white - adjustedRed = max(0, defaultBackground.red - tint) - adjustedGreen = max(0, defaultBackground.green - tint) - adjustedBlue = max(0, defaultBackground.blue - tint) - } else { // if closer to black - adjustedRed = min(255, defaultBackground.red + tint) - adjustedGreen = min(255, defaultBackground.green + tint) - adjustedBlue = min(255, defaultBackground.blue + tint) - } - - val secondaryDarkHex = String.format("#%02x%02x%02x", adjustedRed, adjustedGreen, adjustedBlue) - - browser.executeJavaScriptAsync("document.body.style.setProperty(\"--vscode-editor-foreground\", \"$defaultForegroundHex\");") - browser.executeJavaScriptAsync("document.body.style.setProperty(\"--vscode-sideBar-background\", \"$defaultBackgroundHex\");") - browser.executeJavaScriptAsync("document.body.style.setProperty(\"--vscode-input-background\", \"$secondaryDarkHex\");") - browser.executeJavaScriptAsync("document.body.style.setProperty(\"--vscode-editor-background\", \"$defaultBackgroundHex\");") + val colors = GetTheme().getTheme(); + continuePluginService.sendToWebview("setColors", colors) val jsonData = mutableMapOf( "windowId" to continuePluginService.windowId, diff --git a/gui/src/components/modelSelection/ModelSelect.tsx b/gui/src/components/modelSelection/ModelSelect.tsx index 25a7adcc7..44fa818dc 100644 --- a/gui/src/components/modelSelection/ModelSelect.tsx +++ b/gui/src/components/modelSelection/ModelSelect.tsx @@ -34,24 +34,6 @@ const GridDiv = styled.div` overflow: hidden; `; -const Select = styled.select` - border: none; - max-width: 50vw; - background-color: ${vscBackground}; - color: ${vscForeground}; - padding: 6px; - max-height: 35vh; - overflow: scroll; - cursor: pointer; - - &:focus { - outline: none; - } - &:hover { - background-color: ${vscInputBackground}; - } -`; - const StyledPlusIcon = styled(PlusIcon)` background-color: ${vscBackground}; cursor: pointer; @@ -66,18 +48,6 @@ const StyledPlusIcon = styled(PlusIcon)` border-left: 0.5px solid ${lightGray}; `; -const NewProviderDiv = styled.div` - cursor: pointer; - padding: 8px; - padding-left: 16px; - padding-right: 16px; - border-top: 0.5px solid ${lightGray}; - - &:hover { - background-color: ${vscInputBackground}; - } -`; - const StyledListbox = styled(Listbox)` background-color: ${vscBackground}; padding: 0; @@ -124,7 +94,7 @@ const StyledListboxOptions = styled(Listbox.Options)` max-height: 80vh; border-radius: ${defaultBorderRadius}; - overflow: scroll; + overflow-y: scroll; `; const StyledListboxOption = styled(Listbox.Option)<{ selected: boolean }>` diff --git a/gui/src/hooks/useSetup.ts b/gui/src/hooks/useSetup.ts index ffe408d7e..0cdd4ec50 100644 --- a/gui/src/hooks/useSetup.ts +++ b/gui/src/hooks/useSetup.ts @@ -51,6 +51,12 @@ function useSetup(dispatch: Dispatch) { dispatch(setInactive()); }); + useWebviewListener("setColors", async (colors) => { + Object.keys(colors).forEach((key) => { + document.body.style.setProperty(key, colors[key]); + }); + }); + useWebviewListener("configUpdate", async () => { loadConfig(); }); diff --git a/pkg/src/index.ts b/pkg/src/index.ts index 4b5b81288..8635b90c7 100644 --- a/pkg/src/index.ts +++ b/pkg/src/index.ts @@ -12,6 +12,14 @@ program.action(() => { // const ide = new IpcIde(messenger); const ide = new FileSystemIde(); const core = new Core(messenger, ide); + + // setTimeout(() => { + // messenger.mock({ + // messageId: "2fe7823c-10bd-4771-abb5-781f520039ec", + // messageType: "loadSubmenuItems", + // data: { title: "issue" }, + // }); + // }, 1000); } catch (e) { fs.writeFileSync("./error.log", `${new Date().toISOString()} ${e}\n`); console.log("Error: ", e); diff --git a/pkg/src/messenger.ts b/pkg/src/messenger.ts index 56700de1d..9a87b40c0 100644 --- a/pkg/src/messenger.ts +++ b/pkg/src/messenger.ts @@ -35,6 +35,11 @@ export class IpcMessenger { }); } + mock(data: any) { + const d = JSON.stringify(data); + this._handleData(Buffer.from(d)); + } + private _handleData(data: Buffer) { console.log("Receieved data: ", data); try { From 251c3281f8ae81bd0084edd2eba6e12a59d42b96 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Sat, 17 Feb 2024 16:10:07 -0800 Subject: [PATCH 025/141] =?UTF-8?q?=F0=9F=9A=A7=20clean=20up=20webview=20p?= =?UTF-8?q?rotocol?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- {pkg/src => core}/protocol.ts | 39 +++--- core/web/webviewProtocol.ts | 116 +++++------------- extensions/vscode/src/webviewProtocol.ts | 48 ++++---- gui/src/components/dialogs/AddDocsDialog.tsx | 2 +- gui/src/components/dialogs/FTCDialog.tsx | 4 +- gui/src/components/gui/StepContainer.tsx | 7 +- gui/src/components/mainInput/TipTapEditor.tsx | 9 +- gui/src/components/mainInput/resolveInput.ts | 2 +- .../components/modelSelection/ModelSelect.tsx | 4 +- gui/src/hooks/useChatHandler.ts | 8 +- gui/src/hooks/useHistory.tsx | 12 +- gui/src/hooks/useSetup.ts | 2 +- gui/src/hooks/useSubmenuContextProviders.tsx | 2 +- gui/src/pages/modelconfig.tsx | 2 +- gui/src/pages/models.tsx | 2 +- gui/src/util/ide.ts | 23 +--- pkg/src/core.ts | 7 +- 17 files changed, 116 insertions(+), 173 deletions(-) rename {pkg/src => core}/protocol.ts (70%) diff --git a/pkg/src/protocol.ts b/core/protocol.ts similarity index 70% rename from pkg/src/protocol.ts rename to core/protocol.ts index 2a666c81c..1c27ed6bb 100644 --- a/pkg/src/protocol.ts +++ b/core/protocol.ts @@ -1,14 +1,20 @@ -import { BrowserSerializedContinueConfig } from "core/config/load"; import { ChatMessage, - CompletionOptions, - ContextItem, + ContextItemWithId, ContextSubmenuItem, + LLMFullCompletionOptions, + MessageContent, PersistedSessionInfo, RangeInFile, SerializedContinueConfig, SessionInfo, -} from "../../core"; +} from "."; +import { BrowserSerializedContinueConfig } from "./config/load"; + +export type ProtocolGeneratorType = AsyncGenerator<{ + done?: boolean; + content: T; +}>; export type Protocol = { // New @@ -28,6 +34,10 @@ export type Protocol = { { model: SerializedContinueConfig["models"][number] }, void, ]; + "config/getBrowserSerialized": [ + undefined, + Promise, + ]; "config/deleteModel": [{ title: string }, void]; "config/reload": [undefined, void]; "context/getContextItems": [ @@ -37,7 +47,7 @@ export type Protocol = { fullInput: string; selectedCode: RangeInFile[]; }, - Promise, + Promise, ]; "context/loadSubmenuItems": [ { title: string }, @@ -54,37 +64,34 @@ export type Protocol = { history: ChatMessage[]; modelTitle: string; slashCommandName: string; - contextItems: ContextItem[]; + contextItems: ContextItemWithId[]; params: any; historyIndex: number; }, - AsyncGenerator, + ProtocolGeneratorType, ]; "llm/complete": [ { prompt: string; - completionOptions: CompletionOptions; + completionOptions: LLMFullCompletionOptions; title: string; }, - AsyncGenerator, + string, ]; "llm/streamComplete": [ { prompt: string; - completionOptions: CompletionOptions; + completionOptions: LLMFullCompletionOptions; title: string; }, - AsyncGenerator, + ProtocolGeneratorType, ]; "llm/streamChat": [ { messages: ChatMessage[]; - completionOptions: CompletionOptions; + completionOptions: LLMFullCompletionOptions; title: string; }, - AsyncGenerator, + ProtocolGeneratorType, ]; - - // Pass-through from webview - getSerializedConfig: [undefined, Promise]; }; diff --git a/core/web/webviewProtocol.ts b/core/web/webviewProtocol.ts index 1bd07192e..bc61add77 100644 --- a/core/web/webviewProtocol.ts +++ b/core/web/webviewProtocol.ts @@ -1,33 +1,14 @@ import { - ChatMessage, ContextItemWithId, - ContextSubmenuItem, ContinueRcJson, DiffLine, - LLMFullCompletionOptions, - MessageContent, - ModelDescription, - PersistedSessionInfo, Problem, Range, - RangeInFile, - SessionInfo, } from ".."; import { RangeInFileWithContents } from "../commands/util"; -import { BrowserSerializedContinueConfig } from "../config/load"; +import { Protocol } from "../protocol"; -export type WebviewProtocol = { - abort: [string, void]; - onLoad: [ - undefined, - { - windowId: string; - serverUrl: string; - workspacePaths: string[]; - vscMachineId: string; - vscMediaUrl: string; - }, - ]; +export type IdeProtocol = { listWorkspaceContents: [undefined, string[]]; getWorkspaceDirs: [undefined, string[]]; listFolders: [undefined, string[]]; @@ -38,10 +19,6 @@ export type WebviewProtocol = { runCommand: [{ command: string }, void]; getSearchResults: [{ query: string }, string]; subprocess: [{ command: string }, [string, string]]; - history: [undefined, SessionInfo[]]; - saveSession: [PersistedSessionInfo, void]; - deleteSession: [string, void]; - loadSession: [string, PersistedSessionInfo]; saveFile: [{ filepath: string }, void]; readFile: [{ filepath: string }, string]; showDiff: [ @@ -62,76 +39,39 @@ export type WebviewProtocol = { getOpenFiles: [undefined, string[]]; getPinnedFiles: [undefined, string[]]; showLines: [{ filepath: string; startLine: number; endLine: number }, void]; - errorPopup: [{ message: string }, void]; - logDevData: [{ tableName: string; data: any }, void]; - addModel: [ModelDescription, void]; - deleteModel: [{ title: string }, void]; - addOpenAIKey: [{ key: string }, void]; - llmStreamComplete: [ - { - title: string; - prompt: string; - completionOptions: LLMFullCompletionOptions; - }, - AsyncGenerator<{ content: string; done?: boolean }>, - ]; - llmStreamChat: [ - { - title: string; - messages: ChatMessage[]; - completionOptions: LLMFullCompletionOptions; - }, - AsyncGenerator<{ content: MessageContent; done?: boolean }>, - ]; - llmComplete: [ - { - title: string; - prompt: string; - completionOptions: LLMFullCompletionOptions; - }, - { content: string }, - ]; - runNodeJsSlashCommand: [ - { - input: string; - history: ChatMessage[]; - modelTitle: string; - slashCommandName: string; - contextItems: ContextItemWithId[]; - params: { [key: string]: any } | undefined; - historyIndex: number; - }, - AsyncGenerator<{ content: string; done?: boolean }>, - ]; - loadSubmenuItems: [{ title: string }, ContextSubmenuItem[]]; - getContextItems: [ - { - name: string; - query: string; - fullInput: string; - selectedCode: RangeInFile[]; - }, - ContextItemWithId[], - ]; - addDocs: [{ url: string; title: string }, void]; - applyToCurrentFile: [{ text: string }, void]; - showTutorial: [undefined, void]; - showFile: [{ filepath: string }, void]; - openConfigJson: [undefined, void]; readRangeInFile: [{ filepath: string; range: Range }, string]; - toggleDevTools: [undefined, void]; - reloadWindow: [undefined, void]; - focusEditor: [undefined, void]; - toggleFullScreen: [undefined, void]; getDiff: [undefined, string]; - getSerializedConfig: [undefined, BrowserSerializedContinueConfig]; + getWorkspaceConfigs: [undefined, ContinueRcJson[]]; getTerminalContents: [undefined, string]; isTelemetryEnabled: [undefined, boolean]; getUniqueId: [undefined, string]; - getWorkspaceConfigs: [undefined, ContinueRcJson[]]; - getDefaultModelTitle: [{ defaultModelTitle: string }, void]; }; +export type WebviewProtocol = Protocol & + IdeProtocol & { + onLoad: [ + undefined, + { + windowId: string; + serverUrl: string; + workspacePaths: string[]; + vscMachineId: string; + vscMediaUrl: string; + }, + ]; + + errorPopup: [{ message: string }, void]; + applyToCurrentFile: [{ text: string }, void]; + showTutorial: [undefined, void]; + showFile: [{ filepath: string }, void]; + openConfigJson: [undefined, void]; + + toggleDevTools: [undefined, void]; + reloadWindow: [undefined, void]; + focusEditor: [undefined, void]; + toggleFullScreen: [undefined, void]; + }; + export type ReverseWebviewProtocol = { setInactive: [undefined, void]; configUpdate: [undefined, void]; diff --git a/extensions/vscode/src/webviewProtocol.ts b/extensions/vscode/src/webviewProtocol.ts index 88d2d8039..5aa2a8e78 100644 --- a/extensions/vscode/src/webviewProtocol.ts +++ b/extensions/vscode/src/webviewProtocol.ts @@ -155,7 +155,7 @@ export class VsCodeWebviewProtocol { this.on("getDiff", async (msg) => { return await ide.getDiff(); }); - this.on("getSerializedConfig", async (msg) => { + this.on("config/getBrowserSerialized", async (msg) => { return await configHandler.getSerializedConfig(); }); this.on("getTerminalContents", async (msg) => { @@ -192,17 +192,17 @@ export class VsCodeWebviewProtocol { return await ide.subprocess(msg.data.command); }); // History - this.on("history", (msg) => { + this.on("history/list", (msg) => { return historyManager.list(); }); - this.on("saveSession", (msg) => { + this.on("history/save", (msg) => { historyManager.save(msg.data); }); - this.on("deleteSession", (msg) => { - historyManager.delete(msg.data); + this.on("history/delete", (msg) => { + historyManager.delete(msg.data.id); }); - this.on("loadSession", (msg) => { - return historyManager.load(msg.data); + this.on("history/load", (msg) => { + return historyManager.load(msg.data.id); }); this.on("saveFile", async (msg) => { return await ide.saveFile(msg.data.filepath); @@ -245,11 +245,11 @@ export class VsCodeWebviewProtocol { } }); }); - this.on("logDevData", (msg) => { + this.on("devdata/log", (msg) => { logDevData(msg.data.tableName, msg.data.data); }); - this.on("addModel", (msg) => { - const model = msg.data; + this.on("config/addModel", (msg) => { + const model = msg.data.model; const newConfigString = addModel(model); this.configHandler.reloadConfig(); this.ide.openFile(getConfigJsonPath()); @@ -285,18 +285,18 @@ export class VsCodeWebviewProtocol { "🎉 Your model has been successfully added to config.json. You can use this file to further edit its configuration." ); }); - this.on("deleteModel", (msg) => { + this.on("config/deleteModel", (msg) => { deleteModel(msg.data.title); this.configHandler.reloadConfig(); }); - this.on("addOpenAIKey", async (msg) => { - addOpenAIKey(msg.data.key); + this.on("config/addOpenAiKey", async (msg) => { + addOpenAIKey(msg.data); this.configHandler.reloadConfig(); }); async function* llmStreamComplete( protocol: VsCodeWebviewProtocol, - msg: Message + msg: Message ) { const model = await protocol.configHandler.llmFromTitle(msg.data.title); const gen = model.streamComplete( @@ -316,11 +316,11 @@ export class VsCodeWebviewProtocol { return { done: true, content: next.value }; } - this.on("llmStreamComplete", (msg) => llmStreamComplete(this, msg)); + this.on("llm/streamComplete", (msg) => llmStreamComplete(this, msg)); async function* llmStreamChat( protocol: VsCodeWebviewProtocol, - msg: Message + msg: Message ) { const model = await protocol.configHandler.llmFromTitle(msg.data.title); const gen = model.streamChat( @@ -340,19 +340,19 @@ export class VsCodeWebviewProtocol { return { done: true, content: next.value }; } - this.on("llmStreamChat", (msg) => llmStreamChat(this, msg)); - this.on("llmComplete", async (msg) => { + this.on("llm/streamChat", (msg) => llmStreamChat(this, msg)); + this.on("llm/complete", async (msg) => { const model = await this.configHandler.llmFromTitle(msg.data.title); const completion = await model.complete( msg.data.prompt, msg.data.completionOptions ); - return { content: completion }; + return completion; }); async function* runNodeJsSlashCommand( protocol: VsCodeWebviewProtocol, - msg: Message + msg: Message ) { const { input, @@ -393,9 +393,9 @@ export class VsCodeWebviewProtocol { } yield { done: true, content: "" }; } - this.on("runNodeJsSlashCommand", (msg) => runNodeJsSlashCommand(this, msg)); + this.on("command/run", (msg) => runNodeJsSlashCommand(this, msg)); - this.on("loadSubmenuItems", async (msg) => { + this.on("context/loadSubmenuItems", async (msg) => { const { title } = msg.data; const config = await this.configHandler.loadConfig(); const provider = config.contextProviders?.find( @@ -421,7 +421,7 @@ export class VsCodeWebviewProtocol { } }); - this.on("getContextItems", async (msg) => { + this.on("context/getContextItems", async (msg) => { const { name, query, fullInput, selectedCode } = msg.data; const config = await this.configHandler.loadConfig(); const llm = await this.configHandler.llmFromTitle(); @@ -457,7 +457,7 @@ export class VsCodeWebviewProtocol { return []; } }); - this.on("addDocs", (msg) => { + this.on("context/addDocs", (msg) => { const { url, title } = msg.data; const embeddingsProvider = new TransformersJsEmbeddingsProvider(); vscode.window.withProgress( diff --git a/gui/src/components/dialogs/AddDocsDialog.tsx b/gui/src/components/dialogs/AddDocsDialog.tsx index 76cf0953f..5c70b19a6 100644 --- a/gui/src/components/dialogs/AddDocsDialog.tsx +++ b/gui/src/components/dialogs/AddDocsDialog.tsx @@ -58,7 +58,7 @@ function AddDocsDialog() { disabled={!docsUrl || !urlValid} className="ml-auto" onClick={() => { - postToIde("addDocs", { url: docsUrl, title: docsTitle }); + postToIde("context/addDocs", { url: docsUrl, title: docsTitle }); setDocsTitle(""); setDocsUrl(""); dispatch(setShowDialog(false)); diff --git a/gui/src/components/dialogs/FTCDialog.tsx b/gui/src/components/dialogs/FTCDialog.tsx index e679dadca..8533905ea 100644 --- a/gui/src/components/dialogs/FTCDialog.tsx +++ b/gui/src/components/dialogs/FTCDialog.tsx @@ -5,7 +5,7 @@ import styled from "styled-components"; import { Button, Input } from ".."; import { setDefaultModel } from "../../redux/slices/stateSlice"; import { setShowDialog } from "../../redux/slices/uiStateSlice"; -import { addOpenAIKey } from "../../util/ide"; +import { postToIde } from "../../util/ide"; const GridDiv = styled.div` display: grid; @@ -55,7 +55,7 @@ function FTCDialog() {
    Date: Sun, 18 Feb 2024 20:43:57 -0800 Subject: [PATCH 041/141] =?UTF-8?q?=F0=9F=9A=A7=20download=20sqlite3=20bin?= =?UTF-8?q?ary=20for=20all=20targets?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/build.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/pkg/build.js b/pkg/build.js index 4eef70a5e..00844238c 100644 --- a/pkg/build.js +++ b/pkg/build.js @@ -99,6 +99,22 @@ for (let i = 2; i < process.argv.length; i++) { execSync( `npx pkg --no-bytecode --public-packages "*" --public pkgJson/${target} --out-path bin/${target}` ); + + // Download and unzip prebuilt sqlite3 binary for the target + const downloadUrl = `https://github.com/TryGhost/node-sqlite3/releases/download/v5.1.7/sqlite3-v5.1.7-napi-v6-${ + target === "win32-arm64" ? "win32-ia32" : target + }.tar.gz`; + execSync(`curl -L -o bin/${target}/build.tar.gz ${downloadUrl}`); + execSync(`cd bin/${target} && tar -xvzf build.tar.gz`); + fs.copyFileSync( + `bin/${target}/build/Release/node_sqlite3.node`, + `bin/${target}/node_sqlite3.node` + ); + fs.unlinkSync(`bin/${target}/build.tar.gz`); + fs.rmSync(`bin/${target}/build`, { + recursive: true, + force: true, + }); } // execSync( // `npx pkg out/index.js --target node18-darwin-arm64 --no-bytecode --public-packages "*" --public -o bin/pkg` From ae0f5547e544acd8fc94f7bcce8cbe549d2e9095 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Sun, 18 Feb 2024 22:41:20 -0800 Subject: [PATCH 042/141] =?UTF-8?q?=F0=9F=9A=A7=20download=20lancedb=20bin?= =?UTF-8?q?aries=20for=20each=20target?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/build.js | 16 ++++++++++++++++ pkg/pkgJson/darwin-x64/package.json | 2 +- pkg/pkgJson/linux-arm64/package.json | 2 +- pkg/pkgJson/linux-x64/package.json | 2 +- pkg/pkgJson/win32-arm64/package.json | 2 +- pkg/pkgJson/win32-x64/package.json | 2 +- 6 files changed, 21 insertions(+), 5 deletions(-) diff --git a/pkg/build.js b/pkg/build.js index 00844238c..ab0db2c14 100644 --- a/pkg/build.js +++ b/pkg/build.js @@ -20,6 +20,14 @@ for (let i = 2; i < process.argv.length; i++) { } } +const targetToLanceDb = { + "darwin-arm64": "@lancedb/vectordb-darwin-arm64", + "darwin-x64": "@lancedb/vectordb-darwin-x64", + "linux-arm64": "@lancedb/vectordb-linux-arm64-gnu", + "linux-x64": "@lancedb/vectordb-linux-x64-gnu", + "win32-x64": "@lancedb/vectordb-win32-x64-msvc", +}; + (async () => { // console.log("[info] Building with ncc..."); // execSync(`npx ncc build src/index.ts -o out`); @@ -68,6 +76,14 @@ for (let i = 2; i < process.argv.length; i++) { ); console.log(`[info] Copied ${DYNAMIC_IMPORTS.join(", ")}`); + console.log("[info] Downloading prebuilt lancedb..."); + for (const target of targets) { + if (targetToLanceDb[target]) { + console.log(`[info] Downloading ${target}...`); + execSync(`npm install -f ${targetToLanceDb[target]} --no-save`); + } + } + console.log("[info] Building with esbuild..."); // Bundles the extension into one file await esbuild.build({ diff --git a/pkg/pkgJson/darwin-x64/package.json b/pkg/pkgJson/darwin-x64/package.json index aa98b9b17..d064d6c2a 100644 --- a/pkg/pkgJson/darwin-x64/package.json +++ b/pkg/pkgJson/darwin-x64/package.json @@ -9,7 +9,7 @@ ], "assets": [ "../../../core/node_modules/sqlite3/**/*", - "../../node_modules/@lancedb/**/*", + "../../node_modules/@lancedb/vectordb-darwin-x64/index.node", "../../out/tree-sitter.wasm", "../../out/tree-sitter-wasms/*" ], diff --git a/pkg/pkgJson/linux-arm64/package.json b/pkg/pkgJson/linux-arm64/package.json index f1d4c5f67..37a3a5b6d 100644 --- a/pkg/pkgJson/linux-arm64/package.json +++ b/pkg/pkgJson/linux-arm64/package.json @@ -9,7 +9,7 @@ ], "assets": [ "../../../core/node_modules/sqlite3/**/*", - "../../node_modules/@lancedb/**/*", + "../../node_modules/@lancedb/vectordb-linux-arm64-gnu/index.node", "../../out/tree-sitter.wasm", "../../out/tree-sitter-wasms/*" ], diff --git a/pkg/pkgJson/linux-x64/package.json b/pkg/pkgJson/linux-x64/package.json index 62f99ebd0..487886d26 100644 --- a/pkg/pkgJson/linux-x64/package.json +++ b/pkg/pkgJson/linux-x64/package.json @@ -9,7 +9,7 @@ ], "assets": [ "../../../core/node_modules/sqlite3/**/*", - "../../node_modules/@lancedb/**/*", + "../../node_modules/@lancedb/vectordb-linux-x64-gnu/index.node", "../../out/tree-sitter.wasm", "../../out/tree-sitter-wasms/*" ], diff --git a/pkg/pkgJson/win32-arm64/package.json b/pkg/pkgJson/win32-arm64/package.json index c7b16e035..4573ccbca 100644 --- a/pkg/pkgJson/win32-arm64/package.json +++ b/pkg/pkgJson/win32-arm64/package.json @@ -9,7 +9,7 @@ ], "assets": [ "../../../core/node_modules/sqlite3/**/*", - "../../node_modules/@lancedb/**/*", + "../../node_modules/@lancedb/vectordb-win32-x64-msvc/index.node", "../../out/tree-sitter.wasm", "../../out/tree-sitter-wasms/*" ], diff --git a/pkg/pkgJson/win32-x64/package.json b/pkg/pkgJson/win32-x64/package.json index 32ac6e583..c9a4b1a9b 100644 --- a/pkg/pkgJson/win32-x64/package.json +++ b/pkg/pkgJson/win32-x64/package.json @@ -9,7 +9,7 @@ ], "assets": [ "../../../core/node_modules/sqlite3/**/*", - "../../node_modules/@lancedb/**/*", + "../../node_modules/@lancedb/vectordb-win32-x64-msvc/index.node", "../../out/tree-sitter.wasm", "../../out/tree-sitter-wasms/*" ], From f5f491dfb6ed8fbf718a90815e54934675927c0a Mon Sep 17 00:00:00 2001 From: Jason Jacobs Date: Thu, 15 Feb 2024 22:36:32 -0800 Subject: [PATCH 043/141] Add Database Context Provider to have Insite into databases and their tables --- .../providers/DatabaseContextProvider.ts | 112 ++++ core/context/providers/index.ts | 2 + core/index.d.ts | 3 +- docs/docs/customization/context-providers.md | 32 + docs/static/schemas/config.json | 68 ++ extensions/vscode/config_schema.json | 68 ++ extensions/vscode/continue_rc_schema.json | 82 +++ extensions/vscode/package-lock.json | 583 +++++++++++++++++- extensions/vscode/package.json | 3 +- extensions/vscode/yarn.lock | 370 ++++++++++- 10 files changed, 1278 insertions(+), 45 deletions(-) create mode 100644 core/context/providers/DatabaseContextProvider.ts diff --git a/core/context/providers/DatabaseContextProvider.ts b/core/context/providers/DatabaseContextProvider.ts new file mode 100644 index 000000000..5a5df7053 --- /dev/null +++ b/core/context/providers/DatabaseContextProvider.ts @@ -0,0 +1,112 @@ +import { BaseContextProvider } from ".."; +import { + ContextItem, + ContextProviderDescription, + ContextProviderExtras, + LoadSubmenuItemsArgs, + ContextSubmenuItem, +} from "../.."; + +class DatabaseContextProvider extends BaseContextProvider { + static description: ContextProviderDescription = { + title: "database", + displayTitle: "Database", + description: "Table schemas", + type: "submenu", + }; + + async getContextItems( + query: string, + extras: ContextProviderExtras + ): Promise { + const contextItems: ContextItem[] = []; + + const connections = this.options?.connections; + + if (connections === null) { return contextItems; } + + let [connectionName, table] = query.split('.'); + + const getDatabaseAdapter = await require("dbinfoz"); + + for (const connection of connections) { + if(connection.name == connectionName) { + const adapter = getDatabaseAdapter(connection.connection_type, connection.connection); + const tablesAndSchemas = await adapter.getAllTablesAndSchemas(connection.connection.database); + + if(table === 'all') { + let prompt = `Schema for all tables on ${connection.connection_type} is `; + prompt += JSON.stringify(tablesAndSchemas); + + let contextItem = { + name: `${connectionName}-all-tables-schemas`, + description: `Schema for all tables.`, + content: prompt + } + + contextItems.push(contextItem); + } else { + const tables = Object.keys(tablesAndSchemas); + + tables.forEach(tableName => { + if(table === tableName) { + let prompt = `Schema for ${tableName} on ${connection.connection_type} is `; + prompt += JSON.stringify(tablesAndSchemas[tableName]); + + let contextItem = { + name: `${connectionName}-${tableName}-schema`, + description: `${tableName} Schema`, + content: prompt + } + + contextItems.push(contextItem); + } + }); + + } + } + } + + return contextItems; + } + + async loadSubmenuItems( + args: LoadSubmenuItemsArgs + ): Promise { + const contextItems: ContextSubmenuItem[] = []; + const connections = this.options?.connections; + + if (connections === null) { return contextItems; } + + const getDatabaseAdapter = await require("dbinfoz"); + + for (const connection of connections) { + let adapter = getDatabaseAdapter(connection.connection_type, connection.connection); + const tablesAndSchemas = await adapter.getAllTablesAndSchemas(connection.connection.database); + const tables = Object.keys(tablesAndSchemas); + + let contextItem = { + id: `${connection.name}.all`, + title: `${connection.name} all table schemas`, + description: `` + } + + contextItems.push(contextItem); + + tables.forEach(tableName => { + let contextItem = { + id: `${connection.name}.${tableName}`, + title: `${connection.name}.${tableName} schema`, + description: `` + } + + contextItems.push(contextItem); + }); + } + + return contextItems; + } +} + +export default DatabaseContextProvider; + diff --git a/core/context/providers/index.ts b/core/context/providers/index.ts index e335a8363..d31dc8158 100644 --- a/core/context/providers/index.ts +++ b/core/context/providers/index.ts @@ -3,6 +3,7 @@ import { ContextProviderName } from "../.."; import CodebaseContextProvider from "./CodebaseContextProvider"; import CodeHighlightsContextProvider from "./CodeHighlightsContextProvider"; import CodeOutlineContextProvider from "./CodeOutlineContextProvider"; +import DatabaseContextProvider from "./DatabaseContextProvider"; import DiffContextProvider from "./DiffContextProvider"; import DocsContextProvider from "./DocsContextProvider"; import FileTreeContextProvider from "./FileTreeContextProvider"; @@ -17,6 +18,7 @@ import TerminalContextProvider from "./TerminalContextProvider"; import URLContextProvider from "./URLContextProvider"; const Providers: (typeof BaseContextProvider)[] = [ + DatabaseContextProvider, DiffContextProvider, FileTreeContextProvider, GitHubIssuesContextProvider, diff --git a/core/index.d.ts b/core/index.d.ts index ad01aedfe..1e1d29ec3 100644 --- a/core/index.d.ts +++ b/core/index.d.ts @@ -416,7 +416,8 @@ type ContextProviderName = | "http" | "codebase" | "problems" - | "folder"; + | "folder" + | "database"; type TemplateType = | "llama2" diff --git a/docs/docs/customization/context-providers.md b/docs/docs/customization/context-providers.md index d976eac8e..2d2296699 100644 --- a/docs/docs/customization/context-providers.md +++ b/docs/docs/customization/context-providers.md @@ -128,6 +128,38 @@ Type '@highlights' to reference the 'highlights' from all currently open files. { "name": "highlights" } ``` +### Database Tables + +Type `@database` to reference table schemas you can use the drop-down or start typeing table names based off of your configuration. Configuration supports multiple databases, allowing you to specify various connection details for PostgreSQL, MySQL, SQLite. Each connection should include a unique name, the connection_type (e.g., postgres, sqlite), and the necessary connection parameters specific to each database type. + +```json +{ + "name": "database", + "params": { + "connections": [ + { + "name": "examplePostgres", + "connection_type": "postgres", + "connection": { + "user": "username", + "host": "localhost", + "database": "exampleDB", + "password": "yourPassword", + "port": 5432 + } + }, + { + "name": "exampleSqlite", + "connection_type": "sqlite", + "connection": { + "filename": "/path/to/your/sqlite/database.db" + } + } + ] + } +} +``` + ### Requesting Context Providers Not seeing what you want? Create an issue [here](https://github.com/continuedev/continue/issues/new?assignees=TyDunn&labels=enhancement&projects=&template=feature-request-%F0%9F%92%AA.md&title=) to request a new ContextProvider. diff --git a/docs/static/schemas/config.json b/docs/static/schemas/config.json index d4ab00298..9e74d43c4 100644 --- a/docs/static/schemas/config.json +++ b/docs/static/schemas/config.json @@ -1121,6 +1121,74 @@ "required": ["params"] } }, + { + "if": { + "properties": { + "name": { + "enum": ["database"] + } + } + }, + "then": { + "properties": { + "params": { + "properties": { + "connections": { + "type": "array", + "description": "A list of database connections", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "A unique name for this database connection" + }, + "connection_type": { + "type": "string", + "description": "The type of database (e.g., 'postgres', 'mysql')", + "enum": ["postgres", "mysql", "sqlite"] + }, + "connection": { + "type": "object", + "properties": { + "user": { + "type": "string", + "description": "The database user name" + }, + "host": { + "type": "string", + "description": "The host address of the database server" + }, + "database": { + "type": "string", + "description": "The name of the database to connect to" + }, + "password": { + "type": "string", + "description": "The password for the database user" + }, + "port": { + "type": "integer", + "description": "The port number to connect to at the host" + }, + "filename": { + "type": "string", + "description": "File location for simple file DB's" + } + }, + "required": [] + } + }, + "required": ["name", "type", "connection"] + } + } + }, + "required": ["connections"] + } + }, + "required": ["params"] + } + }, { "if": { "properties": { diff --git a/extensions/vscode/config_schema.json b/extensions/vscode/config_schema.json index d4ab00298..9e74d43c4 100644 --- a/extensions/vscode/config_schema.json +++ b/extensions/vscode/config_schema.json @@ -1121,6 +1121,74 @@ "required": ["params"] } }, + { + "if": { + "properties": { + "name": { + "enum": ["database"] + } + } + }, + "then": { + "properties": { + "params": { + "properties": { + "connections": { + "type": "array", + "description": "A list of database connections", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "A unique name for this database connection" + }, + "connection_type": { + "type": "string", + "description": "The type of database (e.g., 'postgres', 'mysql')", + "enum": ["postgres", "mysql", "sqlite"] + }, + "connection": { + "type": "object", + "properties": { + "user": { + "type": "string", + "description": "The database user name" + }, + "host": { + "type": "string", + "description": "The host address of the database server" + }, + "database": { + "type": "string", + "description": "The name of the database to connect to" + }, + "password": { + "type": "string", + "description": "The password for the database user" + }, + "port": { + "type": "integer", + "description": "The port number to connect to at the host" + }, + "filename": { + "type": "string", + "description": "File location for simple file DB's" + } + }, + "required": [] + } + }, + "required": ["name", "type", "connection"] + } + } + }, + "required": ["connections"] + } + }, + "required": ["params"] + } + }, { "if": { "properties": { diff --git a/extensions/vscode/continue_rc_schema.json b/extensions/vscode/continue_rc_schema.json index 7c2643f0d..209fed550 100644 --- a/extensions/vscode/continue_rc_schema.json +++ b/extensions/vscode/continue_rc_schema.json @@ -1287,6 +1287,88 @@ ] } }, + { + "if": { + "properties": { + "name": { + "enum": [ + "database" + ] + } + } + }, + "then": { + "properties": { + "params": { + "properties": { + "connections": { + "type": "array", + "description": "A list of database connections", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "A unique name for this database connection" + }, + "connection_type": { + "type": "string", + "description": "The type of database (e.g., 'postgres', 'mysql')", + "enum": [ + "postgres", + "mysql", + "sqlite" + ] + }, + "connection": { + "type": "object", + "properties": { + "user": { + "type": "string", + "description": "The database user name" + }, + "host": { + "type": "string", + "description": "The host address of the database server" + }, + "database": { + "type": "string", + "description": "The name of the database to connect to" + }, + "password": { + "type": "string", + "description": "The password for the database user" + }, + "port": { + "type": "integer", + "description": "The port number to connect to at the host" + }, + "filename": { + "type": "string", + "description": "File location for simple file DB's" + } + }, + "required": [] + } + }, + "required": [ + "name", + "type", + "connection" + ] + } + } + }, + "required": [ + "connections" + ] + } + }, + "required": [ + "params" + ] + } + }, { "if": { "properties": { diff --git a/extensions/vscode/package-lock.json b/extensions/vscode/package-lock.json index a73dafa9b..8d2fcc76d 100644 --- a/extensions/vscode/package-lock.json +++ b/extensions/vscode/package-lock.json @@ -1,12 +1,12 @@ { "name": "continue", - "version": "0.9.66", + "version": "0.9.67", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "continue", - "version": "0.9.66", + "version": "0.9.67", "license": "Apache-2.0", "dependencies": { "@electron/rebuild": "^3.2.10", @@ -18,6 +18,7 @@ "axios": "^1.2.5", "core": "file:../../core", "cors": "^2.8.5", + "dbinfoz": "^0.1.4", "downshift": "^7.6.0", "express": "^4.18.2", "fkill": "^8.1.0", @@ -3689,6 +3690,14 @@ "node": ">=8" } }, + "node_modules/bindings": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", + "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", + "dependencies": { + "file-uri-to-path": "1.0.0" + } + }, "node_modules/bl": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", @@ -3854,6 +3863,14 @@ "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==" }, + "node_modules/buffer-writer": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/buffer-writer/-/buffer-writer-2.0.0.tgz", + "integrity": "sha512-a7ZpuTZU1TRtnwyCNW3I5dc0wWNC3VR9S++Ewyk2HHZdrO3CQJqSpd+95Us590V6AL7JqUAH2IwZ/398PmNFgw==", + "engines": { + "node": ">=4" + } + }, "node_modules/bytes": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", @@ -4794,6 +4811,16 @@ "url": "https://opencollective.com/date-fns" } }, + "node_modules/dbinfoz": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/dbinfoz/-/dbinfoz-0.1.4.tgz", + "integrity": "sha512-MB56+xS571ip7qoXqxdnOUtXebbWaqoZN+S++W51SQYJRSjQFGEIPucNmxgeQlBGJ1vM4mQNV47wzV6fcrezZg==", + "dependencies": { + "mysql2": "^3.9.1", + "pg": "^8.11.3", + "sqlite3": "^5.1.7" + } + }, "node_modules/debug": { "version": "4.3.4", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", @@ -4875,7 +4902,6 @@ "version": "0.6.0", "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", - "dev": true, "engines": { "node": ">=4.0.0" } @@ -4943,6 +4969,14 @@ "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", "integrity": "sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==" }, + "node_modules/denque": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/denque/-/denque-2.1.0.tgz", + "integrity": "sha512-HVQE3AAb/pxF8fQAoiqpvg9i3evqug3hoiwakOyZAwJm+6vZehbkYXZ0l4JxS+I3QxM97v5aaRNhj8v5oBhekw==", + "engines": { + "node": ">=0.10" + } + }, "node_modules/depd": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", @@ -5657,7 +5691,6 @@ "version": "2.0.3", "resolved": "https://registry.npmjs.org/expand-template/-/expand-template-2.0.3.tgz", "integrity": "sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==", - "dev": true, "engines": { "node": ">=6" } @@ -5920,6 +5953,11 @@ "node": "^10.12.0 || >=12.0.0" } }, + "node_modules/file-uri-to-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", + "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==" + }, "node_modules/fill-range": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", @@ -6179,8 +6217,7 @@ "node_modules/fs-constants": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", - "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==", - "dev": true + "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==" }, "node_modules/fs-extra": { "version": "10.1.0", @@ -6269,6 +6306,14 @@ "node": ">=8" } }, + "node_modules/generate-function": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/generate-function/-/generate-function-2.3.1.tgz", + "integrity": "sha512-eeB5GfMNeevm/GRYq20ShmsaGcmI81kIX2K9XQx5miC8KdHaC6Jm0qQ8ZNeGOi7wYB8OsdxKs+Y2oVuTFuVwKQ==", + "dependencies": { + "is-property": "^1.0.2" + } + }, "node_modules/gensync": { "version": "1.0.0-beta.2", "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", @@ -6345,8 +6390,7 @@ "node_modules/github-from-package": { "version": "0.0.0", "resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz", - "integrity": "sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw==", - "dev": true + "integrity": "sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw==" }, "node_modules/glob": { "version": "8.1.0", @@ -6909,8 +6953,7 @@ "node_modules/ini": { "version": "1.3.8", "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", - "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", - "dev": true + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==" }, "node_modules/inline-style-parser": { "version": "0.1.1", @@ -7133,6 +7176,11 @@ "integrity": "sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ==", "dev": true }, + "node_modules/is-property": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz", + "integrity": "sha512-Ks/IoX00TtClbGQr4TWXemAnktAQvYB7HzcCxDGqEZU6oCmb2INHuOoKxbtR+HFkmYWBKv/dOZtGRiAjDhj92g==" + }, "node_modules/is-stream": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", @@ -8165,6 +8213,11 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/long": { + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/long/-/long-5.2.3.tgz", + "integrity": "sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q==" + }, "node_modules/loose-envify": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", @@ -9048,8 +9101,7 @@ "node_modules/mkdirp-classic": { "version": "0.5.3", "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", - "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==", - "dev": true + "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==" }, "node_modules/mocha": { "version": "10.3.0", @@ -9254,6 +9306,43 @@ "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==", "dev": true }, + "node_modules/mysql2": { + "version": "3.9.1", + "resolved": "https://registry.npmjs.org/mysql2/-/mysql2-3.9.1.tgz", + "integrity": "sha512-3njoWAAhGBYy0tWBabqUQcLtczZUxrmmtc2vszQUekg3kTJyZ5/IeLC3Fo04u6y6Iy5Sba7pIIa2P/gs8D3ZeQ==", + "dependencies": { + "denque": "^2.1.0", + "generate-function": "^2.3.1", + "iconv-lite": "^0.6.3", + "long": "^5.2.1", + "lru-cache": "^8.0.0", + "named-placeholders": "^1.1.3", + "seq-queue": "^0.0.5", + "sqlstring": "^2.3.2" + }, + "engines": { + "node": ">= 8.0" + } + }, + "node_modules/mysql2/node_modules/iconv-lite": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/mysql2/node_modules/lru-cache": { + "version": "8.0.5", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-8.0.5.tgz", + "integrity": "sha512-MhWWlVnuab1RG5/zMRRcVGXZLCXrZTgfwMikgzCegsPnG62yDQo5JnqKkrK4jO5iKqDAZGItAqN5CtKBCBWRUA==", + "engines": { + "node": ">=16.14" + } + }, "node_modules/mz": { "version": "2.7.0", "resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz", @@ -9264,6 +9353,25 @@ "thenify-all": "^1.0.0" } }, + "node_modules/named-placeholders": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/named-placeholders/-/named-placeholders-1.1.3.tgz", + "integrity": "sha512-eLoBxg6wE/rZkJPhU/xRX1WTpkFEwDJEN96oxFrTsqBdbT5ec295Q+CoHrL9IT0DipqKhmGcaZmwOt8OON5x1w==", + "dependencies": { + "lru-cache": "^7.14.1" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/named-placeholders/node_modules/lru-cache": { + "version": "7.18.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz", + "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==", + "engines": { + "node": ">=12" + } + }, "node_modules/nanoid": { "version": "3.3.7", "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", @@ -9284,8 +9392,7 @@ "node_modules/napi-build-utils": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-1.0.2.tgz", - "integrity": "sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg==", - "dev": true + "integrity": "sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg==" }, "node_modules/natural-compare": { "version": "1.4.0", @@ -9775,6 +9882,11 @@ "node": ">=6" } }, + "node_modules/packet-reader": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/packet-reader/-/packet-reader-1.0.0.tgz", + "integrity": "sha512-HAKu/fG3HpHFO0AA8WE8q2g+gBJaZ9MG7fcKk+IJPLTGAD6Psw4443l+9DGRbOIh3/aXr7Phy0TjilYivJo5XQ==" + }, "node_modules/pad-left": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/pad-left/-/pad-left-2.1.0.tgz", @@ -9955,6 +10067,89 @@ "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", "integrity": "sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==" }, + "node_modules/pg": { + "version": "8.11.3", + "resolved": "https://registry.npmjs.org/pg/-/pg-8.11.3.tgz", + "integrity": "sha512-+9iuvG8QfaaUrrph+kpF24cXkH1YOOUeArRNYIxq1viYHZagBxrTno7cecY1Fa44tJeZvaoG+Djpkc3JwehN5g==", + "dependencies": { + "buffer-writer": "2.0.0", + "packet-reader": "1.0.0", + "pg-connection-string": "^2.6.2", + "pg-pool": "^3.6.1", + "pg-protocol": "^1.6.0", + "pg-types": "^2.1.0", + "pgpass": "1.x" + }, + "engines": { + "node": ">= 8.0.0" + }, + "optionalDependencies": { + "pg-cloudflare": "^1.1.1" + }, + "peerDependencies": { + "pg-native": ">=3.0.1" + }, + "peerDependenciesMeta": { + "pg-native": { + "optional": true + } + } + }, + "node_modules/pg-cloudflare": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/pg-cloudflare/-/pg-cloudflare-1.1.1.tgz", + "integrity": "sha512-xWPagP/4B6BgFO+EKz3JONXv3YDgvkbVrGw2mTo3D6tVDQRh1e7cqVGvyR3BE+eQgAvx1XhW/iEASj4/jCWl3Q==", + "optional": true + }, + "node_modules/pg-connection-string": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/pg-connection-string/-/pg-connection-string-2.6.2.tgz", + "integrity": "sha512-ch6OwaeaPYcova4kKZ15sbJ2hKb/VP48ZD2gE7i1J+L4MspCtBMAx8nMgz7bksc7IojCIIWuEhHibSMFH8m8oA==" + }, + "node_modules/pg-int8": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/pg-int8/-/pg-int8-1.0.1.tgz", + "integrity": "sha512-WCtabS6t3c8SkpDBUlb1kjOs7l66xsGdKpIPZsg4wR+B3+u9UAum2odSsF9tnvxg80h4ZxLWMy4pRjOsFIqQpw==", + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/pg-pool": { + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/pg-pool/-/pg-pool-3.6.1.tgz", + "integrity": "sha512-jizsIzhkIitxCGfPRzJn1ZdcosIt3pz9Sh3V01fm1vZnbnCMgmGl5wvGGdNN2EL9Rmb0EcFoCkixH4Pu+sP9Og==", + "peerDependencies": { + "pg": ">=8.0" + } + }, + "node_modules/pg-protocol": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/pg-protocol/-/pg-protocol-1.6.0.tgz", + "integrity": "sha512-M+PDm637OY5WM307051+bsDia5Xej6d9IR4GwJse1qA1DIhiKlksvrneZOYQq42OM+spubpcNYEo2FcKQrDk+Q==" + }, + "node_modules/pg-types": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/pg-types/-/pg-types-2.2.0.tgz", + "integrity": "sha512-qTAAlrEsl8s4OiEQY69wDvcMIdQN6wdz5ojQiOy6YRMuynxenON0O5oCpJI6lshc6scgAY8qvJ2On/p+CXY0GA==", + "dependencies": { + "pg-int8": "1.0.1", + "postgres-array": "~2.0.0", + "postgres-bytea": "~1.0.0", + "postgres-date": "~1.0.4", + "postgres-interval": "^1.1.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/pgpass": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/pgpass/-/pgpass-1.0.5.tgz", + "integrity": "sha512-FdW9r/jQZhSeohs1Z3sI1yxFQNFvMcnmfuj4WBMUTxOrAyLMaTcE1aAMBiTlbMNaXvBCQuVi0R7hd8udDSP7ug==", + "dependencies": { + "split2": "^4.1.0" + } + }, "node_modules/picocolors": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", @@ -10198,6 +10393,41 @@ "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz", "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==" }, + "node_modules/postgres-array": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/postgres-array/-/postgres-array-2.0.0.tgz", + "integrity": "sha512-VpZrUqU5A69eQyW2c5CA1jtLecCsN2U/bD6VilrFDWq5+5UIEVO7nazS3TEcHf1zuPYO/sqGvUvW62g86RXZuA==", + "engines": { + "node": ">=4" + } + }, + "node_modules/postgres-bytea": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/postgres-bytea/-/postgres-bytea-1.0.0.tgz", + "integrity": "sha512-xy3pmLuQqRBZBXDULy7KbaitYqLcmxigw14Q5sj8QBVLqEwXfeybIKVWiqAXTlcvdvb0+xkOtDbfQMOf4lST1w==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/postgres-date": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/postgres-date/-/postgres-date-1.0.7.tgz", + "integrity": "sha512-suDmjLVQg78nMK2UZ454hAG+OAW+HQPZ6n++TNDUX+L0+uUlLywnoxJKDou51Zm+zTCjrCl0Nq6J9C5hP9vK/Q==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/postgres-interval": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/postgres-interval/-/postgres-interval-1.2.0.tgz", + "integrity": "sha512-9ZhXKM/rw350N1ovuWHbGxnGh/SNJ4cnxHiM0rxE4VN41wsg8P8zWn9hv/buK00RP4WvlOyr/RBDiptyxVbkZQ==", + "dependencies": { + "xtend": "^4.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/posthog-node": { "version": "3.6.2", "resolved": "https://registry.npmjs.org/posthog-node/-/posthog-node-3.6.2.tgz", @@ -10214,7 +10444,6 @@ "version": "7.1.1", "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-7.1.1.tgz", "integrity": "sha512-jAXscXWMcCK8GgCoHOfIr0ODh5ai8mj63L2nWrjuAgXE6tDyYGnx4/8o/rCgU+B4JSyZBKbeZqzhtwtC3ovxjw==", - "dev": true, "dependencies": { "detect-libc": "^2.0.0", "expand-template": "^2.0.3", @@ -10512,7 +10741,6 @@ "version": "1.2.8", "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", - "dev": true, "dependencies": { "deep-extend": "^0.6.0", "ini": "~1.3.0", @@ -10527,7 +10755,6 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", "integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==", - "dev": true, "engines": { "node": ">=0.10.0" } @@ -11178,6 +11405,11 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" }, + "node_modules/seq-queue": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/seq-queue/-/seq-queue-0.0.5.tgz", + "integrity": "sha512-hr3Wtp/GZIc/6DAGPDcV4/9WoZhjrkXsi5B/07QgX8tsdc6ilr7BFM6PM6rbdAX1kFSDYeZGLipIZZKyQP0O5Q==" + }, "node_modules/serialize-javascript": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", @@ -11276,7 +11508,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz", "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==", - "dev": true, "funding": [ { "type": "github", @@ -11296,7 +11527,6 @@ "version": "4.0.1", "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-4.0.1.tgz", "integrity": "sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA==", - "dev": true, "funding": [ { "type": "github", @@ -11442,11 +11672,312 @@ "integrity": "sha512-n98l9E2RMSJ9ON1AKisHzz7V42VDiBQGY6PB1BwRglz99wpVsSuGzQ+jOi6lFXBGVTCrRpltvjm+/XA+tpeJrg==", "dev": true }, + "node_modules/split2": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/split2/-/split2-4.2.0.tgz", + "integrity": "sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg==", + "engines": { + "node": ">= 10.x" + } + }, "node_modules/sprintf-js": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.3.tgz", "integrity": "sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA==" }, + "node_modules/sqlite3": { + "version": "5.1.7", + "resolved": "https://registry.npmjs.org/sqlite3/-/sqlite3-5.1.7.tgz", + "integrity": "sha512-GGIyOiFaG+TUra3JIfkI/zGP8yZYLPQ0pl1bH+ODjiX57sPhrLU5sQJn1y9bDKZUFYkX1crlrPfSYt0BKKdkog==", + "hasInstallScript": true, + "dependencies": { + "bindings": "^1.5.0", + "node-addon-api": "^7.0.0", + "prebuild-install": "^7.1.1", + "tar": "^6.1.11" + }, + "optionalDependencies": { + "node-gyp": "8.x" + }, + "peerDependencies": { + "node-gyp": "8.x" + }, + "peerDependenciesMeta": { + "node-gyp": { + "optional": true + } + } + }, + "node_modules/sqlite3/node_modules/@npmcli/fs": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-1.1.1.tgz", + "integrity": "sha512-8KG5RD0GVP4ydEzRn/I4BNDuxDtqVbOdm8675T49OIG/NGhaK0pjPX7ZcDlvKYbA+ulvVK3ztfcF4uBdOxuJbQ==", + "optional": true, + "dependencies": { + "@gar/promisify": "^1.0.1", + "semver": "^7.3.5" + } + }, + "node_modules/sqlite3/node_modules/@npmcli/move-file": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@npmcli/move-file/-/move-file-1.1.2.tgz", + "integrity": "sha512-1SUf/Cg2GzGDyaf15aR9St9TWlb+XvbZXWpDx8YKs7MLzMH/BCeopv+y9vzrzgkfykCGuWOlSu3mZhj2+FQcrg==", + "deprecated": "This functionality has been moved to @npmcli/fs", + "optional": true, + "dependencies": { + "mkdirp": "^1.0.4", + "rimraf": "^3.0.2" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/sqlite3/node_modules/agent-base": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "optional": true, + "dependencies": { + "debug": "4" + }, + "engines": { + "node": ">= 6.0.0" + } + }, + "node_modules/sqlite3/node_modules/cacache": { + "version": "15.3.0", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-15.3.0.tgz", + "integrity": "sha512-VVdYzXEn+cnbXpFgWs5hTT7OScegHVmLhJIR8Ufqk3iFD6A6j5iSX1KuBTfNEv4tdJWE2PzA6IVFtcLC7fN9wQ==", + "optional": true, + "dependencies": { + "@npmcli/fs": "^1.0.0", + "@npmcli/move-file": "^1.0.1", + "chownr": "^2.0.0", + "fs-minipass": "^2.0.0", + "glob": "^7.1.4", + "infer-owner": "^1.0.4", + "lru-cache": "^6.0.0", + "minipass": "^3.1.1", + "minipass-collect": "^1.0.2", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.2", + "mkdirp": "^1.0.3", + "p-map": "^4.0.0", + "promise-inflight": "^1.0.1", + "rimraf": "^3.0.2", + "ssri": "^8.0.1", + "tar": "^6.0.2", + "unique-filename": "^1.1.1" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/sqlite3/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "optional": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/sqlite3/node_modules/http-proxy-agent": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz", + "integrity": "sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg==", + "optional": true, + "dependencies": { + "@tootallnate/once": "1", + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/sqlite3/node_modules/https-proxy-agent": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", + "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", + "optional": true, + "dependencies": { + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/sqlite3/node_modules/make-fetch-happen": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-9.1.0.tgz", + "integrity": "sha512-+zopwDy7DNknmwPQplem5lAZX/eCOzSvSNNcSKm5eVwTkOBzoktEfXsa9L23J/GIRhxRsaxzkPEhrJEpE2F4Gg==", + "optional": true, + "dependencies": { + "agentkeepalive": "^4.1.3", + "cacache": "^15.2.0", + "http-cache-semantics": "^4.1.0", + "http-proxy-agent": "^4.0.1", + "https-proxy-agent": "^5.0.0", + "is-lambda": "^1.0.1", + "lru-cache": "^6.0.0", + "minipass": "^3.1.3", + "minipass-collect": "^1.0.2", + "minipass-fetch": "^1.3.2", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "negotiator": "^0.6.2", + "promise-retry": "^2.0.1", + "socks-proxy-agent": "^6.0.0", + "ssri": "^8.0.0" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/sqlite3/node_modules/minipass-fetch": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-1.4.1.tgz", + "integrity": "sha512-CGH1eblLq26Y15+Azk7ey4xh0J/XfJfrCox5LDJiKqI2Q2iwOLOKrlmIaODiSQS8d18jalF6y2K2ePUm0CmShw==", + "optional": true, + "dependencies": { + "minipass": "^3.1.0", + "minipass-sized": "^1.0.3", + "minizlib": "^2.0.0" + }, + "engines": { + "node": ">=8" + }, + "optionalDependencies": { + "encoding": "^0.1.12" + } + }, + "node_modules/sqlite3/node_modules/node-addon-api": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-7.1.0.tgz", + "integrity": "sha512-mNcltoe1R8o7STTegSOHdnJNN7s5EUvhoS7ShnTHDyOSd+8H+UdWODq6qSv67PjC8Zc5JRT8+oLAMCr0SIXw7g==", + "engines": { + "node": "^16 || ^18 || >= 20" + } + }, + "node_modules/sqlite3/node_modules/node-gyp": { + "version": "8.4.1", + "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-8.4.1.tgz", + "integrity": "sha512-olTJRgUtAb/hOXG0E93wZDs5YiJlgbXxTwQAFHyNlRsXQnYzUaF2aGgujZbw+hR8aF4ZG/rST57bWMWD16jr9w==", + "optional": true, + "dependencies": { + "env-paths": "^2.2.0", + "glob": "^7.1.4", + "graceful-fs": "^4.2.6", + "make-fetch-happen": "^9.1.0", + "nopt": "^5.0.0", + "npmlog": "^6.0.0", + "rimraf": "^3.0.2", + "semver": "^7.3.5", + "tar": "^6.1.2", + "which": "^2.0.2" + }, + "bin": { + "node-gyp": "bin/node-gyp.js" + }, + "engines": { + "node": ">= 10.12.0" + } + }, + "node_modules/sqlite3/node_modules/nopt": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-5.0.0.tgz", + "integrity": "sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ==", + "optional": true, + "dependencies": { + "abbrev": "1" + }, + "bin": { + "nopt": "bin/nopt.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/sqlite3/node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "optional": true, + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/sqlite3/node_modules/socks-proxy-agent": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-6.2.1.tgz", + "integrity": "sha512-a6KW9G+6B3nWZ1yB8G7pJwL3ggLy1uTzKAgCb7ttblwqdz9fMGJUuTy3uFzEP48FAs9FLILlmzDlE2JJhVQaXQ==", + "optional": true, + "dependencies": { + "agent-base": "^6.0.2", + "debug": "^4.3.3", + "socks": "^2.6.2" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/sqlite3/node_modules/ssri": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-8.0.1.tgz", + "integrity": "sha512-97qShzy1AiyxvPNIkLWoGua7xoQzzPjQ0HAH4B0rWKo7SZ6USuPcrUiAFrws0UH8RrbWmgq3LMTObhPIHbbBeQ==", + "optional": true, + "dependencies": { + "minipass": "^3.1.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/sqlite3/node_modules/unique-filename": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-1.1.1.tgz", + "integrity": "sha512-Vmp0jIp2ln35UTXuryvjzkjGdRyf9b2lTXuSYUiPmzRcl3FDtYqAwOnTJkAngD9SWhnoJzDbTKwaOrZ+STtxNQ==", + "optional": true, + "dependencies": { + "unique-slug": "^2.0.0" + } + }, + "node_modules/sqlite3/node_modules/unique-slug": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-2.0.2.tgz", + "integrity": "sha512-zoWr9ObaxALD3DOPfjPSqxt4fnZiWblxHIgeWqW8x7UqDzEtHEQLzji2cuJYQFCU6KmoJikOYAZlrTHHebjx2w==", + "optional": true, + "dependencies": { + "imurmurhash": "^0.1.4" + } + }, + "node_modules/sqlstring": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/sqlstring/-/sqlstring-2.3.3.tgz", + "integrity": "sha512-qC9iz2FlN7DQl3+wjwn3802RTyjCx7sDvfQEXchwa6CWOx07/WVfh91gBmQ9fahw8snwGEWU3xGzOt4tFyHLxg==", + "engines": { + "node": ">= 0.6" + } + }, "node_modules/sshpk": { "version": "1.18.0", "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.18.0.tgz", @@ -11904,7 +12435,6 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz", "integrity": "sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==", - "dev": true, "dependencies": { "chownr": "^1.1.1", "mkdirp-classic": "^0.5.2", @@ -11915,14 +12445,12 @@ "node_modules/tar-fs/node_modules/chownr": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", - "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==", - "dev": true + "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==" }, "node_modules/tar-stream": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz", "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", - "dev": true, "dependencies": { "bl": "^4.0.3", "end-of-stream": "^1.4.1", @@ -11938,7 +12466,6 @@ "version": "3.6.2", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", - "dev": true, "dependencies": { "inherits": "^2.0.3", "string_decoder": "^1.1.1", @@ -13565,6 +14092,14 @@ "node": ">=0.4.0" } }, + "node_modules/xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", + "engines": { + "node": ">=0.4" + } + }, "node_modules/y18n": { "version": "5.0.8", "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", diff --git a/extensions/vscode/package.json b/extensions/vscode/package.json index 3729b4bd6..6d177ce2f 100644 --- a/extensions/vscode/package.json +++ b/extensions/vscode/package.json @@ -1,7 +1,7 @@ { "name": "continue", "icon": "media/icon.png", - "version": "0.9.66", + "version": "0.9.67", "repository": { "type": "git", "url": "https://github.com/continuedev/continue" @@ -461,6 +461,7 @@ "axios": "^1.2.5", "core": "file:../../core", "cors": "^2.8.5", + "dbinfoz": "^0.1.4", "downshift": "^7.6.0", "express": "^4.18.2", "fkill": "^8.1.0", diff --git a/extensions/vscode/yarn.lock b/extensions/vscode/yarn.lock index 4d470fefc..58bf9b27a 100644 --- a/extensions/vscode/yarn.lock +++ b/extensions/vscode/yarn.lock @@ -415,7 +415,7 @@ resolved "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.1.0.tgz" integrity sha512-+KpH+QxZU7O4675t3mnkQKcZZg56u+K/Ct2K+N2AZYNVK8kyeo/bI18tI8aPm3tvNNRyTWfj6s5tnGNlcbQRsA== -"@gar/promisify@^1.1.3": +"@gar/promisify@^1.0.1", "@gar/promisify@^1.1.3": version "1.1.3" resolved "https://registry.npmjs.org/@gar/promisify/-/promisify-1.1.3.tgz" integrity sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw== @@ -696,7 +696,12 @@ resolved "https://registry.npmjs.org/@jsdevtools/ono/-/ono-7.1.3.tgz" integrity sha512-4JQNk+3mVzK3xh2rqd6RB4J46qUR19azEHBneZyTZM+c456qOrbbM/5xcR8huNCCcbVt7+UmizG6GuUvPvKUYg== -"@lancedb/vectordb-darwin-arm64@*", "@lancedb/vectordb-darwin-arm64@0.4.9": +"@lancedb/vectordb-darwin-arm64@*": + version "0.4.10" + resolved "https://registry.npmjs.org/@lancedb/vectordb-darwin-arm64/-/vectordb-darwin-arm64-0.4.10.tgz" + integrity sha512-y/uHOGb0g15pvqv5tdTyZ6oN+0QVpBmZDzKFWW6pPbuSZjB2uPqcs+ti0RB+AUdmS21kavVQqaNsw/HLKEGrHA== + +"@lancedb/vectordb-darwin-arm64@0.4.9": version "0.4.9" resolved "https://registry.npmjs.org/@lancedb/vectordb-darwin-arm64/-/vectordb-darwin-arm64-0.4.9.tgz" integrity sha512-u56TXU0hvdLbknGwC7Ebza3/CUFeCTkoCy/sC6h0FtOGya+NV7jraAeXEwDzoZbfW08VYYxnp3TsCcpNU9lpTA== @@ -775,6 +780,14 @@ "@nodelib/fs.scandir" "2.1.5" fastq "^1.6.0" +"@npmcli/fs@^1.0.0": + version "1.1.1" + resolved "https://registry.npmjs.org/@npmcli/fs/-/fs-1.1.1.tgz" + integrity sha512-8KG5RD0GVP4ydEzRn/I4BNDuxDtqVbOdm8675T49OIG/NGhaK0pjPX7ZcDlvKYbA+ulvVK3ztfcF4uBdOxuJbQ== + dependencies: + "@gar/promisify" "^1.0.1" + semver "^7.3.5" + "@npmcli/fs@^2.1.0": version "2.1.2" resolved "https://registry.npmjs.org/@npmcli/fs/-/fs-2.1.2.tgz" @@ -783,6 +796,14 @@ "@gar/promisify" "^1.1.3" semver "^7.3.5" +"@npmcli/move-file@^1.0.1": + version "1.1.2" + resolved "https://registry.npmjs.org/@npmcli/move-file/-/move-file-1.1.2.tgz" + integrity sha512-1SUf/Cg2GzGDyaf15aR9St9TWlb+XvbZXWpDx8YKs7MLzMH/BCeopv+y9vzrzgkfykCGuWOlSu3mZhj2+FQcrg== + dependencies: + mkdirp "^1.0.4" + rimraf "^3.0.2" + "@npmcli/move-file@^2.0.0": version "2.0.1" resolved "https://registry.npmjs.org/@npmcli/move-file/-/move-file-2.0.1.tgz" @@ -1408,7 +1429,7 @@ optionalDependencies: keytar "^7.7.0" -abbrev@^1.0.0: +abbrev@^1.0.0, abbrev@1: version "1.1.1" resolved "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz" integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q== @@ -1431,7 +1452,7 @@ acorn-jsx@^5.3.2: resolved "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz" integrity sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg== -agent-base@^6.0.2: +agent-base@^6.0.2, agent-base@6: version "6.0.2" resolved "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz" integrity sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ== @@ -1445,14 +1466,7 @@ agent-base@^7.0.2, agent-base@^7.1.0: dependencies: debug "^4.3.4" -agent-base@6: - version "6.0.2" - resolved "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz" - integrity sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ== - dependencies: - debug "4" - -agentkeepalive@^4.2.1: +agentkeepalive@^4.1.3, agentkeepalive@^4.2.1: version "4.5.0" resolved "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.5.0.tgz" integrity sha512-5GG/5IbQQpC9FpkRGsSvZI5QYeSCzlJHdpBQntCsuTOxhKD8lqKhrleg2Yi7yvMIf82Ycmmqln9U8V9qwEiJew== @@ -1763,6 +1777,13 @@ binary-extensions@^2.0.0: resolved "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz" integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA== +bindings@^1.5.0: + version "1.5.0" + resolved "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz" + integrity sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ== + dependencies: + file-uri-to-path "1.0.0" + bl@^4.0.3, bl@^4.1.0: version "4.1.0" resolved "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz" @@ -1849,6 +1870,11 @@ buffer-from@^1.0.0: resolved "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz" integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== +buffer-writer@2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/buffer-writer/-/buffer-writer-2.0.0.tgz" + integrity sha512-a7ZpuTZU1TRtnwyCNW3I5dc0wWNC3VR9S++Ewyk2HHZdrO3CQJqSpd+95Us590V6AL7JqUAH2IwZ/398PmNFgw== + buffer@^5.5.0: version "5.7.1" resolved "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz" @@ -1862,6 +1888,30 @@ bytes@3.1.2: resolved "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz" integrity sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg== +cacache@^15.2.0: + version "15.3.0" + resolved "https://registry.npmjs.org/cacache/-/cacache-15.3.0.tgz" + integrity sha512-VVdYzXEn+cnbXpFgWs5hTT7OScegHVmLhJIR8Ufqk3iFD6A6j5iSX1KuBTfNEv4tdJWE2PzA6IVFtcLC7fN9wQ== + dependencies: + "@npmcli/fs" "^1.0.0" + "@npmcli/move-file" "^1.0.1" + chownr "^2.0.0" + fs-minipass "^2.0.0" + glob "^7.1.4" + infer-owner "^1.0.4" + lru-cache "^6.0.0" + minipass "^3.1.1" + minipass-collect "^1.0.2" + minipass-flush "^1.0.5" + minipass-pipeline "^1.2.2" + mkdirp "^1.0.3" + p-map "^4.0.0" + promise-inflight "^1.0.1" + rimraf "^3.0.2" + ssri "^8.0.1" + tar "^6.0.2" + unique-filename "^1.1.1" + cacache@^16.1.0: version "16.1.3" resolved "https://registry.npmjs.org/cacache/-/cacache-16.1.3.tgz" @@ -2417,6 +2467,15 @@ date-fns@^2.16.1: dependencies: "@babel/runtime" "^7.21.0" +dbinfoz@^0.1.4: + version "0.1.4" + resolved "https://registry.npmjs.org/dbinfoz/-/dbinfoz-0.1.4.tgz" + integrity sha512-MB56+xS571ip7qoXqxdnOUtXebbWaqoZN+S++W51SQYJRSjQFGEIPucNmxgeQlBGJ1vM4mQNV47wzV6fcrezZg== + dependencies: + mysql2 "^3.9.1" + pg "^8.11.3" + sqlite3 "^5.1.7" + debug@^4.0.0, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.3, debug@^4.3.4, debug@~4.3.1, debug@~4.3.2, debug@4, debug@4.3.4: version "4.3.4" resolved "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz" @@ -2502,6 +2561,11 @@ delegates@^1.0.0: resolved "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz" integrity sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ== +denque@^2.1.0: + version "2.1.0" + resolved "https://registry.npmjs.org/denque/-/denque-2.1.0.tgz" + integrity sha512-HVQE3AAb/pxF8fQAoiqpvg9i3evqug3hoiwakOyZAwJm+6vZehbkYXZ0l4JxS+I3QxM97v5aaRNhj8v5oBhekw== + depd@2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz" @@ -2657,7 +2721,7 @@ encodeurl@~1.0.2: resolved "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz" integrity sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w== -encoding@^0.1.0, encoding@^0.1.13: +encoding@^0.1.0, encoding@^0.1.12, encoding@^0.1.13: version "0.1.13" resolved "https://registry.npmjs.org/encoding/-/encoding-0.1.13.tgz" integrity sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A== @@ -3150,6 +3214,11 @@ file-entry-cache@^6.0.1: dependencies: flat-cache "^3.0.4" +file-uri-to-path@1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz" + integrity sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw== + fill-range@^7.0.1: version "7.0.1" resolved "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz" @@ -3365,6 +3434,13 @@ gauge@^4.0.3: strip-ansi "^6.0.1" wide-align "^1.1.5" +generate-function@^2.3.1: + version "2.3.1" + resolved "https://registry.npmjs.org/generate-function/-/generate-function-2.3.1.tgz" + integrity sha512-eeB5GfMNeevm/GRYq20ShmsaGcmI81kIX2K9XQx5miC8KdHaC6Jm0qQ8ZNeGOi7wYB8OsdxKs+Y2oVuTFuVwKQ== + dependencies: + is-property "^1.0.2" + gensync@^1.0.0-beta.2: version "1.0.0-beta.2" resolved "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz" @@ -3838,6 +3914,13 @@ iconv-lite@^0.6.2: dependencies: safer-buffer ">= 2.1.2 < 3.0.0" +iconv-lite@^0.6.3: + version "0.6.3" + resolved "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz" + integrity sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw== + dependencies: + safer-buffer ">= 2.1.2 < 3.0.0" + ieee754@^1.1.13: version "1.2.1" resolved "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz" @@ -4044,6 +4127,11 @@ is-promise@^2.2.2: resolved "https://registry.npmjs.org/is-promise/-/is-promise-2.2.2.tgz" integrity sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ== +is-property@^1.0.2: + version "1.0.2" + resolved "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz" + integrity sha512-Ks/IoX00TtClbGQr4TWXemAnktAQvYB7HzcCxDGqEZU6oCmb2INHuOoKxbtR+HFkmYWBKv/dOZtGRiAjDhj92g== + is-stream@^2.0.0: version "2.0.1" resolved "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz" @@ -4749,6 +4837,11 @@ log-symbols@^4.1.0, log-symbols@4.1.0: chalk "^4.1.0" is-unicode-supported "^0.1.0" +long@^5.2.1: + version "5.2.3" + resolved "https://registry.npmjs.org/long/-/long-5.2.3.tgz" + integrity sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q== + loose-envify@^1.1.0, loose-envify@^1.4.0: version "1.4.0" resolved "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz" @@ -4775,11 +4868,21 @@ lru-cache@^6.0.0: dependencies: yallist "^4.0.0" +lru-cache@^7.14.1: + version "7.18.3" + resolved "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz" + integrity sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA== + lru-cache@^7.7.1: version "7.18.3" resolved "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz" integrity sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA== +lru-cache@^8.0.0: + version "8.0.5" + resolved "https://registry.npmjs.org/lru-cache/-/lru-cache-8.0.5.tgz" + integrity sha512-MhWWlVnuab1RG5/zMRRcVGXZLCXrZTgfwMikgzCegsPnG62yDQo5JnqKkrK4jO5iKqDAZGItAqN5CtKBCBWRUA== + "lru-cache@^9.1.1 || ^10.0.0": version "10.2.0" resolved "https://registry.npmjs.org/lru-cache/-/lru-cache-10.2.0.tgz" @@ -4821,6 +4924,28 @@ make-fetch-happen@^10.0.3: socks-proxy-agent "^7.0.0" ssri "^9.0.0" +make-fetch-happen@^9.1.0: + version "9.1.0" + resolved "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-9.1.0.tgz" + integrity sha512-+zopwDy7DNknmwPQplem5lAZX/eCOzSvSNNcSKm5eVwTkOBzoktEfXsa9L23J/GIRhxRsaxzkPEhrJEpE2F4Gg== + dependencies: + agentkeepalive "^4.1.3" + cacache "^15.2.0" + http-cache-semantics "^4.1.0" + http-proxy-agent "^4.0.1" + https-proxy-agent "^5.0.0" + is-lambda "^1.0.1" + lru-cache "^6.0.0" + minipass "^3.1.3" + minipass-collect "^1.0.2" + minipass-fetch "^1.3.2" + minipass-flush "^1.0.5" + minipass-pipeline "^1.2.4" + negotiator "^0.6.2" + promise-retry "^2.0.1" + socks-proxy-agent "^6.0.0" + ssri "^8.0.0" + makeerror@1.0.12: version "1.0.12" resolved "https://registry.npmjs.org/makeerror/-/makeerror-1.0.12.tgz" @@ -5212,6 +5337,17 @@ minipass-collect@^1.0.2: dependencies: minipass "^3.0.0" +minipass-fetch@^1.3.2: + version "1.4.1" + resolved "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-1.4.1.tgz" + integrity sha512-CGH1eblLq26Y15+Azk7ey4xh0J/XfJfrCox5LDJiKqI2Q2iwOLOKrlmIaODiSQS8d18jalF6y2K2ePUm0CmShw== + dependencies: + minipass "^3.1.0" + minipass-sized "^1.0.3" + minizlib "^2.0.0" + optionalDependencies: + encoding "^0.1.12" + minipass-fetch@^2.0.3: version "2.1.2" resolved "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-2.1.2.tgz" @@ -5230,7 +5366,7 @@ minipass-flush@^1.0.5: dependencies: minipass "^3.0.0" -minipass-pipeline@^1.2.4: +minipass-pipeline@^1.2.2, minipass-pipeline@^1.2.4: version "1.2.4" resolved "https://registry.npmjs.org/minipass-pipeline/-/minipass-pipeline-1.2.4.tgz" integrity sha512-xuIq7cIOt09RPRJ19gdi4b+RiNvDFYe5JH+ggNvBqGqpQXcru3PcRmOZuHBKWK1Txf9+cQ+HMVN4d6z46LZP7A== @@ -5244,7 +5380,7 @@ minipass-sized@^1.0.3: dependencies: minipass "^3.0.0" -minipass@^3.0.0, minipass@^3.1.1, minipass@^3.1.6: +minipass@^3.0.0, minipass@^3.1.0, minipass@^3.1.1, minipass@^3.1.3, minipass@^3.1.6: version "3.3.6" resolved "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz" integrity sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw== @@ -5261,7 +5397,7 @@ minipass@^5.0.0: resolved "https://registry.npmjs.org/minipass/-/minipass-5.0.0.tgz" integrity sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ== -minizlib@^2.1.1, minizlib@^2.1.2: +minizlib@^2.0.0, minizlib@^2.1.1, minizlib@^2.1.2: version "2.1.2" resolved "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz" integrity sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg== @@ -5344,6 +5480,20 @@ mute-stream@~0.0.4, mute-stream@0.0.8: resolved "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz" integrity sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA== +mysql2@^3.9.1: + version "3.9.1" + resolved "https://registry.npmjs.org/mysql2/-/mysql2-3.9.1.tgz" + integrity sha512-3njoWAAhGBYy0tWBabqUQcLtczZUxrmmtc2vszQUekg3kTJyZ5/IeLC3Fo04u6y6Iy5Sba7pIIa2P/gs8D3ZeQ== + dependencies: + denque "^2.1.0" + generate-function "^2.3.1" + iconv-lite "^0.6.3" + long "^5.2.1" + lru-cache "^8.0.0" + named-placeholders "^1.1.3" + seq-queue "^0.0.5" + sqlstring "^2.3.2" + mz@^2.7.0: version "2.7.0" resolved "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz" @@ -5353,6 +5503,13 @@ mz@^2.7.0: object-assign "^4.0.1" thenify-all "^1.0.0" +named-placeholders@^1.1.3: + version "1.1.3" + resolved "https://registry.npmjs.org/named-placeholders/-/named-placeholders-1.1.3.tgz" + integrity sha512-eLoBxg6wE/rZkJPhU/xRX1WTpkFEwDJEN96oxFrTsqBdbT5ec295Q+CoHrL9IT0DipqKhmGcaZmwOt8OON5x1w== + dependencies: + lru-cache "^7.14.1" + nanoid@^3.3.7: version "3.3.7" resolved "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz" @@ -5378,7 +5535,7 @@ ncp@^2.0.0: resolved "https://registry.npmjs.org/ncp/-/ncp-2.0.0.tgz" integrity sha512-zIdGUrPRFTUELUvr3Gmc7KZ2Sw/h1PiVM0Af/oHB6zgnV1ikqSfRk+TOufi79aHYCW3NiOXmr1BP5nWbzojLaA== -negotiator@^0.6.3, negotiator@0.6.3: +negotiator@^0.6.2, negotiator@^0.6.3, negotiator@0.6.3: version "0.6.3" resolved "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz" integrity sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg== @@ -5405,6 +5562,11 @@ node-addon-api@^4.3.0: resolved "https://registry.npmjs.org/node-addon-api/-/node-addon-api-4.3.0.tgz" integrity sha512-73sE9+3UaLYYFmDsFZnqCInzPyh3MqIwZO9cw58yIqAZhONrrabrYyYe3TuIqtIiOuTXVhsGau8hcrhhwSsDIQ== +node-addon-api@^7.0.0: + version "7.1.0" + resolved "https://registry.npmjs.org/node-addon-api/-/node-addon-api-7.1.0.tgz" + integrity sha512-mNcltoe1R8o7STTegSOHdnJNN7s5EUvhoS7ShnTHDyOSd+8H+UdWODq6qSv67PjC8Zc5JRT8+oLAMCr0SIXw7g== + node-api-version@^0.2.0: version "0.2.0" resolved "https://registry.npmjs.org/node-api-version/-/node-api-version-0.2.0.tgz" @@ -5450,6 +5612,22 @@ node-gyp@^9.0.0: tar "^6.1.2" which "^2.0.2" +node-gyp@8.x: + version "8.4.1" + resolved "https://registry.npmjs.org/node-gyp/-/node-gyp-8.4.1.tgz" + integrity sha512-olTJRgUtAb/hOXG0E93wZDs5YiJlgbXxTwQAFHyNlRsXQnYzUaF2aGgujZbw+hR8aF4ZG/rST57bWMWD16jr9w== + dependencies: + env-paths "^2.2.0" + glob "^7.1.4" + graceful-fs "^4.2.6" + make-fetch-happen "^9.1.0" + nopt "^5.0.0" + npmlog "^6.0.0" + rimraf "^3.0.2" + semver "^7.3.5" + tar "^6.1.2" + which "^2.0.2" + node-int64@^0.4.0: version "0.4.0" resolved "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz" @@ -5465,6 +5643,13 @@ node-releases@^2.0.14: resolved "https://registry.npmjs.org/node-releases/-/node-releases-2.0.14.tgz" integrity sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw== +nopt@^5.0.0: + version "5.0.0" + resolved "https://registry.npmjs.org/nopt/-/nopt-5.0.0.tgz" + integrity sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ== + dependencies: + abbrev "1" + nopt@^6.0.0: version "6.0.0" resolved "https://registry.npmjs.org/nopt/-/nopt-6.0.0.tgz" @@ -5637,6 +5822,11 @@ p-try@^2.0.0: resolved "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz" integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== +packet-reader@1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/packet-reader/-/packet-reader-1.0.0.tgz" + integrity sha512-HAKu/fG3HpHFO0AA8WE8q2g+gBJaZ9MG7fcKk+IJPLTGAD6Psw4443l+9DGRbOIh3/aXr7Phy0TjilYivJo5XQ== + pad-left@^2.1.0: version "2.1.0" resolved "https://registry.npmjs.org/pad-left/-/pad-left-2.1.0.tgz" @@ -5746,6 +5936,64 @@ performance-now@^2.1.0: resolved "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz" integrity sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow== +pg-cloudflare@^1.1.1: + version "1.1.1" + resolved "https://registry.npmjs.org/pg-cloudflare/-/pg-cloudflare-1.1.1.tgz" + integrity sha512-xWPagP/4B6BgFO+EKz3JONXv3YDgvkbVrGw2mTo3D6tVDQRh1e7cqVGvyR3BE+eQgAvx1XhW/iEASj4/jCWl3Q== + +pg-connection-string@^2.6.2: + version "2.6.2" + resolved "https://registry.npmjs.org/pg-connection-string/-/pg-connection-string-2.6.2.tgz" + integrity sha512-ch6OwaeaPYcova4kKZ15sbJ2hKb/VP48ZD2gE7i1J+L4MspCtBMAx8nMgz7bksc7IojCIIWuEhHibSMFH8m8oA== + +pg-int8@1.0.1: + version "1.0.1" + resolved "https://registry.npmjs.org/pg-int8/-/pg-int8-1.0.1.tgz" + integrity sha512-WCtabS6t3c8SkpDBUlb1kjOs7l66xsGdKpIPZsg4wR+B3+u9UAum2odSsF9tnvxg80h4ZxLWMy4pRjOsFIqQpw== + +pg-pool@^3.6.1: + version "3.6.1" + resolved "https://registry.npmjs.org/pg-pool/-/pg-pool-3.6.1.tgz" + integrity sha512-jizsIzhkIitxCGfPRzJn1ZdcosIt3pz9Sh3V01fm1vZnbnCMgmGl5wvGGdNN2EL9Rmb0EcFoCkixH4Pu+sP9Og== + +pg-protocol@^1.6.0: + version "1.6.0" + resolved "https://registry.npmjs.org/pg-protocol/-/pg-protocol-1.6.0.tgz" + integrity sha512-M+PDm637OY5WM307051+bsDia5Xej6d9IR4GwJse1qA1DIhiKlksvrneZOYQq42OM+spubpcNYEo2FcKQrDk+Q== + +pg-types@^2.1.0: + version "2.2.0" + resolved "https://registry.npmjs.org/pg-types/-/pg-types-2.2.0.tgz" + integrity sha512-qTAAlrEsl8s4OiEQY69wDvcMIdQN6wdz5ojQiOy6YRMuynxenON0O5oCpJI6lshc6scgAY8qvJ2On/p+CXY0GA== + dependencies: + pg-int8 "1.0.1" + postgres-array "~2.0.0" + postgres-bytea "~1.0.0" + postgres-date "~1.0.4" + postgres-interval "^1.1.0" + +pg@^8.11.3, pg@>=8.0: + version "8.11.3" + resolved "https://registry.npmjs.org/pg/-/pg-8.11.3.tgz" + integrity sha512-+9iuvG8QfaaUrrph+kpF24cXkH1YOOUeArRNYIxq1viYHZagBxrTno7cecY1Fa44tJeZvaoG+Djpkc3JwehN5g== + dependencies: + buffer-writer "2.0.0" + packet-reader "1.0.0" + pg-connection-string "^2.6.2" + pg-pool "^3.6.1" + pg-protocol "^1.6.0" + pg-types "^2.1.0" + pgpass "1.x" + optionalDependencies: + pg-cloudflare "^1.1.1" + +pgpass@1.x: + version "1.0.5" + resolved "https://registry.npmjs.org/pgpass/-/pgpass-1.0.5.tgz" + integrity sha512-FdW9r/jQZhSeohs1Z3sI1yxFQNFvMcnmfuj4WBMUTxOrAyLMaTcE1aAMBiTlbMNaXvBCQuVi0R7hd8udDSP7ug== + dependencies: + split2 "^4.1.0" + picocolors@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz" @@ -5833,6 +6081,28 @@ postcss@^8.0.0, postcss@^8.2.14, postcss@^8.4.21, postcss@^8.4.23, postcss@^8.4. picocolors "^1.0.0" source-map-js "^1.0.2" +postgres-array@~2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/postgres-array/-/postgres-array-2.0.0.tgz" + integrity sha512-VpZrUqU5A69eQyW2c5CA1jtLecCsN2U/bD6VilrFDWq5+5UIEVO7nazS3TEcHf1zuPYO/sqGvUvW62g86RXZuA== + +postgres-bytea@~1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/postgres-bytea/-/postgres-bytea-1.0.0.tgz" + integrity sha512-xy3pmLuQqRBZBXDULy7KbaitYqLcmxigw14Q5sj8QBVLqEwXfeybIKVWiqAXTlcvdvb0+xkOtDbfQMOf4lST1w== + +postgres-date@~1.0.4: + version "1.0.7" + resolved "https://registry.npmjs.org/postgres-date/-/postgres-date-1.0.7.tgz" + integrity sha512-suDmjLVQg78nMK2UZ454hAG+OAW+HQPZ6n++TNDUX+L0+uUlLywnoxJKDou51Zm+zTCjrCl0Nq6J9C5hP9vK/Q== + +postgres-interval@^1.1.0: + version "1.2.0" + resolved "https://registry.npmjs.org/postgres-interval/-/postgres-interval-1.2.0.tgz" + integrity sha512-9ZhXKM/rw350N1ovuWHbGxnGh/SNJ4cnxHiM0rxE4VN41wsg8P8zWn9hv/buK00RP4WvlOyr/RBDiptyxVbkZQ== + dependencies: + xtend "^4.0.0" + posthog-node@^3.1.2: version "3.6.2" resolved "https://registry.npmjs.org/posthog-node/-/posthog-node-3.6.2.tgz" @@ -5841,7 +6111,7 @@ posthog-node@^3.1.2: axios "^1.6.2" rusha "^0.8.14" -prebuild-install@^7.0.1: +prebuild-install@^7.0.1, prebuild-install@^7.1.1: version "7.1.1" resolved "https://registry.npmjs.org/prebuild-install/-/prebuild-install-7.1.1.tgz" integrity sha512-jAXscXWMcCK8GgCoHOfIr0ODh5ai8mj63L2nWrjuAgXE6tDyYGnx4/8o/rCgU+B4JSyZBKbeZqzhtwtC3ovxjw== @@ -6453,6 +6723,11 @@ send@0.18.0: range-parser "~1.2.1" statuses "2.0.1" +seq-queue@^0.0.5: + version "0.0.5" + resolved "https://registry.npmjs.org/seq-queue/-/seq-queue-0.0.5.tgz" + integrity sha512-hr3Wtp/GZIc/6DAGPDcV4/9WoZhjrkXsi5B/07QgX8tsdc6ilr7BFM6PM6rbdAX1kFSDYeZGLipIZZKyQP0O5Q== + serialize-javascript@6.0.0: version "6.0.0" resolved "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz" @@ -6576,6 +6851,15 @@ socket.io-parser@~4.2.4: "@socket.io/component-emitter" "~3.1.0" debug "~4.3.1" +socks-proxy-agent@^6.0.0: + version "6.2.1" + resolved "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-6.2.1.tgz" + integrity sha512-a6KW9G+6B3nWZ1yB8G7pJwL3ggLy1uTzKAgCb7ttblwqdz9fMGJUuTy3uFzEP48FAs9FLILlmzDlE2JJhVQaXQ== + dependencies: + agent-base "^6.0.2" + debug "^4.3.3" + socks "^2.6.2" + socks-proxy-agent@^7.0.0: version "7.0.0" resolved "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-7.0.0.tgz" @@ -6621,6 +6905,11 @@ spawn-command@^0.0.2-1: resolved "https://registry.npmjs.org/spawn-command/-/spawn-command-0.0.2-1.tgz" integrity sha512-n98l9E2RMSJ9ON1AKisHzz7V42VDiBQGY6PB1BwRglz99wpVsSuGzQ+jOi6lFXBGVTCrRpltvjm+/XA+tpeJrg== +split2@^4.1.0: + version "4.2.0" + resolved "https://registry.npmjs.org/split2/-/split2-4.2.0.tgz" + integrity sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg== + sprintf-js@^1.1.3: version "1.1.3" resolved "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.3.tgz" @@ -6631,6 +6920,23 @@ sprintf-js@~1.0.2: resolved "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz" integrity sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g== +sqlite3@^5.1.7: + version "5.1.7" + resolved "https://registry.npmjs.org/sqlite3/-/sqlite3-5.1.7.tgz" + integrity sha512-GGIyOiFaG+TUra3JIfkI/zGP8yZYLPQ0pl1bH+ODjiX57sPhrLU5sQJn1y9bDKZUFYkX1crlrPfSYt0BKKdkog== + dependencies: + bindings "^1.5.0" + node-addon-api "^7.0.0" + prebuild-install "^7.1.1" + tar "^6.1.11" + optionalDependencies: + node-gyp "8.x" + +sqlstring@^2.3.2: + version "2.3.3" + resolved "https://registry.npmjs.org/sqlstring/-/sqlstring-2.3.3.tgz" + integrity sha512-qC9iz2FlN7DQl3+wjwn3802RTyjCx7sDvfQEXchwa6CWOx07/WVfh91gBmQ9fahw8snwGEWU3xGzOt4tFyHLxg== + sshpk@^1.7.0: version "1.18.0" resolved "https://registry.npmjs.org/sshpk/-/sshpk-1.18.0.tgz" @@ -6646,6 +6952,13 @@ sshpk@^1.7.0: safer-buffer "^2.0.2" tweetnacl "~0.14.0" +ssri@^8.0.0, ssri@^8.0.1: + version "8.0.1" + resolved "https://registry.npmjs.org/ssri/-/ssri-8.0.1.tgz" + integrity sha512-97qShzy1AiyxvPNIkLWoGua7xoQzzPjQ0HAH4B0rWKo7SZ6USuPcrUiAFrws0UH8RrbWmgq3LMTObhPIHbbBeQ== + dependencies: + minipass "^3.1.1" + ssri@^9.0.0: version "9.0.1" resolved "https://registry.npmjs.org/ssri/-/ssri-9.0.1.tgz" @@ -6882,7 +7195,7 @@ tar-stream@^2.1.4: inherits "^2.0.3" readable-stream "^3.1.1" -tar@^6.0.5, tar@^6.1.11, tar@^6.1.2: +tar@^6.0.2, tar@^6.0.5, tar@^6.1.11, tar@^6.1.2: version "6.2.0" resolved "https://registry.npmjs.org/tar/-/tar-6.2.0.tgz" integrity sha512-/Wo7DcT0u5HUV486xg675HtjNd3BXZ6xDbzsCUZPt5iw8bTQ63bP0Raut3mvro9u+CUyq7YQd8Cx55fsZXxqLQ== @@ -7167,6 +7480,13 @@ unified@^10.0.0: trough "^2.0.0" vfile "^5.0.0" +unique-filename@^1.1.1: + version "1.1.1" + resolved "https://registry.npmjs.org/unique-filename/-/unique-filename-1.1.1.tgz" + integrity sha512-Vmp0jIp2ln35UTXuryvjzkjGdRyf9b2lTXuSYUiPmzRcl3FDtYqAwOnTJkAngD9SWhnoJzDbTKwaOrZ+STtxNQ== + dependencies: + unique-slug "^2.0.0" + unique-filename@^2.0.0: version "2.0.1" resolved "https://registry.npmjs.org/unique-filename/-/unique-filename-2.0.1.tgz" @@ -7174,6 +7494,13 @@ unique-filename@^2.0.0: dependencies: unique-slug "^3.0.0" +unique-slug@^2.0.0: + version "2.0.2" + resolved "https://registry.npmjs.org/unique-slug/-/unique-slug-2.0.2.tgz" + integrity sha512-zoWr9ObaxALD3DOPfjPSqxt4fnZiWblxHIgeWqW8x7UqDzEtHEQLzji2cuJYQFCU6KmoJikOYAZlrTHHebjx2w== + dependencies: + imurmurhash "^0.1.4" + unique-slug@^3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/unique-slug/-/unique-slug-3.0.0.tgz" @@ -7569,6 +7896,11 @@ xmlhttprequest-ssl@~2.0.0: resolved "https://registry.npmjs.org/xmlhttprequest-ssl/-/xmlhttprequest-ssl-2.0.0.tgz" integrity sha512-QKxVRxiRACQcVuQEYFsI1hhkrMlrXHPegbbd1yn9UHOmRxY+si12nQYzri3vbzt8VdTTRviqcKxcyllFas5z2A== +xtend@^4.0.0: + version "4.0.2" + resolved "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz" + integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== + y18n@^5.0.5: version "5.0.8" resolved "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz" From 61e78ba9041064f3bcece4d17443d53551b56fea Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Mon, 19 Feb 2024 09:03:13 -0800 Subject: [PATCH 044/141] =?UTF-8?q?=F0=9F=90=9B=20fix=20config/addModel?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- extensions/intellij/gradle.properties | 2 +- gui/src/pages/modelconfig.tsx | 2 +- gui/src/pages/models.tsx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/extensions/intellij/gradle.properties b/extensions/intellij/gradle.properties index 627737abd..79e91cc2c 100644 --- a/extensions/intellij/gradle.properties +++ b/extensions/intellij/gradle.properties @@ -4,7 +4,7 @@ pluginGroup = com.github.continuedev.continueintellijextension pluginName = continue-intellij-extension pluginRepositoryUrl = https://github.com/continuedev/continue # SemVer format -> https://semver.org -pluginVersion = 0.0.27 +pluginVersion = 0.0.28 # Supported build number ranges and IntelliJ Platform versions -> https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html pluginSinceBuild = 223 diff --git a/gui/src/pages/modelconfig.tsx b/gui/src/pages/modelconfig.tsx index f4971f485..e8192f10a 100644 --- a/gui/src/pages/modelconfig.tsx +++ b/gui/src/pages/modelconfig.tsx @@ -246,7 +246,7 @@ function ModelConfig() { ...formParams, provider: modelInfo.provider, }; - postToIde("config/addModel", model); + postToIde("config/addModel", { model }); dispatch(setDefaultModel(model.title)); navigate("/"); }} diff --git a/gui/src/pages/models.tsx b/gui/src/pages/models.tsx index 405096321..f2636dd39 100644 --- a/gui/src/pages/models.tsx +++ b/gui/src/pages/models.tsx @@ -117,7 +117,7 @@ function Models() { ), provider: PROVIDER_INFO[selectedProvider].provider, }; - postToIde("config/addModel", model); + postToIde("config/addModel", { model }); dispatch(setDefaultModel(model.title)); navigate("/"); }} From 6d65a0a74cd401e3f1d29410e6e7cd42355e3b07 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Mon, 19 Feb 2024 09:07:46 -0800 Subject: [PATCH 045/141] =?UTF-8?q?=F0=9F=92=84=20improve=20color=20theme?= =?UTF-8?q?=20in=20jetbrains?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../continueintellijextension/continue/GetTheme.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/GetTheme.kt b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/GetTheme.kt index b8cf94e76..20367c33b 100644 --- a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/GetTheme.kt +++ b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/GetTheme.kt @@ -44,10 +44,10 @@ class GetTheme { "--vscode-input-background" to secondaryDarkHex, "--vscode-editor-background" to defaultBackgroundHex, "--vscode-button-background" to defaultBackgroundHex, - "--vscode-list-activeSelectionBackground" to secondaryDarkHex, + "--vscode-list-activeSelectionBackground" to defaultBackgroundHex, "--vscode-focusBorder" to highlightHex, "--vscode-quickInputList-focusForeground" to defaultForegroundHex, - "--vscode-quickInput-background" to defaultBackgroundHex, + "--vscode-quickInput-background" to secondaryDarkHex, "--vscode-input-border" to "#80808080", "--vscode-badge-background" to highlightHex, "--vscode-badge-foreground" to defaultForegroundHex, From 67eeca2647c48a13a4a69a149cfaa7f799358204 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Mon, 19 Feb 2024 09:10:16 -0800 Subject: [PATCH 046/141] =?UTF-8?q?=F0=9F=94=96=20bump=20intellij=20versio?= =?UTF-8?q?n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- extensions/intellij/gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/intellij/gradle.properties b/extensions/intellij/gradle.properties index 79e91cc2c..97afe4e9e 100644 --- a/extensions/intellij/gradle.properties +++ b/extensions/intellij/gradle.properties @@ -4,7 +4,7 @@ pluginGroup = com.github.continuedev.continueintellijextension pluginName = continue-intellij-extension pluginRepositoryUrl = https://github.com/continuedev/continue # SemVer format -> https://semver.org -pluginVersion = 0.0.28 +pluginVersion = 0.0.29 # Supported build number ranges and IntelliJ Platform versions -> https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html pluginSinceBuild = 223 From f195270a3ef8c09c4a5b649c2a9a92e81fd3cfd4 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Mon, 19 Feb 2024 15:18:00 -0800 Subject: [PATCH 047/141] =?UTF-8?q?=F0=9F=94=80=20extra=20changes=20from?= =?UTF-8?q?=20merge?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/config/handler.ts | 18 ++++++++++++++++++ core/config/load.ts | 17 +---------------- core/index.d.ts | 6 +++++- 3 files changed, 24 insertions(+), 17 deletions(-) diff --git a/core/config/handler.ts b/core/config/handler.ts index ca4e536b6..341dfaf12 100644 --- a/core/config/handler.ts +++ b/core/config/handler.ts @@ -122,8 +122,26 @@ export class ConfigHandler { if (input.hostname === "localhost") { input.hostname = "127.0.0.1"; } + + let updatedBody: string | undefined = undefined; + try { + if ( + llm.requestOptions?.extraBodyProperties && + typeof init.body === "string" + ) { + const parsedBody = JSON.parse(init.body); + updatedBody = JSON.stringify({ + ...parsedBody, + ...llm.requestOptions.extraBodyProperties, + }); + } + } catch (e) { + console.log("Unable to parse HTTP request body: ", e); + } + const resp = await fetch(input, { ...init, + body: updatedBody ?? init.body, headers, agent, }); diff --git a/core/config/load.ts b/core/config/load.ts index d230916bb..232854333 100644 --- a/core/config/load.ts +++ b/core/config/load.ts @@ -1,8 +1,7 @@ import * as fs from "fs"; import { - BaseCompletionOptions, + BrowserSerializedContinueConfig, Config, - ContextProviderDescription, ContextProviderWithParams, ContinueConfig, ContinueRcJson, @@ -14,7 +13,6 @@ import { ModelDescription, SerializedContinueConfig, SlashCommand, - SlashCommandDescription, } from ".."; import { @@ -277,19 +275,6 @@ async function intermediateToFinalConfig( }; } -interface BrowserSerializedContinueConfig { - allowAnonymousTelemetry?: boolean; - models: ModelDescription[]; - systemMessage?: string; - completionOptions?: BaseCompletionOptions; - slashCommands?: SlashCommandDescription[]; - contextProviders?: ContextProviderDescription[]; - disableIndexing?: boolean; - disableSessionTitles?: boolean; - userToken?: string; - embeddingsProvider?: string; -} - function finalToBrowserConfig( final: ContinueConfig ): BrowserSerializedContinueConfig { diff --git a/core/index.d.ts b/core/index.d.ts index 0fa331e33..a8c1f13de 100644 --- a/core/index.d.ts +++ b/core/index.d.ts @@ -13,7 +13,11 @@ declare global { }; colorThemeName?: string; workspacePaths?: string[]; - postIntellijMessage?: (type: string, data: any) => void; + postIntellijMessage?: ( + messageType: string, + data: any, + messageIde: string + ) => void; } } From 0c58fcfb301c508c41269bfd876a6e729f7a6ec9 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Mon, 19 Feb 2024 15:45:28 -0800 Subject: [PATCH 048/141] =?UTF-8?q?=F0=9F=94=A7=20pass=20selectedCode=20an?= =?UTF-8?q?d=20config=20to=20custom=20slash=20commands?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/config/types.ts | 39 +++++++++++--------- core/index.d.ts | 2 + core/protocol.ts | 1 + extensions/vscode/src/webviewProtocol.ts | 3 ++ gui/src/components/mainInput/resolveInput.ts | 4 +- gui/src/hooks/useChatHandler.ts | 13 +++++-- pkg/src/core.ts | 3 ++ 7 files changed, 41 insertions(+), 24 deletions(-) diff --git a/core/config/types.ts b/core/config/types.ts index dcfd4a40e..976dc3f89 100644 --- a/core/config/types.ts +++ b/core/config/types.ts @@ -15,7 +15,11 @@ declare global { }; colorThemeName?: string; workspacePaths?: string[]; - postIntellijMessage?: (type: string, data: any) => void; + postIntellijMessage?: ( + messageType: string, + data: any, + messageIde: string + ) => void; } } @@ -313,13 +317,24 @@ declare global { message: string; } + export type IdeType = "vscode" | "jetbrains"; + export interface IdeInfo { + ideType: IdeType; + name: string; + version: string; + remoteName: string; + } + export interface IDE { - getSerializedConfig(): Promise; + getIdeInfo(): Promise; getDiff(): Promise; + isTelemetryEnabled(): Promise; + getUniqueId(): Promise; getTerminalContents(): Promise; listWorkspaceContents(directory?: string): Promise; listFolders(): Promise; getWorkspaceDirs(): Promise; + getWorkspaceConfigs(): Promise; writeFile(path: string, contents: string): Promise; showVirtualFile(title: string, contents: string): Promise; getContinueDir(): Promise; @@ -327,6 +342,7 @@ declare global { runCommand(command: string): Promise; saveFile(filepath: string): Promise; readFile(filepath: string): Promise; + readRangeInFile(filepath: string, range: Range): Promise; showLines( filepath: string, startLine: number, @@ -343,22 +359,7 @@ declare global { subprocess(command: string): Promise<[string, string]>; getProblems(filepath?: string | undefined): Promise; getBranch(dir: string): Promise; - - // Embeddings - /** - * Returns list of [tag, filepath, hash of contents] that need to be embedded - */ - getFilesToEmbed(providerId: string): Promise<[string, string, string][]>; - sendEmbeddingForChunk( - chunk: Chunk, - embedding: number[], - tags: string[] - ): void; - retrieveChunks( - text: string, - n: number, - directory: string | undefined - ): Promise; + getStats(directory: string): Promise<{ [path: string]: number }>; } // Slash Commands @@ -371,6 +372,8 @@ declare global { input: string; params?: { [key: string]: any } | undefined; contextItems: ContextItemWithId[]; + selectedCode: RangeInFile[]; + config: ContinueConfig; } export interface SlashCommand { diff --git a/core/index.d.ts b/core/index.d.ts index 9c118ed72..4f34289f8 100644 --- a/core/index.d.ts +++ b/core/index.d.ts @@ -370,6 +370,8 @@ export interface ContinueSDK { input: string; params?: { [key: string]: any } | undefined; contextItems: ContextItemWithId[]; + selectedCode: RangeInFile[]; + config: ContinueConfig; } export interface SlashCommand { diff --git a/core/protocol.ts b/core/protocol.ts index 237223c58..a0259393d 100644 --- a/core/protocol.ts +++ b/core/protocol.ts @@ -67,6 +67,7 @@ export type Protocol = { contextItems: ContextItemWithId[]; params: any; historyIndex: number; + selectedCode: RangeInFile[]; }, ProtocolGeneratorType, ]; diff --git a/extensions/vscode/src/webviewProtocol.ts b/extensions/vscode/src/webviewProtocol.ts index 5aa2a8e78..3476e5c0d 100644 --- a/extensions/vscode/src/webviewProtocol.ts +++ b/extensions/vscode/src/webviewProtocol.ts @@ -362,6 +362,7 @@ export class VsCodeWebviewProtocol { contextItems, params, historyIndex, + selectedCode, } = msg.data; const config = await protocol.configHandler.loadConfig(); @@ -386,6 +387,8 @@ export class VsCodeWebviewProtocol { historyIndex, }); }, + selectedCode, + config, })) { if (content) { yield { content }; diff --git a/gui/src/components/mainInput/resolveInput.ts b/gui/src/components/mainInput/resolveInput.ts index cc576ff06..603a074fb 100644 --- a/gui/src/components/mainInput/resolveInput.ts +++ b/gui/src/components/mainInput/resolveInput.ts @@ -26,7 +26,7 @@ interface MentionAttrs { async function resolveEditorContent( editorState: JSONContent -): Promise<[ContextItemWithId[], MessageContent]> { +): Promise<[ContextItemWithId[], RangeInFile[], MessageContent]> { let parts: MessagePart[] = []; let contextItemAttrs: MentionAttrs[] = []; const selectedCode: RangeInFile[] = []; @@ -127,7 +127,7 @@ async function resolveEditorContent( parts[lastTextIndex].text = `${slashCommand} ${parts[lastTextIndex].text}`; } - return [contextItems, parts]; + return [contextItems, selectedCode, parts]; } function findLastIndex( diff --git a/gui/src/hooks/useChatHandler.ts b/gui/src/hooks/useChatHandler.ts index 088a59d95..2c8eee34c 100644 --- a/gui/src/hooks/useChatHandler.ts +++ b/gui/src/hooks/useChatHandler.ts @@ -7,6 +7,7 @@ import { ChatMessage, LLMReturnValue, MessageContent, + RangeInFile, SlashCommandDescription, } from "core"; import { constructMessages } from "core/llm/constructMessages"; @@ -97,7 +98,8 @@ function useChatHandler(dispatch: Dispatch) { messages: ChatMessage[], slashCommand: SlashCommandDescription, input: string, - historyIndex: number + historyIndex: number, + selectedCode: RangeInFile[] ) { const abortController = new AbortController(); const cancelToken = abortController.signal; @@ -113,6 +115,7 @@ function useChatHandler(dispatch: Dispatch) { contextItems, params: slashCommand.params, historyIndex, + selectedCode, }, cancelToken )) { @@ -135,8 +138,9 @@ function useChatHandler(dispatch: Dispatch) { } // Resolve context providers and construct new history - const [contextItems, content] = await resolveEditorContent(editorState); - console.log(contextItems, content); + const [contextItems, selectedCode, content] = + await resolveEditorContent(editorState); + const message: ChatMessage = { role: "user", content, @@ -192,7 +196,8 @@ function useChatHandler(dispatch: Dispatch) { messages, slashCommand, commandInput, - historyIndex + historyIndex, + selectedCode ); } } catch (e) { diff --git a/pkg/src/core.ts b/pkg/src/core.ts index c84e99927..4244e09a9 100644 --- a/pkg/src/core.ts +++ b/pkg/src/core.ts @@ -203,6 +203,7 @@ export class Core { contextItems, params, historyIndex, + selectedCode, } = msg.data; const config = await configHandler.loadConfig(); @@ -228,6 +229,8 @@ export class Core { // historyIndex, // }); }, + selectedCode, + config, })) { if (content) { yield { content }; From 9fc4069f53a1b24dc9d8743abdbd5b518cb89d08 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Mon, 19 Feb 2024 17:16:12 -0800 Subject: [PATCH 049/141] =?UTF-8?q?=F0=9F=90=9B=20small=20improvements?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/test/edit.test.ts | 2 ++ .../src/main/resources/config_schema.json | 24 +++++++++++++++---- extensions/vscode/src/lang-server/codeLens.ts | 8 +++---- extensions/vscode/src/util/ideUtils.ts | 4 +++- extensions/vscode/yarn.lock | 8 +++---- gui/src/pages/modelconfig.tsx | 1 - 6 files changed, 32 insertions(+), 15 deletions(-) diff --git a/core/test/edit.test.ts b/core/test/edit.test.ts index 48543ce4b..d4186915d 100644 --- a/core/test/edit.test.ts +++ b/core/test/edit.test.ts @@ -62,6 +62,8 @@ describe("/edit slash command", () => { history: [], input: "implement this function", contextItems: [TEST_CONTEXT_ITEM], + selectedCode: [], + config: {} as any, }; let total = ""; diff --git a/extensions/intellij/src/main/resources/config_schema.json b/extensions/intellij/src/main/resources/config_schema.json index ca9a92aa8..b82858588 100644 --- a/extensions/intellij/src/main/resources/config_schema.json +++ b/extensions/intellij/src/main/resources/config_schema.json @@ -87,6 +87,11 @@ "additionalProperties": { "type": "string" } + }, + "extraBodyProperties": { + "title": "Extra Body Properties", + "description": "This object will be merged with the body when making the HTTP requests", + "type": "object" } } }, @@ -216,7 +221,8 @@ "verifySsl": null, "caBundlePath": null, "proxy": null, - "headers": null + "headers": null, + "extraBodyProperties": null }, "allOf": [ { @@ -336,6 +342,7 @@ "gpt-3.5-turbo-0613", "gpt-4-32k", "gpt-4-0125-preview", + "gpt-4-turbo-preview", "AUTODETECT" ] } @@ -421,7 +428,7 @@ "gpt-4", "gpt-3.5-turbo-0613", "gpt-4-32k", - "gpt-4-0125-preview", + "gpt-4-turbo-preview", "gpt-4-vision-preview", "mistral-7b", "mistral-8x7b", @@ -444,6 +451,9 @@ "stable-code-3b", "starcoder-1b", "starcoder-3b", + "mistral-tiny", + "mistral-small", + "mistral-medium", "AUTODETECT" ] }, @@ -782,7 +792,7 @@ "gpt-4", "gpt-3.5-turbo-0613", "gpt-4-32k", - "gpt-4-0125-preview", + "gpt-4-turbo-preview", "gpt-4-vision-preview", "mistral-7b", "mistral-8x7b", @@ -986,7 +996,9 @@ "folder", "issue", "docs", - "tree" + "tree", + "highlights", + "outline" ], "markdownEnumDescriptions": [ "Reference the contents of the current changes as given by `git diff`", @@ -1002,7 +1014,9 @@ "Retrieve important pages from a documentation website, as determined by similarity search", "Index and retrieve the contents of any documentation site, using embeddings to find important snippets", "Display a file tree of the current workspace", - "Include a repo map showing important code objects" + "Include a repo map showing important code objects", + "Displays important snippets of code from the currently open files", + "Displays definition lines from the currently open files" ], "type": "string" }, diff --git a/extensions/vscode/src/lang-server/codeLens.ts b/extensions/vscode/src/lang-server/codeLens.ts index 1b28e6280..69d2a5613 100644 --- a/extensions/vscode/src/lang-server/codeLens.ts +++ b/extensions/vscode/src/lang-server/codeLens.ts @@ -35,12 +35,12 @@ class VerticalPerLineCodeLensProvider implements vscode.CodeLensProvider { ); codeLenses.push( new vscode.CodeLens(range, { - title: "Accept ✅", + title: "Accept", command: "continue.acceptVerticalDiffBlock", arguments: [filepath, i], }), new vscode.CodeLens(range, { - title: "Reject ❌", + title: "Reject", command: "continue.rejectVerticalDiffBlock", arguments: [filepath, i], }) @@ -78,12 +78,12 @@ class SuggestionsCodeLensProvider implements vscode.CodeLensProvider { ); codeLenses.push( new vscode.CodeLens(range, { - title: "Accept ✅", + title: "Accept", command: "continue.acceptSuggestion", arguments: [suggestion], }), new vscode.CodeLens(range, { - title: "Reject ❌", + title: "Reject", command: "continue.rejectSuggestion", arguments: [suggestion], }) diff --git a/extensions/vscode/src/util/ideUtils.ts b/extensions/vscode/src/util/ideUtils.ts index 15f51fb7c..a83141831 100644 --- a/extensions/vscode/src/util/ideUtils.ts +++ b/extensions/vscode/src/util/ideUtils.ts @@ -219,7 +219,9 @@ export class VsCodeIdeUtils { !( document.languageId === "plaintext" && document.getText() === "accessible-buffer-accessible-buffer-" - ) && !document.uri.scheme.startsWith("git") + ) && + !document.uri.scheme.startsWith("git") && + document.uri.scheme !== "vscode-scm" ); } diff --git a/extensions/vscode/yarn.lock b/extensions/vscode/yarn.lock index ec6f22821..8514c2ac5 100644 --- a/extensions/vscode/yarn.lock +++ b/extensions/vscode/yarn.lock @@ -701,10 +701,10 @@ resolved "https://registry.npmjs.org/@lancedb/vectordb-darwin-arm64/-/vectordb-darwin-arm64-0.4.10.tgz" integrity sha512-y/uHOGb0g15pvqv5tdTyZ6oN+0QVpBmZDzKFWW6pPbuSZjB2uPqcs+ti0RB+AUdmS21kavVQqaNsw/HLKEGrHA== -"@lancedb/vectordb-darwin-arm64@0.4.8": - version "0.4.8" - resolved "https://registry.npmjs.org/@lancedb/vectordb-darwin-arm64/-/vectordb-darwin-arm64-0.4.8.tgz" - integrity sha512-FpnJaw7KmNdD/FtOw9AcmPL5P+L04AcnfPj9ZyEjN8iCwB/qaOGYgdfBv+EbEtfHIsqA12q/1BRduu9KdB6BIA== +"@lancedb/vectordb-darwin-arm64@0.4.9": + version "0.4.9" + resolved "https://registry.npmjs.org/@lancedb/vectordb-darwin-arm64/-/vectordb-darwin-arm64-0.4.9.tgz" + integrity sha512-u56TXU0hvdLbknGwC7Ebza3/CUFeCTkoCy/sC6h0FtOGya+NV7jraAeXEwDzoZbfW08VYYxnp3TsCcpNU9lpTA== "@lukeed/csprng@^1.0.0": version "1.1.0" diff --git a/gui/src/pages/modelconfig.tsx b/gui/src/pages/modelconfig.tsx index 44a966be7..08a982c2b 100644 --- a/gui/src/pages/modelconfig.tsx +++ b/gui/src/pages/modelconfig.tsx @@ -39,7 +39,6 @@ export const CustomModelButton = styled.div<{ disabled: boolean }>` display: flex; justify-content: center; align-items: center; - width: 100%; transition: all 0.5s; ${(props) => From c067d9b0d006412b33b44c6a22297137054b35d9 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Mon, 19 Feb 2024 17:20:42 -0800 Subject: [PATCH 050/141] =?UTF-8?q?=F0=9F=9A=B8=20update=20shortcuts=20for?= =?UTF-8?q?=20vscode?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- extensions/vscode/continue_tutorial.py | 8 ++++---- extensions/vscode/package.json | 12 ++++++------ extensions/vscode/src/activation/inlineTips.ts | 6 +++--- extensions/vscode/src/lang-server/codeLens.ts | 2 +- gui/src/components/dialogs/KeyboardShortcuts.tsx | 14 +++++++------- gui/src/pages/gui.tsx | 2 +- 6 files changed, 22 insertions(+), 22 deletions(-) diff --git a/extensions/vscode/continue_tutorial.py b/extensions/vscode/continue_tutorial.py index b89fd009a..dff23a718 100644 --- a/extensions/vscode/continue_tutorial.py +++ b/extensions/vscode/continue_tutorial.py @@ -19,7 +19,7 @@ You can either - follow along by clicking the gray CodeLens buttons above the lines, in order, starting with "Begin Section" """ -# region —————————————————————————— Part 1: Ask a question about code [⌘ M] —————————————————————————— +# region —————————————————————————— Part 1: Ask a question about code [⌘ L] —————————————————————————— """Step 1: Highlight the function below""" @@ -34,14 +34,14 @@ def mysterious_function(x): return x -"""Step 2: Use the keyboard shortcut [⌘ M] to +"""Step 2: Use the keyboard shortcut [⌘ L] to select the code and toggle the Continue input box""" """Step 3: Ask a question and press Enter""" # endregion -# region ————————————————————————————————— Part 2: Edit code [⌘ ⇧ L] ————————————————————————————————— +# region ————————————————————————————————— Part 2: Edit code [⌘ I] ————————————————————————————————— """Step 1: Highlight this code""" @@ -60,7 +60,7 @@ def mysterious_function(x): return x -"""Step 2: Use the keyboard shortcut [⌘ ⇧ L] to edit""" +"""Step 2: Use the keyboard shortcut [⌘ I] to edit""" """Step 3: Type "" and press Enter""" diff --git a/extensions/vscode/package.json b/extensions/vscode/package.json index 977787e74..846ee6145 100644 --- a/extensions/vscode/package.json +++ b/extensions/vscode/package.json @@ -180,13 +180,13 @@ "keybindings": [ { "command": "continue.focusContinueInput", - "mac": "cmd+m", - "key": "ctrl+m" + "mac": "cmd+l", + "key": "ctrl+l" }, { "command": "continue.focusContinueInputWithoutClear", - "mac": "cmd+shift+m", - "key": "ctrl+shift+m" + "mac": "cmd+shift+l", + "key": "ctrl+shift+l" }, { "command": "continue.acceptDiff", @@ -206,8 +206,8 @@ }, { "command": "continue.quickEdit", - "mac": "cmd+shift+l", - "key": "ctrl+shift+l" + "mac": "cmd+i", + "key": "ctrl+i" }, { "command": "continue.toggleAuxiliaryBar", diff --git a/extensions/vscode/src/activation/inlineTips.ts b/extensions/vscode/src/activation/inlineTips.ts index 84039aaa2..001fb6c1a 100644 --- a/extensions/vscode/src/activation/inlineTips.ts +++ b/extensions/vscode/src/activation/inlineTips.ts @@ -3,7 +3,7 @@ import { getMetaKeyLabel } from "../util/util"; const inlineTipDecoration = vscode.window.createTextEditorDecorationType({ after: { - contentText: `${getMetaKeyLabel()} M to select code, ${getMetaKeyLabel()} ⇧ L to edit`, + contentText: `${getMetaKeyLabel()} L to select code, ${getMetaKeyLabel()} I to edit`, color: "#888", margin: "0 0 0 6em", fontWeight: "bold", @@ -31,7 +31,7 @@ function handleSelectionChange(e: vscode.TextEditorSelectionChangeEvent) { const line = Math.max(0, selection.start.line - 1); const hoverMarkdown = new vscode.MarkdownString( - `Use ${getMetaKeyLabel()} M to select code, or ${getMetaKeyLabel()} ⇧ L to edit highlighted code. Click [here](command:continue.hideInlineTip) if you don't want to see these inline suggestions.` + `Use ${getMetaKeyLabel()} L to select code, or ${getMetaKeyLabel()} I to edit highlighted code. Click [here](command:continue.hideInlineTip) if you don't want to see these inline suggestions.` ); hoverMarkdown.isTrusted = true; hoverMarkdown.supportHtml = true; @@ -49,7 +49,7 @@ function handleSelectionChange(e: vscode.TextEditorSelectionChangeEvent) { const emptyFileTooltipDecoration = vscode.window.createTextEditorDecorationType( { after: { - contentText: `Use ${getMetaKeyLabel()} ⇧ L to generate code`, + contentText: `Use ${getMetaKeyLabel()} I to generate code`, color: "#888", margin: "2em 0 0 0", fontStyle: "italic", diff --git a/extensions/vscode/src/lang-server/codeLens.ts b/extensions/vscode/src/lang-server/codeLens.ts index 69d2a5613..04df50e69 100644 --- a/extensions/vscode/src/lang-server/codeLens.ts +++ b/extensions/vscode/src/lang-server/codeLens.ts @@ -48,7 +48,7 @@ class VerticalPerLineCodeLensProvider implements vscode.CodeLensProvider { if (codeLenses.length === 2) { codeLenses.push( new vscode.CodeLens(range, { - title: `(${getMetaKeyLabel()}⇧↩/${getMetaKeyLabel()}⇧⌫ to accept/reject all, ${getMetaKeyLabel()}⇧L to retry)`, + title: `(${getMetaKeyLabel()}⇧↩/${getMetaKeyLabel()}⇧⌫ to accept/reject all, ${getMetaKeyLabel()}I to retry)`, command: "", }) ); diff --git a/gui/src/components/dialogs/KeyboardShortcuts.tsx b/gui/src/components/dialogs/KeyboardShortcuts.tsx index 271f7078a..55d31da50 100644 --- a/gui/src/components/dialogs/KeyboardShortcuts.tsx +++ b/gui/src/components/dialogs/KeyboardShortcuts.tsx @@ -55,18 +55,18 @@ function KeyboardShortcut(props: KeyboardShortcutProps) { const vscodeShortcuts: KeyboardShortcutProps[] = [ { - mac: "⌘ M", - windows: "⌃ M", + mac: "⌘ L", + windows: "⌃ L", description: "Ask about Highlighted Code", }, + { + mac: "⌘ I", + windows: "⌃ I", + description: "Edit highlighted code", + }, { mac: "⌘ ⇧ L", windows: "⌃ ⇧ L", - description: "Edit highlighted code", - }, - { - mac: "⌘ ⇧ M", - windows: "⌃ ⇧ M", description: "Ask Follow-Up about Highlighted Code", }, { diff --git a/gui/src/pages/gui.tsx b/gui/src/pages/gui.tsx index e2d535e48..953c62745 100644 --- a/gui/src/pages/gui.tsx +++ b/gui/src/pages/gui.tsx @@ -468,7 +468,7 @@ function GUI(props: GUIProps) { }} className="mr-auto" > - New Session ({getMetaKeyLabel()} {isJetBrains() ? "J" : "M"}) + New Session ({getMetaKeyLabel()} {isJetBrains() ? "J" : "L"}) ) : null}
    From f14d2e7b2f955f5995cd85d55e3e28ee897f943e Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Mon, 19 Feb 2024 17:42:55 -0800 Subject: [PATCH 051/141] =?UTF-8?q?=E2=9C=A8=20search=20bar=20for=20histor?= =?UTF-8?q?y=20page?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- extensions/vscode/media/welcome.md | 6 +-- gui/src/pages/history.tsx | 61 +++++++++++++++++++++++++++++- 2 files changed, 62 insertions(+), 5 deletions(-) diff --git a/extensions/vscode/media/welcome.md b/extensions/vscode/media/welcome.md index a9e7e381c..618c175ae 100644 --- a/extensions/vscode/media/welcome.md +++ b/extensions/vscode/media/welcome.md @@ -8,10 +8,10 @@ Continue is currently in the left sidebar, but we recommend moving it to the rig ## 🔑 Most important shortcuts -Cmd/Ctrl + M = Select code +Cmd/Ctrl + L = Select code -Cmd/Ctrl + Shift + M = Select code for follow-up +Cmd/Ctrl + Shift + L = Select code for follow-up -Cmd/Ctrl + Shift + L = Quick edit +Cmd/Ctrl + I = Quick edit Cmd/Ctrl + Shift + R = Automatically debug terminal diff --git a/gui/src/pages/history.tsx b/gui/src/pages/history.tsx index 585499fae..b276f1ce9 100644 --- a/gui/src/pages/history.tsx +++ b/gui/src/pages/history.tsx @@ -1,16 +1,41 @@ import { ArrowLeftIcon, TrashIcon } from "@heroicons/react/24/outline"; import { PersistedSessionInfo, SessionInfo } from "core"; +import MiniSearch from "minisearch"; import React, { Fragment, useEffect, useState } from "react"; import { useDispatch } from "react-redux"; import { useNavigate } from "react-router-dom"; import styled from "styled-components"; -import { lightGray, vscBackground, vscInputBackground } from "../components"; +import { + defaultBorderRadius, + lightGray, + vscBackground, + vscBadgeBackground, + vscForeground, + vscInputBackground, +} from "../components"; import HeaderButtonWithText from "../components/HeaderButtonWithText"; import useHistory from "../hooks/useHistory"; import { useNavigationListener } from "../hooks/useNavigationListener"; import { newSession } from "../redux/slices/stateSlice"; import { getFontSize } from "../util"; +const SearchBar = styled.input` + padding: 4px 8px; + border-radius: ${defaultBorderRadius}; + border: 0.5px solid #888; + outline: none; + width: 90vw; + max-width: 500px; + margin: 8px auto; + display: block; + background-color: ${vscInputBackground}; + color: ${vscForeground}; + &:focus { + border: 0.5px solid ${vscBadgeBackground}; + outline: none; + } +`; + const Tr = styled.tr` &:hover { background-color: ${vscInputBackground}; @@ -149,15 +174,38 @@ function History() { const dispatch = useDispatch(); const { getHistory } = useHistory(dispatch); + const [minisearch, setMinisearch] = useState< + MiniSearch<{ title: string; sessionId: string }> + >( + new MiniSearch({ + fields: ["title"], + storeFields: ["title", "sessionId", "id"], + }) + ); + const [searchTerm, setSearchTerm] = useState(""); + useEffect(() => { const fetchSessions = async () => { const sessions = await getHistory(); setSessions(sessions); + minisearch.addAll( + sessions.map((session) => ({ + title: session.title, + sessionId: session.sessionId, + id: session.sessionId, + })) + ); }; fetchSessions(); }, []); useEffect(() => { + const sessionIds = minisearch + .search(searchTerm, { + fuzzy: 0.1, + }) + .map((result) => result.id); + setFilteredAndSortedSessions( sessions .filter((session) => { @@ -170,13 +218,17 @@ function History() { } return workspacePaths.includes(session.workspaceDirectory); }) + // Filter by search term + .filter((session) => { + return searchTerm === "" || sessionIds.includes(session.sessionId); + }) .sort( (a, b) => parseDate(b.dateCreated).getTime() - parseDate(a.dateCreated).getTime() ) ); - }, [filteringByWorkspace, sessions]); + }, [filteringByWorkspace, sessions, searchTerm, minisearch]); useEffect(() => { setHeaderHeight(stickyHistoryHeaderRef.current?.clientHeight || 100); @@ -236,6 +288,11 @@ function History() { )}
    + setSearchTerm(e.target.value)} + /> {filteredAndSortedSessions.map((session, index) => { From 21981156f8eca6a74d0da48b53b6cebafdb8bf48 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Mon, 19 Feb 2024 19:10:48 -0800 Subject: [PATCH 052/141] =?UTF-8?q?=F0=9F=92=84=20smaller=20help=20iconds?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gui/src/pages/help.tsx | 41 ++++++++++++++++++++++++++++++++--------- 1 file changed, 32 insertions(+), 9 deletions(-) diff --git a/gui/src/pages/help.tsx b/gui/src/pages/help.tsx index a4b4cf0ec..11fb045d8 100644 --- a/gui/src/pages/help.tsx +++ b/gui/src/pages/help.tsx @@ -6,14 +6,28 @@ import KeyboardShortcutsDialog from "../components/dialogs/KeyboardShortcuts"; import { useNavigationListener } from "../hooks/useNavigationListener"; import { postToIde } from "../util/ide"; +const ResourcesDiv = styled.div` + margin: 4px; + border-top: 0.5px solid ${lightGray}; + border-bottom: 0.5px solid ${lightGray}; +`; + const IconDiv = styled.div<{ backgroundColor?: string }>` display: flex; align-items: center; justify-content: center; cursor: pointer; - height: 100%; - padding: 0 4px; + padding: 12px; + + & > a { + color: ${vscForeground}; + text-decoration: none; + display: flex; + align-items: center; + width: 100%; + justify-content: center; + } &:hover { background-color: ${(props) => props.backgroundColor || lightGray}; @@ -37,7 +51,7 @@ function HelpPage() { const navigate = useNavigate(); return ( -
    +
    -
    +

    Resources

    + + Demo Video @@ -83,25 +100,29 @@ function HelpPage() { target="_blank" > + Documentation + Continue Discord @@ -110,16 +131,18 @@ function HelpPage() { target="_blank" > + GitHub Issues -
    +
    From e8bbdc06a192a9d6576b7019a164393c16019306 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Mon, 19 Feb 2024 19:50:01 -0800 Subject: [PATCH 053/141] =?UTF-8?q?=F0=9F=90=9B=20use=20llama=20tokenizer?= =?UTF-8?q?=20for=20llama-based=20models?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/autocomplete/constructPrompt.ts | 11 ++-- core/indexing/chunk/basic.ts | 2 +- core/indexing/chunk/chunk.ts | 4 +- core/indexing/chunk/code.ts | 7 +-- core/indexing/chunk/markdown.ts | 5 +- core/llm/countTokens.ts | 53 ++++++++++++++----- core/package-lock.json | 6 +++ core/package.json | 1 + core/yarn.lock | 5 ++ extensions/vscode/package-lock.json | 1 + .../src/lang-server/completionProvider.ts | 5 +- extensions/vscode/yarn.lock | 1 + gui/package-lock.json | 1 + 13 files changed, 70 insertions(+), 32 deletions(-) diff --git a/core/autocomplete/constructPrompt.ts b/core/autocomplete/constructPrompt.ts index 29e0a38a7..dea714b2f 100644 --- a/core/autocomplete/constructPrompt.ts +++ b/core/autocomplete/constructPrompt.ts @@ -76,7 +76,8 @@ export async function constructAutocompletePrompt( line: number, character: number ) => Promise, - options: TabAutocompleteOptions + options: TabAutocompleteOptions, + modelName: string ): Promise<{ prefix: string; suffix: string; useFim: boolean }> { // Find external snippets const snippets: AutocompleteSnippet[] = []; @@ -121,17 +122,17 @@ export async function constructAutocompletePrompt( .join("\n"); const maxPrefixTokens = options.maxPromptTokens * options.prefixPercentage - - countTokens(formattedSnippets, "gpt-4"); - let prefix = pruneLinesFromTop(fullPrefix, maxPrefixTokens); + countTokens(formattedSnippets, modelName); + let prefix = pruneLinesFromTop(fullPrefix, maxPrefixTokens, modelName); if (formattedSnippets.length > 0) { prefix = formattedSnippets + "\n" + prefix; } const maxSuffixTokens = Math.min( - options.maxPromptTokens - countTokens(prefix, "gpt-4"), + options.maxPromptTokens - countTokens(prefix, modelName), options.maxSuffixPercentage * options.maxPromptTokens ); - let suffix = pruneLinesFromBottom(fullSuffix, maxSuffixTokens); + let suffix = pruneLinesFromBottom(fullSuffix, maxSuffixTokens, modelName); return { prefix, suffix, useFim: true }; } diff --git a/core/indexing/chunk/basic.ts b/core/indexing/chunk/basic.ts index 60bda5995..e0e506a90 100644 --- a/core/indexing/chunk/basic.ts +++ b/core/indexing/chunk/basic.ts @@ -11,7 +11,7 @@ export function* basicChunker( let currLine = 0; for (const line of contents.split("\n")) { - const lineTokens = countTokens(line, "gpt-4"); + const lineTokens = countTokens(line); if (chunkTokens + lineTokens > maxChunkSize - 5) { yield { content: chunkContent, startLine, endLine: currLine - 1 }; chunkContent = ""; diff --git a/core/indexing/chunk/chunk.ts b/core/indexing/chunk/chunk.ts index bfb33eb5c..0132bc08d 100644 --- a/core/indexing/chunk/chunk.ts +++ b/core/indexing/chunk/chunk.ts @@ -43,11 +43,11 @@ export async function* chunkDocument( contents, maxChunkSize )) { - if (countTokens(chunkWithoutId.content, "gpt-4") > MAX_CHUNK_SIZE) { + if (countTokens(chunkWithoutId.content) > MAX_CHUNK_SIZE) { console.warn( `Chunk with more than ${maxChunkSize} tokens constructed: `, filepath, - countTokens(chunkWithoutId.content, "gpt-4") + countTokens(chunkWithoutId.content) ); continue; } diff --git a/core/indexing/chunk/code.ts b/core/indexing/chunk/code.ts index b9862c634..b7527d422 100644 --- a/core/indexing/chunk/code.ts +++ b/core/indexing/chunk/code.ts @@ -59,10 +59,7 @@ function collapseChildren( } code = code.slice(node.startIndex); let removedChild = false; - while ( - countTokens(code, "gpt-4") > maxChunkSize && - collapsedChildren.length > 0 - ) { + while (countTokens(code) > maxChunkSize && collapsedChildren.length > 0) { removedChild = true; // Remove children starting at the end - TODO: Add multiple chunks so no children are missing const childCode = collapsedChildren.pop()!; @@ -169,7 +166,7 @@ function* getSmartCollapsedChunks( // Keep entire text if not over size if ( (root || node.type in collapsedNodeConstructors) && - countTokens(node.text, "gpt-4") < maxChunkSize + countTokens(node.text) < maxChunkSize ) { yield { content: node.text, diff --git a/core/indexing/chunk/markdown.ts b/core/indexing/chunk/markdown.ts index 0e0901cf0..252d43f5e 100644 --- a/core/indexing/chunk/markdown.ts +++ b/core/indexing/chunk/markdown.ts @@ -57,7 +57,7 @@ export async function* markdownChunker( maxChunkSize: number, hLevel: number ): AsyncGenerator { - if (countTokens(content, "gpt-4") <= maxChunkSize) { + if (countTokens(content) <= maxChunkSize) { const header = findHeader(content.split("\n")); yield { content, @@ -122,8 +122,7 @@ export async function* markdownChunker( for (const section of sections) { for await (const chunk of markdownChunker( section.content, - maxChunkSize - - (section.header ? countTokens(section.header, "gpt-4") : 0), + maxChunkSize - (section.header ? countTokens(section.header) : 0), hLevel + 1 )) { yield { diff --git a/core/llm/countTokens.ts b/core/llm/countTokens.ts index 6283ad782..fddbee08a 100644 --- a/core/llm/countTokens.ts +++ b/core/llm/countTokens.ts @@ -1,16 +1,29 @@ -import { encodingForModel as _encodingForModel, Tiktoken } from "js-tiktoken"; +import { Tiktoken, encodingForModel as _encodingForModel } from "js-tiktoken"; +// @ts-expect-error +import llamaTokenizer from "llama-tokenizer-js"; import { ChatMessage, MessageContent, MessagePart } from ".."; +import { autodetectTemplateType } from "./autodetect"; import { TOKEN_BUFFER_FOR_SAFETY } from "./constants"; -let encoding: Tiktoken | null = null; +interface Encoding { + encode: Tiktoken["encode"]; + decode: Tiktoken["decode"]; +} -function encodingForModel(modelName: string): Tiktoken { - if (encoding) { - return encoding; +let gptEncoding: Encoding | null = null; + +function encodingForModel(modelName: string): Encoding { + const modelType = autodetectTemplateType(modelName); + + if (!modelType || modelType === "none") { + if (!gptEncoding) { + gptEncoding = _encodingForModel("gpt-4"); + } + + return gptEncoding; } - encoding = _encodingForModel("gpt-4"); - return encoding; + return llamaTokenizer; } function countImageTokens(content: MessagePart): number { @@ -21,7 +34,11 @@ function countImageTokens(content: MessagePart): number { } } -function countTokens(content: MessageContent, modelName: string): number { +function countTokens( + content: MessageContent, + // defaults to llama2 because the tokenizer tends to produce more tokens + modelName: string = "llama2" +): number { const encoding = encodingForModel(modelName); if (Array.isArray(content)) { return content.reduce((acc, part) => { @@ -72,21 +89,29 @@ function countChatMessageTokens( return countTokens(chatMessage.content, modelName) + TOKENS_PER_MESSAGE; } -function pruneLinesFromTop(prompt: string, maxTokens: number): string { - let totalTokens = countTokens(prompt, "gpt-4"); +function pruneLinesFromTop( + prompt: string, + maxTokens: number, + modelName: string +): string { + let totalTokens = countTokens(prompt, modelName); const lines = prompt.split("\n"); while (totalTokens > maxTokens && lines.length > 0) { - totalTokens -= countTokens(lines.shift()!, "gpt-4"); + totalTokens -= countTokens(lines.shift()!, modelName); } return lines.join("\n"); } -function pruneLinesFromBottom(prompt: string, maxTokens: number): string { - let totalTokens = countTokens(prompt, "gpt-4"); +function pruneLinesFromBottom( + prompt: string, + maxTokens: number, + modelName: string +): string { + let totalTokens = countTokens(prompt, modelName); const lines = prompt.split("\n"); while (totalTokens > maxTokens && lines.length > 0) { - totalTokens -= countTokens(lines.pop()!, "gpt-4"); + totalTokens -= countTokens(lines.pop()!, modelName); } return lines.join("\n"); diff --git a/core/package-lock.json b/core/package-lock.json index 661225ff3..f8bac68aa 100644 --- a/core/package-lock.json +++ b/core/package-lock.json @@ -21,6 +21,7 @@ "http-proxy-agent": "^7.0.1", "https-proxy-agent": "^7.0.3", "js-tiktoken": "^1.0.8", + "llama-tokenizer-js": "^1.1.3", "llm-code-highlighter": "^0.0.9", "node-fetch": "^3.3.2", "node-html-markdown": "^1.3.0", @@ -4840,6 +4841,11 @@ "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", "dev": true }, + "node_modules/llama-tokenizer-js": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/llama-tokenizer-js/-/llama-tokenizer-js-1.1.3.tgz", + "integrity": "sha512-+BUgsLCXVQJkjiD/t7PdESLn+yXJIRX/BJfwzVVYfKZ9aN3gsP9xoadBZxKnCxGz2Slby+S7x41gUr2TKNaS4Q==" + }, "node_modules/llm-code-highlighter": { "version": "0.0.9", "resolved": "https://registry.npmjs.org/llm-code-highlighter/-/llm-code-highlighter-0.0.9.tgz", diff --git a/core/package.json b/core/package.json index 0de36ab6f..bbee1eec2 100644 --- a/core/package.json +++ b/core/package.json @@ -31,6 +31,7 @@ "http-proxy-agent": "^7.0.1", "https-proxy-agent": "^7.0.3", "js-tiktoken": "^1.0.8", + "llama-tokenizer-js": "^1.1.3", "llm-code-highlighter": "^0.0.9", "node-fetch": "^3.3.2", "node-html-markdown": "^1.3.0", diff --git a/core/yarn.lock b/core/yarn.lock index e62426b85..eeb4d4a45 100644 --- a/core/yarn.lock +++ b/core/yarn.lock @@ -2745,6 +2745,11 @@ lines-and-columns@^1.1.6: resolved "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz" integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg== +llama-tokenizer-js@^1.1.3: + version "1.1.3" + resolved "https://registry.npmjs.org/llama-tokenizer-js/-/llama-tokenizer-js-1.1.3.tgz" + integrity sha512-+BUgsLCXVQJkjiD/t7PdESLn+yXJIRX/BJfwzVVYfKZ9aN3gsP9xoadBZxKnCxGz2Slby+S7x41gUr2TKNaS4Q== + llm-code-highlighter@^0.0.9: version "0.0.9" resolved "https://registry.npmjs.org/llm-code-highlighter/-/llm-code-highlighter-0.0.9.tgz" diff --git a/extensions/vscode/package-lock.json b/extensions/vscode/package-lock.json index 095f3f786..a859fd72b 100644 --- a/extensions/vscode/package-lock.json +++ b/extensions/vscode/package-lock.json @@ -97,6 +97,7 @@ "http-proxy-agent": "^7.0.1", "https-proxy-agent": "^7.0.3", "js-tiktoken": "^1.0.8", + "llama-tokenizer-js": "^1.1.3", "llm-code-highlighter": "^0.0.9", "node-fetch": "^3.3.2", "node-html-markdown": "^1.3.0", diff --git a/extensions/vscode/src/lang-server/completionProvider.ts b/extensions/vscode/src/lang-server/completionProvider.ts index 626899754..4cde62277 100644 --- a/extensions/vscode/src/lang-server/completionProvider.ts +++ b/extensions/vscode/src/lang-server/completionProvider.ts @@ -275,8 +275,9 @@ export class ContinueCompletionProvider fullSuffix, clipboardText, lang, - this.promptBuilder.getDefinition, - options + this.promptBuilder.getDefinition.bind(this.promptBuilder), + options, + llm.model ); const { template, completionOptions } = options.template diff --git a/extensions/vscode/yarn.lock b/extensions/vscode/yarn.lock index 8514c2ac5..25d57981f 100644 --- a/extensions/vscode/yarn.lock +++ b/extensions/vscode/yarn.lock @@ -2328,6 +2328,7 @@ core-util-is@1.0.2: http-proxy-agent "^7.0.1" https-proxy-agent "^7.0.3" js-tiktoken "^1.0.8" + llama-tokenizer-js "^1.1.3" llm-code-highlighter "^0.0.9" node-fetch "^3.3.2" node-html-markdown "^1.3.0" diff --git a/gui/package-lock.json b/gui/package-lock.json index d323c6c75..08ee5adff 100644 --- a/gui/package-lock.json +++ b/gui/package-lock.json @@ -85,6 +85,7 @@ "http-proxy-agent": "^7.0.1", "https-proxy-agent": "^7.0.3", "js-tiktoken": "^1.0.8", + "llama-tokenizer-js": "^1.1.3", "llm-code-highlighter": "^0.0.9", "node-fetch": "^3.3.2", "node-html-markdown": "^1.3.0", From 82f6796d7957f1605110f67dcaf390e9fb5bff33 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Mon, 19 Feb 2024 20:06:52 -0800 Subject: [PATCH 054/141] =?UTF-8?q?=F0=9F=92=84=20ui=20to=20pause=20indexi?= =?UTF-8?q?ng?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../loaders/IndexingProgressBar.tsx | 70 +++++++++++++++---- 1 file changed, 55 insertions(+), 15 deletions(-) diff --git a/gui/src/components/loaders/IndexingProgressBar.tsx b/gui/src/components/loaders/IndexingProgressBar.tsx index c0d140d79..29674e271 100644 --- a/gui/src/components/loaders/IndexingProgressBar.tsx +++ b/gui/src/components/loaders/IndexingProgressBar.tsx @@ -1,7 +1,17 @@ +import { useState } from "react"; import ReactDOM from "react-dom"; import styled from "styled-components"; import { StyledTooltip, lightGray, vscForeground } from ".."; +const DIAMETER = 6; +const CircleDiv = styled.div` + background-color: #bb0; + box-shadow: 0px 0px 2px 1px #bb0; + width: ${DIAMETER}px; + height: ${DIAMETER}px; + border-radius: ${DIAMETER / 2}px; +`; + const ProgressBarWrapper = styled.div` width: 100px; height: 6px; @@ -52,22 +62,52 @@ const IndexingProgressBar = ({ const tooltipPortalDiv = document.getElementById("tooltip-portal-div"); + const [expanded, setExpanded] = useState(true); + const [hovered, setHovered] = useState(false); + return ( - <> - - - - -

    Indexing ({Math.trunc((completed / total) * 100)}%)

    -
    - {tooltipPortalDiv && - ReactDOM.createPortal( - - {currentlyIndexing} - , - tooltipPortalDiv - )} - +
    setExpanded((prev) => !prev)} + className="cursor-pointer" + > + {expanded ? ( + <> + setHovered(true)} + onMouseLeave={() => setHovered(false)} + > + + + +

    + {hovered + ? "Click to pause" + : `Indexing (${Math.trunc((completed / total) * 100)}%)`} +

    +
    + {tooltipPortalDiv && + ReactDOM.createPortal( + + {currentlyIndexing} + , + tooltipPortalDiv + )} + + ) : ( + <> + + {tooltipPortalDiv && + ReactDOM.createPortal( + + Click to unpause indexing ( + {Math.trunc((completed / total) * 100)}%) + , + tooltipPortalDiv + )} + + )} +
    ); }; From d2bcd081b32d26c31cc676b0586648f03a0e53e4 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Mon, 19 Feb 2024 22:10:10 -0800 Subject: [PATCH 055/141] =?UTF-8?q?=E2=9A=A1=EF=B8=8F=20run=20transformers?= =?UTF-8?q?.js=20in=20a=20worker=20thread?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../TransformersJsEmbeddingsProvider.ts | 73 ++++++------------- .../embeddings/TransformersJsWorkerThread.js | 58 +++++++++++++++ core/protocol.ts | 2 +- core/tsconfig.json | 2 +- gui/src/redux/slices/serverStateReducer.ts | 4 +- 5 files changed, 82 insertions(+), 57 deletions(-) create mode 100644 core/indexing/embeddings/TransformersJsWorkerThread.js diff --git a/core/indexing/embeddings/TransformersJsEmbeddingsProvider.ts b/core/indexing/embeddings/TransformersJsEmbeddingsProvider.ts index 4773e6f0b..e959b699f 100644 --- a/core/indexing/embeddings/TransformersJsEmbeddingsProvider.ts +++ b/core/indexing/embeddings/TransformersJsEmbeddingsProvider.ts @@ -1,37 +1,12 @@ -import { - PipelineType, - env, - pipeline, -} from "../../vendor/node_modules/@xenova/transformers"; - +import { Worker } from "worker_threads"; import BaseEmbeddingsProvider from "./BaseEmbeddingsProvider"; -env.allowLocalModels = true; -env.allowRemoteModels = false; -if (typeof window === "undefined") { - // The embeddings provider should just never be called in the browser - env.localModelPath = `${__dirname}/../models`; -} - -class EmbeddingsPipeline { - static task: PipelineType = "feature-extraction"; - static model = "all-MiniLM-L6-v2"; - static instance: any | null = null; - - static async getInstance() { - if (this.instance === null) { - this.instance = await pipeline(this.task, this.model); - } - - return this.instance; - } -} - class TransformersJsEmbeddingsProvider extends BaseEmbeddingsProvider { static MaxGroupSize: number = 4; + static ModelName: string = "all-MiniLM-L2-v6"; constructor() { - super({ model: "all-MiniLM-L2-v6" }); + super({ model: TransformersJsEmbeddingsProvider.ModelName }); } get id(): string { @@ -39,33 +14,27 @@ class TransformersJsEmbeddingsProvider extends BaseEmbeddingsProvider { } async embed(chunks: string[]) { - let extractor = await EmbeddingsPipeline.getInstance(); + return new Promise((resolve, reject) => { + const worker = new Worker("./TransformersJsWorkerThread.js"); - if (!extractor) { - throw new Error("TransformerJS embeddings pipeline is not initialized"); - } + worker.postMessage(chunks); - if (chunks.length === 0) { - return []; - } - - let outputs = []; - for ( - let i = 0; - i < chunks.length; - i += TransformersJsEmbeddingsProvider.MaxGroupSize - ) { - let chunkGroup = chunks.slice( - i, - i + TransformersJsEmbeddingsProvider.MaxGroupSize - ); - let output = await extractor(chunkGroup, { - pooling: "mean", - normalize: true, + worker.on("message", (result) => { + if (result.error) { + reject(new Error(result.error)); + } else { + resolve(result); + } }); - outputs.push(...output.tolist()); - } - return outputs; + + worker.on("error", reject); + + worker.on("exit", (code) => { + if (code !== 0) { + reject(new Error(`Worker stopped with exit code ${code}`)); + } + }); + }) as any; } } diff --git a/core/indexing/embeddings/TransformersJsWorkerThread.js b/core/indexing/embeddings/TransformersJsWorkerThread.js new file mode 100644 index 000000000..775e16a05 --- /dev/null +++ b/core/indexing/embeddings/TransformersJsWorkerThread.js @@ -0,0 +1,58 @@ +import { + env, + pipeline, +} from "../../vendor/node_modules/@xenova/transformers/types/transformers"; +import TransformersJsEmbeddingsProvider from "./TransformersJsEmbeddingsProvider"; +const { parentPort } = require("worker_threads"); + +env.allowLocalModels = true; +env.allowRemoteModels = false; +if (typeof window === "undefined") { + // The embeddings provider should just never be called in the browser + env.localModelPath = `${__dirname}/../models`; +} + +class EmbeddingsPipeline { + static task = "feature-extraction"; + static model = TransformersJsEmbeddingsProvider.ModelName; + static instance = null; + + static async getInstance() { + if (this.instance === null) { + this.instance = await pipeline(this.task, this.model); + } + + return this.instance; + } +} + +parentPort.on("message", async (chunks) => { + try { + const extractor = await EmbeddingsPipeline.getInstance(); + + if (!extractor) { + throw new Error("TransformerJS embeddings pipeline is not initialized"); + } + + let outputs = []; + for ( + let i = 0; + i < chunks.length; + i += TransformersJsEmbeddingsProvider.MaxGroupSize + ) { + let chunkGroup = chunks.slice( + i, + i + TransformersJsEmbeddingsProvider.MaxGroupSize + ); + let output = await extractor(chunkGroup, { + pooling: "mean", + normalize: true, + }); + outputs.push(...output.tolist()); + } + + parentPort.postMessage(outputs); + } catch (error) { + parentPort.postMessage({ error: error.message }); + } +}); diff --git a/core/protocol.ts b/core/protocol.ts index a0259393d..4247291e9 100644 --- a/core/protocol.ts +++ b/core/protocol.ts @@ -1,4 +1,5 @@ import { + BrowserSerializedContinueConfig, ChatMessage, ContextItemWithId, ContextSubmenuItem, @@ -9,7 +10,6 @@ import { SerializedContinueConfig, SessionInfo, } from "."; -import { BrowserSerializedContinueConfig } from "./config/load"; export type ProtocolGeneratorType = AsyncGenerator<{ done?: boolean; diff --git a/core/tsconfig.json b/core/tsconfig.json index c92ea029b..26315457b 100644 --- a/core/tsconfig.json +++ b/core/tsconfig.json @@ -18,5 +18,5 @@ "noEmitOnError": false, "types": ["jest", "node"] }, - "include": ["./**/*.ts"] + "include": ["./**/*.ts", "indexing/embeddings/TransformersJsWorkerThread.js"] } diff --git a/gui/src/redux/slices/serverStateReducer.ts b/gui/src/redux/slices/serverStateReducer.ts index ae3eaf8c6..77b6cf795 100644 --- a/gui/src/redux/slices/serverStateReducer.ts +++ b/gui/src/redux/slices/serverStateReducer.ts @@ -1,5 +1,4 @@ import { createSlice } from "@reduxjs/toolkit"; -import TransformersJsEmbeddingsProvider from "core/indexing/embeddings/TransformersJsEmbeddingsProvider"; import FreeTrial from "core/llm/llms/FreeTrial"; import { RootStore } from "../store"; @@ -27,8 +26,7 @@ const initialState: RootStore["serverState"] = { new FreeTrial({ model: "gpt-4" }), new FreeTrial({ model: "gpt-3.5-turbo" }), ], - embeddingsProvider: new TransformersJsEmbeddingsProvider(), - }, + } as any, contextProviders: [], savedContextGroups: [], indexingProgress: 1.0, From c2a7f7c5acd308e92d5edf249fbdd72f110f24e2 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Tue, 20 Feb 2024 14:47:42 -0800 Subject: [PATCH 056/141] =?UTF-8?q?=F0=9F=90=9B=20disable=20off-screen=20r?= =?UTF-8?q?endering=20in=20intellij=20webview=20(fixes=20korean=20input)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../toolWindow/ContinuePluginToolWindowFactory.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/toolWindow/ContinuePluginToolWindowFactory.kt b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/toolWindow/ContinuePluginToolWindowFactory.kt index 681c14bb7..e13c74698 100644 --- a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/toolWindow/ContinuePluginToolWindowFactory.kt +++ b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/toolWindow/ContinuePluginToolWindowFactory.kt @@ -76,11 +76,11 @@ class ContinuePluginToolWindowFactory : ToolWindowFactory, DumbAware { init { System.setProperty("ide.browser.jcef.jsQueryPoolSize", JS_QUERY_POOL_SIZE) -// System.setProperty("ide.browser.jcef.osr.enabled", "true") + System.setProperty("ide.browser.jcef.osr.enabled", "false") } val webView: JBCefBrowser by lazy { - val browser = JBCefBrowser() + val browser = JBCefBrowser.createBuilder().setOffScreenRendering(false).build() browser.jbCefClient.setProperty( JBCefClient.Properties.JS_QUERY_POOL_SIZE, JS_QUERY_POOL_SIZE @@ -88,6 +88,7 @@ class ContinuePluginToolWindowFactory : ToolWindowFactory, DumbAware { registerAppSchemeHandler() browser.loadURL("http://continue/index.html") +// browser.loadHTML("") // browser.loadURL("http://localhost:5173/index.html") Disposer.register(project, browser) From 17bd6d2771ebc1bda9ef463e29addc1b241c5090 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Tue, 20 Feb 2024 14:58:20 -0800 Subject: [PATCH 057/141] =?UTF-8?q?=F0=9F=90=9B=20fix=20errorPopup=20handl?= =?UTF-8?q?ing?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../continueintellijextension/continue/IdeProtocolClient.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 144027ed4..0c0f049d4 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 @@ -333,7 +333,9 @@ class IdeProtocolClient ( // Running commands not yet supported in JetBrains } "errorPopup" -> { - showMessage(data as String) + val data = data as Map + val message = data["message"] as String + showMessage(message) respond(null) } From bc40ef92f8ff78cb7419755abd887a6ad2d2a517 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Tue, 20 Feb 2024 15:11:14 -0800 Subject: [PATCH 058/141] =?UTF-8?q?=F0=9F=94=96=20update=20intellij=20vers?= =?UTF-8?q?ion?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- extensions/intellij/gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/intellij/gradle.properties b/extensions/intellij/gradle.properties index 97afe4e9e..652a008c3 100644 --- a/extensions/intellij/gradle.properties +++ b/extensions/intellij/gradle.properties @@ -4,7 +4,7 @@ pluginGroup = com.github.continuedev.continueintellijextension pluginName = continue-intellij-extension pluginRepositoryUrl = https://github.com/continuedev/continue # SemVer format -> https://semver.org -pluginVersion = 0.0.29 +pluginVersion = 0.0.31 # Supported build number ranges and IntelliJ Platform versions -> https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html pluginSinceBuild = 223 From f4a749f35152f410cef3c1042074918370eb9e5d Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Tue, 20 Feb 2024 15:55:43 -0800 Subject: [PATCH 059/141] =?UTF-8?q?=F0=9F=90=9B=20set=20proper=20permissio?= =?UTF-8?q?ns?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- extensions/intellij/gradle.properties | 2 +- .../continue/CoreMessenger.kt | 29 +++++++++++++++++++ 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/extensions/intellij/gradle.properties b/extensions/intellij/gradle.properties index 652a008c3..9b55bff67 100644 --- a/extensions/intellij/gradle.properties +++ b/extensions/intellij/gradle.properties @@ -4,7 +4,7 @@ pluginGroup = com.github.continuedev.continueintellijextension pluginName = continue-intellij-extension pluginRepositoryUrl = https://github.com/continuedev/continue # SemVer format -> https://semver.org -pluginVersion = 0.0.31 +pluginVersion = 0.0.32 # Supported build number ranges and IntelliJ Platform versions -> https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html pluginSinceBuild = 223 diff --git a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/CoreMessenger.kt b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/CoreMessenger.kt index 8e3524c34..413713b72 100644 --- a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/CoreMessenger.kt +++ b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/CoreMessenger.kt @@ -6,6 +6,9 @@ import java.io.OutputStreamWriter import java.io.* import com.google.gson.Gson +import java.nio.file.Files +import java.nio.file.Paths +import java.nio.file.attribute.PosixFilePermission class CoreMessenger(continueCorePath: String, ideProtocolClient: IdeProtocolClient) { private val writer: OutputStreamWriter @@ -106,7 +109,33 @@ class CoreMessenger(continueCorePath: String, ideProtocolClient: IdeProtocolClie "getIdeInfo" ) + private fun setPermissions(destination: String) { + val osName = System.getProperty("os.name").toLowerCase() + if (osName.contains("mac") || osName.contains("darwin")) { + ProcessBuilder( + "xattr", + "-dr", + "com.apple.quarantine", + destination + ).start() + setFilePermissions(destination, "rwxr-xr-x") + } else if (osName.contains("nix") || osName.contains("nux") || osName.contains("mac")) { + setFilePermissions(destination, "rwxr-xr-x") + } + } + + private fun setFilePermissions(path: String, posixPermissions: String) { + val perms = HashSet() + if (posixPermissions.contains("r")) perms.add(PosixFilePermission.OWNER_READ) + if (posixPermissions.contains("w")) perms.add(PosixFilePermission.OWNER_WRITE) + if (posixPermissions.contains("x")) perms.add(PosixFilePermission.OWNER_EXECUTE) + Files.setPosixFilePermissions(Paths.get(path), perms) + } + init { + // Set proper permissions + setPermissions(continueCorePath) + // Start the subprocess val processBuilder = ProcessBuilder(continueCorePath) process = processBuilder.start() From d0c55edbc5146749ce270b42ab7861b8e85218cd Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Wed, 21 Feb 2024 13:44:21 -0800 Subject: [PATCH 060/141] =?UTF-8?q?=F0=9F=92=84=20ask=20anything?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gui/src/components/mainInput/TipTapEditor.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gui/src/components/mainInput/TipTapEditor.tsx b/gui/src/components/mainInput/TipTapEditor.tsx index 591b59a01..c869ff618 100644 --- a/gui/src/components/mainInput/TipTapEditor.tsx +++ b/gui/src/components/mainInput/TipTapEditor.tsx @@ -235,7 +235,7 @@ function TipTapEditor(props: TipTapEditorProps) { Placeholder.configure({ placeholder: () => historyLengthRef.current === 0 - ? "Ask a question, '/' for slash commands, '@' to add context" + ? "Ask anything, '/' for slash commands, '@' to add context" : "Ask a follow-up", }), Paragraph.extend({ From 10b987ec24160e97325484f28744ab65fc4781d4 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Wed, 21 Feb 2024 19:01:33 -0800 Subject: [PATCH 061/141] =?UTF-8?q?=F0=9F=91=B7=20download=20esbuild=20bin?= =?UTF-8?q?aries=20to=20out=20dir=20for=20pkg?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/build.js | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/pkg/build.js b/pkg/build.js index ab0db2c14..89d1352cd 100644 --- a/pkg/build.js +++ b/pkg/build.js @@ -34,8 +34,8 @@ const targetToLanceDb = { // Copy node_modules for pre-built binaries const DYNAMIC_IMPORTS = [ - // "esbuild", - // "@esbuild", + "esbuild", + "@esbuild", // // "@lancedb", // "posthog-node", // "@octokit", @@ -84,6 +84,29 @@ const targetToLanceDb = { } } + console.log("[info] Downloading prebuilt esbuild..."); + const esbuildDir = "out/node_modules/@esbuild"; + for (const target of targets) { + const targetDir = `${esbuildDir}/${target}`; + + console.log(`[info] Downloading ${target}...`); + fs.mkdirSync(`${targetDir}/bin`, { + recursive: true, + }); + execSync( + `curl -o ${esbuildDir}/esbuild.tgz https://registry.npmjs.org/@esbuild/${target}/-/${target}-0.19.11.tgz` + ); + execSync(`tar -xzvf ${esbuildDir}/esbuild.tgz -C ${esbuildDir}`); + await new Promise((resolve) => + ncp(`${esbuildDir}/package`, targetDir, resolve) + ); + fs.rmSync(`${esbuildDir}/esbuild.tgz`); + fs.rmSync(`${esbuildDir}/package`, { + force: true, + recursive: true, + }); + } + console.log("[info] Building with esbuild..."); // Bundles the extension into one file await esbuild.build({ From c9c1a20f5188b7fd816f3d52b2ea83330f030983 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Wed, 21 Feb 2024 23:21:48 -0800 Subject: [PATCH 062/141] =?UTF-8?q?=F0=9F=91=B7=20package=20esbuild=20bina?= =?UTF-8?q?ry=20along=20with=20pkg?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/config/load.ts | 73 ++++++++++++++++++++++++++++--------- core/util/paths.ts | 8 +--- extensions/vscode/yarn.lock | 5 --- pkg/build.js | 61 ++++++++++++++----------------- pkg/src/index.ts | 1 + 5 files changed, 87 insertions(+), 61 deletions(-) diff --git a/core/config/load.ts b/core/config/load.ts index d230916bb..fcd3545bc 100644 --- a/core/config/load.ts +++ b/core/config/load.ts @@ -1,4 +1,5 @@ import * as fs from "fs"; +import path from "path"; import { BaseCompletionOptions, Config, @@ -16,7 +17,6 @@ import { SlashCommand, SlashCommandDescription, } from ".."; - import { slashCommandFromDescription, slashFromCustomCommand, @@ -36,6 +36,7 @@ import { getConfigTsPath, migrate, } from "../util/paths"; +const { execSync } = require("child_process"); function loadSerializedConfig( workspaceConfigs: ContinueRcJson[], @@ -323,24 +324,62 @@ function finalToBrowserConfig( }; } -async function buildConfigTs(browser: boolean) { +function getTarget() { + const os = + { + aix: "linux", + darwin: "darwin", + freebsd: "linux", + linux: "linux", + openbsd: "linux", + sunos: "linux", + win32: "win32", + }[process.platform as string] ?? "linux"; + const arch = { + arm: "arm64", + arm64: "arm64", + ia32: "x64", + loong64: "arm64", + mips: "arm64", + mipsel: "arm64", + ppc: "x64", + ppc64: "x64", + riscv64: "arm64", + s390: "x64", + s390x: "x64", + x64: "x64", + }[process.arch]; + + return `${os}-${arch}`; +} + +async function buildConfigTs() { if (!fs.existsSync(getConfigTsPath())) { return undefined; } try { - // Dynamic import esbuild so potentially disastrous errors can be caught - const esbuild = require("esbuild"); + if (process.env.IS_BINARY === "true") { + execSync( + path.dirname(process.execPath) + + `/esbuild${ + getTarget().startsWith("win32") ? ".exe" : "" + } ${getConfigTsPath()} --bundle --outfile=${getConfigJsPath()} --platform=node --format=cjs --sourcemap --external:fetch --external:fs --external:path --external:os --external:child_process` + ); + } else { + // Dynamic import esbuild so potentially disastrous errors can be caught + const esbuild = require("esbuild"); - await esbuild.build({ - entryPoints: [getConfigTsPath()], - bundle: true, - platform: browser ? "browser" : "node", - format: browser ? "esm" : "cjs", - outfile: getConfigJsPath(!browser), - external: ["fetch", "fs", "path", "os", "child_process"], - sourcemap: true, - }); + await esbuild.build({ + entryPoints: [getConfigTsPath()], + bundle: true, + platform: "node", + format: "cjs", + outfile: getConfigJsPath(), + external: ["fetch", "fs", "path", "os", "child_process"], + sourcemap: true, + }); + } } catch (e) { console.log( "Build error. Please check your ~/.continue/config.ts file: " + e @@ -348,10 +387,10 @@ async function buildConfigTs(browser: boolean) { return undefined; } - if (!fs.existsSync(getConfigJsPath(!browser))) { + if (!fs.existsSync(getConfigJsPath())) { return undefined; } - return fs.readFileSync(getConfigJsPath(!browser), "utf8"); + return fs.readFileSync(getConfigJsPath(), "utf8"); } async function loadFullConfigNode( @@ -362,11 +401,11 @@ async function loadFullConfigNode( let serialized = loadSerializedConfig(workspaceConfigs, ideType); let intermediate = serializedToIntermediateConfig(serialized); - const configJsContents = await buildConfigTs(false); + const configJsContents = await buildConfigTs(); if (configJsContents) { try { // Try config.ts first - const configJsPath = getConfigJsPath(true); + const configJsPath = getConfigJsPath(); const module = await require(configJsPath); delete require.cache[require.resolve(configJsPath)]; if (!module.modifyConfig) { diff --git a/core/util/paths.ts b/core/util/paths.ts index ccdc84c50..29343363e 100644 --- a/core/util/paths.ts +++ b/core/util/paths.ts @@ -90,13 +90,9 @@ export function getConfigTsPath(): string { return p; } -export function getConfigJsPath(node: boolean): string { +export function getConfigJsPath(): string { // Do not create automatically - return path.join( - getContinueGlobalPath(), - "out", - `config${node ? ".node" : ""}.js` - ); + return path.join(getContinueGlobalPath(), "out", "config.js"); } export function getTsConfigPath(): string { diff --git a/extensions/vscode/yarn.lock b/extensions/vscode/yarn.lock index be8c6d1c0..9c2abe910 100644 --- a/extensions/vscode/yarn.lock +++ b/extensions/vscode/yarn.lock @@ -696,11 +696,6 @@ resolved "https://registry.npmjs.org/@jsdevtools/ono/-/ono-7.1.3.tgz" integrity sha512-4JQNk+3mVzK3xh2rqd6RB4J46qUR19azEHBneZyTZM+c456qOrbbM/5xcR8huNCCcbVt7+UmizG6GuUvPvKUYg== -"@lancedb/vectordb-darwin-arm64@*": - version "0.4.10" - resolved "https://registry.npmjs.org/@lancedb/vectordb-darwin-arm64/-/vectordb-darwin-arm64-0.4.10.tgz" - integrity sha512-y/uHOGb0g15pvqv5tdTyZ6oN+0QVpBmZDzKFWW6pPbuSZjB2uPqcs+ti0RB+AUdmS21kavVQqaNsw/HLKEGrHA== - "@lancedb/vectordb-darwin-arm64@0.4.8": version "0.4.8" resolved "https://registry.npmjs.org/@lancedb/vectordb-darwin-arm64/-/vectordb-darwin-arm64-0.4.8.tgz" diff --git a/pkg/build.js b/pkg/build.js index 89d1352cd..623df780d 100644 --- a/pkg/build.js +++ b/pkg/build.js @@ -34,8 +34,8 @@ const targetToLanceDb = { // Copy node_modules for pre-built binaries const DYNAMIC_IMPORTS = [ - "esbuild", - "@esbuild", + // "esbuild", + // "@esbuild", // // "@lancedb", // "posthog-node", // "@octokit", @@ -84,36 +84,13 @@ const targetToLanceDb = { } } - console.log("[info] Downloading prebuilt esbuild..."); - const esbuildDir = "out/node_modules/@esbuild"; - for (const target of targets) { - const targetDir = `${esbuildDir}/${target}`; - - console.log(`[info] Downloading ${target}...`); - fs.mkdirSync(`${targetDir}/bin`, { - recursive: true, - }); - execSync( - `curl -o ${esbuildDir}/esbuild.tgz https://registry.npmjs.org/@esbuild/${target}/-/${target}-0.19.11.tgz` - ); - execSync(`tar -xzvf ${esbuildDir}/esbuild.tgz -C ${esbuildDir}`); - await new Promise((resolve) => - ncp(`${esbuildDir}/package`, targetDir, resolve) - ); - fs.rmSync(`${esbuildDir}/esbuild.tgz`); - fs.rmSync(`${esbuildDir}/package`, { - force: true, - recursive: true, - }); - } - console.log("[info] Building with esbuild..."); // Bundles the extension into one file await esbuild.build({ entryPoints: ["src/index.ts"], bundle: true, outfile: esbuildOutputFile, - external: DYNAMIC_IMPORTS, + external: ["esbuild", ...DYNAMIC_IMPORTS], format: "cjs", platform: "node", sourcemap: true, @@ -134,26 +111,44 @@ const targetToLanceDb = { console.log("[info] Building binaries with pkg..."); for (const target of targets) { + const targetDir = `bin/${target}`; console.log(`[info] Building ${target}...`); execSync( - `npx pkg --no-bytecode --public-packages "*" --public pkgJson/${target} --out-path bin/${target}` + `npx pkg --no-bytecode --public-packages "*" --public pkgJson/${target} --out-path ${targetDir}` ); // Download and unzip prebuilt sqlite3 binary for the target const downloadUrl = `https://github.com/TryGhost/node-sqlite3/releases/download/v5.1.7/sqlite3-v5.1.7-napi-v6-${ target === "win32-arm64" ? "win32-ia32" : target }.tar.gz`; - execSync(`curl -L -o bin/${target}/build.tar.gz ${downloadUrl}`); - execSync(`cd bin/${target} && tar -xvzf build.tar.gz`); + execSync(`curl -L -o ${targetDir}/build.tar.gz ${downloadUrl}`); + execSync(`cd ${targetDir} && tar -xvzf build.tar.gz`); fs.copyFileSync( - `bin/${target}/build/Release/node_sqlite3.node`, - `bin/${target}/node_sqlite3.node` + `${targetDir}/build/Release/node_sqlite3.node`, + `${targetDir}/node_sqlite3.node` ); - fs.unlinkSync(`bin/${target}/build.tar.gz`); - fs.rmSync(`bin/${target}/build`, { + fs.unlinkSync(`${targetDir}/build.tar.gz`); + fs.rmSync(`${targetDir}/build`, { recursive: true, force: true, }); + + // Download and unzip prebuilt esbuild binary for the target + console.log(`[info] Downloading esbuild for ${target}...`); + execSync( + `curl -o ${targetDir}/esbuild.tgz https://registry.npmjs.org/@esbuild/${target}/-/${target}-0.19.11.tgz` + ); + execSync(`tar -xzvf ${targetDir}/esbuild.tgz -C ${targetDir}`); + if (target.startsWith("win32")) { + fs.cpSync(`${targetDir}/package/esbuild.exe`, `${targetDir}/esbuild.exe`); + } else { + fs.cpSync(`${targetDir}/package/bin/esbuild`, `${targetDir}/esbuild`); + } + fs.rmSync(`${targetDir}/esbuild.tgz`); + fs.rmSync(`${targetDir}/package`, { + force: true, + recursive: true, + }); } // execSync( // `npx pkg out/index.js --target node18-darwin-arm64 --no-bytecode --public-packages "*" --public -o bin/pkg` diff --git a/pkg/src/index.ts b/pkg/src/index.ts index 1c7134639..4f6c8448e 100644 --- a/pkg/src/index.ts +++ b/pkg/src/index.ts @@ -1,3 +1,4 @@ +process.env.IS_BINARY = "true"; import { Command } from "commander"; import { getCoreLogsPath } from "core/util/paths"; import fs from "fs"; From 9585ea9ec16a6c0773355a14028bf8a9766af988 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Wed, 21 Feb 2024 23:29:25 -0800 Subject: [PATCH 063/141] =?UTF-8?q?=F0=9F=93=9D=20improve=20keyboard=20sho?= =?UTF-8?q?rtcut=20descriptions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- extensions/vscode/yarn.lock | 5 +++++ gui/src/components/dialogs/KeyboardShortcuts.tsx | 8 ++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/extensions/vscode/yarn.lock b/extensions/vscode/yarn.lock index 9c2abe910..be8c6d1c0 100644 --- a/extensions/vscode/yarn.lock +++ b/extensions/vscode/yarn.lock @@ -696,6 +696,11 @@ resolved "https://registry.npmjs.org/@jsdevtools/ono/-/ono-7.1.3.tgz" integrity sha512-4JQNk+3mVzK3xh2rqd6RB4J46qUR19azEHBneZyTZM+c456qOrbbM/5xcR8huNCCcbVt7+UmizG6GuUvPvKUYg== +"@lancedb/vectordb-darwin-arm64@*": + version "0.4.10" + resolved "https://registry.npmjs.org/@lancedb/vectordb-darwin-arm64/-/vectordb-darwin-arm64-0.4.10.tgz" + integrity sha512-y/uHOGb0g15pvqv5tdTyZ6oN+0QVpBmZDzKFWW6pPbuSZjB2uPqcs+ti0RB+AUdmS21kavVQqaNsw/HLKEGrHA== + "@lancedb/vectordb-darwin-arm64@0.4.8": version "0.4.8" resolved "https://registry.npmjs.org/@lancedb/vectordb-darwin-arm64/-/vectordb-darwin-arm64-0.4.8.tgz" diff --git a/gui/src/components/dialogs/KeyboardShortcuts.tsx b/gui/src/components/dialogs/KeyboardShortcuts.tsx index 271f7078a..aad58e4c4 100644 --- a/gui/src/components/dialogs/KeyboardShortcuts.tsx +++ b/gui/src/components/dialogs/KeyboardShortcuts.tsx @@ -57,7 +57,7 @@ const vscodeShortcuts: KeyboardShortcutProps[] = [ { mac: "⌘ M", windows: "⌃ M", - description: "Ask about Highlighted Code", + description: "Select Code + New Session", }, { mac: "⌘ ⇧ L", @@ -67,7 +67,7 @@ const vscodeShortcuts: KeyboardShortcutProps[] = [ { mac: "⌘ ⇧ M", windows: "⌃ ⇧ M", - description: "Ask Follow-Up about Highlighted Code", + description: "Select Code", }, { mac: "⌘ ⇧ ⏎", @@ -110,12 +110,12 @@ const jetbrainsShortcuts: KeyboardShortcutProps[] = [ { mac: "⌘ J", windows: "⌃ J", - description: "Ask about Highlighted Code", + description: "Select Code + New Session", }, { mac: "⌘ ⇧ J", windows: "⌃ ⇧ J", - description: "Ask Follow-Up about Highlighted Code", + description: "Select Code", }, { mac: "⌘ ⇧ ⏎", From e195ad713b87503ee2db704acb4de34b212051e0 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Wed, 21 Feb 2024 23:41:53 -0800 Subject: [PATCH 064/141] =?UTF-8?q?=F0=9F=90=9B=20escape=20space=20in=20pa?= =?UTF-8?q?th?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/config/load.ts | 10 +++++++++- extensions/intellij/gradle.properties | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/core/config/load.ts b/core/config/load.ts index fcd3545bc..d475707c0 100644 --- a/core/config/load.ts +++ b/core/config/load.ts @@ -353,6 +353,10 @@ function getTarget() { return `${os}-${arch}`; } +function escapeSpacesInPath(p: string): string { + return p.replace(/ /g, "\\ "); +} + async function buildConfigTs() { if (!fs.existsSync(getConfigTsPath())) { return undefined; @@ -364,7 +368,11 @@ async function buildConfigTs() { path.dirname(process.execPath) + `/esbuild${ getTarget().startsWith("win32") ? ".exe" : "" - } ${getConfigTsPath()} --bundle --outfile=${getConfigJsPath()} --platform=node --format=cjs --sourcemap --external:fetch --external:fs --external:path --external:os --external:child_process` + } ${escapeSpacesInPath( + getConfigTsPath() + )} --bundle --outfile=${escapeSpacesInPath( + getConfigJsPath() + )} --platform=node --format=cjs --sourcemap --external:fetch --external:fs --external:path --external:os --external:child_process` ); } else { // Dynamic import esbuild so potentially disastrous errors can be caught diff --git a/extensions/intellij/gradle.properties b/extensions/intellij/gradle.properties index 9b55bff67..bd4b41270 100644 --- a/extensions/intellij/gradle.properties +++ b/extensions/intellij/gradle.properties @@ -4,7 +4,7 @@ pluginGroup = com.github.continuedev.continueintellijextension pluginName = continue-intellij-extension pluginRepositoryUrl = https://github.com/continuedev/continue # SemVer format -> https://semver.org -pluginVersion = 0.0.32 +pluginVersion = 0.0.33 # Supported build number ranges and IntelliJ Platform versions -> https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html pluginSinceBuild = 223 From fde13803e9923c8527126f25390c72d770f4e3ee Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Thu, 22 Feb 2024 18:57:31 -0800 Subject: [PATCH 065/141] =?UTF-8?q?=F0=9F=90=9B=20escape=20spaces=20in=20e?= =?UTF-8?q?sbuild=20binary=20path?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/config/load.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/config/load.ts b/core/config/load.ts index d475707c0..023b7d852 100644 --- a/core/config/load.ts +++ b/core/config/load.ts @@ -365,7 +365,7 @@ async function buildConfigTs() { try { if (process.env.IS_BINARY === "true") { execSync( - path.dirname(process.execPath) + + escapeSpacesInPath(path.dirname(process.execPath)) + `/esbuild${ getTarget().startsWith("win32") ? ".exe" : "" } ${escapeSpacesInPath( From 598cd40016020482b318466e9f84be704e6beaa9 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Fri, 23 Feb 2024 07:23:44 -0800 Subject: [PATCH 066/141] =?UTF-8?q?=F0=9F=94=A7=20add=20option=20to=20alwa?= =?UTF-8?q?ys=20enable=20multiline=20completions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/index.d.ts | 2 +- docs/docs/walkthroughs/tab-autocomplete.md | 1 + extensions/vscode/config_schema.json | 4 ++-- extensions/vscode/src/lang-server/completionProvider.ts | 5 ++++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/core/index.d.ts b/core/index.d.ts index 261081593..9882b8d55 100644 --- a/core/index.d.ts +++ b/core/index.d.ts @@ -581,7 +581,7 @@ export interface TabAutocompleteOptions { maxSuffixPercentage: number; prefixPercentage: number; template?: string; - disableMultiLineCompletions?: boolean; + multilineCompletions?: "always" | "never" | "auto"; } export interface SerializedContinueConfig { diff --git a/docs/docs/walkthroughs/tab-autocomplete.md b/docs/docs/walkthroughs/tab-autocomplete.md index 6579a21a1..ea4f6f36f 100644 --- a/docs/docs/walkthroughs/tab-autocomplete.md +++ b/docs/docs/walkthroughs/tab-autocomplete.md @@ -49,6 +49,7 @@ This object allows you to customize the behavior of tab-autocomplete. The availa - `maxSuffixPercentage`: The maximum percentage of the prompt that can be dedicated to the suffix. (Number) - `prefixPercentage`: The percentage of the input that should be dedicated to the prefix. (Number) - `template`: An optional template string to be used for autocomplete. It will be rendered with the Mustache templating language, and is passed the 'prefix' and 'suffix' variables. (String) +- `multilineCompletions`: Whether to enable multiline completions ("always", "never", or "auto"). Defaults to "auto". ### Full example diff --git a/extensions/vscode/config_schema.json b/extensions/vscode/config_schema.json index e37574e2b..832dcbc59 100644 --- a/extensions/vscode/config_schema.json +++ b/extensions/vscode/config_schema.json @@ -1436,8 +1436,8 @@ "type": "string", "description": "An optional template string to be used for autocomplete. It will be rendered with the Mustache templating language, and is passed the 'prefix' and 'suffix' variables." }, - "disableMultiLineCompletions": { - "type": "boolean", + "multilineCompletions": { + "enum": ["always", "never", "auto"], "description": "If set to true, Continue will only complete a single line at a time." } }, diff --git a/extensions/vscode/src/lang-server/completionProvider.ts b/extensions/vscode/src/lang-server/completionProvider.ts index bf6d22ccc..c78ec8921 100644 --- a/extensions/vscode/src/lang-server/completionProvider.ts +++ b/extensions/vscode/src/lang-server/completionProvider.ts @@ -311,7 +311,10 @@ async function getTabCompletion( "```", ...lang.stopWords, ]; - if (options.disableMultiLineCompletions || !completeMultiline) { + if ( + options.multilineCompletions !== "always" && + (options.multilineCompletions === "never" || !completeMultiline) + ) { stop.unshift("\n"); } let generator = GeneratorReuseManager.getGenerator(prefix, () => From 50dafd6c2e5e7bb2a6ce047b1c16efbcf250221b Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Fri, 23 Feb 2024 07:30:36 -0800 Subject: [PATCH 067/141] =?UTF-8?q?=F0=9F=8E=A8=20organize=20vscode=20auto?= =?UTF-8?q?complete=20a=20bit?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/autocomplete/util.ts | 126 +++++ docs/static/schemas/config.json | 4 +- extensions/vscode/continue_rc_schema.json | 8 +- extensions/vscode/src/activation/activate.ts | 6 +- .../src/autocomplete/completionProvider.ts | 109 ++++ .../src/autocomplete/getTabCompletion.ts | 214 ++++++++ .../vscode/src/autocomplete/statusBar.ts | 51 ++ extensions/vscode/src/commands.ts | 2 +- .../src/lang-server/completionProvider.ts | 486 ------------------ extensions/vscode/yarn.lock | 2 +- 10 files changed, 512 insertions(+), 496 deletions(-) create mode 100644 core/autocomplete/util.ts create mode 100644 extensions/vscode/src/autocomplete/completionProvider.ts create mode 100644 extensions/vscode/src/autocomplete/getTabCompletion.ts create mode 100644 extensions/vscode/src/autocomplete/statusBar.ts delete mode 100644 extensions/vscode/src/lang-server/completionProvider.ts diff --git a/core/autocomplete/util.ts b/core/autocomplete/util.ts new file mode 100644 index 000000000..79560c4de --- /dev/null +++ b/core/autocomplete/util.ts @@ -0,0 +1,126 @@ +export class ListenableGenerator { + private _source: AsyncGenerator; + private _buffer: T[] = []; + private _listeners: Set<(value: T) => void> = new Set(); + private _isEnded: boolean = false; + + constructor(source: AsyncGenerator) { + this._source = source; + this._start(); + } + + public cancel() { + this._isEnded = true; + } + + private async _start() { + try { + for await (const value of this._source) { + if (this._isEnded) { + break; + } + this._buffer.push(value); + for (const listener of this._listeners) { + listener(value); + } + } + } finally { + this._isEnded = true; + for (const listener of this._listeners) { + listener(null as any); + } + } + } + + listen(listener: (value: T) => void) { + this._listeners.add(listener); + for (const value of this._buffer) { + listener(value); + } + if (this._isEnded) { + listener(null as any); + } + } + + async *tee(): AsyncGenerator { + try { + for (const value of this._buffer) { + yield value; + } + while (!this._isEnded) { + let resolve: (value: any) => void; + let promise = new Promise((res) => { + resolve = res; + this._listeners.add(resolve!); + }); + const value = await promise; + this._listeners.delete(resolve!); + + yield value; + } + } finally { + // this._listeners.delete(resolve!); + } + } +} + +export class GeneratorReuseManager { + static currentGenerator: ListenableGenerator | undefined; + static pendingGeneratorPrefix: string | undefined; + static pendingCompletion: string = ""; + + private static _createListenableGenerator( + gen: AsyncGenerator, + prefix: string + ) { + GeneratorReuseManager.currentGenerator?.cancel(); + + const listenableGen = new ListenableGenerator(gen); + listenableGen.listen( + (chunk) => (GeneratorReuseManager.pendingCompletion += chunk ?? "") + ); + + GeneratorReuseManager.pendingGeneratorPrefix = prefix; + GeneratorReuseManager.pendingCompletion = ""; + GeneratorReuseManager.currentGenerator = listenableGen; + } + + static async *getGenerator( + prefix: string, + newGenerator: () => AsyncGenerator + ): AsyncGenerator { + // Check if current can be reused + if ( + !( + GeneratorReuseManager.currentGenerator && + GeneratorReuseManager.pendingGeneratorPrefix && + ( + GeneratorReuseManager.pendingGeneratorPrefix + + GeneratorReuseManager.pendingCompletion + ).startsWith(prefix) && + // for e.g. backspace + GeneratorReuseManager.pendingGeneratorPrefix?.length <= prefix?.length + ) + ) { + // Create a wrapper over the current generator to fix the prompt + GeneratorReuseManager._createListenableGenerator(newGenerator(), prefix); + } + + let alreadyTyped = + prefix.slice(GeneratorReuseManager.pendingGeneratorPrefix?.length) || ""; + for await (let chunk of GeneratorReuseManager.currentGenerator!.tee()) { + if (!chunk) { + continue; + } + while (chunk.length && alreadyTyped.length) { + if (chunk[0] === alreadyTyped[0]) { + alreadyTyped = alreadyTyped.slice(1); + chunk = chunk.slice(1); + } else { + break; + } + } + yield chunk; + } + } +} diff --git a/docs/static/schemas/config.json b/docs/static/schemas/config.json index e37574e2b..832dcbc59 100644 --- a/docs/static/schemas/config.json +++ b/docs/static/schemas/config.json @@ -1436,8 +1436,8 @@ "type": "string", "description": "An optional template string to be used for autocomplete. It will be rendered with the Mustache templating language, and is passed the 'prefix' and 'suffix' variables." }, - "disableMultiLineCompletions": { - "type": "boolean", + "multilineCompletions": { + "enum": ["always", "never", "auto"], "description": "If set to true, Continue will only complete a single line at a time." } }, diff --git a/extensions/vscode/continue_rc_schema.json b/extensions/vscode/continue_rc_schema.json index 31c78449e..2c732a339 100644 --- a/extensions/vscode/continue_rc_schema.json +++ b/extensions/vscode/continue_rc_schema.json @@ -1607,8 +1607,12 @@ "type": "string", "description": "An optional template string to be used for autocomplete. It will be rendered with the Mustache templating language, and is passed the 'prefix' and 'suffix' variables." }, - "disableMultiLineCompletions": { - "type": "boolean", + "multilineCompletions": { + "enum": [ + "always", + "never", + "auto" + ], "description": "If set to true, Continue will only complete a single line at a time." } }, diff --git a/extensions/vscode/src/activation/activate.ts b/extensions/vscode/src/activation/activate.ts index 749bc180f..c2c5bcbcc 100644 --- a/extensions/vscode/src/activation/activate.ts +++ b/extensions/vscode/src/activation/activate.ts @@ -4,15 +4,13 @@ import * as fs from "fs"; import path from "path"; import { v4 } from "uuid"; import * as vscode from "vscode"; +import { ContinueCompletionProvider } from "../autocomplete/completionProvider"; +import { setupStatusBar } from "../autocomplete/statusBar"; import { registerAllCommands } from "../commands"; import IdeProtocolClient from "../continueIdeClient"; import { ContinueGUIWebviewViewProvider } from "../debugPanel"; import registerQuickFixProvider from "../lang-server/codeActions"; import { registerAllCodeLensProviders } from "../lang-server/codeLens"; -import { - ContinueCompletionProvider, - setupStatusBar, -} from "../lang-server/completionProvider"; import { vsCodeIndexCodebase } from "../util/indexCodebase"; import { setupRemoteConfigSync } from "../util/remoteConfig"; import { getExtensionVersion } from "../util/util"; diff --git a/extensions/vscode/src/autocomplete/completionProvider.ts b/extensions/vscode/src/autocomplete/completionProvider.ts new file mode 100644 index 000000000..fa1729b50 --- /dev/null +++ b/extensions/vscode/src/autocomplete/completionProvider.ts @@ -0,0 +1,109 @@ +import AutocompleteLruCache from "core/autocomplete/cache"; +import { DEFAULT_AUTOCOMPLETE_OPTS } from "core/autocomplete/parameters"; +import { v4 as uuidv4 } from "uuid"; +import * as vscode from "vscode"; +import { ideProtocolClient } from "../activation/activate"; +import { configHandler } from "../loadConfig"; +import { getTabCompletion } from "./getTabCompletion"; +import { stopStatusBarLoading } from "./statusBar"; + +export class ContinueCompletionProvider + implements vscode.InlineCompletionItemProvider +{ + private static debounceTimeout: NodeJS.Timeout | undefined = undefined; + private static debouncing: boolean = false; + private static lastUUID: string | undefined = undefined; + + private static autocompleteCache = AutocompleteLruCache.get(); + + public static errorsShown: Set = new Set(); + + public async provideInlineCompletionItems( + document: vscode.TextDocument, + position: vscode.Position, + context: vscode.InlineCompletionContext, + token: vscode.CancellationToken + //@ts-ignore + ): ProviderResult { + // Debounce + const uuid = uuidv4(); + ContinueCompletionProvider.lastUUID = uuid; + + const config = await configHandler.loadConfig(); + const options = { + ...config.tabAutocompleteOptions, + ...DEFAULT_AUTOCOMPLETE_OPTS, + }; + + if (ContinueCompletionProvider.debouncing) { + ContinueCompletionProvider.debounceTimeout?.refresh(); + const lastUUID = await new Promise((resolve) => + setTimeout(() => { + resolve(ContinueCompletionProvider.lastUUID); + }, options.debounceDelay) + ); + if (uuid !== lastUUID) { + return []; + } + } else { + ContinueCompletionProvider.debouncing = true; + ContinueCompletionProvider.debounceTimeout = setTimeout(async () => { + ContinueCompletionProvider.debouncing = false; + }, options.debounceDelay); + } + + const enableTabAutocomplete = + vscode.workspace + .getConfiguration("continue") + .get("enableTabAutocomplete") || false; + if (token.isCancellationRequested || !enableTabAutocomplete) { + return []; + } + + try { + const outcome = await getTabCompletion( + document, + position, + token, + options + ); + const completion = outcome?.completion; + + if (!completion) { + return []; + } + + // Do some stuff later so as not to block return. Latency matters + setTimeout(async () => { + if (!outcome.cacheHit) { + (await ContinueCompletionProvider.autocompleteCache).put( + outcome.prompt, + completion + ); + } + }, 100); + + const logRejectionTimeout = setTimeout(() => { + // Wait 10 seconds, then assume it wasn't accepted + outcome.accepted = false; + ideProtocolClient.logDevData("autocomplete", outcome); + }, 10_000); + + return [ + new vscode.InlineCompletionItem( + completion, + new vscode.Range(position, position.translate(0, completion.length)), + { + title: "Log Autocomplete Outcome", + command: "continue.logAutocompleteOutcome", + arguments: [outcome, logRejectionTimeout], + } + ), + ]; + } catch (e: any) { + console.warn("Error getting autocompletion: ", e.message); + } finally { + stopStatusBarLoading(); + } + } +} diff --git a/extensions/vscode/src/autocomplete/getTabCompletion.ts b/extensions/vscode/src/autocomplete/getTabCompletion.ts new file mode 100644 index 000000000..4220772b7 --- /dev/null +++ b/extensions/vscode/src/autocomplete/getTabCompletion.ts @@ -0,0 +1,214 @@ +import { TabAutocompleteOptions } from "core"; +import { AutocompleteLruCache } from "core/autocomplete/cache"; +import { onlyWhitespaceAfterEndOfLine } from "core/autocomplete/charStream"; +import { + AutocompleteSnippet, + constructAutocompletePrompt, + languageForFilepath, +} from "core/autocomplete/constructPrompt"; +import { + stopAtSimilarLine, + streamWithNewLines, +} from "core/autocomplete/lineStream"; +import { getTemplateForModel } from "core/autocomplete/templates"; +import { GeneratorReuseManager } from "core/autocomplete/util"; +import { streamLines } from "core/diff/util"; +import OpenAI from "core/llm/llms/OpenAI"; +import Handlebars from "handlebars"; +import * as vscode from "vscode"; +import { ideProtocolClient } from "../activation/activate"; +import { TabAutocompleteModel } from "../loadConfig"; +import { ContinueCompletionProvider } from "./completionProvider"; +import { setupStatusBar, stopStatusBarLoading } from "./statusBar"; + +async function getDefinition( + uri: string, + line: number, + character: number +): Promise { + const definitions = (await vscode.commands.executeCommand( + "vscode.executeDefinitionProvider", + vscode.Uri.parse(uri), + new vscode.Position(line, character) + )) as any; + + if (definitions[0]?.targetRange) { + return { + filepath: uri, + content: await ideProtocolClient.readRangeInFile( + definitions[0].targetUri.fsPath, + definitions[0].targetRange + ), + }; + } + + return undefined; +} + +export interface AutocompleteOutcome { + accepted?: boolean; + time: number; + prompt: string; + completion: string; + modelProvider: string; + modelName: string; + completionOptions: any; + cacheHit: boolean; +} + +const autocompleteCache = AutocompleteLruCache.get(); + +export async function getTabCompletion( + document: vscode.TextDocument, + pos: vscode.Position, + token: vscode.CancellationToken, + options: TabAutocompleteOptions +): Promise { + const startTime = Date.now(); + + // Filter + const lang = languageForFilepath(document.fileName); + const line = document.lineAt(pos).text; + for (const endOfLine of lang.endOfLine) { + if (line.endsWith(endOfLine) && pos.character >= endOfLine.length) { + return undefined; + } + } + + try { + // Model + const llm = await TabAutocompleteModel.get(); + if (llm instanceof OpenAI) { + llm.useLegacyCompletionsEndpoint = true; + } + if (!llm) return; + + // Prompt + const fullPrefix = document.getText( + new vscode.Range(new vscode.Position(0, 0), pos) + ); + const fullSuffix = document.getText( + new vscode.Range( + pos, + new vscode.Position(document.lineCount, Number.MAX_SAFE_INTEGER) + ) + ); + const lineBelowCursor = document.lineAt( + Math.min(pos.line + 1, document.lineCount - 1) + ).text; + const clipboardText = await vscode.env.clipboard.readText(); + const { prefix, suffix, completeMultiline } = + await constructAutocompletePrompt( + document.uri.toString(), + fullPrefix, + fullSuffix, + clipboardText, + lang, + getDefinition, + options + ); + + const { template, completionOptions } = options.template + ? { template: options.template, completionOptions: {} } + : getTemplateForModel(llm.model); + + const compiledTemplate = Handlebars.compile(template); + const prompt = compiledTemplate({ prefix, suffix }); + + // Completion + let completion = ""; + + const cache = await autocompleteCache; + const cachedCompletion = await cache.get(prompt); + let cacheHit = false; + if (cachedCompletion) { + // Cache + cacheHit = true; + completion = cachedCompletion; + } else { + setupStatusBar(true, true); + + // Try to reuse pending requests if what the user typed matches start of completion + let stop = [ + ...(completionOptions?.stop || []), + "\n\n", + "```", + ...lang.stopWords, + ]; + if ( + options.multilineCompletions !== "always" && + (options.multilineCompletions === "never" || !completeMultiline) + ) { + stop.unshift("\n"); + } + let generator = GeneratorReuseManager.getGenerator(prefix, () => + llm.streamComplete(prompt, { + ...completionOptions, + temperature: 0, + raw: true, + stop, + }) + ); + + // LLM + let cancelled = false; + const generatorWithCancellation = async function* () { + for await (const update of generator) { + if (token.isCancellationRequested) { + stopStatusBarLoading(); + cancelled = true; + return undefined; + } + yield update; + } + }; + const gen2 = onlyWhitespaceAfterEndOfLine( + generatorWithCancellation(), + lang.endOfLine + ); + const lineGenerator = streamWithNewLines(streamLines(gen2)); + const finalGenerator = stopAtSimilarLine(lineGenerator, lineBelowCursor); + for await (const update of finalGenerator) { + completion += update; + } + + if (cancelled) { + return undefined; + } + + // Don't return empty + if (completion.trim().length <= 0) { + return undefined; + } + + // Post-processing + completion = completion.trimEnd(); + } + + const time = Date.now() - startTime; + return { + time, + completion, + prompt, + modelProvider: llm.providerName, + modelName: llm.model, + completionOptions, + cacheHit, + }; + } catch (e: any) { + console.warn("Error generating autocompletion: ", e); + if (!ContinueCompletionProvider.errorsShown.has(e.message)) { + ContinueCompletionProvider.errorsShown.add(e.message); + vscode.window.showErrorMessage(e.message, "Documentation").then((val) => { + if (val === "Documentation") { + vscode.env.openExternal( + vscode.Uri.parse( + "https://continue.dev/docs/walkthroughs/tab-autocomplete" + ) + ); + } + }); + } + return undefined; + } +} diff --git a/extensions/vscode/src/autocomplete/statusBar.ts b/extensions/vscode/src/autocomplete/statusBar.ts new file mode 100644 index 000000000..d9015a833 --- /dev/null +++ b/extensions/vscode/src/autocomplete/statusBar.ts @@ -0,0 +1,51 @@ +import * as vscode from "vscode"; + +const statusBarItemText = (enabled: boolean | undefined) => + enabled ? "$(check) Continue" : "$(circle-slash) Continue"; + +const statusBarItemTooltip = (enabled: boolean | undefined) => + enabled ? "Tab autocomplete is enabled" : "Click to enable tab autocomplete"; + +let lastStatusBar: vscode.StatusBarItem | undefined = undefined; +let statusBarFalseTimeout: NodeJS.Timeout | undefined = undefined; + +export function stopStatusBarLoading() { + statusBarFalseTimeout = setTimeout(() => { + setupStatusBar(true, false); + }, 100); +} + +export function setupStatusBar( + enabled: boolean | undefined, + loading?: boolean +) { + if (loading !== false) { + clearTimeout(statusBarFalseTimeout); + statusBarFalseTimeout = undefined; + } + + const statusBarItem = vscode.window.createStatusBarItem( + vscode.StatusBarAlignment.Right + ); + statusBarItem.text = loading + ? "$(loading~spin) Continue" + : statusBarItemText(enabled); + statusBarItem.tooltip = statusBarItemTooltip(enabled); + statusBarItem.command = "continue.toggleTabAutocompleteEnabled"; + + // Swap out with old status bar + if (lastStatusBar) { + lastStatusBar.dispose(); + } + statusBarItem.show(); + lastStatusBar = statusBarItem; + + vscode.workspace.onDidChangeConfiguration((event) => { + if (event.affectsConfiguration("continue")) { + const config = vscode.workspace.getConfiguration("continue"); + const enabled = config.get("enableTabAutocomplete"); + statusBarItem.dispose(); + setupStatusBar(enabled); + } + }); +} diff --git a/extensions/vscode/src/commands.ts b/extensions/vscode/src/commands.ts index a8484c105..b81c550eb 100644 --- a/extensions/vscode/src/commands.ts +++ b/extensions/vscode/src/commands.ts @@ -4,6 +4,7 @@ import * as path from "path"; import * as vscode from "vscode"; import { extensionContext, ideProtocolClient } from "./activation/activate"; +import { AutocompleteOutcome } from "./autocomplete/getTabCompletion"; import { debugPanelWebview, getSidebarContent } from "./debugPanel"; import { acceptDiffCommand, rejectDiffCommand } from "./diff/horizontal"; import { @@ -12,7 +13,6 @@ import { verticalPerLineDiffManager, } from "./diff/verticalPerLine/manager"; import { VsCodeIde } from "./ideProtocol"; -import { AutocompleteOutcome } from "./lang-server/completionProvider"; import { configHandler, llmFromTitle } from "./loadConfig"; function addHighlightedCodeToContext(edit: boolean) { diff --git a/extensions/vscode/src/lang-server/completionProvider.ts b/extensions/vscode/src/lang-server/completionProvider.ts deleted file mode 100644 index c78ec8921..000000000 --- a/extensions/vscode/src/lang-server/completionProvider.ts +++ /dev/null @@ -1,486 +0,0 @@ -import { TabAutocompleteOptions } from "core"; -import { AutocompleteLruCache } from "core/autocomplete/cache"; -import { onlyWhitespaceAfterEndOfLine } from "core/autocomplete/charStream"; -import { - AutocompleteSnippet, - constructAutocompletePrompt, - languageForFilepath, -} from "core/autocomplete/constructPrompt"; -import { - stopAtSimilarLine, - streamWithNewLines, -} from "core/autocomplete/lineStream"; -import { DEFAULT_AUTOCOMPLETE_OPTS } from "core/autocomplete/parameters"; -import { getTemplateForModel } from "core/autocomplete/templates"; -import { streamLines } from "core/diff/util"; -import OpenAI from "core/llm/llms/OpenAI"; -import Handlebars from "handlebars"; -import { v4 as uuidv4 } from "uuid"; -import * as vscode from "vscode"; -import { ideProtocolClient } from "../activation/activate"; -import { TabAutocompleteModel, configHandler } from "../loadConfig"; - -const statusBarItemText = (enabled: boolean | undefined) => - enabled ? "$(check) Continue" : "$(circle-slash) Continue"; - -const statusBarItemTooltip = (enabled: boolean | undefined) => - enabled ? "Tab autocomplete is enabled" : "Click to enable tab autocomplete"; - -let lastStatusBar: vscode.StatusBarItem | undefined = undefined; -let statusBarFalseTimeout: NodeJS.Timeout | undefined = undefined; - -function stopStatusBarLoading() { - statusBarFalseTimeout = setTimeout(() => { - setupStatusBar(true, false); - }, 100); -} - -export function setupStatusBar( - enabled: boolean | undefined, - loading?: boolean -) { - if (loading !== false) { - clearTimeout(statusBarFalseTimeout); - statusBarFalseTimeout = undefined; - } - - const statusBarItem = vscode.window.createStatusBarItem( - vscode.StatusBarAlignment.Right - ); - statusBarItem.text = loading - ? "$(loading~spin) Continue" - : statusBarItemText(enabled); - statusBarItem.tooltip = statusBarItemTooltip(enabled); - statusBarItem.command = "continue.toggleTabAutocompleteEnabled"; - - // Swap out with old status bar - if (lastStatusBar) { - lastStatusBar.dispose(); - } - statusBarItem.show(); - lastStatusBar = statusBarItem; - - vscode.workspace.onDidChangeConfiguration((event) => { - if (event.affectsConfiguration("continue")) { - const config = vscode.workspace.getConfiguration("continue"); - const enabled = config.get("enableTabAutocomplete"); - statusBarItem.dispose(); - setupStatusBar(enabled); - } - }); -} - -async function getDefinition( - uri: string, - line: number, - character: number -): Promise { - const definitions = (await vscode.commands.executeCommand( - "vscode.executeDefinitionProvider", - vscode.Uri.parse(uri), - new vscode.Position(line, character) - )) as any; - - if (definitions[0]?.targetRange) { - return { - filepath: uri, - content: await ideProtocolClient.readRangeInFile( - definitions[0].targetUri.fsPath, - definitions[0].targetRange - ), - }; - } - - return undefined; -} - -export interface AutocompleteOutcome { - accepted?: boolean; - time: number; - prompt: string; - completion: string; - modelProvider: string; - modelName: string; - completionOptions: any; - cacheHit: boolean; -} - -const autocompleteCache = AutocompleteLruCache.get(); - -class ListenableGenerator { - private _source: AsyncGenerator; - private _buffer: T[] = []; - private _listeners: Set<(value: T) => void> = new Set(); - private _isEnded: boolean = false; - - constructor(source: AsyncGenerator) { - this._source = source; - this._start(); - } - - public cancel() { - this._isEnded = true; - } - - private async _start() { - try { - for await (const value of this._source) { - if (this._isEnded) { - break; - } - this._buffer.push(value); - for (const listener of this._listeners) { - listener(value); - } - } - } finally { - this._isEnded = true; - for (const listener of this._listeners) { - listener(null as any); - } - } - } - - listen(listener: (value: T) => void) { - this._listeners.add(listener); - for (const value of this._buffer) { - listener(value); - } - if (this._isEnded) { - listener(null as any); - } - } - - async *tee(): AsyncGenerator { - try { - for (const value of this._buffer) { - yield value; - } - while (!this._isEnded) { - let resolve: (value: any) => void; - let promise = new Promise((res) => { - resolve = res; - this._listeners.add(resolve!); - }); - const value = await promise; - this._listeners.delete(resolve!); - - yield value; - } - } finally { - // this._listeners.delete(resolve!); - } - } -} - -class GeneratorReuseManager { - static currentGenerator: ListenableGenerator | undefined; - static pendingGeneratorPrefix: string | undefined; - static pendingCompletion: string = ""; - - private static _createListenableGenerator( - gen: AsyncGenerator, - prefix: string - ) { - GeneratorReuseManager.currentGenerator?.cancel(); - - const listenableGen = new ListenableGenerator(gen); - listenableGen.listen( - (chunk) => (GeneratorReuseManager.pendingCompletion += chunk ?? "") - ); - - GeneratorReuseManager.pendingGeneratorPrefix = prefix; - GeneratorReuseManager.pendingCompletion = ""; - GeneratorReuseManager.currentGenerator = listenableGen; - } - - static async *getGenerator( - prefix: string, - newGenerator: () => AsyncGenerator - ): AsyncGenerator { - // Check if current can be reused - if ( - !( - GeneratorReuseManager.currentGenerator && - GeneratorReuseManager.pendingGeneratorPrefix && - ( - GeneratorReuseManager.pendingGeneratorPrefix + - GeneratorReuseManager.pendingCompletion - ).startsWith(prefix) && - // for e.g. backspace - GeneratorReuseManager.pendingGeneratorPrefix?.length <= prefix?.length - ) - ) { - // Create a wrapper over the current generator to fix the prompt - GeneratorReuseManager._createListenableGenerator(newGenerator(), prefix); - } - - let alreadyTyped = - prefix.slice(GeneratorReuseManager.pendingGeneratorPrefix?.length) || ""; - for await (let chunk of GeneratorReuseManager.currentGenerator!.tee()) { - if (!chunk) { - continue; - } - while (chunk.length && alreadyTyped.length) { - if (chunk[0] === alreadyTyped[0]) { - alreadyTyped = alreadyTyped.slice(1); - chunk = chunk.slice(1); - } else { - break; - } - } - yield chunk; - } - } -} - -async function getTabCompletion( - document: vscode.TextDocument, - pos: vscode.Position, - token: vscode.CancellationToken, - options: TabAutocompleteOptions -): Promise { - const startTime = Date.now(); - - // Filter - const lang = languageForFilepath(document.fileName); - const line = document.lineAt(pos).text; - for (const endOfLine of lang.endOfLine) { - if (line.endsWith(endOfLine) && pos.character >= endOfLine.length) { - return undefined; - } - } - - try { - // Model - const llm = await TabAutocompleteModel.get(); - if (llm instanceof OpenAI) { - llm.useLegacyCompletionsEndpoint = true; - } - if (!llm) return; - - // Prompt - const fullPrefix = document.getText( - new vscode.Range(new vscode.Position(0, 0), pos) - ); - const fullSuffix = document.getText( - new vscode.Range( - pos, - new vscode.Position(document.lineCount, Number.MAX_SAFE_INTEGER) - ) - ); - const lineBelowCursor = document.lineAt( - Math.min(pos.line + 1, document.lineCount - 1) - ).text; - const clipboardText = await vscode.env.clipboard.readText(); - const { prefix, suffix, completeMultiline } = - await constructAutocompletePrompt( - document.uri.toString(), - fullPrefix, - fullSuffix, - clipboardText, - lang, - getDefinition, - options - ); - - const { template, completionOptions } = options.template - ? { template: options.template, completionOptions: {} } - : getTemplateForModel(llm.model); - - const compiledTemplate = Handlebars.compile(template); - const prompt = compiledTemplate({ prefix, suffix }); - - // Completion - let completion = ""; - - const cache = await autocompleteCache; - const cachedCompletion = await cache.get(prompt); - let cacheHit = false; - if (cachedCompletion) { - // Cache - cacheHit = true; - completion = cachedCompletion; - } else { - setupStatusBar(true, true); - - // Try to reuse pending requests if what the user typed matches start of completion - let stop = [ - ...(completionOptions?.stop || []), - "\n\n", - "```", - ...lang.stopWords, - ]; - if ( - options.multilineCompletions !== "always" && - (options.multilineCompletions === "never" || !completeMultiline) - ) { - stop.unshift("\n"); - } - let generator = GeneratorReuseManager.getGenerator(prefix, () => - llm.streamComplete(prompt, { - ...completionOptions, - temperature: 0, - raw: true, - stop, - }) - ); - - // LLM - let cancelled = false; - const generatorWithCancellation = async function* () { - for await (const update of generator) { - if (token.isCancellationRequested) { - stopStatusBarLoading(); - cancelled = true; - return undefined; - } - yield update; - } - }; - const gen2 = onlyWhitespaceAfterEndOfLine( - generatorWithCancellation(), - lang.endOfLine - ); - const lineGenerator = streamWithNewLines(streamLines(gen2)); - const finalGenerator = stopAtSimilarLine(lineGenerator, lineBelowCursor); - for await (const update of finalGenerator) { - completion += update; - } - - if (cancelled) { - return undefined; - } - - // Don't return empty - if (completion.trim().length <= 0) { - return undefined; - } - - // Post-processing - completion = completion.trimEnd(); - } - - const time = Date.now() - startTime; - return { - time, - completion, - prompt, - modelProvider: llm.providerName, - modelName: llm.model, - completionOptions, - cacheHit, - }; - } catch (e: any) { - console.warn("Error generating autocompletion: ", e); - if (!ContinueCompletionProvider.errorsShown.has(e.message)) { - ContinueCompletionProvider.errorsShown.add(e.message); - vscode.window.showErrorMessage(e.message, "Documentation").then((val) => { - if (val === "Documentation") { - vscode.env.openExternal( - vscode.Uri.parse( - "https://continue.dev/docs/walkthroughs/tab-autocomplete" - ) - ); - } - }); - } - return undefined; - } -} - -export class ContinueCompletionProvider - implements vscode.InlineCompletionItemProvider -{ - private static debounceTimeout: NodeJS.Timeout | undefined = undefined; - private static debouncing: boolean = false; - private static lastUUID: string | undefined = undefined; - - public static errorsShown: Set = new Set(); - - public async provideInlineCompletionItems( - document: vscode.TextDocument, - position: vscode.Position, - context: vscode.InlineCompletionContext, - token: vscode.CancellationToken - //@ts-ignore - ): ProviderResult { - // Debounce - const uuid = uuidv4(); - ContinueCompletionProvider.lastUUID = uuid; - - const config = await configHandler.loadConfig(); - const options = { - ...config.tabAutocompleteOptions, - ...DEFAULT_AUTOCOMPLETE_OPTS, - }; - - if (ContinueCompletionProvider.debouncing) { - ContinueCompletionProvider.debounceTimeout?.refresh(); - const lastUUID = await new Promise((resolve) => - setTimeout(() => { - resolve(ContinueCompletionProvider.lastUUID); - }, options.debounceDelay) - ); - if (uuid !== lastUUID) { - return []; - } - } else { - ContinueCompletionProvider.debouncing = true; - ContinueCompletionProvider.debounceTimeout = setTimeout(async () => { - ContinueCompletionProvider.debouncing = false; - }, options.debounceDelay); - } - - const enableTabAutocomplete = - vscode.workspace - .getConfiguration("continue") - .get("enableTabAutocomplete") || false; - if (token.isCancellationRequested || !enableTabAutocomplete) { - return []; - } - - try { - const outcome = await getTabCompletion( - document, - position, - token, - options - ); - const completion = outcome?.completion; - - if (!completion) { - return []; - } - - // Do some stuff later so as not to block return. Latency matters - setTimeout(async () => { - if (!outcome.cacheHit) { - (await autocompleteCache).put(outcome.prompt, completion); - } - }, 100); - - const logRejectionTimeout = setTimeout(() => { - // Wait 10 seconds, then assume it wasn't accepted - outcome.accepted = false; - ideProtocolClient.logDevData("autocomplete", outcome); - }, 10_000); - - return [ - new vscode.InlineCompletionItem( - completion, - new vscode.Range(position, position.translate(0, completion.length)), - { - title: "Log Autocomplete Outcome", - command: "continue.logAutocompleteOutcome", - arguments: [outcome, logRejectionTimeout], - } - ), - ]; - } catch (e: any) { - console.warn("Error getting autocompletion: ", e.message); - } finally { - stopStatusBarLoading(); - } - } -} diff --git a/extensions/vscode/yarn.lock b/extensions/vscode/yarn.lock index 506488bcd..1211ea140 100644 --- a/extensions/vscode/yarn.lock +++ b/extensions/vscode/yarn.lock @@ -696,7 +696,7 @@ resolved "https://registry.npmjs.org/@jsdevtools/ono/-/ono-7.1.3.tgz" integrity sha512-4JQNk+3mVzK3xh2rqd6RB4J46qUR19azEHBneZyTZM+c456qOrbbM/5xcR8huNCCcbVt7+UmizG6GuUvPvKUYg== -"@lancedb/vectordb-darwin-arm64@*", "@lancedb/vectordb-darwin-arm64@0.4.10": +"@lancedb/vectordb-darwin-arm64@0.4.10": version "0.4.10" resolved "https://registry.npmjs.org/@lancedb/vectordb-darwin-arm64/-/vectordb-darwin-arm64-0.4.10.tgz" integrity sha512-y/uHOGb0g15pvqv5tdTyZ6oN+0QVpBmZDzKFWW6pPbuSZjB2uPqcs+ti0RB+AUdmS21kavVQqaNsw/HLKEGrHA== From ac2e8056f4553eb573cd1b7d11f728f6b9392fca Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Fri, 23 Feb 2024 08:12:42 -0800 Subject: [PATCH 068/141] =?UTF-8?q?=E2=9A=A1=EF=B8=8F=20recently=20edited?= =?UTF-8?q?=20snippets=20for=20autocomplete?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/autocomplete/ast.ts | 76 +++++++++++++++++++ core/autocomplete/constructPrompt.ts | 58 +++++--------- core/autocomplete/recentlyEdited.ts | 5 ++ core/autocomplete/retrieval.ts | 24 ++++++ .../src/autocomplete/getTabCompletion.ts | 5 +- .../vscode/src/autocomplete/recentlyEdited.ts | 65 ++++++++++++++++ 6 files changed, 192 insertions(+), 41 deletions(-) create mode 100644 core/autocomplete/ast.ts create mode 100644 core/autocomplete/recentlyEdited.ts create mode 100644 core/autocomplete/retrieval.ts create mode 100644 extensions/vscode/src/autocomplete/recentlyEdited.ts diff --git a/core/autocomplete/ast.ts b/core/autocomplete/ast.ts new file mode 100644 index 000000000..223a5ae5d --- /dev/null +++ b/core/autocomplete/ast.ts @@ -0,0 +1,76 @@ +import Parser from "web-tree-sitter"; +import { RangeInFileWithContents } from "../commands/util"; +import { getParserForFile } from "../util/treeSitter"; + +export async function getAst( + filepath: string, + fileContents: string +): Promise { + const parser = await getParserForFile(filepath); + + if (!parser) { + return undefined; + } + + const ast = parser.parse(fileContents); + return ast; +} + +export async function getTreePathAtCursor( + ast: Parser.Tree, + cursorIndex: number +): Promise { + const path = [ast.rootNode]; + while (path[path.length - 1].childCount > 0) { + let foundChild = false; + for (let child of path[path.length - 1].children) { + if (child.startIndex <= cursorIndex && child.endIndex >= cursorIndex) { + path.push(child); + foundChild = true; + break; + } + } + + if (!foundChild) { + break; + } + } + + return path; +} + +export async function getScopeAroundRange( + range: RangeInFileWithContents +): Promise { + const ast = await getAst(range.filepath, range.contents); + if (!ast) { + return undefined; + } + + const { start: s, end: e } = range.range; + const lines = range.contents.split("\n"); + const startIndex = + lines.slice(0, s.line).join("\n").length + + lines[s.line].slice(s.character).length; + const endIndex = + lines.slice(0, e.line).join("\n").length + + lines[e.line].slice(0, e.character).length; + + let node = ast.rootNode; + while (node.childCount > 0) { + let foundChild = false; + for (let child of node.children) { + if (child.startIndex < startIndex && child.endIndex > endIndex) { + node = child; + foundChild = true; + break; + } + } + + if (!foundChild) { + break; + } + } + + return node.text; +} diff --git a/core/autocomplete/constructPrompt.ts b/core/autocomplete/constructPrompt.ts index f9f28704c..71a3b5168 100644 --- a/core/autocomplete/constructPrompt.ts +++ b/core/autocomplete/constructPrompt.ts @@ -1,12 +1,14 @@ import Parser from "web-tree-sitter"; import { TabAutocompleteOptions } from ".."; +import { RangeInFileWithContents } from "../commands/util"; import { countTokens, pruneLinesFromBottom, pruneLinesFromTop, } from "../llm/countTokens"; import { getBasename } from "../util"; -import { getParserForFile } from "../util/treeSitter"; + +import { getAst, getScopeAroundRange, getTreePathAtCursor } from "./ast"; import { AutocompleteLanguageInfo, LANGUAGES, Typescript } from "./languages"; export function languageForFilepath( @@ -29,43 +31,6 @@ function formatExternalSnippet( return lines.join("\n"); } -async function getAst( - filepath: string, - fileContents: string -): Promise { - const parser = await getParserForFile(filepath); - - if (!parser) { - return undefined; - } - - const ast = parser.parse(fileContents); - return ast; -} - -async function getTreePathAtCursor( - ast: Parser.Tree, - cursorIndex: number -): Promise { - const path = [ast.rootNode]; - while (path[path.length - 1].childCount > 0) { - let foundChild = false; - for (let child of path[path.length - 1].children) { - if (child.startIndex <= cursorIndex && child.endIndex >= cursorIndex) { - path.push(child); - foundChild = true; - break; - } - } - - if (!foundChild) { - break; - } - } - - return path; -} - export interface AutocompleteSnippet { filepath: string; content: string; @@ -111,7 +76,8 @@ export async function constructAutocompletePrompt( line: number, character: number ) => Promise, - options: TabAutocompleteOptions + options: TabAutocompleteOptions, + recentlyEditedRanges: RangeInFileWithContents[] ): Promise<{ prefix: string; suffix: string; @@ -119,7 +85,19 @@ export async function constructAutocompletePrompt( completeMultiline: boolean; }> { // Find external snippets - const snippets: AutocompleteSnippet[] = []; + const snippets: AutocompleteSnippet[] = (await Promise.all( + recentlyEditedRanges + .map(async (r) => { + const scope = await getScopeAroundRange(r); + if (!scope) return null; + + return { + filepath: r.filepath, + content: r.contents, + }; + }) + .filter((s) => !!s) + )) as any; let treePath: Parser.SyntaxNode[] | undefined; try { diff --git a/core/autocomplete/recentlyEdited.ts b/core/autocomplete/recentlyEdited.ts new file mode 100644 index 000000000..d809066a4 --- /dev/null +++ b/core/autocomplete/recentlyEdited.ts @@ -0,0 +1,5 @@ +import { RangeInFileWithContents } from "../commands/util"; + +export type RecentlyEditedRange = RangeInFileWithContents & { + timestamp: number; +}; diff --git a/core/autocomplete/retrieval.ts b/core/autocomplete/retrieval.ts new file mode 100644 index 000000000..2beb3b44d --- /dev/null +++ b/core/autocomplete/retrieval.ts @@ -0,0 +1,24 @@ +import { Chunk } from ".."; +import { FullTextSearchCodebaseIndex } from "../indexing/FullTextSearch"; +import { IndexTag } from "../indexing/types"; + +export async function fullTextRetrieve( + prefix: string, + suffix: string, + indexTag: IndexTag +): Promise { + const index = new FullTextSearchCodebaseIndex(); + const searchStrings = prefix.split("\n").slice(-3); + const results: Chunk[] = []; + searchStrings.forEach(async (searchString) => { + const chunks = await index.retrieve( + [indexTag], + searchString, + 3, + undefined, + undefined + ); + results.push(...chunks); + }); + return results; +} diff --git a/extensions/vscode/src/autocomplete/getTabCompletion.ts b/extensions/vscode/src/autocomplete/getTabCompletion.ts index 4220772b7..b729cbdc8 100644 --- a/extensions/vscode/src/autocomplete/getTabCompletion.ts +++ b/extensions/vscode/src/autocomplete/getTabCompletion.ts @@ -19,6 +19,7 @@ import * as vscode from "vscode"; import { ideProtocolClient } from "../activation/activate"; import { TabAutocompleteModel } from "../loadConfig"; import { ContinueCompletionProvider } from "./completionProvider"; +import { RecentlyEditedTracker } from "./recentlyEdited"; import { setupStatusBar, stopStatusBarLoading } from "./statusBar"; async function getDefinition( @@ -57,6 +58,7 @@ export interface AutocompleteOutcome { } const autocompleteCache = AutocompleteLruCache.get(); +const recentlyEditedTracker = new RecentlyEditedTracker(); export async function getTabCompletion( document: vscode.TextDocument, @@ -105,7 +107,8 @@ export async function getTabCompletion( clipboardText, lang, getDefinition, - options + options, + await recentlyEditedTracker.getRecentlyEditedRanges() ); const { template, completionOptions } = options.template diff --git a/extensions/vscode/src/autocomplete/recentlyEdited.ts b/extensions/vscode/src/autocomplete/recentlyEdited.ts new file mode 100644 index 000000000..f66f26d55 --- /dev/null +++ b/extensions/vscode/src/autocomplete/recentlyEdited.ts @@ -0,0 +1,65 @@ +import { RecentlyEditedRange } from "core/autocomplete/recentlyEdited"; +import * as vscode from "vscode"; + +interface VsCodeRecentlyEditedRange { + timestamp: number; + uri: vscode.Uri; + range: vscode.Range; +} + +export class RecentlyEditedTracker { + private static staleTime = 1000 * 60 * 2; + private static maxRecentlyEditedRanges = 3; + private recentlyEditedRanges: VsCodeRecentlyEditedRange[] = []; + + constructor() { + vscode.workspace.onDidChangeTextDocument((event) => { + event.contentChanges.forEach((change) => { + const editedRange = { + uri: event.document.uri, + range: change.range, + timestamp: Date.now(), + }; + const newLength = this.recentlyEditedRanges.unshift(editedRange); + if (newLength >= RecentlyEditedTracker.maxRecentlyEditedRanges) { + this.recentlyEditedRanges = this.recentlyEditedRanges.slice( + 0, + RecentlyEditedTracker.maxRecentlyEditedRanges + ); + } + }); + }); + + setInterval(() => { + this.removeOldEntries(); + }, 1000 * 15); + } + + private removeOldEntries() { + this.recentlyEditedRanges = this.recentlyEditedRanges.filter( + (entry) => entry.timestamp > Date.now() - RecentlyEditedTracker.staleTime + ); + } + + public async getRecentlyEditedRanges(): Promise { + return Promise.all( + this.recentlyEditedRanges.map(async (entry) => ({ + timestamp: entry.timestamp, + filepath: entry.uri.fsPath, + contents: await vscode.workspace.fs + .readFile(entry.uri) + .then((content) => content.toString()), + range: { + start: { + line: entry.range.start.line, + character: entry.range.start.character, + }, + end: { + line: entry.range.end.line, + character: entry.range.end.character, + }, + }, + })) + ); + } +} From 9c9835009143d11ecdc6b65c03facc647169938e Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Fri, 23 Feb 2024 08:52:29 -0800 Subject: [PATCH 069/141] =?UTF-8?q?=E2=9A=A1=EF=B8=8F=20sliding=20window?= =?UTF-8?q?=20similarity=20over=20recent=20documents?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/autocomplete/constructPrompt.ts | 28 +++-- core/autocomplete/parameters.ts | 4 +- core/autocomplete/slidingWindow.ts | 101 ++++++++++++++++++ core/index.d.ts | 7 ++ .../src/autocomplete/getTabCompletion.ts | 10 +- .../vscode/src/autocomplete/recentlyEdited.ts | 31 ++++++ 6 files changed, 165 insertions(+), 16 deletions(-) create mode 100644 core/autocomplete/slidingWindow.ts diff --git a/core/autocomplete/constructPrompt.ts b/core/autocomplete/constructPrompt.ts index 71a3b5168..39dcd7952 100644 --- a/core/autocomplete/constructPrompt.ts +++ b/core/autocomplete/constructPrompt.ts @@ -1,5 +1,5 @@ import Parser from "web-tree-sitter"; -import { TabAutocompleteOptions } from ".."; +import { FileWithContents, TabAutocompleteOptions } from ".."; import { RangeInFileWithContents } from "../commands/util"; import { countTokens, @@ -10,6 +10,7 @@ import { getBasename } from "../util"; import { getAst, getScopeAroundRange, getTreePathAtCursor } from "./ast"; import { AutocompleteLanguageInfo, LANGUAGES, Typescript } from "./languages"; +import { slidingWindowMatcher } from "./slidingWindow"; export function languageForFilepath( filepath: string @@ -31,11 +32,6 @@ function formatExternalSnippet( return lines.join("\n"); } -export interface AutocompleteSnippet { - filepath: string; - content: string; -} - const BLOCK_TYPES = ["body", "statement_block"]; function shouldCompleteMultiline( @@ -75,9 +71,10 @@ export async function constructAutocompletePrompt( filepath: string, line: number, character: number - ) => Promise, + ) => Promise, options: TabAutocompleteOptions, - recentlyEditedRanges: RangeInFileWithContents[] + recentlyEditedRanges: RangeInFileWithContents[], + recentlyEditedDocuments: FileWithContents[] ): Promise<{ prefix: string; suffix: string; @@ -85,7 +82,7 @@ export async function constructAutocompletePrompt( completeMultiline: boolean; }> { // Find external snippets - const snippets: AutocompleteSnippet[] = (await Promise.all( + const snippets: FileWithContents[] = (await Promise.all( recentlyEditedRanges .map(async (r) => { const scope = await getScopeAroundRange(r); @@ -99,6 +96,17 @@ export async function constructAutocompletePrompt( .filter((s) => !!s) )) as any; + snippets.push( + ...(await slidingWindowMatcher( + recentlyEditedDocuments, + fullPrefix, + fullSuffix, + 3, + options.slidingWindowPrefixPercentage, + options.slidingWindowSize + )) + ); + let treePath: Parser.SyntaxNode[] | undefined; try { const ast = await getAst(filepath, fullPrefix + fullSuffix); @@ -140,7 +148,7 @@ export async function constructAutocompletePrompt( // Construct basic prefix / suffix const formattedSnippets = snippets .map((snippet) => - formatExternalSnippet(snippet.filepath, snippet.content, language) + formatExternalSnippet(snippet.filepath, snippet.contents, language) ) .join("\n"); const maxPrefixTokens = diff --git a/core/autocomplete/parameters.ts b/core/autocomplete/parameters.ts index ae70787ef..c2268e073 100644 --- a/core/autocomplete/parameters.ts +++ b/core/autocomplete/parameters.ts @@ -3,8 +3,10 @@ import { TabAutocompleteOptions } from ".."; export const DEFAULT_AUTOCOMPLETE_OPTS: TabAutocompleteOptions = { useCopyBuffer: true, useSuffix: true, - maxPromptTokens: 650, + maxPromptTokens: 500, prefixPercentage: 0.85, maxSuffixPercentage: 0.25, debounceDelay: 350, + slidingWindowPrefixPercentage: 0.75, + slidingWindowSize: 100, }; diff --git a/core/autocomplete/slidingWindow.ts b/core/autocomplete/slidingWindow.ts new file mode 100644 index 000000000..5d4b99812 --- /dev/null +++ b/core/autocomplete/slidingWindow.ts @@ -0,0 +1,101 @@ +import { FileWithContents } from ".."; + +function* slidingWindow( + content: string, + windowSize: number +): Generator { + const lines = content.split("\n"); + + let charCount = 0; + let currWindowLines: string[] = []; + for (let i = 0; i < lines.length; i++) { + if (charCount + lines[i].length >= windowSize) { + yield currWindowLines.join("\n"); + currWindowLines = [lines[i]]; + charCount = 0; + } else { + currWindowLines.push(lines[i]); + } + charCount += lines[i].length; + } + + if (currWindowLines.length > 0) { + yield currWindowLines.join("\n"); + } +} + +function getSymbolsForSnippet(snippet: string): Set { + const symbols = snippet + .split( + new RegExp( + `[s\.\:\'\,\;\"\*\&\^\|\\\#\@\$\!\%\(\)\[\]\{\}\<\>\/\?\+\-\/]`, + "g" + ) + ) + .map((s) => s.trim()); + return new Set(symbols); +} + +/** + * Calculate similarity as number of shared symbols divided by total number of unique symbols between both. + */ +function slidingWindowSimilarity(a: string, b: string): number { + const aSet = getSymbolsForSnippet(a); + const bSet = getSymbolsForSnippet(b); + const totalSet = new Set([...aSet, ...bSet]); + + // Avoid division by zero + if (totalSet.size === 0) { + return 0; + } + + let intersection = 0; + for (const symbol of aSet) { + if (bSet.has(symbol)) { + intersection++; + } + } + + return intersection / totalSet.size; +} + +/** + * Match by similarity over sliding windows of recent documents. + * @param recentDocuments + * @param prefix + * @param suffix + */ +export async function slidingWindowMatcher( + recentDocuments: FileWithContents[], + prefix: string, + suffix: string, + topN: number, + slidingWindowPrefixPercentage: number, + windowSize: number +): Promise { + // Sorted lowest similarity to highest + const topMatches: (FileWithContents & { similarity: number })[] = []; + + for (const { filepath, contents } of recentDocuments) { + for (const window of slidingWindow(contents, windowSize)) { + const similarity = slidingWindowSimilarity( + window, + prefix.slice(-windowSize * slidingWindowPrefixPercentage) + + suffix.slice(windowSize * (1 - slidingWindowPrefixPercentage)) + ); + + // Insertion sort + let i = -1; + while ( + ++i < topMatches.length && + similarity > topMatches[i].similarity + ) {} + topMatches.splice(i + 1, 0, { filepath, contents, similarity }); + if (topMatches.length > topN) { + topMatches.shift(); + } + } + } + + return topMatches; +} diff --git a/core/index.d.ts b/core/index.d.ts index 9882b8d55..8b5dc6444 100644 --- a/core/index.d.ts +++ b/core/index.d.ts @@ -162,6 +162,11 @@ export interface RangeInFile { range: Range; } +export interface FileWithContents { + filepath: string; + contents: string; +} + export interface Range { start: Position; end: Position; @@ -582,6 +587,8 @@ export interface TabAutocompleteOptions { prefixPercentage: number; template?: string; multilineCompletions?: "always" | "never" | "auto"; + slidingWindowPrefixPercentage?: number; + slidingWindowSize?: number; } export interface SerializedContinueConfig { diff --git a/extensions/vscode/src/autocomplete/getTabCompletion.ts b/extensions/vscode/src/autocomplete/getTabCompletion.ts index b729cbdc8..14c0242b0 100644 --- a/extensions/vscode/src/autocomplete/getTabCompletion.ts +++ b/extensions/vscode/src/autocomplete/getTabCompletion.ts @@ -1,8 +1,7 @@ -import { TabAutocompleteOptions } from "core"; +import { FileWithContents, TabAutocompleteOptions } from "core"; import { AutocompleteLruCache } from "core/autocomplete/cache"; import { onlyWhitespaceAfterEndOfLine } from "core/autocomplete/charStream"; import { - AutocompleteSnippet, constructAutocompletePrompt, languageForFilepath, } from "core/autocomplete/constructPrompt"; @@ -26,7 +25,7 @@ async function getDefinition( uri: string, line: number, character: number -): Promise { +): Promise { const definitions = (await vscode.commands.executeCommand( "vscode.executeDefinitionProvider", vscode.Uri.parse(uri), @@ -36,7 +35,7 @@ async function getDefinition( if (definitions[0]?.targetRange) { return { filepath: uri, - content: await ideProtocolClient.readRangeInFile( + contents: await ideProtocolClient.readRangeInFile( definitions[0].targetUri.fsPath, definitions[0].targetRange ), @@ -108,7 +107,8 @@ export async function getTabCompletion( lang, getDefinition, options, - await recentlyEditedTracker.getRecentlyEditedRanges() + await recentlyEditedTracker.getRecentlyEditedRanges(), + await recentlyEditedTracker.getRecentlyEditedDocuments() ); const { template, completionOptions } = options.template diff --git a/extensions/vscode/src/autocomplete/recentlyEdited.ts b/extensions/vscode/src/autocomplete/recentlyEdited.ts index f66f26d55..d8c4cf80d 100644 --- a/extensions/vscode/src/autocomplete/recentlyEdited.ts +++ b/extensions/vscode/src/autocomplete/recentlyEdited.ts @@ -1,3 +1,4 @@ +import { FileWithContents } from "core"; import { RecentlyEditedRange } from "core/autocomplete/recentlyEdited"; import * as vscode from "vscode"; @@ -7,11 +8,19 @@ interface VsCodeRecentlyEditedRange { range: vscode.Range; } +interface VsCodeRecentlyEditedDocument { + timestamp: number; + uri: vscode.Uri; +} + export class RecentlyEditedTracker { private static staleTime = 1000 * 60 * 2; private static maxRecentlyEditedRanges = 3; private recentlyEditedRanges: VsCodeRecentlyEditedRange[] = []; + private recentlyEditedDocuments: VsCodeRecentlyEditedDocument[] = []; + private static maxRecentlyEditedDocuments = 10; + constructor() { vscode.workspace.onDidChangeTextDocument((event) => { event.contentChanges.forEach((change) => { @@ -28,6 +37,17 @@ export class RecentlyEditedTracker { ); } }); + + const newLength = this.recentlyEditedDocuments.unshift({ + uri: event.document.uri, + timestamp: Date.now(), + }); + if (newLength >= RecentlyEditedTracker.maxRecentlyEditedDocuments) { + this.recentlyEditedDocuments = this.recentlyEditedDocuments.slice( + 0, + RecentlyEditedTracker.maxRecentlyEditedDocuments + ); + } }); setInterval(() => { @@ -62,4 +82,15 @@ export class RecentlyEditedTracker { })) ); } + + public async getRecentlyEditedDocuments(): Promise { + return Promise.all( + this.recentlyEditedDocuments.map(async (entry) => ({ + filepath: entry.uri.fsPath, + contents: await vscode.workspace.fs + .readFile(entry.uri) + .then((content) => content.toString()), + })) + ); + } } From da6470762adb4f48fcdd48f867d257e671b4931d Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Fri, 23 Feb 2024 08:53:15 -0800 Subject: [PATCH 070/141] =?UTF-8?q?=F0=9F=90=9B=20fix=20autocomplete=20opt?= =?UTF-8?q?ions=20type?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/autocomplete/parameters.ts | 1 + core/index.d.ts | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/core/autocomplete/parameters.ts b/core/autocomplete/parameters.ts index c2268e073..63cb1d4eb 100644 --- a/core/autocomplete/parameters.ts +++ b/core/autocomplete/parameters.ts @@ -7,6 +7,7 @@ export const DEFAULT_AUTOCOMPLETE_OPTS: TabAutocompleteOptions = { prefixPercentage: 0.85, maxSuffixPercentage: 0.25, debounceDelay: 350, + multilineCompletions: "auto", slidingWindowPrefixPercentage: 0.75, slidingWindowSize: 100, }; diff --git a/core/index.d.ts b/core/index.d.ts index 8b5dc6444..0ceea8899 100644 --- a/core/index.d.ts +++ b/core/index.d.ts @@ -586,9 +586,9 @@ export interface TabAutocompleteOptions { maxSuffixPercentage: number; prefixPercentage: number; template?: string; - multilineCompletions?: "always" | "never" | "auto"; - slidingWindowPrefixPercentage?: number; - slidingWindowSize?: number; + multilineCompletions: "always" | "never" | "auto"; + slidingWindowPrefixPercentage: number; + slidingWindowSize: number; } export interface SerializedContinueConfig { From 25f3d7acc9ba179dac43be3582238063cc3a8be9 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Fri, 23 Feb 2024 10:23:34 -0800 Subject: [PATCH 071/141] =?UTF-8?q?=F0=9F=A9=B9=20reload=20remote=20config?= =?UTF-8?q?=20when=20settings=20change?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- extensions/vscode/src/activation/activate.ts | 5 +- extensions/vscode/src/util/remoteConfig.ts | 145 ++++++++++++------- 2 files changed, 97 insertions(+), 53 deletions(-) diff --git a/extensions/vscode/src/activation/activate.ts b/extensions/vscode/src/activation/activate.ts index 749bc180f..41af5748f 100644 --- a/extensions/vscode/src/activation/activate.ts +++ b/extensions/vscode/src/activation/activate.ts @@ -14,7 +14,7 @@ import { setupStatusBar, } from "../lang-server/completionProvider"; import { vsCodeIndexCodebase } from "../util/indexCodebase"; -import { setupRemoteConfigSync } from "../util/remoteConfig"; +import { RemoteConfigSync } from "../util/remoteConfig"; import { getExtensionVersion } from "../util/util"; import { getExtensionUri } from "../util/vscode"; import { setupInlineTips } from "./inlineTips"; @@ -159,7 +159,8 @@ export async function activateExtension(context: vscode.ExtensionContext) { } try { - setupRemoteConfigSync(); + const configSync = new RemoteConfigSync(); + configSync.setup(); } catch (e) { console.warn(`Failed to sync remote config: ${e}`); } diff --git a/extensions/vscode/src/util/remoteConfig.ts b/extensions/vscode/src/util/remoteConfig.ts index 1f4705ae2..4e482bcaf 100644 --- a/extensions/vscode/src/util/remoteConfig.ts +++ b/extensions/vscode/src/util/remoteConfig.ts @@ -1,68 +1,111 @@ import { getConfigJsPathForRemote, getConfigJsonPathForRemote, - getPathToRemoteConfig, } from "core/util/paths"; import * as fs from "fs"; import * as vscode from "vscode"; import { configHandler } from "../loadConfig"; -let remoteConfigSyncInterval: NodeJS.Timer | undefined = undefined; +export class RemoteConfigSync { + private userToken: string | null; + private remoteConfigServerUrl: string | null; + private remoteConfigSyncPeriod: number; -export async function setupRemoteConfigSync() { - const settings = vscode.workspace.getConfiguration("continue"); - const userToken = settings.get("userToken", null); - const remoteConfigServerUrl = settings.get( - "remoteConfigServerUrl", - null - ); - const remoteConfigSyncPeriod = settings.get( - "remoteConfigSyncPeriod", - 60 - ); + private syncInterval: NodeJS.Timer | undefined = undefined; - if ( - userToken === null || - remoteConfigServerUrl === null || - remoteConfigServerUrl.trim() === "" - ) { - return; + constructor() { + const { userToken, remoteConfigServerUrl, remoteConfigSyncPeriod } = + this.loadVsCodeSettings(); + this.userToken = userToken; + this.remoteConfigServerUrl = remoteConfigServerUrl; + this.remoteConfigSyncPeriod = remoteConfigSyncPeriod; + + // Listen for changes to VS Code settings, then trigger a refresh + vscode.workspace.onDidChangeConfiguration((event) => { + if (event.affectsConfiguration("continue")) { + const { userToken, remoteConfigServerUrl, remoteConfigSyncPeriod } = + this.loadVsCodeSettings(); + if ( + userToken !== this.userToken || + remoteConfigServerUrl !== this.remoteConfigServerUrl || + remoteConfigSyncPeriod !== this.remoteConfigSyncPeriod + ) { + this.userToken = userToken; + this.remoteConfigServerUrl = remoteConfigServerUrl; + this.remoteConfigSyncPeriod = remoteConfigSyncPeriod; + + this.setInterval(); + } + } + }); } - if (!URL.canParse(remoteConfigServerUrl)) { - vscode.window.showErrorMessage( - "The value set for 'remoteConfigServerUrl' is not valid: ", - remoteConfigServerUrl + + private loadVsCodeSettings() { + const settings = vscode.workspace.getConfiguration("continue"); + const userToken = settings.get("userToken", null); + const remoteConfigServerUrl = settings.get( + "remoteConfigServerUrl", + null ); - return; + const remoteConfigSyncPeriod = settings.get( + "remoteConfigSyncPeriod", + 60 + ); + + return { + userToken, + remoteConfigServerUrl, + remoteConfigSyncPeriod, + }; } - // Sync once - await syncRemoteConfig(userToken, new URL(remoteConfigServerUrl)); + async setup() { + if ( + this.userToken === null || + this.remoteConfigServerUrl === null || + this.remoteConfigServerUrl.trim() === "" + ) { + return; + } + if (!URL.canParse(this.remoteConfigServerUrl)) { + vscode.window.showErrorMessage( + "The value set for 'remoteConfigServerUrl' is not valid: ", + this.remoteConfigServerUrl + ); + return; + } - // Set timer to sync at user-defined interval - if (remoteConfigSyncInterval !== undefined) { - clearInterval(remoteConfigSyncInterval); + // Sync once + await this.sync(this.userToken, new URL(this.remoteConfigServerUrl)); + + // Set timer to sync at user-defined interval + this.setInterval(); + } + + private setInterval() { + if (this.syncInterval !== undefined) { + clearInterval(this.syncInterval); + } + this.syncInterval = setInterval(() => { + if (!this.userToken || !this.remoteConfigServerUrl) return; + this.sync(this.userToken, new URL(this.remoteConfigServerUrl)); + }, this.remoteConfigSyncPeriod * 1000); + } + + async sync(userToken: string, remoteConfigServerUrl: URL) { + const response = await fetch(new URL("sync", remoteConfigServerUrl).href, { + method: "GET", + headers: { + Authorization: `Bearer ${userToken}`, + }, + }); + + const { configJson, configJs } = await response.json(); + fs.writeFileSync( + getConfigJsonPathForRemote(remoteConfigServerUrl), + configJson + ); + fs.writeFileSync(getConfigJsPathForRemote(remoteConfigServerUrl), configJs); + configHandler.reloadConfig(); } - remoteConfigSyncInterval = setInterval(() => { - syncRemoteConfig(userToken, new URL(remoteConfigServerUrl)); - }, remoteConfigSyncPeriod * 1000); -} - -async function syncRemoteConfig(userToken: string, remoteConfigServerUrl: URL) { - const response = await fetch(new URL("sync", remoteConfigServerUrl).href, { - method: "GET", - headers: { - Authorization: `Bearer ${userToken}`, - }, - }); - - const remoteConfigDirectory = getPathToRemoteConfig(remoteConfigServerUrl); - - const { configJson, configJs } = await response.json(); - fs.writeFileSync( - getConfigJsonPathForRemote(remoteConfigServerUrl), - configJson - ); - fs.writeFileSync(getConfigJsPathForRemote(remoteConfigServerUrl), configJs); - configHandler.reloadConfig(); } From 4c8fe9da3a3f9e1a794ed868a272d54982da0ada Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Fri, 23 Feb 2024 10:27:09 -0800 Subject: [PATCH 072/141] =?UTF-8?q?=F0=9F=94=8A=20better=20error=20handlin?= =?UTF-8?q?g=20for=20remote=20config=20download?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- extensions/vscode/src/util/remoteConfig.ts | 44 +++++++++++++++------- 1 file changed, 31 insertions(+), 13 deletions(-) diff --git a/extensions/vscode/src/util/remoteConfig.ts b/extensions/vscode/src/util/remoteConfig.ts index 4e482bcaf..6daa87c8f 100644 --- a/extensions/vscode/src/util/remoteConfig.ts +++ b/extensions/vscode/src/util/remoteConfig.ts @@ -93,19 +93,37 @@ export class RemoteConfigSync { } async sync(userToken: string, remoteConfigServerUrl: URL) { - const response = await fetch(new URL("sync", remoteConfigServerUrl).href, { - method: "GET", - headers: { - Authorization: `Bearer ${userToken}`, - }, - }); + try { + const response = await fetch( + new URL("sync", remoteConfigServerUrl).href, + { + method: "GET", + headers: { + Authorization: `Bearer ${userToken}`, + }, + } + ); - const { configJson, configJs } = await response.json(); - fs.writeFileSync( - getConfigJsonPathForRemote(remoteConfigServerUrl), - configJson - ); - fs.writeFileSync(getConfigJsPathForRemote(remoteConfigServerUrl), configJs); - configHandler.reloadConfig(); + if (!response.ok) { + vscode.window.showErrorMessage( + `Failed to sync remote config (HTTP ${response.status}): ${response.statusText}` + ); + return; + } + + const { configJson, configJs } = await response.json(); + + fs.writeFileSync( + getConfigJsonPathForRemote(remoteConfigServerUrl), + configJson + ); + fs.writeFileSync( + getConfigJsPathForRemote(remoteConfigServerUrl), + configJs + ); + configHandler.reloadConfig(); + } catch (e) { + vscode.window.showErrorMessage(`Failed to sync remote config: ${e}`); + } } } From 64a346dcac2c5a1fd17bb6cf2d07d633f69b7f44 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Fri, 23 Feb 2024 10:38:34 -0800 Subject: [PATCH 073/141] =?UTF-8?q?=F0=9F=9A=A7=20basic=20ranking=20by=20s?= =?UTF-8?q?ymbol=20intersection=20similarity?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/autocomplete/constructPrompt.ts | 14 ++++++- core/autocomplete/ranking.ts | 59 ++++++++++++++++++++++++++++ core/autocomplete/slidingWindow.ts | 38 +----------------- 3 files changed, 74 insertions(+), 37 deletions(-) create mode 100644 core/autocomplete/ranking.ts diff --git a/core/autocomplete/constructPrompt.ts b/core/autocomplete/constructPrompt.ts index 39dcd7952..794cb7585 100644 --- a/core/autocomplete/constructPrompt.ts +++ b/core/autocomplete/constructPrompt.ts @@ -10,6 +10,7 @@ import { getBasename } from "../util"; import { getAst, getScopeAroundRange, getTreePathAtCursor } from "./ast"; import { AutocompleteLanguageInfo, LANGUAGES, Typescript } from "./languages"; +import { rankSnippets } from "./ranking"; import { slidingWindowMatcher } from "./slidingWindow"; export function languageForFilepath( @@ -82,7 +83,7 @@ export async function constructAutocompletePrompt( completeMultiline: boolean; }> { // Find external snippets - const snippets: FileWithContents[] = (await Promise.all( + let snippets: FileWithContents[] = (await Promise.all( recentlyEditedRanges .map(async (r) => { const scope = await getScopeAroundRange(r); @@ -145,6 +146,17 @@ export async function constructAutocompletePrompt( completeMultiline = shouldCompleteMultiline(treePath, cursorLine); } + // Rank / order the snippets + snippets = rankSnippets( + snippets, + fullPrefix, + fullSuffix, + options.slidingWindowPrefixPercentage, + options.slidingWindowSize + ); + + // How to add snippets to the prefix? Count separately? Always keep some of the prefix?? + // Construct basic prefix / suffix const formattedSnippets = snippets .map((snippet) => diff --git a/core/autocomplete/ranking.ts b/core/autocomplete/ranking.ts new file mode 100644 index 000000000..399df39ab --- /dev/null +++ b/core/autocomplete/ranking.ts @@ -0,0 +1,59 @@ +import { FileWithContents } from ".."; + +function getSymbolsForSnippet(snippet: string): Set { + const symbols = snippet + .split( + new RegExp( + `[s\.\:\'\,\;\"\*\&\^\|\\\#\@\$\!\%\(\)\[\]\{\}\<\>\/\?\+\-\/]`, + "g" + ) + ) + .map((s) => s.trim()); + return new Set(symbols); +} + +/** + * Calculate similarity as number of shared symbols divided by total number of unique symbols between both. + */ +export function symbolSimilarity(a: string, b: string): number { + const aSet = getSymbolsForSnippet(a); + const bSet = getSymbolsForSnippet(b); + const totalSet = new Set([...aSet, ...bSet]); + + // Avoid division by zero + if (totalSet.size === 0) { + return 0; + } + + let intersection = 0; + for (const symbol of aSet) { + if (bSet.has(symbol)) { + intersection++; + } + } + + return intersection / totalSet.size; +} + +/** + * Rank code snippets to be used in tab-autocomplete prompt. Returns a sorted version of the snippet array. + */ +export function rankSnippets( + snippets: FileWithContents[], + prefix: string, + suffix: string, + slidingWindowPrefixPercentage: number, + windowSize: number +): FileWithContents[] { + const scores = snippets.map((snippet) => { + const b = + prefix.slice(-windowSize * slidingWindowPrefixPercentage) + + suffix.slice(0, windowSize * (1 - slidingWindowPrefixPercentage)); + + return { + score: symbolSimilarity(snippet.contents, b), + snippet, + }; + }); + return scores.sort((a, b) => a.score - b.score).map((s) => s.snippet); +} diff --git a/core/autocomplete/slidingWindow.ts b/core/autocomplete/slidingWindow.ts index 5d4b99812..af483ec0a 100644 --- a/core/autocomplete/slidingWindow.ts +++ b/core/autocomplete/slidingWindow.ts @@ -1,4 +1,5 @@ import { FileWithContents } from ".."; +import { symbolSimilarity } from "./ranking"; function* slidingWindow( content: string, @@ -24,41 +25,6 @@ function* slidingWindow( } } -function getSymbolsForSnippet(snippet: string): Set { - const symbols = snippet - .split( - new RegExp( - `[s\.\:\'\,\;\"\*\&\^\|\\\#\@\$\!\%\(\)\[\]\{\}\<\>\/\?\+\-\/]`, - "g" - ) - ) - .map((s) => s.trim()); - return new Set(symbols); -} - -/** - * Calculate similarity as number of shared symbols divided by total number of unique symbols between both. - */ -function slidingWindowSimilarity(a: string, b: string): number { - const aSet = getSymbolsForSnippet(a); - const bSet = getSymbolsForSnippet(b); - const totalSet = new Set([...aSet, ...bSet]); - - // Avoid division by zero - if (totalSet.size === 0) { - return 0; - } - - let intersection = 0; - for (const symbol of aSet) { - if (bSet.has(symbol)) { - intersection++; - } - } - - return intersection / totalSet.size; -} - /** * Match by similarity over sliding windows of recent documents. * @param recentDocuments @@ -78,7 +44,7 @@ export async function slidingWindowMatcher( for (const { filepath, contents } of recentDocuments) { for (const window of slidingWindow(contents, windowSize)) { - const similarity = slidingWindowSimilarity( + const similarity = symbolSimilarity( window, prefix.slice(-windowSize * slidingWindowPrefixPercentage) + suffix.slice(windowSize * (1 - slidingWindowPrefixPercentage)) From ed824dcabf2fcc0afdc6f3412c1b29d35ecc595e Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Fri, 23 Feb 2024 16:04:30 -0500 Subject: [PATCH 074/141] =?UTF-8?q?=F0=9F=94=A7=20allow=20.env=20in=20conf?= =?UTF-8?q?ig.json?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/config/load.ts | 48 ++++++++++++++++++++++++--------------------- core/index.d.ts | 1 + core/util/paths.ts | 4 ++++ 3 files changed, 31 insertions(+), 22 deletions(-) diff --git a/core/config/load.ts b/core/config/load.ts index fb41ec73a..74c29e182 100644 --- a/core/config/load.ts +++ b/core/config/load.ts @@ -14,6 +14,7 @@ import { SlashCommand, } from ".."; +import dotenv from "dotenv"; import { slashCommandFromDescription, slashFromCustomCommand, @@ -33,31 +34,40 @@ import { getConfigJsonPath, getConfigJsonPathForRemote, getConfigTsPath, + getContinueDotEnvPath, migrate, } from "../util/paths"; +function resolveSerializedConfig(filepath: string): SerializedContinueConfig { + let content = fs.readFileSync(filepath, "utf8"); + let config = JSON.parse(content) as SerializedContinueConfig; + if (config.env && Array.isArray(config.env)) { + const env = { + ...process.env, + ...dotenv.parse(fs.readFileSync(getContinueDotEnvPath())), + }; + + config.env.forEach((envVar) => { + content = content.replaceAll( + new RegExp(`"${envVar}"`, "g"), + `"${env[envVar]}"` + ); + }); + } + + return JSON.parse(content); +} + function loadSerializedConfig( workspaceConfigs: ContinueRcJson[], remoteConfigServerUrl: URL | undefined ): SerializedContinueConfig { const configPath = getConfigJsonPath(); - let contents = fs.readFileSync(configPath, "utf8"); - let config = JSON.parse(contents) as SerializedContinueConfig; + let config = resolveSerializedConfig(configPath); if (config.allowAnonymousTelemetry === undefined) { config.allowAnonymousTelemetry = true; } - // Migrate to camelCase - replace all instances of "snake_case" with "camelCase" - migrate("camelCaseConfig", () => { - contents = contents - .replace(/(_\w)/g, function (m) { - return m[1].toUpperCase(); - }) - .replace("openai-aiohttp", "openai"); - - fs.writeFileSync(configPath, contents, "utf8"); - }); - migrate("codebaseContextProvider", () => { if ( !config.contextProviders?.filter((cp) => cp.name === "codebase")?.length @@ -112,17 +122,11 @@ function loadSerializedConfig( fs.writeFileSync(configPath, JSON.stringify(config, undefined, 2), "utf8"); }); - migrate("renameFreeTrialProvider", () => { - contents = contents.replace(/openai-free-trial/g, "free-trial"); - fs.writeFileSync(configPath, contents, "utf8"); - }); - if (remoteConfigServerUrl) { - const remoteConfigJson = fs.readFileSync( - getConfigJsonPathForRemote(remoteConfigServerUrl), - "utf-8" + const remoteConfigJson = resolveSerializedConfig( + getConfigJsonPathForRemote(remoteConfigServerUrl) ); - config = mergeJson(config, JSON.parse(remoteConfigJson), "merge"); + config = mergeJson(config, remoteConfigJson, "merge"); } for (const workspaceConfig of workspaceConfigs) { diff --git a/core/index.d.ts b/core/index.d.ts index 261081593..dd68f20f2 100644 --- a/core/index.d.ts +++ b/core/index.d.ts @@ -585,6 +585,7 @@ export interface TabAutocompleteOptions { } export interface SerializedContinueConfig { + env?: string[]; allowAnonymousTelemetry?: boolean; models: ModelDescription[]; systemMessage?: string; diff --git a/core/util/paths.ts b/core/util/paths.ts index b2935564e..133832158 100644 --- a/core/util/paths.ts +++ b/core/util/paths.ts @@ -210,3 +210,7 @@ export function getConfigJsonPathForRemote(remoteConfigServerUrl: URL): string { export function getConfigJsPathForRemote(remoteConfigServerUrl: URL): string { return path.join(getPathToRemoteConfig(remoteConfigServerUrl), "config.js"); } + +export function getContinueDotEnvPath(): string { + return path.join(getContinueGlobalPath(), ".env"); +} From 94052a0742ba78c85d0d27386ca45a399d42b398 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Fri, 23 Feb 2024 16:17:08 -0500 Subject: [PATCH 075/141] =?UTF-8?q?=F0=9F=90=9B=20remove=20empty=20end=20o?= =?UTF-8?q?f=20line=20for=20tab=20autocomplete?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/autocomplete/languages.ts | 72 ++++++++++++++++++++++++++-------- 1 file changed, 56 insertions(+), 16 deletions(-) diff --git a/core/autocomplete/languages.ts b/core/autocomplete/languages.ts index 0571aec3b..865f7b09d 100644 --- a/core/autocomplete/languages.ts +++ b/core/autocomplete/languages.ts @@ -57,7 +57,7 @@ export const Scala = { export const Go = { stopWords: ["func", "package", "import", "type"], comment: "//", - endOfLine: [""], + endOfLine: [], }; // Rust @@ -69,9 +69,18 @@ export const Rust = { // Haskell export const Haskell = { - stopWords: ["data", "type", "newtype", "class", "instance", "let", "in", "where"], + stopWords: [ + "data", + "type", + "newtype", + "class", + "instance", + "let", + "in", + "where", + ], comment: "--", - endOfLine: [""], + endOfLine: [], }; // PHP @@ -85,7 +94,7 @@ export const PHP = { export const RubyOnRails = { stopWords: ["def", "class", "module"], comment: "#", - endOfLine: [""], + endOfLine: [], }; // Swift @@ -106,35 +115,66 @@ export const Kotlin = { export const Ruby = { stopWords: ["class", "module", "def"], comment: "#", - endOfLine: [""], + endOfLine: [], }; // Clojure export const Clojure = { stopWords: ["def", "fn", "let", "do", "if", "defn", "ns", "defmacro"], comment: ";", - endOfLine: [""], + endOfLine: [], }; // Julia export const Julia = { - stopWords: ["function", "macro", "if", "else", "elseif", "while", "for", "begin", "end", "module"], + stopWords: [ + "function", + "macro", + "if", + "else", + "elseif", + "while", + "for", + "begin", + "end", + "module", + ], comment: "#", endOfLine: [";"], }; // F# export const FSharp = { - stopWords: ["let", "type", "module", "namespace", "open", "if", "then", "else", "match", "with"], + stopWords: [ + "let", + "type", + "module", + "namespace", + "open", + "if", + "then", + "else", + "match", + "with", + ], comment: "//", - endOfLine: [""], + endOfLine: [], }; // R export const R = { - stopWords: ["function", "if", "else", "for", "while", "repeat", "library", "require"], + stopWords: [ + "function", + "if", + "else", + "for", + "while", + "repeat", + "library", + "require", + ], comment: "#", - endOfLine: [""], + endOfLine: [], }; // Dart @@ -154,7 +194,7 @@ export const LANGUAGES: { [extension: string]: AutocompleteLanguageInfo } = { java: Java, cpp: Cpp, cxx: Cpp, - h: Cpp, + h: Cpp, hpp: Cpp, cs: CSharp, c: C, @@ -172,11 +212,11 @@ export const LANGUAGES: { [extension: string]: AutocompleteLanguageInfo } = { cljs: Clojure, cljc: Clojure, jl: Julia, - fs: FSharp, - fsi: FSharp, - fsx: FSharp, + fs: FSharp, + fsi: FSharp, + fsx: FSharp, fsscript: FSharp, r: R, R: R, dart: Dart, -}; \ No newline at end of file +}; From 26fb8042d034430179cba322f3d5ab06e7e45886 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Fri, 23 Feb 2024 16:17:31 -0500 Subject: [PATCH 076/141] =?UTF-8?q?=F0=9F=90=9B=20update=20tsconfig?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/config/load.ts | 5 ++--- core/tsconfig.json | 2 +- core/util/paths.ts | 10 ++++++++-- extensions/vscode/tsconfig.json | 2 +- extensions/vscode/yarn.lock | 7 ++++++- 5 files changed, 18 insertions(+), 8 deletions(-) diff --git a/core/config/load.ts b/core/config/load.ts index 74c29e182..e31d6da03 100644 --- a/core/config/load.ts +++ b/core/config/load.ts @@ -14,7 +14,6 @@ import { SlashCommand, } from ".."; -import dotenv from "dotenv"; import { slashCommandFromDescription, slashFromCustomCommand, @@ -34,7 +33,7 @@ import { getConfigJsonPath, getConfigJsonPathForRemote, getConfigTsPath, - getContinueDotEnvPath, + getContinueDotEnv, migrate, } from "../util/paths"; @@ -44,7 +43,7 @@ function resolveSerializedConfig(filepath: string): SerializedContinueConfig { if (config.env && Array.isArray(config.env)) { const env = { ...process.env, - ...dotenv.parse(fs.readFileSync(getContinueDotEnvPath())), + ...getContinueDotEnv(), }; config.env.forEach((envVar) => { diff --git a/core/tsconfig.json b/core/tsconfig.json index c92ea029b..8adaca34f 100644 --- a/core/tsconfig.json +++ b/core/tsconfig.json @@ -2,7 +2,7 @@ "compilerOptions": { "target": "ESNext", "useDefineForClassFields": true, - "lib": ["DOM", "DOM.Iterable", "ESNext"], + "lib": ["DOM", "DOM.Iterable", "ESNext", "ES2021"], "allowJs": false, "skipLibCheck": true, "esModuleInterop": false, diff --git a/core/util/paths.ts b/core/util/paths.ts index 133832158..5bec526b8 100644 --- a/core/util/paths.ts +++ b/core/util/paths.ts @@ -1,3 +1,4 @@ +import dotenv from "dotenv"; import * as fs from "fs"; import * as os from "os"; import * as path from "path"; @@ -211,6 +212,11 @@ export function getConfigJsPathForRemote(remoteConfigServerUrl: URL): string { return path.join(getPathToRemoteConfig(remoteConfigServerUrl), "config.js"); } -export function getContinueDotEnvPath(): string { - return path.join(getContinueGlobalPath(), ".env"); +export function getContinueDotEnv(): { [key: string]: string } { + const filepath = path.join(getContinueGlobalPath(), ".env"); + if (fs.existsSync(filepath)) { + return dotenv.parse(fs.readFileSync(filepath)); + } else { + return {}; + } } diff --git a/extensions/vscode/tsconfig.json b/extensions/vscode/tsconfig.json index 185c51a90..a46bb2042 100644 --- a/extensions/vscode/tsconfig.json +++ b/extensions/vscode/tsconfig.json @@ -3,7 +3,7 @@ "module": "commonjs", "target": "ES2020", "outDir": "out/tsc/src", - "lib": ["ES2020", "dom", "es6", "es5", "dom.iterable", "scripthost"], + "lib": ["ES2021", "dom", "es6", "es5", "dom.iterable", "scripthost"], "sourceMap": true, "rootDir": "../../", "strict": true /* enable all strict type-checking options */, diff --git a/extensions/vscode/yarn.lock b/extensions/vscode/yarn.lock index 506488bcd..d7fbcf227 100644 --- a/extensions/vscode/yarn.lock +++ b/extensions/vscode/yarn.lock @@ -696,7 +696,12 @@ resolved "https://registry.npmjs.org/@jsdevtools/ono/-/ono-7.1.3.tgz" integrity sha512-4JQNk+3mVzK3xh2rqd6RB4J46qUR19azEHBneZyTZM+c456qOrbbM/5xcR8huNCCcbVt7+UmizG6GuUvPvKUYg== -"@lancedb/vectordb-darwin-arm64@*", "@lancedb/vectordb-darwin-arm64@0.4.10": +"@lancedb/vectordb-darwin-arm64@*": + version "0.4.11" + resolved "https://registry.npmjs.org/@lancedb/vectordb-darwin-arm64/-/vectordb-darwin-arm64-0.4.11.tgz" + integrity sha512-JDOKmFnuJPFkA7ZmrzBJolROwSjWr7yMvAbi40uLBc25YbbVezodd30u2EFtIwWwtk1GqNYRZ49FZOElKYeC/Q== + +"@lancedb/vectordb-darwin-arm64@0.4.10": version "0.4.10" resolved "https://registry.npmjs.org/@lancedb/vectordb-darwin-arm64/-/vectordb-darwin-arm64-0.4.10.tgz" integrity sha512-y/uHOGb0g15pvqv5tdTyZ6oN+0QVpBmZDzKFWW6pPbuSZjB2uPqcs+ti0RB+AUdmS21kavVQqaNsw/HLKEGrHA== From 5dac3bbe05b1ba5e6e29fd566d350b8cecaad106 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Fri, 23 Feb 2024 21:09:25 -0500 Subject: [PATCH 077/141] =?UTF-8?q?=F0=9F=94=80=20merge=20fixes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/config/handler.ts | 4 +++- extensions/vscode/src/extension/vscodeExtension.ts | 8 +++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/core/config/handler.ts b/core/config/handler.ts index 341dfaf12..fe4a5019f 100644 --- a/core/config/handler.ts +++ b/core/config/handler.ts @@ -16,7 +16,8 @@ export class ConfigHandler { private savedBrowserConfig?: BrowserSerializedContinueConfig; private readonly ide: IDE; - constructor(ide: IDE) { + private readonly remoteConfigServerUrl: URL | undefined; + constructor(ide: IDE, remoteConfigServerUrl: URL | undefined) { this.ide = ide; try { this.loadConfig(); @@ -56,6 +57,7 @@ export class ConfigHandler { this.savedConfig = await loadFullConfigNode( this.ide.readFile, workspaceConfigs, + this.remoteConfigServerUrl, ideInfo.ideType ); this.savedConfig.allowAnonymousTelemetry = diff --git a/extensions/vscode/src/extension/vscodeExtension.ts b/extensions/vscode/src/extension/vscodeExtension.ts index a83b7838b..47f267230 100644 --- a/extensions/vscode/src/extension/vscodeExtension.ts +++ b/extensions/vscode/src/extension/vscodeExtension.ts @@ -30,7 +30,13 @@ export class VsCodeExtension { constructor(context: vscode.ExtensionContext) { this.diffManager = new DiffManager(context); this.ide = new VsCodeIde(this.diffManager); - this.configHandler = new ConfigHandler(this.ide); + const remoteUrl = vscode.workspace + .getConfiguration("continue") + .get("remoteConfigServerUrl", undefined); + this.configHandler = new ConfigHandler( + this.ide, + remoteUrl === undefined ? undefined : new URL(remoteUrl) + ); this.configHandler.reloadConfig(); this.verticalDiffManager = new VerticalPerLineDiffManager( this.configHandler From b3662c6d0567a5b89755b20d6e84de4df9bcb2d4 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Fri, 23 Feb 2024 21:10:45 -0500 Subject: [PATCH 078/141] =?UTF-8?q?=F0=9F=93=A6=20update=20packages?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/package-lock.json | 1 + core/yarn.lock | 25 ++++- .../src/main/resources/config_schema.json | 93 ++++++++++++++++--- extensions/vscode/package-lock.json | 1 + extensions/vscode/src/util/remoteConfig.ts | 1 - extensions/vscode/yarn.lock | 6 +- gui/package-lock.json | 1 + 7 files changed, 106 insertions(+), 22 deletions(-) diff --git a/core/package-lock.json b/core/package-lock.json index 36faa3471..e40a37190 100644 --- a/core/package-lock.json +++ b/core/package-lock.json @@ -23,6 +23,7 @@ "http-proxy-agent": "^7.0.1", "https-proxy-agent": "^7.0.3", "js-tiktoken": "^1.0.8", + "llama-tokenizer-js": "^1.1.3", "llm-code-highlighter": "^0.0.13", "node-fetch": "^3.3.2", "node-html-markdown": "^1.3.0", diff --git a/core/yarn.lock b/core/yarn.lock index a0f4ee245..b69b65048 100644 --- a/core/yarn.lock +++ b/core/yarn.lock @@ -1078,7 +1078,21 @@ adf-to-md@^1.1.0: dependencies: eslint-config-nodebb "0.1.1" -agent-base@^6.0.2, agent-base@6: +agent-base@^6.0.2: + version "6.0.2" + resolved "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz" + integrity sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ== + dependencies: + debug "4" + +agent-base@^7.0.2, agent-base@^7.1.0: + version "7.1.0" + resolved "https://registry.npmjs.org/agent-base/-/agent-base-7.1.0.tgz" + integrity sha512-o/zjMZRhJxny7OyEF+Op8X+efiELC7k7yOjMzgfzVqOzXqkBkWI79YoTdOtsuWd5BWhAGAuOY/Xa6xpiaWXiNg== + dependencies: + debug "^4.3.4" + +agent-base@6: version "6.0.2" resolved "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz" integrity sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ== @@ -1772,7 +1786,7 @@ debug@^3.2.7: dependencies: ms "^2.1.1" -debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.3, debug@~4.3.1, debug@~4.3.2, debug@4: +debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.3, debug@^4.3.4, debug@~4.3.1, debug@~4.3.2, debug@4: version "4.3.4" resolved "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz" integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== @@ -2426,7 +2440,7 @@ flatted@^3.2.9: resolved "https://registry.npmjs.org/flatted/-/flatted-3.3.1.tgz" integrity sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw== -follow-redirects@^1.15.4: +follow-redirects@^1.15.4, follow-redirects@^1.15.5: version "1.15.5" resolved "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.5.tgz" integrity sha512-vSFWUON1B+yAw1VN4xMfxgn5fTUiaOzAJCKBwIIgT/+7CuGy9+r+5gITvP62j3RmaD5Ph65UaERdOSRGUzZtgw== @@ -3560,6 +3574,11 @@ lines-and-columns@^1.1.6: resolved "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz" integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg== +llama-tokenizer-js@^1.1.3: + version "1.1.3" + resolved "https://registry.npmjs.org/llama-tokenizer-js/-/llama-tokenizer-js-1.1.3.tgz" + integrity sha512-+BUgsLCXVQJkjiD/t7PdESLn+yXJIRX/BJfwzVVYfKZ9aN3gsP9xoadBZxKnCxGz2Slby+S7x41gUr2TKNaS4Q== + llm-code-highlighter@^0.0.13: version "0.0.13" resolved "https://registry.npmjs.org/llm-code-highlighter/-/llm-code-highlighter-0.0.13.tgz" diff --git a/extensions/intellij/src/main/resources/config_schema.json b/extensions/intellij/src/main/resources/config_schema.json index b82858588..e37574e2b 100644 --- a/extensions/intellij/src/main/resources/config_schema.json +++ b/extensions/intellij/src/main/resources/config_schema.json @@ -49,6 +49,11 @@ "description": "The maximum number of tokens to generate.", "default": 600, "type": "integer" + }, + "numThreads": { + "title": "Number of threads", + "description": "The number of threads used in the generation process. Only available for Ollama (this is the num_thread parameter)", + "type": "integer" } } }, @@ -71,8 +76,15 @@ "title": "Ca Bundle Path", "description": "Path to a custom CA bundle to use when making the HTTP request", "anyOf": [ - { "type": "string" }, - { "type": "array", "items": { "type": "string" } } + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } ] }, "proxy": { @@ -291,7 +303,7 @@ "if": { "properties": { "provider": { - "enum": ["huggingface-tgi"] + "enum": ["huggingface-tgi", "huggingface-inference-api"] } } }, @@ -371,7 +383,9 @@ "llama2-13b" ] }, - { "type": "string" } + { + "type": "string" + } ] }, "markdownDescription": "Select a pre-defined option, or find an exact model ID from Replicate [here](https://replicate.com/collections/streaming-language-models)." @@ -457,7 +471,9 @@ "AUTODETECT" ] }, - { "type": "string" } + { + "type": "string" + } ] } } @@ -476,8 +492,12 @@ "properties": { "model": { "anyOf": [ - { "enum": ["claude-2", "claude-instant-1"] }, - { "type": "string" } + { + "enum": ["claude-2", "claude-instant-1"] + }, + { + "type": "string" + } ] } } @@ -526,7 +546,9 @@ "phind-codellama-34b" ] }, - { "type": "string" } + { + "type": "string" + } ], "markdownDescription": "Select a pre-defined option, or find an exact model string from Together AI [here](https://docs.together.ai/docs/inference-models)." } @@ -594,7 +616,9 @@ "starcoder-3b" ] }, - { "type": "string" } + { + "type": "string" + } ] } } @@ -639,7 +663,9 @@ "AUTODETECT" ] }, - { "type": "string" } + { + "type": "string" + } ], "markdownDescription": "Select a pre-defined option, or find the exact model tag for an Ollama model [here](https://ollama.ai/library)." } @@ -822,7 +848,9 @@ "starcoder-3b" ] }, - { "type": "string" } + { + "type": "string" + } ] } } @@ -887,7 +915,9 @@ "Generate a commit message for the current changes" ] }, - { "type": "string" } + { + "type": "string" + } ] }, "description": { @@ -1020,7 +1050,9 @@ ], "type": "string" }, - { "type": "string" } + { + "type": "string" + } ] }, "params": { @@ -1121,6 +1153,41 @@ "required": ["params"] } }, + { + "if": { + "properties": { + "name": { + "enum": ["jira"] + } + } + }, + "then": { + "properties": { + "params": { + "properties": { + "domain": { + "type": "string", + "description": "Your Jira domain, for example company.atlassian.net." + }, + "email": { + "type": "string", + "description": "The email that you log into Jira with" + }, + "token": { + "type": "string", + "description": "Your atlassian API token from https://id.atlassian.com/manage-profile/security/api-tokens" + }, + "issueQuery": { + "type": "string", + "description": "Customize the query used to find Jira issues" + } + }, + "required": ["domain", "email", "token"] + } + }, + "required": ["params"] + } + }, { "if": { "properties": { diff --git a/extensions/vscode/package-lock.json b/extensions/vscode/package-lock.json index 83f90ce39..2a4f76c91 100644 --- a/extensions/vscode/package-lock.json +++ b/extensions/vscode/package-lock.json @@ -99,6 +99,7 @@ "http-proxy-agent": "^7.0.1", "https-proxy-agent": "^7.0.3", "js-tiktoken": "^1.0.8", + "llama-tokenizer-js": "^1.1.3", "llm-code-highlighter": "^0.0.13", "node-fetch": "^3.3.2", "node-html-markdown": "^1.3.0", diff --git a/extensions/vscode/src/util/remoteConfig.ts b/extensions/vscode/src/util/remoteConfig.ts index 6daa87c8f..e84e8575d 100644 --- a/extensions/vscode/src/util/remoteConfig.ts +++ b/extensions/vscode/src/util/remoteConfig.ts @@ -4,7 +4,6 @@ import { } from "core/util/paths"; import * as fs from "fs"; import * as vscode from "vscode"; -import { configHandler } from "../loadConfig"; export class RemoteConfigSync { private userToken: string | null; diff --git a/extensions/vscode/yarn.lock b/extensions/vscode/yarn.lock index f8cdbd088..06f95b647 100644 --- a/extensions/vscode/yarn.lock +++ b/extensions/vscode/yarn.lock @@ -696,11 +696,6 @@ resolved "https://registry.npmjs.org/@jsdevtools/ono/-/ono-7.1.3.tgz" integrity sha512-4JQNk+3mVzK3xh2rqd6RB4J46qUR19azEHBneZyTZM+c456qOrbbM/5xcR8huNCCcbVt7+UmizG6GuUvPvKUYg== -"@lancedb/vectordb-darwin-arm64@*": - version "0.4.11" - resolved "https://registry.npmjs.org/@lancedb/vectordb-darwin-arm64/-/vectordb-darwin-arm64-0.4.11.tgz" - integrity sha512-JDOKmFnuJPFkA7ZmrzBJolROwSjWr7yMvAbi40uLBc25YbbVezodd30u2EFtIwWwtk1GqNYRZ49FZOElKYeC/Q== - "@lancedb/vectordb-darwin-arm64@0.4.10": version "0.4.10" resolved "https://registry.npmjs.org/@lancedb/vectordb-darwin-arm64/-/vectordb-darwin-arm64-0.4.10.tgz" @@ -2331,6 +2326,7 @@ core-util-is@1.0.2: http-proxy-agent "^7.0.1" https-proxy-agent "^7.0.3" js-tiktoken "^1.0.8" + llama-tokenizer-js "^1.1.3" llm-code-highlighter "^0.0.13" node-fetch "^3.3.2" node-html-markdown "^1.3.0" diff --git a/gui/package-lock.json b/gui/package-lock.json index 32e9df2f2..4ef3dfda7 100644 --- a/gui/package-lock.json +++ b/gui/package-lock.json @@ -87,6 +87,7 @@ "http-proxy-agent": "^7.0.1", "https-proxy-agent": "^7.0.3", "js-tiktoken": "^1.0.8", + "llama-tokenizer-js": "^1.1.3", "llm-code-highlighter": "^0.0.13", "node-fetch": "^3.3.2", "node-html-markdown": "^1.3.0", From 70293088a2878521bdd94a19855ea19fad4847e8 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Fri, 23 Feb 2024 21:15:27 -0500 Subject: [PATCH 079/141] =?UTF-8?q?=F0=9F=8E=A8=20move=20RemoteConfig=20lo?= =?UTF-8?q?ading=20to=20VsCodeExtension=20class?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- extensions/vscode/src/activation/activate.ts | 8 -------- extensions/vscode/src/extension/vscodeExtension.ts | 9 +++++++++ extensions/vscode/src/util/remoteConfig.ts | 4 ++-- extensions/vscode/yarn.lock | 5 +++++ 4 files changed, 16 insertions(+), 10 deletions(-) diff --git a/extensions/vscode/src/activation/activate.ts b/extensions/vscode/src/activation/activate.ts index 69bf90124..1d086d879 100644 --- a/extensions/vscode/src/activation/activate.ts +++ b/extensions/vscode/src/activation/activate.ts @@ -5,7 +5,6 @@ import path from "path"; import * as vscode from "vscode"; import { VsCodeExtension } from "../extension/vscodeExtension"; import registerQuickFixProvider from "../lang-server/codeActions"; -import { RemoteConfigSync } from "../util/remoteConfig"; import { getExtensionVersion } from "../util/util"; import { getExtensionUri } from "../util/vscode"; import { setupInlineTips } from "./inlineTips"; @@ -95,11 +94,4 @@ export async function activateExtension(context: vscode.ExtensionContext) { extensionVersion: getExtensionVersion(), }); } - - try { - const configSync = new RemoteConfigSync(); - configSync.setup(); - } catch (e) { - console.warn(`Failed to sync remote config: ${e}`); - } } diff --git a/extensions/vscode/src/extension/vscodeExtension.ts b/extensions/vscode/src/extension/vscodeExtension.ts index 47f267230..581c95136 100644 --- a/extensions/vscode/src/extension/vscodeExtension.ts +++ b/extensions/vscode/src/extension/vscodeExtension.ts @@ -13,6 +13,7 @@ import { setupStatusBar, } from "../lang-server/completionProvider"; import { TabAutocompleteModel } from "../util/loadAutocompleteModel"; +import { RemoteConfigSync } from "../util/remoteConfig"; import { VsCodeWebviewProtocol } from "../webviewProtocol"; export class VsCodeExtension { @@ -51,6 +52,14 @@ export class VsCodeExtension { this.extensionContext, this.verticalDiffManager ); + try { + const configSync = new RemoteConfigSync( + this.configHandler.reloadConfig.bind(this.configHandler) + ); + configSync.setup(); + } catch (e) { + console.warn(`Failed to sync remote config: ${e}`); + } // Sidebar context.subscriptions.push( diff --git a/extensions/vscode/src/util/remoteConfig.ts b/extensions/vscode/src/util/remoteConfig.ts index e84e8575d..a18b04ce8 100644 --- a/extensions/vscode/src/util/remoteConfig.ts +++ b/extensions/vscode/src/util/remoteConfig.ts @@ -12,7 +12,7 @@ export class RemoteConfigSync { private syncInterval: NodeJS.Timer | undefined = undefined; - constructor() { + constructor(private triggerReloadConfig: () => void) { const { userToken, remoteConfigServerUrl, remoteConfigSyncPeriod } = this.loadVsCodeSettings(); this.userToken = userToken; @@ -120,7 +120,7 @@ export class RemoteConfigSync { getConfigJsPathForRemote(remoteConfigServerUrl), configJs ); - configHandler.reloadConfig(); + this.triggerReloadConfig(); } catch (e) { vscode.window.showErrorMessage(`Failed to sync remote config: ${e}`); } diff --git a/extensions/vscode/yarn.lock b/extensions/vscode/yarn.lock index 06f95b647..35e475b64 100644 --- a/extensions/vscode/yarn.lock +++ b/extensions/vscode/yarn.lock @@ -696,6 +696,11 @@ resolved "https://registry.npmjs.org/@jsdevtools/ono/-/ono-7.1.3.tgz" integrity sha512-4JQNk+3mVzK3xh2rqd6RB4J46qUR19azEHBneZyTZM+c456qOrbbM/5xcR8huNCCcbVt7+UmizG6GuUvPvKUYg== +"@lancedb/vectordb-darwin-arm64@*": + version "0.4.11" + resolved "https://registry.npmjs.org/@lancedb/vectordb-darwin-arm64/-/vectordb-darwin-arm64-0.4.11.tgz" + integrity sha512-JDOKmFnuJPFkA7ZmrzBJolROwSjWr7yMvAbi40uLBc25YbbVezodd30u2EFtIwWwtk1GqNYRZ49FZOElKYeC/Q== + "@lancedb/vectordb-darwin-arm64@0.4.10": version "0.4.10" resolved "https://registry.npmjs.org/@lancedb/vectordb-darwin-arm64/-/vectordb-darwin-arm64-0.4.10.tgz" From 79ce3c5fe3c5e0b66ab62f82953a4178a85870f5 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Fri, 23 Feb 2024 21:33:51 -0500 Subject: [PATCH 080/141] =?UTF-8?q?=F0=9F=92=84=20update=20model=20info?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gui/public/logos/deepseek.png | Bin 0 -> 12243 bytes gui/src/util/modelData.ts | 159 ++++++++++++++++------------------ 2 files changed, 73 insertions(+), 86 deletions(-) create mode 100644 gui/public/logos/deepseek.png diff --git a/gui/public/logos/deepseek.png b/gui/public/logos/deepseek.png new file mode 100644 index 0000000000000000000000000000000000000000..5b98a90787069ac185872ed2d4db85e784f957b2 GIT binary patch literal 12243 zcmeHtRaae2vo3DI9kOr>?kNzjEYdk@U@{%Y>gh&t&5Gc}8V#*K@kof<+2yh>ofbgTxj}FpaSyBX| zd>nA}F;FztkT#K%gP{A65g?!-F(IJ;fqXm=0cH>||B@jfs6ToL2h5&VPj@vWBfoc+Phji{B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q=KBO{*d%gqzP$5Sdw~~+5`QziV z*eL2$5;-U-0X>Tyj=-$8!2BF+>YQ^!dHH%UrbPgEWLIWsxZ2U;?Fgu+j~i+UONi zcv$~_YqpacgeFxH5N6i=%;+1=!8RI$b8ZxFsE^xlW5}{HC&TW~*%Fk%poh}ahK%;o z04}xdQooHHQq+D>8Yb$XzxA9jb9G?|N=OJLq*O(=1Q%Ld zAxl&oMpSAToE}-U)(=8c->GT7oo#|&rqoJ^Vo8W=L?Qg|S|4WP=;X7xpD7=#I+4)! zeAS#TPEK|(M)RLWmy(c`L0j+ze>Pr)=P&tTrIJrrkK;5SsrK_Vn?cp_xi8*Zq&F7e z9yiq)x}Ms`e+d7zcQRn)6{E3bK`jbwHs7u8dEEajwbp_+zAN(ttFV7E zbfv(Aq%=vz>E4?Di{48@iiErJf~+zA>+9`1p)0rKIu}|O2!1BbGw(ZCD zh>B-ca6;=8d2T(Ln;M1& literal 0 HcmV?d00001 diff --git a/gui/src/util/modelData.ts b/gui/src/util/modelData.ts index 658fbda5a..27cbd4577 100644 --- a/gui/src/util/modelData.ts +++ b/gui/src/util/modelData.ts @@ -381,7 +381,7 @@ const mistralMedium: ModelPackage = { ], }; -const gemini: ModelPackage = { +const geminiPro: ModelPackage = { title: "Gemini Pro", description: "A highly capable model created by Google DeepMind", params: { @@ -416,6 +416,7 @@ const deepseek: ModelPackage = { model: "deepseek-7b", contextLength: 4096, }, + icon: "deepseek.png", dimensions: [ { name: "Parameter Count", @@ -463,15 +464,14 @@ const neuralChat: ModelPackage = { }; const osModels = [ - codeLlamaInstruct, - llama2Chat, + deepseek, wizardCoder, - phindCodeLlama, + codeLlamaInstruct, mistral, - codeup, + phindCodeLlama, + llama2Chat, zephyr, neuralChat, - deepseek, ]; const gpt4turbo: ModelPackage = { @@ -563,21 +563,19 @@ const AUTODETECT: ModelPackage = { }; export const MODEL_INFO: ModelPackage[] = [ + gpt4turbo, gpt4, gpt35turbo, - gpt4turbo, - gemini, + geminiPro, claude2, + deepseek, mistral, codellama70bTrial, - codeLlamaInstruct, - llama2Chat, wizardCoder, + codeLlamaInstruct, phindCodeLlama, - codeup, - chatBison, + llama2Chat, zephyr, - deepseek, ]; export const PROVIDER_INFO: { [key: string]: ModelInfo } = { @@ -653,7 +651,7 @@ export const PROVIDER_INFO: { [key: string]: ModelInfo } = { title: "Ollama", provider: "ollama", description: - "One of the fastest ways to get started with local models on Mac or Linux", + "One of the fastest ways to get started with local models on Mac, Linux, or Windows", longDescription: 'To get started with Ollama, follow these steps:\n1. Download from [ollama.ai](https://ollama.ai/) and open the application\n2. Open a terminal and run `ollama pull `. Example model names are `codellama:7b-instruct` or `llama2:7b-text`. You can find the full list [here](https://ollama.ai/library).\n3. Make sure that the model name used in step 2 is the same as the one in config.py (e.g. `model="codellama:7b-instruct"`)\n4. Once the model has finished downloading, you can start asking questions through Continue.', icon: "ollama.png", @@ -673,46 +671,6 @@ export const PROVIDER_INFO: { [key: string]: ModelInfo } = { { ...apiBaseInput, defaultValue: "http://localhost:11434" }, ], }, - mistral: { - title: "Mistral API", - provider: "mistral", - description: - "The Mistral API provides hosted access to their models, including Mistral-7b, Mixtral, and the very capable mistral-medium", - icon: "mistral.png", - longDescription: `To get access to the Mistral API, obtain your API key from the [Mistral platform](https://docs.mistral.ai/)`, - tags: [ - ModelProviderTag["Requires API Key"], - ModelProviderTag["Open-Source"], - ], - params: { - apiKey: "", - }, - collectInputFor: [ - { - inputType: CollectInputType.text, - key: "apiKey", - label: "API Key", - placeholder: "Enter your Mistral API key", - required: true, - }, - ...completionParamsInputs, - ], - packages: [mistralTiny, mistralSmall, mistralMedium].map((p) => { - p.params.contextLength = 4096; - return p; - }), - }, - llamafile: { - title: "llamafile", - provider: "llamafile", - icon: "llamafile.png", - description: - "llamafiles are a self-contained binary to run an open-source LLM", - longDescription: `To get started with llamafiles, find and download a binary on their [GitHub repo](https://github.com/Mozilla-Ocho/llamafile#binary-instructions). Then run it with the following command:\n\n\`\`\`shell\nchmod +x ./llamafile\n./llamafile\n\`\`\``, - tags: [ModelProviderTag["Local"], ModelProviderTag["Open-Source"]], - packages: osModels, - collectInputFor: [...completionParamsInputs], - }, together: { title: "TogetherAI", provider: "together", @@ -743,6 +701,55 @@ export const PROVIDER_INFO: { [key: string]: ModelInfo } = { return p; }), }, + palm: { + title: "Google Gemini API", + provider: "google-palm", + refPage: "googlepalmapi", + description: + "Try out Google's state-of-the-art Gemini model from their API.", + longDescription: `To get started with Google Gemini API, obtain your API key from [here](https://ai.google.dev/tutorials/workspace_auth_quickstart) and paste it below.`, + icon: "gemini.png", + tags: [ModelProviderTag["Requires API Key"]], + collectInputFor: [ + { + inputType: CollectInputType.text, + key: "apiKey", + label: "API Key", + placeholder: "Enter your Gemini API key", + required: true, + }, + ], + packages: [geminiPro], + }, + mistral: { + title: "Mistral API", + provider: "mistral", + description: + "The Mistral API provides hosted access to their models, including Mistral-7b, Mixtral, and the very capable mistral-medium", + icon: "mistral.png", + longDescription: `To get access to the Mistral API, obtain your API key from the [Mistral platform](https://docs.mistral.ai/)`, + tags: [ + ModelProviderTag["Requires API Key"], + ModelProviderTag["Open-Source"], + ], + params: { + apiKey: "", + }, + collectInputFor: [ + { + inputType: CollectInputType.text, + key: "apiKey", + label: "API Key", + placeholder: "Enter your Mistral API key", + required: true, + }, + ...completionParamsInputs, + ], + packages: [mistralTiny, mistralSmall, mistralMedium].map((p) => { + p.params.contextLength = 4096; + return p; + }), + }, lmstudio: { title: "LM Studio", provider: "lmstudio", @@ -767,6 +774,17 @@ export const PROVIDER_INFO: { [key: string]: ModelInfo } = { ], collectInputFor: [...completionParamsInputs], }, + llamafile: { + title: "llamafile", + provider: "llamafile", + icon: "llamafile.png", + description: + "llamafiles are a self-contained binary to run an open-source LLM", + longDescription: `To get started with llamafiles, find and download a binary on their [GitHub repo](https://github.com/Mozilla-Ocho/llamafile#binary-instructions). Then run it with the following command:\n\n\`\`\`shell\nchmod +x ./llamafile\n./llamafile\n\`\`\``, + tags: [ModelProviderTag["Local"], ModelProviderTag["Open-Source"]], + packages: osModels, + collectInputFor: [...completionParamsInputs], + }, replicate: { title: "Replicate", provider: "replicate", @@ -816,37 +834,6 @@ After it's up and running, you can start using Continue.`, packages: osModels, collectInputFor: [...completionParamsInputs], }, - palm: { - title: "Google PaLM API", - provider: "google-palm", - refPage: "googlepalmapi", - description: - "Try out the Google PaLM API, which is currently in public preview, using an API key from Google Makersuite. Includes the Gemini Pro model", - longDescription: `To get started with Google Makersuite, obtain your API key from [here](https://makersuite.google.com) and paste it below.`, - icon: "google-palm.png", - tags: [ModelProviderTag["Requires API Key"]], - collectInputFor: [ - { - inputType: CollectInputType.text, - key: "apiKey", - label: "API Key", - placeholder: "Enter your MakerSpace API key", - required: true, - }, - ], - packages: [ - gemini, - { - title: "chat-bison-001", - description: - "Google PaLM's chat-bison-001 model, fine-tuned for chatting about code", - params: { - model: "chat-bison-001", - contextLength: 8000, - }, - }, - ], - }, "openai-aiohttp": { title: "Other OpenAI-compatible API", provider: "openai", @@ -897,7 +884,7 @@ After it's up and running, you can start using Continue.`, { ...gpt35turbo, title: "GPT-3.5-Turbo (trial)" }, { ...gpt4vision, title: "GPT-4 Vision (trial)" }, { ...phindCodeLlama, title: "Phind CodeLlama (trial)" }, - { ...gemini, title: "Gemini Pro (trial)" }, + { ...geminiPro, title: "Gemini Pro (trial)" }, { ...AUTODETECT, params: { From 0422d95fe6cdb0f169426e842d22dfabf1b84b71 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Fri, 23 Feb 2024 21:43:00 -0500 Subject: [PATCH 081/141] =?UTF-8?q?=F0=9F=93=9D=20update=20tutorial?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- extensions/vscode/continue_tutorial.py | 11 ++--------- extensions/vscode/src/lang-server/codeLens.ts | 2 +- gui/src/components/InfoHover.tsx | 2 +- gui/src/components/index.ts | 8 ++++---- 4 files changed, 8 insertions(+), 15 deletions(-) diff --git a/extensions/vscode/continue_tutorial.py b/extensions/vscode/continue_tutorial.py index dff23a718..2583d5621 100644 --- a/extensions/vscode/continue_tutorial.py +++ b/extensions/vscode/continue_tutorial.py @@ -1,18 +1,11 @@ """ -Welcome to Continue! - _________ _____ _____ __ ____/______ _______ __ /____(_)_______ ____ _______ _ / _ __ \__ __ \_ __/__ / __ __ \_ / / /_ _ \ / /___ / /_/ /_ / / // /_ _ / _ / / // /_/ / / __/ \____/ \____/ /_/ /_/ \__/ /_/ /_/ /_/ \__,_/ \___/ -This is a 2 minute tutorial. - -It will walk you through the basic features: -1. Ask a question -2. Edit code -3. Debug +Welcome to Continue! This is a 2 minute tutorial. You can either - follow the instructions on your own, or @@ -72,7 +65,7 @@ accept [⌘ ⇧ ⏎] or reject [⌘ ⇧ ⌫] the edit""" # region ———————————————————————————— Part 3: Debug automatically [⌘ ⇧ R] ———————————————————————————— -"""Step 1: Run this Python file""" +"""Step 1: Run this Python file (it should error!)""" def print_sum(list_to_print): diff --git a/extensions/vscode/src/lang-server/codeLens.ts b/extensions/vscode/src/lang-server/codeLens.ts index 04df50e69..c75aa1c24 100644 --- a/extensions/vscode/src/lang-server/codeLens.ts +++ b/extensions/vscode/src/lang-server/codeLens.ts @@ -297,7 +297,7 @@ class TutorialCodeLensProvider implements vscode.CodeLensProvider { new vscode.CodeLens(range, { title: "Highlight the function", command: "continue.selectRange", - arguments: [lineOf11 + 1, lineOf11 + 8], + arguments: [lineOf11 + 3, lineOf11 + 11], }) ); } diff --git a/gui/src/components/InfoHover.tsx b/gui/src/components/InfoHover.tsx index e78f1a2c2..57fbd99c0 100644 --- a/gui/src/components/InfoHover.tsx +++ b/gui/src/components/InfoHover.tsx @@ -1,6 +1,6 @@ import { InformationCircleIcon } from "@heroicons/react/24/outline"; -import { StyledTooltip } from "."; import ReactDOM from "react-dom"; +import { StyledTooltip } from "."; const InfoHover = ({ msg }: { msg: string }) => { const id = `info-hover-${encodeURIComponent(msg)}`; diff --git a/gui/src/components/index.ts b/gui/src/components/index.ts index 1f3e66c98..f047fc1a4 100644 --- a/gui/src/components/index.ts +++ b/gui/src/components/index.ts @@ -140,10 +140,10 @@ export const StyledTooltip = styled(Tooltip)` background-color: ${vscEditorBackground}; color: ${vscForeground}; border-radius: ${defaultBorderRadius}; - box-shadow: 0 0 3px 0 ${vscForeground}; - padding: 4px; - padding-left: 8px; - padding-right: 8px; + box-shadow: 0 0 1px 0 ${vscForeground}; + padding: 2px; + padding-left: 4px; + padding-right: 4px; z-index: 1000; max-width: 80vw; From e1cfd0d594736c39c718999c6dd001921635f8e4 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Fri, 23 Feb 2024 22:46:45 -0500 Subject: [PATCH 082/141] =?UTF-8?q?=F0=9F=92=84=20button=20to=20add=20cont?= =?UTF-8?q?ext=20providers?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/web/webviewProtocol.ts | 1 + .../vscode/src/extension/vscodeExtension.ts | 4 +++- extensions/vscode/src/webviewProtocol.ts | 4 ++++ gui/src/components/mainInput/InputToolbar.tsx | 5 ++--- gui/src/components/mainInput/getSuggestion.ts | 17 ++++++++++++++++- 5 files changed, 26 insertions(+), 5 deletions(-) diff --git a/core/web/webviewProtocol.ts b/core/web/webviewProtocol.ts index bc61add77..ed84460f3 100644 --- a/core/web/webviewProtocol.ts +++ b/core/web/webviewProtocol.ts @@ -61,6 +61,7 @@ export type WebviewProtocol = Protocol & ]; errorPopup: [{ message: string }, void]; + openUrl: [string, void]; applyToCurrentFile: [{ text: string }, void]; showTutorial: [undefined, void]; showFile: [{ filepath: string }, void]; diff --git a/extensions/vscode/src/extension/vscodeExtension.ts b/extensions/vscode/src/extension/vscodeExtension.ts index 581c95136..d06d158f9 100644 --- a/extensions/vscode/src/extension/vscodeExtension.ts +++ b/extensions/vscode/src/extension/vscodeExtension.ts @@ -36,7 +36,9 @@ export class VsCodeExtension { .get("remoteConfigServerUrl", undefined); this.configHandler = new ConfigHandler( this.ide, - remoteUrl === undefined ? undefined : new URL(remoteUrl) + remoteUrl === undefined || remoteUrl === "" + ? undefined + : new URL(remoteUrl) ); this.configHandler.reloadConfig(); this.verticalDiffManager = new VerticalPerLineDiffManager( diff --git a/extensions/vscode/src/webviewProtocol.ts b/extensions/vscode/src/webviewProtocol.ts index 3476e5c0d..cc8297694 100644 --- a/extensions/vscode/src/webviewProtocol.ts +++ b/extensions/vscode/src/webviewProtocol.ts @@ -511,6 +511,10 @@ export class VsCodeWebviewProtocol { this.on("showTutorial", (msg) => { showTutorial(); }); + + this.on("openUrl", (msg) => { + vscode.env.openExternal(vscode.Uri.parse(msg.data)); + }); } public request( diff --git a/gui/src/components/mainInput/InputToolbar.tsx b/gui/src/components/mainInput/InputToolbar.tsx index e43cbd0e8..c472ac206 100644 --- a/gui/src/components/mainInput/InputToolbar.tsx +++ b/gui/src/components/mainInput/InputToolbar.tsx @@ -13,6 +13,7 @@ import { vscInputBackground, } from ".."; import { defaultModelSelector } from "../../redux/selectors/modelSelectors"; +import { getMetaKeyLabel } from "../../util"; const StyledDiv = styled.div<{ hidden?: boolean }>` position: absolute; @@ -137,9 +138,7 @@ function InputToolbar(props: InputToolbarProps) { onClick={props.useCodebase} className={"hover:underline cursor-pointer float-right"} > - {/* {downshiftProps.inputValue?.startsWith("/codebase") - ? "Using Codebase" - : `${getMetaKeyLabel()} ⏎ Use Codebase`} */} + {getMetaKeyLabel()} ⏎ Use Codebase @@ -134,6 +135,20 @@ export function getMentionSuggestion( query: result.id, }; }); + } else if ( + mainResults.length === availableContextProvidersRef.current.length + ) { + mainResults.push({ + title: "Add more context providers", + type: "action", + action: () => { + ideRequest( + "openUrl", + "https://continue.dev/docs/customization/context-providers#built-in-context-providers" + ); + }, + description: "", + }); } return mainResults; }; From 71759b36b8f4a2cacdda5cb418118e4602a4e444 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Sat, 24 Feb 2024 10:53:37 -0500 Subject: [PATCH 083/141] =?UTF-8?q?=F0=9F=A9=B9=20change=20keyboard=20shor?= =?UTF-8?q?tcut?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- extensions/vscode/package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extensions/vscode/package.json b/extensions/vscode/package.json index bbfdaa734..14c7e8d5d 100644 --- a/extensions/vscode/package.json +++ b/extensions/vscode/package.json @@ -226,8 +226,8 @@ }, { "command": "continue.toggleAuxiliaryBar", - "mac": "alt+cmd+m", - "key": "alt+ctrl+m" + "mac": "alt+cmd+l", + "key": "alt+ctrl+l" }, { "command": "continue.debugTerminal", From 28a8e81cb96ab26214f15c52a459890adb43a118 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Sat, 24 Feb 2024 19:15:07 -0500 Subject: [PATCH 084/141] =?UTF-8?q?=F0=9F=9A=A7=20jaccard=20similarity=20t?= =?UTF-8?q?o=20rank=20snippets?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/autocomplete/ast.ts | 4 +- core/autocomplete/constructPrompt.ts | 42 ++++++------ core/autocomplete/lsp.ts | 49 ++++++++++++++ core/autocomplete/parameters.ts | 2 +- core/autocomplete/ranking.ts | 38 ++++------- core/autocomplete/slidingWindow.ts | 13 ++-- .../vscode/src/autocomplete/recentlyEdited.ts | 65 ++++++++++++++----- extensions/vscode/yarn.lock | 5 ++ 8 files changed, 143 insertions(+), 75 deletions(-) create mode 100644 core/autocomplete/lsp.ts diff --git a/core/autocomplete/ast.ts b/core/autocomplete/ast.ts index 223a5ae5d..910dc36fe 100644 --- a/core/autocomplete/ast.ts +++ b/core/autocomplete/ast.ts @@ -51,10 +51,10 @@ export async function getScopeAroundRange( const lines = range.contents.split("\n"); const startIndex = lines.slice(0, s.line).join("\n").length + - lines[s.line].slice(s.character).length; + lines[s.line]?.slice(s.character).length ?? 0; const endIndex = lines.slice(0, e.line).join("\n").length + - lines[e.line].slice(0, e.character).length; + lines[e.line]?.slice(0, e.character).length ?? 0; let node = ast.rootNode; while (node.childCount > 0) { diff --git a/core/autocomplete/constructPrompt.ts b/core/autocomplete/constructPrompt.ts index 794cb7585..7b731c509 100644 --- a/core/autocomplete/constructPrompt.ts +++ b/core/autocomplete/constructPrompt.ts @@ -83,7 +83,25 @@ export async function constructAutocompletePrompt( completeMultiline: boolean; }> { // Find external snippets - let snippets: FileWithContents[] = (await Promise.all( + let snippets: FileWithContents[] = []; + + const windowAroundCursor = + fullPrefix.slice( + -options.slidingWindowSize * options.slidingWindowPrefixPercentage + ) + + fullSuffix.slice( + options.slidingWindowSize * (1 - options.slidingWindowPrefixPercentage) + ); + + const slidingWindowMatches = await slidingWindowMatcher( + recentlyEditedDocuments, + windowAroundCursor, + 3, + options.slidingWindowSize + ); + snippets.push(...slidingWindowMatches); + + const recentlyEdited = await Promise.all( recentlyEditedRanges .map(async (r) => { const scope = await getScopeAroundRange(r); @@ -91,22 +109,12 @@ export async function constructAutocompletePrompt( return { filepath: r.filepath, - content: r.contents, + contents: r.contents, }; }) .filter((s) => !!s) - )) as any; - - snippets.push( - ...(await slidingWindowMatcher( - recentlyEditedDocuments, - fullPrefix, - fullSuffix, - 3, - options.slidingWindowPrefixPercentage, - options.slidingWindowSize - )) ); + snippets.push(...(recentlyEdited as any)); let treePath: Parser.SyntaxNode[] | undefined; try { @@ -147,13 +155,7 @@ export async function constructAutocompletePrompt( } // Rank / order the snippets - snippets = rankSnippets( - snippets, - fullPrefix, - fullSuffix, - options.slidingWindowPrefixPercentage, - options.slidingWindowSize - ); + snippets = rankSnippets(snippets, windowAroundCursor); // How to add snippets to the prefix? Count separately? Always keep some of the prefix?? diff --git a/core/autocomplete/lsp.ts b/core/autocomplete/lsp.ts new file mode 100644 index 000000000..4b8e76a76 --- /dev/null +++ b/core/autocomplete/lsp.ts @@ -0,0 +1,49 @@ +import Parser from "web-tree-sitter"; +import { FileWithContents } from ".."; +import { RangeInFileWithContents } from "../commands/util"; +import { getAst, getTreePathAtCursor } from "./ast"; + +async function getDefinitionForNode( + node: Parser.SyntaxNode +): Promise { + switch (node.type) { + case "call_expression": + // function call -> function definition + break; + case "": + // variable assignment -> variable definition/type + break; + case "": + // impl of trait -> trait definition + break; + case "": + // + break; + } + return []; +} + +/** + * and other stuff not directly on the path: + * - variables defined on line above + * ...etc... + */ + +async function getDefinitionsFromLsp( + document: FileWithContents, + cursorIndex: number +): Promise { + const ast = await getAst(document.filepath, document.contents); + if (!ast) return []; + + const treePath = await getTreePathAtCursor(ast, cursorIndex); + if (!treePath) return []; + + const results: RangeInFileWithContents[] = []; + for (const node of treePath.reverse()) { + const definitions = await getDefinitionForNode(node); + results.push(...definitions); + } + + return results; +} diff --git a/core/autocomplete/parameters.ts b/core/autocomplete/parameters.ts index 63cb1d4eb..f41184088 100644 --- a/core/autocomplete/parameters.ts +++ b/core/autocomplete/parameters.ts @@ -9,5 +9,5 @@ export const DEFAULT_AUTOCOMPLETE_OPTS: TabAutocompleteOptions = { debounceDelay: 350, multilineCompletions: "auto", slidingWindowPrefixPercentage: 0.75, - slidingWindowSize: 100, + slidingWindowSize: 500, }; diff --git a/core/autocomplete/ranking.ts b/core/autocomplete/ranking.ts index 399df39ab..a5d9abbe0 100644 --- a/core/autocomplete/ranking.ts +++ b/core/autocomplete/ranking.ts @@ -1,27 +1,24 @@ import { FileWithContents } from ".."; +const rx = /[\s.,\/#!$%\^&\*;:{}=\-_`~()\[\]]/g; function getSymbolsForSnippet(snippet: string): Set { const symbols = snippet - .split( - new RegExp( - `[s\.\:\'\,\;\"\*\&\^\|\\\#\@\$\!\%\(\)\[\]\{\}\<\>\/\?\+\-\/]`, - "g" - ) - ) - .map((s) => s.trim()); + .split(rx) + .map((s) => s.trim()) + .filter((s) => s !== ""); return new Set(symbols); } /** * Calculate similarity as number of shared symbols divided by total number of unique symbols between both. */ -export function symbolSimilarity(a: string, b: string): number { +export function jaccardSimilarity(a: string, b: string): number { const aSet = getSymbolsForSnippet(a); const bSet = getSymbolsForSnippet(b); - const totalSet = new Set([...aSet, ...bSet]); + const union = new Set([...aSet, ...bSet]).size; // Avoid division by zero - if (totalSet.size === 0) { + if (union === 0) { return 0; } @@ -32,7 +29,7 @@ export function symbolSimilarity(a: string, b: string): number { } } - return intersection / totalSet.size; + return intersection / union; } /** @@ -40,20 +37,11 @@ export function symbolSimilarity(a: string, b: string): number { */ export function rankSnippets( snippets: FileWithContents[], - prefix: string, - suffix: string, - slidingWindowPrefixPercentage: number, - windowSize: number + windowAroundCursor: string ): FileWithContents[] { - const scores = snippets.map((snippet) => { - const b = - prefix.slice(-windowSize * slidingWindowPrefixPercentage) + - suffix.slice(0, windowSize * (1 - slidingWindowPrefixPercentage)); - - return { - score: symbolSimilarity(snippet.contents, b), - snippet, - }; - }); + const scores = snippets.map((snippet) => ({ + score: jaccardSimilarity(snippet.contents, windowAroundCursor), + snippet, + })); return scores.sort((a, b) => a.score - b.score).map((s) => s.snippet); } diff --git a/core/autocomplete/slidingWindow.ts b/core/autocomplete/slidingWindow.ts index af483ec0a..1a1e1935a 100644 --- a/core/autocomplete/slidingWindow.ts +++ b/core/autocomplete/slidingWindow.ts @@ -1,5 +1,5 @@ import { FileWithContents } from ".."; -import { symbolSimilarity } from "./ranking"; +import { jaccardSimilarity } from "./ranking"; function* slidingWindow( content: string, @@ -33,10 +33,8 @@ function* slidingWindow( */ export async function slidingWindowMatcher( recentDocuments: FileWithContents[], - prefix: string, - suffix: string, + windowAroundCursor: string, topN: number, - slidingWindowPrefixPercentage: number, windowSize: number ): Promise { // Sorted lowest similarity to highest @@ -44,11 +42,7 @@ export async function slidingWindowMatcher( for (const { filepath, contents } of recentDocuments) { for (const window of slidingWindow(contents, windowSize)) { - const similarity = symbolSimilarity( - window, - prefix.slice(-windowSize * slidingWindowPrefixPercentage) + - suffix.slice(windowSize * (1 - slidingWindowPrefixPercentage)) - ); + const similarity = jaccardSimilarity(window, windowAroundCursor); // Insertion sort let i = -1; @@ -63,5 +57,6 @@ export async function slidingWindowMatcher( } } + // TODO: convert the arbitrary window frame to some whole AST node? return topMatches; } diff --git a/extensions/vscode/src/autocomplete/recentlyEdited.ts b/extensions/vscode/src/autocomplete/recentlyEdited.ts index d8c4cf80d..4e942cb9f 100644 --- a/extensions/vscode/src/autocomplete/recentlyEdited.ts +++ b/extensions/vscode/src/autocomplete/recentlyEdited.ts @@ -26,28 +26,16 @@ export class RecentlyEditedTracker { event.contentChanges.forEach((change) => { const editedRange = { uri: event.document.uri, - range: change.range, + range: new vscode.Range( + new vscode.Position(change.range.start.line, 0), + new vscode.Position(change.range.end.line + 1, 0) + ), timestamp: Date.now(), }; - const newLength = this.recentlyEditedRanges.unshift(editedRange); - if (newLength >= RecentlyEditedTracker.maxRecentlyEditedRanges) { - this.recentlyEditedRanges = this.recentlyEditedRanges.slice( - 0, - RecentlyEditedTracker.maxRecentlyEditedRanges - ); - } + this.insertRange(editedRange); }); - const newLength = this.recentlyEditedDocuments.unshift({ - uri: event.document.uri, - timestamp: Date.now(), - }); - if (newLength >= RecentlyEditedTracker.maxRecentlyEditedDocuments) { - this.recentlyEditedDocuments = this.recentlyEditedDocuments.slice( - 0, - RecentlyEditedTracker.maxRecentlyEditedDocuments - ); - } + this.insertDocument(event.document.uri); }); setInterval(() => { @@ -55,6 +43,47 @@ export class RecentlyEditedTracker { }, 1000 * 15); } + private insertRange(editedRange: VsCodeRecentlyEditedRange): void { + // Check for overlap with any existing ranges + for (let i = 0; i < this.recentlyEditedRanges.length; i++) { + let range = this.recentlyEditedRanges[i]; + if (range.range.intersection(editedRange.range)) { + range = { + ...range, + range: range.range.union(editedRange.range), + }; + return; + } + } + + // Otherwise, just add the new and maintain max size + const newLength = this.recentlyEditedRanges.unshift(editedRange); + if (newLength >= RecentlyEditedTracker.maxRecentlyEditedRanges) { + this.recentlyEditedRanges = this.recentlyEditedRanges.slice( + 0, + RecentlyEditedTracker.maxRecentlyEditedRanges + ); + } + } + + private insertDocument(uri: vscode.Uri): void { + // Don't add a duplicate + if (this.recentlyEditedDocuments.some((doc) => doc.uri === uri)) { + return; + } + + const newLength = this.recentlyEditedDocuments.unshift({ + uri, + timestamp: Date.now(), + }); + if (newLength >= RecentlyEditedTracker.maxRecentlyEditedDocuments) { + this.recentlyEditedDocuments = this.recentlyEditedDocuments.slice( + 0, + RecentlyEditedTracker.maxRecentlyEditedDocuments + ); + } + } + private removeOldEntries() { this.recentlyEditedRanges = this.recentlyEditedRanges.filter( (entry) => entry.timestamp > Date.now() - RecentlyEditedTracker.staleTime diff --git a/extensions/vscode/yarn.lock b/extensions/vscode/yarn.lock index 1211ea140..d7fbcf227 100644 --- a/extensions/vscode/yarn.lock +++ b/extensions/vscode/yarn.lock @@ -696,6 +696,11 @@ resolved "https://registry.npmjs.org/@jsdevtools/ono/-/ono-7.1.3.tgz" integrity sha512-4JQNk+3mVzK3xh2rqd6RB4J46qUR19azEHBneZyTZM+c456qOrbbM/5xcR8huNCCcbVt7+UmizG6GuUvPvKUYg== +"@lancedb/vectordb-darwin-arm64@*": + version "0.4.11" + resolved "https://registry.npmjs.org/@lancedb/vectordb-darwin-arm64/-/vectordb-darwin-arm64-0.4.11.tgz" + integrity sha512-JDOKmFnuJPFkA7ZmrzBJolROwSjWr7yMvAbi40uLBc25YbbVezodd30u2EFtIwWwtk1GqNYRZ49FZOElKYeC/Q== + "@lancedb/vectordb-darwin-arm64@0.4.10": version "0.4.10" resolved "https://registry.npmjs.org/@lancedb/vectordb-darwin-arm64/-/vectordb-darwin-arm64-0.4.10.tgz" From e147b5abfec0eb2fdcca8332091eb944e2a1ee56 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Sat, 24 Feb 2024 23:35:34 -0500 Subject: [PATCH 085/141] =?UTF-8?q?=E2=9A=A1=EF=B8=8F=20deduplicate=20auto?= =?UTF-8?q?complete=20snippets?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/autocomplete/constructPrompt.ts | 18 ++--- core/autocomplete/ranking.ts | 77 +++++++++++++++++-- core/autocomplete/slidingWindow.ts | 21 +++-- .../src/autocomplete/getTabCompletion.ts | 6 +- .../vscode/src/autocomplete/recentlyEdited.ts | 28 +++++-- 5 files changed, 114 insertions(+), 36 deletions(-) diff --git a/core/autocomplete/constructPrompt.ts b/core/autocomplete/constructPrompt.ts index 7b731c509..c25228d97 100644 --- a/core/autocomplete/constructPrompt.ts +++ b/core/autocomplete/constructPrompt.ts @@ -1,5 +1,5 @@ import Parser from "web-tree-sitter"; -import { FileWithContents, TabAutocompleteOptions } from ".."; +import { TabAutocompleteOptions } from ".."; import { RangeInFileWithContents } from "../commands/util"; import { countTokens, @@ -72,10 +72,10 @@ export async function constructAutocompletePrompt( filepath: string, line: number, character: number - ) => Promise, + ) => Promise, options: TabAutocompleteOptions, recentlyEditedRanges: RangeInFileWithContents[], - recentlyEditedDocuments: FileWithContents[] + recentlyEditedDocuments: RangeInFileWithContents[] ): Promise<{ prefix: string; suffix: string; @@ -83,7 +83,7 @@ export async function constructAutocompletePrompt( completeMultiline: boolean; }> { // Find external snippets - let snippets: FileWithContents[] = []; + let snippets: RangeInFileWithContents[] = []; const windowAroundCursor = fullPrefix.slice( @@ -107,10 +107,7 @@ export async function constructAutocompletePrompt( const scope = await getScopeAroundRange(r); if (!scope) return null; - return { - filepath: r.filepath, - contents: r.contents, - }; + return r; }) .filter((s) => !!s) ); @@ -155,7 +152,10 @@ export async function constructAutocompletePrompt( } // Rank / order the snippets - snippets = rankSnippets(snippets, windowAroundCursor); + snippets = rankSnippets(snippets, windowAroundCursor).filter( + // Filter out snippets that are already in prefix + (snippet) => snippet.score < 0.98 + ); // How to add snippets to the prefix? Count separately? Always keep some of the prefix?? diff --git a/core/autocomplete/ranking.ts b/core/autocomplete/ranking.ts index a5d9abbe0..81da512eb 100644 --- a/core/autocomplete/ranking.ts +++ b/core/autocomplete/ranking.ts @@ -1,4 +1,8 @@ -import { FileWithContents } from ".."; +import { RangeInFileWithContents } from "../commands/util"; + +export type AutocompleteSnippet = RangeInFileWithContents & { + score: number; +}; const rx = /[\s.,\/#!$%\^&\*;:{}=\-_`~()\[\]]/g; function getSymbolsForSnippet(snippet: string): Set { @@ -36,12 +40,73 @@ export function jaccardSimilarity(a: string, b: string): number { * Rank code snippets to be used in tab-autocomplete prompt. Returns a sorted version of the snippet array. */ export function rankSnippets( - snippets: FileWithContents[], + ranges: RangeInFileWithContents[], windowAroundCursor: string -): FileWithContents[] { - const scores = snippets.map((snippet) => ({ +): AutocompleteSnippet[] { + const snippets = ranges.map((snippet) => ({ score: jaccardSimilarity(snippet.contents, windowAroundCursor), - snippet, + ...snippet, })); - return scores.sort((a, b) => a.score - b.score).map((s) => s.snippet); + const uniqueSnippets = deduplicateSnippets(snippets); + return uniqueSnippets.sort((a, b) => a.score - b.score); +} + +/** + * Deduplicate code snippets by merging overlapping ranges into a single range. + */ +export function deduplicateSnippets( + snippets: AutocompleteSnippet[] +): AutocompleteSnippet[] { + // Group by file + const fileGroups: { [key: string]: AutocompleteSnippet[] } = {}; + for (const snippet of snippets) { + if (!fileGroups[snippet.filepath]) { + fileGroups[snippet.filepath] = []; + } + fileGroups[snippet.filepath].push(snippet); + } + + // Merge overlapping ranges + const allRanges = []; + for (const file of Object.keys(fileGroups)) { + allRanges.push(...mergeSnippetsByRange(fileGroups[file])); + } + return allRanges; +} + +function mergeSnippetsByRange( + snippets: AutocompleteSnippet[] +): AutocompleteSnippet[] { + if (snippets.length === 0) { + return snippets; + } + + const sorted = snippets.sort( + (a, b) => a.range.start.line - b.range.start.line + ); + const merged: AutocompleteSnippet[] = []; + + while (sorted.length > 0) { + const next = sorted.shift()!; + const last = merged[merged.length - 1]; + if (merged.length > 0 && last.range.end.line >= next.range.start.line) { + // Merge with previous snippet + last.score = Math.max(last.score, next.score); + last.range.end = next.range.end; + last.contents = mergeOverlappingRangeContents(last, next); + } else { + merged.push(next); + } + } + + return merged; +} + +function mergeOverlappingRangeContents( + first: RangeInFileWithContents, + second: RangeInFileWithContents +): string { + const firstLines = first.contents.split("\n"); + const numOverlapping = first.range.end.line - second.range.start.line; + return firstLines.slice(-numOverlapping).join("\n") + "\n" + second.contents; } diff --git a/core/autocomplete/slidingWindow.ts b/core/autocomplete/slidingWindow.ts index 1a1e1935a..cfcdbb340 100644 --- a/core/autocomplete/slidingWindow.ts +++ b/core/autocomplete/slidingWindow.ts @@ -1,5 +1,5 @@ -import { FileWithContents } from ".."; -import { jaccardSimilarity } from "./ranking"; +import { RangeInFileWithContents } from "../commands/util"; +import { AutocompleteSnippet, jaccardSimilarity } from "./ranking"; function* slidingWindow( content: string, @@ -32,25 +32,22 @@ function* slidingWindow( * @param suffix */ export async function slidingWindowMatcher( - recentDocuments: FileWithContents[], + recentDocuments: RangeInFileWithContents[], windowAroundCursor: string, topN: number, windowSize: number -): Promise { +): Promise { // Sorted lowest similarity to highest - const topMatches: (FileWithContents & { similarity: number })[] = []; + const topMatches: AutocompleteSnippet[] = []; - for (const { filepath, contents } of recentDocuments) { + for (const { filepath, contents, range } of recentDocuments) { for (const window of slidingWindow(contents, windowSize)) { - const similarity = jaccardSimilarity(window, windowAroundCursor); + const score = jaccardSimilarity(window, windowAroundCursor); // Insertion sort let i = -1; - while ( - ++i < topMatches.length && - similarity > topMatches[i].similarity - ) {} - topMatches.splice(i + 1, 0, { filepath, contents, similarity }); + while (++i < topMatches.length && score > topMatches[i].score) {} + topMatches.splice(i + 1, 0, { filepath, contents, score, range }); if (topMatches.length > topN) { topMatches.shift(); } diff --git a/extensions/vscode/src/autocomplete/getTabCompletion.ts b/extensions/vscode/src/autocomplete/getTabCompletion.ts index 14c0242b0..b277cc611 100644 --- a/extensions/vscode/src/autocomplete/getTabCompletion.ts +++ b/extensions/vscode/src/autocomplete/getTabCompletion.ts @@ -1,4 +1,4 @@ -import { FileWithContents, TabAutocompleteOptions } from "core"; +import { TabAutocompleteOptions } from "core"; import { AutocompleteLruCache } from "core/autocomplete/cache"; import { onlyWhitespaceAfterEndOfLine } from "core/autocomplete/charStream"; import { @@ -11,6 +11,7 @@ import { } from "core/autocomplete/lineStream"; import { getTemplateForModel } from "core/autocomplete/templates"; import { GeneratorReuseManager } from "core/autocomplete/util"; +import { RangeInFileWithContents } from "core/commands/util"; import { streamLines } from "core/diff/util"; import OpenAI from "core/llm/llms/OpenAI"; import Handlebars from "handlebars"; @@ -25,7 +26,7 @@ async function getDefinition( uri: string, line: number, character: number -): Promise { +): Promise { const definitions = (await vscode.commands.executeCommand( "vscode.executeDefinitionProvider", vscode.Uri.parse(uri), @@ -39,6 +40,7 @@ async function getDefinition( definitions[0].targetUri.fsPath, definitions[0].targetRange ), + range: definitions[0].targetRange, }; } diff --git a/extensions/vscode/src/autocomplete/recentlyEdited.ts b/extensions/vscode/src/autocomplete/recentlyEdited.ts index 4e942cb9f..3e5847efc 100644 --- a/extensions/vscode/src/autocomplete/recentlyEdited.ts +++ b/extensions/vscode/src/autocomplete/recentlyEdited.ts @@ -1,5 +1,5 @@ -import { FileWithContents } from "core"; import { RecentlyEditedRange } from "core/autocomplete/recentlyEdited"; +import { RangeInFileWithContents } from "core/commands/util"; import * as vscode from "vscode"; interface VsCodeRecentlyEditedRange { @@ -112,14 +112,28 @@ export class RecentlyEditedTracker { ); } - public async getRecentlyEditedDocuments(): Promise { + public async getRecentlyEditedDocuments(): Promise< + RangeInFileWithContents[] + > { return Promise.all( - this.recentlyEditedDocuments.map(async (entry) => ({ - filepath: entry.uri.fsPath, - contents: await vscode.workspace.fs + this.recentlyEditedDocuments.map(async (entry) => { + const contents = await vscode.workspace.fs .readFile(entry.uri) - .then((content) => content.toString()), - })) + .then((content) => content.toString()); + const lines = contents.split("\n"); + + return { + filepath: entry.uri.fsPath, + contents, + range: { + start: { line: 0, character: 0 }, + end: { + line: lines.length - 1, + character: lines[lines.length - 1].length, + }, + }, + }; + }) ); } } From 52942824a123ca218fb3a0ad16fcce6e1b770b05 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Sun, 25 Feb 2024 10:10:39 -0500 Subject: [PATCH 086/141] =?UTF-8?q?=F0=9F=8E=A8=20update=20LSP=20usage=20f?= =?UTF-8?q?or=20autocomplete?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/autocomplete/constructPrompt.ts | 86 +++++++-------- core/autocomplete/lsp.ts | 49 --------- .../src/autocomplete/getTabCompletion.ts | 30 +----- extensions/vscode/src/autocomplete/lsp.ts | 101 ++++++++++++++++++ 4 files changed, 144 insertions(+), 122 deletions(-) delete mode 100644 core/autocomplete/lsp.ts create mode 100644 extensions/vscode/src/autocomplete/lsp.ts diff --git a/core/autocomplete/constructPrompt.ts b/core/autocomplete/constructPrompt.ts index c25228d97..f44a207e7 100644 --- a/core/autocomplete/constructPrompt.ts +++ b/core/autocomplete/constructPrompt.ts @@ -35,7 +35,7 @@ function formatExternalSnippet( const BLOCK_TYPES = ["body", "statement_block"]; -function shouldCompleteMultiline( +function shouldCompleteMultilineAst( treePath: Parser.SyntaxNode[], cursorLine: number ): boolean { @@ -62,17 +62,42 @@ function shouldCompleteMultiline( return false; } +async function shouldCompleteMultiline( + filepath: string, + fullPrefix: string, + fullSuffix: string +): Promise { + // Use AST to determine whether to complete multiline + let treePath: Parser.SyntaxNode[] | undefined; + try { + const ast = await getAst(filepath, fullPrefix + fullSuffix); + if (!ast) { + throw new Error(`AST undefined for ${filepath}`); + } + + treePath = await getTreePathAtCursor(ast, fullPrefix.length); + } catch (e) { + console.error("Failed to parse AST", e); + } + + let completeMultiline = false; + if (treePath) { + let cursorLine = fullPrefix.split("\n").length - 1; + completeMultiline = shouldCompleteMultilineAst(treePath, cursorLine); + } + return completeMultiline; +} + export async function constructAutocompletePrompt( filepath: string, fullPrefix: string, fullSuffix: string, clipboardText: string, language: AutocompleteLanguageInfo, - getDefinition: ( - filepath: string, - line: number, - character: number - ) => Promise, + getDefinitions: ( + document: RangeInFileWithContents, + cursorIndex: number + ) => Promise, options: TabAutocompleteOptions, recentlyEditedRanges: RangeInFileWithContents[], recentlyEditedDocuments: RangeInFileWithContents[] @@ -113,44 +138,6 @@ export async function constructAutocompletePrompt( ); snippets.push(...(recentlyEdited as any)); - let treePath: Parser.SyntaxNode[] | undefined; - try { - const ast = await getAst(filepath, fullPrefix + fullSuffix); - if (!ast) { - throw new Error(`AST undefined for ${filepath}`); - } - - treePath = await getTreePathAtCursor(ast, fullPrefix.length); - } catch (e) { - console.error("Failed to parse AST", e); - } - - let completeMultiline = false; - if (treePath) { - // Get function def when inside call expression - let callExpression = undefined; - for (let node of treePath.reverse()) { - if (node.type === "call_expression") { - callExpression = node; - break; - } - } - if (callExpression) { - const definition = await getDefinition( - filepath, - callExpression.startPosition.row, - callExpression.startPosition.column - ); - if (definition) { - snippets.push(definition); - } - } - - // Use AST to determine whether to complete multiline - let cursorLine = fullPrefix.split("\n").length - 1; - completeMultiline = shouldCompleteMultiline(treePath, cursorLine); - } - // Rank / order the snippets snippets = rankSnippets(snippets, windowAroundCursor).filter( // Filter out snippets that are already in prefix @@ -179,5 +166,14 @@ export async function constructAutocompletePrompt( ); let suffix = pruneLinesFromBottom(fullSuffix, maxSuffixTokens); - return { prefix, suffix, useFim: true, completeMultiline }; + return { + prefix, + suffix, + useFim: true, + completeMultiline: await shouldCompleteMultiline( + filepath, + fullPrefix, + fullSuffix + ), + }; } diff --git a/core/autocomplete/lsp.ts b/core/autocomplete/lsp.ts deleted file mode 100644 index 4b8e76a76..000000000 --- a/core/autocomplete/lsp.ts +++ /dev/null @@ -1,49 +0,0 @@ -import Parser from "web-tree-sitter"; -import { FileWithContents } from ".."; -import { RangeInFileWithContents } from "../commands/util"; -import { getAst, getTreePathAtCursor } from "./ast"; - -async function getDefinitionForNode( - node: Parser.SyntaxNode -): Promise { - switch (node.type) { - case "call_expression": - // function call -> function definition - break; - case "": - // variable assignment -> variable definition/type - break; - case "": - // impl of trait -> trait definition - break; - case "": - // - break; - } - return []; -} - -/** - * and other stuff not directly on the path: - * - variables defined on line above - * ...etc... - */ - -async function getDefinitionsFromLsp( - document: FileWithContents, - cursorIndex: number -): Promise { - const ast = await getAst(document.filepath, document.contents); - if (!ast) return []; - - const treePath = await getTreePathAtCursor(ast, cursorIndex); - if (!treePath) return []; - - const results: RangeInFileWithContents[] = []; - for (const node of treePath.reverse()) { - const definitions = await getDefinitionForNode(node); - results.push(...definitions); - } - - return results; -} diff --git a/extensions/vscode/src/autocomplete/getTabCompletion.ts b/extensions/vscode/src/autocomplete/getTabCompletion.ts index b277cc611..862bea0ef 100644 --- a/extensions/vscode/src/autocomplete/getTabCompletion.ts +++ b/extensions/vscode/src/autocomplete/getTabCompletion.ts @@ -11,42 +11,16 @@ import { } from "core/autocomplete/lineStream"; import { getTemplateForModel } from "core/autocomplete/templates"; import { GeneratorReuseManager } from "core/autocomplete/util"; -import { RangeInFileWithContents } from "core/commands/util"; import { streamLines } from "core/diff/util"; import OpenAI from "core/llm/llms/OpenAI"; import Handlebars from "handlebars"; import * as vscode from "vscode"; -import { ideProtocolClient } from "../activation/activate"; import { TabAutocompleteModel } from "../loadConfig"; import { ContinueCompletionProvider } from "./completionProvider"; +import { getDefinitionsFromLsp } from "./lsp"; import { RecentlyEditedTracker } from "./recentlyEdited"; import { setupStatusBar, stopStatusBarLoading } from "./statusBar"; -async function getDefinition( - uri: string, - line: number, - character: number -): Promise { - const definitions = (await vscode.commands.executeCommand( - "vscode.executeDefinitionProvider", - vscode.Uri.parse(uri), - new vscode.Position(line, character) - )) as any; - - if (definitions[0]?.targetRange) { - return { - filepath: uri, - contents: await ideProtocolClient.readRangeInFile( - definitions[0].targetUri.fsPath, - definitions[0].targetRange - ), - range: definitions[0].targetRange, - }; - } - - return undefined; -} - export interface AutocompleteOutcome { accepted?: boolean; time: number; @@ -107,7 +81,7 @@ export async function getTabCompletion( fullSuffix, clipboardText, lang, - getDefinition, + getDefinitionsFromLsp, options, await recentlyEditedTracker.getRecentlyEditedRanges(), await recentlyEditedTracker.getRecentlyEditedDocuments() diff --git a/extensions/vscode/src/autocomplete/lsp.ts b/extensions/vscode/src/autocomplete/lsp.ts new file mode 100644 index 000000000..1a0d8514d --- /dev/null +++ b/extensions/vscode/src/autocomplete/lsp.ts @@ -0,0 +1,101 @@ +import { RangeInFile } from "core"; +import { getAst, getTreePathAtCursor } from "core/autocomplete/ast"; +import { RangeInFileWithContents } from "core/commands/util"; +import * as vscode from "vscode"; +import Parser from "web-tree-sitter"; +import { ideProtocolClient } from "../activation/activate"; + +type GotoProviderName = + | "vscode.executeDefinitionProvider" + | "vscode.executeTypeDefinitionProvider" + | "vscode.executeDeclarationProvider" + | "vscode.executeImplementationProvider" + | "vscode.executeReferenceProvider"; +async function executeGotoProvider( + uri: string, + line: number, + character: number, + name: GotoProviderName +): Promise { + const definitions = (await vscode.commands.executeCommand( + name, + vscode.Uri.parse(uri), + new vscode.Position(line, character) + )) as any; + + return definitions.map((d: any) => ({ + filepath: uri, + range: d.targetRange, + })); +} + +async function getDefinitionsForNode( + uri: string, + node: Parser.SyntaxNode +): Promise { + const ranges: RangeInFile[] = []; + switch (node.type) { + case "call_expression": + // function call -> function definition + const defs = await executeGotoProvider( + uri, + node.startPosition.row, + node.startPosition.column, + "vscode.executeDefinitionProvider" + ); + ranges.push(...defs); + break; + case "variable_declarator": + // variable assignment -> variable definition/type + // usages of the var that appear after the declaration + break; + case "impl_item": + // impl of trait -> trait definition + break; + case "": + // function definition -> implementations? + break; + } + return ranges; +} + +/** + * and other stuff not directly on the path: + * - variables defined on line above + * ...etc... + */ + +export async function getDefinitionsFromLsp( + document: RangeInFileWithContents, + cursorIndex: number +): Promise { + const ast = await getAst(document.filepath, document.contents); + if (!ast) return []; + + const treePath = await getTreePathAtCursor(ast, cursorIndex); + if (!treePath) return []; + + const results: RangeInFileWithContents[] = []; + for (const node of treePath.reverse()) { + const definitions = await getDefinitionsForNode(document.filepath, node); + results.push( + ...(await Promise.all( + definitions.map(async (def) => ({ + ...def, + contents: await ideProtocolClient.readRangeInFile( + def.filepath, + new vscode.Range( + new vscode.Position( + def.range.start.line, + def.range.start.character + ), + new vscode.Position(def.range.end.line, def.range.end.character) + ) + ), + })) + )) + ); + } + + return results; +} From 2ea83a901b820348e246c0f9eff4f46d7db430b2 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Sun, 25 Feb 2024 12:35:35 -0500 Subject: [PATCH 087/141] =?UTF-8?q?=E2=9A=A1=EF=B8=8F=20improve=20promptin?= =?UTF-8?q?g=20for=20context=20menu=20quick=20edits?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- extensions/vscode/src/activation/activate.ts | 2 +- extensions/vscode/src/commands.ts | 12 ++++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/extensions/vscode/src/activation/activate.ts b/extensions/vscode/src/activation/activate.ts index 1d086d879..2e62fea3e 100644 --- a/extensions/vscode/src/activation/activate.ts +++ b/extensions/vscode/src/activation/activate.ts @@ -78,7 +78,7 @@ export async function activateExtension(context: vscode.ExtensionContext) { const vscodeExtension = new VsCodeExtension(context); - migrate("showWelcome", () => { + migrate("showWelcome_1", () => { vscode.commands.executeCommand( "markdown.showPreview", vscode.Uri.file( diff --git a/extensions/vscode/src/commands.ts b/extensions/vscode/src/commands.ts index 307d35dfb..09aef12d1 100644 --- a/extensions/vscode/src/commands.ts +++ b/extensions/vscode/src/commands.ts @@ -232,10 +232,14 @@ const commandsMap: ( } }, "continue.writeCommentsForCode": async () => { - await verticalDiffManager.streamEdit("Write comments for this code"); + await verticalDiffManager.streamEdit( + "Write comments for this code. Do not change anything about the code itself." + ); }, "continue.writeDocstringForCode": async () => { - await verticalDiffManager.streamEdit("Write a docstring for this code"); + await verticalDiffManager.streamEdit( + "Write a docstring for this code. Do not change anything about the code itself." + ); }, "continue.fixCode": async () => { await verticalDiffManager.streamEdit("Fix this code"); @@ -245,7 +249,7 @@ const commandsMap: ( }, "continue.fixGrammar": async () => { await verticalDiffManager.streamEdit( - "If there are any grammar or spelling mistakes in this writing, fix them" + "If there are any grammar or spelling mistakes in this writing, fix them. Do not make other large changes to the writing." ); }, "continue.viewLogs": async () => { @@ -264,7 +268,7 @@ const commandsMap: ( const terminalContents = await ide.getTerminalContents(); vscode.commands.executeCommand("continue.continueGUIView.focus"); sidebar.webviewProtocol?.request("userInput", { - input: `I got the following error, can you please help explain how to fix it?\n\n${terminalContents}`, + input: `I got the following error, can you please help explain how to fix it?\n\n${terminalContents.trim()}`, }); }, "continue.hideInlineTip": () => { From f1c0fe7c8eb7abef4688e8133e73e96c4a669f45 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Sun, 25 Feb 2024 13:04:49 -0500 Subject: [PATCH 088/141] =?UTF-8?q?=F0=9F=90=9B=20fix=20focus=20shortcut?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/llm/countTokens.ts | 2 +- extensions/vscode/media/welcome.md | 14 ++++++---- gui/src/components/mainInput/TipTapEditor.tsx | 20 +++++++------ gui/src/pages/history.tsx | 28 ++++++++----------- 4 files changed, 31 insertions(+), 33 deletions(-) diff --git a/core/llm/countTokens.ts b/core/llm/countTokens.ts index fddbee08a..292efd09e 100644 --- a/core/llm/countTokens.ts +++ b/core/llm/countTokens.ts @@ -1,5 +1,5 @@ import { Tiktoken, encodingForModel as _encodingForModel } from "js-tiktoken"; -// @ts-expect-error +// @ts-ignore import llamaTokenizer from "llama-tokenizer-js"; import { ChatMessage, MessageContent, MessagePart } from ".."; import { autodetectTemplateType } from "./autodetect"; diff --git a/extensions/vscode/media/welcome.md b/extensions/vscode/media/welcome.md index e7b3b6e52..a82406b1f 100644 --- a/extensions/vscode/media/welcome.md +++ b/extensions/vscode/media/welcome.md @@ -1,13 +1,9 @@ # 👋 Welcome to Continue -## ❗️ Before you get started - -Continue is currently in the left sidebar, but we recommend moving it to the right. This way it won't cover your file explorer. You can move it back at any time. - -![Move Continue to right sidebar](./sidebar.gif) - ## 🔑 Most important shortcuts +> If you've been using Continue, these have changed + Cmd/Ctrl + L = Select code Cmd/Ctrl + Shift + L = Select code for follow-up @@ -16,6 +12,12 @@ Continue is currently in the left sidebar, but we recommend moving it to the rig Cmd/Ctrl + Shift + R = Automatically debug terminal +## ❗️ Before you get started + +Continue is currently in the left sidebar, but we recommend moving it to the right. This way it won't cover your file explorer. You can move it back at any time. + +![Move Continue to right sidebar](./sidebar.gif) + ## ⚡️ Setting up tab autocomplete 1. Download [Ollama](https://ollama.ai) diff --git a/gui/src/components/mainInput/TipTapEditor.tsx b/gui/src/components/mainInput/TipTapEditor.tsx index ba3c21c86..de1be0e86 100644 --- a/gui/src/components/mainInput/TipTapEditor.tsx +++ b/gui/src/components/mainInput/TipTapEditor.tsx @@ -353,7 +353,7 @@ function TipTapEditor(props: TipTapEditorProps) { const handleKeyDown = (event: any) => { if ( isMetaEquivalentKeyPressed(event) && - (isJetBrains() ? event.code === "KeyJ" : event.code === "KeyM") + (isJetBrains() ? event.code === "KeyJ" : event.code === "KeyL") ) { setIgnoreHighlightedCode(true); setTimeout(() => { @@ -393,7 +393,9 @@ function TipTapEditor(props: TipTapEditorProps) { if (historyLength > 0) { saveSession(); } - editor?.commands.focus("end"); + setTimeout(() => { + editor?.commands.focus("end"); + }, 20); }, [historyLength, saveSession, editor, props.isMainInput] ); @@ -404,7 +406,9 @@ function TipTapEditor(props: TipTapEditorProps) { if (!props.isMainInput) { return; } - editor?.commands.focus("end"); + setTimeout(() => { + editor?.commands.focus("end"); + }, 20); }, [editor, props.isMainInput] ); @@ -416,7 +420,9 @@ function TipTapEditor(props: TipTapEditorProps) { return; } saveSession(); - editor?.commands.focus("end"); + setTimeout(() => { + editor?.commands.focus("end"); + }, 20); }, [editor, props.isMainInput] ); @@ -476,11 +482,7 @@ function TipTapEditor(props: TipTapEditorProps) { ); useEffect(() => { - if (!props.isMainInput) { - return; - } - - if (editor && !document.hasFocus()) { + if (props.isMainInput && editor && document.hasFocus()) { editor.commands.focus(); // setTimeout(() => { // // https://github.com/continuedev/continue/pull/881 diff --git a/gui/src/pages/history.tsx b/gui/src/pages/history.tsx index b276f1ce9..6110818ef 100644 --- a/gui/src/pages/history.tsx +++ b/gui/src/pages/history.tsx @@ -113,7 +113,9 @@ function TableRow({ navigate("/"); }} > -
    {session.title}
    +
    + {JSON.stringify(session.title).slice(1, -1)} +
    {date.toLocaleString("en-US", { year: "2-digit", @@ -271,28 +273,20 @@ function History() { )} */}
    - {sessions.filter((session) => { - if ( - !filteringByWorkspace || - typeof workspacePaths === "undefined" || - typeof session.workspaceDirectory === "undefined" - ) { - return true; - } - return workspacePaths.includes(session.workspaceDirectory); - }).length === 0 && ( -
    - No past sessions found. To start a new session, either click the "+" - button or use the keyboard shortcut: Option + Command + N -
    - )} -
    setSearchTerm(e.target.value)} /> + + {filteredAndSortedSessions.length === 0 && ( +
    + No past sessions found. To start a new session, either click the "+" + button or use the keyboard shortcut: Option + Command + N +
    + )} +
    {filteredAndSortedSessions.map((session, index) => { From 5b852f8b51453652cac1aad167e25e0c8e24682b Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Sun, 25 Feb 2024 13:11:05 -0500 Subject: [PATCH 089/141] =?UTF-8?q?=F0=9F=90=9B=20fix=20keyboard=20shortcu?= =?UTF-8?q?ts=20for=20full=20screen=20mode?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- extensions/vscode/src/commands.ts | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/extensions/vscode/src/commands.ts b/extensions/vscode/src/commands.ts index 09aef12d1..f2e9dc8e0 100644 --- a/extensions/vscode/src/commands.ts +++ b/extensions/vscode/src/commands.ts @@ -12,6 +12,13 @@ import { VerticalPerLineDiffManager } from "./diff/verticalPerLine/manager"; import { AutocompleteOutcome } from "./lang-server/completionProvider"; import { VsCodeWebviewProtocol } from "./webviewProtocol"; +function getFullScreenTab() { + const tabs = vscode.window.tabGroups.all.flatMap((tabGroup) => tabGroup.tabs); + return tabs.find( + (tab) => (tab.input as any).viewType?.endsWith("continue.continueGUIView") + ); +} + function addHighlightedCodeToContext( edit: boolean, webviewProtocol: VsCodeWebviewProtocol | undefined @@ -134,12 +141,16 @@ const commandsMap: ( } }, "continue.focusContinueInput": async () => { - vscode.commands.executeCommand("continue.continueGUIView.focus"); + if (!getFullScreenTab()) { + vscode.commands.executeCommand("continue.continueGUIView.focus"); + } sidebar.webviewProtocol?.request("focusContinueInput", undefined); addHighlightedCodeToContext(false, sidebar.webviewProtocol); }, "continue.focusContinueInputWithoutClear": async () => { - vscode.commands.executeCommand("continue.continueGUIView.focus"); + if (!getFullScreenTab()) { + vscode.commands.executeCommand("continue.continueGUIView.focus"); + } sidebar.webviewProtocol?.request( "focusContinueInputWithoutClear", undefined @@ -325,13 +336,7 @@ const commandsMap: ( }, "continue.toggleFullScreen": () => { // Check if full screen is already open by checking open tabs - const tabs = vscode.window.tabGroups.all.flatMap( - (tabGroup) => tabGroup.tabs - ); - - const fullScreenTab = tabs.find( - (tab) => (tab.input as any).viewType?.endsWith("continue.continueGUIView") - ); + const fullScreenTab = getFullScreenTab(); // Check if the active editor is the Continue GUI View if (fullScreenTab && fullScreenTab.isActive) { From 7f4694fe2810ea0a32a4ca0dce3534b0e9e98db6 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Sun, 25 Feb 2024 16:42:43 -0500 Subject: [PATCH 090/141] =?UTF-8?q?=F0=9F=90=9B=20revert=20transformers.js?= =?UTF-8?q?=20away=20from=20worker=5Fthread?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../TransformersJsEmbeddingsProvider.ts | 73 +++++++++++++------ 1 file changed, 52 insertions(+), 21 deletions(-) diff --git a/core/indexing/embeddings/TransformersJsEmbeddingsProvider.ts b/core/indexing/embeddings/TransformersJsEmbeddingsProvider.ts index e959b699f..4773e6f0b 100644 --- a/core/indexing/embeddings/TransformersJsEmbeddingsProvider.ts +++ b/core/indexing/embeddings/TransformersJsEmbeddingsProvider.ts @@ -1,12 +1,37 @@ -import { Worker } from "worker_threads"; +import { + PipelineType, + env, + pipeline, +} from "../../vendor/node_modules/@xenova/transformers"; + import BaseEmbeddingsProvider from "./BaseEmbeddingsProvider"; +env.allowLocalModels = true; +env.allowRemoteModels = false; +if (typeof window === "undefined") { + // The embeddings provider should just never be called in the browser + env.localModelPath = `${__dirname}/../models`; +} + +class EmbeddingsPipeline { + static task: PipelineType = "feature-extraction"; + static model = "all-MiniLM-L6-v2"; + static instance: any | null = null; + + static async getInstance() { + if (this.instance === null) { + this.instance = await pipeline(this.task, this.model); + } + + return this.instance; + } +} + class TransformersJsEmbeddingsProvider extends BaseEmbeddingsProvider { static MaxGroupSize: number = 4; - static ModelName: string = "all-MiniLM-L2-v6"; constructor() { - super({ model: TransformersJsEmbeddingsProvider.ModelName }); + super({ model: "all-MiniLM-L2-v6" }); } get id(): string { @@ -14,27 +39,33 @@ class TransformersJsEmbeddingsProvider extends BaseEmbeddingsProvider { } async embed(chunks: string[]) { - return new Promise((resolve, reject) => { - const worker = new Worker("./TransformersJsWorkerThread.js"); + let extractor = await EmbeddingsPipeline.getInstance(); - worker.postMessage(chunks); + if (!extractor) { + throw new Error("TransformerJS embeddings pipeline is not initialized"); + } - worker.on("message", (result) => { - if (result.error) { - reject(new Error(result.error)); - } else { - resolve(result); - } + if (chunks.length === 0) { + return []; + } + + let outputs = []; + for ( + let i = 0; + i < chunks.length; + i += TransformersJsEmbeddingsProvider.MaxGroupSize + ) { + let chunkGroup = chunks.slice( + i, + i + TransformersJsEmbeddingsProvider.MaxGroupSize + ); + let output = await extractor(chunkGroup, { + pooling: "mean", + normalize: true, }); - - worker.on("error", reject); - - worker.on("exit", (code) => { - if (code !== 0) { - reject(new Error(`Worker stopped with exit code ${code}`)); - } - }); - }) as any; + outputs.push(...output.tolist()); + } + return outputs; } } From dd603bad5c58d807fc0589365101b599b1c254e3 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Sun, 25 Feb 2024 16:48:44 -0500 Subject: [PATCH 091/141] =?UTF-8?q?=F0=9F=90=9B=20fix=20bug=20when=20slash?= =?UTF-8?q?=20command=20called=20without=20input?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gui/src/components/mainInput/resolveInput.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gui/src/components/mainInput/resolveInput.ts b/gui/src/components/mainInput/resolveInput.ts index 603a074fb..377d2998a 100644 --- a/gui/src/components/mainInput/resolveInput.ts +++ b/gui/src/components/mainInput/resolveInput.ts @@ -124,7 +124,9 @@ async function resolveEditorContent( if (slashCommand) { let lastTextIndex = findLastIndex(parts, (part) => part.type === "text"); - parts[lastTextIndex].text = `${slashCommand} ${parts[lastTextIndex].text}`; + parts[lastTextIndex].text = `${slashCommand} ${ + parts[lastTextIndex]?.text || "" + }`; } return [contextItems, selectedCode, parts]; From 83e05352510c171f7f8b7ed6db0f055cbdb9b44a Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Sun, 25 Feb 2024 22:06:32 -0500 Subject: [PATCH 092/141] =?UTF-8?q?=F0=9F=90=9B=20actually=20fix=20empty?= =?UTF-8?q?=20input=20with=20slash=20command=20bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gui/src/components/mainInput/resolveInput.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/gui/src/components/mainInput/resolveInput.ts b/gui/src/components/mainInput/resolveInput.ts index 377d2998a..dee35d1aa 100644 --- a/gui/src/components/mainInput/resolveInput.ts +++ b/gui/src/components/mainInput/resolveInput.ts @@ -124,9 +124,12 @@ async function resolveEditorContent( if (slashCommand) { let lastTextIndex = findLastIndex(parts, (part) => part.type === "text"); - parts[lastTextIndex].text = `${slashCommand} ${ - parts[lastTextIndex]?.text || "" - }`; + const lastPart = `${slashCommand} ${parts[lastTextIndex]?.text || ""}`; + if (parts.length > 0) { + parts[lastTextIndex].text = lastPart; + } else { + parts = [{ type: "text", text: lastPart }]; + } } return [contextItems, selectedCode, parts]; From 2e266595a86bf5daf6a295a4c660464cbbb3225d Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Sun, 25 Feb 2024 22:33:50 -0500 Subject: [PATCH 093/141] =?UTF-8?q?=F0=9F=92=84=20confirmation=20modal=20t?= =?UTF-8?q?o=20confirm=20deletion=20of=20model?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/dialogs/ConfirmationDialog.tsx | 54 +++++++++++++++++++ gui/src/components/dialogs/index.tsx | 2 +- .../components/mainInput/ContinueInputBox.tsx | 2 + .../components/modelSelection/ModelSelect.tsx | 18 ++++++- gui/src/pages/gui.tsx | 34 ++++-------- 5 files changed, 83 insertions(+), 27 deletions(-) create mode 100644 gui/src/components/dialogs/ConfirmationDialog.tsx diff --git a/gui/src/components/dialogs/ConfirmationDialog.tsx b/gui/src/components/dialogs/ConfirmationDialog.tsx new file mode 100644 index 000000000..39aab9658 --- /dev/null +++ b/gui/src/components/dialogs/ConfirmationDialog.tsx @@ -0,0 +1,54 @@ +import { useDispatch } from "react-redux"; +import styled from "styled-components"; +import { Button } from ".."; +import { + setDialogMessage, + setShowDialog, +} from "../../redux/slices/uiStateSlice"; + +const GridDiv = styled.div` + display: grid; + grid-template-columns: 1fr 1fr; + grid-gap: 8px; + align-items: center; +`; + +interface ConfirmationDialogProps { + onConfirm: () => void; + onCancel?: () => void; + text: string; +} + +function ConfirmationDialog(props: ConfirmationDialogProps) { + const dispatch = useDispatch(); + + return ( +
    +

    Confirmation

    +

    {props.text}

    + + + + + +
    + ); +} + +export default ConfirmationDialog; diff --git a/gui/src/components/dialogs/index.tsx b/gui/src/components/dialogs/index.tsx index 3b7dad5ca..69ae3ab96 100644 --- a/gui/src/components/dialogs/index.tsx +++ b/gui/src/components/dialogs/index.tsx @@ -16,7 +16,7 @@ const ScreenCover = styled.div` width: 100%; height: 100%; background-color: ${parseColorForHex(VSC_BACKGROUND_VAR)}aa; - z-index: 100; + z-index: 1000; `; const DialogContainer = styled.div` diff --git a/gui/src/components/mainInput/ContinueInputBox.tsx b/gui/src/components/mainInput/ContinueInputBox.tsx index 7ce46029b..d88423f22 100644 --- a/gui/src/components/mainInput/ContinueInputBox.tsx +++ b/gui/src/components/mainInput/ContinueInputBox.tsx @@ -58,6 +58,7 @@ interface ContinueInputBoxProps { editorState?: JSONContent; contextItems?: ContextItemWithId[]; + hidden?: boolean; } function ContinueInputBox(props: ContinueInputBoxProps) { @@ -92,6 +93,7 @@ function ContinueInputBox(props: ContinueInputBoxProps) { style={{ paddingTop: "4px", backgroundColor: vscBackground, + display: props.hidden ? "none" : "inherit", }} >
    { - postToIde("config/deleteModel", { title: option.title }); + dispatch(setShowDialog(true)); + dispatch( + setDialogMessage( + { + postToIde("config/deleteModel", { title: option.title }); + }} + /> + ) + ); e.stopPropagation(); e.preventDefault(); }} diff --git a/gui/src/pages/gui.tsx b/gui/src/pages/gui.tsx index 953c62745..52d8f5a1b 100644 --- a/gui/src/pages/gui.tsx +++ b/gui/src/pages/gui.tsx @@ -36,7 +36,6 @@ import { newSession, setInactive } from "../redux/slices/stateSlice"; import { setDialogEntryOn, setDialogMessage, - setDisplayBottomMessageOnBottom, setShowDialog, } from "../redux/slices/uiStateSlice"; import { RootStore } from "../redux/store"; @@ -166,22 +165,6 @@ function GUI(props: GUIProps) { const topGuiDivRef = useRef(null); // #region Effects - - // Set displayBottomMessageOnBottom - const aboveComboBoxDivRef = useRef(null); - const bottomMessage = useSelector( - (state: RootStore) => state.uiState.bottomMessage - ); - useEffect(() => { - if (!aboveComboBoxDivRef.current) return; - dispatch( - setDisplayBottomMessageOnBottom( - aboveComboBoxDivRef.current.getBoundingClientRect().top < - window.innerHeight / 2 - ) - ); - }, [bottomMessage, aboveComboBoxDivRef.current]); - const [userScrolledAwayFromBottom, setUserScrolledAwayFromBottom] = useState(false); @@ -388,6 +371,7 @@ function GUI(props: GUIProps) { > {item.message.role === "user" ? ( { streamResponse(editorState, index); }} @@ -448,14 +432,14 @@ function GUI(props: GUIProps) { })} -
    - {active || ( - - )} + + {active ? ( <>
    From e8c76c7df73105c7ed3c124e1d1939c4de3a674c Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Sun, 25 Feb 2024 23:39:55 -0500 Subject: [PATCH 094/141] =?UTF-8?q?=F0=9F=90=9B=20fix=20/edit=20incorrect?= =?UTF-8?q?=20prompt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/commands/slash/edit.ts | 2 +- core/config/handler.ts | 20 +++++++++---------- .../vscode/src/extension/vscodeExtension.ts | 17 +++++++++++++++- 3 files changed, 26 insertions(+), 13 deletions(-) diff --git a/core/commands/slash/edit.ts b/core/commands/slash/edit.ts index 9ebdb39c4..80b773d88 100644 --- a/core/commands/slash/edit.ts +++ b/core/commands/slash/edit.ts @@ -428,7 +428,7 @@ const EditSlashCommand: SlashCommand = { } let messages = history; - messages.push({ role: "user", content: prompt }); + messages[messages.length - 1] = { role: "user", content: prompt }; let linesOfPrefixCopied = 0; let lines = []; diff --git a/core/config/handler.ts b/core/config/handler.ts index fe4a5019f..0c82d94fa 100644 --- a/core/config/handler.ts +++ b/core/config/handler.ts @@ -17,8 +17,15 @@ export class ConfigHandler { private readonly ide: IDE; private readonly remoteConfigServerUrl: URL | undefined; - constructor(ide: IDE, remoteConfigServerUrl: URL | undefined) { + private readonly writeLog: (text: string) => void; + constructor( + ide: IDE, + remoteConfigServerUrl: URL | undefined, + writeLog: (text: string) => void + ) { this.ide = ide; + this.remoteConfigServerUrl = remoteConfigServerUrl; + this.writeLog = writeLog; try { this.loadConfig(); } catch (e) { @@ -171,16 +178,7 @@ export class ConfigHandler { }; llm.writeLog = async (log: string) => { - // const outputChannel = vscode.window.createOutputChannel( - // "Continue - LLM Prompt/Completion" - // ); - // outputChannel.appendLine( - // "==========================================================================" - // ); - // outputChannel.appendLine( - // "==========================================================================" - // ); - // outputChannel.append(log); + this.writeLog(log); }; return llm; } diff --git a/extensions/vscode/src/extension/vscodeExtension.ts b/extensions/vscode/src/extension/vscodeExtension.ts index d06d158f9..82a0355bb 100644 --- a/extensions/vscode/src/extension/vscodeExtension.ts +++ b/extensions/vscode/src/extension/vscodeExtension.ts @@ -34,12 +34,27 @@ export class VsCodeExtension { const remoteUrl = vscode.workspace .getConfiguration("continue") .get("remoteConfigServerUrl", undefined); + + // Config Handler with output channel + const outputChannel = vscode.window.createOutputChannel( + "Continue - LLM Prompt/Completion" + ); this.configHandler = new ConfigHandler( this.ide, remoteUrl === undefined || remoteUrl === "" ? undefined - : new URL(remoteUrl) + : new URL(remoteUrl), + async (log: string) => { + outputChannel.appendLine( + "==========================================================================" + ); + outputChannel.appendLine( + "==========================================================================" + ); + outputChannel.append(log); + } ); + this.configHandler.reloadConfig(); this.verticalDiffManager = new VerticalPerLineDiffManager( this.configHandler From 9ba2e76705f162cfb97d3591bfef2e89c75f1834 Mon Sep 17 00:00:00 2001 From: Ihor Pavlenko Date: Mon, 26 Feb 2024 05:49:14 +0100 Subject: [PATCH 095/141] Fix streamDiff tests (#796) * fix: make streamDiff tests to pass * add missing lline --- core/diff/streamDiff.ts | 30 +++++++++++++++++++++--------- core/diff/util.ts | 4 ++-- core/test/diff.test.ts | 31 ++++++++++++++++++++++++++++++- 3 files changed, 53 insertions(+), 12 deletions(-) diff --git a/core/diff/streamDiff.ts b/core/diff/streamDiff.ts index 410a16835..a7f22ef0d 100644 --- a/core/diff/streamDiff.ts +++ b/core/diff/streamDiff.ts @@ -13,14 +13,15 @@ export async function* streamDiff( oldLines: string[], newLines: LineStream ): AsyncGenerator { - oldLines = [...oldLines]; // be careful + const mutatedOldLines = [...oldLines]; // be careful let seenIndentationMistake = false; let newLineResult = await newLines.next(); + const postponedLines: string[] = []; while (oldLines.length > 0 && !newLineResult.done) { const [matchIndex, isPerfectMatch, newLine] = matchLine( newLineResult.value, - oldLines, + mutatedOldLines, seenIndentationMistake ); if (!seenIndentationMistake && newLineResult.value !== newLine) { @@ -29,20 +30,25 @@ export async function* streamDiff( if (matchIndex < 0) { // Insert new line - yield { type: "new", line: newLine }; + postponedLines.push(newLine); } else { // Insert all deleted lines before match for (let i = 0; i < matchIndex; i++) { - yield { type: "old", line: oldLines.shift()! }; + yield { type: "old", line: mutatedOldLines.shift()! }; + } + if (postponedLines.length > 0) { + for (let i = 0; i <= postponedLines.length; i++) { + yield { type: "new", line: postponedLines.shift()! }; + } } if (isPerfectMatch) { // Same - yield { type: "same", line: oldLines.shift()! }; + yield { type: "same", line: mutatedOldLines.shift()! }; } else { // Delete old line and insert the new - yield { type: "old", line: oldLines.shift()! }; - yield { type: "new", line: newLine }; + yield { type: "old", line: mutatedOldLines.shift()! }; + postponedLines.push(newLine); } } @@ -50,16 +56,22 @@ export async function* streamDiff( } // Once at the edge, only one choice - if (newLineResult.done === true && oldLines.length > 0) { + if (newLineResult.done === true && mutatedOldLines.length > 0) { for (let oldLine of oldLines) { yield { type: "old", line: oldLine }; } } - if (!newLineResult.done && oldLines.length === 0) { + if (!newLineResult.done && mutatedOldLines.length === 0) { yield { type: "new", line: newLineResult.value }; for await (const newLine of newLines) { yield { type: "new", line: newLine }; } } + + if (postponedLines.length > 0) { + for await (const newLine of postponedLines) { + yield { type: "new", line: newLine }; + } + } } diff --git a/core/diff/util.ts b/core/diff/util.ts index 9a41b18b8..f5df65307 100644 --- a/core/diff/util.ts +++ b/core/diff/util.ts @@ -41,8 +41,8 @@ export function matchLine( } else if (linesMatch(newLine, oldLines[i])) { // This is a way to fix indentation, but only for sufficiently long lines to avoid matching whitespace or short lines if ( - newLine.trimStart() === oldLines[i].trimStart() && - (permissiveAboutIndentation || newLine.trim().length > 8) + newLine.trimStart() === oldLines[i].trimStart() // && + // (permissiveAboutIndentation) || newLine.trim().length > 8) ) { return [i, true, oldLines[i]]; } diff --git a/core/test/diff.test.ts b/core/test/diff.test.ts index 92a5cfc2f..ccbbfa4b6 100644 --- a/core/test/diff.test.ts +++ b/core/test/diff.test.ts @@ -1,6 +1,18 @@ import { streamDiff } from "../diff/streamDiff"; const oldCode = [ + `A +B`, + `A +B +C`, + `A +B +C +A +B +B +A`, `function mergeSortAlgorithm() { // TODO: implement }`, @@ -10,6 +22,19 @@ const oldCode = [ ]; const newCode = [ + `C +D`, + `D +E +C +F +C`, + `C +B +A +B +A +C`, `function mergeSortAlgorithm(arr: number[]): number[] { if (arr.length <= 1) { return arr; @@ -113,7 +138,11 @@ describe("streamDiff", () => { // Check that there are no red lines immediately following green (they should always be above) for (let i = 1; i < diff.length; i++) { if (diff[i].type === "old" && diff[i - 1].type === "new") { - throw new Error("Found red immediately after green line"); + throw new Error( + `Found red '${diff[i].line}' immediately after green line '${ + diff[i - 1].line + }` + ); } } }); From fb5f567498486922757e5aaddbe0825cf7018e6d Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Sun, 25 Feb 2024 23:57:30 -0500 Subject: [PATCH 096/141] =?UTF-8?q?=F0=9F=A7=AA=20add=20new=20test=20for?= =?UTF-8?q?=20diff=20streaming?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/test/diff.test.ts | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/core/test/diff.test.ts b/core/test/diff.test.ts index 92a5cfc2f..ccbbfa4b6 100644 --- a/core/test/diff.test.ts +++ b/core/test/diff.test.ts @@ -1,6 +1,18 @@ import { streamDiff } from "../diff/streamDiff"; const oldCode = [ + `A +B`, + `A +B +C`, + `A +B +C +A +B +B +A`, `function mergeSortAlgorithm() { // TODO: implement }`, @@ -10,6 +22,19 @@ const oldCode = [ ]; const newCode = [ + `C +D`, + `D +E +C +F +C`, + `C +B +A +B +A +C`, `function mergeSortAlgorithm(arr: number[]): number[] { if (arr.length <= 1) { return arr; @@ -113,7 +138,11 @@ describe("streamDiff", () => { // Check that there are no red lines immediately following green (they should always be above) for (let i = 1; i < diff.length; i++) { if (diff[i].type === "old" && diff[i - 1].type === "new") { - throw new Error("Found red immediately after green line"); + throw new Error( + `Found red '${diff[i].line}' immediately after green line '${ + diff[i - 1].line + }` + ); } } }); From 638e6a79a480ddd403ce8335249c2f8c44894e75 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Mon, 26 Feb 2024 00:18:07 -0500 Subject: [PATCH 097/141] =?UTF-8?q?=F0=9F=90=9B=20revert=20changes=20to=20?= =?UTF-8?q?fix=20streaming=20bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/diff/streamDiff.ts | 28 ++++++++-------------------- core/diff/util.ts | 4 ++-- 2 files changed, 10 insertions(+), 22 deletions(-) diff --git a/core/diff/streamDiff.ts b/core/diff/streamDiff.ts index a7f22ef0d..912fc20db 100644 --- a/core/diff/streamDiff.ts +++ b/core/diff/streamDiff.ts @@ -17,11 +17,10 @@ export async function* streamDiff( let seenIndentationMistake = false; let newLineResult = await newLines.next(); - const postponedLines: string[] = []; while (oldLines.length > 0 && !newLineResult.done) { const [matchIndex, isPerfectMatch, newLine] = matchLine( newLineResult.value, - mutatedOldLines, + oldLines, seenIndentationMistake ); if (!seenIndentationMistake && newLineResult.value !== newLine) { @@ -30,25 +29,20 @@ export async function* streamDiff( if (matchIndex < 0) { // Insert new line - postponedLines.push(newLine); + yield { type: "new", line: newLine }; } else { // Insert all deleted lines before match for (let i = 0; i < matchIndex; i++) { - yield { type: "old", line: mutatedOldLines.shift()! }; - } - if (postponedLines.length > 0) { - for (let i = 0; i <= postponedLines.length; i++) { - yield { type: "new", line: postponedLines.shift()! }; - } + yield { type: "old", line: oldLines.shift()! }; } if (isPerfectMatch) { // Same - yield { type: "same", line: mutatedOldLines.shift()! }; + yield { type: "same", line: oldLines.shift()! }; } else { // Delete old line and insert the new - yield { type: "old", line: mutatedOldLines.shift()! }; - postponedLines.push(newLine); + yield { type: "old", line: oldLines.shift()! }; + yield { type: "new", line: newLine }; } } @@ -56,22 +50,16 @@ export async function* streamDiff( } // Once at the edge, only one choice - if (newLineResult.done === true && mutatedOldLines.length > 0) { + if (newLineResult.done === true && oldLines.length > 0) { for (let oldLine of oldLines) { yield { type: "old", line: oldLine }; } } - if (!newLineResult.done && mutatedOldLines.length === 0) { + if (!newLineResult.done && oldLines.length === 0) { yield { type: "new", line: newLineResult.value }; for await (const newLine of newLines) { yield { type: "new", line: newLine }; } } - - if (postponedLines.length > 0) { - for await (const newLine of postponedLines) { - yield { type: "new", line: newLine }; - } - } } diff --git a/core/diff/util.ts b/core/diff/util.ts index f5df65307..9a41b18b8 100644 --- a/core/diff/util.ts +++ b/core/diff/util.ts @@ -41,8 +41,8 @@ export function matchLine( } else if (linesMatch(newLine, oldLines[i])) { // This is a way to fix indentation, but only for sufficiently long lines to avoid matching whitespace or short lines if ( - newLine.trimStart() === oldLines[i].trimStart() // && - // (permissiveAboutIndentation) || newLine.trim().length > 8) + newLine.trimStart() === oldLines[i].trimStart() && + (permissiveAboutIndentation || newLine.trim().length > 8) ) { return [i, true, oldLines[i]]; } From 94667079e6ee374405401a57d96b89b56cf65acc Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Mon, 26 Feb 2024 11:25:27 -0500 Subject: [PATCH 098/141] =?UTF-8?q?=F0=9F=94=80=20update=20config=5Frc=5Fs?= =?UTF-8?q?chema.json?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- extensions/vscode/continue_rc_schema.json | 399 ++++++++-------------- 1 file changed, 139 insertions(+), 260 deletions(-) diff --git a/extensions/vscode/continue_rc_schema.json b/extensions/vscode/continue_rc_schema.json index a15ef58b2..9bb22db63 100644 --- a/extensions/vscode/continue_rc_schema.json +++ b/extensions/vscode/continue_rc_schema.json @@ -245,10 +245,7 @@ "apiType": { "title": "Api Type", "markdownDescription": "OpenAI API type, either `openai` or `azure`", - "enum": [ - "openai", - "azure" - ] + "enum": ["openai", "azure"] }, "apiVersion": { "title": "Api Version", @@ -261,11 +258,7 @@ "type": "string" } }, - "required": [ - "title", - "provider", - "model" - ], + "required": ["title", "provider", "model"], "allOf": [ { "if": { @@ -275,9 +268,7 @@ } }, "not": { - "required": [ - "provider" - ] + "required": ["provider"] } }, "then": { @@ -302,48 +293,33 @@ ] } }, - "required": [ - "provider" - ] + "required": ["provider"] }, "then": { - "required": [ - "apiKey" - ] + "required": ["apiKey"] } }, { "if": { "properties": { "provider": { - "enum": [ - "huggingface-tgi", - "huggingface-inference-api" - ] + "enum": ["huggingface-tgi", "huggingface-inference-api"] } } }, "then": { - "required": [ - "apiBase" - ] + "required": ["apiBase"] }, - "required": [ - "provider" - ] + "required": ["provider"] }, { "if": { "properties": { "provider": { - "enum": [ - "openai" - ] + "enum": ["openai"] } }, - "required": [ - "provider" - ] + "required": ["provider"] }, "then": { "properties": { @@ -363,14 +339,10 @@ "if": { "properties": { "provider": { - "enum": [ - "openai" - ] + "enum": ["openai"] } }, - "required": [ - "provider" - ] + "required": ["provider"] }, "then": { "properties": { @@ -393,14 +365,10 @@ "if": { "properties": { "provider": { - "enum": [ - "replicate" - ] + "enum": ["replicate"] } }, - "required": [ - "provider" - ] + "required": ["provider"] }, "then": { "properties": { @@ -428,14 +396,10 @@ "if": { "properties": { "provider": { - "enum": [ - "free-trial" - ] + "enum": ["free-trial"] } }, - "required": [ - "provider" - ] + "required": ["provider"] }, "then": { "properties": { @@ -457,9 +421,7 @@ "if": { "properties": { "provider": { - "enum": [ - "openai" - ] + "enum": ["openai"] }, "apiType": { "not": { @@ -467,9 +429,7 @@ } } }, - "required": [ - "provider" - ] + "required": ["provider"] }, "then": { "properties": { @@ -523,24 +483,17 @@ "if": { "properties": { "provider": { - "enum": [ - "anthropic" - ] + "enum": ["anthropic"] } }, - "required": [ - "provider" - ] + "required": ["provider"] }, "then": { "properties": { "model": { "anyOf": [ { - "enum": [ - "claude-2", - "claude-instant-1" - ] + "enum": ["claude-2", "claude-instant-1"] }, { "type": "string" @@ -554,22 +507,15 @@ "if": { "properties": { "provider": { - "enum": [ - "google-palm" - ] + "enum": ["google-palm"] } }, - "required": [ - "provider" - ] + "required": ["provider"] }, "then": { "properties": { "model": { - "enum": [ - "chat-bison-001", - "gemini-pro" - ] + "enum": ["chat-bison-001", "gemini-pro"] } } } @@ -578,14 +524,10 @@ "if": { "properties": { "provider": { - "enum": [ - "together" - ] + "enum": ["together"] } }, - "required": [ - "provider" - ] + "required": ["provider"] }, "then": { "properties": { @@ -617,14 +559,10 @@ "if": { "properties": { "provider": { - "enum": [ - "deepinfra" - ] + "enum": ["deepinfra"] } }, - "required": [ - "provider" - ] + "required": ["provider"] }, "then": { "properties": { @@ -647,9 +585,7 @@ ] } }, - "required": [ - "provider" - ] + "required": ["provider"] }, "then": { "properties": { @@ -692,14 +628,10 @@ "if": { "properties": { "provider": { - "enum": [ - "ollama" - ] + "enum": ["ollama"] } }, - "required": [ - "provider" - ] + "required": ["provider"] }, "then": { "properties": { @@ -744,23 +676,15 @@ "if": { "properties": { "provider": { - "enum": [ - "mistral" - ] + "enum": ["mistral"] } }, - "required": [ - "provider" - ] + "required": ["provider"] }, "then": { "properties": { "model": { - "enum": [ - "mistral-tiny", - "mistral-small", - "mistral-medium" - ] + "enum": ["mistral-tiny", "mistral-small", "mistral-medium"] } } } @@ -772,30 +696,20 @@ "const": "azure" } }, - "required": [ - "apiType" - ] + "required": ["apiType"] }, "then": { - "required": [ - "engine", - "apiVersion", - "apiBase" - ] + "required": ["engine", "apiVersion", "apiBase"] } }, { "if": { "properties": { "provider": { - "enum": [ - "openai" - ] + "enum": ["openai"] } }, - "required": [ - "provider" - ] + "required": ["provider"] }, "then": { "properties": { @@ -812,9 +726,7 @@ "const": "llamafile" } }, - "required": [ - "provider" - ] + "required": ["provider"] }, "then": { "properties": { @@ -828,14 +740,10 @@ "if": { "properties": { "provider": { - "enum": [ - "text-gen-webui" - ] + "enum": ["text-gen-webui"] } }, - "required": [ - "provider" - ] + "required": ["provider"] }, "then": { "properties": { @@ -849,14 +757,10 @@ "if": { "properties": { "provider": { - "enum": [ - "flowise" - ] + "enum": ["flowise"] } }, - "required": [ - "provider" - ] + "required": ["provider"] }, "then": { "properties": { @@ -883,10 +787,7 @@ "type": "string" } }, - "required": [ - "key", - "value" - ] + "required": ["key", "value"] } }, "additionalFlowiseConfiguration": { @@ -905,10 +806,7 @@ "description": "Configuration Property value" } }, - "required": [ - "key", - "value" - ] + "required": ["key", "value"] } }, "model": { @@ -985,9 +883,7 @@ "type": "string" } }, - "required": [ - "default" - ] + "required": ["default"] }, "SlashCommand": { "title": "SlashCommand", @@ -1044,9 +940,7 @@ "if": { "properties": { "name": { - "enum": [ - "issue" - ] + "enum": ["issue"] } } }, @@ -1059,23 +953,17 @@ "description": "Enter the URL of the GitHub repository for which you want to generate the issue." } }, - "required": [ - "repositoryUrl" - ] + "required": ["repositoryUrl"] } }, - "required": [ - "params" - ] + "required": ["params"] } }, { "if": { "properties": { "name": { - "enum": [ - "edit" - ] + "enum": ["edit"] } } }, @@ -1097,10 +985,7 @@ } } ], - "required": [ - "name", - "description" - ] + "required": ["name", "description"] }, "CustomCommand": { "title": "CustomCommand", @@ -1119,11 +1004,7 @@ "type": "string" } }, - "required": [ - "name", - "prompt", - "description" - ] + "required": ["name", "prompt", "description"] }, "ContextProviderWithParams": { "title": "ContextProviderWithParams", @@ -1187,9 +1068,7 @@ "if": { "properties": { "name": { - "enum": [ - "google" - ] + "enum": ["google"] } } }, @@ -1202,23 +1081,17 @@ "description": "Your API key for https://serper.dev in order to get Google search results" } }, - "required": [ - "serperApiKey" - ] + "required": ["serperApiKey"] } }, - "required": [ - "params" - ] + "required": ["params"] } }, { "if": { "properties": { "name": { - "enum": [ - "open" - ] + "enum": ["open"] } } }, @@ -1240,9 +1113,7 @@ "if": { "properties": { "name": { - "enum": [ - "issue" - ] + "enum": ["issue"] } } }, @@ -1271,37 +1142,85 @@ "type": { "type": "string", "description": "The type of issues to search for", - "enum": [ - "open", - "closed", - "all" - ] + "enum": ["open", "closed", "all"] } }, - "required": [ - "owner", - "repo" - ] + "required": ["owner", "repo"] } } }, - "required": [ - "repos" - ] + "required": ["repos"] } }, - "required": [ - "params" - ] + "required": ["params"] } }, { "if": { "properties": { "name": { - "enum": [ - "jira" - ] + "enum": ["database"] + } + } + }, + "then": { + "connections": { + "type": "array", + "description": "A list of database connections", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "A unique name for this database connection" + }, + "connection_type": { + "type": "string", + "description": "The type of database (e.g., 'postgres', 'mysql')", + "enum": ["postgres", "mysql", "sqlite"] + }, + "connection": { + "type": "object", + "properties": { + "user": { + "type": "string", + "description": "The database user name" + }, + "host": { + "type": "string", + "description": "The host address of the database server" + }, + "database": { + "type": "string", + "description": "The name of the database to connect to" + }, + "password": { + "type": "string", + "description": "The password for the database user" + }, + "port": { + "type": "integer", + "description": "The port number to connect to at the host" + }, + "filename": { + "type": "string", + "description": "File location for simple file DB's" + } + }, + "required": [] + } + }, + "required": ["name", "type", "connection"] + } + } + }, + "required": ["connections"] + }, + { + "if": { + "properties": { + "name": { + "enum": ["jira"] } } }, @@ -1326,25 +1245,17 @@ "description": "Customize the query used to find Jira issues" } }, - "required": [ - "domain", - "email", - "token" - ] + "required": ["domain", "email", "token"] } }, - "required": [ - "params" - ] + "required": ["params"] } }, { "if": { "properties": { "name": { - "enum": [ - "http" - ] + "enum": ["http"] } } }, @@ -1357,24 +1268,17 @@ "description": "The HTTP endpoint of your context provider server." } }, - "required": [ - "url" - ] + "required": ["url"] } }, - "required": [ - "params" - ] + "required": ["params"] } }, { "if": { "properties": { "name": { - "enum": [ - "codebase", - "folder" - ] + "enum": ["codebase", "folder"] } } }, @@ -1409,9 +1313,7 @@ "if": { "properties": { "name": { - "enum": [ - "postgres" - ] + "enum": ["postgres"] } } }, @@ -1463,19 +1365,11 @@ } } }, - "required": [ - "host", - "port", - "user", - "password", - "database" - ] + "required": ["host", "port", "user", "password", "database"] } } ], - "required": [ - "name" - ] + "required": ["name"] }, "SerializedContinueConfig": { "title": "config.json", @@ -1593,11 +1487,7 @@ "type": "object", "properties": { "provider": { - "enum": [ - "transformers.js", - "ollama", - "openai" - ] + "enum": ["transformers.js", "ollama", "openai"] }, "model": { "type": "string" @@ -1609,27 +1499,19 @@ "type": "string" } }, - "required": [ - "provider" - ], + "required": ["provider"], "allOf": [ { "if": { "properties": { "provider": { - "enum": [ - "ollama" - ] + "enum": ["ollama"] } }, - "required": [ - "provider" - ] + "required": ["provider"] }, "then": { - "required": [ - "model" - ] + "required": ["model"] } } ] @@ -1685,10 +1567,7 @@ }, "mergeBehavior": { "type": "string", - "enum": [ - "merge", - "overwrite" - ], + "enum": ["merge", "overwrite"], "default": "merge", "title": "Merge behavior", "markdownDescription": "If set to 'merge', .continuerc.json will be applied on top of config.json (arrays and objects are merged). If set to 'overwrite', then every top-level property of .continuerc.json will overwrite that property from config.json." @@ -1696,4 +1575,4 @@ } } } -} \ No newline at end of file +} From d774b75ffaf4671c5790a5aac1beba985d1e05df Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Mon, 26 Feb 2024 11:31:35 -0500 Subject: [PATCH 099/141] =?UTF-8?q?=F0=9F=90=9B=20fix=20windows=20path=20t?= =?UTF-8?q?o=20transformers.js=20model?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/indexing/embeddings/TransformersJsEmbeddingsProvider.ts | 3 ++- core/indexing/embeddings/TransformersJsWorkerThread.js | 3 ++- extensions/vscode/package.json | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/core/indexing/embeddings/TransformersJsEmbeddingsProvider.ts b/core/indexing/embeddings/TransformersJsEmbeddingsProvider.ts index 4773e6f0b..b4918ae3c 100644 --- a/core/indexing/embeddings/TransformersJsEmbeddingsProvider.ts +++ b/core/indexing/embeddings/TransformersJsEmbeddingsProvider.ts @@ -4,13 +4,14 @@ import { pipeline, } from "../../vendor/node_modules/@xenova/transformers"; +import path from "path"; import BaseEmbeddingsProvider from "./BaseEmbeddingsProvider"; env.allowLocalModels = true; env.allowRemoteModels = false; if (typeof window === "undefined") { // The embeddings provider should just never be called in the browser - env.localModelPath = `${__dirname}/../models`; + env.localModelPath = path.join(__dirname, "..", "models"); } class EmbeddingsPipeline { diff --git a/core/indexing/embeddings/TransformersJsWorkerThread.js b/core/indexing/embeddings/TransformersJsWorkerThread.js index 775e16a05..4ec59603c 100644 --- a/core/indexing/embeddings/TransformersJsWorkerThread.js +++ b/core/indexing/embeddings/TransformersJsWorkerThread.js @@ -1,3 +1,4 @@ +import path from "path"; import { env, pipeline, @@ -9,7 +10,7 @@ env.allowLocalModels = true; env.allowRemoteModels = false; if (typeof window === "undefined") { // The embeddings provider should just never be called in the browser - env.localModelPath = `${__dirname}/../models`; + env.localModelPath = path.join(__dirname, "..", "models"); } class EmbeddingsPipeline { diff --git a/extensions/vscode/package.json b/extensions/vscode/package.json index 984857634..61a9f08b3 100644 --- a/extensions/vscode/package.json +++ b/extensions/vscode/package.json @@ -1,7 +1,7 @@ { "name": "continue", "icon": "media/icon.png", - "version": "0.9.67", + "version": "0.9.72", "repository": { "type": "git", "url": "https://github.com/continuedev/continue" From 490b90029e3eb88d141876336c5ebc6d9c9e8a35 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Mon, 26 Feb 2024 15:11:32 -0500 Subject: [PATCH 100/141] =?UTF-8?q?=F0=9F=90=9B=20fix=20small=20input=20bu?= =?UTF-8?q?gs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/package-lock.json | 134 ++++++- core/package.json | 3 +- core/yarn.lock | 113 +++++- .../src/main/resources/config_schema.json | 126 +++++- extensions/vscode/continue_rc_schema.json | 358 ++++++++++++++---- extensions/vscode/package-lock.json | 5 +- extensions/vscode/yarn.lock | 18 +- gui/package-lock.json | 1 + .../components/mainInput/ContinueInputBox.tsx | 5 +- gui/src/components/mainInput/TipTapEditor.tsx | 16 +- gui/src/pages/gui.tsx | 2 - 11 files changed, 665 insertions(+), 116 deletions(-) diff --git a/core/package-lock.json b/core/package-lock.json index d01ad1a17..78a409287 100644 --- a/core/package-lock.json +++ b/core/package-lock.json @@ -16,6 +16,7 @@ "axios": "^1.6.7", "cheerio": "^1.0.0-rc.12", "commander": "^12.0.0", + "dbinfoz": "^0.1.4", "dotenv": "^16.3.1", "fastest-levenshtein": "^1.0.16", "follow-redirects": "^1.15.5", @@ -3381,6 +3382,16 @@ "node": ">= 12" } }, + "node_modules/dbinfoz": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/dbinfoz/-/dbinfoz-0.1.4.tgz", + "integrity": "sha512-MB56+xS571ip7qoXqxdnOUtXebbWaqoZN+S++W51SQYJRSjQFGEIPucNmxgeQlBGJ1vM4mQNV47wzV6fcrezZg==", + "dependencies": { + "mysql2": "^3.9.1", + "pg": "^8.11.3", + "sqlite3": "^5.1.7" + } + }, "node_modules/debug": { "version": "4.3.4", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", @@ -3494,6 +3505,14 @@ "integrity": "sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==", "optional": true }, + "node_modules/denque": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/denque/-/denque-2.1.0.tgz", + "integrity": "sha512-HVQE3AAb/pxF8fQAoiqpvg9i3evqug3hoiwakOyZAwJm+6vZehbkYXZ0l4JxS+I3QxM97v5aaRNhj8v5oBhekw==", + "engines": { + "node": ">=0.10" + } + }, "node_modules/deprecation": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/deprecation/-/deprecation-2.3.1.tgz", @@ -4646,6 +4665,14 @@ "node": "^12.13.0 || ^14.15.0 || >=16.0.0" } }, + "node_modules/generate-function": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/generate-function/-/generate-function-2.3.1.tgz", + "integrity": "sha512-eeB5GfMNeevm/GRYq20ShmsaGcmI81kIX2K9XQx5miC8KdHaC6Jm0qQ8ZNeGOi7wYB8OsdxKs+Y2oVuTFuVwKQ==", + "dependencies": { + "is-property": "^1.0.2" + } + }, "node_modules/gensync": { "version": "1.0.0-beta.2", "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", @@ -5054,7 +5081,6 @@ "version": "0.6.3", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", - "optional": true, "dependencies": { "safer-buffer": ">= 2.1.2 < 3.0.0" }, @@ -5371,6 +5397,11 @@ "node": ">=8" } }, + "node_modules/is-property": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz", + "integrity": "sha512-Ks/IoX00TtClbGQr4TWXemAnktAQvYB7HzcCxDGqEZU6oCmb2INHuOoKxbtR+HFkmYWBKv/dOZtGRiAjDhj92g==" + }, "node_modules/is-regex": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", @@ -6722,6 +6753,56 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, + "node_modules/mysql2": { + "version": "3.9.2", + "resolved": "https://registry.npmjs.org/mysql2/-/mysql2-3.9.2.tgz", + "integrity": "sha512-3Cwg/UuRkAv/wm6RhtPE5L7JlPB877vwSF6gfLAS68H+zhH+u5oa3AieqEd0D0/kC3W7qIhYbH419f7O9i/5nw==", + "dependencies": { + "denque": "^2.1.0", + "generate-function": "^2.3.1", + "iconv-lite": "^0.6.3", + "long": "^5.2.1", + "lru-cache": "^8.0.0", + "named-placeholders": "^1.1.3", + "seq-queue": "^0.0.5", + "sqlstring": "^2.3.2" + }, + "engines": { + "node": ">= 8.0" + } + }, + "node_modules/mysql2/node_modules/long": { + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/long/-/long-5.2.3.tgz", + "integrity": "sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q==" + }, + "node_modules/mysql2/node_modules/lru-cache": { + "version": "8.0.5", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-8.0.5.tgz", + "integrity": "sha512-MhWWlVnuab1RG5/zMRRcVGXZLCXrZTgfwMikgzCegsPnG62yDQo5JnqKkrK4jO5iKqDAZGItAqN5CtKBCBWRUA==", + "engines": { + "node": ">=16.14" + } + }, + "node_modules/named-placeholders": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/named-placeholders/-/named-placeholders-1.1.3.tgz", + "integrity": "sha512-eLoBxg6wE/rZkJPhU/xRX1WTpkFEwDJEN96oxFrTsqBdbT5ec295Q+CoHrL9IT0DipqKhmGcaZmwOt8OON5x1w==", + "dependencies": { + "lru-cache": "^7.14.1" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/named-placeholders/node_modules/lru-cache": { + "version": "7.18.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz", + "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==", + "engines": { + "node": ">=12" + } + }, "node_modules/napi-build-utils": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-1.0.2.tgz", @@ -7508,6 +7589,41 @@ "node": ">= 0.4" } }, + "node_modules/postgres-array": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/postgres-array/-/postgres-array-2.0.0.tgz", + "integrity": "sha512-VpZrUqU5A69eQyW2c5CA1jtLecCsN2U/bD6VilrFDWq5+5UIEVO7nazS3TEcHf1zuPYO/sqGvUvW62g86RXZuA==", + "engines": { + "node": ">=4" + } + }, + "node_modules/postgres-bytea": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/postgres-bytea/-/postgres-bytea-1.0.0.tgz", + "integrity": "sha512-xy3pmLuQqRBZBXDULy7KbaitYqLcmxigw14Q5sj8QBVLqEwXfeybIKVWiqAXTlcvdvb0+xkOtDbfQMOf4lST1w==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/postgres-date": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/postgres-date/-/postgres-date-1.0.7.tgz", + "integrity": "sha512-suDmjLVQg78nMK2UZ454hAG+OAW+HQPZ6n++TNDUX+L0+uUlLywnoxJKDou51Zm+zTCjrCl0Nq6J9C5hP9vK/Q==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/postgres-interval": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/postgres-interval/-/postgres-interval-1.2.0.tgz", + "integrity": "sha512-9ZhXKM/rw350N1ovuWHbGxnGh/SNJ4cnxHiM0rxE4VN41wsg8P8zWn9hv/buK00RP4WvlOyr/RBDiptyxVbkZQ==", + "dependencies": { + "xtend": "^4.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/posthog-node": { "version": "3.6.2", "resolved": "https://registry.npmjs.org/posthog-node/-/posthog-node-3.6.2.tgz", @@ -8008,8 +8124,7 @@ "node_modules/safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "optional": true + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, "node_modules/semver": { "version": "6.3.1", @@ -8019,6 +8134,11 @@ "semver": "bin/semver.js" } }, + "node_modules/seq-queue": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/seq-queue/-/seq-queue-0.0.5.tgz", + "integrity": "sha512-hr3Wtp/GZIc/6DAGPDcV4/9WoZhjrkXsi5B/07QgX8tsdc6ilr7BFM6PM6rbdAX1kFSDYeZGLipIZZKyQP0O5Q==" + }, "node_modules/set-blocking": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", @@ -8364,6 +8484,14 @@ "node": "^16 || ^18 || >= 20" } }, + "node_modules/sqlstring": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/sqlstring/-/sqlstring-2.3.3.tgz", + "integrity": "sha512-qC9iz2FlN7DQl3+wjwn3802RTyjCx7sDvfQEXchwa6CWOx07/WVfh91gBmQ9fahw8snwGEWU3xGzOt4tFyHLxg==", + "engines": { + "node": ">= 0.6" + } + }, "node_modules/ssri": { "version": "8.0.1", "resolved": "https://registry.npmjs.org/ssri/-/ssri-8.0.1.tgz", diff --git a/core/package.json b/core/package.json index 79051a0a3..c30f22fcb 100644 --- a/core/package.json +++ b/core/package.json @@ -26,6 +26,7 @@ "axios": "^1.6.7", "cheerio": "^1.0.0-rc.12", "commander": "^12.0.0", + "dbinfoz": "^0.1.4", "dotenv": "^16.3.1", "fastest-levenshtein": "^1.0.16", "follow-redirects": "^1.15.5", @@ -33,8 +34,8 @@ "http-proxy-agent": "^7.0.1", "https-proxy-agent": "^7.0.3", "js-tiktoken": "^1.0.8", - "llm-code-highlighter": "^0.0.13", "llama-tokenizer-js": "^1.1.3", + "llm-code-highlighter": "^0.0.13", "node-fetch": "^3.3.2", "node-html-markdown": "^1.3.0", "ollama": "^0.4.6", diff --git a/core/yarn.lock b/core/yarn.lock index 821ada1ea..6ad3b98b5 100644 --- a/core/yarn.lock +++ b/core/yarn.lock @@ -326,10 +326,10 @@ resolved "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@esbuild/linux-x64@0.19.11": +"@esbuild/darwin-arm64@0.19.11": version "0.19.11" - resolved "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.19.11.tgz" - integrity sha512-grbyMlVCvJSfxFQUndw5mCtWs5LO1gUlwP4CDi4iJBbVpZcqLVT29FxgGuBJGSzyOxotFG4LoO5X+M1350zmPA== + resolved "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.19.11.tgz" + integrity sha512-ETp87DRWuSt9KdDVkqSoKoLFHYTrkyz2+65fj9nfXsaV3bMhTCjtQfw3y+um88vGRKRiF7erPrh/ZuIdLUIVxQ== "@eslint-community/eslint-utils@^4.2.0": version "4.4.0" @@ -632,10 +632,10 @@ "@jridgewell/resolve-uri" "^3.1.0" "@jridgewell/sourcemap-codec" "^1.4.14" -"@lancedb/vectordb-linux-x64-gnu@0.4.3": +"@lancedb/vectordb-darwin-arm64@0.4.3": version "0.4.3" - resolved "https://registry.npmjs.org/@lancedb/vectordb-linux-x64-gnu/-/vectordb-linux-x64-gnu-0.4.3.tgz" - integrity sha512-OBx3WF3pK0xNfFJeErmuD9R2QWLa3XdeZspyTsIrQmBDeKj3HKh8y7Scpx4NH5Y09+9JNqRRKRZN7OqWTYhITg== + resolved "https://registry.npmjs.org/@lancedb/vectordb-darwin-arm64/-/vectordb-darwin-arm64-0.4.3.tgz" + integrity sha512-47CvvSaV1EdUsFEpXUJApTk+hMzAhCxVizipCFUlXCgcmzpCDL86wNgJij/X9a+j6zADhIX//Lsu0qd/an/Bpw== "@neon-rs/load@^0.0.74": version "0.0.74" @@ -1784,6 +1784,15 @@ data-uri-to-buffer@^4.0.0: resolved "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz" integrity sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A== +dbinfoz@^0.1.4: + version "0.1.4" + resolved "https://registry.npmjs.org/dbinfoz/-/dbinfoz-0.1.4.tgz" + integrity sha512-MB56+xS571ip7qoXqxdnOUtXebbWaqoZN+S++W51SQYJRSjQFGEIPucNmxgeQlBGJ1vM4mQNV47wzV6fcrezZg== + dependencies: + mysql2 "^3.9.1" + pg "^8.11.3" + sqlite3 "^5.1.7" + debug@^3.2.7: version "3.2.7" resolved "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz" @@ -1853,6 +1862,11 @@ delegates@^1.0.0: resolved "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz" integrity sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ== +denque@^2.1.0: + version "2.1.0" + resolved "https://registry.npmjs.org/denque/-/denque-2.1.0.tgz" + integrity sha512-HVQE3AAb/pxF8fQAoiqpvg9i3evqug3hoiwakOyZAwJm+6vZehbkYXZ0l4JxS+I3QxM97v5aaRNhj8v5oBhekw== + deprecation@^2.0.0: version "2.3.1" resolved "https://registry.npmjs.org/deprecation/-/deprecation-2.3.1.tgz" @@ -2503,6 +2517,11 @@ fs.realpath@^1.0.0: resolved "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz" integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== +fsevents@^2.3.2: + version "2.3.3" + resolved "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz" + integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw== + function-bind@^1.1.2: version "1.1.2" resolved "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz" @@ -2537,6 +2556,13 @@ gauge@^4.0.3: strip-ansi "^6.0.1" wide-align "^1.1.5" +generate-function@^2.3.1: + version "2.3.1" + resolved "https://registry.npmjs.org/generate-function/-/generate-function-2.3.1.tgz" + integrity sha512-eeB5GfMNeevm/GRYq20ShmsaGcmI81kIX2K9XQx5miC8KdHaC6Jm0qQ8ZNeGOi7wYB8OsdxKs+Y2oVuTFuVwKQ== + dependencies: + is-property "^1.0.2" + gensync@^1.0.0-beta.2: version "1.0.0-beta.2" resolved "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz" @@ -2820,7 +2846,7 @@ humanize-ms@^1.2.1: dependencies: ms "^2.0.0" -iconv-lite@^0.6.2: +iconv-lite@^0.6.2, iconv-lite@^0.6.3: version "0.6.3" resolved "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz" integrity sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw== @@ -3006,6 +3032,11 @@ is-path-inside@^3.0.3: resolved "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz" integrity sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ== +is-property@^1.0.2: + version "1.0.2" + resolved "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz" + integrity sha512-Ks/IoX00TtClbGQr4TWXemAnktAQvYB7HzcCxDGqEZU6oCmb2INHuOoKxbtR+HFkmYWBKv/dOZtGRiAjDhj92g== + is-regex@^1.1.4: version "1.1.4" resolved "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz" @@ -3634,6 +3665,11 @@ long@^4.0.0: resolved "https://registry.npmjs.org/long/-/long-4.0.0.tgz" integrity sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA== +long@^5.2.1: + version "5.2.3" + resolved "https://registry.npmjs.org/long/-/long-5.2.3.tgz" + integrity sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q== + lru-cache@^5.1.1: version "5.1.1" resolved "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz" @@ -3648,6 +3684,16 @@ lru-cache@^6.0.0: dependencies: yallist "^4.0.0" +lru-cache@^7.14.1: + version "7.18.3" + resolved "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz" + integrity sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA== + +lru-cache@^8.0.0: + version "8.0.5" + resolved "https://registry.npmjs.org/lru-cache/-/lru-cache-8.0.5.tgz" + integrity sha512-MhWWlVnuab1RG5/zMRRcVGXZLCXrZTgfwMikgzCegsPnG62yDQo5JnqKkrK4jO5iKqDAZGItAqN5CtKBCBWRUA== + make-dir@^4.0.0: version "4.0.0" resolved "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz" @@ -3826,6 +3872,27 @@ ms@^2.0.0, ms@^2.1.1, ms@2.1.2: resolved "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz" integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== +mysql2@^3.9.1: + version "3.9.2" + resolved "https://registry.npmjs.org/mysql2/-/mysql2-3.9.2.tgz" + integrity sha512-3Cwg/UuRkAv/wm6RhtPE5L7JlPB877vwSF6gfLAS68H+zhH+u5oa3AieqEd0D0/kC3W7qIhYbH419f7O9i/5nw== + dependencies: + denque "^2.1.0" + generate-function "^2.3.1" + iconv-lite "^0.6.3" + long "^5.2.1" + lru-cache "^8.0.0" + named-placeholders "^1.1.3" + seq-queue "^0.0.5" + sqlstring "^2.3.2" + +named-placeholders@^1.1.3: + version "1.1.3" + resolved "https://registry.npmjs.org/named-placeholders/-/named-placeholders-1.1.3.tgz" + integrity sha512-eLoBxg6wE/rZkJPhU/xRX1WTpkFEwDJEN96oxFrTsqBdbT5ec295Q+CoHrL9IT0DipqKhmGcaZmwOt8OON5x1w== + dependencies: + lru-cache "^7.14.1" + napi-build-utils@^1.0.1: version "1.0.2" resolved "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-1.0.2.tgz" @@ -4297,6 +4364,28 @@ possible-typed-array-names@^1.0.0: resolved "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.0.0.tgz" integrity sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q== +postgres-array@~2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/postgres-array/-/postgres-array-2.0.0.tgz" + integrity sha512-VpZrUqU5A69eQyW2c5CA1jtLecCsN2U/bD6VilrFDWq5+5UIEVO7nazS3TEcHf1zuPYO/sqGvUvW62g86RXZuA== + +postgres-bytea@~1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/postgres-bytea/-/postgres-bytea-1.0.0.tgz" + integrity sha512-xy3pmLuQqRBZBXDULy7KbaitYqLcmxigw14Q5sj8QBVLqEwXfeybIKVWiqAXTlcvdvb0+xkOtDbfQMOf4lST1w== + +postgres-date@~1.0.4: + version "1.0.7" + resolved "https://registry.npmjs.org/postgres-date/-/postgres-date-1.0.7.tgz" + integrity sha512-suDmjLVQg78nMK2UZ454hAG+OAW+HQPZ6n++TNDUX+L0+uUlLywnoxJKDou51Zm+zTCjrCl0Nq6J9C5hP9vK/Q== + +postgres-interval@^1.1.0: + version "1.2.0" + resolved "https://registry.npmjs.org/postgres-interval/-/postgres-interval-1.2.0.tgz" + integrity sha512-9ZhXKM/rw350N1ovuWHbGxnGh/SNJ4cnxHiM0rxE4VN41wsg8P8zWn9hv/buK00RP4WvlOyr/RBDiptyxVbkZQ== + dependencies: + xtend "^4.0.0" + posthog-node@^3.6.2: version "3.6.2" resolved "https://registry.npmjs.org/posthog-node/-/posthog-node-3.6.2.tgz" @@ -4610,6 +4699,11 @@ semver@^7.5.4: dependencies: lru-cache "^6.0.0" +seq-queue@^0.0.5: + version "0.0.5" + resolved "https://registry.npmjs.org/seq-queue/-/seq-queue-0.0.5.tgz" + integrity sha512-hr3Wtp/GZIc/6DAGPDcV4/9WoZhjrkXsi5B/07QgX8tsdc6ilr7BFM6PM6rbdAX1kFSDYeZGLipIZZKyQP0O5Q== + set-blocking@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz" @@ -4789,6 +4883,11 @@ sqlite3@^5.1.7: optionalDependencies: node-gyp "8.x" +sqlstring@^2.3.2: + version "2.3.3" + resolved "https://registry.npmjs.org/sqlstring/-/sqlstring-2.3.3.tgz" + integrity sha512-qC9iz2FlN7DQl3+wjwn3802RTyjCx7sDvfQEXchwa6CWOx07/WVfh91gBmQ9fahw8snwGEWU3xGzOt4tFyHLxg== + ssri@^8.0.0, ssri@^8.0.1: version "8.0.1" resolved "https://registry.npmjs.org/ssri/-/ssri-8.0.1.tgz" diff --git a/extensions/intellij/src/main/resources/config_schema.json b/extensions/intellij/src/main/resources/config_schema.json index e37574e2b..f693f46a2 100644 --- a/extensions/intellij/src/main/resources/config_schema.json +++ b/extensions/intellij/src/main/resources/config_schema.json @@ -1028,7 +1028,8 @@ "docs", "tree", "highlights", - "outline" + "outline", + "postgres" ], "markdownEnumDescriptions": [ "Reference the contents of the current changes as given by `git diff`", @@ -1046,7 +1047,8 @@ "Display a file tree of the current workspace", "Include a repo map showing important code objects", "Displays important snippets of code from the currently open files", - "Displays definition lines from the currently open files" + "Displays definition lines from the currently open files", + "References Postgres table schema and sample rows" ], "type": "string" }, @@ -1153,6 +1155,67 @@ "required": ["params"] } }, + { + "if": { + "properties": { + "name": { + "enum": ["database"] + } + } + }, + "then": { + "connections": { + "type": "array", + "description": "A list of database connections", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "A unique name for this database connection" + }, + "connection_type": { + "type": "string", + "description": "The type of database (e.g., 'postgres', 'mysql')", + "enum": ["postgres", "mysql", "sqlite"] + }, + "connection": { + "type": "object", + "properties": { + "user": { + "type": "string", + "description": "The database user name" + }, + "host": { + "type": "string", + "description": "The host address of the database server" + }, + "database": { + "type": "string", + "description": "The name of the database to connect to" + }, + "password": { + "type": "string", + "description": "The password for the database user" + }, + "port": { + "type": "integer", + "description": "The port number to connect to at the host" + }, + "filename": { + "type": "string", + "description": "File location for simple file DB's" + } + }, + "required": [] + } + }, + "required": ["name", "type", "connection"] + } + } + }, + "required": ["connections"] + }, { "if": { "properties": { @@ -1245,6 +1308,65 @@ } } } + }, + { + "if": { + "properties": { + "name": { + "enum": ["postgres"] + } + } + }, + "then": { + "properties": { + "params": { + "properties": { + "host": { + "title": "Host", + "description": "Database host", + "default": "localhost", + "type": "string" + }, + "port": { + "title": "Port", + "description": "Database port", + "default": 5432, + "type": "integer" + }, + "user": { + "title": "User", + "description": "Database user", + "default": "postgres", + "type": "string" + }, + "password": { + "title": "Password", + "description": "Database password", + "type": "string" + }, + "database": { + "title": "Database", + "description": "Database name", + "default": "postgres", + "type": "string" + }, + "schema": { + "title": "Schema", + "description": "Database schema", + "default": "public", + "type": "string" + }, + "sampleRows": { + "title": "Sample Rows", + "description": "Number of rows to sample from the database", + "default": 3, + "type": "integer" + } + } + } + }, + "required": ["host", "port", "user", "password", "database"] + } } ], "required": ["name"] diff --git a/extensions/vscode/continue_rc_schema.json b/extensions/vscode/continue_rc_schema.json index 9bb22db63..20ee13c64 100644 --- a/extensions/vscode/continue_rc_schema.json +++ b/extensions/vscode/continue_rc_schema.json @@ -245,7 +245,10 @@ "apiType": { "title": "Api Type", "markdownDescription": "OpenAI API type, either `openai` or `azure`", - "enum": ["openai", "azure"] + "enum": [ + "openai", + "azure" + ] }, "apiVersion": { "title": "Api Version", @@ -258,7 +261,11 @@ "type": "string" } }, - "required": ["title", "provider", "model"], + "required": [ + "title", + "provider", + "model" + ], "allOf": [ { "if": { @@ -268,7 +275,9 @@ } }, "not": { - "required": ["provider"] + "required": [ + "provider" + ] } }, "then": { @@ -293,33 +302,48 @@ ] } }, - "required": ["provider"] + "required": [ + "provider" + ] }, "then": { - "required": ["apiKey"] + "required": [ + "apiKey" + ] } }, { "if": { "properties": { "provider": { - "enum": ["huggingface-tgi", "huggingface-inference-api"] + "enum": [ + "huggingface-tgi", + "huggingface-inference-api" + ] } } }, "then": { - "required": ["apiBase"] + "required": [ + "apiBase" + ] }, - "required": ["provider"] + "required": [ + "provider" + ] }, { "if": { "properties": { "provider": { - "enum": ["openai"] + "enum": [ + "openai" + ] } }, - "required": ["provider"] + "required": [ + "provider" + ] }, "then": { "properties": { @@ -339,10 +363,14 @@ "if": { "properties": { "provider": { - "enum": ["openai"] + "enum": [ + "openai" + ] } }, - "required": ["provider"] + "required": [ + "provider" + ] }, "then": { "properties": { @@ -365,10 +393,14 @@ "if": { "properties": { "provider": { - "enum": ["replicate"] + "enum": [ + "replicate" + ] } }, - "required": ["provider"] + "required": [ + "provider" + ] }, "then": { "properties": { @@ -396,10 +428,14 @@ "if": { "properties": { "provider": { - "enum": ["free-trial"] + "enum": [ + "free-trial" + ] } }, - "required": ["provider"] + "required": [ + "provider" + ] }, "then": { "properties": { @@ -421,7 +457,9 @@ "if": { "properties": { "provider": { - "enum": ["openai"] + "enum": [ + "openai" + ] }, "apiType": { "not": { @@ -429,7 +467,9 @@ } } }, - "required": ["provider"] + "required": [ + "provider" + ] }, "then": { "properties": { @@ -483,17 +523,24 @@ "if": { "properties": { "provider": { - "enum": ["anthropic"] + "enum": [ + "anthropic" + ] } }, - "required": ["provider"] + "required": [ + "provider" + ] }, "then": { "properties": { "model": { "anyOf": [ { - "enum": ["claude-2", "claude-instant-1"] + "enum": [ + "claude-2", + "claude-instant-1" + ] }, { "type": "string" @@ -507,15 +554,22 @@ "if": { "properties": { "provider": { - "enum": ["google-palm"] + "enum": [ + "google-palm" + ] } }, - "required": ["provider"] + "required": [ + "provider" + ] }, "then": { "properties": { "model": { - "enum": ["chat-bison-001", "gemini-pro"] + "enum": [ + "chat-bison-001", + "gemini-pro" + ] } } } @@ -524,10 +578,14 @@ "if": { "properties": { "provider": { - "enum": ["together"] + "enum": [ + "together" + ] } }, - "required": ["provider"] + "required": [ + "provider" + ] }, "then": { "properties": { @@ -559,10 +617,14 @@ "if": { "properties": { "provider": { - "enum": ["deepinfra"] + "enum": [ + "deepinfra" + ] } }, - "required": ["provider"] + "required": [ + "provider" + ] }, "then": { "properties": { @@ -585,7 +647,9 @@ ] } }, - "required": ["provider"] + "required": [ + "provider" + ] }, "then": { "properties": { @@ -628,10 +692,14 @@ "if": { "properties": { "provider": { - "enum": ["ollama"] + "enum": [ + "ollama" + ] } }, - "required": ["provider"] + "required": [ + "provider" + ] }, "then": { "properties": { @@ -676,15 +744,23 @@ "if": { "properties": { "provider": { - "enum": ["mistral"] + "enum": [ + "mistral" + ] } }, - "required": ["provider"] + "required": [ + "provider" + ] }, "then": { "properties": { "model": { - "enum": ["mistral-tiny", "mistral-small", "mistral-medium"] + "enum": [ + "mistral-tiny", + "mistral-small", + "mistral-medium" + ] } } } @@ -696,20 +772,30 @@ "const": "azure" } }, - "required": ["apiType"] + "required": [ + "apiType" + ] }, "then": { - "required": ["engine", "apiVersion", "apiBase"] + "required": [ + "engine", + "apiVersion", + "apiBase" + ] } }, { "if": { "properties": { "provider": { - "enum": ["openai"] + "enum": [ + "openai" + ] } }, - "required": ["provider"] + "required": [ + "provider" + ] }, "then": { "properties": { @@ -726,7 +812,9 @@ "const": "llamafile" } }, - "required": ["provider"] + "required": [ + "provider" + ] }, "then": { "properties": { @@ -740,10 +828,14 @@ "if": { "properties": { "provider": { - "enum": ["text-gen-webui"] + "enum": [ + "text-gen-webui" + ] } }, - "required": ["provider"] + "required": [ + "provider" + ] }, "then": { "properties": { @@ -757,10 +849,14 @@ "if": { "properties": { "provider": { - "enum": ["flowise"] + "enum": [ + "flowise" + ] } }, - "required": ["provider"] + "required": [ + "provider" + ] }, "then": { "properties": { @@ -787,7 +883,10 @@ "type": "string" } }, - "required": ["key", "value"] + "required": [ + "key", + "value" + ] } }, "additionalFlowiseConfiguration": { @@ -806,7 +905,10 @@ "description": "Configuration Property value" } }, - "required": ["key", "value"] + "required": [ + "key", + "value" + ] } }, "model": { @@ -883,7 +985,9 @@ "type": "string" } }, - "required": ["default"] + "required": [ + "default" + ] }, "SlashCommand": { "title": "SlashCommand", @@ -940,7 +1044,9 @@ "if": { "properties": { "name": { - "enum": ["issue"] + "enum": [ + "issue" + ] } } }, @@ -953,17 +1059,23 @@ "description": "Enter the URL of the GitHub repository for which you want to generate the issue." } }, - "required": ["repositoryUrl"] + "required": [ + "repositoryUrl" + ] } }, - "required": ["params"] + "required": [ + "params" + ] } }, { "if": { "properties": { "name": { - "enum": ["edit"] + "enum": [ + "edit" + ] } } }, @@ -985,7 +1097,10 @@ } } ], - "required": ["name", "description"] + "required": [ + "name", + "description" + ] }, "CustomCommand": { "title": "CustomCommand", @@ -1004,7 +1119,11 @@ "type": "string" } }, - "required": ["name", "prompt", "description"] + "required": [ + "name", + "prompt", + "description" + ] }, "ContextProviderWithParams": { "title": "ContextProviderWithParams", @@ -1068,7 +1187,9 @@ "if": { "properties": { "name": { - "enum": ["google"] + "enum": [ + "google" + ] } } }, @@ -1081,17 +1202,23 @@ "description": "Your API key for https://serper.dev in order to get Google search results" } }, - "required": ["serperApiKey"] + "required": [ + "serperApiKey" + ] } }, - "required": ["params"] + "required": [ + "params" + ] } }, { "if": { "properties": { "name": { - "enum": ["open"] + "enum": [ + "open" + ] } } }, @@ -1113,7 +1240,9 @@ "if": { "properties": { "name": { - "enum": ["issue"] + "enum": [ + "issue" + ] } } }, @@ -1142,24 +1271,37 @@ "type": { "type": "string", "description": "The type of issues to search for", - "enum": ["open", "closed", "all"] + "enum": [ + "open", + "closed", + "all" + ] } }, - "required": ["owner", "repo"] + "required": [ + "owner", + "repo" + ] } } }, - "required": ["repos"] + "required": [ + "repos" + ] } }, - "required": ["params"] + "required": [ + "params" + ] } }, { "if": { "properties": { "name": { - "enum": ["database"] + "enum": [ + "database" + ] } } }, @@ -1177,7 +1319,11 @@ "connection_type": { "type": "string", "description": "The type of database (e.g., 'postgres', 'mysql')", - "enum": ["postgres", "mysql", "sqlite"] + "enum": [ + "postgres", + "mysql", + "sqlite" + ] }, "connection": { "type": "object", @@ -1210,17 +1356,25 @@ "required": [] } }, - "required": ["name", "type", "connection"] + "required": [ + "name", + "type", + "connection" + ] } } }, - "required": ["connections"] + "required": [ + "connections" + ] }, { "if": { "properties": { "name": { - "enum": ["jira"] + "enum": [ + "jira" + ] } } }, @@ -1245,17 +1399,25 @@ "description": "Customize the query used to find Jira issues" } }, - "required": ["domain", "email", "token"] + "required": [ + "domain", + "email", + "token" + ] } }, - "required": ["params"] + "required": [ + "params" + ] } }, { "if": { "properties": { "name": { - "enum": ["http"] + "enum": [ + "http" + ] } } }, @@ -1268,17 +1430,24 @@ "description": "The HTTP endpoint of your context provider server." } }, - "required": ["url"] + "required": [ + "url" + ] } }, - "required": ["params"] + "required": [ + "params" + ] } }, { "if": { "properties": { "name": { - "enum": ["codebase", "folder"] + "enum": [ + "codebase", + "folder" + ] } } }, @@ -1313,7 +1482,9 @@ "if": { "properties": { "name": { - "enum": ["postgres"] + "enum": [ + "postgres" + ] } } }, @@ -1365,11 +1536,19 @@ } } }, - "required": ["host", "port", "user", "password", "database"] + "required": [ + "host", + "port", + "user", + "password", + "database" + ] } } ], - "required": ["name"] + "required": [ + "name" + ] }, "SerializedContinueConfig": { "title": "config.json", @@ -1487,7 +1666,11 @@ "type": "object", "properties": { "provider": { - "enum": ["transformers.js", "ollama", "openai"] + "enum": [ + "transformers.js", + "ollama", + "openai" + ] }, "model": { "type": "string" @@ -1499,19 +1682,27 @@ "type": "string" } }, - "required": ["provider"], + "required": [ + "provider" + ], "allOf": [ { "if": { "properties": { "provider": { - "enum": ["ollama"] + "enum": [ + "ollama" + ] } }, - "required": ["provider"] + "required": [ + "provider" + ] }, "then": { - "required": ["model"] + "required": [ + "model" + ] } } ] @@ -1567,7 +1758,10 @@ }, "mergeBehavior": { "type": "string", - "enum": ["merge", "overwrite"], + "enum": [ + "merge", + "overwrite" + ], "default": "merge", "title": "Merge behavior", "markdownDescription": "If set to 'merge', .continuerc.json will be applied on top of config.json (arrays and objects are merged). If set to 'overwrite', then every top-level property of .continuerc.json will overwrite that property from config.json." @@ -1575,4 +1769,4 @@ } } } -} +} \ No newline at end of file diff --git a/extensions/vscode/package-lock.json b/extensions/vscode/package-lock.json index 311923ca9..ab7886c46 100644 --- a/extensions/vscode/package-lock.json +++ b/extensions/vscode/package-lock.json @@ -1,12 +1,12 @@ { "name": "continue", - "version": "0.9.67", + "version": "0.9.72", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "continue", - "version": "0.9.67", + "version": "0.9.72", "license": "Apache-2.0", "dependencies": { "@electron/rebuild": "^3.2.10", @@ -93,6 +93,7 @@ "axios": "^1.6.7", "cheerio": "^1.0.0-rc.12", "commander": "^12.0.0", + "dbinfoz": "^0.1.4", "dotenv": "^16.3.1", "fastest-levenshtein": "^1.0.16", "follow-redirects": "^1.15.5", diff --git a/extensions/vscode/yarn.lock b/extensions/vscode/yarn.lock index 2719f5df8..1b1081d06 100644 --- a/extensions/vscode/yarn.lock +++ b/extensions/vscode/yarn.lock @@ -368,15 +368,15 @@ tar "^6.0.5" yargs "^17.0.1" -"@esbuild/linux-x64@0.17.19": +"@esbuild/darwin-arm64@0.17.19": version "0.17.19" - resolved "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.17.19.tgz" - integrity sha512-68ngA9lg2H6zkZcyp22tsVt38mlhWde8l3eJLWkyLrp4HwMUr3c1s/M2t7+kHIhvMjglIBrFpncX1SzMckomGw== + resolved "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.17.19.tgz" + integrity sha512-80wEoCfF/hFKM6WE1FyBHc9SfUblloAWx6FJkFWTWiCoht9Mc0ARGEM47e67W9rI09YoUxJL68WHfDRYEAvOhg== -"@esbuild/linux-x64@0.18.20": +"@esbuild/darwin-arm64@0.18.20": version "0.18.20" - resolved "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.18.20.tgz" - integrity sha512-UYqiqemphJcNsFEskc73jQ7B9jgwjWrSayxawS6UVFZGWrAAtkzjxSqnoclCXxWtfwLdzU+vTpcNYhpn43uP1w== + resolved "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.18.20.tgz" + integrity sha512-bxRHW5kHU38zS2lPTPOyuyTm+S+eobPUnTNkdJEfAddYgEcll4xkT8DB9d2008DtTbl7uJag2HuE5NZAZgnNEA== "@eslint-community/eslint-utils@^4.2.0": version "4.4.0" @@ -2369,6 +2369,7 @@ core-util-is@1.0.2: axios "^1.6.7" cheerio "^1.0.0-rc.12" commander "^12.0.0" + dbinfoz "^0.1.4" dotenv "^16.3.1" fastest-levenshtein "^1.0.16" follow-redirects "^1.15.5" @@ -3425,6 +3426,11 @@ fs.realpath@^1.0.0: resolved "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz" integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== +fsevents@^2.3.2, fsevents@~2.3.2: + version "2.3.3" + resolved "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz" + integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw== + function-bind@^1.1.2: version "1.1.2" resolved "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz" diff --git a/gui/package-lock.json b/gui/package-lock.json index e01778358..823f7b264 100644 --- a/gui/package-lock.json +++ b/gui/package-lock.json @@ -80,6 +80,7 @@ "axios": "^1.6.7", "cheerio": "^1.0.0-rc.12", "commander": "^12.0.0", + "dbinfoz": "^0.1.4", "dotenv": "^16.3.1", "fastest-levenshtein": "^1.0.16", "follow-redirects": "^1.15.5", diff --git a/gui/src/components/mainInput/ContinueInputBox.tsx b/gui/src/components/mainInput/ContinueInputBox.tsx index 49897fb5b..582091ceb 100644 --- a/gui/src/components/mainInput/ContinueInputBox.tsx +++ b/gui/src/components/mainInput/ContinueInputBox.tsx @@ -1,6 +1,5 @@ import { JSONContent } from "@tiptap/react"; import { ContextItemWithId } from "core"; -import { useState } from "react"; import { useDispatch, useSelector } from "react-redux"; import styled, { keyframes } from "styled-components"; import { defaultBorderRadius, vscBackground } from ".."; @@ -70,8 +69,6 @@ function ContinueInputBox(props: ContinueInputBoxProps) { (store: RootState) => store.state.config.contextProviders ); - const [editorState, setEditorState] = useState(props.editorState); - useWebviewListener( "newSessionWithPrompt", async (data) => { @@ -112,7 +109,7 @@ function ContinueInputBox(props: ContinueInputBoxProps) { borderRadius={defaultBorderRadius} > { - onEnterRef.current(this.editor.getJSON()); + onEnterRef.current(); return true; }, @@ -346,6 +345,11 @@ function TipTapEditor(props: TipTapEditorProps) { }, }); + const onEnterRef = useUpdatingRef(() => { + props.onEnter(editor.getJSON()); + editor.commands.clearContent(true); + }, [props.onEnter, editor]); + // This is a mechanism for overriding the IDE keyboard shortcut when inside of the webview const [ignoreHighlightedCode, setIgnoreHighlightedCode] = useState(false); @@ -379,7 +383,7 @@ function TipTapEditor(props: TipTapEditorProps) { return; } editor?.commands.insertContent(data.input); - onEnterRef.current(editor.getJSON()); + onEnterRef.current(); }, [editor, onEnterRef.current, props.isMainInput] ); @@ -572,9 +576,7 @@ function TipTapEditor(props: TipTapEditorProps) { editor.commands.insertContent("@"); } }} - onEnter={() => { - onEnterRef.current(editor.getJSON()); - }} + onEnter={onEnterRef.current} onImageFileSelected={(file) => { handleImageFile(file).then(([img, dataUrl]) => { const { schema } = editor.state; diff --git a/gui/src/pages/gui.tsx b/gui/src/pages/gui.tsx index 8a0ef250f..791d97f65 100644 --- a/gui/src/pages/gui.tsx +++ b/gui/src/pages/gui.tsx @@ -371,7 +371,6 @@ function GUI(props: GUIProps) { > {item.message.role === "user" ? ( { streamResponse(editorState, index); }} @@ -433,7 +432,6 @@ function GUI(props: GUIProps) { Date: Mon, 26 Feb 2024 19:08:38 -0500 Subject: [PATCH 101/141] =?UTF-8?q?=F0=9F=93=9D=20add=20TensorRT-LLM=20to?= =?UTF-8?q?=20docs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/docs/model-setup/select-provider.md | 1 + docs/docs/reference/Model Providers/openai.md | 1 + 2 files changed, 2 insertions(+) diff --git a/docs/docs/model-setup/select-provider.md b/docs/docs/model-setup/select-provider.md index 85f166e1c..1f0cc1e08 100644 --- a/docs/docs/model-setup/select-provider.md +++ b/docs/docs/model-setup/select-provider.md @@ -21,6 +21,7 @@ You can run a model on your local computer using: - [Text generation web UI](../reference/Model%20Providers/openai.md) (OpenAI compatible server) - [FastChat](../reference/Model%20Providers/openai.md) (OpenAI compatible server) - [llama-cpp-python](../reference/Model%20Providers/openai.md) (OpenAI compatible server) +- [TensorRT-LLM](https://github.com/NVIDIA/trt-llm-as-openai-windows?tab=readme-ov-file#examples) (OpenAI compatible server) Once you have it running, you will need to configure it in the GUI or manually add it to your `config.json`. diff --git a/docs/docs/reference/Model Providers/openai.md b/docs/docs/reference/Model Providers/openai.md index 40a0d8c58..c97720912 100644 --- a/docs/docs/reference/Model Providers/openai.md +++ b/docs/docs/reference/Model Providers/openai.md @@ -29,6 +29,7 @@ OpenAI compatible servers - [FastChat](https://github.com/lm-sys/FastChat/blob/main/docs/openai_api.md) - [LocalAI](https://localai.io/basics/getting_started/) - [llama-cpp-python](https://github.com/abetlen/llama-cpp-python#web-server) +- [TensorRT-LLM](https://github.com/NVIDIA/trt-llm-as-openai-windows?tab=readme-ov-file#examples) OpenAI compatible APIs From 1df5d5356b9f767bb0f6611c3ab2426de46c074c Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Mon, 26 Feb 2024 21:58:28 -0500 Subject: [PATCH 102/141] =?UTF-8?q?=F0=9F=90=9B=20fix=20tree-sitter=20impo?= =?UTF-8?q?rt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/util/treeSitter.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core/util/treeSitter.ts b/core/util/treeSitter.ts index e0eb2cf1d..f9729fa08 100644 --- a/core/util/treeSitter.ts +++ b/core/util/treeSitter.ts @@ -1,5 +1,5 @@ import * as path from "path"; -import Parser from "web-tree-sitter"; +import Parser, { init, Language } from "web-tree-sitter"; export const supportedLanguages: { [key: string]: string } = { cpp: "cpp", @@ -68,7 +68,7 @@ export const supportedLanguages: { [key: string]: string } = { }; export async function getParserForFile(filepath: string) { - await Parser.init(); + await init(); const parser = new Parser(); const extension = path.extname(filepath).slice(1); @@ -87,7 +87,7 @@ export async function getParserForFile(filepath: string) { "tree-sitter-wasms", `tree-sitter-${supportedLanguages[extension]}.wasm` ); - const Language = await Parser.Language.load(wasmPath); - parser.setLanguage(Language); + const language = await Language.load(wasmPath); + parser.setLanguage(language); return parser; } From cfdfe9050b9aaa9a9e5eb6b619ffb3619a66baca Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Mon, 26 Feb 2024 21:59:04 -0500 Subject: [PATCH 103/141] =?UTF-8?q?=F0=9F=A9=B9=20increase=20timeout=20to?= =?UTF-8?q?=20make=20sure=20cursor=20doesn't=20end=20up=20on=20top=20of=20?= =?UTF-8?q?newly=20added=20code=20blocks?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gui/src/components/mainInput/TipTapEditor.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gui/src/components/mainInput/TipTapEditor.tsx b/gui/src/components/mainInput/TipTapEditor.tsx index d506b4536..c6ba78f18 100644 --- a/gui/src/components/mainInput/TipTapEditor.tsx +++ b/gui/src/components/mainInput/TipTapEditor.tsx @@ -472,7 +472,7 @@ function TipTapEditor(props: TipTapEditorProps) { .run(); setTimeout(() => { editor.commands.focus("end"); - }, 100); + }, 200); } setIgnoreHighlightedCode(false); }, From f88bec3df52869c52989af065254fc6d020d10ef Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Mon, 26 Feb 2024 22:59:17 -0500 Subject: [PATCH 104/141] =?UTF-8?q?=E2=9A=A1=EF=B8=8F=20add=20description?= =?UTF-8?q?=20as=20search=20field=20for=20submenu=20ctx=20providers?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gui/src/hooks/useSubmenuContextProviders.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gui/src/hooks/useSubmenuContextProviders.tsx b/gui/src/hooks/useSubmenuContextProviders.tsx index ccee64e09..c992b4632 100644 --- a/gui/src/hooks/useSubmenuContextProviders.tsx +++ b/gui/src/hooks/useSubmenuContextProviders.tsx @@ -71,7 +71,7 @@ function useSubmenuContextProviders() { setLoaded(true); contextProviderDescriptions.forEach(async (description) => { const minisearch = new MiniSearch({ - fields: ["title"], + fields: ["title", "description"], storeFields: ["id", "title", "description"], }); const items = await ideRequest("context/loadSubmenuItems", { From bfbc3b8a7f443ee42647028e966d9def0fc77a0d Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Mon, 26 Feb 2024 23:40:18 -0500 Subject: [PATCH 105/141] =?UTF-8?q?=F0=9F=A9=B9=20don't=20submit=20empty?= =?UTF-8?q?=20msg?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gui/src/components/mainInput/TipTapEditor.tsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/gui/src/components/mainInput/TipTapEditor.tsx b/gui/src/components/mainInput/TipTapEditor.tsx index c6ba78f18..2e00462f1 100644 --- a/gui/src/components/mainInput/TipTapEditor.tsx +++ b/gui/src/components/mainInput/TipTapEditor.tsx @@ -346,7 +346,14 @@ function TipTapEditor(props: TipTapEditorProps) { }); const onEnterRef = useUpdatingRef(() => { - props.onEnter(editor.getJSON()); + const json = editor.getJSON() + + // Don't do anything if input box is empty + if (!json.content?.some(c => c.content)) { + return + } + + props.onEnter(json); editor.commands.clearContent(true); }, [props.onEnter, editor]); From 818928dff7ead2d9ed6ff89e6fbcf8ada32228f0 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Tue, 27 Feb 2024 00:24:17 -0500 Subject: [PATCH 106/141] =?UTF-8?q?=E2=9C=A8=20pause=20indexing?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/indexing/indexCodebase.ts | 28 ++++++++++++++++++- core/web/webviewProtocol.ts | 1 + .../vscode/src/extension/vscodeExtension.ts | 17 +++++++++-- extensions/vscode/src/webviewProtocol.ts | 2 +- .../loaders/IndexingProgressBar.tsx | 7 ++++- 5 files changed, 50 insertions(+), 5 deletions(-) diff --git a/core/indexing/indexCodebase.ts b/core/indexing/indexCodebase.ts index 32c85f2b9..fe094711e 100644 --- a/core/indexing/indexCodebase.ts +++ b/core/indexing/indexCodebase.ts @@ -6,12 +6,27 @@ import { ChunkCodebaseIndex } from "./chunk/ChunkCodebaseIndex"; import { getComputeDeleteAddRemove } from "./refreshIndex"; import { CodebaseIndex, IndexTag } from "./types"; +export class PauseToken { + constructor(private _paused: boolean) {} + + set paused(value: boolean) { + this._paused = value; + } + + get paused(): boolean { + return this._paused; + } +} + export class CodebaseIndexer { configHandler: ConfigHandler; ide: IDE; - constructor(configHandler: ConfigHandler, ide: IDE) { + pauseToken: PauseToken; + + constructor(configHandler: ConfigHandler, ide: IDE, pauseToken: PauseToken) { this.configHandler = configHandler; this.ide = ide; + this.pauseToken = pauseToken; } private async getIndexesToBuild(): Promise { @@ -41,6 +56,12 @@ export class CodebaseIndexer { let completedDirs = 0; + yield { + progress: + 0, + desc: "Starting indexing...", + }; + for (let directory of workspaceDirs) { const stats = await this.ide.getStats(directory); const branch = await this.ide.getBranch(directory); @@ -64,6 +85,11 @@ export class CodebaseIndexer { results, markComplete )) { + // Handle pausing in this loop because it's the only one really taking time + while (this.pauseToken.paused) { + await new Promise((resolve) => setTimeout(resolve, 100)); + } + yield { progress: (completedDirs + diff --git a/core/web/webviewProtocol.ts b/core/web/webviewProtocol.ts index ed84460f3..248fe468f 100644 --- a/core/web/webviewProtocol.ts +++ b/core/web/webviewProtocol.ts @@ -61,6 +61,7 @@ export type WebviewProtocol = Protocol & ]; errorPopup: [{ message: string }, void]; + "index/setPaused": [boolean, void]; openUrl: [string, void]; applyToCurrentFile: [{ text: string }, void]; showTutorial: [undefined, void]; diff --git a/extensions/vscode/src/extension/vscodeExtension.ts b/extensions/vscode/src/extension/vscodeExtension.ts index 82a0355bb..51b369766 100644 --- a/extensions/vscode/src/extension/vscodeExtension.ts +++ b/extensions/vscode/src/extension/vscodeExtension.ts @@ -1,5 +1,5 @@ import { ConfigHandler } from "core/config/handler"; -import { CodebaseIndexer } from "core/indexing/indexCodebase"; +import { CodebaseIndexer, PauseToken } from "core/indexing/indexCodebase"; import { v4 as uuidv4 } from "uuid"; import * as vscode from "vscode"; import { registerAllCommands } from "../commands"; @@ -90,8 +90,21 @@ export class VsCodeExtension { ); this.webviewProtocol = this.sidebar.webviewProtocol; + // Indexing + pause token + const indexingPauseToken = new PauseToken( + context.globalState.get("continue.indexingPaused") === false + ); + this.webviewProtocol.on("index/setPaused", (msg) => { + context.globalState.update("continue.indexingPaused", msg.data); + indexingPauseToken.paused = msg.data; + }); + this.diffManager.webviewProtocol = this.webviewProtocol; - this.indexer = new CodebaseIndexer(this.configHandler, this.ide); + this.indexer = new CodebaseIndexer( + this.configHandler, + this.ide, + indexingPauseToken + ); // CodeLens registerAllCodeLensProviders( diff --git a/extensions/vscode/src/webviewProtocol.ts b/extensions/vscode/src/webviewProtocol.ts index cc8297694..6cdda8a72 100644 --- a/extensions/vscode/src/webviewProtocol.ts +++ b/extensions/vscode/src/webviewProtocol.ts @@ -30,7 +30,7 @@ export class VsCodeWebviewProtocol { return id; } - private on( + on( messageType: T, handler: ( message: Message diff --git a/gui/src/components/loaders/IndexingProgressBar.tsx b/gui/src/components/loaders/IndexingProgressBar.tsx index 29674e271..7d8b5528f 100644 --- a/gui/src/components/loaders/IndexingProgressBar.tsx +++ b/gui/src/components/loaders/IndexingProgressBar.tsx @@ -1,7 +1,8 @@ -import { useState } from "react"; +import { useEffect, useState } from "react"; import ReactDOM from "react-dom"; import styled from "styled-components"; import { StyledTooltip, lightGray, vscForeground } from ".."; +import { postToIde } from "../../util/ide"; const DIAMETER = 6; const CircleDiv = styled.div` @@ -65,6 +66,10 @@ const IndexingProgressBar = ({ const [expanded, setExpanded] = useState(true); const [hovered, setHovered] = useState(false); + useEffect(() => { + postToIde("index/setPaused", !expanded); + }, [expanded]); + return (
    setExpanded((prev) => !prev)} From eb67849ac040529f21606b48e0b86758e6567b1a Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Tue, 27 Feb 2024 00:34:29 -0500 Subject: [PATCH 107/141] =?UTF-8?q?=F0=9F=90=9B=20fix=20pausing?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- extensions/vscode/src/extension/vscodeExtension.ts | 2 +- gui/src/components/mainInput/InputToolbar.tsx | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/extensions/vscode/src/extension/vscodeExtension.ts b/extensions/vscode/src/extension/vscodeExtension.ts index 51b369766..fef0538c9 100644 --- a/extensions/vscode/src/extension/vscodeExtension.ts +++ b/extensions/vscode/src/extension/vscodeExtension.ts @@ -92,7 +92,7 @@ export class VsCodeExtension { // Indexing + pause token const indexingPauseToken = new PauseToken( - context.globalState.get("continue.indexingPaused") === false + context.globalState.get("continue.indexingPaused") === true ); this.webviewProtocol.on("index/setPaused", (msg) => { context.globalState.update("continue.indexingPaused", msg.data); diff --git a/gui/src/components/mainInput/InputToolbar.tsx b/gui/src/components/mainInput/InputToolbar.tsx index c472ac206..214598fe9 100644 --- a/gui/src/components/mainInput/InputToolbar.tsx +++ b/gui/src/components/mainInput/InputToolbar.tsx @@ -13,7 +13,6 @@ import { vscInputBackground, } from ".."; import { defaultModelSelector } from "../../redux/selectors/modelSelectors"; -import { getMetaKeyLabel } from "../../util"; const StyledDiv = styled.div<{ hidden?: boolean }>` position: absolute; @@ -128,7 +127,7 @@ function InputToolbar(props: InputToolbarProps) { )} - {getMetaKeyLabel()} ⏎ Use Codebase - + */} Date: Tue, 27 Feb 2024 10:35:20 -0500 Subject: [PATCH 108/141] =?UTF-8?q?=F0=9F=90=9B=20add=20context=20items=20?= =?UTF-8?q?to=20/edit=20prompt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/commands/slash/edit.ts | 19 ++++++++++++------- gui/src/components/mainInput/resolveInput.ts | 7 +++++-- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/core/commands/slash/edit.ts b/core/commands/slash/edit.ts index 80b773d88..f94172499 100644 --- a/core/commands/slash/edit.ts +++ b/core/commands/slash/edit.ts @@ -230,13 +230,18 @@ const EditSlashCommand: SlashCommand = { } // Strip unecessary parts of the input (the fact that you have to do this is suboptimal, should be refactored away) - input = input.replace( + let content = history[history.length - 1].content; + if (typeof content !== "string") { + content.forEach((part) => { + if (part.text && part.text.startsWith("/edit")) { + part.text = part.text.replace("/edit", "").trimStart(); + } + }) + } + let userInput = stripImages(content).replace( `\`\`\`${contextItemToEdit.name}\n${contextItemToEdit.content}\n\`\`\`\n`, "" ); - if (input.startsWith("/edit")) { - input = input.replace("/edit", "").trimStart(); - } const rif: RangeInFileWithContents = contextItemToRangeInFileWithContents(contextItemToEdit); @@ -248,14 +253,14 @@ const EditSlashCommand: SlashCommand = { rif, fullFileContents, llm, - input, + userInput, params?.tokenLimit ); const [dedentedContents, commonWhitespace] = dedentAndGetCommonWhitespace(contents); contents = dedentedContents; - let prompt = compilePrompt(filePrefix, contents, fileSuffix, input); + let prompt = compilePrompt(filePrefix, contents, fileSuffix, userInput); let fullFileContentsLines = fullFileContents.split("\n"); let fullPrefixLines = fullFileContentsLines.slice( 0, @@ -447,7 +452,7 @@ const EditSlashCommand: SlashCommand = { messages.slice(0, messages.length - 1), { codeToEdit: rif.contents, - userInput: input, + userInput, filePrefix: filePrefix, fileSuffix: fileSuffix, systemMessage: llm.systemMessage || "", diff --git a/gui/src/components/mainInput/resolveInput.ts b/gui/src/components/mainInput/resolveInput.ts index dee35d1aa..0460c719e 100644 --- a/gui/src/components/mainInput/resolveInput.ts +++ b/gui/src/components/mainInput/resolveInput.ts @@ -34,6 +34,8 @@ async function resolveEditorContent( for (const p of editorState?.content) { if (p.type === "paragraph") { const [text, ctxItems, foundSlashCommand] = resolveParagraph(p); + + // Only take the first slash command if (foundSlashCommand && typeof slashCommand === "undefined") { slashCommand = foundSlashCommand; } @@ -92,8 +94,9 @@ async function resolveEditorContent( if (item.itemType === "file") { // This is a quick way to resolve @file references const basename = getBasename(item.id); - const content = await ide.readFile(item.id); - contextItemsText += `\`\`\`title="${basename}"\n${content}\n\`\`\`\n`; + const rawContent = await ide.readFile(item.id); + const content = `\`\`\`title="${basename}"\n${rawContent}\n\`\`\`\n`; + contextItemsText += content contextItems.push({ name: basename, description: item.id, From d3a0c35a838ac642499bcd669d9088fef649208d Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Tue, 27 Feb 2024 12:17:15 -0500 Subject: [PATCH 109/141] =?UTF-8?q?=E2=9C=A8=20de-duplicate=20when=20mergi?= =?UTF-8?q?ng=20arrays?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/config/load.ts | 13 ++++++++++--- core/util/merge.ts | 20 ++++++++++++++++---- 2 files changed, 26 insertions(+), 7 deletions(-) diff --git a/core/config/load.ts b/core/config/load.ts index a978a3358..cdeff8db9 100644 --- a/core/config/load.ts +++ b/core/config/load.ts @@ -59,6 +59,13 @@ function resolveSerializedConfig(filepath: string): SerializedContinueConfig { return JSON.parse(content); } +const configMergeKeys = { + "models": (a: any, b: any) => a.title === b.title, + "contextProviders": (a: any, b: any) => a.name === b.name, + "slashCommands": (a: any, b: any) => a.name === b.name, + "customCommands": (a: any, b: any) => a.name === b.name, +} + function loadSerializedConfig( workspaceConfigs: ContinueRcJson[], remoteConfigServerUrl: URL | undefined, @@ -128,11 +135,11 @@ function loadSerializedConfig( const remoteConfigJson = resolveSerializedConfig( getConfigJsonPathForRemote(remoteConfigServerUrl) ); - config = mergeJson(config, remoteConfigJson, "merge"); + config = mergeJson(config, remoteConfigJson, "merge", configMergeKeys); } for (const workspaceConfig of workspaceConfigs) { - config = mergeJson(config, workspaceConfig, workspaceConfig.mergeBehavior); + config = mergeJson(config, workspaceConfig, workspaceConfig.mergeBehavior, configMergeKeys); } return config; @@ -455,5 +462,5 @@ export { intermediateToFinalConfig, loadFullConfigNode, serializedToIntermediateConfig, - type BrowserSerializedContinueConfig, + type BrowserSerializedContinueConfig }; diff --git a/core/util/merge.ts b/core/util/merge.ts index f65c047a1..2da14db47 100644 --- a/core/util/merge.ts +++ b/core/util/merge.ts @@ -5,7 +5,8 @@ type JsonObject = { [key: string]: any }; export function mergeJson( first: JsonObject, second: JsonObject, - mergeBehavior?: ConfigMergeType + mergeBehavior?: ConfigMergeType, + mergeKeys?: {[key: string]: (a: any, b: any) => boolean} ): any { first = { ...first }; @@ -20,10 +21,21 @@ export function mergeJson( } const firstValue = first[key]; - if (Array.isArray(secondValue)) { + if (Array.isArray(secondValue) && Array.isArray(firstValue)) { // Array - first[key] = [...firstValue, ...secondValue]; - } else if (typeof secondValue === "object") { + if (mergeKeys?.[key]) { + // Merge keys are used to determine whether an item form the second object should override one from the first + let keptFromFirst: any[] = []; + firstValue.forEach((item: any) => { + if (!secondValue.some((item2: any) => mergeKeys[key](item, item2))) { + keptFromFirst.push(item); + } + }) + first[key] = [...keptFromFirst, ...secondValue]; + } else { + first[key] = [...firstValue, ...secondValue]; + } + } else if (typeof secondValue === "object" && typeof firstValue === "object") { // Object first[key] = mergeJson(firstValue, secondValue, mergeBehavior); } else { From 4c315b2d28523b64fbfd1ee3f71e596ee5c3c58e Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Tue, 27 Feb 2024 14:27:28 -0500 Subject: [PATCH 110/141] =?UTF-8?q?=E2=9C=A8=20automatic=20config=20update?= =?UTF-8?q?s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/config/handler.ts | 6 +++++- core/indexing/chunk/chunk.ts | 2 +- .../vscode/src/extension/vscodeExtension.ts | 3 ++- gui/src/components/mainInput/TipTapEditor.tsx | 15 +++++++++++++-- 4 files changed, 21 insertions(+), 5 deletions(-) diff --git a/core/config/handler.ts b/core/config/handler.ts index 0c82d94fa..2930d547d 100644 --- a/core/config/handler.ts +++ b/core/config/handler.ts @@ -18,14 +18,17 @@ export class ConfigHandler { private readonly ide: IDE; private readonly remoteConfigServerUrl: URL | undefined; private readonly writeLog: (text: string) => void; + private readonly onConfigUpdate: () => void; constructor( ide: IDE, remoteConfigServerUrl: URL | undefined, - writeLog: (text: string) => void + writeLog: (text: string) => void, + onConfigUpdate: () => void ) { this.ide = ide; this.remoteConfigServerUrl = remoteConfigServerUrl; this.writeLog = writeLog; + this.onConfigUpdate = onConfigUpdate; try { this.loadConfig(); } catch (e) { @@ -37,6 +40,7 @@ export class ConfigHandler { this.savedConfig = undefined; this.savedBrowserConfig = undefined; this.loadConfig(); + this.onConfigUpdate() } async getSerializedConfig(): Promise { diff --git a/core/indexing/chunk/chunk.ts b/core/indexing/chunk/chunk.ts index 0132bc08d..84c802e15 100644 --- a/core/indexing/chunk/chunk.ts +++ b/core/indexing/chunk/chunk.ts @@ -23,7 +23,7 @@ async function* chunkDocumentWithoutId( } return; } catch (e) { - console.error(`Failed to parse ${filepath}: `, e); + // console.error(`Failed to parse ${filepath}: `, e); // falls back to basicChunker } } diff --git a/extensions/vscode/src/extension/vscodeExtension.ts b/extensions/vscode/src/extension/vscodeExtension.ts index fef0538c9..0ba7a327c 100644 --- a/extensions/vscode/src/extension/vscodeExtension.ts +++ b/extensions/vscode/src/extension/vscodeExtension.ts @@ -52,7 +52,8 @@ export class VsCodeExtension { "==========================================================================" ); outputChannel.append(log); - } + }, + () => this.webviewProtocol?.request("configUpdate", undefined) ); this.configHandler.reloadConfig(); diff --git a/gui/src/components/mainInput/TipTapEditor.tsx b/gui/src/components/mainInput/TipTapEditor.tsx index 2e00462f1..ec6fa3d90 100644 --- a/gui/src/components/mainInput/TipTapEditor.tsx +++ b/gui/src/components/mainInput/TipTapEditor.tsx @@ -354,8 +354,11 @@ function TipTapEditor(props: TipTapEditorProps) { } props.onEnter(json); - editor.commands.clearContent(true); - }, [props.onEnter, editor]); + + if (props.isMainInput) { + editor.commands.clearContent(true); + } + }, [props.onEnter, editor, props.isMainInput]); // This is a mechanism for overriding the IDE keyboard shortcut when inside of the webview const [ignoreHighlightedCode, setIgnoreHighlightedCode] = useState(false); @@ -382,6 +385,14 @@ function TipTapEditor(props: TipTapEditorProps) { }; }, []); + // Re-focus main input after done generating + const active = useSelector((state: RootState) => state.state.active); + useEffect(() => { + if (editor && !active && props.isMainInput) { + editor.commands.focus(); + } + }, [props.isMainInput, active,editor]) + // IDE event listeners useWebviewListener( "userInput", From 4a6edabe8da20c3b5f9db9ba775c375bbb112c7f Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Tue, 27 Feb 2024 14:52:51 -0500 Subject: [PATCH 111/141] =?UTF-8?q?=F0=9F=94=96=20update=20package.json=20?= =?UTF-8?q?version?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 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 61a9f08b3..0829a3d63 100644 --- a/extensions/vscode/package.json +++ b/extensions/vscode/package.json @@ -1,7 +1,7 @@ { "name": "continue", "icon": "media/icon.png", - "version": "0.9.72", + "version": "0.9.73", "repository": { "type": "git", "url": "https://github.com/continuedev/continue" From c93223355803358e279a9d2258238fec2cb9f27b Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Tue, 27 Feb 2024 15:54:15 -0500 Subject: [PATCH 112/141] =?UTF-8?q?=E2=9C=8F=EF=B8=8F=20fix=20typo=20in=20?= =?UTF-8?q?intellij=20extension?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../continueintellijextension/services/ContinuePluginService.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/services/ContinuePluginService.kt b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/services/ContinuePluginService.kt index bac9d3096..6f4989c59 100644 --- a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/services/ContinuePluginService.kt +++ b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/services/ContinuePluginService.kt @@ -23,7 +23,7 @@ class ContinuePluginService(project: Project) : Disposable, DumbAware { var ideProtocolClient: IdeProtocolClient? = null var coreMessenger: CoreMessenger? = null - var worksapcePaths: Array? = null + var workspacePaths: Array? = null var windowId: String = UUID.randomUUID().toString() override fun dispose() { From a7cc1f32e565741447892930cd150c26162c56a1 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Tue, 27 Feb 2024 23:23:37 -0500 Subject: [PATCH 113/141] =?UTF-8?q?=F0=9F=9A=A7=20working=20on=20fixing=20?= =?UTF-8?q?up=20after=20merging=20preview=20to=20tab-auto?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/autocomplete/constructPrompt.ts | 27 +++++-------------- .../src/main/resources/config_schema.json | 4 +-- extensions/vscode/package-lock.json | 4 +-- .../src/autocomplete/completionProvider.ts | 12 ++++++--- .../vscode/src/extension/vscodeExtension.ts | 8 +++--- extensions/vscode/src/util/remoteConfig.ts | 2 +- 6 files changed, 23 insertions(+), 34 deletions(-) diff --git a/core/autocomplete/constructPrompt.ts b/core/autocomplete/constructPrompt.ts index 7597b0560..8c608ba71 100644 --- a/core/autocomplete/constructPrompt.ts +++ b/core/autocomplete/constructPrompt.ts @@ -10,7 +10,7 @@ import { getBasename } from "../util"; import { getAst, getScopeAroundRange, getTreePathAtCursor } from "./ast"; import { AutocompleteLanguageInfo, LANGUAGES, Typescript } from "./languages"; -import { AutocompleteSnippet, rankSnippets } from "./ranking"; +import { rankSnippets } from "./ranking"; import { slidingWindowMatcher } from "./slidingWindow"; export function languageForFilepath( @@ -65,25 +65,9 @@ function shouldCompleteMultilineAst( async function shouldCompleteMultiline( filepath: string, fullPrefix: string, - fullSuffix: string, - clipboardText: string, - language: AutocompleteLanguageInfo, - getDefinition: ( - filepath: string, - line: number, - character: number - ) => Promise, - options: TabAutocompleteOptions, - modelName: string -): Promise<{ - prefix: string; - suffix: string; - useFim: boolean; - completeMultiline: boolean; -}> { - // Find external snippets - const snippets: AutocompleteSnippet[] = []; - + fullSuffix: string +): Promise { + // Use AST to determine whether to complete multiline let treePath: Parser.SyntaxNode[] | undefined; try { const ast = await getAst(filepath, fullPrefix + fullSuffix); @@ -116,7 +100,8 @@ export async function constructAutocompletePrompt( ) => Promise, options: TabAutocompleteOptions, recentlyEditedRanges: RangeInFileWithContents[], - recentlyEditedDocuments: RangeInFileWithContents[] + recentlyEditedDocuments: RangeInFileWithContents[], + modelName: string ): Promise<{ prefix: string; suffix: string; diff --git a/extensions/intellij/src/main/resources/config_schema.json b/extensions/intellij/src/main/resources/config_schema.json index f693f46a2..7cc6e3c2f 100644 --- a/extensions/intellij/src/main/resources/config_schema.json +++ b/extensions/intellij/src/main/resources/config_schema.json @@ -1558,8 +1558,8 @@ "type": "string", "description": "An optional template string to be used for autocomplete. It will be rendered with the Mustache templating language, and is passed the 'prefix' and 'suffix' variables." }, - "disableMultiLineCompletions": { - "type": "boolean", + "multilineCompletions": { + "enum": ["always", "never", "auto"], "description": "If set to true, Continue will only complete a single line at a time." } }, diff --git a/extensions/vscode/package-lock.json b/extensions/vscode/package-lock.json index ab7886c46..8b8837ae8 100644 --- a/extensions/vscode/package-lock.json +++ b/extensions/vscode/package-lock.json @@ -1,12 +1,12 @@ { "name": "continue", - "version": "0.9.72", + "version": "0.9.73", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "continue", - "version": "0.9.72", + "version": "0.9.73", "license": "Apache-2.0", "dependencies": { "@electron/rebuild": "^3.2.10", diff --git a/extensions/vscode/src/autocomplete/completionProvider.ts b/extensions/vscode/src/autocomplete/completionProvider.ts index fa1729b50..30900ee9c 100644 --- a/extensions/vscode/src/autocomplete/completionProvider.ts +++ b/extensions/vscode/src/autocomplete/completionProvider.ts @@ -1,9 +1,11 @@ +import { IDE } from "core"; import AutocompleteLruCache from "core/autocomplete/cache"; import { DEFAULT_AUTOCOMPLETE_OPTS } from "core/autocomplete/parameters"; +import { ConfigHandler } from "core/config/handler"; +import { logDevData } from "core/util/devdata"; import { v4 as uuidv4 } from "uuid"; import * as vscode from "vscode"; -import { ideProtocolClient } from "../activation/activate"; -import { configHandler } from "../loadConfig"; +import { TabAutocompleteModel } from "../util/loadAutocompleteModel"; import { getTabCompletion } from "./getTabCompletion"; import { stopStatusBarLoading } from "./statusBar"; @@ -18,6 +20,8 @@ export class ContinueCompletionProvider public static errorsShown: Set = new Set(); + constructor(private readonly configHandler: ConfigHandler, private readonly ide: IDE, private readonly tabAutocompleteModel: TabAutocompleteModel) {} + public async provideInlineCompletionItems( document: vscode.TextDocument, position: vscode.Position, @@ -29,7 +33,7 @@ export class ContinueCompletionProvider const uuid = uuidv4(); ContinueCompletionProvider.lastUUID = uuid; - const config = await configHandler.loadConfig(); + const config = await this.configHandler.loadConfig(); const options = { ...config.tabAutocompleteOptions, ...DEFAULT_AUTOCOMPLETE_OPTS, @@ -86,7 +90,7 @@ export class ContinueCompletionProvider const logRejectionTimeout = setTimeout(() => { // Wait 10 seconds, then assume it wasn't accepted outcome.accepted = false; - ideProtocolClient.logDevData("autocomplete", outcome); + logDevData("autocomplete", outcome); }, 10_000); return [ diff --git a/extensions/vscode/src/extension/vscodeExtension.ts b/extensions/vscode/src/extension/vscodeExtension.ts index 0ba7a327c..a0359453f 100644 --- a/extensions/vscode/src/extension/vscodeExtension.ts +++ b/extensions/vscode/src/extension/vscodeExtension.ts @@ -2,16 +2,16 @@ import { ConfigHandler } from "core/config/handler"; import { CodebaseIndexer, PauseToken } from "core/indexing/indexCodebase"; import { v4 as uuidv4 } from "uuid"; import * as vscode from "vscode"; +import { + ContinueCompletionProvider, +} from "../autocomplete/completionProvider"; +import { setupStatusBar } from "../autocomplete/statusBar"; import { registerAllCommands } from "../commands"; import { ContinueGUIWebviewViewProvider } from "../debugPanel"; import { DiffManager } from "../diff/horizontal"; import { VerticalPerLineDiffManager } from "../diff/verticalPerLine/manager"; import { VsCodeIde } from "../ideProtocol"; import { registerAllCodeLensProviders } from "../lang-server/codeLens"; -import { - ContinueCompletionProvider, - setupStatusBar, -} from "../lang-server/completionProvider"; import { TabAutocompleteModel } from "../util/loadAutocompleteModel"; import { RemoteConfigSync } from "../util/remoteConfig"; import { VsCodeWebviewProtocol } from "../webviewProtocol"; diff --git a/extensions/vscode/src/util/remoteConfig.ts b/extensions/vscode/src/util/remoteConfig.ts index a18b04ce8..2f27664a4 100644 --- a/extensions/vscode/src/util/remoteConfig.ts +++ b/extensions/vscode/src/util/remoteConfig.ts @@ -88,7 +88,7 @@ export class RemoteConfigSync { this.syncInterval = setInterval(() => { if (!this.userToken || !this.remoteConfigServerUrl) return; this.sync(this.userToken, new URL(this.remoteConfigServerUrl)); - }, this.remoteConfigSyncPeriod * 1000); + }, this.remoteConfigSyncPeriod * 1000 * 60); } async sync(userToken: string, remoteConfigServerUrl: URL) { From 6a070274f1857b81e8f680ba3a45edd4b4fd3a79 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Tue, 27 Feb 2024 23:31:45 -0500 Subject: [PATCH 114/141] =?UTF-8?q?=F0=9F=90=9B=20fix=20remoteUrl=20bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- extensions/vscode/package-lock.json | 4 ++-- extensions/vscode/src/extension/vscodeExtension.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/extensions/vscode/package-lock.json b/extensions/vscode/package-lock.json index ab7886c46..8b8837ae8 100644 --- a/extensions/vscode/package-lock.json +++ b/extensions/vscode/package-lock.json @@ -1,12 +1,12 @@ { "name": "continue", - "version": "0.9.72", + "version": "0.9.73", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "continue", - "version": "0.9.72", + "version": "0.9.73", "license": "Apache-2.0", "dependencies": { "@electron/rebuild": "^3.2.10", diff --git a/extensions/vscode/src/extension/vscodeExtension.ts b/extensions/vscode/src/extension/vscodeExtension.ts index 0ba7a327c..33f9384e2 100644 --- a/extensions/vscode/src/extension/vscodeExtension.ts +++ b/extensions/vscode/src/extension/vscodeExtension.ts @@ -41,7 +41,7 @@ export class VsCodeExtension { ); this.configHandler = new ConfigHandler( this.ide, - remoteUrl === undefined || remoteUrl === "" + typeof remoteUrl !== "string" || remoteUrl === "" ? undefined : new URL(remoteUrl), async (log: string) => { From 76116764e132705161ee61624afab604aa12aadb Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Wed, 28 Feb 2024 00:01:23 -0500 Subject: [PATCH 115/141] =?UTF-8?q?=F0=9F=8E=A8=20clean=20up=20tab-auto=20?= =?UTF-8?q?after=20merge?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../vscode/src/autocomplete/completionProvider.ts | 4 +++- .../vscode/src/autocomplete/getTabCompletion.ts | 15 +++++++++------ extensions/vscode/src/autocomplete/lsp.ts | 8 ++++---- .../src/lang-server/autocompletePromptBuilder.ts | 6 ++++-- 4 files changed, 20 insertions(+), 13 deletions(-) diff --git a/extensions/vscode/src/autocomplete/completionProvider.ts b/extensions/vscode/src/autocomplete/completionProvider.ts index 30900ee9c..afd2a2dc7 100644 --- a/extensions/vscode/src/autocomplete/completionProvider.ts +++ b/extensions/vscode/src/autocomplete/completionProvider.ts @@ -69,7 +69,9 @@ export class ContinueCompletionProvider document, position, token, - options + options, + this.tabAutocompleteModel, + this.ide ); const completion = outcome?.completion; diff --git a/extensions/vscode/src/autocomplete/getTabCompletion.ts b/extensions/vscode/src/autocomplete/getTabCompletion.ts index 862bea0ef..dda474b44 100644 --- a/extensions/vscode/src/autocomplete/getTabCompletion.ts +++ b/extensions/vscode/src/autocomplete/getTabCompletion.ts @@ -1,4 +1,4 @@ -import { TabAutocompleteOptions } from "core"; +import { IDE, TabAutocompleteOptions } from "core"; import { AutocompleteLruCache } from "core/autocomplete/cache"; import { onlyWhitespaceAfterEndOfLine } from "core/autocomplete/charStream"; import { @@ -15,7 +15,7 @@ import { streamLines } from "core/diff/util"; import OpenAI from "core/llm/llms/OpenAI"; import Handlebars from "handlebars"; import * as vscode from "vscode"; -import { TabAutocompleteModel } from "../loadConfig"; +import { TabAutocompleteModel } from "../util/loadAutocompleteModel"; import { ContinueCompletionProvider } from "./completionProvider"; import { getDefinitionsFromLsp } from "./lsp"; import { RecentlyEditedTracker } from "./recentlyEdited"; @@ -39,7 +39,9 @@ export async function getTabCompletion( document: vscode.TextDocument, pos: vscode.Position, token: vscode.CancellationToken, - options: TabAutocompleteOptions + options: TabAutocompleteOptions, + tabAutocompleteModel: TabAutocompleteModel, + ide: IDE ): Promise { const startTime = Date.now(); @@ -54,7 +56,7 @@ export async function getTabCompletion( try { // Model - const llm = await TabAutocompleteModel.get(); + const llm = await tabAutocompleteModel.get() if (llm instanceof OpenAI) { llm.useLegacyCompletionsEndpoint = true; } @@ -81,10 +83,11 @@ export async function getTabCompletion( fullSuffix, clipboardText, lang, - getDefinitionsFromLsp, + (document, cursorIndex) => getDefinitionsFromLsp(document, cursorIndex, ide), options, await recentlyEditedTracker.getRecentlyEditedRanges(), - await recentlyEditedTracker.getRecentlyEditedDocuments() + await recentlyEditedTracker.getRecentlyEditedDocuments(), + llm.model ); const { template, completionOptions } = options.template diff --git a/extensions/vscode/src/autocomplete/lsp.ts b/extensions/vscode/src/autocomplete/lsp.ts index 1a0d8514d..d21763424 100644 --- a/extensions/vscode/src/autocomplete/lsp.ts +++ b/extensions/vscode/src/autocomplete/lsp.ts @@ -1,9 +1,8 @@ -import { RangeInFile } from "core"; +import { IDE, RangeInFile } from "core"; import { getAst, getTreePathAtCursor } from "core/autocomplete/ast"; import { RangeInFileWithContents } from "core/commands/util"; import * as vscode from "vscode"; import Parser from "web-tree-sitter"; -import { ideProtocolClient } from "../activation/activate"; type GotoProviderName = | "vscode.executeDefinitionProvider" @@ -67,7 +66,8 @@ async function getDefinitionsForNode( export async function getDefinitionsFromLsp( document: RangeInFileWithContents, - cursorIndex: number + cursorIndex: number, + ide: IDE ): Promise { const ast = await getAst(document.filepath, document.contents); if (!ast) return []; @@ -82,7 +82,7 @@ export async function getDefinitionsFromLsp( ...(await Promise.all( definitions.map(async (def) => ({ ...def, - contents: await ideProtocolClient.readRangeInFile( + contents: await ide.readRangeInFile( def.filepath, new vscode.Range( new vscode.Position( diff --git a/extensions/vscode/src/lang-server/autocompletePromptBuilder.ts b/extensions/vscode/src/lang-server/autocompletePromptBuilder.ts index eab90c80e..8a8895f55 100644 --- a/extensions/vscode/src/lang-server/autocompletePromptBuilder.ts +++ b/extensions/vscode/src/lang-server/autocompletePromptBuilder.ts @@ -1,5 +1,5 @@ import { IDE } from "core"; -import { AutocompleteSnippet } from "core/autocomplete/constructPrompt"; +import { AutocompleteSnippet } from "core/autocomplete/ranking"; import * as vscode from "vscode"; export class AutocompletePromptBuilder { @@ -19,10 +19,12 @@ export class AutocompletePromptBuilder { if (definitions[0]?.targetRange) { return { filepath: uri, - content: await this.ide.readRangeInFile( + contents: await this.ide.readRangeInFile( definitions[0].targetUri.fsPath, definitions[0].targetRange ), + range: definitions[0].targetRange, + score: 0.8 }; } From 5f72ac603312ea8f43fa541afecc97b882b0ea38 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Wed, 28 Feb 2024 00:18:24 -0500 Subject: [PATCH 116/141] =?UTF-8?q?=F0=9F=A7=91=E2=80=8D=F0=9F=92=BB=20fix?= =?UTF-8?q?=20rmDirSync=20error=20on=20windows?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- extensions/vscode/scripts/prepackage.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/extensions/vscode/scripts/prepackage.js b/extensions/vscode/scripts/prepackage.js index 76af0d9a0..dd281e10f 100644 --- a/extensions/vscode/scripts/prepackage.js +++ b/extensions/vscode/scripts/prepackage.js @@ -172,18 +172,21 @@ if (args[2] === "--target") { if (target) { // If building for production, only need the binaries for current platform if (!target.startsWith("darwin")) { - fs.rmdirSync(path.join(__dirname, "../bin/napi-v3/darwin"), { + fs.rmSync(path.join(__dirname, "../bin/napi-v3/darwin"), { recursive: true, + force: true }); } if (!target.startsWith("linux")) { - fs.rmdirSync(path.join(__dirname, "../bin/napi-v3/linux"), { + fs.rmSync(path.join(__dirname, "../bin/napi-v3/linux"), { recursive: true, + force: true }); } if (!target.startsWith("win")) { - fs.rmdirSync(path.join(__dirname, "../bin/napi-v3/win32"), { + fs.rmSync(path.join(__dirname, "../bin/napi-v3/win32"), { recursive: true, + force: true }); } } From 62e1c15c854b813d49d0c9558eab550988e25396 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Wed, 28 Feb 2024 19:42:12 -0500 Subject: [PATCH 117/141] =?UTF-8?q?=F0=9F=91=B7=20use=20rimraf=20instead?= =?UTF-8?q?=20of=20rmSync?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- extensions/vscode/scripts/prepackage.js | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/extensions/vscode/scripts/prepackage.js b/extensions/vscode/scripts/prepackage.js index dd281e10f..16ad3060d 100644 --- a/extensions/vscode/scripts/prepackage.js +++ b/extensions/vscode/scripts/prepackage.js @@ -72,7 +72,7 @@ if (args[2] === "--target") { const indexHtmlPath = path.join(intellijExtensionWebviewPath, "index.html"); fs.copyFileSync(indexHtmlPath, "tmp_index.html"); - fs.rmSync(intellijExtensionWebviewPath, { recursive: true }); + rimrafSync(intellijExtensionWebviewPath); fs.mkdirSync(intellijExtensionWebviewPath, { recursive: true }); await new Promise((resolve, reject) => { @@ -90,7 +90,7 @@ if (args[2] === "--target") { // Put back index.html if (fs.existsSync(indexHtmlPath)) { - fs.rmSync(indexHtmlPath, {}); + rimrafSync(indexHtmlPath); } fs.copyFileSync("tmp_index.html", indexHtmlPath); fs.unlinkSync("tmp_index.html"); @@ -172,22 +172,13 @@ if (args[2] === "--target") { if (target) { // If building for production, only need the binaries for current platform if (!target.startsWith("darwin")) { - fs.rmSync(path.join(__dirname, "../bin/napi-v3/darwin"), { - recursive: true, - force: true - }); + rimrafSync(path.join(__dirname, "../bin/napi-v3/darwin")); } if (!target.startsWith("linux")) { - fs.rmSync(path.join(__dirname, "../bin/napi-v3/linux"), { - recursive: true, - force: true - }); + rimrafSync(path.join(__dirname, "../bin/napi-v3/linux")); } if (!target.startsWith("win")) { - fs.rmSync(path.join(__dirname, "../bin/napi-v3/win32"), { - recursive: true, - force: true - }); + rimrafSync(path.join(__dirname, "../bin/napi-v3/win32")); } } console.log("[info] Copied onnxruntime-node"); From 7af502c2f31fda49fffe479e6de7b657753ab1c8 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Wed, 28 Feb 2024 20:20:45 -0500 Subject: [PATCH 118/141] =?UTF-8?q?=E2=9A=A1=EF=B8=8F=20fill=20prompt=20wi?= =?UTF-8?q?th=20highest=20scoring=20snippets?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/autocomplete/constructPrompt.ts | 19 +++++------ core/autocomplete/index.ts | 0 core/autocomplete/parameters.ts | 1 + core/autocomplete/ranking.ts | 22 +++++++++++++ core/config/default.ts | 5 +++ core/index.d.ts | 1 + .../src/autocomplete/getTabCompletion.ts | 13 ++++++-- extensions/vscode/src/autocomplete/lsp.ts | 15 ++++++--- .../lang-server/autocompletePromptBuilder.ts | 33 ------------------- 9 files changed, 59 insertions(+), 50 deletions(-) delete mode 100644 core/autocomplete/index.ts delete mode 100644 extensions/vscode/src/lang-server/autocompletePromptBuilder.ts diff --git a/core/autocomplete/constructPrompt.ts b/core/autocomplete/constructPrompt.ts index 8c608ba71..1b5dab648 100644 --- a/core/autocomplete/constructPrompt.ts +++ b/core/autocomplete/constructPrompt.ts @@ -10,7 +10,7 @@ import { getBasename } from "../util"; import { getAst, getScopeAroundRange, getTreePathAtCursor } from "./ast"; import { AutocompleteLanguageInfo, LANGUAGES, Typescript } from "./languages"; -import { rankSnippets } from "./ranking"; +import { AutocompleteSnippet, fillPromptWithSnippets, rankSnippets } from "./ranking"; import { slidingWindowMatcher } from "./slidingWindow"; export function languageForFilepath( @@ -94,14 +94,11 @@ export async function constructAutocompletePrompt( fullSuffix: string, clipboardText: string, language: AutocompleteLanguageInfo, - getDefinitions: ( - document: RangeInFileWithContents, - cursorIndex: number - ) => Promise, options: TabAutocompleteOptions, recentlyEditedRanges: RangeInFileWithContents[], recentlyEditedDocuments: RangeInFileWithContents[], - modelName: string + modelName: string, + extraSnippets: AutocompleteSnippet[] ): Promise<{ prefix: string; suffix: string; @@ -109,7 +106,7 @@ export async function constructAutocompletePrompt( completeMultiline: boolean; }> { // Find external snippets - let snippets: RangeInFileWithContents[] = []; + let snippets: RangeInFileWithContents[] = extraSnippets; const windowAroundCursor = fullPrefix.slice( @@ -140,15 +137,17 @@ export async function constructAutocompletePrompt( snippets.push(...(recentlyEdited as any)); // Rank / order the snippets - snippets = rankSnippets(snippets, windowAroundCursor).filter( + const scoredSnippets = rankSnippets(snippets, windowAroundCursor).filter( // Filter out snippets that are already in prefix (snippet) => snippet.score < 0.98 ); - // How to add snippets to the prefix? Count separately? Always keep some of the prefix?? + // Fill maxSnippetTokens with snippets + const maxSnippetTokens = options.maxPromptTokens * options.maxSnippetPercentage; + const finalSnippets = fillPromptWithSnippets(scoredSnippets, maxSnippetTokens, modelName); // Construct basic prefix / suffix - const formattedSnippets = snippets + const formattedSnippets = finalSnippets .map((snippet) => formatExternalSnippet(snippet.filepath, snippet.contents, language) ) diff --git a/core/autocomplete/index.ts b/core/autocomplete/index.ts deleted file mode 100644 index e69de29bb..000000000 diff --git a/core/autocomplete/parameters.ts b/core/autocomplete/parameters.ts index f41184088..18dc7f244 100644 --- a/core/autocomplete/parameters.ts +++ b/core/autocomplete/parameters.ts @@ -10,4 +10,5 @@ export const DEFAULT_AUTOCOMPLETE_OPTS: TabAutocompleteOptions = { multilineCompletions: "auto", slidingWindowPrefixPercentage: 0.75, slidingWindowSize: 500, + maxSnippetPercentage: 0.6 }; diff --git a/core/autocomplete/ranking.ts b/core/autocomplete/ranking.ts index 81da512eb..cb87f2e34 100644 --- a/core/autocomplete/ranking.ts +++ b/core/autocomplete/ranking.ts @@ -1,4 +1,5 @@ import { RangeInFileWithContents } from "../commands/util"; +import { countTokens } from "../llm/countTokens"; export type AutocompleteSnippet = RangeInFileWithContents & { score: number; @@ -110,3 +111,24 @@ function mergeOverlappingRangeContents( const numOverlapping = first.range.end.line - second.range.start.line; return firstLines.slice(-numOverlapping).join("\n") + "\n" + second.contents; } + + +/** + * Fill the allowed space with snippets + */ +export function fillPromptWithSnippets(snippets: AutocompleteSnippet[], maxSnippetTokens: number, modelName: string): AutocompleteSnippet[] { + let tokensRemaining = maxSnippetTokens; + const keptSnippets: AutocompleteSnippet[] = [] + for (let i = 0; i < snippets.length; i++) { + const snippet = snippets[i]; + const tokenCount = countTokens(snippet.contents, modelName) + if (tokensRemaining - tokenCount >= 0) { + tokensRemaining -= tokenCount; + keptSnippets.push(snippet); + } else { + continue; + } + } + + return keptSnippets; +}; \ No newline at end of file diff --git a/core/config/default.ts b/core/config/default.ts index d80e0ef7e..3cf7d4390 100644 --- a/core/config/default.ts +++ b/core/config/default.ts @@ -59,6 +59,11 @@ export const defaultConfig: SerializedContinueConfig = { { name: "problems", params: {} }, { name: "codebase", params: {} }, ], + tabAutocompleteModel: { + title: "Starcoder 3b", + provider: "ollama", + model: "starcoder-3b", + } }; export const defaultConfigJetBrains: SerializedContinueConfig = { diff --git a/core/index.d.ts b/core/index.d.ts index 65e56bfd5..3eb295151 100644 --- a/core/index.d.ts +++ b/core/index.d.ts @@ -588,6 +588,7 @@ export interface TabAutocompleteOptions { multilineCompletions: "always" | "never" | "auto"; slidingWindowPrefixPercentage: number; slidingWindowSize: number; + maxSnippetPercentage: number; } export interface SerializedContinueConfig { diff --git a/extensions/vscode/src/autocomplete/getTabCompletion.ts b/extensions/vscode/src/autocomplete/getTabCompletion.ts index dda474b44..a7ec82a0e 100644 --- a/extensions/vscode/src/autocomplete/getTabCompletion.ts +++ b/extensions/vscode/src/autocomplete/getTabCompletion.ts @@ -9,6 +9,7 @@ import { stopAtSimilarLine, streamWithNewLines, } from "core/autocomplete/lineStream"; +import { AutocompleteSnippet } from "core/autocomplete/ranking"; import { getTemplateForModel } from "core/autocomplete/templates"; import { GeneratorReuseManager } from "core/autocomplete/util"; import { streamLines } from "core/diff/util"; @@ -76,6 +77,14 @@ export async function getTabCompletion( Math.min(pos.line + 1, document.lineCount - 1) ).text; const clipboardText = await vscode.env.clipboard.readText(); + + let extrasSnippets = (await Promise.race([ + getDefinitionsFromLsp(document.uri.fsPath, fullPrefix + fullSuffix, fullPrefix.length, ide), + new Promise((resolve) => { + setTimeout(() => resolve([]), 100); + }) + ])) as AutocompleteSnippet[] + const { prefix, suffix, completeMultiline } = await constructAutocompletePrompt( document.uri.toString(), @@ -83,11 +92,11 @@ export async function getTabCompletion( fullSuffix, clipboardText, lang, - (document, cursorIndex) => getDefinitionsFromLsp(document, cursorIndex, ide), options, await recentlyEditedTracker.getRecentlyEditedRanges(), await recentlyEditedTracker.getRecentlyEditedDocuments(), - llm.model + llm.model, + extrasSnippets ); const { template, completionOptions } = options.template diff --git a/extensions/vscode/src/autocomplete/lsp.ts b/extensions/vscode/src/autocomplete/lsp.ts index d21763424..a949d06ab 100644 --- a/extensions/vscode/src/autocomplete/lsp.ts +++ b/extensions/vscode/src/autocomplete/lsp.ts @@ -1,5 +1,6 @@ import { IDE, RangeInFile } from "core"; import { getAst, getTreePathAtCursor } from "core/autocomplete/ast"; +import { AutocompleteSnippet } from "core/autocomplete/ranking"; import { RangeInFileWithContents } from "core/commands/util"; import * as vscode from "vscode"; import Parser from "web-tree-sitter"; @@ -65,11 +66,12 @@ async function getDefinitionsForNode( */ export async function getDefinitionsFromLsp( - document: RangeInFileWithContents, + filepath: string, + contents: string, cursorIndex: number, ide: IDE -): Promise { - const ast = await getAst(document.filepath, document.contents); +): Promise { + const ast = await getAst(filepath, contents); if (!ast) return []; const treePath = await getTreePathAtCursor(ast, cursorIndex); @@ -77,7 +79,7 @@ export async function getDefinitionsFromLsp( const results: RangeInFileWithContents[] = []; for (const node of treePath.reverse()) { - const definitions = await getDefinitionsForNode(document.filepath, node); + const definitions = await getDefinitionsForNode(filepath, node); results.push( ...(await Promise.all( definitions.map(async (def) => ({ @@ -97,5 +99,8 @@ export async function getDefinitionsFromLsp( ); } - return results; + return results.map((result) => ({ + ...result, + score: 0.8 + })); } diff --git a/extensions/vscode/src/lang-server/autocompletePromptBuilder.ts b/extensions/vscode/src/lang-server/autocompletePromptBuilder.ts deleted file mode 100644 index 8a8895f55..000000000 --- a/extensions/vscode/src/lang-server/autocompletePromptBuilder.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { IDE } from "core"; -import { AutocompleteSnippet } from "core/autocomplete/ranking"; -import * as vscode from "vscode"; - -export class AutocompletePromptBuilder { - constructor(private readonly ide: IDE) {} - - async getDefinition( - uri: string, - line: number, - character: number - ): Promise { - const definitions = (await vscode.commands.executeCommand( - "vscode.executeDefinitionProvider", - vscode.Uri.parse(uri), - new vscode.Position(line, character) - )) as any; - - if (definitions[0]?.targetRange) { - return { - filepath: uri, - contents: await this.ide.readRangeInFile( - definitions[0].targetUri.fsPath, - definitions[0].targetRange - ), - range: definitions[0].targetRange, - score: 0.8 - }; - } - - return undefined; - } -} From a03d0b8cc3d7ee86b1cfc909da2b04e293ea5deb Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Wed, 28 Feb 2024 23:33:43 -0500 Subject: [PATCH 119/141] =?UTF-8?q?=F0=9F=93=9D=20small=20docs=20updates?= =?UTF-8?q?=20to=20autocomplete?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/docs/walkthroughs/tab-autocomplete.md | 8 ++++---- extensions/vscode/media/welcome.md | 2 +- extensions/vscode/package.json | 4 ++-- extensions/vscode/yarn.lock | 5 ----- 4 files changed, 7 insertions(+), 12 deletions(-) diff --git a/docs/docs/walkthroughs/tab-autocomplete.md b/docs/docs/walkthroughs/tab-autocomplete.md index ea4f6f36f..86c878e6f 100644 --- a/docs/docs/walkthroughs/tab-autocomplete.md +++ b/docs/docs/walkthroughs/tab-autocomplete.md @@ -7,7 +7,7 @@ Continue now provides experimental support for tab autocomplete in VS Code. You We recommend setting up tab-autocomplete with a local Ollama instance. To do this, first download the latest version of Ollama from [here](https://ollama.ai). Then, run the following command to download our recommended model: ```bash -ollama run deepseek-coder:1.3b-base +ollama run starcoder:3b ``` Once it has been downloaded, you should begin to see completions in VS Code. @@ -21,7 +21,7 @@ All of the configuration options available for chat models are available to use "tabAutocompleteModel": { "title": "Tab Autocomplete Model", "provider": "ollama", - "model": "deepseek-coder:1.3b-base", + "model": "starcoder:3b", "apiBase": "https://" }, ... @@ -58,7 +58,7 @@ This object allows you to customize the behavior of tab-autocomplete. The availa "tabAutocompleteModel": { "title": "Tab Autocomplete Model", "provider": "ollama", - "model": "deepseek-coder:1.3b-base", + "model": "starcoder:3b", "apiBase": "https://" }, "tabAutocompleteOptions": { @@ -78,7 +78,7 @@ Follow these steps to ensure that everything is set up correctly: 1. Make sure you have the pre-release version of the extension installed. 2. Make sure you have the "Enable Tab Autocomplete" setting checked. 3. Make sure you have downloaded Ollama. -4. Run `ollama run deepseek-coder:1.3b-base` to verify that the model is downloaded. +4. Run `ollama run starcoder:3b` to verify that the model is downloaded. 5. Make sure that any other completion providers are disabled (e.g. Copilot), as they may interfere. 6. Make sure that you aren't also using another Ollama model for chat. This will cause Ollama to constantly load and unload the models from memory, resulting in slow responses (or none at all) for both. 7. Check the output of the logs to find any potential errors (cmd/ctrl+shift+p -> "Toggle Developer Tools" -> "Console" tab). diff --git a/extensions/vscode/media/welcome.md b/extensions/vscode/media/welcome.md index a82406b1f..dfd66ff39 100644 --- a/extensions/vscode/media/welcome.md +++ b/extensions/vscode/media/welcome.md @@ -2,7 +2,7 @@ ## 🔑 Most important shortcuts -> If you've been using Continue, these have changed +> If you've been using Continue, these have changed. You can always customize them in VS Code settings. Cmd/Ctrl + L = Select code diff --git a/extensions/vscode/package.json b/extensions/vscode/package.json index 0829a3d63..46d8e9073 100644 --- a/extensions/vscode/package.json +++ b/extensions/vscode/package.json @@ -64,8 +64,8 @@ }, "continue.enableTabAutocomplete": { "type": "boolean", - "default": false, - "markdownDescription": "Enable Continue's experimental tab autocomplete feature (pre-release only). Read our walkthrough to learn about configuration and how to share feedback: [continue.dev › Walkthrough: Tab Autocomplete](https://continue.dev/docs/walkthroughs/tab-autocomplete)" + "default": true, + "markdownDescription": "Enable Continue's tab autocomplete feature. Read our walkthrough to learn about configuration and how to share feedback: [continue.dev › Walkthrough: Tab Autocomplete](https://continue.dev/docs/walkthroughs/tab-autocomplete)" }, "continue.remoteConfigServerUrl": { "type": "string", diff --git a/extensions/vscode/yarn.lock b/extensions/vscode/yarn.lock index 1b1081d06..8e89c76dc 100644 --- a/extensions/vscode/yarn.lock +++ b/extensions/vscode/yarn.lock @@ -696,11 +696,6 @@ resolved "https://registry.npmjs.org/@jsdevtools/ono/-/ono-7.1.3.tgz" integrity sha512-4JQNk+3mVzK3xh2rqd6RB4J46qUR19azEHBneZyTZM+c456qOrbbM/5xcR8huNCCcbVt7+UmizG6GuUvPvKUYg== -"@lancedb/vectordb-darwin-arm64@*": - version "0.4.11" - resolved "https://registry.npmjs.org/@lancedb/vectordb-darwin-arm64/-/vectordb-darwin-arm64-0.4.11.tgz" - integrity sha512-JDOKmFnuJPFkA7ZmrzBJolROwSjWr7yMvAbi40uLBc25YbbVezodd30u2EFtIwWwtk1GqNYRZ49FZOElKYeC/Q== - "@lancedb/vectordb-darwin-arm64@0.4.10": version "0.4.10" resolved "https://registry.npmjs.org/@lancedb/vectordb-darwin-arm64/-/vectordb-darwin-arm64-0.4.10.tgz" From c580a2f7b956d25c4919e0df1e1008b300232d5b Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Wed, 28 Feb 2024 23:34:14 -0500 Subject: [PATCH 120/141] =?UTF-8?q?=F0=9F=93=9D=20update=20docs=20for=20ol?= =?UTF-8?q?lama=20custom=20headers?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/docs/reference/Model Providers/ollama.md | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/docs/docs/reference/Model Providers/ollama.md b/docs/docs/reference/Model Providers/ollama.md index e036839eb..f2018e68b 100644 --- a/docs/docs/reference/Model Providers/ollama.md +++ b/docs/docs/reference/Model Providers/ollama.md @@ -25,4 +25,25 @@ In addition to the model type, you can also configure some of the parameters tha - num_predict: options.maxTokens - This determines the maximum number of tokens (words or characters) to generate for the given input prompt. - num_thread: options.numThreads - This is the multi-threading configuration option that controls how many threads the model uses for parallel processing. Higher values may lead to faster generation times but could also increase memory usage and complexity. Set this to one or two lower than the number of threads your CPU can handle to leave some for your GUI when running the model locally. +## Authentication + +If you need to send custom headers for authentication, you may use the `requestOptions.headers` property like this: + +```json title="~/.continue/config.json" +{ + "models": [ + { + "title": "Ollama", + "provider": "ollama", + "model": "llama2-7b", + "requestOptions": { + "headers": { + "Authorization": "Bearer xxx" + } + } + } + ] +} +``` + [View the source](https://github.com/continuedev/continue/blob/main/core/llm/llms/Ollama.ts) From 8a82097d22a05512c1dc6c5c51155b44788b638e Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Wed, 28 Feb 2024 23:36:01 -0500 Subject: [PATCH 121/141] =?UTF-8?q?=F0=9F=93=9D=20authentication=20section?= =?UTF-8?q?=20in=20docs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/docs/model-setup/configuration.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/docs/docs/model-setup/configuration.md b/docs/docs/model-setup/configuration.md index a40911643..c81f2bd8a 100644 --- a/docs/docs/model-setup/configuration.md +++ b/docs/docs/model-setup/configuration.md @@ -52,6 +52,27 @@ For many cases, either Continue will have a built-in provider or the API you use However, if neither of these are the case, you will need to wire up a new LLM object. Learn how to do this [here](#defining-a-custom-llm-provider). +## Authentication + +If you need to send custom headers for authentication, you may use the `requestOptions.headers` property like in this example with Ollama: + +```json title="~/.continue/config.json" +{ + "models": [ + { + "title": "Ollama", + "provider": "ollama", + "model": "llama2-7b", + "requestOptions": { + "headers": { + "Authorization": "Bearer xxx" + } + } + } + ] +} +``` + ## Customizing the Chat Template Most open-source models expect a specific chat format, for example llama2 and codellama expect the input to look like `"[INST] How do I write bubble sort in Rust? [/INST]"`. Continue will automatically attempt to detect the correct prompt format based on the `model`value that you provide, but if you are receiving nonsense responses, you can use the`template`property to explicitly set the format that you expect. The options are:`["llama2", "alpaca", "zephyr", "phind", "anthropic", "chatml", "openchat", "neural-chat", "none"]`. From 21c92103b3e3e462bfa7078198c13fb08dbc9c38 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Thu, 29 Feb 2024 09:45:35 -0500 Subject: [PATCH 122/141] =?UTF-8?q?=E2=9C=85=20checkpoint=20with=20web-tre?= =?UTF-8?q?e-sitter=20working?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CodeHighlightsContextProvider.ts | 52 +- .../providers/CodeOutlineContextProvider.ts | 37 +- core/context/providers/index.ts | 6 +- core/package-lock.json | 1295 ++-- core/package.json | 3 +- core/util/treeSitter.ts | 6 +- core/vendor/tree-sitter.wasm | Bin 186526 -> 185642 bytes core/yarn.lock | 5497 ----------------- extensions/vscode/package-lock.json | 3 +- extensions/vscode/yarn.lock | 8 +- gui/package-lock.json | 3 +- package-lock.json | 6 + 12 files changed, 702 insertions(+), 6214 deletions(-) delete mode 100644 core/yarn.lock create mode 100644 package-lock.json diff --git a/core/context/providers/CodeHighlightsContextProvider.ts b/core/context/providers/CodeHighlightsContextProvider.ts index b67ef57c5..ebf0405f1 100644 --- a/core/context/providers/CodeHighlightsContextProvider.ts +++ b/core/context/providers/CodeHighlightsContextProvider.ts @@ -6,8 +6,7 @@ import { } from "../.."; import { getBasename } from "../../util"; -import { getHighlightsThatFit, ILLMContextSizer } from "llm-code-highlighter/dist/index.continue"; -import { countTokens } from "../../llm/countTokens"; +// import { getHighlightsThatFit, ILLMContextSizer } from "llm-code-highlighter/dist/index.continue"; const HIGHLIGHTS_TOKEN_BUDGET = 2000; @@ -35,30 +34,31 @@ class CodeHighlightsContextProvider extends BaseContextProvider { }; }) ); - const contextSizer = { - fits(content: string): boolean { - return countTokens(content, "") < HIGHLIGHTS_TOKEN_BUDGET; - } - } as ILLMContextSizer - const repoMap = await getHighlightsThatFit( - contextSizer, - [], - allFiles - .filter((file) => file.content.length > 0) - .map((file) => { - return { - relPath: file.name, - code: file.content, - }; - }) - ); - return [ - { - content: repoMap ? repoMap : "", - name: "Code Highlights", - description: "Code highlights from open files", - }, - ]; + // const contextSizer = { + // fits(content: string): boolean { + // return countTokens(content, "") < HIGHLIGHTS_TOKEN_BUDGET; + // } + // } as ILLMContextSizer + // const repoMap = await getHighlightsThatFit( + // contextSizer, + // [], + // allFiles + // .filter((file) => file.content.length > 0) + // .map((file) => { + // return { + // relPath: file.name, + // code: file.content, + // }; + // }) + // ); + // return [ + // { + // content: repoMap ? repoMap : "", + // name: "Code Highlights", + // description: "Code highlights from open files", + // }, + // ]; + return [] } async load(): Promise {} diff --git a/core/context/providers/CodeOutlineContextProvider.ts b/core/context/providers/CodeOutlineContextProvider.ts index 367182617..6667e60cf 100644 --- a/core/context/providers/CodeOutlineContextProvider.ts +++ b/core/context/providers/CodeOutlineContextProvider.ts @@ -6,7 +6,7 @@ import { } from "../.."; import { getBasename } from "../../util"; -import { getOutlines } from "llm-code-highlighter/dist/index.continue"; +// import { getOutlines } from "llm-code-highlighter/dist/index.continue"; class CodeOutlineContextProvider extends BaseContextProvider { static description: ContextProviderDescription = { @@ -32,23 +32,24 @@ class CodeOutlineContextProvider extends BaseContextProvider { }; }) ); - const outlines = await getOutlines( - allFiles - .filter((file) => file.content.length > 0) - .map((file) => { - return { - relPath: file.name, - code: file.content, - }; - }) - ); - return [ - { - content: outlines ? outlines : "", - name: "Code Outline", - description: "Definition lines only (from open files)", - }, - ]; + // const outlines = await getOutlines( + // allFiles + // .filter((file) => file.content.length > 0) + // .map((file) => { + // return { + // relPath: file.name, + // code: file.content, + // }; + // }) + // ); + // return [ + // { + // content: outlines ? outlines : "", + // name: "Code Outline", + // description: "Definition lines only (from open files)", + // }, + // ]; + return [] } async load(): Promise {} diff --git a/core/context/providers/index.ts b/core/context/providers/index.ts index dc0306772..c8a08ea4d 100644 --- a/core/context/providers/index.ts +++ b/core/context/providers/index.ts @@ -1,7 +1,5 @@ import { BaseContextProvider } from ".."; import { ContextProviderName } from "../.."; -import CodeHighlightsContextProvider from "./CodeHighlightsContextProvider"; -import CodeOutlineContextProvider from "./CodeOutlineContextProvider"; import CodebaseContextProvider from "./CodebaseContextProvider"; import DatabaseContextProvider from "./DatabaseContextProvider"; import DiffContextProvider from "./DiffContextProvider"; @@ -33,8 +31,8 @@ const Providers: (typeof BaseContextProvider)[] = [ ProblemsContextProvider, FolderContextProvider, DocsContextProvider, - CodeHighlightsContextProvider, - CodeOutlineContextProvider, + // CodeHighlightsContextProvider, + // CodeOutlineContextProvider, JiraIssuesContextProvider, PostgresContextProvider, DatabaseContextProvider, diff --git a/core/package-lock.json b/core/package-lock.json index 78a409287..be6a860f7 100644 --- a/core/package-lock.json +++ b/core/package-lock.json @@ -25,7 +25,6 @@ "https-proxy-agent": "^7.0.3", "js-tiktoken": "^1.0.8", "llama-tokenizer-js": "^1.1.3", - "llm-code-highlighter": "^0.0.13", "node-fetch": "^3.3.2", "node-html-markdown": "^1.3.0", "ollama": "^0.4.6", @@ -39,7 +38,7 @@ "tree-sitter-wasms": "^0.1.6", "uuid": "^9.0.1", "vectordb": "^0.4.3", - "web-tree-sitter": "^0.20.8" + "web-tree-sitter": "^0.21.0" }, "devDependencies": { "@types/follow-redirects": "^1.14.4", @@ -216,9 +215,9 @@ } }, "node_modules/@babel/core": { - "version": "7.23.7", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.23.7.tgz", - "integrity": "sha512-+UpDgowcmqe36d4NwqvKsyPMlOLNGMsfMmQ5WGCu+siCe3t3dfe9njrzGfdN4qq+bcNUt0+Vw6haRxBOycs4dw==", + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.24.0.tgz", + "integrity": "sha512-fQfkg0Gjkza3nf0c7/w6Xf34BW4YvzNfACRLmmb7XRLa6XHdR+K9AlJlxneFfWYf6uhOzuzZVTjF/8KfndZANw==", "dev": true, "dependencies": { "@ampproject/remapping": "^2.2.0", @@ -226,11 +225,11 @@ "@babel/generator": "^7.23.6", "@babel/helper-compilation-targets": "^7.23.6", "@babel/helper-module-transforms": "^7.23.3", - "@babel/helpers": "^7.23.7", - "@babel/parser": "^7.23.6", - "@babel/template": "^7.22.15", - "@babel/traverse": "^7.23.7", - "@babel/types": "^7.23.6", + "@babel/helpers": "^7.24.0", + "@babel/parser": "^7.24.0", + "@babel/template": "^7.24.0", + "@babel/traverse": "^7.24.0", + "@babel/types": "^7.24.0", "convert-source-map": "^2.0.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", @@ -342,9 +341,9 @@ } }, "node_modules/@babel/helper-plugin-utils": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.22.5.tgz", - "integrity": "sha512-uLls06UVKgFG9QD4OeFYLEGteMIAa5kpTPcFL28yuCIIzsf6ZyKZMllKVOCZFhiZ5ptnwX4mtKdWCBE/uT4amg==", + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.24.0.tgz", + "integrity": "sha512-9cUznXMG0+FxRuJfvL82QlTqIzhVW9sL0KjMPHhAOOvpQGL8QtdxnBKILjBqxlHyliz0yCa1G903ZXI/FuHy2w==", "dev": true, "engines": { "node": ">=6.9.0" @@ -402,14 +401,14 @@ } }, "node_modules/@babel/helpers": { - "version": "7.23.8", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.23.8.tgz", - "integrity": "sha512-KDqYz4PiOWvDFrdHLPhKtCThtIcKVy6avWD2oG4GEvyQ+XDZwHD4YQd+H2vNMnq2rkdxsDkU82T+Vk8U/WXHRQ==", + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.24.0.tgz", + "integrity": "sha512-ulDZdc0Aj5uLc5nETsa7EPx2L7rM0YJM8r7ck7U73AXi7qOV44IHHRAYZHY6iU1rr3C5N4NtTmMRUJP6kwCWeA==", "dev": true, "dependencies": { - "@babel/template": "^7.22.15", - "@babel/traverse": "^7.23.7", - "@babel/types": "^7.23.6" + "@babel/template": "^7.24.0", + "@babel/traverse": "^7.24.0", + "@babel/types": "^7.24.0" }, "engines": { "node": ">=6.9.0" @@ -501,9 +500,9 @@ } }, "node_modules/@babel/parser": { - "version": "7.23.6", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.6.tgz", - "integrity": "sha512-Z2uID7YJ7oNvAI20O9X0bblw7Qqs8Q2hFy0R9tAfnfLkp5MW0UH9eUvnDSnFwKZ0AvgS1ucqR4KzvVHgnke1VQ==", + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.0.tgz", + "integrity": "sha512-QuP/FxEAzMSjXygs8v4N9dvdXzEHN4W1oF3PxuWAtPo08UdM17u89RDMgjLn/mlc56iM0HlLmVkO/wgR+rDgHg==", "dev": true, "bin": { "parser": "bin/babel-parser.js" @@ -690,23 +689,23 @@ } }, "node_modules/@babel/template": { - "version": "7.22.15", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.15.tgz", - "integrity": "sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==", + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.24.0.tgz", + "integrity": "sha512-Bkf2q8lMB0AFpX0NFEqSbx1OkTHf0f+0j82mkw+ZpzBnkk7e9Ql0891vlfgi+kHwOk8tQjiQHpqh4LaSa0fKEA==", "dev": true, "dependencies": { - "@babel/code-frame": "^7.22.13", - "@babel/parser": "^7.22.15", - "@babel/types": "^7.22.15" + "@babel/code-frame": "^7.23.5", + "@babel/parser": "^7.24.0", + "@babel/types": "^7.24.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/traverse": { - "version": "7.23.7", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.7.tgz", - "integrity": "sha512-tY3mM8rH9jM0YHFGyfC0/xf+SB5eKUu7HPj7/k3fpi9dAlsMc5YbQvDi0Sh2QTPXqMhyaAtzAr807TIyfQrmyg==", + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.24.0.tgz", + "integrity": "sha512-HfuJlI8qq3dEDmNU5ChzzpZRWq+oxCZQyMzIMEqLho+AQnhMnKQUzH6ydo3RBl/YjPCuk68Y6s0Gx0AeyULiWw==", "dev": true, "dependencies": { "@babel/code-frame": "^7.23.5", @@ -715,8 +714,8 @@ "@babel/helper-function-name": "^7.23.0", "@babel/helper-hoist-variables": "^7.22.5", "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/parser": "^7.23.6", - "@babel/types": "^7.23.6", + "@babel/parser": "^7.24.0", + "@babel/types": "^7.24.0", "debug": "^4.3.1", "globals": "^11.1.0" }, @@ -724,10 +723,19 @@ "node": ">=6.9.0" } }, + "node_modules/@babel/traverse/node_modules/globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "dev": true, + "engines": { + "node": ">=4" + } + }, "node_modules/@babel/types": { - "version": "7.23.6", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.6.tgz", - "integrity": "sha512-+uarb83brBzPKN38NX1MkB6vb6+mwvR6amUulqAE7ccQw1pEl+bCia9TbdG1lsnFP7lZySvUn37CHyXQdfTwzg==", + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.0.tgz", + "integrity": "sha512-+j7a5c253RfKh8iABBhywc8NSfP5LURe7Uh4qpsh6jc+aLJguvmIUBdjSdEMQv2bENrCR5MfRdjGo7vzS/ob7w==", "dev": true, "dependencies": { "@babel/helper-string-parser": "^7.23.4", @@ -745,9 +753,9 @@ "dev": true }, "node_modules/@esbuild/aix-ppc64": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.19.11.tgz", - "integrity": "sha512-FnzU0LyE3ySQk7UntJO4+qIiQgI7KoODnZg5xzXIrFJlKd2P2gwHsHY4927xj9y5PJmJSzULiUCWmv7iWnNa7g==", + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.19.12.tgz", + "integrity": "sha512-bmoCYyWdEL3wDQIVbcyzRyeKLgk2WtWLTWz1ZIAZF/EGbNOwSA6ew3PftJ1PqMiOOGu0OyFMzG53L0zqIpPeNA==", "cpu": [ "ppc64" ], @@ -761,9 +769,9 @@ } }, "node_modules/@esbuild/android-arm": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.19.11.tgz", - "integrity": "sha512-5OVapq0ClabvKvQ58Bws8+wkLCV+Rxg7tUVbo9xu034Nm536QTII4YzhaFriQ7rMrorfnFKUsArD2lqKbFY4vw==", + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.19.12.tgz", + "integrity": "sha512-qg/Lj1mu3CdQlDEEiWrlC4eaPZ1KztwGJ9B6J+/6G+/4ewxJg7gqj8eVYWvao1bXrqGiW2rsBZFSX3q2lcW05w==", "cpu": [ "arm" ], @@ -777,9 +785,9 @@ } }, "node_modules/@esbuild/android-arm64": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.19.11.tgz", - "integrity": "sha512-aiu7K/5JnLj//KOnOfEZ0D90obUkRzDMyqd/wNAUQ34m4YUPVhRZpnqKV9uqDGxT7cToSDnIHsGooyIczu9T+Q==", + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.19.12.tgz", + "integrity": "sha512-P0UVNGIienjZv3f5zq0DP3Nt2IE/3plFzuaS96vihvD0Hd6H/q4WXUGpCxD/E8YrSXfNyRPbpTq+T8ZQioSuPA==", "cpu": [ "arm64" ], @@ -793,9 +801,9 @@ } }, "node_modules/@esbuild/android-x64": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.19.11.tgz", - "integrity": "sha512-eccxjlfGw43WYoY9QgB82SgGgDbibcqyDTlk3l3C0jOVHKxrjdc9CTwDUQd0vkvYg5um0OH+GpxYvp39r+IPOg==", + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.19.12.tgz", + "integrity": "sha512-3k7ZoUW6Q6YqhdhIaq/WZ7HwBpnFBlW905Fa4s4qWJyiNOgT1dOqDiVAQFwBH7gBRZr17gLrlFCRzF6jFh7Kew==", "cpu": [ "x64" ], @@ -809,9 +817,9 @@ } }, "node_modules/@esbuild/darwin-arm64": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.19.11.tgz", - "integrity": "sha512-ETp87DRWuSt9KdDVkqSoKoLFHYTrkyz2+65fj9nfXsaV3bMhTCjtQfw3y+um88vGRKRiF7erPrh/ZuIdLUIVxQ==", + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.19.12.tgz", + "integrity": "sha512-B6IeSgZgtEzGC42jsI+YYu9Z3HKRxp8ZT3cqhvliEHovq8HSX2YX8lNocDn79gCKJXOSaEot9MVYky7AKjCs8g==", "cpu": [ "arm64" ], @@ -825,9 +833,9 @@ } }, "node_modules/@esbuild/darwin-x64": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.19.11.tgz", - "integrity": "sha512-fkFUiS6IUK9WYUO/+22omwetaSNl5/A8giXvQlcinLIjVkxwTLSktbF5f/kJMftM2MJp9+fXqZ5ezS7+SALp4g==", + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.19.12.tgz", + "integrity": "sha512-hKoVkKzFiToTgn+41qGhsUJXFlIjxI/jSYeZf3ugemDYZldIXIxhvwN6erJGlX4t5h417iFuheZ7l+YVn05N3A==", "cpu": [ "x64" ], @@ -841,9 +849,9 @@ } }, "node_modules/@esbuild/freebsd-arm64": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.19.11.tgz", - "integrity": "sha512-lhoSp5K6bxKRNdXUtHoNc5HhbXVCS8V0iZmDvyWvYq9S5WSfTIHU2UGjcGt7UeS6iEYp9eeymIl5mJBn0yiuxA==", + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.19.12.tgz", + "integrity": "sha512-4aRvFIXmwAcDBw9AueDQ2YnGmz5L6obe5kmPT8Vd+/+x/JMVKCgdcRwH6APrbpNXsPz+K653Qg8HB/oXvXVukA==", "cpu": [ "arm64" ], @@ -857,9 +865,9 @@ } }, "node_modules/@esbuild/freebsd-x64": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.19.11.tgz", - "integrity": "sha512-JkUqn44AffGXitVI6/AbQdoYAq0TEullFdqcMY/PCUZ36xJ9ZJRtQabzMA+Vi7r78+25ZIBosLTOKnUXBSi1Kw==", + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.19.12.tgz", + "integrity": "sha512-EYoXZ4d8xtBoVN7CEwWY2IN4ho76xjYXqSXMNccFSx2lgqOG/1TBPW0yPx1bJZk94qu3tX0fycJeeQsKovA8gg==", "cpu": [ "x64" ], @@ -873,9 +881,9 @@ } }, "node_modules/@esbuild/linux-arm": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.19.11.tgz", - "integrity": "sha512-3CRkr9+vCV2XJbjwgzjPtO8T0SZUmRZla+UL1jw+XqHZPkPgZiyWvbDvl9rqAN8Zl7qJF0O/9ycMtjU67HN9/Q==", + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.19.12.tgz", + "integrity": "sha512-J5jPms//KhSNv+LO1S1TX1UWp1ucM6N6XuL6ITdKWElCu8wXP72l9MM0zDTzzeikVyqFE6U8YAV9/tFyj0ti+w==", "cpu": [ "arm" ], @@ -889,9 +897,9 @@ } }, "node_modules/@esbuild/linux-arm64": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.19.11.tgz", - "integrity": "sha512-LneLg3ypEeveBSMuoa0kwMpCGmpu8XQUh+mL8XXwoYZ6Be2qBnVtcDI5azSvh7vioMDhoJFZzp9GWp9IWpYoUg==", + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.19.12.tgz", + "integrity": "sha512-EoTjyYyLuVPfdPLsGVVVC8a0p1BFFvtpQDB/YLEhaXyf/5bczaGeN15QkR+O4S5LeJ92Tqotve7i1jn35qwvdA==", "cpu": [ "arm64" ], @@ -905,9 +913,9 @@ } }, "node_modules/@esbuild/linux-ia32": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.19.11.tgz", - "integrity": "sha512-caHy++CsD8Bgq2V5CodbJjFPEiDPq8JJmBdeyZ8GWVQMjRD0sU548nNdwPNvKjVpamYYVL40AORekgfIubwHoA==", + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.19.12.tgz", + "integrity": "sha512-Thsa42rrP1+UIGaWz47uydHSBOgTUnwBwNq59khgIwktK6x60Hivfbux9iNR0eHCHzOLjLMLfUMLCypBkZXMHA==", "cpu": [ "ia32" ], @@ -921,9 +929,9 @@ } }, "node_modules/@esbuild/linux-loong64": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.19.11.tgz", - "integrity": "sha512-ppZSSLVpPrwHccvC6nQVZaSHlFsvCQyjnvirnVjbKSHuE5N24Yl8F3UwYUUR1UEPaFObGD2tSvVKbvR+uT1Nrg==", + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.19.12.tgz", + "integrity": "sha512-LiXdXA0s3IqRRjm6rV6XaWATScKAXjI4R4LoDlvO7+yQqFdlr1Bax62sRwkVvRIrwXxvtYEHHI4dm50jAXkuAA==", "cpu": [ "loong64" ], @@ -937,9 +945,9 @@ } }, "node_modules/@esbuild/linux-mips64el": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.19.11.tgz", - "integrity": "sha512-B5x9j0OgjG+v1dF2DkH34lr+7Gmv0kzX6/V0afF41FkPMMqaQ77pH7CrhWeR22aEeHKaeZVtZ6yFwlxOKPVFyg==", + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.19.12.tgz", + "integrity": "sha512-fEnAuj5VGTanfJ07ff0gOA6IPsvrVHLVb6Lyd1g2/ed67oU1eFzL0r9WL7ZzscD+/N6i3dWumGE1Un4f7Amf+w==", "cpu": [ "mips64el" ], @@ -953,9 +961,9 @@ } }, "node_modules/@esbuild/linux-ppc64": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.19.11.tgz", - "integrity": "sha512-MHrZYLeCG8vXblMetWyttkdVRjQlQUb/oMgBNurVEnhj4YWOr4G5lmBfZjHYQHHN0g6yDmCAQRR8MUHldvvRDA==", + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.19.12.tgz", + "integrity": "sha512-nYJA2/QPimDQOh1rKWedNOe3Gfc8PabU7HT3iXWtNUbRzXS9+vgB0Fjaqr//XNbd82mCxHzik2qotuI89cfixg==", "cpu": [ "ppc64" ], @@ -969,9 +977,9 @@ } }, "node_modules/@esbuild/linux-riscv64": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.19.11.tgz", - "integrity": "sha512-f3DY++t94uVg141dozDu4CCUkYW+09rWtaWfnb3bqe4w5NqmZd6nPVBm+qbz7WaHZCoqXqHz5p6CM6qv3qnSSQ==", + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.19.12.tgz", + "integrity": "sha512-2MueBrlPQCw5dVJJpQdUYgeqIzDQgw3QtiAHUC4RBz9FXPrskyyU3VI1hw7C0BSKB9OduwSJ79FTCqtGMWqJHg==", "cpu": [ "riscv64" ], @@ -985,9 +993,9 @@ } }, "node_modules/@esbuild/linux-s390x": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.19.11.tgz", - "integrity": "sha512-A5xdUoyWJHMMlcSMcPGVLzYzpcY8QP1RtYzX5/bS4dvjBGVxdhuiYyFwp7z74ocV7WDc0n1harxmpq2ePOjI0Q==", + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.19.12.tgz", + "integrity": "sha512-+Pil1Nv3Umes4m3AZKqA2anfhJiVmNCYkPchwFJNEJN5QxmTs1uzyy4TvmDrCRNT2ApwSari7ZIgrPeUx4UZDg==", "cpu": [ "s390x" ], @@ -1001,9 +1009,9 @@ } }, "node_modules/@esbuild/linux-x64": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.19.11.tgz", - "integrity": "sha512-grbyMlVCvJSfxFQUndw5mCtWs5LO1gUlwP4CDi4iJBbVpZcqLVT29FxgGuBJGSzyOxotFG4LoO5X+M1350zmPA==", + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.19.12.tgz", + "integrity": "sha512-B71g1QpxfwBvNrfyJdVDexenDIt1CiDN1TIXLbhOw0KhJzE78KIFGX6OJ9MrtC0oOqMWf+0xop4qEU8JrJTwCg==", "cpu": [ "x64" ], @@ -1017,9 +1025,9 @@ } }, "node_modules/@esbuild/netbsd-x64": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.19.11.tgz", - "integrity": "sha512-13jvrQZJc3P230OhU8xgwUnDeuC/9egsjTkXN49b3GcS5BKvJqZn86aGM8W9pd14Kd+u7HuFBMVtrNGhh6fHEQ==", + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.19.12.tgz", + "integrity": "sha512-3ltjQ7n1owJgFbuC61Oj++XhtzmymoCihNFgT84UAmJnxJfm4sYCiSLTXZtE00VWYpPMYc+ZQmB6xbSdVh0JWA==", "cpu": [ "x64" ], @@ -1033,9 +1041,9 @@ } }, "node_modules/@esbuild/openbsd-x64": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.19.11.tgz", - "integrity": "sha512-ysyOGZuTp6SNKPE11INDUeFVVQFrhcNDVUgSQVDzqsqX38DjhPEPATpid04LCoUr2WXhQTEZ8ct/EgJCUDpyNw==", + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.19.12.tgz", + "integrity": "sha512-RbrfTB9SWsr0kWmb9srfF+L933uMDdu9BIzdA7os2t0TXhCRjrQyCeOt6wVxr79CKD4c+p+YhCj31HBkYcXebw==", "cpu": [ "x64" ], @@ -1049,9 +1057,9 @@ } }, "node_modules/@esbuild/sunos-x64": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.19.11.tgz", - "integrity": "sha512-Hf+Sad9nVwvtxy4DXCZQqLpgmRTQqyFyhT3bZ4F2XlJCjxGmRFF0Shwn9rzhOYRB61w9VMXUkxlBy56dk9JJiQ==", + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.19.12.tgz", + "integrity": "sha512-HKjJwRrW8uWtCQnQOz9qcU3mUZhTUQvi56Q8DPTLLB+DawoiQdjsYq+j+D3s9I8VFtDr+F9CjgXKKC4ss89IeA==", "cpu": [ "x64" ], @@ -1065,9 +1073,9 @@ } }, "node_modules/@esbuild/win32-arm64": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.19.11.tgz", - "integrity": "sha512-0P58Sbi0LctOMOQbpEOvOL44Ne0sqbS0XWHMvvrg6NE5jQ1xguCSSw9jQeUk2lfrXYsKDdOe6K+oZiwKPilYPQ==", + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.19.12.tgz", + "integrity": "sha512-URgtR1dJnmGvX864pn1B2YUYNzjmXkuJOIqG2HdU62MVS4EHpU2946OZoTMnRUHklGtJdJZ33QfzdjGACXhn1A==", "cpu": [ "arm64" ], @@ -1081,9 +1089,9 @@ } }, "node_modules/@esbuild/win32-ia32": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.19.11.tgz", - "integrity": "sha512-6YOrWS+sDJDmshdBIQU+Uoyh7pQKrdykdefC1avn76ss5c+RN6gut3LZA4E2cH5xUEp5/cA0+YxRaVtRAb0xBg==", + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.19.12.tgz", + "integrity": "sha512-+ZOE6pUkMOJfmxmBZElNOx72NKpIa/HFOMGzu8fqzQJ5kgf6aTGrcJaFsNiVMH4JKpMipyK+7k0n2UXN7a8YKQ==", "cpu": [ "ia32" ], @@ -1097,9 +1105,9 @@ } }, "node_modules/@esbuild/win32-x64": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.19.11.tgz", - "integrity": "sha512-vfkhltrjCAb603XaFhqhAF4LGDi2M4OrCRrFusyQ+iTLQ/o60QQXxc9cZC/FFpihBI9N1Grn6SMKVJ4KP7Fuiw==", + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.19.12.tgz", + "integrity": "sha512-T1QyPSDCyMXaO3pzBkF96E8xMkiRYbUEZADd29SyPGabqxMViNoii+NcK7eWJAEoU6RZyEm5lVSIjTmcdoB9HA==", "cpu": [ "x64" ], @@ -1159,55 +1167,10 @@ "url": "https://opencollective.com/eslint" } }, - "node_modules/@eslint/eslintrc/node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "peer": true - }, - "node_modules/@eslint/eslintrc/node_modules/globals": { - "version": "13.24.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", - "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", - "peer": true, - "dependencies": { - "type-fest": "^0.20.2" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@eslint/eslintrc/node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "peer": true, - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/@eslint/eslintrc/node_modules/type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", - "peer": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/@eslint/js": { - "version": "8.56.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.56.0.tgz", - "integrity": "sha512-gMsVel9D7f2HLkBma9VbtzZRehRogVRfbr++f06nL2vnCGCNlzOD+/MUov/F4p8myyAHspEhVobgjpX64q5m6A==", + "version": "8.57.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.0.tgz", + "integrity": "sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==", "peer": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -1220,9 +1183,9 @@ "optional": true }, "node_modules/@huggingface/jinja": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/@huggingface/jinja/-/jinja-0.1.2.tgz", - "integrity": "sha512-x5mpbfJt1nKmVep5WNP5VjNsjWApWNj8pPYI+uYMkBWH9bWUJmQmHt2lbf0VCoQd54Oq3XuFEh/UyoVh7rPxmg==", + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@huggingface/jinja/-/jinja-0.1.3.tgz", + "integrity": "sha512-9KsiorsdIK8+7VmlamAT7Uh90zxAhC/SeKaKc80v58JhtPYuwaJpmR/ST7XAUxrHAFqHTCoTH5aJnJDwSL6xIQ==", "engines": { "node": ">=18" } @@ -1276,6 +1239,95 @@ "node": ">=8" } }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dev": true, + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", + "dev": true + }, "node_modules/@istanbuljs/schema": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", @@ -1564,9 +1616,9 @@ } }, "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", - "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==", + "version": "0.3.4", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.4.tgz", + "integrity": "sha512-Oud2QPM5dHviZNn4y/WhhYKSXksv+1xLEIsNrAbGcFzUN3ubqWRFT5gwPchNc5NuzILOU4tPBDTZ4VwhL8Y7cw==", "dev": true, "dependencies": { "@jridgewell/set-array": "^1.0.1", @@ -1578,18 +1630,18 @@ } }, "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz", - "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", "dev": true, "engines": { "node": ">=6.0.0" } }, "node_modules/@jridgewell/set-array": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", - "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", + "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", "dev": true, "engines": { "node": ">=6.0.0" @@ -1602,9 +1654,9 @@ "dev": true }, "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.22", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.22.tgz", - "integrity": "sha512-Wf963MzWtA2sjrNt+g18IAln9lKnlRp+K2eH4jjIoF1wYeq3aMREpG09xhlhdzS0EjwU7qmUJYangWa+151vZw==", + "version": "0.3.23", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.23.tgz", + "integrity": "sha512-9/4foRoUKp8s96tSkh8DlAAc5A0Ty8vLXld+l9gjKKY6ckwI8G15f0hskGmuLZu78ZlGa1vtsfOa+lnB4vG6Jg==", "dev": true, "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", @@ -1612,9 +1664,9 @@ } }, "node_modules/@lancedb/vectordb-darwin-arm64": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/@lancedb/vectordb-darwin-arm64/-/vectordb-darwin-arm64-0.4.3.tgz", - "integrity": "sha512-47CvvSaV1EdUsFEpXUJApTk+hMzAhCxVizipCFUlXCgcmzpCDL86wNgJij/X9a+j6zADhIX//Lsu0qd/an/Bpw==", + "version": "0.4.11", + "resolved": "https://registry.npmjs.org/@lancedb/vectordb-darwin-arm64/-/vectordb-darwin-arm64-0.4.11.tgz", + "integrity": "sha512-JDOKmFnuJPFkA7ZmrzBJolROwSjWr7yMvAbi40uLBc25YbbVezodd30u2EFtIwWwtk1GqNYRZ49FZOElKYeC/Q==", "cpu": [ "arm64" ], @@ -1624,9 +1676,9 @@ ] }, "node_modules/@lancedb/vectordb-darwin-x64": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/@lancedb/vectordb-darwin-x64/-/vectordb-darwin-x64-0.4.3.tgz", - "integrity": "sha512-UlZZv8CmJIuRJNJG+Y1VmFsGyPR8W/72Q5EwgMMsSES6zpMQ9pNdBDWhL3UGX6nMRgnbprkwYiWJ3xHhJvtqtw==", + "version": "0.4.11", + "resolved": "https://registry.npmjs.org/@lancedb/vectordb-darwin-x64/-/vectordb-darwin-x64-0.4.11.tgz", + "integrity": "sha512-iy6r+8tp2v1EFgJV52jusXtxgO6NY6SkpOdX41xPqN2mQWMkfUAR9Xtks1mgknjPOIKH4MRc8ZS0jcW/UWmilQ==", "cpu": [ "x64" ], @@ -1636,9 +1688,9 @@ ] }, "node_modules/@lancedb/vectordb-linux-arm64-gnu": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/@lancedb/vectordb-linux-arm64-gnu/-/vectordb-linux-arm64-gnu-0.4.3.tgz", - "integrity": "sha512-L6NVJr/lKEd8+904FzZNpT8BGQMs2cHNYbGJMIaVvGnMiIJgKAFKtOyGtdDjoe1xRZoEw21yjRGksGbnRO5wHQ==", + "version": "0.4.11", + "resolved": "https://registry.npmjs.org/@lancedb/vectordb-linux-arm64-gnu/-/vectordb-linux-arm64-gnu-0.4.11.tgz", + "integrity": "sha512-5K6IVcTMuH0SZBjlqB5Gg39WC889FpTwIWKufxzQMMXrzxo5J3lKUHVoR28RRlNhDF2d9kZXBEyCpIfDFsV9iQ==", "cpu": [ "arm64" ], @@ -1648,9 +1700,9 @@ ] }, "node_modules/@lancedb/vectordb-linux-x64-gnu": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/@lancedb/vectordb-linux-x64-gnu/-/vectordb-linux-x64-gnu-0.4.3.tgz", - "integrity": "sha512-OBx3WF3pK0xNfFJeErmuD9R2QWLa3XdeZspyTsIrQmBDeKj3HKh8y7Scpx4NH5Y09+9JNqRRKRZN7OqWTYhITg==", + "version": "0.4.11", + "resolved": "https://registry.npmjs.org/@lancedb/vectordb-linux-x64-gnu/-/vectordb-linux-x64-gnu-0.4.11.tgz", + "integrity": "sha512-hF9ZChsdqKqqnivOzd9mE7lC3PmhZadXtwThi2RrsPiOLoEaGDfmr6Ni3amVQnB3bR8YEJtTxdQxe0NC4uW/8g==", "cpu": [ "x64" ], @@ -1660,9 +1712,9 @@ ] }, "node_modules/@lancedb/vectordb-win32-x64-msvc": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/@lancedb/vectordb-win32-x64-msvc/-/vectordb-win32-x64-msvc-0.4.3.tgz", - "integrity": "sha512-n9IvR81NXZKnSN91mrgeXbEyCiGM+YLJpOgbdHoEtMP04VDnS+iSU4jGOtQBKErvWeCJQaGFQ9qzdcVchpRGyw==", + "version": "0.4.11", + "resolved": "https://registry.npmjs.org/@lancedb/vectordb-win32-x64-msvc/-/vectordb-win32-x64-msvc-0.4.11.tgz", + "integrity": "sha512-0+9ut1ccKoqIyGxsVixwx3771Z+DXpl5WfSmOeA8kf3v3jlOg2H+0YUahiXLDid2ju+yeLPrAUYm7A1gKHVhew==", "cpu": [ "x64" ], @@ -1734,9 +1786,9 @@ } }, "node_modules/@npmcli/fs/node_modules/semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", + "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", "optional": true, "dependencies": { "lru-cache": "^6.0.0" @@ -1819,16 +1871,16 @@ } }, "node_modules/@octokit/openapi-types": { - "version": "19.1.0", - "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-19.1.0.tgz", - "integrity": "sha512-6G+ywGClliGQwRsjvqVYpklIfa7oRPA0vyhPQG/1Feh+B+wU0vGH1JiJ5T25d3g1JZYBHzR2qefLi9x8Gt+cpw==" + "version": "20.0.0", + "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-20.0.0.tgz", + "integrity": "sha512-EtqRBEjp1dL/15V7WiX5LJMIxxkdiGJnabzYx5Apx4FkQIFgAfKumXeYAqqJCj1s+BMX4cPFIFC4OLCR6stlnA==" }, "node_modules/@octokit/plugin-paginate-rest": { - "version": "9.1.5", - "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-9.1.5.tgz", - "integrity": "sha512-WKTQXxK+bu49qzwv4qKbMMRXej1DU2gq017euWyKVudA6MldaSSQuxtz+vGbhxV4CjxpUxjZu6rM2wfc1FiWVg==", + "version": "9.2.0", + "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-9.2.0.tgz", + "integrity": "sha512-NKi0bJEZqOSbBLMv9kdAcuocpe05Q2xAXNLTGi0HN2GSMFJHNZuSoPNa0tcQFTOFCKe+ZaYBZ3lpXh1yxgUDCA==", "dependencies": { - "@octokit/types": "^12.4.0" + "@octokit/types": "^12.6.0" }, "engines": { "node": ">= 18" @@ -1849,11 +1901,11 @@ } }, "node_modules/@octokit/plugin-rest-endpoint-methods": { - "version": "10.2.0", - "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-10.2.0.tgz", - "integrity": "sha512-ePbgBMYtGoRNXDyKGvr9cyHjQ163PbwD0y1MkDJCpkO2YH4OeXX40c4wYHKikHGZcpGPbcRLuy0unPUuafco8Q==", + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-10.4.0.tgz", + "integrity": "sha512-INw5rGXWlbv/p/VvQL63dhlXr38qYTHkQ5bANi9xofrF9OraqmjHsIGyenmjmul1JVRHpUlw5heFOj1UZLEolA==", "dependencies": { - "@octokit/types": "^12.3.0" + "@octokit/types": "^12.6.0" }, "engines": { "node": ">= 18" @@ -1863,9 +1915,9 @@ } }, "node_modules/@octokit/request": { - "version": "8.1.6", - "resolved": "https://registry.npmjs.org/@octokit/request/-/request-8.1.6.tgz", - "integrity": "sha512-YhPaGml3ncZC1NfXpP3WZ7iliL1ap6tLkAp6MvbK2fTTPytzVUyUesBBogcdMm86uRYO5rHaM1xIWxigWZ17MQ==", + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/@octokit/request/-/request-8.2.0.tgz", + "integrity": "sha512-exPif6x5uwLqv1N1irkLG1zZNJkOtj8bZxuVHd71U5Ftuxf2wGNvAJyNBcPbPC+EBzwYEbBDdSFb8EPcjpYxPQ==", "dependencies": { "@octokit/endpoint": "^9.0.0", "@octokit/request-error": "^5.0.0", @@ -1904,11 +1956,11 @@ } }, "node_modules/@octokit/types": { - "version": "12.4.0", - "resolved": "https://registry.npmjs.org/@octokit/types/-/types-12.4.0.tgz", - "integrity": "sha512-FLWs/AvZllw/AGVs+nJ+ELCDZZJk+kY0zMen118xhL2zD0s1etIUHm1odgjP7epxYU1ln7SZxEUWYop5bhsdgQ==", + "version": "12.6.0", + "resolved": "https://registry.npmjs.org/@octokit/types/-/types-12.6.0.tgz", + "integrity": "sha512-1rhSOfRa6H9w4YwK0yrf5faDaDTb+yLyBUKOCV4xtCDB5VmIPqd/v9yr9o6SAzOAlRxMiRiCic6JVM1/kunVkw==", "dependencies": { - "@octokit/openapi-types": "^19.1.0" + "@octokit/openapi-types": "^20.0.0" } }, "node_modules/@protobufjs/aspromise": { @@ -2107,9 +2159,9 @@ } }, "node_modules/@types/jest": { - "version": "29.5.11", - "resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.5.11.tgz", - "integrity": "sha512-S2mHmYIVe13vrm6q4kN6fLYYAka15ALQki/vgDC3mIukEOx8WJlv0kQPM+d4w8Gp6u0uSdKND04IlTXBv0rwnQ==", + "version": "29.5.12", + "resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.5.12.tgz", + "integrity": "sha512-eDC8bTvT/QhYdxJAulQikueigY5AsdBRH2yDKW3yveW7svY3+DzN84/2NUgkw10RTiJbWqZrTtoGVdYlvFJdLw==", "dev": true, "dependencies": { "expect": "^29.0.0", @@ -2143,9 +2195,9 @@ "dev": true }, "node_modules/@types/node": { - "version": "20.11.5", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.5.tgz", - "integrity": "sha512-g557vgQjUUfN76MZAN/dt1z3dzcUsimuysco0KeluHgrPdJXkP/XdAURgyO2W9fZWHRtRBiVKzKn8vyOAwlG+w==", + "version": "20.11.23", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.23.tgz", + "integrity": "sha512-ZUarKKfQuRILSNYt32FuPL20HS7XwNT7/uRwSV8tiHWfyyVwDLYZNF6DZKc2bove++pgfsXn9sUwII/OsQ82cQ==", "dependencies": { "undici-types": "~5.26.4" } @@ -2177,9 +2229,9 @@ "dev": true }, "node_modules/@types/uuid": { - "version": "9.0.7", - "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-9.0.7.tgz", - "integrity": "sha512-WUtIVRUZ9i5dYXefDEAI7sh9/O7jGvHg7Df/5O/gtH3Yabe5odI3UWopVR1qbPXQtvOxWu3mM4XxlYeZtMWF4g==", + "version": "9.0.8", + "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-9.0.8.tgz", + "integrity": "sha512-jg+97EGIcY9AGHJJRaaPVgetKDsrTgbRjQ5Msgjh/DQKEFl0DtyRr/VCOyD1T2R1MNeWPK/u7JoGhlDZnKBAfA==", "dev": true }, "node_modules/@types/yargs": { @@ -2204,11 +2256,11 @@ "peer": true }, "node_modules/@xenova/transformers": { - "version": "2.14.0", - "resolved": "https://registry.npmjs.org/@xenova/transformers/-/transformers-2.14.0.tgz", - "integrity": "sha512-rQ3O7SW5EM64b6XFZGx3XQ2cfiroefxUwU9ShfSpEZyhd082GvwNJJKndxgaukse1hZP1JUDoT0DfjDiq4IZiw==", + "version": "2.15.1", + "resolved": "https://registry.npmjs.org/@xenova/transformers/-/transformers-2.15.1.tgz", + "integrity": "sha512-HX3kUZbr9v90PS/D2SyffGiFYQ6wQMbzwC1uLuCOA6nRSFOdr0TDnOTxfjS0RB6Phn6ThCTE1vX4n+NUsuobQg==", "dependencies": { - "@huggingface/jinja": "^0.1.0", + "@huggingface/jinja": "^0.1.3", "onnxruntime-web": "1.14.0", "sharp": "^0.32.0" }, @@ -2216,11 +2268,6 @@ "onnxruntime-node": "1.14.0" } }, - "node_modules/@yomguithereal/helpers": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@yomguithereal/helpers/-/helpers-1.1.1.tgz", - "integrity": "sha512-UYvAq/XCA7xoh1juWDYsq3W0WywOB+pz8cgVnE1b45ZfdMhBvHDrgmSFG3jXeZSr2tMTYLGHFHON+ekG05Jebg==" - }, "node_modules/abbrev": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", @@ -2333,6 +2380,18 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/ansi-escapes/node_modules/type-fest": { + "version": "0.21.3", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", + "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/ansi-regex": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", @@ -2432,13 +2491,10 @@ } }, "node_modules/argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "dependencies": { - "sprintf-js": "~1.0.2" - } + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "peer": true }, "node_modules/array-back": { "version": "3.1.0", @@ -2607,9 +2663,9 @@ } }, "node_modules/b4a": { - "version": "1.6.4", - "resolved": "https://registry.npmjs.org/b4a/-/b4a-1.6.4.tgz", - "integrity": "sha512-fpWrvyVHEKyeEvbKZTVOeZF3VSKKWtJxFIxX/jaVPf+cLbGUSitjb49pHLqPV2BUNNZ0LcoeEGfE/YCpyDYHIw==" + "version": "1.6.6", + "resolved": "https://registry.npmjs.org/b4a/-/b4a-1.6.6.tgz", + "integrity": "sha512-5Tk1HLk6b6ctmjIkAcU/Ujv/1WqiDl0F0JdRCR80VsOcUlHcu7pWeWRlOqQLHfDEsVx9YH/aif5AG4ehoCtTmg==" }, "node_modules/babel-jest": { "version": "29.7.0", @@ -2723,6 +2779,39 @@ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" }, + "node_modules/bare-events": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/bare-events/-/bare-events-2.2.0.tgz", + "integrity": "sha512-Yyyqff4PIFfSuthCZqLlPISTWHmnQxoPuAvkmgzsJEmG3CesdIv6Xweayl0JkCZJSB2yYIdJyEz97tpxNhgjbg==", + "optional": true + }, + "node_modules/bare-fs": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/bare-fs/-/bare-fs-2.2.0.tgz", + "integrity": "sha512-+VhW202E9eTVGkX7p+TNXtZC4RTzj9JfJW7PtfIbZ7mIQ/QT9uOafQTx7lx2n9ERmWsXvLHF4hStAFn4gl2mQw==", + "optional": true, + "dependencies": { + "bare-events": "^2.0.0", + "bare-os": "^2.0.0", + "bare-path": "^2.0.0", + "streamx": "^2.13.0" + } + }, + "node_modules/bare-os": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/bare-os/-/bare-os-2.2.0.tgz", + "integrity": "sha512-hD0rOPfYWOMpVirTACt4/nK8mC55La12K5fY1ij8HAdfQakD62M+H4o4tpfKzVGLgRDTuk3vjA4GqGXXCeFbag==", + "optional": true + }, + "node_modules/bare-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/bare-path/-/bare-path-2.1.0.tgz", + "integrity": "sha512-DIIg7ts8bdRKwJRJrUMy/PICEaQZaPGZ26lsSx9MJSwIhSrcdHn7/C8W+XmnG/rKi6BaRcz+JO00CjZteybDtw==", + "optional": true, + "dependencies": { + "bare-os": "^2.1.0" + } + }, "node_modules/base-64": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/base-64/-/base-64-0.1.0.tgz", @@ -2833,9 +2922,9 @@ } }, "node_modules/browserslist": { - "version": "4.22.2", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.22.2.tgz", - "integrity": "sha512-0UgcrvQmBDvZHFGdYUehrCNIazki7/lUP3kkoi/r3YB2amZbFM9J43ZRkJTXBUZK4gmx56+Sqk9+Vs9mwZx9+A==", + "version": "4.23.0", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.23.0.tgz", + "integrity": "sha512-QW8HiM1shhT2GuzkvklfjcKDiWFXHOeFCIA/huJPwHsslwcydgk7X+z2zXpEijP98UCY7HbubZt5J2Zgvf0CaQ==", "dev": true, "funding": [ { @@ -2852,8 +2941,8 @@ } ], "dependencies": { - "caniuse-lite": "^1.0.30001565", - "electron-to-chromium": "^1.4.601", + "caniuse-lite": "^1.0.30001587", + "electron-to-chromium": "^1.4.668", "node-releases": "^2.0.14", "update-browserslist-db": "^1.0.13" }, @@ -3006,9 +3095,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001579", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001579.tgz", - "integrity": "sha512-u5AUVkixruKHJjw/pj9wISlcMpgFWzSrczLZbrqBSxukQixmg0SJ5sZTpvaFvxU0HoQKd4yoyAogyrAz9pzJnA==", + "version": "1.0.30001591", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001591.tgz", + "integrity": "sha512-PCzRMei/vXjJyL5mJtzNiUCKP59dm8Apqc3PH8gJkMnMXZGox93RbE76jHsmLwmIo6/3nsYIpJtx0O7u5PqFuQ==", "dev": true, "funding": [ { @@ -3617,20 +3706,20 @@ } }, "node_modules/dotenv": { - "version": "16.3.2", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.3.2.tgz", - "integrity": "sha512-HTlk5nmhkm8F6JcdXvHIzaorzCoziNQT9mGxLPVXW8wJF1TiGSL60ZGB4gHWabHOaMmWmhvk2/lPHfnBiT78AQ==", + "version": "16.4.5", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.5.tgz", + "integrity": "sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==", "engines": { "node": ">=12" }, "funding": { - "url": "https://github.com/motdotla/dotenv?sponsor=1" + "url": "https://dotenvx.com" } }, "node_modules/electron-to-chromium": { - "version": "1.4.640", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.640.tgz", - "integrity": "sha512-z/6oZ/Muqk4BaE7P69bXhUhpJbUM9ZJeka43ZwxsDshKtePns4mhBlh8bU5+yrnOnz3fhG82XLzGUXazOmsWnA==", + "version": "1.4.687", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.687.tgz", + "integrity": "sha512-Ic85cOuXSP6h7KM0AIJ2hpJ98Bo4hyTUjc4yjMbkvD+8yTxEhfK9+8exT2KKYsSjnCn2tGsKVSZwE7ZgTORQCw==", "dev": true }, "node_modules/emittery": { @@ -3681,9 +3770,9 @@ } }, "node_modules/engine.io-parser": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-5.2.1.tgz", - "integrity": "sha512-9JktcM3u18nU9N2Lz3bWeBgxVgOKpw7yhRaoxQA3FUDZzzw+9WlA6p4G4u0RixNkg14fH7EfEc/RhpurtiROTQ==", + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-5.2.2.tgz", + "integrity": "sha512-RcyUFKA93/CXH20l4SoVvzZfrSDMOTUS3bWVpTt2FuFP+XYrL8i8oonHP7WInRyVHXh0n/ORtoeiE1os+8qkSw==", "engines": { "node": ">=10.0.0" } @@ -3724,17 +3813,17 @@ } }, "node_modules/es-abstract": { - "version": "1.22.4", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.22.4.tgz", - "integrity": "sha512-vZYJlk2u6qHYxBOTjAeg7qUxHdNfih64Uu2J8QqWgXZ2cri0ZpJAkzDUK/q593+mvKwlxyaxr6F1Q+3LKoQRgg==", + "version": "1.22.5", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.22.5.tgz", + "integrity": "sha512-oW69R+4q2wG+Hc3KZePPZxOiisRIqfKBVo/HLx94QcJeWGU/8sZhCvc829rd1kS366vlJbzBfXf9yWwf0+Ko7w==", "dependencies": { "array-buffer-byte-length": "^1.0.1", "arraybuffer.prototype.slice": "^1.0.3", - "available-typed-arrays": "^1.0.6", + "available-typed-arrays": "^1.0.7", "call-bind": "^1.0.7", "es-define-property": "^1.0.0", "es-errors": "^1.3.0", - "es-set-tostringtag": "^2.0.2", + "es-set-tostringtag": "^2.0.3", "es-to-primitive": "^1.2.1", "function.prototype.name": "^1.1.6", "get-intrinsic": "^1.2.4", @@ -3742,15 +3831,15 @@ "globalthis": "^1.0.3", "gopd": "^1.0.1", "has-property-descriptors": "^1.0.2", - "has-proto": "^1.0.1", + "has-proto": "^1.0.3", "has-symbols": "^1.0.3", "hasown": "^2.0.1", "internal-slot": "^1.0.7", "is-array-buffer": "^3.0.4", "is-callable": "^1.2.7", - "is-negative-zero": "^2.0.2", + "is-negative-zero": "^2.0.3", "is-regex": "^1.1.4", - "is-shared-array-buffer": "^1.0.2", + "is-shared-array-buffer": "^1.0.3", "is-string": "^1.0.7", "is-typed-array": "^1.1.13", "is-weakref": "^1.0.2", @@ -3763,10 +3852,10 @@ "string.prototype.trim": "^1.2.8", "string.prototype.trimend": "^1.0.7", "string.prototype.trimstart": "^1.0.7", - "typed-array-buffer": "^1.0.1", - "typed-array-byte-length": "^1.0.0", - "typed-array-byte-offset": "^1.0.0", - "typed-array-length": "^1.0.4", + "typed-array-buffer": "^1.0.2", + "typed-array-byte-length": "^1.0.1", + "typed-array-byte-offset": "^1.0.2", + "typed-array-length": "^1.0.5", "unbox-primitive": "^1.0.2", "which-typed-array": "^1.1.14" }, @@ -3841,9 +3930,9 @@ } }, "node_modules/esbuild": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.19.11.tgz", - "integrity": "sha512-HJ96Hev2hX/6i5cDVwcqiJBBtuo9+FeIJOtZ9W1kA5M6AMJRHUZlpYZ1/SbEwtO0ioNAW8rUooVpC/WehY2SfA==", + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.19.12.tgz", + "integrity": "sha512-aARqgq8roFBj054KvQr5f1sFu0D65G+miZRCuJyJ0G13Zwx7vRar5Zhn2tkQNzIXcBrNVsv/8stehpj+GAjgbg==", "dev": true, "hasInstallScript": true, "bin": { @@ -3853,60 +3942,63 @@ "node": ">=12" }, "optionalDependencies": { - "@esbuild/aix-ppc64": "0.19.11", - "@esbuild/android-arm": "0.19.11", - "@esbuild/android-arm64": "0.19.11", - "@esbuild/android-x64": "0.19.11", - "@esbuild/darwin-arm64": "0.19.11", - "@esbuild/darwin-x64": "0.19.11", - "@esbuild/freebsd-arm64": "0.19.11", - "@esbuild/freebsd-x64": "0.19.11", - "@esbuild/linux-arm": "0.19.11", - "@esbuild/linux-arm64": "0.19.11", - "@esbuild/linux-ia32": "0.19.11", - "@esbuild/linux-loong64": "0.19.11", - "@esbuild/linux-mips64el": "0.19.11", - "@esbuild/linux-ppc64": "0.19.11", - "@esbuild/linux-riscv64": "0.19.11", - "@esbuild/linux-s390x": "0.19.11", - "@esbuild/linux-x64": "0.19.11", - "@esbuild/netbsd-x64": "0.19.11", - "@esbuild/openbsd-x64": "0.19.11", - "@esbuild/sunos-x64": "0.19.11", - "@esbuild/win32-arm64": "0.19.11", - "@esbuild/win32-ia32": "0.19.11", - "@esbuild/win32-x64": "0.19.11" + "@esbuild/aix-ppc64": "0.19.12", + "@esbuild/android-arm": "0.19.12", + "@esbuild/android-arm64": "0.19.12", + "@esbuild/android-x64": "0.19.12", + "@esbuild/darwin-arm64": "0.19.12", + "@esbuild/darwin-x64": "0.19.12", + "@esbuild/freebsd-arm64": "0.19.12", + "@esbuild/freebsd-x64": "0.19.12", + "@esbuild/linux-arm": "0.19.12", + "@esbuild/linux-arm64": "0.19.12", + "@esbuild/linux-ia32": "0.19.12", + "@esbuild/linux-loong64": "0.19.12", + "@esbuild/linux-mips64el": "0.19.12", + "@esbuild/linux-ppc64": "0.19.12", + "@esbuild/linux-riscv64": "0.19.12", + "@esbuild/linux-s390x": "0.19.12", + "@esbuild/linux-x64": "0.19.12", + "@esbuild/netbsd-x64": "0.19.12", + "@esbuild/openbsd-x64": "0.19.12", + "@esbuild/sunos-x64": "0.19.12", + "@esbuild/win32-arm64": "0.19.12", + "@esbuild/win32-ia32": "0.19.12", + "@esbuild/win32-x64": "0.19.12" } }, "node_modules/escalade": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz", + "integrity": "sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==", "dev": true, "engines": { "node": ">=6" } }, "node_modules/escape-string-regexp": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", - "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", - "dev": true, + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "peer": true, "engines": { - "node": ">=8" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/eslint": { - "version": "8.56.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.56.0.tgz", - "integrity": "sha512-Go19xM6T9puCOWntie1/P997aXxFsOi37JIHRWI514Hc6ZnaHGKY9xFhrU65RT6CcBEzZoGG1e6Nq+DT04ZtZQ==", + "version": "8.57.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.0.tgz", + "integrity": "sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==", "peer": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.6.1", "@eslint/eslintrc": "^2.1.4", - "@eslint/js": "8.56.0", - "@humanwhocodes/config-array": "^0.11.13", + "@eslint/js": "8.57.0", + "@humanwhocodes/config-array": "^0.11.14", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", "@ungap/structured-clone": "^1.2.0", @@ -4002,9 +4094,9 @@ } }, "node_modules/eslint-module-utils": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.8.0.tgz", - "integrity": "sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==", + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.8.1.tgz", + "integrity": "sha512-rXDXR3h7cs7dy9RNpUlQf80nX31XWJEyGq1tRMo+6GsO5VmTe4UTwtmonAD4ZkAsrfMVDA2wlGJ3790Ys+D49Q==", "peer": true, "dependencies": { "debug": "^3.2.7" @@ -4107,109 +4199,6 @@ "url": "https://opencollective.com/eslint" } }, - "node_modules/eslint/node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "peer": true - }, - "node_modules/eslint/node_modules/escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", - "peer": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/eslint/node_modules/find-up": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", - "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", - "peer": true, - "dependencies": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/eslint/node_modules/globals": { - "version": "13.24.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", - "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", - "peer": true, - "dependencies": { - "type-fest": "^0.20.2" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/eslint/node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "peer": true, - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/eslint/node_modules/locate-path": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", - "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", - "peer": true, - "dependencies": { - "p-locate": "^5.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/eslint/node_modules/p-locate": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", - "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", - "peer": true, - "dependencies": { - "p-limit": "^3.0.2" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/eslint/node_modules/type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", - "peer": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/espree": { "version": "9.6.1", "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", @@ -4294,6 +4283,7 @@ "version": "3.3.0", "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", + "optional": true, "engines": { "node": ">=0.8.x" } @@ -4465,16 +4455,19 @@ } }, "node_modules/find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "peer": true, "dependencies": { - "locate-path": "^5.0.0", + "locate-path": "^6.0.0", "path-exists": "^4.0.0" }, "engines": { - "node": ">=8" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/flat-cache": { @@ -4783,12 +4776,18 @@ } }, "node_modules/globals": { - "version": "11.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", - "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", - "dev": true, + "version": "13.24.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", + "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", + "peer": true, + "dependencies": { + "type-fest": "^0.20.2" + }, "engines": { - "node": ">=4" + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/globalthis": { @@ -4828,71 +4827,6 @@ "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", "peer": true }, - "node_modules/graphology": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/graphology/-/graphology-0.25.4.tgz", - "integrity": "sha512-33g0Ol9nkWdD6ulw687viS8YJQBxqG5LWII6FI6nul0pq6iM2t5EKquOTFDbyTblRB3O9I+7KX4xI8u5ffekAQ==", - "dependencies": { - "events": "^3.3.0", - "obliterator": "^2.0.2" - }, - "peerDependencies": { - "graphology-types": ">=0.24.0" - } - }, - "node_modules/graphology-indices": { - "version": "0.17.0", - "resolved": "https://registry.npmjs.org/graphology-indices/-/graphology-indices-0.17.0.tgz", - "integrity": "sha512-A7RXuKQvdqSWOpn7ZVQo4S33O0vCfPBnUSf7FwE0zNCasqwZVUaCXePuWo5HBpWw68KJcwObZDHpFk6HKH6MYQ==", - "dependencies": { - "graphology-utils": "^2.4.2", - "mnemonist": "^0.39.0" - }, - "peerDependencies": { - "graphology-types": ">=0.20.0" - } - }, - "node_modules/graphology-metrics": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/graphology-metrics/-/graphology-metrics-2.2.0.tgz", - "integrity": "sha512-eZZFRLGGyyI+iD+XwQvc+lLM3EKCoqUvVjvF/14Htgy4grB2m95OytToYq3saWuHfuf22VVnj9GBHv/pTzKuTw==", - "dependencies": { - "graphology-shortest-path": "^2.0.0", - "graphology-utils": "^2.4.4", - "mnemonist": "^0.39.0" - }, - "peerDependencies": { - "graphology-types": ">=0.20.0" - } - }, - "node_modules/graphology-shortest-path": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/graphology-shortest-path/-/graphology-shortest-path-2.0.2.tgz", - "integrity": "sha512-hlGvh4Yb1Vmd2J7wT8Q8+t4RQ6Tx+9wRYm0/fZB9PZJ4uW3nml5kJ7yXZ2+JYWT+7wLLmY5mg3o9bLSAWmv/jQ==", - "dependencies": { - "@yomguithereal/helpers": "^1.1.1", - "graphology-indices": "^0.17.0", - "graphology-utils": "^2.4.3", - "mnemonist": "^0.39.0" - }, - "peerDependencies": { - "graphology-types": ">=0.20.0" - } - }, - "node_modules/graphology-types": { - "version": "0.24.7", - "resolved": "https://registry.npmjs.org/graphology-types/-/graphology-types-0.24.7.tgz", - "integrity": "sha512-tdcqOOpwArNjEr0gNQKCXwaNCWnQJrog14nJNQPeemcLnXQUUGrsCWpWkVKt46zLjcS6/KGoayeJfHHyPDlvwA==", - "peer": true - }, - "node_modules/graphology-utils": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/graphology-utils/-/graphology-utils-2.5.2.tgz", - "integrity": "sha512-ckHg8MXrXJkOARk56ZaSCM1g1Wihe2d6iTmz1enGOz4W/l831MBCKSayeFQfowgF8wd+PQ4rlch/56Vs/VZLDQ==", - "peerDependencies": { - "graphology-types": ">=0.23.0" - } - }, "node_modules/guid-typescript": { "version": "1.0.9", "resolved": "https://registry.npmjs.org/guid-typescript/-/guid-typescript-1.0.9.tgz", @@ -5037,9 +4971,9 @@ "optional": true }, "node_modules/http-proxy-agent": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.1.tgz", - "integrity": "sha512-My1KCEPs6A0hb4qCVzYp8iEvA8j8YqcvXLZZH8C9OFuTYpYjHE7N2dtG3mRl1HMD4+VGXpF3XcDVcxGBT7yDZQ==", + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz", + "integrity": "sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==", "dependencies": { "agent-base": "^7.1.0", "debug": "^4.3.4" @@ -5049,9 +4983,9 @@ } }, "node_modules/https-proxy-agent": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.3.tgz", - "integrity": "sha512-kCnwztfX0KZJSLOBrcL0emLeFako55NWMovvyPP2AjsghNk9RB1yjSI+jVumPHYZsNXegNoqupSW9IY3afSH8w==", + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.4.tgz", + "integrity": "sha512-wlwpilI7YdjSkWaQ/7omYBMTliDcmCN8OLihO6I9B86g06lMyAoqgoDpV0XqoaPOKj+0DIdAvnsWfyAAhmimcg==", "dependencies": { "agent-base": "^7.0.2", "debug": "4" @@ -5132,15 +5066,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/import-fresh/node_modules/resolve-from": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", - "peer": true, - "engines": { - "node": ">=4" - } - }, "node_modules/import-local": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.1.0.tgz", @@ -5215,11 +5140,18 @@ "node": ">= 0.4" } }, - "node_modules/ip": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ip/-/ip-2.0.0.tgz", - "integrity": "sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ==", - "optional": true + "node_modules/ip-address": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-9.0.5.tgz", + "integrity": "sha512-zHtQzGojZXTwZTHQqra+ETKd4Sn3vgi7uBmlPoXVWZqYvuKmtI0l/VZTjqGmJY9x88GGOaZ9+G9ES8hC4T4X8g==", + "optional": true, + "dependencies": { + "jsbn": "1.1.0", + "sprintf-js": "^1.1.3" + }, + "engines": { + "node": ">= 12" + } }, "node_modules/is-array-buffer": { "version": "3.0.4", @@ -5516,14 +5448,14 @@ } }, "node_modules/istanbul-lib-instrument": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.1.tgz", - "integrity": "sha512-EAMEJBsYuyyztxMxW3g7ugGPkrZsV57v0Hmv3mm1uQsmB+QnZuepg731CRaIgeUVSdmsTngOkSnauNF8p7FIhA==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.2.tgz", + "integrity": "sha512-1WUsZ9R1lA0HtBSohTkm39WTPlNKSJ5iFk7UwqXkBLoHQT+hfqPsfsTDVuZdKGaBwn7din9bS7SsnoAr943hvw==", "dev": true, "dependencies": { - "@babel/core": "^7.12.3", - "@babel/parser": "^7.14.7", - "@istanbuljs/schema": "^0.1.2", + "@babel/core": "^7.23.9", + "@babel/parser": "^7.23.9", + "@istanbuljs/schema": "^0.1.3", "istanbul-lib-coverage": "^3.2.0", "semver": "^7.5.4" }, @@ -5544,9 +5476,9 @@ } }, "node_modules/istanbul-lib-instrument/node_modules/semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", + "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", "dev": true, "dependencies": { "lru-cache": "^6.0.0" @@ -5593,9 +5525,9 @@ } }, "node_modules/istanbul-reports": { - "version": "3.1.6", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.6.tgz", - "integrity": "sha512-TLgnMkKg3iTDsQ9PbPTdpfAK2DzjF9mqUG7RMgcQl8oFjad8ob4laGxv5XV5U9MAfx8D6tSJiUyuAwzLicaxlg==", + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.7.tgz", + "integrity": "sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g==", "dev": true, "dependencies": { "html-escaper": "^2.0.0", @@ -6078,9 +6010,9 @@ } }, "node_modules/jest-snapshot/node_modules/semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", + "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", "dev": true, "dependencies": { "lru-cache": "^6.0.0" @@ -6194,9 +6126,9 @@ } }, "node_modules/js-tiktoken": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/js-tiktoken/-/js-tiktoken-1.0.8.tgz", - "integrity": "sha512-r7XK3E9/I+SOrbAGqb39pyO/rHAS1diAOSRAvaaLfHgXjkUSK9AiSd+r84Vn2f/GvXJYRAxKj8NHrUvqlaH5qg==", + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/js-tiktoken/-/js-tiktoken-1.0.10.tgz", + "integrity": "sha512-ZoSxbGjvGyMT13x6ACo9ebhDha/0FHdKA+OsQcMOWcm1Zs7r90Rhk5lhERLzji+3rA7EKpXCgwXcM5fF3DMpdA==", "dependencies": { "base64-js": "^1.5.1" } @@ -6208,18 +6140,23 @@ "dev": true }, "node_modules/js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", - "dev": true, + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "peer": true, "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" + "argparse": "^2.0.1" }, "bin": { "js-yaml": "bin/js-yaml.js" } }, + "node_modules/jsbn": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-1.1.0.tgz", + "integrity": "sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A==", + "optional": true + }, "node_modules/jsesc": { "version": "2.5.2", "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", @@ -6327,35 +6264,21 @@ "resolved": "https://registry.npmjs.org/llama-tokenizer-js/-/llama-tokenizer-js-1.1.3.tgz", "integrity": "sha512-+BUgsLCXVQJkjiD/t7PdESLn+yXJIRX/BJfwzVVYfKZ9aN3gsP9xoadBZxKnCxGz2Slby+S7x41gUr2TKNaS4Q==" }, - "node_modules/llm-code-highlighter": { - "version": "0.0.13", - "resolved": "https://registry.npmjs.org/llm-code-highlighter/-/llm-code-highlighter-0.0.13.tgz", - "integrity": "sha512-dkJ8yKXiy3tMHJEA1p1ougAA5wE9K+vZKIkIjG7h+HHDoFy1yMLYIEBQIqofTI+/IwxibebC37Ijhm7qkanRJQ==", - "dependencies": { - "graphology": "^0.25.4", - "graphology-metrics": "^2.2.0", - "lodash": "^4.17.21", - "tree-sitter-wasms": "^0.1.6", - "web-tree-sitter": "^0.20.8" - } - }, "node_modules/locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "peer": true, "dependencies": { - "p-locate": "^4.1.0" + "p-locate": "^5.0.0" }, "engines": { - "node": ">=8" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" - }, "node_modules/lodash.assignwith": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/lodash.assignwith/-/lodash.assignwith-4.2.0.tgz", @@ -6379,9 +6302,9 @@ "peer": true }, "node_modules/long": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", - "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==" + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/long/-/long-5.2.3.tgz", + "integrity": "sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q==" }, "node_modules/lru-cache": { "version": "5.1.1", @@ -6420,9 +6343,9 @@ } }, "node_modules/make-dir/node_modules/semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", + "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", "dev": true, "dependencies": { "lru-cache": "^6.0.0" @@ -6740,14 +6663,6 @@ "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==" }, - "node_modules/mnemonist": { - "version": "0.39.7", - "resolved": "https://registry.npmjs.org/mnemonist/-/mnemonist-0.39.7.tgz", - "integrity": "sha512-ix3FwHWZgdXUt0dHM8bCrI4r1KMeYx8bCunPCYmvKXq4tn6gbNsqrsb4q0kDbDqbpIOvEaW5Sn+dmDwGydfrwA==", - "dependencies": { - "obliterator": "^2.0.1" - } - }, "node_modules/ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", @@ -6771,11 +6686,6 @@ "node": ">= 8.0" } }, - "node_modules/mysql2/node_modules/long": { - "version": "5.2.3", - "resolved": "https://registry.npmjs.org/long/-/long-5.2.3.tgz", - "integrity": "sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q==" - }, "node_modules/mysql2/node_modules/lru-cache": { "version": "8.0.5", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-8.0.5.tgz", @@ -6828,9 +6738,9 @@ "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==" }, "node_modules/node-abi": { - "version": "3.54.0", - "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.54.0.tgz", - "integrity": "sha512-p7eGEiQil0YUV3ItH4/tBb781L5impVmmx2E9FRKF7d18XXzp4PGT2tdYMFY6wQqgxD0IwNZOiSJ0/K0fSi/OA==", + "version": "3.56.0", + "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.56.0.tgz", + "integrity": "sha512-fZjdhDOeRcaS+rcpve7XuwHBmktS1nS1gzgghwKUQQ8nTy2FdSDr6ZT8k6YhvlJeHmmQMYiT/IH9hfco5zeW2Q==", "dependencies": { "semver": "^7.3.5" }, @@ -6850,9 +6760,9 @@ } }, "node_modules/node-abi/node_modules/semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", + "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", "dependencies": { "lru-cache": "^6.0.0" }, @@ -6945,9 +6855,9 @@ } }, "node_modules/node-gyp/node_modules/semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", + "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", "optional": true, "dependencies": { "lru-cache": "^6.0.0" @@ -7152,15 +7062,10 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/obliterator": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/obliterator/-/obliterator-2.0.4.tgz", - "integrity": "sha512-lgHwxlxV1qIg1Eap7LgIeoBWIMFibOjbrYPIPJZcI1mmGAI2m3lNYpK12Y+GBdPQ0U1hRwSord7GIaawz962qQ==" - }, "node_modules/ollama": { - "version": "0.4.6", - "resolved": "https://registry.npmjs.org/ollama/-/ollama-0.4.6.tgz", - "integrity": "sha512-/Im2atcM9hAxOgEi7mc5pG2G+MeN4jFo1bubfCzAd8bZT6nQ3he5tr+jypGufau9+WQKY0MHhTajqKTNfnlZQA==", + "version": "0.4.9", + "resolved": "https://registry.npmjs.org/ollama/-/ollama-0.4.9.tgz", + "integrity": "sha512-hVf5xix5zwswfMN6ydt3K2TS886aOk9RT9xksajXxdIHhi2yokEsdzJYE7IGg+1bjQSPZ6JHzHbESYjNB0pTCg==", "dependencies": { "whatwg-fetch": "^3.6.20" } @@ -7228,10 +7133,15 @@ "platform": "^1.3.6" } }, + "node_modules/onnxruntime-web/node_modules/long": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", + "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==" + }, "node_modules/openai": { - "version": "4.24.7", - "resolved": "https://registry.npmjs.org/openai/-/openai-4.24.7.tgz", - "integrity": "sha512-JUesECWPtsDHO0TlZGb6q73hnAmXUdzj9NrwgZeL4lqlRt/kR1sWrXoy8LocxN/6uOtitywvcJqe0O1PLkG45g==", + "version": "4.28.4", + "resolved": "https://registry.npmjs.org/openai/-/openai-4.28.4.tgz", + "integrity": "sha512-RNIwx4MT/F0zyizGcwS+bXKLzJ8QE9IOyigDG/ttnwB220d58bYjYFp0qjvGwEFBO6+pvFVIDABZPGDl46RFsg==", "dependencies": { "@types/node": "^18.11.18", "@types/node-fetch": "^2.6.4", @@ -7248,9 +7158,9 @@ } }, "node_modules/openai/node_modules/@types/node": { - "version": "18.19.8", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.8.tgz", - "integrity": "sha512-g1pZtPhsvGVTwmeVoexWZLTQaOvXwoSq//pTL0DHeNzUDrFnir4fgETdhjhIxjVnN+hKOuh98+E1eMLnUXstFg==", + "version": "18.19.21", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.21.tgz", + "integrity": "sha512-2Q2NeB6BmiTFQi4DHBzncSoq/cJMLDdhPaAoJFnFCyD9a8VPZRf7a1GAwp1Edb7ROaZc5Jz/tnZyL6EsWMRaqw==", "dependencies": { "undici-types": "~5.26.4" } @@ -7306,27 +7216,15 @@ } }, "node_modules/p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "peer": true, "dependencies": { - "p-limit": "^2.2.0" + "p-limit": "^3.0.2" }, "engines": { - "node": ">=8" - } - }, - "node_modules/p-locate/node_modules/p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" + "node": ">=10" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -7576,6 +7474,58 @@ "node": ">=8" } }, + "node_modules/pkg-dir/node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/pkg-dir/node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/pkg-dir/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/pkg-dir/node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/platform": { "version": "1.3.6", "resolved": "https://registry.npmjs.org/platform/-/platform-1.3.6.tgz", @@ -7625,9 +7575,9 @@ } }, "node_modules/posthog-node": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/posthog-node/-/posthog-node-3.6.2.tgz", - "integrity": "sha512-tVIaShR3SxBx17AlAUS86jQTweKuJIFRedBB504fCz7YPnXJTYSrVcUHn5IINE2wu4jUQimQK6ihQr90Djrdrg==", + "version": "3.6.3", + "resolved": "https://registry.npmjs.org/posthog-node/-/posthog-node-3.6.3.tgz", + "integrity": "sha512-JB+ei0LkwE+rKHyW5z79Nd1jUaGxU6TvkfjFqY9vQaHxU5aU8dRl0UUaEmZdZbHwjp3WmXCBQQRNyimwbNQfCw==", "dependencies": { "axios": "^1.6.2", "rusha": "^0.8.14" @@ -7806,6 +7756,11 @@ "pbts": "bin/pbts" } }, + "node_modules/protobufjs/node_modules/long": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", + "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==" + }, "node_modules/proxy-from-env": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", @@ -7990,7 +7945,7 @@ "node": ">=8" } }, - "node_modules/resolve-from": { + "node_modules/resolve-cwd/node_modules/resolve-from": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", @@ -7999,6 +7954,15 @@ "node": ">=8" } }, + "node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "peer": true, + "engines": { + "node": ">=4" + } + }, "node_modules/resolve.exports": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-2.0.2.tgz", @@ -8209,9 +8173,9 @@ } }, "node_modules/sharp/node_modules/semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", + "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", "dependencies": { "lru-cache": "^6.0.0" }, @@ -8377,16 +8341,16 @@ } }, "node_modules/socks": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/socks/-/socks-2.7.1.tgz", - "integrity": "sha512-7maUZy1N7uo6+WVEX6psASxtNlKaNVMlGQKkG/63nEDdLOWNbiUMoLK7X4uYoLhQstau72mLgfEWcXcwsaHbYQ==", + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/socks/-/socks-2.8.1.tgz", + "integrity": "sha512-B6w7tkwNid7ToxjZ08rQMT8M9BJAf8DKx8Ft4NivzH0zBUfd6jldGcisJn/RLgxcX3FPNDdNQCUEMMT79b+oCQ==", "optional": true, "dependencies": { - "ip": "^2.0.0", + "ip-address": "^9.0.5", "smart-buffer": "^4.2.0" }, "engines": { - "node": ">= 10.13.0", + "node": ">= 10.0.0", "npm": ">= 3.0.0" } }, @@ -8443,10 +8407,10 @@ } }, "node_modules/sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", - "dev": true + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.3.tgz", + "integrity": "sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA==", + "optional": true }, "node_modules/sqlite": { "version": "5.1.1", @@ -8516,6 +8480,15 @@ "node": ">=10" } }, + "node_modules/stack-utils/node_modules/escape-string-regexp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", + "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/stream-read-all": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/stream-read-all/-/stream-read-all-3.0.1.tgz", @@ -8525,12 +8498,15 @@ } }, "node_modules/streamx": { - "version": "2.15.6", - "resolved": "https://registry.npmjs.org/streamx/-/streamx-2.15.6.tgz", - "integrity": "sha512-q+vQL4AAz+FdfT137VF69Cc/APqUbxy+MDOImRrMvchJpigHj9GksgDU2LYbO9rx7RX6osWgxJB2WxhYv4SZAw==", + "version": "2.16.1", + "resolved": "https://registry.npmjs.org/streamx/-/streamx-2.16.1.tgz", + "integrity": "sha512-m9QYj6WygWyWa3H1YY69amr4nVgy61xfjys7xO7kviL5rfIEc2naf+ewFiOA+aEJD7y0JO3h2GoiUv4TDwEGzQ==", "dependencies": { "fast-fifo": "^1.1.0", "queue-tick": "^1.0.1" + }, + "optionalDependencies": { + "bare-events": "^2.2.0" } }, "node_modules/string_decoder": { @@ -8725,13 +8701,16 @@ } }, "node_modules/tar-fs": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-3.0.4.tgz", - "integrity": "sha512-5AFQU8b9qLfZCX9zp2duONhPmZv0hGYiBPJsyUdqMjzq/mqVpy/rEUSeHk1+YitmxugaptgBh5oDGU3VsAJq4w==", + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-3.0.5.tgz", + "integrity": "sha512-JOgGAmZyMgbqpLwct7ZV8VzkEB6pxXFBVErLtb+XCOqzc6w1xiWKI9GVd6bwk68EX7eJ4DWmfXVmq8K2ziZTGg==", "dependencies": { - "mkdirp-classic": "^0.5.2", "pump": "^3.0.0", "tar-stream": "^3.1.5" + }, + "optionalDependencies": { + "bare-fs": "^2.1.1", + "bare-path": "^2.1.0" } }, "node_modules/tar-stream": { @@ -8815,9 +8794,9 @@ "integrity": "sha512-Q7XG/tNYc/rJrUzCELB2t6Y9Ivk8tzCqQFpJNXWdLmycNE68yTMpS8atr2PGtskiIbg4ai13cZ6Y3hNMDmWJZA==" }, "node_modules/ts-jest": { - "version": "29.1.1", - "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.1.1.tgz", - "integrity": "sha512-D6xjnnbP17cC85nliwGiL+tpoKN0StpgE0TeOjXQTU6MVCfsB4v7aW05CgQ/1OywGb0x/oy9hHFnN+sczTiRaA==", + "version": "29.1.2", + "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.1.2.tgz", + "integrity": "sha512-br6GJoH/WUX4pu7FbZXuWGKGNDuU7b8Uj77g/Sp7puZV6EXzuByl6JrECvm0MzVzSTkSHWTihsXt+5XYER5b+g==", "dev": true, "dependencies": { "bs-logger": "0.x", @@ -8833,7 +8812,7 @@ "ts-jest": "cli.js" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^16.10.0 || ^18.0.0 || >=20.0.0" }, "peerDependencies": { "@babel/core": ">=7.0.0-beta.0 <8", @@ -8870,9 +8849,9 @@ } }, "node_modules/ts-jest/node_modules/semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", + "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", "dev": true, "dependencies": { "lru-cache": "^6.0.0" @@ -8961,10 +8940,10 @@ } }, "node_modules/type-fest": { - "version": "0.21.3", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", - "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", - "dev": true, + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "peer": true, "engines": { "node": ">=10" }, @@ -9188,9 +9167,9 @@ } }, "node_modules/vectordb": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/vectordb/-/vectordb-0.4.3.tgz", - "integrity": "sha512-7ToixoZgAB/hn44EE4ftcdE74SGRX+wmGejatTQodFBiYD9RQLW8LIuGo8MmT+AkYEDAuOR98jTEFUwnEU5sqA==", + "version": "0.4.11", + "resolved": "https://registry.npmjs.org/vectordb/-/vectordb-0.4.11.tgz", + "integrity": "sha512-hbN1qO08xdhEpoGecWR6UuvfnNFYDgZLvuEDvgq5nFVbA4er5qXTcEyxjnlTzKsVqFGLlPF+91I+JIigneX24w==", "cpu": [ "x64", "arm64" @@ -9207,11 +9186,11 @@ "axios": "^1.4.0" }, "optionalDependencies": { - "@lancedb/vectordb-darwin-arm64": "0.4.3", - "@lancedb/vectordb-darwin-x64": "0.4.3", - "@lancedb/vectordb-linux-arm64-gnu": "0.4.3", - "@lancedb/vectordb-linux-x64-gnu": "0.4.3", - "@lancedb/vectordb-win32-x64-msvc": "0.4.3" + "@lancedb/vectordb-darwin-arm64": "0.4.11", + "@lancedb/vectordb-darwin-x64": "0.4.11", + "@lancedb/vectordb-linux-arm64-gnu": "0.4.11", + "@lancedb/vectordb-linux-x64-gnu": "0.4.11", + "@lancedb/vectordb-win32-x64-msvc": "0.4.11" } }, "node_modules/walker": { @@ -9224,17 +9203,17 @@ } }, "node_modules/web-streams-polyfill": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.3.2.tgz", - "integrity": "sha512-3pRGuxRF5gpuZc0W+EpwQRmCD7gRqcDOMt688KmdlDAgAyaB1XlN0zq2njfDNm44XVdIouE7pZ6GzbdyH47uIQ==", + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.3.3.tgz", + "integrity": "sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw==", "engines": { "node": ">= 8" } }, "node_modules/web-tree-sitter": { - "version": "0.20.8", - "resolved": "https://registry.npmjs.org/web-tree-sitter/-/web-tree-sitter-0.20.8.tgz", - "integrity": "sha512-weOVgZ3aAARgdnb220GqYuh7+rZU0Ka9k9yfKtGAzEYMa6GgiCzW9JjQRJyCJakvibQW+dfjJdihjInKuuCAUQ==" + "version": "0.21.0", + "resolved": "https://registry.npmjs.org/web-tree-sitter/-/web-tree-sitter-0.21.0.tgz", + "integrity": "sha512-iJ+QJ6ikN9D9cG7Kh6q3KtAstYFUQbYZ8OjuPEJYWfj2kLrmp5I3C2n6WjE1Y3jvj7nJbkcrJytJGWUEhCxn+g==" }, "node_modules/webidl-conversions": { "version": "3.0.1", diff --git a/core/package.json b/core/package.json index c30f22fcb..336e891c8 100644 --- a/core/package.json +++ b/core/package.json @@ -35,7 +35,6 @@ "https-proxy-agent": "^7.0.3", "js-tiktoken": "^1.0.8", "llama-tokenizer-js": "^1.1.3", - "llm-code-highlighter": "^0.0.13", "node-fetch": "^3.3.2", "node-html-markdown": "^1.3.0", "ollama": "^0.4.6", @@ -49,7 +48,7 @@ "tree-sitter-wasms": "^0.1.6", "uuid": "^9.0.1", "vectordb": "^0.4.3", - "web-tree-sitter": "^0.20.8" + "web-tree-sitter": "^0.21.0" }, "puppeteer": { "chromium_revision": "119.0.6045.105" diff --git a/core/util/treeSitter.ts b/core/util/treeSitter.ts index f9729fa08..e0abfd457 100644 --- a/core/util/treeSitter.ts +++ b/core/util/treeSitter.ts @@ -1,5 +1,5 @@ import * as path from "path"; -import Parser, { init, Language } from "web-tree-sitter"; +const Parser = require("web-tree-sitter") export const supportedLanguages: { [key: string]: string } = { cpp: "cpp", @@ -68,7 +68,7 @@ export const supportedLanguages: { [key: string]: string } = { }; export async function getParserForFile(filepath: string) { - await init(); + await Parser.init(); const parser = new Parser(); const extension = path.extname(filepath).slice(1); @@ -87,7 +87,7 @@ export async function getParserForFile(filepath: string) { "tree-sitter-wasms", `tree-sitter-${supportedLanguages[extension]}.wasm` ); - const language = await Language.load(wasmPath); + const language = await Parser.Language.load(wasmPath); parser.setLanguage(language); return parser; } diff --git a/core/vendor/tree-sitter.wasm b/core/vendor/tree-sitter.wasm index d9ca0da7b1eef5a7b561455f15e18a2eb07c4e84..a10e02d841a5608c7f61e613a90a24df446789d7 100755 GIT binary patch literal 185642 zcmdqK3zS{gdEa;TIrn|<%v=Bia!5eJxrc~7kO31)xj;r>>^TS@U`d5)igvMC>Ka18 zh{VhgkHHY45{4LAio@1!%A{(-x_+Rp5<0HwvZ<0Pu2Lh7>MFGw%kiU%AF<*(j+!{N zoT{$UI%a?W|32s5JA(m4x9M70#tl7uRNRbSC9QqGOoq5^yTZ}Wtw`K(Y%sqT(6{mH5+Ct7q2zX ze(2K1X41XuBWJH(SiXAk?B%P^U)o&0ys>ia!pcY9+xhVM<&SJ!*j!0kw<*!4#MPCR zwWOow?pk@_>bZ>zmp4}~E^n+{z3|6YmY-iadpSw;a_`j3=TRYR*LnP4UX!u>$hU zBun>%q|r(m%|=LP(ngYWnpv-%hOF02DAr843%zCtSwEy{n$2XP(ar{{og^XQMK9UA zk9v(}N*9f!-OL(^ZfGj(zbm96@S~aX8r zpJtQ7RMd07)DQjBqy+zm(CTE(Zl3~;B!r~fZGBt!dMJ}Ve_s6=U$)}qyW`~(@p9v5 z{qC*m@(cd;X)f(I?|FI8@-ig;f|0s>Zu8Q{)#U48p?Y}s^5yl9E}uWUc^0Z&zjW?u z@_&TZ3sA?UbICWiL?+yPQ+s12-kooJ7+Ol+yRdn6dHw9g=UzPf9F+CZ7d~`pefiv_ z7cXumAH93qtIe~UP@CWUcGx%l>e|Z2Rq&hqZ(&=F4_{bWhk9M(H^W`iH7>5av?)r2 zCx8F8I@JI!o_%2@`Gs&`x=!`#!jzsUksz&-y>tqFl^0hKECTJ8hZ28Rqx&PB3s*mK_43(sE6JK}&#qs5@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`aA#KdSh$drnv2{VtGf}&c&^s**&FX>YizPr+@TZ>Fl!X@;UqR z_Ivj)IR4s+H&6cQ^KDoQ-+ic8bbGc-D$p>;*CL<_W z5>siYZAigoGC20wF`0Fj?UGG;iq8|ZCDunJ0ze+vj+5$#v13OiRz+nISK!q)y{LCc zLw@iKWaw!bN+TAp3^L2oE#{9YNUVmwS`=e|6>CP8X{ZnuVhTmJyXY?0^kVj6S^~Fw zmM=o=HedmtL&EkE_wib9AH_DNTUSYm5EZdiNxGFEf=WCsp?9Cp-e7?L0mS;8Q z#V*InYjlRXBs_unw3U-f?yyL@6(=OV_5Iah{UT6_6QQ{1ExXFgtEzB)H}a{f8dW~@ z6t1e4#zE{7|MTbW7NqG~^{znrZOoWI*2WzgV&!L6x_*XCa&dM;dA+Lt4Haf1s!yQOlkCE9g`sMTS z%3Aamtyr~&y(@Z*?KHn<#a|ZsOGw?qJ CUYY~| diff --git a/core/yarn.lock b/core/yarn.lock deleted file mode 100644 index 6ad3b98b5..000000000 --- a/core/yarn.lock +++ /dev/null @@ -1,5497 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -"@75lb/deep-merge@^1.1.1": - version "1.1.1" - resolved "https://registry.npmjs.org/@75lb/deep-merge/-/deep-merge-1.1.1.tgz" - integrity sha512-xvgv6pkMGBA6GwdyJbNAnDmfAIR/DfWhrj9jgWh3TY7gRm3KO46x/GPjRg6wJ0nOepwqrNxFfojebh0Df4h4Tw== - dependencies: - lodash.assignwith "^4.2.0" - typical "^7.1.1" - -"@aashutoshrathi/word-wrap@^1.2.3": - version "1.2.6" - resolved "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz" - integrity sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA== - -"@ampproject/remapping@^2.2.0": - version "2.2.1" - resolved "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.1.tgz" - integrity sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg== - dependencies: - "@jridgewell/gen-mapping" "^0.3.0" - "@jridgewell/trace-mapping" "^0.3.9" - -"@apache-arrow/ts@^14.0.2": - version "14.0.2" - resolved "https://registry.npmjs.org/@apache-arrow/ts/-/ts-14.0.2.tgz" - integrity sha512-CtwAvLkK0CZv7xsYeCo91ml6PvlfzAmAJZkRYuz2GNBwfYufj5SVi0iuSMwIMkcU/szVwvLdzORSLa5PlF/2ug== - dependencies: - "@types/command-line-args" "5.2.0" - "@types/command-line-usage" "5.0.2" - "@types/node" "20.3.0" - "@types/pad-left" "2.1.1" - command-line-args "5.2.1" - command-line-usage "7.0.1" - flatbuffers "23.5.26" - json-bignum "^0.0.3" - pad-left "^2.1.0" - tslib "^2.5.3" - -"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.22.13", "@babel/code-frame@^7.23.5": - version "7.23.5" - resolved "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.23.5.tgz" - integrity sha512-CgH3s1a96LipHCmSUmYFPwY7MNx8C3avkq7i4Wl3cfa662ldtUe4VM1TPXX70pfmrlWTb6jLqTYrZyT2ZTJBgA== - dependencies: - "@babel/highlight" "^7.23.4" - chalk "^2.4.2" - -"@babel/compat-data@^7.23.5": - version "7.23.5" - resolved "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.23.5.tgz" - integrity sha512-uU27kfDRlhfKl+w1U6vp16IuvSLtjAxdArVXPa9BvLkrr7CYIsxH5adpHObeAGY/41+syctUWOZ140a2Rvkgjw== - -"@babel/core@^7.0.0", "@babel/core@^7.0.0-0", "@babel/core@^7.11.6", "@babel/core@^7.12.3", "@babel/core@^7.8.0", "@babel/core@>=7.0.0-beta.0 <8": - version "7.23.7" - resolved "https://registry.npmjs.org/@babel/core/-/core-7.23.7.tgz" - integrity sha512-+UpDgowcmqe36d4NwqvKsyPMlOLNGMsfMmQ5WGCu+siCe3t3dfe9njrzGfdN4qq+bcNUt0+Vw6haRxBOycs4dw== - dependencies: - "@ampproject/remapping" "^2.2.0" - "@babel/code-frame" "^7.23.5" - "@babel/generator" "^7.23.6" - "@babel/helper-compilation-targets" "^7.23.6" - "@babel/helper-module-transforms" "^7.23.3" - "@babel/helpers" "^7.23.7" - "@babel/parser" "^7.23.6" - "@babel/template" "^7.22.15" - "@babel/traverse" "^7.23.7" - "@babel/types" "^7.23.6" - convert-source-map "^2.0.0" - debug "^4.1.0" - gensync "^1.0.0-beta.2" - json5 "^2.2.3" - semver "^6.3.1" - -"@babel/generator@^7.23.6", "@babel/generator@^7.7.2": - version "7.23.6" - resolved "https://registry.npmjs.org/@babel/generator/-/generator-7.23.6.tgz" - integrity sha512-qrSfCYxYQB5owCmGLbl8XRpX1ytXlpueOb0N0UmQwA073KZxejgQTzAmJezxvpwQD9uGtK2shHdi55QT+MbjIw== - dependencies: - "@babel/types" "^7.23.6" - "@jridgewell/gen-mapping" "^0.3.2" - "@jridgewell/trace-mapping" "^0.3.17" - jsesc "^2.5.1" - -"@babel/helper-compilation-targets@^7.23.6": - version "7.23.6" - resolved "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.23.6.tgz" - integrity sha512-9JB548GZoQVmzrFgp8o7KxdgkTGm6xs9DW0o/Pim72UDjzr5ObUQ6ZzYPqA+g9OTS2bBQoctLJrky0RDCAWRgQ== - dependencies: - "@babel/compat-data" "^7.23.5" - "@babel/helper-validator-option" "^7.23.5" - browserslist "^4.22.2" - lru-cache "^5.1.1" - semver "^6.3.1" - -"@babel/helper-environment-visitor@^7.22.20": - version "7.22.20" - resolved "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz" - integrity sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA== - -"@babel/helper-function-name@^7.23.0": - version "7.23.0" - resolved "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz" - integrity sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw== - dependencies: - "@babel/template" "^7.22.15" - "@babel/types" "^7.23.0" - -"@babel/helper-hoist-variables@^7.22.5": - version "7.22.5" - resolved "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz" - integrity sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw== - dependencies: - "@babel/types" "^7.22.5" - -"@babel/helper-module-imports@^7.22.15": - version "7.22.15" - resolved "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.22.15.tgz" - integrity sha512-0pYVBnDKZO2fnSPCrgM/6WMc7eS20Fbok+0r88fp+YtWVLZrp4CkafFGIp+W0VKw4a22sgebPT99y+FDNMdP4w== - dependencies: - "@babel/types" "^7.22.15" - -"@babel/helper-module-transforms@^7.23.3": - version "7.23.3" - resolved "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.23.3.tgz" - integrity sha512-7bBs4ED9OmswdfDzpz4MpWgSrV7FXlc3zIagvLFjS5H+Mk7Snr21vQ6QwrsoCGMfNC4e4LQPdoULEt4ykz0SRQ== - dependencies: - "@babel/helper-environment-visitor" "^7.22.20" - "@babel/helper-module-imports" "^7.22.15" - "@babel/helper-simple-access" "^7.22.5" - "@babel/helper-split-export-declaration" "^7.22.6" - "@babel/helper-validator-identifier" "^7.22.20" - -"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.22.5", "@babel/helper-plugin-utils@^7.8.0": - version "7.22.5" - resolved "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.22.5.tgz" - integrity sha512-uLls06UVKgFG9QD4OeFYLEGteMIAa5kpTPcFL28yuCIIzsf6ZyKZMllKVOCZFhiZ5ptnwX4mtKdWCBE/uT4amg== - -"@babel/helper-simple-access@^7.22.5": - version "7.22.5" - resolved "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.22.5.tgz" - integrity sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w== - dependencies: - "@babel/types" "^7.22.5" - -"@babel/helper-split-export-declaration@^7.22.6": - version "7.22.6" - resolved "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz" - integrity sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g== - dependencies: - "@babel/types" "^7.22.5" - -"@babel/helper-string-parser@^7.23.4": - version "7.23.4" - resolved "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.23.4.tgz" - integrity sha512-803gmbQdqwdf4olxrX4AJyFBV/RTr3rSmOj0rKwesmzlfhYNDEs+/iOcznzpNWlJlIlTJC2QfPFcHB6DlzdVLQ== - -"@babel/helper-validator-identifier@^7.22.20": - version "7.22.20" - resolved "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz" - integrity sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A== - -"@babel/helper-validator-option@^7.23.5": - version "7.23.5" - resolved "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.23.5.tgz" - integrity sha512-85ttAOMLsr53VgXkTbkx8oA6YTfT4q7/HzXSLEYmjcSTJPMPQtvq1BD79Byep5xMUYbGRzEpDsjUf3dyp54IKw== - -"@babel/helpers@^7.23.7": - version "7.23.8" - resolved "https://registry.npmjs.org/@babel/helpers/-/helpers-7.23.8.tgz" - integrity sha512-KDqYz4PiOWvDFrdHLPhKtCThtIcKVy6avWD2oG4GEvyQ+XDZwHD4YQd+H2vNMnq2rkdxsDkU82T+Vk8U/WXHRQ== - dependencies: - "@babel/template" "^7.22.15" - "@babel/traverse" "^7.23.7" - "@babel/types" "^7.23.6" - -"@babel/highlight@^7.23.4": - version "7.23.4" - resolved "https://registry.npmjs.org/@babel/highlight/-/highlight-7.23.4.tgz" - integrity sha512-acGdbYSfp2WheJoJm/EBBBLh/ID8KDc64ISZ9DYtBmC8/Q204PZJLHyzeB5qMzJ5trcOkybd78M4x2KWsUq++A== - dependencies: - "@babel/helper-validator-identifier" "^7.22.20" - chalk "^2.4.2" - js-tokens "^4.0.0" - -"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.20.7", "@babel/parser@^7.22.15", "@babel/parser@^7.23.6": - version "7.23.6" - resolved "https://registry.npmjs.org/@babel/parser/-/parser-7.23.6.tgz" - integrity sha512-Z2uID7YJ7oNvAI20O9X0bblw7Qqs8Q2hFy0R9tAfnfLkp5MW0UH9eUvnDSnFwKZ0AvgS1ucqR4KzvVHgnke1VQ== - -"@babel/plugin-syntax-async-generators@^7.8.4": - version "7.8.4" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz" - integrity sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw== - dependencies: - "@babel/helper-plugin-utils" "^7.8.0" - -"@babel/plugin-syntax-bigint@^7.8.3": - version "7.8.3" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz" - integrity sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg== - dependencies: - "@babel/helper-plugin-utils" "^7.8.0" - -"@babel/plugin-syntax-class-properties@^7.8.3": - version "7.12.13" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz" - integrity sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA== - dependencies: - "@babel/helper-plugin-utils" "^7.12.13" - -"@babel/plugin-syntax-import-meta@^7.8.3": - version "7.10.4" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz" - integrity sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g== - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - -"@babel/plugin-syntax-json-strings@^7.8.3": - version "7.8.3" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz" - integrity sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA== - dependencies: - "@babel/helper-plugin-utils" "^7.8.0" - -"@babel/plugin-syntax-jsx@^7.7.2": - version "7.23.3" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.23.3.tgz" - integrity sha512-EB2MELswq55OHUoRZLGg/zC7QWUKfNLpE57m/S2yr1uEneIgsTgrSzXP3NXEsMkVn76OlaVVnzN+ugObuYGwhg== - dependencies: - "@babel/helper-plugin-utils" "^7.22.5" - -"@babel/plugin-syntax-logical-assignment-operators@^7.8.3": - version "7.10.4" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz" - integrity sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig== - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - -"@babel/plugin-syntax-nullish-coalescing-operator@^7.8.3": - version "7.8.3" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz" - integrity sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ== - dependencies: - "@babel/helper-plugin-utils" "^7.8.0" - -"@babel/plugin-syntax-numeric-separator@^7.8.3": - version "7.10.4" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz" - integrity sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug== - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - -"@babel/plugin-syntax-object-rest-spread@^7.8.3": - version "7.8.3" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz" - integrity sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA== - dependencies: - "@babel/helper-plugin-utils" "^7.8.0" - -"@babel/plugin-syntax-optional-catch-binding@^7.8.3": - version "7.8.3" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz" - integrity sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q== - dependencies: - "@babel/helper-plugin-utils" "^7.8.0" - -"@babel/plugin-syntax-optional-chaining@^7.8.3": - version "7.8.3" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz" - integrity sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg== - dependencies: - "@babel/helper-plugin-utils" "^7.8.0" - -"@babel/plugin-syntax-top-level-await@^7.8.3": - version "7.14.5" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz" - integrity sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw== - dependencies: - "@babel/helper-plugin-utils" "^7.14.5" - -"@babel/plugin-syntax-typescript@^7.7.2": - version "7.23.3" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.23.3.tgz" - integrity sha512-9EiNjVJOMwCO+43TqoTrgQ8jMwcAd0sWyXi9RPfIsLTj4R2MADDDQXELhffaUx/uJv2AYcxBgPwH6j4TIA4ytQ== - dependencies: - "@babel/helper-plugin-utils" "^7.22.5" - -"@babel/template@^7.22.15", "@babel/template@^7.3.3": - version "7.22.15" - resolved "https://registry.npmjs.org/@babel/template/-/template-7.22.15.tgz" - integrity sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w== - dependencies: - "@babel/code-frame" "^7.22.13" - "@babel/parser" "^7.22.15" - "@babel/types" "^7.22.15" - -"@babel/traverse@^7.23.7": - version "7.23.7" - resolved "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.7.tgz" - integrity sha512-tY3mM8rH9jM0YHFGyfC0/xf+SB5eKUu7HPj7/k3fpi9dAlsMc5YbQvDi0Sh2QTPXqMhyaAtzAr807TIyfQrmyg== - dependencies: - "@babel/code-frame" "^7.23.5" - "@babel/generator" "^7.23.6" - "@babel/helper-environment-visitor" "^7.22.20" - "@babel/helper-function-name" "^7.23.0" - "@babel/helper-hoist-variables" "^7.22.5" - "@babel/helper-split-export-declaration" "^7.22.6" - "@babel/parser" "^7.23.6" - "@babel/types" "^7.23.6" - debug "^4.3.1" - globals "^11.1.0" - -"@babel/types@^7.0.0", "@babel/types@^7.20.7", "@babel/types@^7.22.15", "@babel/types@^7.22.5", "@babel/types@^7.23.0", "@babel/types@^7.23.6", "@babel/types@^7.3.3": - version "7.23.6" - resolved "https://registry.npmjs.org/@babel/types/-/types-7.23.6.tgz" - integrity sha512-+uarb83brBzPKN38NX1MkB6vb6+mwvR6amUulqAE7ccQw1pEl+bCia9TbdG1lsnFP7lZySvUn37CHyXQdfTwzg== - dependencies: - "@babel/helper-string-parser" "^7.23.4" - "@babel/helper-validator-identifier" "^7.22.20" - to-fast-properties "^2.0.0" - -"@bcoe/v8-coverage@^0.2.3": - version "0.2.3" - resolved "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz" - integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== - -"@esbuild/darwin-arm64@0.19.11": - version "0.19.11" - resolved "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.19.11.tgz" - integrity sha512-ETp87DRWuSt9KdDVkqSoKoLFHYTrkyz2+65fj9nfXsaV3bMhTCjtQfw3y+um88vGRKRiF7erPrh/ZuIdLUIVxQ== - -"@eslint-community/eslint-utils@^4.2.0": - version "4.4.0" - resolved "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz" - integrity sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA== - dependencies: - eslint-visitor-keys "^3.3.0" - -"@eslint-community/regexpp@^4.6.1": - version "4.10.0" - resolved "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.10.0.tgz" - integrity sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA== - -"@eslint/eslintrc@^2.1.4": - version "2.1.4" - resolved "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz" - integrity sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ== - dependencies: - ajv "^6.12.4" - debug "^4.3.2" - espree "^9.6.0" - globals "^13.19.0" - ignore "^5.2.0" - import-fresh "^3.2.1" - js-yaml "^4.1.0" - minimatch "^3.1.2" - strip-json-comments "^3.1.1" - -"@eslint/js@8.56.0": - version "8.56.0" - resolved "https://registry.npmjs.org/@eslint/js/-/js-8.56.0.tgz" - integrity sha512-gMsVel9D7f2HLkBma9VbtzZRehRogVRfbr++f06nL2vnCGCNlzOD+/MUov/F4p8myyAHspEhVobgjpX64q5m6A== - -"@gar/promisify@^1.0.1": - version "1.1.3" - resolved "https://registry.npmjs.org/@gar/promisify/-/promisify-1.1.3.tgz" - integrity sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw== - -"@huggingface/jinja@^0.1.0": - version "0.1.2" - resolved "https://registry.npmjs.org/@huggingface/jinja/-/jinja-0.1.2.tgz" - integrity sha512-x5mpbfJt1nKmVep5WNP5VjNsjWApWNj8pPYI+uYMkBWH9bWUJmQmHt2lbf0VCoQd54Oq3XuFEh/UyoVh7rPxmg== - -"@humanwhocodes/config-array@^0.11.13": - version "0.11.14" - resolved "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz" - integrity sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg== - dependencies: - "@humanwhocodes/object-schema" "^2.0.2" - debug "^4.3.1" - minimatch "^3.0.5" - -"@humanwhocodes/module-importer@^1.0.1": - version "1.0.1" - resolved "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz" - integrity sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA== - -"@humanwhocodes/object-schema@^2.0.2": - version "2.0.2" - resolved "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.2.tgz" - integrity sha512-6EwiSjwWYP7pTckG6I5eyFANjPhmPjUX9JRLUSfNPC7FX7zK9gyZAfUEaECL6ALTpGX5AjnBq3C9XmVWPitNpw== - -"@istanbuljs/load-nyc-config@^1.0.0": - version "1.1.0" - resolved "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz" - integrity sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ== - dependencies: - camelcase "^5.3.1" - find-up "^4.1.0" - get-package-type "^0.1.0" - js-yaml "^3.13.1" - resolve-from "^5.0.0" - -"@istanbuljs/schema@^0.1.2": - version "0.1.3" - resolved "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz" - integrity sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA== - -"@jest/console@^29.7.0": - version "29.7.0" - resolved "https://registry.npmjs.org/@jest/console/-/console-29.7.0.tgz" - integrity sha512-5Ni4CU7XHQi32IJ398EEP4RrB8eV09sXP2ROqD4bksHrnTree52PsxvX8tpL8LvTZ3pFzXyPbNQReSN41CAhOg== - dependencies: - "@jest/types" "^29.6.3" - "@types/node" "*" - chalk "^4.0.0" - jest-message-util "^29.7.0" - jest-util "^29.7.0" - slash "^3.0.0" - -"@jest/core@^29.7.0": - version "29.7.0" - resolved "https://registry.npmjs.org/@jest/core/-/core-29.7.0.tgz" - integrity sha512-n7aeXWKMnGtDA48y8TLWJPJmLmmZ642Ceo78cYWEpiD7FzDgmNDV/GCVRorPABdXLJZ/9wzzgZAlHjXjxDHGsg== - dependencies: - "@jest/console" "^29.7.0" - "@jest/reporters" "^29.7.0" - "@jest/test-result" "^29.7.0" - "@jest/transform" "^29.7.0" - "@jest/types" "^29.6.3" - "@types/node" "*" - ansi-escapes "^4.2.1" - chalk "^4.0.0" - ci-info "^3.2.0" - exit "^0.1.2" - graceful-fs "^4.2.9" - jest-changed-files "^29.7.0" - jest-config "^29.7.0" - jest-haste-map "^29.7.0" - jest-message-util "^29.7.0" - jest-regex-util "^29.6.3" - jest-resolve "^29.7.0" - jest-resolve-dependencies "^29.7.0" - jest-runner "^29.7.0" - jest-runtime "^29.7.0" - jest-snapshot "^29.7.0" - jest-util "^29.7.0" - jest-validate "^29.7.0" - jest-watcher "^29.7.0" - micromatch "^4.0.4" - pretty-format "^29.7.0" - slash "^3.0.0" - strip-ansi "^6.0.0" - -"@jest/environment@^29.7.0": - version "29.7.0" - resolved "https://registry.npmjs.org/@jest/environment/-/environment-29.7.0.tgz" - integrity sha512-aQIfHDq33ExsN4jP1NWGXhxgQ/wixs60gDiKO+XVMd8Mn0NWPWgc34ZQDTb2jKaUWQ7MuwoitXAsN2XVXNMpAw== - dependencies: - "@jest/fake-timers" "^29.7.0" - "@jest/types" "^29.6.3" - "@types/node" "*" - jest-mock "^29.7.0" - -"@jest/expect-utils@^29.7.0": - version "29.7.0" - resolved "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-29.7.0.tgz" - integrity sha512-GlsNBWiFQFCVi9QVSx7f5AgMeLxe9YCCs5PuP2O2LdjDAA8Jh9eX7lA1Jq/xdXw3Wb3hyvlFNfZIfcRetSzYcA== - dependencies: - jest-get-type "^29.6.3" - -"@jest/expect@^29.7.0": - version "29.7.0" - resolved "https://registry.npmjs.org/@jest/expect/-/expect-29.7.0.tgz" - integrity sha512-8uMeAMycttpva3P1lBHB8VciS9V0XAr3GymPpipdyQXbBcuhkLQOSe8E/p92RyAdToS6ZD1tFkX+CkhoECE0dQ== - dependencies: - expect "^29.7.0" - jest-snapshot "^29.7.0" - -"@jest/fake-timers@^29.7.0": - version "29.7.0" - resolved "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.7.0.tgz" - integrity sha512-q4DH1Ha4TTFPdxLsqDXK1d3+ioSL7yL5oCMJZgDYm6i+6CygW5E5xVr/D1HdsGxjt1ZWSfUAs9OxSB/BNelWrQ== - dependencies: - "@jest/types" "^29.6.3" - "@sinonjs/fake-timers" "^10.0.2" - "@types/node" "*" - jest-message-util "^29.7.0" - jest-mock "^29.7.0" - jest-util "^29.7.0" - -"@jest/globals@^29.7.0": - version "29.7.0" - resolved "https://registry.npmjs.org/@jest/globals/-/globals-29.7.0.tgz" - integrity sha512-mpiz3dutLbkW2MNFubUGUEVLkTGiqW6yLVTA+JbP6fI6J5iL9Y0Nlg8k95pcF8ctKwCS7WVxteBs29hhfAotzQ== - dependencies: - "@jest/environment" "^29.7.0" - "@jest/expect" "^29.7.0" - "@jest/types" "^29.6.3" - jest-mock "^29.7.0" - -"@jest/reporters@^29.7.0": - version "29.7.0" - resolved "https://registry.npmjs.org/@jest/reporters/-/reporters-29.7.0.tgz" - integrity sha512-DApq0KJbJOEzAFYjHADNNxAE3KbhxQB1y5Kplb5Waqw6zVbuWatSnMjE5gs8FUgEPmNsnZA3NCWl9NG0ia04Pg== - dependencies: - "@bcoe/v8-coverage" "^0.2.3" - "@jest/console" "^29.7.0" - "@jest/test-result" "^29.7.0" - "@jest/transform" "^29.7.0" - "@jest/types" "^29.6.3" - "@jridgewell/trace-mapping" "^0.3.18" - "@types/node" "*" - chalk "^4.0.0" - collect-v8-coverage "^1.0.0" - exit "^0.1.2" - glob "^7.1.3" - graceful-fs "^4.2.9" - istanbul-lib-coverage "^3.0.0" - istanbul-lib-instrument "^6.0.0" - istanbul-lib-report "^3.0.0" - istanbul-lib-source-maps "^4.0.0" - istanbul-reports "^3.1.3" - jest-message-util "^29.7.0" - jest-util "^29.7.0" - jest-worker "^29.7.0" - slash "^3.0.0" - string-length "^4.0.1" - strip-ansi "^6.0.0" - v8-to-istanbul "^9.0.1" - -"@jest/schemas@^29.6.3": - version "29.6.3" - resolved "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz" - integrity sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA== - dependencies: - "@sinclair/typebox" "^0.27.8" - -"@jest/source-map@^29.6.3": - version "29.6.3" - resolved "https://registry.npmjs.org/@jest/source-map/-/source-map-29.6.3.tgz" - integrity sha512-MHjT95QuipcPrpLM+8JMSzFx6eHp5Bm+4XeFDJlwsvVBjmKNiIAvasGK2fxz2WbGRlnvqehFbh07MMa7n3YJnw== - dependencies: - "@jridgewell/trace-mapping" "^0.3.18" - callsites "^3.0.0" - graceful-fs "^4.2.9" - -"@jest/test-result@^29.7.0": - version "29.7.0" - resolved "https://registry.npmjs.org/@jest/test-result/-/test-result-29.7.0.tgz" - integrity sha512-Fdx+tv6x1zlkJPcWXmMDAG2HBnaR9XPSd5aDWQVsfrZmLVT3lU1cwyxLgRmXR9yrq4NBoEm9BMsfgFzTQAbJYA== - dependencies: - "@jest/console" "^29.7.0" - "@jest/types" "^29.6.3" - "@types/istanbul-lib-coverage" "^2.0.0" - collect-v8-coverage "^1.0.0" - -"@jest/test-sequencer@^29.7.0": - version "29.7.0" - resolved "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-29.7.0.tgz" - integrity sha512-GQwJ5WZVrKnOJuiYiAF52UNUJXgTZx1NHjFSEB0qEMmSZKAkdMoIzw/Cj6x6NF4AvV23AUqDpFzQkN/eYCYTxw== - dependencies: - "@jest/test-result" "^29.7.0" - graceful-fs "^4.2.9" - jest-haste-map "^29.7.0" - slash "^3.0.0" - -"@jest/transform@^29.7.0": - version "29.7.0" - resolved "https://registry.npmjs.org/@jest/transform/-/transform-29.7.0.tgz" - integrity sha512-ok/BTPFzFKVMwO5eOHRrvnBVHdRy9IrsrW1GpMaQ9MCnilNLXQKmAX8s1YXDFaai9xJpac2ySzV0YeRRECr2Vw== - dependencies: - "@babel/core" "^7.11.6" - "@jest/types" "^29.6.3" - "@jridgewell/trace-mapping" "^0.3.18" - babel-plugin-istanbul "^6.1.1" - chalk "^4.0.0" - convert-source-map "^2.0.0" - fast-json-stable-stringify "^2.1.0" - graceful-fs "^4.2.9" - jest-haste-map "^29.7.0" - jest-regex-util "^29.6.3" - jest-util "^29.7.0" - micromatch "^4.0.4" - pirates "^4.0.4" - slash "^3.0.0" - write-file-atomic "^4.0.2" - -"@jest/types@^29.0.0", "@jest/types@^29.6.3": - version "29.6.3" - resolved "https://registry.npmjs.org/@jest/types/-/types-29.6.3.tgz" - integrity sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw== - dependencies: - "@jest/schemas" "^29.6.3" - "@types/istanbul-lib-coverage" "^2.0.0" - "@types/istanbul-reports" "^3.0.0" - "@types/node" "*" - "@types/yargs" "^17.0.8" - chalk "^4.0.0" - -"@jridgewell/gen-mapping@^0.3.0", "@jridgewell/gen-mapping@^0.3.2": - version "0.3.3" - resolved "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz" - integrity sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ== - dependencies: - "@jridgewell/set-array" "^1.0.1" - "@jridgewell/sourcemap-codec" "^1.4.10" - "@jridgewell/trace-mapping" "^0.3.9" - -"@jridgewell/resolve-uri@^3.1.0": - version "3.1.1" - resolved "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz" - integrity sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA== - -"@jridgewell/set-array@^1.0.1": - version "1.1.2" - resolved "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz" - integrity sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw== - -"@jridgewell/sourcemap-codec@^1.4.10", "@jridgewell/sourcemap-codec@^1.4.14": - version "1.4.15" - resolved "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz" - integrity sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg== - -"@jridgewell/trace-mapping@^0.3.12", "@jridgewell/trace-mapping@^0.3.17", "@jridgewell/trace-mapping@^0.3.18", "@jridgewell/trace-mapping@^0.3.9": - version "0.3.22" - resolved "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.22.tgz" - integrity sha512-Wf963MzWtA2sjrNt+g18IAln9lKnlRp+K2eH4jjIoF1wYeq3aMREpG09xhlhdzS0EjwU7qmUJYangWa+151vZw== - dependencies: - "@jridgewell/resolve-uri" "^3.1.0" - "@jridgewell/sourcemap-codec" "^1.4.14" - -"@lancedb/vectordb-darwin-arm64@0.4.3": - version "0.4.3" - resolved "https://registry.npmjs.org/@lancedb/vectordb-darwin-arm64/-/vectordb-darwin-arm64-0.4.3.tgz" - integrity sha512-47CvvSaV1EdUsFEpXUJApTk+hMzAhCxVizipCFUlXCgcmzpCDL86wNgJij/X9a+j6zADhIX//Lsu0qd/an/Bpw== - -"@neon-rs/load@^0.0.74": - version "0.0.74" - resolved "https://registry.npmjs.org/@neon-rs/load/-/load-0.0.74.tgz" - integrity sha512-/cPZD907UNz55yrc/ud4wDgQKtU1TvkD9jeqZWG6J4IMmZkp6zgjkQcKA8UvpkZlcpPHvc8J17sGzLFbP/LUYg== - -"@nodelib/fs.scandir@2.1.5": - version "2.1.5" - resolved "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz" - integrity sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g== - dependencies: - "@nodelib/fs.stat" "2.0.5" - run-parallel "^1.1.9" - -"@nodelib/fs.stat@2.0.5": - version "2.0.5" - resolved "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz" - integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A== - -"@nodelib/fs.walk@^1.2.8": - version "1.2.8" - resolved "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz" - integrity sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg== - dependencies: - "@nodelib/fs.scandir" "2.1.5" - fastq "^1.6.0" - -"@npmcli/fs@^1.0.0": - version "1.1.1" - resolved "https://registry.npmjs.org/@npmcli/fs/-/fs-1.1.1.tgz" - integrity sha512-8KG5RD0GVP4ydEzRn/I4BNDuxDtqVbOdm8675T49OIG/NGhaK0pjPX7ZcDlvKYbA+ulvVK3ztfcF4uBdOxuJbQ== - dependencies: - "@gar/promisify" "^1.0.1" - semver "^7.3.5" - -"@npmcli/move-file@^1.0.1": - version "1.1.2" - resolved "https://registry.npmjs.org/@npmcli/move-file/-/move-file-1.1.2.tgz" - integrity sha512-1SUf/Cg2GzGDyaf15aR9St9TWlb+XvbZXWpDx8YKs7MLzMH/BCeopv+y9vzrzgkfykCGuWOlSu3mZhj2+FQcrg== - dependencies: - mkdirp "^1.0.4" - rimraf "^3.0.2" - -"@octokit/auth-token@^4.0.0": - version "4.0.0" - resolved "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-4.0.0.tgz" - integrity sha512-tY/msAuJo6ARbK6SPIxZrPBms3xPbfwBrulZe0Wtr/DIY9lje2HeV1uoebShn6mx7SjCHif6EjMvoREj+gZ+SA== - -"@octokit/core@^5.0.0", "@octokit/core@>=5": - version "5.1.0" - resolved "https://registry.npmjs.org/@octokit/core/-/core-5.1.0.tgz" - integrity sha512-BDa2VAMLSh3otEiaMJ/3Y36GU4qf6GI+VivQ/P41NC6GHcdxpKlqV0ikSZ5gdQsmS3ojXeRx5vasgNTinF0Q4g== - dependencies: - "@octokit/auth-token" "^4.0.0" - "@octokit/graphql" "^7.0.0" - "@octokit/request" "^8.0.2" - "@octokit/request-error" "^5.0.0" - "@octokit/types" "^12.0.0" - before-after-hook "^2.2.0" - universal-user-agent "^6.0.0" - -"@octokit/endpoint@^9.0.0": - version "9.0.4" - resolved "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-9.0.4.tgz" - integrity sha512-DWPLtr1Kz3tv8L0UvXTDP1fNwM0S+z6EJpRcvH66orY6Eld4XBMCSYsaWp4xIm61jTWxK68BrR7ibO+vSDnZqw== - dependencies: - "@octokit/types" "^12.0.0" - universal-user-agent "^6.0.0" - -"@octokit/graphql@^7.0.0": - version "7.0.2" - resolved "https://registry.npmjs.org/@octokit/graphql/-/graphql-7.0.2.tgz" - integrity sha512-OJ2iGMtj5Tg3s6RaXH22cJcxXRi7Y3EBqbHTBRq+PQAqfaS8f/236fUrWhfSn8P4jovyzqucxme7/vWSSZBX2Q== - dependencies: - "@octokit/request" "^8.0.1" - "@octokit/types" "^12.0.0" - universal-user-agent "^6.0.0" - -"@octokit/openapi-types@^19.1.0": - version "19.1.0" - resolved "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-19.1.0.tgz" - integrity sha512-6G+ywGClliGQwRsjvqVYpklIfa7oRPA0vyhPQG/1Feh+B+wU0vGH1JiJ5T25d3g1JZYBHzR2qefLi9x8Gt+cpw== - -"@octokit/plugin-paginate-rest@^9.0.0": - version "9.1.5" - resolved "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-9.1.5.tgz" - integrity sha512-WKTQXxK+bu49qzwv4qKbMMRXej1DU2gq017euWyKVudA6MldaSSQuxtz+vGbhxV4CjxpUxjZu6rM2wfc1FiWVg== - dependencies: - "@octokit/types" "^12.4.0" - -"@octokit/plugin-request-log@^4.0.0": - version "4.0.0" - resolved "https://registry.npmjs.org/@octokit/plugin-request-log/-/plugin-request-log-4.0.0.tgz" - integrity sha512-2uJI1COtYCq8Z4yNSnM231TgH50bRkheQ9+aH8TnZanB6QilOnx8RMD2qsnamSOXtDj0ilxvevf5fGsBhBBzKA== - -"@octokit/plugin-rest-endpoint-methods@^10.0.0": - version "10.2.0" - resolved "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-10.2.0.tgz" - integrity sha512-ePbgBMYtGoRNXDyKGvr9cyHjQ163PbwD0y1MkDJCpkO2YH4OeXX40c4wYHKikHGZcpGPbcRLuy0unPUuafco8Q== - dependencies: - "@octokit/types" "^12.3.0" - -"@octokit/request-error@^5.0.0": - version "5.0.1" - resolved "https://registry.npmjs.org/@octokit/request-error/-/request-error-5.0.1.tgz" - integrity sha512-X7pnyTMV7MgtGmiXBwmO6M5kIPrntOXdyKZLigNfQWSEQzVxR4a4vo49vJjTWX70mPndj8KhfT4Dx+2Ng3vnBQ== - dependencies: - "@octokit/types" "^12.0.0" - deprecation "^2.0.0" - once "^1.4.0" - -"@octokit/request@^8.0.1", "@octokit/request@^8.0.2": - version "8.1.6" - resolved "https://registry.npmjs.org/@octokit/request/-/request-8.1.6.tgz" - integrity sha512-YhPaGml3ncZC1NfXpP3WZ7iliL1ap6tLkAp6MvbK2fTTPytzVUyUesBBogcdMm86uRYO5rHaM1xIWxigWZ17MQ== - dependencies: - "@octokit/endpoint" "^9.0.0" - "@octokit/request-error" "^5.0.0" - "@octokit/types" "^12.0.0" - universal-user-agent "^6.0.0" - -"@octokit/rest@^20.0.2": - version "20.0.2" - resolved "https://registry.npmjs.org/@octokit/rest/-/rest-20.0.2.tgz" - integrity sha512-Ux8NDgEraQ/DMAU1PlAohyfBBXDwhnX2j33Z1nJNziqAfHi70PuxkFYIcIt8aIAxtRE7KVuKp8lSR8pA0J5iOQ== - dependencies: - "@octokit/core" "^5.0.0" - "@octokit/plugin-paginate-rest" "^9.0.0" - "@octokit/plugin-request-log" "^4.0.0" - "@octokit/plugin-rest-endpoint-methods" "^10.0.0" - -"@octokit/types@^12.0.0", "@octokit/types@^12.3.0", "@octokit/types@^12.4.0": - version "12.4.0" - resolved "https://registry.npmjs.org/@octokit/types/-/types-12.4.0.tgz" - integrity sha512-FLWs/AvZllw/AGVs+nJ+ELCDZZJk+kY0zMen118xhL2zD0s1etIUHm1odgjP7epxYU1ln7SZxEUWYop5bhsdgQ== - dependencies: - "@octokit/openapi-types" "^19.1.0" - -"@protobufjs/aspromise@^1.1.1", "@protobufjs/aspromise@^1.1.2": - version "1.1.2" - resolved "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz" - integrity sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ== - -"@protobufjs/base64@^1.1.2": - version "1.1.2" - resolved "https://registry.npmjs.org/@protobufjs/base64/-/base64-1.1.2.tgz" - integrity sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg== - -"@protobufjs/codegen@^2.0.4": - version "2.0.4" - resolved "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.4.tgz" - integrity sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg== - -"@protobufjs/eventemitter@^1.1.0": - version "1.1.0" - resolved "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz" - integrity sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q== - -"@protobufjs/fetch@^1.1.0": - version "1.1.0" - resolved "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz" - integrity sha512-lljVXpqXebpsijW71PZaCYeIcE5on1w5DlQy5WH6GLbFryLUrBD4932W/E2BSpfRJWseIL4v/KPgBFxDOIdKpQ== - dependencies: - "@protobufjs/aspromise" "^1.1.1" - "@protobufjs/inquire" "^1.1.0" - -"@protobufjs/float@^1.0.2": - version "1.0.2" - resolved "https://registry.npmjs.org/@protobufjs/float/-/float-1.0.2.tgz" - integrity sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ== - -"@protobufjs/inquire@^1.1.0": - version "1.1.0" - resolved "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.0.tgz" - integrity sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q== - -"@protobufjs/path@^1.1.2": - version "1.1.2" - resolved "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz" - integrity sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA== - -"@protobufjs/pool@^1.1.0": - version "1.1.0" - resolved "https://registry.npmjs.org/@protobufjs/pool/-/pool-1.1.0.tgz" - integrity sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw== - -"@protobufjs/utf8@^1.1.0": - version "1.1.0" - resolved "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz" - integrity sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw== - -"@sinclair/typebox@^0.27.8": - version "0.27.8" - resolved "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz" - integrity sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA== - -"@sinonjs/commons@^3.0.0": - version "3.0.1" - resolved "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.1.tgz" - integrity sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ== - dependencies: - type-detect "4.0.8" - -"@sinonjs/fake-timers@^10.0.2": - version "10.3.0" - resolved "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-10.3.0.tgz" - integrity sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA== - dependencies: - "@sinonjs/commons" "^3.0.0" - -"@socket.io/component-emitter@~3.1.0": - version "3.1.0" - resolved "https://registry.npmjs.org/@socket.io/component-emitter/-/component-emitter-3.1.0.tgz" - integrity sha512-+9jVqKhRSpsc591z5vX+X5Yyw+he/HCB4iQ/RYxw35CEPaY1gnsNE43nf9n9AaYjAQrTiI/mOwKUKdUs9vf7Xg== - -"@tootallnate/once@1": - version "1.1.2" - resolved "https://registry.npmjs.org/@tootallnate/once/-/once-1.1.2.tgz" - integrity sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw== - -"@types/babel__core@^7.1.14": - version "7.20.5" - resolved "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz" - integrity sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA== - dependencies: - "@babel/parser" "^7.20.7" - "@babel/types" "^7.20.7" - "@types/babel__generator" "*" - "@types/babel__template" "*" - "@types/babel__traverse" "*" - -"@types/babel__generator@*": - version "7.6.8" - resolved "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.8.tgz" - integrity sha512-ASsj+tpEDsEiFr1arWrlN6V3mdfjRMZt6LtK/Vp/kreFLnr5QH5+DhvD5nINYZXzwJvXeGq+05iUXcAzVrqWtw== - dependencies: - "@babel/types" "^7.0.0" - -"@types/babel__template@*": - version "7.4.4" - resolved "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.4.tgz" - integrity sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A== - dependencies: - "@babel/parser" "^7.1.0" - "@babel/types" "^7.0.0" - -"@types/babel__traverse@*", "@types/babel__traverse@^7.0.6": - version "7.20.5" - resolved "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.5.tgz" - integrity sha512-WXCyOcRtH37HAUkpXhUduaxdm82b4GSlyTqajXviN4EfiuPgNYR109xMCKvpl6zPIpua0DGlMEDCq+g8EdoheQ== - dependencies: - "@babel/types" "^7.20.7" - -"@types/command-line-args@5.2.0": - version "5.2.0" - resolved "https://registry.npmjs.org/@types/command-line-args/-/command-line-args-5.2.0.tgz" - integrity sha512-UuKzKpJJ/Ief6ufIaIzr3A/0XnluX7RvFgwkV89Yzvm77wCh1kFaFmqN8XEnGcN62EuHdedQjEMb8mYxFLGPyA== - -"@types/command-line-usage@5.0.2": - version "5.0.2" - resolved "https://registry.npmjs.org/@types/command-line-usage/-/command-line-usage-5.0.2.tgz" - integrity sha512-n7RlEEJ+4x4TS7ZQddTmNSxP+zziEG0TNsMfiRIxcIVXt71ENJ9ojeXmGO3wPoTdn7pJcU2xc3CJYMktNT6DPg== - -"@types/follow-redirects@^1.14.4": - version "1.14.4" - resolved "https://registry.npmjs.org/@types/follow-redirects/-/follow-redirects-1.14.4.tgz" - integrity sha512-GWXfsD0Jc1RWiFmMuMFCpXMzi9L7oPDVwxUnZdg89kDNnqsRfUKXEtUYtA98A6lig1WXH/CYY/fvPW9HuN5fTA== - dependencies: - "@types/node" "*" - -"@types/graceful-fs@^4.1.3": - version "4.1.9" - resolved "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.9.tgz" - integrity sha512-olP3sd1qOEe5dXTSaFvQG+02VdRXcdytWLAZsAq1PecU8uqQAhkrnbli7DagjtXKW/Bl7YJbUsa8MPcuc8LHEQ== - dependencies: - "@types/node" "*" - -"@types/handlebars@^4.1.0": - version "4.1.0" - resolved "https://registry.npmjs.org/@types/handlebars/-/handlebars-4.1.0.tgz" - integrity sha512-gq9YweFKNNB1uFK71eRqsd4niVkXrxHugqWFQkeLRJvGjnxsLr16bYtcsG4tOFwmYi0Bax+wCkbf1reUfdl4kA== - dependencies: - handlebars "*" - -"@types/istanbul-lib-coverage@*", "@types/istanbul-lib-coverage@^2.0.0", "@types/istanbul-lib-coverage@^2.0.1": - version "2.0.6" - resolved "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz" - integrity sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w== - -"@types/istanbul-lib-report@*": - version "3.0.3" - resolved "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.3.tgz" - integrity sha512-NQn7AHQnk/RSLOxrBbGyJM/aVQ+pjj5HCgasFxc0K/KhoATfQ/47AyUl15I2yBUpihjmas+a+VJBOqecrFH+uA== - dependencies: - "@types/istanbul-lib-coverage" "*" - -"@types/istanbul-reports@^3.0.0": - version "3.0.4" - resolved "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.4.tgz" - integrity sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ== - dependencies: - "@types/istanbul-lib-report" "*" - -"@types/jest@^29.5.11": - version "29.5.11" - resolved "https://registry.npmjs.org/@types/jest/-/jest-29.5.11.tgz" - integrity sha512-S2mHmYIVe13vrm6q4kN6fLYYAka15ALQki/vgDC3mIukEOx8WJlv0kQPM+d4w8Gp6u0uSdKND04IlTXBv0rwnQ== - dependencies: - expect "^29.0.0" - pretty-format "^29.0.0" - -"@types/jquery@^3.5.29": - version "3.5.29" - resolved "https://registry.npmjs.org/@types/jquery/-/jquery-3.5.29.tgz" - integrity sha512-oXQQC9X9MOPRrMhPHHOsXqeQDnWeCDT3PelUIg/Oy8FAbzSZtFHRjc7IpbfFVmpLtJ+UOoywpRsuO5Jxjybyeg== - dependencies: - "@types/sizzle" "*" - -"@types/json5@^0.0.29": - version "0.0.29" - resolved "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz" - integrity sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ== - -"@types/long@^4.0.1": - version "4.0.2" - resolved "https://registry.npmjs.org/@types/long/-/long-4.0.2.tgz" - integrity sha512-MqTGEo5bj5t157U6fA/BiDynNkn0YknVdh48CMPkTSpFTVmvao5UQmm7uEF6xBEo7qIMAlY/JSleYaE6VOdpaA== - -"@types/mustache@^4.2.5": - version "4.2.5" - resolved "https://registry.npmjs.org/@types/mustache/-/mustache-4.2.5.tgz" - integrity sha512-PLwiVvTBg59tGFL/8VpcGvqOu3L4OuveNvPi0EYbWchRdEVP++yRUXJPFl+CApKEq13017/4Nf7aQ5lTtHUNsA== - -"@types/node-fetch@^2.6.11", "@types/node-fetch@^2.6.4": - version "2.6.11" - resolved "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.6.11.tgz" - integrity sha512-24xFj9R5+rfQJLRyM56qh+wnVSYhyXC2tkoBndtY0U+vubqNsYXGjufB2nn8Q6gt0LrARwL6UBtMCSVCwl4B1g== - dependencies: - "@types/node" "*" - form-data "^4.0.0" - -"@types/node@*", "@types/node@>=13.7.0": - version "20.11.5" - resolved "https://registry.npmjs.org/@types/node/-/node-20.11.5.tgz" - integrity sha512-g557vgQjUUfN76MZAN/dt1z3dzcUsimuysco0KeluHgrPdJXkP/XdAURgyO2W9fZWHRtRBiVKzKn8vyOAwlG+w== - dependencies: - undici-types "~5.26.4" - -"@types/node@^18.11.18": - version "18.19.8" - resolved "https://registry.npmjs.org/@types/node/-/node-18.19.8.tgz" - integrity sha512-g1pZtPhsvGVTwmeVoexWZLTQaOvXwoSq//pTL0DHeNzUDrFnir4fgETdhjhIxjVnN+hKOuh98+E1eMLnUXstFg== - dependencies: - undici-types "~5.26.4" - -"@types/node@20.3.0": - version "20.3.0" - resolved "https://registry.npmjs.org/@types/node/-/node-20.3.0.tgz" - integrity sha512-cumHmIAf6On83X7yP+LrsEyUOf/YlociZelmpRYaGFydoaPdxdt80MAbu6vWerQT2COCp2nPvHdsbD7tHn/YlQ== - -"@types/pad-left@2.1.1": - version "2.1.1" - resolved "https://registry.npmjs.org/@types/pad-left/-/pad-left-2.1.1.tgz" - integrity sha512-Xd22WCRBydkGSApl5Bw0PhAOHKSVjNL3E3AwzKaps96IMraPqy5BvZIsBVK6JLwdybUzjHnuWVwpDd0JjTfHXA== - -"@types/sizzle@*": - version "2.3.8" - resolved "https://registry.npmjs.org/@types/sizzle/-/sizzle-2.3.8.tgz" - integrity sha512-0vWLNK2D5MT9dg0iOo8GlKguPAU02QjmZitPEsXRuJXU/OGIOt9vT9Fc26wtYuavLxtO45v9PGleoL9Z0k1LHg== - -"@types/stack-utils@^2.0.0": - version "2.0.3" - resolved "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.3.tgz" - integrity sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw== - -"@types/uuid@^9.0.7": - version "9.0.7" - resolved "https://registry.npmjs.org/@types/uuid/-/uuid-9.0.7.tgz" - integrity sha512-WUtIVRUZ9i5dYXefDEAI7sh9/O7jGvHg7Df/5O/gtH3Yabe5odI3UWopVR1qbPXQtvOxWu3mM4XxlYeZtMWF4g== - -"@types/yargs-parser@*": - version "21.0.3" - resolved "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.3.tgz" - integrity sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ== - -"@types/yargs@^17.0.8": - version "17.0.32" - resolved "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.32.tgz" - integrity sha512-xQ67Yc/laOG5uMfX/093MRlGGCIBzZMarVa+gfNKJxWAIgykYpVGkBdbqEzGDDfCrVUj6Hiff4mTZ5BA6TmAog== - dependencies: - "@types/yargs-parser" "*" - -"@ungap/structured-clone@^1.2.0": - version "1.2.0" - resolved "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz" - integrity sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ== - -"@xenova/transformers@^2.14.0": - version "2.14.0" - resolved "https://registry.npmjs.org/@xenova/transformers/-/transformers-2.14.0.tgz" - integrity sha512-rQ3O7SW5EM64b6XFZGx3XQ2cfiroefxUwU9ShfSpEZyhd082GvwNJJKndxgaukse1hZP1JUDoT0DfjDiq4IZiw== - dependencies: - "@huggingface/jinja" "^0.1.0" - onnxruntime-web "1.14.0" - sharp "^0.32.0" - optionalDependencies: - onnxruntime-node "1.14.0" - -"@yomguithereal/helpers@^1.1.1": - version "1.1.1" - resolved "https://registry.npmjs.org/@yomguithereal/helpers/-/helpers-1.1.1.tgz" - integrity sha512-UYvAq/XCA7xoh1juWDYsq3W0WywOB+pz8cgVnE1b45ZfdMhBvHDrgmSFG3jXeZSr2tMTYLGHFHON+ekG05Jebg== - -abbrev@1: - version "1.1.1" - resolved "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz" - integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q== - -abort-controller@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz" - integrity sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg== - dependencies: - event-target-shim "^5.0.0" - -acorn-jsx@^5.3.2: - version "5.3.2" - resolved "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz" - integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== - -"acorn@^6.0.0 || ^7.0.0 || ^8.0.0", acorn@^8.9.0: - version "8.11.3" - resolved "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz" - integrity sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg== - -adf-to-md@^1.1.0: - version "1.1.0" - resolved "https://registry.npmjs.org/adf-to-md/-/adf-to-md-1.1.0.tgz" - integrity sha512-iYY6SNkgnfeRq7/7Qazy9Lq00X6DJmnEwfTWFIpSGLJ929Q26Zo/lHN0AVa5yLQT6pXTtKIWvRgKur/xSibJ0g== - dependencies: - eslint-config-nodebb "0.1.1" - -agent-base@^6.0.2: - version "6.0.2" - resolved "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz" - integrity sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ== - dependencies: - debug "4" - -agent-base@^7.0.2, agent-base@^7.1.0: - version "7.1.0" - resolved "https://registry.npmjs.org/agent-base/-/agent-base-7.1.0.tgz" - integrity sha512-o/zjMZRhJxny7OyEF+Op8X+efiELC7k7yOjMzgfzVqOzXqkBkWI79YoTdOtsuWd5BWhAGAuOY/Xa6xpiaWXiNg== - dependencies: - debug "^4.3.4" - -agent-base@6: - version "6.0.2" - resolved "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz" - integrity sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ== - dependencies: - debug "4" - -agentkeepalive@^4.1.3, agentkeepalive@^4.2.1: - version "4.5.0" - resolved "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.5.0.tgz" - integrity sha512-5GG/5IbQQpC9FpkRGsSvZI5QYeSCzlJHdpBQntCsuTOxhKD8lqKhrleg2Yi7yvMIf82Ycmmqln9U8V9qwEiJew== - dependencies: - humanize-ms "^1.2.1" - -aggregate-error@^3.0.0: - version "3.1.0" - resolved "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz" - integrity sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA== - dependencies: - clean-stack "^2.0.0" - indent-string "^4.0.0" - -ajv@^6.12.4: - version "6.12.6" - resolved "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz" - integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== - dependencies: - fast-deep-equal "^3.1.1" - fast-json-stable-stringify "^2.0.0" - json-schema-traverse "^0.4.1" - uri-js "^4.2.2" - -ansi-escapes@^4.2.1: - version "4.3.2" - resolved "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz" - integrity sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ== - dependencies: - type-fest "^0.21.3" - -ansi-regex@^5.0.1: - version "5.0.1" - resolved "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz" - integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== - -ansi-styles@^3.2.1: - version "3.2.1" - resolved "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz" - integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== - dependencies: - color-convert "^1.9.0" - -ansi-styles@^4.0.0, ansi-styles@^4.1.0: - version "4.3.0" - resolved "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz" - integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== - dependencies: - color-convert "^2.0.1" - -ansi-styles@^5.0.0: - version "5.2.0" - resolved "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz" - integrity sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA== - -anymatch@^3.0.3: - version "3.1.3" - resolved "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz" - integrity sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw== - dependencies: - normalize-path "^3.0.0" - picomatch "^2.0.4" - -apache-arrow@^14.0.2: - version "14.0.2" - resolved "https://registry.npmjs.org/apache-arrow/-/apache-arrow-14.0.2.tgz" - integrity sha512-EBO2xJN36/XoY81nhLcwCJgFwkboDZeyNQ+OPsG7bCoQjc2BT0aTyH/MR6SrL+LirSNz+cYqjGRlupMMlP1aEg== - dependencies: - "@types/command-line-args" "5.2.0" - "@types/command-line-usage" "5.0.2" - "@types/node" "20.3.0" - "@types/pad-left" "2.1.1" - command-line-args "5.2.1" - command-line-usage "7.0.1" - flatbuffers "23.5.26" - json-bignum "^0.0.3" - pad-left "^2.1.0" - tslib "^2.5.3" - -"aproba@^1.0.3 || ^2.0.0": - version "2.0.0" - resolved "https://registry.npmjs.org/aproba/-/aproba-2.0.0.tgz" - integrity sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ== - -are-we-there-yet@^3.0.0: - version "3.0.1" - resolved "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-3.0.1.tgz" - integrity sha512-QZW4EDmGwlYur0Yyf/b2uGucHQMa8aFUP7eu9ddR73vvhFyt4V0Vl3QHPcTNJ8l6qYOBdxgXdnBXQrHilfRQBg== - dependencies: - delegates "^1.0.0" - readable-stream "^3.6.0" - -argparse@^1.0.7: - version "1.0.10" - resolved "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz" - integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== - dependencies: - sprintf-js "~1.0.2" - -argparse@^2.0.1: - version "2.0.1" - resolved "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz" - integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== - -array-back@^3.0.1, array-back@^3.1.0: - version "3.1.0" - resolved "https://registry.npmjs.org/array-back/-/array-back-3.1.0.tgz" - integrity sha512-TkuxA4UCOvxuDK6NZYXCalszEzj+TLszyASooky+i742l9TqsOdYCMJJupxRic61hwquNtppB3hgcuq9SVSH1Q== - -array-back@^6.2.2: - version "6.2.2" - resolved "https://registry.npmjs.org/array-back/-/array-back-6.2.2.tgz" - integrity sha512-gUAZ7HPyb4SJczXAMUXMGAvI976JoK3qEx9v1FTmeYuJj0IBiaKttG1ydtGKdkfqWkIkouke7nG8ufGy77+Cvw== - -array-buffer-byte-length@^1.0.1: - version "1.0.1" - resolved "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.1.tgz" - integrity sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg== - dependencies: - call-bind "^1.0.5" - is-array-buffer "^3.0.4" - -array-includes@^3.1.7: - version "3.1.7" - resolved "https://registry.npmjs.org/array-includes/-/array-includes-3.1.7.tgz" - integrity sha512-dlcsNBIiWhPkHdOEEKnehA+RNUWDc4UqFtnIXU4uuYDPtA4LDkr7qip2p0VvFAEXNDr0yWZ9PJyIRiGjRLQzwQ== - dependencies: - call-bind "^1.0.2" - define-properties "^1.2.0" - es-abstract "^1.22.1" - get-intrinsic "^1.2.1" - is-string "^1.0.7" - -array.prototype.filter@^1.0.3: - version "1.0.3" - resolved "https://registry.npmjs.org/array.prototype.filter/-/array.prototype.filter-1.0.3.tgz" - integrity sha512-VizNcj/RGJiUyQBgzwxzE5oHdeuXY5hSbbmKMlphj1cy1Vl7Pn2asCGbSrru6hSQjmCzqTBPVWAF/whmEOVHbw== - dependencies: - call-bind "^1.0.2" - define-properties "^1.2.0" - es-abstract "^1.22.1" - es-array-method-boxes-properly "^1.0.0" - is-string "^1.0.7" - -array.prototype.findlastindex@^1.2.3: - version "1.2.4" - resolved "https://registry.npmjs.org/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.4.tgz" - integrity sha512-hzvSHUshSpCflDR1QMUBLHGHP1VIEBegT4pix9H/Z92Xw3ySoy6c2qh7lJWTJnRJ8JCZ9bJNCgTyYaJGcJu6xQ== - dependencies: - call-bind "^1.0.5" - define-properties "^1.2.1" - es-abstract "^1.22.3" - es-errors "^1.3.0" - es-shim-unscopables "^1.0.2" - -array.prototype.flat@^1.3.2: - version "1.3.2" - resolved "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.2.tgz" - integrity sha512-djYB+Zx2vLewY8RWlNCUdHjDXs2XOgm602S9E7P/UpHgfeHL00cRiIF+IN/G/aUJ7kGPb6yO/ErDI5V2s8iycA== - dependencies: - call-bind "^1.0.2" - define-properties "^1.2.0" - es-abstract "^1.22.1" - es-shim-unscopables "^1.0.0" - -array.prototype.flatmap@^1.3.2: - version "1.3.2" - resolved "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.2.tgz" - integrity sha512-Ewyx0c9PmpcsByhSW4r+9zDU7sGjFc86qf/kKtuSCRdhfbk0SNLLkaT5qvcHnRGgc5NP/ly/y+qkXkqONX54CQ== - dependencies: - call-bind "^1.0.2" - define-properties "^1.2.0" - es-abstract "^1.22.1" - es-shim-unscopables "^1.0.0" - -arraybuffer.prototype.slice@^1.0.3: - version "1.0.3" - resolved "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.3.tgz" - integrity sha512-bMxMKAjg13EBSVscxTaYA4mRc5t1UAXa2kXiGTNfZ079HIWXEkKmkgFrh/nJqamaLSrXO5H4WFFkPEaLJWbs3A== - dependencies: - array-buffer-byte-length "^1.0.1" - call-bind "^1.0.5" - define-properties "^1.2.1" - es-abstract "^1.22.3" - es-errors "^1.2.1" - get-intrinsic "^1.2.3" - is-array-buffer "^3.0.4" - is-shared-array-buffer "^1.0.2" - -asynckit@^0.4.0: - version "0.4.0" - resolved "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz" - integrity sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q== - -available-typed-arrays@^1.0.6, available-typed-arrays@^1.0.7: - version "1.0.7" - resolved "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz" - integrity sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ== - dependencies: - possible-typed-array-names "^1.0.0" - -axios@^1.4.0, axios@^1.6.2, axios@^1.6.7: - version "1.6.7" - resolved "https://registry.npmjs.org/axios/-/axios-1.6.7.tgz" - integrity sha512-/hDJGff6/c7u0hDkvkGxR/oy6CbCs8ziCsC7SqmhjfozqiJGc8Z11wrv9z9lYfY4K8l+H9TpjcMDX0xOZmx+RA== - dependencies: - follow-redirects "^1.15.4" - form-data "^4.0.0" - proxy-from-env "^1.1.0" - -b4a@^1.6.4: - version "1.6.4" - resolved "https://registry.npmjs.org/b4a/-/b4a-1.6.4.tgz" - integrity sha512-fpWrvyVHEKyeEvbKZTVOeZF3VSKKWtJxFIxX/jaVPf+cLbGUSitjb49pHLqPV2BUNNZ0LcoeEGfE/YCpyDYHIw== - -babel-jest@^29.0.0, babel-jest@^29.7.0: - version "29.7.0" - resolved "https://registry.npmjs.org/babel-jest/-/babel-jest-29.7.0.tgz" - integrity sha512-BrvGY3xZSwEcCzKvKsCi2GgHqDqsYkOP4/by5xCgIwGXQxIEh+8ew3gmrE1y7XRR6LHZIj6yLYnUi/mm2KXKBg== - dependencies: - "@jest/transform" "^29.7.0" - "@types/babel__core" "^7.1.14" - babel-plugin-istanbul "^6.1.1" - babel-preset-jest "^29.6.3" - chalk "^4.0.0" - graceful-fs "^4.2.9" - slash "^3.0.0" - -babel-plugin-istanbul@^6.1.1: - version "6.1.1" - resolved "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz" - integrity sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - "@istanbuljs/load-nyc-config" "^1.0.0" - "@istanbuljs/schema" "^0.1.2" - istanbul-lib-instrument "^5.0.4" - test-exclude "^6.0.0" - -babel-plugin-jest-hoist@^29.6.3: - version "29.6.3" - resolved "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.6.3.tgz" - integrity sha512-ESAc/RJvGTFEzRwOTT4+lNDk/GNHMkKbNzsvT0qKRfDyyYTskxB5rnU2njIDYVxXCBHHEI1c0YwHob3WaYujOg== - dependencies: - "@babel/template" "^7.3.3" - "@babel/types" "^7.3.3" - "@types/babel__core" "^7.1.14" - "@types/babel__traverse" "^7.0.6" - -babel-preset-current-node-syntax@^1.0.0: - version "1.0.1" - resolved "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz" - integrity sha512-M7LQ0bxarkxQoN+vz5aJPsLBn77n8QgTFmo8WK0/44auK2xlCXrYcUxHFxgU7qW5Yzw/CjmLRK2uJzaCd7LvqQ== - dependencies: - "@babel/plugin-syntax-async-generators" "^7.8.4" - "@babel/plugin-syntax-bigint" "^7.8.3" - "@babel/plugin-syntax-class-properties" "^7.8.3" - "@babel/plugin-syntax-import-meta" "^7.8.3" - "@babel/plugin-syntax-json-strings" "^7.8.3" - "@babel/plugin-syntax-logical-assignment-operators" "^7.8.3" - "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.3" - "@babel/plugin-syntax-numeric-separator" "^7.8.3" - "@babel/plugin-syntax-object-rest-spread" "^7.8.3" - "@babel/plugin-syntax-optional-catch-binding" "^7.8.3" - "@babel/plugin-syntax-optional-chaining" "^7.8.3" - "@babel/plugin-syntax-top-level-await" "^7.8.3" - -babel-preset-jest@^29.6.3: - version "29.6.3" - resolved "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-29.6.3.tgz" - integrity sha512-0B3bhxR6snWXJZtR/RliHTDPRgn1sNHOR0yVtq/IiQFyuOVjFS+wuio/R4gSNkyYmKmJB4wGZv2NZanmKmTnNA== - dependencies: - babel-plugin-jest-hoist "^29.6.3" - babel-preset-current-node-syntax "^1.0.0" - -balanced-match@^1.0.0: - version "1.0.2" - resolved "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz" - integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== - -base-64@^0.1.0: - version "0.1.0" - resolved "https://registry.npmjs.org/base-64/-/base-64-0.1.0.tgz" - integrity sha512-Y5gU45svrR5tI2Vt/X9GPd3L0HNIKzGu202EjxrXMpuc2V2CiKgemAbUUsqYmZJvPtCXoUKjNZwBJzsNScUbXA== - -base64-js@^1.3.1, base64-js@^1.5.1: - version "1.5.1" - resolved "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz" - integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== - -before-after-hook@^2.2.0: - version "2.2.3" - resolved "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.3.tgz" - integrity sha512-NzUnlZexiaH/46WDhANlyR2bXRopNg4F/zuSA3OpZnllCUgRaOF2znDioDWrmbNVsuZk6l9pMquQB38cfBZwkQ== - -bindings@^1.5.0: - version "1.5.0" - resolved "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz" - integrity sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ== - dependencies: - file-uri-to-path "1.0.0" - -bl@^4.0.3: - version "4.1.0" - resolved "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz" - integrity sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w== - dependencies: - buffer "^5.5.0" - inherits "^2.0.4" - readable-stream "^3.4.0" - -boolbase@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz" - integrity sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww== - -brace-expansion@^1.1.7: - version "1.1.11" - resolved "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz" - integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== - dependencies: - balanced-match "^1.0.0" - concat-map "0.0.1" - -braces@^3.0.2: - version "3.0.2" - resolved "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz" - integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== - dependencies: - fill-range "^7.0.1" - -browserslist@^4.22.2, "browserslist@>= 4.21.0": - version "4.22.2" - resolved "https://registry.npmjs.org/browserslist/-/browserslist-4.22.2.tgz" - integrity sha512-0UgcrvQmBDvZHFGdYUehrCNIazki7/lUP3kkoi/r3YB2amZbFM9J43ZRkJTXBUZK4gmx56+Sqk9+Vs9mwZx9+A== - dependencies: - caniuse-lite "^1.0.30001565" - electron-to-chromium "^1.4.601" - node-releases "^2.0.14" - update-browserslist-db "^1.0.13" - -bs-logger@0.x: - version "0.2.6" - resolved "https://registry.npmjs.org/bs-logger/-/bs-logger-0.2.6.tgz" - integrity sha512-pd8DCoxmbgc7hyPKOvxtqNcjYoOsABPQdcCUjGp3d42VR2CX1ORhk2A87oqqu5R1kk+76nsxZupkmyd+MVtCog== - dependencies: - fast-json-stable-stringify "2.x" - -bser@2.1.1: - version "2.1.1" - resolved "https://registry.npmjs.org/bser/-/bser-2.1.1.tgz" - integrity sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ== - dependencies: - node-int64 "^0.4.0" - -buffer-from@^1.0.0: - version "1.1.2" - resolved "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz" - integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== - -buffer-writer@2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/buffer-writer/-/buffer-writer-2.0.0.tgz" - integrity sha512-a7ZpuTZU1TRtnwyCNW3I5dc0wWNC3VR9S++Ewyk2HHZdrO3CQJqSpd+95Us590V6AL7JqUAH2IwZ/398PmNFgw== - -buffer@^5.5.0: - version "5.7.1" - resolved "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz" - integrity sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ== - dependencies: - base64-js "^1.3.1" - ieee754 "^1.1.13" - -buffer@^6.0.3: - version "6.0.3" - resolved "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz" - integrity sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA== - dependencies: - base64-js "^1.3.1" - ieee754 "^1.2.1" - -cacache@^15.2.0: - version "15.3.0" - resolved "https://registry.npmjs.org/cacache/-/cacache-15.3.0.tgz" - integrity sha512-VVdYzXEn+cnbXpFgWs5hTT7OScegHVmLhJIR8Ufqk3iFD6A6j5iSX1KuBTfNEv4tdJWE2PzA6IVFtcLC7fN9wQ== - dependencies: - "@npmcli/fs" "^1.0.0" - "@npmcli/move-file" "^1.0.1" - chownr "^2.0.0" - fs-minipass "^2.0.0" - glob "^7.1.4" - infer-owner "^1.0.4" - lru-cache "^6.0.0" - minipass "^3.1.1" - minipass-collect "^1.0.2" - minipass-flush "^1.0.5" - minipass-pipeline "^1.2.2" - mkdirp "^1.0.3" - p-map "^4.0.0" - promise-inflight "^1.0.1" - rimraf "^3.0.2" - ssri "^8.0.1" - tar "^6.0.2" - unique-filename "^1.1.1" - -call-bind@^1.0.2, call-bind@^1.0.5, call-bind@^1.0.6, call-bind@^1.0.7: - version "1.0.7" - resolved "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz" - integrity sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w== - dependencies: - es-define-property "^1.0.0" - es-errors "^1.3.0" - function-bind "^1.1.2" - get-intrinsic "^1.2.4" - set-function-length "^1.2.1" - -callsites@^3.0.0: - version "3.1.0" - resolved "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz" - integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== - -camelcase@^5.3.1: - version "5.3.1" - resolved "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz" - integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== - -camelcase@^6.2.0: - version "6.3.0" - resolved "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz" - integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== - -caniuse-lite@^1.0.30001565: - version "1.0.30001579" - resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001579.tgz" - integrity sha512-u5AUVkixruKHJjw/pj9wISlcMpgFWzSrczLZbrqBSxukQixmg0SJ5sZTpvaFvxU0HoQKd4yoyAogyrAz9pzJnA== - -chalk-template@^0.4.0: - version "0.4.0" - resolved "https://registry.npmjs.org/chalk-template/-/chalk-template-0.4.0.tgz" - integrity sha512-/ghrgmhfY8RaSdeo43hNXxpoHAtxdbskUHjPpfqUWGttFgycUhYPGx3YZBCnUCvOa7Doivn1IZec3DEGFoMgLg== - dependencies: - chalk "^4.1.2" - -chalk@^2.4.2: - version "2.4.2" - resolved "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz" - integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== - dependencies: - ansi-styles "^3.2.1" - escape-string-regexp "^1.0.5" - supports-color "^5.3.0" - -chalk@^4.0.0, chalk@^4.1.2: - version "4.1.2" - resolved "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz" - integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== - dependencies: - ansi-styles "^4.1.0" - supports-color "^7.1.0" - -char-regex@^1.0.2: - version "1.0.2" - resolved "https://registry.npmjs.org/char-regex/-/char-regex-1.0.2.tgz" - integrity sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw== - -charenc@0.0.2: - version "0.0.2" - resolved "https://registry.npmjs.org/charenc/-/charenc-0.0.2.tgz" - integrity sha512-yrLQ/yVUFXkzg7EDQsPieE/53+0RlaWTs+wBrvW36cyilJ2SaDWfl4Yj7MtLTXleV9uEKefbAGUPv2/iWSooRA== - -cheerio-select@^2.1.0: - version "2.1.0" - resolved "https://registry.npmjs.org/cheerio-select/-/cheerio-select-2.1.0.tgz" - integrity sha512-9v9kG0LvzrlcungtnJtpGNxY+fzECQKhK4EGJX2vByejiMX84MFNQw4UxPJl3bFbTMw+Dfs37XaIkCwTZfLh4g== - dependencies: - boolbase "^1.0.0" - css-select "^5.1.0" - css-what "^6.1.0" - domelementtype "^2.3.0" - domhandler "^5.0.3" - domutils "^3.0.1" - -cheerio@^1.0.0-rc.12: - version "1.0.0-rc.12" - resolved "https://registry.npmjs.org/cheerio/-/cheerio-1.0.0-rc.12.tgz" - integrity sha512-VqR8m68vM46BNnuZ5NtnGBKIE/DfN0cRIzg9n40EIq9NOv90ayxLBXA8fXC5gquFRGJSTRqBq25Jt2ECLR431Q== - dependencies: - cheerio-select "^2.1.0" - dom-serializer "^2.0.0" - domhandler "^5.0.3" - domutils "^3.0.1" - htmlparser2 "^8.0.1" - parse5 "^7.0.0" - parse5-htmlparser2-tree-adapter "^7.0.0" - -chownr@^1.1.1: - version "1.1.4" - resolved "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz" - integrity sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg== - -chownr@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz" - integrity sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ== - -ci-info@^3.2.0: - version "3.9.0" - resolved "https://registry.npmjs.org/ci-info/-/ci-info-3.9.0.tgz" - integrity sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ== - -cjs-module-lexer@^1.0.0: - version "1.2.3" - resolved "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.2.3.tgz" - integrity sha512-0TNiGstbQmCFwt4akjjBg5pLRTSyj/PkWQ1ZoO2zntmg9yLqSRxwEa4iCfQLGjqhiqBfOJa7W/E8wfGrTDmlZQ== - -clean-stack@^2.0.0: - version "2.2.0" - resolved "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz" - integrity sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A== - -cliui@^8.0.1: - version "8.0.1" - resolved "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz" - integrity sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ== - dependencies: - string-width "^4.2.0" - strip-ansi "^6.0.1" - wrap-ansi "^7.0.0" - -co@^4.6.0: - version "4.6.0" - resolved "https://registry.npmjs.org/co/-/co-4.6.0.tgz" - integrity sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ== - -collect-v8-coverage@^1.0.0: - version "1.0.2" - resolved "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.2.tgz" - integrity sha512-lHl4d5/ONEbLlJvaJNtsF/Lz+WvB07u2ycqTYbdrq7UypDXailES4valYb2eWiJFxZlVmpGekfqoxQhzyFdT4Q== - -color-convert@^1.9.0: - version "1.9.3" - resolved "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz" - integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== - dependencies: - color-name "1.1.3" - -color-convert@^2.0.1: - version "2.0.1" - resolved "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz" - integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== - dependencies: - color-name "~1.1.4" - -color-name@^1.0.0, color-name@~1.1.4: - version "1.1.4" - resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz" - integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== - -color-name@1.1.3: - version "1.1.3" - resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz" - integrity sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw== - -color-string@^1.9.0: - version "1.9.1" - resolved "https://registry.npmjs.org/color-string/-/color-string-1.9.1.tgz" - integrity sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg== - dependencies: - color-name "^1.0.0" - simple-swizzle "^0.2.2" - -color-support@^1.1.3: - version "1.1.3" - resolved "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz" - integrity sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg== - -color@^4.2.3: - version "4.2.3" - resolved "https://registry.npmjs.org/color/-/color-4.2.3.tgz" - integrity sha512-1rXeuUUiGGrykh+CeBdu5Ie7OJwinCgQY0bc7GCRxy5xVHy+moaqkpL/jqQq0MtQOeYcrqEz4abc5f0KtU7W4A== - dependencies: - color-convert "^2.0.1" - color-string "^1.9.0" - -combined-stream@^1.0.8: - version "1.0.8" - resolved "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz" - integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== - dependencies: - delayed-stream "~1.0.0" - -command-line-args@^5.2.1, command-line-args@5.2.1: - version "5.2.1" - resolved "https://registry.npmjs.org/command-line-args/-/command-line-args-5.2.1.tgz" - integrity sha512-H4UfQhZyakIjC74I9d34fGYDwk3XpSr17QhEd0Q3I9Xq1CETHo4Hcuo87WyWHpAF1aSLjLRf5lD9ZGX2qStUvg== - dependencies: - array-back "^3.1.0" - find-replace "^3.0.0" - lodash.camelcase "^4.3.0" - typical "^4.0.0" - -command-line-usage@^7.0.0, command-line-usage@7.0.1: - version "7.0.1" - resolved "https://registry.npmjs.org/command-line-usage/-/command-line-usage-7.0.1.tgz" - integrity sha512-NCyznE//MuTjwi3y84QVUGEOT+P5oto1e1Pk/jFPVdPPfsG03qpTIl3yw6etR+v73d0lXsoojRpvbru2sqePxQ== - dependencies: - array-back "^6.2.2" - chalk-template "^0.4.0" - table-layout "^3.0.0" - typical "^7.1.1" - -commander@^12.0.0: - version "12.0.0" - resolved "https://registry.npmjs.org/commander/-/commander-12.0.0.tgz" - integrity sha512-MwVNWlYjDTtOjX5PiD7o5pK0UrFU/OYgcJfjjK4RaHZETNtjJqrZa9Y9ds88+A+f+d5lv+561eZ+yCKoS3gbAA== - -concat-map@0.0.1: - version "0.0.1" - resolved "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz" - integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== - -confusing-browser-globals@^1.0.10: - version "1.0.11" - resolved "https://registry.npmjs.org/confusing-browser-globals/-/confusing-browser-globals-1.0.11.tgz" - integrity sha512-JsPKdmh8ZkmnHxDk55FZ1TqVLvEQTvoByJZRN9jzI0UjxK/QgAmsphz7PGtqgPieQZ/CQcHWXCR7ATDNhGe+YA== - -console-control-strings@^1.1.0: - version "1.1.0" - resolved "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz" - integrity sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ== - -convert-source-map@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz" - integrity sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg== - -create-jest@^29.7.0: - version "29.7.0" - resolved "https://registry.npmjs.org/create-jest/-/create-jest-29.7.0.tgz" - integrity sha512-Adz2bdH0Vq3F53KEMJOoftQFutWCukm6J24wbPWRO4k1kMY7gS7ds/uoJkNuV8wDCtWWnuwGcJwpWcih+zEW1Q== - dependencies: - "@jest/types" "^29.6.3" - chalk "^4.0.0" - exit "^0.1.2" - graceful-fs "^4.2.9" - jest-config "^29.7.0" - jest-util "^29.7.0" - prompts "^2.0.1" - -cross-spawn@^7.0.2, cross-spawn@^7.0.3: - version "7.0.3" - resolved "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz" - integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== - dependencies: - path-key "^3.1.0" - shebang-command "^2.0.0" - which "^2.0.1" - -crypt@0.0.2: - version "0.0.2" - resolved "https://registry.npmjs.org/crypt/-/crypt-0.0.2.tgz" - integrity sha512-mCxBlsHFYh9C+HVpiEacem8FEBnMXgU9gy4zmNC+SXAZNB/1idgp/aulFJ4FgCi7GPEVbfyng092GqL2k2rmow== - -css-select@^5.1.0: - version "5.1.0" - resolved "https://registry.npmjs.org/css-select/-/css-select-5.1.0.tgz" - integrity sha512-nwoRF1rvRRnnCqqY7updORDsuqKzqYJ28+oSMaJMMgOauh3fvwHqMS7EZpIPqK8GL+g9mKxF1vP/ZjSeNjEVHg== - dependencies: - boolbase "^1.0.0" - css-what "^6.1.0" - domhandler "^5.0.2" - domutils "^3.0.1" - nth-check "^2.0.1" - -css-what@^6.1.0: - version "6.1.0" - resolved "https://registry.npmjs.org/css-what/-/css-what-6.1.0.tgz" - integrity sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw== - -data-uri-to-buffer@^4.0.0: - version "4.0.1" - resolved "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz" - integrity sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A== - -dbinfoz@^0.1.4: - version "0.1.4" - resolved "https://registry.npmjs.org/dbinfoz/-/dbinfoz-0.1.4.tgz" - integrity sha512-MB56+xS571ip7qoXqxdnOUtXebbWaqoZN+S++W51SQYJRSjQFGEIPucNmxgeQlBGJ1vM4mQNV47wzV6fcrezZg== - dependencies: - mysql2 "^3.9.1" - pg "^8.11.3" - sqlite3 "^5.1.7" - -debug@^3.2.7: - version "3.2.7" - resolved "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz" - integrity sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ== - dependencies: - ms "^2.1.1" - -debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.3, debug@^4.3.4, debug@~4.3.1, debug@~4.3.2, debug@4: - version "4.3.4" - resolved "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz" - integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== - dependencies: - ms "2.1.2" - -decompress-response@^6.0.0: - version "6.0.0" - resolved "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz" - integrity sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ== - dependencies: - mimic-response "^3.1.0" - -dedent@^1.0.0: - version "1.5.1" - resolved "https://registry.npmjs.org/dedent/-/dedent-1.5.1.tgz" - integrity sha512-+LxW+KLWxu3HW3M2w2ympwtqPrqYRzU8fqi6Fhd18fBALe15blJPI/I4+UHveMVG6lJqB4JNd4UG0S5cnVHwIg== - -deep-extend@^0.6.0: - version "0.6.0" - resolved "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz" - integrity sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA== - -deep-is@^0.1.3: - version "0.1.4" - resolved "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz" - integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ== - -deepmerge@^4.2.2: - version "4.3.1" - resolved "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz" - integrity sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A== - -define-data-property@^1.0.1, define-data-property@^1.1.2, define-data-property@^1.1.4: - version "1.1.4" - resolved "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz" - integrity sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A== - dependencies: - es-define-property "^1.0.0" - es-errors "^1.3.0" - gopd "^1.0.1" - -define-properties@^1.1.3, define-properties@^1.2.0, define-properties@^1.2.1: - version "1.2.1" - resolved "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz" - integrity sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg== - dependencies: - define-data-property "^1.0.1" - has-property-descriptors "^1.0.0" - object-keys "^1.1.1" - -delayed-stream@~1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz" - integrity sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ== - -delegates@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz" - integrity sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ== - -denque@^2.1.0: - version "2.1.0" - resolved "https://registry.npmjs.org/denque/-/denque-2.1.0.tgz" - integrity sha512-HVQE3AAb/pxF8fQAoiqpvg9i3evqug3hoiwakOyZAwJm+6vZehbkYXZ0l4JxS+I3QxM97v5aaRNhj8v5oBhekw== - -deprecation@^2.0.0: - version "2.3.1" - resolved "https://registry.npmjs.org/deprecation/-/deprecation-2.3.1.tgz" - integrity sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ== - -detect-libc@^2.0.0, detect-libc@^2.0.2: - version "2.0.2" - resolved "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.2.tgz" - integrity sha512-UX6sGumvvqSaXgdKGUsgZWqcUyIXZ/vZTrlRT/iobiKhGL0zL4d3osHj3uqllWJK+i+sixDS/3COVEOFbupFyw== - -detect-newline@^3.0.0: - version "3.1.0" - resolved "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz" - integrity sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA== - -diff-sequences@^29.6.3: - version "29.6.3" - resolved "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.6.3.tgz" - integrity sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q== - -digest-fetch@^1.3.0: - version "1.3.0" - resolved "https://registry.npmjs.org/digest-fetch/-/digest-fetch-1.3.0.tgz" - integrity sha512-CGJuv6iKNM7QyZlM2T3sPAdZWd/p9zQiRNS9G+9COUCwzWFTs0Xp8NF5iePx7wtvhDykReiRRrSeNb4oMmB8lA== - dependencies: - base-64 "^0.1.0" - md5 "^2.3.0" - -doctrine@^2.1.0: - version "2.1.0" - resolved "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz" - integrity sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw== - dependencies: - esutils "^2.0.2" - -doctrine@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz" - integrity sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w== - dependencies: - esutils "^2.0.2" - -dom-serializer@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/dom-serializer/-/dom-serializer-2.0.0.tgz" - integrity sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg== - dependencies: - domelementtype "^2.3.0" - domhandler "^5.0.2" - entities "^4.2.0" - -domelementtype@^2.3.0: - version "2.3.0" - resolved "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz" - integrity sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw== - -domhandler@^5.0.2, domhandler@^5.0.3: - version "5.0.3" - resolved "https://registry.npmjs.org/domhandler/-/domhandler-5.0.3.tgz" - integrity sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w== - dependencies: - domelementtype "^2.3.0" - -domutils@^3.0.1: - version "3.1.0" - resolved "https://registry.npmjs.org/domutils/-/domutils-3.1.0.tgz" - integrity sha512-H78uMmQtI2AhgDJjWeQmHwJJ2bLPD3GMmO7Zja/ZZh84wkm+4ut+IUnUdRa8uCGX88DiVx1j6FRe1XfxEgjEZA== - dependencies: - dom-serializer "^2.0.0" - domelementtype "^2.3.0" - domhandler "^5.0.3" - -dotenv@^16.3.1: - version "16.3.2" - resolved "https://registry.npmjs.org/dotenv/-/dotenv-16.3.2.tgz" - integrity sha512-HTlk5nmhkm8F6JcdXvHIzaorzCoziNQT9mGxLPVXW8wJF1TiGSL60ZGB4gHWabHOaMmWmhvk2/lPHfnBiT78AQ== - -electron-to-chromium@^1.4.601: - version "1.4.640" - resolved "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.640.tgz" - integrity sha512-z/6oZ/Muqk4BaE7P69bXhUhpJbUM9ZJeka43ZwxsDshKtePns4mhBlh8bU5+yrnOnz3fhG82XLzGUXazOmsWnA== - -emittery@^0.13.1: - version "0.13.1" - resolved "https://registry.npmjs.org/emittery/-/emittery-0.13.1.tgz" - integrity sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ== - -emoji-regex@^8.0.0: - version "8.0.0" - resolved "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz" - integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== - -encoding@^0.1.0, encoding@^0.1.12: - version "0.1.13" - resolved "https://registry.npmjs.org/encoding/-/encoding-0.1.13.tgz" - integrity sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A== - dependencies: - iconv-lite "^0.6.2" - -end-of-stream@^1.1.0, end-of-stream@^1.4.1: - version "1.4.4" - resolved "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz" - integrity sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q== - dependencies: - once "^1.4.0" - -engine.io-client@~6.5.2: - version "6.5.3" - resolved "https://registry.npmjs.org/engine.io-client/-/engine.io-client-6.5.3.tgz" - integrity sha512-9Z0qLB0NIisTRt1DZ/8U2k12RJn8yls/nXMZLn+/N8hANT3TcYjKFKcwbw5zFQiN4NTde3TSY9zb79e1ij6j9Q== - dependencies: - "@socket.io/component-emitter" "~3.1.0" - debug "~4.3.1" - engine.io-parser "~5.2.1" - ws "~8.11.0" - xmlhttprequest-ssl "~2.0.0" - -engine.io-parser@~5.2.1: - version "5.2.1" - resolved "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-5.2.1.tgz" - integrity sha512-9JktcM3u18nU9N2Lz3bWeBgxVgOKpw7yhRaoxQA3FUDZzzw+9WlA6p4G4u0RixNkg14fH7EfEc/RhpurtiROTQ== - -entities@^4.2.0, entities@^4.4.0: - version "4.5.0" - resolved "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz" - integrity sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw== - -env-paths@^2.2.0: - version "2.2.1" - resolved "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz" - integrity sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A== - -err-code@^2.0.2: - version "2.0.3" - resolved "https://registry.npmjs.org/err-code/-/err-code-2.0.3.tgz" - integrity sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA== - -error-ex@^1.3.1: - version "1.3.2" - resolved "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz" - integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g== - dependencies: - is-arrayish "^0.2.1" - -es-abstract@^1.22.1, es-abstract@^1.22.3: - version "1.22.4" - resolved "https://registry.npmjs.org/es-abstract/-/es-abstract-1.22.4.tgz" - integrity sha512-vZYJlk2u6qHYxBOTjAeg7qUxHdNfih64Uu2J8QqWgXZ2cri0ZpJAkzDUK/q593+mvKwlxyaxr6F1Q+3LKoQRgg== - dependencies: - array-buffer-byte-length "^1.0.1" - arraybuffer.prototype.slice "^1.0.3" - available-typed-arrays "^1.0.6" - call-bind "^1.0.7" - es-define-property "^1.0.0" - es-errors "^1.3.0" - es-set-tostringtag "^2.0.2" - es-to-primitive "^1.2.1" - function.prototype.name "^1.1.6" - get-intrinsic "^1.2.4" - get-symbol-description "^1.0.2" - globalthis "^1.0.3" - gopd "^1.0.1" - has-property-descriptors "^1.0.2" - has-proto "^1.0.1" - has-symbols "^1.0.3" - hasown "^2.0.1" - internal-slot "^1.0.7" - is-array-buffer "^3.0.4" - is-callable "^1.2.7" - is-negative-zero "^2.0.2" - is-regex "^1.1.4" - is-shared-array-buffer "^1.0.2" - is-string "^1.0.7" - is-typed-array "^1.1.13" - is-weakref "^1.0.2" - object-inspect "^1.13.1" - object-keys "^1.1.1" - object.assign "^4.1.5" - regexp.prototype.flags "^1.5.2" - safe-array-concat "^1.1.0" - safe-regex-test "^1.0.3" - string.prototype.trim "^1.2.8" - string.prototype.trimend "^1.0.7" - string.prototype.trimstart "^1.0.7" - typed-array-buffer "^1.0.1" - typed-array-byte-length "^1.0.0" - typed-array-byte-offset "^1.0.0" - typed-array-length "^1.0.4" - unbox-primitive "^1.0.2" - which-typed-array "^1.1.14" - -es-array-method-boxes-properly@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/es-array-method-boxes-properly/-/es-array-method-boxes-properly-1.0.0.tgz" - integrity sha512-wd6JXUmyHmt8T5a2xreUwKcGPq6f1f+WwIJkijUqiGcJz1qqnZgP6XIK+QyIWU5lT7imeNxUll48bziG+TSYcA== - -es-define-property@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz" - integrity sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ== - dependencies: - get-intrinsic "^1.2.4" - -es-errors@^1.0.0, es-errors@^1.2.1, es-errors@^1.3.0: - version "1.3.0" - resolved "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz" - integrity sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw== - -es-set-tostringtag@^2.0.2: - version "2.0.3" - resolved "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.3.tgz" - integrity sha512-3T8uNMC3OQTHkFUsFq8r/BwAXLHvU/9O9mE0fBc/MY5iq/8H7ncvO947LmYA6ldWw9Uh8Yhf25zu6n7nML5QWQ== - dependencies: - get-intrinsic "^1.2.4" - has-tostringtag "^1.0.2" - hasown "^2.0.1" - -es-shim-unscopables@^1.0.0, es-shim-unscopables@^1.0.2: - version "1.0.2" - resolved "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.2.tgz" - integrity sha512-J3yBRXCzDu4ULnQwxyToo/OjdMx6akgVC7K6few0a7F/0wLtmKKN7I73AH5T2836UuXRqN7Qg+IIUw/+YJksRw== - dependencies: - hasown "^2.0.0" - -es-to-primitive@^1.2.1: - version "1.2.1" - resolved "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz" - integrity sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA== - dependencies: - is-callable "^1.1.4" - is-date-object "^1.0.1" - is-symbol "^1.0.2" - -esbuild@^0.19.11: - version "0.19.11" - resolved "https://registry.npmjs.org/esbuild/-/esbuild-0.19.11.tgz" - integrity sha512-HJ96Hev2hX/6i5cDVwcqiJBBtuo9+FeIJOtZ9W1kA5M6AMJRHUZlpYZ1/SbEwtO0ioNAW8rUooVpC/WehY2SfA== - optionalDependencies: - "@esbuild/aix-ppc64" "0.19.11" - "@esbuild/android-arm" "0.19.11" - "@esbuild/android-arm64" "0.19.11" - "@esbuild/android-x64" "0.19.11" - "@esbuild/darwin-arm64" "0.19.11" - "@esbuild/darwin-x64" "0.19.11" - "@esbuild/freebsd-arm64" "0.19.11" - "@esbuild/freebsd-x64" "0.19.11" - "@esbuild/linux-arm" "0.19.11" - "@esbuild/linux-arm64" "0.19.11" - "@esbuild/linux-ia32" "0.19.11" - "@esbuild/linux-loong64" "0.19.11" - "@esbuild/linux-mips64el" "0.19.11" - "@esbuild/linux-ppc64" "0.19.11" - "@esbuild/linux-riscv64" "0.19.11" - "@esbuild/linux-s390x" "0.19.11" - "@esbuild/linux-x64" "0.19.11" - "@esbuild/netbsd-x64" "0.19.11" - "@esbuild/openbsd-x64" "0.19.11" - "@esbuild/sunos-x64" "0.19.11" - "@esbuild/win32-arm64" "0.19.11" - "@esbuild/win32-ia32" "0.19.11" - "@esbuild/win32-x64" "0.19.11" - -escalade@^3.1.1: - version "3.1.1" - resolved "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz" - integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== - -escape-string-regexp@^1.0.5: - version "1.0.5" - resolved "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz" - integrity sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg== - -escape-string-regexp@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz" - integrity sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w== - -escape-string-regexp@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz" - integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== - -eslint-config-airbnb-base@15.0.0: - version "15.0.0" - resolved "https://registry.npmjs.org/eslint-config-airbnb-base/-/eslint-config-airbnb-base-15.0.0.tgz" - integrity sha512-xaX3z4ZZIcFLvh2oUNvcX5oEofXda7giYmuplVxoOg5A7EXJMrUyqRgR+mhDhPK8LZ4PttFOBvCYDbX3sUoUig== - dependencies: - confusing-browser-globals "^1.0.10" - object.assign "^4.1.2" - object.entries "^1.1.5" - semver "^6.3.0" - -eslint-config-nodebb@0.1.1: - version "0.1.1" - resolved "https://registry.npmjs.org/eslint-config-nodebb/-/eslint-config-nodebb-0.1.1.tgz" - integrity sha512-+LSX8iYe10fKb6k4JuyMygce7GQMSMsttdgi+BO+v+P3tXXxH//OUnEfZ2cbTungZap9Z8NuK6Tog1wrRQo6CQ== - dependencies: - eslint-config-airbnb-base "15.0.0" - -eslint-import-resolver-node@^0.3.9: - version "0.3.9" - resolved "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.9.tgz" - integrity sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g== - dependencies: - debug "^3.2.7" - is-core-module "^2.13.0" - resolve "^1.22.4" - -eslint-module-utils@^2.8.0: - version "2.8.0" - resolved "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.8.0.tgz" - integrity sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw== - dependencies: - debug "^3.2.7" - -eslint-plugin-import@^2.25.2, eslint-plugin-import@2.x: - version "2.29.1" - resolved "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.29.1.tgz" - integrity sha512-BbPC0cuExzhiMo4Ff1BTVwHpjjv28C5R+btTOGaCRC7UEz801up0JadwkeSk5Ued6TG34uaczuVuH6qyy5YUxw== - dependencies: - array-includes "^3.1.7" - array.prototype.findlastindex "^1.2.3" - array.prototype.flat "^1.3.2" - array.prototype.flatmap "^1.3.2" - debug "^3.2.7" - doctrine "^2.1.0" - eslint-import-resolver-node "^0.3.9" - eslint-module-utils "^2.8.0" - hasown "^2.0.0" - is-core-module "^2.13.1" - is-glob "^4.0.3" - minimatch "^3.1.2" - object.fromentries "^2.0.7" - object.groupby "^1.0.1" - object.values "^1.1.7" - semver "^6.3.1" - tsconfig-paths "^3.15.0" - -eslint-scope@^7.2.2: - version "7.2.2" - resolved "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz" - integrity sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg== - dependencies: - esrecurse "^4.3.0" - estraverse "^5.2.0" - -eslint-visitor-keys@^3.3.0, eslint-visitor-keys@^3.4.1, eslint-visitor-keys@^3.4.3: - version "3.4.3" - resolved "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz" - integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag== - -"eslint@^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8", "eslint@^6.0.0 || ^7.0.0 || >=8.0.0", "eslint@^7.32.0 || ^8.2.0", "eslint@7.x || 8.x": - version "8.56.0" - resolved "https://registry.npmjs.org/eslint/-/eslint-8.56.0.tgz" - integrity sha512-Go19xM6T9puCOWntie1/P997aXxFsOi37JIHRWI514Hc6ZnaHGKY9xFhrU65RT6CcBEzZoGG1e6Nq+DT04ZtZQ== - dependencies: - "@eslint-community/eslint-utils" "^4.2.0" - "@eslint-community/regexpp" "^4.6.1" - "@eslint/eslintrc" "^2.1.4" - "@eslint/js" "8.56.0" - "@humanwhocodes/config-array" "^0.11.13" - "@humanwhocodes/module-importer" "^1.0.1" - "@nodelib/fs.walk" "^1.2.8" - "@ungap/structured-clone" "^1.2.0" - ajv "^6.12.4" - chalk "^4.0.0" - cross-spawn "^7.0.2" - debug "^4.3.2" - doctrine "^3.0.0" - escape-string-regexp "^4.0.0" - eslint-scope "^7.2.2" - eslint-visitor-keys "^3.4.3" - espree "^9.6.1" - esquery "^1.4.2" - esutils "^2.0.2" - fast-deep-equal "^3.1.3" - file-entry-cache "^6.0.1" - find-up "^5.0.0" - glob-parent "^6.0.2" - globals "^13.19.0" - graphemer "^1.4.0" - ignore "^5.2.0" - imurmurhash "^0.1.4" - is-glob "^4.0.0" - is-path-inside "^3.0.3" - js-yaml "^4.1.0" - json-stable-stringify-without-jsonify "^1.0.1" - levn "^0.4.1" - lodash.merge "^4.6.2" - minimatch "^3.1.2" - natural-compare "^1.4.0" - optionator "^0.9.3" - strip-ansi "^6.0.1" - text-table "^0.2.0" - -espree@^9.6.0, espree@^9.6.1: - version "9.6.1" - resolved "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz" - integrity sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ== - dependencies: - acorn "^8.9.0" - acorn-jsx "^5.3.2" - eslint-visitor-keys "^3.4.1" - -esprima@^4.0.0: - version "4.0.1" - resolved "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz" - integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== - -esquery@^1.4.2: - version "1.5.0" - resolved "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz" - integrity sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg== - dependencies: - estraverse "^5.1.0" - -esrecurse@^4.3.0: - version "4.3.0" - resolved "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz" - integrity sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag== - dependencies: - estraverse "^5.2.0" - -estraverse@^5.1.0, estraverse@^5.2.0: - version "5.3.0" - resolved "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz" - integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== - -esutils@^2.0.2: - version "2.0.3" - resolved "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz" - integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== - -event-target-shim@^5.0.0: - version "5.0.1" - resolved "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz" - integrity sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ== - -events@^3.3.0: - version "3.3.0" - resolved "https://registry.npmjs.org/events/-/events-3.3.0.tgz" - integrity sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q== - -execa@^5.0.0: - version "5.1.1" - resolved "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz" - integrity sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg== - dependencies: - cross-spawn "^7.0.3" - get-stream "^6.0.0" - human-signals "^2.1.0" - is-stream "^2.0.0" - merge-stream "^2.0.0" - npm-run-path "^4.0.1" - onetime "^5.1.2" - signal-exit "^3.0.3" - strip-final-newline "^2.0.0" - -exit@^0.1.2: - version "0.1.2" - resolved "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz" - integrity sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ== - -expand-template@^2.0.3: - version "2.0.3" - resolved "https://registry.npmjs.org/expand-template/-/expand-template-2.0.3.tgz" - integrity sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg== - -expect@^29.0.0, expect@^29.7.0: - version "29.7.0" - resolved "https://registry.npmjs.org/expect/-/expect-29.7.0.tgz" - integrity sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw== - dependencies: - "@jest/expect-utils" "^29.7.0" - jest-get-type "^29.6.3" - jest-matcher-utils "^29.7.0" - jest-message-util "^29.7.0" - jest-util "^29.7.0" - -fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: - version "3.1.3" - resolved "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz" - integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== - -fast-fifo@^1.1.0, fast-fifo@^1.2.0: - version "1.3.2" - resolved "https://registry.npmjs.org/fast-fifo/-/fast-fifo-1.3.2.tgz" - integrity sha512-/d9sfos4yxzpwkDkuN7k2SqFKtYNmCTzgfEpz82x34IM9/zc8KGxQoXg1liNC/izpRM/MBdt44Nmx41ZWqk+FQ== - -fast-json-stable-stringify@^2.0.0, fast-json-stable-stringify@^2.1.0, fast-json-stable-stringify@2.x: - version "2.1.0" - resolved "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz" - integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== - -fast-levenshtein@^2.0.6: - version "2.0.6" - resolved "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz" - integrity sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw== - -fastest-levenshtein@^1.0.16: - version "1.0.16" - resolved "https://registry.npmjs.org/fastest-levenshtein/-/fastest-levenshtein-1.0.16.tgz" - integrity sha512-eRnCtTTtGZFpQCwhJiUOuxPQWRXVKYDn0b2PeHfXL6/Zi53SLAzAHfVhVWK2AryC/WH05kGfxhFIPvTF0SXQzg== - -fastq@^1.6.0: - version "1.17.1" - resolved "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz" - integrity sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w== - dependencies: - reusify "^1.0.4" - -fb-watchman@^2.0.0: - version "2.0.2" - resolved "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.2.tgz" - integrity sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA== - dependencies: - bser "2.1.1" - -fetch-blob@^3.1.2, fetch-blob@^3.1.4: - version "3.2.0" - resolved "https://registry.npmjs.org/fetch-blob/-/fetch-blob-3.2.0.tgz" - integrity sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ== - dependencies: - node-domexception "^1.0.0" - web-streams-polyfill "^3.0.3" - -file-entry-cache@^6.0.1: - version "6.0.1" - resolved "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz" - integrity sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg== - dependencies: - flat-cache "^3.0.4" - -file-uri-to-path@1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz" - integrity sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw== - -fill-range@^7.0.1: - version "7.0.1" - resolved "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz" - integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== - dependencies: - to-regex-range "^5.0.1" - -find-replace@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/find-replace/-/find-replace-3.0.0.tgz" - integrity sha512-6Tb2myMioCAgv5kfvP5/PkZZ/ntTpVK39fHY7WkWBgvbeE+VHd/tZuZ4mrC+bxh4cfOZeYKVPaJIZtZXV7GNCQ== - dependencies: - array-back "^3.0.1" - -find-up@^4.0.0, find-up@^4.1.0: - version "4.1.0" - resolved "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz" - integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw== - dependencies: - locate-path "^5.0.0" - path-exists "^4.0.0" - -find-up@^5.0.0: - version "5.0.0" - resolved "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz" - integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== - dependencies: - locate-path "^6.0.0" - path-exists "^4.0.0" - -flat-cache@^3.0.4: - version "3.2.0" - resolved "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz" - integrity sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw== - dependencies: - flatted "^3.2.9" - keyv "^4.5.3" - rimraf "^3.0.2" - -flatbuffers@^1.12.0: - version "1.12.0" - resolved "https://registry.npmjs.org/flatbuffers/-/flatbuffers-1.12.0.tgz" - integrity sha512-c7CZADjRcl6j0PlvFy0ZqXQ67qSEZfrVPynmnL+2zPc+NtMvrF8Y0QceMo7QqnSPc7+uWjUIAbvCQ5WIKlMVdQ== - -flatbuffers@23.5.26: - version "23.5.26" - resolved "https://registry.npmjs.org/flatbuffers/-/flatbuffers-23.5.26.tgz" - integrity sha512-vE+SI9vrJDwi1oETtTIFldC/o9GsVKRM+s6EL0nQgxXlYV1Vc4Tk30hj4xGICftInKQKj1F3up2n8UbIVobISQ== - -flatted@^3.2.9: - version "3.3.1" - resolved "https://registry.npmjs.org/flatted/-/flatted-3.3.1.tgz" - integrity sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw== - -follow-redirects@^1.15.4, follow-redirects@^1.15.5: - version "1.15.5" - resolved "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.5.tgz" - integrity sha512-vSFWUON1B+yAw1VN4xMfxgn5fTUiaOzAJCKBwIIgT/+7CuGy9+r+5gITvP62j3RmaD5Ph65UaERdOSRGUzZtgw== - -for-each@^0.3.3: - version "0.3.3" - resolved "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz" - integrity sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw== - dependencies: - is-callable "^1.1.3" - -form-data-encoder@1.7.2: - version "1.7.2" - resolved "https://registry.npmjs.org/form-data-encoder/-/form-data-encoder-1.7.2.tgz" - integrity sha512-qfqtYan3rxrnCk1VYaA4H+Ms9xdpPqvLZa6xmMgFvhO32x7/3J/ExcTd6qpxM0vH2GdMI+poehyBZvqfMTto8A== - -form-data@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz" - integrity sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww== - dependencies: - asynckit "^0.4.0" - combined-stream "^1.0.8" - mime-types "^2.1.12" - -formdata-node@^4.3.2: - version "4.4.1" - resolved "https://registry.npmjs.org/formdata-node/-/formdata-node-4.4.1.tgz" - integrity sha512-0iirZp3uVDjVGt9p49aTaqjk84TrglENEDuqfdlZQ1roC9CWlPk6Avf8EEnZNcAqPonwkG35x4n3ww/1THYAeQ== - dependencies: - node-domexception "1.0.0" - web-streams-polyfill "4.0.0-beta.3" - -formdata-polyfill@^4.0.10: - version "4.0.10" - resolved "https://registry.npmjs.org/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz" - integrity sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g== - dependencies: - fetch-blob "^3.1.2" - -fs-constants@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz" - integrity sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow== - -fs-minipass@^2.0.0: - version "2.1.0" - resolved "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz" - integrity sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg== - dependencies: - minipass "^3.0.0" - -fs.realpath@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz" - integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== - -fsevents@^2.3.2: - version "2.3.3" - resolved "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz" - integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw== - -function-bind@^1.1.2: - version "1.1.2" - resolved "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz" - integrity sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA== - -function.prototype.name@^1.1.6: - version "1.1.6" - resolved "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.6.tgz" - integrity sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg== - dependencies: - call-bind "^1.0.2" - define-properties "^1.2.0" - es-abstract "^1.22.1" - functions-have-names "^1.2.3" - -functions-have-names@^1.2.3: - version "1.2.3" - resolved "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz" - integrity sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ== - -gauge@^4.0.3: - version "4.0.4" - resolved "https://registry.npmjs.org/gauge/-/gauge-4.0.4.tgz" - integrity sha512-f9m+BEN5jkg6a0fZjleidjN51VE1X+mPFQ2DJ0uv1V39oCLCbsGe6yjbBnp7eK7z/+GAon99a3nHuqbuuthyPg== - dependencies: - aproba "^1.0.3 || ^2.0.0" - color-support "^1.1.3" - console-control-strings "^1.1.0" - has-unicode "^2.0.1" - signal-exit "^3.0.7" - string-width "^4.2.3" - strip-ansi "^6.0.1" - wide-align "^1.1.5" - -generate-function@^2.3.1: - version "2.3.1" - resolved "https://registry.npmjs.org/generate-function/-/generate-function-2.3.1.tgz" - integrity sha512-eeB5GfMNeevm/GRYq20ShmsaGcmI81kIX2K9XQx5miC8KdHaC6Jm0qQ8ZNeGOi7wYB8OsdxKs+Y2oVuTFuVwKQ== - dependencies: - is-property "^1.0.2" - -gensync@^1.0.0-beta.2: - version "1.0.0-beta.2" - resolved "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz" - integrity sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg== - -get-caller-file@^2.0.5: - version "2.0.5" - resolved "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz" - integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== - -get-intrinsic@^1.1.3, get-intrinsic@^1.2.1, get-intrinsic@^1.2.2, get-intrinsic@^1.2.3, get-intrinsic@^1.2.4: - version "1.2.4" - resolved "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz" - integrity sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ== - dependencies: - es-errors "^1.3.0" - function-bind "^1.1.2" - has-proto "^1.0.1" - has-symbols "^1.0.3" - hasown "^2.0.0" - -get-package-type@^0.1.0: - version "0.1.0" - resolved "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz" - integrity sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q== - -get-stream@^6.0.0: - version "6.0.1" - resolved "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz" - integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg== - -get-symbol-description@^1.0.2: - version "1.0.2" - resolved "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.2.tgz" - integrity sha512-g0QYk1dZBxGwk+Ngc+ltRH2IBp2f7zBkBMBJZCDerh6EhlhSR6+9irMCuT/09zD6qkarHUSn529sK/yL4S27mg== - dependencies: - call-bind "^1.0.5" - es-errors "^1.3.0" - get-intrinsic "^1.2.4" - -github-from-package@0.0.0: - version "0.0.0" - resolved "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz" - integrity sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw== - -glob-parent@^6.0.2: - version "6.0.2" - resolved "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz" - integrity sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A== - dependencies: - is-glob "^4.0.3" - -glob@^7.1.3, glob@^7.1.4: - version "7.2.3" - resolved "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz" - integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.1.1" - once "^1.3.0" - path-is-absolute "^1.0.0" - -globals@^11.1.0: - version "11.12.0" - resolved "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz" - integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== - -globals@^13.19.0: - version "13.24.0" - resolved "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz" - integrity sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ== - dependencies: - type-fest "^0.20.2" - -globalthis@^1.0.3: - version "1.0.3" - resolved "https://registry.npmjs.org/globalthis/-/globalthis-1.0.3.tgz" - integrity sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA== - dependencies: - define-properties "^1.1.3" - -gopd@^1.0.1: - version "1.0.1" - resolved "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz" - integrity sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA== - dependencies: - get-intrinsic "^1.1.3" - -graceful-fs@^4.2.6, graceful-fs@^4.2.9: - version "4.2.11" - resolved "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz" - integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== - -graphemer@^1.4.0: - version "1.4.0" - resolved "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz" - integrity sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag== - -graphology-indices@^0.17.0: - version "0.17.0" - resolved "https://registry.npmjs.org/graphology-indices/-/graphology-indices-0.17.0.tgz" - integrity sha512-A7RXuKQvdqSWOpn7ZVQo4S33O0vCfPBnUSf7FwE0zNCasqwZVUaCXePuWo5HBpWw68KJcwObZDHpFk6HKH6MYQ== - dependencies: - graphology-utils "^2.4.2" - mnemonist "^0.39.0" - -graphology-metrics@^2.2.0: - version "2.2.0" - resolved "https://registry.npmjs.org/graphology-metrics/-/graphology-metrics-2.2.0.tgz" - integrity sha512-eZZFRLGGyyI+iD+XwQvc+lLM3EKCoqUvVjvF/14Htgy4grB2m95OytToYq3saWuHfuf22VVnj9GBHv/pTzKuTw== - dependencies: - graphology-shortest-path "^2.0.0" - graphology-utils "^2.4.4" - mnemonist "^0.39.0" - -graphology-shortest-path@^2.0.0: - version "2.0.2" - resolved "https://registry.npmjs.org/graphology-shortest-path/-/graphology-shortest-path-2.0.2.tgz" - integrity sha512-hlGvh4Yb1Vmd2J7wT8Q8+t4RQ6Tx+9wRYm0/fZB9PZJ4uW3nml5kJ7yXZ2+JYWT+7wLLmY5mg3o9bLSAWmv/jQ== - dependencies: - "@yomguithereal/helpers" "^1.1.1" - graphology-indices "^0.17.0" - graphology-utils "^2.4.3" - mnemonist "^0.39.0" - -graphology-types@>=0.20.0, graphology-types@>=0.23.0, graphology-types@>=0.24.0: - version "0.24.7" - resolved "https://registry.npmjs.org/graphology-types/-/graphology-types-0.24.7.tgz" - integrity sha512-tdcqOOpwArNjEr0gNQKCXwaNCWnQJrog14nJNQPeemcLnXQUUGrsCWpWkVKt46zLjcS6/KGoayeJfHHyPDlvwA== - -graphology-utils@^2.4.2, graphology-utils@^2.4.3, graphology-utils@^2.4.4: - version "2.5.2" - resolved "https://registry.npmjs.org/graphology-utils/-/graphology-utils-2.5.2.tgz" - integrity sha512-ckHg8MXrXJkOARk56ZaSCM1g1Wihe2d6iTmz1enGOz4W/l831MBCKSayeFQfowgF8wd+PQ4rlch/56Vs/VZLDQ== - -graphology@^0.25.4: - version "0.25.4" - resolved "https://registry.npmjs.org/graphology/-/graphology-0.25.4.tgz" - integrity sha512-33g0Ol9nkWdD6ulw687viS8YJQBxqG5LWII6FI6nul0pq6iM2t5EKquOTFDbyTblRB3O9I+7KX4xI8u5ffekAQ== - dependencies: - events "^3.3.0" - obliterator "^2.0.2" - -guid-typescript@^1.0.9: - version "1.0.9" - resolved "https://registry.npmjs.org/guid-typescript/-/guid-typescript-1.0.9.tgz" - integrity sha512-Y8T4vYhEfwJOTbouREvG+3XDsjr8E3kIr7uf+JZ0BYloFsttiHU0WfvANVsR7TxNUJa/WpCnw/Ino/p+DeBhBQ== - -handlebars@*, handlebars@^4.7.8: - version "4.7.8" - resolved "https://registry.npmjs.org/handlebars/-/handlebars-4.7.8.tgz" - integrity sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ== - dependencies: - minimist "^1.2.5" - neo-async "^2.6.2" - source-map "^0.6.1" - wordwrap "^1.0.0" - optionalDependencies: - uglify-js "^3.1.4" - -has-bigints@^1.0.1, has-bigints@^1.0.2: - version "1.0.2" - resolved "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz" - integrity sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ== - -has-flag@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz" - integrity sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw== - -has-flag@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz" - integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== - -has-property-descriptors@^1.0.0, has-property-descriptors@^1.0.1, has-property-descriptors@^1.0.2: - version "1.0.2" - resolved "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz" - integrity sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg== - dependencies: - es-define-property "^1.0.0" - -has-proto@^1.0.1, has-proto@^1.0.3: - version "1.0.3" - resolved "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz" - integrity sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q== - -has-symbols@^1.0.2, has-symbols@^1.0.3: - version "1.0.3" - resolved "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz" - integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A== - -has-tostringtag@^1.0.0, has-tostringtag@^1.0.1, has-tostringtag@^1.0.2: - version "1.0.2" - resolved "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz" - integrity sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw== - dependencies: - has-symbols "^1.0.3" - -has-unicode@^2.0.1: - version "2.0.1" - resolved "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz" - integrity sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ== - -hasown@^2.0.0, hasown@^2.0.1: - version "2.0.1" - resolved "https://registry.npmjs.org/hasown/-/hasown-2.0.1.tgz" - integrity sha512-1/th4MHjnwncwXsIW6QMzlvYL9kG5e/CpVvLRZe4XPa8TOUNbCELqmvhDmnkNsAjwaG4+I8gJJL0JBvTTLO9qA== - dependencies: - function-bind "^1.1.2" - -he@1.2.0: - version "1.2.0" - resolved "https://registry.npmjs.org/he/-/he-1.2.0.tgz" - integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== - -html-escaper@^2.0.0: - version "2.0.2" - resolved "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz" - integrity sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg== - -htmlparser2@^8.0.1: - version "8.0.2" - resolved "https://registry.npmjs.org/htmlparser2/-/htmlparser2-8.0.2.tgz" - integrity sha512-GYdjWKDkbRLkZ5geuHs5NY1puJ+PXwP7+fHPRz06Eirsb9ugf6d8kkXav6ADhcODhFFPMIXyxkxSuMf3D6NCFA== - dependencies: - domelementtype "^2.3.0" - domhandler "^5.0.3" - domutils "^3.0.1" - entities "^4.4.0" - -http-cache-semantics@^4.1.0: - version "4.1.1" - resolved "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz" - integrity sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ== - -http-proxy-agent@^4.0.1: - version "4.0.1" - resolved "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz" - integrity sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg== - dependencies: - "@tootallnate/once" "1" - agent-base "6" - debug "4" - -http-proxy-agent@^7.0.1: - version "7.0.1" - resolved "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.1.tgz" - integrity sha512-My1KCEPs6A0hb4qCVzYp8iEvA8j8YqcvXLZZH8C9OFuTYpYjHE7N2dtG3mRl1HMD4+VGXpF3XcDVcxGBT7yDZQ== - dependencies: - agent-base "^7.1.0" - debug "^4.3.4" - -https-proxy-agent@^5.0.0: - version "5.0.1" - resolved "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz" - integrity sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA== - dependencies: - agent-base "6" - debug "4" - -https-proxy-agent@^7.0.3: - version "7.0.3" - resolved "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.3.tgz" - integrity sha512-kCnwztfX0KZJSLOBrcL0emLeFako55NWMovvyPP2AjsghNk9RB1yjSI+jVumPHYZsNXegNoqupSW9IY3afSH8w== - dependencies: - agent-base "^7.0.2" - debug "4" - -human-signals@^2.1.0: - version "2.1.0" - resolved "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz" - integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw== - -humanize-ms@^1.2.1: - version "1.2.1" - resolved "https://registry.npmjs.org/humanize-ms/-/humanize-ms-1.2.1.tgz" - integrity sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ== - dependencies: - ms "^2.0.0" - -iconv-lite@^0.6.2, iconv-lite@^0.6.3: - version "0.6.3" - resolved "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz" - integrity sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw== - dependencies: - safer-buffer ">= 2.1.2 < 3.0.0" - -ieee754@^1.1.13, ieee754@^1.2.1: - version "1.2.1" - resolved "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz" - integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== - -ignore@^5.2.0: - version "5.3.1" - resolved "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz" - integrity sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw== - -import-fresh@^3.2.1: - version "3.3.0" - resolved "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz" - integrity sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw== - dependencies: - parent-module "^1.0.0" - resolve-from "^4.0.0" - -import-local@^3.0.2: - version "3.1.0" - resolved "https://registry.npmjs.org/import-local/-/import-local-3.1.0.tgz" - integrity sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg== - dependencies: - pkg-dir "^4.2.0" - resolve-cwd "^3.0.0" - -imurmurhash@^0.1.4: - version "0.1.4" - resolved "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz" - integrity sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA== - -indent-string@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz" - integrity sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg== - -infer-owner@^1.0.4: - version "1.0.4" - resolved "https://registry.npmjs.org/infer-owner/-/infer-owner-1.0.4.tgz" - integrity sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A== - -inflight@^1.0.4: - version "1.0.6" - resolved "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz" - integrity sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA== - dependencies: - once "^1.3.0" - wrappy "1" - -inherits@^2.0.3, inherits@^2.0.4, inherits@2: - version "2.0.4" - resolved "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz" - integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== - -ini@~1.3.0: - version "1.3.8" - resolved "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz" - integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew== - -internal-slot@^1.0.7: - version "1.0.7" - resolved "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.7.tgz" - integrity sha512-NGnrKwXzSms2qUUih/ILZ5JBqNTSa1+ZmP6flaIp6KmSElgE9qdndzS3cqjrDovwFdmwsGsLdeFgB6suw+1e9g== - dependencies: - es-errors "^1.3.0" - hasown "^2.0.0" - side-channel "^1.0.4" - -ip@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/ip/-/ip-2.0.0.tgz" - integrity sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ== - -is-array-buffer@^3.0.4: - version "3.0.4" - resolved "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.4.tgz" - integrity sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw== - dependencies: - call-bind "^1.0.2" - get-intrinsic "^1.2.1" - -is-arrayish@^0.2.1: - version "0.2.1" - resolved "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz" - integrity sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg== - -is-arrayish@^0.3.1: - version "0.3.2" - resolved "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz" - integrity sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ== - -is-bigint@^1.0.1: - version "1.0.4" - resolved "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz" - integrity sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg== - dependencies: - has-bigints "^1.0.1" - -is-boolean-object@^1.1.0: - version "1.1.2" - resolved "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz" - integrity sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA== - dependencies: - call-bind "^1.0.2" - has-tostringtag "^1.0.0" - -is-buffer@~1.1.6: - version "1.1.6" - resolved "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz" - integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w== - -is-callable@^1.1.3, is-callable@^1.1.4, is-callable@^1.2.7: - version "1.2.7" - resolved "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz" - integrity sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA== - -is-core-module@^2.13.0, is-core-module@^2.13.1: - version "2.13.1" - resolved "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.1.tgz" - integrity sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw== - dependencies: - hasown "^2.0.0" - -is-date-object@^1.0.1: - version "1.0.5" - resolved "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz" - integrity sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ== - dependencies: - has-tostringtag "^1.0.0" - -is-extglob@^2.1.1: - version "2.1.1" - resolved "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz" - integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ== - -is-fullwidth-code-point@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz" - integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== - -is-generator-fn@^2.0.0: - version "2.1.0" - resolved "https://registry.npmjs.org/is-generator-fn/-/is-generator-fn-2.1.0.tgz" - integrity sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ== - -is-glob@^4.0.0, is-glob@^4.0.3: - version "4.0.3" - resolved "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz" - integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== - dependencies: - is-extglob "^2.1.1" - -is-lambda@^1.0.1: - version "1.0.1" - resolved "https://registry.npmjs.org/is-lambda/-/is-lambda-1.0.1.tgz" - integrity sha512-z7CMFGNrENq5iFB9Bqo64Xk6Y9sg+epq1myIcdHaGnbMTYOxvzsEtdYqQUylB7LxfkvgrrjP32T6Ywciio9UIQ== - -is-negative-zero@^2.0.2: - version "2.0.3" - resolved "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.3.tgz" - integrity sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw== - -is-number-object@^1.0.4: - version "1.0.7" - resolved "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz" - integrity sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ== - dependencies: - has-tostringtag "^1.0.0" - -is-number@^7.0.0: - version "7.0.0" - resolved "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz" - integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== - -is-path-inside@^3.0.3: - version "3.0.3" - resolved "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz" - integrity sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ== - -is-property@^1.0.2: - version "1.0.2" - resolved "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz" - integrity sha512-Ks/IoX00TtClbGQr4TWXemAnktAQvYB7HzcCxDGqEZU6oCmb2INHuOoKxbtR+HFkmYWBKv/dOZtGRiAjDhj92g== - -is-regex@^1.1.4: - version "1.1.4" - resolved "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz" - integrity sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg== - dependencies: - call-bind "^1.0.2" - has-tostringtag "^1.0.0" - -is-shared-array-buffer@^1.0.2: - version "1.0.3" - resolved "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.3.tgz" - integrity sha512-nA2hv5XIhLR3uVzDDfCIknerhx8XUKnstuOERPNNIinXG7v9u+ohXF67vxm4TPTEPU6lm61ZkwP3c9PCB97rhg== - dependencies: - call-bind "^1.0.7" - -is-stream@^2.0.0: - version "2.0.1" - resolved "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz" - integrity sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg== - -is-string@^1.0.5, is-string@^1.0.7: - version "1.0.7" - resolved "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz" - integrity sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg== - dependencies: - has-tostringtag "^1.0.0" - -is-symbol@^1.0.2, is-symbol@^1.0.3: - version "1.0.4" - resolved "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz" - integrity sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg== - dependencies: - has-symbols "^1.0.2" - -is-typed-array@^1.1.13: - version "1.1.13" - resolved "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.13.tgz" - integrity sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw== - dependencies: - which-typed-array "^1.1.14" - -is-weakref@^1.0.2: - version "1.0.2" - resolved "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz" - integrity sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ== - dependencies: - call-bind "^1.0.2" - -isarray@^2.0.5: - version "2.0.5" - resolved "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz" - integrity sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw== - -isexe@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz" - integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== - -istanbul-lib-coverage@^3.0.0, istanbul-lib-coverage@^3.2.0: - version "3.2.2" - resolved "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz" - integrity sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg== - -istanbul-lib-instrument@^5.0.4: - version "5.2.1" - resolved "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz" - integrity sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg== - dependencies: - "@babel/core" "^7.12.3" - "@babel/parser" "^7.14.7" - "@istanbuljs/schema" "^0.1.2" - istanbul-lib-coverage "^3.2.0" - semver "^6.3.0" - -istanbul-lib-instrument@^6.0.0: - version "6.0.1" - resolved "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.1.tgz" - integrity sha512-EAMEJBsYuyyztxMxW3g7ugGPkrZsV57v0Hmv3mm1uQsmB+QnZuepg731CRaIgeUVSdmsTngOkSnauNF8p7FIhA== - dependencies: - "@babel/core" "^7.12.3" - "@babel/parser" "^7.14.7" - "@istanbuljs/schema" "^0.1.2" - istanbul-lib-coverage "^3.2.0" - semver "^7.5.4" - -istanbul-lib-report@^3.0.0: - version "3.0.1" - resolved "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz" - integrity sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw== - dependencies: - istanbul-lib-coverage "^3.0.0" - make-dir "^4.0.0" - supports-color "^7.1.0" - -istanbul-lib-source-maps@^4.0.0: - version "4.0.1" - resolved "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz" - integrity sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw== - dependencies: - debug "^4.1.1" - istanbul-lib-coverage "^3.0.0" - source-map "^0.6.1" - -istanbul-reports@^3.1.3: - version "3.1.6" - resolved "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.6.tgz" - integrity sha512-TLgnMkKg3iTDsQ9PbPTdpfAK2DzjF9mqUG7RMgcQl8oFjad8ob4laGxv5XV5U9MAfx8D6tSJiUyuAwzLicaxlg== - dependencies: - html-escaper "^2.0.0" - istanbul-lib-report "^3.0.0" - -jest-changed-files@^29.7.0: - version "29.7.0" - resolved "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-29.7.0.tgz" - integrity sha512-fEArFiwf1BpQ+4bXSprcDc3/x4HSzL4al2tozwVpDFpsxALjLYdyiIK4e5Vz66GQJIbXJ82+35PtysofptNX2w== - dependencies: - execa "^5.0.0" - jest-util "^29.7.0" - p-limit "^3.1.0" - -jest-circus@^29.7.0: - version "29.7.0" - resolved "https://registry.npmjs.org/jest-circus/-/jest-circus-29.7.0.tgz" - integrity sha512-3E1nCMgipcTkCocFwM90XXQab9bS+GMsjdpmPrlelaxwD93Ad8iVEjX/vvHPdLPnFf+L40u+5+iutRdA1N9myw== - dependencies: - "@jest/environment" "^29.7.0" - "@jest/expect" "^29.7.0" - "@jest/test-result" "^29.7.0" - "@jest/types" "^29.6.3" - "@types/node" "*" - chalk "^4.0.0" - co "^4.6.0" - dedent "^1.0.0" - is-generator-fn "^2.0.0" - jest-each "^29.7.0" - jest-matcher-utils "^29.7.0" - jest-message-util "^29.7.0" - jest-runtime "^29.7.0" - jest-snapshot "^29.7.0" - jest-util "^29.7.0" - p-limit "^3.1.0" - pretty-format "^29.7.0" - pure-rand "^6.0.0" - slash "^3.0.0" - stack-utils "^2.0.3" - -jest-cli@^29.7.0: - version "29.7.0" - resolved "https://registry.npmjs.org/jest-cli/-/jest-cli-29.7.0.tgz" - integrity sha512-OVVobw2IubN/GSYsxETi+gOe7Ka59EFMR/twOU3Jb2GnKKeMGJB5SGUUrEz3SFVmJASUdZUzy83sLNNQ2gZslg== - dependencies: - "@jest/core" "^29.7.0" - "@jest/test-result" "^29.7.0" - "@jest/types" "^29.6.3" - chalk "^4.0.0" - create-jest "^29.7.0" - exit "^0.1.2" - import-local "^3.0.2" - jest-config "^29.7.0" - jest-util "^29.7.0" - jest-validate "^29.7.0" - yargs "^17.3.1" - -jest-config@^29.7.0: - version "29.7.0" - resolved "https://registry.npmjs.org/jest-config/-/jest-config-29.7.0.tgz" - integrity sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ== - dependencies: - "@babel/core" "^7.11.6" - "@jest/test-sequencer" "^29.7.0" - "@jest/types" "^29.6.3" - babel-jest "^29.7.0" - chalk "^4.0.0" - ci-info "^3.2.0" - deepmerge "^4.2.2" - glob "^7.1.3" - graceful-fs "^4.2.9" - jest-circus "^29.7.0" - jest-environment-node "^29.7.0" - jest-get-type "^29.6.3" - jest-regex-util "^29.6.3" - jest-resolve "^29.7.0" - jest-runner "^29.7.0" - jest-util "^29.7.0" - jest-validate "^29.7.0" - micromatch "^4.0.4" - parse-json "^5.2.0" - pretty-format "^29.7.0" - slash "^3.0.0" - strip-json-comments "^3.1.1" - -jest-diff@^29.7.0: - version "29.7.0" - resolved "https://registry.npmjs.org/jest-diff/-/jest-diff-29.7.0.tgz" - integrity sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw== - dependencies: - chalk "^4.0.0" - diff-sequences "^29.6.3" - jest-get-type "^29.6.3" - pretty-format "^29.7.0" - -jest-docblock@^29.7.0: - version "29.7.0" - resolved "https://registry.npmjs.org/jest-docblock/-/jest-docblock-29.7.0.tgz" - integrity sha512-q617Auw3A612guyaFgsbFeYpNP5t2aoUNLwBUbc/0kD1R4t9ixDbyFTHd1nok4epoVFpr7PmeWHrhvuV3XaJ4g== - dependencies: - detect-newline "^3.0.0" - -jest-each@^29.7.0: - version "29.7.0" - resolved "https://registry.npmjs.org/jest-each/-/jest-each-29.7.0.tgz" - integrity sha512-gns+Er14+ZrEoC5fhOfYCY1LOHHr0TI+rQUHZS8Ttw2l7gl+80eHc/gFf2Ktkw0+SIACDTeWvpFcv3B04VembQ== - dependencies: - "@jest/types" "^29.6.3" - chalk "^4.0.0" - jest-get-type "^29.6.3" - jest-util "^29.7.0" - pretty-format "^29.7.0" - -jest-environment-node@^29.7.0: - version "29.7.0" - resolved "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-29.7.0.tgz" - integrity sha512-DOSwCRqXirTOyheM+4d5YZOrWcdu0LNZ87ewUoywbcb2XR4wKgqiG8vNeYwhjFMbEkfju7wx2GYH0P2gevGvFw== - dependencies: - "@jest/environment" "^29.7.0" - "@jest/fake-timers" "^29.7.0" - "@jest/types" "^29.6.3" - "@types/node" "*" - jest-mock "^29.7.0" - jest-util "^29.7.0" - -jest-get-type@^29.6.3: - version "29.6.3" - resolved "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.6.3.tgz" - integrity sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw== - -jest-haste-map@^29.7.0: - version "29.7.0" - resolved "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-29.7.0.tgz" - integrity sha512-fP8u2pyfqx0K1rGn1R9pyE0/KTn+G7PxktWidOBTqFPLYX0b9ksaMFkhK5vrS3DVun09pckLdlx90QthlW7AmA== - dependencies: - "@jest/types" "^29.6.3" - "@types/graceful-fs" "^4.1.3" - "@types/node" "*" - anymatch "^3.0.3" - fb-watchman "^2.0.0" - graceful-fs "^4.2.9" - jest-regex-util "^29.6.3" - jest-util "^29.7.0" - jest-worker "^29.7.0" - micromatch "^4.0.4" - walker "^1.0.8" - optionalDependencies: - fsevents "^2.3.2" - -jest-leak-detector@^29.7.0: - version "29.7.0" - resolved "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.7.0.tgz" - integrity sha512-kYA8IJcSYtST2BY9I+SMC32nDpBT3J2NvWJx8+JCuCdl/CR1I4EKUJROiP8XtCcxqgTTBGJNdbB1A8XRKbTetw== - dependencies: - jest-get-type "^29.6.3" - pretty-format "^29.7.0" - -jest-matcher-utils@^29.7.0: - version "29.7.0" - resolved "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-29.7.0.tgz" - integrity sha512-sBkD+Xi9DtcChsI3L3u0+N0opgPYnCRPtGcQYrgXmR+hmt/fYfWAL0xRXYU8eWOdfuLgBe0YCW3AFtnRLagq/g== - dependencies: - chalk "^4.0.0" - jest-diff "^29.7.0" - jest-get-type "^29.6.3" - pretty-format "^29.7.0" - -jest-message-util@^29.7.0: - version "29.7.0" - resolved "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.7.0.tgz" - integrity sha512-GBEV4GRADeP+qtB2+6u61stea8mGcOT4mCtrYISZwfu9/ISHFJ/5zOMXYbpBE9RsS5+Gb63DW4FgmnKJ79Kf6w== - dependencies: - "@babel/code-frame" "^7.12.13" - "@jest/types" "^29.6.3" - "@types/stack-utils" "^2.0.0" - chalk "^4.0.0" - graceful-fs "^4.2.9" - micromatch "^4.0.4" - pretty-format "^29.7.0" - slash "^3.0.0" - stack-utils "^2.0.3" - -jest-mock@^29.7.0: - version "29.7.0" - resolved "https://registry.npmjs.org/jest-mock/-/jest-mock-29.7.0.tgz" - integrity sha512-ITOMZn+UkYS4ZFh83xYAOzWStloNzJFO2s8DWrE4lhtGD+AorgnbkiKERe4wQVBydIGPx059g6riW5Btp6Llnw== - dependencies: - "@jest/types" "^29.6.3" - "@types/node" "*" - jest-util "^29.7.0" - -jest-pnp-resolver@^1.2.2: - version "1.2.3" - resolved "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz" - integrity sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w== - -jest-regex-util@^29.6.3: - version "29.6.3" - resolved "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-29.6.3.tgz" - integrity sha512-KJJBsRCyyLNWCNBOvZyRDnAIfUiRJ8v+hOBQYGn8gDyF3UegwiP4gwRR3/SDa42g1YbVycTidUF3rKjyLFDWbg== - -jest-resolve-dependencies@^29.7.0: - version "29.7.0" - resolved "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-29.7.0.tgz" - integrity sha512-un0zD/6qxJ+S0et7WxeI3H5XSe9lTBBR7bOHCHXkKR6luG5mwDDlIzVQ0V5cZCuoTgEdcdwzTghYkTWfubi+nA== - dependencies: - jest-regex-util "^29.6.3" - jest-snapshot "^29.7.0" - -jest-resolve@*, jest-resolve@^29.7.0: - version "29.7.0" - resolved "https://registry.npmjs.org/jest-resolve/-/jest-resolve-29.7.0.tgz" - integrity sha512-IOVhZSrg+UvVAshDSDtHyFCCBUl/Q3AAJv8iZ6ZjnZ74xzvwuzLXid9IIIPgTnY62SJjfuupMKZsZQRsCvxEgA== - dependencies: - chalk "^4.0.0" - graceful-fs "^4.2.9" - jest-haste-map "^29.7.0" - jest-pnp-resolver "^1.2.2" - jest-util "^29.7.0" - jest-validate "^29.7.0" - resolve "^1.20.0" - resolve.exports "^2.0.0" - slash "^3.0.0" - -jest-runner@^29.7.0: - version "29.7.0" - resolved "https://registry.npmjs.org/jest-runner/-/jest-runner-29.7.0.tgz" - integrity sha512-fsc4N6cPCAahybGBfTRcq5wFR6fpLznMg47sY5aDpsoejOcVYFb07AHuSnR0liMcPTgBsA3ZJL6kFOjPdoNipQ== - dependencies: - "@jest/console" "^29.7.0" - "@jest/environment" "^29.7.0" - "@jest/test-result" "^29.7.0" - "@jest/transform" "^29.7.0" - "@jest/types" "^29.6.3" - "@types/node" "*" - chalk "^4.0.0" - emittery "^0.13.1" - graceful-fs "^4.2.9" - jest-docblock "^29.7.0" - jest-environment-node "^29.7.0" - jest-haste-map "^29.7.0" - jest-leak-detector "^29.7.0" - jest-message-util "^29.7.0" - jest-resolve "^29.7.0" - jest-runtime "^29.7.0" - jest-util "^29.7.0" - jest-watcher "^29.7.0" - jest-worker "^29.7.0" - p-limit "^3.1.0" - source-map-support "0.5.13" - -jest-runtime@^29.7.0: - version "29.7.0" - resolved "https://registry.npmjs.org/jest-runtime/-/jest-runtime-29.7.0.tgz" - integrity sha512-gUnLjgwdGqW7B4LvOIkbKs9WGbn+QLqRQQ9juC6HndeDiezIwhDP+mhMwHWCEcfQ5RUXa6OPnFF8BJh5xegwwQ== - dependencies: - "@jest/environment" "^29.7.0" - "@jest/fake-timers" "^29.7.0" - "@jest/globals" "^29.7.0" - "@jest/source-map" "^29.6.3" - "@jest/test-result" "^29.7.0" - "@jest/transform" "^29.7.0" - "@jest/types" "^29.6.3" - "@types/node" "*" - chalk "^4.0.0" - cjs-module-lexer "^1.0.0" - collect-v8-coverage "^1.0.0" - glob "^7.1.3" - graceful-fs "^4.2.9" - jest-haste-map "^29.7.0" - jest-message-util "^29.7.0" - jest-mock "^29.7.0" - jest-regex-util "^29.6.3" - jest-resolve "^29.7.0" - jest-snapshot "^29.7.0" - jest-util "^29.7.0" - slash "^3.0.0" - strip-bom "^4.0.0" - -jest-snapshot@^29.7.0: - version "29.7.0" - resolved "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.7.0.tgz" - integrity sha512-Rm0BMWtxBcioHr1/OX5YCP8Uov4riHvKPknOGs804Zg9JGZgmIBkbtlxJC/7Z4msKYVbIJtfU+tKb8xlYNfdkw== - dependencies: - "@babel/core" "^7.11.6" - "@babel/generator" "^7.7.2" - "@babel/plugin-syntax-jsx" "^7.7.2" - "@babel/plugin-syntax-typescript" "^7.7.2" - "@babel/types" "^7.3.3" - "@jest/expect-utils" "^29.7.0" - "@jest/transform" "^29.7.0" - "@jest/types" "^29.6.3" - babel-preset-current-node-syntax "^1.0.0" - chalk "^4.0.0" - expect "^29.7.0" - graceful-fs "^4.2.9" - jest-diff "^29.7.0" - jest-get-type "^29.6.3" - jest-matcher-utils "^29.7.0" - jest-message-util "^29.7.0" - jest-util "^29.7.0" - natural-compare "^1.4.0" - pretty-format "^29.7.0" - semver "^7.5.3" - -jest-util@^29.0.0, jest-util@^29.7.0: - version "29.7.0" - resolved "https://registry.npmjs.org/jest-util/-/jest-util-29.7.0.tgz" - integrity sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA== - dependencies: - "@jest/types" "^29.6.3" - "@types/node" "*" - chalk "^4.0.0" - ci-info "^3.2.0" - graceful-fs "^4.2.9" - picomatch "^2.2.3" - -jest-validate@^29.7.0: - version "29.7.0" - resolved "https://registry.npmjs.org/jest-validate/-/jest-validate-29.7.0.tgz" - integrity sha512-ZB7wHqaRGVw/9hST/OuFUReG7M8vKeq0/J2egIGLdvjHCmYqGARhzXmtgi+gVeZ5uXFF219aOc3Ls2yLg27tkw== - dependencies: - "@jest/types" "^29.6.3" - camelcase "^6.2.0" - chalk "^4.0.0" - jest-get-type "^29.6.3" - leven "^3.1.0" - pretty-format "^29.7.0" - -jest-watcher@^29.7.0: - version "29.7.0" - resolved "https://registry.npmjs.org/jest-watcher/-/jest-watcher-29.7.0.tgz" - integrity sha512-49Fg7WXkU3Vl2h6LbLtMQ/HyB6rXSIX7SqvBLQmssRBGN9I0PNvPmAmCWSOY6SOvrjhI/F7/bGAv9RtnsPA03g== - dependencies: - "@jest/test-result" "^29.7.0" - "@jest/types" "^29.6.3" - "@types/node" "*" - ansi-escapes "^4.2.1" - chalk "^4.0.0" - emittery "^0.13.1" - jest-util "^29.7.0" - string-length "^4.0.1" - -jest-worker@^29.7.0: - version "29.7.0" - resolved "https://registry.npmjs.org/jest-worker/-/jest-worker-29.7.0.tgz" - integrity sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw== - dependencies: - "@types/node" "*" - jest-util "^29.7.0" - merge-stream "^2.0.0" - supports-color "^8.0.0" - -jest@^29.0.0, jest@^29.7.0: - version "29.7.0" - resolved "https://registry.npmjs.org/jest/-/jest-29.7.0.tgz" - integrity sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw== - dependencies: - "@jest/core" "^29.7.0" - "@jest/types" "^29.6.3" - import-local "^3.0.2" - jest-cli "^29.7.0" - -js-tiktoken@^1.0.8: - version "1.0.8" - resolved "https://registry.npmjs.org/js-tiktoken/-/js-tiktoken-1.0.8.tgz" - integrity sha512-r7XK3E9/I+SOrbAGqb39pyO/rHAS1diAOSRAvaaLfHgXjkUSK9AiSd+r84Vn2f/GvXJYRAxKj8NHrUvqlaH5qg== - dependencies: - base64-js "^1.5.1" - -js-tokens@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz" - integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== - -js-yaml@^3.13.1: - version "3.14.1" - resolved "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz" - integrity sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g== - dependencies: - argparse "^1.0.7" - esprima "^4.0.0" - -js-yaml@^4.1.0: - version "4.1.0" - resolved "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz" - integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== - dependencies: - argparse "^2.0.1" - -jsesc@^2.5.1: - version "2.5.2" - resolved "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz" - integrity sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA== - -json-bignum@^0.0.3: - version "0.0.3" - resolved "https://registry.npmjs.org/json-bignum/-/json-bignum-0.0.3.tgz" - integrity sha512-2WHyXj3OfHSgNyuzDbSxI1w2jgw5gkWSWhS7Qg4bWXx1nLk3jnbwfUeS0PSba3IzpTUWdHxBieELUzXRjQB2zg== - -json-buffer@3.0.1: - version "3.0.1" - resolved "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz" - integrity sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ== - -json-parse-even-better-errors@^2.3.0: - version "2.3.1" - resolved "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz" - integrity sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w== - -json-schema-traverse@^0.4.1: - version "0.4.1" - resolved "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz" - integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== - -json-stable-stringify-without-jsonify@^1.0.1: - version "1.0.1" - resolved "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz" - integrity sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw== - -json5@^1.0.2: - version "1.0.2" - resolved "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz" - integrity sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA== - dependencies: - minimist "^1.2.0" - -json5@^2.2.3: - version "2.2.3" - resolved "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz" - integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg== - -keyv@^4.5.3: - version "4.5.4" - resolved "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz" - integrity sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw== - dependencies: - json-buffer "3.0.1" - -kleur@^3.0.3: - version "3.0.3" - resolved "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz" - integrity sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w== - -leven@^3.1.0: - version "3.1.0" - resolved "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz" - integrity sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A== - -levn@^0.4.1: - version "0.4.1" - resolved "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz" - integrity sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ== - dependencies: - prelude-ls "^1.2.1" - type-check "~0.4.0" - -lines-and-columns@^1.1.6: - version "1.2.4" - resolved "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz" - integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg== - -llama-tokenizer-js@^1.1.3: - version "1.1.3" - resolved "https://registry.npmjs.org/llama-tokenizer-js/-/llama-tokenizer-js-1.1.3.tgz" - integrity sha512-+BUgsLCXVQJkjiD/t7PdESLn+yXJIRX/BJfwzVVYfKZ9aN3gsP9xoadBZxKnCxGz2Slby+S7x41gUr2TKNaS4Q== - -llm-code-highlighter@^0.0.13: - version "0.0.13" - resolved "https://registry.npmjs.org/llm-code-highlighter/-/llm-code-highlighter-0.0.13.tgz" - integrity sha512-dkJ8yKXiy3tMHJEA1p1ougAA5wE9K+vZKIkIjG7h+HHDoFy1yMLYIEBQIqofTI+/IwxibebC37Ijhm7qkanRJQ== - dependencies: - graphology "^0.25.4" - graphology-metrics "^2.2.0" - lodash "^4.17.21" - tree-sitter-wasms "^0.1.6" - web-tree-sitter "^0.20.8" - -locate-path@^5.0.0: - version "5.0.0" - resolved "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz" - integrity sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g== - dependencies: - p-locate "^4.1.0" - -locate-path@^6.0.0: - version "6.0.0" - resolved "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz" - integrity sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw== - dependencies: - p-locate "^5.0.0" - -lodash.assignwith@^4.2.0: - version "4.2.0" - resolved "https://registry.npmjs.org/lodash.assignwith/-/lodash.assignwith-4.2.0.tgz" - integrity sha512-ZznplvbvtjK2gMvnQ1BR/zqPFZmS6jbK4p+6Up4xcRYA7yMIwxHCfbTcrYxXKzzqLsQ05eJPVznEW3tuwV7k1g== - -lodash.camelcase@^4.3.0: - version "4.3.0" - resolved "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz" - integrity sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA== - -lodash.memoize@4.x: - version "4.1.2" - resolved "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz" - integrity sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag== - -lodash.merge@^4.6.2: - version "4.6.2" - resolved "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz" - integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== - -lodash@^4.17.21: - version "4.17.21" - resolved "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz" - integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== - -long@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/long/-/long-4.0.0.tgz" - integrity sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA== - -long@^5.2.1: - version "5.2.3" - resolved "https://registry.npmjs.org/long/-/long-5.2.3.tgz" - integrity sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q== - -lru-cache@^5.1.1: - version "5.1.1" - resolved "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz" - integrity sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w== - dependencies: - yallist "^3.0.2" - -lru-cache@^6.0.0: - version "6.0.0" - resolved "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz" - integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA== - dependencies: - yallist "^4.0.0" - -lru-cache@^7.14.1: - version "7.18.3" - resolved "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz" - integrity sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA== - -lru-cache@^8.0.0: - version "8.0.5" - resolved "https://registry.npmjs.org/lru-cache/-/lru-cache-8.0.5.tgz" - integrity sha512-MhWWlVnuab1RG5/zMRRcVGXZLCXrZTgfwMikgzCegsPnG62yDQo5JnqKkrK4jO5iKqDAZGItAqN5CtKBCBWRUA== - -make-dir@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz" - integrity sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw== - dependencies: - semver "^7.5.3" - -make-error@1.x: - version "1.3.6" - resolved "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz" - integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== - -make-fetch-happen@^9.1.0: - version "9.1.0" - resolved "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-9.1.0.tgz" - integrity sha512-+zopwDy7DNknmwPQplem5lAZX/eCOzSvSNNcSKm5eVwTkOBzoktEfXsa9L23J/GIRhxRsaxzkPEhrJEpE2F4Gg== - dependencies: - agentkeepalive "^4.1.3" - cacache "^15.2.0" - http-cache-semantics "^4.1.0" - http-proxy-agent "^4.0.1" - https-proxy-agent "^5.0.0" - is-lambda "^1.0.1" - lru-cache "^6.0.0" - minipass "^3.1.3" - minipass-collect "^1.0.2" - minipass-fetch "^1.3.2" - minipass-flush "^1.0.5" - minipass-pipeline "^1.2.4" - negotiator "^0.6.2" - promise-retry "^2.0.1" - socks-proxy-agent "^6.0.0" - ssri "^8.0.0" - -makeerror@1.0.12: - version "1.0.12" - resolved "https://registry.npmjs.org/makeerror/-/makeerror-1.0.12.tgz" - integrity sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg== - dependencies: - tmpl "1.0.5" - -md5@^2.3.0: - version "2.3.0" - resolved "https://registry.npmjs.org/md5/-/md5-2.3.0.tgz" - integrity sha512-T1GITYmFaKuO91vxyoQMFETst+O71VUPEU3ze5GNzDm0OWdP8v1ziTaAEPUr/3kLsY3Sftgz242A1SetQiDL7g== - dependencies: - charenc "0.0.2" - crypt "0.0.2" - is-buffer "~1.1.6" - -merge-stream@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz" - integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== - -micromatch@^4.0.4: - version "4.0.5" - resolved "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz" - integrity sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA== - dependencies: - braces "^3.0.2" - picomatch "^2.3.1" - -mime-db@1.52.0: - version "1.52.0" - resolved "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz" - integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== - -mime-types@^2.1.12: - version "2.1.35" - resolved "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz" - integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== - dependencies: - mime-db "1.52.0" - -mimic-fn@^2.1.0: - version "2.1.0" - resolved "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz" - integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== - -mimic-response@^3.1.0: - version "3.1.0" - resolved "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz" - integrity sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ== - -minimatch@^3.0.4, minimatch@^3.0.5, minimatch@^3.1.1, minimatch@^3.1.2: - version "3.1.2" - resolved "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz" - integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== - dependencies: - brace-expansion "^1.1.7" - -minimist@^1.2.0, minimist@^1.2.3, minimist@^1.2.5, minimist@^1.2.6: - version "1.2.8" - resolved "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz" - integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA== - -minipass-collect@^1.0.2: - version "1.0.2" - resolved "https://registry.npmjs.org/minipass-collect/-/minipass-collect-1.0.2.tgz" - integrity sha512-6T6lH0H8OG9kITm/Jm6tdooIbogG9e0tLgpY6mphXSm/A9u8Nq1ryBG+Qspiub9LjWlBPsPS3tWQ/Botq4FdxA== - dependencies: - minipass "^3.0.0" - -minipass-fetch@^1.3.2: - version "1.4.1" - resolved "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-1.4.1.tgz" - integrity sha512-CGH1eblLq26Y15+Azk7ey4xh0J/XfJfrCox5LDJiKqI2Q2iwOLOKrlmIaODiSQS8d18jalF6y2K2ePUm0CmShw== - dependencies: - minipass "^3.1.0" - minipass-sized "^1.0.3" - minizlib "^2.0.0" - optionalDependencies: - encoding "^0.1.12" - -minipass-flush@^1.0.5: - version "1.0.5" - resolved "https://registry.npmjs.org/minipass-flush/-/minipass-flush-1.0.5.tgz" - integrity sha512-JmQSYYpPUqX5Jyn1mXaRwOda1uQ8HP5KAT/oDSLCzt1BYRhQU0/hDtsB1ufZfEEzMZ9aAVmsBw8+FWsIXlClWw== - dependencies: - minipass "^3.0.0" - -minipass-pipeline@^1.2.2, minipass-pipeline@^1.2.4: - version "1.2.4" - resolved "https://registry.npmjs.org/minipass-pipeline/-/minipass-pipeline-1.2.4.tgz" - integrity sha512-xuIq7cIOt09RPRJ19gdi4b+RiNvDFYe5JH+ggNvBqGqpQXcru3PcRmOZuHBKWK1Txf9+cQ+HMVN4d6z46LZP7A== - dependencies: - minipass "^3.0.0" - -minipass-sized@^1.0.3: - version "1.0.3" - resolved "https://registry.npmjs.org/minipass-sized/-/minipass-sized-1.0.3.tgz" - integrity sha512-MbkQQ2CTiBMlA2Dm/5cY+9SWFEN8pzzOXi6rlM5Xxq0Yqbda5ZQy9sU75a673FE9ZK0Zsbr6Y5iP6u9nktfg2g== - dependencies: - minipass "^3.0.0" - -minipass@^3.0.0, minipass@^3.1.0, minipass@^3.1.1, minipass@^3.1.3: - version "3.3.6" - resolved "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz" - integrity sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw== - dependencies: - yallist "^4.0.0" - -minipass@^5.0.0: - version "5.0.0" - resolved "https://registry.npmjs.org/minipass/-/minipass-5.0.0.tgz" - integrity sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ== - -minizlib@^2.0.0, minizlib@^2.1.1: - version "2.1.2" - resolved "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz" - integrity sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg== - dependencies: - minipass "^3.0.0" - yallist "^4.0.0" - -mkdirp-classic@^0.5.2, mkdirp-classic@^0.5.3: - version "0.5.3" - resolved "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz" - integrity sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A== - -mkdirp@^1.0.3, mkdirp@^1.0.4: - version "1.0.4" - resolved "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz" - integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== - -mnemonist@^0.39.0: - version "0.39.7" - resolved "https://registry.npmjs.org/mnemonist/-/mnemonist-0.39.7.tgz" - integrity sha512-ix3FwHWZgdXUt0dHM8bCrI4r1KMeYx8bCunPCYmvKXq4tn6gbNsqrsb4q0kDbDqbpIOvEaW5Sn+dmDwGydfrwA== - dependencies: - obliterator "^2.0.1" - -ms@^2.0.0, ms@^2.1.1, ms@2.1.2: - version "2.1.2" - resolved "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz" - integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== - -mysql2@^3.9.1: - version "3.9.2" - resolved "https://registry.npmjs.org/mysql2/-/mysql2-3.9.2.tgz" - integrity sha512-3Cwg/UuRkAv/wm6RhtPE5L7JlPB877vwSF6gfLAS68H+zhH+u5oa3AieqEd0D0/kC3W7qIhYbH419f7O9i/5nw== - dependencies: - denque "^2.1.0" - generate-function "^2.3.1" - iconv-lite "^0.6.3" - long "^5.2.1" - lru-cache "^8.0.0" - named-placeholders "^1.1.3" - seq-queue "^0.0.5" - sqlstring "^2.3.2" - -named-placeholders@^1.1.3: - version "1.1.3" - resolved "https://registry.npmjs.org/named-placeholders/-/named-placeholders-1.1.3.tgz" - integrity sha512-eLoBxg6wE/rZkJPhU/xRX1WTpkFEwDJEN96oxFrTsqBdbT5ec295Q+CoHrL9IT0DipqKhmGcaZmwOt8OON5x1w== - dependencies: - lru-cache "^7.14.1" - -napi-build-utils@^1.0.1: - version "1.0.2" - resolved "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-1.0.2.tgz" - integrity sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg== - -natural-compare@^1.4.0: - version "1.4.0" - resolved "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz" - integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw== - -negotiator@^0.6.2: - version "0.6.3" - resolved "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz" - integrity sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg== - -neo-async@^2.6.2: - version "2.6.2" - resolved "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz" - integrity sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw== - -node-abi@^3.3.0: - version "3.54.0" - resolved "https://registry.npmjs.org/node-abi/-/node-abi-3.54.0.tgz" - integrity sha512-p7eGEiQil0YUV3ItH4/tBb781L5impVmmx2E9FRKF7d18XXzp4PGT2tdYMFY6wQqgxD0IwNZOiSJ0/K0fSi/OA== - dependencies: - semver "^7.3.5" - -node-addon-api@^6.1.0: - version "6.1.0" - resolved "https://registry.npmjs.org/node-addon-api/-/node-addon-api-6.1.0.tgz" - integrity sha512-+eawOlIgy680F0kBzPUNFhMZGtJ1YmqM6l4+Crf4IkImjYrO/mqPwRMh352g23uIaQKFItcQ64I7KMaJxHgAVA== - -node-addon-api@^7.0.0: - version "7.1.0" - resolved "https://registry.npmjs.org/node-addon-api/-/node-addon-api-7.1.0.tgz" - integrity sha512-mNcltoe1R8o7STTegSOHdnJNN7s5EUvhoS7ShnTHDyOSd+8H+UdWODq6qSv67PjC8Zc5JRT8+oLAMCr0SIXw7g== - -node-domexception@^1.0.0, node-domexception@1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz" - integrity sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ== - -node-fetch@^2.6.7: - version "2.7.0" - resolved "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz" - integrity sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A== - dependencies: - whatwg-url "^5.0.0" - -node-fetch@^3.3.2: - version "3.3.2" - resolved "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.2.tgz" - integrity sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA== - dependencies: - data-uri-to-buffer "^4.0.0" - fetch-blob "^3.1.4" - formdata-polyfill "^4.0.10" - -node-gyp@8.x: - version "8.4.1" - resolved "https://registry.npmjs.org/node-gyp/-/node-gyp-8.4.1.tgz" - integrity sha512-olTJRgUtAb/hOXG0E93wZDs5YiJlgbXxTwQAFHyNlRsXQnYzUaF2aGgujZbw+hR8aF4ZG/rST57bWMWD16jr9w== - dependencies: - env-paths "^2.2.0" - glob "^7.1.4" - graceful-fs "^4.2.6" - make-fetch-happen "^9.1.0" - nopt "^5.0.0" - npmlog "^6.0.0" - rimraf "^3.0.2" - semver "^7.3.5" - tar "^6.1.2" - which "^2.0.2" - -node-html-markdown@^1.3.0: - version "1.3.0" - resolved "https://registry.npmjs.org/node-html-markdown/-/node-html-markdown-1.3.0.tgz" - integrity sha512-OeFi3QwC/cPjvVKZ114tzzu+YoR+v9UXW5RwSXGUqGb0qCl0DvP406tzdL7SFn8pZrMyzXoisfG2zcuF9+zw4g== - dependencies: - node-html-parser "^6.1.1" - -node-html-parser@^6.1.1: - version "6.1.12" - resolved "https://registry.npmjs.org/node-html-parser/-/node-html-parser-6.1.12.tgz" - integrity sha512-/bT/Ncmv+fbMGX96XG9g05vFt43m/+SYKIs9oAemQVYyVcZmDAI2Xq/SbNcpOA35eF0Zk2av3Ksf+Xk8Vt8abA== - dependencies: - css-select "^5.1.0" - he "1.2.0" - -node-int64@^0.4.0: - version "0.4.0" - resolved "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz" - integrity sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw== - -node-releases@^2.0.14: - version "2.0.14" - resolved "https://registry.npmjs.org/node-releases/-/node-releases-2.0.14.tgz" - integrity sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw== - -nopt@^5.0.0: - version "5.0.0" - resolved "https://registry.npmjs.org/nopt/-/nopt-5.0.0.tgz" - integrity sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ== - dependencies: - abbrev "1" - -normalize-path@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz" - integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== - -npm-run-path@^4.0.1: - version "4.0.1" - resolved "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz" - integrity sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw== - dependencies: - path-key "^3.0.0" - -npmlog@^6.0.0: - version "6.0.2" - resolved "https://registry.npmjs.org/npmlog/-/npmlog-6.0.2.tgz" - integrity sha512-/vBvz5Jfr9dT/aFWd0FIRf+T/Q2WBsLENygUaFUqstqsycmZAP/t5BvFJTK0viFmSUxiUKTUplWy5vt+rvKIxg== - dependencies: - are-we-there-yet "^3.0.0" - console-control-strings "^1.1.0" - gauge "^4.0.3" - set-blocking "^2.0.0" - -nth-check@^2.0.1: - version "2.1.1" - resolved "https://registry.npmjs.org/nth-check/-/nth-check-2.1.1.tgz" - integrity sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w== - dependencies: - boolbase "^1.0.0" - -object-inspect@^1.13.1: - version "1.13.1" - resolved "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz" - integrity sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ== - -object-keys@^1.1.1: - version "1.1.1" - resolved "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz" - integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== - -object.assign@^4.1.2, object.assign@^4.1.5: - version "4.1.5" - resolved "https://registry.npmjs.org/object.assign/-/object.assign-4.1.5.tgz" - integrity sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ== - dependencies: - call-bind "^1.0.5" - define-properties "^1.2.1" - has-symbols "^1.0.3" - object-keys "^1.1.1" - -object.entries@^1.1.5: - version "1.1.7" - resolved "https://registry.npmjs.org/object.entries/-/object.entries-1.1.7.tgz" - integrity sha512-jCBs/0plmPsOnrKAfFQXRG2NFjlhZgjjcBLSmTnEhU8U6vVTsVe8ANeQJCHTl3gSsI4J+0emOoCgoKlmQPMgmA== - dependencies: - call-bind "^1.0.2" - define-properties "^1.2.0" - es-abstract "^1.22.1" - -object.fromentries@^2.0.7: - version "2.0.7" - resolved "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.7.tgz" - integrity sha512-UPbPHML6sL8PI/mOqPwsH4G6iyXcCGzLin8KvEPenOZN5lpCNBZZQ+V62vdjB1mQHrmqGQt5/OJzemUA+KJmEA== - dependencies: - call-bind "^1.0.2" - define-properties "^1.2.0" - es-abstract "^1.22.1" - -object.groupby@^1.0.1: - version "1.0.2" - resolved "https://registry.npmjs.org/object.groupby/-/object.groupby-1.0.2.tgz" - integrity sha512-bzBq58S+x+uo0VjurFT0UktpKHOZmv4/xePiOA1nbB9pMqpGK7rUPNgf+1YC+7mE+0HzhTMqNUuCqvKhj6FnBw== - dependencies: - array.prototype.filter "^1.0.3" - call-bind "^1.0.5" - define-properties "^1.2.1" - es-abstract "^1.22.3" - es-errors "^1.0.0" - -object.values@^1.1.7: - version "1.1.7" - resolved "https://registry.npmjs.org/object.values/-/object.values-1.1.7.tgz" - integrity sha512-aU6xnDFYT3x17e/f0IiiwlGPTy2jzMySGfUB4fq6z7CV8l85CWHDk5ErhyhpfDHhrOMwGFhSQkhMGHaIotA6Ng== - dependencies: - call-bind "^1.0.2" - define-properties "^1.2.0" - es-abstract "^1.22.1" - -obliterator@^2.0.1, obliterator@^2.0.2: - version "2.0.4" - resolved "https://registry.npmjs.org/obliterator/-/obliterator-2.0.4.tgz" - integrity sha512-lgHwxlxV1qIg1Eap7LgIeoBWIMFibOjbrYPIPJZcI1mmGAI2m3lNYpK12Y+GBdPQ0U1hRwSord7GIaawz962qQ== - -ollama@^0.4.6: - version "0.4.6" - resolved "https://registry.npmjs.org/ollama/-/ollama-0.4.6.tgz" - integrity sha512-/Im2atcM9hAxOgEi7mc5pG2G+MeN4jFo1bubfCzAd8bZT6nQ3he5tr+jypGufau9+WQKY0MHhTajqKTNfnlZQA== - dependencies: - whatwg-fetch "^3.6.20" - -once@^1.3.0, once@^1.3.1, once@^1.4.0: - version "1.4.0" - resolved "https://registry.npmjs.org/once/-/once-1.4.0.tgz" - integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w== - dependencies: - wrappy "1" - -onetime@^5.1.2: - version "5.1.2" - resolved "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz" - integrity sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg== - dependencies: - mimic-fn "^2.1.0" - -onnx-proto@^4.0.4: - version "4.0.4" - resolved "https://registry.npmjs.org/onnx-proto/-/onnx-proto-4.0.4.tgz" - integrity sha512-aldMOB3HRoo6q/phyB6QRQxSt895HNNw82BNyZ2CMh4bjeKv7g/c+VpAFtJuEMVfYLMbRx61hbuqnKceLeDcDA== - dependencies: - protobufjs "^6.8.8" - -onnxruntime-common@~1.14.0: - version "1.14.0" - resolved "https://registry.npmjs.org/onnxruntime-common/-/onnxruntime-common-1.14.0.tgz" - integrity sha512-3LJpegM2iMNRX2wUmtYfeX/ytfOzNwAWKSq1HbRrKc9+uqG/FsEA0bbKZl1btQeZaXhC26l44NWpNUeXPII7Ew== - -onnxruntime-node@1.14.0: - version "1.14.0" - resolved "https://registry.npmjs.org/onnxruntime-node/-/onnxruntime-node-1.14.0.tgz" - integrity sha512-5ba7TWomIV/9b6NH/1x/8QEeowsb+jBEvFzU6z0T4mNsFwdPqXeFUM7uxC6QeSRkEbWu3qEB0VMjrvzN/0S9+w== - dependencies: - onnxruntime-common "~1.14.0" - -onnxruntime-web@1.14.0: - version "1.14.0" - resolved "https://registry.npmjs.org/onnxruntime-web/-/onnxruntime-web-1.14.0.tgz" - integrity sha512-Kcqf43UMfW8mCydVGcX9OMXI2VN17c0p6XvR7IPSZzBf/6lteBzXHvcEVWDPmCKuGombl997HgLqj91F11DzXw== - dependencies: - flatbuffers "^1.12.0" - guid-typescript "^1.0.9" - long "^4.0.0" - onnx-proto "^4.0.4" - onnxruntime-common "~1.14.0" - platform "^1.3.6" - -openai@^4.20.1: - version "4.24.7" - resolved "https://registry.npmjs.org/openai/-/openai-4.24.7.tgz" - integrity sha512-JUesECWPtsDHO0TlZGb6q73hnAmXUdzj9NrwgZeL4lqlRt/kR1sWrXoy8LocxN/6uOtitywvcJqe0O1PLkG45g== - dependencies: - "@types/node" "^18.11.18" - "@types/node-fetch" "^2.6.4" - abort-controller "^3.0.0" - agentkeepalive "^4.2.1" - digest-fetch "^1.3.0" - form-data-encoder "1.7.2" - formdata-node "^4.3.2" - node-fetch "^2.6.7" - web-streams-polyfill "^3.2.1" - -optionator@^0.9.3: - version "0.9.3" - resolved "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz" - integrity sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg== - dependencies: - "@aashutoshrathi/word-wrap" "^1.2.3" - deep-is "^0.1.3" - fast-levenshtein "^2.0.6" - levn "^0.4.1" - prelude-ls "^1.2.1" - type-check "^0.4.0" - -p-limit@^2.2.0: - version "2.3.0" - resolved "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz" - integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== - dependencies: - p-try "^2.0.0" - -p-limit@^3.0.2, p-limit@^3.1.0: - version "3.1.0" - resolved "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz" - integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== - dependencies: - yocto-queue "^0.1.0" - -p-locate@^4.1.0: - version "4.1.0" - resolved "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz" - integrity sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A== - dependencies: - p-limit "^2.2.0" - -p-locate@^5.0.0: - version "5.0.0" - resolved "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz" - integrity sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw== - dependencies: - p-limit "^3.0.2" - -p-map@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz" - integrity sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ== - dependencies: - aggregate-error "^3.0.0" - -p-try@^2.0.0: - version "2.2.0" - resolved "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz" - integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== - -packet-reader@1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/packet-reader/-/packet-reader-1.0.0.tgz" - integrity sha512-HAKu/fG3HpHFO0AA8WE8q2g+gBJaZ9MG7fcKk+IJPLTGAD6Psw4443l+9DGRbOIh3/aXr7Phy0TjilYivJo5XQ== - -pad-left@^2.1.0: - version "2.1.0" - resolved "https://registry.npmjs.org/pad-left/-/pad-left-2.1.0.tgz" - integrity sha512-HJxs9K9AztdIQIAIa/OIazRAUW/L6B9hbQDxO4X07roW3eo9XqZc2ur9bn1StH9CnbbI9EgvejHQX7CBpCF1QA== - dependencies: - repeat-string "^1.5.4" - -parent-module@^1.0.0: - version "1.0.1" - resolved "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz" - integrity sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g== - dependencies: - callsites "^3.0.0" - -parse-json@^5.2.0: - version "5.2.0" - resolved "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz" - integrity sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg== - dependencies: - "@babel/code-frame" "^7.0.0" - error-ex "^1.3.1" - json-parse-even-better-errors "^2.3.0" - lines-and-columns "^1.1.6" - -parse5-htmlparser2-tree-adapter@^7.0.0: - version "7.0.0" - resolved "https://registry.npmjs.org/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-7.0.0.tgz" - integrity sha512-B77tOZrqqfUfnVcOrUvfdLbz4pu4RopLD/4vmu3HUPswwTA8OH0EMW9BlWR2B0RCoiZRAHEUu7IxeP1Pd1UU+g== - dependencies: - domhandler "^5.0.2" - parse5 "^7.0.0" - -parse5@^7.0.0: - version "7.1.2" - resolved "https://registry.npmjs.org/parse5/-/parse5-7.1.2.tgz" - integrity sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw== - dependencies: - entities "^4.4.0" - -path-exists@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz" - integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== - -path-is-absolute@^1.0.0: - version "1.0.1" - resolved "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz" - integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg== - -path-key@^3.0.0, path-key@^3.1.0: - version "3.1.1" - resolved "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz" - integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== - -path-parse@^1.0.7: - version "1.0.7" - resolved "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz" - integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== - -pg-cloudflare@^1.1.1: - version "1.1.1" - resolved "https://registry.npmjs.org/pg-cloudflare/-/pg-cloudflare-1.1.1.tgz" - integrity sha512-xWPagP/4B6BgFO+EKz3JONXv3YDgvkbVrGw2mTo3D6tVDQRh1e7cqVGvyR3BE+eQgAvx1XhW/iEASj4/jCWl3Q== - -pg-connection-string@^2.6.2: - version "2.6.2" - resolved "https://registry.npmjs.org/pg-connection-string/-/pg-connection-string-2.6.2.tgz" - integrity sha512-ch6OwaeaPYcova4kKZ15sbJ2hKb/VP48ZD2gE7i1J+L4MspCtBMAx8nMgz7bksc7IojCIIWuEhHibSMFH8m8oA== - -pg-int8@1.0.1: - version "1.0.1" - resolved "https://registry.npmjs.org/pg-int8/-/pg-int8-1.0.1.tgz" - integrity sha512-WCtabS6t3c8SkpDBUlb1kjOs7l66xsGdKpIPZsg4wR+B3+u9UAum2odSsF9tnvxg80h4ZxLWMy4pRjOsFIqQpw== - -pg-pool@^3.6.1: - version "3.6.1" - resolved "https://registry.npmjs.org/pg-pool/-/pg-pool-3.6.1.tgz" - integrity sha512-jizsIzhkIitxCGfPRzJn1ZdcosIt3pz9Sh3V01fm1vZnbnCMgmGl5wvGGdNN2EL9Rmb0EcFoCkixH4Pu+sP9Og== - -pg-protocol@^1.6.0: - version "1.6.0" - resolved "https://registry.npmjs.org/pg-protocol/-/pg-protocol-1.6.0.tgz" - integrity sha512-M+PDm637OY5WM307051+bsDia5Xej6d9IR4GwJse1qA1DIhiKlksvrneZOYQq42OM+spubpcNYEo2FcKQrDk+Q== - -pg-types@^2.1.0: - version "2.2.0" - resolved "https://registry.npmjs.org/pg-types/-/pg-types-2.2.0.tgz" - integrity sha512-qTAAlrEsl8s4OiEQY69wDvcMIdQN6wdz5ojQiOy6YRMuynxenON0O5oCpJI6lshc6scgAY8qvJ2On/p+CXY0GA== - dependencies: - pg-int8 "1.0.1" - postgres-array "~2.0.0" - postgres-bytea "~1.0.0" - postgres-date "~1.0.4" - postgres-interval "^1.1.0" - -pg@^8.11.3, pg@>=8.0: - version "8.11.3" - resolved "https://registry.npmjs.org/pg/-/pg-8.11.3.tgz" - integrity sha512-+9iuvG8QfaaUrrph+kpF24cXkH1YOOUeArRNYIxq1viYHZagBxrTno7cecY1Fa44tJeZvaoG+Djpkc3JwehN5g== - dependencies: - buffer-writer "2.0.0" - packet-reader "1.0.0" - pg-connection-string "^2.6.2" - pg-pool "^3.6.1" - pg-protocol "^1.6.0" - pg-types "^2.1.0" - pgpass "1.x" - optionalDependencies: - pg-cloudflare "^1.1.1" - -pgpass@1.x: - version "1.0.5" - resolved "https://registry.npmjs.org/pgpass/-/pgpass-1.0.5.tgz" - integrity sha512-FdW9r/jQZhSeohs1Z3sI1yxFQNFvMcnmfuj4WBMUTxOrAyLMaTcE1aAMBiTlbMNaXvBCQuVi0R7hd8udDSP7ug== - dependencies: - split2 "^4.1.0" - -picocolors@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz" - integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ== - -picomatch@^2.0.4, picomatch@^2.2.3, picomatch@^2.3.1: - version "2.3.1" - resolved "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz" - integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== - -pirates@^4.0.4: - version "4.0.6" - resolved "https://registry.npmjs.org/pirates/-/pirates-4.0.6.tgz" - integrity sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg== - -pkg-dir@^4.2.0: - version "4.2.0" - resolved "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz" - integrity sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ== - dependencies: - find-up "^4.0.0" - -platform@^1.3.6: - version "1.3.6" - resolved "https://registry.npmjs.org/platform/-/platform-1.3.6.tgz" - integrity sha512-fnWVljUchTro6RiCFvCXBbNhJc2NijN7oIQxbwsyL0buWJPG85v81ehlHI9fXrJsMNgTofEoWIQeClKpgxFLrg== - -possible-typed-array-names@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.0.0.tgz" - integrity sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q== - -postgres-array@~2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/postgres-array/-/postgres-array-2.0.0.tgz" - integrity sha512-VpZrUqU5A69eQyW2c5CA1jtLecCsN2U/bD6VilrFDWq5+5UIEVO7nazS3TEcHf1zuPYO/sqGvUvW62g86RXZuA== - -postgres-bytea@~1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/postgres-bytea/-/postgres-bytea-1.0.0.tgz" - integrity sha512-xy3pmLuQqRBZBXDULy7KbaitYqLcmxigw14Q5sj8QBVLqEwXfeybIKVWiqAXTlcvdvb0+xkOtDbfQMOf4lST1w== - -postgres-date@~1.0.4: - version "1.0.7" - resolved "https://registry.npmjs.org/postgres-date/-/postgres-date-1.0.7.tgz" - integrity sha512-suDmjLVQg78nMK2UZ454hAG+OAW+HQPZ6n++TNDUX+L0+uUlLywnoxJKDou51Zm+zTCjrCl0Nq6J9C5hP9vK/Q== - -postgres-interval@^1.1.0: - version "1.2.0" - resolved "https://registry.npmjs.org/postgres-interval/-/postgres-interval-1.2.0.tgz" - integrity sha512-9ZhXKM/rw350N1ovuWHbGxnGh/SNJ4cnxHiM0rxE4VN41wsg8P8zWn9hv/buK00RP4WvlOyr/RBDiptyxVbkZQ== - dependencies: - xtend "^4.0.0" - -posthog-node@^3.6.2: - version "3.6.2" - resolved "https://registry.npmjs.org/posthog-node/-/posthog-node-3.6.2.tgz" - integrity sha512-tVIaShR3SxBx17AlAUS86jQTweKuJIFRedBB504fCz7YPnXJTYSrVcUHn5IINE2wu4jUQimQK6ihQr90Djrdrg== - dependencies: - axios "^1.6.2" - rusha "^0.8.14" - -prebuild-install@^7.1.1: - version "7.1.1" - resolved "https://registry.npmjs.org/prebuild-install/-/prebuild-install-7.1.1.tgz" - integrity sha512-jAXscXWMcCK8GgCoHOfIr0ODh5ai8mj63L2nWrjuAgXE6tDyYGnx4/8o/rCgU+B4JSyZBKbeZqzhtwtC3ovxjw== - dependencies: - detect-libc "^2.0.0" - expand-template "^2.0.3" - github-from-package "0.0.0" - minimist "^1.2.3" - mkdirp-classic "^0.5.3" - napi-build-utils "^1.0.1" - node-abi "^3.3.0" - pump "^3.0.0" - rc "^1.2.7" - simple-get "^4.0.0" - tar-fs "^2.0.0" - tunnel-agent "^0.6.0" - -prelude-ls@^1.2.1: - version "1.2.1" - resolved "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz" - integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== - -pretty-format@^29.0.0, pretty-format@^29.7.0: - version "29.7.0" - resolved "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz" - integrity sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ== - dependencies: - "@jest/schemas" "^29.6.3" - ansi-styles "^5.0.0" - react-is "^18.0.0" - -process@^0.11.10: - version "0.11.10" - resolved "https://registry.npmjs.org/process/-/process-0.11.10.tgz" - integrity sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A== - -promise-inflight@^1.0.1: - version "1.0.1" - resolved "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz" - integrity sha512-6zWPyEOFaQBJYcGMHBKTKJ3u6TBsnMFOIZSa6ce1e/ZrrsOlnHRHbabMjLiBYKp+n44X9eUI6VUPaukCXHuG4g== - -promise-retry@^2.0.1: - version "2.0.1" - resolved "https://registry.npmjs.org/promise-retry/-/promise-retry-2.0.1.tgz" - integrity sha512-y+WKFlBR8BGXnsNlIHFGPZmyDf3DFMoLhaflAnyZgV6rG6xu+JwesTo2Q9R6XwYmtmwAFCkAk3e35jEdoeh/3g== - dependencies: - err-code "^2.0.2" - retry "^0.12.0" - -prompts@^2.0.1: - version "2.4.2" - resolved "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz" - integrity sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q== - dependencies: - kleur "^3.0.3" - sisteransi "^1.0.5" - -protobufjs@^6.8.8: - version "6.11.4" - resolved "https://registry.npmjs.org/protobufjs/-/protobufjs-6.11.4.tgz" - integrity sha512-5kQWPaJHi1WoCpjTGszzQ32PG2F4+wRY6BmAT4Vfw56Q2FZ4YZzK20xUYQH4YkfehY1e6QSICrJquM6xXZNcrw== - dependencies: - "@protobufjs/aspromise" "^1.1.2" - "@protobufjs/base64" "^1.1.2" - "@protobufjs/codegen" "^2.0.4" - "@protobufjs/eventemitter" "^1.1.0" - "@protobufjs/fetch" "^1.1.0" - "@protobufjs/float" "^1.0.2" - "@protobufjs/inquire" "^1.1.0" - "@protobufjs/path" "^1.1.2" - "@protobufjs/pool" "^1.1.0" - "@protobufjs/utf8" "^1.1.0" - "@types/long" "^4.0.1" - "@types/node" ">=13.7.0" - long "^4.0.0" - -proxy-from-env@^1.1.0: - version "1.1.0" - resolved "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz" - integrity sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg== - -pump@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz" - integrity sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww== - dependencies: - end-of-stream "^1.1.0" - once "^1.3.1" - -punycode@^2.1.0: - version "2.3.1" - resolved "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz" - integrity sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg== - -pure-rand@^6.0.0: - version "6.0.4" - resolved "https://registry.npmjs.org/pure-rand/-/pure-rand-6.0.4.tgz" - integrity sha512-LA0Y9kxMYv47GIPJy6MI84fqTd2HmYZI83W/kM/SkKfDlajnZYfmXFTxkbY+xSBPkLJxltMa9hIkmdc29eguMA== - -queue-microtask@^1.2.2: - version "1.2.3" - resolved "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz" - integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== - -queue-tick@^1.0.1: - version "1.0.1" - resolved "https://registry.npmjs.org/queue-tick/-/queue-tick-1.0.1.tgz" - integrity sha512-kJt5qhMxoszgU/62PLP1CJytzd2NKetjSRnyuj31fDd3Rlcz3fzlFdFLD1SItunPwyqEOkca6GbV612BWfaBag== - -rc@^1.2.7: - version "1.2.8" - resolved "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz" - integrity sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw== - dependencies: - deep-extend "^0.6.0" - ini "~1.3.0" - minimist "^1.2.0" - strip-json-comments "~2.0.1" - -react-is@^18.0.0: - version "18.2.0" - resolved "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz" - integrity sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w== - -readable-stream@^3.1.1: - version "3.6.2" - resolved "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz" - integrity sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA== - dependencies: - inherits "^2.0.3" - string_decoder "^1.1.1" - util-deprecate "^1.0.1" - -readable-stream@^3.4.0: - version "3.6.2" - resolved "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz" - integrity sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA== - dependencies: - inherits "^2.0.3" - string_decoder "^1.1.1" - util-deprecate "^1.0.1" - -readable-stream@^3.6.0: - version "3.6.2" - resolved "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz" - integrity sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA== - dependencies: - inherits "^2.0.3" - string_decoder "^1.1.1" - util-deprecate "^1.0.1" - -readable-stream@>=4.0.0: - version "4.5.2" - resolved "https://registry.npmjs.org/readable-stream/-/readable-stream-4.5.2.tgz" - integrity sha512-yjavECdqeZ3GLXNgRXgeQEdz9fvDDkNKyHnbHRFtOr7/LcfgBcmct7t/ET+HaCTqfh06OzoAxrkN/IfjJBVe+g== - dependencies: - abort-controller "^3.0.0" - buffer "^6.0.3" - events "^3.3.0" - process "^0.11.10" - string_decoder "^1.3.0" - -regexp.prototype.flags@^1.5.2: - version "1.5.2" - resolved "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.2.tgz" - integrity sha512-NcDiDkTLuPR+++OCKB0nWafEmhg/Da8aUPLPMQbK+bxKKCm1/S5he+AqYa4PlMCVBalb4/yxIRub6qkEx5yJbw== - dependencies: - call-bind "^1.0.6" - define-properties "^1.2.1" - es-errors "^1.3.0" - set-function-name "^2.0.1" - -repeat-string@^1.5.4: - version "1.6.1" - resolved "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz" - integrity sha512-PV0dzCYDNfRi1jCDbJzpW7jNNDRuCOG/jI5ctQcGKt/clZD+YcPS3yIlWuTJMmESC8aevCFmWJy5wjAFgNqN6w== - -replicate@^0.26.0: - version "0.26.0" - resolved "https://registry.npmjs.org/replicate/-/replicate-0.26.0.tgz" - integrity sha512-BR7zI/pJp11IuCZZ38hdJVZ07ZCfe6b3tbPuUpRIbt76sVKoGtQhn4Cp2H6/r6qU1fOO6dHadl2VKK4Y0j9Lkg== - optionalDependencies: - readable-stream ">=4.0.0" - -require-directory@^2.1.1: - version "2.1.1" - resolved "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz" - integrity sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q== - -resolve-cwd@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz" - integrity sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg== - dependencies: - resolve-from "^5.0.0" - -resolve-from@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz" - integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== - -resolve-from@^5.0.0: - version "5.0.0" - resolved "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz" - integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw== - -resolve.exports@^2.0.0: - version "2.0.2" - resolved "https://registry.npmjs.org/resolve.exports/-/resolve.exports-2.0.2.tgz" - integrity sha512-X2UW6Nw3n/aMgDVy+0rSqgHlv39WZAlZrXCdnbyEiKm17DSqHX4MmQMaST3FbeWR5FTuRcUwYAziZajji0Y7mg== - -resolve@^1.20.0, resolve@^1.22.4: - version "1.22.8" - resolved "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz" - integrity sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw== - dependencies: - is-core-module "^2.13.0" - path-parse "^1.0.7" - supports-preserve-symlinks-flag "^1.0.0" - -retry@^0.12.0: - version "0.12.0" - resolved "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz" - integrity sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow== - -reusify@^1.0.4: - version "1.0.4" - resolved "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz" - integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== - -rimraf@^3.0.2: - version "3.0.2" - resolved "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz" - integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== - dependencies: - glob "^7.1.3" - -run-parallel@^1.1.9: - version "1.2.0" - resolved "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz" - integrity sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA== - dependencies: - queue-microtask "^1.2.2" - -rusha@^0.8.14: - version "0.8.14" - resolved "https://registry.npmjs.org/rusha/-/rusha-0.8.14.tgz" - integrity sha512-cLgakCUf6PedEu15t8kbsjnwIFFR2D4RfL+W3iWFJ4iac7z4B0ZI8fxy4R3J956kAI68HclCFGL8MPoUVC3qVA== - -safe-array-concat@^1.1.0: - version "1.1.0" - resolved "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.0.tgz" - integrity sha512-ZdQ0Jeb9Ofti4hbt5lX3T2JcAamT9hfzYU1MNB+z/jaEbB6wfFfPIR/zEORmZqobkCCJhSjodobH6WHNmJ97dg== - dependencies: - call-bind "^1.0.5" - get-intrinsic "^1.2.2" - has-symbols "^1.0.3" - isarray "^2.0.5" - -safe-buffer@^5.0.1, safe-buffer@~5.2.0: - version "5.2.1" - resolved "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz" - integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== - -safe-regex-test@^1.0.3: - version "1.0.3" - resolved "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.3.tgz" - integrity sha512-CdASjNJPvRa7roO6Ra/gLYBTzYzzPyyBXxIMdGW3USQLyjWEls2RgW5UBTXaQVp+OrpeCK3bLem8smtmheoRuw== - dependencies: - call-bind "^1.0.6" - es-errors "^1.3.0" - is-regex "^1.1.4" - -"safer-buffer@>= 2.1.2 < 3.0.0": - version "2.1.2" - resolved "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz" - integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== - -semver@^6.3.0, semver@^6.3.1: - version "6.3.1" - resolved "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz" - integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== - -semver@^7.3.5: - version "7.5.4" - resolved "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz" - integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA== - dependencies: - lru-cache "^6.0.0" - -semver@^7.5.3: - version "7.5.4" - resolved "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz" - integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA== - dependencies: - lru-cache "^6.0.0" - -semver@^7.5.4: - version "7.5.4" - resolved "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz" - integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA== - dependencies: - lru-cache "^6.0.0" - -seq-queue@^0.0.5: - version "0.0.5" - resolved "https://registry.npmjs.org/seq-queue/-/seq-queue-0.0.5.tgz" - integrity sha512-hr3Wtp/GZIc/6DAGPDcV4/9WoZhjrkXsi5B/07QgX8tsdc6ilr7BFM6PM6rbdAX1kFSDYeZGLipIZZKyQP0O5Q== - -set-blocking@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz" - integrity sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw== - -set-function-length@^1.2.1: - version "1.2.1" - resolved "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.1.tgz" - integrity sha512-j4t6ccc+VsKwYHso+kElc5neZpjtq9EnRICFZtWyBsLojhmeF/ZBd/elqm22WJh/BziDe/SBiOeAt0m2mfLD0g== - dependencies: - define-data-property "^1.1.2" - es-errors "^1.3.0" - function-bind "^1.1.2" - get-intrinsic "^1.2.3" - gopd "^1.0.1" - has-property-descriptors "^1.0.1" - -set-function-name@^2.0.1: - version "2.0.2" - resolved "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.2.tgz" - integrity sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ== - dependencies: - define-data-property "^1.1.4" - es-errors "^1.3.0" - functions-have-names "^1.2.3" - has-property-descriptors "^1.0.2" - -sharp@^0.32.0: - version "0.32.6" - resolved "https://registry.npmjs.org/sharp/-/sharp-0.32.6.tgz" - integrity sha512-KyLTWwgcR9Oe4d9HwCwNM2l7+J0dUQwn/yf7S0EnTtb0eVS4RxO0eUSvxPtzT4F3SY+C4K6fqdv/DO27sJ/v/w== - dependencies: - color "^4.2.3" - detect-libc "^2.0.2" - node-addon-api "^6.1.0" - prebuild-install "^7.1.1" - semver "^7.5.4" - simple-get "^4.0.1" - tar-fs "^3.0.4" - tunnel-agent "^0.6.0" - -shebang-command@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz" - integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== - dependencies: - shebang-regex "^3.0.0" - -shebang-regex@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz" - integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== - -side-channel@^1.0.4: - version "1.0.5" - resolved "https://registry.npmjs.org/side-channel/-/side-channel-1.0.5.tgz" - integrity sha512-QcgiIWV4WV7qWExbN5llt6frQB/lBven9pqliLXfGPB+K9ZYXxDozp0wLkHS24kWCm+6YXH/f0HhnObZnZOBnQ== - dependencies: - call-bind "^1.0.6" - es-errors "^1.3.0" - get-intrinsic "^1.2.4" - object-inspect "^1.13.1" - -signal-exit@^3.0.3, signal-exit@^3.0.7: - version "3.0.7" - resolved "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz" - integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== - -simple-concat@^1.0.0: - version "1.0.1" - resolved "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz" - integrity sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q== - -simple-get@^4.0.0, simple-get@^4.0.1: - version "4.0.1" - resolved "https://registry.npmjs.org/simple-get/-/simple-get-4.0.1.tgz" - integrity sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA== - dependencies: - decompress-response "^6.0.0" - once "^1.3.1" - simple-concat "^1.0.0" - -simple-swizzle@^0.2.2: - version "0.2.2" - resolved "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz" - integrity sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg== - dependencies: - is-arrayish "^0.3.1" - -sisteransi@^1.0.5: - version "1.0.5" - resolved "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz" - integrity sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg== - -slash@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz" - integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== - -smart-buffer@^4.2.0: - version "4.2.0" - resolved "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz" - integrity sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg== - -socket.io-client@^4.7.3: - version "4.7.4" - resolved "https://registry.npmjs.org/socket.io-client/-/socket.io-client-4.7.4.tgz" - integrity sha512-wh+OkeF0rAVCrABWQBaEjLfb7DVPotMbu0cgWgyR0v6eA4EoVnAwcIeIbcdTE3GT/H3kbdLl7OoH2+asoDRIIg== - dependencies: - "@socket.io/component-emitter" "~3.1.0" - debug "~4.3.2" - engine.io-client "~6.5.2" - socket.io-parser "~4.2.4" - -socket.io-parser@~4.2.4: - version "4.2.4" - resolved "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-4.2.4.tgz" - integrity sha512-/GbIKmo8ioc+NIWIhwdecY0ge+qVBSMdgxGygevmdHj24bsfgtCmcUUcQ5ZzcylGFHsN3k4HB4Cgkl96KVnuew== - dependencies: - "@socket.io/component-emitter" "~3.1.0" - debug "~4.3.1" - -socks-proxy-agent@^6.0.0: - version "6.2.1" - resolved "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-6.2.1.tgz" - integrity sha512-a6KW9G+6B3nWZ1yB8G7pJwL3ggLy1uTzKAgCb7ttblwqdz9fMGJUuTy3uFzEP48FAs9FLILlmzDlE2JJhVQaXQ== - dependencies: - agent-base "^6.0.2" - debug "^4.3.3" - socks "^2.6.2" - -socks@^2.6.2: - version "2.7.1" - resolved "https://registry.npmjs.org/socks/-/socks-2.7.1.tgz" - integrity sha512-7maUZy1N7uo6+WVEX6psASxtNlKaNVMlGQKkG/63nEDdLOWNbiUMoLK7X4uYoLhQstau72mLgfEWcXcwsaHbYQ== - dependencies: - ip "^2.0.0" - smart-buffer "^4.2.0" - -source-map-support@0.5.13: - version "0.5.13" - resolved "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz" - integrity sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w== - dependencies: - buffer-from "^1.0.0" - source-map "^0.6.0" - -source-map@^0.6.0, source-map@^0.6.1: - version "0.6.1" - resolved "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz" - integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== - -split2@^4.1.0: - version "4.2.0" - resolved "https://registry.npmjs.org/split2/-/split2-4.2.0.tgz" - integrity sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg== - -sprintf-js@~1.0.2: - version "1.0.3" - resolved "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz" - integrity sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g== - -sqlite@^5.1.1: - version "5.1.1" - resolved "https://registry.npmjs.org/sqlite/-/sqlite-5.1.1.tgz" - integrity sha512-oBkezXa2hnkfuJwUo44Hl9hS3er+YFtueifoajrgidvqsJRQFpc5fKoAkAor1O5ZnLoa28GBScfHXs8j0K358Q== - -sqlite3@^5.1.7: - version "5.1.7" - resolved "https://registry.npmjs.org/sqlite3/-/sqlite3-5.1.7.tgz" - integrity sha512-GGIyOiFaG+TUra3JIfkI/zGP8yZYLPQ0pl1bH+ODjiX57sPhrLU5sQJn1y9bDKZUFYkX1crlrPfSYt0BKKdkog== - dependencies: - bindings "^1.5.0" - node-addon-api "^7.0.0" - prebuild-install "^7.1.1" - tar "^6.1.11" - optionalDependencies: - node-gyp "8.x" - -sqlstring@^2.3.2: - version "2.3.3" - resolved "https://registry.npmjs.org/sqlstring/-/sqlstring-2.3.3.tgz" - integrity sha512-qC9iz2FlN7DQl3+wjwn3802RTyjCx7sDvfQEXchwa6CWOx07/WVfh91gBmQ9fahw8snwGEWU3xGzOt4tFyHLxg== - -ssri@^8.0.0, ssri@^8.0.1: - version "8.0.1" - resolved "https://registry.npmjs.org/ssri/-/ssri-8.0.1.tgz" - integrity sha512-97qShzy1AiyxvPNIkLWoGua7xoQzzPjQ0HAH4B0rWKo7SZ6USuPcrUiAFrws0UH8RrbWmgq3LMTObhPIHbbBeQ== - dependencies: - minipass "^3.1.1" - -stack-utils@^2.0.3: - version "2.0.6" - resolved "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.6.tgz" - integrity sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ== - dependencies: - escape-string-regexp "^2.0.0" - -stream-read-all@^3.0.1: - version "3.0.1" - resolved "https://registry.npmjs.org/stream-read-all/-/stream-read-all-3.0.1.tgz" - integrity sha512-EWZT9XOceBPlVJRrYcykW8jyRSZYbkb/0ZK36uLEmoWVO5gxBOnntNTseNzfREsqxqdfEGQrD8SXQ3QWbBmq8A== - -streamx@^2.15.0: - version "2.15.6" - resolved "https://registry.npmjs.org/streamx/-/streamx-2.15.6.tgz" - integrity sha512-q+vQL4AAz+FdfT137VF69Cc/APqUbxy+MDOImRrMvchJpigHj9GksgDU2LYbO9rx7RX6osWgxJB2WxhYv4SZAw== - dependencies: - fast-fifo "^1.1.0" - queue-tick "^1.0.1" - -string_decoder@^1.1.1, string_decoder@^1.3.0: - version "1.3.0" - resolved "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz" - integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== - dependencies: - safe-buffer "~5.2.0" - -string-length@^4.0.1: - version "4.0.2" - resolved "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz" - integrity sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ== - dependencies: - char-regex "^1.0.2" - strip-ansi "^6.0.0" - -"string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: - version "4.2.3" - resolved "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz" - integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== - dependencies: - emoji-regex "^8.0.0" - is-fullwidth-code-point "^3.0.0" - strip-ansi "^6.0.1" - -string.prototype.trim@^1.2.8: - version "1.2.8" - resolved "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.8.tgz" - integrity sha512-lfjY4HcixfQXOfaqCvcBuOIapyaroTXhbkfJN3gcB1OtyupngWK4sEET9Knd0cXd28kTUqu/kHoV4HKSJdnjiQ== - dependencies: - call-bind "^1.0.2" - define-properties "^1.2.0" - es-abstract "^1.22.1" - -string.prototype.trimend@^1.0.7: - version "1.0.7" - resolved "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.7.tgz" - integrity sha512-Ni79DqeB72ZFq1uH/L6zJ+DKZTkOtPIHovb3YZHQViE+HDouuU4mBrLOLDn5Dde3RF8qw5qVETEjhu9locMLvA== - dependencies: - call-bind "^1.0.2" - define-properties "^1.2.0" - es-abstract "^1.22.1" - -string.prototype.trimstart@^1.0.7: - version "1.0.7" - resolved "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.7.tgz" - integrity sha512-NGhtDFu3jCEm7B4Fy0DpLewdJQOZcQ0rGbwQ/+stjnrp2i+rlKeCvos9hOIeCmqwratM47OBxY7uFZzjxHXmrg== - dependencies: - call-bind "^1.0.2" - define-properties "^1.2.0" - es-abstract "^1.22.1" - -strip-ansi@^6.0.0, strip-ansi@^6.0.1: - version "6.0.1" - resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz" - integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== - dependencies: - ansi-regex "^5.0.1" - -strip-bom@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz" - integrity sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA== - -strip-bom@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz" - integrity sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w== - -strip-final-newline@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz" - integrity sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA== - -strip-json-comments@^3.1.1: - version "3.1.1" - resolved "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz" - integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== - -strip-json-comments@~2.0.1: - version "2.0.1" - resolved "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz" - integrity sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ== - -supports-color@^5.3.0: - version "5.5.0" - resolved "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz" - integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== - dependencies: - has-flag "^3.0.0" - -supports-color@^7.1.0: - version "7.2.0" - resolved "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz" - integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== - dependencies: - has-flag "^4.0.0" - -supports-color@^8.0.0: - version "8.1.1" - resolved "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz" - integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== - dependencies: - has-flag "^4.0.0" - -supports-preserve-symlinks-flag@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz" - integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== - -table-layout@^3.0.0: - version "3.0.2" - resolved "https://registry.npmjs.org/table-layout/-/table-layout-3.0.2.tgz" - integrity sha512-rpyNZYRw+/C+dYkcQ3Pr+rLxW4CfHpXjPDnG7lYhdRoUcZTUt+KEsX+94RGp/aVp/MQU35JCITv2T/beY4m+hw== - dependencies: - "@75lb/deep-merge" "^1.1.1" - array-back "^6.2.2" - command-line-args "^5.2.1" - command-line-usage "^7.0.0" - stream-read-all "^3.0.1" - typical "^7.1.1" - wordwrapjs "^5.1.0" - -tar-fs@^2.0.0: - version "2.1.1" - resolved "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz" - integrity sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng== - dependencies: - chownr "^1.1.1" - mkdirp-classic "^0.5.2" - pump "^3.0.0" - tar-stream "^2.1.4" - -tar-fs@^3.0.4: - version "3.0.4" - resolved "https://registry.npmjs.org/tar-fs/-/tar-fs-3.0.4.tgz" - integrity sha512-5AFQU8b9qLfZCX9zp2duONhPmZv0hGYiBPJsyUdqMjzq/mqVpy/rEUSeHk1+YitmxugaptgBh5oDGU3VsAJq4w== - dependencies: - mkdirp-classic "^0.5.2" - pump "^3.0.0" - tar-stream "^3.1.5" - -tar-stream@^2.1.4: - version "2.2.0" - resolved "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz" - integrity sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ== - dependencies: - bl "^4.0.3" - end-of-stream "^1.4.1" - fs-constants "^1.0.0" - inherits "^2.0.3" - readable-stream "^3.1.1" - -tar-stream@^3.1.5: - version "3.1.7" - resolved "https://registry.npmjs.org/tar-stream/-/tar-stream-3.1.7.tgz" - integrity sha512-qJj60CXt7IU1Ffyc3NJMjh6EkuCFej46zUqJ4J7pqYlThyd9bO0XBTmcOIhSzZJVWfsLks0+nle/j538YAW9RQ== - dependencies: - b4a "^1.6.4" - fast-fifo "^1.2.0" - streamx "^2.15.0" - -tar@^6.0.2, tar@^6.1.11, tar@^6.1.2: - version "6.2.0" - resolved "https://registry.npmjs.org/tar/-/tar-6.2.0.tgz" - integrity sha512-/Wo7DcT0u5HUV486xg675HtjNd3BXZ6xDbzsCUZPt5iw8bTQ63bP0Raut3mvro9u+CUyq7YQd8Cx55fsZXxqLQ== - dependencies: - chownr "^2.0.0" - fs-minipass "^2.0.0" - minipass "^5.0.0" - minizlib "^2.1.1" - mkdirp "^1.0.3" - yallist "^4.0.0" - -test-exclude@^6.0.0: - version "6.0.0" - resolved "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz" - integrity sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w== - dependencies: - "@istanbuljs/schema" "^0.1.2" - glob "^7.1.4" - minimatch "^3.0.4" - -text-table@^0.2.0: - version "0.2.0" - resolved "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz" - integrity sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw== - -tmpl@1.0.5: - version "1.0.5" - resolved "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz" - integrity sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw== - -to-fast-properties@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz" - integrity sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog== - -to-regex-range@^5.0.1: - version "5.0.1" - resolved "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz" - integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== - dependencies: - is-number "^7.0.0" - -tr46@~0.0.3: - version "0.0.3" - resolved "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz" - integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw== - -tree-sitter-wasms@^0.1.6: - version "0.1.6" - resolved "https://registry.npmjs.org/tree-sitter-wasms/-/tree-sitter-wasms-0.1.6.tgz" - integrity sha512-Q7XG/tNYc/rJrUzCELB2t6Y9Ivk8tzCqQFpJNXWdLmycNE68yTMpS8atr2PGtskiIbg4ai13cZ6Y3hNMDmWJZA== - -ts-jest@^29.1.1: - version "29.1.1" - resolved "https://registry.npmjs.org/ts-jest/-/ts-jest-29.1.1.tgz" - integrity sha512-D6xjnnbP17cC85nliwGiL+tpoKN0StpgE0TeOjXQTU6MVCfsB4v7aW05CgQ/1OywGb0x/oy9hHFnN+sczTiRaA== - dependencies: - bs-logger "0.x" - fast-json-stable-stringify "2.x" - jest-util "^29.0.0" - json5 "^2.2.3" - lodash.memoize "4.x" - make-error "1.x" - semver "^7.5.3" - yargs-parser "^21.0.1" - -tsconfig-paths@^3.15.0: - version "3.15.0" - resolved "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz" - integrity sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg== - dependencies: - "@types/json5" "^0.0.29" - json5 "^1.0.2" - minimist "^1.2.6" - strip-bom "^3.0.0" - -tslib@^2.5.3: - version "2.6.2" - resolved "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz" - integrity sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q== - -tunnel-agent@^0.6.0: - version "0.6.0" - resolved "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz" - integrity sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w== - dependencies: - safe-buffer "^5.0.1" - -type-check@^0.4.0, type-check@~0.4.0: - version "0.4.0" - resolved "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz" - integrity sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew== - dependencies: - prelude-ls "^1.2.1" - -type-detect@4.0.8: - version "4.0.8" - resolved "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz" - integrity sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g== - -type-fest@^0.20.2: - version "0.20.2" - resolved "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz" - integrity sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ== - -type-fest@^0.21.3: - version "0.21.3" - resolved "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz" - integrity sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w== - -typed-array-buffer@^1.0.1: - version "1.0.2" - resolved "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.2.tgz" - integrity sha512-gEymJYKZtKXzzBzM4jqa9w6Q1Jjm7x2d+sh19AdsD4wqnMPDYyvwpsIc2Q/835kHuo3BEQ7CjelGhfTsoBb2MQ== - dependencies: - call-bind "^1.0.7" - es-errors "^1.3.0" - is-typed-array "^1.1.13" - -typed-array-byte-length@^1.0.0: - version "1.0.1" - resolved "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.1.tgz" - integrity sha512-3iMJ9q0ao7WE9tWcaYKIptkNBuOIcZCCT0d4MRvuuH88fEoEH62IuQe0OtraD3ebQEoTRk8XCBoknUNc1Y67pw== - dependencies: - call-bind "^1.0.7" - for-each "^0.3.3" - gopd "^1.0.1" - has-proto "^1.0.3" - is-typed-array "^1.1.13" - -typed-array-byte-offset@^1.0.0: - version "1.0.2" - resolved "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.2.tgz" - integrity sha512-Ous0vodHa56FviZucS2E63zkgtgrACj7omjwd/8lTEMEPFFyjfixMZ1ZXenpgCFBBt4EC1J2XsyVS2gkG0eTFA== - dependencies: - available-typed-arrays "^1.0.7" - call-bind "^1.0.7" - for-each "^0.3.3" - gopd "^1.0.1" - has-proto "^1.0.3" - is-typed-array "^1.1.13" - -typed-array-length@^1.0.4: - version "1.0.5" - resolved "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.5.tgz" - integrity sha512-yMi0PlwuznKHxKmcpoOdeLwxBoVPkqZxd7q2FgMkmD3bNwvF5VW0+UlUQ1k1vmktTu4Yu13Q0RIxEP8+B+wloA== - dependencies: - call-bind "^1.0.7" - for-each "^0.3.3" - gopd "^1.0.1" - has-proto "^1.0.3" - is-typed-array "^1.1.13" - possible-typed-array-names "^1.0.0" - -"typescript@>=4.3 <6": - version "5.3.3" - resolved "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz" - integrity sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw== - -typical@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/typical/-/typical-4.0.0.tgz" - integrity sha512-VAH4IvQ7BDFYglMd7BPRDfLgxZZX4O4TFcRDA6EN5X7erNJJq+McIEp8np9aVtxrCJ6qx4GTYVfOWNjcqwZgRw== - -typical@^7.1.1: - version "7.1.1" - resolved "https://registry.npmjs.org/typical/-/typical-7.1.1.tgz" - integrity sha512-T+tKVNs6Wu7IWiAce5BgMd7OZfNYUndHwc5MknN+UHOudi7sGZzuHdCadllRuqJ3fPtgFtIH9+lt9qRv6lmpfA== - -uglify-js@^3.1.4: - version "3.17.4" - resolved "https://registry.npmjs.org/uglify-js/-/uglify-js-3.17.4.tgz" - integrity sha512-T9q82TJI9e/C1TAxYvfb16xO120tMVFZrGA3f9/P4424DNu6ypK103y0GPFVa17yotwSyZW5iYXgjYHkGrJW/g== - -unbox-primitive@^1.0.2: - version "1.0.2" - resolved "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz" - integrity sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw== - dependencies: - call-bind "^1.0.2" - has-bigints "^1.0.2" - has-symbols "^1.0.3" - which-boxed-primitive "^1.0.2" - -undici-types@~5.26.4: - version "5.26.5" - resolved "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz" - integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA== - -unique-filename@^1.1.1: - version "1.1.1" - resolved "https://registry.npmjs.org/unique-filename/-/unique-filename-1.1.1.tgz" - integrity sha512-Vmp0jIp2ln35UTXuryvjzkjGdRyf9b2lTXuSYUiPmzRcl3FDtYqAwOnTJkAngD9SWhnoJzDbTKwaOrZ+STtxNQ== - dependencies: - unique-slug "^2.0.0" - -unique-slug@^2.0.0: - version "2.0.2" - resolved "https://registry.npmjs.org/unique-slug/-/unique-slug-2.0.2.tgz" - integrity sha512-zoWr9ObaxALD3DOPfjPSqxt4fnZiWblxHIgeWqW8x7UqDzEtHEQLzji2cuJYQFCU6KmoJikOYAZlrTHHebjx2w== - dependencies: - imurmurhash "^0.1.4" - -universal-user-agent@^6.0.0: - version "6.0.1" - resolved "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-6.0.1.tgz" - integrity sha512-yCzhz6FN2wU1NiiQRogkTQszlQSlpWaw8SvVegAc+bDxbzHgh1vX8uIe8OYyMH6DwH+sdTJsgMl36+mSMdRJIQ== - -update-browserslist-db@^1.0.13: - version "1.0.13" - resolved "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz" - integrity sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg== - dependencies: - escalade "^3.1.1" - picocolors "^1.0.0" - -uri-js@^4.2.2: - version "4.4.1" - resolved "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz" - integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg== - dependencies: - punycode "^2.1.0" - -util-deprecate@^1.0.1: - version "1.0.2" - resolved "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz" - integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw== - -uuid@^9.0.1: - version "9.0.1" - resolved "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz" - integrity sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA== - -v8-to-istanbul@^9.0.1: - version "9.2.0" - resolved "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.2.0.tgz" - integrity sha512-/EH/sDgxU2eGxajKdwLCDmQ4FWq+kpi3uCmBGpw1xJtnAxEjlD8j8PEiGWpCIMIs3ciNAgH0d3TTJiUkYzyZjA== - dependencies: - "@jridgewell/trace-mapping" "^0.3.12" - "@types/istanbul-lib-coverage" "^2.0.1" - convert-source-map "^2.0.0" - -vectordb@^0.4.3: - version "0.4.3" - resolved "https://registry.npmjs.org/vectordb/-/vectordb-0.4.3.tgz" - integrity sha512-7ToixoZgAB/hn44EE4ftcdE74SGRX+wmGejatTQodFBiYD9RQLW8LIuGo8MmT+AkYEDAuOR98jTEFUwnEU5sqA== - dependencies: - "@apache-arrow/ts" "^14.0.2" - "@neon-rs/load" "^0.0.74" - apache-arrow "^14.0.2" - axios "^1.4.0" - optionalDependencies: - "@lancedb/vectordb-darwin-arm64" "0.4.3" - "@lancedb/vectordb-darwin-x64" "0.4.3" - "@lancedb/vectordb-linux-arm64-gnu" "0.4.3" - "@lancedb/vectordb-linux-x64-gnu" "0.4.3" - "@lancedb/vectordb-win32-x64-msvc" "0.4.3" - -walker@^1.0.8: - version "1.0.8" - resolved "https://registry.npmjs.org/walker/-/walker-1.0.8.tgz" - integrity sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ== - dependencies: - makeerror "1.0.12" - -web-streams-polyfill@^3.0.3, web-streams-polyfill@^3.2.1: - version "3.3.2" - resolved "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.3.2.tgz" - integrity sha512-3pRGuxRF5gpuZc0W+EpwQRmCD7gRqcDOMt688KmdlDAgAyaB1XlN0zq2njfDNm44XVdIouE7pZ6GzbdyH47uIQ== - -web-streams-polyfill@4.0.0-beta.3: - version "4.0.0-beta.3" - resolved "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-4.0.0-beta.3.tgz" - integrity sha512-QW95TCTaHmsYfHDybGMwO5IJIM93I/6vTRk+daHTWFPhwh+C8Cg7j7XyKrwrj8Ib6vYXe0ocYNrmzY4xAAN6ug== - -web-tree-sitter@^0.20.8: - version "0.20.8" - resolved "https://registry.npmjs.org/web-tree-sitter/-/web-tree-sitter-0.20.8.tgz" - integrity sha512-weOVgZ3aAARgdnb220GqYuh7+rZU0Ka9k9yfKtGAzEYMa6GgiCzW9JjQRJyCJakvibQW+dfjJdihjInKuuCAUQ== - -webidl-conversions@^3.0.0: - version "3.0.1" - resolved "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz" - integrity sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ== - -whatwg-fetch@^3.6.20: - version "3.6.20" - resolved "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-3.6.20.tgz" - integrity sha512-EqhiFU6daOA8kpjOWTL0olhVOF3i7OrFzSYiGsEMB8GcXS+RrzauAERX65xMeNWVqxA6HXH2m69Z9LaKKdisfg== - -whatwg-url@^5.0.0: - version "5.0.0" - resolved "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz" - integrity sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw== - dependencies: - tr46 "~0.0.3" - webidl-conversions "^3.0.0" - -which-boxed-primitive@^1.0.2: - version "1.0.2" - resolved "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz" - integrity sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg== - dependencies: - is-bigint "^1.0.1" - is-boolean-object "^1.1.0" - is-number-object "^1.0.4" - is-string "^1.0.5" - is-symbol "^1.0.3" - -which-typed-array@^1.1.14: - version "1.1.14" - resolved "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.14.tgz" - integrity sha512-VnXFiIW8yNn9kIHN88xvZ4yOWchftKDsRJ8fEPacX/wl1lOvBrhsJ/OeJCXq7B0AaijRuqgzSKalJoPk+D8MPg== - dependencies: - available-typed-arrays "^1.0.6" - call-bind "^1.0.5" - for-each "^0.3.3" - gopd "^1.0.1" - has-tostringtag "^1.0.1" - -which@^2.0.1, which@^2.0.2: - version "2.0.2" - resolved "https://registry.npmjs.org/which/-/which-2.0.2.tgz" - integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== - dependencies: - isexe "^2.0.0" - -wide-align@^1.1.5: - version "1.1.5" - resolved "https://registry.npmjs.org/wide-align/-/wide-align-1.1.5.tgz" - integrity sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg== - dependencies: - string-width "^1.0.2 || 2 || 3 || 4" - -wordwrap@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz" - integrity sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q== - -wordwrapjs@^5.1.0: - version "5.1.0" - resolved "https://registry.npmjs.org/wordwrapjs/-/wordwrapjs-5.1.0.tgz" - integrity sha512-JNjcULU2e4KJwUNv6CHgI46UvDGitb6dGryHajXTDiLgg1/RiGoPSDw4kZfYnwGtEXf2ZMeIewDQgFGzkCB2Sg== - -wrap-ansi@^7.0.0: - version "7.0.0" - resolved "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz" - integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== - dependencies: - ansi-styles "^4.0.0" - string-width "^4.1.0" - strip-ansi "^6.0.0" - -wrappy@1: - version "1.0.2" - resolved "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz" - integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== - -write-file-atomic@^4.0.2: - version "4.0.2" - resolved "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.2.tgz" - integrity sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg== - dependencies: - imurmurhash "^0.1.4" - signal-exit "^3.0.7" - -ws@~8.11.0: - version "8.11.0" - resolved "https://registry.npmjs.org/ws/-/ws-8.11.0.tgz" - integrity sha512-HPG3wQd9sNQoT9xHyNCXoDUa+Xw/VevmY9FoHyQ+g+rrMn4j6FB4np7Z0OhdTgjx6MgQLK7jwSy1YecU1+4Asg== - -xmlhttprequest-ssl@~2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/xmlhttprequest-ssl/-/xmlhttprequest-ssl-2.0.0.tgz" - integrity sha512-QKxVRxiRACQcVuQEYFsI1hhkrMlrXHPegbbd1yn9UHOmRxY+si12nQYzri3vbzt8VdTTRviqcKxcyllFas5z2A== - -xtend@^4.0.0: - version "4.0.2" - resolved "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz" - integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== - -y18n@^5.0.5: - version "5.0.8" - resolved "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz" - integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== - -yallist@^3.0.2: - version "3.1.1" - resolved "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz" - integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== - -yallist@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz" - integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== - -yargs-parser@^21.0.1, yargs-parser@^21.1.1: - version "21.1.1" - resolved "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz" - integrity sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw== - -yargs@^17.3.1: - version "17.7.2" - resolved "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz" - integrity sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w== - dependencies: - cliui "^8.0.1" - escalade "^3.1.1" - get-caller-file "^2.0.5" - require-directory "^2.1.1" - string-width "^4.2.3" - y18n "^5.0.5" - yargs-parser "^21.1.1" - -yocto-queue@^0.1.0: - version "0.1.0" - resolved "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz" - integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== diff --git a/extensions/vscode/package-lock.json b/extensions/vscode/package-lock.json index 8b8837ae8..2860d22c7 100644 --- a/extensions/vscode/package-lock.json +++ b/extensions/vscode/package-lock.json @@ -102,7 +102,6 @@ "https-proxy-agent": "^7.0.3", "js-tiktoken": "^1.0.8", "llama-tokenizer-js": "^1.1.3", - "llm-code-highlighter": "^0.0.13", "node-fetch": "^3.3.2", "node-html-markdown": "^1.3.0", "ollama": "^0.4.6", @@ -116,7 +115,7 @@ "tree-sitter-wasms": "^0.1.6", "uuid": "^9.0.1", "vectordb": "^0.4.3", - "web-tree-sitter": "^0.20.8" + "web-tree-sitter": "^0.21.0" }, "devDependencies": { "@types/follow-redirects": "^1.14.4", diff --git a/extensions/vscode/yarn.lock b/extensions/vscode/yarn.lock index 8e89c76dc..530ca3472 100644 --- a/extensions/vscode/yarn.lock +++ b/extensions/vscode/yarn.lock @@ -696,6 +696,11 @@ resolved "https://registry.npmjs.org/@jsdevtools/ono/-/ono-7.1.3.tgz" integrity sha512-4JQNk+3mVzK3xh2rqd6RB4J46qUR19azEHBneZyTZM+c456qOrbbM/5xcR8huNCCcbVt7+UmizG6GuUvPvKUYg== +"@lancedb/vectordb-darwin-arm64@*": + version "0.4.11" + resolved "https://registry.npmjs.org/@lancedb/vectordb-darwin-arm64/-/vectordb-darwin-arm64-0.4.11.tgz" + integrity sha512-JDOKmFnuJPFkA7ZmrzBJolROwSjWr7yMvAbi40uLBc25YbbVezodd30u2EFtIwWwtk1GqNYRZ49FZOElKYeC/Q== + "@lancedb/vectordb-darwin-arm64@0.4.10": version "0.4.10" resolved "https://registry.npmjs.org/@lancedb/vectordb-darwin-arm64/-/vectordb-darwin-arm64-0.4.10.tgz" @@ -2373,7 +2378,6 @@ core-util-is@1.0.2: https-proxy-agent "^7.0.3" js-tiktoken "^1.0.8" llama-tokenizer-js "^1.1.3" - llm-code-highlighter "^0.0.13" node-fetch "^3.3.2" node-html-markdown "^1.3.0" ollama "^0.4.6" @@ -2387,7 +2391,7 @@ core-util-is@1.0.2: tree-sitter-wasms "^0.1.6" uuid "^9.0.1" vectordb "^0.4.3" - web-tree-sitter "^0.20.8" + web-tree-sitter "^0.21.0" cors@^2.8.5: version "2.8.5" diff --git a/gui/package-lock.json b/gui/package-lock.json index 823f7b264..b43ee9349 100644 --- a/gui/package-lock.json +++ b/gui/package-lock.json @@ -89,7 +89,6 @@ "https-proxy-agent": "^7.0.3", "js-tiktoken": "^1.0.8", "llama-tokenizer-js": "^1.1.3", - "llm-code-highlighter": "^0.0.13", "node-fetch": "^3.3.2", "node-html-markdown": "^1.3.0", "ollama": "^0.4.6", @@ -103,7 +102,7 @@ "tree-sitter-wasms": "^0.1.6", "uuid": "^9.0.1", "vectordb": "^0.4.3", - "web-tree-sitter": "^0.20.8" + "web-tree-sitter": "^0.21.0" }, "devDependencies": { "@types/follow-redirects": "^1.14.4", diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 000000000..55bcf93c5 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,6 @@ +{ + "name": "continue", + "lockfileVersion": 3, + "requires": true, + "packages": {} +} From bc7e7d591d8ed6a71053832d4cfdf281daf3618d Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Thu, 29 Feb 2024 11:27:37 -0500 Subject: [PATCH 123/141] =?UTF-8?q?=E2=9C=A8=20handful=20of=20autocomplete?= =?UTF-8?q?=20edges=20cases=20fixed?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/autocomplete/charStream.ts | 2 +- core/autocomplete/constructPrompt.ts | 60 +++++++++------ core/autocomplete/ranking.ts | 75 ++++++++++++++++++- core/util/treeSitter.ts | 45 ++++++----- .../src/autocomplete/getTabCompletion.ts | 3 +- .../vscode/src/autocomplete/recentlyEdited.ts | 5 +- 6 files changed, 144 insertions(+), 46 deletions(-) diff --git a/core/autocomplete/charStream.ts b/core/autocomplete/charStream.ts index add4cecb8..5994c7759 100644 --- a/core/autocomplete/charStream.ts +++ b/core/autocomplete/charStream.ts @@ -7,7 +7,7 @@ export async function* onlyWhitespaceAfterEndOfLine( chunk = pending + chunk; pending = ""; for (let i = 0; i < chunk.length - 1; i++) { - if (endOfLine.includes(chunk[i]) && chunk[i + 1] === " ") { + if (endOfLine.includes(chunk[i]) && chunk[i + 1] !== " ") { yield chunk.slice(0, i + 1); return; } diff --git a/core/autocomplete/constructPrompt.ts b/core/autocomplete/constructPrompt.ts index 1b5dab648..787d4457a 100644 --- a/core/autocomplete/constructPrompt.ts +++ b/core/autocomplete/constructPrompt.ts @@ -10,7 +10,7 @@ import { getBasename } from "../util"; import { getAst, getScopeAroundRange, getTreePathAtCursor } from "./ast"; import { AutocompleteLanguageInfo, LANGUAGES, Typescript } from "./languages"; -import { AutocompleteSnippet, fillPromptWithSnippets, rankSnippets } from "./ranking"; +import { AutocompleteSnippet, fillPromptWithSnippets, rankSnippets, removeRangeFromSnippets } from "./ranking"; import { slidingWindowMatcher } from "./slidingWindow"; export function languageForFilepath( @@ -90,6 +90,7 @@ async function shouldCompleteMultiline( export async function constructAutocompletePrompt( filepath: string, + cursorLine: number, fullPrefix: string, fullSuffix: string, clipboardText: string, @@ -124,7 +125,7 @@ export async function constructAutocompletePrompt( ); snippets.push(...slidingWindowMatches); - const recentlyEdited = await Promise.all( + const recentlyEdited = (await Promise.all( recentlyEditedRanges .map(async (r) => { const scope = await getScopeAroundRange(r); @@ -132,39 +133,54 @@ export async function constructAutocompletePrompt( return r; }) - .filter((s) => !!s) - ); + )).filter((s) => !!s); snippets.push(...(recentlyEdited as any)); // Rank / order the snippets - const scoredSnippets = rankSnippets(snippets, windowAroundCursor).filter( - // Filter out snippets that are already in prefix - (snippet) => snippet.score < 0.98 - ); + const scoredSnippets = rankSnippets(snippets, windowAroundCursor) // Fill maxSnippetTokens with snippets const maxSnippetTokens = options.maxPromptTokens * options.maxSnippetPercentage; - const finalSnippets = fillPromptWithSnippets(scoredSnippets, maxSnippetTokens, modelName); - - // Construct basic prefix / suffix - const formattedSnippets = finalSnippets - .map((snippet) => - formatExternalSnippet(snippet.filepath, snippet.contents, language) - ) - .join("\n"); + + // Construct basic prefix const maxPrefixTokens = - options.maxPromptTokens * options.prefixPercentage - - countTokens(formattedSnippets, modelName); + options.maxPromptTokens * options.prefixPercentage let prefix = pruneLinesFromTop(fullPrefix, maxPrefixTokens, modelName); - if (formattedSnippets.length > 0) { - prefix = formattedSnippets + "\n" + prefix; - } - + + // Construct suffix const maxSuffixTokens = Math.min( options.maxPromptTokens - countTokens(prefix, modelName), options.maxSuffixPercentage * options.maxPromptTokens ); let suffix = pruneLinesFromBottom(fullSuffix, maxSuffixTokens, modelName); + + // Remove prefix range from snippets + let finalSnippets = fillPromptWithSnippets(scoredSnippets, maxSnippetTokens, modelName); + const prefixLines = prefix.split('\n').length; + const suffixLines = suffix.split('\n').length; + const buffer = 8; + const prefixSuffixRangeWithBuffer = { + start: { + line: cursorLine - prefixLines - buffer, + character: 0 + }, + end: { + line: cursorLine + suffixLines+ buffer, + character: 0 + } + } + finalSnippets = removeRangeFromSnippets(finalSnippets, filepath.split("://").slice(-1)[0], prefixSuffixRangeWithBuffer); + + // Format snippets as comments and prepend to prefix + const formattedSnippets = finalSnippets + .map((snippet) => + formatExternalSnippet(snippet.filepath, snippet.contents, language) + ) + .join("\n"); + if (formattedSnippets.length > 0) { + prefix = formattedSnippets + "\n\n" + prefix; + } + return { prefix, diff --git a/core/autocomplete/ranking.ts b/core/autocomplete/ranking.ts index cb87f2e34..0c0970f7b 100644 --- a/core/autocomplete/ranking.ts +++ b/core/autocomplete/ranking.ts @@ -1,3 +1,4 @@ +import { Range } from ".."; import { RangeInFileWithContents } from "../commands/util"; import { countTokens } from "../llm/countTokens"; @@ -131,4 +132,76 @@ export function fillPromptWithSnippets(snippets: AutocompleteSnippet[], maxSnipp } return keptSnippets; -}; \ No newline at end of file +}; + +function rangeIntersectionByLines(a: Range, b: Range): Range | null { + const startLine = Math.max(a.start.line, b.start.line); + const endLine = Math.min(a.end.line, b.end.line); + if (startLine >= endLine) { + return null; + } else { + return { + start: { + line: startLine, + character: 0 + }, + end: { + line: endLine, + character: 0 + } + } + } +} + +/** + * Remove one range from another range, which may lead to returning two disjoint ranges + */ +function rangeDifferenceByLines(orig: Range, remove: Range): Range[] { + if (orig.start.line >= remove.start.line && orig.end.line <= remove.end.line) { + // / | | / + return []; + } else if (orig.start.line <= remove.start.line && orig.end.line >= remove.end.line) { + // | / / | + // Splits the range + return [{ + start: orig.start, + end: remove.start + }, { + start: remove.end, + end: orig.end + }] + } else if (orig.start.line >= remove.start.line && orig.end.line >= remove.end.line) { + // \ | / | + return [{ + start: remove.end, + end: orig.end + }] + } else if (orig.start.line <= remove.start.line && orig.end.line <= remove.end.line) { + // | / | / + return [{ + start: orig.start, + end: remove.start + }] + } else { + return [orig] + } +} + +export function removeRangeFromSnippets(snippets: AutocompleteSnippet[], filepath: string, range: Range): AutocompleteSnippet[] { + const finalSnippets: AutocompleteSnippet[] = []; + for (let snippet of snippets) { + if (snippet.filepath !== filepath) { + finalSnippets.push(snippet); + continue; + } + + const intersection = rangeIntersectionByLines(range, snippet.range); + if (!intersection) { + finalSnippets.push(snippet); + } else { + finalSnippets.push(...rangeDifferenceByLines(snippet.range, intersection).map(range => ({...snippet, range}))); + } + } + + return finalSnippets; +} \ No newline at end of file diff --git a/core/util/treeSitter.ts b/core/util/treeSitter.ts index e0abfd457..8411eb715 100644 --- a/core/util/treeSitter.ts +++ b/core/util/treeSitter.ts @@ -68,26 +68,31 @@ export const supportedLanguages: { [key: string]: string } = { }; export async function getParserForFile(filepath: string) { - await Parser.init(); - const parser = new Parser(); - const extension = path.extname(filepath).slice(1); - - if (!supportedLanguages[extension]) { - console.warn( - "Unable to load language for file", - extension, - "from path: ", - filepath + try { + await Parser.init(); + const parser = new Parser(); + const extension = path.extname(filepath).slice(1); + + if (!supportedLanguages[extension]) { + console.warn( + "Unable to load language for file", + extension, + "from path: ", + filepath + ); + return undefined; + } + + const wasmPath = path.join( + __dirname, + "tree-sitter-wasms", + `tree-sitter-${supportedLanguages[extension]}.wasm` ); + const language = await Parser.Language.load(wasmPath); + parser.setLanguage(language); + return parser; + } catch (e) { + console.error("Unable to load language for file", filepath, e); return undefined; } - - const wasmPath = path.join( - __dirname, - "tree-sitter-wasms", - `tree-sitter-${supportedLanguages[extension]}.wasm` - ); - const language = await Parser.Language.load(wasmPath); - parser.setLanguage(language); - return parser; -} +} \ No newline at end of file diff --git a/extensions/vscode/src/autocomplete/getTabCompletion.ts b/extensions/vscode/src/autocomplete/getTabCompletion.ts index a7ec82a0e..a297819e3 100644 --- a/extensions/vscode/src/autocomplete/getTabCompletion.ts +++ b/extensions/vscode/src/autocomplete/getTabCompletion.ts @@ -50,7 +50,7 @@ export async function getTabCompletion( const lang = languageForFilepath(document.fileName); const line = document.lineAt(pos).text; for (const endOfLine of lang.endOfLine) { - if (line.endsWith(endOfLine) && pos.character >= endOfLine.length) { + if (line.endsWith(endOfLine) && pos.character >= line.length) { return undefined; } } @@ -88,6 +88,7 @@ export async function getTabCompletion( const { prefix, suffix, completeMultiline } = await constructAutocompletePrompt( document.uri.toString(), + pos.line, fullPrefix, fullSuffix, clipboardText, diff --git a/extensions/vscode/src/autocomplete/recentlyEdited.ts b/extensions/vscode/src/autocomplete/recentlyEdited.ts index 3e5847efc..66e0de780 100644 --- a/extensions/vscode/src/autocomplete/recentlyEdited.ts +++ b/extensions/vscode/src/autocomplete/recentlyEdited.ts @@ -23,6 +23,9 @@ export class RecentlyEditedTracker { constructor() { vscode.workspace.onDidChangeTextDocument((event) => { + if (event.document.uri.scheme !== "file") { + return; + } event.contentChanges.forEach((change) => { const editedRange = { uri: event.document.uri, @@ -97,7 +100,7 @@ export class RecentlyEditedTracker { filepath: entry.uri.fsPath, contents: await vscode.workspace.fs .readFile(entry.uri) - .then((content) => content.toString()), + .then((content) => content.toString().split("\n").slice(entry.range.start.line, entry.range.end.line + 1).join("\n")), range: { start: { line: entry.range.start.line, From c4598b7685490b018a9bda5ff04d2a49e074d5eb Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Thu, 29 Feb 2024 11:30:46 -0500 Subject: [PATCH 124/141] =?UTF-8?q?=E2=9A=A1=EF=B8=8F=20stop=20autocomplet?= =?UTF-8?q?e=20model=20from=20outputting=20//=20Path:=20...?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/autocomplete/lineStream.ts | 11 +++++++++++ .../vscode/src/autocomplete/getTabCompletion.ts | 3 ++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/core/autocomplete/lineStream.ts b/core/autocomplete/lineStream.ts index bc8a238fd..400705387 100644 --- a/core/autocomplete/lineStream.ts +++ b/core/autocomplete/lineStream.ts @@ -2,6 +2,17 @@ import { distance } from "fastest-levenshtein"; import { DiffLine } from ".."; import { LineStream } from "../diff/util"; +export async function* avoidPathLine(stream: LineStream, comment: string): LineStream { + // Snippets are inserted as comments with a line at the start '// Path: '. + // Sometimes the model with copy this pattern, which is unwanted + for await (const line of stream){ + if (line.startsWith(comment + " Path: ")) { + continue; + } + yield line; + } +} + export async function* streamWithNewLines(stream: LineStream): LineStream { let firstLine = true; for await (const nextLine of stream) { diff --git a/extensions/vscode/src/autocomplete/getTabCompletion.ts b/extensions/vscode/src/autocomplete/getTabCompletion.ts index a297819e3..f7e126bb8 100644 --- a/extensions/vscode/src/autocomplete/getTabCompletion.ts +++ b/extensions/vscode/src/autocomplete/getTabCompletion.ts @@ -6,6 +6,7 @@ import { languageForFilepath, } from "core/autocomplete/constructPrompt"; import { + avoidPathLine, stopAtSimilarLine, streamWithNewLines, } from "core/autocomplete/lineStream"; @@ -158,7 +159,7 @@ export async function getTabCompletion( generatorWithCancellation(), lang.endOfLine ); - const lineGenerator = streamWithNewLines(streamLines(gen2)); + const lineGenerator = streamWithNewLines(avoidPathLine(streamLines(gen2), lang.comment)); const finalGenerator = stopAtSimilarLine(lineGenerator, lineBelowCursor); for await (const update of finalGenerator) { completion += update; From 3aab78384a2f0f4141288207be457d46b937355d Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Thu, 29 Feb 2024 11:43:31 -0500 Subject: [PATCH 125/141] =?UTF-8?q?=E2=9A=A1=EF=B8=8F=20only=20include=20r?= =?UTF-8?q?ecently=20edited=20snippets=20above=20similarity=20threshold?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/autocomplete/constructPrompt.ts | 11 +++++++---- core/autocomplete/parameters.ts | 3 ++- core/index.d.ts | 1 + 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/core/autocomplete/constructPrompt.ts b/core/autocomplete/constructPrompt.ts index 787d4457a..73af1618a 100644 --- a/core/autocomplete/constructPrompt.ts +++ b/core/autocomplete/constructPrompt.ts @@ -27,7 +27,7 @@ function formatExternalSnippet( const comment = language.comment; const lines = [ comment + " Path: " + getBasename(filepath), - ...snippet.split("\n").map((line) => comment + " " + line), + ...snippet.trim().split("\n").map((line) => comment + " " + line), comment, ]; return lines.join("\n"); @@ -153,9 +153,8 @@ export async function constructAutocompletePrompt( options.maxSuffixPercentage * options.maxPromptTokens ); let suffix = pruneLinesFromBottom(fullSuffix, maxSuffixTokens, modelName); - + // Remove prefix range from snippets - let finalSnippets = fillPromptWithSnippets(scoredSnippets, maxSnippetTokens, modelName); const prefixLines = prefix.split('\n').length; const suffixLines = suffix.split('\n').length; const buffer = 8; @@ -169,7 +168,11 @@ export async function constructAutocompletePrompt( character: 0 } } - finalSnippets = removeRangeFromSnippets(finalSnippets, filepath.split("://").slice(-1)[0], prefixSuffixRangeWithBuffer); + let finalSnippets = removeRangeFromSnippets(scoredSnippets, filepath.split("://").slice(-1)[0], prefixSuffixRangeWithBuffer); + + // Filter snippets for those with best scores (must be above threshold) + finalSnippets = finalSnippets.filter((snippet) => snippet.score >= options.recentlyEditedSimilarityThreshold) + finalSnippets = fillPromptWithSnippets(scoredSnippets, maxSnippetTokens, modelName); // Format snippets as comments and prepend to prefix const formattedSnippets = finalSnippets diff --git a/core/autocomplete/parameters.ts b/core/autocomplete/parameters.ts index 18dc7f244..6b18f5f56 100644 --- a/core/autocomplete/parameters.ts +++ b/core/autocomplete/parameters.ts @@ -10,5 +10,6 @@ export const DEFAULT_AUTOCOMPLETE_OPTS: TabAutocompleteOptions = { multilineCompletions: "auto", slidingWindowPrefixPercentage: 0.75, slidingWindowSize: 500, - maxSnippetPercentage: 0.6 + maxSnippetPercentage: 0.6, + recentlyEditedSimilarityThreshold: 0.5 }; diff --git a/core/index.d.ts b/core/index.d.ts index 3eb295151..b5f807594 100644 --- a/core/index.d.ts +++ b/core/index.d.ts @@ -589,6 +589,7 @@ export interface TabAutocompleteOptions { slidingWindowPrefixPercentage: number; slidingWindowSize: number; maxSnippetPercentage: number; + recentlyEditedSimilarityThreshold: number; } export interface SerializedContinueConfig { From 430163fbf848bca400c13559a7abc9042888af78 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Thu, 29 Feb 2024 11:57:52 -0500 Subject: [PATCH 126/141] =?UTF-8?q?=F0=9F=9A=A7=20getScopeAroundRange?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/autocomplete/ast.ts | 21 +++++++++++++++++---- core/autocomplete/constructPrompt.ts | 6 ++---- core/autocomplete/parameters.ts | 2 +- 3 files changed, 20 insertions(+), 9 deletions(-) diff --git a/core/autocomplete/ast.ts b/core/autocomplete/ast.ts index 910dc36fe..220597217 100644 --- a/core/autocomplete/ast.ts +++ b/core/autocomplete/ast.ts @@ -41,7 +41,7 @@ export async function getTreePathAtCursor( export async function getScopeAroundRange( range: RangeInFileWithContents -): Promise { +): Promise { const ast = await getAst(range.filepath, range.contents); if (!ast) { return undefined; @@ -51,10 +51,10 @@ export async function getScopeAroundRange( const lines = range.contents.split("\n"); const startIndex = lines.slice(0, s.line).join("\n").length + - lines[s.line]?.slice(s.character).length ?? 0; + (lines[s.line]?.slice(s.character).length ?? 0); const endIndex = lines.slice(0, e.line).join("\n").length + - lines[e.line]?.slice(0, e.character).length ?? 0; + (lines[e.line]?.slice(0, e.character).length ?? 0); let node = ast.rootNode; while (node.childCount > 0) { @@ -72,5 +72,18 @@ export async function getScopeAroundRange( } } - return node.text; + return { + contents: node.text, + filepath: range.filepath, + range: { + start: { + line: node.startPosition.row, + character: node.startPosition.column, + }, + end: { + line: node.endPosition.row, + character: node.endPosition.column, + } + }, + } } diff --git a/core/autocomplete/constructPrompt.ts b/core/autocomplete/constructPrompt.ts index 73af1618a..44333dae2 100644 --- a/core/autocomplete/constructPrompt.ts +++ b/core/autocomplete/constructPrompt.ts @@ -8,7 +8,7 @@ import { } from "../llm/countTokens"; import { getBasename } from "../util"; -import { getAst, getScopeAroundRange, getTreePathAtCursor } from "./ast"; +import { getAst, getTreePathAtCursor } from "./ast"; import { AutocompleteLanguageInfo, LANGUAGES, Typescript } from "./languages"; import { AutocompleteSnippet, fillPromptWithSnippets, rankSnippets, removeRangeFromSnippets } from "./ranking"; import { slidingWindowMatcher } from "./slidingWindow"; @@ -128,10 +128,8 @@ export async function constructAutocompletePrompt( const recentlyEdited = (await Promise.all( recentlyEditedRanges .map(async (r) => { - const scope = await getScopeAroundRange(r); - if (!scope) return null; - return r; + // return await getScopeAroundRange(r); }) )).filter((s) => !!s); snippets.push(...(recentlyEdited as any)); diff --git a/core/autocomplete/parameters.ts b/core/autocomplete/parameters.ts index 6b18f5f56..67d4f3b30 100644 --- a/core/autocomplete/parameters.ts +++ b/core/autocomplete/parameters.ts @@ -11,5 +11,5 @@ export const DEFAULT_AUTOCOMPLETE_OPTS: TabAutocompleteOptions = { slidingWindowPrefixPercentage: 0.75, slidingWindowSize: 500, maxSnippetPercentage: 0.6, - recentlyEditedSimilarityThreshold: 0.5 + recentlyEditedSimilarityThreshold: 0.3 }; From 601c91a52101cc374d3df1057932897e2940dbf3 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Thu, 29 Feb 2024 12:03:47 -0500 Subject: [PATCH 127/141] =?UTF-8?q?=F0=9F=93=9D=20update=20autocomplete=20?= =?UTF-8?q?tutorial?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- extensions/vscode/media/welcome.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/extensions/vscode/media/welcome.md b/extensions/vscode/media/welcome.md index dfd66ff39..d407ba29f 100644 --- a/extensions/vscode/media/welcome.md +++ b/extensions/vscode/media/welcome.md @@ -22,6 +22,8 @@ Continue is currently in the left sidebar, but we recommend moving it to the rig 1. Download [Ollama](https://ollama.ai) 2. Download starcoder:3b by running `ollama run starcoder:3b` in the terminal -3. Click the `Continue` button in the status bar (bottom right of the VS Code window) to enable autocomplete +3. That's it! You can disable autocomplete at any time by clicking the `Continue` button in the status bar (bottom right of the VS Code window) + +> Learn how to customize your autocomplete experience in [our walkthrough](https://continue.dev/docs/walkthroughs/tab-autocomplete) ![Autocomplete](./autocomplete.gif) From 056c5fa2f92f669849be82824e6a1f02860eef12 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Thu, 29 Feb 2024 12:13:42 -0500 Subject: [PATCH 128/141] =?UTF-8?q?=F0=9F=93=9D=20update=20autocomplete=20?= =?UTF-8?q?docs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/docs/walkthroughs/tab-autocomplete.md | 37 ++++++++++++++++------ 1 file changed, 28 insertions(+), 9 deletions(-) diff --git a/docs/docs/walkthroughs/tab-autocomplete.md b/docs/docs/walkthroughs/tab-autocomplete.md index c6fd9ba5b..a6b0811b7 100644 --- a/docs/docs/walkthroughs/tab-autocomplete.md +++ b/docs/docs/walkthroughs/tab-autocomplete.md @@ -1,13 +1,13 @@ -# Tab Autocomplete (Experimental) +# Tab Autocomplete (beta) -Continue now provides experimental support for tab autocomplete in VS Code. You can enable it by downloading the pre-release version of the extension, opening VS Code settings, and then checking the box that says "Enable Tab Autocomplete". There is also a button on the bottom/status bar for fast access. We will be greatly improving the experience over the next few releases, and it is always helpful to hear feedback. If you have any problems or suggestions, please let us know in our [Discord](https://discord.gg/vapESyrFmJ). +Continue now provides support for tab autocomplete in VS Code (make sure to download the pre-release). We will be greatly improving the experience over the next few releases, and it is always helpful to hear feedback. If you have any problems or suggestions, please let us know in our [Discord](https://discord.gg/vapESyrFmJ). ## Setting up with Ollama (default) We recommend setting up tab-autocomplete with a local Ollama instance. To do this, first download the latest version of Ollama from [here](https://ollama.ai). Then, run the following command to download our recommended model: ```bash -ollama run deepseek-coder:1.3b-base +ollama run starcoder:3b ``` Once it has been downloaded, you should begin to see completions in VS Code. @@ -16,12 +16,12 @@ Once it has been downloaded, you should begin to see completions in VS Code. All of the configuration options available for chat models are available to use for tab-autocomplete. For example, if you wanted to use a remote Ollama instance you would edit your `config.json` like this: -```json +```json title=~/.continue/config.json { "tabAutocompleteModel": { "title": "Tab Autocomplete Model", "provider": "ollama", - "model": "deepseek-coder:1.3b-base", + "model": "starcoder:3b", "apiBase": "https://" }, ... @@ -49,6 +49,25 @@ This object allows you to customize the behavior of tab-autocomplete. The availa - `maxSuffixPercentage`: The maximum percentage of the prompt that can be dedicated to the suffix. (Number) - `prefixPercentage`: The percentage of the input that should be dedicated to the prefix. (Number) - `template`: An optional template string to be used for autocomplete. It will be rendered with the Mustache templating language, and is passed the 'prefix' and 'suffix' variables. (String) +- `multilineCompletions`: Whether to enable multiline completions ("always", "never", or "auto"). Defaults to "auto". + +### Full example + +```json title=~/.continue/config.json +{ + "tabAutocompleteModel": { + "title": "Tab Autocomplete Model", + "provider": "ollama", + "model": "starcoder:3b", + "apiBase": "https://" + }, + "tabAutocompleteOptions": { + "useCopyBuffer": false, + "maxPromptTokens": 400, + "prefixPercentage": 0.5 + } +} +``` ## Troubleshooting @@ -57,9 +76,9 @@ This object allows you to customize the behavior of tab-autocomplete. The availa Follow these steps to ensure that everything is set up correctly: 1. Make sure you have the pre-release version of the extension installed. -2. Make sure you have the "Enable Tab Autocomplete" setting checked. +2. Make sure you have the "Enable Tab Autocomplete" setting checked (can toggle by clicking the "Continue" button in the status bar). 3. Make sure you have downloaded Ollama. -4. Run `ollama run deepseek-coder:1.3b-base` to verify that the model is downloaded. +4. Run `ollama run starcoder:3b` to verify that the model is downloaded. 5. Make sure that any other completion providers are disabled (e.g. Copilot), as they may interfere. 6. Make sure that you aren't also using another Ollama model for chat. This will cause Ollama to constantly load and unload the models from memory, resulting in slow responses (or none at all) for both. 7. Check the output of the logs to find any potential errors (cmd/ctrl+shift+p -> "Toggle Developer Tools" -> "Console" tab). @@ -67,11 +86,11 @@ Follow these steps to ensure that everything is set up correctly: ### Completions are slow -We are working on this! You can expect improvements in the time frame of the next few days. For now, you will probably see faster completions in smaller files where there isn't as much context above the cursor. +Depending on your hardware, you may want to try a smaller, faster model. If 3b isn't working for you we recommend trying `deepseek-coder:1.3b-base`. ### Completions don't know about my code -We are working on this as well! Right now Continue only sees your current file surrounding the cursor. We're already partway through building a full-text search feature that will help Continue know about other files. You can expect to see improvements in the time frame of roughly a week. +We are working on this! Right now Continue uses the Language Server Protocol to add definitions to the prompt, as well as using similarity search over recently edited files. We will be improving the accuracy of this system greatly over the next few weeks. ### Completions contain formatting errors From 37af77590d0bbc751b3d08d2c9ab79c7e93d6d5e Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Thu, 29 Feb 2024 12:15:21 -0500 Subject: [PATCH 129/141] =?UTF-8?q?=F0=9F=93=9D=20link=20to=20extension?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/docs/walkthroughs/tab-autocomplete.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/walkthroughs/tab-autocomplete.md b/docs/docs/walkthroughs/tab-autocomplete.md index a6b0811b7..aa1a024ab 100644 --- a/docs/docs/walkthroughs/tab-autocomplete.md +++ b/docs/docs/walkthroughs/tab-autocomplete.md @@ -1,6 +1,6 @@ # Tab Autocomplete (beta) -Continue now provides support for tab autocomplete in VS Code (make sure to download the pre-release). We will be greatly improving the experience over the next few releases, and it is always helpful to hear feedback. If you have any problems or suggestions, please let us know in our [Discord](https://discord.gg/vapESyrFmJ). +Continue now provides support for tab autocomplete in [the VS Code extension](https://marketplace.visualstudio.com/items?itemName=Continue.continue) (make sure to download the pre-release). We will be greatly improving the experience over the next few releases, and it is always helpful to hear feedback. If you have any problems or suggestions, please let us know in our [Discord](https://discord.gg/vapESyrFmJ). ## Setting up with Ollama (default) From b453b639c4117c30afff9c958fe1168c63dc0830 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Thu, 29 Feb 2024 13:14:55 -0500 Subject: [PATCH 130/141] =?UTF-8?q?=F0=9F=94=96=20update=20package.json=20?= =?UTF-8?q?version?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 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 46d8e9073..33da3ba0a 100644 --- a/extensions/vscode/package.json +++ b/extensions/vscode/package.json @@ -1,7 +1,7 @@ { "name": "continue", "icon": "media/icon.png", - "version": "0.9.73", + "version": "0.9.74", "repository": { "type": "git", "url": "https://github.com/continuedev/continue" From 8a5aec1ae31a47607893751275ebae14a14a196c Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Thu, 29 Feb 2024 18:24:21 +0000 Subject: [PATCH 131/141] =?UTF-8?q?=F0=9F=92=9A=20Update=20package.json=20?= =?UTF-8?q?version=20[skip=20ci]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- extensions/vscode/package-lock.json | 4 ++-- extensions/vscode/package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/extensions/vscode/package-lock.json b/extensions/vscode/package-lock.json index 2860d22c7..0d17a0b6a 100644 --- a/extensions/vscode/package-lock.json +++ b/extensions/vscode/package-lock.json @@ -1,12 +1,12 @@ { "name": "continue", - "version": "0.9.73", + "version": "0.9.75", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "continue", - "version": "0.9.73", + "version": "0.9.75", "license": "Apache-2.0", "dependencies": { "@electron/rebuild": "^3.2.10", diff --git a/extensions/vscode/package.json b/extensions/vscode/package.json index 33da3ba0a..12ab5530b 100644 --- a/extensions/vscode/package.json +++ b/extensions/vscode/package.json @@ -1,7 +1,7 @@ { "name": "continue", "icon": "media/icon.png", - "version": "0.9.74", + "version": "0.9.75", "repository": { "type": "git", "url": "https://github.com/continuedev/continue" From 97b2c04f80c84d199ab776501e97aa43e5015c61 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Thu, 29 Feb 2024 20:49:49 -0500 Subject: [PATCH 132/141] =?UTF-8?q?=E2=9C=A8=20useCache=20customization=20?= =?UTF-8?q?option?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/autocomplete/lineStream.ts | 13 +++++++++++++ core/autocomplete/parameters.ts | 3 ++- core/index.d.ts | 1 + docs/static/schemas/config.json | 10 +++++++--- .../intellij/src/main/resources/config_schema.json | 10 +++++++--- extensions/vscode/config_schema.json | 10 +++++++--- extensions/vscode/continue_rc_schema.json | 14 +++++++++----- extensions/vscode/package-lock.json | 4 ++-- .../vscode/src/autocomplete/getTabCompletion.ts | 5 +++-- 9 files changed, 51 insertions(+), 19 deletions(-) diff --git a/core/autocomplete/lineStream.ts b/core/autocomplete/lineStream.ts index 400705387..9299549dc 100644 --- a/core/autocomplete/lineStream.ts +++ b/core/autocomplete/lineStream.ts @@ -50,6 +50,19 @@ export async function* stopAtSimilarLine( } } +const LINES_TO_STOP_AT = [ + "# End of file." +] + +export async function* stopAtLines(stream: LineStream): LineStream { + for await (const line of stream) { + if (LINES_TO_STOP_AT.includes(line)) { + break; + } + yield line; + } +} + function shouldRemoveLineBeforeStart(line: string): boolean { return ( line.trimStart().startsWith("```") || diff --git a/core/autocomplete/parameters.ts b/core/autocomplete/parameters.ts index 67d4f3b30..2034b7306 100644 --- a/core/autocomplete/parameters.ts +++ b/core/autocomplete/parameters.ts @@ -11,5 +11,6 @@ export const DEFAULT_AUTOCOMPLETE_OPTS: TabAutocompleteOptions = { slidingWindowPrefixPercentage: 0.75, slidingWindowSize: 500, maxSnippetPercentage: 0.6, - recentlyEditedSimilarityThreshold: 0.3 + recentlyEditedSimilarityThreshold: 0.3, + useCache: true }; diff --git a/core/index.d.ts b/core/index.d.ts index b5f807594..6bdecae25 100644 --- a/core/index.d.ts +++ b/core/index.d.ts @@ -590,6 +590,7 @@ export interface TabAutocompleteOptions { slidingWindowSize: number; maxSnippetPercentage: number; recentlyEditedSimilarityThreshold: number; + useCache: boolean; } export interface SerializedContinueConfig { diff --git a/docs/static/schemas/config.json b/docs/static/schemas/config.json index 7cc6e3c2f..51fc65340 100644 --- a/docs/static/schemas/config.json +++ b/docs/static/schemas/config.json @@ -1212,9 +1212,9 @@ }, "required": ["name", "type", "connection"] } - } - }, - "required": ["connections"] + }, + "required": ["connections"] + } }, { "if": { @@ -1561,6 +1561,10 @@ "multilineCompletions": { "enum": ["always", "never", "auto"], "description": "If set to true, Continue will only complete a single line at a time." + }, + "useCache": { + "type": "boolean", + "description": "Whether to cache completions" } }, "required": [] diff --git a/extensions/intellij/src/main/resources/config_schema.json b/extensions/intellij/src/main/resources/config_schema.json index 7cc6e3c2f..51fc65340 100644 --- a/extensions/intellij/src/main/resources/config_schema.json +++ b/extensions/intellij/src/main/resources/config_schema.json @@ -1212,9 +1212,9 @@ }, "required": ["name", "type", "connection"] } - } - }, - "required": ["connections"] + }, + "required": ["connections"] + } }, { "if": { @@ -1561,6 +1561,10 @@ "multilineCompletions": { "enum": ["always", "never", "auto"], "description": "If set to true, Continue will only complete a single line at a time." + }, + "useCache": { + "type": "boolean", + "description": "Whether to cache completions" } }, "required": [] diff --git a/extensions/vscode/config_schema.json b/extensions/vscode/config_schema.json index 7cc6e3c2f..51fc65340 100644 --- a/extensions/vscode/config_schema.json +++ b/extensions/vscode/config_schema.json @@ -1212,9 +1212,9 @@ }, "required": ["name", "type", "connection"] } - } - }, - "required": ["connections"] + }, + "required": ["connections"] + } }, { "if": { @@ -1561,6 +1561,10 @@ "multilineCompletions": { "enum": ["always", "never", "auto"], "description": "If set to true, Continue will only complete a single line at a time." + }, + "useCache": { + "type": "boolean", + "description": "Whether to cache completions" } }, "required": [] diff --git a/extensions/vscode/continue_rc_schema.json b/extensions/vscode/continue_rc_schema.json index 857062ff3..362a36908 100644 --- a/extensions/vscode/continue_rc_schema.json +++ b/extensions/vscode/continue_rc_schema.json @@ -1362,11 +1362,11 @@ "connection" ] } - } - }, - "required": [ - "connections" - ] + }, + "required": [ + "connections" + ] + } }, { "if": { @@ -1756,6 +1756,10 @@ "auto" ], "description": "If set to true, Continue will only complete a single line at a time." + }, + "useCache": { + "type": "boolean", + "description": "Whether to cache completions" } }, "required": [] diff --git a/extensions/vscode/package-lock.json b/extensions/vscode/package-lock.json index 2860d22c7..7a9ceb840 100644 --- a/extensions/vscode/package-lock.json +++ b/extensions/vscode/package-lock.json @@ -1,12 +1,12 @@ { "name": "continue", - "version": "0.9.73", + "version": "0.9.74", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "continue", - "version": "0.9.73", + "version": "0.9.74", "license": "Apache-2.0", "dependencies": { "@electron/rebuild": "^3.2.10", diff --git a/extensions/vscode/src/autocomplete/getTabCompletion.ts b/extensions/vscode/src/autocomplete/getTabCompletion.ts index f7e126bb8..a6ded1e4d 100644 --- a/extensions/vscode/src/autocomplete/getTabCompletion.ts +++ b/extensions/vscode/src/autocomplete/getTabCompletion.ts @@ -7,6 +7,7 @@ import { } from "core/autocomplete/constructPrompt"; import { avoidPathLine, + stopAtLines, stopAtSimilarLine, streamWithNewLines, } from "core/autocomplete/lineStream"; @@ -112,7 +113,7 @@ export async function getTabCompletion( let completion = ""; const cache = await autocompleteCache; - const cachedCompletion = await cache.get(prompt); + const cachedCompletion = options.useCache ? await cache.get(prompt) : undefined; let cacheHit = false; if (cachedCompletion) { // Cache @@ -159,7 +160,7 @@ export async function getTabCompletion( generatorWithCancellation(), lang.endOfLine ); - const lineGenerator = streamWithNewLines(avoidPathLine(streamLines(gen2), lang.comment)); + const lineGenerator = streamWithNewLines(avoidPathLine(stopAtLines(streamLines(gen2)), lang.comment)); const finalGenerator = stopAtSimilarLine(lineGenerator, lineBelowCursor); for await (const update of finalGenerator) { completion += update; From 762d6c10f49ac65b6428d5dda9792504ef91ed56 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Thu, 29 Feb 2024 23:30:19 -0500 Subject: [PATCH 133/141] =?UTF-8?q?=E2=9C=A8=20onlyMyCode=20option=20for?= =?UTF-8?q?=20tab-autocomplete?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/autocomplete/parameters.ts | 3 ++- core/index.d.ts | 1 + docs/static/schemas/config.json | 4 ++++ extensions/intellij/src/main/resources/config_schema.json | 4 ++++ extensions/vscode/config_schema.json | 4 ++++ extensions/vscode/continue_rc_schema.json | 4 ++++ extensions/vscode/src/autocomplete/getTabCompletion.ts | 7 +++++++ extensions/vscode/src/autocomplete/lsp.ts | 2 +- 8 files changed, 27 insertions(+), 2 deletions(-) diff --git a/core/autocomplete/parameters.ts b/core/autocomplete/parameters.ts index 2034b7306..3f14abf5c 100644 --- a/core/autocomplete/parameters.ts +++ b/core/autocomplete/parameters.ts @@ -12,5 +12,6 @@ export const DEFAULT_AUTOCOMPLETE_OPTS: TabAutocompleteOptions = { slidingWindowSize: 500, maxSnippetPercentage: 0.6, recentlyEditedSimilarityThreshold: 0.3, - useCache: true + useCache: true, + onlyMyCode: true }; diff --git a/core/index.d.ts b/core/index.d.ts index 6bdecae25..17f83467f 100644 --- a/core/index.d.ts +++ b/core/index.d.ts @@ -591,6 +591,7 @@ export interface TabAutocompleteOptions { maxSnippetPercentage: number; recentlyEditedSimilarityThreshold: number; useCache: boolean; + onlyMyCode: boolean; } export interface SerializedContinueConfig { diff --git a/docs/static/schemas/config.json b/docs/static/schemas/config.json index 51fc65340..7f342e195 100644 --- a/docs/static/schemas/config.json +++ b/docs/static/schemas/config.json @@ -1565,6 +1565,10 @@ "useCache": { "type": "boolean", "description": "Whether to cache completions" + }, + "onlyMyCode": { + "type": "boolean", + "description": "If set to true, Continue will not include any snippets from go to definition unless they are within your repository" } }, "required": [] diff --git a/extensions/intellij/src/main/resources/config_schema.json b/extensions/intellij/src/main/resources/config_schema.json index 51fc65340..7f342e195 100644 --- a/extensions/intellij/src/main/resources/config_schema.json +++ b/extensions/intellij/src/main/resources/config_schema.json @@ -1565,6 +1565,10 @@ "useCache": { "type": "boolean", "description": "Whether to cache completions" + }, + "onlyMyCode": { + "type": "boolean", + "description": "If set to true, Continue will not include any snippets from go to definition unless they are within your repository" } }, "required": [] diff --git a/extensions/vscode/config_schema.json b/extensions/vscode/config_schema.json index 51fc65340..7f342e195 100644 --- a/extensions/vscode/config_schema.json +++ b/extensions/vscode/config_schema.json @@ -1565,6 +1565,10 @@ "useCache": { "type": "boolean", "description": "Whether to cache completions" + }, + "onlyMyCode": { + "type": "boolean", + "description": "If set to true, Continue will not include any snippets from go to definition unless they are within your repository" } }, "required": [] diff --git a/extensions/vscode/continue_rc_schema.json b/extensions/vscode/continue_rc_schema.json index 362a36908..e9f79f6c4 100644 --- a/extensions/vscode/continue_rc_schema.json +++ b/extensions/vscode/continue_rc_schema.json @@ -1760,6 +1760,10 @@ "useCache": { "type": "boolean", "description": "Whether to cache completions" + }, + "onlyMyCode": { + "type": "boolean", + "description": "If set to true, Continue will not include any snippets from go to definition unless they are within your repository" } }, "required": [] diff --git a/extensions/vscode/src/autocomplete/getTabCompletion.ts b/extensions/vscode/src/autocomplete/getTabCompletion.ts index a6ded1e4d..29200b767 100644 --- a/extensions/vscode/src/autocomplete/getTabCompletion.ts +++ b/extensions/vscode/src/autocomplete/getTabCompletion.ts @@ -87,6 +87,13 @@ export async function getTabCompletion( }) ])) as AutocompleteSnippet[] + const workspaceDirs = await ide.getWorkspaceDirs(); + if (options.onlyMyCode) { + extrasSnippets = extrasSnippets.filter((snippet) => { + return workspaceDirs.some((dir) => snippet.filepath.startsWith(dir)); + }) + } + const { prefix, suffix, completeMultiline } = await constructAutocompletePrompt( document.uri.toString(), diff --git a/extensions/vscode/src/autocomplete/lsp.ts b/extensions/vscode/src/autocomplete/lsp.ts index a949d06ab..ae4bde8e9 100644 --- a/extensions/vscode/src/autocomplete/lsp.ts +++ b/extensions/vscode/src/autocomplete/lsp.ts @@ -24,7 +24,7 @@ async function executeGotoProvider( )) as any; return definitions.map((d: any) => ({ - filepath: uri, + filepath: d.targetUri.fsPath, range: d.targetRange, })); } From 00173736336e12a8810a3c7f294363868d1b70b1 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Fri, 1 Mar 2024 15:23:29 -0500 Subject: [PATCH 134/141] =?UTF-8?q?=F0=9F=9A=80=20green?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/llm/llms/FreeTrial.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/llm/llms/FreeTrial.ts b/core/llm/llms/FreeTrial.ts index c9e1b770e..1ef07cca1 100644 --- a/core/llm/llms/FreeTrial.ts +++ b/core/llm/llms/FreeTrial.ts @@ -3,7 +3,7 @@ import { ChatMessage, CompletionOptions, ModelProvider } from "../.."; import { streamResponse } from "../stream"; // const SERVER_URL = "http://localhost:3000"; -const SERVER_URL = "https://node-proxy-server-blue-l6vsfbzhba-uw.a.run.app"; +const SERVER_URL = "https://node-proxy-server-green-l6vsfbzhba-uw.a.run.app"; class FreeTrial extends BaseLLM { static providerName: ModelProvider = "free-trial"; From 90e76bcd4c260c2190204c5f1a6b2d5239c4b0cc Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Fri, 1 Mar 2024 16:25:41 -0500 Subject: [PATCH 135/141] =?UTF-8?q?=F0=9F=90=9B=20truncate=20stop=20words?= =?UTF-8?q?=20only=20for=20Jan?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .prettierrc | 4 +++ core/context/retrieval.ts | 41 +++++++++++++++++++------------ core/llm/llms/OpenAI.ts | 22 +++++++++-------- extensions/vscode/src/commands.ts | 8 ++++++ 4 files changed, 49 insertions(+), 26 deletions(-) create mode 100644 .prettierrc diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 000000000..222861c34 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,4 @@ +{ + "tabWidth": 2, + "useTabs": false +} diff --git a/core/context/retrieval.ts b/core/context/retrieval.ts index 41de15304..c3025ed67 100644 --- a/core/context/retrieval.ts +++ b/core/context/retrieval.ts @@ -9,7 +9,7 @@ import { getBasename } from "../util"; const RERANK_PROMPT = ( query: string, documentId: string, - document: string + document: string, ) => `You are an expert software developer responsible for helping detect whether the retrieved snippet of code is relevant to the query. For a given input, you need to output a single word: "Yes" or "No" indicating the retrieved snippet is relevant to the query. Query: Where is the FastAPI server? @@ -49,7 +49,7 @@ Relevant: async function scoreChunk( chunk: Chunk, llm: ILLM, - query: string + query: string, ): Promise { const completion = await llm.complete( RERANK_PROMPT(query, getBasename(chunk.filepath), chunk.content), @@ -59,7 +59,7 @@ async function scoreChunk( llm.providerName.startsWith("openai") && llm.model.startsWith("gpt-4") ? "gpt-3.5-turbo" : llm.model, - } + }, ); if (!completion) { @@ -79,7 +79,7 @@ async function scoreChunk( return 0.0; } else { console.warn( - `Unexpected response from single token reranker: "${answer}". Expected "yes" or "no".` + `Unexpected response from single token reranker: "${answer}". Expected "yes" or "no".`, ); return 0.0; } @@ -89,10 +89,10 @@ async function rerank( chunks: Chunk[], llm: ILLM, query: string, - nFinal: number + nFinal: number, ): Promise { const scores = await Promise.all( - chunks.map((chunk) => scoreChunk(chunk, llm, query)) + chunks.map((chunk) => scoreChunk(chunk, llm, query)), ); const sorted = chunks .map((chunk, i) => ({ chunk, score: scores[i] })) @@ -104,7 +104,7 @@ async function rerank( export async function retrieveContextItemsFromEmbeddings( extras: ContextProviderExtras, options: any | undefined, - filterDirectory: string | undefined + filterDirectory: string | undefined, ): Promise { if (!extras.embeddingsProvider) { return []; @@ -123,9 +123,14 @@ export async function retrieveContextItemsFromEmbeddings( throw new Error("No workspace directories found"); } - const branches = await Promise.all( - workspaceDirs.map((dir) => extras.ide.getBranch(dir)) - ); + const branches = (await Promise.race([ + workspaceDirs.map((dir) => extras.ide.getBranch(dir)), + new Promise((resolve) => { + setTimeout(() => { + resolve(["NONE"]); + }, 500); + }), + ])) as string[]; const tags: IndexTag[] = workspaceDirs.map((directory, i) => ({ directory, branch: branches[i], @@ -138,10 +143,14 @@ export async function retrieveContextItemsFromEmbeddings( if (extras.fullInput.trim() !== "") { ftsResults = await ftsIndex.retrieve( tags, - extras.fullInput.trim().split(" ").map(element => `"${element}"`).join(" OR "), + extras.fullInput + .trim() + .split(" ") + .map((element) => `"${element}"`) + .join(" OR "), nRetrieve / 2, filterDirectory, - undefined + undefined, ); } } catch (e) { @@ -149,13 +158,13 @@ export async function retrieveContextItemsFromEmbeddings( } const lanceDbIndex = new LanceDbIndex(extras.embeddingsProvider, (path) => - extras.ide.readFile(path) + extras.ide.readFile(path), ); let vecResults = await lanceDbIndex.retrieve( tags, extras.fullInput, nRetrieve, - filterDirectory + filterDirectory, ); // Now combine these (de-duplicate) and re-rank @@ -169,7 +178,7 @@ export async function retrieveContextItemsFromEmbeddings( (r) => r.filepath === vecResult.filepath && r.startLine === vecResult.startLine && - r.endLine === vecResult.endLine + r.endLine === vecResult.endLine, ) ) { results.push(vecResult); @@ -183,7 +192,7 @@ export async function retrieveContextItemsFromEmbeddings( if (results.length === 0) { throw new Error( - "Warning: No results found for @codebase context provider." + "Warning: No results found for @codebase context provider.", ); } diff --git a/core/llm/llms/OpenAI.ts b/core/llm/llms/OpenAI.ts index 7804b0ca5..56271632a 100644 --- a/core/llm/llms/OpenAI.ts +++ b/core/llm/llms/OpenAI.ts @@ -71,7 +71,9 @@ class OpenAI extends BaseLLM { top_p: options.topP, frequency_penalty: options.frequencyPenalty, presence_penalty: options.presencePenalty, - stop: options.stop?.slice(0, 4), + stop: this.apiBase?.includes(":1337") + ? options.stop?.slice(0, 4) + : options.stop, }; return finalOptions; @@ -79,12 +81,12 @@ class OpenAI extends BaseLLM { protected async _complete( prompt: string, - options: CompletionOptions + options: CompletionOptions, ): Promise { let completion = ""; for await (const chunk of this._streamChat( [{ role: "user", content: prompt }], - options + options, )) { completion += chunk.content; } @@ -93,7 +95,7 @@ class OpenAI extends BaseLLM { } private _getEndpoint( - endpoint: "/chat/completions" | "/completions" | "/models" + endpoint: "/chat/completions" | "/completions" | "/models", ) { if (this.apiType === "azure") { return `${this.apiBase}/openai/deployments/${this.engine}${endpoint}?api-version=${this.apiVersion}`; @@ -101,7 +103,7 @@ class OpenAI extends BaseLLM { let url = this.apiBase; if (!url) { throw new Error( - "No API base URL provided. Please set the 'apiBase' option in config.json" + "No API base URL provided. Please set the 'apiBase' option in config.json", ); } if (url.endsWith("/")) { @@ -114,11 +116,11 @@ class OpenAI extends BaseLLM { protected async *_streamComplete( prompt: string, - options: CompletionOptions + options: CompletionOptions, ): AsyncGenerator { for await (const chunk of this._streamChat( [{ role: "user", content: prompt }], - options + options, )) { yield stripImages(chunk.content); } @@ -126,7 +128,7 @@ class OpenAI extends BaseLLM { protected async *_legacystreamComplete( prompt: string, - options: CompletionOptions + options: CompletionOptions, ): AsyncGenerator { const args: any = this._convertArgs(options, []); args.prompt = prompt; @@ -154,7 +156,7 @@ class OpenAI extends BaseLLM { protected async *_streamChat( messages: ChatMessage[], - options: CompletionOptions + options: CompletionOptions, ): AsyncGenerator { if ( !CHAT_ONLY_MODELS.includes(options.model) && @@ -163,7 +165,7 @@ class OpenAI extends BaseLLM { ) { for await (const content of this._legacystreamComplete( stripImages(messages[messages.length - 1]?.content || ""), - options + options, )) { yield { role: "assistant", diff --git a/extensions/vscode/src/commands.ts b/extensions/vscode/src/commands.ts index 8156779d0..ffea374c3 100644 --- a/extensions/vscode/src/commands.ts +++ b/extensions/vscode/src/commands.ts @@ -6,6 +6,7 @@ import * as vscode from "vscode"; import { IDE } from "core"; import { ConfigHandler } from "core/config/handler"; import { logDevData } from "core/util/devdata"; +import { Telemetry } from "core/util/posthog"; import { AutocompleteOutcome } from "./autocomplete/getTabCompletion"; import { ContinueGUIWebviewViewProvider } from "./debugPanel"; import { DiffManager } from "./diff/horizontal"; @@ -409,6 +410,13 @@ const commandsMap: ( clearTimeout(logRejectionTimeout); outcome.accepted = true; logDevData("autocomplete", outcome); + Telemetry.capture("autocomplete", { + accepted: outcome.accepted, + modelName: outcome.modelName, + modelProvider: outcome.modelProvider, + time: outcome.time, + cacheHit: outcome.cacheHit + }) }, "continue.toggleTabAutocompleteEnabled": () => { const config = vscode.workspace.getConfiguration("continue"); From 3c1853bd9861d6bf37b188cbf6d82cdacd2ea55a Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Fri, 1 Mar 2024 19:25:31 -0500 Subject: [PATCH 136/141] =?UTF-8?q?=F0=9F=90=9B=20fix=20codebase=20bug=20r?= =?UTF-8?q?eturning=20no=20results?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/context/retrieval.ts | 18 +++++++++--------- .../embeddings/OllamaEmbeddingsProvider.ts | 4 ++-- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/core/context/retrieval.ts b/core/context/retrieval.ts index c3025ed67..4d218696e 100644 --- a/core/context/retrieval.ts +++ b/core/context/retrieval.ts @@ -1,7 +1,6 @@ import { Chunk, ContextItem, ContextProviderExtras, ILLM } from ".."; import { FullTextSearchCodebaseIndex } from "../indexing/FullTextSearch"; import { LanceDbIndex } from "../indexing/LanceDbIndex"; -import { ChunkCodebaseIndex } from "../indexing/chunk/ChunkCodebaseIndex"; import { IndexTag } from "../indexing/types"; import { llmCanGenerateInParallel } from "../llm/autodetect"; import { getBasename } from "../util"; @@ -124,25 +123,26 @@ export async function retrieveContextItemsFromEmbeddings( } const branches = (await Promise.race([ - workspaceDirs.map((dir) => extras.ide.getBranch(dir)), + Promise.all(workspaceDirs.map((dir) => extras.ide.getBranch(dir))), new Promise((resolve) => { setTimeout(() => { resolve(["NONE"]); }, 500); }), ])) as string[]; - const tags: IndexTag[] = workspaceDirs.map((directory, i) => ({ - directory, - branch: branches[i], - artifactId: ChunkCodebaseIndex.artifactId, - })); + const tags: (artifactId: string) => IndexTag[] = (artifactId: string) => + workspaceDirs.map((directory, i) => ({ + directory, + branch: branches[i], + artifactId, + })); let ftsResults: Chunk[] = []; try { if (extras.fullInput.trim() !== "") { ftsResults = await ftsIndex.retrieve( - tags, + tags(ftsIndex.artifactId), extras.fullInput .trim() .split(" ") @@ -161,7 +161,7 @@ export async function retrieveContextItemsFromEmbeddings( extras.ide.readFile(path), ); let vecResults = await lanceDbIndex.retrieve( - tags, + tags(lanceDbIndex.artifactId), extras.fullInput, nRetrieve, filterDirectory, diff --git a/core/indexing/embeddings/OllamaEmbeddingsProvider.ts b/core/indexing/embeddings/OllamaEmbeddingsProvider.ts index 7916bb691..2bb720bb3 100644 --- a/core/indexing/embeddings/OllamaEmbeddingsProvider.ts +++ b/core/indexing/embeddings/OllamaEmbeddingsProvider.ts @@ -26,10 +26,10 @@ class OllamaEmbeddingsProvider extends BaseEmbeddingsProvider { return "ollama::" + this.options.model; } - embed(chunks: string[]) { + async embed(chunks: string[]) { const results: any = []; for (const chunk of chunks) { - results.push(embedOne(chunk, this.options)); + results.push(await embedOne(chunk, this.options)); } return results; } From 59bf79c69c4e7732eab57588a61e9b969c12596b Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Fri, 1 Mar 2024 22:58:39 -0500 Subject: [PATCH 137/141] =?UTF-8?q?=F0=9F=90=9B=20fix=20indexing=20for=20r?= =?UTF-8?q?emote=20SSH?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- extensions/vscode/src/ideProtocol.ts | 31 ++++++++++++++++------------ 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/extensions/vscode/src/ideProtocol.ts b/extensions/vscode/src/ideProtocol.ts index 26ca8ed78..5c7f6e8a7 100644 --- a/extensions/vscode/src/ideProtocol.ts +++ b/extensions/vscode/src/ideProtocol.ts @@ -29,19 +29,24 @@ class VsCodeIde implements IDE { filepath, new vscode.Range( new vscode.Position(range.start.line, range.start.character), - new vscode.Position(range.end.line, range.end.character) - ) + new vscode.Position(range.end.line, range.end.character), + ), ); } async getStats(directory: string): Promise<{ [path: string]: number }> { + const scheme = vscode.workspace.workspaceFolders?.[0].uri.scheme; const files = await this.listWorkspaceContents(directory); const pathToLastModified: { [path: string]: number } = {}; await Promise.all( files.map(async (file) => { - let stat = await vscode.workspace.fs.stat(vscode.Uri.file(file)); + const uri = vscode.Uri.from({ + scheme: scheme ? scheme : "file", + path: file, + }); + let stat = await vscode.workspace.fs.stat(uri); pathToLastModified[file] = stat.mtime; - }) + }), ); return pathToLastModified; @@ -77,7 +82,7 @@ class VsCodeIde implements IDE { const contents = await Promise.all( this.ideUtils .getWorkspaceDirectories() - .map((dir) => this.ideUtils.getDirectoryContents(dir, true)) + .map((dir) => this.ideUtils.getDirectoryContents(dir, true)), ); return contents.flat(); } @@ -92,7 +97,7 @@ class VsCodeIde implements IDE { for (const [filename, type] of files) { if (type === vscode.FileType.File && filename === ".continuerc.json") { const contents = await this.ideUtils.readFile( - vscode.Uri.joinPath(workspaceDir, filename).fsPath + vscode.Uri.joinPath(workspaceDir, filename).fsPath, ); configs.push(JSON.parse(contents)); } @@ -110,7 +115,7 @@ class VsCodeIde implements IDE { directory, [], false, - undefined + undefined, )) { allDirs.push(dir); } @@ -130,7 +135,7 @@ class VsCodeIde implements IDE { async writeFile(path: string, contents: string): Promise { await vscode.workspace.fs.writeFile( vscode.Uri.file(path), - Buffer.from(contents) + Buffer.from(contents), ); } @@ -145,11 +150,11 @@ class VsCodeIde implements IDE { async showLines( filepath: string, startLine: number, - endLine: number + endLine: number, ): Promise { const range = new vscode.Range( new vscode.Position(startLine, 0), - new vscode.Position(endLine, 0) + new vscode.Position(endLine, 0), ); openEditorAndRevealRange(filepath, range).then(() => { // TODO: Highlight lines @@ -183,7 +188,7 @@ class VsCodeIde implements IDE { async showDiff( filepath: string, newContents: string, - stepIndex: number + stepIndex: number, ): Promise { await this.diffManager.writeDiff(filepath, newContents, stepIndex); } @@ -208,10 +213,10 @@ class VsCodeIde implements IDE { "@vscode", "ripgrep", "bin", - "rg" + "rg", ), ["-i", "-C", "2", `"${query}"`, "."], - { cwd: dir } + { cwd: dir }, ); let output = ""; From 052fa5174ab027723bcb10d96ce40a0fcfc3aca3 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Fri, 1 Mar 2024 23:28:35 -0500 Subject: [PATCH 138/141] =?UTF-8?q?=F0=9F=90=9B=20fix=20recently=20edited?= =?UTF-8?q?=20bug=20when=20file=20is=20deleted?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../vscode/src/autocomplete/recentlyEdited.ts | 96 +++++++++++-------- 1 file changed, 58 insertions(+), 38 deletions(-) diff --git a/extensions/vscode/src/autocomplete/recentlyEdited.ts b/extensions/vscode/src/autocomplete/recentlyEdited.ts index 66e0de780..aec821c9b 100644 --- a/extensions/vscode/src/autocomplete/recentlyEdited.ts +++ b/extensions/vscode/src/autocomplete/recentlyEdited.ts @@ -31,7 +31,7 @@ export class RecentlyEditedTracker { uri: event.document.uri, range: new vscode.Range( new vscode.Position(change.range.start.line, 0), - new vscode.Position(change.range.end.line + 1, 0) + new vscode.Position(change.range.end.line + 1, 0), ), timestamp: Date.now(), }; @@ -64,7 +64,7 @@ export class RecentlyEditedTracker { if (newLength >= RecentlyEditedTracker.maxRecentlyEditedRanges) { this.recentlyEditedRanges = this.recentlyEditedRanges.slice( 0, - RecentlyEditedTracker.maxRecentlyEditedRanges + RecentlyEditedTracker.maxRecentlyEditedRanges, ); } } @@ -82,61 +82,81 @@ export class RecentlyEditedTracker { if (newLength >= RecentlyEditedTracker.maxRecentlyEditedDocuments) { this.recentlyEditedDocuments = this.recentlyEditedDocuments.slice( 0, - RecentlyEditedTracker.maxRecentlyEditedDocuments + RecentlyEditedTracker.maxRecentlyEditedDocuments, ); } } private removeOldEntries() { this.recentlyEditedRanges = this.recentlyEditedRanges.filter( - (entry) => entry.timestamp > Date.now() - RecentlyEditedTracker.staleTime + (entry) => entry.timestamp > Date.now() - RecentlyEditedTracker.staleTime, ); } public async getRecentlyEditedRanges(): Promise { - return Promise.all( - this.recentlyEditedRanges.map(async (entry) => ({ - timestamp: entry.timestamp, - filepath: entry.uri.fsPath, - contents: await vscode.workspace.fs - .readFile(entry.uri) - .then((content) => content.toString().split("\n").slice(entry.range.start.line, entry.range.end.line + 1).join("\n")), - range: { - start: { - line: entry.range.start.line, - character: entry.range.start.character, - }, - end: { - line: entry.range.end.line, - character: entry.range.end.character, - }, - }, - })) + const results = await Promise.all( + this.recentlyEditedRanges.map(async (entry) => { + try { + const contents = await vscode.workspace.fs + .readFile(entry.uri) + .then((content) => + content + .toString() + .split("\n") + .slice(entry.range.start.line, entry.range.end.line + 1) + .join("\n"), + ); + return { + timestamp: entry.timestamp, + filepath: entry.uri.fsPath, + contents, + range: { + start: { + line: entry.range.start.line, + character: entry.range.start.character, + }, + end: { + line: entry.range.end.line, + character: entry.range.end.character, + }, + }, + }; + } catch (e) { + return null; + } + }), ); + return results.filter((result) => result !== null) as any; } public async getRecentlyEditedDocuments(): Promise< RangeInFileWithContents[] > { - return Promise.all( + const results = await Promise.all( this.recentlyEditedDocuments.map(async (entry) => { - const contents = await vscode.workspace.fs - .readFile(entry.uri) - .then((content) => content.toString()); - const lines = contents.split("\n"); + try { + const contents = await vscode.workspace.fs + .readFile(entry.uri) + .then((content) => content.toString()); + const lines = contents.split("\n"); - return { - filepath: entry.uri.fsPath, - contents, - range: { - start: { line: 0, character: 0 }, - end: { - line: lines.length - 1, - character: lines[lines.length - 1].length, + return { + filepath: entry.uri.fsPath, + contents, + range: { + start: { line: 0, character: 0 }, + end: { + line: lines.length - 1, + character: lines[lines.length - 1].length, + }, }, - }, - }; - }) + }; + } catch (e) { + return null; + } + }), ); + + return results.filter((result) => result !== null) as any; } } From dd0750877ce0d99a1519f4ae9527b7825f5f501f Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Sat, 2 Mar 2024 09:42:20 -0500 Subject: [PATCH 139/141] =?UTF-8?q?=F0=9F=8E=A8=20formatting?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gui/src/components/Layout.tsx | 13 ++++++------- gui/src/pages/gui.tsx | 21 +++++++++------------ 2 files changed, 15 insertions(+), 19 deletions(-) diff --git a/gui/src/components/Layout.tsx b/gui/src/components/Layout.tsx index f7374e1ff..7e136df48 100644 --- a/gui/src/components/Layout.tsx +++ b/gui/src/components/Layout.tsx @@ -107,20 +107,20 @@ const Layout = () => { const location = useLocation(); const dispatch = useDispatch(); const dialogMessage = useSelector( - (state: RootState) => state.uiState.dialogMessage + (state: RootState) => state.uiState.dialogMessage, ); const showDialog = useSelector( - (state: RootState) => state.uiState.showDialog + (state: RootState) => state.uiState.showDialog, ); const defaultModel = useSelector(defaultModelSelector); // #region Selectors const bottomMessage = useSelector( - (state: RootState) => state.uiState.bottomMessage + (state: RootState) => state.uiState.bottomMessage, ); const displayBottomMessageOnBottom = useSelector( - (state: RootState) => state.uiState.displayBottomMessageOnBottom + (state: RootState) => state.uiState.displayBottomMessageOnBottom, ); const timeline = useSelector((state: RootState) => state.state.history); @@ -152,7 +152,7 @@ const Layout = () => { async () => { navigate("/models"); }, - [navigate] + [navigate], ); useWebviewListener("openSettings", async () => { @@ -169,7 +169,7 @@ const Layout = () => { navigate("/history"); } }, - [location, navigate] + [location, navigate], ); useWebviewListener("indexProgress", async (data) => { @@ -237,7 +237,6 @@ const Layout = () => { {indexingProgress >= 1 && // Would take up too much space together with indexing progress defaultModel?.provider === "free-trial" && - defaultModel?.apiKey === "" && (location.pathname === "/settings" || parseInt(localStorage.getItem("ftc") || "0") >= 125) && ( { - if ( - defaultModel?.provider === "free-trial" && - defaultModel?.apiKey === "" - ) { + if (defaultModel?.provider === "free-trial") { const ftc = localStorage.getItem("ftc"); if (ftc) { const u = parseInt(ftc); @@ -253,7 +250,7 @@ function GUI(props: GUIProps) { let currentCount = parseInt(counter); localStorage.setItem( "mainTextEntryCounter", - (currentCount + 1).toString() + (currentCount + 1).toString(), ); if (currentCount === 300) { dispatch( @@ -276,8 +273,8 @@ function GUI(props: GUIProps) { setDialogMessage(

    Thanks! We'll be in touch soon. -
    - ) +
    , + ), ); }} style={{ @@ -311,8 +308,8 @@ function GUI(props: GUIProps) { Submit -
    - ) +
    , + ), ); dispatch(setDialogEntryOn(false)); dispatch(setShowDialog(true)); @@ -327,7 +324,7 @@ function GUI(props: GUIProps) { defaultModel, state, streamResponse, - ] + ], ); const { saveSession } = useHistory(dispatch); @@ -338,7 +335,7 @@ function GUI(props: GUIProps) { saveSession(); mainTextInputRef.current?.focus?.(); }, - [saveSession] + [saveSession], ); const isLastUserInput = useCallback( @@ -352,7 +349,7 @@ function GUI(props: GUIProps) { } return !foundLaterUserInput; }, - [state.history] + [state.history], ); return ( From 865eebfe719c48fc22143d2a084f17b470a642e9 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Sat, 2 Mar 2024 10:23:09 -0500 Subject: [PATCH 140/141] =?UTF-8?q?=F0=9F=94=96=20version=20upgrade?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 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 12ab5530b..ebca0f723 100644 --- a/extensions/vscode/package.json +++ b/extensions/vscode/package.json @@ -1,7 +1,7 @@ { "name": "continue", "icon": "media/icon.png", - "version": "0.9.75", + "version": "0.9.76", "repository": { "type": "git", "url": "https://github.com/continuedev/continue" From bba14c01636f420fcf8e60f15af61c9b18a27bc0 Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Sat, 2 Mar 2024 15:32:43 +0000 Subject: [PATCH 141/141] =?UTF-8?q?=F0=9F=92=9A=20Update=20package.json=20?= =?UTF-8?q?version=20[skip=20ci]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- extensions/vscode/package-lock.json | 4 ++-- extensions/vscode/package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/extensions/vscode/package-lock.json b/extensions/vscode/package-lock.json index 0d17a0b6a..f328a950b 100644 --- a/extensions/vscode/package-lock.json +++ b/extensions/vscode/package-lock.json @@ -1,12 +1,12 @@ { "name": "continue", - "version": "0.9.75", + "version": "0.9.77", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "continue", - "version": "0.9.75", + "version": "0.9.77", "license": "Apache-2.0", "dependencies": { "@electron/rebuild": "^3.2.10", diff --git a/extensions/vscode/package.json b/extensions/vscode/package.json index ebca0f723..d374ec8d6 100644 --- a/extensions/vscode/package.json +++ b/extensions/vscode/package.json @@ -1,7 +1,7 @@ { "name": "continue", "icon": "media/icon.png", - "version": "0.9.76", + "version": "0.9.77", "repository": { "type": "git", "url": "https://github.com/continuedev/continue"