Enhanced ChatGPT Clone: Features Agents, MCP, Skills, DeepSeek, Anthropic, AWS, OpenAI, Responses API, Azure, Groq, o1, GPT-5, Mistral, OpenRouter, Vertex AI, Gemini, Artifacts, AI model switching, message search, Code Interpreter, langchain, DALL-E-3, OpenAPI Actions, Functions, Secure Multi-User Auth, Presets, open-source for self-hosting. Active
TypeScript aianthropicartifactsawsazurechatgptchatgpt-cloneclaudeclonedeepseekgeminigooglegpt-5librechatmcpo1openairesponses-apivisionwebui
✨ feat: Assistants API, General File Support, Side Panel, File Explorer (#1696)
Danny Avilaecd63eb9f19f
diff --git a/.env.example b/.env.exampleindex 07c81066f9..c3793945a7 100644--- a/.env.example+++ b/.env.example@@ -119,6 +119,14 @@ DEBUG_OPENAI=false# OPENAI_ORGANIZATION=+#====================#+# Assistants API #+#====================#++# ASSISTANTS_API_KEY=+# ASSISTANTS_BASE_URL=+# ASSISTANTS_MODELS=gpt-3.5-turbo-0125,gpt-3.5-turbo-16k-0613,gpt-3.5-turbo-16k,gpt-3.5-turbo,gpt-4,gpt-4-0314,gpt-4-32k-0314,gpt-4-0613,gpt-3.5-turbo-0613,gpt-3.5-turbo-1106,gpt-4-0125-preview,gpt-4-turbo-preview,gpt-4-1106-preview+#============## OpenRouter ##============#diff --git a/.eslintrc.js b/.eslintrc.jsindex a3d71acd69..6d8e085182 100644--- a/.eslintrc.js+++ b/.eslintrc.js@@ -131,6 +131,12 @@ module.exports = {},],},+ {+ files: ['./packages/data-provider/specs/**/*.ts'],+ parserOptions: {+ project: './packages/data-provider/tsconfig.spec.json',+ },+ },],settings: {react: {diff --git a/.github/workflows/backend-review.yml b/.github/workflows/backend-review.ymlindex f5f8201efa..2d5cf387be 100644--- a/.github/workflows/backend-review.yml+++ b/.github/workflows/backend-review.yml@@ -39,6 +39,9 @@ jobs:- name: Run unit testsrun: cd api && npm run test:ci+ - name: Run librechat-data-provider unit tests+ run: cd packages/data-provider && npm run test:ci+- name: Run lintersuses: wearerequired/lint-action@v2with:diff --git a/.gitignore b/.gitignoreindex 765de5cb79..17c18d9a70 100644--- a/.gitignore+++ b/.gitignore@@ -88,4 +88,7 @@ auth.json/packages/ux-shared//images-!client/src/components/Nav/SettingsTabs/Data/\ No newline at end of file+!client/src/components/Nav/SettingsTabs/Data/++# User uploads+uploads/\ No newline at end of filediff --git a/api/app/chatgpt-browser.js b/api/app/chatgpt-browser.jsindex 467e67785d..818661555d 100644--- a/api/app/chatgpt-browser.js+++ b/api/app/chatgpt-browser.js@@ -1,5 +1,6 @@require('dotenv').config();const { KeyvFile } = require('keyv-file');+const { Constants } = require('librechat-data-provider');const { getUserKey, checkUserKeyExpiry } = require('../server/services/UserService');const browserClient = async ({@@ -48,7 +49,7 @@ const browserClient = async ({options = { ...options, parentMessageId, conversationId };}- if (parentMessageId === '00000000-0000-0000-0000-000000000000') {+ if (parentMessageId === Constants.NO_PARENT) {delete options.conversationId;}diff --git a/api/app/clients/BaseClient.js b/api/app/clients/BaseClient.jsindex 3b919c92ff..6009515f2c 100644--- a/api/app/clients/BaseClient.js+++ b/api/app/clients/BaseClient.js@@ -1,5 +1,5 @@const crypto = require('crypto');-const { supportsBalanceCheck } = require('librechat-data-provider');+const { supportsBalanceCheck, Constants } = require('librechat-data-provider');const { getConvo, getMessages, saveMessage, updateMessage, saveConvo } = require('~/models');const { addSpaceIfNeeded, isEnabled } = require('~/server/utils');const checkBalance = require('~/models/checkBalance');@@ -77,7 +77,7 @@ class BaseClient {const saveOptions = this.getSaveOptions();this.abortController = opts.abortController ?? new AbortController();const conversationId = opts.conversationId ?? crypto.randomUUID();- const parentMessageId = opts.parentMessageId ?? '00000000-0000-0000-0000-000000000000';+ const parentMessageId = opts.parentMessageId ?? Constants.NO_PARENT;const userMessageId = opts.overrideParentMessageId ?? crypto.randomUUID();let responseMessageId = opts.responseMessageId ?? crypto.randomUUID();let head = isEdited ? responseMessageId : parentMessageId;@@ -552,7 +552,7 @@ class BaseClient {** Each message object should have an 'id' or 'messageId' property and may have a 'parentMessageId' property.* The 'parentMessageId' is the ID of the message that the current message is a reply to.- * If 'parentMessageId' is not present, null, or is '00000000-0000-0000-0000-000000000000',+ * If 'parentMessageId' is not present, null, or is Constants.NO_PARENT,* the message is considered a root message.** @param {Object} options - The options for the function.@@ -607,9 +607,7 @@ class BaseClient {}currentMessageId =- message.parentMessageId === '00000000-0000-0000-0000-000000000000'- ? null- : message.parentMessageId;+ message.parentMessageId === Constants.NO_PARENT ? null : message.parentMessageId;}orderedMessages.reverse();diff --git a/api/app/clients/GoogleClient.js b/api/app/clients/GoogleClient.jsindex 950cc8d111..dedda1fc8b 100644--- a/api/app/clients/GoogleClient.js+++ b/api/app/clients/GoogleClient.js@@ -4,12 +4,13 @@ const { GoogleVertexAI } = require('langchain/llms/googlevertexai');const { ChatGoogleGenerativeAI } = require('@langchain/google-genai');const { ChatGoogleVertexAI } = require('langchain/chat_models/googlevertexai');const { AIMessage, HumanMessage, SystemMessage } = require('langchain/schema');-const { encodeAndFormat, validateVisionModel } = require('~/server/services/Files/images');+const { encodeAndFormat } = require('~/server/services/Files/images');const { encoding_for_model: encodingForModel, get_encoding: getEncoding } = require('tiktoken');const {+ validateVisionModel,getResponseSender,- EModelEndpoint,endpointSettings,+ EModelEndpoint,AuthKeys,} = require('librechat-data-provider');const { getModelMaxTokens } = require('~/utils');diff --git a/api/app/clients/OpenAIClient.js b/api/app/clients/OpenAIClient.jsindex f9c551097f..0e61fdcbaa 100644--- a/api/app/clients/OpenAIClient.js+++ b/api/app/clients/OpenAIClient.js@@ -1,14 +1,19 @@const OpenAI = require('openai');const { HttpsProxyAgent } = require('https-proxy-agent');-const { getResponseSender, ImageDetailCost, ImageDetail } = require('librechat-data-provider');+const {+ getResponseSender,+ validateVisionModel,+ ImageDetailCost,+ ImageDetail,+} = require('librechat-data-provider');const { encoding_for_model: encodingForModel, get_encoding: getEncoding } = require('tiktoken');const {- getModelMaxTokens,- genAzureChatCompletion,extractBaseURL,constructAzureURL,+ getModelMaxTokens,+ genAzureChatCompletion,} = require('~/utils');-const { encodeAndFormat, validateVisionModel } = require('~/server/services/Files/images');+const { encodeAndFormat } = require('~/server/services/Files/images/encode');const { truncateText, formatMessage, CUT_OFF_PROMPT } = require('./prompts');const { handleOpenAIErrors } = require('./tools/util');const spendTokens = require('~/models/spendTokens');@@ -630,6 +635,7 @@ class OpenAIClient extends BaseClient {context,tokenBuffer,initialMessageCount,+ conversationId,}) {const modelOptions = {modelName: modelName ?? model,@@ -677,7 +683,7 @@ class OpenAIClient extends BaseClient {callbacks: runManager.createCallbacks({context,tokenBuffer,- conversationId: this.conversationId,+ conversationId: this.conversationId ?? conversationId,initialMessageCount,}),});@@ -693,12 +699,13 @@ class OpenAIClient extends BaseClient {** @param {Object} params - The parameters for the conversation title generation.* @param {string} params.text - The user's input.+ * @param {string} [params.conversationId] - The current conversationId, if not already defined on client initialization.* @param {string} [params.responseText=''] - The AI's immediate response to the user.** @returns {Promise<string | 'New Chat'>} A promise that resolves to the generated conversation title.* In case of failure, it will return the default title, "New Chat".*/- async titleConvo({ text, responseText = '' }) {+ async titleConvo({ text, conversationId, responseText = '' }) {let title = 'New Chat';const convo = `||>User:"${truncateText(text)}"@@ -758,7 +765,12 @@ ${convo}try {this.abortController = new AbortController();- const llm = this.initializeLLM({ ...modelOptions, context: 'title', tokenBuffer: 150 });+ const llm = this.initializeLLM({+ ...modelOptions,+ conversationId,+ context: 'title',+ tokenBuffer: 150,+ });title = await runTitleChain({ llm, text, convo, signal: this.abortController.signal });} catch (e) {if (e?.message?.toLowerCase()?.includes('abort')) {diff --git a/api/app/clients/PluginsClient.js b/api/app/clients/PluginsClient.jsindex ab04dd133e..8a19ab4a27 100644--- a/api/app/clients/PluginsClient.js+++ b/api/app/clients/PluginsClient.js@@ -3,6 +3,7 @@ const { CallbackManager } = require('langchain/callbacks');const { BufferMemory, ChatMessageHistory } = require('langchain/memory');const { initializeCustomAgent, initializeFunctionsAgent } = require('./agents');const { addImages, buildErrorInput, buildPromptPrefix } = require('./output_parsers');+const { processFileURL } = require('~/server/services/Files/process');const { EModelEndpoint } = require('librechat-data-provider');const { formatLangChainMessages } = require('./prompts');const checkBalance = require('~/models/checkBalance');@@ -113,6 +114,7 @@ class PluginsClient extends OpenAIClient {openAIApiKey: this.openAIApiKey,conversationId: this.conversationId,fileStrategy: this.options.req.app.locals.fileStrategy,+ processFileURL,message,},});diff --git a/api/app/clients/prompts/formatMessages.spec.js b/api/app/clients/prompts/formatMessages.spec.jsindex 636cdb1c8e..8d4956b381 100644--- a/api/app/clients/prompts/formatMessages.spec.js+++ b/api/app/clients/prompts/formatMessages.spec.js@@ -1,5 +1,6 @@-const { formatMessage, formatLangChainMessages, formatFromLangChain } = require('./formatMessages');+const { Constants } = require('librechat-data-provider');const { HumanMessage, AIMessage, SystemMessage } = require('langchain/schema');+const { formatMessage, formatLangChainMessages, formatFromLangChain } = require('./formatMessages');describe('formatMessage', () => {it('formats user message', () => {@@ -61,7 +62,7 @@ describe('formatMessage', () => {isCreatedByUser: true,isEdited: false,model: null,- parentMessageId: '00000000-0000-0000-0000-000000000000',+ parentMessageId: Constants.NO_PARENT,sender: 'User',text: 'hi',tokenCount: 5,diff --git a/api/app/clients/specs/BaseClient.test.js b/api/app/clients/specs/BaseClient.test.jsindex 889499fbc2..9ffa7e04f1 100644--- a/api/app/clients/specs/BaseClient.test.js+++ b/api/app/clients/specs/BaseClient.test.js@@ -1,3 +1,4 @@+const { Constants } = require('librechat-data-provider');const { initializeFakeClient } = require('./FakeClient');jest.mock('../../../lib/db/connectDb');@@ -307,7 +308,7 @@ describe('BaseClient', () => {const unorderedMessages = [{ id: '3', parentMessageId: '2', text: 'Message 3' },{ id: '2', parentMessageId: '1', text: 'Message 2' },- { id: '1', parentMessageId: '00000000-0000-0000-0000-000000000000', text: 'Message 1' },+ { id: '1', parentMessageId: Constants.NO_PARENT, text: 'Message 1' },];it('should return ordered messages based on parentMessageId', () => {@@ -316,7 +317,7 @@ describe('BaseClient', () => {parentMessageId: '3',});expect(result).toEqual([- { id: '1', parentMessageId: '00000000-0000-0000-0000-000000000000', text: 'Message 1' },+ { id: '1', parentMessageId: Constants.NO_PARENT, text: 'Message 1' },{ id: '2', parentMessageId: '1', text: 'Message 2' },{ id: '3', parentMessageId: '2', text: 'Message 3' },]);diff --git a/api/app/clients/specs/PluginsClient.test.js b/api/app/clients/specs/PluginsClient.test.jsindex 9a4663934f..dfd57b23b9 100644--- a/api/app/clients/specs/PluginsClient.test.js+++ b/api/app/clients/specs/PluginsClient.test.js@@ -1,6 +1,7 @@+const crypto = require('crypto');+const { Constants } = require('librechat-data-provider');const { HumanChatMessage, AIChatMessage } = require('langchain/schema');const PluginsClient = require('../PluginsClient');-const crypto = require('crypto');jest.mock('~/lib/db/connectDb');jest.mock('~/models/Conversation', () => {@@ -66,7 +67,7 @@ describe('PluginsClient', () => {TestAgent.setOptions(opts);}const conversationId = opts.conversationId || crypto.randomUUID();- const parentMessageId = opts.parentMessageId || '00000000-0000-0000-0000-000000000000';+ const parentMessageId = opts.parentMessageId || Constants.NO_PARENT;const userMessageId = opts.overrideParentMessageId || crypto.randomUUID();this.pastMessages = await TestAgent.loadHistory(conversationId,diff --git a/api/app/clients/tools/DALL-E.js b/api/app/clients/tools/DALL-E.jsindex d3cdaa7134..4600bdb026 100644--- a/api/app/clients/tools/DALL-E.js+++ b/api/app/clients/tools/DALL-E.js@@ -3,8 +3,8 @@ const OpenAI = require('openai');const { v4: uuidv4 } = require('uuid');const { Tool } = require('langchain/tools');const { HttpsProxyAgent } = require('https-proxy-agent');+const { FileContext } = require('librechat-data-provider');const { getImageBasename } = require('~/server/services/Files/images');-const { processFileURL } = require('~/server/services/Files/process');const extractBaseURL = require('~/utils/extractBaseURL');const { logger } = require('~/config');@@ -14,6 +14,9 @@ class OpenAICreateImage extends Tool {this.userId = fields.userId;this.fileStrategy = fields.fileStrategy;+ if (fields.processFileURL) {+ this.processFileURL = fields.processFileURL.bind(this);+ }let apiKey = fields.DALLE2_API_KEY ?? fields.DALLE_API_KEY ?? this.getApiKey();const config = { apiKey };@@ -80,13 +83,21 @@ Guidelines:}async _call(input) {- const resp = await this.openai.images.generate({- prompt: this.replaceUnwantedChars(input),- // TODO: Future idea -- could we ask an LLM to extract these arguments from an input that might contain them?- n: 1,- // size: '1024x1024'- size: '512x512',- });+ let resp;++ try {+ resp = await this.openai.images.generate({+ prompt: this.replaceUnwantedChars(input),+ // TODO: Future idea -- could we ask an LLM to extract these arguments from an input that might contain them?+ n: 1,+ // size: '1024x1024'+ size: '512x512',+ });+ } catch (error) {+ logger.error('[DALL-E] Problem generating the image:', error);+ return `Something went wrong when trying to generate the image. The DALL-E API may be unavailable:+Error Message: ${error.message}`;+ }const theImageUrl = resp.data[0].url;@@ -110,15 +121,16 @@ Guidelines:});try {- const result = await processFileURL({+ const result = await this.processFileURL({fileStrategy: this.fileStrategy,userId: this.userId,URL: theImageUrl,fileName: imageName,basePath: 'images',+ context: FileContext.image_generation,});- this.result = this.wrapInMarkdown(result);+ this.result = this.wrapInMarkdown(result.filepath);} catch (error) {logger.error('Error while saving the image:', error);this.result = `Failed to save the image locally. ${error.message}`;diff --git a/api/app/clients/tools/index.js b/api/app/clients/tools/index.jsindex f5410e89ee..60a7419904 100644--- a/api/app/clients/tools/index.js+++ b/api/app/clients/tools/index.js@@ -1,35 +1,42 @@+const availableTools = require('./manifest.json');+// Basic Tools+const CodeBrew = require('./CodeBrew');const GoogleSearchAPI = require('./GoogleSearch');+const WolframAlphaAPI = require('./Wolfram');+const AzureAiSearch = require('./AzureAiSearch');const OpenAICreateImage = require('./DALL-E');-const DALLE3 = require('./structured/DALLE3');-const StructuredSD = require('./structured/StableDiffusion');const StableDiffusionAPI = require('./StableDiffusion');-const WolframAlphaAPI = require('./Wolfram');-const StructuredWolfram = require('./structured/Wolfram');const SelfReflectionTool = require('./SelfReflection');-const AzureAiSearch = require('./AzureAiSearch');-const StructuredACS = require('./structured/AzureAISearch');++// Structured Tools+const DALLE3 = require('./structured/DALLE3');const ChatTool = require('./structured/ChatTool');const E2BTools = require('./structured/E2BTools');const CodeSherpa = require('./structured/CodeSherpa');+const StructuredSD = require('./structured/StableDiffusion');+const StructuredACS = require('./structured/AzureAISearch');const CodeSherpaTools = require('./structured/CodeSherpaTools');-const availableTools = require('./manifest.json');-const CodeBrew = require('./CodeBrew');+const StructuredWolfram = require('./structured/Wolfram');+const TavilySearchResults = require('./structured/TavilySearchResults');module.exports = {availableTools,+ // Basic Tools+ CodeBrew,+ AzureAiSearch,GoogleSearchAPI,+ WolframAlphaAPI,OpenAICreateImage,- DALLE3,StableDiffusionAPI,- StructuredSD,- WolframAlphaAPI,- StructuredWolfram,SelfReflectionTool,- AzureAiSearch,- StructuredACS,- E2BTools,+ // Structured Tools+ DALLE3,ChatTool,+ E2BTools,CodeSherpa,+ StructuredSD,+ StructuredACS,CodeSherpaTools,- CodeBrew,+ StructuredWolfram,+ TavilySearchResults,};diff --git a/api/app/clients/tools/manifest.json b/api/app/clients/tools/manifest.jsonindex 1a03895a85..3a79ec02b1 100644--- a/api/app/clients/tools/manifest.json+++ b/api/app/clients/tools/manifest.json@@ -108,6 +108,19 @@}]},+ {+ "name": "Tavily Search",+ "pluginKey": "tavily_search_results_json",+ "description": "Tavily Search is a robust search API tailored specifically for LLM Agents. It seamlessly integrates with diverse data sources to ensure a superior, relevant search experience.",+ "icon": "https://tavily.com/favicon.ico",+ "authConfig": [+ {+ "authField": "TAVILY_API_KEY",+ "label": "Tavily API Key",+ "description": "Get your API key here: https://app.tavily.com/"+ }+ ]+ },{"name": "Calculator","pluginKey": "calculator",diff --git a/api/app/clients/tools/structured/AzureAISearch.js b/api/app/clients/tools/structured/AzureAISearch.jsindex 9b50aa2c43..0ce7b43fb2 100644--- a/api/app/clients/tools/structured/AzureAISearch.js+++ b/api/app/clients/tools/structured/AzureAISearch.js@@ -19,6 +19,13 @@ class AzureAISearch extends StructuredTool {this.name = 'azure-ai-search';this.description ='Use the \'azure-ai-search\' tool to retrieve search results relevant to your input';+ /* Used to initialize the Tool without necessary variables. */+ this.override = fields.override ?? false;++ // Define schema+ this.schema = z.object({+ query: z.string().describe('Search word or phrase to Azure AI Search'),+ });// Initialize properties using helper functionthis.serviceEndpoint = this._initializeField(@@ -51,12 +58,16 @@ class AzureAISearch extends StructuredTool {);// Check for required fields- if (!this.serviceEndpoint || !this.indexName || !this.apiKey) {+ if (!this.override && (!this.serviceEndpoint || !this.indexName || !this.apiKey)) {throw new Error('Missing AZURE_AI_SEARCH_SERVICE_ENDPOINT, AZURE_AI_SEARCH_INDEX_NAME, or AZURE_AI_SEARCH_API_KEY environment variable.',);}+ if (this.override) {+ return;+ }+// Create SearchClientthis.client = new SearchClient(this.serviceEndpoint,@@ -64,11 +75,6 @@ class AzureAISearch extends StructuredTool {new AzureKeyCredential(this.apiKey),{ apiVersion: this.apiVersion },);-- // Define schema- this.schema = z.object({- query: z.string().describe('Search word or phrase to Azure AI Search'),- });}// Improved error handling and loggingdiff --git a/api/app/clients/tools/structured/DALLE3.js b/api/app/clients/tools/structured/DALLE3.jsindex 92cf5b2a76..e3c0f70104 100644--- a/api/app/clients/tools/structured/DALLE3.js+++ b/api/app/clients/tools/structured/DALLE3.js@@ -4,17 +4,25 @@ const OpenAI = require('openai');const { v4: uuidv4 } = require('uuid');const { Tool } = require('langchain/tools');const { HttpsProxyAgent } = require('https-proxy-agent');+const { FileContext } = require('librechat-data-provider');const { getImageBasename } = require('~/server/services/Files/images');-const { processFileURL } = require('~/server/services/Files/process');const extractBaseURL = require('~/utils/extractBaseURL');const { logger } = require('~/config');class DALLE3 extends Tool {constructor(fields = {}) {super();+ /* Used to initialize the Tool without necessary variables. */+ this.override = fields.override ?? false;+ /* Necessary for output to contain all image metadata. */+ this.returnMetadata = fields.returnMetadata ?? false;this.userId = fields.userId;this.fileStrategy = fields.fileStrategy;+ if (fields.processFileURL) {+ this.processFileURL = fields.processFileURL.bind(this);+ }+let apiKey = fields.DALLE3_API_KEY ?? fields.DALLE_API_KEY ?? this.getApiKey();const config = { apiKey };if (process.env.DALLE_REVERSE_PROXY) {@@ -81,7 +89,7 @@ class DALLE3 extends Tool {getApiKey() {const apiKey = process.env.DALLE3_API_KEY ?? process.env.DALLE_API_KEY ?? '';- if (!apiKey) {+ if (!apiKey && !this.override) {throw new Error('Missing DALLE_API_KEY environment variable.');}return apiKey;@@ -115,6 +123,7 @@ class DALLE3 extends Tool {n: 1,});} catch (error) {+ logger.error('[DALL-E-3] Problem generating the image:', error);return `Something went wrong when trying to generate the image. The DALL-E API may be unavailable:Error Message: ${error.message}`;}@@ -145,15 +154,26 @@ Error Message: ${error.message}`;});try {- const result = await processFileURL({+ const result = await this.processFileURL({fileStrategy: this.fileStrategy,userId: this.userId,URL: theImageUrl,fileName: imageName,basePath: 'images',+ context: FileContext.image_generation,});- this.result = this.wrapInMarkdown(result);+ if (this.returnMetadata) {+ this.result = {+ file_id: result.file_id,+ filename: result.filename,+ filepath: result.filepath,+ height: result.height,+ width: result.width,+ };+ } else {+ this.result = this.wrapInMarkdown(result.filepath);+ }} catch (error) {logger.error('Error while saving the image:', error);this.result = `Failed to save the image locally. ${error.message}`;diff --git a/api/app/clients/tools/structured/StableDiffusion.js b/api/app/clients/tools/structured/StableDiffusion.jsindex 1fc5096730..dc479037b5 100644--- a/api/app/clients/tools/structured/StableDiffusion.js+++ b/api/app/clients/tools/structured/StableDiffusion.js@@ -10,6 +10,9 @@ const { logger } = require('~/config');class StableDiffusionAPI extends StructuredTool {constructor(fields) {super();+ /* Used to initialize the Tool without necessary variables. */+ this.override = fields.override ?? false;+this.name = 'stable-diffusion';this.url = fields.SD_WEBUI_URL || this.getServerURL();this.description_for_model = `// Generate images and visuals using text.@@ -52,7 +55,7 @@ class StableDiffusionAPI extends StructuredTool {getServerURL() {const url = process.env.SD_WEBUI_URL || '';- if (!url) {+ if (!url && !this.override) {throw new Error('Missing SD_WEBUI_URL environment variable.');}return url;diff --git a/api/app/clients/tools/structured/TavilySearchResults.js b/api/app/clients/tools/structured/TavilySearchResults.jsnew file mode 100644index 0000000000..3945ac1d00--- /dev/null+++ b/api/app/clients/tools/structured/TavilySearchResults.js@@ -0,0 +1,92 @@+const { z } = require('zod');+const { Tool } = require('@langchain/core/tools');+const { getEnvironmentVariable } = require('@langchain/core/utils/env');++class TavilySearchResults extends Tool {+ static lc_name() {+ return 'TavilySearchResults';+ }++ constructor(fields = {}) {+ super(fields);+ this.envVar = 'TAVILY_API_KEY';+ /* Used to initialize the Tool without necessary variables. */+ this.override = fields.override ?? false;+ this.apiKey = fields.apiKey ?? this.getApiKey();++ this.kwargs = fields?.kwargs ?? {};+ this.name = 'tavily_search_results_json';+ this.description =+ 'A search engine optimized for comprehensive, accurate, and trusted results. Useful for when you need to answer questions about current events.';++ this.schema = z.object({+ query: z.string().min(1).describe('The search query string.'),+ max_results: z+ .number()+ .min(1)+ .max(10)+ .optional()+ .describe('The maximum number of search results to return. Defaults to 5.'),+ search_depth: z+ .enum(['basic', 'advanced'])+ .optional()+ .describe(+ 'The depth of the search, affecting result quality and response time (`basic` or `advanced`). Default is basic for quick results and advanced for indepth high quality results but longer response time. Advanced calls equals 2 requests.',+ ),+ include_images: z+ .boolean()+ .optional()+ .describe(+ 'Whether to include a list of query-related images in the response. Default is False.',+ ),+ include_answer: z+ .boolean()+ .optional()+ .describe('Whether to include answers in the search results. Default is False.'),+ // include_raw_content: z.boolean().optional().describe('Whether to include raw content in the search results. Default is False.'),+ // include_domains: z.array(z.string()).optional().describe('A list of domains to specifically include in the search results.'),+ // exclude_domains: z.array(z.string()).optional().describe('A list of domains to specifically exclude from the search results.'),+ });+ }++ getApiKey() {+ const apiKey = getEnvironmentVariable(this.envVar);+ if (!apiKey && !this.override) {+ throw new Error(`Missing ${this.envVar} environment variable.`);+ }+ return apiKey;+ }++ async _call(input) {+ const validationResult = this.schema.safeParse(input);+ if (!validationResult.success) {+ throw new Error(`Validation failed: ${JSON.stringify(validationResult.error.issues)}`);+ }++ const { query, ...rest } = validationResult.data;++ const requestBody = {+ api_key: this.apiKey,+ query,+ ...rest,+ ...this.kwargs,+ };++ const response = await fetch('https://api.tavily.com/search', {+ method: 'POST',+ headers: {+ 'Content-Type': 'application/json',+ },+ body: JSON.stringify(requestBody),+ });++ const json = await response.json();+ if (!response.ok) {+ throw new Error(`Request failed with status ${response.status}: ${json.error}`);+ }++ return JSON.stringify(json);+ }+}++module.exports = TavilySearchResults;diff --git a/api/app/clients/tools/structured/Wolfram.js b/api/app/clients/tools/structured/Wolfram.jsindex 2c5c6e023a..fc857b35cb 100644--- a/api/app/clients/tools/structured/Wolfram.js+++ b/api/app/clients/tools/structured/Wolfram.js@@ -7,6 +7,9 @@ const { logger } = require('~/config');class WolframAlphaAPI extends StructuredTool {constructor(fields) {super();+ /* Used to initialize the Tool without necessary variables. */+ this.override = fields.override ?? false;+this.name = 'wolfram';this.apiKey = fields.WOLFRAM_APP_ID || this.getAppId();this.description_for_model = `// Access dynamic computation and curated data from WolframAlpha and Wolfram Cloud.@@ -55,7 +58,7 @@ class WolframAlphaAPI extends StructuredTool {getAppId() {const appId = process.env.WOLFRAM_APP_ID || '';- if (!appId) {+ if (!appId && !this.override) {throw new Error('Missing WOLFRAM_APP_ID environment variable.');}return appId;diff --git a/api/app/clients/tools/structured/specs/DALLE3.spec.js b/api/app/clients/tools/structured/specs/DALLE3.spec.jsindex 58771b1459..1b28de2faf 100644--- a/api/app/clients/tools/structured/specs/DALLE3.spec.js+++ b/api/app/clients/tools/structured/specs/DALLE3.spec.js@@ -1,14 +1,11 @@const OpenAI = require('openai');const DALLE3 = require('../DALLE3');-const { processFileURL } = require('~/server/services/Files/process');const { logger } = require('~/config');jest.mock('openai');-jest.mock('~/server/services/Files/process', () => ({- processFileURL: jest.fn(),-}));+const processFileURL = jest.fn();jest.mock('~/server/services/Files/images', () => ({getImageBasename: jest.fn().mockImplementation((url) => {@@ -69,7 +66,7 @@ describe('DALLE3', () => {jest.resetModules();process.env = { ...originalEnv, DALLE_API_KEY: mockApiKey };// Instantiate DALLE3 for tests that do not depend on DALLE3_SYSTEM_PROMPT- dalle = new DALLE3();+ dalle = new DALLE3({ processFileURL });});afterEach(() => {@@ -78,7 +75,8 @@ describe('DALLE3', () => {process.env = originalEnv;});- it('should throw an error if DALLE_API_KEY is missing', () => {+ it('should throw an error if all potential API keys are missing', () => {+ delete process.env.DALLE3_API_KEY;delete process.env.DALLE_API_KEY;expect(() => new DALLE3()).toThrow('Missing DALLE_API_KEY environment variable.');});@@ -112,7 +110,9 @@ describe('DALLE3', () => {};generate.mockResolvedValue(mockResponse);- processFileURL.mockResolvedValue('http://example.com/img-test.png');+ processFileURL.mockResolvedValue({+ filepath: 'http://example.com/img-test.png',+ });const result = await dalle._call(mockData);diff --git a/api/app/clients/tools/util/handleTools.js b/api/app/clients/tools/util/handleTools.jsindex 4a1e4e09b0..2733791e3b 100644--- a/api/app/clients/tools/util/handleTools.js+++ b/api/app/clients/tools/util/handleTools.js@@ -6,19 +6,22 @@ const { OpenAIEmbeddings } = require('langchain/embeddings/openai');const { getUserPluginAuthValue } = require('~/server/services/PluginService');const {availableTools,+ // Basic Tools+ CodeBrew,+ AzureAISearch,GoogleSearchAPI,WolframAlphaAPI,- StructuredWolfram,OpenAICreateImage,StableDiffusionAPI,+ // Structured ToolsDALLE3,- StructuredSD,- AzureAISearch,- StructuredACS,E2BTools,CodeSherpa,+ StructuredSD,+ StructuredACS,CodeSherpaTools,- CodeBrew,+ StructuredWolfram,+ TavilySearchResults,} = require('../');const { loadToolSuite } = require('./loadToolSuite');const { loadSpecs } = require('./loadSpecs');@@ -151,8 +154,10 @@ const loadTools = async ({returnMap = false,tools = [],options = {},+ skipSpecs = false,}) => {const toolConstructors = {+ tavily_search_results_json: TavilySearchResults,calculator: Calculator,google: GoogleSearchAPI,wolfram: functions ? StructuredWolfram : WolframAlphaAPI,@@ -229,10 +234,17 @@ const loadTools = async ({toolConstructors.codesherpa = CodeSherpa;}+ const imageGenOptions = {+ fileStrategy: options.fileStrategy,+ processFileURL: options.processFileURL,+ returnMetadata: options.returnMetadata,+ };+const toolOptions = {serpapi: { location: 'Austin,Texas,United States', hl: 'en', gl: 'us' },- dalle: { fileStrategy: options.fileStrategy },- 'dall-e': { fileStrategy: options.fileStrategy },+ dalle: imageGenOptions,+ 'dall-e': imageGenOptions,+ 'stable-diffusion': imageGenOptions,};const toolAuthFields = {};@@ -271,7 +283,7 @@ const loadTools = async ({}let specs = null;- if (functions && remainingTools.length > 0) {+ if (functions && remainingTools.length > 0 && skipSpecs !== true) {specs = await loadSpecs({llm: model,user,@@ -298,6 +310,9 @@ const loadTools = async ({let result = [];for (const tool of tools) {const validTool = requestedTools[tool];+ if (!validTool) {+ continue;+ }const plugin = await validTool();if (Array.isArray(plugin)) {diff --git a/api/cache/getLogStores.js b/api/cache/getLogStores.jsindex 894edd2162..1e614cde5f 100644--- a/api/cache/getLogStores.js+++ b/api/cache/getLogStores.js@@ -33,7 +33,11 @@ const genTitle = isEnabled(USE_REDIS) // ttl: 2 minutesconst modelQueries = isEnabled(process.env.USE_REDIS)? new Keyv({ store: keyvRedis })- : new Keyv({ namespace: 'models' });+ : new Keyv({ namespace: CacheKeys.MODEL_QUERIES });++const abortKeys = isEnabled(USE_REDIS)+ ? new Keyv({ store: keyvRedis })+ : new Keyv({ namespace: CacheKeys.ABORT_KEYS });const namespaces = {[CacheKeys.CONFIG_STORE]: config,@@ -45,7 +49,9 @@ const namespaces = {message_limit: createViolationInstance('message_limit'),token_balance: createViolationInstance('token_balance'),registrations: createViolationInstance('registrations'),+ [CacheKeys.FILE_UPLOAD_LIMIT]: createViolationInstance(CacheKeys.FILE_UPLOAD_LIMIT),logins: createViolationInstance('logins'),+ [CacheKeys.ABORT_KEYS]: abortKeys,[CacheKeys.TOKEN_CONFIG]: tokenConfig,[CacheKeys.GEN_TITLE]: genTitle,[CacheKeys.MODEL_QUERIES]: modelQueries,diff --git a/api/config/parsers.js b/api/config/parsers.jsindex 59685eab0b..16c85cba4f 100644--- a/api/config/parsers.js+++ b/api/config/parsers.js@@ -33,6 +33,10 @@ function getMatchingSensitivePatterns(valueStr) {* @returns {string} - The redacted console message.*/function redactMessage(str) {+ if (!str) {+ return '';+ }+const patterns = getMatchingSensitivePatterns(str);if (patterns.length === 0) {diff --git a/api/config/paths.js b/api/config/paths.jsindex 41e3ac5054..92921218e8 100644--- a/api/config/paths.js+++ b/api/config/paths.js@@ -1,7 +1,10 @@const path = require('path');module.exports = {+ uploads: path.resolve(__dirname, '..', '..', 'uploads'),dist: path.resolve(__dirname, '..', '..', 'client', 'dist'),publicPath: path.resolve(__dirname, '..', '..', 'client', 'public'),imageOutput: path.resolve(__dirname, '..', '..', 'client', 'public', 'images'),+ structuredTools: path.resolve(__dirname, '..', 'app', 'clients', 'tools', 'structured'),+ pluginManifest: path.resolve(__dirname, '..', 'app', 'clients', 'tools', 'manifest.json'),};diff --git a/api/models/Action.js b/api/models/Action.jsnew file mode 100644index 0000000000..5141569c10--- /dev/null+++ b/api/models/Action.js@@ -0,0 +1,68 @@+const mongoose = require('mongoose');+const actionSchema = require('./schema/action');++const Action = mongoose.model('action', actionSchema);++/**+ * Update an action with new data without overwriting existing properties,+ * or create a new action if it doesn't exist.+ *+ * @param {Object} searchParams - The search parameters to find the action to update.+ * @param {string} searchParams.action_id - The ID of the action to update.+ * @param {string} searchParams.user - The user ID of the action's author.+ * @param {Object} updateData - An object containing the properties to update.+ * @returns {Promise<Object>} The updated or newly created action document as a plain object.+ */+const updateAction = async (searchParams, updateData) => {+ return await Action.findOneAndUpdate(searchParams, updateData, {+ new: true,+ upsert: true,+ }).lean();+};++/**+ * Retrieves all actions that match the given search parameters.+ *+ * @param {Object} searchParams - The search parameters to find matching actions.+ * @param {boolean} includeSensitive - Flag to include sensitive data in the metadata.+ * @returns {Promise<Array<Object>>} A promise that resolves to an array of action documents as plain objects.+ */+const getActions = async (searchParams, includeSensitive = false) => {+ const actions = await Action.find(searchParams).lean();++ if (!includeSensitive) {+ for (let i = 0; i < actions.length; i++) {+ const metadata = actions[i].metadata;+ if (!metadata) {+ continue;+ }++ const sensitiveFields = ['api_key', 'oauth_client_id', 'oauth_client_secret'];+ for (let field of sensitiveFields) {+ if (metadata[field]) {+ delete metadata[field];+ }+ }+ }+ }++ return actions;+};++/**+ * Deletes an action by its ID.+ *+ * @param {Object} searchParams - The search parameters to find the action to update.+ * @param {string} searchParams.action_id - The ID of the action to update.+ * @param {string} searchParams.user - The user ID of the action's author.+ * @returns {Promise<Object>} A promise that resolves to the deleted action document as a plain object, or null if no document was found.+ */+const deleteAction = async (searchParams) => {+ return await Action.findOneAndDelete(searchParams).lean();+};++module.exports = {+ updateAction,+ getActions,+ deleteAction,+};diff --git a/api/models/Assistant.js b/api/models/Assistant.jsnew file mode 100644index 0000000000..fa6192eee9--- /dev/null+++ b/api/models/Assistant.js@@ -0,0 +1,47 @@+const mongoose = require('mongoose');+const assistantSchema = require('./schema/assistant');++const Assistant = mongoose.model('assistant', assistantSchema);++/**+ * Update an assistant with new data without overwriting existing properties,+ * or create a new assistant if it doesn't exist.+ *+ * @param {Object} searchParams - The search parameters to find the assistant to update.+ * @param {string} searchParams.assistant_id - The ID of the assistant to update.+ * @param {string} searchParams.user - The user ID of the assistant's author.+ * @param {Object} updateData - An object containing the properties to update.+ * @returns {Promise<Object>} The updated or newly created assistant document as a plain object.+ */+const updateAssistant = async (searchParams, updateData) => {+ return await Assistant.findOneAndUpdate(searchParams, updateData, {+ new: true,+ upsert: true,+ }).lean();+};++/**+ * Retrieves an assistant document based on the provided ID.+ *+ * @param {Object} searchParams - The search parameters to find the assistant to update.+ * @param {string} searchParams.assistant_id - The ID of the assistant to update.+ * @param {string} searchParams.user - The user ID of the assistant's author.+ * @returns {Promise<Object|null>} The assistant document as a plain object, or null if not found.+ */+const getAssistant = async (searchParams) => await Assistant.findOne(searchParams).lean();++/**+ * Retrieves all assistants that match the given search parameters.+ *+ * @param {Object} searchParams - The search parameters to find matching assistants.+ * @returns {Promise<Array<Object>>} A promise that resolves to an array of action documents as plain objects.+ */+const getAssistants = async (searchParams) => {+ return await Assistant.find(searchParams).lean();+};++module.exports = {+ updateAssistant,+ getAssistants,+ getAssistant,+};diff --git a/api/models/File.js b/api/models/File.jsindex 4c353fd70b..fa14af3b23 100644--- a/api/models/File.js+++ b/api/models/File.js@@ -14,24 +14,32 @@ const findFileById = async (file_id, options = {}) => {};/**- * Retrieves files matching a given filter.+ * Retrieves files matching a given filter, sorted by the most recently updated.* @param {Object} filter - The filter criteria to apply.+ * @param {Object} [_sortOptions] - Optional sort parameters.* @returns {Promise<Array<MongoFile>>} A promise that resolves to an array of file documents.*/-const getFiles = async (filter) => {- return await File.find(filter).lean();+const getFiles = async (filter, _sortOptions) => {+ const sortOptions = { updatedAt: -1, ..._sortOptions };+ return await File.find(filter).sort(sortOptions).lean();};/*** Creates a new file with a TTL of 1 hour.* @param {MongoFile} data - The file data to be created, must contain file_id.+ * @param {boolean} disableTTL - Whether to disable the TTL.* @returns {Promise<MongoFile>} A promise that resolves to the created file document.*/-const createFile = async (data) => {+const createFile = async (data, disableTTL) => {const fileData = {...data,expiresAt: new Date(Date.now() + 3600 * 1000),};++ if (disableTTL) {+ delete fileData.expiresAt;+ }+return await File.findOneAndUpdate({ file_id: data.file_id }, fileData, {new: true,upsert: true,@@ -75,6 +83,15 @@ const deleteFile = async (file_id) => {return await File.findOneAndDelete({ file_id }).lean();};+/**+ * Deletes a file identified by a filter.+ * @param {object} filter - The filter criteria to apply.+ * @returns {Promise<MongoFile>} A promise that resolves to the deleted file document or null.+ */+const deleteFileByFilter = async (filter) => {+ return await File.findOneAndDelete(filter).lean();+};+/*** Deletes multiple files identified by an array of file_ids.* @param {Array<string>} file_ids - The unique identifiers of the files to delete.@@ -93,4 +110,5 @@ module.exports = {updateFileUsage,deleteFile,deleteFiles,+ deleteFileByFilter,};diff --git a/api/models/Message.js b/api/models/Message.jsindex fe615f3283..a8e1acdf14 100644--- a/api/models/Message.js+++ b/api/models/Message.js@@ -72,11 +72,49 @@ module.exports = {throw new Error('Failed to save message.');}},+ /**+ * Records a message in the database.+ *+ * @async+ * @function recordMessage+ * @param {Object} params - The message data object.+ * @param {string} params.user - The identifier of the user.+ * @param {string} params.endpoint - The endpoint where the message originated.+ * @param {string} params.messageId - The unique identifier for the message.+ * @param {string} params.conversationId - The identifier of the conversation.+ * @param {string} [params.parentMessageId] - The identifier of the parent message, if any.+ * @param {Partial<TMessage>} rest - Any additional properties from the TMessage typedef not explicitly listed.+ * @returns {Promise<Object>} The updated or newly inserted message document.+ * @throws {Error} If there is an error in saving the message.+ */+ async recordMessage({ user, endpoint, messageId, conversationId, parentMessageId, ...rest }) {+ try {+ // No parsing of convoId as may use threadId+ const message = {+ user,+ endpoint,+ messageId,+ conversationId,+ parentMessageId,+ ...rest,+ };++ return await Message.findOneAndUpdate({ user, messageId }, message, {+ upsert: true,+ new: true,+ });+ } catch (err) {+ logger.error('Error saving message:', err);+ throw new Error('Failed to save message.');+ }+ },async updateMessage(message) {try {const { messageId, ...update } = message;update.isEdited = true;- const updatedMessage = await Message.findOneAndUpdate({ messageId }, update, { new: true });+ const updatedMessage = await Message.findOneAndUpdate({ messageId }, update, {+ new: true,+ });if (!updatedMessage) {throw new Error('Message not found.');diff --git a/api/models/index.js b/api/models/index.jsindex 1fa7513540..f1b51d5ef6 100644--- a/api/models/index.js+++ b/api/models/index.js@@ -1,12 +1,14 @@const {getMessages,saveMessage,+ recordMessage,updateMessage,deleteMessagesSince,deleteMessages,} = require('./Message');const { getConvoTitle, getConvo, saveConvo, deleteConvos } = require('./Conversation');const { getPreset, getPresets, savePreset, deletePresets } = require('./Preset');+const { hashPassword, getUser, updateUser } = require('./userMethods');const {findFileById,createFile,@@ -29,8 +31,13 @@ module.exports = {Balance,Transaction,+ hashPassword,+ updateUser,+ getUser,+getMessages,saveMessage,+ recordMessage,updateMessage,deleteMessagesSince,deleteMessages,diff --git a/api/models/plugins/mongoMeili.js b/api/models/plugins/mongoMeili.jsindex abba848614..79dd30b11c 100644--- a/api/models/plugins/mongoMeili.js+++ b/api/models/plugins/mongoMeili.js@@ -183,6 +183,15 @@ const createMeiliMongooseModel = function ({ index, attributesToIndex }) {if (object.conversationId && object.conversationId.includes('|')) {object.conversationId = object.conversationId.replace(/\|/g, '--');}++ if (object.content && Array.isArray(object.content)) {+ object.text = object.content+ .filter((item) => item.type === 'text' && item.text && item.text.value)+ .map((item) => item.text.value)+ .join(' ');+ delete object.content;+ }+return object;}diff --git a/api/models/schema/action.js b/api/models/schema/action.jsnew file mode 100644index 0000000000..fdafd2ec2d--- /dev/null+++ b/api/models/schema/action.js@@ -0,0 +1,60 @@+const mongoose = require('mongoose');++const { Schema } = mongoose;++const AuthSchema = new Schema(+ {+ authorization_type: String,+ custom_auth_header: String,+ type: {+ type: String,+ enum: ['service_http', 'oauth', 'none'],+ },+ authorization_content_type: String,+ authorization_url: String,+ client_url: String,+ scope: String,+ token_exchange_method: {+ type: String,+ enum: ['default_post', 'basic_auth_header', null],+ },+ },+ { _id: false },+);++const actionSchema = new Schema({+ user: {+ type: mongoose.Schema.Types.ObjectId,+ ref: 'User',+ index: true,+ required: true,+ },+ action_id: {+ type: String,+ index: true,+ required: true,+ },+ type: {+ type: String,+ default: 'action_prototype',+ },+ settings: Schema.Types.Mixed,+ assistant_id: String,+ metadata: {+ api_key: String, // private, encrypted+ auth: AuthSchema,+ domain: {+ type: String,+ unique: true,+ required: true,+ },+ // json_schema: Schema.Types.Mixed,+ privacy_policy_url: String,+ raw_spec: String,+ oauth_client_id: String, // private, encrypted+ oauth_client_secret: String, // private, encrypted+ },+});+// }, { minimize: false }); // Prevent removal of empty objects++module.exports = actionSchema;diff --git a/api/models/schema/assistant.js b/api/models/schema/assistant.jsnew file mode 100644index 0000000000..a4ec36e199--- /dev/null+++ b/api/models/schema/assistant.js@@ -0,0 +1,34 @@+const mongoose = require('mongoose');++const assistantSchema = mongoose.Schema(+ {+ user: {+ type: mongoose.Schema.Types.ObjectId,+ ref: 'User',+ required: true,+ },+ assistant_id: {+ type: String,+ unique: true,+ index: true,+ required: true,+ },+ avatar: {+ type: {+ filepath: String,+ source: String,+ },+ default: undefined,+ },+ access_level: {+ type: Number,+ },+ file_ids: { type: [String], default: undefined },+ actions: { type: [String], default: undefined },+ },+ {+ timestamps: true,+ },+);++module.exports = assistantSchema;diff --git a/api/models/schema/defaults.js b/api/models/schema/defaults.jsindex 39a6430f46..fc0add4e06 100644--- a/api/models/schema/defaults.js+++ b/api/models/schema/defaults.js@@ -11,152 +11,133 @@ const conversationPreset = {// for azureOpenAI, openAI, chatGPTBrowser onlymodel: {type: String,- // default: null,required: false,},// for azureOpenAI, openAI onlychatGptLabel: {type: String,- // default: null,required: false,},// for google onlymodelLabel: {type: String,- // default: null,required: false,},promptPrefix: {type: String,- // default: null,required: false,},temperature: {type: Number,- // default: 1,required: false,},top_p: {type: Number,- // default: 1,required: false,},// for google onlytopP: {type: Number,- // default: 0.95,required: false,},topK: {type: Number,- // default: 40,required: false,},maxOutputTokens: {type: Number,- // default: 1024,required: false,},presence_penalty: {type: Number,- // default: 0,required: false,},frequency_penalty: {type: Number,- // default: 0,required: false,},// for bingai onlyjailbreak: {type: Boolean,- // default: false,},context: {type: String,- // default: null,},systemMessage: {type: String,- // default: null,},toneStyle: {type: String,- // default: null,},+ file_ids: { type: [{ type: String }], default: undefined },+ // visionresendImages: {type: Boolean,},imageDetail: {type: String,},+ /* assistants */+ assistant_id: {+ type: String,+ },+ instructions: {+ type: String,+ },};const agentOptions = {model: {type: String,- // default: null,required: false,},// for azureOpenAI, openAI onlychatGptLabel: {type: String,- // default: null,required: false,},modelLabel: {type: String,- // default: null,required: false,},promptPrefix: {type: String,- // default: null,required: false,},temperature: {type: Number,- // default: 1,required: false,},top_p: {type: Number,- // default: 1,required: false,},// for google onlytopP: {type: Number,- // default: 0.95,required: false,},topK: {type: Number,- // default: 40,required: false,},maxOutputTokens: {type: Number,- // default: 1024,required: false,},presence_penalty: {type: Number,- // default: 0,required: false,},frequency_penalty: {type: Number,- // default: 0,required: false,},context: {type: String,- // default: null,},systemMessage: {type: String,- // default: null,},};diff --git a/api/models/schema/fileSchema.js b/api/models/schema/fileSchema.jsindex 471b7bfd70..e470a8d7e6 100644--- a/api/models/schema/fileSchema.js+++ b/api/models/schema/fileSchema.js@@ -3,6 +3,8 @@ const mongoose = require('mongoose');/*** @typedef {Object} MongoFile+ * @property {mongoose.Schema.Types.ObjectId} [_id] - MongoDB Document ID+ * @property {number} [__v] - MongoDB Version Key* @property {mongoose.Schema.Types.ObjectId} user - User ID* @property {string} [conversationId] - Optional conversation ID* @property {string} file_id - File identifier@@ -17,6 +19,8 @@ const mongoose = require('mongoose');* @property {number} [width] - Optional width of the file* @property {number} [height] - Optional height of the file* @property {Date} [expiresAt] - Optional height of the file+ * @property {Date} [createdAt] - Date when the file was created+ * @property {Date} [updatedAt] - Date when the file was updated*/const fileSchema = mongoose.Schema({@@ -61,6 +65,10 @@ const fileSchema = mongoose.Schema(type: String,required: true,},+ context: {+ type: String,+ // required: true,+ },usage: {type: Number,required: true,diff --git a/api/models/schema/messageSchema.js b/api/models/schema/messageSchema.jsindex 06da19e476..fc745499fe 100644--- a/api/models/schema/messageSchema.js+++ b/api/models/schema/messageSchema.js@@ -17,6 +17,7 @@ const messageSchema = mongoose.Schema(user: {type: String,index: true,+ required: true,default: null,},model: {@@ -46,12 +47,10 @@ const messageSchema = mongoose.Schema(},sender: {type: String,- required: true,meiliIndex: true,},text: {type: String,- required: true,meiliIndex: true,},summary: {@@ -103,6 +102,14 @@ const messageSchema = mongoose.Schema(default: undefined,},plugins: { type: [{ type: mongoose.Schema.Types.Mixed }], default: undefined },+ content: {+ type: [{ type: mongoose.Schema.Types.Mixed }],+ default: undefined,+ meiliIndex: true,+ },+ thread_id: {+ type: String,+ },},{ timestamps: true },);diff --git a/api/models/spendTokens.js b/api/models/spendTokens.jsindex 3687d55127..f52075b13d 100644--- a/api/models/spendTokens.js+++ b/api/models/spendTokens.js@@ -21,6 +21,10 @@ const { logger } = require('~/config');*/const spendTokens = async (txData, tokenUsage) => {const { promptTokens, completionTokens } = tokenUsage;+ logger.debug(`[spendTokens] conversationId: ${txData.conversationId} | Token usage: `, {+ promptTokens,+ completionTokens,+ });let prompt, completion;try {if (promptTokens >= 0) {@@ -42,7 +46,12 @@ const spendTokens = async (txData, tokenUsage) => {rawAmount: -completionTokens,});- logger.debug('[spendTokens] post-transaction', { prompt, completion });+ prompt &&+ completion &&+ logger.debug('[spendTokens] Transaction data record against balance:', {+ prompt,+ completion,+ });} catch (err) {logger.error('[spendTokens]', err);}diff --git a/api/models/userMethods.js b/api/models/userMethods.jsnew file mode 100644index 0000000000..c1ccce5b52--- /dev/null+++ b/api/models/userMethods.js@@ -0,0 +1,46 @@+const bcrypt = require('bcryptjs');+const User = require('./User');++const hashPassword = async (password) => {+ const hashedPassword = await new Promise((resolve, reject) => {+ bcrypt.hash(password, 10, function (err, hash) {+ if (err) {+ reject(err);+ } else {+ resolve(hash);+ }+ });+ });++ return hashedPassword;+};++/**+ * Retrieve a user by ID and convert the found user document to a plain object.+ *+ * @param {string} userId - The ID of the user to find and return as a plain object.+ * @returns {Promise<Object>} A plain object representing the user document, or `null` if no user is found.+ */+const getUser = async function (userId) {+ return await User.findById(userId).lean();+};++/**+ * Update a user with new data without overwriting existing properties.+ *+ * @param {string} userId - The ID of the user to update.+ * @param {Object} updateData - An object containing the properties to update.+ * @returns {Promise<Object>} The updated user document as a plain object, or `null` if no user is found.+ */+const updateUser = async function (userId, updateData) {+ return await User.findByIdAndUpdate(userId, updateData, {+ new: true,+ runValidators: true,+ }).lean();+};++module.exports = {+ hashPassword,+ updateUser,+ getUser,+};diff --git a/api/package.json b/api/package.jsonindex e35c01e641..1119bff051 100644--- a/api/package.json+++ b/api/package.json@@ -31,6 +31,7 @@"@azure/search-documents": "^12.0.0","@keyv/mongo": "^2.1.8","@keyv/redis": "^2.8.1",+ "@langchain/community": "^0.0.17","@langchain/google-genai": "^0.0.8","axios": "^1.3.4","bcryptjs": "^2.4.3",@@ -44,6 +45,7 @@"express-mongo-sanitize": "^2.2.0","express-rate-limit": "^6.9.0","express-session": "^1.17.3",+ "file-type": "^18.7.0","firebase": "^10.6.0","googleapis": "^126.0.1","handlebars": "^4.7.7",@@ -58,6 +60,7 @@"librechat-data-provider": "*","lodash": "^4.17.21","meilisearch": "^0.33.0",+ "mime": "^3.0.0","module-alias": "^2.2.3","mongoose": "^7.1.1","multer": "^1.4.5-lts.1",diff --git a/api/server/controllers/AskController.js b/api/server/controllers/AskController.jsindex 67d7c67e9f..52ed0d30fd 100644--- a/api/server/controllers/AskController.js+++ b/api/server/controllers/AskController.js@@ -1,4 +1,4 @@-const { getResponseSender } = require('librechat-data-provider');+const { getResponseSender, Constants } = require('librechat-data-provider');const { sendMessage, createOnProgress } = require('~/server/utils');const { saveMessage, getConvoTitle, getConvo } = require('~/models');const { createAbortController, handleAbortError } = require('~/server/middleware');@@ -140,7 +140,7 @@ const AskController = async (req, res, next, initializeClient, addTitle) => {await saveMessage(userMessage);- if (addTitle && parentMessageId === '00000000-0000-0000-0000-000000000000' && newConvo) {+ if (addTitle && parentMessageId === Constants.NO_PARENT && newConvo) {addTitle(req, {text,response,diff --git a/api/server/controllers/EndpointController.js b/api/server/controllers/EndpointController.jsindex 5069bb33e0..3a0db02228 100644--- a/api/server/controllers/EndpointController.js+++ b/api/server/controllers/EndpointController.js@@ -1,4 +1,4 @@-const { CacheKeys } = require('librechat-data-provider');+const { CacheKeys, EModelEndpoint } = require('librechat-data-provider');const { loadDefaultEndpointsConfig, loadConfigEndpoints } = require('~/server/services/Config');const { getLogStores } = require('~/cache');@@ -14,6 +14,10 @@ async function endpointController(req, res) {const customConfigEndpoints = await loadConfigEndpoints();const endpointsConfig = { ...defaultEndpointsConfig, ...customConfigEndpoints };+ if (endpointsConfig[EModelEndpoint.assistants] && req.app.locals?.[EModelEndpoint.assistants]) {+ endpointsConfig[EModelEndpoint.assistants].disableBuilder =+ req.app.locals[EModelEndpoint.assistants].disableBuilder;+ }await cache.set(CacheKeys.ENDPOINT_CONFIG, endpointsConfig);res.send(JSON.stringify(endpointsConfig));diff --git a/api/server/controllers/PluginController.js b/api/server/controllers/PluginController.jsindex b3c4d31ae7..803d89923b 100644--- a/api/server/controllers/PluginController.js+++ b/api/server/controllers/PluginController.js@@ -1,4 +1,3 @@-const path = require('path');const { promises: fs } = require('fs');const { CacheKeys } = require('librechat-data-provider');const { addOpenAPISpecs } = require('~/app/clients/tools/util/addOpenAPISpecs');@@ -56,12 +55,10 @@ const getAvailablePluginsController = async (req, res) => {return;}- const manifestFile = await fs.readFile(- path.join(__dirname, '..', '..', 'app', 'clients', 'tools', 'manifest.json'),- 'utf8',- );+ const pluginManifest = await fs.readFile(req.app.locals.paths.pluginManifest, 'utf8');- const jsonData = JSON.parse(manifestFile);+ const jsonData = JSON.parse(pluginManifest);+ /** @type {TPlugin[]} */const uniquePlugins = filterUniquePlugins(jsonData);const authenticatedPlugins = uniquePlugins.map((plugin) => {if (isPluginAuthenticated(plugin)) {@@ -78,6 +75,53 @@ const getAvailablePluginsController = async (req, res) => {}};+/**+ * Retrieves and returns a list of available tools, either from a cache or by reading a plugin manifest file.+ *+ * This function first attempts to retrieve the list of tools from a cache. If the tools are not found in the cache,+ * it reads a plugin manifest file, filters for unique plugins, and determines if each plugin is authenticated.+ * Only plugins that are marked as available in the application's local state are included in the final list.+ * The resulting list of tools is then cached and sent to the client.+ *+ * @param {object} req - The request object, containing information about the HTTP request.+ * @param {object} res - The response object, used to send back the desired HTTP response.+ * @returns {Promise<void>} A promise that resolves when the function has completed.+ */+const getAvailableTools = async (req, res) => {+ try {+ const cache = getLogStores(CacheKeys.CONFIG_STORE);+ const cachedTools = await cache.get(CacheKeys.TOOLS);+ if (cachedTools) {+ res.status(200).json(cachedTools);+ return;+ }++ const pluginManifest = await fs.readFile(req.app.locals.paths.pluginManifest, 'utf8');++ const jsonData = JSON.parse(pluginManifest);+ /** @type {TPlugin[]} */+ const uniquePlugins = filterUniquePlugins(jsonData);++ const authenticatedPlugins = uniquePlugins.map((plugin) => {+ if (isPluginAuthenticated(plugin)) {+ return { ...plugin, authenticated: true };+ } else {+ return plugin;+ }+ });++ const tools = authenticatedPlugins.filter(+ (plugin) => req.app.locals.availableTools[plugin.pluginKey] !== undefined,+ );++ await cache.set(CacheKeys.TOOLS, tools);+ res.status(200).json(tools);+ } catch (error) {+ res.status(500).json({ message: error.message });+ }+};+module.exports = {+ getAvailableTools,getAvailablePluginsController,};diff --git a/api/server/controllers/UserController.js b/api/server/controllers/UserController.jsindex fa08cd5452..ac20ca627a 100644--- a/api/server/controllers/UserController.js+++ b/api/server/controllers/UserController.js@@ -8,16 +8,19 @@ const getUserController = async (req, res) => {const updateUserPluginsController = async (req, res) => {const { user } = req;- const { pluginKey, action, auth } = req.body;+ const { pluginKey, action, auth, isAssistantTool } = req.body;let authService;try {- const userPluginsService = await updateUserPluginsService(user, pluginKey, action);+ if (!isAssistantTool) {+ const userPluginsService = await updateUserPluginsService(user, pluginKey, action);- if (userPluginsService instanceof Error) {- logger.error('[userPluginsService]', userPluginsService);- const { status, message } = userPluginsService;- res.status(status).send({ message });+ if (userPluginsService instanceof Error) {+ logger.error('[userPluginsService]', userPluginsService);+ const { status, message } = userPluginsService;+ res.status(status).send({ message });+ }}+if (auth) {const keys = Object.keys(auth);const values = Object.values(auth);diff --git a/api/server/index.js b/api/server/index.jsindex c08415e8fd..5d35434bd2 100644--- a/api/server/index.js+++ b/api/server/index.js@@ -76,7 +76,7 @@ const startServer = async () => {app.use('/api/plugins', routes.plugins);app.use('/api/config', routes.config);app.use('/api/assistants', routes.assistants);- app.use('/api/files', routes.files);+ app.use('/api/files', await routes.files.initialize());app.use((req, res) => {res.status(404).sendFile(path.join(app.locals.paths.dist, 'index.html'));diff --git a/api/server/middleware/abortMiddleware.js b/api/server/middleware/abortMiddleware.jsindex cc9b9fc051..08f614286a 100644--- a/api/server/middleware/abortMiddleware.js+++ b/api/server/middleware/abortMiddleware.js@@ -1,18 +1,24 @@+const { EModelEndpoint } = require('librechat-data-provider');const { sendMessage, sendError, countTokens, isEnabled } = require('~/server/utils');const { saveMessage, getConvo, getConvoTitle } = require('~/models');const clearPendingReq = require('~/cache/clearPendingReq');const abortControllers = require('./abortControllers');const { redactMessage } = require('~/config/parsers');const spendTokens = require('~/models/spendTokens');+const { abortRun } = require('./abortRun');const { logger } = require('~/config');async function abortMessage(req, res) {- let { abortKey, conversationId } = req.body;+ let { abortKey, conversationId, endpoint } = req.body;if (!abortKey && conversationId) {abortKey = conversationId;}+ if (endpoint === EModelEndpoint.assistants) {+ return await abortRun(req, res);+ }+if (!abortControllers.has(abortKey) && !res.headersSent) {return res.status(204).send({ message: 'Request not found' });}diff --git a/api/server/middleware/abortRun.js b/api/server/middleware/abortRun.jsnew file mode 100644index 0000000000..b93eb8c213--- /dev/null+++ b/api/server/middleware/abortRun.js@@ -0,0 +1,87 @@+const { CacheKeys, RunStatus, isUUID } = require('librechat-data-provider');+const { initializeClient } = require('~/server/services/Endpoints/assistant');+const { checkMessageGaps, recordUsage } = require('~/server/services/Threads');+const { getConvo } = require('~/models/Conversation');+const getLogStores = require('~/cache/getLogStores');+const { sendMessage } = require('~/server/utils');+// const spendTokens = require('~/models/spendTokens');+const { logger } = require('~/config');++async function abortRun(req, res) {+ res.setHeader('Content-Type', 'application/json');+ const { abortKey } = req.body;+ const [conversationId, latestMessageId] = abortKey.split(':');++ if (!isUUID.safeParse(conversationId).success) {+ logger.error('[abortRun] Invalid conversationId', { conversationId });+ return res.status(400).send({ message: 'Invalid conversationId' });+ }++ const cacheKey = `${req.user.id}:${conversationId}`;+ const cache = getLogStores(CacheKeys.ABORT_KEYS);+ const runValues = await cache.get(cacheKey);+ const [thread_id, run_id] = runValues.split(':');++ if (!run_id) {+ logger.warn('[abortRun] Couldn\'t find run for cancel request', { thread_id });+ return res.status(204).send({ message: 'Run not found' });+ } else if (run_id === 'cancelled') {+ logger.warn('[abortRun] Run already cancelled', { thread_id });+ return res.status(204).send({ message: 'Run already cancelled' });+ }++ let runMessages = [];+ /** @type {{ openai: OpenAI }} */+ const { openai } = await initializeClient({ req, res });++ try {+ await cache.set(cacheKey, 'cancelled');+ const cancelledRun = await openai.beta.threads.runs.cancel(thread_id, run_id);+ logger.debug('Cancelled run:', cancelledRun);+ } catch (error) {+ logger.error('[abortRun] Error cancelling run', error);+ if (+ error?.message?.includes(RunStatus.CANCELLED) ||+ error?.message?.includes(RunStatus.CANCELLING)+ ) {+ return res.end();+ }+ }++ try {+ const run = await openai.beta.threads.runs.retrieve(thread_id, run_id);+ await recordUsage({+ ...run.usage,+ model: run.model,+ user: req.user.id,+ conversationId,+ });+ } catch (error) {+ logger.error('[abortRun] Error fetching or processing run', error);+ }++ runMessages = await checkMessageGaps({+ openai,+ latestMessageId,+ thread_id,+ run_id,+ conversationId,+ });++ const finalEvent = {+ title: 'New Chat',+ final: true,+ conversation: await getConvo(req.user.id, conversationId),+ runMessages,+ };++ if (res.headersSent && finalEvent) {+ return sendMessage(res, finalEvent);+ }++ res.json(finalEvent);+}++module.exports = {+ abortRun,+};diff --git a/api/server/middleware/buildEndpointOption.js b/api/server/middleware/buildEndpointOption.jsindex 91d0caceaa..40ad9dadb4 100644--- a/api/server/middleware/buildEndpointOption.js+++ b/api/server/middleware/buildEndpointOption.js@@ -5,6 +5,7 @@ const anthropic = require('~/server/services/Endpoints/anthropic');const openAI = require('~/server/services/Endpoints/openAI');const custom = require('~/server/services/Endpoints/custom');const google = require('~/server/services/Endpoints/google');+const assistant = require('~/server/services/Endpoints/assistant');const buildFunction = {[EModelEndpoint.openAI]: openAI.buildOptions,@@ -13,6 +14,7 @@ const buildFunction = {[EModelEndpoint.azureOpenAI]: openAI.buildOptions,[EModelEndpoint.anthropic]: anthropic.buildOptions,[EModelEndpoint.gptPlugins]: gptPlugins.buildOptions,+ [EModelEndpoint.assistants]: assistant.buildOptions,};function buildEndpointOption(req, res, next) {diff --git a/api/server/middleware/denyRequest.js b/api/server/middleware/denyRequest.jsindex 8000aa2b10..37952176bf 100644--- a/api/server/middleware/denyRequest.js+++ b/api/server/middleware/denyRequest.js@@ -1,7 +1,7 @@const crypto = require('crypto');-const { saveMessage } = require('~/models');+const { getResponseSender, Constants } = require('librechat-data-provider');const { sendMessage, sendError } = require('~/server/utils');-const { getResponseSender } = require('librechat-data-provider');+const { saveMessage } = require('~/models');/*** Denies a request by sending an error message and optionally saves the user's message.@@ -38,8 +38,7 @@ const denyRequest = async (req, res, errorMessage) => {};sendMessage(res, { message: userMessage, created: true });- const shouldSaveMessage =- _convoId && parentMessageId && parentMessageId !== '00000000-0000-0000-0000-000000000000';+ const shouldSaveMessage = _convoId && parentMessageId && parentMessageId !== Constants.NO_PARENT;if (shouldSaveMessage) {await saveMessage({ ...userMessage, user: req.user.id });diff --git a/api/server/middleware/index.js b/api/server/middleware/index.jsindex 77afd97165..5b257c9a4d 100644--- a/api/server/middleware/index.js+++ b/api/server/middleware/index.js@@ -4,6 +4,7 @@ const uaParser = require('./uaParser');const setHeaders = require('./setHeaders');const loginLimiter = require('./loginLimiter');const requireJwtAuth = require('./requireJwtAuth');+const uploadLimiters = require('./uploadLimiters');const registerLimiter = require('./registerLimiter');const messageLimiters = require('./messageLimiters');const requireLocalAuth = require('./requireLocalAuth');@@ -16,6 +17,7 @@ const moderateText = require('./moderateText');const noIndex = require('./noIndex');module.exports = {+ ...uploadLimiters,...abortMiddleware,...messageLimiters,checkBan,diff --git a/api/server/middleware/uploadLimiters.js b/api/server/middleware/uploadLimiters.jsnew file mode 100644index 0000000000..80544a580f--- /dev/null+++ b/api/server/middleware/uploadLimiters.js@@ -0,0 +1,75 @@+const rateLimit = require('express-rate-limit');+const { CacheKeys } = require('librechat-data-provider');+const logViolation = require('~/cache/logViolation');++const getEnvironmentVariables = () => {+ const FILE_UPLOAD_IP_MAX = parseInt(process.env.FILE_UPLOAD_IP_MAX) || 100;+ const FILE_UPLOAD_IP_WINDOW = parseInt(process.env.FILE_UPLOAD_IP_WINDOW) || 15;+ const FILE_UPLOAD_USER_MAX = parseInt(process.env.FILE_UPLOAD_USER_MAX) || 50;+ const FILE_UPLOAD_USER_WINDOW = parseInt(process.env.FILE_UPLOAD_USER_WINDOW) || 15;++ const fileUploadIpWindowMs = FILE_UPLOAD_IP_WINDOW * 60 * 1000;+ const fileUploadIpMax = FILE_UPLOAD_IP_MAX;+ const fileUploadIpWindowInMinutes = fileUploadIpWindowMs / 60000;++ const fileUploadUserWindowMs = FILE_UPLOAD_USER_WINDOW * 60 * 1000;+ const fileUploadUserMax = FILE_UPLOAD_USER_MAX;+ const fileUploadUserWindowInMinutes = fileUploadUserWindowMs / 60000;++ return {+ fileUploadIpWindowMs,+ fileUploadIpMax,+ fileUploadIpWindowInMinutes,+ fileUploadUserWindowMs,+ fileUploadUserMax,+ fileUploadUserWindowInMinutes,+ };+};++const createFileUploadHandler = (ip = true) => {+ const {+ fileUploadIpMax,+ fileUploadIpWindowInMinutes,+ fileUploadUserMax,+ fileUploadUserWindowInMinutes,+ } = getEnvironmentVariables();++ return async (req, res) => {+ const type = CacheKeys.FILE_UPLOAD_LIMIT;+ const errorMessage = {+ type,+ max: ip ? fileUploadIpMax : fileUploadUserMax,+ limiter: ip ? 'ip' : 'user',+ windowInMinutes: ip ? fileUploadIpWindowInMinutes : fileUploadUserWindowInMinutes,+ };++ await logViolation(req, res, type, errorMessage);+ res.status(429).json({ message: 'Too many file upload requests. Try again later' });+ };+};++const createFileLimiters = () => {+ const { fileUploadIpWindowMs, fileUploadIpMax, fileUploadUserWindowMs, fileUploadUserMax } =+ getEnvironmentVariables();++ const fileUploadIpLimiter = rateLimit({+ windowMs: fileUploadIpWindowMs,+ max: fileUploadIpMax,+ handler: createFileUploadHandler(),+ });++ const fileUploadUserLimiter = rateLimit({+ windowMs: fileUploadUserWindowMs,+ max: fileUploadUserMax,+ handler: createFileUploadHandler(false),+ keyGenerator: function (req) {+ return req.user?.id; // Use the user ID or NULL if not available+ },+ });++ return { fileUploadIpLimiter, fileUploadUserLimiter };+};++module.exports = {+ createFileLimiters,+};diff --git a/api/server/routes/ask/askChatGPTBrowser.js b/api/server/routes/ask/askChatGPTBrowser.jsindex 34f1096a87..4ce1770b8e 100644--- a/api/server/routes/ask/askChatGPTBrowser.js+++ b/api/server/routes/ask/askChatGPTBrowser.js@@ -1,5 +1,6 @@const crypto = require('crypto');const express = require('express');+const { Constants } = require('librechat-data-provider');const { saveMessage, getConvoTitle, saveConvo, getConvo } = require('~/models');const { handleError, sendMessage, createOnProgress, handleText } = require('~/server/utils');const { setHeaders } = require('~/server/middleware');@@ -27,7 +28,7 @@ router.post('/', setHeaders, async (req, res) => {const conversationId = oldConversationId || crypto.randomUUID();const isNewConversation = !oldConversationId;const userMessageId = crypto.randomUUID();- const userParentMessageId = parentMessageId || '00000000-0000-0000-0000-000000000000';+ const userParentMessageId = parentMessageId || Constants.NO_PARENT;const userMessage = {messageId: userMessageId,sender: 'User',@@ -209,7 +210,7 @@ const ask = async ({});res.end();- if (userParentMessageId == '00000000-0000-0000-0000-000000000000') {+ if (userParentMessageId == Constants.NO_PARENT) {// const title = await titleConvo({ endpoint: endpointOption?.endpoint, text, response: responseMessage });const title = await response.details.title;await saveConvo(user, {diff --git a/api/server/routes/ask/bingAI.js b/api/server/routes/ask/bingAI.jsindex 1281b56ae3..916cda4b10 100644--- a/api/server/routes/ask/bingAI.js+++ b/api/server/routes/ask/bingAI.js@@ -1,5 +1,6 @@-const express = require('express');const crypto = require('crypto');+const express = require('express');+const { Constants } = require('librechat-data-provider');const { handleError, sendMessage, createOnProgress, handleText } = require('~/server/utils');const { saveMessage, getConvoTitle, saveConvo, getConvo } = require('~/models');const { setHeaders } = require('~/server/middleware');@@ -28,7 +29,7 @@ router.post('/', setHeaders, async (req, res) => {const conversationId = oldConversationId || crypto.randomUUID();const isNewConversation = !oldConversationId;const userMessageId = messageId;- const userParentMessageId = parentMessageId || '00000000-0000-0000-0000-000000000000';+ const userParentMessageId = parentMessageId || Constants.NO_PARENT;let userMessage = {messageId: userMessageId,sender: 'User',@@ -238,7 +239,7 @@ const ask = async ({});res.end();- if (userParentMessageId == '00000000-0000-0000-0000-000000000000') {+ if (userParentMessageId == Constants.NO_PARENT) {const title = await titleConvoBing({text,response: responseMessage,diff --git a/api/server/routes/ask/gptPlugins.js b/api/server/routes/ask/gptPlugins.jsindex 85616cd1b3..80817e5a41 100644--- a/api/server/routes/ask/gptPlugins.js+++ b/api/server/routes/ask/gptPlugins.js@@ -1,6 +1,6 @@const express = require('express');const router = express.Router();-const { getResponseSender } = require('librechat-data-provider');+const { getResponseSender, Constants } = require('librechat-data-provider');const { validateTools } = require('~/app');const { addTitle } = require('~/server/services/Endpoints/openAI');const { initializeClient } = require('~/server/services/Endpoints/gptPlugins');@@ -204,7 +204,7 @@ router.post('/', validateEndpoint, buildEndpointOption, setHeaders, async (req,});res.end();- if (parentMessageId === '00000000-0000-0000-0000-000000000000' && newConvo) {+ if (parentMessageId === Constants.NO_PARENT && newConvo) {addTitle(req, {text,response,diff --git a/api/server/routes/assistants/actions.js b/api/server/routes/assistants/actions.jsnew file mode 100644index 0000000000..9a10be9f08--- /dev/null+++ b/api/server/routes/assistants/actions.js@@ -0,0 +1,201 @@+const { v4 } = require('uuid');+const express = require('express');+const { actionDelimiter } = require('librechat-data-provider');+const { initializeClient } = require('~/server/services/Endpoints/assistant');+const { updateAction, getActions, deleteAction } = require('~/models/Action');+const { updateAssistant, getAssistant } = require('~/models/Assistant');+const { encryptMetadata } = require('~/server/services/ActionService');+const { logger } = require('~/config');++const router = express.Router();++/**+ * Retrieves all user's actions+ * @route GET /actions/+ * @param {string} req.params.id - Assistant identifier.+ * @returns {Action[]} 200 - success response - application/json+ */+router.get('/', async (req, res) => {+ try {+ res.json(await getActions({ user: req.user.id }));+ } catch (error) {+ res.status(500).json({ error: error.message });+ }+});++/**+ * Adds or updates actions for a specific assistant.+ * @route POST /actions/:assistant_id+ * @param {string} req.params.assistant_id - The ID of the assistant.+ * @param {FunctionTool[]} req.body.functions - The functions to be added or updated.+ * @param {string} [req.body.action_id] - Optional ID for the action.+ * @param {ActionMetadata} req.body.metadata - Metadata for the action.+ * @returns {Object} 200 - success response - application/json+ */+router.post('/:assistant_id', async (req, res) => {+ try {+ const { assistant_id } = req.params;++ /** @type {{ functions: FunctionTool[], action_id: string, metadata: ActionMetadata }} */+ const { functions, action_id: _action_id, metadata: _metadata } = req.body;+ if (!functions.length) {+ return res.status(400).json({ message: 'No functions provided' });+ }++ let metadata = encryptMetadata(_metadata);++ const { domain } = metadata;+ if (!domain) {+ return res.status(400).json({ message: 'No domain provided' });+ }++ const action_id = _action_id ?? v4();+ const initialPromises = [];++ /** @type {{ openai: OpenAI }} */+ const { openai } = await initializeClient({ req, res });++ initialPromises.push(getAssistant({ assistant_id, user: req.user.id }));+ initialPromises.push(openai.beta.assistants.retrieve(assistant_id));+ !!_action_id && initialPromises.push(getActions({ user: req.user.id, action_id }, true));++ /** @type {[AssistantDocument, Assistant, [Action|undefined]]} */+ const [assistant_data, assistant, actions_result] = await Promise.all(initialPromises);++ if (actions_result && actions_result.length) {+ const action = actions_result[0];+ metadata = { ...action.metadata, ...metadata };+ }++ if (!assistant) {+ return res.status(404).json({ message: 'Assistant not found' });+ }++ const { actions: _actions = [] } = assistant_data ?? {};+ const actions = [];+ for (const action of _actions) {+ const [action_domain, current_action_id] = action.split(actionDelimiter);+ if (action_domain === domain && !_action_id) {+ // TODO: dupe check on the frontend+ return res.status(400).json({+ message: `Action sets cannot have duplicate domains - ${domain} already exists on another action`,+ });+ }++ if (current_action_id === action_id) {+ continue;+ }++ actions.push(action);+ }++ actions.push(`${domain}${actionDelimiter}${action_id}`);++ /** @type {{ tools: FunctionTool[] | { type: 'code_interpreter'|'retrieval'}[]}} */+ const { tools: _tools = [] } = assistant;++ const tools = _tools+ .filter(+ (tool) =>+ !(+ tool.function &&+ (tool.function.name.includes(domain) || tool.function.name.includes(action_id))+ ),+ )+ .concat(+ functions.map((tool) => ({+ ...tool,+ function: {+ ...tool.function,+ name: `${tool.function.name}${actionDelimiter}${domain}`,+ },+ })),+ );++ const promises = [];+ promises.push(+ updateAssistant(+ { assistant_id, user: req.user.id },+ {+ actions,+ },+ ),+ );+ promises.push(openai.beta.assistants.update(assistant_id, { tools }));+ promises.push(updateAction({ action_id, user: req.user.id }, { metadata, assistant_id }));++ /** @type {[AssistantDocument, Assistant, Action]} */+ const resolved = await Promise.all(promises);+ const sensitiveFields = ['api_key', 'oauth_client_id', 'oauth_client_secret'];+ for (let field of sensitiveFields) {+ if (resolved[2].metadata[field]) {+ delete resolved[2].metadata[field];+ }+ }+ res.json(resolved);+ } catch (error) {+ const message = 'Trouble updating the Assistant Action';+ logger.error(message, error);+ res.status(500).json({ message });+ }+});++/**+ * Deletes an action for a specific assistant.+ * @route DELETE /actions/:assistant_id/:action_id+ * @param {string} req.params.assistant_id - The ID of the assistant.+ * @param {string} req.params.action_id - The ID of the action to delete.+ * @returns {Object} 200 - success response - application/json+ */+router.delete('/:assistant_id/:action_id', async (req, res) => {+ try {+ const { assistant_id, action_id } = req.params;++ /** @type {{ openai: OpenAI }} */+ const { openai } = await initializeClient({ req, res });++ const initialPromises = [];+ initialPromises.push(getAssistant({ assistant_id, user: req.user.id }));+ initialPromises.push(openai.beta.assistants.retrieve(assistant_id));++ /** @type {[AssistantDocument, Assistant]} */+ const [assistant_data, assistant] = await Promise.all(initialPromises);++ const { actions } = assistant_data ?? {};+ const { tools = [] } = assistant ?? {};++ let domain = '';+ const updatedActions = actions.filter((action) => {+ if (action.includes(action_id)) {+ [domain] = action.split(actionDelimiter);+ return false;+ }+ return true;+ });++ const updatedTools = tools.filter(+ (tool) => !(tool.function && tool.function.name.includes(domain)),+ );++ const promises = [];+ promises.push(+ updateAssistant(+ { assistant_id, user: req.user.id },+ {+ actions: updatedActions,+ },+ ),+ );+ promises.push(openai.beta.assistants.update(assistant_id, { tools: updatedTools }));+ promises.push(deleteAction({ action_id, user: req.user.id }));++ await Promise.all(promises);+ res.status(200).json({ message: 'Action deleted successfully' });+ } catch (error) {+ const message = 'Trouble deleting the Assistant Action';+ logger.error(message, error);+ res.status(500).json({ message });+ }+});++module.exports = router;diff --git a/api/server/routes/assistants/assistants.js b/api/server/routes/assistants/assistants.jsindex b911c685aa..0f12e2ec78 100644--- a/api/server/routes/assistants/assistants.js+++ b/api/server/routes/assistants/assistants.js@@ -1,9 +1,31 @@-const OpenAI = require('openai');+const multer = require('multer');const express = require('express');+const { FileContext, EModelEndpoint } = require('librechat-data-provider');+const { updateAssistant, getAssistants } = require('~/models/Assistant');+const { initializeClient } = require('~/server/services/Endpoints/assistant');+const { getStrategyFunctions } = require('~/server/services/Files/strategies');+const { uploadImageBuffer } = require('~/server/services/Files/process');+const { deleteFileByFilter } = require('~/models/File');const { logger } = require('~/config');+const actions = require('./actions');+const tools = require('./tools');+const upload = multer();const router = express.Router();+/**+ * Assistant actions route.+ * @route GET|POST /assistants/actions+ */+router.use('/actions', actions);++/**+ * Create an assistant.+ * @route GET /assistants/tools+ * @returns {TPlugin[]} 200 - application/json+ */+router.use('/tools', tools);+/*** Create an assistant.* @route POST /assistants@@ -12,12 +34,25 @@ const router = express.Router();*/router.post('/', async (req, res) => {try {- const openai = new OpenAI(process.env.OPENAI_API_KEY);- const assistantData = req.body;+ /** @type {{ openai: OpenAI }} */+ const { openai } = await initializeClient({ req, res });++ const { tools = [], ...assistantData } = req.body;+ assistantData.tools = tools+ .map((tool) => {+ if (typeof tool !== 'string') {+ return tool;+ }++ return req.app.locals.availableTools[tool];+ })+ .filter((tool) => tool);+const assistant = await openai.beta.assistants.create(assistantData);logger.debug('/assistants/', assistant);res.status(201).json(assistant);} catch (error) {+ logger.error('[/assistants] Error creating assistant', error);res.status(500).json({ error: error.message });}});@@ -30,11 +65,14 @@ router.post('/', async (req, res) => {*/router.get('/:id', async (req, res) => {try {- const openai = new OpenAI(process.env.OPENAI_API_KEY);+ /** @type {{ openai: OpenAI }} */+ const { openai } = await initializeClient({ req, res });+const assistant_id = req.params.id;const assistant = await openai.beta.assistants.retrieve(assistant_id);res.json(assistant);} catch (error) {+ logger.error('[/assistants/:id] Error retrieving assistant', error);res.status(500).json({ error: error.message });}});@@ -48,12 +86,25 @@ router.get('/:id', async (req, res) => {*/router.patch('/:id', async (req, res) => {try {- const openai = new OpenAI(process.env.OPENAI_API_KEY);+ /** @type {{ openai: OpenAI }} */+ const { openai } = await initializeClient({ req, res });+const assistant_id = req.params.id;const updateData = req.body;+ updateData.tools = (updateData.tools ?? [])+ .map((tool) => {+ if (typeof tool !== 'string') {+ return tool;+ }++ return req.app.locals.availableTools[tool];+ })+ .filter((tool) => tool);+const updatedAssistant = await openai.beta.assistants.update(assistant_id, updateData);res.json(updatedAssistant);} catch (error) {+ logger.error('[/assistants/:id] Error updating assistant', error);res.status(500).json({ error: error.message });}});@@ -66,12 +117,15 @@ router.patch('/:id', async (req, res) => {*/router.delete('/:id', async (req, res) => {try {- const openai = new OpenAI(process.env.OPENAI_API_KEY);+ /** @type {{ openai: OpenAI }} */+ const { openai } = await initializeClient({ req, res });+const assistant_id = req.params.id;const deletionStatus = await openai.beta.assistants.del(assistant_id);res.json(deletionStatus);} catch (error) {- res.status(500).json({ error: error.message });+ logger.error('[/assistants/:id] Error deleting assistant', error);+ res.status(500).json({ error: 'Error deleting assistant' });}});@@ -79,22 +133,121 @@ router.delete('/:id', async (req, res) => {* Returns a list of assistants.* @route GET /assistants* @param {AssistantListParams} req.query - The assistant list parameters for pagination and sorting.- * @returns {Array<Assistant>} 200 - success response - application/json+ * @returns {AssistantListResponse} 200 - success response - application/json*/router.get('/', async (req, res) => {try {- const openai = new OpenAI(process.env.OPENAI_API_KEY);+ /** @type {{ openai: OpenAI }} */+ const { openai } = await initializeClient({ req, res });+const { limit, order, after, before } = req.query;- const assistants = await openai.beta.assistants.list({+ const response = await openai.beta.assistants.list({limit,order,after,before,});- res.json(assistants);++ /** @type {AssistantListResponse} */+ let body = response.body;++ if (req.app.locals?.[EModelEndpoint.assistants]) {+ /** @type {Partial<TAssistantEndpoint>} */+ const assistantsConfig = req.app.locals[EModelEndpoint.assistants];+ const { supportedIds, excludedIds } = assistantsConfig;+ if (supportedIds?.length) {+ body.data = body.data.filter((assistant) => supportedIds.includes(assistant.id));+ } else if (excludedIds?.length) {+ body.data = body.data.filter((assistant) => !excludedIds.includes(assistant.id));+ }+ }++ res.json(body);+ } catch (error) {+ logger.error('[/assistants] Error listing assistants', error);+ res.status(500).json({ error: error.message });+ }+});++/**+ * Returns a list of the user's assistant documents (metadata saved to database).+ * @route GET /assistants/documents+ * @returns {AssistantDocument[]} 200 - success response - application/json+ */+router.get('/documents', async (req, res) => {+ try {+ res.json(await getAssistants({ user: req.user.id }));} catch (error) {+ logger.error('[/assistants/documents] Error listing assistant documents', error);res.status(500).json({ error: error.message });}});+/**+ * Uploads and updates an avatar for a specific assistant.+ * @route POST /avatar/:assistant_id+ * @param {string} req.params.assistant_id - The ID of the assistant.+ * @param {Express.Multer.File} req.file - The avatar image file.+ * @param {string} [req.body.metadata] - Optional metadata for the assistant's avatar.+ * @returns {Object} 200 - success response - application/json+ */+router.post('/avatar/:assistant_id', upload.single('file'), async (req, res) => {+ try {+ const { assistant_id } = req.params;+ if (!assistant_id) {+ return res.status(400).json({ message: 'Assistant ID is required' });+ }++ let { metadata: _metadata = '{}' } = req.body;+ /** @type {{ openai: OpenAI }} */+ const { openai } = await initializeClient({ req, res });++ const image = await uploadImageBuffer({ req, context: FileContext.avatar });++ try {+ _metadata = JSON.parse(_metadata);+ } catch (error) {+ logger.error('[/avatar/:assistant_id] Error parsing metadata', error);+ _metadata = {};+ }++ if (_metadata.avatar && _metadata.avatar_source) {+ const { deleteFile } = getStrategyFunctions(_metadata.avatar_source);+ try {+ await deleteFile(req, { filepath: _metadata.avatar });+ await deleteFileByFilter({ filepath: _metadata.avatar });+ } catch (error) {+ logger.error('[/avatar/:assistant_id] Error deleting old avatar', error);+ }+ }++ const metadata = {+ ..._metadata,+ avatar: image.filepath,+ avatar_source: req.app.locals.fileStrategy,+ };++ const promises = [];+ promises.push(+ updateAssistant(+ { assistant_id, user: req.user.id },+ {+ avatar: {+ filepath: image.filepath,+ source: req.app.locals.fileStrategy,+ },+ },+ ),+ );+ promises.push(openai.beta.assistants.update(assistant_id, { metadata }));++ const resolved = await Promise.all(promises);+ res.status(201).json(resolved[1]);+ } catch (error) {+ const message = 'An error occurred while updating the Assistant Avatar';+ logger.error(message, error);+ res.status(500).json({ message });+ }+});+module.exports = router;diff --git a/api/server/routes/assistants/chat.js b/api/server/routes/assistants/chat.jsindex e45bad191e..57a3d4d280 100644--- a/api/server/routes/assistants/chat.js+++ b/api/server/routes/assistants/chat.js@@ -1,64 +1,217 @@-const crypto = require('crypto');-const OpenAI = require('openai');-const { logger } = require('~/config');-const { sendMessage } = require('../../utils');-const { initThread, createRun, handleRun } = require('../../services/AssistantService');+const { v4 } = require('uuid');const express = require('express');+const { EModelEndpoint, Constants, RunStatus, CacheKeys } = require('librechat-data-provider');+const {+ initThread,+ recordUsage,+ saveUserMessage,+ checkMessageGaps,+ addThreadMetadata,+ saveAssistantMessage,+} = require('~/server/services/Threads');+const { runAssistant, createOnTextProgress } = require('~/server/services/AssistantService');+const { addTitle, initializeClient } = require('~/server/services/Endpoints/assistant');+const { createRun, sleep } = require('~/server/services/Runs');+const { getConvo } = require('~/models/Conversation');+const getLogStores = require('~/cache/getLogStores');+const { sendMessage } = require('~/server/utils');+const { logger } = require('~/config');+const router = express.Router();const {setHeaders,- // handleAbort,- // handleAbortError,+ handleAbort,+ handleAbortError,// validateEndpoint,- // buildEndpointOption,- // createAbortController,-} = require('../../middleware');+ buildEndpointOption,+} = require('~/server/middleware');-// const thread = {-// id: 'thread_LexzJUVugYFqfslS7c7iL3Zo',-// "thread_nZoiCbPauU60LqY1Q0ME1elg"-// };+router.post('/abort', handleAbort());/**- * Chat with an assistant.+ * @route POST /+ * @desc Chat with an assistant+ * @access Public+ * @param {express.Request} req - The request object, containing the request data.+ * @param {express.Response} res - The response object, used to send back a response.+ * @returns {void}*/-router.post('/', setHeaders, async (req, res) => {- try {- logger.debug('[/assistants/chat/] req.body', req.body);- // test message:- // How many polls of 500 ms intervals are there in 18 seconds?+router.post('/', buildEndpointOption, setHeaders, async (req, res) => {+ logger.debug('[/assistants/chat/] req.body', req.body);+ const {+ text,+ model,+ files = [],+ promptPrefix,+ assistant_id,+ instructions,+ thread_id: _thread_id,+ messageId: _messageId,+ conversationId: convoId,+ parentMessageId: _parentId = Constants.NO_PARENT,+ } = req.body;++ /** @type {Partial<TAssistantEndpoint>} */+ const assistantsConfig = req.app.locals?.[EModelEndpoint.assistants];++ if (assistantsConfig) {+ const { supportedIds, excludedIds } = assistantsConfig;+ const error = { message: 'Assistant not supported' };+ if (supportedIds?.length && !supportedIds.includes(assistant_id)) {+ return await handleAbortError(res, req, error, {+ sender: 'System',+ conversationId: convoId,+ messageId: v4(),+ parentMessageId: _messageId,+ error,+ });+ } else if (excludedIds?.length && excludedIds.includes(assistant_id)) {+ return await handleAbortError(res, req, error, {+ sender: 'System',+ conversationId: convoId,+ messageId: v4(),+ parentMessageId: _messageId,+ });+ }+ }++ /** @type {OpenAIClient} */+ let openai;+ /** @type {string|undefined} - the current thread id */+ let thread_id = _thread_id;+ /** @type {string|undefined} - the current run id */+ let run_id;+ /** @type {string|undefined} - the parent messageId */+ let parentMessageId = _parentId;+ /** @type {TMessage[]} */+ let previousMessages = [];++ const userMessageId = v4();+ const responseMessageId = v4();++ /** @type {string} - The conversation UUID - created if undefined */+ const conversationId = convoId ?? v4();- const { assistant_id, messages, text: userMessage, messageId } = req.body;- const conversationId = req.body.conversationId || crypto.randomUUID();- // let thread_id = req.body.thread_id ?? 'thread_nZoiCbPauU60LqY1Q0ME1elg'; // for testing- let thread_id = req.body.thread_id;+ const cache = getLogStores(CacheKeys.ABORT_KEYS);+ const cacheKey = `${req.user.id}:${conversationId}`;++ try {+ if (convoId && !_thread_id) {+ throw new Error('Missing thread_id for existing conversation');+ }if (!assistant_id) {throw new Error('Missing assistant_id');}- const openai = new OpenAI(process.env.OPENAI_API_KEY);- console.log(messages);+ /** @type {{ openai: OpenAIClient }} */+ const { openai: _openai, client } = await initializeClient({+ req,+ res,+ endpointOption: req.body.endpointOption,+ initAppClient: true,+ });++ openai = _openai;++ // if (thread_id) {+ // previousMessages = await checkMessageGaps({ openai, thread_id, conversationId });+ // }++ if (previousMessages.length) {+ parentMessageId = previousMessages[previousMessages.length - 1].messageId;+ }++ const userMessage = {+ role: 'user',+ content: text,+ metadata: {+ messageId: userMessageId,+ },+ };+ let thread_file_ids = [];+ if (convoId) {+ const convo = await getConvo(req.user.id, convoId);+ if (convo && convo.file_ids) {+ thread_file_ids = convo.file_ids;+ }+ }++ const file_ids = files.map(({ file_id }) => file_id);+ if (file_ids.length || thread_file_ids.length) {+ userMessage.file_ids = file_ids;+ openai.attachedFileIds = new Set([...file_ids, ...thread_file_ids]);+ }++ // TODO: may allow multiple messages to be created beforehand in a future updateconst initThreadBody = {- messages: [- {- role: 'user',- content: userMessage,- metadata: {- messageId,- },- },- ],+ messages: [userMessage],metadata: {+ user: req.user.id,conversationId,},};const result = await initThread({ openai, body: initThreadBody, thread_id });- // const { messages: _messages } = result;thread_id = result.thread_id;+ createOnTextProgress({+ openai,+ conversationId,+ userMessageId,+ messageId: responseMessageId,+ thread_id,+ });++ const requestMessage = {+ user: req.user.id,+ text,+ messageId: userMessageId,+ parentMessageId,+ // TODO: make sure client sends correct format for `files`, use zod+ files,+ file_ids,+ conversationId,+ isCreatedByUser: true,+ assistant_id,+ thread_id,+ model: assistant_id,+ };++ previousMessages.push(requestMessage);++ await saveUserMessage({ ...requestMessage, model });++ const conversation = {+ conversationId,+ // TODO: title feature+ title: 'New Chat',+ endpoint: EModelEndpoint.assistants,+ promptPrefix: promptPrefix,+ instructions: instructions,+ assistant_id,+ // model,+ };++ if (file_ids.length) {+ conversation.file_ids = file_ids;+ }++ /** @type {CreateRunBody} */+ const body = {+ assistant_id,+ model,+ };++ if (promptPrefix) {+ body.additional_instructions = promptPrefix;+ }++ if (instructions) {+ body.instructions = instructions;+ }+/* NOTE:* By default, a Run will use the model and tools configuration specified in Assistant object,* but you can override most of these when creating the Run for added flexibility:@@ -66,43 +219,160 @@ router.post('/', setHeaders, async (req, res) => {const run = await createRun({openai,thread_id,- body: { assistant_id, model: 'gpt-3.5-turbo-1106' },+ body,+ });++ run_id = run.id;+ await cache.set(cacheKey, `${thread_id}:${run_id}`);++ sendMessage(res, {+ sync: true,+ conversationId,+ // messages: previousMessages,+ requestMessage,+ responseMessage: {+ user: req.user.id,+ messageId: openai.responseMessage.messageId,+ parentMessageId: userMessageId,+ conversationId,+ assistant_id,+ thread_id,+ model: assistant_id,+ },});- const response = await handleRun({ openai, thread_id, run_id: run.id });+ // todo: retry logic+ let response = await runAssistant({ openai, thread_id, run_id });+ logger.debug('[/assistants/chat/] response', response);++ if (response.run.status === RunStatus.IN_PROGRESS) {+ response = await runAssistant({+ openai,+ thread_id,+ run_id,+ in_progress: openai.in_progress,+ });+ }++ /** @type {ResponseMessage} */+ const responseMessage = {+ ...openai.responseMessage,+ parentMessageId: userMessageId,+ conversationId,+ user: req.user.id,+ assistant_id,+ thread_id,+ model: assistant_id,+ };++ // TODO: token count from usage returned in run// TODO: parse responses, save to db, send to usersendMessage(res, {title: 'New Chat',final: true,- conversation: {- conversationId: 'fake-convo-id',- title: 'New Chat',- },+ conversation,requestMessage: {- messageId: 'fake-user-message-id',- parentMessageId: '00000000-0000-0000-0000-000000000000',- conversationId: 'fake-convo-id',- sender: 'User',- text: req.body.text,- isCreatedByUser: true,- },- responseMessage: {- messageId: 'fake-response-id',- conversationId: 'fake-convo-id',- parentMessageId: 'fake-user-message-id',- isCreatedByUser: false,- isEdited: false,- model: 'gpt-3.5-turbo-1106',- sender: 'Assistant',- text: response.choices[0].text,+ parentMessageId,+ thread_id,},});res.end();++ await saveAssistantMessage({ ...responseMessage, model });++ if (parentMessageId === Constants.NO_PARENT && !_thread_id) {+ addTitle(req, {+ text,+ responseText: openai.responseText,+ conversationId,+ client,+ });+ }++ await addThreadMetadata({+ openai,+ thread_id,+ messageId: responseMessage.messageId,+ messages: response.messages,+ });++ if (!response.run.usage) {+ await sleep(3000);+ const completedRun = await openai.beta.threads.runs.retrieve(thread_id, run.id);+ if (completedRun.usage) {+ await recordUsage({+ ...completedRun.usage,+ user: req.user.id,+ model: completedRun.model ?? model,+ conversationId,+ });+ }+ } else {+ await recordUsage({+ ...response.run.usage,+ user: req.user.id,+ model: response.run.model ?? model,+ conversationId,+ });+ }} catch (error) {- // res.status(500).json({ error: error.message });+ if (error.message === 'Run cancelled') {+ return res.end();+ }+logger.error('[/assistants/chat/]', error);- res.end();++ if (!openai || !thread_id || !run_id) {+ return res.status(500).json({ error: 'The Assistant run failed to initialize' });+ }++ try {+ await cache.delete(cacheKey);+ const cancelledRun = await openai.beta.threads.runs.cancel(thread_id, run_id);+ logger.debug('Cancelled run:', cancelledRun);+ } catch (error) {+ logger.error('[abortRun] Error cancelling run', error);+ }++ await sleep(2000);+ try {+ const run = await openai.beta.threads.runs.retrieve(thread_id, run_id);+ await recordUsage({+ ...run.usage,+ model: run.model,+ user: req.user.id,+ conversationId,+ });+ } catch (error) {+ logger.error('[/assistants/chat/] Error fetching or processing run', error);+ }++ try {+ const runMessages = await checkMessageGaps({+ openai,+ run_id,+ thread_id,+ conversationId,+ latestMessageId: responseMessageId,+ });++ const finalEvent = {+ title: 'New Chat',+ final: true,+ conversation: await getConvo(req.user.id, conversationId),+ runMessages,+ };++ if (res.headersSent && finalEvent) {+ return sendMessage(res, finalEvent);+ }++ res.json(finalEvent);+ } catch (error) {+ logger.error('[/assistants/chat/] Error finalizing error process', error);+ return res.status(500).json({ error: 'The Assistant run failed' });+ }}});diff --git a/api/server/routes/assistants/tools.js b/api/server/routes/assistants/tools.jsnew file mode 100644index 0000000000..324b620958--- /dev/null+++ b/api/server/routes/assistants/tools.js@@ -0,0 +1,8 @@+const express = require('express');+const { getAvailableTools } = require('~/server/controllers/PluginController');++const router = express.Router();++router.get('/', getAvailableTools);++module.exports = router;diff --git a/api/server/routes/convos.js b/api/server/routes/convos.jsindex 6213cfd2c7..2af2e10541 100644--- a/api/server/routes/convos.js+++ b/api/server/routes/convos.js@@ -1,10 +1,10 @@const express = require('express');const { CacheKeys } = require('librechat-data-provider');-const { getConvosByPage, deleteConvos } = require('~/models/Conversation');+const { initializeClient } = require('~/server/services/Endpoints/assistant');+const { getConvosByPage, deleteConvos, getConvo, saveConvo } = require('~/models/Conversation');const requireJwtAuth = require('~/server/middleware/requireJwtAuth');-const { sleep } = require('~/server/services/AssistantService');+const { sleep } = require('~/server/services/Runs/handle');const getLogStores = require('~/cache/getLogStores');-const { getConvo, saveConvo } = require('~/models');const { logger } = require('~/config');const router = express.Router();@@ -47,28 +47,37 @@ router.post('/gen_title', async (req, res) => {await titleCache.delete(key);res.status(200).json({ title });} else {- res- .status(404)- .json({- message: 'Title not found or method not implemented for the conversation\'s endpoint',- });+ res.status(404).json({+ message: 'Title not found or method not implemented for the conversation\'s endpoint',+ });}});router.post('/clear', async (req, res) => {let filter = {};- const { conversationId, source } = req.body.arg;+ const { conversationId, source, thread_id } = req.body.arg;if (conversationId) {filter = { conversationId };}- // for debugging deletion source- // logger.debug('source:', source);-if (source === 'button' && !conversationId) {return res.status(200).send('No conversationId provided');}+ if (thread_id) {+ /** @type {{ openai: OpenAI}} */+ const { openai } = await initializeClient({ req, res });+ try {+ const response = await openai.beta.threads.del(thread_id);+ logger.debug('Deleted OpenAI thread:', response);+ } catch (error) {+ logger.error('Error deleting OpenAI thread:', error);+ }+ }++ // for debugging deletion source+ // logger.debug('source:', source);+try {const dbResponse = await deleteConvos(req.user.id, filter);res.status(201).json(dbResponse);diff --git a/api/server/routes/files/avatar.js b/api/server/routes/files/avatar.jsindex 5abba85f9e..71ade965cd 100644--- a/api/server/routes/files/avatar.js+++ b/api/server/routes/files/avatar.js@@ -1,38 +1,36 @@-const express = require('express');const multer = require('multer');--const uploadAvatar = require('~/server/services/Files/images/avatar');-const { requireJwtAuth } = require('~/server/middleware/');-const User = require('~/models/User');+const express = require('express');+const { getStrategyFunctions } = require('~/server/services/Files/strategies');+const { resizeAvatar } = require('~/server/services/Files/images/avatar');+const { logger } = require('~/config');const upload = multer();const router = express.Router();-router.post('/', requireJwtAuth, upload.single('input'), async (req, res) => {+router.post('/', upload.single('input'), async (req, res) => {try {const userId = req.user.id;const { manual } = req.body;const input = req.file.buffer;+if (!userId) {throw new Error('User ID is undefined');}- // TODO: do not use Model directly, instead use a service method that uses the model- const user = await User.findById(userId).lean();-- if (!user) {- throw new Error('User not found');- }- const url = await uploadAvatar({- input,+ const fileStrategy = req.app.locals.fileStrategy;+ const webPBuffer = await resizeAvatar({userId,- manual,- fileStrategy: req.app.locals.fileStrategy,+ input,});+ const { processAvatar } = getStrategyFunctions(fileStrategy);+ const url = await processAvatar({ buffer: webPBuffer, userId, manual });+res.json({ url });} catch (error) {- res.status(500).json({ message: 'An error occurred while uploading the profile picture' });+ const message = 'An error occurred while uploading the profile picture';+ logger.error(message, error);+ res.status(500).json({ message });}});diff --git a/api/server/routes/files/files.js b/api/server/routes/files/files.jsindex 3fea2e5d07..d44df747aa 100644--- a/api/server/routes/files/files.js+++ b/api/server/routes/files/files.js@@ -1,14 +1,17 @@-const { z } = require('zod');+const axios = require('axios');+const fs = require('fs').promises;const express = require('express');-const { FileSources } = require('librechat-data-provider');-const { getStrategyFunctions } = require('~/server/services/Files/strategies');-const { deleteFiles, getFiles } = require('~/models');+const { isUUID } = require('librechat-data-provider');+const {+ filterFile,+ processFileUpload,+ processDeleteRequest,+} = require('~/server/services/Files/process');+const { getFiles } = require('~/models/File');const { logger } = require('~/config');const router = express.Router();-const isUUID = z.string().uuid();-router.get('/', async (req, res) => {try {const files = await getFiles({ user: req.user.id });@@ -19,6 +22,15 @@ router.get('/', async (req, res) => {}});+router.get('/config', async (req, res) => {+ try {+ res.status(200).json(req.app.locals.fileConfig);+ } catch (error) {+ logger.error('[/files] Error getting fileConfig', error);+ res.status(400).json({ message: 'Error in request', error: error.message });+ }+});+router.delete('/', async (req, res) => {try {const { files: _files } = req.body;@@ -31,6 +43,11 @@ router.delete('/', async (req, res) => {if (!file.filepath) {return false;}++ if (/^file-/.test(file.file_id)) {+ return true;+ }+return isUUID.safeParse(file.file_id).success;});@@ -39,33 +56,77 @@ router.delete('/', async (req, res) => {return;}- const file_ids = files.map((file) => file.file_id);- const deletionMethods = {};- const promises = [];- promises.push(await deleteFiles(file_ids));+ await processDeleteRequest({ req, files });- for (const file of files) {- const source = file.source ?? FileSources.local;+ res.status(200).json({ message: 'Files deleted successfully' });+ } catch (error) {+ logger.error('[/files] Error deleting files:', error);+ res.status(400).json({ message: 'Error in request', error: error.message });+ }+});- if (deletionMethods[source]) {- promises.push(deletionMethods[source](req, file));- continue;- }+router.get('/download/:fileId', async (req, res) => {+ try {+ const { fileId } = req.params;- const { deleteFile } = getStrategyFunctions(source);- if (!deleteFile) {- throw new Error(`Delete function not implemented for ${source}`);- }+ const options = {+ headers: {+ // TODO: Client initialization for OpenAI API Authentication+ Authorization: `Bearer ${process.env.OPENAI_API_KEY}`,+ },+ responseType: 'stream',+ };- deletionMethods[source] = deleteFile;- promises.push(deleteFile(req, file));- }+ const fileResponse = await axios.get(`https://api.openai.com/v1/files/${fileId}`, {+ headers: options.headers,+ });+ const { filename } = fileResponse.data;- await Promise.all(promises);- res.status(200).json({ message: 'Files deleted successfully' });+ const response = await axios.get(`https://api.openai.com/v1/files/${fileId}/content`, options);+ res.setHeader('Content-Disposition', `attachment; filename="${filename}"`);+ response.data.pipe(res);} catch (error) {- logger.error('[/files] Error deleting files:', error);- res.status(400).json({ message: 'Error in request', error: error.message });+ console.error('Error downloading file:', error);+ res.status(500).send('Error downloading file');+ }+});++router.post('/', async (req, res) => {+ const file = req.file;+ const metadata = req.body;+ let cleanup = true;++ try {+ filterFile({ req, file });++ metadata.temp_file_id = metadata.file_id;+ metadata.file_id = req.file_id;++ await processFileUpload({ req, res, file, metadata });+ } catch (error) {+ let message = 'Error processing file';+ logger.error('[/files] Error processing file:', error);+ cleanup = false;++ if (error.message?.includes('file_ids')) {+ message += ': ' + error.message;+ }++ // TODO: delete remote file if it exists+ try {+ await fs.unlink(file.path);+ } catch (error) {+ logger.error('[/files] Error deleting file:', error);+ }+ res.status(500).json({ message });+ }++ if (cleanup) {+ try {+ await fs.unlink(file.path);+ } catch (error) {+ logger.error('[/files/images] Error deleting file after file processing:', error);+ }}});diff --git a/api/server/routes/files/images.js b/api/server/routes/files/images.jsindex d1016f98f7..374711c4ac 100644--- a/api/server/routes/files/images.js+++ b/api/server/routes/files/images.js@@ -1,49 +1,29 @@-const { z } = require('zod');const path = require('path');const fs = require('fs').promises;const express = require('express');-const upload = require('./multer');-const { processImageUpload } = require('~/server/services/Files/process');+const { filterFile, processImageFile } = require('~/server/services/Files/process');const { logger } = require('~/config');const router = express.Router();-router.post('/', upload.single('file'), async (req, res) => {- const file = req.file;+router.post('/', async (req, res) => {const metadata = req.body;- // TODO: add file size/type validation-- const uuidSchema = z.string().uuid();try {- if (!file) {- throw new Error('No file provided');- }+ filterFile({ req, file: req.file, image: true });- if (!metadata.file_id) {- throw new Error('No file_id provided');- }-- if (!metadata.width) {- throw new Error('No width provided');- }-- if (!metadata.height) {- throw new Error('No height provided');- }- /* parse to validate api call */- uuidSchema.parse(metadata.file_id);metadata.temp_file_id = metadata.file_id;metadata.file_id = req.file_id;- await processImageUpload({ req, res, file, metadata });+ await processImageFile({ req, res, file: req.file, metadata });} catch (error) {+ // TODO: delete remote file if it existslogger.error('[/files/images] Error processing file:', error);try {const filepath = path.join(req.app.locals.paths.imageOutput,req.user.id,- path.basename(file.filename),+ path.basename(req.file.filename),);await fs.unlink(filepath);} catch (error) {@@ -51,16 +31,6 @@ router.post('/', upload.single('file'), async (req, res) => {}res.status(500).json({ message: 'Error processing file' });}-- // do this if strategy is not local- // finally {- // try {- // // await fs.unlink(file.path);- // } catch (error) {- // logger.error('[/files/images] Error deleting file:', error);-- // }- // }});module.exports = router;diff --git a/api/server/routes/files/index.js b/api/server/routes/files/index.jsindex 9afb900bbe..c9f5ce1679 100644--- a/api/server/routes/files/index.js+++ b/api/server/routes/files/index.js@@ -1,24 +1,27 @@const express = require('express');-const router = express.Router();-const {- uaParser,- checkBan,- requireJwtAuth,- // concurrentLimiter,- // messageIpLimiter,- // messageUserLimiter,-} = require('../../middleware');+const createMulterInstance = require('./multer');+const { uaParser, checkBan, requireJwtAuth, createFileLimiters } = require('~/server/middleware');const files = require('./files');const images = require('./images');const avatar = require('./avatar');-router.use(requireJwtAuth);-router.use(checkBan);-router.use(uaParser);+const initialize = async () => {+ const router = express.Router();+ router.use(requireJwtAuth);+ router.use(checkBan);+ router.use(uaParser);-router.use('/', files);-router.use('/images', images);-router.use('/images/avatar', avatar);+ const upload = await createMulterInstance();+ const { fileUploadIpLimiter, fileUploadUserLimiter } = createFileLimiters();+ router.post('*', fileUploadIpLimiter, fileUploadUserLimiter);+ router.post('/', upload.single('file'));+ router.post('/images', upload.single('file'));-module.exports = router;+ router.use('/', files);+ router.use('/images', images);+ router.use('/images/avatar', avatar);+ return router;+};++module.exports = { initialize };diff --git a/api/server/routes/files/multer.js b/api/server/routes/files/multer.jsindex d5aea05a37..71a820ba54 100644--- a/api/server/routes/files/multer.js+++ b/api/server/routes/files/multer.js@@ -2,13 +2,12 @@ const fs = require('fs');const path = require('path');const crypto = require('crypto');const multer = require('multer');--const supportedTypes = ['image/jpeg', 'image/jpg', 'image/png', 'image/webp'];-const sizeLimit = 20 * 1024 * 1024; // 20 MB+const { fileConfig: defaultFileConfig, mergeFileConfig } = require('librechat-data-provider');+const getCustomConfig = require('~/server/services/Config/getCustomConfig');const storage = multer.diskStorage({destination: function (req, file, cb) {- const outputPath = path.join(req.app.locals.paths.imageOutput, 'temp');+ const outputPath = path.join(req.app.locals.paths.uploads, 'temp', req.user.id);if (!fs.existsSync(outputPath)) {fs.mkdirSync(outputPath, { recursive: true });}@@ -16,22 +15,30 @@ const storage = multer.diskStorage({},filename: function (req, file, cb) {req.file_id = crypto.randomUUID();- const fileExt = path.extname(file.originalname);- cb(null, `img-${req.file_id}${fileExt}`);+ cb(null, `${file.originalname}`);},});const fileFilter = (req, file, cb) => {- if (!supportedTypes.includes(file.mimetype)) {- return cb(- new Error('Unsupported file type. Only JPEG, JPG, PNG, and WEBP files are allowed.'),- false,- );+ if (!file) {+ return cb(new Error('No file provided'), false);+ }++ if (!defaultFileConfig.checkType(file.mimetype)) {+ return cb(new Error('Unsupported file type: ' + file.mimetype), false);}cb(null, true);};-const upload = multer({ storage, fileFilter, limits: { fileSize: sizeLimit } });+const createMulterInstance = async () => {+ const customConfig = await getCustomConfig();+ const fileConfig = mergeFileConfig(customConfig?.fileConfig);+ return multer({+ storage,+ fileFilter,+ limits: { fileSize: fileConfig.serverFileSizeLimit },+ });+};-module.exports = upload;+module.exports = createMulterInstance;diff --git a/api/server/services/ActionService.js b/api/server/services/ActionService.jsnew file mode 100644index 0000000000..76e846af8c--- /dev/null+++ b/api/server/services/ActionService.js@@ -0,0 +1,118 @@+const { AuthTypeEnum } = require('librechat-data-provider');+const { encryptV2, decryptV2 } = require('~/server/utils/crypto');+const { getActions } = require('~/models/Action');+const { logger } = require('~/config');++/**+ * Loads action sets based on the user and assistant ID.+ *+ * @param {Object} params - The parameters for loading action sets.+ * @param {string} params.user - The user identifier.+ * @param {string} params.assistant_id - The assistant identifier.+ * @returns {Promise<Action[] | null>} A promise that resolves to an array of actions or `null` if no match.+ */+async function loadActionSets({ user, assistant_id }) {+ return await getActions({ user, assistant_id }, true);+}++/**+ * Creates a general tool for an entire action set.+ *+ * @param {Object} params - The parameters for loading action sets.+ * @param {Action} params.action - The action set. Necessary for decrypting authentication values.+ * @param {ActionRequest} params.requestBuilder - The ActionRequest builder class to execute the API call.+ * @returns { { _call: (toolInput: Object) => unknown} } An object with `_call` method to execute the tool input.+ */+function createActionTool({ action, requestBuilder }) {+ action.metadata = decryptMetadata(action.metadata);+ const _call = async (toolInput) => {+ try {+ requestBuilder.setParams(toolInput);+ if (action.metadata.auth && action.metadata.auth.type !== AuthTypeEnum.None) {+ await requestBuilder.setAuth(action.metadata);+ }+ const res = await requestBuilder.execute();+ if (typeof res.data === 'object') {+ return JSON.stringify(res.data);+ }+ return res.data;+ } catch (error) {+ logger.error(`API call to ${action.metadata.domain} failed`, error);+ if (error.response) {+ const { status, data } = error.response;+ return `API call to ${action.metadata.domain} failed with status ${status}: ${data}`;+ }++ return `API call to ${action.metadata.domain} failed.`;+ }+ };++ return {+ _call,+ };+}++/**+ * Encrypts sensitive metadata values for an action.+ *+ * @param {ActionMetadata} metadata - The action metadata to encrypt.+ * @returns {ActionMetadata} The updated action metadata with encrypted values.+ */+function encryptMetadata(metadata) {+ const encryptedMetadata = { ...metadata };++ // ServiceHttp+ if (metadata.auth && metadata.auth.type === AuthTypeEnum.ServiceHttp) {+ if (metadata.api_key) {+ encryptedMetadata.api_key = encryptV2(metadata.api_key);+ }+ }++ // OAuth+ else if (metadata.auth && metadata.auth.type === AuthTypeEnum.OAuth) {+ if (metadata.oauth_client_id) {+ encryptedMetadata.oauth_client_id = encryptV2(metadata.oauth_client_id);+ }+ if (metadata.oauth_client_secret) {+ encryptedMetadata.oauth_client_secret = encryptV2(metadata.oauth_client_secret);+ }+ }++ return encryptedMetadata;+}++/**+ * Decrypts sensitive metadata values for an action.+ *+ * @param {ActionMetadata} metadata - The action metadata to decrypt.+ * @returns {ActionMetadata} The updated action metadata with decrypted values.+ */+function decryptMetadata(metadata) {+ const decryptedMetadata = { ...metadata };++ // ServiceHttp+ if (metadata.auth && metadata.auth.type === AuthTypeEnum.ServiceHttp) {+ if (metadata.api_key) {+ decryptedMetadata.api_key = decryptV2(metadata.api_key);+ }+ }++ // OAuth+ else if (metadata.auth && metadata.auth.type === AuthTypeEnum.OAuth) {+ if (metadata.oauth_client_id) {+ decryptedMetadata.oauth_client_id = decryptV2(metadata.oauth_client_id);+ }+ if (metadata.oauth_client_secret) {+ decryptedMetadata.oauth_client_secret = decryptV2(metadata.oauth_client_secret);+ }+ }++ return decryptedMetadata;+}++module.exports = {+ loadActionSets,+ createActionTool,+ encryptMetadata,+ decryptMetadata,+};diff --git a/api/server/services/AppService.js b/api/server/services/AppService.jsindex b62d274d53..5089392ed9 100644--- a/api/server/services/AppService.js+++ b/api/server/services/AppService.js@@ -1,7 +1,10 @@-const { FileSources } = require('librechat-data-provider');+const { FileSources, EModelEndpoint, Constants } = require('librechat-data-provider');const { initializeFirebase } = require('./Files/Firebase/initialize');const loadCustomConfig = require('./Config/loadCustomConfig');+const handleRateLimits = require('./Config/handleRateLimits');+const { loadAndFormatTools } = require('./ToolService');const paths = require('~/config/paths');+const { logger } = require('~/config');/***@@ -12,6 +15,43 @@ const paths = require('~/config/paths');const AppService = async (app) => {/** @type {TCustomConfig}*/const config = (await loadCustomConfig()) ?? {};++ const fileStrategy = config.fileStrategy ?? FileSources.local;+ process.env.CDN_PROVIDER = fileStrategy;++ if (fileStrategy === FileSources.firebase) {+ initializeFirebase();+ }++ /** @type {Record<string, FunctionTool} */+ const availableTools = loadAndFormatTools({+ directory: paths.structuredTools,+ filter: new Set([+ 'ChatTool.js',+ 'CodeSherpa.js',+ 'CodeSherpaTools.js',+ 'E2BTools.js',+ 'extractionChain.js',+ ]),+ });++ if (!Object.keys(config).length) {+ app.locals = {+ availableTools,+ fileStrategy,+ paths,+ };++ return;+ }++ if (config.version !== Constants.CONFIG_VERSION) {+ logger.info(+ `\nOutdated Config version: ${config.version}. Current version: ${Constants.CONFIG_VERSION}\n\nCheck out the latest config file guide for new options and features.\nhttps://docs.librechat.ai/install/configuration/custom_config.html\n\n`,+ );+ }++ handleRateLimits(config?.rateLimits);const socialLogins = config?.registration?.socialLogins ?? ['google','facebook',@@ -19,17 +59,35 @@ const AppService = async (app) => {'github','discord',];- const fileStrategy = config.fileStrategy ?? FileSources.local;- process.env.CDN_PROVIDER = fileStrategy;- if (fileStrategy === FileSources.firebase) {- initializeFirebase();+ const endpointLocals = {};+ if (config?.endpoints?.[EModelEndpoint.assistants]) {+ const { disableBuilder, pollIntervalMs, timeoutMs, supportedIds, excludedIds } =+ config.endpoints[EModelEndpoint.assistants];++ if (supportedIds?.length && excludedIds?.length) {+ logger.warn(+ `Both \`supportedIds\` and \`excludedIds\` are defined for the ${EModelEndpoint.assistants} endpoint; \`excludedIds\` field will be ignored.`,+ );+ }++ /** @type {Partial<TAssistantEndpoint>} */+ endpointLocals[EModelEndpoint.assistants] = {+ disableBuilder,+ pollIntervalMs,+ timeoutMs,+ supportedIds,+ excludedIds,+ };}app.locals = {socialLogins,+ availableTools,fileStrategy,+ fileConfig: config?.fileConfig,paths,+ ...endpointLocals,};};diff --git a/api/server/services/AppService.spec.js b/api/server/services/AppService.spec.jsindex 1f3f2245be..2bd33cbb90 100644--- a/api/server/services/AppService.spec.js+++ b/api/server/services/AppService.spec.js@@ -13,6 +13,24 @@ jest.mock('./Config/loadCustomConfig', () => {jest.mock('./Files/Firebase/initialize', () => ({initializeFirebase: jest.fn(),}));+jest.mock('./ToolService', () => ({+ loadAndFormatTools: jest.fn().mockReturnValue({+ ExampleTool: {+ type: 'function',+ function: {+ description: 'Example tool function',+ name: 'exampleFunction',+ parameters: {+ type: 'object',+ properties: {+ param1: { type: 'string', description: 'An example parameter' },+ },+ required: ['param1'],+ },+ },+ },+ }),+}));describe('AppService', () => {let app;@@ -30,10 +48,39 @@ describe('AppService', () => {expect(app.locals).toEqual({socialLogins: ['testLogin'],fileStrategy: 'testStrategy',+ availableTools: {+ ExampleTool: {+ type: 'function',+ function: expect.objectContaining({+ description: 'Example tool function',+ name: 'exampleFunction',+ parameters: expect.objectContaining({+ type: 'object',+ properties: expect.any(Object),+ required: expect.arrayContaining(['param1']),+ }),+ }),+ },+ },paths: expect.anything(),});});+ it('should log a warning if the config version is outdated', async () => {+ require('./Config/loadCustomConfig').mockImplementationOnce(() =>+ Promise.resolve({+ version: '0.9.0', // An outdated version for this test+ registration: { socialLogins: ['testLogin'] },+ fileStrategy: 'testStrategy',+ }),+ );++ await AppService(app);++ const { logger } = require('~/config');+ expect(logger.info).toHaveBeenCalledWith(expect.stringContaining('Outdated Config version'));+ });+it('should initialize Firebase when fileStrategy is firebase', async () => {require('./Config/loadCustomConfig').mockImplementationOnce(() =>Promise.resolve({@@ -48,4 +95,217 @@ describe('AppService', () => {expect(process.env.CDN_PROVIDER).toEqual(FileSources.firebase);});++ it('should load and format tools accurately with defined structure', async () => {+ const { loadAndFormatTools } = require('./ToolService');+ await AppService(app);++ expect(loadAndFormatTools).toHaveBeenCalledWith({+ directory: expect.anything(),+ filter: expect.anything(),+ });++ expect(app.locals.availableTools.ExampleTool).toBeDefined();+ expect(app.locals.availableTools.ExampleTool).toEqual({+ type: 'function',+ function: {+ description: 'Example tool function',+ name: 'exampleFunction',+ parameters: {+ type: 'object',+ properties: {+ param1: { type: 'string', description: 'An example parameter' },+ },+ required: ['param1'],+ },+ },+ });+ });++ it('should correctly configure endpoints based on custom config', async () => {+ require('./Config/loadCustomConfig').mockImplementationOnce(() =>+ Promise.resolve({+ endpoints: {+ assistants: {+ disableBuilder: true,+ pollIntervalMs: 5000,+ timeoutMs: 30000,+ supportedIds: ['id1', 'id2'],+ },+ },+ }),+ );++ await AppService(app);++ expect(app.locals).toHaveProperty('assistants');+ expect(app.locals.assistants).toEqual(+ expect.objectContaining({+ disableBuilder: true,+ pollIntervalMs: 5000,+ timeoutMs: 30000,+ supportedIds: expect.arrayContaining(['id1', 'id2']),+ }),+ );+ });++ it('should not modify FILE_UPLOAD environment variables without rate limits', async () => {+ // Setup initial environment variables+ process.env.FILE_UPLOAD_IP_MAX = '10';+ process.env.FILE_UPLOAD_IP_WINDOW = '15';+ process.env.FILE_UPLOAD_USER_MAX = '5';+ process.env.FILE_UPLOAD_USER_WINDOW = '20';++ const initialEnv = { ...process.env };++ await AppService(app);++ // Expect environment variables to remain unchanged+ expect(process.env.FILE_UPLOAD_IP_MAX).toEqual(initialEnv.FILE_UPLOAD_IP_MAX);+ expect(process.env.FILE_UPLOAD_IP_WINDOW).toEqual(initialEnv.FILE_UPLOAD_IP_WINDOW);+ expect(process.env.FILE_UPLOAD_USER_MAX).toEqual(initialEnv.FILE_UPLOAD_USER_MAX);+ expect(process.env.FILE_UPLOAD_USER_WINDOW).toEqual(initialEnv.FILE_UPLOAD_USER_WINDOW);+ });++ it('should correctly set FILE_UPLOAD environment variables based on rate limits', async () => {+ // Define and mock a custom configuration with rate limits+ const rateLimitsConfig = {+ rateLimits: {+ fileUploads: {+ ipMax: '100',+ ipWindowInMinutes: '60',+ userMax: '50',+ userWindowInMinutes: '30',+ },+ },+ };++ require('./Config/loadCustomConfig').mockImplementationOnce(() =>+ Promise.resolve(rateLimitsConfig),+ );++ await AppService(app);++ // Verify that process.env has been updated according to the rate limits config+ expect(process.env.FILE_UPLOAD_IP_MAX).toEqual('100');+ expect(process.env.FILE_UPLOAD_IP_WINDOW).toEqual('60');+ expect(process.env.FILE_UPLOAD_USER_MAX).toEqual('50');+ expect(process.env.FILE_UPLOAD_USER_WINDOW).toEqual('30');+ });++ it('should fallback to default FILE_UPLOAD environment variables when rate limits are unspecified', async () => {+ // Setup initial environment variables to non-default values+ process.env.FILE_UPLOAD_IP_MAX = 'initialMax';+ process.env.FILE_UPLOAD_IP_WINDOW = 'initialWindow';+ process.env.FILE_UPLOAD_USER_MAX = 'initialUserMax';+ process.env.FILE_UPLOAD_USER_WINDOW = 'initialUserWindow';++ // Mock a custom configuration without specific rate limits+ require('./Config/loadCustomConfig').mockImplementationOnce(() => Promise.resolve({}));++ await AppService(app);++ // Verify that process.env falls back to the initial values+ expect(process.env.FILE_UPLOAD_IP_MAX).toEqual('initialMax');+ expect(process.env.FILE_UPLOAD_IP_WINDOW).toEqual('initialWindow');+ expect(process.env.FILE_UPLOAD_USER_MAX).toEqual('initialUserMax');+ expect(process.env.FILE_UPLOAD_USER_WINDOW).toEqual('initialUserWindow');+ });+});++describe('AppService updating app.locals', () => {+ let app;+ let initialEnv;++ beforeEach(() => {+ // Store initial environment variables to restore them after each test+ initialEnv = { ...process.env };++ app = { locals: {} };+ process.env.CDN_PROVIDER = undefined;+ });++ afterEach(() => {+ // Restore initial environment variables+ process.env = { ...initialEnv };+ });++ it('should update app.locals with default values if loadCustomConfig returns undefined', async () => {+ // Mock loadCustomConfig to return undefined+ require('./Config/loadCustomConfig').mockImplementationOnce(() => Promise.resolve(undefined));++ await AppService(app);++ expect(app.locals).toBeDefined();+ expect(app.locals.paths).toBeDefined();+ expect(app.locals.availableTools).toBeDefined();+ expect(app.locals.fileStrategy).toEqual(FileSources.local);+ });++ it('should update app.locals with values from loadCustomConfig', async () => {+ // Mock loadCustomConfig to return a specific config object+ const customConfig = {+ fileStrategy: 'firebase',+ registration: { socialLogins: ['testLogin'] },+ };+ require('./Config/loadCustomConfig').mockImplementationOnce(() =>+ Promise.resolve(customConfig),+ );++ await AppService(app);++ expect(app.locals).toBeDefined();+ expect(app.locals.paths).toBeDefined();+ expect(app.locals.availableTools).toBeDefined();+ expect(app.locals.fileStrategy).toEqual(customConfig.fileStrategy);+ expect(app.locals.socialLogins).toEqual(customConfig.registration.socialLogins);+ });++ it('should apply the assistants endpoint configuration correctly to app.locals', async () => {+ const mockConfig = {+ endpoints: {+ assistants: {+ disableBuilder: true,+ pollIntervalMs: 5000,+ timeoutMs: 30000,+ supportedIds: ['id1', 'id2'],+ },+ },+ };+ require('./Config/loadCustomConfig').mockImplementationOnce(() => Promise.resolve(mockConfig));++ const app = { locals: {} };+ await AppService(app);++ expect(app.locals).toHaveProperty('assistants');+ const { assistants } = app.locals;+ expect(assistants.disableBuilder).toBe(true);+ expect(assistants.pollIntervalMs).toBe(5000);+ expect(assistants.timeoutMs).toBe(30000);+ expect(assistants.supportedIds).toEqual(['id1', 'id2']);+ expect(assistants.excludedIds).toBeUndefined();+ });++ it('should log a warning when both supportedIds and excludedIds are provided', async () => {+ const mockConfig = {+ endpoints: {+ assistants: {+ disableBuilder: false,+ pollIntervalMs: 3000,+ timeoutMs: 20000,+ supportedIds: ['id1', 'id2'],+ excludedIds: ['id3'],+ },+ },+ };+ require('./Config/loadCustomConfig').mockImplementationOnce(() => Promise.resolve(mockConfig));++ const app = { locals: {} };+ await require('./AppService')(app);++ const { logger } = require('~/config');+ expect(logger.warn).toHaveBeenCalledWith(+ expect.stringContaining('Both `supportedIds` and `excludedIds` are defined'),+ );+ });});diff --git a/api/server/services/AssistantService.js b/api/server/services/AssistantService.jsindex b6eabb7539..5ddd9a4c67 100644--- a/api/server/services/AssistantService.js+++ b/api/server/services/AssistantService.js@@ -1,256 +1,93 @@-const RunManager = require('./Runs/RunMananger');+const path = require('path');+const { klona } = require('klona');+const {+ StepTypes,+ RunStatus,+ StepStatus,+ FilePurpose,+ ContentTypes,+ ToolCallTypes,+ imageExtRegex,+ imageGenTools,+ EModelEndpoint,+ defaultOrderQuery,+} = require('librechat-data-provider');+const { retrieveAndProcessFile } = require('~/server/services/Files/process');+const { RunManager, waitForRun, sleep } = require('~/server/services/Runs');+const { processRequiredActions } = require('~/server/services/ToolService');+const { createOnProgress, sendMessage } = require('~/server/utils');+const { TextStream } = require('~/app/clients');+const { logger } = require('~/config');/**- * @typedef {Object} Message- * @property {string} id - The identifier of the message.- * @property {string} object - The object type, always 'thread.message'.- * @property {number} created_at - The Unix timestamp (in seconds) for when the message was created.- * @property {string} thread_id - The thread ID that this message belongs to.- * @property {string} role - The entity that produced the message. One of 'user' or 'assistant'.- * @property {Object[]} content - The content of the message in an array of text and/or images.- * @property {string} content[].type - The type of content, either 'text' or 'image_file'.- * @property {Object} [content[].text] - The text content, present if type is 'text'.- * @property {string} content[].text.value - The data that makes up the text.- * @property {Object[]} [content[].text.annotations] - Annotations for the text content.- * @property {Object} [content[].image_file] - The image file content, present if type is 'image_file'.- * @property {string} content[].image_file.file_id - The File ID of the image in the message content.- * @property {string[]} [file_ids] - Optional list of File IDs for the message.- * @property {string|null} [assistant_id] - If applicable, the ID of the assistant that authored this message.- * @property {string|null} [run_id] - If applicable, the ID of the run associated with the authoring of this message.- * @property {Object} [metadata] - Optional metadata for the message, a map of key-value pairs.- */--/**- * @typedef {Object} FunctionTool- * @property {string} type - The type of tool, 'function'.- * @property {Object} function - The function definition.- * @property {string} function.description - A description of what the function does.- * @property {string} function.name - The name of the function to be called.- * @property {Object} function.parameters - The parameters the function accepts, described as a JSON Schema object.- */--/**- * @typedef {Object} Tool- * @property {string} type - The type of tool, can be 'code_interpreter', 'retrieval', or 'function'.- * @property {FunctionTool} [function] - The function tool, present if type is 'function'.- */--/**- * @typedef {Object} Run- * @property {string} id - The identifier of the run.- * @property {string} object - The object type, always 'thread.run'.- * @property {number} created_at - The Unix timestamp (in seconds) for when the run was created.- * @property {string} thread_id - The ID of the thread that was executed on as a part of this run.- * @property {string} assistant_id - The ID of the assistant used for execution of this run.- * @property {string} status - The status of the run (e.g., 'queued', 'completed').- * @property {Object} [required_action] - Details on the action required to continue the run.- * @property {string} required_action.type - The type of required action, always 'submit_tool_outputs'.- * @property {Object} required_action.submit_tool_outputs - Details on the tool outputs needed for the run to continue.- * @property {Object[]} required_action.submit_tool_outputs.tool_calls - A list of the relevant tool calls.- * @property {string} required_action.submit_tool_outputs.tool_calls[].id - The ID of the tool call.- * @property {string} required_action.submit_tool_outputs.tool_calls[].type - The type of tool call the output is required for, always 'function'.- * @property {Object} required_action.submit_tool_outputs.tool_calls[].function - The function definition.- * @property {string} required_action.submit_tool_outputs.tool_calls[].function.name - The name of the function.- * @property {string} required_action.submit_tool_outputs.tool_calls[].function.arguments - The arguments that the model expects you to pass to the function.- * @property {Object} [last_error] - The last error associated with this run.- * @property {string} last_error.code - One of 'server_error' or 'rate_limit_exceeded'.- * @property {string} last_error.message - A human-readable description of the error.- * @property {number} [expires_at] - The Unix timestamp (in seconds) for when the run will expire.- * @property {number} [started_at] - The Unix timestamp (in seconds) for when the run was started.- * @property {number} [cancelled_at] - The Unix timestamp (in seconds) for when the run was cancelled.- * @property {number} [failed_at] - The Unix timestamp (in seconds) for when the run failed.- * @property {number} [completed_at] - The Unix timestamp (in seconds) for when the run was completed.- * @property {string} [model] - The model that the assistant used for this run.- * @property {string} [instructions] - The instructions that the assistant used for this run.- * @property {Tool[]} [tools] - The list of tools used for this run.- * @property {string[]} [file_ids] - The list of File IDs used for this run.- * @property {Object} [metadata] - Metadata associated with this run.- */--/**- * @typedef {Object} RunStep- * @property {string} id - The identifier of the run step.- * @property {string} object - The object type, always 'thread.run.step'.- * @property {number} created_at - The Unix timestamp (in seconds) for when the run step was created.- * @property {string} assistant_id - The ID of the assistant associated with the run step.- * @property {string} thread_id - The ID of the thread that was run.- * @property {string} run_id - The ID of the run that this run step is a part of.- * @property {string} type - The type of run step, either 'message_creation' or 'tool_calls'.- * @property {string} status - The status of the run step, can be 'in_progress', 'cancelled', 'failed', 'completed', or 'expired'.- * @property {Object} step_details - The details of the run step.- * @property {Object} [last_error] - The last error associated with this run step.- * @property {string} last_error.code - One of 'server_error' or 'rate_limit_exceeded'.- * @property {string} last_error.message - A human-readable description of the error.- * @property {number} [expired_at] - The Unix timestamp (in seconds) for when the run step expired.- * @property {number} [cancelled_at] - The Unix timestamp (in seconds) for when the run step was cancelled.- * @property {number} [failed_at] - The Unix timestamp (in seconds) for when the run step failed.- * @property {number} [completed_at] - The Unix timestamp (in seconds) for when the run step completed.- * @property {Object} [metadata] - Metadata associated with this run step, a map of up to 16 key-value pairs.- */--/**- * @typedef {Object} StepMessage- * @property {Message} message - The complete message object created by the step.- * @property {string} id - The identifier of the run step.- * @property {string} object - The object type, always 'thread.run.step'.- * @property {number} created_at - The Unix timestamp (in seconds) for when the run step was created.- * @property {string} assistant_id - The ID of the assistant associated with the run step.- * @property {string} thread_id - The ID of the thread that was run.- * @property {string} run_id - The ID of the run that this run step is a part of.- * @property {string} type - The type of run step, either 'message_creation' or 'tool_calls'.- * @property {string} status - The status of the run step, can be 'in_progress', 'cancelled', 'failed', 'completed', or 'expired'.- * @property {Object} step_details - The details of the run step.- * @property {Object} [last_error] - The last error associated with this run step.- * @property {string} last_error.code - One of 'server_error' or 'rate_limit_exceeded'.- * @property {string} last_error.message - A human-readable description of the error.- * @property {number} [expired_at] - The Unix timestamp (in seconds) for when the run step expired.- * @property {number} [cancelled_at] - The Unix timestamp (in seconds) for when the run step was cancelled.- * @property {number} [failed_at] - The Unix timestamp (in seconds) for when the run step failed.- * @property {number} [completed_at] - The Unix timestamp (in seconds) for when the run step completed.- * @property {Object} [metadata] - Metadata associated with this run step, a map of up to 16 key-value pairs.- */--/**- * Initializes a new thread or adds messages to an existing thread.+ * Sorts, processes, and flattens messages to a single string.*- * @param {Object} params - The parameters for initializing a thread.- * @param {OpenAI} params.openai - The OpenAI client instance.- * @param {Object} params.body - The body of the request.- * @param {Message[]} params.body.messages - A list of messages to start the thread with.- * @param {Object} [params.body.metadata] - Optional metadata for the thread.- * @param {string} [params.thread_id] - Optional existing thread ID. If provided, a message will be added to this thread.- * @return {Promise<Thread>} A promise that resolves to the newly created thread object or the updated thread object.+ * @param {Object} params - Params for creating the onTextProgress function.+ * @param {OpenAIClient} params.openai - The OpenAI client instance.+ * @param {string} params.conversationId - The current conversation ID.+ * @param {string} params.userMessageId - The user message ID; response's `parentMessageId`.+ * @param {string} params.messageId - The response message ID.+ * @param {string} params.thread_id - The current thread ID.+ * @returns {void}*/-async function initThread({ openai, body, thread_id: _thread_id }) {- let thread = {};- const messages = [];- if (_thread_id) {- const message = await openai.beta.threads.messages.create(_thread_id, body.messages[0]);- messages.push(message);- } else {- thread = await openai.beta.threads.create(body);- }-- const thread_id = _thread_id ?? thread.id;- return { messages, thread_id, ...thread };-}--/**- * Creates a run on a thread using the OpenAI API.- *- * @param {Object} params - The parameters for creating a run.- * @param {OpenAI} params.openai - The OpenAI client instance.- * @param {string} params.thread_id - The ID of the thread to run.- * @param {Object} params.body - The body of the request to create a run.- * @param {string} params.body.assistant_id - The ID of the assistant to use for this run.- * @param {string} [params.body.model] - Optional. The ID of the model to be used for this run.- * @param {string} [params.body.instructions] - Optional. Override the default system message of the assistant.- * @param {Object[]} [params.body.tools] - Optional. Override the tools the assistant can use for this run.- * @param {string[]} [params.body.file_ids] - Optional. List of File IDs the assistant can use for this run.- * @param {Object} [params.body.metadata] - Optional. Metadata for the run.- * @return {Promise<Run>} A promise that resolves to the created run object.- */-async function createRun({ openai, thread_id, body }) {- const run = await openai.beta.threads.runs.create(thread_id, body);- return run;-}--// /**-// * Retrieves all steps of a run.-// *-// * @param {Object} params - The parameters for the retrieveRunSteps function.-// * @param {OpenAI} params.openai - The OpenAI client instance.-// * @param {string} params.thread_id - The ID of the thread associated with the run.-// * @param {string} params.run_id - The ID of the run to retrieve steps for.-// * @return {Promise<RunStep[]>} A promise that resolves to an array of RunStep objects.-// */-// async function retrieveRunSteps({ openai, thread_id, run_id }) {-// const runSteps = await openai.beta.threads.runs.steps.list(thread_id, run_id);-// return runSteps;-// }--/**- * Delays the execution for a specified number of milliseconds.- *- * @param {number} ms - The number of milliseconds to delay.- * @return {Promise<void>} A promise that resolves after the specified delay.- */-function sleep(ms) {- return new Promise((resolve) => setTimeout(resolve, ms));-}--/**- * Waits for a run to complete by repeatedly checking its status. It uses a RunManager instance to fetch and manage run steps based on the run status.- *- * @param {Object} params - The parameters for the waitForRun function.- * @param {OpenAI} params.openai - The OpenAI client instance.- * @param {string} params.run_id - The ID of the run to wait for.- * @param {string} params.thread_id - The ID of the thread associated with the run.- * @param {RunManager} params.runManager - The RunManager instance to manage run steps.- * @param {number} params.pollIntervalMs - The interval for polling the run status, default is 500 milliseconds.- * @return {Promise<Run>} A promise that resolves to the last fetched run object.- */-async function waitForRun({ openai, run_id, thread_id, runManager, pollIntervalMs = 500 }) {- const timeout = 18000; // 18 seconds- let timeElapsed = 0;- let run;-- // this runManager will be passed in from the caller- // const runManager = new RunManager({- // 'in_progress': (step) => { /* ... */ },- // 'queued': (step) => { /* ... */ },- // });-- while (timeElapsed < timeout) {- run = await openai.beta.threads.runs.retrieve(thread_id, run_id);- console.log(`Run status: ${run.status}`);-- if (!['in_progress', 'queued'].includes(run.status)) {- await runManager.fetchRunSteps({- openai,- thread_id: thread_id,- run_id: run_id,- runStatus: run.status,- final: true,- });- break;+async function createOnTextProgress({+ openai,+ conversationId,+ userMessageId,+ messageId,+ thread_id,+}) {+ openai.responseMessage = {+ conversationId,+ parentMessageId: userMessageId,+ role: 'assistant',+ messageId,+ content: [],+ };++ openai.responseText = '';++ openai.addContentData = (data) => {+ const { type, index } = data;+ openai.responseMessage.content[index] = { type, [type]: data[type] };++ if (type === ContentTypes.TEXT) {+ openai.responseText += data[type].value;+ return;}- // may use in future- // await runManager.fetchRunSteps({- // openai,- // thread_id: thread_id,- // run_id: run_id,- // runStatus: run.status,- // });-- await sleep(pollIntervalMs);- timeElapsed += pollIntervalMs;- }-- return run;+ const contentData = {+ index,+ type,+ [type]: data[type],+ messageId,+ thread_id,+ conversationId,+ };++ logger.debug('Content data:', contentData);+ sendMessage(openai.res, contentData);+ };}/*** Retrieves the response from an OpenAI run.** @param {Object} params - The parameters for getting the response.- * @param {OpenAI} params.openai - The OpenAI client instance.+ * @param {OpenAIClient} params.openai - The OpenAI client instance.* @param {string} params.run_id - The ID of the run to get the response for.* @param {string} params.thread_id - The ID of the thread associated with the run.- * @return {Promise<OpenAIAssistantFinish | OpenAIAssistantAction[] | Message[] | RequiredActionFunctionToolCall[]>}+ * @return {Promise<OpenAIAssistantFinish | OpenAIAssistantAction[] | ThreadMessage[] | RequiredActionFunctionToolCall[]>}*/async function getResponse({ openai, run_id, thread_id }) {const run = await waitForRun({ openai, run_id, thread_id, pollIntervalMs: 500 });- if (run.status === 'completed') {- const messages = await openai.beta.threads.messages.list(thread_id, {- order: 'asc',- });+ if (run.status === RunStatus.COMPLETED) {+ const messages = await openai.beta.threads.messages.list(thread_id, defaultOrderQuery);const newMessages = messages.data.filter((msg) => msg.run_id === run_id);return newMessages;- } else if (run.status === 'requires_action') {+ } else if (run.status === RunStatus.REQUIRES_ACTION) {const actions = [];run.required_action?.submit_tool_outputs.tool_calls.forEach((item) => {const functionCall = item.function;@@ -259,7 +96,6 @@ async function getResponse({ openai, run_id, thread_id }) {tool: functionCall.name,toolInput: args,toolCallId: item.id,- log: '',run_id,thread_id,});@@ -272,91 +108,433 @@ async function getResponse({ openai, run_id, thread_id }) {throw new Error(`Unexpected run status ${run.status}.\nFull run info:\n\n${runInfo}`);}+/**+ * Filters the steps to keep only the most recent instance of each unique step.+ * @param {RunStep[]} steps - The array of RunSteps to filter.+ * @return {RunStep[]} The filtered array of RunSteps.+ */+function filterSteps(steps = []) {+ if (steps.length <= 1) {+ return steps;+ }+ const stepMap = new Map();++ steps.forEach((step) => {+ if (!step) {+ return;+ }++ const effectiveTimestamp = Math.max(+ step.created_at,+ step.expired_at || 0,+ step.cancelled_at || 0,+ step.failed_at || 0,+ step.completed_at || 0,+ );++ if (!stepMap.has(step.id) || effectiveTimestamp > stepMap.get(step.id).effectiveTimestamp) {+ const latestStep = { ...step, effectiveTimestamp };+ if (latestStep.last_error) {+ // testing to see if we ever step into this+ }+ stepMap.set(step.id, latestStep);+ }+ });++ return Array.from(stepMap.values()).map((step) => {+ delete step.effectiveTimestamp;+ return step;+ });+}++/**+ * @callback InProgressFunction+ * @param {Object} params - The parameters for the in progress step.+ * @param {RunStep} params.step - The step object with details about the message creation.+ * @returns {Promise<void>} - A promise that resolves when the step is processed.+ */++function hasToolCallChanged(previousCall, currentCall) {+ return JSON.stringify(previousCall) !== JSON.stringify(currentCall);+}++/**+ * Creates a handler function for steps in progress, specifically for+ * processing messages and managing seen completed messages.+ *+ * @param {OpenAIClient} openai - The OpenAI client instance.+ * @param {string} thread_id - The ID of the thread the run is in.+ * @param {ThreadMessage[]} messages - The accumulated messages for the run.+ * @return {InProgressFunction} a function to handle steps in progress.+ */+function createInProgressHandler(openai, thread_id, messages) {+ openai.index = 0;+ openai.mappedOrder = new Map();+ openai.seenToolCalls = new Map();+ openai.processedFileIds = new Set();+ openai.completeToolCallSteps = new Set();+ openai.seenCompletedMessages = new Set();++ /**+ * The in_progress function for handling message creation steps.+ *+ * @type {InProgressFunction}+ */+ async function in_progress({ step }) {+ if (step.type === StepTypes.TOOL_CALLS) {+ const { tool_calls } = step.step_details;++ for (const _toolCall of tool_calls) {+ /** @type {StepToolCall} */+ const toolCall = _toolCall;+ const previousCall = openai.seenToolCalls.get(toolCall.id);++ // If the tool call isn't new and hasn't changed+ if (previousCall && !hasToolCallChanged(previousCall, toolCall)) {+ continue;+ }++ let toolCallIndex = openai.mappedOrder.get(toolCall.id);+ if (toolCallIndex === undefined) {+ // New tool call+ toolCallIndex = openai.index;+ openai.mappedOrder.set(toolCall.id, openai.index);+ openai.index++;+ }++ if (step.status === StepStatus.IN_PROGRESS) {+ toolCall.progress =+ previousCall && previousCall.progress+ ? Math.min(previousCall.progress + 0.2, 0.95)+ : 0.01;+ } else {+ toolCall.progress = 1;+ openai.completeToolCallSteps.add(step.id);+ }++ if (+ toolCall.type === ToolCallTypes.CODE_INTERPRETER &&+ step.status === StepStatus.COMPLETED+ ) {+ const { outputs } = toolCall[toolCall.type];++ for (const output of outputs) {+ if (output.type !== 'image') {+ continue;+ }++ if (openai.processedFileIds.has(output.image?.file_id)) {+ continue;+ }++ const { file_id } = output.image;+ const file = await retrieveAndProcessFile({+ openai,+ file_id,+ basename: `${file_id}.png`,+ });+ // toolCall.asset_pointer = file.filepath;+ const prelimImage = {+ file_id,+ filename: path.basename(file.filepath),+ filepath: file.filepath,+ height: file.height,+ width: file.width,+ };+ // check if every key has a value before adding to content+ const prelimImageKeys = Object.keys(prelimImage);+ const validImageFile = prelimImageKeys.every((key) => prelimImage[key]);++ if (!validImageFile) {+ continue;+ }++ const image_file = {+ [ContentTypes.IMAGE_FILE]: prelimImage,+ type: ContentTypes.IMAGE_FILE,+ index: openai.index,+ };+ openai.addContentData(image_file);+ openai.processedFileIds.add(file_id);+ openai.index++;+ }+ } else if (+ toolCall.type === ToolCallTypes.FUNCTION &&+ step.status === StepStatus.COMPLETED &&+ imageGenTools.has(toolCall[toolCall.type].name)+ ) {+ /* If a change is detected, skip image generation tools as already processed */+ openai.seenToolCalls.set(toolCall.id, toolCall);+ continue;+ }++ openai.addContentData({+ [ContentTypes.TOOL_CALL]: toolCall,+ index: toolCallIndex,+ type: ContentTypes.TOOL_CALL,+ });++ // Update the stored tool call+ openai.seenToolCalls.set(toolCall.id, toolCall);+ }+ } else if (step.type === StepTypes.MESSAGE_CREATION && step.status === StepStatus.COMPLETED) {+ const { message_id } = step.step_details.message_creation;+ if (openai.seenCompletedMessages.has(message_id)) {+ return;+ }++ openai.seenCompletedMessages.add(message_id);++ const message = await openai.beta.threads.messages.retrieve(thread_id, message_id);+ messages.push(message);++ let messageIndex = openai.mappedOrder.get(step.id);+ if (messageIndex === undefined) {+ // New message+ messageIndex = openai.index;+ openai.mappedOrder.set(step.id, openai.index);+ openai.index++;+ }++ const result = await processMessages(openai, [message]);+ openai.addContentData({+ [ContentTypes.TEXT]: { value: result.text },+ type: ContentTypes.TEXT,+ index: messageIndex,+ });++ // Create the Factory Function to stream the message+ const { onProgress: progressCallback } = createOnProgress({+ // todo: add option to save partialText to db+ // onProgress: () => {},+ });++ // This creates a function that attaches all of the parameters+ // specified here to each SSE message generated by the TextStream+ const onProgress = progressCallback({+ res: openai.res,+ index: messageIndex,+ messageId: openai.responseMessage.messageId,+ type: ContentTypes.TEXT,+ stream: true,+ thread_id,+ });++ // Create a small buffer before streaming begins+ await sleep(500);++ const stream = new TextStream(result.text, { delay: 9 });+ await stream.processTextStream(onProgress);+ }+ }++ return in_progress;+}+/*** Initializes a RunManager with handlers, then invokes waitForRun to monitor and manage an OpenAI run.** @param {Object} params - The parameters for managing and monitoring the run.- * @param {OpenAI} params.openai - The OpenAI client instance.+ * @param {OpenAIClient} params.openai - The OpenAI client instance.* @param {string} params.run_id - The ID of the run to manage and monitor.* @param {string} params.thread_id - The ID of the thread associated with the run.- * @return {Promise<Object>} A promise that resolves to an object containing the run and managed steps.+ * @param {RunStep[]} params.accumulatedSteps - The accumulated steps for the run.+ * @param {ThreadMessage[]} params.accumulatedMessages - The accumulated messages for the run.+ * @param {InProgressFunction} [params.in_progress] - The `in_progress` function from a previous run.+ * @return {Promise<RunResponse>} A promise that resolves to an object containing the run and managed steps.*/-async function handleRun({ openai, run_id, thread_id }) {- let steps;- let messages;+async function runAssistant({+ openai,+ run_id,+ thread_id,+ accumulatedSteps = [],+ accumulatedMessages = [],+ in_progress: inProgress,+}) {+ let steps = accumulatedSteps;+ let messages = accumulatedMessages;+ const in_progress = inProgress ?? createInProgressHandler(openai, thread_id, messages);+ openai.in_progress = in_progress;+const runManager = new RunManager({- // 'in_progress': async ({ step, final, isLast }) => {- // // Define logic for handling steps with 'in_progress' status- // },- // 'queued': async ({ step, final, isLast }) => {- // // Define logic for handling steps with 'queued' status- // },+ in_progress,final: async ({ step, runStatus, stepsByStatus }) => {- console.log(`Final step for ${run_id} with status ${runStatus}`);- console.dir(step, { depth: null });+ logger.debug(`[runAssistant] Final step for ${run_id} with status ${runStatus}`, step);const promises = [];- promises.push(- openai.beta.threads.messages.list(thread_id, {- order: 'asc',- }),- );-- const finalSteps = stepsByStatus[runStatus];+ // promises.push(+ // openai.beta.threads.messages.list(thread_id, defaultOrderQuery),+ // );- // loop across all statuses, may use in the future- // for (const [_status, stepsPromises] of Object.entries(stepsByStatus)) {- // promises.push(...stepsPromises);+ // const finalSteps = stepsByStatus[runStatus];+ // for (const stepPromise of finalSteps) {+ // promises.push(stepPromise);// }- for (const stepPromise of finalSteps) {- promises.push(stepPromise);++ // loop across all statuses+ for (const [_status, stepsPromises] of Object.entries(stepsByStatus)) {+ promises.push(...stepsPromises);}const resolved = await Promise.all(promises);- const res = resolved.shift();- messages = res.data.filter((msg) => msg.run_id === run_id);+ const finalSteps = filterSteps(steps.concat(resolved));++ if (step.type === StepTypes.MESSAGE_CREATION) {+ const incompleteToolCallSteps = finalSteps.filter(+ (s) => s && s.type === StepTypes.TOOL_CALLS && !openai.completeToolCallSteps.has(s.id),+ );+ for (const incompleteToolCallStep of incompleteToolCallSteps) {+ await in_progress({ step: incompleteToolCallStep });+ }+ }+ await in_progress({ step });+ // const res = resolved.shift();+ // messages = messages.concat(res.data.filter((msg) => msg && msg.run_id === run_id));resolved.push(step);- steps = resolved;+ /* Note: no issues without deep cloning, but it's safer to do so */+ steps = klona(finalSteps);},});- const run = await waitForRun({ openai, run_id, thread_id, runManager, pollIntervalMs: 500 });+ /** @type {TCustomConfig.endpoints.assistants} */+ const assistantsEndpointConfig = openai.req.app.locals?.[EModelEndpoint.assistants] ?? {};+ const { pollIntervalMs, timeoutMs } = assistantsEndpointConfig;++ const run = await waitForRun({+ openai,+ run_id,+ thread_id,+ runManager,+ pollIntervalMs,+ timeout: timeoutMs,+ });++ if (!run.required_action) {+ // const { messages: sortedMessages, text } = await processMessages(openai, messages);+ // return { run, steps, messages: sortedMessages, text };+ const sortedMessages = messages.sort((a, b) => a.created_at - b.created_at);+ return { run, steps, messages: sortedMessages };+ }++ const { submit_tool_outputs } = run.required_action;+ const actions = submit_tool_outputs.tool_calls.map((item) => {+ const functionCall = item.function;+ const args = JSON.parse(functionCall.arguments);+ return {+ tool: functionCall.name,+ toolInput: args,+ toolCallId: item.id,+ run_id,+ thread_id,+ };+ });++ const outputs = await processRequiredActions(openai, actions);++ const toolRun = await openai.beta.threads.runs.submitToolOutputs(run.thread_id, run.id, outputs);- return { run, steps, messages };+ // Recursive call with accumulated steps and messages+ return await runAssistant({+ openai,+ run_id: toolRun.id,+ thread_id,+ accumulatedSteps: steps,+ accumulatedMessages: messages,+ in_progress,+ });}/**- * Maps messages to their corresponding steps. Steps with message creation will be paired with their messages,- * while steps without message creation will be returned as is.+ * Sorts, processes, and flattens messages to a single string.*- * @param {RunStep[]} steps - An array of steps from the run.- * @param {Message[]} messages - An array of message objects.- * @returns {(StepMessage | RunStep)[]} An array where each element is either a step with its corresponding message (StepMessage) or a step without a message (RunStep).+ * @param {OpenAIClient} openai - The OpenAI client instance.+ * @param {ThreadMessage[]} messages - An array of messages.+ * @returns {Promise<{messages: ThreadMessage[], text: string}>} The sorted messages and the flattened text.*/-function mapMessagesToSteps(steps, messages) {- // Create a map of messages indexed by their IDs for efficient lookup- const messageMap = messages.reduce((acc, msg) => {- acc[msg.id] = msg;- return acc;- }, {});-- // Map each step to its corresponding message, or return the step as is if no message ID is present- return steps.map((step) => {- const messageId = step.step_details?.message_creation?.message_id;-- if (messageId && messageMap[messageId]) {- return { step, message: messageMap[messageId] };+async function processMessages(openai, messages = []) {+ const sorted = messages.sort((a, b) => a.created_at - b.created_at);++ let text = '';+ for (const message of sorted) {+ message.files = [];+ for (const content of message.content) {+ const processImageFile =+ content.type === 'image_file' && !openai.processedFileIds.has(content.image_file?.file_id);+ if (processImageFile) {+ const { file_id } = content.image_file;++ const file = await retrieveAndProcessFile({ openai, file_id, basename: `${file_id}.png` });+ openai.processedFileIds.add(file_id);+ message.files.push(file);+ continue;+ }++ text += (content.text?.value ?? '') + ' ';++ // Process annotations if they exist+ if (!content.text?.annotations) {+ continue;+ }++ logger.debug('Processing annotations:', content.text.annotations);+ for (const annotation of content.text.annotations) {+ logger.debug('Current annotation:', annotation);+ let file;+ const processFilePath =+ annotation.file_path && !openai.processedFileIds.has(annotation.file_path?.file_id);++ if (processFilePath) {+ const basename = imageExtRegex.test(annotation.text)+ ? path.basename(annotation.text)+ : null;+ file = await retrieveAndProcessFile({+ openai,+ file_id: annotation.file_path.file_id,+ basename,+ });+ openai.processedFileIds.add(annotation.file_path.file_id);+ }++ const processFileCitation =+ annotation.file_citation &&+ !openai.processedFileIds.has(annotation.file_citation?.file_id);++ if (processFileCitation) {+ file = await retrieveAndProcessFile({+ openai,+ file_id: annotation.file_citation.file_id,+ unknownType: true,+ });+ openai.processedFileIds.add(annotation.file_citation.file_id);+ }++ if (!file && (annotation.file_path || annotation.file_citation)) {+ const { file_id } = annotation.file_citation || annotation.file_path || {};+ file = await retrieveAndProcessFile({ openai, file_id, unknownType: true });+ openai.processedFileIds.add(file_id);+ }++ if (!file) {+ continue;+ }++ if (file.purpose && file.purpose === FilePurpose.Assistants) {+ text = text.replace(annotation.text, file.filename);+ } else if (file.filepath) {+ text = text.replace(annotation.text, file.filepath);+ }++ message.files.push(file);+ }}- return step;- });+ }++ return { messages: sorted, text };}module.exports = {- initThread,- createRun,- waitForRun,getResponse,- handleRun,- sleep,- mapMessagesToSteps,+ runAssistant,+ processMessages,+ createOnTextProgress,};diff --git a/api/server/services/Config/EndpointService.js b/api/server/services/Config/EndpointService.jsindex 998e7a83d0..eeab6a4c7d 100644--- a/api/server/services/Config/EndpointService.js+++ b/api/server/services/Config/EndpointService.js@@ -2,6 +2,7 @@ const { EModelEndpoint } = require('librechat-data-provider');const {OPENAI_API_KEY: openAIApiKey,+ ASSISTANTS_API_KEY: assistantsApiKey,AZURE_API_KEY: azureOpenAIApiKey,ANTHROPIC_API_KEY: anthropicApiKey,CHATGPT_TOKEN: chatGPTToken,@@ -28,7 +29,7 @@ module.exports = {userProvidedOpenAI,googleKey,[EModelEndpoint.openAI]: isUserProvided(openAIApiKey),- [EModelEndpoint.assistant]: isUserProvided(openAIApiKey),+ [EModelEndpoint.assistants]: isUserProvided(assistantsApiKey),[EModelEndpoint.azureOpenAI]: isUserProvided(azureOpenAIApiKey),[EModelEndpoint.chatGPTBrowser]: isUserProvided(chatGPTToken),[EModelEndpoint.anthropic]: isUserProvided(anthropicApiKey),diff --git a/api/server/services/Config/handleRateLimits.js b/api/server/services/Config/handleRateLimits.jsnew file mode 100644index 0000000000..d40ccfb4f3--- /dev/null+++ b/api/server/services/Config/handleRateLimits.js@@ -0,0 +1,22 @@+/**+ *+ * @param {TCustomConfig['rateLimits'] | undefined} rateLimits+ */+const handleRateLimits = (rateLimits) => {+ if (!rateLimits) {+ return;+ }+ const { fileUploads } = rateLimits;+ if (!fileUploads) {+ return;+ }++ process.env.FILE_UPLOAD_IP_MAX = fileUploads.ipMax ?? process.env.FILE_UPLOAD_IP_MAX;+ process.env.FILE_UPLOAD_IP_WINDOW =+ fileUploads.ipWindowInMinutes ?? process.env.FILE_UPLOAD_IP_WINDOW;+ process.env.FILE_UPLOAD_USER_MAX = fileUploads.userMax ?? process.env.FILE_UPLOAD_USER_MAX;+ process.env.FILE_UPLOAD_USER_WINDOW =+ fileUploads.userWindowInMinutes ?? process.env.FILE_UPLOAD_USER_WINDOW;+};++module.exports = handleRateLimits;diff --git a/api/server/services/Config/loadCustomConfig.js b/api/server/services/Config/loadCustomConfig.jsindex a90083b2fc..eecf8eff82 100644--- a/api/server/services/Config/loadCustomConfig.js+++ b/api/server/services/Config/loadCustomConfig.js@@ -7,17 +7,22 @@ const { logger } = require('~/config');const projectRoot = path.resolve(__dirname, '..', '..', '..', '..');const configPath = path.resolve(projectRoot, 'librechat.yaml');+let i = 0;+/*** Load custom configuration files and caches the object if the `cache` field at root is true.* Validation via parsing the config file with the config schema.* @function loadCustomConfig* @returns {Promise<TCustomConfig | null>} A promise that resolves to null or the custom config object.* */-async function loadCustomConfig() {const customConfig = loadYaml(configPath);if (!customConfig) {- logger.info('Custom config file missing or YAML format invalid.');+ i === 0 &&+ logger.info(+ 'Custom config file missing or YAML format invalid.\n\nCheck out the latest config file guide for configurable options and features.\nhttps://docs.librechat.ai/install/configuration/custom_config.html\n\n',+ );+ i === 0 && i++;return null;}@@ -28,6 +33,7 @@ async function loadCustomConfig() {} else {logger.info('Custom config file loaded:');logger.info(JSON.stringify(customConfig, null, 2));+ logger.debug('Custom config:', customConfig);}if (customConfig.cache) {diff --git a/api/server/services/Config/loadDefaultEConfig.js b/api/server/services/Config/loadDefaultEConfig.jsindex 34ab05d8ab..0f1c7dcbb0 100644--- a/api/server/services/Config/loadDefaultEConfig.js+++ b/api/server/services/Config/loadDefaultEConfig.js@@ -9,10 +9,11 @@ const { config } = require('./EndpointService');*/async function loadDefaultEndpointsConfig() {const { google, gptPlugins } = await loadAsyncEndpoints();- const { openAI, bingAI, anthropic, azureOpenAI, chatGPTBrowser } = config;+ const { openAI, assistants, bingAI, anthropic, azureOpenAI, chatGPTBrowser } = config;let enabledEndpoints = [EModelEndpoint.openAI,+ EModelEndpoint.assistants,EModelEndpoint.azureOpenAI,EModelEndpoint.google,EModelEndpoint.bingAI,@@ -31,6 +32,7 @@ async function loadDefaultEndpointsConfig() {const endpointConfig = {[EModelEndpoint.openAI]: openAI,+ [EModelEndpoint.assistants]: assistants,[EModelEndpoint.azureOpenAI]: azureOpenAI,[EModelEndpoint.google]: google,[EModelEndpoint.bingAI]: bingAI,diff --git a/api/server/services/Config/loadDefaultModels.js b/api/server/services/Config/loadDefaultModels.jsindex e22a9b2769..29be478221 100644--- a/api/server/services/Config/loadDefaultModels.js+++ b/api/server/services/Config/loadDefaultModels.js@@ -7,10 +7,6 @@ const {getChatGPTBrowserModels,} = require('~/server/services/ModelService');-const fitlerAssistantModels = (str) => {- return /gpt-4|gpt-3\\.5/i.test(str) && !/vision|instruct/i.test(str);-};-/*** Loads the default models for the application.* @async@@ -28,6 +24,7 @@ async function loadDefaultModels(req) {azure: useAzurePlugins,plugins: true,});+ const assistant = await getOpenAIModels({ assistants: true });return {[EModelEndpoint.openAI]: openAI,@@ -37,7 +34,7 @@ async function loadDefaultModels(req) {[EModelEndpoint.azureOpenAI]: azureOpenAI,[EModelEndpoint.bingAI]: ['BingAI', 'Sydney'],[EModelEndpoint.chatGPTBrowser]: chatGPTBrowser,- [EModelEndpoint.assistant]: openAI.filter(fitlerAssistantModels),+ [EModelEndpoint.assistants]: assistant,};}diff --git a/api/server/services/Endpoints/assistant/addTitle.js b/api/server/services/Endpoints/assistant/addTitle.jsnew file mode 100644index 0000000000..6911539158--- /dev/null+++ b/api/server/services/Endpoints/assistant/addTitle.js@@ -0,0 +1,28 @@+const { CacheKeys } = require('librechat-data-provider');+const { saveConvo } = require('~/models/Conversation');+const getLogStores = require('~/cache/getLogStores');+const { isEnabled } = require('~/server/utils');++const addTitle = async (req, { text, responseText, conversationId, client }) => {+ const { TITLE_CONVO = 'true' } = process.env ?? {};+ if (!isEnabled(TITLE_CONVO)) {+ return;+ }++ if (client.options.titleConvo === false) {+ return;+ }++ const titleCache = getLogStores(CacheKeys.GEN_TITLE);+ const key = `${req.user.id}-${conversationId}`;++ const title = await client.titleConvo({ text, conversationId, responseText });+ await titleCache.set(key, title);++ await saveConvo(req.user.id, {+ conversationId,+ title,+ });+};++module.exports = addTitle;diff --git a/api/server/services/Endpoints/assistant/buildOptions.js b/api/server/services/Endpoints/assistant/buildOptions.jsnew file mode 100644index 0000000000..4197d976be--- /dev/null+++ b/api/server/services/Endpoints/assistant/buildOptions.js@@ -0,0 +1,15 @@+const buildOptions = (endpoint, parsedBody) => {+ // eslint-disable-next-line no-unused-vars+ const { promptPrefix, chatGptLabel, resendImages, imageDetail, ...rest } = parsedBody;+ const endpointOption = {+ endpoint,+ promptPrefix,+ modelOptions: {+ ...rest,+ },+ };++ return endpointOption;+};++module.exports = buildOptions;diff --git a/api/server/services/Endpoints/assistant/index.js b/api/server/services/Endpoints/assistant/index.jsnew file mode 100644index 0000000000..772b1efb11--- /dev/null+++ b/api/server/services/Endpoints/assistant/index.js@@ -0,0 +1,9 @@+const addTitle = require('./addTitle');+const buildOptions = require('./buildOptions');+const initializeClient = require('./initializeClient');++module.exports = {+ addTitle,+ buildOptions,+ initializeClient,+};diff --git a/api/server/services/Endpoints/assistant/initializeClient.js b/api/server/services/Endpoints/assistant/initializeClient.jsnew file mode 100644index 0000000000..886a037ad1--- /dev/null+++ b/api/server/services/Endpoints/assistant/initializeClient.js@@ -0,0 +1,80 @@+const OpenAI = require('openai');+const { HttpsProxyAgent } = require('https-proxy-agent');+const { EModelEndpoint } = require('librechat-data-provider');+const {+ getUserKey,+ getUserKeyExpiry,+ checkUserKeyExpiry,+} = require('~/server/services/UserService');+const OpenAIClient = require('~/app/clients/OpenAIClient');++const initializeClient = async ({ req, res, endpointOption, initAppClient = false }) => {+ const { PROXY, OPENAI_ORGANIZATION, ASSISTANTS_API_KEY, ASSISTANTS_BASE_URL } = process.env;++ const opts = {};+ const baseURL = ASSISTANTS_BASE_URL ?? null;++ if (baseURL) {+ opts.baseURL = baseURL;+ }++ if (PROXY) {+ opts.httpAgent = new HttpsProxyAgent(PROXY);+ }++ if (OPENAI_ORGANIZATION) {+ opts.organization = OPENAI_ORGANIZATION;+ }++ const credentials = ASSISTANTS_API_KEY;++ const isUserProvided = credentials === 'user_provided';++ let userKey = null;+ if (isUserProvided) {+ const expiresAt = getUserKeyExpiry({ userId: req.user.id, name: EModelEndpoint.assistants });+ checkUserKeyExpiry(+ expiresAt,+ 'Your Assistants API key has expired. Please provide your API key again.',+ );+ userKey = await getUserKey({ userId: req.user.id, name: EModelEndpoint.assistants });+ }++ let apiKey = isUserProvided ? userKey : credentials;++ if (!apiKey) {+ throw new Error('API key not provided.');+ }++ /** @type {OpenAIClient} */+ const openai = new OpenAI({+ apiKey,+ ...opts,+ });+ openai.req = req;+ openai.res = res;++ if (endpointOption && initAppClient) {+ const clientOptions = {+ reverseProxyUrl: baseURL,+ proxy: PROXY ?? null,+ req,+ res,+ ...endpointOption,+ };++ const client = new OpenAIClient(apiKey, clientOptions);+ return {+ client,+ openai,+ openAIApiKey: apiKey,+ };+ }++ return {+ openai,+ openAIApiKey: apiKey,+ };+};++module.exports = initializeClient;diff --git a/api/server/services/Files/Firebase/crud.js b/api/server/services/Files/Firebase/crud.jsindex 68f534bcb6..0567d2afa6 100644--- a/api/server/services/Files/Firebase/crud.js+++ b/api/server/services/Files/Firebase/crud.js@@ -1,5 +1,6 @@const fetch = require('node-fetch');const { ref, uploadBytes, getDownloadURL, deleteObject } = require('firebase/storage');+const { getBufferMetadata } = require('~/server/utils');const { getFirebaseStorage } = require('./initialize');/**@@ -41,9 +42,8 @@ async function deleteFile(basePath, fileName) {* @param {string} [params.basePath='images'] - Optional. The base basePath in Firebase Storage where the file will* be stored. Defaults to 'images' if not specified.*- * @returns {Promise<string|null>}- * A promise that resolves to the file name if the file is successfully uploaded, or null if there- * is an error in initialization or upload.+ * @returns {Promise<{ bytes: number, type: string, dimensions: Record<string, number>} | null>}+ * A promise that resolves to the file metadata if the file is successfully saved, or null if there is an error.*/async function saveURLToFirebase({ userId, URL, fileName, basePath = 'images' }) {const storage = getFirebaseStorage();@@ -53,10 +53,12 @@ async function saveURLToFirebase({ userId, URL, fileName, basePath = 'images' })}const storageRef = ref(storage, `${basePath}/${userId.toString()}/${fileName}`);+ const response = await fetch(URL);+ const buffer = await response.buffer();try {- await uploadBytes(storageRef, await fetch(URL).then((response) => response.buffer()));- return fileName;+ await uploadBytes(storageRef, buffer);+ return await getBufferMetadata(buffer);} catch (error) {console.error('Error uploading file to Firebase Storage:', error.message);return null;diff --git a/api/server/services/Files/Firebase/images.js b/api/server/services/Files/Firebase/images.jsindex 95b600962f..7d45f22d74 100644--- a/api/server/services/Files/Firebase/images.js+++ b/api/server/services/Files/Firebase/images.js@@ -1,7 +1,8 @@const fs = require('fs');const path = require('path');const sharp = require('sharp');-const { resizeImage } = require('../images/resize');+const { resizeImageBuffer } = require('../images/resize');+const { updateUser } = require('~/models/userMethods');const { saveBufferToFirebase } = require('./crud');const { updateFile } = require('~/models/File');const { logger } = require('~/config');@@ -11,7 +12,7 @@ const { logger } = require('~/config');* resolution.**- * @param {Object} req - The request object from Express. It should have a `user` property with an `id`+ * @param {Express.Request} req - The request object from Express. It should have a `user` property with an `id`* representing the user, and an `app.locals.paths` object with an `imageOutput` path.* @param {Express.Multer.File} file - The file object, which is part of the request. The file object should* have a `path` property that points to the location of the uploaded file.@@ -26,7 +27,8 @@ const { logger } = require('~/config');*/async function uploadImageToFirebase(req, file, resolution = 'high') {const inputFilePath = file.path;- const { buffer: resizedBuffer, width, height } = await resizeImage(inputFilePath, resolution);+ const inputBuffer = await fs.promises.readFile(inputFilePath);+ const { buffer: resizedBuffer, width, height } = await resizeImageBuffer(inputBuffer, resolution);const extension = path.extname(inputFilePath);const userId = req.user.id;@@ -73,15 +75,15 @@ async function prepareImageURL(req, file) {** @param {object} params - The parameters object.* @param {Buffer} params.buffer - The Buffer containing the avatar image in WebP format.- * @param {object} params.User - The User document (mongoose); TODO: remove direct use of Model, `User`+ * @param {string} params.userId - The user ID.* @param {string} params.manual - A string flag indicating whether the update is manual ('true' or 'false').* @returns {Promise<string>} - A promise that resolves with the URL of the uploaded avatar.* @throws {Error} - Throws an error if Firebase is not initialized or if there is an error in uploading.*/-async function processFirebaseAvatar({ buffer, User, manual }) {+async function processFirebaseAvatar({ buffer, userId, manual }) {try {const downloadURL = await saveBufferToFirebase({- userId: User._id.toString(),+ userId,buffer,fileName: 'avatar.png',});@@ -91,8 +93,7 @@ async function processFirebaseAvatar({ buffer, User, manual }) {const url = `${downloadURL}?manual=${isManual}`;if (isManual) {- User.avatar = url;- await User.save();+ await updateUser(userId, { avatar: url });}return url;diff --git a/api/server/services/Files/Local/crud.js b/api/server/services/Files/Local/crud.jsindex cd8bdbc5d8..a60038e8e3 100644--- a/api/server/services/Files/Local/crud.js+++ b/api/server/services/Files/Local/crud.js@@ -1,8 +1,9 @@const fs = require('fs');const path = require('path');const axios = require('axios');-const { logger } = require('~/config');+const { getBufferMetadata } = require('~/server/utils');const paths = require('~/config/paths');+const { logger } = require('~/config');/*** Saves a file to a specified output path with a new filename.@@ -13,7 +14,7 @@ const paths = require('~/config/paths');* @returns {Promise<string>} The full path of the saved file.* @throws Will throw an error if the file saving process fails.*/-async function saveFile(file, outputPath, outputFilename) {+async function saveLocalFile(file, outputPath, outputFilename) {try {if (!fs.existsSync(outputPath)) {fs.mkdirSync(outputPath, { recursive: true });@@ -44,9 +45,41 @@ async function saveFile(file, outputPath, outputFilename) {const saveLocalImage = async (req, file, filename) => {const imagePath = req.app.locals.paths.imageOutput;const outputPath = path.join(imagePath, req.user.id ?? '');- await saveFile(file, outputPath, filename);+ await saveLocalFile(file, outputPath, filename);};+/**+ * Saves a buffer to a specified directory on the local file system.+ *+ * @param {Object} params - The parameters object.+ * @param {string} params.userId - The user's unique identifier. This is used to create a user-specific directory.+ * @param {Buffer} params.buffer - The buffer to be saved.+ * @param {string} params.fileName - The name of the file to be saved.+ * @param {string} [params.basePath='images'] - Optional. The base path where the file will be stored.+ * Defaults to 'images' if not specified.+ * @returns {Promise<string>} - A promise that resolves to the path of the saved file.+ */+async function saveLocalBuffer({ userId, buffer, fileName, basePath = 'images' }) {+ try {+ const { publicPath, uploads } = paths;++ const directoryPath = path.join(basePath === 'images' ? publicPath : uploads, basePath, userId);++ if (!fs.existsSync(directoryPath)) {+ fs.mkdirSync(directoryPath, { recursive: true });+ }++ fs.writeFileSync(path.join(directoryPath, fileName), buffer);++ const filePath = path.posix.join('/', basePath, userId, fileName);++ return filePath;+ } catch (error) {+ logger.error('[saveLocalBuffer] Error while saving the buffer:', error);+ throw error;+ }+}+/*** Saves a file from a given URL to a local directory. The function fetches the file using the provided URL,* determines the content type, and saves it to a specified local directory with the correct file extension.@@ -62,20 +95,18 @@ const saveLocalImage = async (req, file, filename) => {* @param {string} [params.basePath='images'] - Optional. The base directory where the file will be saved.* Defaults to 'images' if not specified.*- * @returns {Promise<string|null>}- * A promise that resolves to the file name if the file is successfully saved, or null if there is an error.+ * @returns {Promise<{ bytes: number, type: string, dimensions: Record<string, number>} | null>}+ * A promise that resolves to the file metadata if the file is successfully saved, or null if there is an error.*/async function saveFileFromURL({ userId, URL, fileName, basePath = 'images' }) {try {- // Fetch the file from the URLconst response = await axios({url: URL,- responseType: 'stream',+ responseType: 'arraybuffer',});- // Get the content type from the response headers- const contentType = response.headers['content-type'];- let extension = contentType.split('/').pop();+ const buffer = Buffer.from(response.data, 'binary');+ const { bytes, type, dimensions, extension } = await getBufferMetadata(buffer);// Construct the outputPath based on the basePath and userIdconst outputPath = path.join(paths.publicPath, basePath, userId.toString());@@ -92,17 +123,15 @@ async function saveFileFromURL({ userId, URL, fileName, basePath = 'images' }) {fileName += `.${extension}`;}- // Create a writable stream for the output path- const outputFilePath = path.join(outputPath, path.basename(fileName));- const writer = fs.createWriteStream(outputFilePath);-- // Pipe the response data to the output file- response.data.pipe(writer);+ // Save the file to the output path+ const outputFilePath = path.join(outputPath, fileName);+ fs.writeFileSync(outputFilePath, buffer);- return new Promise((resolve, reject) => {- writer.on('finish', () => resolve(fileName));- writer.on('error', reject);- });+ return {+ bytes,+ type,+ dimensions,+ };} catch (error) {logger.error('[saveFileFromURL] Error while saving the file:', error);return null;@@ -171,4 +200,11 @@ const deleteLocalFile = async (req, file) => {await fs.promises.unlink(filepath);};-module.exports = { saveFile, saveLocalImage, saveFileFromURL, getLocalFileURL, deleteLocalFile };+module.exports = {+ saveLocalFile,+ saveLocalImage,+ saveLocalBuffer,+ saveFileFromURL,+ getLocalFileURL,+ deleteLocalFile,+};diff --git a/api/server/services/Files/Local/images.js b/api/server/services/Files/Local/images.jsindex 63ed5b2f64..f30594e92a 100644--- a/api/server/services/Files/Local/images.js+++ b/api/server/services/Files/Local/images.js@@ -1,7 +1,8 @@const fs = require('fs');const path = require('path');const sharp = require('sharp');-const { resizeImage } = require('../images/resize');+const { resizeImageBuffer } = require('../images/resize');+const { updateUser } = require('~/models/userMethods');const { updateFile } = require('~/models/File');/**@@ -28,7 +29,8 @@ const { updateFile } = require('~/models/File');*/async function uploadLocalImage(req, file, resolution = 'high') {const inputFilePath = file.path;- const { buffer: resizedBuffer, width, height } = await resizeImage(inputFilePath, resolution);+ const inputBuffer = await fs.promises.readFile(inputFilePath);+ const { buffer: resizedBuffer, width, height } = await resizeImageBuffer(inputBuffer, resolution);const extension = path.extname(inputFilePath);const { imageOutput } = req.app.locals.paths;@@ -96,17 +98,17 @@ async function prepareImagesLocal(req, file) {}/**- * Uploads a user's avatar to Firebase Storage and returns the URL.+ * Uploads a user's avatar to local server storage and returns the URL.* If the 'manual' flag is set to 'true', it also updates the user's avatar URL in the database.** @param {object} params - The parameters object.* @param {Buffer} params.buffer - The Buffer containing the avatar image in WebP format.- * @param {object} params.User - The User document (mongoose); TODO: remove direct use of Model, `User`+ * @param {string} params.userId - The user ID.* @param {string} params.manual - A string flag indicating whether the update is manual ('true' or 'false').* @returns {Promise<string>} - A promise that resolves with the URL of the uploaded avatar.* @throws {Error} - Throws an error if Firebase is not initialized or if there is an error in uploading.*/-async function processLocalAvatar({ buffer, User, manual }) {+async function processLocalAvatar({ buffer, userId, manual }) {const userDir = path.resolve(__dirname,'..',@@ -117,10 +119,11 @@ async function processLocalAvatar({ buffer, User, manual }) {'client','public','images',- User._id.toString(),+ userId,);+const fileName = `avatar-${new Date().getTime()}.png`;- const urlRoute = `/images/${User._id.toString()}/${fileName}`;+ const urlRoute = `/images/${userId}/${fileName}`;const avatarPath = path.join(userDir, fileName);await fs.promises.mkdir(userDir, { recursive: true });@@ -130,8 +133,7 @@ async function processLocalAvatar({ buffer, User, manual }) {let url = `${urlRoute}?manual=${isManual}`;if (isManual) {- User.avatar = url;- await User.save();+ await updateUser(userId, { avatar: url });}return url;diff --git a/api/server/services/Files/OpenAI/crud.js b/api/server/services/Files/OpenAI/crud.jsnew file mode 100644index 0000000000..6cad1603ac--- /dev/null+++ b/api/server/services/Files/OpenAI/crud.js@@ -0,0 +1,49 @@+const fs = require('fs');++/**+ * Uploads a file that can be used across various OpenAI services.+ *+ * @param {Express.Request} req - The request object from Express. It should have a `user` property with an `id`+ * representing the user, and an `app.locals.paths` object with an `imageOutput` path.+ * @param {Express.Multer.File} file - The file uploaded to the server via multer.+ * @param {OpenAI} openai - The initialized OpenAI client.+ * @returns {Promise<OpenAIFile>}+ */+async function uploadOpenAIFile(req, file, openai) {+ try {+ const uploadedFile = await openai.files.create({+ file: fs.createReadStream(file.path),+ purpose: 'assistants',+ });++ console.log('File uploaded successfully to OpenAI');++ return uploadedFile;+ } catch (error) {+ console.error('Error uploading file to OpenAI:', error.message);+ throw error;+ }+}++/**+ * Deletes a file previously uploaded to OpenAI.+ *+ * @param {Express.Request} req - The request object from Express.+ * @param {MongoFile} file - The database representation of the uploaded file.+ * @param {OpenAI} openai - The initialized OpenAI client.+ * @returns {Promise<void>}+ */+async function deleteOpenAIFile(req, file, openai) {+ try {+ const res = await openai.files.del(file.file_id);+ if (!res.deleted) {+ throw new Error('OpenAI returned `false` for deleted status');+ }+ console.log('File deleted successfully from OpenAI');+ } catch (error) {+ console.error('Error deleting file from OpenAI:', error.message);+ throw error;+ }+}++module.exports = { uploadOpenAIFile, deleteOpenAIFile };diff --git a/api/server/services/Files/OpenAI/index.js b/api/server/services/Files/OpenAI/index.jsnew file mode 100644index 0000000000..a6223d1ee5--- /dev/null+++ b/api/server/services/Files/OpenAI/index.js@@ -0,0 +1,5 @@+const crud = require('./crud');++module.exports = {+ ...crud,+};diff --git a/api/server/services/Files/images/avatar.js b/api/server/services/Files/images/avatar.jsindex 490fc86171..8f4f65b8e2 100644--- a/api/server/services/Files/images/avatar.js+++ b/api/server/services/Files/images/avatar.js@@ -1,42 +1,29 @@const sharp = require('sharp');const fs = require('fs').promises;const fetch = require('node-fetch');-const User = require('~/models/User');-const { getStrategyFunctions } = require('~/server/services/Files/strategies');+const { resizeAndConvert } = require('./resize');const { logger } = require('~/config');-async function convertToWebP(inputBuffer) {- return sharp(inputBuffer).resize({ width: 150 }).toFormat('webp').toBuffer();-}-/*** Uploads an avatar image for a user. This function can handle various types of input (URL, Buffer, or File object),- * processes the image to a square format, converts it to WebP format, and then uses a specified file strategy for- * further processing. It performs validation on the user ID and the input type. The function can throw errors for- * invalid input types, fetching issues, or other processing errors.+ * processes the image to a square format, converts it to WebP format, and returns the resized buffer.** @param {Object} params - The parameters object.* @param {string} params.userId - The unique identifier of the user for whom the avatar is being uploaded.- * @param {FileSources} params.fileStrategy - The file handling strategy to use, determining how the avatar is processed.* @param {(string|Buffer|File)} params.input - The input representing the avatar image. Can be a URL (string),* a Buffer, or a File object.- * @param {string} params.manual - A string flag indicating whether the upload process is manual.** @returns {Promise<any>}- * A promise that resolves to the result of the `processAvatar` function, specific to the chosen file- * strategy. Throws an error if any step in the process fails.+ * A promise that resolves to a resized buffer.** @throws {Error} Throws an error if the user ID is undefined, the input type is invalid, the image fetching fails,* or any other error occurs during the processing.*/-async function uploadAvatar({ userId, fileStrategy, input, manual }) {+async function resizeAvatar({ userId, input }) {try {if (userId === undefined) {throw new Error('User ID is undefined');}- const _id = userId;- // TODO: remove direct use of Model, `User`- const oldUser = await User.findOne({ _id });let imageBuffer;if (typeof input === 'string') {@@ -66,13 +53,12 @@ async function uploadAvatar({ userId, fileStrategy, input, manual }) {}).toBuffer();- const webPBuffer = await convertToWebP(squaredBuffer);- const { processAvatar } = getStrategyFunctions(fileStrategy);- return await processAvatar({ buffer: webPBuffer, User: oldUser, manual });+ const { buffer } = await resizeAndConvert(squaredBuffer);+ return buffer;} catch (error) {logger.error('Error uploading the avatar:', error);throw error;}}-module.exports = uploadAvatar;+module.exports = { resizeAvatar };diff --git a/api/server/services/Files/images/convert.js b/api/server/services/Files/images/convert.jsnew file mode 100644index 0000000000..2c5a6ab301--- /dev/null+++ b/api/server/services/Files/images/convert.js@@ -0,0 +1,69 @@+const fs = require('fs');+const path = require('path');+const sharp = require('sharp');+const { resizeImageBuffer } = require('./resize');+const { getStrategyFunctions } = require('../strategies');++/**+ * Converts an image file or buffer to WebP format with specified resolution.+ *+ * @param {Express.Request} req - The request object, containing user and app configuration data.+ * @param {Buffer | Express.Multer.File} file - The file object, containing either a path or a buffer.+ * @param {'low' | 'high'} [resolution='high'] - The desired resolution for the output image.+ * @param {string} [basename=''] - The basename of the input file, if it is a buffer.+ * @returns {Promise<{filepath: string, bytes: number, width: number, height: number}>} An object containing the path, size, and dimensions of the converted image.+ * @throws Throws an error if there is an issue during the conversion process.+ */+async function convertToWebP(req, file, resolution = 'high', basename = '') {+ try {+ let inputBuffer;+ let outputBuffer;+ let extension = path.extname(file.path ?? basename).toLowerCase();++ // Check if the input is a buffer or a file path+ if (Buffer.isBuffer(file)) {+ inputBuffer = file;+ } else if (file && file.path) {+ const inputFilePath = file.path;+ inputBuffer = await fs.promises.readFile(inputFilePath);+ } else {+ throw new Error('Invalid input: file must be a buffer or contain a valid path.');+ }++ // Resize the image buffer+ const {+ buffer: resizedBuffer,+ width,+ height,+ } = await resizeImageBuffer(inputBuffer, resolution);++ // Check if the file is already in WebP format+ // If it isn't, convert it:+ if (extension === '.webp') {+ outputBuffer = resizedBuffer;+ } else {+ outputBuffer = await sharp(resizedBuffer).toFormat('webp').toBuffer();+ extension = '.webp';+ }++ // Generate a new filename for the output file+ const newFileName =+ path.basename(file.path ?? basename, path.extname(file.path ?? basename)) + extension;++ const { saveBuffer } = getStrategyFunctions(req.app.locals.fileStrategy);++ const savedFilePath = await saveBuffer({+ userId: req.user.id,+ buffer: outputBuffer,+ fileName: newFileName,+ });++ const bytes = Buffer.byteLength(outputBuffer);+ return { filepath: savedFilePath, bytes, width, height };+ } catch (err) {+ console.error(err);+ throw err;+ }+}++module.exports = { convertToWebP };diff --git a/api/server/services/Files/images/index.js b/api/server/services/Files/images/index.jsindex 1438887e6d..889b19f206 100644--- a/api/server/services/Files/images/index.js+++ b/api/server/services/Files/images/index.js@@ -1,13 +1,13 @@const avatar = require('./avatar');+const convert = require('./convert');const encode = require('./encode');const parse = require('./parse');const resize = require('./resize');-const validate = require('./validate');module.exports = {+ ...convert,...encode,...parse,...resize,- ...validate,avatar,};diff --git a/api/server/services/Files/images/resize.js b/api/server/services/Files/images/resize.jsindex dd6f24ceea..f27173c9d1 100644--- a/api/server/services/Files/images/resize.js+++ b/api/server/services/Files/images/resize.js@@ -1,6 +1,16 @@const sharp = require('sharp');-async function resizeImage(inputFilePath, resolution) {+/**+ * Resizes an image from a given buffer based on the specified resolution.+ *+ * @param {Buffer} inputBuffer - The buffer of the image to be resized.+ * @param {'low' | 'high'} resolution - The resolution to resize the image to.+ * 'low' for a maximum of 512x512 resolution,+ * 'high' for a maximum of 768x2000 resolution.+ * @returns {Promise<{buffer: Buffer, width: number, height: number}>} An object containing the resized image buffer and its dimensions.+ * @throws Will throw an error if the resolution parameter is invalid.+ */+async function resizeImageBuffer(inputBuffer, resolution) {const maxLowRes = 512;const maxShortSideHighRes = 768;const maxLongSideHighRes = 2000;@@ -12,7 +22,7 @@ async function resizeImage(inputFilePath, resolution) {resizeOptions.width = maxLowRes;resizeOptions.height = maxLowRes;} else if (resolution === 'high') {- const metadata = await sharp(inputFilePath).metadata();+ const metadata = await sharp(inputBuffer).metadata();const isWidthShorter = metadata.width < metadata.height;if (isWidthShorter) {@@ -43,10 +53,28 @@ async function resizeImage(inputFilePath, resolution) {throw new Error('Invalid resolution parameter');}- const resizedBuffer = await sharp(inputFilePath).rotate().resize(resizeOptions).toBuffer();+ const resizedBuffer = await sharp(inputBuffer).rotate().resize(resizeOptions).toBuffer();const resizedMetadata = await sharp(resizedBuffer).metadata();return { buffer: resizedBuffer, width: resizedMetadata.width, height: resizedMetadata.height };}-module.exports = { resizeImage };+/**+ * Resizes an image buffer to webp format as well as reduces 150 px width.+ *+ * @param {Buffer} inputBuffer - The buffer of the image to be resized.+ * @returns {Promise<{ buffer: Buffer, width: number, height: number, bytes: number }>} An object containing the resized image buffer, its size and dimensions.+ * @throws Will throw an error if the resolution parameter is invalid.+ */+async function resizeAndConvert(inputBuffer) {+ const resizedBuffer = await sharp(inputBuffer).resize({ width: 150 }).toFormat('webp').toBuffer();+ const resizedMetadata = await sharp(resizedBuffer).metadata();+ return {+ buffer: resizedBuffer,+ width: resizedMetadata.width,+ height: resizedMetadata.height,+ bytes: Buffer.byteLength(resizedBuffer),+ };+}++module.exports = { resizeImageBuffer, resizeAndConvert };diff --git a/api/server/services/Files/images/validate.js b/api/server/services/Files/images/validate.jsdeleted file mode 100644index 97ae73cf91..0000000000--- a/api/server/services/Files/images/validate.js+++ /dev/null@@ -1,13 +0,0 @@-const { visionModels } = require('librechat-data-provider');--function validateVisionModel(model) {- if (!model) {- return false;- }-- return visionModels.some((visionModel) => model.includes(visionModel));-}--module.exports = {- validateVisionModel,-};diff --git a/api/server/services/Files/process.js b/api/server/services/Files/process.jsindex 4ee9510b4f..5f0d83997a 100644--- a/api/server/services/Files/process.js+++ b/api/server/services/Files/process.js@@ -1,7 +1,25 @@-const { updateFileUsage, createFile } = require('~/models');+const path = require('path');+const { v4 } = require('uuid');+const mime = require('mime/lite');+const {+ isUUID,+ megabyte,+ FileContext,+ FileSources,+ imageExtRegex,+ EModelEndpoint,+ mergeFileConfig,+} = require('librechat-data-provider');+const { convertToWebP, resizeAndConvert } = require('~/server/services/Files/images');+const { initializeClient } = require('~/server/services/Endpoints/assistant');+const { createFile, updateFileUsage, deleteFiles } = require('~/models/File');+const { isEnabled, determineFileType } = require('~/server/utils');+const { LB_QueueAsyncCall } = require('~/server/utils/queue');const { getStrategyFunctions } = require('./strategies');const { logger } = require('~/config');+const { GPTS_DOWNLOAD_IMAGES = 'true' } = process.env;+const processFiles = async (files) => {const promises = [];for (let file of files) {@@ -13,6 +31,99 @@ const processFiles = async (files) => {return await Promise.all(promises);};+/**+ * Enqueues the delete operation to the leaky bucket queue if necessary, or adds it directly to promises.+ *+ * @param {Express.Request} req - The express request object.+ * @param {MongoFile} file - The file object to delete.+ * @param {Function} deleteFile - The delete file function.+ * @param {Promise[]} promises - The array of promises to await.+ * @param {OpenAI | undefined} [openai] - If an OpenAI file, the initialized OpenAI client.+ */+function enqueueDeleteOperation(req, file, deleteFile, promises, openai) {+ if (file.source === FileSources.openai) {+ // Enqueue to leaky bucket+ promises.push(+ new Promise((resolve, reject) => {+ LB_QueueAsyncCall(+ () => deleteFile(req, file, openai),+ [],+ (err, result) => {+ if (err) {+ logger.error('Error deleting file from OpenAI source', err);+ reject(err);+ } else {+ resolve(result);+ }+ },+ );+ }),+ );+ } else {+ // Add directly to promises+ promises.push(+ deleteFile(req, file).catch((err) => {+ logger.error('Error deleting file', err);+ return Promise.reject(err);+ }),+ );+ }+}++// TODO: refactor as currently only image files can be deleted this way+// as other filetypes will not reside in public path+/**+ * Deletes a list of files from the server filesystem and the database.+ *+ * @param {Object} params - The params object.+ * @param {MongoFile[]} params.files - The file objects to delete.+ * @param {Express.Request} params.req - The express request object.+ * @param {DeleteFilesBody} params.req.body - The request body.+ * @param {string} [params.req.body.assistant_id] - The assistant ID if file uploaded is associated to an assistant.+ *+ * @returns {Promise<void>}+ */+const processDeleteRequest = async ({ req, files }) => {+ const file_ids = files.map((file) => file.file_id);++ const deletionMethods = {};+ const promises = [];+ promises.push(deleteFiles(file_ids));++ /** @type {OpenAI | undefined} */+ let openai;+ if (req.body.assistant_id) {+ ({ openai } = await initializeClient({ req }));+ }++ for (const file of files) {+ const source = file.source ?? FileSources.local;++ if (source === FileSources.openai && !openai) {+ ({ openai } = await initializeClient({ req }));+ }++ if (req.body.assistant_id) {+ promises.push(openai.beta.assistants.files.del(req.body.assistant_id, file.file_id));+ }++ if (deletionMethods[source]) {+ enqueueDeleteOperation(req, file, deletionMethods[source], promises, openai);+ continue;+ }++ const { deleteFile } = getStrategyFunctions(source);+ if (!deleteFile) {+ throw new Error(`Delete function not implemented for ${source}`);+ }++ deletionMethods[source] = deleteFile;+ enqueueDeleteOperation(req, file, deleteFile, promises, openai);+ }++ await Promise.allSettled(promises);+};+/*** Processes a file URL using a specified file handling strategy. This function accepts a strategy name,* fetches the corresponding file processing functions (for saving and retrieving file URLs), and then@@ -21,25 +132,38 @@ const processFiles = async (files) => {* exception with an appropriate message.** @param {Object} params - The parameters object.- * @param {FileSources} params.fileStrategy - The file handling strategy to use. Must be a value from the- * `FileSources` enum, which defines different file handling- * strategies (like saving to Firebase, local storage, etc.).+ * @param {FileSources} params.fileStrategy - The file handling strategy to use.+ * Must be a value from the `FileSources` enum, which defines different file+ * handling strategies (like saving to Firebase, local storage, etc.).* @param {string} params.userId - The user's unique identifier. Used for creating user-specific paths or- * references in the file handling process.+ * references in the file handling process.* @param {string} params.URL - The URL of the file to be processed.- * @param {string} params.fileName - The name that will be used to save the file. This should include the- * file extension.+ * @param {string} params.fileName - The name that will be used to save the file (including extension)* @param {string} params.basePath - The base path or directory where the file will be saved or retrieved from.- *- * @returns {Promise<string>}- * A promise that resolves to the URL of the processed file. It throws an error if the file processing- * fails at any stage.+ * @param {FileContext} params.context - The context of the file (e.g., 'avatar', 'image_generation', etc.)+ * @returns {Promise<MongoFile>} A promise that resolves to the DB representation (MongoFile)+ * of the processed file. It throws an error if the file processing fails at any stage.*/-const processFileURL = async ({ fileStrategy, userId, URL, fileName, basePath }) => {+const processFileURL = async ({ fileStrategy, userId, URL, fileName, basePath, context }) => {const { saveURL, getFileURL } = getStrategyFunctions(fileStrategy);try {- await saveURL({ userId, URL, fileName, basePath });- return await getFileURL({ fileName: `${userId}/${fileName}`, basePath });+ const { bytes, type, dimensions } = await saveURL({ userId, URL, fileName, basePath });+ const filepath = await getFileURL({ fileName: `${userId}/${fileName}`, basePath });+ return await createFile(+ {+ user: userId,+ file_id: v4(),+ bytes,+ filepath,+ filename: fileName,+ source: fileStrategy,+ type,+ context,+ width: dimensions.width,+ height: dimensions.height,+ },+ true,+ );} catch (error) {logger.error(`Error while processing the image with ${fileStrategy}:`, error);throw new Error(`Failed to process the image with ${fileStrategy}. ${error.message}`);@@ -49,7 +173,6 @@ const processFileURL = async ({ fileStrategy, userId, URL, fileName, basePath })/*** Applies the current strategy for image uploads.* Saves file metadata to the database with an expiry TTL.- * Files must be deleted from the server filesystem manually.** @param {Object} params - The parameters object.* @param {Express.Request} params.req - The Express request object.@@ -58,7 +181,7 @@ const processFileURL = async ({ fileStrategy, userId, URL, fileName, basePath })* @param {ImageMetadata} params.metadata - Additional metadata for the file.* @returns {Promise<void>}*/-const processImageUpload = async ({ req, res, file, metadata }) => {+const processImageFile = async ({ req, res, file, metadata }) => {const source = req.app.locals.fileStrategy;const { handleImageUpload } = getStrategyFunctions(source);const { file_id, temp_file_id } = metadata;@@ -71,6 +194,7 @@ const processImageUpload = async ({ req, res, file, metadata }) => {bytes,filepath,filename: file.originalname,+ context: FileContext.message_attachment,source,type: 'image/webp',width,@@ -81,8 +205,271 @@ const processImageUpload = async ({ req, res, file, metadata }) => {res.status(200).json({ message: 'File uploaded and processed successfully', ...result });};+/**+ * Applies the current strategy for image uploads and+ * returns minimal file metadata, without saving to the database.+ *+ * @param {Object} params - The parameters object.+ * @param {Express.Request} params.req - The Express request object.+ * @param {FileContext} params.context - The context of the file (e.g., 'avatar', 'image_generation', etc.)+ * @returns {Promise<{ filepath: string, filename: string, source: string, type: 'image/webp'}>}+ */+const uploadImageBuffer = async ({ req, context }) => {+ const source = req.app.locals.fileStrategy;+ const { saveBuffer } = getStrategyFunctions(source);+ const { buffer, width, height, bytes } = await resizeAndConvert(req.file.buffer);+ const file_id = v4();+ const fileName = `img-${file_id}.webp`;++ const filepath = await saveBuffer({ userId: req.user.id, fileName, buffer });+ return await createFile(+ {+ user: req.user.id,+ file_id,+ bytes,+ filepath,+ filename: req.file.originalname,+ context,+ source,+ type: 'image/webp',+ width,+ height,+ },+ true,+ );+};++/**+ * Applies the current strategy for file uploads.+ * Saves file metadata to the database with an expiry TTL.+ * Files must be deleted from the server filesystem manually.+ *+ * @param {Object} params - The parameters object.+ * @param {Express.Request} params.req - The Express request object.+ * @param {Express.Response} params.res - The Express response object.+ * @param {Express.Multer.File} params.file - The uploaded file.+ * @param {FileMetadata} params.metadata - Additional metadata for the file.+ * @returns {Promise<void>}+ */+const processFileUpload = async ({ req, res, file, metadata }) => {+ const isAssistantUpload = metadata.endpoint === EModelEndpoint.assistants;+ const source = isAssistantUpload ? FileSources.openai : req.app.locals.fileStrategy;+ const { handleFileUpload } = getStrategyFunctions(source);+ const { file_id, temp_file_id } = metadata;++ /** @type {OpenAI | undefined} */+ let openai;+ if (source === FileSources.openai) {+ ({ openai } = await initializeClient({ req }));+ }++ const { id, bytes, filename, filepath } = await handleFileUpload(req, file, openai);++ if (isAssistantUpload && !metadata.message_file) {+ await openai.beta.assistants.files.create(metadata.assistant_id, {+ file_id: id,+ });+ }++ const result = await createFile(+ {+ user: req.user.id,+ file_id: id ?? file_id,+ temp_file_id,+ bytes,+ filepath: isAssistantUpload ? `https://api.openai.com/v1/files/${id}` : filepath,+ filename: filename ?? file.originalname,+ context: isAssistantUpload ? FileContext.assistants : FileContext.message_attachment,+ source,+ type: file.mimetype,+ },+ true,+ );+ res.status(200).json({ message: 'File uploaded and processed successfully', ...result });+};++/**+ * Retrieves and processes an OpenAI file based on its type.+ *+ * @param {Object} params - The params passed to the function.+ * @param {OpenAIClient} params.openai - The params passed to the function.+ * @param {string} params.file_id - The ID of the file to retrieve.+ * @param {string} params.basename - The basename of the file (if image); e.g., 'image.jpg'.+ * @param {boolean} [params.unknownType] - Whether the file type is unknown.+ * @returns {Promise<{file_id: string, filepath: string, source: string, bytes?: number, width?: number, height?: number} | null>}+ * - Returns null if `file_id` is not defined; else, the file metadata if successfully retrieved and processed.+ */+async function retrieveAndProcessFile({ openai, file_id, basename: _basename, unknownType }) {+ if (!file_id) {+ return null;+ }++ if (openai.attachedFileIds?.has(file_id)) {+ return {+ file_id,+ // filepath: TODO: local source filepath?,+ source: FileSources.openai,+ };+ }++ let basename = _basename;+ const downloadImages = isEnabled(GPTS_DOWNLOAD_IMAGES);++ /**+ * @param {string} file_id - The ID of the file to retrieve.+ * @param {boolean} [save] - Whether to save the file metadata to the database.+ */+ const retrieveFile = async (file_id, save = false) => {+ const _file = await openai.files.retrieve(file_id);+ const filepath = `/api/files/download/${file_id}`;+ const file = {+ ..._file,+ type: mime.getType(_file.filename),+ filepath,+ usage: 1,+ file_id,+ context: _file.purpose ?? FileContext.message_attachment,+ source: FileSources.openai,+ };++ if (save) {+ await createFile(file, true);+ } else {+ try {+ await updateFileUsage({ file_id });+ } catch (error) {+ logger.error('Error updating file usage', error);+ }+ }++ return file;+ };++ // If image downloads are not enabled or no basename provided, return only the file metadata+ if (!downloadImages || (!basename && !downloadImages)) {+ return await retrieveFile(file_id, true);+ }++ let data;+ try {+ const response = await openai.files.content(file_id);+ data = await response.arrayBuffer();+ } catch (error) {+ logger.error('Error downloading file from OpenAI:', error);+ return await retrieveFile(file_id);+ }++ if (!data) {+ return await retrieveFile(file_id);+ }+ const dataBuffer = Buffer.from(data);++ /**+ * @param {Buffer} dataBuffer+ * @param {string} fileExt+ */+ const processAsImage = async (dataBuffer, fileExt) => {+ // Logic to process image files, convert to webp, etc.+ const _file = await convertToWebP(openai.req, dataBuffer, 'high', `${file_id}${fileExt}`);+ const file = {+ ..._file,+ type: 'image/webp',+ usage: 1,+ file_id,+ source: FileSources.openai,+ };+ createFile(file, true);+ return file;+ };++ /** @param {Buffer} dataBuffer */+ const processOtherFileTypes = async (dataBuffer) => {+ // Logic to handle other file types+ logger.debug('[retrieveAndProcessFile] Non-image file type detected');+ return { filepath: `/api/files/download/${file_id}`, bytes: dataBuffer.length };+ };++ // If the filetype is unknown, inspect the file+ if (unknownType || !path.extname(basename)) {+ const detectedExt = await determineFileType(dataBuffer);+ if (detectedExt && imageExtRegex.test('.' + detectedExt)) {+ return await processAsImage(dataBuffer, detectedExt);+ } else {+ return await processOtherFileTypes(dataBuffer);+ }+ }++ // Existing logic for processing known image types+ if (downloadImages && basename && path.extname(basename) && imageExtRegex.test(basename)) {+ return await processAsImage(dataBuffer, path.extname(basename));+ } else {+ logger.debug('[retrieveAndProcessFile] Not an image or invalid extension: ', basename);+ return await processOtherFileTypes(dataBuffer);+ }+}++/**+ * Filters a file based on its size and the endpoint origin.+ *+ * @param {Object} params - The parameters for the function.+ * @param {Express.Request} params.req - The request object from Express.+ * @param {Express.Multer.File} params.file - The file uploaded to the server via multer.+ * @param {boolean} [params.image] - Whether the file expected is an image.+ * @returns {void}+ *+ * @throws {Error} If a file exception is caught (invalid file size or type, lack of metadata).+ */+function filterFile({ req, file, image }) {+ const { endpoint, file_id, width, height } = req.body;++ if (!file_id) {+ throw new Error('No file_id provided');+ }++ /* parse to validate api call, throws error on fail */+ isUUID.parse(file_id);++ if (!endpoint) {+ throw new Error('No endpoint provided');+ }++ const fileConfig = mergeFileConfig(req.app.locals.fileConfig);++ const { fileSizeLimit, supportedMimeTypes } =+ fileConfig.endpoints[endpoint] ?? fileConfig.endpoints.default;++ if (file.size > fileSizeLimit) {+ throw new Error(+ `File size limit of ${fileSizeLimit / megabyte} MB exceeded for ${endpoint} endpoint`,+ );+ }++ const isSupportedMimeType = fileConfig.checkType(file.mimetype, supportedMimeTypes);++ if (!isSupportedMimeType) {+ throw new Error('Unsupported file type');+ }++ if (!image) {+ return;+ }++ if (!width) {+ throw new Error('No width provided');+ }++ if (!height) {+ throw new Error('No height provided');+ }+}+module.exports = {- processImageUpload,+ filterFile,processFiles,processFileURL,+ processImageFile,+ uploadImageBuffer,+ processFileUpload,+ processDeleteRequest,+ retrieveAndProcessFile,};diff --git a/api/server/services/Files/strategies.js b/api/server/services/Files/strategies.jsindex 4e20186043..e69251a2c3 100644--- a/api/server/services/Files/strategies.js+++ b/api/server/services/Files/strategies.js@@ -4,46 +4,82 @@ const {prepareImageURL,saveURLToFirebase,deleteFirebaseFile,+ saveBufferToFirebase,uploadImageToFirebase,processFirebaseAvatar,} = require('./Firebase');const {+ // saveLocalFile,getLocalFileURL,saveFileFromURL,+ saveLocalBuffer,deleteLocalFile,uploadLocalImage,prepareImagesLocal,processLocalAvatar,} = require('./Local');+const { uploadOpenAIFile, deleteOpenAIFile } = require('./OpenAI');-// Firebase Strategy Functions+/**+ * Firebase Storage Strategy Functions+ *+ * */const firebaseStrategy = () => ({// saveFile:saveURL: saveURLToFirebase,getFileURL: getFirebaseURL,deleteFile: deleteFirebaseFile,+ saveBuffer: saveBufferToFirebase,prepareImagePayload: prepareImageURL,processAvatar: processFirebaseAvatar,handleImageUpload: uploadImageToFirebase,});-// Local Strategy Functions+/**+ * Local Server Storage Strategy Functions+ *+ * */const localStrategy = () => ({- // saveFile: ,+ // saveFile: saveLocalFile,saveURL: saveFileFromURL,getFileURL: getLocalFileURL,+ saveBuffer: saveLocalBuffer,deleteFile: deleteLocalFile,processAvatar: processLocalAvatar,handleImageUpload: uploadLocalImage,prepareImagePayload: prepareImagesLocal,});+/**+ * OpenAI Strategy Functions+ *+ * Note: null values mean that the strategy is not supported.+ * */+const openAIStrategy = () => ({+ /** @type {typeof saveFileFromURL | null} */+ saveURL: null,+ /** @type {typeof getLocalFileURL | null} */+ getFileURL: null,+ /** @type {typeof saveLocalBuffer | null} */+ saveBuffer: null,+ /** @type {typeof processLocalAvatar | null} */+ processAvatar: null,+ /** @type {typeof uploadLocalImage | null} */+ handleImageUpload: null,+ /** @type {typeof prepareImagesLocal | null} */+ prepareImagePayload: null,+ deleteFile: deleteOpenAIFile,+ handleFileUpload: uploadOpenAIFile,+});+// Strategy Selectorconst getStrategyFunctions = (fileSource) => {if (fileSource === FileSources.firebase) {return firebaseStrategy();} else if (fileSource === FileSources.local) {return localStrategy();+ } else if (fileSource === FileSources.openai) {+ return openAIStrategy();} else {throw new Error('Invalid file source');}diff --git a/api/server/services/ModelService.js b/api/server/services/ModelService.jsindex 45ae11aa1a..107411e4cb 100644--- a/api/server/services/ModelService.js+++ b/api/server/services/ModelService.js@@ -69,8 +69,33 @@ const fetchModels = async ({await cache.set(name, endpointTokenConfig);}models = input.data.map((item) => item.id);- } catch (err) {- logger.error(`Failed to fetch models from ${azure ? 'Azure ' : ''}${name} API`, err);+ } catch (error) {+ const logMessage = `Failed to fetch models from ${azure ? 'Azure ' : ''}${name} API`;+ if (error.response) {+ logger.error(+ `${logMessage} The request was made and the server responded with a status code that falls out of the range of 2xx: ${+ error.message ? error.message : ''+ }`,+ {+ headers: error.response.headers,+ status: error.response.status,+ data: error.response.data,+ },+ );+ } else if (error.request) {+ logger.error(+ `${logMessage} The request was made but no response was received: ${+ error.message ? error.message : ''+ }`,+ {+ request: error.request,+ },+ );+ } else {+ logger.error(`${logMessage} Something happened in setting up the request`, {+ message: error.message ? error.message : '',+ });+ }}return models;@@ -131,6 +156,9 @@ const fetchOpenAIModels = async (opts, _models = []) => {if (baseURL === openaiBaseURL) {const regex = /(text-davinci-003|gpt-)/;models = models.filter((model) => regex.test(model));+ const instructModels = models.filter((model) => model.includes('instruct'));+ const otherModels = models.filter((model) => !model.includes('instruct'));+ models = otherModels.concat(instructModels);}await modelsCache.set(baseURL, models);@@ -147,7 +175,11 @@ const fetchOpenAIModels = async (opts, _models = []) => {* @param {boolean} [opts.plugins=false] - Whether to fetch models from the plugins.*/const getOpenAIModels = async (opts) => {- let models = defaultModels.openAI;+ let models = defaultModels[EModelEndpoint.openAI];++ if (opts.assistants) {+ models = defaultModels[EModelEndpoint.assistants];+ }if (opts.plugins) {models = models.filter(@@ -161,7 +193,9 @@ const getOpenAIModels = async (opts) => {}let key;- if (opts.azure) {+ if (opts.assistants) {+ key = 'ASSISTANTS_MODELS';+ } else if (opts.azure) {key = 'AZURE_OPENAI_MODELS';} else if (opts.plugins) {key = 'PLUGIN_MODELS';@@ -178,6 +212,10 @@ const getOpenAIModels = async (opts) => {return models;}+ if (opts.assistants) {+ return models;+ }+return await fetchOpenAIModels(opts, models);};diff --git a/api/server/services/ModelService.spec.js b/api/server/services/ModelService.spec.jsindex 19fa407ce8..7c1d326fa1 100644--- a/api/server/services/ModelService.spec.js+++ b/api/server/services/ModelService.spec.js@@ -210,3 +210,49 @@ describe('getOpenAIModels with mocked config', () => {expect(models).toContain('some-default-model');});});++describe('getOpenAIModels sorting behavior', () => {+ beforeEach(() => {+ axios.get.mockResolvedValue({+ data: {+ data: [+ { id: 'gpt-3.5-turbo-instruct-0914' },+ { id: 'gpt-3.5-turbo-instruct' },+ { id: 'gpt-3.5-turbo' },+ { id: 'gpt-4-0314' },+ { id: 'gpt-4-turbo-preview' },+ ],+ },+ });+ });++ it('ensures instruct models are listed last', async () => {+ const models = await getOpenAIModels({ user: 'user456' });++ // Check if the last model is an "instruct" model+ expect(models[models.length - 1]).toMatch(/instruct/);++ // Check if the "instruct" models are placed at the end+ const instructIndexes = models+ .map((model, index) => (model.includes('instruct') ? index : -1))+ .filter((index) => index !== -1);+ const nonInstructIndexes = models+ .map((model, index) => (!model.includes('instruct') ? index : -1))+ .filter((index) => index !== -1);++ expect(Math.max(...nonInstructIndexes)).toBeLessThan(Math.min(...instructIndexes));++ const expectedOrder = [+ 'gpt-3.5-turbo',+ 'gpt-4-0314',+ 'gpt-4-turbo-preview',+ 'gpt-3.5-turbo-instruct-0914',+ 'gpt-3.5-turbo-instruct',+ ];+ expect(models).toEqual(expectedOrder);+ });++ afterEach(() => {+ jest.clearAllMocks();+ });+});diff --git a/api/server/services/PluginService.js b/api/server/services/PluginService.jsindex 6158238291..efe0bb03fd 100644--- a/api/server/services/PluginService.js+++ b/api/server/services/PluginService.js@@ -90,8 +90,7 @@ const updateUserPluginAuth = async (userId, authField, pluginKey, value) => {const deleteUserPluginAuth = async (userId, authField) => {try {- const response = await PluginAuth.deleteOne({ userId, authField });- return response;+ return await PluginAuth.deleteOne({ userId, authField });} catch (err) {logger.error('[deleteUserPluginAuth]', err);return err;diff --git a/api/server/services/Runs/RunMananger.js b/api/server/services/Runs/RunManager.jssimilarity index 88%rename from api/server/services/Runs/RunMananger.jsrename to api/server/services/Runs/RunManager.jsindex 67a3624c18..b7f7400c3d 100644--- a/api/server/services/Runs/RunMananger.js+++ b/api/server/services/Runs/RunManager.js@@ -44,15 +44,23 @@ class RunManager {*/async fetchRunSteps({ openai, thread_id, run_id, runStatus, final = false }) {// const { data: steps, first_id, last_id, has_more } = await openai.beta.threads.runs.steps.list(thread_id, run_id);- const { data: _steps } = await openai.beta.threads.runs.steps.list(thread_id, run_id);+ const { data: _steps } = await openai.beta.threads.runs.steps.list(+ thread_id,+ run_id,+ {},+ {+ timeout: 3000,+ maxRetries: 5,+ },+ );const steps = _steps.sort((a, b) => a.created_at - b.created_at);for (const [i, step] of steps.entries()) {- if (this.seenSteps.has(step.id)) {+ if (!final && this.seenSteps.has(`${step.id}-${step.status}`)) {continue;}const isLast = i === steps.length - 1;- this.seenSteps.add(step.id);+ this.seenSteps.add(`${step.id}-${step.status}`);this.stepsByStatus[runStatus] = this.stepsByStatus[runStatus] || [];const currentStepPromise = (async () => {@@ -64,6 +72,13 @@ class RunManager {return await currentStepPromise;}+ if (step.type === 'tool_calls') {+ await currentStepPromise;+ }+ if (step.type === 'message_creation' && step.status === 'completed') {+ await currentStepPromise;+ }+this.lastStepPromiseByStatus[runStatus] = currentStepPromise;this.stepsByStatus[runStatus].push(currentStepPromise);}@@ -79,7 +94,7 @@ class RunManager {*/async handleStep({ step, runStatus, final, isLast }) {if (this.handlers[runStatus]) {- return this.handlers[runStatus]({ step, final, isLast });+ return await this.handlers[runStatus]({ step, final, isLast });}if (final && isLast && this.handlers['final']) {diff --git a/api/server/services/Runs/handle.js b/api/server/services/Runs/handle.jsnew file mode 100644index 0000000000..231891d718--- /dev/null+++ b/api/server/services/Runs/handle.js@@ -0,0 +1,270 @@+const { RunStatus, defaultOrderQuery, CacheKeys } = require('librechat-data-provider');+const getLogStores = require('~/cache/getLogStores');+const { retrieveRun } = require('./methods');+const RunManager = require('./RunManager');+const { logger } = require('~/config');++async function withTimeout(promise, timeoutMs, timeoutMessage) {+ let timeoutHandle;++ const timeoutPromise = new Promise((_, reject) => {+ timeoutHandle = setTimeout(() => {+ logger.debug(timeoutMessage);+ reject(new Error('Operation timed out'));+ }, timeoutMs);+ });++ try {+ return await Promise.race([promise, timeoutPromise]);+ } finally {+ clearTimeout(timeoutHandle);+ }+}++/**+ * Creates a run on a thread using the OpenAI API.+ *+ * @param {Object} params - The parameters for creating a run.+ * @param {OpenAIClient} params.openai - The OpenAI client instance.+ * @param {string} params.thread_id - The ID of the thread to run.+ * @param {Object} params.body - The body of the request to create a run.+ * @param {string} params.body.assistant_id - The ID of the assistant to use for this run.+ * @param {string} [params.body.model] - Optional. The ID of the model to be used for this run.+ * @param {string} [params.body.instructions] - Optional. Override the default system message of the assistant.+ * @param {string} [params.body.additional_instructions] - Optional. Appends additional instructions+ * at theend of the instructions for the run. This is useful for modifying+ * the behavior on a per-run basis without overriding other instructions.+ * @param {Object[]} [params.body.tools] - Optional. Override the tools the assistant can use for this run.+ * @param {string[]} [params.body.file_ids] - Optional.+ * List of File IDs the assistant can use for this run.+ *+ * **Note:** The API seems to prefer files added to messages, not runs.+ * @param {Object} [params.body.metadata] - Optional. Metadata for the run.+ * @return {Promise<Run>} A promise that resolves to the created run object.+ */+async function createRun({ openai, thread_id, body }) {+ return await openai.beta.threads.runs.create(thread_id, body);+}++/**+ * Delays the execution for a specified number of milliseconds.+ *+ * @param {number} ms - The number of milliseconds to delay.+ * @return {Promise<void>} A promise that resolves after the specified delay.+ */+function sleep(ms) {+ return new Promise((resolve) => setTimeout(resolve, ms));+}++/**+ * Waits for a run to complete by repeatedly checking its status. It uses a RunManager instance to fetch and manage run steps based on the run status.+ *+ * @param {Object} params - The parameters for the waitForRun function.+ * @param {OpenAIClient} params.openai - The OpenAI client instance.+ * @param {string} params.run_id - The ID of the run to wait for.+ * @param {string} params.thread_id - The ID of the thread associated with the run.+ * @param {RunManager} params.runManager - The RunManager instance to manage run steps.+ * @param {number} [params.pollIntervalMs=750] - The interval for polling the run status; default is 750 milliseconds.+ * @param {number} [params.timeout=180000] - The period to wait until timing out polling; default is 3 minutes (in ms).+ * @return {Promise<Run>} A promise that resolves to the last fetched run object.+ */+async function waitForRun({+ openai,+ run_id,+ thread_id,+ runManager,+ pollIntervalMs = 750,+ timeout = 60000 * 3,+}) {+ let timeElapsed = 0;+ let run;++ const cache = getLogStores(CacheKeys.ABORT_KEYS);+ const cacheKey = `${openai.req.user.id}:${openai.responseMessage.conversationId}`;++ let i = 0;+ let lastSeenStatus = null;+ const runIdLog = `run_id: ${run_id}`;+ const runInfo = `user: ${openai.req.user.id} | thread_id: ${thread_id} | ${runIdLog}`;+ const raceTimeoutMs = 3000;+ let maxRetries = 5;+ let attempt = 0;+ while (timeElapsed < timeout) {+ i++;+ logger.debug(`[heartbeat ${i}] ${runIdLog} | Retrieving run status...`);+ let updatedRun;++ const startTime = Date.now();+ while (!updatedRun && attempt < maxRetries) {+ try {+ updatedRun = await withTimeout(+ retrieveRun({ thread_id, run_id, timeout: raceTimeoutMs, openai }),+ raceTimeoutMs,+ `[heartbeat ${i}] ${runIdLog} | Run retrieval timed out at ${timeElapsed} ms. Trying again (attempt ${+ attempt + 1+ } of ${maxRetries})...`,+ );+ attempt++;+ } catch (error) {+ logger.warn(`${runIdLog} | Error retrieving run status: ${error}`);+ }+ }+ const endTime = Date.now();+ logger.debug(+ `[heartbeat ${i}] ${runIdLog} | Elapsed run retrieval time: ${endTime - startTime}`,+ );+ if (!updatedRun) {+ const errorMessage = `[waitForRun] ${runIdLog} | Run retrieval failed after ${maxRetries} attempts`;+ throw new Error(errorMessage);+ }+ run = updatedRun;+ attempt = 0;+ const runStatus = `${runInfo} | status: ${run.status}`;++ if (run.status !== lastSeenStatus) {+ logger.debug(`[${run.status}] ${runInfo}`);+ lastSeenStatus = run.status;+ }++ logger.debug(`[heartbeat ${i}] ${runStatus}`);++ let cancelStatus;+ try {+ const timeoutMessage = `[heartbeat ${i}] ${runIdLog} | Cancel Status check operation timed out.`;+ cancelStatus = await withTimeout(cache.get(cacheKey), raceTimeoutMs, timeoutMessage);+ } catch (error) {+ logger.warn(`Error retrieving cancel status: ${error}`);+ }++ if (cancelStatus === 'cancelled') {+ logger.warn(`[waitForRun] ${runStatus} | RUN CANCELLED`);+ throw new Error('Run cancelled');+ }++ if (![RunStatus.IN_PROGRESS, RunStatus.QUEUED].includes(run.status)) {+ logger.debug(`[FINAL] ${runInfo} | status: ${run.status}`);+ await runManager.fetchRunSteps({+ openai,+ thread_id: thread_id,+ run_id: run_id,+ runStatus: run.status,+ final: true,+ });+ break;+ }++ // may use in future; for now, just fetch from the final status+ await runManager.fetchRunSteps({+ openai,+ thread_id: thread_id,+ run_id: run_id,+ runStatus: run.status,+ });++ await sleep(pollIntervalMs);+ timeElapsed += pollIntervalMs;+ }++ if (timeElapsed >= timeout) {+ const timeoutMessage = `[waitForRun] ${runInfo} | status: ${run.status} | timed out after ${timeout} ms`;+ logger.warn(timeoutMessage);+ throw new Error(timeoutMessage);+ }++ return run;+}++/**+ * Retrieves all steps of a run.+ *+ * @deprecated: Steps are handled with runAssistant now.+ * @param {Object} params - The parameters for the retrieveRunSteps function.+ * @param {OpenAIClient} params.openai - The OpenAI client instance.+ * @param {string} params.thread_id - The ID of the thread associated with the run.+ * @param {string} params.run_id - The ID of the run to retrieve steps for.+ * @return {Promise<RunStep[]>} A promise that resolves to an array of RunStep objects.+ */+async function _retrieveRunSteps({ openai, thread_id, run_id }) {+ const runSteps = await openai.beta.threads.runs.steps.list(thread_id, run_id);+ return runSteps;+}++/**+ * Initializes a RunManager with handlers, then invokes waitForRun to monitor and manage an OpenAI run.+ *+ * @deprecated Use runAssistant instead.+ * @param {Object} params - The parameters for managing and monitoring the run.+ * @param {OpenAIClient} params.openai - The OpenAI client instance.+ * @param {string} params.run_id - The ID of the run to manage and monitor.+ * @param {string} params.thread_id - The ID of the thread associated with the run.+ * @return {Promise<Object>} A promise that resolves to an object containing the run and managed steps.+ */+async function _handleRun({ openai, run_id, thread_id }) {+ let steps = [];+ let messages = [];+ const runManager = new RunManager({+ // 'in_progress': async ({ step, final, isLast }) => {+ // // Define logic for handling steps with 'in_progress' status+ // },+ // 'queued': async ({ step, final, isLast }) => {+ // // Define logic for handling steps with 'queued' status+ // },+ final: async ({ step, runStatus, stepsByStatus }) => {+ console.log(`Final step for ${run_id} with status ${runStatus}`);+ console.dir(step, { depth: null });++ const promises = [];+ promises.push(openai.beta.threads.messages.list(thread_id, defaultOrderQuery));++ // const finalSteps = stepsByStatus[runStatus];+ // for (const stepPromise of finalSteps) {+ // promises.push(stepPromise);+ // }++ // loop across all statuses+ for (const [_status, stepsPromises] of Object.entries(stepsByStatus)) {+ promises.push(...stepsPromises);+ }++ const resolved = await Promise.all(promises);+ const res = resolved.shift();+ messages = res.data.filter((msg) => msg.run_id === run_id);+ resolved.push(step);+ steps = resolved;+ },+ });++ const run = await waitForRun({+ openai,+ run_id,+ thread_id,+ runManager,+ pollIntervalMs: 750,+ timeout: 60000,+ });+ const actions = [];+ if (run.required_action) {+ const { submit_tool_outputs } = run.required_action;+ submit_tool_outputs.tool_calls.forEach((item) => {+ const functionCall = item.function;+ const args = JSON.parse(functionCall.arguments);+ actions.push({+ tool: functionCall.name,+ toolInput: args,+ toolCallId: item.id,+ run_id,+ thread_id,+ });+ });+ }++ return { run, steps, messages, actions };+}++module.exports = {+ sleep,+ createRun,+ waitForRun,+ // _handleRun,+ // retrieveRunSteps,+};diff --git a/api/server/services/Runs/index.js b/api/server/services/Runs/index.jsnew file mode 100644index 0000000000..2cb06d4677--- /dev/null+++ b/api/server/services/Runs/index.js@@ -0,0 +1,9 @@+const handle = require('./handle');+const methods = require('./methods');+const RunManager = require('./RunManager');++module.exports = {+ ...handle,+ ...methods,+ RunManager,+};diff --git a/api/server/services/Runs/methods.js b/api/server/services/Runs/methods.jsnew file mode 100644index 0000000000..ee74a9bd1f--- /dev/null+++ b/api/server/services/Runs/methods.js@@ -0,0 +1,76 @@+const axios = require('axios');+const { logger } = require('~/config');++/**+ * @typedef {Object} RetrieveOptions+ * @property {string} thread_id - The ID of the thread to retrieve.+ * @property {string} run_id - The ID of the run to retrieve.+ * @property {number} [timeout] - Optional timeout for the API call.+ * @property {number} [maxRetries] - TODO: not yet implemented; Optional maximum number of retries for the API call.+ * @property {OpenAIClient} openai - Configuration and credentials for OpenAI API access.+ */++/**+ * Asynchronously retrieves data from an API endpoint based on provided thread and run IDs.+ *+ * @param {RetrieveOptions} options - The options for the retrieve operation.+ * @returns {Promise<Object>} The data retrieved from the API.+ */+async function retrieveRun({ thread_id, run_id, timeout, openai }) {+ const { apiKey, baseURL, httpAgent, organization } = openai;+ const url = `${baseURL}/threads/${thread_id}/runs/${run_id}`;++ const headers = {+ Authorization: `Bearer ${apiKey}`,+ 'OpenAI-Beta': 'assistants=v1',+ };++ if (organization) {+ headers['OpenAI-Organization'] = organization;+ }++ try {+ const axiosConfig = {+ headers: headers,+ timeout: timeout,+ };++ if (httpAgent) {+ axiosConfig.httpAgent = httpAgent;+ axiosConfig.httpsAgent = httpAgent;+ }++ const response = await axios.get(url, axiosConfig);+ return response.data;+ } catch (error) {+ const logMessage = '[retrieveRun] Failed to retrieve run data:';+ if (error.response) {+ logger.error(+ `${logMessage} The request was made and the server responded with a status code that falls out of the range of 2xx: ${+ error.message ? error.message : ''+ }`,+ {+ headers: error.response.headers,+ status: error.response.status,+ data: error.response.data,+ },+ );+ } else if (error.request) {+ logger.error(+ `${logMessage} The request was made but no response was received: ${+ error.message ? error.message : ''+ }`,+ {+ request: error.request,+ },+ );+ } else {+ logger.error(`${logMessage} Something happened in setting up the request`, {+ message: error.message ? error.message : '',+ });+ }+ throw error;+ }+}++module.exports = { retrieveRun };diff --git a/api/server/services/Threads/index.js b/api/server/services/Threads/index.jsnew file mode 100644index 0000000000..850cddc4e1--- /dev/null+++ b/api/server/services/Threads/index.js@@ -0,0 +1,5 @@+const manage = require('./manage');++module.exports = {+ ...manage,+};diff --git a/api/server/services/Threads/manage.js b/api/server/services/Threads/manage.jsnew file mode 100644index 0000000000..125277860c--- /dev/null+++ b/api/server/services/Threads/manage.js@@ -0,0 +1,495 @@+const { v4 } = require('uuid');+const {+ EModelEndpoint,+ Constants,+ defaultOrderQuery,+ ContentTypes,+} = require('librechat-data-provider');+const { recordMessage, getMessages } = require('~/models/Message');+const { saveConvo } = require('~/models/Conversation');+const spendTokens = require('~/models/spendTokens');+const { countTokens } = require('~/server/utils');++/**+ * Initializes a new thread or adds messages to an existing thread.+ *+ * @param {Object} params - The parameters for initializing a thread.+ * @param {OpenAIClient} params.openai - The OpenAI client instance.+ * @param {Object} params.body - The body of the request.+ * @param {ThreadMessage[]} params.body.messages - A list of messages to start the thread with.+ * @param {Object} [params.body.metadata] - Optional metadata for the thread.+ * @param {string} [params.thread_id] - Optional existing thread ID. If provided, a message will be added to this thread.+ * @return {Promise<Thread>} A promise that resolves to the newly created thread object or the updated thread object.+ */+async function initThread({ openai, body, thread_id: _thread_id }) {+ let thread = {};+ const messages = [];+ if (_thread_id) {+ const message = await openai.beta.threads.messages.create(_thread_id, body.messages[0]);+ messages.push(message);+ } else {+ thread = await openai.beta.threads.create(body);+ }++ const thread_id = _thread_id ?? thread.id;+ return { messages, thread_id, ...thread };+}++/**+ * Saves a user message to the DB in the Assistants endpoint format.+ *+ * @param {Object} params - The parameters of the user message+ * @param {string} params.user - The user's ID.+ * @param {string} params.text - The user's prompt.+ * @param {string} params.messageId - The user message Id.+ * @param {string} params.model - The model used by the assistant.+ * @param {string} params.assistant_id - The current assistant Id.+ * @param {string} params.thread_id - The thread Id.+ * @param {string} params.conversationId - The message's conversationId+ * @param {string} [params.parentMessageId] - Optional if initial message.+ * Defaults to Constants.NO_PARENT.+ * @param {string} [params.instructions] - Optional: from preset for `instructions` field.+ * Overrides the instructions of the assistant.+ * @param {string} [params.promptPrefix] - Optional: from preset for `additional_instructions` field.+ * @param {import('librechat-data-provider').TFile[]} [params.files] - Optional. List of Attached File Objects.+ * @param {string[]} [params.file_ids] - Optional. List of File IDs attached to the userMessage.+ * @return {Promise<Run>} A promise that resolves to the created run object.+ */+async function saveUserMessage(params) {+ const tokenCount = await countTokens(params.text);++ // todo: do this on the frontend+ // const { file_ids = [] } = params;+ // let content;+ // if (file_ids.length) {+ // content = [+ // {+ // value: params.text,+ // },+ // ...(+ // file_ids+ // .filter(f => f)+ // .map((file_id) => ({+ // file_id,+ // }))+ // ),+ // ];+ // }++ const userMessage = {+ user: params.user,+ endpoint: EModelEndpoint.assistants,+ messageId: params.messageId,+ conversationId: params.conversationId,+ parentMessageId: params.parentMessageId ?? Constants.NO_PARENT,+ /* For messages, use the assistant_id instead of model */+ model: params.assistant_id,+ thread_id: params.thread_id,+ sender: 'User',+ text: params.text,+ isCreatedByUser: true,+ tokenCount,+ };++ const convo = {+ endpoint: EModelEndpoint.assistants,+ conversationId: params.conversationId,+ promptPrefix: params.promptPrefix,+ instructions: params.instructions,+ assistant_id: params.assistant_id,+ model: params.model,+ };++ if (params.files?.length) {+ userMessage.files = params.files.map(({ file_id }) => ({ file_id }));+ convo.file_ids = params.file_ids;+ }++ const message = await recordMessage(userMessage);+ await saveConvo(params.user, convo);++ return message;+}++/**+ * Saves an Assistant message to the DB in the Assistants endpoint format.+ *+ * @param {Object} params - The parameters of the Assistant message+ * @param {string} params.user - The user's ID.+ * @param {string} params.messageId - The message Id.+ * @param {string} params.assistant_id - The assistant Id.+ * @param {string} params.thread_id - The thread Id.+ * @param {string} params.model - The model used by the assistant.+ * @param {ContentPart[]} params.content - The message content parts.+ * @param {string} params.conversationId - The message's conversationId+ * @param {string} params.parentMessageId - The latest user message that triggered this response.+ * @param {string} [params.instructions] - Optional: from preset for `instructions` field.+ * Overrides the instructions of the assistant.+ * @param {string} [params.promptPrefix] - Optional: from preset for `additional_instructions` field.+ * @return {Promise<Run>} A promise that resolves to the created run object.+ */+async function saveAssistantMessage(params) {+ const text = params.content.reduce((acc, part) => {+ if (!part.value) {+ return acc;+ }++ return acc + ' ' + part.value;+ }, '');++ // const tokenCount = // TODO: need to count each content part++ const message = await recordMessage({+ user: params.user,+ endpoint: EModelEndpoint.assistants,+ messageId: params.messageId,+ conversationId: params.conversationId,+ parentMessageId: params.parentMessageId,+ thread_id: params.thread_id,+ /* For messages, use the assistant_id instead of model */+ model: params.assistant_id,+ content: params.content,+ sender: 'Assistant',+ isCreatedByUser: false,+ text: text.trim(),+ // tokenCount,+ });++ await saveConvo(params.user, {+ endpoint: EModelEndpoint.assistants,+ conversationId: params.conversationId,+ promptPrefix: params.promptPrefix,+ instructions: params.instructions,+ assistant_id: params.assistant_id,+ model: params.model,+ });++ return message;+}++/**+ * Records LibreChat messageId to all response messages' metadata+ *+ * @param {Object} params - The parameters for initializing a thread.+ * @param {OpenAIClient} params.openai - The OpenAI client instance.+ * @param {string} params.thread_id - Response thread ID.+ * @param {string} params.messageId - The response `messageId` generated by LibreChat.+ * @param {StepMessage[] | Message[]} params.messages - A list of messages to start the thread with.+ * @return {Promise<ThreadMessage[]>} A promise that resolves to the updated messages+ */+async function addThreadMetadata({ openai, thread_id, messageId, messages }) {+ const promises = [];+ for (const message of messages) {+ promises.push(+ openai.beta.threads.messages.update(thread_id, message.id, {+ metadata: {+ messageId,+ },+ }),+ );+ }++ return await Promise.all(promises);+}++/**+ * Synchronizes LibreChat messages to Thread Messages.+ * Updates the LibreChat DB with any missing Thread Messages and+ * updates the missing Thread Messages' metadata with their corresponding db messageId's.+ *+ * Also updates the existing conversation's file_ids with any new file_ids.+ *+ * @param {Object} params - The parameters for synchronizing messages.+ * @param {OpenAIClient} params.openai - The OpenAI client instance.+ * @param {TMessage[]} params.dbMessages - The LibreChat DB messages.+ * @param {ThreadMessage[]} params.apiMessages - The thread messages from the API.+ * @param {string} params.conversationId - The current conversation ID.+ * @param {string} params.thread_id - The current thread ID.+ * @param {string} [params.assistant_id] - The current assistant ID.+ * @return {Promise<TMessage[]>} A promise that resolves to the updated messages+ */+async function syncMessages({+ openai,+ apiMessages,+ dbMessages,+ conversationId,+ thread_id,+ assistant_id,+}) {+ let result = [];+ let dbMessageMap = new Map(dbMessages.map((msg) => [msg.messageId, msg]));++ const modifyPromises = [];+ const recordPromises = [];++ /**+ *+ * Modify API message and save newMessage to DB+ *+ * @param {Object} params - The parameters object+ * @param {TMessage} params.dbMessage+ * @param {dbMessage} params.apiMessage+ */+ const processNewMessage = async ({ dbMessage, apiMessage }) => {+ recordPromises.push(recordMessage({ ...dbMessage, user: openai.req.user.id }));++ if (!apiMessage.id.includes('msg_')) {+ return;+ }++ if (dbMessage.aggregateMessages?.length > 1) {+ modifyPromises.push(+ addThreadMetadata({+ openai,+ thread_id,+ messageId: dbMessage.messageId,+ messages: dbMessage.aggregateMessages,+ }),+ );+ return;+ }++ modifyPromises.push(+ openai.beta.threads.messages.update(thread_id, apiMessage.id, {+ metadata: {+ messageId: dbMessage.messageId,+ },+ }),+ );+ };++ let lastMessage = null;++ for (let i = 0; i < apiMessages.length; i++) {+ const apiMessage = apiMessages[i];++ // Check if the message exists in the database based on metadata+ const dbMessageId = apiMessage.metadata && apiMessage.metadata.messageId;+ let dbMessage = dbMessageMap.get(dbMessageId);++ if (dbMessage) {+ // If message exists in DB, use its messageId and update parentMessageId+ dbMessage.parentMessageId = lastMessage ? lastMessage.messageId : Constants.NO_PARENT;+ lastMessage = dbMessage;+ result.push(dbMessage);+ continue;+ }++ if (apiMessage.role === 'assistant' && lastMessage && lastMessage.role === 'assistant') {+ // Aggregate assistant messages+ lastMessage.content = [...lastMessage.content, ...apiMessage.content];+ lastMessage.files = [...(lastMessage.files ?? []), ...(apiMessage.files ?? [])];+ lastMessage.aggregateMessages.push({ id: apiMessage.id });+ } else {+ // Handle new or missing message+ const newMessage = {+ thread_id,+ conversationId,+ messageId: v4(),+ endpoint: EModelEndpoint.assistants,+ parentMessageId: lastMessage ? lastMessage.messageId : Constants.NO_PARENT,+ role: apiMessage.role,+ isCreatedByUser: apiMessage.role === 'user',+ // TODO: process generated files in content parts+ content: apiMessage.content,+ aggregateMessages: [{ id: apiMessage.id }],+ model: apiMessage.role === 'user' ? null : apiMessage.assistant_id,+ user: openai.req.user.id,+ };++ if (apiMessage.file_ids?.length) {+ // TODO: retrieve file objects from API+ newMessage.files = apiMessage.file_ids.map((file_id) => ({ file_id }));+ }++ /* Assign assistant_id if defined */+ if (assistant_id && apiMessage.role === 'assistant' && !newMessage.model) {+ apiMessage.model = assistant_id;+ newMessage.model = assistant_id;+ }++ result.push(newMessage);+ lastMessage = newMessage;++ if (apiMessage.role === 'user') {+ processNewMessage({ dbMessage: newMessage, apiMessage });+ continue;+ }+ }++ const nextMessage = apiMessages[i + 1];+ const processAssistant = !nextMessage || nextMessage.role === 'user';++ if (apiMessage.role === 'assistant' && processAssistant) {+ processNewMessage({ dbMessage: lastMessage, apiMessage });+ }+ }++ const attached_file_ids = apiMessages.reduce((acc, msg) => {+ if (msg.role === 'user' && msg.file_ids?.length) {+ return [...acc, ...msg.file_ids];+ }++ return acc;+ }, []);++ await Promise.all(modifyPromises);+ await Promise.all(recordPromises);++ await saveConvo(openai.req.user.id, {+ conversationId,+ file_ids: attached_file_ids,+ });++ return result;+}++/**+ * Maps messages to their corresponding steps. Steps with message creation will be paired with their messages,+ * while steps without message creation will be returned as is.+ *+ * @param {RunStep[]} steps - An array of steps from the run.+ * @param {Message[]} messages - An array of message objects.+ * @returns {(StepMessage | RunStep)[]} An array where each element is either a step with its corresponding message (StepMessage) or a step without a message (RunStep).+ */+function mapMessagesToSteps(steps, messages) {+ // Create a map of messages indexed by their IDs for efficient lookup+ const messageMap = messages.reduce((acc, msg) => {+ acc[msg.id] = msg;+ return acc;+ }, {});++ // Map each step to its corresponding message, or return the step as is if no message ID is present+ return steps+ .sort((a, b) => a.created_at - b.created_at)+ .map((step) => {+ const messageId = step.step_details?.message_creation?.message_id;++ if (messageId && messageMap[messageId]) {+ return { step, message: messageMap[messageId] };+ }+ return step;+ });+}++/**+ * Checks for any missing messages; if missing,+ * synchronizes LibreChat messages to Thread Messages+ *+ * @param {Object} params - The parameters for initializing a thread.+ * @param {OpenAIClient} params.openai - The OpenAI client instance.+ * @param {string} [params.latestMessageId] - Optional: The latest message ID from LibreChat.+ * @param {string} params.thread_id - Response thread ID.+ * @param {string} params.run_id - Response Run ID.+ * @param {string} params.conversationId - LibreChat conversation ID.+ * @return {Promise<TMessage[]>} A promise that resolves to the updated messages+ */+async function checkMessageGaps({ openai, latestMessageId, thread_id, run_id, conversationId }) {+ const promises = [];+ promises.push(openai.beta.threads.messages.list(thread_id, defaultOrderQuery));+ promises.push(openai.beta.threads.runs.steps.list(thread_id, run_id));+ /** @type {[{ data: ThreadMessage[] }, { data: RunStep[] }]} */+ const [response, stepsResponse] = await Promise.all(promises);++ const steps = mapMessagesToSteps(stepsResponse.data, response.data);+ /** @type {ThreadMessage} */+ const currentMessage = {+ id: v4(),+ content: [],+ assistant_id: null,+ created_at: Math.floor(new Date().getTime() / 1000),+ object: 'thread.message',+ role: 'assistant',+ run_id,+ thread_id,+ metadata: {+ messageId: latestMessageId,+ },+ };++ for (const step of steps) {+ if (!currentMessage.assistant_id && step.assistant_id) {+ currentMessage.assistant_id = step.assistant_id;+ }+ if (step.message) {+ currentMessage.id = step.message.id;+ currentMessage.created_at = step.message.created_at;+ currentMessage.content = currentMessage.content.concat(step.message.content);+ } else if (step.step_details?.type === 'tool_calls' && step.step_details?.tool_calls?.length) {+ currentMessage.content = currentMessage.content.concat(+ step.step_details?.tool_calls.map((toolCall) => ({+ [ContentTypes.TOOL_CALL]: {+ ...toolCall,+ progress: 2,+ },+ type: ContentTypes.TOOL_CALL,+ })),+ );+ }+ }++ let addedCurrentMessage = false;+ const apiMessages = response.data.map((msg) => {+ if (msg.id === currentMessage.id) {+ addedCurrentMessage = true;+ return currentMessage;+ }+ return msg;+ });++ if (!addedCurrentMessage) {+ apiMessages.push(currentMessage);+ }++ const dbMessages = await getMessages({ conversationId });+ const assistant_id = dbMessages?.[0]?.model;++ const syncedMessages = await syncMessages({+ openai,+ dbMessages,+ apiMessages,+ thread_id,+ conversationId,+ assistant_id,+ });++ return Object.values(+ [...dbMessages, ...syncedMessages].reduce(+ (acc, message) => ({ ...acc, [message.messageId]: message }),+ {},+ ),+ );+}++/**+ * Records token usage for a given completion request.+ *+ * @param {Object} params - The parameters for initializing a thread.+ * @param {number} params.prompt_tokens - The number of prompt tokens used.+ * @param {number} params.completion_tokens - The number of completion tokens used.+ * @param {string} params.model - The model used by the assistant run.+ * @param {string} params.user - The user's ID.+ * @param {string} params.conversationId - LibreChat conversation ID.+ * @return {Promise<TMessage[]>} A promise that resolves to the updated messages+ */+const recordUsage = async ({ prompt_tokens, completion_tokens, model, user, conversationId }) => {+ await spendTokens(+ {+ user,+ model,+ context: 'message',+ conversationId,+ },+ { promptTokens: prompt_tokens, completionTokens: completion_tokens },+ );+};++module.exports = {+ initThread,+ recordUsage,+ saveUserMessage,+ checkMessageGaps,+ addThreadMetadata,+ mapMessagesToSteps,+ saveAssistantMessage,+};diff --git a/api/server/services/ToolService.js b/api/server/services/ToolService.jsnew file mode 100644index 0000000000..c24d31fcd0--- /dev/null+++ b/api/server/services/ToolService.js@@ -0,0 +1,317 @@+const fs = require('fs');+const path = require('path');+const { StructuredTool } = require('langchain/tools');+const { zodToJsonSchema } = require('zod-to-json-schema');+const { Calculator } = require('langchain/tools/calculator');+const {+ ContentTypes,+ imageGenTools,+ openapiToFunction,+ validateAndParseOpenAPISpec,+ actionDelimiter,+} = require('librechat-data-provider');+const { loadActionSets, createActionTool } = require('./ActionService');+const { processFileURL } = require('~/server/services/Files/process');+const { loadTools } = require('~/app/clients/tools/util');+const { redactMessage } = require('~/config/parsers');+const { sleep } = require('./Runs/handle');+const { logger } = require('~/config');++/**+ * Loads and formats tools from the specified tool directory.+ *+ * The directory is scanned for JavaScript files, excluding any files in the filter set.+ * For each file, it attempts to load the file as a module and instantiate a class, if it's a subclass of `StructuredTool`.+ * Each tool instance is then formatted to be compatible with the OpenAI Assistant.+ * Additionally, instances of LangChain Tools are included in the result.+ *+ * @param {object} params - The parameters for the function.+ * @param {string} params.directory - The directory path where the tools are located.+ * @param {Set<string>} [params.filter=new Set()] - A set of filenames to exclude from loading.+ * @returns {Record<string, FunctionTool>} An object mapping each tool's plugin key to its instance.+ */+function loadAndFormatTools({ directory, filter = new Set() }) {+ const tools = [];+ /* Structured Tools Directory */+ const files = fs.readdirSync(directory);++ for (const file of files) {+ if (file.endsWith('.js') && !filter.has(file)) {+ const filePath = path.join(directory, file);+ let ToolClass = null;+ try {+ ToolClass = require(filePath);+ } catch (error) {+ logger.error(`[loadAndFormatTools] Error loading tool from ${filePath}:`, error);+ continue;+ }++ if (!ToolClass) {+ continue;+ }++ if (ToolClass.prototype instanceof StructuredTool) {+ /** @type {StructuredTool | null} */+ let toolInstance = null;+ try {+ toolInstance = new ToolClass({ override: true });+ } catch (error) {+ logger.error(+ `[loadAndFormatTools] Error initializing \`${file}\` tool; if it requires authentication, is the \`override\` field configured?`,+ error,+ );+ continue;+ }++ if (!toolInstance) {+ continue;+ }++ const formattedTool = formatToOpenAIAssistantTool(toolInstance);+ tools.push(formattedTool);+ }+ }+ }++ /**+ * Basic Tools; schema: { input: string }+ */+ const basicToolInstances = [new Calculator()];++ for (const toolInstance of basicToolInstances) {+ const formattedTool = formatToOpenAIAssistantTool(toolInstance);+ tools.push(formattedTool);+ }++ return tools.reduce((map, tool) => {+ map[tool.function.name] = tool;+ return map;+ }, {});+}++/**+ * Formats a `StructuredTool` instance into a format that is compatible+ * with OpenAI's ChatCompletionFunctions. It uses the `zodToJsonSchema`+ * function to convert the schema of the `StructuredTool` into a JSON+ * schema, which is then used as the parameters for the OpenAI function.+ *+ * @param {StructuredTool} tool - The StructuredTool to format.+ * @returns {FunctionTool} The OpenAI Assistant Tool.+ */+function formatToOpenAIAssistantTool(tool) {+ return {+ type: 'function',+ function: {+ name: tool.name,+ description: tool.description,+ parameters: zodToJsonSchema(tool.schema),+ },+ };+}++/**+ * Processes return required actions from run.+ *+ * @param {OpenAIClient} openai - OpenAI Client.+ * @param {RequiredAction[]} requiredActions - The required actions to submit outputs for.+ * @returns {Promise<ToolOutputs>} The outputs of the tools.+ *+ */+async function processRequiredActions(openai, requiredActions) {+ logger.debug(+ `[required actions] user: ${openai.req.user.id} | thread_id: ${requiredActions[0].thread_id} | run_id: ${requiredActions[0].run_id}`,+ requiredActions,+ );+ const tools = requiredActions.map((action) => action.tool);+ const loadedTools = await loadTools({+ user: openai.req.user.id,+ model: openai.req.body.model ?? 'gpt-3.5-turbo-1106',+ tools,+ functions: true,+ options: {+ processFileURL,+ openAIApiKey: openai.apiKey,+ fileStrategy: openai.req.app.locals.fileStrategy,+ returnMetadata: true,+ },+ skipSpecs: true,+ });++ const ToolMap = loadedTools.reduce((map, tool) => {+ map[tool.name] = tool;+ return map;+ }, {});++ const promises = [];++ /** @type {Action[]} */+ let actionSets = [];+ let isActionTool = false;+ const ActionToolMap = {};+ const ActionBuildersMap = {};++ for (let i = 0; i < requiredActions.length; i++) {+ const currentAction = requiredActions[i];+ let tool = ToolMap[currentAction.tool] ?? ActionToolMap[currentAction.tool];++ const handleToolOutput = async (output) => {+ requiredActions[i].output = output;++ /** @type {FunctionToolCall & PartMetadata} */+ const toolCall = {+ function: {+ name: currentAction.tool,+ arguments: JSON.stringify(currentAction.toolInput),+ output,+ },+ id: currentAction.toolCallId,+ type: 'function',+ progress: 1,+ action: isActionTool,+ };++ const toolCallIndex = openai.mappedOrder.get(toolCall.id);++ if (imageGenTools.has(currentAction.tool)) {+ const imageOutput = output;+ toolCall.function.output = `${currentAction.tool} displayed an image. All generated images are already plainly visible, so don't repeat the descriptions in detail. Do not list download links as they are available in the UI already. The user may download the images by clicking on them, but do not mention anything about downloading to the user.`;++ // Streams the "Finished" state of the tool call in the UI+ openai.addContentData({+ [ContentTypes.TOOL_CALL]: toolCall,+ index: toolCallIndex,+ type: ContentTypes.TOOL_CALL,+ });++ await sleep(500);++ /** @type {ImageFile} */+ const imageDetails = {+ ...imageOutput,+ ...currentAction.toolInput,+ };++ const image_file = {+ [ContentTypes.IMAGE_FILE]: imageDetails,+ type: ContentTypes.IMAGE_FILE,+ // Replace the tool call output with Image file+ index: toolCallIndex,+ };++ openai.addContentData(image_file);++ // Update the stored tool call+ openai.seenToolCalls.set(toolCall.id, toolCall);++ return {+ tool_call_id: currentAction.toolCallId,+ output: toolCall.function.output,+ };+ }++ openai.seenToolCalls.set(toolCall.id, toolCall);+ openai.addContentData({+ [ContentTypes.TOOL_CALL]: toolCall,+ index: toolCallIndex,+ type: ContentTypes.TOOL_CALL,+ // TODO: to append tool properties to stream, pass metadata rest to addContentData+ // result: tool.result,+ });++ return {+ tool_call_id: currentAction.toolCallId,+ output,+ };+ };++ if (!tool) {+ // throw new Error(`Tool ${currentAction.tool} not found.`);++ if (!actionSets.length) {+ actionSets =+ (await loadActionSets({+ user: openai.req.user.id,+ assistant_id: openai.req.body.assistant_id,+ })) ?? [];+ }++ const actionSet = actionSets.find((action) =>+ currentAction.tool.includes(action.metadata.domain),+ );++ if (!actionSet) {+ // TODO: try `function` if no action set is found+ // throw new Error(`Tool ${currentAction.tool} not found.`);+ continue;+ }++ let builders = ActionBuildersMap[actionSet.metadata.domain];++ if (!builders) {+ const validationResult = validateAndParseOpenAPISpec(actionSet.metadata.raw_spec);+ if (!validationResult.spec) {+ throw new Error(+ `Invalid spec: user: ${openai.req.user.id} | thread_id: ${requiredActions[0].thread_id} | run_id: ${requiredActions[0].run_id}`,+ );+ }+ const { requestBuilders } = openapiToFunction(validationResult.spec);+ ActionToolMap[actionSet.metadata.domain] = requestBuilders;+ builders = requestBuilders;+ }++ const functionName = currentAction.tool.replace(+ `${actionDelimiter}${actionSet.metadata.domain}`,+ '',+ );+ const requestBuilder = builders[functionName];++ if (!requestBuilder) {+ // throw new Error(`Tool ${currentAction.tool} not found.`);+ continue;+ }++ tool = createActionTool({ action: actionSet, requestBuilder });+ isActionTool = !!tool;+ ActionToolMap[currentAction.tool] = tool;+ }++ if (currentAction.tool === 'calculator') {+ currentAction.toolInput = currentAction.toolInput.input;+ }++ try {+ const promise = tool+ ._call(currentAction.toolInput)+ .then(handleToolOutput)+ .catch((error) => {+ logger.error(`Error processing tool ${currentAction.tool}`, error);+ return {+ tool_call_id: currentAction.toolCallId,+ output: `Error processing tool ${currentAction.tool}: ${redactMessage(error.message)}`,+ };+ });+ promises.push(promise);+ } catch (error) {+ logger.error(+ `tool_call_id: ${currentAction.toolCallId} | Error processing tool ${currentAction.tool}`,+ error,+ );+ promises.push(+ Promise.resolve({+ tool_call_id: currentAction.toolCallId,+ error: error.message,+ }),+ );+ }+ }++ return {+ tool_outputs: await Promise.all(promises),+ };+}++module.exports = {+ formatToOpenAIAssistantTool,+ loadAndFormatTools,+ processRequiredActions,+};diff --git a/api/server/utils/countTokens.js b/api/server/utils/countTokens.jsindex 34c070aa8c..641e386101 100644--- a/api/server/utils/countTokens.js+++ b/api/server/utils/countTokens.js@@ -3,6 +3,20 @@ const p50k_base = require('tiktoken/encoders/p50k_base.json');const cl100k_base = require('tiktoken/encoders/cl100k_base.json');const logger = require('~/config/winston');+/**+ * Counts the number of tokens in a given text using a specified encoding model.+ *+ * This function utilizes the 'Tiktoken' library to encode text based on the selected model.+ * It supports two models, 'text-davinci-003' and 'gpt-3.5-turbo', each with its own encoding strategy.+ * For 'text-davinci-003', the 'p50k_base' encoder is used, whereas for other models, the 'cl100k_base' encoder is applied.+ * In case of an error during encoding, the error is logged, and the function returns 0.+ *+ * @async+ * @param {string} text - The text to be tokenized. Defaults to an empty string if not provided.+ * @param {string} modelName - The name of the model used for tokenizing. Defaults to 'gpt-3.5-turbo'.+ * @returns {Promise<number>} The number of tokens in the provided text. Returns 0 if an error occurs.+ * @throws Logs the error to a logger and rethrows if any error occurs during tokenization.+ */const countTokens = async (text = '', modelName = 'gpt-3.5-turbo') => {let encoder = null;try {diff --git a/api/server/utils/crypto.js b/api/server/utils/crypto.jsindex 9b5fed67c6..911819634b 100644--- a/api/server/utils/crypto.js+++ b/api/server/utils/crypto.js@@ -19,4 +19,23 @@ function decrypt(encryptedValue) {return decrypted;}-module.exports = { encrypt, decrypt };+// Programatically generate iv+function encryptV2(value) {+ const gen_iv = crypto.randomBytes(16);+ const cipher = crypto.createCipheriv(algorithm, key, gen_iv);+ let encrypted = cipher.update(value, 'utf8', 'hex');+ encrypted += cipher.final('hex');+ return gen_iv.toString('hex') + ':' + encrypted;+}++function decryptV2(encryptedValue) {+ const parts = encryptedValue.split(':');+ const gen_iv = Buffer.from(parts.shift(), 'hex');+ const encrypted = parts.join(':');+ const decipher = crypto.createDecipheriv(algorithm, key, gen_iv);+ let decrypted = decipher.update(encrypted, 'hex', 'utf8');+ decrypted += decipher.final('utf8');+ return decrypted;+}++module.exports = { encrypt, decrypt, encryptV2, decryptV2 };diff --git a/api/server/utils/files.js b/api/server/utils/files.jsnew file mode 100644index 0000000000..63cf95d3ab--- /dev/null+++ b/api/server/utils/files.js@@ -0,0 +1,47 @@+const sharp = require('sharp');++/**+ * Determines the file type of a buffer+ * @param {Buffer} dataBuffer+ * @param {boolean} [returnFileType=false] - Optional. If true, returns the file type instead of the file extension.+ * @returns {Promise<string|null|import('file-type').FileTypeResult>} - Returns the file extension if found, else null+ * */+const determineFileType = async (dataBuffer, returnFileType) => {+ const fileType = await import('file-type');+ const type = await fileType.fileTypeFromBuffer(dataBuffer);+ if (returnFileType) {+ return type;+ }+ return type ? type.ext : null; // Returns extension if found, else null+};++/**+ * Get buffer metadata+ * @param {Buffer} buffer+ * @returns {Promise<{ bytes: number, type: string, dimensions: Record<string, number>, extension: string}>}+ */+const getBufferMetadata = async (buffer) => {+ const fileType = await determineFileType(buffer, true);+ const bytes = buffer.length;+ let extension = fileType ? fileType.ext : 'unknown';++ /** @type {Record<string, number>} */+ let dimensions = {};++ if (fileType && fileType.mime.startsWith('image/') && extension !== 'unknown') {+ const imageMetadata = await sharp(buffer).metadata();+ dimensions = {+ width: imageMetadata.width,+ height: imageMetadata.height,+ };+ }++ return {+ bytes,+ type: fileType?.mime ?? 'unknown',+ dimensions,+ extension,+ };+};++module.exports = { determineFileType, getBufferMetadata };diff --git a/api/server/utils/index.js b/api/server/utils/index.jsindex d51cdd1d4e..c1637a678d 100644--- a/api/server/utils/index.js+++ b/api/server/utils/index.js@@ -5,6 +5,7 @@ const handleText = require('./handleText');const cryptoUtils = require('./crypto');const citations = require('./citations');const sendEmail = require('./sendEmail');+const files = require('./files');const math = require('./math');module.exports = {@@ -15,5 +16,6 @@ module.exports = {countTokens,removePorts,sendEmail,+ ...files,math,};diff --git a/api/server/utils/queue.js b/api/server/utils/queue.jsnew file mode 100644index 0000000000..73d819205c--- /dev/null+++ b/api/server/utils/queue.js@@ -0,0 +1,58 @@+/**+ * A leaky bucket queue structure to manage API requests.+ * @type {{queue: Array, interval: NodeJS.Timer | null}}+ */+const _LB = {+ queue: [],+ interval: null,+};++/**+ * Interval in milliseconds to control the rate of API requests.+ * Adjust the interval according to your rate limit needs.+ */+const _LB_INTERVAL_MS = Math.ceil(1000 / 60); // 60 req/s++/**+ * Executes the next function in the leaky bucket queue.+ * This function is called at regular intervals defined by _LB_INTERVAL_MS.+ */+const _LB_EXEC_NEXT = async () => {+ if (_LB.queue.length === 0) {+ clearInterval(_LB.interval);+ _LB.interval = null;+ return;+ }++ const next = _LB.queue.shift();+ if (!next) {+ return;+ }++ const { asyncFunc, args, callback } = next;++ try {+ const data = await asyncFunc(...args);+ callback(null, data);+ } catch (e) {+ callback(e);+ }+};++/**+ * Adds an async function call to the leaky bucket queue.+ * @param {Function} asyncFunc - The async function to be executed.+ * @param {Array} args - Arguments to pass to the async function.+ * @param {Function} callback - Callback function for handling the result or error.+ */+function LB_QueueAsyncCall(asyncFunc, args, callback) {+ _LB.queue.push({ asyncFunc, args, callback });++ if (_LB.interval === null) {+ _LB.interval = setInterval(_LB_EXEC_NEXT, _LB_INTERVAL_MS);+ }+}++module.exports = {+ LB_QueueAsyncCall,+};diff --git a/api/server/utils/streamResponse.js b/api/server/utils/streamResponse.jsindex 3511f144cc..109a407463 100644--- a/api/server/utils/streamResponse.js+++ b/api/server/utils/streamResponse.js@@ -16,12 +16,12 @@ const handleError = (res, message) => {/*** Sends message data in Server Sent Events format.- * @param {object} res - - The server response.- * @param {string} message - The message to be sent.+ * @param {Express.Response} res - - The server response.+ * @param {string | Object} message - The message to be sent.* @param {'message' | 'error' | 'cancel'} event - [Optional] The type of event. Default is 'message'.*/const sendMessage = (res, message, event = 'message') => {- if (message.length === 0) {+ if (typeof message === 'string' && message.length === 0) {return;}res.write(`event: ${event}\ndata: ${JSON.stringify(message)}\n\n`);diff --git a/api/strategies/process.js b/api/strategies/process.jsindex 570637eecd..9b79102319 100644--- a/api/strategies/process.js+++ b/api/strategies/process.js@@ -1,5 +1,6 @@const { FileSources } = require('librechat-data-provider');-const uploadAvatar = require('~/server/services/Files/images/avatar');+const { getStrategyFunctions } = require('~/server/services/Files/strategies');+const { resizeAvatar } = require('~/server/services/Files/images/avatar');const User = require('~/models/User');/**@@ -24,8 +25,12 @@ const handleExistingUser = async (oldUser, avatarUrl) => {await oldUser.save();} else if (!isLocal && (oldUser.avatar === null || !oldUser.avatar.includes('?manual=true'))) {const userId = oldUser._id;- const newavatarUrl = await uploadAvatar({ userId, input: avatarUrl, fileStrategy });- oldUser.avatar = newavatarUrl;+ const webPBuffer = await resizeAvatar({+ userId,+ input: avatarUrl,+ });+ const { processAvatar } = getStrategyFunctions(fileStrategy);+ oldUser.avatar = await processAvatar({ buffer: webPBuffer, userId });await oldUser.save();}};@@ -78,8 +83,12 @@ const createNewUser = async ({if (!isLocal) {const userId = newUser._id;- const newavatarUrl = await uploadAvatar({ userId, input: avatarUrl, fileStrategy });- newUser.avatar = newavatarUrl;+ const webPBuffer = await resizeAvatar({+ userId,+ input: avatarUrl,+ });+ const { processAvatar } = getStrategyFunctions(fileStrategy);+ newUser.avatar = await processAvatar({ buffer: webPBuffer, userId });await newUser.save();}diff --git a/api/typedefs.js b/api/typedefs.jsindex bb1f68cc8b..6bc792cbe6 100644--- a/api/typedefs.js+++ b/api/typedefs.js@@ -14,6 +14,12 @@* @memberof typedefs*/+/**+ * @exports AssistantDocument+ * @typedef {import('librechat-data-provider').AssistantDocument} AssistantDocument+ * @memberof typedefs+ */+/*** @exports OpenAIFile* @typedef {import('librechat-data-provider').File} OpenAIFile@@ -44,6 +50,12 @@* @memberof typedefs*/+/**+ * @exports TPlugin+ * @typedef {import('librechat-data-provider').TPlugin} TPlugin+ * @memberof typedefs+ */+/*** @exports FileSources* @typedef {import('librechat-data-provider').FileSources} FileSources@@ -51,12 +63,63 @@*//**- * @exports ImageMetadata- * @typedef {Object} ImageMetadata+ * @exports TMessage+ * @typedef {import('librechat-data-provider').TMessage} TMessage+ * @memberof typedefs+ */++/**+ * @exports ImageFile+ * @typedef {import('librechat-data-provider').ImageFile} ImageFile+ * @memberof typedefs+ */++/**+ * @exports ActionRequest+ * @typedef {import('librechat-data-provider').ActionRequest} ActionRequest+ * @memberof typedefs+ */++/**+ * @exports Action+ * @typedef {import('librechat-data-provider').Action} Action+ * @memberof typedefs+ */++/**+ * @exports ActionMetadata+ * @typedef {import('librechat-data-provider').ActionMetadata} ActionMetadata+ * @memberof typedefs+ */++/**+ * @exports ActionAuth+ * @typedef {import('librechat-data-provider').ActionAuth} ActionAuth+ * @memberof typedefs+ */++/**+ * @exports DeleteFilesBody+ * @typedef {import('librechat-data-provider').DeleteFilesBody} DeleteFilesBody+ * @memberof typedefs+ */++/**+ * @exports FileMetadata+ * @typedef {Object} FileMetadata* @property {string} file_id - The identifier of the file.* @property {string} [temp_file_id] - The temporary identifier of the file.+ * @property {string} endpoint - The conversation endpoint origin for the file upload.+ * @property {string} [assistant_id] - The assistant ID if file upload is in the `knowledge` context.+ * @memberof typedefs+ */++/**+ * @typedef {Object} ImageOnlyMetadata* @property {number} width - The width of the image.* @property {number} height - The height of the image.+ *+ * @typedef {FileMetadata & ImageOnlyMetadata} ImageMetadata* @memberof typedefs*/@@ -90,6 +153,36 @@* @memberof typedefs*/+/**+ * @exports ContentPart+ * @typedef {import('librechat-data-provider').ContentPart} ContentPart+ * @memberof typedefs+ */++/**+ * @exports StepTypes+ * @typedef {import('librechat-data-provider').StepTypes} StepTypes+ * @memberof typedefs+ */++/**+ * @exports TContentData+ * @typedef {import('librechat-data-provider').TContentData} TContentData+ * @memberof typedefs+ */++/**+ * @exports ContentPart+ * @typedef {import('librechat-data-provider').ContentPart} ContentPart+ * @memberof typedefs+ */++/**+ * @exports PartMetadata+ * @typedef {import('librechat-data-provider').PartMetadata} PartMetadata+ * @memberof typedefs+ */+/*** @exports ThreadMessage* @typedef {import('openai').OpenAI.Beta.Threads.ThreadMessage} ThreadMessage@@ -97,14 +190,111 @@*//**+ * @exports TAssistantEndpoint+ * @typedef {import('librechat-data-provider').TAssistantEndpoint} TAssistantEndpoint+ * @memberof typedefs+ */++/**+ * Represents details of the message creation by the run step, including the ID of the created message.+ *+ * @exports MessageCreationStepDetails+ * @typedef {Object} MessageCreationStepDetails+ * @property {Object} message_creation - Details of the message creation.+ * @property {string} message_creation.message_id - The ID of the message that was created by this run step.+ * @property {'message_creation'} type - Always 'message_creation'.+ * @memberof typedefs+ */++/**+ * Represents a text log output from the Code Interpreter tool call.+ * @typedef {Object} CodeLogOutput+ * @property {'logs'} type - Always 'logs'.+ * @property {string} logs - The text output from the Code Interpreter tool call.+ */++/**+ * Represents an image output from the Code Interpreter tool call.+ * @typedef {Object} CodeImageOutput+ * @property {'image'} type - Always 'image'.+ * @property {Object} image - The image object.+ * @property {string} image.file_id - The file ID of the image.+ */++/**+ * Details of the Code Interpreter tool call the run step was involved in.+ * Includes the tool call ID, the code interpreter definition, and the type of tool call.+ *+ * @typedef {Object} CodeToolCall+ * @property {string} id - The ID of the tool call.+ * @property {Object} code_interpreter - The Code Interpreter tool call definition.+ * @property {string} code_interpreter.input - The input to the Code Interpreter tool call.+ * @property {Array<(CodeLogOutput | CodeImageOutput)>} code_interpreter.outputs - The outputs from the Code Interpreter tool call.+ * @property {'code_interpreter'} type - The type of tool call, always 'code_interpreter'.+ * @memberof typedefs+ */++/**+ * Details of a Function tool call the run step was involved in.+ * Includes the tool call ID, the function definition, and the type of tool call.+ *+ * @typedef {Object} FunctionToolCall+ * @property {string} id - The ID of the tool call object.+ * @property {Object} function - The definition of the function that was called.+ * @property {string} function.arguments - The arguments passed to the function.+ * @property {string} function.name - The name of the function.+ * @property {string|null} function.output - The output of the function, null if not submitted.+ * @property {'function'} type - The type of tool call, always 'function'.+ * @memberof typedefs+ */++/**+ * Details of a Retrieval tool call the run step was involved in.+ * Includes the tool call ID and the type of tool call.+ *+ * @typedef {Object} RetrievalToolCall+ * @property {string} id - The ID of the tool call object.+ * @property {unknown} retrieval - An empty object for now.+ * @property {'retrieval'} type - The type of tool call, always 'retrieval'.+ * @memberof typedefs+ */++/**+ * Details of the tool calls involved in a run step.+ * Can be associated with one of three types of tools: `code_interpreter`, `retrieval`, or `function`.+ *+ * @typedef {Object} ToolCallsStepDetails+ * @property {Array<CodeToolCall | RetrievalToolCall | FunctionToolCall>} tool_calls - An array of tool calls the run step was involved in.+ * @property {'tool_calls'} type - Always 'tool_calls'.+ * @memberof typedefs+ */++/**+ * Details of the tool calls involved in a run step.+ * Can be associated with one of three types of tools: `code_interpreter`, `retrieval`, or `function`.+ *+ * @exports StepToolCall+ * @typedef {(CodeToolCall | RetrievalToolCall | FunctionToolCall) & PartMetadata} StepToolCall+ * @memberof typedefs+ */++/**+ * Represents a tool call object required for certain actions in the OpenAI API,+ * including the function definition and type of the tool call.+ ** @exports RequiredActionFunctionToolCall- * @typedef {import('openai').OpenAI.Beta.Threads.RequiredActionFunctionToolCall} RequiredActionFunctionToolCall+ * @typedef {Object} RequiredActionFunctionToolCall+ * @property {string} id - The ID of the tool call, referenced when submitting tool outputs.+ * @property {Object} function - The function definition associated with the tool call.+ * @property {string} function.arguments - The arguments that the model expects to be passed to the function.+ * @property {string} function.name - The name of the function.+ * @property {'function'} type - The type of tool call the output is required for, currently always 'function'.* @memberof typedefs*//*** @exports RunManager- * @typedef {import('./server/services/Runs/RunMananger.js').RunManager} RunManager+ * @typedef {import('./server/services/Runs/RunManager.js').RunManager} RunManager* @memberof typedefs*/@@ -112,7 +302,7 @@* @exports Thread* @typedef {Object} Thread* @property {string} id - The identifier of the thread.- * @property {string} object - The object type, always 'thread'.+ * @property {'thread'} object - The object type, always 'thread'.* @property {number} created_at - The Unix timestamp (in seconds) for when the thread was created.* @property {Object} [metadata] - Optional metadata associated with the thread.* @property {Message[]} [messages] - An array of messages associated with the thread.@@ -123,12 +313,12 @@* @exports Message* @typedef {Object} Message* @property {string} id - The identifier of the message.- * @property {string} object - The object type, always 'thread.message'.+ * @property {'thread.message'} object - The object type, always 'thread.message'.* @property {number} created_at - The Unix timestamp (in seconds) for when the message was created.* @property {string} thread_id - The thread ID that this message belongs to.- * @property {string} role - The entity that produced the message. One of 'user' or 'assistant'.+ * @property {'user'|'assistant'} role - The entity that produced the message. One of 'user' or 'assistant'.* @property {Object[]} content - The content of the message in an array of text and/or images.- * @property {string} content[].type - The type of content, either 'text' or 'image_file'.+ * @property {'text'|'image_file'} content[].type - The type of content, either 'text' or 'image_file'.* @property {Object} [content[].text] - The text content, present if type is 'text'.* @property {string} content[].text.value - The data that makes up the text.* @property {Object[]} [content[].text.annotations] - Annotations for the text content.@@ -170,7 +360,7 @@/*** @exports FunctionTool* @typedef {Object} FunctionTool- * @property {string} type - The type of tool, 'function'.+ * @property {'function'} type - The type of tool, 'function'.* @property {Object} function - The function definition.* @property {string} function.description - A description of what the function does.* @property {string} function.name - The name of the function to be called.@@ -181,7 +371,7 @@/*** @exports Tool* @typedef {Object} Tool- * @property {string} type - The type of tool, can be 'code_interpreter', 'retrieval', or 'function'.+ * @property {'code_interpreter'|'retrieval'|'function'} type - The type of tool, can be 'code_interpreter', 'retrieval', or 'function'.* @property {FunctionTool} [function] - The function tool, present if type is 'function'.* @memberof typedefs*/@@ -194,7 +384,7 @@* @property {number} created_at - The Unix timestamp (in seconds) for when the run was created.* @property {string} thread_id - The ID of the thread that was executed on as a part of this run.* @property {string} assistant_id - The ID of the assistant used for execution of this run.- * @property {string} status - The status of the run (e.g., 'queued', 'completed').+ * @property {'queued'|'in_progress'|'requires_action'|'cancelling'|'cancelled'|'failed'|'completed'|'expired'} status - The status of the run: queued, in_progress, requires_action, cancelling, cancelled, failed, completed, or expired.* @property {Object} [required_action] - Details on the action required to continue the run.* @property {string} required_action.type - The type of required action, always 'submit_tool_outputs'.* @property {Object} required_action.submit_tool_outputs - Details on the tool outputs needed for the run to continue.@@ -214,9 +404,15 @@* @property {number} [completed_at] - The Unix timestamp (in seconds) for when the run was completed.* @property {string} [model] - The model that the assistant used for this run.* @property {string} [instructions] - The instructions that the assistant used for this run.+ * @property {string} [additional_instructions] - Optional. Appends additional instructions+ * at theend of the instructions for the run. This is useful for modifying* @property {Tool[]} [tools] - The list of tools used for this run.* @property {string[]} [file_ids] - The list of File IDs used for this run.* @property {Object} [metadata] - Metadata associated with this run.+ * @property {Object} [usage] - Usage statistics related to the run. This value will be `null` if the run is not in a terminal state (i.e. `in_progress`, `queued`, etc.).+ * @property {number} [usage.completion_tokens] - Number of completion tokens used over the course of the run.+ * @property {number} [usage.prompt_tokens] - Number of prompt tokens used over the course of the run.+ * @property {number} [usage.total_tokens] - Total number of tokens used (prompt + completion).* @memberof typedefs*/@@ -229,11 +425,11 @@* @property {string} assistant_id - The ID of the assistant associated with the run step.* @property {string} thread_id - The ID of the thread that was run.* @property {string} run_id - The ID of the run that this run step is a part of.- * @property {string} type - The type of run step, either 'message_creation' or 'tool_calls'.- * @property {string} status - The status of the run step, can be 'in_progress', 'cancelled', 'failed', 'completed', or 'expired'.- * @property {Object} step_details - The details of the run step.+ * @property {'message_creation' | 'tool_calls'} type - The type of run step.+ * @property {'in_progress' | 'cancelled' | 'failed' | 'completed' | 'expired'} status - The status of the run step.+ * @property {MessageCreationStepDetails | ToolCallsStepDetails} step_details - The details of the run step.* @property {Object} [last_error] - The last error associated with this run step.- * @property {string} last_error.code - One of 'server_error' or 'rate_limit_exceeded'.+ * @property {'server_error' | 'rate_limit_exceeded'} last_error.code - One of 'server_error' or 'rate_limit_exceeded'.* @property {string} last_error.message - A human-readable description of the error.* @property {number} [expired_at] - The Unix timestamp (in seconds) for when the run step expired.* @property {number} [cancelled_at] - The Unix timestamp (in seconds) for when the run step was cancelled.@@ -253,8 +449,8 @@* @property {string} assistant_id - The ID of the assistant associated with the run step.* @property {string} thread_id - The ID of the thread that was run.* @property {string} run_id - The ID of the run that this run step is a part of.- * @property {string} type - The type of run step, either 'message_creation' or 'tool_calls'.- * @property {string} status - The status of the run step, can be 'in_progress', 'cancelled', 'failed', 'completed', or 'expired'.+ * @property {'message_creation'|'tool_calls'} type - The type of run step, either 'message_creation' or 'tool_calls'.+ * @property {'in_progress'|'cancelled'|'failed'|'completed'|'expired'} status - The status of the run step, can be 'in_progress', 'cancelled', 'failed', 'completed', or 'expired'.* @property {Object} step_details - The details of the run step.* @property {Object} [last_error] - The last error associated with this run step.* @property {string} last_error.code - One of 'server_error' or 'rate_limit_exceeded'.@@ -362,6 +558,41 @@* @memberof typedefs*/+/**+ * @exports RequiredAction+ * @typedef {Object} RequiredAction+ * @property {string} tool - The name of the function.+ * @property {Object} toolInput - The args to invoke the function with.+ * @property {string} toolCallId - The ID of the tool call.+ * @property {Run['id']} run_id - Run identifier.+ * @property {Thread['id']} thread_id - Thread identifier.+ * @memberof typedefs+ */++/**+ * @exports StructuredTool+ * @typedef {Object} StructuredTool+ * @property {string} name - The name of the function.+ * @property {string} description - The description of the function.+ * @property {import('zod').ZodTypeAny} schema - The structured zod schema.+ * @memberof typedefs+ */++/**+ * @exports ToolOutput+ * @typedef {Object} ToolOutput+ * @property {string} tool_call_id - The ID of the tool call.+ * @property {Object} output - The output of the tool, which can vary in structure.+ * @memberof typedefs+ */++/**+ * @exports ToolOutputs+ * @typedef {Object} ToolOutputs+ * @property {ToolOutput[]} tool_outputs - Array of tool outputs.+ * @memberof typedefs+ */+/*** @typedef {Object} ModelOptions* @property {string} modelName - The name of the model.@@ -412,3 +643,96 @@* An endpoint's config object mapping model keys to their respective prompt, completion rates, and context limit.* @memberof typedefs*/++/**+ * @typedef {Object} ResponseMessage+ * @property {string} conversationId - The ID of the conversation.+ * @property {string} thread_id - The ID of the thread.+ * @property {string} messageId - The ID of the message (from LibreChat).+ * @property {string} parentMessageId - The ID of the parent message.+ * @property {string} user - The ID of the user.+ * @property {string} assistant_id - The ID of the assistant.+ * @property {string} role - The role of the response.+ * @property {string} model - The model used in the response.+ * @property {ContentPart[]} content - The content parts accumulated from the run.+ * @memberof typedefs+ */++/**+ * @typedef {Object} RunResponse+ * @property {Run} run - The detailed information about the run.+ * @property {RunStep[]} steps - An array of steps taken during the run.+ * @property {StepMessage[]} messages - An array of messages related to the run.+ * @memberof typedefs+ */++/**+ * @callback InProgressFunction+ * @param {Object} params - The parameters for the in progress step.+ * @param {RunStep} params.step - The step object with details about the message creation.+ * @returns {Promise<void>} - A promise that resolves when the step is processed.+ * @memberof typedefs+ */++// /**+// * @typedef {OpenAI & {+// * req: Express.Request,+// * res: Express.Response+// * getPartialText: () => string,+// * processedFileIds: Set<string>,+// * mappedOrder: Map<string, number>,+// * completeToolCallSteps: Set<string>,+// * seenCompletedMessages: Set<string>,+// * seenToolCalls: Map<string, StepToolCall>,+// * progressCallback: (options: Object) => void,+// * addContentData: (data: TContentData) => void,+// * responseMessage: ResponseMessage,+// * }} OpenAIClient - for reference only+// */++/**+ * @typedef {Object} OpenAIClientType+ *+ * @property {Express.Request} req - The Express request object.+ * @property {Express.Response} res - The Express response object.+ * @property {?import('https-proxy-agent').HttpsProxyAgent} httpAgent - An optional HTTP proxy agent for the request.++ * @property {() => string} getPartialText - Retrieves the current tokens accumulated by `progressCallback`.+ *+ * Note: not used until real streaming is implemented by OpenAI.+ *+ * @property {string} responseText -The accumulated text values for the current run.+ * @property {Set<string>} processedFileIds - A set of IDs for processed files.+ * @property {Map<string, number>} mappedOrder - A map to maintain the order of individual `tool_calls` and `steps`.+ * @property {Set<string>} [attachedFileIds] - A set of user attached file ids; necessary to track which files are downloadable.+ * @property {Set<string>} completeToolCallSteps - A set of completed tool call steps.+ * @property {Set<string>} seenCompletedMessages - A set of completed messages that have been seen/processed.+ * @property {Map<string, StepToolCall>} seenToolCalls - A map of tool calls that have been seen/processed.+ * @property {(data: TContentData) => void} addContentData - Updates the response message's relevant+ * @property {InProgressFunction} in_progress - Updates the response message's relevant+ * content array with the part by index & sends intermediate SSE message with content data.+ *+ * Note: does not send intermediate SSE message for messages, which are streamed+ * (may soon be streamed) directly from OpenAI API.+ *+ * @property {ResponseMessage} responseMessage - A message object for responses.+ *+ * @typedef {OpenAI & OpenAIClientType} OpenAIClient+ */++/**+ * The body of the request to create a run, specifying the assistant, model,+ * instructions, and any additional parameters needed for the run.+ *+ * @typedef {Object} CreateRunBody+ * @property {string} assistant_id - The ID of the assistant to use for this run.+ * @property {string} [model] - Optional. The ID of the model to be used for this run.+ * @property {string} [instructions] - Optional. Override the default system message of the assistant.+ * @property {string} [additional_instructions] - Optional. Appends additional instructions+ * at the end of the instructions for the run. Useful for modifying behavior on a per-run basis without overriding other instructions.+ * @property {Object[]} [tools] - Optional. Override the tools the assistant can use for this run. Should include tool call ID and the type of tool call.+ * @property {string[]} [file_ids] - Optional. List of File IDs the assistant can use for this run.+ * **Note:** The API seems to prefer files added to messages, not runs.+ * @property {Object} [metadata] - Optional. Metadata for the run.+ * @memberof typedefs+ */diff --git a/client/package.json b/client/package.jsonindex cc54a3f11c..84b37c7db7 100644--- a/client/package.json+++ b/client/package.json@@ -28,14 +28,18 @@"homepage": "https://github.com/danny-avila/LibreChat#readme","dependencies": {"@headlessui/react": "^1.7.13",+ "@radix-ui/react-accordion": "^1.1.2","@radix-ui/react-alert-dialog": "^1.0.2","@radix-ui/react-checkbox": "^1.0.3",+ "@radix-ui/react-collapsible": "^1.0.3","@radix-ui/react-dialog": "^1.0.2","@radix-ui/react-dropdown-menu": "^2.0.2","@radix-ui/react-hover-card": "^1.0.5","@radix-ui/react-icons": "^1.3.0","@radix-ui/react-label": "^2.0.0","@radix-ui/react-popover": "^1.0.7",+ "@radix-ui/react-radio-group": "^1.1.3",+ "@radix-ui/react-select": "^2.0.0","@radix-ui/react-separator": "^1.0.3","@radix-ui/react-slider": "^1.1.1","@radix-ui/react-switch": "^1.0.3",@@ -43,6 +47,7 @@"@radix-ui/react-toast": "^1.1.5","@radix-ui/react-tooltip": "^1.0.6","@tanstack/react-query": "^4.28.0",+ "@tanstack/react-table": "^8.11.7","@zattoo/use-double-click": "1.2.0","axios": "^1.3.4","class-variance-authority": "^0.6.0",@@ -67,6 +72,7 @@"react-hook-form": "^7.43.9","react-lazy-load-image-component": "^1.6.0","react-markdown": "^8.0.6",+ "react-resizable-panels": "^1.0.9","react-router-dom": "^6.11.2","react-textarea-autosize": "^8.4.0","react-transition-group": "^4.4.5",@@ -116,7 +122,7 @@"tailwindcss": "^3.4.1","ts-jest": "^29.1.0","typescript": "^5.0.4",- "vite": "^5.0.7",+ "vite": "^5.1.1","vite-plugin-html": "^3.2.0","vite-plugin-node-polyfills": "^0.17.0"}diff --git a/client/src/App.jsx b/client/src/App.jsxindex 10c9ab9b50..ce2ec3b6de 100644--- a/client/src/App.jsx+++ b/client/src/App.jsx@@ -6,7 +6,7 @@ import { HTML5Backend } from 'react-dnd-html5-backend';import { ReactQueryDevtools } from '@tanstack/react-query-devtools';import { QueryClient, QueryClientProvider, QueryCache } from '@tanstack/react-query';import { ScreenshotProvider, ThemeProvider, useApiErrorBoundary } from './hooks';-import { ToastProvider, AssistantsProvider } from './Providers';+import { ToastProvider } from './Providers';import Toast from './components/ui/Toast';import { router } from './routes';@@ -29,14 +29,12 @@ const App = () => {<ThemeProvider><RadixToast.Provider><ToastProvider>- <AssistantsProvider>- <DndProvider backend={HTML5Backend}>- <RouterProvider router={router} />- <ReactQueryDevtools initialIsOpen={false} position="top-right" />- <Toast />- <RadixToast.Viewport className="pointer-events-none fixed inset-0 z-[1000] mx-auto my-2 flex max-w-[560px] flex-col items-stretch justify-start md:pb-5" />- </DndProvider>- </AssistantsProvider>+ <DndProvider backend={HTML5Backend}>+ <RouterProvider router={router} />+ <ReactQueryDevtools initialIsOpen={false} position="top-right" />+ <Toast />+ <RadixToast.Viewport className="pointer-events-none fixed inset-0 z-[1000] mx-auto my-2 flex max-w-[560px] flex-col items-stretch justify-start md:pb-5" />+ </DndProvider></ToastProvider></RadixToast.Provider></ThemeProvider>diff --git a/client/src/Providers/AssistantsContext.tsx b/client/src/Providers/AssistantsContext.tsxindex 5156188799..10079083a2 100644--- a/client/src/Providers/AssistantsContext.tsx+++ b/client/src/Providers/AssistantsContext.tsx@@ -1,14 +1,10 @@+import { useForm, FormProvider } from 'react-hook-form';import { createContext, useContext } from 'react';+import { defaultAssistantFormValues } from 'librechat-data-provider';import type { UseFormReturn } from 'react-hook-form';-import type { CreationForm } from '~/common';-import useCreationForm from './useCreationForm';+import type { AssistantForm } from '~/common';-// type AssistantsContextType = {-// // open: boolean;-// // setOpen: Dispatch<SetStateAction<boolean>>;-// form: UseFormReturn<CreationForm>;-// };-type AssistantsContextType = UseFormReturn<CreationForm>;+type AssistantsContextType = UseFormReturn<AssistantForm>;export const AssistantsContext = createContext<AssistantsContextType>({} as AssistantsContextType);@@ -23,7 +19,9 @@ export function useAssistantsContext() {}export default function AssistantsProvider({ children }) {- const hookValues = useCreationForm();+ const methods = useForm<AssistantForm>({+ defaultValues: defaultAssistantFormValues,+ });- return <AssistantsContext.Provider value={hookValues}>{children}</AssistantsContext.Provider>;+ return <FormProvider {...methods}>{children}</FormProvider>;}diff --git a/client/src/Providers/AssistantsMapContext.tsx b/client/src/Providers/AssistantsMapContext.tsxnew file mode 100644index 0000000000..850e7d3129--- /dev/null+++ b/client/src/Providers/AssistantsMapContext.tsx@@ -0,0 +1,8 @@+import { createContext, useContext } from 'react';+import { useAssistantsMap } from '~/hooks/Assistants';+type AssistantsMapContextType = ReturnType<typeof useAssistantsMap>;++export const AssistantsMapContext = createContext<AssistantsMapContextType>(+ {} as AssistantsMapContextType,+);+export const useAssistantsMapContext = () => useContext(AssistantsMapContext);diff --git a/client/src/Providers/FileMapContext.tsx b/client/src/Providers/FileMapContext.tsxnew file mode 100644index 0000000000..2e189cacb7--- /dev/null+++ b/client/src/Providers/FileMapContext.tsx@@ -0,0 +1,6 @@+import { createContext, useContext } from 'react';+import { useFileMap } from '~/hooks/Files';+type FileMapContextType = ReturnType<typeof useFileMap>;++export const FileMapContext = createContext<FileMapContextType>({} as FileMapContextType);+export const useFileMapContext = () => useContext(FileMapContext);diff --git a/client/src/Providers/index.ts b/client/src/Providers/index.tsindex ab8b65d785..32e5c25dc4 100644--- a/client/src/Providers/index.ts+++ b/client/src/Providers/index.ts@@ -2,4 +2,6 @@ export { default as ToastProvider } from './ToastContext';export { default as AssistantsProvider } from './AssistantsContext';export * from './ChatContext';export * from './ToastContext';+export * from './FileMapContext';export * from './AssistantsContext';+export * from './AssistantsMapContext';diff --git a/client/src/Providers/useCreationForm.ts b/client/src/Providers/useCreationForm.tsdeleted file mode 100644index 6fadf4c947..0000000000--- a/client/src/Providers/useCreationForm.ts+++ /dev/null@@ -1,19 +0,0 @@-// import { useState } from 'react';-import { useForm } from 'react-hook-form';-import type { CreationForm } from '~/common';--export default function useViewPromptForm() {- return useForm<CreationForm>({- defaultValues: {- assistant: '',- id: '',- name: '',- description: '',- instructions: '',- model: 'gpt-3.5-turbo-1106',- function: false,- code_interpreter: false,- retrieval: false,- },- });-}diff --git a/client/src/common/assistants-types.ts b/client/src/common/assistants-types.tsindex 7dc6906e7a..c748de0de0 100644--- a/client/src/common/assistants-types.ts+++ b/client/src/common/assistants-types.ts@@ -1,19 +1,21 @@-import type { Option } from './types';import type { Assistant } from 'librechat-data-provider';+import type { Option, ExtendedFile } from './types';-export type TAssistantOption = string | (Option & Assistant);+export type TAssistantOption =+ | string+ | (Option & Assistant & { files?: Array<[string, ExtendedFile]> });export type Actions = {- function: boolean;code_interpreter: boolean;retrieval: boolean;};-export type CreationForm = {+export type AssistantForm = {assistant: TAssistantOption;id: string;name: string | null;description: string | null;instructions: string | null;model: string;+ functions: string[];} & Actions;diff --git a/client/src/common/types.ts b/client/src/common/types.tsindex 1ca169a0c1..babbe55791 100644--- a/client/src/common/types.ts+++ b/client/src/common/types.ts@@ -1,4 +1,6 @@import { FileSources } from 'librechat-data-provider';+import type { ColumnDef } from '@tanstack/react-table';+import type { SetterOrUpdater } from 'recoil';import type {TConversation,TMessage,@@ -6,10 +8,80 @@ import type {TLoginUser,TUser,EModelEndpoint,+ Action,+ AuthTypeEnum,+ AuthorizationTypeEnum,+ TokenExchangeMethodEnum,} from 'librechat-data-provider';import type { UseMutationResult } from '@tanstack/react-query';+import type { LucideIcon } from 'lucide-react';-export type TSetOption = (param: number | string) => (newValue: number | string | boolean) => void;+export type GenericSetter<T> = (value: T | ((currentValue: T) => T)) => void;++export type NavLink = {+ title: string;+ label?: string;+ icon: LucideIcon;+ Component?: React.ComponentType;+ variant?: 'default' | 'ghost';+ id: string;+};++export interface NavProps {+ isCollapsed: boolean;+ links: NavLink[];+ resize?: (size: number) => void;+ defaultActive?: string;+}++interface ColumnMeta {+ meta: {+ size: number | string;+ };+}++export enum Panel {+ builder = 'builder',+ actions = 'actions',+}++export type FileSetter =+ | SetterOrUpdater<Map<string, ExtendedFile>>+ | React.Dispatch<React.SetStateAction<Map<string, ExtendedFile>>>;++export type ActionAuthForm = {+ /* General */+ type: AuthTypeEnum;+ saved_auth_fields: boolean;+ /* API key */+ api_key: string; // not nested+ authorization_type: AuthorizationTypeEnum;+ custom_auth_header: string;+ /* OAuth */+ oauth_client_id: string; // not nested+ oauth_client_secret: string; // not nested+ authorization_url: string;+ client_url: string;+ scope: string;+ token_exchange_method: TokenExchangeMethodEnum;+};++export type AssistantPanelProps = {+ index?: number;+ action?: Action;+ actions?: Action[];+ assistant_id?: string;+ activePanel?: string;+ setAction: React.Dispatch<React.SetStateAction<Action | undefined>>;+ setCurrentAssistantId: React.Dispatch<React.SetStateAction<string | undefined>>;+ setActivePanel: React.Dispatch<React.SetStateAction<Panel>>;+};++export type AugmentedColumnDef<TData, TValue> = ColumnDef<TData, TValue> & ColumnMeta;++export type TSetOption = (+ param: number | string,+) => (newValue: number | string | boolean | Partial<TPreset>) => void;export type TSetExample = (i: number,type: string,@@ -72,7 +144,7 @@ export type TSetOptionsPayload = {setAgentOption: TSetOption;// getConversation: () => TConversation | TPreset | null;checkPluginSelection: (value: string) => boolean;- setTools: (newValue: string) => void;+ setTools: (newValue: string, remove?: boolean) => void;};export type TPresetItemProps = {@@ -136,7 +208,7 @@ export type TAdditionalProps = {setSiblingIdx: (value: number) => void;};-export type TMessageContent = TInitialProps & TAdditionalProps;+export type TMessageContentProps = TInitialProps & TAdditionalProps;export type TText = Pick<TInitialProps, 'text'>;export type TEditProps = Pick<TInitialProps, 'text' | 'isSubmitting'> &@@ -172,6 +244,11 @@ export type TDialogProps = {onOpenChange: (open: boolean) => void;};+export type TPluginStoreDialogProps = {+ isOpen: boolean;+ setIsOpen: (open: boolean) => void;+};+export type TResError = {response: { data: { message: string } };message: string;@@ -198,7 +275,7 @@ export type TAuthConfig = {test?: boolean;};-export type IconProps = Pick<TMessage, 'isCreatedByUser' | 'model' | 'error'> &+export type IconProps = Pick<TMessage, 'isCreatedByUser' | 'model'> &Pick<TConversation, 'chatGptLabel' | 'modelLabel' | 'jailbreak'> & {size?: number;button?: boolean;@@ -207,6 +284,8 @@ export type IconProps = Pick<TMessage, 'isCreatedByUser' | 'model' | 'error'> &className?: string;endpoint?: EModelEndpoint | string | null;endpointType?: EModelEndpoint | null;+ assistantName?: string;+ error?: boolean;};export type Option = Record<string, unknown> & {@@ -220,7 +299,7 @@ export type TOptionSettings = {};export interface ExtendedFile {- file: File;+ file?: File;file_id: string;temp_file_id?: string;type?: string;@@ -229,9 +308,10 @@ export interface ExtendedFile {width?: number;height?: number;size: number;- preview: string;+ preview?: string;progress: number;source?: FileSources;+ attached?: boolean;}export type ContextType = { navVisible: boolean; setNavVisible: (visible: boolean) => void };diff --git a/client/src/components/Chat/ChatView.tsx b/client/src/components/Chat/ChatView.tsxindex 30a7edc187..604c8f1e78 100644--- a/client/src/components/Chat/ChatView.tsx+++ b/client/src/components/Chat/ChatView.tsx@@ -2,16 +2,13 @@ import { memo } from 'react';import { useRecoilValue } from 'recoil';import { useParams } from 'react-router-dom';import { useGetMessagesByConvoId } from 'librechat-data-provider/react-query';-import { useChatHelpers, useSSE } from '~/hooks';-// import GenerationButtons from './Input/GenerationButtons';+import { ChatContext, useFileMapContext } from '~/Providers';import MessagesView from './Messages/MessagesView';-// import OptionsBar from './Input/OptionsBar';-import { useGetFiles } from '~/data-provider';-import { buildTree, mapFiles } from '~/utils';+import { useChatHelpers, useSSE } from '~/hooks';import { Spinner } from '~/components/svg';-import { ChatContext } from '~/Providers';import Presentation from './Presentation';import ChatForm from './Input/ChatForm';+import { buildTree } from '~/utils';import Landing from './Landing';import Header from './Header';import Footer from './Footer';@@ -22,9 +19,7 @@ function ChatView({ index = 0 }: { index?: number }) {const submissionAtIndex = useRecoilValue(store.submissionByIndex(0));useSSE(submissionAtIndex);- const { data: fileMap } = useGetFiles({- select: mapFiles,- });+ const fileMap = useFileMapContext();const { data: messagesTree = null, isLoading } = useGetMessagesByConvoId(conversationId ?? '', {select: (data) => {@@ -38,7 +33,7 @@ function ChatView({ index = 0 }: { index?: number }) {return (<ChatContext.Provider value={chatHelpers}>- <Presentation>+ <Presentation useSidePanel={true}>{isLoading && conversationId !== 'new' ? (<div className="flex h-screen items-center justify-center"><Spinner className="opacity-0" />@@ -48,8 +43,6 @@ function ChatView({ index = 0 }: { index?: number }) {) : (<Landing Header={<Header />} />)}- {/* <OptionsBar messagesTree={messagesTree} /> */}- {/* <GenerationButtons endpoint={chatHelpers.conversation.endpoint ?? ''} /> */}<div className="w-full border-t-0 pl-0 pt-2 dark:border-white/20 md:w-[calc(100%-.5rem)] md:border-t-0 md:border-transparent md:pl-0 md:pt-0 md:dark:border-transparent"><ChatForm index={index} /><Footer />diff --git a/client/src/components/Chat/CreationHeader.tsx b/client/src/components/Chat/CreationHeader.tsxdeleted file mode 100644index ad22e1aa81..0000000000--- a/client/src/components/Chat/CreationHeader.tsx+++ /dev/null@@ -1,113 +0,0 @@-// import { useState } from 'react';-import { Plus } from 'lucide-react';-import { useListAssistantsQuery } from 'librechat-data-provider/react-query';-import type { Assistant } from 'librechat-data-provider';-import type { UseFormReset, UseFormSetValue } from 'react-hook-form';-import type { CreationForm, Actions, Option } from '~/common';-import SelectDropDown from '~/components/ui/SelectDropDown';-import { cn } from '~/utils/';--const keys = new Set(['name', 'id', 'description', 'instructions', 'model']);--type TAssistantOption = string | (Option & Assistant);--export default function CreationHeader({- reset,- value,- onChange,- setValue,-}: {- reset: UseFormReset<CreationForm>;- value: TAssistantOption;- onChange: (value: TAssistantOption) => void;- setValue: UseFormSetValue<CreationForm>;-}) {- const assistants = useListAssistantsQuery(- {- order: 'asc',- },- {- select: (res) =>- res.data.map((assistant) => ({- ...assistant,- label: assistant?.name ?? '',- value: assistant.id,- })),- },- );-- const onSelect = (value: string) => {- const assistant = assistants.data?.find((assistant) => assistant.id === value);- if (!assistant) {- reset();- return;- }- onChange({- ...assistant,- label: assistant?.name ?? '',- value: assistant?.id ?? '',- });- const actions: Actions = {- function: false,- code_interpreter: false,- retrieval: false,- };- assistant?.tools- ?.map((tool) => tool.type)- .forEach((tool) => {- actions[tool] = true;- });-- Object.entries(assistant).forEach(([name, value]) => {- if (typeof value === 'number') {- return;- } else if (typeof value === 'object') {- return;- }- if (keys.has(name)) {- setValue(name as keyof CreationForm, value);- }- });-- Object.entries(actions).forEach(([name, value]) => setValue(name as keyof Actions, value));- };-- return (- <SelectDropDown- value={!value ? 'Create Assistant' : value}- setValue={onSelect}- availableValues={- assistants.data ?? [- {- label: 'Loading...',- value: '',- },- ]- }- iconSide="left"- showAbove={false}- showLabel={false}- emptyTitle={true}- optionsClass="hover:bg-gray-20/50"- optionsListClass="rounded-lg shadow-lg"- currentValueClass={cn(- 'text-md font-semibold text-gray-900 dark:text-gray-100',- value === '' ? 'text-gray-500' : '',- )}- className={cn(- 'rounded-none',- 'z-50 flex h-[40px] w-full flex-none items-center justify-center px-4 hover:cursor-pointer hover:border-green-500 focus:border-green-500',- )}- renderOption={() => (- <span className="flex items-center gap-1.5 truncate">- <span className="absolute inset-y-0 left-0 flex items-center pl-2 text-gray-800 dark:text-gray-100">- <Plus className="w-[16px]" />- </span>- <span className={cn('ml-4 flex h-6 items-center gap-1 text-gray-800 dark:text-gray-100')}>- {'Create Assistant'}- </span>- </span>- )}- />- );-}diff --git a/client/src/components/Chat/CreationPanel.tsx b/client/src/components/Chat/CreationPanel.tsxdeleted file mode 100644index 448487976a..0000000000--- a/client/src/components/Chat/CreationPanel.tsx+++ /dev/null@@ -1,229 +0,0 @@-import { Controller, useWatch } from 'react-hook-form';-import { Tools, EModelEndpoint } from 'librechat-data-provider';-import { useCreateAssistantMutation } from 'librechat-data-provider/react-query';-import type { CreationForm, Actions } from '~/common';-import type { Tool } from 'librechat-data-provider';-import { Separator } from '~/components/ui/Separator';-import { useAssistantsContext } from '~/Providers';-import { Switch } from '~/components/ui/Switch';-import CreationHeader from './CreationHeader';-import { useNewConvo } from '~/hooks';--export default function CreationPanel({ index = 0 }) {- const { switchToConversation } = useNewConvo(index);- const create = useCreateAssistantMutation();- const { control, handleSubmit, reset, setValue } = useAssistantsContext();-- const onSubmit = (data: CreationForm) => {- const tools: Tool[] = [];- console.log(data);- if (data.function) {- tools.push({ type: Tools.function });- }- if (data.code_interpreter) {- tools.push({ type: Tools.code_interpreter });- }- if (data.retrieval) {- tools.push({ type: Tools.retrieval });- }-- const {- name,- description,- instructions,- model,- // file_ids,- } = data;-- create.mutate({- name,- description,- instructions,- model,- tools,- });- };-- const assistant_id = useWatch({ control, name: 'id' });-- // Render function for the Switch component- const renderSwitch = (name: keyof Actions) => (- <Controller- name={name}- control={control}- render={({ field }) => (- <Switch- {...field}- checked={field.value}- onCheckedChange={field.onChange}- className="relative inline-flex h-6 w-11 items-center rounded-full data-[state=checked]:bg-green-500"- value={field?.value?.toString()}- />- )}- />- );-- return (- <form- onSubmit={handleSubmit(onSubmit)}- className="h-auto w-1/3 flex-shrink-0 overflow-x-hidden"- >- <Controller- name="assistant"- control={control}- render={({ field }) => (- <CreationHeader- reset={reset}- value={field.value}- onChange={field.onChange}- setValue={setValue}- />- )}- />- <div className="h-auto bg-white px-8 pb-8 pt-6">- {/* Name */}- <div className="mb-4">- <label className="mb-2 block text-xs font-bold text-gray-700" htmlFor="name">- Name- </label>- <Controller- name="name"- control={control}- render={({ field }) => (- <input- {...field}- value={field.value ?? ''}- {...{ max: 256 }}- className="focus:shadow-outline w-full appearance-none rounded border px-3 py-2 text-sm leading-tight text-gray-700 shadow focus:border-green-500 focus:outline-none focus:ring-0"- id="name"- type="text"- placeholder="Optional: The name of the assistant"- />- )}- />- <Controller- name="id"- control={control}- render={({ field }) => (- <p className="h-3 text-xs italic text-gray-600">{field.value ?? ''}</p>- )}- />- </div>- {/* Description */}- <div className="mb-4">- <label className="mb-2 block text-xs font-bold text-gray-700" htmlFor="description">- Description- </label>- <Controller- name="description"- control={control}- render={({ field }) => (- <input- {...field}- value={field.value ?? ''}- {...{ max: 512 }}- className="focus:shadow-outline w-full appearance-none rounded border px-3 py-2 text-sm leading-tight text-gray-700 shadow focus:border-green-500 focus:outline-none focus:ring-0"- id="description"- type="text"- placeholder="Optional: Describe your Assistant here"- />- )}- />- </div>-- {/* Instructions */}- <div className="mb-6">- <label className="mb-2 block text-xs font-bold text-gray-700" htmlFor="instructions">- Instructions- </label>- <Controller- name="instructions"- control={control}- render={({ field }) => (- <textarea- {...field}- value={field.value ?? ''}- {...{ max: 32768 }}- className="focus:shadow-outline w-full resize-none appearance-none rounded border px-3 py-2 text-sm leading-tight text-gray-700 shadow focus:border-green-500 focus:outline-none focus:ring-0"- id="instructions"- placeholder="The system instructions that the assistant uses"- rows={3}- />- )}- />- </div>-- {/* Model */}- <div className="mb-6">- <label className="mb-2 block text-xs font-bold text-gray-700" htmlFor="model">- Model- </label>- <Controller- name="model"- control={control}- render={({ field }) => (- <select- {...field}- className="focus:shadow-outline block w-full appearance-none rounded border border-gray-200 bg-white px-4 py-2 pr-8 text-sm leading-tight shadow hover:border-gray-100 focus:border-green-500 focus:outline-none focus:ring-0"- id="model"- >- <option value="gpt-3.5-turbo-1106">gpt-3.5-turbo-1106</option>- {/* Additional model options here */}- </select>- )}- />- </div>-- {/* Tools */}- <div className="mb-6">- <label className="mb-2 block text-xs font-bold text-gray-700">Tools</label>- <div className="flex flex-col space-y-4">- <Separator orientation="horizontal" className="bg-gray-100/50" />- <div className="flex items-center justify-between">- <span className="text-xs font-medium text-gray-700">Functions</span>- {renderSwitch('function')}- </div>- <Separator orientation="horizontal" className="bg-gray-100/50" />- <div className="flex items-center justify-between">- <span className="text-xs font-medium text-gray-700">Code Interpreter</span>- {renderSwitch('code_interpreter')}- </div>- <Separator orientation="horizontal" className="bg-gray-100/50" />- <div className="flex items-center justify-between">- <span className="text-xs font-medium text-gray-700">Retrieval</span>- {renderSwitch('retrieval')}- </div>- <Separator orientation="horizontal" className="bg-gray-100/50" />- </div>- </div>- <div className="flex items-center justify-end">- {/* Use Button */}- <button- className="focus:shadow-outline mx-2 rounded bg-green-500 px-4 py-2 font-semibold text-white hover:bg-green-400 focus:border-green-500 focus:outline-none focus:ring-0"- type="button"- onClick={(e) => {- e.preventDefault();- switchToConversation({- endpoint: EModelEndpoint.assistant,- conversationId: 'new',- assistant_id,- title: null,- createdAt: '',- updatedAt: '',- });- }}- >- Use- </button>- {/* Submit Button */}- <button- className="focus:shadow-outline rounded bg-green-500 px-4 py-2 font-semibold text-white hover:bg-green-400 focus:border-green-500 focus:outline-none focus:ring-0"- type="submit"- >- Save- </button>- </div>- </div>- </form>- );-}diff --git a/client/src/components/Chat/Input/ChatForm.tsx b/client/src/components/Chat/Input/ChatForm.tsxindex f52ff943e1..d2d6336dd9 100644--- a/client/src/components/Chat/Input/ChatForm.tsx+++ b/client/src/components/Chat/Input/ChatForm.tsx@@ -5,12 +5,14 @@ import { useRequiresKey } from '~/hooks';import AttachFile from './Files/AttachFile';import StopButton from './StopButton';import SendButton from './SendButton';-import Images from './Files/Images';+import FileRow from './Files/FileRow';import Textarea from './Textarea';import store from '~/store';export default function ChatForm({ index = 0 }) {const [text, setText] = useRecoilState(store.textByIndex(index));+ const [showStopButton, setShowStopButton] = useRecoilState(store.showStopButtonByIndex(index));+const {ask,files,@@ -20,8 +22,6 @@ export default function ChatForm({ index = 0 }) {handleStopGenerating,filesLoading,setFilesLoading,- showStopButton,- setShowStopButton,} = useChatContext();const submitMessage = () => {@@ -44,7 +44,16 @@ export default function ChatForm({ index = 0 }) {<div className="relative flex h-full flex-1 items-stretch md:flex-col"><div className="flex w-full items-center"><div className="[&:has(textarea:focus)]:border-token-border-xheavy border-token-border-heavy shadow-xs dark:shadow-xs relative flex w-full flex-grow flex-col overflow-hidden rounded-2xl border border-black/10 bg-white shadow-[0_0_0_2px_rgba(255,255,255,0.95)] dark:border-gray-600 dark:bg-gray-800 dark:text-white dark:shadow-[0_0_0_2px_rgba(52,53,65,0.95)] [&:has(textarea:focus)]:shadow-[0_2px_6px_rgba(0,0,0,.05)]">- <Images files={files} setFiles={setFiles} setFilesLoading={setFilesLoading} />+ <FileRow+ files={files}+ setFiles={setFiles}+ setFilesLoading={setFilesLoading}+ Wrapper={({ children }) => (+ <div className="mx-2 mt-2 flex flex-wrap gap-2 px-2.5 md:pl-0 md:pr-4">+ {children}+ </div>+ )}+ />{endpoint && (<Textareavalue={text}@@ -52,10 +61,15 @@ export default function ChatForm({ index = 0 }) {onChange={(e: ChangeEvent<HTMLTextAreaElement>) => setText(e.target.value)}setText={setText}submitMessage={submitMessage}- endpoint={endpoint}+ endpoint={_endpoint}+ endpointType={endpointType}/>)}- <AttachFile endpoint={endpoint ?? ''} disabled={requiresKey} />+ <AttachFile+ endpoint={_endpoint ?? ''}+ endpointType={endpointType}+ disabled={requiresKey}+ />{isSubmitting && showStopButton ? (<StopButton stop={handleStopGenerating} setShowStopButton={setShowStopButton} />) : (diff --git a/client/src/components/Chat/Input/Files/AttachFile.tsx b/client/src/components/Chat/Input/Files/AttachFile.tsxindex e796433033..221178e630 100644--- a/client/src/components/Chat/Input/Files/AttachFile.tsx+++ b/client/src/components/Chat/Input/Files/AttachFile.tsx@@ -1,17 +1,30 @@-import { EModelEndpoint, supportsFiles } from 'librechat-data-provider';+import {+ EModelEndpoint,+ supportsFiles,+ fileConfig as defaultFileConfig,+ mergeFileConfig,+} from 'librechat-data-provider';+import { useGetFileConfig } from '~/data-provider';import { AttachmentIcon } from '~/components/svg';import { FileUpload } from '~/components/ui';import { useFileHandling } from '~/hooks';export default function AttachFile({endpoint,+ endpointType,disabled = false,}: {endpoint: EModelEndpoint | '';+ endpointType?: EModelEndpoint;disabled?: boolean | null;}) {const { handleFileChange } = useFileHandling();- if (!supportsFiles[endpoint]) {+ const { data: fileConfig = defaultFileConfig } = useGetFileConfig({+ select: (data) => mergeFileConfig(data),+ });+ const endpointFileConfig = fileConfig.endpoints[endpoint ?? ''];++ if (!supportsFiles[endpointType ?? endpoint ?? ''] || endpointFileConfig?.disabled) {return null;}diff --git a/client/src/components/Chat/Input/Files/FileContainer.tsx b/client/src/components/Chat/Input/Files/FileContainer.tsxnew file mode 100644index 0000000000..3f7d629dca--- /dev/null+++ b/client/src/components/Chat/Input/Files/FileContainer.tsx@@ -0,0 +1,34 @@+import type { TFile } from 'librechat-data-provider';+import type { ExtendedFile } from '~/common';+import FilePreview from './FilePreview';+import RemoveFile from './RemoveFile';+import { getFileType } from '~/utils';++const FileContainer = ({+ file,+ onDelete,+}: {+ file: ExtendedFile | TFile;+ onDelete?: () => void;+}) => {+ const fileType = getFileType(file.type);++ return (+ <div className="group relative inline-block text-sm text-black/70 dark:text-white/90">+ <div className="relative overflow-hidden rounded-xl border border-gray-200 dark:border-gray-600">+ <div className="w-60 p-2 dark:bg-gray-600">+ <div className="flex flex-row items-center gap-2">+ <FilePreview file={file} fileType={fileType} className="relative" />+ <div className="overflow-hidden">+ <div className="truncate font-medium">{file.filename}</div>+ <div className="truncate text-gray-300">{fileType.title}</div>+ </div>+ </div>+ </div>+ </div>+ {onDelete && <RemoveFile onRemove={onDelete} />}+ </div>+ );+};++export default FileContainer;diff --git a/client/src/components/Chat/Input/Files/FilePreview.tsx b/client/src/components/Chat/Input/Files/FilePreview.tsxnew file mode 100644index 0000000000..3735d7c361--- /dev/null+++ b/client/src/components/Chat/Input/Files/FilePreview.tsx@@ -0,0 +1,44 @@+import type { TFile } from 'librechat-data-provider';+import type { ExtendedFile } from '~/common';+import FileIcon from '~/components/svg/Files/FileIcon';+import ProgressCircle from './ProgressCircle';+import { cn } from '~/utils';++const FilePreview = ({+ file,+ fileType,+ className = '',+}: {+ file?: ExtendedFile | TFile;+ fileType: {+ paths: React.FC;+ fill: string;+ title: string;+ };+ className?: string;+}) => {+ const radius = 55; // Radius of the SVG circle+ const circumference = 2 * Math.PI * radius;+ const progress = file?.['progress'] ?? 1;++ // Calculate the offset based on the loading progress+ const offset = circumference - progress * circumference;+ const circleCSSProperties = {+ transition: 'stroke-dashoffset 0.3s linear',+ };++ return (+ <div className={cn('h-10 w-10 shrink-0 overflow-hidden rounded-md', className)}>+ <FileIcon file={file} fileType={fileType} />+ {progress < 1 && (+ <ProgressCircle+ circumference={circumference}+ offset={offset}+ circleCSSProperties={circleCSSProperties}+ />+ )}+ </div>+ );+};++export default FilePreview;diff --git a/client/src/components/Chat/Input/Files/FileRow.tsx b/client/src/components/Chat/Input/Files/FileRow.tsxnew file mode 100644index 0000000000..192dad208b--- /dev/null+++ b/client/src/components/Chat/Input/Files/FileRow.tsx@@ -0,0 +1,100 @@+import { useEffect } from 'react';+import type { ExtendedFile } from '~/common';+import { useDeleteFilesMutation } from '~/data-provider';+import { useFileDeletion } from '~/hooks/Files';+import FileContainer from './FileContainer';+import Image from './Image';++export default function FileRow({+ files: _files,+ setFiles,+ setFilesLoading,+ assistant_id,+ fileFilter,+ Wrapper,+}: {+ files: Map<string, ExtendedFile>;+ setFiles: React.Dispatch<React.SetStateAction<Map<string, ExtendedFile>>>;+ setFilesLoading: React.Dispatch<React.SetStateAction<boolean>>;+ fileFilter?: (file: ExtendedFile) => boolean;+ assistant_id?: string;+ Wrapper?: React.FC<{ children: React.ReactNode }>;+}) {+ const files = Array.from(_files.values()).filter((file) =>+ fileFilter ? fileFilter(file) : true,+ );++ const { mutateAsync } = useDeleteFilesMutation({+ onMutate: async () => console.log('Deleting files: assistant_id', assistant_id),+ onSuccess: () => {+ console.log('Files deleted');+ },+ onError: (error) => {+ console.log('Error deleting files:', error);+ },+ });++ const { deleteFile } = useFileDeletion({ mutateAsync, assistant_id });++ useEffect(() => {+ if (!files) {+ return;+ }++ if (files.length === 0) {+ return;+ }++ if (files.some((file) => file.progress < 1)) {+ return;+ }++ if (files.every((file) => file.progress === 1)) {+ setFilesLoading(false);+ }+ // eslint-disable-next-line react-hooks/exhaustive-deps+ }, [files]);++ if (files.length === 0) {+ return null;+ }++ const renderFiles = () => {+ return (+ <>+ {files+ .reduce(+ (acc, current) => {+ if (!acc.map.has(current.file_id)) {+ acc.map.set(current.file_id, true);+ acc.uniqueFiles.push(current);+ }+ return acc;+ },+ { map: new Map(), uniqueFiles: [] as ExtendedFile[] },+ )+ .uniqueFiles.map((file: ExtendedFile, index: number) => {+ const handleDelete = () => deleteFile({ file, setFiles });+ if (file.type?.startsWith('image')) {+ return (+ <Image+ key={index}+ url={file.preview}+ onDelete={handleDelete}+ progress={file.progress}+ />+ );+ }++ return <FileContainer key={index} file={file} onDelete={handleDelete} />;+ })}+ </>+ );+ };++ if (Wrapper) {+ return <Wrapper>{renderFiles()}</Wrapper>;+ }++ return renderFiles();+}diff --git a/client/src/components/Chat/Input/Files/FilesView.tsx b/client/src/components/Chat/Input/Files/FilesView.tsxnew file mode 100644index 0000000000..1943b288da--- /dev/null+++ b/client/src/components/Chat/Input/Files/FilesView.tsx@@ -0,0 +1,40 @@+import { FileSources, FileContext } from 'librechat-data-provider';+import type { TFile } from 'librechat-data-provider';+import { Dialog, DialogContent, DialogHeader, DialogTitle } from '~/components/ui';+import { useGetFiles } from '~/data-provider';+import { DataTable, columns } from './Table';+import { cn } from '~/utils/';++export default function Files({ open, onOpenChange }) {+ const { data: files = [] } = useGetFiles<TFile[]>({+ select: (files) =>+ files.map((file) => {+ if (file.source === FileSources.local || file.source === FileSources.openai) {+ file.context = file.context ?? FileContext.unknown;+ return file;+ } else {+ return {+ ...file,+ context: file.context ?? FileContext.unknown,+ source: FileSources.local,+ };+ }+ }),+ });++ return (+ <Dialog open={open} onOpenChange={onOpenChange}>+ <DialogContent className={cn('overflow-x-auto shadow-2xl dark:bg-gray-900 dark:text-white')}>+ <DialogHeader>+ <DialogTitle className="text-lg font-medium leading-6 text-gray-900 dark:text-gray-200">+ My Files+ </DialogTitle>+ </DialogHeader>+ <div className="overflow-x-auto p-0 sm:p-6 sm:pt-4">+ <DataTable columns={columns} data={files} />+ <div className="mt-5 sm:mt-4" />+ </div>+ </DialogContent>+ </Dialog>+ );+}diff --git a/client/src/components/Chat/Input/Files/Image.tsx b/client/src/components/Chat/Input/Files/Image.tsxindex fcf1dfe8c9..1cd13c8332 100644--- a/client/src/components/Chat/Input/Files/Image.tsx+++ b/client/src/components/Chat/Input/Files/Image.tsx@@ -1,9 +1,5 @@-type styleProps = {- backgroundImage?: string;- backgroundSize?: string;- backgroundPosition?: string;- backgroundRepeat?: string;-};+import ImagePreview from './ImagePreview';+import RemoveFile from './RemoveFile';const Image = ({imageBase64,@@ -16,96 +12,12 @@ const Image = ({onDelete: () => void;progress: number; // between 0 and 1}) => {- let style: styleProps = {- backgroundSize: 'cover',- backgroundPosition: 'center',- backgroundRepeat: 'no-repeat',- };- if (imageBase64) {- style = {- ...style,- backgroundImage: `url(${imageBase64})`,- };- } else if (url) {- style = {- ...style,- backgroundImage: `url(${url})`,- };- }-- if (!style.backgroundImage) {- return null;- }-- const radius = 55; // Radius of the SVG circle- const circumference = 2 * Math.PI * radius;-- // Calculate the offset based on the loading progress- const offset = circumference - progress * circumference;- const circleCSSProperties = {- transition: 'stroke-dashoffset 0.3s linear',- };-return (<div className="group relative inline-block text-sm text-black/70 dark:text-white/90"><div className="relative overflow-hidden rounded-xl border border-gray-200 dark:border-gray-600">- <div className="h-14 w-14">- <button- type="button"- aria-haspopup="dialog"- aria-expanded="false"- className="h-full w-full"- style={style}- />- {progress < 1 && (- <div className="absolute inset-0 flex items-center justify-center bg-black/5 text-white">- <svg width="120" height="120" viewBox="0 0 120 120" className="h-6 w-6">- <circle- className="origin-[50%_50%] -rotate-90 stroke-gray-400"- strokeWidth="10"- fill="transparent"- r="55"- cx="60"- cy="60"- />- <circle- className="origin-[50%_50%] -rotate-90 transition-[stroke-dashoffset]"- stroke="currentColor"- strokeWidth="10"- strokeDasharray={`${circumference} ${circumference}`}- strokeDashoffset={offset}- fill="transparent"- r="55"- cx="60"- cy="60"- style={circleCSSProperties}- />- </svg>- </div>- )}- </div>+ <ImagePreview imageBase64={imageBase64} url={url} progress={progress} /></div>- <button- type="button"- className="absolute right-1 top-1 -translate-y-1/2 translate-x-1/2 rounded-full border border-white bg-gray-500 p-0.5 text-white transition-colors hover:bg-black hover:opacity-100 group-hover:opacity-100 md:opacity-0"- onClick={onDelete}- >- <span>- <svg- stroke="currentColor"- fill="none"- strokeWidth="2"- viewBox="0 0 24 24"- strokeLinecap="round"- strokeLinejoin="round"- className="icon-sm"- xmlns="http://www.w3.org/2000/svg"- >- <line x1="18" y1="6" x2="6" y2="18"></line>- <line x1="6" y1="6" x2="18" y2="18"></line>- </svg>- </span>- </button>+ <RemoveFile onRemove={onDelete} /></div>);};diff --git a/client/src/components/Chat/Input/Files/ImagePreview.tsx b/client/src/components/Chat/Input/Files/ImagePreview.tsxnew file mode 100644index 0000000000..4794812358--- /dev/null+++ b/client/src/components/Chat/Input/Files/ImagePreview.tsx@@ -0,0 +1,72 @@+import ProgressCircle from './ProgressCircle';+import { cn } from '~/utils';++type styleProps = {+ backgroundImage?: string;+ backgroundSize?: string;+ backgroundPosition?: string;+ backgroundRepeat?: string;+};++const ImagePreview = ({+ imageBase64,+ url,+ progress = 1,+ className = '',+}: {+ imageBase64?: string;+ url?: string;+ progress?: number; // between 0 and 1+ className?: string;+}) => {+ let style: styleProps = {+ backgroundSize: 'cover',+ backgroundPosition: 'center',+ backgroundRepeat: 'no-repeat',+ };+ if (imageBase64) {+ style = {+ ...style,+ backgroundImage: `url(${imageBase64})`,+ };+ } else if (url) {+ style = {+ ...style,+ backgroundImage: `url(${url})`,+ };+ }++ if (!style.backgroundImage) {+ return null;+ }++ const radius = 55; // Radius of the SVG circle+ const circumference = 2 * Math.PI * radius;++ // Calculate the offset based on the loading progress+ const offset = circumference - progress * circumference;+ const circleCSSProperties = {+ transition: 'stroke-dashoffset 0.3s linear',+ };++ return (+ <div className={cn('h-14 w-14', className)}>+ <button+ type="button"+ aria-haspopup="dialog"+ aria-expanded="false"+ className="h-full w-full"+ style={style}+ />+ {progress < 1 && (+ <ProgressCircle+ circumference={circumference}+ offset={offset}+ circleCSSProperties={circleCSSProperties}+ />+ )}+ </div>+ );+};++export default ImagePreview;diff --git a/client/src/components/Chat/Input/Files/Images.tsx b/client/src/components/Chat/Input/Files/Images.tsxdeleted file mode 100644index 903bd96c71..0000000000--- a/client/src/components/Chat/Input/Files/Images.tsx+++ /dev/null@@ -1,116 +0,0 @@-import debounce from 'lodash/debounce';-import { useState, useEffect, useCallback } from 'react';-import { FileSources } from 'librechat-data-provider';-import type { BatchFile } from 'librechat-data-provider';-import { useDeleteFilesMutation } from '~/data-provider';-import { useSetFilesToDelete } from '~/hooks';-import { ExtendedFile } from '~/common';-import Image from './Image';--export default function Images({- files: _files,- setFiles,- setFilesLoading,-}: {- files: Map<string, ExtendedFile>;- setFiles: React.Dispatch<React.SetStateAction<Map<string, ExtendedFile>>>;- setFilesLoading: React.Dispatch<React.SetStateAction<boolean>>;-}) {- const setFilesToDelete = useSetFilesToDelete();- // eslint-disable-next-line @typescript-eslint/no-unused-vars- const [_batch, setFileDeleteBatch] = useState<BatchFile[]>([]);- const files = Array.from(_files.values());-- useEffect(() => {- if (!files) {- return;- }-- if (files.length === 0) {- return;- }-- if (files.some((file) => file.progress < 1)) {- return;- }-- if (files.every((file) => file.progress === 1)) {- setFilesLoading(false);- }- // eslint-disable-next-line react-hooks/exhaustive-deps- }, [files]);-- const { mutateAsync } = useDeleteFilesMutation({- onSuccess: () => {- console.log('Files deleted');- },- onError: (error) => {- console.log('Error deleting files:', error);- },- });-- const executeBatchDelete = useCallback(- (filesToDelete: BatchFile[]) => {- console.log('Deleting files:', filesToDelete);- mutateAsync({ files: filesToDelete });- setFileDeleteBatch([]);- },- [mutateAsync],- );-- // eslint-disable-next-line react-hooks/exhaustive-deps- const debouncedDelete = useCallback(debounce(executeBatchDelete, 1000), []);-- useEffect(() => {- // Cleanup function for debouncedDelete when component unmounts or before re-render- return () => debouncedDelete.cancel();- }, [debouncedDelete]);-- if (files.length === 0) {- return null;- }-- const deleteFile = (_file: ExtendedFile) => {- const {- file_id,- progress,- temp_file_id = '',- filepath = '',- source = FileSources.local,- } = _file;- if (progress < 1) {- return;- }- const file: BatchFile = {- file_id,- filepath,- source,- };-- setFiles((currentFiles) => {- const updatedFiles = new Map(currentFiles);- updatedFiles.delete(file_id);- updatedFiles.delete(temp_file_id);- const files = Object.fromEntries(updatedFiles);- setFilesToDelete(files);- return updatedFiles;- });-- setFileDeleteBatch((prevBatch) => {- const newBatch = [...prevBatch, file];- debouncedDelete(newBatch);- return newBatch;- });- };-- return (- <div className="mx-2 mt-2 flex flex-wrap gap-2 px-2.5 md:pl-0 md:pr-4">- {files.map((file: ExtendedFile, index: number) => {- const handleDelete = () => deleteFile(file);- return (- <Image key={index} url={file.preview} onDelete={handleDelete} progress={file.progress} />- );- })}- </div>- );-}diff --git a/client/src/components/Chat/Input/Files/ProgressCircle.tsx b/client/src/components/Chat/Input/Files/ProgressCircle.tsxnew file mode 100644index 0000000000..de7d4a6db8--- /dev/null+++ b/client/src/components/Chat/Input/Files/ProgressCircle.tsx@@ -0,0 +1,36 @@+export default function ProgressCircle({+ circumference,+ offset,+ circleCSSProperties,+}: {+ circumference: number;+ offset: number;+ circleCSSProperties: React.CSSProperties;+}) {+ return (+ <div className="absolute inset-0 flex items-center justify-center bg-black/5 text-white">+ <svg width="120" height="120" viewBox="0 0 120 120" className="h-6 w-6">+ <circle+ className="origin-[50%_50%] -rotate-90 stroke-gray-400"+ strokeWidth="10"+ fill="transparent"+ r="55"+ cx="60"+ cy="60"+ />+ <circle+ className="origin-[50%_50%] -rotate-90 transition-[stroke-dashoffset]"+ stroke="currentColor"+ strokeWidth="10"+ strokeDasharray={`${circumference} ${circumference}`}+ strokeDashoffset={offset}+ fill="transparent"+ r="55"+ cx="60"+ cy="60"+ style={circleCSSProperties}+ />+ </svg>+ </div>+ );+}diff --git a/client/src/components/Chat/Input/Files/RemoveFile.tsx b/client/src/components/Chat/Input/Files/RemoveFile.tsxnew file mode 100644index 0000000000..e9d0a6b768--- /dev/null+++ b/client/src/components/Chat/Input/Files/RemoveFile.tsx@@ -0,0 +1,25 @@+export default function RemoveFile({ onRemove }: { onRemove: () => void }) {+ return (+ <button+ type="button"+ className="absolute right-1 top-1 -translate-y-1/2 translate-x-1/2 rounded-full border border-white bg-gray-500 p-0.5 text-white transition-colors hover:bg-black hover:opacity-100 group-hover:opacity-100 md:opacity-0"+ onClick={onRemove}+ >+ <span>+ <svg+ stroke="currentColor"+ fill="none"+ strokeWidth="2"+ viewBox="0 0 24 24"+ strokeLinecap="round"+ strokeLinejoin="round"+ className="icon-sm"+ xmlns="http://www.w3.org/2000/svg"+ >+ <line x1="18" y1="6" x2="6" y2="18" />+ <line x1="6" y1="6" x2="18" y2="18" />+ </svg>+ </span>+ </button>+ );+}diff --git a/client/src/components/Chat/Input/Files/Table/Columns.tsx b/client/src/components/Chat/Input/Files/Table/Columns.tsxnew file mode 100644index 0000000000..09f02eaf49--- /dev/null+++ b/client/src/components/Chat/Input/Files/Table/Columns.tsx@@ -0,0 +1,187 @@+import { ArrowUpDown, Database } from 'lucide-react';+import { FileSources, FileContext } from 'librechat-data-provider';+import type { ColumnDef } from '@tanstack/react-table';+import type { TFile } from 'librechat-data-provider';+import ImagePreview from '~/components/Chat/Input/Files/ImagePreview';+import FilePreview from '~/components/Chat/Input/Files/FilePreview';+import { SortFilterHeader } from './SortFilterHeader';+import { OpenAIMinimalIcon } from '~/components/svg';+import { Button, Checkbox } from '~/components/ui';+import { formatDate, getFileType } from '~/utils';++const contextMap = {+ [FileContext.avatar]: 'Avatar',+ [FileContext.unknown]: 'Unknown',+ [FileContext.assistants]: 'Assistants',+ [FileContext.image_generation]: 'Image Gen',+ [FileContext.assistants_output]: 'Assistant Output',+ [FileContext.message_attachment]: 'Attachment',+};++export const columns: ColumnDef<TFile>[] = [+ {+ id: 'select',+ header: ({ table }) => (+ <Checkbox+ checked={+ table.getIsAllPageRowsSelected() || (table.getIsSomePageRowsSelected() && 'indeterminate')+ }+ onCheckedChange={(value) => table.toggleAllPageRowsSelected(!!value)}+ aria-label="Select all"+ className="flex"+ />+ ),+ cell: ({ row }) => (+ <Checkbox+ checked={row.getIsSelected()}+ onCheckedChange={(value) => row.toggleSelected(!!value)}+ aria-label="Select row"+ className="flex"+ />+ ),+ enableSorting: false,+ enableHiding: false,+ },+ {+ meta: {+ size: '150px',+ },+ accessorKey: 'filename',+ header: ({ column }) => {+ return (+ <Button+ variant="ghost"+ className="px-2 py-0 text-xs sm:px-2 sm:py-2 sm:text-sm"+ onClick={() => column.toggleSorting(column.getIsSorted() === 'asc')}+ >+ Name+ <ArrowUpDown className="ml-2 h-3 w-4 sm:h-4 sm:w-4" />+ </Button>+ );+ },+ cell: ({ row }) => {+ const file = row.original;+ if (file.type?.startsWith('image')) {+ return (+ <div className="flex gap-2 ">+ <ImagePreview+ url={file.filepath}+ className="h-10 w-10 shrink-0 overflow-hidden rounded-md"+ />+ <span className="self-center truncate ">{file.filename}</span>+ </div>+ );+ }++ const fileType = getFileType(file.type);+ return (+ <div className="flex gap-2">+ {fileType && <FilePreview fileType={fileType} />}+ <span className="self-center truncate">{file.filename}</span>+ </div>+ );+ },+ },+ {+ accessorKey: 'updatedAt',+ header: ({ column }) => {+ return (+ <Button+ variant="ghost"+ onClick={() => column.toggleSorting(column.getIsSorted() === 'asc')}+ className="px-2 py-0 text-xs sm:px-2 sm:py-2 sm:text-sm"+ >+ Date+ <ArrowUpDown className="ml-2 h-3 w-4 sm:h-4 sm:w-4" />+ </Button>+ );+ },+ cell: ({ row }) => formatDate(row.original.updatedAt),+ },+ {+ accessorKey: 'source',+ header: ({ column }) => {+ return (+ <SortFilterHeader+ column={column}+ title="Storage"+ filters={{+ Storage: Object.values(FileSources).filter(+ (value) => value === FileSources.local || value === FileSources.openai,+ ),+ }}+ valueMap={{+ [FileSources.openai]: 'OpenAI',+ [FileSources.local]: 'Host',+ }}+ />+ );+ },+ cell: ({ row }) => {+ const { source } = row.original;+ if (source === FileSources.openai) {+ return (+ <div className="flex flex-wrap items-center gap-2">+ <OpenAIMinimalIcon className="icon-sm text-green-600/50" />+ {'OpenAI'}+ </div>+ );+ }+ return (+ <div className="flex flex-wrap items-center gap-2">+ <Database className="icon-sm text-cyan-700" />+ {'Host'}+ </div>+ );+ },+ },+ {+ accessorKey: 'context',+ header: ({ column }) => {+ return (+ <SortFilterHeader+ column={column}+ title="Context"+ filters={{+ Context: Object.values(FileContext).filter(+ (value) => value === FileContext[value ?? ''],+ ),+ }}+ valueMap={contextMap}+ />+ );+ },+ cell: ({ row }) => {+ const { context } = row.original;+ return (+ <div className="flex flex-wrap items-center gap-2">+ {contextMap[context ?? FileContext.unknown] ?? 'Unknown'}+ </div>+ );+ },+ },+ {+ accessorKey: 'bytes',+ header: ({ column }) => {+ return (+ <Button+ variant="ghost"+ className="px-2 py-0 text-xs sm:px-2 sm:py-2 sm:text-sm"+ onClick={() => column.toggleSorting(column.getIsSorted() === 'asc')}+ >+ Size+ <ArrowUpDown className="ml-2 h-3 w-4 sm:h-4 sm:w-4" />+ </Button>+ );+ },+ cell: ({ row }) => {+ const suffix = ' MB';+ const value = Number((Number(row.original.bytes) / 1024 / 1024).toFixed(2));+ if (value < 0.01) {+ return '< 0.01 MB';+ }++ return `${value}${suffix}`;+ },+ },+];diff --git a/client/src/components/Chat/Input/Files/Table/DataTable.tsx b/client/src/components/Chat/Input/Files/Table/DataTable.tsxnew file mode 100644index 0000000000..4185d1380f--- /dev/null+++ b/client/src/components/Chat/Input/Files/Table/DataTable.tsx@@ -0,0 +1,224 @@+import * as React from 'react';+import { ListFilter } from 'lucide-react';+import {+ flexRender,+ getCoreRowModel,+ getFilteredRowModel,+ getPaginationRowModel,+ getSortedRowModel,+ useReactTable,+} from '@tanstack/react-table';+import type {+ ColumnDef,+ SortingState,+ VisibilityState,+ ColumnFiltersState,+} from '@tanstack/react-table';+import type { AugmentedColumnDef } from '~/common';+import type { TFile } from 'librechat-data-provider';+import {+ Button,+ Input,+ Table,+ TableBody,+ TableCell,+ TableHead,+ TableHeader,+ TableRow,+ DropdownMenu,+ DropdownMenuCheckboxItem,+ DropdownMenuContent,+ DropdownMenuTrigger,+} from '~/components/ui';+import { useDeleteFilesFromTable } from '~/hooks/Files';+import { NewTrashIcon, Spinner } from '~/components/svg';++interface DataTableProps<TData, TValue> {+ columns: ColumnDef<TData, TValue>[];+ data: TData[];+}++type Style = { width?: number | string; maxWidth?: number | string; minWidth?: number | string };++export default function DataTable<TData, TValue>({ columns, data }: DataTableProps<TData, TValue>) {+ const [isDeleting, setIsDeleting] = React.useState(false);+ const [rowSelection, setRowSelection] = React.useState({});+ const [sorting, setSorting] = React.useState<SortingState>([]);+ const [columnFilters, setColumnFilters] = React.useState<ColumnFiltersState>([]);+ const [columnVisibility, setColumnVisibility] = React.useState<VisibilityState>({});+ const { deleteFiles } = useDeleteFilesFromTable(() => setIsDeleting(false));++ const table = useReactTable({+ data,+ columns,+ onSortingChange: setSorting,+ getCoreRowModel: getCoreRowModel(),+ getSortedRowModel: getSortedRowModel(),+ onColumnFiltersChange: setColumnFilters,+ getFilteredRowModel: getFilteredRowModel(),+ onColumnVisibilityChange: setColumnVisibility,+ getPaginationRowModel: getPaginationRowModel(),+ onRowSelectionChange: setRowSelection,+ state: {+ sorting,+ columnFilters,+ columnVisibility,+ rowSelection,+ },+ });++ return (+ <>+ <div className="flex items-center gap-4 py-4">+ <Button+ variant="ghost"+ onClick={() => {+ setIsDeleting(true);+ const filesToDelete = table+ .getFilteredSelectedRowModel()+ .rows.map((row) => row.original);+ deleteFiles({ files: filesToDelete as TFile[] });+ setRowSelection({});+ }}+ className="gap-2"+ disabled={!table.getFilteredSelectedRowModel().rows.length || isDeleting}+ >+ {isDeleting ? (+ <Spinner className="ml-2 h-4 w-4" />+ ) : (+ <NewTrashIcon className="ml-2 h-4 w-4 text-red-400" />+ )}+ Delete+ </Button>+ <Input+ placeholder="Filter files..."+ value={(table.getColumn('filename')?.getFilterValue() as string) ?? ''}+ onChange={(event) => table.getColumn('filename')?.setFilterValue(event.target.value)}+ className="max-w-sm dark:border-gray-700"+ />+ <DropdownMenu>+ <DropdownMenuTrigger asChild>+ <Button variant="outline" className="ml-auto">+ <ListFilter className="h-4 w-4" />+ </Button>+ </DropdownMenuTrigger>+ {/* Filter Menu */}+ <DropdownMenuContent align="end" className="z-[1001] dark:border-gray-700 dark:bg-black">+ {table+ .getAllColumns()+ .filter((column) => column.getCanHide())+ .map((column) => {+ return (+ <DropdownMenuCheckboxItem+ key={column.id}+ className="cursor-pointer capitalize dark:text-white dark:hover:bg-gray-800"+ checked={column.getIsVisible()}+ onCheckedChange={(value) => column.toggleVisibility(!!value)}+ >+ {column.id}+ </DropdownMenuCheckboxItem>+ );+ })}+ </DropdownMenuContent>+ </DropdownMenu>+ </div>+ <div className="relative max-h-[25rem] min-h-0 overflow-y-auto rounded-md border border-black/10 pb-4 dark:border-white/10 sm:min-h-[28rem]">+ <Table className="w-full min-w-[600px] border-separate border-spacing-0">+ <TableHeader>+ {table.getHeaderGroups().map((headerGroup) => (+ <TableRow key={headerGroup.id}>+ {headerGroup.headers.map((header, index) => {+ const style: Style = { maxWidth: '32px', minWidth: '125px' };+ if (header.id === 'filename') {+ style.maxWidth = '50%';+ style.width = '50%';+ style.minWidth = '300px';+ }++ if (index === 0 && header.id === 'select') {+ style.width = '25px';+ style.maxWidth = '25px';+ style.minWidth = '35px';+ }+ return (+ <TableHead+ key={header.id}+ className="align-start sticky top-0 rounded-t border-b border-black/10 bg-white px-2 py-1 text-left font-medium text-gray-700 dark:border-white/10 dark:bg-gray-900 dark:text-gray-100 sm:px-4 sm:py-2"+ style={style}+ >+ {header.isPlaceholder+ ? null+ : flexRender(header.column.columnDef.header, header.getContext())}+ </TableHead>+ );+ })}+ </TableRow>+ ))}+ </TableHeader>+ <TableBody>+ {table.getRowModel().rows?.length ? (+ table.getRowModel().rows.map((row) => (+ <TableRow+ key={row.id}+ data-state={row.getIsSelected() && 'selected'}+ className="border-b border-black/10 text-left text-gray-600 dark:border-white/10 dark:text-gray-300 [tr:last-child_&]:border-b-0"+ >+ {row.getVisibleCells().map((cell, index) => {+ const maxWidth =+ (cell.column.columnDef as AugmentedColumnDef<TData, TValue>)?.meta?.size ??+ 'auto';++ const style: Style = {};+ if (cell.column.id === 'filename') {+ style.maxWidth = maxWidth;+ } else if (index === 0) {+ style.maxWidth = '20px';+ }++ return (+ <TableCell+ key={cell.id}+ className="align-start overflow-x-auto px-2 py-1 text-xs sm:px-4 sm:py-2 sm:text-sm [tr[data-disabled=true]_&]:opacity-50"+ style={style}+ >+ {flexRender(cell.column.columnDef.cell, cell.getContext())}+ </TableCell>+ );+ })}+ </TableRow>+ ))+ ) : (+ <TableRow>+ <TableCell colSpan={columns.length} className="h-24 text-center">+ No results.+ </TableCell>+ </TableRow>+ )}+ </TableBody>+ </Table>+ </div>+ <div className="ml-4 mr-4 mt-4 flex h-auto items-center justify-end space-x-2 py-4 sm:ml-0 sm:mr-0 sm:h-0">+ <div className="text-muted-foreground ml-2 flex-1 text-sm">+ {table.getFilteredSelectedRowModel().rows.length} of{' '}+ {table.getFilteredRowModel().rows.length} file(s) selected.+ </div>+ <Button+ variant="outline"+ size="sm"+ onClick={() => table.previousPage()}+ disabled={!table.getCanPreviousPage()}+ >+ Previous+ </Button>+ <Button+ variant="outline"+ size="sm"+ onClick={() => table.nextPage()}+ disabled={!table.getCanNextPage()}+ >+ Next+ </Button>+ </div>+ </>+ );+}diff --git a/client/src/components/Chat/Input/Files/Table/SortFilterHeader.tsx b/client/src/components/Chat/Input/Files/Table/SortFilterHeader.tsxnew file mode 100644index 0000000000..2aecbc952d--- /dev/null+++ b/client/src/components/Chat/Input/Files/Table/SortFilterHeader.tsx@@ -0,0 +1,106 @@+import { Column } from '@tanstack/react-table';+import { ListFilter, FilterX } from 'lucide-react';+import { ArrowDownIcon, ArrowUpIcon, CaretSortIcon } from '@radix-ui/react-icons';+import {+ DropdownMenu,+ DropdownMenuContent,+ DropdownMenuItem,+ DropdownMenuSeparator,+ DropdownMenuTrigger,+} from '~/components/ui/DropdownMenu';+import { Button } from '~/components/ui/Button';+import { cn } from '~/utils';++interface SortFilterHeaderProps<TData, TValue> extends React.HTMLAttributes<HTMLDivElement> {+ title: string;+ column: Column<TData, TValue>;+ filters?: Record<string, string[] | number[]>;+ valueMap?: Record<string, string>;+}++export function SortFilterHeader<TData, TValue>({+ column,+ title,+ className = '',+ filters,+ valueMap,+}: SortFilterHeaderProps<TData, TValue>) {+ if (!column.getCanSort()) {+ return <div className={cn(className)}>{title}</div>;+ }++ return (+ <div className={cn('flex items-center space-x-2', className)}>+ <DropdownMenu>+ <DropdownMenuTrigger asChild>+ <Button+ variant="ghost"+ className="px-2 py-0 text-xs sm:px-2 sm:py-2 sm:text-sm"+ // className="data-[state=open]:bg-accent -ml-3 h-8"+ >+ <span>{title}</span>+ {column.getIsFiltered() ? (+ <ListFilter className="icon-sm text-muted-foreground/70 ml-2" />+ ) : (+ <ListFilter className="icon-sm ml-2 opacity-30" />+ )}+ {column.getIsSorted() === 'desc' ? (+ <ArrowDownIcon className="icon-sm ml-2" />+ ) : column.getIsSorted() === 'asc' ? (+ <ArrowUpIcon className="icon-sm ml-2" />+ ) : (+ <CaretSortIcon className="icon-sm ml-2" />+ )}+ </Button>+ </DropdownMenuTrigger>+ <DropdownMenuContent align="start" className="z-[1001] dark:border-gray-700 dark:bg-black">+ <DropdownMenuItem+ onClick={() => column.toggleSorting(false)}+ className="cursor-pointer dark:text-white dark:hover:bg-gray-800"+ >+ <ArrowUpIcon className="text-muted-foreground/70 mr-2 h-3.5 w-3.5" />+ Asc+ </DropdownMenuItem>+ <DropdownMenuItem+ onClick={() => column.toggleSorting(true)}+ className="cursor-pointer dark:text-white dark:hover:bg-gray-800"+ >+ <ArrowDownIcon className="text-muted-foreground/70 mr-2 h-3.5 w-3.5" />+ Desc+ </DropdownMenuItem>+ <DropdownMenuSeparator />+ {filters &&+ Object.entries(filters).map(([key, values]) =>+ values.map((value: string | number) => (+ <DropdownMenuItem+ className="cursor-pointer dark:text-white dark:hover:bg-gray-800"+ key={`${key}-${value}`}+ onClick={() => {+ column.setFilterValue(value);+ }}+ >+ <ListFilter className="text-muted-foreground/70 mr-2 h-3.5 w-3.5" />+ {valueMap?.[value] ?? value}+ </DropdownMenuItem>+ )),+ )}+ {filters && (+ <DropdownMenuItem+ className={+ column.getIsFiltered()+ ? 'cursor-pointer dark:text-white dark:hover:bg-gray-800'+ : 'pointer-events-none opacity-30'+ }+ onClick={() => {+ column.setFilterValue(undefined);+ }}+ >+ <FilterX className="text-muted-foreground/70 mr-2 h-3.5 w-3.5" />+ Show All+ </DropdownMenuItem>+ )}+ </DropdownMenuContent>+ </DropdownMenu>+ </div>+ );+}diff --git a/client/src/components/Chat/Input/Files/Table/TemplateTable.tsx b/client/src/components/Chat/Input/Files/Table/TemplateTable.tsxnew file mode 100644index 0000000000..dc288c73a9--- /dev/null+++ b/client/src/components/Chat/Input/Files/Table/TemplateTable.tsx@@ -0,0 +1,88 @@+import { DotsIcon, TrashIcon } from '~/components/svg';++export default function Template() {+ return (+ <div className="max-h-[28rem] overflow-y-auto rounded-md border border-black/10 dark:border-white/10">+ <table className="w-full border-separate border-spacing-0">+ <thead>+ <tr>+ <th className="sticky top-0 rounded-t border-b border-black/10 bg-white px-4 py-2 text-left font-medium text-gray-700 dark:border-white/10 dark:bg-gray-900 dark:text-gray-100">+ Name+ </th>+ <th className="sticky top-0 rounded-t border-b border-black/10 bg-white px-4 py-2 text-left font-medium text-gray-700 dark:border-white/10 dark:bg-gray-900 dark:text-gray-100">+ Date+ </th>+ <th className="sticky top-0 rounded-t border-b border-black/10 bg-white px-4 py-2 text-left font-medium text-gray-700 dark:border-white/10 dark:bg-gray-900 dark:text-gray-100">+ Size+ </th>+ <th className="sticky top-0 rounded-t border-b border-black/10 bg-white px-4 py-2 text-right font-medium text-gray-700 dark:border-white/10 dark:bg-gray-900 dark:text-gray-100">+ <button+ className="text-gray-500 hover:text-gray-600 radix-state-open:text-gray-600 dark:hover:text-gray-400 dark:radix-state-open:text-gray-400"+ type="button"+ id="radix-:r67:"+ aria-haspopup="menu"+ aria-expanded="false"+ data-state="closed"+ >+ <DotsIcon />+ </button>+ </th>+ </tr>+ </thead>+ <tbody>+ <tr className="">+ <td className="border-b border-black/10 text-left text-gray-600 dark:border-white/10 dark:text-gray-300 [tr:last-child_&]:border-b-0">+ <div className="px-4 py-2 [tr[data-disabled=true]_&]:opacity-50">+ File Transfer: Node to FastAPI+ </div>+ </td>+ <td className="border-b border-black/10 text-left text-gray-600 dark:border-white/10 dark:text-gray-300 [tr:last-child_&]:border-b-0">+ <div className="px-4 py-2 [tr[data-disabled=true]_&]:opacity-50">June 11, 2023</div>+ </td>+ <td className="border-b border-black/10 text-left text-gray-600 dark:border-white/10 dark:text-gray-300 [tr:last-child_&]:border-b-0">+ <div className="px-4 py-2 [tr[data-disabled=true]_&]:opacity-50">11 mb</div>+ </td>+ <td className="border-b border-black/10 text-left text-gray-600 dark:border-white/10 dark:text-gray-300 [tr:last-child_&]:border-b-0">+ <div className="px-4 py-2 [tr[data-disabled=true]_&]:opacity-50">+ <div className="flex items-center justify-end gap-2">+ <span className="" data-state="closed">+ <a+ href="/c/da3130ea-830c-4dd2-9d2d-d875e71e3867"+ target="_blank"+ rel="noreferrer"+ aria-label="View source chat"+ className="text-gray-500 hover:text-gray-600 dark:hover:text-gray-400"+ >+ <svg+ stroke="currentColor"+ fill="none"+ strokeWidth="2"+ viewBox="0 0 24 24"+ strokeLinecap="round"+ strokeLinejoin="round"+ className="h-4 w-4"+ height="1em"+ width="1em"+ xmlns="http://www.w3.org/2000/svg"+ >+ <path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"></path>+ </svg>+ </a>+ </span>+ <span className="" data-state="closed">+ <button+ aria-label="Delete shared link"+ className="text-gray-500 hover:text-gray-600 dark:hover:text-gray-400"+ >+ <TrashIcon />+ </button>+ </span>+ </div>+ </div>+ </td>+ </tr>+ </tbody>+ </table>+ </div>+ );+}diff --git a/client/src/components/Chat/Input/Files/Table/fakeData.ts b/client/src/components/Chat/Input/Files/Table/fakeData.tsnew file mode 100644index 0000000000..c56cc3737f--- /dev/null+++ b/client/src/components/Chat/Input/Files/Table/fakeData.ts@@ -0,0 +1,72 @@+import { FileSources } from 'librechat-data-provider';+import type { TFile } from 'librechat-data-provider';++export const files: TFile[] = [+ {+ _id: '65b004acd70ce86b9146e9dd',+ file_id: 'file-CbxzlOiGvaG2uwhuAdKXdUpX',+ __v: 0,+ bytes: 18740,+ createdAt: '2024-01-23T18:25:48.153Z',+ filename: 'dataset.xlsx',+ filepath: 'https://api.openai.com/v1/files/file-CbxzlOiGvaG2uwhuAdKXdUpX',+ object: 'file',+ source: FileSources.openai,+ temp_file_id: '63214c34-2d2c-445f-9c60-5cf04c15607c',+ type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',+ updatedAt: '2024-01-23T18:25:48.153Z',+ usage: 0,+ user: '652ac880c4102a77fe54c5db',+ },+ {+ _id: '65b004abd70ce86b9146e861',+ file_id: '86fe0534-803c-4e88-b730-73ec4187742f',+ __v: 0,+ bytes: 3147861,+ createdAt: '2024-01-23T18:25:47.698Z',+ filename: 'img-337c49c7-fb1f-4a14-939d-40d12de11d5c.png',+ filepath: '/images/652ac880c4102a77fe54c5db/img-337c49c7-fb1f-4a14-939d-40d12de11d5c.png',+ height: 1024,+ object: 'file',+ source: FileSources.local,+ type: 'image/png',+ updatedAt: '2024-01-23T18:25:47.698Z',+ usage: 0,+ user: '652ac880c4102a77fe54c5db',+ width: 1024,+ },+ {+ _id: '65b00495d70ce86b9146adc1',+ file_id: 'e301fdff-6fae-48d3-a9a2-c7fe66357890',+ __v: 0,+ bytes: 3147861,+ createdAt: '2024-01-23T18:25:25.324Z',+ filename: 'img-459c76d1-16b7-48f9-9ff7-85ba6464e204.png',+ filepath: '/images/652ac880c4102a77fe54c5db/img-459c76d1-16b7-48f9-9ff7-85ba6464e204.png',+ height: 1024,+ object: 'file',+ source: FileSources.local,+ type: 'image/png',+ updatedAt: '2024-01-23T18:25:25.324Z',+ usage: 0,+ user: '652ac880c4102a77fe54c5db',+ width: 1024,+ },+ {+ _id: '65b00494d70ce86b9146ace6',+ file_id: '63cf2058-3ad1-4712-afbe-6b475119c33a',+ __v: 0,+ bytes: 3147861,+ createdAt: '2024-01-23T18:25:25.035Z',+ filename: 'img-c3fb2935-e578-4d72-b397-d1dcb122af67.png',+ filepath: '/images/652ac880c4102a77fe54c5db/img-c3fb2935-e578-4d72-b397-d1dcb122af67.png',+ height: 1024,+ object: 'file',+ source: FileSources.local,+ type: 'image/png',+ updatedAt: '2024-01-23T18:25:25.035Z',+ usage: 0,+ user: '652ac880c4102a77fe54c5db',+ width: 1024,+ },+];diff --git a/client/src/components/Chat/Input/Files/Table/index.ts b/client/src/components/Chat/Input/Files/Table/index.tsnew file mode 100644index 0000000000..20478f37d3--- /dev/null+++ b/client/src/components/Chat/Input/Files/Table/index.ts@@ -0,0 +1,4 @@+export { columns } from './Columns';+export { default as DataTable } from './DataTable';+export { default as TemplateTable } from './TemplateTable';+export { files } from './fakeData';diff --git a/client/src/components/Chat/Input/Textarea.tsx b/client/src/components/Chat/Input/Textarea.tsxindex 70cd0dee41..e642fb92ec 100644--- a/client/src/components/Chat/Input/Textarea.tsx+++ b/client/src/components/Chat/Input/Textarea.tsx@@ -1,9 +1,25 @@import TextareaAutosize from 'react-textarea-autosize';-import { supportsFiles } from 'librechat-data-provider';+import {+ supportsFiles,+ fileConfig as defaultFileConfig,+ mergeFileConfig,+} from 'librechat-data-provider';+import { useGetFileConfig } from '~/data-provider';import { cn, removeFocusOutlines } from '~/utils';import { useTextarea } from '~/hooks';-export default function Textarea({ value, disabled, onChange, setText, submitMessage, endpoint }) {+export default function Textarea({+ value,+ disabled,+ onChange,+ setText,+ submitMessage,+ endpoint,+ endpointType,+}) {+ const { data: fileConfig = defaultFileConfig } = useGetFileConfig({+ select: (data) => mergeFileConfig(data),+ });const {inputRef,handlePaste,@@ -12,7 +28,7 @@ export default function Textarea({ value, disabled, onChange, setText, submitMeshandleCompositionStart,handleCompositionEnd,} = useTextarea({ setText, submitMessage, disabled });-+ const endpointFileConfig = fileConfig.endpoints[endpoint ?? ''];return (<TextareaAutosizeref={inputRef}@@ -31,7 +47,9 @@ export default function Textarea({ value, disabled, onChange, setText, submitMesstyle={{ height: 44, overflowY: 'auto' }}rows={1}className={cn(- supportsFiles[endpoint] ? ' pl-10 md:pl-[55px]' : 'pl-3 md:pl-4',+ supportsFiles[endpointType ?? endpoint ?? ''] && !endpointFileConfig?.disabled+ ? ' pl-10 md:pl-[55px]'+ : 'pl-3 md:pl-4','m-0 w-full resize-none border-0 bg-transparent py-[10px] pr-10 placeholder-black/50 focus:ring-0 focus-visible:ring-0 dark:bg-transparent dark:placeholder-white/50 md:py-3.5 md:pr-12 ',removeFocusOutlines,'max-h-52',diff --git a/client/src/components/Chat/Landing.tsx b/client/src/components/Chat/Landing.tsxindex 0fad79b95b..9c7543da19 100644--- a/client/src/components/Chat/Landing.tsx+++ b/client/src/components/Chat/Landing.tsx@@ -1,22 +1,25 @@-import type { ReactNode } from 'react';-import { useGetEndpointsQuery, useGetStartupConfig } from 'librechat-data-provider/react-query';import { EModelEndpoint } from 'librechat-data-provider';+import { useGetEndpointsQuery, useGetStartupConfig } from 'librechat-data-provider/react-query';+import type { ReactNode } from 'react';+import { TooltipProvider, Tooltip, TooltipTrigger, TooltipContent } from '~/components/ui';+import { useChatContext, useAssistantsMapContext } from '~/Providers';import { icons } from './Menus/Endpoints/Icons';-import { useChatContext } from '~/Providers';+import { BirthdayIcon } from '~/components/svg';import { getEndpointField } from '~/utils';import { useLocalize } from '~/hooks';-import { BirthdayIcon } from '~/components/svg';-import { TooltipProvider, Tooltip, TooltipTrigger, TooltipContent } from '~/components/ui/';export default function Landing({ Header }: { Header?: ReactNode }) {const { conversation } = useChatContext();const { data: endpointsConfig } = useGetEndpointsQuery();const { data: startupConfig } = useGetStartupConfig();+ const assistantMap = useAssistantsMapContext();const localize = useLocalize();+let { endpoint } = conversation ?? {};+ const { assistant_id = null } = conversation ?? {};+if (- endpoint === EModelEndpoint.assistant ||endpoint === EModelEndpoint.chatGPTBrowser ||endpoint === EModelEndpoint.azureOpenAI ||endpoint === EModelEndpoint.gptPlugins@@ -29,6 +32,18 @@ export default function Landing({ Header }: { Header?: ReactNode }) {const iconKey = endpointType ? 'unknown' : endpoint ?? 'unknown';const Icon = icons[iconKey];+ const assistant = endpoint === EModelEndpoint.assistants && assistantMap?.[assistant_id ?? ''];+ const assistantName = (assistant && assistant?.name) || '';+ const assistantDesc = (assistant && assistant?.description) || '';+ const avatar = (assistant && (assistant?.metadata?.avatar as string)) || '';++ let className =+ 'shadow-stroke relative flex h-full items-center justify-center rounded-full bg-white text-black';++ if (assistantName && avatar) {+ className = 'shadow-stroke overflow-hidden rounded-full';+ }+return (<TooltipProvider delayDuration={50}><Tooltip>@@ -36,7 +51,7 @@ export default function Landing({ Header }: { Header?: ReactNode }) {<div className="absolute left-0 right-0">{Header && Header}</div><div className="flex h-full flex-col items-center justify-center"><div className="relative mb-3 h-[72px] w-[72px]">- <div className="gizmo-shadow-stroke relative flex h-full items-center justify-center rounded-full bg-white text-black">+ <div className={className}>{endpoint &&Icon &&Icon({@@ -45,20 +60,36 @@ export default function Landing({ Header }: { Header?: ReactNode }) {className: 'h-2/3 w-2/3',endpoint: endpoint,iconURL: iconURL,+ assistantName,+ avatar,})}- <TooltipTrigger>- {(startupConfig?.showBirthdayIcon ?? false) && (- <BirthdayIcon className="absolute bottom-12 right-5" />- )}- </TooltipTrigger>- <TooltipContent side="top" sideOffset={85} className="left-[-20%]">- {localize('com_ui_happy_birthday')}- </TooltipContent></div>+ <TooltipTrigger>+ {(startupConfig?.showBirthdayIcon ?? false) && (+ <BirthdayIcon className="absolute bottom-12 right-5" />+ )}+ </TooltipTrigger>+ <TooltipContent side="top" sideOffset={115} className="left-[20%]">+ {localize('com_ui_happy_birthday')}+ </TooltipContent></div>- <div className="mb-5 text-2xl font-medium dark:text-white">- {localize('com_nav_welcome_message')}- </div>+ {assistantName ? (+ <div className="flex flex-col items-center gap-0 p-2">+ <div className="text-center text-2xl font-medium dark:text-white">+ {assistantName}+ </div>+ <div className="text-token-text-secondary max-w-md text-center text-xl font-normal ">+ {assistantDesc ? assistantDesc : localize('com_nav_welcome_message')}+ </div>+ {/* <div className="mt-1 flex items-center gap-1 text-token-text-tertiary">+ <div className="text-sm text-token-text-tertiary">By Daniel Avila</div>+ </div> */}+ </div>+ ) : (+ <div className="mb-5 text-2xl font-medium dark:text-white">+ {localize('com_nav_welcome_message')}+ </div>+ )}</div></div></Tooltip>diff --git a/client/src/components/Chat/Menus/Endpoints/Icons.tsx b/client/src/components/Chat/Menus/Endpoints/Icons.tsxindex 4bfb593d83..80d9af7e03 100644--- a/client/src/components/Chat/Menus/Endpoints/Icons.tsx+++ b/client/src/components/Chat/Menus/Endpoints/Icons.tsx@@ -7,7 +7,9 @@ import {BingAIMinimalIcon,GoogleMinimalIcon,CustomMinimalIcon,+ AssistantIcon,LightningIcon,+ Sparkles,} from '~/components/svg';import UnknownIcon from './UnknownIcon';import { cn } from '~/utils';@@ -21,26 +23,32 @@ export const icons = {[EModelEndpoint.google]: GoogleMinimalIcon,[EModelEndpoint.bingAI]: BingAIMinimalIcon,[EModelEndpoint.custom]: CustomMinimalIcon,- [EModelEndpoint.assistant]: ({ className = '' }) => (- <svg- width="24"- height="24"- viewBox="0 0 24 24"- fill="none"- xmlns="http://www.w3.org/2000/svg"- className={cn('icon-md shrink-0', className)}- >- <path- d="M19.3975 1.35498C19.3746 1.15293 19.2037 1.00021 19.0004 1C18.7971 0.999793 18.6259 1.15217 18.6026 1.35417C18.4798 2.41894 18.1627 3.15692 17.6598 3.65983C17.1569 4.16274 16.4189 4.47983 15.3542 4.60264C15.1522 4.62593 14.9998 4.79707 15 5.00041C15.0002 5.20375 15.1529 5.37457 15.355 5.39746C16.4019 5.51605 17.1562 5.83304 17.6716 6.33906C18.1845 6.84269 18.5078 7.57998 18.6016 8.63539C18.6199 8.84195 18.7931 9.00023 19.0005 9C19.2078 8.99977 19.3806 8.84109 19.3985 8.6345C19.4883 7.59673 19.8114 6.84328 20.3273 6.32735C20.8433 5.81142 21.5967 5.48834 22.6345 5.39851C22.8411 5.38063 22.9998 5.20782 23 5.00045C23.0002 4.79308 22.842 4.61992 22.6354 4.60157C21.58 4.50782 20.8427 4.18447 20.3391 3.67157C19.833 3.15623 19.516 2.40192 19.3975 1.35498Z"- fill="currentColor"- ></path>- <path- fillRule="evenodd"- clipRule="evenodd"- d="M11 3C11.4833 3 11.8974 3.34562 11.9839 3.82111C12.4637 6.46043 13.279 8.23983 14.5196 9.48039C15.7602 10.721 17.5396 11.5363 20.1789 12.0161C20.6544 12.1026 21 12.5167 21 13C21 13.4833 20.6544 13.8974 20.1789 13.9839C17.5396 14.4637 15.7602 15.279 14.5196 16.5196C13.279 17.7602 12.4637 19.5396 11.9839 22.1789C11.8974 22.6544 11.4833 23 11 23C10.5167 23 10.1026 22.6544 10.0161 22.1789C9.53625 19.5396 8.72096 17.7602 7.48039 16.5196C6.23983 15.279 4.46043 14.4637 1.82111 13.9839C1.34562 13.8974 1 13.4833 1 13C1 12.5167 1.34562 12.1026 1.82111 12.0161C4.46043 11.5363 6.23983 10.721 7.48039 9.48039C8.72096 8.23983 9.53625 6.46043 10.0161 3.82111C10.1026 3.34562 10.5167 3 11 3ZM5.66618 13C6.9247 13.5226 7.99788 14.2087 8.89461 15.1054C9.79134 16.0021 10.4774 17.0753 11 18.3338C11.5226 17.0753 12.2087 16.0021 13.1054 15.1054C14.0021 14.2087 15.0753 13.5226 16.3338 13C15.0753 12.4774 14.0021 11.7913 13.1054 10.8946C12.2087 9.99788 11.5226 8.9247 11 7.66618C10.4774 8.9247 9.79134 9.99788 8.89461 10.8946C7.99788 11.7913 6.9247 12.4774 5.66618 13Z"- fill="currentColor"- ></path>- </svg>- ),+ [EModelEndpoint.assistants]: ({+ className = '',+ assistantName,+ avatar,+ size,+ }: {+ className?: string;+ assistantName?: string;+ avatar?: string;+ size?: number;+ }) => {+ if (assistantName && avatar) {+ return (+ <img+ src={avatar}+ className="bg-token-surface-secondary dark:bg-token-surface-tertiary h-full w-full"+ alt={assistantName}+ width="80"+ height="80"+ />+ );+ } else if (assistantName) {+ return <AssistantIcon className={cn('text-token-secondary', className)} size={size} />;+ }++ return <Sparkles className={className} />;+ },unknown: UnknownIcon,};diff --git a/client/src/components/Chat/Menus/Endpoints/MenuItem.tsx b/client/src/components/Chat/Menus/Endpoints/MenuItem.tsxindex 3d37d60b4e..ed8d59597c 100644--- a/client/src/components/Chat/Menus/Endpoints/MenuItem.tsx+++ b/client/src/components/Chat/Menus/Endpoints/MenuItem.tsx@@ -1,10 +1,10 @@import { useState } from 'react';import { Settings } from 'lucide-react';import { useRecoilValue } from 'recoil';-import { EModelEndpoint } from 'librechat-data-provider';+import { EModelEndpoint, modularEndpoints } from 'librechat-data-provider';import { useGetEndpointsQuery } from 'librechat-data-provider/react-query';+import type { TPreset, TConversation } from 'librechat-data-provider';import type { FC } from 'react';-import type { TPreset } from 'librechat-data-provider';import { useLocalize, useUserKey, useDefaultConvo } from '~/hooks';import { SetKeyDialog } from '~/components/Input/SetKeyDialog';import { cn, getEndpointField } from '~/utils';@@ -47,10 +47,35 @@ const MenuItem: FC<MenuItemProps> = ({if (!expiryTime) {setDialogOpen(true);}- const template: Partial<TPreset> = { endpoint: newEndpoint, conversationId: 'new' };++ const currentEndpoint = conversation?.endpoint;+ const template: Partial<TPreset> = {+ ...conversation,+ endpoint: newEndpoint,+ conversationId: 'new',+ };+ const isAssistantSwitch =+ newEndpoint === EModelEndpoint.assistants &&+ currentEndpoint === EModelEndpoint.assistants &&+ currentEndpoint === newEndpoint;+const { conversationId } = conversation ?? {};- if (modularChat && conversationId && conversationId !== 'new') {- template.endpointType = getEndpointField(endpointsConfig, newEndpoint, 'type');+ const isExistingConversation = conversationId && conversationId !== 'new';+ const currentEndpointType =+ getEndpointField(endpointsConfig, currentEndpoint, 'type') ?? currentEndpoint;+ const newEndpointType = getEndpointField(endpointsConfig, newEndpoint, 'type') ?? newEndpoint;++ if (+ isExistingConversation &&+ (modularEndpoints.has(endpoint ?? '') ||+ modularEndpoints.has(currentEndpointType ?? '') ||+ isAssistantSwitch) &&+ (modularEndpoints.has(newEndpoint ?? '') ||+ modularEndpoints.has(newEndpointType ?? '') ||+ isAssistantSwitch) &&+ (endpoint === newEndpoint || modularChat || isAssistantSwitch)+ ) {+ template.endpointType = newEndpointType;const currentConvo = getDefaultConversation({/* target endpointType is necessary to avoid endpoint mixing */@@ -59,10 +84,10 @@ const MenuItem: FC<MenuItemProps> = ({});/* We don't reset the latest message, only when changing settings mid-converstion */- newConversation({ template: currentConvo, keepLatestMessage: true });+ newConversation({ template: currentConvo, preset: currentConvo, keepLatestMessage: true });return;}- newConversation({ template });+ newConversation({ template: { ...(template as Partial<TConversation>) } });}};diff --git a/client/src/components/Chat/Menus/EndpointsMenu.tsx b/client/src/components/Chat/Menus/EndpointsMenu.tsxindex a7d4901210..478141733f 100644--- a/client/src/components/Chat/Menus/EndpointsMenu.tsx+++ b/client/src/components/Chat/Menus/EndpointsMenu.tsx@@ -1,9 +1,9 @@-import { alternateName } from 'librechat-data-provider';import { Content, Portal, Root } from '@radix-ui/react-popover';+import { alternateName, EModelEndpoint } from 'librechat-data-provider';import { useGetEndpointsQuery } from 'librechat-data-provider/react-query';import type { FC } from 'react';+import { useChatContext, useAssistantsMapContext } from '~/Providers';import EndpointItems from './Endpoints/MenuItems';-import { useChatContext } from '~/Providers';import TitleButton from './UI/TitleButton';import { mapEndpoints } from '~/utils';@@ -13,15 +13,22 @@ const EndpointsMenu: FC = () => {});const { conversation } = useChatContext();- const selected = conversation?.endpoint ?? '';+ const { endpoint = '', assistant_id = null } = conversation ?? {};+ const assistantMap = useAssistantsMapContext();- if (!selected) {+ const assistant = endpoint === EModelEndpoint.assistants && assistantMap?.[assistant_id ?? ''];+ const assistantName = (assistant && assistant?.name) || 'Assistant';++ if (!endpoint) {console.warn('No endpoint selected');return null;}++ const primaryText = assistant ? assistantName : (alternateName[endpoint] ?? endpoint ?? '') + ' ';+return (<Root>- <TitleButton primaryText={(alternateName[selected] ?? selected ?? '') + ' '} />+ <TitleButton primaryText={primaryText + ' '} /><Portal><divstyle={{@@ -38,7 +45,7 @@ const EndpointsMenu: FC = () => {align="start"className="mt-2 max-h-[65vh] min-w-[340px] overflow-y-auto rounded-lg border border-gray-100 bg-white shadow-lg dark:border-gray-700 dark:bg-gray-900 dark:text-white lg:max-h-[75vh]">- <EndpointItems endpoints={endpoints} selected={selected} />+ <EndpointItems endpoints={endpoints} selected={endpoint} /></Content></div></Portal>diff --git a/client/src/components/Chat/Menus/Presets/EditPresetDialog.tsx b/client/src/components/Chat/Menus/Presets/EditPresetDialog.tsxindex d6c823074b..00d97df76f 100644--- a/client/src/components/Chat/Menus/Presets/EditPresetDialog.tsx+++ b/client/src/components/Chat/Menus/Presets/EditPresetDialog.tsx@@ -4,7 +4,7 @@ import { cn, defaultTextProps, removeFocusOutlines, mapEndpoints } from '~/utilsimport { Input, Label, Dropdown, Dialog, DialogClose, DialogButton } from '~/components/';import PopoverButtons from '~/components/Chat/Input/PopoverButtons';import DialogTemplate from '~/components/ui/DialogTemplate';-import { useSetIndexOptions, useLocalize } from '~/hooks';+import { useSetIndexOptions, useLocalize, useDebouncedInput } from '~/hooks';import { EndpointSettings } from '~/components/Endpoints';import { useChatContext } from '~/Providers';import store from '~/store';@@ -17,8 +17,9 @@ const EditPresetDialog = ({submitPreset: () => void;}) => {const localize = useLocalize();- const { preset } = useChatContext();+ const { preset, setPreset } = useChatContext();const { setOption } = useSetIndexOptions(preset);+ const [onTitleChange, title] = useDebouncedInput(setOption, 'title', preset?.title);const [presetModalVisible, setPresetModalVisible] = useRecoilState(store.presetModalVisible);const { data: availableEndpoints = [] } = useGetEndpointsQuery({@@ -31,7 +32,15 @@ const EditPresetDialog = ({}return (- <Dialog open={presetModalVisible} onOpenChange={setPresetModalVisible}>+ <Dialog+ open={presetModalVisible}+ onOpenChange={(open) => {+ setPresetModalVisible(open);+ if (!open) {+ setPreset(null);+ }+ }}+ ><DialogTemplatetitle={`${localize('com_ui_edit') + ' ' + localize('com_endpoint_preset')} - ${preset?.title@@ -47,8 +56,8 @@ const EditPresetDialog = ({</Label><Inputid="preset-name"- value={preset?.title || ''}- onChange={(e) => setOption('title')(e.target.value || '')}+ value={(title as string | undefined) ?? ''}+ onChange={onTitleChange}placeholder={localize('com_endpoint_set_custom_name')}className={cn(defaultTextProps,@@ -104,7 +113,7 @@ const EditPresetDialog = ({onClick={submitPreset}className="dark:hover:gray-400 ml-2 border-gray-700 bg-green-600 text-white hover:bg-green-700 dark:hover:bg-green-800">- {localize('com_endpoint_save')}+ {localize('com_ui_save')}</DialogClose></div>}diff --git a/client/src/components/Chat/Messages/Content/ActionIcon.tsx b/client/src/components/Chat/Messages/Content/ActionIcon.tsxnew file mode 100644index 0000000000..2c6ee4465f--- /dev/null+++ b/client/src/components/Chat/Messages/Content/ActionIcon.tsx@@ -0,0 +1,172 @@+export default function ActionIcon() {+ return (+ <svg+ xmlns="http://www.w3.org/2000/svg"+ xmlnsXlink="http://www.w3.org/1999/xlink"+ viewBox="0 0 20 20"+ width="20"+ height="20"+ style={{ width: '100%', height: '100%', transform: 'translate3d(0px, 0px, 0px)' }}+ preserveAspectRatio="xMidYMid meet"+ >+ <defs>+ <clipPath id="__lottie_element_232">+ <rect width="20" height="20" x="0" y="0"></rect>+ </clipPath>+ <clipPath id="__lottie_element_242">+ <path d="M0,0 L20000,0 L20000,20000 L0,20000z"></path>+ </clipPath>+ <g id="__lottie_element_245">+ <g+ clipPath="url(#__lottie_element_246)"+ style={{ display: 'block' }}+ transform="matrix(1,0,0,1,0,0)"+ opacity="1"+ >+ <g style={{ display: 'block' }} transform="matrix(1,0,0,1,10006,10006)" opacity="1">+ <g opacity="1" transform="matrix(1,0,0,1,0,0)">+ <path+ fill="rgb(255,255,255)"+ fillOpacity="1"+ d=" M4.5,1 C4.5,1 4.5,3.5 4.5,3.5 C4.5,4.05 4.05,4.5 3.5,4.5 C3.5,4.5 1,4.5 1,4.5 C0.45,4.5 0,4.05 0,3.5 C0,3.5 0,1 0,1 C0,0.45 0.45,0 1,0 C1,0 3.5,0 3.5,0 C4.05,0 4.5,0.45 4.5,1z"+ ></path>+ <g opacity="1" transform="matrix(1,0,0,1,2.25,2.25)"></g>+ </g>+ </g>+ </g>+ </g>+ <clipPath id="__lottie_element_246">+ <path d="M0,0 L20000,0 L20000,20000 L0,20000z"></path>+ </clipPath>+ <clipPath id="__lottie_element_256">+ <path d="M0,0 L20000,0 L20000,20000 L0,20000z"></path>+ </clipPath>+ {/* eslint-disable-next-line react/no-unknown-property */}+ <mask id="__lottie_element_245_1" mask-type="alpha">+ <use xlinkHref="#__lottie_element_245"></use>+ </mask>+ <clipPath id="__lottie_element_269">+ <path d="M0,0 L20000,0 L20000,20000 L0,20000z"></path>+ </clipPath>+ <g id="__lottie_element_272">+ <g+ clipPath="url(#__lottie_element_273)"+ style={{ display: 'block' }}+ transform="matrix(1,0,0,1,0,0)"+ opacity="1"+ >+ <g style={{ display: 'block' }} transform="matrix(1,0,0,1,10006,10006)" opacity="1">+ <g opacity="1" transform="matrix(1,0,0,1,0,0)">+ <path+ fill="rgb(255,255,255)"+ fillOpacity="1"+ d=" M4.5,1 C4.5,1 4.5,3.5 4.5,3.5 C4.5,4.05 4.05,4.5 3.5,4.5 C3.5,4.5 1,4.5 1,4.5 C0.45,4.5 0,4.05 0,3.5 C0,3.5 0,1 0,1 C0,0.45 0.45,0 1,0 C1,0 3.5,0 3.5,0 C4.05,0 4.5,0.45 4.5,1z"+ ></path>+ <g opacity="1" transform="matrix(1,0,0,1,2.25,2.25)"></g>+ </g>+ </g>+ </g>+ </g>+ <clipPath id="__lottie_element_273">+ <path d="M0,0 L20000,0 L20000,20000 L0,20000z"></path>+ </clipPath>+ <clipPath id="__lottie_element_283">+ <path d="M0,0 L20000,0 L20000,20000 L0,20000z"></path>+ </clipPath>+ {/* eslint-disable-next-line react/no-unknown-property */}+ <mask id="__lottie_element_272_1" mask-type="alpha">+ <use xlinkHref="#__lottie_element_272"></use>+ </mask>+ </defs>+ <g clipPath="url(#__lottie_element_232)">+ <g+ clipPath="url(#__lottie_element_269)"+ style={{ display: 'block' }}+ transform="matrix(-1,0,0,-1,10014,10018.5)"+ opacity="1"+ >+ <g style={{ display: 'block' }} mask="url(#__lottie_element_272_1)">+ <g clipPath="url(#__lottie_element_283)" transform="matrix(1,0,0,1,0,0)" opacity="1">+ <g style={{ display: 'block' }} transform="matrix(1,0,0,1,10006,10006)" opacity="1">+ <g opacity="1" transform="matrix(1,0,0,1,0,0)">+ <path+ fill="rgb(177,98,253)"+ fillOpacity="1"+ d=" M4.5,1 C4.5,1 4.5,3.5 4.5,3.5 C4.5,4.05 4.05,4.5 3.5,4.5 C3.5,4.5 1,4.5 1,4.5 C0.45,4.5 0,4.05 0,3.5 C0,3.5 0,1 0,1 C0,0.45 0.45,0 1,0 C1,0 3.5,0 3.5,0 C4.05,0 4.5,0.45 4.5,1z"+ ></path>+ <path+ strokeLinecap="round"+ strokeLinejoin="round"+ fillOpacity="0"+ stroke="rgb(177,98,253)"+ strokeOpacity="1"+ strokeWidth="3"+ d=" M4.5,1 C4.5,1 4.5,3.5 4.5,3.5 C4.5,4.05 4.05,4.5 3.5,4.5 C3.5,4.5 1,4.5 1,4.5 C0.45,4.5 0,4.05 0,3.5 C0,3.5 0,1 0,1 C0,0.45 0.45,0 1,0 C1,0 3.5,0 3.5,0 C4.05,0 4.5,0.45 4.5,1z"+ ></path>+ <g opacity="1" transform="matrix(1,0,0,1,2.25,2.25)"></g>+ </g>+ </g>+ </g>+ </g>+ </g>+ <g style={{ display: 'block' }} transform="matrix(-1,0,0,-1,5.75,10.25)" opacity="1">+ <g opacity="1" transform="matrix(1,0,0,1,-2.25,-0.75)">+ <path+ fill="rgb(247,247,248)"+ fillOpacity="1"+ d=" M0,0 C0.75,0 1.5,0 2.25,0 C2.6642000675201416,0 3,0.3357999920845032 3,0.75 C3,0.75 3,0.75 3,0.75 C3,1.164199948310852 2.6642000675201416,1.5 2.25,1.5 C1.5,1.5 0.75,1.5 0,1.5 C0,1 0,0.5 0,0 C0,0 0,0 0,0 C0,0 0,0 0,0"+ ></path>+ </g>+ </g>+ <g+ clipPath="url(#__lottie_element_242)"+ style={{ display: 'block' }}+ transform="matrix(-1,0,0,-1,10022.5,10018.5)"+ opacity="1"+ >+ <g style={{ display: 'block' }} mask="url(#__lottie_element_245_1)">+ <g clipPath="url(#__lottie_element_256)" transform="matrix(1,0,0,1,0,0)" opacity="1">+ <g style={{ display: 'block' }} transform="matrix(1,0,0,1,10006,10006)" opacity="1">+ <g opacity="1" transform="matrix(1,0,0,1,0,0)">+ <path+ fill="rgb(177,98,253)"+ fillOpacity="1"+ d=" M4.5,1 C4.5,1 4.5,3.5 4.5,3.5 C4.5,4.05 4.05,4.5 3.5,4.5 C3.5,4.5 1,4.5 1,4.5 C0.45,4.5 0,4.05 0,3.5 C0,3.5 0,1 0,1 C0,0.45 0.45,0 1,0 C1,0 3.5,0 3.5,0 C4.05,0 4.5,0.45 4.5,1z"+ ></path>+ <path+ strokeLinecap="round"+ strokeLinejoin="round"+ fillOpacity="0"+ stroke="rgb(177,98,253)"+ strokeOpacity="1"+ strokeWidth="3"+ d=" M4.5,1 C4.5,1 4.5,3.5 4.5,3.5 C4.5,4.05 4.05,4.5 3.5,4.5 C3.5,4.5 1,4.5 1,4.5 C0.45,4.5 0,4.05 0,3.5 C0,3.5 0,1 0,1 C0,0.45 0.45,0 1,0 C1,0 3.5,0 3.5,0 C4.05,0 4.5,0.45 4.5,1z"+ ></path>+ <g opacity="1" transform="matrix(1,0,0,1,2.25,2.25)"></g>+ </g>+ </g>+ </g>+ </g>+ </g>+ <g style={{ display: 'block' }} transform="matrix(-1,0,0,-1,14.25,10.25)" opacity="1">+ <g opacity="1" transform="matrix(1,0,0,1,-0.75,-0.75)">+ <path+ fill="rgb(247,247,248)"+ fillOpacity="1"+ d=" M0,0.75 C0,0.3357999920845032 0.3357900083065033,0 0.75,0 C1.5,0 2.25,0 3,0 C3,0.5 3,1 3,1.5 C2.25,1.5 1.5,1.5 0.75,1.5 C0.3357900083065033,1.5 0,1.164199948310852 0,0.75 C0,0.75 0,0.75 0,0.75 C0,0.75 0,0.75 0,0.75 C0,0.75 0,0.75 0,0.75"+ ></path>+ </g>+ </g>+ <g style={{ display: 'block' }} transform="matrix(1,0,0,1,0,0)" opacity="1">+ <g opacity="1" transform="matrix(1,0,0,1,10,10.25)">+ <path+ fill="rgb(177,98,253)"+ fillOpacity="1"+ d=" M2,-0.75 C2,-0.75 2,0.75 2,0.75 C2,0.75 -2,0.75 -2,0.75 C-2,0.75 -2,-0.75 -2,-0.75 C-2,-0.75 2,-0.75 2,-0.75z"+ ></path>+ </g>+ </g>+ </g>+ </svg>+ );+}diff --git a/client/src/components/Chat/Messages/Content/CancelledIcon.tsx b/client/src/components/Chat/Messages/Content/CancelledIcon.tsxnew file mode 100644index 0000000000..6006fb5c51--- /dev/null+++ b/client/src/components/Chat/Messages/Content/CancelledIcon.tsx@@ -0,0 +1,17 @@+export default function CancelledIcon() {+ return (+ <div+ className="absolute left-0 top-0 flex h-full w-full items-center justify-center rounded-full bg-gray-300 text-white"+ style={{ opacity: 1, transform: 'none' }}+ >+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 8 9" fill="none" width="8" height="9">+ <path+ fillRule="evenodd"+ clipRule="evenodd"+ d="M7.32256 1.48447C7.59011 1.16827 7.55068 0.695034 7.23447 0.427476C6.91827 0.159918 6.44503 0.199354 6.17748 0.515559L4.00002 3.08892L1.82256 0.515559C1.555 0.199354 1.08176 0.159918 0.765559 0.427476C0.449355 0.695034 0.409918 1.16827 0.677476 1.48447L3.01755 4.25002L0.677476 7.01556C0.409918 7.33176 0.449354 7.805 0.765559 8.07256C1.08176 8.34011 1.555 8.30068 1.82256 7.98447L4.00002 5.41111L6.17748 7.98447C6.44503 8.30068 6.91827 8.34011 7.23447 8.07256C7.55068 7.805 7.59011 7.33176 7.32256 7.01556L4.98248 4.25002L7.32256 1.48447Z"+ fill="currentColor"+ />+ </svg>+ </div>+ );+}diff --git a/client/src/components/Chat/Messages/Content/CodeAnalyze.tsx b/client/src/components/Chat/Messages/Content/CodeAnalyze.tsxnew file mode 100644index 0000000000..345ed557f1--- /dev/null+++ b/client/src/components/Chat/Messages/Content/CodeAnalyze.tsx@@ -0,0 +1,143 @@+import { useState } from 'react';+import ProgressCircle from './ProgressCircle';+import ProgressText from './ProgressText';+import FinishedIcon from './FinishedIcon';+import MarkdownLite from './MarkdownLite';+import { useProgress } from '~/hooks';++export default function CodeAnalyze({+ initialProgress = 0.1,+ code,+ outputs = [],+}: {+ initialProgress: number;+ code: string;+ outputs: Record<string, unknown>[];+}) {+ const [showCode, setShowCode] = useState(false);+ const progress = useProgress(initialProgress);+ const radius = 56.08695652173913;+ const circumference = 2 * Math.PI * radius;+ const offset = circumference - progress * circumference;++ const logs = outputs.reduce((acc, output) => {+ if (output['logs']) {+ return acc + output['logs'] + '\n';+ }+ return acc;+ }, '');++ return (+ <>+ <div className="my-2.5 flex items-center gap-2.5">+ <div className="relative h-5 w-5 shrink-0">+ {progress < 1 ? (+ <CodeInProgress offset={offset} circumference={circumference} radius={radius} />+ ) : (+ <FinishedIcon />+ )}+ </div>+ <ProgressText+ progress={progress}+ onClick={() => setShowCode((prev) => !prev)}+ inProgressText="Analyzing"+ finishedText="Finished analyzing"+ hasInput={!!code?.length}+ />+ </div>+ {showCode && (+ <div className="mb-3 mt-0.5 overflow-hidden rounded-xl bg-black">+ <MarkdownLite content={code ? `\`\`\`python\n${code}\n\`\`\`` : ''} />+ {logs && (+ <div className="bg-gray-700 p-4 text-xs">+ <div className="mb-1 text-gray-400">Result</div>+ <div+ className="prose flex flex-col-reverse text-white"+ style={{+ color: 'white',+ }}+ >+ <pre className="shrink-0">{logs}</pre>+ </div>+ </div>+ )}+ </div>+ )}+ </>+ );+}++const CodeInProgress = ({+ offset,+ circumference,+ radius,+}: {+ offset: number;+ circumference: number;+ radius: number;+}) => {+ return (+ <div+ className="absolute left-0 top-0 flex h-full w-full items-center justify-center rounded-full bg-transparent text-white"+ style={{ opacity: 1, transform: 'none' }}+ data-projection-id="77"+ >+ <div>+ <svg+ xmlns="http://www.w3.org/2000/svg"+ xmlnsXlink="http://www.w3.org/1999/xlink"+ viewBox="0 0 20 20"+ width="20"+ height="20"+ style={{ width: '100%', height: '100%', transform: 'translate3d(0px, 0px, 0px)' }}+ preserveAspectRatio="xMidYMid meet"+ >+ <defs>+ <clipPath id="__lottie_element_11">+ <rect width="20" height="20" x="0" y="0" />+ </clipPath>+ </defs>+ <g clipPath="url(#__lottie_element_11)">+ <g style={{ display: 'block', transform: 'matrix(1,0,0,1,-2,-2)', opacity: 1 }}>+ <g opacity="1" transform="matrix(1,0,0,1,7.026679992675781,8.834091186523438)">+ <path+ fill="rgb(177,98,253)"+ fillOpacity="1"+ d=" M1.2870399951934814,0.2207774966955185 C0.992609977722168,-0.07359249889850616 0.5152599811553955,-0.07359249889850616 0.22082999348640442,0.2207774966955185 C-0.07361000031232834,0.5151575207710266 -0.07361000031232834,0.992437481880188 0.22082999348640442,1.2868175506591797 C0.8473266959190369,1.9131841659545898 1.4738233089447021,2.53955078125 2.1003201007843018,3.16591739654541 C1.4738233089447021,3.7922842502593994 0.8473266959190369,4.4186506271362305 0.22082999348640442,5.045017719268799 C-0.07361000031232834,5.339417457580566 -0.07361000031232834,5.816617488861084 0.22082999348640442,6.11101770401001 C0.5152599811553955,6.405417442321777 0.992609977722168,6.405417442321777 1.2870399951934814,6.11101770401001 C2.091266632080078,5.306983947753906 2.895493268966675,4.502950668334961 3.6997199058532715,3.6989173889160156 C3.994119882583618,3.404517412185669 3.994119882583618,2.927217483520508 3.6997199058532715,2.6329174041748047 C2.895493268966675,1.8288708925247192 2.091266632080078,1.0248241424560547 1.2870399951934814,0.2207774966955185 C1.2870399951934814,0.2207774966955185 1.2870399951934814,0.2207774966955185 1.2870399951934814,0.2207774966955185 C1.2870399951934814,0.2207774966955185 1.2870399951934814,0.2207774966955185 1.2870399951934814,0.2207774966955185"+ />+ <path+ strokeLinecap="round"+ strokeLinejoin="round"+ fillOpacity="0"+ stroke="rgb(177,98,253)"+ strokeOpacity="1"+ strokeWidth="0.201031"+ d=" M1.2870399951934814,0.2207774966955185 C0.992609977722168,-0.07359249889850616 0.5152599811553955,-0.07359249889850616 0.22082999348640442,0.2207774966955185 C-0.07361000031232834,0.5151575207710266 -0.07361000031232834,0.992437481880188 0.22082999348640442,1.2868175506591797 C0.8473266959190369,1.9131841659545898 1.4738233089447021,2.53955078125 2.1003201007843018,3.16591739654541 C1.4738233089447021,3.7922842502593994 0.8473266959190369,4.4186506271362305 0.22082999348640442,5.045017719268799 C-0.07361000031232834,5.339417457580566 -0.07361000031232834,5.816617488861084 0.22082999348640442,6.11101770401001 C0.5152599811553955,6.405417442321777 0.992609977722168,6.405417442321777 1.2870399951934814,6.11101770401001 C2.091266632080078,5.306983947753906 2.895493268966675,4.502950668334961 3.6997199058532715,3.6989173889160156 C3.994119882583618,3.404517412185669 3.994119882583618,2.927217483520508 3.6997199058532715,2.6329174041748047 C2.895493268966675,1.8288708925247192 2.091266632080078,1.0248241424560547 1.2870399951934814,0.2207774966955185 C1.2870399951934814,0.2207774966955185 1.2870399951934814,0.2207774966955185 1.2870399951934814,0.2207774966955185 C1.2870399951934814,0.2207774966955185 1.2870399951934814,0.2207774966955185 1.2870399951934814,0.2207774966955185"+ />+ </g>+ </g>+ <g style={{ display: 'block', transform: 'matrix(1,0,0,1,-2,-2)', opacity: 1 }}>+ <g opacity="1" transform="matrix(1,0,0,1,11.79640007019043,13.512199401855469)">+ <path+ fill="rgb(177,98,253)"+ fillOpacity="1"+ d=" M4.3225998878479,0 C3.1498000621795654,0 1.9769999980926514,0 0.8041999936103821,0 C0.36010000109672546,0 0,0.36000001430511475 0,0.804099977016449 C0,1.2482000589370728 0.36010000109672546,1.6081000566482544 0.8041999936103821,1.6081000566482544 C1.9769999980926514,1.6081000566482544 3.1498000621795654,1.6081000566482544 4.3225998878479,1.6081000566482544 C4.7667999267578125,1.6081000566482544 5.126800060272217,1.2482000589370728 5.126800060272217,0.804099977016449 C5.126800060272217,0.36000001430511475 4.7667999267578125,0 4.3225998878479,0 C4.3225998878479,0 4.3225998878479,0 4.3225998878479,0 C4.3225998878479,0 4.3225998878479,0 4.3225998878479,0"+ />+ <path+ strokeLinecap="round"+ strokeLinejoin="round"+ fillOpacity="0"+ stroke="rgb(177,98,253)"+ strokeOpacity="1"+ strokeWidth="0.100515"+ d=" M4.3225998878479,0 C3.1498000621795654,0 1.9769999980926514,0 0.8041999936103821,0 C0.36010000109672546,0 0,0.36000001430511475 0,0.804099977016449 C0,1.2482000589370728 0.36010000109672546,1.6081000566482544 0.8041999936103821,1.6081000566482544 C1.9769999980926514,1.6081000566482544 3.1498000621795654,1.6081000566482544 4.3225998878479,1.6081000566482544 C4.7667999267578125,1.6081000566482544 5.126800060272217,1.2482000589370728 5.126800060272217,0.804099977016449 C5.126800060272217,0.36000001430511475 4.7667999267578125,0 4.3225998878479,0 C4.3225998878479,0 4.3225998878479,0 4.3225998878479,0 C4.3225998878479,0 4.3225998878479,0 4.3225998878479,0"+ />+ </g>+ </g>+ </g>+ </svg>+ </div>+ <ProgressCircle radius={radius} circumference={circumference} offset={offset} />+ </div>+ );+};diff --git a/client/src/components/Chat/Messages/Content/ContentParts.tsx b/client/src/components/Chat/Messages/Content/ContentParts.tsxnew file mode 100644index 0000000000..d897d6f2c3--- /dev/null+++ b/client/src/components/Chat/Messages/Content/ContentParts.tsx@@ -0,0 +1,51 @@+import { Suspense } from 'react';+// import type { ContentPart } from 'librechat-data-provider';+import { UnfinishedMessage } from './MessageContent';+import { DelayedRender } from '~/components/ui';+import Part from './Part';++// Content Component+const ContentParts = ({+ edit,+ error,+ unfinished,+ isSubmitting,+ isLast,+ content,+ ...props+}: // eslint-disable-next-line @typescript-eslint/no-explicit-any+any) => {+ if (error) {+ // return <ErrorMessage text={text} />;+ } else if (edit) {+ // return <EditMessage text={text} isSubmitting={isSubmitting} {...props} />;+ } else {+ const { message } = props;+ const { messageId } = message;++ return (+ <>+ {content.map((part, idx) => {+ return (+ <Part+ key={`display-${messageId}-${idx}`}+ showCursor={idx === content.length - 1 && isLast}+ isSubmitting={isSubmitting}+ part={part}+ {...props}+ />+ );+ })}+ {!isSubmitting && unfinished && (+ <Suspense>+ <DelayedRender delay={250}>+ <UnfinishedMessage key={`unfinished-${messageId}`} />+ </DelayedRender>+ </Suspense>+ )}+ </>+ );+ }+};++export default ContentParts;diff --git a/client/src/components/Chat/Messages/Content/FinishedIcon.tsx b/client/src/components/Chat/Messages/Content/FinishedIcon.tsxnew file mode 100644index 0000000000..2d47833156--- /dev/null+++ b/client/src/components/Chat/Messages/Content/FinishedIcon.tsx@@ -0,0 +1,18 @@+export default function FinishedIcon() {+ return (+ <div+ className="absolute left-0 top-0 flex h-full w-full items-center justify-center rounded-full bg-brand-purple text-white"+ style={{ opacity: 1, transform: 'none' }}+ data-projection-id="162"+ >+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 8 9" fill="none" width="8" height="9">+ <path+ fillRule="evenodd"+ clipRule="evenodd"+ d="M7.66607 0.376042C8.01072 0.605806 8.10385 1.07146 7.87408 1.4161L3.54075 7.9161C3.40573 8.11863 3.18083 8.24304 2.93752 8.24979C2.69421 8.25654 2.46275 8.1448 2.31671 7.95008L0.150044 5.06119C-0.098484 4.72982 -0.0313267 4.25972 0.300044 4.01119C0.631415 3.76266 1.10152 3.82982 1.35004 4.16119L2.88068 6.20204L6.62601 0.584055C6.85577 0.239408 7.32142 0.146278 7.66607 0.376042Z"+ fill="currentColor"+ />+ </svg>+ </div>+ );+}diff --git a/client/src/components/Chat/Messages/Content/Image.tsx b/client/src/components/Chat/Messages/Content/Image.tsxindex 9043df30f9..059a4b75d3 100644--- a/client/src/components/Chat/Messages/Content/Image.tsx+++ b/client/src/components/Chat/Messages/Content/Image.tsx@@ -9,6 +9,7 @@ const Image = ({altText,height,width,+ placeholderDimensions,}: // n,// i,{@@ -16,6 +17,10 @@ const Image = ({altText: string;height: number;width: number;+ placeholderDimensions?: {+ height: string;+ width: string;+ };// n: number;// i: number;}) => {@@ -33,7 +38,9 @@ const Image = ({// const makeSquare = n >= 3 && i < 2;let placeholderHeight = '288px';- if (height > width) {+ if (placeholderDimensions?.height && placeholderDimensions?.width) {+ placeholderHeight = placeholderDimensions.height;+ } else if (height > width) {placeholderHeight = '900px';} else if (height === width) {placeholderHeight = width + 'px';@@ -49,6 +56,7 @@ const Image = ({// loading="lazy"alt={altText}onLoad={handleImageLoad}+ visibleByDefault={true}className={cn('max-h-[900px] max-w-full opacity-100 transition-opacity duration-300',// n >= 3 && i < 2 ? 'aspect-square object-cover' : '',@@ -57,14 +65,14 @@ const Image = ({src={imagePath}style={{height: isLoaded && minDisplayTimeElapsed ? 'auto' : placeholderHeight,- width,+ width: placeholderDimensions?.width ?? width,color: 'transparent',}}placeholder={<divstyle={{height: isLoaded && minDisplayTimeElapsed ? 'auto' : placeholderHeight,- width,+ width: placeholderDimensions?.width ?? width,}}/>}@@ -73,7 +81,9 @@ const Image = ({</Dialog.Trigger></div></div>- <DialogImage src={imagePath} height={height} width={width} />+ {isLoaded && minDisplayTimeElapsed && (+ <DialogImage src={imagePath} height={height} width={width} />+ )}</Dialog.Root>);};diff --git a/client/src/components/Chat/Messages/Content/ImageGen.tsx b/client/src/components/Chat/Messages/Content/ImageGen.tsxnew file mode 100644index 0000000000..21beda4c89--- /dev/null+++ b/client/src/components/Chat/Messages/Content/ImageGen.tsx@@ -0,0 +1,141 @@+import { useState } from 'react';+import ProgressCircle from './ProgressCircle';+import ProgressText from './ProgressText';+import { useProgress } from '~/hooks';++export default function ImageGen({+ initialProgress = 0.1,+ args = '',+}: {+ initialProgress: number;+ args: string;+}) {+ const progress = useProgress(initialProgress);+ const radius = 56.08695652173913;+ const circumference = 2 * Math.PI * radius;++ const offset = circumference - progress * circumference;+ const [showDetails, setShowDetails] = useState(false);++ // const [translate, setTranslate] = useState(0);+ // useEffect(() => {+ // const timer = setInterval(() => {+ // setTranslate((prevTranslate) => (prevTranslate + 1) % 360);+ // }, 20);+ // return () => clearInterval(timer);+ // }, []);+ // if (progress >= 1) {+ // return null;+ // }++ return (+ <div className="my-2.5 flex items-center gap-2.5">+ <div className="relative h-5 w-5 shrink-0">+ <div+ className="absolute left-0 top-0 flex h-full w-full items-center justify-center rounded-full bg-transparent text-white"+ style={{ opacity: 1, transform: 'none' }}+ data-projection-id="106"+ >+ <div>+ <svg+ xmlns="http://www.w3.org/2000/svg"+ xmlnsXlink="http://www.w3.org/1999/xlink"+ viewBox="0 0 20 20"+ width="20"+ height="20"+ style={{ width: '100%', height: '100%', transform: 'translate3d(0px, 0px, 0px)' }}+ preserveAspectRatio="xMidYMid meet"+ >+ <defs>+ <clipPath id="__lottie_element_24">+ <rect width="20" height="20" x="0" y="0" />+ </clipPath>+ </defs>+ <g clipPath="url(#__lottie_element_24)">+ <g+ style={{ display: 'block' }}+ transform="matrix(1,0,0,1,9.999999046325684,10.170669555664062)"+ opacity="1"+ >+ <g+ opacity="1"+ transform="matrix(1,0,0,1,-2.0937423706054688,-4.2560648918151855)"+ >+ <path+ fill="rgb(177,98,253)"+ fillOpacity="1"+ d=" M4.7193779945373535,0.4155600070953369 C4.442327976226807,-0.1385200023651123 3.651618003845215,-0.1385200023651123 3.374567985534668,0.4155600070953369 C2.276491403579712,2.6116867065429688 1.1784147024154663,4.8078131675720215 0.08033806085586548,7.003940105438232 C-0.16959194839000702,7.503779888153076 0.19388805329799652,8.091899871826172 0.7527380585670471,8.091899871826172 C2.948878049850464,8.091899871826172 5.145018100738525,8.091899871826172 7.341157913208008,8.091899871826172 C7.900058269500732,8.091899871826172 8.263558387756348,7.503779888153076 8.01365852355957,7.003940105438232 C6.91556453704834,4.8078131675720215 5.817471504211426,2.6116867065429688 4.7193779945373535,0.4155600070953369 C4.7193779945373535,0.4155600070953369 4.7193779945373535,0.4155600070953369 4.7193779945373535,0.4155600070953369 C4.7193779945373535,0.4155600070953369 4.7193779945373535,0.4155600070953369 4.7193779945373535,0.4155600070953369"+ />+ </g>+ </g>+ <g+ style={{ display: 'block' }}+ transform="matrix(1,0,0,1,9.999999046325684,10.170669555664062)"+ // transform={`matrix(1,0,0,1,${translate},10.170669555664062)`}+ opacity="1"+ >+ <g opacity="1" transform="matrix(1,0,0,1,-6.000233173370361,-1.244344711303711)">+ <path+ fill="rgb(177,98,253)"+ fillOpacity="1"+ d=" M3.2158396244049072,0.4155600070953369 C2.9387896060943604,-0.1385200023651123 2.1480696201324463,-0.1385200023651123 1.8710296154022217,0.4155600070953369 C1.2741318941116333,1.609339952468872 0.6772342324256897,2.8031198978424072 0.08033652603626251,3.9969000816345215 C-0.16959036886692047,4.496739864349365 0.19388863444328308,5.084849834442139 0.7527406215667725,5.084849834442139 C1.9465336799621582,5.084849834442139 3.140326738357544,5.084849834442139 4.33411979675293,5.084849834442139 C4.892979621887207,5.084849834442139 5.2564496994018555,4.496739864349365 5.006529808044434,3.9969000816345215 C4.409633159637451,2.8031198978424072 3.8127362728118896,1.609339952468872 3.2158396244049072,0.4155600070953369 C3.2158396244049072,0.4155600070953369 3.2158396244049072,0.4155600070953369 3.2158396244049072,0.4155600070953369 C3.2158396244049072,0.4155600070953369 3.2158396244049072,0.4155600070953369 3.2158396244049072,0.4155600070953369"+ />+ </g>+ </g>+ <g+ style={{ display: 'block' }}+ transform="matrix(1,0,0,1,9.999999046325684,10.170669555664062)"+ opacity="1"+ >+ <g opacity="1" transform="matrix(1,0,0,1,-2.9004335403442383,3.5173749923706055)">+ <path+ fill="rgb(177,98,253)"+ fillOpacity="1"+ d=" M0,0 C1.396156668663025,0 2.79231333732605,0 4.188469886779785,0 C4.188469886779785,0.1073966696858406 4.188469886779785,0.2147933393716812 4.188469886779785,0.32218998670578003 C2.79231333732605,0.32218998670578003 1.396156668663025,0.32218998670578003 0,0.32218998670578003 C0,0.2147933393716812 0,0.1073966696858406 0,0 C0,0 0,0 0,0 C0,0 0,0 0,0"+ />+ </g>+ </g>+ <g style={{ display: 'block' }} transform="matrix(-1,0,0,-1,10,10)" opacity="1">+ <g opacity="1" transform="matrix(1,0,0,1,0,0)">+ <path+ fill="rgb(255,214,64)"+ fillOpacity="0"+ d=" M9,-9 C9,-9 9,9 9,9 C9,9 -9,9 -9,9 C-9,9 -9,-9 -9,-9 C-9,-9 9,-9 9,-9z"+ />+ </g>+ </g>+ <g style={{ display: 'block' }} transform="matrix(-1,0,0,-1,10,10)" opacity="1">+ <g opacity="0" transform="matrix(1,0,0,1,-2.1999998092651367,-3.507655143737793)">+ <path+ fill="rgb(177,98,253)"+ fillOpacity="1"+ d=" M0,-1.5035200119018555 C0.8298037648200989,-1.5035200119018555 1.5035400390625,-0.8297926783561707 1.5035400390625,0 C1.5035400390625,0.8297926783561707 0.8298037648200989,1.5035200119018555 0,1.5035200119018555 C-0.8298037648200989,1.5035200119018555 -1.5035400390625,0.8297926783561707 -1.5035400390625,0 C-1.5035400390625,-0.8297926783561707 -0.8298037648200989,-1.5035200119018555 0,-1.5035200119018555z"+ />+ </g>+ </g>+ {/* Moon SVG */}+ <g style={{ display: 'block' }} transform="matrix(-1,0,0,-1,10,10)" opacity="1">+ <g opacity="1" transform="matrix(-1,0,0,-1,3.75,5.5)">+ <path+ fill="rgb(177,98,253)"+ fillOpacity="1"+ d=" M2.660290002822876,2.2502501010894775 C2.7567598819732666,2.2502501010894775 2.850860118865967,2.241950035095215 2.9425699710845947,2.225330114364624 C3.034290075302124,2.208709955215454 3.1081299781799316,2.1867599487304688 3.164109945297241,2.1594600677490234 C3.239150047302246,2.120300054550171 3.305850028991699,2.100709915161133 3.364219903945923,2.100709915161133 C3.405900001525879,2.100709915161133 3.438659906387329,2.113770008087158 3.462480068206787,2.1398799419403076 C3.487489938735962,2.165990114212036 3.5,2.2009999752044678 3.5,2.2449100017547607 C3.5,2.2698400020599365 3.4958300590515137,2.2983200550079346 3.487489938735962,2.3303699493408203 C3.4803500175476074,2.362410068511963 3.468440055847168,2.3968300819396973 3.4517600536346436,2.433619976043701 C3.3803000450134277,2.5950300693511963 3.287990093231201,2.7410099506378174 3.1748299598693848,2.871570110321045 C3.0628700256347656,3.002120018005371 2.9348299503326416,3.1142799854278564 2.790709972381592,3.2080399990081787 C2.646589994430542,3.3029799461364746 2.4905600547790527,3.375380039215088 2.3226099014282227,3.425230026245117 C2.15585994720459,3.4750800132751465 1.9825600385665894,3.5 1.8027100563049316,3.5 C1.5430500507354736,3.5 1.3036400079727173,3.4554901123046875 1.0844800472259521,3.3664801120758057 C0.8653200268745422,3.2786500453948975 0.6741499900817871,3.1540400981903076 0.5109699964523315,2.9926199913024902 C0.34898999333381653,2.831209897994995 0.22333000600337982,2.641319990158081 0.1340000033378601,2.4229400157928467 C0.04467000067234039,2.2045600414276123 0,1.9660099744796753 0,1.7072700262069702 C0,1.4639699459075928 0.04645000025629997,1.2325400114059448 0.1393599957227707,1.012969970703125 C0.23226000368595123,0.7922199964523315 0.3626900017261505,0.5975800156593323 0.5306299924850464,0.4290440082550049 C0.6997600197792053,0.2593249976634979 0.8968899846076965,0.12877200543880463 1.121999979019165,0.03738600015640259 C1.1541600227355957,0.024329999461770058 1.1833399534225464,0.01483600027859211 1.2095500230789185,0.008901000022888184 C1.2369400262832642,0.0029670000076293945 1.2631399631500244,2.220446049250313e-16 1.288159966468811,2.220446049250313e-16 C1.335800051689148,2.220446049250313e-16 1.3733199834823608,0.014241999946534634 1.4007099866867065,0.042725998908281326 C1.4292999505996704,0.07121100276708603 1.4435900449752808,0.10681600123643875 1.4435900449752808,0.14954200387001038 C1.4435900449752808,0.1780260056257248 1.438230037689209,0.2076980024576187 1.4275100231170654,0.23855499923229218 C1.41798996925354,0.2682270109653473 1.404289960861206,0.2996779978275299 1.3864200115203857,0.3329089879989624 C1.3625999689102173,0.3768230080604553 1.3423500061035156,0.4302310049533844 1.3256800174713135,0.493133008480072 C1.309000015258789,0.5548499822616577 1.296489953994751,0.6225000023841858 1.288159966468811,0.6960800290107727 C1.2798199653625488,0.7684800028800964 1.2756500244140625,0.8414700031280518 1.2756500244140625,0.9150599837303162 C1.2756500244140625,1.1215699911117554 1.3072099685668945,1.3073099851608276 1.3703399896621704,1.4722800254821777 C1.4346599578857422,1.6372499465942383 1.5269700288772583,1.7778899669647217 1.6472699642181396,1.8941999673843384 C1.7675700187683105,2.0093300342559814 1.9128799438476562,2.097749948501587 2.083209991455078,2.1594600677490234 C2.2547199726104736,2.2199900150299072 2.44707989692688,2.2502501010894775 2.660290002822876,2.2502501010894775 C2.660290002822876,2.2502501010894775 2.660290002822876,2.2502501010894775 2.660290002822876,2.2502501010894775 C2.660290002822876,2.2502501010894775 2.660290002822876,2.2502501010894775 2.660290002822876,2.2502501010894775"+ />+ </g>+ </g>+ </g>+ </svg>+ </div>+ <ProgressCircle radius={radius} circumference={circumference} offset={offset} />+ </div>+ </div>+ <ProgressText+ progress={progress}+ onClick={() => setShowDetails((prev) => !prev)}+ inProgressText="Creating Image"+ finishedText="Finished."+ hasInput={false}+ />+ </div>+ );+}diff --git a/client/src/components/Chat/Messages/Content/InProgressCall.tsx b/client/src/components/Chat/Messages/Content/InProgressCall.tsxnew file mode 100644index 0000000000..c2e9fc35f8--- /dev/null+++ b/client/src/components/Chat/Messages/Content/InProgressCall.tsx@@ -0,0 +1,19 @@+import CancelledIcon from './CancelledIcon';++export default function InProgressCall({+ error,+ isSubmitting,+ progress,+ children,+}: {+ error?: boolean;+ isSubmitting: boolean;+ progress: number;+ children: React.ReactNode;+}) {+ if ((!isSubmitting && progress < 1) || error) {+ return <CancelledIcon />;+ }++ return <>{children}</>;+}diff --git a/client/src/components/Chat/Messages/Content/Markdown.tsx b/client/src/components/Chat/Messages/Content/Markdown.tsxindex 8761e2f8c2..ef438a1521 100644--- a/client/src/components/Chat/Messages/Content/Markdown.tsx+++ b/client/src/components/Chat/Messages/Content/Markdown.tsx@@ -16,7 +16,7 @@ import store from '~/store';type TCodeProps = {inline: boolean;- className: string;+ className?: string;children: React.ReactNode;};@@ -26,7 +26,7 @@ type TContentProps = {showCursor?: boolean;};-const code = memo(({ inline, className, children }: TCodeProps) => {+export const code = memo(({ inline, className, children }: TCodeProps) => {const match = /language-(\w+)/.exec(className || '');const lang = match && match[1];@@ -37,7 +37,7 @@ const code = memo(({ inline, className, children }: TCodeProps) => {}});-const p = memo(({ children }: { children: React.ReactNode }) => {+export const p = memo(({ children }: { children: React.ReactNode }) => {return <p className="mb-2 whitespace-pre-wrap">{children}</p>;});diff --git a/client/src/components/Chat/Messages/Content/MarkdownLite.tsx b/client/src/components/Chat/Messages/Content/MarkdownLite.tsxnew file mode 100644index 0000000000..6f8404b7c0--- /dev/null+++ b/client/src/components/Chat/Messages/Content/MarkdownLite.tsx@@ -0,0 +1,44 @@+import { memo } from 'react';+import remarkGfm from 'remark-gfm';+import remarkMath from 'remark-math';+import rehypeKatex from 'rehype-katex';+import supersub from 'remark-supersub';+import ReactMarkdown from 'react-markdown';+import rehypeHighlight from 'rehype-highlight';+import type { PluggableList } from 'unified';+import { langSubset } from '~/utils';+import { code, p } from './Markdown';++const MarkdownLite = memo(({ content = '' }: { content?: string }) => {+ const rehypePlugins: PluggableList = [+ [rehypeKatex, { output: 'mathml' }],+ [+ rehypeHighlight,+ {+ detect: true,+ ignoreMissing: true,+ subset: langSubset,+ },+ ],+ ];++ return (+ <ReactMarkdown+ remarkPlugins={[supersub, remarkGfm, [remarkMath, { singleDollarTextMath: true }]]}+ rehypePlugins={rehypePlugins}+ linkTarget="_new"+ components={+ {+ code,+ p,+ } as {+ [nodeType: string]: React.ElementType;+ }+ }+ >+ {content}+ </ReactMarkdown>+ );+});++export default MarkdownLite;diff --git a/client/src/components/Chat/Messages/Content/MessageContent.tsx b/client/src/components/Chat/Messages/Content/MessageContent.tsxindex b47fa0c140..42f06373f0 100644--- a/client/src/components/Chat/Messages/Content/MessageContent.tsx+++ b/client/src/components/Chat/Messages/Content/MessageContent.tsx@@ -1,6 +1,7 @@import { Fragment, Suspense } from 'react';-import type { TResPlugin } from 'librechat-data-provider';-import type { TMessageContent, TText, TDisplayProps } from '~/common';+import type { TResPlugin, TFile } from 'librechat-data-provider';+import type { TMessageContentProps, TText, TDisplayProps } from '~/common';+import FileContainer from '~/components/Chat/Input/Files/FileContainer';import Plugin from '~/components/Messages/Content/Plugin';import Error from '~/components/Messages/Content/Error';import { DelayedRender } from '~/components/ui';@@ -11,7 +12,7 @@ import Markdown from './Markdown';import { cn } from '~/utils';import Image from './Image';-const ErrorMessage = ({ text }: TText) => {+export const ErrorMessage = ({ text }: TText) => {const { logout } = useAuthContext();if (text.includes('ban')) {@@ -29,16 +30,24 @@ const ErrorMessage = ({ text }: TText) => {// Display Message Componentconst DisplayMessage = ({ text, isCreatedByUser, message, showCursor }: TDisplayProps) => {+ const files: TFile[] = [];const imageFiles = message?.files- ? message.files.filter((file) => file.type && file.type.startsWith('image/'))+ ? message.files.filter((file) => {+ if (file.type && file.type.startsWith('image/')) {+ return true;+ }++ files.push(file);+ }): null;return (<Container>+ {files.length > 0 && files.map((file) => <FileContainer key={file.file_id} file={file} />)}{imageFiles &&imageFiles.map((file) => (<Imagekey={file.file_id}- imagePath={file.preview ?? file.filepath ?? ''}+ imagePath={file?.preview ?? file.filepath ?? ''}height={file.height ?? 1920}width={file.width ?? 1080}altText={file.filename ?? 'Uploaded Image'}@@ -63,8 +72,8 @@ const DisplayMessage = ({ text, isCreatedByUser, message, showCursor }: TDisplay};// Unfinished Message Component-const UnfinishedMessage = () => (- <ErrorMessage text="The response is incomplete; it's either still processing, was cancelled, or censored. Refresh or try a different prompt." />+export const UnfinishedMessage = () => (+ <ErrorMessage text="The response is incomplete; it's either still processing, was cancelled, or censoreded. Refresh or try a different prompt." />);// Content Component@@ -76,7 +85,7 @@ const MessageContent = ({isSubmitting,isLast,...props-}: TMessageContent) => {+}: TMessageContentProps) => {if (error) {return <ErrorMessage text={text} />;} else if (edit) {diff --git a/client/src/components/Chat/Messages/Content/Part.tsx b/client/src/components/Chat/Messages/Content/Part.tsxnew file mode 100644index 0000000000..e4917c1397--- /dev/null+++ b/client/src/components/Chat/Messages/Content/Part.tsx@@ -0,0 +1,124 @@+import { ToolCallTypes, ContentTypes, imageGenTools } from 'librechat-data-provider';+import type { TMessageContentParts, TMessage } from 'librechat-data-provider';+import type { TDisplayProps } from '~/common';+import RetrievalCall from './RetrievalCall';+import CodeAnalyze from './CodeAnalyze';+import Container from './Container';+import ToolCall from './ToolCall';+import Markdown from './Markdown';+import ImageGen from './ImageGen';+import Image from './Image';+import { cn } from '~/utils';++// import EditMessage from './EditMessage';++// Display Message Component+const DisplayMessage = ({ text, isCreatedByUser = false, message, showCursor }: TDisplayProps) => {+ return (+ <div+ className={cn(+ 'markdown prose dark:prose-invert light w-full break-words',+ isCreatedByUser ? 'whitespace-pre-wrap dark:text-gray-20' : 'dark:text-gray-70',+ )}+ >+ {!isCreatedByUser ? (+ <Markdown content={text} message={message} showCursor={showCursor} />+ ) : (+ <>{text}</>+ )}+ </div>+ );+};++export default function Part({+ part,+ showCursor,+ isSubmitting,+ message,+}: {+ part: TMessageContentParts;+ isSubmitting: boolean;+ showCursor: boolean;+ message: TMessage;+}) {+ if (!part) {+ return null;+ }+ if (part.type === ContentTypes.TEXT) {+ // Access the value property+ return (+ <Container>+ <div className="markdown prose dark:prose-invert light my-1 w-full break-words dark:text-gray-70">+ <DisplayMessage+ text={part[ContentTypes.TEXT].value}+ isCreatedByUser={message.isCreatedByUser}+ message={message}+ showCursor={showCursor}+ />+ </div>+ </Container>+ );+ } else if (+ part.type === ContentTypes.TOOL_CALL &&+ part[ContentTypes.TOOL_CALL].type === ToolCallTypes.CODE_INTERPRETER+ ) {+ const toolCall = part[ContentTypes.TOOL_CALL];+ const code_interpreter = toolCall[ToolCallTypes.CODE_INTERPRETER];+ return (+ <CodeAnalyze+ initialProgress={toolCall.progress ?? 0.1}+ code={code_interpreter.input}+ outputs={code_interpreter.outputs ?? []}+ />+ );+ } else if (+ part.type === ContentTypes.TOOL_CALL &&+ part[ContentTypes.TOOL_CALL].type === ToolCallTypes.RETRIEVAL+ ) {+ const toolCall = part[ContentTypes.TOOL_CALL];+ return <RetrievalCall initialProgress={toolCall.progress ?? 0.1} isSubmitting={isSubmitting} />;+ } else if (+ part.type === ContentTypes.TOOL_CALL &&+ part[ContentTypes.TOOL_CALL].type === ToolCallTypes.FUNCTION &&+ imageGenTools.has(part[ContentTypes.TOOL_CALL].function.name)+ ) {+ const toolCall = part[ContentTypes.TOOL_CALL];+ return (+ <ImageGen initialProgress={toolCall.progress ?? 0.1} args={toolCall.function.arguments} />+ );+ } else if (+ part.type === ContentTypes.TOOL_CALL &&+ part[ContentTypes.TOOL_CALL].type === ToolCallTypes.FUNCTION+ ) {+ const toolCall = part[ContentTypes.TOOL_CALL];+ return (+ <ToolCall+ initialProgress={toolCall.progress ?? 0.1}+ isSubmitting={isSubmitting}+ args={toolCall.function.arguments}+ name={toolCall.function.name}+ output={toolCall.function.output}+ />+ );+ } else if (part.type === ContentTypes.IMAGE_FILE) {+ const imageFile = part[ContentTypes.IMAGE_FILE];+ const height = imageFile.height ?? 1920;+ const width = imageFile.width ?? 1080;+ return (+ <Image+ imagePath={imageFile.filepath}+ height={height}+ width={width}+ altText={imageFile.filename ?? 'Uploaded Image'}+ placeholderDimensions={{+ height: height + 'px',+ width: width + 'px',+ }}+ // n={imageFiles.length}+ // i={i}+ />+ );+ }++ return null;+}diff --git a/client/src/components/Chat/Messages/Content/ProgressCircle.tsx b/client/src/components/Chat/Messages/Content/ProgressCircle.tsxnew file mode 100644index 0000000000..60704b4705--- /dev/null+++ b/client/src/components/Chat/Messages/Content/ProgressCircle.tsx@@ -0,0 +1,38 @@+export default function ProgressCircle({+ radius,+ circumference,+ offset,+}: {+ radius: number;+ circumference: number;+ offset: number;+}) {+ return (+ <svg+ width="120"+ height="120"+ viewBox="0 0 120 120"+ className="absolute left-1/2 top-1/2 h-[23px] w-[23px] -translate-x-1/2 -translate-y-1/2 text-brand-purple"+ >+ <circle+ className="origin-[50%_50%] -rotate-90 stroke-brand-purple/25 dark:stroke-brand-purple/50"+ strokeWidth="7.826086956521739"+ fill="transparent"+ r={radius}+ cx="60"+ cy="60"+ />+ <circle+ className="origin-[50%_50%] -rotate-90 transition-[stroke-dashoffset]"+ stroke="currentColor"+ strokeWidth="7.826086956521739"+ strokeDasharray={`${circumference} ${circumference}`}+ strokeDashoffset={offset}+ fill="transparent"+ r={radius}+ cx="60"+ cy="60"+ />+ </svg>+ );+}diff --git a/client/src/components/Chat/Messages/Content/ProgressText.tsx b/client/src/components/Chat/Messages/Content/ProgressText.tsxnew file mode 100644index 0000000000..a90c8ec668--- /dev/null+++ b/client/src/components/Chat/Messages/Content/ProgressText.tsx@@ -0,0 +1,71 @@+import * as Popover from '@radix-ui/react-popover';+import { cn } from '~/utils';++const Wrapper = ({ popover, children }: { popover: boolean; children: React.ReactNode }) => {+ if (popover) {+ return (+ <div className="text-token-text-secondary relative -mt-[0.75px] h-5 w-full leading-5">+ <Popover.Trigger asChild>+ <div+ className="absolute left-0 top-0 line-clamp-1 overflow-visible"+ style={{ opacity: 1, transform: 'none' }}+ data-projection-id="78"+ >+ {children}+ </div>+ </Popover.Trigger>+ </div>+ );+ }++ return (+ <div className="text-token-text-secondary relative -mt-[0.75px] h-5 w-full leading-5">+ <div+ className="absolute left-0 top-0 line-clamp-1 overflow-visible"+ style={{ opacity: 1, transform: 'none' }}+ data-projection-id="78"+ >+ {children}+ </div>+ </div>+ );+};++export default function ProgressText({+ progress,+ onClick,+ inProgressText,+ finishedText,+ hasInput = true,+ popover = false,+}: {+ progress: number;+ onClick: () => void;+ inProgressText: string;+ finishedText: string;+ hasInput?: boolean;+ popover?: boolean;+}) {+ return (+ <Wrapper popover={popover}>+ <button+ type="button"+ className={cn('inline-flex items-center gap-1', hasInput ? '' : 'pointer-events-none')}+ disabled={!hasInput}+ onClick={onClick}+ >+ {progress < 1 ? inProgressText : finishedText}+ <svg width="16" height="17" viewBox="0 0 16 17" fill="none">+ <path+ className={hasInput ? '' : 'stroke-transparent'}+ d="M11.3346 7.83203L8.00131 11.1654L4.66797 7.83203"+ stroke="currentColor"+ strokeWidth="2"+ strokeLinecap="round"+ strokeLinejoin="round"+ />+ </svg>+ </button>+ </Wrapper>+ );+}diff --git a/client/src/components/Chat/Messages/Content/RetrievalCall.tsx b/client/src/components/Chat/Messages/Content/RetrievalCall.tsxnew file mode 100644index 0000000000..4c2465f3c3--- /dev/null+++ b/client/src/components/Chat/Messages/Content/RetrievalCall.tsx@@ -0,0 +1,53 @@+import ProgressCircle from './ProgressCircle';+import InProgressCall from './InProgressCall';+import RetrievalIcon from './RetrievalIcon';+import CancelledIcon from './CancelledIcon';+import ProgressText from './ProgressText';+import FinishedIcon from './FinishedIcon';+import { useProgress } from '~/hooks';++export default function RetrievalCall({+ initialProgress = 0.1,+ isSubmitting,+}: {+ initialProgress: number;+ isSubmitting: boolean;+}) {+ const progress = useProgress(initialProgress);+ const radius = 56.08695652173913;+ const circumference = 2 * Math.PI * radius;+ const offset = circumference - progress * circumference;+ const error = progress >= 2;++ return (+ <div className="my-2.5 flex items-center gap-2.5">+ <div className="relative h-5 w-5 shrink-0">+ {progress < 1 ? (+ <InProgressCall progress={progress} isSubmitting={isSubmitting} error={error}>+ <div+ className="absolute left-0 top-0 flex h-full w-full items-center justify-center rounded-full bg-transparent text-white"+ style={{ opacity: 1, transform: 'none' }}+ >+ <div>+ <RetrievalIcon />+ </div>+ <ProgressCircle radius={radius} circumference={circumference} offset={offset} />+ </div>+ </InProgressCall>+ ) : error ? (+ <CancelledIcon />+ ) : (+ <FinishedIcon />+ )}+ </div>+ <ProgressText+ progress={progress}+ onClick={() => ({})}+ inProgressText={'Searching my knowledge'}+ finishedText={'Used Retrieval'}+ hasInput={false}+ popover={false}+ />+ </div>+ );+}diff --git a/client/src/components/Chat/Messages/Content/RetrievalIcon.tsx b/client/src/components/Chat/Messages/Content/RetrievalIcon.tsxnew file mode 100644index 0000000000..fd9dfec07d--- /dev/null+++ b/client/src/components/Chat/Messages/Content/RetrievalIcon.tsx@@ -0,0 +1,80 @@+export default function RetrievalIcon() {+ return (+ <svg+ xmlns="http://www.w3.org/2000/svg"+ xmlnsXlink="http://www.w3.org/1999/xlink"+ viewBox="0 0 20 20"+ width="20"+ height="20"+ style={{ width: '100%', height: '100%', transform: 'translate3d(0px, 0px, 0px)' }}+ preserveAspectRatio="xMidYMid meet"+ >+ <defs>+ <clipPath id="__lottie_element_258">+ <rect width="20" height="20" x="0" y="0" />+ </clipPath>+ <clipPath id="__lottie_element_263">+ <path d="M0,0 L20000,0 L20000,20000 L0,20000z" />+ </clipPath>+ <clipPath id="__lottie_element_270">+ <path d="M0,0 L20000,0 L20000,20000 L0,20000z" />+ </clipPath>+ </defs>+ <g clipPath="url(#__lottie_element_258)">+ <g+ clipPath="url(#__lottie_element_263)"+ style={{ display: 'block' }}+ transform="matrix(0.9999999403953552,0,0,0.9999999403953552,-10000,-10000)"+ opacity="1"+ >+ <g+ clipPath="url(#__lottie_element_270)"+ style={{ display: 'block' }}+ transform="matrix(0.9999988675117493,0,0,0.9999988675117493,10.01171875,10.01171875)"+ opacity="1"+ >+ <g style={{ display: 'block' }} transform="matrix(1,0,0,1,10000,10000)" opacity="1">+ <g opacity="1" transform="matrix(1,0,0,1,-3.25,-2.125)">+ <path+ fill="rgb(177,97,253)"+ fillOpacity="1"+ d=" M0,0.75 C0,0.3357900083065033 0.3357900083065033,8.881784197001252e-16 0.75,8.881784197001252e-16 C2.4166667461395264,8.881784197001252e-16 4.083333492279053,8.881784197001252e-16 5.75,8.881784197001252e-16 C6.1641998291015625,8.881784197001252e-16 6.5,0.3357900083065033 6.5,0.75 C6.5,1.1642099618911743 6.1641998291015625,1.5 5.75,1.5 C4.083333492279053,1.5 2.4166667461395264,1.5 0.75,1.5 C0.3357900083065033,1.5 0,1.1642099618911743 0,0.75 C0,0.75 0,0.75 0,0.75 C0,0.75 0,0.75 0,0.75"+ />+ </g>+ </g>+ <g style={{ display: 'block' }} transform="matrix(1,0,0,1,10000,10000)" opacity="1">+ <g opacity="1" transform="matrix(1,0,0,1,-3.25,0.625)">+ <path+ fill="rgb(177,97,253)"+ fillOpacity="1"+ d=" M0,0.75 C0,0.3357999920845032 0.3357900083065033,0 0.75,0 C1.9166666269302368,0 3.0833332538604736,0 4.25,0 C4.6641998291015625,0 5,0.3357999920845032 5,0.75 C5,1.164199948310852 4.6641998291015625,1.5 4.25,1.5 C3.0833332538604736,1.5 1.9166666269302368,1.5 0.75,1.5 C0.3357900083065033,1.5 0,1.164199948310852 0,0.75 C0,0.75 0,0.75 0,0.75 C0,0.75 0,0.75 0,0.75"+ />+ </g>+ </g>+ </g>+ <g style={{ display: 'block' }} transform="matrix(1,0,0,1,10000,10000)" opacity="1">+ <g opacity="1" transform="matrix(1,0,0,1,10,10)">+ <path+ fill="rgb(177,97,253)"+ fillOpacity="1"+ d=" M-3.13,-5.25 C-3.09,-5.25 -3.04,-5.25 -3,-5.25 C-2.59,-5.25 -2.25,-4.91 -2.25,-4.5 C-2.25,-4.09 -2.59,-3.75 -3,-3.75 C-3.03,-3.75 -3.07,-3.75 -3.1,-3.75 C-3.53,-3.75 -3.81,-3.75 -4.02,-3.73 C-4.23,-3.72 -4.3,-3.69 -4.34,-3.67 C-4.48,-3.6 -4.6,-3.48 -4.67,-3.34 C-4.69,-3.3 -4.72,-3.23 -4.73,-3.02 C-4.75,-2.81 -4.75,-2.53 -4.75,-2.1 C-4.75,-2.07 -4.75,-2.03 -4.75,-2 C-4.75,-1.59 -5.09,-1.25 -5.5,-1.25 C-5.91,-1.25 -6.25,-1.59 -6.25,-2 C-6.25,-2.04 -6.25,-2.09 -6.25,-2.13 C-6.25,-2.52 -6.25,-2.87 -6.23,-3.15 C-6.2,-3.44 -6.15,-3.74 -6,-4.02 C-5.79,-4.44 -5.44,-4.79 -5.02,-5 C-4.74,-5.15 -4.44,-5.2 -4.15,-5.23 C-3.87,-5.25 -3.52,-5.25 -3.13,-5.25 C-3.13,-5.25 -3.13,-5.25 -3.13,-5.25 C-3.13,-5.25 -3.13,-5.25 -3.13,-5.25 M6.25,-2.13 C6.25,-2.09 6.25,-2.04 6.25,-2 C6.25,-1.59 5.91,-1.25 5.5,-1.25 C5.09,-1.25 4.75,-1.59 4.75,-2 C4.75,-2.03 4.75,-2.07 4.75,-2.1 C4.75,-2.53 4.75,-2.81 4.73,-3.02 C4.72,-3.23 4.69,-3.3 4.67,-3.34 C4.6,-3.48 4.48,-3.6 4.34,-3.67 C4.3,-3.69 4.23,-3.72 4.02,-3.73 C3.81,-3.75 3.53,-3.75 3.1,-3.75 C3.07,-3.75 3.03,-3.75 3,-3.75 C2.59,-3.75 2.25,-4.09 2.25,-4.5 C2.25,-4.91 2.59,-5.25 3,-5.25 C3.04,-5.25 3.09,-5.25 3.13,-5.25 C3.52,-5.25 3.87,-5.25 4.15,-5.23 C4.44,-5.2 4.74,-5.15 5.02,-5 C5.44,-4.79 5.79,-4.44 6,-4.02 C6.15,-3.74 6.2,-3.44 6.23,-3.15 C6.25,-2.87 6.25,-2.52 6.25,-2.13 C6.25,-2.13 6.25,-2.13 6.25,-2.13 C6.25,-2.13 6.25,-2.13 6.25,-2.13 M-3.13,5.25 C-3.09,5.25 -3.04,5.25 -3,5.25 C-2.59,5.25 -2.25,4.91 -2.25,4.5 C-2.25,4.09 -2.59,3.75 -3,3.75 C-3.03,3.75 -3.07,3.75 -3.1,3.75 C-3.53,3.75 -3.81,3.75 -4.02,3.73 C-4.23,3.72 -4.3,3.69 -4.34,3.67 C-4.48,3.6 -4.6,3.48 -4.67,3.34 C-4.69,3.3 -4.72,3.23 -4.73,3.02 C-4.75,2.81 -4.75,2.53 -4.75,2.1 C-4.75,2.07 -4.75,2.03 -4.75,2 C-4.75,1.59 -5.09,1.25 -5.5,1.25 C-5.91,1.25 -6.25,1.59 -6.25,2 C-6.25,2.04 -6.25,2.09 -6.25,2.13 C-6.25,2.52 -6.25,2.87 -6.23,3.15 C-6.2,3.44 -6.15,3.74 -6,4.02 C-5.79,4.44 -5.44,4.79 -5.02,5 C-4.74,5.15 -4.44,5.2 -4.15,5.23 C-3.87,5.25 -3.52,5.25 -3.13,5.25 C-3.13,5.25 -3.13,5.25 -3.13,5.25 C-3.13,5.25 -3.13,5.25 -3.13,5.25 M6.25,2.13 C6.25,2.09 6.25,2.04 6.25,2 C6.25,1.59 5.91,1.25 5.5,1.25 C5.09,1.25 4.75,1.59 4.75,2 C4.75,2.03 4.75,2.07 4.75,2.1 C4.75,2.53 4.75,2.81 4.73,3.02 C4.72,3.23 4.69,3.3 4.67,3.34 C4.6,3.48 4.48,3.6 4.34,3.67 C4.3,3.69 4.23,3.72 4.02,3.73 C3.81,3.75 3.53,3.75 3.1,3.75 C3.07,3.75 3.03,3.75 3,3.75 C2.59,3.75 2.25,4.09 2.25,4.5 C2.25,4.91 2.59,5.25 3,5.25 C3.04,5.25 3.09,5.25 3.13,5.25 C3.52,5.25 3.87,5.25 4.15,5.23 C4.44,5.2 4.74,5.15 5.02,5 C5.44,4.79 5.79,4.44 6,4.02 C6.15,3.74 6.2,3.44 6.23,3.15 C6.25,2.87 6.25,2.52 6.25,2.13 C6.25,2.13 6.25,2.13 6.25,2.13 C6.25,2.13 6.25,2.13 6.25,2.13"+ />+ <g opacity="1" transform="matrix(1,0,0,1,-6.250000476837158,-5.250000476837158)">+ <path fill="rgb(177,97,253)" fillOpacity="1" d="M0 0" />+ </g>+ <g opacity="1" transform="matrix(1,0,0,1,2.25,-5.250000476837158)">+ <path fill="rgb(177,97,253)" fillOpacity="1" d="M0 0" />+ </g>+ <g opacity="1" transform="matrix(1,0,0,1,-6.250000476837158,1.25)">+ <path fill="rgb(177,97,253)" fillOpacity="1" d="M0 0" />+ </g>+ <g opacity="1" transform="matrix(1,0,0,1,2.25,1.25)">+ <path fill="rgb(177,97,253)" fillOpacity="1" d="M0 0" />+ </g>+ </g>+ </g>+ </g>+ </g>+ </svg>+ );+}diff --git a/client/src/components/Chat/Messages/Content/ToolCall.tsx b/client/src/components/Chat/Messages/Content/ToolCall.tsxnew file mode 100644index 0000000000..a130e8dfcd--- /dev/null+++ b/client/src/components/Chat/Messages/Content/ToolCall.tsx@@ -0,0 +1,72 @@+// import { useState, useEffect } from 'react';+import { actionDelimiter } from 'librechat-data-provider';+import * as Popover from '@radix-ui/react-popover';+import ProgressCircle from './ProgressCircle';+import InProgressCall from './InProgressCall';+import CancelledIcon from './CancelledIcon';+import ProgressText from './ProgressText';+import FinishedIcon from './FinishedIcon';+import ToolPopover from './ToolPopover';+// import ActionIcon from './ActionIcon';+import WrenchIcon from './WrenchIcon';+import { useProgress } from '~/hooks';++export default function ToolCall({+ initialProgress = 0.1,+ isSubmitting,+ name,+ args = '',+ output,+}: {+ initialProgress: number;+ isSubmitting: boolean;+ name: string;+ args: string;+ output?: string | null;+}) {+ const progress = useProgress(initialProgress);+ const radius = 56.08695652173913;+ const circumference = 2 * Math.PI * radius;+ const offset = circumference - progress * circumference;++ const [function_name, domain] = name.split(actionDelimiter);+ const error = output?.toLowerCase()?.includes('error processing tool');++ return (+ <Popover.Root>+ <div className="my-2.5 flex items-center gap-2.5">+ <div className="relative h-5 w-5 shrink-0">+ {progress < 1 ? (+ <InProgressCall progress={progress} isSubmitting={isSubmitting} error={error}>+ <div+ className="absolute left-0 top-0 flex h-full w-full items-center justify-center rounded-full bg-transparent text-white"+ style={{ opacity: 1, transform: 'none' }}+ data-projection-id="849"+ >+ <div>+ <WrenchIcon />+ </div>+ <ProgressCircle radius={radius} circumference={circumference} offset={offset} />+ </div>+ </InProgressCall>+ ) : error ? (+ <CancelledIcon />+ ) : (+ <FinishedIcon />+ )}+ </div>+ <ProgressText+ progress={progress}+ onClick={() => ({})}+ inProgressText={'Running action'}+ finishedText={domain ? `Talked to ${domain}` : `Ran ${function_name}`}+ hasInput={!!args?.length}+ popover={true}+ />+ {!!args?.length && (+ <ToolPopover input={args} output={output} domain={domain} function_name={function_name} />+ )}+ </div>+ </Popover.Root>+ );+}diff --git a/client/src/components/Chat/Messages/Content/ToolPopover.tsx b/client/src/components/Chat/Messages/Content/ToolPopover.tsxnew file mode 100644index 0000000000..971cdb7afa--- /dev/null+++ b/client/src/components/Chat/Messages/Content/ToolPopover.tsx@@ -0,0 +1,56 @@+import * as Popover from '@radix-ui/react-popover';++export default function ToolPopover({+ input,+ output,+ function_name,+ domain,+}: {+ input: string;+ function_name: string;+ output?: string | null;+ domain?: string;+}) {+ const formatText = (text: string) => {+ try {+ return JSON.stringify(JSON.parse(text), null, 2);+ } catch {+ return text;+ }+ };++ return (+ <Popover.Portal>+ <Popover.Content+ side="bottom"+ align="start"+ sideOffset={12}+ alignOffset={-5}+ className="w-18 min-w-[180px] max-w-sm rounded-lg bg-white dark:bg-gray-900"+ >+ <div tabIndex={-1}>+ <div className="bg-token-surface-primary max-w-sm rounded-md p-2 shadow-[0_0_24px_0_rgba(0,0,0,0.05),inset_0_0.5px_0_0_rgba(0,0,0,0.05),0_2px_8px_0_rgba(0,0,0,0.05)]">+ <div className="mb-2 text-sm font-medium dark:text-gray-100">+ {domain ? 'Assistant sent this info to ' + domain : `Assistant used ${function_name}`}+ </div>+ <div className="bg-token-surface-secondary text-token-text-primary dark rounded-md text-xs">+ <div className="max-h-32 overflow-y-auto rounded-md p-2 dark:bg-gray-700">+ <code className="!whitespace-pre-wrap ">{formatText(input)}</code>+ </div>+ </div>+ {output && (+ <>+ <div className="mb-2 mt-2 text-sm font-medium dark:text-gray-100">Result</div>+ <div className="bg-token-surface-secondary text-token-text-primary dark rounded-md text-xs">+ <div className="max-h-32 overflow-y-auto rounded-md p-2 dark:bg-gray-700">+ <code className="!whitespace-pre-wrap ">{formatText(output)}</code>+ </div>+ </div>+ </>+ )}+ </div>+ </div>+ </Popover.Content>+ </Popover.Portal>+ );+}diff --git a/client/src/components/Chat/Messages/Content/WrenchIcon.tsx b/client/src/components/Chat/Messages/Content/WrenchIcon.tsxnew file mode 100644index 0000000000..8233f5a7db--- /dev/null+++ b/client/src/components/Chat/Messages/Content/WrenchIcon.tsx@@ -0,0 +1,77 @@+import React, { useState, useEffect } from 'react';++export default function WrenchIcon() {+ const [rotate, setRotate] = useState(false);++ useEffect(() => {+ const timer = setInterval(() => {+ setRotate((r) => !r);+ }, 2000); // Change 2000 to the duration you want for each pause++ return () => clearInterval(timer);+ }, []);++ return (+ <svg+ className={rotate ? 'rotate' : ''}+ xmlns="http://www.w3.org/2000/svg"+ xmlnsXlink="http://www.w3.org/1999/xlink"+ viewBox="0 0 24 24"+ width="24"+ height="24"+ style={{ width: '100%', height: '100%', transform: 'rotate(30deg)' }}+ preserveAspectRatio="xMidYMid meet"+ >+ <defs>+ <clipPath id="__lottie_element_28">+ <rect width="24" height="24" x="0" y="0"></rect>+ </clipPath>+ </defs>+ <g clipPath="url(#__lottie_element_28)">+ <g style={{ display: 'block', transform: 'matrix(1,0,0,1,0,0)' }} opacity="1">+ <g opacity="0.25" transform="matrix(-1,0,0,-1,12,12)">+ <path+ fill="rgb(178,98,254)"+ fillOpacity="1"+ d=" M0,-12 C6.622799873352051,-12 12,-6.622799873352051 12,0 C12,6.622799873352051 6.622799873352051,12 0,12 C-6.622799873352051,12 -12,6.622799873352051 -12,0 C-12,-6.622799873352051 -6.622799873352051,-12 0,-12z"+ ></path>+ </g>+ </g>+ <g style={{ display: 'block', transform: 'matrix(1,0,0,1,0,0)' }} opacity="1">+ <g opacity="1" transform="matrix(0,1,-1,0,12,12)">+ <path+ fill="rgb(52,53,64)"+ fillOpacity="1"+ d=" M0,-10 C5.522847652435303,-10 10,-5.522847652435303 10,0 C10,5.522847652435303 5.522847652435303,10 0,10 C-5.522847652435303,10 -10,5.522847652435303 -10,0 C-10,-5.522847652435303 -5.522847652435303,-10 0,-10"+ ></path>+ </g>+ </g>+ <g style={{ display: 'block', transform: 'matrix(1,0,0,1,0,0)' }} opacity="1">+ <g+ opacity="1"+ transform="matrix(0.8995603322982788,-0.8114914894104004,0.8114914894104004,0.8995603322982788,1.0572385787963867,13.542327880859375)"+ >+ <path+ fill="rgb(178,98,254)"+ fillOpacity="1"+ d=" M8.648597717285156,0.11783526837825775 C9.091397285461426,0.2144152671098709 9.200997352600098,0.7544552683830261 8.880497932434082,1.0749353170394897 C8.137197494506836,1.8182452917099 7.393897533416748,2.5615553855895996 6.65059757232666,3.3048653602600098 C5.901897430419922,4.053555488586426 5.901897430419922,5.267405033111572 6.65059757232666,6.0161051750183105 C7.399197578430176,6.764805316925049 8.613097190856934,6.764805316925049 9.361797332763672,6.0161051750183105 C10.105097770690918,5.2727952003479 10.848397254943848,4.52948522567749 11.591697692871094,3.78617525100708 C11.91219711303711,3.465695381164551 12.452197074890137,3.5752952098846436 12.548797607421875,4.018115043640137 C12.907397270202637,5.6623053550720215 12.44759750366211,7.449105262756348 11.169297218322754,8.727405548095703 C9.65219783782959,10.244504928588867 7.418797492980957,10.608805656433105 5.557697296142578,9.820205688476562 C4.796051025390625,10.581838607788086 4.034404277801514,11.34347152709961 3.2727575302124023,12.10510540008545 C2.5240674018859863,12.853805541992188 1.310207486152649,12.853805541992188 0.5615174770355225,12.10510540008545 C-0.18717250227928162,11.356505393981934 -0.18717250227928162,10.14260482788086 0.5615174770355225,9.393905639648438 C1.3231642246246338,8.632271766662598 2.084810733795166,7.870638370513916 2.8464574813842773,7.109005451202393 C2.0579075813293457,5.247905254364014 2.4221975803375244,3.014495372772217 3.939307451248169,1.497375249862671 C5.217597484588623,0.21908527612686157 7.004397392272949,-0.24075473845005035 8.648597717285156,0.11783526837825775 C8.648597717285156,0.11783526837825775 8.648597717285156,0.11783526837825775 8.648597717285156,0.11783526837825775 C8.648597717285156,0.11783526837825775 8.648597717285156,0.11783526837825775 8.648597717285156,0.11783526837825775"+ ></path>+ </g>+ </g>+ <g style={{ display: 'block', transform: 'matrix(1,0,0,1,0,0)' }} opacity="1">+ <g opacity="1" transform="matrix(-1,0,0,-1,12,12)">+ <path+ strokeLinecap="round"+ strokeLinejoin="round"+ fillOpacity="0"+ stroke="rgb(52,53,64)"+ strokeOpacity="1"+ strokeWidth="2"+ d=" M0,-11 C6.070899963378906,-11 11,-6.070899963378906 11,0 C11,6.070899963378906 6.070899963378906,11 0,11 C-6.070899963378906,11 -11,6.070899963378906 -11,0 C-11,-6.070899963378906 -6.070899963378906,-11 0,-11z"+ ></path>+ </g>+ </g>+ </g>+ </svg>+ );+}diff --git a/client/src/components/Chat/Messages/Message.tsx b/client/src/components/Chat/Messages/Message.tsxindex 4054a8f754..4abecfac9c 100644--- a/client/src/components/Chat/Messages/Message.tsx+++ b/client/src/components/Chat/Messages/Message.tsx@@ -59,7 +59,7 @@ export default function Message(props: TMessageProps) {<div className="relative flex flex-shrink-0 flex-col items-end"><div><div className="pt-0.5">- <div className="gizmo-shadow-stroke flex h-6 w-6 items-center justify-center overflow-hidden rounded-full">+ <div className="flex h-6 w-6 items-center justify-center overflow-hidden rounded-full">{typeof icon === 'string' && /[^\\x00-\\x7F]+/.test(icon as string) ? (<span className=" direction-rtl w-40 overflow-x-scroll">{icon}</span>) : (diff --git a/client/src/components/Chat/Messages/MessageParts.tsx b/client/src/components/Chat/Messages/MessageParts.tsxnew file mode 100644index 0000000000..ba18632a55--- /dev/null+++ b/client/src/components/Chat/Messages/MessageParts.tsx@@ -0,0 +1,123 @@+import ContentParts from './Content/ContentParts';+import type { TMessageProps } from '~/common';+import SiblingSwitch from './SiblingSwitch';+import { useMessageHelpers } from '~/hooks';+// eslint-disable-next-line import/no-cycle+import MultiMessage from './MultiMessage';+import HoverButtons from './HoverButtons';+import SubRow from './SubRow';+import { cn } from '~/utils';++export default function Message(props: TMessageProps) {+ const { message, siblingIdx, siblingCount, setSiblingIdx, currentEditId, setCurrentEditId } =+ props;++ const {+ ask,+ icon,+ edit,+ isLast,+ enterEdit,+ assistant,+ handleScroll,+ conversation,+ isSubmitting,+ latestMessage,+ handleContinue,+ copyToClipboard,+ regenerateMessage,+ } = useMessageHelpers(props);++ const { content, children, messageId = null, isCreatedByUser, error, unfinished } = message ?? {};++ if (!message) {+ return null;+ }++ return (+ <>+ <div+ className="text-token-text-primary w-full border-0 bg-transparent dark:border-0 dark:bg-transparent"+ onWheel={handleScroll}+ onTouchMove={handleScroll}+ >+ <div className="m-auto justify-center p-4 py-2 text-base md:gap-6 ">+ <div className="} group mx-auto flex flex-1 gap-3 text-base md:max-w-3xl md:px-5 lg:max-w-[40rem] lg:px-1 xl:max-w-[48rem] xl:px-5">+ <div className="relative flex flex-shrink-0 flex-col items-end">+ <div>+ <div className="pt-0.5">+ <div className="shadow-stroke flex h-6 w-6 items-center justify-center overflow-hidden rounded-full">+ {typeof icon === 'string' && /[^\\x00-\\x7F]+/.test(icon as string) ? (+ <span className=" direction-rtl w-40 overflow-x-scroll">{icon}</span>+ ) : (+ icon+ )}+ </div>+ </div>+ </div>+ </div>+ <div+ className={cn('relative flex w-full flex-col', isCreatedByUser ? '' : 'agent-turn')}+ >+ <div className="select-none font-semibold">+ {isCreatedByUser ? 'You' : (assistant && assistant?.name) ?? 'Assistant'}+ </div>+ <div className="flex-col gap-1 md:gap-3">+ <div className="flex max-w-full flex-grow flex-col gap-0">+ <ContentParts+ ask={ask}+ edit={edit}+ isLast={isLast}+ content={content ?? []}+ message={message}+ messageId={messageId}+ enterEdit={enterEdit}+ error={!!error}+ isSubmitting={isSubmitting}+ unfinished={unfinished ?? false}+ isCreatedByUser={isCreatedByUser ?? true}+ siblingIdx={siblingIdx ?? 0}+ setSiblingIdx={+ setSiblingIdx ??+ (() => {+ return;+ })+ }+ />+ </div>+ </div>+ {isLast && isSubmitting ? null : (+ <SubRow classes="text-xs">+ <SiblingSwitch+ siblingIdx={siblingIdx}+ siblingCount={siblingCount}+ setSiblingIdx={setSiblingIdx}+ />+ <HoverButtons+ isEditing={edit}+ message={message}+ enterEdit={enterEdit}+ isSubmitting={isSubmitting}+ conversation={conversation ?? null}+ regenerate={() => regenerateMessage()}+ copyToClipboard={copyToClipboard}+ handleContinue={handleContinue}+ latestMessage={latestMessage}+ />+ </SubRow>+ )}+ </div>+ </div>+ </div>+ </div>+ <MultiMessage+ key={messageId}+ messageId={messageId}+ conversation={conversation}+ messagesTree={children ?? []}+ currentEditId={currentEditId}+ setCurrentEditId={setCurrentEditId}+ />+ </>+ );+}diff --git a/client/src/components/Chat/Messages/MultiMessage.tsx b/client/src/components/Chat/Messages/MultiMessage.tsxindex a62e9d384f..6ad20d8d54 100644--- a/client/src/components/Chat/Messages/MultiMessage.tsx+++ b/client/src/components/Chat/Messages/MultiMessage.tsx@@ -3,6 +3,8 @@ import { useRecoilState } from 'recoil';import type { TMessageProps } from '~/common';// eslint-disable-next-line import/no-cycleimport Message from './Message';+// eslint-disable-next-line import/no-cycle+import MessageParts from './MessageParts';import store from '~/store';export default function MultiMessage({@@ -40,6 +42,20 @@ export default function MultiMessage({return null;}+ if (message.content) {+ return (+ <MessageParts+ key={message.messageId}+ message={message}+ currentEditId={currentEditId}+ setCurrentEditId={setCurrentEditId}+ siblingIdx={messagesTree.length - siblingIdx - 1}+ siblingCount={messagesTree.length}+ setSiblingIdx={setSiblingIdxRev}+ />+ );+ }+return (<Messagekey={message.messageId}diff --git a/client/src/components/Chat/Presentation.tsx b/client/src/components/Chat/Presentation.tsxindex af264f1dc4..eb7848f7b5 100644--- a/client/src/components/Chat/Presentation.tsx+++ b/client/src/components/Chat/Presentation.tsx@@ -1,11 +1,23 @@import { useEffect } from 'react';+import { useRecoilValue } from 'recoil';import { FileSources } from 'librechat-data-provider';import type { ExtendedFile } from '~/common';import { useDragHelpers, useSetFilesToDelete } from '~/hooks';import DragDropOverlay from './Input/Files/DragDropOverlay';import { useDeleteFilesMutation } from '~/data-provider';+import { SidePanel } from '~/components/SidePanel';+import store from '~/store';-export default function Presentation({ children }: { children: React.ReactNode }) {+export default function Presentation({+ children,+ useSidePanel = false,+ panel,+}: {+ children: React.ReactNode;+ panel?: React.ReactNode;+ useSidePanel?: boolean;+}) {+ const hideSidePanel = useRecoilValue(store.hideSidePanel);const { isOver, canDrop, drop } = useDragHelpers();const setFilesToDelete = useSetFilesToDelete();const { mutateAsync } = useDeleteFilesMutation({@@ -36,14 +48,41 @@ export default function Presentation({ children }: { children: React.ReactNode }}, [mutateAsync]);const isActive = canDrop && isOver;+ const resizableLayout = localStorage.getItem('react-resizable-panels:layout');+ const collapsedPanels = localStorage.getItem('react-resizable-panels:collapsed');++ const defaultLayout = resizableLayout ? JSON.parse(resizableLayout) : undefined;+ const defaultCollapsed = collapsedPanels ? JSON.parse(collapsedPanels) : undefined;++ const layout = () => (+ <div className="transition-width relative flex h-full w-full flex-1 flex-col items-stretch overflow-hidden bg-white pt-0 dark:bg-gray-800">+ <div className="flex h-full flex-col" role="presentation" tabIndex={0}>+ {children}+ {isActive && <DragDropOverlay />}+ </div>+ </div>+ );++ if (useSidePanel && !hideSidePanel) {+ return (+ <div+ ref={drop}+ className="relative flex w-full grow overflow-hidden bg-white dark:bg-gray-800"+ >+ <SidePanel defaultLayout={defaultLayout} defaultCollapsed={defaultCollapsed}>+ <div className="flex h-full flex-col" role="presentation" tabIndex={0}>+ {children}+ {isActive && <DragDropOverlay />}+ </div>+ </SidePanel>+ </div>+ );+ }+return (<div ref={drop} className="relative flex w-full grow overflow-hidden bg-white dark:bg-gray-800">- <div className="transition-width relative flex h-full w-full flex-1 flex-col items-stretch overflow-hidden bg-white pt-0 dark:bg-gray-800">- <div className="flex h-full flex-col" role="presentation" tabIndex={0}>- {children}- {isActive && <DragDropOverlay />}- </div>- </div>+ {layout()}+ {panel && panel}</div>);}diff --git a/client/src/components/Chat/SingleChatView.tsx b/client/src/components/Chat/SingleChatView.tsxdeleted file mode 100644index 800807c8e8..0000000000--- a/client/src/components/Chat/SingleChatView.tsx+++ /dev/null@@ -1,41 +0,0 @@-import { memo } from 'react';-import type { TMessage } from 'librechat-data-provider';-import MessagesView from './Messages/MessagesView';-import OptionsBar from './Input/OptionsBar';-import CreationPanel from './CreationPanel';-import { ChatContext } from '~/Providers';-import { useChatHelpers } from '~/hooks';-import ChatForm from './Input/ChatForm';-import Landing from './Landing';-import Header from './Header';--function ChatView({- messagesTree,- index = 0,-}: {- messagesTree?: TMessage[] | null;- index?: number;-}) {- return (- <ChatContext.Provider value={useChatHelpers(index)}>- <div className="relative flex w-full grow overflow-hidden bg-white dark:bg-gray-800">- <CreationPanel index={index} />- <div className="transition-width relative flex h-full w-full flex-1 flex-col items-stretch overflow-hidden bg-white pt-10 dark:bg-gray-800 md:pt-0">- <div className="flex h-full flex-col" role="presentation" tabIndex={0}>- {messagesTree && messagesTree.length !== 0 ? (- <MessagesView messagesTree={messagesTree} Header={<Header />} />- ) : (- <Landing />- )}- <OptionsBar messagesTree={messagesTree} />- <div className="gizmo:border-t-0 gizmo:pl-0 gizmo:md:pl-0 w-full border-t pt-2 dark:border-white/20 md:w-[calc(100%-.5rem)] md:border-t-0 md:border-transparent md:pl-2 md:pt-0 md:dark:border-transparent">- <ChatForm index={index} />- </div>- </div>- </div>- </div>- </ChatContext.Provider>- );-}--export default memo(ChatView);diff --git a/client/src/components/Conversations/DeleteButton.tsx b/client/src/components/Conversations/DeleteButton.tsxindex 7b54e587bc..3f8db49df2 100644--- a/client/src/components/Conversations/DeleteButton.tsx+++ b/client/src/components/Conversations/DeleteButton.tsx@@ -1,4 +1,7 @@import { useParams } from 'react-router-dom';+import { QueryKeys } from 'librechat-data-provider';+import { useQueryClient } from '@tanstack/react-query';+import type { TMessage } from 'librechat-data-provider';import { useLocalize, useConversations, useConversation } from '~/hooks';import { useDeleteConversationMutation } from '~/data-provider';import { Dialog, DialogTrigger, Label } from '~/components/ui';@@ -7,17 +10,21 @@ import { TrashIcon, CrossIcon } from '~/components/svg';export default function DeleteButton({ conversationId, renaming, retainView, title }) {const localize = useLocalize();+ const queryClient = useQueryClient();const { newConversation } = useConversation();const { refreshConversations } = useConversations();const { conversationId: currentConvoId } = useParams();- const deleteConvoMutation = useDeleteConversationMutation(conversationId);+ const deleteConvoMutation = useDeleteConversationMutation();const confirmDelete = () => {+ const messages = queryClient.getQueryData<TMessage[]>([QueryKeys.messages, conversationId]);+ const thread_id = messages?.[messages?.length - 1]?.thread_id;+deleteConvoMutation.mutate(- { conversationId, source: 'button' },+ { conversationId, thread_id, source: 'button' },{onSuccess: () => {- if (currentConvoId == conversationId) {+ if (currentConvoId === conversationId) {newConversation();}diff --git a/client/src/components/Conversations/NewDeleteButton.tsx b/client/src/components/Conversations/NewDeleteButton.tsxindex 7710a77b93..03ea918804 100644--- a/client/src/components/Conversations/NewDeleteButton.tsx+++ b/client/src/components/Conversations/NewDeleteButton.tsx@@ -1,4 +1,7 @@import { useParams } from 'react-router-dom';+import { QueryKeys } from 'librechat-data-provider';+import { useQueryClient } from '@tanstack/react-query';+import type { TMessage } from 'librechat-data-provider';import { useLocalize, useConversations, useNewConvo } from '~/hooks';import { useDeleteConversationMutation } from '~/data-provider';import { Dialog, DialogTrigger, Label } from '~/components/ui';@@ -7,15 +10,19 @@ import { TrashIcon, CrossIcon } from '~/components/svg';export default function DeleteButton({ conversationId, renaming, retainView, title }) {const localize = useLocalize();+ const queryClient = useQueryClient();// TODO: useNewConvo uses indices so we need to update global index state on every switch to Convoconst { newConversation } = useNewConvo();const { refreshConversations } = useConversations();const { conversationId: currentConvoId } = useParams();- const deleteConvoMutation = useDeleteConversationMutation(conversationId);+ const deleteConvoMutation = useDeleteConversationMutation();const confirmDelete = () => {+ const messages = queryClient.getQueryData<TMessage[]>([QueryKeys.messages, conversationId]);+ const thread_id = messages?.[messages?.length - 1]?.thread_id;+deleteConvoMutation.mutate(- { conversationId, source: 'button' },+ { conversationId, thread_id, source: 'button' },{onSuccess: () => {if (currentConvoId == conversationId) {diff --git a/client/src/components/Endpoints/EditPresetDialog.tsx b/client/src/components/Endpoints/EditPresetDialog.tsxindex 2965b58e70..9dcffbbf90 100644--- a/client/src/components/Endpoints/EditPresetDialog.tsx+++ b/client/src/components/Endpoints/EditPresetDialog.tsx@@ -133,7 +133,7 @@ const EditPresetDialog = ({ open, onOpenChange, preset: _preset, title }: TEditPonClick={submitPreset}className="dark:hover:gray-400 ml-2 border-gray-700 bg-green-600 text-white hover:bg-green-700 dark:hover:bg-green-800">- {localize('com_endpoint_save')}+ {localize('com_ui_save')}</DialogClose></div>}diff --git a/client/src/components/Endpoints/Icon.tsx b/client/src/components/Endpoints/Icon.tsxindex fe30f1c6b0..2947cb20ba 100644--- a/client/src/components/Endpoints/Icon.tsx+++ b/client/src/components/Endpoints/Icon.tsx@@ -3,12 +3,13 @@ import UnknownIcon from '~/components/Chat/Menus/Endpoints/UnknownIcon';import {Plugin,GPTIcon,- AnthropicIcon,- AzureMinimalIcon,- CustomMinimalIcon,PaLMIcon,CodeyIcon,GeminiIcon,+ AssistantIcon,+ AnthropicIcon,+ AzureMinimalIcon,+ CustomMinimalIcon,} from '~/components/svg';import { useAuthContext } from '~/hooks/AuthContext';import { IconProps } from '~/common';@@ -16,7 +17,15 @@ import { cn } from '~/utils';const Icon: React.FC<IconProps> = (props) => {const { user } = useAuthContext();- const { size = 30, isCreatedByUser, button, model = '', endpoint, jailbreak } = props;+ const {+ size = 30,+ isCreatedByUser,+ button,+ model = '',+ endpoint,+ jailbreak,+ assistantName,+ } = props;if (isCreatedByUser) {const username = user?.name || 'User';@@ -42,6 +51,27 @@ const Icon: React.FC<IconProps> = (props) => {);} else {const endpointIcons = {+ [EModelEndpoint.assistants]: {+ icon: props.iconURL ? (+ <div+ title={assistantName}+ style={{+ width: size,+ height: size,+ }}+ className={cn('relative flex items-center justify-center', props.className ?? '')}+ >+ <img className="rounded-sm" src={props.iconURL} alt={assistantName} />+ </div>+ ) : (+ <div className="h-6 w-6">+ <div className="relative flex h-full items-center justify-center rounded-full bg-white text-black">+ <AssistantIcon />+ </div>+ </div>+ ),+ name: endpoint,+ },[EModelEndpoint.azureOpenAI]: {icon: <AzureMinimalIcon size={size * 0.5555555555555556} />,bg: 'linear-gradient(0.375turn, #61bde2, #4389d0)',diff --git a/client/src/components/Endpoints/MinimalIcon.tsx b/client/src/components/Endpoints/MinimalIcon.tsxindex 1499dec7ce..ec3dff401c 100644--- a/client/src/components/Endpoints/MinimalIcon.tsx+++ b/client/src/components/Endpoints/MinimalIcon.tsx@@ -9,6 +9,7 @@ import {GoogleMinimalIcon,CustomMinimalIcon,AnthropicIcon,+ Sparkles,} from '~/components/svg';import { cn } from '~/utils';import { IconProps } from '~/common';@@ -40,6 +41,7 @@ const MinimalIcon: React.FC<IconProps> = (props) => {},[EModelEndpoint.bingAI]: { icon: <BingAIMinimalIcon />, name: 'BingAI' },[EModelEndpoint.chatGPTBrowser]: { icon: <LightningIcon />, name: 'ChatGPT' },+ [EModelEndpoint.assistants]: { icon: <Sparkles className="icon-sm" />, name: 'Assistant' },default: {icon: (<UnknownIcondiff --git a/client/src/components/Endpoints/Settings/Assistants.tsx b/client/src/components/Endpoints/Settings/Assistants.tsxnew file mode 100644index 0000000000..72896bb43a--- /dev/null+++ b/client/src/components/Endpoints/Settings/Assistants.tsx@@ -0,0 +1,178 @@+import { useState, useMemo, useEffect } from 'react';+import TextareaAutosize from 'react-textarea-autosize';+import { TPreset, defaultOrderQuery } from 'librechat-data-provider';+import type { TModelSelectProps, Option } from '~/common';+import { Label, HoverCard, SelectDropDown, HoverCardTrigger } from '~/components/ui';+import { cn, defaultTextProps, removeFocusOutlines, mapAssistants } from '~/utils';+import { useLocalize, useDebouncedInput } from '~/hooks';+import { useListAssistantsQuery } from '~/data-provider';+import OptionHover from './OptionHover';+import { ESide } from '~/common';++export default function Settings({ conversation, setOption, models, readonly }: TModelSelectProps) {+ const localize = useLocalize();+ const defaultOption = useMemo(+ () => ({ label: localize('com_endpoint_use_active_assistant'), value: '' }),+ [localize],+ );++ const { data: assistants = [] } = useListAssistantsQuery(defaultOrderQuery, {+ select: (res) =>+ [+ defaultOption,+ ...res.data.map(({ id, name }) => ({+ label: name,+ value: id,+ })),+ ].filter(Boolean),+ });++ const { data: assistantMap = {} } = useListAssistantsQuery(defaultOrderQuery, {+ select: (res) => mapAssistants(res.data),+ });++ const { model, endpoint, assistant_id, endpointType, promptPrefix, instructions } =+ conversation ?? {};+ const [onPromptPrefixChange, promptPrefixValue] = useDebouncedInput(+ setOption,+ 'promptPrefix',+ promptPrefix,+ );+ const [onInstructionsChange, instructionsValue] = useDebouncedInput(+ setOption,+ 'instructions',+ instructions,+ );++ const activeAssistant = useMemo(() => {+ if (assistant_id) {+ return assistantMap[assistant_id];+ }++ return null;+ }, [assistant_id, assistantMap]);++ const modelOptions = useMemo(() => {+ return models.map((model) => ({+ label:+ model === activeAssistant?.model+ ? `${model} (${localize('com_endpoint_assistant_model')})`+ : model,+ value: model,+ }));+ }, [models, activeAssistant, localize]);++ const [assistantValue, setAssistantValue] = useState<Option>(+ activeAssistant ? { label: activeAssistant.name, value: activeAssistant.id } : defaultOption,+ );++ useEffect(() => {+ if (assistantValue && assistantValue.value === '') {+ setOption('presetOverride')({+ assistant_id: assistantValue.value,+ } as Partial<TPreset>);+ }++ // Reason: `setOption` causes a re-render on every update+ // eslint-disable-next-line react-hooks/exhaustive-deps+ }, [assistantValue]);++ if (!conversation) {+ return null;+ }++ const setModel = setOption('model');+ const setAssistant = (value: string) => {+ if (!value) {+ setAssistantValue(defaultOption);+ return;+ }++ const assistant = assistantMap[value];+ if (!assistant) {+ setAssistantValue(defaultOption);+ return;+ }++ setAssistantValue({+ label: assistant.name ?? '',+ value: assistant.id ?? '',+ });+ setOption('assistant_id')(assistant.id);+ };++ const optionEndpoint = endpointType ?? endpoint;++ return (+ <div className="grid grid-cols-6 gap-6">+ <div className="col-span-6 flex flex-col items-center justify-start gap-6 sm:col-span-3">+ <div className="grid w-full items-center gap-2">+ <SelectDropDown+ value={model ?? ''}+ setValue={setModel}+ availableValues={modelOptions}+ disabled={readonly}+ className={cn(defaultTextProps, 'flex w-full resize-none', removeFocusOutlines)}+ containerClassName="flex w-full resize-none"+ />+ </div>+ </div>+ <div className="col-span-6 flex flex-col items-center justify-start gap-6 px-3 sm:col-span-3">+ <HoverCard openDelay={300}>+ <HoverCardTrigger className="grid w-full items-center gap-2">+ <div className="grid w-full items-center gap-2">+ <SelectDropDown+ title={localize('com_endpoint_assistant')}+ value={assistantValue}+ setValue={setAssistant}+ availableValues={assistants as Option[]}+ disabled={readonly}+ className={cn(defaultTextProps, 'flex w-full resize-none', removeFocusOutlines)}+ containerClassName="flex w-full resize-none"+ />+ </div>+ </HoverCardTrigger>+ <OptionHover endpoint={optionEndpoint ?? ''} type="temp" side={ESide.Left} />+ </HoverCard>+ </div>+ <div className="col-span-6 flex flex-col items-center justify-start gap-6">+ <div className="grid w-full items-center gap-2">+ <Label htmlFor="promptPrefix" className="text-left text-sm font-medium">+ {localize('com_endpoint_prompt_prefix_assistants')}{' '}+ <small className="opacity-40">({localize('com_endpoint_default_blank')})</small>+ </Label>+ <TextareaAutosize+ id="promptPrefix"+ disabled={readonly}+ value={promptPrefixValue as string | undefined}+ onChange={onPromptPrefixChange}+ placeholder={localize('com_endpoint_prompt_prefix_assistants_placeholder')}+ className={cn(+ defaultTextProps,+ 'dark:bg-gray-700 dark:hover:bg-gray-700/60 dark:focus:bg-gray-700',+ 'flex max-h-[240px] min-h-[80px] w-full resize-none px-3 py-2 ',+ )}+ />+ </div>+ <div className="grid w-full items-center gap-2">+ <Label htmlFor="instructions" className="text-left text-sm font-medium">+ {localize('com_endpoint_instructions_assistants')}{' '}+ <small className="opacity-40">({localize('com_endpoint_default_blank')})</small>+ </Label>+ <TextareaAutosize+ id="instructions"+ disabled={readonly}+ value={instructionsValue as string | undefined}+ onChange={onInstructionsChange}+ placeholder={localize('com_endpoint_instructions_assistants_placeholder')}+ className={cn(+ defaultTextProps,+ 'dark:bg-gray-700 dark:hover:bg-gray-700/60 dark:focus:bg-gray-700',+ 'flex max-h-[240px] min-h-[80px] w-full resize-none px-3 py-2 ',+ )}+ />+ </div>+ </div>+ </div>+ );+}diff --git a/client/src/components/Endpoints/Settings/index.ts b/client/src/components/Endpoints/Settings/index.tsindex 6fdebc5fe1..436946b217 100644--- a/client/src/components/Endpoints/Settings/index.ts+++ b/client/src/components/Endpoints/Settings/index.ts@@ -1,3 +1,4 @@+export { default as AssistantsSettings } from './Assistants';export { default as OpenAISettings } from './OpenAI';export { default as BingAISettings } from './BingAI';export { default as GoogleSettings } from './Google';diff --git a/client/src/components/Endpoints/Settings/settings.ts b/client/src/components/Endpoints/Settings/settings.tsindex 9c4d302bc5..4538973043 100644--- a/client/src/components/Endpoints/Settings/settings.ts+++ b/client/src/components/Endpoints/Settings/settings.ts@@ -2,11 +2,13 @@ import { EModelEndpoint } from 'librechat-data-provider';import type { FC } from 'react';import type { TModelSelectProps, TBaseSettingsProps, TModels } from '~/common';import { Google, Plugins, GoogleSettings, PluginSettings } from './MultiView';+import AssistantsSettings from './Assistants';import AnthropicSettings from './Anthropic';import BingAISettings from './BingAI';import OpenAISettings from './OpenAI';const settings: { [key: string]: FC<TModelSelectProps> } = {+ [EModelEndpoint.assistants]: AssistantsSettings,[EModelEndpoint.openAI]: OpenAISettings,[EModelEndpoint.custom]: OpenAISettings,[EModelEndpoint.azureOpenAI]: OpenAISettings,diff --git a/client/src/components/Messages/Content/MessageContent.tsx b/client/src/components/Messages/Content/MessageContent.tsxindex df737e7dbc..cae626feff 100644--- a/client/src/components/Messages/Content/MessageContent.tsx+++ b/client/src/components/Messages/Content/MessageContent.tsx@@ -1,6 +1,6 @@import { Fragment } from 'react';import type { TResPlugin } from 'librechat-data-provider';-import type { TMessageContent, TText, TDisplayProps } from '~/common';+import type { TMessageContentProps, TText, TDisplayProps } from '~/common';import { useAuthContext } from '~/hooks';import { cn } from '~/utils';import EditMessage from './EditMessage';@@ -57,7 +57,7 @@ const MessageContent = ({isSubmitting,isLast,...props-}: TMessageContent) => {+}: TMessageContentProps) => {if (error) {return <ErrorMessage text={text} />;} else if (edit) {diff --git a/client/src/components/Nav/Nav.tsx b/client/src/components/Nav/Nav.tsxindex dae0f54667..1c62f86832 100644--- a/client/src/components/Nav/Nav.tsx+++ b/client/src/components/Nav/Nav.tsx@@ -173,6 +173,7 @@ export default function Nav({ navVisible, setNavVisible }) {setIsHovering={setIsToggleHovering}onToggle={toggleNavVisible}navVisible={navVisible}+ className="fixed left-0 top-1/2 z-40"/><div className={`nav-mask${navVisible ? ' active' : ''}`} onClick={toggleNavVisible} /></Tooltip>diff --git a/client/src/components/Nav/NavLinks.tsx b/client/src/components/Nav/NavLinks.tsxindex 2f5c0769bc..e35ac213da 100644--- a/client/src/components/Nav/NavLinks.tsx+++ b/client/src/components/Nav/NavLinks.tsx@@ -1,13 +1,14 @@-import { Download } from 'lucide-react';-import { useRecoilValue } from 'recoil';-import { Fragment, useState, memo } from 'react';import { useLocation } from 'react-router-dom';+import { Fragment, useState, memo } from 'react';+import { Download, FileText } from 'lucide-react';import { Menu, Transition } from '@headlessui/react';+import { useRecoilValue, useRecoilState } from 'recoil';import { useGetUserBalance, useGetStartupConfig } from 'librechat-data-provider/react-query';import type { TConversation } from 'librechat-data-provider';+import FilesView from '~/components/Chat/Input/Files/FilesView';+import { useAuthContext } from '~/hooks/AuthContext';import { ExportModal } from './ExportConversation';import { LinkIcon, GearIcon } from '~/components';-import { useAuthContext } from '~/hooks/AuthContext';import { useLocalize } from '~/hooks';import Settings from './Settings';import NavLink from './NavLink';@@ -25,6 +26,7 @@ function NavLinks() {});const [showExports, setShowExports] = useState(false);const [showSettings, setShowSettings] = useState(false);+ const [showFiles, setShowFiles] = useRecoilState(store.showFiles);let conversation;const activeConvo = useRecoilValue(store.conversationByIndex(0));@@ -108,6 +110,14 @@ function NavLinks() {/></Menu.Item><div className="my-1 h-px bg-white/20" role="none" />+ <Menu.Item as="div">+ <NavLink+ className="flex w-full cursor-pointer items-center gap-3 rounded-none px-3 py-3 text-sm text-white transition-colors duration-200 hover:bg-gray-700"+ svg={() => <FileText className="icon-md" />}+ text="My Files"+ clickHandler={() => setShowFiles(true)}+ />+ </Menu.Item><Menu.Item as="div"><NavLinkclassName="flex w-full cursor-pointer items-center gap-3 rounded-none px-3 py-3 text-sm text-white transition-colors duration-200 hover:bg-gray-700"@@ -136,6 +146,7 @@ function NavLinks() {{showExports && (<ExportModal open={showExports} onOpenChange={setShowExports} conversation={conversation} />)}+ {showFiles && <FilesView open={showFiles} onOpenChange={setShowFiles} />}{showSettings && <Settings open={showSettings} onOpenChange={setShowSettings} />}</>);diff --git a/client/src/components/Nav/NavToggle.tsx b/client/src/components/Nav/NavToggle.tsxindex 360c19aa39..ce9b2ffa20 100644--- a/client/src/components/Nav/NavToggle.tsx+++ b/client/src/components/Nav/NavToggle.tsx@@ -2,18 +2,33 @@ import { TooltipTrigger, TooltipContent } from '~/components/ui';import { useLocalize, useLocalStorage } from '~/hooks';import { cn } from '~/utils';-export default function NavToggle({ onToggle, navVisible, isHovering, setIsHovering }) {+export default function NavToggle({+ onToggle,+ navVisible,+ isHovering,+ setIsHovering,+ side = 'left',+ className = '',+ translateX = true,+}) {const localize = useLocalize();const transition = {transition: 'transform 0.3s ease, opacity 0.2s ease',};- const [newUser, setNewUser] = useLocalStorage('newUser', true);+ const [newUser] = useLocalStorage('newUser', true);++ const rotationDegree = 15;+ const rotation = isHovering || !navVisible ? `${rotationDegree}deg` : '0deg';+ const topBarRotation = side === 'right' ? `-${rotation}` : rotation;+ const bottomBarRotation = side === 'right' ? rotation : `-${rotation}`;return (<divclassName={cn(- 'fixed left-0 top-1/2 z-40 -translate-y-1/2 transition-transform',- navVisible ? 'translate-x-[260px] rotate-0' : 'translate-x-0 rotate-180',+ className,+ '-translate-y-1/2 transition-transform',+ navVisible ? 'rotate-0' : 'rotate-180',+ navVisible && translateX ? 'translate-x-[260px]' : 'translate-x-0 ',)}onMouseEnter={() => setIsHovering(true)}onMouseLeave={() => setIsHovering(false)}@@ -26,27 +41,29 @@ export default function NavToggle({ onToggle, navVisible, isHovering, setIsHoverstyle={{ ...transition, opacity: isHovering ? 1 : 0.25 }}><div className="flex h-6 w-6 flex-col items-center">+ {/* Top bar */}<divclassName="h-3 w-1 rounded-full bg-black dark:bg-white"style={{...transition,- transform: `translateY(0.15rem) rotate(${- isHovering || !navVisible ? '15' : '0'- }deg) translateZ(0px)`,+ transform: `translateY(0.15rem) rotate(${topBarRotation}) translateZ(0px)`,}}/>+ {/* Bottom bar */}<divclassName="h-3 w-1 rounded-full bg-black dark:bg-white"style={{...transition,- transform: `translateY(-0.15rem) rotate(-${- isHovering || !navVisible ? '15' : '0'- }deg) translateZ(0px)`,+ transform: `translateY(-0.15rem) rotate(${bottomBarRotation}) translateZ(0px)`,}}/></div></div>- <TooltipContent forceMount={newUser ? true : undefined} side="right" sideOffset={4}>+ <TooltipContent+ forceMount={newUser ? true : undefined}+ side={side === 'right' ? 'left' : 'right'}+ sideOffset={4}+ >{navVisible ? localize('com_nav_close_sidebar') : localize('com_nav_open_sidebar')}</TooltipContent></span>diff --git a/client/src/components/Nav/SettingsTabs/Account/Avatar.tsx b/client/src/components/Nav/SettingsTabs/Account/Avatar.tsxindex 64635f0a59..0d04fa2e89 100644--- a/client/src/components/Nav/SettingsTabs/Account/Avatar.tsx+++ b/client/src/components/Nav/SettingsTabs/Account/Avatar.tsx@@ -1,22 +1,24 @@import { FileImage } from 'lucide-react';import { useSetRecoilState } from 'recoil';import { useState, useEffect } from 'react';+import { fileConfig as defaultFileConfig, mergeFileConfig } from 'librechat-data-provider';import type { TUser } from 'librechat-data-provider';import { Dialog, DialogContent, DialogHeader, DialogTitle } from '~/components/ui';-import { useUploadAvatarMutation } from '~/data-provider';+import { useUploadAvatarMutation, useGetFileConfig } from '~/data-provider';import { useToastContext } from '~/Providers';import { Spinner } from '~/components/svg';import { useLocalize } from '~/hooks';import { cn } from '~/utils/';import store from '~/store';-const sizeLimit = 2 * 1024 * 1024; // 2MB-function Avatar() {const setUser = useSetRecoilState(store.user);const [input, setinput] = useState<File | null>(null);const [isDialogOpen, setDialogOpen] = useState<boolean>(false);const [previewUrl, setPreviewUrl] = useState<string | null>(null);+ const { data: fileConfig = defaultFileConfig } = useGetFileConfig({+ select: (data) => mergeFileConfig(data),+ });const localize = useLocalize();const { showToast } = useToastContext();@@ -49,7 +51,7 @@ function Avatar() {const handleFileChange = (event: React.ChangeEvent<HTMLInputElement>): void => {const file = event.target.files?.[0];- if (file && file.size <= sizeLimit) {+ if (fileConfig.avatarSizeLimit && file && file.size <= fileConfig.avatarSizeLimit) {setinput(file);setDialogOpen(true);} else {diff --git a/client/src/components/Nav/SettingsTabs/General/General.tsx b/client/src/components/Nav/SettingsTabs/General/General.tsxindex 28a0f2eb27..3c37d933ce 100644--- a/client/src/components/Nav/SettingsTabs/General/General.tsx+++ b/client/src/components/Nav/SettingsTabs/General/General.tsx@@ -12,6 +12,7 @@ import {useLocalStorage,} from '~/hooks';import type { TDangerButtonProps } from '~/common';+import HideSidePanelSwitch from './HideSidePanelSwitch';import AutoScrollSwitch from './AutoScrollSwitch';import { Dropdown } from '~/components/ui';import DangerButton from '../DangerButton';@@ -190,6 +191,9 @@ function General() {<div className="border-b pb-3 last-of-type:border-b-0 dark:border-gray-700"><AutoScrollSwitch /></div>+ <div className="border-b pb-3 last-of-type:border-b-0 dark:border-gray-700">+ <HideSidePanelSwitch />+ </div></div></Tabs.Content>);diff --git a/client/src/components/Nav/SettingsTabs/General/HideSidePanelSwitch.tsx b/client/src/components/Nav/SettingsTabs/General/HideSidePanelSwitch.tsxnew file mode 100644index 0000000000..b11e859784--- /dev/null+++ b/client/src/components/Nav/SettingsTabs/General/HideSidePanelSwitch.tsx@@ -0,0 +1,33 @@+import { useRecoilState } from 'recoil';+import { Switch } from '~/components/ui';+import { useLocalize } from '~/hooks';+import store from '~/store';++export default function HideSidePanelSwitch({+ onCheckedChange,+}: {+ onCheckedChange?: (value: boolean) => void;+}) {+ const [hideSidePanel, setHideSidePanel] = useRecoilState<boolean>(store.hideSidePanel);+ const localize = useLocalize();++ const handleCheckedChange = (value: boolean) => {+ setHideSidePanel(value);+ if (onCheckedChange) {+ onCheckedChange(value);+ }+ };++ return (+ <div className="flex items-center justify-between">+ <div> {localize('com_nav_hide_panel')} </div>+ <Switch+ id="hideSidePanel"+ checked={hideSidePanel}+ onCheckedChange={handleCheckedChange}+ className="ml-4 mt-2"+ data-testid="hideSidePanel"+ />+ </div>+ );+}diff --git a/client/src/components/Plugins/Store/PluginAuthForm.tsx b/client/src/components/Plugins/Store/PluginAuthForm.tsxindex 06accc794f..a3d6ae132e 100644--- a/client/src/components/Plugins/Store/PluginAuthForm.tsx+++ b/client/src/components/Plugins/Store/PluginAuthForm.tsx@@ -7,9 +7,10 @@ import PluginTooltip from './PluginTooltip';type TPluginAuthFormProps = {plugin: TPlugin | undefined;onSubmit: (installActionData: TPluginAction) => void;+ isAssistantTool?: boolean;};-function PluginAuthForm({ plugin, onSubmit }: TPluginAuthFormProps) {+function PluginAuthForm({ plugin, onSubmit, isAssistantTool }: TPluginAuthFormProps) {const {register,handleSubmit,@@ -23,7 +24,12 @@ function PluginAuthForm({ plugin, onSubmit }: TPluginAuthFormProps) {className="col-span-1 flex w-full flex-col items-start justify-start gap-2"method="POST"onSubmit={handleSubmit((auth) =>- onSubmit({ pluginKey: plugin?.pluginKey ?? '', action: 'install', auth }),+ onSubmit({+ pluginKey: plugin?.pluginKey ?? '',+ action: 'install',+ auth,+ isAssistantTool,+ }),)}>{plugin?.authConfig?.map((config: TPluginAuthConfig, i: number) => {diff --git a/client/src/components/Plugins/Store/PluginStoreDialog.tsx b/client/src/components/Plugins/Store/PluginStoreDialog.tsxindex ebae7cdf29..01e3114018 100644--- a/client/src/components/Plugins/Store/PluginStoreDialog.tsx+++ b/client/src/components/Plugins/Store/PluginStoreDialog.tsx@@ -1,44 +1,48 @@-import { useRecoilState } from 'recoil';import { Search, X } from 'lucide-react';import { Dialog } from '@headlessui/react';-import { useState, useEffect, useCallback } from 'react';-import { tConversationSchema } from 'librechat-data-provider';+import { useState, useEffect } from 'react';import {useAvailablePluginsQuery,useUpdateUserPluginsMutation,} from 'librechat-data-provider/react-query';-import type { TError, TPlugin, TPluginAction } from 'librechat-data-provider';-import { useAuthContext } from '~/hooks/AuthContext';+import type { TError, TPluginAction } from 'librechat-data-provider';+import type { TPluginStoreDialogProps } from '~/common/types';+import { useLocalize, usePluginDialogHelpers, useSetIndexOptions, useAuthContext } from '~/hooks';import PluginPagination from './PluginPagination';import PluginStoreItem from './PluginStoreItem';import PluginAuthForm from './PluginAuthForm';-import { useLocalize } from '~/hooks';-import store from '~/store';--type TPluginStoreDialogProps = {- isOpen: boolean;- setIsOpen: (open: boolean) => void;-};function PluginStoreDialog({ isOpen, setIsOpen }: TPluginStoreDialogProps) {const localize = useLocalize();const { user } = useAuthContext();const { data: availablePlugins } = useAvailablePluginsQuery();const updateUserPlugins = useUpdateUserPluginsMutation();+ const { setTools } = useSetIndexOptions();- const [conversation, setConversation] = useRecoilState(store.conversation) ?? {};- const [selectedPlugin, setSelectedPlugin] = useState<TPlugin | undefined>(undefined);-- const [maxPage, setMaxPage] = useState(1);- const [currentPage, setCurrentPage] = useState(1);- const [itemsPerPage, setItemsPerPage] = useState(1);const [userPlugins, setUserPlugins] = useState<string[]>([]);- const [searchChanged, setSearchChanged] = useState(false);- const [searchValue, setSearchValue] = useState('');- const [error, setError] = useState<boolean>(false);- const [errorMessage, setErrorMessage] = useState<string>('');- const [showPluginAuthForm, setShowPluginAuthForm] = useState<boolean>(false);+ const {+ maxPage,+ setMaxPage,+ currentPage,+ setCurrentPage,+ itemsPerPage,+ searchChanged,+ setSearchChanged,+ searchValue,+ setSearchValue,+ gridRef,+ handleSearch,+ handleChangePage,+ error,+ setError,+ errorMessage,+ setErrorMessage,+ showPluginAuthForm,+ setShowPluginAuthForm,+ selectedPlugin,+ setSelectedPlugin,+ } = usePluginDialogHelpers();const handleInstallError = (error: TError) => {setError(true);@@ -68,18 +72,7 @@ function PluginStoreDialog({ isOpen, setIsOpen }: TPluginStoreDialogProps) {handleInstallError(error as TError);},onSuccess: () => {- //@ts-ignore - can't set a default convo or it will break routing- let { tools } = conversation;- tools = tools.filter((t: TPlugin) => {- return t.pluginKey !== plugin;- });- localStorage.setItem('lastSelectedTools', JSON.stringify(tools));- setConversation((prevState) =>- tConversationSchema.parse({- ...prevState,- tools,- }),- );+ setTools(plugin, true);},},);@@ -98,44 +91,10 @@ function PluginStoreDialog({ isOpen, setIsOpen }: TPluginStoreDialogProps) {}};- const calculateColumns = (node) => {- const width = node.offsetWidth;- let columns;- if (width < 501) {- setItemsPerPage(8);- return;- } else if (width < 640) {- columns = 2;- } else if (width < 1024) {- columns = 3;- } else {- columns = 4;- }- setItemsPerPage(columns * 2); // 2 rows- };-- const gridRef = useCallback(- (node) => {- if (node !== null) {- if (itemsPerPage === 1) {- calculateColumns(node);- }- const resizeObserver = new ResizeObserver(() => calculateColumns(node));- resizeObserver.observe(node);- }- },- [itemsPerPage],- );-const filteredPlugins = availablePlugins?.filter((plugin) =>plugin.name.toLowerCase().includes(searchValue.toLowerCase()),);- const handleSearch = (e) => {- setSearchValue(e.target.value);- setSearchChanged(true);- };-useEffect(() => {if (user && user.plugins) {setUserPlugins(user.plugins);@@ -148,11 +107,10 @@ function PluginStoreDialog({ isOpen, setIsOpen }: TPluginStoreDialogProps) {setSearchChanged(false);}}- }, [availablePlugins, itemsPerPage, user, searchValue, filteredPlugins, searchChanged]);- const handleChangePage = (page: number) => {- setCurrentPage(page);- };+ // Disabled due to state setters erroneously being flagged as dependencies+ // eslint-disable-next-line react-hooks/exhaustive-deps+ }, [availablePlugins, itemsPerPage, user, searchValue, filteredPlugins, searchChanged]);return (<Dialog@@ -169,10 +127,10 @@ function PluginStoreDialog({ isOpen, setIsOpen }: TPluginStoreDialogProps) {{/* Full-screen container to center the panel */}<div className="fixed inset-0 flex items-center justify-center p-4"><Dialog.Panel- className="relative w-full transform overflow-hidden overflow-y-auto rounded-lg bg-white text-left shadow-xl transition-all dark:bg-gray-900 max-sm:h-full sm:mx-7 sm:my-8 sm:max-w-2xl lg:max-w-5xl xl:max-w-7xl"+ className="relative w-full transform overflow-hidden overflow-y-auto rounded-lg bg-white text-left shadow-xl transition-all max-sm:h-full sm:mx-7 sm:my-8 sm:max-w-2xl lg:max-w-5xl xl:max-w-7xl dark:bg-gray-900"style={{ minHeight: '610px' }}>- <div className="flex items-center justify-between border-b-[1px] border-black/10 px-4 pb-4 pt-5 dark:border-white/10 sm:p-6">+ <div className="flex items-center justify-between border-b-[1px] border-black/10 px-4 pb-4 pt-5 sm:p-6 dark:border-white/10"><div className="flex items-center"><div className="text-center sm:text-left"><Dialog.Title className="text-lg font-medium leading-6 text-gray-900 dark:text-gray-200">diff --git a/client/src/components/Plugins/Store/PluginStoreItem.tsx b/client/src/components/Plugins/Store/PluginStoreItem.tsxindex 93c968a1a5..682403d62f 100644--- a/client/src/components/Plugins/Store/PluginStoreItem.tsx+++ b/client/src/components/Plugins/Store/PluginStoreItem.tsx@@ -1,5 +1,6 @@import { TPlugin } from 'librechat-data-provider';import { XCircle, DownloadCloud } from 'lucide-react';+import { useLocalize } from '~/hooks';type TPluginStoreItemProps = {plugin: TPlugin;@@ -9,6 +10,7 @@ type TPluginStoreItemProps = {};function PluginStoreItem({ plugin, onInstall, onUninstall, isInstalled }: TPluginStoreItemProps) {+ const localize = useLocalize();const handleClick = () => {if (isInstalled) {onUninstall();@@ -38,11 +40,11 @@ function PluginStoreItem({ plugin, onInstall, onUninstall, isInstalled }: TPlugi{!isInstalled ? (<buttonclassName="btn btn-primary relative"- aria-label={`Install ${plugin.name}`}+ aria-label={`${localize('com_nav_plugin_install')} ${plugin.name}`}onClick={handleClick}><div className="flex w-full items-center justify-center gap-2">- Install+ {localize('com_nav_plugin_install')}<DownloadCloud className="flex h-4 w-4 items-center stroke-2" /></div></button>@@ -50,10 +52,10 @@ function PluginStoreItem({ plugin, onInstall, onUninstall, isInstalled }: TPlugi<buttonclassName="btn relative bg-gray-300 hover:bg-gray-400 dark:bg-gray-50 dark:hover:bg-gray-200"onClick={handleClick}- aria-label={`Uninstall ${plugin.name}`}+ aria-label={`${localize('com_nav_plugin_uninstall')} ${plugin.name}`}><div className="flex w-full items-center justify-center gap-2">- Uninstall+ {localize('com_nav_plugin_uninstall')}<XCircle className="flex h-4 w-4 items-center stroke-2" /></div></button>diff --git a/client/src/components/Plugins/Store/__tests__/PluginPagination.spec.tsx b/client/src/components/Plugins/Store/__tests__/PluginPagination.spec.tsxindex fd6a3db7df..063f5c4442 100644--- a/client/src/components/Plugins/Store/__tests__/PluginPagination.spec.tsx+++ b/client/src/components/Plugins/Store/__tests__/PluginPagination.spec.tsx@@ -1,6 +1,6 @@import 'test/matchMedia.mock';import React from 'react';-import { render, screen } from '@testing-library/react';+import { render, screen } from 'test/layout-test-utils';import userEvent from '@testing-library/user-event';import PluginPagination from '../PluginPagination';diff --git a/client/src/components/Plugins/Store/__tests__/PluginStoreItem.spec.tsx b/client/src/components/Plugins/Store/__tests__/PluginStoreItem.spec.tsxindex 5b15cc9412..ef2a861c97 100644--- a/client/src/components/Plugins/Store/__tests__/PluginStoreItem.spec.tsx+++ b/client/src/components/Plugins/Store/__tests__/PluginStoreItem.spec.tsx@@ -1,5 +1,5 @@import 'test/matchMedia.mock';-import { render, screen } from '@testing-library/react';+import { render, screen } from 'test/layout-test-utils';import userEvent from '@testing-library/user-event';import { TPlugin } from 'librechat-data-provider';import PluginStoreItem from '../PluginStoreItem';diff --git a/client/src/components/SidePanel/Builder/ActionsAuth.tsx b/client/src/components/SidePanel/Builder/ActionsAuth.tsxnew file mode 100644index 0000000000..14e763809f--- /dev/null+++ b/client/src/components/SidePanel/Builder/ActionsAuth.tsx@@ -0,0 +1,296 @@+import { useFormContext } from 'react-hook-form';+import * as RadioGroup from '@radix-ui/react-radio-group';+import * as DialogPrimitive from '@radix-ui/react-dialog';+import {+ AuthTypeEnum,+ AuthorizationTypeEnum,+ TokenExchangeMethodEnum,+} from 'librechat-data-provider';+import { DialogContent } from '~/components/ui/';++export default function ActionsAuth({+ setOpenAuthDialog,+}: {+ setOpenAuthDialog: React.Dispatch<React.SetStateAction<boolean>>;+}) {+ const { watch, setValue, trigger } = useFormContext();+ const type = watch('type');+ return (+ <DialogContent+ role="dialog"+ id="radix-:rf5:"+ aria-describedby="radix-:rf7:"+ aria-labelledby="radix-:rf6:"+ data-state="open"+ className="left-1/2 col-auto col-start-2 row-auto row-start-2 w-full max-w-md -translate-x-1/2 rounded-xl bg-white pb-0 text-left shadow-xl transition-all dark:bg-gray-900 dark:text-gray-100"+ tabIndex={-1}+ style={{ pointerEvents: 'auto' }}+ >+ <div className="flex items-center justify-between border-b border-black/10 px-4 pb-4 pt-5 dark:border-white/10 sm:p-6">+ <div className="flex">+ <div className="flex items-center">+ <div className="flex grow flex-col gap-1">+ <h2+ id="radix-:rf6:"+ className="text-token-text-primary text-lg font-medium leading-6"+ >+ Authentication+ </h2>+ </div>+ </div>+ </div>+ </div>+ <div className="p-4 sm:p-6 sm:pt-0">+ <div className="mb-4">+ <label className="mb-1 block text-sm font-medium">Authentication Type</label>+ <RadioGroup.Root+ defaultValue={AuthTypeEnum.None}+ onValueChange={(value) => setValue('type', value)}+ value={type}+ role="radiogroup"+ aria-required="false"+ dir="ltr"+ className="flex gap-4"+ tabIndex={0}+ style={{ outline: 'none' }}+ >+ <div className="flex items-center gap-2">+ <label htmlFor=":rf8:" className="flex cursor-pointer items-center gap-1">+ <RadioGroup.Item+ type="button"+ role="radio"+ value={AuthTypeEnum.None}+ id=":rf8:"+ className="mr-1 flex h-5 w-5 items-center justify-center rounded-full border border-gray-500 bg-white dark:border-gray-600 dark:bg-gray-700"+ tabIndex={-1}+ >+ <RadioGroup.Indicator className="h-2 w-2 rounded-full bg-gray-950 dark:bg-white"></RadioGroup.Indicator>+ </RadioGroup.Item>+ None+ </label>+ </div>+ <div className="flex items-center gap-2">+ <label htmlFor=":rfa:" className="flex cursor-pointer items-center gap-1">+ <RadioGroup.Item+ type="button"+ role="radio"+ value={AuthTypeEnum.ServiceHttp}+ id=":rfa:"+ className="mr-1 flex h-5 w-5 items-center justify-center rounded-full border border-gray-500 bg-white dark:border-gray-600 dark:bg-gray-700"+ tabIndex={0}+ >+ <RadioGroup.Indicator className="h-2 w-2 rounded-full bg-gray-950 dark:bg-white"></RadioGroup.Indicator>+ </RadioGroup.Item>+ API Key+ </label>+ </div>+ <div className="flex items-center gap-2 text-gray-500">+ <label htmlFor=":rfc:" className="flex cursor-not-allowed items-center gap-1">+ <RadioGroup.Item+ type="button"+ role="radio"+ disabled={true}+ value={AuthTypeEnum.OAuth}+ id=":rfc:"+ className="mr-1 flex h-5 w-5 cursor-not-allowed items-center justify-center rounded-full border border-gray-500 bg-gray-300 dark:border-gray-600 dark:bg-gray-900"+ tabIndex={-1}+ >+ <RadioGroup.Indicator className="h-2 w-2 rounded-full bg-gray-950 dark:bg-white"></RadioGroup.Indicator>+ </RadioGroup.Item>+ OAuth+ </label>+ </div>+ </RadioGroup.Root>+ </div>+ {type === 'none' ? null : type === 'service_http' ? <ApiKey /> : <OAuth />}+ {/* Cancel/Save */}+ <div className="mt-5 flex flex-col gap-3 sm:mt-4 sm:flex-row-reverse">+ <button+ className="btn btn-dark relative"+ onClick={async () => {+ const result = await trigger(undefined, { shouldFocus: true });+ setValue('saved_auth_fields', result);+ setOpenAuthDialog(!result);+ }}+ >+ <div className="flex w-full items-center justify-center gap-2">Save</div>+ </button>+ <DialogPrimitive.Close className="btn btn-neutral relative">+ <div className="flex w-full items-center justify-center gap-2">Cancel</div>+ </DialogPrimitive.Close>+ </div>+ </div>+ </DialogContent>+ );+}++const ApiKey = () => {+ const { register, watch, setValue } = useFormContext();+ const authorization_type = watch('authorization_type');+ const type = watch('type');+ return (+ <>+ <label className="mb-1 block text-sm font-medium">API Key</label>+ <input+ placeholder="<HIDDEN>"+ type="password"+ autoComplete="off"+ className="border-token-border-medium mb-2 h-9 w-full resize-none overflow-y-auto rounded-lg border px-3 py-2 text-sm outline-none focus:ring-2 focus:ring-blue-400 dark:bg-gray-800"+ {...register('api_key', { required: type === AuthTypeEnum.ServiceHttp })}+ />+ <label className="mb-1 block text-sm font-medium">Auth Type</label>+ <RadioGroup.Root+ defaultValue={AuthorizationTypeEnum.Basic}+ onValueChange={(value) => setValue('authorization_type', value)}+ value={authorization_type}+ role="radiogroup"+ aria-required="true"+ dir="ltr"+ className="mb-2 flex gap-6 overflow-hidden rounded-lg"+ tabIndex={0}+ style={{ outline: 'none' }}+ >+ <div className="flex items-center gap-2">+ <label htmlFor=":rfu:" className="flex cursor-pointer items-center gap-1">+ <RadioGroup.Item+ type="button"+ role="radio"+ value={AuthorizationTypeEnum.Basic}+ id=":rfu:"+ className="mr-1 flex h-5 w-5 items-center justify-center rounded-full border border-gray-500 bg-white dark:border-gray-600 dark:bg-gray-700"+ tabIndex={-1}+ >+ <RadioGroup.Indicator className="h-2 w-2 rounded-full bg-gray-950 dark:bg-white"></RadioGroup.Indicator>+ </RadioGroup.Item>+ Basic+ </label>+ </div>+ <div className="flex items-center gap-2">+ <label htmlFor=":rg0:" className="flex cursor-pointer items-center gap-1">+ <RadioGroup.Item+ type="button"+ role="radio"+ value={AuthorizationTypeEnum.Bearer}+ id=":rg0:"+ className="mr-1 flex h-5 w-5 items-center justify-center rounded-full border border-gray-500 bg-white dark:border-gray-600 dark:bg-gray-700"+ tabIndex={-1}+ >+ <RadioGroup.Indicator className="h-2 w-2 rounded-full bg-gray-950 dark:bg-white"></RadioGroup.Indicator>+ </RadioGroup.Item>+ Bearer+ </label>+ </div>+ <div className="flex items-center gap-2">+ <label htmlFor=":rg2:" className="flex cursor-pointer items-center gap-1">+ <RadioGroup.Item+ type="button"+ role="radio"+ value={AuthorizationTypeEnum.Custom}+ id=":rg2:"+ className="mr-1 flex h-5 w-5 items-center justify-center rounded-full border border-gray-500 bg-white dark:border-gray-600 dark:bg-gray-700"+ tabIndex={0}+ >+ <RadioGroup.Indicator className="h-2 w-2 rounded-full bg-gray-950 dark:bg-white"></RadioGroup.Indicator>+ </RadioGroup.Item>+ Custom+ </label>+ </div>+ </RadioGroup.Root>+ {authorization_type === AuthorizationTypeEnum.Custom && (+ <div className="mt-2">+ <label className="mb-1 block text-sm font-medium">Custom Header Name</label>+ <input+ className="border-token-border-medium mb-2 h-9 w-full resize-none overflow-y-auto rounded-lg border px-3 py-2 text-sm outline-none focus:ring-2 focus:ring-blue-400 dark:bg-gray-800"+ placeholder="X-Api-Key"+ {...register('custom_auth_header', {+ required: authorization_type === AuthorizationTypeEnum.Custom,+ })}+ />+ </div>+ )}+ </>+ );+};++const OAuth = () => {+ const { register, watch, setValue } = useFormContext();+ const token_exchange_method = watch('token_exchange_method');+ const type = watch('type');+ return (+ <>+ <label className="mb-1 block text-sm font-medium">Client ID</label>+ <input+ placeholder="<HIDDEN>"+ type="password"+ autoComplete="off"+ className="border-token-border-medium mb-2 h-9 w-full resize-none overflow-y-auto rounded-lg border px-3 py-2 text-sm outline-none focus:ring-2 focus:ring-blue-400 dark:bg-gray-800"+ {...register('oauth_client_id', { required: type === AuthTypeEnum.OAuth })}+ />+ <label className="mb-1 block text-sm font-medium">Client Secret</label>+ <input+ placeholder="<HIDDEN>"+ type="password"+ autoComplete="off"+ className="border-token-border-medium mb-2 h-9 w-full resize-none overflow-y-auto rounded-lg border px-3 py-2 text-sm outline-none focus:ring-2 focus:ring-blue-400 dark:bg-gray-800"+ {...register('oauth_client_secret', { required: type === AuthTypeEnum.OAuth })}+ />+ <label className="mb-1 block text-sm font-medium">Authorization URL</label>+ <input+ className="border-token-border-medium mb-2 h-9 w-full resize-none overflow-y-auto rounded-lg border px-3 py-2 text-sm outline-none focus:ring-2 focus:ring-blue-400 dark:bg-gray-800"+ {...register('authorization_url', { required: type === AuthTypeEnum.OAuth })}+ />+ <label className="mb-1 block text-sm font-medium">Token URL</label>+ <input+ className="border-token-border-medium mb-2 h-9 w-full resize-none overflow-y-auto rounded-lg border px-3 py-2 text-sm outline-none focus:ring-2 focus:ring-blue-400 dark:bg-gray-800"+ {...register('client_url', { required: type === AuthTypeEnum.OAuth })}+ />+ <label className="mb-1 block text-sm font-medium">Scope</label>+ <input+ className="border-token-border-medium mb-2 h-9 w-full resize-none overflow-y-auto rounded-lg border px-3 py-2 text-sm outline-none focus:ring-2 focus:ring-blue-400 dark:bg-gray-800"+ {...register('scope', { required: type === AuthTypeEnum.OAuth })}+ />+ <label className="mb-1 block text-sm font-medium">Token Exchange Method</label>+ <RadioGroup.Root+ defaultValue={AuthorizationTypeEnum.Basic}+ onValueChange={(value) => setValue('token_exchange_method', value)}+ value={token_exchange_method}+ role="radiogroup"+ aria-required="true"+ dir="ltr"+ tabIndex={0}+ style={{ outline: 'none' }}+ >+ <div className="flex items-center gap-2">+ <label htmlFor=":rj1:" className="flex cursor-pointer items-center gap-1">+ <RadioGroup.Item+ type="button"+ role="radio"+ value={TokenExchangeMethodEnum.DefaultPost}+ id=":rj1:"+ className="mr-1 flex h-5 w-5 items-center justify-center rounded-full border border-gray-500 bg-white dark:border-gray-600 dark:bg-gray-700"+ tabIndex={-1}+ >+ <RadioGroup.Indicator className="h-2 w-2 rounded-full bg-gray-950 dark:bg-white"></RadioGroup.Indicator>+ </RadioGroup.Item>+ Default (POST request)+ </label>+ </div>+ <div className="flex items-center gap-2">+ <label htmlFor=":rj3:" className="flex cursor-pointer items-center gap-1">+ <RadioGroup.Item+ type="button"+ role="radio"+ value={TokenExchangeMethodEnum.BasicAuthHeader}+ id=":rj3:"+ className="mr-1 flex h-5 w-5 items-center justify-center rounded-full border border-gray-500 bg-white dark:border-gray-600 dark:bg-gray-700"+ tabIndex={-1}+ >+ <RadioGroup.Indicator className="h-2 w-2 rounded-full bg-gray-950 dark:bg-white"></RadioGroup.Indicator>+ </RadioGroup.Item>+ Basic authorization header+ </label>+ </div>+ </RadioGroup.Root>+ </>+ );+};diff --git a/client/src/components/SidePanel/Builder/ActionsInput.tsx b/client/src/components/SidePanel/Builder/ActionsInput.tsxnew file mode 100644index 0000000000..607866c6a4--- /dev/null+++ b/client/src/components/SidePanel/Builder/ActionsInput.tsx@@ -0,0 +1,267 @@+import debounce from 'lodash/debounce';+import { useState, useEffect } from 'react';+import { useFormContext } from 'react-hook-form';+import {+ validateAndParseOpenAPISpec,+ openapiToFunction,+ AuthTypeEnum,+} from 'librechat-data-provider';+import type {+ ValidationResult,+ Action,+ FunctionTool,+ ActionMetadata,+} from 'librechat-data-provider';+import type { ActionAuthForm } from '~/common';+import type { Spec } from './ActionsTable';+import { ActionsTable, columns } from './ActionsTable';+import { useUpdateAction } from '~/data-provider';+import { cn, removeFocusOutlines } from '~/utils';+import { Spinner } from '~/components/svg';++const debouncedValidation = debounce(+ (input: string, callback: (result: ValidationResult) => void) => {+ const result = validateAndParseOpenAPISpec(input);+ callback(result);+ },+ 800,+);++export default function ActionsInput({+ action,+ assistant_id,+ setAction,+}: {+ action?: Action;+ assistant_id?: string;+ setAction: React.Dispatch<React.SetStateAction<Action | undefined>>;+}) {+ const handleResult = (result: ValidationResult) => {+ if (!result.status) {+ setData(null);+ setFunctions(null);+ }+ setValidationResult(result);+ };++ const { handleSubmit, reset } = useFormContext<ActionAuthForm>();+ const [validationResult, setValidationResult] = useState<null | ValidationResult>(null);+ const [inputValue, setInputValue] = useState('');++ const [data, setData] = useState<Spec[] | null>(null);+ const [functions, setFunctions] = useState<FunctionTool[] | null>(null);++ useEffect(() => {+ if (!action?.metadata?.raw_spec) {+ return;+ }+ setInputValue(action.metadata.raw_spec);+ debouncedValidation(action.metadata.raw_spec, handleResult);+ }, [action?.metadata?.raw_spec]);++ useEffect(() => {+ if (!validationResult || !validationResult.status || !validationResult.spec) {+ return;+ }++ const { functionSignatures, requestBuilders } = openapiToFunction(validationResult.spec);+ const specs = Object.entries(requestBuilders).map(([name, props]) => {+ return {+ name,+ method: props.method,+ path: props.path,+ domain: props.domain,+ };+ });++ setData(specs);+ setValidationResult(null);+ setFunctions(functionSignatures.map((f) => f.toObjectTool()));+ }, [validationResult]);++ const updateAction = useUpdateAction({+ onSuccess(data) {+ reset();+ setAction(data[2]);+ },+ });++ const saveAction = handleSubmit((authFormData) => {+ console.log('authFormData', authFormData);+ if (!assistant_id) {+ // alert user?+ return;+ }++ if (!functions) {+ return;+ }++ if (!data) {+ return;+ }++ let { metadata = {} } = action ?? {};+ const action_id = action?.action_id;+ metadata.raw_spec = inputValue;+ const parsedUrl = new URL(data[0].domain);+ const domain = parsedUrl.hostname;+ if (!domain) {+ // alert user?+ return;+ }+ metadata.domain = domain;++ const { type, saved_auth_fields } = authFormData;++ const removeSensitiveFields = (obj: ActionMetadata) => {+ delete obj.auth;+ delete obj.api_key;+ delete obj.oauth_client_id;+ delete obj.oauth_client_secret;+ };++ if (saved_auth_fields && type === AuthTypeEnum.ServiceHttp) {+ metadata = {+ ...metadata,+ api_key: authFormData.api_key,+ auth: {+ type,+ authorization_type: authFormData.authorization_type,+ custom_auth_header: authFormData.custom_auth_header,+ },+ };+ } else if (saved_auth_fields && type === AuthTypeEnum.OAuth) {+ metadata = {+ ...metadata,+ auth: {+ type,+ authorization_url: authFormData.authorization_url,+ client_url: authFormData.client_url,+ scope: authFormData.scope,+ token_exchange_method: authFormData.token_exchange_method,+ },+ oauth_client_id: authFormData.oauth_client_id,+ oauth_client_secret: authFormData.oauth_client_secret,+ };+ } else if (saved_auth_fields) {+ removeSensitiveFields(metadata);+ metadata.auth = {+ type,+ };+ } else {+ removeSensitiveFields(metadata);+ }++ updateAction.mutate({+ action_id,+ metadata,+ functions,+ assistant_id,+ });+ });++ const handleInputChange: React.ChangeEventHandler<HTMLTextAreaElement> = (event) => {+ const newValue = event.target.value;+ setInputValue(newValue);+ if (!newValue) {+ setData(null);+ setFunctions(null);+ return setValidationResult(null);+ }+ debouncedValidation(newValue, handleResult);+ };++ return (+ <>+ <div className="">+ <div className="mb-1 flex flex-wrap items-center justify-between gap-4">+ <label className="text-token-text-primary whitespace-nowrap font-medium">Schema</label>+ <div className="flex items-center gap-2">+ {/* <button className="btn btn-neutral border-token-border-light relative h-8 min-w-[100px] rounded-lg font-medium">+ <div className="flex w-full items-center justify-center text-xs">Import from URL</div>+ </button> */}+ <select+ onChange={(e) => console.log(e.target.value)}+ className="border-token-border-medium h-8 min-w-[100px] rounded-lg border bg-transparent px-2 py-0 text-sm"+ >+ <option value="label">Examples</option>+ <option value="0">Weather (JSON)</option>+ <option value="1">Pet Store (YAML)</option>+ <option value="2">Blank Template</option>+ </select>+ </div>+ </div>+ <div className="border-token-border-light mb-4 overflow-hidden rounded-lg border">+ <div className="relative">+ <textarea+ value={inputValue}+ onChange={handleInputChange}+ spellCheck="false"+ placeholder="Enter your OpenAPI schema here"+ className={cn(+ 'text-token-text-primary block h-96 w-full border-none bg-transparent p-2 font-mono text-xs',+ removeFocusOutlines,+ )}+ />+ {/* TODO: format input button */}+ </div>+ {validationResult && validationResult.message !== 'OpenAPI spec is valid.' && (+ <div className="border-token-border-light border-t p-2 text-red-500">+ {validationResult.message.split('\n').map((line: string, i: number) => (+ <div key={i}>{line}</div>+ ))}+ </div>+ )}+ </div>+ </div>+ {!!data && (+ <div>+ <div className="mb-1.5 flex items-center">+ <label className="text-token-text-primary block font-medium">Available actions</label>+ </div>+ <ActionsTable columns={columns} data={data} />+ </div>+ )}+ <div className="mt-4">+ <div className="mb-1.5 flex items-center">+ <span className="" data-state="closed">+ <label className="text-token-text-primary block font-medium">Privacy policy</label>+ </span>+ </div>+ <div className="rounded-md border border-gray-300 px-3 py-2 shadow-none focus-within:border-gray-800 focus-within:ring-1 focus-within:ring-gray-800 dark:bg-gray-700 dark:focus-within:border-white dark:focus-within:ring-white">+ <label+ htmlFor="privacyPolicyUrl"+ className="block text-xs font-medium text-gray-900 dark:text-gray-100"+ />+ <div className="relative">+ <input+ name="privacyPolicyUrl"+ id="privacyPolicyUrl"+ className="block w-full border-0 p-0 text-gray-900 placeholder-gray-500 shadow-none outline-none focus-within:shadow-none focus-within:outline-none focus-within:ring-0 focus:border-none focus:ring-0 dark:bg-gray-700 dark:text-gray-100 sm:text-sm"+ placeholder="https://api.example-weather-app.com/privacy"+ // value=""+ />+ </div>+ </div>+ </div>+ <div className="flex items-center justify-end">+ <button+ disabled={!functions || !functions.length}+ onClick={saveAction}+ className="focus:shadow-outline mt-1 flex min-w-[100px] items-center justify-center rounded bg-green-500 px-4 py-2 font-semibold text-white hover:bg-green-400 focus:border-green-500 focus:outline-none focus:ring-0 disabled:bg-green-400"+ type="button"+ >+ {/* TODO: Add localization */}+ {updateAction.isLoading ? (+ <Spinner className="icon-md" />+ ) : action?.action_id ? (+ 'Update'+ ) : (+ 'Create'+ )}+ </button>+ </div>+ </>+ );+}diff --git a/client/src/components/SidePanel/Builder/ActionsPanel.tsx b/client/src/components/SidePanel/Builder/ActionsPanel.tsxnew file mode 100644index 0000000000..1bdab64b92--- /dev/null+++ b/client/src/components/SidePanel/Builder/ActionsPanel.tsx@@ -0,0 +1,178 @@+import { useEffect, useState } from 'react';+import { useForm, FormProvider } from 'react-hook-form';+import {+ AuthTypeEnum,+ AuthorizationTypeEnum,+ TokenExchangeMethodEnum,+} from 'librechat-data-provider';+import type { AssistantPanelProps, ActionAuthForm } from '~/common';+import { Dialog, DialogTrigger } from '~/components/ui';+import { useDeleteAction } from '~/data-provider';+import { NewTrashIcon } from '~/components/svg';+import ActionsInput from './ActionsInput';+import ActionsAuth from './ActionsAuth';+import { Panel } from '~/common';++export default function ActionsPanel({+ // activePanel,+ action,+ setAction,+ setActivePanel,+ assistant_id,+}: AssistantPanelProps) {+ const [openAuthDialog, setOpenAuthDialog] = useState(false);+ const deleteAction = useDeleteAction({+ onSuccess: () => {+ setActivePanel(Panel.builder);+ setAction(undefined);+ },+ });++ const methods = useForm<ActionAuthForm>({+ defaultValues: {+ /* General */+ type: AuthTypeEnum.None,+ saved_auth_fields: false,+ /* API key */+ api_key: '',+ authorization_type: AuthorizationTypeEnum.Basic,+ custom_auth_header: '',+ /* OAuth */+ oauth_client_id: '',+ oauth_client_secret: '',+ authorization_url: '',+ client_url: '',+ scope: '',+ token_exchange_method: TokenExchangeMethodEnum.DefaultPost,+ },+ });++ const { reset, watch } = methods;+ const type = watch('type');++ useEffect(() => {+ if (action?.metadata?.auth) {+ reset({+ type: action.metadata.auth.type || AuthTypeEnum.None,+ saved_auth_fields: false,+ api_key: action.metadata.api_key ?? '',+ authorization_type: action.metadata.auth.authorization_type || AuthorizationTypeEnum.Basic,+ oauth_client_id: action.metadata.oauth_client_id ?? '',+ oauth_client_secret: action.metadata.oauth_client_secret ?? '',+ authorization_url: action.metadata.auth.authorization_url ?? '',+ client_url: action.metadata.auth.client_url ?? '',+ scope: action.metadata.auth.scope ?? '',+ token_exchange_method:+ action.metadata.auth.token_exchange_method ?? TokenExchangeMethodEnum.DefaultPost,+ });+ }+ }, [action, reset]);++ return (+ <FormProvider {...methods}>+ <form className="h-full grow overflow-hidden">+ <div className="h-full overflow-auto px-2 pb-12 text-sm">+ <div className="relative flex flex-col items-center px-16 py-6 text-center">+ <div className="absolute left-0 top-6">+ <button+ type="button"+ className="btn btn-neutral relative"+ onClick={() => {+ setActivePanel(Panel.builder);+ setAction(undefined);+ }}+ >+ <div className="flex w-full items-center justify-center gap-2">+ <svg+ width="24"+ height="24"+ viewBox="0 0 24 24"+ fill="none"+ xmlns="http://www.w3.org/2000/svg"+ className="icon-md"+ >+ <path+ d="M15 5L8 12L15 19"+ stroke="currentColor"+ strokeWidth="2"+ strokeLinecap="round"+ strokeLinejoin="round"+ ></path>+ </svg>+ </div>+ </button>+ </div>+ {!!action && (+ <div className="absolute right-0 top-6">+ <button+ type="button"+ disabled={!assistant_id || !action.action_id}+ className="btn btn-neutral relative text-red-500"+ onClick={() => {+ if (!assistant_id) {+ return prompt('No assistant_id found, is the assistant created?');+ }+ const confirmed = confirm('Are you sure you want to delete this action?');+ if (confirmed) {+ deleteAction.mutate({+ action_id: action.action_id,+ assistant_id,+ });+ }+ }}+ >+ <div className="flex w-full items-center justify-center gap-2">+ <NewTrashIcon className="icon-md text-red-500" />+ </div>+ </button>+ </div>+ )}+ <div className="text-xl font-medium">{(action ? 'Edit' : 'Add') + ' ' + 'actions'}</div>+ <div className="text-token-text-tertiary text-sm">+ {/* TODO: use App title */}+ Let your Assistant retrieve information or take actions outside of LibreChat.+ </div>+ {/* <div className="text-sm text-token-text-tertiary">+ <a href="https://help.openai.com/en/articles/8554397-creating-a-gpt" target="_blank" rel="noreferrer" className="font-medium">Learn more.</a>+ </div> */}+ </div>+ <Dialog open={openAuthDialog} onOpenChange={setOpenAuthDialog}>+ <DialogTrigger asChild>+ <div className="relative mb-6">+ <div className="mb-1.5 flex items-center">+ <label className="text-token-text-primary block font-medium">+ Authentication+ </label>+ </div>+ <div className="border-token-border-medium flex rounded-lg border text-sm hover:cursor-pointer">+ <div className="h-9 grow px-3 py-2">{type}</div>+ <div className="bg-token-border-medium w-px"></div>+ <button type="button" color="neutral" className="flex items-center gap-2 px-3">+ <svg+ width="24"+ height="24"+ viewBox="0 0 24 24"+ fill="none"+ xmlns="http://www.w3.org/2000/svg"+ className="icon-sm"+ >+ <path+ d="M11.6439 3C10.9352 3 10.2794 3.37508 9.92002 3.98596L9.49644 4.70605C8.96184 5.61487 7.98938 6.17632 6.93501 6.18489L6.09967 6.19168C5.39096 6.19744 4.73823 6.57783 4.38386 7.19161L4.02776 7.80841C3.67339 8.42219 3.67032 9.17767 4.01969 9.7943L4.43151 10.5212C4.95127 11.4386 4.95127 12.5615 4.43151 13.4788L4.01969 14.2057C3.67032 14.8224 3.67339 15.5778 4.02776 16.1916L4.38386 16.8084C4.73823 17.4222 5.39096 17.8026 6.09966 17.8083L6.93502 17.8151C7.98939 17.8237 8.96185 18.3851 9.49645 19.294L9.92002 20.014C10.2794 20.6249 10.9352 21 11.6439 21H12.3561C13.0648 21 13.7206 20.6249 14.08 20.014L14.5035 19.294C15.0381 18.3851 16.0106 17.8237 17.065 17.8151L17.9004 17.8083C18.6091 17.8026 19.2618 17.4222 19.6162 16.8084L19.9723 16.1916C20.3267 15.5778 20.3298 14.8224 19.9804 14.2057L19.5686 13.4788C19.0488 12.5615 19.0488 11.4386 19.5686 10.5212L19.9804 9.7943C20.3298 9.17767 20.3267 8.42219 19.9723 7.80841L19.6162 7.19161C19.2618 6.57783 18.6091 6.19744 17.9004 6.19168L17.065 6.18489C16.0106 6.17632 15.0382 5.61487 14.5036 4.70605L14.08 3.98596C13.7206 3.37508 13.0648 3 12.3561 3H11.6439Z"+ stroke="currentColor"+ strokeWidth="2"+ strokeLinejoin="round"+ />+ <circle cx="12" cy="12" r="2.5" stroke="currentColor" strokeWidth="2" />+ </svg>+ </button>+ </div>+ </div>+ </DialogTrigger>+ <ActionsAuth setOpenAuthDialog={setOpenAuthDialog} />+ </Dialog>+ <ActionsInput action={action} assistant_id={assistant_id} setAction={setAction} />+ </div>+ </form>+ </FormProvider>+ );+}diff --git a/client/src/components/SidePanel/Builder/ActionsTable/Columns.tsx b/client/src/components/SidePanel/Builder/ActionsTable/Columns.tsxnew file mode 100644index 0000000000..23d491f8c7--- /dev/null+++ b/client/src/components/SidePanel/Builder/ActionsTable/Columns.tsx@@ -0,0 +1,54 @@+import type { ColumnDef } from '@tanstack/react-table';++export type Spec = {+ name: string;+ method: string;+ path: string;+ domain: string;+};++export const fakeData: Spec[] = [+ {+ name: 'listPets',+ method: 'get',+ path: '/pets',+ domain: 'petstore.swagger.io',+ },+ {+ name: 'createPets',+ method: 'post',+ path: '/pets',+ domain: 'petstore.swagger.io',+ },+ {+ name: 'showPetById',+ method: 'get',+ path: '/pets/{petId}',+ domain: 'petstore.swagger.io',+ },+];++export const columns: ColumnDef<Spec>[] = [+ {+ header: 'Name',+ accessorKey: 'name',+ },+ {+ header: 'Method',+ accessorKey: 'method',+ },+ {+ header: 'Path',+ accessorKey: 'path',+ },+ // {+ // header: '',+ // accessorKey: 'action',+ // // eslint-disable-next-line @typescript-eslint/no-unused-vars+ // cell: ({ row: _row }) => (+ // <button className="btn relative btn-neutral h-8 rounded-lg border-token-border-light font-medium">+ // <div className="flex w-full gap-2 items-center justify-center">Test</div>+ // </button>+ // ),+ // },+];diff --git a/client/src/components/SidePanel/Builder/ActionsTable/Table.tsx b/client/src/components/SidePanel/Builder/ActionsTable/Table.tsxnew file mode 100644index 0000000000..921c9571ae--- /dev/null+++ b/client/src/components/SidePanel/Builder/ActionsTable/Table.tsx@@ -0,0 +1,47 @@+import { useReactTable, flexRender, getCoreRowModel } from '@tanstack/react-table';+import type { ColumnDef } from '@tanstack/react-table';++interface DataTableProps<TData, TValue> {+ columns: ColumnDef<TData, TValue>[];+ data: TData[];+}++export default function DataTable<TData, TValue>({ columns, data }: DataTableProps<TData, TValue>) {+ const table = useReactTable({+ columns,+ data,+ getCoreRowModel: getCoreRowModel(),+ });++ return (+ <table className="w-full text-sm">+ <thead>+ {table.getHeaderGroups().map((headerGroup, i) => (+ <tr+ key={i}+ className="border-token-border-light text-token-text-tertiary border-b text-left text-xs"+ >+ {headerGroup.headers.map((header, j) => (+ <th key={j} className="py-1 font-normal">+ {header.isPlaceholder+ ? null+ : flexRender(header.column.columnDef.header, header.getContext())}+ </th>+ ))}+ </tr>+ ))}+ </thead>+ <tbody>+ {table.getRowModel().rows.map((row, i) => (+ <tr key={i} className="border-token-border-light border-b">+ {row.getVisibleCells().map((cell, j) => (+ <td key={j} className="py-2">+ {flexRender(cell.column.columnDef.cell, cell.getContext())}+ </td>+ ))}+ </tr>+ ))}+ </tbody>+ </table>+ );+}diff --git a/client/src/components/SidePanel/Builder/ActionsTable/index.ts b/client/src/components/SidePanel/Builder/ActionsTable/index.tsnew file mode 100644index 0000000000..0280dcde08--- /dev/null+++ b/client/src/components/SidePanel/Builder/ActionsTable/index.ts@@ -0,0 +1,2 @@+export { default as ActionsTable } from './Table';+export * from './Columns';diff --git a/client/src/components/SidePanel/Builder/AssistantAction.tsx b/client/src/components/SidePanel/Builder/AssistantAction.tsxnew file mode 100644index 0000000000..acf5232b21--- /dev/null+++ b/client/src/components/SidePanel/Builder/AssistantAction.tsx@@ -0,0 +1,33 @@+import type { Action } from 'librechat-data-provider';+import GearIcon from '~/components/svg/GearIcon';++export default function AssistantAction({+ action,+ onClick,+}: {+ action: Action;+ onClick: () => void;+}) {+ return (+ <div>+ <div+ onClick={onClick}+ className="border-token-border-medium flex w-full rounded-lg border text-sm hover:cursor-pointer"+ >+ <div+ className="h-9 grow px-3 py-2"+ style={{ textOverflow: 'ellipsis', wordBreak: 'break-all', overflow: 'hidden' }}+ >+ {action.metadata.domain}+ </div>+ <div className="w-px bg-gray-300 dark:bg-gray-600" />+ <button+ type="button"+ className="flex h-9 w-9 min-w-9 items-center justify-center rounded-lg rounded-l-none"+ >+ <GearIcon className="icon-sm" />+ </button>+ </div>+ </div>+ );+}diff --git a/client/src/components/SidePanel/Builder/AssistantAvatar.tsx b/client/src/components/SidePanel/Builder/AssistantAvatar.tsxnew file mode 100644index 0000000000..71c30f8dc4--- /dev/null+++ b/client/src/components/SidePanel/Builder/AssistantAvatar.tsx@@ -0,0 +1,204 @@+import * as Popover from '@radix-ui/react-popover';+import { useState, useEffect, useRef } from 'react';+import { useQueryClient } from '@tanstack/react-query';+import {+ fileConfig as defaultFileConfig,+ QueryKeys,+ defaultOrderQuery,+ mergeFileConfig,+} from 'librechat-data-provider';+import type { UseMutationResult } from '@tanstack/react-query';+import type {+ Metadata,+ AssistantListResponse,+ Assistant,+ AssistantCreateParams,+} from 'librechat-data-provider';+import { useUploadAssistantAvatarMutation, useGetFileConfig } from '~/data-provider';+import { AssistantAvatar, NoImage, AvatarMenu } from './Images';+import { useToastContext } from '~/Providers';+// import { Spinner } from '~/components/svg';+import { useLocalize } from '~/hooks';+// import { cn } from '~/utils/';++function Avatar({+ assistant_id,+ metadata,+ createMutation,+}: {+ assistant_id: string | null;+ metadata: null | Metadata;+ createMutation: UseMutationResult<Assistant, Error, AssistantCreateParams>;+}) {+ // console.log('Avatar', assistant_id, metadata, createMutation);+ const queryClient = useQueryClient();+ const [menuOpen, setMenuOpen] = useState(false);+ const [progress, setProgress] = useState<number>(1);+ const [input, setInput] = useState<File | null>(null);+ const [previewUrl, setPreviewUrl] = useState<string | null>(null);+ const lastSeenCreatedId = useRef<string | null>(null);+ const { data: fileConfig = defaultFileConfig } = useGetFileConfig({+ select: (data) => mergeFileConfig(data),+ });++ const localize = useLocalize();+ const { showToast } = useToastContext();++ const { mutate: uploadAvatar } = useUploadAssistantAvatarMutation({+ onMutate: () => {+ setProgress(0.4);+ },+ onSuccess: (data, vars) => {+ if (!vars.postCreation) {+ showToast({ message: localize('com_ui_upload_success') });+ } else if (lastSeenCreatedId.current !== createMutation.data?.id) {+ lastSeenCreatedId.current = createMutation.data?.id ?? '';+ }++ setInput(null);+ setPreviewUrl(data.metadata?.avatar as string | null);++ const res = queryClient.getQueryData<AssistantListResponse>([+ QueryKeys.assistants,+ defaultOrderQuery,+ ]);++ if (!res?.data || !res) {+ return;+ }++ const assistants =+ res.data.map((assistant) => {+ if (assistant.id === assistant_id) {+ return {+ ...assistant,+ ...data,+ };+ }+ return assistant;+ }) ?? [];++ queryClient.setQueryData<AssistantListResponse>([QueryKeys.assistants, defaultOrderQuery], {+ ...res,+ data: assistants,+ });++ setProgress(1);+ },+ onError: (error) => {+ console.error('Error:', error);+ setInput(null);+ setPreviewUrl(null);+ showToast({ message: localize('com_ui_upload_error'), status: 'error' });+ setProgress(1);+ },+ });++ useEffect(() => {+ if (input) {+ const reader = new FileReader();+ reader.onloadend = () => {+ setPreviewUrl(reader.result as string);+ };+ reader.readAsDataURL(input);+ }+ }, [input]);++ useEffect(() => {+ setPreviewUrl((metadata?.avatar as string | undefined) ?? null);+ }, [metadata]);++ useEffect(() => {+ /** Experimental: Condition to prime avatar upload before Assistant Creation+ * - If the createMutation state Id was last seen (current) and the createMutation is successful+ * we can assume that the avatar upload has already been initiated and we can skip the upload+ *+ * The mutation state is not reset until the user deliberately selects a new assistant or an assistant is deleted+ *+ * This prevents the avatar from being uploaded multiple times before the user selects a new assistant+ * while allowing the user to upload to prime the avatar and other values before the assistant is created.+ */+ const sharedUploadCondition = !!(+ createMutation.isSuccess &&+ input &&+ previewUrl &&+ previewUrl?.includes('base64')+ );+ if (sharedUploadCondition && lastSeenCreatedId.current === createMutation.data?.id) {+ return;+ }++ if (sharedUploadCondition && createMutation.data.id) {+ console.log('[AssistantAvatar] Uploading Avatar after Assistant Creation');++ const formData = new FormData();+ formData.append('file', input, input.name);+ formData.append('assistant_id', createMutation.data.id);++ if (typeof createMutation.data?.metadata === 'object') {+ formData.append('metadata', JSON.stringify(createMutation.data?.metadata));+ }++ uploadAvatar({+ assistant_id: createMutation.data.id,+ postCreation: true,+ formData,+ });+ }+ }, [createMutation.data, createMutation.isSuccess, input, previewUrl, uploadAvatar]);++ const handleFileChange = (event: React.ChangeEvent<HTMLInputElement>): void => {+ const file = event.target.files?.[0];++ if (fileConfig.avatarSizeLimit && file && file.size <= fileConfig.avatarSizeLimit) {+ if (!file) {+ console.error('No file selected');+ return;+ }++ setInput(file);+ setMenuOpen(false);++ if (!assistant_id) {+ // wait for successful form submission before uploading avatar+ console.log('[AssistantAvatar] No assistant_id, will wait until form submission + upload');+ return;+ }++ const formData = new FormData();+ formData.append('file', file, file.name);+ formData.append('assistant_id', assistant_id);++ if (typeof metadata === 'object') {+ formData.append('metadata', JSON.stringify(metadata));+ }++ uploadAvatar({+ assistant_id,+ formData,+ });+ } else {+ showToast({+ message: localize('com_ui_upload_invalid'),+ status: 'error',+ });+ }++ setMenuOpen(false);+ };++ return (+ <Popover.Root open={menuOpen} onOpenChange={setMenuOpen}>+ <div className="flex w-full items-center justify-center gap-4">+ <Popover.Trigger asChild>+ <button type="button" className="h-20 w-20">+ {previewUrl ? <AssistantAvatar url={previewUrl} progress={progress} /> : <NoImage />}+ </button>+ </Popover.Trigger>+ </div>+ {<AvatarMenu handleFileChange={handleFileChange} />}+ </Popover.Root>+ );+}++export default Avatar;diff --git a/client/src/components/SidePanel/Builder/AssistantPanel.tsx b/client/src/components/SidePanel/Builder/AssistantPanel.tsxnew file mode 100644index 0000000000..04b4a52696--- /dev/null+++ b/client/src/components/SidePanel/Builder/AssistantPanel.tsx@@ -0,0 +1,464 @@+import { useState, useMemo, useEffect } from 'react';+import { useQueryClient } from '@tanstack/react-query';+import { useGetModelsQuery } from 'librechat-data-provider/react-query';+import { useForm, FormProvider, Controller, useWatch } from 'react-hook-form';+import {+ Tools,+ QueryKeys,+ EModelEndpoint,+ actionDelimiter,+ supportsRetrieval,+ defaultAssistantFormValues,+} from 'librechat-data-provider';+import type { FunctionTool, TPlugin } from 'librechat-data-provider';+import type { AssistantForm, AssistantPanelProps } from '~/common';+import { useCreateAssistantMutation, useUpdateAssistantMutation } from '~/data-provider';+import { SelectDropDown, Checkbox, QuestionMark } from '~/components/ui';+import { useAssistantsMapContext, useToastContext } from '~/Providers';+import { useSelectAssistant, useLocalize } from '~/hooks';+import { ToolSelectDialog } from '~/components/Tools';+import AssistantAvatar from './AssistantAvatar';+import AssistantSelect from './AssistantSelect';+import AssistantAction from './AssistantAction';+import ContextButton from './ContextButton';+import AssistantTool from './AssistantTool';+import { Spinner } from '~/components/svg';+import { cn, cardStyle } from '~/utils/';+import Knowledge from './Knowledge';+import { Panel } from '~/common';++const labelClass = 'mb-2 block text-xs font-bold text-gray-700 dark:text-gray-400';+const inputClass =+ 'focus:shadow-outline w-full appearance-none rounded-md border px-3 py-2 text-sm leading-tight text-gray-700 dark:text-white shadow focus:border-green-500 focus:outline-none focus:ring-0 dark:bg-gray-800 dark:border-gray-700/80';++export default function AssistantPanel({+ // index = 0,+ setAction,+ actions = [],+ setActivePanel,+ assistant_id: current_assistant_id,+ setCurrentAssistantId,+}: AssistantPanelProps) {+ const queryClient = useQueryClient();+ const modelsQuery = useGetModelsQuery();+ const assistantMap = useAssistantsMapContext();+ const [showToolDialog, setShowToolDialog] = useState(false);+ const allTools = queryClient.getQueryData<TPlugin[]>([QueryKeys.tools]) ?? [];+ const { onSelect: onSelectAssistant } = useSelectAssistant();+ const { showToast } = useToastContext();+ const localize = useLocalize();++ const methods = useForm<AssistantForm>({+ defaultValues: defaultAssistantFormValues,+ });+ const { control, handleSubmit, reset, setValue, getValues } = methods;+ const assistant_id = useWatch({ control, name: 'id' });+ const assistant = useWatch({ control, name: 'assistant' });+ const functions = useWatch({ control, name: 'functions' });+ const model = useWatch({ control, name: 'model' });++ useEffect(() => {+ if (model && !supportsRetrieval.has(model)) {+ setValue('retrieval', false);+ }+ }, [model, setValue]);++ /* Mutations */+ const update = useUpdateAssistantMutation({+ onSuccess: (data) => {+ showToast({+ message: `${localize('com_assistants_update_success')} ${+ data.name ?? localize('com_ui_assistant')+ }`,+ });+ },+ onError: (err) => {+ const error = err as Error;+ showToast({+ message: `${localize('com_assistants_update_error')}${+ error?.message ? ` ${localize('com_ui_error')}: ${error?.message}` : ''+ }`,+ status: 'error',+ });+ },+ });+ const create = useCreateAssistantMutation({+ onSuccess: (data) => {+ setCurrentAssistantId(data.id);+ showToast({+ message: `${localize('com_assistants_create_success')} ${+ data.name ?? localize('com_ui_assistant')+ }`,+ });+ },+ onError: (err) => {+ const error = err as Error;+ showToast({+ message: `${localize('com_assistants_create_error')}${+ error?.message ? ` ${localize('com_ui_error')}: ${error?.message}` : ''+ }`,+ status: 'error',+ });+ },+ });++ const files = useMemo(() => {+ if (typeof assistant === 'string') {+ return [];+ }+ return assistant.files;+ }, [assistant]);++ const onSubmit = (data: AssistantForm) => {+ const tools: Array<FunctionTool | string> = [...functions].map((functionName) => {+ if (!functionName.includes(actionDelimiter)) {+ return functionName;+ } else {+ const assistant = assistantMap?.[assistant_id];+ const tool = assistant?.tools?.find((tool) => tool.function?.name === functionName);+ if (assistant && tool) {+ return tool;+ }+ }++ return functionName;+ });++ console.log(data);+ if (data.code_interpreter) {+ tools.push({ type: Tools.code_interpreter });+ }+ if (data.retrieval) {+ tools.push({ type: Tools.retrieval });+ }++ const {+ name,+ description,+ instructions,+ model,+ // file_ids, // TODO: add file handling here+ } = data;++ if (assistant_id) {+ update.mutate({+ assistant_id,+ data: {+ name,+ description,+ instructions,+ model,+ tools,+ },+ });+ return;+ }++ create.mutate({+ name,+ description,+ instructions,+ model,+ tools,+ });+ };++ return (+ <FormProvider {...methods}>+ <form+ onSubmit={handleSubmit(onSubmit)}+ className="h-auto w-full flex-shrink-0 overflow-x-hidden"+ >+ <div className="flex w-full flex-wrap">+ <Controller+ name="assistant"+ control={control}+ render={({ field }) => (+ <AssistantSelect+ reset={reset}+ value={field.value}+ setCurrentAssistantId={setCurrentAssistantId}+ selectedAssistant={current_assistant_id ?? null}+ createMutation={create}+ />+ )}+ />+ {/* Select Button */}+ {assistant_id && (+ <button+ className="btn btn-primary focus:shadow-outline mx-2 mt-1 h-[40px] rounded bg-green-500 px-4 py-2 font-semibold text-white hover:bg-green-400 focus:border-green-500 focus:outline-none focus:ring-0"+ type="button"+ disabled={!assistant_id}+ onClick={(e) => {+ e.preventDefault();+ onSelectAssistant(assistant_id);+ }}+ >+ {localize('com_ui_select')}+ </button>+ )}+ </div>+ <div className="h-auto bg-white px-4 pb-8 pt-3 dark:bg-transparent">+ {/* Avatar & Name */}+ <div className="mb-4">+ <AssistantAvatar+ createMutation={create}+ assistant_id={assistant_id ?? null}+ metadata={assistant?.['metadata'] ?? null}+ />+ <label className={labelClass} htmlFor="name">+ {localize('com_ui_name')}+ </label>+ <Controller+ name="name"+ control={control}+ render={({ field }) => (+ <input+ {...field}+ value={field.value ?? ''}+ {...{ max: 256 }}+ className={inputClass}+ id="name"+ type="text"+ placeholder={localize('com_assistants_name_placeholder')}+ />+ )}+ />+ <Controller+ name="id"+ control={control}+ render={({ field }) => (+ <p className="h-3 text-xs italic text-gray-600">{field.value ?? ''}</p>+ )}+ />+ </div>+ {/* Description */}+ <div className="mb-4">+ <label className={labelClass} htmlFor="description">+ {localize('com_ui_description')}+ </label>+ <Controller+ name="description"+ control={control}+ render={({ field }) => (+ <input+ {...field}+ value={field.value ?? ''}+ {...{ max: 512 }}+ className={inputClass}+ id="description"+ type="text"+ placeholder={localize('com_assistants_description_placeholder')}+ />+ )}+ />+ </div>++ {/* Instructions */}+ <div className="mb-6">+ <label className={labelClass} htmlFor="instructions">+ {localize('com_ui_instructions')}+ </label>+ <Controller+ name="instructions"+ control={control}+ render={({ field }) => (+ <textarea+ {...field}+ value={field.value ?? ''}+ {...{ max: 32768 }}+ className="focus:shadow-outline min-h-[150px] w-full resize-none resize-y appearance-none rounded-md border px-3 py-2 text-sm leading-tight text-gray-700 shadow focus:border-green-500 focus:outline-none focus:ring-0 dark:border-gray-700/80 dark:bg-gray-800 dark:text-white"+ id="instructions"+ placeholder={localize('com_assistants_instructions_placeholder')}+ rows={3}+ />+ )}+ />+ </div>+ {/* Model */}+ <div className="mb-6">+ <label className={labelClass} htmlFor="model">+ {localize('com_ui_model')}+ </label>+ <Controller+ name="model"+ control={control}+ render={({ field }) => (+ <SelectDropDown+ emptyTitle={true}+ value={field.value}+ setValue={field.onChange}+ availableValues={modelsQuery.data?.[EModelEndpoint.assistants] ?? []}+ showAbove={false}+ showLabel={false}+ className={cn(+ cardStyle,+ 'flex h-[40px] w-full flex-none items-center justify-center px-4 hover:cursor-pointer',+ )}+ />+ )}+ />+ </div>+ {/* Knowledge */}+ <Knowledge assistant_id={assistant_id} files={files} />+ {/* Capabilities */}+ <div className="mb-6">+ <div className="mb-1.5 flex items-center">+ <span>+ <label className="text-token-text-primary block font-medium">Capabilities</label>+ </span>+ </div>+ <div className="flex flex-col items-start gap-2">+ <div className="flex items-center">+ <Controller+ name={'code_interpreter'}+ control={control}+ render={({ field }) => (+ <Checkbox+ {...field}+ checked={field.value}+ onCheckedChange={field.onChange}+ className="relative float-left mr-2 inline-flex h-4 w-4 cursor-pointer"+ value={field?.value?.toString()}+ />+ )}+ />+ <label+ className="form-check-label text-token-text-primary w-full cursor-pointer"+ htmlFor="code_interpreter"+ onClick={() =>+ setValue('code_interpreter', !getValues('code_interpreter'), {+ shouldDirty: true,+ })+ }+ >+ <div className="flex items-center">+ {localize('com_assistants_code_interpreter')}+ <QuestionMark />+ </div>+ </label>+ </div>+ <div className="flex items-center">+ <Controller+ name={'retrieval'}+ control={control}+ render={({ field }) => (+ <Checkbox+ {...field}+ checked={field.value}+ disabled={!supportsRetrieval.has(model)}+ onCheckedChange={field.onChange}+ className="relative float-left mr-2 inline-flex h-4 w-4 cursor-pointer"+ value={field?.value?.toString()}+ />+ )}+ />+ <label+ className={cn(+ 'form-check-label text-token-text-primary w-full',+ !supportsRetrieval.has(model) ? 'cursor-no-drop opacity-50' : 'cursor-pointer',+ )}+ htmlFor="retrieval"+ onClick={() =>+ supportsRetrieval.has(model) &&+ setValue('retrieval', !getValues('retrieval'), { shouldDirty: true })+ }+ >+ {localize('com_assistants_retrieval')}+ </label>+ </div>+ </div>+ </div>+ {/* Tools */}+ <div className="mb-6">+ <label className={labelClass}>{localize('com_assistants_tools_section')}</label>+ <div className="space-y-1">+ {functions.map((func) => (+ <AssistantTool+ key={func}+ tool={func}+ allTools={allTools}+ assistant_id={assistant_id}+ />+ ))}+ {actions+ .filter((action) => action.assistant_id === assistant_id)+ .map((action, i) => {+ return (+ <AssistantAction key={i} action={action} onClick={() => setAction(action)} />+ );+ })}+ <button+ type="button"+ onClick={() => setShowToolDialog(true)}+ className="btn btn-neutral border-token-border-light relative mx-1 mt-2 h-8 rounded-lg font-medium"+ >+ <div className="flex w-full items-center justify-center gap-2">+ {localize('com_assistants_add_tools')}+ </div>+ </button>+ <button+ type="button"+ disabled={!assistant_id}+ onClick={() => {+ if (!assistant_id) {+ return showToast({+ message: localize('com_assistants_actions_disabled'),+ status: 'warning',+ });+ }+ setActivePanel(Panel.actions);+ }}+ className="btn btn-neutral border-token-border-light relative mt-2 h-8 rounded-lg font-medium"+ >+ <div className="flex w-full items-center justify-center gap-2">+ {localize('com_assistants_add_actions')}+ </div>+ </button>+ </div>+ </div>+ <div className="flex items-center justify-end gap-2">+ {/* Context Button */}+ <ContextButton+ assistant_id={assistant_id}+ setCurrentAssistantId={setCurrentAssistantId}+ createMutation={create}+ />+ {/* Secondary Select Button */}+ {assistant_id && (+ <button+ className="btn btn-secondary"+ type="button"+ disabled={!assistant_id}+ onClick={(e) => {+ e.preventDefault();+ onSelectAssistant(assistant_id);+ }}+ >+ {localize('com_ui_select')}+ </button>+ )}+ {/* Submit Button */}+ <button+ className="btn btn-primary focus:shadow-outline flex w-[90px] items-center justify-center px-4 py-2 font-semibold text-white hover:bg-green-400 focus:border-green-500"+ type="submit"+ >+ {create.isLoading || update.isLoading ? (+ <Spinner className="icon-md" />+ ) : assistant_id ? (+ localize('com_ui_save')+ ) : (+ localize('com_ui_create')+ )}+ </button>+ </div>+ </div>+ <ToolSelectDialog+ isOpen={showToolDialog}+ setIsOpen={setShowToolDialog}+ assistant_id={assistant_id}+ />+ </form>+ </FormProvider>+ );+}diff --git a/client/src/components/SidePanel/Builder/AssistantSelect.tsx b/client/src/components/SidePanel/Builder/AssistantSelect.tsxnew file mode 100644index 0000000000..6e6afebb96--- /dev/null+++ b/client/src/components/SidePanel/Builder/AssistantSelect.tsx@@ -0,0 +1,190 @@+import { Plus } from 'lucide-react';+import { useCallback, useEffect, useRef } from 'react';+import {+ defaultAssistantFormValues,+ defaultOrderQuery,+ FileSources,+} from 'librechat-data-provider';+import type { UseFormReset } from 'react-hook-form';+import type { UseMutationResult } from '@tanstack/react-query';+import type { Assistant, AssistantCreateParams } from 'librechat-data-provider';+import type { AssistantForm, Actions, TAssistantOption, ExtendedFile } from '~/common';+import SelectDropDown from '~/components/ui/SelectDropDown';+import { useListAssistantsQuery } from '~/data-provider';+import { useFileMapContext } from '~/Providers';+import { useLocalize } from '~/hooks';+import { cn } from '~/utils/';++const keys = new Set(['name', 'id', 'description', 'instructions', 'model']);++export default function AssistantSelect({+ reset,+ value,+ selectedAssistant,+ setCurrentAssistantId,+ createMutation,+}: {+ reset: UseFormReset<AssistantForm>;+ value: TAssistantOption;+ selectedAssistant: string | null;+ setCurrentAssistantId: React.Dispatch<React.SetStateAction<string | undefined>>;+ createMutation: UseMutationResult<Assistant, Error, AssistantCreateParams>;+}) {+ const localize = useLocalize();+ const fileMap = useFileMapContext();+ const lastSelectedAssistant = useRef<string | null>(null);++ const assistants = useListAssistantsQuery(defaultOrderQuery, {+ select: (res) =>+ res.data.map((_assistant) => {+ const assistant = {+ ..._assistant,+ label: _assistant?.name ?? '',+ value: _assistant.id,+ files: _assistant?.file_ids ? ([] as Array<[string, ExtendedFile]>) : undefined,+ };++ if (assistant.files && _assistant.file_ids) {+ _assistant.file_ids.forEach((file_id) => {+ const file = fileMap?.[file_id];+ if (file) {+ assistant.files?.push([+ file_id,+ {+ file_id: file.file_id,+ type: file.type,+ filepath: file.filepath,+ filename: file.filename,+ width: file.width,+ height: file.height,+ size: file.bytes,+ preview: file.filepath,+ progress: 1,+ source: FileSources.openai,+ },+ ]);+ }+ });+ }+ return assistant;+ }),+ });++ const onSelect = useCallback(+ (value: string) => {+ const assistant = assistants.data?.find((assistant) => assistant.id === value);++ createMutation.reset();+ if (!assistant) {+ setCurrentAssistantId(undefined);+ return reset(defaultAssistantFormValues);+ }++ const update = {+ ...assistant,+ label: assistant?.name ?? '',+ value: assistant?.id ?? '',+ };++ const actions: Actions = {+ code_interpreter: false,+ retrieval: false,+ };++ assistant?.tools+ ?.filter((tool) => tool.type !== 'function')+ ?.map((tool) => tool.type)+ .forEach((tool) => {+ actions[tool] = true;+ });++ const functions =+ assistant?.tools+ ?.filter((tool) => tool.type === 'function')+ ?.map((tool) => tool.function?.name ?? '') ?? [];++ const formValues: Partial<AssistantForm & Actions> = {+ functions,+ ...actions,+ assistant: update,+ };++ Object.entries(assistant).forEach(([name, value]) => {+ if (typeof value === 'number') {+ return;+ } else if (typeof value === 'object') {+ return;+ }+ if (keys.has(name)) {+ formValues[name] = value;+ }+ });++ reset(formValues);+ setCurrentAssistantId(assistant?.id);+ },+ [assistants.data, reset, setCurrentAssistantId, createMutation],+ );++ useEffect(() => {+ let timerId: NodeJS.Timeout | null = null;++ if (selectedAssistant === lastSelectedAssistant.current) {+ return;+ }++ if (selectedAssistant && assistants.data) {+ timerId = setTimeout(() => {+ lastSelectedAssistant.current = selectedAssistant;+ onSelect(selectedAssistant);+ }, 5);+ }++ return () => {+ if (timerId) {+ clearTimeout(timerId);+ }+ };+ }, [selectedAssistant, assistants.data, onSelect]);++ const createAssistant = localize('com_ui_create') + ' ' + localize('com_ui_assistant');+ return (+ <SelectDropDown+ value={!value ? createAssistant : value}+ setValue={onSelect}+ availableValues={+ assistants.data ?? [+ {+ label: 'Loading...',+ value: '',+ },+ ]+ }+ iconSide="left"+ showAbove={false}+ showLabel={false}+ emptyTitle={true}+ containerClassName="flex-grow"+ optionsClass="hover:bg-gray-20/50 dark:border-gray-700"+ optionsListClass="rounded-lg shadow-lg dark:bg-black dark:border-gray-700 dark:last:border"+ currentValueClass={cn(+ 'text-md font-semibold text-gray-900 dark:text-white',+ value === '' ? 'text-gray-500' : '',+ )}+ className={cn(+ 'mt-1 rounded-md dark:border-gray-700 dark:bg-black',+ 'z-50 flex h-[40px] w-full flex-none items-center justify-center px-4 hover:cursor-pointer hover:border-green-500 focus:border-green-500',+ )}+ renderOption={() => (+ <span className="flex items-center gap-1.5 truncate">+ <span className="absolute inset-y-0 left-0 flex items-center pl-2 text-gray-800 dark:text-gray-100">+ <Plus className="w-[16px]" />+ </span>+ <span className={cn('ml-4 flex h-6 items-center gap-1 text-gray-800 dark:text-gray-100')}>+ {createAssistant}+ </span>+ </span>+ )}+ />+ );+}diff --git a/client/src/components/SidePanel/Builder/AssistantTool.tsx b/client/src/components/SidePanel/Builder/AssistantTool.tsxnew file mode 100644index 0000000000..7a0484df94--- /dev/null+++ b/client/src/components/SidePanel/Builder/AssistantTool.tsx@@ -0,0 +1,52 @@+import type { TPlugin } from 'librechat-data-provider';+import GearIcon from '~/components/svg/GearIcon';+import { cn } from '~/utils';++export default function AssistantTool({+ tool,+ allTools,+ assistant_id,+}: {+ tool: string;+ allTools: TPlugin[];+ assistant_id?: string;+}) {+ const currentTool = allTools.find((t) => t.pluginKey === tool);++ if (!currentTool) {+ return null;+ }++ return (+ <div>+ <div+ className={cn(+ 'border-token-border-medium flex w-full rounded-lg border text-sm hover:cursor-pointer',+ !assistant_id ? 'opacity-40' : '',+ )}+ >+ {currentTool.icon && (+ <div className="flex h-9 w-9 items-center justify-center overflow-hidden rounded-full">+ <div+ className="flex h-6 w-6 items-center justify-center overflow-hidden rounded-full bg-center bg-no-repeat dark:bg-white/20"+ style={{ backgroundImage: `url(${currentTool.icon})`, backgroundSize: 'cover' }}+ />+ </div>+ )}+ <div+ className="h-9 grow px-3 py-2"+ style={{ textOverflow: 'ellipsis', wordBreak: 'break-all', overflow: 'hidden' }}+ >+ {currentTool.name}+ </div>+ <div className="w-px bg-gray-300 dark:bg-gray-600" />+ <button+ type="button"+ className="flex h-9 w-9 min-w-9 items-center justify-center rounded-lg rounded-l-none"+ >+ <GearIcon className="icon-sm" />+ </button>+ </div>+ </div>+ );+}diff --git a/client/src/components/SidePanel/Builder/ContextButton.tsx b/client/src/components/SidePanel/Builder/ContextButton.tsxnew file mode 100644index 0000000000..d343b7059b--- /dev/null+++ b/client/src/components/SidePanel/Builder/ContextButton.tsx@@ -0,0 +1,147 @@+import * as Popover from '@radix-ui/react-popover';+import type { Assistant, AssistantCreateParams } from 'librechat-data-provider';+import type { UseMutationResult } from '@tanstack/react-query';+import { Dialog, DialogTrigger, Label } from '~/components/ui';+import DialogTemplate from '~/components/ui/DialogTemplate';+import { useDeleteAssistantMutation } from '~/data-provider';+import { useLocalize, useSetIndexOptions } from '~/hooks';+import { cn, removeFocusOutlines } from '~/utils/';+import { NewTrashIcon } from '~/components/svg';+import { useChatContext } from '~/Providers';++export default function ContextButton({+ assistant_id,+ setCurrentAssistantId,+ createMutation,+}: {+ assistant_id: string;+ setCurrentAssistantId: React.Dispatch<React.SetStateAction<string | undefined>>;+ createMutation: UseMutationResult<Assistant, Error, AssistantCreateParams>;+}) {+ const localize = useLocalize();+ const { conversation } = useChatContext();+ const { setOption } = useSetIndexOptions();++ const deleteAssistant = useDeleteAssistantMutation({+ onSuccess: (_, vars, context) => {+ const updatedList = context as Assistant[] | undefined;+ if (!updatedList) {+ return;+ }++ if (createMutation.data?.id) {+ console.log('[deleteAssistant] resetting createMutation');+ createMutation.reset();+ }++ const firstAssistant = updatedList[0] as Assistant | undefined;+ if (!firstAssistant) {+ return setOption('assistant_id')('');+ }++ if (vars.assistant_id === conversation?.assistant_id) {+ return setOption('assistant_id')(firstAssistant.id);+ }++ const currentAssistant = updatedList?.find(+ (assistant) => assistant.id === conversation?.assistant_id,+ );++ if (currentAssistant) {+ setCurrentAssistantId(currentAssistant.id);+ }++ setCurrentAssistantId(firstAssistant.id);+ },+ });++ if (!assistant_id) {+ return null;+ }++ return (+ <Dialog>+ <Popover.Root>+ <Popover.Trigger asChild>+ <button+ className={cn(+ 'btn btn-neutral border-token-border-light relative h-9 rounded-lg font-medium',+ removeFocusOutlines,+ )}+ type="button"+ >+ <div className="flex w-full items-center justify-center gap-2">+ <svg+ width="24"+ height="24"+ viewBox="0 0 24 24"+ fill="none"+ xmlns="http://www.w3.org/2000/svg"+ className="icon-md"+ >+ <path+ fillRule="evenodd"+ clipRule="evenodd"+ d="M3 12C3 10.8954 3.89543 10 5 10C6.10457 10 7 10.8954 7 12C7 13.1046 6.10457 14 5 14C3.89543 14 3 13.1046 3 12ZM10 12C10 10.8954 10.8954 10 12 10C13.1046 10 14 10.8954 14 12C14 13.1046 13.1046 14 12 14C10.8954 14 10 13.1046 10 12ZM17 12C17 10.8954 17.8954 10 19 10C20.1046 10 21 10.8954 21 12C21 13.1046 20.1046 14 19 14C17.8954 14 17 13.1046 17 12Z"+ fill="currentColor"+ />+ </svg>+ </div>+ </button>+ </Popover.Trigger>+ <div+ style={{+ position: 'fixed',+ left: ' 0px',+ top: ' 0px',+ transform: 'translate(1772.8px, 49.6px)',+ minWidth: 'max-content',+ zIndex: 'auto',+ }}+ dir="ltr"+ >+ <Popover.Content+ side="top"+ role="menu"+ className="bg-token-surface-primary min-w-[180px] max-w-xs rounded-lg border border-gray-100 bg-white shadow-lg dark:border-gray-700 dark:bg-black"+ style={{ outline: 'none', pointerEvents: 'auto' }}+ sideOffset={8}+ tabIndex={-1}+ align="end"+ >+ <DialogTrigger asChild>+ <Popover.Close+ role="menuitem"+ className="group m-1.5 flex w-full cursor-pointer gap-2 rounded p-2.5 text-sm text-red-500 hover:bg-black/5 focus:ring-0 radix-disabled:pointer-events-none radix-disabled:opacity-50 dark:hover:bg-white/5"+ tabIndex={-1}+ >+ <NewTrashIcon />+ {localize('com_ui_delete') + ' ' + localize('com_ui_assistant')}+ </Popover.Close>+ </DialogTrigger>+ </Popover.Content>+ </div>+ <DialogTemplate+ title={localize('com_ui_delete') + ' ' + localize('com_ui_assistant')}+ className="max-w-[450px]"+ main={+ <>+ <div className="flex w-full flex-col items-center gap-2">+ <div className="grid w-full items-center gap-2">+ <Label htmlFor="delete-assistant" className="text-left text-sm font-medium">+ {localize('com_ui_delete_assistant_confirm')}+ </Label>+ </div>+ </div>+ </>+ }+ selection={{+ selectHandler: () => deleteAssistant.mutate({ assistant_id }),+ selectClasses: 'bg-red-600 hover:bg-red-700 dark:hover:bg-red-800 text-white',+ selectText: localize('com_ui_delete'),+ }}+ />+ </Popover.Root>+ </Dialog>+ );+}diff --git a/client/src/components/SidePanel/Builder/Images.tsx b/client/src/components/SidePanel/Builder/Images.tsxnew file mode 100644index 0000000000..215188c7e4--- /dev/null+++ b/client/src/components/SidePanel/Builder/Images.tsx@@ -0,0 +1,133 @@+import { useRef } from 'react';+import * as Popover from '@radix-ui/react-popover';++export function NoImage() {+ return (+ <div className="border-token-border-medium flex h-full w-full items-center justify-center rounded-full border-2 border-dashed border-black">+ <svg+ stroke="currentColor"+ fill="none"+ strokeWidth="2"+ viewBox="0 0 24 24"+ strokeLinecap="round"+ strokeLinejoin="round"+ className="text-4xl"+ height="1em"+ width="1em"+ xmlns="http://www.w3.org/2000/svg"+ >+ <line x1="12" y1="5" x2="12" y2="19" />+ <line x1="5" y1="12" x2="19" y2="12" />+ </svg>+ </div>+ );+}++export const AssistantAvatar = ({+ url,+ progress = 1,+}: {+ url?: string;+ progress: number; // between 0 and 1+}) => {+ const radius = 55; // Radius of the SVG circle+ const circumference = 2 * Math.PI * radius;++ // Calculate the offset based on the loading progress+ const offset = circumference - progress * circumference;+ const circleCSSProperties = {+ transition: 'stroke-dashoffset 0.3s linear',+ };++ return (+ <div>+ <div className="relative overflow-hidden rounded-full">+ <img+ src={url}+ className="bg-token-surface-secondary dark:bg-token-surface-tertiary h-full w-full"+ alt="GPT"+ width="80"+ height="80"+ style={{ opacity: progress < 1 ? 0.4 : 1 }}+ />+ {progress < 1 && (+ <div className="absolute inset-0 flex items-center justify-center bg-black/5 text-white">+ <svg width="120" height="120" viewBox="0 0 120 120" className="h-6 w-6">+ <circle+ className="origin-[50%_50%] -rotate-90 stroke-gray-400"+ strokeWidth="10"+ fill="transparent"+ r="55"+ cx="60"+ cy="60"+ />+ <circle+ className="origin-[50%_50%] -rotate-90 transition-[stroke-dashoffset]"+ stroke="currentColor"+ strokeWidth="10"+ strokeDasharray={`${circumference} ${circumference}`}+ strokeDashoffset={offset}+ fill="transparent"+ r="55"+ cx="60"+ cy="60"+ style={circleCSSProperties}+ />+ </svg>+ </div>+ )}+ </div>+ </div>+ );+};++export function AvatarMenu({+ handleFileChange,+}: {+ handleFileChange: (event: React.ChangeEvent<HTMLInputElement>) => void;+}) {+ const fileInputRef = useRef<HTMLInputElement>(null);++ const onItemClick = () => {+ if (fileInputRef.current) {+ fileInputRef.current.value = '';+ }+ fileInputRef.current?.click();+ };++ return (+ <Popover.Portal>+ <Popover.Content+ className="flex min-w-[100px] max-w-xs flex-col rounded-xl border border-gray-400 bg-white shadow-lg dark:border-gray-700 dark:bg-black dark:text-white"+ sideOffset={5}+ >+ <div+ role="menuitem"+ className="group m-1.5 flex cursor-pointer gap-2 rounded p-2.5 text-sm hover:bg-black/5 focus:ring-0 radix-disabled:pointer-events-none radix-disabled:opacity-50 dark:hover:bg-white/5"+ tabIndex={-1}+ data-orientation="vertical"+ onClick={onItemClick}+ >+ Upload Photo+ </div>+ {/* <Popover.Close+ role="menuitem"+ className="group m-1.5 flex cursor-pointer gap-2 rounded p-2.5 text-sm hover:bg-black/5 focus:ring-0 radix-disabled:pointer-events-none radix-disabled:opacity-50 dark:hover:bg-white/5"+ tabIndex={-1}+ data-orientation="vertical"+ >+ Use DALL·E+ </Popover.Close> */}+ <input+ accept="image/png,.png,image/jpeg,.jpg,.jpeg,image/gif,.gif,image/webp,.webp"+ multiple={false}+ type="file"+ style={{ display: 'none' }}+ onChange={handleFileChange}+ ref={fileInputRef}+ tabIndex={-1}+ />+ </Popover.Content>+ </Popover.Portal>+ );+}diff --git a/client/src/components/SidePanel/Builder/Knowledge.tsx b/client/src/components/SidePanel/Builder/Knowledge.tsxnew file mode 100644index 0000000000..b67976ee54--- /dev/null+++ b/client/src/components/SidePanel/Builder/Knowledge.tsx@@ -0,0 +1,128 @@+import { useState, useRef, useEffect } from 'react';+import {+ EModelEndpoint,+ retrievalMimeTypes,+ fileConfig as defaultFileConfig,+ mergeFileConfig,+} from 'librechat-data-provider';+import type { ExtendedFile } from '~/common';+import FileRow from '~/components/Chat/Input/Files/FileRow';+import { useGetFileConfig } from '~/data-provider';+import { useFileHandling } from '~/hooks/Files';+import useLocalize from '~/hooks/useLocalize';+import { useChatContext } from '~/Providers';++const CodeInterpreterFiles = ({ children }: { children: React.ReactNode }) => {+ const localize = useLocalize();+ return (+ <div>+ <div className="text-token-text-tertiary mb-2 text-xs">+ {localize('com_assistants_code_interpreter_files')}+ </div>+ {/* Files available to Code Interpreter only */}+ <div className="flex flex-wrap gap-2">{children}</div>+ </div>+ );+};++export default function Knowledge({+ assistant_id,+ files: _files,+}: {+ assistant_id: string;+ files?: [string, ExtendedFile][];+}) {+ const localize = useLocalize();+ const { setFilesLoading } = useChatContext();+ const fileInputRef = useRef<HTMLInputElement>(null);+ const [files, setFiles] = useState<Map<string, ExtendedFile>>(new Map());+ const { data: fileConfig = defaultFileConfig } = useGetFileConfig({+ select: (data) => mergeFileConfig(data),+ });+ const { handleFileChange } = useFileHandling({+ overrideEndpoint: EModelEndpoint.assistants,+ additionalMetadata: { assistant_id },+ fileSetter: setFiles,+ });++ useEffect(() => {+ if (_files) {+ setFiles(new Map(_files));+ }+ }, [_files]);++ const endpointFileConfig = fileConfig.endpoints[EModelEndpoint.assistants];++ if (endpointFileConfig?.disabled) {+ return null;+ }++ const handleButtonClick = () => {+ // necessary to reset the input+ if (fileInputRef.current) {+ fileInputRef.current.value = '';+ }+ fileInputRef.current?.click();+ };++ return (+ <div className="mb-6">+ <div className="mb-1.5 flex items-center">+ <span>+ <label className="text-token-text-primary block font-medium">+ {assistant_id+ ? localize('com_assistants_knowledge')+ : localize('com_assistants_knowledge_disabled')}+ </label>+ </span>+ </div>+ <div className="flex flex-col gap-4">+ <div className="text-token-text-tertiary rounded-lg">+ {assistant_id ? localize('com_assistants_knowledge_info') : ''}+ </div>+ {/* Files available to both tools */}+ <FileRow+ files={files}+ setFiles={setFiles}+ setFilesLoading={setFilesLoading}+ assistant_id={assistant_id}+ fileFilter={(file: ExtendedFile) =>+ retrievalMimeTypes.some((regex) => regex.test(file.type ?? ''))+ }+ Wrapper={({ children }) => <div className="flex flex-wrap gap-2">{children}</div>}+ />+ <FileRow+ files={files}+ setFiles={setFiles}+ setFilesLoading={setFilesLoading}+ assistant_id={assistant_id}+ fileFilter={(file: ExtendedFile) =>+ !retrievalMimeTypes.some((regex) => regex.test(file.type ?? ''))+ }+ Wrapper={CodeInterpreterFiles}+ />+ <div>+ <button+ type="button"+ disabled={!assistant_id}+ className="btn btn-neutral border-token-border-light relative h-8 rounded-lg font-medium"+ onClick={handleButtonClick}+ >+ <div className="flex w-full items-center justify-center gap-2">+ <input+ multiple={true}+ type="file"+ style={{ display: 'none' }}+ tabIndex={-1}+ ref={fileInputRef}+ disabled={!assistant_id}+ onChange={handleFileChange}+ />+ {localize('com_ui_upload_files')}+ </div>+ </button>+ </div>+ </div>+ </div>+ );+}diff --git a/client/src/components/SidePanel/Builder/PanelSwitch.tsx b/client/src/components/SidePanel/Builder/PanelSwitch.tsxnew file mode 100644index 0000000000..ad7b9a4849--- /dev/null+++ b/client/src/components/SidePanel/Builder/PanelSwitch.tsx@@ -0,0 +1,51 @@+import { useState, useEffect } from 'react';+import type { Action } from 'librechat-data-provider';+import { useGetActionsQuery } from '~/data-provider';+import AssistantPanel from './AssistantPanel';+import { useChatContext } from '~/Providers';+import ActionsPanel from './ActionsPanel';+import { Panel } from '~/common';++export default function PanelSwitch() {+ const { conversation, index } = useChatContext();+ const [activePanel, setActivePanel] = useState(Panel.builder);+ const [currentAssistantId, setCurrentAssistantId] = useState<string | undefined>(+ conversation?.assistant_id,+ );+ const [action, setAction] = useState<Action | undefined>(undefined);+ const { data: actions = [] } = useGetActionsQuery();++ useEffect(() => {+ if (conversation?.assistant_id) {+ setCurrentAssistantId(conversation?.assistant_id);+ }+ }, [conversation?.assistant_id]);++ if (activePanel === Panel.actions || action) {+ return (+ <ActionsPanel+ index={index}+ action={action}+ actions={actions}+ setAction={setAction}+ activePanel={activePanel}+ setActivePanel={setActivePanel}+ assistant_id={currentAssistantId}+ setCurrentAssistantId={setCurrentAssistantId}+ />+ );+ } else if (activePanel === Panel.builder) {+ return (+ <AssistantPanel+ index={index}+ activePanel={activePanel}+ action={action}+ actions={actions}+ setAction={setAction}+ setActivePanel={setActivePanel}+ assistant_id={currentAssistantId}+ setCurrentAssistantId={setCurrentAssistantId}+ />+ );+ }+}diff --git a/client/src/components/SidePanel/Files/Panel.tsx b/client/src/components/SidePanel/Files/Panel.tsxnew file mode 100644index 0000000000..8ee584dfbb--- /dev/null+++ b/client/src/components/SidePanel/Files/Panel.tsx@@ -0,0 +1,14 @@+import type { TFile } from 'librechat-data-provider';+import { useGetFiles } from '~/data-provider';+import { columns } from './PanelColumns';+import DataTable from './PanelTable';++export default function FilesPanel() {+ const { data: files = [] } = useGetFiles<TFile[]>();++ return (+ <div className="h-auto max-w-full overflow-x-hidden">+ <DataTable columns={columns} data={files} />+ </div>+ );+}diff --git a/client/src/components/SidePanel/Files/PanelColumns.tsx b/client/src/components/SidePanel/Files/PanelColumns.tsxnew file mode 100644index 0000000000..3fc6e94180--- /dev/null+++ b/client/src/components/SidePanel/Files/PanelColumns.tsx@@ -0,0 +1,47 @@+import { ArrowUpDown } from 'lucide-react';+import type { ColumnDef } from '@tanstack/react-table';+import type { TFile } from 'librechat-data-provider';+import PanelFileCell from './PanelFileCell';+import { Button } from '~/components/ui';+import { formatDate } from '~/utils';++export const columns: ColumnDef<TFile>[] = [+ {+ accessorKey: 'filename',+ header: ({ column }) => {+ return (+ <Button+ variant="ghost"+ onClick={() => column.toggleSorting(column.getIsSorted() === 'asc')}+ >+ Name+ <ArrowUpDown className="ml-2 h-4 w-4" />+ </Button>+ );+ },+ meta: {+ size: '150px',+ },+ cell: ({ row }) => <PanelFileCell row={row} />,+ },+ {+ accessorKey: 'updatedAt',+ meta: {+ size: '10%',+ },+ header: ({ column }) => {+ return (+ <Button+ variant="ghost"+ onClick={() => column.toggleSorting(column.getIsSorted() === 'asc')}+ >+ Date+ <ArrowUpDown className="ml-2 h-4 w-4" />+ </Button>+ );+ },+ cell: ({ row }) => (+ <span className="flex justify-end text-xs">{formatDate(row.original.updatedAt)}</span>+ ),+ },+];diff --git a/client/src/components/SidePanel/Files/PanelFileCell.tsx b/client/src/components/SidePanel/Files/PanelFileCell.tsxnew file mode 100644index 0000000000..d7e4bac42b--- /dev/null+++ b/client/src/components/SidePanel/Files/PanelFileCell.tsx@@ -0,0 +1,101 @@+import { useCallback } from 'react';+import {+ fileConfig as defaultFileConfig,+ mergeFileConfig,+ megabyte,+} from 'librechat-data-provider';+import type { Row } from '@tanstack/react-table';+import type { TFile } from 'librechat-data-provider';+import { useFileMapContext, useChatContext, useToastContext } from '~/Providers';+import ImagePreview from '~/components/Chat/Input/Files/ImagePreview';+import FilePreview from '~/components/Chat/Input/Files/FilePreview';+import { useUpdateFiles, useLocalize } from '~/hooks';+import { useGetFileConfig } from '~/data-provider';+import { getFileType } from '~/utils';++export default function PanelFileCell({ row }: { row: Row<TFile> }) {+ const localize = useLocalize();+ const fileMap = useFileMapContext();+ const { showToast } = useToastContext();+ const { setFiles, conversation } = useChatContext();+ const { data: fileConfig = defaultFileConfig } = useGetFileConfig({+ select: (data) => mergeFileConfig(data),+ });+ const { addFile } = useUpdateFiles(setFiles);++ const handleFileClick = useCallback(() => {+ const file = row.original;+ const endpoint = conversation?.endpoint;+ const fileData = fileMap?.[file.file_id];++ if (!fileData) {+ return;+ }++ if (!endpoint) {+ return showToast({ message: localize('com_ui_attach_error'), status: 'error' });+ }++ const { fileSizeLimit, supportedMimeTypes } =+ fileConfig.endpoints[endpoint] ?? fileConfig.endpoints.default;++ if (fileData.bytes > fileSizeLimit) {+ return showToast({+ message: `${localize('com_ui_attach_error_size')} ${+ fileSizeLimit / megabyte+ } MB (${endpoint})`,+ status: 'error',+ });+ }++ const isSupportedMimeType = defaultFileConfig.checkType(file.type, supportedMimeTypes);++ if (!isSupportedMimeType) {+ return showToast({+ message: `${localize('com_ui_attach_error_type')} ${file.type} (${endpoint})`,+ status: 'error',+ });+ }++ addFile({+ progress: 1,+ attached: true,+ file_id: fileData.file_id,+ filepath: fileData.filepath,+ preview: fileData.filepath,+ type: fileData.type,+ height: fileData.height,+ width: fileData.width,+ filename: fileData.filename,+ source: fileData.source,+ size: fileData.bytes,+ });+ }, [addFile, fileMap, row.original, conversation, localize, showToast, fileConfig.endpoints]);++ const file = row.original;+ if (file.type?.startsWith('image')) {+ return (+ <div+ onClick={handleFileClick}+ className="flex cursor-pointer gap-2 rounded-md dark:hover:bg-gray-900"+ >+ <ImagePreview+ url={file.filepath}+ className="h-10 w-10 shrink-0 overflow-hidden rounded-md"+ />+ <span className="self-center truncate text-xs">{file.filename}</span>+ </div>+ );+ }++ const fileType = getFileType(file.type);+ return (+ <div+ onClick={handleFileClick}+ className="flex cursor-pointer gap-2 rounded-md dark:hover:bg-gray-900"+ >+ {fileType && <FilePreview fileType={fileType} />}+ <span className="self-center truncate">{file.filename}</span>+ </div>+ );+}diff --git a/client/src/components/SidePanel/Files/PanelTable.tsx b/client/src/components/SidePanel/Files/PanelTable.tsxnew file mode 100644index 0000000000..1d95c6da95--- /dev/null+++ b/client/src/components/SidePanel/Files/PanelTable.tsx@@ -0,0 +1,165 @@+import { useState } from 'react';+import { useSetRecoilState } from 'recoil';+import { LucideArrowUpLeft } from 'lucide-react';+import {+ flexRender,+ getCoreRowModel,+ getFilteredRowModel,+ getPaginationRowModel,+ getSortedRowModel,+ useReactTable,+} from '@tanstack/react-table';+import type {+ ColumnDef,+ SortingState,+ VisibilityState,+ ColumnFiltersState,+} from '@tanstack/react-table';+import type { AugmentedColumnDef } from '~/common';+import {+ Button,+ Input,+ Table,+ TableBody,+ TableCell,+ TableHead,+ TableHeader,+ TableRow,+} from '~/components/ui';+import store from '~/store';++interface DataTableProps<TData, TValue> {+ columns: ColumnDef<TData, TValue>[];+ data: TData[];+}++export default function DataTable<TData, TValue>({ columns, data }: DataTableProps<TData, TValue>) {+ const [rowSelection, setRowSelection] = useState({});+ const [sorting, setSorting] = useState<SortingState>([]);+ const [columnFilters, setColumnFilters] = useState<ColumnFiltersState>([]);+ const [columnVisibility, setColumnVisibility] = useState<VisibilityState>({});+ const [paginationState, setPagination] = useState({ pageIndex: 0, pageSize: 10 });+ const setShowFiles = useSetRecoilState(store.showFiles);++ const table = useReactTable({+ data,+ columns,+ onSortingChange: setSorting,+ onPaginationChange: setPagination,+ getCoreRowModel: getCoreRowModel(),+ getSortedRowModel: getSortedRowModel(),+ onColumnFiltersChange: setColumnFilters,+ getFilteredRowModel: getFilteredRowModel(),+ onColumnVisibilityChange: setColumnVisibility,+ getPaginationRowModel: getPaginationRowModel(),+ onRowSelectionChange: setRowSelection,+ state: {+ sorting,+ columnFilters,+ columnVisibility,+ rowSelection,+ pagination: paginationState,+ },+ defaultColumn: {+ minSize: 0,+ size: 10,+ maxSize: 10,+ enableResizing: true,+ },+ });++ return (+ <>+ <div className="flex items-center gap-4 px-2 py-4">+ <Input+ placeholder="Filter files..."+ value={(table.getColumn('filename')?.getFilterValue() as string) ?? ''}+ onChange={(event) => table.getColumn('filename')?.setFilterValue(event.target.value)}+ className="max-w-xs dark:border-gray-700"+ />+ </div>+ <div className="overflow-y-auto rounded-md border border-black/10 dark:border-white/10 ">+ <Table className="border-separate border-spacing-0 ">+ <TableHeader>+ {table.getHeaderGroups().map((headerGroup, index) => (+ <TableRow key={headerGroup.id}>+ {headerGroup.headers.map((header) => {+ return (+ <TableHead+ key={header.id}+ style={{ width: index === 0 ? '75%' : '25%' }}+ className="sticky top-0 h-auto border-b border-black/10 bg-white py-1 text-left font-medium text-gray-700 dark:border-white/10 dark:bg-black dark:text-gray-100"+ >+ {header.isPlaceholder+ ? null+ : flexRender(header.column.columnDef.header, header.getContext())}+ </TableHead>+ );+ })}+ </TableRow>+ ))}+ </TableHeader>+ <TableBody>+ {table.getRowModel().rows?.length ? (+ table.getRowModel().rows.map((row) => (+ <TableRow+ key={row.id}+ data-state={row.getIsSelected() && 'selected'}+ className="border-b border-black/10 text-left text-gray-600 dark:border-white/10 dark:text-gray-300 [tr:last-child_&]:border-b-0"+ >+ {row.getVisibleCells().map((cell) => (+ <TableCell+ key={cell.id}+ className="p-2 px-4 [tr[data-disabled=true]_&]:opacity-50"+ style={{+ maxWidth: (cell.column.columnDef as AugmentedColumnDef<TData, TValue>).meta+ .size,+ }}+ >+ {flexRender(cell.column.columnDef.cell, cell.getContext())}+ </TableCell>+ ))}+ </TableRow>+ ))+ ) : (+ <TableRow>+ <TableCell colSpan={columns.length} className="h-24 text-center">+ No results.+ </TableCell>+ </TableRow>+ )}+ </TableBody>+ </Table>+ </div>+ <div className="flex items-center justify-around space-x-2 py-4">+ <Button+ variant="outline"+ size="sm"+ onClick={() => setShowFiles(true)}+ className="flex gap-2"+ >+ <LucideArrowUpLeft className="icon-sm" />+ Manage Files+ </Button>+ <div className="flex gap-2">+ <Button+ variant="outline"+ size="sm"+ onClick={() => table.previousPage()}+ disabled={!table.getCanPreviousPage()}+ >+ Previous+ </Button>+ <Button+ variant="outline"+ size="sm"+ onClick={() => table.nextPage()}+ disabled={!table.getCanNextPage()}+ >+ Next+ </Button>+ </div>+ </div>+ </>+ );+}diff --git a/client/src/components/SidePanel/Nav.tsx b/client/src/components/SidePanel/Nav.tsxnew file mode 100644index 0000000000..15aea95a9e--- /dev/null+++ b/client/src/components/SidePanel/Nav.tsx@@ -0,0 +1,113 @@+import { useState } from 'react';+import * as AccordionPrimitive from '@radix-ui/react-accordion';+import type { NavLink, NavProps } from '~/common';+import { Accordion, AccordionItem, AccordionContent } from '~/components/ui/Accordion';+import { Tooltip, TooltipContent, TooltipTrigger } from '~/components/ui/Tooltip';+import { buttonVariants } from '~/components/ui/Button';+import { cn, removeFocusOutlines } from '~/utils';+import { useLocalize } from '~/hooks';++export default function Nav({ links, isCollapsed, resize, defaultActive }: NavProps) {+ const localize = useLocalize();+ const [active, _setActive] = useState<string | undefined>(defaultActive);+ const getVariant = (link: NavLink) => (link.id === active ? 'default' : 'ghost');++ const setActive = (id: string) => {+ localStorage.setItem('side:active-panel', id + '');+ _setActive(id);+ };++ return (+ <div+ data-collapsed={isCollapsed}+ className="bg-token-sidebar-surface-primary group flex-shrink-0 overflow-x-hidden py-2 data-[collapsed=true]:py-2"+ >+ <div className="h-full">+ <div className="flex h-full min-h-0 flex-col">+ <div className="flex h-full min-h-0 flex-col opacity-100 transition-opacity">+ <div className="scrollbar-trigger relative h-full w-full flex-1 items-start border-white/20">+ <nav className="flex h-full w-full flex-col gap-1 px-2 px-3 pb-3.5 group-[[data-collapsed=true]]:justify-center group-[[data-collapsed=true]]:px-2">+ {links.map((link, index) => {+ const variant = getVariant(link);+ return isCollapsed ? (+ <Tooltip key={index} delayDuration={0}>+ <TooltipTrigger asChild>+ <button+ className={cn(+ buttonVariants({ variant, size: 'icon' }),+ removeFocusOutlines,+ 'h-9 w-9',+ variant === 'default'+ ? 'dark:bg-muted dark:text-muted-foreground dark:hover:bg-muted dark:hover:text-white'+ : '',+ )}+ onClick={() => {+ setActive(link.id);+ resize && resize(25);+ }}+ >+ <link.icon className="h-4 w-4" />+ <span className="sr-only">{link.title}</span>+ </button>+ </TooltipTrigger>+ <TooltipContent side="right" className="flex items-center gap-4">+ {localize(link.title)}+ {link.label && (+ <span className="text-muted-foreground ml-auto">{link.label}</span>+ )}+ </TooltipContent>+ </Tooltip>+ ) : (+ <Accordion+ key={index}+ type="single"+ value={active}+ onValueChange={setActive}+ collapsible+ >+ <AccordionItem value={link.id} className="w-full border-none">+ <AccordionPrimitive.Header asChild>+ <AccordionPrimitive.Trigger asChild>+ <button+ className={cn(+ buttonVariants({ variant, size: 'sm' }),+ removeFocusOutlines,+ variant === 'default'+ ? 'dark:bg-muted dark:hover:bg-muted dark:text-white dark:hover:text-white'+ : '',+ 'data-[state=open]:bg-gray-900 data-[state=open]:text-white dark:data-[state=open]:bg-gray-800',+ 'w-full justify-start rounded-md border dark:border-gray-600',+ )}+ >+ <link.icon className="mr-2 h-4 w-4" />+ {localize(link.title)}+ {link.label && (+ <span+ className={cn(+ 'ml-auto transition-all duration-300 ease-in-out',+ variant === 'default' ? 'text-background dark:text-white' : '',+ isCollapsed ? 'opacity-0' : 'opacity-100',+ )}+ >+ {link.label}+ </span>+ )}+ </button>+ </AccordionPrimitive.Trigger>+ </AccordionPrimitive.Header>++ <AccordionContent className="w-full dark:text-white">+ {link.Component && <link.Component />}+ </AccordionContent>+ </AccordionItem>+ </Accordion>+ );+ })}+ </nav>+ </div>+ </div>+ </div>+ </div>+ </div>+ );+}diff --git a/client/src/components/SidePanel/SidePanel.tsx b/client/src/components/SidePanel/SidePanel.tsxnew file mode 100644index 0000000000..0d33a80bb3--- /dev/null+++ b/client/src/components/SidePanel/SidePanel.tsx@@ -0,0 +1,214 @@+import throttle from 'lodash/throttle';+import { useState, useRef, useCallback, useEffect, useMemo } from 'react';+import { useGetEndpointsQuery, useUserKeyQuery } from 'librechat-data-provider/react-query';+import type { ImperativePanelHandle } from 'react-resizable-panels';+import { EModelEndpoint, type TEndpointsConfig } from 'librechat-data-provider';+import type { NavLink } from '~/common';+import { ResizableHandleAlt, ResizablePanel, ResizablePanelGroup } from '~/components/ui/Resizable';+import { TooltipProvider, Tooltip } from '~/components/ui/Tooltip';+import { Blocks, AttachmentIcon } from '~/components/svg';+import { useMediaQuery, useLocalStorage } from '~/hooks';+import { Separator } from '~/components/ui/Separator';+import NavToggle from '~/components/Nav/NavToggle';+import PanelSwitch from './Builder/PanelSwitch';+import FilesPanel from './Files/Panel';+import Switcher from './Switcher';+import { cn } from '~/utils';+import Nav from './Nav';++interface SidePanelProps {+ defaultLayout?: number[] | undefined;+ defaultCollapsed?: boolean;+ navCollapsedSize?: number;+ children: React.ReactNode;+}++const defaultMinSize = 20;++export default function SidePanel({+ defaultLayout = [97, 3],+ defaultCollapsed = false,+ navCollapsedSize = 3,+ children,+}: SidePanelProps) {+ const [minSize, setMinSize] = useState(defaultMinSize);+ const [isHovering, setIsHovering] = useState(false);+ const [newUser, setNewUser] = useLocalStorage('newUser', true);+ const [isCollapsed, setIsCollapsed] = useState(defaultCollapsed);+ const [collapsedSize, setCollapsedSize] = useState(navCollapsedSize);+ const { data: endpointsConfig = {} as TEndpointsConfig } = useGetEndpointsQuery();+ const { data: keyExpiry = { expiresAt: undefined } } = useUserKeyQuery(EModelEndpoint.assistants);+ const isSmallScreen = useMediaQuery('(max-width: 767px)');++ const panelRef = useRef<ImperativePanelHandle>(null);++ const activePanel = localStorage.getItem('side:active-panel');+ const defaultActive = activePanel ? activePanel : undefined;++ const Links = useMemo(() => {+ const links: NavLink[] = [];+ const assistants = endpointsConfig?.[EModelEndpoint.assistants];+ const userProvidesKey = !!assistants?.userProvide;+ const keyProvided = userProvidesKey ? !!keyExpiry?.expiresAt : true;+ if (assistants && assistants.disableBuilder !== true && keyProvided) {+ links.push({+ title: 'com_sidepanel_assistant_builder',+ label: '',+ icon: Blocks,+ id: 'assistants',+ Component: PanelSwitch,+ });+ }++ links.push({+ title: 'com_sidepanel_attach_files',+ label: '',+ icon: AttachmentIcon,+ id: 'files',+ Component: FilesPanel,+ });++ return links;+ }, [endpointsConfig, keyExpiry?.expiresAt]);++ // eslint-disable-next-line react-hooks/exhaustive-deps+ const throttledSaveLayout = useCallback(+ throttle((sizes: number[]) => {+ localStorage.setItem('react-resizable-panels:layout', JSON.stringify(sizes));+ }, 350),+ [],+ );++ useEffect(() => {+ if (isSmallScreen) {+ setIsCollapsed(true);+ setMinSize(0);+ setCollapsedSize(0);+ panelRef.current?.collapse();+ return;+ }+ }, [isSmallScreen]);++ const toggleNavVisible = () => {+ if (newUser) {+ setNewUser(false);+ }+ setIsCollapsed((prev: boolean) => {+ if (!prev) {+ setMinSize(0);+ setCollapsedSize(0);+ } else {+ setMinSize(defaultMinSize);+ setCollapsedSize(3);+ }+ return !prev;+ });+ if (!isCollapsed) {+ panelRef.current?.collapse();+ } else {+ panelRef.current?.expand();+ }+ };++ const assistants = endpointsConfig?.[EModelEndpoint.assistants];+ const userProvidesKey = !!assistants?.userProvide;+ const keyProvided = userProvidesKey ? !!keyExpiry?.expiresAt : true;++ return (+ <>+ <TooltipProvider delayDuration={0}>+ <ResizablePanelGroup+ direction="horizontal"+ onLayout={(sizes: number[]) => throttledSaveLayout(sizes)}+ className="transition-width relative h-full w-full flex-1 overflow-auto bg-white dark:bg-gray-800"+ >+ <ResizablePanel defaultSize={defaultLayout[0]} minSize={30}>+ {children}+ </ResizablePanel>+ <TooltipProvider delayDuration={400}>+ <Tooltip>+ <div+ onMouseEnter={() => setIsHovering(true)}+ onMouseLeave={() => setIsHovering(false)}+ className="relative flex w-px items-center justify-center"+ >+ <NavToggle+ navVisible={!isCollapsed}+ isHovering={isHovering}+ onToggle={toggleNavVisible}+ setIsHovering={setIsHovering}+ className={cn(+ 'fixed top-1/2',+ isCollapsed && (minSize === 0 || collapsedSize === 0) ? 'mr-9' : 'mr-16',+ )}+ translateX={false}+ side="right"+ />+ </div>+ </Tooltip>+ </TooltipProvider>+ {(!isCollapsed || minSize > 0) && (+ <ResizableHandleAlt withHandle className="bg-transparent dark:text-white" />+ )}+ <ResizablePanel+ collapsedSize={collapsedSize}+ defaultSize={defaultLayout[1]}+ collapsible={true}+ minSize={minSize}+ maxSize={40}+ ref={panelRef}+ style={{+ overflowY: 'auto',+ visibility:+ isCollapsed && (minSize === 0 || collapsedSize === 0) ? 'hidden' : 'visible',+ transition: 'width 0.2s ease',+ }}+ onExpand={() => {+ setIsCollapsed(false);+ localStorage.setItem('react-resizable-panels:collapsed', 'false');+ }}+ onCollapse={() => {+ setIsCollapsed(true);+ localStorage.setItem('react-resizable-panels:collapsed', 'true');+ }}+ className={cn(+ 'sidenav border-l border-gray-200 bg-white dark:border-gray-800/50 dark:bg-black',+ isCollapsed ? 'min-w-[50px]' : 'min-w-[340px] sm:min-w-[352px]',+ minSize === 0 ? 'min-w-0' : '',+ )}+ >+ {keyProvided && (+ <div+ className={cn(+ 'sticky left-0 right-0 top-0 z-[100] flex h-[52px] flex-wrap items-center justify-center bg-white dark:bg-black',+ isCollapsed ? 'h-[52px]' : 'px-2',+ )}+ >+ <Switcher isCollapsed={isCollapsed} />+ <Separator className="bg-gray-100/50" />+ </div>+ )}++ <Nav+ resize={panelRef.current?.resize}+ isCollapsed={isCollapsed}+ defaultActive={defaultActive}+ links={Links}+ />+ </ResizablePanel>+ </ResizablePanelGroup>+ </TooltipProvider>+ <div+ className={`nav-mask${!isCollapsed ? ' active' : ''}`}+ onClick={() => {+ setIsCollapsed(() => {+ setCollapsedSize(0);+ setMinSize(0);+ return false;+ });+ panelRef.current?.collapse();+ }}+ />+ </>+ );+}diff --git a/client/src/components/SidePanel/Switcher.tsx b/client/src/components/SidePanel/Switcher.tsxnew file mode 100644index 0000000000..c939d9b791--- /dev/null+++ b/client/src/components/SidePanel/Switcher.tsx@@ -0,0 +1,100 @@+import { useEffect } from 'react';+import {+ Select,+ SelectContent,+ SelectItem,+ SelectTrigger,+ SelectValue,+} from '~/components/ui/Select';+import { EModelEndpoint, defaultOrderQuery } from 'librechat-data-provider';+import { useSetIndexOptions, useSelectAssistant, useLocalize } from '~/hooks';+import { useChatContext, useAssistantsMapContext } from '~/Providers';+import { useListAssistantsQuery } from '~/data-provider';+import Icon from '~/components/Endpoints/Icon';+import { cn } from '~/utils';++interface SwitcherProps {+ isCollapsed: boolean;+}++export default function Switcher({ isCollapsed }: SwitcherProps) {+ const localize = useLocalize();+ const { setOption } = useSetIndexOptions();+ const { index, conversation } = useChatContext();++ /* `selectedAssistant` must be defined with `null` to cause re-render on update */+ const { assistant_id: selectedAssistant = null, endpoint } = conversation ?? {};++ const { data: assistants = [] } = useListAssistantsQuery(defaultOrderQuery, {+ select: (res) => res.data.map(({ id, name, metadata }) => ({ id, name, metadata })),+ });++ const assistantMap = useAssistantsMapContext();+ const { onSelect } = useSelectAssistant();++ useEffect(() => {+ if (!selectedAssistant && assistants && assistants.length && assistantMap) {+ const assistant_id =+ localStorage.getItem(`assistant_id__${index}`) ?? assistants[0]?.id ?? '';+ const assistant = assistantMap?.[assistant_id];+ if (!assistant) {+ return;+ }++ if (endpoint !== EModelEndpoint.assistants) {+ return;+ }+ setOption('model')(assistant.model);+ setOption('assistant_id')(assistant_id);+ }+ }, [index, assistants, selectedAssistant, assistantMap, endpoint, setOption]);++ const currentAssistant = assistantMap?.[selectedAssistant ?? ''];++ return (+ <Select defaultValue={selectedAssistant as string | undefined} onValueChange={onSelect}>+ <SelectTrigger+ className={cn(+ 'flex items-center gap-2 [&>span]:line-clamp-1 [&>span]:flex [&>span]:w-full [&>span]:items-center [&>span]:gap-1 [&>span]:truncate [&_svg]:h-4 [&_svg]:w-4 [&_svg]:shrink-0',+ isCollapsed+ ? 'flex h-9 w-9 shrink-0 items-center justify-center p-0 [&>span]:w-auto [&>svg]:hidden'+ : '',+ 'bg-white',+ )}+ aria-label={localize('com_sidepanel_select_assistant')}+ >+ <SelectValue placeholder={localize('com_sidepanel_select_assistant')}>+ <div className="assistant-item flex items-center justify-center overflow-hidden rounded-full">+ <Icon+ isCreatedByUser={false}+ endpoint={EModelEndpoint.assistants}+ assistantName={currentAssistant?.name ?? ''}+ iconURL={(currentAssistant?.metadata?.avatar as string) ?? ''}+ />+ </div>+ <span className={cn('ml-2', isCollapsed ? 'hidden' : '')}>+ {assistants.find((assistant) => assistant.id === selectedAssistant)?.name ??+ localize('com_sidepanel_select_assistant')}+ </span>+ </SelectValue>+ </SelectTrigger>+ <SelectContent className="bg-white">+ {assistants.map((assistant) => (+ <SelectItem key={assistant.id} value={assistant.id}>+ <div className="[&_svg]:text-foreground flex items-center justify-center gap-3 [&_svg]:h-4 [&_svg]:w-4 [&_svg]:shrink-0 ">+ <div className="assistant-item overflow-hidden rounded-full ">+ <Icon+ isCreatedByUser={false}+ endpoint={EModelEndpoint.assistants}+ assistantName={assistant.name ?? ''}+ iconURL={(assistant.metadata?.avatar as string) ?? ''}+ />+ </div>+ {assistant.name}+ </div>+ </SelectItem>+ ))}+ </SelectContent>+ </Select>+ );+}diff --git a/client/src/components/SidePanel/data.tsx b/client/src/components/SidePanel/data.tsxnew file mode 100644index 0000000000..36b4d07fbd--- /dev/null+++ b/client/src/components/SidePanel/data.tsx@@ -0,0 +1,38 @@+export const accounts = [+ {+ label: 'Alicia Koch',+ email: '[email protected]',+ icon: (+ <svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">+ <title>Vercel</title>+ <path d="M24 22.525H0l12-21.05 12 21.05z" fill="currentColor" />+ </svg>+ ),+ },+ {+ label: 'Alicia Koch',+ email: '[email protected]',+ icon: (+ <svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">+ <title>Gmail</title>+ <path+ d="M24 5.457v13.909c0 .904-.732 1.636-1.636 1.636h-3.819V11.73L12 16.64l-6.545-4.91v9.273H1.636A1.636 1.636 0 0 1 0 19.366V5.457c0-2.023 2.309-3.178 3.927-1.964L5.455 4.64 12 9.548l6.545-4.91 1.528-1.145C21.69 2.28 24 3.434 24 5.457z"+ fill="currentColor"+ />+ </svg>+ ),+ },+ {+ label: 'Alicia Koch',+ email: '[email protected]',+ icon: (+ <svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">+ <title>iCloud</title>+ <path+ d="M13.762 4.29a6.51 6.51 0 0 0-5.669 3.332 3.571 3.571 0 0 0-1.558-.36 3.571 3.571 0 0 0-3.516 3A4.918 4.918 0 0 0 0 14.796a4.918 4.918 0 0 0 4.92 4.914 4.93 4.93 0 0 0 .617-.045h14.42c2.305-.272 4.041-2.258 4.043-4.589v-.009a4.594 4.594 0 0 0-3.727-4.508 6.51 6.51 0 0 0-6.511-6.27z"+ fill="currentColor"+ />+ </svg>+ ),+ },+];diff --git a/client/src/components/SidePanel/index.ts b/client/src/components/SidePanel/index.tsnew file mode 100644index 0000000000..2826fee1b4--- /dev/null+++ b/client/src/components/SidePanel/index.ts@@ -0,0 +1,2 @@+export { default as SidePanel } from './SidePanel';+export { default as SideNav } from './Nav';diff --git a/client/src/components/Tools/ToolItem.tsx b/client/src/components/Tools/ToolItem.tsxnew file mode 100644index 0000000000..6c93582026--- /dev/null+++ b/client/src/components/Tools/ToolItem.tsx@@ -0,0 +1,71 @@+import { TPlugin } from 'librechat-data-provider';+import { XCircle, PlusCircleIcon } from 'lucide-react';+import { useLocalize } from '~/hooks';++type ToolItemProps = {+ tool: TPlugin;+ onAddTool: () => void;+ onRemoveTool: () => void;+ isInstalled?: boolean;+};++function ToolItem({ tool, onAddTool, onRemoveTool, isInstalled }: ToolItemProps) {+ const localize = useLocalize();+ const handleClick = () => {+ if (isInstalled) {+ onRemoveTool();+ } else {+ onAddTool();+ }+ };++ return (+ <div className="flex flex-col gap-4 rounded border border-black/10 bg-white p-6 dark:border-white/20 dark:bg-gray-900">+ <div className="flex gap-4">+ <div className="h-[70px] w-[70px] shrink-0">+ <div className="relative h-full w-full">+ <img+ src={tool.icon}+ alt={`${tool.name} logo`}+ className="h-full w-full rounded-[5px] bg-white"+ />+ <div className="absolute inset-0 rounded-[5px] ring-1 ring-inset ring-black/10"></div>+ </div>+ </div>+ <div className="flex min-w-0 flex-col items-start justify-between">+ <div className="mb-2 line-clamp-1 max-w-full text-lg leading-5 text-gray-700/80 dark:text-gray-50">+ {tool.name}+ </div>+ {!isInstalled ? (+ <button+ className="btn btn-primary relative"+ aria-label={`${localize('com_nav_tool_add')} ${tool.name}`}+ onClick={handleClick}+ >+ <div className="flex w-full items-center justify-center gap-2">+ {localize('com_nav_tool_add')}+ <PlusCircleIcon className="flex h-4 w-4 items-center stroke-2" />+ </div>+ </button>+ ) : (+ <button+ className="btn relative bg-gray-300 hover:bg-gray-400 dark:bg-gray-50 dark:hover:bg-gray-200"+ onClick={handleClick}+ aria-label={`${localize('com_nav_tool_remove')} ${tool.name}`}+ >+ <div className="flex w-full items-center justify-center gap-2">+ {localize('com_nav_tool_remove')}+ <XCircle className="flex h-4 w-4 items-center stroke-2" />+ </div>+ </button>+ )}+ </div>+ </div>+ <div className="line-clamp-3 h-[60px] text-sm text-slate-700/70 dark:text-slate-50/70">+ {tool.description}+ </div>+ </div>+ );+}++export default ToolItem;diff --git a/client/src/components/Tools/ToolSelectDialog.tsx b/client/src/components/Tools/ToolSelectDialog.tsxnew file mode 100644index 0000000000..7f19b65bd4--- /dev/null+++ b/client/src/components/Tools/ToolSelectDialog.tsx@@ -0,0 +1,243 @@+import { useEffect } from 'react';+import { Search, X } from 'lucide-react';+import { Dialog } from '@headlessui/react';+import { useFormContext } from 'react-hook-form';+import { useUpdateUserPluginsMutation } from 'librechat-data-provider/react-query';+import type { TError, TPluginAction } from 'librechat-data-provider';+import type { TPluginStoreDialogProps } from '~/common/types';+import { PluginPagination, PluginAuthForm } from '~/components/Plugins/Store';+import { useLocalize, usePluginDialogHelpers } from '~/hooks';+import { useAvailableToolsQuery } from '~/data-provider';+import ToolItem from './ToolItem';++function ToolSelectDialog({+ isOpen,+ setIsOpen,+ assistant_id,+}: TPluginStoreDialogProps & { assistant_id?: string }) {+ const localize = useLocalize();+ const { getValues, setValue } = useFormContext();+ const { data: tools = [] } = useAvailableToolsQuery();++ const {+ maxPage,+ setMaxPage,+ currentPage,+ setCurrentPage,+ itemsPerPage,+ searchChanged,+ setSearchChanged,+ searchValue,+ setSearchValue,+ gridRef,+ handleSearch,+ handleChangePage,+ error,+ setError,+ errorMessage,+ setErrorMessage,+ showPluginAuthForm,+ setShowPluginAuthForm,+ selectedPlugin,+ setSelectedPlugin,+ } = usePluginDialogHelpers();++ const updateUserPlugins = useUpdateUserPluginsMutation();+ const handleInstallError = (error: TError) => {+ setError(true);+ if (error.response?.data?.message) {+ setErrorMessage(error.response?.data?.message);+ }+ setTimeout(() => {+ setError(false);+ setErrorMessage('');+ }, 5000);+ };++ const handleInstall = (pluginAction: TPluginAction) => {+ const addFunction = () => {+ const fns = getValues('functions').slice();+ fns.push(pluginAction.pluginKey);+ setValue('functions', fns);+ };++ if (!pluginAction.auth) {+ return addFunction();+ }++ updateUserPlugins.mutate(pluginAction, {+ onError: (error: unknown) => {+ handleInstallError(error as TError);+ },+ onSuccess: addFunction,+ });++ setShowPluginAuthForm(false);+ };++ const onRemoveTool = (tool: string) => {+ setShowPluginAuthForm(false);+ updateUserPlugins.mutate(+ { pluginKey: tool, action: 'uninstall', auth: null, isAssistantTool: true },+ {+ onError: (error: unknown) => {+ handleInstallError(error as TError);+ },+ onSuccess: () => {+ const fns = getValues('functions').filter((fn) => fn !== tool);+ setValue('functions', fns);+ },+ },+ );+ };++ const onAddTool = (pluginKey: string) => {+ setShowPluginAuthForm(false);+ const getAvailablePluginFromKey = tools?.find((p) => p.pluginKey === pluginKey);+ setSelectedPlugin(getAvailablePluginFromKey);++ const { authConfig, authenticated } = getAvailablePluginFromKey ?? {};++ if (authConfig && authConfig.length > 0 && !authenticated) {+ setShowPluginAuthForm(true);+ } else {+ handleInstall({ pluginKey, action: 'install', auth: null });+ }+ };++ const filteredTools = tools?.filter((tool) =>+ tool.name.toLowerCase().includes(searchValue.toLowerCase()),+ );++ useEffect(() => {+ if (filteredTools) {+ setMaxPage(Math.ceil(filteredTools.length / itemsPerPage));+ if (searchChanged) {+ setCurrentPage(1);+ setSearchChanged(false);+ }+ }+ }, [+ tools,+ itemsPerPage,+ searchValue,+ filteredTools,+ searchChanged,+ setMaxPage,+ setCurrentPage,+ setSearchChanged,+ ]);++ return (+ <Dialog+ open={isOpen}+ onClose={() => {+ setIsOpen(false);+ setCurrentPage(1);+ setSearchValue('');+ }}+ className="relative z-[102]"+ >+ {/* The backdrop, rendered as a fixed sibling to the panel container */}+ <div className="fixed inset-0 bg-gray-500/90 transition-opacity dark:bg-gray-800/90" />+ {/* Full-screen container to center the panel */}+ <div className="fixed inset-0 flex items-center justify-center p-4">+ <Dialog.Panel+ className="relative w-full transform overflow-hidden overflow-y-auto rounded-lg bg-white text-left shadow-xl transition-all dark:bg-gray-900 max-sm:h-full sm:mx-7 sm:my-8 sm:max-w-2xl lg:max-w-5xl xl:max-w-7xl"+ style={{ minHeight: '610px' }}+ >+ <div className="flex items-center justify-between border-b-[1px] border-black/10 px-4 pb-4 pt-5 dark:border-white/10 sm:p-6">+ <div className="flex items-center">+ <div className="text-center sm:text-left">+ <Dialog.Title className="text-lg font-medium leading-6 text-gray-900 dark:text-gray-200">+ {localize('com_nav_tool_dialog')}+ </Dialog.Title>+ {!assistant_id && (+ <Dialog.Description className="text-sm text-gray-500 dark:text-gray-300">+ {localize('com_nav_tool_dialog_description')}+ </Dialog.Description>+ )}+ </div>+ </div>+ <div>+ <div className="sm:mt-0">+ <button+ onClick={() => {+ setIsOpen(false);+ setCurrentPage(1);+ }}+ className="inline-block text-gray-500 hover:text-gray-100"+ tabIndex={0}+ >+ <X />+ </button>+ </div>+ </div>+ </div>+ {error && (+ <div+ className="relative m-4 rounded border border-red-400 bg-red-100 px-4 py-3 text-red-700"+ role="alert"+ >+ {localize('com_nav_plugin_auth_error')} {errorMessage}+ </div>+ )}+ {showPluginAuthForm && (+ <div className="p-4 sm:p-6 sm:pt-4">+ <PluginAuthForm+ plugin={selectedPlugin}+ onSubmit={(installActionData: TPluginAction) => handleInstall(installActionData)}+ isAssistantTool={true}+ />+ </div>+ )}+ <div className="p-4 sm:p-6 sm:pt-4">+ <div className="mt-4 flex flex-col gap-4">+ <div className="flex items-center justify-center space-x-4">+ <Search className="h-6 w-6 text-gray-500" />+ <input+ type="text"+ value={searchValue}+ onChange={handleSearch}+ placeholder={localize('com_nav_tool_search')}+ className="w-64 rounded border border-gray-300 px-2 py-1 focus:outline-none focus:ring-2 focus:ring-blue-500 dark:border-gray-600 dark:bg-gray-800 dark:text-gray-200"+ />+ </div>+ <div+ ref={gridRef}+ className="grid grid-cols-1 grid-rows-2 gap-3 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4"+ style={{ minHeight: '410px' }}+ >+ {filteredTools &&+ filteredTools+ .slice((currentPage - 1) * itemsPerPage, currentPage * itemsPerPage)+ .map((tool, index) => (+ <ToolItem+ key={index}+ tool={tool}+ isInstalled={getValues('functions').includes(tool.pluginKey)}+ onAddTool={() => onAddTool(tool.pluginKey)}+ onRemoveTool={() => onRemoveTool(tool.pluginKey)}+ />+ ))}+ </div>+ </div>+ <div className="mt-2 flex flex-col items-center gap-2 sm:flex-row sm:justify-between">+ {maxPage > 0 ? (+ <PluginPagination+ currentPage={currentPage}+ maxPage={maxPage}+ onChangePage={handleChangePage}+ />+ ) : (+ <div style={{ height: '21px' }}></div>+ )}+ </div>+ </div>+ </Dialog.Panel>+ </div>+ </Dialog>+ );+}++export default ToolSelectDialog;diff --git a/client/src/components/Tools/index.ts b/client/src/components/Tools/index.tsnew file mode 100644index 0000000000..24ce8e939f--- /dev/null+++ b/client/src/components/Tools/index.ts@@ -0,0 +1,2 @@+export { default as ToolSelectDialog } from './ToolSelectDialog';+export { default as ToolItem } from './ToolItem';diff --git a/client/src/components/svg/AssistantIcon.tsx b/client/src/components/svg/AssistantIcon.tsxnew file mode 100644index 0000000000..e1e61308f3--- /dev/null+++ b/client/src/components/svg/AssistantIcon.tsx@@ -0,0 +1,31 @@+import { cn } from '~/utils';++export default function AssistantIcon({+ className = '',+ size = '1em',+}: {+ className?: string;+ size?: string | number;+}) {+ const unit = 24;+ const height = size;+ const width = size;+ return (+ <svg+ width={width}+ height={height}+ viewBox={`0 0 ${unit} ${unit}`}+ stroke="currentColor"+ fill="none"+ strokeWidth="2"+ strokeLinecap="round"+ strokeLinejoin="round"+ className={cn('text-token-secondary h-2/3 w-2/3', className)}+ xmlns="http://www.w3.org/2000/svg"+ >+ <path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z" />+ <polyline points="3.27 6.96 12 12.01 20.73 6.96" />+ <line x1="12" y1="22.08" x2="12" y2="12" />+ </svg>+ );+}diff --git a/client/src/components/svg/Blocks.tsx b/client/src/components/svg/Blocks.tsxnew file mode 100644index 0000000000..9fbe0b9751--- /dev/null+++ b/client/src/components/svg/Blocks.tsx@@ -0,0 +1,20 @@+import { cn } from '~/utils';+export default function Blocks({ className = '' }: { className?: string }) {+ return (+ <svg+ width="24"+ height="24"+ viewBox="0 0 24 24"+ fill="none"+ stroke="currentColor"+ strokeWidth="2"+ strokeLinecap="round"+ strokeLinejoin="round"+ xmlns="http://www.w3.org/2000/svg"+ className={cn('lucide lucide-blocks', className)}+ >+ <rect width="7" height="7" x="14" y="3" rx="1" />+ <path d="M10 21V8a1 1 0 0 0-1-1H4a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-5a1 1 0 0 0-1-1H3" />+ </svg>+ );+}diff --git a/client/src/components/svg/Files/CodePaths.tsx b/client/src/components/svg/Files/CodePaths.tsxnew file mode 100644index 0000000000..adddb42ec3--- /dev/null+++ b/client/src/components/svg/Files/CodePaths.tsx@@ -0,0 +1,20 @@+export default function CodePaths() {+ return (+ <>+ <path+ d="M21.333 23L26.333 18L21.333 13"+ stroke="white"+ strokeWidth="1.66667"+ strokeLinecap="round"+ strokeLinejoin="round"+ />+ <path+ d="M14.667 13L9.66699 18L14.667 23"+ stroke="white"+ strokeWidth="1.66667"+ strokeLinecap="round"+ strokeLinejoin="round"+ />+ </>+ );+}diff --git a/client/src/components/svg/Files/FileIcon.tsx b/client/src/components/svg/Files/FileIcon.tsxnew file mode 100644index 0000000000..559121efbd--- /dev/null+++ b/client/src/components/svg/Files/FileIcon.tsx@@ -0,0 +1,28 @@+import type { TFile } from 'librechat-data-provider';+import type { ExtendedFile } from '~/common';++export default function FileIcon({+ file,+ fileType,+}: {+ file?: ExtendedFile | TFile;+ fileType: {+ fill: string;+ paths: React.FC;+ title: string;+ };+}) {+ return (+ <svg+ xmlns="http://www.w3.org/2000/svg"+ viewBox="0 0 36 36"+ fill="none"+ className="h-10 w-10 flex-shrink-0"+ width="36"+ height="36"+ >+ <rect width="36" height="36" rx="6" fill={fileType.fill} />+ {(file?.['progress'] ?? 1) >= 1 && <>{<fileType.paths />}</>}+ </svg>+ );+}diff --git a/client/src/components/svg/Files/FilePaths.tsx b/client/src/components/svg/Files/FilePaths.tsxnew file mode 100644index 0000000000..29341ebeb9--- /dev/null+++ b/client/src/components/svg/Files/FilePaths.tsx@@ -0,0 +1,20 @@+export default function FilePaths() {+ return (+ <>+ <path+ d="M18.833 9.66663H12.9997C12.5576 9.66663 12.1337 9.84222 11.8212 10.1548C11.5086 10.4673 11.333 10.8913 11.333 11.3333V24.6666C11.333 25.1087 11.5086 25.5326 11.8212 25.8451C12.1337 26.1577 12.5576 26.3333 12.9997 26.3333H22.9997C23.4417 26.3333 23.8656 26.1577 24.1782 25.8451C24.4907 25.5326 24.6663 25.1087 24.6663 24.6666V15.5L18.833 9.66663Z"+ stroke="white"+ strokeWidth="1.66667"+ strokeLinecap="round"+ strokeLinejoin="round"+ />+ <path+ d="M18.833 9.66663V15.5H24.6663"+ stroke="white"+ strokeWidth="1.66667"+ strokeLinecap="round"+ strokeLinejoin="round"+ />+ </>+ );+}diff --git a/client/src/components/svg/Files/SheetPaths.tsx b/client/src/components/svg/Files/SheetPaths.tsxnew file mode 100644index 0000000000..a98e14cae3--- /dev/null+++ b/client/src/components/svg/Files/SheetPaths.tsx@@ -0,0 +1,13 @@+export default function SheetPaths() {+ return (+ <>+ <path+ d="M15.5 10.5H12.1667C11.2462 10.5 10.5 11.2462 10.5 12.1667V13.5V18M15.5 10.5H23.8333C24.7538 10.5 25.5 11.2462 25.5 12.1667V13.5V18M15.5 10.5V25.5M15.5 25.5H18H23.8333C24.7538 25.5 25.5 24.7538 25.5 23.8333V18M15.5 25.5H12.1667C11.2462 25.5 10.5 24.7538 10.5 23.8333V18M10.5 18H25.5"+ stroke="white"+ strokeWidth="1.66667"+ strokeLinecap="round"+ strokeLinejoin="round"+ />+ </>+ );+}diff --git a/client/src/components/svg/Files/TextPaths.tsx b/client/src/components/svg/Files/TextPaths.tsxnew file mode 100644index 0000000000..89d7353b6d--- /dev/null+++ b/client/src/components/svg/Files/TextPaths.tsx@@ -0,0 +1,41 @@+export default function TextPaths() {+ return (+ <>+ <path+ d="M19.6663 9.66663H12.9997C12.5576 9.66663 12.1337 9.84222 11.8212 10.1548C11.5086 10.4673 11.333 10.8913 11.333 11.3333V24.6666C11.333 25.1087 11.5086 25.5326 11.8212 25.8451C12.1337 26.1577 12.5576 26.3333 12.9997 26.3333H22.9997C23.4417 26.3333 23.8656 26.1577 24.1782 25.8451C24.4907 25.5326 24.6663 25.1087 24.6663 24.6666V14.6666L19.6663 9.66663Z"+ stroke="white"+ strokeWidth="1.66667"+ strokeLinecap="round"+ strokeLinejoin="round"+ />+ <path+ d="M19.667 9.66663V14.6666H24.667"+ stroke="white"+ strokeWidth="1.66667"+ strokeLinecap="round"+ strokeLinejoin="round"+ />+ <path+ d="M21.3337 18.8334H14.667"+ stroke="white"+ strokeWidth="1.66667"+ strokeLinecap="round"+ strokeLinejoin="round"+ />+ <path+ d="M21.3337 22.1666H14.667"+ stroke="white"+ strokeWidth="1.66667"+ strokeLinecap="round"+ strokeLinejoin="round"+ />+ <path+ d="M16.3337 15.5H15.5003H14.667"+ stroke="white"+ strokeWidth="1.66667"+ strokeLinecap="round"+ strokeLinejoin="round"+ />+ </>+ );+}diff --git a/client/src/components/svg/NewTrashIcon.tsx b/client/src/components/svg/NewTrashIcon.tsxnew file mode 100644index 0000000000..102ed8f033--- /dev/null+++ b/client/src/components/svg/NewTrashIcon.tsx@@ -0,0 +1,19 @@+export default function NewTrashIcon({ className = 'icon-md' }) {+ return (+ <svg+ width="24"+ height="24"+ viewBox="0 0 24 24"+ fill="none"+ xmlns="http://www.w3.org/2000/svg"+ className={className}+ >+ <path+ fillRule="evenodd"+ clipRule="evenodd"+ d="M10.5555 4C10.099 4 9.70052 4.30906 9.58693 4.75114L9.29382 5.8919H14.715L14.4219 4.75114C14.3083 4.30906 13.9098 4 13.4533 4H10.5555ZM16.7799 5.8919L16.3589 4.25342C16.0182 2.92719 14.8226 2 13.4533 2H10.5555C9.18616 2 7.99062 2.92719 7.64985 4.25342L7.22886 5.8919H4C3.44772 5.8919 3 6.33961 3 6.8919C3 7.44418 3.44772 7.8919 4 7.8919H4.10069L5.31544 19.3172C5.47763 20.8427 6.76455 22 8.29863 22H15.7014C17.2354 22 18.5224 20.8427 18.6846 19.3172L19.8993 7.8919H20C20.5523 7.8919 21 7.44418 21 6.8919C21 6.33961 20.5523 5.8919 20 5.8919H16.7799ZM17.888 7.8919H6.11196L7.30423 19.1057C7.3583 19.6142 7.78727 20 8.29863 20H15.7014C16.2127 20 16.6417 19.6142 16.6958 19.1057L17.888 7.8919ZM10 10C10.5523 10 11 10.4477 11 11V16C11 16.5523 10.5523 17 10 17C9.44772 17 9 16.5523 9 16V11C9 10.4477 9.44772 10 10 10ZM14 10C14.5523 10 15 10.4477 15 11V16C15 16.5523 14.5523 17 14 17C13.4477 17 13 16.5523 13 16V11C13 10.4477 13.4477 10 14 10Z"+ fill="currentColor"+ />+ </svg>+ );+}diff --git a/client/src/components/svg/OpenAIMinimalIcon.tsx b/client/src/components/svg/OpenAIMinimalIcon.tsxindex 983a53d26d..84f740c5d0 100644--- a/client/src/components/svg/OpenAIMinimalIcon.tsx+++ b/client/src/components/svg/OpenAIMinimalIcon.tsx@@ -1,6 +1,4 @@-import React from 'react';--export default function OpenAIMinimalIcon() {+export default function OpenAIMinimalIcon({ className = 'h-4 w-4' }) {return (<svgstroke="currentColor"@@ -9,7 +7,7 @@ export default function OpenAIMinimalIcon() {viewBox="0 0 40 40"strokeLinecap="round"strokeLinejoin="round"- className="h-4 w-4"+ className={className}height="1em"width="1em"xmlns="http://www.w3.org/2000/svg"diff --git a/client/src/components/svg/Sparkles.tsx b/client/src/components/svg/Sparkles.tsxnew file mode 100644index 0000000000..39e6063dc1--- /dev/null+++ b/client/src/components/svg/Sparkles.tsx@@ -0,0 +1,25 @@+import { cn } from '~/utils';++export default function Sparkles({ className = '' }) {+ return (+ <svg+ width="24"+ height="24"+ viewBox="0 0 24 24"+ fill="none"+ xmlns="http://www.w3.org/2000/svg"+ className={cn('icon-md shrink-0', className)}+ >+ <path+ d="M19.3975 1.35498C19.3746 1.15293 19.2037 1.00021 19.0004 1C18.7971 0.999793 18.6259 1.15217 18.6026 1.35417C18.4798 2.41894 18.1627 3.15692 17.6598 3.65983C17.1569 4.16274 16.4189 4.47983 15.3542 4.60264C15.1522 4.62593 14.9998 4.79707 15 5.00041C15.0002 5.20375 15.1529 5.37457 15.355 5.39746C16.4019 5.51605 17.1562 5.83304 17.6716 6.33906C18.1845 6.84269 18.5078 7.57998 18.6016 8.63539C18.6199 8.84195 18.7931 9.00023 19.0005 9C19.2078 8.99977 19.3806 8.84109 19.3985 8.6345C19.4883 7.59673 19.8114 6.84328 20.3273 6.32735C20.8433 5.81142 21.5967 5.48834 22.6345 5.39851C22.8411 5.38063 22.9998 5.20782 23 5.00045C23.0002 4.79308 22.842 4.61992 22.6354 4.60157C21.58 4.50782 20.8427 4.18447 20.3391 3.67157C19.833 3.15623 19.516 2.40192 19.3975 1.35498Z"+ fill="currentColor"+ />+ <path+ fillRule="evenodd"+ clipRule="evenodd"+ d="M11 3C11.4833 3 11.8974 3.34562 11.9839 3.82111C12.4637 6.46043 13.279 8.23983 14.5196 9.48039C15.7602 10.721 17.5396 11.5363 20.1789 12.0161C20.6544 12.1026 21 12.5167 21 13C21 13.4833 20.6544 13.8974 20.1789 13.9839C17.5396 14.4637 15.7602 15.279 14.5196 16.5196C13.279 17.7602 12.4637 19.5396 11.9839 22.1789C11.8974 22.6544 11.4833 23 11 23C10.5167 23 10.1026 22.6544 10.0161 22.1789C9.53625 19.5396 8.72096 17.7602 7.48039 16.5196C6.23983 15.279 4.46043 14.4637 1.82111 13.9839C1.34562 13.8974 1 13.4833 1 13C1 12.5167 1.34562 12.1026 1.82111 12.0161C4.46043 11.5363 6.23983 10.721 7.48039 9.48039C8.72096 8.23983 9.53625 6.46043 10.0161 3.82111C10.1026 3.34562 10.5167 3 11 3ZM5.66618 13C6.9247 13.5226 7.99788 14.2087 8.89461 15.1054C9.79134 16.0021 10.4774 17.0753 11 18.3338C11.5226 17.0753 12.2087 16.0021 13.1054 15.1054C14.0021 14.2087 15.0753 13.5226 16.3338 13C15.0753 12.4774 14.0021 11.7913 13.1054 10.8946C12.2087 9.99788 11.5226 8.9247 11 7.66618C10.4774 8.9247 9.79134 9.99788 8.89461 10.8946C7.99788 11.7913 6.9247 12.4774 5.66618 13Z"+ fill="currentColor"+ />+ </svg>+ );+}diff --git a/client/src/components/svg/Spinner.tsx b/client/src/components/svg/Spinner.tsxindex eb473fe3e7..32d05e8423 100644--- a/client/src/components/svg/Spinner.tsx+++ b/client/src/components/svg/Spinner.tsx@@ -1,7 +1,6 @@-import React from 'react';import { cn } from '~/utils/';-export default function Spinner({ className = 'm-auto' }) {+export default function Spinner({ className = 'm-auto', size = '1em' }) {return (<svgstroke="#ffffff"@@ -11,8 +10,8 @@ export default function Spinner({ className = 'm-auto' }) {strokeLinecap="round"strokeLinejoin="round"className={cn(className, 'animate-spin text-center')}- height="1em"- width="1em"+ height={size}+ width={size}xmlns="http://www.w3.org/2000/svg"><line x1="12" y1="2" x2="12" y2="6" />diff --git a/client/src/components/svg/TrashIcon.tsx b/client/src/components/svg/TrashIcon.tsxindex 77ae635439..3efa290a9e 100644--- a/client/src/components/svg/TrashIcon.tsx+++ b/client/src/components/svg/TrashIcon.tsx@@ -1,5 +1,3 @@-import React from 'react';-export default function TrashIcon() {return (<svgdiff --git a/client/src/components/svg/index.ts b/client/src/components/svg/index.tsindex 4c59894c56..283e7012f2 100644--- a/client/src/components/svg/index.ts+++ b/client/src/components/svg/index.ts@@ -1,3 +1,4 @@+export { default as Blocks } from './Blocks';export { default as Plugin } from './Plugin';export { default as GPTIcon } from './GPTIcon';export { default as EditIcon } from './EditIcon';@@ -28,6 +29,7 @@ export { default as DotsIcon } from './DotsIcon';export { default as GearIcon } from './GearIcon';export { default as PinIcon } from './PinIcon';export { default as TrashIcon } from './TrashIcon';+export { default as NewTrashIcon } from './NewTrashIcon';export { default as MinimalPlugin } from './MinimalPlugin';export { default as AzureMinimalIcon } from './AzureMinimalIcon';export { default as OpenAIMinimalIcon } from './OpenAIMinimalIcon';@@ -46,3 +48,5 @@ export { default as NewChatIcon } from './NewChatIcon';export { default as ExperimentIcon } from './ExperimentIcon';export { default as GoogleIconChat } from './GoogleIconChat';export { default as BirthdayIcon } from './BirthdayIcon';+export { default as AssistantIcon } from './AssistantIcon';+export { default as Sparkles } from './Sparkles';diff --git a/client/src/components/ui/Accordion.tsx b/client/src/components/ui/Accordion.tsxnew file mode 100644index 0000000000..5c8ed39a75--- /dev/null+++ b/client/src/components/ui/Accordion.tsx@@ -0,0 +1,51 @@+import * as React from 'react';+import * as AccordionPrimitive from '@radix-ui/react-accordion';+import { ChevronDownIcon } from '@radix-ui/react-icons';++import { cn } from '~/utils';++const Accordion = AccordionPrimitive.Root;++const AccordionItem = React.forwardRef<+ React.ElementRef<typeof AccordionPrimitive.Item>,+ React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Item>+>(({ className = '', ...props }, ref) => (+ <AccordionPrimitive.Item ref={ref} className={cn('border-b', className)} {...props} />+));+AccordionItem.displayName = 'AccordionItem';++const AccordionTrigger = React.forwardRef<+ React.ElementRef<typeof AccordionPrimitive.Trigger>,+ React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Trigger>+>(({ className = '', children, ...props }, ref) => (+ <AccordionPrimitive.Header className="flex">+ <AccordionPrimitive.Trigger+ ref={ref}+ className={cn(+ 'flex flex-1 items-center justify-between py-4 text-sm font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180',+ className,+ )}+ {...props}+ >+ {children}+ <ChevronDownIcon className="text-muted-foreground h-4 w-4 shrink-0 transition-transform duration-200" />+ </AccordionPrimitive.Trigger>+ </AccordionPrimitive.Header>+));+AccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName;++const AccordionContent = React.forwardRef<+ React.ElementRef<typeof AccordionPrimitive.Content>,+ React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Content>+>(({ className = '', children, ...props }, ref) => (+ <AccordionPrimitive.Content+ ref={ref}+ className="overflow-hidden text-sm data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down"+ {...props}+ >+ <div className={cn('pb-4 pt-0', className)}>{children}</div>+ </AccordionPrimitive.Content>+));+AccordionContent.displayName = AccordionPrimitive.Content.displayName;++export { Accordion, AccordionItem, AccordionTrigger, AccordionContent };diff --git a/client/src/components/ui/Button.tsx b/client/src/components/ui/Button.tsxindex 50aa827687..301f434acf 100644--- a/client/src/components/ui/Button.tsx+++ b/client/src/components/ui/Button.tsx@@ -4,24 +4,24 @@ import { VariantProps, cva } from 'class-variance-authority';import { cn } from '../../utils';const buttonVariants = cva(- 'rounded-md inline-flex items-center justify-center text-sm font-medium transition-colors focus:outline-none focus:ring-2 focus:ring-slate-400 focus:ring-offset-2 dark:hover:bg-slate-800 dark:hover:text-slate-100 disabled:opacity-50 dark:focus:ring-slate-400 disabled:pointer-events-none dark:focus:ring-offset-slate-900 data-[state=open]:bg-slate-100 dark:data-[state=open]:bg-slate-800',+ 'rounded-md inline-flex items-center justify-center text-sm font-medium transition-colors focus:outline-none focus:ring-2 focus:ring-slate-400 focus:ring-offset-2 dark:hover:bg-gray-800 dark:hover:text-slate-100 disabled:opacity-50 dark:focus:ring-slate-400 disabled:pointer-events-none dark:focus:ring-offset-slate-900 data-[state=open]:bg-gray-100 dark:data-[state=open]:bg-gray-800',{variants: {variant: {- default: 'bg-slate-900 text-white hover:bg-gray-900 dark:bg-slate-50 dark:text-slate-900',+ default: 'bg-gray-900 text-white hover:bg-gray-900 dark:bg-gray-50 dark:text-slate-900',destructive: 'bg-red-500 text-white hover:bg-red-600 dark:hover:bg-red-600',outline:- 'bg-transparent border border-slate-200 hover:bg-slate-100 dark:border-slate-700 dark:text-slate-100',- subtle:- 'bg-slate-100 text-slate-900 hover:bg-slate-200 dark:bg-gray-900 dark:text-slate-100',+ 'bg-transparent border border-slate-200 hover:bg-gray-100 dark:border-slate-700 dark:text-slate-100',+ subtle: 'bg-gray-100 text-slate-900 hover:bg-gray-200 dark:bg-gray-900 dark:text-slate-100',ghost:- 'bg-transparent hover:bg-slate-100 dark:hover:bg-slate-800 dark:text-slate-100 dark:hover:text-slate-100 data-[state=open]:bg-transparent dark:data-[state=open]:bg-transparent',+ 'bg-transparent hover:bg-gray-100 dark:hover:bg-gray-800 dark:text-slate-100 dark:hover:text-slate-100 data-[state=open]:bg-transparent dark:data-[state=open]:bg-transparent',link: 'bg-transparent underline-offset-4 hover:underline text-slate-900 dark:text-slate-100 hover:bg-transparent dark:hover:bg-transparent',},size: {default: 'h-10 py-2 px-4',sm: 'h-9 px-2 rounded-md',lg: 'h-11 px-8 rounded-md',+ icon: 'h-10 w-10',},},defaultVariants: {diff --git a/client/src/components/ui/Collapsible.tsx b/client/src/components/ui/Collapsible.tsxnew file mode 100644index 0000000000..9605c4e41a--- /dev/null+++ b/client/src/components/ui/Collapsible.tsx@@ -0,0 +1,9 @@+import * as CollapsiblePrimitive from '@radix-ui/react-collapsible';++const Collapsible = CollapsiblePrimitive.Root;++const CollapsibleTrigger = CollapsiblePrimitive.CollapsibleTrigger;++const CollapsibleContent = CollapsiblePrimitive.CollapsibleContent;++export { Collapsible, CollapsibleTrigger, CollapsibleContent };diff --git a/client/src/components/ui/DataTableColumnHeader.tsx b/client/src/components/ui/DataTableColumnHeader.tsxnew file mode 100644index 0000000000..01d335a0e0--- /dev/null+++ b/client/src/components/ui/DataTableColumnHeader.tsx@@ -0,0 +1,61 @@+import { ArrowDownIcon, ArrowUpIcon, CaretSortIcon, EyeNoneIcon } from '@radix-ui/react-icons';+import { Column } from '@tanstack/react-table';++import { cn } from '~/utils';+import { Button } from './Button';+import {+ DropdownMenu,+ DropdownMenuContent,+ DropdownMenuItem,+ DropdownMenuSeparator,+ DropdownMenuTrigger,+} from './DropdownMenu';++interface DataTableColumnHeaderProps<TData, TValue> extends React.HTMLAttributes<HTMLDivElement> {+ column: Column<TData, TValue>;+ title: string;+}++export function DataTableColumnHeader<TData, TValue>({+ column,+ title,+ className = '',+}: DataTableColumnHeaderProps<TData, TValue>) {+ if (!column.getCanSort()) {+ return <div className={cn(className)}>{title}</div>;+ }++ return (+ <div className={cn('flex items-center space-x-2', className)}>+ <DropdownMenu>+ <DropdownMenuTrigger asChild>+ <Button variant="ghost" size="sm" className="data-[state=open]:bg-accent -ml-3 h-8">+ <span>{title}</span>+ {column.getIsSorted() === 'desc' ? (+ <ArrowDownIcon className="ml-2 h-4 w-4" />+ ) : column.getIsSorted() === 'asc' ? (+ <ArrowUpIcon className="ml-2 h-4 w-4" />+ ) : (+ <CaretSortIcon className="ml-2 h-4 w-4" />+ )}+ </Button>+ </DropdownMenuTrigger>+ <DropdownMenuContent align="start" className="z-[1001]">+ <DropdownMenuItem onClick={() => column.toggleSorting(false)}>+ <ArrowUpIcon className="text-muted-foreground/70 mr-2 h-3.5 w-3.5" />+ Asc+ </DropdownMenuItem>+ <DropdownMenuItem onClick={() => column.toggleSorting(true)}>+ <ArrowDownIcon className="text-muted-foreground/70 mr-2 h-3.5 w-3.5" />+ Desc+ </DropdownMenuItem>+ <DropdownMenuSeparator />+ <DropdownMenuItem onClick={() => column.toggleVisibility(false)}>+ <EyeNoneIcon className="text-muted-foreground/70 mr-2 h-3.5 w-3.5" />+ Hide+ </DropdownMenuItem>+ </DropdownMenuContent>+ </DropdownMenu>+ </div>+ );+}diff --git a/client/src/components/ui/DropdownMenu.tsx b/client/src/components/ui/DropdownMenu.tsxindex 5ff2f3b69b..a06f079400 100644--- a/client/src/components/ui/DropdownMenu.tsx+++ b/client/src/components/ui/DropdownMenu.tsx@@ -24,7 +24,7 @@ const DropdownMenuSubTrigger = React.forwardRef<<DropdownMenuPrimitive.SubTriggerref={ref}className={cn(- 'flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm font-medium outline-none focus:bg-slate-100 data-[state=open]:bg-slate-100 dark:focus:bg-gray-900 dark:data-[state=open]:bg-gray-900',+ 'flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm font-medium outline-none focus:bg-gray-100 data-[state=open]:bg-gray-100 dark:focus:bg-gray-900 dark:data-[state=open]:bg-gray-900',inset ? 'pl-8' : '',className,)}@@ -43,7 +43,7 @@ const DropdownMenuSubContent = React.forwardRef<<DropdownMenuPrimitive.SubContentref={ref}className={cn(- 'z-50 min-w-[8rem] overflow-hidden rounded-md border border-slate-100 bg-white p-1 text-slate-700 shadow-md animate-in slide-in-from-left-1 dark:border-slate-800 dark:bg-slate-800 dark:text-slate-400',+ 'z-50 min-w-[8rem] overflow-hidden rounded-md border border-gray-100 bg-white p-1 text-gray-700 shadow-md animate-in slide-in-from-left-1 dark:border-gray-800 dark:bg-gray-800 dark:text-gray-400',className,)}{...props}@@ -60,7 +60,7 @@ const DropdownMenuContent = React.forwardRef<ref={ref}sideOffset={sideOffset}className={cn(- 'z-50 min-w-[8rem] overflow-hidden rounded-md border border-slate-100 bg-white p-1 text-slate-700 shadow-md animate-in data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 dark:border-slate-800 dark:bg-slate-800 dark:text-slate-400',+ 'z-50 min-w-[8rem] overflow-hidden rounded-md border border-gray-100 bg-white p-1 text-gray-700 shadow-md animate-in data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 dark:border-gray-800 dark:bg-gray-800 dark:text-gray-400',className,)}{...props}@@ -78,7 +78,7 @@ const DropdownMenuItem = React.forwardRef<<DropdownMenuPrimitive.Itemref={ref}className={cn(- 'relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm font-medium outline-none focus:bg-slate-100 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:focus:bg-gray-900',+ 'relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm font-medium outline-none focus:bg-gray-100 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:focus:bg-gray-900',inset ? 'pl-8' : '',className,)}@@ -94,7 +94,7 @@ const DropdownMenuCheckboxItem = React.forwardRef<<DropdownMenuPrimitive.CheckboxItemref={ref}className={cn(- 'relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm font-medium outline-none focus:bg-slate-100 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:focus:bg-gray-900',+ 'relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm font-medium outline-none focus:bg-gray-100 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:focus:bg-gray-900',className,)}checked={checked}@@ -118,7 +118,7 @@ const DropdownMenuRadioItem = React.forwardRef<ref={ref}className={cn(className,- 'relative flex cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm font-medium outline-none focus:bg-slate-100 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:focus:bg-gray-800',+ 'relative flex cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm font-medium outline-none focus:bg-gray-100 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:focus:bg-gray-800',)}{...props}>@@ -141,7 +141,7 @@ const DropdownMenuLabel = React.forwardRef<<DropdownMenuPrimitive.Labelref={ref}className={cn(- 'px-2 py-1.5 text-sm font-semibold text-slate-900 dark:text-slate-300',+ 'px-2 py-1.5 text-sm font-semibold text-gray-900 dark:text-gray-300',inset ? 'pl-8' : '',className,)}@@ -156,7 +156,7 @@ const DropdownMenuSeparator = React.forwardRef<>(({ className = '', ...props }, ref) => (<DropdownMenuPrimitive.Separatorref={ref}- className={cn('-mx-1 my-1 h-px bg-slate-100 dark:bg-gray-900', className)}+ className={cn('-mx-1 my-1 h-px bg-gray-100 dark:bg-gray-900', className)}{...props}/>));@@ -167,7 +167,7 @@ const DropdownMenuShortcut = ({...props}: React.HTMLAttributes<HTMLSpanElement>) => {return (- <span className={cn('ml-auto text-xs tracking-widest text-slate-500', className)} {...props} />+ <span className={cn('ml-auto text-xs tracking-widest text-gray-500', className)} {...props} />);};DropdownMenuShortcut.displayName = 'DropdownMenuShortcut';diff --git a/client/src/components/ui/QuestionMark.tsx b/client/src/components/ui/QuestionMark.tsxnew file mode 100644index 0000000000..89785837a0--- /dev/null+++ b/client/src/components/ui/QuestionMark.tsx@@ -0,0 +1,15 @@+import { cn } from '~/utils';+export const QuestionMark = ({ className = '' }) => {+ return (+ <span>+ <div+ className={cn(+ 'border-token-border-medium text-token-text-tertiary ml-2 flex h-3.5 w-3.5 cursor-default items-center justify-center rounded-full border text-[0.5rem] font-medium leading-none',+ className,+ )}+ >+ ?+ </div>+ </span>+ );+};diff --git a/client/src/components/ui/Resizable.tsx b/client/src/components/ui/Resizable.tsxnew file mode 100644index 0000000000..fc9a32df82--- /dev/null+++ b/client/src/components/ui/Resizable.tsx@@ -0,0 +1,62 @@+import { GripVertical } from 'lucide-react';+import * as ResizablePrimitive from 'react-resizable-panels';++import { cn } from '~/utils';++const ResizablePanelGroup = ({+ className = '',+ ...props+}: React.ComponentProps<typeof ResizablePrimitive.PanelGroup>) => (+ <ResizablePrimitive.PanelGroup+ className={cn('flex h-full w-full data-[panel-group-direction=vertical]:flex-col', className)}+ {...props}+ />+);++const ResizablePanel = ResizablePrimitive.Panel;++const ResizableHandle = ({+ withHandle,+ className = '',+ ...props+}: React.ComponentProps<typeof ResizablePrimitive.PanelResizeHandle> & {+ withHandle?: boolean;+}) => (+ <ResizablePrimitive.PanelResizeHandle+ className={cn(+ 'bg-border focus-visible:ring-ring relative flex w-px items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-offset-1 data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:-translate-y-1/2 data-[panel-group-direction=vertical]:after:translate-x-0 [&[data-panel-group-direction=vertical]>div]:rotate-90',+ className,+ )}+ {...props}+ >+ {withHandle && (+ <div className="bg-border z-10 flex h-4 w-3 items-center justify-center rounded-sm border">+ <GripVertical className="h-2.5 w-2.5" />+ </div>+ )}+ </ResizablePrimitive.PanelResizeHandle>+);++const ResizableHandleAlt = ({+ withHandle,+ className = '',+ ...props+}: React.ComponentProps<typeof ResizablePrimitive.PanelResizeHandle> & {+ withHandle?: boolean;+}) => (+ <ResizablePrimitive.PanelResizeHandle+ className={cn(+ 'bg-border focus-visible:ring-ring group relative flex w-px items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-offset-1 data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:-translate-y-1/2 data-[panel-group-direction=vertical]:after:translate-x-0 [&[data-panel-group-direction=vertical]>div]:rotate-90',+ className,+ )}+ {...props}+ >+ {withHandle && (+ <div className="bg-border invisible z-10 flex h-4 w-3 items-center justify-center rounded-sm border group-hover:visible group-active:visible">+ <GripVertical className="h-2.5 w-2.5" />+ </div>+ )}+ </ResizablePrimitive.PanelResizeHandle>+);++export { ResizablePanelGroup, ResizablePanel, ResizableHandle, ResizableHandleAlt };diff --git a/client/src/components/ui/Select.tsx b/client/src/components/ui/Select.tsxnew file mode 100644index 0000000000..6f67f40f44--- /dev/null+++ b/client/src/components/ui/Select.tsx@@ -0,0 +1,155 @@+'use client';++import * as React from 'react';+import { CaretSortIcon, CheckIcon, ChevronDownIcon, ChevronUpIcon } from '@radix-ui/react-icons';+import * as SelectPrimitive from '@radix-ui/react-select';++import { cn } from '~/utils';++const Select = SelectPrimitive.Root;++const SelectGroup = SelectPrimitive.Group;++const SelectValue = SelectPrimitive.Value;++const SelectTrigger = React.forwardRef<+ React.ElementRef<typeof SelectPrimitive.Trigger>,+ React.ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger>+>(({ className = '', children, ...props }, ref) => (+ <SelectPrimitive.Trigger+ ref={ref}+ className={cn(+ 'border-input ring-offset-background placeholder:text-muted-foreground focus:ring-ring flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border bg-transparent px-3 py-2 text-sm shadow-sm focus:outline-none focus:ring-1 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1',+ className,+ )}+ {...props}+ >+ {children}+ <SelectPrimitive.Icon asChild>+ <CaretSortIcon className="h-4 w-4 opacity-50" />+ </SelectPrimitive.Icon>+ </SelectPrimitive.Trigger>+));+SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;++const SelectScrollUpButton = React.forwardRef<+ React.ElementRef<typeof SelectPrimitive.ScrollUpButton>,+ React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollUpButton>+>(({ className = '', ...props }, ref) => (+ <SelectPrimitive.ScrollUpButton+ ref={ref}+ className={cn('flex cursor-default items-center justify-center py-1', className)}+ {...props}+ >+ <ChevronUpIcon />+ </SelectPrimitive.ScrollUpButton>+));+SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;++const SelectScrollDownButton = React.forwardRef<+ React.ElementRef<typeof SelectPrimitive.ScrollDownButton>,+ React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollDownButton>+>(({ className = '', ...props }, ref) => (+ <SelectPrimitive.ScrollDownButton+ ref={ref}+ className={cn('flex cursor-default items-center justify-center py-1', className)}+ {...props}+ >+ <ChevronDownIcon />+ </SelectPrimitive.ScrollDownButton>+));+SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;++const SelectContent = React.forwardRef<+ React.ElementRef<typeof SelectPrimitive.Content>,+ React.ComponentPropsWithoutRef<typeof SelectPrimitive.Content>+>(({ className = '', children, position = 'popper', ...props }, ref) => (+ <SelectPrimitive.Portal>+ <SelectPrimitive.Content+ ref={ref}+ className={cn(+ 'bg-popover text-popover-foreground relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2',+ position === 'popper'+ ? 'data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1'+ : '',+ className,+ )}+ position={position}+ {...props}+ >+ <SelectScrollUpButton />+ <SelectPrimitive.Viewport+ className={cn(+ 'p-1',+ position === 'popper'+ ? 'h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]'+ : '',+ )}+ >+ {children}+ </SelectPrimitive.Viewport>+ <SelectScrollDownButton />+ </SelectPrimitive.Content>+ </SelectPrimitive.Portal>+));+SelectContent.displayName = SelectPrimitive.Content.displayName;++const SelectLabel = React.forwardRef<+ React.ElementRef<typeof SelectPrimitive.Label>,+ React.ComponentPropsWithoutRef<typeof SelectPrimitive.Label>+>(({ className = '', ...props }, ref) => (+ <SelectPrimitive.Label+ ref={ref}+ className={cn('px-2 py-1.5 text-sm font-semibold', className)}+ {...props}+ />+));+SelectLabel.displayName = SelectPrimitive.Label.displayName;++const SelectItem = React.forwardRef<+ React.ElementRef<typeof SelectPrimitive.Item>,+ React.ComponentPropsWithoutRef<typeof SelectPrimitive.Item>+>(({ className = '', children, ...props }, ref) => (+ <SelectPrimitive.Item+ ref={ref}+ className={cn(+ 'focus:bg-accent focus:text-accent-foreground relative flex w-full cursor-pointer select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50',+ 'rounded-lg hover:bg-gray-100/50',+ className,+ )}+ {...props}+ >+ <span className="absolute right-2 flex h-3.5 w-3.5 items-center justify-center">+ <SelectPrimitive.ItemIndicator>+ <CheckIcon className="h-4 w-4" />+ </SelectPrimitive.ItemIndicator>+ </span>+ <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>+ </SelectPrimitive.Item>+));+SelectItem.displayName = SelectPrimitive.Item.displayName;++const SelectSeparator = React.forwardRef<+ React.ElementRef<typeof SelectPrimitive.Separator>,+ React.ComponentPropsWithoutRef<typeof SelectPrimitive.Separator>+>(({ className = '', ...props }, ref) => (+ <SelectPrimitive.Separator+ ref={ref}+ className={cn('bg-muted -mx-1 my-1 h-px', className)}+ {...props}+ />+));+SelectSeparator.displayName = SelectPrimitive.Separator.displayName;++export {+ Select,+ SelectGroup,+ SelectValue,+ SelectTrigger,+ SelectContent,+ SelectLabel,+ SelectItem,+ SelectSeparator,+ SelectScrollUpButton,+ SelectScrollDownButton,+};diff --git a/client/src/components/ui/Table.tsx b/client/src/components/ui/Table.tsxnew file mode 100644index 0000000000..cc6a5ee597--- /dev/null+++ b/client/src/components/ui/Table.tsx@@ -0,0 +1,89 @@+import * as React from 'react';++import { cn } from '../../utils';++const Table = React.forwardRef<HTMLTableElement, React.HTMLAttributes<HTMLTableElement>>(+ ({ className = '', ...props }, ref) => (+ <table ref={ref} className={cn('w-full caption-bottom text-sm', className)} {...props} />+ ),+);+Table.displayName = 'Table';++const TableHeader = React.forwardRef<+ HTMLTableSectionElement,+ React.HTMLAttributes<HTMLTableSectionElement>+>(({ className = '', ...props }, ref) => (+ <thead ref={ref} className={cn('[&_tr]:border-b', className)} {...props} />+));+TableHeader.displayName = 'TableHeader';++const TableBody = React.forwardRef<+ HTMLTableSectionElement,+ React.HTMLAttributes<HTMLTableSectionElement>+>(({ className = '', ...props }, ref) => (+ <tbody ref={ref} className={cn('[&_tr:last-child]:border-0', className)} {...props} />+));+TableBody.displayName = 'TableBody';++const TableFooter = React.forwardRef<+ HTMLTableSectionElement,+ React.HTMLAttributes<HTMLTableSectionElement>+>(({ className = '', ...props }, ref) => (+ <tfoot+ ref={ref}+ className={cn('bg-primary text-primary-foreground font-medium', className)}+ {...props}+ />+));+TableFooter.displayName = 'TableFooter';++const TableRow = React.forwardRef<HTMLTableRowElement, React.HTMLAttributes<HTMLTableRowElement>>(+ ({ className = '', ...props }, ref) => (+ <tr+ ref={ref}+ className={cn(+ 'hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors',+ className,+ )}+ {...props}+ />+ ),+);+TableRow.displayName = 'TableRow';++const TableHead = React.forwardRef<+ HTMLTableCellElement,+ React.ThHTMLAttributes<HTMLTableCellElement>+>(({ className = '', ...props }, ref) => (+ <th+ ref={ref}+ className={cn(+ 'text-muted-foreground h-12 px-4 text-left align-middle font-medium [&:has([role=checkbox])]:pr-0',+ className,+ )}+ {...props}+ />+));+TableHead.displayName = 'TableHead';++const TableCell = React.forwardRef<+ HTMLTableCellElement,+ React.TdHTMLAttributes<HTMLTableCellElement>+>(({ className = '', ...props }, ref) => (+ <td+ ref={ref}+ className={cn('align-middle [&:has([role=checkbox])]:pr-0', className)}+ {...props}+ />+));+TableCell.displayName = 'TableCell';++const TableCaption = React.forwardRef<+ HTMLTableCaptionElement,+ React.HTMLAttributes<HTMLTableCaptionElement>+>(({ className = '', ...props }, ref) => (+ <caption ref={ref} className={cn('text-muted-foreground mt-4 text-sm', className)} {...props} />+));+TableCaption.displayName = 'TableCaption';++export { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption };diff --git a/client/src/components/ui/index.ts b/client/src/components/ui/index.tsindex 2eca984641..3d4ce6262e 100644--- a/client/src/components/ui/index.ts+++ b/client/src/components/ui/index.ts@@ -1,6 +1,7 @@export * from './AlertDialog';export * from './Button';export * from './Checkbox';+export * from './DataTableColumnHeader';export * from './Dialog';export * from './DropdownMenu';export * from './HoverCard';@@ -9,8 +10,11 @@ export * from './InputNumber';export * from './Label';export * from './Landing';export * from './Prompt';+export * from './QuestionMark';export * from './Slider';+export * from './Separator';export * from './Switch';+export * from './Table';export * from './Tabs';export * from './Templates';export * from './Textarea';diff --git a/client/src/data-provider/mutations.ts b/client/src/data-provider/mutations.tsindex a4737b6a76..ca07032dee 100644--- a/client/src/data-provider/mutations.ts+++ b/client/src/data-provider/mutations.ts@@ -2,9 +2,11 @@ import { useMutation, useQueryClient } from '@tanstack/react-query';import type { UseMutationResult } from '@tanstack/react-query';import type t from 'librechat-data-provider';import type {+ TFile,+ BatchFile,TFileUpload,+ AssistantListResponse,UploadMutationOptions,- FileUploadBody,DeleteFilesResponse,DeleteFilesBody,DeleteMutationOptions,@@ -16,8 +18,23 @@ import type {UploadAvatarOptions,AvatarUploadResponse,TConversation,+ Assistant,+ AssistantCreateParams,+ AssistantUpdateParams,+ UploadAssistantAvatarOptions,+ AssistantAvatarVariables,+ CreateAssistantMutationOptions,+ UpdateAssistantMutationOptions,+ DeleteAssistantMutationOptions,+ DeleteConversationOptions,+ UpdateActionOptions,+ UpdateActionVariables,+ UpdateActionResponse,+ DeleteActionOptions,+ DeleteActionVariables,+ Action,} from 'librechat-data-provider';-import { dataService, MutationKeys, QueryKeys } from 'librechat-data-provider';+import { dataService, MutationKeys, QueryKeys, defaultOrderQuery } from 'librechat-data-provider';import { updateConversation, deleteConversation, updateConvoFields } from '~/utils';import { useSetRecoilState } from 'recoil';import store from '~/store';@@ -80,7 +97,7 @@ export const useUpdateConversationMutation = (};export const useDeleteConversationMutation = (- id?: string,+ options?: DeleteConversationOptions,): UseMutationResult<t.TDeleteConversationResponse,unknown,@@ -88,51 +105,116 @@ export const useDeleteConversationMutation = (unknown> => {const queryClient = useQueryClient();+ const { onSuccess, ..._options } = options || {};return useMutation((payload: t.TDeleteConversationRequest) => dataService.deleteConversation(payload),{- onSuccess: () => {- if (!id) {+ onSuccess: (_data, vars, context) => {+ if (!vars.conversationId) {return;}- queryClient.setQueryData([QueryKeys.conversation, id], null);+ queryClient.setQueryData([QueryKeys.conversation, vars.conversationId], null);queryClient.setQueryData<t.ConversationData>([QueryKeys.allConversations], (convoData) => {if (!convoData) {return convoData;}- const update = deleteConversation(convoData, id);+ const update = deleteConversation(convoData, vars.conversationId as string);return update;});+ onSuccess?.(_data, vars, context);},+ ...(_options || {}),},);};-export const useUploadImageMutation = (- options?: UploadMutationOptions,+export const useUploadFileMutation = (+ _options?: UploadMutationOptions,): UseMutationResult<TFileUpload, // response dataunknown, // error- FileUploadBody, // request+ FormData, // requestunknown // context> => {- return useMutation([MutationKeys.imageUpload], {- mutationFn: (body: FileUploadBody) => dataService.uploadImage(body.formData),+ const queryClient = useQueryClient();+ const { onSuccess, ...options } = _options || {};+ return useMutation([MutationKeys.fileUpload], {+ mutationFn: (body: FormData) => {+ const height = body.get('height');+ const width = body.get('width');+ if (height && width) {+ return dataService.uploadImage(body);+ }++ return dataService.uploadFile(body);+ },...(options || {}),+ onSuccess: (data, formData, context) => {+ queryClient.setQueryData<TFile[] | undefined>([QueryKeys.files], (_files) => [+ data,+ ...(_files ?? []),+ ]);++ const assistant_id = formData.get('assistant_id');+ const message_file = formData.get('message_file');++ if (!assistant_id || message_file === 'true') {+ onSuccess?.(data, formData, context);+ return;+ }++ queryClient.setQueryData<AssistantListResponse>(+ [QueryKeys.assistants, defaultOrderQuery],+ (prev) => {+ if (!prev) {+ return prev;+ }++ return {+ ...prev,+ data: prev?.data.map((assistant) => {+ if (assistant.id === assistant_id) {+ return {+ ...assistant,+ file_ids: [...assistant.file_ids, data.file_id],+ };+ }+ return assistant;+ }),+ };+ },+ );+ onSuccess?.(data, formData, context);+ },});};export const useDeleteFilesMutation = (- options?: DeleteMutationOptions,+ _options?: DeleteMutationOptions,): UseMutationResult<DeleteFilesResponse, // response dataunknown, // errorDeleteFilesBody, // requestunknown // context> => {+ const queryClient = useQueryClient();+ const { onSuccess, ...options } = _options || {};return useMutation([MutationKeys.fileDelete], {- mutationFn: (body: DeleteFilesBody) => dataService.deleteFiles(body.files),+ mutationFn: (body: DeleteFilesBody) => dataService.deleteFiles(body.files, body.assistant_id),...(options || {}),+ onSuccess: (data, ...args) => {+ queryClient.setQueryData<TFile[] | undefined>([QueryKeys.files], (cachefiles) => {+ const { files: filesDeleted } = args[0];++ const fileMap = filesDeleted.reduce((acc, file) => {+ acc.set(file.file_id, file);+ return acc;+ }, new Map<string, BatchFile>());++ return (cachefiles ?? []).filter((file) => !fileMap.has(file.file_id));+ });+ onSuccess?.(data, ...args);+ },});};@@ -184,7 +266,7 @@ export const useLogoutUserMutation = (localStorage.removeItem('lastSelectedModel');localStorage.removeItem('lastSelectedTools');localStorage.removeItem('filesToDelete');- localStorage.removeItem('lastAssistant');+ // localStorage.removeItem('lastAssistant');options?.onMutate?.(...args);},});@@ -204,3 +286,245 @@ export const useUploadAvatarMutation = (...(options || {}),});};++/**+ * ASSISTANTS+ */++/**+ * Create a new assistant+ */+export const useCreateAssistantMutation = (+ options?: CreateAssistantMutationOptions,+): UseMutationResult<Assistant, Error, AssistantCreateParams> => {+ const queryClient = useQueryClient();+ return useMutation(+ (newAssistantData: AssistantCreateParams) => dataService.createAssistant(newAssistantData),+ {+ onMutate: (variables) => options?.onMutate?.(variables),+ onError: (error, variables, context) => options?.onError?.(error, variables, context),+ onSuccess: (newAssistant, variables, context) => {+ const listRes = queryClient.getQueryData<AssistantListResponse>([+ QueryKeys.assistants,+ defaultOrderQuery,+ ]);++ if (!listRes) {+ return options?.onSuccess?.(newAssistant, variables, context);+ }++ const currentAssistants = listRes.data;+ currentAssistants.push(newAssistant);++ queryClient.setQueryData<AssistantListResponse>([QueryKeys.assistants, defaultOrderQuery], {+ ...listRes,+ data: currentAssistants,+ });+ return options?.onSuccess?.(newAssistant, variables, context);+ },+ },+ );+};++/**+ * Hook for updating an assistant+ */+export const useUpdateAssistantMutation = (+ options?: UpdateAssistantMutationOptions,+): UseMutationResult<Assistant, Error, { assistant_id: string; data: AssistantUpdateParams }> => {+ const queryClient = useQueryClient();+ return useMutation(+ ({ assistant_id, data }: { assistant_id: string; data: AssistantUpdateParams }) =>+ dataService.updateAssistant(assistant_id, data),+ {+ onMutate: (variables) => options?.onMutate?.(variables),+ onError: (error, variables, context) => options?.onError?.(error, variables, context),+ onSuccess: (updatedAssistant, variables, context) => {+ const listRes = queryClient.getQueryData<AssistantListResponse>([+ QueryKeys.assistants,+ defaultOrderQuery,+ ]);++ if (!listRes) {+ return options?.onSuccess?.(updatedAssistant, variables, context);+ }++ queryClient.setQueryData<AssistantListResponse>([QueryKeys.assistants, defaultOrderQuery], {+ ...listRes,+ data: listRes.data.map((assistant) => {+ if (assistant.id === variables.assistant_id) {+ return updatedAssistant;+ }+ return assistant;+ }),+ });+ return options?.onSuccess?.(updatedAssistant, variables, context);+ },+ },+ );+};++/**+ * Hook for deleting an assistant+ */+export const useDeleteAssistantMutation = (+ options?: DeleteAssistantMutationOptions,+): UseMutationResult<void, Error, { assistant_id: string }> => {+ const queryClient = useQueryClient();+ return useMutation(+ ({ assistant_id }: { assistant_id: string }) => dataService.deleteAssistant(assistant_id),+ {+ onMutate: (variables) => options?.onMutate?.(variables),+ onError: (error, variables, context) => options?.onError?.(error, variables, context),+ onSuccess: (_data, variables, context) => {+ const listRes = queryClient.getQueryData<AssistantListResponse>([+ QueryKeys.assistants,+ defaultOrderQuery,+ ]);++ if (!listRes) {+ return options?.onSuccess?.(_data, variables, context);+ }++ const data = listRes.data.filter((assistant) => assistant.id !== variables.assistant_id);++ queryClient.setQueryData<AssistantListResponse>([QueryKeys.assistants, defaultOrderQuery], {+ ...listRes,+ data,+ });++ return options?.onSuccess?.(_data, variables, data);+ },+ },+ );+};++/**+ * Hook for uploading an assistant avatar+ */+export const useUploadAssistantAvatarMutation = (+ options?: UploadAssistantAvatarOptions,+): UseMutationResult<+ Assistant, // response data+ unknown, // error+ AssistantAvatarVariables, // request+ unknown // context+> => {+ return useMutation([MutationKeys.assistantAvatarUpload], {+ // eslint-disable-next-line @typescript-eslint/no-unused-vars+ mutationFn: ({ postCreation, ...variables }: AssistantAvatarVariables) =>+ dataService.uploadAssistantAvatar(variables),+ ...(options || {}),+ });+};++/**+ * Hook for updating Assistant Actions+ */+export const useUpdateAction = (+ options?: UpdateActionOptions,+): UseMutationResult<+ UpdateActionResponse, // response data+ unknown, // error+ UpdateActionVariables, // request+ unknown // context+> => {+ const queryClient = useQueryClient();+ return useMutation([MutationKeys.updateAction], {+ mutationFn: (variables: UpdateActionVariables) => dataService.updateAction(variables),++ onMutate: (variables) => options?.onMutate?.(variables),+ onError: (error, variables, context) => options?.onError?.(error, variables, context),+ onSuccess: (updateActionResponse, variables, context) => {+ const listRes = queryClient.getQueryData<AssistantListResponse>([+ QueryKeys.assistants,+ defaultOrderQuery,+ ]);++ if (!listRes) {+ return options?.onSuccess?.(updateActionResponse, variables, context);+ }++ const updatedAssistant = updateActionResponse[1];++ queryClient.setQueryData<AssistantListResponse>([QueryKeys.assistants, defaultOrderQuery], {+ ...listRes,+ data: listRes.data.map((assistant) => {+ if (assistant.id === variables.assistant_id) {+ return updatedAssistant;+ }+ return assistant;+ }),+ });++ queryClient.setQueryData<Action[]>([QueryKeys.actions], (prev) => {+ return prev+ ?.map((action) => {+ if (action.action_id === variables.action_id) {+ return updateActionResponse[2];+ }+ return action;+ })+ .concat(variables.action_id ? [] : [updateActionResponse[2]]);+ });++ return options?.onSuccess?.(updateActionResponse, variables, context);+ },+ });+};++/**+ * Hook for deleting an Assistant Action+ */+export const useDeleteAction = (+ options?: DeleteActionOptions,+): UseMutationResult<+ void, // response data for a delete operation is typically void+ Error, // error type+ DeleteActionVariables, // request variables+ unknown // context+> => {+ const queryClient = useQueryClient();+ return useMutation([MutationKeys.deleteAction], {+ mutationFn: (variables: DeleteActionVariables) =>+ dataService.deleteAction(variables.assistant_id, variables.action_id),++ onMutate: (variables) => options?.onMutate?.(variables),+ onError: (error, variables, context) => options?.onError?.(error, variables, context),+ onSuccess: (_data, variables, context) => {+ let domain: string | undefined = '';+ queryClient.setQueryData<Action[]>([QueryKeys.actions], (prev) => {+ return prev?.filter((action) => {+ domain = action.metadata.domain;+ return action.action_id !== variables.action_id;+ });+ });++ queryClient.setQueryData<AssistantListResponse>(+ [QueryKeys.assistants, defaultOrderQuery],+ (prev) => {+ if (!prev) {+ return prev;+ }++ return {+ ...prev,+ data: prev?.data.map((assistant) => {+ if (assistant.id === variables.assistant_id) {+ return {+ ...assistant,+ tools: assistant.tools.filter(+ (tool) => !tool.function?.name.includes(domain ?? ''),+ ),+ };+ }+ return assistant;+ }),+ };+ },+ );++ return options?.onSuccess?.(_data, variables, context);+ },+ });+};diff --git a/client/src/data-provider/queries.ts b/client/src/data-provider/queries.tsindex 431b4f813b..c8b26efc5e 100644--- a/client/src/data-provider/queries.ts+++ b/client/src/data-provider/queries.ts@@ -1,4 +1,4 @@-import { QueryKeys, dataService } from 'librechat-data-provider';+import { EModelEndpoint, QueryKeys, dataService } from 'librechat-data-provider';import { useQuery, useInfiniteQuery, useQueryClient } from '@tanstack/react-query';import type {UseInfiniteQueryOptions,@@ -7,10 +7,19 @@ import type {} from '@tanstack/react-query';import type t from 'librechat-data-provider';import type {+ Action,TPreset,TFile,+ TPlugin,+ FileConfig,ConversationListResponse,ConversationListParams,+ Assistant,+ AssistantListParams,+ AssistantListResponse,+ AssistantDocument,+ TEndpointsConfig,+ TCheckUserKeyResponse,} from 'librechat-data-provider';import { findPageForConversation } from '~/utils';@@ -25,6 +34,21 @@ export const useGetFiles = <TData = TFile[] | boolean>(});};+export const useGetFileConfig = <TData = FileConfig>(+ config?: UseQueryOptions<FileConfig, unknown, TData>,+): QueryObserverResult<TData, unknown> => {+ return useQuery<FileConfig, unknown, TData>(+ [QueryKeys.fileConfig],+ () => dataService.getFileConfig(),+ {+ refetchOnWindowFocus: false,+ refetchOnReconnect: false,+ refetchOnMount: false,+ ...config,+ },+ );+};+export const useGetPresetsQuery = (config?: UseQueryOptions<TPreset[]>,): QueryObserverResult<TPreset[], unknown> => {@@ -129,3 +153,174 @@ export const useConversationsInfiniteQuery = (},);};++/**+ * ASSISTANTS+ */++/**+ * Hook for getting all available tools for Assistants+ */+export const useAvailableToolsQuery = (): QueryObserverResult<TPlugin[]> => {+ const queryClient = useQueryClient();+ const endpointsConfig = queryClient.getQueryData<TEndpointsConfig>([QueryKeys.endpoints]);+ const keyExpiry = queryClient.getQueryData<TCheckUserKeyResponse>([+ QueryKeys.name,+ EModelEndpoint.assistants,+ ]);+ const userProvidesKey = !!endpointsConfig?.[EModelEndpoint.assistants]?.userProvide;+ const keyProvided = userProvidesKey ? !!keyExpiry?.expiresAt : true;+ const enabled = !!endpointsConfig?.[EModelEndpoint.assistants] && keyProvided;+ return useQuery<TPlugin[]>([QueryKeys.tools], () => dataService.getAvailableTools(), {+ refetchOnWindowFocus: false,+ refetchOnReconnect: false,+ refetchOnMount: false,+ enabled,+ });+};++/**+ * Hook for listing all assistants, with optional parameters provided for pagination and sorting+ */+export const useListAssistantsQuery = <TData = AssistantListResponse>(+ params?: AssistantListParams,+ config?: UseQueryOptions<AssistantListResponse, unknown, TData>,+): QueryObserverResult<TData> => {+ const queryClient = useQueryClient();+ const endpointsConfig = queryClient.getQueryData<TEndpointsConfig>([QueryKeys.endpoints]);+ const keyExpiry = queryClient.getQueryData<TCheckUserKeyResponse>([+ QueryKeys.name,+ EModelEndpoint.assistants,+ ]);+ const userProvidesKey = !!endpointsConfig?.[EModelEndpoint.assistants]?.userProvide;+ const keyProvided = userProvidesKey ? !!keyExpiry?.expiresAt : true;+ const enabled = !!endpointsConfig?.[EModelEndpoint.assistants] && keyProvided;+ return useQuery<AssistantListResponse, unknown, TData>(+ [QueryKeys.assistants, params],+ () => dataService.listAssistants(params),+ {+ // Example selector to sort them by created_at+ // select: (res) => {+ // return res.data.sort((a, b) => a.created_at - b.created_at);+ // },+ refetchOnWindowFocus: false,+ refetchOnReconnect: false,+ refetchOnMount: false,+ retry: false,+ ...config,+ enabled: config?.enabled !== undefined ? config?.enabled && enabled : enabled,+ },+ );+};++export const useListAssistantsInfiniteQuery = (+ params?: AssistantListParams,+ config?: UseInfiniteQueryOptions<AssistantListResponse, Error>,+) => {+ const queryClient = useQueryClient();+ const endpointsConfig = queryClient.getQueryData<TEndpointsConfig>([QueryKeys.endpoints]);+ const keyExpiry = queryClient.getQueryData<TCheckUserKeyResponse>([+ QueryKeys.name,+ EModelEndpoint.assistants,+ ]);+ const userProvidesKey = !!endpointsConfig?.[EModelEndpoint.assistants]?.userProvide;+ const keyProvided = userProvidesKey ? !!keyExpiry?.expiresAt : true;+ const enabled = !!endpointsConfig?.[EModelEndpoint.assistants] && keyProvided;+ return useInfiniteQuery<AssistantListResponse, Error>(+ ['assistantsList', params],+ ({ pageParam = '' }) => dataService.listAssistants({ ...params, after: pageParam }),+ {+ getNextPageParam: (lastPage) => {+ // lastPage is of type AssistantListResponse, you can use the has_more and last_id from it directly+ if (lastPage.has_more) {+ return lastPage.last_id;+ }+ return undefined;+ },+ ...config,+ enabled: config?.enabled !== undefined ? config?.enabled && enabled : enabled,+ },+ );+};++/**+ * Hook for retrieving details about a single assistant+ */+export const useGetAssistantByIdQuery = (+ assistant_id: string,+ config?: UseQueryOptions<Assistant>,+): QueryObserverResult<Assistant> => {+ const queryClient = useQueryClient();+ const endpointsConfig = queryClient.getQueryData<TEndpointsConfig>([QueryKeys.endpoints]);+ const keyExpiry = queryClient.getQueryData<TCheckUserKeyResponse>([+ QueryKeys.name,+ EModelEndpoint.assistants,+ ]);+ const userProvidesKey = !!endpointsConfig?.[EModelEndpoint.assistants]?.userProvide;+ const keyProvided = userProvidesKey ? !!keyExpiry?.expiresAt : true;+ const enabled = !!endpointsConfig?.[EModelEndpoint.assistants] && keyProvided;+ return useQuery<Assistant>(+ [QueryKeys.assistant, assistant_id],+ () => dataService.getAssistantById(assistant_id),+ {+ refetchOnWindowFocus: false,+ refetchOnReconnect: false,+ refetchOnMount: false,+ retry: false,+ ...config,+ // Query will not execute until the assistant_id exists+ enabled: config?.enabled !== undefined ? config?.enabled && enabled : enabled,+ },+ );+};++/**+ * Hook for retrieving user's saved Assistant Actions+ */+export const useGetActionsQuery = <TData = Action[]>(+ config?: UseQueryOptions<Action[], unknown, TData>,+): QueryObserverResult<TData> => {+ const queryClient = useQueryClient();+ const endpointsConfig = queryClient.getQueryData<TEndpointsConfig>([QueryKeys.endpoints]);+ const keyExpiry = queryClient.getQueryData<TCheckUserKeyResponse>([+ QueryKeys.name,+ EModelEndpoint.assistants,+ ]);+ const userProvidesKey = !!endpointsConfig?.[EModelEndpoint.assistants]?.userProvide;+ const keyProvided = userProvidesKey ? !!keyExpiry?.expiresAt : true;+ const enabled = !!endpointsConfig?.[EModelEndpoint.assistants] && keyProvided;+ return useQuery<Action[], unknown, TData>([QueryKeys.actions], () => dataService.getActions(), {+ refetchOnWindowFocus: false,+ refetchOnReconnect: false,+ refetchOnMount: false,+ ...config,+ enabled: config?.enabled !== undefined ? config?.enabled && enabled : enabled,+ });+};+/**+ * Hook for retrieving user's saved Assistant Documents (metadata saved to Database)+ */+export const useGetAssistantDocsQuery = (+ config?: UseQueryOptions<AssistantDocument[]>,+): QueryObserverResult<AssistantDocument[], unknown> => {+ const queryClient = useQueryClient();+ const endpointsConfig = queryClient.getQueryData<TEndpointsConfig>([QueryKeys.endpoints]);+ const keyExpiry = queryClient.getQueryData<TCheckUserKeyResponse>([+ QueryKeys.name,+ EModelEndpoint.assistants,+ ]);+ const userProvidesKey = !!endpointsConfig?.[EModelEndpoint.assistants]?.userProvide;+ const keyProvided = userProvidesKey ? !!keyExpiry?.expiresAt : true;+ const enabled = !!endpointsConfig?.[EModelEndpoint.assistants] && keyProvided;+ return useQuery<AssistantDocument[]>(+ [QueryKeys.assistantDocs],+ () => dataService.getAssistantDocs(),+ {+ refetchOnWindowFocus: false,+ refetchOnReconnect: false,+ refetchOnMount: false,+ ...config,+ enabled: config?.enabled !== undefined ? config?.enabled && enabled : enabled,+ },+ );+};diff --git a/client/src/hooks/Assistants/index.ts b/client/src/hooks/Assistants/index.tsnew file mode 100644index 0000000000..198473ffcf--- /dev/null+++ b/client/src/hooks/Assistants/index.ts@@ -0,0 +1,2 @@+export { default as useAssistantsMap } from './useAssistantsMap';+export { default as useSelectAssistant } from './useSelectAssistant';diff --git a/client/src/hooks/Assistants/useAssistantsMap.ts b/client/src/hooks/Assistants/useAssistantsMap.tsnew file mode 100644index 0000000000..d88d6eea4a--- /dev/null+++ b/client/src/hooks/Assistants/useAssistantsMap.ts@@ -0,0 +1,12 @@+import { defaultOrderQuery } from 'librechat-data-provider';+import { useListAssistantsQuery } from '~/data-provider';+import { mapAssistants } from '~/utils';++export default function useAssistantsMap({ isAuthenticated }: { isAuthenticated: boolean }) {+ const { data: assistantMap = {} } = useListAssistantsQuery(defaultOrderQuery, {+ select: (res) => mapAssistants(res.data),+ enabled: isAuthenticated,+ });++ return assistantMap;+}diff --git a/client/src/hooks/Assistants/useSelectAssistant.ts b/client/src/hooks/Assistants/useSelectAssistant.tsnew file mode 100644index 0000000000..be451ea95a--- /dev/null+++ b/client/src/hooks/Assistants/useSelectAssistant.ts@@ -0,0 +1,51 @@+import { useCallback } from 'react';+import { EModelEndpoint, defaultOrderQuery } from 'librechat-data-provider';+import type { TConversation, TPreset } from 'librechat-data-provider';+import { useListAssistantsQuery } from '~/data-provider';+import { useChatContext } from '~/Providers/ChatContext';+import useDefaultConvo from '~/hooks/useDefaultConvo';+import { mapAssistants } from '~/utils';++export default function useSelectAssistant() {+ const getDefaultConversation = useDefaultConvo();+ const { conversation, newConversation } = useChatContext();+ const { data: assistantMap = {} } = useListAssistantsQuery(defaultOrderQuery, {+ select: (res) => mapAssistants(res.data),+ });++ const onSelect = useCallback(+ (value: string) => {+ const assistant = assistantMap?.[value];+ if (!assistant) {+ return;+ }+ const template: Partial<TPreset | TConversation> = {+ endpoint: EModelEndpoint.assistants,+ assistant_id: assistant.id,+ model: assistant.model,+ conversationId: 'new',+ };++ if (conversation?.endpoint === EModelEndpoint.assistants) {+ const currentConvo = getDefaultConversation({+ conversation: { ...(conversation ?? {}) },+ preset: template,+ });+ newConversation({+ template: currentConvo,+ preset: template as Partial<TPreset>,+ keepLatestMessage: true,+ });+ return;+ }++ newConversation({+ template: { ...(template as Partial<TConversation>) },+ preset: template as Partial<TPreset>,+ });+ },+ [assistantMap, conversation, getDefaultConversation, newConversation],+ );++ return { onSelect };+}diff --git a/client/src/hooks/Conversations/index.ts b/client/src/hooks/Conversations/index.tsindex 5a84f39f3a..252d23f6cc 100644--- a/client/src/hooks/Conversations/index.ts+++ b/client/src/hooks/Conversations/index.ts@@ -1,2 +1,3 @@export { default as usePresets } from './usePresets';export { default as useGetSender } from './useGetSender';+export { default as useDebouncedInput } from './useDebouncedInput';diff --git a/client/src/hooks/Conversations/useDebouncedInput.ts b/client/src/hooks/Conversations/useDebouncedInput.tsnew file mode 100644index 0000000000..b2f9969bf4--- /dev/null+++ b/client/src/hooks/Conversations/useDebouncedInput.ts@@ -0,0 +1,35 @@+import debounce from 'lodash/debounce';+import { useState, useCallback } from 'react';+import type { TSetOption } from '~/common';++/** A custom hook that accepts a setOption function and an option key (e.g., 'title').+It manages a local state for the option value, a debounced setter function for that value,+and returns the local state value, its setter, and an onChange handler suitable for inputs. */+function useDebouncedInput(+ setOption: TSetOption,+ optionKey: string | number,+ initialValue: unknown,+ delay = 450,+): [+ React.ChangeEventHandler<HTMLInputElement | HTMLTextAreaElement>,+ unknown,+ React.Dispatch<React.SetStateAction<unknown>>,+] {+ const [value, setValue] = useState(initialValue);++ /** A debounced function to call the passed setOption with the optionKey and new value.+ *+ Note: We use useCallback to ensure our debounced function is stable across renders. */+ const setDebouncedOption = useCallback(debounce(setOption(optionKey), delay), []);++ /** An onChange handler that updates the local state and the debounced option */+ const onChange: React.ChangeEventHandler<HTMLInputElement> = (e) => {+ const newValue = e.target.value;+ setValue(newValue);+ setDebouncedOption(newValue);+ };++ return [onChange, value, setValue];+}++export default useDebouncedInput;diff --git a/client/src/hooks/Conversations/usePresets.ts b/client/src/hooks/Conversations/usePresets.tsindex eb60616373..136f25009a 100644--- a/client/src/hooks/Conversations/usePresets.ts+++ b/client/src/hooks/Conversations/usePresets.ts@@ -2,7 +2,7 @@ import filenamify from 'filenamify';import exportFromJSON from 'export-from-json';import { useCallback, useEffect, useRef } from 'react';import { useQueryClient } from '@tanstack/react-query';-import { QueryKeys, modularEndpoints } from 'librechat-data-provider';+import { QueryKeys, modularEndpoints, EModelEndpoint } from 'librechat-data-provider';import { useRecoilState, useSetRecoilState, useRecoilValue } from 'recoil';import { useCreatePresetMutation } from 'librechat-data-provider/react-query';import type { TPreset, TEndpointsConfig } from 'librechat-data-provider';@@ -12,7 +12,6 @@ import {useGetPresetsQuery,} from '~/data-provider';import { useChatContext, useToastContext } from '~/Providers';-import useNavigateToConvo from '~/hooks/useNavigateToConvo';import { cleanupPreset, getEndpointField } from '~/utils';import useDefaultConvo from '~/hooks/useDefaultConvo';import { useAuthContext } from '~/hooks/AuthContext';@@ -114,7 +113,7 @@ export default function usePresets() {});},});- const { navigateToConvo } = useNavigateToConvo();+const getDefaultConversation = useDefaultConvo();const { endpoint } = conversation ?? {};@@ -164,12 +163,19 @@ export default function usePresets() {const currentEndpointType = getEndpointField(endpointsConfig, endpoint, 'type');const endpointType = getEndpointField(endpointsConfig, newPreset.endpoint, 'type');+ const isAssistantSwitch =+ newPreset.endpoint === EModelEndpoint.assistants &&+ conversation?.endpoint === EModelEndpoint.assistants &&+ conversation?.endpoint === newPreset.endpoint;if (- (modularEndpoints.has(endpoint ?? '') || modularEndpoints.has(currentEndpointType ?? '')) &&+ (modularEndpoints.has(endpoint ?? '') ||+ modularEndpoints.has(currentEndpointType ?? '') ||+ isAssistantSwitch) &&(modularEndpoints.has(newPreset?.endpoint ?? '') ||- modularEndpoints.has(endpointType ?? '')) &&- (endpoint === newPreset?.endpoint || modularChat)+ modularEndpoints.has(endpointType ?? '') ||+ isAssistantSwitch) &&+ (endpoint === newPreset?.endpoint || modularChat || isAssistantSwitch)) {const currentConvo = getDefaultConversation({/* target endpointType is necessary to avoid endpoint mixing */@@ -178,7 +184,7 @@ export default function usePresets() {});/* We don't reset the latest message, only when changing settings mid-converstion */- navigateToConvo(currentConvo, false);+ newConversation({ template: currentConvo, preset: currentConvo, keepLatestMessage: true });return;}diff --git a/client/src/hooks/Files/index.ts b/client/src/hooks/Files/index.tsnew file mode 100644index 0000000000..af61a8b445--- /dev/null+++ b/client/src/hooks/Files/index.ts@@ -0,0 +1,7 @@+export { default as useDeleteFilesFromTable } from './useDeleteFilesFromTable';+export { default as useSetFilesToDelete } from './useSetFilesToDelete';+export { default as useFileHandling } from './useFileHandling';+export { default as useFileDeletion } from './useFileDeletion';+export { default as useUpdateFiles } from './useUpdateFiles';+export { default as useDragHelpers } from './useDragHelpers';+export { default as useFileMap } from './useFileMap';diff --git a/client/src/hooks/Files/useDeleteFilesFromTable.tsx b/client/src/hooks/Files/useDeleteFilesFromTable.tsxnew file mode 100644index 0000000000..28e524b574--- /dev/null+++ b/client/src/hooks/Files/useDeleteFilesFromTable.tsx@@ -0,0 +1,42 @@+import { useQueryClient } from '@tanstack/react-query';+import { QueryKeys } from 'librechat-data-provider';+import type { BatchFile, TFile } from 'librechat-data-provider';+import { useDeleteFilesMutation } from '~/data-provider';+import useFileDeletion from './useFileDeletion';++export default function useDeleteFilesFromTable(callback?: () => void) {+ const queryClient = useQueryClient();+ const deletionMutation = useDeleteFilesMutation({+ onMutate: async (variables) => {+ const { files } = variables;+ if (!files?.length) {+ return new Map<string, BatchFile>();+ }++ const filesToDeleteMap = files.reduce((map, file) => {+ map.set(file.file_id, file);+ return map;+ }, new Map<string, BatchFile>());++ return { filesToDeleteMap };+ },+ onSuccess: (data, variables, context) => {+ console.log('Files deleted');+ const { filesToDeleteMap } = context as { filesToDeleteMap: Map<string, BatchFile> };++ queryClient.setQueryData([QueryKeys.files], (oldFiles: TFile[] | undefined) => {+ const { files } = variables;+ return files?.length+ ? oldFiles?.filter((file) => !filesToDeleteMap.has(file.file_id))+ : oldFiles;+ });+ callback?.();+ },+ onError: (error) => {+ console.log('Error deleting files:', error);+ callback?.();+ },+ });++ return useFileDeletion({ mutateAsync: deletionMutation.mutateAsync });+}diff --git a/client/src/hooks/useDragHelpers.ts b/client/src/hooks/Files/useDragHelpers.tssimilarity index 100%rename from client/src/hooks/useDragHelpers.tsrename to client/src/hooks/Files/useDragHelpers.tsdiff --git a/client/src/hooks/Files/useFileDeletion.ts b/client/src/hooks/Files/useFileDeletion.tsnew file mode 100644index 0000000000..d2ed8f8ed3--- /dev/null+++ b/client/src/hooks/Files/useFileDeletion.ts@@ -0,0 +1,125 @@+import debounce from 'lodash/debounce';+import { FileSources } from 'librechat-data-provider';+import { useCallback, useState, useEffect } from 'react';+import type {+ BatchFile,+ TFile,+ DeleteFilesResponse,+ DeleteFilesBody,+} from 'librechat-data-provider';+import type { UseMutateAsyncFunction } from '@tanstack/react-query';+import type { ExtendedFile, GenericSetter } from '~/common';+import useSetFilesToDelete from './useSetFilesToDelete';++type FileMapSetter = GenericSetter<Map<string, ExtendedFile>>;++const useFileDeletion = ({+ mutateAsync,+ assistant_id,+}: {+ mutateAsync: UseMutateAsyncFunction<DeleteFilesResponse, unknown, DeleteFilesBody, unknown>;+ assistant_id?: string;+}) => {+ // eslint-disable-next-line @typescript-eslint/no-unused-vars+ const [_batch, setFileDeleteBatch] = useState<BatchFile[]>([]);+ const setFilesToDelete = useSetFilesToDelete();++ const executeBatchDelete = useCallback(+ (filesToDelete: BatchFile[], assistant_id?: string) => {+ console.log('Deleting files:', filesToDelete, assistant_id);+ mutateAsync({ files: filesToDelete, assistant_id });+ setFileDeleteBatch([]);+ },+ [mutateAsync],+ );++ // eslint-disable-next-line react-hooks/exhaustive-deps+ const debouncedDelete = useCallback(debounce(executeBatchDelete, 1000), []);++ useEffect(() => {+ // Cleanup function for debouncedDelete when component unmounts or before re-render+ return () => debouncedDelete.cancel();+ }, [debouncedDelete]);++ const deleteFile = useCallback(+ ({ file: _file, setFiles }: { file: ExtendedFile | TFile; setFiles?: FileMapSetter }) => {+ const {+ file_id,+ temp_file_id = '',+ filepath = '',+ source = FileSources.local,+ attached,+ } = _file as TFile & { attached?: boolean };++ const progress = _file['progress'] ?? 1;++ if (progress < 1) {+ return;+ }+ const file: BatchFile = {+ file_id,+ filepath,+ source,+ };++ if (setFiles) {+ setFiles((currentFiles) => {+ const updatedFiles = new Map(currentFiles);+ updatedFiles.delete(file_id);+ updatedFiles.delete(temp_file_id);+ const files = Object.fromEntries(updatedFiles);+ setFilesToDelete(files);+ return updatedFiles;+ });+ }++ if (attached) {+ return;+ }++ setFileDeleteBatch((prevBatch) => {+ const newBatch = [...prevBatch, file];+ debouncedDelete(newBatch, assistant_id);+ return newBatch;+ });+ },+ [debouncedDelete, setFilesToDelete, assistant_id],+ );++ const deleteFiles = useCallback(+ ({ files, setFiles }: { files: ExtendedFile[] | TFile[]; setFiles?: FileMapSetter }) => {+ const batchFiles = files.map((_file) => {+ const { file_id, filepath = '', source = FileSources.local } = _file;++ return {+ file_id,+ filepath,+ source,+ };+ });++ if (setFiles) {+ setFiles((currentFiles) => {+ const updatedFiles = new Map(currentFiles);+ batchFiles.forEach((file) => {+ updatedFiles.delete(file.file_id);+ });+ const filesToUpdate = Object.fromEntries(updatedFiles);+ setFilesToDelete(filesToUpdate);+ return updatedFiles;+ });+ }++ setFileDeleteBatch((prevBatch) => {+ const newBatch = [...prevBatch, ...batchFiles];+ debouncedDelete(newBatch, assistant_id);+ return newBatch;+ });+ },+ [debouncedDelete, setFilesToDelete, assistant_id],+ );++ return { deleteFile, deleteFiles };+};++export default useFileDeletion;diff --git a/client/src/hooks/Files/useFileHandling.ts b/client/src/hooks/Files/useFileHandling.tsnew file mode 100644index 0000000000..2ed818df73--- /dev/null+++ b/client/src/hooks/Files/useFileHandling.ts@@ -0,0 +1,278 @@+import { v4 } from 'uuid';+import debounce from 'lodash/debounce';+import { useState, useEffect, useCallback } from 'react';+import {+ megabyte,+ EModelEndpoint,+ mergeFileConfig,+ fileConfig as defaultFileConfig,+} from 'librechat-data-provider';+import type { ExtendedFile, FileSetter } from '~/common';+import { useUploadFileMutation, useGetFileConfig } from '~/data-provider';+import { useToastContext } from '~/Providers/ToastContext';+import { useChatContext } from '~/Providers/ChatContext';+import useUpdateFiles from './useUpdateFiles';++const { checkType } = defaultFileConfig;++type UseFileHandling = {+ overrideEndpoint?: EModelEndpoint;+ fileSetter?: FileSetter;+ additionalMetadata?: Record<string, string>;+};++const useFileHandling = (params?: UseFileHandling) => {+ const { showToast } = useToastContext();+ const [errors, setErrors] = useState<string[]>([]);+ const { files, setFiles, setFilesLoading, conversation } = useChatContext();+ const setError = (error: string) => setErrors((prevErrors) => [...prevErrors, error]);+ const { addFile, replaceFile, updateFileById, deleteFileById } = useUpdateFiles(+ params?.fileSetter ?? setFiles,+ );++ const { data: fileConfig = defaultFileConfig } = useGetFileConfig({+ select: (data) => mergeFileConfig(data),+ });+ const endpoint =+ params?.overrideEndpoint ?? conversation?.endpointType ?? conversation?.endpoint ?? 'default';++ const { fileLimit, fileSizeLimit, totalSizeLimit, supportedMimeTypes } =+ fileConfig.endpoints[endpoint] ?? fileConfig.endpoints.default;++ const displayToast = useCallback(() => {+ if (errors.length > 1) {+ const errorList = Array.from(new Set(errors))+ .map((e, i) => `${i > 0 ? '• ' : ''}${e}\n`)+ .join('');+ showToast({+ message: errorList,+ status: 'error',+ duration: 5000,+ });+ } else if (errors.length === 1) {+ showToast({+ message: errors[0],+ status: 'error',+ duration: 5000,+ });+ }++ setErrors([]);+ }, [errors, showToast]);++ const debouncedDisplayToast = debounce(displayToast, 250);++ useEffect(() => {+ if (errors.length > 0) {+ debouncedDisplayToast();+ }++ return () => debouncedDisplayToast.cancel();+ }, [errors, debouncedDisplayToast]);++ const uploadFile = useUploadFileMutation({+ onSuccess: (data) => {+ console.log('upload success', data);+ updateFileById(+ data.temp_file_id,+ {+ progress: 0.9,+ filepath: data.filepath,+ },+ params?.additionalMetadata?.assistant_id ? true : false,+ );++ setTimeout(() => {+ updateFileById(+ data.temp_file_id,+ {+ progress: 1,+ file_id: data.file_id,+ temp_file_id: data.temp_file_id,+ filepath: data.filepath,+ type: data.type,+ height: data.height,+ width: data.width,+ filename: data.filename,+ source: data.source,+ },+ params?.additionalMetadata?.assistant_id ? true : false,+ );+ }, 300);+ },+ onError: (error, body) => {+ console.log('upload error', error);+ const file_id = body.get('file_id');+ deleteFileById(file_id as string);+ setError(+ (error as { response: { data: { message?: string } } })?.response?.data?.message ??+ 'An error occurred while uploading the file.',+ );+ },+ });++ const startUpload = async (extendedFile: ExtendedFile) => {+ if (!endpoint) {+ setError('An error occurred while uploading the file: Endpoint is undefined');+ return;+ }++ const formData = new FormData();+ formData.append('file', extendedFile.file as File);+ formData.append('file_id', extendedFile.file_id);+ if (extendedFile.width) {+ formData.append('width', extendedFile.width?.toString());+ }+ if (extendedFile.height) {+ formData.append('height', extendedFile.height?.toString());+ }++ if (params?.additionalMetadata) {+ for (const [key, value] of Object.entries(params.additionalMetadata)) {+ formData.append(key, value);+ }+ }++ if (+ endpoint === EModelEndpoint.assistants &&+ !formData.get('assistant_id') &&+ conversation?.assistant_id+ ) {+ formData.append('assistant_id', conversation.assistant_id);+ formData.append('message_file', 'true');+ }++ formData.append('endpoint', endpoint);++ uploadFile.mutate(formData);+ };++ const validateFiles = (fileList: File[]) => {+ const existingFiles = Array.from(files.values());+ const incomingTotalSize = fileList.reduce((total, file) => total + file.size, 0);+ const currentTotalSize = existingFiles.reduce((total, file) => total + file.size, 0);++ if (fileList.length + files.size > fileLimit) {+ setError(`You can only upload up to ${fileLimit} files at a time.`);+ return false;+ }++ for (let i = 0; i < fileList.length; i++) {+ const originalFile = fileList[i];+ if (!checkType(originalFile.type, supportedMimeTypes)) {+ console.log(originalFile);+ setError('Currently, unsupported file type: ' + originalFile.type);+ return false;+ }++ if (originalFile.size >= fileSizeLimit) {+ setError(`File size exceeds ${fileSizeLimit / megabyte} MB.`);+ return false;+ }+ }++ if (currentTotalSize + incomingTotalSize > totalSizeLimit) {+ setError(`The total size of the files cannot exceed ${totalSizeLimit / megabyte} MB.`);+ return false;+ }++ const combinedFilesInfo = [+ ...existingFiles.map(+ (file) =>+ `${file.file?.name ?? file.filename}-${file.size}-${file.type?.split('/')[0] ?? 'file'}`,+ ),+ ...fileList.map((file) => `${file.name}-${file.size}-${file.type?.split('/')[0] ?? 'file'}`),+ ];++ const uniqueFilesSet = new Set(combinedFilesInfo);++ if (uniqueFilesSet.size !== combinedFilesInfo.length) {+ setError('Duplicate file detected.');+ return false;+ }++ return true;+ };++ const loadImage = (extendedFile: ExtendedFile, preview: string) => {+ const img = new Image();+ img.onload = async () => {+ extendedFile.width = img.width;+ extendedFile.height = img.height;+ extendedFile = {+ ...extendedFile,+ progress: 0.6,+ };+ replaceFile(extendedFile);++ await startUpload(extendedFile);+ URL.revokeObjectURL(preview);+ };+ img.src = preview;+ };++ const handleFiles = async (_files: FileList | File[]) => {+ const fileList = Array.from(_files);+ /* Validate files */+ let filesAreValid: boolean;+ try {+ filesAreValid = validateFiles(fileList);+ } catch (error) {+ console.error('file validation error', error);+ setError('An error occurred while validating the file.');+ return;+ }+ if (!filesAreValid) {+ setFilesLoading(false);+ return;+ }++ /* Process files */+ for (const originalFile of fileList) {+ const file_id = v4();+ try {+ const preview = URL.createObjectURL(originalFile);+ const extendedFile: ExtendedFile = {+ file_id,+ file: originalFile,+ type: originalFile.type,+ preview,+ progress: 0.2,+ size: originalFile.size,+ };++ addFile(extendedFile);++ if (originalFile.type?.split('/')[0] === 'image') {+ loadImage(extendedFile, preview);+ continue;+ }++ await startUpload(extendedFile);+ } catch (error) {+ deleteFileById(file_id);+ console.log('file handling error', error);+ setError('An error occurred while processing the file.');+ }+ }+ };++ const handleFileChange = (event: React.ChangeEvent<HTMLInputElement>) => {+ event.stopPropagation();+ if (event.target.files) {+ setFilesLoading(true);+ handleFiles(event.target.files);+ // reset the input+ event.target.value = '';+ }+ };++ return {+ handleFileChange,+ handleFiles,+ files,+ setFiles,+ };+};++export default useFileHandling;diff --git a/client/src/hooks/Files/useFileMap.ts b/client/src/hooks/Files/useFileMap.tsnew file mode 100644index 0000000000..8073c32403--- /dev/null+++ b/client/src/hooks/Files/useFileMap.ts@@ -0,0 +1,11 @@+import { useGetFiles } from '~/data-provider';+import { mapFiles } from '~/utils';++export default function useFileMap({ isAuthenticated }: { isAuthenticated: boolean }) {+ const { data: fileMap } = useGetFiles({+ select: mapFiles,+ enabled: isAuthenticated,+ });++ return fileMap;+}diff --git a/client/src/hooks/useSetFilesToDelete.ts b/client/src/hooks/Files/useSetFilesToDelete.tssimilarity index 100%rename from client/src/hooks/useSetFilesToDelete.tsrename to client/src/hooks/Files/useSetFilesToDelete.tsdiff --git a/client/src/hooks/Files/useUpdateFiles.ts b/client/src/hooks/Files/useUpdateFiles.tsnew file mode 100644index 0000000000..d5e103877e--- /dev/null+++ b/client/src/hooks/Files/useUpdateFiles.ts@@ -0,0 +1,72 @@+import type { ExtendedFile, FileSetter } from '~/common';+import useSetFilesToDelete from './useSetFilesToDelete';++export default function useUpdateFiles(setFiles: FileSetter) {+ const setFilesToDelete = useSetFilesToDelete();++ const addFile = (newFile: ExtendedFile) => {+ setFiles((currentFiles) => {+ const updatedFiles = new Map(currentFiles);+ updatedFiles.set(newFile.file_id, newFile);+ return updatedFiles;+ });+ };++ const replaceFile = (newFile: ExtendedFile) => {+ setFiles((currentFiles) => {+ const updatedFiles = new Map(currentFiles);+ updatedFiles.set(newFile.file_id, newFile);+ return updatedFiles;+ });+ };++ const updateFileById = (+ fileId: string,+ updates: Partial<ExtendedFile>,+ isAssistantFile?: boolean,+ ) => {+ setFiles((currentFiles) => {+ if (!currentFiles.has(fileId)) {+ console.warn(`File with id ${fileId} not found.`);+ return currentFiles;+ }++ const updatedFiles = new Map(currentFiles);+ const currentFile = updatedFiles.get(fileId);+ if (!currentFile) {+ console.warn(`File with id ${fileId} not found.`);+ return currentFiles;+ }+ updatedFiles.set(fileId, { ...currentFile, ...updates });++ if (updates['filepath'] && updates['progress'] !== 1 && !isAssistantFile) {+ const files = Object.fromEntries(updatedFiles);+ setFilesToDelete(files);+ }++ return updatedFiles;+ });+ };++ const deleteFileById = (fileId: string) => {+ setFiles((currentFiles) => {+ const updatedFiles = new Map(currentFiles);+ if (updatedFiles.has(fileId)) {+ updatedFiles.delete(fileId);+ } else {+ console.warn(`File with id ${fileId} not found.`);+ }++ const files = Object.fromEntries(updatedFiles);+ setFilesToDelete(files);+ return updatedFiles;+ });+ };++ return {+ addFile,+ replaceFile,+ updateFileById,+ deleteFileById,+ };+}diff --git a/client/src/hooks/Input/useTextarea.ts b/client/src/hooks/Input/useTextarea.tsindex 6705a8157b..e598d36aab 100644--- a/client/src/hooks/Input/useTextarea.ts+++ b/client/src/hooks/Input/useTextarea.ts@@ -1,15 +1,32 @@import debounce from 'lodash/debounce';import { useEffect, useRef } from 'react';-import { TEndpointOption } from 'librechat-data-provider';+import { EModelEndpoint } from 'librechat-data-provider';+import type { TEndpointOption } from 'librechat-data-provider';import type { KeyboardEvent } from 'react';+import { useAssistantsMapContext } from '~/Providers/AssistantsMapContext';import useGetSender from '~/hooks/Conversations/useGetSender';+import useFileHandling from '~/hooks/Files/useFileHandling';import { useChatContext } from '~/Providers/ChatContext';-import useFileHandling from '~/hooks/useFileHandling';import useLocalize from '~/hooks/useLocalize';type KeyEvent = KeyboardEvent<HTMLTextAreaElement>;+const getAssistantName = ({+ name,+ localize,+}: {+ name?: string;+ localize: (phraseKey: string, ...values: string[]) => string;+}) => {+ if (name && name.length > 0) {+ return name;+ } else {+ return localize('com_ui_assistant');+ }+};+export default function useTextarea({ setText, submitMessage, disabled = false }) {+ const assistantMap = useAssistantsMapContext();const { conversation, isSubmitting, latestMessage, setShowBingToneSetting, setFilesLoading } =useChatContext();const isComposing = useRef(false);@@ -18,10 +35,13 @@ export default function useTextarea({ setText, submitMessage, disabled = false }const getSender = useGetSender();const localize = useLocalize();- const { conversationId, jailbreak } = conversation || {};+ const { conversationId, jailbreak, endpoint = '', assistant_id } = conversation || {};const isNotAppendable = (latestMessage?.unfinished && !isSubmitting) || latestMessage?.error;// && (conversationId?.length ?? 0) > 6; // also ensures that we don't show the wrong placeholder+ const assistant = endpoint === EModelEndpoint.assistants && assistantMap?.[assistant_id ?? ''];+ const assistantName = (assistant && assistant?.name) || '';+// auto focus to input, when enter a conversation.useEffect(() => {if (!conversationId) {@@ -61,7 +81,10 @@ export default function useTextarea({ setText, submitMessage, disabled = false }return localize('com_endpoint_message_not_appendable');}- const sender = getSender(conversation as TEndpointOption);+ const sender =+ conversation?.endpoint === EModelEndpoint.assistants+ ? getAssistantName({ name: assistantName, localize })+ : getSender(conversation as TEndpointOption);return `${localize('com_endpoint_message')} ${sender ? sender : 'ChatGPT'}…`;};@@ -84,7 +107,7 @@ export default function useTextarea({ setText, submitMessage, disabled = false }debouncedSetPlaceholder();return () => debouncedSetPlaceholder.cancel();- }, [conversation, disabled, latestMessage, isNotAppendable, localize, getSender]);+ }, [conversation, disabled, latestMessage, isNotAppendable, localize, getSender, assistantName]);const handleKeyDown = (e: KeyEvent) => {if (e.key === 'Enter' && isSubmitting) {diff --git a/client/src/hooks/Messages/index.ts b/client/src/hooks/Messages/index.tsindex 26d8b2b2cc..0b2e20f808 100644--- a/client/src/hooks/Messages/index.ts+++ b/client/src/hooks/Messages/index.ts@@ -1,2 +1,3 @@+export { default as useProgress } from './useProgress';export { default as useMessageHelpers } from './useMessageHelpers';export { default as useMessageScrolling } from './useMessageScrolling';diff --git a/client/src/hooks/Messages/useMessageHelpers.ts b/client/src/hooks/Messages/useMessageHelpers.tsindex eaefdb9c17..47da795442 100644--- a/client/src/hooks/Messages/useMessageHelpers.ts+++ b/client/src/hooks/Messages/useMessageHelpers.ts@@ -1,14 +1,15 @@import copy from 'copy-to-clipboard';import { useEffect, useRef, useCallback } from 'react';+import { EModelEndpoint } from 'librechat-data-provider';import { useGetEndpointsQuery } from 'librechat-data-provider/react-query';import type { TMessage } from 'librechat-data-provider';import type { TMessageProps } from '~/common';+import { useChatContext, useAssistantsMapContext } from '~/Providers';import Icon from '~/components/Endpoints/Icon';-import { useChatContext } from '~/Providers';import { getEndpointField } from '~/utils';export default function useMessageHelpers(props: TMessageProps) {- const latestText = useRef('');+ const latestText = useRef<string | number>('');const { data: endpointsConfig } = useGetEndpointsQuery();const { message, currentEditId, setCurrentEditId } = props;@@ -22,21 +23,26 @@ export default function useMessageHelpers(props: TMessageProps) {handleContinue,setLatestMessage,} = useChatContext();+ const assistantMap = useAssistantsMapContext();const { text, children, messageId = null, isCreatedByUser } = message ?? {};const edit = messageId === currentEditId;const isLast = !children?.length;useEffect(() => {+ let contentChanged = message?.content+ ? message?.content?.length !== latestText.current+ : message?.text !== latestText.current;++ if (!isLast) {+ contentChanged = false;+ }+if (!message) {return;- } else if (- isLast &&- conversation?.conversationId !== 'new' &&- latestText.current !== message.text- ) {+ } else if (isLast && conversation?.conversationId !== 'new' && contentChanged) {setLatestMessage({ ...message });- latestText.current = message.text;+ latestText.current = message?.content ? message.content.length : message.text;}}, [isLast, message, setLatestMessage, conversation?.conversationId]);@@ -51,11 +57,17 @@ export default function useMessageHelpers(props: TMessageProps) {}}, [isSubmitting, setAbortScroll]);+ const assistant =+ conversation?.endpoint === EModelEndpoint.assistants && assistantMap?.[message?.model ?? ''];+const icon = Icon({...conversation,...(message as TMessage),- iconURL: getEndpointField(endpointsConfig, conversation?.endpoint, 'iconURL'),+ iconURL: !assistant+ ? getEndpointField(endpointsConfig, conversation?.endpoint, 'iconURL')+ : (assistant?.metadata?.avatar as string | undefined) ?? '',model: message?.model ?? conversation?.model,+ assistantName: assistant ? (assistant.name as string | undefined) : '',size: 28.8,});@@ -81,6 +93,7 @@ export default function useMessageHelpers(props: TMessageProps) {icon,edit,isLast,+ assistant,enterEdit,conversation,isSubmitting,diff --git a/client/src/hooks/Messages/useProgress.ts b/client/src/hooks/Messages/useProgress.tsnew file mode 100644index 0000000000..e8c6862e3c--- /dev/null+++ b/client/src/hooks/Messages/useProgress.ts@@ -0,0 +1,35 @@+import { useState, useEffect } from 'react';++export default function useProgress(initialProgress = 0.01) {+ const [progress, setProgress] = useState(initialProgress);++ useEffect(() => {+ let timeout: ReturnType<typeof setTimeout>;+ let timer: ReturnType<typeof setInterval>;+ if (initialProgress >= 1 && progress >= 1) {+ return;+ } else if (initialProgress >= 1 && progress < 1) {+ setProgress(0.99);+ timeout = setTimeout(() => {+ setProgress(1);+ }, 200);+ } else {+ timer = setInterval(() => {+ setProgress((prevProgress) => {+ if (prevProgress >= 1) {+ clearInterval(timer);+ return 1;+ }+ return Math.min(prevProgress + 0.007, 0.95);+ });+ }, 200);+ }++ return () => {+ clearInterval(timer);+ clearTimeout(timeout);+ };+ }, [progress, initialProgress]);++ return progress;+}diff --git a/client/src/hooks/Plugins/index.ts b/client/src/hooks/Plugins/index.tsnew file mode 100644index 0000000000..7b7268128b--- /dev/null+++ b/client/src/hooks/Plugins/index.ts@@ -0,0 +1 @@+export { default as usePluginDialogHelpers } from './usePluginDialogHelpers';diff --git a/client/src/hooks/Plugins/usePluginDialogHelpers.ts b/client/src/hooks/Plugins/usePluginDialogHelpers.tsnew file mode 100644index 0000000000..8d110f52ff--- /dev/null+++ b/client/src/hooks/Plugins/usePluginDialogHelpers.ts@@ -0,0 +1,79 @@+import { useState, useCallback } from 'react';+import type { TPlugin } from 'librechat-data-provider';++function usePluginDialogHelpers() {+ const [maxPage, setMaxPage] = useState(1);+ const [currentPage, setCurrentPage] = useState(1);+ const [itemsPerPage, setItemsPerPage] = useState(1);+ const [searchChanged, setSearchChanged] = useState(false);++ const [searchValue, setSearchValue] = useState('');+ const [error, setError] = useState<boolean>(false);+ const [errorMessage, setErrorMessage] = useState<string>('');+ const [showPluginAuthForm, setShowPluginAuthForm] = useState<boolean>(false);+ const [selectedPlugin, setSelectedPlugin] = useState<TPlugin | undefined>(undefined);++ const calculateColumns = (node: HTMLElement) => {+ const width = node.offsetWidth;+ let columns: number;+ if (width < 501) {+ setItemsPerPage(8);+ return;+ } else if (width < 640) {+ columns = 2;+ } else if (width < 1024) {+ columns = 3;+ } else {+ columns = 4;+ }+ setItemsPerPage(columns * 2); // 2 rows+ };++ const gridRef: (instance: HTMLDivElement | null) => void = useCallback(+ (node) => {+ if (node !== null) {+ if (itemsPerPage === 1) {+ calculateColumns(node);+ }+ const resizeObserver = new ResizeObserver(() => calculateColumns(node));+ resizeObserver.observe(node);+ }+ },+ [itemsPerPage],+ );++ const handleSearch = (e: React.ChangeEvent<HTMLInputElement>) => {+ setSearchValue(e.target.value);+ setSearchChanged(true);+ };++ const handleChangePage = (page: number) => {+ setCurrentPage(page);+ };++ return {+ maxPage,+ setMaxPage,+ currentPage,+ setCurrentPage,+ itemsPerPage,+ setItemsPerPage,+ searchChanged,+ setSearchChanged,+ searchValue,+ setSearchValue,+ gridRef,+ handleSearch,+ handleChangePage,+ error,+ setError,+ errorMessage,+ setErrorMessage,+ showPluginAuthForm,+ setShowPluginAuthForm,+ selectedPlugin,+ setSelectedPlugin,+ };+}++export default usePluginDialogHelpers;diff --git a/client/src/hooks/SSE/index.ts b/client/src/hooks/SSE/index.tsnew file mode 100644index 0000000000..12f2b5e5b2--- /dev/null+++ b/client/src/hooks/SSE/index.ts@@ -0,0 +1,2 @@+export { default as useSSE } from './useSSE';+export { default as useContentHandler } from './useContentHandler';diff --git a/client/src/hooks/SSE/useContentHandler.ts b/client/src/hooks/SSE/useContentHandler.tsnew file mode 100644index 0000000000..1d1b08a5a5--- /dev/null+++ b/client/src/hooks/SSE/useContentHandler.ts@@ -0,0 +1,68 @@+import { ContentTypes } from 'librechat-data-provider';+import type {+ TSubmission,+ TMessage,+ TContentData,+ ContentPart,+ TMessageContentParts,+} from 'librechat-data-provider';++type TUseContentHandler = {+ setMessages: (messages: TMessage[]) => void;+ getMessages: () => TMessage[] | undefined;+};++type TContentHandler = {+ data: TContentData;+ submission: TSubmission;+};++export default function useContentHandler({ setMessages, getMessages }: TUseContentHandler) {+ const messageMap = new Map<string, TMessage>();+ return ({ data, submission }: TContentHandler) => {+ const { type, messageId, thread_id, conversationId, index, stream } = data;++ const _messages = getMessages();+ const messages =+ _messages?.filter((m) => m.messageId !== messageId)?.map((msg) => ({ ...msg, thread_id })) ??+ [];+ const userMessage = messages[messages.length - 1];++ const { initialResponse } = submission;++ let response = messageMap.get(messageId);+ if (!response) {+ response = {+ ...initialResponse,+ parentMessageId: userMessage?.messageId,+ conversationId,+ messageId,+ thread_id,+ };+ messageMap.set(messageId, response);+ }++ // TODO: handle streaming for non-text+ const part: ContentPart =+ stream && data[ContentTypes.TEXT] ? { value: data[ContentTypes.TEXT] } : data[type];++ /* spreading the content array to avoid mutation */+ response.content = [...(response.content ?? [])];++ response.content[index] = { type, [type]: part } as TMessageContentParts;++ if (+ type !== ContentTypes.TEXT &&+ initialResponse.content &&+ ((response.content[response.content.length - 1].type === ContentTypes.TOOL_CALL &&+ response.content[response.content.length - 1][ContentTypes.TOOL_CALL].progress === 1) ||+ response.content[response.content.length - 1].type === ContentTypes.IMAGE_FILE)+ ) {+ response.content.push(initialResponse.content[0]);+ }++ response.content = response.content.filter((p) => p !== undefined);++ setMessages([...messages, response]);+ };+}diff --git a/client/src/hooks/useSSE.ts b/client/src/hooks/SSE/useSSE.tssimilarity index 66%rename from client/src/hooks/useSSE.tsrename to client/src/hooks/SSE/useSSE.tsindex a59f330454..2fd96b460b 100644--- a/client/src/hooks/useSSE.ts+++ b/client/src/hooks/SSE/useSSE.ts@@ -1,12 +1,14 @@import { v4 } from 'uuid';+import { useSetRecoilState } from 'recoil';+import { useEffect, useState } from 'react';import { useParams } from 'react-router-dom';import { useQueryClient } from '@tanstack/react-query';-import { useEffect, useState } from 'react';import {/* @ts-ignore */SSE,QueryKeys,EndpointURLs,+ Constants,createPayload,tPresetSchema,tMessageSchema,@@ -24,18 +26,31 @@ import type {} from 'librechat-data-provider';import { addConversation, deleteConversation, updateConversation } from '~/utils';import { useGenTitleMutation } from '~/data-provider';-import { useAuthContext } from './AuthContext';-import useChatHelpers from './useChatHelpers';-import useSetStorage from './useSetStorage';+import useContentHandler from './useContentHandler';+import { useAuthContext } from '../AuthContext';+import useChatHelpers from '../useChatHelpers';+import useSetStorage from '../useSetStorage';+import store from '~/store';type TResData = {plugin?: TResPlugin;final?: boolean;initial?: boolean;+ previousMessages?: TMessage[];requestMessage: TMessage;responseMessage: TMessage;conversation: TConversation;conversationId?: string;+ runMessages?: TMessage[];+};++type TSyncData = {+ sync: boolean;+ thread_id: string;+ messages?: TMessage[];+ requestMessage: TMessage;+ responseMessage: TMessage;+ conversationId: string;};export default function useSSE(submission: TSubmission | null, index = 0) {@@ -46,8 +61,17 @@ export default function useSSE(submission: TSubmission | null, index = 0) {const { conversationId: paramId } = useParams();const { token, isAuthenticated } = useAuthContext();const [completed, setCompleted] = useState(new Set());- const { setMessages, setConversation, setIsSubmitting, newConversation, resetLatestMessage } =- useChatHelpers(index, paramId);+ const setShowStopButton = useSetRecoilState(store.showStopButtonByIndex(index));++ const {+ setMessages,+ getMessages,+ setConversation,+ setIsSubmitting,+ newConversation,+ resetLatestMessage,+ } = useChatHelpers(index, paramId);+ const contentHandler = useContentHandler({ setMessages, getMessages });const { data: startupConfig } = useGetStartupConfig();const balanceQuery = useGetUserBalance({@@ -120,7 +144,7 @@ export default function useSSE(submission: TSubmission | null, index = 0) {}// refresh title- if (isNewConvo && requestMessage?.parentMessageId == '00000000-0000-0000-0000-000000000000') {+ if (isNewConvo && requestMessage?.parentMessageId === Constants.NO_PARENT) {setTimeout(() => {genTitle.mutate({ conversationId: convoUpdate.conversationId as string });}, 2500);@@ -139,6 +163,50 @@ export default function useSSE(submission: TSubmission | null, index = 0) {setIsSubmitting(false);};+ const syncHandler = (data: TSyncData, submission: TSubmission) => {+ const { conversationId, thread_id, responseMessage, requestMessage } = data;+ const { initialResponse, messages: _messages, message } = submission;++ const messages = _messages.filter((msg) => msg.messageId !== message.messageId);++ setMessages([+ ...messages,+ requestMessage,+ {+ ...initialResponse,+ ...responseMessage,+ },+ ]);++ let update = {} as TConversation;+ setConversation((prevState) => {+ update = tConvoUpdateSchema.parse({+ ...prevState,+ conversationId,+ thread_id,+ messages: [requestMessage.messageId, responseMessage.messageId],+ }) as TConversation;++ setStorage(update);+ return update;+ });++ queryClient.setQueryData<ConversationData>([QueryKeys.allConversations], (convoData) => {+ if (!convoData) {+ return convoData;+ }+ if (requestMessage.parentMessageId === Constants.NO_PARENT) {+ return addConversation(convoData, update);+ } else {+ return updateConversation(convoData, update);+ }+ });++ setShowStopButton(true);++ resetLatestMessage();+ };+const createdHandler = (data: TResData, submission: TSubmission) => {const { messages, message, initialResponse, isRegenerate = false } = submission;@@ -180,7 +248,7 @@ export default function useSSE(submission: TSubmission | null, index = 0) {if (!convoData) {return convoData;}- if (message.parentMessageId == '00000000-0000-0000-0000-000000000000') {+ if (message.parentMessageId === Constants.NO_PARENT) {return addConversation(convoData, update);} else {return updateConversation(convoData, update);@@ -190,15 +258,18 @@ export default function useSSE(submission: TSubmission | null, index = 0) {};const finalHandler = (data: TResData, submission: TSubmission) => {- const { requestMessage, responseMessage, conversation } = data;+ const { requestMessage, responseMessage, conversation, runMessages } = data;const { messages, conversation: submissionConvo, isRegenerate = false } = submission;+ setShowStopButton(false);setCompleted((prev) => new Set(prev.add(submission?.initialResponse?.messageId)));- // update the messages- if (isRegenerate) {+ // update the messages; if assistants endpoint, client doesn't receive responseMessage+ if (runMessages) {+ setMessages([...runMessages]);+ } else if (isRegenerate && responseMessage) {setMessages([...messages, responseMessage]);- } else {+ } else if (responseMessage) {setMessages([...messages, requestMessage, responseMessage]);}@@ -213,7 +284,7 @@ export default function useSSE(submission: TSubmission | null, index = 0) {}// refresh title- if (isNewConvo && requestMessage.parentMessageId == '00000000-0000-0000-0000-000000000000') {+ if (isNewConvo && requestMessage && requestMessage.parentMessageId === Constants.NO_PARENT) {setTimeout(() => {genTitle.mutate({ conversationId: conversation.conversationId as string });}, 2500);@@ -307,76 +378,84 @@ export default function useSSE(submission: TSubmission | null, index = 0) {return;};- const abortConversation = (conversationId = '', submission: TSubmission) => {+ const abortConversation = async (conversationId = '', submission: TSubmission) => {console.log(submission);+ let runAbortKey = '';+ try {+ const conversation = (JSON.parse(localStorage.getItem('lastConversationSetup') ?? '') ??+ {}) as TConversation;+ const { conversationId, messages } = conversation;+ runAbortKey = `${conversationId}:${messages?.[messages.length - 1]}`;+ } catch (error) {+ console.error('Error getting last conversation setup');+ console.error(error);+ }const { endpoint: _endpoint, endpointType } = submission?.conversation || {};const endpoint = endpointType ?? _endpoint;- let res: Response;+ try {+ const response = await fetch(`${EndpointURLs[endpoint ?? '']}/abort`, {+ method: 'POST',+ headers: {+ 'Content-Type': 'application/json',+ Authorization: `Bearer ${token}`,+ },+ body: JSON.stringify({+ abortKey: _endpoint === EModelEndpoint.assistants ? runAbortKey : conversationId,+ endpoint,+ }),+ });- fetch(`${EndpointURLs[endpoint ?? '']}/abort`, {- method: 'POST',- headers: {- 'Content-Type': 'application/json',- Authorization: `Bearer ${token}`,- },- body: JSON.stringify({- abortKey: conversationId,- }),- })- .then((response) => {- res = response;- // Check if the response is JSON- const contentType = response.headers.get('content-type');- if (contentType && contentType.includes('application/json')) {- return response.json();- } else if (response.status === 204) {- const responseMessage = {- ...submission.initialResponse,- };-- return {- requestMessage: submission.message,- responseMessage: responseMessage,- conversation: submission.conversation,- };- } else {- throw new Error(- 'Unexpected response from server; Status: ' + res.status + ' ' + res.statusText,- );- }- })- .then((data) => {+ // Check if the response is JSON+ const contentType = response.headers.get('content-type');+ if (contentType && contentType.includes('application/json')) {+ const data = await response.json();console.log('aborted', data);- if (res.status === 404) {- return setIsSubmitting(false);+ if (response.status === 404) {+ setIsSubmitting(false);+ return;}- cancelHandler(data, submission);- })- .catch((error) => {- console.error('Error aborting request');- console.error(error);- const convoId = conversationId ?? v4();-- const text =- submission.initialResponse?.text?.length > 45 ? submission.initialResponse?.text : '';-- const errorMessage = {- ...submission,+ if (data.final) {+ finalHandler(data, submission);+ } else {+ cancelHandler(data, submission);+ }+ } else if (response.status === 204) {+ const responseMessage = {...submission.initialResponse,- text: text ?? error.message ?? 'Error cancelling request',- unfinished: !!text.length,- error: true,};- const errorResponse = tMessageSchema.parse(errorMessage);- setMessages([...submission.messages, submission.message, errorResponse]);- newConversation({- template: { conversationId: convoId },- preset: tPresetSchema.parse(submission?.conversation),- });- setIsSubmitting(false);+ const data = {+ requestMessage: submission.message,+ responseMessage: responseMessage,+ conversation: submission.conversation,+ };+ console.log('aborted', data);+ } else {+ throw new Error(+ 'Unexpected response from server; Status: ' + response.status + ' ' + response.statusText,+ );+ }+ } catch (error) {+ console.error('Error cancelling request');+ console.error(error);+ const convoId = conversationId ?? v4();+ const text =+ submission.initialResponse?.text?.length > 45 ? submission.initialResponse?.text : '';+ const errorMessage = {+ ...submission,+ ...submission.initialResponse,+ text: text ?? (error as Error).message ?? 'Error cancelling request',+ unfinished: !!text.length,+ error: true,+ };+ const errorResponse = tMessageSchema.parse(errorMessage);+ setMessages([...submission.messages, submission.message, errorResponse]);+ newConversation({+ template: { conversationId: convoId },+ preset: tPresetSchema.parse(submission?.conversation),});- return;+ setIsSubmitting(false);+ }};useEffect(() => {@@ -391,10 +470,12 @@ export default function useSSE(submission: TSubmission | null, index = 0) {const payloadData = createPayload(submission);let { payload } = payloadData;- if (payload.endpoint === EModelEndpoint.assistant) {+ if (payload.endpoint === EModelEndpoint.assistants) {payload = removeNullishValues(payload);}+ let textIndex = null;+const events = new SSE(payloadData.server, {payload: JSON.stringify(payload),headers: { 'Content-Type': 'application/json', Authorization: `Bearer ${token}` },@@ -416,6 +497,16 @@ export default function useSSE(submission: TSubmission | null, index = 0) {overrideParentMessageId: message?.overrideParentMessageId,};createdHandler(data, { ...submission, message });+ } else if (data.sync) {+ /* synchronize messages to Assistants API as well as with real DB ID's */+ syncHandler(data, { ...submission, message });+ } else if (data.type) {+ const { text, index } = data;+ if (text && index !== textIndex) {+ textIndex = index;+ }++ contentHandler({ data, submission });} else {const text = data.text || data.response;const { plugin, plugins } = data;@@ -428,7 +519,7 @@ export default function useSSE(submission: TSubmission | null, index = 0) {events.onopen = () => console.log('connection is opened');- events.oncancel = () => {+ events.oncancel = async () => {const streamKey = submission?.initialResponse?.messageId;if (completed.has(streamKey)) {setIsSubmitting(false);@@ -440,7 +531,10 @@ export default function useSSE(submission: TSubmission | null, index = 0) {}setCompleted((prev) => new Set(prev.add(streamKey)));- return abortConversation(message?.conversationId ?? submission?.conversationId, submission);+ return await abortConversation(+ message?.conversationId ?? submission?.conversationId,+ submission,+ );};events.onerror = function (e: MessageEvent) {diff --git a/client/src/hooks/index.ts b/client/src/hooks/index.tsindex e4a60931be..ee6d8b2519 100644--- a/client/src/hooks/index.ts+++ b/client/src/hooks/index.ts@@ -1,14 +1,17 @@-export * from './Messages';+export * from './Assistants';export * from './Config';-export * from './Input';export * from './Conversations';export * from './Nav';+export * from './Files';+export * from './Input';+export * from './Messages';+export * from './Plugins';+export * from './SSE';export * from './AuthContext';export * from './ThemeContext';export * from './ScreenshotContext';export * from './ApiErrorBoundaryContext';-export { default as useSSE } from './useSSE';export { default as useToast } from './useToast';export { default as useTimeout } from './useTimeout';export { default as useNewConvo } from './useNewConvo';@@ -18,13 +21,11 @@ export { default as useSetOptions } from './useSetOptions';export { default as useSetStorage } from './useSetStorage';export { default as useChatHelpers } from './useChatHelpers';export { default as useGenerations } from './useGenerations';-export { default as useDragHelpers } from './useDragHelpers';export { default as useScrollToRef } from './useScrollToRef';export { default as useLocalStorage } from './useLocalStorage';export { default as useConversation } from './useConversation';export { default as useDefaultConvo } from './useDefaultConvo';export { default as useServerStream } from './useServerStream';-export { default as useFileHandling } from './useFileHandling';export { default as useConversations } from './useConversations';export { default as useDelayedRender } from './useDelayedRender';export { default as useOnClickOutside } from './useOnClickOutside';@@ -32,5 +33,4 @@ export { default as useMessageHandler } from './useMessageHandler';export { default as useOriginNavigate } from './useOriginNavigate';export { default as useNavigateToConvo } from './useNavigateToConvo';export { default as useSetIndexOptions } from './useSetIndexOptions';-export { default as useSetFilesToDelete } from './useSetFilesToDelete';export { default as useGenerationsByLatest } from './useGenerationsByLatest';diff --git a/client/src/hooks/useChatHelpers.ts b/client/src/hooks/useChatHelpers.tsindex c807669268..e9708f1a2b 100644--- a/client/src/hooks/useChatHelpers.ts+++ b/client/src/hooks/useChatHelpers.ts@@ -1,7 +1,13 @@import { v4 } from 'uuid';import { useCallback, useState } from 'react';import { useQueryClient } from '@tanstack/react-query';-import { QueryKeys, parseCompactConvo } from 'librechat-data-provider';+import {+ Constants,+ EModelEndpoint,+ QueryKeys,+ parseCompactConvo,+ ContentTypes,+} from 'librechat-data-provider';import { useRecoilState, useResetRecoilState, useSetRecoilState } from 'recoil';import { useGetMessagesByConvoId, useGetEndpointsQuery } from 'librechat-data-provider/react-query';import type {@@ -11,7 +17,7 @@ import type {TEndpointsConfig,} from 'librechat-data-provider';import type { TAskFunction } from '~/common';-import useSetFilesToDelete from './useSetFilesToDelete';+import useSetFilesToDelete from './Files/useSetFilesToDelete';import useGetSender from './Conversations/useGetSender';import { useAuthContext } from './AuthContext';import useUserKey from './Input/useUserKey';@@ -21,8 +27,8 @@ import store from '~/store';// this to be set somewhere elseexport default function useChatHelpers(index = 0, paramId: string | undefined) {const { data: endpointsConfig = {} as TEndpointsConfig } = useGetEndpointsQuery();+ const setShowStopButton = useSetRecoilState(store.showStopButtonByIndex(index));const [files, setFiles] = useRecoilState(store.filesByIndex(index));- const [showStopButton, setShowStopButton] = useState(true);const [filesLoading, setFilesLoading] = useState(false);const setFilesToDelete = useSetFilesToDelete();const getSender = useGetSender();@@ -93,7 +99,7 @@ export default function useChatHelpers(index = 0, paramId: string | undefined) {isEdited = false,} = {},) => {- setShowStopButton(true);+ setShowStopButton(false);if (!!isSubmitting || text === '') {return;}@@ -116,6 +122,26 @@ export default function useChatHelpers(index = 0, paramId: string | undefined) {const isEditOrContinue = isEdited || isContinued;+ let currentMessages: TMessage[] | null = getMessages() ?? [];++ // construct the query message+ // this is not a real messageId, it is used as placeholder before real messageId returned+ text = text.trim();+ const fakeMessageId = v4();+ parentMessageId = parentMessageId || latestMessage?.messageId || Constants.NO_PARENT;++ if (conversationId == 'new') {+ parentMessageId = Constants.NO_PARENT;+ currentMessages = [];+ conversationId = null;+ }++ const parentMessage = currentMessages?.find(+ (msg) => msg.messageId === latestMessage?.parentMessageId,+ );++ const thread_id = parentMessage?.thread_id ?? latestMessage?.thread_id;+// set the endpoint optionconst convo = parseCompactConvo({endpoint,@@ -130,23 +156,10 @@ export default function useChatHelpers(index = 0, paramId: string | undefined) {endpointType,modelDisplayLabel,key: getExpiry(),+ thread_id,} as TEndpointOption;const responseSender = getSender({ model: conversation?.model, ...endpointOption });- let currentMessages: TMessage[] | null = getMessages() ?? [];-- // construct the query message- // this is not a real messageId, it is used as placeholder before real messageId returned- text = text.trim();- const fakeMessageId = v4();- parentMessageId =- parentMessageId || latestMessage?.messageId || '00000000-0000-0000-0000-000000000000';-- if (conversationId == 'new') {- parentMessageId = '00000000-0000-0000-0000-000000000000';- currentMessages = [];- conversationId = null;- }const currentMsg: TMessage = {text,sender: 'User',@@ -154,12 +167,10 @@ export default function useChatHelpers(index = 0, paramId: string | undefined) {parentMessageId,conversationId,messageId: isContinued && messageId ? messageId : fakeMessageId,+ thread_id,error: false,};- const parentMessage = currentMessages?.find(- (msg) => msg.messageId === latestMessage?.parentMessageId,- );const reuseFiles = isRegenerate && parentMessage?.files;if (reuseFiles && parentMessage.files?.length) {currentMsg.files = parentMessage.files;@@ -188,6 +199,7 @@ export default function useChatHelpers(index = 0, paramId: string | undefined) {endpoint: endpoint ?? '',parentMessageId: isRegenerate ? messageId : fakeMessageId,messageId: responseMessageId ?? `${isRegenerate ? messageId : fakeMessageId}_`,+ thread_id,conversationId,unfinished: false,isCreatedByUser: false,@@ -195,6 +207,21 @@ export default function useChatHelpers(index = 0, paramId: string | undefined) {error: false,};+ if (endpoint === EModelEndpoint.assistants) {+ initialResponse.model = conversation?.assistant_id ?? '';+ initialResponse.text = '';+ initialResponse.content = [+ {+ type: ContentTypes.TEXT,+ [ContentTypes.TEXT]: {+ value: responseText,+ },+ },+ ];+ } else {+ setShowStopButton(true);+ }+if (isContinued) {currentMessages = currentMessages.filter((msg) => msg.messageId !== responseMessageId);}@@ -334,7 +361,5 @@ export default function useChatHelpers(index = 0, paramId: string | undefined) {setFiles,filesLoading,setFilesLoading,- showStopButton,- setShowStopButton,};}diff --git a/client/src/hooks/useDefaultConvo.ts b/client/src/hooks/useDefaultConvo.tsindex 59ff182d7a..b5833cb36b 100644--- a/client/src/hooks/useDefaultConvo.ts+++ b/client/src/hooks/useDefaultConvo.ts@@ -1,21 +1,25 @@-import { useRecoilValue } from 'recoil';-import { useGetEndpointsQuery } from 'librechat-data-provider/react-query';-import type { TConversation, TPreset, TEndpointsConfig } from 'librechat-data-provider';+import { useGetEndpointsQuery, useGetModelsQuery } from 'librechat-data-provider/react-query';+import type {+ TConversation,+ TPreset,+ TEndpointsConfig,+ TModelsConfig,+} from 'librechat-data-provider';import { getDefaultEndpoint, buildDefaultConvo } from '~/utils';-import store from '~/store';type TDefaultConvo = { conversation: Partial<TConversation>; preset?: Partial<TPreset> | null };const useDefaultConvo = () => {const { data: endpointsConfig = {} as TEndpointsConfig } = useGetEndpointsQuery();- const modelsConfig = useRecoilValue(store.modelsConfig);+ const { data: modelsConfig = {} as TModelsConfig } = useGetModelsQuery();const getDefaultConversation = ({ conversation, preset }: TDefaultConvo) => {const endpoint = getDefaultEndpoint({convoSetup: preset as TPreset,endpointsConfig,});- const models = modelsConfig?.[endpoint] || [];++ const models = modelsConfig[endpoint] || [];return buildDefaultConvo({conversation: conversation as TConversation,diff --git a/client/src/hooks/useFileHandling.ts b/client/src/hooks/useFileHandling.tsdeleted file mode 100644index bd6874336e..0000000000--- a/client/src/hooks/useFileHandling.ts+++ /dev/null@@ -1,278 +0,0 @@-import { v4 } from 'uuid';-import debounce from 'lodash/debounce';-import { QueryKeys } from 'librechat-data-provider';-import { useQueryClient } from '@tanstack/react-query';-import { useState, useEffect, useCallback } from 'react';-import type { TFile } from 'librechat-data-provider';-import type { ExtendedFile } from '~/common';-import { useToastContext } from '~/Providers/ToastContext';-import { useChatContext } from '~/Providers/ChatContext';-import { useUploadImageMutation } from '~/data-provider';-import useSetFilesToDelete from './useSetFilesToDelete';-import { NotificationSeverity } from '~/common';--const sizeMB = 20;-const maxSize = 25;-const fileLimit = 10;-const sizeLimit = sizeMB * 1024 * 1024; // 20 MB-const totalSizeLimit = maxSize * 1024 * 1024; // 25 MB-const supportedTypes = ['image/jpeg', 'image/jpg', 'image/png', 'image/webp'];--const useFileHandling = () => {- const queryClient = useQueryClient();- const { showToast } = useToastContext();- const [errors, setErrors] = useState<string[]>([]);- const setError = (error: string) => setErrors((prevErrors) => [...prevErrors, error]);- const { files, setFiles, setFilesLoading } = useChatContext();- const setFilesToDelete = useSetFilesToDelete();-- const displayToast = useCallback(() => {- if (errors.length > 1) {- const errorList = Array.from(new Set(errors))- .map((e, i) => `${i > 0 ? '• ' : ''}${e}\n`)- .join('');- showToast({- message: errorList,- severity: NotificationSeverity.ERROR,- duration: 5000,- });- } else if (errors.length === 1) {- showToast({- message: errors[0],- severity: NotificationSeverity.ERROR,- duration: 5000,- });- }-- setErrors([]);- }, [errors, showToast]);-- const debouncedDisplayToast = debounce(displayToast, 250);-- useEffect(() => {- if (errors.length > 0) {- debouncedDisplayToast();- }-- return () => debouncedDisplayToast.cancel();- }, [errors, debouncedDisplayToast]);-- const addFile = (newFile: ExtendedFile) => {- setFiles((currentFiles) => {- const updatedFiles = new Map(currentFiles);- updatedFiles.set(newFile.file_id, newFile);- return updatedFiles;- });- };-- const replaceFile = (newFile: ExtendedFile) => {- setFiles((currentFiles) => {- const updatedFiles = new Map(currentFiles);- updatedFiles.set(newFile.file_id, newFile);- return updatedFiles;- });- };-- const updateFileById = (fileId: string, updates: Partial<ExtendedFile>) => {- setFiles((currentFiles) => {- if (!currentFiles.has(fileId)) {- console.warn(`File with id ${fileId} not found.`);- return currentFiles;- }-- const updatedFiles = new Map(currentFiles);- const currentFile = updatedFiles.get(fileId);- if (!currentFile) {- console.warn(`File with id ${fileId} not found.`);- return currentFiles;- }- updatedFiles.set(fileId, { ...currentFile, ...updates });-- if (updates['filepath'] && updates['progress'] !== 1) {- const files = Object.fromEntries(updatedFiles);- setFilesToDelete(files);- }-- return updatedFiles;- });- };-- const deleteFileById = (fileId: string) => {- setFiles((currentFiles) => {- const updatedFiles = new Map(currentFiles);- if (updatedFiles.has(fileId)) {- updatedFiles.delete(fileId);- } else {- console.warn(`File with id ${fileId} not found.`);- }-- const files = Object.fromEntries(updatedFiles);- setFilesToDelete(files);- return updatedFiles;- });- };-- const uploadImage = useUploadImageMutation({- onSuccess: (data) => {- console.log('upload success', data);- updateFileById(data.temp_file_id, {- progress: 0.9,- filepath: data.filepath,- });-- const _files = queryClient.getQueryData<TFile[]>([QueryKeys.files]) ?? [];- queryClient.setQueryData([QueryKeys.files], [..._files, data]);-- setTimeout(() => {- updateFileById(data.temp_file_id, {- progress: 1,- file_id: data.file_id,- temp_file_id: data.temp_file_id,- filepath: data.filepath,- type: data.type,- height: data.height,- width: data.width,- filename: data.filename,- source: data.source,- });- }, 300);- },- onError: (error, body) => {- console.log('upload error', error);- deleteFileById(body.file_id);- setError('An error occurred while uploading the file.');- },- });-- const uploadFile = async (extendedFile: ExtendedFile) => {- const formData = new FormData();- formData.append('file', extendedFile.file);- formData.append('file_id', extendedFile.file_id);- if (extendedFile.width) {- formData.append('width', extendedFile.width?.toString());- }- if (extendedFile.height) {- formData.append('height', extendedFile.height?.toString());- }-- uploadImage.mutate({ formData, file_id: extendedFile.file_id });- };-- const validateFiles = (fileList: File[]) => {- const existingFiles = Array.from(files.values());- const incomingTotalSize = fileList.reduce((total, file) => total + file.size, 0);- const currentTotalSize = existingFiles.reduce((total, file) => total + file.size, 0);-- if (fileList.length + files.size > fileLimit) {- setError(`You can only upload up to ${fileLimit} files at a time.`);- return false;- }-- for (let i = 0; i < fileList.length; i++) {- const originalFile = fileList[i];- if (!supportedTypes.includes(originalFile.type)) {- setError('Currently, only JPEG, JPG, PNG, and WEBP files are supported.');- return false;- }-- if (originalFile.size >= sizeLimit) {- setError(`File size exceeds ${sizeMB} MB.`);- return false;- }- }-- if (currentTotalSize + incomingTotalSize > totalSizeLimit) {- setError(`The total size of the files cannot exceed ${maxSize} MB.`);- return false;- }-- const combinedFilesInfo = [- ...existingFiles.map(- (file) => `${file.file.name}-${file.size}-${file.type?.split('/')[0] ?? 'file'}`,- ),- ...fileList.map((file) => `${file.name}-${file.size}-${file.type?.split('/')[0] ?? 'file'}`),- ];-- const uniqueFilesSet = new Set(combinedFilesInfo);-- if (uniqueFilesSet.size !== combinedFilesInfo.length) {- setError('Duplicate file detected.');- return false;- }-- return true;- };-- const handleFiles = async (_files: FileList | File[]) => {- const fileList = Array.from(_files);- /* Validate files */- let filesAreValid: boolean;- try {- filesAreValid = validateFiles(fileList);- } catch (error) {- console.error('file validation error', error);- setError('An error occurred while validating the file.');- return;- }- if (!filesAreValid) {- setFilesLoading(false);- return;- }-- /* Process files */- fileList.forEach((originalFile) => {- const file_id = v4();- try {- const preview = URL.createObjectURL(originalFile);- let extendedFile: ExtendedFile = {- file_id,- file: originalFile,- preview,- progress: 0.2,- size: originalFile.size,- };-- addFile(extendedFile);-- // async processing- const img = new Image();- img.onload = async () => {- extendedFile.width = img.width;- extendedFile.height = img.height;- extendedFile = {- ...extendedFile,- progress: 0.6,- };- replaceFile(extendedFile);-- await uploadFile(extendedFile);- URL.revokeObjectURL(preview);- };- img.src = preview;- } catch (error) {- deleteFileById(file_id);- console.log('file handling error', error);- setError('An error occurred while processing the file.');- }- });- };-- const handleFileChange = (event: React.ChangeEvent<HTMLInputElement>) => {- event.stopPropagation();- if (event.target.files) {- setFilesLoading(true);- handleFiles(event.target.files);- // reset the input- event.target.value = '';- }- };-- return {- handleFileChange,- handleFiles,- files,- setFiles,- };-};--export default useFileHandling;diff --git a/client/src/hooks/useFileHandlingResize.ts b/client/src/hooks/useFileHandlingResize.tsdeleted file mode 100644index f6cb498866..0000000000--- a/client/src/hooks/useFileHandlingResize.ts+++ /dev/null@@ -1,209 +0,0 @@-import { v4 } from 'uuid';-// import { useState } from 'react';-import ImageBlobReduce from 'image-blob-reduce';-import type { ExtendedFile } from '~/common';-import { useUploadImageMutation } from '~/data-provider';-import { useChatContext } from '~/Providers/ChatContext';--const reducer = new ImageBlobReduce();-const resolution = 'high';--const useFileHandling = () => {- // const [errors, setErrors] = useState<unknown[]>([]);- const { files, setFiles, setFilesLoading } = useChatContext();-- const addFile = (newFile: ExtendedFile) => {- setFiles((currentFiles) => {- const updatedFiles = new Map(currentFiles);- updatedFiles.set(newFile.file_id, newFile);- return updatedFiles;- });- };-- const replaceFile = (newFile: ExtendedFile) => {- setFiles((currentFiles) => {- const updatedFiles = new Map(currentFiles);- updatedFiles.set(newFile.file_id, newFile);- return updatedFiles;- });- };-- const updateFileById = (fileId: string, updates: Partial<ExtendedFile>) => {- setFiles((currentFiles) => {- if (!currentFiles.has(fileId)) {- console.warn(`File with id ${fileId} not found.`);- return currentFiles;- }-- const updatedFiles = new Map(currentFiles);- const currentFile = updatedFiles.get(fileId);- updatedFiles.set(fileId, { ...currentFile, ...updates });-- return updatedFiles;- });- };-- // const deleteFile = (fileId: string) => {- // setFiles((currentFiles) => {- // const updatedFiles = new Map(currentFiles);- // updatedFiles.delete(fileId);- // return updatedFiles;- // });- // };-- const deleteFileById = (fileId: string) => {- setFiles((currentFiles) => {- const updatedFiles = new Map(currentFiles);- if (updatedFiles.has(fileId)) {- updatedFiles.delete(fileId);- } else {- console.warn(`File with id ${fileId} not found.`);- }- return updatedFiles;- });- };-- const uploadImage = useUploadImageMutation({- onSuccess: (data) => {- console.log('upload success', data);- updateFileById(data.temp_file_id, {- progress: 0.9,- filepath: data.filepath,- });-- setTimeout(() => {- updateFileById(data.temp_file_id, {- progress: 1,- filepath: data.filepath,- });- }, 300);- },- onError: (error, body) => {- console.log('upload error', error);- deleteFileById(body.file_id);- },- });-- const uploadFile = async (extendedFile: ExtendedFile) => {- const formData = new FormData();- formData.append('file', extendedFile.file);- formData.append('file_id', extendedFile.file_id);- if (extendedFile.width) {- formData.append('width', extendedFile.width?.toString());- }- if (extendedFile.height) {- formData.append('height', extendedFile.height?.toString());- }-- uploadImage.mutate({ formData, file_id: extendedFile.file_id });- };-- const handleFiles = async (files: FileList | File[]) => {- Array.from(files).forEach((originalFile) => {- if (!originalFile.type.startsWith('image/')) {- // TODO: showToast('Only image files are supported');- // TODO: handle other file types- return;- }-- // todo: Set File is loading-- try {- const preview = URL.createObjectURL(originalFile);- let extendedFile: ExtendedFile = {- file_id: v4(),- file: originalFile,- preview,- progress: 0.2,- };-- addFile(extendedFile);-- // async processing-- const img = new Image();- img.onload = async () => {- extendedFile.width = img.width;- extendedFile.height = img.height;-- let max = 512;-- if (resolution === 'high') {- max = extendedFile.height > extendedFile.width ? 768 : 2000;- }-- const reducedBlob = await reducer.toBlob(originalFile, {- max,- });-- const resizedFile = new File([reducedBlob], originalFile.name, {- type: originalFile.type,- });-- const resizedPreview = URL.createObjectURL(resizedFile);- extendedFile = {- ...extendedFile,- file: resizedFile,- };-- const resizedImg = new Image();- resizedImg.onload = async () => {- extendedFile = {- ...extendedFile,- file: resizedFile,- width: resizedImg.width,- height: resizedImg.height,- progress: 0.6,- };-- replaceFile(extendedFile);- URL.revokeObjectURL(resizedPreview); // Clean up the object URL- await uploadFile(extendedFile);- };- resizedImg.src = resizedPreview;- URL.revokeObjectURL(preview); // Clean up the original object URL-- /* TODO: send to backend server /api/files- use React Query Mutation to upload file (TypeScript), we need to make the CommonJS api endpoint (expressjs) to accept file upload- server needs the image file, which the server will convert to base64 to send to external API- server will then employ a 'saving' or 'caching' strategy based on admin configuration (can be local, CDN, etc.)- the expressjs server needs the following:-- name,- size,- type,- width,- height,-- use onSuccess, onMutate handlers to update the file progress-- we need the full api handling for this, including the server-side-- */- };- img.src = preview;- } catch (error) {- console.log('file handling error', error);- }- });- };-- const handleFileChange = (event: React.ChangeEvent<HTMLInputElement>) => {- event.stopPropagation();- if (event.target.files) {- setFilesLoading(true);- handleFiles(event.target.files);- // reset the input- event.target.value = '';- }- };-- return {- handleFileChange,- handleFiles,- files,- setFiles,- };-};--export default useFileHandling;diff --git a/client/src/hooks/useGenerations.ts b/client/src/hooks/useGenerations.tsindex 1a6e708691..f0744256ab 100644--- a/client/src/hooks/useGenerations.ts+++ b/client/src/hooks/useGenerations.ts@@ -24,7 +24,7 @@ export default function useGenerations({const isEditableEndpoint = !![EModelEndpoint.openAI,EModelEndpoint.google,- EModelEndpoint.assistant,+ EModelEndpoint.assistants,EModelEndpoint.anthropic,EModelEndpoint.gptPlugins,EModelEndpoint.azureOpenAI,diff --git a/client/src/hooks/useGenerationsByLatest.ts b/client/src/hooks/useGenerationsByLatest.tsindex 4fe91ca096..d0d59e7acb 100644--- a/client/src/hooks/useGenerationsByLatest.ts+++ b/client/src/hooks/useGenerationsByLatest.ts@@ -21,7 +21,7 @@ export default function useGenerationsByLatest({EModelEndpoint.openAI,EModelEndpoint.custom,EModelEndpoint.google,- EModelEndpoint.assistant,+ EModelEndpoint.assistants,EModelEndpoint.anthropic,EModelEndpoint.gptPlugins,EModelEndpoint.azureOpenAI,diff --git a/client/src/hooks/useNewConvo.ts b/client/src/hooks/useNewConvo.tsindex 7c4111869f..a7c12c21c8 100644--- a/client/src/hooks/useNewConvo.ts+++ b/client/src/hooks/useNewConvo.ts@@ -1,5 +1,5 @@import { useCallback } from 'react';-import { FileSources } from 'librechat-data-provider';+import { EModelEndpoint, FileSources, defaultOrderQuery } from 'librechat-data-provider';import { useGetEndpointsQuery } from 'librechat-data-provider/react-query';import {useSetRecoilState,@@ -16,7 +16,7 @@ import type {TEndpointsConfig,} from 'librechat-data-provider';import { buildDefaultConvo, getDefaultEndpoint, getEndpointField } from '~/utils';-import { useDeleteFilesMutation } from '~/data-provider';+import { useDeleteFilesMutation, useListAssistantsQuery } from '~/data-provider';import useOriginNavigate from './useOriginNavigate';import useSetStorage from './useSetStorage';import store from '~/store';@@ -31,6 +31,10 @@ const useNewConvo = (index = 0) => {const resetLatestMessage = useResetRecoilState(store.latestMessageFamily(index));const { data: endpointsConfig = {} as TEndpointsConfig } = useGetEndpointsQuery();+ const { data: assistants = [] } = useListAssistantsQuery(defaultOrderQuery, {+ select: (res) => res.data.map(({ id, name, metadata }) => ({ id, name, metadata })),+ });+const { mutateAsync } = useDeleteFilesMutation({onSuccess: () => {console.log('Files deleted');@@ -44,7 +48,7 @@ const useNewConvo = (index = 0) => {({ snapshot }) =>async (conversation: TConversation,- preset: TPreset | null = null,+ preset: Partial<TPreset> | null = null,modelsData?: TModelsConfig,buildDefault?: boolean,keepLatestMessage?: boolean,@@ -75,6 +79,12 @@ const useNewConvo = (index = 0) => {conversation.endpointType = endpointType;}+ if (!conversation.assistant_id && defaultEndpoint === EModelEndpoint.assistants) {+ const assistant_id =+ localStorage.getItem(`assistant_id__${index}`) ?? assistants[0]?.id;+ conversation.assistant_id = assistant_id;+ }+const models = modelsConfig?.[defaultEndpoint] ?? [];conversation = buildDefaultConvo({conversation,@@ -99,7 +109,7 @@ const useNewConvo = (index = 0) => {navigate('new');}},- [endpointsConfig, defaultPreset],+ [endpointsConfig, defaultPreset, assistants],);const newConversation = useCallback(@@ -111,7 +121,7 @@ const useNewConvo = (index = 0) => {keepLatestMessage = false,}: {template?: Partial<TConversation>;- preset?: TPreset;+ preset?: Partial<TPreset>;modelsData?: TModelsConfig;buildDefault?: boolean;keepLatestMessage?: boolean;diff --git a/client/src/hooks/useSetIndexOptions.ts b/client/src/hooks/useSetIndexOptions.tsindex 26d49556f8..24520348c9 100644--- a/client/src/hooks/useSetIndexOptions.ts+++ b/client/src/hooks/useSetIndexOptions.ts@@ -14,7 +14,7 @@ import store from '~/store';type TUseSetOptions = (preset?: TPreset | boolean | null) => TSetOptionsPayload;-const useSetOptions: TUseSetOptions = (preset = false) => {+const useSetIndexOptions: TUseSetOptions = (preset = false) => {const setShowPluginStoreDialog = useSetRecoilState(store.showPluginStoreDialog);const availableTools = useRecoilValue(store.availableTools);const { conversation, setConversation } = useChatContext();@@ -40,6 +40,12 @@ const useSetOptions: TUseSetOptions = (preset = false) => {setLastModel(lastModelUpdate);} else if (param === 'jailbreak' && endpoint) {setLastBingSettings({ ...lastBingSettings, jailbreak: newValue });+ } else if (param === 'presetOverride') {+ const currentOverride = conversation?.presetOverride || {};+ update['presetOverride'] = {+ ...currentOverride,+ ...(newValue as unknown as Partial<TPreset>),+ };}setConversation(@@ -133,7 +139,7 @@ const useSetOptions: TUseSetOptions = (preset = false) => {);};- const setTools: (newValue: string) => void = (newValue) => {+ const setTools: (newValue: string, remove?: boolean) => void = (newValue, remove) => {if (newValue === 'pluginStore') {setShowPluginStoreDialog(true);return;@@ -144,7 +150,7 @@ const useSetOptions: TUseSetOptions = (preset = false) => {const isSelected = checkPluginSelection(newValue);const tool =availableTools[availableTools.findIndex((el: TPlugin) => el.pluginKey === newValue)];- if (isSelected) {+ if (isSelected || remove) {update['tools'] = current.filter((el) => el.pluginKey !== newValue);} else {update['tools'] = [...current, tool];@@ -171,4 +177,4 @@ const useSetOptions: TUseSetOptions = (preset = false) => {};};-export default useSetOptions;+export default useSetIndexOptions;diff --git a/client/src/localization/languages/Eng.tsx b/client/src/localization/languages/Eng.tsxindex b0a8111f16..a5770657ee 100644--- a/client/src/localization/languages/Eng.tsx+++ b/client/src/localization/languages/Eng.tsx@@ -3,6 +3,33 @@// file deepcode ignore HardcodedNonCryptoSecret: No hardcoded secrets present in this fileexport default {+ com_sidepanel_select_assistant: 'Select an Assistant',+ com_sidepanel_assistant_builder: 'Assistant Builder',+ com_sidepanel_attach_files: 'Attach Files',+ com_assistants_knowledge: 'Knowledge',+ com_assistants_knowledge_info:+ 'If you upload files under Knowledge, conversations with your Assistant may include file contents.',+ com_assistants_knowledge_disabled:+ 'Assistant must be created, and Code Interpreter or Retrieval must be enabled and saved before uploading files as Knowledge.',+ com_assistants_code_interpreter: 'Code Interpreter',+ com_assistants_code_interpreter_files:+ 'The following files are only available for Code Interpreter:',+ com_assistants_retrieval: 'Retrieval',+ com_assistants_tools_section: 'Actions, Tools',+ com_assistants_add_tools: 'Add Tools',+ com_assistants_add_actions: 'Add Actions',+ com_assistants_name_placeholder: 'Optional: The name of the assistant',+ com_assistants_instructions_placeholder: 'The system instructions that the assistant uses',+ com_assistants_description_placeholder: 'Optional: Describe your Assistant here',+ com_assistants_actions_disabled: 'You need to create an assistant before adding actions.',+ com_assistants_update_success: 'Successfully updated',+ com_assistants_update_error: 'There was an error updating your assistant.',+ com_assistants_create_success: 'Successfully created',+ com_assistants_create_error: 'There was an error creating your assistant.',+ com_ui_attach_error_type: 'Unsupported file type for endpoint:',+ com_ui_attach_error_size: 'File size limit exceeded for endpoint:',+ com_ui_attach_error:+ 'Cannot attach file. Create or select a conversation, or try refreshing the page.',com_ui_examples: 'Examples',com_ui_new_chat: 'New Chat',com_ui_happy_birthday: 'It\'s my 1st birthday!',@@ -19,6 +46,11 @@ export default {'May occasionally produce harmful instructions or biased content',com_ui_limitation_limited_2021: 'Limited knowledge of world and events after 2021',com_ui_experimental: 'Experimental Features',+ com_ui_name: 'Name',+ com_ui_instructions: 'Instructions',+ com_ui_description: 'Description',+ com_ui_error: 'Error',+ com_ui_select: 'Select',com_ui_input: 'Input',com_ui_close: 'Close',com_ui_model: 'Model',@@ -27,6 +59,7 @@ export default {com_ui_prev: 'Prev',com_ui_next: 'Next',com_ui_stop: 'Stop',+ com_ui_upload_files: 'Upload files',com_ui_prompt_templates: 'Prompt Templates',com_ui_hide_prompt_templates: 'Hide Prompt Templates',com_ui_showing: 'Showing',@@ -55,9 +88,13 @@ export default {com_ui_revoke_info: 'Revoke all user provided credentials',com_ui_confirm_action: 'Confirm Action',com_ui_chats: 'chats',+ com_ui_assistant: 'Assistant',com_ui_delete: 'Delete',+ com_ui_create: 'Create',com_ui_delete_conversation: 'Delete chat?',com_ui_delete_conversation_confirm: 'This will delete',+ com_ui_delete_assistant_confirm:+ 'Are you sure you want to delete this Assistant? This cannot be undone.',com_ui_preview: 'Preview',com_ui_upload: 'Upload',com_ui_connect: 'Connect',@@ -150,8 +187,14 @@ export default {' Maximum number of tokens that can be generated in the response. Specify a lower value for shorter responses and a higher value for longer responses.',com_endpoint_google_custom_name_placeholder: 'Set a custom name for Google',com_endpoint_prompt_prefix_placeholder: 'Set custom instructions or context. Ignored if empty.',+ com_endpoint_instructions_assistants_placeholder:+ 'Overrides the instructions of the assistant. This is useful for modifying the behavior on a per-run basis.',+ com_endpoint_prompt_prefix_assistants_placeholder:+ 'Set additional instructions or context on top of the Assistant\'s main instructions. Ignored if empty.',com_endpoint_custom_name: 'Custom Name',- com_endpoint_prompt_prefix: 'Prompt Prefix',+ com_endpoint_prompt_prefix: 'Custom Instructions',+ com_endpoint_prompt_prefix_assistants: 'Additional Instructions',+ com_endpoint_instructions_assistants: 'Override Instructions',com_endpoint_temperature: 'Temperature',com_endpoint_default: 'default',com_endpoint_top_p: 'Top P',@@ -220,8 +263,10 @@ export default {com_endpoint_completion: 'Completion',com_endpoint_agent: 'Agent',com_endpoint_show_what_settings: 'Show {0} Settings',- com_endpoint_save: 'Save',com_endpoint_export: 'Export',+ com_endpoint_assistant: 'Assistant',+ com_endpoint_use_active_assistant: 'Use Active Assistant',+ com_endpoint_assistant_model: 'Assistant Model',com_endpoint_save_as_preset: 'Save As Preset',com_endpoint_presets_clear_warning:'Are you sure you want to clear all presets? This is irreversible.',@@ -270,16 +315,24 @@ export default {'Make sure to click \'Create and Continue\' to give at least the \'Vertex AI User\' role. Lastly, create a JSON key to import here.',com_nav_welcome_message: 'How can I help you today?',com_nav_auto_scroll: 'Auto-scroll to Newest on Open',+ com_nav_hide_panel: 'Hide Right-most Side Panel',com_nav_modular_chat: 'Enable switching Endpoints mid-conversation',com_nav_latex_parsing: 'Parsing LaTeX in messages (may affect performance)',com_nav_profile_picture: 'Profile Picture',com_nav_change_picture: 'Change picture',com_nav_plugin_store: 'Plugin store',+ com_nav_plugin_install: 'Install',+ com_nav_plugin_uninstall: 'Uninstall',+ com_nav_tool_add: 'Add',+ com_nav_tool_remove: 'Remove',+ com_nav_tool_dialog: 'Assistant Tools',+ com_nav_tool_dialog_description: 'Assistant must be saved to persist tool selections.',com_show_agent_settings: 'Show Agent Settings',com_show_completion_settings: 'Show Completion Settings',com_hide_examples: 'Hide Examples',com_show_examples: 'Show Examples',com_nav_plugin_search: 'Search plugins',+ com_nav_tool_search: 'Search tools',com_nav_plugin_auth_error:'There was an error attempting to authenticate this plugin. Please try again.',com_nav_export_filename: 'Filename',diff --git a/client/src/localization/languages/Sv.tsx b/client/src/localization/languages/Sv.tsxindex 2b016a598c..932f70466b 100644--- a/client/src/localization/languages/Sv.tsx+++ b/client/src/localization/languages/Sv.tsx@@ -134,7 +134,7 @@ export default {com_endpoint_prompt_prefix_placeholder:'Ange anpassade instruktioner eller kontext. Ignoreras om tom.', // Set custom instructions or context. Ignored if empty.com_endpoint_custom_name: 'Anpassat namn', // Custom Name- com_endpoint_prompt_prefix: 'Uppmaningsprefix', // Prompt Prefix+ com_endpoint_prompt_prefix: 'Uppmaningsprefix', // Custom Instructionscom_endpoint_temperature: 'Temperatur', // Temperaturecom_endpoint_default: 'standard', // defaultcom_endpoint_top_p: 'Top P', // Top Pdiff --git a/client/src/mobile.css b/client/src/mobile.cssindex 1643d305f2..62b4c72bce 100644--- a/client/src/mobile.css+++ b/client/src/mobile.css@@ -129,4 +129,56 @@border-radius: 50%;height: 100px;width: 100px;-}\ No newline at end of file+}++@media (max-width: 767px) {+ .sidenav {+ /* width: calc(100% - 10px) ; */+ transition: all 0.15s;+ position: fixed;+ z-index: 66;+ top: 0;+ max-width: 320px;++ /* max-width: 260px; */++ bottom: 0;+ right: 0+ /* opacity: 0; */+ }+ .sidenav-mask {+ position: fixed;+ z-index: 65;+ left: 0;+ right: 0;+ top: 0;+ bottom: 0;+ background-color: rgba(86, 88, 105, 0.75);+ padding-left: 420px;+ padding-top: 12px;+ opacity: 0;+ transition: all 0.5s;+ pointer-events: none;+ }++ .sidenav-mask.active {+ opacity: 1;+ pointer-events: auto;+ }++ .sidenav.active {+ position: fixed;+ }+}++@keyframes tuning {+ 0% { transform: rotate(30deg); }+ 25% { transform: rotate(110deg); }+ 50% { transform: rotate(-40deg); }+ 75% { transform: rotate(80deg) }+ 100% { transform: rotate(30deg) }+}++.rotate {+ animation: tuning 2.1s 1;+}diff --git a/client/src/routes/AssistantsRoute.tsx b/client/src/routes/AssistantsRoute.tsxdeleted file mode 100644index e323a2e5cf..0000000000--- a/client/src/routes/AssistantsRoute.tsx+++ /dev/null@@ -1,41 +0,0 @@-import { useParams } from 'react-router-dom';-import { useGetMessagesByConvoId } from 'librechat-data-provider/react-query';-import ChatView from '~/components/Chat/SingleChatView';-import useAuthRedirect from './useAuthRedirect';-import { buildTree } from '~/utils';-import store from '~/store';--export default function AssistantsRoute() {- const index = 0;- const { conversationId } = useParams();- const { conversation } = store.useCreateConversationAtom(index);-- const { data: messagesTree = null } = useGetMessagesByConvoId(conversationId ?? '', {- enabled: !!(conversationId && conversationId !== 'new'),- select: (data) => {- const dataTree = buildTree(data, false);- return dataTree?.length === 0 ? null : dataTree ?? null;- },- });-- const { isAuthenticated } = useAuthRedirect();-- if (!isAuthenticated) {- return null;- }-- // if not a conversation- if (conversation?.conversationId === 'search') {- return null;- }- // if conversationId not match- if (conversation?.conversationId !== conversationId && !conversation) {- return null;- }- // if conversationId is null- if (!conversationId) {- return null;- }-- return <ChatView index={index} messagesTree={messagesTree} />;-}diff --git a/client/src/routes/Root.tsx b/client/src/routes/Root.tsxindex 59847b7c77..5b2fefd563 100644--- a/client/src/routes/Root.tsx+++ b/client/src/routes/Root.tsx@@ -4,9 +4,15 @@ import { Outlet, useLocation } from 'react-router-dom';import { useRecoilValue, useSetRecoilState } from 'recoil';import { useGetModelsQuery, useGetSearchEnabledQuery } from 'librechat-data-provider/react-query';import type { ContextType } from '~/common';-import { useAuthContext, useServerStream, useConversation } from '~/hooks';+import {+ useAuthContext,+ useServerStream,+ useConversation,+ useAssistantsMap,+ useFileMap,+} from '~/hooks';+import { AssistantsMapContext, FileMapContext } from '~/Providers';import { Nav, MobileNav } from '~/components/Nav';-import { useGetFiles } from '~/data-provider';import store from '~/store';export default function Root() {@@ -25,7 +31,8 @@ export default function Root() {const setIsSearchEnabled = useSetRecoilState(store.isSearchEnabled);const setModelsConfig = useSetRecoilState(store.modelsConfig);- useGetFiles({ enabled: isAuthenticated });+ const fileMap = useFileMap({ isAuthenticated });+ const assistantsMap = useAssistantsMap({ isAuthenticated });const searchEnabledQuery = useGetSearchEnabledQuery({ enabled: isAuthenticated });const modelsQuery = useGetModelsQuery({ enabled: isAuthenticated && modelsQueryEnabled });@@ -58,16 +65,18 @@ export default function Root() {}return (- <>- <div className="flex h-dvh">- <div className="relative z-0 flex h-full w-full overflow-hidden">- <Nav navVisible={navVisible} setNavVisible={setNavVisible} />- <div className="relative flex h-full max-w-full flex-1 flex-col overflow-hidden">- <MobileNav setNavVisible={setNavVisible} />- <Outlet context={{ navVisible, setNavVisible } satisfies ContextType} />+ <FileMapContext.Provider value={fileMap}>+ <AssistantsMapContext.Provider value={assistantsMap}>+ <div className="flex h-dvh">+ <div className="relative z-0 flex h-full w-full overflow-hidden">+ <Nav navVisible={navVisible} setNavVisible={setNavVisible} />+ <div className="relative flex h-full max-w-full flex-1 flex-col overflow-hidden">+ <MobileNav setNavVisible={setNavVisible} />+ <Outlet context={{ navVisible, setNavVisible } satisfies ContextType} />+ </div></div></div>- </div>- </>+ </AssistantsMapContext.Provider>+ </FileMapContext.Provider>);}diff --git a/client/src/routes/index.tsx b/client/src/routes/index.tsxindex 666b62ac04..0f2e19965e 100644--- a/client/src/routes/index.tsx+++ b/client/src/routes/index.tsx@@ -2,7 +2,6 @@ import { createBrowserRouter, Navigate, Outlet } from 'react-router-dom';import Root from './Root';import Chat from './Chat';import ChatRoute from './ChatRoute';-import AssistantsRoute from './AssistantsRoute';import Search from './Search';import {Login,@@ -56,10 +55,6 @@ export const router = createBrowserRouter([path: 'chat/:conversationId?',element: <Chat />,},- {- path: 'a/:conversationId?',- element: <AssistantsRoute />,- },{path: 'search/:query?',element: <Search />,diff --git a/client/src/store/endpoints.ts b/client/src/store/endpoints.tsindex b92fca701c..aff3516987 100644--- a/client/src/store/endpoints.ts+++ b/client/src/store/endpoints.ts@@ -4,7 +4,7 @@ import type { TEndpointsConfig } from 'librechat-data-provider';const defaultConfig: TEndpointsConfig = {[EModelEndpoint.azureOpenAI]: null,- [EModelEndpoint.assistant]: null,+ [EModelEndpoint.assistants]: null,[EModelEndpoint.openAI]: null,[EModelEndpoint.bingAI]: null,[EModelEndpoint.chatGPTBrowser]: null,@@ -45,30 +45,10 @@ const endpointsFilter = selector({},});-const availableEndpoints = selector({- key: 'availableEndpoints',- get: ({ get }) => {- const endpoints = [- 'azureOpenAI',- 'openAI',- 'chatGPTBrowser',- 'gptPlugins',- 'bingAI',- 'google',- 'anthropic',- 'custom',- ];- const f = get(endpointsFilter);- return endpoints.filter((endpoint) => f[endpoint]);- },-});-// const modelAvailable-export default {plugins,endpointsConfig,endpointsFilter,- availableEndpoints,defaultConfig,endpointsQueryEnabled,};diff --git a/client/src/store/families.ts b/client/src/store/families.tsindex 70eebbe4eb..38d809eead 100644--- a/client/src/store/families.ts+++ b/client/src/store/families.ts@@ -13,6 +13,16 @@ import { useEffect } from 'react';const conversationByIndex = atomFamily<TConversation | null, string | number>({key: 'conversationByIndex',default: null,+ effects: [+ ({ onSet, node }) => {+ onSet(async (newValue: TConversation | null) => {+ const index = Number(node.key.split('__')[1]);+ if (newValue?.assistant_id) {+ localStorage.setItem(`assistant_id__${index}`, newValue.assistant_id);+ }+ });+ },+ ] as const,});const filesByIndex = atomFamily<Map<string, ExtendedFile>, string | number>({@@ -48,6 +58,11 @@ const textByIndex = atomFamily<string, string | number>({default: '',});+const showStopButtonByIndex = atomFamily<boolean, string | number>({+ key: 'showStopButtonByIndex',+ default: false,+});+const abortScrollFamily = atomFamily({key: 'abortScrollByIndex',default: false,@@ -103,6 +118,7 @@ export default {presetByIndex,submissionByIndex,textByIndex,+ showStopButtonByIndex,abortScrollFamily,isSubmittingFamily,optionSettingsFamily,diff --git a/client/src/store/models.ts b/client/src/store/models.tsindex 53c1b5e1b2..6f36f06150 100644--- a/client/src/store/models.ts+++ b/client/src/store/models.ts@@ -12,7 +12,7 @@ const modelsConfig = atom<TModelsConfig>({key: 'models',default: {[EModelEndpoint.openAI]: openAIModels,- [EModelEndpoint.assistant]: openAIModels.filter(fitlerAssistantModels),+ [EModelEndpoint.assistants]: openAIModels.filter(fitlerAssistantModels),[EModelEndpoint.gptPlugins]: openAIModels,[EModelEndpoint.azureOpenAI]: openAIModels,[EModelEndpoint.bingAI]: ['BingAI', 'Sydney'],diff --git a/client/src/store/settings.ts b/client/src/store/settings.tsindex 92824984b5..0e14a24c02 100644--- a/client/src/store/settings.ts+++ b/client/src/store/settings.ts@@ -6,6 +6,11 @@ const abortScroll = atom<boolean>({default: false,});+const showFiles = atom<boolean>({+ key: 'showFiles',+ default: false,+});+const optionSettings = atom<TOptionSettings>({key: 'optionSettings',default: {},@@ -50,6 +55,25 @@ const autoScroll = atom<boolean>({] as const,});+const hideSidePanel = atom<boolean>({+ key: 'hideSidePanel',+ default: localStorage.getItem('hideSidePanel') === 'true',+ effects: [+ ({ setSelf, onSet }) => {+ const savedValue = localStorage.getItem('hideSidePanel');+ if (savedValue != null) {+ setSelf(savedValue === 'true');+ }++ onSet((newValue: unknown) => {+ if (typeof newValue === 'boolean') {+ localStorage.setItem('hideSidePanel', newValue.toString());+ }+ });+ },+ ] as const,+});+const modularChat = atom<boolean>({key: 'modularChat',default: localStorage.getItem('modularChat') === 'true',@@ -109,12 +133,14 @@ const UsernameDisplay = atom<boolean>({export default {abortScroll,+ showFiles,optionSettings,showPluginStoreDialog,showAgentSettings,showBingToneSetting,showPopover,autoScroll,+ hideSidePanel,modularChat,LaTeXParsing,UsernameDisplay,diff --git a/client/src/style.css b/client/src/style.cssindex 4f8fcfd49a..37129ec7b6 100644--- a/client/src/style.css+++ b/client/src/style.css@@ -1822,4 +1822,51 @@ html {transform-origin:center;width:12px;will-change:transform-}\ No newline at end of file+}++.shadow-stroke {+ position:relative+}+.shadow-stroke:after {+ --tw-shadow:inset 0 0 0 1px rgba(0,0,0,.1);+ --tw-shadow-colored:inset 0 0 0 1px var(--tw-shadow-color);+ border-radius:9999px;+ bottom:0;+ content:"";+ left:0;+ position:absolute;+ right:0;+ top:0+}+.dark .shadow-stroke:after,+.shadow-stroke:after {+ box-shadow:0 0 transparent,0 0 transparent,var(--tw-shadow);+ box-shadow:var(--tw-ring-offset-shadow,0 0 transparent),var(--tw-ring-shadow,0 0 transparent),var(--tw-shadow)+}+.dark .shadow-stroke:after {+ --tw-shadow:inset 0 0 0 1px hsla(0,0%,100%,.3);+ --tw-shadow-colored:inset 0 0 0 1px var(--tw-shadow-color)+}++.assistant-item {+ position: relative;+}++.assistant-item:after {+ --tw-shadow: inset 0 0 0 1px rgba(0,0,0,.25);+ --tw-shadow-colored: inset 0 0 0 1px var(--tw-shadow-color);+ border-radius: 9999px;+ bottom: 0;+ content: "";+ left: 0;+ position: absolute;+ right: 0;+ top: 0;+ box-shadow: 0 0 transparent, 0 0 transparent, var(--tw-shadow);+ box-shadow: var(--tw-ring-offset-shadow, 0 0 transparent), var(--tw-ring-shadow, 0 0 transparent), var(--tw-shadow);+}++.dark .assistant-item:after {+ --tw-shadow: inset 0 0 0 1px rgba(0,0,0,.25);+ --tw-shadow-colored: inset 0 0 0 1px var(--tw-shadow-color);+}diff --git a/client/src/utils/cleanupPreset.ts b/client/src/utils/cleanupPreset.tsindex ffff879a60..6c6c3840d8 100644--- a/client/src/utils/cleanupPreset.ts+++ b/client/src/utils/cleanupPreset.ts@@ -16,7 +16,11 @@ const cleanupPreset = ({ preset: _preset }: TCleanupPreset): TPreset => {};}- const parsedPreset = parseConvo({ endpoint, endpointType, conversation: _preset });+ const { presetOverride = {}, ...rest } = _preset;+ const preset = { ...rest, ...presetOverride };++ /* @ts-ignore: endpoint can be a custom defined name */+ const parsedPreset = parseConvo({ endpoint, endpointType, conversation: preset });return {presetId: _preset?.presetId ?? null,diff --git a/client/src/utils/content.ts b/client/src/utils/content.tsnew file mode 100644index 0000000000..fec99f21bc--- /dev/null+++ b/client/src/utils/content.ts@@ -0,0 +1,20 @@+import { ToolCallTypes } from 'librechat-data-provider';+import type {+ ContentPart,+ CodeToolCall,+ ImageFile,+ Text,+ PartMetadata,+} from 'librechat-data-provider';++export function isText(part: ContentPart): part is Text & PartMetadata {+ return (part as Text).value !== undefined;+}++export function isCodeToolCall(part: ContentPart): part is CodeToolCall & PartMetadata {+ return (part as CodeToolCall).type === ToolCallTypes.CODE_INTERPRETER;+}++export function isImageFile(part: ContentPart): part is ImageFile & PartMetadata {+ return (part as ImageFile).file_id !== undefined;+}diff --git a/client/src/utils/files.ts b/client/src/utils/files.tsindex 4615029fff..2709906e4b 100644--- a/client/src/utils/files.ts+++ b/client/src/utils/files.ts@@ -1,12 +1,130 @@-import type { TFile } from 'librechat-data-provider';+import { excelMimeTypes } from 'librechat-data-provider';+import SheetPaths from '~/components/svg/Files/SheetPaths';+import TextPaths from '~/components/svg/Files/TextPaths';+import FilePaths from '~/components/svg/Files/FilePaths';+import CodePaths from '~/components/svg/Files/CodePaths';-/** Maps Files by `file_id` for quick lookup */-export function mapFiles(files: TFile[]) {- const fileMap = {} as Record<string, TFile>;+export const partialTypes = ['text/x-'];- for (const file of files) {- fileMap[file.file_id] = file;+const textDocument = {+ paths: TextPaths,+ fill: '#FF5588',+ title: 'Document',+};++const spreadsheet = {+ paths: SheetPaths,+ fill: '#10A37F',+ title: 'Spreadsheet',+};++const codeFile = {+ paths: CodePaths,+ fill: '#FF6E3C',+ // TODO: make this dynamic to the language+ title: 'Code',+};++export const fileTypes = {+ /* Category matches */+ file: {+ paths: FilePaths,+ fill: '#0000FF',+ title: 'File',+ },+ text: textDocument,+ // application:,++ /* Partial matches */+ csv: spreadsheet,+ pdf: textDocument,+ 'text/x-': codeFile,++ /* Exact matches */+ // 'application/json':,+ // 'text/html':,+ // 'text/css':,+ // image,+};++// export const getFileType = (type = '') => {+// let fileType = fileTypes.file;+// const exactMatch = fileTypes[type];+// const partialMatch = !exactMatch && partialTypes.find((type) => type.includes(type));+// const category = (!partialMatch && (type.split('/')[0] ?? 'text') || 'text');++// if (exactMatch) {+// fileType = exactMatch;+// } else if (partialMatch) {+// fileType = fileTypes[partialMatch];+// } else if (fileTypes[category]) {+// fileType = fileTypes[category];+// }++// if (!fileType) {+// fileType = fileTypes.file;+// }++// return fileType;+// };++export const getFileType = (+ type = '',+): {+ paths: React.FC;+ fill: string;+ title: string;+} => {+ // Direct match check+ if (fileTypes[type]) {+ return fileTypes[type];}- return fileMap;+ if (excelMimeTypes.test(type)) {+ return spreadsheet;+ }++ // Partial match check+ const partialMatch = partialTypes.find((partial) => type.includes(partial));+ if (partialMatch && fileTypes[partialMatch]) {+ return fileTypes[partialMatch];+ }++ // Category check+ const category = type.split('/')[0] || 'text';+ if (fileTypes[category]) {+ return fileTypes[category];+ }++ // Default file type+ return fileTypes.file;+};++/**+ * Format a date string to a human readable format+ * @example+ * formatDate('2020-01-01T00:00:00.000Z') // '1 Jan 2020'+ */+export function formatDate(dateString) {+ const months = [+ 'Jan',+ 'Feb',+ 'Mar',+ 'Apr',+ 'May',+ 'Jun',+ 'Jul',+ 'Aug',+ 'Sep',+ 'Oct',+ 'Nov',+ 'Dec',+ ];+ const date = new Date(dateString);++ const day = date.getDate();+ const month = months[date.getMonth()];+ const year = date.getFullYear();++ return `${day} ${month} ${year}`;}diff --git a/client/src/utils/index.ts b/client/src/utils/index.tsindex 0c70e01aee..3e6c5b72c0 100644--- a/client/src/utils/index.ts+++ b/client/src/utils/index.ts@@ -1,8 +1,10 @@+export * from './map';export * from './json';export * from './files';export * from './latex';export * from './convos';export * from './presets';+export * from './content';export * from './languages';export * from './endpoints';export { default as cn } from './cn';diff --git a/client/src/utils/map.ts b/client/src/utils/map.tsnew file mode 100644index 0000000000..0be5860a3b--- /dev/null+++ b/client/src/utils/map.ts@@ -0,0 +1,23 @@+import type { TFile, Assistant } from 'librechat-data-provider';++/** Maps Files by `file_id` for quick lookup */+export function mapFiles(files: TFile[]) {+ const fileMap = {} as Record<string, TFile>;++ for (const file of files) {+ fileMap[file.file_id] = file;+ }++ return fileMap;+}++/** Maps Assistants by `id` for quick lookup */+export function mapAssistants(assistants: Assistant[]) {+ const assistantMap = {} as Record<string, Assistant>;++ for (const assistant of assistants) {+ assistantMap[assistant.id] = assistant;+ }++ return assistantMap;+}diff --git a/client/tailwind.config.cjs b/client/tailwind.config.cjsindex 10f17abf17..c436e2d636 100644--- a/client/tailwind.config.cjs+++ b/client/tailwind.config.cjs@@ -60,6 +60,7 @@ module.exports = {800: '#06373e',900: '#031f29',},+ 'brand-purple': '#ab68ff','text-primary': 'var(--gray-800)','text-secondary': 'var(--gray-600)','text-tertiary': 'var(--gray-500)',diff --git a/client/vite.config.ts b/client/vite.config.tsindex b5030bd55d..ef985fae7d 100644--- a/client/vite.config.ts+++ b/client/vite.config.ts@@ -7,6 +7,9 @@ import type { Plugin } from 'vite';// https://vitejs.dev/config/export default defineConfig({server: {+ fs: {+ cachedChecks: false,+ },host: 'localhost',port: 3090,strictPort: false,diff --git a/docker-compose.yml b/docker-compose.ymlindex 7b8c937021..cda22c09b4 100644--- a/docker-compose.yml+++ b/docker-compose.yml@@ -25,6 +25,7 @@ services:volumes:- ./.env:/app/.env- ./images:/app/client/public/images+ - ./logs:/app/api/logsmongodb:container_name: chat-mongodbimage: mongodiff --git a/docs/features/presets.md b/docs/features/presets.mdindex 3f26cd8411..5ea6ee3ab6 100644--- a/docs/features/presets.md+++ b/docs/features/presets.md@@ -49,7 +49,7 @@ The "presets" feature in our app is a powerful tool that allows users to save an- **Custom Name:**- Optionally provide a custom name for your preset. This is the name that will be shown in the UI when using it.-- **Prompt Prefix:**+- **Custom Instructions:**- Define instructions or guidelines that will be displayed before each prompt to guide the user in providing input.- **Temperature:**diff --git a/docs/install/configuration/ai_setup.md b/docs/install/configuration/ai_setup.mdindex 4e04546f16..0571cdc2a7 100644--- a/docs/install/configuration/ai_setup.md+++ b/docs/install/configuration/ai_setup.md@@ -91,12 +91,56 @@ To get your OpenAI API key, you need to:- Add a payment method to your account (this is not free, sorry 😬)- Copy your secret key (sk-...) and save it in ./.env as OPENAI_API_KEY-Notes:+**Notes:**+- Selecting a vision model for messages with attachments is not necessary as it will be switched behind the scenes for you. If you didn't outright select a vision model, it will only be used for the vision request and you should still see the non-vision model you had selected after the request is successful- OpenAI Vision models allow for messages without attachments---+## Assistants++- The [Assistants API by OpenAI](https://platform.openai.com/docs/assistants/overview) has a dedicated endpoint.+- The Assistants API enables the creation of AI assistants, offering functionalities like code interpreter, knowledge retrieval of files, and function execution.+ - [Read here for an in-depth documentation](https://platform.openai.com/docs/assistants/overview) of the feature, how it works, what it's capable of.+- As with the regular [OpenAI API](#openai), go to **[https://platform.openai.com/account/api-keys](https://platform.openai.com/account/api-keys)** to get a key.+- You will need to set the following environment variable to your key or you can set it to `user_provided` for users to provide their own.++```bash+ASSISTANTS_API_KEY=your-key+```++- You can determine which models you would like to have available with `ASSISTANTS_MODELS`; otherwise, the models list fetched from OpenAI will be used (only Assistants API compatible models will be shown).++```bash+# without spaces+ASSISTANTS_MODELS=gpt-3.5-turbo-0125,gpt-3.5-turbo-16k-0613,gpt-3.5-turbo-16k,gpt-3.5-turbo,gpt-4,gpt-4-0314,gpt-4-32k-0314,gpt-4-0613,gpt-3.5-turbo-0613,gpt-3.5-turbo-1106,gpt-4-0125-preview,gpt-4-turbo-preview,gpt-4-1106-preview+```++- If necessary, you can also set an alternate base URL instead of the official one with `ASSISTANTS_BASE_URL`, which is similar to the OpenAI counterpart `OPENAI_REVERSE_PROXY`++```bash+ASSISTANTS_BASE_URL=http://your-alt-baseURL:3080/+```++- There is additional, optional configuration, depending on your needs, such as disabling the assistant builder UI, that are available via the [`librechat.yaml` custom config file](./custom_config.md#assistants-endpoint-object-structure):+ - Control the visibility and use of the builder interface for assistants. [More info](./custom_config.md#disablebuilder)+ - Specify the polling interval in milliseconds for checking run updates or changes in assistant run states. [More info](./custom_config.md#pollintervalms)+ - Set the timeout period in milliseconds for assistant runs. Helps manage system load by limiting total run operation time. [More info](./custom_config.md#timeoutMs)+ - Specify which assistant Ids are supported or excluded [More info](./custom_config.md#supportedIds)++**Notes:**++- At the time of writing, only the following models support the [Retrieval](https://platform.openai.com/docs/assistants/tools/knowledge-retrieval) capability:+ - gpt-3.5-turbo-0125+ - gpt-4-0125-preview+ - gpt-4-turbo-preview+ - gpt-4-1106-preview+ - gpt-3.5-turbo-1106+- Vision capability is not yet supported.++---+## Anthropic- Create an account at **[https://console.anthropic.com/](https://console.anthropic.com/)**@@ -334,6 +378,7 @@ Alternatively, you can set the [required variables](#required-variables) to expl**Notes:**+- If using `AZURE_OPENAI_BASEURL`, you should not specify instance and deployment names instead of placeholders as the vision request will fail.- As of December 18th, 2023, Vision models seem to have degraded performance with Azure OpenAI when compared to [OpenAI](#openai)@@ -403,6 +448,7 @@ To use Azure with the Plugins endpoint, make sure the following environment vari* `AZURE_API_KEY`: Your Azure API key must be set with an environment variable.**Important:**+- If using `AZURE_OPENAI_BASEURL`, you should not specify instance and deployment names instead of placeholders as the plugin request will fail.---diff --git a/docs/install/configuration/custom_config.md b/docs/install/configuration/custom_config.mdindex 14f2585c10..27d99e9756 100644--- a/docs/install/configuration/custom_config.md+++ b/docs/install/configuration/custom_config.md@@ -20,41 +20,7 @@ Stay tuned for ongoing enhancements to customize your LibreChat instance!> Note: To verify your YAML config, you can use online tools like [yamlchecker.com](https://yamlchecker.com/)-<!-- # Table of Contents--- [LibreChat Configuration Guide](#librechat-configuration-guide)-- [Table of Contents](#table-of-contents)- - [Setup](#setup)- - [Docker Setup](#docker-setup)- - [Config Structure](#config-structure)- - [Version](#version)- - [Cache Settings](#cache-settings)- - [File Strategy](#file-strategy)- - [Registration](#registration)- - [Endpoints](#endpoints)- - [Registration Object Structure](#registration-object-structure)- - [**socialLogins**:](#socialLogins)- - [**allowedDomains**:](#allowedDomains)- - [Custom Endpoint Object Structure](#custom-endpoint-object-structure)- - [**name**:](#name)- - [**apiKey**:](#apikey)- - [**baseURL**:](#baseurl)- - [**iconURL**:](#iconurl)- - [**models**:](#models)- - [**titleConvo**:](#titleconvo)- - [**titleMethod**:](#titlemethod)- - [**titleModel**:](#titlemodel)- - [**summarize**:](#summarize)- - [**summaryModel**:](#summarymodel)- - [**forcePrompt**:](#forceprompt)- - [**modelDisplayLabel**:](#modeldisplaylabel)- - [**addParams**:](#addparams)- - [**dropParams**:](#dropparams)- - [**headers**:](#headers)- - [Additional Notes](#additional-notes)- - [Default Parameters](#default-parameters)- - [Breakdown of Default Params](#breakdown-of-default-params)- - [Example Config](#example-config) -->+**Note:** To verify your YAML config, you can use online tools like [yamlchecker.com](https://yamlchecker.com/)## Setup@@ -88,6 +54,105 @@ services:docker compose up # no need to rebuild```+## Example Config++```yaml+version: 1.0.3+cache: true+# fileStrategy: "firebase" # If using Firebase CDN+fileConfig:+ endpoints:+ assistants:+ fileLimit: 5+ fileSizeLimit: 10 # Maximum size for an individual file in MB+ totalSizeLimit: 50 # Maximum total size for all files in a single request in MB+ supportedMimeTypes:+ - "image/.*"+ - "application/pdf"+ openAI:+ disabled: true # Disables file uploading to the OpenAI endpoint+ default:+ totalSizeLimit: 20+ YourCustomEndpointName:+ fileLimit: 2+ fileSizeLimit: 5+ serverFileSizeLimit: 100 # Global server file size limit in MB+ avatarSizeLimit: 2 # Limit for user avatar image size in MB+rateLimits:+ fileUploads:+ ipMax: 100+ ipWindowInMinutes: 60 # Rate limit window for file uploads per IP+ userMax: 50+ userWindowInMinutes: 60 # Rate limit window for file uploads per user+registration:+ socialLogins: ["google", "facebook", "github", "discord", "openid"]+ allowedDomains:+ - "example.com"+ - "anotherdomain.com"+endpoints:+ assistants:+ disableBuilder: false # Disable Assistants Builder Interface by setting to `true`+ pollIntervalMs: 750 # Polling interval for checking assistant updates+ timeoutMs: 180000 # Timeout for assistant operations+ # Should only be one or the other, either `supportedIds` or `excludedIds`+ supportedIds: ["asst_supportedAssistantId1", "asst_supportedAssistantId2"]+ # excludedIds: ["asst_excludedAssistantId"]+ custom:+ - name: "Mistral"+ apiKey: "${MISTRAL_API_KEY}"+ baseURL: "https://api.mistral.ai/v1"+ models:+ default: ["mistral-tiny", "mistral-small", "mistral-medium"]+ fetch: true # Attempt to dynamically fetch available models+ userIdQuery: false+ iconURL: "https://example.com/mistral-icon.png"+ titleConvo: true+ titleMethod: "completion"+ titleModel: "mistral-tiny"+ summarize: true+ summaryModel: "mistral-summary"+ forcePrompt: false+ modelDisplayLabel: "Mistral AI"+ addParams:+ safe_prompt: true+ dropParams:+ - "stop"+ - "user"+ - "presence_penalty"+ - "frequency_penalty"+ # headers:+ # x-custom-header: "${CUSTOM_HEADER_VALUE}"+ - name: "OpenRouter"+ apiKey: "${OPENROUTER_API_KEY}"+ baseURL: "https://openrouter.ai/api/v1"+ models:+ default: ["gpt-3.5-turbo"]+ fetch: false+ titleConvo: true+ titleModel: "gpt-3.5-turbo"+ summarize: false+ forcePrompt: false+ modelDisplayLabel: "OpenRouter"+ dropParams:+ - "frequency_penalty"+```++This example configuration file sets up LibreChat with detailed options across several key areas:++- **Caching**: Enabled to improve performance.+- **File Handling**:+ - **File Strategy**: Commented out but hints at possible integration with Firebase for file storage.+ - **File Configurations**: Customizes file upload limits and allowed MIME types for different endpoints, including a global server file size limit and a specific limit for user avatar images.+- **Rate Limiting**: Defines thresholds for the maximum number of file uploads allowed per IP and user within a specified time window, aiming to prevent abuse.+- **Registration**:+ - Allows registration from specified social login providers and email domains, enhancing security and user management.+- **Endpoints**:+ - **Assistants**: Configures the assistants' endpoint with a polling interval and a timeout for operations, and provides an option to disable the builder interface.+ - **Custom Endpoints**:+ - Configures two external AI service endpoints, Mistral and OpenRouter, including API keys, base URLs, model handling, and specific feature toggles like conversation titles, summarization, and parameter adjustments.+ - For Mistral, it enables dynamic model fetching, applies additional parameters for safe prompts, and explicitly drops unsupported parameters.+ - For OpenRouter, it sets up a basic configuration without dynamic model fetching and specifies a model for conversation titles.+## Config Structure**Note:** Fields not specifically mentioned as required are optional.@@ -111,28 +176,236 @@ docker compose up # no need to rebuild- **Description**: Determines where to save user uploaded/generated files. Defaults to `"local"` if omitted.- **Example**: `fileStrategy: "firebase"`+### File Configuration+- **Key**: `fileConfig`+- **Type**: Object+- **Description**: Configures file handling settings for the application, including size limits and MIME type restrictions.++ - **Sub-Key**: `endpoints`+ - **Type**: Record/Object+ - **Description**: Specifies file handling configurations for individual endpoints, allowing customization per endpoint basis.+ - [Endpoint File Config Object Structure](#endpoint-file-config-object-structure)++ - **Sub-Key**: `serverFileSizeLimit`+ - **Type**: Number+ - **Description**: The maximum file size (in MB) that the server will accept. Applies globally across all endpoints unless overridden by endpoint-specific settings.++ - **Sub-Key**: `avatarSizeLimit`+ - **Type**: Number+ - **Description**: Maximum size (in MB) for user avatar images.++### Rate Limiting++- **Key**: `rateLimits`+- **Type**: Object+- **Description**: Defines rate limiting policies to prevent abuse by limiting the number of requests.+ - **Sub-Key**: `fileUploads`+ - **Type**: Object+ - **Description**: Configures rate limits specifically for file upload operations.+ - **Sub-Key**: `ipMax`+ - **Type**: Number+ - **Description**: Maximum number of uploads allowed per IP address per window.+ - **Sub-Key**: `ipWindowInMinutes`+ - **Type**: Number+ - **Description**: Time window in minutes for the IP-based upload limit.+ - **Sub-Key**: `userMax`+ - **Type**: Number+ - **Description**: Maximum number of uploads allowed per user per window.+ - **Sub-Key**: `userWindowInMinutes`+ - **Type**: Number+ - **Description**: Time window in minutes for the user-based upload limit.++- **Example**:+```yaml+rateLimits:+ fileUploads:+ ipMax: 100+ ipWindowInMinutes: 60+ userMax: 50+ userWindowInMinutes: 60+```+### Registration- **Key**: `registration`- **Type**: Object- **Description**: Configures registration-related settings for the application.- **Sub-Key**: `socialLogins`- - **Type**: Array of Strings (`"google"`, `"facebook"`, `"openid"`, `"github"`, `"discord"`)- - **Description**: Determines both the available social login providers and their arranged order to list on the login/registration page, from top to bottom (first to last values). Note: a login option will not appear even if listed if not [properly configured.](./user_auth_system.md#social-authentication-setup-and-configuration)+ - [More info](#socialLogins)- **Sub-Key**: `allowedDomains`- - **Type**: Array of Strings- - **Description**: Specifies a list of allowed email domains for user registration. Users attempting to register with email domains not listed here will be restricted from registering.+ - [More info](#allowedDomains)- [Registration Object Structure](#registration-object-structure)### Endpoints- **Key**: `endpoints`- **Type**: Object- **Description**: Defines custom API endpoints for the application.+ - **Sub-Key**: `assistants`+ - **Type**: Object+ - **Description**: Assistants endpoint-specific configuration.+ - **Sub-Key**: `disableBuilder`+ - **Description**: Controls the visibility and use of the builder interface for assistants.+ - [More info](#disablebuilder)+ - **Sub-Key**: `pollIntervalMs`+ - **Description**: Specifies the polling interval in milliseconds for checking run updates or changes in assistant run states.+ - [More info](#pollintervalms)+ - **Sub-Key**: `timeoutMs`+ - **Description**: Sets a timeout in milliseconds for assistant runs. Helps manage system load by limiting total run operation time.+ - [More info](#timeoutMs)+ - **Sub-Key**: `supportedIds`+ - **Description**: List of supported assistant Ids. Use this or `excludedIds` but not both.+ - [More info](#supportedIds)+ - **Sub-Key**: `excludedIds`+ - **Description**: List of excluded assistant Ids. Use this or `supportedIds` but not both (the `excludedIds` field will be ignored if so).+ - [More info](#excludedIds)+ - [Full Assistants Endpoint Object Structure](#assistants-endpoint-object-structure)- **Sub-Key**: `custom`- **Type**: Array of Objects- **Description**: Each object in the array represents a unique endpoint configuration.- - [Custom Endpoint Object Structure](#custom-endpoint-object-structure)+ - [Full Custom Endpoint Object Structure](#custom-endpoint-object-structure)- **Required**+## Endpoint File Config Object Structure++### **Overview**++ - `disabled`: Whether file handling is disabled for the endpoint.+ - `fileLimit`: The maximum number of files allowed per upload request.+ - `fileSizeLimit`: The maximum size for a single file. In units of MB (e.g. use `20` for 20 megabytes)+ - `totalSizeLimit`: The total maximum size for all files in a single request. In units of MB (e.g. use `20` for 20 megabytes)+ - `supportedMimeTypes`: A list of [Regular Expressions](https://en.wikipedia.org/wiki/Regular_expression) specifying what MIME types are allowed for upload. This can be customized to restrict file types.++**Notes:**++- At the time of writing, the Assistants endpoint [supports filetypes from this list](https://platform.openai.com/docs/assistants/tools/supported-files).+- The OpenAI, Azure OpenAI, Google, and Custom endpoints only suppport images.+- Any other endpoints not mentioned, like Plugins, do not support file uploads (yet).+- The Assistants endpoint has a defined endpoint value of `assistants`. All other endpoints use the defined value `default`+ - For non-assistants endpoints, you can adjust file settings for all of them under `default`+ - If you'd like to adjust settings for a specific endpoint, you can list their corresponding endpoint names:+ - `assistants` (does not use `default` as it has defined defaults separate from the others.)+ - `openAI`+ - `azureOpenAI`+ - `google`+ - `YourCustomEndpointName`+- You can omit values, in which case, the app will use the default values as defined per endpoint type listed below.+- LibreChat counts 1 megabyte as follows: `1 x 1024 x 1024`++### Example++```yaml+fileConfig:+ endpoints:+ assistants:+ fileLimit: 5+ fileSizeLimit: 10+ totalSizeLimit: 50+ supportedMimeTypes:+ - "image/.*"+ - "application/pdf"+ openAI:+ disabled: true+ default:+ totalSizeLimit: 20+ YourCustomEndpointName:+ fileLimit: 5+ fileSizeLimit: 1000+ supportedMimeTypes:+ - "image/.*"+ serverFileSizeLimit: 1000+ avatarSizeLimit: 2+```++### **disabled**:++> Indicates whether file uploading is disabled for a specific endpoint.++- Type: Boolean+- Default: `false` (i.e., uploading is enabled by default)+- Example:+ ```yaml+ openAI:+ disabled: true+ ```+- **Note**: Setting this to `true` prevents any file uploads to the specified endpoint, overriding any other file-related settings.++### **fileLimit**:++> The maximum number of files allowed in a single upload request.++- Type: Integer+- Default: Varies by endpoint+- Example:+ ```yaml+ assistants:+ fileLimit: 5+ ```+- **Note**: Helps control the volume of uploads and manage server load.++### **fileSizeLimit**:++> The maximum size allowed for each individual file, specified in megabytes (MB).++- Type: Integer+- Default: Varies by endpoint+- Example:+ ```yaml+ YourCustomEndpointName:+ fileSizeLimit: 1000+ ```+- **Note**: This limit ensures that no single file exceeds the specified size, allowing for better resource allocation and management.++### **totalSizeLimit**:++> The total maximum size allowed for all files in a single request, specified in megabytes (MB).++- Type: Integer+- Default: Varies by endpoint+- Example:+ ```yaml+ assistants:+ totalSizeLimit: 50+ ```+- **Note**: This setting is crucial for preventing excessive bandwidth and storage usage by any single upload request.++### **supportedMimeTypes**:++> A list of regular expressions defining the MIME types permitted for upload.++- Type: Array of Strings+- Default: Varies by endpoint+- Example:+ ```yaml+ assistants:+ supportedMimeTypes:+ - "image/.*"+ - "application/pdf"+ ```+- **Note**: This allows for precise control over the types of files that can be uploaded. Invalid regex is ignored.++### **serverFileSizeLimit**:++> The global maximum size for any file uploaded to the server, specified in megabytes (MB).++- Type: Integer+- Example:+ ```yaml+ fileConfig:+ serverFileSizeLimit: 1000+ ```+- **Note**: Acts as an overarching limit for file uploads across all endpoints, ensuring that no file exceeds this size server-wide.++### **avatarSizeLimit**:++> The maximum size allowed for avatar images, specified in megabytes (MB).++- Type: Integer+- Example:+ ```yaml+ fileConfig:+ avatarSizeLimit: 2+ ```+- **Note**: Specifically tailored for user avatar uploads, allowing for control over image sizes to maintain consistent quality and loading times.+## Registration Object Structure```yaml@@ -169,9 +442,74 @@ registration:- **Required**- **Note**: Users with email domains not listed will be restricted from registering.+Given the additional details and correction regarding `supportedMimeTypes` being a list of regex strings and the omission of the `assistantEndpoint` configuration, let's revise and add the necessary documentation sections.++## Assistants Endpoint Object Structure++### Example++```yaml+endpoints:+ assistants:+ disableBuilder: false+ pollIntervalMs: 500+ timeoutMs: 10000+ # Use either `supportedIds` or `excludedIds` but not both+ supportedIds: ["asst_supportedAssistantId1", "asst_supportedAssistantId2"]+ # excludedIds: ["asst_excludedAssistantId"]+```+> This configuration enables the builder interface for assistants, sets a polling interval of 500ms to check for run updates, and establishes a timeout of 10 seconds for assistant run operations.++In addition to custom endpoints, you can configure settings specific to the assistants endpoint.++### **disableBuilder**:++> Controls the visibility and use of the builder interface for assistants.++- **Type**: Boolean+- **Example**: `disableBuilder: false`+- **Description**: When set to `true`, disables the builder interface for the assistant, limiting direct manual interaction.+- **Note**: Defaults to `false` if omitted.++### **pollIntervalMs**:++> Specifies the polling interval in milliseconds for checking run updates or changes in assistant run states.++- **Type**: Integer+- **Example**: `pollIntervalMs: 500`+- **Description**: Specifies the polling interval in milliseconds for checking assistant run updates.+- **Note**: Defaults to `750` if omitted.++### **timeoutMs**:++> Defines the maximum time in milliseconds that an assistant can run before the request is cancelled.++- **Type**: Integer+- **Example**: `timeoutMs: 10000`+- **Description**: Sets a timeout in milliseconds for assistant runs. Helps manage system load by limiting total run operation time.+- **Note**: Defaults to 3 minutes (180,000 ms). Run operation times can range between 50 seconds to 2 minutes but also exceed this. If the `timeoutMs` value is exceeded, the run will be cancelled.++### **supportedIds**:++ > List of supported assistant Ids++ - Type: Array/List of Strings+ - **Description**: List of supported assistant Ids. Use this or `excludedIds` but not both (the `excludedIds` field will be ignored if so).+ - **Example**: `supportedIds: ["asst_supportedAssistantId1", "asst_supportedAssistantId2"]`++### **excludedIds**:++ > List of excluded assistant Ids++ - Type: Array/List of Strings+ - **Description**: List of excluded assistant Ids. Use this or `supportedIds` but not both (the `excludedIds` field will be ignored if so).+ - **Example**: `excludedIds: ["asst_excludedAssistantId1", "asst_excludedAssistantId2"]`+## Custom Endpoint Object StructureEach endpoint in the `custom` array should have the following structure:+### Example+```yaml# Example Endpoint Object Structureendpoints:@@ -343,10 +681,10 @@ endpoints:Content-Type: "application/json"```-## Additional Notes+### Additional Notes- Ensure that all URLs and keys are correctly specified to avoid connectivity issues.-## Default Parameters+### Default ParametersCustom endpoints share logic with the OpenAI endpoint, and thus have default parameters tailored to the OpenAI API.@@ -385,46 +723,3 @@ Custom endpoints share logic with the OpenAI endpoint, and thus have default par**Note:** The `max_tokens` field is not sent to use the maximum amount of tokens available, which is default OpenAI API behavior. Some alternate APIs require this field, or it may default to a very low value and your responses may appear cut off; in this case, you should add it to `addParams` field as shown in the [Endpoint Object Structure](#endpoint-object-structure).-## Example Config--```yaml-version: 1.0.2-cache: true-# Example Registration Object Structure-registration:- allowedDomains:- - "gmail.com"-endpoints:- custom:- # Mistral AI API- - name: "Mistral"- apiKey: "your_api_key"- baseURL: "https://api.mistral.ai/v1"- models:- default: ["mistral-tiny", "mistral-small", "mistral-medium"]- titleConvo: true- titleModel: "mistral-tiny"- summarize: false- summaryModel: "mistral-tiny"- forcePrompt: false- modelDisplayLabel: "Mistral"- addParams:- safe_prompt: true- # NOTE: For Mistral, it is necessary to drop the following parameters or you will encounter a 422 Error:- dropParams: ["stop", "user", "frequency_penalty", "presence_penalty"]-- # OpenRouter.ai API- - name: "OpenRouter"- # Known issue: you should not use `OPENROUTER_API_KEY` as it will then override the `openAI` endpoint to use OpenRouter as well.- apiKey: "${OPENROUTER_KEY}"- baseURL: "https://openrouter.ai/api/v1"- models:- default: ["gpt-3.5-turbo"]- fetch: true- titleConvo: true- titleModel: "gpt-3.5-turbo"- summarize: false- summaryModel: "gpt-3.5-turbo"- forcePrompt: false- modelDisplayLabel: "OpenRouter"-```diff --git a/docs/install/configuration/dotenv.md b/docs/install/configuration/dotenv.mdindex 527ad87415..f62d8b67ce 100644--- a/docs/install/configuration/dotenv.md+++ b/docs/install/configuration/dotenv.md@@ -350,6 +350,35 @@ OPENAI_REVERSE_PROXY=OPENAI_FORCE_PROMPT=true```+### Assistants++- The [Assistants API by OpenAI](https://platform.openai.com/docs/assistants/overview) has a dedicated endpoint.+- To get your OpenAI API key, you need to:+ - Go to [https://platform.openai.com/account/api-keys](https://platform.openai.com/account/api-keys)+ - Create an account or log in with your existing one+ - Add a payment method to your account (this is not free, sorry 😬)+ - Copy your secret key (sk-...) to `ASSISTANTS_API_KEY`++- Leave `ASSISTANTS_API_KEY=` blank to disable this endpoint+- Set `ASSISTANTS_API_KEY=` to `user_provided` to allow users to provide their own API key from the WebUI++- Customize the available models, separated by commas, **without spaces**.+ - The first will be default.+ - Leave it blank or commented out to use internal settings:+ - The models list will be fetched from OpenAI but only Assistants-API-compatible models will be shown; at the time of writing, they are as shown in the example below.++```bash+ASSISTANTS_MODELS=gpt-3.5-turbo-0125,gpt-3.5-turbo-16k-0613,gpt-3.5-turbo-16k,gpt-3.5-turbo,gpt-4,gpt-4-0314,gpt-4-32k-0314,gpt-4-0613,gpt-3.5-turbo-0613,gpt-3.5-turbo-1106,gpt-4-0125-preview,gpt-4-turbo-preview,gpt-4-1106-preview+```++- If necessary, you can also set an alternate base URL instead of the official one with `ASSISTANTS_BASE_URL`, which is similar to the OpenAI counterpart `OPENAI_REVERSE_PROXY`++```bash+ASSISTANTS_BASE_URL=http://your-alt-baseURL:3080/+```++- There is additional, optional configuration, depending on your needs, such as disabling the assistant builder UI, and determining which assistants can be used, that are available via the [`librechat.yaml` custom config file](./custom_config.md#assistants-endpoint-object-structure).+### OpenRouterSee [OpenRouter](./free_ai_apis.md#openrouter-preferred) for more info.diff --git a/librechat.example.yaml b/librechat.example.yamlindex d3de1a60dc..cd2befdb96 100644--- a/librechat.example.yaml+++ b/librechat.example.yaml@@ -1,5 +1,8 @@+# For more information, see the Configuration Guide:+# https://docs.librechat.ai/install/configuration/custom_config.html+# Configuration version (required)-version: 1.0.2+version: 1.0.3# Cache settings: Set to true to enable cachingcache: true@@ -10,8 +13,40 @@ registration:# allowedDomains:# - "gmail.com"+# fileConfig:+# endpoints:+# assistants:+# fileLimit: 5+# fileSizeLimit: 10 # Maximum size for an individual file in MB+# totalSizeLimit: 50 # Maximum total size for all files in a single request in MB+# supportedMimeTypes:+# - "image/.*"+# - "application/pdf"+# openAI:+# disabled: true # Disables file uploading to the OpenAI endpoint+# default:+# totalSizeLimit: 20+# YourCustomEndpointName:+# fileLimit: 2+# fileSizeLimit: 5+# serverFileSizeLimit: 100 # Global server file size limit in MB+# avatarSizeLimit: 2 # Limit for user avatar image size in MB+# rateLimits:+# fileUploads:+# ipMax: 100+# ipWindowInMinutes: 60 # Rate limit window for file uploads per IP+# userMax: 50+# userWindowInMinutes: 60 # Rate limit window for file uploads per user+# Definition of custom endpointsendpoints:+ # assistants:+ # disableBuilder: false # Disable Assistants Builder Interface by setting to `true`+ # pollIntervalMs: 750 # Polling interval for checking assistant updates+ # timeoutMs: 180000 # Timeout for assistant operations+ # # Should only be one or the other, either `supportedIds` or `excludedIds`+ # supportedIds: ["asst_supportedAssistantId1", "asst_supportedAssistantId2"]+ # # excludedIds: ["asst_excludedAssistantId"]custom:# Mistral AI API- name: "Mistral" # Unique name for the endpointdiff --git a/package-lock.json b/package-lock.jsonindex 622cd881a2..8b08bba30f 100644--- a/package-lock.json+++ b/package-lock.json@@ -45,6 +45,7 @@"@azure/search-documents": "^12.0.0","@keyv/mongo": "^2.1.8","@keyv/redis": "^2.8.1",+ "@langchain/community": "^0.0.17","@langchain/google-genai": "^0.0.8","axios": "^1.3.4","bcryptjs": "^2.4.3",@@ -58,6 +59,7 @@"express-mongo-sanitize": "^2.2.0","express-rate-limit": "^6.9.0","express-session": "^1.17.3",+ "file-type": "^18.7.0","firebase": "^10.6.0","googleapis": "^126.0.1","handlebars": "^4.7.7",@@ -72,6 +74,7 @@"librechat-data-provider": "*","lodash": "^4.17.21","meilisearch": "^0.33.0",+ "mime": "^3.0.0","module-alias": "^2.2.3","mongoose": "^7.1.1","multer": "^1.4.5-lts.1",@@ -103,706 +106,18 @@"supertest": "^6.3.3"}},- "api/node_modules/@aws-crypto/sha256-js": {- "version": "5.2.0",- "resolved": "https://registry.npmjs.org/@aws-crypto/sha256-js/-/sha256-js-5.2.0.tgz",- "integrity": "sha512-FFQQyu7edu4ufvIZ+OadFpHHOt+eSTBaYaki44c+akjg7qZg9oOQeLlk77F6tSYqjDAFClrHJk9tMf0HdVyOvA==",- "optional": true,- "peer": true,- "dependencies": {- "@aws-crypto/util": "^5.2.0",- "@aws-sdk/types": "^3.222.0",- "tslib": "^2.6.2"- },- "engines": {- "node": ">=16.0.0"- }- },- "api/node_modules/@aws-crypto/util": {- "version": "5.2.0",- "resolved": "https://registry.npmjs.org/@aws-crypto/util/-/util-5.2.0.tgz",- "integrity": "sha512-4RkU9EsI6ZpBve5fseQlGNUWKMa1RLPQ1dnjnQoe07ldfIzcsGb5hC5W0Dm7u423KWzawlrpbjXBrXCEv9zazQ==",- "optional": true,- "peer": true,- "dependencies": {- "@aws-sdk/types": "^3.222.0",- "@smithy/util-utf8": "^2.0.0",- "tslib": "^2.6.2"- }- },- "api/node_modules/@langchain/community": {- "version": "0.0.13",- "resolved": "https://registry.npmjs.org/@langchain/community/-/community-0.0.13.tgz",- "integrity": "sha512-Dh7ri1ZySfX5t6Zz7+jR0kHp769j1+S4IHNyoDnzWlHfPFA5hfF9+zrRRmxV17KVCUawQNoOxgNmZnUjNMm5qg==",- "dependencies": {- "@langchain/core": "~0.1.5",- "@langchain/openai": "~0.0.9",- "flat": "^5.0.2",- "langsmith": "~0.0.48",- "uuid": "^9.0.0",- "zod": "^3.22.3"- },- "engines": {- "node": ">=18"- },- "peerDependencies": {- "@aws-crypto/sha256-js": "^5.0.0",- "@aws-sdk/client-bedrock-runtime": "^3.422.0",- "@aws-sdk/client-dynamodb": "^3.310.0",- "@aws-sdk/client-kendra": "^3.352.0",- "@aws-sdk/client-lambda": "^3.310.0",- "@aws-sdk/client-sagemaker-runtime": "^3.310.0",- "@aws-sdk/client-sfn": "^3.310.0",- "@aws-sdk/credential-provider-node": "^3.388.0",- "@clickhouse/client": "^0.2.5",- "@cloudflare/ai": "^1.0.12",- "@datastax/astra-db-ts": "0.1.2",- "@elastic/elasticsearch": "^8.4.0",- "@getmetal/metal-sdk": "*",- "@getzep/zep-js": "^0.9.0",- "@gomomento/sdk": "^1.51.1",- "@gomomento/sdk-core": "^1.51.1",- "@google-ai/generativelanguage": "^0.2.1",- "@gradientai/nodejs-sdk": "^1.2.0",- "@huggingface/inference": "^2.6.4",- "@mozilla/readability": "*",- "@opensearch-project/opensearch": "*",- "@pinecone-database/pinecone": "^1.1.0",- "@planetscale/database": "^1.8.0",- "@qdrant/js-client-rest": "^1.2.0",- "@raycast/api": "^1.55.2",- "@rockset/client": "^0.9.1",- "@smithy/eventstream-codec": "^2.0.5",- "@smithy/protocol-http": "^3.0.6",- "@smithy/signature-v4": "^2.0.10",- "@smithy/util-utf8": "^2.0.0",- "@supabase/postgrest-js": "^1.1.1",- "@supabase/supabase-js": "^2.10.0",- "@tensorflow-models/universal-sentence-encoder": "*",- "@tensorflow/tfjs-converter": "*",- "@tensorflow/tfjs-core": "*",- "@upstash/redis": "^1.20.6",- "@vercel/kv": "^0.2.3",- "@vercel/postgres": "^0.5.0",- "@writerai/writer-sdk": "^0.40.2",- "@xata.io/client": "^0.28.0",- "@xenova/transformers": "^2.5.4",- "@zilliz/milvus2-sdk-node": ">=2.2.7",- "cassandra-driver": "^4.7.2",- "chromadb": "*",- "closevector-common": "0.1.0-alpha.1",- "closevector-node": "0.1.0-alpha.10",- "closevector-web": "0.1.0-alpha.16",- "cohere-ai": ">=6.0.0",- "convex": "^1.3.1",- "discord.js": "^14.14.1",- "faiss-node": "^0.5.1",- "firebase-admin": "^11.9.0",- "google-auth-library": "^8.9.0",- "googleapis": "^126.0.1",- "hnswlib-node": "^1.4.2",- "html-to-text": "^9.0.5",- "ioredis": "^5.3.2",- "jsdom": "*",- "llmonitor": "^0.5.9",- "lodash": "^4.17.21",- "mongodb": "^5.2.0",- "mysql2": "^3.3.3",- "neo4j-driver": "*",- "node-llama-cpp": "*",- "pg": "^8.11.0",- "pg-copy-streams": "^6.0.5",- "pickleparser": "^0.2.1",- "portkey-ai": "^0.1.11",- "redis": "^4.6.4",- "replicate": "^0.18.0",- "typeorm": "^0.3.12",- "typesense": "^1.5.3",- "usearch": "^1.1.1",- "vectordb": "^0.1.4",- "voy-search": "0.6.2",- "weaviate-ts-client": "^1.4.0",- "web-auth-library": "^1.0.3",- "ws": "^8.14.2"- },- "peerDependenciesMeta": {- "@aws-crypto/sha256-js": {- "optional": true- },- "@aws-sdk/client-bedrock-runtime": {- "optional": true- },- "@aws-sdk/client-dynamodb": {- "optional": true- },- "@aws-sdk/client-kendra": {- "optional": true- },- "@aws-sdk/client-lambda": {- "optional": true- },- "@aws-sdk/client-sagemaker-runtime": {- "optional": true- },- "@aws-sdk/client-sfn": {- "optional": true- },- "@aws-sdk/credential-provider-node": {- "optional": true- },- "@clickhouse/client": {- "optional": true- },- "@cloudflare/ai": {- "optional": true- },- "@datastax/astra-db-ts": {- "optional": true- },- "@elastic/elasticsearch": {- "optional": true- },- "@getmetal/metal-sdk": {- "optional": true- },- "@getzep/zep-js": {- "optional": true- },- "@gomomento/sdk": {- "optional": true- },- "@gomomento/sdk-core": {- "optional": true- },- "@google-ai/generativelanguage": {- "optional": true- },- "@gradientai/nodejs-sdk": {- "optional": true- },- "@huggingface/inference": {- "optional": true- },- "@mozilla/readability": {- "optional": true- },- "@opensearch-project/opensearch": {- "optional": true- },- "@pinecone-database/pinecone": {- "optional": true- },- "@planetscale/database": {- "optional": true- },- "@qdrant/js-client-rest": {- "optional": true- },- "@raycast/api": {- "optional": true- },- "@rockset/client": {- "optional": true- },- "@smithy/eventstream-codec": {- "optional": true- },- "@smithy/protocol-http": {- "optional": true- },- "@smithy/signature-v4": {- "optional": true- },- "@smithy/util-utf8": {- "optional": true- },- "@supabase/postgrest-js": {- "optional": true- },- "@supabase/supabase-js": {- "optional": true- },- "@tensorflow-models/universal-sentence-encoder": {- "optional": true- },- "@tensorflow/tfjs-converter": {- "optional": true- },- "@tensorflow/tfjs-core": {- "optional": true- },- "@upstash/redis": {- "optional": true- },- "@vercel/kv": {- "optional": true- },- "@vercel/postgres": {- "optional": true- },- "@writerai/writer-sdk": {- "optional": true- },- "@xata.io/client": {- "optional": true- },- "@xenova/transformers": {- "optional": true- },- "@zilliz/milvus2-sdk-node": {- "optional": true- },- "cassandra-driver": {- "optional": true- },- "chromadb": {- "optional": true- },- "closevector-common": {- "optional": true- },- "closevector-node": {- "optional": true- },- "closevector-web": {- "optional": true- },- "cohere-ai": {- "optional": true- },- "convex": {- "optional": true- },- "discord.js": {- "optional": true- },- "faiss-node": {- "optional": true- },- "firebase-admin": {- "optional": true- },- "google-auth-library": {- "optional": true- },- "googleapis": {- "optional": true- },- "hnswlib-node": {- "optional": true- },- "html-to-text": {- "optional": true- },- "ioredis": {- "optional": true- },- "jsdom": {- "optional": true- },- "llmonitor": {- "optional": true- },- "lodash": {- "optional": true- },- "mongodb": {- "optional": true- },- "mysql2": {- "optional": true- },- "neo4j-driver": {- "optional": true- },- "node-llama-cpp": {- "optional": true- },- "pg": {- "optional": true- },- "pg-copy-streams": {- "optional": true- },- "pickleparser": {- "optional": true- },- "portkey-ai": {- "optional": true- },- "redis": {- "optional": true- },- "replicate": {- "optional": true- },- "typeorm": {- "optional": true- },- "typesense": {- "optional": true- },- "usearch": {- "optional": true- },- "vectordb": {- "optional": true- },- "voy-search": {- "optional": true- },- "weaviate-ts-client": {- "optional": true- },- "web-auth-library": {- "optional": true- },- "ws": {- "optional": true- }- }- },- "api/node_modules/@types/node": {- "version": "18.19.4",- "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.4.tgz",- "integrity": "sha512-xNzlUhzoHotIsnFoXmJB+yWmBvFZgKCI9TtPIEdYIMM1KWfwuY8zh7wvc1u1OAXlC7dlf6mZVx/s+Y5KfFz19A==",- "dependencies": {- "undici-types": "~5.26.4"- }- },- "api/node_modules/cohere-ai": {- "version": "6.0.0",- "resolved": "https://registry.npmjs.org/cohere-ai/-/cohere-ai-6.0.0.tgz",- "integrity": "sha512-u1KmPw2PWbTQbbZXmdVs610N/zYyh/V6mL/nDXqx1Gl6X7IH84z9gK3jNv/f69Uzc007xe3zHmMYk80WlkHEmA=="- },- "api/node_modules/fast-xml-parser": {- "version": "4.3.2",- "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-4.3.2.tgz",- "integrity": "sha512-rmrXUXwbJedoXkStenj1kkljNF7ugn5ZjR9FJcwmCfcCbtOMDghPajbc+Tck6vE6F5XsDmx+Pr2le9fw8+pXBg==",- "funding": [- {- "type": "github",- "url": "https://github.com/sponsors/NaturalIntelligence"- },- {- "type": "paypal",- "url": "https://paypal.me/naturalintelligence"- }- ],- "optional": true,- "peer": true,- "dependencies": {- "strnum": "^1.0.5"- },- "bin": {- "fxparser": "src/cli/cli.js"- }- },- "api/node_modules/gaxios": {- "version": "5.1.3",- "resolved": "https://registry.npmjs.org/gaxios/-/gaxios-5.1.3.tgz",- "integrity": "sha512-95hVgBRgEIRQQQHIbnxBXeHbW4TqFk4ZDJW7wmVtvYar72FdhRIo1UGOLS2eRAKCPEdPBWu+M7+A33D9CdX9rA==",- "optional": true,- "peer": true,- "dependencies": {- "extend": "^3.0.2",- "https-proxy-agent": "^5.0.0",- "is-stream": "^2.0.0",- "node-fetch": "^2.6.9"- },- "engines": {- "node": ">=12"- }- },- "api/node_modules/gcp-metadata": {- "version": "5.3.0",- "resolved": "https://registry.npmjs.org/gcp-metadata/-/gcp-metadata-5.3.0.tgz",- "integrity": "sha512-FNTkdNEnBdlqF2oatizolQqNANMrcqJt6AAYt99B3y1aLLC8Hc5IOBb+ZnnzllodEEf6xMBp6wRcBbc16fa65w==",- "optional": true,- "peer": true,- "dependencies": {- "gaxios": "^5.0.0",- "json-bigint": "^1.0.0"- },- "engines": {- "node": ">=12"- }- },- "api/node_modules/google-auth-library": {- "version": "8.9.0",- "resolved": "https://registry.npmjs.org/google-auth-library/-/google-auth-library-8.9.0.tgz",- "integrity": "sha512-f7aQCJODJFmYWN6PeNKzgvy9LI2tYmXnzpNDHEjG5sDNPgGb2FXQyTBnXeSH+PAtpKESFD+LmHw3Ox3mN7e1Fg==",- "optional": true,- "peer": true,- "dependencies": {- "arrify": "^2.0.0",- "base64-js": "^1.3.0",- "ecdsa-sig-formatter": "^1.0.11",- "fast-text-encoding": "^1.0.0",- "gaxios": "^5.0.0",- "gcp-metadata": "^5.3.0",- "gtoken": "^6.1.0",- "jws": "^4.0.0",- "lru-cache": "^6.0.0"- },- "engines": {- "node": ">=12"- }- },- "api/node_modules/gtoken": {- "version": "6.1.2",- "resolved": "https://registry.npmjs.org/gtoken/-/gtoken-6.1.2.tgz",- "integrity": "sha512-4ccGpzz7YAr7lxrT2neugmXQ3hP9ho2gcaityLVkiUecAiwiy60Ii8gRbZeOsXV19fYaRjgBSshs8kXw+NKCPQ==",- "optional": true,- "peer": true,- "dependencies": {- "gaxios": "^5.0.1",- "google-p12-pem": "^4.0.0",- "jws": "^4.0.0"- },- "engines": {- "node": ">=12.0.0"- }- },- "api/node_modules/langchain": {- "version": "0.0.214",- "resolved": "https://registry.npmjs.org/langchain/-/langchain-0.0.214.tgz",- "integrity": "sha512-HWdgjuqsir7MYSX3OcKW+XUFZyqhma8yfn4NU/7K5MuIz649g0SejVjuHr3rexmsOvZyHeR3XlwIsqxEtOsF7A==",- "dependencies": {- "@anthropic-ai/sdk": "^0.9.1",- "@langchain/community": "~0.0.13",- "@langchain/core": "~0.1.5",- "@langchain/openai": "~0.0.9",- "binary-extensions": "^2.2.0",- "expr-eval": "^2.0.2",- "js-tiktoken": "^1.0.7",- "js-yaml": "^4.1.0",- "jsonpointer": "^5.0.1",- "langchainhub": "~0.0.6",- "langsmith": "~0.0.48",- "ml-distance": "^4.0.0",- "openapi-types": "^12.1.3",- "p-retry": "4",- "uuid": "^9.0.0",- "yaml": "^2.2.1",- "zod": "^3.22.3",- "zod-to-json-schema": "3.20.3"- },- "engines": {- "node": ">=18"- },- "peerDependencies": {- "@aws-sdk/client-s3": "^3.310.0",- "@aws-sdk/client-sagemaker-runtime": "^3.310.0",- "@aws-sdk/client-sfn": "^3.310.0",- "@aws-sdk/credential-provider-node": "^3.388.0",- "@azure/storage-blob": "^12.15.0",- "@gomomento/sdk": "^1.51.1",- "@gomomento/sdk-core": "^1.51.1",- "@gomomento/sdk-web": "^1.51.1",- "@google-ai/generativelanguage": "^0.2.1",- "@google-cloud/storage": "^6.10.1",- "@notionhq/client": "^2.2.10",- "@pinecone-database/pinecone": "^1.1.0",- "@supabase/supabase-js": "^2.10.0",- "@vercel/kv": "^0.2.3",- "@xata.io/client": "^0.28.0",- "apify-client": "^2.7.1",- "assemblyai": "^4.0.0",- "axios": "*",- "cheerio": "^1.0.0-rc.12",- "chromadb": "*",- "convex": "^1.3.1",- "d3-dsv": "^2.0.0",- "epub2": "^3.0.1",- "fast-xml-parser": "^4.2.7",- "google-auth-library": "^8.9.0",- "googleapis": "^126.0.1",- "html-to-text": "^9.0.5",- "ignore": "^5.2.0",- "ioredis": "^5.3.2",- "jsdom": "*",- "mammoth": "^1.6.0",- "mongodb": "^5.2.0",- "node-llama-cpp": "*",- "notion-to-md": "^3.1.0",- "officeparser": "^4.0.4",- "pdf-parse": "1.1.1",- "peggy": "^3.0.2",- "playwright": "^1.32.1",- "puppeteer": "^19.7.2",- "pyodide": "^0.24.1",- "redis": "^4.6.4",- "sonix-speech-recognition": "^2.1.1",- "srt-parser-2": "^1.2.2",- "typeorm": "^0.3.12",- "vectordb": "^0.1.4",- "weaviate-ts-client": "^1.4.0",- "web-auth-library": "^1.0.3",- "ws": "^8.14.2",- "youtube-transcript": "^1.0.6",- "youtubei.js": "^5.8.0"- },- "peerDependenciesMeta": {- "@aws-sdk/client-s3": {- "optional": true- },- "@aws-sdk/client-sagemaker-runtime": {- "optional": true- },- "@aws-sdk/client-sfn": {- "optional": true- },- "@aws-sdk/credential-provider-node": {- "optional": true- },- "@azure/storage-blob": {- "optional": true- },- "@gomomento/sdk": {- "optional": true- },- "@gomomento/sdk-core": {- "optional": true- },- "@gomomento/sdk-web": {- "optional": true- },- "@google-ai/generativelanguage": {- "optional": true- },- "@google-cloud/storage": {- "optional": true- },- "@notionhq/client": {- "optional": true- },- "@pinecone-database/pinecone": {- "optional": true- },- "@supabase/supabase-js": {- "optional": true- },- "@vercel/kv": {- "optional": true- },- "@xata.io/client": {- "optional": true- },- "apify-client": {- "optional": true- },- "assemblyai": {- "optional": true- },- "axios": {- "optional": true- },- "cheerio": {- "optional": true- },- "chromadb": {- "optional": true- },- "convex": {- "optional": true- },- "d3-dsv": {- "optional": true- },- "epub2": {- "optional": true- },- "faiss-node": {- "optional": true- },- "fast-xml-parser": {- "optional": true- },- "google-auth-library": {- "optional": true- },- "googleapis": {- "optional": true- },- "html-to-text": {- "optional": true- },- "ignore": {- "optional": true- },- "ioredis": {- "optional": true- },- "jsdom": {- "optional": true- },- "mammoth": {- "optional": true- },- "mongodb": {- "optional": true- },- "node-llama-cpp": {- "optional": true- },- "notion-to-md": {- "optional": true- },- "officeparser": {- "optional": true- },- "pdf-parse": {- "optional": true- },- "peggy": {- "optional": true- },- "playwright": {- "optional": true- },- "puppeteer": {- "optional": true- },- "pyodide": {- "optional": true- },- "redis": {- "optional": true- },- "sonix-speech-recognition": {- "optional": true- },- "srt-parser-2": {- "optional": true- },- "typeorm": {- "optional": true- },- "vectordb": {- "optional": true- },- "weaviate-ts-client": {- "optional": true- },- "web-auth-library": {- "optional": true- },- "ws": {- "optional": true- },- "youtube-transcript": {- "optional": true- },- "youtubei.js": {- "optional": true- }+ "api/node_modules/@types/node": {+ "version": "18.19.14",+ "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.14.tgz",+ "integrity": "sha512-EnQ4Us2rmOS64nHDWr0XqAD8DsO6f3XR6lf9UIIrZQpUzPVdN/oPuEzfDWNHSyXLvoGgjuEm/sPwFGSSs35Wtg==",+ "dependencies": {+ "undici-types": "~5.26.4"}},- "api/node_modules/langchain/node_modules/@anthropic-ai/sdk": {- "version": "0.9.1",- "resolved": "https://registry.npmjs.org/@anthropic-ai/sdk/-/sdk-0.9.1.tgz",- "integrity": "sha512-wa1meQ2WSfoY8Uor3EdrJq0jTiZJoKoSii2ZVWRY1oN4Tlr5s59pADg9T79FTbPe1/se5c3pBeZgJL63wmuoBA==",+ "api/node_modules/openai": {+ "version": "4.26.1",+ "resolved": "https://registry.npmjs.org/openai/-/openai-4.26.1.tgz",+ "integrity": "sha512-DvWbjhWbappsFRatOWmu4Dp1/Q4RG9oOz6CfOSjy0/Drb8G+5iAiqWAO4PfpGIkhOOKtvvNfQri2SItl+U7LhQ==","dependencies": {"@types/node": "^18.11.18","@types/node-fetch": "^2.6.4",@@ -813,62 +128,29 @@"formdata-node": "^4.3.2","node-fetch": "^2.6.7","web-streams-polyfill": "^3.2.1"- }- },- "api/node_modules/lru-cache": {- "version": "6.0.0",- "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",- "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",- "optional": true,- "peer": true,- "dependencies": {- "yallist": "^4.0.0"},- "engines": {- "node": ">=10"- }- },- "api/node_modules/uuid": {- "version": "9.0.1",- "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz",- "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==",- "funding": [- "https://github.com/sponsors/broofa",- "https://github.com/sponsors/ctavan"- ],"bin": {- "uuid": "dist/bin/uuid"- }- },- "api/node_modules/web-streams-polyfill": {- "version": "3.2.1",- "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.2.1.tgz",- "integrity": "sha512-e0MO3wdXWKrLbL0DgGnUV7WHVuw9OUvL4hjgnPkIeEvESk74gAITi5G606JtZPp39cd8HA9VQzCIvA49LpPN5Q==",- "engines": {- "node": ">= 8"+ "openai": "bin/cli"}},- "api/node_modules/yallist": {- "version": "4.0.0",- "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",- "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",- "optional": true,- "peer": true- },"client": {"name": "@librechat/frontend","version": "0.6.9","license": "ISC","dependencies": {"@headlessui/react": "^1.7.13",+ "@radix-ui/react-accordion": "^1.1.2","@radix-ui/react-alert-dialog": "^1.0.2","@radix-ui/react-checkbox": "^1.0.3",+ "@radix-ui/react-collapsible": "^1.0.3","@radix-ui/react-dialog": "^1.0.2","@radix-ui/react-dropdown-menu": "^2.0.2","@radix-ui/react-hover-card": "^1.0.5","@radix-ui/react-icons": "^1.3.0","@radix-ui/react-label": "^2.0.0","@radix-ui/react-popover": "^1.0.7",+ "@radix-ui/react-radio-group": "^1.1.3",+ "@radix-ui/react-select": "^2.0.0","@radix-ui/react-separator": "^1.0.3","@radix-ui/react-slider": "^1.1.1","@radix-ui/react-switch": "^1.0.3",@@ -876,6 +158,7 @@"@radix-ui/react-toast": "^1.1.5","@radix-ui/react-tooltip": "^1.0.6","@tanstack/react-query": "^4.28.0",+ "@tanstack/react-table": "^8.11.7","@zattoo/use-double-click": "1.2.0","axios": "^1.3.4","class-variance-authority": "^0.6.0",@@ -900,6 +183,7 @@"react-hook-form": "^7.43.9","react-lazy-load-image-component": "^1.6.0","react-markdown": "^8.0.6",+ "react-resizable-panels": "^1.0.9","react-router-dom": "^6.11.2","react-textarea-autosize": "^8.4.0","react-transition-group": "^4.4.5",@@ -949,7 +233,7 @@"tailwindcss": "^3.4.1","ts-jest": "^29.1.0","typescript": "^5.0.4",- "vite": "^5.0.7",+ "vite": "^5.1.1","vite-plugin-html": "^3.2.0","vite-plugin-node-polyfills": "^0.17.0"}@@ -964,9 +248,9 @@}},"node_modules/@adobe/css-tools": {- "version": "4.3.2",- "resolved": "https://registry.npmjs.org/@adobe/css-tools/-/css-tools-4.3.2.tgz",- "integrity": "sha512-DA5a1C0gD/pLOvhv33YMrbf2FK3oUzwNl9oOJqE4XVjuEtt6XIakRcsd7eLiOSPkp1kTRQGICTA8cKra/vFbjw==",+ "version": "4.3.3",+ "resolved": "https://registry.npmjs.org/@adobe/css-tools/-/css-tools-4.3.3.tgz",+ "integrity": "sha512-rE0Pygv0sEZ4vBWHlAgJLGDU7Pm8xoO6p3wsEceb7GYAjScrOHpEo8KK/eVkAcnSM+slAEtXjA2JpdjLp4fJQQ==","dev": true},"node_modules/@alloc/quick-lru": {@@ -1009,9 +293,12 @@}},"node_modules/@anthropic-ai/sdk/node_modules/@types/node": {- "version": "18.17.15",- "resolved": "https://registry.npmjs.org/@types/node/-/node-18.17.15.tgz",- "integrity": "sha512-2yrWpBk32tvV/JAd3HNHWuZn/VDN1P+72hWirHnvsvTGSqbANi+kSeuQR9yAHnbvaBvHDsoTdXV0Fe+iRtHLKA=="+ "version": "18.19.14",+ "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.14.tgz",+ "integrity": "sha512-EnQ4Us2rmOS64nHDWr0XqAD8DsO6f3XR6lf9UIIrZQpUzPVdN/oPuEzfDWNHSyXLvoGgjuEm/sPwFGSSs35Wtg==",+ "dependencies": {+ "undici-types": "~5.26.4"+ }},"node_modules/@aws-crypto/crc32": {"version": "3.0.0",@@ -1117,46 +404,50 @@"optional": true},"node_modules/@aws-sdk/client-cognito-identity": {- "version": "3.410.0",- "resolved": "https://registry.npmjs.org/@aws-sdk/client-cognito-identity/-/client-cognito-identity-3.410.0.tgz",- "integrity": "sha512-J4iPhXswm66Fsk1x0Kly+PWzBizmms4kkkoAU1sk9n08XfWqNBTyf01mx6/t/X+Yh43p2zaeB/XvUwa0jSsWaQ==",+ "version": "3.504.0",+ "resolved": "https://registry.npmjs.org/@aws-sdk/client-cognito-identity/-/client-cognito-identity-3.504.0.tgz",+ "integrity": "sha512-WsQY6CRDC9Y1rKjpsk187EHKES6nLmM9sD6iHAKZFLhi/DiYsy8SIafPFPEvluubYlheeLzgUB8Oxpj6Z69hlA==","optional": true,"dependencies": {"@aws-crypto/sha256-browser": "3.0.0","@aws-crypto/sha256-js": "3.0.0",- "@aws-sdk/client-sts": "3.410.0",- "@aws-sdk/credential-provider-node": "3.410.0",- "@aws-sdk/middleware-host-header": "3.410.0",- "@aws-sdk/middleware-logger": "3.410.0",- "@aws-sdk/middleware-recursion-detection": "3.410.0",- "@aws-sdk/middleware-signing": "3.410.0",- "@aws-sdk/middleware-user-agent": "3.410.0",- "@aws-sdk/types": "3.410.0",- "@aws-sdk/util-endpoints": "3.410.0",- "@aws-sdk/util-user-agent-browser": "3.410.0",- "@aws-sdk/util-user-agent-node": "3.410.0",- "@smithy/config-resolver": "^2.0.7",- "@smithy/fetch-http-handler": "^2.1.2",- "@smithy/hash-node": "^2.0.6",- "@smithy/invalid-dependency": "^2.0.6",- "@smithy/middleware-content-length": "^2.0.8",- "@smithy/middleware-endpoint": "^2.0.6",- "@smithy/middleware-retry": "^2.0.9",- "@smithy/middleware-serde": "^2.0.6",- "@smithy/middleware-stack": "^2.0.0",- "@smithy/node-config-provider": "^2.0.9",- "@smithy/node-http-handler": "^2.1.2",- "@smithy/protocol-http": "^3.0.2",- "@smithy/smithy-client": "^2.1.3",- "@smithy/types": "^2.3.0",- "@smithy/url-parser": "^2.0.6",- "@smithy/util-base64": "^2.0.0",- "@smithy/util-body-length-browser": "^2.0.0",- "@smithy/util-body-length-node": "^2.1.0",- "@smithy/util-defaults-mode-browser": "^2.0.7",- "@smithy/util-defaults-mode-node": "^2.0.9",- "@smithy/util-retry": "^2.0.0",- "@smithy/util-utf8": "^2.0.0",+ "@aws-sdk/client-sts": "3.504.0",+ "@aws-sdk/core": "3.496.0",+ "@aws-sdk/credential-provider-node": "3.504.0",+ "@aws-sdk/middleware-host-header": "3.502.0",+ "@aws-sdk/middleware-logger": "3.502.0",+ "@aws-sdk/middleware-recursion-detection": "3.502.0",+ "@aws-sdk/middleware-signing": "3.502.0",+ "@aws-sdk/middleware-user-agent": "3.502.0",+ "@aws-sdk/region-config-resolver": "3.502.0",+ "@aws-sdk/types": "3.502.0",+ "@aws-sdk/util-endpoints": "3.502.0",+ "@aws-sdk/util-user-agent-browser": "3.502.0",+ "@aws-sdk/util-user-agent-node": "3.502.0",+ "@smithy/config-resolver": "^2.1.1",+ "@smithy/core": "^1.3.1",+ "@smithy/fetch-http-handler": "^2.4.1",+ "@smithy/hash-node": "^2.1.1",+ "@smithy/invalid-dependency": "^2.1.1",+ "@smithy/middleware-content-length": "^2.1.1",+ "@smithy/middleware-endpoint": "^2.4.1",+ "@smithy/middleware-retry": "^2.1.1",+ "@smithy/middleware-serde": "^2.1.1",+ "@smithy/middleware-stack": "^2.1.1",+ "@smithy/node-config-provider": "^2.2.1",+ "@smithy/node-http-handler": "^2.3.1",+ "@smithy/protocol-http": "^3.1.1",+ "@smithy/smithy-client": "^2.3.1",+ "@smithy/types": "^2.9.1",+ "@smithy/url-parser": "^2.1.1",+ "@smithy/util-base64": "^2.1.1",+ "@smithy/util-body-length-browser": "^2.1.1",+ "@smithy/util-body-length-node": "^2.2.1",+ "@smithy/util-defaults-mode-browser": "^2.1.1",+ "@smithy/util-defaults-mode-node": "^2.1.1",+ "@smithy/util-endpoints": "^1.1.1",+ "@smithy/util-retry": "^2.1.1",+ "@smithy/util-utf8": "^2.1.1","tslib": "^2.5.0"},"engines": {@@ -1164,107 +455,186 @@}},"node_modules/@aws-sdk/client-sso": {- "version": "3.410.0",- "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso/-/client-sso-3.410.0.tgz",- "integrity": "sha512-MC9GrgwtlOuSL2WS3DRM3dQ/5y+49KSMMJRH6JiEcU5vE0dX/OtEcX+VfEwpi73x5pSfIjm7xnzjzOFx+sQBIg==",+ "version": "3.502.0",+ "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso/-/client-sso-3.502.0.tgz",+ "integrity": "sha512-OZAYal1+PQgUUtWiHhRayDtX0OD+XpXHKAhjYgEIPbyhQaCMp3/Bq1xDX151piWXvXqXLJHFKb8DUEqzwGO9QA==","optional": true,"dependencies": {"@aws-crypto/sha256-browser": "3.0.0","@aws-crypto/sha256-js": "3.0.0",- "@aws-sdk/middleware-host-header": "3.410.0",- "@aws-sdk/middleware-logger": "3.410.0",- "@aws-sdk/middleware-recursion-detection": "3.410.0",- "@aws-sdk/middleware-user-agent": "3.410.0",- "@aws-sdk/types": "3.410.0",- "@aws-sdk/util-endpoints": "3.410.0",- "@aws-sdk/util-user-agent-browser": "3.410.0",- "@aws-sdk/util-user-agent-node": "3.410.0",- "@smithy/config-resolver": "^2.0.7",- "@smithy/fetch-http-handler": "^2.1.2",- "@smithy/hash-node": "^2.0.6",- "@smithy/invalid-dependency": "^2.0.6",- "@smithy/middleware-content-length": "^2.0.8",- "@smithy/middleware-endpoint": "^2.0.6",- "@smithy/middleware-retry": "^2.0.9",- "@smithy/middleware-serde": "^2.0.6",- "@smithy/middleware-stack": "^2.0.0",- "@smithy/node-config-provider": "^2.0.9",- "@smithy/node-http-handler": "^2.1.2",- "@smithy/protocol-http": "^3.0.2",- "@smithy/smithy-client": "^2.1.3",- "@smithy/types": "^2.3.0",- "@smithy/url-parser": "^2.0.6",- "@smithy/util-base64": "^2.0.0",- "@smithy/util-body-length-browser": "^2.0.0",- "@smithy/util-body-length-node": "^2.1.0",- "@smithy/util-defaults-mode-browser": "^2.0.7",- "@smithy/util-defaults-mode-node": "^2.0.9",- "@smithy/util-retry": "^2.0.0",- "@smithy/util-utf8": "^2.0.0",+ "@aws-sdk/core": "3.496.0",+ "@aws-sdk/middleware-host-header": "3.502.0",+ "@aws-sdk/middleware-logger": "3.502.0",+ "@aws-sdk/middleware-recursion-detection": "3.502.0",+ "@aws-sdk/middleware-user-agent": "3.502.0",+ "@aws-sdk/region-config-resolver": "3.502.0",+ "@aws-sdk/types": "3.502.0",+ "@aws-sdk/util-endpoints": "3.502.0",+ "@aws-sdk/util-user-agent-browser": "3.502.0",+ "@aws-sdk/util-user-agent-node": "3.502.0",+ "@smithy/config-resolver": "^2.1.1",+ "@smithy/core": "^1.3.1",+ "@smithy/fetch-http-handler": "^2.4.1",+ "@smithy/hash-node": "^2.1.1",+ "@smithy/invalid-dependency": "^2.1.1",+ "@smithy/middleware-content-length": "^2.1.1",+ "@smithy/middleware-endpoint": "^2.4.1",+ "@smithy/middleware-retry": "^2.1.1",+ "@smithy/middleware-serde": "^2.1.1",+ "@smithy/middleware-stack": "^2.1.1",+ "@smithy/node-config-provider": "^2.2.1",+ "@smithy/node-http-handler": "^2.3.1",+ "@smithy/protocol-http": "^3.1.1",+ "@smithy/smithy-client": "^2.3.1",+ "@smithy/types": "^2.9.1",+ "@smithy/url-parser": "^2.1.1",+ "@smithy/util-base64": "^2.1.1",+ "@smithy/util-body-length-browser": "^2.1.1",+ "@smithy/util-body-length-node": "^2.2.1",+ "@smithy/util-defaults-mode-browser": "^2.1.1",+ "@smithy/util-defaults-mode-node": "^2.1.1",+ "@smithy/util-endpoints": "^1.1.1",+ "@smithy/util-retry": "^2.1.1",+ "@smithy/util-utf8": "^2.1.1",+ "tslib": "^2.5.0"+ },+ "engines": {+ "node": ">=14.0.0"+ }+ },+ "node_modules/@aws-sdk/client-sso-oidc": {+ "version": "3.504.0",+ "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso-oidc/-/client-sso-oidc-3.504.0.tgz",+ "integrity": "sha512-ODA33/nm2srhV08EW0KZAP577UgV0qjyr7Xp2yEo8MXWL4ZqQZprk1c+QKBhjr4Djesrm0VPmSD/np0mtYP68A==",+ "optional": true,+ "dependencies": {+ "@aws-crypto/sha256-browser": "3.0.0",+ "@aws-crypto/sha256-js": "3.0.0",+ "@aws-sdk/client-sts": "3.504.0",+ "@aws-sdk/core": "3.496.0",+ "@aws-sdk/middleware-host-header": "3.502.0",+ "@aws-sdk/middleware-logger": "3.502.0",+ "@aws-sdk/middleware-recursion-detection": "3.502.0",+ "@aws-sdk/middleware-signing": "3.502.0",+ "@aws-sdk/middleware-user-agent": "3.502.0",+ "@aws-sdk/region-config-resolver": "3.502.0",+ "@aws-sdk/types": "3.502.0",+ "@aws-sdk/util-endpoints": "3.502.0",+ "@aws-sdk/util-user-agent-browser": "3.502.0",+ "@aws-sdk/util-user-agent-node": "3.502.0",+ "@smithy/config-resolver": "^2.1.1",+ "@smithy/core": "^1.3.1",+ "@smithy/fetch-http-handler": "^2.4.1",+ "@smithy/hash-node": "^2.1.1",+ "@smithy/invalid-dependency": "^2.1.1",+ "@smithy/middleware-content-length": "^2.1.1",+ "@smithy/middleware-endpoint": "^2.4.1",+ "@smithy/middleware-retry": "^2.1.1",+ "@smithy/middleware-serde": "^2.1.1",+ "@smithy/middleware-stack": "^2.1.1",+ "@smithy/node-config-provider": "^2.2.1",+ "@smithy/node-http-handler": "^2.3.1",+ "@smithy/protocol-http": "^3.1.1",+ "@smithy/smithy-client": "^2.3.1",+ "@smithy/types": "^2.9.1",+ "@smithy/url-parser": "^2.1.1",+ "@smithy/util-base64": "^2.1.1",+ "@smithy/util-body-length-browser": "^2.1.1",+ "@smithy/util-body-length-node": "^2.2.1",+ "@smithy/util-defaults-mode-browser": "^2.1.1",+ "@smithy/util-defaults-mode-node": "^2.1.1",+ "@smithy/util-endpoints": "^1.1.1",+ "@smithy/util-retry": "^2.1.1",+ "@smithy/util-utf8": "^2.1.1","tslib": "^2.5.0"},"engines": {"node": ">=14.0.0"+ },+ "peerDependencies": {+ "@aws-sdk/credential-provider-node": "^3.504.0"}},"node_modules/@aws-sdk/client-sts": {- "version": "3.410.0",- "resolved": "https://registry.npmjs.org/@aws-sdk/client-sts/-/client-sts-3.410.0.tgz",- "integrity": "sha512-e6VMrBJtnTxxUXwDmkADGIvyppmDMFf4+cGGA68tVCUm1cFNlCI6M/67bVSIPN/WVKAAfhEL5O2vVXCM7aatYg==",+ "version": "3.504.0",+ "resolved": "https://registry.npmjs.org/@aws-sdk/client-sts/-/client-sts-3.504.0.tgz",+ "integrity": "sha512-IESs8FkL7B/uY+ml4wgoRkrr6xYo4PizcNw6JX17eveq1gRBCPKeGMjE6HTDOcIYZZ8rqz/UeuH3JD4UhrMOnA==","optional": true,"dependencies": {"@aws-crypto/sha256-browser": "3.0.0","@aws-crypto/sha256-js": "3.0.0",- "@aws-sdk/credential-provider-node": "3.410.0",- "@aws-sdk/middleware-host-header": "3.410.0",- "@aws-sdk/middleware-logger": "3.410.0",- "@aws-sdk/middleware-recursion-detection": "3.410.0",- "@aws-sdk/middleware-sdk-sts": "3.410.0",- "@aws-sdk/middleware-signing": "3.410.0",- "@aws-sdk/middleware-user-agent": "3.410.0",- "@aws-sdk/types": "3.410.0",- "@aws-sdk/util-endpoints": "3.410.0",- "@aws-sdk/util-user-agent-browser": "3.410.0",- "@aws-sdk/util-user-agent-node": "3.410.0",- "@smithy/config-resolver": "^2.0.7",- "@smithy/fetch-http-handler": "^2.1.2",- "@smithy/hash-node": "^2.0.6",- "@smithy/invalid-dependency": "^2.0.6",- "@smithy/middleware-content-length": "^2.0.8",- "@smithy/middleware-endpoint": "^2.0.6",- "@smithy/middleware-retry": "^2.0.9",- "@smithy/middleware-serde": "^2.0.6",- "@smithy/middleware-stack": "^2.0.0",- "@smithy/node-config-provider": "^2.0.9",- "@smithy/node-http-handler": "^2.1.2",- "@smithy/protocol-http": "^3.0.2",- "@smithy/smithy-client": "^2.1.3",- "@smithy/types": "^2.3.0",- "@smithy/url-parser": "^2.0.6",- "@smithy/util-base64": "^2.0.0",- "@smithy/util-body-length-browser": "^2.0.0",- "@smithy/util-body-length-node": "^2.1.0",- "@smithy/util-defaults-mode-browser": "^2.0.7",- "@smithy/util-defaults-mode-node": "^2.0.9",- "@smithy/util-retry": "^2.0.0",- "@smithy/util-utf8": "^2.0.0",+ "@aws-sdk/core": "3.496.0",+ "@aws-sdk/middleware-host-header": "3.502.0",+ "@aws-sdk/middleware-logger": "3.502.0",+ "@aws-sdk/middleware-recursion-detection": "3.502.0",+ "@aws-sdk/middleware-user-agent": "3.502.0",+ "@aws-sdk/region-config-resolver": "3.502.0",+ "@aws-sdk/types": "3.502.0",+ "@aws-sdk/util-endpoints": "3.502.0",+ "@aws-sdk/util-user-agent-browser": "3.502.0",+ "@aws-sdk/util-user-agent-node": "3.502.0",+ "@smithy/config-resolver": "^2.1.1",+ "@smithy/core": "^1.3.1",+ "@smithy/fetch-http-handler": "^2.4.1",+ "@smithy/hash-node": "^2.1.1",+ "@smithy/invalid-dependency": "^2.1.1",+ "@smithy/middleware-content-length": "^2.1.1",+ "@smithy/middleware-endpoint": "^2.4.1",+ "@smithy/middleware-retry": "^2.1.1",+ "@smithy/middleware-serde": "^2.1.1",+ "@smithy/middleware-stack": "^2.1.1",+ "@smithy/node-config-provider": "^2.2.1",+ "@smithy/node-http-handler": "^2.3.1",+ "@smithy/protocol-http": "^3.1.1",+ "@smithy/smithy-client": "^2.3.1",+ "@smithy/types": "^2.9.1",+ "@smithy/url-parser": "^2.1.1",+ "@smithy/util-base64": "^2.1.1",+ "@smithy/util-body-length-browser": "^2.1.1",+ "@smithy/util-body-length-node": "^2.2.1",+ "@smithy/util-defaults-mode-browser": "^2.1.1",+ "@smithy/util-defaults-mode-node": "^2.1.1",+ "@smithy/util-endpoints": "^1.1.1",+ "@smithy/util-middleware": "^2.1.1",+ "@smithy/util-retry": "^2.1.1",+ "@smithy/util-utf8": "^2.1.1","fast-xml-parser": "4.2.5","tslib": "^2.5.0"},+ "engines": {+ "node": ">=14.0.0"+ },+ "peerDependencies": {+ "@aws-sdk/credential-provider-node": "^3.504.0"+ }+ },+ "node_modules/@aws-sdk/core": {+ "version": "3.496.0",+ "resolved": "https://registry.npmjs.org/@aws-sdk/core/-/core-3.496.0.tgz",+ "integrity": "sha512-yT+ug7Cw/3eJi7x2es0+46x12+cIJm5Xv+GPWsrTFD1TKgqO/VPEgfDtHFagDNbFmjNQA65Ygc/kEdIX9ICX/A==",+ "optional": true,+ "dependencies": {+ "@smithy/core": "^1.3.1",+ "@smithy/protocol-http": "^3.1.1",+ "@smithy/signature-v4": "^2.1.1",+ "@smithy/smithy-client": "^2.3.1",+ "@smithy/types": "^2.9.1",+ "tslib": "^2.5.0"+ },"engines": {"node": ">=14.0.0"}},"node_modules/@aws-sdk/credential-provider-cognito-identity": {- "version": "3.410.0",- "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-cognito-identity/-/credential-provider-cognito-identity-3.410.0.tgz",- "integrity": "sha512-2QMvdnwnYsKnwy8O+o9ozKL80VFWI0skXVvKB3DFW4cr9IX5cBCx7xuhI7TXbCqiBxuz5SSiA1s19fVtq0sUmw==",+ "version": "3.504.0",+ "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-cognito-identity/-/credential-provider-cognito-identity-3.504.0.tgz",+ "integrity": "sha512-QRmKLl4wM7Yd1HBzUdHIA+QhQxLROXptQjwMNL+KNfl5vMFYOUt0FMXwg80DRHl7qEScvZZEDovcswuuw5Uo2w==","optional": true,"dependencies": {- "@aws-sdk/client-cognito-identity": "3.410.0",- "@aws-sdk/types": "3.410.0",- "@smithy/property-provider": "^2.0.0",- "@smithy/types": "^2.3.0",+ "@aws-sdk/client-cognito-identity": "3.504.0",+ "@aws-sdk/types": "3.502.0",+ "@smithy/property-provider": "^2.1.1",+ "@smithy/types": "^2.9.1","tslib": "^2.5.0"},"engines": {@@ -1272,14 +642,34 @@}},"node_modules/@aws-sdk/credential-provider-env": {- "version": "3.410.0",- "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-env/-/credential-provider-env-3.410.0.tgz",- "integrity": "sha512-c7TB9LbN0PkFOsXI0lcRJnqPNOmc4VBvrHf8jP/BkTDg4YUoKQKOFd4d0SqzODmlZiAyoMQVZTR4ISZo95Zj4Q==",+ "version": "3.502.0",+ "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-env/-/credential-provider-env-3.502.0.tgz",+ "integrity": "sha512-KIB8Ae1Z7domMU/jU4KiIgK4tmYgvuXlhR54ehwlVHxnEoFPoPuGHFZU7oFn79jhhSLUFQ1lRYMxP0cEwb7XeQ==",+ "optional": true,+ "dependencies": {+ "@aws-sdk/types": "3.502.0",+ "@smithy/property-provider": "^2.1.1",+ "@smithy/types": "^2.9.1",+ "tslib": "^2.5.0"+ },+ "engines": {+ "node": ">=14.0.0"+ }+ },+ "node_modules/@aws-sdk/credential-provider-http": {+ "version": "3.503.1",+ "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-http/-/credential-provider-http-3.503.1.tgz",+ "integrity": "sha512-rTdlFFGoPPFMF2YjtlfRuSgKI+XsF49u7d98255hySwhsbwd3Xp+utTTPquxP+CwDxMHbDlI7NxDzFiFdsoZug==","optional": true,"dependencies": {- "@aws-sdk/types": "3.410.0",- "@smithy/property-provider": "^2.0.0",- "@smithy/types": "^2.3.0",+ "@aws-sdk/types": "3.502.0",+ "@smithy/fetch-http-handler": "^2.4.1",+ "@smithy/node-http-handler": "^2.3.1",+ "@smithy/property-provider": "^2.1.1",+ "@smithy/protocol-http": "^3.1.1",+ "@smithy/smithy-client": "^2.3.1",+ "@smithy/types": "^2.9.1",+ "@smithy/util-stream": "^2.1.1","tslib": "^2.5.0"},"engines": {@@ -1287,20 +677,21 @@}},"node_modules/@aws-sdk/credential-provider-ini": {- "version": "3.410.0",- "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.410.0.tgz",- "integrity": "sha512-D8rcr5bRCFD0f42MPQ7K6TWZq5d3pfqrKINL1/bpfkK5BJbvq1BGYmR88UC6CLpTRtZ1LHY2HgYG0fp/2zjjww==",+ "version": "3.504.0",+ "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.504.0.tgz",+ "integrity": "sha512-ODICLXfr8xTUd3wweprH32Ge41yuBa+u3j0JUcLdTUO1N9ldczSMdo8zOPlP0z4doqD3xbnqMkjNQWgN/Q+5oQ==","optional": true,"dependencies": {- "@aws-sdk/credential-provider-env": "3.410.0",- "@aws-sdk/credential-provider-process": "3.410.0",- "@aws-sdk/credential-provider-sso": "3.410.0",- "@aws-sdk/credential-provider-web-identity": "3.410.0",- "@aws-sdk/types": "3.410.0",- "@smithy/credential-provider-imds": "^2.0.0",- "@smithy/property-provider": "^2.0.0",- "@smithy/shared-ini-file-loader": "^2.0.6",- "@smithy/types": "^2.3.0",+ "@aws-sdk/client-sts": "3.504.0",+ "@aws-sdk/credential-provider-env": "3.502.0",+ "@aws-sdk/credential-provider-process": "3.502.0",+ "@aws-sdk/credential-provider-sso": "3.504.0",+ "@aws-sdk/credential-provider-web-identity": "3.504.0",+ "@aws-sdk/types": "3.502.0",+ "@smithy/credential-provider-imds": "^2.2.1",+ "@smithy/property-provider": "^2.1.1",+ "@smithy/shared-ini-file-loader": "^2.3.1",+ "@smithy/types": "^2.9.1","tslib": "^2.5.0"},"engines": {@@ -1308,21 +699,22 @@}},"node_modules/@aws-sdk/credential-provider-node": {- "version": "3.410.0",- "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-node/-/credential-provider-node-3.410.0.tgz",- "integrity": "sha512-0wmVm33T/j1FS7MZ/j+WsPlgSc0YnCXnpbWSov1Mn6R86SHI2b2JhdIPRRE4XbGfyW2QGNUl2CwoZVaqhXeF5g==",+ "version": "3.504.0",+ "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-node/-/credential-provider-node-3.504.0.tgz",+ "integrity": "sha512-6+V5hIh+tILmUjf2ZQWQINR3atxQVgH/bFrGdSR/sHSp/tEgw3m0xWL3IRslWU1e4/GtXrfg1iYnMknXy68Ikw==","optional": true,"dependencies": {- "@aws-sdk/credential-provider-env": "3.410.0",- "@aws-sdk/credential-provider-ini": "3.410.0",- "@aws-sdk/credential-provider-process": "3.410.0",- "@aws-sdk/credential-provider-sso": "3.410.0",- "@aws-sdk/credential-provider-web-identity": "3.410.0",- "@aws-sdk/types": "3.410.0",- "@smithy/credential-provider-imds": "^2.0.0",- "@smithy/property-provider": "^2.0.0",- "@smithy/shared-ini-file-loader": "^2.0.6",- "@smithy/types": "^2.3.0",+ "@aws-sdk/credential-provider-env": "3.502.0",+ "@aws-sdk/credential-provider-http": "3.503.1",+ "@aws-sdk/credential-provider-ini": "3.504.0",+ "@aws-sdk/credential-provider-process": "3.502.0",+ "@aws-sdk/credential-provider-sso": "3.504.0",+ "@aws-sdk/credential-provider-web-identity": "3.504.0",+ "@aws-sdk/types": "3.502.0",+ "@smithy/credential-provider-imds": "^2.2.1",+ "@smithy/property-provider": "^2.1.1",+ "@smithy/shared-ini-file-loader": "^2.3.1",+ "@smithy/types": "^2.9.1","tslib": "^2.5.0"},"engines": {@@ -1330,15 +722,15 @@}},"node_modules/@aws-sdk/credential-provider-process": {- "version": "3.410.0",- "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-process/-/credential-provider-process-3.410.0.tgz",- "integrity": "sha512-BMju1hlDCDNkkSZpKF5SQ8G0WCLRj6/Jvw9QmudLHJuVwYJXEW1r2AsVMg98OZ3hB9G+MAvHruHZIbMiNmUMXQ==",+ "version": "3.502.0",+ "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-process/-/credential-provider-process-3.502.0.tgz",+ "integrity": "sha512-fJJowOjQ4infYQX0E1J3xFVlmuwEYJAFk0Mo1qwafWmEthsBJs+6BR2RiWDELHKrSK35u4Pf3fu3RkYuCtmQFw==","optional": true,"dependencies": {- "@aws-sdk/types": "3.410.0",- "@smithy/property-provider": "^2.0.0",- "@smithy/shared-ini-file-loader": "^2.0.6",- "@smithy/types": "^2.3.0",+ "@aws-sdk/types": "3.502.0",+ "@smithy/property-provider": "^2.1.1",+ "@smithy/shared-ini-file-loader": "^2.3.1",+ "@smithy/types": "^2.9.1","tslib": "^2.5.0"},"engines": {@@ -1346,17 +738,17 @@}},"node_modules/@aws-sdk/credential-provider-sso": {- "version": "3.410.0",- "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.410.0.tgz",- "integrity": "sha512-zEaoY/sY+KYTlQUkp9dvveAHf175b8RIt0DsQkDrRPtrg/RBHR00r5rFvz9+nrwsR8546RaBU7h/zzTaQGhmcA==",+ "version": "3.504.0",+ "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.504.0.tgz",+ "integrity": "sha512-4MgH2or2SjPzaxM08DCW+BjaX4DSsEGJlicHKmz6fh+w9JmLh750oXcTnbvgUeVz075jcs6qTKjvUcsdGM/t8Q==","optional": true,"dependencies": {- "@aws-sdk/client-sso": "3.410.0",- "@aws-sdk/token-providers": "3.410.0",- "@aws-sdk/types": "3.410.0",- "@smithy/property-provider": "^2.0.0",- "@smithy/shared-ini-file-loader": "^2.0.6",- "@smithy/types": "^2.3.0",+ "@aws-sdk/client-sso": "3.502.0",+ "@aws-sdk/token-providers": "3.504.0",+ "@aws-sdk/types": "3.502.0",+ "@smithy/property-provider": "^2.1.1",+ "@smithy/shared-ini-file-loader": "^2.3.1",+ "@smithy/types": "^2.9.1","tslib": "^2.5.0"},"engines": {@@ -1364,14 +756,15 @@}},"node_modules/@aws-sdk/credential-provider-web-identity": {- "version": "3.410.0",- "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-web-identity/-/credential-provider-web-identity-3.410.0.tgz",- "integrity": "sha512-cE0l8LmEHdWbDkdPNgrfdYSgp4/cIVXrjUKI1QCATA729CrHZ/OQjB/maOBOrMHO9YTiggko887NkslVvwVB7w==",+ "version": "3.504.0",+ "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-web-identity/-/credential-provider-web-identity-3.504.0.tgz",+ "integrity": "sha512-L1ljCvGpIEFdJk087ijf2ohg7HBclOeB1UgBxUBBzf4iPRZTQzd2chGaKj0hm2VVaXz7nglswJeURH5PFcS5oA==","optional": true,"dependencies": {- "@aws-sdk/types": "3.410.0",- "@smithy/property-provider": "^2.0.0",- "@smithy/types": "^2.3.0",+ "@aws-sdk/client-sts": "3.504.0",+ "@aws-sdk/types": "3.502.0",+ "@smithy/property-provider": "^2.1.1",+ "@smithy/types": "^2.9.1","tslib": "^2.5.0"},"engines": {@@ -1379,25 +772,26 @@}},"node_modules/@aws-sdk/credential-providers": {- "version": "3.410.0",- "resolved": "https://registry.npmjs.org/@aws-sdk/credential-providers/-/credential-providers-3.410.0.tgz",- "integrity": "sha512-QcunzQRNi9dJdAGdduST7itRW+QhDrb9zZHn+HhLKUoVwLrqk1iuH2R9SoEdZg8eV5jR04yoOPdjj1jzdIkFXQ==",+ "version": "3.504.1",+ "resolved": "https://registry.npmjs.org/@aws-sdk/credential-providers/-/credential-providers-3.504.1.tgz",+ "integrity": "sha512-D/ef7ZVxJVXC1qe6ZMS0dOWM92LNHJRHn9Biz5eRqRvRhNL+Rq68ZULlc0TQTVY71Fcc5TJ8OwFhaboPUiqWXA==","optional": true,"dependencies": {- "@aws-sdk/client-cognito-identity": "3.410.0",- "@aws-sdk/client-sso": "3.410.0",- "@aws-sdk/client-sts": "3.410.0",- "@aws-sdk/credential-provider-cognito-identity": "3.410.0",- "@aws-sdk/credential-provider-env": "3.410.0",- "@aws-sdk/credential-provider-ini": "3.410.0",- "@aws-sdk/credential-provider-node": "3.410.0",- "@aws-sdk/credential-provider-process": "3.410.0",- "@aws-sdk/credential-provider-sso": "3.410.0",- "@aws-sdk/credential-provider-web-identity": "3.410.0",- "@aws-sdk/types": "3.410.0",- "@smithy/credential-provider-imds": "^2.0.0",- "@smithy/property-provider": "^2.0.0",- "@smithy/types": "^2.3.0",+ "@aws-sdk/client-cognito-identity": "3.504.0",+ "@aws-sdk/client-sso": "3.502.0",+ "@aws-sdk/client-sts": "3.504.0",+ "@aws-sdk/credential-provider-cognito-identity": "3.504.0",+ "@aws-sdk/credential-provider-env": "3.502.0",+ "@aws-sdk/credential-provider-http": "3.503.1",+ "@aws-sdk/credential-provider-ini": "3.504.0",+ "@aws-sdk/credential-provider-node": "3.504.0",+ "@aws-sdk/credential-provider-process": "3.502.0",+ "@aws-sdk/credential-provider-sso": "3.504.0",+ "@aws-sdk/credential-provider-web-identity": "3.504.0",+ "@aws-sdk/types": "3.502.0",+ "@smithy/credential-provider-imds": "^2.2.1",+ "@smithy/property-provider": "^2.1.1",+ "@smithy/types": "^2.9.1","tslib": "^2.5.0"},"engines": {@@ -1405,14 +799,14 @@}},"node_modules/@aws-sdk/middleware-host-header": {- "version": "3.410.0",- "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-host-header/-/middleware-host-header-3.410.0.tgz",- "integrity": "sha512-ED/OVcyITln5rrxnajZP+V0PN1nug+gSDHJDqdDo/oLy7eiDr/ZWn3nlWW7WcMplQ1/Jnb+hK0UetBp/25XooA==",+ "version": "3.502.0",+ "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-host-header/-/middleware-host-header-3.502.0.tgz",+ "integrity": "sha512-EjnG0GTYXT/wJBmm5/mTjDcAkzU8L7wQjOzd3FTXuTCNNyvAvwrszbOj5FlarEw5XJBbQiZtBs+I5u9+zy560w==","optional": true,"dependencies": {- "@aws-sdk/types": "3.410.0",- "@smithy/protocol-http": "^3.0.2",- "@smithy/types": "^2.3.0",+ "@aws-sdk/types": "3.502.0",+ "@smithy/protocol-http": "^3.1.1",+ "@smithy/types": "^2.9.1","tslib": "^2.5.0"},"engines": {@@ -1420,13 +814,13 @@}},"node_modules/@aws-sdk/middleware-logger": {- "version": "3.410.0",- "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-logger/-/middleware-logger-3.410.0.tgz",- "integrity": "sha512-YtmKYCVtBfScq3/UFJk+aSZOktKJBNZL9DaSc2aPcy/goCVsYDOkGwtHk0jIkC1JRSNCkVTqL7ya60sSr8zaQQ==",+ "version": "3.502.0",+ "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-logger/-/middleware-logger-3.502.0.tgz",+ "integrity": "sha512-FDyv6K4nCoHxbjLGS2H8ex8I0KDIiu4FJgVRPs140ZJy6gE5Pwxzv6YTzZGLMrnqcIs9gh065Lf6DjwMelZqaw==","optional": true,"dependencies": {- "@aws-sdk/types": "3.410.0",- "@smithy/types": "^2.3.0",+ "@aws-sdk/types": "3.502.0",+ "@smithy/types": "^2.9.1","tslib": "^2.5.0"},"engines": {@@ -1434,63 +828,65 @@}},"node_modules/@aws-sdk/middleware-recursion-detection": {- "version": "3.410.0",- "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-recursion-detection/-/middleware-recursion-detection-3.410.0.tgz",- "integrity": "sha512-KWaes5FLzRqj28vaIEE4Bimpga2E596WdPF2HaH6zsVMJddoRDsc3ZX9ZhLOGrXzIO1RqBd0QxbLrM0S/B2aOQ==",+ "version": "3.502.0",+ "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-recursion-detection/-/middleware-recursion-detection-3.502.0.tgz",+ "integrity": "sha512-hvbyGJbxeuezxOu8VfFmcV4ql1hKXLxHTe5FNYfEBat2KaZXVhc1Hg+4TvB06/53p+E8J99Afmumkqbxs2esUA==","optional": true,"dependencies": {- "@aws-sdk/types": "3.410.0",- "@smithy/protocol-http": "^3.0.2",- "@smithy/types": "^2.3.0",+ "@aws-sdk/types": "3.502.0",+ "@smithy/protocol-http": "^3.1.1",+ "@smithy/types": "^2.9.1","tslib": "^2.5.0"},"engines": {"node": ">=14.0.0"}},- "node_modules/@aws-sdk/middleware-sdk-sts": {- "version": "3.410.0",- "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-sdk-sts/-/middleware-sdk-sts-3.410.0.tgz",- "integrity": "sha512-YfBpctDocRR4CcROoDueJA7D+aMLBV8nTFfmVNdLLLgyuLZ/AUR11VQSu1lf9gQZKl8IpKE/BLf2fRE/qV1ZuA==",+ "node_modules/@aws-sdk/middleware-signing": {+ "version": "3.502.0",+ "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-signing/-/middleware-signing-3.502.0.tgz",+ "integrity": "sha512-4hF08vSzJ7L6sB+393gOFj3s2N6nLusYS0XrMW6wYNFU10IDdbf8Z3TZ7gysDJJHEGQPmTAesPEDBsasGWcMxg==","optional": true,"dependencies": {- "@aws-sdk/middleware-signing": "3.410.0",- "@aws-sdk/types": "3.410.0",- "@smithy/types": "^2.3.0",+ "@aws-sdk/types": "3.502.0",+ "@smithy/property-provider": "^2.1.1",+ "@smithy/protocol-http": "^3.1.1",+ "@smithy/signature-v4": "^2.1.1",+ "@smithy/types": "^2.9.1",+ "@smithy/util-middleware": "^2.1.1","tslib": "^2.5.0"},"engines": {"node": ">=14.0.0"}},- "node_modules/@aws-sdk/middleware-signing": {- "version": "3.410.0",- "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-signing/-/middleware-signing-3.410.0.tgz",- "integrity": "sha512-KBAZ/eoAJUSJv5us2HsKwK2OszG2s9FEyKpEhgnHLcbbKzW873zHBH5GcOGEQu4AWArTy2ndzJu3FF+9/J9hJQ==",+ "node_modules/@aws-sdk/middleware-user-agent": {+ "version": "3.502.0",+ "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-user-agent/-/middleware-user-agent-3.502.0.tgz",+ "integrity": "sha512-TxbBZbRiXPH0AUxegqiNd9aM9zNSbfjtBs5MEfcBsweeT/B2O7K1EjP9+CkB8Xmk/5FLKhAKLr19b1TNoE27rw==","optional": true,"dependencies": {- "@aws-sdk/types": "3.410.0",- "@smithy/property-provider": "^2.0.0",- "@smithy/protocol-http": "^3.0.2",- "@smithy/signature-v4": "^2.0.0",- "@smithy/types": "^2.3.0",- "@smithy/util-middleware": "^2.0.0",+ "@aws-sdk/types": "3.502.0",+ "@aws-sdk/util-endpoints": "3.502.0",+ "@smithy/protocol-http": "^3.1.1",+ "@smithy/types": "^2.9.1","tslib": "^2.5.0"},"engines": {"node": ">=14.0.0"}},- "node_modules/@aws-sdk/middleware-user-agent": {- "version": "3.410.0",- "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-user-agent/-/middleware-user-agent-3.410.0.tgz",- "integrity": "sha512-ZayDtLfvCZUohSxQc/49BfoU/y6bDHLfLdyyUJbJ54Sv8zQcrmdyKvCBFUZwE6tHQgAmv9/ZT18xECMl+xiONA==",+ "node_modules/@aws-sdk/region-config-resolver": {+ "version": "3.502.0",+ "resolved": "https://registry.npmjs.org/@aws-sdk/region-config-resolver/-/region-config-resolver-3.502.0.tgz",+ "integrity": "sha512-mxmsX2AGgnSM+Sah7mcQCIneOsJQNiLX0COwEttuf8eO+6cLMAZvVudH3BnWTfea4/A9nuri9DLCqBvEmPrilg==","optional": true,"dependencies": {- "@aws-sdk/types": "3.410.0",- "@aws-sdk/util-endpoints": "3.410.0",- "@smithy/protocol-http": "^3.0.2",- "@smithy/types": "^2.3.0",+ "@aws-sdk/types": "3.502.0",+ "@smithy/node-config-provider": "^2.2.1",+ "@smithy/types": "^2.9.1",+ "@smithy/util-config-provider": "^2.2.1",+ "@smithy/util-middleware": "^2.1.1","tslib": "^2.5.0"},"engines": {@@ -1498,45 +894,16 @@}},"node_modules/@aws-sdk/token-providers": {- "version": "3.410.0",- "resolved": "https://registry.npmjs.org/@aws-sdk/token-providers/-/token-providers-3.410.0.tgz",- "integrity": "sha512-d5Nc0xydkH/X0LA1HDyhGY5sEv4LuADFk+QpDtT8ogLilcre+b1jpdY8Sih/gd1KoGS1H+d1tz2hSGwUHAbUbw==",+ "version": "3.504.0",+ "resolved": "https://registry.npmjs.org/@aws-sdk/token-providers/-/token-providers-3.504.0.tgz",+ "integrity": "sha512-YIJWWsZi2ClUiILS1uh5L6VjmCUSTI6KKMuL9DkGjYqJ0aI6M8bd8fT9Wm7QmXCyjcArTgr/Atkhia4T7oKvzQ==","optional": true,"dependencies": {- "@aws-crypto/sha256-browser": "3.0.0",- "@aws-crypto/sha256-js": "3.0.0",- "@aws-sdk/middleware-host-header": "3.410.0",- "@aws-sdk/middleware-logger": "3.410.0",- "@aws-sdk/middleware-recursion-detection": "3.410.0",- "@aws-sdk/middleware-user-agent": "3.410.0",- "@aws-sdk/types": "3.410.0",- "@aws-sdk/util-endpoints": "3.410.0",- "@aws-sdk/util-user-agent-browser": "3.410.0",- "@aws-sdk/util-user-agent-node": "3.410.0",- "@smithy/config-resolver": "^2.0.7",- "@smithy/fetch-http-handler": "^2.1.2",- "@smithy/hash-node": "^2.0.6",- "@smithy/invalid-dependency": "^2.0.6",- "@smithy/middleware-content-length": "^2.0.8",- "@smithy/middleware-endpoint": "^2.0.6",- "@smithy/middleware-retry": "^2.0.9",- "@smithy/middleware-serde": "^2.0.6",- "@smithy/middleware-stack": "^2.0.0",- "@smithy/node-config-provider": "^2.0.9",- "@smithy/node-http-handler": "^2.1.2",- "@smithy/property-provider": "^2.0.0",- "@smithy/protocol-http": "^3.0.2",- "@smithy/shared-ini-file-loader": "^2.0.6",- "@smithy/smithy-client": "^2.1.3",- "@smithy/types": "^2.3.0",- "@smithy/url-parser": "^2.0.6",- "@smithy/util-base64": "^2.0.0",- "@smithy/util-body-length-browser": "^2.0.0",- "@smithy/util-body-length-node": "^2.1.0",- "@smithy/util-defaults-mode-browser": "^2.0.7",- "@smithy/util-defaults-mode-node": "^2.0.9",- "@smithy/util-retry": "^2.0.0",- "@smithy/util-utf8": "^2.0.0",+ "@aws-sdk/client-sso-oidc": "3.504.0",+ "@aws-sdk/types": "3.502.0",+ "@smithy/property-provider": "^2.1.1",+ "@smithy/shared-ini-file-loader": "^2.3.1",+ "@smithy/types": "^2.9.1","tslib": "^2.5.0"},"engines": {@@ -1544,12 +911,12 @@}},"node_modules/@aws-sdk/types": {- "version": "3.410.0",- "resolved": "https://registry.npmjs.org/@aws-sdk/types/-/types-3.410.0.tgz",- "integrity": "sha512-D7iaUCszv/v04NDaZUmCmekamy6VD/lKozm/3gS9+dkfU6cC2CsNoUfPV8BlV6dPdw0oWgF91am3I1stdvfVrQ==",+ "version": "3.502.0",+ "resolved": "https://registry.npmjs.org/@aws-sdk/types/-/types-3.502.0.tgz",+ "integrity": "sha512-M0DSPYe/gXhwD2QHgoukaZv5oDxhW3FfvYIrJptyqUq3OnPJBcDbihHjrE0PBtfh/9kgMZT60/fQ2NVFANfa2g==","optional": true,"dependencies": {- "@smithy/types": "^2.3.0",+ "@smithy/types": "^2.9.1","tslib": "^2.5.0"},"engines": {@@ -1557,12 +924,14 @@}},"node_modules/@aws-sdk/util-endpoints": {- "version": "3.410.0",- "resolved": "https://registry.npmjs.org/@aws-sdk/util-endpoints/-/util-endpoints-3.410.0.tgz",- "integrity": "sha512-iNiqJyC7N3+8zFwnXUqcWSxrZecVZLToo1iTQQdeYL2af1IcOtRgb7n8jpAI/hmXhBSx2+3RI+Y7pxyFo1vu+w==",+ "version": "3.502.0",+ "resolved": "https://registry.npmjs.org/@aws-sdk/util-endpoints/-/util-endpoints-3.502.0.tgz",+ "integrity": "sha512-6LKFlJPp2J24r1Kpfoz5ESQn+1v5fEjDB3mtUKRdpwarhm3syu7HbKlHCF3KbcCOyahobvLvhoedT78rJFEeeg==","optional": true,"dependencies": {- "@aws-sdk/types": "3.410.0",+ "@aws-sdk/types": "3.502.0",+ "@smithy/types": "^2.9.1",+ "@smithy/util-endpoints": "^1.1.1","tslib": "^2.5.0"},"engines": {@@ -1570,9 +939,9 @@}},"node_modules/@aws-sdk/util-locate-window": {- "version": "3.310.0",- "resolved": "https://registry.npmjs.org/@aws-sdk/util-locate-window/-/util-locate-window-3.310.0.tgz",- "integrity": "sha512-qo2t/vBTnoXpjKxlsC2e1gBrRm80M3bId27r0BRB2VniSSe7bL1mmzM+/HFtujm0iAxtPM+aLEflLJlJeDPg0w==",+ "version": "3.495.0",+ "resolved": "https://registry.npmjs.org/@aws-sdk/util-locate-window/-/util-locate-window-3.495.0.tgz",+ "integrity": "sha512-MfaPXT0kLX2tQaR90saBT9fWQq2DHqSSJRzW+MZWsmF+y5LGCOhO22ac/2o6TKSQm7h0HRc2GaADqYYYor62yg==","optional": true,"dependencies": {"tslib": "^2.5.0"@@ -1582,26 +951,26 @@}},"node_modules/@aws-sdk/util-user-agent-browser": {- "version": "3.410.0",- "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-browser/-/util-user-agent-browser-3.410.0.tgz",- "integrity": "sha512-i1G/XGpXGMRT2zEiAhi1xucJsfCWk8nNYjk/LbC0sA+7B9Huri96YAzVib12wkHPsJQvZxZC6CpQDIHWm4lXMA==",+ "version": "3.502.0",+ "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-browser/-/util-user-agent-browser-3.502.0.tgz",+ "integrity": "sha512-v8gKyCs2obXoIkLETAeEQ3AM+QmhHhst9xbM1cJtKUGsRlVIak/XyyD+kVE6kmMm1cjfudHpHKABWk9apQcIZQ==","optional": true,"dependencies": {- "@aws-sdk/types": "3.410.0",- "@smithy/types": "^2.3.0",+ "@aws-sdk/types": "3.502.0",+ "@smithy/types": "^2.9.1","bowser": "^2.11.0","tslib": "^2.5.0"}},"node_modules/@aws-sdk/util-user-agent-node": {- "version": "3.410.0",- "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-node/-/util-user-agent-node-3.410.0.tgz",- "integrity": "sha512-bK70t1jHRl8HrJXd4hEIwc5PBZ7U0w+81AKFnanIVKZwZedd6nLibUXDTK14z/Jp2GFcBqd4zkt2YLGkRt/U4A==",+ "version": "3.502.0",+ "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-node/-/util-user-agent-node-3.502.0.tgz",+ "integrity": "sha512-9RjxpkGZKbTdl96tIJvAo+vZoz4P/cQh36SBUt9xfRfW0BtsaLyvSrvlR5wyUYhvRcC12Axqh/8JtnAPq//+Vw==","optional": true,"dependencies": {- "@aws-sdk/types": "3.410.0",- "@smithy/node-config-provider": "^2.0.9",- "@smithy/types": "^2.3.0",+ "@aws-sdk/types": "3.502.0",+ "@smithy/node-config-provider": "^2.2.1",+ "@smithy/types": "^2.9.1","tslib": "^2.5.0"},"engines": {@@ -1626,35 +995,35 @@}},"node_modules/@azure/abort-controller": {- "version": "1.1.0",- "resolved": "https://registry.npmjs.org/@azure/abort-controller/-/abort-controller-1.1.0.tgz",- "integrity": "sha512-TrRLIoSQVzfAJX9H1JeFjzAoDGcoK1IYX1UImfceTZpsyYfWr09Ss1aHW1y5TrrR3iq6RZLBwJ3E24uwPhwahw==",+ "version": "2.0.0",+ "resolved": "https://registry.npmjs.org/@azure/abort-controller/-/abort-controller-2.0.0.tgz",+ "integrity": "sha512-RP/mR/WJchR+g+nQFJGOec+nzeN/VvjlwbinccoqfhTsTHbb8X5+mLDp48kHT0ueyum0BNSwGm0kX0UZuIqTGg==","dependencies": {"tslib": "^2.2.0"},"engines": {- "node": ">=12.0.0"+ "node": ">=18.0.0"}},"node_modules/@azure/core-auth": {- "version": "1.5.0",- "resolved": "https://registry.npmjs.org/@azure/core-auth/-/core-auth-1.5.0.tgz",- "integrity": "sha512-udzoBuYG1VBoHVohDTrvKjyzel34zt77Bhp7dQntVGGD0ehVq48owENbBG8fIgkHRNUBQH5k1r0hpoMu5L8+kw==",+ "version": "1.6.0",+ "resolved": "https://registry.npmjs.org/@azure/core-auth/-/core-auth-1.6.0.tgz",+ "integrity": "sha512-3X9wzaaGgRaBCwhLQZDtFp5uLIXCPrGbwJNWPPugvL4xbIGgScv77YzzxToKGLAKvG9amDoofMoP+9hsH1vs1w==","dependencies": {- "@azure/abort-controller": "^1.0.0",+ "@azure/abort-controller": "^2.0.0","@azure/core-util": "^1.1.0","tslib": "^2.2.0"},"engines": {- "node": ">=14.0.0"+ "node": ">=18.0.0"}},"node_modules/@azure/core-client": {- "version": "1.7.3",- "resolved": "https://registry.npmjs.org/@azure/core-client/-/core-client-1.7.3.tgz",- "integrity": "sha512-kleJ1iUTxcO32Y06dH9Pfi9K4U+Tlb111WXEnbt7R/ne+NLRwppZiTGJuTD5VVoxTMK5NTbEtm5t2vcdNCFe2g==",+ "version": "1.8.0",+ "resolved": "https://registry.npmjs.org/@azure/core-client/-/core-client-1.8.0.tgz",+ "integrity": "sha512-+gHS3gEzPlhyQBMoqVPOTeNH031R5DM/xpCvz72y38C09rg4Hui/1sJS/ujoisDZbbSHyuRLVWdFlwL0pIFwbg==","dependencies": {- "@azure/abort-controller": "^1.0.0",+ "@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",@@ -1663,7 +1032,7 @@"tslib": "^2.2.0"},"engines": {- "node": ">=14.0.0"+ "node": ">=18.0.0"}},"node_modules/@azure/core-http-compat": {@@ -1679,6 +1048,17 @@"node": ">=14.0.0"}},+ "node_modules/@azure/core-http-compat/node_modules/@azure/abort-controller": {+ "version": "1.1.0",+ "resolved": "https://registry.npmjs.org/@azure/abort-controller/-/abort-controller-1.1.0.tgz",+ "integrity": "sha512-TrRLIoSQVzfAJX9H1JeFjzAoDGcoK1IYX1UImfceTZpsyYfWr09Ss1aHW1y5TrrR3iq6RZLBwJ3E24uwPhwahw==",+ "dependencies": {+ "tslib": "^2.2.0"+ },+ "engines": {+ "node": ">=12.0.0"+ }+ },"node_modules/@azure/core-paging": {"version": "1.5.0","resolved": "https://registry.npmjs.org/@azure/core-paging/-/core-paging-1.5.0.tgz",@@ -1691,22 +1071,21 @@}},"node_modules/@azure/core-rest-pipeline": {- "version": "1.12.2",- "resolved": "https://registry.npmjs.org/@azure/core-rest-pipeline/-/core-rest-pipeline-1.12.2.tgz",- "integrity": "sha512-wLLJQdL4v1yoqYtEtjKNjf8pJ/G/BqVomAWxcKOR1KbZJyCEnCv04yks7Y1NhJ3JzxbDs307W67uX0JzklFdCg==",+ "version": "1.14.0",+ "resolved": "https://registry.npmjs.org/@azure/core-rest-pipeline/-/core-rest-pipeline-1.14.0.tgz",+ "integrity": "sha512-Tp4M6NsjCmn9L5p7HsW98eSOS7A0ibl3e5ntZglozT0XuD/0y6i36iW829ZbBq0qihlGgfaeFpkLjZ418KDm1Q==","dependencies": {- "@azure/abort-controller": "^1.0.0",+ "@azure/abort-controller": "^2.0.0","@azure/core-auth": "^1.4.0","@azure/core-tracing": "^1.0.1","@azure/core-util": "^1.3.0","@azure/logger": "^1.0.0",- "form-data": "^4.0.0","http-proxy-agent": "^5.0.0","https-proxy-agent": "^5.0.0","tslib": "^2.2.0"},"engines": {- "node": ">=16.0.0"+ "node": ">=18.0.0"}},"node_modules/@azure/core-tracing": {@@ -1721,15 +1100,15 @@}},"node_modules/@azure/core-util": {- "version": "1.6.1",- "resolved": "https://registry.npmjs.org/@azure/core-util/-/core-util-1.6.1.tgz",- "integrity": "sha512-h5taHeySlsV9qxuK64KZxy4iln1BtMYlNt5jbuEFN3UFSAd1EwKg/Gjl5a6tZ/W8t6li3xPnutOx7zbDyXnPmQ==",+ "version": "1.7.0",+ "resolved": "https://registry.npmjs.org/@azure/core-util/-/core-util-1.7.0.tgz",+ "integrity": "sha512-Zq2i3QO6k9DA8vnm29mYM4G8IE9u1mhF1GUabVEqPNX8Lj833gdxQ2NAFxt2BZsfAL+e9cT8SyVN7dFVJ/Hf0g==","dependencies": {- "@azure/abort-controller": "^1.0.0",+ "@azure/abort-controller": "^2.0.0","tslib": "^2.2.0"},"engines": {- "node": ">=16.0.0"+ "node": ">=18.0.0"}},"node_modules/@azure/logger": {@@ -1856,9 +1235,9 @@}},"node_modules/@babel/core": {- "version": "7.23.6",- "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.23.6.tgz",- "integrity": "sha512-FxpRyGjrMJXh7X3wGLGhNDCRiwpWEF74sKjTLDJSG5Kyvow3QZaG0Adbqzi9ZrVjTWpsX+2cxWXD71NMg93kdw==",+ "version": "7.23.9",+ "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.23.9.tgz",+ "integrity": "sha512-5q0175NOjddqpvvzU+kDiSOAk4PfdO6FvwCWoQ6RO7rTzEe8vlo+4HVfcnAREhD4npMs0e9uZypjTwzZPCf/cw==","dev": true,"dependencies": {"@ampproject/remapping": "^2.2.0",@@ -1866,11 +1245,11 @@"@babel/generator": "^7.23.6","@babel/helper-compilation-targets": "^7.23.6","@babel/helper-module-transforms": "^7.23.3",- "@babel/helpers": "^7.23.6",- "@babel/parser": "^7.23.6",- "@babel/template": "^7.22.15",- "@babel/traverse": "^7.23.6",- "@babel/types": "^7.23.6",+ "@babel/helpers": "^7.23.9",+ "@babel/parser": "^7.23.9",+ "@babel/template": "^7.23.9",+ "@babel/traverse": "^7.23.9",+ "@babel/types": "^7.23.9","convert-source-map": "^2.0.0","debug": "^4.1.0","gensync": "^1.0.0-beta.2",@@ -1885,12 +1264,6 @@"url": "https://opencollective.com/babel"}},- "node_modules/@babel/core/node_modules/convert-source-map": {- "version": "2.0.0",- "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz",- "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==",- "dev": true- },"node_modules/@babel/core/node_modules/semver": {"version": "6.3.1","resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz",@@ -1965,17 +1338,17 @@}},"node_modules/@babel/helper-create-class-features-plugin": {- "version": "7.22.15",- "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.22.15.tgz",- "integrity": "sha512-jKkwA59IXcvSaiK2UN45kKwSC9o+KuoXsBDvHvU/7BecYIp8GQ2UwrVvFgJASUT+hBnwJx6MhvMCuMzwZZ7jlg==",+ "version": "7.23.10",+ "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.23.10.tgz",+ "integrity": "sha512-2XpP2XhkXzgxecPNEEK8Vz8Asj9aRxt08oKOqtiZoqV2UGZ5T+EkyP9sXQ9nwMxBIG34a7jmasVqoMop7VdPUw==","dev": true,"dependencies": {"@babel/helper-annotate-as-pure": "^7.22.5",- "@babel/helper-environment-visitor": "^7.22.5",- "@babel/helper-function-name": "^7.22.5",- "@babel/helper-member-expression-to-functions": "^7.22.15",+ "@babel/helper-environment-visitor": "^7.22.20",+ "@babel/helper-function-name": "^7.23.0",+ "@babel/helper-member-expression-to-functions": "^7.23.0","@babel/helper-optimise-call-expression": "^7.22.5",- "@babel/helper-replace-supers": "^7.22.9",+ "@babel/helper-replace-supers": "^7.22.20","@babel/helper-skip-transparent-expression-wrappers": "^7.22.5","@babel/helper-split-export-declaration": "^7.22.6","semver": "^6.3.1"@@ -2023,9 +1396,9 @@}},"node_modules/@babel/helper-define-polyfill-provider": {- "version": "0.4.2",- "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.4.2.tgz",- "integrity": "sha512-k0qnnOqHn5dK9pZpfD5XXZ9SojAITdCKRn2Lp6rnDGzIbaP0rHyMPk/4wsSxVBVz4RfN0q6VpXWP2pDGIoQ7hw==",+ "version": "0.5.0",+ "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.5.0.tgz",+ "integrity": "sha512-NovQquuQLAQ5HuyjCz7WQP9MjRj7dx++yspwiyUiGl9ZyadHRSql1HZh5ogRd8W8w6YM6EQ/NTB8rgjLt5W65Q==","dev": true,"dependencies": {"@babel/helper-compilation-targets": "^7.22.6",@@ -2073,12 +1446,12 @@}},"node_modules/@babel/helper-member-expression-to-functions": {- "version": "7.22.15",- "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.22.15.tgz",- "integrity": "sha512-qLNsZbgrNh0fDQBCPocSL8guki1hcPvltGDv/NxvUoABwFq7GkKSu1nRXeJkVZc+wJvne2E0RKQz+2SQrz6eAA==",+ "version": "7.23.0",+ "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.23.0.tgz",+ "integrity": "sha512-6gfrPwh7OuT6gZyJZvd6WbTfrqAo7vm4xCzAXOusKqq/vWdKXphTpj5klHKNmRUU6/QRGlBsyU9mAIPaWHlqJA==","dev": true,"dependencies": {- "@babel/types": "^7.22.15"+ "@babel/types": "^7.23.0"},"engines": {"node": ">=6.9.0"@@ -2137,14 +1510,14 @@}},"node_modules/@babel/helper-remap-async-to-generator": {- "version": "7.22.17",- "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.22.17.tgz",- "integrity": "sha512-bxH77R5gjH3Nkde6/LuncQoLaP16THYPscurp1S8z7S9ZgezCyV3G8Hc+TZiCmY8pz4fp8CvKSgtJMW0FkLAxA==",+ "version": "7.22.20",+ "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.22.20.tgz",+ "integrity": "sha512-pBGyV4uBqOns+0UvhsTO8qgl8hO89PmiDYv+/COyp1aeMcmfrfruz+/nCMFiYyFF/Knn0yfrC85ZzNFjembFTw==","dev": true,"dependencies": {"@babel/helper-annotate-as-pure": "^7.22.5",- "@babel/helper-environment-visitor": "^7.22.5",- "@babel/helper-wrap-function": "^7.22.17"+ "@babel/helper-environment-visitor": "^7.22.20",+ "@babel/helper-wrap-function": "^7.22.20"},"engines": {"node": ">=6.9.0"@@ -2154,13 +1527,13 @@}},"node_modules/@babel/helper-replace-supers": {- "version": "7.22.9",- "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.22.9.tgz",- "integrity": "sha512-LJIKvvpgPOPUThdYqcX6IXRuIcTkcAub0IaDRGCZH0p5GPUp7PhRU9QVgFcDDd51BaPkk77ZjqFwh6DZTAEmGg==",+ "version": "7.22.20",+ "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.22.20.tgz",+ "integrity": "sha512-qsW0In3dbwQUbK8kejJ4R7IHVGwHJlV6lpG6UA7a9hSa2YEiAib+N1T2kr6PEeUT+Fl7najmSOS6SmAwCHK6Tw==","dev": true,"dependencies": {- "@babel/helper-environment-visitor": "^7.22.5",- "@babel/helper-member-expression-to-functions": "^7.22.5",+ "@babel/helper-environment-visitor": "^7.22.20",+ "@babel/helper-member-expression-to-functions": "^7.22.15","@babel/helper-optimise-call-expression": "^7.22.5"},"engines": {@@ -2234,28 +1607,28 @@}},"node_modules/@babel/helper-wrap-function": {- "version": "7.22.17",- "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.22.17.tgz",- "integrity": "sha512-nAhoheCMlrqU41tAojw9GpVEKDlTS8r3lzFmF0lP52LwblCPbuFSO7nGIZoIcoU5NIm1ABrna0cJExE4Ay6l2Q==",+ "version": "7.22.20",+ "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.22.20.tgz",+ "integrity": "sha512-pms/UwkOpnQe/PDAEdV/d7dVCoBbB+R4FvYoHGZz+4VPcg7RtYy2KP7S2lbuWM6FCSgob5wshfGESbC/hzNXZw==","dev": true,"dependencies": {"@babel/helper-function-name": "^7.22.5","@babel/template": "^7.22.15",- "@babel/types": "^7.22.17"+ "@babel/types": "^7.22.19"},"engines": {"node": ">=6.9.0"}},"node_modules/@babel/helpers": {- "version": "7.23.6",- "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.23.6.tgz",- "integrity": "sha512-wCfsbN4nBidDRhpDhvcKlzHWCTlgJYUUdSJfzXb2NuBssDSIjc3xcb+znA7l+zYsFljAcGM0aFkN40cR3lXiGA==",+ "version": "7.23.9",+ "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.23.9.tgz",+ "integrity": "sha512-87ICKgU5t5SzOT7sBMfCOZQ2rHjRU+Pcb9BoILMYz600W6DkVRLFBPwQ18gwUVvggqXivaUakpnxWQGbpywbBQ==","dev": true,"dependencies": {- "@babel/template": "^7.22.15",- "@babel/traverse": "^7.23.6",- "@babel/types": "^7.23.6"+ "@babel/template": "^7.23.9",+ "@babel/traverse": "^7.23.9",+ "@babel/types": "^7.23.9"},"engines": {"node": ">=6.9.0"@@ -2347,9 +1720,9 @@}},"node_modules/@babel/parser": {- "version": "7.23.6",- "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.6.tgz",- "integrity": "sha512-Z2uID7YJ7oNvAI20O9X0bblw7Qqs8Q2hFy0R9tAfnfLkp5MW0UH9eUvnDSnFwKZ0AvgS1ucqR4KzvVHgnke1VQ==",+ "version": "7.23.9",+ "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.9.tgz",+ "integrity": "sha512-9tcKgqKbs3xGJ+NtKF2ndOBBLVwPjl1SHxPQkd36r3Dlirw3xWUeGaTbqr7uGZcTaxkVNwc+03SVP7aCdWrTlA==","dev": true,"bin": {"parser": "bin/babel-parser.js"@@ -2359,9 +1732,9 @@}},"node_modules/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": {- "version": "7.22.15",- "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.22.15.tgz",- "integrity": "sha512-FB9iYlz7rURmRJyXRKEnalYPPdn87H5no108cyuQQyMwlpJ2SJtpIUBI27kdTin956pz+LPypkPVPUTlxOmrsg==",+ "version": "7.23.3",+ "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.23.3.tgz",+ "integrity": "sha512-iRkKcCqb7iGnq9+3G6rZ+Ciz5VywC4XNRHe57lKM+jOeYAoR0lVqdeeDRfh0tQcTfw/+vBhHn926FmQhLtlFLQ==","dev": true,"dependencies": {"@babel/helper-plugin-utils": "^7.22.5"@@ -2374,14 +1747,14 @@}},"node_modules/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": {- "version": "7.22.15",- "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.22.15.tgz",- "integrity": "sha512-Hyph9LseGvAeeXzikV88bczhsrLrIZqDPxO+sSmAunMPaGrBGhfMWzCPYTtiW9t+HzSE2wtV8e5cc5P6r1xMDQ==",+ "version": "7.23.3",+ "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.23.3.tgz",+ "integrity": "sha512-WwlxbfMNdVEpQjZmK5mhm7oSwD3dS6eU+Iwsi4Knl9wAletWem7kaRsGOG+8UEbRyqxY4SS5zvtfXwX+jMxUwQ==","dev": true,"dependencies": {"@babel/helper-plugin-utils": "^7.22.5","@babel/helper-skip-transparent-expression-wrappers": "^7.22.5",- "@babel/plugin-transform-optional-chaining": "^7.22.15"+ "@babel/plugin-transform-optional-chaining": "^7.23.3"},"engines": {"node": ">=6.9.0"@@ -2390,6 +1763,22 @@"@babel/core": "^7.13.0"}},+ "node_modules/@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly": {+ "version": "7.23.7",+ "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly/-/plugin-bugfix-v8-static-class-fields-redefine-readonly-7.23.7.tgz",+ "integrity": "sha512-LlRT7HgaifEpQA1ZgLVOIJZZFVPWN5iReq/7/JixwBtwcoeVGDBD53ZV28rrsLYOZs1Y/EHhA8N/Z6aazHR8cw==",+ "dev": true,+ "dependencies": {+ "@babel/helper-environment-visitor": "^7.22.20",+ "@babel/helper-plugin-utils": "^7.22.5"+ },+ "engines": {+ "node": ">=6.9.0"+ },+ "peerDependencies": {+ "@babel/core": "^7.0.0"+ }+ },"node_modules/@babel/plugin-proposal-private-property-in-object": {"version": "7.21.0-placeholder-for-preset-env.2","resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.21.0-placeholder-for-preset-env.2.tgz",@@ -2478,9 +1867,9 @@}},"node_modules/@babel/plugin-syntax-import-assertions": {- "version": "7.22.5",- "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.22.5.tgz",- "integrity": "sha512-rdV97N7KqsRzeNGoWUOK6yUsWarLjE5Su/Snk9IYPU9CwkWHs4t+rTGOvffTR8XGkJMTAdLfO0xVnXm8wugIJg==",+ "version": "7.23.3",+ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.23.3.tgz",+ "integrity": "sha512-lPgDSU+SJLK3xmFDTV2ZRQAiM7UuUjGidwBywFavObCiZc1BeAAcMtHJKUya92hPHO+at63JJPLygilZard8jw==","dev": true,"dependencies": {"@babel/helper-plugin-utils": "^7.22.5"@@ -2493,9 +1882,9 @@}},"node_modules/@babel/plugin-syntax-import-attributes": {- "version": "7.22.5",- "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.22.5.tgz",- "integrity": "sha512-KwvoWDeNKPETmozyFE0P2rOLqh39EoQHNjqizrI5B8Vt0ZNS7M56s7dAiAqbYfiAYOuIzIh96z3iR2ktgu3tEg==",+ "version": "7.23.3",+ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.23.3.tgz",+ "integrity": "sha512-pawnE0P9g10xgoP7yKr6CK63K2FMsTE+FZidZO/1PwRdzmAPVs+HS1mAURUsgaoxammTJvULUdIkEK0gOcU2tA==","dev": true,"dependencies": {"@babel/helper-plugin-utils": "^7.22.5"@@ -2532,9 +1921,9 @@}},"node_modules/@babel/plugin-syntax-jsx": {- "version": "7.22.5",- "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.22.5.tgz",- "integrity": "sha512-gvyP4hZrgrs/wWMaocvxZ44Hw0b3W8Pe+cMxc8V1ULQ07oh8VNbIRaoD1LRZVTvD+0nieDKjfgKg89sD7rrKrg==",+ "version": "7.23.3",+ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.23.3.tgz",+ "integrity": "sha512-EB2MELswq55OHUoRZLGg/zC7QWUKfNLpE57m/S2yr1uEneIgsTgrSzXP3NXEsMkVn76OlaVVnzN+ugObuYGwhg==","dev": true,"dependencies": {"@babel/helper-plugin-utils": "^7.22.5"@@ -2649,9 +2038,9 @@}},"node_modules/@babel/plugin-syntax-typescript": {- "version": "7.22.5",- "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.22.5.tgz",- "integrity": "sha512-1mS2o03i7t1c6VzH6fdQ3OA8tcEIxwG18zIPRp+UY1Ihv6W+XZzBCVxExF9upussPXJ0xE9XRHwMoNs1ep/nRQ==",+ "version": "7.23.3",+ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.23.3.tgz",+ "integrity": "sha512-9EiNjVJOMwCO+43TqoTrgQ8jMwcAd0sWyXi9RPfIsLTj4R2MADDDQXELhffaUx/uJv2AYcxBgPwH6j4TIA4ytQ==","dev": true,"dependencies": {"@babel/helper-plugin-utils": "^7.22.5"@@ -2680,9 +2069,9 @@}},"node_modules/@babel/plugin-transform-arrow-functions": {- "version": "7.22.5",- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.22.5.tgz",- "integrity": "sha512-26lTNXoVRdAnsaDXPpvCNUq+OVWEVC6bx7Vvz9rC53F2bagUWW4u4ii2+h8Fejfh7RYqPxn+libeFBBck9muEw==",+ "version": "7.23.3",+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.23.3.tgz",+ "integrity": "sha512-NzQcQrzaQPkaEwoTm4Mhyl8jI1huEL/WWIEvudjTCMJ9aBZNpsJbMASx7EQECtQQPS/DcnFpo0FIh3LvEO9cxQ==","dev": true,"dependencies": {"@babel/helper-plugin-utils": "^7.22.5"@@ -2695,14 +2084,14 @@}},"node_modules/@babel/plugin-transform-async-generator-functions": {- "version": "7.22.15",- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-generator-functions/-/plugin-transform-async-generator-functions-7.22.15.tgz",- "integrity": "sha512-jBm1Es25Y+tVoTi5rfd5t1KLmL8ogLKpXszboWOTTtGFGz2RKnQe2yn7HbZ+kb/B8N0FVSGQo874NSlOU1T4+w==",+ "version": "7.23.9",+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-generator-functions/-/plugin-transform-async-generator-functions-7.23.9.tgz",+ "integrity": "sha512-8Q3veQEDGe14dTYuwagbRtwxQDnytyg1JFu4/HwEMETeofocrB0U0ejBJIXoeG/t2oXZ8kzCyI0ZZfbT80VFNQ==","dev": true,"dependencies": {- "@babel/helper-environment-visitor": "^7.22.5",+ "@babel/helper-environment-visitor": "^7.22.20","@babel/helper-plugin-utils": "^7.22.5",- "@babel/helper-remap-async-to-generator": "^7.22.9",+ "@babel/helper-remap-async-to-generator": "^7.22.20","@babel/plugin-syntax-async-generators": "^7.8.4"},"engines": {@@ -2713,14 +2102,14 @@}},"node_modules/@babel/plugin-transform-async-to-generator": {- "version": "7.22.5",- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.22.5.tgz",- "integrity": "sha512-b1A8D8ZzE/VhNDoV1MSJTnpKkCG5bJo+19R4o4oy03zM7ws8yEMK755j61Dc3EyvdysbqH5BOOTquJ7ZX9C6vQ==",+ "version": "7.23.3",+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.23.3.tgz",+ "integrity": "sha512-A7LFsKi4U4fomjqXJlZg/u0ft/n8/7n7lpffUP/ZULx/DtV9SGlNKZolHH6PE8Xl1ngCc0M11OaeZptXVkfKSw==","dev": true,"dependencies": {- "@babel/helper-module-imports": "^7.22.5",+ "@babel/helper-module-imports": "^7.22.15","@babel/helper-plugin-utils": "^7.22.5",- "@babel/helper-remap-async-to-generator": "^7.22.5"+ "@babel/helper-remap-async-to-generator": "^7.22.20"},"engines": {"node": ">=6.9.0"@@ -2730,9 +2119,9 @@}},"node_modules/@babel/plugin-transform-block-scoped-functions": {- "version": "7.22.5",- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.22.5.tgz",- "integrity": "sha512-tdXZ2UdknEKQWKJP1KMNmuF5Lx3MymtMN/pvA+p/VEkhK8jVcQ1fzSy8KM9qRYhAf2/lV33hoMPKI/xaI9sADA==",+ "version": "7.23.3",+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.23.3.tgz",+ "integrity": "sha512-vI+0sIaPIO6CNuM9Kk5VmXcMVRiOpDh7w2zZt9GXzmE/9KD70CUEVhvPR/etAeNK/FAEkhxQtXOzVF3EuRL41A==","dev": true,"dependencies": {"@babel/helper-plugin-utils": "^7.22.5"@@ -2745,9 +2134,9 @@}},"node_modules/@babel/plugin-transform-block-scoping": {- "version": "7.22.15",- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.22.15.tgz",- "integrity": "sha512-G1czpdJBZCtngoK1sJgloLiOHUnkb/bLZwqVZD8kXmq0ZnVfTTWUcs9OWtp0mBtYJ+4LQY1fllqBkOIPhXmFmw==",+ "version": "7.23.4",+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.23.4.tgz",+ "integrity": "sha512-0QqbP6B6HOh7/8iNR4CQU2Th/bbRtBp4KS9vcaZd1fZ0wSh5Fyssg0UCIHwxh+ka+pNDREbVLQnHCMHKZfPwfw==","dev": true,"dependencies": {"@babel/helper-plugin-utils": "^7.22.5"@@ -2760,12 +2149,12 @@}},"node_modules/@babel/plugin-transform-class-properties": {- "version": "7.22.5",- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-properties/-/plugin-transform-class-properties-7.22.5.tgz",- "integrity": "sha512-nDkQ0NfkOhPTq8YCLiWNxp1+f9fCobEjCb0n8WdbNUBc4IB5V7P1QnX9IjpSoquKrXF5SKojHleVNs2vGeHCHQ==",+ "version": "7.23.3",+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-properties/-/plugin-transform-class-properties-7.23.3.tgz",+ "integrity": "sha512-uM+AN8yCIjDPccsKGlw271xjJtGii+xQIF/uMPS8H15L12jZTsLfF4o5vNO7d/oUguOyfdikHGc/yi9ge4SGIg==","dev": true,"dependencies": {- "@babel/helper-create-class-features-plugin": "^7.22.5",+ "@babel/helper-create-class-features-plugin": "^7.22.15","@babel/helper-plugin-utils": "^7.22.5"},"engines": {@@ -2776,12 +2165,12 @@}},"node_modules/@babel/plugin-transform-class-static-block": {- "version": "7.22.11",- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-static-block/-/plugin-transform-class-static-block-7.22.11.tgz",- "integrity": "sha512-GMM8gGmqI7guS/llMFk1bJDkKfn3v3C4KHK9Yg1ey5qcHcOlKb0QvcMrgzvxo+T03/4szNh5lghY+fEC98Kq9g==",+ "version": "7.23.4",+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-static-block/-/plugin-transform-class-static-block-7.23.4.tgz",+ "integrity": "sha512-nsWu/1M+ggti1SOALj3hfx5FXzAY06fwPJsUZD4/A5e1bWi46VUIWtD+kOX6/IdhXGsXBWllLFDSnqSCdUNydQ==","dev": true,"dependencies": {- "@babel/helper-create-class-features-plugin": "^7.22.11",+ "@babel/helper-create-class-features-plugin": "^7.22.15","@babel/helper-plugin-utils": "^7.22.5","@babel/plugin-syntax-class-static-block": "^7.14.5"},@@ -2793,18 +2182,17 @@}},"node_modules/@babel/plugin-transform-classes": {- "version": "7.22.15",- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.22.15.tgz",- "integrity": "sha512-VbbC3PGjBdE0wAWDdHM9G8Gm977pnYI0XpqMd6LrKISj8/DJXEsWqgRuTYaNE9Bv0JGhTZUzHDlMk18IpOuoqw==",+ "version": "7.23.8",+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.23.8.tgz",+ "integrity": "sha512-yAYslGsY1bX6Knmg46RjiCiNSwJKv2IUC8qOdYKqMMr0491SXFhcHqOdRDeCRohOOIzwN/90C6mQ9qAKgrP7dg==","dev": true,"dependencies": {"@babel/helper-annotate-as-pure": "^7.22.5",- "@babel/helper-compilation-targets": "^7.22.15",- "@babel/helper-environment-visitor": "^7.22.5",- "@babel/helper-function-name": "^7.22.5",- "@babel/helper-optimise-call-expression": "^7.22.5",+ "@babel/helper-compilation-targets": "^7.23.6",+ "@babel/helper-environment-visitor": "^7.22.20",+ "@babel/helper-function-name": "^7.23.0","@babel/helper-plugin-utils": "^7.22.5",- "@babel/helper-replace-supers": "^7.22.9",+ "@babel/helper-replace-supers": "^7.22.20","@babel/helper-split-export-declaration": "^7.22.6","globals": "^11.1.0"},@@ -2825,13 +2213,13 @@}},"node_modules/@babel/plugin-transform-computed-properties": {- "version": "7.22.5",- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.22.5.tgz",- "integrity": "sha512-4GHWBgRf0krxPX+AaPtgBAlTgTeZmqDynokHOX7aqqAB4tHs3U2Y02zH6ETFdLZGcg9UQSD1WCmkVrE9ErHeOg==",+ "version": "7.23.3",+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.23.3.tgz",+ "integrity": "sha512-dTj83UVTLw/+nbiHqQSFdwO9CbTtwq1DsDqm3CUEtDrZNET5rT5E6bIdTlOftDTDLMYxvxHNEYO4B9SLl8SLZw==","dev": true,"dependencies": {"@babel/helper-plugin-utils": "^7.22.5",- "@babel/template": "^7.22.5"+ "@babel/template": "^7.22.15"},"engines": {"node": ">=6.9.0"@@ -2841,9 +2229,9 @@}},"node_modules/@babel/plugin-transform-destructuring": {- "version": "7.22.15",- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.22.15.tgz",- "integrity": "sha512-HzG8sFl1ZVGTme74Nw+X01XsUTqERVQ6/RLHo3XjGRzm7XD6QTtfS3NJotVgCGy8BzkDqRjRBD8dAyJn5TuvSQ==",+ "version": "7.23.3",+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.23.3.tgz",+ "integrity": "sha512-n225npDqjDIr967cMScVKHXJs7rout1q+tt50inyBCPkyZ8KxeI6d+GIbSBTT/w/9WdlWDOej3V9HE5Lgk57gw==","dev": true,"dependencies": {"@babel/helper-plugin-utils": "^7.22.5"@@ -2856,12 +2244,12 @@}},"node_modules/@babel/plugin-transform-dotall-regex": {- "version": "7.22.5",- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.22.5.tgz",- "integrity": "sha512-5/Yk9QxCQCl+sOIB1WelKnVRxTJDSAIxtJLL2/pqL14ZVlbH0fUQUZa/T5/UnQtBNgghR7mfB8ERBKyKPCi7Vw==",+ "version": "7.23.3",+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.23.3.tgz",+ "integrity": "sha512-vgnFYDHAKzFaTVp+mneDsIEbnJ2Np/9ng9iviHw3P/KVcgONxpNULEW/51Z/BaFojG2GI2GwwXck5uV1+1NOYQ==","dev": true,"dependencies": {- "@babel/helper-create-regexp-features-plugin": "^7.22.5",+ "@babel/helper-create-regexp-features-plugin": "^7.22.15","@babel/helper-plugin-utils": "^7.22.5"},"engines": {@@ -2872,9 +2260,9 @@}},"node_modules/@babel/plugin-transform-duplicate-keys": {- "version": "7.22.5",- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.22.5.tgz",- "integrity": "sha512-dEnYD+9BBgld5VBXHnF/DbYGp3fqGMsyxKbtD1mDyIA7AkTSpKXFhCVuj/oQVOoALfBs77DudA0BE4d5mcpmqw==",+ "version": "7.23.3",+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.23.3.tgz",+ "integrity": "sha512-RrqQ+BQmU3Oyav3J+7/myfvRCq7Tbz+kKLLshUmMwNlDHExbGL7ARhajvoBJEvc+fCguPPu887N+3RRXBVKZUA==","dev": true,"dependencies": {"@babel/helper-plugin-utils": "^7.22.5"@@ -2887,9 +2275,9 @@}},"node_modules/@babel/plugin-transform-dynamic-import": {- "version": "7.22.11",- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dynamic-import/-/plugin-transform-dynamic-import-7.22.11.tgz",- "integrity": "sha512-g/21plo58sfteWjaO0ZNVb+uEOkJNjAaHhbejrnBmu011l/eNDScmkbjCC3l4FKb10ViaGU4aOkFznSu2zRHgA==",+ "version": "7.23.4",+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dynamic-import/-/plugin-transform-dynamic-import-7.23.4.tgz",+ "integrity": "sha512-V6jIbLhdJK86MaLh4Jpghi8ho5fGzt3imHOBu/x0jlBaPYqDoWz4RDXjmMOfnh+JWNaQleEAByZLV0QzBT4YQQ==","dev": true,"dependencies": {"@babel/helper-plugin-utils": "^7.22.5",@@ -2903,12 +2291,12 @@}},"node_modules/@babel/plugin-transform-exponentiation-operator": {- "version": "7.22.5",- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.22.5.tgz",- "integrity": "sha512-vIpJFNM/FjZ4rh1myqIya9jXwrwwgFRHPjT3DkUA9ZLHuzox8jiXkOLvwm1H+PQIP3CqfC++WPKeuDi0Sjdj1g==",+ "version": "7.23.3",+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.23.3.tgz",+ "integrity": "sha512-5fhCsl1odX96u7ILKHBj4/Y8vipoqwsJMh4csSA8qFfxrZDEA4Ssku2DyNvMJSmZNOEBT750LfFPbtrnTP90BQ==","dev": true,"dependencies": {- "@babel/helper-builder-binary-assignment-operator-visitor": "^7.22.5",+ "@babel/helper-builder-binary-assignment-operator-visitor": "^7.22.15","@babel/helper-plugin-utils": "^7.22.5"},"engines": {@@ -2919,9 +2307,9 @@}},"node_modules/@babel/plugin-transform-export-namespace-from": {- "version": "7.22.11",- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-export-namespace-from/-/plugin-transform-export-namespace-from-7.22.11.tgz",- "integrity": "sha512-xa7aad7q7OiT8oNZ1mU7NrISjlSkVdMbNxn9IuLZyL9AJEhs1Apba3I+u5riX1dIkdptP5EKDG5XDPByWxtehw==",+ "version": "7.23.4",+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-export-namespace-from/-/plugin-transform-export-namespace-from-7.23.4.tgz",+ "integrity": "sha512-GzuSBcKkx62dGzZI1WVgTWvkkz84FZO5TC5T8dl/Tht/rAla6Dg/Mz9Yhypg+ezVACf/rgDuQt3kbWEv7LdUDQ==","dev": true,"dependencies": {"@babel/helper-plugin-utils": "^7.22.5",@@ -2935,12 +2323,13 @@}},"node_modules/@babel/plugin-transform-for-of": {- "version": "7.22.15",- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.22.15.tgz",- "integrity": "sha512-me6VGeHsx30+xh9fbDLLPi0J1HzmeIIyenoOQHuw2D4m2SAU3NrspX5XxJLBpqn5yrLzrlw2Iy3RA//Bx27iOA==",+ "version": "7.23.6",+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.23.6.tgz",+ "integrity": "sha512-aYH4ytZ0qSuBbpfhuofbg/e96oQ7U2w1Aw/UQmKT+1l39uEhUPoFS3fHevDc1G0OvewyDudfMKY1OulczHzWIw==","dev": true,"dependencies": {- "@babel/helper-plugin-utils": "^7.22.5"+ "@babel/helper-plugin-utils": "^7.22.5",+ "@babel/helper-skip-transparent-expression-wrappers": "^7.22.5"},"engines": {"node": ">=6.9.0"@@ -2950,13 +2339,13 @@}},"node_modules/@babel/plugin-transform-function-name": {- "version": "7.22.5",- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.22.5.tgz",- "integrity": "sha512-UIzQNMS0p0HHiQm3oelztj+ECwFnj+ZRV4KnguvlsD2of1whUeM6o7wGNj6oLwcDoAXQ8gEqfgC24D+VdIcevg==",+ "version": "7.23.3",+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.23.3.tgz",+ "integrity": "sha512-I1QXp1LxIvt8yLaib49dRW5Okt7Q4oaxao6tFVKS/anCdEOMtYwWVKoiOA1p34GOWIZjUK0E+zCp7+l1pfQyiw==","dev": true,"dependencies": {- "@babel/helper-compilation-targets": "^7.22.5",- "@babel/helper-function-name": "^7.22.5",+ "@babel/helper-compilation-targets": "^7.22.15",+ "@babel/helper-function-name": "^7.23.0","@babel/helper-plugin-utils": "^7.22.5"},"engines": {@@ -2967,9 +2356,9 @@}},"node_modules/@babel/plugin-transform-json-strings": {- "version": "7.22.11",- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-json-strings/-/plugin-transform-json-strings-7.22.11.tgz",- "integrity": "sha512-CxT5tCqpA9/jXFlme9xIBCc5RPtdDq3JpkkhgHQqtDdiTnTI0jtZ0QzXhr5DILeYifDPp2wvY2ad+7+hLMW5Pw==",+ "version": "7.23.4",+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-json-strings/-/plugin-transform-json-strings-7.23.4.tgz",+ "integrity": "sha512-81nTOqM1dMwZ/aRXQ59zVubN9wHGqk6UtqRK+/q+ciXmRy8fSolhGVvG09HHRGo4l6fr/c4ZhXUQH0uFW7PZbg==","dev": true,"dependencies": {"@babel/helper-plugin-utils": "^7.22.5",@@ -2983,9 +2372,9 @@}},"node_modules/@babel/plugin-transform-literals": {- "version": "7.22.5",- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.22.5.tgz",- "integrity": "sha512-fTLj4D79M+mepcw3dgFBTIDYpbcB9Sm0bpm4ppXPaO+U+PKFFyV9MGRvS0gvGw62sd10kT5lRMKXAADb9pWy8g==",+ "version": "7.23.3",+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.23.3.tgz",+ "integrity": "sha512-wZ0PIXRxnwZvl9AYpqNUxpZ5BiTGrYt7kueGQ+N5FiQ7RCOD4cm8iShd6S6ggfVIWaJf2EMk8eRzAh52RfP4rQ==","dev": true,"dependencies": {"@babel/helper-plugin-utils": "^7.22.5"@@ -2998,9 +2387,9 @@}},"node_modules/@babel/plugin-transform-logical-assignment-operators": {- "version": "7.22.11",- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-logical-assignment-operators/-/plugin-transform-logical-assignment-operators-7.22.11.tgz",- "integrity": "sha512-qQwRTP4+6xFCDV5k7gZBF3C31K34ut0tbEcTKxlX/0KXxm9GLcO14p570aWxFvVzx6QAfPgq7gaeIHXJC8LswQ==",+ "version": "7.23.4",+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-logical-assignment-operators/-/plugin-transform-logical-assignment-operators-7.23.4.tgz",+ "integrity": "sha512-Mc/ALf1rmZTP4JKKEhUwiORU+vcfarFVLfcFiolKUo6sewoxSEgl36ak5t+4WamRsNr6nzjZXQjM35WsU+9vbg==","dev": true,"dependencies": {"@babel/helper-plugin-utils": "^7.22.5",@@ -3014,9 +2403,9 @@}},"node_modules/@babel/plugin-transform-member-expression-literals": {- "version": "7.22.5",- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.22.5.tgz",- "integrity": "sha512-RZEdkNtzzYCFl9SE9ATaUMTj2hqMb4StarOJLrZRbqqU4HSBE7UlBw9WBWQiDzrJZJdUWiMTVDI6Gv/8DPvfew==",+ "version": "7.23.3",+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.23.3.tgz",+ "integrity": "sha512-sC3LdDBDi5x96LA+Ytekz2ZPk8i/Ck+DEuDbRAll5rknJ5XRTSaPKEYwomLcs1AA8wg9b3KjIQRsnApj+q51Ag==","dev": true,"dependencies": {"@babel/helper-plugin-utils": "^7.22.5"@@ -3029,12 +2418,12 @@}},"node_modules/@babel/plugin-transform-modules-amd": {- "version": "7.22.5",- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.22.5.tgz",- "integrity": "sha512-R+PTfLTcYEmb1+kK7FNkhQ1gP4KgjpSO6HfH9+f8/yfp2Nt3ggBjiVpRwmwTlfqZLafYKJACy36yDXlEmI9HjQ==",+ "version": "7.23.3",+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.23.3.tgz",+ "integrity": "sha512-vJYQGxeKM4t8hYCKVBlZX/gtIY2I7mRGFNcm85sgXGMTBcoV3QdVtdpbcWEbzbfUIUZKwvgFT82mRvaQIebZzw==","dev": true,"dependencies": {- "@babel/helper-module-transforms": "^7.22.5",+ "@babel/helper-module-transforms": "^7.23.3","@babel/helper-plugin-utils": "^7.22.5"},"engines": {@@ -3045,12 +2434,12 @@}},"node_modules/@babel/plugin-transform-modules-commonjs": {- "version": "7.22.15",- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.22.15.tgz",- "integrity": "sha512-jWL4eh90w0HQOTKP2MoXXUpVxilxsB2Vl4ji69rSjS3EcZ/v4sBmn+A3NpepuJzBhOaEBbR7udonlHHn5DWidg==",+ "version": "7.23.3",+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.23.3.tgz",+ "integrity": "sha512-aVS0F65LKsdNOtcz6FRCpE4OgsP2OFnW46qNxNIX9h3wuzaNcSQsJysuMwqSibC98HPrf2vCgtxKNwS0DAlgcA==","dev": true,"dependencies": {- "@babel/helper-module-transforms": "^7.22.15",+ "@babel/helper-module-transforms": "^7.23.3","@babel/helper-plugin-utils": "^7.22.5","@babel/helper-simple-access": "^7.22.5"},@@ -3062,15 +2451,15 @@}},"node_modules/@babel/plugin-transform-modules-systemjs": {- "version": "7.22.11",- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.22.11.tgz",- "integrity": "sha512-rIqHmHoMEOhI3VkVf5jQ15l539KrwhzqcBO6wdCNWPWc/JWt9ILNYNUssbRpeq0qWns8svuw8LnMNCvWBIJ8wA==",+ "version": "7.23.9",+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.23.9.tgz",+ "integrity": "sha512-KDlPRM6sLo4o1FkiSlXoAa8edLXFsKKIda779fbLrvmeuc3itnjCtaO6RrtoaANsIJANj+Vk1zqbZIMhkCAHVw==","dev": true,"dependencies": {"@babel/helper-hoist-variables": "^7.22.5",- "@babel/helper-module-transforms": "^7.22.9",+ "@babel/helper-module-transforms": "^7.23.3","@babel/helper-plugin-utils": "^7.22.5",- "@babel/helper-validator-identifier": "^7.22.5"+ "@babel/helper-validator-identifier": "^7.22.20"},"engines": {"node": ">=6.9.0"@@ -3080,12 +2469,12 @@}},"node_modules/@babel/plugin-transform-modules-umd": {- "version": "7.22.5",- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.22.5.tgz",- "integrity": "sha512-+S6kzefN/E1vkSsKx8kmQuqeQsvCKCd1fraCM7zXm4SFoggI099Tr4G8U81+5gtMdUeMQ4ipdQffbKLX0/7dBQ==",+ "version": "7.23.3",+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.23.3.tgz",+ "integrity": "sha512-zHsy9iXX2nIsCBFPud3jKn1IRPWg3Ing1qOZgeKV39m1ZgIdpJqvlWVeiHBZC6ITRG0MfskhYe9cLgntfSFPIg==","dev": true,"dependencies": {- "@babel/helper-module-transforms": "^7.22.5",+ "@babel/helper-module-transforms": "^7.23.3","@babel/helper-plugin-utils": "^7.22.5"},"engines": {@@ -3112,9 +2501,9 @@}},"node_modules/@babel/plugin-transform-new-target": {- "version": "7.22.5",- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.22.5.tgz",- "integrity": "sha512-AsF7K0Fx/cNKVyk3a+DW0JLo+Ua598/NxMRvxDnkpCIGFh43+h/v2xyhRUYf6oD8gE4QtL83C7zZVghMjHd+iw==",+ "version": "7.23.3",+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.23.3.tgz",+ "integrity": "sha512-YJ3xKqtJMAT5/TIZnpAR3I+K+WaDowYbN3xyxI8zxx/Gsypwf9B9h0VB+1Nh6ACAAPRS5NSRje0uVv5i79HYGQ==","dev": true,"dependencies": {"@babel/helper-plugin-utils": "^7.22.5"@@ -3127,9 +2516,9 @@}},"node_modules/@babel/plugin-transform-nullish-coalescing-operator": {- "version": "7.22.11",- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-nullish-coalescing-operator/-/plugin-transform-nullish-coalescing-operator-7.22.11.tgz",- "integrity": "sha512-YZWOw4HxXrotb5xsjMJUDlLgcDXSfO9eCmdl1bgW4+/lAGdkjaEvOnQ4p5WKKdUgSzO39dgPl0pTnfxm0OAXcg==",+ "version": "7.23.4",+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-nullish-coalescing-operator/-/plugin-transform-nullish-coalescing-operator-7.23.4.tgz",+ "integrity": "sha512-jHE9EVVqHKAQx+VePv5LLGHjmHSJR76vawFPTdlxR/LVJPfOEGxREQwQfjuZEOPTwG92X3LINSh3M40Rv4zpVA==","dev": true,"dependencies": {"@babel/helper-plugin-utils": "^7.22.5",@@ -3143,9 +2532,9 @@}},"node_modules/@babel/plugin-transform-numeric-separator": {- "version": "7.22.11",- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-numeric-separator/-/plugin-transform-numeric-separator-7.22.11.tgz",- "integrity": "sha512-3dzU4QGPsILdJbASKhF/V2TVP+gJya1PsueQCxIPCEcerqF21oEcrob4mzjsp2Py/1nLfF5m+xYNMDpmA8vffg==",+ "version": "7.23.4",+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-numeric-separator/-/plugin-transform-numeric-separator-7.23.4.tgz",+ "integrity": "sha512-mps6auzgwjRrwKEZA05cOwuDc9FAzoyFS4ZsG/8F43bTLf/TgkJg7QXOrPO1JO599iA3qgK9MXdMGOEC8O1h6Q==","dev": true,"dependencies": {"@babel/helper-plugin-utils": "^7.22.5",@@ -3159,16 +2548,16 @@}},"node_modules/@babel/plugin-transform-object-rest-spread": {- "version": "7.22.15",- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-rest-spread/-/plugin-transform-object-rest-spread-7.22.15.tgz",- "integrity": "sha512-fEB+I1+gAmfAyxZcX1+ZUwLeAuuf8VIg67CTznZE0MqVFumWkh8xWtn58I4dxdVf080wn7gzWoF8vndOViJe9Q==",+ "version": "7.23.4",+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-rest-spread/-/plugin-transform-object-rest-spread-7.23.4.tgz",+ "integrity": "sha512-9x9K1YyeQVw0iOXJlIzwm8ltobIIv7j2iLyP2jIhEbqPRQ7ScNgwQufU2I0Gq11VjyG4gI4yMXt2VFags+1N3g==","dev": true,"dependencies": {- "@babel/compat-data": "^7.22.9",+ "@babel/compat-data": "^7.23.3","@babel/helper-compilation-targets": "^7.22.15","@babel/helper-plugin-utils": "^7.22.5","@babel/plugin-syntax-object-rest-spread": "^7.8.3",- "@babel/plugin-transform-parameters": "^7.22.15"+ "@babel/plugin-transform-parameters": "^7.23.3"},"engines": {"node": ">=6.9.0"@@ -3178,13 +2567,13 @@}},"node_modules/@babel/plugin-transform-object-super": {- "version": "7.22.5",- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.22.5.tgz",- "integrity": "sha512-klXqyaT9trSjIUrcsYIfETAzmOEZL3cBYqOYLJxBHfMFFggmXOv+NYSX/Jbs9mzMVESw/WycLFPRx8ba/b2Ipw==",+ "version": "7.23.3",+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.23.3.tgz",+ "integrity": "sha512-BwQ8q0x2JG+3lxCVFohg+KbQM7plfpBwThdW9A6TMtWwLsbDA01Ek2Zb/AgDN39BiZsExm4qrXxjk+P1/fzGrA==","dev": true,"dependencies": {"@babel/helper-plugin-utils": "^7.22.5",- "@babel/helper-replace-supers": "^7.22.5"+ "@babel/helper-replace-supers": "^7.22.20"},"engines": {"node": ">=6.9.0"@@ -3194,9 +2583,9 @@}},"node_modules/@babel/plugin-transform-optional-catch-binding": {- "version": "7.22.11",- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-catch-binding/-/plugin-transform-optional-catch-binding-7.22.11.tgz",- "integrity": "sha512-rli0WxesXUeCJnMYhzAglEjLWVDF6ahb45HuprcmQuLidBJFWjNnOzssk2kuc6e33FlLaiZhG/kUIzUMWdBKaQ==",+ "version": "7.23.4",+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-catch-binding/-/plugin-transform-optional-catch-binding-7.23.4.tgz",+ "integrity": "sha512-XIq8t0rJPHf6Wvmbn9nFxU6ao4c7WhghTR5WyV8SrJfUFzyxhCm4nhC+iAp3HFhbAKLfYpgzhJ6t4XCtVwqO5A==","dev": true,"dependencies": {"@babel/helper-plugin-utils": "^7.22.5",@@ -3210,9 +2599,9 @@}},"node_modules/@babel/plugin-transform-optional-chaining": {- "version": "7.22.15",- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-chaining/-/plugin-transform-optional-chaining-7.22.15.tgz",- "integrity": "sha512-ngQ2tBhq5vvSJw2Q2Z9i7ealNkpDMU0rGWnHPKqRZO0tzZ5tlaoz4hDvhXioOoaE0X2vfNss1djwg0DXlfu30A==",+ "version": "7.23.4",+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-chaining/-/plugin-transform-optional-chaining-7.23.4.tgz",+ "integrity": "sha512-ZU8y5zWOfjM5vZ+asjgAPwDaBjJzgufjES89Rs4Lpq63O300R/kOz30WCLo6BxxX6QVEilwSlpClnG5cZaikTA==","dev": true,"dependencies": {"@babel/helper-plugin-utils": "^7.22.5",@@ -3227,9 +2616,9 @@}},"node_modules/@babel/plugin-transform-parameters": {- "version": "7.22.15",- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.22.15.tgz",- "integrity": "sha512-hjk7qKIqhyzhhUvRT683TYQOFa/4cQKwQy7ALvTpODswN40MljzNDa0YldevS6tGbxwaEKVn502JmY0dP7qEtQ==",+ "version": "7.23.3",+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.23.3.tgz",+ "integrity": "sha512-09lMt6UsUb3/34BbECKVbVwrT9bO6lILWln237z7sLaWnMsTi7Yc9fhX5DLpkJzAGfaReXI22wP41SZmnAA3Vw==","dev": true,"dependencies": {"@babel/helper-plugin-utils": "^7.22.5"@@ -3242,12 +2631,12 @@}},"node_modules/@babel/plugin-transform-private-methods": {- "version": "7.22.5",- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-private-methods/-/plugin-transform-private-methods-7.22.5.tgz",- "integrity": "sha512-PPjh4gyrQnGe97JTalgRGMuU4icsZFnWkzicB/fUtzlKUqvsWBKEpPPfr5a2JiyirZkHxnAqkQMO5Z5B2kK3fA==",+ "version": "7.23.3",+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-private-methods/-/plugin-transform-private-methods-7.23.3.tgz",+ "integrity": "sha512-UzqRcRtWsDMTLrRWFvUBDwmw06tCQH9Rl1uAjfh6ijMSmGYQ+fpdB+cnqRC8EMh5tuuxSv0/TejGL+7vyj+50g==","dev": true,"dependencies": {- "@babel/helper-create-class-features-plugin": "^7.22.5",+ "@babel/helper-create-class-features-plugin": "^7.22.15","@babel/helper-plugin-utils": "^7.22.5"},"engines": {@@ -3258,13 +2647,13 @@}},"node_modules/@babel/plugin-transform-private-property-in-object": {- "version": "7.22.11",- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-private-property-in-object/-/plugin-transform-private-property-in-object-7.22.11.tgz",- "integrity": "sha512-sSCbqZDBKHetvjSwpyWzhuHkmW5RummxJBVbYLkGkaiTOWGxml7SXt0iWa03bzxFIx7wOj3g/ILRd0RcJKBeSQ==",+ "version": "7.23.4",+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-private-property-in-object/-/plugin-transform-private-property-in-object-7.23.4.tgz",+ "integrity": "sha512-9G3K1YqTq3F4Vt88Djx1UZ79PDyj+yKRnUy7cZGSMe+a7jkwD259uKKuUzQlPkGam7R+8RJwh5z4xO27fA1o2A==","dev": true,"dependencies": {"@babel/helper-annotate-as-pure": "^7.22.5",- "@babel/helper-create-class-features-plugin": "^7.22.11",+ "@babel/helper-create-class-features-plugin": "^7.22.15","@babel/helper-plugin-utils": "^7.22.5","@babel/plugin-syntax-private-property-in-object": "^7.14.5"},@@ -3276,9 +2665,9 @@}},"node_modules/@babel/plugin-transform-property-literals": {- "version": "7.22.5",- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.22.5.tgz",- "integrity": "sha512-TiOArgddK3mK/x1Qwf5hay2pxI6wCZnvQqrFSqbtg1GLl2JcNMitVH/YnqjP+M31pLUeTfzY1HAXFDnUBV30rQ==",+ "version": "7.23.3",+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.23.3.tgz",+ "integrity": "sha512-jR3Jn3y7cZp4oEWPFAlRsSWjxKe4PZILGBSd4nis1TsC5qeSpb+nrtihJuDhNI7QHiVbUaiXa0X2RZY3/TI6Nw==","dev": true,"dependencies": {"@babel/helper-plugin-utils": "^7.22.5"@@ -3291,9 +2680,9 @@}},"node_modules/@babel/plugin-transform-react-display-name": {- "version": "7.22.5",- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-display-name/-/plugin-transform-react-display-name-7.22.5.tgz",- "integrity": "sha512-PVk3WPYudRF5z4GKMEYUrLjPl38fJSKNaEOkFuoprioowGuWN6w2RKznuFNSlJx7pzzXXStPUnNSOEO0jL5EVw==",+ "version": "7.23.3",+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-display-name/-/plugin-transform-react-display-name-7.23.3.tgz",+ "integrity": "sha512-GnvhtVfA2OAtzdX58FJxU19rhoGeQzyVndw3GgtdECQvQFXPEZIOVULHVZGAYmOgmqjXpVpfocAbSjh99V/Fqw==","dev": true,"dependencies": {"@babel/helper-plugin-utils": "^7.22.5"@@ -3306,16 +2695,16 @@}},"node_modules/@babel/plugin-transform-react-jsx": {- "version": "7.22.15",- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.22.15.tgz",- "integrity": "sha512-oKckg2eZFa8771O/5vi7XeTvmM6+O9cxZu+kanTU7tD4sin5nO/G8jGJhq8Hvt2Z0kUoEDRayuZLaUlYl8QuGA==",+ "version": "7.23.4",+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.23.4.tgz",+ "integrity": "sha512-5xOpoPguCZCRbo/JeHlloSkTA8Bld1J/E1/kLfD1nsuiW1m8tduTA1ERCgIZokDflX/IBzKcqR3l7VlRgiIfHA==","dev": true,"dependencies": {"@babel/helper-annotate-as-pure": "^7.22.5","@babel/helper-module-imports": "^7.22.15","@babel/helper-plugin-utils": "^7.22.5",- "@babel/plugin-syntax-jsx": "^7.22.5",- "@babel/types": "^7.22.15"+ "@babel/plugin-syntax-jsx": "^7.23.3",+ "@babel/types": "^7.23.4"},"engines": {"node": ">=6.9.0"@@ -3370,9 +2759,9 @@}},"node_modules/@babel/plugin-transform-react-pure-annotations": {- "version": "7.22.5",- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-pure-annotations/-/plugin-transform-react-pure-annotations-7.22.5.tgz",- "integrity": "sha512-gP4k85wx09q+brArVinTXhWiyzLl9UpmGva0+mWyKxk6JZequ05x3eUcIUE+FyttPKJFRRVtAvQaJ6YF9h1ZpA==",+ "version": "7.23.3",+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-pure-annotations/-/plugin-transform-react-pure-annotations-7.23.3.tgz",+ "integrity": "sha512-qMFdSS+TUhB7Q/3HVPnEdYJDQIk57jkntAwSuz9xfSE4n+3I+vHYCli3HoHawN1Z3RfCz/y1zXA/JXjG6cVImQ==","dev": true,"dependencies": {"@babel/helper-annotate-as-pure": "^7.22.5",@@ -3386,9 +2775,9 @@}},"node_modules/@babel/plugin-transform-regenerator": {- "version": "7.22.10",- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.22.10.tgz",- "integrity": "sha512-F28b1mDt8KcT5bUyJc/U9nwzw6cV+UmTeRlXYIl2TNqMMJif0Jeey9/RQ3C4NOd2zp0/TRsDns9ttj2L523rsw==",+ "version": "7.23.3",+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.23.3.tgz",+ "integrity": "sha512-KP+75h0KghBMcVpuKisx3XTu9Ncut8Q8TuvGO4IhY+9D5DFEckQefOuIsB/gQ2tG71lCke4NMrtIPS8pOj18BQ==","dev": true,"dependencies": {"@babel/helper-plugin-utils": "^7.22.5",@@ -3402,9 +2791,9 @@}},"node_modules/@babel/plugin-transform-reserved-words": {- "version": "7.22.5",- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.22.5.tgz",- "integrity": "sha512-DTtGKFRQUDm8svigJzZHzb/2xatPc6TzNvAIJ5GqOKDsGFYgAskjRulbR/vGsPKq3OPqtexnz327qYpP57RFyA==",+ "version": "7.23.3",+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.23.3.tgz",+ "integrity": "sha512-QnNTazY54YqgGxwIexMZva9gqbPa15t/x9VS+0fsEFWplwVpXYZivtgl43Z1vMpc1bdPP2PP8siFeVcnFvA3Cg==","dev": true,"dependencies": {"@babel/helper-plugin-utils": "^7.22.5"@@ -3417,16 +2806,16 @@}},"node_modules/@babel/plugin-transform-runtime": {- "version": "7.22.15",- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.22.15.tgz",- "integrity": "sha512-tEVLhk8NRZSmwQ0DJtxxhTrCht1HVo8VaMzYT4w6lwyKBuHsgoioAUA7/6eT2fRfc5/23fuGdlwIxXhRVgWr4g==",+ "version": "7.23.9",+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.23.9.tgz",+ "integrity": "sha512-A7clW3a0aSjm3ONU9o2HAILSegJCYlEZmOhmBRReVtIpY/Z/p7yIZ+wR41Z+UipwdGuqwtID/V/dOdZXjwi9gQ==","dev": true,"dependencies": {"@babel/helper-module-imports": "^7.22.15","@babel/helper-plugin-utils": "^7.22.5",- "babel-plugin-polyfill-corejs2": "^0.4.5",- "babel-plugin-polyfill-corejs3": "^0.8.3",- "babel-plugin-polyfill-regenerator": "^0.5.2",+ "babel-plugin-polyfill-corejs2": "^0.4.8",+ "babel-plugin-polyfill-corejs3": "^0.9.0",+ "babel-plugin-polyfill-regenerator": "^0.5.5","semver": "^6.3.1"},"engines": {@@ -3446,9 +2835,9 @@}},"node_modules/@babel/plugin-transform-shorthand-properties": {- "version": "7.22.5",- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.22.5.tgz",- "integrity": "sha512-vM4fq9IXHscXVKzDv5itkO1X52SmdFBFcMIBZ2FRn2nqVYqw6dBexUgMvAjHW+KXpPPViD/Yo3GrDEBaRC0QYA==",+ "version": "7.23.3",+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.23.3.tgz",+ "integrity": "sha512-ED2fgqZLmexWiN+YNFX26fx4gh5qHDhn1O2gvEhreLW2iI63Sqm4llRLCXALKrCnbN4Jy0VcMQZl/SAzqug/jg==","dev": true,"dependencies": {"@babel/helper-plugin-utils": "^7.22.5"@@ -3461,9 +2850,9 @@}},"node_modules/@babel/plugin-transform-spread": {- "version": "7.22.5",- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.22.5.tgz",- "integrity": "sha512-5ZzDQIGyvN4w8+dMmpohL6MBo+l2G7tfC/O2Dg7/hjpgeWvUx8FzfeOKxGog9IimPa4YekaQ9PlDqTLOljkcxg==",+ "version": "7.23.3",+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.23.3.tgz",+ "integrity": "sha512-VvfVYlrlBVu+77xVTOAoxQ6mZbnIq5FM0aGBSFEcIh03qHf+zNqA4DC/3XMUozTg7bZV3e3mZQ0i13VB6v5yUg==","dev": true,"dependencies": {"@babel/helper-plugin-utils": "^7.22.5",@@ -3477,9 +2866,9 @@}},"node_modules/@babel/plugin-transform-sticky-regex": {- "version": "7.22.5",- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.22.5.tgz",- "integrity": "sha512-zf7LuNpHG0iEeiyCNwX4j3gDg1jgt1k3ZdXBKbZSoA3BbGQGvMiSvfbZRR3Dr3aeJe3ooWFZxOOG3IRStYp2Bw==",+ "version": "7.23.3",+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.23.3.tgz",+ "integrity": "sha512-HZOyN9g+rtvnOU3Yh7kSxXrKbzgrm5X4GncPY1QOquu7epga5MxKHVpYu2hvQnry/H+JjckSYRb93iNfsioAGg==","dev": true,"dependencies": {"@babel/helper-plugin-utils": "^7.22.5"@@ -3492,9 +2881,9 @@}},"node_modules/@babel/plugin-transform-template-literals": {- "version": "7.22.5",- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.22.5.tgz",- "integrity": "sha512-5ciOehRNf+EyUeewo8NkbQiUs4d6ZxiHo6BcBcnFlgiJfu16q0bQUw9Jvo0b0gBKFG1SMhDSjeKXSYuJLeFSMA==",+ "version": "7.23.3",+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.23.3.tgz",+ "integrity": "sha512-Flok06AYNp7GV2oJPZZcP9vZdszev6vPBkHLwxwSpaIqx75wn6mUd3UFWsSsA0l8nXAKkyCmL/sR02m8RYGeHg==","dev": true,"dependencies": {"@babel/helper-plugin-utils": "^7.22.5"@@ -3507,9 +2896,9 @@}},"node_modules/@babel/plugin-transform-typeof-symbol": {- "version": "7.22.5",- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.22.5.tgz",- "integrity": "sha512-bYkI5lMzL4kPii4HHEEChkD0rkc+nvnlR6+o/qdqR6zrm0Sv/nodmyLhlq2DO0YKLUNd2VePmPRjJXSBh9OIdA==",+ "version": "7.23.3",+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.23.3.tgz",+ "integrity": "sha512-4t15ViVnaFdrPC74be1gXBSMzXk3B4Us9lP7uLRQHTFpV5Dvt33pn+2MyyNxmN3VTTm3oTrZVMUmuw3oBnQ2oQ==","dev": true,"dependencies": {"@babel/helper-plugin-utils": "^7.22.5"@@ -3522,15 +2911,15 @@}},"node_modules/@babel/plugin-transform-typescript": {- "version": "7.22.15",- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.22.15.tgz",- "integrity": "sha512-1uirS0TnijxvQLnlv5wQBwOX3E1wCFX7ITv+9pBV2wKEk4K+M5tqDaoNXnTH8tjEIYHLO98MwiTWO04Ggz4XuA==",+ "version": "7.23.6",+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.23.6.tgz",+ "integrity": "sha512-6cBG5mBvUu4VUD04OHKnYzbuHNP8huDsD3EDqqpIpsswTDoqHCjLoHb6+QgsV1WsT2nipRqCPgxD3LXnEO7XfA==","dev": true,"dependencies": {"@babel/helper-annotate-as-pure": "^7.22.5",- "@babel/helper-create-class-features-plugin": "^7.22.15",+ "@babel/helper-create-class-features-plugin": "^7.23.6","@babel/helper-plugin-utils": "^7.22.5",- "@babel/plugin-syntax-typescript": "^7.22.5"+ "@babel/plugin-syntax-typescript": "^7.23.3"},"engines": {"node": ">=6.9.0"@@ -3540,9 +2929,9 @@}},"node_modules/@babel/plugin-transform-unicode-escapes": {- "version": "7.22.10",- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.22.10.tgz",- "integrity": "sha512-lRfaRKGZCBqDlRU3UIFovdp9c9mEvlylmpod0/OatICsSfuQ9YFthRo1tpTkGsklEefZdqlEFdY4A2dwTb6ohg==",+ "version": "7.23.3",+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.23.3.tgz",+ "integrity": "sha512-OMCUx/bU6ChE3r4+ZdylEqAjaQgHAgipgW8nsCfu5pGqDcFytVd91AwRvUJSBZDz0exPGgnjoqhgRYLRjFZc9Q==","dev": true,"dependencies": {"@babel/helper-plugin-utils": "^7.22.5"@@ -3555,12 +2944,12 @@}},"node_modules/@babel/plugin-transform-unicode-property-regex": {- "version": "7.22.5",- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-property-regex/-/plugin-transform-unicode-property-regex-7.22.5.tgz",- "integrity": "sha512-HCCIb+CbJIAE6sXn5CjFQXMwkCClcOfPCzTlilJ8cUatfzwHlWQkbtV0zD338u9dZskwvuOYTuuaMaA8J5EI5A==",+ "version": "7.23.3",+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-property-regex/-/plugin-transform-unicode-property-regex-7.23.3.tgz",+ "integrity": "sha512-KcLIm+pDZkWZQAFJ9pdfmh89EwVfmNovFBcXko8szpBeF8z68kWIPeKlmSOkT9BXJxs2C0uk+5LxoxIv62MROA==","dev": true,"dependencies": {- "@babel/helper-create-regexp-features-plugin": "^7.22.5",+ "@babel/helper-create-regexp-features-plugin": "^7.22.15","@babel/helper-plugin-utils": "^7.22.5"},"engines": {@@ -3571,12 +2960,12 @@}},"node_modules/@babel/plugin-transform-unicode-regex": {- "version": "7.22.5",- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.22.5.tgz",- "integrity": "sha512-028laaOKptN5vHJf9/Arr/HiJekMd41hOEZYvNsrsXqJ7YPYuX2bQxh31fkZzGmq3YqHRJzYFFAVYvKfMPKqyg==",+ "version": "7.23.3",+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.23.3.tgz",+ "integrity": "sha512-wMHpNA4x2cIA32b/ci3AfwNgheiva2W0WUKWTK7vBHBhDKfPsc5cFGNWm69WBqpwd86u1qwZ9PWevKqm1A3yAw==","dev": true,"dependencies": {- "@babel/helper-create-regexp-features-plugin": "^7.22.5",+ "@babel/helper-create-regexp-features-plugin": "^7.22.15","@babel/helper-plugin-utils": "^7.22.5"},"engines": {@@ -3587,12 +2976,12 @@}},"node_modules/@babel/plugin-transform-unicode-sets-regex": {- "version": "7.22.5",- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-sets-regex/-/plugin-transform-unicode-sets-regex-7.22.5.tgz",- "integrity": "sha512-lhMfi4FC15j13eKrh3DnYHjpGj6UKQHtNKTbtc1igvAhRy4+kLhV07OpLcsN0VgDEw/MjAvJO4BdMJsHwMhzCg==",+ "version": "7.23.3",+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-sets-regex/-/plugin-transform-unicode-sets-regex-7.23.3.tgz",+ "integrity": "sha512-W7lliA/v9bNR83Qc3q1ip9CQMZ09CcHDbHfbLRDNuAhn1Mvkr1ZNF7hPmztMQvtTGVLJ9m8IZqWsTkXOml8dbw==","dev": true,"dependencies": {- "@babel/helper-create-regexp-features-plugin": "^7.22.5",+ "@babel/helper-create-regexp-features-plugin": "^7.22.15","@babel/helper-plugin-utils": "^7.22.5"},"engines": {@@ -3603,25 +2992,26 @@}},"node_modules/@babel/preset-env": {- "version": "7.22.15",- "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.22.15.tgz",- "integrity": "sha512-tZFHr54GBkHk6hQuVA8w4Fmq+MSPsfvMG0vPnOYyTnJpyfMqybL8/MbNCPRT9zc2KBO2pe4tq15g6Uno4Jpoag==",+ "version": "7.23.9",+ "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.23.9.tgz",+ "integrity": "sha512-3kBGTNBBk9DQiPoXYS0g0BYlwTQYUTifqgKTjxUwEUkduRT2QOa0FPGBJ+NROQhGyYO5BuTJwGvBnqKDykac6A==","dev": true,"dependencies": {- "@babel/compat-data": "^7.22.9",- "@babel/helper-compilation-targets": "^7.22.15",+ "@babel/compat-data": "^7.23.5",+ "@babel/helper-compilation-targets": "^7.23.6","@babel/helper-plugin-utils": "^7.22.5",- "@babel/helper-validator-option": "^7.22.15",- "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.22.15",- "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.22.15",+ "@babel/helper-validator-option": "^7.23.5",+ "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.23.3",+ "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.23.3",+ "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly": "^7.23.7","@babel/plugin-proposal-private-property-in-object": "7.21.0-placeholder-for-preset-env.2","@babel/plugin-syntax-async-generators": "^7.8.4","@babel/plugin-syntax-class-properties": "^7.12.13","@babel/plugin-syntax-class-static-block": "^7.14.5","@babel/plugin-syntax-dynamic-import": "^7.8.3","@babel/plugin-syntax-export-namespace-from": "^7.8.3",- "@babel/plugin-syntax-import-assertions": "^7.22.5",- "@babel/plugin-syntax-import-attributes": "^7.22.5",+ "@babel/plugin-syntax-import-assertions": "^7.23.3",+ "@babel/plugin-syntax-import-attributes": "^7.23.3","@babel/plugin-syntax-import-meta": "^7.10.4","@babel/plugin-syntax-json-strings": "^7.8.3","@babel/plugin-syntax-logical-assignment-operators": "^7.10.4",@@ -3633,59 +3023,58 @@"@babel/plugin-syntax-private-property-in-object": "^7.14.5","@babel/plugin-syntax-top-level-await": "^7.14.5","@babel/plugin-syntax-unicode-sets-regex": "^7.18.6",- "@babel/plugin-transform-arrow-functions": "^7.22.5",- "@babel/plugin-transform-async-generator-functions": "^7.22.15",- "@babel/plugin-transform-async-to-generator": "^7.22.5",- "@babel/plugin-transform-block-scoped-functions": "^7.22.5",- "@babel/plugin-transform-block-scoping": "^7.22.15",- "@babel/plugin-transform-class-properties": "^7.22.5",- "@babel/plugin-transform-class-static-block": "^7.22.11",- "@babel/plugin-transform-classes": "^7.22.15",- "@babel/plugin-transform-computed-properties": "^7.22.5",- "@babel/plugin-transform-destructuring": "^7.22.15",- "@babel/plugin-transform-dotall-regex": "^7.22.5",- "@babel/plugin-transform-duplicate-keys": "^7.22.5",- "@babel/plugin-transform-dynamic-import": "^7.22.11",- "@babel/plugin-transform-exponentiation-operator": "^7.22.5",- "@babel/plugin-transform-export-namespace-from": "^7.22.11",- "@babel/plugin-transform-for-of": "^7.22.15",- "@babel/plugin-transform-function-name": "^7.22.5",- "@babel/plugin-transform-json-strings": "^7.22.11",- "@babel/plugin-transform-literals": "^7.22.5",- "@babel/plugin-transform-logical-assignment-operators": "^7.22.11",- "@babel/plugin-transform-member-expression-literals": "^7.22.5",- "@babel/plugin-transform-modules-amd": "^7.22.5",- "@babel/plugin-transform-modules-commonjs": "^7.22.15",- "@babel/plugin-transform-modules-systemjs": "^7.22.11",- "@babel/plugin-transform-modules-umd": "^7.22.5",+ "@babel/plugin-transform-arrow-functions": "^7.23.3",+ "@babel/plugin-transform-async-generator-functions": "^7.23.9",+ "@babel/plugin-transform-async-to-generator": "^7.23.3",+ "@babel/plugin-transform-block-scoped-functions": "^7.23.3",+ "@babel/plugin-transform-block-scoping": "^7.23.4",+ "@babel/plugin-transform-class-properties": "^7.23.3",+ "@babel/plugin-transform-class-static-block": "^7.23.4",+ "@babel/plugin-transform-classes": "^7.23.8",+ "@babel/plugin-transform-computed-properties": "^7.23.3",+ "@babel/plugin-transform-destructuring": "^7.23.3",+ "@babel/plugin-transform-dotall-regex": "^7.23.3",+ "@babel/plugin-transform-duplicate-keys": "^7.23.3",+ "@babel/plugin-transform-dynamic-import": "^7.23.4",+ "@babel/plugin-transform-exponentiation-operator": "^7.23.3",+ "@babel/plugin-transform-export-namespace-from": "^7.23.4",+ "@babel/plugin-transform-for-of": "^7.23.6",+ "@babel/plugin-transform-function-name": "^7.23.3",+ "@babel/plugin-transform-json-strings": "^7.23.4",+ "@babel/plugin-transform-literals": "^7.23.3",+ "@babel/plugin-transform-logical-assignment-operators": "^7.23.4",+ "@babel/plugin-transform-member-expression-literals": "^7.23.3",+ "@babel/plugin-transform-modules-amd": "^7.23.3",+ "@babel/plugin-transform-modules-commonjs": "^7.23.3",+ "@babel/plugin-transform-modules-systemjs": "^7.23.9",+ "@babel/plugin-transform-modules-umd": "^7.23.3","@babel/plugin-transform-named-capturing-groups-regex": "^7.22.5",- "@babel/plugin-transform-new-target": "^7.22.5",- "@babel/plugin-transform-nullish-coalescing-operator": "^7.22.11",- "@babel/plugin-transform-numeric-separator": "^7.22.11",- "@babel/plugin-transform-object-rest-spread": "^7.22.15",- "@babel/plugin-transform-object-super": "^7.22.5",- "@babel/plugin-transform-optional-catch-binding": "^7.22.11",- "@babel/plugin-transform-optional-chaining": "^7.22.15",- "@babel/plugin-transform-parameters": "^7.22.15",- "@babel/plugin-transform-private-methods": "^7.22.5",- "@babel/plugin-transform-private-property-in-object": "^7.22.11",- "@babel/plugin-transform-property-literals": "^7.22.5",- "@babel/plugin-transform-regenerator": "^7.22.10",- "@babel/plugin-transform-reserved-words": "^7.22.5",- "@babel/plugin-transform-shorthand-properties": "^7.22.5",- "@babel/plugin-transform-spread": "^7.22.5",- "@babel/plugin-transform-sticky-regex": "^7.22.5",- "@babel/plugin-transform-template-literals": "^7.22.5",- "@babel/plugin-transform-typeof-symbol": "^7.22.5",- "@babel/plugin-transform-unicode-escapes": "^7.22.10",- "@babel/plugin-transform-unicode-property-regex": "^7.22.5",- "@babel/plugin-transform-unicode-regex": "^7.22.5",- "@babel/plugin-transform-unicode-sets-regex": "^7.22.5",+ "@babel/plugin-transform-new-target": "^7.23.3",+ "@babel/plugin-transform-nullish-coalescing-operator": "^7.23.4",+ "@babel/plugin-transform-numeric-separator": "^7.23.4",+ "@babel/plugin-transform-object-rest-spread": "^7.23.4",+ "@babel/plugin-transform-object-super": "^7.23.3",+ "@babel/plugin-transform-optional-catch-binding": "^7.23.4",+ "@babel/plugin-transform-optional-chaining": "^7.23.4",+ "@babel/plugin-transform-parameters": "^7.23.3",+ "@babel/plugin-transform-private-methods": "^7.23.3",+ "@babel/plugin-transform-private-property-in-object": "^7.23.4",+ "@babel/plugin-transform-property-literals": "^7.23.3",+ "@babel/plugin-transform-regenerator": "^7.23.3",+ "@babel/plugin-transform-reserved-words": "^7.23.3",+ "@babel/plugin-transform-shorthand-properties": "^7.23.3",+ "@babel/plugin-transform-spread": "^7.23.3",+ "@babel/plugin-transform-sticky-regex": "^7.23.3",+ "@babel/plugin-transform-template-literals": "^7.23.3",+ "@babel/plugin-transform-typeof-symbol": "^7.23.3",+ "@babel/plugin-transform-unicode-escapes": "^7.23.3",+ "@babel/plugin-transform-unicode-property-regex": "^7.23.3",+ "@babel/plugin-transform-unicode-regex": "^7.23.3",+ "@babel/plugin-transform-unicode-sets-regex": "^7.23.3","@babel/preset-modules": "0.1.6-no-external-plugins",- "@babel/types": "^7.22.15",- "babel-plugin-polyfill-corejs2": "^0.4.5",- "babel-plugin-polyfill-corejs3": "^0.8.3",- "babel-plugin-polyfill-regenerator": "^0.5.2",+ "babel-plugin-polyfill-corejs2": "^0.4.8",+ "babel-plugin-polyfill-corejs3": "^0.9.0",+ "babel-plugin-polyfill-regenerator": "^0.5.5","core-js-compat": "^3.31.0","semver": "^6.3.1"},@@ -3720,17 +3109,17 @@}},"node_modules/@babel/preset-react": {- "version": "7.22.15",- "resolved": "https://registry.npmjs.org/@babel/preset-react/-/preset-react-7.22.15.tgz",- "integrity": "sha512-Csy1IJ2uEh/PecCBXXoZGAZBeCATTuePzCSB7dLYWS0vOEj6CNpjxIhW4duWwZodBNueH7QO14WbGn8YyeuN9w==",+ "version": "7.23.3",+ "resolved": "https://registry.npmjs.org/@babel/preset-react/-/preset-react-7.23.3.tgz",+ "integrity": "sha512-tbkHOS9axH6Ysf2OUEqoSZ6T3Fa2SrNH6WTWSPBboxKzdxNc9qOICeLXkNG0ZEwbQ1HY8liwOce4aN/Ceyuq6w==","dev": true,"dependencies": {"@babel/helper-plugin-utils": "^7.22.5","@babel/helper-validator-option": "^7.22.15",- "@babel/plugin-transform-react-display-name": "^7.22.5",+ "@babel/plugin-transform-react-display-name": "^7.23.3","@babel/plugin-transform-react-jsx": "^7.22.15","@babel/plugin-transform-react-jsx-development": "^7.22.5",- "@babel/plugin-transform-react-pure-annotations": "^7.22.5"+ "@babel/plugin-transform-react-pure-annotations": "^7.23.3"},"engines": {"node": ">=6.9.0"@@ -3740,16 +3129,16 @@}},"node_modules/@babel/preset-typescript": {- "version": "7.22.15",- "resolved": "https://registry.npmjs.org/@babel/preset-typescript/-/preset-typescript-7.22.15.tgz",- "integrity": "sha512-HblhNmh6yM+cU4VwbBRpxFhxsTdfS1zsvH9W+gEjD0ARV9+8B4sNfpI6GuhePti84nuvhiwKS539jKPFHskA9A==",+ "version": "7.23.3",+ "resolved": "https://registry.npmjs.org/@babel/preset-typescript/-/preset-typescript-7.23.3.tgz",+ "integrity": "sha512-17oIGVlqz6CchO9RFYn5U6ZpWRZIngayYCtrPRSgANSwC2V1Jb+iP74nVxzzXJte8b8BYxrL1yY96xfhTBrNNQ==","dev": true,"dependencies": {"@babel/helper-plugin-utils": "^7.22.5","@babel/helper-validator-option": "^7.22.15",- "@babel/plugin-syntax-jsx": "^7.22.5",- "@babel/plugin-transform-modules-commonjs": "^7.22.15",- "@babel/plugin-transform-typescript": "^7.22.15"+ "@babel/plugin-syntax-jsx": "^7.23.3",+ "@babel/plugin-transform-modules-commonjs": "^7.23.3",+ "@babel/plugin-transform-typescript": "^7.23.3"},"engines": {"node": ">=6.9.0"@@ -3765,9 +3154,9 @@"dev": true},"node_modules/@babel/runtime": {- "version": "7.22.15",- "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.22.15.tgz",- "integrity": "sha512-T0O+aa+4w0u06iNmapipJXMV4HoUir03hpx3/YqXXhu9xim3w+dVphjFWl1OH8NbZHw5Lbm9k45drDkgq2VNNA==",+ "version": "7.23.9",+ "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.23.9.tgz",+ "integrity": "sha512-0CX6F+BI2s9dkUqr08KFrAIZgNFj75rdBU/DjCyYLIaV/quFjkk6T+EJ2LkZHyZTbEV4L5p97mNkUsHl2wLFAw==","dependencies": {"regenerator-runtime": "^0.14.0"},@@ -3776,23 +3165,23 @@}},"node_modules/@babel/template": {- "version": "7.22.15",- "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.15.tgz",- "integrity": "sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==",+ "version": "7.23.9",+ "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.23.9.tgz",+ "integrity": "sha512-+xrD2BWLpvHKNmX2QbpdpsBaWnRxahMwJjO+KZk2JOElj5nSmKezyS1B4u+QbHMTX69t4ukm6hh9lsYQ7GHCKA==","dev": true,"dependencies": {- "@babel/code-frame": "^7.22.13",- "@babel/parser": "^7.22.15",- "@babel/types": "^7.22.15"+ "@babel/code-frame": "^7.23.5",+ "@babel/parser": "^7.23.9",+ "@babel/types": "^7.23.9"},"engines": {"node": ">=6.9.0"}},"node_modules/@babel/traverse": {- "version": "7.23.6",- "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.6.tgz",- "integrity": "sha512-czastdK1e8YByZqezMPFiZ8ahwVMh/ESl9vPgvgdB9AmFMGP5jfpFax74AQgl5zj4XHzqeYAg2l8PuUeRS1MgQ==",+ "version": "7.23.9",+ "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.9.tgz",+ "integrity": "sha512-I/4UJ9vs90OkBtY6iiiTORVMyIhJ4kAVmsKo9KFc8UOxMeUfi2hvtIBsET5u9GizXE6/GFSuKCTNfgCswuEjRg==","dev": true,"dependencies": {"@babel/code-frame": "^7.23.5",@@ -3801,8 +3190,8 @@"@babel/helper-function-name": "^7.23.0","@babel/helper-hoist-variables": "^7.22.5","@babel/helper-split-export-declaration": "^7.22.6",- "@babel/parser": "^7.23.6",- "@babel/types": "^7.23.6",+ "@babel/parser": "^7.23.9",+ "@babel/types": "^7.23.9","debug": "^4.3.1","globals": "^11.1.0"},@@ -3820,9 +3209,9 @@}},"node_modules/@babel/types": {- "version": "7.23.6",- "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.6.tgz",- "integrity": "sha512-+uarb83brBzPKN38NX1MkB6vb6+mwvR6amUulqAE7ccQw1pEl+bCia9TbdG1lsnFP7lZySvUn37CHyXQdfTwzg==",+ "version": "7.23.9",+ "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.9.tgz",+ "integrity": "sha512-dQjSq/7HaSjRM43FFGnv5keM2HsxpmyV1PfaSVm0nzzjwwTmjOe6J4bC8e3+pTEIgHaHj+1ZlLThRJ2auc/w1Q==","dev": true,"dependencies": {"@babel/helper-string-parser": "^7.23.4",@@ -3840,17 +3229,17 @@"dev": true},"node_modules/@colors/colors": {- "version": "1.5.0",- "resolved": "https://registry.npmjs.org/@colors/colors/-/colors-1.5.0.tgz",- "integrity": "sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==",+ "version": "1.6.0",+ "resolved": "https://registry.npmjs.org/@colors/colors/-/colors-1.6.0.tgz",+ "integrity": "sha512-Ir+AOibqzrIsL6ajt3Rz3LskB7OiMVHqltZmspbW/TJuTVuyOMirVqAkjfY6JISiLHgyNqicAC8AyHHGzNd/dA==","engines": {"node": ">=0.1.90"}},"node_modules/@csstools/cascade-layer-name-parser": {- "version": "1.0.4",- "resolved": "https://registry.npmjs.org/@csstools/cascade-layer-name-parser/-/cascade-layer-name-parser-1.0.4.tgz",- "integrity": "sha512-zXMGsJetbLoXe+gjEES07MEGjL0Uy3hMxmnGtVBrRpVKr5KV9OgCB09zr/vLrsEtoVQTgJFewxaU8IYSAE4tjg==",+ "version": "1.0.7",+ "resolved": "https://registry.npmjs.org/@csstools/cascade-layer-name-parser/-/cascade-layer-name-parser-1.0.7.tgz",+ "integrity": "sha512-9J4aMRJ7A2WRjaRLvsMeWrL69FmEuijtiW1XlK/sG+V0UJiHVYUyvj9mY4WAXfU/hGIiGOgL8e0jJcRyaZTjDQ==","dev": true,"funding": [{@@ -3866,14 +3255,14 @@"node": "^14 || ^16 || >=18"},"peerDependencies": {- "@csstools/css-parser-algorithms": "^2.3.1",- "@csstools/css-tokenizer": "^2.2.0"+ "@csstools/css-parser-algorithms": "^2.5.0",+ "@csstools/css-tokenizer": "^2.2.3"}},"node_modules/@csstools/color-helpers": {- "version": "3.0.2",- "resolved": "https://registry.npmjs.org/@csstools/color-helpers/-/color-helpers-3.0.2.tgz",- "integrity": "sha512-NMVs/l7Y9eIKL5XjbCHEgGcG8LOUT2qVcRjX6EzkCdlvftHVKr2tHIPzHavfrULRZ5Q2gxrJ9f44dAlj6fX97Q==",+ "version": "4.0.0",+ "resolved": "https://registry.npmjs.org/@csstools/color-helpers/-/color-helpers-4.0.0.tgz",+ "integrity": "sha512-wjyXB22/h2OvxAr3jldPB7R7kjTUEzopvjitS8jWtyd8fN6xJ8vy1HnHu0ZNfEkqpBJgQ76Q+sBDshWcMvTa/w==","dev": true,"funding": [{@@ -3890,9 +3279,9 @@}},"node_modules/@csstools/css-calc": {- "version": "1.1.3",- "resolved": "https://registry.npmjs.org/@csstools/css-calc/-/css-calc-1.1.3.tgz",- "integrity": "sha512-7mJZ8gGRtSQfQKBQFi5N0Z+jzNC0q8bIkwojP1W0w+APzEqHu5wJoGVsvKxVnVklu9F8tW1PikbBRseYnAdv+g==",+ "version": "1.1.6",+ "resolved": "https://registry.npmjs.org/@csstools/css-calc/-/css-calc-1.1.6.tgz",+ "integrity": "sha512-YHPAuFg5iA4qZGzMzvrQwzkvJpesXXyIUyaONflQrjtHB+BcFFbgltJkIkb31dMGO4SE9iZFA4HYpdk7+hnYew==","dev": true,"funding": [{@@ -3908,14 +3297,14 @@"node": "^14 || ^16 || >=18"},"peerDependencies": {- "@csstools/css-parser-algorithms": "^2.3.1",- "@csstools/css-tokenizer": "^2.2.0"+ "@csstools/css-parser-algorithms": "^2.5.0",+ "@csstools/css-tokenizer": "^2.2.3"}},"node_modules/@csstools/css-color-parser": {- "version": "1.3.1",- "resolved": "https://registry.npmjs.org/@csstools/css-color-parser/-/css-color-parser-1.3.1.tgz",- "integrity": "sha512-cehc/DQCyb4hL4fspvyL7WiY+uAy8Iuaz0yTyndC/AyBmxkNpgtSgCSsr0aR4vkaSFVZfNNVlKbjHFwOsPGB1Q==",+ "version": "1.5.1",+ "resolved": "https://registry.npmjs.org/@csstools/css-color-parser/-/css-color-parser-1.5.1.tgz",+ "integrity": "sha512-x+SajGB2paGrTjPOUorGi8iCztF008YMKXTn+XzGVDBEIVJ/W1121pPerpneJYGOe1m6zWLPLnzOPaznmQxKFw==","dev": true,"funding": [{@@ -3928,21 +3317,21 @@}],"dependencies": {- "@csstools/color-helpers": "^3.0.2",- "@csstools/css-calc": "^1.1.3"+ "@csstools/color-helpers": "^4.0.0",+ "@csstools/css-calc": "^1.1.6"},"engines": {"node": "^14 || ^16 || >=18"},"peerDependencies": {- "@csstools/css-parser-algorithms": "^2.3.1",- "@csstools/css-tokenizer": "^2.2.0"+ "@csstools/css-parser-algorithms": "^2.5.0",+ "@csstools/css-tokenizer": "^2.2.3"}},"node_modules/@csstools/css-parser-algorithms": {- "version": "2.3.1",- "resolved": "https://registry.npmjs.org/@csstools/css-parser-algorithms/-/css-parser-algorithms-2.3.1.tgz",- "integrity": "sha512-xrvsmVUtefWMWQsGgFffqWSK03pZ1vfDki4IVIIUxxDKnGBzqNgv0A7SB1oXtVNEkcVO8xi1ZrTL29HhSu5kGA==",+ "version": "2.5.0",+ "resolved": "https://registry.npmjs.org/@csstools/css-parser-algorithms/-/css-parser-algorithms-2.5.0.tgz",+ "integrity": "sha512-abypo6m9re3clXA00eu5syw+oaPHbJTPapu9C4pzNsJ4hdZDzushT50Zhu+iIYXgEe1CxnRMn7ngsbV+MLrlpQ==","dev": true,"funding": [{@@ -3958,13 +3347,13 @@"node": "^14 || ^16 || >=18"},"peerDependencies": {- "@csstools/css-tokenizer": "^2.2.0"+ "@csstools/css-tokenizer": "^2.2.3"}},"node_modules/@csstools/css-tokenizer": {- "version": "2.2.0",- "resolved": "https://registry.npmjs.org/@csstools/css-tokenizer/-/css-tokenizer-2.2.0.tgz",- "integrity": "sha512-wErmsWCbsmig8sQKkM6pFhr/oPha1bHfvxsUY5CYSQxwyhA9Ulrs8EqCgClhg4Tgg2XapVstGqSVcz0xOYizZA==",+ "version": "2.2.3",+ "resolved": "https://registry.npmjs.org/@csstools/css-tokenizer/-/css-tokenizer-2.2.3.tgz",+ "integrity": "sha512-pp//EvZ9dUmGuGtG1p+n17gTHEOqu9jO+FiCUjNN3BDmyhdA2Jq9QsVeR7K8/2QCK17HSsioPlTW9ZkzoWb3Lg==","dev": true,"funding": [{@@ -3981,9 +3370,9 @@}},"node_modules/@csstools/media-query-list-parser": {- "version": "2.1.4",- "resolved": "https://registry.npmjs.org/@csstools/media-query-list-parser/-/media-query-list-parser-2.1.4.tgz",- "integrity": "sha512-V/OUXYX91tAC1CDsiY+HotIcJR+vPtzrX8pCplCpT++i8ThZZsq5F5dzZh/bDM3WUOjrvC1ljed1oSJxMfjqhw==",+ "version": "2.1.7",+ "resolved": "https://registry.npmjs.org/@csstools/media-query-list-parser/-/media-query-list-parser-2.1.7.tgz",+ "integrity": "sha512-lHPKJDkPUECsyAvD60joYfDmp8UERYxHGkFfyLJFTVK/ERJe0sVlIFLXU5XFxdjNDTerp5L4KeaKG+Z5S94qxQ==","dev": true,"funding": [{@@ -3999,8 +3388,8 @@"node": "^14 || ^16 || >=18"},"peerDependencies": {- "@csstools/css-parser-algorithms": "^2.3.1",- "@csstools/css-tokenizer": "^2.2.0"+ "@csstools/css-parser-algorithms": "^2.5.0",+ "@csstools/css-tokenizer": "^2.2.3"}},"node_modules/@csstools/postcss-cascade-layers": {@@ -4260,9 +3649,9 @@}},"node_modules/@csstools/postcss-media-minmax": {- "version": "1.0.7",- "resolved": "https://registry.npmjs.org/@csstools/postcss-media-minmax/-/postcss-media-minmax-1.0.7.tgz",- "integrity": "sha512-5LGLdu8cJgRPmvkjUNqOPKIKeHbyQmoGKooB5Rh0mp5mLaNI9bl+IjFZ2keY0cztZYsriJsGf6Lu8R5XetuwoQ==",+ "version": "1.1.2",+ "resolved": "https://registry.npmjs.org/@csstools/postcss-media-minmax/-/postcss-media-minmax-1.1.2.tgz",+ "integrity": "sha512-7qTRTJxW96u2yiEaTep1+8nto1O/rEDacewKqH+Riq5E6EsHTOmGHxkB4Se5Ic5xgDC4I05lLZxzzxnlnSypxA==","dev": true,"funding": [{@@ -4275,10 +3664,10 @@}],"dependencies": {- "@csstools/css-calc": "^1.1.3",- "@csstools/css-parser-algorithms": "^2.3.1",- "@csstools/css-tokenizer": "^2.2.0",- "@csstools/media-query-list-parser": "^2.1.4"+ "@csstools/css-calc": "^1.1.6",+ "@csstools/css-parser-algorithms": "^2.5.0",+ "@csstools/css-tokenizer": "^2.2.3",+ "@csstools/media-query-list-parser": "^2.1.7"},"engines": {"node": "^14 || ^16 || >=18"@@ -4582,14 +3971,30 @@}},"node_modules/@dqbd/tiktoken": {- "version": "1.0.7",- "resolved": "https://registry.npmjs.org/@dqbd/tiktoken/-/tiktoken-1.0.7.tgz",- "integrity": "sha512-bhR5k5W+8GLzysjk8zTMVygQZsgvf7W1F0IlL4ZQ5ugjo5rCyiwGM5d8DYriXspytfu98tv59niang3/T+FoDw=="+ "version": "1.0.13",+ "resolved": "https://registry.npmjs.org/@dqbd/tiktoken/-/tiktoken-1.0.13.tgz",+ "integrity": "sha512-941kjlHjfI97l6NuH/AwuXV4mHuVnRooDcHNSlzi98hz+4ug3wT4gJcWjSwSZHqeGAEn90lC9sFD+8a9d5Jvxg=="+ },+ "node_modules/@esbuild/aix-ppc64": {+ "version": "0.19.12",+ "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.19.12.tgz",+ "integrity": "sha512-bmoCYyWdEL3wDQIVbcyzRyeKLgk2WtWLTWz1ZIAZF/EGbNOwSA6ew3PftJ1PqMiOOGu0OyFMzG53L0zqIpPeNA==",+ "cpu": [+ "ppc64"+ ],+ "dev": true,+ "optional": true,+ "os": [+ "aix"+ ],+ "engines": {+ "node": ">=12"+ }},"node_modules/@esbuild/android-arm": {- "version": "0.19.9",- "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.19.9.tgz",- "integrity": "sha512-jkYjjq7SdsWuNI6b5quymW0oC83NN5FdRPuCbs9HZ02mfVdAP8B8eeqLSYU3gb6OJEaY5CQabtTFbqBf26H3GA==",+ "version": "0.19.12",+ "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.19.12.tgz",+ "integrity": "sha512-qg/Lj1mu3CdQlDEEiWrlC4eaPZ1KztwGJ9B6J+/6G+/4ewxJg7gqj8eVYWvao1bXrqGiW2rsBZFSX3q2lcW05w==","cpu": ["arm"],@@ -4603,9 +4008,9 @@}},"node_modules/@esbuild/android-arm64": {- "version": "0.19.9",- "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.19.9.tgz",- "integrity": "sha512-q4cR+6ZD0938R19MyEW3jEsMzbb/1rulLXiNAJQADD/XYp7pT+rOS5JGxvpRW8dFDEfjW4wLgC/3FXIw4zYglQ==",+ "version": "0.19.12",+ "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.19.12.tgz",+ "integrity": "sha512-P0UVNGIienjZv3f5zq0DP3Nt2IE/3plFzuaS96vihvD0Hd6H/q4WXUGpCxD/E8YrSXfNyRPbpTq+T8ZQioSuPA==","cpu": ["arm64"],@@ -4619,9 +4024,9 @@}},"node_modules/@esbuild/android-x64": {- "version": "0.19.9",- "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.19.9.tgz",- "integrity": "sha512-KOqoPntWAH6ZxDwx1D6mRntIgZh9KodzgNOy5Ebt9ghzffOk9X2c1sPwtM9P+0eXbefnDhqYfkh5PLP5ULtWFA==",+ "version": "0.19.12",+ "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.19.12.tgz",+ "integrity": "sha512-3k7ZoUW6Q6YqhdhIaq/WZ7HwBpnFBlW905Fa4s4qWJyiNOgT1dOqDiVAQFwBH7gBRZr17gLrlFCRzF6jFh7Kew==","cpu": ["x64"],@@ -4635,9 +4040,9 @@}},"node_modules/@esbuild/darwin-arm64": {- "version": "0.19.9",- "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.19.9.tgz",- "integrity": "sha512-KBJ9S0AFyLVx2E5D8W0vExqRW01WqRtczUZ8NRu+Pi+87opZn5tL4Y0xT0mA4FtHctd0ZgwNoN639fUUGlNIWw==",+ "version": "0.19.12",+ "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.19.12.tgz",+ "integrity": "sha512-B6IeSgZgtEzGC42jsI+YYu9Z3HKRxp8ZT3cqhvliEHovq8HSX2YX8lNocDn79gCKJXOSaEot9MVYky7AKjCs8g==","cpu": ["arm64"],@@ -4651,9 +4056,9 @@}},"node_modules/@esbuild/darwin-x64": {- "version": "0.19.9",- "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.19.9.tgz",- "integrity": "sha512-vE0VotmNTQaTdX0Q9dOHmMTao6ObjyPm58CHZr1UK7qpNleQyxlFlNCaHsHx6Uqv86VgPmR4o2wdNq3dP1qyDQ==",+ "version": "0.19.12",+ "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.19.12.tgz",+ "integrity": "sha512-hKoVkKzFiToTgn+41qGhsUJXFlIjxI/jSYeZf3ugemDYZldIXIxhvwN6erJGlX4t5h417iFuheZ7l+YVn05N3A==","cpu": ["x64"],@@ -4667,9 +4072,9 @@}},"node_modules/@esbuild/freebsd-arm64": {- "version": "0.19.9",- "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.19.9.tgz",- "integrity": "sha512-uFQyd/o1IjiEk3rUHSwUKkqZwqdvuD8GevWF065eqgYfexcVkxh+IJgwTaGZVu59XczZGcN/YMh9uF1fWD8j1g==",+ "version": "0.19.12",+ "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.19.12.tgz",+ "integrity": "sha512-4aRvFIXmwAcDBw9AueDQ2YnGmz5L6obe5kmPT8Vd+/+x/JMVKCgdcRwH6APrbpNXsPz+K653Qg8HB/oXvXVukA==","cpu": ["arm64"],@@ -4683,9 +4088,9 @@}},"node_modules/@esbuild/freebsd-x64": {- "version": "0.19.9",- "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.19.9.tgz",- "integrity": "sha512-WMLgWAtkdTbTu1AWacY7uoj/YtHthgqrqhf1OaEWnZb7PQgpt8eaA/F3LkV0E6K/Lc0cUr/uaVP/49iE4M4asA==",+ "version": "0.19.12",+ "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.19.12.tgz",+ "integrity": "sha512-EYoXZ4d8xtBoVN7CEwWY2IN4ho76xjYXqSXMNccFSx2lgqOG/1TBPW0yPx1bJZk94qu3tX0fycJeeQsKovA8gg==","cpu": ["x64"],@@ -4699,9 +4104,9 @@}},"node_modules/@esbuild/linux-arm": {- "version": "0.19.9",- "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.19.9.tgz",- "integrity": "sha512-C/ChPohUYoyUaqn1h17m/6yt6OB14hbXvT8EgM1ZWaiiTYz7nWZR0SYmMnB5BzQA4GXl3BgBO1l8MYqL/He3qw==",+ "version": "0.19.12",+ "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.19.12.tgz",+ "integrity": "sha512-J5jPms//KhSNv+LO1S1TX1UWp1ucM6N6XuL6ITdKWElCu8wXP72l9MM0zDTzzeikVyqFE6U8YAV9/tFyj0ti+w==","cpu": ["arm"],@@ -4715,9 +4120,9 @@}},"node_modules/@esbuild/linux-arm64": {- "version": "0.19.9",- "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.19.9.tgz",- "integrity": "sha512-PiPblfe1BjK7WDAKR1Cr9O7VVPqVNpwFcPWgfn4xu0eMemzRp442hXyzF/fSwgrufI66FpHOEJk0yYdPInsmyQ==",+ "version": "0.19.12",+ "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.19.12.tgz",+ "integrity": "sha512-EoTjyYyLuVPfdPLsGVVVC8a0p1BFFvtpQDB/YLEhaXyf/5bczaGeN15QkR+O4S5LeJ92Tqotve7i1jn35qwvdA==","cpu": ["arm64"],@@ -4731,9 +4136,9 @@}},"node_modules/@esbuild/linux-ia32": {- "version": "0.19.9",- "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.19.9.tgz",- "integrity": "sha512-f37i/0zE0MjDxijkPSQw1CO/7C27Eojqb+r3BbHVxMLkj8GCa78TrBZzvPyA/FNLUMzP3eyHCVkAopkKVja+6Q==",+ "version": "0.19.12",+ "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.19.12.tgz",+ "integrity": "sha512-Thsa42rrP1+UIGaWz47uydHSBOgTUnwBwNq59khgIwktK6x60Hivfbux9iNR0eHCHzOLjLMLfUMLCypBkZXMHA==","cpu": ["ia32"],@@ -4747,9 +4152,9 @@}},"node_modules/@esbuild/linux-loong64": {- "version": "0.19.9",- "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.19.9.tgz",- "integrity": "sha512-t6mN147pUIf3t6wUt3FeumoOTPfmv9Cc6DQlsVBpB7eCpLOqQDyWBP1ymXn1lDw4fNUSb/gBcKAmvTP49oIkaA==",+ "version": "0.19.12",+ "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.19.12.tgz",+ "integrity": "sha512-LiXdXA0s3IqRRjm6rV6XaWATScKAXjI4R4LoDlvO7+yQqFdlr1Bax62sRwkVvRIrwXxvtYEHHI4dm50jAXkuAA==","cpu": ["loong64"],@@ -4763,9 +4168,9 @@}},"node_modules/@esbuild/linux-mips64el": {- "version": "0.19.9",- "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.19.9.tgz",- "integrity": "sha512-jg9fujJTNTQBuDXdmAg1eeJUL4Jds7BklOTkkH80ZgQIoCTdQrDaHYgbFZyeTq8zbY+axgptncko3v9p5hLZtw==",+ "version": "0.19.12",+ "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.19.12.tgz",+ "integrity": "sha512-fEnAuj5VGTanfJ07ff0gOA6IPsvrVHLVb6Lyd1g2/ed67oU1eFzL0r9WL7ZzscD+/N6i3dWumGE1Un4f7Amf+w==","cpu": ["mips64el"],@@ -4779,9 +4184,9 @@}},"node_modules/@esbuild/linux-ppc64": {- "version": "0.19.9",- "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.19.9.tgz",- "integrity": "sha512-tkV0xUX0pUUgY4ha7z5BbDS85uI7ABw3V1d0RNTii7E9lbmV8Z37Pup2tsLV46SQWzjOeyDi1Q7Wx2+QM8WaCQ==",+ "version": "0.19.12",+ "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.19.12.tgz",+ "integrity": "sha512-nYJA2/QPimDQOh1rKWedNOe3Gfc8PabU7HT3iXWtNUbRzXS9+vgB0Fjaqr//XNbd82mCxHzik2qotuI89cfixg==","cpu": ["ppc64"],@@ -4795,9 +4200,9 @@}},"node_modules/@esbuild/linux-riscv64": {- "version": "0.19.9",- "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.19.9.tgz",- "integrity": "sha512-DfLp8dj91cufgPZDXr9p3FoR++m3ZJ6uIXsXrIvJdOjXVREtXuQCjfMfvmc3LScAVmLjcfloyVtpn43D56JFHg==",+ "version": "0.19.12",+ "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.19.12.tgz",+ "integrity": "sha512-2MueBrlPQCw5dVJJpQdUYgeqIzDQgw3QtiAHUC4RBz9FXPrskyyU3VI1hw7C0BSKB9OduwSJ79FTCqtGMWqJHg==","cpu": ["riscv64"],@@ -4811,9 +4216,9 @@}},"node_modules/@esbuild/linux-s390x": {- "version": "0.19.9",- "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.19.9.tgz",- "integrity": "sha512-zHbglfEdC88KMgCWpOl/zc6dDYJvWGLiUtmPRsr1OgCViu3z5GncvNVdf+6/56O2Ca8jUU+t1BW261V6kp8qdw==",+ "version": "0.19.12",+ "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.19.12.tgz",+ "integrity": "sha512-+Pil1Nv3Umes4m3AZKqA2anfhJiVmNCYkPchwFJNEJN5QxmTs1uzyy4TvmDrCRNT2ApwSari7ZIgrPeUx4UZDg==","cpu": ["s390x"],@@ -4827,9 +4232,9 @@}},"node_modules/@esbuild/linux-x64": {- "version": "0.19.9",- "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.19.9.tgz",- "integrity": "sha512-JUjpystGFFmNrEHQnIVG8hKwvA2DN5o7RqiO1CVX8EN/F/gkCjkUMgVn6hzScpwnJtl2mPR6I9XV1oW8k9O+0A==",+ "version": "0.19.12",+ "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.19.12.tgz",+ "integrity": "sha512-B71g1QpxfwBvNrfyJdVDexenDIt1CiDN1TIXLbhOw0KhJzE78KIFGX6OJ9MrtC0oOqMWf+0xop4qEU8JrJTwCg==","cpu": ["x64"],@@ -4843,9 +4248,9 @@}},"node_modules/@esbuild/netbsd-x64": {- "version": "0.19.9",- "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.19.9.tgz",- "integrity": "sha512-GThgZPAwOBOsheA2RUlW5UeroRfESwMq/guy8uEe3wJlAOjpOXuSevLRd70NZ37ZrpO6RHGHgEHvPg1h3S1Jug==",+ "version": "0.19.12",+ "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.19.12.tgz",+ "integrity": "sha512-3ltjQ7n1owJgFbuC61Oj++XhtzmymoCihNFgT84UAmJnxJfm4sYCiSLTXZtE00VWYpPMYc+ZQmB6xbSdVh0JWA==","cpu": ["x64"],@@ -4859,9 +4264,9 @@}},"node_modules/@esbuild/openbsd-x64": {- "version": "0.19.9",- "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.19.9.tgz",- "integrity": "sha512-Ki6PlzppaFVbLnD8PtlVQfsYw4S9n3eQl87cqgeIw+O3sRr9IghpfSKY62mggdt1yCSZ8QWvTZ9jo9fjDSg9uw==",+ "version": "0.19.12",+ "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.19.12.tgz",+ "integrity": "sha512-RbrfTB9SWsr0kWmb9srfF+L933uMDdu9BIzdA7os2t0TXhCRjrQyCeOt6wVxr79CKD4c+p+YhCj31HBkYcXebw==","cpu": ["x64"],@@ -4875,9 +4280,9 @@}},"node_modules/@esbuild/sunos-x64": {- "version": "0.19.9",- "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.19.9.tgz",- "integrity": "sha512-MLHj7k9hWh4y1ddkBpvRj2b9NCBhfgBt3VpWbHQnXRedVun/hC7sIyTGDGTfsGuXo4ebik2+3ShjcPbhtFwWDw==",+ "version": "0.19.12",+ "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.19.12.tgz",+ "integrity": "sha512-HKjJwRrW8uWtCQnQOz9qcU3mUZhTUQvi56Q8DPTLLB+DawoiQdjsYq+j+D3s9I8VFtDr+F9CjgXKKC4ss89IeA==","cpu": ["x64"],@@ -4891,9 +4296,9 @@}},"node_modules/@esbuild/win32-arm64": {- "version": "0.19.9",- "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.19.9.tgz",- "integrity": "sha512-GQoa6OrQ8G08guMFgeXPH7yE/8Dt0IfOGWJSfSH4uafwdC7rWwrfE6P9N8AtPGIjUzdo2+7bN8Xo3qC578olhg==",+ "version": "0.19.12",+ "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.19.12.tgz",+ "integrity": "sha512-URgtR1dJnmGvX864pn1B2YUYNzjmXkuJOIqG2HdU62MVS4EHpU2946OZoTMnRUHklGtJdJZ33QfzdjGACXhn1A==","cpu": ["arm64"],@@ -4907,9 +4312,9 @@}},"node_modules/@esbuild/win32-ia32": {- "version": "0.19.9",- "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.19.9.tgz",- "integrity": "sha512-UOozV7Ntykvr5tSOlGCrqU3NBr3d8JqPes0QWN2WOXfvkWVGRajC+Ym0/Wj88fUgecUCLDdJPDF0Nna2UK3Qtg==",+ "version": "0.19.12",+ "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.19.12.tgz",+ "integrity": "sha512-+ZOE6pUkMOJfmxmBZElNOx72NKpIa/HFOMGzu8fqzQJ5kgf6aTGrcJaFsNiVMH4JKpMipyK+7k0n2UXN7a8YKQ==","cpu": ["ia32"],@@ -4923,9 +4328,9 @@}},"node_modules/@esbuild/win32-x64": {- "version": "0.19.9",- "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.19.9.tgz",- "integrity": "sha512-oxoQgglOP7RH6iasDrhY+R/3cHrfwIDvRlT4CGChflq6twk8iENeVvMJjmvBb94Ik1Z+93iGO27err7w6l54GQ==",+ "version": "0.19.12",+ "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.19.12.tgz",+ "integrity": "sha512-T1QyPSDCyMXaO3pzBkF96E8xMkiRYbUEZADd29SyPGabqxMViNoii+NcK7eWJAEoU6RZyEm5lVSIjTmcdoB9HA==","cpu": ["x64"],@@ -4954,18 +4359,18 @@}},"node_modules/@eslint-community/regexpp": {- "version": "4.8.1",- "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.8.1.tgz",- "integrity": "sha512-PWiOzLIUAjN/w5K17PoF4n6sKBw0gqLHPhywmYHP4t1VFQQVYeb1yWsJwnMVEMl3tUHME7X/SJPZLmtG7XBDxQ==",+ "version": "4.10.0",+ "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.10.0.tgz",+ "integrity": "sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA==","dev": true,"engines": {"node": "^12.0.0 || ^14.0.0 || >=16.0.0"}},"node_modules/@eslint/eslintrc": {- "version": "2.1.2",- "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.2.tgz",- "integrity": "sha512-+wvgpDsrB1YqAMdEUCcnTlpfVBH7Vqn6A/NT3D8WVXFIaKMlErPIZT3oCIAVCOtarRpMtelZLqJeU3t7WY6X6g==",+ "version": "2.1.4",+ "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz",+ "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==","dev": true,"dependencies": {"ajv": "^6.12.4",@@ -4986,9 +4391,9 @@}},"node_modules/@eslint/js": {- "version": "8.49.0",- "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.49.0.tgz",- "integrity": "sha512-1S8uAY/MTJqVx0SC4epBq+N2yhuwtNwLbJYNZyhL2pO1ZVKn5HFXav5T41Ryzy9K9V7ZId2JB2oy/W4aCd9/2w==",+ "version": "8.56.0",+ "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.56.0.tgz",+ "integrity": "sha512-gMsVel9D7f2HLkBma9VbtzZRehRogVRfbr++f06nL2vnCGCNlzOD+/MUov/F4p8myyAHspEhVobgjpX64q5m6A==","dev": true,"engines": {"node": "^12.22.0 || ^14.17.0 || >=16.0.0"@@ -5025,31 +4430,26 @@"integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug=="},"node_modules/@fastify/busboy": {- "version": "2.0.0",- "resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.0.0.tgz",- "integrity": "sha512-JUFJad5lv7jxj926GPgymrWQxxjPYuJNiNjNMzqT+HiuP6Vl3dk5xzG+8sTX96np0ZAluvaMzPsjhHZ5rNuNQQ==",+ "version": "2.1.0",+ "resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.1.0.tgz",+ "integrity": "sha512-+KpH+QxZU7O4675t3mnkQKcZZg56u+K/Ct2K+N2AZYNVK8kyeo/bI18tI8aPm3tvNNRyTWfj6s5tnGNlcbQRsA==","engines": {"node": ">=14"}},"node_modules/@fastify/cors": {- "version": "8.4.0",- "resolved": "https://registry.npmjs.org/@fastify/cors/-/cors-8.4.0.tgz",- "integrity": "sha512-MlVvMTenltToByTpLwlWtO+7dQ3l2J+1OpmGrx9JpSNWo1d+dhfNCOi23zHhxdFhtpDzfwGwCsKu9DTeG7k7nQ==",+ "version": "8.5.0",+ "resolved": "https://registry.npmjs.org/@fastify/cors/-/cors-8.5.0.tgz",+ "integrity": "sha512-/oZ1QSb02XjP0IK1U0IXktEsw/dUBTxJOW7IpIeO8c/tNalw/KjoNSJv1Sf6eqoBPO+TDGkifq6ynFK3v68HFQ==","dependencies": {"fastify-plugin": "^4.0.0",- "mnemonist": "0.39.5"+ "mnemonist": "0.39.6"}},- "node_modules/@fastify/deepmerge": {- "version": "1.3.0",- "resolved": "https://registry.npmjs.org/@fastify/deepmerge/-/deepmerge-1.3.0.tgz",- "integrity": "sha512-J8TOSBq3SoZbDhM9+R/u77hP93gz/rajSA+K2kGyijPpORPWUXHUpTaleoj+92As0S9uPRP7Oi8IqMf0u+ro6A=="- },"node_modules/@fastify/error": {- "version": "3.4.0",- "resolved": "https://registry.npmjs.org/@fastify/error/-/error-3.4.0.tgz",- "integrity": "sha512-e/mafFwbK3MNqxUcFBLgHhgxsF8UT1m8aj0dAlqEa2nJEgPsRtpHTZ3ObgrgkZ2M1eJHPTwgyUl/tXkvabsZdQ=="+ "version": "3.4.1",+ "resolved": "https://registry.npmjs.org/@fastify/error/-/error-3.4.1.tgz",+ "integrity": "sha512-wWSvph+29GR783IhmvdwWnN4bUxTD01Vm5Xad4i7i1VuAOItLvbPAb69sb0IQ2N57yprvhNIwAP5B6xfKTmjmQ=="},"node_modules/@fastify/fast-json-stringify-compiler": {"version": "4.3.0",@@ -5059,15 +4459,23 @@"fast-json-stringify": "^5.7.0"}},+ "node_modules/@fastify/merge-json-schemas": {+ "version": "0.1.1",+ "resolved": "https://registry.npmjs.org/@fastify/merge-json-schemas/-/merge-json-schemas-0.1.1.tgz",+ "integrity": "sha512-fERDVz7topgNjtXsJTTW1JKLy0rhuLRcquYqNR9rF7OcVpCa2OVW49ZPDIhaRRCaUuvVxI+N416xUoF76HNSXA==",+ "dependencies": {+ "fast-deep-equal": "^3.1.3"+ }+ },"node_modules/@firebase/analytics": {- "version": "0.10.0",- "resolved": "https://registry.npmjs.org/@firebase/analytics/-/analytics-0.10.0.tgz",- "integrity": "sha512-Locv8gAqx0e+GX/0SI3dzmBY5e9kjVDtD+3zCFLJ0tH2hJwuCAiL+5WkHuxKj92rqQj/rvkBUCfA1ewlX2hehg==",+ "version": "0.10.1",+ "resolved": "https://registry.npmjs.org/@firebase/analytics/-/analytics-0.10.1.tgz",+ "integrity": "sha512-5mnH1aQa99J5lZMJwTNzIoRc4yGXHf+fOn+EoEWhCDA3XGPweGHcylCbqq+G1wVJmfILL57fohDMa8ftMZ+44g==","dependencies": {- "@firebase/component": "0.6.4",- "@firebase/installations": "0.6.4",+ "@firebase/component": "0.6.5",+ "@firebase/installations": "0.6.5","@firebase/logger": "0.4.0",- "@firebase/util": "1.9.3",+ "@firebase/util": "1.9.4","tslib": "^2.1.0"},"peerDependencies": {@@ -5075,14 +4483,14 @@}},"node_modules/@firebase/analytics-compat": {- "version": "0.2.6",- "resolved": "https://registry.npmjs.org/@firebase/analytics-compat/-/analytics-compat-0.2.6.tgz",- "integrity": "sha512-4MqpVLFkGK7NJf/5wPEEP7ePBJatwYpyjgJ+wQHQGHfzaCDgntOnl9rL2vbVGGKCnRqWtZDIWhctB86UWXaX2Q==",+ "version": "0.2.7",+ "resolved": "https://registry.npmjs.org/@firebase/analytics-compat/-/analytics-compat-0.2.7.tgz",+ "integrity": "sha512-17VCly4P0VFBDqaaal7m1nhyYQwsygtaTpSsnc51sFPRrr9XIYtnD8ficon9fneEGEoJQ2g7OtASvhwX9EbK8g==","dependencies": {- "@firebase/analytics": "0.10.0",+ "@firebase/analytics": "0.10.1","@firebase/analytics-types": "0.8.0",- "@firebase/component": "0.6.4",- "@firebase/util": "1.9.3",+ "@firebase/component": "0.6.5",+ "@firebase/util": "1.9.4","tslib": "^2.1.0"},"peerDependencies": {@@ -5095,25 +4503,25 @@"integrity": "sha512-iRP+QKI2+oz3UAh4nPEq14CsEjrjD6a5+fuypjScisAh9kXKFvdJOZJDwk7kikLvWVLGEs9+kIUS4LPQV7VZVw=="},"node_modules/@firebase/app": {- "version": "0.9.23",- "resolved": "https://registry.npmjs.org/@firebase/app/-/app-0.9.23.tgz",- "integrity": "sha512-CA5pQ88We3FhyuesGKn1thaPBsJSGJGm6AlFToOmEJagWqBeDoNJqBkry/BsHnCs9xeYWWIprKxvuFmAFkdqoA==",+ "version": "0.9.27",+ "resolved": "https://registry.npmjs.org/@firebase/app/-/app-0.9.27.tgz",+ "integrity": "sha512-p2Dvl1ge4kRsyK5+wWcmdAIE9MSwZ0pDKAYB51LZgZuz6wciUZk4E1yAEdkfQlRxuHehn+Ol9WP5Qk2XQZiHGg==","dependencies": {- "@firebase/component": "0.6.4",+ "@firebase/component": "0.6.5","@firebase/logger": "0.4.0",- "@firebase/util": "1.9.3",+ "@firebase/util": "1.9.4","idb": "7.1.1","tslib": "^2.1.0"}},"node_modules/@firebase/app-check": {- "version": "0.8.0",- "resolved": "https://registry.npmjs.org/@firebase/app-check/-/app-check-0.8.0.tgz",- "integrity": "sha512-dRDnhkcaC2FspMiRK/Vbp+PfsOAEP6ZElGm9iGFJ9fDqHoPs0HOPn7dwpJ51lCFi1+2/7n5pRPGhqF/F03I97g==",+ "version": "0.8.2",+ "resolved": "https://registry.npmjs.org/@firebase/app-check/-/app-check-0.8.2.tgz",+ "integrity": "sha512-A2B5+ldOguYAeqW1quFN5qNdruSNRrg4W59ag1Eq6QzxuHNIkrE+TrapfrW/z5NYFjCxAYqr/unVCgmk80Dwcg==","dependencies": {- "@firebase/component": "0.6.4",+ "@firebase/component": "0.6.5","@firebase/logger": "0.4.0",- "@firebase/util": "1.9.3",+ "@firebase/util": "1.9.4","tslib": "^2.1.0"},"peerDependencies": {@@ -5121,15 +4529,15 @@}},"node_modules/@firebase/app-check-compat": {- "version": "0.3.7",- "resolved": "https://registry.npmjs.org/@firebase/app-check-compat/-/app-check-compat-0.3.7.tgz",- "integrity": "sha512-cW682AxsyP1G+Z0/P7pO/WT2CzYlNxoNe5QejVarW2o5ZxeWSSPAiVEwpEpQR/bUlUmdeWThYTMvBWaopdBsqw==",+ "version": "0.3.9",+ "resolved": "https://registry.npmjs.org/@firebase/app-check-compat/-/app-check-compat-0.3.9.tgz",+ "integrity": "sha512-7LxyupQ8XeEHRh72mO+tqm69kHT6KbWi2KtFMGedJ6tNbwzFzojcXESMKN8RpADXbYoQgY3loWMJjMx4r2Zt7w==","dependencies": {- "@firebase/app-check": "0.8.0",+ "@firebase/app-check": "0.8.2","@firebase/app-check-types": "0.5.0",- "@firebase/component": "0.6.4",+ "@firebase/component": "0.6.5","@firebase/logger": "0.4.0",- "@firebase/util": "1.9.3",+ "@firebase/util": "1.9.4","tslib": "^2.1.0"},"peerDependencies": {@@ -5147,14 +4555,14 @@"integrity": "sha512-uwSUj32Mlubybw7tedRzR24RP8M8JUVR3NPiMk3/Z4bCmgEKTlQBwMXrehDAZ2wF+TsBq0SN1c6ema71U/JPyQ=="},"node_modules/@firebase/app-compat": {- "version": "0.2.23",- "resolved": "https://registry.npmjs.org/@firebase/app-compat/-/app-compat-0.2.23.tgz",- "integrity": "sha512-UCv0LEzcoqAgY+sLsau7aOZz0CJNLN2gESY68bHKmukNXEN6onLPxBKJzn68CsZZGcdiIEXwvrum1riWNPe9Gw==",+ "version": "0.2.27",+ "resolved": "https://registry.npmjs.org/@firebase/app-compat/-/app-compat-0.2.27.tgz",+ "integrity": "sha512-SYlqocfUDKPHR6MSFC8hree0BTiWFu5o8wbf6zFlYXyG41w7TcHp4wJi4H/EL5V6cM4kxwruXTJtqXX/fRAZtw==","dependencies": {- "@firebase/app": "0.9.23",- "@firebase/component": "0.6.4",+ "@firebase/app": "0.9.27",+ "@firebase/component": "0.6.5","@firebase/logger": "0.4.0",- "@firebase/util": "1.9.3",+ "@firebase/util": "1.9.4","tslib": "^2.1.0"}},@@ -5164,15 +4572,15 @@"integrity": "sha512-AeweANOIo0Mb8GiYm3xhTEBVCmPwTYAu9Hcd2qSkLuga/6+j9b1Jskl5bpiSQWy9eJ/j5pavxj6eYogmnuzm+Q=="},"node_modules/@firebase/auth": {- "version": "1.4.0",- "resolved": "https://registry.npmjs.org/@firebase/auth/-/auth-1.4.0.tgz",- "integrity": "sha512-SfFXZCHDbY+7oSR52NSwx0U7LjYiA+N8imloxphCf3/F+MFty/+mhdjSXGtrJYd0Gbud/qcyedfn2XnWJeIB/g==",+ "version": "1.6.0",+ "resolved": "https://registry.npmjs.org/@firebase/auth/-/auth-1.6.0.tgz",+ "integrity": "sha512-Qhl35eJTV6BwvuueTPCY6x8kUlYyzALtjp/Ws0X3fw3AnjVVfuVb7oQ3Xh5VPVfMFhaIuUAd1KXwcAuIklkSDw==","dependencies": {- "@firebase/component": "0.6.4",+ "@firebase/component": "0.6.5","@firebase/logger": "0.4.0",- "@firebase/util": "1.9.3",- "node-fetch": "2.6.7",- "tslib": "^2.1.0"+ "@firebase/util": "1.9.4",+ "tslib": "^2.1.0",+ "undici": "5.26.5"},"peerDependencies": {"@firebase/app": "0.x",@@ -5185,59 +4593,21 @@}},"node_modules/@firebase/auth-compat": {- "version": "0.4.9",- "resolved": "https://registry.npmjs.org/@firebase/auth-compat/-/auth-compat-0.4.9.tgz",- "integrity": "sha512-Fw03i7vduIciEBG4imLtA1duJbljgkfbxiBo/EuekcB+BnPxHp+e8OGMUfemPYeO7Munj6kUC9gr5DelsQkiNA==",+ "version": "0.5.2",+ "resolved": "https://registry.npmjs.org/@firebase/auth-compat/-/auth-compat-0.5.2.tgz",+ "integrity": "sha512-pRgje5BPCNR1vXyvGOVXwOHtv88A2WooXfklI8sV7/jWi03ExFqNfpJT26GUo/oD39NoKJ3Kt6rD5gVvdV7lMw==","dependencies": {- "@firebase/auth": "1.4.0",+ "@firebase/auth": "1.6.0","@firebase/auth-types": "0.12.0",- "@firebase/component": "0.6.4",- "@firebase/util": "1.9.3",- "node-fetch": "2.6.7",- "tslib": "^2.1.0"+ "@firebase/component": "0.6.5",+ "@firebase/util": "1.9.4",+ "tslib": "^2.1.0",+ "undici": "5.26.5"},"peerDependencies": {"@firebase/app-compat": "0.x"}},- "node_modules/@firebase/auth-compat/node_modules/node-fetch": {- "version": "2.6.7",- "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz",- "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==",- "dependencies": {- "whatwg-url": "^5.0.0"- },- "engines": {- "node": "4.x || >=6.0.0"- },- "peerDependencies": {- "encoding": "^0.1.0"- },- "peerDependenciesMeta": {- "encoding": {- "optional": true- }- }- },- "node_modules/@firebase/auth-compat/node_modules/tr46": {- "version": "0.0.3",- "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",- "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw=="- },- "node_modules/@firebase/auth-compat/node_modules/webidl-conversions": {- "version": "3.0.1",- "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",- "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ=="- },- "node_modules/@firebase/auth-compat/node_modules/whatwg-url": {- "version": "5.0.0",- "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz",- "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==",- "dependencies": {- "tr46": "~0.0.3",- "webidl-conversions": "^3.0.0"- }- },"node_modules/@firebase/auth-interop-types": {"version": "0.2.1","resolved": "https://registry.npmjs.org/@firebase/auth-interop-types/-/auth-interop-types-0.2.1.tgz",@@ -5252,101 +4622,64 @@"@firebase/util": "1.x"}},- "node_modules/@firebase/auth/node_modules/node-fetch": {- "version": "2.6.7",- "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz",- "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==",- "dependencies": {- "whatwg-url": "^5.0.0"- },- "engines": {- "node": "4.x || >=6.0.0"- },- "peerDependencies": {- "encoding": "^0.1.0"- },- "peerDependenciesMeta": {- "encoding": {- "optional": true- }- }- },- "node_modules/@firebase/auth/node_modules/tr46": {- "version": "0.0.3",- "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",- "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw=="- },- "node_modules/@firebase/auth/node_modules/webidl-conversions": {- "version": "3.0.1",- "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",- "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ=="- },- "node_modules/@firebase/auth/node_modules/whatwg-url": {- "version": "5.0.0",- "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz",- "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==",- "dependencies": {- "tr46": "~0.0.3",- "webidl-conversions": "^3.0.0"- }- },"node_modules/@firebase/component": {- "version": "0.6.4",- "resolved": "https://registry.npmjs.org/@firebase/component/-/component-0.6.4.tgz",- "integrity": "sha512-rLMyrXuO9jcAUCaQXCMjCMUsWrba5fzHlNK24xz5j2W6A/SRmK8mZJ/hn7V0fViLbxC0lPMtrK1eYzk6Fg03jA==",+ "version": "0.6.5",+ "resolved": "https://registry.npmjs.org/@firebase/component/-/component-0.6.5.tgz",+ "integrity": "sha512-2tVDk1ixi12sbDmmfITK8lxSjmcb73BMF6Qwc3U44hN/J1Fi1QY/Hnnb6klFlbB9/G16a3J3d4nXykye2EADTw==","dependencies": {- "@firebase/util": "1.9.3",+ "@firebase/util": "1.9.4","tslib": "^2.1.0"}},"node_modules/@firebase/database": {- "version": "1.0.1",- "resolved": "https://registry.npmjs.org/@firebase/database/-/database-1.0.1.tgz",- "integrity": "sha512-VAhF7gYwunW4Lw/+RQZvW8dlsf2r0YYqV9W0Gi2Mz8+0TGg1mBJWoUtsHfOr8kPJXhcLsC4eP/z3x6L/Fvjk/A==",+ "version": "1.0.3",+ "resolved": "https://registry.npmjs.org/@firebase/database/-/database-1.0.3.tgz",+ "integrity": "sha512-9fjqLt9JzL46gw9+NRqsgQEMjgRwfd8XtzcKqG+UYyhVeFCdVRQ0Wp6Dw/dvYHnbH5vNEKzNv36dcB4p+PIAAA==","dependencies": {+ "@firebase/app-check-interop-types": "0.3.0","@firebase/auth-interop-types": "0.2.1",- "@firebase/component": "0.6.4",+ "@firebase/component": "0.6.5","@firebase/logger": "0.4.0",- "@firebase/util": "1.9.3",+ "@firebase/util": "1.9.4","faye-websocket": "0.11.4","tslib": "^2.1.0"}},"node_modules/@firebase/database-compat": {- "version": "1.0.1",- "resolved": "https://registry.npmjs.org/@firebase/database-compat/-/database-compat-1.0.1.tgz",- "integrity": "sha512-ky82yLIboLxtAIWyW/52a6HLMVTzD2kpZlEilVDok73pNPLjkJYowj8iaIWK5nTy7+6Gxt7d00zfjL6zckGdXQ==",+ "version": "1.0.3",+ "resolved": "https://registry.npmjs.org/@firebase/database-compat/-/database-compat-1.0.3.tgz",+ "integrity": "sha512-7tHEOcMbK5jJzHWyphPux4osogH/adWwncxdMxdBpB9g1DNIyY4dcz1oJdlkXGM/i/AjUBesZsd5CuwTRTBNTw==","dependencies": {- "@firebase/component": "0.6.4",- "@firebase/database": "1.0.1",- "@firebase/database-types": "1.0.0",+ "@firebase/component": "0.6.5",+ "@firebase/database": "1.0.3",+ "@firebase/database-types": "1.0.1","@firebase/logger": "0.4.0",- "@firebase/util": "1.9.3",+ "@firebase/util": "1.9.4","tslib": "^2.1.0"}},"node_modules/@firebase/database-types": {- "version": "1.0.0",- "resolved": "https://registry.npmjs.org/@firebase/database-types/-/database-types-1.0.0.tgz",- "integrity": "sha512-SjnXStoE0Q56HcFgNQ+9SsmJc0c8TqGARdI/T44KXy+Ets3r6x/ivhQozT66bMnCEjJRywYoxNurRTMlZF8VNg==",+ "version": "1.0.1",+ "resolved": "https://registry.npmjs.org/@firebase/database-types/-/database-types-1.0.1.tgz",+ "integrity": "sha512-Tmcmx5XgiI7UVF/4oGg2P3AOTfq3WKEPsm2yf+uXtN7uG/a4WTWhVMrXGYRY2ZUL1xPxv9V33wQRJ+CcrUhVXw==","dependencies": {"@firebase/app-types": "0.9.0",- "@firebase/util": "1.9.3"+ "@firebase/util": "1.9.4"}},"node_modules/@firebase/firestore": {- "version": "4.3.2",- "resolved": "https://registry.npmjs.org/@firebase/firestore/-/firestore-4.3.2.tgz",- "integrity": "sha512-K4TwMbgArWw+XAEUYX/vtk+TVy9n1uLeJKSrQeb89lwfkfyFINGLPME6YleaS0ovD1ziLM5/0WgL1CR4s53fDg==",+ "version": "4.4.2",+ "resolved": "https://registry.npmjs.org/@firebase/firestore/-/firestore-4.4.2.tgz",+ "integrity": "sha512-YaX6ypa/RzU6OkxzUQlpSxwhOIWdTraCNz7sMsbaSEjjl/pj/QvX6TqjkdWGzuBYh2S6rz7ErhDO0g39oZZw/g==","dependencies": {- "@firebase/component": "0.6.4",+ "@firebase/component": "0.6.5","@firebase/logger": "0.4.0",- "@firebase/util": "1.9.3",- "@firebase/webchannel-wrapper": "0.10.3",+ "@firebase/util": "1.9.4",+ "@firebase/webchannel-wrapper": "0.10.5","@grpc/grpc-js": "~1.9.0","@grpc/proto-loader": "^0.7.8",- "node-fetch": "2.6.7",- "tslib": "^2.1.0"+ "tslib": "^2.1.0",+ "undici": "5.26.5"},"engines": {"node": ">=10.10.0"@@ -5356,14 +4689,14 @@}},"node_modules/@firebase/firestore-compat": {- "version": "0.3.22",- "resolved": "https://registry.npmjs.org/@firebase/firestore-compat/-/firestore-compat-0.3.22.tgz",- "integrity": "sha512-M166UvFvRri0CK/+5N0MIeXJVxR6BsX0/96xFT506DxRPIFezLjLcvfddtyFgfe0CtyQWoxBXt060uWUg3d/sw==",+ "version": "0.3.25",+ "resolved": "https://registry.npmjs.org/@firebase/firestore-compat/-/firestore-compat-0.3.25.tgz",+ "integrity": "sha512-+xI7WmsgZCBhMn/+uhDKcg+lsOUJ9FJyt5PGTzkFPbCsozWfeQZ7eVnfPh0rMkUOf0yIQ924RIe04gwvEIbcoQ==","dependencies": {- "@firebase/component": "0.6.4",- "@firebase/firestore": "4.3.2",+ "@firebase/component": "0.6.5",+ "@firebase/firestore": "4.4.2","@firebase/firestore-types": "3.0.0",- "@firebase/util": "1.9.3",+ "@firebase/util": "1.9.4","tslib": "^2.1.0"},"peerDependencies": {@@ -5379,70 +4712,32 @@"@firebase/util": "1.x"}},- "node_modules/@firebase/firestore/node_modules/node-fetch": {- "version": "2.6.7",- "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz",- "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==",- "dependencies": {- "whatwg-url": "^5.0.0"- },- "engines": {- "node": "4.x || >=6.0.0"- },- "peerDependencies": {- "encoding": "^0.1.0"- },- "peerDependenciesMeta": {- "encoding": {- "optional": true- }- }- },- "node_modules/@firebase/firestore/node_modules/tr46": {- "version": "0.0.3",- "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",- "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw=="- },- "node_modules/@firebase/firestore/node_modules/webidl-conversions": {- "version": "3.0.1",- "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",- "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ=="- },- "node_modules/@firebase/firestore/node_modules/whatwg-url": {- "version": "5.0.0",- "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz",- "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==",- "dependencies": {- "tr46": "~0.0.3",- "webidl-conversions": "^3.0.0"- }- },"node_modules/@firebase/functions": {- "version": "0.10.0",- "resolved": "https://registry.npmjs.org/@firebase/functions/-/functions-0.10.0.tgz",- "integrity": "sha512-2U+fMNxTYhtwSpkkR6WbBcuNMOVaI7MaH3cZ6UAeNfj7AgEwHwMIFLPpC13YNZhno219F0lfxzTAA0N62ndWzA==",+ "version": "0.11.1",+ "resolved": "https://registry.npmjs.org/@firebase/functions/-/functions-0.11.1.tgz",+ "integrity": "sha512-3uUa1hB79Gmy6E1gHTfzoHeZolBeHc/I/n3+lOCDe6BOos9AHmzRjKygcFE/7VA2FJjitCE0K+OHI6+OuoY8fQ==","dependencies": {"@firebase/app-check-interop-types": "0.3.0","@firebase/auth-interop-types": "0.2.1",- "@firebase/component": "0.6.4",+ "@firebase/component": "0.6.5","@firebase/messaging-interop-types": "0.2.0",- "@firebase/util": "1.9.3",- "node-fetch": "2.6.7",- "tslib": "^2.1.0"+ "@firebase/util": "1.9.4",+ "tslib": "^2.1.0",+ "undici": "5.26.5"},"peerDependencies": {"@firebase/app": "0.x"}},"node_modules/@firebase/functions-compat": {- "version": "0.3.5",- "resolved": "https://registry.npmjs.org/@firebase/functions-compat/-/functions-compat-0.3.5.tgz",- "integrity": "sha512-uD4jwgwVqdWf6uc3NRKF8cSZ0JwGqSlyhPgackyUPe+GAtnERpS4+Vr66g0b3Gge0ezG4iyHo/EXW/Hjx7QhHw==",+ "version": "0.3.7",+ "resolved": "https://registry.npmjs.org/@firebase/functions-compat/-/functions-compat-0.3.7.tgz",+ "integrity": "sha512-uXe6Kmku5lNogp3OpPBcOJbSvnaCOn+YxS3zlXKNU6Q/NLwcvO3RY1zwYyctCos2RemEw3KEQ7YdzcECXjHWLw==","dependencies": {- "@firebase/component": "0.6.4",- "@firebase/functions": "0.10.0",+ "@firebase/component": "0.6.5",+ "@firebase/functions": "0.11.1","@firebase/functions-types": "0.6.0",- "@firebase/util": "1.9.3",+ "@firebase/util": "1.9.4","tslib": "^2.1.0"},"peerDependencies": {@@ -5454,52 +4749,14 @@"resolved": "https://registry.npmjs.org/@firebase/functions-types/-/functions-types-0.6.0.tgz","integrity": "sha512-hfEw5VJtgWXIRf92ImLkgENqpL6IWpYaXVYiRkFY1jJ9+6tIhWM7IzzwbevwIIud/jaxKVdRzD7QBWfPmkwCYw=="},- "node_modules/@firebase/functions/node_modules/node-fetch": {- "version": "2.6.7",- "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz",- "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==",- "dependencies": {- "whatwg-url": "^5.0.0"- },- "engines": {- "node": "4.x || >=6.0.0"- },- "peerDependencies": {- "encoding": "^0.1.0"- },- "peerDependenciesMeta": {- "encoding": {- "optional": true- }- }- },- "node_modules/@firebase/functions/node_modules/tr46": {- "version": "0.0.3",- "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",- "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw=="- },- "node_modules/@firebase/functions/node_modules/webidl-conversions": {- "version": "3.0.1",- "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",- "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ=="- },- "node_modules/@firebase/functions/node_modules/whatwg-url": {- "version": "5.0.0",- "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz",- "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==",- "dependencies": {- "tr46": "~0.0.3",- "webidl-conversions": "^3.0.0"- }- },"node_modules/@firebase/installations": {- "version": "0.6.4",- "resolved": "https://registry.npmjs.org/@firebase/installations/-/installations-0.6.4.tgz",- "integrity": "sha512-u5y88rtsp7NYkCHC3ElbFBrPtieUybZluXyzl7+4BsIz4sqb4vSAuwHEUgCgCeaQhvsnxDEU6icly8U9zsJigA==",+ "version": "0.6.5",+ "resolved": "https://registry.npmjs.org/@firebase/installations/-/installations-0.6.5.tgz",+ "integrity": "sha512-0xxnQWw8rSRzu0ZOCkZaO+MJ0LkDAfwwTB2Z1SxRK6FAz5xkxD1ZUwM0WbCRni49PKubCrZYOJ6yg7tSjU7AKA==","dependencies": {- "@firebase/component": "0.6.4",- "@firebase/util": "1.9.3",- "idb": "7.0.1",+ "@firebase/component": "0.6.5",+ "@firebase/util": "1.9.4",+ "idb": "7.1.1","tslib": "^2.1.0"},"peerDependencies": {@@ -5507,14 +4764,14 @@}},"node_modules/@firebase/installations-compat": {- "version": "0.2.4",- "resolved": "https://registry.npmjs.org/@firebase/installations-compat/-/installations-compat-0.2.4.tgz",- "integrity": "sha512-LI9dYjp0aT9Njkn9U4JRrDqQ6KXeAmFbRC0E7jI7+hxl5YmRWysq5qgQl22hcWpTk+cm3es66d/apoDU/A9n6Q==",+ "version": "0.2.5",+ "resolved": "https://registry.npmjs.org/@firebase/installations-compat/-/installations-compat-0.2.5.tgz",+ "integrity": "sha512-usvoIaog5CHEw082HXLrKAZ1qd4hIC3N/LDe2NqBgI3pkGE/7auLVM4Gn5gvyryp0x8z/IP1+d9fkGUj2OaGLQ==","dependencies": {- "@firebase/component": "0.6.4",- "@firebase/installations": "0.6.4",+ "@firebase/component": "0.6.5",+ "@firebase/installations": "0.6.5","@firebase/installations-types": "0.5.0",- "@firebase/util": "1.9.3",+ "@firebase/util": "1.9.4","tslib": "^2.1.0"},"peerDependencies": {@@ -5529,11 +4786,6 @@"@firebase/app-types": "0.x"}},- "node_modules/@firebase/installations/node_modules/idb": {- "version": "7.0.1",- "resolved": "https://registry.npmjs.org/idb/-/idb-7.0.1.tgz",- "integrity": "sha512-UUxlE7vGWK5RfB/fDwEGgRf84DY/ieqNha6msMV99UsEMQhJ1RwbCd8AYBj3QMgnE3VZnfQvm4oKVCJTYlqIgg=="- },"node_modules/@firebase/logger": {"version": "0.4.0","resolved": "https://registry.npmjs.org/@firebase/logger/-/logger-0.4.0.tgz",@@ -5543,15 +4795,15 @@}},"node_modules/@firebase/messaging": {- "version": "0.12.4",- "resolved": "https://registry.npmjs.org/@firebase/messaging/-/messaging-0.12.4.tgz",- "integrity": "sha512-6JLZct6zUaex4g7HI3QbzeUrg9xcnmDAPTWpkoMpd/GoSVWH98zDoWXMGrcvHeCAIsLpFMe4MPoZkJbrPhaASw==",+ "version": "0.12.6",+ "resolved": "https://registry.npmjs.org/@firebase/messaging/-/messaging-0.12.6.tgz",+ "integrity": "sha512-IORsPp9IPWq4j4yEhTOZ6GAGi3gQwGc+4yexmTAlya+qeBRSdRnJg2iIU/aj+tcKDQYr9RQuQPgHHOdFIx//vA==","dependencies": {- "@firebase/component": "0.6.4",- "@firebase/installations": "0.6.4",+ "@firebase/component": "0.6.5",+ "@firebase/installations": "0.6.5","@firebase/messaging-interop-types": "0.2.0",- "@firebase/util": "1.9.3",- "idb": "7.0.1",+ "@firebase/util": "1.9.4",+ "idb": "7.1.1","tslib": "^2.1.0"},"peerDependencies": {@@ -5559,13 +4811,13 @@}},"node_modules/@firebase/messaging-compat": {- "version": "0.2.4",- "resolved": "https://registry.npmjs.org/@firebase/messaging-compat/-/messaging-compat-0.2.4.tgz",- "integrity": "sha512-lyFjeUhIsPRYDPNIkYX1LcZMpoVbBWXX4rPl7c/rqc7G+EUea7IEtSt4MxTvh6fDfPuzLn7+FZADfscC+tNMfg==",+ "version": "0.2.6",+ "resolved": "https://registry.npmjs.org/@firebase/messaging-compat/-/messaging-compat-0.2.6.tgz",+ "integrity": "sha512-Q2xC1s4L7Vpss7P7Gy6GuIS+xmJrf/vm9+gX76IK1Bo1TjoKwleCLHt1LHkPz5Rvqg5pTgzzI8qqPhBpZosFCg==","dependencies": {- "@firebase/component": "0.6.4",- "@firebase/messaging": "0.12.4",- "@firebase/util": "1.9.3",+ "@firebase/component": "0.6.5",+ "@firebase/messaging": "0.12.6",+ "@firebase/util": "1.9.4","tslib": "^2.1.0"},"peerDependencies": {@@ -5577,20 +4829,15 @@"resolved": "https://registry.npmjs.org/@firebase/messaging-interop-types/-/messaging-interop-types-0.2.0.tgz","integrity": "sha512-ujA8dcRuVeBixGR9CtegfpU4YmZf3Lt7QYkcj693FFannwNuZgfAYaTmbJ40dtjB81SAu6tbFPL9YLNT15KmOQ=="},- "node_modules/@firebase/messaging/node_modules/idb": {- "version": "7.0.1",- "resolved": "https://registry.npmjs.org/idb/-/idb-7.0.1.tgz",- "integrity": "sha512-UUxlE7vGWK5RfB/fDwEGgRf84DY/ieqNha6msMV99UsEMQhJ1RwbCd8AYBj3QMgnE3VZnfQvm4oKVCJTYlqIgg=="- },"node_modules/@firebase/performance": {- "version": "0.6.4",- "resolved": "https://registry.npmjs.org/@firebase/performance/-/performance-0.6.4.tgz",- "integrity": "sha512-HfTn/bd8mfy/61vEqaBelNiNnvAbUtME2S25A67Nb34zVuCSCRIX4SseXY6zBnOFj3oLisaEqhVcJmVPAej67g==",+ "version": "0.6.5",+ "resolved": "https://registry.npmjs.org/@firebase/performance/-/performance-0.6.5.tgz",+ "integrity": "sha512-OzAGcWhOqEFH9GdwUuY0oC5FSlnMejcnmSAhR+EjpI7exdDvixyLyCR4txjSHYNTbumrFBG+EP8GO11CNXRaJA==","dependencies": {- "@firebase/component": "0.6.4",- "@firebase/installations": "0.6.4",+ "@firebase/component": "0.6.5",+ "@firebase/installations": "0.6.5","@firebase/logger": "0.4.0",- "@firebase/util": "1.9.3",+ "@firebase/util": "1.9.4","tslib": "^2.1.0"},"peerDependencies": {@@ -5598,15 +4845,15 @@}},"node_modules/@firebase/performance-compat": {- "version": "0.2.4",- "resolved": "https://registry.npmjs.org/@firebase/performance-compat/-/performance-compat-0.2.4.tgz",- "integrity": "sha512-nnHUb8uP9G8islzcld/k6Bg5RhX62VpbAb/Anj7IXs/hp32Eb2LqFPZK4sy3pKkBUO5wcrlRWQa6wKOxqlUqsg==",+ "version": "0.2.5",+ "resolved": "https://registry.npmjs.org/@firebase/performance-compat/-/performance-compat-0.2.5.tgz",+ "integrity": "sha512-jJwJkVyDcIMBaVGrZ6CRGs4m5FCZsWB5QCWYI3FdsHyIa9/TfteNDilxj9wGciF2naFIHDW7TgE69U5dAH9Ktg==","dependencies": {- "@firebase/component": "0.6.4",+ "@firebase/component": "0.6.5","@firebase/logger": "0.4.0",- "@firebase/performance": "0.6.4",+ "@firebase/performance": "0.6.5","@firebase/performance-types": "0.2.0",- "@firebase/util": "1.9.3",+ "@firebase/util": "1.9.4","tslib": "^2.1.0"},"peerDependencies": {@@ -5619,14 +4866,14 @@"integrity": "sha512-kYrbr8e/CYr1KLrLYZZt2noNnf+pRwDq2KK9Au9jHrBMnb0/C9X9yWSXmZkFt4UIdsQknBq8uBB7fsybZdOBTA=="},"node_modules/@firebase/remote-config": {- "version": "0.4.4",- "resolved": "https://registry.npmjs.org/@firebase/remote-config/-/remote-config-0.4.4.tgz",- "integrity": "sha512-x1ioTHGX8ZwDSTOVp8PBLv2/wfwKzb4pxi0gFezS5GCJwbLlloUH4YYZHHS83IPxnua8b6l0IXUaWd0RgbWwzQ==",+ "version": "0.4.5",+ "resolved": "https://registry.npmjs.org/@firebase/remote-config/-/remote-config-0.4.5.tgz",+ "integrity": "sha512-rGLqc/4OmxrS39RA9kgwa6JmgWytQuMo+B8pFhmGp3d++x2Hf9j+MLQfhOLyyUo64fNw20J19mLXhrXvKHsjZQ==","dependencies": {- "@firebase/component": "0.6.4",- "@firebase/installations": "0.6.4",+ "@firebase/component": "0.6.5",+ "@firebase/installations": "0.6.5","@firebase/logger": "0.4.0",- "@firebase/util": "1.9.3",+ "@firebase/util": "1.9.4","tslib": "^2.1.0"},"peerDependencies": {@@ -5634,15 +4881,15 @@}},"node_modules/@firebase/remote-config-compat": {- "version": "0.2.4",- "resolved": "https://registry.npmjs.org/@firebase/remote-config-compat/-/remote-config-compat-0.2.4.tgz",- "integrity": "sha512-FKiki53jZirrDFkBHglB3C07j5wBpitAaj8kLME6g8Mx+aq7u9P7qfmuSRytiOItADhWUj7O1JIv7n9q87SuwA==",+ "version": "0.2.5",+ "resolved": "https://registry.npmjs.org/@firebase/remote-config-compat/-/remote-config-compat-0.2.5.tgz",+ "integrity": "sha512-ImkNnLuGrD/bylBHDJigSY6LMwRrwt37wQbsGZhWG4QQ6KLzHzSf0nnFRRFvkOZodEUE57Ib8l74d6Yn/6TDUQ==","dependencies": {- "@firebase/component": "0.6.4",+ "@firebase/component": "0.6.5","@firebase/logger": "0.4.0",- "@firebase/remote-config": "0.4.4",+ "@firebase/remote-config": "0.4.5","@firebase/remote-config-types": "0.3.0",- "@firebase/util": "1.9.3",+ "@firebase/util": "1.9.4","tslib": "^2.1.0"},"peerDependencies": {@@ -5655,28 +4902,28 @@"integrity": "sha512-RtEH4vdcbXZuZWRZbIRmQVBNsE7VDQpet2qFvq6vwKLBIQRQR5Kh58M4ok3A3US8Sr3rubYnaGqZSurCwI8uMA=="},"node_modules/@firebase/storage": {- "version": "0.11.2",- "resolved": "https://registry.npmjs.org/@firebase/storage/-/storage-0.11.2.tgz",- "integrity": "sha512-CtvoFaBI4hGXlXbaCHf8humajkbXhs39Nbh6MbNxtwJiCqxPy9iH3D3CCfXAvP0QvAAwmJUTK3+z9a++Kc4nkA==",+ "version": "0.12.1",+ "resolved": "https://registry.npmjs.org/@firebase/storage/-/storage-0.12.1.tgz",+ "integrity": "sha512-KJ5NV7FUh54TeTlEjdkTTX60ciCKOp9EqlbLnpdcXUYRJg0Z4810TXbilPc1z7fTIG4iPjtdi95bGE9n4dBX8A==","dependencies": {- "@firebase/component": "0.6.4",- "@firebase/util": "1.9.3",- "node-fetch": "2.6.7",- "tslib": "^2.1.0"+ "@firebase/component": "0.6.5",+ "@firebase/util": "1.9.4",+ "tslib": "^2.1.0",+ "undici": "5.26.5"},"peerDependencies": {"@firebase/app": "0.x"}},"node_modules/@firebase/storage-compat": {- "version": "0.3.2",- "resolved": "https://registry.npmjs.org/@firebase/storage-compat/-/storage-compat-0.3.2.tgz",- "integrity": "sha512-wvsXlLa9DVOMQJckbDNhXKKxRNNewyUhhbXev3t8kSgoCotd1v3MmqhKKz93ePhDnhHnDs7bYHy+Qa8dRY6BXw==",+ "version": "0.3.4",+ "resolved": "https://registry.npmjs.org/@firebase/storage-compat/-/storage-compat-0.3.4.tgz",+ "integrity": "sha512-Y0m5e2gS/wB9Ioth2X/Sgz76vcxvqgQrCmfa9qwhss/N31kxY2Gks6Frv0nrE18AjVfcSmcfDitqUwxcMOTRSg==","dependencies": {- "@firebase/component": "0.6.4",- "@firebase/storage": "0.11.2",+ "@firebase/component": "0.6.5",+ "@firebase/storage": "0.12.1","@firebase/storage-types": "0.8.0",- "@firebase/util": "1.9.3",+ "@firebase/util": "1.9.4","tslib": "^2.1.0"},"peerDependencies": {@@ -5692,80 +4939,42 @@"@firebase/util": "1.x"}},- "node_modules/@firebase/storage/node_modules/node-fetch": {- "version": "2.6.7",- "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz",- "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==",- "dependencies": {- "whatwg-url": "^5.0.0"- },- "engines": {- "node": "4.x || >=6.0.0"- },- "peerDependencies": {- "encoding": "^0.1.0"- },- "peerDependenciesMeta": {- "encoding": {- "optional": true- }- }- },- "node_modules/@firebase/storage/node_modules/tr46": {- "version": "0.0.3",- "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",- "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw=="- },- "node_modules/@firebase/storage/node_modules/webidl-conversions": {- "version": "3.0.1",- "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",- "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ=="- },- "node_modules/@firebase/storage/node_modules/whatwg-url": {- "version": "5.0.0",- "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz",- "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==",- "dependencies": {- "tr46": "~0.0.3",- "webidl-conversions": "^3.0.0"- }- },"node_modules/@firebase/util": {- "version": "1.9.3",- "resolved": "https://registry.npmjs.org/@firebase/util/-/util-1.9.3.tgz",- "integrity": "sha512-DY02CRhOZwpzO36fHpuVysz6JZrscPiBXD0fXp6qSrL9oNOx5KWICKdR95C0lSITzxp0TZosVyHqzatE8JbcjA==",+ "version": "1.9.4",+ "resolved": "https://registry.npmjs.org/@firebase/util/-/util-1.9.4.tgz",+ "integrity": "sha512-WLonYmS1FGHT97TsUmRN3qnTh5TeeoJp1Gg5fithzuAgdZOUtsYECfy7/noQ3llaguios8r5BuXSEiK82+UrxQ==","dependencies": {"tslib": "^2.1.0"}},"node_modules/@firebase/webchannel-wrapper": {- "version": "0.10.3",- "resolved": "https://registry.npmjs.org/@firebase/webchannel-wrapper/-/webchannel-wrapper-0.10.3.tgz",- "integrity": "sha512-+ZplYUN3HOpgCfgInqgdDAbkGGVzES1cs32JJpeqoh87SkRobGXElJx+1GZSaDqzFL+bYiX18qEcBK76mYs8uA=="+ "version": "0.10.5",+ "resolved": "https://registry.npmjs.org/@firebase/webchannel-wrapper/-/webchannel-wrapper-0.10.5.tgz",+ "integrity": "sha512-eSkJsnhBWv5kCTSU1tSUVl9mpFu+5NXXunZc83le8GMjMlsWwQArSc7cJJ4yl+aDFY0NGLi0AjZWMn1axOrkRg=="},"node_modules/@floating-ui/core": {- "version": "1.4.1",- "resolved": "https://registry.npmjs.org/@floating-ui/core/-/core-1.4.1.tgz",- "integrity": "sha512-jk3WqquEJRlcyu7997NtR5PibI+y5bi+LS3hPmguVClypenMsCY3CBa3LAQnozRCtCrYWSEtAdiskpamuJRFOQ==",+ "version": "1.6.0",+ "resolved": "https://registry.npmjs.org/@floating-ui/core/-/core-1.6.0.tgz",+ "integrity": "sha512-PcF++MykgmTj3CIyOQbKA/hDzOAiqI3mhuoN44WRCopIs1sgoDoU4oty4Jtqaj/y3oDU6fnVSm4QG0a3t5i0+g==","dependencies": {- "@floating-ui/utils": "^0.1.1"+ "@floating-ui/utils": "^0.2.1"}},"node_modules/@floating-ui/dom": {- "version": "1.5.2",- "resolved": "https://registry.npmjs.org/@floating-ui/dom/-/dom-1.5.2.tgz",- "integrity": "sha512-6ArmenS6qJEWmwzczWyhvrXRdI/rI78poBcW0h/456+onlabit+2G+QxHx5xTOX60NBJQXjsCLFbW2CmsXpUog==",+ "version": "1.6.1",+ "resolved": "https://registry.npmjs.org/@floating-ui/dom/-/dom-1.6.1.tgz",+ "integrity": "sha512-iA8qE43/H5iGozC3W0YSnVSW42Vh522yyM1gj+BqRwVsTNOyr231PsXDaV04yT39PsO0QL2QpbI/M0ZaLUQgRQ==","dependencies": {- "@floating-ui/core": "^1.4.1",- "@floating-ui/utils": "^0.1.1"+ "@floating-ui/core": "^1.6.0",+ "@floating-ui/utils": "^0.2.1"}},"node_modules/@floating-ui/react-dom": {- "version": "2.0.2",- "resolved": "https://registry.npmjs.org/@floating-ui/react-dom/-/react-dom-2.0.2.tgz",- "integrity": "sha512-5qhlDvjaLmAst/rKb3VdlCinwTF4EYMiVxuuc/HVUjs46W0zgtbMmAZ1UTsDrRTxRmUEzl92mOtWbeeXL26lSQ==",+ "version": "2.0.8",+ "resolved": "https://registry.npmjs.org/@floating-ui/react-dom/-/react-dom-2.0.8.tgz",+ "integrity": "sha512-HOdqOt3R3OGeTKidaLvJKcgg75S6tibQ3Tif4eyd91QnIJWr0NLvoXFpJA/j8HqkFSL68GDca9AuyWEHlhyClw==","dependencies": {- "@floating-ui/dom": "^1.5.1"+ "@floating-ui/dom": "^1.6.1"},"peerDependencies": {"react": ">=16.8.0",@@ -5773,9 +4982,9 @@}},"node_modules/@floating-ui/utils": {- "version": "0.1.2",- "resolved": "https://registry.npmjs.org/@floating-ui/utils/-/utils-0.1.2.tgz",- "integrity": "sha512-ou3elfqG/hZsbmF4bxeJhPHIf3G2pm0ujc39hYEZrfVqt7Vk/Zji6CXc3W0pmYM8BW1g40U+akTl9DKZhFhInQ=="+ "version": "0.2.1",+ "resolved": "https://registry.npmjs.org/@floating-ui/utils/-/utils-0.2.1.tgz",+ "integrity": "sha512-9TANp6GPoMtYzQdt54kfAyMmz1+osLlXdg2ENroU7zzrtflTLrrC/lgrIfaSe+Wu0b89GKccT7vxXA0MoAIO+Q=="},"node_modules/@google/generative-ai": {"version": "0.1.3",@@ -5786,9 +4995,9 @@}},"node_modules/@grpc/grpc-js": {- "version": "1.9.13",- "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.9.13.tgz",- "integrity": "sha512-OEZZu9v9AA+7/tghMDE8o5DAMD5THVnwSqDWuh7PPYO5287rTyqy0xEHT6/e4pbqSrhyLPdQFsam4TwFQVVIIw==",+ "version": "1.9.14",+ "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.9.14.tgz",+ "integrity": "sha512-nOpuzZ2G3IuMFN+UPPpKrC6NsLmWsTqSsm66IRfnBt1D4pwTqE27lmbpcPM+l2Ua4gE7PfjRHI6uedAy7hoXUw==","dependencies": {"@grpc/proto-loader": "^0.7.8","@types/node": ">=12.12.47"@@ -5815,10 +5024,11 @@}},"node_modules/@headlessui/react": {- "version": "1.7.17",- "resolved": "https://registry.npmjs.org/@headlessui/react/-/react-1.7.17.tgz",- "integrity": "sha512-4am+tzvkqDSSgiwrsEpGWqgGo9dz8qU5M3znCkC4PgkpY4HcCZzEDEvozltGGGHIKl9jbXbZPSH5TWn4sWJdow==",+ "version": "1.7.18",+ "resolved": "https://registry.npmjs.org/@headlessui/react/-/react-1.7.18.tgz",+ "integrity": "sha512-4i5DOrzwN4qSgNsL4Si61VMkUcWbcSKueUV7sFhpHzQcSShdlHENE5+QBntMSRvHt8NyoFO2AGG8si9lq+w4zQ==","dependencies": {+ "@tanstack/react-virtual": "^3.0.0-beta.60","client-only": "^0.0.1"},"engines": {@@ -5830,13 +5040,13 @@}},"node_modules/@humanwhocodes/config-array": {- "version": "0.11.11",- "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.11.tgz",- "integrity": "sha512-N2brEuAadi0CcdeMXUkhbZB84eskAc8MEX1By6qEchoVywSgXPIjou4rYsl0V3Hj0ZnuGycGCjdNgockbzeWNA==",+ "version": "0.11.14",+ "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz",+ "integrity": "sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==","dev": true,"dependencies": {- "@humanwhocodes/object-schema": "^1.2.1",- "debug": "^4.1.1",+ "@humanwhocodes/object-schema": "^2.0.2",+ "debug": "^4.3.1","minimatch": "^3.0.5"},"engines": {@@ -5857,9 +5067,9 @@}},"node_modules/@humanwhocodes/object-schema": {- "version": "1.2.1",- "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz",- "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==",+ "version": "2.0.2",+ "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.2.tgz",+ "integrity": "sha512-6EwiSjwWYP7pTckG6I5eyFANjPhmPjUX9JRLUSfNPC7FX7zK9gyZAfUEaECL6ALTpGX5AjnBq3C9XmVWPitNpw==","dev": true},"node_modules/@ioredis/commands": {@@ -5871,7 +5081,6 @@"version": "8.0.2","resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz","integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==",- "dev": true,"dependencies": {"string-width": "^5.1.2","string-width-cjs": "npm:string-width@^4.2.0",@@ -5888,7 +5097,6 @@"version": "6.0.1","resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz","integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==",- "dev": true,"engines": {"node": ">=12"},@@ -5900,7 +5108,6 @@"version": "7.1.0","resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz","integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==",- "dev": true,"dependencies": {"ansi-regex": "^6.0.1"},@@ -5936,6 +5143,15 @@"sprintf-js": "~1.0.2"}},+ "node_modules/@istanbuljs/load-nyc-config/node_modules/camelcase": {+ "version": "5.3.1",+ "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz",+ "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==",+ "dev": true,+ "engines": {+ "node": ">=6"+ }+ },"node_modules/@istanbuljs/load-nyc-config/node_modules/find-up": {"version": "4.1.0","resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz",@@ -6036,6 +5252,15 @@"node": "^14.15.0 || ^16.10.0 || >=18.0.0"}},+ "node_modules/@jest/console/node_modules/slash": {+ "version": "3.0.0",+ "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz",+ "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==",+ "dev": true,+ "engines": {+ "node": ">=8"+ }+ },"node_modules/@jest/core": {"version": "29.7.0","resolved": "https://registry.npmjs.org/@jest/core/-/core-29.7.0.tgz",@@ -6083,6 +5308,15 @@}}},+ "node_modules/@jest/core/node_modules/slash": {+ "version": "3.0.0",+ "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz",+ "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==",+ "dev": true,+ "engines": {+ "node": ">=8"+ }+ },"node_modules/@jest/environment": {"version": "29.7.0","resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.7.0.tgz",@@ -6218,6 +5452,15 @@"url": "https://github.com/sponsors/isaacs"}},+ "node_modules/@jest/reporters/node_modules/slash": {+ "version": "3.0.0",+ "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz",+ "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==",+ "dev": true,+ "engines": {+ "node": ">=8"+ }+ },"node_modules/@jest/schemas": {"version": "29.6.3","resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz",@@ -6271,7 +5514,16 @@"slash": "^3.0.0"},"engines": {- "node": "^14.15.0 || ^16.10.0 || >=18.0.0"+ "node": "^14.15.0 || ^16.10.0 || >=18.0.0"+ }+ },+ "node_modules/@jest/test-sequencer/node_modules/slash": {+ "version": "3.0.0",+ "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz",+ "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==",+ "dev": true,+ "engines": {+ "node": ">=8"}},"node_modules/@jest/transform": {@@ -6300,11 +5552,14 @@"node": "^14.15.0 || ^16.10.0 || >=18.0.0"}},- "node_modules/@jest/transform/node_modules/convert-source-map": {- "version": "2.0.0",- "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz",- "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==",- "dev": true+ "node_modules/@jest/transform/node_modules/slash": {+ "version": "3.0.0",+ "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz",+ "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==",+ "dev": true,+ "engines": {+ "node": ">=8"+ }},"node_modules/@jest/types": {"version": "29.6.3",@@ -6368,9 +5623,9 @@"integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg=="},"node_modules/@jridgewell/trace-mapping": {- "version": "0.3.19",- "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.19.tgz",- "integrity": "sha512-kf37QtfW+Hwx/buWGMPcR60iF9ziHa6r/CZJIHbmcm4+0qrXiVdxegAH0F6yddEVQ7zdkjcGCgCzUu+BcbhQxw==",+ "version": "0.3.22",+ "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.22.tgz",+ "integrity": "sha512-Wf963MzWtA2sjrNt+g18IAln9lKnlRp+K2eH4jjIoF1wYeq3aMREpG09xhlhdzS0EjwU7qmUJYangWa+151vZw==","dependencies": {"@jridgewell/resolve-uri": "^3.1.0","@jridgewell/sourcemap-codec": "^1.4.14"@@ -6405,52 +5660,388 @@"type": "github","url": "https://github.com/sponsors/feross"},- {- "type": "patreon",- "url": "https://www.patreon.com/feross"+ {+ "type": "patreon",+ "url": "https://www.patreon.com/feross"+ },+ {+ "type": "consulting",+ "url": "https://feross.org/support"+ }+ ],+ "dependencies": {+ "base64-js": "^1.3.1",+ "ieee754": "^1.1.13"+ }+ },+ "node_modules/@keyv/mongo/node_modules/mongodb": {+ "version": "4.17.2",+ "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-4.17.2.tgz",+ "integrity": "sha512-mLV7SEiov2LHleRJPMPrK2PMyhXFZt2UQLC4VD4pnth3jMjYKHhtqfwwkkvS/NXuo/Fp3vbhaNcXrIDaLRb9Tg==",+ "dependencies": {+ "bson": "^4.7.2",+ "mongodb-connection-string-url": "^2.6.0",+ "socks": "^2.7.1"+ },+ "engines": {+ "node": ">=12.9.0"+ },+ "optionalDependencies": {+ "@aws-sdk/credential-providers": "^3.186.0",+ "@mongodb-js/saslprep": "^1.1.0"+ }+ },+ "node_modules/@keyv/redis": {+ "version": "2.8.4",+ "resolved": "https://registry.npmjs.org/@keyv/redis/-/redis-2.8.4.tgz",+ "integrity": "sha512-osO4C+i+Gi844wHjvXuHwhl+sDx3289Of309ZlLcj6SJReTLmPXzNiVR81N88wOu5aC+lVFdmx9FUQkkjdbPRQ==",+ "dependencies": {+ "ioredis": "^5.3.2"+ },+ "engines": {+ "node": ">= 14"+ }+ },+ "node_modules/@langchain/community": {+ "version": "0.0.17",+ "resolved": "https://registry.npmjs.org/@langchain/community/-/community-0.0.17.tgz",+ "integrity": "sha512-BI7WJv3rtIbmKrvUNeTaxGGrz8jnu4boLnpl+4cH3WE2lrKTdzuvp6Ot4dACowWInvNSfXcdMzG3BrtTMSaDcQ==",+ "dependencies": {+ "@langchain/core": "~0.1.9",+ "@langchain/openai": "~0.0.10",+ "flat": "^5.0.2",+ "langsmith": "~0.0.48",+ "uuid": "^9.0.0",+ "zod": "^3.22.3"+ },+ "engines": {+ "node": ">=18"+ },+ "peerDependencies": {+ "@aws-crypto/sha256-js": "^5.0.0",+ "@aws-sdk/client-bedrock-runtime": "^3.422.0",+ "@aws-sdk/client-dynamodb": "^3.310.0",+ "@aws-sdk/client-kendra": "^3.352.0",+ "@aws-sdk/client-lambda": "^3.310.0",+ "@aws-sdk/client-sagemaker-runtime": "^3.310.0",+ "@aws-sdk/client-sfn": "^3.310.0",+ "@aws-sdk/credential-provider-node": "^3.388.0",+ "@clickhouse/client": "^0.2.5",+ "@cloudflare/ai": "^1.0.12",+ "@datastax/astra-db-ts": "0.1.2",+ "@elastic/elasticsearch": "^8.4.0",+ "@getmetal/metal-sdk": "*",+ "@getzep/zep-js": "^0.9.0",+ "@gomomento/sdk": "^1.51.1",+ "@gomomento/sdk-core": "^1.51.1",+ "@google-ai/generativelanguage": "^0.2.1",+ "@gradientai/nodejs-sdk": "^1.2.0",+ "@huggingface/inference": "^2.6.4",+ "@mozilla/readability": "*",+ "@opensearch-project/opensearch": "*",+ "@pinecone-database/pinecone": "^1.1.0",+ "@planetscale/database": "^1.8.0",+ "@qdrant/js-client-rest": "^1.2.0",+ "@raycast/api": "^1.55.2",+ "@rockset/client": "^0.9.1",+ "@smithy/eventstream-codec": "^2.0.5",+ "@smithy/protocol-http": "^3.0.6",+ "@smithy/signature-v4": "^2.0.10",+ "@smithy/util-utf8": "^2.0.0",+ "@supabase/postgrest-js": "^1.1.1",+ "@supabase/supabase-js": "^2.10.0",+ "@tensorflow-models/universal-sentence-encoder": "*",+ "@tensorflow/tfjs-converter": "*",+ "@tensorflow/tfjs-core": "*",+ "@upstash/redis": "^1.20.6",+ "@vercel/kv": "^0.2.3",+ "@vercel/postgres": "^0.5.0",+ "@writerai/writer-sdk": "^0.40.2",+ "@xata.io/client": "^0.28.0",+ "@xenova/transformers": "^2.5.4",+ "@zilliz/milvus2-sdk-node": ">=2.2.7",+ "cassandra-driver": "^4.7.2",+ "chromadb": "*",+ "closevector-common": "0.1.0-alpha.1",+ "closevector-node": "0.1.0-alpha.10",+ "closevector-web": "0.1.0-alpha.16",+ "cohere-ai": ">=6.0.0",+ "convex": "^1.3.1",+ "discord.js": "^14.14.1",+ "faiss-node": "^0.5.1",+ "firebase-admin": "^11.9.0",+ "google-auth-library": "^8.9.0",+ "googleapis": "^126.0.1",+ "hnswlib-node": "^1.4.2",+ "html-to-text": "^9.0.5",+ "ioredis": "^5.3.2",+ "jsdom": "*",+ "llmonitor": "^0.5.9",+ "lodash": "^4.17.21",+ "lunary": "^0.6.11",+ "mongodb": "^5.2.0",+ "mysql2": "^3.3.3",+ "neo4j-driver": "*",+ "node-llama-cpp": "*",+ "pg": "^8.11.0",+ "pg-copy-streams": "^6.0.5",+ "pickleparser": "^0.2.1",+ "portkey-ai": "^0.1.11",+ "redis": "^4.6.4",+ "replicate": "^0.18.0",+ "typeorm": "^0.3.12",+ "typesense": "^1.5.3",+ "usearch": "^1.1.1",+ "vectordb": "^0.1.4",+ "voy-search": "0.6.2",+ "weaviate-ts-client": "^1.4.0",+ "web-auth-library": "^1.0.3",+ "ws": "^8.14.2"+ },+ "peerDependenciesMeta": {+ "@aws-crypto/sha256-js": {+ "optional": true+ },+ "@aws-sdk/client-bedrock-runtime": {+ "optional": true+ },+ "@aws-sdk/client-dynamodb": {+ "optional": true+ },+ "@aws-sdk/client-kendra": {+ "optional": true+ },+ "@aws-sdk/client-lambda": {+ "optional": true+ },+ "@aws-sdk/client-sagemaker-runtime": {+ "optional": true+ },+ "@aws-sdk/client-sfn": {+ "optional": true+ },+ "@aws-sdk/credential-provider-node": {+ "optional": true+ },+ "@clickhouse/client": {+ "optional": true+ },+ "@cloudflare/ai": {+ "optional": true+ },+ "@datastax/astra-db-ts": {+ "optional": true+ },+ "@elastic/elasticsearch": {+ "optional": true+ },+ "@getmetal/metal-sdk": {+ "optional": true+ },+ "@getzep/zep-js": {+ "optional": true+ },+ "@gomomento/sdk": {+ "optional": true+ },+ "@gomomento/sdk-core": {+ "optional": true+ },+ "@google-ai/generativelanguage": {+ "optional": true+ },+ "@gradientai/nodejs-sdk": {+ "optional": true+ },+ "@huggingface/inference": {+ "optional": true+ },+ "@mozilla/readability": {+ "optional": true+ },+ "@opensearch-project/opensearch": {+ "optional": true+ },+ "@pinecone-database/pinecone": {+ "optional": true+ },+ "@planetscale/database": {+ "optional": true+ },+ "@qdrant/js-client-rest": {+ "optional": true+ },+ "@raycast/api": {+ "optional": true+ },+ "@rockset/client": {+ "optional": true+ },+ "@smithy/eventstream-codec": {+ "optional": true+ },+ "@smithy/protocol-http": {+ "optional": true+ },+ "@smithy/signature-v4": {+ "optional": true+ },+ "@smithy/util-utf8": {+ "optional": true+ },+ "@supabase/postgrest-js": {+ "optional": true+ },+ "@supabase/supabase-js": {+ "optional": true+ },+ "@tensorflow-models/universal-sentence-encoder": {+ "optional": true+ },+ "@tensorflow/tfjs-converter": {+ "optional": true+ },+ "@tensorflow/tfjs-core": {+ "optional": true+ },+ "@upstash/redis": {+ "optional": true+ },+ "@vercel/kv": {+ "optional": true+ },+ "@vercel/postgres": {+ "optional": true+ },+ "@writerai/writer-sdk": {+ "optional": true},- {- "type": "consulting",- "url": "https://feross.org/support"+ "@xata.io/client": {+ "optional": true+ },+ "@xenova/transformers": {+ "optional": true+ },+ "@zilliz/milvus2-sdk-node": {+ "optional": true+ },+ "cassandra-driver": {+ "optional": true+ },+ "chromadb": {+ "optional": true+ },+ "closevector-common": {+ "optional": true+ },+ "closevector-node": {+ "optional": true+ },+ "closevector-web": {+ "optional": true+ },+ "cohere-ai": {+ "optional": true+ },+ "convex": {+ "optional": true+ },+ "discord.js": {+ "optional": true+ },+ "faiss-node": {+ "optional": true+ },+ "firebase-admin": {+ "optional": true+ },+ "google-auth-library": {+ "optional": true+ },+ "googleapis": {+ "optional": true+ },+ "hnswlib-node": {+ "optional": true+ },+ "html-to-text": {+ "optional": true+ },+ "ioredis": {+ "optional": true+ },+ "jsdom": {+ "optional": true+ },+ "llmonitor": {+ "optional": true+ },+ "lodash": {+ "optional": true+ },+ "lunary": {+ "optional": true+ },+ "mongodb": {+ "optional": true+ },+ "mysql2": {+ "optional": true+ },+ "neo4j-driver": {+ "optional": true+ },+ "node-llama-cpp": {+ "optional": true+ },+ "pg": {+ "optional": true+ },+ "pg-copy-streams": {+ "optional": true+ },+ "pickleparser": {+ "optional": true+ },+ "portkey-ai": {+ "optional": true+ },+ "redis": {+ "optional": true+ },+ "replicate": {+ "optional": true+ },+ "typeorm": {+ "optional": true+ },+ "typesense": {+ "optional": true+ },+ "usearch": {+ "optional": true+ },+ "vectordb": {+ "optional": true+ },+ "voy-search": {+ "optional": true+ },+ "weaviate-ts-client": {+ "optional": true+ },+ "web-auth-library": {+ "optional": true+ },+ "ws": {+ "optional": true}- ],- "dependencies": {- "base64-js": "^1.3.1",- "ieee754": "^1.1.13"- }- },- "node_modules/@keyv/mongo/node_modules/mongodb": {- "version": "4.17.1",- "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-4.17.1.tgz",- "integrity": "sha512-MBuyYiPUPRTqfH2dV0ya4dcr2E5N52ocBuZ8Sgg/M030nGF78v855B3Z27mZJnp8PxjnUquEnAtjOsphgMZOlQ==",- "dependencies": {- "bson": "^4.7.2",- "mongodb-connection-string-url": "^2.6.0",- "socks": "^2.7.1"- },- "engines": {- "node": ">=12.9.0"- },- "optionalDependencies": {- "@aws-sdk/credential-providers": "^3.186.0",- "@mongodb-js/saslprep": "^1.1.0"- }- },- "node_modules/@keyv/redis": {- "version": "2.8.1",- "resolved": "https://registry.npmjs.org/@keyv/redis/-/redis-2.8.1.tgz",- "integrity": "sha512-JjoNXtAcjT0r0CIWi69rVoXdwPD2nHqyWR80XHmsP1Psuzml1icNtehq6ZqKJjLLgLzH3DvQoWrXkmhxxerf3g==",- "dependencies": {- "ioredis": "^5.3.2"- },- "engines": {- "node": ">= 14"}},"node_modules/@langchain/core": {- "version": "0.1.5",- "resolved": "https://registry.npmjs.org/@langchain/core/-/core-0.1.5.tgz",- "integrity": "sha512-5RdZpbadMYXTKdZrWZ6JeYT09BZssprg+komE+FbXxW+kbGE0QJJaj8dnzPNdzVCAhDLQQTOV2CAM+vOLsaxzQ==",+ "version": "0.1.23",+ "resolved": "https://registry.npmjs.org/@langchain/core/-/core-0.1.23.tgz",+ "integrity": "sha512-Kn2AiwEMHW9+o6bkKiEUbJ8abQMlEVoePTKw6axdnEOE9zX5Epl1iRCJo+Id5ajNYSYXjWky4puqz75OcFGD6w==","dependencies": {"ansi-styles": "^5.0.0","camelcase": "6",@@ -6460,8 +6051,10 @@"ml-distance": "^4.0.0","p-queue": "^6.6.2","p-retry": "4",+ "sax": "^1.3.0","uuid": "^9.0.0",- "zod": "^3.22.3"+ "zod": "^3.22.4",+ "zod-to-json-schema": "^3.22.3"},"engines": {"node": ">=18"@@ -6478,29 +6071,6 @@"url": "https://github.com/chalk/ansi-styles?sponsor=1"}},- "node_modules/@langchain/core/node_modules/camelcase": {- "version": "6.3.0",- "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz",- "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==",- "engines": {- "node": ">=10"- },- "funding": {- "url": "https://github.com/sponsors/sindresorhus"- }- },- "node_modules/@langchain/core/node_modules/uuid": {- "version": "9.0.1",- "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz",- "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==",- "funding": [- "https://github.com/sponsors/broofa",- "https://github.com/sponsors/ctavan"- ],- "bin": {- "uuid": "dist/bin/uuid"- }- },"node_modules/@langchain/google-genai": {"version": "0.0.8","resolved": "https://registry.npmjs.org/@langchain/google-genai/-/google-genai-0.0.8.tgz",@@ -6514,20 +6084,47 @@}},"node_modules/@langchain/openai": {- "version": "0.0.9",- "resolved": "https://registry.npmjs.org/@langchain/openai/-/openai-0.0.9.tgz",- "integrity": "sha512-Py7rJijOjNtb9pj5He+E9uAj9d8PCX+8Ix4LvY7cUTMCDlfkhngw2DhJ8wlk23u1IvunakdnnN74pfbO2JJBrw==",+ "version": "0.0.14",+ "resolved": "https://registry.npmjs.org/@langchain/openai/-/openai-0.0.14.tgz",+ "integrity": "sha512-co6nRylPrLGY/C3JYxhHt6cxLq07P086O7K3QaZH7SFFErIN9wSzJonpvhZR07DEUq6eK6wKgh2ORxA/NcjSRQ==","dependencies": {- "@langchain/core": "~0.1.5",+ "@langchain/core": "~0.1.13","js-tiktoken": "^1.0.7",- "openai": "^4.19.0",- "zod": "^3.22.3",- "zod-to-json-schema": "3.20.3"+ "openai": "^4.26.0",+ "zod": "^3.22.4",+ "zod-to-json-schema": "^3.22.3"},"engines": {"node": ">=18"}},+ "node_modules/@langchain/openai/node_modules/@types/node": {+ "version": "18.19.14",+ "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.14.tgz",+ "integrity": "sha512-EnQ4Us2rmOS64nHDWr0XqAD8DsO6f3XR6lf9UIIrZQpUzPVdN/oPuEzfDWNHSyXLvoGgjuEm/sPwFGSSs35Wtg==",+ "dependencies": {+ "undici-types": "~5.26.4"+ }+ },+ "node_modules/@langchain/openai/node_modules/openai": {+ "version": "4.26.1",+ "resolved": "https://registry.npmjs.org/openai/-/openai-4.26.1.tgz",+ "integrity": "sha512-DvWbjhWbappsFRatOWmu4Dp1/Q4RG9oOz6CfOSjy0/Drb8G+5iAiqWAO4PfpGIkhOOKtvvNfQri2SItl+U7LhQ==",+ "dependencies": {+ "@types/node": "^18.11.18",+ "@types/node-fetch": "^2.6.4",+ "abort-controller": "^3.0.0",+ "agentkeepalive": "^4.2.1",+ "digest-fetch": "^1.3.0",+ "form-data-encoder": "1.7.2",+ "formdata-node": "^4.3.2",+ "node-fetch": "^2.6.7",+ "web-streams-polyfill": "^3.2.1"+ },+ "bin": {+ "openai": "bin/cli"+ }+ },"node_modules/@librechat/backend": {"resolved": "api","link": true@@ -6537,20 +6134,20 @@"link": true},"node_modules/@ljharb/through": {- "version": "2.3.11",- "resolved": "https://registry.npmjs.org/@ljharb/through/-/through-2.3.11.tgz",- "integrity": "sha512-ccfcIDlogiXNq5KcbAwbaO7lMh3Tm1i3khMPYpxlK8hH/W53zN81KM9coerRLOnTGu3nfXIniAmQbRI9OxbC0w==",+ "version": "2.3.12",+ "resolved": "https://registry.npmjs.org/@ljharb/through/-/through-2.3.12.tgz",+ "integrity": "sha512-ajo/heTlG3QgC8EGP6APIejksVAYt4ayz4tqoP3MolFELzcH1x1fzwEYRJTPO0IELutZ5HQ0c26/GqAYy79u3g==","dependencies": {- "call-bind": "^1.0.2"+ "call-bind": "^1.0.5"},"engines": {"node": ">= 0.4"}},"node_modules/@messageformat/core": {- "version": "3.2.0",- "resolved": "https://registry.npmjs.org/@messageformat/core/-/core-3.2.0.tgz",- "integrity": "sha512-ppbb/7OYqg/t4WdFk8VAfZEV2sNUq3+7VeBAo5sKFhmF786sh6gB7fUeXa2qLTDIcTHS49HivTBN7QNOU5OFTg==",+ "version": "3.3.0",+ "resolved": "https://registry.npmjs.org/@messageformat/core/-/core-3.3.0.tgz",+ "integrity": "sha512-YcXd3remTDdeMxAlbvW6oV9d/01/DZ8DHUFwSttO3LMzIZj3iO0NRw+u1xlsNNORFI+u0EQzD52ZX3+Udi0T3g==","dev": true,"dependencies": {"@messageformat/date-skeleton": "^1.0.0",@@ -6592,9 +6189,9 @@}},"node_modules/@mongodb-js/saslprep": {- "version": "1.1.0",- "resolved": "https://registry.npmjs.org/@mongodb-js/saslprep/-/saslprep-1.1.0.tgz",- "integrity": "sha512-Xfijy7HvfzzqiOAhAepF4SGN5e9leLkMvg/OPOF97XemjfVCYN/oWa75wnkc6mltMSTwY+XlbhWgUOJmkFspSw==",+ "version": "1.1.4",+ "resolved": "https://registry.npmjs.org/@mongodb-js/saslprep/-/saslprep-1.1.4.tgz",+ "integrity": "sha512-8zJ8N1x51xo9hwPh6AWnKdLGEC5N3lDa6kms1YHmFBoRhTpJR6HG8wWk0td1MVCu9cD4YBrvjZEtd5Obw0Fbnw==","optional": true,"dependencies": {"sparse-bitfield": "^3.0.3"@@ -6636,19 +6233,18 @@"version": "0.11.0","resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz","integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==",- "dev": true,"optional": true,"engines": {"node": ">=14"}},"node_modules/@playwright/test": {- "version": "1.38.1",- "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.38.1.tgz",- "integrity": "sha512-NqRp8XMwj3AK+zKLbZShl0r/9wKgzqI/527bkptKXomtuo+dOjU9NdMASQ8DNC9z9zLOMbG53T4eihYr3XR+BQ==",+ "version": "1.41.2",+ "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.41.2.tgz",+ "integrity": "sha512-qQB9h7KbibJzrDpkXkYvsmiDJK14FULCCZgEcoe2AvFAS64oCirWTwzTlAYEbKaRxWs5TFesE1Na6izMv3HfGg==","dev": true,"dependencies": {- "playwright": "1.38.1"+ "playwright": "1.41.2"},"bin": {"playwright": "cli.js"@@ -6812,16 +6408,47 @@"@babel/runtime": "^7.13.10"}},+ "node_modules/@radix-ui/react-accordion": {+ "version": "1.1.2",+ "resolved": "https://registry.npmjs.org/@radix-ui/react-accordion/-/react-accordion-1.1.2.tgz",+ "integrity": "sha512-fDG7jcoNKVjSK6yfmuAs0EnPDro0WMXIhMtXdTBWqEioVW206ku+4Lw07e+13lUkFkpoEQ2PdeMIAGpdqEAmDg==",+ "dependencies": {+ "@babel/runtime": "^7.13.10",+ "@radix-ui/primitive": "1.0.1",+ "@radix-ui/react-collapsible": "1.0.3",+ "@radix-ui/react-collection": "1.0.3",+ "@radix-ui/react-compose-refs": "1.0.1",+ "@radix-ui/react-context": "1.0.1",+ "@radix-ui/react-direction": "1.0.1",+ "@radix-ui/react-id": "1.0.1",+ "@radix-ui/react-primitive": "1.0.3",+ "@radix-ui/react-use-controllable-state": "1.0.1"+ },+ "peerDependencies": {+ "@types/react": "*",+ "@types/react-dom": "*",+ "react": "^16.8 || ^17.0 || ^18.0",+ "react-dom": "^16.8 || ^17.0 || ^18.0"+ },+ "peerDependenciesMeta": {+ "@types/react": {+ "optional": true+ },+ "@types/react-dom": {+ "optional": true+ }+ }+ },"node_modules/@radix-ui/react-alert-dialog": {- "version": "1.0.4",- "resolved": "https://registry.npmjs.org/@radix-ui/react-alert-dialog/-/react-alert-dialog-1.0.4.tgz",- "integrity": "sha512-jbfBCRlKYlhbitueOAv7z74PXYeIQmWpKwm3jllsdkw7fGWNkxqP3v0nY9WmOzcPqpQuoorNtvViBgL46n5gVg==",+ "version": "1.0.5",+ "resolved": "https://registry.npmjs.org/@radix-ui/react-alert-dialog/-/react-alert-dialog-1.0.5.tgz",+ "integrity": "sha512-OrVIOcZL0tl6xibeuGt5/+UxoT2N27KCFOPjFyfXMnchxSHZ/OW7cCX2nGlIYJrbHK/fczPcFzAwvNBB6XBNMA==","dependencies": {"@babel/runtime": "^7.13.10","@radix-ui/primitive": "1.0.1","@radix-ui/react-compose-refs": "1.0.1","@radix-ui/react-context": "1.0.1",- "@radix-ui/react-dialog": "1.0.4",+ "@radix-ui/react-dialog": "1.0.5","@radix-ui/react-primitive": "1.0.3","@radix-ui/react-slot": "1.0.2"},@@ -6875,8 +6502,38 @@"@radix-ui/react-presence": "1.0.1","@radix-ui/react-primitive": "1.0.3","@radix-ui/react-use-controllable-state": "1.0.1",- "@radix-ui/react-use-previous": "1.0.1",- "@radix-ui/react-use-size": "1.0.1"+ "@radix-ui/react-use-previous": "1.0.1",+ "@radix-ui/react-use-size": "1.0.1"+ },+ "peerDependencies": {+ "@types/react": "*",+ "@types/react-dom": "*",+ "react": "^16.8 || ^17.0 || ^18.0",+ "react-dom": "^16.8 || ^17.0 || ^18.0"+ },+ "peerDependenciesMeta": {+ "@types/react": {+ "optional": true+ },+ "@types/react-dom": {+ "optional": true+ }+ }+ },+ "node_modules/@radix-ui/react-collapsible": {+ "version": "1.0.3",+ "resolved": "https://registry.npmjs.org/@radix-ui/react-collapsible/-/react-collapsible-1.0.3.tgz",+ "integrity": "sha512-UBmVDkmR6IvDsloHVN+3rtx4Mi5TFvylYXpluuv0f37dtaz3H99bp8No0LGXRigVpl3UAT4l9j6bIchh42S/Gg==",+ "dependencies": {+ "@babel/runtime": "^7.13.10",+ "@radix-ui/primitive": "1.0.1",+ "@radix-ui/react-compose-refs": "1.0.1",+ "@radix-ui/react-context": "1.0.1",+ "@radix-ui/react-id": "1.0.1",+ "@radix-ui/react-presence": "1.0.1",+ "@radix-ui/react-primitive": "1.0.3",+ "@radix-ui/react-use-controllable-state": "1.0.1",+ "@radix-ui/react-use-layout-effect": "1.0.1"},"peerDependencies": {"@types/react": "*",@@ -6954,19 +6611,19 @@}},"node_modules/@radix-ui/react-dialog": {- "version": "1.0.4",- "resolved": "https://registry.npmjs.org/@radix-ui/react-dialog/-/react-dialog-1.0.4.tgz",- "integrity": "sha512-hJtRy/jPULGQZceSAP2Re6/4NpKo8im6V8P2hUqZsdFiSL8l35kYsw3qbRI6Ay5mQd2+wlLqje770eq+RJ3yZg==",+ "version": "1.0.5",+ "resolved": "https://registry.npmjs.org/@radix-ui/react-dialog/-/react-dialog-1.0.5.tgz",+ "integrity": "sha512-GjWJX/AUpB703eEBanuBnIWdIXg6NvJFCXcNlSZk4xdszCdhrJgBoUd1cGk67vFO+WdA2pfI/plOpqz/5GUP6Q==","dependencies": {"@babel/runtime": "^7.13.10","@radix-ui/primitive": "1.0.1","@radix-ui/react-compose-refs": "1.0.1","@radix-ui/react-context": "1.0.1",- "@radix-ui/react-dismissable-layer": "1.0.4",+ "@radix-ui/react-dismissable-layer": "1.0.5","@radix-ui/react-focus-guards": "1.0.1",- "@radix-ui/react-focus-scope": "1.0.3",+ "@radix-ui/react-focus-scope": "1.0.4","@radix-ui/react-id": "1.0.1",- "@radix-ui/react-portal": "1.0.3",+ "@radix-ui/react-portal": "1.0.4","@radix-ui/react-presence": "1.0.1","@radix-ui/react-primitive": "1.0.3","@radix-ui/react-slot": "1.0.2",@@ -7007,9 +6664,9 @@}},"node_modules/@radix-ui/react-dismissable-layer": {- "version": "1.0.4",- "resolved": "https://registry.npmjs.org/@radix-ui/react-dismissable-layer/-/react-dismissable-layer-1.0.4.tgz",- "integrity": "sha512-7UpBa/RKMoHJYjie1gkF1DlK8l1fdU/VKDpoS3rCCo8YBJR294GwcEHyxHw72yvphJ7ld0AXEcSLAzY2F/WyCg==",+ "version": "1.0.5",+ "resolved": "https://registry.npmjs.org/@radix-ui/react-dismissable-layer/-/react-dismissable-layer-1.0.5.tgz",+ "integrity": "sha512-aJeDjQhywg9LBu2t/At58hCvr7pEm0o2Ke1x33B+MhjNmmZ17sy4KImo0KPLgsnc/zN7GPdce8Cnn0SWvwZO7g==","dependencies": {"@babel/runtime": "^7.13.10","@radix-ui/primitive": "1.0.1",@@ -7034,16 +6691,16 @@}},"node_modules/@radix-ui/react-dropdown-menu": {- "version": "2.0.5",- "resolved": "https://registry.npmjs.org/@radix-ui/react-dropdown-menu/-/react-dropdown-menu-2.0.5.tgz",- "integrity": "sha512-xdOrZzOTocqqkCkYo8yRPCib5OkTkqN7lqNCdxwPOdE466DOaNl4N8PkUIlsXthQvW5Wwkd+aEmWpfWlBoDPEw==",+ "version": "2.0.6",+ "resolved": "https://registry.npmjs.org/@radix-ui/react-dropdown-menu/-/react-dropdown-menu-2.0.6.tgz",+ "integrity": "sha512-i6TuFOoWmLWq+M/eCLGd/bQ2HfAX1RJgvrBQ6AQLmzfvsLdefxbWu8G9zczcPFfcSPehz9GcpF6K9QYreFV8hA==","dependencies": {"@babel/runtime": "^7.13.10","@radix-ui/primitive": "1.0.1","@radix-ui/react-compose-refs": "1.0.1","@radix-ui/react-context": "1.0.1","@radix-ui/react-id": "1.0.1",- "@radix-ui/react-menu": "2.0.5",+ "@radix-ui/react-menu": "2.0.6","@radix-ui/react-primitive": "1.0.3","@radix-ui/react-use-controllable-state": "1.0.1"},@@ -7080,9 +6737,9 @@}},"node_modules/@radix-ui/react-focus-scope": {- "version": "1.0.3",- "resolved": "https://registry.npmjs.org/@radix-ui/react-focus-scope/-/react-focus-scope-1.0.3.tgz",- "integrity": "sha512-upXdPfqI4islj2CslyfUBNlaJCPybbqRHAi1KER7Isel9Q2AtSJ0zRBZv8mWQiFXD2nyAJ4BhC3yXgZ6kMBSrQ==",+ "version": "1.0.4",+ "resolved": "https://registry.npmjs.org/@radix-ui/react-focus-scope/-/react-focus-scope-1.0.4.tgz",+ "integrity": "sha512-sL04Mgvf+FmyvZeYfNu1EPAaaxD+aw7cYeIB9L9Fvq8+urhltTRaEo5ysKOpHuKPclsZcSUMKlN05x4u+CINpA==","dependencies": {"@babel/runtime": "^7.13.10","@radix-ui/react-compose-refs": "1.0.1",@@ -7105,17 +6762,17 @@}},"node_modules/@radix-ui/react-hover-card": {- "version": "1.0.6",- "resolved": "https://registry.npmjs.org/@radix-ui/react-hover-card/-/react-hover-card-1.0.6.tgz",- "integrity": "sha512-2K3ToJuMk9wjwBOa+jdg2oPma+AmLdcEyTNsG/iC4BDVG3E0/mGCjbY8PEDSLxJcUi+nJi2QII+ec/4kWd88DA==",+ "version": "1.0.7",+ "resolved": "https://registry.npmjs.org/@radix-ui/react-hover-card/-/react-hover-card-1.0.7.tgz",+ "integrity": "sha512-OcUN2FU0YpmajD/qkph3XzMcK/NmSk9hGWnjV68p6QiZMgILugusgQwnLSDs3oFSJYGKf3Y49zgFedhGh04k9A==","dependencies": {"@babel/runtime": "^7.13.10","@radix-ui/primitive": "1.0.1","@radix-ui/react-compose-refs": "1.0.1","@radix-ui/react-context": "1.0.1",- "@radix-ui/react-dismissable-layer": "1.0.4",- "@radix-ui/react-popper": "1.1.2",- "@radix-ui/react-portal": "1.0.3",+ "@radix-ui/react-dismissable-layer": "1.0.5",+ "@radix-ui/react-popper": "1.1.3",+ "@radix-ui/react-portal": "1.0.4","@radix-ui/react-presence": "1.0.1","@radix-ui/react-primitive": "1.0.3","@radix-ui/react-use-controllable-state": "1.0.1"@@ -7185,9 +6842,9 @@}},"node_modules/@radix-ui/react-menu": {- "version": "2.0.5",- "resolved": "https://registry.npmjs.org/@radix-ui/react-menu/-/react-menu-2.0.5.tgz",- "integrity": "sha512-Gw4f9pwdH+w5w+49k0gLjN0PfRDHvxmAgG16AbyJZ7zhwZ6PBHKtWohvnSwfusfnK3L68dpBREHpVkj8wEM7ZA==",+ "version": "2.0.6",+ "resolved": "https://registry.npmjs.org/@radix-ui/react-menu/-/react-menu-2.0.6.tgz",+ "integrity": "sha512-BVkFLS+bUC8HcImkRKPSiVumA1VPOOEC5WBMiT+QAVsPzW1FJzI9KnqgGxVDPBcql5xXrHkD3JOVoXWEXD8SYA==","dependencies": {"@babel/runtime": "^7.13.10","@radix-ui/primitive": "1.0.1",@@ -7195,12 +6852,12 @@"@radix-ui/react-compose-refs": "1.0.1","@radix-ui/react-context": "1.0.1","@radix-ui/react-direction": "1.0.1",- "@radix-ui/react-dismissable-layer": "1.0.4",+ "@radix-ui/react-dismissable-layer": "1.0.5","@radix-ui/react-focus-guards": "1.0.1",- "@radix-ui/react-focus-scope": "1.0.3",+ "@radix-ui/react-focus-scope": "1.0.4","@radix-ui/react-id": "1.0.1",- "@radix-ui/react-popper": "1.1.2",- "@radix-ui/react-portal": "1.0.3",+ "@radix-ui/react-popper": "1.1.3",+ "@radix-ui/react-portal": "1.0.4","@radix-ui/react-presence": "1.0.1","@radix-ui/react-primitive": "1.0.3","@radix-ui/react-roving-focus": "1.0.4",@@ -7261,59 +6918,7 @@}}},- "node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-dismissable-layer": {- "version": "1.0.5",- "resolved": "https://registry.npmjs.org/@radix-ui/react-dismissable-layer/-/react-dismissable-layer-1.0.5.tgz",- "integrity": "sha512-aJeDjQhywg9LBu2t/At58hCvr7pEm0o2Ke1x33B+MhjNmmZ17sy4KImo0KPLgsnc/zN7GPdce8Cnn0SWvwZO7g==",- "dependencies": {- "@babel/runtime": "^7.13.10",- "@radix-ui/primitive": "1.0.1",- "@radix-ui/react-compose-refs": "1.0.1",- "@radix-ui/react-primitive": "1.0.3",- "@radix-ui/react-use-callback-ref": "1.0.1",- "@radix-ui/react-use-escape-keydown": "1.0.3"- },- "peerDependencies": {- "@types/react": "*",- "@types/react-dom": "*",- "react": "^16.8 || ^17.0 || ^18.0",- "react-dom": "^16.8 || ^17.0 || ^18.0"- },- "peerDependenciesMeta": {- "@types/react": {- "optional": true- },- "@types/react-dom": {- "optional": true- }- }- },- "node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-focus-scope": {- "version": "1.0.4",- "resolved": "https://registry.npmjs.org/@radix-ui/react-focus-scope/-/react-focus-scope-1.0.4.tgz",- "integrity": "sha512-sL04Mgvf+FmyvZeYfNu1EPAaaxD+aw7cYeIB9L9Fvq8+urhltTRaEo5ysKOpHuKPclsZcSUMKlN05x4u+CINpA==",- "dependencies": {- "@babel/runtime": "^7.13.10",- "@radix-ui/react-compose-refs": "1.0.1",- "@radix-ui/react-primitive": "1.0.3",- "@radix-ui/react-use-callback-ref": "1.0.1"- },- "peerDependencies": {- "@types/react": "*",- "@types/react-dom": "*",- "react": "^16.8 || ^17.0 || ^18.0",- "react-dom": "^16.8 || ^17.0 || ^18.0"- },- "peerDependenciesMeta": {- "@types/react": {- "optional": true- },- "@types/react-dom": {- "optional": true- }- }- },- "node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-popper": {+ "node_modules/@radix-ui/react-popper": {"version": "1.1.3","resolved": "https://registry.npmjs.org/@radix-ui/react-popper/-/react-popper-1.1.3.tgz","integrity": "sha512-cKpopj/5RHZWjrbF2846jBNacjQVwkP068DfmgrNJXpvVWrOvlAmE9xSiy5OqeE+Gi8D9fP+oDhUnPqNMY8/5w==",@@ -7345,7 +6950,7 @@}}},- "node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-portal": {+ "node_modules/@radix-ui/react-portal": {"version": "1.0.4","resolved": "https://registry.npmjs.org/@radix-ui/react-portal/-/react-portal-1.0.4.tgz","integrity": "sha512-Qki+C/EuGUVCQTOTD5vzJzJuMUlewbzuKyUy+/iHM2uwGiru9gZeBJtHAPKAEkB5KWGi9mP/CHKcY0wt1aW45Q==",@@ -7368,22 +6973,14 @@}}},- "node_modules/@radix-ui/react-popper": {- "version": "1.1.2",- "resolved": "https://registry.npmjs.org/@radix-ui/react-popper/-/react-popper-1.1.2.tgz",- "integrity": "sha512-1CnGGfFi/bbqtJZZ0P/NQY20xdG3E0LALJaLUEoKwPLwl6PPPfbeiCqMVQnhoFRAxjJj4RpBRJzDmUgsex2tSg==",+ "node_modules/@radix-ui/react-presence": {+ "version": "1.0.1",+ "resolved": "https://registry.npmjs.org/@radix-ui/react-presence/-/react-presence-1.0.1.tgz",+ "integrity": "sha512-UXLW4UAbIY5ZjcvzjfRFo5gxva8QirC9hF7wRE4U5gz+TP0DbRk+//qyuAQ1McDxBt1xNMBTaciFGvEmJvAZCg==","dependencies": {"@babel/runtime": "^7.13.10",- "@floating-ui/react-dom": "^2.0.0",- "@radix-ui/react-arrow": "1.0.3","@radix-ui/react-compose-refs": "1.0.1",- "@radix-ui/react-context": "1.0.1",- "@radix-ui/react-primitive": "1.0.3",- "@radix-ui/react-use-callback-ref": "1.0.1",- "@radix-ui/react-use-layout-effect": "1.0.1",- "@radix-ui/react-use-rect": "1.0.1",- "@radix-ui/react-use-size": "1.0.1",- "@radix-ui/rect": "1.0.1"+ "@radix-ui/react-use-layout-effect": "1.0.1"},"peerDependencies": {"@types/react": "*",@@ -7400,13 +6997,13 @@}}},- "node_modules/@radix-ui/react-portal": {+ "node_modules/@radix-ui/react-primitive": {"version": "1.0.3",- "resolved": "https://registry.npmjs.org/@radix-ui/react-portal/-/react-portal-1.0.3.tgz",- "integrity": "sha512-xLYZeHrWoPmA5mEKEfZZevoVRK/Q43GfzRXkWV6qawIWWK8t6ifIiLQdd7rmQ4Vk1bmI21XhqF9BN3jWf+phpA==",+ "resolved": "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-1.0.3.tgz",+ "integrity": "sha512-yi58uVyoAcK/Nq1inRY56ZSjKypBNKTa/1mcL8qdl6oJeEaDbOldlzrGn7P6Q3Id5d+SYNGc5AJgc4vGhjs5+g==","dependencies": {"@babel/runtime": "^7.13.10",- "@radix-ui/react-primitive": "1.0.3"+ "@radix-ui/react-slot": "1.0.2"},"peerDependencies": {"@types/react": "*",@@ -7423,14 +7020,22 @@}}},- "node_modules/@radix-ui/react-presence": {- "version": "1.0.1",- "resolved": "https://registry.npmjs.org/@radix-ui/react-presence/-/react-presence-1.0.1.tgz",- "integrity": "sha512-UXLW4UAbIY5ZjcvzjfRFo5gxva8QirC9hF7wRE4U5gz+TP0DbRk+//qyuAQ1McDxBt1xNMBTaciFGvEmJvAZCg==",+ "node_modules/@radix-ui/react-radio-group": {+ "version": "1.1.3",+ "resolved": "https://registry.npmjs.org/@radix-ui/react-radio-group/-/react-radio-group-1.1.3.tgz",+ "integrity": "sha512-x+yELayyefNeKeTx4fjK6j99Fs6c4qKm3aY38G3swQVTN6xMpsrbigC0uHs2L//g8q4qR7qOcww8430jJmi2ag==","dependencies": {"@babel/runtime": "^7.13.10",+ "@radix-ui/primitive": "1.0.1","@radix-ui/react-compose-refs": "1.0.1",- "@radix-ui/react-use-layout-effect": "1.0.1"+ "@radix-ui/react-context": "1.0.1",+ "@radix-ui/react-direction": "1.0.1",+ "@radix-ui/react-presence": "1.0.1",+ "@radix-ui/react-primitive": "1.0.3",+ "@radix-ui/react-roving-focus": "1.0.4",+ "@radix-ui/react-use-controllable-state": "1.0.1",+ "@radix-ui/react-use-previous": "1.0.1",+ "@radix-ui/react-use-size": "1.0.1"},"peerDependencies": {"@types/react": "*",@@ -7447,13 +7052,21 @@}}},- "node_modules/@radix-ui/react-primitive": {- "version": "1.0.3",- "resolved": "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-1.0.3.tgz",- "integrity": "sha512-yi58uVyoAcK/Nq1inRY56ZSjKypBNKTa/1mcL8qdl6oJeEaDbOldlzrGn7P6Q3Id5d+SYNGc5AJgc4vGhjs5+g==",+ "node_modules/@radix-ui/react-roving-focus": {+ "version": "1.0.4",+ "resolved": "https://registry.npmjs.org/@radix-ui/react-roving-focus/-/react-roving-focus-1.0.4.tgz",+ "integrity": "sha512-2mUg5Mgcu001VkGy+FfzZyzbmuUWzgWkj3rvv4yu+mLw03+mTzbxZHvfcGyFp2b8EkQeMkpRQ5FiA2Vr2O6TeQ==","dependencies": {"@babel/runtime": "^7.13.10",- "@radix-ui/react-slot": "1.0.2"+ "@radix-ui/primitive": "1.0.1",+ "@radix-ui/react-collection": "1.0.3",+ "@radix-ui/react-compose-refs": "1.0.1",+ "@radix-ui/react-context": "1.0.1",+ "@radix-ui/react-direction": "1.0.1",+ "@radix-ui/react-id": "1.0.1",+ "@radix-ui/react-primitive": "1.0.3",+ "@radix-ui/react-use-callback-ref": "1.0.1",+ "@radix-ui/react-use-controllable-state": "1.0.1"},"peerDependencies": {"@types/react": "*",@@ -7470,21 +7083,33 @@}}},- "node_modules/@radix-ui/react-roving-focus": {- "version": "1.0.4",- "resolved": "https://registry.npmjs.org/@radix-ui/react-roving-focus/-/react-roving-focus-1.0.4.tgz",- "integrity": "sha512-2mUg5Mgcu001VkGy+FfzZyzbmuUWzgWkj3rvv4yu+mLw03+mTzbxZHvfcGyFp2b8EkQeMkpRQ5FiA2Vr2O6TeQ==",+ "node_modules/@radix-ui/react-select": {+ "version": "2.0.0",+ "resolved": "https://registry.npmjs.org/@radix-ui/react-select/-/react-select-2.0.0.tgz",+ "integrity": "sha512-RH5b7af4oHtkcHS7pG6Sgv5rk5Wxa7XI8W5gvB1N/yiuDGZxko1ynvOiVhFM7Cis2A8zxF9bTOUVbRDzPepe6w==","dependencies": {"@babel/runtime": "^7.13.10",+ "@radix-ui/number": "1.0.1","@radix-ui/primitive": "1.0.1","@radix-ui/react-collection": "1.0.3","@radix-ui/react-compose-refs": "1.0.1","@radix-ui/react-context": "1.0.1","@radix-ui/react-direction": "1.0.1",+ "@radix-ui/react-dismissable-layer": "1.0.5",+ "@radix-ui/react-focus-guards": "1.0.1",+ "@radix-ui/react-focus-scope": "1.0.4","@radix-ui/react-id": "1.0.1",+ "@radix-ui/react-popper": "1.1.3",+ "@radix-ui/react-portal": "1.0.4","@radix-ui/react-primitive": "1.0.3",+ "@radix-ui/react-slot": "1.0.2","@radix-ui/react-use-callback-ref": "1.0.1",- "@radix-ui/react-use-controllable-state": "1.0.1"+ "@radix-ui/react-use-controllable-state": "1.0.1",+ "@radix-ui/react-use-layout-effect": "1.0.1",+ "@radix-ui/react-use-previous": "1.0.1",+ "@radix-ui/react-visually-hidden": "1.0.3",+ "aria-hidden": "^1.1.1",+ "react-remove-scroll": "2.5.5"},"peerDependencies": {"@types/react": "*",@@ -7668,69 +7293,19 @@}}},- "node_modules/@radix-ui/react-toast/node_modules/@radix-ui/react-dismissable-layer": {- "version": "1.0.5",- "resolved": "https://registry.npmjs.org/@radix-ui/react-dismissable-layer/-/react-dismissable-layer-1.0.5.tgz",- "integrity": "sha512-aJeDjQhywg9LBu2t/At58hCvr7pEm0o2Ke1x33B+MhjNmmZ17sy4KImo0KPLgsnc/zN7GPdce8Cnn0SWvwZO7g==",- "dependencies": {- "@babel/runtime": "^7.13.10",- "@radix-ui/primitive": "1.0.1",- "@radix-ui/react-compose-refs": "1.0.1",- "@radix-ui/react-primitive": "1.0.3",- "@radix-ui/react-use-callback-ref": "1.0.1",- "@radix-ui/react-use-escape-keydown": "1.0.3"- },- "peerDependencies": {- "@types/react": "*",- "@types/react-dom": "*",- "react": "^16.8 || ^17.0 || ^18.0",- "react-dom": "^16.8 || ^17.0 || ^18.0"- },- "peerDependenciesMeta": {- "@types/react": {- "optional": true- },- "@types/react-dom": {- "optional": true- }- }- },- "node_modules/@radix-ui/react-toast/node_modules/@radix-ui/react-portal": {- "version": "1.0.4",- "resolved": "https://registry.npmjs.org/@radix-ui/react-portal/-/react-portal-1.0.4.tgz",- "integrity": "sha512-Qki+C/EuGUVCQTOTD5vzJzJuMUlewbzuKyUy+/iHM2uwGiru9gZeBJtHAPKAEkB5KWGi9mP/CHKcY0wt1aW45Q==",- "dependencies": {- "@babel/runtime": "^7.13.10",- "@radix-ui/react-primitive": "1.0.3"- },- "peerDependencies": {- "@types/react": "*",- "@types/react-dom": "*",- "react": "^16.8 || ^17.0 || ^18.0",- "react-dom": "^16.8 || ^17.0 || ^18.0"- },- "peerDependenciesMeta": {- "@types/react": {- "optional": true- },- "@types/react-dom": {- "optional": true- }- }- },"node_modules/@radix-ui/react-tooltip": {- "version": "1.0.6",- "resolved": "https://registry.npmjs.org/@radix-ui/react-tooltip/-/react-tooltip-1.0.6.tgz",- "integrity": "sha512-DmNFOiwEc2UDigsYj6clJENma58OelxD24O4IODoZ+3sQc3Zb+L8w1EP+y9laTuKCLAysPw4fD6/v0j4KNV8rg==",+ "version": "1.0.7",+ "resolved": "https://registry.npmjs.org/@radix-ui/react-tooltip/-/react-tooltip-1.0.7.tgz",+ "integrity": "sha512-lPh5iKNFVQ/jav/j6ZrWq3blfDJ0OH9R6FlNUHPMqdLuQ9vwDgFsRxvl8b7Asuy5c8xmoojHUxKHQSOAvMHxyw==","dependencies": {"@babel/runtime": "^7.13.10","@radix-ui/primitive": "1.0.1","@radix-ui/react-compose-refs": "1.0.1","@radix-ui/react-context": "1.0.1",- "@radix-ui/react-dismissable-layer": "1.0.4",+ "@radix-ui/react-dismissable-layer": "1.0.5","@radix-ui/react-id": "1.0.1",- "@radix-ui/react-popper": "1.1.2",- "@radix-ui/react-portal": "1.0.3",+ "@radix-ui/react-popper": "1.1.3",+ "@radix-ui/react-portal": "1.0.4","@radix-ui/react-presence": "1.0.1","@radix-ui/react-primitive": "1.0.3","@radix-ui/react-slot": "1.0.2",@@ -7933,9 +7508,9 @@"integrity": "sha512-/RVXdLvJxLg4QKvMoM5WlwNR9ViO9z8B/qPcc+C0Sa/teJY7QG7kJ441DwzOjMYEY7GmU4dj5EcGHIkKZiQZCA=="},"node_modules/@remix-run/router": {- "version": "1.9.0",- "resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.9.0.tgz",- "integrity": "sha512-bV63itrKBC0zdT27qYm6SDZHlkXwFL1xMBuhkn+X7l0+IIhNaH5wuuvZKp6eKhCD4KFhujhfhCT1YxXW6esUIA==",+ "version": "1.15.0",+ "resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.15.0.tgz",+ "integrity": "sha512-HOil5aFtme37dVQTB6M34G95kPM3MMuqSmIRVCC52eKV+Y/tGSqw9P3rWhlAx6A+mz+MoX+XxsGsNJbaI5qCgQ==","engines": {"node": ">=14.0.0"}@@ -7960,22 +7535,10 @@}}},- "node_modules/@rollup/plugin-alias/node_modules/slash": {- "version": "4.0.0",- "resolved": "https://registry.npmjs.org/slash/-/slash-4.0.0.tgz",- "integrity": "sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew==",- "dev": true,- "engines": {- "node": ">=12"- },- "funding": {- "url": "https://github.com/sponsors/sindresorhus"- }- },"node_modules/@rollup/plugin-commonjs": {- "version": "25.0.4",- "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-25.0.4.tgz",- "integrity": "sha512-L92Vz9WUZXDnlQQl3EwbypJR4+DM2EbsO+/KOcEkP4Mc6Ct453EeDB2uH9lgRwj4w5yflgNpq9pHOiY8aoUXBQ==",+ "version": "25.0.7",+ "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-25.0.7.tgz",+ "integrity": "sha512-nEvcR+LRjEjsaSsc4x3XZfCCvZIaSMenZu/OiwOKGN2UhQpAYI7ru7czFvyWbErlpoGjnSX3D5Ch5FcMA3kRWQ==","dev": true,"dependencies": {"@rollup/pluginutils": "^5.0.1",@@ -7983,13 +7546,13 @@"estree-walker": "^2.0.2","glob": "^8.0.3","is-reference": "1.2.1",- "magic-string": "^0.27.0"+ "magic-string": "^0.30.3"},"engines": {"node": ">=14.0.0"},"peerDependencies": {- "rollup": "^2.68.0||^3.0.0"+ "rollup": "^2.68.0||^3.0.0||^4.0.0"},"peerDependenciesMeta": {"rollup": {@@ -8019,18 +7582,6 @@}}},- "node_modules/@rollup/plugin-inject/node_modules/magic-string": {- "version": "0.30.5",- "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.5.tgz",- "integrity": "sha512-7xlpfBaQaP/T6Vh8MO/EqXSW5En6INHEvEXQiuff7Gku0PWjU3uf6w/j9o7O+SpB5fOAkrI5HeoNgwjEO0pFsA==",- "dev": true,- "dependencies": {- "@jridgewell/sourcemap-codec": "^1.4.15"- },- "engines": {- "node": ">=12"- }- },"node_modules/@rollup/plugin-json": {"version": "6.1.0","resolved": "https://registry.npmjs.org/@rollup/plugin-json/-/plugin-json-6.1.0.tgz",@@ -8052,9 +7603,9 @@}},"node_modules/@rollup/plugin-node-resolve": {- "version": "15.2.1",- "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-15.2.1.tgz",- "integrity": "sha512-nsbUg588+GDSu8/NS8T4UAshO6xeaOfINNuXeVHcKV02LJtoRaM1SiOacClw4kws1SFiNhdLGxlbMY9ga/zs/w==",+ "version": "15.2.3",+ "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-15.2.3.tgz",+ "integrity": "sha512-j/lym8nf5E21LwBT4Df1VD6hRO2L2iwUeUmP7litikRsVp1H6NWx20NEp0Y7su+7XGc476GnXXc4kFeZNGmaSQ==","dev": true,"dependencies": {"@rollup/pluginutils": "^5.0.1",@@ -8068,7 +7619,7 @@"node": ">=14.0.0"},"peerDependencies": {- "rollup": "^2.78.0||^3.0.0"+ "rollup": "^2.78.0||^3.0.0||^4.0.0"},"peerDependenciesMeta": {"rollup": {@@ -8097,18 +7648,6 @@}}},- "node_modules/@rollup/plugin-replace/node_modules/magic-string": {- "version": "0.30.5",- "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.5.tgz",- "integrity": "sha512-7xlpfBaQaP/T6Vh8MO/EqXSW5En6INHEvEXQiuff7Gku0PWjU3uf6w/j9o7O+SpB5fOAkrI5HeoNgwjEO0pFsA==",- "dev": true,- "dependencies": {- "@jridgewell/sourcemap-codec": "^1.4.15"- },- "engines": {- "node": ">=12"- }- },"node_modules/@rollup/plugin-terser": {"version": "0.4.4","resolved": "https://registry.npmjs.org/@rollup/plugin-terser/-/plugin-terser-0.4.4.tgz",@@ -8154,9 +7693,9 @@}},"node_modules/@rollup/rollup-android-arm-eabi": {- "version": "4.8.0",- "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.8.0.tgz",- "integrity": "sha512-zdTObFRoNENrdPpnTNnhOljYIcOX7aI7+7wyrSpPFFIOf/nRdedE6IYsjaBE7tjukphh1tMTojgJ7p3lKY8x6Q==",+ "version": "4.9.6",+ "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.9.6.tgz",+ "integrity": "sha512-MVNXSSYN6QXOulbHpLMKYi60ppyO13W9my1qogeiAqtjb2yR4LSmfU2+POvDkLzhjYLXz9Rf9+9a3zFHW1Lecg==","cpu": ["arm"],@@ -8167,9 +7706,9 @@]},"node_modules/@rollup/rollup-android-arm64": {- "version": "4.8.0",- "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.8.0.tgz",- "integrity": "sha512-aiItwP48BiGpMFS9Znjo/xCNQVwTQVcRKkFKsO81m8exrGjHkCBDvm9PHay2kpa8RPnZzzKcD1iQ9KaLY4fPQQ==",+ "version": "4.9.6",+ "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.9.6.tgz",+ "integrity": "sha512-T14aNLpqJ5wzKNf5jEDpv5zgyIqcpn1MlwCrUXLrwoADr2RkWA0vOWP4XxbO9aiO3dvMCQICZdKeDrFl7UMClw==","cpu": ["arm64"],@@ -8180,9 +7719,9 @@]},"node_modules/@rollup/rollup-darwin-arm64": {- "version": "4.8.0",- "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.8.0.tgz",- "integrity": "sha512-zhNIS+L4ZYkYQUjIQUR6Zl0RXhbbA0huvNIWjmPc2SL0cB1h5Djkcy+RZ3/Bwszfb6vgwUvcVJYD6e6Zkpsi8g==",+ "version": "4.9.6",+ "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.9.6.tgz",+ "integrity": "sha512-CqNNAyhRkTbo8VVZ5R85X73H3R5NX9ONnKbXuHisGWC0qRbTTxnF1U4V9NafzJbgGM0sHZpdO83pLPzq8uOZFw==","cpu": ["arm64"],@@ -8193,9 +7732,9 @@]},"node_modules/@rollup/rollup-darwin-x64": {- "version": "4.8.0",- "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.8.0.tgz",- "integrity": "sha512-A/FAHFRNQYrELrb/JHncRWzTTXB2ticiRFztP4ggIUAfa9Up1qfW8aG2w/mN9jNiZ+HB0t0u0jpJgFXG6BfRTA==",+ "version": "4.9.6",+ "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.9.6.tgz",+ "integrity": "sha512-zRDtdJuRvA1dc9Mp6BWYqAsU5oeLixdfUvkTHuiYOHwqYuQ4YgSmi6+/lPvSsqc/I0Omw3DdICx4Tfacdzmhog==","cpu": ["x64"],@@ -8206,9 +7745,9 @@]},"node_modules/@rollup/rollup-linux-arm-gnueabihf": {- "version": "4.8.0",- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.8.0.tgz",- "integrity": "sha512-JsidBnh3p2IJJA4/2xOF2puAYqbaczB3elZDT0qHxn362EIoIkq7hrR43Xa8RisgI6/WPfvb2umbGsuvf7E37A==",+ "version": "4.9.6",+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.9.6.tgz",+ "integrity": "sha512-oNk8YXDDnNyG4qlNb6is1ojTOGL/tRhbbKeE/YuccItzerEZT68Z9gHrY3ROh7axDc974+zYAPxK5SH0j/G+QQ==","cpu": ["arm"],@@ -8219,9 +7758,9 @@]},"node_modules/@rollup/rollup-linux-arm64-gnu": {- "version": "4.8.0",- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.8.0.tgz",- "integrity": "sha512-hBNCnqw3EVCkaPB0Oqd24bv8SklETptQWcJz06kb9OtiShn9jK1VuTgi7o4zPSt6rNGWQOTDEAccbk0OqJmS+g==",+ "version": "4.9.6",+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.9.6.tgz",+ "integrity": "sha512-Z3O60yxPtuCYobrtzjo0wlmvDdx2qZfeAWTyfOjEDqd08kthDKexLpV97KfAeUXPosENKd8uyJMRDfFMxcYkDQ==","cpu": ["arm64"],@@ -8232,9 +7771,9 @@]},"node_modules/@rollup/rollup-linux-arm64-musl": {- "version": "4.8.0",- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.8.0.tgz",- "integrity": "sha512-Fw9ChYfJPdltvi9ALJ9wzdCdxGw4wtq4t1qY028b2O7GwB5qLNSGtqMsAel1lfWTZvf4b6/+4HKp0GlSYg0ahA==",+ "version": "4.9.6",+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.9.6.tgz",+ "integrity": "sha512-gpiG0qQJNdYEVad+1iAsGAbgAnZ8j07FapmnIAQgODKcOTjLEWM9sRb+MbQyVsYCnA0Im6M6QIq6ax7liws6eQ==","cpu": ["arm64"],@@ -8245,9 +7784,9 @@]},"node_modules/@rollup/rollup-linux-riscv64-gnu": {- "version": "4.8.0",- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.8.0.tgz",- "integrity": "sha512-BH5xIh7tOzS9yBi8dFrCTG8Z6iNIGWGltd3IpTSKp6+pNWWO6qy8eKoRxOtwFbMrid5NZaidLYN6rHh9aB8bEw==",+ "version": "4.9.6",+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.9.6.tgz",+ "integrity": "sha512-+uCOcvVmFUYvVDr27aiyun9WgZk0tXe7ThuzoUTAukZJOwS5MrGbmSlNOhx1j80GdpqbOty05XqSl5w4dQvcOA==","cpu": ["riscv64"],@@ -8258,9 +7797,9 @@]},"node_modules/@rollup/rollup-linux-x64-gnu": {- "version": "4.8.0",- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.8.0.tgz",- "integrity": "sha512-PmvAj8k6EuWiyLbkNpd6BLv5XeYFpqWuRvRNRl80xVfpGXK/z6KYXmAgbI4ogz7uFiJxCnYcqyvZVD0dgFog7Q==",+ "version": "4.9.6",+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.9.6.tgz",+ "integrity": "sha512-HUNqM32dGzfBKuaDUBqFB7tP6VMN74eLZ33Q9Y1TBqRDn+qDonkAUyKWwF9BR9unV7QUzffLnz9GrnKvMqC/fw==","cpu": ["x64"],@@ -8271,9 +7810,9 @@]},"node_modules/@rollup/rollup-linux-x64-musl": {- "version": "4.8.0",- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.8.0.tgz",- "integrity": "sha512-mdxnlW2QUzXwY+95TuxZ+CurrhgrPAMveDWI97EQlA9bfhR8tw3Pt7SUlc/eSlCNxlWktpmT//EAA8UfCHOyXg==",+ "version": "4.9.6",+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.9.6.tgz",+ "integrity": "sha512-ch7M+9Tr5R4FK40FHQk8VnML0Szi2KRujUgHXd/HjuH9ifH72GUmw6lStZBo3c3GB82vHa0ZoUfjfcM7JiiMrQ==","cpu": ["x64"],@@ -8284,9 +7823,9 @@]},"node_modules/@rollup/rollup-win32-arm64-msvc": {- "version": "4.8.0",- "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.8.0.tgz",- "integrity": "sha512-ge7saUz38aesM4MA7Cad8CHo0Fyd1+qTaqoIo+Jtk+ipBi4ATSrHWov9/S4u5pbEQmLjgUjB7BJt+MiKG2kzmA==",+ "version": "4.9.6",+ "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.9.6.tgz",+ "integrity": "sha512-VD6qnR99dhmTQ1mJhIzXsRcTBvTjbfbGGwKAHcu+52cVl15AC/kplkhxzW/uT0Xl62Y/meBKDZvoJSJN+vTeGA==","cpu": ["arm64"],@@ -8297,9 +7836,9 @@]},"node_modules/@rollup/rollup-win32-ia32-msvc": {- "version": "4.8.0",- "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.8.0.tgz",- "integrity": "sha512-p9E3PZlzurhlsN5h9g7zIP1DnqKXJe8ZUkFwAazqSvHuWfihlIISPxG9hCHCoA+dOOspL/c7ty1eeEVFTE0UTw==",+ "version": "4.9.6",+ "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.9.6.tgz",+ "integrity": "sha512-J9AFDq/xiRI58eR2NIDfyVmTYGyIZmRcvcAoJ48oDld/NTR8wyiPUu2X/v1navJ+N/FGg68LEbX3Ejd6l8B7MQ==","cpu": ["ia32"],@@ -8310,9 +7849,9 @@]},"node_modules/@rollup/rollup-win32-x64-msvc": {- "version": "4.8.0",- "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.8.0.tgz",- "integrity": "sha512-kb4/auKXkYKqlUYTE8s40FcJIj5soOyRLHKd4ugR0dCq0G2EfcF54eYcfQiGkHzjidZ40daB4ulsFdtqNKZtBg==",+ "version": "4.9.6",+ "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.9.6.tgz",+ "integrity": "sha512-jqzNLhNDvIZOrt69Ce4UjGRpXJBzhUBzawMwnaDAwyHriki3XollsewxWzOzz+4yOFDkuJHtTsZFwMxhYJWmLQ==","cpu": ["x64"],@@ -8329,9 +7868,9 @@"dev": true},"node_modules/@sinonjs/commons": {- "version": "3.0.0",- "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.0.tgz",- "integrity": "sha512-jXBtWAF4vmdNmZgD5FoKsVLv3rPgDnLgPbU84LIJ3otV44vJlDRokVng5v8NFJdCf/da9legHcKaRuZs4L7faA==",+ "version": "3.0.1",+ "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.1.tgz",+ "integrity": "sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ==","dev": true,"dependencies": {"type-detect": "4.0.8"@@ -8347,12 +7886,12 @@}},"node_modules/@smithy/abort-controller": {- "version": "2.0.7",- "resolved": "https://registry.npmjs.org/@smithy/abort-controller/-/abort-controller-2.0.7.tgz",- "integrity": "sha512-rITz65zk8QA3GQ1OeoJ3/Q4+8j/HqubWU8TBqk57BMYTOX+P+LNMoVHPqzLHhE6qKot5muhThNCYvOKNt7ojJA==",+ "version": "2.1.1",+ "resolved": "https://registry.npmjs.org/@smithy/abort-controller/-/abort-controller-2.1.1.tgz",+ "integrity": "sha512-1+qdrUqLhaALYL0iOcN43EP6yAXXQ2wWZ6taf4S2pNGowmOc5gx+iMQv+E42JizNJjB0+gEadOXeV1Bf7JWL1Q==","optional": true,"dependencies": {- "@smithy/types": "^2.3.1",+ "@smithy/types": "^2.9.1","tslib": "^2.5.0"},"engines": {@@ -8360,15 +7899,34 @@}},"node_modules/@smithy/config-resolver": {- "version": "2.0.8",- "resolved": "https://registry.npmjs.org/@smithy/config-resolver/-/config-resolver-2.0.8.tgz",- "integrity": "sha512-e7mwQteHjo9S1GK+TfzP3o7ujE2ZK30d6wkv5brKtabrZF7MBflj9CwUP2XYuOYebdWirHOtv8ZfkMrpcbJfYw==",+ "version": "2.1.1",+ "resolved": "https://registry.npmjs.org/@smithy/config-resolver/-/config-resolver-2.1.1.tgz",+ "integrity": "sha512-lxfLDpZm+AWAHPFZps5JfDoO9Ux1764fOgvRUBpHIO8HWHcSN1dkgsago1qLRVgm1BZ8RCm8cgv99QvtaOWIhw==",+ "optional": true,+ "dependencies": {+ "@smithy/node-config-provider": "^2.2.1",+ "@smithy/types": "^2.9.1",+ "@smithy/util-config-provider": "^2.2.1",+ "@smithy/util-middleware": "^2.1.1",+ "tslib": "^2.5.0"+ },+ "engines": {+ "node": ">=14.0.0"+ }+ },+ "node_modules/@smithy/core": {+ "version": "1.3.1",+ "resolved": "https://registry.npmjs.org/@smithy/core/-/core-1.3.1.tgz",+ "integrity": "sha512-tf+NIu9FkOh312b6M9G4D68is4Xr7qptzaZGZUREELF8ysE1yLKphqt7nsomjKZVwW7WE5pDDex9idowNGRQ/Q==","optional": true,"dependencies": {- "@smithy/node-config-provider": "^2.0.10",- "@smithy/types": "^2.3.1",- "@smithy/util-config-provider": "^2.0.0",- "@smithy/util-middleware": "^2.0.0",+ "@smithy/middleware-endpoint": "^2.4.1",+ "@smithy/middleware-retry": "^2.1.1",+ "@smithy/middleware-serde": "^2.1.1",+ "@smithy/protocol-http": "^3.1.1",+ "@smithy/smithy-client": "^2.3.1",+ "@smithy/types": "^2.9.1",+ "@smithy/util-middleware": "^2.1.1","tslib": "^2.5.0"},"engines": {@@ -8376,15 +7934,15 @@}},"node_modules/@smithy/credential-provider-imds": {- "version": "2.0.10",- "resolved": "https://registry.npmjs.org/@smithy/credential-provider-imds/-/credential-provider-imds-2.0.10.tgz",- "integrity": "sha512-may2/gYlDip2rjlU1Z5fcCEWY0Fu3tSu/HykgZrLfb2/171P6OYuz7dGNKBOCS1W57vP4W5wmUhm0WGehrixig==",+ "version": "2.2.1",+ "resolved": "https://registry.npmjs.org/@smithy/credential-provider-imds/-/credential-provider-imds-2.2.1.tgz",+ "integrity": "sha512-7XHjZUxmZYnONheVQL7j5zvZXga+EWNgwEAP6OPZTi7l8J4JTeNh9aIOfE5fKHZ/ee2IeNOh54ZrSna+Vc6TFA==","optional": true,"dependencies": {- "@smithy/node-config-provider": "^2.0.10",- "@smithy/property-provider": "^2.0.8",- "@smithy/types": "^2.3.1",- "@smithy/url-parser": "^2.0.7",+ "@smithy/node-config-provider": "^2.2.1",+ "@smithy/property-provider": "^2.1.1",+ "@smithy/types": "^2.9.1",+ "@smithy/url-parser": "^2.1.1","tslib": "^2.5.0"},"engines": {@@ -8392,39 +7950,39 @@}},"node_modules/@smithy/eventstream-codec": {- "version": "2.0.12",- "resolved": "https://registry.npmjs.org/@smithy/eventstream-codec/-/eventstream-codec-2.0.12.tgz",- "integrity": "sha512-ZZQLzHBJkbiAAdj2C5K+lBlYp/XJ+eH2uy+jgJgYIFW/o5AM59Hlj7zyI44/ZTDIQWmBxb3EFv/c5t44V8/g8A==",+ "version": "2.1.1",+ "resolved": "https://registry.npmjs.org/@smithy/eventstream-codec/-/eventstream-codec-2.1.1.tgz",+ "integrity": "sha512-E8KYBxBIuU4c+zrpR22VsVrOPoEDzk35bQR3E+xm4k6Pa6JqzkDOdMyf9Atac5GPNKHJBdVaQ4JtjdWX2rl/nw==","optional": true,"dependencies": {"@aws-crypto/crc32": "3.0.0",- "@smithy/types": "^2.4.0",- "@smithy/util-hex-encoding": "^2.0.0",+ "@smithy/types": "^2.9.1",+ "@smithy/util-hex-encoding": "^2.1.1","tslib": "^2.5.0"}},"node_modules/@smithy/fetch-http-handler": {- "version": "2.1.3",- "resolved": "https://registry.npmjs.org/@smithy/fetch-http-handler/-/fetch-http-handler-2.1.3.tgz",- "integrity": "sha512-kUg+Ey4mJeR/3+Ponuhb1rsmsfZRwjCLvC+WcPgeI+ittretEzuWAPN+9anD0HJEoApVjHpndzxPtlncbCUJDQ==",+ "version": "2.4.1",+ "resolved": "https://registry.npmjs.org/@smithy/fetch-http-handler/-/fetch-http-handler-2.4.1.tgz",+ "integrity": "sha512-VYGLinPsFqH68lxfRhjQaSkjXM7JysUOJDTNjHBuN/ykyRb2f1gyavN9+VhhPTWCy32L4yZ2fdhpCs/nStEicg==","optional": true,"dependencies": {- "@smithy/protocol-http": "^3.0.3",- "@smithy/querystring-builder": "^2.0.7",- "@smithy/types": "^2.3.1",- "@smithy/util-base64": "^2.0.0",+ "@smithy/protocol-http": "^3.1.1",+ "@smithy/querystring-builder": "^2.1.1",+ "@smithy/types": "^2.9.1",+ "@smithy/util-base64": "^2.1.1","tslib": "^2.5.0"}},"node_modules/@smithy/hash-node": {- "version": "2.0.7",- "resolved": "https://registry.npmjs.org/@smithy/hash-node/-/hash-node-2.0.7.tgz",- "integrity": "sha512-aB5lvIDP1v+ZUUS8ek3XW5xnZ6jUQ86JXqG7a5jMP6AbjAc3439mIbs6+f1EQ5MtYmrQCEtRRyvv5QofvotH0w==",+ "version": "2.1.1",+ "resolved": "https://registry.npmjs.org/@smithy/hash-node/-/hash-node-2.1.1.tgz",+ "integrity": "sha512-Qhoq0N8f2OtCnvUpCf+g1vSyhYQrZjhSwvJ9qvR8BUGOtTXiyv2x1OD2e6jVGmlpC4E4ax1USHoyGfV9JFsACg==","optional": true,"dependencies": {- "@smithy/types": "^2.3.1",- "@smithy/util-buffer-from": "^2.0.0",- "@smithy/util-utf8": "^2.0.0",+ "@smithy/types": "^2.9.1",+ "@smithy/util-buffer-from": "^2.1.1",+ "@smithy/util-utf8": "^2.1.1","tslib": "^2.5.0"},"engines": {@@ -8432,19 +7990,19 @@}},"node_modules/@smithy/invalid-dependency": {- "version": "2.0.7",- "resolved": "https://registry.npmjs.org/@smithy/invalid-dependency/-/invalid-dependency-2.0.7.tgz",- "integrity": "sha512-qVOZnHFPzQo4BS47/PANHX32Y69c0tJxKBkqTL795D/DKInqBwmBO/m1gS7v0ZQqmtCuoy2l87RflQfRY2xEIw==",+ "version": "2.1.1",+ "resolved": "https://registry.npmjs.org/@smithy/invalid-dependency/-/invalid-dependency-2.1.1.tgz",+ "integrity": "sha512-7WTgnKw+VPg8fxu2v9AlNOQ5yaz6RA54zOVB4f6vQuR0xFKd+RzlCpt0WidYTsye7F+FYDIaS/RnJW4pxjNInw==","optional": true,"dependencies": {- "@smithy/types": "^2.3.1",+ "@smithy/types": "^2.9.1","tslib": "^2.5.0"}},"node_modules/@smithy/is-array-buffer": {- "version": "2.0.0",- "resolved": "https://registry.npmjs.org/@smithy/is-array-buffer/-/is-array-buffer-2.0.0.tgz",- "integrity": "sha512-z3PjFjMyZNI98JFRJi/U0nGoLWMSJlDjAW4QUX2WNZLas5C0CmVV6LJ01JI0k90l7FvpmixjWxPFmENSClQ7ug==",+ "version": "2.1.1",+ "resolved": "https://registry.npmjs.org/@smithy/is-array-buffer/-/is-array-buffer-2.1.1.tgz",+ "integrity": "sha512-xozSQrcUinPpNPNPds4S7z/FakDTh1MZWtRP/2vQtYB/u3HYrX2UXuZs+VhaKBd6Vc7g2XPr2ZtwGBNDN6fNKQ==","optional": true,"dependencies": {"tslib": "^2.5.0"@@ -8454,13 +8012,13 @@}},"node_modules/@smithy/middleware-content-length": {- "version": "2.0.9",- "resolved": "https://registry.npmjs.org/@smithy/middleware-content-length/-/middleware-content-length-2.0.9.tgz",- "integrity": "sha512-2XVFsGqswxrIBi0w4Njwzb1zsbte26U513K+WPFm9z6SB/3WR5/VBVjTaTcamrXznTAqBjTwTL0Ysisv1dW0Rw==",+ "version": "2.1.1",+ "resolved": "https://registry.npmjs.org/@smithy/middleware-content-length/-/middleware-content-length-2.1.1.tgz",+ "integrity": "sha512-rSr9ezUl9qMgiJR0UVtVOGEZElMdGFyl8FzWEF5iEKTlcWxGr2wTqGfDwtH3LAB7h+FPkxqv4ZU4cpuCN9Kf/g==","optional": true,"dependencies": {- "@smithy/protocol-http": "^3.0.3",- "@smithy/types": "^2.3.1",+ "@smithy/protocol-http": "^3.1.1",+ "@smithy/types": "^2.9.1","tslib": "^2.5.0"},"engines": {@@ -8468,15 +8026,17 @@}},"node_modules/@smithy/middleware-endpoint": {- "version": "2.0.7",- "resolved": "https://registry.npmjs.org/@smithy/middleware-endpoint/-/middleware-endpoint-2.0.7.tgz",- "integrity": "sha512-4/L0wV7PzHEprJB0gazSTIwlW/2cCfwC9EHavUMhoCyl1tLer6CJwDbAMit1IMvwbHkwuKopueb8dFPHfpS2Pw==",+ "version": "2.4.1",+ "resolved": "https://registry.npmjs.org/@smithy/middleware-endpoint/-/middleware-endpoint-2.4.1.tgz",+ "integrity": "sha512-XPZTb1E2Oav60Ven3n2PFx+rX9EDsU/jSTA8VDamt7FXks67ekjPY/XrmmPDQaFJOTUHJNKjd8+kZxVO5Ael4Q==","optional": true,"dependencies": {- "@smithy/middleware-serde": "^2.0.7",- "@smithy/types": "^2.3.1",- "@smithy/url-parser": "^2.0.7",- "@smithy/util-middleware": "^2.0.0",+ "@smithy/middleware-serde": "^2.1.1",+ "@smithy/node-config-provider": "^2.2.1",+ "@smithy/shared-ini-file-loader": "^2.3.1",+ "@smithy/types": "^2.9.1",+ "@smithy/url-parser": "^2.1.1",+ "@smithy/util-middleware": "^2.1.1","tslib": "^2.5.0"},"engines": {@@ -8484,17 +8044,18 @@}},"node_modules/@smithy/middleware-retry": {- "version": "2.0.10",- "resolved": "https://registry.npmjs.org/@smithy/middleware-retry/-/middleware-retry-2.0.10.tgz",- "integrity": "sha512-VwAQOR5Rh/y9BzUgb5DzUk7qYBiMZu3pEQa5EwwAf/F7lpMuNildGrAxtDmsXk90490FJwa6LyFknXP3kO5BnA==",+ "version": "2.1.1",+ "resolved": "https://registry.npmjs.org/@smithy/middleware-retry/-/middleware-retry-2.1.1.tgz",+ "integrity": "sha512-eMIHOBTXro6JZ+WWzZWd/8fS8ht5nS5KDQjzhNMHNRcG5FkNTqcKpYhw7TETMYzbLfhO5FYghHy1vqDWM4FLDA==","optional": true,"dependencies": {- "@smithy/node-config-provider": "^2.0.10",- "@smithy/protocol-http": "^3.0.3",- "@smithy/service-error-classification": "^2.0.0",- "@smithy/types": "^2.3.1",- "@smithy/util-middleware": "^2.0.0",- "@smithy/util-retry": "^2.0.0",+ "@smithy/node-config-provider": "^2.2.1",+ "@smithy/protocol-http": "^3.1.1",+ "@smithy/service-error-classification": "^2.1.1",+ "@smithy/smithy-client": "^2.3.1",+ "@smithy/types": "^2.9.1",+ "@smithy/util-middleware": "^2.1.1",+ "@smithy/util-retry": "^2.1.1","tslib": "^2.5.0","uuid": "^8.3.2"},@@ -8502,13 +8063,22 @@"node": ">=14.0.0"}},+ "node_modules/@smithy/middleware-retry/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==",+ "optional": true,+ "bin": {+ "uuid": "dist/bin/uuid"+ }+ },"node_modules/@smithy/middleware-serde": {- "version": "2.0.7",- "resolved": "https://registry.npmjs.org/@smithy/middleware-serde/-/middleware-serde-2.0.7.tgz",- "integrity": "sha512-tOldis4PUNafdGErLZ+33p9Pf3MmTlLa176X321Z6ZaCf1XNEow9m3T5vXrcHErVAvjPG0mp3l54J94HnPc+rQ==",+ "version": "2.1.1",+ "resolved": "https://registry.npmjs.org/@smithy/middleware-serde/-/middleware-serde-2.1.1.tgz",+ "integrity": "sha512-D8Gq0aQBeE1pxf3cjWVkRr2W54t+cdM2zx78tNrVhqrDykRA7asq8yVJij1u5NDtKzKqzBSPYh7iW0svUKg76g==","optional": true,"dependencies": {- "@smithy/types": "^2.3.1",+ "@smithy/types": "^2.9.1","tslib": "^2.5.0"},"engines": {@@ -8516,11 +8086,12 @@}},"node_modules/@smithy/middleware-stack": {- "version": "2.0.0",- "resolved": "https://registry.npmjs.org/@smithy/middleware-stack/-/middleware-stack-2.0.0.tgz",- "integrity": "sha512-31XC1xNF65nlbc16yuh3wwTudmqs6qy4EseQUGF8A/p2m/5wdd/cnXJqpniy/XvXVwkHPz/GwV36HqzHtIKATQ==",+ "version": "2.1.1",+ "resolved": "https://registry.npmjs.org/@smithy/middleware-stack/-/middleware-stack-2.1.1.tgz",+ "integrity": "sha512-KPJhRlhsl8CjgGXK/DoDcrFGfAqoqvuwlbxy+uOO4g2Azn1dhH+GVfC3RAp+6PoL5PWPb+vt6Z23FP+Mr6qeCw==","optional": true,"dependencies": {+ "@smithy/types": "^2.9.1","tslib": "^2.5.0"},"engines": {@@ -8528,14 +8099,14 @@}},"node_modules/@smithy/node-config-provider": {- "version": "2.0.10",- "resolved": "https://registry.npmjs.org/@smithy/node-config-provider/-/node-config-provider-2.0.10.tgz",- "integrity": "sha512-e5MiLH5Eu+BbYsmhZIkvUKCzite6JCBPL75PNjlRK2TWvSpfp19hNf2SiJIQbPalcFj5zlyBvtcEkF1sfYIdhg==",+ "version": "2.2.1",+ "resolved": "https://registry.npmjs.org/@smithy/node-config-provider/-/node-config-provider-2.2.1.tgz",+ "integrity": "sha512-epzK3x1xNxA9oJgHQ5nz+2j6DsJKdHfieb+YgJ7ATWxzNcB7Hc+Uya2TUck5MicOPhDV8HZImND7ZOecVr+OWg==","optional": true,"dependencies": {- "@smithy/property-provider": "^2.0.8",- "@smithy/shared-ini-file-loader": "^2.0.9",- "@smithy/types": "^2.3.1",+ "@smithy/property-provider": "^2.1.1",+ "@smithy/shared-ini-file-loader": "^2.3.1",+ "@smithy/types": "^2.9.1","tslib": "^2.5.0"},"engines": {@@ -8543,15 +8114,15 @@}},"node_modules/@smithy/node-http-handler": {- "version": "2.1.3",- "resolved": "https://registry.npmjs.org/@smithy/node-http-handler/-/node-http-handler-2.1.3.tgz",- "integrity": "sha512-TGkgpx68SqvbspVHaG3iwqP2mKYOT4whiq7Kv2X9v+InngL4MkpH3LQ0Dk7kbloahZr+hAOyb6s8D7T8TXRrzA==",+ "version": "2.3.1",+ "resolved": "https://registry.npmjs.org/@smithy/node-http-handler/-/node-http-handler-2.3.1.tgz",+ "integrity": "sha512-gLA8qK2nL9J0Rk/WEZSvgin4AppvuCYRYg61dcUo/uKxvMZsMInL5I5ZdJTogOvdfVug3N2dgI5ffcUfS4S9PA==","optional": true,"dependencies": {- "@smithy/abort-controller": "^2.0.7",- "@smithy/protocol-http": "^3.0.3",- "@smithy/querystring-builder": "^2.0.7",- "@smithy/types": "^2.3.1",+ "@smithy/abort-controller": "^2.1.1",+ "@smithy/protocol-http": "^3.1.1",+ "@smithy/querystring-builder": "^2.1.1",+ "@smithy/types": "^2.9.1","tslib": "^2.5.0"},"engines": {@@ -8559,12 +8130,12 @@}},"node_modules/@smithy/property-provider": {- "version": "2.0.8",- "resolved": "https://registry.npmjs.org/@smithy/property-provider/-/property-provider-2.0.8.tgz",- "integrity": "sha512-oaaP/i7bGG8XbxG9Kx4PZh83iJ2jo/vt8RmJdi9hmc8APBaW1HGDperVXDCyPQdVYXmiqrtxc/rPImyBma1G3A==",+ "version": "2.1.1",+ "resolved": "https://registry.npmjs.org/@smithy/property-provider/-/property-provider-2.1.1.tgz",+ "integrity": "sha512-FX7JhhD/o5HwSwg6GLK9zxrMUrGnb3PzNBrcthqHKBc3dH0UfgEAU24xnJ8F0uow5mj17UeBEOI6o3CF2k7Mhw==","optional": true,"dependencies": {- "@smithy/types": "^2.3.1",+ "@smithy/types": "^2.9.1","tslib": "^2.5.0"},"engines": {@@ -8572,12 +8143,12 @@}},"node_modules/@smithy/protocol-http": {- "version": "3.0.8",- "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-3.0.8.tgz",- "integrity": "sha512-SHJvYeWq8q0FK8xHk+xjV9dzDUDjFMT+G1pZbV+XB6OVoac/FSVshlMNPeUJ8AmSkcDKHRu5vASnRqZHgD3qhw==",+ "version": "3.1.1",+ "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-3.1.1.tgz",+ "integrity": "sha512-6ZRTSsaXuSL9++qEwH851hJjUA0OgXdQFCs+VDw4tGH256jQ3TjYY/i34N4vd24RV3nrjNsgd1yhb57uMoKbzQ==","optional": true,"dependencies": {- "@smithy/types": "^2.4.0",+ "@smithy/types": "^2.9.1","tslib": "^2.5.0"},"engines": {@@ -8585,13 +8156,13 @@}},"node_modules/@smithy/querystring-builder": {- "version": "2.0.7",- "resolved": "https://registry.npmjs.org/@smithy/querystring-builder/-/querystring-builder-2.0.7.tgz",- "integrity": "sha512-RPHnqt4iH1Kwp1Zbf4gJI88hZiynEZjE5hEWJNBmKqCe1Q6v7HBLtaovTaiuYaMEmPyb2KxOi3lISAdT6uuPqw==",+ "version": "2.1.1",+ "resolved": "https://registry.npmjs.org/@smithy/querystring-builder/-/querystring-builder-2.1.1.tgz",+ "integrity": "sha512-C/ko/CeEa8jdYE4gt6nHO5XDrlSJ3vdCG0ZAc6nD5ZIE7LBp0jCx4qoqp7eoutBu7VrGMXERSRoPqwi1WjCPbg==","optional": true,"dependencies": {- "@smithy/types": "^2.3.1",- "@smithy/util-uri-escape": "^2.0.0",+ "@smithy/types": "^2.9.1",+ "@smithy/util-uri-escape": "^2.1.1","tslib": "^2.5.0"},"engines": {@@ -8599,12 +8170,12 @@}},"node_modules/@smithy/querystring-parser": {- "version": "2.0.7",- "resolved": "https://registry.npmjs.org/@smithy/querystring-parser/-/querystring-parser-2.0.7.tgz",- "integrity": "sha512-Cwi/Hgs73nbLKfgH7dXAxzvDxyTrK+BLrlAd0KXU7xcBR94V132nvxoq39BMWckYAPmnMwxCwq8uusNH4Dnagw==",+ "version": "2.1.1",+ "resolved": "https://registry.npmjs.org/@smithy/querystring-parser/-/querystring-parser-2.1.1.tgz",+ "integrity": "sha512-H4+6jKGVhG1W4CIxfBaSsbm98lOO88tpDWmZLgkJpt8Zkk/+uG0FmmqMuCAc3HNM2ZDV+JbErxr0l5BcuIf/XQ==","optional": true,"dependencies": {- "@smithy/types": "^2.3.1",+ "@smithy/types": "^2.9.1","tslib": "^2.5.0"},"engines": {@@ -8612,21 +8183,24 @@}},"node_modules/@smithy/service-error-classification": {- "version": "2.0.0",- "resolved": "https://registry.npmjs.org/@smithy/service-error-classification/-/service-error-classification-2.0.0.tgz",- "integrity": "sha512-2z5Nafy1O0cTf69wKyNjGW/sNVMiqDnb4jgwfMG8ye8KnFJ5qmJpDccwIbJNhXIfbsxTg9SEec2oe1cexhMJvw==",+ "version": "2.1.1",+ "resolved": "https://registry.npmjs.org/@smithy/service-error-classification/-/service-error-classification-2.1.1.tgz",+ "integrity": "sha512-txEdZxPUgM1PwGvDvHzqhXisrc5LlRWYCf2yyHfvITWioAKat7srQvpjMAvgzf0t6t7j8yHrryXU9xt7RZqFpw==","optional": true,+ "dependencies": {+ "@smithy/types": "^2.9.1"+ },"engines": {"node": ">=14.0.0"}},"node_modules/@smithy/shared-ini-file-loader": {- "version": "2.0.9",- "resolved": "https://registry.npmjs.org/@smithy/shared-ini-file-loader/-/shared-ini-file-loader-2.0.9.tgz",- "integrity": "sha512-vBLgJI+Qpz1TZ0W2kUBOmG2Q+geVEhiXE99UX02+UFag2WzOQ6frvV6rpadwJu0uwF02GG620NbiKGboqZ19YA==",+ "version": "2.3.1",+ "resolved": "https://registry.npmjs.org/@smithy/shared-ini-file-loader/-/shared-ini-file-loader-2.3.1.tgz",+ "integrity": "sha512-2E2kh24igmIznHLB6H05Na4OgIEilRu0oQpYXo3LCNRrawHAcfDKq9004zJs+sAMt2X5AbY87CUCJ7IpqpSgdw==","optional": true,"dependencies": {- "@smithy/types": "^2.3.1",+ "@smithy/types": "^2.9.1","tslib": "^2.5.0"},"engines": {@@ -8634,18 +8208,18 @@}},"node_modules/@smithy/signature-v4": {- "version": "2.0.14",- "resolved": "https://registry.npmjs.org/@smithy/signature-v4/-/signature-v4-2.0.14.tgz",- "integrity": "sha512-ZUU8gGlDVFyU3tM9tCEbq2FxHtyfX2qYBUKoIGH23GSxbC4+Ld/HeFL2EZYIFrYwoOuPBO30+g3fAohOP9Ax3Q==",+ "version": "2.1.1",+ "resolved": "https://registry.npmjs.org/@smithy/signature-v4/-/signature-v4-2.1.1.tgz",+ "integrity": "sha512-Hb7xub0NHuvvQD3YwDSdanBmYukoEkhqBjqoxo+bSdC0ryV9cTfgmNjuAQhTPYB6yeU7hTR+sPRiFMlxqv6kmg==","optional": true,"dependencies": {- "@smithy/eventstream-codec": "^2.0.12",- "@smithy/is-array-buffer": "^2.0.0",- "@smithy/types": "^2.4.0",- "@smithy/util-hex-encoding": "^2.0.0",- "@smithy/util-middleware": "^2.0.5",- "@smithy/util-uri-escape": "^2.0.0",- "@smithy/util-utf8": "^2.0.2",+ "@smithy/eventstream-codec": "^2.1.1",+ "@smithy/is-array-buffer": "^2.1.1",+ "@smithy/types": "^2.9.1",+ "@smithy/util-hex-encoding": "^2.1.1",+ "@smithy/util-middleware": "^2.1.1",+ "@smithy/util-uri-escape": "^2.1.1",+ "@smithy/util-utf8": "^2.1.1","tslib": "^2.5.0"},"engines": {@@ -8653,14 +8227,16 @@}},"node_modules/@smithy/smithy-client": {- "version": "2.1.4",- "resolved": "https://registry.npmjs.org/@smithy/smithy-client/-/smithy-client-2.1.4.tgz",- "integrity": "sha512-KRQvYYjEGqvmwnKSAZ8EL0hZvPxGQMYbAKS/AMGq2fuRmwAlinSVJ/fkIs65bZp2oYjcskd1ZgKcP+2UDjNPTQ==",+ "version": "2.3.1",+ "resolved": "https://registry.npmjs.org/@smithy/smithy-client/-/smithy-client-2.3.1.tgz",+ "integrity": "sha512-YsTdU8xVD64r2pLEwmltrNvZV6XIAC50LN6ivDopdt+YiF/jGH6PY9zUOu0CXD/d8GMB8gbhnpPsdrjAXHS9QA==","optional": true,"dependencies": {- "@smithy/middleware-stack": "^2.0.0",- "@smithy/types": "^2.3.1",- "@smithy/util-stream": "^2.0.10",+ "@smithy/middleware-endpoint": "^2.4.1",+ "@smithy/middleware-stack": "^2.1.1",+ "@smithy/protocol-http": "^3.1.1",+ "@smithy/types": "^2.9.1",+ "@smithy/util-stream": "^2.1.1","tslib": "^2.5.0"},"engines": {@@ -8668,9 +8244,9 @@}},"node_modules/@smithy/types": {- "version": "2.4.0",- "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.4.0.tgz",- "integrity": "sha512-iH1Xz68FWlmBJ9vvYeHifVMWJf82ONx+OybPW8ZGf5wnEv2S0UXcU4zwlwJkRXuLKpcSLHrraHbn2ucdVXLb4g==",+ "version": "2.9.1",+ "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.9.1.tgz",+ "integrity": "sha512-vjXlKNXyprDYDuJ7UW5iobdmyDm6g8dDG+BFUncAg/3XJaN45Gy5RWWWUVgrzIK7S4R1KWgIX5LeJcfvSI24bw==","optional": true,"dependencies": {"tslib": "^2.5.0"@@ -8680,23 +8256,23 @@}},"node_modules/@smithy/url-parser": {- "version": "2.0.7",- "resolved": "https://registry.npmjs.org/@smithy/url-parser/-/url-parser-2.0.7.tgz",- "integrity": "sha512-SwMl1Lq3yFR2hzhwWYKg04uJHpfcXWMBPycm4Z8GkLI6Dw7rJNDApEbMtujlYw6pVP2WKbrpaGHjQ9MdP92kMQ==",+ "version": "2.1.1",+ "resolved": "https://registry.npmjs.org/@smithy/url-parser/-/url-parser-2.1.1.tgz",+ "integrity": "sha512-qC9Bv8f/vvFIEkHsiNrUKYNl8uKQnn4BdhXl7VzQRP774AwIjiSMMwkbT+L7Fk8W8rzYVifzJNYxv1HwvfBo3Q==","optional": true,"dependencies": {- "@smithy/querystring-parser": "^2.0.7",- "@smithy/types": "^2.3.1",+ "@smithy/querystring-parser": "^2.1.1",+ "@smithy/types": "^2.9.1","tslib": "^2.5.0"}},"node_modules/@smithy/util-base64": {- "version": "2.0.0",- "resolved": "https://registry.npmjs.org/@smithy/util-base64/-/util-base64-2.0.0.tgz",- "integrity": "sha512-Zb1E4xx+m5Lud8bbeYi5FkcMJMnn+1WUnJF3qD7rAdXpaL7UjkFQLdmW5fHadoKbdHpwH9vSR8EyTJFHJs++tA==",+ "version": "2.1.1",+ "resolved": "https://registry.npmjs.org/@smithy/util-base64/-/util-base64-2.1.1.tgz",+ "integrity": "sha512-UfHVpY7qfF/MrgndI5PexSKVTxSZIdz9InghTFa49QOvuu9I52zLPLUHXvHpNuMb1iD2vmc6R+zbv/bdMipR/g==","optional": true,"dependencies": {- "@smithy/util-buffer-from": "^2.0.0",+ "@smithy/util-buffer-from": "^2.1.1","tslib": "^2.5.0"},"engines": {@@ -8704,18 +8280,18 @@}},"node_modules/@smithy/util-body-length-browser": {- "version": "2.0.0",- "resolved": "https://registry.npmjs.org/@smithy/util-body-length-browser/-/util-body-length-browser-2.0.0.tgz",- "integrity": "sha512-JdDuS4ircJt+FDnaQj88TzZY3+njZ6O+D3uakS32f2VNnDo3vyEuNdBOh/oFd8Df1zSZOuH1HEChk2AOYDezZg==",+ "version": "2.1.1",+ "resolved": "https://registry.npmjs.org/@smithy/util-body-length-browser/-/util-body-length-browser-2.1.1.tgz",+ "integrity": "sha512-ekOGBLvs1VS2d1zM2ER4JEeBWAvIOUKeaFch29UjjJsxmZ/f0L3K3x0dEETgh3Q9bkZNHgT+rkdl/J/VUqSRag==","optional": true,"dependencies": {"tslib": "^2.5.0"}},"node_modules/@smithy/util-body-length-node": {- "version": "2.1.0",- "resolved": "https://registry.npmjs.org/@smithy/util-body-length-node/-/util-body-length-node-2.1.0.tgz",- "integrity": "sha512-/li0/kj/y3fQ3vyzn36NTLGmUwAICb7Jbe/CsWCktW363gh1MOcpEcSO3mJ344Gv2dqz8YJCLQpb6hju/0qOWw==",+ "version": "2.2.1",+ "resolved": "https://registry.npmjs.org/@smithy/util-body-length-node/-/util-body-length-node-2.2.1.tgz",+ "integrity": "sha512-/ggJG+ta3IDtpNVq4ktmEUtOkH1LW64RHB5B0hcr5ZaWBmo96UX2cIOVbjCqqDickTXqBWZ4ZO0APuaPrD7Abg==","optional": true,"dependencies": {"tslib": "^2.5.0"@@ -8725,12 +8301,12 @@}},"node_modules/@smithy/util-buffer-from": {- "version": "2.0.0",- "resolved": "https://registry.npmjs.org/@smithy/util-buffer-from/-/util-buffer-from-2.0.0.tgz",- "integrity": "sha512-/YNnLoHsR+4W4Vf2wL5lGv0ksg8Bmk3GEGxn2vEQt52AQaPSCuaO5PM5VM7lP1K9qHRKHwrPGktqVoAHKWHxzw==",+ "version": "2.1.1",+ "resolved": "https://registry.npmjs.org/@smithy/util-buffer-from/-/util-buffer-from-2.1.1.tgz",+ "integrity": "sha512-clhNjbyfqIv9Md2Mg6FffGVrJxw7bgK7s3Iax36xnfVj6cg0fUG7I4RH0XgXJF8bxi+saY5HR21g2UPKSxVCXg==","optional": true,"dependencies": {- "@smithy/is-array-buffer": "^2.0.0",+ "@smithy/is-array-buffer": "^2.1.1","tslib": "^2.5.0"},"engines": {@@ -8738,9 +8314,9 @@}},"node_modules/@smithy/util-config-provider": {- "version": "2.0.0",- "resolved": "https://registry.npmjs.org/@smithy/util-config-provider/-/util-config-provider-2.0.0.tgz",- "integrity": "sha512-xCQ6UapcIWKxXHEU4Mcs2s7LcFQRiU3XEluM2WcCjjBtQkUN71Tb+ydGmJFPxMUrW/GWMgQEEGipLym4XG0jZg==",+ "version": "2.2.1",+ "resolved": "https://registry.npmjs.org/@smithy/util-config-provider/-/util-config-provider-2.2.1.tgz",+ "integrity": "sha512-50VL/tx9oYYcjJn/qKqNy7sCtpD0+s8XEBamIFo4mFFTclKMNp+rsnymD796uybjiIquB7VCB/DeafduL0y2kw==","optional": true,"dependencies": {"tslib": "^2.5.0"@@ -8750,13 +8326,14 @@}},"node_modules/@smithy/util-defaults-mode-browser": {- "version": "2.0.8",- "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-browser/-/util-defaults-mode-browser-2.0.8.tgz",- "integrity": "sha512-8znx01mkmfKxhiSB2bOF5eMutuCLMd8m2Kh0ulRp8vgzhwRLDJoU6aHSEUoNptbuTAtiFf4u0gpkYC2XfbWwuA==",+ "version": "2.1.1",+ "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-browser/-/util-defaults-mode-browser-2.1.1.tgz",+ "integrity": "sha512-lqLz/9aWRO6mosnXkArtRuQqqZBhNpgI65YDpww4rVQBuUT7qzKbDLG5AmnQTCiU4rOquaZO/Kt0J7q9Uic7MA==","optional": true,"dependencies": {- "@smithy/property-provider": "^2.0.8",- "@smithy/types": "^2.3.1",+ "@smithy/property-provider": "^2.1.1",+ "@smithy/smithy-client": "^2.3.1",+ "@smithy/types": "^2.9.1","bowser": "^2.11.0","tslib": "^2.5.0"},@@ -8765,26 +8342,41 @@}},"node_modules/@smithy/util-defaults-mode-node": {- "version": "2.0.10",- "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-node/-/util-defaults-mode-node-2.0.10.tgz",- "integrity": "sha512-QUcUckL4ZqDFVwLnh7zStRUnXtTC6hcJZ4FmMqnxlPcL33Rko0sMQwrMDnMdzF3rS3wvqugAaq3zzop1HCluvw==",+ "version": "2.1.1",+ "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-node/-/util-defaults-mode-node-2.1.1.tgz",+ "integrity": "sha512-tYVrc+w+jSBfBd267KDnvSGOh4NMz+wVH7v4CClDbkdPfnjvImBZsOURncT5jsFwR9KCuDyPoSZq4Pa6+eCUrA==","optional": true,"dependencies": {- "@smithy/config-resolver": "^2.0.8",- "@smithy/credential-provider-imds": "^2.0.10",- "@smithy/node-config-provider": "^2.0.10",- "@smithy/property-provider": "^2.0.8",- "@smithy/types": "^2.3.1",+ "@smithy/config-resolver": "^2.1.1",+ "@smithy/credential-provider-imds": "^2.2.1",+ "@smithy/node-config-provider": "^2.2.1",+ "@smithy/property-provider": "^2.1.1",+ "@smithy/smithy-client": "^2.3.1",+ "@smithy/types": "^2.9.1","tslib": "^2.5.0"},"engines": {"node": ">= 10.0.0"}},+ "node_modules/@smithy/util-endpoints": {+ "version": "1.1.1",+ "resolved": "https://registry.npmjs.org/@smithy/util-endpoints/-/util-endpoints-1.1.1.tgz",+ "integrity": "sha512-sI4d9rjoaekSGEtq3xSb2nMjHMx8QXcz2cexnVyRWsy4yQ9z3kbDpX+7fN0jnbdOp0b3KSTZJZ2Yb92JWSanLw==",+ "optional": true,+ "dependencies": {+ "@smithy/node-config-provider": "^2.2.1",+ "@smithy/types": "^2.9.1",+ "tslib": "^2.5.0"+ },+ "engines": {+ "node": ">= 14.0.0"+ }+ },"node_modules/@smithy/util-hex-encoding": {- "version": "2.0.0",- "resolved": "https://registry.npmjs.org/@smithy/util-hex-encoding/-/util-hex-encoding-2.0.0.tgz",- "integrity": "sha512-c5xY+NUnFqG6d7HFh1IFfrm3mGl29lC+vF+geHv4ToiuJCBmIfzx6IeHLg+OgRdPFKDXIw6pvi+p3CsscaMcMA==",+ "version": "2.1.1",+ "resolved": "https://registry.npmjs.org/@smithy/util-hex-encoding/-/util-hex-encoding-2.1.1.tgz",+ "integrity": "sha512-3UNdP2pkYUUBGEXzQI9ODTDK+Tcu1BlCyDBaRHwyxhA+8xLP8agEKQq4MGmpjqb4VQAjq9TwlCQX0kP6XDKYLg==","optional": true,"dependencies": {"tslib": "^2.5.0"@@ -8794,12 +8386,12 @@}},"node_modules/@smithy/util-middleware": {- "version": "2.0.5",- "resolved": "https://registry.npmjs.org/@smithy/util-middleware/-/util-middleware-2.0.5.tgz",- "integrity": "sha512-1lyT3TcaMJQe+OFfVI+TlomDkPuVzb27NZYdYtmSTltVmLaUjdCyt4KE+OH1CnhZKsz4/cdCL420Lg9UH5Z2Mw==",+ "version": "2.1.1",+ "resolved": "https://registry.npmjs.org/@smithy/util-middleware/-/util-middleware-2.1.1.tgz",+ "integrity": "sha512-mKNrk8oz5zqkNcbcgAAepeJbmfUW6ogrT2Z2gDbIUzVzNAHKJQTYmH9jcy0jbWb+m7ubrvXKb6uMjkSgAqqsFA==","optional": true,"dependencies": {- "@smithy/types": "^2.4.0",+ "@smithy/types": "^2.9.1","tslib": "^2.5.0"},"engines": {@@ -8807,12 +8399,13 @@}},"node_modules/@smithy/util-retry": {- "version": "2.0.0",- "resolved": "https://registry.npmjs.org/@smithy/util-retry/-/util-retry-2.0.0.tgz",- "integrity": "sha512-/dvJ8afrElasuiiIttRJeoS2sy8YXpksQwiM/TcepqdRVp7u4ejd9C4IQURHNjlfPUT7Y6lCDSa2zQJbdHhVTg==",+ "version": "2.1.1",+ "resolved": "https://registry.npmjs.org/@smithy/util-retry/-/util-retry-2.1.1.tgz",+ "integrity": "sha512-Mg+xxWPTeSPrthpC5WAamJ6PW4Kbo01Fm7lWM1jmGRvmrRdsd3192Gz2fBXAMURyXpaNxyZf6Hr/nQ4q70oVEA==","optional": true,"dependencies": {- "@smithy/service-error-classification": "^2.0.0",+ "@smithy/service-error-classification": "^2.1.1",+ "@smithy/types": "^2.9.1","tslib": "^2.5.0"},"engines": {@@ -8820,18 +8413,18 @@}},"node_modules/@smithy/util-stream": {- "version": "2.0.10",- "resolved": "https://registry.npmjs.org/@smithy/util-stream/-/util-stream-2.0.10.tgz",- "integrity": "sha512-2EgK5cBiv9OaDmhSXmsZY8ZByBl1dg/Tbc51iBJ5GkLGVYhaA6/1l6vHHV41m4Im3D0XfZV1tmeLlQgmRnYsTQ==",+ "version": "2.1.1",+ "resolved": "https://registry.npmjs.org/@smithy/util-stream/-/util-stream-2.1.1.tgz",+ "integrity": "sha512-J7SMIpUYvU4DQN55KmBtvaMc7NM3CZ2iWICdcgaovtLzseVhAqFRYqloT3mh0esrFw+3VEK6nQFteFsTqZSECQ==","optional": true,"dependencies": {- "@smithy/fetch-http-handler": "^2.1.3",- "@smithy/node-http-handler": "^2.1.3",- "@smithy/types": "^2.3.1",- "@smithy/util-base64": "^2.0.0",- "@smithy/util-buffer-from": "^2.0.0",- "@smithy/util-hex-encoding": "^2.0.0",- "@smithy/util-utf8": "^2.0.0",+ "@smithy/fetch-http-handler": "^2.4.1",+ "@smithy/node-http-handler": "^2.3.1",+ "@smithy/types": "^2.9.1",+ "@smithy/util-base64": "^2.1.1",+ "@smithy/util-buffer-from": "^2.1.1",+ "@smithy/util-hex-encoding": "^2.1.1",+ "@smithy/util-utf8": "^2.1.1","tslib": "^2.5.0"},"engines": {@@ -8839,9 +8432,9 @@}},"node_modules/@smithy/util-uri-escape": {- "version": "2.0.0",- "resolved": "https://registry.npmjs.org/@smithy/util-uri-escape/-/util-uri-escape-2.0.0.tgz",- "integrity": "sha512-ebkxsqinSdEooQduuk9CbKcI+wheijxEb3utGXkCoYQkJnwTnLbH1JXGimJtUkQwNQbsbuYwG2+aFVyZf5TLaw==",+ "version": "2.1.1",+ "resolved": "https://registry.npmjs.org/@smithy/util-uri-escape/-/util-uri-escape-2.1.1.tgz",+ "integrity": "sha512-saVzI1h6iRBUVSqtnlOnc9ssU09ypo7n+shdQ8hBTZno/9rZ3AuRYvoHInV57VF7Qn7B+pFJG7qTzFiHxWlWBw==","optional": true,"dependencies": {"tslib": "^2.5.0"@@ -8851,12 +8444,12 @@}},"node_modules/@smithy/util-utf8": {- "version": "2.0.2",- "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-2.0.2.tgz",- "integrity": "sha512-qOiVORSPm6Ce4/Yu6hbSgNHABLP2VMv8QOC3tTDNHHlWY19pPyc++fBTbZPtx6egPXi4HQxKDnMxVxpbtX2GoA==",+ "version": "2.1.1",+ "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-2.1.1.tgz",+ "integrity": "sha512-BqTpzYEcUMDwAKr7/mVRUtHDhs6ZoXDi9NypMvMfOr/+u1NW7JgqodPDECiiLboEm6bobcPcECxzjtQh865e9A==","optional": true,"dependencies": {- "@smithy/util-buffer-from": "^2.0.0",+ "@smithy/util-buffer-from": "^2.1.1","tslib": "^2.5.0"},"engines": {@@ -8864,9 +8457,9 @@}},"node_modules/@tanstack/match-sorter-utils": {- "version": "8.8.4",- "resolved": "https://registry.npmjs.org/@tanstack/match-sorter-utils/-/match-sorter-utils-8.8.4.tgz",- "integrity": "sha512-rKH8LjZiszWEvmi01NR72QWZ8m4xmXre0OOwlRGnjU01Eqz/QnN+cqpty2PJ0efHblq09+KilvyR7lsbzmXVEw==",+ "version": "8.11.8",+ "resolved": "https://registry.npmjs.org/@tanstack/match-sorter-utils/-/match-sorter-utils-8.11.8.tgz",+ "integrity": "sha512-3VPh0SYMGCa5dWQEqNab87UpCMk+ANWHDP4ALs5PeEW9EpfTAbrezzaOk/OiM52IESViefkoAOYuxdoa04p6aA==","dev": true,"dependencies": {"remove-accents": "0.4.2"@@ -8876,24 +8469,24 @@},"funding": {"type": "github",- "url": "https://github.com/sponsors/kentcdodds"+ "url": "https://github.com/sponsors/tannerlinsley"}},"node_modules/@tanstack/query-core": {- "version": "4.35.3",- "resolved": "https://registry.npmjs.org/@tanstack/query-core/-/query-core-4.35.3.tgz",- "integrity": "sha512-PS+WEjd9wzKTyNjjQymvcOe1yg8f3wYc6mD+vb6CKyZAKvu4sIJwryfqfBULITKCla7P9C4l5e9RXePHvZOZeQ==",+ "version": "4.36.1",+ "resolved": "https://registry.npmjs.org/@tanstack/query-core/-/query-core-4.36.1.tgz",+ "integrity": "sha512-DJSilV5+ytBP1FbFcEJovv4rnnm/CokuVvrBEtW/Va9DvuJ3HksbXUJEpI0aV1KtuL4ZoO9AVE6PyNLzF7tLeA==","funding": {"type": "github","url": "https://github.com/sponsors/tannerlinsley"}},"node_modules/@tanstack/react-query": {- "version": "4.35.3",- "resolved": "https://registry.npmjs.org/@tanstack/react-query/-/react-query-4.35.3.tgz",- "integrity": "sha512-UgTPioip/rGG3EQilXfA2j4BJkhEQsR+KAbF+KIuvQ7j4MkgnTCJF01SfRpIRNtQTlEfz/+IL7+jP8WA8bFbsw==",+ "version": "4.36.1",+ "resolved": "https://registry.npmjs.org/@tanstack/react-query/-/react-query-4.36.1.tgz",+ "integrity": "sha512-y7ySVHFyyQblPl3J3eQBWpXZkliroki3ARnBKsdJchlgt7yJLRDUcf4B8soufgiYt3pEQIkBWBx1N9/ZPIeUWw==","dependencies": {- "@tanstack/query-core": "4.35.3",+ "@tanstack/query-core": "4.36.1","use-sync-external-store": "^1.2.0"},"funding": {@@ -8915,9 +8508,9 @@}},"node_modules/@tanstack/react-query-devtools": {- "version": "4.35.3",- "resolved": "https://registry.npmjs.org/@tanstack/react-query-devtools/-/react-query-devtools-4.35.3.tgz",- "integrity": "sha512-UvLT7qPzCuCZ3NfjwsOqDUVN84JvSOuW6ukrjZmSqgjPqVxD6ra/HUp1CEOatQY2TRvKCp8y1lTVu+trXM30fg==",+ "version": "4.36.1",+ "resolved": "https://registry.npmjs.org/@tanstack/react-query-devtools/-/react-query-devtools-4.36.1.tgz",+ "integrity": "sha512-WYku83CKP3OevnYSG8Y/QO9g0rT75v1om5IvcWUwiUZJ4LanYGLVCZ8TdFG5jfsq4Ej/lu2wwDAULEUnRIMBSw==","dev": true,"dependencies": {"@tanstack/match-sorter-utils": "^8.7.0",@@ -8929,15 +8522,71 @@"url": "https://github.com/sponsors/tannerlinsley"},"peerDependencies": {- "@tanstack/react-query": "^4.35.3",+ "@tanstack/react-query": "^4.36.1",+ "react": "^16.8.0 || ^17.0.0 || ^18.0.0",+ "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0"+ }+ },+ "node_modules/@tanstack/react-table": {+ "version": "8.11.7",+ "resolved": "https://registry.npmjs.org/@tanstack/react-table/-/react-table-8.11.7.tgz",+ "integrity": "sha512-ZbzfMkLjxUTzNPBXJYH38pv2VpC9WUA+Qe5USSHEBz0dysDTv4z/ARI3csOed/5gmlmrPzVUN3UXGuUMbod3Jg==",+ "dependencies": {+ "@tanstack/table-core": "8.11.7"+ },+ "engines": {+ "node": ">=12"+ },+ "funding": {+ "type": "github",+ "url": "https://github.com/sponsors/tannerlinsley"+ },+ "peerDependencies": {+ "react": ">=16",+ "react-dom": ">=16"+ }+ },+ "node_modules/@tanstack/react-virtual": {+ "version": "3.0.4",+ "resolved": "https://registry.npmjs.org/@tanstack/react-virtual/-/react-virtual-3.0.4.tgz",+ "integrity": "sha512-tiqKW/e2MJVCr7/pRUXulpkyxllaOclkHNfhKTo4pmHjJIqnhMfwIjc1Q1R0Un3PI3kQywywu/791c8z9u0qeA==",+ "dependencies": {+ "@tanstack/virtual-core": "3.0.0"+ },+ "funding": {+ "type": "github",+ "url": "https://github.com/sponsors/tannerlinsley"+ },+ "peerDependencies": {"react": "^16.8.0 || ^17.0.0 || ^18.0.0","react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0"}},+ "node_modules/@tanstack/table-core": {+ "version": "8.11.7",+ "resolved": "https://registry.npmjs.org/@tanstack/table-core/-/table-core-8.11.7.tgz",+ "integrity": "sha512-N3ksnkbPbsF3PjubuZCB/etTqvctpXWRHIXTmYfJFnhynQKjeZu8BCuHvdlLPpumKbA+bjY4Ay9AELYLOXPWBg==",+ "engines": {+ "node": ">=12"+ },+ "funding": {+ "type": "github",+ "url": "https://github.com/sponsors/tannerlinsley"+ }+ },+ "node_modules/@tanstack/virtual-core": {+ "version": "3.0.0",+ "resolved": "https://registry.npmjs.org/@tanstack/virtual-core/-/virtual-core-3.0.0.tgz",+ "integrity": "sha512-SYXOBTjJb05rXa2vl55TTwO40A6wKu0R5i1qQwhJYNDIqaIGF7D0HsLw+pJAyi2OvntlEIVusx3xtbbgSUi6zg==",+ "funding": {+ "type": "github",+ "url": "https://github.com/sponsors/tannerlinsley"+ }+ },"node_modules/@testing-library/dom": {- "version": "9.3.1",- "resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-9.3.1.tgz",- "integrity": "sha512-0DGPd9AR3+iDTjGoMpxIkAsUihHZ3Ai6CneU6bRRrffXMgzCdlNk43jTrD2/5LT6CBb3MWTP8v510JzYtahD2w==",+ "version": "9.3.4",+ "resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-9.3.4.tgz",+ "integrity": "sha512-FlS4ZWlp97iiNWig0Muq8p+3rVDjRiYE+YKGbAqXOu9nwJFFOdL00kFpz42M+4huzYi86vAK1sOOfyOG45muIQ==","dev": true,"dependencies": {"@babel/code-frame": "^7.10.4",@@ -9021,9 +8670,9 @@}},"node_modules/@testing-library/react": {- "version": "14.0.0",- "resolved": "https://registry.npmjs.org/@testing-library/react/-/react-14.0.0.tgz",- "integrity": "sha512-S04gSNJbYE30TlIMLTzv6QCTzt9AqIF5y6s6SzVFILNcNvbV/jU96GeiTPillGQo+Ny64M/5PV7klNYYgv5Dfg==",+ "version": "14.2.1",+ "resolved": "https://registry.npmjs.org/@testing-library/react/-/react-14.2.1.tgz",+ "integrity": "sha512-sGdjws32ai5TLerhvzThYFbpnF9XtL65Cjf+gB0Dhr29BGqK+mAeN7SURSdu+eqgET4ANcWoC7FQpkaiGvBr+A==","dev": true,"dependencies": {"@babel/runtime": "^7.12.5",@@ -9039,9 +8688,9 @@}},"node_modules/@testing-library/user-event": {- "version": "14.4.3",- "resolved": "https://registry.npmjs.org/@testing-library/user-event/-/user-event-14.4.3.tgz",- "integrity": "sha512-kCUc5MEwaEMakkO5x7aoD+DLi02ehmEM2QCGWvNqAS1dV/fAvORWEjnjsEIvml59M7Y5kCkWN6fCCyPOe8OL6Q==",+ "version": "14.5.2",+ "resolved": "https://registry.npmjs.org/@testing-library/user-event/-/user-event-14.5.2.tgz",+ "integrity": "sha512-YAh82Wh4TIrxYLmfGcixwD18oIjyC1pFQC2Y01F2lzV2HTMiYrI0nze0FD0ocB//CKS/7jIUgae+adPqxK5yCQ==","dev": true,"engines": {"node": ">=12",@@ -9060,6 +8709,11 @@"undici": "^5.22.1"}},+ "node_modules/@tokenizer/token": {+ "version": "0.3.0",+ "resolved": "https://registry.npmjs.org/@tokenizer/token/-/token-0.3.0.tgz",+ "integrity": "sha512-OvjF+z51L3ov0OyAU0duzsYuvO01PH7x4t6DJx+guahgTnBHkhJdG7soQeTSFLWN3efnHyibZ4Z8l2EuWwJN3A=="+ },"node_modules/@tootallnate/once": {"version": "2.0.0","resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz",@@ -9069,9 +8723,9 @@}},"node_modules/@types/aria-query": {- "version": "5.0.1",- "resolved": "https://registry.npmjs.org/@types/aria-query/-/aria-query-5.0.1.tgz",- "integrity": "sha512-XTIieEY+gvJ39ChLcB4If5zHtPxt3Syj5rgZR+e1ctpmK8NjPf0zFqsz4JpLJT0xla9GFDKjy8Cpu331nrmE1Q==",+ "version": "5.0.4",+ "resolved": "https://registry.npmjs.org/@types/aria-query/-/aria-query-5.0.4.tgz",+ "integrity": "sha512-rfT93uj5s0PRL7EzccGMs3brplhcrghnDoV26NqKhCAS1hVo+WdNsPvE/yb6ilfr5hi2MEk6d5EWJTKdxg8jVw==","dev": true},"node_modules/@types/babel__core": {@@ -9088,18 +8742,18 @@}},"node_modules/@types/babel__generator": {- "version": "7.6.4",- "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.4.tgz",- "integrity": "sha512-tFkciB9j2K755yrTALxD44McOrk+gfpIpvC3sxHjRawj6PfnQxrse4Clq5y/Rq+G3mrBurMax/lG8Qn2t9mSsg==",+ "version": "7.6.8",+ "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.8.tgz",+ "integrity": "sha512-ASsj+tpEDsEiFr1arWrlN6V3mdfjRMZt6LtK/Vp/kreFLnr5QH5+DhvD5nINYZXzwJvXeGq+05iUXcAzVrqWtw==","dev": true,"dependencies": {"@babel/types": "^7.0.0"}},"node_modules/@types/babel__template": {- "version": "7.4.1",- "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.1.tgz",- "integrity": "sha512-azBFKemX6kMg5Io+/rdGT0dkGreboUVR0Cdm3fz9QJWpaQGJRQXl7C+6hOTCZcMll7KFyEQpgbYI2lHdsS4U7g==",+ "version": "7.4.4",+ "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.4.tgz",+ "integrity": "sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==","dev": true,"dependencies": {"@babel/parser": "^7.1.0",@@ -9107,89 +8761,105 @@}},"node_modules/@types/babel__traverse": {- "version": "7.20.1",- "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.1.tgz",- "integrity": "sha512-MitHFXnhtgwsGZWtT68URpOvLN4EREih1u3QtQiN4VdAxWKRVvGCSvw/Qth0M0Qq3pJpnGOu5JaM/ydK7OGbqg==",+ "version": "7.20.5",+ "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.5.tgz",+ "integrity": "sha512-WXCyOcRtH37HAUkpXhUduaxdm82b4GSlyTqajXviN4EfiuPgNYR109xMCKvpl6zPIpua0DGlMEDCq+g8EdoheQ==","dev": true,"dependencies": {"@babel/types": "^7.20.7"}},"node_modules/@types/debug": {- "version": "4.1.8",- "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.8.tgz",- "integrity": "sha512-/vPO1EPOs306Cvhwv7KfVfYvOJqA/S/AXjaHQiJboCZzcNDb+TIJFN9/2C9DZ//ijSKWioNyUxD792QmDJ+HKQ==",+ "version": "4.1.12",+ "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.12.tgz",+ "integrity": "sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ==","dependencies": {"@types/ms": "*"}},"node_modules/@types/eslint": {- "version": "8.44.2",- "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.44.2.tgz",- "integrity": "sha512-sdPRb9K6iL5XZOmBubg8yiFp5yS/JdUDQsq5e6h95km91MCYMuvp7mh1fjPEYUhvHepKpZOjnEaMBR4PxjWDzg==",+ "version": "8.56.2",+ "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.56.2.tgz",+ "integrity": "sha512-uQDwm1wFHmbBbCZCqAlq6Do9LYwByNZHWzXppSnay9SuwJ+VRbjkbLABer54kcPnMSlG6Fdiy2yaFXm/z9Z5gw==","dev": true,"dependencies": {"@types/estree": "*","@types/json-schema": "*"}},+ "node_modules/@types/eslint-scope": {+ "version": "3.7.7",+ "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.7.tgz",+ "integrity": "sha512-MzMFlSLBqNF2gcHWO0G1vP/YQyfvrxZ0bF+u7mzUdZ1/xK4A4sru+nraZz5i3iEIk1l1uyicaDVTB4QbbEkAYg==",+ "dev": true,+ "peer": true,+ "dependencies": {+ "@types/eslint": "*",+ "@types/estree": "*"+ }+ },"node_modules/@types/estree": {- "version": "1.0.1",- "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.1.tgz",- "integrity": "sha512-LG4opVs2ANWZ1TJoKc937iMmNstM/d0ae1vNbnBvBhqCSezgVUOzcLCqbI5elV8Vy6WKwKjaqR+zO9VKirBBCA==",+ "version": "1.0.5",+ "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz",+ "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==","dev": true},"node_modules/@types/graceful-fs": {- "version": "4.1.6",- "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.6.tgz",- "integrity": "sha512-Sig0SNORX9fdW+bQuTEovKj3uHcUL6LQKbCrrqb1X7J6/ReAbhCXRAhc+SMejhLELFj2QcyuxmUooZ4bt5ReSw==",+ "version": "4.1.9",+ "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.9.tgz",+ "integrity": "sha512-olP3sd1qOEe5dXTSaFvQG+02VdRXcdytWLAZsAq1PecU8uqQAhkrnbli7DagjtXKW/Bl7YJbUsa8MPcuc8LHEQ==","dev": true,"dependencies": {"@types/node": "*"}},"node_modules/@types/hast": {- "version": "2.3.5",- "resolved": "https://registry.npmjs.org/@types/hast/-/hast-2.3.5.tgz",- "integrity": "sha512-SvQi0L/lNpThgPoleH53cdjB3y9zpLlVjRbqB3rH8hx1jiRSBGAhyjV3H+URFjNVRqt2EdYNrbZE5IsGlNfpRg==",+ "version": "2.3.10",+ "resolved": "https://registry.npmjs.org/@types/hast/-/hast-2.3.10.tgz",+ "integrity": "sha512-McWspRw8xx8J9HurkVBfYj0xKoE25tOFlHGdx4MJ5xORQrMGZNqJhVQWaIbm6Oyla5kYOXtDiopzKRJzEOkwJw==","dependencies": {"@types/unist": "^2"}},"node_modules/@types/istanbul-lib-coverage": {- "version": "2.0.4",- "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.4.tgz",- "integrity": "sha512-z/QT1XN4K4KYuslS23k62yDIDLwLFkzxOuMplDtObz0+y7VqJCaO2o+SPwHCvLFZh7xazvvoor2tA/hPz9ee7g==",+ "version": "2.0.6",+ "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz",+ "integrity": "sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==","dev": true},"node_modules/@types/istanbul-lib-report": {- "version": "3.0.0",- "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz",- "integrity": "sha512-plGgXAPfVKFoYfa9NpYDAkseG+g6Jr294RqeqcqDixSbU34MZVJRi/P+7Y8GDpzkEwLaGZZOpKIEmeVZNtKsrg==",+ "version": "3.0.3",+ "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.3.tgz",+ "integrity": "sha512-NQn7AHQnk/RSLOxrBbGyJM/aVQ+pjj5HCgasFxc0K/KhoATfQ/47AyUl15I2yBUpihjmas+a+VJBOqecrFH+uA==","dev": true,"dependencies": {"@types/istanbul-lib-coverage": "*"}},"node_modules/@types/istanbul-reports": {- "version": "3.0.1",- "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.1.tgz",- "integrity": "sha512-c3mAZEuK0lvBp8tmuL74XRKn1+y2dcwOUpH7x4WrF6gk1GIgiluDRgMYQtw2OFcBvAJWlt6ASU3tSqxp0Uu0Aw==",+ "version": "3.0.4",+ "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.4.tgz",+ "integrity": "sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ==","dev": true,"dependencies": {"@types/istanbul-lib-report": "*"}},"node_modules/@types/jest": {- "version": "29.5.4",- "resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.5.4.tgz",- "integrity": "sha512-PhglGmhWeD46FYOVLt3X7TiWjzwuVGW9wG/4qocPevXMjCmrIc5b6db9WjeGE4QYVpUAWMDv3v0IiBwObY289A==",+ "version": "29.5.12",+ "resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.5.12.tgz",+ "integrity": "sha512-eDC8bTvT/QhYdxJAulQikueigY5AsdBRH2yDKW3yveW7svY3+DzN84/2NUgkw10RTiJbWqZrTtoGVdYlvFJdLw==","dev": true,"dependencies": {"expect": "^29.0.0","pretty-format": "^29.0.0"}},+ "node_modules/@types/js-yaml": {+ "version": "4.0.9",+ "resolved": "https://registry.npmjs.org/@types/js-yaml/-/js-yaml-4.0.9.tgz",+ "integrity": "sha512-k4MGaQl5TGo/iipqb2UDG2UwjXziSWkh0uysQelTlJpX1qGlpUZYm8PnO4DxG1qBomtJUdYJ6qR6xdIah10JLg=="+ },"node_modules/@types/jsdom": {"version": "20.0.1","resolved": "https://registry.npmjs.org/@types/jsdom/-/jsdom-20.0.1.tgz",@@ -9202,9 +8872,9 @@}},"node_modules/@types/json-schema": {- "version": "7.0.12",- "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.12.tgz",- "integrity": "sha512-Hr5Jfhc9eYOQNPYO5WLDq/n4jqijdHNlDXjuAQkkt+mWdQR+XJToOHrsD4cPaMXpn6KO7y2+wM8AZEs8VpBLVA==",+ "version": "7.0.15",+ "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz",+ "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==","dev": true},"node_modules/@types/json5": {@@ -9219,27 +8889,30 @@"integrity": "sha512-+2FW2CcT0K3P+JMR8YG846bmDwplKUTsWgT2ENwdQ1UdVfRk3GQrh6Mi4sTopy30gI8Uau5CEqHTDZ6YvWIUPA=="},"node_modules/@types/mdast": {- "version": "3.0.12",- "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.12.tgz",- "integrity": "sha512-DT+iNIRNX884cx0/Q1ja7NyUPpZuv0KPyL5rGNxm1WC1OtHstl7n4Jb7nk+xacNShQMbczJjt8uFzznpp6kYBg==",+ "version": "3.0.15",+ "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.15.tgz",+ "integrity": "sha512-LnwD+mUEfxWMa1QpDraczIn6k0Ee3SMicuYSSzS6ZYl2gKS09EClnJYGd8Du6rfc5r/GZEk5o1mRb8TaTj03sQ==","dependencies": {"@types/unist": "^2"}},"node_modules/@types/ms": {- "version": "0.7.31",- "resolved": "https://registry.npmjs.org/@types/ms/-/ms-0.7.31.tgz",- "integrity": "sha512-iiUgKzV9AuaEkZqkOLDIvlQiL6ltuZd9tGcW3gwpnX8JbuiuhFlEGmmFXEXkN50Cvq7Os88IY2v0dkDqXYWVgA=="+ "version": "0.7.34",+ "resolved": "https://registry.npmjs.org/@types/ms/-/ms-0.7.34.tgz",+ "integrity": "sha512-nG96G3Wp6acyAgJqGasjODb+acrI7KltPiRxzHPXnP3NgI28bpQDRv53olbqGXbfcgF5aiiHmO3xpwEpS5Ld9g=="},"node_modules/@types/node": {- "version": "20.6.0",- "resolved": "https://registry.npmjs.org/@types/node/-/node-20.6.0.tgz",- "integrity": "sha512-najjVq5KN2vsH2U/xyh2opaSEz6cZMR2SetLIlxlj08nOcmPOemJmUK2o4kUzfLqfrWE0PIrNeE16XhYDd3nqg=="+ "version": "20.11.16",+ "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.16.tgz",+ "integrity": "sha512-gKb0enTmRCzXSSUJDq6/sPcqrfCv2mkkG6Jt/clpn5eiCbKTY+SgZUxo+p8ZKMof5dCp9vHQUAB7wOUTod22wQ==",+ "dependencies": {+ "undici-types": "~5.26.4"+ }},"node_modules/@types/node-fetch": {- "version": "2.6.5",- "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.6.5.tgz",- "integrity": "sha512-OZsUlr2nxvkqUFLSaY2ZbA+P1q22q+KrlxWOn/38RX+u5kTkYL2mTujEpzUhGkS+K/QCYp9oagfXG39XOzyySg==",+ "version": "2.6.11",+ "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.6.11.tgz",+ "integrity": "sha512-24xFj9R5+rfQJLRyM56qh+wnVSYhyXC2tkoBndtY0U+vubqNsYXGjufB2nn8Q6gt0LrARwL6UBtMCSVCwl4B1g==","dependencies": {"@types/node": "*","form-data": "^4.0.0"@@ -9263,14 +8936,14 @@"dev": true},"node_modules/@types/prop-types": {- "version": "15.7.5",- "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.5.tgz",- "integrity": "sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w=="+ "version": "15.7.11",+ "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.11.tgz",+ "integrity": "sha512-ga8y9v9uyeiLdpKddhxYQkxNDrfvuPrlFb0N1qnZZByvcElJaXthF1UhvCh9TLWJBEHeNtdnbysW7Y6Uq8CVng=="},"node_modules/@types/react": {- "version": "18.2.21",- "resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.21.tgz",- "integrity": "sha512-neFKG/sBAwGxHgXiIxnbm3/AAVQ/cMRS93hvBpg8xYRbeQSPVABp9U2bRnPf0iI4+Ucdv3plSxKK+3CW2ENJxA==",+ "version": "18.2.53",+ "resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.53.tgz",+ "integrity": "sha512-52IHsMDT8qATp9B9zoOyobW8W3/0QhaJQTw1HwRj0UY2yBpCAQ7+S/CqHYQ8niAm3p4ji+rWUQ9UCib0GxQ60w==","dependencies": {"@types/prop-types": "*","@types/scheduler": "*",@@ -9278,9 +8951,9 @@}},"node_modules/@types/react-dom": {- "version": "18.2.7",- "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.2.7.tgz",- "integrity": "sha512-GRaAEriuT4zp9N4p1i8BDBYmEyfo+xQ3yHjJU4eiK5NDa1RmUZG+unZABUTK4/Ox/M+GaHwb6Ow8rUITrtjszA==",+ "version": "18.2.18",+ "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.2.18.tgz",+ "integrity": "sha512-TJxDm6OfAX2KJWJdMEVTwWke5Sc/E/RlnPGvGfS0W7+6ocy2xhDVQVh/KvC2Uf7kACs+gDytdusDSdWfWkaNzw==","devOptional": true,"dependencies": {"@types/react": "*"@@ -9298,20 +8971,20 @@"integrity": "sha512-wWKOClTTiizcZhXnPY4wikVAwmdYHp8q6DmC+EJUzAMsycb7HB32Kh9RN4+0gExjmPmZSAQjgURXIGATPegAvA=="},"node_modules/@types/scheduler": {- "version": "0.16.3",- "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.3.tgz",- "integrity": "sha512-5cJ8CB4yAx7BH1oMvdU0Jh9lrEXyPkar6F9G/ERswkCuvP4KQZfZkSjcMbAICCpQTN4OuZn8tz0HiKv9TGZgrQ=="+ "version": "0.16.8",+ "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.8.tgz",+ "integrity": "sha512-WZLiwShhwLRmeV6zH+GkbOFT6Z6VklCItrDioxUnv+u4Ll+8vKeFySoFyK/0ctcRpOmwAicELfmys1sDc/Rw+A=="},"node_modules/@types/semver": {- "version": "7.5.2",- "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.2.tgz",- "integrity": "sha512-7aqorHYgdNO4DM36stTiGO3DvKoex9TQRwsJU6vMaFGyqpBA1MNZkz+PG3gaNUPpTAOYhT1WR7M1JyA3fbS9Cw==",+ "version": "7.5.6",+ "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.6.tgz",+ "integrity": "sha512-dn1l8LaMea/IjDoHNd9J52uBbInB796CDffS6VdIxvqYCPSG0V0DzHp76GpaWnlhg88uYyPbXCDIowa86ybd5A==","dev": true},"node_modules/@types/stack-utils": {- "version": "2.0.1",- "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.1.tgz",- "integrity": "sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw==",+ "version": "2.0.3",+ "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.3.tgz",+ "integrity": "sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==","dev": true},"node_modules/@types/testing-library__jest-dom": {@@ -9324,30 +8997,30 @@}},"node_modules/@types/tough-cookie": {- "version": "4.0.3",- "resolved": "https://registry.npmjs.org/@types/tough-cookie/-/tough-cookie-4.0.3.tgz",- "integrity": "sha512-THo502dA5PzG/sfQH+42Lw3fvmYkceefOspdCwpHRul8ik2Jv1K8I5OZz1AT3/rs46kwgMCe9bSBmDLYkkOMGg==",+ "version": "4.0.5",+ "resolved": "https://registry.npmjs.org/@types/tough-cookie/-/tough-cookie-4.0.5.tgz",+ "integrity": "sha512-/Ad8+nIOV7Rl++6f1BdKxFSMgmoqEoYbHRpPcx3JEfv8VRsQe9Z4mCXeJBzxs7mbHY/XOZZuXlRNfhpVPbs6ZA==","dev": true},"node_modules/@types/triple-beam": {- "version": "1.3.3",- "resolved": "https://registry.npmjs.org/@types/triple-beam/-/triple-beam-1.3.3.tgz",- "integrity": "sha512-6tOUG+nVHn0cJbVp25JFayS5UE6+xlbcNF9Lo9mU7U0zk3zeUShZied4YEQZjy1JBF043FSkdXw8YkUJuVtB5g=="+ "version": "1.3.5",+ "resolved": "https://registry.npmjs.org/@types/triple-beam/-/triple-beam-1.3.5.tgz",+ "integrity": "sha512-6WaYesThRMCl19iryMYP7/x2OVgCtbIVflDGFpWnb9irXI3UjYE4AzmYuiUKY1AJstGijoY+MgUszMgRxIYTYw=="},"node_modules/@types/unist": {- "version": "2.0.8",- "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.8.tgz",- "integrity": "sha512-d0XxK3YTObnWVp6rZuev3c49+j4Lo8g4L1ZRm9z5L0xpoZycUPshHgczK5gsUMaZOstjVYYi09p5gYvUtfChYw=="+ "version": "2.0.10",+ "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.10.tgz",+ "integrity": "sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA=="},"node_modules/@types/uuid": {- "version": "9.0.7",- "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-9.0.7.tgz",- "integrity": "sha512-WUtIVRUZ9i5dYXefDEAI7sh9/O7jGvHg7Df/5O/gtH3Yabe5odI3UWopVR1qbPXQtvOxWu3mM4XxlYeZtMWF4g=="+ "version": "9.0.8",+ "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-9.0.8.tgz",+ "integrity": "sha512-jg+97EGIcY9AGHJJRaaPVgetKDsrTgbRjQ5Msgjh/DQKEFl0DtyRr/VCOyD1T2R1MNeWPK/u7JoGhlDZnKBAfA=="},"node_modules/@types/webidl-conversions": {- "version": "7.0.0",- "resolved": "https://registry.npmjs.org/@types/webidl-conversions/-/webidl-conversions-7.0.0.tgz",- "integrity": "sha512-xTE1E+YF4aWPJJeUzaZI5DRntlkY3+BCVJi0axFptnjGmAoWxkyREIh/XMrfxVLejwQxMCfDXdICo0VLxThrog=="+ "version": "7.0.3",+ "resolved": "https://registry.npmjs.org/@types/webidl-conversions/-/webidl-conversions-7.0.3.tgz",+ "integrity": "sha512-CiJJvcRtIgzadHCYXw7dqEnMNRjhGZlYK05Mj9OyktqV8uVT8fD2BFOB7S1uwBE3Kj2Z+4UyPmFw/Ixgw/LAlA=="},"node_modules/@types/whatwg-url": {"version": "8.2.2",@@ -9359,18 +9032,18 @@}},"node_modules/@types/yargs": {- "version": "17.0.24",- "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.24.tgz",- "integrity": "sha512-6i0aC7jV6QzQB8ne1joVZ0eSFIstHsCrobmOtghM11yGlH0j43FKL2UhWdELkyps0zuf7qVTUVCCR+tgSlyLLw==",+ "version": "17.0.32",+ "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.32.tgz",+ "integrity": "sha512-xQ67Yc/laOG5uMfX/093MRlGGCIBzZMarVa+gfNKJxWAIgykYpVGkBdbqEzGDDfCrVUj6Hiff4mTZ5BA6TmAog==","dev": true,"dependencies": {"@types/yargs-parser": "*"}},"node_modules/@types/yargs-parser": {- "version": "21.0.0",- "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.0.tgz",- "integrity": "sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA==",+ "version": "21.0.3",+ "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.3.tgz",+ "integrity": "sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==","dev": true},"node_modules/@typescript-eslint/eslint-plugin": {@@ -9544,63 +9217,244 @@"eslint": "^6.0.0 || ^7.0.0 || ^8.0.0"}},- "node_modules/@typescript-eslint/visitor-keys": {- "version": "5.62.0",- "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.62.0.tgz",- "integrity": "sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw==",+ "node_modules/@typescript-eslint/visitor-keys": {+ "version": "5.62.0",+ "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.62.0.tgz",+ "integrity": "sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw==",+ "dev": true,+ "dependencies": {+ "@typescript-eslint/types": "5.62.0",+ "eslint-visitor-keys": "^3.3.0"+ },+ "engines": {+ "node": "^12.22.0 || ^14.17.0 || >=16.0.0"+ },+ "funding": {+ "type": "opencollective",+ "url": "https://opencollective.com/typescript-eslint"+ }+ },+ "node_modules/@ungap/structured-clone": {+ "version": "1.2.0",+ "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz",+ "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==",+ "dev": true+ },+ "node_modules/@vitejs/plugin-react": {+ "version": "4.2.1",+ "resolved": "https://registry.npmjs.org/@vitejs/plugin-react/-/plugin-react-4.2.1.tgz",+ "integrity": "sha512-oojO9IDc4nCUUi8qIR11KoQm0XFFLIwsRBwHRR4d/88IWghn1y6ckz/bJ8GHDCsYEJee8mDzqtJxh15/cisJNQ==",+ "dev": true,+ "dependencies": {+ "@babel/core": "^7.23.5",+ "@babel/plugin-transform-react-jsx-self": "^7.23.3",+ "@babel/plugin-transform-react-jsx-source": "^7.23.3",+ "@types/babel__core": "^7.20.5",+ "react-refresh": "^0.14.0"+ },+ "engines": {+ "node": "^14.18.0 || >=16.0.0"+ },+ "peerDependencies": {+ "vite": "^4.2.0 || ^5.0.0"+ }+ },+ "node_modules/@waylaidwanderer/fastify-sse-v2": {+ "version": "3.1.0",+ "resolved": "https://registry.npmjs.org/@waylaidwanderer/fastify-sse-v2/-/fastify-sse-v2-3.1.0.tgz",+ "integrity": "sha512-R6/VT14+iGZmyp7Jih7FYZuWr0B0gJ9uym1xoVPlKjZBngzFS2bL8yvZyEIPbMrTjrC8syZY2z2WuMHsipRfpw==",+ "dependencies": {+ "fastify-plugin": "^4.3.0",+ "it-pushable": "^1.4.2",+ "it-to-stream": "^1.0.0"+ },+ "peerDependencies": {+ "fastify": ">=4"+ }+ },+ "node_modules/@waylaidwanderer/fetch-event-source": {+ "version": "3.0.1",+ "resolved": "https://registry.npmjs.org/@waylaidwanderer/fetch-event-source/-/fetch-event-source-3.0.1.tgz",+ "integrity": "sha512-gkc7vmBW9uulRj7tY30/1D8iBrpcgphBpI+e7LP744x/hAzaQxUuyF+n4O5dctKx+dE3i4BFuCWMEz9fAx2jlQ==",+ "engines": {+ "node": ">=16.15"+ }+ },+ "node_modules/@webassemblyjs/ast": {+ "version": "1.11.6",+ "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.6.tgz",+ "integrity": "sha512-IN1xI7PwOvLPgjcf180gC1bqn3q/QaOCwYUahIOhbYUu8KA/3tw2RT/T0Gidi1l7Hhj5D/INhJxiICObqpMu4Q==",+ "dev": true,+ "peer": true,+ "dependencies": {+ "@webassemblyjs/helper-numbers": "1.11.6",+ "@webassemblyjs/helper-wasm-bytecode": "1.11.6"+ }+ },+ "node_modules/@webassemblyjs/floating-point-hex-parser": {+ "version": "1.11.6",+ "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.6.tgz",+ "integrity": "sha512-ejAj9hfRJ2XMsNHk/v6Fu2dGS+i4UaXBXGemOfQ/JfQ6mdQg/WXtwleQRLLS4OvfDhv8rYnVwH27YJLMyYsxhw==",+ "dev": true,+ "peer": true+ },+ "node_modules/@webassemblyjs/helper-api-error": {+ "version": "1.11.6",+ "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.6.tgz",+ "integrity": "sha512-o0YkoP4pVu4rN8aTJgAyj9hC2Sv5UlkzCHhxqWj8butaLvnpdc2jOwh4ewE6CX0txSfLn/UYaV/pheS2Txg//Q==",+ "dev": true,+ "peer": true+ },+ "node_modules/@webassemblyjs/helper-buffer": {+ "version": "1.11.6",+ "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.6.tgz",+ "integrity": "sha512-z3nFzdcp1mb8nEOFFk8DrYLpHvhKC3grJD2ardfKOzmbmJvEf/tPIqCY+sNcwZIY8ZD7IkB2l7/pqhUhqm7hLA==",+ "dev": true,+ "peer": true+ },+ "node_modules/@webassemblyjs/helper-numbers": {+ "version": "1.11.6",+ "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.6.tgz",+ "integrity": "sha512-vUIhZ8LZoIWHBohiEObxVm6hwP034jwmc9kuq5GdHZH0wiLVLIPcMCdpJzG4C11cHoQ25TFIQj9kaVADVX7N3g==",+ "dev": true,+ "peer": true,+ "dependencies": {+ "@webassemblyjs/floating-point-hex-parser": "1.11.6",+ "@webassemblyjs/helper-api-error": "1.11.6",+ "@xtuc/long": "4.2.2"+ }+ },+ "node_modules/@webassemblyjs/helper-wasm-bytecode": {+ "version": "1.11.6",+ "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.6.tgz",+ "integrity": "sha512-sFFHKwcmBprO9e7Icf0+gddyWYDViL8bpPjJJl0WHxCdETktXdmtWLGVzoHbqUcY4Be1LkNfwTmXOJUFZYSJdA==",+ "dev": true,+ "peer": true+ },+ "node_modules/@webassemblyjs/helper-wasm-section": {+ "version": "1.11.6",+ "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.6.tgz",+ "integrity": "sha512-LPpZbSOwTpEC2cgn4hTydySy1Ke+XEu+ETXuoyvuyezHO3Kjdu90KK95Sh9xTbmjrCsUwvWwCOQQNta37VrS9g==",+ "dev": true,+ "peer": true,+ "dependencies": {+ "@webassemblyjs/ast": "1.11.6",+ "@webassemblyjs/helper-buffer": "1.11.6",+ "@webassemblyjs/helper-wasm-bytecode": "1.11.6",+ "@webassemblyjs/wasm-gen": "1.11.6"+ }+ },+ "node_modules/@webassemblyjs/ieee754": {+ "version": "1.11.6",+ "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.11.6.tgz",+ "integrity": "sha512-LM4p2csPNvbij6U1f19v6WR56QZ8JcHg3QIJTlSwzFcmx6WSORicYj6I63f9yU1kEUtrpG+kjkiIAkevHpDXrg==",+ "dev": true,+ "peer": true,+ "dependencies": {+ "@xtuc/ieee754": "^1.2.0"+ }+ },+ "node_modules/@webassemblyjs/leb128": {+ "version": "1.11.6",+ "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.11.6.tgz",+ "integrity": "sha512-m7a0FhE67DQXgouf1tbN5XQcdWoNgaAuoULHIfGFIEVKA6tu/edls6XnIlkmS6FrXAquJRPni3ZZKjw6FSPjPQ==",+ "dev": true,+ "peer": true,+ "dependencies": {+ "@xtuc/long": "4.2.2"+ }+ },+ "node_modules/@webassemblyjs/utf8": {+ "version": "1.11.6",+ "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.11.6.tgz",+ "integrity": "sha512-vtXf2wTQ3+up9Zsg8sa2yWiQpzSsMyXj0qViVP6xKGCUT8p8YJ6HqI7l5eCnWx1T/FYdsv07HQs2wTFbbof/RA==","dev": true,+ "peer": true+ },+ "node_modules/@webassemblyjs/wasm-edit": {+ "version": "1.11.6",+ "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.6.tgz",+ "integrity": "sha512-Ybn2I6fnfIGuCR+Faaz7YcvtBKxvoLV3Lebn1tM4o/IAJzmi9AWYIPWpyBfU8cC+JxAO57bk4+zdsTjJR+VTOw==",+ "dev": true,+ "peer": true,"dependencies": {- "@typescript-eslint/types": "5.62.0",- "eslint-visitor-keys": "^3.3.0"- },- "engines": {- "node": "^12.22.0 || ^14.17.0 || >=16.0.0"- },- "funding": {- "type": "opencollective",- "url": "https://opencollective.com/typescript-eslint"+ "@webassemblyjs/ast": "1.11.6",+ "@webassemblyjs/helper-buffer": "1.11.6",+ "@webassemblyjs/helper-wasm-bytecode": "1.11.6",+ "@webassemblyjs/helper-wasm-section": "1.11.6",+ "@webassemblyjs/wasm-gen": "1.11.6",+ "@webassemblyjs/wasm-opt": "1.11.6",+ "@webassemblyjs/wasm-parser": "1.11.6",+ "@webassemblyjs/wast-printer": "1.11.6"}},- "node_modules/@vitejs/plugin-react": {- "version": "4.2.1",- "resolved": "https://registry.npmjs.org/@vitejs/plugin-react/-/plugin-react-4.2.1.tgz",- "integrity": "sha512-oojO9IDc4nCUUi8qIR11KoQm0XFFLIwsRBwHRR4d/88IWghn1y6ckz/bJ8GHDCsYEJee8mDzqtJxh15/cisJNQ==",+ "node_modules/@webassemblyjs/wasm-gen": {+ "version": "1.11.6",+ "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.6.tgz",+ "integrity": "sha512-3XOqkZP/y6B4F0PBAXvI1/bky7GryoogUtfwExeP/v7Nzwo1QLcq5oQmpKlftZLbT+ERUOAZVQjuNVak6UXjPA==","dev": true,+ "peer": true,"dependencies": {- "@babel/core": "^7.23.5",- "@babel/plugin-transform-react-jsx-self": "^7.23.3",- "@babel/plugin-transform-react-jsx-source": "^7.23.3",- "@types/babel__core": "^7.20.5",- "react-refresh": "^0.14.0"- },- "engines": {- "node": "^14.18.0 || >=16.0.0"- },- "peerDependencies": {- "vite": "^4.2.0 || ^5.0.0"+ "@webassemblyjs/ast": "1.11.6",+ "@webassemblyjs/helper-wasm-bytecode": "1.11.6",+ "@webassemblyjs/ieee754": "1.11.6",+ "@webassemblyjs/leb128": "1.11.6",+ "@webassemblyjs/utf8": "1.11.6"}},- "node_modules/@waylaidwanderer/fastify-sse-v2": {- "version": "3.1.0",- "resolved": "https://registry.npmjs.org/@waylaidwanderer/fastify-sse-v2/-/fastify-sse-v2-3.1.0.tgz",- "integrity": "sha512-R6/VT14+iGZmyp7Jih7FYZuWr0B0gJ9uym1xoVPlKjZBngzFS2bL8yvZyEIPbMrTjrC8syZY2z2WuMHsipRfpw==",+ "node_modules/@webassemblyjs/wasm-opt": {+ "version": "1.11.6",+ "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.6.tgz",+ "integrity": "sha512-cOrKuLRE7PCe6AsOVl7WasYf3wbSo4CeOk6PkrjS7g57MFfVUF9u6ysQBBODX0LdgSvQqRiGz3CXvIDKcPNy4g==",+ "dev": true,+ "peer": true,"dependencies": {- "fastify-plugin": "^4.3.0",- "it-pushable": "^1.4.2",- "it-to-stream": "^1.0.0"- },- "peerDependencies": {- "fastify": ">=4"+ "@webassemblyjs/ast": "1.11.6",+ "@webassemblyjs/helper-buffer": "1.11.6",+ "@webassemblyjs/wasm-gen": "1.11.6",+ "@webassemblyjs/wasm-parser": "1.11.6"}},- "node_modules/@waylaidwanderer/fetch-event-source": {- "version": "3.0.1",- "resolved": "https://registry.npmjs.org/@waylaidwanderer/fetch-event-source/-/fetch-event-source-3.0.1.tgz",- "integrity": "sha512-gkc7vmBW9uulRj7tY30/1D8iBrpcgphBpI+e7LP744x/hAzaQxUuyF+n4O5dctKx+dE3i4BFuCWMEz9fAx2jlQ==",- "engines": {- "node": ">=16.15"+ "node_modules/@webassemblyjs/wasm-parser": {+ "version": "1.11.6",+ "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.6.tgz",+ "integrity": "sha512-6ZwPeGzMJM3Dqp3hCsLgESxBGtT/OeCvCZ4TA1JUPYgmhAx38tTPR9JaKy0S5H3evQpO/h2uWs2j6Yc/fjkpTQ==",+ "dev": true,+ "peer": true,+ "dependencies": {+ "@webassemblyjs/ast": "1.11.6",+ "@webassemblyjs/helper-api-error": "1.11.6",+ "@webassemblyjs/helper-wasm-bytecode": "1.11.6",+ "@webassemblyjs/ieee754": "1.11.6",+ "@webassemblyjs/leb128": "1.11.6",+ "@webassemblyjs/utf8": "1.11.6"+ }+ },+ "node_modules/@webassemblyjs/wast-printer": {+ "version": "1.11.6",+ "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.11.6.tgz",+ "integrity": "sha512-JM7AhRcE+yW2GWYaKeHL5vt4xqee5N2WcezptmgyhNS+ScggqcT1OtXykhAb13Sn5Yas0j2uv9tHgrjwvzAP4A==",+ "dev": true,+ "peer": true,+ "dependencies": {+ "@webassemblyjs/ast": "1.11.6",+ "@xtuc/long": "4.2.2"}},+ "node_modules/@xtuc/ieee754": {+ "version": "1.2.0",+ "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz",+ "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==",+ "dev": true,+ "peer": true+ },+ "node_modules/@xtuc/long": {+ "version": "4.2.2",+ "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz",+ "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==",+ "dev": true,+ "peer": true+ },"node_modules/@zattoo/use-double-click": {"version": "1.2.0","resolved": "https://registry.npmjs.org/@zattoo/use-double-click/-/use-double-click-1.2.0.tgz",@@ -9613,6 +9467,7 @@"version": "2.0.6","resolved": "https://registry.npmjs.org/abab/-/abab-2.0.6.tgz","integrity": "sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA==",+ "deprecated": "Use your platform's native atob() and btoa() methods instead","devOptional": true},"node_modules/abbrev": {@@ -9650,9 +9505,9 @@}},"node_modules/acorn": {- "version": "8.10.0",- "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz",- "integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==",+ "version": "8.11.3",+ "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz",+ "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==","devOptional": true,"bin": {"acorn": "bin/acorn"@@ -9671,6 +9526,16 @@"acorn-walk": "^8.0.2"}},+ "node_modules/acorn-import-assertions": {+ "version": "1.9.0",+ "resolved": "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.9.0.tgz",+ "integrity": "sha512-cmMwop9x+8KFhxvKrKfPYmN6/pKTYYHBqLa0DfvVZcKMJWNyWLnaqND7dx/qn66R7ewM1UX5XMaDVP5wlVTaVA==",+ "dev": true,+ "peer": true,+ "peerDependencies": {+ "acorn": "^8"+ }+ },"node_modules/acorn-jsx": {"version": "5.3.2","resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz",@@ -9681,9 +9546,9 @@}},"node_modules/acorn-walk": {- "version": "8.2.0",- "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz",- "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==",+ "version": "8.3.2",+ "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.2.tgz",+ "integrity": "sha512-cjkyv4OtNCIeqhHrfS81QWXoCBPExR/J62oyEqepVw8WaQeSqpW2uhuLPh1m9eWhDuOo/jUXVTlifvesOWp/4A==","devOptional": true,"engines": {"node": ">=0.4.0"@@ -9763,6 +9628,16 @@"resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz","integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug=="},+ "node_modules/ajv-keywords": {+ "version": "3.5.2",+ "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz",+ "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==",+ "dev": true,+ "peer": true,+ "peerDependencies": {+ "ajv": "^6.9.1"+ }+ },"node_modules/ansi-align": {"version": "3.0.1","resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-3.0.1.tgz",@@ -9921,13 +9796,16 @@}},"node_modules/array-buffer-byte-length": {- "version": "1.0.0",- "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.0.tgz",- "integrity": "sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A==",+ "version": "1.0.1",+ "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.1.tgz",+ "integrity": "sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg==","dev": true,"dependencies": {- "call-bind": "^1.0.2",- "is-array-buffer": "^3.0.1"+ "call-bind": "^1.0.5",+ "is-array-buffer": "^3.0.4"+ },+ "engines": {+ "node": ">= 0.4"},"funding": {"url": "https://github.com/sponsors/ljharb"@@ -9966,6 +9844,25 @@"node": ">=8"}},+ "node_modules/array.prototype.filter": {+ "version": "1.0.3",+ "resolved": "https://registry.npmjs.org/array.prototype.filter/-/array.prototype.filter-1.0.3.tgz",+ "integrity": "sha512-VizNcj/RGJiUyQBgzwxzE5oHdeuXY5hSbbmKMlphj1cy1Vl7Pn2asCGbSrru6hSQjmCzqTBPVWAF/whmEOVHbw==",+ "dev": true,+ "dependencies": {+ "call-bind": "^1.0.2",+ "define-properties": "^1.2.0",+ "es-abstract": "^1.22.1",+ "es-array-method-boxes-properly": "^1.0.0",+ "is-string": "^1.0.7"+ },+ "engines": {+ "node": ">= 0.4"+ },+ "funding": {+ "url": "https://github.com/sponsors/ljharb"+ }+ },"node_modules/array.prototype.findlastindex": {"version": "1.2.3","resolved": "https://registry.npmjs.org/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.3.tgz",@@ -10022,30 +9919,31 @@}},"node_modules/array.prototype.tosorted": {- "version": "1.1.2",- "resolved": "https://registry.npmjs.org/array.prototype.tosorted/-/array.prototype.tosorted-1.1.2.tgz",- "integrity": "sha512-HuQCHOlk1Weat5jzStICBCd83NxiIMwqDg/dHEsoefabn/hJRj5pVdWcPUSpRrwhwxZOsQassMpgN/xRYFBMIg==",+ "version": "1.1.3",+ "resolved": "https://registry.npmjs.org/array.prototype.tosorted/-/array.prototype.tosorted-1.1.3.tgz",+ "integrity": "sha512-/DdH4TiTmOKzyQbp/eadcCVexiCb36xJg7HshYOYJnNZFDj33GEv0P7GxsynpShhq4OLYJzbGcBDkLsDt7MnNg==","dev": true,"dependencies": {- "call-bind": "^1.0.2",- "define-properties": "^1.2.0",- "es-abstract": "^1.22.1",- "es-shim-unscopables": "^1.0.0",- "get-intrinsic": "^1.2.1"+ "call-bind": "^1.0.5",+ "define-properties": "^1.2.1",+ "es-abstract": "^1.22.3",+ "es-errors": "^1.1.0",+ "es-shim-unscopables": "^1.0.2"}},"node_modules/arraybuffer.prototype.slice": {- "version": "1.0.2",- "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.2.tgz",- "integrity": "sha512-yMBKppFur/fbHu9/6USUe03bZ4knMYiwFBcyiaXB8Go0qNehwX6inYPzK9U0NeQvGxKthcmHcaR8P5MStSRBAw==",+ "version": "1.0.3",+ "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.3.tgz",+ "integrity": "sha512-bMxMKAjg13EBSVscxTaYA4mRc5t1UAXa2kXiGTNfZ079HIWXEkKmkgFrh/nJqamaLSrXO5H4WFFkPEaLJWbs3A==","dev": true,"dependencies": {- "array-buffer-byte-length": "^1.0.0",- "call-bind": "^1.0.2",- "define-properties": "^1.2.0",- "es-abstract": "^1.22.1",- "get-intrinsic": "^1.2.1",- "is-array-buffer": "^3.0.2",+ "array-buffer-byte-length": "^1.0.1",+ "call-bind": "^1.0.5",+ "define-properties": "^1.2.1",+ "es-abstract": "^1.22.3",+ "es-errors": "^1.2.1",+ "get-intrinsic": "^1.2.3",+ "is-array-buffer": "^3.0.4","is-shared-array-buffer": "^1.0.2"},"engines": {@@ -10102,9 +10000,9 @@}},"node_modules/async": {- "version": "3.2.4",- "resolved": "https://registry.npmjs.org/async/-/async-3.2.4.tgz",- "integrity": "sha512-iAB+JbDEGXhyIUavoDl9WP/Jj106Kz9DEn1DPgYw5ruDn0e3Wgi3sKFm55sASdGBNOQB8F59d9qQ7deqrHA8wQ=="+ "version": "3.2.5",+ "resolved": "https://registry.npmjs.org/async/-/async-3.2.5.tgz",+ "integrity": "sha512-baNZyqaaLhyLVKm/DlvdW051MSgO6b8eVfIezl9E5PqWxFgzLm/wQntEW4zOytVburDEr0JlALEpdOFwvErLsg=="},"node_modules/asynciterator.prototype": {"version": "1.0.0",@@ -10129,9 +10027,9 @@}},"node_modules/autoprefixer": {- "version": "10.4.15",- "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.15.tgz",- "integrity": "sha512-KCuPB8ZCIqFdA4HwKXsvz7j6gvSDNhDP7WnUjBleRkKjPdvCmHFuQ77ocavI8FT6NdvlBnE2UFr2H4Mycn8Vew==",+ "version": "10.4.17",+ "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.17.tgz",+ "integrity": "sha512-/cpVNRLSfhOtcGflT13P2794gVSgmPgTR+erw5ifnMLZb0UnSlkK4tquLmkd3BhA+nLo5tX8Cu0upUsGKvKbmg==","dev": true,"funding": [{@@ -10148,9 +10046,9 @@}],"dependencies": {- "browserslist": "^4.21.10",- "caniuse-lite": "^1.0.30001520",- "fraction.js": "^4.2.0",+ "browserslist": "^4.22.2",+ "caniuse-lite": "^1.0.30001578",+ "fraction.js": "^4.3.7","normalize-range": "^0.1.2","picocolors": "^1.0.0","postcss-value-parser": "^4.2.0"@@ -10166,9 +10064,9 @@}},"node_modules/available-typed-arrays": {- "version": "1.0.5",- "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz",- "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==",+ "version": "1.0.6",+ "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.6.tgz",+ "integrity": "sha512-j1QzY8iPNPG4o4xmO3ptzpRxTciqD3MgEHtifP/YnJpIo58Xu+ne4BejlbkuaLfXn/nz6HFiw29bLpj2PNMdGg==","dev": true,"engines": {"node": ">= 0.4"@@ -10178,21 +10076,22 @@}},"node_modules/avvio": {- "version": "8.2.1",- "resolved": "https://registry.npmjs.org/avvio/-/avvio-8.2.1.tgz",- "integrity": "sha512-TAlMYvOuwGyLK3PfBb5WKBXZmXz2fVCgv23d6zZFdle/q3gPjmxBaeuC0pY0Dzs5PWMSgfqqEZkrye19GlDTgw==",+ "version": "8.3.0",+ "resolved": "https://registry.npmjs.org/avvio/-/avvio-8.3.0.tgz",+ "integrity": "sha512-VBVH0jubFr9LdFASy/vNtm5giTrnbVquWBhT0fyizuNK2rQ7e7ONU2plZQWUNqtE1EmxFEb+kbSkFRkstiaS9Q==","dependencies": {+ "@fastify/error": "^3.3.0","archy": "^1.0.0","debug": "^4.0.0",- "fastq": "^1.6.1"+ "fastq": "^1.17.1"}},"node_modules/axios": {- "version": "1.6.1",- "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.1.tgz",- "integrity": "sha512-vfBmhDpKafglh0EldBEbVuoe7DyAavGSLWhuSm5ZSEKQnHhBf0xAAwybbNH1IkrJNGnS/VG4I5yxig1pCEXE4g==",+ "version": "1.6.7",+ "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.7.tgz",+ "integrity": "sha512-/hDJGff6/c7u0hDkvkGxR/oy6CbCs8ziCsC7SqmhjfozqiJGc8Z11wrv9z9lYfY4K8l+H9TpjcMDX0xOZmx+RA==","dependencies": {- "follow-redirects": "^1.15.0",+ "follow-redirects": "^1.15.4","form-data": "^4.0.0","proxy-from-env": "^1.1.0"}@@ -10223,6 +10122,15 @@"@babel/core": "^7.8.0"}},+ "node_modules/babel-jest/node_modules/slash": {+ "version": "3.0.0",+ "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz",+ "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==",+ "dev": true,+ "engines": {+ "node": ">=8"+ }+ },"node_modules/babel-plugin-istanbul": {"version": "6.1.1","resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz",@@ -10280,13 +10188,13 @@}},"node_modules/babel-plugin-polyfill-corejs2": {- "version": "0.4.5",- "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.4.5.tgz",- "integrity": "sha512-19hwUH5FKl49JEsvyTcoHakh6BE0wgXLLptIyKZ3PijHc/Ci521wygORCUCCred+E/twuqRyAkE02BAWPmsHOg==",+ "version": "0.4.8",+ "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.4.8.tgz",+ "integrity": "sha512-OtIuQfafSzpo/LhnJaykc0R/MMnuLSSVjVYy9mHArIZ9qTCSZ6TpWCuEKZYVoN//t8HqBNScHrOtCrIK5IaGLg==","dev": true,"dependencies": {"@babel/compat-data": "^7.22.6",- "@babel/helper-define-polyfill-provider": "^0.4.2",+ "@babel/helper-define-polyfill-provider": "^0.5.0","semver": "^6.3.1"},"peerDependencies": {@@ -10303,25 +10211,25 @@}},"node_modules/babel-plugin-polyfill-corejs3": {- "version": "0.8.3",- "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.8.3.tgz",- "integrity": "sha512-z41XaniZL26WLrvjy7soabMXrfPWARN25PZoriDEiLMxAp50AUW3t35BGQUMg5xK3UrpVTtagIDklxYa+MhiNA==",+ "version": "0.9.0",+ "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.9.0.tgz",+ "integrity": "sha512-7nZPG1uzK2Ymhy/NbaOWTg3uibM2BmGASS4vHS4szRZAIR8R6GwA/xAujpdrXU5iyklrimWnLWU+BLF9suPTqg==","dev": true,"dependencies": {- "@babel/helper-define-polyfill-provider": "^0.4.2",- "core-js-compat": "^3.31.0"+ "@babel/helper-define-polyfill-provider": "^0.5.0",+ "core-js-compat": "^3.34.0"},"peerDependencies": {"@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0"}},"node_modules/babel-plugin-polyfill-regenerator": {- "version": "0.5.2",- "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.5.2.tgz",- "integrity": "sha512-tAlOptU0Xj34V1Y2PNTL4Y0FOJMDB6bZmoW39FeCQIhigGLkqu3Fj6uiXpxIf6Ij274ENdYx64y6Au+ZKlb1IA==",+ "version": "0.5.5",+ "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.5.5.tgz",+ "integrity": "sha512-OJGYZlhLqBh2DDHeqAxWB1XIvr49CxiJ2gIt61/PU55CQK4Z58OzMqjDe1zwQdQk+rBYsRc+1rJmdajM3gimHg==","dev": true,"dependencies": {- "@babel/helper-define-polyfill-provider": "^0.4.2"+ "@babel/helper-define-polyfill-provider": "^0.5.0"},"peerDependencies": {"@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0"@@ -10342,6 +10250,15 @@"slash": "^3.0.0"}},+ "node_modules/babel-plugin-root-import/node_modules/slash": {+ "version": "3.0.0",+ "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz",+ "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==",+ "dev": true,+ "engines": {+ "node": ">=8"+ }+ },"node_modules/babel-plugin-transform-import-meta": {"version": "2.2.1","resolved": "https://registry.npmjs.org/babel-plugin-transform-import-meta/-/babel-plugin-transform-import-meta-2.2.1.tgz",@@ -10616,6 +10533,7 @@"version": "1.1.11","resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz","integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",+ "dev": true,"dependencies": {"balanced-match": "^1.0.0","concat-map": "0.0.1"@@ -10738,9 +10656,9 @@}},"node_modules/browserslist": {- "version": "4.22.2",- "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.22.2.tgz",- "integrity": "sha512-0UgcrvQmBDvZHFGdYUehrCNIazki7/lUP3kkoi/r3YB2amZbFM9J43ZRkJTXBUZK4gmx56+Sqk9+Vs9mwZx9+A==",+ "version": "4.22.3",+ "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.22.3.tgz",+ "integrity": "sha512-UAp55yfwNv0klWNapjs/ktHoguxuQNGnOzxYmfnXIS+8AsRDZkSDxg7R1AX3GKzn078SBI5dzwzj/Yx0Or0e3A==","dev": true,"funding": [{@@ -10757,8 +10675,8 @@}],"dependencies": {- "caniuse-lite": "^1.0.30001565",- "electron-to-chromium": "^1.4.601",+ "caniuse-lite": "^1.0.30001580",+ "electron-to-chromium": "^1.4.648","node-releases": "^2.0.14","update-browserslist-db": "^1.0.13"},@@ -10791,9 +10709,9 @@}},"node_modules/bson": {- "version": "5.5.0",- "resolved": "https://registry.npmjs.org/bson/-/bson-5.5.0.tgz",- "integrity": "sha512-B+QB4YmDx9RStKv8LLSl/aVIEV3nYJc3cJNNTK2Cd1TL+7P+cNpw9mAPeCgc5K+j01Dv6sxUzcITXDx7ZU3F0w==",+ "version": "5.5.1",+ "resolved": "https://registry.npmjs.org/bson/-/bson-5.5.1.tgz",+ "integrity": "sha512-ix0EwukN2EpC0SRWIj/7B5+A6uQMQy6KMREI9qQqvgpkV2frH63T0UDVd1SYedL6dNCmDBYB3QtXi4ISk9YT+g==","engines": {"node": ">=14.20.1"}@@ -10900,12 +10818,13 @@}},"node_modules/call-bind": {- "version": "1.0.2",- "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz",- "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==",+ "version": "1.0.5",+ "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.5.tgz",+ "integrity": "sha512-C3nQxfFZxFRVoJoGKKI8y3MOEo129NQ+FgQ08iye+Mk4zNZZGdjfs06bVTr+DBSlA66Q2VEcMki/cUCP4SercQ==","dependencies": {- "function-bind": "^1.1.1",- "get-intrinsic": "^1.0.2"+ "function-bind": "^1.1.2",+ "get-intrinsic": "^1.2.1",+ "set-function-length": "^1.1.1"},"funding": {"url": "https://github.com/sponsors/ljharb"@@ -10931,12 +10850,14 @@}},"node_modules/camelcase": {- "version": "5.3.1",- "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz",- "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==",- "dev": true,+ "version": "6.3.0",+ "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz",+ "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==","engines": {- "node": ">=6"+ "node": ">=10"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"}},"node_modules/camelcase-css": {@@ -10965,18 +10886,6 @@"url": "https://github.com/sponsors/sindresorhus"}},- "node_modules/camelcase-keys/node_modules/camelcase": {- "version": "6.3.0",- "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz",- "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==",- "dev": true,- "engines": {- "node": ">=10"- },- "funding": {- "url": "https://github.com/sponsors/sindresorhus"- }- },"node_modules/camelcase-keys/node_modules/type-fest": {"version": "1.4.0","resolved": "https://registry.npmjs.org/type-fest/-/type-fest-1.4.0.tgz",@@ -10990,9 +10899,9 @@}},"node_modules/caniuse-lite": {- "version": "1.0.30001568",- "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001568.tgz",- "integrity": "sha512-vSUkH84HontZJ88MiNrOau1EBrCqEQYgkC5gIySiDlpsm8sGVrhU7Kx4V6h0tnqaHzIHZv08HlJIwPbL4XL9+A==",+ "version": "1.0.30001584",+ "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001584.tgz",+ "integrity": "sha512-LOz7CCQ9M1G7OjJOF9/mzmqmj3jE/7VOmrfw6Mgs0E8cjOsbRXQJHsPBfmBOXDskXKrHLyyW3n7kpDW/4BsfpQ==","dev": true,"funding": [{@@ -11143,10 +11052,20 @@"resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz","integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg=="},+ "node_modules/chrome-trace-event": {+ "version": "1.0.3",+ "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz",+ "integrity": "sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg==",+ "dev": true,+ "peer": true,+ "engines": {+ "node": ">=6.0"+ }+ },"node_modules/ci-info": {- "version": "3.8.0",- "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.8.0.tgz",- "integrity": "sha512-eXTggHWSooYhq49F2opQhuHWgzucfF2YgODK4e1566GQs5BIfP30B0oenwBJHfWxAs2fyPB1s7Mg949zLf61Yw==",+ "version": "3.9.0",+ "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.9.0.tgz",+ "integrity": "sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==","dev": true,"funding": [{@@ -11186,14 +11105,14 @@}},"node_modules/classnames": {- "version": "2.3.2",- "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.3.2.tgz",- "integrity": "sha512-CSbhY4cFEJRe6/GQzIk5qXZ4Jeg5pcsP7b5peFSDpffpe1cqjASH/n9UTjBwOp6XpMSTwQ8Za2K5V02ueA7Tmw=="+ "version": "2.5.1",+ "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.5.1.tgz",+ "integrity": "sha512-saHYOzhIQs6wy2sVxTM6bUDsQO4F50V9RQ22qBpEdCW+I+/Wmke2HOl6lS6dTpdxVhb88/I6+Hs+438c3lfUow=="},"node_modules/clean-css": {- "version": "5.3.2",- "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-5.3.2.tgz",- "integrity": "sha512-JVJbM+f3d3Q704rF4bqQ5UUyTtuJ0JRKNbTKVEeujCCBoMdkEi+V+e8oktO9qGQNSvHrFTM6JZRXrUvGR1czww==",+ "version": "5.3.3",+ "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-5.3.3.tgz",+ "integrity": "sha512-D5J+kHaVb/wKSFcyyV75uCn8fiY4sV38XJoe4CUyGQ+mOU/fMVYUdH1hJC+CJQ5uY3EnW27SbJYS4X8BiLrAFg==","dev": true,"dependencies": {"source-map": "~0.6.0"@@ -11228,9 +11147,9 @@}},"node_modules/cli-spinners": {- "version": "2.9.1",- "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.9.1.tgz",- "integrity": "sha512-jHgecW0pxkonBJdrKsqxgRX9AcG+u/5k0Q7WPDfi8AogLAdwxEkyYYNWwZ5GvVFoFx2uiY1eNcSK00fh+1+FyQ==",+ "version": "2.9.2",+ "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.9.2.tgz",+ "integrity": "sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==","engines": {"node": ">=6"},@@ -11372,6 +11291,11 @@"node": ">= 0.12.0"}},+ "node_modules/cohere-ai": {+ "version": "6.2.2",+ "resolved": "https://registry.npmjs.org/cohere-ai/-/cohere-ai-6.2.2.tgz",+ "integrity": "sha512-+Tq+4e8N/YWKJqFpWaULsfbZR/GOvGh8WWYFKR1bpipu8bCok3VcbTPnBmIToQiIqOgFpGk3HsA4b0guVyL3vg=="+ },"node_modules/collect-v8-coverage": {"version": "1.0.2","resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.2.tgz",@@ -11473,12 +11397,11 @@}},"node_modules/commander": {- "version": "11.0.0",- "resolved": "https://registry.npmjs.org/commander/-/commander-11.0.0.tgz",- "integrity": "sha512-9HMlXtt/BNoYr8ooyjjNRdIilOTkVJXB+GhxMTtOKwk0R4j4lS4NpjuqmRxroBfnfTSHQIHQB7wryHhXarNjmQ==",- "dev": true,+ "version": "10.0.1",+ "resolved": "https://registry.npmjs.org/commander/-/commander-10.0.1.tgz",+ "integrity": "sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==","engines": {- "node": ">=16"+ "node": ">=14"}},"node_modules/common-tags": {@@ -11497,15 +11420,19 @@"dev": true},"node_modules/component-emitter": {- "version": "1.3.0",- "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz",- "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==",- "dev": true+ "version": "1.3.1",+ "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.1.tgz",+ "integrity": "sha512-T0+barUSQRTUQASh8bx02dl+DhF54GtIDY13Y3m9oWTklKbb3Wv974meRpeZ3lp1JpLVECWWNHC4vaG2XHXouQ==",+ "dev": true,+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }},"node_modules/concat-map": {"version": "0.0.1","resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",- "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg=="+ "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==",+ "dev": true},"node_modules/concat-stream": {"version": "1.6.2",@@ -11537,9 +11464,9 @@}},"node_modules/connect-redis": {- "version": "7.1.0",- "resolved": "https://registry.npmjs.org/connect-redis/-/connect-redis-7.1.0.tgz",- "integrity": "sha512-UaqO1EirWjON2ENsyau7N5lbkrdYBpS6mYlXSeff/OYXsd6EGZ+SXSmNPoljL2PSua8fgjAEaldSA73PMZQ9Eg==",+ "version": "7.1.1",+ "resolved": "https://registry.npmjs.org/connect-redis/-/connect-redis-7.1.1.tgz",+ "integrity": "sha512-M+z7alnCJiuzKa8/1qAYdGUXHYfDnLolOGAUjOioB07pP39qxjG+X9ibsud7qUBc4jMV5Mcy3ugGv8eFcgamJQ==","engines": {"node": ">=16"},@@ -11585,9 +11512,9 @@}},"node_modules/convert-source-map": {- "version": "1.9.0",- "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz",- "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==",+ "version": "2.0.0",+ "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz",+ "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==","dev": true},"node_modules/cookie": {@@ -11633,9 +11560,9 @@}},"node_modules/core-js": {- "version": "3.32.2",- "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.32.2.tgz",- "integrity": "sha512-pxXSw1mYZPDGvTQqEc5vgIb83jGQKFGYWY76z4a7weZXUolw3G+OvpZqSRcfYOoOVUQJYEPsWeQK8pKEnUtWxQ==",+ "version": "3.35.1",+ "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.35.1.tgz",+ "integrity": "sha512-IgdsbxNyMskrTFxa9lWHyMwAJU5gXOPP+1yO+K59d50VLVAIDAbs7gIv705KzALModfK3ZrSZTPNpC0PQgIZuw==","dev": true,"hasInstallScript": true,"funding": {@@ -11644,12 +11571,12 @@}},"node_modules/core-js-compat": {- "version": "3.32.2",- "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.32.2.tgz",- "integrity": "sha512-+GjlguTDINOijtVRUxrQOv3kfu9rl+qPNdX2LTbJ/ZyVTuxK+ksVSAGX1nHstu4hrv1En/uPTtWgq2gI5wt4AQ==",+ "version": "3.35.1",+ "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.35.1.tgz",+ "integrity": "sha512-sftHa5qUJY3rs9Zht1WEnmkvXputCyDBczPnr7QDgL8n3qrF3CMXY4VPSYtOLLiOUJcah2WNXREd48iOl6mQIw==","dev": true,"dependencies": {- "browserslist": "^4.21.10"+ "browserslist": "^4.22.2"},"funding": {"type": "opencollective",@@ -11926,9 +11853,9 @@"dev": true},"node_modules/cssdb": {- "version": "7.7.2",- "resolved": "https://registry.npmjs.org/cssdb/-/cssdb-7.7.2.tgz",- "integrity": "sha512-pQPYP7/kch4QlkTcLuUNiNL2v/E+O+VIdotT+ug62/+2B2/jkzs5fMM6RHCzGCZ9C82pODEMSIzRRUzJOrl78g==",+ "version": "7.10.0",+ "resolved": "https://registry.npmjs.org/cssdb/-/cssdb-7.10.0.tgz",+ "integrity": "sha512-yGZ5tmA57gWh/uvdQBHs45wwFY0IBh3ypABk5sEubPBPSzXzkNgsWReqx7gdx6uhC+QoFBe+V8JwBB9/hQ6cIA==","dev": true,"funding": [{@@ -11983,9 +11910,9 @@"devOptional": true},"node_modules/csstype": {- "version": "3.1.2",- "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.2.tgz",- "integrity": "sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ=="+ "version": "3.1.3",+ "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz",+ "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw=="},"node_modules/data-urls": {"version": "3.0.2",@@ -12081,15 +12008,15 @@}},"node_modules/deep-equal": {- "version": "2.2.2",- "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-2.2.2.tgz",- "integrity": "sha512-xjVyBf0w5vH0I42jdAZzOKVldmPgSulmiyPRywoyq7HXC9qdgo17kxJE+rdnif5Tz6+pIrpJI8dCpMNLIGkUiA==",+ "version": "2.2.3",+ "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-2.2.3.tgz",+ "integrity": "sha512-ZIwpnevOurS8bpT4192sqAowWM76JDKSHYzMLty3BZGSswgq6pBaH3DhCSW5xVAZICZyKdOBPjwww5wfgT/6PA==","dev": true,"dependencies": {"array-buffer-byte-length": "^1.0.0",- "call-bind": "^1.0.2",+ "call-bind": "^1.0.5","es-get-iterator": "^1.1.3",- "get-intrinsic": "^1.2.1",+ "get-intrinsic": "^1.2.2","is-arguments": "^1.1.1","is-array-buffer": "^3.0.2","is-date-object": "^1.0.5",@@ -12099,16 +12026,25 @@"object-is": "^1.1.5","object-keys": "^1.1.1","object.assign": "^4.1.4",- "regexp.prototype.flags": "^1.5.0",+ "regexp.prototype.flags": "^1.5.1","side-channel": "^1.0.4","which-boxed-primitive": "^1.0.2","which-collection": "^1.0.1",- "which-typed-array": "^1.1.9"+ "which-typed-array": "^1.1.13"+ },+ "engines": {+ "node": ">= 0.4"},"funding": {"url": "https://github.com/sponsors/ljharb"}},+ "node_modules/deep-equal/node_modules/isarray": {+ "version": "2.0.5",+ "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz",+ "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==",+ "dev": true+ },"node_modules/deep-extend": {"version": "0.6.0","resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz",@@ -12144,10 +12080,9 @@}},"node_modules/define-data-property": {- "version": "1.1.0",- "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.0.tgz",- "integrity": "sha512-UzGwzcjyv3OtAvolTj1GoyNYzfFR+iqbGjcnBEENZVCpM4/Ng1yhGNvS3lR/xDS74Tb2wGG9WzNSNIOS9UVb2g==",- "dev": true,+ "version": "1.1.1",+ "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.1.tgz",+ "integrity": "sha512-E7uGkTzkk1d0ByLeSc6ZsFS79Axg+m1P/VsgYsxHgiuc3tFSj+MjMIwe90FC4lOAZzNBdY7kkO2P2wKdsQ1vgQ==","dependencies": {"get-intrinsic": "^1.2.1","gopd": "^1.0.1",@@ -12408,6 +12343,7 @@"version": "4.0.0","resolved": "https://registry.npmjs.org/domexception/-/domexception-4.0.0.tgz","integrity": "sha512-A2is4PLG+eeSfoTMA95/s4pvAoSo2mKtiM5jlHkAVewmiO8ISFTFKZjH7UAM1Atli/OT/7JHOrJRJiMKUZKYBw==",+ "deprecated": "Use your platform's native DOMException instead","devOptional": true,"dependencies": {"webidl-conversions": "^7.0.0"@@ -12454,9 +12390,9 @@}},"node_modules/dotenv": {- "version": "16.3.1",- "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.3.1.tgz",- "integrity": "sha512-IPzF4w4/Rd94bA9imS68tZBaYyBWSCE47V1RGuMrB94iyTOIEwRmVL2x/4An+6mETpLrKJ5hQkB8W4kFAadeIQ==",+ "version": "16.4.1",+ "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.1.tgz",+ "integrity": "sha512-CjA3y+Dr3FyFDOAMnxZEGtnW9KBR2M0JvvUtXNW+dYJL5ROWxP9DUHCwgFqpMk0OXCc0ljhaNTr2w/kutYIcHQ==","engines": {"node": ">=12"},@@ -12512,9 +12448,9 @@}},"node_modules/electron-to-chromium": {- "version": "1.4.609",- "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.609.tgz",- "integrity": "sha512-ihiCP7PJmjoGNuLpl7TjNA8pCQWu09vGyjlPYw1Rqww4gvNuCcmvl+44G+2QyJ6S2K4o+wbTS++Xz0YN8Q9ERw==",+ "version": "1.4.656",+ "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.656.tgz",+ "integrity": "sha512-9AQB5eFTHyR3Gvt2t/NwR0le2jBSUNwCnMbUCejFWHD+so4tH40/dRLgoE+jxlPeWS43XJewyvCv+I8LPMl49Q==","dev": true},"node_modules/elliptic": {@@ -12610,26 +12546,26 @@}},"node_modules/es-abstract": {- "version": "1.22.1",- "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.22.1.tgz",- "integrity": "sha512-ioRRcXMO6OFyRpyzV3kE1IIBd4WG5/kltnzdxSCqoP8CMGs/Li+M1uF5o7lOkZVFjDs+NLesthnF66Pg/0q0Lw==",+ "version": "1.22.3",+ "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.22.3.tgz",+ "integrity": "sha512-eiiY8HQeYfYH2Con2berK+To6GrK2RxbPawDkGq4UiCQQfZHb6wX9qQqkbpPqaxQFcl8d9QzZqo0tGE0VcrdwA==","dev": true,"dependencies": {"array-buffer-byte-length": "^1.0.0",- "arraybuffer.prototype.slice": "^1.0.1",+ "arraybuffer.prototype.slice": "^1.0.2","available-typed-arrays": "^1.0.5",- "call-bind": "^1.0.2",+ "call-bind": "^1.0.5","es-set-tostringtag": "^2.0.1","es-to-primitive": "^1.2.1",- "function.prototype.name": "^1.1.5",- "get-intrinsic": "^1.2.1",+ "function.prototype.name": "^1.1.6",+ "get-intrinsic": "^1.2.2","get-symbol-description": "^1.0.0","globalthis": "^1.0.3","gopd": "^1.0.1",- "has": "^1.0.3","has-property-descriptors": "^1.0.0","has-proto": "^1.0.1","has-symbols": "^1.0.3",+ "hasown": "^2.0.0","internal-slot": "^1.0.5","is-array-buffer": "^3.0.2","is-callable": "^1.2.7",@@ -12637,23 +12573,23 @@"is-regex": "^1.1.4","is-shared-array-buffer": "^1.0.2","is-string": "^1.0.7",- "is-typed-array": "^1.1.10",+ "is-typed-array": "^1.1.12","is-weakref": "^1.0.2",- "object-inspect": "^1.12.3",+ "object-inspect": "^1.13.1","object-keys": "^1.1.1","object.assign": "^4.1.4",- "regexp.prototype.flags": "^1.5.0",- "safe-array-concat": "^1.0.0",+ "regexp.prototype.flags": "^1.5.1",+ "safe-array-concat": "^1.0.1","safe-regex-test": "^1.0.0",- "string.prototype.trim": "^1.2.7",- "string.prototype.trimend": "^1.0.6",- "string.prototype.trimstart": "^1.0.6",+ "string.prototype.trim": "^1.2.8",+ "string.prototype.trimend": "^1.0.7",+ "string.prototype.trimstart": "^1.0.7","typed-array-buffer": "^1.0.0","typed-array-byte-length": "^1.0.0","typed-array-byte-offset": "^1.0.0","typed-array-length": "^1.0.4","unbox-primitive": "^1.0.2",- "which-typed-array": "^1.1.10"+ "which-typed-array": "^1.1.13"},"engines": {"node": ">= 0.4"@@ -12662,6 +12598,20 @@"url": "https://github.com/sponsors/ljharb"}},+ "node_modules/es-array-method-boxes-properly": {+ "version": "1.0.0",+ "resolved": "https://registry.npmjs.org/es-array-method-boxes-properly/-/es-array-method-boxes-properly-1.0.0.tgz",+ "integrity": "sha512-wd6JXUmyHmt8T5a2xreUwKcGPq6f1f+WwIJkijUqiGcJz1qqnZgP6XIK+QyIWU5lT7imeNxUll48bziG+TSYcA==",+ "dev": true+ },+ "node_modules/es-errors": {+ "version": "1.3.0",+ "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz",+ "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==",+ "engines": {+ "node": ">= 0.4"+ }+ },"node_modules/es-get-iterator": {"version": "1.1.3","resolved": "https://registry.npmjs.org/es-get-iterator/-/es-get-iterator-1.1.3.tgz",@@ -12682,15 +12632,21 @@"url": "https://github.com/sponsors/ljharb"}},+ "node_modules/es-get-iterator/node_modules/isarray": {+ "version": "2.0.5",+ "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz",+ "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==",+ "dev": true+ },"node_modules/es-iterator-helpers": {- "version": "1.0.14",- "resolved": "https://registry.npmjs.org/es-iterator-helpers/-/es-iterator-helpers-1.0.14.tgz",- "integrity": "sha512-JgtVnwiuoRuzLvqelrvN3Xu7H9bu2ap/kQ2CrM62iidP8SKuD99rWU3CJy++s7IVL2qb/AjXPGR/E7i9ngd/Cw==",+ "version": "1.0.15",+ "resolved": "https://registry.npmjs.org/es-iterator-helpers/-/es-iterator-helpers-1.0.15.tgz",+ "integrity": "sha512-GhoY8uYqd6iwUl2kgjTm4CZAf6oo5mHK7BPqx3rKgx893YSsy0LGHV6gfqqQvZt/8xM8xeOnfXBCfqclMKkJ5g==","dev": true,"dependencies": {"asynciterator.prototype": "^1.0.0","call-bind": "^1.0.2",- "define-properties": "^1.2.0",+ "define-properties": "^1.2.1","es-abstract": "^1.22.1","es-set-tostringtag": "^2.0.1","function-bind": "^1.1.1",@@ -12700,31 +12656,38 @@"has-proto": "^1.0.1","has-symbols": "^1.0.3","internal-slot": "^1.0.5",- "iterator.prototype": "^1.1.0",- "safe-array-concat": "^1.0.0"+ "iterator.prototype": "^1.1.2",+ "safe-array-concat": "^1.0.1"}},+ "node_modules/es-module-lexer": {+ "version": "1.4.1",+ "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.4.1.tgz",+ "integrity": "sha512-cXLGjP0c4T3flZJKQSuziYoq7MlT+rnvfZjfp7h+I7K9BNX54kP9nyWvdbwjQ4u1iWbOL4u96fgeZLToQlZC7w==",+ "dev": true,+ "peer": true+ },"node_modules/es-set-tostringtag": {- "version": "2.0.1",- "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.1.tgz",- "integrity": "sha512-g3OMbtlwY3QewlqAiMLI47KywjWZoEytKr8pf6iTC8uJq5bIAH52Z9pnQ8pVL6whrCto53JZDuUIsifGeLorTg==",+ "version": "2.0.2",+ "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.2.tgz",+ "integrity": "sha512-BuDyupZt65P9D2D2vA/zqcI3G5xRsklm5N3xCwuiy+/vKy8i0ifdsQP1sLgO4tZDSCaQUSnmC48khknGMV3D2Q==","dev": true,"dependencies": {- "get-intrinsic": "^1.1.3",- "has": "^1.0.3",- "has-tostringtag": "^1.0.0"+ "get-intrinsic": "^1.2.2",+ "has-tostringtag": "^1.0.0",+ "hasown": "^2.0.0"},"engines": {"node": ">= 0.4"}},"node_modules/es-shim-unscopables": {- "version": "1.0.0",- "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.0.tgz",- "integrity": "sha512-Jm6GPcCdC30eMLbZ2x8z2WuRwAws3zTBBKuusffYVUrNj/GVSUAZ+xKMaUpfNDR5IbyNA5LJbaecoUVbmUcB1w==",+ "version": "1.0.2",+ "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.2.tgz",+ "integrity": "sha512-J3yBRXCzDu4ULnQwxyToo/OjdMx6akgVC7K6few0a7F/0wLtmKKN7I73AH5T2836UuXRqN7Qg+IIUw/+YJksRw==","dev": true,"dependencies": {- "has": "^1.0.3"+ "hasown": "^2.0.0"}},"node_modules/es-to-primitive": {@@ -12745,9 +12708,9 @@}},"node_modules/esbuild": {- "version": "0.19.9",- "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.19.9.tgz",- "integrity": "sha512-U9CHtKSy+EpPsEBa+/A2gMs/h3ylBC0H0KSqIg7tpztHerLi6nrrcoUJAkNCEPumx8yJ+Byic4BVwHgRbN0TBg==",+ "version": "0.19.12",+ "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.19.12.tgz",+ "integrity": "sha512-aARqgq8roFBj054KvQr5f1sFu0D65G+miZRCuJyJ0G13Zwx7vRar5Zhn2tkQNzIXcBrNVsv/8stehpj+GAjgbg==","dev": true,"hasInstallScript": true,"bin": {@@ -12757,34 +12720,35 @@"node": ">=12"},"optionalDependencies": {- "@esbuild/android-arm": "0.19.9",- "@esbuild/android-arm64": "0.19.9",- "@esbuild/android-x64": "0.19.9",- "@esbuild/darwin-arm64": "0.19.9",- "@esbuild/darwin-x64": "0.19.9",- "@esbuild/freebsd-arm64": "0.19.9",- "@esbuild/freebsd-x64": "0.19.9",- "@esbuild/linux-arm": "0.19.9",- "@esbuild/linux-arm64": "0.19.9",- "@esbuild/linux-ia32": "0.19.9",- "@esbuild/linux-loong64": "0.19.9",- "@esbuild/linux-mips64el": "0.19.9",- "@esbuild/linux-ppc64": "0.19.9",- "@esbuild/linux-riscv64": "0.19.9",- "@esbuild/linux-s390x": "0.19.9",- "@esbuild/linux-x64": "0.19.9",- "@esbuild/netbsd-x64": "0.19.9",- "@esbuild/openbsd-x64": "0.19.9",- "@esbuild/sunos-x64": "0.19.9",- "@esbuild/win32-arm64": "0.19.9",- "@esbuild/win32-ia32": "0.19.9",- "@esbuild/win32-x64": "0.19.9"+ "@esbuild/aix-ppc64": "0.19.12",+ "@esbuild/android-arm": "0.19.12",+ "@esbuild/android-arm64": "0.19.12",+ "@esbuild/android-x64": "0.19.12",+ "@esbuild/darwin-arm64": "0.19.12",+ "@esbuild/darwin-x64": "0.19.12",+ "@esbuild/freebsd-arm64": "0.19.12",+ "@esbuild/freebsd-x64": "0.19.12",+ "@esbuild/linux-arm": "0.19.12",+ "@esbuild/linux-arm64": "0.19.12",+ "@esbuild/linux-ia32": "0.19.12",+ "@esbuild/linux-loong64": "0.19.12",+ "@esbuild/linux-mips64el": "0.19.12",+ "@esbuild/linux-ppc64": "0.19.12",+ "@esbuild/linux-riscv64": "0.19.12",+ "@esbuild/linux-s390x": "0.19.12",+ "@esbuild/linux-x64": "0.19.12",+ "@esbuild/netbsd-x64": "0.19.12",+ "@esbuild/openbsd-x64": "0.19.12",+ "@esbuild/sunos-x64": "0.19.12",+ "@esbuild/win32-arm64": "0.19.12",+ "@esbuild/win32-ia32": "0.19.12",+ "@esbuild/win32-x64": "0.19.12"}},"node_modules/escalade": {- "version": "3.1.1",- "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz",- "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==",+ "version": "3.1.2",+ "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz",+ "integrity": "sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==","engines": {"node": ">=6"}@@ -12828,18 +12792,19 @@}},"node_modules/eslint": {- "version": "8.49.0",- "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.49.0.tgz",- "integrity": "sha512-jw03ENfm6VJI0jA9U+8H5zfl5b+FvuU3YYvZRdZHOlU2ggJkxrlkJH4HcDrZpj6YwD8kuYqvQM8LyesoazrSOQ==",+ "version": "8.56.0",+ "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.56.0.tgz",+ "integrity": "sha512-Go19xM6T9puCOWntie1/P997aXxFsOi37JIHRWI514Hc6ZnaHGKY9xFhrU65RT6CcBEzZoGG1e6Nq+DT04ZtZQ==","dev": true,"dependencies": {"@eslint-community/eslint-utils": "^4.2.0","@eslint-community/regexpp": "^4.6.1",- "@eslint/eslintrc": "^2.1.2",- "@eslint/js": "8.49.0",- "@humanwhocodes/config-array": "^0.11.11",+ "@eslint/eslintrc": "^2.1.4",+ "@eslint/js": "8.56.0",+ "@humanwhocodes/config-array": "^0.11.13","@humanwhocodes/module-importer": "^1.0.1","@nodelib/fs.walk": "^1.2.8",+ "@ungap/structured-clone": "^1.2.0","ajv": "^6.12.4","chalk": "^4.0.0","cross-spawn": "^7.0.2",@@ -12942,9 +12907,9 @@}},"node_modules/eslint-import-resolver-typescript": {- "version": "3.6.0",- "resolved": "https://registry.npmjs.org/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-3.6.0.tgz",- "integrity": "sha512-QTHR9ddNnn35RTxlaEnx2gCxqFlF2SEN0SE2d17SqwyM7YOSI2GHWRYp5BiRkObTUNYPupC/3Fq2a0PpT+EKpg==",+ "version": "3.6.1",+ "resolved": "https://registry.npmjs.org/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-3.6.1.tgz",+ "integrity": "sha512-xgdptdoi5W3niYeuQxKmzVDTATvLYqhpwmykwsh7f6HIOStGWEIL9iqZgQDF9u9OEzrRwR8no5q2VT+bjAujTg==","dev": true,"dependencies": {"debug": "^4.3.4",@@ -12993,28 +12958,28 @@}},"node_modules/eslint-plugin-import": {- "version": "2.28.1",- "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.28.1.tgz",- "integrity": "sha512-9I9hFlITvOV55alzoKBI+K9q74kv0iKMeY6av5+umsNwayt59fz692daGyjR+oStBQgx6nwR9rXldDev3Clw+A==",+ "version": "2.29.1",+ "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.29.1.tgz",+ "integrity": "sha512-BbPC0cuExzhiMo4Ff1BTVwHpjjv28C5R+btTOGaCRC7UEz801up0JadwkeSk5Ued6TG34uaczuVuH6qyy5YUxw==","dev": true,"dependencies": {- "array-includes": "^3.1.6",- "array.prototype.findlastindex": "^1.2.2",- "array.prototype.flat": "^1.3.1",- "array.prototype.flatmap": "^1.3.1",+ "array-includes": "^3.1.7",+ "array.prototype.findlastindex": "^1.2.3",+ "array.prototype.flat": "^1.3.2",+ "array.prototype.flatmap": "^1.3.2","debug": "^3.2.7","doctrine": "^2.1.0",- "eslint-import-resolver-node": "^0.3.7",+ "eslint-import-resolver-node": "^0.3.9","eslint-module-utils": "^2.8.0",- "has": "^1.0.3",- "is-core-module": "^2.13.0",+ "hasown": "^2.0.0",+ "is-core-module": "^2.13.1","is-glob": "^4.0.3","minimatch": "^3.1.2",- "object.fromentries": "^2.0.6",- "object.groupby": "^1.0.0",- "object.values": "^1.1.6",+ "object.fromentries": "^2.0.7",+ "object.groupby": "^1.0.1",+ "object.values": "^1.1.7","semver": "^6.3.1",- "tsconfig-paths": "^3.14.2"+ "tsconfig-paths": "^3.15.0"},"engines": {"node": ">=4"@@ -13054,9 +13019,9 @@}},"node_modules/eslint-plugin-jest": {- "version": "27.2.3",- "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-27.2.3.tgz",- "integrity": "sha512-sRLlSCpICzWuje66Gl9zvdF6mwD5X86I4u55hJyFBsxYOsBCmT5+kSUjf+fkFWVMMgpzNEupjW8WzUqi83hJAQ==",+ "version": "27.6.3",+ "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-27.6.3.tgz",+ "integrity": "sha512-+YsJFVH6R+tOiO3gCJon5oqn4KWc+mDq2leudk8mrp8RFubLOo9CVyi3cib4L7XMpxExmkmBZQTPDYVBzgpgOA==","dev": true,"dependencies": {"@typescript-eslint/utils": "^5.10.0"@@ -13154,12 +13119,12 @@}},"node_modules/eslint-plugin-react/node_modules/resolve": {- "version": "2.0.0-next.4",- "resolved": "https://registry.npmjs.org/resolve/-/resolve-2.0.0-next.4.tgz",- "integrity": "sha512-iMDbmAWtfU+MHpxt/I5iWI7cY6YVEZUQ3MBgPQ++XD1PELuJHIl82xBmObyP2KyQmkNB2dsqF7seoQQiAn5yDQ==",+ "version": "2.0.0-next.5",+ "resolved": "https://registry.npmjs.org/resolve/-/resolve-2.0.0-next.5.tgz",+ "integrity": "sha512-U7WjGVG9sH8tvjW5SmGbQuui75FiyjAX72HX15DwBBwF9dNiQZRQAg9nnPhYy+TUnE0+VcrttuvNI8oSxZcocA==","dev": true,"dependencies": {- "is-core-module": "^2.9.0",+ "is-core-module": "^2.13.0","path-parse": "^1.0.7","supports-preserve-symlinks-flag": "^1.0.0"},@@ -13403,9 +13368,9 @@}},"node_modules/export-from-json": {- "version": "1.7.3",- "resolved": "https://registry.npmjs.org/export-from-json/-/export-from-json-1.7.3.tgz",- "integrity": "sha512-Xg0L0saYz+CBz2MnaZvSEAHr17hWtHAfFWXw/frllG9t6aijuQukiU40ElOeM9nDTrtQPhLJMLN0q8lo897FYg=="+ "version": "1.7.4",+ "resolved": "https://registry.npmjs.org/export-from-json/-/export-from-json-1.7.4.tgz",+ "integrity": "sha512-FjmpluvZS2PTYyhkoMfQoyEJMfe2bfAyNpa5Apa6C9n7SWUWyJkG/VFnzERuj3q9Jjo3iwBjwVsDQ7Z7sczthA=="},"node_modules/expr-eval": {"version": "2.0.2",@@ -13473,12 +13438,12 @@}},"node_modules/express-session": {- "version": "1.17.3",- "resolved": "https://registry.npmjs.org/express-session/-/express-session-1.17.3.tgz",- "integrity": "sha512-4+otWXlShYlG1Ma+2Jnn+xgKUZTMJ5QD3YvfilX3AcocOAbIkVylSWEklzALe/+Pu4qV6TYBj5GwOBFfdKqLBw==",+ "version": "1.18.0",+ "resolved": "https://registry.npmjs.org/express-session/-/express-session-1.18.0.tgz",+ "integrity": "sha512-m93QLWr0ju+rOwApSsyso838LQwgfs44QtOP/WBiwtAgPIo/SAh1a5c6nn2BR6mFNZehTpqKDESzP+fRHVbxwQ==","dependencies": {- "cookie": "0.4.2",- "cookie-signature": "1.0.6",+ "cookie": "0.6.0",+ "cookie-signature": "1.0.7","debug": "2.6.9","depd": "~2.0.0","on-headers": "~1.0.2",@@ -13491,13 +13456,18 @@}},"node_modules/express-session/node_modules/cookie": {- "version": "0.4.2",- "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.2.tgz",- "integrity": "sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA==",+ "version": "0.6.0",+ "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.6.0.tgz",+ "integrity": "sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==","engines": {"node": ">= 0.6"}},+ "node_modules/express-session/node_modules/cookie-signature": {+ "version": "1.0.7",+ "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.7.tgz",+ "integrity": "sha512-NXdYc3dLr47pBkpUCHtKSwIOQXLVn8dZEuywboCOJY/osA0wFSLlSawr3KN8qXJEyX66FcONTH8EIlVuK0yyFA=="+ },"node_modules/express-session/node_modules/debug": {"version": "2.6.9","resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",@@ -13569,9 +13539,9 @@"integrity": "sha512-/d9sfos4yxzpwkDkuN7k2SqFKtYNmCTzgfEpz82x34IM9/zc8KGxQoXg1liNC/izpRM/MBdt44Nmx41ZWqk+FQ=="},"node_modules/fast-glob": {- "version": "3.3.1",- "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.1.tgz",- "integrity": "sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg==",+ "version": "3.3.2",+ "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz",+ "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==","dependencies": {"@nodelib/fs.stat": "^2.0.2","@nodelib/fs.walk": "^1.2.3",@@ -13601,15 +13571,16 @@"dev": true},"node_modules/fast-json-stringify": {- "version": "5.8.0",- "resolved": "https://registry.npmjs.org/fast-json-stringify/-/fast-json-stringify-5.8.0.tgz",- "integrity": "sha512-VVwK8CFMSALIvt14U8AvrSzQAwN/0vaVRiFFUVlpnXSnDGrSkOAO5MtzyN8oQNjLd5AqTW5OZRgyjoNuAuR3jQ==",+ "version": "5.12.0",+ "resolved": "https://registry.npmjs.org/fast-json-stringify/-/fast-json-stringify-5.12.0.tgz",+ "integrity": "sha512-7Nnm9UPa7SfHRbHVA1kJQrGXCRzB7LMlAAqHXQFkEQqueJm1V8owm0FsE/2Do55/4CcdhwiLQERaKomOnKQkyA==","dependencies": {- "@fastify/deepmerge": "^1.0.0",+ "@fastify/merge-json-schemas": "^0.1.0","ajv": "^8.10.0","ajv-formats": "^2.1.1","fast-deep-equal": "^3.1.3","fast-uri": "^2.1.0",+ "json-schema-ref-resolver": "^1.0.1","rfdc": "^1.2.0"}},@@ -13669,9 +13640,9 @@"peer": true},"node_modules/fast-uri": {- "version": "2.2.0",- "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-2.2.0.tgz",- "integrity": "sha512-cIusKBIt/R/oI6z/1nyfe2FvGKVTohVRfvkOhvx0nCEW+xf5NoCXjAHcWp93uOUBchzYcsvPlrapAdX1uW+YGg=="+ "version": "2.3.0",+ "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-2.3.0.tgz",+ "integrity": "sha512-eel5UKGn369gGEWOqBShmFJWfq/xSJvsgDzgLYC845GneayWvXBf0lJCBn5qTABfewy1ZDPoaR5OZCP+kssfuw=="},"node_modules/fast-xml-parser": {"version": "4.2.5",@@ -13696,9 +13667,19 @@}},"node_modules/fastify": {- "version": "4.24.1",- "resolved": "https://registry.npmjs.org/fastify/-/fastify-4.24.1.tgz",- "integrity": "sha512-uMthXpH0DjWWxb3/ERmBsVkFm5cllozjbOFkhsD4Xlw+OUg5wGASRBjVRcp2XeYZa91W2BbwgIWJrnGGPWY2dQ==",+ "version": "4.26.0",+ "resolved": "https://registry.npmjs.org/fastify/-/fastify-4.26.0.tgz",+ "integrity": "sha512-Fq/7ziWKc6pYLYLIlCRaqJqEVTIZ5tZYfcW/mDK2AQ9v/sqjGFpj0On0/7hU50kbPVjLO4de+larPA1WwPZSfw==",+ "funding": [+ {+ "type": "github",+ "url": "https://github.com/sponsors/fastify"+ },+ {+ "type": "opencollective",+ "url": "https://opencollective.com/fastify"+ }+ ],"dependencies": {"@fastify/ajv-compiler": "^3.5.0","@fastify/error": "^3.4.0",@@ -13707,10 +13688,10 @@"avvio": "^8.2.1","fast-content-type-parse": "^1.1.0","fast-json-stringify": "^5.8.0",- "find-my-way": "^7.7.0",+ "find-my-way": "^8.0.0","light-my-request": "^5.11.0",- "pino": "^8.16.0",- "process-warning": "^2.2.0",+ "pino": "^8.17.0",+ "process-warning": "^3.0.0","proxy-addr": "^2.0.7","rfdc": "^1.3.0","secure-json-parse": "^2.7.0",@@ -13724,9 +13705,9 @@"integrity": "sha512-stRHYGeuqpEZTL1Ef0Ovr2ltazUT9g844X5z/zEBFLG8RYlpDiOCIG+ATvYEp+/zmc7sN29mcIMp8gvYplYPIQ=="},"node_modules/fastq": {- "version": "1.15.0",- "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz",- "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==",+ "version": "1.17.1",+ "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz",+ "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==","dependencies": {"reusify": "^1.0.4"}@@ -13769,9 +13750,9 @@"integrity": "sha512-OP2IUU6HeYKJi3i0z4A19kHMQoLVs4Hc+DPqqxI2h/DPZHTm/vjsfC6P0b4jCMy14XizLBqvndQ+UilD7707Jw=="},"node_modules/fetch-undici": {- "version": "3.0.1",- "resolved": "https://registry.npmjs.org/fetch-undici/-/fetch-undici-3.0.1.tgz",- "integrity": "sha512-UHHu1HqW22ZhK6C/1Zmjf7mQpOwPwLYZ+xcsOgpzistONU8QqvCop6Od29p/kw1GUVoq2Ihu6ItpKLtlojx4FQ==",+ "version": "3.0.2",+ "resolved": "https://registry.npmjs.org/fetch-undici/-/fetch-undici-3.0.2.tgz",+ "integrity": "sha512-GM0tsM7kAEvxlF4qhV7szI0woYSwk+i+oeZUwsMwbV0Dj/cChSI5deGiHGI64DDEKDrqRm3DvauEkGHfF+j5kw==","dependencies": {"undici": "^5.0.0"},@@ -13784,29 +13765,25 @@}},"node_modules/figures": {- "version": "5.0.0",- "resolved": "https://registry.npmjs.org/figures/-/figures-5.0.0.tgz",- "integrity": "sha512-ej8ksPF4x6e5wvK9yevct0UCXh8TTFlWGVLlgjZuoBH1HwjIfKE/IdL5mq89sFA7zELi1VhKpmtDnrs7zWyeyg==",+ "version": "3.2.0",+ "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz",+ "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==","dependencies": {- "escape-string-regexp": "^5.0.0",- "is-unicode-supported": "^1.2.0"+ "escape-string-regexp": "^1.0.5"},"engines": {- "node": ">=14"+ "node": ">=8"},"funding": {"url": "https://github.com/sponsors/sindresorhus"}},"node_modules/figures/node_modules/escape-string-regexp": {- "version": "5.0.0",- "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-5.0.0.tgz",- "integrity": "sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==",+ "version": "1.0.5",+ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",+ "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==","engines": {- "node": ">=12"- },- "funding": {- "url": "https://github.com/sponsors/sindresorhus"+ "node": ">=0.8.0"}},"node_modules/file-entry-cache": {@@ -13829,6 +13806,22 @@"moment": "^2.29.1"}},+ "node_modules/file-type": {+ "version": "18.7.0",+ "resolved": "https://registry.npmjs.org/file-type/-/file-type-18.7.0.tgz",+ "integrity": "sha512-ihHtXRzXEziMrQ56VSgU7wkxh55iNchFkosu7Y9/S+tXHdKyrGjVK0ujbqNnsxzea+78MaLhN6PGmfYSAv1ACw==",+ "dependencies": {+ "readable-web-to-node-stream": "^3.0.2",+ "strtok3": "^7.0.0",+ "token-types": "^5.0.1"+ },+ "engines": {+ "node": ">=14.16"+ },+ "funding": {+ "url": "https://github.com/sindresorhus/file-type?sponsor=1"+ }+ },"node_modules/filelist": {"version": "1.0.4","resolved": "https://registry.npmjs.org/filelist/-/filelist-1.0.4.tgz",@@ -13967,9 +13960,9 @@}},"node_modules/find-my-way": {- "version": "7.7.0",- "resolved": "https://registry.npmjs.org/find-my-way/-/find-my-way-7.7.0.tgz",- "integrity": "sha512-+SrHpvQ52Q6W9f3wJoJBbAQULJuNEEQwBvlvYwACDhBTLOTMiQ0HYWh4+vC3OivGP2ENcTI1oKlFA2OepJNjhQ==",+ "version": "8.1.0",+ "resolved": "https://registry.npmjs.org/find-my-way/-/find-my-way-8.1.0.tgz",+ "integrity": "sha512-41QwjCGcVTODUmLLqTMeoHeiozbMXYMAE1CKFiDyi9zVZ2Vjh0yz3MF0WQZoIb+cmzP/XlbFjlF2NtJmvZHznA==","dependencies": {"fast-deep-equal": "^3.1.3","fast-querystring": "^1.0.0",@@ -13996,36 +13989,36 @@}},"node_modules/firebase": {- "version": "10.6.0",- "resolved": "https://registry.npmjs.org/firebase/-/firebase-10.6.0.tgz",- "integrity": "sha512-bnYwHwZ6zB+dM6mGQPEXcFHtAT2WoVzG6H4SIR8HzURVGKJxBW+TqfP3qcJQjTZV3tDqDTo/XZkVmoU/SovV8A==",- "dependencies": {- "@firebase/analytics": "0.10.0",- "@firebase/analytics-compat": "0.2.6",- "@firebase/app": "0.9.23",- "@firebase/app-check": "0.8.0",- "@firebase/app-check-compat": "0.3.7",- "@firebase/app-compat": "0.2.23",+ "version": "10.8.0",+ "resolved": "https://registry.npmjs.org/firebase/-/firebase-10.8.0.tgz",+ "integrity": "sha512-UJpC24vw8JFuHEOQyArBGKTUd7+kohLISCzHyn0M/prP0KOTx2io1eyLliEid330QqnWI7FOlPxoU97qecCSfQ==",+ "dependencies": {+ "@firebase/analytics": "0.10.1",+ "@firebase/analytics-compat": "0.2.7",+ "@firebase/app": "0.9.27",+ "@firebase/app-check": "0.8.2",+ "@firebase/app-check-compat": "0.3.9",+ "@firebase/app-compat": "0.2.27","@firebase/app-types": "0.9.0",- "@firebase/auth": "1.4.0",- "@firebase/auth-compat": "0.4.9",- "@firebase/database": "1.0.1",- "@firebase/database-compat": "1.0.1",- "@firebase/firestore": "4.3.2",- "@firebase/firestore-compat": "0.3.22",- "@firebase/functions": "0.10.0",- "@firebase/functions-compat": "0.3.5",- "@firebase/installations": "0.6.4",- "@firebase/installations-compat": "0.2.4",- "@firebase/messaging": "0.12.4",- "@firebase/messaging-compat": "0.2.4",- "@firebase/performance": "0.6.4",- "@firebase/performance-compat": "0.2.4",- "@firebase/remote-config": "0.4.4",- "@firebase/remote-config-compat": "0.2.4",- "@firebase/storage": "0.11.2",- "@firebase/storage-compat": "0.3.2",- "@firebase/util": "1.9.3"+ "@firebase/auth": "1.6.0",+ "@firebase/auth-compat": "0.5.2",+ "@firebase/database": "1.0.3",+ "@firebase/database-compat": "1.0.3",+ "@firebase/firestore": "4.4.2",+ "@firebase/firestore-compat": "0.3.25",+ "@firebase/functions": "0.11.1",+ "@firebase/functions-compat": "0.3.7",+ "@firebase/installations": "0.6.5",+ "@firebase/installations-compat": "0.2.5",+ "@firebase/messaging": "0.12.6",+ "@firebase/messaging-compat": "0.2.6",+ "@firebase/performance": "0.6.5",+ "@firebase/performance-compat": "0.2.5",+ "@firebase/remote-config": "0.4.5",+ "@firebase/remote-config-compat": "0.2.5",+ "@firebase/storage": "0.12.1",+ "@firebase/storage-compat": "0.3.4",+ "@firebase/util": "1.9.4"}},"node_modules/flat": {@@ -14037,23 +14030,23 @@}},"node_modules/flat-cache": {- "version": "3.1.0",- "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.1.0.tgz",- "integrity": "sha512-OHx4Qwrrt0E4jEIcI5/Xb+f+QmJYNj2rrK8wiIdQOIrB9WrrJL8cjZvXdXuBTkkEwEqLycb5BeZDV1o2i9bTew==",+ "version": "3.2.0",+ "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz",+ "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==","dev": true,"dependencies": {- "flatted": "^3.2.7",+ "flatted": "^3.2.9","keyv": "^4.5.3","rimraf": "^3.0.2"},"engines": {- "node": ">=12.0.0"+ "node": "^10.12.0 || >=12.0.0"}},"node_modules/flatted": {- "version": "3.2.7",- "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.7.tgz",- "integrity": "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==",+ "version": "3.2.9",+ "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.9.tgz",+ "integrity": "sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ==","dev": true},"node_modules/flip-toolkit": {@@ -14105,7 +14098,6 @@"version": "3.1.1","resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.1.1.tgz","integrity": "sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==",- "dev": true,"dependencies": {"cross-spawn": "^7.0.0","signal-exit": "^4.0.1"@@ -14121,7 +14113,6 @@"version": "4.1.0","resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz","integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==",- "dev": true,"engines": {"node": ">=14"},@@ -14167,6 +14158,14 @@"node": ">= 12.20"}},+ "node_modules/formdata-node/node_modules/web-streams-polyfill": {+ "version": "4.0.0-beta.3",+ "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-4.0.0-beta.3.tgz",+ "integrity": "sha512-QW95TCTaHmsYfHDybGMwO5IJIM93I/6vTRk+daHTWFPhwh+C8Cg7j7XyKrwrj8Ib6vYXe0ocYNrmzY4xAAN6ug==",+ "engines": {+ "node": ">= 14"+ }+ },"node_modules/formidable": {"version": "2.1.2","resolved": "https://registry.npmjs.org/formidable/-/formidable-2.1.2.tgz",@@ -14191,9 +14190,9 @@}},"node_modules/fraction.js": {- "version": "4.3.6",- "resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-4.3.6.tgz",- "integrity": "sha512-n2aZ9tNfYDwaHhvFTkhFErqOMIb8uyzSQ+vGJBjZyanAKZVbGUQ1sngfk9FdkBw7G26O7AgNjLcecLffD1c7eg==",+ "version": "4.3.7",+ "resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-4.3.7.tgz",+ "integrity": "sha512-ZsDfxO51wGAXREY55a7la9LScWpwv9RxIrYABrlvOFBlH/ShPnrtsXeuUIfXKKOVicNxQ+o8JTbJvjS4M89yew==","dev": true,"engines": {"node": "*"@@ -14217,23 +14216,20 @@"integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow=="},"node_modules/fs-extra": {- "version": "10.1.0",- "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz",- "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==",- "dev": true,+ "version": "4.0.3",+ "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-4.0.3.tgz",+ "integrity": "sha512-q6rbdDd1o2mAnQreO7YADIxf/Whx4AHBiRf6d+/cVT8h44ss+lHgxf1FemcqDnQt9X3ct4McHr+JMGlYSsK7Cg==","dependencies": {- "graceful-fs": "^4.2.0",- "jsonfile": "^6.0.1",- "universalify": "^2.0.0"- },- "engines": {- "node": ">=12"+ "graceful-fs": "^4.1.2",+ "jsonfile": "^4.0.0",+ "universalify": "^0.1.0"}},"node_modules/fs.realpath": {"version": "1.0.0","resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",- "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw=="+ "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==",+ "dev": true},"node_modules/fsevents": {"version": "2.3.3",@@ -14249,9 +14245,12 @@}},"node_modules/function-bind": {- "version": "1.1.1",- "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",- "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A=="+ "version": "1.1.2",+ "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz",+ "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==",+ "funding": {+ "url": "https://github.com/sponsors/ljharb"+ }},"node_modules/function.prototype.name": {"version": "1.1.6",@@ -14281,9 +14280,9 @@}},"node_modules/gaxios": {- "version": "6.1.1",- "resolved": "https://registry.npmjs.org/gaxios/-/gaxios-6.1.1.tgz",- "integrity": "sha512-bw8smrX+XlAoo9o1JAksBwX+hi/RG15J+NTSxmNPIclKC3ZVK6C2afwY8OSdRvOK0+ZLecUJYtj2MmjOt3Dm0w==",+ "version": "6.2.0",+ "resolved": "https://registry.npmjs.org/gaxios/-/gaxios-6.2.0.tgz",+ "integrity": "sha512-H6+bHeoEAU5D6XNc6mPKeN5dLZqEDs9Gpk6I+SZBEzK5So58JVrHPmevNi35fRl1J9Y5TaeLW0kYx3pCJ1U2mQ==","dependencies": {"extend": "^3.0.2","https-proxy-agent": "^7.0.1",@@ -14318,15 +14317,33 @@}},"node_modules/gcp-metadata": {- "version": "6.0.0",- "resolved": "https://registry.npmjs.org/gcp-metadata/-/gcp-metadata-6.0.0.tgz",- "integrity": "sha512-Ozxyi23/1Ar51wjUT2RDklK+3HxqDr8TLBNK8rBBFQ7T85iIGnXnVusauj06QyqCXRFZig8LZC+TUddWbndlpQ==",+ "version": "5.3.0",+ "resolved": "https://registry.npmjs.org/gcp-metadata/-/gcp-metadata-5.3.0.tgz",+ "integrity": "sha512-FNTkdNEnBdlqF2oatizolQqNANMrcqJt6AAYt99B3y1aLLC8Hc5IOBb+ZnnzllodEEf6xMBp6wRcBbc16fa65w==",+ "optional": true,+ "peer": true,"dependencies": {- "gaxios": "^6.0.0",+ "gaxios": "^5.0.0","json-bigint": "^1.0.0"},"engines": {- "node": ">=14"+ "node": ">=12"+ }+ },+ "node_modules/gcp-metadata/node_modules/gaxios": {+ "version": "5.1.3",+ "resolved": "https://registry.npmjs.org/gaxios/-/gaxios-5.1.3.tgz",+ "integrity": "sha512-95hVgBRgEIRQQQHIbnxBXeHbW4TqFk4ZDJW7wmVtvYar72FdhRIo1UGOLS2eRAKCPEdPBWu+M7+A33D9CdX9rA==",+ "optional": true,+ "peer": true,+ "dependencies": {+ "extend": "^3.0.2",+ "https-proxy-agent": "^5.0.0",+ "is-stream": "^2.0.0",+ "node-fetch": "^2.6.9"+ },+ "engines": {+ "node": ">=12"}},"node_modules/gensync": {@@ -14347,14 +14364,18 @@}},"node_modules/get-intrinsic": {- "version": "1.2.1",- "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.1.tgz",- "integrity": "sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==",+ "version": "1.2.3",+ "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.3.tgz",+ "integrity": "sha512-JIcZczvcMVE7AUOP+X72bh8HqHBRxFdz5PDHYtNG/lE3yk9b3KZBJlwFcTyPYjg3L4RLLmZJzvjxhaZVapxFrQ==","dependencies": {- "function-bind": "^1.1.1",- "has": "^1.0.3",+ "es-errors": "^1.0.0",+ "function-bind": "^1.1.2","has-proto": "^1.0.1",- "has-symbols": "^1.0.3"+ "has-symbols": "^1.0.3",+ "hasown": "^2.0.0"+ },+ "engines": {+ "node": ">= 0.4"},"funding": {"url": "https://github.com/sponsors/ljharb"@@ -14422,9 +14443,9 @@}},"node_modules/get-tsconfig": {- "version": "4.7.0",- "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.7.0.tgz",- "integrity": "sha512-pmjiZ7xtB8URYm74PlGJozDNyhvsVLUcpBa8DZBG3bWHwaHa9bPiRpiSfovw+fjhwONSCWKRyk+JQHEGZmMrzw==",+ "version": "4.7.2",+ "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.7.2.tgz",+ "integrity": "sha512-wuMsz4leaj5hbGgg4IvDU0bqJagpftG5l5cXIAvo8uZrqn0NJqwtfupTN00VnkQJPcIRrxYrm1Ue24btpCha2A==","dev": true,"dependencies": {"resolve-pkg-maps": "^1.0.0"@@ -14468,6 +14489,13 @@"node": ">=10.13.0"}},+ "node_modules/glob-to-regexp": {+ "version": "0.4.1",+ "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz",+ "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==",+ "dev": true,+ "peer": true+ },"node_modules/glob/node_modules/brace-expansion": {"version": "2.0.1","resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",@@ -14490,9 +14518,9 @@}},"node_modules/globals": {- "version": "13.21.0",- "resolved": "https://registry.npmjs.org/globals/-/globals-13.21.0.tgz",- "integrity": "sha512-ybyme3s4yy/t/3s35bewwXKOf7cvzfreG2lH0lZl0JB7I4GxRP2ghxOK/Nb9EkRXdbBXZLfq/p/0W2JUONB/Gg==",+ "version": "13.24.0",+ "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz",+ "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==","dev": true,"dependencies": {"type-fest": "^0.20.2"@@ -14539,20 +14567,142 @@"url": "https://github.com/sponsors/sindresorhus"}},+ "node_modules/globby/node_modules/slash": {+ "version": "3.0.0",+ "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz",+ "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==",+ "dev": true,+ "engines": {+ "node": ">=8"+ }+ },"node_modules/glur": {"version": "1.1.2","resolved": "https://registry.npmjs.org/glur/-/glur-1.1.2.tgz","integrity": "sha512-l+8esYHTKOx2G/Aao4lEQ0bnHWg4fWtJbVoZZT9Knxi01pB8C80BR85nONLFwkkQoFRCmXY+BUcGZN3yZ2QsRA=="},- "node_modules/google-auth-library": {- "version": "9.2.0",- "resolved": "https://registry.npmjs.org/google-auth-library/-/google-auth-library-9.2.0.tgz",- "integrity": "sha512-1oV3p0JhNEhVbj26eF3FAJcv9MXXQt4S0wcvKZaDbl4oHq5V3UJoSbsGZGQNcjoCdhW4kDSwOs11wLlHog3fgQ==",+ "node_modules/google-auth-library": {+ "version": "8.9.0",+ "resolved": "https://registry.npmjs.org/google-auth-library/-/google-auth-library-8.9.0.tgz",+ "integrity": "sha512-f7aQCJODJFmYWN6PeNKzgvy9LI2tYmXnzpNDHEjG5sDNPgGb2FXQyTBnXeSH+PAtpKESFD+LmHw3Ox3mN7e1Fg==",+ "optional": true,+ "peer": true,+ "dependencies": {+ "arrify": "^2.0.0",+ "base64-js": "^1.3.0",+ "ecdsa-sig-formatter": "^1.0.11",+ "fast-text-encoding": "^1.0.0",+ "gaxios": "^5.0.0",+ "gcp-metadata": "^5.3.0",+ "gtoken": "^6.1.0",+ "jws": "^4.0.0",+ "lru-cache": "^6.0.0"+ },+ "engines": {+ "node": ">=12"+ }+ },+ "node_modules/google-auth-library/node_modules/gaxios": {+ "version": "5.1.3",+ "resolved": "https://registry.npmjs.org/gaxios/-/gaxios-5.1.3.tgz",+ "integrity": "sha512-95hVgBRgEIRQQQHIbnxBXeHbW4TqFk4ZDJW7wmVtvYar72FdhRIo1UGOLS2eRAKCPEdPBWu+M7+A33D9CdX9rA==",+ "optional": true,+ "peer": true,+ "dependencies": {+ "extend": "^3.0.2",+ "https-proxy-agent": "^5.0.0",+ "is-stream": "^2.0.0",+ "node-fetch": "^2.6.9"+ },+ "engines": {+ "node": ">=12"+ }+ },+ "node_modules/google-auth-library/node_modules/lru-cache": {+ "version": "6.0.0",+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",+ "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",+ "optional": true,+ "peer": true,+ "dependencies": {+ "yallist": "^4.0.0"+ },+ "engines": {+ "node": ">=10"+ }+ },+ "node_modules/google-auth-library/node_modules/yallist": {+ "version": "4.0.0",+ "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",+ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",+ "optional": true,+ "peer": true+ },+ "node_modules/google-p12-pem": {+ "version": "4.0.1",+ "resolved": "https://registry.npmjs.org/google-p12-pem/-/google-p12-pem-4.0.1.tgz",+ "integrity": "sha512-WPkN4yGtz05WZ5EhtlxNDWPhC4JIic6G8ePitwUWy4l+XPVYec+a0j0Ts47PDtW59y3RwAhUd9/h9ZZ63px6RQ==",+ "optional": true,+ "peer": true,+ "dependencies": {+ "node-forge": "^1.3.1"+ },+ "bin": {+ "gp12-pem": "build/src/bin/gp12-pem.js"+ },+ "engines": {+ "node": ">=12.0.0"+ }+ },+ "node_modules/googleapis": {+ "version": "126.0.1",+ "resolved": "https://registry.npmjs.org/googleapis/-/googleapis-126.0.1.tgz",+ "integrity": "sha512-4N8LLi+hj6ytK3PhE52KcM8iSGhJjtXnCDYB4fp6l+GdLbYz4FoDmx074WqMbl7iYMDN87vqD/8drJkhxW92mQ==",+ "dependencies": {+ "google-auth-library": "^9.0.0",+ "googleapis-common": "^7.0.0"+ },+ "engines": {+ "node": ">=14.0.0"+ }+ },+ "node_modules/googleapis-common": {+ "version": "7.0.1",+ "resolved": "https://registry.npmjs.org/googleapis-common/-/googleapis-common-7.0.1.tgz",+ "integrity": "sha512-mgt5zsd7zj5t5QXvDanjWguMdHAcJmmDrF9RkInCecNsyV7S7YtGqm5v2IWONNID88osb7zmx5FtrAP12JfD0w==",+ "dependencies": {+ "extend": "^3.0.2",+ "gaxios": "^6.0.3",+ "google-auth-library": "^9.0.0",+ "qs": "^6.7.0",+ "url-template": "^2.0.8",+ "uuid": "^9.0.0"+ },+ "engines": {+ "node": ">=14.0.0"+ }+ },+ "node_modules/googleapis-common/node_modules/gcp-metadata": {+ "version": "6.1.0",+ "resolved": "https://registry.npmjs.org/gcp-metadata/-/gcp-metadata-6.1.0.tgz",+ "integrity": "sha512-Jh/AIwwgaxan+7ZUUmRLCjtchyDiqh4KjBJ5tW3plBZb5iL/BPcso8A5DlzeD9qlw0duCamnNdpFjxwaT0KyKg==",+ "dependencies": {+ "gaxios": "^6.0.0",+ "json-bigint": "^1.0.0"+ },+ "engines": {+ "node": ">=14"+ }+ },+ "node_modules/googleapis-common/node_modules/google-auth-library": {+ "version": "9.6.2",+ "resolved": "https://registry.npmjs.org/google-auth-library/-/google-auth-library-9.6.2.tgz",+ "integrity": "sha512-8G5i+uELrRE244PGnTc9UxiWZ2FMWD5jiIe9P2XSxCvXv/0ip/phjeHSE4bhJnLBdJb+Bu/Gj9Lr33TmDnbAiw==","dependencies": {"base64-js": "^1.3.0","ecdsa-sig-formatter": "^1.0.11",- "gaxios": "^6.0.0",- "gcp-metadata": "^6.0.0",+ "gaxios": "^6.1.1",+ "gcp-metadata": "^6.1.0","gtoken": "^7.0.0","jws": "^4.0.0"},@@ -14560,67 +14710,62 @@"node": ">=14"}},- "node_modules/google-p12-pem": {- "version": "4.0.1",- "resolved": "https://registry.npmjs.org/google-p12-pem/-/google-p12-pem-4.0.1.tgz",- "integrity": "sha512-WPkN4yGtz05WZ5EhtlxNDWPhC4JIic6G8ePitwUWy4l+XPVYec+a0j0Ts47PDtW59y3RwAhUd9/h9ZZ63px6RQ==",- "optional": true,- "peer": true,+ "node_modules/googleapis-common/node_modules/gtoken": {+ "version": "7.1.0",+ "resolved": "https://registry.npmjs.org/gtoken/-/gtoken-7.1.0.tgz",+ "integrity": "sha512-pCcEwRi+TKpMlxAQObHDQ56KawURgyAf6jtIY046fJ5tIv3zDe/LEIubckAO8fj6JnAxLdmWkUfNyulQ2iKdEw==","dependencies": {- "node-forge": "^1.3.1"- },- "bin": {- "gp12-pem": "build/src/bin/gp12-pem.js"+ "gaxios": "^6.0.0",+ "jws": "^4.0.0"},"engines": {- "node": ">=12.0.0"+ "node": ">=14.0.0"}},- "node_modules/googleapis": {- "version": "126.0.1",- "resolved": "https://registry.npmjs.org/googleapis/-/googleapis-126.0.1.tgz",- "integrity": "sha512-4N8LLi+hj6ytK3PhE52KcM8iSGhJjtXnCDYB4fp6l+GdLbYz4FoDmx074WqMbl7iYMDN87vqD/8drJkhxW92mQ==",+ "node_modules/googleapis/node_modules/gcp-metadata": {+ "version": "6.1.0",+ "resolved": "https://registry.npmjs.org/gcp-metadata/-/gcp-metadata-6.1.0.tgz",+ "integrity": "sha512-Jh/AIwwgaxan+7ZUUmRLCjtchyDiqh4KjBJ5tW3plBZb5iL/BPcso8A5DlzeD9qlw0duCamnNdpFjxwaT0KyKg==","dependencies": {- "google-auth-library": "^9.0.0",- "googleapis-common": "^7.0.0"+ "gaxios": "^6.0.0",+ "json-bigint": "^1.0.0"},"engines": {- "node": ">=14.0.0"+ "node": ">=14"}},- "node_modules/googleapis-common": {- "version": "7.0.1",- "resolved": "https://registry.npmjs.org/googleapis-common/-/googleapis-common-7.0.1.tgz",- "integrity": "sha512-mgt5zsd7zj5t5QXvDanjWguMdHAcJmmDrF9RkInCecNsyV7S7YtGqm5v2IWONNID88osb7zmx5FtrAP12JfD0w==",+ "node_modules/googleapis/node_modules/google-auth-library": {+ "version": "9.6.2",+ "resolved": "https://registry.npmjs.org/google-auth-library/-/google-auth-library-9.6.2.tgz",+ "integrity": "sha512-8G5i+uELrRE244PGnTc9UxiWZ2FMWD5jiIe9P2XSxCvXv/0ip/phjeHSE4bhJnLBdJb+Bu/Gj9Lr33TmDnbAiw==","dependencies": {- "extend": "^3.0.2",- "gaxios": "^6.0.3",- "google-auth-library": "^9.0.0",- "qs": "^6.7.0",- "url-template": "^2.0.8",- "uuid": "^9.0.0"+ "base64-js": "^1.3.0",+ "ecdsa-sig-formatter": "^1.0.11",+ "gaxios": "^6.1.1",+ "gcp-metadata": "^6.1.0",+ "gtoken": "^7.0.0",+ "jws": "^4.0.0"},"engines": {- "node": ">=14.0.0"+ "node": ">=14"}},- "node_modules/googleapis-common/node_modules/uuid": {- "version": "9.0.1",- "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz",- "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==",- "funding": [- "https://github.com/sponsors/broofa",- "https://github.com/sponsors/ctavan"- ],- "bin": {- "uuid": "dist/bin/uuid"+ "node_modules/googleapis/node_modules/gtoken": {+ "version": "7.1.0",+ "resolved": "https://registry.npmjs.org/gtoken/-/gtoken-7.1.0.tgz",+ "integrity": "sha512-pCcEwRi+TKpMlxAQObHDQ56KawURgyAf6jtIY046fJ5tIv3zDe/LEIubckAO8fj6JnAxLdmWkUfNyulQ2iKdEw==",+ "dependencies": {+ "gaxios": "^6.0.0",+ "jws": "^4.0.0"+ },+ "engines": {+ "node": ">=14.0.0"}},"node_modules/gopd": {"version": "1.0.1","resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz","integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==",- "dev": true,"dependencies": {"get-intrinsic": "^1.1.3"},@@ -14640,15 +14785,34 @@"dev": true},"node_modules/gtoken": {- "version": "7.0.1",- "resolved": "https://registry.npmjs.org/gtoken/-/gtoken-7.0.1.tgz",- "integrity": "sha512-KcFVtoP1CVFtQu0aSk3AyAt2og66PFhZAlkUOuWKwzMLoulHXG5W5wE5xAnHb+yl3/wEFoqGW7/cDGMU8igDZQ==",+ "version": "6.1.2",+ "resolved": "https://registry.npmjs.org/gtoken/-/gtoken-6.1.2.tgz",+ "integrity": "sha512-4ccGpzz7YAr7lxrT2neugmXQ3hP9ho2gcaityLVkiUecAiwiy60Ii8gRbZeOsXV19fYaRjgBSshs8kXw+NKCPQ==",+ "optional": true,+ "peer": true,"dependencies": {- "gaxios": "^6.0.0",+ "gaxios": "^5.0.1",+ "google-p12-pem": "^4.0.0","jws": "^4.0.0"},"engines": {- "node": ">=14.0.0"+ "node": ">=12.0.0"+ }+ },+ "node_modules/gtoken/node_modules/gaxios": {+ "version": "5.1.3",+ "resolved": "https://registry.npmjs.org/gaxios/-/gaxios-5.1.3.tgz",+ "integrity": "sha512-95hVgBRgEIRQQQHIbnxBXeHbW4TqFk4ZDJW7wmVtvYar72FdhRIo1UGOLS2eRAKCPEdPBWu+M7+A33D9CdX9rA==",+ "optional": true,+ "peer": true,+ "dependencies": {+ "extend": "^3.0.2",+ "https-proxy-agent": "^5.0.0",+ "is-stream": "^2.0.0",+ "node-fetch": "^2.6.9"+ },+ "engines": {+ "node": ">=12"}},"node_modules/hamt_plus": {@@ -14682,17 +14846,6 @@"integrity": "sha512-HIp/n38R9kQjDEziXyDTuW3vvoxxyxjxFzXLrBr18uB47GnSt+G9D29fqrpM5ZkspMcPICud3XsBJQ4Y2URg8g==","dev": true},- "node_modules/has": {- "version": "1.0.3",- "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",- "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==",- "dependencies": {- "function-bind": "^1.1.1"- },- "engines": {- "node": ">= 0.4.0"- }- },"node_modules/has-ansi": {"version": "2.0.0","resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz",@@ -14732,12 +14885,11 @@}},"node_modules/has-property-descriptors": {- "version": "1.0.0",- "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz",- "integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==",- "dev": true,+ "version": "1.0.1",+ "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.1.tgz",+ "integrity": "sha512-VsX8eaIewvas0xnvinAe9bw4WfIeODpGYikiWYLH+dma0Jw6KHYqWiWfhQlgOVK8D6PvjubK5Uc4P0iIhIcNVg==","dependencies": {- "get-intrinsic": "^1.1.1"+ "get-intrinsic": "^1.2.2"},"funding": {"url": "https://github.com/sponsors/ljharb"@@ -14766,12 +14918,12 @@}},"node_modules/has-tostringtag": {- "version": "1.0.0",- "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz",- "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==",+ "version": "1.0.2",+ "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz",+ "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==","dev": true,"dependencies": {- "has-symbols": "^1.0.2"+ "has-symbols": "^1.0.3"},"engines": {"node": ">= 0.4"@@ -14818,6 +14970,17 @@"minimalistic-assert": "^1.0.1"}},+ "node_modules/hasown": {+ "version": "2.0.0",+ "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.0.tgz",+ "integrity": "sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==",+ "dependencies": {+ "function-bind": "^1.1.2"+ },+ "engines": {+ "node": ">= 0.4"+ }+ },"node_modules/hast-util-from-dom": {"version": "4.2.0","resolved": "https://registry.npmjs.org/hast-util-from-dom/-/hast-util-from-dom-4.2.0.tgz",@@ -15266,9 +15429,9 @@]},"node_modules/ignore": {- "version": "5.2.4",- "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz",- "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==",+ "version": "5.3.1",+ "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz",+ "integrity": "sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==","devOptional": true,"engines": {"node": ">= 4"@@ -15345,6 +15508,7 @@"version": "1.0.6","resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz","integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==",+ "dev": true,"dependencies": {"once": "^1.3.0","wrappy": "1"@@ -15366,17 +15530,17 @@"integrity": "sha512-7NXolsK4CAS5+xvdj5OMMbI962hU/wvwoxk+LWR9Ek9bVtyuuYScDN6eS0rUm6TxApFpw7CX1o4uJzcd4AyD3Q=="},"node_modules/inquirer": {- "version": "9.2.11",- "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-9.2.11.tgz",- "integrity": "sha512-B2LafrnnhbRzCWfAdOXisUzL89Kg8cVJlYmhqoi3flSiV/TveO+nsXwgKr9h9PIo+J1hz7nBSk6gegRIMBBf7g==",+ "version": "9.2.14",+ "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-9.2.14.tgz",+ "integrity": "sha512-4ByIMt677Iz5AvjyKrDpzaepIyMewNvDcvwpVVRZNmy9dLakVoVgdCHZXbK1SlVJra1db0JZ6XkJyHsanpdrdQ==","dependencies": {- "@ljharb/through": "^2.3.9",+ "@ljharb/through": "^2.3.12","ansi-escapes": "^4.3.2","chalk": "^5.3.0","cli-cursor": "^3.1.0","cli-width": "^4.1.0","external-editor": "^3.1.0",- "figures": "^5.0.0",+ "figures": "^3.2.0","lodash": "^4.17.21","mute-stream": "1.0.0","ora": "^5.4.1",@@ -15387,7 +15551,7 @@"wrap-ansi": "^6.2.0"},"engines": {- "node": ">=14.18.0"+ "node": ">=18"}},"node_modules/inquirer-autocomplete-prompt": {@@ -15422,6 +15586,32 @@"url": "https://github.com/sponsors/sindresorhus"}},+ "node_modules/inquirer-autocomplete-prompt/node_modules/escape-string-regexp": {+ "version": "5.0.0",+ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-5.0.0.tgz",+ "integrity": "sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==",+ "engines": {+ "node": ">=12"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/inquirer-autocomplete-prompt/node_modules/figures": {+ "version": "5.0.0",+ "resolved": "https://registry.npmjs.org/figures/-/figures-5.0.0.tgz",+ "integrity": "sha512-ej8ksPF4x6e5wvK9yevct0UCXh8TTFlWGVLlgjZuoBH1HwjIfKE/IdL5mq89sFA7zELi1VhKpmtDnrs7zWyeyg==",+ "dependencies": {+ "escape-string-regexp": "^5.0.0",+ "is-unicode-supported": "^1.2.0"+ },+ "engines": {+ "node": ">=14"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },"node_modules/inquirer-autocomplete-prompt/node_modules/run-async": {"version": "2.4.1","resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz",@@ -15647,13 +15837,13 @@}},"node_modules/internal-slot": {- "version": "1.0.5",- "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.5.tgz",- "integrity": "sha512-Y+R5hJrzs52QCG2laLn4udYVnxsfny9CpOhNhUvk/SSSVyF6T27FzRbF0sroPidSu3X8oEAkOn2K804mjpt6UQ==",+ "version": "1.0.6",+ "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.6.tgz",+ "integrity": "sha512-Xj6dv+PsbtwyPpEflsejS+oIZxmMlV44zAhG479uYu89MsjcYOhCFnNyKrkJrihbsiasQyY0afoCl/9BLR65bg==","dev": true,"dependencies": {- "get-intrinsic": "^1.2.0",- "has": "^1.0.3",+ "get-intrinsic": "^1.2.2",+ "hasown": "^2.0.0","side-channel": "^1.0.4"},"engines": {@@ -15726,14 +15916,16 @@}},"node_modules/is-array-buffer": {- "version": "3.0.2",- "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.2.tgz",- "integrity": "sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w==",+ "version": "3.0.4",+ "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.4.tgz",+ "integrity": "sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw==","dev": true,"dependencies": {"call-bind": "^1.0.2",- "get-intrinsic": "^1.2.0",- "is-typed-array": "^1.1.10"+ "get-intrinsic": "^1.2.1"+ },+ "engines": {+ "node": ">= 0.4"},"funding": {"url": "https://github.com/sponsors/ljharb"@@ -15832,11 +16024,11 @@}},"node_modules/is-core-module": {- "version": "2.13.0",- "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.0.tgz",- "integrity": "sha512-Z7dk6Qo8pOCp3l4tsX2C5ZVas4V+UxwQodwZhLopL91TX8UyyHEXafPcyoeeWuLrwzHcr3igO78wNLwHJHsMCQ==",+ "version": "2.13.1",+ "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.1.tgz",+ "integrity": "sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==","dependencies": {- "has": "^1.0.3"+ "hasown": "^2.0.0"},"funding": {"url": "https://github.com/sponsors/ljharb"@@ -16025,14 +16217,12 @@}},"node_modules/is-plain-obj": {- "version": "4.1.0",- "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-4.1.0.tgz",- "integrity": "sha512-+Pgi+vMuUNkJyExiMBt5IlFoMyKnr5zhJ4Uspz58WOhBF5QoIZkFyNHIbBAtHwzVAgk5RtndVNsDRN61/mmDqg==",+ "version": "1.1.0",+ "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz",+ "integrity": "sha512-yvkRyxmFKEOQ4pNXCmJG5AEQNlXJS5LaONXo5/cLdTZdWvsZ1ioJEonLGAosKlMWE8lwUy/bJzMjcw8az73+Fg==",+ "dev": true,"engines": {- "node": ">=12"- },- "funding": {- "url": "https://github.com/sponsors/sindresorhus"+ "node": ">=0.10.0"}},"node_modules/is-potential-custom-element-name": {@@ -16129,12 +16319,12 @@}},"node_modules/is-typed-array": {- "version": "1.1.12",- "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.12.tgz",- "integrity": "sha512-Z14TF2JNG8Lss5/HMqt0//T9JeHXttXy5pH/DBU4vi98ozO2btxzq9MwYDZYnKwU8nRsz/+GVFVRDq3DkVuSPg==",+ "version": "1.1.13",+ "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.13.tgz",+ "integrity": "sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw==","dev": true,"dependencies": {- "which-typed-array": "^1.1.11"+ "which-typed-array": "^1.1.14"},"engines": {"node": ">= 0.4"@@ -16189,9 +16379,9 @@}},"node_modules/is-what": {- "version": "4.1.15",- "resolved": "https://registry.npmjs.org/is-what/-/is-what-4.1.15.tgz",- "integrity": "sha512-uKua1wfy3Yt+YqsD6mTUEa2zSi3G1oPlqTflgaPJ7z63vUGN5pxFpnQfeSLMFnJDEsdvOtkp1rUWkYjB4YfhgA==",+ "version": "4.1.16",+ "resolved": "https://registry.npmjs.org/is-what/-/is-what-4.1.16.tgz",+ "integrity": "sha512-ZhMwEosbFJkA0YhFnNDgTM4ZxDRsS6HqTo7qsZM08fehyRYIYa0yHu5R6mgo1n/8MgaPBXiPimPD77baVFYg+A==","dev": true,"engines": {"node": ">=12.13"@@ -16212,10 +16402,9 @@}},"node_modules/isarray": {- "version": "2.0.5",- "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz",- "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==",- "dev": true+ "version": "1.0.0",+ "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",+ "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ=="},"node_modules/isexe": {"version": "2.0.0",@@ -16232,18 +16421,18 @@}},"node_modules/istanbul-lib-coverage": {- "version": "3.2.0",- "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.0.tgz",- "integrity": "sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw==",+ "version": "3.2.2",+ "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz",+ "integrity": "sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==","dev": true,"engines": {"node": ">=8"}},"node_modules/istanbul-lib-instrument": {- "version": "6.0.0",- "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.0.tgz",- "integrity": "sha512-x58orMzEVfzPUKqlbLd1hXCnySCxKdDKa6Rjg97CwuLLRI4g3FHTdnExu1OqffVFay6zeMW+T6/DowFLndWnIw==",+ "version": "6.0.1",+ "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.1.tgz",+ "integrity": "sha512-EAMEJBsYuyyztxMxW3g7ugGPkrZsV57v0Hmv3mm1uQsmB+QnZuepg731CRaIgeUVSdmsTngOkSnauNF8p7FIhA==","dev": true,"dependencies": {"@babel/core": "^7.12.3",@@ -16345,10 +16534,9 @@}},"node_modules/jackspeak": {- "version": "2.3.3",- "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-2.3.3.tgz",- "integrity": "sha512-R2bUw+kVZFS/h1AZqBKrSgDmdmjApzgY0AlCPumopFiAlbUxE2gf+SCuBzQ0cP5hHmUmFYF5yw55T97Th5Kstg==",- "dev": true,+ "version": "2.3.6",+ "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-2.3.6.tgz",+ "integrity": "sha512-N3yCS/NegsOBokc8GAdM8UcmfsKiSS8cipheD/nivzr700H+nsMOxJjQnvwOcRYVuFkdH0wGUvW2WbXGmrZGbQ==","dependencies": {"@isaacs/cliui": "^8.0.2"},@@ -16461,6 +16649,15 @@"node": "^14.15.0 || ^16.10.0 || >=18.0.0"}},+ "node_modules/jest-circus/node_modules/slash": {+ "version": "3.0.0",+ "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz",+ "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==",+ "dev": true,+ "engines": {+ "node": ">=8"+ }+ },"node_modules/jest-cli": {"version": "29.7.0","resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-29.7.0.tgz",@@ -16559,6 +16756,15 @@"url": "https://github.com/sponsors/isaacs"}},+ "node_modules/jest-config/node_modules/slash": {+ "version": "3.0.0",+ "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz",+ "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==",+ "dev": true,+ "engines": {+ "node": ">=8"+ }+ },"node_modules/jest-diff": {"version": "29.7.0","resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.7.0.tgz",@@ -16655,6 +16861,15 @@"slash": "^3.0.0"}},+ "node_modules/jest-file-loader/node_modules/slash": {+ "version": "3.0.0",+ "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz",+ "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==",+ "dev": true,+ "engines": {+ "node": ">=8"+ }+ },"node_modules/jest-get-type": {"version": "29.6.3","resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.6.3.tgz",@@ -16704,6 +16919,15 @@"node": ">=10.12.0"}},+ "node_modules/jest-junit/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==",+ "dev": true,+ "bin": {+ "uuid": "dist/bin/uuid"+ }+ },"node_modules/jest-leak-detector": {"version": "29.7.0","resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.7.0.tgz",@@ -16752,6 +16976,15 @@"node": "^14.15.0 || ^16.10.0 || >=18.0.0"}},+ "node_modules/jest-message-util/node_modules/slash": {+ "version": "3.0.0",+ "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz",+ "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==",+ "dev": true,+ "engines": {+ "node": ">=8"+ }+ },"node_modules/jest-mock": {"version": "29.7.0","resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.7.0.tgz",@@ -16825,6 +17058,15 @@"node": "^14.15.0 || ^16.10.0 || >=18.0.0"}},+ "node_modules/jest-resolve/node_modules/slash": {+ "version": "3.0.0",+ "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz",+ "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==",+ "dev": true,+ "engines": {+ "node": ">=8"+ }+ },"node_modules/jest-runner": {"version": "29.7.0","resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-29.7.0.tgz",@@ -16910,6 +17152,15 @@"url": "https://github.com/sponsors/isaacs"}},+ "node_modules/jest-runtime/node_modules/slash": {+ "version": "3.0.0",+ "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz",+ "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==",+ "dev": true,+ "engines": {+ "node": ">=8"+ }+ },"node_modules/jest-snapshot": {"version": "29.7.0","resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.7.0.tgz",@@ -16975,18 +17226,6 @@"node": "^14.15.0 || ^16.10.0 || >=18.0.0"}},- "node_modules/jest-validate/node_modules/camelcase": {- "version": "6.3.0",- "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz",- "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==",- "dev": true,- "engines": {- "node": ">=10"- },- "funding": {- "url": "https://github.com/sponsors/sindresorhus"- }- },"node_modules/jest-watcher": {"version": "29.7.0","resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-29.7.0.tgz",@@ -17037,25 +17276,25 @@}},"node_modules/jiti": {- "version": "1.20.0",- "resolved": "https://registry.npmjs.org/jiti/-/jiti-1.20.0.tgz",- "integrity": "sha512-3TV69ZbrvV6U5DfQimop50jE9Dl6J8O1ja1dvBbMba/sZ3YBEQqJ2VZRoQPVnhlzjNtU1vaXRZVrVjU4qtm8yA==",+ "version": "1.21.0",+ "resolved": "https://registry.npmjs.org/jiti/-/jiti-1.21.0.tgz",+ "integrity": "sha512-gFqAIbuKyyso/3G2qhiO2OM6shY6EPP/R0+mkDbyspxKazh8BXDC5FiFsUjlczgdNz/vfra0da2y+aHrusLG/Q==","bin": {"jiti": "bin/jiti.js"}},"node_modules/jose": {- "version": "4.15.2",- "resolved": "https://registry.npmjs.org/jose/-/jose-4.15.2.tgz",- "integrity": "sha512-IY73F228OXRl9ar3jJagh7Vnuhj/GzBunPiZP13K0lOl7Am9SoWW3kEzq3MCllJMTtZqHTiDXQvoRd4U95aU6A==",+ "version": "4.15.4",+ "resolved": "https://registry.npmjs.org/jose/-/jose-4.15.4.tgz",+ "integrity": "sha512-W+oqK4H+r5sITxfxpSU+MMdr/YSWGvgZMQDIsNoBDGGy4i7GBPTtvFKibQzW06n3U3TqHjhvBJsirShsEJ6eeQ==","funding": {"url": "https://github.com/sponsors/panva"}},"node_modules/js-tiktoken": {- "version": "1.0.8",- "resolved": "https://registry.npmjs.org/js-tiktoken/-/js-tiktoken-1.0.8.tgz",- "integrity": "sha512-r7XK3E9/I+SOrbAGqb39pyO/rHAS1diAOSRAvaaLfHgXjkUSK9AiSd+r84Vn2f/GvXJYRAxKj8NHrUvqlaH5qg==",+ "version": "1.0.10",+ "resolved": "https://registry.npmjs.org/js-tiktoken/-/js-tiktoken-1.0.10.tgz",+ "integrity": "sha512-ZoSxbGjvGyMT13x6ACo9ebhDha/0FHdKA+OsQcMOWcm1Zs7r90Rhk5lhERLzji+3rA7EKpXCgwXcM5fF3DMpdA==","dependencies": {"base64-js": "^1.5.1"}@@ -17152,6 +17391,14 @@"integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==","dev": true},+ "node_modules/json-schema-ref-resolver": {+ "version": "1.0.1",+ "resolved": "https://registry.npmjs.org/json-schema-ref-resolver/-/json-schema-ref-resolver-1.0.1.tgz",+ "integrity": "sha512-EJAj1pgHc1hxF6vo2Z3s69fMjO1INq6eGHXZ8Z6wCQeldCuwxGK9Sxf4/cScGn3FZubCVUehfWtcDM/PLteCQw==",+ "dependencies": {+ "fast-deep-equal": "^3.1.3"+ }+ },"node_modules/json-schema-traverse": {"version": "0.4.1","resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",@@ -17177,13 +17424,9 @@}},"node_modules/jsonfile": {- "version": "6.1.0",- "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz",- "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==",- "dev": true,- "dependencies": {- "universalify": "^2.0.0"- },+ "version": "4.0.0",+ "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz",+ "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==","optionalDependencies": {"graceful-fs": "^4.1.6"}@@ -17279,9 +17522,9 @@}},"node_modules/katex": {- "version": "0.16.8",- "resolved": "https://registry.npmjs.org/katex/-/katex-0.16.8.tgz",- "integrity": "sha512-ftuDnJbcbOckGY11OO+zg3OofESlbR5DRl2cmN8HeWeeFIV7wTXvAOx8kEjZjobhA+9wh2fbKeO6cdcA9Mnovg==",+ "version": "0.16.9",+ "resolved": "https://registry.npmjs.org/katex/-/katex-0.16.9.tgz",+ "integrity": "sha512-fsSYjWS0EEOwvy81j3vRA8TEAhQhKiqO+FQaKWp0m39qwOzHVBgAUBIXWj1pB+O2W3fIpNa6Y9KSKCVbfPhyAQ==","funding": ["https://opencollective.com/katex","https://github.com/sponsors/katex"@@ -17319,68 +17562,309 @@"tslib": "^1.9.3"}},- "node_modules/keyv-file/node_modules/fs-extra": {- "version": "4.0.3",- "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-4.0.3.tgz",- "integrity": "sha512-q6rbdDd1o2mAnQreO7YADIxf/Whx4AHBiRf6d+/cVT8h44ss+lHgxf1FemcqDnQt9X3ct4McHr+JMGlYSsK7Cg==",+ "node_modules/keyv-file/node_modules/tslib": {+ "version": "1.14.1",+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",+ "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg=="+ },+ "node_modules/kleur": {+ "version": "3.0.3",+ "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz",+ "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==",+ "dev": true,+ "engines": {+ "node": ">=6"+ }+ },+ "node_modules/klona": {+ "version": "2.0.6",+ "resolved": "https://registry.npmjs.org/klona/-/klona-2.0.6.tgz",+ "integrity": "sha512-dhG34DXATL5hSxJbIexCft8FChFXtmskoZYnoPWjXQuebWYCNkVeV3KkGegCK9CP1oswI/vQibS2GY7Em/sJJA==",+ "engines": {+ "node": ">= 8"+ }+ },+ "node_modules/kuler": {+ "version": "2.0.0",+ "resolved": "https://registry.npmjs.org/kuler/-/kuler-2.0.0.tgz",+ "integrity": "sha512-Xq9nH7KlWZmXAtodXDDRE7vs6DU1gTU8zYDHDiWLSip45Egwq3plLHzPn27NgvzL2r1LMPC1vdqh98sQxtqj4A=="+ },+ "node_modules/langchain": {+ "version": "0.0.214",+ "resolved": "https://registry.npmjs.org/langchain/-/langchain-0.0.214.tgz",+ "integrity": "sha512-HWdgjuqsir7MYSX3OcKW+XUFZyqhma8yfn4NU/7K5MuIz649g0SejVjuHr3rexmsOvZyHeR3XlwIsqxEtOsF7A==",+ "dependencies": {+ "@anthropic-ai/sdk": "^0.9.1",+ "@langchain/community": "~0.0.13",+ "@langchain/core": "~0.1.5",+ "@langchain/openai": "~0.0.9",+ "binary-extensions": "^2.2.0",+ "expr-eval": "^2.0.2",+ "js-tiktoken": "^1.0.7",+ "js-yaml": "^4.1.0",+ "jsonpointer": "^5.0.1",+ "langchainhub": "~0.0.6",+ "langsmith": "~0.0.48",+ "ml-distance": "^4.0.0",+ "openapi-types": "^12.1.3",+ "p-retry": "4",+ "uuid": "^9.0.0",+ "yaml": "^2.2.1",+ "zod": "^3.22.3",+ "zod-to-json-schema": "3.20.3"+ },+ "engines": {+ "node": ">=18"+ },+ "peerDependencies": {+ "@aws-sdk/client-s3": "^3.310.0",+ "@aws-sdk/client-sagemaker-runtime": "^3.310.0",+ "@aws-sdk/client-sfn": "^3.310.0",+ "@aws-sdk/credential-provider-node": "^3.388.0",+ "@azure/storage-blob": "^12.15.0",+ "@gomomento/sdk": "^1.51.1",+ "@gomomento/sdk-core": "^1.51.1",+ "@gomomento/sdk-web": "^1.51.1",+ "@google-ai/generativelanguage": "^0.2.1",+ "@google-cloud/storage": "^6.10.1",+ "@notionhq/client": "^2.2.10",+ "@pinecone-database/pinecone": "^1.1.0",+ "@supabase/supabase-js": "^2.10.0",+ "@vercel/kv": "^0.2.3",+ "@xata.io/client": "^0.28.0",+ "apify-client": "^2.7.1",+ "assemblyai": "^4.0.0",+ "axios": "*",+ "cheerio": "^1.0.0-rc.12",+ "chromadb": "*",+ "convex": "^1.3.1",+ "d3-dsv": "^2.0.0",+ "epub2": "^3.0.1",+ "fast-xml-parser": "^4.2.7",+ "google-auth-library": "^8.9.0",+ "googleapis": "^126.0.1",+ "html-to-text": "^9.0.5",+ "ignore": "^5.2.0",+ "ioredis": "^5.3.2",+ "jsdom": "*",+ "mammoth": "^1.6.0",+ "mongodb": "^5.2.0",+ "node-llama-cpp": "*",+ "notion-to-md": "^3.1.0",+ "officeparser": "^4.0.4",+ "pdf-parse": "1.1.1",+ "peggy": "^3.0.2",+ "playwright": "^1.32.1",+ "puppeteer": "^19.7.2",+ "pyodide": "^0.24.1",+ "redis": "^4.6.4",+ "sonix-speech-recognition": "^2.1.1",+ "srt-parser-2": "^1.2.2",+ "typeorm": "^0.3.12",+ "vectordb": "^0.1.4",+ "weaviate-ts-client": "^1.4.0",+ "web-auth-library": "^1.0.3",+ "ws": "^8.14.2",+ "youtube-transcript": "^1.0.6",+ "youtubei.js": "^5.8.0"+ },+ "peerDependenciesMeta": {+ "@aws-sdk/client-s3": {+ "optional": true+ },+ "@aws-sdk/client-sagemaker-runtime": {+ "optional": true+ },+ "@aws-sdk/client-sfn": {+ "optional": true+ },+ "@aws-sdk/credential-provider-node": {+ "optional": true+ },+ "@azure/storage-blob": {+ "optional": true+ },+ "@gomomento/sdk": {+ "optional": true+ },+ "@gomomento/sdk-core": {+ "optional": true+ },+ "@gomomento/sdk-web": {+ "optional": true+ },+ "@google-ai/generativelanguage": {+ "optional": true+ },+ "@google-cloud/storage": {+ "optional": true+ },+ "@notionhq/client": {+ "optional": true+ },+ "@pinecone-database/pinecone": {+ "optional": true+ },+ "@supabase/supabase-js": {+ "optional": true+ },+ "@vercel/kv": {+ "optional": true+ },+ "@xata.io/client": {+ "optional": true+ },+ "apify-client": {+ "optional": true+ },+ "assemblyai": {+ "optional": true+ },+ "axios": {+ "optional": true+ },+ "cheerio": {+ "optional": true+ },+ "chromadb": {+ "optional": true+ },+ "convex": {+ "optional": true+ },+ "d3-dsv": {+ "optional": true+ },+ "epub2": {+ "optional": true+ },+ "faiss-node": {+ "optional": true+ },+ "fast-xml-parser": {+ "optional": true+ },+ "google-auth-library": {+ "optional": true+ },+ "googleapis": {+ "optional": true+ },+ "html-to-text": {+ "optional": true+ },+ "ignore": {+ "optional": true+ },+ "ioredis": {+ "optional": true+ },+ "jsdom": {+ "optional": true+ },+ "mammoth": {+ "optional": true+ },+ "mongodb": {+ "optional": true+ },+ "node-llama-cpp": {+ "optional": true+ },+ "notion-to-md": {+ "optional": true+ },+ "officeparser": {+ "optional": true+ },+ "pdf-parse": {+ "optional": true+ },+ "peggy": {+ "optional": true+ },+ "playwright": {+ "optional": true+ },+ "puppeteer": {+ "optional": true+ },+ "pyodide": {+ "optional": true+ },+ "redis": {+ "optional": true+ },+ "sonix-speech-recognition": {+ "optional": true+ },+ "srt-parser-2": {+ "optional": true+ },+ "typeorm": {+ "optional": true+ },+ "vectordb": {+ "optional": true+ },+ "weaviate-ts-client": {+ "optional": true+ },+ "web-auth-library": {+ "optional": true+ },+ "ws": {+ "optional": true+ },+ "youtube-transcript": {+ "optional": true+ },+ "youtubei.js": {+ "optional": true+ }+ }+ },+ "node_modules/langchain/node_modules/@anthropic-ai/sdk": {+ "version": "0.9.1",+ "resolved": "https://registry.npmjs.org/@anthropic-ai/sdk/-/sdk-0.9.1.tgz",+ "integrity": "sha512-wa1meQ2WSfoY8Uor3EdrJq0jTiZJoKoSii2ZVWRY1oN4Tlr5s59pADg9T79FTbPe1/se5c3pBeZgJL63wmuoBA==","dependencies": {- "graceful-fs": "^4.1.2",- "jsonfile": "^4.0.0",- "universalify": "^0.1.0"- }- },- "node_modules/keyv-file/node_modules/jsonfile": {- "version": "4.0.0",- "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz",- "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==",- "optionalDependencies": {- "graceful-fs": "^4.1.6"- }- },- "node_modules/keyv-file/node_modules/tslib": {- "version": "1.14.1",- "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",- "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg=="- },- "node_modules/keyv-file/node_modules/universalify": {- "version": "0.1.2",- "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz",- "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==",- "engines": {- "node": ">= 4.0.0"+ "@types/node": "^18.11.18",+ "@types/node-fetch": "^2.6.4",+ "abort-controller": "^3.0.0",+ "agentkeepalive": "^4.2.1",+ "digest-fetch": "^1.3.0",+ "form-data-encoder": "1.7.2",+ "formdata-node": "^4.3.2",+ "node-fetch": "^2.6.7",+ "web-streams-polyfill": "^3.2.1"}},- "node_modules/kleur": {- "version": "3.0.3",- "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz",- "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==",- "dev": true,- "engines": {- "node": ">=6"+ "node_modules/langchain/node_modules/@types/node": {+ "version": "18.19.14",+ "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.14.tgz",+ "integrity": "sha512-EnQ4Us2rmOS64nHDWr0XqAD8DsO6f3XR6lf9UIIrZQpUzPVdN/oPuEzfDWNHSyXLvoGgjuEm/sPwFGSSs35Wtg==",+ "dependencies": {+ "undici-types": "~5.26.4"}},- "node_modules/klona": {- "version": "2.0.6",- "resolved": "https://registry.npmjs.org/klona/-/klona-2.0.6.tgz",- "integrity": "sha512-dhG34DXATL5hSxJbIexCft8FChFXtmskoZYnoPWjXQuebWYCNkVeV3KkGegCK9CP1oswI/vQibS2GY7Em/sJJA==",- "engines": {- "node": ">= 8"+ "node_modules/langchain/node_modules/zod-to-json-schema": {+ "version": "3.20.3",+ "resolved": "https://registry.npmjs.org/zod-to-json-schema/-/zod-to-json-schema-3.20.3.tgz",+ "integrity": "sha512-/Q3wnyxAfCt94ZcrGiXXoiAfRqasxl9CX64LZ9fj+4dKH68zulUtU0uk1WMxQPfAxQ0ZI70dKzcoW7hHj+DwSQ==",+ "peerDependencies": {+ "zod": "^3.20.0"}},- "node_modules/kuler": {- "version": "2.0.0",- "resolved": "https://registry.npmjs.org/kuler/-/kuler-2.0.0.tgz",- "integrity": "sha512-Xq9nH7KlWZmXAtodXDDRE7vs6DU1gTU8zYDHDiWLSip45Egwq3plLHzPn27NgvzL2r1LMPC1vdqh98sQxtqj4A=="- },"node_modules/langchainhub": {"version": "0.0.6","resolved": "https://registry.npmjs.org/langchainhub/-/langchainhub-0.0.6.tgz","integrity": "sha512-SW6105T+YP1cTe0yMf//7kyshCgvCTyFBMTgH2H3s9rTAR4e+78DA/BBrUL/Mt4Q5eMWui7iGuAYb3pgGsdQ9w=="},"node_modules/langsmith": {- "version": "0.0.48",- "resolved": "https://registry.npmjs.org/langsmith/-/langsmith-0.0.48.tgz",- "integrity": "sha512-s0hW8iZ90Q9XLTnDK0Pgee245URV3b1cXQjPDj5OKm1+KN7iSK1pKx+4CO7RcFLz58Ixe7Mt+mVcomYqUuryxQ==",+ "version": "0.0.66",+ "resolved": "https://registry.npmjs.org/langsmith/-/langsmith-0.0.66.tgz",+ "integrity": "sha512-yextqrwQiN+2Y0WjHEjQmwS9V6886RIuUG8esibiSh6BTHrtt1WMCAPKJIy8E1+HQvVY7IzsuJ4vzpkKi0wcTQ==","dependencies": {"@types/uuid": "^9.0.1","commander": "^10.0.1",@@ -17392,26 +17876,6 @@"langsmith": "dist/cli/main.cjs"}},- "node_modules/langsmith/node_modules/commander": {- "version": "10.0.1",- "resolved": "https://registry.npmjs.org/commander/-/commander-10.0.1.tgz",- "integrity": "sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==",- "engines": {- "node": ">=14"- }- },- "node_modules/langsmith/node_modules/uuid": {- "version": "9.0.1",- "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz",- "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==",- "funding": [- "https://github.com/sponsors/broofa",- "https://github.com/sponsors/ctavan"- ],- "bin": {- "uuid": "dist/bin/uuid"- }- },"node_modules/leven": {"version": "3.1.0","resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz",@@ -17448,6 +17912,11 @@"set-cookie-parser": "^2.4.1"}},+ "node_modules/light-my-request/node_modules/process-warning": {+ "version": "2.3.2",+ "resolved": "https://registry.npmjs.org/process-warning/-/process-warning-2.3.2.tgz",+ "integrity": "sha512-n9wh8tvBe5sFmsqlg+XQhaQLumwpqoAUruLwjCopgTmUBjJ/fjtBsJzKleCaIGBOMXYEhp1YfKl4d7rJ5ZKJGA=="+ },"node_modules/lilconfig": {"version": "2.1.0","resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-2.1.0.tgz",@@ -17500,6 +17969,15 @@"url": "https://github.com/chalk/chalk?sponsor=1"}},+ "node_modules/lint-staged/node_modules/commander": {+ "version": "11.0.0",+ "resolved": "https://registry.npmjs.org/commander/-/commander-11.0.0.tgz",+ "integrity": "sha512-9HMlXtt/BNoYr8ooyjjNRdIilOTkVJXB+GhxMTtOKwk0R4j4lS4NpjuqmRxroBfnfTSHQIHQB7wryHhXarNjmQ==",+ "dev": true,+ "engines": {+ "node": ">=16"+ }+ },"node_modules/lint-staged/node_modules/execa": {"version": "7.2.0","resolved": "https://registry.npmjs.org/execa/-/execa-7.2.0.tgz",@@ -17557,9 +18035,9 @@}},"node_modules/lint-staged/node_modules/npm-run-path": {- "version": "5.1.0",- "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.1.0.tgz",- "integrity": "sha512-sJOdmRGrY2sjNTRMbSvluQqg+8X7ZK61yvzBEIDhz4f8z1TZFYABsqjjCBd/0PUNE9M6QDgHJXQkGUEm7Q+l9Q==",+ "version": "5.2.0",+ "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.2.0.tgz",+ "integrity": "sha512-W4/tgAXFqFA0iL7fk0+uQ3g7wkL8xJmx3XdK0VGb4cHW//eZTtKGvFBBoRKVTpY7n6ze4NL9ly7rgXcHufqXKg==","dev": true,"dependencies": {"path-key": "^4.0.0"@@ -17610,6 +18088,15 @@"url": "https://github.com/sponsors/sindresorhus"}},+ "node_modules/lint-staged/node_modules/yaml": {+ "version": "2.3.1",+ "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.3.1.tgz",+ "integrity": "sha512-2eHWfjaoXgTBC2jNM1LRef62VQa0umtvRiDSk6HSzW7RvS5YtkabJrwYLLEKWBc8a5U2PTSCs+dJjUTJdlHsWQ==",+ "dev": true,+ "engines": {+ "node": ">= 14"+ }+ },"node_modules/listr2": {"version": "6.6.1","resolved": "https://registry.npmjs.org/listr2/-/listr2-6.6.1.tgz",@@ -17635,6 +18122,16 @@}}},+ "node_modules/loader-runner": {+ "version": "4.3.0",+ "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.3.0.tgz",+ "integrity": "sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg==",+ "dev": true,+ "peer": true,+ "engines": {+ "node": ">=6.11.5"+ }+ },"node_modules/locate-path": {"version": "6.0.0","resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz",@@ -17827,22 +18324,25 @@}},"node_modules/logform": {- "version": "2.5.1",- "resolved": "https://registry.npmjs.org/logform/-/logform-2.5.1.tgz",- "integrity": "sha512-9FyqAm9o9NKKfiAKfZoYo9bGXXuwMkxQiQttkT4YjjVtQVIQtK6LmVtlxmCaFswo6N4AfEkHqZTV0taDtPotNg==",+ "version": "2.6.0",+ "resolved": "https://registry.npmjs.org/logform/-/logform-2.6.0.tgz",+ "integrity": "sha512-1ulHeNPp6k/LD8H91o7VYFBng5i1BDE7HoKxVbZiGFidS1Rj65qcywLxX+pVfAPoQJEjRdvKcusKwOupHCVOVQ==","dependencies": {- "@colors/colors": "1.5.0",+ "@colors/colors": "1.6.0","@types/triple-beam": "^1.3.2","fecha": "^4.2.0","ms": "^2.1.1","safe-stable-stringify": "^2.3.1","triple-beam": "^1.3.0"+ },+ "engines": {+ "node": ">= 12.0.0"}},"node_modules/loglevel": {- "version": "1.8.1",- "resolved": "https://registry.npmjs.org/loglevel/-/loglevel-1.8.1.tgz",- "integrity": "sha512-tCRIJM51SHjAayKwC+QAg8hT8vg6z7GSgLJKGvzuPb1Wc+hLzqtuVLxp6/HzSPOozuK+8ErAhy7U/sVzw8Dgfg==",+ "version": "1.9.1",+ "resolved": "https://registry.npmjs.org/loglevel/-/loglevel-1.9.1.tgz",+ "integrity": "sha512-hP3I3kCrDIMuRwAwHltphhDM1r8i55H33GgqjXbrisuJhF4kRhW1dNuxsRklp4bXl8DSdLaNLuiL4A/LWRfxvg==","dev": true,"engines": {"node": ">= 0.6.0"@@ -18001,12 +18501,12 @@}},"node_modules/magic-string": {- "version": "0.27.0",- "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.27.0.tgz",- "integrity": "sha512-8UnnX2PeRAPZuN12svgR9j7M1uWMovg/CEnIwIG0LFkXSJJe4PdfUGiTGl8V9bsBHFUtfVINcSyYxd7q+kx9fA==",+ "version": "0.30.7",+ "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.7.tgz",+ "integrity": "sha512-8vBuFF/I/+OSLRmdf2wwFCJCz+nSn0m6DPvGH1fS/KiQoSaR+sETbov0eIk9KhEKy8CYqIkIAnbohxT/4H0kuA==","dev": true,"dependencies": {- "@jridgewell/sourcemap-codec": "^1.4.13"+ "@jridgewell/sourcemap-codec": "^1.4.15"},"engines": {"node": ">=12"@@ -18566,9 +19066,9 @@}},"node_modules/micromark-extension-math/node_modules/@types/katex": {- "version": "0.16.3",- "resolved": "https://registry.npmjs.org/@types/katex/-/katex-0.16.3.tgz",- "integrity": "sha512-CeVMX9EhVUW8MWnei05eIRks4D5Wscw/W9Byz1s3PA+yJvcdvq9SaDjiUKvRvEgjpdTyJMjQA43ae4KTwsvOPg=="+ "version": "0.16.7",+ "resolved": "https://registry.npmjs.org/@types/katex/-/katex-0.16.7.tgz",+ "integrity": "sha512-HMwFiRujE5PjrgwHQ25+bsLJgowjGjm5Z8FVSf0N6PwgJrwxH0QxzHYDcKsTfV3wva0vzrpqMTJS2jXPr5BMEQ=="},"node_modules/micromark-factory-destination": {"version": "1.1.0",@@ -18956,14 +19456,14 @@"dev": true},"node_modules/mime": {- "version": "1.6.0",- "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz",- "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==",+ "version": "3.0.0",+ "resolved": "https://registry.npmjs.org/mime/-/mime-3.0.0.tgz",+ "integrity": "sha512-jSCU7/VB1loIWBZe14aEYHU/+1UMEHoaO7qxCOVJOw9GgH72VAWppxNcjU+x9a2k3GSIBXNKxXQFqRvvZ7vr3A==","bin": {"mime": "cli.js"},"engines": {- "node": ">=4"+ "node": ">=10.0.0"}},"node_modules/mime-db": {@@ -19029,6 +19529,7 @@"version": "3.1.2","resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz","integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",+ "dev": true,"dependencies": {"brace-expansion": "^1.1.7"},@@ -19045,10 +19546,9 @@}},"node_modules/minipass": {- "version": "7.0.3",- "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.3.tgz",- "integrity": "sha512-LhbbwCfz3vsb12j/WkWQPZfKTsgqIe1Nf/ti1pKjYESGLHIVjWU96G9/ljLH4F9mWNVhlQOm0VySdAWzf05dpg==",- "dev": true,+ "version": "7.0.4",+ "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.4.tgz",+ "integrity": "sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==","engines": {"node": ">=16 || 14 >=14.17"}@@ -19111,9 +19611,9 @@}},"node_modules/mnemonist": {- "version": "0.39.5",- "resolved": "https://registry.npmjs.org/mnemonist/-/mnemonist-0.39.5.tgz",- "integrity": "sha512-FPUtkhtJ0efmEFGpU14x7jGbTB+s18LrzRL2KgoWz9YvcY3cPomz8tih01GbHwnGk/OmkOKfqd/RAQoc8Lm7DQ==",+ "version": "0.39.6",+ "resolved": "https://registry.npmjs.org/mnemonist/-/mnemonist-0.39.6.tgz",+ "integrity": "sha512-A/0v5Z59y63US00cRSLiloEIw3t5G+MiKz4BhX21FI+YBJXBOGW0ohFxTxO08dsOYlzxo87T7vGfZKYp2bcAWA==","dependencies": {"obliterator": "^2.0.1"}@@ -19124,19 +19624,21 @@"integrity": "sha512-23g5BFj4zdQL/b6tor7Ji+QY4pEfNH784BMslY9Qb0UnJWRAt+lQGLYmRaM0KDBwIG23ffEBELhZDP2rhi9f/Q=="},"node_modules/moment": {- "version": "2.29.4",- "resolved": "https://registry.npmjs.org/moment/-/moment-2.29.4.tgz",- "integrity": "sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w==",+ "version": "2.30.1",+ "resolved": "https://registry.npmjs.org/moment/-/moment-2.30.1.tgz",+ "integrity": "sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how==","engines": {"node": "*"}},"node_modules/mongodb": {- "version": "5.8.1",- "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-5.8.1.tgz",- "integrity": "sha512-wKyh4kZvm6NrCPH8AxyzXm3JBoEf4Xulo0aUWh3hCgwgYJxyQ1KLST86ZZaSWdj6/kxYUA3+YZuyADCE61CMSg==",+ "version": "5.9.2",+ "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-5.9.2.tgz",+ "integrity": "sha512-H60HecKO4Bc+7dhOv4sJlgvenK4fQNqqUIlXxZYQNbfEWSALGAwGoyJd/0Qwk4TttFXUOHJ2ZJQe/52ScaUwtQ==",+ "optional": true,+ "peer": true,"dependencies": {- "bson": "^5.4.0",+ "bson": "^5.5.0","mongodb-connection-string-url": "^2.6.0","socks": "^2.7.1"},@@ -19181,13 +19683,13 @@}},"node_modules/mongoose": {- "version": "7.5.1",- "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-7.5.1.tgz",- "integrity": "sha512-gJCkUtW3KgAu7Uf8HTVv+S3wf9+xldR5LFYM6mABJJQHQB0aWUGyC3bWsl2X/6dVHZSoQq3wh5UV7rWC4FrewA==",+ "version": "7.6.8",+ "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-7.6.8.tgz",+ "integrity": "sha512-q9zAySH+UtOK5yonWyNcLfq3PxrY6s4gdta4qNGKNOE2yTVoY9FP4hQtvWYnv4rkdk7T8QmQMC7bbhJjDxIunw==","dependencies": {- "bson": "^5.4.0",+ "bson": "^5.5.0","kareem": "2.5.1",- "mongodb": "5.8.1",+ "mongodb": "5.9.1","mpath": "0.9.0","mquery": "5.0.0","ms": "2.1.3",@@ -19201,6 +19703,46 @@"url": "https://opencollective.com/mongoose"}},+ "node_modules/mongoose/node_modules/mongodb": {+ "version": "5.9.1",+ "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-5.9.1.tgz",+ "integrity": "sha512-NBGA8AfJxGPeB12F73xXwozt8ZpeIPmCUeWRwl9xejozTXFes/3zaep9zhzs1B/nKKsw4P3I4iPfXl3K7s6g+Q==",+ "dependencies": {+ "bson": "^5.5.0",+ "mongodb-connection-string-url": "^2.6.0",+ "socks": "^2.7.1"+ },+ "engines": {+ "node": ">=14.20.1"+ },+ "optionalDependencies": {+ "@mongodb-js/saslprep": "^1.1.0"+ },+ "peerDependencies": {+ "@aws-sdk/credential-providers": "^3.188.0",+ "@mongodb-js/zstd": "^1.0.0",+ "kerberos": "^1.0.0 || ^2.0.0",+ "mongodb-client-encryption": ">=2.3.0 <3",+ "snappy": "^7.2.2"+ },+ "peerDependenciesMeta": {+ "@aws-sdk/credential-providers": {+ "optional": true+ },+ "@mongodb-js/zstd": {+ "optional": true+ },+ "kerberos": {+ "optional": true+ },+ "mongodb-client-encryption": {+ "optional": true+ },+ "snappy": {+ "optional": true+ }+ }+ },"node_modules/mongoose/node_modules/ms": {"version": "2.1.3","resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",@@ -19366,9 +19908,9 @@}},"node_modules/node-abi": {- "version": "3.47.0",- "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.47.0.tgz",- "integrity": "sha512-2s6B2CWZM//kPgwnuI0KrYwNjfdByE25zvAaEpq9IH4zcNsarH8Ihu/UuX6XMPEogDAxkuUFeZn60pXNHAqn3A==",+ "version": "3.54.0",+ "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.54.0.tgz",+ "integrity": "sha512-p7eGEiQil0YUV3ItH4/tBb781L5impVmmx2E9FRKF7d18XXzp4PGT2tdYMFY6wQqgxD0IwNZOiSJ0/K0fSi/OA==","dependencies": {"semver": "^7.3.5"},@@ -19684,21 +20226,21 @@}},"node_modules/nodemailer": {- "version": "6.9.5",- "resolved": "https://registry.npmjs.org/nodemailer/-/nodemailer-6.9.5.tgz",- "integrity": "sha512-/dmdWo62XjumuLc5+AYQZeiRj+PRR8y8qKtFCOyuOl1k/hckZd8durUUHs/ucKx6/8kN+wFxqKJlQ/LK/qR5FA==",+ "version": "6.9.9",+ "resolved": "https://registry.npmjs.org/nodemailer/-/nodemailer-6.9.9.tgz",+ "integrity": "sha512-dexTll8zqQoVJEZPwQAKzxxtFn0qTnjdQTchoU6Re9BUUGBJiOy3YMn/0ShTW6J5M0dfQ1NeDeRTTl4oIWgQMA==","engines": {"node": ">=6.0.0"}},"node_modules/nodemon": {- "version": "3.0.1",- "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-3.0.1.tgz",- "integrity": "sha512-g9AZ7HmkhQkqXkRc20w+ZfQ73cHLbE8hnPbtaFbFtCumZsjyMhKk9LajQ07U5Ux28lvFjZ5X7HvWR1xzU8jHVw==",+ "version": "3.0.3",+ "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-3.0.3.tgz",+ "integrity": "sha512-7jH/NXbFPxVaMwmBCC2B9F/V6X1VkEdNgx3iu9jji8WxWcvhMWkmhNWhI5077zknOnZnBzba9hZP6bCPJLSReQ==","dev": true,"dependencies": {"chokidar": "^3.5.2",- "debug": "^3.2.7",+ "debug": "^4","ignore-by-default": "^1.0.1","minimatch": "^3.1.2","pstree.remy": "^1.1.8",@@ -19719,15 +20261,6 @@"url": "https://opencollective.com/nodemon"}},- "node_modules/nodemon/node_modules/debug": {- "version": "3.2.7",- "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz",- "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==",- "dev": true,- "dependencies": {- "ms": "^2.1.1"- }- },"node_modules/nodemon/node_modules/has-flag": {"version": "3.0.0","resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",@@ -19842,9 +20375,9 @@"devOptional": true},"node_modules/oauth": {- "version": "0.9.15",- "resolved": "https://registry.npmjs.org/oauth/-/oauth-0.9.15.tgz",- "integrity": "sha512-a5ERWK1kh38ExDEfoO6qUHJb32rd7aYmPHuyCu3Fta/cnICvYmgd2uhuKXvPD+PXB+gCEYYEaQdIRAjCOwAKNA=="+ "version": "0.10.0",+ "resolved": "https://registry.npmjs.org/oauth/-/oauth-0.10.0.tgz",+ "integrity": "sha512-1orQ9MT1vHFGQxhuy7E/0gECD3fd2fCC+PIX+/jgmU/gI3EpRocXtmtvxCO5x3WZ443FLTLFWNDjl5MPJf9u+Q=="},"node_modules/object-assign": {"version": "4.1.1",@@ -19855,17 +20388,17 @@}},"node_modules/object-hash": {- "version": "3.0.0",- "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-3.0.0.tgz",- "integrity": "sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw==",+ "version": "2.2.0",+ "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-2.2.0.tgz",+ "integrity": "sha512-gScRMn0bS5fH+IuwyIFgnh9zBdo4DV+6GhygmWM9HyNJSgS0hScp1f5vjtm7oIIOiT9trXrShAkLFSc2IqKNgw==","engines": {"node": ">= 6"}},"node_modules/object-inspect": {- "version": "1.12.3",- "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz",- "integrity": "sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==",+ "version": "1.13.1",+ "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz",+ "integrity": "sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==","funding": {"url": "https://github.com/sponsors/ljharb"}@@ -19896,13 +20429,13 @@}},"node_modules/object.assign": {- "version": "4.1.4",- "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.4.tgz",- "integrity": "sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==",+ "version": "4.1.5",+ "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.5.tgz",+ "integrity": "sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==","dev": true,"dependencies": {- "call-bind": "^1.0.2",- "define-properties": "^1.1.4",+ "call-bind": "^1.0.5",+ "define-properties": "^1.2.1","has-symbols": "^1.0.3","object-keys": "^1.1.1"},@@ -19945,15 +20478,16 @@}},"node_modules/object.groupby": {- "version": "1.0.1",- "resolved": "https://registry.npmjs.org/object.groupby/-/object.groupby-1.0.1.tgz",- "integrity": "sha512-HqaQtqLnp/8Bn4GL16cj+CUYbnpe1bh0TtEaWvybszDG4tgxCJuRpV8VGuvNaI1fAnI4lUJzDG55MXcOH4JZcQ==",+ "version": "1.0.2",+ "resolved": "https://registry.npmjs.org/object.groupby/-/object.groupby-1.0.2.tgz",+ "integrity": "sha512-bzBq58S+x+uo0VjurFT0UktpKHOZmv4/xePiOA1nbB9pMqpGK7rUPNgf+1YC+7mE+0HzhTMqNUuCqvKhj6FnBw==","dev": true,"dependencies": {- "call-bind": "^1.0.2",- "define-properties": "^1.2.0",- "es-abstract": "^1.22.1",- "get-intrinsic": "^1.2.1"+ "array.prototype.filter": "^1.0.3",+ "call-bind": "^1.0.5",+ "define-properties": "^1.2.1",+ "es-abstract": "^1.22.3",+ "es-errors": "^1.0.0"}},"node_modules/object.hasown": {@@ -20000,9 +20534,12 @@}},"node_modules/on-exit-leak-free": {- "version": "2.1.0",- "resolved": "https://registry.npmjs.org/on-exit-leak-free/-/on-exit-leak-free-2.1.0.tgz",- "integrity": "sha512-VuCaZZAjReZ3vUwgOB8LxAosIurDiAW0s13rI1YwmaP++jvcxP77AWoQvenZebpCA2m8WC1/EosPYPMjnRAp/w=="+ "version": "2.1.2",+ "resolved": "https://registry.npmjs.org/on-exit-leak-free/-/on-exit-leak-free-2.1.2.tgz",+ "integrity": "sha512-0eJJY6hXLGf1udHwfNftBqH+g73EU4B504nZeKpz1sYRKafAghwxEJunB2O7rDZkL4PGfsMVnTXZ2EjibbqcsA==",+ "engines": {+ "node": ">=14.0.0"+ }},"node_modules/on-finished": {"version": "2.4.1",@@ -20054,9 +20591,9 @@}},"node_modules/openai": {- "version": "4.20.1",- "resolved": "https://registry.npmjs.org/openai/-/openai-4.20.1.tgz",- "integrity": "sha512-Dd3q8EvINfganZFtg6V36HjrMaihqRgIcKiHua4Nq9aw/PxOP48dhbsk8x5klrxajt5Lpnc1KTOG5i1S6BKAJA==",+ "version": "4.11.1",+ "resolved": "https://registry.npmjs.org/openai/-/openai-4.11.1.tgz",+ "integrity": "sha512-GU0HQWbejXuVAQlDjxIE8pohqnjptFDIm32aPlNT1H9ucMz1VJJD0DaTJRQsagNaJ97awWjjVLEG7zCM6sm4SA==","dependencies": {"@types/node": "^18.11.18","@types/node-fetch": "^2.6.4",@@ -20065,8 +20602,7 @@"digest-fetch": "^1.3.0","form-data-encoder": "1.7.2","formdata-node": "^4.3.2",- "node-fetch": "^2.6.7",- "web-streams-polyfill": "^3.2.1"+ "node-fetch": "^2.6.7"},"bin": {"openai": "bin/cli"@@ -20081,16 +20617,11 @@}},"node_modules/openai/node_modules/@types/node": {- "version": "18.18.3",- "resolved": "https://registry.npmjs.org/@types/node/-/node-18.18.3.tgz",- "integrity": "sha512-0OVfGupTl3NBFr8+iXpfZ8NR7jfFO+P1Q+IO/q0wbo02wYkP5gy36phojeYWpLQ6WAMjl+VfmqUk2YbUfp0irA=="- },- "node_modules/openai/node_modules/web-streams-polyfill": {- "version": "3.2.1",- "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.2.1.tgz",- "integrity": "sha512-e0MO3wdXWKrLbL0DgGnUV7WHVuw9OUvL4hjgnPkIeEvESk74gAITi5G606JtZPp39cd8HA9VQzCIvA49LpPN5Q==",- "engines": {- "node": ">= 8"+ "version": "18.19.14",+ "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.14.tgz",+ "integrity": "sha512-EnQ4Us2rmOS64nHDWr0XqAD8DsO6f3XR6lf9UIIrZQpUzPVdN/oPuEzfDWNHSyXLvoGgjuEm/sPwFGSSs35Wtg==",+ "dependencies": {+ "undici-types": "~5.26.4"}},"node_modules/openapi-types": {@@ -20099,11 +20630,11 @@"integrity": "sha512-N4YtSYJqghVu4iek2ZUvcN/0aqH1kRDuNqzcycDxhOUpg7GdvLa2F3DgS6yBNhInhv2r/6I0Flkn7CqL8+nIcw=="},"node_modules/openid-client": {- "version": "5.5.0",- "resolved": "https://registry.npmjs.org/openid-client/-/openid-client-5.5.0.tgz",- "integrity": "sha512-Y7Xl8BgsrkzWLHkVDYuroM67hi96xITyEDSkmWaGUiNX6CkcXC3XyQGdv5aWZ6dukVKBFVQCADi9gCavOmU14w==",+ "version": "5.6.4",+ "resolved": "https://registry.npmjs.org/openid-client/-/openid-client-5.6.4.tgz",+ "integrity": "sha512-T1h3B10BRPKfcObdBklX639tVz+xh34O7GjofqrqiAQdm7eHsQ00ih18x6wuJ/E6FxdtS2u3FmUGPDeEcMwzNA==","dependencies": {- "jose": "^4.14.4",+ "jose": "^4.15.4","lru-cache": "^6.0.0","object-hash": "^2.2.0","oidc-token-hash": "^5.0.3"@@ -20123,14 +20654,6 @@"node": ">=10"}},- "node_modules/openid-client/node_modules/object-hash": {- "version": "2.2.0",- "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-2.2.0.tgz",- "integrity": "sha512-gScRMn0bS5fH+IuwyIFgnh9zBdo4DV+6GhygmWM9HyNJSgS0hScp1f5vjtm7oIIOiT9trXrShAkLFSc2IqKNgw==",- "engines": {- "node": ">= 6"- }- },"node_modules/openid-client/node_modules/yallist": {"version": "4.0.0","resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",@@ -20198,9 +20721,9 @@}},"node_modules/ora/node_modules/emoji-regex": {- "version": "10.2.1",- "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.2.1.tgz",- "integrity": "sha512-97g6QgOk8zlDRdgq1WxwgTMgEWGVAQvB5Fdpgc1MkNy56la5SKP9GsMXKDOdqwn90/41a8yPwIGk1Y6WVbeMQA=="+ "version": "10.3.0",+ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.3.0.tgz",+ "integrity": "sha512-QpLs9D9v9kArv4lfDEgg1X/gN5XLnf/A6l9cs8SPZLRZR3ZkY9+kwIQTxm+fsSej5UMYGE8fdoaZVIBlqG0XTw=="},"node_modules/ora/node_modules/string-width": {"version": "6.1.0",@@ -20543,12 +21066,12 @@}},"node_modules/passport-oauth2": {- "version": "1.7.0",- "resolved": "https://registry.npmjs.org/passport-oauth2/-/passport-oauth2-1.7.0.tgz",- "integrity": "sha512-j2gf34szdTF2Onw3+76alNnaAExlUmHvkc7cL+cmaS5NzHzDP/BvFHJruueQ9XAeNOdpI+CH+PWid8RA7KCwAQ==",+ "version": "1.8.0",+ "resolved": "https://registry.npmjs.org/passport-oauth2/-/passport-oauth2-1.8.0.tgz",+ "integrity": "sha512-cjsQbOrXIDE4P8nNb3FQRCCmJJ/utnFKEz2NX209f7KOHPoX18gF7gBzBbLLsj2/je4KrgiwLLGjf0lm9rtTBA==","dependencies": {"base64url": "3.x.x",- "oauth": "0.9.x",+ "oauth": "0.10.x","passport-strategy": "1.x.x","uid2": "0.0.x","utils-merge": "1.x.x"@@ -20588,6 +21111,7 @@"version": "1.0.1","resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz","integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==",+ "dev": true,"engines": {"node": ">=0.10.0"}@@ -20609,7 +21133,6 @@"version": "1.10.1","resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.10.1.tgz","integrity": "sha512-MkhCqzzBEpPvxxQ71Md0b1Kk51W01lrYvlMzSUaIzNsODdd7mqhiimSZlr+VegAz5Z6Vzt9Xg2ttE//XBhH3EQ==",- "dev": true,"dependencies": {"lru-cache": "^9.1.1 || ^10.0.0","minipass": "^5.0.0 || ^6.0.2 || ^7.0.0"@@ -20622,10 +21145,9 @@}},"node_modules/path-scurry/node_modules/lru-cache": {- "version": "10.0.1",- "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.0.1.tgz",- "integrity": "sha512-IJ4uwUTi2qCccrioU6g9g/5rvvVl13bsdczUUcqbciD9iLr095yj8DQKdObriEvuNSx325N1rV1O0sJFszx75g==",- "dev": true,+ "version": "10.2.0",+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.2.0.tgz",+ "integrity": "sha512-2bIM8x+VAf6JT4bKAljS1qUWgMsqZRPGJS6FSahIMPVvctcNhyVp7AJu7quxOW9jwkryBReKZY5tY5JYv2n/7Q==","engines": {"node": "14 || >=16.14"}@@ -20671,6 +21193,18 @@"node": ">=0.12"}},+ "node_modules/peek-readable": {+ "version": "5.0.0",+ "resolved": "https://registry.npmjs.org/peek-readable/-/peek-readable-5.0.0.tgz",+ "integrity": "sha512-YtCKvLUOvwtMGmrniQPdO7MwPjgkFBtFIrmfSbYmYuq3tKDV/mcfAhBth1+C3ru7uXIZasc/pHnb+YDYNkkj4A==",+ "engines": {+ "node": ">=14.16"+ },+ "funding": {+ "type": "github",+ "url": "https://github.com/sponsors/Borewit"+ }+ },"node_modules/pica": {"version": "9.0.1","resolved": "https://registry.npmjs.org/pica/-/pica-9.0.1.tgz",@@ -20722,16 +21256,16 @@}},"node_modules/pino": {- "version": "8.16.0",- "resolved": "https://registry.npmjs.org/pino/-/pino-8.16.0.tgz",- "integrity": "sha512-UUmvQ/7KTZt/vHjhRrnyS7h+J7qPBQnpG80V56xmIC+o9IqYmQOw/UIny9S9zYDfRBR0ClouCr464EkBMIT7Fw==",+ "version": "8.18.0",+ "resolved": "https://registry.npmjs.org/pino/-/pino-8.18.0.tgz",+ "integrity": "sha512-Mz/gKiRyuXu4HnpHgi1YWdHQCoWMufapzooisvFn78zl4dZciAxS+YeRkUxXl1ee/SzU80YCz1zpECCh4oC6Aw==","dependencies": {"atomic-sleep": "^1.0.0","fast-redact": "^3.1.1","on-exit-leak-free": "^2.1.0","pino-abstract-transport": "v1.1.0","pino-std-serializers": "^6.0.0",- "process-warning": "^2.0.0",+ "process-warning": "^3.0.0","quick-format-unescaped": "^4.0.3","real-require": "^0.2.0","safe-stable-stringify": "^2.3.1",@@ -20752,9 +21286,9 @@}},"node_modules/pino-abstract-transport/node_modules/readable-stream": {- "version": "4.4.2",- "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.4.2.tgz",- "integrity": "sha512-Lk/fICSyIhodxy1IDK2HazkeGjSmezAWX2egdtJnYhtzKEsBPJowlI6F6LPb5tqIQILrMbx22S5o3GuJavPusA==",+ "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",@@ -20852,12 +21386,12 @@}},"node_modules/playwright": {- "version": "1.38.1",- "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.38.1.tgz",- "integrity": "sha512-oRMSJmZrOu1FP5iu3UrCx8JEFRIMxLDM0c/3o4bpzU5Tz97BypefWf7TuTNPWeCe279TPal5RtPPZ+9lW/Qkow==",+ "version": "1.41.2",+ "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.41.2.tgz",+ "integrity": "sha512-v0bOa6H2GJChDL8pAeLa/LZC4feoAMbSQm1/jF/ySsWWoaNItvrMP7GEkvEEFyCTUYKMxjQKaTSg5up7nR6/8A==","devOptional": true,"dependencies": {- "playwright-core": "1.38.1"+ "playwright-core": "1.41.2"},"bin": {"playwright": "cli.js"@@ -20870,9 +21404,9 @@}},"node_modules/playwright-core": {- "version": "1.38.1",- "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.38.1.tgz",- "integrity": "sha512-tQqNFUKa3OfMf4b2jQ7aGLB8o9bS3bOY0yMEtldtC2+spf8QXG9zvXLTXUeRsoNuxEYMgLYR+NXfAa1rjKRcrg==",+ "version": "1.41.2",+ "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.41.2.tgz",+ "integrity": "sha512-VaTvwCA4Y8kxEe+kfm2+uUUw5Lubf38RxF7FpBxLPmGe5sdNkSg5e3ChEigaGrX7qdqT3pt2m/98LiyvU2x6CA==","devOptional": true,"bin": {"playwright-core": "cli.js"@@ -20896,9 +21430,9 @@}},"node_modules/postcss": {- "version": "8.4.32",- "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.32.tgz",- "integrity": "sha512-D/kj5JNu6oo2EIy+XL/26JEDTlIbB8hw85G8StOE6L74RQAVVP5rej6wxCNqyMbR4RkPfqvezVbPw81Ngd6Kcw==",+ "version": "8.4.35",+ "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.35.tgz",+ "integrity": "sha512-u5U8qYpBCpN13BsiEB0CbR1Hhh4Gc0zLFuedrHJKMctHCHAGrMdG0PRM/KErzAL3CU6/eckEtmHNB3x6e3c0vA==","funding": [{"type": "opencollective",@@ -20983,19 +21517,25 @@}},"node_modules/postcss-color-hex-alpha": {- "version": "9.0.2",- "resolved": "https://registry.npmjs.org/postcss-color-hex-alpha/-/postcss-color-hex-alpha-9.0.2.tgz",- "integrity": "sha512-SfPjgr//VQ/DOCf80STIAsdAs7sbIbxATvVmd+Ec7JvR8onz9pjawhq3BJM3Pie40EE3TyB0P6hft16D33Nlyg==",+ "version": "9.0.3",+ "resolved": "https://registry.npmjs.org/postcss-color-hex-alpha/-/postcss-color-hex-alpha-9.0.3.tgz",+ "integrity": "sha512-7sEHU4tAS6htlxun8AB9LDrCXoljxaC34tFVRlYKcvO+18r5fvGiXgv5bQzN40+4gXLCyWSMRK5FK31244WcCA==","dev": true,+ "funding": [+ {+ "type": "github",+ "url": "https://github.com/sponsors/csstools"+ },+ {+ "type": "opencollective",+ "url": "https://opencollective.com/csstools"+ }+ ],"dependencies": {"postcss-value-parser": "^4.2.0"},- "engines": {- "node": "^14 || ^16 || >=18"- },- "funding": {- "type": "opencollective",- "url": "https://opencollective.com/csstools"+ "engines": {+ "node": "^14 || ^16 || >=18"},"peerDependencies": {"postcss": "^8.4"@@ -21049,9 +21589,9 @@}},"node_modules/postcss-custom-properties": {- "version": "13.3.0",- "resolved": "https://registry.npmjs.org/postcss-custom-properties/-/postcss-custom-properties-13.3.0.tgz",- "integrity": "sha512-q4VgtIKSy5+KcUvQ0WxTjDy9DZjQ5VCXAZ9+tT9+aPMbA0z6s2t1nMw0QHszru1ib5ElkXl9JUpYYU37VVUs7g==",+ "version": "13.3.4",+ "resolved": "https://registry.npmjs.org/postcss-custom-properties/-/postcss-custom-properties-13.3.4.tgz",+ "integrity": "sha512-9YN0gg9sG3OH+Z9xBrp2PWRb+O4msw+5Sbp3ZgqrblrwKspXVQe5zr5sVqi43gJGwW/Rv1A483PRQUzQOEewvA==","dev": true,"funding": [{@@ -21064,9 +21604,9 @@}],"dependencies": {- "@csstools/cascade-layer-name-parser": "^1.0.4",- "@csstools/css-parser-algorithms": "^2.3.1",- "@csstools/css-tokenizer": "^2.2.0",+ "@csstools/cascade-layer-name-parser": "^1.0.7",+ "@csstools/css-parser-algorithms": "^2.5.0",+ "@csstools/css-tokenizer": "^2.2.3","postcss-value-parser": "^4.2.0"},"engines": {@@ -21077,9 +21617,9 @@}},"node_modules/postcss-custom-selectors": {- "version": "7.1.4",- "resolved": "https://registry.npmjs.org/postcss-custom-selectors/-/postcss-custom-selectors-7.1.4.tgz",- "integrity": "sha512-TU2xyUUBTlpiLnwyE2ZYMUIYB41MKMkBZ8X8ntkqRDQ8sdBLhFFsPgNcOliBd5+/zcK51C9hRnSE7hKUJMxQSw==",+ "version": "7.1.6",+ "resolved": "https://registry.npmjs.org/postcss-custom-selectors/-/postcss-custom-selectors-7.1.6.tgz",+ "integrity": "sha512-svsjWRaxqL3vAzv71dV0/65P24/FB8TbPX+lWyyf9SZ7aZm4S4NhCn7N3Bg+Z5sZunG3FS8xQ80LrCU9hb37cw==","dev": true,"funding": [{@@ -21092,9 +21632,9 @@}],"dependencies": {- "@csstools/cascade-layer-name-parser": "^1.0.3",- "@csstools/css-parser-algorithms": "^2.3.0",- "@csstools/css-tokenizer": "^2.1.1",+ "@csstools/cascade-layer-name-parser": "^1.0.5",+ "@csstools/css-parser-algorithms": "^2.3.2",+ "@csstools/css-tokenizer": "^2.2.1","postcss-selector-parser": "^6.0.13"},"engines": {@@ -21303,20 +21843,26 @@}},"node_modules/postcss-load-config": {- "version": "4.0.1",- "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-4.0.1.tgz",- "integrity": "sha512-vEJIc8RdiBRu3oRAI0ymerOn+7rPuMvRXslTvZUKZonDHFIczxztIyJ1urxM1x9JXEikvpWWTUUqal5j/8QgvA==",+ "version": "4.0.2",+ "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-4.0.2.tgz",+ "integrity": "sha512-bSVhyJGL00wMVoPUzAVAnbEoWyqRxkjv64tUl427SKnPrENtq6hJwUojroMz2VB+Q1edmi4IfrAPpami5VVgMQ==",+ "funding": [+ {+ "type": "opencollective",+ "url": "https://opencollective.com/postcss/"+ },+ {+ "type": "github",+ "url": "https://github.com/sponsors/ai"+ }+ ],"dependencies": {- "lilconfig": "^2.0.5",- "yaml": "^2.1.1"+ "lilconfig": "^3.0.0",+ "yaml": "^2.3.4"},"engines": {"node": ">= 14"},- "funding": {- "type": "opencollective",- "url": "https://opencollective.com/postcss/"- },"peerDependencies": {"postcss": ">=8.0.9","ts-node": ">=9.0.0"@@ -21330,15 +21876,23 @@}}},+ "node_modules/postcss-load-config/node_modules/lilconfig": {+ "version": "3.0.0",+ "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.0.0.tgz",+ "integrity": "sha512-K2U4W2Ff5ibV7j7ydLr+zLAkIg5JJ4lPn1Ltsdt+Tz/IjQ8buJ55pZAxoP34lqIiwtF9iAvtLv3JGv7CAyAg+g==",+ "engines": {+ "node": ">=14"+ }+ },"node_modules/postcss-loader": {- "version": "7.3.3",- "resolved": "https://registry.npmjs.org/postcss-loader/-/postcss-loader-7.3.3.tgz",- "integrity": "sha512-YgO/yhtevGO/vJePCQmTxiaEwER94LABZN0ZMT4A0vsak9TpO+RvKRs7EmJ8peIlB9xfXCsS7M8LjqncsUZ5HA==",+ "version": "7.3.4",+ "resolved": "https://registry.npmjs.org/postcss-loader/-/postcss-loader-7.3.4.tgz",+ "integrity": "sha512-iW5WTTBSC5BfsBJ9daFMPVrLT36MrNiC6fqOZTTaHjBNX6Pfd5p+hSBqe/fEeNd7pc13QiAyGt7VdGMw4eRC4A==","dev": true,"dependencies": {- "cosmiconfig": "^8.2.0",- "jiti": "^1.18.2",- "semver": "^7.3.8"+ "cosmiconfig": "^8.3.5",+ "jiti": "^1.20.0",+ "semver": "^7.5.4"},"engines": {"node": ">= 14.15.0"@@ -21618,9 +22172,9 @@}},"node_modules/postcss-selector-parser": {- "version": "6.0.13",- "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.13.tgz",- "integrity": "sha512-EaV1Gl4mUEV4ddhDnv/xtj7sxwrwxdetHdWUGnT4VJQf+4d05v6lHYZr8N573k5Z0BViss7BDhfWtKS3+sfAqQ==",+ "version": "6.0.15",+ "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.15.tgz",+ "integrity": "sha512-rEYkQOMUCEMhsKbK66tbEU9QVIxbhN18YiniAwA7XQYTVBqrBy+P2p5JcdqsHgKM2zWylp8d7J6eszocfds5Sw==","dependencies": {"cssesc": "^3.0.0","util-deprecate": "^1.0.2"@@ -21841,6 +22395,15 @@"node": ">=4"}},+ "node_modules/prettier-eslint-cli/node_modules/camelcase": {+ "version": "5.3.1",+ "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz",+ "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==",+ "dev": true,+ "engines": {+ "node": ">=6"+ }+ },"node_modules/prettier-eslint-cli/node_modules/cliui": {"version": "5.0.0","resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz",@@ -22218,9 +22781,9 @@"integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag=="},"node_modules/process-warning": {- "version": "2.2.0",- "resolved": "https://registry.npmjs.org/process-warning/-/process-warning-2.2.0.tgz",- "integrity": "sha512-/1WZ8+VQjR6avWOgHeEPd7SDQmFQ1B5mC1eRXsCm5TarlNmx/wCsa5GEaxGm05BORRtyG/Ex/3xq3TuRvq57qg=="+ "version": "3.0.0",+ "resolved": "https://registry.npmjs.org/process-warning/-/process-warning-3.0.0.tgz",+ "integrity": "sha512-mqn0kFRl0EoqhnL0GQ0veqFHyIN1yig9RHh/InzORTUiZHFRAur+aMtRkELNwGs9aNwKS6tg/An4NYBPGwvtzQ=="},"node_modules/prompts": {"version": "2.4.2",@@ -22251,18 +22814,18 @@"integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ=="},"node_modules/property-information": {- "version": "6.3.0",- "resolved": "https://registry.npmjs.org/property-information/-/property-information-6.3.0.tgz",- "integrity": "sha512-gVNZ74nqhRMiIUYWGQdosYetaKc83x8oT41a0LlV3AAFCAZwCpg4vmGkq8t34+cUhp3cnM4XDiU/7xlgK7HGrg==",+ "version": "6.4.1",+ "resolved": "https://registry.npmjs.org/property-information/-/property-information-6.4.1.tgz",+ "integrity": "sha512-OHYtXfu5aI2sS2LWFSN5rgJjrQ4pCy8i1jubJLe2QvMF8JJ++HXTUIVWFLfXJoaOfvYYjk2SN8J2wFUWIGXT4w==","funding": {"type": "github","url": "https://github.com/sponsors/wooorm"}},"node_modules/protobufjs": {- "version": "7.2.5",- "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.2.5.tgz",- "integrity": "sha512-gGXRSXvxQ7UiPgfw8gevrfRWcTlSbOFg+p/N+JVJEK5VhueL2miT6qTymqAmjr1Q5WbOCyJbyrk6JfWKwlFn6A==",+ "version": "7.2.6",+ "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.2.6.tgz",+ "integrity": "sha512-dgJaEDDL6x8ASUZ1YqWciTRrdOuYNzoOf27oHNfdyvKqHr5i0FV7FSLU+aIeFjyFgVxrpTOtQUi0BLLBymZaBw==","hasInstallScript": true,"dependencies": {"@protobufjs/aspromise": "^1.1.2",@@ -22341,17 +22904,17 @@}},"node_modules/punycode": {- "version": "2.3.0",- "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz",- "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==",+ "version": "2.3.1",+ "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz",+ "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==","engines": {"node": ">=6"}},"node_modules/pure-rand": {- "version": "6.0.3",- "resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-6.0.3.tgz",- "integrity": "sha512-KddyFewCsO0j3+np81IQ+SweXLDnDQTs5s67BOnrYmYe/yNmUhttQyGsYzy8yUnoljGAQ9sl38YB4vH8ur7Y+w==",+ "version": "6.0.4",+ "resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-6.0.4.tgz",+ "integrity": "sha512-LA0Y9kxMYv47GIPJy6MI84fqTd2HmYZI83W/kM/SkKfDlajnZYfmXFTxkbY+xSBPkLJxltMa9hIkmdc29eguMA==","dev": true,"funding": [{@@ -22513,23 +23076,18 @@}},"node_modules/rc-util": {- "version": "5.37.0",- "resolved": "https://registry.npmjs.org/rc-util/-/rc-util-5.37.0.tgz",- "integrity": "sha512-cPMV8DzaHI1KDaS7XPRXAf4J7mtBqjvjikLpQieaeOO7+cEbqY2j7Kso/T0R0OiEZTNcLS/8Zl9YrlXiO9UbjQ==",+ "version": "5.38.1",+ "resolved": "https://registry.npmjs.org/rc-util/-/rc-util-5.38.1.tgz",+ "integrity": "sha512-e4ZMs7q9XqwTuhIK7zBIVFltUtMSjphuPPQXHoHlzRzNdOwUxDejo0Zls5HYaJfRKNURcsS/ceKVULlhjBrxng==","dependencies": {"@babel/runtime": "^7.18.3",- "react-is": "^16.12.0"+ "react-is": "^18.2.0"},"peerDependencies": {"react": ">=16.9.0","react-dom": ">=16.9.0"}},- "node_modules/rc-util/node_modules/react-is": {- "version": "16.13.1",- "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz",- "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ=="- },"node_modules/rc/node_modules/strip-json-comments": {"version": "2.0.1","resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz",@@ -22616,9 +23174,9 @@}},"node_modules/react-hook-form": {- "version": "7.46.1",- "resolved": "https://registry.npmjs.org/react-hook-form/-/react-hook-form-7.46.1.tgz",- "integrity": "sha512-0GfI31LRTBd5tqbXMGXT1Rdsv3rnvy0FjEk8Gn9/4tp6+s77T7DPZuGEpBRXOauL+NhyGT5iaXzdIM2R6F/E+w==",+ "version": "7.50.0",+ "resolved": "https://registry.npmjs.org/react-hook-form/-/react-hook-form-7.50.0.tgz",+ "integrity": "sha512-AOhuzM3RdP09ZCnq+Z0yvKGHK25yiOX5phwxjV9L7U6HMla10ezkBnvQ+Pk4GTuDfsC5P2zza3k8mawFwFLVuQ==","engines": {"node": ">=12.22.0"},@@ -22732,12 +23290,21 @@}}},+ "node_modules/react-resizable-panels": {+ "version": "1.0.10",+ "resolved": "https://registry.npmjs.org/react-resizable-panels/-/react-resizable-panels-1.0.10.tgz",+ "integrity": "sha512-0+g0CNqregkuocr+Mi+e6wgWVARnKTYIX3U1QK7GlkLQKCmbymZakx80YGwcRO7HNnKJTQ5v38HlBos/cGxWvg==",+ "peerDependencies": {+ "react": "^16.14.0 || ^17.0.0 || ^18.0.0",+ "react-dom": "^16.14.0 || ^17.0.0 || ^18.0.0"+ }+ },"node_modules/react-router": {- "version": "6.16.0",- "resolved": "https://registry.npmjs.org/react-router/-/react-router-6.16.0.tgz",- "integrity": "sha512-VT4Mmc4jj5YyjpOi5jOf0I+TYzGpvzERy4ckNSvSh2RArv8LLoCxlsZ2D+tc7zgjxcY34oTz2hZaeX5RVprKqA==",+ "version": "6.22.0",+ "resolved": "https://registry.npmjs.org/react-router/-/react-router-6.22.0.tgz",+ "integrity": "sha512-q2yemJeg6gw/YixRlRnVx6IRJWZD6fonnfZhN1JIOhV2iJCPeRNSH3V1ISwHf+JWcESzLC3BOLD1T07tmO5dmg==","dependencies": {- "@remix-run/router": "1.9.0"+ "@remix-run/router": "1.15.0"},"engines": {"node": ">=14.0.0"@@ -22747,12 +23314,12 @@}},"node_modules/react-router-dom": {- "version": "6.16.0",- "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.16.0.tgz",- "integrity": "sha512-aTfBLv3mk/gaKLxgRDUPbPw+s4Y/O+ma3rEN1u8EgEpLpPe6gNjIsWt9rxushMHHMb7mSwxRGdGlGdvmFsyPIg==",+ "version": "6.22.0",+ "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.22.0.tgz",+ "integrity": "sha512-z2w+M4tH5wlcLmH3BMMOMdrtrJ9T3oJJNsAlBJbwk+8Syxd5WFJ7J5dxMEW0/GEXD1BBis4uXRrNIz3mORr0ag==","dependencies": {- "@remix-run/router": "1.9.0",- "react-router": "6.16.0"+ "@remix-run/router": "1.15.0",+ "react-router": "6.22.0"},"engines": {"node": ">=14.0.0"@@ -22869,16 +23436,39 @@"util-deprecate": "~1.0.1"}},- "node_modules/readable-stream/node_modules/isarray": {- "version": "1.0.0",- "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",- "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ=="- },"node_modules/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/readable-web-to-node-stream": {+ "version": "3.0.2",+ "resolved": "https://registry.npmjs.org/readable-web-to-node-stream/-/readable-web-to-node-stream-3.0.2.tgz",+ "integrity": "sha512-ePeK6cc1EcKLEhJFt/AebMCLL+GgSKhuygrZ/GLaKZYEecIgIECf4UaUuaByiGtzckwR4ain9VzUh95T1exYGw==",+ "dependencies": {+ "readable-stream": "^3.6.0"+ },+ "engines": {+ "node": ">=8"+ },+ "funding": {+ "type": "github",+ "url": "https://github.com/sponsors/Borewit"+ }+ },+ "node_modules/readable-web-to-node-stream/node_modules/readable-stream": {+ "version": "3.6.2",+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz",+ "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==",+ "dependencies": {+ "inherits": "^2.0.3",+ "string_decoder": "^1.1.1",+ "util-deprecate": "^1.0.1"+ },+ "engines": {+ "node": ">= 6"+ }+ },"node_modules/readdirp": {"version": "3.6.0","resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz",@@ -22958,15 +23548,16 @@}},"node_modules/reflect.getprototypeof": {- "version": "1.0.4",- "resolved": "https://registry.npmjs.org/reflect.getprototypeof/-/reflect.getprototypeof-1.0.4.tgz",- "integrity": "sha512-ECkTw8TmJwW60lOTR+ZkODISW6RQ8+2CL3COqtiJKLd6MmB45hN51HprHFziKLGkAuTGQhBb91V8cy+KHlaCjw==",+ "version": "1.0.5",+ "resolved": "https://registry.npmjs.org/reflect.getprototypeof/-/reflect.getprototypeof-1.0.5.tgz",+ "integrity": "sha512-62wgfC8dJWrmxv44CA36pLDnP6KKl3Vhxb7PL+8+qrrFMMoJij4vgiMP8zV4O8+CBMXY1mHxI5fITGHXFHVmQQ==","dev": true,"dependencies": {- "call-bind": "^1.0.2",- "define-properties": "^1.2.0",- "es-abstract": "^1.22.1",- "get-intrinsic": "^1.2.1",+ "call-bind": "^1.0.5",+ "define-properties": "^1.2.1",+ "es-abstract": "^1.22.3",+ "es-errors": "^1.0.0",+ "get-intrinsic": "^1.2.3","globalthis": "^1.0.3","which-builtin-type": "^1.1.3"},@@ -22984,9 +23575,9 @@"dev": true},"node_modules/regenerate-unicode-properties": {- "version": "10.1.0",- "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-10.1.0.tgz",- "integrity": "sha512-d1VudCLoIGitcU/hEg2QqvyGZQmdC0Lf8BqdOMXGFSvJP4bNV1+XqbPQeHHLD51Jh4QJJ225dlIFvY4Ly6MXmQ==",+ "version": "10.1.1",+ "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-10.1.1.tgz",+ "integrity": "sha512-X007RyZLsCJVVrjgEFVpLUTZwyOZk3oiL75ZcuYjlIWd6rNJtOjkBwQc5AsRrpbKVkxN6sklw/k/9m2jJYOf8Q==","dev": true,"dependencies": {"regenerate": "^1.4.2"@@ -22996,9 +23587,9 @@}},"node_modules/regenerator-runtime": {- "version": "0.14.0",- "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.0.tgz",- "integrity": "sha512-srw17NI0TUWHuGa5CFGGmhfNIeja30WMBfbslPNhf6JrqQlLN5gcrvig1oqPxiVaXb0oW0XRKtH6Nngs5lKCIA=="+ "version": "0.14.1",+ "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz",+ "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw=="},"node_modules/regenerator-transform": {"version": "0.15.2",@@ -23233,9 +23824,9 @@"devOptional": true},"node_modules/resolve": {- "version": "1.22.4",- "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.4.tgz",- "integrity": "sha512-PXNdCiPqDqeUou+w1C2eTQbNfxKSuMxqTCuvlmmMsk1NWHL5fRrhY6Pl0qEYYc6+QqGClco1Qj8XnjPego4wfg==",+ "version": "1.22.8",+ "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz",+ "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==","dependencies": {"is-core-module": "^2.13.0","path-parse": "^1.0.7",@@ -23337,9 +23928,9 @@}},"node_modules/rfdc": {- "version": "1.3.0",- "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.3.0.tgz",- "integrity": "sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA=="+ "version": "1.3.1",+ "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.3.1.tgz",+ "integrity": "sha512-r5a3l5HzYlIC68TpmYKlxWjmOP6wiPJ1vWv2HeLhNsRZMrCkxeqxiHlQ21oXmQ4F3SiryXBHhAD7JZqvOJjFmg=="},"node_modules/rimraf": {"version": "3.0.2",@@ -23457,6 +24048,41 @@"node": ">= 8.0.0"}},+ "node_modules/rollup-plugin-typescript2/node_modules/fs-extra": {+ "version": "10.1.0",+ "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz",+ "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==",+ "dev": true,+ "dependencies": {+ "graceful-fs": "^4.2.0",+ "jsonfile": "^6.0.1",+ "universalify": "^2.0.0"+ },+ "engines": {+ "node": ">=12"+ }+ },+ "node_modules/rollup-plugin-typescript2/node_modules/jsonfile": {+ "version": "6.1.0",+ "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz",+ "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==",+ "dev": true,+ "dependencies": {+ "universalify": "^2.0.0"+ },+ "optionalDependencies": {+ "graceful-fs": "^4.1.6"+ }+ },+ "node_modules/rollup-plugin-typescript2/node_modules/universalify": {+ "version": "2.0.1",+ "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz",+ "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==",+ "dev": true,+ "engines": {+ "node": ">= 10.0.0"+ }+ },"node_modules/run-async": {"version": "3.0.0","resolved": "https://registry.npmjs.org/run-async/-/run-async-3.0.0.tgz",@@ -23507,13 +24133,13 @@}},"node_modules/safe-array-concat": {- "version": "1.0.1",- "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.0.1.tgz",- "integrity": "sha512-6XbUAseYE2KtOuGueyeobCySj9L4+66Tn6KQMOPQJrAJEowYKW/YR/MGJZl7FdydUdaFu4LYyDZjxf4/Nmo23Q==",+ "version": "1.1.0",+ "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.0.tgz",+ "integrity": "sha512-ZdQ0Jeb9Ofti4hbt5lX3T2JcAamT9hfzYU1MNB+z/jaEbB6wfFfPIR/zEORmZqobkCCJhSjodobH6WHNmJ97dg==","dev": true,"dependencies": {- "call-bind": "^1.0.2",- "get-intrinsic": "^1.2.1",+ "call-bind": "^1.0.5",+ "get-intrinsic": "^1.2.2","has-symbols": "^1.0.3","isarray": "^2.0.5"},@@ -23524,6 +24150,12 @@"url": "https://github.com/sponsors/ljharb"}},+ "node_modules/safe-array-concat/node_modules/isarray": {+ "version": "2.0.5",+ "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz",+ "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==",+ "dev": true+ },"node_modules/safe-buffer": {"version": "5.2.1","resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",@@ -23550,15 +24182,18 @@"dev": true},"node_modules/safe-regex-test": {- "version": "1.0.0",- "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.0.tgz",- "integrity": "sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==",+ "version": "1.0.2",+ "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.2.tgz",+ "integrity": "sha512-83S9w6eFq12BBIJYvjMux6/dkirb8+4zJRA9cxNBVb7Wq5fJBW+Xze48WqR8pxua7bDuAaaAxtVVd4Idjp1dBQ==","dev": true,"dependencies": {- "call-bind": "^1.0.2",- "get-intrinsic": "^1.1.3",+ "call-bind": "^1.0.5",+ "get-intrinsic": "^1.2.2","is-regex": "^1.1.4"},+ "engines": {+ "node": ">= 0.4"+ },"funding": {"url": "https://github.com/sponsors/ljharb"}@@ -23584,6 +24219,11 @@"resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz","integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="},+ "node_modules/sax": {+ "version": "1.3.0",+ "resolved": "https://registry.npmjs.org/sax/-/sax-1.3.0.tgz",+ "integrity": "sha512-0s+oAmw9zLl1V1cS9BtZN7JAd0cW5e0QH4W3LWEK6a4LaLEA2OTpGYWDY+6XasBLtz6wkm3u1xRw95mRuJ59WA=="+ },"node_modules/saxes": {"version": "6.0.0","resolved": "https://registry.npmjs.org/saxes/-/saxes-6.0.0.tgz",@@ -23604,15 +24244,34 @@"loose-envify": "^1.1.0"}},+ "node_modules/schema-utils": {+ "version": "3.3.0",+ "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz",+ "integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==",+ "dev": true,+ "peer": true,+ "dependencies": {+ "@types/json-schema": "^7.0.8",+ "ajv": "^6.12.5",+ "ajv-keywords": "^3.5.2"+ },+ "engines": {+ "node": ">= 10.13.0"+ },+ "funding": {+ "type": "opencollective",+ "url": "https://opencollective.com/webpack"+ }+ },"node_modules/secure-json-parse": {"version": "2.7.0","resolved": "https://registry.npmjs.org/secure-json-parse/-/secure-json-parse-2.7.0.tgz","integrity": "sha512-6aU+Rwsezw7VR8/nyvKTx8QpWH9FrcYiXXlqC4z5d5XQBDRqtbfsRjnwGyqbi3gddNtWHuEk9OANUotL26qKUw=="},"node_modules/semver": {- "version": "7.5.4",- "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz",- "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==",+ "version": "7.6.0",+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz",+ "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==","dependencies": {"lru-cache": "^6.0.0"},@@ -23675,15 +24334,26 @@"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz","integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A=="},+ "node_modules/send/node_modules/mime": {+ "version": "1.6.0",+ "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz",+ "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==",+ "bin": {+ "mime": "cli.js"+ },+ "engines": {+ "node": ">=4"+ }+ },"node_modules/send/node_modules/ms": {"version": "2.1.3","resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz","integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="},"node_modules/serialize-javascript": {- "version": "6.0.1",- "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.1.tgz",- "integrity": "sha512-owoXEFjWRllis8/M1Q+Cw5k8ZH40e3zhp/ovX+Xr/vi1qj6QesbyXXViFbpNvWvPNAD62SutwEXavefrLJWj7w==",+ "version": "6.0.2",+ "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz",+ "integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==","dev": true,"dependencies": {"randombytes": "^2.1.0"@@ -23714,6 +24384,21 @@"resolved": "https://registry.npmjs.org/set-cookie-parser/-/set-cookie-parser-2.6.0.tgz","integrity": "sha512-RVnVQxTXuerk653XfuliOxBP81Sf0+qfQE73LIYKcyMYHG94AuH0kgrQpRDuTZnSmjpysHmzxJXKNfa6PjFhyQ=="},+ "node_modules/set-function-length": {+ "version": "1.2.0",+ "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.0.tgz",+ "integrity": "sha512-4DBHDoyHlM1IRPGYcoxexgh67y4ueR53FKV1yyxwFMY7aCqcN/38M1+SwZ/qJQ8iLv7+ck385ot4CcisOAPT9w==",+ "dependencies": {+ "define-data-property": "^1.1.1",+ "function-bind": "^1.1.2",+ "get-intrinsic": "^1.2.2",+ "gopd": "^1.0.1",+ "has-property-descriptors": "^1.0.1"+ },+ "engines": {+ "node": ">= 0.4"+ }+ },"node_modules/set-function-name": {"version": "2.0.1","resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.1.tgz",@@ -23891,12 +24576,15 @@"dev": true},"node_modules/slash": {- "version": "3.0.0",- "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz",- "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==",+ "version": "4.0.0",+ "resolved": "https://registry.npmjs.org/slash/-/slash-4.0.0.tgz",+ "integrity": "sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew==","dev": true,"engines": {- "node": ">=8"+ "node": ">=12"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"}},"node_modules/slice-ansi": {@@ -23956,9 +24644,9 @@}},"node_modules/sonic-boom": {- "version": "3.7.0",- "resolved": "https://registry.npmjs.org/sonic-boom/-/sonic-boom-3.7.0.tgz",- "integrity": "sha512-IudtNvSqA/ObjN97tfgNmOKyDOs4dNcg4cUUsHDebqsgb8wGBBwb31LIgShNO8fye0dFI52X1+tFoKKI6Rq1Gg==",+ "version": "3.8.0",+ "resolved": "https://registry.npmjs.org/sonic-boom/-/sonic-boom-3.8.0.tgz",+ "integrity": "sha512-ybz6OYOUjoQQCQ/i4LU8kaToD8ACtYP+Cj5qd2AO36bwbdewxWJ3ArmJ2cr6AvxlL2o0PqnCcPGUgkILbfkaCA==","dependencies": {"atomic-sleep": "^1.0.0"}@@ -23975,15 +24663,6 @@"node": ">=4"}},- "node_modules/sort-keys/node_modules/is-plain-obj": {- "version": "1.1.0",- "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz",- "integrity": "sha512-yvkRyxmFKEOQ4pNXCmJG5AEQNlXJS5LaONXo5/cLdTZdWvsZ1ioJEonLGAosKlMWE8lwUy/bJzMjcw8az73+Fg==",- "dev": true,- "engines": {- "node": ">=0.10.0"- }- },"node_modules/source-map": {"version": "0.6.1","resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",@@ -24039,9 +24718,9 @@}},"node_modules/spdx-exceptions": {- "version": "2.3.0",- "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz",- "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==",+ "version": "2.4.0",+ "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.4.0.tgz",+ "integrity": "sha512-hcjppoJ68fhxA/cjbN4T8N6uCUejN8yFw69ttpqtBeCbF3u13n7mb31NB9jKwGTTWWnt9IbRA/mf1FprYS8wfw==","dev": true},"node_modules/spdx-expression-parse": {@@ -24201,9 +24880,9 @@}},"node_modules/streamx": {- "version": "2.15.1",- "resolved": "https://registry.npmjs.org/streamx/-/streamx-2.15.1.tgz",- "integrity": "sha512-fQMzy2O/Q47rgwErk/eGeLu/roaFWV0jVsogDmrszM9uIw8L5OA+t+V93MgYlufNptfjmYR1tOMWhei/Eh7TQA==",+ "version": "2.15.7",+ "resolved": "https://registry.npmjs.org/streamx/-/streamx-2.15.7.tgz",+ "integrity": "sha512-NPEKS5+yjyo597eafGbKW5ujh7Sm6lDLHZQd/lRSz6S0VarpADBJItqfB4PnwpS+472oob1GX5cCY9vzfJpHUA==","dependencies": {"fast-fifo": "^1.1.0","queue-tick": "^1.0.1"@@ -24265,7 +24944,6 @@"version": "4.2.3","resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz","integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",- "dev": true,"dependencies": {"emoji-regex": "^8.0.0","is-fullwidth-code-point": "^3.0.0",@@ -24278,14 +24956,12 @@"node_modules/string-width-cjs/node_modules/emoji-regex": {"version": "8.0.0","resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",- "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",- "dev": true+ "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A=="},"node_modules/string-width-cjs/node_modules/is-fullwidth-code-point": {"version": "3.0.0","resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz","integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",- "dev": true,"engines": {"node": ">=8"}@@ -24396,7 +25072,6 @@"version": "6.0.1","resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz","integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",- "dev": true,"dependencies": {"ansi-regex": "^5.0.1"},@@ -24451,22 +25126,38 @@"integrity": "sha512-J8bbNyKKXl5qYcR36TIO8W3mVGVHrmmxsd5PAItGkmyzwJvybiw2IVq5nqd0i4LSNSkB/sx9VHllbfFdr9k1JA==","optional": true},+ "node_modules/strtok3": {+ "version": "7.0.0",+ "resolved": "https://registry.npmjs.org/strtok3/-/strtok3-7.0.0.tgz",+ "integrity": "sha512-pQ+V+nYQdC5H3Q7qBZAz/MO6lwGhoC2gOAjuouGf/VO0m7vQRh8QNMl2Uf6SwAtzZ9bOw3UIeBukEGNJl5dtXQ==",+ "dependencies": {+ "@tokenizer/token": "^0.3.0",+ "peek-readable": "^5.0.0"+ },+ "engines": {+ "node": ">=14.16"+ },+ "funding": {+ "type": "github",+ "url": "https://github.com/sponsors/Borewit"+ }+ },"node_modules/style-to-object": {- "version": "0.4.2",- "resolved": "https://registry.npmjs.org/style-to-object/-/style-to-object-0.4.2.tgz",- "integrity": "sha512-1JGpfPB3lo42ZX8cuPrheZbfQ6kqPPnPHlKMyeRYtfKD+0jG+QsXgXN57O/dvJlzlB2elI6dGmrPnl5VPQFPaA==",+ "version": "0.4.4",+ "resolved": "https://registry.npmjs.org/style-to-object/-/style-to-object-0.4.4.tgz",+ "integrity": "sha512-HYNoHZa2GorYNyqiCaBgsxvcJIn7OHq6inEga+E6Ke3m5JkoqpQbnFssk4jwe+K7AhGa2fcha4wSOf1Kn01dMg==","dependencies": {"inline-style-parser": "0.1.1"}},"node_modules/sucrase": {- "version": "3.34.0",- "resolved": "https://registry.npmjs.org/sucrase/-/sucrase-3.34.0.tgz",- "integrity": "sha512-70/LQEZ07TEcxiU2dz51FKaE6hCTWC6vr7FOk3Gr0U60C3shtAN+H+BFr9XlYe5xqf3RA8nrc+VIwzCfnxuXJw==",+ "version": "3.35.0",+ "resolved": "https://registry.npmjs.org/sucrase/-/sucrase-3.35.0.tgz",+ "integrity": "sha512-8EbVDiu9iN/nESwxeSxDKe0dunta1GOlHufmSSXxMD2z2/tMZpDMpvXQGsc+ajGo8y2uYUmixaSRUc/QPoQ0GA==","dependencies": {"@jridgewell/gen-mapping": "^0.3.2","commander": "^4.0.0",- "glob": "7.1.6",+ "glob": "^10.3.10","lines-and-columns": "^1.1.6","mz": "^2.7.0","pirates": "^4.0.1",@@ -24477,7 +25168,15 @@"sucrase-node": "bin/sucrase-node"},"engines": {- "node": ">=8"+ "node": ">=16 || 14 >=14.17"+ }+ },+ "node_modules/sucrase/node_modules/brace-expansion": {+ "version": "2.0.1",+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",+ "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",+ "dependencies": {+ "balanced-match": "^1.0.0"}},"node_modules/sucrase/node_modules/commander": {@@ -24489,19 +25188,35 @@}},"node_modules/sucrase/node_modules/glob": {- "version": "7.1.6",- "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz",- "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==",+ "version": "10.3.10",+ "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.10.tgz",+ "integrity": "sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==","dependencies": {- "fs.realpath": "^1.0.0",- "inflight": "^1.0.4",- "inherits": "2",- "minimatch": "^3.0.4",- "once": "^1.3.0",- "path-is-absolute": "^1.0.0"+ "foreground-child": "^3.1.0",+ "jackspeak": "^2.3.5",+ "minimatch": "^9.0.1",+ "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0",+ "path-scurry": "^1.10.1"+ },+ "bin": {+ "glob": "dist/esm/bin.mjs"},"engines": {- "node": "*"+ "node": ">=16 || 14 >=14.17"+ },+ "funding": {+ "url": "https://github.com/sponsors/isaacs"+ }+ },+ "node_modules/sucrase/node_modules/minimatch": {+ "version": "9.0.3",+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz",+ "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==",+ "dependencies": {+ "brace-expansion": "^2.0.1"+ },+ "engines": {+ "node": ">=16 || 14 >=14.17"},"funding": {"url": "https://github.com/sponsors/isaacs"@@ -24541,9 +25256,9 @@}},"node_modules/superjson": {- "version": "1.13.1",- "resolved": "https://registry.npmjs.org/superjson/-/superjson-1.13.1.tgz",- "integrity": "sha512-AVH2eknm9DEd3qvxM4Sq+LTCkSXE2ssfh1t11MHMXyYXFQyQ1HLgVvV+guLTsaQnJU3gnaVo34TohHPulY/wLg==",+ "version": "1.13.3",+ "resolved": "https://registry.npmjs.org/superjson/-/superjson-1.13.3.tgz",+ "integrity": "sha512-mJiVjfd2vokfDxsQPOwJ/PtanO87LhpYY88ubI5dUB1Ab58Txbyje3+jpm+/83R/fevaq/107NNhtYBLuoTrFg==","dev": true,"dependencies": {"copy-anything": "^3.0.2"@@ -24553,13 +25268,13 @@}},"node_modules/supertest": {- "version": "6.3.3",- "resolved": "https://registry.npmjs.org/supertest/-/supertest-6.3.3.tgz",- "integrity": "sha512-EMCG6G8gDu5qEqRQ3JjjPs6+FYT1a7Hv5ApHvtSghmOFJYtsU5S+pSb6Y2EUeCEY3CmEL3mmQ8YWlPOzQomabA==",+ "version": "6.3.4",+ "resolved": "https://registry.npmjs.org/supertest/-/supertest-6.3.4.tgz",+ "integrity": "sha512-erY3HFDG0dPnhw4U+udPfrzXa4xhSG+n4rxfRuZWCUvjFWwKl+OxWf/7zk50s84/fAAs7vf5QAb9uRa0cCykxw==","dev": true,"dependencies": {"methods": "^1.1.2",- "superagent": "^8.0.5"+ "superagent": "^8.1.2"},"engines": {"node": ">=6.4.0"@@ -24646,11 +25361,19 @@"tailwindcss": ">=3.0.0 || insiders"}},- "node_modules/tailwindcss-radix": {- "version": "2.8.0",- "resolved": "https://registry.npmjs.org/tailwindcss-radix/-/tailwindcss-radix-2.8.0.tgz",- "integrity": "sha512-1k1UfoIYgVyBl13FKwwoKavjnJ5VEaUClCTAsgz3VLquN4ay/lyaMPzkbqD71sACDs2fRGImytAUlMb4TzOt1A=="- },+ "node_modules/tailwindcss-radix": {+ "version": "2.8.0",+ "resolved": "https://registry.npmjs.org/tailwindcss-radix/-/tailwindcss-radix-2.8.0.tgz",+ "integrity": "sha512-1k1UfoIYgVyBl13FKwwoKavjnJ5VEaUClCTAsgz3VLquN4ay/lyaMPzkbqD71sACDs2fRGImytAUlMb4TzOt1A=="+ },+ "node_modules/tailwindcss/node_modules/object-hash": {+ "version": "3.0.0",+ "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-3.0.0.tgz",+ "integrity": "sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw==",+ "engines": {+ "node": ">= 6"+ }+ },"node_modules/tapable": {"version": "2.2.1","resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz",@@ -24671,9 +25394,9 @@}},"node_modules/tar-stream": {- "version": "3.1.6",- "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-3.1.6.tgz",- "integrity": "sha512-B/UyjYwPpMBv+PaFSWAmtYjwdrlEaZQEhMIBFNC5oEG8lpiW8XjcSdmEaClj28ArfKScKHs2nshz3k2le6crsg==",+ "version": "3.1.7",+ "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-3.1.7.tgz",+ "integrity": "sha512-qJj60CXt7IU1Ffyc3NJMjh6EkuCFej46zUqJ4J7pqYlThyd9bO0XBTmcOIhSzZJVWfsLks0+nle/j538YAW9RQ==","dependencies": {"b4a": "^1.6.4","fast-fifo": "^1.2.0",@@ -24681,9 +25404,9 @@}},"node_modules/terser": {- "version": "5.19.4",- "resolved": "https://registry.npmjs.org/terser/-/terser-5.19.4.tgz",- "integrity": "sha512-6p1DjHeuluwxDXcuT9VR8p64klWJKo1ILiy19s6C9+0Bh2+NWTX6nD9EPppiER4ICkHDVB1RkVpin/YW2nQn/g==",+ "version": "5.27.0",+ "resolved": "https://registry.npmjs.org/terser/-/terser-5.27.0.tgz",+ "integrity": "sha512-bi1HRwVRskAjheeYl291n3JC4GgO/Ty4z1nVs5AAsmonJulGxpSektecnNedrwK9C7vpvVtcX3cw00VSLt7U2A==","dev": true,"dependencies": {"@jridgewell/source-map": "^0.3.3",@@ -24698,6 +25421,72 @@"node": ">=10"}},+ "node_modules/terser-webpack-plugin": {+ "version": "5.3.10",+ "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.10.tgz",+ "integrity": "sha512-BKFPWlPDndPs+NGGCr1U59t0XScL5317Y0UReNrHaw9/FwhPENlq6bfgs+4yPfyP51vqC1bQ4rp1EfXW5ZSH9w==",+ "dev": true,+ "peer": true,+ "dependencies": {+ "@jridgewell/trace-mapping": "^0.3.20",+ "jest-worker": "^27.4.5",+ "schema-utils": "^3.1.1",+ "serialize-javascript": "^6.0.1",+ "terser": "^5.26.0"+ },+ "engines": {+ "node": ">= 10.13.0"+ },+ "funding": {+ "type": "opencollective",+ "url": "https://opencollective.com/webpack"+ },+ "peerDependencies": {+ "webpack": "^5.1.0"+ },+ "peerDependenciesMeta": {+ "@swc/core": {+ "optional": true+ },+ "esbuild": {+ "optional": true+ },+ "uglify-js": {+ "optional": true+ }+ }+ },+ "node_modules/terser-webpack-plugin/node_modules/jest-worker": {+ "version": "27.5.1",+ "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.5.1.tgz",+ "integrity": "sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==",+ "dev": true,+ "peer": true,+ "dependencies": {+ "@types/node": "*",+ "merge-stream": "^2.0.0",+ "supports-color": "^8.0.0"+ },+ "engines": {+ "node": ">= 10.13.0"+ }+ },+ "node_modules/terser-webpack-plugin/node_modules/supports-color": {+ "version": "8.1.1",+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz",+ "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==",+ "dev": true,+ "peer": true,+ "dependencies": {+ "has-flag": "^4.0.0"+ },+ "engines": {+ "node": ">=10"+ },+ "funding": {+ "url": "https://github.com/chalk/supports-color?sponsor=1"+ }+ },"node_modules/terser/node_modules/commander": {"version": "2.20.3","resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz",@@ -24779,17 +25568,17 @@}},"node_modules/thread-stream": {- "version": "2.4.0",- "resolved": "https://registry.npmjs.org/thread-stream/-/thread-stream-2.4.0.tgz",- "integrity": "sha512-xZYtOtmnA63zj04Q+F9bdEay5r47bvpo1CaNqsKi7TpoJHcotUez8Fkfo2RJWpW91lnnaApdpRbVwCWsy+ifcw==",+ "version": "2.4.1",+ "resolved": "https://registry.npmjs.org/thread-stream/-/thread-stream-2.4.1.tgz",+ "integrity": "sha512-d/Ex2iWd1whipbT681JmTINKw0ZwOUBZm7+Gjs64DHuX34mmw8vJL2bFAaNacaW72zYiTJxSHi5abUuOi5nsfg==","dependencies": {"real-require": "^0.2.0"}},"node_modules/tiktoken": {- "version": "1.0.10",- "resolved": "https://registry.npmjs.org/tiktoken/-/tiktoken-1.0.10.tgz",- "integrity": "sha512-gF8ndTCNu7WcRFbl1UUWaFIB4CTXmHzS3tRYdyUYF7x3C6YR6Evoao4zhKDmWIwv2PzNbzoQMV8Pxt+17lEDbA=="+ "version": "1.0.13",+ "resolved": "https://registry.npmjs.org/tiktoken/-/tiktoken-1.0.13.tgz",+ "integrity": "sha512-JaL9ZnvTbGFMDIBeGdVkLt4qWTeCPw+n7Ock+wceAGRenuHA6nOOvMJFliNDyXsjg2osGKJWsXtO2xc74VxyDw=="},"node_modules/timers-browserify": {"version": "2.0.12",@@ -24841,9 +25630,9 @@}},"node_modules/toad-cache": {- "version": "3.3.0",- "resolved": "https://registry.npmjs.org/toad-cache/-/toad-cache-3.3.0.tgz",- "integrity": "sha512-3oDzcogWGHZdkwrHyvJVpPjA7oNzY6ENOV3PsWJY9XYPZ6INo94Yd47s5may1U+nleBPwDhrRiTPMIvKaa3MQg==",+ "version": "3.7.0",+ "resolved": "https://registry.npmjs.org/toad-cache/-/toad-cache-3.7.0.tgz",+ "integrity": "sha512-/m8M+2BJUpoJdgAHoG+baCwBT+tf2VraSfkBgl0Y00qIWt41DJ8R5B8nsEw0I58YwF5IZH6z24/2TobDKnqSWw==","engines": {"node": ">=12"}@@ -24861,6 +25650,22 @@"node": ">=0.6"}},+ "node_modules/token-types": {+ "version": "5.0.1",+ "resolved": "https://registry.npmjs.org/token-types/-/token-types-5.0.1.tgz",+ "integrity": "sha512-Y2fmSnZjQdDb9W4w4r1tswlMHylzWIeOKpx0aZH9BgGtACHhrk3OkT52AzwcuqTRBZtvvnTjDBh8eynMulu8Vg==",+ "dependencies": {+ "@tokenizer/token": "^0.3.0",+ "ieee754": "^1.2.1"+ },+ "engines": {+ "node": ">=14.16"+ },+ "funding": {+ "type": "github",+ "url": "https://github.com/sponsors/Borewit"+ }+ },"node_modules/touch": {"version": "3.1.0","resolved": "https://registry.npmjs.org/touch/-/touch-3.1.0.tgz",@@ -24909,9 +25714,12 @@}},"node_modules/traverse": {- "version": "0.6.7",- "resolved": "https://registry.npmjs.org/traverse/-/traverse-0.6.7.tgz",- "integrity": "sha512-/y956gpUo9ZNCb99YjxG7OaslxZWHfCHAUUfshwqOXmxUIvqLjVO581BT+gM59+QV9tFe6/CGG53tsA1Y7RSdg==",+ "version": "0.6.8",+ "resolved": "https://registry.npmjs.org/traverse/-/traverse-0.6.8.tgz",+ "integrity": "sha512-aXJDbk6SnumuaZSANd21XAo15ucCDE38H4fkqiGsc3MhCK+wOlZvLP9cB/TvpHT0mOyWgC4Z8EwRlzqYSUzdsA==",+ "engines": {+ "node": ">= 0.4"+ },"funding": {"url": "https://github.com/sponsors/ljharb"}@@ -24934,9 +25742,9 @@}},"node_modules/trough": {- "version": "2.1.0",- "resolved": "https://registry.npmjs.org/trough/-/trough-2.1.0.tgz",- "integrity": "sha512-AqTiAOLcj85xS7vQ8QkAV41hPDIJ71XJB4RCUrzo/1GM2CQwhkJGaf9Hgr7BOugMRpgGUrqRg/DrBDl4H40+8g==",+ "version": "2.2.0",+ "resolved": "https://registry.npmjs.org/trough/-/trough-2.2.0.tgz",+ "integrity": "sha512-tmMpK00BjZiUyVyvrBK7knerNgmgvcV/KLVyuma/SC+TQN167GrMRciANTz09+k3zW8L8t60jWO1GpfkZdjTaw==","funding": {"type": "github","url": "https://github.com/sponsors/wooorm"@@ -24948,9 +25756,9 @@"integrity": "sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA=="},"node_modules/ts-jest": {- "version": "29.1.1",- "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.1.1.tgz",- "integrity": "sha512-D6xjnnbP17cC85nliwGiL+tpoKN0StpgE0TeOjXQTU6MVCfsB4v7aW05CgQ/1OywGb0x/oy9hHFnN+sczTiRaA==",+ "version": "29.1.2",+ "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.1.2.tgz",+ "integrity": "sha512-br6GJoH/WUX4pu7FbZXuWGKGNDuU7b8Uj77g/Sp7puZV6EXzuByl6JrECvm0MzVzSTkSHWTihsXt+5XYER5b+g==","dev": true,"dependencies": {"bs-logger": "0.x",@@ -24966,7 +25774,7 @@"ts-jest": "cli.js"},"engines": {- "node": "^14.15.0 || ^16.10.0 || >=18.0.0"+ "node": "^16.10.0 || ^18.0.0 || >=20.0.0"},"peerDependencies": {"@babel/core": ">=7.0.0-beta.0 <8",@@ -24991,9 +25799,9 @@}},"node_modules/tsconfig-paths": {- "version": "3.14.2",- "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.14.2.tgz",- "integrity": "sha512-o/9iXgCYc5L/JxCHPe3Hvh8Q/2xm5Z+p18PESBU6Ff33695QnCHBEjcytY2q19ua7Mbl/DavtBOLq+oG0RCL+g==",+ "version": "3.15.0",+ "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz",+ "integrity": "sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg==","dev": true,"dependencies": {"@types/json5": "^0.0.29",@@ -25182,9 +25990,9 @@"integrity": "sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA=="},"node_modules/typescript": {- "version": "5.2.2",- "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz",- "integrity": "sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==",+ "version": "5.3.3",+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz",+ "integrity": "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==","dev": true,"bin": {"tsc": "bin/tsc",@@ -25195,9 +26003,9 @@}},"node_modules/ua-parser-js": {- "version": "1.0.36",- "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-1.0.36.tgz",- "integrity": "sha512-znuyCIXzl8ciS3+y3fHJI/2OhQIXbXw9MWC/o3qwyR+RGppjZHrM27CGFSKCJXi2Kctiz537iOu2KnXs1lMQhw==",+ "version": "1.0.37",+ "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-1.0.37.tgz",+ "integrity": "sha512-bhTyI94tZofjo+Dn8SN6Zv8nBDvyXTymAdM3LDI/0IboIUwTu1rEhW7v2TfiVsoYWgkQ4kOVqnI8APUFbIQIFQ==","funding": [{"type": "opencollective",@@ -25361,6 +26169,17 @@"node": ">=4"}},+ "node_modules/unified/node_modules/is-plain-obj": {+ "version": "4.1.0",+ "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-4.1.0.tgz",+ "integrity": "sha512-+Pgi+vMuUNkJyExiMBt5IlFoMyKnr5zhJ4Uspz58WOhBF5QoIZkFyNHIbBAtHwzVAgk5RtndVNsDRN61/mmDqg==",+ "engines": {+ "node": ">=12"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },"node_modules/unist-util-find-after": {"version": "4.0.1","resolved": "https://registry.npmjs.org/unist-util-find-after/-/unist-util-find-after-4.0.1.tgz",@@ -25460,12 +26279,11 @@}},"node_modules/universalify": {- "version": "2.0.0",- "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz",- "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==",- "dev": true,+ "version": "0.1.2",+ "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz",+ "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==","engines": {- "node": ">= 10.0.0"+ "node": ">= 4.0.0"}},"node_modules/unpipe": {@@ -25515,9 +26333,9 @@}},"node_modules/url": {- "version": "0.11.2",- "resolved": "https://registry.npmjs.org/url/-/url-0.11.2.tgz",- "integrity": "sha512-7yIgNnrST44S7PJ5+jXbdIupfU1nWUdQJBFBeJRclPXiWgCvrSq5Frw8lr/i//n5sqDfzoKmBymMS81l4U/7cg==",+ "version": "0.11.3",+ "resolved": "https://registry.npmjs.org/url/-/url-0.11.3.tgz",+ "integrity": "sha512-6hxOLGfZASQK/cijlZnZJTq8OXAkt/3YGfQX45vvMYXpZoo8NdWZcY73K108Jf759lS1Bv/8wXnHDTSz17dSRw==","dependencies": {"punycode": "^1.4.1","qs": "^6.11.2"@@ -25558,9 +26376,9 @@}},"node_modules/use-callback-ref": {- "version": "1.3.0",- "resolved": "https://registry.npmjs.org/use-callback-ref/-/use-callback-ref-1.3.0.tgz",- "integrity": "sha512-3FT9PRuRdbB9HfXhEq35u4oZkvpJ5kuYbpqhCfmiZyReuRgpnhDlbr2ZEnnuS0RrJAPn6l23xjFg9kpDM+Ms7w==",+ "version": "1.3.1",+ "resolved": "https://registry.npmjs.org/use-callback-ref/-/use-callback-ref-1.3.1.tgz",+ "integrity": "sha512-Lg4Vx1XZQauB42Hw3kK7JM6yjVjgFmFC5/Ab797s79aARomD2nEErc4mCgM8EZrARLmmbWpi5DGCadmK50DcAQ==","dependencies": {"tslib": "^2.0.0"},@@ -25670,10 +26488,13 @@}},"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==",- "devOptional": true,+ "version": "9.0.1",+ "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz",+ "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==",+ "funding": [+ "https://github.com/sponsors/broofa",+ "https://github.com/sponsors/ctavan"+ ],"bin": {"uuid": "dist/bin/uuid"}@@ -25704,14 +26525,14 @@}},"node_modules/v8-to-istanbul": {- "version": "9.1.0",- "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.1.0.tgz",- "integrity": "sha512-6z3GW9x8G1gd+JIIgQQQxXuiJtCXeAjp6RaPEPLv62mH3iPHPxV6W3robxtCzNErRo6ZwTmzWhsbNvjyEBKzKA==",+ "version": "9.2.0",+ "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.2.0.tgz",+ "integrity": "sha512-/EH/sDgxU2eGxajKdwLCDmQ4FWq+kpi3uCmBGpw1xJtnAxEjlD8j8PEiGWpCIMIs3ciNAgH0d3TTJiUkYzyZjA==","dev": true,"dependencies": {"@jridgewell/trace-mapping": "^0.3.12","@types/istanbul-lib-coverage": "^2.0.1",- "convert-source-map": "^1.6.0"+ "convert-source-map": "^2.0.0"},"engines": {"node": ">=10.12.0"@@ -25799,13 +26620,13 @@}},"node_modules/vite": {- "version": "5.0.12",- "resolved": "https://registry.npmjs.org/vite/-/vite-5.0.12.tgz",- "integrity": "sha512-4hsnEkG3q0N4Tzf1+t6NdN9dg/L3BM+q8SWgbSPnJvrgH2kgdyzfVJwbR1ic69/4uMJJ/3dqDZZE5/WwqW8U1w==",+ "version": "5.1.1",+ "resolved": "https://registry.npmjs.org/vite/-/vite-5.1.1.tgz",+ "integrity": "sha512-wclpAgY3F1tR7t9LL5CcHC41YPkQIpKUGeIuT8MdNwNZr6OqOTLs7JX5vIHAtzqLWXts0T+GDrh9pN2arneKqg==","dev": true,"dependencies": {"esbuild": "^0.19.3",- "postcss": "^8.4.32",+ "postcss": "^8.4.35","rollup": "^4.2.0"},"bin": {@@ -25854,9 +26675,9 @@}},"node_modules/vite-plugin-html": {- "version": "3.2.0",- "resolved": "https://registry.npmjs.org/vite-plugin-html/-/vite-plugin-html-3.2.0.tgz",- "integrity": "sha512-2VLCeDiHmV/BqqNn5h2V+4280KRgQzCFN47cst3WiNK848klESPQnzuC3okH5XHtgwHH/6s1Ho/YV6yIO0pgoQ==",+ "version": "3.2.2",+ "resolved": "https://registry.npmjs.org/vite-plugin-html/-/vite-plugin-html-3.2.2.tgz",+ "integrity": "sha512-vb9C9kcdzcIo/Oc3CLZVS03dL5pDlOFuhGlZYDCJ840BhWl/0nGeZWf3Qy7NlOayscY4Cm/QRgULCQkEZige5Q==","dev": true,"dependencies": {"@rollup/pluginutils": "^4.2.0",@@ -25889,6 +26710,41 @@"node": ">= 8.0.0"}},+ "node_modules/vite-plugin-html/node_modules/fs-extra": {+ "version": "10.1.0",+ "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz",+ "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==",+ "dev": true,+ "dependencies": {+ "graceful-fs": "^4.2.0",+ "jsonfile": "^6.0.1",+ "universalify": "^2.0.0"+ },+ "engines": {+ "node": ">=12"+ }+ },+ "node_modules/vite-plugin-html/node_modules/jsonfile": {+ "version": "6.1.0",+ "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz",+ "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==",+ "dev": true,+ "dependencies": {+ "universalify": "^2.0.0"+ },+ "optionalDependencies": {+ "graceful-fs": "^4.1.6"+ }+ },+ "node_modules/vite-plugin-html/node_modules/universalify": {+ "version": "2.0.1",+ "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz",+ "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==",+ "dev": true,+ "engines": {+ "node": ">= 10.0.0"+ }+ },"node_modules/vite-plugin-node-polyfills": {"version": "0.17.0","resolved": "https://registry.npmjs.org/vite-plugin-node-polyfills/-/vite-plugin-node-polyfills-0.17.0.tgz",@@ -25908,10 +26764,13 @@}},"node_modules/vite/node_modules/rollup": {- "version": "4.8.0",- "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.8.0.tgz",- "integrity": "sha512-NpsklK2fach5CdI+PScmlE5R4Ao/FSWtF7LkoIrHDxPACY/xshNasPsbpG0VVHxUTbf74tJbVT4PrP8JsJ6ZDA==",+ "version": "4.9.6",+ "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.9.6.tgz",+ "integrity": "sha512-05lzkCS2uASX0CiLFybYfVkwNbKZG5NFQ6Go0VWyogFTXXbR039UVsegViTntkk4OglHBdF54ccApXRRuXRbsg==","dev": true,+ "dependencies": {+ "@types/estree": "1.0.5"+ },"bin": {"rollup": "dist/bin/rollup"},@@ -25920,19 +26779,19 @@"npm": ">=8.0.0"},"optionalDependencies": {- "@rollup/rollup-android-arm-eabi": "4.8.0",- "@rollup/rollup-android-arm64": "4.8.0",- "@rollup/rollup-darwin-arm64": "4.8.0",- "@rollup/rollup-darwin-x64": "4.8.0",- "@rollup/rollup-linux-arm-gnueabihf": "4.8.0",- "@rollup/rollup-linux-arm64-gnu": "4.8.0",- "@rollup/rollup-linux-arm64-musl": "4.8.0",- "@rollup/rollup-linux-riscv64-gnu": "4.8.0",- "@rollup/rollup-linux-x64-gnu": "4.8.0",- "@rollup/rollup-linux-x64-musl": "4.8.0",- "@rollup/rollup-win32-arm64-msvc": "4.8.0",- "@rollup/rollup-win32-ia32-msvc": "4.8.0",- "@rollup/rollup-win32-x64-msvc": "4.8.0",+ "@rollup/rollup-android-arm-eabi": "4.9.6",+ "@rollup/rollup-android-arm64": "4.9.6",+ "@rollup/rollup-darwin-arm64": "4.9.6",+ "@rollup/rollup-darwin-x64": "4.9.6",+ "@rollup/rollup-linux-arm-gnueabihf": "4.9.6",+ "@rollup/rollup-linux-arm64-gnu": "4.9.6",+ "@rollup/rollup-linux-arm64-musl": "4.9.6",+ "@rollup/rollup-linux-riscv64-gnu": "4.9.6",+ "@rollup/rollup-linux-x64-gnu": "4.9.6",+ "@rollup/rollup-linux-x64-musl": "4.9.6",+ "@rollup/rollup-win32-arm64-msvc": "4.9.6",+ "@rollup/rollup-win32-ia32-msvc": "4.9.6",+ "@rollup/rollup-win32-x64-msvc": "4.9.6","fsevents": "~2.3.2"}},@@ -26003,6 +26862,20 @@"makeerror": "1.0.12"}},+ "node_modules/watchpack": {+ "version": "2.4.0",+ "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.0.tgz",+ "integrity": "sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg==",+ "dev": true,+ "peer": true,+ "dependencies": {+ "glob-to-regexp": "^0.4.1",+ "graceful-fs": "^4.1.2"+ },+ "engines": {+ "node": ">=10.13.0"+ }+ },"node_modules/wcwidth": {"version": "1.0.1","resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz",@@ -26021,11 +26894,11 @@}},"node_modules/web-streams-polyfill": {- "version": "4.0.0-beta.3",- "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-4.0.0-beta.3.tgz",- "integrity": "sha512-QW95TCTaHmsYfHDybGMwO5IJIM93I/6vTRk+daHTWFPhwh+C8Cg7j7XyKrwrj8Ib6vYXe0ocYNrmzY4xAAN6ug==",+ "version": "3.3.2",+ "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.3.2.tgz",+ "integrity": "sha512-3pRGuxRF5gpuZc0W+EpwQRmCD7gRqcDOMt688KmdlDAgAyaB1XlN0zq2njfDNm44XVdIouE7pZ6GzbdyH47uIQ==","engines": {- "node": ">= 14"+ "node": ">= 8"}},"node_modules/webidl-conversions": {@@ -26036,6 +26909,64 @@"node": ">=12"}},+ "node_modules/webpack": {+ "version": "5.90.1",+ "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.90.1.tgz",+ "integrity": "sha512-SstPdlAC5IvgFnhiRok8hqJo/+ArAbNv7rhU4fnWGHNVfN59HSQFaxZDSAL3IFG2YmqxuRs+IU33milSxbPlog==",+ "dev": true,+ "peer": true,+ "dependencies": {+ "@types/eslint-scope": "^3.7.3",+ "@types/estree": "^1.0.5",+ "@webassemblyjs/ast": "^1.11.5",+ "@webassemblyjs/wasm-edit": "^1.11.5",+ "@webassemblyjs/wasm-parser": "^1.11.5",+ "acorn": "^8.7.1",+ "acorn-import-assertions": "^1.9.0",+ "browserslist": "^4.21.10",+ "chrome-trace-event": "^1.0.2",+ "enhanced-resolve": "^5.15.0",+ "es-module-lexer": "^1.2.1",+ "eslint-scope": "5.1.1",+ "events": "^3.2.0",+ "glob-to-regexp": "^0.4.1",+ "graceful-fs": "^4.2.9",+ "json-parse-even-better-errors": "^2.3.1",+ "loader-runner": "^4.2.0",+ "mime-types": "^2.1.27",+ "neo-async": "^2.6.2",+ "schema-utils": "^3.2.0",+ "tapable": "^2.1.1",+ "terser-webpack-plugin": "^5.3.10",+ "watchpack": "^2.4.0",+ "webpack-sources": "^3.2.3"+ },+ "bin": {+ "webpack": "bin/webpack.js"+ },+ "engines": {+ "node": ">=10.13.0"+ },+ "funding": {+ "type": "opencollective",+ "url": "https://opencollective.com/webpack"+ },+ "peerDependenciesMeta": {+ "webpack-cli": {+ "optional": true+ }+ }+ },+ "node_modules/webpack-sources": {+ "version": "3.2.3",+ "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz",+ "integrity": "sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==",+ "dev": true,+ "peer": true,+ "engines": {+ "node": ">=10.13.0"+ }+ },"node_modules/websocket-driver": {"version": "0.7.4","resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.4.tgz",@@ -26163,6 +27094,12 @@"url": "https://github.com/sponsors/ljharb"}},+ "node_modules/which-builtin-type/node_modules/isarray": {+ "version": "2.0.5",+ "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz",+ "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==",+ "dev": true+ },"node_modules/which-collection": {"version": "1.0.1","resolved": "https://registry.npmjs.org/which-collection/-/which-collection-1.0.1.tgz",@@ -26185,16 +27122,16 @@"dev": true},"node_modules/which-typed-array": {- "version": "1.1.11",- "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.11.tgz",- "integrity": "sha512-qe9UWWpkeG5yzZ0tNYxDmd7vo58HDBc39mZ0xWWpolAGADdFOzkfamWLDxkOWcvHQKVmdTyQdLD4NOfjLWTKew==",+ "version": "1.1.14",+ "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.14.tgz",+ "integrity": "sha512-VnXFiIW8yNn9kIHN88xvZ4yOWchftKDsRJ8fEPacX/wl1lOvBrhsJ/OeJCXq7B0AaijRuqgzSKalJoPk+D8MPg==","dev": true,"dependencies": {- "available-typed-arrays": "^1.0.5",- "call-bind": "^1.0.2",+ "available-typed-arrays": "^1.0.6",+ "call-bind": "^1.0.5","for-each": "^0.3.3","gopd": "^1.0.1",- "has-tostringtag": "^1.0.0"+ "has-tostringtag": "^1.0.1"},"engines": {"node": ">= 0.4"@@ -26255,25 +27192,17 @@"winston": "^3"}},- "node_modules/winston-daily-rotate-file/node_modules/object-hash": {- "version": "2.2.0",- "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-2.2.0.tgz",- "integrity": "sha512-gScRMn0bS5fH+IuwyIFgnh9zBdo4DV+6GhygmWM9HyNJSgS0hScp1f5vjtm7oIIOiT9trXrShAkLFSc2IqKNgw==",- "engines": {- "node": ">= 6"- }- },"node_modules/winston-transport": {- "version": "4.5.0",- "resolved": "https://registry.npmjs.org/winston-transport/-/winston-transport-4.5.0.tgz",- "integrity": "sha512-YpZzcUzBedhlTAfJg6vJDlyEai/IFMIVcaEZZyl3UXIl4gmqRpU7AE89AHLkbzLUsv0NVmw7ts+iztqKxxPW1Q==",+ "version": "4.7.0",+ "resolved": "https://registry.npmjs.org/winston-transport/-/winston-transport-4.7.0.tgz",+ "integrity": "sha512-ajBj65K5I7denzer2IYW6+2bNIVqLGDHqDw3Ow8Ohh+vdW+rv4MZ6eiDvHoKhfJFZ2auyN8byXieDDJ96ViONg==","dependencies": {"logform": "^2.3.2","readable-stream": "^3.6.0","triple-beam": "^1.3.0"},"engines": {- "node": ">= 6.4.0"+ "node": ">= 12.0.0"}},"node_modules/winston-transport/node_modules/readable-stream": {@@ -26289,14 +27218,6 @@"node": ">= 6"}},- "node_modules/winston/node_modules/@colors/colors": {- "version": "1.6.0",- "resolved": "https://registry.npmjs.org/@colors/colors/-/colors-1.6.0.tgz",- "integrity": "sha512-Ir+AOibqzrIsL6ajt3Rz3LskB7OiMVHqltZmspbW/TJuTVuyOMirVqAkjfY6JISiLHgyNqicAC8AyHHGzNd/dA==",- "engines": {- "node": ">=0.1.90"- }- },"node_modules/winston/node_modules/readable-stream": {"version": "3.6.2","resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz",@@ -26336,7 +27257,6 @@"version": "7.0.0","resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz","integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==",- "dev": true,"dependencies": {"ansi-styles": "^4.0.0","string-width": "^4.1.0",@@ -26352,14 +27272,12 @@"node_modules/wrap-ansi-cjs/node_modules/emoji-regex": {"version": "8.0.0","resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",- "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",- "dev": true+ "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A=="},"node_modules/wrap-ansi-cjs/node_modules/is-fullwidth-code-point": {"version": "3.0.0","resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz","integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",- "dev": true,"engines": {"node": ">=8"}@@ -26368,7 +27286,6 @@"version": "4.2.3","resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz","integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",- "dev": true,"dependencies": {"emoji-regex": "^8.0.0","is-fullwidth-code-point": "^3.0.0",@@ -26515,9 +27432,9 @@}},"node_modules/ws": {- "version": "8.14.2",- "resolved": "https://registry.npmjs.org/ws/-/ws-8.14.2.tgz",- "integrity": "sha512-wEBG1ftX4jcglPxgFCMJmZ2PLtSbJ2Peg6TmpJFTbe9GZYOQCDPdMYu/Tm0/bGZkw8paZnJY45J4K2PZrLYq8g==",+ "version": "8.16.0",+ "resolved": "https://registry.npmjs.org/ws/-/ws-8.16.0.tgz",+ "integrity": "sha512-HS0c//TP7Ina87TfiPUz1rQzMhHrl/SG2guqRcTOIUYD2q8uhUdNHZYJUaQ8aTGPzCh+c6oawMKW35nFl1dxyQ==","engines": {"node": ">=10.0.0"},@@ -26578,9 +27495,9 @@"dev": true},"node_modules/yaml": {- "version": "2.3.1",- "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.3.1.tgz",- "integrity": "sha512-2eHWfjaoXgTBC2jNM1LRef62VQa0umtvRiDSk6HSzW7RvS5YtkabJrwYLLEKWBc8a5U2PTSCs+dJjUTJdlHsWQ==",+ "version": "2.3.4",+ "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.3.4.tgz",+ "integrity": "sha512-8aAvwVUSHpfEqTQ4w/KMlf3HcRdt50E5ODIQJBw1fQ5RL34xabzxtUlzTXVqc4rkZsPbvrXKWnABCD7kWSmocA==","engines": {"node": ">= 14"}@@ -26657,11 +27574,11 @@}},"node_modules/zod-to-json-schema": {- "version": "3.20.3",- "resolved": "https://registry.npmjs.org/zod-to-json-schema/-/zod-to-json-schema-3.20.3.tgz",- "integrity": "sha512-/Q3wnyxAfCt94ZcrGiXXoiAfRqasxl9CX64LZ9fj+4dKH68zulUtU0uk1WMxQPfAxQ0ZI70dKzcoW7hHj+DwSQ==",+ "version": "3.22.4",+ "resolved": "https://registry.npmjs.org/zod-to-json-schema/-/zod-to-json-schema-3.22.4.tgz",+ "integrity": "sha512-2Ed5dJ+n/O3cU383xSY28cuVi0BCQhF8nYqWU5paEpl7fVdqdAmiLdqLyfblbNdfOFwFfi/mqU4O1pwc60iBhQ==","peerDependencies": {- "zod": "^3.20.0"+ "zod": "^3.22.4"}},"node_modules/zwitch": {@@ -26675,10 +27592,12 @@},"packages/data-provider": {"name": "librechat-data-provider",- "version": "0.3.8",+ "version": "0.4.0","license": "ISC","dependencies": {+ "@types/js-yaml": "^4.0.9","axios": "^1.3.4",+ "js-yaml": "^4.1.0","openai": "4.11.1","zod": "^3.22.4"},@@ -26718,19 +27637,19 @@}},"packages/data-provider/node_modules/glob": {- "version": "10.3.4",- "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.4.tgz",- "integrity": "sha512-6LFElP3A+i/Q8XQKEvZjkEWEOTgAIALR9AO2rwT8bgPhDd1anmqDJDZ6lLddI4ehxxxR1S5RIqKe1uapMQfYaQ==",+ "version": "10.3.10",+ "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.10.tgz",+ "integrity": "sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==","dev": true,"dependencies": {"foreground-child": "^3.1.0",- "jackspeak": "^2.0.3",+ "jackspeak": "^2.3.5","minimatch": "^9.0.1","minipass": "^5.0.0 || ^6.0.2 || ^7.0.0","path-scurry": "^1.10.1"},"bin": {- "glob": "dist/cjs/src/bin.js"+ "glob": "dist/esm/bin.mjs"},"engines": {"node": ">=16 || 14 >=14.17"@@ -26754,42 +27673,16 @@"url": "https://github.com/sponsors/isaacs"}},- "packages/data-provider/node_modules/openai": {- "version": "4.11.1",- "resolved": "https://registry.npmjs.org/openai/-/openai-4.11.1.tgz",- "integrity": "sha512-GU0HQWbejXuVAQlDjxIE8pohqnjptFDIm32aPlNT1H9ucMz1VJJD0DaTJRQsagNaJ97awWjjVLEG7zCM6sm4SA==",- "dependencies": {- "@types/node": "^18.11.18",- "@types/node-fetch": "^2.6.4",- "abort-controller": "^3.0.0",- "agentkeepalive": "^4.2.1",- "digest-fetch": "^1.3.0",- "form-data-encoder": "1.7.2",- "formdata-node": "^4.3.2",- "node-fetch": "^2.6.7"- },- "bin": {- "openai": "bin/cli"- }- },- "packages/data-provider/node_modules/openai/node_modules/@types/node": {- "version": "18.18.8",- "resolved": "https://registry.npmjs.org/@types/node/-/node-18.18.8.tgz",- "integrity": "sha512-OLGBaaK5V3VRBS1bAkMVP2/W9B+H8meUfl866OrMNQqt7wDgdpWPp5o6gmIc9pB+lIQHSq4ZL8ypeH1vPxcPaQ==",- "dependencies": {- "undici-types": "~5.26.4"- }- },"packages/data-provider/node_modules/rimraf": {- "version": "5.0.1",- "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-5.0.1.tgz",- "integrity": "sha512-OfFZdwtd3lZ+XZzYP/6gTACubwFcHdLRqS9UX3UwpU2dnGQYkPFISRwvM3w9IiB2w7bW5qGo/uAwE4SmXXSKvg==",+ "version": "5.0.5",+ "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-5.0.5.tgz",+ "integrity": "sha512-CqDakW+hMe/Bz202FPEymy68P+G50RfMQK+Qo5YUqc9SPipvbGjCGKd0RSKEelbsfQuw3g5NZDSrlZZAJurH1A==","dev": true,"dependencies": {- "glob": "^10.2.5"+ "glob": "^10.3.7"},"bin": {- "rimraf": "dist/cjs/src/bin.js"+ "rimraf": "dist/esm/bin.mjs"},"engines": {"node": ">=14"diff --git a/packages/data-provider/package.json b/packages/data-provider/package.jsonindex 3a231a7cbf..d57912799b 100644--- a/packages/data-provider/package.json+++ b/packages/data-provider/package.json@@ -39,7 +39,9 @@},"homepage": "https://github.com/danny-avila/LibreChat#readme","dependencies": {+ "@types/js-yaml": "^4.0.9","axios": "^1.3.4",+ "js-yaml": "^4.1.0","openai": "4.11.1","zod": "^3.22.4"},diff --git a/packages/data-provider/specs/actions.spec.ts b/packages/data-provider/specs/actions.spec.tsnew file mode 100644index 0000000000..f2ca0aedf3--- /dev/null+++ b/packages/data-provider/specs/actions.spec.ts@@ -0,0 +1,475 @@+import axios from 'axios';+import { OpenAPIV3 } from 'openapi-types';+import {+ resolveRef,+ ActionRequest,+ openapiToFunction,+ FunctionSignature,+ validateAndParseOpenAPISpec,+} from '../src/actions';+import { getWeatherOpenapiSpec, whimsicalOpenapiSpec, scholarAIOpenapiSpec } from './openapiSpecs';+import { AuthorizationTypeEnum, AuthTypeEnum } from '../src/types/assistants';+import type { FlowchartSchema } from './openapiSpecs';+import type { ParametersSchema } from '../src/actions';++jest.mock('axios');+const mockedAxios = axios as jest.Mocked<typeof axios>;++describe('FunctionSignature', () => {+ it('creates a function signature and converts to JSON tool', () => {+ const signature = new FunctionSignature('testFunction', 'A test function', {+ param1: { type: 'string' },+ } as unknown as ParametersSchema);+ expect(signature.name).toBe('testFunction');+ expect(signature.description).toBe('A test function');+ expect(signature.toObjectTool()).toEqual({+ type: 'function',+ function: {+ name: 'testFunction',+ description: 'A test function',+ parameters: {+ param1: { type: 'string' },+ },+ },+ });+ });+});++describe('ActionRequest', () => {+ // Mocking responses for each method+ beforeEach(() => {+ mockedAxios.get.mockResolvedValue({ data: { success: true, method: 'GET' } });+ mockedAxios.post.mockResolvedValue({ data: { success: true, method: 'POST' } });+ mockedAxios.put.mockResolvedValue({ data: { success: true, method: 'PUT' } });+ mockedAxios.delete.mockResolvedValue({ data: { success: true, method: 'DELETE' } });+ mockedAxios.patch.mockResolvedValue({ data: { success: true, method: 'PATCH' } });+ });++ afterEach(() => {+ jest.clearAllMocks();+ });++ it('should make a GET request', async () => {+ const actionRequest = new ActionRequest(+ 'https://example.com',+ '/test',+ 'GET',+ 'testOp',+ false,+ 'application/json',+ );+ await actionRequest.setParams({ param1: 'value1' });+ const response = await actionRequest.execute();+ expect(mockedAxios.get).toHaveBeenCalledWith('https://example.com/test', expect.anything());+ expect(response.data).toEqual({ success: true, method: 'GET' });+ });++ describe('ActionRequest', () => {+ beforeEach(() => {+ mockedAxios.get.mockClear();+ mockedAxios.post.mockClear();+ mockedAxios.put.mockClear();+ mockedAxios.delete.mockClear();+ mockedAxios.patch.mockClear();+ });++ it('handles GET requests', async () => {+ mockedAxios.get.mockResolvedValue({ data: { success: true } });+ const actionRequest = new ActionRequest(+ 'https://example.com',+ '/get',+ 'GET',+ 'testGet',+ false,+ 'application/json',+ );+ await actionRequest.setParams({ param: 'test' });+ const response = await actionRequest.execute();+ expect(mockedAxios.get).toHaveBeenCalled();+ expect(response.data.success).toBe(true);+ });++ it('handles POST requests', async () => {+ mockedAxios.post.mockResolvedValue({ data: { success: true } });+ const actionRequest = new ActionRequest(+ 'https://example.com',+ '/post',+ 'POST',+ 'testPost',+ false,+ 'application/json',+ );+ await actionRequest.setParams({ param: 'test' });+ const response = await actionRequest.execute();+ expect(mockedAxios.post).toHaveBeenCalled();+ expect(response.data.success).toBe(true);+ });++ it('handles PUT requests', async () => {+ mockedAxios.put.mockResolvedValue({ data: { success: true } });+ const actionRequest = new ActionRequest(+ 'https://example.com',+ '/put',+ 'PUT',+ 'testPut',+ false,+ 'application/json',+ );+ await actionRequest.setParams({ param: 'test' });+ const response = await actionRequest.execute();+ expect(mockedAxios.put).toHaveBeenCalled();+ expect(response.data.success).toBe(true);+ });++ it('handles DELETE requests', async () => {+ mockedAxios.delete.mockResolvedValue({ data: { success: true } });+ const actionRequest = new ActionRequest(+ 'https://example.com',+ '/delete',+ 'DELETE',+ 'testDelete',+ false,+ 'application/json',+ );+ await actionRequest.setParams({ param: 'test' });+ const response = await actionRequest.execute();+ expect(mockedAxios.delete).toHaveBeenCalled();+ expect(response.data.success).toBe(true);+ });++ it('handles PATCH requests', async () => {+ mockedAxios.patch.mockResolvedValue({ data: { success: true } });+ const actionRequest = new ActionRequest(+ 'https://example.com',+ '/patch',+ 'PATCH',+ 'testPatch',+ false,+ 'application/json',+ );+ await actionRequest.setParams({ param: 'test' });+ const response = await actionRequest.execute();+ expect(mockedAxios.patch).toHaveBeenCalled();+ expect(response.data.success).toBe(true);+ });++ it('throws an error for unsupported HTTP methods', async () => {+ const actionRequest = new ActionRequest(+ 'https://example.com',+ '/invalid',+ 'INVALID',+ 'testInvalid',+ false,+ 'application/json',+ );+ await expect(actionRequest.execute()).rejects.toThrow('Unsupported HTTP method: INVALID');+ });+ });++ it('throws an error for unsupported HTTP method', async () => {+ const actionRequest = new ActionRequest(+ 'https://example.com',+ '/test',+ 'INVALID',+ 'testOp',+ false,+ 'application/json',+ );+ await expect(actionRequest.execute()).rejects.toThrow('Unsupported HTTP method: INVALID');+ });+});++describe('Authentication Handling', () => {+ it('correctly sets Basic Auth header', async () => {+ const actionRequest = new ActionRequest(+ 'https://example.com',+ '/test',+ 'GET',+ 'testOp',+ false,+ 'application/json',+ );++ const api_key = 'user:pass';+ const encodedCredentials = Buffer.from('user:pass').toString('base64');++ actionRequest.setAuth({+ auth: {+ type: AuthTypeEnum.ServiceHttp,+ authorization_type: AuthorizationTypeEnum.Basic,+ },+ api_key,+ });++ await actionRequest.setParams({ param1: 'value1' });+ await actionRequest.execute();+ expect(mockedAxios.get).toHaveBeenCalledWith('https://example.com/test', {+ headers: expect.objectContaining({+ Authorization: `Basic ${encodedCredentials}`,+ }),+ params: expect.anything(),+ });+ });++ it('correctly sets Bearer token', async () => {+ const actionRequest = new ActionRequest(+ 'https://example.com',+ '/test',+ 'GET',+ 'testOp',+ false,+ 'application/json',+ );+ actionRequest.setAuth({+ auth: {+ type: AuthTypeEnum.ServiceHttp,+ authorization_type: AuthorizationTypeEnum.Bearer,+ },+ api_key: 'token123',+ });+ await actionRequest.setParams({ param1: 'value1' });+ await actionRequest.execute();+ expect(mockedAxios.get).toHaveBeenCalledWith('https://example.com/test', {+ headers: expect.objectContaining({+ Authorization: 'Bearer token123',+ }),+ params: expect.anything(),+ });+ });++ it('correctly sets API Key', async () => {+ const actionRequest = new ActionRequest(+ 'https://example.com',+ '/test',+ 'GET',+ 'testOp',+ false,+ 'application/json',+ );+ // Updated to match ActionMetadata structure+ actionRequest.setAuth({+ auth: {+ type: AuthTypeEnum.ServiceHttp, // Assuming this is a valid enum or value for your context+ authorization_type: AuthorizationTypeEnum.Custom, // Assuming Custom means using a custom header+ custom_auth_header: 'X-API-KEY',+ },+ api_key: 'abc123',+ });+ await actionRequest.setParams({ param1: 'value1' });+ await actionRequest.execute();+ expect(mockedAxios.get).toHaveBeenCalledWith('https://example.com/test', {+ headers: expect.objectContaining({+ 'X-API-KEY': 'abc123',+ }),+ params: expect.anything(),+ });+ });+});++describe('resolveRef', () => {+ it('correctly resolves $ref references in the OpenAPI spec', () => {+ const openapiSpec = whimsicalOpenapiSpec;+ const flowchartRequestRef = (+ openapiSpec.paths['/ai.chatgpt.render-flowchart']?.post+ ?.requestBody as OpenAPIV3.RequestBodyObject+ )?.content['application/json'].schema;+ expect(flowchartRequestRef).toBeDefined();+ const resolvedFlowchartRequest = resolveRef(+ flowchartRequestRef as OpenAPIV3.RequestBodyObject,+ openapiSpec.components,+ );++ expect(resolvedFlowchartRequest).toBeDefined();+ expect(resolvedFlowchartRequest.type).toBe('object');+ const properties = resolvedFlowchartRequest.properties as FlowchartSchema;+ expect(properties).toBeDefined();+ expect(properties.mermaid).toBeDefined();+ expect(properties.mermaid.type).toBe('string');+ });+});++describe('openapiToFunction', () => {+ it('converts OpenAPI spec to function signatures and request builders', () => {+ const { functionSignatures, requestBuilders } = openapiToFunction(getWeatherOpenapiSpec);+ expect(functionSignatures.length).toBe(1);+ expect(functionSignatures[0].name).toBe('GetCurrentWeather');++ const parameters = functionSignatures[0].parameters as ParametersSchema & {+ properties: {+ location: {+ type: 'string';+ };+ locations: {+ type: 'array';+ items: {+ type: 'object';+ properties: {+ city: {+ type: 'string';+ };+ state: {+ type: 'string';+ };+ countryCode: {+ type: 'string';+ };+ time: {+ type: 'string';+ };+ };+ };+ };+ };+ };++ expect(parameters).toBeDefined();+ expect(parameters.properties.locations).toBeDefined();+ expect(parameters.properties.locations.type).toBe('array');+ expect(parameters.properties.locations.items.type).toBe('object');++ expect(parameters.properties.locations.items.properties.city.type).toBe('string');+ expect(parameters.properties.locations.items.properties.state.type).toBe('string');+ expect(parameters.properties.locations.items.properties.countryCode.type).toBe('string');+ expect(parameters.properties.locations.items.properties.time.type).toBe('string');++ expect(requestBuilders).toHaveProperty('GetCurrentWeather');+ expect(requestBuilders.GetCurrentWeather).toBeInstanceOf(ActionRequest);+ });++ describe('openapiToFunction with $ref resolution', () => {+ it('correctly converts OpenAPI spec to function signatures and request builders, resolving $ref references', () => {+ const { functionSignatures, requestBuilders } = openapiToFunction(whimsicalOpenapiSpec);++ expect(functionSignatures.length).toBeGreaterThan(0);++ const postRenderFlowchartSignature = functionSignatures.find(+ (sig) => sig.name === 'postRenderFlowchart',+ );+ expect(postRenderFlowchartSignature).toBeDefined();+ expect(postRenderFlowchartSignature?.name).toBe('postRenderFlowchart');+ expect(postRenderFlowchartSignature?.parameters).toBeDefined();++ expect(requestBuilders).toHaveProperty('postRenderFlowchart');+ const postRenderFlowchartRequestBuilder = requestBuilders['postRenderFlowchart'];+ expect(postRenderFlowchartRequestBuilder).toBeDefined();+ expect(postRenderFlowchartRequestBuilder.method).toBe('post');+ expect(postRenderFlowchartRequestBuilder.path).toBe('/ai.chatgpt.render-flowchart');+ });+ });+});++const invalidServerURL = 'Could not find a valid URL in `servers`';++describe('validateAndParseOpenAPISpec', () => {+ it('validates a correct OpenAPI spec successfully', () => {+ const validSpec = JSON.stringify({+ openapi: '3.0.0',+ info: { title: 'Test API', version: '1.0.0' },+ servers: [{ url: 'https://test.api' }],+ paths: { '/test': {} },+ components: { schemas: {} },+ });++ const result = validateAndParseOpenAPISpec(validSpec);+ expect(result.status).toBe(true);+ expect(result.message).toBe('OpenAPI spec is valid.');+ });++ it('returns an error for spec with no servers', () => {+ const noServerSpec = JSON.stringify({+ openapi: '3.0.0',+ info: { title: 'Test API', version: '1.0.0' },+ paths: { '/test': {} },+ components: { schemas: {} },+ });++ const result = validateAndParseOpenAPISpec(noServerSpec);+ expect(result.status).toBe(false);+ expect(result.message).toBe(invalidServerURL);+ });++ it('returns an error for spec with empty server URL', () => {+ const emptyURLSpec = `{+ "openapi": "3.1.0",+ "info": {+ "title": "Untitled",+ "description": "Your OpenAPI specification",+ "version": "v1.0.0"+ },+ "servers": [+ {+ "url": ""+ }+ ],+ "paths": {},+ "components": {+ "schemas": {}+ }+ }`;++ const result = validateAndParseOpenAPISpec(emptyURLSpec);+ expect(result.status).toBe(false);+ expect(result.message).toBe(invalidServerURL);+ });++ it('returns an error for spec with no paths', () => {+ const noPathsSpec = JSON.stringify({+ openapi: '3.0.0',+ info: { title: 'Test API', version: '1.0.0' },+ servers: [{ url: 'https://test.api' }],+ components: { schemas: {} },+ });++ const result = validateAndParseOpenAPISpec(noPathsSpec);+ expect(result.status).toBe(false);+ expect(result.message).toBe('No paths found in the OpenAPI spec.');+ });++ it('detects missing components in spec', () => {+ const missingComponentSpec = JSON.stringify({+ openapi: '3.0.0',+ info: { title: 'Test API', version: '1.0.0' },+ servers: [{ url: 'https://test.api' }],+ paths: {+ '/test': {+ get: {+ responses: {+ '200': {+ content: {+ 'application/json': { schema: { $ref: '#/components/schemas/Missing' } },+ },+ },+ },+ },+ },+ },+ });++ const result = validateAndParseOpenAPISpec(missingComponentSpec);+ expect(result.status).toBe(true);+ expect(result.message).toContain('reference to unknown component Missing');+ expect(result.spec).toBeDefined();+ });++ it('handles invalid spec formats', () => {+ const invalidSpec = 'not a valid spec';++ const result = validateAndParseOpenAPISpec(invalidSpec);+ expect(result.status).toBe(false);+ expect(result.message).toBe(invalidServerURL);+ });++ it('handles YAML spec and correctly converts to Function Signatures', () => {+ const result = validateAndParseOpenAPISpec(scholarAIOpenapiSpec);+ expect(result.status).toBe(true);++ const spec = result.spec;+ expect(spec).toBeDefined();++ const { functionSignatures, requestBuilders } = openapiToFunction(spec as OpenAPIV3.Document);+ expect(functionSignatures.length).toBe(3);+ expect(requestBuilders).toHaveProperty('searchAbstracts');+ expect(requestBuilders).toHaveProperty('getFullText');+ expect(requestBuilders).toHaveProperty('saveCitation');+ });+});diff --git a/packages/data-provider/specs/filetypes.spec.ts b/packages/data-provider/specs/filetypes.spec.tsnew file mode 100644index 0000000000..de511fc688--- /dev/null+++ b/packages/data-provider/specs/filetypes.spec.ts@@ -0,0 +1,181 @@+import {+ fileConfig,+ fullMimeTypesList,+ codeInterpreterMimeTypesList,+ retrievalMimeTypesList,+ supportedMimeTypes,+ codeInterpreterMimeTypes,+ retrievalMimeTypes,+ excelFileTypes,+ excelMimeTypes,+ fileConfigSchema,+ mergeFileConfig,+ mbToBytes,+} from '../src/file-config';++describe('MIME Type Regex Patterns', () => {+ const unsupportedMimeTypes = [+ 'text/x-unknown',+ 'application/unknown',+ 'image/bmp',+ 'image/svg',+ 'audio/mp3',+ ];++ // Testing general supported MIME types+ fullMimeTypesList.forEach((mimeType) => {+ test(`"${mimeType}" should match one of the supported regex patterns in supportedMimeTypes`, () => {+ const matches = supportedMimeTypes.some((regex) => regex.test(mimeType));+ expect(matches).toBeTruthy();+ });+ });++ // Testing unsupported MIME types+ unsupportedMimeTypes.forEach((mimeType) => {+ test(`"${mimeType}" should not match any of the supported regex patterns in supportedMimeTypes`, () => {+ const matches = supportedMimeTypes.some((regex) => regex.test(mimeType));+ expect(matches).toBeFalsy();+ });+ });++ // Testing MIME types for Code Interpreter support+ codeInterpreterMimeTypesList.forEach((mimeType) => {+ test(`"${mimeType}" should be supported by codeInterpreterMimeTypes`, () => {+ const matches = codeInterpreterMimeTypes.some((regex) => regex.test(mimeType));+ expect(matches).toBeTruthy();+ });+ });++ // Testing MIME types for Retrieval support+ retrievalMimeTypesList.forEach((mimeType) => {+ test(`"${mimeType}" should be supported by retrievalMimeTypes`, () => {+ const matches = retrievalMimeTypes.some((regex) => regex.test(mimeType));+ expect(matches).toBeTruthy();+ });+ });+});++describe('MIME Types Exclusive to Code Interpreter', () => {+ const exclusiveCodeInterpreterMimeTypes = codeInterpreterMimeTypesList.filter(+ (mimeType) => !retrievalMimeTypesList.includes(mimeType),+ );++ exclusiveCodeInterpreterMimeTypes.forEach((mimeType) => {+ test(`"${mimeType}" should not be supported by retrievalMimeTypes`, () => {+ const isSupportedByRetrieval = retrievalMimeTypes.some((regex) => regex.test(mimeType));+ expect(isSupportedByRetrieval).toBeFalsy();+ });+ });+});++describe('Testing Excel MIME types', () => {+ excelFileTypes.forEach((mimeType) => {+ test(`"${mimeType}" should match one of the supported regex patterns in supportedMimeTypes`, () => {+ const matches = supportedMimeTypes.some((regex) => regex.test(mimeType));+ expect(matches).toBeTruthy();+ });+ });++ test('Excel MIME types should match the regex pattern in excelMimeTypes', () => {+ const matches = excelFileTypes.every((mimeType) => excelMimeTypes.test(mimeType));+ expect(matches).toBeTruthy();+ });+});++describe('Testing `fileConfig`', () => {+ describe('checkType function', () => {+ test('should return true for supported MIME types', () => {+ const fileTypes = ['text/csv', 'application/json', 'application/pdf', 'image/jpeg'];+ fileTypes.forEach((fileType) => {+ const isSupported = fileConfig.checkType(fileType);+ expect(isSupported).toBe(true);+ });+ });++ test('should return false for unsupported MIME types', () => {+ const fileTypes = ['text/mamba', 'application/exe', 'no-image', ''];+ fileTypes.forEach((fileType) => {+ const isSupported = fileConfig.checkType(fileType);+ expect(isSupported).toBe(false);+ });+ });+ });+});++const dynamicConfigs = {+ minimalUpdate: {+ serverFileSizeLimit: 1024, // Increasing server file size limit+ },+ fullOverrideDefaultEndpoint: {+ endpoints: {+ default: {+ fileLimit: 15,+ fileSizeLimit: 30,+ totalSizeLimit: 60,+ supportedMimeTypes: ['^video/.*$'], // Changing to support video files+ },+ },+ },+ newEndpointAddition: {+ endpoints: {+ newEndpoint: {+ fileLimit: 5,+ fileSizeLimit: 10,+ totalSizeLimit: 20,+ supportedMimeTypes: ['^application/json$', '^application/xml$'],+ },+ },+ },+};++describe('mergeFileConfig', () => {+ test('merges minimal update correctly', () => {+ const result = mergeFileConfig(dynamicConfigs.minimalUpdate);+ expect(result.serverFileSizeLimit).toEqual(mbToBytes(1024));+ const parsedResult = fileConfigSchema.safeParse(result);+ expect(parsedResult.success).toBeTruthy();+ });++ test('overrides default endpoint with full new configuration', () => {+ const result = mergeFileConfig(dynamicConfigs.fullOverrideDefaultEndpoint);+ expect(result.endpoints.default.fileLimit).toEqual(15);+ expect(result.endpoints.default.supportedMimeTypes).toEqual(+ expect.arrayContaining([new RegExp('^video/.*$')]),+ );+ const parsedResult = fileConfigSchema.safeParse(result);+ expect(parsedResult.success).toBeTruthy();+ });++ test('adds new endpoint configuration correctly', () => {+ const result = mergeFileConfig(dynamicConfigs.newEndpointAddition);+ expect(result.endpoints.newEndpoint).toBeDefined();+ expect(result.endpoints.newEndpoint.fileLimit).toEqual(5);+ expect(result.endpoints.newEndpoint.supportedMimeTypes).toEqual(+ expect.arrayContaining([new RegExp('^application/json$')]),+ );+ const parsedResult = fileConfigSchema.safeParse(result);+ expect(parsedResult.success).toBeTruthy();+ });++ test('disables an endpoint and sets numeric fields to 0 and empties supportedMimeTypes', () => {+ const configWithDisabledEndpoint = {+ endpoints: {+ disabledEndpoint: {+ disabled: true,+ fileLimit: 15,+ fileSizeLimit: 30,+ totalSizeLimit: 60,+ supportedMimeTypes: ['^video/.*$'],+ },+ },+ };++ const result = mergeFileConfig(configWithDisabledEndpoint);+ expect(result.endpoints.disabledEndpoint).toBeDefined();+ expect(result.endpoints.disabledEndpoint.disabled).toEqual(true);+ expect(result.endpoints.disabledEndpoint.fileLimit).toEqual(0);+ expect(result.endpoints.disabledEndpoint.fileSizeLimit).toEqual(0);+ expect(result.endpoints.disabledEndpoint.totalSizeLimit).toEqual(0);+ expect(result.endpoints.disabledEndpoint.supportedMimeTypes).toEqual([]);+ });+});diff --git a/packages/data-provider/specs/openapiSpecs.ts b/packages/data-provider/specs/openapiSpecs.tsnew file mode 100644index 0000000000..38e9c44019--- /dev/null+++ b/packages/data-provider/specs/openapiSpecs.ts@@ -0,0 +1,350 @@+import { OpenAPIV3 } from 'openapi-types';++export type FlowchartSchema = {+ mermaid: {+ type: 'string';+ description: 'Flowchart to be rendered, in Mermaid syntax';+ };+ title: {+ type: 'string';+ description: 'Title of the flowchart';+ };+};++export const getWeatherOpenapiSpec: OpenAPIV3.Document = {+ openapi: '3.1.0',+ info: {+ title: 'Get weather data',+ description: 'Retrieves current weather data for a location.',+ version: 'v1.0.0',+ },+ servers: [+ {+ url: 'https://weather.example.com',+ },+ ],+ paths: {+ '/location': {+ get: {+ description: 'Get temperature for a specific location',+ operationId: 'GetCurrentWeather',+ parameters: [+ {+ name: 'location',+ in: 'query',+ description: 'The city and state to retrieve the weather for',+ required: true,+ schema: {+ type: 'string',+ },+ },+ ],+ requestBody: {+ required: true,+ content: {+ 'application/json': {+ schema: {+ type: 'object',+ properties: {+ locations: {+ type: 'array',+ items: {+ type: 'object',+ properties: {+ city: {+ type: 'string',+ example: 'San Francisco',+ },+ state: {+ type: 'string',+ example: 'CA',+ },+ countryCode: {+ type: 'string',+ description: 'ISO 3166-1 alpha-2 country code',+ example: 'US',+ },+ time: {+ type: 'string',+ description:+ 'Optional time for which the weather is requested, in ISO 8601 format.',+ example: '2023-12-04T14:00:00Z',+ },+ },+ required: ['city', 'state', 'countryCode'],+ description:+ 'Details of the location for which the weather data is requested.',+ },+ description: 'A list of locations to retrieve the weather for.',+ },+ },+ },+ },+ },+ },+ deprecated: false,+ responses: {},+ },+ },+ },+ components: {+ schemas: {},+ },+};++export const whimsicalOpenapiSpec: OpenAPIV3.Document = {+ openapi: '3.0.0',+ info: {+ version: '1.0.0',+ title: 'Diagram to Image API',+ description: 'A simple API to generate flowchart, mindmap, or sequence diagram images.',+ },+ servers: [{ url: 'https://whimsical.com/api' }],+ paths: {+ '/ai.chatgpt.render-flowchart': {+ post: {+ operationId: 'postRenderFlowchart',+ // 'x-openai-isConsequential': false,+ summary: 'Renders a flowchart',+ description:+ 'Accepts a string describing a flowchart and returns a URL to a rendered image',+ requestBody: {+ content: {+ 'application/json': {+ schema: {+ $ref: '#/components/schemas/FlowchartRequest',+ },+ },+ },+ required: true,+ },+ responses: {+ '200': {+ description: 'URL to the rendered image',+ content: {+ 'application/json': {+ schema: {+ $ref: '#/components/schemas/FlowchartResponse',+ },+ },+ },+ },+ },+ },+ },+ },+ components: {+ schemas: {+ FlowchartRequest: {+ type: 'object',+ properties: {+ mermaid: {+ type: 'string',+ description: 'Flowchart to be rendered, in Mermaid syntax',+ },+ title: {+ type: 'string',+ description: 'Title of the flowchart',+ },+ },+ required: ['mermaid'],+ },+ FlowchartResponse: {+ type: 'object',+ properties: {+ imageURL: {+ type: 'string',+ description: 'URL of the rendered image',+ },+ },+ },+ },+ },+};++export const scholarAIOpenapiSpec = `+openapi: 3.0.1+info:+ title: ScholarAI+ description: Allows the user to search facts and findings from scientific articles+ version: 'v1'+servers:+ - url: https://scholar-ai.net+paths:+ /api/abstracts:+ get:+ operationId: searchAbstracts+ summary: Get relevant paper abstracts by keywords search+ parameters:+ - name: keywords+ in: query+ description: Keywords of inquiry which should appear in article. Must be in English.+ required: true+ schema:+ type: string+ - name: sort+ in: query+ description: The sort order for results. Valid values are cited_by_count or publication_date. Excluding this value does a relevance based search.+ required: false+ schema:+ type: string+ enum:+ - cited_by_count+ - publication_date+ - name: query+ in: query+ description: The user query+ required: true+ schema:+ type: string+ - name: peer_reviewed_only+ in: query+ description: Whether to only return peer reviewed articles. Defaults to true, ChatGPT should cautiously suggest this value can be set to false+ required: false+ schema:+ type: string+ - name: start_year+ in: query+ description: The first year, inclusive, to include in the search range. Excluding this value will include all years.+ required: false+ schema:+ type: string+ - name: end_year+ in: query+ description: The last year, inclusive, to include in the search range. Excluding this value will include all years.+ required: false+ schema:+ type: string+ - name: offset+ in: query+ description: The offset of the first result to return. Defaults to 0.+ required: false+ schema:+ type: string+ responses:+ "200":+ description: OK+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/searchAbstractsResponse'+ /api/fulltext:+ get:+ operationId: getFullText+ summary: Get full text of a paper by URL for PDF+ parameters:+ - name: pdf_url+ in: query+ description: URL for PDF+ required: true+ schema:+ type: string+ - name: chunk+ in: query+ description: chunk number to retrieve, defaults to 1+ required: false+ schema:+ type: number+ responses:+ "200":+ description: OK+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/getFullTextResponse'+ /api/save-citation:+ get:+ operationId: saveCitation+ summary: Save citation to reference manager+ parameters:+ - name: doi+ in: query+ description: Digital Object Identifier (DOI) of article+ required: true+ schema:+ type: string+ - name: zotero_user_id+ in: query+ description: Zotero User ID+ required: true+ schema:+ type: string+ - name: zotero_api_key+ in: query+ description: Zotero API Key+ required: true+ schema:+ type: string+ responses:+ "200":+ description: OK+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/saveCitationResponse'+components:+ schemas:+ searchAbstractsResponse:+ type: object+ properties:+ next_offset:+ type: number+ description: The offset of the next page of results.+ total_num_results:+ type: number+ description: The total number of results.+ abstracts:+ type: array+ items:+ type: object+ properties:+ title:+ type: string+ abstract:+ type: string+ description: Summary of the context, methods, results, and conclusions of the paper.+ doi:+ type: string+ description: The DOI of the paper.+ landing_page_url:+ type: string+ description: Link to the paper on its open-access host.+ pdf_url:+ type: string+ description: Link to the paper PDF.+ publicationDate:+ type: string+ description: The date the paper was published in YYYY-MM-DD format.+ relevance:+ type: number+ description: The relevance of the paper to the search query. 1 is the most relevant.+ creators:+ type: array+ items:+ type: string+ description: The name of the creator.+ cited_by_count:+ type: number+ description: The number of citations of the article.+ description: The list of relevant abstracts.+ getFullTextResponse:+ type: object+ properties:+ full_text:+ type: string+ description: The full text of the paper.+ pdf_url:+ type: string+ description: The PDF URL of the paper.+ chunk:+ type: number+ description: The chunk of the paper.+ total_chunk_num:+ type: number+ description: The total chunks of the paper.+ saveCitationResponse:+ type: object+ properties:+ message:+ type: string+ description: Confirmation of successful save or error message.`;diff --git a/packages/data-provider/src/actions.ts b/packages/data-provider/src/actions.tsnew file mode 100644index 0000000000..56113ba132--- /dev/null+++ b/packages/data-provider/src/actions.ts@@ -0,0 +1,347 @@+import axios from 'axios';+import { URL } from 'url';+import crypto from 'crypto';+import { load } from 'js-yaml';+import type { FunctionTool, Schema, Reference, ActionMetadata } from './types/assistants';+import type { OpenAPIV3 } from 'openapi-types';+import { Tools, AuthTypeEnum, AuthorizationTypeEnum } from './types/assistants';++export type ParametersSchema = {+ type: string;+ properties: Record<string, Reference | Schema>;+ required: string[];+};++export type ApiKeyCredentials = {+ api_key: string;+ custom_auth_header?: string;+ authorization_type?: AuthorizationTypeEnum;+};++export type OAuthCredentials = {+ tokenUrl: string;+ clientId: string;+ clientSecret: string;+ scope: string;+};++export type Credentials = ApiKeyCredentials | OAuthCredentials;++export function sha1(input: string) {+ return crypto.createHash('sha1').update(input).digest('hex');+}++export function createURL(domain: string, path: string) {+ const myURL = new URL(path, domain);+ return myURL.toString();+}++export class FunctionSignature {+ name: string;+ description: string;+ parameters: ParametersSchema;++ constructor(name: string, description: string, parameters: ParametersSchema) {+ this.name = name;+ this.description = description;+ if (parameters.properties?.['requestBody']) {+ this.parameters = parameters.properties?.['requestBody'] as ParametersSchema;+ } else {+ this.parameters = parameters;+ }+ }++ toObjectTool(): FunctionTool {+ return {+ type: Tools.function,+ function: {+ name: this.name,+ description: this.description,+ parameters: this.parameters,+ },+ };+ }+}++export class ActionRequest {+ domain: string;+ path: string;+ method: string;+ operation: string;+ operationHash?: string;+ isConsequential: boolean;+ contentType: string;+ params?: object;++ constructor(+ domain: string,+ path: string,+ method: string,+ operation: string,+ isConsequential: boolean,+ contentType: string,+ ) {+ this.domain = domain;+ this.path = path;+ this.method = method;+ this.operation = operation;+ this.isConsequential = isConsequential;+ this.contentType = contentType;+ }++ private authHeaders: Record<string, string> = {};+ private authToken?: string;++ async setParams(params: object) {+ this.operationHash = sha1(JSON.stringify(params));+ this.params = params;+ }++ async setAuth(metadata: ActionMetadata) {+ if (!metadata.auth) {+ return;+ }++ const {+ type,+ /* API Key */+ authorization_type,+ custom_auth_header,+ /* OAuth */+ authorization_url,+ client_url,+ scope,+ token_exchange_method,+ } = metadata.auth;++ const {+ /* API Key */+ api_key,+ /* OAuth */+ oauth_client_id,+ oauth_client_secret,+ } = metadata;++ const isApiKey = api_key && type === AuthTypeEnum.ServiceHttp;+ const isOAuth =+ oauth_client_id &&+ oauth_client_secret &&+ type === AuthTypeEnum.OAuth &&+ authorization_url &&+ client_url &&+ scope &&+ token_exchange_method;++ if (isApiKey && authorization_type === AuthorizationTypeEnum.Basic) {+ const basicToken = Buffer.from(api_key).toString('base64');+ this.authHeaders['Authorization'] = `Basic ${basicToken}`;+ } else if (isApiKey && authorization_type === AuthorizationTypeEnum.Bearer) {+ this.authHeaders['Authorization'] = `Bearer ${api_key}`;+ } else if (+ isApiKey &&+ authorization_type === AuthorizationTypeEnum.Custom &&+ custom_auth_header+ ) {+ this.authHeaders[custom_auth_header] = api_key;+ } else if (isOAuth) {+ // TODO: WIP - OAuth support+ if (!this.authToken) {+ const tokenResponse = await axios.post(+ client_url,+ {+ client_id: oauth_client_id,+ client_secret: oauth_client_secret,+ scope: scope,+ grant_type: 'client_credentials',+ },+ {+ headers: { 'Content-Type': 'application/x-www-form-urlencoded' },+ },+ );+ this.authToken = tokenResponse.data.access_token;+ }+ this.authHeaders['Authorization'] = `Bearer ${this.authToken}`;+ }+ }++ async execute() {+ const url = createURL(this.domain, this.path);+ const headers = {+ ...this.authHeaders,+ 'Content-Type': this.contentType,+ };++ const method = this.method.toLowerCase();++ if (method === 'get') {+ return axios.get(url, { headers, params: this.params });+ } else if (method === 'post') {+ return axios.post(url, this.params, { headers });+ } else if (method === 'put') {+ return axios.put(url, this.params, { headers });+ } else if (method === 'delete') {+ return axios.delete(url, { headers, data: this.params });+ } else if (method === 'patch') {+ return axios.patch(url, this.params, { headers });+ } else {+ throw new Error(`Unsupported HTTP method: ${this.method}`);+ }+ }+}++export function resolveRef(+ schema: OpenAPIV3.SchemaObject | OpenAPIV3.ReferenceObject | OpenAPIV3.RequestBodyObject,+ components?: OpenAPIV3.ComponentsObject,+): OpenAPIV3.SchemaObject {+ if ('$ref' in schema && components) {+ const refPath = schema.$ref.replace(/^#\/components\/schemas\//, '');+ const resolvedSchema = components.schemas?.[refPath];+ if (!resolvedSchema) {+ throw new Error(`Reference ${schema.$ref} not found`);+ }+ return resolveRef(resolvedSchema, components);+ }+ return schema as OpenAPIV3.SchemaObject;+}++/** Function to convert OpenAPI spec to function signatures and request builders */+export function openapiToFunction(openapiSpec: OpenAPIV3.Document): {+ functionSignatures: FunctionSignature[];+ requestBuilders: Record<string, ActionRequest>;+} {+ const functionSignatures: FunctionSignature[] = [];+ const requestBuilders: Record<string, ActionRequest> = {};++ // Base URL from OpenAPI spec servers+ const baseUrl = openapiSpec.servers?.[0]?.url ?? '';++ // Iterate over each path and method in the OpenAPI spec+ for (const [path, methods] of Object.entries(openapiSpec.paths)) {+ for (const [method, operation] of Object.entries(methods as OpenAPIV3.PathsObject)) {+ const operationObj = operation as OpenAPIV3.OperationObject & {+ 'x-openai-isConsequential'?: boolean;+ };++ // Operation ID is used as the function name+ const operationId = operationObj.operationId || `${method}_${path}`;+ const description = operationObj.summary || operationObj.description || '';++ const parametersSchema: ParametersSchema = { type: 'object', properties: {}, required: [] };++ if (operationObj.requestBody) {+ const requestBody = operationObj.requestBody as OpenAPIV3.RequestBodyObject;+ const content = requestBody.content;+ const contentType = Object.keys(content)[0];+ const schema = content[contentType]?.schema;+ const resolvedSchema = resolveRef(+ schema as OpenAPIV3.ReferenceObject | OpenAPIV3.SchemaObject,+ openapiSpec.components,+ );+ parametersSchema.properties['requestBody'] = resolvedSchema;+ }++ if (operationObj.parameters) {+ for (const param of operationObj.parameters) {+ const paramObj = param as OpenAPIV3.ParameterObject;+ const resolvedSchema = resolveRef(+ { ...paramObj.schema } as OpenAPIV3.ReferenceObject | OpenAPIV3.SchemaObject,+ openapiSpec.components,+ );+ parametersSchema.properties[paramObj.name] = resolvedSchema;+ if (paramObj.required) {+ parametersSchema.required.push(paramObj.name);+ }+ if (paramObj.description && !('$$ref' in parametersSchema.properties[paramObj.name])) {+ parametersSchema.properties[paramObj.name].description = paramObj.description;+ }+ }+ }++ const functionSignature = new FunctionSignature(operationId, description, parametersSchema);+ functionSignatures.push(functionSignature);++ const actionRequest = new ActionRequest(+ baseUrl,+ path,+ method,+ operationId,+ !!operationObj['x-openai-isConsequential'], // Custom extension for consequential actions+ operationObj.requestBody ? 'application/json' : 'application/x-www-form-urlencoded',+ );++ requestBuilders[operationId] = actionRequest;+ }+ }++ return { functionSignatures, requestBuilders };+}++export type ValidationResult = {+ status: boolean;+ message: string;+ spec?: OpenAPIV3.Document;+};++export function validateAndParseOpenAPISpec(specString: string): ValidationResult {+ try {+ let parsedSpec;+ try {+ parsedSpec = JSON.parse(specString);+ } catch {+ parsedSpec = load(specString);+ }++ // Check for servers+ if (+ !parsedSpec.servers ||+ !Array.isArray(parsedSpec.servers) ||+ parsedSpec.servers.length === 0+ ) {+ return { status: false, message: 'Could not find a valid URL in `servers`' };+ }++ if (!parsedSpec.servers[0].url) {+ return { status: false, message: 'Could not find a valid URL in `servers`' };+ }++ // Check for paths+ const paths = parsedSpec.paths;+ if (!paths || typeof paths !== 'object' || Object.keys(paths).length === 0) {+ return { status: false, message: 'No paths found in the OpenAPI spec.' };+ }++ const components = parsedSpec.components?.schemas || {};+ const messages = [];++ for (const [path, methods] of Object.entries(paths)) {+ for (const [httpMethod, operation] of Object.entries(methods as OpenAPIV3.PathItemObject)) {+ // Ensure operation is a valid operation object+ const { responses } = operation as OpenAPIV3.OperationObject;+ if (typeof operation === 'object' && responses) {+ for (const [statusCode, response] of Object.entries(responses)) {+ const content = (response as OpenAPIV3.ResponseObject).content;+ if (content && content['application/json'] && content['application/json'].schema) {+ const schema = content['application/json'].schema;+ if ('$ref' in schema && typeof schema.$ref === 'string') {+ const refName = schema.$ref.split('/').pop();+ if (refName && !components[refName]) {+ messages.push(+ `In context=('paths', '${path}', '${httpMethod}', '${statusCode}', 'response', 'content', 'application/json', 'schema'), reference to unknown component ${refName}; using empty schema`,+ );+ }+ }+ }+ }+ }+ }+ }++ return {+ status: true,+ message: messages.join('\n') || 'OpenAPI spec is valid.',+ spec: parsedSpec,+ };+ } catch (error) {+ return { status: false, message: 'Error parsing OpenAPI spec.' };+ }+}diff --git a/packages/data-provider/src/config.ts b/packages/data-provider/src/config.tsindex 753b35bb85..7da785e95c 100644--- a/packages/data-provider/src/config.ts+++ b/packages/data-provider/src/config.ts@@ -1,9 +1,36 @@+/* eslint-disable max-len */import { z } from 'zod';import { EModelEndpoint, eModelEndpointSchema } from './schemas';+import { fileConfigSchema } from './file-config';import { FileSources } from './types/files';export const fileSourceSchema = z.nativeEnum(FileSources);+export const assistantEndpointSchema = z.object({+ /* assistants specific */+ disableBuilder: z.boolean().optional(),+ pollIntervalMs: z.number().optional(),+ timeoutMs: z.number().optional(),+ supportedIds: z.array(z.string()).min(1).optional(),+ excludedIds: z.array(z.string()).min(1).optional(),+ /* general */+ apiKey: z.string().optional(),+ baseURL: z.string().optional(),+ models: z+ .object({+ default: z.array(z.string()).min(1),+ fetch: z.boolean().optional(),+ userIdQuery: z.boolean().optional(),+ })+ .optional(),+ titleConvo: z.boolean().optional(),+ titleMethod: z.union([z.literal('completion'), z.literal('functions')]).optional(),+ titleModel: z.string().optional(),+ headers: z.record(z.any()).optional(),+});++export type TAssistantEndpoint = z.infer<typeof assistantEndpointSchema>;+export const endpointSchema = z.object({name: z.string().refine((value) => !eModelEndpointSchema.safeParse(value).success, {message: `Value cannot be one of the default endpoint (EModelEndpoint) values: ${Object.values(@@ -25,6 +52,19 @@ export const endpointSchema = z.object({forcePrompt: z.boolean().optional(),modelDisplayLabel: z.string().optional(),headers: z.record(z.any()).optional(),+ addParams: z.record(z.any()).optional(),+ dropParams: z.array(z.string()).optional(),+});++export const rateLimitSchema = z.object({+ fileUploads: z+ .object({+ ipMax: z.number().optional(),+ ipWindowInMinutes: z.number().optional(),+ userMax: z.number().optional(),+ userWindowInMinutes: z.number().optional(),+ })+ .optional(),});export const configSchema = z.object({@@ -37,11 +77,17 @@ export const configSchema = z.object({allowedDomains: z.array(z.string()).optional(),}).optional(),+ rateLimits: rateLimitSchema.optional(),+ fileConfig: fileConfigSchema.optional(),endpoints: z.object({- custom: z.array(endpointSchema.partial()),+ [EModelEndpoint.assistants]: assistantEndpointSchema.optional(),+ custom: z.array(endpointSchema.partial()).optional(),}).strict()+ .refine((data) => Object.keys(data).length > 0, {+ message: 'At least one `endpoints` field must be provided.',+ }).optional(),});@@ -54,7 +100,7 @@ export enum KnownEndpoints {export const defaultEndpoints: EModelEndpoint[] = [EModelEndpoint.openAI,- EModelEndpoint.assistant,+ EModelEndpoint.assistants,EModelEndpoint.azureOpenAI,EModelEndpoint.bingAI,EModelEndpoint.chatGPTBrowser,@@ -66,7 +112,7 @@ export const defaultEndpoints: EModelEndpoint[] = [export const alternateName = {[EModelEndpoint.openAI]: 'OpenAI',- [EModelEndpoint.assistant]: 'Assistants',+ [EModelEndpoint.assistants]: 'Assistants',[EModelEndpoint.azureOpenAI]: 'Azure OpenAI',[EModelEndpoint.bingAI]: 'Bing',[EModelEndpoint.chatGPTBrowser]: 'ChatGPT',@@ -77,6 +123,21 @@ export const alternateName = {};export const defaultModels = {+ [EModelEndpoint.assistants]: [+ 'gpt-3.5-turbo-0125',+ 'gpt-4-0125-preview',+ 'gpt-4-turbo-preview',+ 'gpt-4-1106-preview',+ 'gpt-3.5-turbo-1106',+ 'gpt-3.5-turbo-16k-0613',+ 'gpt-3.5-turbo-16k',+ 'gpt-3.5-turbo',+ 'gpt-4',+ 'gpt-4-0314',+ 'gpt-4-32k-0314',+ 'gpt-4-0613',+ 'gpt-3.5-turbo-0613',+ ],[EModelEndpoint.google]: ['gemini-pro','gemini-pro-vision',@@ -121,6 +182,14 @@ export const defaultModels = {],};+export const supportsRetrieval = new Set([+ 'gpt-3.5-turbo-0125',+ 'gpt-4-0125-preview',+ 'gpt-4-turbo-preview',+ 'gpt-4-1106-preview',+ 'gpt-3.5-turbo-1106',+]);+export const EndpointURLs: { [key in EModelEndpoint]: string } = {[EModelEndpoint.openAI]: `/api/ask/${EModelEndpoint.openAI}`,[EModelEndpoint.bingAI]: `/api/ask/${EModelEndpoint.bingAI}`,@@ -130,7 +199,7 @@ export const EndpointURLs: { [key in EModelEndpoint]: string } = {[EModelEndpoint.gptPlugins]: `/api/ask/${EModelEndpoint.gptPlugins}`,[EModelEndpoint.azureOpenAI]: `/api/ask/${EModelEndpoint.azureOpenAI}`,[EModelEndpoint.chatGPTBrowser]: `/api/ask/${EModelEndpoint.chatGPTBrowser}`,- [EModelEndpoint.assistant]: '/api/assistants/chat',+ [EModelEndpoint.assistants]: '/api/assistants/chat',};export const modularEndpoints = new Set<EModelEndpoint | string>([@@ -142,14 +211,6 @@ export const modularEndpoints = new Set<EModelEndpoint | string>([EModelEndpoint.custom,]);-export const supportsFiles = {- [EModelEndpoint.openAI]: true,- [EModelEndpoint.google]: true,- [EModelEndpoint.assistant]: true,- [EModelEndpoint.azureOpenAI]: true,- [EModelEndpoint.custom]: true,-};-export const supportsBalanceCheck = {[EModelEndpoint.openAI]: true,[EModelEndpoint.azureOpenAI]: true,@@ -159,6 +220,19 @@ export const supportsBalanceCheck = {export const visionModels = ['gpt-4-vision', 'llava-13b', 'gemini-pro-vision'];+export function validateVisionModel(+ model: string | undefined,+ additionalModels: string[] | undefined = [],+) {+ if (!model) {+ return false;+ }++ return visionModels.concat(additionalModels).some((visionModel) => model.includes(visionModel));+}++export const imageGenTools = new Set(['dalle', 'dall-e', 'stable-diffusion']);+/*** Enum for cache keys.*/@@ -175,6 +249,11 @@ export enum CacheKeys {* Key for the title generation cache.*/GEN_TITLE = 'genTitle',+ /**+ /**+ * Key for the tools cache.+ */+ TOOLS = 'tools',/*** Key for the model config cache.*/@@ -195,10 +274,18 @@ export enum CacheKeys {* Key for the custom config cache.*/CUSTOM_CONFIG = 'customConfig',+ /**+ * Key for accessing Abort Keys+ */+ ABORT_KEYS = 'abortKeys',/*** Key for the override config cache.*/OVERRIDE_CONFIG = 'overrideConfig',+ /**+ * Key for accessing File Upload Violations (exceeding limit).+ */+ FILE_UPLOAD_LIMIT = 'file_upload_limit',}/**@@ -260,3 +347,27 @@ export enum SettingsTabValues {*/ACCOUNT = 'account',}++/**+ * Enum for app-wide constants+ */+export enum Constants {+ /**+ * Key for the app's version.+ */+ VERSION = 'v0.6.9',+ /**+ * Key for the Custom Config's version (librechat.yaml).+ */+ CONFIG_VERSION = '1.0.3',+ /**+ * Standard value for the first message's `parentMessageId` value, to indicate no parent exists.+ */+ NO_PARENT = '00000000-0000-0000-0000-000000000000',+}++export const defaultOrderQuery: {+ order: 'asc';+} = {+ order: 'asc',+};diff --git a/packages/data-provider/src/createPayload.ts b/packages/data-provider/src/createPayload.tsindex 998b5774b5..5ab4f3cfc8 100644--- a/packages/data-provider/src/createPayload.ts+++ b/packages/data-provider/src/createPayload.ts@@ -12,7 +12,7 @@ export default function createPayload(submission: TSubmission) {let server = EndpointURLs[endpointType ?? endpoint];- if (isEdited && endpoint === EModelEndpoint.assistant) {+ if (isEdited && endpoint === EModelEndpoint.assistants) {server += '/modify';} else if (isEdited) {server = server.replace('/ask/', '/edit/');@@ -32,9 +32,5 @@ export default function createPayload(submission: TSubmission) {conversationId,};- if (endpoint === EModelEndpoint.assistant) {- payload.messages = messages;- }-return { server, payload };}diff --git a/packages/data-provider/src/data-service.ts b/packages/data-provider/src/data-service.tsindex 67a1f4218e..8e4d840d7d 100644--- a/packages/data-provider/src/data-service.ts+++ b/packages/data-provider/src/data-service.ts@@ -196,23 +196,57 @@ export const listAssistants = (return request.get(endpoints.assistants(), { params });};+/* Tools */++export const getAvailableTools = (): Promise<s.TPlugin[]> => {+ return request.get(`${endpoints.assistants()}/tools`);+};+/* Files */export const getFiles = (): Promise<f.TFile[]> => {return request.get(endpoints.files());};+export const getFileConfig = (): Promise<f.FileConfig> => {+ return request.get(`${endpoints.files()}/config`);+};+export const uploadImage = (data: FormData): Promise<f.TFileUpload> => {return request.postMultiPart(endpoints.images(), data);};+export const uploadFile = (data: FormData): Promise<f.TFileUpload> => {+ return request.postMultiPart(endpoints.files(), data);+};+export const uploadAvatar = (data: FormData): Promise<f.AvatarUploadResponse> => {return request.postMultiPart(endpoints.avatar(), data);};-export const deleteFiles = async (files: f.BatchFile[]): Promise<f.DeleteFilesResponse> =>+export const uploadAssistantAvatar = (data: m.AssistantAvatarVariables): Promise<a.Assistant> => {+ return request.postMultiPart(endpoints.assistants(`avatar/${data.assistant_id}`), data.formData);+};++export const updateAction = (data: m.UpdateActionVariables): Promise<m.UpdateActionResponse> => {+ const { assistant_id, ...body } = data;+ return request.post(endpoints.assistants(`actions/${assistant_id}`), body);+};++export function getActions(): Promise<a.Action[]> {+ return request.get(endpoints.assistants('actions'));+}++export function getAssistantDocs(): Promise<a.AssistantDocument[]> {+ return request.get(endpoints.assistants('documents'));+}++export const deleteFiles = async (+ files: f.BatchFile[],+ assistant_id?: string,+): Promise<f.DeleteFilesResponse> =>request.deleteWithOptions(endpoints.files(), {- data: { files },+ data: { files, assistant_id },});/* conversations */@@ -237,3 +271,6 @@ export const listConversationsByQuery = (return request.get(endpoints.conversations(pageNumber));}};++export const deleteAction = async (assistant_id: string, action_id: string): Promise<void> =>+ request.delete(endpoints.assistants(`actions/${assistant_id}/${action_id}`));diff --git a/packages/data-provider/src/file-config.ts b/packages/data-provider/src/file-config.tsnew file mode 100644index 0000000000..e610b22514--- /dev/null+++ b/packages/data-provider/src/file-config.ts@@ -0,0 +1,264 @@+/* eslint-disable max-len */+import { z } from 'zod';+import { EModelEndpoint } from './schemas';+import type { FileConfig, EndpointFileConfig } from './types/files';++export const supportsFiles = {+ [EModelEndpoint.openAI]: true,+ [EModelEndpoint.google]: true,+ [EModelEndpoint.assistants]: true,+ [EModelEndpoint.azureOpenAI]: true,+ [EModelEndpoint.custom]: true,+};++export const excelFileTypes = [+ 'application/vnd.ms-excel',+ 'application/msexcel',+ 'application/x-msexcel',+ 'application/x-ms-excel',+ 'application/x-excel',+ 'application/x-dos_ms_excel',+ 'application/xls',+ 'application/x-xls',+ 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',+];++export const fullMimeTypesList = [+ 'text/x-c',+ 'text/x-c++',+ 'application/csv',+ 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',+ 'text/html',+ 'text/x-java',+ 'application/json',+ 'text/markdown',+ 'application/pdf',+ 'text/x-php',+ 'application/vnd.openxmlformats-officedocument.presentationml.presentation',+ 'text/x-python',+ 'text/x-script.python',+ 'text/x-ruby',+ 'text/x-tex',+ 'text/plain',+ 'text/css',+ 'image/jpeg',+ 'text/javascript',+ 'image/gif',+ 'image/png',+ 'application/x-tar',+ 'application/typescript',+ 'application/xml',+ 'application/zip',+ ...excelFileTypes,+];++export const codeInterpreterMimeTypesList = [+ 'text/x-c',+ 'text/x-c++',+ 'application/csv',+ 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',+ 'text/html',+ 'text/x-java',+ 'application/json',+ 'text/markdown',+ 'application/pdf',+ 'text/x-php',+ 'application/vnd.openxmlformats-officedocument.presentationml.presentation',+ 'text/x-python',+ 'text/x-script.python',+ 'text/x-ruby',+ 'text/x-tex',+ 'text/plain',+ 'text/css',+ 'image/jpeg',+ 'text/javascript',+ 'image/gif',+ 'image/png',+ 'application/x-tar',+ 'application/typescript',+ 'application/xml',+ 'application/zip',+ ...excelFileTypes,+];++export const retrievalMimeTypesList = [+ 'text/x-c',+ 'text/x-c++',+ 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',+ 'text/html',+ 'text/x-java',+ 'application/json',+ 'text/markdown',+ 'application/pdf',+ 'text/x-php',+ 'application/vnd.openxmlformats-officedocument.presentationml.presentation',+ 'text/x-python',+ 'text/x-script.python',+ 'text/x-ruby',+ 'text/x-tex',+ 'text/plain',+];++export const imageExtRegex = /\.(jpg|jpeg|png|gif|webp)$/i;++export const excelMimeTypes =+ /^application\/(vnd\.ms-excel|msexcel|x-msexcel|x-ms-excel|x-excel|x-dos_ms_excel|xls|x-xls|vnd\.openxmlformats-officedocument\.spreadsheetml\.sheet)$/;++export const textMimeTypes =+ /^(text\/(x-c|x-c\+\+|x-java|html|markdown|x-php|x-python|x-script\.python|x-ruby|x-tex|plain|css|javascript|csv))$/;++export const applicationMimeTypes =+ /^(application\/(csv|json|pdf|x-tar|typescript|vnd\.openxmlformats-officedocument\.(wordprocessingml\.document|presentationml\.presentation|spreadsheetml\.sheet)|xml|zip))$/;++export const imageMimeTypes = /^image\/(jpeg|gif|png|webp)$/;++export const supportedMimeTypes = [+ textMimeTypes,+ excelMimeTypes,+ applicationMimeTypes,+ imageMimeTypes,+];++export const codeInterpreterMimeTypes = [+ textMimeTypes,+ excelMimeTypes,+ applicationMimeTypes,+ imageMimeTypes,+];++export const retrievalMimeTypes = [+ /^(text\/(x-c|x-c\+\+|html|x-java|markdown|x-php|x-python|x-script\.python|x-ruby|x-tex|plain))$/,+ /^(application\/(json|pdf|vnd\.openxmlformats-officedocument\.(wordprocessingml\.document|presentationml\.presentation)))$/,+];++export const megabyte = 1024 * 1024;+/** Helper function to get megabytes value */+export const mbToBytes = (mb: number): number => mb * megabyte;++export const fileConfig = {+ endpoints: {+ [EModelEndpoint.assistants]: {+ fileLimit: 10,+ fileSizeLimit: mbToBytes(512),+ totalSizeLimit: mbToBytes(512),+ supportedMimeTypes,+ disabled: false,+ },+ default: {+ fileLimit: 10,+ fileSizeLimit: mbToBytes(20),+ totalSizeLimit: mbToBytes(25),+ supportedMimeTypes: [imageMimeTypes],+ disabled: false,+ },+ },+ serverFileSizeLimit: mbToBytes(512),+ avatarSizeLimit: mbToBytes(2),+ checkType: function (fileType: string, supportedTypes: RegExp[] = supportedMimeTypes) {+ return supportedTypes.some((regex) => regex.test(fileType));+ },+};++const supportedMimeTypesSchema = z+ .array(z.any())+ .optional()+ .refine(+ (mimeTypes) => {+ if (!mimeTypes) {+ return true;+ }+ return mimeTypes.every(+ (mimeType) => mimeType instanceof RegExp || typeof mimeType === 'string',+ );+ },+ {+ message: 'Each mimeType must be a string or a RegExp object.',+ },+ );++export const endpointFileConfigSchema = z.object({+ disabled: z.boolean().optional(),+ fileLimit: z.number().min(0).optional(),+ fileSizeLimit: z.number().min(0).optional(),+ totalSizeLimit: z.number().min(0).optional(),+ supportedMimeTypes: supportedMimeTypesSchema.optional(),+});++export const fileConfigSchema = z.object({+ endpoints: z.record(endpointFileConfigSchema).optional(),+ serverFileSizeLimit: z.number().min(0).optional(),+ avatarSizeLimit: z.number().min(0).optional(),+});++/** Helper function to safely convert string patterns to RegExp objects */+export const convertStringsToRegex = (patterns: string[]): RegExp[] =>+ patterns.reduce((acc: RegExp[], pattern) => {+ try {+ const regex = new RegExp(pattern);+ acc.push(regex);+ } catch (error) {+ console.error(`Invalid regex pattern "${pattern}" skipped.`);+ }+ return acc;+ }, []);++export function mergeFileConfig(dynamic: z.infer<typeof fileConfigSchema> | undefined): FileConfig {+ const mergedConfig = fileConfig as FileConfig;+ if (!dynamic) {+ return mergedConfig;+ }++ if (dynamic.serverFileSizeLimit !== undefined) {+ mergedConfig.serverFileSizeLimit = mbToBytes(dynamic.serverFileSizeLimit);+ }++ if (dynamic.avatarSizeLimit !== undefined) {+ mergedConfig.avatarSizeLimit = mbToBytes(dynamic.avatarSizeLimit);+ }++ if (!dynamic.endpoints) {+ return mergedConfig;+ }++ for (const key in dynamic.endpoints) {+ const dynamicEndpoint = (dynamic.endpoints as Record<string, EndpointFileConfig>)[key];++ if (!mergedConfig.endpoints[key]) {+ mergedConfig.endpoints[key] = {};+ }++ const mergedEndpoint = mergedConfig.endpoints[key];++ if (dynamicEndpoint.disabled === true) {+ mergedEndpoint.disabled = true;+ mergedEndpoint.fileLimit = 0;+ mergedEndpoint.fileSizeLimit = 0;+ mergedEndpoint.totalSizeLimit = 0;+ mergedEndpoint.supportedMimeTypes = [];+ continue;+ }++ if (dynamicEndpoint.fileSizeLimit !== undefined) {+ mergedEndpoint.fileSizeLimit = mbToBytes(dynamicEndpoint.fileSizeLimit);+ }++ if (dynamicEndpoint.totalSizeLimit !== undefined) {+ mergedEndpoint.totalSizeLimit = mbToBytes(dynamicEndpoint.totalSizeLimit);+ }++ const configKeys = ['fileLimit'] as const;+ configKeys.forEach((field) => {+ if (dynamicEndpoint[field] !== undefined) {+ mergedEndpoint[field] = dynamicEndpoint[field];+ }+ });++ if (dynamicEndpoint.supportedMimeTypes) {+ mergedEndpoint.supportedMimeTypes = convertStringsToRegex(+ dynamicEndpoint.supportedMimeTypes as unknown as string[],+ );+ }+ }++ return mergedConfig;+}diff --git a/packages/data-provider/src/index.ts b/packages/data-provider/src/index.tsindex 11716ac427..f44a4ffa52 100644--- a/packages/data-provider/src/index.ts+++ b/packages/data-provider/src/index.ts@@ -1,5 +1,6 @@/* config */export * from './config';+export * from './file-config';/* schema helpers */export * from './parsers';/* types (exports schemas from `./types` as they contain needed in other defs) */@@ -17,4 +18,5 @@ import * as dataService from './data-service';export { dataService };/* general helpers */export * from './sse';+export * from './actions';export { default as createPayload } from './createPayload';diff --git a/packages/data-provider/src/keys.ts b/packages/data-provider/src/keys.tsindex ee368ed399..66f58e2640 100644--- a/packages/data-provider/src/keys.ts+++ b/packages/data-provider/src/keys.ts@@ -18,13 +18,20 @@ export enum QueryKeys {assistant = 'assistant',endpointsConfigOverride = 'endpointsConfigOverride',files = 'files',+ fileConfig = 'fileConfig',+ tools = 'tools',+ actions = 'actions',+ assistantDocs = 'assistantDocs',}export enum MutationKeys {- imageUpload = 'imageUpload',+ fileUpload = 'fileUpload',fileDelete = 'fileDelete',updatePreset = 'updatePreset',deletePreset = 'deletePreset',logoutUser = 'logoutUser',avatarUpload = 'avatarUpload',+ assistantAvatarUpload = 'assistantAvatarUpload',+ updateAction = 'updateAction',+ deleteAction = 'deleteAction',}diff --git a/packages/data-provider/src/parsers.ts b/packages/data-provider/src/parsers.tsindex 89872b1b0a..1a3e7d8340 100644--- a/packages/data-provider/src/parsers.ts+++ b/packages/data-provider/src/parsers.ts@@ -35,7 +35,7 @@ const endpointSchemas: Record<EModelEndpoint, EndpointSchema> = {[EModelEndpoint.anthropic]: anthropicSchema,[EModelEndpoint.chatGPTBrowser]: chatGPTBrowserSchema,[EModelEndpoint.gptPlugins]: gptPluginsSchema,- [EModelEndpoint.assistant]: assistantSchema,+ [EModelEndpoint.assistants]: assistantSchema,};// const schemaCreators: Record<EModelEndpoint, (customSchema: DefaultSchemaValues) => EndpointSchema> = {@@ -172,16 +172,16 @@ type CompactEndpointSchema =| typeof compactPluginsSchema;const compactEndpointSchemas: Record<string, CompactEndpointSchema> = {- openAI: compactOpenAISchema,- azureOpenAI: compactOpenAISchema,- custom: compactOpenAISchema,- assistant: assistantSchema,- google: compactGoogleSchema,+ [EModelEndpoint.openAI]: compactOpenAISchema,+ [EModelEndpoint.azureOpenAI]: compactOpenAISchema,+ [EModelEndpoint.custom]: compactOpenAISchema,+ [EModelEndpoint.assistants]: assistantSchema,+ [EModelEndpoint.google]: compactGoogleSchema,/* BingAI needs all fields */- bingAI: bingAISchema,- anthropic: compactAnthropicSchema,- chatGPTBrowser: compactChatGPTSchema,- gptPlugins: compactPluginsSchema,+ [EModelEndpoint.bingAI]: bingAISchema,+ [EModelEndpoint.anthropic]: compactAnthropicSchema,+ [EModelEndpoint.chatGPTBrowser]: compactChatGPTSchema,+ [EModelEndpoint.gptPlugins]: compactPluginsSchema,};export const parseCompactConvo = ({diff --git a/packages/data-provider/src/react-query/assistants.ts b/packages/data-provider/src/react-query/assistants.tsdeleted file mode 100644index 7c40ae7375..0000000000--- a/packages/data-provider/src/react-query/assistants.ts+++ /dev/null@@ -1,138 +0,0 @@-import { useQuery, useMutation, useQueryClient, useInfiniteQuery } from '@tanstack/react-query';-import type {- UseQueryOptions,- UseMutationResult,- QueryObserverResult,- UseInfiniteQueryOptions,-} from '@tanstack/react-query';-import * as t from '../types/assistants';-import * as dataService from '../data-service';-import { QueryKeys } from '../keys';--/**- * Hook for listing all assistants, with optional parameters provided for pagination and sorting- */-export const useListAssistantsQuery = <TData = t.AssistantListResponse>(- params?: t.AssistantListParams,- config?: UseQueryOptions<t.AssistantListResponse, unknown, TData>,-): QueryObserverResult<TData> => {- return useQuery<t.AssistantListResponse, unknown, TData>(- [QueryKeys.assistants, params],- () => dataService.listAssistants(params),- {- // Example selector to sort them by created_at- // select: (res) => {- // return res.data.sort((a, b) => a.created_at - b.created_at);- // },- refetchOnWindowFocus: false,- refetchOnReconnect: false,- refetchOnMount: false,- retry: false,- ...config,- },- );-};--export const useListAssistantsInfiniteQuery = (- params?: t.AssistantListParams,- config?: UseInfiniteQueryOptions<t.AssistantListResponse, Error>,-) => {- return useInfiniteQuery<t.AssistantListResponse, Error>(- ['assistantsList', params],- ({ pageParam = '' }) => dataService.listAssistants({ ...params, after: pageParam }),- {- getNextPageParam: (lastPage) => {- // lastPage is of type AssistantListResponse, you can use the has_more and last_id from it directly- if (lastPage.has_more) {- return lastPage.last_id;- }- return undefined;- },- ...config,- },- );-};--/**- * Hook for creating a new assistant- */-export const useCreateAssistantMutation = (): UseMutationResult<- t.Assistant,- Error,- t.AssistantCreateParams-> => {- const queryClient = useQueryClient();- return useMutation(- (newAssistantData: t.AssistantCreateParams) => dataService.createAssistant(newAssistantData),- {- onSuccess: () => {- // Invalidate and refetch assistants query to update list- queryClient.invalidateQueries([QueryKeys.assistants]);- },- },- );-};--/**- * Hook for retrieving details about a single assistant- */-export const useGetAssistantByIdQuery = (- assistant_id: string,- config?: UseQueryOptions<t.Assistant>,-): QueryObserverResult<t.Assistant> => {- return useQuery<t.Assistant>(- [QueryKeys.assistant, assistant_id],- () => dataService.getAssistantById(assistant_id),- {- enabled: !!assistant_id, // Query will not execute until the assistant_id exists- refetchOnWindowFocus: false,- refetchOnReconnect: false,- refetchOnMount: false,- retry: false,- ...config,- },- );-};--/**- * Hook for updating an assistant- */-export const useUpdateAssistantMutation = (): UseMutationResult<- t.Assistant,- Error,- { assistant_id: string; data: t.AssistantUpdateParams }-> => {- const queryClient = useQueryClient();- return useMutation(- ({ assistant_id, data }: { assistant_id: string; data: t.AssistantUpdateParams }) =>- dataService.updateAssistant(assistant_id, data),- {- onSuccess: (_, { assistant_id }) => {- // Invalidate and refetch assistant details query- queryClient.invalidateQueries([QueryKeys.assistant, assistant_id]);- // Optionally invalidate and refetch list of assistants- queryClient.invalidateQueries([QueryKeys.assistants]);- },- },- );-};--/**- * Hook for deleting an assistant- */-export const useDeleteAssistantMutation = (): UseMutationResult<- void,- Error,- { assistant_id: string }-> => {- const queryClient = useQueryClient();- return useMutation(- ({ assistant_id }: { assistant_id: string }) => dataService.deleteAssistant(assistant_id),- {- onSuccess: () => {- // Invalidate and refetch assistant list query- queryClient.invalidateQueries([QueryKeys.assistants]);- },- },- );-};diff --git a/packages/data-provider/src/react-query/index.ts b/packages/data-provider/src/react-query/index.tsindex 54ab962a01..848adb05ae 100644--- a/packages/data-provider/src/react-query/index.ts+++ b/packages/data-provider/src/react-query/index.ts@@ -1,2 +1 @@export * from './react-query-service';-export * from './assistants';diff --git a/packages/data-provider/src/react-query/react-query-service.ts b/packages/data-provider/src/react-query/react-query-service.tsindex 6517f85f4b..159be64dc6 100644--- a/packages/data-provider/src/react-query/react-query-service.ts+++ b/packages/data-provider/src/react-query/react-query-service.ts@@ -9,6 +9,7 @@ import {import * as t from '../types';import * as s from '../schemas';import * as m from '../types/mutations';+import { defaultOrderQuery } from '../config';import * as dataService from '../data-service';import request from '../request';import { QueryKeys } from '../keys';@@ -136,6 +137,14 @@ export const useRevokeUserKeyMutation = (name: string): UseMutationResult<unknowreturn useMutation(() => dataService.revokeUserKey(name), {onSuccess: () => {queryClient.invalidateQueries([QueryKeys.name]);+ if (name === s.EModelEndpoint.assistants) {+ queryClient.invalidateQueries([QueryKeys.assistants, defaultOrderQuery]);+ queryClient.invalidateQueries([QueryKeys.assistantDocs]);+ queryClient.invalidateQueries([QueryKeys.assistants]);+ queryClient.invalidateQueries([QueryKeys.assistant]);+ queryClient.invalidateQueries([QueryKeys.actions]);+ queryClient.invalidateQueries([QueryKeys.tools]);+ }},});};@@ -145,6 +154,12 @@ export const useRevokeAllUserKeysMutation = (): UseMutationResult<unknown> => {return useMutation(() => dataService.revokeAllUserKeys(), {onSuccess: () => {queryClient.invalidateQueries([QueryKeys.name]);+ queryClient.invalidateQueries([QueryKeys.assistants, defaultOrderQuery]);+ queryClient.invalidateQueries([QueryKeys.assistantDocs]);+ queryClient.invalidateQueries([QueryKeys.assistants]);+ queryClient.invalidateQueries([QueryKeys.assistant]);+ queryClient.invalidateQueries([QueryKeys.actions]);+ queryClient.invalidateQueries([QueryKeys.tools]);},});};@@ -277,7 +292,7 @@ export const useLoginUserMutation = (): UseMutationResult<localStorage.removeItem('lastSelectedModel');localStorage.removeItem('lastSelectedTools');localStorage.removeItem('filesToDelete');- localStorage.removeItem('lastAssistant');+ // localStorage.removeItem('lastAssistant');},});};diff --git a/packages/data-provider/src/schemas.ts b/packages/data-provider/src/schemas.tsindex 25cf3825c7..7cc80592fa 100644--- a/packages/data-provider/src/schemas.ts+++ b/packages/data-provider/src/schemas.ts@@ -1,4 +1,8 @@import { z } from 'zod';+import type { TMessageContentParts } from './types/assistants';+import type { TFile } from './types/files';++export const isUUID = z.string().uuid();export enum EModelEndpoint {azureOpenAI = 'azureOpenAI',@@ -8,10 +12,22 @@ export enum EModelEndpoint {google = 'google',gptPlugins = 'gptPlugins',anthropic = 'anthropic',- assistant = 'assistant',+ assistants = 'assistants',custom = 'custom',}+export const defaultAssistantFormValues = {+ assistant: '',+ id: '',+ name: '',+ description: '',+ instructions: '',+ model: 'gpt-3.5-turbo-1106',+ functions: [],+ code_interpreter: false,+ retrieval: false,+};+export const endpointSettings = {[EModelEndpoint.google]: {model: {@@ -153,21 +169,16 @@ export const tMessageSchema = z.object({unfinished: z.boolean().optional(),searchResult: z.boolean().optional(),finish_reason: z.string().optional(),+ /* assistant */+ thread_id: z.string().optional(),});export type TMessage = z.input<typeof tMessageSchema> & {children?: TMessage[];plugin?: TResPlugin | null;plugins?: TResPlugin[];- files?: {- file_id: string;- type?: string;- filename?: string;- preview?: string;- filepath?: string;- height?: number;- width?: number;- }[];+ content?: TMessageContentParts[];+ files?: Partial<TFile>[];};export const tConversationSchema = z.object({@@ -204,16 +215,17 @@ export const tConversationSchema = z.object({toneStyle: z.string().nullable().optional(),maxOutputTokens: z.number().optional(),agentOptions: tAgentOptionsSchema.nullable().optional(),+ file_ids: z.array(z.string()).optional(),/* vision */resendImages: z.boolean().optional(),imageDetail: eImageDetailSchema.optional(),/* assistant */assistant_id: z.string().optional(),- thread_id: z.string().optional(),+ instructions: z.string().optional(),+ /** Used to overwrite active conversation settings when saving a Preset */+ presetOverride: z.record(z.unknown()).optional(),});-export type TConversation = z.infer<typeof tConversationSchema>;-export const tPresetSchema = tConversationSchema.omit({conversationId: true,@@ -246,6 +258,10 @@ export const tPresetUpdateSchema = tConversationSchema.merge(export type TPreset = z.infer<typeof tPresetSchema>;+export type TConversation = z.infer<typeof tConversationSchema> & {+ presetOverride?: Partial<TPreset>;+};+// type DefaultSchemaValues = Partial<typeof google>;export const openAISchema = tConversationSchema@@ -470,7 +486,8 @@ export const assistantSchema = tConversationSchema.pick({model: true,assistant_id: true,- thread_id: true,+ instructions: true,+ promptPrefix: true,}).transform(removeNullishValues).catch(() => ({}));diff --git a/packages/data-provider/src/types.ts b/packages/data-provider/src/types.tsindex a45bf7f547..5cf525cbd4 100644--- a/packages/data-provider/src/types.ts+++ b/packages/data-provider/src/types.ts@@ -25,6 +25,8 @@ export type TEndpointOption = {modelLabel?: string | null;jailbreak?: boolean;key?: string | null;+ /* assistant */+ thread_id?: string;};export type TSubmission = {@@ -45,11 +47,13 @@ export type TPluginAction = {pluginKey: string;action: 'install' | 'uninstall';auth?: unknown;+ isAssistantTool?: boolean;};export type GroupedConversations = [key: string, TConversation[]][];export type TUpdateUserPlugins = {+ isAssistantTool?: boolean;pluginKey: string;action: string;auth?: unknown;@@ -108,6 +112,7 @@ export type TUpdateConversationResponse = TConversation;export type TDeleteConversationRequest = {conversationId?: string;+ thread_id?: string;source?: string;};@@ -140,6 +145,7 @@ export type TConfig = {modelDisplayLabel?: string;userProvide?: boolean | null;userProvideURL?: boolean | null;+ disableBuilder?: boolean;};export type TEndpointsConfig =diff --git a/packages/data-provider/src/types/assistants.ts b/packages/data-provider/src/types/assistants.tsindex c4f32bb55d..5128f25208 100644--- a/packages/data-provider/src/types/assistants.ts+++ b/packages/data-provider/src/types/assistants.ts@@ -1,3 +1,8 @@+import type { OpenAPIV3 } from 'openapi-types';++export type Schema = OpenAPIV3.SchemaObject & { description?: string };+export type Reference = OpenAPIV3.ReferenceObject & { description?: string };+export type Metadata = {[key: string]: unknown;};@@ -12,6 +17,15 @@ export type Tool = {[type: string]: Tools;};+export type FunctionTool = {+ type: Tools;+ function?: {+ description: string;+ name: string;+ parameters: Record<string, unknown>;+ };+};+export type Assistant = {id: string;created_at: number;@@ -22,7 +36,7 @@ export type Assistant = {model: string;name: string | null;object: string;- tools: Tool[];+ tools: FunctionTool[];};export type AssistantCreateParams = {@@ -32,7 +46,7 @@ export type AssistantCreateParams = {instructions?: string | null;metadata?: Metadata | null;name?: string | null;- tools?: Tool[];+ tools?: Array<FunctionTool | string>;};export type AssistantUpdateParams = {@@ -42,7 +56,7 @@ export type AssistantUpdateParams = {instructions?: string | null;metadata?: Metadata | null;name?: string | null;- tools?: Tool[];+ tools?: Array<FunctionTool | string>;};export type AssistantListParams = {@@ -70,3 +84,241 @@ export type File = {object: string;purpose: 'fine-tune' | 'fine-tune-results' | 'assistants' | 'assistants_output';};++/**+ * Details of the Code Interpreter tool call the run step was involved in.+ * Includes the tool call ID, the code interpreter definition, and the type of tool call.+ */+export type CodeToolCall = {+ id: string; // The ID of the tool call.+ code_interpreter: {+ input: string; // The input to the Code Interpreter tool call.+ outputs: Array<Record<string, unknown>>; // The outputs from the Code Interpreter tool call.+ };+ type: 'code_interpreter'; // The type of tool call, always 'code_interpreter'.+};++/**+ * Details of a Function tool call the run step was involved in.+ * Includes the tool call ID, the function definition, and the type of tool call.+ */+export type FunctionToolCall = {+ id: string; // The ID of the tool call object.+ function: {+ arguments: string; // The arguments passed to the function.+ name: string; // The name of the function.+ output: string | null; // The output of the function, null if not submitted.+ };+ type: 'function'; // The type of tool call, always 'function'.+};++/**+ * Details of a Retrieval tool call the run step was involved in.+ * Includes the tool call ID and the type of tool call.+ */+export type RetrievalToolCall = {+ id: string; // The ID of the tool call object.+ retrieval: unknown; // An empty object for now.+ type: 'retrieval'; // The type of tool call, always 'retrieval'.+};++/**+ * Details of the tool calls involved in a run step.+ * Can be associated with one of three types of tools: `code_interpreter`, `retrieval`, or `function`.+ */+export type ToolCallsStepDetails = {+ tool_calls: Array<CodeToolCall | RetrievalToolCall | FunctionToolCall>; // An array of tool calls the run step was involved in.+ type: 'tool_calls'; // Always 'tool_calls'.+};++export type ImageFile = {+ /**+ * The [File](https://platform.openai.com/docs/api-reference/files) ID of the image+ * in the message content.+ */+ file_id: string;+ filename: string;+ filepath: string;+ height: number;+ width: number;+ /**+ * Prompt used to generate the image if applicable.+ */+ prompt?: string;+ /**+ * Additional metadata used to generate or about the image/tool_call.+ */+ metadata?: Record<string, unknown>;+};++// FileCitation.ts+export type FileCitation = {+ end_index: number;+ file_citation: FileCitationDetails;+ start_index: number;+ text: string;+ type: 'file_citation';+};++export type FileCitationDetails = {+ file_id: string;+ quote: string;+};++export type FilePath = {+ end_index: number;+ file_path: FilePathDetails;+ start_index: number;+ text: string;+ type: 'file_path';+};++export type FilePathDetails = {+ file_id: string;+};++export type Text = {+ annotations?: Array<FileCitation | FilePath>;+ value: string;+};++export enum ContentTypes {+ TEXT = 'text',+ TOOL_CALL = 'tool_call',+ IMAGE_FILE = 'image_file',+}++export enum StepTypes {+ TOOL_CALLS = 'tool_calls',+ MESSAGE_CREATION = 'message_creation',+}++export enum ToolCallTypes {+ FUNCTION = 'function',+ RETRIEVAL = 'retrieval',+ CODE_INTERPRETER = 'code_interpreter',+}++export enum StepStatus {+ IN_PROGRESS = 'in_progress',+ CANCELLED = 'cancelled',+ FAILED = 'failed',+ COMPLETED = 'completed',+ EXPIRED = 'expired',+}++export enum MessageContentTypes {+ TEXT = 'text',+ IMAGE_FILE = 'image_file',+}++//enum for RunStatus+// The status of the run: queued, in_progress, requires_action, cancelling, cancelled, failed, completed, or expired.+export enum RunStatus {+ QUEUED = 'queued',+ IN_PROGRESS = 'in_progress',+ REQUIRES_ACTION = 'requires_action',+ CANCELLING = 'cancelling',+ CANCELLED = 'cancelled',+ FAILED = 'failed',+ COMPLETED = 'completed',+ EXPIRED = 'expired',+}++export type PartMetadata = {+ progress?: number;+ asset_pointer?: string;+ status?: string;+ action?: boolean;+};++export type ContentPart = (CodeToolCall | RetrievalToolCall | FunctionToolCall | ImageFile | Text) &+ PartMetadata;++export type TMessageContentParts =+ | { type: ContentTypes.TEXT; text: Text & PartMetadata }+ | {+ type: ContentTypes.TOOL_CALL;+ tool_call: (CodeToolCall | RetrievalToolCall | FunctionToolCall) & PartMetadata;+ }+ | { type: ContentTypes.IMAGE_FILE; image_file: ImageFile & PartMetadata };++export type TContentData = TMessageContentParts & {+ messageId: string;+ conversationId: string;+ userMessageId: string;+ thread_id: string;+ index: number;+ stream?: boolean;+};++export const actionDelimiter = '_action_';++export enum AuthTypeEnum {+ ServiceHttp = 'service_http',+ OAuth = 'oauth',+ None = 'none',+}++export enum AuthorizationTypeEnum {+ Bearer = 'bearer',+ Basic = 'basic',+ Custom = 'custom',+}++export enum TokenExchangeMethodEnum {+ DefaultPost = 'default_post',+ BasicAuthHeader = 'basic_auth_header',+}++export type ActionAuth = {+ authorization_type?: AuthorizationTypeEnum;+ custom_auth_header?: string;+ type?: AuthTypeEnum;+ authorization_content_type?: string;+ authorization_url?: string;+ client_url?: string;+ scope?: string;+ token_exchange_method?: TokenExchangeMethodEnum;+};++export type ActionMetadata = {+ api_key?: string;+ auth?: ActionAuth;+ domain?: string;+ privacy_policy_url?: string;+ raw_spec?: string;+ oauth_client_id?: string;+ oauth_client_secret?: string;+};++export type Action = {+ action_id: string;+ assistant_id: string;+ type?: string;+ settings?: Record<string, unknown>;+ metadata: ActionMetadata;+};++export type AssistantAvatar = {+ filepath: string;+ source: string;+};++export type AssistantDocument = {+ user: string;+ assistant_id: string;+ avatar?: AssistantAvatar;+ access_level?: number;+ file_ids?: string[];+ actions?: string[];+ createdAt?: Date;+ updatedAt?: Date;+};++export enum FilePurpose {+ FineTune = 'fine-tune',+ FineTuneResults = 'fine-tune-results',+ Assistants = 'assistants',+ AssistantsOutput = 'assistants_output',+}diff --git a/packages/data-provider/src/types/files.ts b/packages/data-provider/src/types/files.tsindex dadf5cc640..6f619d4e5c 100644--- a/packages/data-provider/src/types/files.ts+++ b/packages/data-provider/src/types/files.ts@@ -5,17 +5,54 @@ export enum FileSources {s3 = 's3',}+export enum FileContext {+ avatar = 'avatar',+ unknown = 'unknown',+ assistants = 'assistants',+ image_generation = 'image_generation',+ assistants_output = 'assistants_output',+ message_attachment = 'message_attachment',+}++export type EndpointFileConfig = {+ disabled?: boolean;+ fileLimit?: number;+ fileSizeLimit?: number;+ totalSizeLimit?: number;+ supportedMimeTypes?: RegExp[];+};++export type FileConfig = {+ endpoints: {+ [key: string]: EndpointFileConfig;+ };+ serverFileSizeLimit?: number;+ avatarSizeLimit?: number;+ checkType?: (fileType: string, supportedTypes: RegExp[]) => boolean;+};+export type TFile = {- message: string;+ _id?: string;+ __v?: number;+ user: string;+ conversationId?: string;+ message?: string;file_id: string;- filepath: string;+ temp_file_id?: string;+ bytes: number;filename: string;+ filepath: string;+ object: 'file';type: string;- size: number;- temp_file_id?: string;+ usage: number;+ context?: FileContext;source?: FileSources;- height?: number;width?: number;+ height?: number;+ expiresAt?: string | Date;+ preview?: string;+ createdAt?: string | Date;+ updatedAt?: string | Date;};export type TFileUpload = TFile & {@@ -26,15 +63,10 @@ export type AvatarUploadResponse = {url: string;};-export type FileUploadBody = {- formData: FormData;- file_id: string;-};-export type UploadMutationOptions = {- onSuccess?: (data: TFileUpload, variables: FileUploadBody, context?: unknown) => void;- onMutate?: (variables: FileUploadBody) => void | Promise<unknown>;- onError?: (error: unknown, variables: FileUploadBody, context?: unknown) => void;+ onSuccess?: (data: TFileUpload, variables: FormData, context?: unknown) => void;+ onMutate?: (variables: FormData) => void | Promise<unknown>;+ onError?: (error: unknown, variables: FormData, context?: unknown) => void;};export type UploadAvatarOptions = {@@ -56,6 +88,7 @@ export type BatchFile = {export type DeleteFilesBody = {files: BatchFile[];+ assistant_id?: string;};export type DeleteMutationOptions = {diff --git a/packages/data-provider/src/types/mutations.ts b/packages/data-provider/src/types/mutations.tsindex 0d5d6f7f7c..5c79bb9c7e 100644--- a/packages/data-provider/src/types/mutations.ts+++ b/packages/data-provider/src/types/mutations.ts@@ -1,4 +1,13 @@-import { TPreset } from '../types';+import { TPreset, TDeleteConversationResponse, TDeleteConversationRequest } from '../types';+import {+ Assistant,+ AssistantCreateParams,+ AssistantUpdateParams,+ ActionMetadata,+ FunctionTool,+ AssistantDocument,+ Action,+} from './assistants';export type TGenTitleRequest = {conversationId: string;@@ -34,3 +43,83 @@ export type LogoutOptions = {onMutate?: (variables: undefined) => void | Promise<unknown>;onError?: (error: unknown, variables: undefined, context?: unknown) => void;};++export type AssistantAvatarVariables = {+ assistant_id: string;+ formData: FormData;+ postCreation?: boolean;+};++export type UpdateActionVariables = {+ assistant_id: string;+ functions: FunctionTool[];+ metadata: ActionMetadata;+ action_id?: string;+};++export type UploadAssistantAvatarOptions = {+ onSuccess?: (data: Assistant, variables: AssistantAvatarVariables, context?: unknown) => void;+ onMutate?: (variables: AssistantAvatarVariables) => void | Promise<unknown>;+ onError?: (error: unknown, variables: AssistantAvatarVariables, context?: unknown) => void;+};++export type CreateAssistantMutationOptions = {+ onSuccess?: (data: Assistant, variables: AssistantCreateParams, context?: unknown) => void;+ onMutate?: (variables: AssistantCreateParams) => void | Promise<unknown>;+ onError?: (error: unknown, variables: AssistantCreateParams, context?: unknown) => void;+};++export type UpdateAssistantMutationOptions = {+ onSuccess?: (+ data: Assistant,+ variables: { assistant_id: string; data: AssistantUpdateParams },+ context?: unknown,+ ) => void;+ onMutate?: (variables: {+ assistant_id: string;+ data: AssistantUpdateParams;+ }) => void | Promise<unknown>;+ onError?: (+ error: unknown,+ variables: { assistant_id: string; data: AssistantUpdateParams },+ context?: unknown,+ ) => void;+};++export type DeleteAssistantMutationOptions = {+ onSuccess?: (data: void, variables: { assistant_id: string }, context?: unknown) => void;+ onMutate?: (variables: { assistant_id: string }) => void | Promise<unknown>;+ onError?: (error: unknown, variables: { assistant_id: string }, context?: unknown) => void;+};++export type UpdateActionResponse = [AssistantDocument, Assistant, Action];+export type UpdateActionOptions = {+ onSuccess?: (+ data: UpdateActionResponse,+ variables: UpdateActionVariables,+ context?: unknown,+ ) => void;+ onMutate?: (variables: UpdateActionVariables) => void | Promise<unknown>;+ onError?: (error: unknown, variables: UpdateActionVariables, context?: unknown) => void;+};++export type DeleteActionVariables = {+ assistant_id: string;+ action_id: string;+};++export type DeleteActionOptions = {+ onSuccess?: (data: void, variables: DeleteActionVariables, context?: unknown) => void;+ onMutate?: (variables: DeleteActionVariables) => void | Promise<unknown>;+ onError?: (error: unknown, variables: DeleteActionVariables, context?: unknown) => void;+};++export type DeleteConversationOptions = {+ onSuccess?: (+ data: TDeleteConversationResponse,+ variables: TDeleteConversationRequest,+ context?: unknown,+ ) => void;+ onMutate?: (variables: TDeleteConversationRequest) => void | Promise<unknown>;+ onError?: (error: unknown, variables: TDeleteConversationRequest, context?: unknown) => void;+};diff --git a/packages/data-provider/tsconfig.spec.json b/packages/data-provider/tsconfig.spec.jsonnew file mode 100644index 0000000000..f766b118e4--- /dev/null+++ b/packages/data-provider/tsconfig.spec.json@@ -0,0 +1,10 @@+{+ "extends": "./tsconfig.json",+ "compilerOptions": {+ "noEmit": true,+ "outDir": "./dist/tests",+ "baseUrl": "."+ },+ "include": ["specs/**/*", "src/**/*"],+ "exclude": ["node_modules", "dist"]+}