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/.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/settings.json b/.vscode/settings.json index 37b52608c..b384537ea 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -5,5 +5,6 @@ "python.autoComplete.extraPaths": [], "python.testing.pytestArgs": ["server"], "python.testing.unittestEnabled": false, - "python.testing.pytestEnabled": true + "python.testing.pytestEnabled": true, + "editor.tabSize": 2 } diff --git a/.vscode/tasks.json b/.vscode/tasks.json index c46520247..911b8a7e8 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -56,8 +56,8 @@ { "label": "vscode-extension:continue-ui:build", "type": "shell", - "command": "node", - "args": ["${workspaceFolder}/extensions/vscode/scripts/prepackage.js"], + "command": "proxychains", + "args": ["-q", "node", "${workspaceFolder}/extensions/vscode/scripts/prepackage.js"], "problemMatcher": ["$tsc"], "presentation": { "revealProblems": "onProblem", @@ -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/autocomplete/ast.ts b/core/autocomplete/ast.ts new file mode 100644 index 000000000..220597217 --- /dev/null +++ b/core/autocomplete/ast.ts @@ -0,0 +1,89 @@ +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 ?? 0); + const endIndex = + lines.slice(0, e.line).join("\n").length + + (lines[e.line]?.slice(0, e.character).length ?? 0); + + 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 { + 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/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 f9f28704c..44333dae2 100644 --- a/core/autocomplete/constructPrompt.ts +++ b/core/autocomplete/constructPrompt.ts @@ -1,13 +1,17 @@ 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, getTreePathAtCursor } from "./ast"; import { AutocompleteLanguageInfo, LANGUAGES, Typescript } from "./languages"; +import { AutocompleteSnippet, fillPromptWithSnippets, rankSnippets, removeRangeFromSnippets } from "./ranking"; +import { slidingWindowMatcher } from "./slidingWindow"; export function languageForFilepath( filepath: string @@ -23,57 +27,15 @@ 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"); } -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; -} - const BLOCK_TYPES = ["body", "statement_block"]; -function shouldCompleteMultiline( +function shouldCompleteMultilineAst( treePath: Parser.SyntaxNode[], cursorLine: number ): boolean { @@ -100,27 +62,12 @@ function shouldCompleteMultiline( return false; } -export async function constructAutocompletePrompt( +async function shouldCompleteMultiline( filepath: string, fullPrefix: string, - fullSuffix: string, - clipboardText: string, - language: AutocompleteLanguageInfo, - getDefinition: ( - filepath: string, - line: number, - character: number - ) => Promise, - options: TabAutocompleteOptions -): 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); @@ -135,49 +82,115 @@ export async function constructAutocompletePrompt( 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); + completeMultiline = shouldCompleteMultilineAst(treePath, cursorLine); } + return completeMultiline; +} - // Construct basic prefix / suffix - const formattedSnippets = snippets - .map((snippet) => - formatExternalSnippet(snippet.filepath, snippet.content, language) - ) - .join("\n"); +export async function constructAutocompletePrompt( + filepath: string, + cursorLine: number, + fullPrefix: string, + fullSuffix: string, + clipboardText: string, + language: AutocompleteLanguageInfo, + options: TabAutocompleteOptions, + recentlyEditedRanges: RangeInFileWithContents[], + recentlyEditedDocuments: RangeInFileWithContents[], + modelName: string, + extraSnippets: AutocompleteSnippet[] +): Promise<{ + prefix: string; + suffix: string; + useFim: boolean; + completeMultiline: boolean; +}> { + // Find external snippets + let snippets: RangeInFileWithContents[] = extraSnippets; + + 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) => { + return r; + // return await getScopeAroundRange(r); + }) + )).filter((s) => !!s); + snippets.push(...(recentlyEdited as any)); + + // Rank / order the snippets + const scoredSnippets = rankSnippets(snippets, windowAroundCursor) + + // Fill maxSnippetTokens with snippets + const maxSnippetTokens = options.maxPromptTokens * options.maxSnippetPercentage; + + // Construct basic prefix const maxPrefixTokens = - options.maxPromptTokens * options.prefixPercentage - - countTokens(formattedSnippets, "gpt-4"); - let prefix = pruneLinesFromTop(fullPrefix, maxPrefixTokens); - if (formattedSnippets.length > 0) { - prefix = formattedSnippets + "\n" + prefix; - } - + options.maxPromptTokens * options.prefixPercentage + let prefix = pruneLinesFromTop(fullPrefix, maxPrefixTokens, modelName); + + // Construct suffix 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, completeMultiline }; + // Remove prefix range from snippets + 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 + } + } + 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 + .map((snippet) => + formatExternalSnippet(snippet.filepath, snippet.contents, language) + ) + .join("\n"); + if (formattedSnippets.length > 0) { + prefix = formattedSnippets + "\n\n" + prefix; + } + + + return { + prefix, + suffix, + useFim: true, + completeMultiline: await shouldCompleteMultiline( + filepath, + fullPrefix, + fullSuffix + ), + }; } 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 +}; diff --git a/core/autocomplete/lineStream.ts b/core/autocomplete/lineStream.ts index bc8a238fd..9299549dc 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) { @@ -39,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 ae70787ef..3f14abf5c 100644 --- a/core/autocomplete/parameters.ts +++ b/core/autocomplete/parameters.ts @@ -3,8 +3,15 @@ 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, + multilineCompletions: "auto", + slidingWindowPrefixPercentage: 0.75, + slidingWindowSize: 500, + maxSnippetPercentage: 0.6, + recentlyEditedSimilarityThreshold: 0.3, + useCache: true, + onlyMyCode: true }; diff --git a/core/autocomplete/ranking.ts b/core/autocomplete/ranking.ts new file mode 100644 index 000000000..0c0970f7b --- /dev/null +++ b/core/autocomplete/ranking.ts @@ -0,0 +1,207 @@ +import { Range } from ".."; +import { RangeInFileWithContents } from "../commands/util"; +import { countTokens } from "../llm/countTokens"; + +export type AutocompleteSnippet = RangeInFileWithContents & { + score: number; +}; + +const rx = /[\s.,\/#!$%\^&\*;:{}=\-_`~()\[\]]/g; +function getSymbolsForSnippet(snippet: string): Set { + const symbols = snippet + .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 jaccardSimilarity(a: string, b: string): number { + const aSet = getSymbolsForSnippet(a); + const bSet = getSymbolsForSnippet(b); + const union = new Set([...aSet, ...bSet]).size; + + // Avoid division by zero + if (union === 0) { + return 0; + } + + let intersection = 0; + for (const symbol of aSet) { + if (bSet.has(symbol)) { + intersection++; + } + } + + return intersection / union; +} + +/** + * Rank code snippets to be used in tab-autocomplete prompt. Returns a sorted version of the snippet array. + */ +export function rankSnippets( + ranges: RangeInFileWithContents[], + windowAroundCursor: string +): AutocompleteSnippet[] { + const snippets = ranges.map((snippet) => ({ + score: jaccardSimilarity(snippet.contents, windowAroundCursor), + ...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; +} + + +/** + * 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; +}; + +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/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/core/autocomplete/slidingWindow.ts b/core/autocomplete/slidingWindow.ts new file mode 100644 index 000000000..cfcdbb340 --- /dev/null +++ b/core/autocomplete/slidingWindow.ts @@ -0,0 +1,59 @@ +import { RangeInFileWithContents } from "../commands/util"; +import { AutocompleteSnippet, jaccardSimilarity } from "./ranking"; + +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"); + } +} + +/** + * Match by similarity over sliding windows of recent documents. + * @param recentDocuments + * @param prefix + * @param suffix + */ +export async function slidingWindowMatcher( + recentDocuments: RangeInFileWithContents[], + windowAroundCursor: string, + topN: number, + windowSize: number +): Promise { + // Sorted lowest similarity to highest + const topMatches: AutocompleteSnippet[] = []; + + for (const { filepath, contents, range } of recentDocuments) { + for (const window of slidingWindow(contents, windowSize)) { + const score = jaccardSimilarity(window, windowAroundCursor); + + // Insertion sort + let i = -1; + while (++i < topMatches.length && score > topMatches[i].score) {} + topMatches.splice(i + 1, 0, { filepath, contents, score, range }); + if (topMatches.length > topN) { + topMatches.shift(); + } + } + } + + // TODO: convert the arbitrary window frame to some whole AST node? + return topMatches; +} 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/core/commands/slash/edit.ts b/core/commands/slash/edit.ts index 9ebdb39c4..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, @@ -428,7 +433,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 = []; @@ -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/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/default.ts b/core/config/default.ts index 8e134f6fe..1fad40ea7 100644 --- a/core/config/default.ts +++ b/core/config/default.ts @@ -1,12 +1,17 @@ import { SerializedContinueConfig } from ".."; -const defaultConfig: SerializedContinueConfig = { +export const defaultConfig: SerializedContinueConfig = { models: [ { title: "GPT-4 Vision (Free Trial)", provider: "free-trial", model: "gpt-4-vision-preview", }, + { + title: "GPT-3.5-Turbo (Free Trial)", + provider: "free-trial", + model: "gpt-3.5-turbo", + }, { title: "Gemini Pro (Free Trial)", provider: "free-trial", @@ -29,7 +34,7 @@ const defaultConfig: SerializedContinueConfig = { }, { name: "share", - description: "Download and share this session", + description: "Export this session as markdown", }, { name: "cmd", @@ -55,6 +60,62 @@ const defaultConfig: SerializedContinueConfig = { { name: "codebase", params: {} }, { name: "locals", params: {} }, ], + tabAutocompleteModel: { + title: "Starcoder 3b", + provider: "ollama", + model: "starcoder-3b", + } }; -export default defaultConfig; +export const defaultConfigJetBrains: SerializedContinueConfig = { + models: [ + { + title: "GPT-4 Vision (Free Trial)", + provider: "free-trial", + model: "gpt-4-vision-preview", + }, + { + title: "GPT-3.5-Turbo (Free Trial)", + provider: "free-trial", + model: "gpt-3.5-turbo", + }, + { + title: "Gemini Pro (Free Trial)", + provider: "free-trial", + model: "gemini-pro", + }, + { + title: "Codellama 70b (Free Trial)", + provider: "free-trial", + model: "codellama-70b", + }, + ], + slashCommands: [ + { + name: "edit", + description: "Edit selected code", + }, + { + name: "comment", + description: "Write comments for the selected code", + }, + { + name: "share", + description: "Export this session as markdown", + }, + ], + customCommands: [ + { + name: "test", + prompt: + "Write a comprehensive set of unit tests for the selected code. It should setup, run tests that check for correctness including important edge cases, and teardown. Ensure that the tests are complete and sophisticated. Give the tests just as chat output, don't edit any file.", + description: "Write unit tests for highlighted code", + }, + ], + contextProviders: [ + { + name: "open", + params: {}, + }, + ], +}; diff --git a/core/config/handler.ts b/core/config/handler.ts new file mode 100644 index 000000000..2930d547d --- /dev/null +++ b/core/config/handler.ts @@ -0,0 +1,200 @@ +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; + 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, + onConfigUpdate: () => void + ) { + this.ide = ide; + this.remoteConfigServerUrl = remoteConfigServerUrl; + this.writeLog = writeLog; + this.onConfigUpdate = onConfigUpdate; + try { + this.loadConfig(); + } catch (e) { + console.error("Failed to load config: ", e); + } + } + + reloadConfig() { + this.savedConfig = undefined; + this.savedBrowserConfig = undefined; + this.loadConfig(); + this.onConfigUpdate() + } + + 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"); + } + + const ideInfo = await this.ide.getIdeInfo(); + this.savedConfig = await loadFullConfigNode( + this.ide.readFile, + workspaceConfigs, + this.remoteConfigServerUrl, + ideInfo.ideType + ); + 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: any) { + console.error("Failed to loadConfig: ", e.message); + throw new Error("Failed to loadConfig: " + e.message); + } + } + + 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; + } + + // Replace localhost with 127.0.0.1 + input = new URL(input); + 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, + }); + + 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) => { + this.writeLog(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/load.ts b/core/config/load.ts index fb41ec73a..cdeff8db9 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 { BrowserSerializedContinueConfig, Config, @@ -9,11 +10,11 @@ import { CustomLLM, EmbeddingsProviderDescription, IContextProvider, + IdeType, ModelDescription, SerializedContinueConfig, SlashCommand, } from ".."; - import { slashCommandFromDescription, slashFromCustomCommand, @@ -33,31 +34,49 @@ import { getConfigJsonPath, getConfigJsonPathForRemote, getConfigTsPath, + getContinueDotEnv, migrate, } from "../util/paths"; +const { execSync } = require("child_process"); + +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, + ...getContinueDotEnv(), + }; + + config.env.forEach((envVar) => { + content = content.replaceAll( + new RegExp(`"${envVar}"`, "g"), + `"${env[envVar]}"` + ); + }); + } + + 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 + remoteConfigServerUrl: URL | undefined, + ideType: IdeType ): SerializedContinueConfig { - const configPath = getConfigJsonPath(); - let contents = fs.readFileSync(configPath, "utf8"); - let config = JSON.parse(contents) as SerializedContinueConfig; + const configPath = getConfigJsonPath(ideType); + 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,21 +131,15 @@ 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", configMergeKeys); } for (const workspaceConfig of workspaceConfigs) { - config = mergeJson(config, workspaceConfig, workspaceConfig.mergeBehavior); + config = mergeJson(config, workspaceConfig, workspaceConfig.mergeBehavior, configMergeKeys); } return config; @@ -317,53 +330,101 @@ 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}`; +} + +function escapeSpacesInPath(p: string): string { + return p.replace(/ /g, "\\ "); +} + +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( + escapeSpacesInPath(path.dirname(process.execPath)) + + `/esbuild${ + getTarget().startsWith("win32") ? ".exe" : "" + } ${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 + 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) { - throw new Error( + console.log( "Build error. Please check your ~/.continue/config.ts file: " + e ); 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( readFile: (filepath: string) => Promise, workspaceConfigs: ContinueRcJson[], - remoteConfigServerUrl: URL | undefined + remoteConfigServerUrl: URL | undefined, + ideType: IdeType ): Promise { let serialized = loadSerializedConfig( workspaceConfigs, - remoteConfigServerUrl + remoteConfigServerUrl, + 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) { @@ -401,5 +462,5 @@ export { intermediateToFinalConfig, loadFullConfigNode, serializedToIntermediateConfig, - type BrowserSerializedContinueConfig, + type BrowserSerializedContinueConfig }; diff --git a/core/config/types.ts b/core/config/types.ts index c3070041a..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, @@ -337,34 +353,13 @@ 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; 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 @@ -377,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/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/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/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/PostgresContextProvider.ts b/core/context/providers/PostgresContextProvider.ts new file mode 100644 index 000000000..34c829f4d --- /dev/null +++ b/core/context/providers/PostgresContextProvider.ts @@ -0,0 +1,146 @@ +import { BaseContextProvider } from ".."; +import { + ContextItem, + ContextProviderDescription, + ContextProviderExtras, + LoadSubmenuItemsArgs, + ContextSubmenuItem, +} from "../.."; + +class PostgresContextProvider extends BaseContextProvider { + static description: ContextProviderDescription = { + title: "postgres", + displayTitle: "PostgreSQL", + description: "Retrieve PostgreSQL table schema and sample rows", + type: "submenu", + }; + + static ALL_TABLES = "__all_tables"; + static DEFAULT_SAMPLE_ROWS = 3; + + 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, + }); + } + + 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 + ): Promise { + const pool = await this.getPool(); + + try { + const contextItems: ContextItem[] = []; + + 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 + if (!tableName.includes(".")) { + throw new Error( + `Table name must be in format schema.table_name, got ${tableName}` + ); + } + 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 ?? + 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 = `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}-${tableName}-schema-and-sample-rows`, + description: `Schema and sample rows for table ${tableName}`, + 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(); + + try { + const contextItems: ContextSubmenuItem[] = []; + const tableNames = await this.getTableNames(pool); + + for (const tableName of tableNames) { + contextItems.push({ + id: tableName, + title: tableName, + description: `Schema from ${tableName} and ${this.options.sampleRows} sample rows.`, + }); + } + 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) { + 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 a17a580ce..a8809ade9 100644 --- a/core/context/providers/index.ts +++ b/core/context/providers/index.ts @@ -1,8 +1,7 @@ import { BaseContextProvider } from ".."; 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"; @@ -10,13 +9,14 @@ import FolderContextProvider from "./FolderContextProvider"; import GitHubIssuesContextProvider from "./GitHubIssuesContextProvider"; import GoogleContextProvider from "./GoogleContextProvider"; import HttpContextProvider from "./HttpContextProvider"; +import JiraIssuesContextProvider from "./JiraIssuesContextProvider"; import OpenFilesContextProvider from "./OpenFilesContextProvider"; +import PostgresContextProvider from "./PostgresContextProvider"; import ProblemsContextProvider from "./ProblemsContextProvider"; import SearchContextProvider from "./SearchContextProvider"; import TerminalContextProvider from "./TerminalContextProvider"; import LocalsProvider from "./LocalsProvider"; import URLContextProvider from "./URLContextProvider"; -import JiraIssuesContextProvider from "./JiraIssuesContextProvider"; const Providers: (typeof BaseContextProvider)[] = [ DiffContextProvider, @@ -33,9 +33,11 @@ const Providers: (typeof BaseContextProvider)[] = [ ProblemsContextProvider, FolderContextProvider, DocsContextProvider, - CodeHighlightsContextProvider, - CodeOutlineContextProvider, + // CodeHighlightsContextProvider, + // CodeOutlineContextProvider, JiraIssuesContextProvider, + PostgresContextProvider, + DatabaseContextProvider, ]; export function contextProviderClassFromName( diff --git a/core/context/retrieval.ts b/core/context/retrieval.ts index 547977257..4d218696e 100644 --- a/core/context/retrieval.ts +++ b/core/context/retrieval.ts @@ -1,6 +1,6 @@ import { Chunk, ContextItem, ContextProviderExtras, ILLM } from ".."; import { FullTextSearchCodebaseIndex } from "../indexing/FullTextSearch"; -import { ChunkCodebaseIndex } from "../indexing/chunk/ChunkCodebaseIndex"; +import { LanceDbIndex } from "../indexing/LanceDbIndex"; import { IndexTag } from "../indexing/types"; import { llmCanGenerateInParallel } from "../llm/autodetect"; import { getBasename } from "../util"; @@ -8,7 +8,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? @@ -48,7 +48,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), @@ -58,7 +58,7 @@ async function scoreChunk( llm.providerName.startsWith("openai") && llm.model.startsWith("gpt-4") ? "gpt-3.5-turbo" : llm.model, - } + }, ); if (!completion) { @@ -78,7 +78,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; } @@ -88,10 +88,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] })) @@ -103,7 +103,7 @@ async function rerank( export async function retrieveContextItemsFromEmbeddings( extras: ContextProviderExtras, options: any | undefined, - filterDirectory: string | undefined + filterDirectory: string | undefined, ): Promise { if (!extras.embeddingsProvider) { return []; @@ -122,35 +122,49 @@ export async function retrieveContextItemsFromEmbeddings( throw new Error("No workspace directories found"); } - const branches = await Promise.all( - workspaceDirs.map((dir) => extras.ide.getBranch(dir)) - ); - const tags: IndexTag[] = workspaceDirs.map((directory, i) => ({ - directory, - branch: branches[i], - artifactId: ChunkCodebaseIndex.artifactId, - })); + const branches = (await Promise.race([ + Promise.all(workspaceDirs.map((dir) => extras.ide.getBranch(dir))), + new Promise((resolve) => { + setTimeout(() => { + resolve(["NONE"]); + }, 500); + }), + ])) as string[]; + 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, - extras.fullInput.trim().split(" ").map(element => `"${element}"`).join(" OR "), + tags(ftsIndex.artifactId), + extras.fullInput + .trim() + .split(" ") + .map((element) => `"${element}"`) + .join(" OR "), nRetrieve / 2, filterDirectory, - undefined + undefined, ); } } catch (e) { 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(lanceDbIndex.artifactId), extras.fullInput, nRetrieve, - filterDirectory + filterDirectory, ); // Now combine these (de-duplicate) and re-rank @@ -164,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); @@ -178,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/diff/streamDiff.ts b/core/diff/streamDiff.ts index 410a16835..912fc20db 100644 --- a/core/diff/streamDiff.ts +++ b/core/diff/streamDiff.ts @@ -13,7 +13,7 @@ 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(); diff --git a/core/ide/index.ts b/core/ide/index.ts deleted file mode 100644 index c11f771e4..000000000 --- a/core/ide/index.ts +++ /dev/null @@ -1,144 +0,0 @@ -import { Chunk, DiffLine, Problem } from ".."; -import { BrowserSerializedContinueConfig } from "../config/load"; -import { IDE } from "../index"; - -import { ideRequest } from "./messaging"; -async function r(messageType: string, options: any = {}) { - return await ideRequest(messageType, options); -} -export class ExtensionIde implements IDE { - async getTopLevelCallStackSources( - threadIndex: number, - stackDepth: number - ): Promise { - return await r("getTopLevelCallStackSources"); - } - async getAvailableThreads(): Promise { - return await r("getAvailableThreads"); - } - async getSerializedConfig(): Promise { - return await r("getSerializedConfig"); - } - - async getDiff() { - return await r("getDiff"); - } - - async getTerminalContents() { - return await r("getTerminalContents"); - } - - async getDebugLocals(threadIndex: number) { - return await r("getTerminalContents"); - } - - async listWorkspaceContents(directory?: string): Promise { - return await r("listWorkspaceContents"); - } - - async getWorkspaceDirs(): Promise { - return await r("getWorkspaceDirs"); - } - - async showLines( - filepath: string, - startLine: number, - endLine: number - ): Promise { - return await r("showLines", { filepath, startLine, endLine }); - } - - async listFolders(): Promise { - return await r("listFolders"); - } - - _continueDir: string | null = null; - - async getContinueDir(): Promise { - if (this._continueDir) { - return this._continueDir; - } - const dir = await r("getContinueDir"); - 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 }); - } - - async verticalDiffUpdate( - filepath: string, - startLine: number, - endLine: number, - diffLine: DiffLine - ) { - await r("diffLine", { filepath, startLine, endLine, diffLine }); - } - - getOpenFiles(): Promise { - return r("getOpenFiles"); - } - - getPinnedFiles(): Promise { - return r("getPinnedFiles"); - } - - 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 }); - } - - 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/ide/messaging.ts b/core/ide/messaging.ts deleted file mode 100644 index 6b7cc639a..000000000 --- a/core/ide/messaging.ts +++ /dev/null @@ -1,142 +0,0 @@ -// import "vscode-webview"; -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.postIntellijMessage === undefined) { - console.log( - "Unable to send message: postIntellijMessage is undefined. ", - type, - data - ); - throw new Error("postIntellijMessage is undefined"); - } - window.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; - } else { - yield undefined; - } - 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) { - if (next.value) { - yield { role: "user", content: next.value }; - } - next = await gen.next(); - } - return { prompt: next.value?.prompt, completion: next.value?.completion }; -} diff --git a/core/index.d.ts b/core/index.d.ts index 073a37ef1..40f6c7dfa 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; } } @@ -162,6 +166,11 @@ export interface RangeInFile { range: Range; } +export interface FileWithContents { + filepath: string; + contents: string; +} + export interface Range { start: Position; end: Position; @@ -311,9 +320,19 @@ export class Problem { 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; getDebugLocals(threadIndex: number): Promise; getTopLevelCallStackSources( @@ -324,6 +343,7 @@ export interface IDE { listWorkspaceContents(directory?: string): Promise; listFolders(): Promise; getWorkspaceDirs(): Promise; + getWorkspaceConfigs(): Promise; writeFile(path: string, contents: string): Promise; showVirtualFile(title: string, contents: string): Promise; getContinueDir(): Promise; @@ -331,6 +351,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, @@ -341,34 +362,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 @@ -381,6 +381,8 @@ export interface ContinueSDK { input: string; params?: { [key: string]: any } | undefined; contextItems: ContextItemWithId[]; + selectedCode: RangeInFile[]; + config: ContinueConfig; } export interface SlashCommand { @@ -422,7 +424,9 @@ type ContextProviderName = | "codebase" | "problems" | "folder" - | "jira"; + | "jira" + | "postgres" + | "database"; type TemplateType = | "llama2" @@ -588,10 +592,17 @@ export interface TabAutocompleteOptions { maxSuffixPercentage: number; prefixPercentage: number; template?: string; - disableMultiLineCompletions?: boolean; + multilineCompletions: "always" | "never" | "auto"; + slidingWindowPrefixPercentage: number; + slidingWindowSize: number; + maxSnippetPercentage: number; + recentlyEditedSimilarityThreshold: number; + useCache: boolean; + onlyMyCode: boolean; } export interface SerializedContinueConfig { + env?: string[]; allowAnonymousTelemetry?: boolean; models: ModelDescription[]; systemMessage?: string; 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..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 } } @@ -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/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; } 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 new file mode 100644 index 000000000..4ec59603c --- /dev/null +++ b/core/indexing/embeddings/TransformersJsWorkerThread.js @@ -0,0 +1,59 @@ +import path from "path"; +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 = path.join(__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/indexing/indexCodebase.ts b/core/indexing/indexCodebase.ts new file mode 100644 index 000000000..fe094711e --- /dev/null +++ b/core/indexing/indexCodebase.ts @@ -0,0 +1,120 @@ +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 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; + pauseToken: PauseToken; + + constructor(configHandler: ConfigHandler, ide: IDE, pauseToken: PauseToken) { + this.configHandler = configHandler; + this.ide = ide; + this.pauseToken = pauseToken; + } + + 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.bind(this.ide) + ), + 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; + + 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); + 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 + )) { + // 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 + + (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/llm/countTokens.ts b/core/llm/countTokens.ts index 6283ad782..292efd09e 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-ignore +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/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"; diff --git a/core/llm/llms/Ollama.ts b/core/llm/llms/Ollama.ts index 054a636d8..60ec16432 100644 --- a/core/llm/llms/Ollama.ts +++ b/core/llm/llms/Ollama.ts @@ -25,40 +25,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() { 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/core/package-lock.json b/core/package-lock.json index 3ead17d84..be6a860f7 100644 --- a/core/package-lock.json +++ b/core/package-lock.json @@ -15,15 +15,21 @@ "adf-to-md": "^1.1.0", "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", "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.13", + "llama-tokenizer-js": "^1.1.3", "node-fetch": "^3.3.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", @@ -32,9 +38,10 @@ "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", "@types/handlebars": "^4.1.0", "@types/jest": "^29.5.11", "@types/jquery": "^3.5.29", @@ -208,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", @@ -218,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", @@ -334,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" @@ -394,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" @@ -493,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" @@ -682,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", @@ -707,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" }, @@ -716,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", @@ -737,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" ], @@ -753,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" ], @@ -769,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" ], @@ -785,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" ], @@ -801,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" ], @@ -817,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" ], @@ -833,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" ], @@ -849,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" ], @@ -865,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" ], @@ -881,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" ], @@ -897,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" ], @@ -913,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" ], @@ -929,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" ], @@ -945,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" ], @@ -961,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" ], @@ -977,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" ], @@ -993,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" ], @@ -1009,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" ], @@ -1025,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" ], @@ -1041,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" ], @@ -1057,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" ], @@ -1073,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" ], @@ -1089,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" ], @@ -1151,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" @@ -1212,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" } @@ -1268,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", @@ -1556,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", @@ -1570,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" @@ -1594,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", @@ -1604,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" ], @@ -1616,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" ], @@ -1628,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" ], @@ -1640,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" ], @@ -1652,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" ], @@ -1726,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" @@ -1811,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" @@ -1841,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" @@ -1855,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", @@ -1896,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": { @@ -2046,6 +2106,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", @@ -2090,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", @@ -2126,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" } @@ -2160,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": { @@ -2187,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" }, @@ -2199,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", @@ -2251,15 +2315,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": { @@ -2317,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", @@ -2401,15 +2476,26 @@ "node": "^12.13.0 || ^14.15.0 || >=16.0.0" } }, - "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, + "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": { - "sprintf-js": "~1.0.2" + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" } }, + "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/array-back": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/array-back/-/array-back-3.1.0.tgz", @@ -2577,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", @@ -2693,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", @@ -2740,6 +2859,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", @@ -2767,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": [ { @@ -2786,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" }, @@ -2820,9 +2975,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", @@ -2837,9 +2992,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": { @@ -2848,6 +3004,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", @@ -2931,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": [ { @@ -3201,6 +3365,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", @@ -3299,6 +3471,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", @@ -3412,6 +3594,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", @@ -3516,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": { @@ -3580,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" } @@ -3623,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", @@ -3641,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", @@ -3662,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" }, @@ -3740,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": { @@ -3752,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", @@ -3901,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" @@ -4006,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", @@ -4193,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" } @@ -4364,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": { @@ -4564,6 +4658,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", @@ -4674,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": { @@ -4719,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", @@ -4928,30 +4971,27 @@ "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.2", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz", + "integrity": "sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==", "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/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.4", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.4.tgz", + "integrity": "sha512-wlwpilI7YdjSkWaQ/7omYBMTliDcmCN8OLihO6I9B86g06lMyAoqgoDpV0XqoaPOKj+0DIdAvnsWfyAAhmimcg==", "dependencies": { - "agent-base": "6", + "agent-base": "^7.0.2", "debug": "4" }, "engines": { - "node": ">= 6" + "node": ">= 14" } }, "node_modules/human-signals": { @@ -4975,7 +5015,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" }, @@ -5027,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", @@ -5110,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", @@ -5292,6 +5329,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", @@ -5406,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" }, @@ -5434,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" @@ -5483,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", @@ -5968,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" @@ -6084,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" } @@ -6098,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", @@ -6212,35 +6259,26 @@ "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", "dev": true }, - "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/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/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", @@ -6264,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", @@ -6305,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" @@ -6358,6 +6396,45 @@ "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", + "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", @@ -6586,19 +6663,56 @@ "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", "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/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", @@ -6624,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" }, @@ -6646,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" }, @@ -6741,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" @@ -6948,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" } @@ -7024,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", @@ -7044,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" } @@ -7102,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" @@ -7152,6 +7254,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", @@ -7245,6 +7352,89 @@ "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" }, + "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", @@ -7284,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", @@ -7297,10 +7539,45 @@ "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", - "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" @@ -7339,6 +7616,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", @@ -7466,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", @@ -7559,16 +7854,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/regexp.prototype.flags": { @@ -7610,46 +7908,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", @@ -7687,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==", @@ -7696,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", @@ -7821,8 +8088,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", @@ -7832,6 +8098,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", @@ -7902,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" }, @@ -8070,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" } }, @@ -8097,6 +8368,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", @@ -8115,11 +8398,19 @@ "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", - "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", @@ -8157,6 +8448,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", @@ -8181,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", @@ -8190,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": { @@ -8390,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": { @@ -8480,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", @@ -8498,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", @@ -8535,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" @@ -8626,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" }, @@ -8853,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" @@ -8872,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": { @@ -8889,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", @@ -9052,6 +9366,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 7b79ffe41..336e891c8 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", @@ -24,15 +25,21 @@ "adf-to-md": "^1.1.0", "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", "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.13", + "llama-tokenizer-js": "^1.1.3", "node-fetch": "^3.3.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", @@ -41,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/protocol.ts b/core/protocol.ts new file mode 100644 index 000000000..4247291e9 --- /dev/null +++ b/core/protocol.ts @@ -0,0 +1,98 @@ +import { + BrowserSerializedContinueConfig, + ChatMessage, + ContextItemWithId, + ContextSubmenuItem, + LLMFullCompletionOptions, + MessageContent, + PersistedSessionInfo, + RangeInFile, + SerializedContinueConfig, + SessionInfo, +} from "."; + +export type ProtocolGeneratorType = AsyncGenerator<{ + done?: boolean; + content: T; +}>; + +export type Protocol = { + // New + "update/modelChange": [string, void]; + // Special + ping: [string, string]; + 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/getBrowserSerialized": [ + undefined, + Promise, + ]; + "config/deleteModel": [{ title: string }, void]; + "config/reload": [undefined, Promise]; + "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: ContextItemWithId[]; + params: any; + historyIndex: number; + selectedCode: RangeInFile[]; + }, + ProtocolGeneratorType, + ]; + "llm/complete": [ + { + prompt: string; + completionOptions: LLMFullCompletionOptions; + title: string; + }, + string, + ]; + "llm/streamComplete": [ + { + prompt: string; + completionOptions: LLMFullCompletionOptions; + title: string; + }, + ProtocolGeneratorType, + ]; + "llm/streamChat": [ + { + messages: ChatMessage[]; + completionOptions: LLMFullCompletionOptions; + title: string; + }, + ProtocolGeneratorType, + ]; +}; 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 + }` + ); } } }); diff --git a/core/test/edit.test.ts b/core/test/edit.test.ts index 4682601d1..d4186915d 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); @@ -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/core/tsconfig.json b/core/tsconfig.json index c92ea029b..91573d8a6 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, @@ -18,5 +18,5 @@ "noEmitOnError": false, "types": ["jest", "node"] }, - "include": ["./**/*.ts"] + "include": ["./**/*.ts", "indexing/embeddings/TransformersJsWorkerThread.js"] } 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 72% rename from core/ide/filesystem.ts rename to core/util/filesystem.ts index d6a58d4f1..6c0aa50a0 100644 --- a/core/ide/filesystem.ts +++ b/core/util/filesystem.ts @@ -1,21 +1,30 @@ 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, IdeInfo, Problem, Range } from ".."; +import { getContinueGlobalPath } from "./paths"; class FileSystemIde implements IDE { - getTopLevelCallStackSources(threadIndex: number, stackDepth: number): Promise { - throw new Error("Method not implemented."); + getIdeInfo(): Promise { + return Promise.resolve({ + ideType: "vscode", + name: "na", + version: "0.1", + remoteName: "na", + }); } - getAvailableThreads(): Promise { - throw new Error("Method not implemented."); + readRangeInFile(filepath: string, range: Range): Promise { + return Promise.resolve(""); } - async getDebugLocals(threadIndex: number): Promise { - throw new Error("Method not implemented."); + getStats(directory: string): Promise<{ [path: string]: number }> { + return Promise.resolve({}); } - async getSerializedConfig(): Promise { - throw new Error("Not implemented"); + isTelemetryEnabled(): Promise { + return Promise.resolve(false); + } + getUniqueId(): Promise { + return Promise.resolve("NOT_UNIQUE"); + } + getWorkspaceConfigs(): Promise { + return Promise.resolve([]); } getDiff(): Promise { @@ -24,6 +33,15 @@ class FileSystemIde implements IDE { getTerminalContents(): Promise { return Promise.resolve(""); } + async getDebugLocals(threadIndex: number): Promise { + return Promise.resolve(""); + } + async getTopLevelCallStackSources(threadIndex: number, stackDepth: number): Promise { + return Promise.resolve([]); + } + async getAvailableThreads(): Promise { + return Promise.resolve([]); + } showLines( filepath: string, startLine: number, @@ -101,15 +119,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([]); } @@ -129,20 +138,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/extensions/vscode/src/history.ts b/core/util/history.ts similarity index 95% rename from extensions/vscode/src/history.ts rename to core/util/history.ts index 87ed290d9..bab04c4f8 100644 --- a/extensions/vscode/src/history.ts +++ b/core/util/history.ts @@ -1,9 +1,9 @@ -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[] { + list(): SessionInfo[] { const filepath = getSessionsListPath(); if (!fs.existsSync(filepath)) { return []; 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 { diff --git a/core/util/messageIde.ts b/core/util/messageIde.ts new file mode 100644 index 000000000..4e3d3e9ab --- /dev/null +++ b/core/util/messageIde.ts @@ -0,0 +1,136 @@ +import { ContinueRcJson, IDE, IdeInfo, Problem, Range } from ".."; + +export class MessageIde implements IDE { + constructor( + private readonly request: (messageType: string, data: any) => Promise + ) {} + getDebugLocals(threadIndex: number): Promise { + return this.request("getDebugLocals", { threadIndex }); + } + getTopLevelCallStackSources( + threadIndex: number, + stackDepth: number + ): Promise { + return this.request("getTopLevelCallStackSources", { + threadIndex, + stackDepth, + }); + } + getAvailableThreads(): Promise { + return this.request("getTopLevelCallStackSources", undefined); + } + getIdeInfo(): Promise { + return this.request("getIdeInfo", undefined); + } + + 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/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/util/paths.ts b/core/util/paths.ts index b2935564e..8fe150d9c 100644 --- a/core/util/paths.ts +++ b/core/util/paths.ts @@ -1,8 +1,9 @@ +import dotenv from "dotenv"; import * as fs from "fs"; import * as os from "os"; import * as path from "path"; -import { SerializedContinueConfig } from ".."; -import defaultConfig from "../config/default"; +import { IdeType, SerializedContinueConfig } from ".."; +import { defaultConfig, defaultConfigJetBrains } from "../config/default"; import Types from "../config/types"; export function getContinueGlobalPath(): string { @@ -42,10 +43,14 @@ export function getSessionsListPath(): string { return filepath; } -export function getConfigJsonPath(): string { +export function getConfigJsonPath(ideType: IdeType = "vscode"): string { const p = path.join(getContinueGlobalPath(), "config.json"); if (!fs.existsSync(p)) { - fs.writeFileSync(p, JSON.stringify(defaultConfig, null, 2)); + if (ideType === "jetbrains") { + fs.writeFileSync(p, JSON.stringify(defaultConfigJetBrains, null, 2)); + } else { + fs.writeFileSync(p, JSON.stringify(defaultConfig, null, 2)); + } } return p; } @@ -86,13 +91,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 { @@ -210,3 +211,16 @@ export function getConfigJsonPathForRemote(remoteConfigServerUrl: URL): string { export function getConfigJsPathForRemote(remoteConfigServerUrl: URL): string { return path.join(getPathToRemoteConfig(remoteConfigServerUrl), "config.js"); } + +export function getContinueDotEnv(): { [key: string]: string } { + const filepath = path.join(getContinueGlobalPath(), ".env"); + if (fs.existsSync(filepath)) { + return dotenv.parse(fs.readFileSync(filepath)); + } else { + return {}; + } +} + +export function getCoreLogsPath(): string { + return path.join(getContinueGlobalPath(), "core.log"); +} diff --git a/core/util/posthog.ts b/core/util/posthog.ts index 99bd3905d..887fa2390 100644 --- a/core/util/posthog.ts +++ b/core/util/posthog.ts @@ -19,14 +19,18 @@ export class Telemetry { if (!allow) { Telemetry.client = undefined; } else { - if (!Telemetry.client) { - const { PostHog } = await import("posthog-node"); - Telemetry.client = new PostHog( - "phc_JS6XFROuNbhJtVCEdTSYk6gl5ArRrTNMpCcguAXlSPs", - { - host: "https://app.posthog.com", - } - ); + try { + if (!Telemetry.client) { + const { PostHog } = await import("posthog-node"); + Telemetry.client = new PostHog( + "phc_JS6XFROuNbhJtVCEdTSYk6gl5ArRrTNMpCcguAXlSPs", + { + host: "https://app.posthog.com", + } + ); + } + } catch (e) { + console.error(`Failed to setup telemetry: ${e}`); } } } diff --git a/core/util/treeSitter.ts b/core/util/treeSitter.ts index e0eb2cf1d..8411eb715 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"; +const Parser = require("web-tree-sitter") export const supportedLanguages: { [key: string]: string } = { cpp: "cpp", @@ -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/core/commands/slash/verticalEdit.ts b/core/util/verticalEdit.ts similarity index 56% rename from core/commands/slash/verticalEdit.ts rename to core/util/verticalEdit.ts index 387f818a2..81b55628b 100644 --- a/core/commands/slash/verticalEdit.ts +++ b/core/util/verticalEdit.ts @@ -1,24 +1,16 @@ -import { ContextItemWithId, DiffLine, ILLM, SlashCommand } from "../.."; +import { DiffLine, ILLM } from ".."; import { filterCodeBlockLines, filterEnglishLinesAtEnd, filterEnglishLinesAtStart, filterLeadingAndTrailingNewLineInsertion, fixCodeLlamaFirstLineIndentation, -} from "../../autocomplete/lineStream"; -import { streamDiff } from "../../diff/streamDiff"; -import { 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"; +} from "../autocomplete/lineStream"; +import { streamDiff } from "../diff/streamDiff"; +import { streamLines } from "../diff/util"; +import { stripImages } from "../llm/countTokens"; +import { gptEditPrompt } from "../llm/templates/edit"; +import { dedentAndGetCommonWhitespace, renderPromptTemplate } from "../util"; function constructPrompt( codeToEdit: string, @@ -87,38 +79,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/vendor/package-lock.json b/core/vendor/package-lock.json index 64225d017..3f8229af6 100644 --- a/core/vendor/package-lock.json +++ b/core/vendor/package-lock.json @@ -7,7 +7,7 @@ "": { "name": "vendor", "version": "1.0.0", - "license": "ISC", + "license": "Apache-2.0", "dependencies": { "@xenova/transformers": "^2.14.0" } diff --git a/core/vendor/package.json b/core/vendor/package.json index a7838e858..07cd4c0d6 100644 --- a/core/vendor/package.json +++ b/core/vendor/package.json @@ -7,7 +7,7 @@ "test": "echo \"Error: no test specified\" && exit 1" }, "author": "", - "license": "ISC", + "license": "Apache-2.0", "dependencies": { "@xenova/transformers": "^2.14.0" } diff --git a/core/vendor/tree-sitter.wasm b/core/vendor/tree-sitter.wasm index d9ca0da7b..a10e02d84 100755 Binary files a/core/vendor/tree-sitter.wasm and b/core/vendor/tree-sitter.wasm differ diff --git a/core/web/webviewProtocol.ts b/core/web/webviewProtocol.ts new file mode 100644 index 000000000..469c9822b --- /dev/null +++ b/core/web/webviewProtocol.ts @@ -0,0 +1,106 @@ +import { + ContextItemWithId, + ContinueRcJson, + DiffLine, + Problem, + Range, +} from ".."; +import { RangeInFileWithContents } from "../commands/util"; +import { Protocol } from "../protocol"; + +export type IdeProtocol = { + listWorkspaceContents: [undefined, string[]]; + getWorkspaceDirs: [undefined, string[]]; + listFolders: [undefined, string[]]; + writeFile: [{ path: string; contents: string }, void]; + showVirtualFile: [{ name: string; content: string }, void]; + getContinueDir: [undefined, string]; + openFile: [{ path: string }, void]; + runCommand: [{ command: string }, void]; + getSearchResults: [{ query: string }, string]; + subprocess: [{ command: string }, [string, string]]; + saveFile: [{ filepath: string }, void]; + readFile: [{ filepath: string }, string]; + showDiff: [ + { filepath: string; newContents: string; stepIndex: number }, + void, + ]; + diffLine: [ + { + diffLine: DiffLine; + filepath: string; + startLine: number; + endLine: number; + }, + void, + ]; + getProblems: [{ filepath: string }, Problem[]]; + getBranch: [{ dir: string }, string]; + getOpenFiles: [undefined, string[]]; + getPinnedFiles: [undefined, string[]]; + showLines: [{ filepath: string; startLine: number; endLine: number }, void]; + readRangeInFile: [{ filepath: string; range: Range }, string]; + getDiff: [undefined, string]; + getWorkspaceConfigs: [undefined, ContinueRcJson[]]; + getTerminalContents: [undefined, string]; + getDebugLocals: [{threadIndex: Number}, string]; + getTopLevelCallStackSources: [{threadIndex: number, stackDepth: number}, string[]]; + getAvailableThreads: [undefined, string[]]; + isTelemetryEnabled: [undefined, boolean]; + getUniqueId: [undefined, string]; +}; + +export type WebviewProtocol = Protocol & + IdeProtocol & { + onLoad: [ + undefined, + { + windowId: string; + serverUrl: string; + workspacePaths: string[]; + vscMachineId: string; + vscMediaUrl: string; + }, + ]; + + errorPopup: [{ message: string }, void]; + "index/setPaused": [boolean, void]; + openUrl: [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]; + 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]; + setColors: [{ [key: string]: string }, void]; +}; diff --git a/core/yarn.lock b/core/yarn.lock deleted file mode 100644 index 28e83a183..000000000 --- a/core/yarn.lock +++ /dev/null @@ -1,5260 +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/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, 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@^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" - -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== - -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.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== - -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: - 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" - -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" - -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" - -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: - 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-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== - -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== - -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" - -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== - -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== - -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== - -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== - -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, readable-stream@^3.4.0, 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" - -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== - -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" - -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== - -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/docs/docs/customization/context-providers.md b/docs/docs/customization/context-providers.md index 77c54fb97..dc673c890 100644 --- a/docs/docs/customization/context-providers.md +++ b/docs/docs/customization/context-providers.md @@ -137,7 +137,6 @@ assignee = currentUser() AND resolution = Unresolved order by updated DESC You can override this query by setting the `issueQuery` parameter. - ### Code Outline Type '@outline' to reference the outline of all currently open files. The outline of a files consists of only the function and class definitions in the file. Supported file extensions are '.js', '.mjs', '.go', '.c', '.cc', '.cs', '.cpp', '.el', '.ex', '.elm', '.java', '.ml', '.php', '.ql', '.rb', '.rs', '.ts' @@ -154,6 +153,63 @@ 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 + } +} +``` + +### 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/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"]`. 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/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) 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 diff --git a/docs/docs/walkthroughs/tab-autocomplete.md b/docs/docs/walkthroughs/tab-autocomplete.md index 6579a21a1..aa1a024ab 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 [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) 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://" }, ... @@ -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 @@ -57,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": { @@ -75,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). @@ -85,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 diff --git a/docs/static/schemas/config.json b/docs/static/schemas/config.json index 0cd578e8d..62344e03e 100644 --- a/docs/static/schemas/config.json +++ b/docs/static/schemas/config.json @@ -1029,7 +1029,8 @@ "docs", "tree", "highlights", - "outline" + "outline", + "postgres" ], "markdownEnumDescriptions": [ "Reference the contents of the current changes as given by `git diff`", @@ -1047,7 +1048,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" }, @@ -1154,6 +1156,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": { @@ -1246,6 +1309,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"] @@ -1437,9 +1559,17 @@ "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." + }, + "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/.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/gradle.properties b/extensions/intellij/gradle.properties index 627737abd..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.27 +pluginVersion = 0.0.33 # 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/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/activities/ContinuePluginStartupActivity.kt b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/activities/ContinuePluginStartupActivity.kt index dccb3fd0a..14e829b43 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,9 +1,7 @@ package com.github.continuedev.continueintellijextension.activities import com.github.continuedev.continueintellijextension.constants.getContinueGlobalPath -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 @@ -30,7 +28,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 @@ -78,6 +78,28 @@ class WelcomeDialogWrapper(val project: Project) : DialogWrapper(true) { } } +fun showTutorial(project: Project) { + ContinuePluginStartupActivity::class.java.getClassLoader().getResourceAsStream("continue_tutorial.py").use { `is` -> + if (`is` == null) { + throw IOException("Resource not found: continue_tutorial.py") + } + var content = StreamUtil.readText(`is`, StandardCharsets.UTF_8) + if (!System.getProperty("os.name").toLowerCase().contains("mac")) { + content = content.replace("⌘", "⌃") + } + val filepath = Paths.get(getContinueGlobalPath(), "continue_tutorial.py").toString() + File(filepath).writeText(content) + val virtualFile = LocalFileSystem.getInstance().findFileByPath(filepath) + + + ApplicationManager.getApplication().invokeLater { + if (virtualFile != null) { + FileEditorManager.getInstance(project).openFile(virtualFile, true) + } + } + } +} + class ContinuePluginStartupActivity : StartupActivity, Disposable, DumbAware { private val coroutineScope = CoroutineScope(Dispatchers.IO) @@ -121,6 +143,8 @@ class ContinuePluginStartupActivity : StartupActivity, Disposable, DumbAware { ContinuePluginService::class.java ) + val theme = GetTheme().getTheme() + val defaultStrategy = DefaultTextSelectionStrategy() coroutineScope.launch { @@ -129,24 +153,7 @@ class ContinuePluginStartupActivity : StartupActivity, Disposable, DumbAware { if (!settings.continueState.shownWelcomeDialog) { settings.continueState.shownWelcomeDialog = true // Open continue_tutorial.py - ContinuePluginStartupActivity::class.java.getClassLoader().getResourceAsStream("continue_tutorial.py").use { `is` -> - if (`is` == null) { - throw IOException("Resource not found: continue_tutorial.py") - } - var content = StreamUtil.readText(`is`, StandardCharsets.UTF_8) - if (!System.getProperty("os.name").toLowerCase().contains("mac")) { - content = content.replace("⌘", "⌃") - } - val filepath = Paths.get(getContinueGlobalPath(), "continue_tutorial.py").toString() - File(filepath).writeText(content) - val virtualFile = LocalFileSystem.getInstance().findFileByPath(filepath) - - if (virtualFile != null) { - ApplicationManager.getApplication().invokeLater { - FileEditorManager.getInstance(project).openFile(virtualFile, true) - } - } - } + showTutorial(project) // Show the welcome dialog // withContext(Dispatchers.Main) { @@ -156,17 +163,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 +200,34 @@ 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 osName = System.getProperty("os.name").toLowerCase() + val os = when { + osName.contains("mac") || osName.contains("darwin") -> "darwin" + osName.contains("win") -> "win32" + osName.contains("nix") || osName.contains("nux") || osName.contains("aix") -> "linux" + else -> "linux" + } + val osArch = System.getProperty("os.arch").toLowerCase() + val arch = when { + osArch.contains("aarch64") || (osArch.contains("arm") && osArch.contains("64")) -> "arm64" + osArch.contains("amd64") || osArch.contains("x86_64") -> "x64" + else -> "x64" + } + val target = "$os-$arch" + + val continueCorePath = Paths.get(pluginPath.toString(), "core", target, "pkg").toString() + + val coreMessenger = CoreMessenger(continueCorePath, ideProtocolClient); + continuePluginService.coreMessenger = coreMessenger + } } } diff --git a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/ConfigJsonSchemaProviderFactory.kt b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/ConfigJsonSchemaProviderFactory.kt new file mode 100644 index 000000000..8357c3cf4 --- /dev/null +++ b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/ConfigJsonSchemaProviderFactory.kt @@ -0,0 +1,48 @@ +package com.github.continuedev.continueintellijextension.`continue` + +import com.github.continuedev.continueintellijextension.activities.ContinuePluginStartupActivity +import com.github.continuedev.continueintellijextension.constants.getContinueGlobalPath +import com.intellij.openapi.project.Project +import com.intellij.openapi.util.io.StreamUtil +import com.intellij.openapi.vfs.LocalFileSystem +import com.intellij.openapi.vfs.VirtualFile +import com.jetbrains.jsonSchema.extension.JsonSchemaFileProvider +import com.jetbrains.jsonSchema.extension.JsonSchemaProviderFactory +import com.jetbrains.jsonSchema.extension.SchemaType +import java.io.File +import java.io.IOException +import java.nio.charset.StandardCharsets +import java.nio.file.Paths + +class ConfigJsonSchemaProviderFactory : JsonSchemaProviderFactory { + override fun getProviders(project: Project): MutableList { + return mutableListOf(ConfigJsonSchemaFileProvider()) + } +} + +class ConfigJsonSchemaFileProvider : JsonSchemaFileProvider { + override fun isAvailable(file: VirtualFile): Boolean { + return file.name == "config.json" + } + + override fun getName(): String { + return "config.json" + } + + override fun getSchemaFile(): VirtualFile? { + ContinuePluginStartupActivity::class.java.getClassLoader().getResourceAsStream("config_schema.json").use { `is` -> + if (`is` == null) { + throw IOException("Resource not found: config_schema.json") + } + val content = StreamUtil.readText(`is`, StandardCharsets.UTF_8) + val filepath = Paths.get(getContinueGlobalPath(), "config_schema.json").toString() + File(filepath).writeText(content) + return LocalFileSystem.getInstance().findFileByPath(filepath) + } + } + + override fun getSchemaType(): SchemaType { + return SchemaType.embeddedSchema + } + +} 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..413713b72 --- /dev/null +++ b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/CoreMessenger.kt @@ -0,0 +1,179 @@ +package com.github.continuedev.continueintellijextension.`continue` +import java.io.BufferedReader +import java.io.InputStreamReader +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 + 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 + "\r\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?, messageId: String?, onResponse: (String) -> Unit) { + val id = messageId ?: uuid() + val message = gson.toJson(mapOf( + "messageId" to id, + "messageType" to messageType, + "data" to data + )) + responseListeners[id] = onResponse + write(message) + } + + private fun handleMessage(json: String) { + val responseMap = gson.fromJson(json, Map::class.java) + val messageId = responseMap["messageId"].toString() + val messageType = responseMap["messageType"].toString() + val data = gson.toJson(responseMap["data"]) + + // IDE listeners + if (ideMessageTypes.contains(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(data) + if (generatorTypes.contains(messageType)) { + val parsedData = gson.fromJson(data, Map::class.java) + val done = parsedData["done"] as Boolean? + if (done == true) { + responseListeners.remove(messageId) + } else {} + } else { + responseListeners.remove(messageId) + } + + } + } + + private val generatorTypes = listOf( + "llm/streamComplete", + "llm/streamChat", + "command/run" + ) + + 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", + "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() + + val outputStream = process.outputStream + val inputStream = process.inputStream + + writer = OutputStreamWriter(outputStream) + reader = BufferedReader(InputStreamReader(inputStream)) + + process.onExit().thenRun { + val err = process.errorStream.bufferedReader().readText() + ideProtocolClient.showMessage("Core process exited with output: $err") + } + + Thread { + try { + while (true) { + val line = reader.readLine() + if (line != null && line.isNotEmpty()) { + handleMessage(line) + } else { + Thread.sleep(100) + } + } + } 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/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..20367c33b --- /dev/null +++ b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/GetTheme.kt @@ -0,0 +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 + + +class GetTheme { + 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 defaultBackgroundHex, + "--vscode-focusBorder" to highlightHex, + "--vscode-quickInputList-focusForeground" to defaultForegroundHex, + "--vscode-quickInput-background" to secondaryDarkHex, + "--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/continue/IdeProtocolClient.kt b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/IdeProtocolClient.kt index 8a6f64ae4..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 @@ -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 { @@ -103,7 +89,7 @@ class AsyncFileSaveListener : AsyncFileListener { } override fun prepareChange(events: MutableList): AsyncFileListener.ChangeApplier? { for (event in events) { - if (event.path.endsWith(".continue/config.json") || event.path.endsWith(".continue/config.ts") || event.path.endsWith(".continue\\config.json") || event.path.endsWith(".continue\\config.ts")) { + if (event.path.endsWith(".continue/config.json") || event.path.endsWith(".continue/config.ts") || event.path.endsWith(".continue\\config.json") || event.path.endsWith(".continue\\config.ts") || event.path.endsWith(".continuerc.json")) { return object : AsyncFileListener.ChangeApplier { override fun afterVfsChange() { val config = readConfigJson() @@ -137,35 +123,21 @@ 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 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 data = parsedMessage["data"] val historyManager = HistoryManager() @@ -175,7 +147,7 @@ class IdeProtocolClient ( mapOf("uniqueId" to uniqueId()) ) - "ide" -> { + "getIdeInfo" -> { val applicationInfo = ApplicationInfo.getInstance() val ideName: String = applicationInfo.fullApplicationName val ideVersion = applicationInfo.fullVersion @@ -187,14 +159,19 @@ class IdeProtocolClient ( remoteName = "ssh" } respond(mapOf( + "ideType" to "jetbrains", "name" to ideName, "version" to ideVersion, "remoteName" to remoteName )) } + "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, @@ -204,10 +181,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)) } @@ -216,6 +214,10 @@ class IdeProtocolClient ( respond(workspaceDirectories()) } + "getWorkspaceConfigs" -> { + respond(emptyList()) + } + "getTerminalContents" -> { respond( mapOf("contents" to "Terminal cannot be accessed in JetBrains IDE") @@ -229,10 +231,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 @@ -242,10 +245,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 @@ -253,8 +257,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 = @@ -265,16 +288,6 @@ class IdeProtocolClient ( "setSuggestionsLocked" -> {} "getSessionId" -> {} - "highlightedCode" -> { - val rifWithContents = getHighlightedCode() - val rifs: MutableList = mutableListOf() - if (rifWithContents != null) { - val rif = RangeInFile(rifWithContents.filepath, rifWithContents.range) - rifs += rif - } - respond(mapOf("highlightedCode" to rifs)) - } - // NEW // "getDiff" -> { @@ -295,29 +308,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() @@ -326,7 +316,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); @@ -335,7 +325,7 @@ class IdeProtocolClient ( respond(getContinueGlobalPath()) } "openFile" -> { - setFileOpen((data["message"] as Map)["path"] as String) + setFileOpen((data as Map)["path"] as String) respond(null) } "runCommand" -> { @@ -343,7 +333,14 @@ class IdeProtocolClient ( // Running commands not yet supported in JetBrains } "errorPopup" -> { - showMessage(data["message"] as String) + val data = data as Map + val message = data["message"] as String + showMessage(message) + respond(null) + } + + "listFolders" -> { + respond(null) } // History @@ -351,15 +348,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" -> { @@ -371,7 +368,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) @@ -379,6 +381,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> @@ -392,7 +395,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 @@ -402,6 +405,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 { @@ -432,12 +436,8 @@ class IdeProtocolClient ( } fun configUpdate(config: Map) { - val data = mapOf( - "type" to "configUpdate", - "config" to config - ) - val json = Gson().toJson(data) - continuePluginService.dispatchCustomEvent(json) + continuePluginService.coreMessenger?.request("config/reload", null, null) { _ -> } + continuePluginService.sendToWebview("configUpdate", config) } private fun editConfigJson(callback: (config: MutableMap) -> Map): Map { @@ -581,20 +581,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) { @@ -712,7 +709,7 @@ class IdeProtocolClient ( return fileEditorManager.openFiles.toList().map { it.path } } - private fun showMessage(msg: String) { + fun showMessage(msg: String) { val statusBar = WindowManager.getInstance().getStatusBar(project) JBPopupFactory.getInstance() 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/services/ContinuePluginService.kt b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/services/ContinuePluginService.kt index ddfdb9d52..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 @@ -1,6 +1,8 @@ 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 import com.google.gson.Gson import com.intellij.openapi.Disposable @@ -20,6 +22,7 @@ class ContinuePluginService(project: Project) : Disposable, DumbAware { var continuePluginWindow: ContinuePluginToolWindowFactory.ContinuePluginWindow? = null var ideProtocolClient: IdeProtocolClient? = null + var coreMessenger: CoreMessenger? = null var workspacePaths: Array? = null var windowId: String = UUID.randomUUID().toString() @@ -33,10 +36,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/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 1f5104174..6ccd4a8f1 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,8 @@ package com.github.continuedev.continueintellijextension.toolWindow +import com.github.continuedev.continueintellijextension.activities.showTutorial 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 @@ -55,12 +53,34 @@ class ContinuePluginToolWindowFactory : ToolWindowFactory, DumbAware { class ContinuePluginWindow(toolWindow: ToolWindow, project: Project) { + val PASS_THROUGH_TO_CORE = listOf( + "abort", + "getContinueDir", + "history/list", + "history/save", + "history/delete", + "history/load", + "devdata/log", + "config/addModel", + "config/deleteModel", + "config/addOpenAIKey", + "llm/streamComplete", + "llm/streamChat", + "llm/complete", + "command/run", + "context/loadSubmenuItems", + "context/getContextItems", + "context/addDocs", + "config/getBrowserSerialized", + ) + init { System.setProperty("ide.browser.jcef.jsQueryPoolSize", JS_QUERY_POOL_SIZE) + 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 @@ -68,6 +88,8 @@ class ContinuePluginToolWindowFactory : ToolWindowFactory, DumbAware { registerAppSchemeHandler() browser.loadURL("http://continue/index.html") +// browser.loadHTML("") +// browser.loadURL("http://localhost:5173/index.html") Disposer.register(project, browser) val continuePluginService = ServiceManager.getService( @@ -81,58 +103,46 @@ 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 data = json.get("data").asJsonObject + val messageType = json.get("messageType").asString + val data = json.get("data") + 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) + continuePluginService.sendToWebview(messageType, data, messageId ?: uuid()) + } + + if (PASS_THROUGH_TO_CORE.contains(messageType)) { + continuePluginService.coreMessenger?.request(messageType, data, messageId, respond) + return@addHandler null + } + + when (messageType) { "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( - "type" to "onLoad", "windowId" to continuePluginService.windowId, "workspacePaths" to continuePluginService.workspacePaths, "vscMachineId" to getMachineUniqueID(), "vscMediaUrl" to "http://continue", ) - val jsonString = Gson().toJson(jsonData) - browser.executeJavaScriptAsync("""window.postMessage($jsonString, "*");""") + respond(jsonData) } } "showLines" -> { + val data = data.asJsonObject ide?.highlightCode(RangeInFile( data.get("filepath").asString, Range(Position( @@ -145,10 +155,15 @@ class ContinuePluginToolWindowFactory : ToolWindowFactory, DumbAware { ),"#00ff0022") } + "showTutorial" -> { + showTutorial(project) + } "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" -> {} @@ -156,6 +171,7 @@ class ContinuePluginToolWindowFactory : ToolWindowFactory, DumbAware { ide?.setFileOpen(getConfigJsonPath()) } "readRangeInFile" -> { + val data = data.asJsonObject ide?.readRangeInFile(RangeInFile( data.get("filepath").asString, Range(Position( @@ -172,7 +188,7 @@ class ContinuePluginToolWindowFactory : ToolWindowFactory, DumbAware { // IDE // else -> { if (msg != null) { - ide?.handleWebsocketMessage(msg) + ide?.handleMessage(msg, respond) } } } @@ -201,8 +217,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/extensions/intellij/src/main/resources/META-INF/plugin.xml b/extensions/intellij/src/main/resources/META-INF/plugin.xml index 003f681c5..61b6b34ff 100644 --- a/extensions/intellij/src/main/resources/META-INF/plugin.xml +++ b/extensions/intellij/src/main/resources/META-INF/plugin.xml @@ -6,6 +6,10 @@ com.intellij.modules.platform + + + + diff --git a/extensions/intellij/src/main/resources/config_schema.json b/extensions/intellij/src/main/resources/config_schema.json new file mode 100644 index 000000000..62344e03e --- /dev/null +++ b/extensions/intellij/src/main/resources/config_schema.json @@ -0,0 +1,1580 @@ +{ + "title": "config.json", + "$ref": "#/definitions/SerializedContinueConfig", + "definitions": { + "BaseCompletionOptions": { + "title": "BaseCompletionOptions", + "type": "object", + "properties": { + "temperature": { + "title": "Temperature", + "description": "The temperature of the completion.", + "type": "number" + }, + "topP": { + "title": "Top P", + "description": "The topP of the completion.", + "type": "number" + }, + "topK": { + "title": "Top K", + "description": "The topK of the completion.", + "type": "integer" + }, + "presencePenalty": { + "title": "Presence Penalty", + "description": "The presence penalty Aof the completion.", + "type": "number" + }, + "frequencePenalty": { + "title": "Frequency Penalty", + "description": "The frequency penalty of the completion.", + "type": "number" + }, + "mirostat": { + "title": "Mirostat", + "description": "Enable Mirostat sampling, controlling perplexity during text generation (default: 0, 0 = disabled, 1 = Mirostat, 2 = Mirostat 2.0). Only available for Ollama, LM Studio, and llama.cpp providers", + "type": "number" + }, + "stop": { + "title": "Stop", + "description": "The stop tokens of the completion.", + "type": "array", + "items": { + "type": "string" + } + }, + "maxTokens": { + "title": "Max Tokens", + "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" + } + } + }, + "RequestOptions": { + "title": "RequestOptions", + "type": "object", + "properties": { + "timeout": { + "title": "Timeout", + "description": "Set the timeout for each request to the LLM. If you are running a local LLM that takes a while to respond, you might want to set this to avoid timeouts.", + "default": 7200, + "type": "integer" + }, + "verifySsl": { + "title": "Verify Ssl", + "description": "Whether to verify SSL certificates for requests.", + "type": "boolean" + }, + "caBundlePath": { + "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" + } + } + ] + }, + "proxy": { + "title": "Proxy", + "description": "Proxy URL to use when making the HTTP request", + "type": "string" + }, + "headers": { + "title": "Headers", + "description": "Headers to use when making the HTTP request", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "extraBodyProperties": { + "title": "Extra Body Properties", + "description": "This object will be merged with the body when making the HTTP requests", + "type": "object" + } + } + }, + "ModelDescription": { + "title": "ModelDescription", + "type": "object", + "properties": { + "title": { + "title": "Title", + "description": "The title you wish to give your model.", + "type": "string" + }, + "provider": { + "title": "Provider", + "description": "The provider of the model. This is used to determine the type of model, and how to interact with it.", + "enum": [ + "openai", + "free-trial", + "anthropic", + "together", + "ollama", + "huggingface-tgi", + "huggingface-inference-api", + "llama.cpp", + "replicate", + "google-palm", + "lmstudio", + "llamafile", + "mistral", + "deepinfra", + "flowise" + ], + "markdownEnumDescriptions": [ + "### OpenAI\nUse gpt-4, gpt-3.5-turbo, or any other OpenAI model. See [here](https://openai.com/product#made-for-developers) to obtain an API key.\n\n> [Reference](https://continue.dev/docs/reference/Model%20Providers/openai)", + "### Free Trial\nNew users can try out Continue for free using a proxy server that securely makes calls to OpenAI using our API key. If you are ready to use your own API key or have used all 250 free uses, you can enter your API key in config.py where it says `apiKey=\"\"` or select another model provider.\n> [Reference](https://continue.dev/docs/reference/Model%20Providers/freetrial)", + "### Anthropic\nTo get started with Anthropic models, you first need to sign up for the open beta [here](https://claude.ai/login) to obtain an API key.\n> [Reference](https://continue.dev/docs/reference/Model%20Providers/anthropicllm)", + "### Together\nTogether is a hosted service that provides extremely fast streaming of open-source language models. To get started with Together:\n1. Obtain an API key from [here](https://together.ai)\n2. Paste below\n3. Select a model preset\n> [Reference](https://continue.dev/docs/reference/Model%20Providers/togetherllm)", + "### Ollama\nTo 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.\n> [Reference](https://continue.dev/docs/reference/Model%20Providers/ollama)", + "### Huggingface TGI\n\n> [Reference](https://continue.dev/docs/reference/Model%20Providers/huggingfacetgi)", + "### Huggingface Inference API\n\n> [Reference](https://continue.dev/docs/reference/Model%20Providers/huggingfaceinferenceapi)", + "### Llama.cpp\nllama.cpp comes with a [built-in server](https://github.com/ggerganov/llama.cpp/tree/master/examples/server#llamacppexampleserver) that can be run from source. To do this:\n\n1. Clone the repository with `git clone https://github.com/ggerganov/llama.cpp`.\n2. `cd llama.cpp`\n3. Run `make` to build the server.\n4. Download the model you'd like to use and place it in the `llama.cpp/models` directory (the best place to find models is [The Bloke on HuggingFace](https://huggingface.co/TheBloke))\n5. Run the llama.cpp server with the command below (replacing with the model you downloaded):\n\n```shell\n.\\server.exe -c 4096 --host 0.0.0.0 -t 16 --mlock -m models/codellama-7b-instruct.Q8_0.gguf\n```\n\nAfter it's up and running, you can start using Continue.\n> [Reference](https://continue.dev/docs/reference/Model%20Providers/llamacpp)", + "### Replicate\nReplicate is a hosted service that makes it easy to run ML models. To get started with Replicate:\n1. Obtain an API key from [here](https://replicate.com)\n2. Paste below\n3. Select a model preset\n> [Reference](https://continue.dev/docs/reference/Model%20Providers/replicatellm)", + "### Google PALM\nTo get started with Google Makersuite, obtain your API key from [here](https://makersuite.google.com) and paste it below.\n> [Reference](https://continue.dev/docs/reference/Model%20Providers/googlepalmapi)", + "### LMStudio\nLMStudio provides a professional and well-designed GUI for exploring, configuring, and serving LLMs. It is available on both Mac and Windows. To get started:\n1. Download from [lmstudio.ai](https://lmstudio.ai/) and open the application\n2. Search for and download the desired model from the home screen of LMStudio.\n3. In the left-bar, click the '<->' icon to open the Local Inference Server and press 'Start Server'.\n4. Once your model is loaded and the server has started, you can begin using Continue.\n> [Reference](https://continue.dev/docs/reference/Model%20Providers/lmstudio)", + "### Llamafile\nTo 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```\n> [Reference](https://continue.dev/docs/reference/Model%20Providers/llamafile)", + "### Mistral API\n\nTo get access to the Mistral API, obtain your API key from the [Mistral platform](https://docs.mistral.ai/)", + "### DeepInfra\n\n> [Reference](https://continue.dev/docs/reference/Model%20Providers/deepinfra)" + ], + "type": "string" + }, + "model": { + "title": "Model", + "description": "The name of the model. Used to autodetect prompt template.", + "type": "string" + }, + "apiKey": { + "title": "Api Key", + "description": "OpenAI, Anthropic, Together, or other API key", + "type": "string" + }, + "apiBase": { + "title": "Api Base", + "description": "The base URL of the LLM API.", + "type": "string" + }, + "contextLength": { + "title": "Context Length", + "description": "The maximum context length of the LLM in tokens, as counted by countTokens.", + "default": 2048, + "type": "integer" + }, + "template": { + "title": "Template", + "description": "The chat template used to format messages. This is auto-detected for most models, but can be overridden here. Choose none if you are using vLLM or another server that automatically handles prompting.", + "enum": [ + "llama2", + "alpaca", + "zephyr", + "phind", + "anthropic", + "chatml", + "none", + "deepseek", + "openchat", + "xwin-coder", + "neural-chat", + "codellama-70b" + ], + "type": "string" + }, + "promptTemplates": { + "title": "Prompt Templates", + "markdownDescription": "A mapping of prompt template name ('edit' is currently the only one used in Continue) to a string giving the prompt template. See [here](https://continue.dev/docs/model-setup/configuration#customizing-the-edit-prompt) for an example.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "completionOptions": { + "title": "Completion Options", + "description": "Options for the completion endpoint. Read more about the completion options in the documentation.", + "default": { + "temperature": null, + "topP": null, + "topK": null, + "presencePenalty": null, + "frequencyPenalty": null, + "stop": null, + "maxTokens": 600 + }, + "allOf": [ + { + "$ref": "#/definitions/BaseCompletionOptions" + } + ] + }, + "systemMessage": { + "title": "System Message", + "description": "A system message that will always be followed by the LLM", + "type": "string" + }, + "requestOptions": { + "title": "Request Options", + "description": "Options for the HTTP request to the LLM.", + "default": { + "timeout": 7200, + "verifySsl": null, + "caBundlePath": null, + "proxy": null, + "headers": null, + "extraBodyProperties": null + }, + "allOf": [ + { + "$ref": "#/definitions/RequestOptions" + } + ] + }, + "apiType": { + "title": "Api Type", + "markdownDescription": "OpenAI API type, either `openai` or `azure`", + "enum": ["openai", "azure"] + }, + "apiVersion": { + "title": "Api Version", + "description": "Azure OpenAI API version (e.g. 2023-07-01-preview)", + "type": "string" + }, + "engine": { + "title": "Engine", + "description": "Azure OpenAI engine", + "type": "string" + } + }, + "required": ["title", "provider", "model"], + "allOf": [ + { + "if": { + "properties": { + "provider": { + "type": "str" + } + }, + "not": { + "required": ["provider"] + } + }, + "then": { + "properties": { + "model": { + "description": "Choose a provider first, then model options will be shown here." + } + } + } + }, + { + "if": { + "properties": { + "provider": { + "enum": [ + "openai", + "anthropic", + "google-palm", + "huggingface-inference-api", + "replicate", + "together" + ] + } + }, + "required": ["provider"] + }, + "then": { + "required": ["apiKey"] + } + }, + { + "if": { + "properties": { + "provider": { + "enum": ["huggingface-tgi", "huggingface-inference-api"] + } + } + }, + "then": { + "required": ["apiBase"] + }, + "required": ["provider"] + }, + { + "if": { + "properties": { + "provider": { + "enum": ["openai"] + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "engine": { + "type": "string" + }, + "apiType": { + "type": "string" + }, + "apiVersion": { + "type": "string" + } + } + } + }, + { + "if": { + "properties": { + "provider": { + "enum": ["openai"] + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "model": { + "enum": [ + "gpt-3.5-turbo", + "gpt-3.5-turbo-16k", + "gpt-4", + "gpt-3.5-turbo-0613", + "gpt-4-32k", + "gpt-4-0125-preview", + "gpt-4-turbo-preview", + "AUTODETECT" + ] + } + } + } + }, + { + "if": { + "properties": { + "provider": { + "enum": ["replicate"] + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "model": { + "anyOf": [ + { + "enum": [ + "codellama-7b", + "codellama-13b", + "codellama-34b", + "llama2-7b", + "llama2-13b" + ] + }, + { + "type": "string" + } + ] + }, + "markdownDescription": "Select a pre-defined option, or find an exact model ID from Replicate [here](https://replicate.com/collections/streaming-language-models)." + } + } + }, + { + "if": { + "properties": { + "provider": { + "enum": ["free-trial"] + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "model": { + "enum": [ + "gpt-3.5-turbo", + "gpt-4", + "phind-codellama-34b", + "gemini-pro", + "gpt-4-vision-preview", + "codellama-70b", + "AUTODETECT" + ] + } + } + } + }, + { + "if": { + "properties": { + "provider": { + "enum": ["openai"] + }, + "apiType": { + "not": { + "const": "azure" + } + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "model": { + "anyOf": [ + { + "enum": [ + "gpt-3.5-turbo", + "gpt-3.5-turbo-16k", + "gpt-4", + "gpt-3.5-turbo-0613", + "gpt-4-32k", + "gpt-4-turbo-preview", + "gpt-4-vision-preview", + "mistral-7b", + "mistral-8x7b", + "llama2-7b", + "llama2-13b", + "codellama-7b", + "codellama-13b", + "codellama-34b", + "codellama-70b", + "phind-codellama-34b", + "wizardcoder-7b", + "wizardcoder-13b", + "wizardcoder-34b", + "zephyr-7b", + "codeup-13b", + "deepseek-7b", + "deepseek-33b", + "neural-chat-7b", + "deepseek-1b", + "stable-code-3b", + "starcoder-1b", + "starcoder-3b", + "mistral-tiny", + "mistral-small", + "mistral-medium", + "AUTODETECT" + ] + }, + { + "type": "string" + } + ] + } + } + } + }, + { + "if": { + "properties": { + "provider": { + "enum": ["anthropic"] + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "model": { + "anyOf": [ + { + "enum": ["claude-2", "claude-instant-1"] + }, + { + "type": "string" + } + ] + } + } + } + }, + { + "if": { + "properties": { + "provider": { + "enum": ["google-palm"] + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "model": { + "enum": ["chat-bison-001", "gemini-pro"] + } + } + } + }, + { + "if": { + "properties": { + "provider": { + "enum": ["together"] + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "model": { + "anyOf": [ + { + "enum": [ + "mistral-7b", + "mistral-8x7b", + "llama2-7b", + "llama2-13b", + "codellama-7b", + "codellama-13b", + "codellama-34b", + "codellama-70b", + "phind-codellama-34b" + ] + }, + { + "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)." + } + } + } + }, + { + "if": { + "properties": { + "provider": { + "enum": ["deepinfra"] + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "model": { + "markdownDescription": "Find the model name you want to use from DeepInfra [here](https://deepinfra.com/models?type=text-generation)." + } + } + } + }, + { + "if": { + "properties": { + "provider": { + "enum": [ + "huggingface-tgi", + "huggingface-inference-api", + "llama.cpp", + "text-gen-webui", + "llamafile" + ] + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "model": { + "anyOf": [ + { + "enum": [ + "mistral-7b", + "mistral-8x7b", + "llama2-7b", + "llama2-13b", + "codellama-7b", + "codellama-13b", + "codellama-34b", + "codellama-70b", + "phind-codellama-34b", + "wizardcoder-7b", + "wizardcoder-13b", + "wizardcoder-34b", + "zephyr-7b", + "codeup-13b", + "deepseek-7b", + "deepseek-33b", + "neural-chat-7b", + "deepseek-1b", + "stable-code-3b", + "starcoder-1b", + "starcoder-3b" + ] + }, + { + "type": "string" + } + ] + } + } + } + }, + { + "if": { + "properties": { + "provider": { + "enum": ["ollama"] + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "model": { + "anyOf": [ + { + "enum": [ + "mistral-7b", + "llama2-7b", + "llama2-13b", + "codellama-7b", + "codellama-13b", + "codellama-34b", + "codellama-70b", + "phi-2", + "phind-codellama-34b", + "wizardcoder-7b", + "wizardcoder-13b", + "wizardcoder-34b", + "zephyr-7b", + "codeup-13b", + "deepseek-7b", + "deepseek-33b", + "neural-chat-7b", + "deepseek-1b", + "stable-code-3b", + "starcoder-1b", + "starcoder-3b", + "AUTODETECT" + ] + }, + { + "type": "string" + } + ], + "markdownDescription": "Select a pre-defined option, or find the exact model tag for an Ollama model [here](https://ollama.ai/library)." + } + } + } + }, + { + "if": { + "properties": { + "provider": { + "enum": ["mistral"] + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "model": { + "enum": ["mistral-tiny", "mistral-small", "mistral-medium"] + } + } + } + }, + { + "if": { + "properties": { + "apiType": { + "const": "azure" + } + }, + "required": ["apiType"] + }, + "then": { + "required": ["engine", "apiVersion", "apiBase"] + } + }, + { + "if": { + "properties": { + "provider": { + "enum": ["openai"] + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "useLegacyCompletionsEndpoint": { + "type": "boolean" + } + } + } + }, + { + "if": { + "properties": { + "provider": { + "const": "llamafile" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "llamafileCommand": { + "type": "string" + } + } + } + }, + { + "if": { + "properties": { + "provider": { + "enum": ["text-gen-webui"] + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "streamingUrl": { + "type": "string" + } + } + } + }, + { + "if": { + "properties": { + "provider": { + "enum": ["flowise"] + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "timeout": { + "title": "Timeout", + "description": "Set the timeout for each request to Flowise. If you are running a local version of Flowise it might takes a while to respond, you might want to set this to avoid timeouts.", + "default": 5000, + "type": "integer" + }, + "additionalHeaders": { + "description": "A list of additional headers", + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { + "title": "Key", + "description": "Header key", + "type": "string" + }, + "value": { + "title": "Value", + "description": "Header value", + "type": "string" + } + }, + "required": ["key", "value"] + } + }, + "additionalFlowiseConfiguration": { + "description": "A list of additional properties to be sent along `overrideConfig`", + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { + "title": "Key", + "description": "Configuration Property key", + "type": "string" + }, + "value": { + "title": "Value", + "description": "Configuration Property value" + } + }, + "required": ["key", "value"] + } + }, + "model": { + "anyOf": [ + { + "enum": [ + "gpt-3.5-turbo", + "gpt-3.5-turbo-16k", + "gpt-4", + "gpt-3.5-turbo-0613", + "gpt-4-32k", + "gpt-4-turbo-preview", + "gpt-4-vision-preview", + "mistral-7b", + "mistral-8x7b", + "llama2-7b", + "llama2-13b", + "codellama-7b", + "codellama-13b", + "codellama-34b", + "codellama-70b", + "phind-codellama-34b", + "wizardcoder-7b", + "wizardcoder-13b", + "wizardcoder-34b", + "zephyr-7b", + "codeup-13b", + "deepseek-7b", + "deepseek-33b", + "claude-2", + "chat-bison-001", + "gemini-pro", + "mistral-tiny", + "mistral-small", + "mistral-medium", + "deepseek-1b", + "stable-code-3b", + "starcoder-1b", + "starcoder-3b" + ] + }, + { + "type": "string" + } + ] + } + } + } + } + ] + }, + "ModelRoles": { + "title": "ModelRoles", + "type": "object", + "properties": { + "default": { + "title": "Default", + "description": "The default model. If other model roles are not set, they will fall back to default.", + "type": "string" + }, + "chat": { + "title": "Chat", + "description": "The model to use for chat. If not set, will fall back to default.", + "type": "string" + }, + "edit": { + "title": "Edit", + "description": "The model to use for editing. If not set, will fall back to default.", + "type": "string" + }, + "summarize": { + "title": "Summarize", + "description": "The model to use for summarization. If not set, will fall back to default.", + "type": "string" + } + }, + "required": ["default"] + }, + "SlashCommand": { + "title": "SlashCommand", + "type": "object", + "properties": { + "name": { + "title": "Name", + "anyOf": [ + { + "enum": [ + "issue", + "share", + "so", + "cmd", + "edit", + "comment", + "http", + "commit" + ], + "type": "string", + "markdownEnumDescriptions": [ + "Generate a link to a drafted GitHub issue", + "Export the current chat session to markdown", + "Reference StackOverflow to answer the question", + "Generate a terminal command and paste it into the terminal", + "Edit the highlighted code with given instructions", + "Add comments to the highlighted code", + "Write a custom slash command at your own HTTP endpoint. Set 'url' in the params object for the endpoint you have setup.", + "Generate a commit message for the current changes" + ] + }, + { + "type": "string" + } + ] + }, + "description": { + "title": "Description", + "type": "string" + }, + "step": { + "title": "Step", + "description": "This property is no longer required and has no effect. To use a built-in slash command, instead set the 'name' property to one of the pre-configured options.", + "type": "string" + }, + "params": { + "title": "Params", + "default": {}, + "type": "object" + } + }, + "allOf": [ + { + "if": { + "properties": { + "name": { + "enum": ["issue"] + } + } + }, + "then": { + "properties": { + "params": { + "properties": { + "repositoryUrl": { + "type": "string", + "description": "Enter the URL of the GitHub repository for which you want to generate the issue." + } + }, + "required": ["repositoryUrl"] + } + }, + "required": ["params"] + } + }, + { + "if": { + "properties": { + "name": { + "enum": ["edit"] + } + } + }, + "then": { + "properties": { + "params": { + "properties": { + "recap": { + "type": "boolean", + "markdownDescription": "If recap is set to `true`, Continue will generate a summary of the changes after making the edit." + }, + "tokenLimit": { + "type": "integer", + "markdownDescription": "By default, Continue doesn't let you edit extremely large ranges (beyond 1,200 tokens), because the LLM is unlikely to succeed. But if you would like to override this limit with the understanding of possible failure you may do so here." + } + } + } + } + } + } + ], + "required": ["name", "description"] + }, + "CustomCommand": { + "title": "CustomCommand", + "type": "object", + "properties": { + "name": { + "title": "Name", + "type": "string" + }, + "prompt": { + "title": "Prompt", + "type": "string" + }, + "description": { + "title": "Description", + "type": "string" + } + }, + "required": ["name", "prompt", "description"] + }, + "ContextProviderWithParams": { + "title": "ContextProviderWithParams", + "type": "object", + "properties": { + "name": { + "title": "Name", + "anyOf": [ + { + "enum": [ + "diff", + "terminal", + "locals", + "open", + "google", + "search", + "http", + "codebase", + "problems", + "folder", + "issue", + "docs", + "tree", + "highlights", + "outline", + "postgres" + ], + "markdownEnumDescriptions": [ + "Reference the contents of the current changes as given by `git diff`", + "Reference the contents of the terminal", + "Reference the contents of all open or pinned files.", + "Enter a search phrase and include the Google search results as context", + "Reference the results of a ripgrep search in your codebase", + "Write a custom context provider at your own HTTP endpoint. Set 'url' in the params object for the endpoint you have setup.", + "Use embeddings to automatically find relevant files from throughout the codebase", + "Reference all linting errors and warnings in the currently open file", + "Include important files from a folder in the prompt, as determined by similarity search", + "Reference GitHub issues from a repository", + "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", + "Displays important snippets of code from the currently open files", + "Displays definition lines from the currently open files", + "References Postgres table schema and sample rows" + ], + "type": "string" + }, + { + "type": "string" + } + ] + }, + "params": { + "title": "Params", + "default": {}, + "type": "object" + } + }, + "allOf": [ + { + "if": { + "properties": { + "name": { + "enum": ["google"] + } + } + }, + "then": { + "properties": { + "params": { + "properties": { + "serperApiKey": { + "type": "string", + "description": "Your API key for https://serper.dev in order to get Google search results" + } + }, + "required": ["serperApiKey"] + } + }, + "required": ["params"] + } + }, + { + "if": { + "properties": { + "name": { + "enum": ["open"] + } + } + }, + "then": { + "properties": { + "params": { + "properties": { + "onlyPinned": { + "type": "boolean", + "description": "If set to true, only 'pinned' files will be included.", + "default": false + } + } + } + } + } + }, + { + "if": { + "properties": { + "name": { + "enum": ["issue"] + } + } + }, + "then": { + "properties": { + "params": { + "properties": { + "githubToken": { + "type": "string", + "description": "Your GitHub token to access the GitHub API. Required for private repositories." + }, + "repos": { + "type": "array", + "description": "A list of repositories to search for issues", + "items": { + "type": "object", + "properties": { + "owner": { + "type": "string", + "description": "The owner of the repository" + }, + "repo": { + "type": "string", + "description": "The name of the repository" + }, + "type": { + "type": "string", + "description": "The type of issues to search for", + "enum": ["open", "closed", "all"] + } + }, + "required": ["owner", "repo"] + } + } + }, + "required": ["repos"] + } + }, + "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": { + "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": { + "name": { + "enum": ["http"] + } + } + }, + "then": { + "properties": { + "params": { + "properties": { + "url": { + "type": "string", + "description": "The HTTP endpoint of your context provider server." + } + }, + "required": ["url"] + } + }, + "required": ["params"] + } + }, + { + "if": { + "properties": { + "name": { + "enum": ["codebase", "folder"] + } + } + }, + "then": { + "properties": { + "params": { + "properties": { + "nRetrieve": { + "title": "N Retrieve", + "description": "Number of results to initially retrieve from vector database", + "default": 50, + "type": "integer" + }, + "nFinal": { + "title": "N Final", + "description": "Final number of results to use after re-ranking", + "default": 10, + "type": "integer" + }, + "useReranking": { + "title": "Use Reranking", + "description": "Whether to use re-ranking, which will allow initial selection of nRetrieve results, then will use an LLM to select the top nFinal results. Disabling re-ranking will give faster, but less accurate, results.", + "default": true, + "type": "boolean" + } + } + } + } + } + }, + { + "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"] + }, + "SerializedContinueConfig": { + "title": "config.json", + "type": "object", + "properties": { + "allowAnonymousTelemetry": { + "title": "Allow Anonymous Telemetry", + "markdownDescription": "If this field is set to True, we will collect anonymous telemetry as described in the documentation page on telemetry. If set to `false`, we will not collect any data.", + "default": true, + "type": "boolean" + }, + "models": { + "title": "Models", + "default": [ + { + "title": "GPT-4 (trial)", + "provider": "free-trial", + "model": "gpt-4", + "apiKey": "" + } + ], + "type": "array", + "items": { + "$ref": "#/definitions/ModelDescription" + } + }, + "systemMessage": { + "title": "System Message", + "description": "A system message that will always be followed by the LLM", + "type": "string" + }, + "completionOptions": { + "title": "Completion Options", + "description": "Default options for completion. These will be overriden by any options set for a specific model.", + "default": { + "temperature": null, + "topP": null, + "topK": null, + "presencePenalty": null, + "frequencyPenalty": null, + "stop": null, + "maxTokens": 600 + }, + "allOf": [ + { + "$ref": "#/definitions/BaseCompletionOptions" + } + ] + }, + "slashCommands": { + "title": "Slash Commands", + "description": "An array of slash commands that let you map custom Steps to a shortcut.", + "default": [], + "type": "array", + "items": { + "$ref": "#/definitions/SlashCommand" + } + }, + "customCommands": { + "title": "Custom Commands", + "description": "An array of custom commands that allow you to reuse prompts. Each has name, description, and prompt properties. When you enter / in the text input, it will act as a shortcut to the prompt.", + "default": [ + { + "name": "test", + "prompt": "Write a comprehensive set of unit tests for the selected code. It should setup, run tests that check for correctness including important edge cases, and teardown. Ensure that the tests are complete and sophisticated. Give the tests just as chat output, don't edit any file.", + "description": "This is an example custom command. Use /config to edit it and create more" + } + ], + "type": "array", + "items": { + "$ref": "#/definitions/CustomCommand" + } + }, + "contextProviders": { + "title": "Context Providers", + "description": "A list of ContextProvider objects that can be used to provide context to the LLM by typing '@'. Read more about ContextProviders in the documentation.", + "default": [], + "type": "array", + "items": { + "$ref": "#/definitions/ContextProviderWithParams" + } + }, + "userToken": { + "title": "User Token", + "description": "An optional token to identify the user.", + "type": "string" + }, + "dataServerUrl": { + "title": "Data Server Url", + "description": "The URL of the server where development data is sent. No data is sent unless a valid user token is provided.", + "default": "https://us-west1-autodebug.cloudfunctions.net", + "type": "string" + }, + "disableSummaries": { + "title": "Disable Summaries", + "markdownDescription": "If set to `true`, Continue will not generate summaries for each Step. This can be useful if you want to save on compute.", + "default": false, + "type": "boolean" + }, + "disableIndexing": { + "title": "Disable Indexing", + "markdownDescription": "If set to `true`, Continue will not index the codebase. This is mainly used for debugging purposes.", + "default": false, + "type": "boolean" + }, + "disableSessionTitles": { + "title": "Disable Session Titles", + "markdownDescription": "If set to `true`, Continue will not make extra requests to the LLM to generate a summary title of each session.", + "default": false, + "type": "boolean" + }, + "embeddingsProvider": { + "title": "Embeddings Provider", + "description": "The method that will be used to generate codebase embeddings. The default is transformers.js, which will run locally in the browser.", + "type": "object", + "properties": { + "provider": { + "enum": ["transformers.js", "ollama", "openai"] + }, + "model": { + "type": "string" + }, + "apiKey": { + "type": "string" + }, + "apiBase": { + "type": "string" + } + }, + "required": ["provider"], + "allOf": [ + { + "if": { + "properties": { + "provider": { + "enum": ["ollama"] + } + }, + "required": ["provider"] + }, + "then": { + "required": ["model"] + } + } + ] + }, + "tabAutocompleteModel": { + "title": "Tab Autocomplete Model", + "markdownDescription": "The model used for tab autocompletion. If undefined, Continue will default to using deepseek-coder:1.3b-base on a local Ollama instance.", + "default": { + "title": "Tab Autocomplete Model", + "provider": "ollama", + "model": "deepseek-coder:1.3b-base" + }, + "$ref": "#/definitions/ModelDescription" + }, + "tabAutocompleteOptions": { + "title": "TabAutocompleteOptions", + "type": "object", + "properties": { + "useCopyBuffer": { + "type": "boolean", + "description": "Determines whether the copy buffer will be considered when contructing the prompt." + }, + "useSuffix": { + "type": "boolean", + "description": "Determines whether to use the file suffix in the prompt." + }, + "maxPromptTokens": { + "type": "number", + "description": "The maximum number of prompt tokens to use. A smaller number will yield faster completions, but less context." + }, + "debounceDelay": { + "type": "number", + "description": "The delay in milliseconds before triggering autocomplete after a keystroke." + }, + "maxSuffixPercentage": { + "type": "number", + "description": "The maximum percentage of the prompt that can be dedicated to the suffix." + }, + "prefixPercentage": { + "type": "number", + "description": "The percentage of the input that should be dedicated to the prefix." + }, + "template": { + "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." + }, + "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" + }, + "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 0cd578e8d..62344e03e 100644 --- a/extensions/vscode/config_schema.json +++ b/extensions/vscode/config_schema.json @@ -1029,7 +1029,8 @@ "docs", "tree", "highlights", - "outline" + "outline", + "postgres" ], "markdownEnumDescriptions": [ "Reference the contents of the current changes as given by `git diff`", @@ -1047,7 +1048,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" }, @@ -1154,6 +1156,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": { @@ -1246,6 +1309,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"] @@ -1437,9 +1559,17 @@ "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." + }, + "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 b6ae41e85..0bcefe9d6 100644 --- a/extensions/vscode/continue_rc_schema.json +++ b/extensions/vscode/continue_rc_schema.json @@ -1148,7 +1148,8 @@ "docs", "tree", "highlights", - "outline" + "outline", + "postgres" ], "markdownEnumDescriptions": [ "Reference the contents of the current changes as given by `git diff`", @@ -1166,7 +1167,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" }, @@ -1294,6 +1296,79 @@ ] } }, + { + "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": { @@ -1403,6 +1478,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": [ @@ -1608,9 +1750,21 @@ "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." + }, + "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_tutorial.py b/extensions/vscode/continue_tutorial.py index b89fd009a..2583d5621 100644 --- a/extensions/vscode/continue_tutorial.py +++ b/extensions/vscode/continue_tutorial.py @@ -1,25 +1,18 @@ """ -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 - 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 +27,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 +53,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""" @@ -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/media/welcome.md b/extensions/vscode/media/welcome.md index f43ed4b37..d407ba29f 100644 --- a/extensions/vscode/media/welcome.md +++ b/extensions/vscode/media/welcome.md @@ -1,25 +1,29 @@ # 👋 Welcome to Continue +## 🔑 Most important shortcuts + +> If you've been using Continue, these have changed. You can always customize them in VS Code settings. + +Cmd/Ctrl + L = Select code + +Cmd/Ctrl + Shift + L = Select code for follow-up + +Cmd/Ctrl + I = Quick edit + +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) -## 🔑 Most important shortcuts - -Cmd/Ctrl + M = Select code - -Cmd/Ctrl + Shift + M = Select code for follow-up - -Cmd/Ctrl + Shift + L = Quick edit - -Cmd/Ctrl + Shift + R = Automatically debug terminal - ## ⚡️ Setting up tab autocomplete 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) diff --git a/extensions/vscode/package-lock.json b/extensions/vscode/package-lock.json index 179a5036b..f328a950b 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.77", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "continue", - "version": "0.9.72", + "version": "0.9.77", "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", @@ -91,15 +92,21 @@ "adf-to-md": "^1.1.0", "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", "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.13", + "llama-tokenizer-js": "^1.1.3", "node-fetch": "^3.3.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", @@ -108,9 +115,10 @@ "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", "@types/handlebars": "^4.1.0", "@types/jest": "^29.5.11", "@types/jquery": "^3.5.29", @@ -3697,6 +3705,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", @@ -3862,6 +3878,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", @@ -4803,6 +4827,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", @@ -4884,7 +4918,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" } @@ -4951,6 +4984,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", @@ -5676,7 +5717,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" } @@ -5939,6 +5979,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", @@ -6198,8 +6243,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", @@ -6288,6 +6332,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", @@ -6364,8 +6416,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", @@ -6928,8 +6979,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", @@ -7152,6 +7202,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", @@ -8184,6 +8239,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", @@ -9067,8 +9127,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", @@ -9273,6 +9332,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", @@ -9283,6 +9379,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", @@ -9303,8 +9418,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", @@ -9794,6 +9908,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", @@ -9974,6 +10093,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", @@ -10220,6 +10422,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.3", "resolved": "https://registry.npmjs.org/posthog-node/-/posthog-node-3.6.3.tgz", @@ -10236,7 +10473,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", @@ -10534,7 +10770,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", @@ -10549,7 +10784,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" } @@ -11200,6 +11434,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", @@ -11298,7 +11537,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", @@ -11318,7 +11556,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", @@ -11464,11 +11701,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", @@ -11926,7 +12464,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", @@ -11937,14 +12474,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", @@ -11960,7 +12495,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", @@ -13587,6 +14121,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 9d4ed7c31..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.72", + "version": "0.9.77", "repository": { "type": "git", "url": "https://github.com/continuedev/continue" @@ -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", @@ -195,13 +195,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", @@ -221,13 +221,13 @@ }, { "command": "continue.quickEdit", - "mac": "cmd+shift+l", - "key": "ctrl+shift+l" + "mac": "cmd+i", + "key": "ctrl+i" }, { "command": "continue.toggleAuxiliaryBar", - "mac": "alt+cmd+m", - "key": "alt+ctrl+m" + "mac": "alt+cmd+l", + "key": "alt+ctrl+l" }, { "command": "continue.debugTerminal", @@ -476,6 +476,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/scripts/prepackage.js b/extensions/vscode/scripts/prepackage.js index 4db78c7cb..16ad3060d 100644 --- a/extensions/vscode/scripts/prepackage.js +++ b/extensions/vscode/scripts/prepackage.js @@ -13,11 +13,22 @@ if (args[2] === "--target") { (async () => { console.log("[info] Packaging extension for target ", target); - // Copy config_schema.json to config.json in docs + // Copy config_schema.json to config.json in docs and intellij fs.copyFileSync( "config_schema.json", path.join("..", "..", "docs", "static", "schemas", "config.json") ); + fs.copyFileSync( + "config_schema.json", + path.join( + "..", + "intellij", + "src", + "main", + "resources", + "config_schema.json" + ) + ); // Modify and copy for .continuerc.json const schema = JSON.parse(fs.readFileSync("config_schema.json", "utf8")); schema.definitions.SerializedContinueConfig.properties.mergeBehavior = { @@ -61,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) => { @@ -77,11 +88,19 @@ 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"); + + // 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 // @@ -153,19 +172,13 @@ 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"), { - recursive: true, - }); + rimrafSync(path.join(__dirname, "../bin/napi-v3/darwin")); } if (!target.startsWith("linux")) { - fs.rmdirSync(path.join(__dirname, "../bin/napi-v3/linux"), { - recursive: true, - }); + rimrafSync(path.join(__dirname, "../bin/napi-v3/linux")); } if (!target.startsWith("win")) { - fs.rmdirSync(path.join(__dirname, "../bin/napi-v3/win32"), { - recursive: true, - }); + rimrafSync(path.join(__dirname, "../bin/napi-v3/win32")); } } console.log("[info] Copied onnxruntime-node"); diff --git a/extensions/vscode/src/activation/activate.ts b/extensions/vscode/src/activation/activate.ts index eab213c90..2e62fea3e 100644 --- a/extensions/vscode/src/activation/activate.ts +++ b/extensions/vscode/src/activation/activate.ts @@ -2,27 +2,12 @@ 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 { setupRemoteConfigSync } from "../util/remoteConfig"; import { getExtensionVersion } from "../util/util"; import { getExtensionUri } from "../util/vscode"; import { setupInlineTips } from "./inlineTips"; -import { registerDebugTracker } from "../debug/debug"; - -export let extensionContext: vscode.ExtensionContext | undefined = undefined; -export let ideProtocolClient: IdeProtocolClient; -export let windowId: string = v4(); export async function showTutorial() { const tutorialPath = path.join( @@ -49,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 @@ -83,47 +70,15 @@ 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() - ) - ); - } + const vscodeExtension = new VsCodeExtension(context); - 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()); - - migrate("showWelcome", () => { + migrate("showWelcome_1", () => { vscode.commands.executeCommand( "markdown.showPreview", vscode.Uri.file( @@ -132,27 +87,6 @@ export async function activateExtension(context: vscode.ExtensionContext) { ); }); - registerDebugTracker(); - - // (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); - // } - // }); - // })(); - // Load Continue configuration if (!context.globalState.get("hasBeenInstalled")) { context.globalState.update("hasBeenInstalled", true); @@ -160,10 +94,4 @@ export async function activateExtension(context: vscode.ExtensionContext) { extensionVersion: getExtensionVersion(), }); } - - try { - setupRemoteConfigSync(); - } catch (e) { - console.warn(`Failed to sync remote config: ${e}`); - } } 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/autocomplete/completionProvider.ts b/extensions/vscode/src/autocomplete/completionProvider.ts new file mode 100644 index 000000000..afd2a2dc7 --- /dev/null +++ b/extensions/vscode/src/autocomplete/completionProvider.ts @@ -0,0 +1,115 @@ +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 { TabAutocompleteModel } from "../util/loadAutocompleteModel"; +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(); + + constructor(private readonly configHandler: ConfigHandler, private readonly ide: IDE, private readonly tabAutocompleteModel: TabAutocompleteModel) {} + + 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 this.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, + this.tabAutocompleteModel, + this.ide + ); + 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; + 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..29200b767 --- /dev/null +++ b/extensions/vscode/src/autocomplete/getTabCompletion.ts @@ -0,0 +1,215 @@ +import { IDE, TabAutocompleteOptions } from "core"; +import { AutocompleteLruCache } from "core/autocomplete/cache"; +import { onlyWhitespaceAfterEndOfLine } from "core/autocomplete/charStream"; +import { + constructAutocompletePrompt, + languageForFilepath, +} from "core/autocomplete/constructPrompt"; +import { + avoidPathLine, + stopAtLines, + 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"; +import OpenAI from "core/llm/llms/OpenAI"; +import Handlebars from "handlebars"; +import * as vscode from "vscode"; +import { TabAutocompleteModel } from "../util/loadAutocompleteModel"; +import { ContinueCompletionProvider } from "./completionProvider"; +import { getDefinitionsFromLsp } from "./lsp"; +import { RecentlyEditedTracker } from "./recentlyEdited"; +import { setupStatusBar, stopStatusBarLoading } from "./statusBar"; + +export interface AutocompleteOutcome { + accepted?: boolean; + time: number; + prompt: string; + completion: string; + modelProvider: string; + modelName: string; + completionOptions: any; + cacheHit: boolean; +} + +const autocompleteCache = AutocompleteLruCache.get(); +const recentlyEditedTracker = new RecentlyEditedTracker(); + +export async function getTabCompletion( + document: vscode.TextDocument, + pos: vscode.Position, + token: vscode.CancellationToken, + options: TabAutocompleteOptions, + tabAutocompleteModel: TabAutocompleteModel, + ide: IDE +): 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 >= line.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(); + + let extrasSnippets = (await Promise.race([ + getDefinitionsFromLsp(document.uri.fsPath, fullPrefix + fullSuffix, fullPrefix.length, ide), + new Promise((resolve) => { + setTimeout(() => resolve([]), 100); + }) + ])) 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(), + pos.line, + fullPrefix, + fullSuffix, + clipboardText, + lang, + options, + await recentlyEditedTracker.getRecentlyEditedRanges(), + await recentlyEditedTracker.getRecentlyEditedDocuments(), + llm.model, + extrasSnippets + ); + + 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 = options.useCache ? await cache.get(prompt) : undefined; + 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(avoidPathLine(stopAtLines(streamLines(gen2)), lang.comment)); + 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/lsp.ts b/extensions/vscode/src/autocomplete/lsp.ts new file mode 100644 index 000000000..ae4bde8e9 --- /dev/null +++ b/extensions/vscode/src/autocomplete/lsp.ts @@ -0,0 +1,106 @@ +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"; + +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: d.targetUri.fsPath, + 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( + filepath: string, + contents: string, + cursorIndex: number, + ide: IDE +): Promise { + const ast = await getAst(filepath, 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(filepath, node); + results.push( + ...(await Promise.all( + definitions.map(async (def) => ({ + ...def, + contents: await ide.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.map((result) => ({ + ...result, + score: 0.8 + })); +} diff --git a/extensions/vscode/src/autocomplete/recentlyEdited.ts b/extensions/vscode/src/autocomplete/recentlyEdited.ts new file mode 100644 index 000000000..aec821c9b --- /dev/null +++ b/extensions/vscode/src/autocomplete/recentlyEdited.ts @@ -0,0 +1,162 @@ +import { RecentlyEditedRange } from "core/autocomplete/recentlyEdited"; +import { RangeInFileWithContents } from "core/commands/util"; +import * as vscode from "vscode"; + +interface VsCodeRecentlyEditedRange { + timestamp: number; + uri: vscode.Uri; + 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) => { + if (event.document.uri.scheme !== "file") { + return; + } + event.contentChanges.forEach((change) => { + const editedRange = { + 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), + ), + timestamp: Date.now(), + }; + this.insertRange(editedRange); + }); + + this.insertDocument(event.document.uri); + }); + + setInterval(() => { + this.removeOldEntries(); + }, 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, + ); + } + + public async getRecentlyEditedRanges(): Promise { + 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[] + > { + const results = await Promise.all( + this.recentlyEditedDocuments.map(async (entry) => { + 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, + }, + }, + }; + } catch (e) { + return null; + } + }), + ); + + return results.filter((result) => result !== null) as any; + } +} 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..ffea374c3 100644 --- a/extensions/vscode/src/commands.ts +++ b/extensions/vscode/src/commands.ts @@ -3,19 +3,27 @@ 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 { AutocompleteOutcome } from "./lang-server/completionProvider"; -import { configHandler, llmFromTitle } from "./loadConfig"; +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"; +import { VerticalPerLineDiffManager } from "./diff/verticalPerLine/manager"; +import { VsCodeWebviewProtocol } from "./webviewProtocol"; -function addHighlightedCodeToContext(edit: boolean) { +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 +) { const editor = vscode.window.activeTextEditor; if (editor) { const selection = editor.selection; @@ -37,22 +45,28 @@ function addHighlightedCodeToContext(edit: boolean) { }, }; - debugPanelWebview?.postMessage({ - type: "highlightedCode", + webviewProtocol?.request("highlightedCode", { rangeInFileWithContents, - edit, }); } } -async function addEntireFileToContext(filepath: vscode.Uri, edit: boolean) { +async function addEntireFileToContext( + filepath: vscode.Uri, + edit: boolean, + webviewProtocol: VsCodeWebviewProtocol | 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, + webviewProtocol + ); } } return; @@ -75,79 +89,74 @@ async function addEntireFileToContext(filepath: vscode.Uri, edit: boolean) { }, }; - debugPanelWebview?.postMessage({ - type: "highlightedCode", + webviewProtocol?.request("highlightedCode", { rangeInFileWithContents, - edit, }); } -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({ - 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"); - debugPanelWebview?.postMessage({ - type: "focusContinueInput", - }); - addHighlightedCodeToContext(false); + 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"); - debugPanelWebview?.postMessage({ - type: "focusContinueInputWithoutClear", - }); - addHighlightedCodeToContext(true); + if (!getFullScreenTab()) { + vscode.commands.executeCommand("continue.continueGUIView.focus"); + } + sidebar.webviewProtocol?.request( + "focusContinueInputWithoutClear", + undefined + ); + addHighlightedCodeToContext(true, sidebar.webviewProtocol); }, "continue.toggleAuxiliaryBar": () => { vscode.commands.executeCommand("workbench.action.toggleAuxiliaryBar"); @@ -167,7 +176,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 +210,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 +225,7 @@ const commandsMap: { [command: string]: (...args: any) => any } = { return provider.getContextItems("", { embeddingsProvider: config.embeddingsProvider, - ide: new VsCodeIde(), + ide, llm, fullInput: text || "", selectedCode: [], @@ -230,25 +239,29 @@ 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. Do not change anything about the code itself." + ); }, "continue.writeDocstringForCode": async () => { - await 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 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( - "If there are any grammar or spelling mistakes in this writing, fix them" + await verticalDiffManager.streamEdit( + "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,11 +277,10 @@ 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({ - type: "userInput", - input: `I got the following error, can you please help explain how to fix it?\n\n${terminalContents}`, + sidebar.webviewProtocol?.request("userInput", { + input: `I got the following error, can you please help explain how to fix it?\n\n${terminalContents.trim()}`, }); }, "continue.hideInlineTip": () => { @@ -280,21 +292,17 @@ const commandsMap: { [command: string]: (...args: any) => any } = { // Commands without keyboard shortcuts "continue.addModel": () => { vscode.commands.executeCommand("continue.continueGUIView.focus"); - debugPanelWebview?.postMessage({ - type: "addModel", - }); + sidebar.webviewProtocol?.request("addModel", undefined); }, "continue.openSettingsUI": () => { vscode.commands.executeCommand("continue.continueGUIView.focus"); - debugPanelWebview?.postMessage({ - type: "openSettings", - }); + sidebar.webviewProtocol?.request("openSettings", undefined); }, "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,27 +327,17 @@ const commandsMap: { [command: string]: (...args: any) => any } = { }); }, "continue.sendToTerminal": (text: string) => { - ideProtocolClient.runCommand(text); + ide.runCommand(text); }, "continue.newSession": () => { - debugPanelWebview?.postMessage({ - type: "newSession", - }); + sidebar.webviewProtocol?.request("newSession", undefined); }, "continue.viewHistory": () => { - debugPanelWebview?.postMessage({ - type: "viewHistory", - }); + sidebar.webviewProtocol?.request("viewHistory", undefined); }, "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) { @@ -364,7 +362,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 +371,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 +389,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.webviewProtocol); } }, "continue.updateAllReferences": (filepath: vscode.Uri) => { @@ -398,7 +399,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 +409,14 @@ const commandsMap: { [command: string]: (...args: any) => any } = { ) => { clearTimeout(logRejectionTimeout); outcome.accepted = true; - ideProtocolClient.logDevData("autocomplete", outcome); + 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"); @@ -419,10 +427,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/debug/debug.ts b/extensions/vscode/src/debug/debug.ts index 252a368e1..6748d05e7 100644 --- a/extensions/vscode/src/debug/debug.ts +++ b/extensions/vscode/src/debug/debug.ts @@ -1,10 +1,10 @@ import * as vscode from "vscode"; -import { debugPanelWebview } from "../debugPanel"; +import { VsCodeWebviewProtocol } from "../webviewProtocol"; export const threadStopped: Map = new Map(); // Arrays has better perf but you probably won't have thousands of threads in a single debug session -export function registerDebugTracker() { +export function registerDebugTracker(webviewProtocol: VsCodeWebviewProtocol) { vscode.debug.registerDebugAdapterTrackerFactory("*", { createDebugAdapterTracker(session: vscode.DebugSession) { return { @@ -30,7 +30,7 @@ export function registerDebugTracker() { threadStopped.set(key, false) ); - debugPanelWebview?.postMessage({ type: "refreshSubmenuItems" }); + webviewProtocol?.request("refreshSubmenuItems", undefined); break; case "thread": diff --git a/extensions/vscode/src/debugPanel.ts b/extensions/vscode/src/debugPanel.ts index e56086307..c6d083281 100644 --- a/extensions/vscode/src/debugPanel.ts +++ b/extensions/vscode/src/debugPanel.ts @@ -1,718 +1,118 @@ -import { ContextItemId, DiffLine, FileEdit, ModelDescription } from "core"; -import { indexDocs } from "core/indexing/docs"; -import TransformersJsEmbeddingsProvider from "core/indexing/embeddings/TransformersJsEmbeddingsProvider"; -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 historyManager from "./history"; -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"; +import { VsCodeWebviewProtocol } from "./webviewProtocol"; -export let debugPanelWebview: vscode.Webview | undefined; +export class ContinueGUIWebviewViewProvider + implements vscode.WebviewViewProvider +{ + public static readonly viewType = "continue.continueGUIView"; + public webviewProtocol: VsCodeWebviewProtocol; -export async function webviewRequest( - messageType: string, - data: any = {} -): Promise { - return new Promise((resolve, reject) => { - if (!debugPanelWebview) { - resolve(undefined); + resolveWebviewView( + webviewView: vscode.WebviewView, + _context: vscode.WebviewViewResolveContext, + _token: vscode.CancellationToken + ): void | Thenable { + 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 + ) { + this.webviewProtocol = new VsCodeWebviewProtocol( + ide, + configHandler, + verticalDiffManager + ); + } + + 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"; } - 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, - }); + panel.webview.options = { + enableScripts: true, + localResourceRoots: [ + vscode.Uri.joinPath(extensionUri, "gui"), + vscode.Uri.joinPath(extensionUri, "assets"), + ], + enableCommandUris: true, + portMapping: [ + { + webviewPort: 65433, + extensionHostPort: 65433, + }, + ], }; - 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(); - } - } - ); - }); - } - ); + const nonce = getNonce(); - break; - } - - // IDE - case "getDiff": { - respond(await ide.getDiff()); - break; - } - case "getSerializedConfig": { - respond(await ide.getSerializedConfig()); - break; - } - case "getTerminalContents": { - respond(await ide.getTerminalContents()); - break; - } - case "getDebugLocals": { - respond(await ide.getDebugLocals(data.message.threadIndex)); - } - case "getTopLevelCallStackSources": { - respond( - await ide.getTopLevelCallStackSources( - data.message.threadIndex, - data.message.stackDepth - ) - ); - } - 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; - } - 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()); - 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 (abortedMessageIds.has(data.messageId)) { - abortedMessageIds.delete(data.messageId); - break; - } - 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; - - if (document.getText().trim() === "") { - editor.edit((editBuilder) => { - editBuilder.insert(document.positionAt(0), data.text); - }); - return; - } - - 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.`; - } + const currentTheme = getTheme(); + vscode.workspace.onDidChangeConfiguration((e) => { + if (e.affectsConfiguration("workbench.colorTheme")) { + // Send new theme to GUI to update embedded Monaco themes + this.webviewProtocol?.request("setTheme", { theme: getTheme() }); } + }); - 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.webviewProtocol.webview = panel.webview; - 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 ` + return ` @@ -740,7 +140,7 @@ export function getSidebarContent( - + @@ -761,18 +161,5 @@ export function getSidebarContent( ${page ? `` : ""} `; -} - -export class ContinueGUIWebviewViewProvider - implements vscode.WebviewViewProvider -{ - public static readonly viewType = "continue.continueGUIView"; - - resolveWebviewView( - webviewView: vscode.WebviewView, - _context: vscode.WebviewViewResolveContext, - _token: vscode.CancellationToken - ): void | Thenable { - webviewView.webview.html = getSidebarContent(extensionContext, webviewView); } } diff --git a/extensions/vscode/src/diff/horizontal.ts b/extensions/vscode/src/diff/horizontal.ts index b782658af..b71abf9ba 100644 --- a/extensions/vscode/src/diff/horizontal.ts +++ b/extensions/vscode/src/diff/horizontal.ts @@ -3,11 +3,9 @@ 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"; +import { VsCodeWebviewProtocol } from "../webviewProtocol"; interface DiffInfo { originalFilepath: string; @@ -32,7 +30,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 +48,9 @@ class DiffManager { } } - constructor() { + webviewProtocol: VsCodeWebviewProtocol | undefined; + + constructor(private readonly extensionContext: vscode.ExtensionContext) { this.setupDirectory(); // Listen for file closes, and if it's a diff file, clean up @@ -115,7 +115,7 @@ class DiffManager { .update("codeLens", true, vscode.ConfigurationTarget.Global); if ( - extensionContext?.globalState.get( + this.extensionContext.globalState.get( "continue.showDiffInfoMessage" ) !== false ) { @@ -128,7 +128,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 ); @@ -289,7 +289,7 @@ class DiffManager { } // Stop the step at step_index in case it is still streaming - debugPanelWebview?.postMessage({ type: "setInactive" }); + this.webviewProtocol?.request("setInactive", undefined); vscode.workspace.textDocuments .find((doc) => doc.uri.fsPath === newFilepath) @@ -302,8 +302,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"); @@ -333,19 +331,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 b6e60e3db..d6737b701 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) { @@ -188,7 +193,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) { @@ -251,7 +256,7 @@ export class VerticalPerLineDiffHandler { // } // }); } catch (e) { - verticalPerLineDiffManager.clearForFilepath(this.filepath, false); + this.clearForFilepath(this.filepath, false); throw e; } } @@ -288,7 +293,7 @@ export class VerticalPerLineDiffHandler { // Shift the codelens objects const blocks = - editorToVerticalDiffCodeLens + this.editorToVerticalDiffCodeLens .get(this.filepath) ?.filter((x) => x.start !== startLine) .map((x) => { @@ -297,6 +302,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 f42d42e9a..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,78 +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; - } + 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 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 ); - 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 + ); - 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 (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 ); } - input = `Original request: ${existingHandler.input}\nUpdated request: ${input}`; } - - await diffHandler.run( - streamDiffLines( - rangeContent, - llm, - input, - getMarkdownLanguageTagForFile(filepath) - ) - ); } - -export interface VerticalDiffCodeLens { - start: number; - numRed: number; - numGreen: number; -} - -export const editorToVerticalDiffCodeLens: Map = - new Map(); diff --git a/core/autocomplete/index.ts b/extensions/vscode/src/extension/autocomplete.ts similarity index 100% rename from core/autocomplete/index.ts rename to extensions/vscode/src/extension/autocomplete.ts 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..d4fa4f833 --- /dev/null +++ b/extensions/vscode/src/extension/vscodeExtension.ts @@ -0,0 +1,231 @@ +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 { TabAutocompleteModel } from "../util/loadAutocompleteModel"; +import { RemoteConfigSync } from "../util/remoteConfig"; +import { VsCodeWebviewProtocol } from "../webviewProtocol"; +import { registerDebugTracker } from "../debug/debug"; + +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; + private webviewProtocol: VsCodeWebviewProtocol; + + constructor(context: vscode.ExtensionContext) { + this.diffManager = new DiffManager(context); + this.ide = new VsCodeIde(this.diffManager); + 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, + typeof remoteUrl !== "string" || remoteUrl === "" + ? undefined + : new URL(remoteUrl), + async (log: string) => { + outputChannel.appendLine( + "==========================================================================" + ); + outputChannel.appendLine( + "==========================================================================" + ); + outputChannel.append(log); + }, + () => this.webviewProtocol?.request("configUpdate", undefined) + ); + + this.configHandler.reloadConfig(); + 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 + ); + 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( + vscode.window.registerWebviewViewProvider( + "continue.continueGUIView", + this.sidebar, + { + webviewOptions: { retainContextWhenHidden: true }, + } + ) + ); + this.webviewProtocol = this.sidebar.webviewProtocol; + + // Indexing + pause token + const indexingPauseToken = new PauseToken( + context.globalState.get("continue.indexingPaused") === true + ); + 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, + indexingPauseToken + ); + + // 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 + ) + ) + ); + } + + // Commands + registerAllCommands( + context, + this.ide, + context, + this.sidebar, + this.configHandler, + this.diffManager, + this.verticalDiffManager + ); + + registerDebugTracker(this.webviewProtocol); + + // 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") + ) { + // Update embeddings! (TODO) + } + }); + + // 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 update of this.indexer.refresh(dirs)) { + this.webviewProtocol.request("indexProgress", update); + } + } +} diff --git a/extensions/vscode/src/ideProtocol.ts b/extensions/vscode/src/ideProtocol.ts index 2df704e47..c4f0352ef 100644 --- a/extensions/vscode/src/ideProtocol.ts +++ b/extensions/vscode/src/ideProtocol.ts @@ -2,58 +2,121 @@ 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, IdeInfo, 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 getTopLevelCallStackSources(threadIndex: number, stackDepth: number): Promise { - return await ideProtocolClient.getTopLevelCallStackSources(threadIndex, stackDepth); + ideUtils: VsCodeIdeUtils; + + constructor(private readonly diffManager: DiffManager) { + this.ideUtils = new VsCodeIdeUtils(); } - async getAvailableThreads(): Promise { - return await ideProtocolClient.getAvailableThreads(); + getIdeInfo(): Promise { + return Promise.resolve({ + ideType: "vscode", + name: vscode.env.appName, + version: vscode.version, + remoteName: vscode.env.remoteName || "local", + }); } - async getSerializedConfig(): Promise { - const config = await configHandler.loadConfig(); - return finalToBrowserConfig(config); + 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 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) => { + 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; + } + + 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 getDebugLocals(threadIndex: number): Promise { - return await ideProtocolClient.getDebugLocals(threadIndex); + return await this.ideUtils.getDebugLocals(threadIndex); + } + + async getTopLevelCallStackSources(threadIndex: number, stackDepth: number): Promise { + return await this.ideUtils.getTopLevelCallStackSources(threadIndex, stackDepth); + } + async getAvailableThreads(): Promise { + return await this.ideUtils.getAvailableThreads(); } 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 +126,7 @@ class VsCodeIde implements IDE { directory, [], false, - undefined + undefined, )) { allDirs.push(dir); } @@ -73,7 +136,7 @@ class VsCodeIde implements IDE { } async getWorkspaceDirs(): Promise { - return ideProtocolClient.getWorkspaceDirectories(); + return this.ideUtils.getWorkspaceDirectories(); } async getContinueDir(): Promise { @@ -83,75 +146,66 @@ 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), ); } 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( 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(() => { - 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 + 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 { @@ -170,10 +224,10 @@ class VsCodeIde implements IDE { "@vscode", "ripgrep", "bin", - "rg" + "rg", ), ["-i", "-C", "2", `"${query}"`, "."], - { cwd: dir } + { cwd: dir }, ); let output = ""; @@ -237,48 +291,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/codeLens.ts b/extensions/vscode/src/lang-server/codeLens.ts index 04915b777..c75aa1c24 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 []; } @@ -28,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], }) @@ -41,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: "", }) ); @@ -71,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], }) @@ -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; } @@ -284,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], }) ); } @@ -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 deleted file mode 100644 index bf6d22ccc..000000000 --- a/extensions/vscode/src/lang-server/completionProvider.ts +++ /dev/null @@ -1,483 +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.disableMultiLineCompletions || !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/src/loadConfig.ts b/extensions/vscode/src/loadConfig.ts deleted file mode 100644 index 6e5778d43..000000000 --- a/extensions/vscode/src/loadConfig.ts +++ /dev/null @@ -1,323 +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"); - } - - const remoteConfigServerUrl = vscode.workspace - .getConfiguration("continue") - .get("remoteConfigServerUrl", undefined); - - this.savedConfig = await loadFullConfigNode( - ideProtocolClient.readFile, - workspaceConfigs, - remoteConfigServerUrl ? new URL(remoteConfigServerUrl) : undefined - ); - 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; - } - - 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, - }); - - 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 78% rename from extensions/vscode/src/continueIdeClient.ts rename to extensions/vscode/src/util/ideUtils.ts index 4f75260c7..6aaa06681 100644 --- a/extensions/vscode/src/continueIdeClient.ts +++ b/extensions/vscode/src/util/ideUtils.ts @@ -1,107 +1,26 @@ 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"; -import { trace } from "console"; -import { threadStopped } from "./debug/debug"; +} from "./vscode"; +import { threadStopped } from "../debug/debug"; 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( @@ -210,10 +129,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( @@ -221,12 +136,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) { @@ -247,9 +163,9 @@ class IdeProtocolClient { vscode.workspace .openTextDocument( vscode.Uri.parse( - `${continueVirtualDocumentScheme}:${encodeURIComponent( - name - )}?${encodeURIComponent(contents)}` + `${ + VsCodeExtension.continueVirtualDocumentScheme + }:${encodeURIComponent(name)}?${encodeURIComponent(contents)}` ) ) .then((doc) => { @@ -445,6 +361,7 @@ class IdeProtocolClient { return terminalContents; } + private async _getThreads(session: vscode.DebugSession) { const threadsResponse = await session.customRequest("threads"); const threads = threadsResponse.threads.filter((thread: any) => @@ -612,7 +529,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"; @@ -665,30 +582,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/util/remoteConfig.ts b/extensions/vscode/src/util/remoteConfig.ts index 1f4705ae2..2f27664a4 100644 --- a/extensions/vscode/src/util/remoteConfig.ts +++ b/extensions/vscode/src/util/remoteConfig.ts @@ -1,68 +1,128 @@ 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(private triggerReloadConfig: () => void) { + 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 * 60); + } + + async sync(userToken: string, remoteConfigServerUrl: URL) { + try { + const response = await fetch( + new URL("sync", remoteConfigServerUrl).href, + { + method: "GET", + headers: { + Authorization: `Bearer ${userToken}`, + }, + } + ); + + 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 + ); + this.triggerReloadConfig(); + } catch (e) { + vscode.window.showErrorMessage(`Failed to sync remote config: ${e}`); + } } - 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(); } diff --git a/extensions/vscode/src/webviewProtocol.ts b/extensions/vscode/src/webviewProtocol.ts new file mode 100644 index 000000000..be3e757f9 --- /dev/null +++ b/extensions/vscode/src/webviewProtocol.ts @@ -0,0 +1,550 @@ +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 { + ReverseWebviewProtocol, + WebviewProtocol, +} from "core/web/webviewProtocol"; +import { v4 as uuidv4 } from "uuid"; +import * as vscode 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, data: any, messageId?: string): string { + const id = messageId || uuidv4(); + this.webview?.postMessage({ + messageType, + data, + messageId: id, + }); + return id; + } + + on( + messageType: T, + handler: ( + message: Message + ) => Promise | WebviewProtocol[T][1] + ): void { + if (!this.listeners.has(messageType)) { + this.listeners.set(messageType, []); + } + this.listeners.get(messageType)?.push(handler); + } + + _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)); + } + + 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); + 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: " + + 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") + ); + } + }); + } + } + }); + } + + constructor( + private readonly ide: IDE, + private readonly configHandler: ConfigHandler, + private readonly verticalDiffManager: VerticalPerLineDiffManager + ) { + 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", 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; + }); + }); + 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("config/getBrowserSerialized", async (msg) => { + return await configHandler.getSerializedConfig(); + }); + this.on("getTerminalContents", async (msg) => { + return await ide.getTerminalContents(); + }); + this.on("getDebugLocals", async (msg) => { + return await ide.getDebugLocals(Number(msg.data.threadIndex)); + }); + this.on("getAvailableThreads", async (msg) => { + return await ide.getAvailableThreads(); + }); + this.on("getTopLevelCallStackSources", async (msg) => { + return await ide.getTopLevelCallStackSources( + msg.data.threadIndex, + msg.data.stackDepth + ); + }); + 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/list", (msg) => { + return historyManager.list(); + }); + this.on("history/save", (msg) => { + historyManager.save(msg.data); + }); + this.on("history/delete", (msg) => { + historyManager.delete(msg.data.id); + }); + this.on("history/load", (msg) => { + return historyManager.load(msg.data.id); + }); + 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("devdata/log", (msg) => { + logDevData(msg.data.tableName, msg.data.data); + }); + this.on("config/addModel", (msg) => { + const model = msg.data.model; + 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("config/deleteModel", (msg) => { + deleteModel(msg.data.title); + this.configHandler.reloadConfig(); + }); + this.on("config/addOpenAiKey", async (msg) => { + addOpenAIKey(msg.data); + 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("llm/streamComplete", (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("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 completion; + }); + + async function* runNodeJsSlashCommand( + protocol: VsCodeWebviewProtocol, + msg: Message + ) { + const { + input, + history, + modelTitle, + slashCommandName, + contextItems, + params, + historyIndex, + selectedCode, + } = 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.request("addContextItem", { + item, + historyIndex, + }); + }, + selectedCode, + config, + })) { + if (content) { + yield { content }; + } + } + yield { done: true, content: "" }; + } + this.on("command/run", (msg) => runNodeJsSlashCommand(this, msg)); + + this.on("context/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("context/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("context/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.request("refreshSubmenuItems", undefined); + } + ); + }); + 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(); + }); + + this.on("openUrl", (msg) => { + vscode.env.openExternal(vscode.Uri.parse(msg.data)); + }); + } + + public request( + messageType: T, + data: ReverseWebviewProtocol[T][0] + ): 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(); + }); + }); + } +} 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..530ca3472 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.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== @@ -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" @@ -2318,15 +2368,21 @@ core-util-is@1.0.2: adf-to-md "^1.1.0" 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" 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.13" + llama-tokenizer-js "^1.1.3" node-fetch "^3.3.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" @@ -2335,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" @@ -2420,6 +2476,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" @@ -2504,6 +2569,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" @@ -2659,7 +2729,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== @@ -3159,6 +3229,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" @@ -3374,6 +3449,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" @@ -3847,6 +3929,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" @@ -4053,6 +4142,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" @@ -4758,6 +4852,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" @@ -4784,11 +4883,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" @@ -4830,6 +4939,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" @@ -5221,6 +5352,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" @@ -5239,7 +5381,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== @@ -5253,7 +5395,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== @@ -5270,7 +5412,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== @@ -5353,6 +5495,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" @@ -5362,6 +5518,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" @@ -5387,7 +5550,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== @@ -5414,6 +5577,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" @@ -5459,6 +5627,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" @@ -5474,6 +5658,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" @@ -5646,6 +5837,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" @@ -5755,6 +5951,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" @@ -5842,6 +6096,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.3" resolved "https://registry.npmjs.org/posthog-node/-/posthog-node-3.6.3.tgz" @@ -5850,7 +6126,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== @@ -6462,6 +6738,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" @@ -6585,6 +6866,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" @@ -6630,6 +6920,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" @@ -6640,6 +6935,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" @@ -6655,6 +6967,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" @@ -6891,7 +7210,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== @@ -7176,6 +7495,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" @@ -7183,6 +7509,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" @@ -7578,6 +7911,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/gui/package-lock.json b/gui/package-lock.json index 6d46c2ec7..b43ee9349 100644 --- a/gui/package-lock.json +++ b/gui/package-lock.json @@ -79,15 +79,21 @@ "adf-to-md": "^1.1.0", "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", "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.13", + "llama-tokenizer-js": "^1.1.3", "node-fetch": "^3.3.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", @@ -96,9 +102,10 @@ "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", "@types/handlebars": "^4.1.0", "@types/jest": "^29.5.11", "@types/jquery": "^3.5.29", @@ -836,12 +843,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": { @@ -904,9 +911,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" } @@ -1113,13 +1120,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": { @@ -1130,16 +1137,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" @@ -1151,9 +1158,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" ], @@ -1167,9 +1174,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" ], @@ -1183,9 +1190,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" ], @@ -1199,9 +1206,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" ], @@ -1215,9 +1222,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" ], @@ -1231,9 +1238,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" ], @@ -1247,9 +1254,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" ], @@ -1263,9 +1270,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" ], @@ -1279,9 +1286,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" ], @@ -1295,9 +1302,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" ], @@ -1805,9 +1812,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" @@ -2066,6 +2073,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", @@ -2102,9 +2118,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", @@ -2120,8 +2136,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" }, @@ -2150,9 +2166,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", @@ -2375,6 +2391,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", @@ -2478,6 +2499,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", @@ -2516,9 +2549,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", @@ -2850,9 +2883,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" @@ -3066,6 +3099,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", @@ -3087,6 +3129,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", @@ -3113,6 +3278,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", @@ -3698,9 +3872,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", @@ -4319,9 +4493,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": { @@ -4658,12 +4832,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": { @@ -4704,18 +4881,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" @@ -5471,11 +5648,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": { @@ -5738,123 +5915,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", @@ -5891,15 +5951,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/public/logos/deepseek.png b/gui/public/logos/deepseek.png new file mode 100644 index 000000000..5b98a9078 Binary files /dev/null and b/gui/public/logos/deepseek.png differ 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/Layout.tsx b/gui/src/components/Layout.tsx index a8fb8de28..7e136df48 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,14 +12,16 @@ import { vscForeground, vscInputBackground, } from "."; +import { useWebviewListener } from "../hooks/useWebviewListener"; import { defaultModelSelector } from "../redux/selectors/modelSelectors"; import { setBottomMessage, setBottomMessageCloseTimeout, setShowDialog, } from "../redux/slices/uiStateSlice"; -import { RootStore } from "../redux/store"; +import { RootState } 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"; @@ -106,23 +107,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 @@ -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"); @@ -231,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) && ( { { // 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..5c70b19a6 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; @@ -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/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/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() { - - ) + , + ), ); dispatch(setDialogEntryOn(false)); dispatch(setShowDialog(true)); @@ -343,23 +324,19 @@ function GUI(props: GUIProps) { defaultModel, state, streamResponse, - ] + ], ); 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 => { @@ -372,7 +349,7 @@ function GUI(props: GUIProps) { } return !foundLaterUserInput; }, - [state.history] + [state.history], ); return ( @@ -451,14 +428,13 @@ function GUI(props: GUIProps) { })} -
- {active || ( - - )} + + {active ? ( <>
@@ -471,7 +447,7 @@ function GUI(props: GUIProps) { }} className="mr-auto" > - New Session ({getMetaKeyLabel()} {isJetBrains() ? "J" : "M"}) + New Session ({getMetaKeyLabel()} {isJetBrains() ? "J" : "L"}) ) : null}
diff --git a/gui/src/pages/help.tsx b/gui/src/pages/help.tsx index 0c8dfe845..11fb045d8 100644 --- a/gui/src/pages/help.tsx +++ b/gui/src/pages/help.tsx @@ -1,12 +1,16 @@ 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 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; @@ -14,8 +18,16 @@ const IconDiv = styled.div<{ backgroundColor?: string }>` 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}; @@ -39,7 +51,7 @@ function HelpPage() { const navigate = useNavigate(); return ( -
+
Help Center { - postToIde("showTutorial", {}); + postToIde("showTutorial", undefined); }} > Open tutorial
-
+

Resources

+ + Demo Video @@ -85,25 +100,29 @@ function HelpPage() { target="_blank" > + Documentation + Continue Discord @@ -112,16 +131,18 @@ function HelpPage() { target="_blank" > + GitHub Issues -
+
diff --git a/gui/src/pages/history.tsx b/gui/src/pages/history.tsx index 06b1f0f84..6110818ef 100644 --- a/gui/src/pages/history.tsx +++ b/gui/src/pages/history.tsx @@ -1,15 +1,40 @@ 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"; -import { useNavigationListener } from "../hooks/useNavigationListener"; + +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 { @@ -88,7 +113,9 @@ function TableRow({ navigate("/"); }} > -
{session.title}
+
+ {JSON.stringify(session.title).slice(1, -1)} +
{date.toLocaleString("en-US", { year: "2-digit", @@ -128,7 +155,7 @@ function lastPartOfPath(path: string): string { function History() { useNavigationListener(); const navigate = useNavigate(); - + const [sessions, setSessions] = useState([]); const [filteredAndSortedSessions, setFilteredAndSortedSessions] = useState< SessionInfo[] @@ -149,15 +176,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 +220,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); @@ -219,23 +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) => { diff --git a/gui/src/pages/modelconfig.tsx b/gui/src/pages/modelconfig.tsx index 8c53afd22..08a982c2b 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; @@ -40,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) => @@ -246,7 +244,7 @@ function ModelConfig() { ...formParams, provider: modelInfo.provider, }; - addModel(model); + postToIde("config/addModel", { model }); dispatch(setDefaultModel(model.title)); navigate("/"); }} @@ -264,7 +262,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..f2636dd39 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("config/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/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 d04bdda72..cbacbed03 100644 --- a/gui/src/redux/slices/configSlice.ts +++ b/gui/src/redux/slices/configSlice.ts @@ -1,36 +1,16 @@ -import { createSlice } from "@reduxjs/toolkit"; -import { RootStore } from "../store"; +import { PayloadAction, createSlice } from "@reduxjs/toolkit"; export const configSlice = createSlice({ name: "config", initialState: { - vscMachineId: window.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..978bd1d91 100644 --- a/gui/src/redux/slices/serverStateReducer.ts +++ b/gui/src/redux/slices/serverStateReducer.ts @@ -1,7 +1,10 @@ -import { createSlice } from "@reduxjs/toolkit"; -import TransformersJsEmbeddingsProvider from "core/indexing/embeddings/TransformersJsEmbeddingsProvider"; +import { PayloadAction, createSlice } from "@reduxjs/toolkit"; +import { + ContextProviderDescription, + ContinueConfig, + SlashCommandDescription, +} from "core"; import FreeTrial from "core/llm/llms/FreeTrial"; -import { RootStore } from "../store"; const TEST_SLASH_COMMANDS = [ { @@ -18,7 +21,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: [], @@ -27,8 +40,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, @@ -38,27 +50,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 b66cdcbaf..a51c85965 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, @@ -10,7 +11,6 @@ import { import { BrowserSerializedContinueConfig } from "core/config/load"; import { stripImages } from "core/llm/countTokens"; import { v4 } from "uuid"; -import { RootStore } from "../store"; const TEST_CONTEXT_ITEMS: ContextItemWithId[] = [ { @@ -82,7 +82,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, @@ -130,123 +140,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: "" }, @@ -267,13 +249,11 @@ export const stateSlice = createSlice({ state, { payload, - }: { - payload: { - message: ChatMessage; - index: number; - contextItems?: ContextItemWithId[]; - }; - } + }: PayloadAction<{ + message: ChatMessage; + index: number; + contextItems?: ContextItemWithId[]; + }> ) => { if (payload.index >= state.history.length) { state.history.push({ @@ -298,91 +278,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 }; @@ -445,7 +400,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); @@ -479,7 +434,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. diff --git a/gui/src/util/ide.ts b/gui/src/util/ide.ts index 2918c8b08..e445f6db8 100644 --- a/gui/src/util/ide.ts +++ b/gui/src/util/ide.ts @@ -1,39 +1,61 @@ +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.postIntellijMessage === undefined) { console.log( "Unable to send message: postIntellijMessage is undefined. ", - type, + messageType, data ); throw new Error("postIntellijMessage is undefined"); } - window.postIntellijMessage?.(type, data); + messageId = messageId ?? uuidv4(); + window.postIntellijMessage?.(messageType, data, messageId); 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], + messageId?: string, + attempt: number = 0 +) { try { - _postToIde(type, data); + _postToIde(messageType, data, messageId); } catch (error) { if (attempt < 5) { console.log(`Attempt ${attempt} failed. Retrying...`); setTimeout( - () => postToIde(type, data, attempt + 1), + () => postToIde(messageType, data, messageId, attempt + 1), Math.pow(2, attempt) * 1000 ); } else { @@ -42,44 +64,113 @@ 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); +} + +function safeParseResponse(data: any) { + let responseData = data ?? null; + try { + responseData = JSON.parse(responseData); + } catch {} + return responseData; +} + +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(safeParseResponse(event.data.data)); } }; window.addEventListener("message", handler); - postToIde(type, data); + + postToIde(messageType, data, messageId); + }) as any; +} + +export async function* ideStreamRequest( + messageType: T, + data: WebviewProtocol[T][0], + cancelToken?: AbortSignal +): WebviewProtocol[T][1] { + const messageId = uuidv4(); + + postToIde(messageType, data, messageId); + + let buffer = ""; + let index = 0; + let done = false; + let returnVal = undefined; + + const handler = (event: { data: Message }) => { + if (event.data.messageId === messageId) { + const responseData = safeParseResponse(event.data.data); + if (responseData.done) { + window.removeEventListener("message", handler); + done = true; + returnVal = responseData; + } else { + buffer += responseData.content; + } + } + }; + window.addEventListener("message", handler); + + cancelToken?.addEventListener("abort", () => { + postToIde("abort", undefined, 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 withProgress(title: string, fn: () => Promise) { - postToIde("withProgress", { title, done: false }); - return fn().finally(() => { - postToIde("withProgress", { title, done: true }); - }); -} +export async function* llmStreamChat( + modelTitle: string, + cancelToken: AbortSignal | undefined, + messages: ChatMessage[], + options: LLMFullCompletionOptions = {} +): AsyncGenerator { + const gen = ideStreamRequest( + "llm/streamChat", + { + messages, + title: modelTitle, + completionOptions: options, + }, + cancelToken + ); -export function errorPopup(message: string) { - postToIde("errorPopup", { message }); -} - -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 }); -} - -export function addOpenAIKey(key: string) { - postToIde("addOpenAIKey", { key }); + 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 appendText(text: string) { 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: { diff --git a/gui/src/util/webviewIde.ts b/gui/src/util/webviewIde.ts new file mode 100644 index 000000000..236555b4a --- /dev/null +++ b/gui/src/util/webviewIde.ts @@ -0,0 +1,15 @@ +import { MessageIde } from "core/util/messageIde"; +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 extends MessageIde { + constructor() { + super(r); + } +} 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": {} +} 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 index c5e82d745..d748f39f1 100644 --- a/pkg/.gitignore +++ b/pkg/.gitignore @@ -1 +1,4 @@ -bin \ No newline at end of file +node_modules +bin +data +out diff --git a/pkg/README.md b/pkg/README.md new file mode 100644 index 000000000..bc0716b7d --- /dev/null +++ b/pkg/README.md @@ -0,0 +1,28 @@ +# Continue Core Binary + +The purpose of this folder is to package Typescript code in a way that can be run from any IDE or platform. We first bundle with `esbuild` and then package into binaries with `pkg`. + +The `pkgJson/package.json` contains instructions for building with pkg, and needs to be in a separte folder because there is no CLI flag for the assets option (it must be in a package.json), and pkg doesn't recognize any name other than package.json, but if we use the same package.json with dependencies in it, pkg will automatically include these, significantly increasing the binary size. + +The build process is otherwise defined entirely in `build.js`. + +### List of native modules + +- sqlite3/build/Release/node_sqlite3.node (\*) +- @lancedb/\*\* +- esbuild? +- @esbuild? +- onnxruntime-node? + +### List of dynamically imported modules + +- posthog-node +- @octokit/rest +- esbuild + +### List of .wasm files + +- tree-sitter.wasm +- tree-sitter-wasms/ + +(\*) = need to download for each platform manually diff --git a/pkg/build.js b/pkg/build.js new file mode 100644 index 000000000..623df780d --- /dev/null +++ b/pkg/build.js @@ -0,0 +1,157 @@ +const esbuild = require("esbuild"); +const { execSync } = require("child_process"); +const fs = require("fs"); +const ncp = require("ncp").ncp; + +const esbuildOutputFile = "out/index.js"; +const platforms = ["darwin", "linux", "win32"]; +const architectures = ["x64", "arm64"]; +let targets = platforms.flatMap((platform) => + architectures.map((arch) => `${platform}-${arch}`) +); + +let esbuildOnly = false; +for (let i = 2; i < process.argv.length; i++) { + if (process.argv[i] === "--esbuild-only") { + esbuildOnly = true; + } + if (process.argv[i - 1] === "--target") { + targets = [process.argv[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`); + + // Copy node_modules for pre-built binaries + const DYNAMIC_IMPORTS = [ + // "esbuild", + // "@esbuild", + // // "@lancedb", + // "posthog-node", + // "@octokit", + ]; + fs.mkdirSync("out/node_modules", { recursive: true }); + fs.mkdirSync("bin/node_modules", { recursive: true }); + + await Promise.all( + DYNAMIC_IMPORTS.map( + (mod) => + new Promise((resolve, reject) => { + ncp( + `node_modules/${mod}`, + `out/node_modules/${mod}`, + function (error) { + if (error) { + console.error(`[error] Error copying ${mod}`, error); + reject(error); + } else { + resolve(); + } + } + ); + ncp( + `node_modules/${mod}`, + `bin/node_modules/${mod}`, + function (error) { + if (error) { + console.error(`[error] Error copying ${mod}`, error); + reject(error); + } else { + resolve(); + } + } + ); + }) + ) + ); + 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({ + entryPoints: ["src/index.ts"], + bundle: true, + outfile: esbuildOutputFile, + external: ["esbuild", ...DYNAMIC_IMPORTS], + 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" }, + }); + + if (esbuildOnly) { + return; + } + + 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 ${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 ${targetDir}/build.tar.gz ${downloadUrl}`); + execSync(`cd ${targetDir} && tar -xvzf build.tar.gz`); + fs.copyFileSync( + `${targetDir}/build/Release/node_sqlite3.node`, + `${targetDir}/node_sqlite3.node` + ); + 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` + // ); + 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..d0b5376ea --- /dev/null +++ b/pkg/package-lock.json @@ -0,0 +1,2675 @@ +{ + "name": "pkg", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "pkg", + "version": "1.0.0", + "license": "Apache-2.0", + "dependencies": { + "@octokit/rest": "^20.0.2", + "commander": "^12.0.0", + "core": "file:../core", + "follow-redirects": "^1.15.5", + "ncp": "^2.0.0", + "posthog-node": "^3.6.3", + "uuid": "^9.0.1", + "vectordb": "^0.4.10" + }, + "bin": { + "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", + "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/@octokit/auth-token": { + "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==", + "engines": { + "node": ">= 18" + } + }, + "node_modules/@octokit/core": { + "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" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/@octokit/endpoint": { + "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" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/@octokit/graphql": { + "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" + }, + "engines": { + "node": ">= 18" + } + }, + "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==" + }, + "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==", + "dependencies": { + "@octokit/types": "^12.4.0" + }, + "engines": { + "node": ">= 18" + }, + "peerDependencies": { + "@octokit/core": ">=5" + } + }, + "node_modules/@octokit/plugin-request-log": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@octokit/plugin-request-log/-/plugin-request-log-4.0.0.tgz", + "integrity": "sha512-2uJI1COtYCq8Z4yNSnM231TgH50bRkheQ9+aH8TnZanB6QilOnx8RMD2qsnamSOXtDj0ilxvevf5fGsBhBBzKA==", + "engines": { + "node": ">= 18" + }, + "peerDependencies": { + "@octokit/core": ">=5" + } + }, + "node_modules/@octokit/plugin-rest-endpoint-methods": { + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-10.3.0.tgz", + "integrity": "sha512-c/fjpoHispRvBZuRoTVt/uALg7pXa9RQbXWJiDMk6NDkGNomuAZG7YuYYpZoxeoXv+kVRjIDTsO0e1z0pei+PQ==", + "dependencies": { + "@octokit/types": "^12.4.0" + }, + "engines": { + "node": ">= 18" + }, + "peerDependencies": { + "@octokit/core": ">=5" + } + }, + "node_modules/@octokit/request": { + "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", + "@octokit/types": "^12.0.0", + "universal-user-agent": "^6.0.0" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/@octokit/request-error": { + "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" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/@octokit/rest": { + "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" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/@octokit/types": { + "version": "12.5.0", + "resolved": "https://registry.npmjs.org/@octokit/types/-/types-12.5.0.tgz", + "integrity": "sha512-YJEKcb0KkJlIUNU/zjnZwHEP8AoVh/OoIcP/1IyR4UHxExz7fzpe/a8IG4wBtQi7QDEqiomVLX88S6FpxxAJtg==", + "dependencies": { + "@octokit/openapi-types": "^19.1.0" + } + }, + "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/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", + "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/before-after-hook": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.3.tgz", + "integrity": "sha512-NzUnlZexiaH/46WDhANlyR2bXRopNg4F/zuSA3OpZnllCUgRaOF2znDioDWrmbNVsuZk6l9pMquQB38cfBZwkQ==" + }, + "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/deprecation": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/deprecation/-/deprecation-2.3.1.tgz", + "integrity": "sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ==" + }, + "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/ncp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ncp/-/ncp-2.0.0.tgz", + "integrity": "sha512-zIdGUrPRFTUELUvr3Gmc7KZ2Sw/h1PiVM0Af/oHB6zgnV1ikqSfRk+TOufi79aHYCW3NiOXmr1BP5nWbzojLaA==", + "bin": { + "ncp": "bin/ncp" + } + }, + "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==", + "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/posthog-node": { + "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" + }, + "engines": { + "node": ">=15.0.0" + } + }, + "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/rusha": { + "version": "0.8.14", + "resolved": "https://registry.npmjs.org/rusha/-/rusha-0.8.14.tgz", + "integrity": "sha512-cLgakCUf6PedEu15t8kbsjnwIFFR2D4RfL+W3iWFJ4iac7z4B0ZI8fxy4R3J956kAI68HclCFGL8MPoUVC3qVA==" + }, + "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/universal-user-agent": { + "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==" + }, + "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==" + }, + "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..0429c35a7 --- /dev/null +++ b/pkg/package.json @@ -0,0 +1,49 @@ +{ + "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/**/*", + "out/tree-sitter.wasm", + "out/tree-sitter-wasms/*" + ], + "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", + "esbuild": "node build.js --esbuild-only" + }, + "author": "", + "license": "Apache-2.0", + "devDependencies": { + "@types/follow-redirects": "^1.14.4", + "@types/uuid": "^9.0.8", + "@vercel/ncc": "^0.38.1", + "esbuild": "^0.19.11", + "pkg": "^5.8.1", + "typescript": "^5.3.3" + }, + "dependencies": { + "@octokit/rest": "^20.0.2", + "commander": "^12.0.0", + "core": "file:../core", + "follow-redirects": "^1.15.5", + "ncp": "^2.0.0", + "posthog-node": "^3.6.3", + "uuid": "^9.0.1", + "vectordb": "^0.4.10" + } +} diff --git a/pkg/pkgJson/darwin-arm64/package.json b/pkg/pkgJson/darwin-arm64/package.json new file mode 100644 index 000000000..3ac12e67a --- /dev/null +++ b/pkg/pkgJson/darwin-arm64/package.json @@ -0,0 +1,23 @@ +{ + "name": "pkg", + "version": "1.0.0", + "description": "", + "bin": "../../out/index.js", + "pkg": { + "scripts": [ + "node_modules/axios/**/*" + ], + "assets": [ + "../../../core/node_modules/sqlite3/**/*", + "../../node_modules/@lancedb/vectordb-darwin-arm64/index.node", + "../../out/tree-sitter.wasm", + "../../out/tree-sitter-wasms/*" + ], + "targets": [ + "node18-macos-arm64" + ], + "outputPath": "bin" + }, + "author": "", + "license": "Apache-2.0" +} diff --git a/pkg/pkgJson/darwin-x64/package.json b/pkg/pkgJson/darwin-x64/package.json new file mode 100644 index 000000000..d064d6c2a --- /dev/null +++ b/pkg/pkgJson/darwin-x64/package.json @@ -0,0 +1,23 @@ +{ + "name": "pkg", + "version": "1.0.0", + "description": "", + "bin": "../../out/index.js", + "pkg": { + "scripts": [ + "node_modules/axios/**/*" + ], + "assets": [ + "../../../core/node_modules/sqlite3/**/*", + "../../node_modules/@lancedb/vectordb-darwin-x64/index.node", + "../../out/tree-sitter.wasm", + "../../out/tree-sitter-wasms/*" + ], + "targets": [ + "node18-macos-x64" + ], + "outputPath": "bin" + }, + "author": "", + "license": "Apache-2.0" +} diff --git a/pkg/pkgJson/linux-arm64/package.json b/pkg/pkgJson/linux-arm64/package.json new file mode 100644 index 000000000..37a3a5b6d --- /dev/null +++ b/pkg/pkgJson/linux-arm64/package.json @@ -0,0 +1,23 @@ +{ + "name": "pkg", + "version": "1.0.0", + "description": "", + "bin": "../../out/index.js", + "pkg": { + "scripts": [ + "node_modules/axios/**/*" + ], + "assets": [ + "../../../core/node_modules/sqlite3/**/*", + "../../node_modules/@lancedb/vectordb-linux-arm64-gnu/index.node", + "../../out/tree-sitter.wasm", + "../../out/tree-sitter-wasms/*" + ], + "targets": [ + "node18-linux-arm64" + ], + "outputPath": "bin" + }, + "author": "", + "license": "Apache-2.0" +} diff --git a/pkg/pkgJson/linux-x64/package.json b/pkg/pkgJson/linux-x64/package.json new file mode 100644 index 000000000..487886d26 --- /dev/null +++ b/pkg/pkgJson/linux-x64/package.json @@ -0,0 +1,23 @@ +{ + "name": "pkg", + "version": "1.0.0", + "description": "", + "bin": "../../out/index.js", + "pkg": { + "scripts": [ + "node_modules/axios/**/*" + ], + "assets": [ + "../../../core/node_modules/sqlite3/**/*", + "../../node_modules/@lancedb/vectordb-linux-x64-gnu/index.node", + "../../out/tree-sitter.wasm", + "../../out/tree-sitter-wasms/*" + ], + "targets": [ + "node18-linux-x64" + ], + "outputPath": "bin" + }, + "author": "", + "license": "Apache-2.0" +} diff --git a/pkg/pkgJson/win32-arm64/package.json b/pkg/pkgJson/win32-arm64/package.json new file mode 100644 index 000000000..4573ccbca --- /dev/null +++ b/pkg/pkgJson/win32-arm64/package.json @@ -0,0 +1,23 @@ +{ + "name": "pkg", + "version": "1.0.0", + "description": "", + "bin": "../../out/index.js", + "pkg": { + "scripts": [ + "node_modules/axios/**/*" + ], + "assets": [ + "../../../core/node_modules/sqlite3/**/*", + "../../node_modules/@lancedb/vectordb-win32-x64-msvc/index.node", + "../../out/tree-sitter.wasm", + "../../out/tree-sitter-wasms/*" + ], + "targets": [ + "node18-win-arm64" + ], + "outputPath": "bin" + }, + "author": "", + "license": "Apache-2.0" +} diff --git a/pkg/pkgJson/win32-x64/package.json b/pkg/pkgJson/win32-x64/package.json new file mode 100644 index 000000000..c9a4b1a9b --- /dev/null +++ b/pkg/pkgJson/win32-x64/package.json @@ -0,0 +1,23 @@ +{ + "name": "pkg", + "version": "1.0.0", + "description": "", + "bin": "../../out/index.js", + "pkg": { + "scripts": [ + "node_modules/axios/**/*" + ], + "assets": [ + "../../../core/node_modules/sqlite3/**/*", + "../../node_modules/@lancedb/vectordb-win32-x64-msvc/index.node", + "../../out/tree-sitter.wasm", + "../../out/tree-sitter-wasms/*" + ], + "targets": [ + "node18-win-x64" + ], + "outputPath": "bin" + }, + "author": "", + "license": "Apache-2.0" +} diff --git a/pkg/src/IpcIde.ts b/pkg/src/IpcIde.ts new file mode 100644 index 000000000..5343a2430 --- /dev/null +++ b/pkg/src/IpcIde.ts @@ -0,0 +1,8 @@ +import { MessageIde } from "core/util/messageIde"; +import { IpcMessenger } from "./messenger"; + +export class IpcIde extends MessageIde { + constructor(messenger: IpcMessenger) { + super(messenger.request.bind(messenger)); + } +} diff --git a/pkg/src/core.ts b/pkg/src/core.ts new file mode 100644 index 000000000..4244e09a9 --- /dev/null +++ b/pkg/src/core.ts @@ -0,0 +1,253 @@ +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 { Message } from "core/util/messenger"; +import { v4 as uuidv4 } from "uuid"; +import { IpcMessenger } from "./messenger"; +import { Protocol } from "./protocol"; + +export class Core { + private messenger: IpcMessenger; + private readonly ide: IDE; + private readonly configHandler: ConfigHandler; + private readonly codebaseIndexer: CodebaseIndexer; + + private abortedMessageIds: Set = new Set(); + + private selectedModelTitle: string | undefined; + + private async config() { + return this.configHandler.loadConfig(); + } + + private async getSelectedModel() { + return await this.configHandler.llmFromTitle(this.selectedModelTitle); + } + + 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.bind(this.messenger); + + // New + on("update/modelChange", (msg) => { + this.selectedModelTitle = msg.data; + }); + + // Special + on("abort", (msg) => { + this.abortedMessageIds.add(msg.messageId); + }); + + on("ping", (msg) => { + if (msg.data !== "ping") { + throw new Error("ping message incorrect"); + } + return "pong"; + }); + + // History + on("history/list", (msg) => { + return historyManager.list(); + }); + 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) => { + this.configHandler.reloadConfig(); + return this.configHandler.getSerializedConfig(); + }); + + // 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.map((item) => ({ + ...item, + id, + })); + }); + + on("config/getBrowserSerialized", (msg) => { + return this.configHandler.getSerializedConfig(); + }); + + async function* llmStreamChat( + configHandler: ConfigHandler, + abortedMessageIds: Set, + msg: Message + ) { + const model = await configHandler.llmFromTitle(msg.data.title); + const gen = model.streamChat( + msg.data.messages, + msg.data.completionOptions + ); + let next = await gen.next(); + while (!next.done) { + if (abortedMessageIds.has(msg.messageId)) { + 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 }; + } + + on("llm/streamChat", (msg) => + llmStreamChat(this.configHandler, this.abortedMessageIds, msg) + ); + + async function* llmStreamComplete( + configHandler: ConfigHandler, + abortedMessageIds: Set, + + msg: Message + ) { + const model = await configHandler.llmFromTitle(msg.data.title); + const gen = model.streamComplete( + msg.data.prompt, + msg.data.completionOptions + ); + let next = await gen.next(); + while (!next.done) { + if (abortedMessageIds.has(msg.messageId)) { + 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 }; + } + + on("llm/streamComplete", (msg) => + llmStreamComplete(this.configHandler, this.abortedMessageIds, msg) + ); + + async function* runNodeJsSlashCommand( + configHandler: ConfigHandler, + abortedMessageIds: Set, + msg: Message + ) { + const { + input, + history, + modelTitle, + slashCommandName, + contextItems, + params, + historyIndex, + selectedCode, + } = msg.data; + + const config = await configHandler.loadConfig(); + const llm = await 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) => { + // TODO + // protocol.request("addContextItem", { + // item, + // historyIndex, + // }); + }, + selectedCode, + config, + })) { + if (content) { + yield { content }; + } + } + yield { done: true, content: "" }; + } + on("command/run", (msg) => + runNodeJsSlashCommand(this.configHandler, this.abortedMessageIds, msg) + ); + } + + public invoke( + method: keyof Protocol, + data: Protocol[T][0] + ): Protocol[T][1] { + const response = this.messenger.invoke(method, data); + return response; + } +} diff --git a/pkg/src/index.ts b/pkg/src/index.ts new file mode 100644 index 000000000..4f6c8448e --- /dev/null +++ b/pkg/src/index.ts @@ -0,0 +1,35 @@ +process.env.IS_BINARY = "true"; +import { Command } from "commander"; +import { getCoreLogsPath } from "core/util/paths"; +import fs from "fs"; +import { IpcIde } from "./IpcIde"; +import { Core } from "./core"; +import { IpcMessenger } from "./messenger"; + +const logFilePath = getCoreLogsPath(); +fs.appendFileSync(logFilePath, "[info] Starting Continue core...\n"); + +const program = new Command(); + +program.action(() => { + try { + const messenger = new IpcMessenger(); + 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); + process.exit(1); + } +}); + +program.parse(process.argv); diff --git a/pkg/src/messenger.ts b/pkg/src/messenger.ts new file mode 100644 index 000000000..bb98ce579 --- /dev/null +++ b/pkg/src/messenger.ts @@ -0,0 +1,129 @@ +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"; + +export class IpcMessenger { + typeListeners = new Map any)[]>(); + idListeners = new Map any>(); + + constructor() { + 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) => { + 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); + }); + } + + mock(data: any) { + const d = JSON.stringify(data); + this._handleData(Buffer.from(d)); + } + + private _handleLine(line: string) { + try { + const msg: Message = JSON.parse(line); + if (msg.messageType === undefined || msg.messageId === undefined) { + throw new Error("Invalid message sent: " + JSON.stringify(msg)); + } + + // Call handler and respond with return value + const listeners = this.typeListeners.get(msg.messageType as any); + listeners?.forEach(async (handler) => { + try { + const response = await handler(msg); + if ( + response && + typeof response[Symbol.asyncIterator] === "function" + ) { + for await (const update of response) { + this.send(msg.messageType, update, msg.messageId); + } + this.send(msg.messageType, { done: true }, msg.messageId); + } else { + this.send(msg.messageType, response || {}, msg.messageId); + } + } catch (e) { + console.warn(`Error running handler for "${msg.messageType}": `, e); + } + }); + + // Call handler which is waiting for the response, nothing to return + this.idListeners.get(msg.messageId)?.(msg); + } catch (e) { + console.error("Error parsing line: ", line, e); + return; + } + } + + private _handleData(data: Buffer) { + const d = data.toString(); + const lines = d.split("\n").filter((line) => line.trim() !== ""); + lines.forEach((line) => this._handleLine(line)); + } + + send(messageType: string, message: any, messageId?: string): string { + messageId = messageId ?? uuidv4(); + const data: Message = { + messageType, + data: message, + messageId, + }; + // process.send?.(data); + process.stdout?.write(JSON.stringify(data) + "\r\n"); + return messageId; + } + + on( + messageType: T, + handler: (message: Message) => Protocol[T][1] + ): void { + if (!this.typeListeners.has(messageType)) { + this.typeListeners.set(messageType, []); + } + this.typeListeners.get(messageType)?.push(handler); + } + + invoke( + messageType: T, + data: Protocol[T][0] + ): Protocol[T][1] { + 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/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/**/*"] +}