Merge remote-tracking branch 'upstream/preview' into debug-context-provider

This commit is contained in:
commandblock2 2024-02-24 17:28:38 +08:00
commit 046138389c
40 changed files with 17911 additions and 493 deletions

View file

@ -26,7 +26,7 @@
</div>
## Task, not tab, auto-complete
## Task and tab autocomplete
### Answer coding questions
@ -52,6 +52,12 @@ Open a blank file and let Continue start new Python scripts, React components, e
- “/edit implement a c++ shortest path algo in a concise way”
- “/edit create a docker compose file with php and mysql server"
### And much more!
- Try out [experimental support for local tab autocomplete](https://continue.dev/docs/walkthroughs/tab-autocomplete) in VS Code
- Use [built-in context providers](https://continue.dev/docs/customization/context-providers#built-in-context-providers) or create your own [custom context providers](https://continue.dev/docs/customization/context-providers#building-your-own-context-provider)
- Use [built-in slash commands](https://arc.net/l/quote/zbhwfjmp) or create your own [custom slash commands](https://continue.dev/docs/customization/slash-commands#custom-slash-commands)
## Getting Started
#### Download for [VS Code](https://marketplace.visualstudio.com/items?itemName=Continue.continue) and [JetBrains](https://plugins.jetbrains.com/plugin/22707-continue-extension)

View file

@ -29,11 +29,10 @@ function formatExternalSnippet(
return lines.join("\n");
}
async function getTreePathAtCursor(
async function getAst(
filepath: string,
fileContents: string,
cursorIndex: number
): Promise<Parser.SyntaxNode[] | undefined> {
fileContents: string
): Promise<Parser.Tree | undefined> {
const parser = await getParserForFile(filepath);
if (!parser) {
@ -41,6 +40,13 @@ async function getTreePathAtCursor(
}
const ast = parser.parse(fileContents);
return ast;
}
async function getTreePathAtCursor(
ast: Parser.Tree,
cursorIndex: number
): Promise<Parser.SyntaxNode[] | undefined> {
const path = [ast.rootNode];
while (path[path.length - 1].childCount > 0) {
let foundChild = false;
@ -65,6 +71,35 @@ export interface AutocompleteSnippet {
content: string;
}
const BLOCK_TYPES = ["body", "statement_block"];
function shouldCompleteMultiline(
treePath: Parser.SyntaxNode[],
cursorLine: number
): boolean {
// If at the base of the file, do multiline
if (treePath.length === 1) {
return true;
}
// If at the first line of an otherwise empty funtion body, do multiline
for (let i = treePath.length - 1; i >= 0; i--) {
const node = treePath[i];
if (
BLOCK_TYPES.includes(node.type) &&
Math.abs(node.startPosition.row - cursorLine) <= 1
) {
let text = node.text;
text = text.slice(text.indexOf("{") + 1);
text = text.slice(0, text.lastIndexOf("}"));
text = text.trim();
return text.split("\n").length === 1;
}
}
return false;
}
export async function constructAutocompletePrompt(
filepath: string,
fullPrefix: string,
@ -77,23 +112,30 @@ export async function constructAutocompletePrompt(
character: number
) => Promise<AutocompleteSnippet | undefined>,
options: TabAutocompleteOptions
): Promise<{ prefix: string; suffix: string; useFim: boolean }> {
): Promise<{
prefix: string;
suffix: string;
useFim: boolean;
completeMultiline: boolean;
}> {
// Find external snippets
const snippets: AutocompleteSnippet[] = [];
let treePath;
let treePath: Parser.SyntaxNode[] | undefined;
try {
treePath = await getTreePathAtCursor(
filepath,
fullPrefix + fullSuffix,
fullPrefix.length
);
const ast = await getAst(filepath, fullPrefix + fullSuffix);
if (!ast) {
throw new Error(`AST undefined for ${filepath}`);
}
treePath = await getTreePathAtCursor(ast, fullPrefix.length);
} catch (e) {
console.error("Failed to parse AST", e);
}
// Get function def when inside call expression
let completeMultiline = false;
if (treePath) {
// Get function def when inside call expression
let callExpression = undefined;
for (let node of treePath.reverse()) {
if (node.type === "call_expression") {
@ -111,6 +153,10 @@ export async function constructAutocompletePrompt(
snippets.push(definition);
}
}
// Use AST to determine whether to complete multiline
let cursorLine = fullPrefix.split("\n").length - 1;
completeMultiline = shouldCompleteMultiline(treePath, cursorLine);
}
// Construct basic prefix / suffix
@ -133,5 +179,5 @@ export async function constructAutocompletePrompt(
);
let suffix = pruneLinesFromBottom(fullSuffix, maxSuffixTokens);
return { prefix, suffix, useFim: true };
return { prefix, suffix, useFim: true, completeMultiline };
}

View file

@ -4,24 +4,146 @@ export interface AutocompleteLanguageInfo {
endOfLine: string[];
}
// TypeScript
export const Typescript = {
stopWords: ["function", "class", "module", "export "],
stopWords: ["function", "class", "module", "export"],
comment: "//",
endOfLine: [";"],
};
// Python
export const Python = {
stopWords: ["def", "class"],
comment: "#",
endOfLine: [],
};
// Java
export const Java = {
stopWords: ["class", "function"],
comment: "//",
endOfLine: [";"],
};
// C++
export const Cpp = {
stopWords: ["class", "namespace", "template"],
comment: "//",
endOfLine: [";"],
};
// C#
export const CSharp = {
stopWords: ["class", "namespace", "void"],
comment: "//",
endOfLine: [";"],
};
// C
export const C = {
stopWords: ["if", "else", "while", "for", "switch", "case"],
comment: "//",
endOfLine: [";"],
};
// Scala
export const Scala = {
stopWords: ["def", "val", "var", "class", "object", "trait"],
comment: "//",
endOfLine: [";"],
};
// Go
export const Go = {
stopWords: ["func", "package", "import", "type"],
comment: "//",
endOfLine: [""],
};
// Rust
export const Rust = {
stopWords: ["fn", "mod", "pub", "struct", "enum", "trait"],
comment: "//",
endOfLine: [";"],
};
// Haskell
export const Haskell = {
stopWords: ["data", "type", "newtype", "class", "instance", "let", "in", "where"],
comment: "--",
endOfLine: [""],
};
// PHP
export const PHP = {
stopWords: ["function", "class", "namespace", "use"],
comment: "//",
endOfLine: [";"],
};
// Ruby on Rails
export const RubyOnRails = {
stopWords: ["def", "class", "module"],
comment: "#",
endOfLine: [""],
};
// Swift
export const Swift = {
stopWords: ["func", "class", "struct", "import"],
comment: "//",
endOfLine: [";"],
};
// Kotlin
export const Kotlin = {
stopWords: ["fun", "class", "package", "import"],
comment: "//",
endOfLine: [";"],
};
// Ruby
export const Ruby = {
stopWords: ["class", "module", "def"],
comment: "#",
endOfLine: [""],
};
// Clojure
export const Clojure = {
stopWords: ["def", "fn", "let", "do", "if", "defn", "ns", "defmacro"],
comment: ";",
endOfLine: [""],
};
// Julia
export const Julia = {
stopWords: ["function", "macro", "if", "else", "elseif", "while", "for", "begin", "end", "module"],
comment: "#",
endOfLine: [";"],
};
// F#
export const FSharp = {
stopWords: ["let", "type", "module", "namespace", "open", "if", "then", "else", "match", "with"],
comment: "//",
endOfLine: [""],
};
// R
export const R = {
stopWords: ["function", "if", "else", "for", "while", "repeat", "library", "require"],
comment: "#",
endOfLine: [""],
};
// Dart
export const Dart = {
stopWords: ["class", "import", "void", "enum"],
comment: "//",
endOfLine: [";"],
};
export const LANGUAGES: { [extension: string]: AutocompleteLanguageInfo } = {
ts: Typescript,
js: Typescript,
@ -30,4 +152,31 @@ export const LANGUAGES: { [extension: string]: AutocompleteLanguageInfo } = {
py: Python,
pyi: Python,
java: Java,
};
cpp: Cpp,
cxx: Cpp,
h: Cpp,
hpp: Cpp,
cs: CSharp,
c: C,
scala: Scala,
sc: Scala,
go: Go,
rs: Rust,
hs: Haskell,
php: PHP,
rb: Ruby,
rails: RubyOnRails,
swift: Swift,
kt: Kotlin,
clj: Clojure,
cljs: Clojure,
cljc: Clojure,
jl: Julia,
fs: FSharp,
fsi: FSharp,
fsx: FSharp,
fsscript: FSharp,
r: R,
R: R,
dart: Dart,
};

View file

@ -29,13 +29,16 @@ import CustomLLMClass from "../llm/llms/CustomLLM";
import mergeJson from "../util/merge";
import {
getConfigJsPath,
getConfigJsPathForRemote,
getConfigJsonPath,
getConfigJsonPathForRemote,
getConfigTsPath,
migrate,
} from "../util/paths";
function loadSerializedConfig(
workspaceConfigs: ContinueRcJson[]
workspaceConfigs: ContinueRcJson[],
remoteConfigServerUrl: URL | undefined
): SerializedContinueConfig {
const configPath = getConfigJsonPath();
let contents = fs.readFileSync(configPath, "utf8");
@ -114,6 +117,14 @@ function loadSerializedConfig(
fs.writeFileSync(configPath, contents, "utf8");
});
if (remoteConfigServerUrl) {
const remoteConfigJson = fs.readFileSync(
getConfigJsonPathForRemote(remoteConfigServerUrl),
"utf-8"
);
config = mergeJson(config, JSON.parse(remoteConfigJson), "merge");
}
for (const workspaceConfig of workspaceConfigs) {
config = mergeJson(config, workspaceConfig, workspaceConfig.mergeBehavior);
}
@ -339,9 +350,13 @@ async function buildConfigTs(browser: boolean) {
async function loadFullConfigNode(
readFile: (filepath: string) => Promise<string>,
workspaceConfigs: ContinueRcJson[]
workspaceConfigs: ContinueRcJson[],
remoteConfigServerUrl: URL | undefined
): Promise<ContinueConfig> {
let serialized = loadSerializedConfig(workspaceConfigs);
let serialized = loadSerializedConfig(
workspaceConfigs,
remoteConfigServerUrl
);
let intermediate = serializedToIntermediateConfig(serialized);
const configJsContents = await buildConfigTs(false);
@ -359,6 +374,24 @@ async function loadFullConfigNode(
console.log("Error loading config.ts: ", e);
}
}
// Remote config.js
if (remoteConfigServerUrl) {
try {
const configJsPathForRemote = getConfigJsPathForRemote(
remoteConfigServerUrl
);
const module = await require(configJsPathForRemote);
delete require.cache[require.resolve(configJsPathForRemote)];
if (!module.modifyConfig) {
throw new Error("config.ts does not export a modifyConfig function.");
}
intermediate = module.modifyConfig(intermediate);
} catch (e) {
console.log("Error loading remotely set config.js: ", e);
}
}
const finalConfig = await intermediateToFinalConfig(intermediate, readFile);
return finalConfig;
}

View file

@ -6,7 +6,7 @@ import {
} from "../..";
import { getBasename } from "../../util";
import { getFileOutlineHighlights } from "llm-code-highlighter/dist/index.continue";
import { getOutlines } from "llm-code-highlighter/dist/index.continue";
class CodeOutlineContextProvider extends BaseContextProvider {
static description: ContextProviderDescription = {
@ -32,7 +32,7 @@ class CodeOutlineContextProvider extends BaseContextProvider {
};
})
);
const outlines = await getFileOutlineHighlights(
const outlines = await getOutlines(
allFiles
.filter((file) => file.content.length > 0)
.map((file) => {

View file

@ -0,0 +1,134 @@
import type { AxiosInstance } from "axios";
import { BaseContextProvider } from "..";
import {
ContextItem,
ContextProviderDescription,
ContextProviderExtras,
ContextSubmenuItem,
LoadSubmenuItemsArgs,
} from "../..";
const { convert } = require("adf-to-md");
interface JiraComment {
id: string;
created: string;
updated: string;
author: {
emailAddress: string;
displayName: string;
};
body: object;
}
interface JiraIssue {
id: string;
key: string;
fields: {
summary: string;
description: object;
comment: {
total: number;
comments: Array<JiraComment>;
};
};
}
interface QueryResults {
issues: JiraIssue[];
}
class JiraIssuesContextProvider extends BaseContextProvider {
static description: ContextProviderDescription = {
title: "jira",
displayTitle: "Jira Issues",
description: "Reference Jira issues",
type: "submenu",
};
private async createApi(): Promise<AxiosInstance> {
const { default: Axios } = await import("axios");
return Axios.create({
baseURL: `https://${this.options.domain}/rest/api/3/`,
auth: {
username: this.options.email,
password: this.options.token,
},
});
}
async getContextItems(
query: string,
extras: ContextProviderExtras
): Promise<ContextItem[]> {
const issueId = query;
const api = await this.createApi();
const issue = await api
.get<JiraIssue>(`/issue/${issueId}`, {
params: {
fields: "description,comment,summary",
},
})
.then((result) => result.data);
const parts = [
`# Jira Issue ${issue.key}: ${issue.fields.summary}`,
"## Description",
issue.fields.description
? convert(issue.fields.description).result
: "No description",
];
if (issue.fields.comment.comments.length > 0) {
parts.push("## Comments");
parts.push(
...issue.fields.comment.comments.map((comment) => {
const commentText = convert(comment.body).result;
return `### ${comment.author.displayName} on ${comment.created}\n\n${commentText}`;
})
);
}
const content = parts.join("\n\n");
return [
{
name: `${issue.key}: ${issue.fields.summary}`,
content,
description: issue.key,
},
];
}
async loadSubmenuItems(
args: LoadSubmenuItemsArgs
): Promise<ContextSubmenuItem[]> {
const api = await this.createApi();
try {
const results = await api.get<QueryResults>("/search", {
params: {
jql:
this.options.issueQuery ??
`assignee = currentUser() AND resolution = Unresolved order by updated DESC`,
fields: "summary",
},
});
return results.data.issues.map((issue) => ({
id: issue.id,
title: `${issue.key}: ${issue.fields.summary}`,
description: "",
}));
} catch (ex) {
console.error(`Unable to get jira tickets: ${ex}`);
return [];
}
}
}
export default JiraIssuesContextProvider;

View file

@ -16,6 +16,7 @@ import SearchContextProvider from "./SearchContextProvider";
import TerminalContextProvider from "./TerminalContextProvider";
import LocalsProvider from "./LocalsProvider";
import URLContextProvider from "./URLContextProvider";
import JiraIssuesContextProvider from "./JiraIssuesContextProvider";
const Providers: (typeof BaseContextProvider)[] = [
DiffContextProvider,
@ -34,6 +35,7 @@ const Providers: (typeof BaseContextProvider)[] = [
DocsContextProvider,
CodeHighlightsContextProvider,
CodeOutlineContextProvider,
JiraIssuesContextProvider,
];
export function contextProviderClassFromName(

View file

@ -137,7 +137,7 @@ export async function retrieveContextItemsFromEmbeddings(
if (extras.fullInput.trim() !== "") {
ftsResults = await ftsIndex.retrieve(
tags,
extras.fullInput.trim().split(" ").join(" OR "),
extras.fullInput.trim().split(" ").map(element => `"${element}"`).join(" OR "),
nRetrieve / 2,
filterDirectory,
undefined

4
core/index.d.ts vendored
View file

@ -417,7 +417,8 @@ type ContextProviderName =
| "http"
| "codebase"
| "problems"
| "folder";
| "folder"
| "jira";
type TemplateType =
| "llama2"
@ -541,6 +542,7 @@ interface BaseCompletionOptions {
mirostat?: number;
stop?: string[];
maxTokens?: number;
numThreads?: number;
}
export interface ModelDescription {

View file

@ -165,12 +165,14 @@ async function getAddRemoveForTag(
case AddRemoveResultType.Remove:
await db.run(
`DELETE FROM tag_catalog WHERE
path IN (?) AND
cacheKey = ? AND
path = ? AND
dir = ? AND
branch = ? AND
artifactId = ?
`,
remove.map((r) => `'${r.path}'`).join(", "),
cacheKey,
path,
tag.directory,
tag.branch,
tag.artifactId

View file

@ -31,7 +31,7 @@ class Gemini extends BaseLLM {
messages: ChatMessage[],
options: CompletionOptions
): AsyncGenerator<ChatMessage> {
const apiUrl = `https://${this.region}-aiplatform.googleapis.com/v1/projects/${this.projectId}/locations/us-central1/publishers/google/models/gemini-pro:streamGenerateContent`;
const apiUrl = `https://${this.region}-aiplatform.googleapis.com/v1/projects/${this.projectId}/locations/${this.region}/publishers/google/models/gemini-pro:streamGenerateContent`;
const body = {
contents: messages.map((msg) => {
return {
@ -60,8 +60,12 @@ class Gemini extends BaseLLM {
if (data[0]?.error) {
throw new Error(data[0].error.message);
}
yield data[0]?.candidates?.[0]?.content?.parts?.[0]?.text || "";
}
let combinedText = '';
for (const entry of data || []) {
combinedText += entry?.candidates?.[0]?.content?.parts?.[0]?.text || '';
}
yield { role: "assistant", content: combinedText.trim() }; }
}
export default Gemini;

View file

@ -13,7 +13,7 @@ class GooglePalm extends BaseLLM {
static providerName: ModelProvider = "google-palm";
static defaultOptions: Partial<LLMOptions> = {
model: "chat-bison-001",
model: "gemini-pro",
apiBase: "https://generativelanguage.googleapis.com",
};
@ -29,16 +29,37 @@ class GooglePalm extends BaseLLM {
}
}
private removeSystemMessage(messages: ChatMessage[]) {
const msgs = [...messages];
if (msgs[0]?.role === "system") {
let sysMsg = msgs.shift()!.content;
// @ts-ignore
if (msgs[0]?.role === "user") {
msgs[0].content = `System message - follow these instructions in every response: ${sysMsg}\n\n---\n\n${msgs[0].content}`;
}
}
return msgs;
}
protected async *_streamChat(
messages: ChatMessage[],
options: CompletionOptions
): AsyncGenerator<ChatMessage> {
let convertedMsgs = this.removeSystemMessage(messages);
if (options.model.includes("gemini")) {
for await (const message of this.streamChatGemini(messages, options)) {
for await (const message of this.streamChatGemini(
convertedMsgs,
options
)) {
yield message;
}
} else {
for await (const message of this.streamChatBison(messages, options)) {
for await (const message of this.streamChatBison(
convertedMsgs,
options
)) {
yield message;
}
}

View file

@ -1,30 +1,49 @@
import { BaseLLM } from "..";
import { CompletionOptions, LLMOptions, ModelProvider } from "../..";
import { streamResponse } from "../stream";
import { CompletionOptions, ModelProvider } from "../..";
import { streamSse } from "../stream";
class HuggingFaceInferenceAPI extends BaseLLM {
static providerName: ModelProvider = "huggingface-inference-api";
static defaultOptions: Partial<LLMOptions> | undefined = {
apiBase: "https://api-inference.huggingface.co",
};
private _convertArgs(options: CompletionOptions) {
return {
max_new_tokens: options.maxTokens ?? 1024,
temperature: options.temperature,
top_k: options.topK,
top_p: options.topP,
};
}
protected async *_streamComplete(
prompt: string,
options: CompletionOptions
): AsyncGenerator<string> {
const response = await this.fetch(
`${this.apiBase}/models/${options.model}`,
{
headers: { Authorization: `Bearer ${this.apiKey}` },
method: "POST",
body: JSON.stringify({
inputs: prompt,
stream: true,
}),
if (!this.apiBase) {
throw new Error(
"No API base URL provided. Please add the `apiBase` field in your config.json."
);
}
const response = await this.fetch(this.apiBase, {
headers: {
Authorization: `Bearer ${this.apiKey}`,
"Content-Type": "application/json",
Accept: "application/json",
},
method: "POST",
body: JSON.stringify({
inputs: prompt,
stream: true,
parameters: this._convertArgs(options),
}),
});
for await (const chunk of streamSse(response)) {
let text = chunk?.token?.text ?? "";
if (text.endsWith("</s>")) {
yield text.slice(0, -5);
} else {
yield text;
}
);
for await (const chunk of streamResponse(response)) {
yield chunk;
}
}
}

View file

@ -120,6 +120,7 @@ class Ollama extends BaseLLM {
stop: options.stop,
num_ctx: this.contextLength,
mirostat: options.mirostat,
num_thread: options.numThreads,
},
};

View file

@ -1,14 +1,13 @@
import { ChatMessage } from "../..";
import { stripImages } from "../countTokens";
/**
* @description Template for LLAMA2 messages:
*
*
* <s>[INST] <<SYS>>
* {{ system_prompt }}
* <</SYS>>
*
*
* {{ user_msg_1 }} [/INST] {{ model_answer_1 }} </s><s>[INST] {{ user_msg_2 }} [/INST] {{ model_answer_2 }} </s><s>[INST] {{ user_msg_3 }} [/INST]
*/
function llama2TemplateMessages(msgs: ChatMessage[]): string {
@ -131,6 +130,9 @@ function templateAlpacaMessages(msgs: ChatMessage[]): string {
if (msgs[0].role === "system") {
prompt += `${msgs[0].content}\n\n`;
msgs.shift();
} else {
prompt +=
"Below is an instruction that describes a task. Write a response that appropriately completes the request.\n\n";
}
for (const msg of msgs) {

2044
core/package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -21,12 +21,14 @@
"@octokit/rest": "^20.0.2",
"@types/node-fetch": "^2.6.11",
"@xenova/transformers": "^2.14.0",
"adf-to-md": "^1.1.0",
"axios": "^1.6.7",
"cheerio": "^1.0.0-rc.12",
"dotenv": "^16.3.1",
"fastest-levenshtein": "^1.0.16",
"handlebars": "^4.7.8",
"js-tiktoken": "^1.0.8",
"llm-code-highlighter": "^0.0.9",
"llm-code-highlighter": "^0.0.13",
"node-fetch": "^3.3.2",
"node-html-markdown": "^1.3.0",
"ollama": "^0.4.6",

View file

@ -183,3 +183,30 @@ export function getTabAutocompleteCacheSqlitePath(): string {
export function getDocsSqlitePath(): string {
return path.join(getIndexFolderPath(), "docs.sqlite");
}
export function getRemoteConfigsFolderPath(): string {
const dir = path.join(getContinueGlobalPath(), ".configs");
if (!fs.existsSync(dir)) {
fs.mkdirSync(dir);
}
return dir;
}
export function getPathToRemoteConfig(remoteConfigServerUrl: URL): string {
const dir = path.join(
getRemoteConfigsFolderPath(),
remoteConfigServerUrl.hostname
);
if (!fs.existsSync(dir)) {
fs.mkdirSync(dir);
}
return dir;
}
export function getConfigJsonPathForRemote(remoteConfigServerUrl: URL): string {
return path.join(getPathToRemoteConfig(remoteConfigServerUrl), "config.json");
}
export function getConfigJsPathForRemote(remoteConfigServerUrl: URL): string {
return path.join(getPathToRemoteConfig(remoteConfigServerUrl), "config.js");
}

File diff suppressed because it is too large Load diff

View file

@ -112,6 +112,32 @@ Type '@issue' to reference the conversation in a GitHub issue. Make sure to incl
}
```
### Jira Issues
Type '@jira' to reference the conversation in a Jira issue. Make sure to include your own [Atlassian API Token](https://id.atlassian.com/manage-profile/security/api-tokens).
```json
{
"name": "issue",
"params": {
"domain": "company.atlassian.net",
"email": "someone@somewhere.com",
"token ": "ATATT..."
}
}
```
#### Issue Query
By default, the following query will be used to find issues:
```jql
assignee = currentUser() AND resolution = Unresolved order by updated DESC
```
You can override this query by setting the `issueQuery` parameter.
### Code Outline
Type '@outline' to reference the outline of all currently open files. The outline of a files consists of only the function and class definitions in the file. Supported file extensions are '.js', '.mjs', '.go', '.c', '.cc', '.cs', '.cpp', '.el', '.ex', '.elm', '.java', '.ml', '.php', '.ql', '.rb', '.rs', '.ts'

View file

@ -6,15 +6,14 @@ When you first install Continue, you can try it out for free using a proxy serve
Once you're ready to use your own API key or a different model / provider, press the `+` button in the bottom left to add a new model to your `config.json`.
If you are unsure what model or provider to use, here is a rule of thumb:
If you are unsure what model or provider to use, here is our current rule of thumb:
- Use GPT-4 via OpenAI if you want the best possible model overall right now
- Use Phind CodeLlama or Mixtral 8x7B via Together if you want the best open-source model right now
- Use CodeLlama via Ollama if you want to run a model locally on Mac or Linux
- Use CodeLlama via LM Studio if you want to run a model locally on Windows
- Use GPT-4 via OpenAI if you want the best possible model overall
- Use DeepSeek Coder 33B via the Together API if you want the best open-source model
- Use DeepSeek Coder 6.7B with Ollama if you want to run a model locally
Learn more:
- [Select a provider](select-provider.md)
- [Select a model](select-model.md)
- [Configuration](configuration.md)
- [Configuration](configuration.md)

View file

@ -1,6 +1,6 @@
# HuggingFaceInferenceAPI
# HuggingFace Inference Endpoints
Hugging Face Inference API is a great option for newly released language models. Sign up for an account and add billing [here](https://huggingface.co/settings/billing), access the Inference Endpoints [here](https://ui.endpoints.huggingface.co), click on “New endpoint”, and fill out the form (e.g. select a model like [WizardCoder-Python-34B-V1.0](https://huggingface.co/WizardLM/WizardCoder-Python-34B-V1.0)), and then deploy your model by clicking “Create Endpoint”. Change `~/.continue/config.json` to look like this:
Hugging Face Inference Endpoints are an easy way to setup instances of open-source language models on any cloud. Sign up for an account and add billing [here](https://huggingface.co/settings/billing), access the Inference Endpoints [here](https://ui.endpoints.huggingface.co), click on “New endpoint”, and fill out the form (e.g. select a model like [WizardCoder-Python-34B-V1.0](https://huggingface.co/WizardLM/WizardCoder-Python-34B-V1.0)), and then deploy your model by clicking “Create Endpoint”. Change `~/.continue/config.json` to look like this:
```json title="~/.continue/config.json"
{

View file

@ -8,10 +8,21 @@
{
"title": "Ollama",
"provider": "ollama",
"model": "llama2-7b"
"model": "llama2-7b",
"completionOptions": {}
}
]
}
```
## Completion Options
In addition to the model type, you can also configure some of the parameters that Ollama uses to run the model.
- temperature: options.temperature - This is a parameter that controls the randomness of the generated text. Higher values result in more creative but potentially less coherent outputs, while lower values lead to more predictable and focused outputs.
- top_p: options.topP - This sets a threshold (between 0 and 1) to control how diverse the predicted tokens should be. The model generates tokens that are likely according to their probability distribution, but also considers the top-k most probable tokens.
- top_k: options.topK - This parameter limits the number of unique tokens to consider when generating the next token in the sequence. Higher values increase the variety of generated sequences, while lower values lead to more focused outputs.
- num_predict: options.maxTokens - This determines the maximum number of tokens (words or characters) to generate for the given input prompt.
- num_thread: options.numThreads - This is the multi-threading configuration option that controls how many threads the model uses for parallel processing. Higher values may lead to faster generation times but could also increase memory usage and complexity. Set this to one or two lower than the number of threads your CPU can handle to leave some for your GUI when running the model locally.
[View the source](https://github.com/continuedev/continue/blob/main/core/llm/llms/Ollama.ts)

View file

@ -16,7 +16,7 @@ Once it has been downloaded, you should begin to see completions in VS Code.
All of the configuration options available for chat models are available to use for tab-autocomplete. For example, if you wanted to use a remote Ollama instance you would edit your `config.json` like this:
```json
```json title=~/.continue/config.json
{
"tabAutocompleteModel": {
"title": "Tab Autocomplete Model",
@ -50,6 +50,24 @@ This object allows you to customize the behavior of tab-autocomplete. The availa
- `prefixPercentage`: The percentage of the input that should be dedicated to the prefix. (Number)
- `template`: An optional template string to be used for autocomplete. It will be rendered with the Mustache templating language, and is passed the 'prefix' and 'suffix' variables. (String)
### Full example
```json title=~/.continue/config.json
{
"tabAutocompleteModel": {
"title": "Tab Autocomplete Model",
"provider": "ollama",
"model": "deepseek-coder:1.3b-base",
"apiBase": "https://<my endpoint>"
},
"tabAutocompleteOptions": {
"useCopyBuffer": false,
"maxPromptTokens": 400,
"prefixPercentage": 0.5
}
}
```
## Troubleshooting
### I'm not seeing any completions

View file

@ -49,6 +49,11 @@
"description": "The maximum number of tokens to generate.",
"default": 600,
"type": "integer"
},
"numThreads": {
"title": "Number of threads",
"description": "The number of threads used in the generation process. Only available for Ollama (this is the num_thread parameter)",
"type": "integer"
}
}
},
@ -71,8 +76,15 @@
"title": "Ca Bundle Path",
"description": "Path to a custom CA bundle to use when making the HTTP request",
"anyOf": [
{ "type": "string" },
{ "type": "array", "items": { "type": "string" } }
{
"type": "string"
},
{
"type": "array",
"items": {
"type": "string"
}
}
]
},
"proxy": {
@ -291,7 +303,7 @@
"if": {
"properties": {
"provider": {
"enum": ["huggingface-tgi"]
"enum": ["huggingface-tgi", "huggingface-inference-api"]
}
}
},
@ -371,7 +383,9 @@
"llama2-13b"
]
},
{ "type": "string" }
{
"type": "string"
}
]
},
"markdownDescription": "Select a pre-defined option, or find an exact model ID from Replicate [here](https://replicate.com/collections/streaming-language-models)."
@ -457,7 +471,9 @@
"AUTODETECT"
]
},
{ "type": "string" }
{
"type": "string"
}
]
}
}
@ -476,8 +492,12 @@
"properties": {
"model": {
"anyOf": [
{ "enum": ["claude-2", "claude-instant-1"] },
{ "type": "string" }
{
"enum": ["claude-2", "claude-instant-1"]
},
{
"type": "string"
}
]
}
}
@ -526,7 +546,9 @@
"phind-codellama-34b"
]
},
{ "type": "string" }
{
"type": "string"
}
],
"markdownDescription": "Select a pre-defined option, or find an exact model string from Together AI [here](https://docs.together.ai/docs/inference-models)."
}
@ -594,7 +616,9 @@
"starcoder-3b"
]
},
{ "type": "string" }
{
"type": "string"
}
]
}
}
@ -639,7 +663,9 @@
"AUTODETECT"
]
},
{ "type": "string" }
{
"type": "string"
}
],
"markdownDescription": "Select a pre-defined option, or find the exact model tag for an Ollama model [here](https://ollama.ai/library)."
}
@ -822,7 +848,9 @@
"starcoder-3b"
]
},
{ "type": "string" }
{
"type": "string"
}
]
}
}
@ -887,7 +915,9 @@
"Generate a commit message for the current changes"
]
},
{ "type": "string" }
{
"type": "string"
}
]
},
"description": {
@ -1021,7 +1051,9 @@
],
"type": "string"
},
{ "type": "string" }
{
"type": "string"
}
]
},
"params": {
@ -1122,6 +1154,41 @@
"required": ["params"]
}
},
{
"if": {
"properties": {
"name": {
"enum": ["jira"]
}
}
},
"then": {
"properties": {
"params": {
"properties": {
"domain": {
"type": "string",
"description": "Your Jira domain, for example company.atlassian.net."
},
"email": {
"type": "string",
"description": "The email that you log into Jira with"
},
"token": {
"type": "string",
"description": "Your atlassian API token from https://id.atlassian.com/manage-profile/security/api-tokens"
},
"issueQuery": {
"type": "string",
"description": "Customize the query used to find Jira issues"
}
},
"required": ["domain", "email", "token"]
}
},
"required": ["params"]
}
},
{
"if": {
"properties": {

View file

@ -1,2 +1,3 @@
media
textmate-syntaxes
**/*.tmLanguage
textmate-syntaxes

View file

@ -49,6 +49,11 @@
"description": "The maximum number of tokens to generate.",
"default": 600,
"type": "integer"
},
"numThreads": {
"title": "Number of threads",
"description": "The number of threads used in the generation process. Only available for Ollama (this is the num_thread parameter)",
"type": "integer"
}
}
},
@ -71,8 +76,15 @@
"title": "Ca Bundle Path",
"description": "Path to a custom CA bundle to use when making the HTTP request",
"anyOf": [
{ "type": "string" },
{ "type": "array", "items": { "type": "string" } }
{
"type": "string"
},
{
"type": "array",
"items": {
"type": "string"
}
}
]
},
"proxy": {
@ -291,7 +303,7 @@
"if": {
"properties": {
"provider": {
"enum": ["huggingface-tgi"]
"enum": ["huggingface-tgi", "huggingface-inference-api"]
}
}
},
@ -371,7 +383,9 @@
"llama2-13b"
]
},
{ "type": "string" }
{
"type": "string"
}
]
},
"markdownDescription": "Select a pre-defined option, or find an exact model ID from Replicate [here](https://replicate.com/collections/streaming-language-models)."
@ -457,7 +471,9 @@
"AUTODETECT"
]
},
{ "type": "string" }
{
"type": "string"
}
]
}
}
@ -476,8 +492,12 @@
"properties": {
"model": {
"anyOf": [
{ "enum": ["claude-2", "claude-instant-1"] },
{ "type": "string" }
{
"enum": ["claude-2", "claude-instant-1"]
},
{
"type": "string"
}
]
}
}
@ -526,7 +546,9 @@
"phind-codellama-34b"
]
},
{ "type": "string" }
{
"type": "string"
}
],
"markdownDescription": "Select a pre-defined option, or find an exact model string from Together AI [here](https://docs.together.ai/docs/inference-models)."
}
@ -594,7 +616,9 @@
"starcoder-3b"
]
},
{ "type": "string" }
{
"type": "string"
}
]
}
}
@ -639,7 +663,9 @@
"AUTODETECT"
]
},
{ "type": "string" }
{
"type": "string"
}
],
"markdownDescription": "Select a pre-defined option, or find the exact model tag for an Ollama model [here](https://ollama.ai/library)."
}
@ -822,7 +848,9 @@
"starcoder-3b"
]
},
{ "type": "string" }
{
"type": "string"
}
]
}
}
@ -887,7 +915,9 @@
"Generate a commit message for the current changes"
]
},
{ "type": "string" }
{
"type": "string"
}
]
},
"description": {
@ -1021,7 +1051,9 @@
],
"type": "string"
},
{ "type": "string" }
{
"type": "string"
}
]
},
"params": {
@ -1122,6 +1154,41 @@
"required": ["params"]
}
},
{
"if": {
"properties": {
"name": {
"enum": ["jira"]
}
}
},
"then": {
"properties": {
"params": {
"properties": {
"domain": {
"type": "string",
"description": "Your Jira domain, for example company.atlassian.net."
},
"email": {
"type": "string",
"description": "The email that you log into Jira with"
},
"token": {
"type": "string",
"description": "Your atlassian API token from https://id.atlassian.com/manage-profile/security/api-tokens"
},
"issueQuery": {
"type": "string",
"description": "Customize the query used to find Jira issues"
}
},
"required": ["domain", "email", "token"]
}
},
"required": ["params"]
}
},
{
"if": {
"properties": {

View file

@ -49,6 +49,11 @@
"description": "The maximum number of tokens to generate.",
"default": 600,
"type": "integer"
},
"numThreads": {
"title": "Number of threads",
"description": "The number of threads used in the generation process. Only available for Ollama (this is the num_thread parameter)",
"type": "integer"
}
}
},
@ -312,7 +317,8 @@
"properties": {
"provider": {
"enum": [
"huggingface-tgi"
"huggingface-tgi",
"huggingface-inference-api"
]
}
}
@ -1288,6 +1294,49 @@
]
}
},
{
"if": {
"properties": {
"name": {
"enum": [
"jira"
]
}
}
},
"then": {
"properties": {
"params": {
"properties": {
"domain": {
"type": "string",
"description": "Your Jira domain, for example company.atlassian.net."
},
"email": {
"type": "string",
"description": "The email that you log into Jira with"
},
"token": {
"type": "string",
"description": "Your atlassian API token from https://id.atlassian.com/manage-profile/security/api-tokens"
},
"issueQuery": {
"type": "string",
"description": "Customize the query used to find Jira issues"
}
},
"required": [
"domain",
"email",
"token"
]
}
},
"required": [
"params"
]
}
},
{
"if": {
"properties": {

View file

@ -15,3 +15,11 @@ Continue is currently in the left sidebar, but we recommend moving it to the rig
<kbd>Cmd/Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>L</kbd> = Quick edit
<kbd>Cmd/Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>R</kbd> = Automatically debug terminal
## ⚡️ Setting up tab autocomplete
1. Download [Ollama](https://ollama.ai)
2. Download starcoder:3b by running `ollama run starcoder:3b` in the terminal
3. Click the `Continue` button in the status bar (bottom right of the VS Code window) to enable autocomplete
![Autocomplete](./autocomplete.gif)

File diff suppressed because it is too large Load diff

View file

@ -1,7 +1,7 @@
{
"name": "continue",
"icon": "media/icon.png",
"version": "0.9.68",
"version": "0.9.72",
"repository": {
"type": "git",
"url": "https://github.com/continuedev/continue"
@ -66,6 +66,21 @@
"type": "boolean",
"default": false,
"markdownDescription": "Enable Continue's experimental tab autocomplete feature (pre-release only). Read our walkthrough to learn about configuration and how to share feedback: [continue.dev › Walkthrough: Tab Autocomplete](https://continue.dev/docs/walkthroughs/tab-autocomplete)"
},
"continue.remoteConfigServerUrl": {
"type": "string",
"default": null,
"markdownDescription": "If your team is set up to use shared configuration, enter the server URL here and your user token below to enable automatic syncing."
},
"continue.userToken": {
"type": "string",
"default": null,
"markdownDescription": "If your team is set up to use shared configuration, enter your user token here and your server URL above to enable automatic syncing."
},
"continue.remoteConfigSyncPeriod": {
"type": "number",
"default": 60,
"description": "The period of time in minutes between automatic syncs."
}
}
},

View file

@ -14,6 +14,7 @@ import {
setupStatusBar,
} from "../lang-server/completionProvider";
import { vsCodeIndexCodebase } from "../util/indexCodebase";
import { setupRemoteConfigSync } from "../util/remoteConfig";
import { getExtensionVersion } from "../util/util";
import { getExtensionUri } from "../util/vscode";
import { setupInlineTips } from "./inlineTips";
@ -168,4 +169,10 @@ export async function activateExtension(context: vscode.ExtensionContext) {
extensionVersion: getExtensionVersion(),
});
}
try {
setupRemoteConfigSync();
} catch (e) {
console.warn(`Failed to sync remote config: ${e}`);
}
}

View file

@ -307,12 +307,7 @@ class IdeProtocolClient {
// In some cases vscode.window.visibleTextEditors can return non-code editors
// e.g. terminal editors in side-by-side mode
private documentIsCode(document: vscode.TextDocument) {
return (
!(
document.languageId === "plaintext" &&
document.getText() === "accessible-buffer-accessible-buffer-"
) && !document.uri.scheme.startsWith("git")
);
return document.uri.scheme === "file";
}
getOpenFiles(): string[] {

View file

@ -273,15 +273,16 @@ async function getTabCompletion(
Math.min(pos.line + 1, document.lineCount - 1)
).text;
const clipboardText = await vscode.env.clipboard.readText();
const { prefix, suffix } = await constructAutocompletePrompt(
document.uri.toString(),
fullPrefix,
fullSuffix,
clipboardText,
lang,
getDefinition,
options
);
const { prefix, suffix, completeMultiline } =
await constructAutocompletePrompt(
document.uri.toString(),
fullPrefix,
fullSuffix,
clipboardText,
lang,
getDefinition,
options
);
const { template, completionOptions } = options.template
? { template: options.template, completionOptions: {} }
@ -310,7 +311,7 @@ async function getTabCompletion(
"```",
...lang.stopWords,
];
if (options.disableMultiLineCompletions) {
if (options.disableMultiLineCompletions || !completeMultiline) {
stop.unshift("\n");
}
let generator = GeneratorReuseManager.getGenerator(prefix, () =>

View file

@ -61,9 +61,15 @@ class VsCodeConfigHandler {
} catch (e) {
console.warn("Failed to load workspace configs");
}
const remoteConfigServerUrl = vscode.workspace
.getConfiguration("continue")
.get<string | undefined>("remoteConfigServerUrl", undefined);
this.savedConfig = await loadFullConfigNode(
ideProtocolClient.readFile,
workspaceConfigs
workspaceConfigs,
remoteConfigServerUrl ? new URL(remoteConfigServerUrl) : undefined
);
this.savedConfig.allowAnonymousTelemetry =
this.savedConfig.allowAnonymousTelemetry &&

View file

@ -1,133 +0,0 @@
export abstract class TerminalSnooper<T> {
abstract onData(data: string): void;
abstract onWrite(data: string): void;
callback: (data: T) => void;
constructor(callback: (data: T) => void) {
this.callback = callback;
}
}
function stripAnsi(data: string) {
const pattern = [
"[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)",
"(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))",
].join("|");
let regex = new RegExp(pattern, "g");
return data.replace(regex, "");
}
export class CommandCaptureSnooper extends TerminalSnooper<string> {
stdinBuffer = "";
cursorPos = 0;
stdoutHasInterrupted = false;
static RETURN_KEY = "\r";
static DEL_KEY = "\x7F";
static UP_KEY = "\x1B[A";
static DOWN_KEY = "\x1B[B";
static RIGHT_KEY = "\x1B[C";
static LEFT_KEY = "\x1B[D";
static CONTROL_KEYS = new Set([
CommandCaptureSnooper.RETURN_KEY,
CommandCaptureSnooper.DEL_KEY,
CommandCaptureSnooper.UP_KEY,
CommandCaptureSnooper.DOWN_KEY,
CommandCaptureSnooper.RIGHT_KEY,
CommandCaptureSnooper.LEFT_KEY,
]);
private _cursorLeft() {
this.cursorPos = Math.max(0, this.cursorPos - 1);
}
private _cursorRight() {
this.cursorPos = Math.min(this.stdinBuffer.length, this.cursorPos + 1);
}
// Known issue: This does not handle autocomplete.
// Would be preferable to find a way that didn't require this all, just parsing by command prompt
// but that has it's own challenges
private handleControlKey(data: string): void {
switch (data) {
case CommandCaptureSnooper.DEL_KEY:
this.stdinBuffer =
this.stdinBuffer.slice(0, this.cursorPos - 1) +
this.stdinBuffer.slice(this.cursorPos);
this._cursorLeft();
break;
case CommandCaptureSnooper.RETURN_KEY:
this.callback(this.stdinBuffer);
this.stdinBuffer = "";
break;
case CommandCaptureSnooper.UP_KEY:
case CommandCaptureSnooper.DOWN_KEY:
this.stdinBuffer = "";
break;
case CommandCaptureSnooper.RIGHT_KEY:
this._cursorRight();
break;
case CommandCaptureSnooper.LEFT_KEY:
this._cursorLeft();
break;
}
}
onWrite(data: string): void {
if (CommandCaptureSnooper.CONTROL_KEYS.has(data)) {
this.handleControlKey(data);
} else {
this.stdinBuffer =
this.stdinBuffer.substring(0, this.cursorPos) +
data +
this.stdinBuffer.substring(this.cursorPos);
this._cursorRight();
}
}
onData(data: string): void {}
}
export class PythonTracebackSnooper extends TerminalSnooper<string> {
static tracebackStart = "Traceback (most recent call last):";
tracebackBuffer = "";
static tracebackEnd = (buf: string): string | undefined => {
let lines = buf.split("\n");
for (let i = 0; i < lines.length; i++) {
if (
lines[i].startsWith(" File") &&
i + 2 < lines.length &&
lines[i + 2][0] != " "
) {
return lines.slice(0, i + 3).join("\n");
}
}
return undefined;
};
override onWrite(data: string): void {}
override onData(data: string): void {
let strippedData = stripAnsi(data);
// Strip fully blank and squiggle lines
strippedData = strippedData
.split("\n")
.filter((line) => line.trim().length > 0 && line.trim() !== "~~^~~")
.join("\n");
// Snoop for traceback
let idx = strippedData.indexOf(PythonTracebackSnooper.tracebackStart);
if (idx >= 0) {
this.tracebackBuffer = strippedData.substr(idx);
} else if (this.tracebackBuffer.length > 0) {
this.tracebackBuffer += "\n" + strippedData;
}
// End of traceback, send to webview
if (this.tracebackBuffer.length > 0) {
let wholeTraceback = PythonTracebackSnooper.tracebackEnd(
this.tracebackBuffer
);
if (wholeTraceback) {
this.callback(wholeTraceback);
this.tracebackBuffer = "";
}
}
}
}

View file

@ -0,0 +1,68 @@
import {
getConfigJsPathForRemote,
getConfigJsonPathForRemote,
getPathToRemoteConfig,
} from "core/util/paths";
import * as fs from "fs";
import * as vscode from "vscode";
import { configHandler } from "../loadConfig";
let remoteConfigSyncInterval: NodeJS.Timer | undefined = undefined;
export async function setupRemoteConfigSync() {
const settings = vscode.workspace.getConfiguration("continue");
const userToken = settings.get<string | null>("userToken", null);
const remoteConfigServerUrl = settings.get<string | null>(
"remoteConfigServerUrl",
null
);
const remoteConfigSyncPeriod = settings.get<number>(
"remoteConfigSyncPeriod",
60
);
if (
userToken === null ||
remoteConfigServerUrl === null ||
remoteConfigServerUrl.trim() === ""
) {
return;
}
if (!URL.canParse(remoteConfigServerUrl)) {
vscode.window.showErrorMessage(
"The value set for 'remoteConfigServerUrl' is not valid: ",
remoteConfigServerUrl
);
return;
}
// Sync once
await syncRemoteConfig(userToken, new URL(remoteConfigServerUrl));
// Set timer to sync at user-defined interval
if (remoteConfigSyncInterval !== undefined) {
clearInterval(remoteConfigSyncInterval);
}
remoteConfigSyncInterval = setInterval(() => {
syncRemoteConfig(userToken, new URL(remoteConfigServerUrl));
}, remoteConfigSyncPeriod * 1000);
}
async function syncRemoteConfig(userToken: string, remoteConfigServerUrl: URL) {
const response = await fetch(new URL("sync", remoteConfigServerUrl).href, {
method: "GET",
headers: {
Authorization: `Bearer ${userToken}`,
},
});
const remoteConfigDirectory = getPathToRemoteConfig(remoteConfigServerUrl);
const { configJson, configJs } = await response.json();
fs.writeFileSync(
getConfigJsonPathForRemote(remoteConfigServerUrl),
configJson
);
fs.writeFileSync(getConfigJsPathForRemote(remoteConfigServerUrl), configJs);
configHandler.reloadConfig();
}

View file

@ -57,7 +57,7 @@
resolved "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.23.5.tgz"
integrity sha512-uU27kfDRlhfKl+w1U6vp16IuvSLtjAxdArVXPa9BvLkrr7CYIsxH5adpHObeAGY/41+syctUWOZ140a2Rvkgjw==
"@babel/core@^7.0.0", "@babel/core@^7.0.0-0", "@babel/core@^7.11.6", "@babel/core@^7.12.3", "@babel/core@^7.8.0":
"@babel/core@^7.0.0", "@babel/core@^7.0.0-0", "@babel/core@^7.11.6", "@babel/core@^7.12.3", "@babel/core@^7.23.9", "@babel/core@^7.8.0":
version "7.23.9"
resolved "https://registry.npmjs.org/@babel/core/-/core-7.23.9.tgz"
integrity sha512-5q0175NOjddqpvvzU+kDiSOAk4PfdO6FvwCWoQ6RO7rTzEe8vlo+4HVfcnAREhD4npMs0e9uZypjTwzZPCf/cw==
@ -462,7 +462,7 @@
js-yaml "^3.13.1"
resolve-from "^5.0.0"
"@istanbuljs/schema@^0.1.2":
"@istanbuljs/schema@^0.1.2", "@istanbuljs/schema@^0.1.3":
version "0.1.3"
resolved "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz"
integrity sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==
@ -669,9 +669,9 @@
"@jridgewell/trace-mapping" "^0.3.9"
"@jridgewell/resolve-uri@^3.1.0":
version "3.1.1"
resolved "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz"
integrity sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==
version "3.1.2"
resolved "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz"
integrity sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==
"@jridgewell/set-array@^1.0.1":
version "1.1.2"
@ -696,10 +696,10 @@
resolved "https://registry.npmjs.org/@jsdevtools/ono/-/ono-7.1.3.tgz"
integrity sha512-4JQNk+3mVzK3xh2rqd6RB4J46qUR19azEHBneZyTZM+c456qOrbbM/5xcR8huNCCcbVt7+UmizG6GuUvPvKUYg==
"@lancedb/vectordb-darwin-arm64@*", "@lancedb/vectordb-darwin-arm64@0.4.9":
version "0.4.9"
resolved "https://registry.npmjs.org/@lancedb/vectordb-darwin-arm64/-/vectordb-darwin-arm64-0.4.9.tgz"
integrity sha512-u56TXU0hvdLbknGwC7Ebza3/CUFeCTkoCy/sC6h0FtOGya+NV7jraAeXEwDzoZbfW08VYYxnp3TsCcpNU9lpTA==
"@lancedb/vectordb-darwin-arm64@*", "@lancedb/vectordb-darwin-arm64@0.4.10":
version "0.4.10"
resolved "https://registry.npmjs.org/@lancedb/vectordb-darwin-arm64/-/vectordb-darwin-arm64-0.4.10.tgz"
integrity sha512-y/uHOGb0g15pvqv5tdTyZ6oN+0QVpBmZDzKFWW6pPbuSZjB2uPqcs+ti0RB+AUdmS21kavVQqaNsw/HLKEGrHA==
"@lukeed/csprng@^1.0.0":
version "1.1.0"
@ -1128,9 +1128,9 @@
form-data "^4.0.0"
"@types/node@*", "@types/node@>= 14", "@types/node@16.x":
version "16.18.80"
resolved "https://registry.npmjs.org/@types/node/-/node-16.18.80.tgz"
integrity sha512-vFxJ1Iyl7A0+xB0uW1r1v504yItKZLdqg/VZELUZ4H02U0bXAgBisSQ8Erf0DMruNFz9ggoiEv6T8Ll9bTg8Jw==
version "16.18.82"
resolved "https://registry.npmjs.org/@types/node/-/node-16.18.82.tgz"
integrity sha512-pcDZtkx9z8XYV+ius2P3Ot2VVrcYOfXffBQUBuiszrlUzKSmoDYqo+mV+IoL8iIiIjjtOMvNSmH1hwJ+Q+f96Q==
"@types/node@20.3.0":
version "20.3.0"
@ -1170,9 +1170,9 @@
"@types/react" "*"
"@types/react@*", "@types/react@^16.8 || ^17.0 || ^18.0", "@types/react@^18.0.28", "@types/react@>=16":
version "18.2.55"
resolved "https://registry.npmjs.org/@types/react/-/react-18.2.55.tgz"
integrity sha512-Y2Tz5P4yz23brwm2d7jNon39qoAtMMmalOQv6+fEFt1mT+FcM3D841wDpoUvFXhaYenuROCy3FZYqdTjM7qVyA==
version "18.2.57"
resolved "https://registry.npmjs.org/@types/react/-/react-18.2.57.tgz"
integrity sha512-ZvQsktJgSYrQiMirAN60y4O/LRevIV8hUzSOSNB6gfR3/o3wCBFQx3sPwIYtuDMeiVgsSS3UzCV26tEzgnfvQw==
dependencies:
"@types/prop-types" "*"
"@types/scheduler" "*"
@ -1823,12 +1823,12 @@ browser-stdout@1.3.1:
integrity sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==
browserslist@^4.22.2, "browserslist@>= 4.21.0":
version "4.22.3"
resolved "https://registry.npmjs.org/browserslist/-/browserslist-4.22.3.tgz"
integrity sha512-UAp55yfwNv0klWNapjs/ktHoguxuQNGnOzxYmfnXIS+8AsRDZkSDxg7R1AX3GKzn078SBI5dzwzj/Yx0Or0e3A==
version "4.23.0"
resolved "https://registry.npmjs.org/browserslist/-/browserslist-4.23.0.tgz"
integrity sha512-QW8HiM1shhT2GuzkvklfjcKDiWFXHOeFCIA/huJPwHsslwcydgk7X+z2zXpEijP98UCY7HbubZt5J2Zgvf0CaQ==
dependencies:
caniuse-lite "^1.0.30001580"
electron-to-chromium "^1.4.648"
caniuse-lite "^1.0.30001587"
electron-to-chromium "^1.4.668"
node-releases "^2.0.14"
update-browserslist-db "^1.0.13"
@ -1905,14 +1905,15 @@ cacheable-request@^7.0.2:
responselike "^2.0.0"
call-bind@^1.0.6:
version "1.0.6"
resolved "https://registry.npmjs.org/call-bind/-/call-bind-1.0.6.tgz"
integrity sha512-Mj50FLHtlsoVfRfnHaZvyrooHcrlceNZdL/QBvJJVd9Ta55qCQK0gs4ss2oZDeV9zFCs6ewzYgVE5yfVmfFpVg==
version "1.0.7"
resolved "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz"
integrity sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==
dependencies:
es-define-property "^1.0.0"
es-errors "^1.3.0"
function-bind "^1.1.2"
get-intrinsic "^1.2.3"
set-function-length "^1.2.0"
get-intrinsic "^1.2.4"
set-function-length "^1.2.1"
call-me-maybe@^1.0.1:
version "1.0.2"
@ -1944,10 +1945,10 @@ camelcase@^6.2.0:
resolved "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz"
integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==
caniuse-lite@^1.0.30001580:
version "1.0.30001587"
resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001587.tgz"
integrity sha512-HMFNotUmLXn71BQxg8cijvqxnIAofforZOwGsxyXJ0qugTdspUF4sPSJ2vhgprHCB996tIDzEq1ubumPDV8ULA==
caniuse-lite@^1.0.30001587:
version "1.0.30001588"
resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001588.tgz"
integrity sha512-+hVY9jE44uKLkH0SrUTqxjxqNTOWHsbnQDIKjwkZ3lNTzUUVdBLBGXtj/q5Mp5u98r3droaZAewQuEDzjQdZlQ==
cargo-cp-artifact@^0.1:
version "0.1.8"
@ -2314,12 +2315,14 @@ core-util-is@1.0.2:
"@octokit/rest" "^20.0.2"
"@types/node-fetch" "^2.6.11"
"@xenova/transformers" "^2.14.0"
adf-to-md "^1.1.0"
axios "^1.6.7"
cheerio "^1.0.0-rc.12"
dotenv "^16.3.1"
fastest-levenshtein "^1.0.16"
handlebars "^4.7.8"
js-tiktoken "^1.0.8"
llm-code-highlighter "^0.0.9"
llm-code-highlighter "^0.0.13"
node-fetch "^3.3.2"
node-html-markdown "^1.3.0"
ollama "^0.4.6"
@ -2483,14 +2486,13 @@ defer-to-connect@^2.0.0:
integrity sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg==
define-data-property@^1.1.2:
version "1.1.3"
resolved "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.3.tgz"
integrity sha512-h3GBouC+RPtNX2N0hHVLo2ZwPYurq8mLmXpOLTsw71gr7lHt5VaI4vVkDUNOfiWmm48JEXe3VM7PmLX45AMmmg==
version "1.1.4"
resolved "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz"
integrity sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==
dependencies:
es-define-property "^1.0.0"
es-errors "^1.3.0"
get-intrinsic "^1.2.4"
gopd "^1.0.1"
has-property-descriptors "^1.0.1"
delayed-stream@~1.0.0:
version "1.0.0"
@ -2627,10 +2629,10 @@ ee-first@1.1.1:
resolved "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz"
integrity sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==
electron-to-chromium@^1.4.648:
version "1.4.666"
resolved "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.666.tgz"
integrity sha512-q4lkcbQrUdlzWCUOxk6fwEza6bNCfV12oi4AJph5UibguD1aTfL4uD0nuzFv9hbPANXQMuUS0MxPSHQ1gqq5dg==
electron-to-chromium@^1.4.668:
version "1.4.678"
resolved "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.678.tgz"
integrity sha512-NbdGC2p0O5Q5iVhLEsNBSfytaw7wbEFJlIvaF71wi6QDtLAph5/rVogjyOpf/QggJIt8hNK3KdwNJnc2bzckbw==
emittery@^0.13.1:
version "0.13.1"
@ -2714,6 +2716,13 @@ error-ex@^1.3.1:
dependencies:
is-arrayish "^0.2.1"
es-define-property@^1.0.0:
version "1.0.0"
resolved "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz"
integrity sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==
dependencies:
get-intrinsic "^1.2.4"
es-errors@^1.3.0:
version "1.3.0"
resolved "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz"
@ -3240,9 +3249,9 @@ flatbuffers@23.5.26:
integrity sha512-vE+SI9vrJDwi1oETtTIFldC/o9GsVKRM+s6EL0nQgxXlYV1Vc4Tk30hj4xGICftInKQKj1F3up2n8UbIVobISQ==
flatted@^3.2.9:
version "3.2.9"
resolved "https://registry.npmjs.org/flatted/-/flatted-3.2.9.tgz"
integrity sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ==
version "3.3.1"
resolved "https://registry.npmjs.org/flatted/-/flatted-3.3.1.tgz"
integrity sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==
follow-redirects@^1.0.0, follow-redirects@^1.14.6, follow-redirects@^1.14.9, follow-redirects@^1.15.4:
version "1.15.5"
@ -3375,7 +3384,7 @@ get-caller-file@^2.0.5:
resolved "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz"
integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==
get-intrinsic@^1.1.3, get-intrinsic@^1.2.2, get-intrinsic@^1.2.3, get-intrinsic@^1.2.4:
get-intrinsic@^1.1.3, get-intrinsic@^1.2.3, get-intrinsic@^1.2.4:
version "1.2.4"
resolved "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz"
integrity sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==
@ -3635,16 +3644,16 @@ has-flag@^4.0.0:
integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==
has-property-descriptors@^1.0.1:
version "1.0.1"
resolved "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.1.tgz"
integrity sha512-VsX8eaIewvas0xnvinAe9bw4WfIeODpGYikiWYLH+dma0Jw6KHYqWiWfhQlgOVK8D6PvjubK5Uc4P0iIhIcNVg==
version "1.0.2"
resolved "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz"
integrity sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==
dependencies:
get-intrinsic "^1.2.2"
es-define-property "^1.0.0"
has-proto@^1.0.1:
version "1.0.1"
resolved "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz"
integrity sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==
version "1.0.3"
resolved "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz"
integrity sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==
has-symbols@^1.0.3:
version "1.0.3"
@ -3752,9 +3761,9 @@ http-proxy-agent@^5.0.0:
debug "4"
http-proxy-agent@^7.0.0:
version "7.0.1"
resolved "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.1.tgz"
integrity sha512-My1KCEPs6A0hb4qCVzYp8iEvA8j8YqcvXLZZH8C9OFuTYpYjHE7N2dtG3mRl1HMD4+VGXpF3XcDVcxGBT7yDZQ==
version "7.0.2"
resolved "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz"
integrity sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==
dependencies:
agent-base "^7.1.0"
debug "^4.3.4"
@ -3805,9 +3814,9 @@ https-proxy-agent@^5.0.0:
debug "4"
https-proxy-agent@^7.0.2:
version "7.0.3"
resolved "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.3.tgz"
integrity sha512-kCnwztfX0KZJSLOBrcL0emLeFako55NWMovvyPP2AjsghNk9RB1yjSI+jVumPHYZsNXegNoqupSW9IY3afSH8w==
version "7.0.4"
resolved "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.4.tgz"
integrity sha512-wlwpilI7YdjSkWaQ/7omYBMTliDcmCN8OLihO6I9B86g06lMyAoqgoDpV0XqoaPOKj+0DIdAvnsWfyAAhmimcg==
dependencies:
agent-base "^7.0.2"
debug "4"
@ -4091,13 +4100,13 @@ istanbul-lib-instrument@^5.0.4:
semver "^6.3.0"
istanbul-lib-instrument@^6.0.0:
version "6.0.1"
resolved "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.1.tgz"
integrity sha512-EAMEJBsYuyyztxMxW3g7ugGPkrZsV57v0Hmv3mm1uQsmB+QnZuepg731CRaIgeUVSdmsTngOkSnauNF8p7FIhA==
version "6.0.2"
resolved "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.2.tgz"
integrity sha512-1WUsZ9R1lA0HtBSohTkm39WTPlNKSJ5iFk7UwqXkBLoHQT+hfqPsfsTDVuZdKGaBwn7din9bS7SsnoAr943hvw==
dependencies:
"@babel/core" "^7.12.3"
"@babel/parser" "^7.14.7"
"@istanbuljs/schema" "^0.1.2"
"@babel/core" "^7.23.9"
"@babel/parser" "^7.23.9"
"@istanbuljs/schema" "^0.1.3"
istanbul-lib-coverage "^3.2.0"
semver "^7.5.4"
@ -4120,9 +4129,9 @@ istanbul-lib-source-maps@^4.0.0:
source-map "^0.6.1"
istanbul-reports@^3.1.3:
version "3.1.6"
resolved "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.6.tgz"
integrity sha512-TLgnMkKg3iTDsQ9PbPTdpfAK2DzjF9mqUG7RMgcQl8oFjad8ob4laGxv5XV5U9MAfx8D6tSJiUyuAwzLicaxlg==
version "3.1.7"
resolved "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.7.tgz"
integrity sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g==
dependencies:
html-escaper "^2.0.0"
istanbul-lib-report "^3.0.0"
@ -4691,9 +4700,9 @@ lilconfig@^2.1.0:
integrity sha512-utWOt/GHzuUxnLKxB6dk81RoOeoNeHgbrXiuGk4yyF5qlRz+iIVWu56E2fqGHFrXz0QNUhLB/8nKqvRH66JKGQ==
lilconfig@^3.0.0:
version "3.0.0"
resolved "https://registry.npmjs.org/lilconfig/-/lilconfig-3.0.0.tgz"
integrity sha512-K2U4W2Ff5ibV7j7ydLr+zLAkIg5JJ4lPn1Ltsdt+Tz/IjQ8buJ55pZAxoP34lqIiwtF9iAvtLv3JGv7CAyAg+g==
version "3.1.1"
resolved "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.1.tgz"
integrity sha512-O18pf7nyvHTckunPWCV1XUNXU1piu01y2b7ATJ0ppkUkk8ocqVWBrYjJBCwHDjD/ZWcfyrA0P4gKhzWGi5EINQ==
lines-and-columns@^1.1.6:
version "1.2.4"
@ -5394,9 +5403,9 @@ next-tick@^1.1.0, next-tick@1:
integrity sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ==
node-abi@^3.3.0, node-abi@^3.45.0:
version "3.54.0"
resolved "https://registry.npmjs.org/node-abi/-/node-abi-3.54.0.tgz"
integrity sha512-p7eGEiQil0YUV3ItH4/tBb781L5impVmmx2E9FRKF7d18XXzp4PGT2tdYMFY6wQqgxD0IwNZOiSJ0/K0fSi/OA==
version "3.55.0"
resolved "https://registry.npmjs.org/node-abi/-/node-abi-3.55.0.tgz"
integrity sha512-uPEjtyh2tFEvWYt4Jw7McOD5FPcHkcxm/tHZc5PWaDB3JYq0rGFUbgaAK+CT5pYpQddBfsZVWI08OwoRfdfbcQ==
dependencies:
semver "^7.3.5"
@ -5834,9 +5843,9 @@ postcss@^8.0.0, postcss@^8.2.14, postcss@^8.4.21, postcss@^8.4.23, postcss@^8.4.
source-map-js "^1.0.2"
posthog-node@^3.1.2:
version "3.6.2"
resolved "https://registry.npmjs.org/posthog-node/-/posthog-node-3.6.2.tgz"
integrity sha512-tVIaShR3SxBx17AlAUS86jQTweKuJIFRedBB504fCz7YPnXJTYSrVcUHn5IINE2wu4jUQimQK6ihQr90Djrdrg==
version "3.6.3"
resolved "https://registry.npmjs.org/posthog-node/-/posthog-node-3.6.3.tgz"
integrity sha512-JB+ei0LkwE+rKHyW5z79Nd1jUaGxU6TvkfjFqY9vQaHxU5aU8dRl0UUaEmZdZbHwjp3WmXCBQQRNyimwbNQfCw==
dependencies:
axios "^1.6.2"
rusha "^0.8.14"
@ -6475,7 +6484,7 @@ set-blocking@^2.0.0:
resolved "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz"
integrity sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==
set-function-length@^1.2.0:
set-function-length@^1.2.1:
version "1.2.1"
resolved "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.1.tgz"
integrity sha512-j4t6ccc+VsKwYHso+kElc5neZpjtq9EnRICFZtWyBsLojhmeF/ZBd/elqm22WJh/BziDe/SBiOeAt0m2mfLD0g==
@ -7317,20 +7326,20 @@ vary@^1, vary@~1.1.2:
integrity sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==
vectordb@^0.4.3:
version "0.4.9"
resolved "https://registry.npmjs.org/vectordb/-/vectordb-0.4.9.tgz"
integrity sha512-BZ69hVqhxcaxYfdtqpUCjU9IeP/L1CxAYrylzoWxDBYFe9E78JTJdZc6jzQDWBdSGnlE5ZMbGwbP6kPxBHunTA==
version "0.4.10"
resolved "https://registry.npmjs.org/vectordb/-/vectordb-0.4.10.tgz"
integrity sha512-O6WR65CvpbIbTDs4awKV9smfymVuW1AqYOcdJf8PI0THr1b+h/LyDlAQBf3xBV5Ns8XeaIzWfSHoDspg+WJgKg==
dependencies:
"@apache-arrow/ts" "^14.0.2"
"@neon-rs/load" "^0.0.74"
apache-arrow "^14.0.2"
axios "^1.4.0"
optionalDependencies:
"@lancedb/vectordb-darwin-arm64" "0.4.9"
"@lancedb/vectordb-darwin-x64" "0.4.9"
"@lancedb/vectordb-linux-arm64-gnu" "0.4.9"
"@lancedb/vectordb-linux-x64-gnu" "0.4.9"
"@lancedb/vectordb-win32-x64-msvc" "0.4.9"
"@lancedb/vectordb-darwin-arm64" "0.4.10"
"@lancedb/vectordb-darwin-x64" "0.4.10"
"@lancedb/vectordb-linux-arm64-gnu" "0.4.10"
"@lancedb/vectordb-linux-x64-gnu" "0.4.10"
"@lancedb/vectordb-win32-x64-msvc" "0.4.10"
verror@1.10.0:
version "1.10.0"
@ -7438,9 +7447,9 @@ wcwidth@^1.0.1, wcwidth@>=1.0.1:
defaults "^1.0.3"
web-streams-polyfill@^3.0.3:
version "3.3.2"
resolved "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.3.2.tgz"
integrity sha512-3pRGuxRF5gpuZc0W+EpwQRmCD7gRqcDOMt688KmdlDAgAyaB1XlN0zq2njfDNm44XVdIouE7pZ6GzbdyH47uIQ==
version "3.3.3"
resolved "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.3.3.tgz"
integrity sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw==
webidl-conversions@^3.0.0:
version "3.0.1"

4
gui/package-lock.json generated
View file

@ -76,12 +76,14 @@
"@octokit/rest": "^20.0.2",
"@types/node-fetch": "^2.6.11",
"@xenova/transformers": "^2.14.0",
"adf-to-md": "^1.1.0",
"axios": "^1.6.7",
"cheerio": "^1.0.0-rc.12",
"dotenv": "^16.3.1",
"fastest-levenshtein": "^1.0.16",
"handlebars": "^4.7.8",
"js-tiktoken": "^1.0.8",
"llm-code-highlighter": "^0.0.9",
"llm-code-highlighter": "^0.0.13",
"node-fetch": "^3.3.2",
"node-html-markdown": "^1.3.0",
"ollama": "^0.4.6",

View file

@ -374,9 +374,15 @@ function TipTapEditor(props: TipTapEditorProps) {
if (!props.isMainInput) {
return;
}
if (editor && document.hasFocus()) {
if (editor && !document.hasFocus()) {
editor.commands.focus();
// setTimeout(() => {
// // https://github.com/continuedev/continue/pull/881
// editor.commands.blur();
// }, 0);
}
const handler = async (event: any) => {
if (!editor) return;