diff --git a/.dev.vars.example b/.dev.vars.example index b9e5cff..2a51f8d 100644 --- a/.dev.vars.example +++ b/.dev.vars.example @@ -1 +1,4 @@ OPENAI_API_KEY="MY_SECRET" +SUPABASE_URL="" +SUPABASE_KEY="" +VOYAGEAI_API_KEY="" \ No newline at end of file diff --git a/package.json b/package.json index dd8fb89..456a4c0 100644 --- a/package.json +++ b/package.json @@ -30,10 +30,12 @@ "@octokit/rest": "20.1.1", "@octokit/webhooks": "13.2.7", "@sinclair/typebox": "0.32.33", + "@supabase/supabase-js": "^2.45.4", "@ubiquity-dao/ubiquibot-logger": "^1.3.0", "dotenv": "^16.4.5", "openai": "^4.63.0", - "typebox-validators": "0.3.5" + "typebox-validators": "0.3.5", + "voyageai": "^0.0.1-5" }, "devDependencies": { "@commitlint/cli": "19.3.0", @@ -78,5 +80,6 @@ "extends": [ "@commitlint/config-conventional" ] - } -} \ No newline at end of file + }, + "packageManager": "yarn@1.22.22+sha1.ac34549e6aa8e7ead463a7407e1c7390f61a6610" +} diff --git a/src/adapters/index.ts b/src/adapters/index.ts new file mode 100644 index 0000000..3da6b75 --- /dev/null +++ b/src/adapters/index.ts @@ -0,0 +1,12 @@ +import { SupabaseClient } from "@supabase/supabase-js"; +import { Context } from "../types"; +import { VoyageAIClient } from "voyageai"; +import { Embeddings } from "./supabase/helpers/embeddings"; + +export function createAdapters(supabaseClient: SupabaseClient, voyage: VoyageAIClient, context: Context) { + return { + supabase: { + embeddings: new Embeddings(voyage, supabaseClient, context), + }, + }; +} diff --git a/src/adapters/supabase/helpers/embeddings.ts b/src/adapters/supabase/helpers/embeddings.ts new file mode 100644 index 0000000..93acb6b --- /dev/null +++ b/src/adapters/supabase/helpers/embeddings.ts @@ -0,0 +1,115 @@ +import { SupabaseClient } from "@supabase/supabase-js"; +import { Super } from "./supabase"; +import { Context } from "../../../types/context"; +import { VoyageAIClient } from "voyageai"; +import { CommentType, EmbeddingClass, IssueSimilaritySearchResult } from "../../../types/embeddings"; + +const VECTOR_SIZE = 1024; + +/** + * Embeddings class for creating, updating, and deleting embeddings. + * + * Schema is as follows: + * - `source_id` - The unique identifier for the embedding. (e.g. comment node_id, telegram chat_id, etc.) + * - `type` - The type of embedding. (e.g. setup_instructions, dao_info, task, comment). Consider this the category. + * - `plaintext` - The plaintext version of the markdown + * - `embedding` - The embedding vector for the markdown + * - `metadata` - Additional metadata for the embedding. (e.g. author_association, author_id, fileChunkIndex, filePath, isPrivate) + * - `created_at` - The timestamp when the embedding was created + * - `modified_at` - The timestamp when the embedding was last modified + */ +export class Embeddings extends Super { + private _voyageClient: VoyageAIClient; + constructor(voyageClient: VoyageAIClient, supabase: SupabaseClient, context: Context) { + super(supabase, context); + this._voyageClient = voyageClient; + } + + async getEmbedding(sourceId: string): Promise { + const { data, error } = await this.supabase.from("content").select("*").eq("source_id", sourceId).single(); + if (error && error.code !== "PGRST116") { + this.context.logger.error("Error getting comment", { err: error, sourceId }); + } + return data; + } + + async getEmbeddingsByClass(embeddingClass: EmbeddingClass): Promise { + const { data, error } = await this.supabase.from("content").select("*").eq("type", embeddingClass); + if (error) { + this.context.logger.error("Error getting comments", { err: error, embeddingClass }); + return []; + } + return data; + } + + // Working with embeddings + async findSimilarContent(markdown: string, threshold: number, currentId: string): Promise { + const embedding = await this._embedWithVoyage(markdown, "query"); + const { data, error } = await this.supabase.rpc("find_similar_content", { + curr_source_id: currentId, + query_embedding: embedding, + threshold: threshold, + }); + if (error) { + this.context.logger.error("Error finding similar issues", error); + return []; + } + return data; + } + + /** + * Compares a single query against all embeddings in the database and returns the most similar embeddings. + */ + async findRelevantContext(markdown: string, threshold: number): Promise { + const embedding = await this._embedWithVoyage(markdown, "query"); + const { data, error } = await this.supabase.rpc("find_relevant_context", { + query_embedding: embedding, + threshold: threshold, + }); + if (error) { + this.context.logger.error("Error finding similar issues", error); + return []; + } + return data; + } + + async hybridSearchWithMetadata( + queryEmbedding: number[], + contentType: string, + metadataKey?: string, + metadataValue?: string + ) { + const { data, error } = await this.supabase + .rpc('hybridsearchwithmeta', { + query_embedding: queryEmbedding, // The embedding vector of the query + // content_type: contentType, // The classified content type (e.g., "setup_instructions") + // metadata_key: metadataKey, // The key to filter the metadata + // metadata_value: metadataValue // The value to filter the metadata + }); + + if (error) { + console.error('Error performing hybrid search:', error); + return null; + } + + return data; // Results from the hybrid search + } + + async _embedWithVoyage(text: string | null, inputType: "document" | "query"): Promise { + try { + if (text === null) { + return new Array(VECTOR_SIZE).fill(0); + } else { + const response = await this._voyageClient.embed({ + input: text, + model: "voyage-large-2-instruct", + inputType: inputType + }); + return (response.data && response.data[0]?.embedding) || []; + } + } catch (err) { + throw new Error(this.context.logger.error("Error embedding comment", { err })?.logMessage.raw); + } + } +} + diff --git a/src/adapters/supabase/helpers/supabase.ts b/src/adapters/supabase/helpers/supabase.ts new file mode 100644 index 0000000..7a13b85 --- /dev/null +++ b/src/adapters/supabase/helpers/supabase.ts @@ -0,0 +1,12 @@ +import { SupabaseClient } from "@supabase/supabase-js"; +import { Context } from "../../../types/context"; + +export class Super { + protected supabase: SupabaseClient; + protected context: Context; + + constructor(supabase: SupabaseClient, context: Context) { + this.supabase = supabase; + this.context = context; + } +} diff --git a/src/handlers/ask-gpt.ts b/src/handlers/ask-gpt.ts index fbf9209..90ba625 100644 --- a/src/handlers/ask-gpt.ts +++ b/src/handlers/ask-gpt.ts @@ -2,6 +2,7 @@ import OpenAI from "openai"; import { Context } from "../types"; import { createChatHistory, formatChatHistory } from "../helpers/format-chat-history"; import { recursivelyFetchLinkedIssues } from "../helpers/issue-fetching"; +import { addCommentToIssue } from "./add-comment"; export async function askQuestion(context: Context, question: string) { if (!question) { @@ -10,10 +11,46 @@ export async function askQuestion(context: Context, question: string) { const { specAndBodies, streamlinedComments } = await recursivelyFetchLinkedIssues({ context }); - const formattedChat = await formatChatHistory(context, streamlinedComments, specAndBodies); + const embeddings = await fetchEmbeddingsContext(context, question); + let embeddingContext: null | string = null; + + if (embeddings.length > 0) { + // TODO: config items for how many embeddings refs to use + // using the top for now + embeddingContext = embeddings[0].content_plaintext; + } + + const debugMsg = ` +
top ranked embeddings + \`\`\`json + ${JSON.stringify(embeddings, null, 2)} + \`\`\` +
` + + await addCommentToIssue(context, debugMsg); + const formattedChat = await formatChatHistory(context, streamlinedComments, specAndBodies, embeddingContext); + + const chatDebugMsg = ` +
chat history + \`\`\`json + ${JSON.stringify(formattedChat, null, 2)} + \`\`\` +
` + + await addCommentToIssue(context, chatDebugMsg); return await askGpt(context, formattedChat); } +async function fetchEmbeddingsContext(context: Context, query: string) { + const { adapters: { supabase } } = context; + + const embeddings = await supabase.embeddings.findRelevantContext(query, 0.6); + + const sorted = embeddings.sort((a, b) => b.similarity - a.similarity); + + return sorted.slice(0, 3) +} + export async function askGpt(context: Context, formattedChat: string) { const { logger, @@ -32,7 +69,7 @@ export async function askGpt(context: Context, formattedChat: string) { const res: OpenAI.Chat.Completions.ChatCompletion = await openAi.chat.completions.create({ messages: createChatHistory(formattedChat), - model: model ?? "o1-mini", + model: "chatgpt-4o-latest", }); const answer = res.choices[0].message.content; diff --git a/src/helpers/format-chat-history.ts b/src/helpers/format-chat-history.ts index 5d369fe..41cacaf 100644 --- a/src/helpers/format-chat-history.ts +++ b/src/helpers/format-chat-history.ts @@ -5,7 +5,7 @@ import { createKey, streamlineComments } from "../handlers/comments"; import { fetchPullRequestDiff, fetchIssue, fetchIssueComments } from "./issue-fetching"; import { splitKey } from "./issue"; -export async function formatChatHistory(context: Context, streamlined: Record, specAndBodies: Record) { +export async function formatChatHistory(context: Context, streamlined: Record, specAndBodies: Record, embeddingContext: string | null) { const convoKeys = Object.keys(streamlined); const specAndBodyKeys = Object.keys(specAndBodies); const chatHistory: string[] = []; @@ -18,6 +18,14 @@ export async function formatChatHistory(context: Context, streamlined: Record>, }; - return runPlugin(context); + context.adapters = createAdapters(client, voyage, context); + + return await runPlugin(context); } export async function runPlugin(context: Context) { @@ -28,7 +38,7 @@ export async function runPlugin(context: Context) { } = context; const question = context.payload.comment.body; - const slugRegex = new RegExp(`@${UBIQUITY_OS_APP_SLUG} `, "gi"); + const slugRegex = new RegExp(`^@${UBIQUITY_OS_APP_SLUG} `, "i"); if (!question.match(slugRegex)) { logger.info("Comment does not mention the app. Skipping."); diff --git a/src/types/context.ts b/src/types/context.ts index d5f7113..7084bc6 100644 --- a/src/types/context.ts +++ b/src/types/context.ts @@ -3,6 +3,7 @@ import { EmitterWebhookEvent as WebhookEvent, EmitterWebhookEventName as Webhook import { PluginSettings } from "./plugin-inputs"; import { Logs } from "@ubiquity-dao/ubiquibot-logger"; import { Env } from "./env"; +import { createAdapters } from "../adapters"; export type SupportedEventsU = "issue_comment.created"; @@ -17,4 +18,5 @@ export interface Context>; } diff --git a/src/types/embeddings.ts b/src/types/embeddings.ts new file mode 100644 index 0000000..759ec27 --- /dev/null +++ b/src/types/embeddings.ts @@ -0,0 +1,24 @@ +export type EmbeddingClass = "setup_instructions" | "dao_info" | "task" | "comment"; +export type CommentType = { + source_id: string; + type: string; + plaintext: string | null | undefined; + embedding: number[]; + metadata: Partial; + created_at: string; + modified_at: string; +}; +export interface CommentMetadata { + author_association: string | null; + author_id: number; + issue_node_id: string; + repo_node_id: string; + isPrivate: boolean; + [key: string]: any; +} + +export interface IssueSimilaritySearchResult { + issue_id: string; + issue_plaintext: string; + similarity: number; +} diff --git a/src/types/env.ts b/src/types/env.ts index e8a5f7b..eba3010 100644 --- a/src/types/env.ts +++ b/src/types/env.ts @@ -10,10 +10,14 @@ dotenv.config(); * These are fed into the worker/workflow as `env` and are * taken from either `dev.vars` or repository secrets. * They are used with `process.env` but are type-safe. + * */ export const envSchema = T.Object({ OPENAI_API_KEY: T.String(), UBIQUITY_OS_APP_SLUG: T.String(), + SUPABASE_URL: T.String(), + SUPABASE_KEY: T.String(), + VOYAGEAI_API_KEY: T.String() }); export const envValidator = new StandardValidator(envSchema); diff --git a/yarn.lock b/yarn.lock index 18a112c..5d43c9b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1634,6 +1634,63 @@ ignore "^5.1.8" p-map "^4.0.0" +"@supabase/auth-js@2.65.0": + version "2.65.0" + resolved "https://registry.yarnpkg.com/@supabase/auth-js/-/auth-js-2.65.0.tgz#e345c492f8cbc31cd6289968eae0e349ff0f39e9" + integrity sha512-+wboHfZufAE2Y612OsKeVP4rVOeGZzzMLD/Ac3HrTQkkY4qXNjI6Af9gtmxwccE5nFvTiF114FEbIQ1hRq5uUw== + dependencies: + "@supabase/node-fetch" "^2.6.14" + +"@supabase/functions-js@2.4.1": + version "2.4.1" + resolved "https://registry.yarnpkg.com/@supabase/functions-js/-/functions-js-2.4.1.tgz#373e75f8d3453bacd71fb64f88d7a341d7b53ad7" + integrity sha512-8sZ2ibwHlf+WkHDUZJUXqqmPvWQ3UHN0W30behOJngVh/qHHekhJLCFbh0AjkE9/FqqXtf9eoVvmYgfCLk5tNA== + dependencies: + "@supabase/node-fetch" "^2.6.14" + +"@supabase/node-fetch@2.6.15", "@supabase/node-fetch@^2.6.14": + version "2.6.15" + resolved "https://registry.yarnpkg.com/@supabase/node-fetch/-/node-fetch-2.6.15.tgz#731271430e276983191930816303c44159e7226c" + integrity sha512-1ibVeYUacxWYi9i0cf5efil6adJ9WRyZBLivgjs+AUpewx1F3xPi7gLgaASI2SmIQxPoCEjAsLAzKPgMJVgOUQ== + dependencies: + whatwg-url "^5.0.0" + +"@supabase/postgrest-js@1.16.1": + version "1.16.1" + resolved "https://registry.yarnpkg.com/@supabase/postgrest-js/-/postgrest-js-1.16.1.tgz#68dfa0581d8ae4296378cb8815bbde3f4602aef5" + integrity sha512-EOSEZFm5pPuCPGCmLF1VOCS78DfkSz600PBuvBND/IZmMciJ1pmsS3ss6TkB6UkuvTybYiBh7gKOYyxoEO3USA== + dependencies: + "@supabase/node-fetch" "^2.6.14" + +"@supabase/realtime-js@2.10.2": + version "2.10.2" + resolved "https://registry.yarnpkg.com/@supabase/realtime-js/-/realtime-js-2.10.2.tgz#c2b42d17d723d2d2a9146cfad61dc3df1ce3127e" + integrity sha512-qyCQaNg90HmJstsvr2aJNxK2zgoKh9ZZA8oqb7UT2LCh3mj9zpa3Iwu167AuyNxsxrUE8eEJ2yH6wLCij4EApA== + dependencies: + "@supabase/node-fetch" "^2.6.14" + "@types/phoenix" "^1.5.4" + "@types/ws" "^8.5.10" + ws "^8.14.2" + +"@supabase/storage-js@2.7.0": + version "2.7.0" + resolved "https://registry.yarnpkg.com/@supabase/storage-js/-/storage-js-2.7.0.tgz#9ff322d2c3b141087aa34115cf14205e4980ce75" + integrity sha512-iZenEdO6Mx9iTR6T7wC7sk6KKsoDPLq8rdu5VRy7+JiT1i8fnqfcOr6mfF2Eaqky9VQzhP8zZKQYjzozB65Rig== + dependencies: + "@supabase/node-fetch" "^2.6.14" + +"@supabase/supabase-js@^2.45.4": + version "2.45.4" + resolved "https://registry.yarnpkg.com/@supabase/supabase-js/-/supabase-js-2.45.4.tgz#0bcf8722f1732dfe3e4c5190d23e3938dcc689c3" + integrity sha512-E5p8/zOLaQ3a462MZnmnz03CrduA5ySH9hZyL03Y+QZLIOO4/Gs8Rdy4ZCKDHsN7x0xdanVEWWFN3pJFQr9/hg== + dependencies: + "@supabase/auth-js" "2.65.0" + "@supabase/functions-js" "2.4.1" + "@supabase/node-fetch" "2.6.15" + "@supabase/postgrest-js" "1.16.1" + "@supabase/realtime-js" "2.10.2" + "@supabase/storage-js" "2.7.0" + "@types/babel__core@^7.1.14": version "7.20.5" resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.20.5.tgz#3df15f27ba85319caa07ba08d0721889bb39c017" @@ -1766,6 +1823,11 @@ dependencies: undici-types "~5.26.4" +"@types/phoenix@^1.5.4": + version "1.6.5" + resolved "https://registry.yarnpkg.com/@types/phoenix/-/phoenix-1.6.5.tgz#5654e14ec7ad25334a157a20015996b6d7d2075e" + integrity sha512-xegpDuR+z0UqG9fwHqNoy3rI7JDlvaPh2TY47Fl80oq6g+hXT+c/LEuE43X48clZ6lOfANl5WrPur9fYO1RJ/w== + "@types/pluralize@^0.0.29": version "0.0.29" resolved "https://registry.yarnpkg.com/@types/pluralize/-/pluralize-0.0.29.tgz#6ffa33ed1fc8813c469b859681d09707eb40d03c" @@ -1791,6 +1853,13 @@ resolved "https://registry.yarnpkg.com/@types/wrap-ansi/-/wrap-ansi-3.0.0.tgz#18b97a972f94f60a679fd5c796d96421b9abb9fd" integrity sha512-ltIpx+kM7g/MLRZfkbL7EsCEjfzCcScLpkg37eXEtx5kmrAKBkTJwd1GIAjDSL8wTpM6Hzn5YO4pSb91BEwu1g== +"@types/ws@^8.5.10": + version "8.5.12" + resolved "https://registry.yarnpkg.com/@types/ws/-/ws-8.5.12.tgz#619475fe98f35ccca2a2f6c137702d85ec247b7e" + integrity sha512-3tPRkv1EtkDpzlgyKyI8pGsGZAGPEaXeu0DOj5DI25Ja91bdAYddYHbADRYVrZMRbfW+1l5YwXVDKohDJNQxkQ== + dependencies: + "@types/node" "*" + "@types/yargs-parser@*": version "21.0.3" resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-21.0.3.tgz#815e30b786d2e8f0dcd85fd5bcf5e1a04d008f15" @@ -2176,6 +2245,11 @@ balanced-match@^1.0.0: resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== +base64-js@^1.3.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" + integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== + before-after-hook@^2.2.0: version "2.2.3" resolved "https://registry.yarnpkg.com/before-after-hook/-/before-after-hook-2.2.3.tgz#c51e809c81a4e354084422b9b26bad88249c517c" @@ -2242,6 +2316,14 @@ buffer-from@^1.0.0: resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== +buffer@^6.0.3: + version "6.0.3" + resolved "https://registry.yarnpkg.com/buffer/-/buffer-6.0.3.tgz#2ace578459cc8fbe2a70aaa8f52ee63b6a74c6c6" + integrity sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA== + dependencies: + base64-js "^1.3.1" + ieee754 "^1.2.1" + call-bind@^1.0.2, call-bind@^1.0.5, call-bind@^1.0.6, call-bind@^1.0.7: version "1.0.7" resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.7.tgz#06016599c40c56498c18769d2730be242b6fa3b9" @@ -3185,6 +3267,11 @@ eventemitter3@^5.0.1: resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-5.0.1.tgz#53f5ffd0a492ac800721bb42c66b841de96423c4" integrity sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA== +events@^3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/events/-/events-3.3.0.tgz#31a95ad0a924e2d2c419a813aeb2c4e878ea7400" + integrity sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q== + execa@^5.0.0: version "5.1.1" resolved "https://registry.yarnpkg.com/execa/-/execa-5.1.1.tgz#f80ad9cbf4298f7bd1d4c9555c21e93741c411dd" @@ -3377,6 +3464,11 @@ formdata-node@^4.3.2: node-domexception "1.0.0" web-streams-polyfill "4.0.0-beta.3" +formdata-node@^6.0.3: + version "6.0.3" + resolved "https://registry.yarnpkg.com/formdata-node/-/formdata-node-6.0.3.tgz#48f8e2206ae2befded82af621ef015f08168dc6d" + integrity sha512-8e1++BCiTzUno9v5IZ2J6bv4RU+3UKDmqWUQD0MIMVCd9AdhWkO1gw57oo1mNEX1dMq2EGI+FbWz4B92pscSQg== + fs.realpath@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" @@ -3672,6 +3764,11 @@ identity-function@^1.0.0: resolved "https://registry.yarnpkg.com/identity-function/-/identity-function-1.0.0.tgz#bea1159f0985239be3ca348edf40ce2f0dd2c21d" integrity sha512-kNrgUK0qI+9qLTBidsH85HjDLpZfrrS0ElquKKe/fJFdB3D7VeKdXXEvOPDUHSHOzdZKCAAaQIWWyp0l2yq6pw== +ieee754@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" + integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== + ignore@^5.1.4, ignore@^5.1.8, ignore@^5.2.0, ignore@^5.3.1: version "5.3.1" resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.1.tgz#5073e554cd42c5b33b394375f538b8593e34d4ef" @@ -4412,6 +4509,11 @@ jiti@^1.21.0: resolved "https://registry.yarnpkg.com/jiti/-/jiti-1.21.6.tgz#6c7f7398dd4b3142767f9a168af2f317a428d268" integrity sha512-2yTgeWTWzMWkHu6Jp9NKgePDaYHbntiwvYuuJLbbN9vl7DC9DvXKOB2BC3ZZ92D3cvV/aflH0osDfwpHepQ53w== +js-base64@3.7.2: + version "3.7.2" + resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-3.7.2.tgz#816d11d81a8aff241603d19ce5761e13e41d7745" + integrity sha512-NnRs6dsyqUXejqk/yv2aiXlAvOs56sLkX6nUdeaNezI5LFFLlsZjOThmwnrcwh5ZZRwZlCMnVAY3CvhIhoVEKQ== + js-tokens@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" @@ -4898,7 +5000,7 @@ node-fetch-native@^1.6.4: resolved "https://registry.yarnpkg.com/node-fetch-native/-/node-fetch-native-1.6.4.tgz#679fc8fd8111266d47d7e72c379f1bed9acff06e" integrity sha512-IhOigYzAKHd244OC0JIMIUrjzctirCmPkaIfhDeGcEETWof5zKYUW7e7MYvChGWh/4CJeXEgsRyGzuF334rOOQ== -node-fetch@^2.6.7: +node-fetch@2.7.0, node-fetch@^2.6.7: version "2.7.0" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.7.0.tgz#d0f0fa6e3e2dc1d27efcd8ad99d550bda94d187d" integrity sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A== @@ -5293,6 +5395,11 @@ printable-characters@^1.0.42: resolved "https://registry.yarnpkg.com/printable-characters/-/printable-characters-1.0.42.tgz#3f18e977a9bd8eb37fcc4ff5659d7be90868b3d8" integrity sha512-dKp+C4iXWK4vVYZmYSd0KBH5F/h1HoZRsbJ82AVKRO3PEo8L4lBS/vLwhVtpwwuYcoIsVY+1JYKR268yn480uQ== +process@^0.11.10: + version "0.11.10" + resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" + integrity sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A== + prompts@^2.0.1: version "2.4.2" resolved "https://registry.yarnpkg.com/prompts/-/prompts-2.4.2.tgz#7b57e73b3a48029ad10ebd44f74b01722a4cb069" @@ -5311,6 +5418,13 @@ pure-rand@^6.0.0: resolved "https://registry.yarnpkg.com/pure-rand/-/pure-rand-6.1.0.tgz#d173cf23258231976ccbdb05247c9787957604f2" integrity sha512-bVWawvoZoBYpp6yIoQtQXHZjmz35RSVHnUOTefl8Vcjr8snTPY1wnpSPMWekcFwbxI6gtmT7rSYPFvz71ldiOA== +qs@6.11.2: + version "6.11.2" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.11.2.tgz#64bea51f12c1f5da1bc01496f48ffcff7c69d7d9" + integrity sha512-tDNIz22aBzCDxLtVH++VnTfzxlfeK5CbqohpSqpJgj1Wg/cQbStNAz3NuqCs5vV+pjBsK4x4pN9HlVh7rcYRiA== + dependencies: + side-channel "^1.0.4" + queue-microtask@^1.2.2: version "1.2.3" resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" @@ -5339,6 +5453,17 @@ readable-stream@^3.4.0: string_decoder "^1.1.1" util-deprecate "^1.0.1" +readable-stream@^4.5.2: + version "4.5.2" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-4.5.2.tgz#9e7fc4c45099baeed934bff6eb97ba6cf2729e09" + 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" + readdirp@~3.6.0: version "3.6.0" resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7" @@ -5794,7 +5919,7 @@ string.prototype.trimstart@^1.0.8: define-properties "^1.2.1" es-object-atoms "^1.0.0" -string_decoder@^1.1.1: +string_decoder@^1.1.1, string_decoder@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== @@ -6138,6 +6263,11 @@ uri-js@^4.2.2, uri-js@^4.4.1: dependencies: punycode "^2.1.0" +url-join@4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/url-join/-/url-join-4.0.1.tgz#b642e21a2646808ffa178c4c5fda39844e12cde7" + integrity sha512-jk1+QP6ZJqyOiuEI9AEWQfju/nB2Pw466kbA0LEZljHwKeMgd9WrAEgEGxjPDD2+TNbbb37rTyhEfrCXfuKXnA== + util-deprecate@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" @@ -6170,6 +6300,19 @@ vlq@^0.2.1: resolved "https://registry.yarnpkg.com/vlq/-/vlq-0.2.3.tgz#8f3e4328cf63b1540c0d67e1b2778386f8975b26" integrity sha512-DRibZL6DsNhIgYQ+wNdWDL2SL3bKPlVrRiBqV5yuMm++op8W4kGFtaQfCs4KEJn0wBZcHVHJ3eoywX8983k1ow== +voyageai@^0.0.1-5: + version "0.0.1-5" + resolved "https://registry.yarnpkg.com/voyageai/-/voyageai-0.0.1-5.tgz#e0457d991784900c16e4cdf095654f195d62fdf2" + integrity sha512-IuXSXM3l9J3NIq+MLHXacG/yhswpEgWIu9eBqoFqMRnFiDx00dLL62OWg6WqVSipddZLwFeWH1Kaj56x5eqhOQ== + dependencies: + form-data "^4.0.0" + formdata-node "^6.0.3" + js-base64 "3.7.2" + node-fetch "2.7.0" + qs "6.11.2" + readable-stream "^4.5.2" + url-join "4.0.1" + vscode-languageserver-textdocument@^1.0.11: version "1.0.11" resolved "https://registry.yarnpkg.com/vscode-languageserver-textdocument/-/vscode-languageserver-textdocument-1.0.11.tgz#0822a000e7d4dc083312580d7575fe9e3ba2e2bf" @@ -6332,6 +6475,11 @@ ws@^8.11.0: resolved "https://registry.yarnpkg.com/ws/-/ws-8.17.0.tgz#d145d18eca2ed25aaf791a183903f7be5e295fea" integrity sha512-uJq6108EgZMAl20KagGkzCKfMEjxmKvZHG7Tlq0Z6nOky7YF7aq4mOx6xK8TJ/i1LeK4Qus7INktacctDgY8Ow== +ws@^8.14.2: + version "8.18.0" + resolved "https://registry.yarnpkg.com/ws/-/ws-8.18.0.tgz#0d7505a6eafe2b0e712d232b42279f53bc289bbc" + integrity sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw== + xdg-basedir@^5.1.0: version "5.1.0" resolved "https://registry.yarnpkg.com/xdg-basedir/-/xdg-basedir-5.1.0.tgz#1efba19425e73be1bc6f2a6ceb52a3d2c884c0c9"