diff --git a/.changes/extensions/vscode/0.8.58.md b/.changes/extensions/vscode/0.8.58.md new file mode 100644 index 000000000..98c845b97 --- /dev/null +++ b/.changes/extensions/vscode/0.8.58.md @@ -0,0 +1,25 @@ +## 0.8.58 - 2024-11-22 +### Added +* OpenAI predicted outputs support +* Improve codebase retrieval with BM25 +* Support for Grok from xAI +* Chat enhancements including sticking input to bottom +* New UI for cmd+I in sidebar +* Support for Nebius LLM provider +* Support for Ask Sage LLM provider +* Improved reference for config.json +* New @web context provider +* Updates for llama3.2 +* .continuerules file to set system prompt +* .prompt files v2 +* Dedicated UI for docs indexing +* Clickable code symbols in chat +* Use clipboard content as autocomplete context +### Changed +* Improved @docs crawler +* Many improvements to make autocomplete more eager +* Near complete type definition retrieval for TypeScript autocomplete +* Remove footer from chat sidebar +### Fixed +* Brought back the Apply button for all code blocks +* Automatically update codebase index on removed files diff --git a/.changes/extensions/vscode/0.8.59.md b/.changes/extensions/vscode/0.8.59.md new file mode 100644 index 000000000..9f6dfbd04 --- /dev/null +++ b/.changes/extensions/vscode/0.8.59.md @@ -0,0 +1,3 @@ +## 0.8.59 - 2024-11-25 +### Fixed +* Hotfix for Ollama onboarding diff --git a/.changes/unreleased/Added-20241108-113942.yaml b/.changes/unreleased/Added-20241108-113942.yaml deleted file mode 100644 index 987643345..000000000 --- a/.changes/unreleased/Added-20241108-113942.yaml +++ /dev/null @@ -1,4 +0,0 @@ -project: extensions/vscode -kind: Added -body: OpenAI predicted outputs support -time: 2024-11-08T11:39:42.277047-08:00 diff --git a/.changes/unreleased/Added-20241108-114100.yaml b/.changes/unreleased/Added-20241108-114100.yaml deleted file mode 100644 index af7cb5444..000000000 --- a/.changes/unreleased/Added-20241108-114100.yaml +++ /dev/null @@ -1,4 +0,0 @@ -project: extensions/vscode -kind: Added -body: Improve codebase retrieval with BM25 -time: 2024-11-08T11:41:00.002716-08:00 diff --git a/.changes/unreleased/Added-20241108-114423.yaml b/.changes/unreleased/Added-20241108-114423.yaml deleted file mode 100644 index fc3a6eaf7..000000000 --- a/.changes/unreleased/Added-20241108-114423.yaml +++ /dev/null @@ -1,4 +0,0 @@ -project: extensions/vscode -kind: Added -body: Support for Grok from xAI -time: 2024-11-08T11:44:23.761084-08:00 diff --git a/.changes/unreleased/Added-20241108-114437.yaml b/.changes/unreleased/Added-20241108-114437.yaml deleted file mode 100644 index fab18b954..000000000 --- a/.changes/unreleased/Added-20241108-114437.yaml +++ /dev/null @@ -1,4 +0,0 @@ -project: extensions/vscode -kind: Added -body: Chat enhancements including sticking input to bottom -time: 2024-11-08T11:44:37.408176-08:00 diff --git a/.changes/unreleased/Added-20241108-114450.yaml b/.changes/unreleased/Added-20241108-114450.yaml deleted file mode 100644 index 14644f3e9..000000000 --- a/.changes/unreleased/Added-20241108-114450.yaml +++ /dev/null @@ -1,4 +0,0 @@ -project: extensions/vscode -kind: Added -body: New UI for cmd+I in sidebar -time: 2024-11-08T11:44:50.682952-08:00 diff --git a/.changes/unreleased/Added-20241108-114612.yaml b/.changes/unreleased/Added-20241108-114612.yaml deleted file mode 100644 index 68d8b27d1..000000000 --- a/.changes/unreleased/Added-20241108-114612.yaml +++ /dev/null @@ -1,4 +0,0 @@ -project: extensions/vscode -kind: Added -body: Support for Nebius LLM provider -time: 2024-11-08T11:46:12.94828-08:00 diff --git a/.changes/unreleased/Added-20241108-114622.yaml b/.changes/unreleased/Added-20241108-114622.yaml deleted file mode 100644 index e91ddb398..000000000 --- a/.changes/unreleased/Added-20241108-114622.yaml +++ /dev/null @@ -1,4 +0,0 @@ -project: extensions/vscode -kind: Added -body: Support for Ask Sage LLM provider -time: 2024-11-08T11:46:22.626907-08:00 diff --git a/.changes/unreleased/Added-20241108-114649.yaml b/.changes/unreleased/Added-20241108-114649.yaml deleted file mode 100644 index 0e7a0c9d0..000000000 --- a/.changes/unreleased/Added-20241108-114649.yaml +++ /dev/null @@ -1,4 +0,0 @@ -project: extensions/vscode -kind: Added -body: Improved reference for config.json -time: 2024-11-08T11:46:49.648545-08:00 diff --git a/.changes/unreleased/Added-20241108-114753.yaml b/.changes/unreleased/Added-20241108-114753.yaml deleted file mode 100644 index 8cb7f1805..000000000 --- a/.changes/unreleased/Added-20241108-114753.yaml +++ /dev/null @@ -1,4 +0,0 @@ -project: extensions/vscode -kind: Added -body: New @web context provider -time: 2024-11-08T11:47:53.447346-08:00 diff --git a/.changes/unreleased/Added-20241108-114813.yaml b/.changes/unreleased/Added-20241108-114813.yaml deleted file mode 100644 index cd5ba1067..000000000 --- a/.changes/unreleased/Added-20241108-114813.yaml +++ /dev/null @@ -1,4 +0,0 @@ -project: extensions/vscode -kind: Added -body: Updates for llama3.2 -time: 2024-11-08T11:48:13.830692-08:00 diff --git a/.changes/unreleased/Added-20241113-165958.yaml b/.changes/unreleased/Added-20241113-165958.yaml deleted file mode 100644 index 95aaa7c70..000000000 --- a/.changes/unreleased/Added-20241113-165958.yaml +++ /dev/null @@ -1,4 +0,0 @@ -project: extensions/vscode -kind: Added -body: .continuerules file to set system prompt -time: 2024-11-13T16:59:58.544875-08:00 diff --git a/.changes/unreleased/Added-20241113-170006.yaml b/.changes/unreleased/Added-20241113-170006.yaml deleted file mode 100644 index bc254f8d9..000000000 --- a/.changes/unreleased/Added-20241113-170006.yaml +++ /dev/null @@ -1,4 +0,0 @@ -project: extensions/vscode -kind: Added -body: .prompt files v2 -time: 2024-11-13T17:00:06.855468-08:00 diff --git a/.changes/unreleased/Changed-20241108-114549.yaml b/.changes/unreleased/Changed-20241108-114549.yaml deleted file mode 100644 index d340736b6..000000000 --- a/.changes/unreleased/Changed-20241108-114549.yaml +++ /dev/null @@ -1,4 +0,0 @@ -project: extensions/vscode -kind: Changed -body: Improved @docs crawler -time: 2024-11-08T11:45:49.381554-08:00 diff --git a/.changes/unreleased/Changed-20241108-114850.yaml b/.changes/unreleased/Changed-20241108-114850.yaml deleted file mode 100644 index ab6c2a037..000000000 --- a/.changes/unreleased/Changed-20241108-114850.yaml +++ /dev/null @@ -1,4 +0,0 @@ -project: extensions/vscode -kind: Changed -body: Many improvements to make autocomplete more eager -time: 2024-11-08T11:48:50.486502-08:00 diff --git a/.changes/unreleased/Fixed-20241108-114905.yaml b/.changes/unreleased/Fixed-20241108-114905.yaml deleted file mode 100644 index eb590eeb4..000000000 --- a/.changes/unreleased/Fixed-20241108-114905.yaml +++ /dev/null @@ -1,4 +0,0 @@ -project: extensions/vscode -kind: Fixed -body: Brought back the Apply button for all code blocks -time: 2024-11-08T11:49:05.021499-08:00 diff --git a/core/autocomplete/filtering/streamTransforms/StreamTransformPipeline.ts b/core/autocomplete/filtering/streamTransforms/StreamTransformPipeline.ts index 6097ff797..da178cb66 100644 --- a/core/autocomplete/filtering/streamTransforms/StreamTransformPipeline.ts +++ b/core/autocomplete/filtering/streamTransforms/StreamTransformPipeline.ts @@ -2,7 +2,7 @@ import { streamLines } from "../../../diff/util"; import { DEFAULT_AUTOCOMPLETE_OPTS } from "../../../util/parameters"; import { HelperVars } from "../../util/HelperVars"; -import { stopAtStopTokens } from "./charStream"; +import { stopAtStartOf, stopAtStopTokens } from "./charStream"; import { avoidEmptyComments, avoidPathLine, @@ -28,6 +28,7 @@ export class StreamTransformPipeline { let charGenerator = generator; charGenerator = stopAtStopTokens(generator, stopTokens); + charGenerator = stopAtStartOf(charGenerator, suffix); for (const charFilter of helper.lang.charFilters ?? []) { charGenerator = charFilter({ chars: charGenerator, diff --git a/core/autocomplete/filtering/streamTransforms/charStream.test.ts b/core/autocomplete/filtering/streamTransforms/charStream.test.ts index b466ae3cd..d82d9dbac 100644 --- a/core/autocomplete/filtering/streamTransforms/charStream.test.ts +++ b/core/autocomplete/filtering/streamTransforms/charStream.test.ts @@ -1,12 +1,20 @@ -import { stopAtStopTokens } from "./charStream"; +import { stopAtStartOf, stopAtStopTokens } from "./charStream"; + +async function* createMockStream(chunks: string[]): AsyncGenerator { + for (const chunk of chunks) { + yield chunk; + } +} + +async function streamToString(stream: AsyncGenerator): Promise { + let result = ""; + for await (const chunk of stream) { + result += chunk; + } + return result; +} describe("stopAtStopTokens", () => { - async function* createMockStream(chunks: string[]): AsyncGenerator { - for (const chunk of chunks) { - yield chunk; - } - } - it("should yield characters until a stop token is encountered", async () => { const mockStream = createMockStream(["Hello", " world", "! Stop", "here"]); const stopTokens = ["Stop"]; @@ -30,12 +38,7 @@ describe("stopAtStopTokens", () => { const stopTokens = ["END", "STOP", "HALT"]; const result = stopAtStopTokens(mockStream, stopTokens); - const output = []; - for await (const char of result) { - output.push(char); - } - - expect(output.join("")).toBe("This is a test. "); + expect(await streamToString(result)).toBe("This is a test. "); }); it("should handle stop tokens split across chunks", async () => { @@ -67,12 +70,7 @@ describe("stopAtStopTokens", () => { const stopTokens = ["END"]; const result = stopAtStopTokens(mockStream, stopTokens); - const output = []; - for await (const char of result) { - output.push(char); - } - - expect(output.join("")).toBe("This is a complete stream"); + expect(await streamToString(result)).toBe("This is a complete stream"); }); it("should handle empty chunks", async () => { @@ -80,12 +78,7 @@ describe("stopAtStopTokens", () => { const stopTokens = ["STOP"]; const result = stopAtStopTokens(mockStream, stopTokens); - const output = []; - for await (const char of result) { - output.push(char); - } - - expect(output.join("")).toBe("Hello world! "); + expect(await streamToString(result)).toBe("Hello world! "); }); it("should handle stop token at the beginning of the stream", async () => { @@ -106,12 +99,7 @@ describe("stopAtStopTokens", () => { const stopTokens = ["STOP"]; const result = stopAtStopTokens(mockStream, stopTokens); - const output = []; - for await (const char of result) { - output.push(char); - } - - expect(output.join("")).toBe("Hello world"); + expect(await streamToString(result)).toBe("Hello world"); }); it("should handle multiple stop tokens of different lengths", async () => { @@ -124,12 +112,7 @@ describe("stopAtStopTokens", () => { const stopTokens = ["STOP", "END", "HALT"]; const result = stopAtStopTokens(mockStream, stopTokens); - const output = []; - for await (const char of result) { - output.push(char); - } - - expect(output.join("")).toBe("This is a test with multiple "); + expect(await streamToString(result)).toBe("This is a test with multiple "); }); it("should handle an empty stream", async () => { @@ -137,12 +120,7 @@ describe("stopAtStopTokens", () => { const stopTokens = ["STOP"]; const result = stopAtStopTokens(mockStream, stopTokens); - const output = []; - for await (const char of result) { - output.push(char); - } - - expect(output.join("")).toBe(""); + expect(await streamToString(result)).toBe(""); }); it("should handle an empty stop tokens array", async () => { @@ -166,11 +144,73 @@ describe("stopAtStopTokens", () => { ]; const result = stopAtStopTokens(mockStream, stopTokens); - const output = []; - for await (const char of result) { - output.push(char); - } - - expect(output.join("")).toBe("Hello world!"); + expect(await streamToString(result)).toBe("Hello world!"); + }); +}); + +describe("stopAtStartOf", () => { + const sampleCode = ` { + method: "GET", + headers: { + "Content-Type": "application/json", + Authorization: \`Bearer \${this.workOsAccessToken}\`, + }, + }, + ); + const data = await response.json(); + return data.items; + } + + async getContextItems( + query: string, + extras: ContextProviderExtras, + ): Promise { + const response = await extras.fetch( + new URL( + \`/proxy/context/\${this.options.id}/retrieve\`, + controlPlaneEnv.CONTROL_PLANE_URL, + ), +`; + /* Some LLMs, such as Codestral, repeat the suffix of the query. To test our filtering, we cut the sample code at random positions, remove a part of the input +and construct a response, containing the removed part and the suffix. The goal of the stopAtStartOf() method is to detect the start of the suffix in the response */ + it("should stop if the start of the suffix is reached", async () => { + const removeLength = 10; + for (let i = 0; i < sampleCode.length - removeLength - 20; i++) { + const removed = sampleCode.slice(i, i + removeLength); + const suffix = sampleCode.slice(i + removeLength); + const response = removed + suffix; + + // split the response but keep spaces + const mockStream = createMockStream(response.split(/(?! )/g)); + const result = stopAtStartOf(mockStream, suffix); + + const resultStr = await streamToString(result); + if (resultStr !== removed) { + throw new Error( + `i=${i} result:\n${resultStr}\n\nremoved:\n${removed}\n\nsuffix:\n${suffix}`, + ); + } + } + }); + it("should stop if the start of the suffix is reached, even if the suffix has a prefix", async () => { + const removeLength = 10; + for (let i = 0; i < sampleCode.length - removeLength - 20; i++) { + const removed = sampleCode.slice(i, i + removeLength); + let suffix = sampleCode.slice(i + removeLength); + const response = removed + suffix; + // add a prefix to the suffix + suffix = "strange words;\n which start the suffix#" + suffix; + + // split the response but keep spaces + const mockStream = createMockStream(response.split(/(?! )/g)); + const result = stopAtStartOf(mockStream, suffix); + + const resultStr = await streamToString(result); + if (resultStr !== removed) { + throw new Error( + `i=${i} result:\n${resultStr}\n\nremoved:\n${removed}\n\nsuffix:\n${suffix}`, + ); + } + } }); }); diff --git a/core/autocomplete/filtering/streamTransforms/charStream.ts b/core/autocomplete/filtering/streamTransforms/charStream.ts index 9f37e1f58..f4b751ff9 100644 --- a/core/autocomplete/filtering/streamTransforms/charStream.ts +++ b/core/autocomplete/filtering/streamTransforms/charStream.ts @@ -117,3 +117,57 @@ export async function* stopAtStopTokens( yield char; } } + +/** + * Asynchronously yields characters from the input stream, stopping if a sequence contained in the beginning of the suffix is encountered. + * */ +export async function* stopAtStartOf( + stream: AsyncGenerator, + suffix: string, + sequenceLength: number = 20, +): AsyncGenerator { + if (suffix.length < sequenceLength) { + for await (const chunk of stream) { + yield chunk; + } + return; + } + + const n = Math.min(suffix.length, 3 * sequenceLength); + let prev = new Array(n + 1).fill(0); + let res = 0; + let buffer = ""; + + for await (const chunk of stream) { + const s1 = chunk; + const m = chunk.length; + for (let i = 1; i <= m; i++) { + // Create a temporary array to store the current row + let curr = new Array(n + 1).fill(0); + for (let j = 1; j <= n; j++) { + if (s1[i - 1] === suffix[j - 1]) { + curr[j] = prev[j - 1] + 1; + res = Math.max(res, curr[j]); + } else { + curr[j] = 0; + } + } + + // Move the current row's data to the previous row + prev = curr; + + if (res > sequenceLength) { + return; + } + + buffer += s1[i - 1]; + + while (buffer.length > sequenceLength) { + yield buffer[0]; + buffer = buffer.slice(1); + } + } + } + + yield buffer; +} diff --git a/core/autocomplete/filtering/streamTransforms/lineStream.test.ts b/core/autocomplete/filtering/streamTransforms/lineStream.test.ts index 0a99a5a91..5cb05d2c3 100644 --- a/core/autocomplete/filtering/streamTransforms/lineStream.test.ts +++ b/core/autocomplete/filtering/streamTransforms/lineStream.test.ts @@ -98,7 +98,7 @@ describe("lineStream", () => { describe("stopAtSimilarLine", () => { it("should stop at the exact same line", async () => { - const lineToTest = "const x = 6;"; + const lineToTest = "const x = 6"; const linesGenerator = await getLineGenerator([ "console.log();", "const y = () => {};", @@ -116,7 +116,7 @@ describe("lineStream", () => { expect(mockFullStop).toHaveBeenCalledTimes(1); }); - it.only("should stop at a similar line", async () => { + it("should stop at a similar line", async () => { const lineToTest = "const x = 6;"; const linesGenerator = await getLineGenerator([ "console.log();", diff --git a/core/autocomplete/filtering/streamTransforms/lineStream.ts b/core/autocomplete/filtering/streamTransforms/lineStream.ts index c204783ad..9cbf190ec 100644 --- a/core/autocomplete/filtering/streamTransforms/lineStream.ts +++ b/core/autocomplete/filtering/streamTransforms/lineStream.ts @@ -83,7 +83,7 @@ export const LINES_TO_REMOVE_BEFORE_START = [ "", "[CODE]", "", - "{{FILL_HERE}}" + "{{FILL_HERE}}", ]; export const ENGLISH_START_PHRASES = [ diff --git a/core/autocomplete/filtering/streamTransforms/noDoubleNewlineAfterClosingBracket.test.ts b/core/autocomplete/filtering/streamTransforms/noDoubleNewlineAfterClosingBracket.test.ts deleted file mode 100644 index a25b5d4bf..000000000 --- a/core/autocomplete/filtering/streamTransforms/noDoubleNewlineAfterClosingBracket.test.ts +++ /dev/null @@ -1,166 +0,0 @@ -import { noDoubleNewlineAfterClosingBracket } from "./lineStream"; - -describe("noDoubleNewlineAfterClosingBracket", () => { - // Helper function to convert an array to an async generator - async function* arrayToAsyncGenerator(array: T[]): AsyncGenerator { - for (const item of array) { - yield item; - } - } - - // Helper function to collect lines from the async generator - async function collectLines(lines: AsyncIterable): Promise { - const result: string[] = []; - for await (const line of lines) { - result.push(line); - } - return result; - } - - test("should yield all lines when no double newline and no unmatched brackets", async () => { - const inputLines = [ - "function test() {", - ' console.log("Hello World");', - "}", - ]; - const lines = arrayToAsyncGenerator(inputLines); - const outputLines = await collectLines( - noDoubleNewlineAfterClosingBracket(lines), - ); - - expect(outputLines).toEqual(inputLines); - }); - - test("should yield all lines when double newline but brackets are matched", async () => { - const inputLines = [ - "function test() {", - ' console.log("Hello World");', - "}", - "", - "", - "// End of function", - ]; - const lines = arrayToAsyncGenerator(inputLines); - const outputLines = await collectLines( - noDoubleNewlineAfterClosingBracket(lines), - ); - - expect(outputLines).toEqual(inputLines); - }); - - test("should stop yielding after double newline when unmatched closing bracket is found before double newline", async () => { - const inputLines = [ - // "function test() {", - ' console.log("Hello World");', - // Unmatched closing bracket - "}", - "", - "", - "// This should not be yielded", - 'console.log("End");', - ]; - const expectedOutputLines = [' console.log("Hello World");', "}"]; - const lines = arrayToAsyncGenerator(inputLines); - const outputLines = await collectLines( - noDoubleNewlineAfterClosingBracket(lines), - ); - - expect(outputLines).toEqual(expectedOutputLines); - }); - - test("should yield all lines when unmatched brackets but no double newline", async () => { - const inputLines = [ - "function test() {", - ' console.log("Hello World");', - "}", - // Unmatched closing bracket - ")", - "// Continue code", - 'console.log("End");', - ]; - const lines = arrayToAsyncGenerator(inputLines); - const outputLines = await collectLines( - noDoubleNewlineAfterClosingBracket(lines), - ); - - expect(outputLines).toEqual(inputLines); - }); - - test("should continue yielding if unmatched closing bracket occurs after double newline", async () => { - const inputLines = [ - "function test() {", - ' console.log("Hello World");', - "}", - "", - "", - // Unmatched closing bracket after double newline - ")", - 'console.log("End");', - ]; - const lines = arrayToAsyncGenerator(inputLines); - const outputLines = await collectLines( - noDoubleNewlineAfterClosingBracket(lines), - ); - - expect(outputLines).toEqual(inputLines); - }); - - test("should yield all lines when brackets are matched even with double newline", async () => { - const inputLines = [ - "const arr = [", - " 1, 2, 3,", - "];", - "", - "", - "console.log(arr);", - ]; - const lines = arrayToAsyncGenerator(inputLines); - const outputLines = await collectLines( - noDoubleNewlineAfterClosingBracket(lines), - ); - - expect(outputLines).toEqual(inputLines); - }); - - test("should stop yielding when unmatched closing bracket occurs before double newline", async () => { - const inputLines = [ - "if (condition) {", - " doSomething();", - "}", - // Unmatched closing bracket - "}", - "", - "", - "doSomethingElse();", - ]; - const expectedOutputLines = [ - "if (condition) {", - " doSomething();", - "}", - "}", - ]; - const lines = arrayToAsyncGenerator(inputLines); - const outputLines = await collectLines( - noDoubleNewlineAfterClosingBracket(lines), - ); - - expect(outputLines).toEqual(expectedOutputLines); - }); - - test("should yield all lines when no unmatched closing brackets and double newline", async () => { - const inputLines = [ - "while (true) {", - " // Infinite loop", - "}", - "", - "", - "// Loop exited", - ]; - const lines = arrayToAsyncGenerator(inputLines); - const outputLines = await collectLines( - noDoubleNewlineAfterClosingBracket(lines), - ); - - expect(outputLines).toEqual(inputLines); - }); -}); diff --git a/core/autocomplete/filtering/test/testCases.ts b/core/autocomplete/filtering/test/testCases.ts index f0584ab48..bde2afc08 100644 --- a/core/autocomplete/filtering/test/testCases.ts +++ b/core/autocomplete/filtering/test/testCases.ts @@ -153,23 +153,35 @@ public class Calculator { POSTGRES_DB: mydb `, }, - // TODO - // { - // description: "Should autocomplete a Markdown list with nested items", - // filename: "test.md", - // input: ` - // - Item 1 - // - Item 2 - // - Subitem 1 - // <|fim|> - // - Item 3 - // `, - // llmOutput: ` - Subitem 2 - // - Subitem 3 - // `, - // expectedCompletion: ` - Subitem 2 - // - Subitem 3`, - // }, + { + description: + "Should filter out suffix generated by LLM (sample from Codestral)", + filename: "test.js", + input: ` + add(number) { + this.result += number; + return this; + } + // Add the subtract method + subtract(number) {<|fim|> + + subtract(number) { + this.result -= number; + return this; + } + + multiply(number) { + this.result *= number; + return this; + }`, + llmOutput: ` this.result -= number; + return this; + } + // Add the multiply method + multiply(number) { + `, + expectedCompletion: undefined, + }, { description: "Should enforce bracket matching in JSON files", filename: "test.json", @@ -181,7 +193,7 @@ public class Calculator { "state": "California", "city": "San BERNARDINO", "coordinates": { - + <|fim|> } }, "employees": [ @@ -230,8 +242,76 @@ public class Calculator { "required": ["JavaScript", "React", "Node.js", "Leadership", "Project Management"], "optional": ["Photoshop", "Illustrator"]`, expectedCompletion: `"latitude": 34.10834, - "longitude": -117.28977 + "longitude": -117.28977`, + }, + { + description: + "Should return nothing when output is duplicated lines in TypeScript", + filename: "file.ts", + input: ` +async getContextForPath( + filepath: string, + astPath: AstPatt, + language: LanguageName, + options: ContextOptions = {}, +<|fim|> + ): Promise { + const snippets: AutocompleteCodeSnippet[] = []; + let parentKey = filepath; +`, + llmOutput: ` ): Promise { + const snippets: AutocompleteCodeSnippet[] = []; `, + expectedCompletion: undefined, + }, + { + description: + "Should return partial result when output is duplicated lines in TypeScript", + filename: "file.ts", + input: ` +async getContextForPath( + filepath: string, + astPath: AstPatt, + language: LanguageName, + options: ContextOptions = {}, +<|fim|> + ): Promise { + const snippets: AutocompleteCodeSnippet[] = []; + let parentKey = filepath; +`, + llmOutput: `console.log('TEST'); + ): Promise { + const snippets: AutocompleteCodeSnippet[] = []; + `, + expectedCompletion: `console.log('TEST'); + `, + }, + { + description: "Should autocomplete React effect hook", + input: `import React, { useState, useEffect } from "react"; + +export const Timer = () => { + const [seconds, setSeconds] = useState(0); + + useEffect(() => { + const interval = setInterval(() => { + setSeconds(seconds + 1); + }, 1000); + + <|fim|>; + + return () => clearInterval(interval); + }, [seconds]); + + return ( +
+

{seconds} seconds have passed.

+
+ ); +};`, + llmOutput: "return () => clearInterval(interval);", + expectedCompletion: undefined, + filename: "Timer.tsx", }, ]; @@ -530,35 +610,6 @@ export const Counter = () => { expectedCompletion: "0", filename: "Counter.tsx", }, - - { - description: "Should autocomplete React effect hook", - input: `import React, { useState, useEffect } from "react"; - -export const Timer = () => { - const [seconds, setSeconds] = useState(0); - - useEffect(() => { - const interval = setInterval(() => { - setSeconds(seconds + 1); - }, 1000); - - <|fim|>; - - return () => clearInterval(interval); - }, [seconds]); - - return ( -
-

{seconds} seconds have passed.

-
- ); -};`, - llmOutput: "return () => clearInterval(interval);", - expectedCompletion: "return () => clearInterval(interval);", - filename: "Timer.tsx", - }, - { description: "Should autocomplete React component methods", input: `import React from "react"; @@ -746,7 +797,7 @@ func main() { CREATE TABLE products ( id INT AUTO_INCREMENT PRIMARY KEY, name VARCHAR(100), - price DECIMAL(8,2) NOT NULL '0.00', + price DECIMAL(8,2) NOT NULL<|fim|> '0.00', quantity INT NOT NULL DEFAULT '0' ); diff --git a/core/autocomplete/filtering/test/util.ts b/core/autocomplete/filtering/test/util.ts index 42ab196b7..8c8b8a9a2 100644 --- a/core/autocomplete/filtering/test/util.ts +++ b/core/autocomplete/filtering/test/util.ts @@ -18,7 +18,7 @@ export interface AutocompleteFileringTestInput { filename: string; input: string; llmOutput: string; - expectedCompletion: string | null; + expectedCompletion: string | null | undefined; options?: { only?: boolean; }; diff --git a/core/core.ts b/core/core.ts index 00ceabb4b..f5453ea6d 100644 --- a/core/core.ts +++ b/core/core.ts @@ -471,7 +471,7 @@ export class Core { config.models.find((model) => model.title?.startsWith(msg.data.title)); try { if (model) { - return model.listModels(); + return await model.listModels(); } else { if (msg.data.title === "Ollama") { const models = await new Ollama({ model: "" }).listModels(); diff --git a/core/indexing/docs/DocsService.ts b/core/indexing/docs/DocsService.ts index 0f3724d61..6e841f6be 100644 --- a/core/indexing/docs/DocsService.ts +++ b/core/indexing/docs/DocsService.ts @@ -69,6 +69,7 @@ export type AddParams = { favicon?: string; }; + /* General process: - On config update: diff --git a/core/llm/llms/Ollama.ts b/core/llm/llms/Ollama.ts index dcaa078ba..642f8bcc5 100644 --- a/core/llm/llms/Ollama.ts +++ b/core/llm/llms/Ollama.ts @@ -37,31 +37,29 @@ interface ModelFileParams { // See https://github.com/ollama/ollama/blob/main/docs/api.md interface BaseOptions { - model: string; // the model name + model: string; // the model name options?: ModelFileParams; // additional model parameters listed in the documentation for the Modelfile such as temperature - format?: "json"; // the format to return a response in. Currently, the only accepted value is json - stream?: boolean; // if false the response will be returned as a single response object, rather than a stream of objects - keep_alive?: number; // controls how long the model will stay loaded into memory following the request (default: 5m) + format?: "json"; // the format to return a response in. Currently, the only accepted value is json + stream?: boolean; // if false the response will be returned as a single response object, rather than a stream of objects + keep_alive?: number; // controls how long the model will stay loaded into memory following the request (default: 5m) } interface GenerateOptions extends BaseOptions { - prompt: string; // the prompt to generate a response for - suffix?: string; // the text after the model response - images?: string[]; // a list of base64-encoded images (for multimodal models such as llava) - system?: string; // system message to (overrides what is defined in the Modelfile) - template?: string; // the prompt template to use (overrides what is defined in the Modelfile) - context?: string; // the context parameter returned from a previous request to /generate, this can be used to keep a short conversational memory - raw?: boolean; // if true no formatting will be applied to the prompt. You may choose to use the raw parameter if you are specifying a full templated prompt in your request to the API + prompt: string; // the prompt to generate a response for + suffix?: string; // the text after the model response + images?: string[]; // a list of base64-encoded images (for multimodal models such as llava) + system?: string; // system message to (overrides what is defined in the Modelfile) + template?: string; // the prompt template to use (overrides what is defined in the Modelfile) + context?: string; // the context parameter returned from a previous request to /generate, this can be used to keep a short conversational memory + raw?: boolean; // if true no formatting will be applied to the prompt. You may choose to use the raw parameter if you are specifying a full templated prompt in your request to the API } interface ChatOptions extends BaseOptions { - messages: OllamaChatMessage[]; // the messages of the chat, this can be used to keep a chat memory + messages: OllamaChatMessage[]; // the messages of the chat, this can be used to keep a chat memory // Not supported yet - tools: tools for the model to use if supported. Requires stream to be set to false // And correspondingly, tool calls in OllamaChatMessage } - - class Ollama extends BaseLLM { static providerName: ModelProvider = "ollama"; static defaultOptions: Partial = { @@ -196,9 +194,7 @@ class Ollama extends BaseLLM { }; } - private _convertMessage( - message: ChatMessage - ) { + private _convertMessage(message: ChatMessage) { if (typeof message.content === "string") { return message; } @@ -215,13 +211,13 @@ class Ollama extends BaseLLM { return { role: message.role, content: stripImages(message.content), - images + images, }; } private _getChatOptions( options: CompletionOptions, - messages: ChatMessage[] + messages: ChatMessage[], ): ChatOptions { return { model: this._getModel(), @@ -236,7 +232,7 @@ class Ollama extends BaseLLM { private _getGenerateOptions( options: CompletionOptions, prompt: string, - suffix?: string + suffix?: string, ): GenerateOptions { return { model: this._getModel(), @@ -271,7 +267,7 @@ class Ollama extends BaseLLM { Authorization: `Bearer ${this.apiKey}`, }, body: JSON.stringify(this._getGenerateOptions(options, prompt)), - signal + signal, }); let buffer = ""; @@ -312,7 +308,7 @@ class Ollama extends BaseLLM { Authorization: `Bearer ${this.apiKey}`, }, body: JSON.stringify(this._getChatOptions(options, messages)), - signal + signal, }); let buffer = ""; @@ -354,7 +350,6 @@ class Ollama extends BaseLLM { signal: AbortSignal, options: CompletionOptions, ): AsyncGenerator { - const response = await this.fetch(this.getEndpoint("api/generate"), { method: "POST", headers: { @@ -362,7 +357,7 @@ class Ollama extends BaseLLM { Authorization: `Bearer ${this.apiKey}`, }, body: JSON.stringify(this._getGenerateOptions(options, prefix, suffix)), - signal + signal, }); let buffer = ""; @@ -400,7 +395,13 @@ class Ollama extends BaseLLM { }, ); const data = await response.json(); - return data.models.map((model: any) => model.name); + if (response.ok) { + return data.models.map((model: any) => model.name); + } else { + throw new Error( + "Failed to list Ollama models. Make sure Ollama is running.", + ); + } } } diff --git a/core/package-lock.json b/core/package-lock.json index a53a1a49c..09e22ce96 100644 --- a/core/package-lock.json +++ b/core/package-lock.json @@ -24,7 +24,7 @@ "cheerio": "^1.0.0-rc.12", "commander": "^12.0.0", "comment-json": "^4.2.3", - "dbinfoz": "^0.14.0", + "dbinfoz": "^0.11.0", "diff": "^7.0.0", "dotenv": "^16.4.5", "fastest-levenshtein": "^1.0.16", @@ -1229,241 +1229,6 @@ } } }, - "node_modules/@azure/abort-controller": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/@azure/abort-controller/-/abort-controller-2.1.2.tgz", - "integrity": "sha512-nBrLsEWm4J2u5LpAPjxADTlq3trDgVZZXHNKabeXZtpq3d3AbN/KGO82R87rdDz5/lYB024rtEf10/q0urNgsA==", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@azure/core-auth": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/@azure/core-auth/-/core-auth-1.9.0.tgz", - "integrity": "sha512-FPwHpZywuyasDSLMqJ6fhbOK3TqUdviZNF8OqRGA4W5Ewib2lEEZ+pBsYcBa88B2NGO/SEnYPGhyBqNlE8ilSw==", - "dependencies": { - "@azure/abort-controller": "^2.0.0", - "@azure/core-util": "^1.11.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@azure/core-client": { - "version": "1.9.2", - "resolved": "https://registry.npmjs.org/@azure/core-client/-/core-client-1.9.2.tgz", - "integrity": "sha512-kRdry/rav3fUKHl/aDLd/pDLcB+4pOFwPPTVEExuMyaI5r+JBbMWqRbCY1pn5BniDaU3lRxO9eaQ1AmSMehl/w==", - "dependencies": { - "@azure/abort-controller": "^2.0.0", - "@azure/core-auth": "^1.4.0", - "@azure/core-rest-pipeline": "^1.9.1", - "@azure/core-tracing": "^1.0.0", - "@azure/core-util": "^1.6.1", - "@azure/logger": "^1.0.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@azure/core-http-compat": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/@azure/core-http-compat/-/core-http-compat-2.1.2.tgz", - "integrity": "sha512-5MnV1yqzZwgNLLjlizsU3QqOeQChkIXw781Fwh1xdAqJR5AA32IUaq6xv1BICJvfbHoa+JYcaij2HFkhLbNTJQ==", - "dependencies": { - "@azure/abort-controller": "^2.0.0", - "@azure/core-client": "^1.3.0", - "@azure/core-rest-pipeline": "^1.3.0" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@azure/core-lro": { - "version": "2.7.2", - "resolved": "https://registry.npmjs.org/@azure/core-lro/-/core-lro-2.7.2.tgz", - "integrity": "sha512-0YIpccoX8m/k00O7mDDMdJpbr6mf1yWo2dfmxt5A8XVZVVMz2SSKaEbMCeJRvgQ0IaSlqhjT47p4hVIRRy90xw==", - "dependencies": { - "@azure/abort-controller": "^2.0.0", - "@azure/core-util": "^1.2.0", - "@azure/logger": "^1.0.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@azure/core-paging": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/@azure/core-paging/-/core-paging-1.6.2.tgz", - "integrity": "sha512-YKWi9YuCU04B55h25cnOYZHxXYtEvQEbKST5vqRga7hWY9ydd3FZHdeQF8pyh+acWZvppw13M/LMGx0LABUVMA==", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@azure/core-rest-pipeline": { - "version": "1.18.0", - "resolved": "https://registry.npmjs.org/@azure/core-rest-pipeline/-/core-rest-pipeline-1.18.0.tgz", - "integrity": "sha512-QSoGUp4Eq/gohEFNJaUOwTN7BCc2nHTjjbm75JT0aD7W65PWM1H/tItz0GsABn22uaKyGxiMhWQLt2r+FGU89Q==", - "dependencies": { - "@azure/abort-controller": "^2.0.0", - "@azure/core-auth": "^1.8.0", - "@azure/core-tracing": "^1.0.1", - "@azure/core-util": "^1.11.0", - "@azure/logger": "^1.0.0", - "http-proxy-agent": "^7.0.0", - "https-proxy-agent": "^7.0.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@azure/core-tracing": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@azure/core-tracing/-/core-tracing-1.2.0.tgz", - "integrity": "sha512-UKTiEJPkWcESPYJz3X5uKRYyOcJD+4nYph+KpfdPRnQJVrZfk0KJgdnaAWKfhsBBtAf/D58Az4AvCJEmWgIBAg==", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@azure/core-util": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/@azure/core-util/-/core-util-1.11.0.tgz", - "integrity": "sha512-DxOSLua+NdpWoSqULhjDyAZTXFdP/LKkqtYuxxz1SCN289zk3OG8UOpnCQAz/tygyACBtWp/BoO72ptK7msY8g==", - "dependencies": { - "@azure/abort-controller": "^2.0.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@azure/identity": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/@azure/identity/-/identity-4.5.0.tgz", - "integrity": "sha512-EknvVmtBuSIic47xkOqyNabAme0RYTw52BTMz8eBgU1ysTyMrD1uOoM+JdS0J/4Yfp98IBT3osqq3BfwSaNaGQ==", - "dependencies": { - "@azure/abort-controller": "^2.0.0", - "@azure/core-auth": "^1.9.0", - "@azure/core-client": "^1.9.2", - "@azure/core-rest-pipeline": "^1.17.0", - "@azure/core-tracing": "^1.0.0", - "@azure/core-util": "^1.11.0", - "@azure/logger": "^1.0.0", - "@azure/msal-browser": "^3.26.1", - "@azure/msal-node": "^2.15.0", - "events": "^3.0.0", - "jws": "^4.0.0", - "open": "^8.0.0", - "stoppable": "^1.1.0", - "tslib": "^2.2.0" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@azure/keyvault-common": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@azure/keyvault-common/-/keyvault-common-2.0.0.tgz", - "integrity": "sha512-wRLVaroQtOqfg60cxkzUkGKrKMsCP6uYXAOomOIysSMyt1/YM0eUn9LqieAWM8DLcU4+07Fio2YGpPeqUbpP9w==", - "dependencies": { - "@azure/abort-controller": "^2.0.0", - "@azure/core-auth": "^1.3.0", - "@azure/core-client": "^1.5.0", - "@azure/core-rest-pipeline": "^1.8.0", - "@azure/core-tracing": "^1.0.0", - "@azure/core-util": "^1.10.0", - "@azure/logger": "^1.1.4", - "tslib": "^2.2.0" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@azure/keyvault-keys": { - "version": "4.9.0", - "resolved": "https://registry.npmjs.org/@azure/keyvault-keys/-/keyvault-keys-4.9.0.tgz", - "integrity": "sha512-ZBP07+K4Pj3kS4TF4XdkqFcspWwBHry3vJSOFM5k5ZABvf7JfiMonvaFk2nBF6xjlEbMpz5PE1g45iTMme0raQ==", - "dependencies": { - "@azure/abort-controller": "^2.0.0", - "@azure/core-auth": "^1.3.0", - "@azure/core-client": "^1.5.0", - "@azure/core-http-compat": "^2.0.1", - "@azure/core-lro": "^2.2.0", - "@azure/core-paging": "^1.1.1", - "@azure/core-rest-pipeline": "^1.8.1", - "@azure/core-tracing": "^1.0.0", - "@azure/core-util": "^1.0.0", - "@azure/keyvault-common": "^2.0.0", - "@azure/logger": "^1.0.0", - "tslib": "^2.2.0" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@azure/logger": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/@azure/logger/-/logger-1.1.4.tgz", - "integrity": "sha512-4IXXzcCdLdlXuCG+8UKEwLA1T1NHqUfanhXYHiQTn+6sfWCZXduqbtXDGceg3Ce5QxTGo7EqmbV6Bi+aqKuClQ==", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@azure/msal-browser": { - "version": "3.27.0", - "resolved": "https://registry.npmjs.org/@azure/msal-browser/-/msal-browser-3.27.0.tgz", - "integrity": "sha512-+b4ZKSD8+vslCtVRVetkegEhOFMLP3rxDWJY212ct+2r6jVg6OSQKc1Qz3kCoXo0FgwaXkb+76TMZfpHp8QtgA==", - "dependencies": { - "@azure/msal-common": "14.16.0" - }, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/@azure/msal-common": { - "version": "14.16.0", - "resolved": "https://registry.npmjs.org/@azure/msal-common/-/msal-common-14.16.0.tgz", - "integrity": "sha512-1KOZj9IpcDSwpNiQNjt0jDYZpQvNZay7QAEi/5DLubay40iGYtLzya/jbjRPLyOTZhEKyL1MzPuw2HqBCjceYA==", - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/@azure/msal-node": { - "version": "2.16.2", - "resolved": "https://registry.npmjs.org/@azure/msal-node/-/msal-node-2.16.2.tgz", - "integrity": "sha512-An7l1hEr0w1HMMh1LU+rtDtqL7/jw74ORlc9Wnh06v7TU/xpG39/Zdr1ZJu3QpjUfKJ+E0/OXMW8DRSWTlh7qQ==", - "dependencies": { - "@azure/msal-common": "14.16.0", - "jsonwebtoken": "^9.0.0", - "uuid": "^8.3.0" - }, - "engines": { - "node": ">=16" - } - }, - "node_modules/@azure/msal-node/node_modules/uuid": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", - "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", - "bin": { - "uuid": "dist/bin/uuid" - } - }, "node_modules/@babel/code-frame": { "version": "7.24.7", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.7.tgz", @@ -4090,11 +3855,6 @@ "@jridgewell/sourcemap-codec": "^1.4.14" } }, - "node_modules/@js-joda/core": { - "version": "5.6.3", - "resolved": "https://registry.npmjs.org/@js-joda/core/-/core-5.6.3.tgz", - "integrity": "sha512-T1rRxzdqkEXcou0ZprN1q9yDRlvzCPLqmlNt5IIsGBzoEVgLCCYrKEwc84+TvsXuAc95VAZwtWD2zVsKPY4bcA==" - }, "node_modules/@lancedb/vectordb-darwin-arm64": { "version": "0.4.20", "resolved": "https://registry.npmjs.org/@lancedb/vectordb-darwin-arm64/-/vectordb-darwin-arm64-0.4.20.tgz", @@ -5054,11 +4814,6 @@ "resolved": "https://registry.npmjs.org/@socket.io/component-emitter/-/component-emitter-3.1.2.tgz", "integrity": "sha512-9BCxFwvbGg/RsZK9tjXd8s4UcwR0MWeFQ1XEKIQVVvAGJyINdrqKMcTRyLoK8Rse1GjzLV9cwjWV1olXRWEXVA==" }, - "node_modules/@tediousjs/connection-string": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/@tediousjs/connection-string/-/connection-string-0.5.0.tgz", - "integrity": "sha512-7qSgZbincDDDFyRweCIEvZULFAw5iz/DeunhvuxpL31nfntX3P4Yd4HkHBRg9H8CdqY1e5WFN1PZIz/REL9MVQ==" - }, "node_modules/@tootallnate/once": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-1.1.2.tgz", @@ -5330,20 +5085,6 @@ "node": ">=12" } }, - "node_modules/@types/readable-stream": { - "version": "4.0.18", - "resolved": "https://registry.npmjs.org/@types/readable-stream/-/readable-stream-4.0.18.tgz", - "integrity": "sha512-21jK/1j+Wg+7jVw1xnSwy/2Q1VgVjWuFssbYGTREPUBeZ+rqVFl2udq0IkxzPC0ZhOzVceUbyIACFZKLqKEBlA==", - "dependencies": { - "@types/node": "*", - "safe-buffer": "~5.1.1" - } - }, - "node_modules/@types/readable-stream/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==" - }, "node_modules/@types/request": { "version": "2.48.12", "resolved": "https://registry.npmjs.org/@types/request/-/request-2.48.12.tgz", @@ -6532,6 +6273,7 @@ "url": "https://feross.org/support" } ], + "optional": true, "dependencies": { "base64-js": "^1.3.1", "ieee754": "^1.2.1" @@ -7223,11 +6965,10 @@ } }, "node_modules/dbinfoz": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/dbinfoz/-/dbinfoz-0.14.0.tgz", - "integrity": "sha512-8NLjmj3gEyxbMu1ZwPEby77QvoEkk5NrHKSwX4oSKeaREherwuSx1y08cXmxBEjrSmvByUX9axoKscuilSXfmg==", + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/dbinfoz/-/dbinfoz-0.11.0.tgz", + "integrity": "sha512-l7REBd9pwTBI6PWSk/dx+zCpSE2tiJdSKfApeoOajnSgyMJgkwGfhpPO2mV76MLQeKPaSm0mMKxmoqd38SaHmw==", "dependencies": { - "mssql": "^11.0.1", "mysql2": "^3.9.1", "pg": "^8.11.3", "sqlite3": "^5.1.7" @@ -7320,14 +7061,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/define-lazy-prop": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz", - "integrity": "sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==", - "engines": { - "node": ">=8" - } - }, "node_modules/define-properties": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", @@ -9640,20 +9373,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-docker": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", - "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==", - "bin": { - "is-docker": "cli.js" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/is-electron": { "version": "2.2.2", "resolved": "https://registry.npmjs.org/is-electron/-/is-electron-2.2.2.tgz", @@ -9858,17 +9577,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-wsl": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", - "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", - "dependencies": { - "is-docker": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/isarray": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", @@ -10851,11 +10559,6 @@ "jinjajs": "cli.js" } }, - "node_modules/js-md4": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/js-md4/-/js-md4-0.3.2.tgz", - "integrity": "sha512-/GDnfQYsltsjRswQhN9fhv3EMw2sCpUdrdxyWDOUK7eyD++r3gRhzgiQgc/x4MAv2i1iuQ4lxO5mvqM3vj4bwA==" - }, "node_modules/js-tiktoken": { "version": "1.0.12", "resolved": "https://registry.npmjs.org/js-tiktoken/-/js-tiktoken-1.0.12.tgz", @@ -11020,46 +10723,6 @@ "node": ">= 10.0.0" } }, - "node_modules/jsonwebtoken": { - "version": "9.0.2", - "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.2.tgz", - "integrity": "sha512-PRp66vJ865SSqOlgqS8hujT5U4AOgMfhrwYIuIhfKaoSCZcirrmASQr8CX7cUg+RMih+hgznrjp99o+W4pJLHQ==", - "dependencies": { - "jws": "^3.2.2", - "lodash.includes": "^4.3.0", - "lodash.isboolean": "^3.0.3", - "lodash.isinteger": "^4.0.4", - "lodash.isnumber": "^3.0.3", - "lodash.isplainobject": "^4.0.6", - "lodash.isstring": "^4.0.1", - "lodash.once": "^4.0.0", - "ms": "^2.1.1", - "semver": "^7.5.4" - }, - "engines": { - "node": ">=12", - "npm": ">=6" - } - }, - "node_modules/jsonwebtoken/node_modules/jwa": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz", - "integrity": "sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA==", - "dependencies": { - "buffer-equal-constant-time": "1.0.1", - "ecdsa-sig-formatter": "1.0.11", - "safe-buffer": "^5.0.1" - } - }, - "node_modules/jsonwebtoken/node_modules/jws": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/jws/-/jws-3.2.2.tgz", - "integrity": "sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==", - "dependencies": { - "jwa": "^1.4.1", - "safe-buffer": "^5.0.1" - } - }, "node_modules/jsprim": { "version": "1.4.2", "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz", @@ -11225,36 +10888,6 @@ "integrity": "sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==", "dev": true }, - "node_modules/lodash.includes": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz", - "integrity": "sha512-W3Bx6mdkRTGtlJISOvVD/lbqjTlPPUDTMnlXZFnVwi9NKJ6tiAk6LVdlhZMm17VZisqhKcgzpO5Wz91PCt5b0w==" - }, - "node_modules/lodash.isboolean": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz", - "integrity": "sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg==" - }, - "node_modules/lodash.isinteger": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz", - "integrity": "sha512-DBwtEWN2caHQ9/imiNeEA5ys1JoRtRfY3d7V9wkqtbycnAmTvRRmbHKDV4a0EYc678/dia0jrte4tjYwVBaZUA==" - }, - "node_modules/lodash.isnumber": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz", - "integrity": "sha512-QYqzpfwO3/CWf3XP+Z+tkQsfaLL/EnUlXWVkIk5FUPc4sBdTehEqZONuyRt2P67PXAk+NXmTBcc97zw9t1FQrw==" - }, - "node_modules/lodash.isplainobject": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", - "integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==" - }, - "node_modules/lodash.isstring": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz", - "integrity": "sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw==" - }, "node_modules/lodash.memoize": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", @@ -11266,11 +10899,6 @@ "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==" }, - "node_modules/lodash.once": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", - "integrity": "sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==" - }, "node_modules/long": { "version": "5.2.3", "resolved": "https://registry.npmjs.org/long/-/long-5.2.3.tgz", @@ -11660,33 +11288,6 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, - "node_modules/mssql": { - "version": "11.0.1", - "resolved": "https://registry.npmjs.org/mssql/-/mssql-11.0.1.tgz", - "integrity": "sha512-KlGNsugoT90enKlR8/G36H0kTxPthDhmtNUCwEHvgRza5Cjpjoj+P2X6eMpFUDN7pFrJZsKadL4x990G8RBE1w==", - "dependencies": { - "@tediousjs/connection-string": "^0.5.0", - "commander": "^11.0.0", - "debug": "^4.3.3", - "rfdc": "^1.3.0", - "tarn": "^3.0.2", - "tedious": "^18.2.1" - }, - "bin": { - "mssql": "bin/mssql" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/mssql/node_modules/commander": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-11.1.0.tgz", - "integrity": "sha512-yPVavfyCcRhmorC7rWlkHn15b4wDVgVmBA7kV4QVBsF7kv/9TKJAbAXVTxvTnwP8HHKjRCJDClKbciiYS7p0DQ==", - "engines": { - "node": ">=16" - } - }, "node_modules/myers-diff": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/myers-diff/-/myers-diff-2.1.0.tgz", @@ -11739,11 +11340,6 @@ "resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-1.0.2.tgz", "integrity": "sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg==" }, - "node_modules/native-duplexpair": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/native-duplexpair/-/native-duplexpair-1.0.0.tgz", - "integrity": "sha512-E7QQoM+3jvNtlmyfqRZ0/U75VFgCls+fSkbml2MpgWkWyz3ox8Y58gNhfuziuQYGNNQAbFZJQck55LHCnCK6CA==" - }, "node_modules/natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", @@ -12202,22 +11798,6 @@ "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==" }, - "node_modules/open": { - "version": "8.4.2", - "resolved": "https://registry.npmjs.org/open/-/open-8.4.2.tgz", - "integrity": "sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ==", - "dependencies": { - "define-lazy-prop": "^2.0.0", - "is-docker": "^2.1.1", - "is-wsl": "^2.2.0" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/openai": { "version": "4.47.1", "resolved": "https://registry.npmjs.org/openai/-/openai-4.47.1.tgz", @@ -12933,6 +12513,7 @@ "version": "0.11.10", "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==", + "optional": true, "engines": { "node": ">= 0.6.0" } @@ -13294,6 +12875,7 @@ "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", @@ -13566,11 +13148,6 @@ "node": ">=0.10.0" } }, - "node_modules/rfdc": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.4.1.tgz", - "integrity": "sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA==" - }, "node_modules/rimraf": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", @@ -14134,15 +13711,6 @@ "node": ">=8" } }, - "node_modules/stoppable": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/stoppable/-/stoppable-1.1.0.tgz", - "integrity": "sha512-KXDYZ9dszj6bzvnEMRYvxgeTHU74QBFL54XKtP3nyMuJ81CFYtABZ3bAzL2EdFUaEwJOBOgENyFj3R7oTzDyyw==", - "engines": { - "node": ">=4", - "npm": ">=6" - } - }, "node_modules/stream-read-all": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/stream-read-all/-/stream-read-all-3.0.1.tgz", @@ -14515,45 +14083,6 @@ "node": ">=18" } }, - "node_modules/tarn": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/tarn/-/tarn-3.0.2.tgz", - "integrity": "sha512-51LAVKUSZSVfI05vjPESNc5vwqqZpbXCsU+/+wxlOrUjk2SnFTt97v9ZgQrD4YmxYW1Px6w2KjaDitCfkvgxMQ==", - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/tedious": { - "version": "18.6.1", - "resolved": "https://registry.npmjs.org/tedious/-/tedious-18.6.1.tgz", - "integrity": "sha512-9AvErXXQTd6l7TDd5EmM+nxbOGyhnmdbp/8c3pw+tjaiSXW9usME90ET/CRG1LN1Y9tPMtz/p83z4Q97B4DDpw==", - "dependencies": { - "@azure/core-auth": "^1.7.2", - "@azure/identity": "^4.2.1", - "@azure/keyvault-keys": "^4.4.0", - "@js-joda/core": "^5.6.1", - "@types/node": ">=18", - "bl": "^6.0.11", - "iconv-lite": "^0.6.3", - "js-md4": "^0.3.2", - "native-duplexpair": "^1.0.0", - "sprintf-js": "^1.1.3" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/tedious/node_modules/bl": { - "version": "6.0.16", - "resolved": "https://registry.npmjs.org/bl/-/bl-6.0.16.tgz", - "integrity": "sha512-V/kz+z2Mx5/6qDfRCilmrukUXcXuCoXKg3/3hDvzKKoSUx8CJKudfIoT29XZc3UE9xBvxs5qictiHdprwtteEg==", - "dependencies": { - "@types/readable-stream": "^4.0.0", - "buffer": "^6.0.3", - "inherits": "^2.0.4", - "readable-stream": "^4.2.0" - } - }, "node_modules/test-exclude": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", diff --git a/core/package.json b/core/package.json index 91652280a..e95c66509 100644 --- a/core/package.json +++ b/core/package.json @@ -55,7 +55,7 @@ "cheerio": "^1.0.0-rc.12", "commander": "^12.0.0", "comment-json": "^4.2.3", - "dbinfoz": "^0.14.0", + "dbinfoz": "^0.11.0", "diff": "^7.0.0", "dotenv": "^16.4.5", "fastest-levenshtein": "^1.0.16", diff --git a/docs/docs/customize/model-providers/more/together.md b/docs/docs/customize/model-providers/more/together.md index b02c83172..e5ed9abd0 100644 --- a/docs/docs/customize/model-providers/more/together.md +++ b/docs/docs/customize/model-providers/more/together.md @@ -1,14 +1,14 @@ # Together -The Together API is a cloud platform for running large AI models. You can sign up [here](https://api.together.xyz/signup), copy your API key on the initial welcome screen, and then hit the play button on any model from the [Together Models list](https://docs.together.ai/docs/models-inference). Change `~/.continue/config.json` to look like this: +The Together API is a cloud platform for running large AI models. You can sign up [here](https://api.together.xyz/signup), copy your API key on the initial welcome screen, and then hit the play button on any model from the [Together Models list](https://docs.together.ai/docs/serverless-models). Change `~/.continue/config.json` to look like this: ```json title="config.json" { "models": [ { - "title": "Together CodeLlama", + "title": "Together Qwen2.5 Coder", "provider": "together", - "model": "codellama-13b", + "model": "Qwen/Qwen2.5-Coder-32B-Instruct", "apiKey": "YOUR_API_KEY" } ] diff --git a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/editor/EditorComponentInlaysManager.kt b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/editor/EditorComponentInlaysManager.kt index 7de018bb2..b4f099d2d 100644 --- a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/editor/EditorComponentInlaysManager.kt +++ b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/editor/EditorComponentInlaysManager.kt @@ -51,7 +51,7 @@ class EditorComponentInlaysManager(val editor: EditorImpl, private val onlyOneIn } val wrappedComponent = ComponentWrapper(component) - val offset = editor.document.getLineEndOffset(lineIndex) + val offset = editor.document.getLineStartOffset(lineIndex) return EditorEmbeddedComponentManager.getInstance() .addComponent( @@ -59,7 +59,7 @@ class EditorComponentInlaysManager(val editor: EditorImpl, private val onlyOneIn EditorEmbeddedComponentManager.Properties( EditorEmbeddedComponentManager.ResizePolicy.none(), null, - true, + !editor.inlayModel.getBlockElementsInRange(offset,offset).isEmpty(), showAbove, 0, offset diff --git a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/editor/VerticalDiffBlock.kt b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/editor/VerticalDiffBlock.kt index a84bf7f9b..64f1d1bb7 100644 --- a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/editor/VerticalDiffBlock.kt +++ b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/editor/VerticalDiffBlock.kt @@ -59,11 +59,12 @@ class VerticalDiffBlock( fun deleteLineAt(line: Int) { val startOffset = editor.document.getLineStartOffset(line) - val endOffset = editor.document.getLineEndOffset(line) + 1 + val endOffset = min(editor.document.getLineEndOffset(line) + 1, editor.document.textLength) val deletedText = editor.document.getText(TextRange(startOffset, endOffset)) deletedLines.add(deletedText.trimEnd()) + // Unable to ensure that text length has not changed, so we need to get it again editor.document.deleteString(startOffset, min(endOffset, editor.document.textLength)) } diff --git a/extensions/vscode/CHANGELOG.md b/extensions/vscode/CHANGELOG.md index 8dac5cd8c..d33482747 100644 --- a/extensions/vscode/CHANGELOG.md +++ b/extensions/vscode/CHANGELOG.md @@ -5,7 +5,11 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html), and is generated by [Changie](https://github.com/miniscruff/changie). -Pre-release Changes +## 0.8.59 - 2024-11-25 +### Fixed +* Hotfix for Ollama onboarding + +## 0.8.58 - 2024-11-22 ### Added * OpenAI predicted outputs support * Improve codebase retrieval with BM25 @@ -19,11 +23,17 @@ Pre-release Changes * Updates for llama3.2 * .continuerules file to set system prompt * .prompt files v2 +* Dedicated UI for docs indexing +* Clickable code symbols in chat +* Use clipboard content as autocomplete context ### Changed * Improved @docs crawler * Many improvements to make autocomplete more eager +* Near complete type definition retrieval for TypeScript autocomplete +* Remove footer from chat sidebar ### Fixed * Brought back the Apply button for all code blocks +* Automatically update codebase index on removed files ## 0.8.56 - 2024-11-08 ### Added diff --git a/extensions/vscode/package-lock.json b/extensions/vscode/package-lock.json index 8d680fb94..742211fb0 100644 --- a/extensions/vscode/package-lock.json +++ b/extensions/vscode/package-lock.json @@ -1,12 +1,12 @@ { "name": "continue", - "version": "0.9.233", + "version": "0.9.235", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "continue", - "version": "0.9.233", + "version": "0.9.235", "license": "Apache-2.0", "dependencies": { "@electron/rebuild": "^3.2.10", @@ -18,7 +18,7 @@ "axios": "^1.2.5", "core": "file:../../core", "cors": "^2.8.5", - "dbinfoz": "^0.14.0", + "dbinfoz": "^0.11.0", "downshift": "^7.6.0", "esbuild": "^0.17.19", "express": "^4.18.2", @@ -246,6 +246,7 @@ "version": "2.1.2", "resolved": "https://registry.npmjs.org/@azure/abort-controller/-/abort-controller-2.1.2.tgz", "integrity": "sha512-nBrLsEWm4J2u5LpAPjxADTlq3trDgVZZXHNKabeXZtpq3d3AbN/KGO82R87rdDz5/lYB024rtEf10/q0urNgsA==", + "dev": true, "dependencies": { "tslib": "^2.6.2" }, @@ -257,6 +258,7 @@ "version": "1.9.0", "resolved": "https://registry.npmjs.org/@azure/core-auth/-/core-auth-1.9.0.tgz", "integrity": "sha512-FPwHpZywuyasDSLMqJ6fhbOK3TqUdviZNF8OqRGA4W5Ewib2lEEZ+pBsYcBa88B2NGO/SEnYPGhyBqNlE8ilSw==", + "dev": true, "dependencies": { "@azure/abort-controller": "^2.0.0", "@azure/core-util": "^1.11.0", @@ -270,6 +272,7 @@ "version": "1.9.2", "resolved": "https://registry.npmjs.org/@azure/core-client/-/core-client-1.9.2.tgz", "integrity": "sha512-kRdry/rav3fUKHl/aDLd/pDLcB+4pOFwPPTVEExuMyaI5r+JBbMWqRbCY1pn5BniDaU3lRxO9eaQ1AmSMehl/w==", + "dev": true, "dependencies": { "@azure/abort-controller": "^2.0.0", "@azure/core-auth": "^1.4.0", @@ -283,48 +286,11 @@ "node": ">=18.0.0" } }, - "node_modules/@azure/core-http-compat": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/@azure/core-http-compat/-/core-http-compat-2.1.2.tgz", - "integrity": "sha512-5MnV1yqzZwgNLLjlizsU3QqOeQChkIXw781Fwh1xdAqJR5AA32IUaq6xv1BICJvfbHoa+JYcaij2HFkhLbNTJQ==", - "dependencies": { - "@azure/abort-controller": "^2.0.0", - "@azure/core-client": "^1.3.0", - "@azure/core-rest-pipeline": "^1.3.0" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@azure/core-lro": { - "version": "2.7.2", - "resolved": "https://registry.npmjs.org/@azure/core-lro/-/core-lro-2.7.2.tgz", - "integrity": "sha512-0YIpccoX8m/k00O7mDDMdJpbr6mf1yWo2dfmxt5A8XVZVVMz2SSKaEbMCeJRvgQ0IaSlqhjT47p4hVIRRy90xw==", - "dependencies": { - "@azure/abort-controller": "^2.0.0", - "@azure/core-util": "^1.2.0", - "@azure/logger": "^1.0.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@azure/core-paging": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/@azure/core-paging/-/core-paging-1.6.2.tgz", - "integrity": "sha512-YKWi9YuCU04B55h25cnOYZHxXYtEvQEbKST5vqRga7hWY9ydd3FZHdeQF8pyh+acWZvppw13M/LMGx0LABUVMA==", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, "node_modules/@azure/core-rest-pipeline": { "version": "1.17.0", "resolved": "https://registry.npmjs.org/@azure/core-rest-pipeline/-/core-rest-pipeline-1.17.0.tgz", "integrity": "sha512-62Vv8nC+uPId3j86XJ0WI+sBf0jlqTqPUFCBNrGtlaUeQUIXWV/D8GE5A1d+Qx8H7OQojn2WguC8kChD6v0shA==", + "dev": true, "dependencies": { "@azure/abort-controller": "^2.0.0", "@azure/core-auth": "^1.8.0", @@ -343,6 +309,7 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/@azure/core-tracing/-/core-tracing-1.2.0.tgz", "integrity": "sha512-UKTiEJPkWcESPYJz3X5uKRYyOcJD+4nYph+KpfdPRnQJVrZfk0KJgdnaAWKfhsBBtAf/D58Az4AvCJEmWgIBAg==", + "dev": true, "dependencies": { "tslib": "^2.6.2" }, @@ -354,6 +321,7 @@ "version": "1.11.0", "resolved": "https://registry.npmjs.org/@azure/core-util/-/core-util-1.11.0.tgz", "integrity": "sha512-DxOSLua+NdpWoSqULhjDyAZTXFdP/LKkqtYuxxz1SCN289zk3OG8UOpnCQAz/tygyACBtWp/BoO72ptK7msY8g==", + "dev": true, "dependencies": { "@azure/abort-controller": "^2.0.0", "tslib": "^2.6.2" @@ -366,6 +334,7 @@ "version": "4.5.0", "resolved": "https://registry.npmjs.org/@azure/identity/-/identity-4.5.0.tgz", "integrity": "sha512-EknvVmtBuSIic47xkOqyNabAme0RYTw52BTMz8eBgU1ysTyMrD1uOoM+JdS0J/4Yfp98IBT3osqq3BfwSaNaGQ==", + "dev": true, "dependencies": { "@azure/abort-controller": "^2.0.0", "@azure/core-auth": "^1.9.0", @@ -386,50 +355,11 @@ "node": ">=18.0.0" } }, - "node_modules/@azure/keyvault-common": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@azure/keyvault-common/-/keyvault-common-2.0.0.tgz", - "integrity": "sha512-wRLVaroQtOqfg60cxkzUkGKrKMsCP6uYXAOomOIysSMyt1/YM0eUn9LqieAWM8DLcU4+07Fio2YGpPeqUbpP9w==", - "dependencies": { - "@azure/abort-controller": "^2.0.0", - "@azure/core-auth": "^1.3.0", - "@azure/core-client": "^1.5.0", - "@azure/core-rest-pipeline": "^1.8.0", - "@azure/core-tracing": "^1.0.0", - "@azure/core-util": "^1.10.0", - "@azure/logger": "^1.1.4", - "tslib": "^2.2.0" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@azure/keyvault-keys": { - "version": "4.9.0", - "resolved": "https://registry.npmjs.org/@azure/keyvault-keys/-/keyvault-keys-4.9.0.tgz", - "integrity": "sha512-ZBP07+K4Pj3kS4TF4XdkqFcspWwBHry3vJSOFM5k5ZABvf7JfiMonvaFk2nBF6xjlEbMpz5PE1g45iTMme0raQ==", - "dependencies": { - "@azure/abort-controller": "^2.0.0", - "@azure/core-auth": "^1.3.0", - "@azure/core-client": "^1.5.0", - "@azure/core-http-compat": "^2.0.1", - "@azure/core-lro": "^2.2.0", - "@azure/core-paging": "^1.1.1", - "@azure/core-rest-pipeline": "^1.8.1", - "@azure/core-tracing": "^1.0.0", - "@azure/core-util": "^1.0.0", - "@azure/keyvault-common": "^2.0.0", - "@azure/logger": "^1.0.0", - "tslib": "^2.2.0" - }, - "engines": { - "node": ">=18.0.0" - } - }, "node_modules/@azure/logger": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/@azure/logger/-/logger-1.1.4.tgz", "integrity": "sha512-4IXXzcCdLdlXuCG+8UKEwLA1T1NHqUfanhXYHiQTn+6sfWCZXduqbtXDGceg3Ce5QxTGo7EqmbV6Bi+aqKuClQ==", + "dev": true, "dependencies": { "tslib": "^2.6.2" }, @@ -441,6 +371,7 @@ "version": "3.27.0", "resolved": "https://registry.npmjs.org/@azure/msal-browser/-/msal-browser-3.27.0.tgz", "integrity": "sha512-+b4ZKSD8+vslCtVRVetkegEhOFMLP3rxDWJY212ct+2r6jVg6OSQKc1Qz3kCoXo0FgwaXkb+76TMZfpHp8QtgA==", + "dev": true, "dependencies": { "@azure/msal-common": "14.16.0" }, @@ -452,6 +383,7 @@ "version": "14.16.0", "resolved": "https://registry.npmjs.org/@azure/msal-common/-/msal-common-14.16.0.tgz", "integrity": "sha512-1KOZj9IpcDSwpNiQNjt0jDYZpQvNZay7QAEi/5DLubay40iGYtLzya/jbjRPLyOTZhEKyL1MzPuw2HqBCjceYA==", + "dev": true, "engines": { "node": ">=0.8.0" } @@ -460,6 +392,7 @@ "version": "2.16.0", "resolved": "https://registry.npmjs.org/@azure/msal-node/-/msal-node-2.16.0.tgz", "integrity": "sha512-oww0oJTOOvPKTVXqVyxfcFVjExQKYEkKR5KM0cTG3jnzt6u/MRMx8XaK49L/bxV35r9sCHQFjNlEShad9qGSYA==", + "dev": true, "dependencies": { "@azure/msal-common": "14.16.0", "jsonwebtoken": "^9.0.0", @@ -473,6 +406,7 @@ "version": "8.3.2", "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "dev": true, "bin": { "uuid": "dist/bin/uuid" } @@ -1270,11 +1204,6 @@ "@jridgewell/sourcemap-codec": "^1.4.14" } }, - "node_modules/@js-joda/core": { - "version": "5.6.3", - "resolved": "https://registry.npmjs.org/@js-joda/core/-/core-5.6.3.tgz", - "integrity": "sha512-T1rRxzdqkEXcou0ZprN1q9yDRlvzCPLqmlNt5IIsGBzoEVgLCCYrKEwc84+TvsXuAc95VAZwtWD2zVsKPY4bcA==" - }, "node_modules/@jsdevtools/ono": { "version": "7.1.3", "resolved": "https://registry.npmjs.org/@jsdevtools/ono/-/ono-7.1.3.tgz", @@ -1836,11 +1765,6 @@ "node": ">=10" } }, - "node_modules/@tediousjs/connection-string": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/@tediousjs/connection-string/-/connection-string-0.5.0.tgz", - "integrity": "sha512-7qSgZbincDDDFyRweCIEvZULFAw5iz/DeunhvuxpL31nfntX3P4Yd4HkHBRg9H8CdqY1e5WFN1PZIz/REL9MVQ==" - }, "node_modules/@tootallnate/once": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz", @@ -2111,20 +2035,6 @@ "@types/react": "*" } }, - "node_modules/@types/readable-stream": { - "version": "4.0.18", - "resolved": "https://registry.npmjs.org/@types/readable-stream/-/readable-stream-4.0.18.tgz", - "integrity": "sha512-21jK/1j+Wg+7jVw1xnSwy/2Q1VgVjWuFssbYGTREPUBeZ+rqVFl2udq0IkxzPC0ZhOzVceUbyIACFZKLqKEBlA==", - "dependencies": { - "@types/node": "*", - "safe-buffer": "~5.1.1" - } - }, - "node_modules/@types/readable-stream/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==" - }, "node_modules/@types/request": { "version": "2.48.12", "resolved": "https://registry.npmjs.org/@types/request/-/request-2.48.12.tgz", @@ -2841,17 +2751,6 @@ "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==" }, - "node_modules/abort-controller": { - "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" - }, - "engines": { - "node": ">=6.5" - } - }, "node_modules/accepts": { "version": "1.3.8", "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", @@ -3400,7 +3299,8 @@ "node_modules/buffer-equal-constant-time": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", - "integrity": "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==" + "integrity": "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==", + "dev": true }, "node_modules/bytes": { "version": "3.1.2", @@ -4315,11 +4215,10 @@ } }, "node_modules/dbinfoz": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/dbinfoz/-/dbinfoz-0.14.0.tgz", - "integrity": "sha512-8NLjmj3gEyxbMu1ZwPEby77QvoEkk5NrHKSwX4oSKeaREherwuSx1y08cXmxBEjrSmvByUX9axoKscuilSXfmg==", + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/dbinfoz/-/dbinfoz-0.11.0.tgz", + "integrity": "sha512-l7REBd9pwTBI6PWSk/dx+zCpSE2tiJdSKfApeoOajnSgyMJgkwGfhpPO2mV76MLQeKPaSm0mMKxmoqd38SaHmw==", "dependencies": { - "mssql": "^11.0.1", "mysql2": "^3.9.1", "pg": "^8.11.3", "sqlite3": "^5.1.7" @@ -4448,6 +4347,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz", "integrity": "sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==", + "dev": true, "engines": { "node": ">=8" } @@ -4665,6 +4565,7 @@ "version": "1.0.11", "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz", "integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==", + "dev": true, "dependencies": { "safe-buffer": "^5.0.1" } @@ -5194,14 +5095,6 @@ "es5-ext": "~0.10.14" } }, - "node_modules/event-target-shim": { - "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==", - "engines": { - "node": ">=6" - } - }, "node_modules/eventemitter3": { "version": "4.0.7", "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz", @@ -5211,6 +5104,7 @@ "version": "3.3.0", "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", + "dev": true, "engines": { "node": ">=0.8.x" } @@ -6638,6 +6532,7 @@ "version": "2.2.1", "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==", + "dev": true, "bin": { "is-docker": "cli.js" }, @@ -6763,6 +6658,7 @@ "version": "2.2.0", "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", + "dev": true, "dependencies": { "is-docker": "^2.0.0" }, @@ -6816,11 +6712,6 @@ "jiti": "bin/jiti.js" } }, - "node_modules/js-md4": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/js-md4/-/js-md4-0.3.2.tgz", - "integrity": "sha512-/GDnfQYsltsjRswQhN9fhv3EMw2sCpUdrdxyWDOUK7eyD++r3gRhzgiQgc/x4MAv2i1iuQ4lxO5mvqM3vj4bwA==" - }, "node_modules/js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -7016,6 +6907,7 @@ "version": "9.0.2", "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.2.tgz", "integrity": "sha512-PRp66vJ865SSqOlgqS8hujT5U4AOgMfhrwYIuIhfKaoSCZcirrmASQr8CX7cUg+RMih+hgznrjp99o+W4pJLHQ==", + "dev": true, "dependencies": { "jws": "^3.2.2", "lodash.includes": "^4.3.0", @@ -7037,6 +6929,7 @@ "version": "1.4.1", "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz", "integrity": "sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA==", + "dev": true, "dependencies": { "buffer-equal-constant-time": "1.0.1", "ecdsa-sig-formatter": "1.0.11", @@ -7047,6 +6940,7 @@ "version": "3.2.2", "resolved": "https://registry.npmjs.org/jws/-/jws-3.2.2.tgz", "integrity": "sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==", + "dev": true, "dependencies": { "jwa": "^1.4.1", "safe-buffer": "^5.0.1" @@ -7081,6 +6975,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/jwa/-/jwa-2.0.0.tgz", "integrity": "sha512-jrZ2Qx916EA+fq9cEAeCROWPTfCwi1IVHqT2tapuqLEVVDKFDENFw1oL+MwrTvH6msKxsd1YTDVw6uKEcsrLEA==", + "dev": true, "dependencies": { "buffer-equal-constant-time": "1.0.1", "ecdsa-sig-formatter": "1.0.11", @@ -7091,6 +6986,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/jws/-/jws-4.0.0.tgz", "integrity": "sha512-KDncfTmOZoOMTFG4mBlG0qUIOlc03fmzH+ru6RgYVZhPkyiy/92Owlt/8UEN+a4TXR1FQetfIpJE8ApdvdVxTg==", + "dev": true, "dependencies": { "jwa": "^2.0.0", "safe-buffer": "^5.0.1" @@ -7204,32 +7100,38 @@ "node_modules/lodash.includes": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz", - "integrity": "sha512-W3Bx6mdkRTGtlJISOvVD/lbqjTlPPUDTMnlXZFnVwi9NKJ6tiAk6LVdlhZMm17VZisqhKcgzpO5Wz91PCt5b0w==" + "integrity": "sha512-W3Bx6mdkRTGtlJISOvVD/lbqjTlPPUDTMnlXZFnVwi9NKJ6tiAk6LVdlhZMm17VZisqhKcgzpO5Wz91PCt5b0w==", + "dev": true }, "node_modules/lodash.isboolean": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz", - "integrity": "sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg==" + "integrity": "sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg==", + "dev": true }, "node_modules/lodash.isinteger": { "version": "4.0.4", "resolved": "https://registry.npmjs.org/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz", - "integrity": "sha512-DBwtEWN2caHQ9/imiNeEA5ys1JoRtRfY3d7V9wkqtbycnAmTvRRmbHKDV4a0EYc678/dia0jrte4tjYwVBaZUA==" + "integrity": "sha512-DBwtEWN2caHQ9/imiNeEA5ys1JoRtRfY3d7V9wkqtbycnAmTvRRmbHKDV4a0EYc678/dia0jrte4tjYwVBaZUA==", + "dev": true }, "node_modules/lodash.isnumber": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz", - "integrity": "sha512-QYqzpfwO3/CWf3XP+Z+tkQsfaLL/EnUlXWVkIk5FUPc4sBdTehEqZONuyRt2P67PXAk+NXmTBcc97zw9t1FQrw==" + "integrity": "sha512-QYqzpfwO3/CWf3XP+Z+tkQsfaLL/EnUlXWVkIk5FUPc4sBdTehEqZONuyRt2P67PXAk+NXmTBcc97zw9t1FQrw==", + "dev": true }, "node_modules/lodash.isplainobject": { "version": "4.0.6", "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", - "integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==" + "integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==", + "dev": true }, "node_modules/lodash.isstring": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz", - "integrity": "sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw==" + "integrity": "sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw==", + "dev": true }, "node_modules/lodash.merge": { "version": "4.6.2", @@ -7240,7 +7142,8 @@ "node_modules/lodash.once": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", - "integrity": "sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==" + "integrity": "sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==", + "dev": true }, "node_modules/log-symbols": { "version": "4.1.0", @@ -8344,33 +8247,6 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" }, - "node_modules/mssql": { - "version": "11.0.1", - "resolved": "https://registry.npmjs.org/mssql/-/mssql-11.0.1.tgz", - "integrity": "sha512-KlGNsugoT90enKlR8/G36H0kTxPthDhmtNUCwEHvgRza5Cjpjoj+P2X6eMpFUDN7pFrJZsKadL4x990G8RBE1w==", - "dependencies": { - "@tediousjs/connection-string": "^0.5.0", - "commander": "^11.0.0", - "debug": "^4.3.3", - "rfdc": "^1.3.0", - "tarn": "^3.0.2", - "tedious": "^18.2.1" - }, - "bin": { - "mssql": "bin/mssql" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/mssql/node_modules/commander": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-11.1.0.tgz", - "integrity": "sha512-yPVavfyCcRhmorC7rWlkHn15b4wDVgVmBA7kV4QVBsF7kv/9TKJAbAXVTxvTnwP8HHKjRCJDClKbciiYS7p0DQ==", - "engines": { - "node": ">=16" - } - }, "node_modules/mute-stream": { "version": "0.0.8", "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz", @@ -8447,11 +8323,6 @@ "resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-1.0.2.tgz", "integrity": "sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg==" }, - "node_modules/native-duplexpair": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/native-duplexpair/-/native-duplexpair-1.0.0.tgz", - "integrity": "sha512-E7QQoM+3jvNtlmyfqRZ0/U75VFgCls+fSkbml2MpgWkWyz3ox8Y58gNhfuziuQYGNNQAbFZJQck55LHCnCK6CA==" - }, "node_modules/natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", @@ -8979,6 +8850,7 @@ "version": "8.4.2", "resolved": "https://registry.npmjs.org/open/-/open-8.4.2.tgz", "integrity": "sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ==", + "dev": true, "dependencies": { "define-lazy-prop": "^2.0.0", "is-docker": "^2.1.1", @@ -9770,14 +9642,6 @@ "node": "^12.13.0 || ^14.15.0 || >=16.0.0" } }, - "node_modules/process": { - "version": "0.11.10", - "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", - "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==", - "engines": { - "node": ">= 0.6.0" - } - }, "node_modules/process-exists": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/process-exists/-/process-exists-4.1.0.tgz", @@ -10456,11 +10320,6 @@ "node": ">=0.10.0" } }, - "node_modules/rfdc": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.4.1.tgz", - "integrity": "sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA==" - }, "node_modules/rimraf": { "version": "5.0.10", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-5.0.10.tgz", @@ -11127,6 +10986,7 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/stoppable/-/stoppable-1.1.0.tgz", "integrity": "sha512-KXDYZ9dszj6bzvnEMRYvxgeTHU74QBFL54XKtP3nyMuJ81CFYtABZ3bAzL2EdFUaEwJOBOgENyFj3R7oTzDyyw==", + "dev": true, "engines": { "node": ">=4", "npm": ">=6" @@ -11564,14 +11424,6 @@ "node": ">=8" } }, - "node_modules/tarn": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/tarn/-/tarn-3.0.2.tgz", - "integrity": "sha512-51LAVKUSZSVfI05vjPESNc5vwqqZpbXCsU+/+wxlOrUjk2SnFTt97v9ZgQrD4YmxYW1Px6w2KjaDitCfkvgxMQ==", - "engines": { - "node": ">=8.0.0" - } - }, "node_modules/taskkill": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/taskkill/-/taskkill-4.0.0.tgz", @@ -11587,91 +11439,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/tedious": { - "version": "18.6.1", - "resolved": "https://registry.npmjs.org/tedious/-/tedious-18.6.1.tgz", - "integrity": "sha512-9AvErXXQTd6l7TDd5EmM+nxbOGyhnmdbp/8c3pw+tjaiSXW9usME90ET/CRG1LN1Y9tPMtz/p83z4Q97B4DDpw==", - "dependencies": { - "@azure/core-auth": "^1.7.2", - "@azure/identity": "^4.2.1", - "@azure/keyvault-keys": "^4.4.0", - "@js-joda/core": "^5.6.1", - "@types/node": ">=18", - "bl": "^6.0.11", - "iconv-lite": "^0.6.3", - "js-md4": "^0.3.2", - "native-duplexpair": "^1.0.0", - "sprintf-js": "^1.1.3" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/tedious/node_modules/@types/node": { - "version": "22.9.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.9.0.tgz", - "integrity": "sha512-vuyHg81vvWA1Z1ELfvLko2c8f34gyA0zaic0+Rllc5lbCnbSyuvb2Oxpm6TAUAC/2xZN3QGqxBNggD1nNR2AfQ==", - "dependencies": { - "undici-types": "~6.19.8" - } - }, - "node_modules/tedious/node_modules/bl": { - "version": "6.0.16", - "resolved": "https://registry.npmjs.org/bl/-/bl-6.0.16.tgz", - "integrity": "sha512-V/kz+z2Mx5/6qDfRCilmrukUXcXuCoXKg3/3hDvzKKoSUx8CJKudfIoT29XZc3UE9xBvxs5qictiHdprwtteEg==", - "dependencies": { - "@types/readable-stream": "^4.0.0", - "buffer": "^6.0.3", - "inherits": "^2.0.4", - "readable-stream": "^4.2.0" - } - }, - "node_modules/tedious/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" - } - ], - "dependencies": { - "base64-js": "^1.3.1", - "ieee754": "^1.2.1" - } - }, - "node_modules/tedious/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==", - "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/tedious/node_modules/string_decoder": { - "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" - } - }, "node_modules/text-table": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", @@ -11979,11 +11746,6 @@ "node": ">=18.17" } }, - "node_modules/undici-types": { - "version": "6.19.8", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz", - "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==" - }, "node_modules/unified": { "version": "10.1.2", "resolved": "https://registry.npmjs.org/unified/-/unified-10.1.2.tgz", diff --git a/extensions/vscode/package.json b/extensions/vscode/package.json index 8d96504f0..355f8ab92 100644 --- a/extensions/vscode/package.json +++ b/extensions/vscode/package.json @@ -2,7 +2,7 @@ "name": "continue", "icon": "media/icon.png", "author": "Continue Dev, Inc", - "version": "0.9.233", + "version": "0.9.235", "repository": { "type": "git", "url": "https://github.com/continuedev/continue" @@ -651,7 +651,7 @@ "axios": "^1.2.5", "core": "file:../../core", "cors": "^2.8.5", - "dbinfoz": "^0.14.0", + "dbinfoz": "^0.11.0", "downshift": "^7.6.0", "esbuild": "^0.17.19", "express": "^4.18.2", diff --git a/extensions/vscode/src/commands.ts b/extensions/vscode/src/commands.ts index 43115ae93..f41a308ae 100644 --- a/extensions/vscode/src/commands.ts +++ b/extensions/vscode/src/commands.ts @@ -218,10 +218,16 @@ async function processDiff( } else if (fullPath) { fullPath = getFullyQualifiedPath(ide, fullPath); } else { - console.warn(`Unable to resolve filepath: ${newFilepath}`); + const curFile = await ide.getCurrentFile(); + fullPath = curFile?.path; } - if (!fullPath) return; + if (!fullPath) { + console.warn( + `Unable to resolve filepath while attempting to resolve diff: ${newFilepath}`, + ); + return; + } await ide.openFile(fullPath); diff --git a/gui/src/components/OnboardingCard/tabs/OnboardingLocalTab.tsx b/gui/src/components/OnboardingCard/tabs/OnboardingLocalTab.tsx index d16587427..e937070c9 100644 --- a/gui/src/components/OnboardingCard/tabs/OnboardingLocalTab.tsx +++ b/gui/src/components/OnboardingCard/tabs/OnboardingLocalTab.tsx @@ -59,11 +59,17 @@ function OnboardingLocalTab() { try { const result = await ideMessenger.request("llm/listModels", { title: ONBOARDING_LOCAL_MODEL_TITLE, - }) - + }); if (result.status === "success") { - setDownloadedOllamaModels(result.content); - setIsOllamaConnected(true); + // TODO - temporary fix, see notes + // https://github.com/continuedev/continue/pull/3059 + if (Array.isArray(result.content)) { + setDownloadedOllamaModels(result.content); + setIsOllamaConnected(true); + } else { + setDownloadedOllamaModels([]); + setIsOllamaConnected(false); + } } else { throw new Error("Failed to fetch models"); } diff --git a/gui/src/components/StepContainer/AcceptRejectAllButtons.tsx b/gui/src/components/StepContainer/AcceptRejectAllButtons.tsx index d8a17ec8a..632468a65 100644 --- a/gui/src/components/StepContainer/AcceptRejectAllButtons.tsx +++ b/gui/src/components/StepContainer/AcceptRejectAllButtons.tsx @@ -2,6 +2,7 @@ import { useContext } from "react"; import { IdeMessengerContext } from "../../context/IdeMessenger"; import { CheckIcon, XMarkIcon } from "@heroicons/react/24/outline"; import { ApplyState } from "core"; +import { getMetaKeyLabel } from "../../util"; export interface AcceptRejectAllButtonsProps { pendingApplyStates: ApplyState[]; @@ -37,7 +38,7 @@ export default function AcceptRejectAllButtons({ > {hasSinglePendingApplyStates ? ( - Reject + Reject ({getMetaKeyLabel()}⇧⌫) ) : ( <> Reject @@ -52,7 +53,7 @@ export default function AcceptRejectAllButtons({ > {hasSinglePendingApplyStates ? ( - Accept + Accept ({getMetaKeyLabel()}⇧⏎) ) : ( <> Accept diff --git a/gui/src/components/mainInput/TipTapEditor.tsx b/gui/src/components/mainInput/TipTapEditor.tsx index bde052274..7737e5f25 100644 --- a/gui/src/components/mainInput/TipTapEditor.tsx +++ b/gui/src/components/mainInput/TipTapEditor.tsx @@ -598,7 +598,7 @@ function TipTapEditor(props: TipTapEditorProps) { if (isOSREnabled) { handleJetBrainsOSRMetaKeyIssues(e, editor); - } else { + } else if (!isJetBrains()){ await handleVSCMetaKeyIssues(e, editor); } }; diff --git a/gui/src/components/markdown/StepContainerPreActionButtons.tsx b/gui/src/components/markdown/StepContainerPreActionButtons.tsx index 21fafc2f5..c316e769f 100644 --- a/gui/src/components/markdown/StepContainerPreActionButtons.tsx +++ b/gui/src/components/markdown/StepContainerPreActionButtons.tsx @@ -8,7 +8,7 @@ import { import { defaultBorderRadius, vscEditorBackground } from ".."; import { IdeMessengerContext } from "../../context/IdeMessenger"; import { isJetBrains } from "../../util"; -import { isTerminalCodeBlock } from "./utils"; +import { isTerminalCodeBlock, getTerminalCommand } from "./utils"; import HeaderButtonWithToolTip from "../gui/HeaderButtonWithToolTip"; import { CopyIconButton } from "../gui/CopyIconButton"; import useUIConfig from "../../hooks/useUIConfig"; @@ -88,6 +88,12 @@ export default function StepContainerPreActionButtons({ }); } + async function onClickRunTerminal(): Promise { + if (shouldRunTerminalCmd) { + return ideMessenger.ide.runCommand(getTerminalCommand(codeBlockContent)); + } + } + // Handle apply keyboard shortcut useWebviewListener( "applyCodeFromChat", @@ -120,7 +126,7 @@ export default function StepContainerPreActionButtons({ diff --git a/gui/src/context/IdeMessenger.ts b/gui/src/context/IdeMessenger.ts index 0b5329c61..c5c4f9b3e 100644 --- a/gui/src/context/IdeMessenger.ts +++ b/gui/src/context/IdeMessenger.ts @@ -138,13 +138,13 @@ export class IdeMessenger implements IIdeMessenger { const handler = (event: any) => { if (event.data.messageId === messageId) { window.removeEventListener("message", handler); - resolve(event.data.data); + resolve(event.data.data as WebviewMessengerResult); } }; window.addEventListener("message", handler); this.post(messageType, data, messageId); - }) as any; + }); } async *streamRequest( diff --git a/gui/src/pages/Edit/AddFileButton.tsx b/gui/src/pages/Edit/AddFileButton.tsx index 2f9e0f0dd..7fd7e7768 100644 --- a/gui/src/pages/Edit/AddFileButton.tsx +++ b/gui/src/pages/Edit/AddFileButton.tsx @@ -29,7 +29,7 @@ export default function AddFileButton() {
-
+
- + Add all open files diff --git a/gui/src/pages/Edit/CodeToEdit.tsx b/gui/src/pages/Edit/CodeToEdit.tsx index 26cb145d4..4197488fc 100644 --- a/gui/src/pages/Edit/CodeToEdit.tsx +++ b/gui/src/pages/Edit/CodeToEdit.tsx @@ -11,16 +11,16 @@ import AddFileButton from "./AddFileButton"; export default function WorkingSet() { const dispatch = useDispatch(); const ideMessenger = useContext(IdeMessengerContext); - const editModeState = useSelector((state: RootState) => state.editModeState); - - const hasCodeToEdit = editModeState.codeToEdit.length > 0; + const codeToEdit = useSelector( + (state: RootState) => state.editModeState.codeToEdit, + ); const title = - editModeState.codeToEdit.length === 0 + codeToEdit.length === 0 ? "Code to edit" - : editModeState.codeToEdit.length === 1 + : codeToEdit.length === 1 ? "Code to edit (1 item)" - : `Code to edit (${editModeState.codeToEdit.length} items)`; + : `Code to edit (${codeToEdit.length} items)`; function onDelete(rif: RangeInFileWithContents) { dispatch(removeCodeToEdit(rif)); @@ -38,7 +38,7 @@ export default function WorkingSet() { } } - const codeToEditItems = [...editModeState.codeToEdit] + const codeToEditItems = [...codeToEdit] .reverse() .map((code, i) => ( -
+
{title}
- {hasCodeToEdit && ( -
    + {codeToEdit.length > 0 && ( +
      {codeToEditItems}
    )} diff --git a/gui/src/pages/Edit/CodeToEditListItem.tsx b/gui/src/pages/Edit/CodeToEditListItem.tsx index 8d84ef34b..e672b8f89 100644 --- a/gui/src/pages/Edit/CodeToEditListItem.tsx +++ b/gui/src/pages/Edit/CodeToEditListItem.tsx @@ -40,7 +40,10 @@ export default function CodeToEditListItem({ let title = filepath; if ("range" in code) { - title += ` (${code.range.start.line + 1} - ${code.range.end.line + 1})`; + const start = code.range.start.line + 1; + const end = code.range.end.line + 1; + title += + start === end ? ` - Inserting at line ${start}` : ` (${start} - ${end})`; } const source = @@ -53,7 +56,7 @@ export default function CodeToEditListItem({ return (
  • setShowCodeSnippet((showCodeSnippet) => !showCodeSnippet)} >
    -
    +
    { e.stopPropagation(); @@ -98,6 +101,7 @@ export default function CodeToEditListItem({ />
    + {showCodeSnippet && (
    diff --git a/gui/src/pages/edit/index.tsx b/gui/src/pages/Edit/index.tsx similarity index 100% rename from gui/src/pages/edit/index.tsx rename to gui/src/pages/Edit/index.tsx diff --git a/manual-testing-sandbox/test.java b/manual-testing-sandbox/Calculator.java similarity index 99% rename from manual-testing-sandbox/test.java rename to manual-testing-sandbox/Calculator.java index 0f22df25a..b9b9147e9 100644 --- a/manual-testing-sandbox/test.java +++ b/manual-testing-sandbox/Calculator.java @@ -11,6 +11,7 @@ public class Calculator { return this; } + public double getResult() { return result; } diff --git a/manual-testing-sandbox/testCalculator.js b/manual-testing-sandbox/testCalculator.js deleted file mode 100644 index e69de29bb..000000000